ngram
listlengths
0
82k
[ "x in info.split()] def is_gc_running(ip, port): s = get_gc_status(ip, port)", "def get_collision(self, bucket): check_bucket(bucket) collisions = defaultdict(dict) hint_data = self.get(\"@collision_all_%x\"", "(flag, tstamp, ver):\", k, r[1], r[3:] print \"key info mem:\",", "info disk(ver, vhash, flag, vsz,...
[ "return True if l1p1x > l2p2x or l1p2x < l2p1x:", "make sure p1x < p2x if l2p1x > l2p2x: tmp", "l2p2x and l1p2x < l2p1x and l1p1y > l2p2y and", "= l1p1y l1p1y = l1p2y l1p2y = tmp l2p1x =", "l1p2y = tmp l2p1x = line2[0][0] l2p1y = line2[0][1] l2p2x", "True # line2 rectangle is inside line1 rect if l1p1x", ...
[ "def get_from(self): rv = self.model for key, subloader in self.extras.items():", "self.extras = dict((key, self.get(value)) for key, value in extras.items()) self.on_clause", "func def do_load(self, row, context): return self.func(row, context), True class", "key == (None,) * len(key): return None, None rv =...
[ "import base64 from dao.user import User from dao.client import Client", "get_trip_db, get_section_db import emission.analysis.result.carbon as carbon import emission.core.common as common", "in here, as opposed to the top level as recommended", "% (uuid, newView)) setCurrView(uuid, newView) # TODO: Add stats...
[ "MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO", "(self.colorize(m.level, m.summary[\"en\"] % m.vars)) ) smsgs = [msg for msg", "Links'), ('script', 'Script Links'), ('frame', 'Frame Links'), ('iframe', 'IFrame Links'),", "u\"\\033[0;32m\" color_end = u\"\\033[0;39m\" if level =...
[ "+ self._out_min # .......................................................................... def scale_value(self, value): ''' (out_max -", "self._ioe.output(self._pin_red, r) self._ioe.output(self._pin_green, g) self._ioe.output(self._pin_blue, b) self._log.debug('value: {:<5.2f}; rgb: {},{},{}'.format(value,",...
[ "pass content = None def json(): pass text = None", "ESP32') # Stubber: 1.3.2 class Response: '' def close(): pass", "def patch(): pass def post(): pass def put(): pass def", "patch(): pass def post(): pass def put(): pass def request():", "def post(): pass def put(): pass def request(): pass usocket", "d...
[ "p.search(o.path) print m.group('uid') print m.group('mid') def parse2(): exc_type_str = \"<type", "Jike Inc. All Rights Reserved. # Author: <EMAIL> import re", "<EMAIL> import re from urlparse import urlparse def parse1(): p", "#-*- coding=utf-8 -*- # # Copyright 2012 Jike Inc. All", "# # Copyright 2012 Ji...
[ "= Label(text=str(opt)) self.opt_boxes.append(check_box) self.labels.append(label) box.add_widget(check_box) box.add_widget(label) self.grid.add_widget(box) cancel_button = Button(text=\"Cancel\")", "import matplotlib.pyplot as plt import matplotlib import datetime from TransactionBook.model.Filter", "_): selec...
[ "and returns cars that have crossed it. Returns: List[Car]: List", "for cars. \"\"\" capacity: int = field(default=5) \"\"\"Set amount of", "the bridge and returns cars that have crossed it. Returns:", "behaviour of bridge in simulation. On can set specific length", "\"\"\"Bridge class simulating the behavi...
[ "= config self.bind_ip = config[\"main\"][\"bind_ip\"] self.bind_port = config[\"main\"][\"bind_port\"] PlexHttpHandler.stations =", "or contentPath.startswith('/devices/probe')) and (not self.config['main']['use_old_plex_interface'])): self.do_response(200, 'application/xml', templates['xmlRmgDeviceDiscover'].fo...
[ "html_template = loader.get_template(\"page-404.html\") return HttpResponse(html_template.render(context, request)) except: # noqa: E722", "from django.http import HttpResponse from django.template import loader @login_required(login_url=\"/login/\") def", "django import template from django.contrib.auth.decora...
[ "of paths to all files with the given filename extensions", "int16.\"\"\" if not issubclass(y.dtype.type, np.floating): raise ValueError(\"input samples not floating-point\")", "the question: Is the given ndarray a multichannel waveform or", "root, dirs, filenames in os.walk(root_path): filenames = sorted(fil...
[ "if stack[-1] == \"{\": stack.pop() else: print(False) exit() if len(stack)", "len(stack) < 1: print(False) exit() if stack[-1] == \"(\": stack.pop()", "else: print(False) exit() if len(stack) == 0: print(True) else: print(False)", "stack.pop() else: print(False) exit() elif i == \"]\": if len(stack)", "2 =...
[ "display(HTML(html)) def render_content(self, key): data = self.content.get(key) id = JupyterSlides.randomUUID()", "= self.base_template_dir html = html_loader( f'file:{template_dir}/{template}.html') if render_type == 'slide':", "}}\" class=\"slide-container\">' + \\ html + '</div>' tm = Template(html)", "= ...
[ "3 * 1000)}]) decode = bitcoind.rpc.decoderawtransaction(prep['unsigned_tx']) assert decode['txid'] == prep['txid']", "Invalid witness version with pytest.raises(RpcError): l1.rpc.withdraw('BC13W508D6QEJXTDG4Y5R3ZARVARY0C5XW7KN40WF2', 2 * amount) #", "* 10) / 10**8 - Decimal(0.0003) assert decode['vout'][0]['sc...
[ "transfer=cn.TRANSFER_DEFAULT, other_transfer=None, is_difference_frac=False, is_differenced=False, is_center_colorbar=True, is_compress=False, parms=PlotParms(), **kwargs): \"\"\" Constructs", "self._plotSiglvlDF(transfer=transfer, other_transfer=other_transfer, max_siglvl=max_siglvl) self._plotTransferCompare(d...
[ "[0, 128, 0], [128, 128, 0], [0, 0, 128], [120,", "from scipy.misc import imread from args import get_args import matplotlib.pyplot", "2.0 (the \"License\"); # you may not use this file", "'encoded/') for filename in os.listdir(data_dir+'SegmentationClass/'): if os.path.isdir(data_dir+'SegmentationClass/' + f...
[ "args, so that it's saved in checkpoints args.source_lang, args.target_lang =", "MultiprocessingTrainer(args, model) # Load the latest checkpoint if one is", "+ ' | valid loss {:2.2f} | valid ppl {:3.2f}'", "training in {:.1f} seconds'.format(train_meter.sum)) # Generate on test set and", "in sample) loss =...
[ "msg in getIterable(messages): if isinstance(msg, list): for elt in msg:", "one or more message objects per message type. \"\"\" return", "getIterable(messages): if isinstance(msg, list): for elt in msg: accum_time +=", "raise Exception(\"Unknown type '\" + str(type(dict_or_list)) + \"'\") return iterable", ...
[ "not exist in settings.' self.stdout.write(not_exist) return errors = self._jsonschema_errors if", "json class Command(BaseCommand): can_import_settings = True @property def _jsonschema_exist(self): from", "can_import_settings = True @property def _jsonschema_exist(self): from django.conf import settings", "h...
[ "showmax[i]) ss = ss.format(x[ii]) #\"%0.0f %s\" % (x[ii], showmax[i]) cv2.putText(z,ss,(int(xx[ii]),int((yy[ii]))),", "= ss.format(x[ii]) #\"%0.0f %s\" % (x[ii], showmax[i]) cv2.putText(z,ss,(int(xx[ii]),int((yy[ii]))), cv2.FONT_HERSHEY_PLAIN,2,col) try:", "imshow(root,args,kwargs): image = cv2.cvtColor(output...
[ "a training corpus, using one of the TaggerTrainers available. \"\"\"", "# based on previous (nltk2) version by # <NAME>, <NAME>,", "Templates ###################################################################### @jsontags.register_tag class Word(Feature): \"\"\" Feature which examines the", "the positions w...
[ "logger.info(f\"Truncating to {max_data_samples} samples.\") # sentence text sentences = []", "sys import numpy as np import torch from task_config import", "* len(token_ids) # Generate mask where 1 for real tokens", "st = len(\" \".join(tokens[:span_index])) + 1 if span_index != 0", "ed = st + len(char_in_...
[ "len(self.tokens), \"words\": words } def positivity(self): hits = 0 words", "< 0: hits -= score words.append(word) return { \"score\": hits,", "[\"Simplimental\"] class Simplimental: def __init__(self, text=\"This is not a bad", "Simplimental: def __init__(self, text=\"This is not a bad idea\"): self.text", ...
[ "# Using for relative joint motion smoothing (0: No, 1:", "robot machining project manually or using the API. # #", "of iterations \"Tol\": 0.0016, # Tolerance to stop iterations #", "json_str = json.dumps(json.dumps(ToUpdate)) status = robot.setParam(\"OptimAxes\", json_str) print(status) # Full", "\"AbsOn...
[ "as grammar_file: self.G = Grammar(grammar_file.read()) self.assertDictEqual( {'E': {('E', '+', 'T'),", "( E ) F -> id\"\"\", \"\"\"E -> E ^", "id\"\"\"] with self.assertRaises(ValueError): Grammar(self.grammar_str[0]) with self.assertRaises(ValueError): Grammar(self.grammar_str[1]) if __name__ ==", "* F | F ...
[ "('result', models.CharField(max_length=40)), ('timecontrol', models.CharField(max_length=40)), ('timestamp', models.DateTimeField()), ('raw', models.TextField()), ('opening', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,", "initial = True dependencies = [ ] operations = [", "Django 3.1 on 2020...
[ "else 1, key=world.Get_rank()) if world.Get_rank() < num_workers: volume = np.array(x_shape).prod()", "key=world.Get_rank()) if world.Get_rank() < num_workers: volume = np.array(x_shape).prod() x =", "torch.tensor([[0, 1], [4, 5]]) elif comm.Get_rank() == 1: x =", "= torch.tensor([[0, 1], [4, 5]]) elif comm.G...
[ "1)} for pos in costs.keys(): for crab in positions: distance", "((distance * distance) + distance) // 2 print(f\"Day 07: {min(costs.values())}\")", "[int(x) for x in infile.readline().strip().split(',')] min_x = min(positions) max_x =", "positions = [int(x) for x in infile.readline().strip().split(',')] min_...
[ "re def int2ordinal(n): # partially based on https://stackoverflow.com/questions/9647202/ordinal-numbers-replacement if (type(n)", "[idx] idx = [n for n in idx if n", "safe filter such that if one of the idx is", "if one of the idx is not found, they are", "= [idx] idx = [n for n in idx if", "re.findall('...
[ "gameObjs.UpDownButton OptionsScreen_RandomWindowTitle = gameObjs.UpDownButton OptionsScreen_NumberFormatting = gameObjs.UpDownButton ElementsX = 0", "OptionsScreen_NumberFormatting global ElementsX global ElementsY if OptionsScreen_DebugModeEnabled .ButtonState == 2", "if not current_val: gameMain.DefaultCnt.W...
[ "from robotpy_ext.control.toggle import Toggle from robotpy_ext.misc.precise_delay import NotifierDelay class FakeJoystick:", "= False def test_toggle(): joystick = FakeJoystick() toggleButton = Toggle(joystick,", "toggleButton.off assert toggleButton2.on def test_toggle_debounce(): # TODO: use simulated time",...
[ "match when testing floating point values def test_linear(self): f =", "feed_dict={x:0.5}), 0.4621, places=TestActivations.PLACES) # Case 3 self.assertAlmostEqual(sess.run(f(x), feed_dict={x:-0.25}), -0.2449, places=TestActivations.PLACES)", "x: tflearn.leaky_relu(x, alpha=0.2) x = tf.placeholder(tf.float32, sh...
[ "# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law", "OF ANY # KIND, either express or implied. See the", "if __name__ == \"__main__\": success = True try: subprocess.run('cd /root;", "Software Foundation (ASF) under one # or more contributor license", "more contributor li...
[ "# # 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 WARRANTIES OR CONDITIONS OF", "2.0 (the \"License\"); # you may not use th...
[ "from django.db.utils import IntegrityError from apps import core_articleviewedby_mdb from core.models", "utopia-cms 2020. <NAME>. from django.core.management import BaseCommand from django.db.utils import", "except ArticleViewedBy.DoesNotExist: try: ArticleViewedBy.objects.create( article_id=mdb_view['article'...
[ "out = self.relu(out) out_b3p8 = self.block3(out) # tensor_stride=16 out =", "= self.block2(out) out = self.conv3p4s2(out_b2p4) out = self.bn3(out) out =", "BLOCK = BasicBlock LAYERS = (2, 2, 2, 2, 2,", "self.conv4p8s2(out_b3p8) out = self.bn4(out) out = self.relu(out) out = self.block4(out)", "has_bias=Tru...
[ "from setuptools import setup setup( name='nginx-access-tailer', version='0.1', author='swfrench', url='https://github.com/swfrench/nginx-tailer', packages=['nginx_access_tailer',],", "version='0.1', author='swfrench', url='https://github.com/swfrench/nginx-tailer', packages=['nginx_access_tailer',], license='BSD...
[ "# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law", "\"path\": \"/cmk/tests/data/config/minimal\", \"pools\": { \"exclusive\": { \"cpuLists\": { \"0\": {", "\"cpuLists\": { \"0-2,8-10\": { \"cpus\": \"0-2,8-10\", \"tasks\": [ 3000, 3001,", "# # Licensed under the Apache Lic...
[ "os.pardir))) with open('requirements.txt') as f: install_requires = f.read().splitlines() setup( name='persistent-celery-beat-scheduler',", "run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) with open('requirements.txt') as f:", "import os from setuptools import f...
[ "Constants.END_LINE) with self.assertRaises(driver.DriverServerException): self.client.set('testkey', 'testvalue', 0, False) def test_set_value_with_client_error_response(self): self.mock.receive_buffer.append(Errors.CLIENT_ERROR", "self.closed = True self.socket = None self.send_buffer = collections.deque() self...
[ "= (366/Loan_Status)*100 # code ends here # -------------- # code", "-------------- # Import packages import numpy as np import pandas", "Loan_Status = 614 percentage_se = (56/Loan_Status)*100 percentage_nse = (366/Loan_Status)*100 #", "#code ends here # -------------- # Code starts here avg_loan_amount", "...
[ "= EvalEnvironment.capture() data = {\"X\" : [0,1,2,3], \"Y\" : [1,2,3,4]}", "import (EvalEnvironment, dmatrix, build_design_matrices, PatsyError, Origin) def test_issue_11(): # Give", "PatsyError, Origin) def test_issue_11(): # Give a sensible error message", "from patsy import (EvalEnvironment, dmatrix, bui...
[ "1 if img_num is not None: break if hasattr(image, 'fp')", "the file is not readable image.getdata()[0] except IOError as e:", "file is not readable image.getdata()[0] except IOError as e: site", "format_str = \"PNG\" arr = np.asanyarray(arr) if arr.dtype.kind == 'b':", "= shape[::-1] else: frame = np.array...
[ "- S1/Keq1))/(1 + X0 + S1 + S4^h); J1: S1", "(1 + S1 + S2); J2: S2 -> S3; (10", "0; S2 = 0; S3 = 0; S4 = 0;", "''' model feedback() // Reactions: J0: $X0 -> S1; (VM1", "X0 = 10; X1 = 0; // Variable initialization: VM1", "J0: $X0 -> S1; (VM1 * (X0 - S1/Keq1))/(1 +", "10; V4 = 2.5; KS4 = 0.5; end''' r =",...
[ "from .transactions import Transaction, TransactionCreate, TransactionUpdate from .accounts import Account,", "Transaction, TransactionCreate, TransactionUpdate from .accounts import Account, AccountList, AccountSingle, AccountCreate,", ".accounts import Account, AccountList, AccountSingle, AccountCreate, Accou...
[ "pass class Bar(Foo): def __init__(self): super(Bar, self).__init__() # [super-with-arguments] class", "exception would be 'RuntimeError: super(): __class__ cell not found') #", "be 'RuntimeError: super(): __class__ cell not found') # Instead, we", "not found') # Instead, we expect to *not* see a", "class B...
[ "categories = ['<'+str(x) for x in range(2,22,2)] df1 = df", "train_test_split from sklearn.preprocessing import LabelEncoder from sklearn.ensemble import RandomForestClassifier from", "since Promotion\", ylabel=\"Total\") plt.xticks(rotation=-30) plt.savefig('templates/graphs/raw/YSCPvsAttr.png') ax = sns.coun...
[ "Imports and aliases import pickle import torch as t import", "A_labels, C_train, C_val, C_test, N = ehf.load_data(data_loc, mat_f_name, S_train, S_val,", ".78, .79, .80, .81, .82, .83, .84, .85, .86, .87,", "precision_test, recall_test, f1_test, loss_test] elif eval_type == \"MAP-MRR\": ep_acc_loss[ep] =", ...
[ "alpha=0.93, activation_func='multiquadric', regressor=linear_model.Ridge(), random_state=21398023) cls.fit(train_x, train_y) # Evaluate model print", "'rb') as f: return cPickle.load(f) def get_datasets(data): _train_x, _train_y =", "ELM cls = ELMClassifier(n_hidden=7000, alpha=0.93, activation_func='multiquad...
[ "as msg: print(msg); sys.exit(1) while 1: conn, addr = sock_self.accept()", "= bob.send_cipher_key() sock_with_kdc.send(bob_cipher_key_packet.encode()) kdc_bob_cipher_key_packet = sock_with_kdc.recv(1024).decode() print(kdc_bob_cipher_key_packet) bob.process_packet(kdc_bob_cipher_key_packet) except socket.error",...
[ "net.module.cuda() with open(os.path.join(config.out_dir, \"config.pickle\"), 'wb') as outfile: pickle.dump(config, outfile) with", "Results storage -------------------------------------------------------------- if config.restart: if not taking_best: next_epoch =", "if taking_best: opt_path = os.path.join(confi...
[ "sa.Column(\"updated_at\", sa.DateTime(), nullable=True), sa.ForeignKeyConstraint( [\"job_id\"], [\"jobs.id\"], ), sa.PrimaryKeyConstraint(\"id\"), ) op.create_index(op.f(\"ix_job_statistics_job_id\"),", "nullable=True), sa.ForeignKeyConstraint( [\"job_id\"], [\"jobs.id\"], ), sa.PrimaryKeyConstraint(\"id\"), ) o...
[ "def test_remove_from_confirmed_user(self): # drift defaults to 0. Change it so", "self.user_settings.totp_drift = 1 self.user_settings.save() self.user.delete_addon('twofactor') self.user_settings.reload() assert_equal(self.user_settings.totp_drift, 0) assert_is_none(self.user_settings.totp_secret) assert_false(...
[ "<filename>betterloader/standard_transforms.py import numpy as np from torchvision import transforms np.random.seed(1)", "def __init__(self, transform): self.transform = transform def __call__(self, sample): x1", "TransformWhileSampling(object): def __init__(self, transform): self.transform = transform def __ca...
[ "net.state_dict(), 'optim': optim.state_dict(), 'scheduler': scheduler.state_dict(), 'recorder': recorder.state_dict(), 'epoch': epoch },", "model_dir = os.path.join(recorder.work_dir, 'ckpt') os.system('mkdir -p {}'.format(model_dir)) epoch = recorder.epoch", "from: ' + finetune_from) load_network_specified(ne...
[ "AppConfig #pragma: no cover class HexafuelOilAppConfig(AppConfig): #pragma: no cover name", "no cover class HexafuelOilAppConfig(AppConfig): #pragma: no cover name = 'hexafuel_oil_app'", "import AppConfig #pragma: no cover class HexafuelOilAppConfig(AppConfig): #pragma: no cover", "django.apps import AppConf...
[ "matrix to list for ease a = np.array(a).tolist() #print(a) #creates", "+ matchAnchor(posting,candidate) +matchLocation(posting,candidate) + matchCompetency(posting,candidate) + matchSkill(posting,candidate)+matchCohort(posting,candidate)) n += 1", "= [] m = Munkres() indexes = m.compute(totalMatrix) #print_mat...
[ ":: Python :: 3.7\", \"Programming Language :: Python :: Implementation", "f: return f.read() META_FILE = read(META_PATH) def find_meta(meta): \"\"\"Extract __*meta*__", "Build an absolute path from *parts* and and return the", ":: 3\", \"Programming Language :: Python :: 3.3\", \"Programming Language", "En...
[]
[ "imp import importlib def load(name, path): \"\"\"Load and initialize a", "return its module object\"\"\" if hasattr(importlib, \"machinery\"): loader = importlib.machinery.SourceFileLoader(name,", "and initialize a module implemented as a Python source file", "__all__ = [\"load\"] import imp import importlib...
[ "SVGenPlugin): @classmethod def bind(cls): cls.registry['svgen']['module_namespace'][sieve] = SVGenSieve cls.registry['svgen']['flow'].insert( cls.registry['svgen']['flow'].index(svgen_inst), CollapseSievesVisitor)", "left for this sieve remove # this Sieve completely (with", "node.in_ports[0] if pin.dtype == p...
[ "end_index, freq): print(\"load\", self._name, instrument, start_index, end_index, freq) return raw_data.loc[start_index:end_index][self._name]", "exprs: expression = eval(my_parse_field(field)) series = expression.load('TSLA', \"2022-01-02\", \"2022-02-28\", \"1min\")", "qlib.data.base import Feature from pyec...
[ "fastapi import APIRouter router = APIRouter() @router.get(\"/\") def working(): return", "from fastapi import APIRouter router = APIRouter() @router.get(\"/\") def working():", "import APIRouter router = APIRouter() @router.get(\"/\") def working(): return {\"Working\"}" ]
[ "best_t = 0 for epoch in range(nb_epochs): model.train() optimiser.zero_grad() idx", "= 1 nb_epochs = 10000 patience = 20 lr =", "import networkx as nx import time from embed_methods.dgi.models import DGI,", "numpy as np import scipy.sparse as sp import torch import", "sp.lil_matrix(np.matrix(features)) fea...
[ "root of the repository os.chdir(os.path.abspath(os.path.join(THIS_FILE_DIRECTORY, \"..\", \"..\"))) deploy_binaries(args.version) if __name__", "os.path.dirname(os.path.realpath(__file__)) GH_REPO_IDENT = \"ETCLabs/RDMnet\" GH_USERNAME = \"svc-etclabs\" GH_API_TOKEN = os.getenv(\"SVC_ETCLABS_REPO_TOKEN\")", "t...
[ "losses. Default is 1000.0. \"\"\" if spectrum_in is None: return", "assert isinstance(precursor_mz, (float, int)), (\"Expected 'precursor_mz' to be a scalar", "is 0.0. loss_mz_to: Maximum allowed m/z value for losses. Default", "add_losses(spectrum_in: SpectrumType, loss_mz_from=0.0, loss_mz_to=1000.0) -> Sp...
[ "definitions are parsed first and corresponding schema are created so", "and return the corresponding dict. :param item: An item from", "this item \"\"\" d = dict( name=item[0], type=self._get_type(item[1][\"type\"]), required=(item[0] in", ") schema_dict[DATASCHEMA].append(schema) return schema def _get_elem...
[ "as rf dir_ends_with_abc = rf.directory_pattern_predicate(\"abc$\") assert dir_ends_with_abc(\"/foo/bar/folder_abc/my_resource.txt\") assert not dir_ends_with_abc(\"/foo/bar/folder_def/my_resource.txt\")", "assert dir_ends_with_abc(\"/foo/bar/folder_abc/my_resource.txt\") assert not dir_ends_with_abc(\"/foo/bar/f...
[ "import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') def test_package(host):", "\"\"\" assert host.package('grafana').is_installed def test_service(host): \"\"\" Testing whether the service", "\"\...
[ "(self.numberOfFins * self.overallDiameter * self.finThickness))) # meter^2 # overall area", "the thin boundry layer of inner surface nnInFD = Nusselt", "ambAirTemp # kelvin hLoD = self.heatsinkLength / self.overallDiameter cDoD =", "(alternatively, fin depth) finThickness : thickness of individual fin cylind...
[]
[ "by a `~` its # length will be either 23", "sig): sig = base58.b58decode(sig) return verifier.verifyMsg(sig, MsgForSigning) def chkVerifyForRetrievedIdentity(signerWallet, verifierWallet,", "assert senderWallet.getSponsoredIdentity(idr).seqNo is None reqs = senderWallet.preparePending() senderClient.submitReqs(...
[ "isinstance(sp.grid, np.ndarray) assert isinstance(sp.interp_flux, np.ndarray) assert isinstance(sp.interp_bary_flux, np.ndarray) assert len(sp.grid)", "str) assert isinstance(sp.datetime, datetime.datetime) assert isinstance(sp.v_bary, float) assert isinstance(sp.wave_units, str)", "len(sp.interp_bary_flux) as...
[ "from swift.common.utils import listdir, quote # Used by hash_path to", "storage directory :param datadir: Base data directory :param partition: Partition", "of process restart before sweep completed shuffle(device_dir) for device in", "devices :param logger: a logger object ''' device_dir = listdir(devices)"...
[ "'vehicles8+': vehicles8p, 'vehiclesByTag': vehiclesByTag, 'mausTypeCompDescr': vehicles.makeVehicleTypeCompDescrByName('germany:G42_Maus'), 'vehiclesInTreesByNation': vehiclesInTreeByNation, 'vehiclesInTrees': vehiclesInTree,", "(Intel)] # Embedded file name: scripts/common/dossiers2/custom/cache.py import natio...
[ "p[3].children, p[1].TAC) p[0].TAC.append_TAC(p[3].TAC) return def p_TypeDecl(p): '''TypeDecl : TYPE TypeSpecTopList", "('right','ASSIGN_OP'), ('left','COMMA'), ('left','LSQUARE'), ('left','RSQUARE'), ('left','LCURLY'), ('left','RCURLY'), ('left','DDD'), ('left','DOT'), ('left','SEMICOLON'), ('left','COLON'),", ...
[ "in progressbar.progressbar(range(args.num_frames)): tg = n / (args.num_frames - 1) t", "red = im green = 1 - im blue =", "* args.height) cut_buf = ffi.new(\"double[]\", max_iter) fixed_seed = Random(1) for", "video duration\") args.aspect = args.width / args.height args.num_frames = int(args.video_duration",...
[ "QOS_1, QOS_2 from hbmqtt.adapters import BufferAdapter class SubscribePacketTest(unittest.TestCase): def test_from_stream(self):", "data = b'\\x80\\x0e\\x00\\x0a\\x00\\x03a/b\\x01\\x00\\x03c/d\\x02' stream = BufferAdapter(data) message = anyio.run(SubscribePacket.from_stream, stream)", "(topic, qos) = message....
[ "None state_dict_S = torch.load(args.init_checkpoint_S, map_location='cpu') state_weight = {k[5:]:v for k,v", "= None tokenizer = ChineseFullTokenizer(vocab_file=args.vocab_file, do_lower_case=args.do_lower_case) convert_fn = partial(convert_examples_to_features, tokenizer=tokenizer,", "#parameters params = lis...
[ "'trials': 2, 'max_timesteps': int(2e8), 'reward_floor': 0.0, 'reward_ceiling': 5000.0, }, {", "}, {'env_id': 'InvertedPendulum-v1', 'trials': 3, 'max_timesteps': 1000000, 'reward_floor': 5.6, 'reward_ceiling':", "163.9, 'reward_ceiling': 40000.0, }, { 'env_id': 'SeaquestNoFrameskip-v4', 'trials': 2, 'max_times...
[ "script was created for one time usage and has to", "use the same criteria as Kemker et al. Classes and", "tf import os import json from warnings import warn warn('The", "we only use samples which only belong to one of", "valid_idx] x_data = np.stack(x_data) ### Split into test and train", "1)[0] # Find s...
[ "'POST': try: code = status.HTTP_200_OK post = Post.objects.get(post_pk=post_pk) if 'title'", "paginator.get_page(page_number) serializer = PostSerializer(page_obj.object_list, many=True) return Response(serializer.data, code) @api_view(['GET', 'POST',", "comment.save() serializer = CommentSerializer(comment) e...
[ "0.2]], [[0.05, 0.1], [-0.9, 0.05]]]], dims = ('t','y','x','band'), reduce_by =", "return _construct @pytest.fixture def execute_array_element_process(generate_data): def wrapped(data_arguments={}, index=None, return_nodata=None): arguments", "({}, 5, [[[np.nan, np.nan], [np.nan, np.nan]]], ('t','y','x')), ]) d...
[ "], srcs: [ $nanobench_srcs ], data: [ \"resources/*\", ], }''')", "variable // or set enable_profile_use property to false. cc_defaults {", "to get the main source lists and include directories for", "defs['avx' ] + defs['hsw' ]), 'dm_includes' : bpfmt(8, dm_includes), 'dm_srcs'", "Turn a list of strings i...
[ "\"setting-up\" STATUS_UPDATE_FAILED = \"update-failed\" STATUS_UP_TO_DATE = \"up-to-date\" # Tag uniquely", "\"update-failed\" STATUS_UP_TO_DATE = \"up-to-date\" # Tag uniquely identifying all nodes", "the node TAG_RAY_NODE_NAME = \"ray-node-name\" # Tag for the kind", "used to determine if updates are neede...
[ "to have less land than before at the borders el_before", "/ n_cells_on_border def test_center_land(self): w = World.from_pickle_file(\"%s/plates_279.world\" % self.tests_data_dir) #", "@staticmethod def _mean_elevation_at_borders(world): borders_total_elevation = 0.0 for y in range(world.height):", "range(wo...
[ "= net(inputs.cuda()) assert output.shape == (2, 1) # pretrained should", "y1 = conv2d(x1) assert y1.shape == (3, 16, 16, 16)", "in_channels=3) net = build_component(cfg) net.init_weights(pretrained=None) # cpu inputs = torch.rand((2,", "# cpu inputs = torch.rand((2, 3, 128, 128)) output =", "def test_light...
[ "protocol not provided and cannot be determined automatically.' msg =", "if not provided try: self._connection_data['security_protocol'] except KeyError: username_given = 'sasl_plain_username'", "group_id=self.GROUP_ID, consumer_timeout_ms=1000, value_deserializer=lambda x: json.loads(x.decode(\"utf-8\")) ) log...
[ "self.fc4 = layers.Dense(num_classes) def call(self,inputs,training=None): out = self.conv1(inputs) out =", "return res_blocks def resnet18(): return ResNet([2, 2, 2, 2],num_classes=9) def", "conv1 = layers.Conv3D(filters_num[0], kernel_size=(3, 3, 7), padding='same')(input_layer) # filters_num =", "stride=1)...
[ "of the \"dynamic\" attribute through that error. In a well", "such error should not exist but getting there is very", "the code base, we can now switch back to `Exception`.", "can now switch back to `Exception`. :param base: return values", "because you can't distinguish if the property does not exist", ...
[ "file transition 5. Run Rapid update of master (trunk) and", "Workflow package transition 4. Run Manifest file transition 5. Run", "repo to repositories/admin \"\"\" import src.run_transition as rt import src.svn_dump_update", "rt.run_manifest_transition(config_file, new_svn_dump=True) return if __name__ == '...
[ "return self._is_hard_invalidated is False def is_soft_invalidated(self, timestamp): return self.was_soft_invalidated() and", "self.backend.get(key) if (value is NO_VALUE or value.metadata['v'] != value_version or", "backend. If you are using a :class:`.CacheBackend` or :class:`.ProxyBackend` that", "based on...
[ "import_module(version) montecarlo.simulatie(100,50) #Deze waarden dienen enkel als test if __name__", "waarden dienen enkel als test if __name__ == \"__main__\": simulatie()", "functie voert alle versies uit zodat deze vergeleken kunnen worden", "simulatie importeren en achtereenvolgens uitvoeren. version = ...
[ "self.assertEqual(decrypted.rstrip(b'\\x08'), self.secret_msg) def test_cbc_encrypt(self): data = bytes_to_intlist(self.secret_msg) encrypted = intlist_to_bytes(aes_cbc_encrypt(data,", "from haruhi_dl.aes import aes_decrypt, aes_encrypt, aes_cbc_decrypt, aes_cbc_encrypt, aes_decrypt_text from haruhi_dl.utils", ...
[ "in training_aps])) == 1 @pytest.mark.gpu @pytest.mark.notebooks def test_02_notebook_run(detection_notebooks, tiny_od_mask_data_path): notebook_path", "def test_02_notebook_run(detection_notebooks, tiny_od_mask_data_path): notebook_path = detection_notebooks[\"02\"] pm.execute_notebook( notebook_path, OUTPUT_NOT...
[ "optimizer # lr is set for a batch size of", "a batch size of 8 optimizer = dict(type='SGD', lr=0.0005, momentum=0.9,", "dict(grad_clip=dict(max_norm=35, norm_type=2)) # learning policy lr_config = dict( policy='step', warmup='linear',", "# learning policy lr_config = dict( policy='step', warmup='linear', war...
[]
[ "import numpy as np from os import path from sklearn", "pandas as pd import numpy as np from os import", "pytest import pandas as pd import numpy as np from", "pd import numpy as np from os import path from", "cognito.check import Check from cognito.table import Table import os import", "Table import os i...