ngram
listlengths
0
67.8k
[ "{ \"url\": repository.url, \"branch\": \"master\" }}) # If it hasn't happened after 30", "table according to it. rows = document.findAll(\"tr\", attrs=testing.expect.with_class(\"branch\")) testing.expect.check(2, len(rows)) check_cell(rows[0], \"localname\", \"Tags\",", "frontend.page(\"critic/master\", expec...
[ "for i in range(n): temp = queue.pop() print(temp.val) if temp.left: queue.insert(0,temp.left) if temp.right:", "root: TreeNode) -> List[List[int]]: queue = [] queue.insert(0,root) res = [] if not", "= queue.pop() print(temp.val) if temp.left: queue.insert(0,temp.left) if temp.right: queue.insert(0,temp.right) ...
[ "from os.path import join import numpy as np #def append_postfix(filename,postfix): # return \"{0}_{2}.{1}\".format(*filename.rsplit('.',", "argparse import pandas as pd from funcs import utils from os.path import join", "= annotated2.loc[~annotated2.isnull().values.all(axis=1)] annotated2['ENTREZ_GENE_ID'] = a...
[]
[ "async def init_redis(app): app['redis'] = aioredis.from_url( app['redis_location'], ) async def close_redis(app): await app['redis'].close()", "expire is None: res = await conn.set(key, value) else: res = await conn.set(key,", "async with redis.client() as conn: val = await conn.get(key) return val async def",...
[ "terms\") parser.add_argument('--beta_style', type=float, default=1.0, help=\"default weight of sum of weighted style divergence terms\")", "beta_2 val for adam\") parser.add_argument('--start_epoch', type=int, default=0, help=\"flag to set the starting epoch", "of sum of weighted divergence terms\") parser.add...
[ "and under the MIT license # from mineturtle import * import lsystem t", "the MIT license # from mineturtle import * import lsystem t = Turtle()", "ensure angles are always integral multiples of 90 degrees t.gridalign() rules = {'X':'X+YF+',", "'+': lambda: t.yaw(90), '-': lambda: t.yaw(-90), 'F': lambda: go(...
[ "} ) assert response.status_code == 201 response_2 = client.post( \"/users/signup\", json={ \"email\": \"<EMAIL>\",", "def test_signup_returns_200(self, client: TestClient): response = client.post( \"/users/signup\", json={ \"email\": \"<EMAIL>\", \"password\": \"<PASSWORD>\"", "\"/users/signup\", json={ \"emai...
[ "{ romaji english } siteUrl } } image { large } description(asHtml: true)", "} media(perPage: 1) { nodes { title { romaji english } siteUrl }", "english } siteUrl } } image { large } description(asHtml: true) } }", "1) { nodes { title { romaji english } siteUrl } } image", "name { full } media(perPage: 1) {...
[ "aln_dict): \"\"\" Annotate each mutation as either nonsynonymous or synonymous \"\"\" coding_status =", "= seq_parent.replace(\"-\", \"\") # collapse gaps seq_mutated = seq_mutated.replace(\"-\", \"\") AA_parent = Seq(seq_parent,", "== \"__main__\": infile_aln = sys.argv[1] infile_fitness_tree = sys.argv[2] ou...
[ "hell are u thinking?\" print \"a very important function that can only exec", "print \"a after import b\" _once = 0 def dofoo(): global _once; _once", "dofoo(): global _once; _once += 1 if _once > 1: print \"what the", "global _once; _once += 1 if _once > 1: print \"what the hell", "\"what the hell are u t...
[ "by subclasses \"\"\" pass @property def query_data(self) -> bytes: \"\"\"Returns the ``data`` field", "bytes: \"\"\"Returns the query ``id`` for use with the ``TellorX.Oracle.tipQuery()`` and ``TellorX.Oracle.submitValue()`` contract", "base class for all Queries, and implements default behaviors. Each subclas...
[ "465 EMAIL_HOST_USER = '<EMAIL>' EMAIL_HOST_PASSWORD = '<PASSWORD>' EMAIL_USE_SSL = True EMAIL_USE_LOCALTIME = True", "EMAIL_HOST = 'smtp.163.com' EMAIL_PORT = 465 EMAIL_HOST_USER = '<EMAIL>' EMAIL_HOST_PASSWORD = '<PASSWORD>' EMAIL_USE_SSL", "'<EMAIL>' EMAIL_HOST_PASSWORD = '<PASSWORD>' EMAIL_USE_SSL = True EM...
[ "import torch import torch.nn as nn import onmt from onmt.BleuCal import fetch_data import", "[], [] lenSrcData = len(srcData) for i, line in enumerate(srcData): sys.stdout.write('\\r') sys.stdout.write(\"%s\" %", "generator model.cuda() opt.model = '../Models/V1_IWSLT_Models/de2en_30k_bz64_bc5_bleu_26.06_e24.p...
[ "msgs first_id = await db.get_first_id() last_id = await db.get_last_id() assert first_id == entries[0].id", "db = await hat.syslog.server.database.create_database(db_path, False) msgs = [create_msg() for i in range(10)] entries", "in range(10)] entries = await db.add_msgs([(timestamp, msg) for msg in msgs]) aw...
[ "# find multiple tag def has_class_but_no_id(tag): return tag.has_key('class') and not tag.has_key('id') pprint(soup.find_all(has_class_but_no_id)) #", "print 20*\"++\" pprint(soup.find_all(href=re.compile(\"my_url\"))) # all links contains key \"my_url\" pprint(soup.find_all(id=True)) # all links", "all class ...
[ "# found. set idhor c.execute('update linhas set idhor=%s where id=%s', [idhor, id]) c.close()", "import horarios, linhas, env, dias def get_linha_hor(idhor, nome): c = env.db.cursor() # look", "print 'ponto: %s, dias: %s' % (pto, dia) idponto = get_ponto_hor(pto) d =", "where id=%s', [idhor, id]) c.close() r...
[ "faceCascade = cv2.CascadeClassifier(cascPath) anterior = 0 try: from pylibfreenect2 import CudaPacketPipeline pipeline =", "default=80, help=\"Range to clip from nearest object, in millimeters\") ap.add_argument(\"-m\", \"--ir-min\", type=int, default=1024,", "= CudaPacketPipeline() except: try: from pylibfree...
[ "import NxosMdsPatterns from unicon.statemachine import State, Path patterns = NxosMdsPatterns() class NxosMdsSingleRpStateMachine(NxosSingleRpStateMachine): def", "<gh_stars>10-100 __author__ = \"<NAME> <<EMAIL>>\" from unicon.plugins.nxos.statemachine import NxosSingleRpStateMachine from unicon.plugins.nxos.mds...
[ "setup with SaltStack and Apache Libcloud\"\"\" __version__ = '0.1.0-git' if __name__ == '__main__':", "with SaltStack and Apache Libcloud\"\"\" __version__ = '0.1.0-git' if __name__ == '__main__': from", "SaltStack and Apache Libcloud\"\"\" __version__ = '0.1.0-git' if __name__ == '__main__': from cardice.comm...
[]
[ "def __init__(self, message, path, post_data, debug=False, stack_trace=None): \"\"\" :param message: exception message :type", ":param path: path after server URL of connection. :type path: str :param post_data:", "errors. Extends :py:class:`urllib2.URLError` for backward compatibility. \"\"\" def __init__(self...
[ "len(arr) - count_elem[showFace] + count_elem[map_val[showFace]] # def number_of_rotations(dice: List[int]) -> int: # return", "dice) # for v in range(1, 7) # ) # N = [6,", "count_elem[showFace] + count_elem[map_val[showFace]] # def number_of_rotations(dice: List[int]) -> int: # return min( #", "- count_elem[...
[ "import keyboards as KEYBOARDS logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.DEBUG) logger", "return ConvStates.STATION else: logger.debug(\"Destination Station\") self._conversations[userid]._dest = update.message.text.upper() bot.send_message(chat_id=userid, te...
[ "file(s). # This too relies on a convention on the file names linking", "changes every time the core files are recreated. Should I commit the core", "import TestSuite as ts LOGS_FOR_TESTS = \"FullStackTest.log\" def parse_command_line(): parser = argparse.ArgumentParser(description='Utility to", "in changes: ...
[ "Short name string destination: Room refrence \"\"\" Exit = namedtuple(\"Exit\", ['direction', 'destination']) class", "between rooms. Properties: direction: Short name string destination: Room refrence \"\"\" Exit =", "this room. Exits are appended to the end. \"\"\" description = self._short_description +", ...
[ "reduce=False, shuffle=seed) Xtr, Ytr = Xtr[:m], Ytr[:m] if da: logging.info(f'Adding {da} examples with", "maxpool, maxpool)) elif wl.startswith('rlc'): filters = LocalFilters(n_filters=n_filters, weights_generator=w_gen, locality=locality, maxpool_shape=(nt, maxpool, maxpool)) if", "AllPairsEncoder from quadb...
[ "print min([1,2,3,4]) print min([2,1],[1,2],[1,1],[1,1,0]) # tuples print \"\\ntuples\" print min((1,2,3,4)) print min((2,1),(1,2),(1,1),(1,1,0)) #", "lists print \"\\nlists\" print min([1,2,3,4]) print min([2,1],[1,2],[1,1],[1,1,0]) # tuples print \"\\ntuples\" print min((1,2,3,4))", "print \"\\nlists\" print ...
[]
[ "futures import grpc import relationExtractService_pb2 import relationExtractService_pb2_grpc import tools class relationExtractService(relationExtractService_pb2_grpc.relationExtractServiceServicer): def ExtractTriple(self,request,context):", "request.sentence triples = tools.extract_items(sentence) response = r...
[ "import torch.nn.functional as F from torch_geometric.data import Data, Batch from . import base_networks", "nc, components = cv2.connectedComponents(fg_mask, connectivity=8) components = torch.from_numpy(components).float().to(constants.DEVICE) for j in range(1, nc):", "1), device=constants.DEVICE) * -100, nod...
[ "in range(10, num_proc * 100, 10)] ret = [] for x in util:", "for x in util: if len(x) == 2: ret.append('0.' + x) else: ret.append(x[:len(x)", "+ x) else: ret.append(x[:len(x) - 2] + '.' + x[len(x) - 2:]) return", "== 2: ret.append('0.' + x) else: ret.append(x[:len(x) - 2] + '.' + x[len(x)", "util = [str(x)...
[ "resources import get_subreddits, update_subreddits \"\"\" subreddits: { '<subreddit name>': { 'phrases': [ '<phrases>'", "... } \"\"\" subreddits = get_subreddits() def list(): return subreddits.keys() def add(name): subreddits[name]", "'include': <boolean>, 'unflaired': <boolean> }, ... } \"\"\" subreddits = ...
[ "-*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import", "django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [", "-*- coding: utf-8 -*- from __future__ import unicode_literals from djan...
[ "test_attributes(): NS = shared['NS'] sp = NS.sampled_parameters assert sp == sampled_parameters lnl =", "range(ndim)] # Set the active point population size population_size = 20 sampler =", "i in range(ndim)] # Set the active point population size population_size = 20", "width = 10.0 def analytic_log_evidenc...
[ "var_type_index == 0: self.var_value = 0 elif var_type_index == 1: self.var_value = False", "self.var_value = var_value def set_defualt_value(self, var_type): var_type = var_type.lower() var_type_index = Variable.var_type_dic.get(var_type, None)", "= var_value if var_value == \"\": self.set_defualt_value(var_ty...
[ "how much specified in min_start_goal_dist for obj in final.fixed_state.keys(): if min_start_goal_dist > np.linalg.norm(final.fixed_state[obj][:2]-initial.fixed_state[obj][:2]):", "keep orientation...\") continue for obj in fixedObjects: posDiff = np.linalg.norm(startPositions[obj][:3] - actual_position[obj][:3])...
[ "encoding=\"utf-8\"), default=sys.stdout, help=\"Write output to file\") args.add_argument(\"-f\", \"--formatter\", help=\"specify clang-format to format the", "options.formatter: ret = subprocess.run([options.formatter], input=output.encode(\"utf-8\"), stdout=subprocess.PIPE) output = ret.stdout.decode(\"utf-8\"...
[ "hàm canvas_merge_union là canvas_compose truyền vào tham số đầu tiên, Mặc định là", "print(path,\"\\n\") opts.bg = svg_color(\"white\") if opts.bg is None else opts.bg opts.fg = svg_color(\"black\")", "Layer(image, (0, 0), pre_alpha=True, linear_rgb=opts.linear_rgb) if opts.bg is not None: output = output.back...
[ "args.dev_file args.test_file = DATA_PATH / args.dataset / args.test_file if args.replace_word_dict == 'False': args.replace_word_dict", "default='rotten', type=str) parser.add_argument('--no_instance', default=40, type=int) parser.add_argument('--batch_size', default=16, type=int) parser.add_argument('--word_dim...
[ "self.assertEqual(2, R.head([2, 3])) self.assertEqual(3, R.head([3])) self.assertEqual(None, R.head([])) self.assertEqual('a', R.head('abc')) self.assertEqual('b', R.head('bc')) self.assertEqual('c', R.head('c'))", "ramda as R \"\"\" https://github.com/ramda/ramda/blob/master/test/head.js \"\"\" class TestHead(un...
[ "name='django.contrib.sitemaps.views.sitemap'), # Error page styling tests. It's OK to have these outside of", "urlpatterns = [ path('', include('exhaust.posts.urls', namespace='posts')), path('exogram/', include('exhaust.exogram.urls', namespace='exogram')), path('robots.txt', TemplateView.as_view(template_name=...
[ "import unittest class TeskKey(unittest.TestCase): def test_key(self): a = ['a', 'b'] b = ['b']", "<filename>Python3/tests/test_key.py<gh_stars>1-10 import unittest class TeskKey(unittest.TestCase): def test_key(self): a = ['a', 'b'] b =", "unittest class TeskKey(unittest.TestCase): def test_key(self): a = ['a'...
[ "logging.getLogger(__name__) class SystemContext: def __init__(self): self.config = conf.cnf self.ds: DataStoreMongo = None self.ds_client:", ") from quakestats.system import ( conf, ) logger = logging.getLogger(__name__) class SystemContext: def", "conf.cnf self.ds: DataStoreMongo = None self.ds_client: pymong...
[ "= \"174379\" phone_number = \"254746468686\" lipa_na_mpesa_passkey = \"<KEY>\" consumer_key = \"ryHq5u8TIFcyps7lIYQThAP1Al0zXAcU\" consumer_secrete =", "business_shortCode = \"174379\" phone_number = \"254746468686\" lipa_na_mpesa_passkey = \"<KEY>\" consumer_key = \"ryHq5u8TIFcyps7lIYQThAP1Al0zXAcU\" consumer_s...
[ "strony źródłowej ?!\",\"public\":\"\"} if lenT2 > lenT1 and lenT1==0: return {\"private\":\"Dopisano nowy przedmiot:", "subject msg['From'] = eml_from msg['To'] = eml_to # Send the message via SMTP", "secret[\"smtp_password\"]) server.send_message(msg) server.quit() print(\"SENDING OK!\") except: #raise print(...
[ "node's NodeSet with the owner of this NodeSet. :type value: Node \"\"\" if", "root and each subsequent Node is a child. Any existing parents or children", "int :type raise_on_empty: bool :rtype: Node | None :raises: ValueError \"\"\" return helpers.find_node(node=self,", "direction=direction) def find(self, ...
[]
[ "'apikey' headers = usajobs.connect(email=email, apikey=apikey) assert headers == {'Host': 'data.usajobs.gov', 'User-Agent': 'email', 'Authorization-Key':", "headers = usajobs.connect(email=email, apikey=apikey) assert headers == {'Host': 'data.usajobs.gov', 'User-Agent': 'email', 'Authorization-Key': 'apikey'}",...
[ "for processing. nproc : The number of workers to use for parallelization. output_pkl", ": The list of file paths to the reader outputs to be processed.", "mode to use for processing. nproc : The number of workers to use", "grounding_mode : The type of grounding mode to use for processing. nproc :", "chunk_...
[ "ok to continue\\nOr die !\") confirmation.wait_window() print(\"Confirmation:\", confirmation.ok) if __name__ == \"__main__\": root", "__on_destroy(self): if self.__on_close: self.__on_close(self.__ok) def __on_click_cancel(self): self.__ok = False self.destroy() def __on_click_confirm(self): self.__ok", "you ...
[ "= im_inp return tf.clip_by_value(whole,0.,1.) def resize_area_batch(imgs, hs, ws): _, h, w, _ =", "def inter_area_batch(im_inp,h,w,hs,ws): # Do INTER_AREA resize here # h, w - input size", "ws): _, h, w, _ = imgs.shape with tf.variable_scope(\"resize_area\"): out = inter_area_batch(imgs, int(h),", "h, w, _ =...
[ "from output.models.ms_data.regex.re_c43_xsd.re_c43 import ( Regex, Doc, ) __all__ = [ \"Regex\", \"Doc\", ]", "<filename>output/models/ms_data/regex/re_c43_xsd/__init__.py from output.models.ms_data.regex.re_c43_xsd.re_c43 import ( Regex, Doc, ) __all__ = [ \"Regex\", \"Doc\"," ]
[ "ExpMatrix, num_components: int = 50, transform_name: str = 'freeman-tukey', pca_model: PCAModel = None,", "# This file is part of Monet. from typing import Tuple import pandas", "go from ..core import ExpMatrix from ..latent import PCAModel from .cells import plot_cells", "import PCAModel from .cells import ...
[ "'__main__': # parsing arguments parser = argparse.ArgumentParser( formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('--exp','-e', dest='exp', required=True, help='exp to", "# init logger logger_config.init_logger(args.lverbose,__file__) log.banner('Start execute {} as main()'.format(__f...
[ "flask_restx import Resource from ml_rest_api.api.restx import api, FlaskApiReturnType @api.default_namespace.route(\"/liveness\") class HealthLiveness(Resource): \"\"\"Implements the", "the HealthLiveness class.\"\"\" from flask_restx import Resource from ml_rest_api.api.restx import api, FlaskApiReturnType @api...
[ "of keras.layers.Layer. if not isinstance(layer, tf.keras.layers.Layer) or isinstance( layer, tf.keras.Model): logger.error('`layer` can only", "KIND, either express or implied. # See the License for the specific language", "Unless required by applicable law or agreed to in writing, software # distributed", "...
[ "response.status_code != 200: raise BadResponse( \"The service responded with a {}: {}\".format( response.status_code,", "urljoin import requests from crosswalk_client.exceptions import BadResponse from crosswalk_client.objects.domain import DomainObject from crosswalk_client.validators.domain", "validate_requi...
[]
[]
[ "from mozdns.sshfp.forms import SSHFPForm class SSHFPView(object): model = SSHFP form_class = SSHFPForm queryset", "from mozdns.sshfp.models import SSHFP from mozdns.sshfp.forms import SSHFPForm class SSHFPView(object): model = SSHFP", "form_class = SSHFPForm queryset = SSHFP.objects.all() class SSHFPDeleteView...
[ "chrome_app(page, **kwargs) await chrome_runtime(page, **kwargs) await iframe_content_window(page, **kwargs) await media_codecs(page, **kwargs) await sourceurl(page,", "chrome_runtime(page, **kwargs) await iframe_content_window(page, **kwargs) await media_codecs(page, **kwargs) await sourceurl(page, **kwargs) awa...
[ "remaining, discard any * sets. The regex is a match if at the", "string and pattern are equal. \"\"\" import functools @functools.lru_cache() def is_match(s, p): if", "is True assert is_match('bbbba', '.*a*a') is True assert is_match('a', '.*..a*') is False assert", "True # examine if skipping the pattern le...
[ "f\"{self.flight} (Details N/A)\" self.altitude = line[15:21].replace(\" \", \"\") self.speed = line[26:29] lat =", "ValueError: lat = 0 lon = 0 self.coordinates = Point(lat, lon) self.track =", "= 0 self.coordinates = Point(lat, lon) self.track = line[54:57] self.msg = line[60:63] self.last", "(Details N/A)\...
[ "= [ \"Programming Language :: Python :: 3\", \"License :: OSI Approved ::", "with open(\"environment.yml\", \"r\") as fh: env = yaml.safe_load(fh) requirements = [a.split('=', 1)[0].strip() for", "for a in env['dependencies'] ] setuptools.setup( name = \"mortie\", version = \"0.1.0\", author", "\"<NAME>\", a...
[ "*y = tmp; return x; } int* main(){ swap(&a, &b); return &a ;", "swap(&a, &b); return &a ; } ''', llvmdump=True) # ret_value = ret.contents print(\"The", "type is {} content \".format(ret, type(ret))) # so the global var assert ret.contents.value", "tmp; tmp = *x; *x = *y; *y = tmp; return x; }", "ret.conte...
[ "content(self) -> str: extras = self.extras if not extras: extras = self.site.config.get(\"content_type\", {}).get(\"MarkdownPage\",", "enable. extras: list = [] @oneshot def content(self) -> str: extras = self.extras", "load_md(path: Path) -> LoaderResult: data = path.read_text(encoding=\"utf-8\") return data,...
[ "os.path.abspath(os.path.expanduser(__file__)) sys.path.insert(0, os.path.dirname(EXGDBFILE) + \"/lib/\") import utils from enert import * def clearscreen():", "import * def clearscreen(): \"\"\" Customized clearscreen from https://github.com/longld/peda \"\"\" print(\"\\x1b[2J\\x1b[H\") utils.clearscreen =", "...
[ "row.find_element_by_xpath('.//td[@data-stat=\"onbase_plus_slugging\"]').text except Exception: self.stats[key_start + '_era'] = row.find_element_by_xpath('.//td[@data-stat=\"earned_run_avg\"]').text self.stats[key_start + '_ip'] = row.find_element_by_xpath('.//td[@data-stat=\"IP\"]').text", "key_start) def get_e...
[ "httplib2 import urllib import json import re import sys class Transport: \"\"\" Abstract", "of a transport class. Defines the supported API methods \"\"\" endpoint = \"platform.clickatell.com\"", "higher \"\"\" response['body'] = json.loads(response['body']) response['messages'] = response['body']['messages'] ...
[ "\"\"\" :return: Return yaml data as dictionary format \"\"\" with open(self.file_path, \"r\", encoding=\"utf-8\")", "\"\"\" with open(self.file_path, \"r\", encoding=\"utf-8\") as yf: return yaml.load(yf, Loader=yaml.FullLoader) def write(self, data:", "import os import yaml class YamlConfig: def __init__(self...
[ "= ee.Array(collection.aggregate_array('ROI_area')).multiply(0.000001) WThresh = ee.Array(collection.aggregate_array('wThresh')) WError = WaterArea.multiply(ee.Array(collection.aggregate_array('wError2'))) LError = ee.Array(collection.aggregate_array('lError2')).multiply(ROIArea.subtract(WaterArea)) exportDict =", ...
[ "to the equation without setting it in the system. This should return a", "the system. This should return a NameError \"\"\" # Create system system =", "numpy as np from psecas import Solver, System from psecas import ChebyshevExtremaGrid import", "+ 2*A*f\") with pytest.raises(NameError) as e_info: solver = ...
[ "<reponame>BioinfoTongLI/deepBlink \"\"\"CLI submodule for checking image shapes.\"\"\" import logging import os import textwrap", "---------- 3. By default we would assign: \"({predict_shape(self.image.shape)})\" \\U0001F449 If this is incorrect,", "single 2D image used for one prediction \\U000027A1 z: third ...
[ "= Field({(1992, ...): 'V9910', (..., 1990): None, }, descr='') occupation_first = Field({(1992, ...):", "'V91', 1976: None, }, descr='') income_pension_other = IncomeField({ (1992, ...): 'V1261', (..., 1990):", "and 'V7125' in df: T = IncomeField.remove_missing total = sum_na(total, T(df.V7122), T(df.V7125)) r...
[ "__init__(self): \"\"\" Los indicadores de empleo y desocupacion se basan en gran medida", "#transform string to datetime df_temp['indice_tiempo'] = pd.to_datetime(df_temp['indice_tiempo'], format='%Y-%m-%d', errors='ignore') df_temp['indice_tiempo'] = df_temp['indice_tiempo'].dt.date #set", "de los salarios de...
[ "private TreeNode insert(TreeNode root, int val) { if (root == null) return new", "integer array nums, # which contains initial elements from the stream. For each", "that nums length >= k-1 and k >= 1. # import unittest class", "} } public int add(int val) { root = insert(root, val); return findKthLargest(k,"...
[ "job scripts for compiler module: ' + compiler_module) template_job = gepy.job(name='nvtest') template_job.modules.append('personal-modules') template_job.modules.append('testing-modules')", "script does a test of a particular nvidia compiler on Myriad import sys", "', ['fortran_do_concurrent_pi_dir'])) doconc_...
[ "self.pub_lmotor = rospy.Publisher('lwheel_vtarget', Float32,queue_size=10) self.pub_rmotor = rospy.Publisher('rwheel_vtarget', Float32,queue_size=10) self.pub_bmotor = rospy.Publisher('bwheel_vtarget', Float32,queue_size=10) #", "self.left = v_l self.back = v_b self.pub_lmotor.publish(self.left) self.pub_rmotor....
[ "in board.moves: move_list.append(move.to_long_algebraic()) stockfish.set_position(move_list) return long_algebraic_to_coordinate(stockfish.get_best_move()) def long_algebraic_to_coordinate(move): initial, final, promotion_piece = move[:2],", "stockfish = Stockfish() move_list = [] for move in board.moves: move_l...
[ "from ..gameModel import GameModel from ..appLib.messageFormatters import msgWelcome async def start(cls: GameModel) ->", "GameModel from ..appLib.messageFormatters import msgWelcome async def start(cls: GameModel) -> None: return msgWelcome()", "<gh_stars>0 from ..gameModel import GameModel from ..appLib.messa...
[ "multiplicação desse. ######## import sys sys.path.append('/home/danielle8farias/hello-world-python3/meus_modulos') from mensagem import * from numeros import", "print() resposta = ' ' while resposta not in 'SN': resposta = ler_resposta('\\nDeseja", "resposta = ler_resposta('\\nDeseja rodar o programa de novo? ...
[ "= ( ('VeryMild', 'Very mild'), ('Mild', 'Mild'), ('MildPlus', 'Mild +'), ) temperature_choices =", "bean_amount_choices = ( ('VeryMild', 'Very mild'), ('Mild', 'Mild'), ('MildPlus', 'Mild +'), ) temperature_choices", "models here. class Beverage(models.Model): \"\"\"( description)\"\"\" created_by = models.For...
[ "parse(): parser = argparse.ArgumentParser() parser.add_argument('-s', '--source', required=True, dest='sources', nargs='+', help='Path to the source", "or path.lower().endswith('.yaml'): with open(path, 'r') as f: return yaml.load(f, Loader=OrderedDictYamlLoader) else: with open(path,", "required=True, dest='s...
[ "class TestCase003(TestCase): def __init__(self): TestCase.__init__(self, id='003', alt_id='fixed_pps_increasing_pps_58_bytes', description='Fixed PPS. Increasing State Transfer Duration.", "TestCase003(TestCase): def __init__(self): TestCase.__init__(self, id='003', alt_id='fixed_pps_increasing_pps_58_bytes', de...
[ "__init__(self): self.X = None def forward(self, X): # TODO: Implement forward pass #", "1:\", target_index - 1); it = np.nditer(target_index - 1, flags = ['c_index'] )", "self.B.value): self.W.grad = np.zeros_like(self.W.value); self.B.grad = np.zeros_like(self.B.value); # self.W.init = self.W.value; # self.B....
[ "Order\" and getdate(target_doc.schedule_date) < getdate(nowdate()): target_doc.schedule_date = None target_doc.run_method(\"set_missing_values\") target_doc.run_method(\"calculate_taxes_and_totals\") @frappe.whitelist() def get_default_supplier_query(doctype,", "\"material_request_type\": [\"=\", \"Purchase\"] }...
[ "current t = threading.current_thread() for n in range(5): # cur print('{0} th excute", "name=None): super().__init__(name=name) # def run(self): # current t = threading.current_thread() for n in", "# t1.start() # block # t1.join() #print('value = {0}'.format(value)) #print('main continue') # thread", "######...
[ "self.shortterm = stp self.longterm = ltp self.current = current self.reset() @classmethod def configured(cls,", "''' Xd: (delay, batch, pre) X: (batch, post) Vpost: (batch, post) Output: Current", "self.align_signs() def align_signs(self): if not self.active: return signs = self.signs_pre.unsqueeze(1).expand_a...
[ "[ 'django.contrib.sessions', 'django.contrib.staticfiles', 'dpaste', ], 'MIDDLEWARE_CLASSES': ( 'django.contrib.sessions.middleware.SessionMiddleware', ), 'STATIC_ROOT': '/tmp/dpaste_test_static/', 'STATIC_URL': '/static/',", "'django.template.context_processors.request', 'django.template.context_processors.i18n...
[ "that if you don't first turn the LED on this will error out.", "self.led_dim.start(brightness) except: raise LedError(\"Error while turning the LED on.\") def off(self): \"\"\" Turns", "via a pin given. See the documentation for an example of how to", "you don't first turn the LED on this will error out. \"\...
[ "NORMAL_TEST_FILE = 'dataset/normal.csv' def train(): classifier = MyMLPClassifier() classifier.train() def predict(): xss_test_data, xss_test_label", "[l_name for i in range(len(data))] return data, label def run(): train() predict() if", "list(set(f.readlines())) label = [l_name for i in range(len(data))] ret...
[ "configuration as well', action='store_true') if __name__ == '__main__': args = parser.parse_args() model, cls,", "copy import argparse import torch from pynn.util import load_object_param parser = argparse.ArgumentParser(description='pynn') parser.add_argument('--model-path',", "= [s for s in glob.glob(\"%s/ep...
[ "numpy as np import tensorflow as tf from tensorflow.python.ops import math_ops from tensorflow.python.ops", "super().__init__(model) def forward(self,x0,ts): Nt = x0.shape[0] Xs = np.zeros(Nt,dtype=np.object) for i in range(Nt):", "time_delta_grid = time_grid[1:] - time_grid[:-1] y0 = np.repeat(x0[i,:].reshape...
[ "r'<a href=\"/heroes/(.+?)\">.+?<div class=\"name\">(.+?)</div>', re.search( r'<div class=\"hero-grid\">[\\s\\S]+</div></footer></section>', page.text ).group(), ): self.heroes[hero_info[1]] = Hero(hero_info[1], hero_info[0])", "self.show_team1_rb = ttk.Radiobutton( self.controls_lfrm, text=\"Radiant\", variable=...
[ "networks=[network_cloud_user], scale=5) topology = Topology(nodes=[ *nodes_camera_1, node_detector_1, *nodes_camera_2, node_detector_2, node_historian, node_user ]) return", "num_cameras=2, camera_resources=camera_resources, detector_resources=detector_resources, broker=broker) nodes_camera_2, node_detector_2 = ...
[ "from bulletin.api import permissions from bulletin.api.views import PostList, PostDetail import serializers from bulletin.tools.plugins.models", "PostDetail import serializers from bulletin.tools.plugins.models import Job class JobList(PostList): queryset = Job.objects.all() serializer_class", "from bulletin.t...
[ ">>> C = [ # ... [2, 5], # ... [6, 7], #", "[ [10, 20], ] assert multiply(a, b) == [ [10, 20], [20, 40],", "1], # ... [0, 1, 0], # ... ] # >>> multiply(C, D)", ">>> D = [ # ... [1, 2, 1], # ... [0, 1,", "второй матрицей. В результате операции умножения матрицы размера M×N # на матрицу размером", "[10, 20]...
[ "= Variable(torch.cat([preprocessing(image).unsqueeze(0) for image in distractors])) explorer = SemanticBeamSearch(112, 112, 224, beam_width=args.beam_width, n_samples=args.n_samples,", "sketches\") parser.add_argument('--image_path', type=str, help='path to image file') parser.add_argument('--distract_dir', type...
[ "b for i in range(max_v, multiple): if i % a == 0 and", "if i % a == 0 and i % b == 0: return", "a if b > a: max_v = b for i in range(max_v, multiple):", "0 and i % b == 0: return i return multiple print(get_lcm(6, 8))", "i % a == 0 and i % b == 0: return i", "b > a: max_v = b for i in range(max_v, multip...