ngram listlengths 0 82k |
|---|
[
"__all__ = [ \"BackendConfig\", \"CheckpointStrategy\", \"get_dataset_shard\", \"load_checkpoint\", \"local_rank\", \"report\", \"save_checkpoint\",",
"ray.train.session import (get_dataset_shard, local_rank, load_checkpoint, report, save_checkpoint, world_rank, world_size) from",
"world_rank, world_size) from ... |
[
"from model.contact import Contact from model.group import Group import random",
"db): app.open_home_page() contact = db.get_contact_list() if len(contact) == 0: app.contact.create(Contact(firstname",
"def test_del_contact_from_group(app, db): app.open_home_page() contact = db.get_contact_list() if len(contact)... |
[
"@admin.register(User) class UserAdmin(admin.ModelAdmin): list_display = ['email', 'nickname'] list_display_links = ['email',",
"django.contrib import admin from accounts.models import User, Profile, UserFollow @admin.register(User)",
"accounts.models import User, Profile, UserFollow @admin.register(User) class... |
[
"orig_cmap = cmap # If the user do not requires",
"(-180, 180, -90, 90) if lats is None: lats =",
"cmap, then we use it for all the fields cmap",
"= np.amax(lons) + expand_ext bbox = (minLon, maxLon, minLat, maxLat)",
"None _norm = None # Use to normalize the colormap.",
"read xarrays, numpy arrays, and n... |
[
"# Dataset path target_path = Path('target/') annotation_images_path = Path('dataset/ade20k/annotations/training/').abspath() dataset",
"10: cv2.imwrite(target_path +'ADE_train_0000000'+ str(count) + \".png\", arr) elif count <",
"cv2.imwrite(target_path +'ADE_train_0000'+ str(count) + \".png\", arr) else: cv2.... |
[
".diagnostics_sink_properties import DiagnosticsSinkProperties from .diagnostics_description import DiagnosticsDescription from .application_properties import",
"ApplicationResourceDescription from .add_remove_replica_scaling_mechanism import AddRemoveReplicaScalingMechanism from .auto_scaling_metric import AutoS... |
[
"names = \"\" if self.map and self.object_pool: if objects and",
"and (x,y) in self.map.get_visible_tiles()] names = ', '.join(names) # join",
"the mouse's coordinates and in FOV objects = self.object_pool.get_objects_as_list() names",
"def get_names_under_mouse(self): # return a string with the names of",
... |
[
"for t in tasks] dt = datetime.datetime.now() - t0 print('Unsync",
"@unsync() def download_some_more(): print('Downloading more...') url = 'https://pythonbytes.fm./episodes/show/92/will-your-python-be-compiled' resp =",
"dt = datetime.datetime.now() - t0 print('Unsync version done in {:,.2f}",
"more...') url ... |
[
"= pulumi.ResourceOptions() if not isinstance(opts, pulumi.ResourceOptions): raise TypeError('Expected resource options",
"None, resource_group_name: Optional[pulumi.Input[str]] = None, tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None):",
"of the resource. :param pulumi.ResourceOptions opts:... |
[
"'/formResponse') form_data = {'draftResponse': [], 'pageHistory': 0} for v in",
"warnings.warn('Unknown Question: {}'.format(k), RuntimeWarning) if verbose: print(form_data) user_agent = {'Referer':",
"not be accessed, check internet connectivity, \\ proxies and permissions:",
"probably get the whole sheet a... |
[
"98 / \\ 96 84 / \\ / \\ 92",
"self.data[j],self.data[k] k = j def extractMax(self): ret = self.data[1] self.data[1],",
"= 31 M = 100 heap = Maxheap(N) for i",
"82 32 21 64 60 7 44 63 63 '''",
"+ 1]= arr[i] self.count = cpacity for i in range(self.count",
"self.count = 0 else: for i in range(0,cpacity): s... |
[
"self.rootTree.searchElementById(OriginName,drawables) OriginObject.runDraw() def draw(self, isClip=False): if self.hasTransform(): transMatrix = self.getTransform()",
"isClip=False): if self.hasTransform(): transMatrix = self.getTransform() self.canvasContext.transform(*transMatrix) self.drawClone() def getClone... |
[] |
[
"---------------------------------- @app.route(\"/\", methods=['GET', 'POST']) def hello(): if request.method == 'POST':",
"= request.form[\"query\"] return render_template(\"index.html\",data=data) return render_template(\"main.html\") # ----------------------------------- # -----------------------------------",... |
[
"in temp: name = i.split(\" \")[0].split(\"-\")[0].split(\".\")[0] if name.startswith(\"~\") or name.startswith(\"PR\")",
"python3 import os DATABASE=\"/home/tomate/Warehouse/syte/meta.db\" XLSDIR = \"/mnt/c/Users/Natacha/Documents/TempDocs/progen/Formula/\" temp = [i",
"i.endswith(\"xls\")] flist = {} for i in... |
[
"pass into py.test\")] def initialize_options(self): TestCommand.initialize_options(self) self.pytest_args = [] def",
"[('pytest-args=', 'a', \"Arguments to pass into py.test\")] def initialize_options(self): TestCommand.initialize_options(self)",
"= [] self.test_suite = True def run_tests(self): import pytest ... |
[
"import pytorch_pfn_extras.onnx as tou from tests.pytorch_pfn_extras_tests.onnx.test_export_testcase import Net @pytest.mark.filterwarnings(\"ignore:Named tensors",
"<reponame>kmaehashi/pytorch-pfn-extras<gh_stars>100-1000 import os import pytest import torch import pytorch_pfn_extras.onnx as",
".* experimental... |
[
"'name': '管理员编号', 'type': 'str', 'required': True }, 'time': { 'name':",
"'str', 'required': True }, 'time': { 'name': '查询时间', 'type': 'str',",
"14:02:02 ''' params = { # 验证字段 'fields': { 'type':",
"''' params = { # 验证字段 'fields': { 'type': {",
"数据库验证器 @Author: Zpp @Date: 2020-05-28 13:44:29 @LastEditors: Z... |
[
"slice_symbol_to_seq_symobls(net, seq_len, axis=1, squeeze_axis=True): net = mx.sym.SliceChannel(data=net, num_outputs=seq_len, axis=axis, squeeze_axis=squeeze_axis)",
"for seq_index in range(seq_len): hidden_all.append(net[seq_index]) net = hidden_all return net",
"= mx.sym.SliceChannel(data=net, num_outputs=s... |
[
"from rest_framework_jwt.authentication import JSONWebTokenAuthentication from rest_framework_jwt.settings import api_settings from rest_framework_jwt.utils",
"1. Look for account in \"\"\" user = None try:",
"= profile.get('id') user = _temp_reverse_user(uid, 'facebook', access_token, access_token_secret, r.te... |
[
"@property def private(self): return self.anonymous or self._basic_info.get('isPrivate') @property def id(self):",
"self._basic_info.get('id', 'Anonymous') @property def name(self): return self._basic_info.get('name') @property def username(self):",
"# \"signedUrl\": \"\", # \"url\": \"\", # \"username\": \"dis... |
[
"= sok.objektTypeDef['navn'] print( 'Henter', stat['antall'], 'forekomster av objekttype', sok.objektTypeId, objtypenavn",
"= gpd.GeoDataFrame( mindf, geometry='geometry', crs=5973 ) minGdf.to_file( filnavn, layer='vegnett', driver=\"GPKG\")",
"feltbokstav: feltbokstav = feltbokstav[0] else: feltbokstav = 'vanl... |
[
"+= 1 dow = (dow + no_days(m, y)) % 7",
"twenty-eight, rain or shine. And on leap years, twenty-nine. A",
"given the following information, but you may prefer to do",
"may prefer to do some research for yourself. 1 Jan",
"April, June and November. All the rest have thirty-one, Saving",
"y in range(1901, 2... |
[
"meter data\", author=\"<NAME>\", author_email='<EMAIL>', url='https://github.com/dbservice/dbservice', packages=find_packages(), package_data={'': ['static/*.*', 'templates/*.*']}, scripts=['manage.py'],",
"Setup for the dbservice \"\"\" from setuptools import setup, find_packages",
"the dbservice \"\"\" from ... |
[
"The arg spec for the junos facts module \"\"\" def",
"or https://www.gnu.org/licenses/gpl-3.0.txt) \"\"\" The arg spec for the junos facts",
"type=\"list\", elements=\"str\" ), \"config_format\": dict( default=\"text\", choices=[\"xml\", \"text\", \"set\", \"json\"]",
"__future__ import absolute_import, divi... |
[
"Authenticate(Resource): def post(self): try: args = parser.parse_args() decoded_token = firebase_auth.verify_id_token(args['token'])",
"reqparse.RequestParser() parser.add_argument('token', type=str, required=True, nullable=False) class Authenticate(Resource): def post(self): try:",
"except (ValueError, fireba... |
[
"required input InputString = \"kobe is a basketball player\" headers",
"\"kobe is a basketball player\" headers = { 'Content-type': 'application/json',",
"headers = { 'Content-type': 'application/json', } data = '{\"text\":InputString =",
"{ 'Content-type': 'application/json', } data = '{\"text\":InputString... |
[
"None, \"Path to output the processed dataset.\") FLAGS = flags.FLAGS",
"x in data.split(\"\\n\") if len(x.split()) > 3]) logging.info(\"length = %d\",",
"# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law",
"raw wikitext103 train corpus.\") flags.DEFINE_string(\"output_path\... |
[] |
[
"7419530 DARK_GOLD = 12745742 DARK_ORANGE = 11027200 DARK_RED = 10038562",
"and (role in after.roles) def isExplorer(ctx): return hasRole(ctx.author, roles[\"explorer\"]) def",
"return hasRole(ctx.author, roles[\"network\"]) def isLeader(ctx): return hasRole(ctx.author, roles[\"leader\"]) def isAdmin(ctx):",
... |
[
"Writes Neo4jCsvSerializable into CSV files. There are multiple CSV files",
"def init(self, conf): # type: (ConfigTree) -> None \"\"\" Initializing",
"from databuilder.utils.closer import Closer LOGGER = logging.getLogger(__name__) class FsNeo4jCSVLoader(Loader): \"\"\"",
"\\ conf.get_string(FsNeo4jCSVLoader.... |
[
"= ad_model.kneighbors(autoscaled_x_prediction) knn_distance_prediction = pd.DataFrame(knn_distance_prediction, index=x_prediction.index) # DataFrame型に変換 mean_of_knn_distance_prediction =",
"つに # トレーニングデータでは k 最近傍サンプルの中に自分も含まれ、自分との距離の 0 を除いた距離を考える必要があるため、k_in_knn + 1 個と設定",
"axis=1) # オートスケーリング autoscaled_x = (... |
[
"net.addSwitch( 's4', listenPort=6674 ) s5 = net.addSwitch( 's5', listenPort=6675 )",
"topology(): \"Create a network.\" net = Mininet( controller=RemoteController, link=TCLink, switch=OVSKernelSwitch",
"Link, TCLink #conf_port=50000 conf_ip_1='10.0.0.254' conf_mac_1='11:12:13:14:15:16' def topology(): \"Create... |
[
"una clase se declara de la siguiente manera class Lamp:",
"la clase #antes de empezar una clase se declara de",
"turn_on(self): self._is_turned_on = True self._display_image() def turn_off(self): self._is_turned_on = False",
"\\ / _|=|_ |_____| ''', ''' ,-. ( ) \\",
"#metodo instancia e init es el construc... |
[
"__future__ import print_function import logging from sqlalchemy import ( Column,",
"a bug when adding a column with both a ForeignKey",
"import print_function import logging from sqlalchemy import ( Column, ForeignKey,",
"from sqlalchemy import ( Column, ForeignKey, Integer, MetaData ) from",
"a ForeignKey... |
[
"votes_t_shape = [3, 0, 1, 2] for i in range(6",
"i in range(6 - 4): votes_t_shape += [i + 4]",
"1, 2] for i in range(6 - 4): votes_t_shape +=",
"= [3, 0, 1, 2] for i in range(6 -",
"0, 1, 2] for i in range(6 - 4): votes_t_shape",
"for i in range(6 - 4): votes_t_shape += [i +",
"in range(6 - 4): votes_t... |
[
"[] for v in values: if v is True: v",
"0.0 --activation-fn relu --no-epoch-checkpoints --keep-best-checkpoints 0 --keep-interval-updates 0 --keep-last-epochs 0",
"args3 = {} args2['lr-scheduler'] = 'polynomial_decay' args2['warmup-updates'] = 2000 args2['max-update']",
"--distributed-port 54187 --fp16 --memo... |
[
"from boa3.builtin import public from boa3.builtin.contract import Nep5TransferEvent transfer =",
"transfer = Nep5TransferEvent @public def Main(from_addr: bytes, to_addr: bytes, amount:",
"<filename>boa3_test/test_sc/event_test/EventNep5Transfer.py from boa3.builtin import public from boa3.builtin.contract imp... |
[
"any later version. # # The Topical Guide is distributed",
"# for more details. # # You should have received",
"You should have received a copy of the GNU Affero",
"Affero General Public License # along with the Topical Guide.",
"from abtest.settings import TEST_LIST from visualize import root # Create",
... |
[
"= [\"du -sh /usr\", \"rm --help\"] packpath = _create_packfile(cmd, tmpdir)",
"[\"ls -l /\", \"grep --help\"] _create_packfile(cmd, tmpdir) pattern = os.path.join(tmpdir,",
"--help\"] _create_packfile(cmd, tmpdir) pattern = os.path.join(tmpdir, '*.rpz') packfiles = glob(pattern)",
"def _create_packfile(comma... |
[
"LinkStringIO(io.StringIO): def __init__(self): super().__init__() self._write_text = False # switch between",
"Default is a dash. For serialisation, an encoding is included",
"('<!DOCTYPE html>\\n' '<html>\\n' '<title>{}</title>\\n' '<meta charset=\"{}\">'.format(self._title, self._encoding)) print(html5) retu... |
[
"only needed when doing a *loop* of sess.run() calls, and",
"\"\"\" def __init__(self, label, f, d): self.func = f self.deriv",
"following lead from matlab example by professor: # http://comet.lehman.cuny.edu/schneider/Fall17/CMP464/Maple/PartialDerivatives1.pdf import",
"instructions, following lead from mat... |
[
"classification_report(actual, att_set[:,_k_].cpu().data.numpy(), output_dict = True)[\"macro avg\"][\"f1-score\"] grad_pred = classification_report(actual, grad_set[:,_k_].cpu().data.numpy(),",
"round(len(data) / 10) + 1 model.embedding.weight.requires_grad_(True) actual = [] results",
"1 model.embedding.weigh... |
[
"and store %d\" % cast_vote_id) @shared_task def voters_email(election_id, subject_template, body_template,",
"subject_template, body_template, extra_vars={}, voter_constraints_include=None, voter_constraints_exclude=None): \"\"\" voter_constraints_include are conditions on",
"extra_vars={}): voter = Voter.obje... |
[
"yield mock_datastore @pytest.fixture(name=\"datastore_key\") def fixture_datastore_key(): \"\"\" Datastore Key Mock \"\"\"",
"import unittest.mock as mock import pytest import virtual_dealer.api @pytest.fixture(name=\"client\") def",
"for store::Store \"\"\" with mock.patch(\"virtual_dealer.api.store\", autosp... |
[
"fixturegenerators from corehq.apps.fixtures.models import FixtureDataItem, FixtureDataType, FixtureOwnership, FixtureTypeField, \\ FixtureItemField,",
"properties={} ) ] ), \"district_name\": FieldList( field_list=[ FixtureItemField( field_value=\"Delhi_in_HIN\", properties={\"lang\":",
"= \"district\" self.da... |
[
"instance_list], } # Do not index if autosync is disabled",
"from readthedocs.search.documents import ProjectDocument kwargs = { 'app_label': Project._meta.app_label, 'model_name':",
"globally if DEDConfig.autosync_enabled(): index_objects_to_es(**kwargs) @receiver(bulk_post_delete, sender=HTMLFile) def remove_... |
[
"_| _| | <| -__| |. |___|__| |_____|________|_____|____ |____|__| |__|__|__|_____|",
"distribute this software, either in source code form or as",
"MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO",
"SOFTWARE. For more information, please refer to <https://unlicense.org> \"\"\" _fi... |
[
"B305 is incorrectly raised here # https://github.com/PyCQA/flake8-bugbear/issues/59 self.next(len(x)) # noqa:",
"hasattr(self, \"_phaser\"): self._phaser = itertools.cycle(self.phases) return next(self._phaser) def update(self): #",
"self.finish() before delegating to the original SIGINT handler. This handler"... |
[
"Number of runs. Each run takes a sample in `params.hyper_space`",
"or `minimize` the metric. (default: 'maximize') :param num_runs: Number of",
"= tuner.tune() >>> sorted(results['best'].keys()) ['#', 'params', 'sample', 'score'] \"\"\" tuner",
"pass to `fit`. (default: `dict(epochs=10, verbose=0)`) :param m... |
[
"= PixelObservationWrapper( env, pixel_keys=(pixel_key,), pixels_only=pixels_only, render_kwargs={pixel_key: {\"width\": width, \"height\": height}},",
") wrapped_env.observation_space = wrapped_env.observation_space assert isinstance(wrapped_env.observation_space, spaces.Dict) if pixels_only: assert",
"== (32,... |
[
"<reponame>MuAuan/Scipy-Swan<filename>real_plot_fft_stft_impl.py<gh_stars>0 import pyaudio import wave from scipy.fftpack import fft, ifft",
"= np.sqrt(freq*freq.conj())*2/fn f = np.arange(int(fn/2)) ax3.axis([200, 20000, 0,0.000075]) ax3.set_xscale('log') ax3.plot(f,Pyy)",
"22.1kHz 44.1kHz RECORD_SECONDS = 5 #... |
[] |
[
"as plt class Robot(object): def __init__(self, length=20.0): \"\"\" Creates robotand",
"orientation % (2.0 * np.pi) def set_noise(self, steering_noise, distance_noise): \"\"\"",
"run(robot, 0.1, 1.0) n = len(x_trajectory) fig, ax1 = plt.subplots(1,",
"robot = Robot() robot.set(0, 1, 0) robot.set_noise(0.1,0.... |
[
"<gh_stars>1000+ from .clip_sampler import DistributedSampler, UniformClipSampler, RandomClipSampler __all__ = (\"DistributedSampler\",",
".clip_sampler import DistributedSampler, UniformClipSampler, RandomClipSampler __all__ = (\"DistributedSampler\", \"UniformClipSampler\", \"RandomClipSampler\")",
"from .cli... |
[
"print(\"\\tb.Camry\") print(\"\\tc.Fortuner\") pilih3 = input(\"Mana yang ingin anda pilih??\") if",
"New Terios adalah 215 juta\") elif(Pilih1== \"c\"): print(\"Harga mobil New",
"pada Honda >>>>>>>>>\") print(\"\\ta.Honda Brio Satya S\") print(\"\\tb.Honda Jazz \")",
"560 Juta\") elif (pilih3==\"c\"): prin... |
[
"l1loss_mean, \"of_l1_loss_sum\": l1loss_sum, } of_out_l1loss_dict = oneflow_l1loss(input, target) assert np.allclose(",
"= { \"np_l1_loss\": np_l1, \"np_l1_loss_mean\": np_l1_mean, \"np_l1_loss_sum\": np_l1_sum, } return",
"arg_dict[\"device_type\"] = [device_type] arg_dict[\"machine_ids\"] = [machine_ids] arg... |
[
"def test_load_trigger(self): self.assertRaises(ValidationError, schemas.TriggerSchema().load, {\"type\": \"unknown\"}) obj = schemas.TriggerSchema().load({'type': \"interval\"})",
"dump:', result) def test_load_trigger(self): self.assertRaises(ValidationError, schemas.TriggerSchema().load, {\"type\": \"unknown\"... |
[
"def get(self, request): try: subject = request.query_params.get('subject', None) if subject",
"error: context = {'success': \"false\", 'message': 'Failed to get OtherContent",
"e: pass path = settings.MEDIA_ROOT + '/files/' data_frame = pd.DataFrame(final_list",
"queryset = SubSubSectionKeyword.objects.filte... |
[
"# -*- coding: utf-8 -*- \"\"\" Example to train and",
"learning_rate=0.01, lambda_reg=0.02, use_bias=True, early_stop=True, verbose=True) # Evaluation result = eval_method.evaluate(model=mf,",
"model with given data @author: <NAME> <<EMAIL>> \"\"\" from cornac.data",
"Example to train and evaluate a model wi... |
[
"f.read().splitlines() self.scene_categories = dict(line.split() for line in self.scene_categories) with open(self.data_csv,",
"np import cv2 import albumentations from PIL import Image from",
"= {\"train\": \"data/ade20k_train.txt\", \"validation\": \"data/ade20k_test.txt\"}[self.split] self.data_root = \"./da... |
[
") continue # only add the host_to_delete if it was",
"get WORKDIR and CFE_FR_TABLES values from config.sh\") sys.exit(1) # Primary",
"%s, stderr:\\n%s\\nstdout:\\n%s\", proc.returncode, errs.decode(\"utf-8\"), outs.decode(\"utf-8\"), ) if len(hosts_to_delete) != 0:",
"email = input(\"Enter email for fr_distr... |
[
"#Doesn't work. import time fibonacci = [1, 1] n =",
"n = int(input()) while len(fibonacci) < n: fibonacci.append(fibonacci[-1] + fibonacci[-2])",
"len(fibonacci) < n: fibonacci.append(fibonacci[-1] + fibonacci[-2]) for i in range(n):",
"import time fibonacci = [1, 1] n = int(input()) while",
"< n: fibonacc... |
[] |
[
"hasattr(self, \"_file\"): self._openfile() self._file.write(str(msg) + \"\\n\") if not self._buffering: self._file.flush()",
"implement this API: (maybe put it into slogger.py?) log =",
"file-like\" % (consumer,)) consumer = File(consumer) self.keywords2consumer[keywords] = consumer def",
"a message to the l... |
[
"in phone_list_from_db: phone_list.append(merge_phones_like_on_home_page(phone)) email_list = [] #for email in email_liset_from_db:",
"clear(s): return re.sub(\"[() -]\", \"\", s) def remove_spaces(s): return re.sub('",
"return re.sub(\"[() -]\", \"\", s) def remove_spaces(s): return re.sub(' +',",
"= [con.al... |
[
"= [ ('Run Pymodel Graphics to generate dot file from",
"dot file from FSM model, no need use pma', 'pmg",
"'pmg ABPFSM'), ('Generate an svg file from the graphics commands',",
"from FSM model, no need use pma', 'pmg ABP'), ('Generate",
"commands', 'dotsvg ABPFSM'), # Now display ABPFSM.svg in browser, shou... |
[
"from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies",
"Django 3.1.2 on 2020-10-26 12:21 from django.db import migrations, models",
"model_name='game', name='score', field=models.FloatField(null=True, verbose_name='Score'), ), migrations.... |
[
"function is supposed to look (1 == direct callee, 2",
"__version__ = '0.4.0' import os,types,sys,re,imp,__builtin__ import mx.Tools.NewBuiltins # RE to",
"given namespaces and returns list of corresponding module objects. If",
"module plus all subdirectories having an __init__.py file. The modules",
"len(m... |
[
"result = urllib.parse.urlencode(given, doseq=True, safe=\":$\") expect = '%A0$=%C1$' self.assertEqual(expect, result)",
"conn, addr = serv.accept() # conn.send(\"1 Hola mundo\\n\") # cantdata",
"given = '%' expect = given result = urllib.parse.unquote(given) self.assertEqual(expect,",
"encoding. given = (('\... |
[
"from __future__ import unicode_literals from ...models import Address, SeasonalPriceBand from",
"'type', 'sub_type' ] _date_time_fields_utc = ['date_created', 'date_last_modified'] _model_fields = [('start_address',",
"'sku', 'type', 'sub_type' ] _date_time_fields_utc = ['date_created', 'date_last_modified'] _... |
[
"async def dare(self, ctx): dare = random.choice(dares) await ctx.send(dare) def",
"= client @commands.command(aliases=[\"d\"]) async def dare(self, ctx): dare = random.choice(dares)",
"= json.load(data) dares = data[\"dares\"] class Dare(commands.Cog): def __init__(self, client):",
"data[\"dares\"] class Dar... |
[] |
[
"from . import * # noqa def seed_const(): mtpy.mt_seed32new(42) def",
"# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law",
"# # Licensed under the Apache License, Version 2.0 (the",
"compliance with the License. # You may obtain a copy",
"an \"AS IS\" BASIS, # WITHOUT WARR... |
[
"EMPTY_INT # 持仓量 self.time = EMPTY_STRING # 时间 11:20:56.5 self.date",
"dbConnect(self): \"\"\"连接MongoDB数据库\"\"\" if not self.dbClient: # 读取MongoDB的设置 try: # 设置MongoDB操作的超时时间为0.5秒",
"bar.exchange self.xminBar.open = bar.open self.xminBar.high = bar.high self.xminBar.low = bar.low",
"u'fail in db connection') #... |
[
"Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. \"\"\"Utilities for",
"for writing project diagrams \"\"\" def __init__(self, config, styles): self.config",
"def get_values(self, obj): \"\"\"get label and shape for classes. The",
"% (label, line) for attr in attrs: label = r'%s\\n\\f08%s'",
"# Th... |
[
"return {\"success\": False, \"errors\": [\"Client is taken\"]} except Exception as",
"client_id} clients[client_id] = client return {\"success\": True, \"client\": client} return",
"message = {\"content\": content, \"client_id\": client_id} messages.append(message) await queue.put(message) return",
"return {... |
[
"return self.post(self.channel.slack_webhook_url, json=payload) class HipChat(HttpTransport): def is_noop(self, check): return True",
"json=payload, headers=headers) class Pushbullet(HttpTransport): def notify(self, check): text = tmpl(\"pushbullet_message.html\",",
"check): if not self.channel.email_verified: ... |
[
"revision: str) -> None: self.package = ExternalPackage(url, revision) self._builders =",
"imports = super().from_pyobj(content) imports._builder = builder # pylint: disable=protected-access return",
"graviti.portex.register import ExternalContainerRegister if TYPE_CHECKING: from subprocess import CompletedProc... |
[
"Input( ... value=[mapping_extract_value.op.outputs[\"value\"].name], ... definition=GetSingle.op.inputs[\"spec\"], ... ) ... ) >>>",
"from ..df.types import Definition from ..df.base import op from ..util.data",
"main(): ... async for ctx, result in MemoryOrchestrator.run(dataflow, inputs): ...",
"definition... |
[
"so skipping\") except ValueError as e: logger.warn(\"Received msg of wrong",
"for cls_tuple in [ (NvdV2Feed, False), (VulnDBFeed, False), (VulnerabilityFeed, True),",
"for fn in preflight_check_functions: try: fn() except Exception as e:",
"Exception( \"Exceeded retries for feeds client config check. Failing... |
[
"available for any case. download_url = \"http://www.supremecourt.gov/media/audio/{type}files/{docket_number}.{type}\".format( type=file_type, docket_number=d )",
"path = \"id('list')//tr//a/text()\" return list(map(self._return_download_url, self.html.xpath(path))) @staticmethod def _return_download_url(d): file... |
[
"metavar='N', help='print frequency (default: 20)') parser.add_argument('--ckpt', default='./ckpt', help='folder to output",
"size') parser.add_argument('--num_boxes', default=4, type=int, help='num of boxes for each image')",
"import logsigsum as fusion_func print('fused_sum loaded!!') elif args.fusion_functio... |
[
"flask_cors import CORS import logging app = Flask(__name__) CORS(app, resources={r\"/*\":",
"application.jwt import application.routes.config import application.routes.user import application.routes.permission import application.routes.role import",
"= logging.getLogger(__name__) logger.setLevel(logging.INFO) ... |
[
"antecedents, user_options): from Betsy import module_utils original_file = module_utils.get_inputid(antecedents.identifier) filename",
"outfile ) def name_outfile(self, antecedents, user_options): from Betsy import module_utils",
"run( self, network, antecedents, out_attributes, user_options, num_cores, outfil... |
[
"m in self.pattern.finditer(template): print(m, type(m)) #print(dir(m)) #print(len(m.groups())) print(m[0]) #print(m.groups()) #print(m,",
"from string import Template import re class PositionalArgumentTemplate(Template): # (?i):",
"#for m in re.finditer(self.pattern, template): for m in self.pattern.finditer(t... |
[
"add duplicate company data = { 'company_id' : uuid.uuid4(), 'company_name'",
"assert response.status == HTTP_200 # add duplicate company data =",
"import os import requests import uuid import hug import pytest",
"# add duplicate company data = { 'company_id' : uuid.uuid4(),",
"= 'test_company_name' data = ... |
[
"for i, x in enumerate(l1): GCL[GCint] = \"[%i] \" %",
"write_str(\"Empty List\", GCL) else: list2str(x, writeInd, GCL, GCint, size1) elif",
"88: width1 = 88 self.Width = 10 + (width1 +",
"= ln1 str_file.write(\"%s%s\\n\" % (\"\".join(GCL), str1) ) def list2str(l1, writeInd,",
"import * from cStringIO impor... |
[
"remove, the last stone will always be removed by your",
"are playing the following Nim Game with your friend: There",
"a function to determine whether you can win the game",
"matter 1, 2, or 3 stones you remove, the last",
"be removed by your friend. Hint: If there are 5",
"out a way to remove the stones... |
[
"base class Test(base.BaseScriptTest, unittest.TestCase): command_line = \"./scripts/maf_extract_ranges_indexed.py ./test_data/maf_tests/mm8_chr7_tiny.maf -c -m",
"= \"./scripts/maf_extract_ranges_indexed.py ./test_data/maf_tests/mm8_chr7_tiny.maf -c -m 5 -p mm8.\" input_stdin =",
"class Test(base.BaseScriptTes... |
[
"import gca import itertools import string import numpy as np",
"lCount + 1 return float(lCount) / lLen ''' Test function",
"naDist2[:,0], naDist2[:,1], color='r' ) plt.ylabel( 'Feature 2' ) plt.xlabel( 'Feature",
"ranking features quickly. It uses the knn implementation. @status: oneKNN",
"+ 1 dResult = fl... |
[
"coordinates and species, etc ao_log : description of functions (either",
"# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law",
"Computes the matrix elements given by funct, for instance coulomb",
"s2, f2, norbs) else: for i1 in range(s1,f1): for i2",
"= \", count) #print(\... |
[
"# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law",
"distributed on an \"AS IS\" BASIS, WITHOUT # WARRANTIES OR",
"may obtain # a copy of the License at #",
"True but there is some misconfiguration with the [service_user] section",
"which makes KSA return None for the ser... |
[
"source == 'usps' or target == 'usps': return usps.Feature() elif",
"target): if source == 'usps' or target == 'usps': return",
"target, pixelda=False): if source == 'usps' or target == 'usps':",
"== 'usps': return usps.Predictor() if source == 'svhn': return svhn2mnist.Predictor()",
"import syndig2svhn def... |
[
"= 0.7) -> Tensor: sim = cos_sim_matrix(z_origin, z_noisy) exp_sim =",
"= a.norm(dim=1), b.norm(dim=1) a_norm = a / torch.clamp(a_n.unsqueeze(1), min=eps) b_norm",
"-> None: \"\"\" Args: reduction (str) \"\"\" super().__init__(reduction=reduction) self.reduction =",
"and <NAME>, \"Representation Learning with... |
[
"in config}) return config def get(self, key, default=None): return self.__effective_configuration.get(key,",
"_build_environment_configuration(): ret = defaultdict(dict) def _popenv(name): return os.environ.pop(PATRONI_ENV_PREFIX + name.upper(),",
"self._load_config_file() else: config_env = os.environ.pop(sel... |
[
"what is stored in their dirpath, FSDV's will do their",
"= 'My Foovalue' fs.foo = test_foo self.assertEqual(fs.foo, test_foo) self.assertEqual(fs.__dict__['_real'].foo, test_foo)",
"directory view is reading properties self.assertEqual(self.ob.fake_skin.testPT.title, 'Zope Pope') def test_ignored(self):",
"t... |
[
"self.options.declare('thermo_method', default='CEA', values=('CEA',), desc='Method for computing thermodynamic properties') self.options.declare('thermo_data', default=species_data.janaf,",
"FlightConditions()) p1.model.connect('des_vars.W', 'fc.W') p1.model.connect('des_vars.alt', 'fc.alt') p1.model.connect('de... |
[
"AdminPasswordChangeForm, PasswordChangeForm, UserCreationForm from django.contrib.auth import update_session_auth_hash, login, authenticate from",
"PasswordChangeForm, UserCreationForm from django.contrib.auth import update_session_auth_hash, login, authenticate from django.contrib",
"request.user prepare_user... |
[
"# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law",
"data[\"name\"] in train_names: train_data.append(data) elif data[\"name\"] in valid_names: valid_data.append(data) elif",
"under \"/person_split\". It will generate new files with the following",
"generate new files with ... |