ngram
listlengths
0
67.8k
[ "from ray.train.checkpoint import CheckpointStrategy from ray.train.session import (get_dataset_shard, local_rank, load_checkpoint, report, save_checkpoint, world_rank,", "CheckpointStrategy from ray.train.session import (get_dataset_shard, local_rank, load_checkpoint, report, save_checkpoint, world_rank, world_s...
[ "len(contacts_in_group) == 0: app.contact.view_all_contacts() contact_rand = random.choice(contact) app.contact.add_contact_to_group(contact_rand.id, group_rand.id) app.contact.open_contacts_in_group(group_rand.id) db.get_contacts_in_group(Group(id=group_rand.id)) app.contact.del_contact_from_group() l", "if len(...
[ "Profile, UserFollow @admin.register(User) class UserAdmin(admin.ModelAdmin): list_display = ['email', 'nickname'] list_display_links = ['email', 'nickname']", "User, Profile, UserFollow @admin.register(User) class UserAdmin(admin.ModelAdmin): list_display = ['email', 'nickname'] list_display_links = ['email',", ...
[ "'srfhgt', 'adt','surf_el')]): # cmaps_fields.append(cmocean.cm.deep_r) return cmocean.cm.curl elif np.any([field_name.find(x) != -1 for x in", "== 3: c_np_data = np_variables[i, :, :] else: c_np_data = np_variables # Single", "ax = _axs.flatten()[c_zlevel*len(var_names) + idx_var] # Here we chose the min and m...
[ "n in range(0, len(dataset)): # Read image images[n] = cv2.imread(join(annotation_images_path,dataset[n])) # Convert it", "join from path import Path import numpy as np import cv2 # Dataset", "str(count) + \".png\", arr) elif count < 10000 and count > 999: cv2.imwrite(target_path", "10: cv2.imwrite(target_pat...
[ "import ApplicationProperties from .azure_internal_monitoring_pipeline_sink_description import AzureInternalMonitoringPipelineSinkDescription from .application_resource_description import ApplicationResourceDescription from .add_remove_replica_scaling_mechanism import", "SecretValueProperties from .secret_value_r...
[ "in objects if obj.coord.X == x and obj.coord.Y == y and (x,y) in", "[obj.name for obj in objects if obj.coord.X == x and obj.coord.Y == y", "= self.camera.camera_coord + Vector2(*self.mouse_coord) # create a list with the names of all", "Mouse controller needs the map, get over it \"\"\" def __init__(self, m...
[ "asyncio import datetime import math import aiohttp import requests def main(): t0 =", "resp: resp.raise_for_status() text = await resp.text() print('Downloaded (more) {:,} characters'.format(len(text))) @unsync() def download_some_more():", "t0 = datetime.datetime.now() tasks = [ compute_some(), compute_some()...
[ "be created. \"\"\" return pulumi.get(self, \"name\") @property @pulumi.getter(name=\"resourceGroupName\") def resource_group_name(self) -> pulumi.Output[str]: \"\"\"", "pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import", "Optional[pulumi.Input[Mapping[str, pulum...
[ "pandas as pd from six.moves.urllib.parse import urlparse, parse_qs from six.moves.urllib.request import urlopen _CELLSET_ID", "\"\"\" try: # TODO: we should probably get the whole sheet all_vals =", "requests import warnings import json import pandas as pd from six.moves.urllib.parse import urlparse,", "json...
[ "__shiftUp(self,k): while k > 1 and self.data[k] > self.data[int(k / 2)]: self.data[k],self.data[int(k /", "= [random.randint(1,M) for i in range(N)] # heap = Maxheap(len(arr),arr) print(heap.size()) print(heap.data) print(heap.extractMax())", "= cpacity if arr is None: self.count = 0 else: for i in", "k * 2 ...
[ "draw(self, isClip=False): if self.hasTransform(): transMatrix = self.getTransform() self.canvasContext.transform(*transMatrix) self.drawClone() def getCloneId(self): return self.attr(\"href\",\"xlink\")[1:]", "= self.getCloneId() OriginObject = self.rootTree.searchElementById(OriginName,drawables) OriginObject.r...
[]
[ "* app = Flask(__name__) import botty # ---------------------------------- @app.route(\"/\", methods=['GET', 'POST']) def hello():", "flask import * app = Flask(__name__) import botty # ---------------------------------- @app.route(\"/\", methods=['GET', 'POST'])", "@app.route(\"/\", methods=['GET', 'POST']) de...
[ "DATABASE=\"/home/tomate/Warehouse/syte/meta.db\" XLSDIR = \"/mnt/c/Users/Natacha/Documents/TempDocs/progen/Formula/\" temp = [i for i in next(os.walk(XLSDIR))[2] if i.endswith(\"xlsx\")", "= [i for i in next(os.walk(XLSDIR))[2] if i.endswith(\"xlsx\") or i.endswith(\"xls\")] flist = {}", "i.split(\" \")[0].spl...
[ "TestCommand.initialize_options(self) self.pytest_args = [] def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True", "as TestCommand class PyTest(TestCommand): user_options = [('pytest-args=', 'a', \"Arguments to pass into py.test\")]", "pytest.main(self.pytest...
[ "test_onnx_load_model(): model = Net() outdir = \"out/load_model_test\" tou.export_testcase(model, torch.rand(1, 1, 28, 28), outdir,", "torch.rand(1, 1, 28, 28), outdir, training=True, do_constant_folding=False) tou.load_model(os.path.join(outdir, \"model.onnx\")) @pytest.mark.filterwarnings(\"ignore:.*ONNX conta...
[ "'name': '管理员编号', 'type': 'str', 'required': True }, 'time': { 'name': '查询时间', 'type': 'str',", "}, 'document': { 'name': '数据库文件', 'type': 'file', 'required': True, 'msg': '请选择上传数据库文件' }, 'admin_id':", "} }, # 导出数据库 'Export': ['type'], # 导入数据库 'Import': ['document'], # 首页登录清空 'Login':", "@Author: Zpp @Date: 2...
[ "mx.sym.SliceChannel(data=net, num_outputs=seq_len, axis=axis, squeeze_axis=squeeze_axis) hidden_all = [] for seq_index in range(seq_len): hidden_all.append(net[seq_index]) net", "mxnet as mx def slice_symbol_to_seq_symobls(net, seq_len, axis=1, squeeze_axis=True): net = mx.sym.SliceChannel(data=net, num_outputs=...
[ "if request.data.get('oauth_token') and request.data.get('oauth_verifier'): auth = OAuth1(settings.SOCIAL_AUTH_TWITTER_KEY, client_secret=settings.SOCIAL_AUTH_TWITTER_SECRET, resource_owner_key=request.data.get('oauth_token'), verifier=request.data.get('oauth_verifier')) r = requests.post(access_token_url,", "= j...
[ "= await session.get( 'https://disqus.com/api/3.0/users/details.json', params={'user': self.id, 'api_key': API_KEY} ) detail_json = await user_info.json()", "\"2015-01-02T18:40:14\", # \"location\": \"\", # \"name\": \"Bob\", # \"numFollowers\": 2, # \"numFollowing\": 0,", "\"username\": \"felix1999\" # }, self...
[ "\"enviroment\", uten at det påvirker hele python-installasjonen din. \"\"\" import re import pdb", "- Helt vanlig kjørefelt, kjørefeltnumemr er angitt som heltall uten noen bokstaver. 'K'", "1, 2, 3, 4}): svar = True # Siste klausul her har f.eks.", "installasjon av geopandas, shapely og en del andre ting so...
[ "in range(1901, 2001): for m in range(0, 12): if dow == 0: sum", "shine. And on leap years, twenty-nine. A leap year occurs on any year", "twentieth century (1 Jan 1901 to 31 Dec 2000)? ans: 171 \"\"\" #", "in [0,2,4,6,7,9,11]: return 31 elif month in [3,5,8,10]: return 30 elif year %", "year % 100 == 0: re...
[ "\"\"\" from setuptools import setup, find_packages setup( name='dbservice', version='0.9', description=\"Database service for storing", "dbservice \"\"\" from setuptools import setup, find_packages setup( name='dbservice', version='0.9', description=\"Database service for", "version='0.9', description=\"Databa...
[ "\"\"\" def __init__(self, **kwargs): pass argument_spec = { \"gather_subset\": dict( default=[\"!config\"], type=\"list\", elements=\"str\"", "type=\"list\", elements=\"str\" ), \"config_format\": dict( default=\"text\", choices=[\"xml\", \"text\", \"set\", \"json\"] ), \"gather_network_resources\": dict(type=\"...
[ "firebase_auth from dbcls.models import User parser = reqparse.RequestParser() parser.add_argument('token', type=str, required=True, nullable=False) class", "reqparse.RequestParser() parser.add_argument('token', type=str, required=True, nullable=False) class Authenticate(Resource): def post(self): try: args = par...
[ "results for the required input InputString = \"kobe is a basketball player\" headers", "'+ InputString + '}' response = requests.post('http://66.76.242.198:9888/', data=data).json() #Adding a test comment to", "'}' response = requests.post('http://66.76.242.198:9888/', data=data).json() #Adding a test comment ...
[ "# # Licensed under the Apache License, Version 2.0 (the \"License\"); # you", "writing, software # distributed under the License is distributed on an \"AS IS\"", "\"=\"] sentences = [] for para in data: for sent in para: sentences.append(sent", "KIND, either express or implied. # See the License for the spec...
[]
[ "import roles def hasRole(member, roleID): role = member.guild.get_role(roleID) return role in member.roles def", "3447003 PURPLE = 10181046 GOLD = 15844367 ORANGE = 15105570 RED = 15158332", "PURPLE = 10181046 GOLD = 15844367 ORANGE = 15105570 RED = 15158332 GREY", "GREY = 9807270 DARKER_GREY = 8359053 NAVY ...
[ "self._get_writer(node_dict, self._node_file_mapping, key, self._node_dir, file_suffix) node_writer.writerow(node_dict) node_dict = csv_serializable.next_node() relation_dict = csv_serializable.next_relation() while", "_create_directory(self, path): # type: (str) -> None \"\"\" Validate directory does not exist,"...
[ "= mean_of_knn_distance_prediction <= ad_threshold # AD 内のサンプルのみ TRUE inside_ad_flag_prediction.columns=['inside_ad_flag'] inside_ad_flag_prediction.to_csv('inside_ad_flag_prediction_knn.csv') # csv ファイルに保存。同じ名前のファイルがあるときは上書きされるため注意", "オートスケーリング autoscaled_x = (x - x.mean()) / x.std() autoscaled_x_prediction = (x...
[ "mininet.cli import CLI from mininet.log import setLogLevel from mininet.link import Link, TCLink #conf_port=50000", "dev h5-eth0') h5.cmd('sudo arp -i h5-eth0 -s '+conf_ip_1+' '+conf_mac_1) h5.cmd('sysctl -w net.ipv4.ip_forward=1') h5.cmd('python3", "def topology(): \"Create a network.\" net = Mininet( control...
[ "turn_on(self): self._is_turned_on = True self._display_image() def turn_off(self): self._is_turned_on = False self._display_image() def _display_image(self):", ". . | , \\ ' / ` ,-. ' --- ( )", "la clase #antes de empezar una clase se declara de la siguiente manera", ") \\ / _|=|_ |_____| '''] def __init__(s...
[ "in SQLite if migrate_engine.name != 'sqlite': c = Column(\"ldda_id\", Integer, ForeignKey(\"library_dataset_dataset_association.id\"), index=True, nullable=True)", "script to add 'ldda_id' column to the implicitly_converted_dataset_association table. \"\"\" from __future__ import", "__future__ import print_fun...
[ "[3, 0, 1, 2] for i in range(6 - 4): votes_t_shape += [i", "votes_t_shape = [3, 0, 1, 2] for i in range(6 - 4): votes_t_shape", "1, 2] for i in range(6 - 4): votes_t_shape += [i + 4]", "0, 1, 2] for i in range(6 - 4): votes_t_shape += [i +", "= [3, 0, 1, 2] for i in range(6 - 4): votes_t_shape +=", "<gh_s...
[ "s = gpuscheduler.HyakScheduler(verbose=args.verbose, account='', partition=partition, use_gres=False) fp16 = True args3 = {} args2['lr-scheduler']", "1024 tokens * 8 update_freq * 56250 steps = 0.4608e9 tokens -> optimal", "import gpuscheduler import argparse import os import uuid import hashlib import glob im...
[ "public from boa3.builtin.contract import Nep5TransferEvent transfer = Nep5TransferEvent @public def Main(from_addr: bytes, to_addr:", "<filename>boa3_test/test_sc/event_test/EventNep5Transfer.py from boa3.builtin import public from boa3.builtin.contract import Nep5TransferEvent transfer = Nep5TransferEvent @publ...
[ "License as published by the # Free Software Foundation, either version 3 of", "<http://nlp.cs.byu.edu/topic_browser>. # # The Topical Guide is free software: you can redistribute it", "please # contact the Copyright Licensing Office, Brigham Young University, 3760 HBLL, #", "= \".\".join(package_list) view =...
[ "pattern = os.path.join(tmpdir, '*.rpz') packfiles = glob(pattern) assert packfiles, \"packfiles not found\" outfile", "detach=True, tty=True, security_opt=['seccomp:unconfined']) try: minimizer = ReproZipMinimizer(container.id, commands, packfile_save_dir=dir) packfile_path = minimizer.run() except:", "tardata...
[ "'<meta charset=\"{}\">'.format(self._title, self._encoding)) print(html5) return new_target @contextlib.contextmanager def tag(name): \"\"\"Enclose output in an", "if self._write_text: count = super().write('<a href=\"') count += super().write(s) count += super().write('\">') else:", "encoding def __enter__(se...
[ "d): self.func = f self.deriv = d self.func.name = label self.deriv.name = \"%sDeriv\"", "fOfTwo, fDerivOfTwo = results = sess.run([tFofTwo, tFofDerivTwo]) sys.stderr.write(\"results:\\n\\tf(2)=%s\\n\\tf'(2)=%s\\n\" % (fOfTwo, fDerivOfTwo)) # note:", "Per homework instructions, following lead from matlab exampl...
[ "import * from sklearn.metrics import precision_recall_fscore_support as prfs device = torch.device('cuda:0' if torch.cuda.is_available()", "yhat.max(-1)[1] att_x_grad_set[doc_id, 0] = yhat.max(-1)[1] rows = torch.arange(sentences.size(0)) for _j_ in range(1,maximum): sentence_grad[rows,", "* from sklearn.metri...
[ "voters_notify(election_id, notification_template, extra_vars={}): election = Election.objects.get(id=election_id) for voter in election.voter_set.all(): single_voter_notify.delay(voter.uuid, notification_template, extra_vars)", "the_vars) voter.send_message(subject, body) @shared_task def single_voter_notify(vot...
[ "test fixture for testing Google's datastore APIs \"\"\" with mock.patch(\"virtual_dealer.store.datastore\", autospec=True) as mock_datastore:", "fixture_datastore_key(): \"\"\" Datastore Key Mock \"\"\" return mock.MagicMock() @pytest.fixture(name=\"datastore_entity\") def fixture_datastore_entity(): \"\"\" Data...
[ "FixtureItemField( field_value=\"Delhi_in_HIN\", properties={\"lang\": \"hin\"} ), FixtureItemField( field_value=\"Delhi_in_ENG\", properties={\"lang\": \"eng\"} ) ] ), \"district_id\":", "id=\"item-list:district\" user_id=\"%s\"> <district_list> <district> <state_name>Delhi_state</state_name> <district_name lang...
[ "'app_label': Project._meta.app_label, 'model_name': Project.__name__, 'document_class': str(ProjectDocument), 'objects_id': [instance.id], } # Don't `delay` this", "django-elasticsearch-dsl does it. \"\"\" from readthedocs.search.documents import ProjectDocument kwargs = { 'app_label': Project._meta.app_label,",...
[ "domain. We make this dedication for the benefit of the public at large", "We intend this dedication to be an overt act of relinquishment in perpetuity", "_| _ | | | | _ | 1___| _| _| | <|", "MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE", "IDs\", \"filevantage...
[ "then we'll just assume # that it doesn't support unicode and use the", "SIGINT handler for later. \"\"\" # https://github.com/python/mypy/issues/5887 super().__init__(*args, **kwargs) # type: ignore self.original_handler", "interrupted. \"\"\" super().finish() # type: ignore signal(SIGINT, self.original_handle...
[ "in `params.hyper_space` and build a model based on the sample. (default: 10) :param", "every callback point. :param verbose: Verbosity. (default: 1) Example: >>> import scripts.study_case.ID_5.matchzoo as", "used by model. :param fit_kwargs: Extra keyword arguments to pass to `fit`. (default:", "= mz.auto.Tu...
[ "dtype=np.uint8) def reset(self, seed: Optional[int] = None): super().reset(seed=seed) observation = self.observation_space.sample() return observation", "assert len(wrapped_env.observation_space.spaces) == 2 assert list(wrapped_env.observation_space.spaces.keys()) == [ STATE_KEY, pixel_key, ] observation =", "...
[ "2;ステレオ- RATE = 22100 # 22.1kHz 44.1kHz RECORD_SECONDS = 5 # 5秒録音 WAVE_OUTPUT_FILENAME", "ax3 = fig.add_subplot(313) print(\"* recording\") frames = [] for i in range(0, int(RATE", "ax2.pcolormesh(t, 5*f, np.abs(Zxx), cmap='hsv') freq =fft(sig,int(fn/2)) Pyy = np.sqrt(freq*freq.conj())*2/fn f = np.arange(int(fn...
[]
[ "self.y, self.orientation) def run_p(robot, tau, n=100, speed=1.0): x_trajectory = [] y_trajectory = []", "= robot.y steer = -tau* cte robot.move(steer, speed) x_trajectory.append(robot.x) y_trajectory.append(robot.y) return x_trajectory, y_trajectory", "radius) cy =self.y + (np.cos(self.orientation) * radius) ...
[]
[ "input(\"masukkan nama pembeli = \") alamat= input(\"Alamat = \") NoTelp = input(\"No Telp", "\") print(\"\") pilihan = int(input(\"Pilih jenis mobil yang ingin dibeli : \")) print(\"\")", "All New Terios adalah 215 juta\") elif(Pilih1== \"c\"): print(\"Harga mobil New Ayla adalah", "mobil pada Honda >>>>>>>>...
[ "func_config.default_placement_scope(flow.scope.placement(device_type, machine_ids)) func_config.default_logical_view(flow.scope.consistent_view()) def np_l1loss(np_input, np_target): np_l1 = np.abs(np_target - np_input) np_l1_mean =", "the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by ...
[ "print('IntervalTrigger dump:', result) result = schemas.TriggerSchema().dump(triggers.DateTrigger()) print('DateTrigger dump:', result) def test_load_trigger(self): self.assertRaises(ValidationError, schemas.TriggerSchema().load,", "self.assertRaises(ValidationError, schemas.TriggerSchema().load, {\"type\": \"un...
[ "to create content.'} return Response(context, status=status.HTTP_500_INTERNAL_SERVER_ERROR) @permission_classes((IsAuthenticated,)) class ContentRetrieveUpdate(RetrieveUpdateAPIView): queryset = Content.objects.all() serializer_class", "elif sub_sub_section_id is not None: queryset = self.get_queryset().filter(s...
[ "data @author: <NAME> <<EMAIL>> \"\"\" from cornac.data import Reader from cornac.eval_methods import BaseMethod", "MF(k=10, max_iter=25, learning_rate=0.01, lambda_reg=0.02, use_bias=True, early_stop=True, verbose=True) # Evaluation result = eval_method.evaluate(model=mf, metrics=[MAE(),", "import MF from corn...
[ "None: self.crop_size = size if size is not None else None else: self.crop_size", "= f.read().splitlines() self.scene_categories = dict(line.split() for line in self.scene_categories) with open(self.data_csv, \"r\") as", "albumentations.CenterCrop(height=self.crop_size, width=self.crop_size) else: self.cropper ...
[ "up migrating clients in Federated Reporting setup\" ) group = parser.add_mutually_exclusive_group() group.add_argument(\"--debug\", action=\"store_true\")", "config_sh_path = os.path.join(os.path.dirname(__file__), \"config.sh\") cmd = \"source {}; echo $WORKDIR; echo $CFE_FR_TABLES\".format(config_sh_path) with...
[ "import time fibonacci = [1, 1] n = int(input()) while len(fibonacci) < n:", "fibonacci = [1, 1] n = int(input()) while len(fibonacci) < n: fibonacci.append(fibonacci[-1] +", "= int(input()) while len(fibonacci) < n: fibonacci.append(fibonacci[-1] + fibonacci[-2]) for i in range(n):", "= [1, 1] n = int(input(...
[]
[ "None, callable or file-like\" % (consumer,)) consumer = File(consumer) self.keywords2consumer[keywords] = consumer def", "+ \"\\n\") if not self._buffering: self._file.flush() def STDOUT(msg): \"\"\" consumer that writes to", "return self.prefix() + self.content() class Producer(object): \"\"\" (deprecated) Lo...
[ "assert contacts_from_db == contacts_from_home_page def clear(s): return re.sub(\"[() -]\", \"\", s) def remove_spaces(s):", "contacts_from_home_page = sorted(app.contact.get_contact_list(), key=Contact.id_or_max) phones_from_home_page = [con.all_phones_from_home_page for con in contacts_from_home_page] #emails_f...
[ "graphics tests \"\"\" cases = [ ('Run Pymodel Graphics to generate dot file", "ABP'), ('Run PyModel Graphics to generate a file of graphics commands from new", "SVG file from dot', 'dotsvg ABP'), # Now display ABP.dot in browser ('Run", "ABP analyzer and graphics tests \"\"\" cases = [ ('Run Pymodel Graphics...
[ "Migration(migrations.Migration): dependencies = [ ('games', '0001_initial'), ] operations = [ migrations.AlterField( model_name='game', name='score',", "[ migrations.AlterField( model_name='game', name='score', field=models.FloatField(null=True, verbose_name='Score'), ), migrations.AlterField( model_name='game',...
[ "# Did not work, then let's try to find the subpackages by looking", "\"\"\" if not sysmods.has_key(name): is_new = 1 else: is_new = 0 try: mod", "true the returned list will contain tuples (module_object,name,class_object) for each class found where", "type(obj) is ClassType: if baseclass and not issubclass(...
[ "'wb') try: f.write(self.text) finally: f.close() self.pathname = support.TESTFN self.returned_obj = urlopen(\"file:%s\" % self.pathname)", "\"mypass\", \"localhost\", 9093, [], # timeout=30) # self.assertEqual(ftp.ftp.sock.gettimeout(), 30) # ftp.close() class RequestTests(unittest.TestCase):", "# Create a lis...
[ "Address, SeasonalPriceBand from ..base import Product class Transport(Product): _resource_name = 'transports' _is_listable =", "'name', 'product_line', 'sku', 'type', 'sub_type' ] _date_time_fields_utc = ['date_created', 'date_last_modified'] _model_fields = [('start_address',", "import unicode_literals from ....
[ "dares = data[\"dares\"] class Dare(commands.Cog): def __init__(self, client): self.client = client @commands.command(aliases=[\"d\"]) async", "client @commands.command(aliases=[\"d\"]) async def dare(self, ctx): dare = random.choice(dares) await ctx.send(dare) def setup(client):", "json.load(data) dares = data...
[]
[ "# # Licensed under the Apache License, Version 2.0 (the \"License\"); # you", "writing, software # distributed under the License is distributed on an \"AS IS\"", "KIND, either express or implied. # See the License for the specific language", "Unless required by applicable law or agreed to in writing, softwar...
[ ") == 0: # 可以用X整除 # 生成上一X分钟K线的时间戳 self.xminBar.datetime = self.xminBar.datetime.replace(second=0, microsecond=0) # 将秒和微秒设为0", "EMPTY_INT # 持仓量 self.time = EMPTY_STRING # 时间 11:20:56.5 self.date = EMPTY_STRING #", "\"\"\" K线序列管理工具,负责: 1. K线时间序列的维护 2. 常用技术指标的计算 \"\"\" #--------------------------------------------...
[ "'_' * (maxlen + 2) label = r'%s\\n\\f%s' % (label, line) for attr", "x: x.title)): self.printer.emit_node(i, label=self.get_title(obj), shape='box') obj.fig_id = i # package dependencies for rel", "dict(arrowstyle='solid', backarrowstyle='none', backarrowsize=10), dict(arrowstyle='solid', backarrowstyle='none'...
[ "= client return {\"success\": True, \"client\": client} return {\"success\": False, \"errors\": [\"Client is", "config import clients, messages, queue mutation = MutationType() @mutation.field(\"createMessage\") @convert_kwargs_to_snake_case async def resolve_create_message(obj,", "MutationType() @mutation.fie...
[ "!= \"down\" def notify(self, check): profile = Profile.objects.for_user(self.channel.project.owner) if not profile.authorize_sms(): profile.send_sms_limit_notice(\"SMS\") return", "= False def tmpl(template_name, **ctx): template_path = \"integrations/%s\" % template_name # \\xa0 is", "return render_to_string(...
[ "from graviti.portex.package import ExternalPackage, Imports, packages from graviti.portex.param import Param, Params from graviti.portex.register", "revision (tag/commit) of the external package. \"\"\" _env: Dict[str, Any] = {} def", "print(f\"Cloned to '{path}'\") def get_root(self) -> Path: \"\"\"Get the ro...
[ "definition=GetSingle.op.inputs[\"spec\"], ... ) ... ) >>> inputs = [ ... Input( ... value={\"key1\":", "\"key2\"], ... definition=mapping_extract_value.op.inputs[\"traverse\"], ... ), ... ] >>> >>> async def main(): ...", "value. Parameters ---------- key : str The key for the mapping. value :", "... ) ... )...
[ "anchore_engine.subsys.metrics.summary_observe( \"anchore_monitor_runtime_seconds\", time.time() - timer, function=\"do_feed_sync\", status=\"fail\", ) def handle_feed_sync(*args, **kwargs): \"\"\" Initiates", "value of 5\" ) FEED_SYNC_RETRY_BACKOFF = 5 try: feed_config_check_retries = int(os.getenv(\"FEED_CLIENT...
[ "return [ datetime.strptime(s, \"%m/%d/%y\").date() for s in self.html.xpath(path) if not \"Date\" in s", "Short Name: scotus History: - 2014-07-20 - Created by <NAME>, reviewed by MLR", "reviewed by MLR - 2017-10-09 - Updated by MLR. \"\"\" from datetime import", "path = \"id('list')//tr//a/text()\" return l...
[ "tqdm import tqdm parser = argparse.ArgumentParser(description='Counterfactual CAR') # Path, dataset and log related", "create vision model if args.model_vision == 'global_i3d': from model.model_lib import VideoGlobalModel as RGBModel", "5)) search_dict['acc_1_alpha_{}'.format(round(search_list[j], 1))].update(...
[ "application.routes.config import application.routes.user import application.routes.permission import application.routes.role import application.routes.access # after Model defined", "logger.setLevel(logging.INFO) ''' ''' import application.jwt import application.routes.config import application.routes.user impor...
[ "( 'the output file %s for illu_control fails' % outfile ) def name_outfile(self,", "filelib.exists_nz(outfile), ( 'the output file %s for illu_control fails' % outfile ) def", "outfile) assert filelib.exists_nz(outfile), ( 'the output file %s for illu_control fails' % outfile", "%s for illu_control fails' % ...
[ "= '([0-9]+)' def find_place_holders(self, template:str): #for m in re.findall(self.pattern, template): #for m in", "m.groups(), m.group('named'), type(m)) #print(m.group('escaped')) #print(m.group('named')) #print(m.group('braced')) #print(m.group('invalid')) if __name__ == '__main__': template_str =", "#print...
[ "Linux Foundation and each contributor to CommunityBridge. # SPDX-License-Identifier: MIT import json import", "company names \"\"\" import pdb;pdb.set_trace() url = f'{API_URL}/v1/company' company_name = 'test_company_name' data =", "# SPDX-License-Identifier: MIT import json import os import requests import u...
[ "write_str(\"null\", GCL) else: write_str(x.ToString(), GCL) size1[0] += 19 GCL.pop(GCint) GCint -= 1 class", "tolist(IN[0]) list2str(l1, IN[1]) str_content = str_file.getvalue() str_file.close() width1 = 100 form = WatchBox(str_content)", "from System.Drawing import Point, Color, Font from System.Windows.Forms...
[ "always be the winner? Credits: Special thanks to @jianchao.li.fighter for adding this problem", "last stone will always be removed by your friend. Hint: If there are", "n <= 3: return True if n % 4 == 0: return False", "is True assert Solution().canWinNim(6) is True assert Solution().canWinNim(7) is True ass...
[ "import unittest import 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", "Test(base.BaseScriptTest, unittest.TestCase): command_line = \"./scripts/maf_extract_ranges_indexed.py ./test_data/maf_tests/mm...
[ "ldDistances[j]: ldDistances[j] = dDistance llIndexes[j] = i lCount = 0 ''' Now count", "to 5KNN learner performance ''' np.random.seed( 12345 ) ''' Create 5 distributions for", "1 ) dist3 = np.random.uniform( -1, 1, 1000 ).reshape( -1, 1 ) dist4", "the New BSD license. Please see http://wiki.quantsoftware.or...
[ "# # Licensed under the Apache License, Version 2.0 (the \"License\"); # you", "writing, software # distributed under the License is distributed on an \"AS IS\"", "dtype=np.float64, **kvargs): \"\"\" Computes the matrix elements given by funct, for instance coulomb", "from pyscf.nao.m_numba_utils import fill_...
[ "License is distributed on an \"AS IS\" BASIS, WITHOUT # WARRANTIES OR CONDITIONS", "writing, software # distributed under the License is distributed on an \"AS IS\"", "import loading as ks_loading from keystoneauth1 import service_token import mock import nova.conf from", "self.addCleanup(service_auth.reset_...
[ "source == 'svhn': return svhn2mnist.Feature() elif source == 'synth': return syn2gtrsb.Feature() def Classifier(source,", "return syn2gtrsb.Feature() def Classifier(source, target): if source == 'usps' or target == 'usps':", "usps.Feature() elif source == 'svhn': return svhn2mnist.Feature() elif source == 'syn...
[ "reduction: str = \"sum\") -> None: \"\"\" Args: reduction (str) \"\"\" super().__init__(reduction=reduction) self.reduction", "\"\"\" super().__init__(reduction=reduction) self.reduction = reduction def forward(self, z_origin: Tensor, z_noisy: Tensor, t: float", "= -torch.log(torch.diagonal(exp_sim) / exp_sim....
[ "f) for f in sorted(os.listdir(path)) if (f.endswith('.yml') or f.endswith('.yaml')) and os.path.isfile(os.path.join(path, f))] else:", "saving file: %s', self._cache_file) if fd: try: os.close(fd) except Exception: logger.error('Can not close", "config if 'name' not in config and 'name' in pg_config: config['n...
[ "metatype_registry: del metatype_registry['FOLDER'] FSDVTest.tearDown(self) def test_DirectoryViewMetadata(self): # Test to determine if metadata shows", "test_ignored(self): # Test that \"artifact\" files and dirs are ignored, # even when", "ignored' % name) def test_surrogate_writethrough(self): # CMF Collect...
[ "self.connect('Fl_O:stat:P', 'balance.lhs:Pt') self.connect('Fl_O:stat:T', 'balance.lhs:Tt') # self.set_order(['ambient', 'subgroup']) if __name__ == \"__main__\": p1 =", "if __name__ == \"__main__\": p1 = om.Problem() p1.model = om.Group() des_vars = p1.model.add_subsystem('des_vars',", "om from pycycle.thermo...
[ "from rest_framework.authtoken.models import Token from app.methods import prepare_user def get_token(request): if request.user: user", "+ token.key + '&id=' + str(user.id) else: url = \"travel://error\" response = HttpResponse(url,", "AdminPasswordChangeForm if request.method == 'POST': form = PasswordForm(req...
[ "# # Licensed under the Apache License, Version 2.0 (the \"License\"); # you", "writing, software # distributed under the License is distributed on an \"AS IS\"", "and # limitations under the License. # ============================================================================== \"\"\"Split data into train, v...