prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>with-mark-object.js<|end_file_name|><|fim▁begin|>/** @jsx h */
import h from '../../../helpers/h'
import { Mark } from '../../../..'
export default function(change) {
change.addMark(
Mark.create({
type: 'bold',
data: { thing: 'value' },
})<|fim▁hole|>}
export const input = (
<va... | ) |
<|file_name|>nsRuleNetwork.cpp<|end_file_name|><|fim▁begin|>/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://... | |
<|file_name|>wire.py<|end_file_name|><|fim▁begin|>""" A component that designates a wire. """
from graph import Node, Edge
from constraint import Constraint
class Wire(object):
""" Wire component """
def __init__(self, graph, node_a=None, node_b=None, edge_i=None):
""" Initializes a wire with two node... | """ Returns node B.
|
<|file_name|>test_sequence_compare.py<|end_file_name|><|fim▁begin|>import dijon
def test_compare_sequence_no_difference():
source_data = ['a', 'b', 'c']
target_data = ['a', 'b', 'c']
diff_graph = dijon.compare(source_data, target_data)
diff_nodes = [n for n in diff_graph.iter_nodes(differences=True)]... | |
<|file_name|>phpdbg.js<|end_file_name|><|fim▁begin|>'use strict';
var element = require('../element');
module.exports = function(node) {
var el = element('phpdbg');
el.innerHTML = node.nodeValue;<|fim▁hole|><|fim▁end|> | return el;
}; |
<|file_name|>AgentdService.java<|end_file_name|><|fim▁begin|>package com.wincom.dcim.agentd;
import java.util.Properties;
import java.util.Set;
public interface AgentdService {
void registerCodecFactory(String key, CodecFactory factory);
void unregisterCodecFactory(String key);<|fim▁hole|> Set<String>... | |
<|file_name|>loadBalancingPolicySelector.component.ts<|end_file_name|><|fim▁begin|>import type { IComponentOptions, IController } from 'angular';
import { module } from 'angular';
import { chain, get, has, intersection, set, without } from 'lodash';
import type { IGceBackendService, INamedPort } from '../../../../doma... | );
const portNames = filteredBackendServices.map((service: IGceBackendService) => service.portName);
const portNameIntersection = intersection(portNames, inUsePortNames); |
<|file_name|>PhysicsFrame.cpp<|end_file_name|><|fim▁begin|><|fim▁hole|> @maintainer Morgan McGuire, http://graphics.cs.williams.edu
@created 2002-07-09
@edited 2006-01-25
*/
#include "G3D/platform.h"
#include "G3D/PhysicsFrame.h"
#include "G3D/BinaryInput.h"
#include "G3D/BinaryOutput.h"
namespace G3D {
Physics... | /**
@file PhysicsFrame.cpp
|
<|file_name|>tests.py<|end_file_name|><|fim▁begin|># -*- coding:utf-8 -*-
from __future__ import unicode_literals
import unittest
from io import BytesIO, StringIO
from decimal import Decimal
import threading
from importlib import import_module
from ijson import common
from ijson.backends.python import basic_parse, Lex... | }, |
<|file_name|>zone_shattrath_city.cpp<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2011-2021 Project SkyFire <https://www.projectskyfire.org/>
* Copyright (C) 2008-2021 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2021 MaNGOS <https://www.getmangos.eu/>
* Copyright (C) 2006-2014 ScriptDev2 <http... | |
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>"""
WSGI config for geology project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands disco... | from sys import path |
<|file_name|>intern.js<|end_file_name|><|fim▁begin|>// Learn more about configuring this file at <https://theintern.github.io/intern/#configuration>.
// These default settings work OK for most people. The options that *must* be changed below are the
// packages, suites, excludeInstrumentation, and (if you want function... | // <https://theintern.github.io/intern/#option-capabilities> for links to the different capabilities options for
// different services.
// Maximum number of simultaneous integration tests that should be executed on the remote WebDriver service |
<|file_name|>list_notifier.py<|end_file_name|><|fim▁begin|># Copyright 2011 OpenStack LLC.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://w... | """Passes notification to mulitple notifiers in a list."""
for driver in _get_drivers(): |
<|file_name|>timeline_test.py<|end_file_name|><|fim▁begin|># Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apa... | self._validateTrace(ctf)
tl = timeline.Timeline(step_stats) |
<|file_name|>AvahiBroadcaster.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2
# -*- coding: utf-8 -*-
import dbus
import avahi
import socket
from folavirt.networking.NetworkInterface import NetworkInterface
"""
Klasa służy do rozgłąszania czegoś poprzez Avahi
"""
class AvahiBroadcaster():
def __init__(sel... | '',
self.avahiport,
'' |
<|file_name|>repo_info.py<|end_file_name|><|fim▁begin|>"""
Methods to get certain kinds of data from the Github API.
Writes each repo's data to a separate file in a given directory
"""
import json
from mimetools import Message
from StringIO import StringIO
from github_util import *
import time
import sys, os
#####
# ... | |
<|file_name|>test_spin_condition.cpp<|end_file_name|><|fim▁begin|>// Copyright (C) 2001-2003
// William E. Kempf
// Copyright (C) 2007 Anthony Williams
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include... | int _val; |
<|file_name|>fields.js<|end_file_name|><|fim▁begin|>var test = require('tap').test;
var CronExpression = require('../lib/expression');
test('Fields are exposed', function(t){
try {
var interval = CronExpression.parse('0 1 2 3 * 1-3,5');
t.ok(interval, 'Interval parsed');
CronExpression.map.forEach(funct... | }); |
<|file_name|>competency_outcomes.js<|end_file_name|><|fim▁begin|>// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the Licen... |
}); |
<|file_name|>metric_space_search.hpp<|end_file_name|><|fim▁begin|>/**
* \file metric_space_search.hpp
*
* This library provides a class that implements a Dynamic Vantage-Point Tree (DVP-Tree) that
* allows for O(logN) time nearest-neighbor queries in a metric-space. A DVP-tree is essentially
* a generalization of... | vertex_type result = aNode; |
<|file_name|>SimpleCardProtocol.cc<|end_file_name|><|fim▁begin|>#include "main/SimpleCardProtocol.hh"
#include "bridge/BridgeConstants.hh"
#include "bridge/CardShuffle.hh"
#include "bridge/CardType.hh"
#include "bridge/Position.hh"
#include "engine/SimpleCardManager.hh"
#include "main/Commands.hh"
#include "main/PeerC... | |
<|file_name|>cookiesetter.rs<|end_file_name|><|fim▁begin|>/*
* This Source Code Form is subject to the
* terms of the Mozilla Public License, v. 2.0
*
* © Gregor Reitzenstein
*/
use iron::prelude::*;
use iron::AfterMiddleware;
use iron::headers::SetCookie;
use iron::typemap::Key;
use cookie::Cookie;
use api::AP... | impl AfterMiddleware for CookieSetter
{
fn after(&self, req: &mut Request, mut res: Response) -> IronResult<Response>
{ |
<|file_name|>sendcoinsdialog.cpp<|end_file_name|><|fim▁begin|>#include "sendcoinsdialog.h"
#include "ui_sendcoinsdialog.h"
#include "walletmodel.h"
#include "bitcoinunits.h"
#include "addressbookpage.h"
#include "optionsmodel.h"
#include "sendcoinsentry.h"
#include "guiutil.h"
#include "askpassphrasedialog.h"
#include ... | |
<|file_name|>level0.py<|end_file_name|><|fim▁begin|>import sys,os
#sys.path.append(os.path.join(os.path.dirname(__file__), '../../..'))
#from ethosgame.ethos.level import Level
from ..level import Level
#from ethosgame.ethos.gameobject import GameObject
from ..gameobject import GameObject
#from ethosgame.ethos.drawnobj... |
def processMouseMotion(self,pos):
#print "Your mouse is at " + str(pos[0]) + " " + str(pos[1]) |
<|file_name|>test_classes.py<|end_file_name|><|fim▁begin|>"""
Test the Multinet Class.
"""
import multinet as mn
import networkx as nx
class TestMultinet(object):
def test_build_multinet(self):
"""
Test building Multinet objects.
"""
mg = mn.Multinet()
assert mg.is_direc... | assert mg[0][1][mg.cid]['L1'] == 10
mg.aggregate_edge(0, 1, 'L1', weight=5) |
<|file_name|>apkhm.py<|end_file_name|><|fim▁begin|>from skimage import measure
import numpy as np
import struct
import math as m
from PIL import Image
from simplify import simplify
import argparse
parser = argparse.ArgumentParser(description='convert apk heightmaps to floating point tiff')
parser.add_argument('fil... | |
<|file_name|>make_supportedsites.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
from __future__ import unicode_literals
import io
import optparse
import os
import sys
# Import youtube_dl
ROOT_DIR = os.path.join(os.path.dirname(__file__), '..')<|fim▁hole|>def main():
parser = optparse.OptionParser(usage='%... | sys.path.insert(0, ROOT_DIR)
import youtube_dl
|
<|file_name|>messages-middleware.js<|end_file_name|><|fim▁begin|>import { LOAD_MORE_MESSAGES, requestMessages, getNextOffset } from '../modules/message';
const loadMoreHandler = ({ store, action }) => {
if (action.type !== LOAD_MORE_MESSAGES) {<|fim▁hole|> return;
}
const { type, key } = action.payload;
co... | |
<|file_name|>immutable-types.js<|end_file_name|><|fim▁begin|>/*
* decaffeinate suggestions:
* DS207: Consider shorter variations of null checks
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
//#############################################################################... | //
// CoCalc: Collaborative web-based calculation |
<|file_name|>HybridVAControl_PROFILED.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python<|fim▁hole|>"""
@file HybridVAControl.py
@author Craig Rafter
@date 19/08/2016
class for fixed time signal control
"""
import signalControl, readJunctionData, traci
from math import atan2, degrees
import numpy as np
from... | |
<|file_name|>test_cisco_switch_protocol.py<|end_file_name|><|fim▁begin|># Copyright 2015-2016 Internap.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/... | |
<|file_name|>textModel.ts<|end_file_name|><|fim▁begin|>/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------... | |
<|file_name|>col.js<|end_file_name|><|fim▁begin|>import React, { Component, } from 'react';
import {
StyleSheet,
View,
} from 'react-native';
export default class Col extends Component {
render() {
return (
<View style={[styles.col, { flex: parseInt(this.props.span) }, this.props.style]}>{this.props.childr... | }
}); |
<|file_name|>SpongeGoalType.java<|end_file_name|><|fim▁begin|>/*
* This file is part of Sponge, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of ... | }
} |
<|file_name|>prime_numbers3.py<|end_file_name|><|fim▁begin|>from math import *
testing_number = int(1)
sum_of_logs = log(2)
n = int(input('Choose a number: '))
while testing_number < n:
testing_number = testing_number + 2
for checking_number in range(2, testing_number):
if testing_number % check... | sum_of_logs = sum_of_logs + testing_number
print(sum_of_logs/n)
print('The sum of the logs is:', sum_of_logs) |
<|file_name|>issue-17651.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/lic... | } |
<|file_name|>main_generator.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#!/usr/bin/python
#
# This is derived from a cadquery script for generating PDIP models in X3D format
#
# from https://bitbucket.org/hyOzd/freecad-macros
# author hyOzd
# This is a
# Dimensions are from Microchips Packaging Specificatio... | expVRML.say("######################################################################")
export_objects, used_color_keys = expVRML.determineColors(Gui, objs, material_substitutions) |
<|file_name|>people.py<|end_file_name|><|fim▁begin|># Recall is a program for storing bookmarks of different things
# Copyright (C) 2012 Cal Paterson
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Softwar... | else:
salt = bcrypt.gensalt()
password_hash = bcrypt.hashpw(request.json["password"], salt) |
<|file_name|>switch.py<|end_file_name|><|fim▁begin|>"""
Support for Eneco Slimmer stekkers (Smart Plugs).
This provides controls for the z-wave smart plugs Toon can control.
"""
import logging
from homeassistant.components.switch import SwitchDevice
import custom_components.toon as toon_main
_LOGGER = logging.getLog... | return self.toon_data_store.get_data('today_energy', self.name)
|
<|file_name|>effectsList.js<|end_file_name|><|fim▁begin|>var EffectsList = [
['复古效果', 'sketch', 'dorsy', '2013-10-12'],
['黄色调效果', 'yellowStyle', 'dorsy', '2013-10-12'],
['缩小', 'mini', 'dorsy', '2013-10-12']
];
var EffectTmp = ' <li data-ename="{name}">\<|fim▁hole|> <span class="author lightFont">... | <img src="style/image/effect/{name}.png" />\
<h3>{cnname}</h3>\
<div class="itemInfo">\ |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from __future__ import print_function<|fim▁hole|>from .Console import *<|fim▁end|> | |
<|file_name|>application_gateway_web_application_firewall_configuration.py<|end_file_name|><|fim▁begin|># coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project... | |
<|file_name|>proxy_service.cc<|end_file_name|><|fim▁begin|>// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/proxy/proxy_service.h"
#include <algorithm>
#include <cmath>
#include <utili... | next_state_ = STATE_CREATE_RESOLVER_COMPLETE;
return proxy_resolver_factory_->CreateProxyResolver( |
<|file_name|>test_account_invoice_line.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright 2015-2016 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import mock
from odoo.addons.connector_carepoint.models import account_invoice_line
from ..common import SetUpCarepoin... | with mock.patch.object(self.unit, 'unit_for') as mk:
mk.side_effect = [None, EndTestException]
with self.assertRaises(EndTestException):
self.unit._import_invoice_lines_for_procurement(True) |
<|file_name|>pathstyles.py<|end_file_name|><|fim▁begin|>from cadnano.gui.views.styles import *
from PyQt5.QtGui import QColor, QFont, QFontMetricsF
# Path Sizing
VIRTUALHELIXHANDLEITEM_RADIUS = 30
VIRTUALHELIXHANDLEITEM_STROKE_WIDTH = 2
PATH_BASE_WIDTH = 20 # used to size bases (grid squares, handles, etc)
PATH_HELIX... | ZPATHHELIXGROUP = 20 |
<|file_name|>issue-42679.rs<|end_file_name|><|fim▁begin|>// run-pass
#![feature(box_syntax)]
#![feature(box_patterns)]
#[derive(Debug, PartialEq)]<|fim▁hole|>enum Test {
Foo(usize),
Bar(isize),
}
fn main() {
let a = box Test::Foo(10);
let b = box Test::Bar(-20);
match (a, b) {
(_, box Test... | |
<|file_name|>test_bsp.cpp<|end_file_name|><|fim▁begin|>//
// This source file is part of appleseed.
// Visit https://appleseedhq.net/ for additional information and resources.
//
// This software is released under the MIT license.
//
// Copyright (c) 2010-2013 Francois Beaune, Jupiter Jazz Limited
// Copyright (c) 2014... |
builder.build(m_tree, move(root_leaf), leaf_factory, leaf_splitter); |
<|file_name|>DT_Utils.py<|end_file_name|><|fim▁begin|># Copyright 2017 Priscilla Boyd. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licen... | |
<|file_name|>spoke.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""spoke -- Git plugin for GitHub integration
Copyright (C) 2012 Alex Headley <aheadley@waysaboutstuff.com>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published b... | |
<|file_name|>types.test.ts<|end_file_name|><|fim▁begin|>/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under... | });
|
<|file_name|>convert.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
Created on Fri Dec 04 13:10:20 2015
@author: bayevskihk
"""
import sys
def main(argv):
number = len(argv)
data_addr = 0
last_addr = 0
if(number != 2):
return
else:
try:
data_addr = in... | rom_file = open(rom_name, 'w') |
<|file_name|>no_0114_flatten_binary_tree_to_linked_list.rs<|end_file_name|><|fim▁begin|>// Definition for a binary tree node.
#[derive(Debug, PartialEq, Eq)]
pub struct TreeNode {
pub val: i32,
pub left: Option<Rc<RefCell<TreeNode>>>,
pub right: Option<Rc<RefCell<TreeNode>>>,
}
impl TreeNode {
#[inline... | |
<|file_name|>feature.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from collections import Counter
import numpy as np
STARTING_LABEL = '*' # Label of t=-1
STARTING_LABEL_INDEX = 0
def default_feature_func(_, X, t):
"""
Returns a list of feature strings.
(Default ... | return empirical_counts
|
<|file_name|>EaselPlugin.js<|end_file_name|><|fim▁begin|>(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.window = global.window || {}));... | * https://greensock.com
*
* @license Copyright 2008-2020, GreenSock. All rights reserved. |
<|file_name|>WordCombinations.py<|end_file_name|><|fim▁begin|># not optimized yet, should be optimized by dp<|fim▁hole|>
def combine(word, k):
if k < 1 or k > len(word):
return []
if k == 1:
return [word[i] for i in range(len(word))]
res = combine(word[:-1], k)
tmp = combine(word[:-1], k... | |
<|file_name|>osx_say.py<|end_file_name|><|fim▁begin|>import os
import re
import subprocess
from utils import whereis_exe
class osx_voice():
def __init__(self, voice_line):
mess = voice_line.split(' ')
cleaned = [ part for part in mess if len(part)>0 ]
self.name = cleaned[0]
self.... | voice_lines = voices_raw.split('\n')
for line in voice_lines:
try:
osx_voices.append(osx_voice(line)) |
<|file_name|>exit_codes.py<|end_file_name|><|fim▁begin|>SUCCESS = 0
FAILURE = 1 # NOTE: click.abort() uses this
<|fim▁hole|><|fim▁end|> | # for when tests are already running
ALREADY_RUNNING = 2 |
<|file_name|>preprocess.py<|end_file_name|><|fim▁begin|>from keras.applications import imagenet_utils
from keras.applications import mobilenet
def dummyPreprocessInput(image):
image -= 127.5<|fim▁hole|>
def getPreprocessFunction(preprocessType):
if preprocessType == "dummy":
return dummyPreprocessIn... | return image |
<|file_name|>factories.py<|end_file_name|><|fim▁begin|>from datetime import datetime
import factory
from zds.forum.factories import PostFactory, TopicFactory
from zds.gallery.factories import GalleryFactory, UserGalleryFactory
from zds.utils.factories import LicenceFactory, SubCategoryFactory
from zds.utils.models im... |
class Meta:
model = PublishableContent |
<|file_name|>ServiceWorkerManager.ts<|end_file_name|><|fim▁begin|>import KeyValueDatabase from "shared/idb/KeyValueDatabase";
import { PreferenceArray } from "shared/preferences";
import { EventEmitterInterface } from "shared/types/helpers";
import { delay } from "shared/util";
import GlobalEvents from "ui/platform/Glo... | |
<|file_name|>jsdoc.js<|end_file_name|><|fim▁begin|>'use strict';
module.exports = {
plugins: ['jsdoc'],
rules: {
'jsdoc/check-access': 'error',
'jsdoc/check-alignment': 'error',
'jsdoc/check-examples': 'error',
'jsdoc/check-indentation': 'error',
'jsdoc/check-param-names': 'error',
'jsdoc/c... | |
<|file_name|>generator.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# ** PTS -- Python Toolkit for working with SKIRT **
# ** © Astronomical Observatory, Ghent University **
# **************... |
pass
|
<|file_name|>bucket_reader.go<|end_file_name|><|fim▁begin|>package outlet
import (
"fmt"
"l2met/bucket"
"l2met/store"
"time"
)
type BucketReader struct {
Store store.Store
Interval time.Duration
Partition string
Ttl uint64
NumOutlets int
NumScanners int
Inbox chan *bucket.Bucket
... | func NewBucketReader(sz, c int, i time.Duration, st store.Store) *BucketReader {
rdr := new(BucketReader)
rdr.Partition = "bucket-reader"
rdr.Inbox = make(chan *bucket.Bucket, sz) |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! [](https://travis-ci.org/lawliet89/rowdy)
//! [](https://dependencyci.com/github/lawliet89/rowdy)
//! [, () => {
it("should get the emit result when there ar... | project.createSourceFile("file2.ts", "const num2 = 2;");
const result = await project.emit(); |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>use std::fmt::Display;
#[derive(Debug)]
struct ImportantExcerpt<'a> {
part: &'a str // if hold ref, need lifetime anno
}
impl<'a> ImportantExcerpt<'a> {
fn level(&self) -> i32 {
3
}
// one of the param is self, so all return
// lifetime ... | |
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for twit 2.2
// Project: https://github.com/ttezel/twit
// Definitions by: Volox <https://github.com/Volox>
// sapphiredev <https://github.com/sapphiredev>
// abraham <https://github.com/abraham>
// ... | country_code: string,
full_name: string,
id: string,
name: string, |
<|file_name|>InheritingTextFormat.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2001-2013 Aspose Pty Ltd. All Rights Reserved.
*
* This file is part of Aspose.Pdf. The source code in this file
* is only intended as a supplement to the documentation, and is provided
* "as is", without warranty of any kind, eith... | |
<|file_name|>calendar.js<|end_file_name|><|fim▁begin|>(function($, utils, $HELPER){
var $app = window.vgrome;
$app.controller('CalendarCtrl', ['$scope', '$compile', 'lang', 'apiProvider', '$controller',
function ($scope, $compile, $lang, $apiProvider, $controller) {
$.extend(this, $control... | _.each(result.records['tasks'], function(record) {
var data = {}; |
<|file_name|>746.js<|end_file_name|><|fim▁begin|>var __v=[
{
"Id": 2329,<|fim▁hole|> "Sort": 0
}
]<|fim▁end|> | "Chapter": 746,
"Name": "nodejs", |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | // english/mod.rs
pub mod greetings; // 查找当前目录下的greetings.rs或者greetings目录下的mod.rs
pub mod farewells; // 查找当前目录下的farewells.rs或者farewells目录下的mod.rs |
<|file_name|>generi_in_istituzioni.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from collections import OrderedDict
import locale
from optparse import make_option
from verify.management.commands import VerifyBaseCommand
from verify.models import *
from verify.politici_models import *
from django.db.models im... | ) |
<|file_name|>data_source_details_influx.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2016, 2018, 2021, Oracle and/or its affiliates. All rights reserved.
// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 a... | |
<|file_name|>with-better-colors.js<|end_file_name|><|fim▁begin|>import expect from 'expect'
import colorsCSS from 'colors.css'
import Color from '../src/with-better-colors'
describe('colors.css support', () => {
it('works as expected', () => {
for (const name in colorsCSS) {
if (colorsCSS.hasOwnProperty(n... | expect(Color(name).toString()) |
<|file_name|>Lab4_2.java<|end_file_name|><|fim▁begin|>public class Lab4_2
{
public static void main(String[] arg)
{
System.out.print(" * |");
for(int x=1;x<=12;x++) {
if (x<10) System.out.print(' ');
if (x<100) System.out.print(' ');
System.out.print(x+" ");
}
System.out.println()... | |
<|file_name|>eigen.py<|end_file_name|><|fim▁begin|># This file is not meant for public use and will be removed in SciPy v2.0.0.
# Use the `scipy.sparse.linalg` namespace for importing the functions
# included below.
import warnings
from . import _eigen
__all__ = [ # noqa: F822
'ArpackError', 'ArpackNoConvergenc... | return __all__ |
<|file_name|>quadratic.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2015, Mikhail Vorotilov
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must reta... | }
} else {
// 2*a2 is the greatest divisor, use it
(diff_sign / a2x2, same_sign / a2x2) |
<|file_name|>RemoveRelationKnowhow.java<|end_file_name|><|fim▁begin|>/*
* RemoveRelationKnowhow.java
* Created on 2013/06/28
*
* Copyright (C) 2011-2013 Nippon Telegraph and Telephone Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance ... | /**
* {@inheritDoc} |
<|file_name|>test_tensorflow.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri May 3 15:48:55 2019
@author: epnevmatikakis
"""
from caiman.paths import caiman_datadir
from caiman.utils.utils import load_graph
import os
import numpy as np
try:
os.environ["KERAS_BACK... | model_name = os.path.join(caiman_datadir(), 'model', 'cnn_model') |
<|file_name|>regexDetection.ts<|end_file_name|><|fim▁begin|>/// <reference path="fourslash.ts" />
//// /*1*/15 / /*2*/Math.min(61 / /*3*/42, 32 / 15) / /*4*/15;
goTo.marker("1");
verify.not.quickInfoIs("RegExp");
goTo.marker("2");
verify.not.quickInfoIs("RegExp");
goTo.marker("3");
verify.not.quickInfoIs("RegExp");<... | goTo.marker("4"); |
<|file_name|>into_iter.rs<|end_file_name|><|fim▁begin|>#![feature(core)]
extern crate core;
#[cfg(test)]
mod tests {
use core::slice::Iter;
// pub trait FixedSizeArray<T> {
// /// Converts the array to immutable slice
// fn as_slice(&self) -> &[T];
// /// Converts the array to mutable ... | |
<|file_name|>test_09_ensemble_prediction.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# Copyright 2015-2021 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://w... | print("\nEnd of tests in: %s\n-------------------\n" % __name__)
|
<|file_name|>readonlyradiobutton.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# (c) Copyright 2001-2009 Hewlett-Packard Development Company, L.P.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Softwa... | #
# Authors: Don Welch
# |
<|file_name|>test_ssh_default_creds.py<|end_file_name|><|fim▁begin|>from routersploit.modules.creds.cameras.arecont.ssh_default_creds import Exploit
<|fim▁hole|> """ Test scenario - testing against SSH server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 22
assert explo... | def test_check_success(target): |
<|file_name|>juce_GlyphArrangement.cpp<|end_file_name|><|fim▁begin|>/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2013 - Raw Material Software Ltd.
Permission is granted to use this software under the terms of either:
... | int i = startIndex;
float lineStartX = glyphs.getReference (startIndex).getLeft();
|
<|file_name|>RelationPlayers.java<|end_file_name|><|fim▁begin|>/*
* Grakn - A Distributed Semantic Database
* Copyright (C) 2016 Grakn Labs Limited
*
* Grakn is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundati... | * @author Felix Chapman
*/
public class RelationPlayers extends AbstractGenerator<RelationPlayer> { |
<|file_name|>bsfs.js<|end_file_name|><|fim▁begin|>var test = require('tape');
var BSFS = require('../lib/bsfs');
indexedDB.deleteDatabase('bsfs-tests');
function randomId () { return Math.random().toString(36).substr(2) }
test('bsfs exists', function (t) {
t.plan(1);
var bsfs = new BSFS('bsfs-tests');
if (!b... | |
<|file_name|>utils_test.go<|end_file_name|><|fim▁begin|>/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unl... | ver, err := GetKubeletVersion(fexec)
switch {
case err != nil && tc.valid:
t.Errorf("GetKubeletVersion: unexpected error for %q. Error: %v", tc.output, err) |
<|file_name|>plugin.min.js<|end_file_name|><|fim▁begin|>tinymce.PluginManager.add("insertdatetime", function (e) {
function t(t, n) {
function i(e, t) {
if (e = "" + e, e.length < t)for (var n = 0; n < t - e.length; n++)e = "0" + e;
return e
}
return n = n || new Dat... | |
<|file_name|>ServiceType.java<|end_file_name|><|fim▁begin|>package com.mrmq.poker.common.glossary;
public enum ServiceType {
ADMIN("admin"),
POKER("poker");
String value;
private ServiceType(String value) {
this.value = value;
}
public String getValue(){
return value;<|fim▁hole|>}<|fim▁end|> | } |
<|file_name|>calculadora.js<|end_file_name|><|fim▁begin|>function init(){
listar();
calcular();
}
function calcular(){
var tabla=$('#tbllistado').DataTable({
"paging": false,
"bInfo" : false,
"searching": false,
"bLengthChange": false //used to hide the property
});
... | function listar(){
$.post('controllers/tarifas.php?op=listarHTML',function(respuesta){
$("#contenido").html(respuesta);
}); |
<|file_name|>index.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | export * from './date-picker.module';
export * from './date-picker.component'; |
<|file_name|>generation.py<|end_file_name|><|fim▁begin|># Copyright 2012 Energid Technologies
from energid_nlp import logic
GENERATION_PROPOSITION = '$generate'
class Error(Exception):
pass
class Generator:
def __init__(self, kb):
self.kb = kb
def generate_prim(self, concept):
if isinstance(concep... | |
<|file_name|>response_status.py<|end_file_name|><|fim▁begin|># coding: utf-8
"""
Wavefront REST API Documentation
<p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagg... | """
|
<|file_name|>alpha.go<|end_file_name|><|fim▁begin|><|fim▁hole|>Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or ag... | /*
Copyright 2017 The Kubernetes Authors.
|
<|file_name|>insert_input.py<|end_file_name|><|fim▁begin|># -*- coding: utf8 -*-
# Author: Adrien Bibal
# Date: 2014
# Insert the student answer in the correction framework file.
import sys
import codecs
input_file = sys.stdin # input = file containing the student answer.
oz_file = codecs.open("/task/task.oz", "r", ... | oz_file.close()
new_file.close() |
<|file_name|>test.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python
"""
Simulate DSR over a network of nodes.
Revision Info
=============
* $LastChangedBy: mandke $
* $LastChangedDate: 2011-10-26 21:51:40 -0500 (Wed, 26 Oct 2011) $
* $LastChangedRevision: 5314 $
:author: Ketan Mandke <kmandke@mail.utexas.edu>
... |
# write tracefile
if options.output is not None: ch.trace.write(options.output)
|
<|file_name|>sql_column_metadata_codec.py<|end_file_name|><|fim▁begin|>from hazelcast.protocol.builtin import FixSizedTypesCodec, CodecUtil
from hazelcast.serialization.bits import *
from hazelcast.protocol.client_message import END_FRAME_BUF, END_FINAL_FRAME_BUF, SIZE_OF_FRAME_LENGTH_AND_FLAGS, create_initial_buffer_c... | |
<|file_name|>parse_iso_20022_files.py<|end_file_name|><|fim▁begin|>import logging
from django.core.management.base import BaseCommand
from payment.postfinance_connector import ISO2022Parser
log = logging.getLogger('tq')
class Command(BaseCommand):
help = '(re)parse ISO 20022 files, ignoring duplicates'
de... | parser.add_argument( |
<|file_name|>Device.cpp<|end_file_name|><|fim▁begin|>#include "Common.h"
#include "Script.h"
#include <atlimage.h>
#include <hidsdi.h>
#include <SetupAPI.h>
#define HID_SFIP 'SFIP'
#define HID_X52P 'X52P'
#define HID_UNKN 'UNKN'
// CHECKME : Do we still need all this code since we now have a GetSerialNumber() in ... | }
}
_lockHID.Release(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.