ngram
listlengths
0
67.8k
[ "from scripts.helpful_scripts import get_account def fund(): fund_me = FundMe[-1] account = get_account() entrance_fee", "= FundMe[-1] account = get_account() fund_me.withdraw({\"from\": account}) def main(): fund() withdraw() if __name__", "fund_me.fund({\"from\": account, \"value\": entrance_fee}) def withdra...
[ "quatro alunos para apagar o quadro. Faça um programa que ajude ele, lendo", "mais um nome: ') nome4 = input('Digite o último nome: ') nome =", "ele, lendo o nome dos alunos e escrevendo na tela o nome do", "um nome: ') nome4 = input('Digite o último nome: ') nome = [nome1,", "quadro. Faça um programa que a...
[ "django.contrib import admin from .models import Categoria, Contact class ContactAdmin(admin.ModelAdmin): list_display = ('id',", ".models import Categoria, Contact class ContactAdmin(admin.ModelAdmin): list_display = ('id', 'name', 'last_name', 'phone', 'email',", "<filename>contacts/admin.py from django.contr...
[ "_root_folders_set = ( '/path/to/folder', ) _spoiler_for_each_file = True def process_one_pic(result_key, pic_path, tmp_dir): pic_url,", "file.split('.')[-1] not in ('jpg', 'jpeg', 'bmp', 'png'): continue file_path = os.path.join(root, file) pics_to_upload[file]", "def main(): for root_folder in _root_folders_s...
[ "import numpy as np from .postprocessor import PostprocessorWithSpecificTargets from ..representation import BrainTumorSegmentationAnnotation, BrainTumorSegmentationPrediction", "= self.get_value_from_config('min_value') self.max_value = self.get_value_from_config('max_value') if self.max_value < self.min_value: ...
[ "# # 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...
[]
[ "True if index == len(word) - 1: if not correct: print(\"Incorrect guess\") print()", "True count = 0 for letter in output: if letter != \"_\": count", "- 1)] playing = True tries = 5 return [words, output, word, tries,", "(EOFError, KeyboardInterrupt): print() break except ValueError: print(\"Invalid guess\"...
[ "elasticsearch.helpers import bulk # create ES client, create index es = Elasticsearch(hosts =", "(res)) request_body = { \"settings\" : { \"number_of_shards\": 1, \"number_of_replicas\": 0 } }", "def corpus_iterator(): # filter out and collect text files for file_path in glob.glob(txts_path+'*_text.txt'):", ...
[ "or some other piece of info \"\"\" class Token(object): def __init__(self, name, table):", "position, a game state, layer state, or some other piece of info \"\"\"", "represents a position, a game state, layer state, or some other piece of", "state, or some other piece of info \"\"\" class Token(object): def...
[]
[ "<= index_of_last_element: mid_point = nearest_mid( ordered_list, index_of_first_element, index_of_last_element, term ) if mid_point >", "return mid_point if term > ordered_list[mid_point]: index_of_first_element = mid_point + 1 else: index_of_last_element", "ordered_list, index_of_first_element, index_of_last_...
[ "models.DateTimeField(auto_now_add=True) project_description = models.CharField(max_length=255) project_level = models.IntegerField(default=0) objects = ProjectQuerySet.as_manager() def __str__(self): return", "= models.DateTimeField(auto_now_add=True) project_description = models.CharField(max_length=255) projec...
[ "\"/example_AdminPolicyDocument\" report = runner.run(root_folder=test_files_dir, runner_filter=RunnerFilter(checks=[check.id])) summary = report.get_summary() self.assertEqual(summary['passed'], 2, f\"Passed checks: {[fc.file_path", "= current_dir + \"/example_AdminPolicyDocument\" report = runner.run(root_folde...
[ "elif opt == \"--unicode-rtlo\": mpSession.unicodeRtlo = arg elif opt in (\"-G\", \"--generate\"): mpSession.outputFilePath", "import init from termcolor import colored # {PyArmor Protection Code} # {PyArmor Plugins}", "common.utils import MSTypes from common.definitions import VERSION, LOGLEVEL if sys.platform...
[ "os MODELS_PATH = os.path.join(os.path.dirname(__file__), \"models\") YOLO_SIZE = 288 YOLO_TARGET = 9 CORRECTOR_SIZE =", "MODELS_PATH = os.path.join(os.path.dirname(__file__), \"models\") YOLO_SIZE = 288 YOLO_TARGET = 9 CORRECTOR_SIZE = 50", "import os MODELS_PATH = os.path.join(os.path.dirname(__file__), \"mod...
[ "in ' + bulk_dir) sources = config['sources'] for (source_name, source) in sources.items(): source_bulk_dir", "{} Elasticsearch documents.\\n\" \"=> Check the logs ({}) for more details.\" .format(source_name, log_file))", "logger) index_by_document[document_type] = base_index_name, index_name logger.info(\"Bul...
[ "`_as_mpl_axes` : Return the result of calling cartopy's ``_as_mpl_axes`` for `self.load` called with", "latitude.\"\"\" filter_ = {'central_latitude'} PlateCarree,\\ LambertCylindrical,\\ Mercator,\\ Miller,\\ Mollweide,\\ Robinson,\\ Sinusoidal,\\ InterruptedGoodeHomolosine,\\ Geostationary,\\", "Returns ----...
[ "def handle_request(self, **kwargs): kwargs.update({'provider': 'att'}) return super(ATTStoresHandler, self).handle_request(**kwargs) def get_url(self, **kwargs): lat =", "'att'}) return super(ATTStoresHandler, self).handle_request(**kwargs) def get_url(self, **kwargs): lat = float(kwargs.get('lat')) lon = float(...
[ "ano de nascimento de 7 pessoas e mostre quantas ja atingiram a maioridade", "a maioridade e quantas ainda não for c in range(1,8): p=int(input('Qual o ano", "ja atingiram a maioridade e quantas ainda não for c in range(1,8): p=int(input('Qual", "numero {} já é maior de idade'.format(c)) else: print('A pessoa...
[ "\"\"\" def SDE(front, values1, values2): shifted_dict = {} for i in front: shifted_dict[i]", "python3 # -*- coding: utf-8 -*- \"\"\" Provide function to calculate SDE distance", "<NAME> @date: 2021/05/05 \"\"\" def SDE(front, values1, values2): shifted_dict = {} for i", "SDE distance @auth: <NAME> @date: 202...
[ "import * from airtest.cli.parser import cli_setup # from douyin import * if not", "-*- __author__ = \"pscly\" from airtest.core.api import * from airtest.cli.parser import cli_setup #", "sleep(5) swipe((484, 1711),(531,709)) print(\"-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=...
[ "sleep 2\"'.format(in_log) c = client.create_container(image=TEST_IMAGE_UUID, command=cmd) c = client.wait_success(c) logs = c.logs() return", "logs, in_log, c def test_logs_token(client): logs, in_log, c = get_logs(client) conn = ws.create_connection(logs.url", "= ws.create_connection(logs.url + '?token='+logs...
[ "-1) out = self.linear(out) return out def PsgSeedResNet20( num_classes=10, init_method='standard', predictive_backward=True, msb_bits=4, msb_bits_weight=4,", "MSB_BITS_WEIGHT, MSB_BITS_GRAD, THRESHOLD, SPARSIFY, SIGN PREDICTIVE_BACKWARD = predictive_backward MSB_BITS = msb_bits MSB_BITS_WEIGHT =", "self.bn1 = ...
[ "import Row from snorkel.labeling.lf import labeling_function from snorkel.labeling.lf.nlp_spark import spark_nlp_labeling_function from snorkel.preprocess import", "def article_mentions_person(x): for ent in x.doc.ents: if ent.label_ == \"PERSON\": return ABSTAIN return", "ent.text.lower() in celebrity_knowled...
[ "return is 2*cos(pi*(u+1)/(2N)), 2*sin(pi*(u+1)/(2N)) \"\"\" neg_pik_by_2N = torch.arange(1, N+1, dtype=dtype, device=device) neg_pik_by_2N.mul_(np.pi/(2*N)) #", "idct_N(x, expk=None): N = x.size(-1) if expk is None: expk = get_expk(N, dtype=x.dtype,", "x.size(-1) if expk is None: expk = get_expk(N, dtype=x.dty...
[ "for (rowCount, colCount, hex_key, timeoutSecs, distribution) in tryList: NUM_CASES = h2o_util.fp_format() for sel", "automatically\" parseResult = h2i.import_parse(path=csvPathname, schema='put', hex_key=selKey2, timeoutSecs=timeoutSecs, doSummary=False, parser_type='SVMLight') print csvFilename, 'parse time:',"...
[ "\"\"\" for enum in Datatype: if(enum is Datatype.TIMESTAMP): continue if(isinstance(value, enum.value)): return enum", "-> Table: \"\"\"Aquire a instance of a predefined table, returns a empty table", "ValueError(\"need retention policy duration for creation\") if(not replication): raise ValueError(\"need rete...
[ "permission. \"\"\" from sleekxmpp.plugins.xep_0009.remote import Endpoint, remote, Remote, \\ ANY_ALL import threading class", "LICENSE for copying permission. \"\"\" from sleekxmpp.plugins.xep_0009.remote import Endpoint, remote, Remote, \\ ANY_ALL", "@remote def get_temperature(self): return self._temperatur...
[ "int(result) def get_speed(self): \"\"\" return: int, [10, 100] \"\"\" return self.get('speed?') def get_battery(self):", "{} self.lock = threading.RLock() def recv(self, data): with self.lock: self.response = {item.split(':')[0]:float(item.split(':')[1]) for", "import cv2 import time import socket import threa...
[ "e.g. # # >>> import terrascript.resource.sematext # # instead of # # >>>", "This is only available for 'official' and 'partner' providers. from terrascript.resource.sematext.sematext import *", "# instead of # # >>> import terrascript.resource.sematext.sematext # # This is only", "import terrascript.resource...
[ "time, csv import tqdm import umap import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt", "0 self.model.summary() def eval(self): self.data = net.FontData() print(\"Plot: \", self.init_epoch + 1) acc", "pbar.update(1) acc = correct_count / (correct_count + failed_count) txt.write('===========...
[ "graph_parser.get_all_nodes(dag_description_) container_info = [] proxy_info = [] backup_info = [] count = 1", "b and b['stream'] != '\\n': #log build steps only self.logger.info(b['stream'].rstrip()) self.logger.info(\"Pushing model Docker", "includes the query and management frontend Docker containers and all...
[ "range(self.n): if temp[i][j]==1: temp[j][i]=1 elif temp[j][i]==1: temp[i][j]=1 for i in range(self.n-1): if i==0:", "connected self.loop = loop self.trim = trim if directed==True and connected=='weak' and loop==False:#弱连通有向无环", "= (i, j) self.edges.append(e) \"\"\"检查图的弱连通性\"\"\" def CheckWeakConnectivity(self)...
[ "<filename>csv2googlesheets/to_google_sheets.py \"\"\"This module provides a console interface to convert CSV to Google Sheets.\"\"\"", "import build_spreadsheet_title from csv2googlesheets.parse_file import parse_file from csv2googlesheets.parse_cli_args import parse_cli_args def main(): \"\"\"Control", "main(...
[ "import get_model from netforce import migration from netforce import database class Migration(migration.Migration): _name=\"account.credit_remain_cur\"", "_version=\"2.5.0\" def migrate(self): db=database.get_connection() db.execute(\"UPDATE account_invoice SET amount_credit_remain_cur=amount_credit_remain WHERE...
[ "'aix-%s.%s' % (platform.version(), platform.release()) if os_name != 'linux': return process_capabilities.os_name # We delay", "pool. if reactor.threadpool: if ( reactor.threadpool.working or (reactor.threadpool.q.qsize() > 0) ): time.sleep(0.01) have_callbacks", "found no result instead\" % ( deferred,)) elif...
[ "class Snowflake: def __init__(self, init_serial_no=0): self.machine_id = 0 self.epoch = 0 self.serial_no =", "init_serial_no=0): self.machine_id = 0 self.epoch = 0 self.serial_no = init_serial_no def generate(self): unique_id", "* 1000) - self.epoch) & 0x1FFFFFFFFFF) << 22 | (self.machine_id & 0x3FF) <<", "=...
[]
[ "model for 60 epochs for epoch in range(1, 60): print(f'Epoch: {epoch}') model.fit(x, y,", "sys.stdout.write(generated_text) # Generates 400 characters, starting from the seed text for i in", "np.argmax(probas) # Text-generation loop import sys import random # Trains the model for", "for i in range(400): samp...
[ "from pyanom.structure_learning import GraphicalLasso return GraphicalLasso def _makeOne(self, *args, **kwargs): return self._getTarget()(*args, **kwargs)", "-0.572139833, 0.858932219], [-1.125947228, -1.049026454, 0.35980022], [0.653070988, -0.052417831, 0.787284547], [-1.059131881, 1.621161051, -1.295306533], [...
[ "sine_node = Node(id=\"sine_node\") sine_node.parameters.append(Parameter(id=\"amp\", value=3)) sine_node.parameters.append(Parameter(id=\"period\", value=0.4)) s1 = Parameter( id=\"level\", default_initial_value=0, time_derivative=\"6.283185", "= Parameter( id=\"rate\", default_initial_value=1, time_derivative=\...
[ "= g.V().limit(1000) message = RequestMessage('traversal', 'bytecode', {'gremlin': t.bytecode, 'aliases': {'g': 'g'}}) result_set =", "for result in result_set: results += result assert len(results) == 1 t =", "len(results) == 6 assert isinstance(results, list) assert results_set.done.done() assert 'host' in re...
[ "from ..load.download import _ERASESTR def xmatch(cat1,cat2,maxdist=2, colRA1='RA',colDec1='DEC',epoch1=None, colRA2='RA',colDec2='DEC',epoch2=None, colpmRA2='pmra',colpmDec2='pmdec', swap=False, col_field=None): \"\"\" NAME:", "return (m2,m1,d2d[mindx]) else: return (m1,m2,d2d[mindx]) def cds(cat,xcat='vizier:I/...
[ "* q_tp1_best_one_hot_selection, 1) q_probs_tp1_best = torch.sum( q_probs_tp1 * torch.unsqueeze(q_tp1_best_one_hot_selection, -1), 1) else: q_tp1_best_one_hot_selection", "ray.rllib.utils.framework import try_import_torch from ray.rllib.utils.torch_ops import (FLOAT_MIN, huber_loss, reduce_mean_ignore_inf, softma...
[]
[ "= 4.0 return sum / argumente print(keskmine(1, 2)) # Ilmselgelt vale tulemus (1.5", "lubab muutuja otse stringi sisse panna else: print(f\"{n} EI OLE algarv\") def list_primes(max_num", "jagatava teha float tüübiks print(numsum(1)) print(numsum(1, 2)) print(numsum(1, 2, 3)) print(numsum(1, 2, 3,", "num4) arg...
[ "comment reads that the # command \"echo \"hello\"\" was run. This ensures that", "of run_watch ''' def setUp(self): self.state_name = 'run_watch' state_filename = self.state_name + '.sls'", "the integration test file state tree. pass super(CMDRunRedirectTest, self).tearDown() def test_run_unless(self): ''' tes...
[ "# # Licensed under the Apache License, Version 2.0 (the \"License\"); # you", "writing, software # distributed under the License is distributed on an \"AS IS\"", "...lib.sparse import SparseNDArray from ...lib.sparse.core import sps from ..expressions import datastore from .utils", "SparseNDArray from ...lib...
[ "zip(layer_sizes[:-1], layer_sizes[1:])]) self.output_layer = Linear(hidden_sizes[-1], output_size, bias=True) self.act = activation[act_func] self.train_alg=train_alg # list", "x): x = x.view(-1, self.input_size) out = x for layer in self.linears: out", "layers - output_size: an integer, the length of output v...
[ "accumulate(add, 11, 0, identity) # 11 11 >>> accumulate(add, 11, 3, square) #", "Church numerals m and n. >>> church_to_int(add_church(two, three)) 5 \"\"\" \"*** YOUR CODE", ">>> church_to_int(two) 2 >>> church_to_int(three) 3 \"\"\" \"*** YOUR CODE HERE ***\" return", "function zero times! 5 \"\"\" \"*** Y...
[ "pair\"\"\" ciphertext_name = str(uuid.uuid4()) ciphertext_uri = ciphertext_writer(ciphertext_name, ciphertext_to_decrypt) return ( ciphertext_name, MessageDecryptionTestScenario( ciphertext_uri=ciphertext_uri,", "MessageEncryptionTestScenario from awses_test_vectors.manifests.keys import KeysManifest try: from a...
[ "class TestStartStopFeature(WatchdogAcceptanceTest): def test_willStartObserverWhenWatchdogStarted(self): self.create_and_start_watchdog() self.assertTrue(self.fs_observer.running) def test_willStopObserverWhenWatchdogStopped(self): self.create_and_start_watchdog() self.watchdog.stop() self.assertFalse(self.fs_obse...
[ "test for all transforms.\"\"\" def assert_tensor_is_good(self, tensor, shape=None): self.assertIsInstance(tensor, torch.Tensor) self.assertFalse(torch.isnan(tensor).any()) self.assertFalse(torch.isinf(tensor).any()) if", "self.assertEqual(logabsdet, torch.zeros(inputs.shape[:1])) def assertNotEqual(self, first, ...
[ "https://portswigger.net/web-security/file-path-traversal/lab-validate-file-extension-null-byte-bypass \"\"\" import sys import requests site = sys.argv[1] if 'https://' in site:", "if 'https://' in site: site = site.rstrip('/').lstrip('https://') url = f'''https://{site}/image?filename=../../../etc/passwd%00.png...
[ "args.resume: resume_step, ckpt_file = resume(save_path) # initial the EUG algorithm eug = EUG(batch_size=args.batch_size,", "open(osp.join(save_path, 'dataf.txt'), 'a') # 保存性能数据. #特征空间中的性能问题. data_file = open(osp.join(save_path, 'data.txt'), 'a') # 保存性能数据.", "import DistributedDataParallel as DDP from torch.ut...
[ "distributed on an # \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY", "# Copyright (C) 2019 by eHealth Africa : http://www.eHealthAfrica.org # # See the", "# See the NOTICE file distributed with this work for additional information #", "@pytest.mark.unit def test__get_es_index_from_autoconfig(Subscr...
[]
[ "= ('p', 'r', 'o', 'g', 'r', 'a', 'm', 'i', 'z') # Output: ('p',", "= [1, 3, 5] odd.append(7) print(odd) odd.extend([9, 11, 13]) print(odd) # In[13]: #", "and function # In[18]: y_dict = {} # dictionary with integer keys my_dict", "lines String_var = \"\"\" This document will help you to explore all the", "...
[ "pickingNumbers(a): # Write your code here max = 0 for i in a:", "Write your code here max = 0 for i in a: c =", "for i in a: c = a.count(i) d = a.count(i-1) e = c+d", "d = a.count(i-1) e = c+d if e>max: max = e return max", "0 for i in a: c = a.count(i) d = a.count(i-1) e =", "= a.count(i) d = a.count(i-...
[ "= self.api.auth(20, self.credit_card, self.address) self.assertEqual(urlopen.call_args[0][0], TEST_URL) self.assertTrue(urlopen.call_args[1]['data'], ( 'x_login=123&x_zip=90291&x_card_num=4111111111111111&' 'x_amount=20.00&x_tran_key=456&x_city=Venice&x_country=US&' 'x_version=3.1&x_state=CA&x_delim_char=%3B&' 'x_...
[ "\"inspections_summary\" : { \"date\": JST_current_time, \"data\": inspections_summary_list }, \"main_summary_history\": { \"date\": JST_current_time, \"data\":", "# 日付の昇順に並び替え # main_summary_history.csvをPandasのDataframeに変換 main_summary_history_df = pd.read_csv('data/main_summary_history.csv', keep_default_na=Fal...
[ "neg_ind, -1] = 1 return pos_indicator, matched_targets def matching_strategy_quads(targets, dboxes, **kwargs): \"\"\" :param", "4:] # overlaps' shape = (object num, default box num) overlaps = iou(centroids2corners(targets_loc),", "matched_targets: Tensor, shape = (batch, default box num, 4+class_num) includin...
[ "'CAR02': { 'x': 1383, 'y': 825, 'w': 80, 'h': 59 }, 'CAR04': {", "0.0) if curve == 0.0: if cv_s: tht_d = self.cv_to_engl(cv_l, rad) #tht +=", "for i, info in enumerate(sprts): sprt = info['name'] obj_k = str(seg['index']) + '_'", "render road sprites # TODO: check if this seg is looped seg_scale =", "self....
[ "Interface: FastEthernet1, Port ID (outgoing port): FastEthernet0/14 Holdtime : 145 sec Version :", "IGMP Interface: FastEthernet1, Port ID (outgoing port): FastEthernet0/15 Holdtime : 145 sec Version", "I 881 Fas 1 R3 Fas 0/13 129 R S I 881 Fas", "- Source Route Bridge S - Switch, H - Host, I - IGMP,", "(c...
[ "with respect to x[j]. Parameters ---------- fun : callable Function of which to", "as np from numpy.linalg import norm from scipy.sparse.linalg import LinearOperator from ..sparse import", "to estimate the derivatives. Float will be converted to a 1-D array. method", "single array or a sparse matrix is inter...
[ "[x for x in raw_checkpoint_paths if '.ckpt' in x] assert raw_checkpoint_paths raw_checkpoint_path =", "Unless required by applicable law or agreed to in writing, software # distributed", "constructor \"\"\" # model = cls(config) # # # no matter how you", "import cloudpickle import pytest import torch from fs...
[ "shift_fn(R_scaled, dR), general_shift_fn(R, dR) * box_size) assert shift_fn(R_scaled, dR).dtype == dtype @parameterized.named_parameters(jtu.cases_from_list( {", "j, k], dtype=R.dtype) dr_shifted = space.distance(dR_shifted) dr_shifted = jnp.reshape(dr_shifted, dr_shifted.shape + (1,)) dR_direct", "Unless requ...
[ "import boto3 batch_client = boto3.client('batch') def lambda_handler(event, context): describe_response = batch_client.describe_jobs( jobs=[ event.get('jobId',", "boto3 batch_client = boto3.client('batch') def lambda_handler(event, context): describe_response = batch_client.describe_jobs( jobs=[ event.get('jobId...
[ "from werkzeug import check_password_hash, generate_password_hash from app import db, login_manager, pubnub, app, _callback", ": request.form['username']}) if existing_user: error = 'Username already exists' else: new_user = {'username'", "unauthorized_callback(): return redirect('/login') @login_manager.user_l...
[ "1.10.6 on 2017-04-06 06:02 from __future__ import unicode_literals from django.db import migrations, models", "), migrations.AlterField( model_name='article', name='project', field=models.TextField(editable=False), ), migrations.AlterField( model_name='article', name='source', field=models.TextField(blank=True, ...
[ "import unittest from coinplus_solo_redeem.common import wif_export_bitcoin, compute_public_key_sec256k1, address_from_publickey_ethereum class TestEthereum(unittest.TestCase): \"\"\"test of the", "(\"<KEY>\", \"<KEY>\"), (\"037049004c5ad576beb518dcc74506df3faf520109a489886b7d1435a63b9b0b88\", \"0x0af4DbEf58063AE...
[ "my_dict = {\"bobby1\": 22, \"bobby2\": 23, \"imooc.com\": 5} reversed_dict = {value:key for key,", "odd_list = [handle_item(i) for i in range(21) if i % 2 == 1]", "odd_list.append(i) # odd_list = [i for i in range(21) if i % 2", "# if i % 2 == 1: # odd_list.append(i) # odd_list = [i", "reversed_dict = {val...
[ "*priority* parameter. .. versionchanged:: 1.5.0 Renamed *priority* to *stream_types* and changed behaviour slightly.", "more than 2 alt streams if num_alts >= 2: continue elif num_alts >", "-= ALT_WEIGHT_MOD * int(match.group(7)) else: weight -= ALT_WEIGHT_MOD name_type = match.group(2) if name_type", "param...
[ "basedir os.environ[config.ENV_URL] = connect_url # Make sure to reset the database. yield CliRunner()", "free software; you can redistribute it and/or modify it under the # terms", "import os import pytest from click.testing import CliRunner from refdata.db import DB import", "= os.path.abspath(str(tmpdir)) ...
[ "= grid_cell[ :, jitter[1, i, j] : jitter[1, i, j] + patch_size, jitter[0,", "or numpy array. This transform was proposed in Jigsaw - https://arxiv.org/abs/1603.09246 Args: num_patches", "cropped properly\" # copy patch data so that all patches are different in", "properly\" # copy patch data so that all patc...
[ "host\" ) docker_task( \"jittor/jittor\", \"sudo docker build --tag jittor/jittor:latest . --network host\" )", "# This file is subject to the terms and conditions defined in #", "(c) 2022 Jittor. All Rights Reserved. # Maintainers: # <NAME> <<EMAIL>>. # #", "docker build --tag jittor/jittor:latest . --networ...
[ "my_parser.add_argument('--log-level') args = my_parser.parse_args() CliArgs.BankName = args.bank_name CliArgs.InputFilepath = args.input_filepath CliArgs.LogLevel = args.log_level", "my_parser.add_argument('--input-filepath') my_parser.add_argument('--log-level') args = my_parser.parse_args() CliArgs.BankName = ...
[ ":: OSI Approved :: Apache Software License\", \"Programming Language :: Python :: 3.7\",", "3.8\", \"Topic :: Scientific/Engineering\", \"Topic :: Scientific/Engineering :: Artificial Intelligence\", \"Topic :: Software", "plugin_requires = [ \"flytekit>=0.16.0b0,<1.0.0\", \"flytekitplugins-spark>=0.16.0b0,<1....
[ "input): size += 2 s_size = size * size bottom_right = s_size bottom_left", "> bottom_left): input_x = size - 1 input_y = input - bottom_left elif", "- 3 * size + 3 input_x = -1 input_y = -1 #", "(input > top_left): input_y = input - top_left input_x = 0 elif (input", "input - bottom_left elif (input > top_...
[ "display(self, prefix): res = prefix + self.name + \"\\n\" if hasattr(self.underlying_tree, \"children\"): for", "return self.underlying_tree(*x) * self.weight + self.bias def __len__(self): return len(self.underlying_tree) def display(self, prefix):", "tree in ind.trees] ) @staticmethod def from_pickled_indivi...
[ "'next' in request.args: next = request.args['next'] form = LoginForm(request.form) # make sure data", "email or password', 'danger') return render_template(\"login.html\", form=form, next=next) @mod.route('/logout/', methods=['GET', 'POST']) @requires_login def", "session can't be modified as it's signed, # it...
[ "sr.Recognizer() with sr.Microphone() as source: print(\"Listening...\") r.pause_threshold = 1.5 # It will wait", "Edition 2021\" os.startfile(pycharmpath) #elif \"open command\" in query: # filelocation = \"path of", "sentence speak(\"According to wikipedia\") #print(results) speak(results) elif 'open youtube'...
[ "for initialize_self_service_recovery_flow_for_browsers Initialize Recovery Flow for Browsers # noqa: E501 \"\"\" pass def", "test_initialize_self_service_recovery_flow_without_browser(self): \"\"\"Test case for initialize_self_service_recovery_flow_without_browser Initialize Recovery Flow for APIs, Services, App...
[ "GrandExchange, GameItemNotFound, GameItemParseError from .item import Item from .priceinfo import PriceInfo from .pricetrend", "GameItemNotFound, GameItemParseError from .item import Item from .priceinfo import PriceInfo from .pricetrend import", "GameItemParseError from .item import Item from .priceinfo impor...
[ "loading and pre-processing :return: (xtrain, ytrain), (xtest, ytest) ''' print('**** Read data into", "os import numpy as np import cv2 from utils import constants as const", "to metadata path = const.PATH metadata_csv_path = os.path.join(path, const.FILE_METADATA) test_img_dir_path = os.path.join(path, const....
[ "file\") else: lex = Lexer(sys.argv[1]) with open(sys.argv[1]) as f: while True: c =", "else: lex = Lexer(sys.argv[1]) with open(sys.argv[1]) as f: while True: c = f.read(1)", "main.py file\") else: lex = Lexer(sys.argv[1]) with open(sys.argv[1]) as f: while True: c", "import * import sys if len(sys.argv) != ...
[ "email='<EMAIL>', password='<PASSWORD>' ) url = reverse('web_dep_table') request = self.client.login(username=\"test_username\", password=\"<PASSWORD>\") # Exercise test", "'topic_id': self.topic.id})) request.user = self.user # Exercise test outsider_topic = Topic.objects.create(name='ms', desc=\"test test", "...
[ "Nepoch = 1 #Nbatch = 250 Nsamples = 512 TrainingImage = \"TI_Collaboration_1of4_50x50x50_newRepresentation.dat\" LocModel", "but running end-to-end. Any comments and further improvements are well recevied to: <EMAIL>", "= \"TI_Collaboration_1of4_50x50x50_newRepresentation.dat\" LocModel = 'Models/3D_NewReprese...
[ "_attributes_from_request(request: HttpRequest) -> Dict: if not request: return dict() attributes = dict() try:", "attributes except Exception: logger.exception( \"Unexpected exception while trying to parse http-request for feature-attributes.\"", "\"Unexpected exception while trying to parse http-request for f...
[]
[ "black | +------+---------+ 3. Number between 0 and 1 that represents the level", "same length as `vlines_x`. If None will take from the color pallette in", "the color pallette in the current plot style. vlines_linestyles: [optional, defaults to None]", "for bar plots. drawstyle : str [optional, default is 'd...
[ "range(self.mp_steps): hiddens = self.step(edge_index=edge_index, sections=sections, **hiddens) if not output_all_steps and (step + 1)", "a message passing step by propagating information and updating each element \"\"\" for", "!= self.mp_steps: continue for element, readout_fn in self.readout_fns.items(): outp...
[ "self.relu1(output_1) output_2 = self.gcn_2(output_1_relu, adj) output_2_res = output_2 + input output = self.relu2(output_2_res)", "adj) output_1_relu = self.relu1(output_1) output_2 = self.gcn_2(output_1_relu, adj) output_2_res = output_2 + input", "self.relu2 = nn.ReLU() self.name = name def forward(self, in...
[ "self._chunks_moved_to = None self._chunk_splits = None # Track previous file position for loop", "= line.decode(\"utf-8\", \"replace\") if self.binary == \"mongos\": if \"Starting new replica set monitor", "None self._binary = None self._timezone = None self._hostname = None self._port = None", "= match.grou...
[ "= pg.QtGui.QGraphicsRectItem(0, 0, 100, 100) #scene.addItem(rect) #rect.setPos(20,20) #rect.translate(50, 50) #rect.rotate(30) #rect.scale(0.5, 0.5) #rect1", "#rect.scale(0.5, 0.5) #rect1 = pg.QtGui.QGraphicsRectItem(0, 0, 100, 100) #rect1.setParentItem(rect) #rect1.setFlag(rect1.ItemIgnoresTransformations) #rec...
[ "2 ** 0 EVENT_SCHEDULER_SHUTDOWN = 2 ** 1 EVENT_SCHEDULER_PAUSED = 2 ** 2", "9 EVENT_JOB_REMOVED = 2 ** 10 EVENT_JOB_MODIFIED = 2 ** 11 EVENT_JOB_EXECUTED =", "| EVENT_SCHEDULER_PAUSED | EVENT_SCHEDULER_RESUMED | EVENT_EXECUTOR_ADDED | EVENT_EXECUTOR_REMOVED | EVENT_JOBSTORE_ADDED | EVENT_JOBSTORE_REMOVED |", ...
[ "Unless required by applicable law or agreed to in writing, software # distributed", "yield target.Extend('nrf52840dongle-all-clusters', board=NrfBoard.NRF52840DONGLE, app=NrfApp.ALL_CLUSTERS) yield target.Extend('nrf52840dongle-light', board=NrfBoard.NRF52840DONGLE, app=NrfApp.LIGHT) for target in targets: yield...
[ "= pianoroll[:, :-semitone, 1:] pianoroll[:, :semitone, 1:] = 0 elif semitone < 0:", "loader -------------------------------------------------------------- def load_data_from_npy(filename): \"\"\"Load and return the training data from a npy", "0: pianoroll[:, :semitone, 1:] = pianoroll[:, -semitone:, 1:] pianor...
[]