ngram
listlengths
0
82k
[ "True} } def __init__(self, options): super(ODOWriter, self).__init__(options) from flatson import", "None) self.odo_uri = self.read_option('odo_uri', None) self.flatson = Flatson(schema) self.logger.info('ODOWriter has", "to a odo destination. https://odo.readthedocs.org/en/latest/ Needed parameters: - schema ...
[ "via: >>> from x7.shell import *; maketests('x7.sample.needs_tests') \"\"\" def needs_a_test(a,", ">>> from x7.shell import *; maketests('x7.sample.needs_tests') \"\"\" def needs_a_test(a, b):", "<reponame>gribbg/x7-geom \"\"\" Simple file to validate that maketests is working.", "from x7.shell import *; make...
[ "else: IV = bytes(IV0s[nz]) hash.update(IV) # needs to be copied", "to copy object otherwise the originally pointed version gets updated!", "IV0s = [658678, 6785697, 254376, 67856, 1432543, 786, 124345, 5443654]", "file the algorithm here does the full padding so the", "every hash output is exactly used 2 t...
[ "list, goal_node_id: int): \"\"\" Creates an ordered route list from", "failed, add the last node that # passed to the", "c in reversed_stack: if c.to_node.id == next_node: r.append(c.to_node.id) r.append(c.from_node.id) next_node", ":param route_stack: All routes found until goal :param goal_node: int", "s...
[ "<filename>design_patterns/pubsub/simple_events/__init__.py class Event: def __init__(self): self.handlers = set() def subscribe(self,", "= set() def subscribe(self, func): self.handlers.add(func) def unsubscribe(self, func): self.handlers.remove(func)", "func): self.handlers.add(func) def unsubscribe(self, fun...
[ "\"\"\" Check and return the type of an environment variable.", "environment variable. supported types: None Integer String @param env_var_name: environment", "type of an environment variable. supported types: None Integer String", "\"\"\" try: val = os.getenv(env_var_name) if val is None: return", "def che...
[ "[\"name\" , \"song_image\" , \"pk\" , \"like\" , \"played\" ,", "class SoundDetailSerializer(serializers.ModelSerializer): class Meta: model = Sound fields = \"__all__\"", "class Meta: model = Album fields = [\"name\" , \"datepublish\"", "\"pk\" , \"like\" , \"played\" , \"tag\" , \"singer\" ,", "serialize...
[ "import datetime from django.conf import settings import pytz def check_tracker(obj,", "block name), e.g. ('HN', 'Header Navigation', 'header-navigation-trackers') would allow for", "block header-navigation-trackers %}{% generate_trackers 'HN' %}{% endblock %} in their", "It defaults to the obvious 4 location...
[ "import datetime from fastapi import APIRouter router = APIRouter() @router.get(\"\",", "router = APIRouter() @router.get(\"\", tags=[\"health\"]) async def get_health(): return {", "get_health(): return { \"results\": [], \"status\": \"success\", \"timestamp\": datetime.datetime.now().timestamp() }", "dateti...
[ "defaultdict from io import StringIO from matplotlib import pyplot as", "'r') as f: for line in f: cat = line.split('\\n')[0]", "PATH_TO_FROZEN_GRAPH = '../data/mobilenet_v2_1.4_224/mobilenet_v2_1.4_224_frozen.pb' info='Time taken to load Model into memory:'", "#Load categories categories = [] with open('../d...
[ "data: update_user_setting_filters(data, key, setting) sync_user_settings() def update_user_setting_filters(data, key, user_setting): timespan_map", "frappe.parse_json(setting.get('data')) if data: for key in data: update_user_setting_filters(data, key, setting)", "import frappe, json from frappe.model.utils.us...
[ "quantum numbers and default temperature and frequency N = 10*10", "print(\"{:08d} / {:08d}\".format(current_step, total_steps), end=\" \\r\") # After 'checkpoint_steps', show", "label=\"Sampled\" ) plt.plot( n, gas.p_n(n), label=\"Theor.\" ) plt.xlabel('n') plt.ylabel('P(n)') plt.legend()", "# 1e-3 times the...
[ "as index_file: for private_pack in private_packs: private_pack['price'] = 0 index", "import os import sys import shutil import json import argparse", "parser.add_argument('-a', '--artifacts_path', help=\"The full path of packs artifacts\", required=True) parser.add_argument('-ea',", "of packs artifacts\", re...
[]
[ "type='Collect', keys=['imgs', 'flow_gt'], meta_keys=[ 'img_fields', 'ann_fields', 'filename1', 'filename2', 'ori_filename1', 'ori_filename2',", "'flow_gt', 'filename1', 'filename2', 'ori_filename1', 'ori_filename2', 'ori_shape', 'img_shape', 'img_norm_cfg', 'scale_factor', 'pad_shape'", "'img_fields', 'ann_fie...
[ "__rand__(self, lhs): return call('bit_and', lhs, self) # Represents an eltwise", "__radd__(self, lhs): return TensorIndex(poly_op(lib.PLAIDML_INT_OP_ADD, lhs, self)) def __sub__(self, rhs): return", "self)) def __add__(self, other): return TensorDim(dim_op(lib.PLAIDML_INT_OP_ADD, self, other)) def __radd__(sel...
[ "(c) 2018 Intel Corporation Licensed under the Apache License, Version", "import LandmarksNet from .se_resnet_angular import SEResNetAngular from .shufflenet_v2_angular import ShuffleNetV2Angular", "Corporation Licensed under the Apache License, Version 2.0 (the \"License\");", "\"\"\"Returns input resolution...
[ "else: if ei is not None: ret[\"exc_info\"] = self.formatException(ei) #", "ei is not None: ret[\"exc_info\"] = self.formatException(ei) # Dump the", "ret.pop(\"args\") msg = ret.pop(\"msg\") ret[\"message\"] = msg % args #", "= msg % args # Exceptions must be formatted (they", "Exceptions must be formatted...
[ "if np.allclose(b, A*x) == False: raise Exception('Orthogonal test failure') ################################################################################", "Orthogonal linear system solver tests from math import sqrt import", "b, 1) # Check if np.allclose(b, A*x) == False: raise", "# Known terms vector b ...
[ "os import shutil from dataclasses import dataclass from datetime import", "to process data files\"), (\"❌\", \"Failed to upload processed data", "\"⚙ In Progress...\", \"✅ Success!\", \"❌ Failed: file not found\",", "created_at=datetime.fromisoformat(json_resp[\"created_at\"]), updated_at=datetime.fromisofor...
[ ">= len(_ELLIPSIS_BYTES), 'max_bytes must be at least %d' % len(_ELLIPSIS_BYTES)", "payload' elif status is 5: return 'Invalid token size' elif", "has been split. while True: try: alert = json.loads(u'\"%s\"' %", "Inc. All Rights Reserved. \"\"\"Apple Push Notification service utilities. Original", "APNs me...
[ ":align: center :width: 30% We can mathematically formalize this by", "the shape for the ansatz.\"\"\" return np.random.uniform(0, 2 * np.pi,", "y_1 y_2 + x_2^2 y_2^2 = \\langle \\boldsymbol{x}, \\boldsymbol{y} \\rangle^2.", "calculate the entries between the same datapoints, as we know", "the # variational...
[ "n = number-1 self.color = ((n/s)*(255/s),(n%s)*(255/s),128) def draw(self,screen,font,x,y,width,height): pygame.draw.rect(screen,self.color,(x,y,width,height)) text", "#gimme a CHAR, not some weird integer domap = {", "self.game: return (time.monotonic() - self.start_t , BLACK) elif self.is_solved() and", "B...
[ "if i == 6: continue; print(i); print(i); print(i); print(i); print(i);", "in range(1,11): if i == 6: continue; print(i); print(i); print(i);", "for i in range(1,11): if i == 6: continue; print(i);", "skip개념!!! for i in range(1,11): if i == 6: continue;", "i in range(1,11): if i == 6: continue; print(i); pr...
[ "ncs6k-mcast.pkg-5.2.5.47I.DT_IMAGE ncs6k-mcast-5.2.5.47I ncs6k-mini-x.iso-6.1.0.07I.DT_IMAGE ncs6k-xr-5.2.5.47I ncs6k-5.2.5.47I.CSCuy47880-0.0.4.i.smu ncs6k-5.2.5.47I.CSCuy47880-0.0.4.i ASR9K-64 Production Packages -", "ncs5k ncs5500 xrv9k\": # 61117I or 611 or 6.1.1.17I or", "self._subversion = result.group(\...
[ "in this function should be of lower case. Official wechat", "self._media_type = media_type self._token = token def loadToken(self, token =", "=> voice' self._Recognition = root.find(\"Recognition\").text # For recognition messages if", "token=''): self._token = token def loadToken(self, token=''): '''Load th...
[]
[ "colors) class textcolor(Command): args = '[ model:str ] color:str self'", "a['model'], self.ownerDocument.userdata.getPath('packages/color/colors')) self.style['border'] = ('1px solid %s' % latex2htmlcolor(a['bordercolor'], a['model'],", "latex2htmlcolor('0,1,1') colors['magenta'] = latex2htmlcolor('1,0,1') co...
[ "print(\"\\033[0;35;40mTeste\\033[m\") print(\"\\033[0;36;40mTeste\\033[m\") print(\"\\033[0;37;40mTeste\\033[m\") print(\"\\033[0;38;40mTeste\\033[m\") print(\" - - - Testando os", "- Testando os 30 - - -\") print(\"\\033[0;37;40mTeste\\033[m\") print(\"\\033[0;31;40mTeste\\033[m\") print(\"\\033[0;32;40mTeste\\...
[ "<NAME>, <NAME>, <NAME> and the TurboGears community\" email = \"<EMAIL>\"", "url=\"http://www.turbogears.org/\" author= \"<NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME> and", "widgets (ToscaWidgets2) * automatic JSON generation from your controllers *", "development and everything in between: * dynam...
[ "except: pass ## U,V,H mean em = e.mean(axis=0) print('e mean", "pass ## U,V,H mean em = e.mean(axis=0) print('e mean done.')", "create ouputfolder try: os.mkdir(runpath+'/analysis') except: pass ## U,V,H mean em", "import sparse import time as tictoc from netCDF4 import Dataset", "= np.load(runpath+'/e_sub...
[ "words_file, self.board_size, 3) def solve(self, grid): \"\"\"Generate all solutions for", "by u. if word[1] != 'u': continue # Remove \"u\"", "= set() for start in range(len(string)): cur = self.trie letters", "s, cur_node, seen + [cur_sq])) if cur_node._is_word: if s[0] ==", "seen + [cur_sq])) if cur_node...
[ "PagerDuty when Placement group on one OSD is corrupted and", "@managed_service_required @skipif_ms_consumer @pytest.mark.polarion_id(\"OCS-2771\") def test_corrupt_pg_pd(measure_corrupt_pg): \"\"\" Test that there is", "when the corrupted ceph pool is removed. \"\"\" api =", "pool is removed. \"\"\" api = pa...
[ "of features int y[N]; // the response matrix[N,K] X; //", "observations int N2; // the number of test observations int", "training observations int N2; // the number of test observations", "seaborn as sns from cmdstanpy import CmdStanModel #%% load data", "matrix for the predicted values } parameters { // ...
[ "value def parse(self, text): \"\"\" Parse a string field containing", "# Daily update def array_splitter(self, value): return [ x[1:-1] for", "Fire and forget loader for materials - will queue a", "cache_file: res = json.load(cache_file) self.queue.put( { 'mats': res } )", "'mats': m._materials } ) except:...
[ "for url in item['image_urls']: yield Request(url, meta={'title': item['title'], 'bookname': item['bookname']})", "info): # 将下载完成后的图片路径设置到item中 item['images'] = [x for ok, x in", "def item_completed(self, results, item, info): # 将下载完成后的图片路径设置到item中 item['images'] = [x", "os.path.exists(path): os.makedirs(path...
[ "model train_input_fn = tf.estimator.inputs.numpy_input_fn( x={'x': train_data}, y=train_labels, batch_size=100, num_epochs=None, shuffle=True", "tf.estimator.EvalSpec(eval_input_fn) tf.estimator.train_and_evaluate(mnist_classifier, train_spec, eval_spec) if args.current_host == args.hosts[0]: mnist_classifier.ex...
[ "from autoware_planning_msgs.msg import StopReasonArray from case_converter import pascal2snake from geometry_msgs.msg", "StopReasonArray, self._options.topic_name, self._on_stop_reasons, 1 ) self._pub_pose_map = {} self._idx_map =", "if name not in self._pose_map: self._pose_map[name] = {} pose_id =", "2.0 (...
[ "won't close such a loop. .. code-block:: python class MyTest(aiounittest.AsyncTestCase):", "one. But if, for some reasons, you want to provide", "import aiounittest class MyTest(aiounittest.AsyncTestCase): async def test_await_async_add(self): ret = await", "python import aiounittest class MyTest(aiounittest...
[ "color): t.pendown() t.pensize(1) t.color(color) t.begin_fill() for counter in range(2): t.forward(horizontal)", "t.speed(0) t.setup(988,520) t.goto(494,260) t.pendown() for counter in range(7): t.setheading(-90) rectangle(40,988,'#B22234')", "as t def rectangle(horizontal, vertical, color): t.pendown() t.pensi...
[ "total = start.value zero = False while end: total +=", "8, 9, 10, -19, 10, -18, 20, 25] s3 =", "if total == 0: zero = True start = end", "25] s3 = [2, 3, -5, 10, 10, -5, -5,", "= end.next if not zero and not new: new =", "break end = end.next if not zero and not new:", "root = None while start: end = s...
[ "account_name, maps_account_create_params) def list_accounts(client, resource_group_name=None): # Retrieve accounts via subscription", "client_denied_terms = 'You must agree to the License and Privacy", "tags=None, force=None): terms = 'By creating an Azure Maps account,", "resource_group_name=None): # Retrie...
[ "no cont feat, seq=50, shuffle=True\") ## B_full_feature_v2 no cont_feat, with", "for loss computation. loss='log_loss', #'log_loss', 'softmax' max_seq_length=50, cont_feat_len=85, use_cont_feat=False, init_item_emb=False,", "pred_file = os.path.join(data_path, r'inter_test.tsv') final_pred_file = os.path.join(...
[ "classes to represent a C type. All of them classes", "like \"char\" or \"int\".\"\"\" def __init__(self, name, signed, longs): super(CtypesSimple,", "and self.restype.destination.name == \"void\" ): # we will provide a", "we will provide a means of converting this to a", "0): \"c_float\", (\"double\", True...
[ "constants import Screen import cursors class Text: def __init__(self, text):", "self._y = randint(self._r, Screen.height - self._r) self._r = randint(self.min_r, min(Screen.width,", "* len(self._text) - self._padding_len def _x_text_center_position(self): return (Screen.width - self._count_text_len())", "r):...
[ "request type, checking for key value. \"\"\" regex_result = self.utils.get_search_regex(", "from manage \"\"\" def __init__(self, logger): self.TAG = self.__class__.__name__ self.logger", "str(err) self.messenger.mark_as_failed() else: self.messenger.code_type = Constants.USER_ERROR self.messenger.set_message ...
[ "has_worked: logging.error(\"Nothing has been tested!\") snapshot_stack.delete() # depending on number", "we are reverted # completely (only one profile was run)", "= False profiles = get_viable_profiles(options.target, options.datastream, options.benchmark_id) if len(profiles) >", "options.benchmark_id, runn...
[ "wtforms import fields, widgets class ReferencePropertyField(fields.SelectFieldBase): \"\"\" A field for", "a one-argument callable, this callable will be passed model instance", "x: x elif isinstance(get_label, basestring): self.get_label = operator.attrgetter(get_label) else: self.get_label", "not None: for...
[ "np import pandas as pd import random def simulate_games(num_players=4, domino_size=12,", "mode game_modes = [] if collect_data: for select in range(0,", "domino_size + _ + num_games + .xlsx This spreadsheet is", "is off: len(players) must equal num_players Returns a tuple of", "= pd.DataFrame(columns=colum...
[ "__all__ = (\"DottedMarkupLanguageException\", \"DecodeError\") class DottedMarkupLanguageException(Exception): \"\"\"Base class for all", "pass class DecodeError(DottedMarkupLanguageException): \"\"\"Raised when there is an error decoding", "all exceptions in this module.\"\"\" pass class DecodeError(DottedMar...
[ "in [\"xmin\", \"ymin\", \"xmax\", \"ymax\"]] instances.append( {\"category_id\": CLASS_NAMES.index(cls), \"bbox\": bbox,", "fvcore.common.file_io import PathManager import os import numpy as np import", "jpeg_file, \"image_id\": fileid, \"height\": int(tree.findall(\"./size/height\")[0].text), \"width\": int(t...
[ "as fin: result = fin.read() end = time.time() print(\"%.1f images/s\"", "end = time.time() print(\"%.1f images/s\" % (10000 / (end -", "glob.glob('/mnt/lustre/chenyuntao1/datasets/imagenet/train/*/*') random.shuffle(filelist) begin = time.time() for i, f in enumerate(filelist):", "time import random filelist...
[ "simulation, var_name, inp_dict, subdomains, subdomain_id): \"\"\" Dirichlet boundary condition with", "\"\"\" super().__init__( V, value, subdomain_marker, subdomain_id, method='geometric' ) self.simulation =", "%r for %s' % (value, var_name)) @register_boundary_condition('CodedValue') class CodedDirichletBoun...
[ "2, 4, 6] result = count_inversions(input) self.assertEqual(result, 3) if __name__", "TestCountSplitInversions(unittest.TestCase): def test_count_inversions(self): input = [1, 3, 5, 2, 4,", "from count_split_inversions import count_inversions class TestCountSplitInversions(unittest.TestCase): def test_count_inv...
[ "= get_x_y(train_num_samples) test_data = get_x_y(test_num_samples) if tf_data: from_tensor_slices = tf.data.Dataset.from_tensor_slices", "# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law", "create_data() self.forecaster.fit(train_data, epochs=2, batch_size=32) yhat = self.fo...
[ "vessel.flight(), 'mean_altitude') expr = conn.krpc.Expression.greater_than( conn.krpc.Expression.call(mean_altitude), conn.krpc.Expression.constant_double(10000)) event = conn.krpc.add_event(expr)", "vessel.auto_pilot.disengage() srf_altitude = conn.get_call(getattr, vessel.flight(), 'surface_altitude') expr = c...
[ "import numpy as np def get_rows(a): return list(a) def get_columns(a):", "main(): np.random.seed(0) a=np.random.randint(0,10, (4,4)) print(\"a:\", a) print(\"Rows:\", get_rows(a)) print(\"Columns:\", get_columns(a))", "return list(a.T) def main(): np.random.seed(0) a=np.random.randint(0,10, (4,4)) print(\"a:\"...
[ "rank leaderboard_df = leaderboard_df.sort_values( by=['public ' + score_name, 'submitted at", "= session.query(Event).filter_by(name=event_name).one() event_teams = session.query(EventTeam).filter_by(event=event).all() for event_team in event_teams: user_name", "(df_scores_mean.loc[list(map_renaming.keys())] ....
[ "1 if indent == 20: indent_Increasing = False else: indent", "Python import time, sys indent = 0 # How many", "Pause for 1/10th of a second if indent_Increasing: indent =", "20: indent_Increasing = False else: indent = indent - 1", "indent, end='') print('********') time.sleep(0.1) # Pause for 1/10th of a",...
[ "print \"No token for you!!!\" sys.exit() def start(): # Projects", "= get_compensations(host, token, site_pk=site['id'], project_pk=project['id']) if not compensation_list: sys.exit('There are", "are no samples') for i, result in enumerate(sample_list['data']): print i,", "= raw_input('Choose Compensation (r...
[ "views.choose_company, name='choose_company'), url(r'^cleanlogs/$', jobs.cleanlogs, name='cleanlogs'), url(r'^primecache/$', jobs.primecache, name='primecache'), url(r'^dump_fixtures/$', views.dump_fixtures),", "views from . import jobs urlpatterns = [ url(r'^choose_company/(?P<company_id>.*)/$', views.choose_com...
[ "open(\"README.md\", \"r\") as fh: long_description = fh.read() setuptools.setup( name=\"i3-workspace-swap\", description='A", "workplaces in i3wm', long_description=long_description, long_description_content_type=\"text/markdown\", version=\"1.1.0\", url='https://github.com/einzigartigername/i3-workspace-swap', ...
[ "0 if successful def write_modmk(outdir): #, msg_types, srv_types): if not", "providing access to foreign persons. # from __future__ import print_function", "preventing the creating of Fprime directory: %s\"%dir) p = os.path.join(outdir,", "to comply # with all U.S. export laws and regulations.", "if len(ge...
[ "new_notebook(cells=[new_code_cell('1+1'), new_code_cell('2\\n2')]) with pytest.raises(NotebookDifference) as exception_info: compare_notebooks(nb1, nb2, raise_on_first_difference=False) assert", "ref = new_notebook(cells=[new_code_cell('1+1')]) test = new_notebook(cells=[new_code_cell('1+1', metadata={'metakey':...
[ "= [ 'you unhinge your jaw and consume *{}* in", "friends...', 'now you\\'re at both ends of a high five!']", "makes me do this for uninitialized classes await ctx.channel.send(msg) return", "\"\"\"High five like a boss.\"\"\" msg = self.highfives.computeAction(self.highfives, self.bot, ctx,", "but they bit...
[ "import CoinGame, AsymCoinGame from marltoolbox.utils import log def trainer_fn(exp_name, num_episodes,", "\"batch_size\": 12 if debug else None, # \"exp_name\": \"IPD\", #", "\"entropy_coeff\": 0.001, \"weigth_decay\": 0.03, } tune_config = get_tune_config(tune_hparams) ray.init(num_cpus=os.cpu_count(), num_gp...
[ "data, ready for passing into AmCharts. Contains 2 items -", "''' Return json format data, ready for passing into AmCharts.", "= instance.__class__ query_set = class_.objects.filter(shortlink=new_link) if query_set.exists(): return create_shortlink() return", "next year it will add results above result = []",...
[ "'server:main', 'port' ): port = config_parser.get( 'server:main', 'port' ) host", "else: exit(0) exit(0) def admin_user_info( config_parser ): user_info_config = os.path.abspath(", ") ) tree, error_message = xml_util.parse_xml( user_info_config ) if tree", ") else: return 1 if args.method == 'check_db': retu...
[ "int(sequence_number) return self.backend.get_shard_iterator( arn, shard_id, shard_iterator_type, sequence_number ) def get_records(self):", "dynamodbstreams_backends[self.region] def describe_stream(self): arn = self._get_param(\"StreamArn\") return self.backend.describe_stream(arn) def list_streams(self):", "...
[ "= '_zeros' enabled = True @classmethod def extract(cls, node): attrs", "shape = list(attrs.tuple('shape', int, None)) zero_shapes = [] for i,", "# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import", "<reponame>ytorzuk-altran/openvino # Copyright (C) 2018-2021 Intel Corpor...
[ "j.sal.process.executeWithoutPipe(\"cd %s;%s install\" % (cdest, self.npm)) # # def flatui(self):", "# z.close() # j.sal.fs.renameDir(j.sal.fs.joinPaths(self.buildDir, \"bootstrap-%s-dist\" % version), dpath) # #", "j class builder(): # @property # def buildDir(self): # return", "\"bootstrap\") # j.sal.fs.rem...
[ "PC = PROGC(0) # Start from the first instruction RF", "RF compute new_PC RF.update(new_regs, new_PC) PC.dump() # Print PC RF.dump()", "IM, cycle) # Update RF compute new_PC RF.update(new_regs, new_PC) PC.dump()", "MEM = IMACC(sys.stdin.read()) # Load memory from stdin PC =", "while not halted: Instruction ...
[ "self.id & 0xFFF class ObjectPlusConverter(commands.converter.IDConverter[commands.Converter]): async def convert(self, ctx: commands.Context,", "role: if role.is_bot_managed(): user = role.tags.bot_id user = await ctx.bot.try_user(user)", "None: role = None with contextlib.suppress(commands.RoleNotFound, comma...
[ "structure_klifs_ids = _parse_structure_klifs_ids(args.input) encode(structure_klifs_ids, args.output, args.local, args.ncores) def _parse_structure_klifs_ids(args_input): \"\"\"", "structure_klifs_ids = [int(args_input[0])] except ValueError: structure_klifs_ids = np.genfromtxt(fname=args_input[0], dtype=int).to...
[ "n = len(tsB) distanceProfile = mass(query, tsB) if selfJoin: trivialMatchRange", "2. , 2.828, 2. ], [ 0. , 0. ,", "0. ]]) \"\"\" selfJoin = False if tsB is None:", "is None: selfJoin = True tsB = tsA query =", "idx, m, tsB = None): \"\"\"Return the distance profile of", "idx, m, tsB = None): \"\"\" >>> n...
[ "as plt import numpy as np from sklearn import linear_model", "import pyplot as plt import numpy as np from sklearn", "pyplot as plt import numpy as np from sklearn import" ]
[ "widgetName, widgetArea): \"\"\"创建停靠组件\"\"\" widget = widgetClass(self.mainEngine, self.eventEngine) dock = QDockWidget(widgetName)", "self.eventEngine.register(EVENT_TIMER, self.signalStatusBar.emit) # ---------------------------------------------------------------------- def updateStatusBar(self, event): \"\"\"...
[ "elif 'del' == mage[0]: notice = del_item(mage[1],user_id) line_bot_api.reply_message(event.reply_token,TextSendMessage(text=notice)) elif 'list'", "TextSendMessage(text=register_url)) elif 'add' == mage[0]: try: notice = add_item(mage[1],user_id,mage[2]) except:", "= event.source.user_id print(\"user_id =\", u...
[ "Model() country = Country(mod, 'CO') Household(country, 'HH') ConsolidatedGovernment(country, 'GOV') FixedMarginBusiness(country,", "'TAX', taxrate=.2) # At time period 25, cut spending to", "= Quick2DPlot([k, k], [spend, Def], title='Spending and Deficit', filename='intro_X_XX_multiplier_deficit.png', run_now...
[ "\"\"\" def __init__(self, user_settings=None, defaults=None): if user_settings: self._user_settings = user_settings", "user settings for key, value in data.items(): data[key] = import_callable(value)", "# Cache the result self._cached_attrs.add(attr) setattr(self, attr, val) return val", "attr = path_or_call...
[ "models.SlugField() counter = models.IntegerField(default=0) def __str__(self): return \"%s -- %s\"", "models.IntegerField(default=0) def __str__(self): return \"%s -- %s\" % (self.long_url, self.short_id)", "<filename>shorty/models.py from django.db import models from shorty.manager import UrlManager class", ...
[ "only) User is allowed to create query (Create for \"query\"", "'password', 'queries', 'realname', 'room', 'subst_active', 'substitute', 'timezone', 'tt_lines') only) User", "'actor', 'creation', 'creator', 'deputy', 'description', 'id', 'is_extern', 'is_public_holiday', 'is_special_leave', 'is_vacation',", "...
[ "tc -= 1 best = 0 n, x = map(int,", "x = map(int, input().split()) for i in range(n): s, r", "n, x = map(int, input().split()) for i in range(n): s,", "in range(n): s, r = map(int, input().split()) if x >=", "for i in range(n): s, r = map(int, input().split()) if", "<filename>CodeChef/problems/IMDB/main.p...
[ "test_find_user_dict_mode(self): w = self.wrp w.query_mode = 'dict' res = w.insert_user('John',", "test_find_user_nonexistent(self): w = self.wrp user = w.find_user(99) self.assertIsNone(user) def test_get_users_tuple(self):", "w.query_mode = 'dict' res = w.insert_user('John', 'Doe') last_id = res.lastrowid", ...
[ "variant('build_dev_tests', default=False, description='Build developer test routines') variant('build_tests', default=False, description='Build test", "variant('zfp', default=True, description='Build with support for compression using ZFP') variant('c_interface',", "libs.joined(\";\"), ] if spec.satisfies('@:3...
[ "from rasa.core.constants import REQUESTED_SLOT from rasa.core.slots import Slot import pandas", "CollectingDispatcher, tracker: Tracker, domain: Dict[Text, Any], ) -> List[Dict]: if", "return [\"rating\"] def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]: \"\"\"A dictionary", "parse_data={ \"int...
[ "\"p3\"]: series = dataframe[sensor] scatter = go.Scatter(x = dataframe.index, y", "series = dataframe[sensor] scatter = go.Scatter(x = dataframe.index, y =", "title = \"Pressure timeseries\", template = self.template ) ) return", "for a timeseries ''' def generate_timeseries_plot(self, dataframe): pressure_p...
[ "kind: str :param location: Required. Resource Location. :type location: str", "Key Vault secret. Possible values include: 'Initialized', 'WaitingOnCertificateOrder', 'Succeeded', 'CertificateOrderFailed',", "must be populated in order to send to Azure. :ivar", ".resource import Resource class AppServiceCerti...
[ "class RemoveStickerFromSetRequest(TLRequest): CONSTRUCTOR_ID = 0xf7760f51 SUBCLASS_OF_ID = 0x9b704a5a def __init__(self,", "{ '_': 'RemoveStickerFromSetRequest', 'sticker': None if self.sticker is None else", "Instance of StickerSet. \"\"\" self.stickerset = stickerset # type: TypeInputStickerSet", "\"\"\" :...
[ ": \"VtkOutputProcess\", \"help\" : \"This process writes postprocessing files for", "from KratosMultiphysics.ChimeraApplication.fluid_chimera_analysis import FluidChimeraAnalysis class ChimeraAnalysisBaseTest(UnitTest.TestCase): def setUp(self): # Set", "ChimeraAnalysisBaseTest(UnitTest.TestCase): def setUp(se...
[ "def getlist(self) -> list[dict[str, str]]: ENTRY = r\"{http://www.w3.org/2005/Atom}\" MEDIA =", "-> list[dict[str, str]]: ENTRY = r\"{http://www.w3.org/2005/Atom}\" MEDIA = r\"{http://search.yahoo.com/mrss/}\" YOUTUBE", "res: data = xml.etree.ElementTree.fromstring(res.read()) for child in data.iter(f\"{ENTRY}...
[ "PORT = 9559 simulation = False with pepper_interface.get(IP,PORT,simulation) as pepper:", "with pepper_interface.get(IP,PORT,simulation) as pepper: time.sleep(1.0) values,time_stamp = pepper.laser.get() print print", "print \"Left\" print values[\"Left\"] print print \"Right\" print values[\"Right\"] print", ...
[ "o texto doc = ____(\"I like tree kangaroos and narwhals.\")", "classe da língua inglesa (English) e criar um objeto nlp", "# Processar o texto doc = ____(\"I like tree kangaroos", "Selecionar o primeiro token first_token = doc[____] # Imprimir o", "objeto nlp from ____ import ____ nlp = ____ #", "first_t...
[ "are on the thank you page content = resp.get_data(True) self.assertRegex(content,", "Business Survey - Retail Sales Index</') self.assertRegex(content, \"What are the", "'Please check carefully before submission.') self.assertRegex(content, '>Submit answers<') # We", "follow_redirects=False) self.assertEqual...
[ "transform batch_indices to pair_indices pair_indices = tf.transpose(tf.concat([broad_casted_batch_dims, tf.reshape(batch_indices, [1, -1])],", "input IDs?](../glossary#input-ids) attention_mask (`np.ndarray` or `tf.Tensor` of shape `({0})`, *optional*):", "its model (such as downloading or saving, resizing the...
[ "guess a letter and respond to the # user based", "result = result + letter else: result = result +", "wordlist: list of strings wordlist = string.split(line) print \" \",", "user to guess a letter and respond to the #", "you will have to know how to use the functions", "from wordlist at random \"\"\" ret...
[ "port) self.image = None self.message_content = None self.sub_order_id = None", "Created by auto_sdk on 2016.04.13 ''' from top.api.base import RestApi", "by auto_sdk on 2016.04.13 ''' from top.api.base import RestApi class", "''' Created by auto_sdk on 2016.04.13 ''' from top.api.base import", "''' from to...
[ "be used. When -1 is set all data is used.\")", "# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law", "# limitations under the License. def get_args(batch_size=8, image_size=256, max_iter=100000): \"\"\"", "parameters from\") parser.add_argument(\"--train-samples\", type=int,...
[ "my_content = f.readlines() print(\"\\nUse readlines method\") print(\"-\" * 60) for", "print(\"-\" * 60) for line in my_content: print(line.strip()) print(\"-\" *", "# READ #### f = open(\"my_file.txt\") print(\"\\nLoop directly over file\")", "file\") print(\"-\" * 60) for line in f: print(line.strip()) pri...
[ "int] = { 'limit': 20, 'offset': 0 } datasets: List[DatasetType]", "name=cls.unique_name, dataset_format='ini', content='aGVsbG8sIHdvcmxkIQ==', tags=['test_tag'] ) @classmethod def tearDownClass(cls) -> None:", "because Self-Host will return HTTP 429 Too Many Requests otherwise.", ") cls.unique_name: str = st...