ngram listlengths 0 67.8k |
|---|
[
"record: return record['_id'] else: self.repair() raise KeyError() def complete(self, url): self.db.crawl_queue.update({'_id': url}, {'$set':",
"import datetime, timedelta from pymongo import MongoClient, errors class MongoQueue: # possible states",
"self.COMPLETE}}) def repair(self): \"\"\"Release stalled jobs... |
[
"\"\"\" from typing import Any from sims4communitylib.modinfo import ModInfo from sims4communitylib.testing.common_assertion_utils import CommonAssertionUtils",
"COLONOLNUTTY \"\"\" from typing import Any from sims4communitylib.modinfo import ModInfo from sims4communitylib.testing.common_assertion_utils import",
... |
[
"db = pymysql.connect(host=\"127.0.0.1\", database=\"bugtracker\", user=\"root\", password=\"\") try: cursor = db.cursor() cursor.execute(\"select * from",
"password=\"\") try: cursor = db.cursor() cursor.execute(\"select * from mantis_project_table\") for row in cursor.fetchall():",
"= db.cursor() cursor.execu... |
[
"collections.namedtuple('SockFilterError', ['address']) def __init__(self, address): self.address = address def __repr__(self): return repr(self._tuple) def",
"== other._tuple def __ne__(self, other): if not hasattr(other, '_tuple'): return False return self._tuple",
"def __eq__(self, other): if not hasattr(oth... |
[
"row and n is col def searchInSortedMatrix(matrix, target): row = 0 col =",
"> -1: if target == matrix[row][col]: return [row, col] if target > matrix[row][col]:",
"if target > matrix[row][col]: row += 1 else: col -= 1 return [-1,",
"col > -1: if target == matrix[row][col]: return [row, col] if target >",
"... |
[
"Author: <NAME> # Date: 2018.7.16 # Version: 1.0 #==========================================================# class Event_Output(object): def output(self,",
"as events: events.write(\"====================\"+\"event \"+str(i)+\"====================\") events.write(\"\\n\") events.write(\"pem: \"+str(p1)) events.wr... |
[
"aio_background/__init__.py\") with open(\"README.md\", \"r\") as fh: long_description = fh.read() setup( name=\"aio-background\", version=read_version(), description=\"A",
"find version in aio_background/__init__.py\") with open(\"README.md\", \"r\") as fh: long_description = fh.read() setup(",
"import re from... |
[
"float(input('Qual é o seu Peso? Kg')) altura = float(input('Qual é a sua Altura?",
"é {:.1f}'.format(imc)) if imc <= 18.5: print('Você esta abaixo do Peso!') elif imc",
"(altura ** 2) print('O seu Indice de massa muscular é {:.1f}'.format(imc)) if imc",
"m')) imc = peso / (altura ** 2) print('O seu Indice de... |
[] |
[
"= \"USD\" elif \"€\" in items[i]: currency = \"EUR\" elif \"£\" in items[i]:",
"= document[0].description for text in document: top_x_axis = text.bounding_poly.vertices[0].x top_y_axis = text.bounding_poly.vertices[0].y bottom_y_axis",
"in orders: p = re.findall(price, i)[0] tally[i.split(p)[0]] = float(p) tal... |
[] |
[
"= models.CharField(\"Http Status\",max_length=255,blank=True) type = models.CharField(\"Error type\",max_length=255,blank=True) code = models.CharField(\"Error code\",max_length=255,blank=True) param =",
"models.ForeignKey(User, verbose_name=\"User\", blank=True, null=True,on_delete=models.SET_NULL) date = model... |
[
"min_child_weight=1, # 决定最小叶子节点样本权重和,使一个结点分裂的最小权值之和, 避免过拟合 subsample=0.8, colsample_bytree=0.8, # 每棵树的列数 colsample_bylevel=0.8, # 每一层的列数 reg_alpha=0.0, reg_lambda=0.0,",
"colsample_bylevel=0.8, # 每一层的列数 reg_alpha=0.0, reg_lambda=0.0, scale_pos_weight=scale_pos_weight, random_state=seed, n_jobs=n_jobs, silent=True... |
[
"9.01218, 5: 10.806, 6: 12.0096, 7: 14.00643, 8: 15.99903, 9: 18.998403, 10: 20.1797,",
"'H', 2: 'He', 3: 'Li', 4: 'Be', 5: 'B', 6: 'C', 7: 'N',",
"# all values in Angstrom VDWRADII = {0: 0.00, 1: 1.20, 2: 1.43,",
"in Angstrom VDWRADII = {0: 0.00, 1: 1.20, 2: 1.43, 3: 2.12, 4:",
"3: 1.33, 4: 1.02, 5: 0.85, ... |
[
"if not os.path.exists(reload_file): continue if len(self._readFile(reload_file)) == 1: break else: self.assertTrue(False) self._call_cid(['service', 'stop',",
"KIND, either express or implied. # See the License for the specific language",
"Unless required by applicable law or agreed to in writing, software # d... |
[
"2080\", \"VGA\", 5, 10000000), Invoice(\"Intel i9 10900K\", \"Processor\", 10, 8000000)] for item in",
"[Invoice(\"RTX 2080\", \"VGA\", 5, 10000000), Invoice(\"Intel i9 10900K\", \"Processor\", 10, 8000000)] for item",
"10, 8000000)] for item in items: print(item.part_num) print(item.part_desc) print(item.quan... |
[
"MIT License (MIT) #Copyright (c) 2016 Blockstack #Permission is hereby granted, free of",
"= quote_field(data, \"txt\") return process_rr(data_dup, \"TXT\", \"txt\", \"{txt}\", template) def process_srv(data, template): \"\"\"",
"is None: return template.replace(field, \"\") if type(record_keys) == list: pass ... |
[
"= list(input()) c = 0 if l[0] == '1': c+=1 if l[1] ==",
"l = list(input()) c = 0 if l[0] == '1': c+=1 if l[1]",
"c = 0 if l[0] == '1': c+=1 if l[1] == '1': c+=1",
"if l[0] == '1': c+=1 if l[1] == '1': c+=1 if l[2] ==",
"list(input()) c = 0 if l[0] == '1': c+=1 if l[1] == '1':",
"= 0 if l[0] == '1': c+=1 ... |
[
"'completed', 'temporary', 'status') admin.site.register(models.AcquisitionSessionConfig, AcquisitionSessionConfigAdmin) class DataCollectorConfigAdmin(PolymorphicChildModelAdmin): base_model = models.DataCollectorConfig class GenericDataCollectorConfigAdmin(PolymorphicParentModelAdmin): list_display",
"import Po... |
[
"collections import OrderedDict from lib.model import ImMatchNet from lib.pf_willow_dataset import PFDataset from lib.normalization",
"PF Willow dataset') use_cuda = torch.cuda.is_available() # Argument parsing parser = argparse.ArgumentParser(description='Compute PF",
"division import os from os.path import ex... |
[
"return self._sectorCodeTable.updateAll(startDate, endDate) def getTradeDays(self, startDate, endDate): return self._tradeDayTable.get(startDate, endDate) def getLatestDateInDb(self): return",
"self._codeTable.stockSectors @property def stockCodesFunds(self): return self._codeTable.stockCodesFunds @property def s... |
[
"lengthOfLongestSubstring(self, s: str) -> int: #Leetcode 3 - Longest substring without repeating characters",
"if s[i] not in temp: temp += s[i] else: if maxlen < len(temp):",
"i in range(len(s)): if s[i] not in temp: temp += s[i] else: if",
"temp += s[i] if maxlen < len(temp): maxlen = len(temp) substr = te... |
[
"[] self.post_order = [] self.pre_counter = 0 self.post_counter = 0 for v in",
"self.marked[v]: self.dfs(graph, v) def dfs(self, graph, v): self.marked[v] = True self.pre[v] = self.pre_counter",
"d.add_edge(2, 3) d.add_edge(3, 5) d.add_edge(5, 4) d.add_edge(6, 4) d.add_edge(6, 9) d.add_edge(7, 6) d.add_edge(8,"... |
[
"from typing import Union from ..is_float import is_float def to_float(input: str) -> Union[float,",
"import Union from ..is_float import is_float def to_float(input: str) -> Union[float, None]: if",
"from ..is_float import is_float def to_float(input: str) -> Union[float, None]: if not is_float(input):",
"Un... |
[] |
[
"in self.dhcp_data.values(): if v.get('ipv6'): if isinstance(v['ipv6'], IPv6Address): ipv6_count += 1 self.assertEqual(1, ipv6_count) @patch.object(ConfigData,",
"for v in self.dhcp_data.values(): if v.get('ipv4'): if isinstance(v['ipv4'], IPv4Address): ipv4_count += 1 self.assertEqual(3,",
"+= 1 self.assertEqu... |
[
"`LICENSE` at the project root. \"\"\"sent when the user receives a Rich Presence",
"in `LICENSE` at the project root. \"\"\"sent when the user receives a Rich",
"found in `LICENSE` at the project root. \"\"\"sent when the user receives a",
"be found in `LICENSE` at the project root. \"\"\"sent when the user ... |
[
"algo import numpy as np import scipy as sp import networkx as nx",
"# Command line inputs # # --------------------------- # network_name = str(sys.argv[1]) exp_type =",
"str(sys.argv[2]) # random, uniform if exp_type == \"uniform\": k = int(sys.argv[3]) # k-uniform",
"# -------------------------- # threshold... |
[
"= p.ShapeFilter() assert f.group == 0 assert f.categories == 0xFFFFFFFF assert f.mask ==",
"pickle.dumps(x, 2) actual = pickle.loads(s) assert x == actual class TestContactPoint: pass class",
"assert f.group == 0 assert f.categories == 0xFFFFFFFF assert f.mask == 0xFFFFFFFF f",
"class TestShapeFilter: def te... |
[
"-Xmx4g -jar \" + codePath + \"/\" + \"igvtools.jar sort \" + bismarkFileName",
"= sys.argv[1] suffix = sys.argv[2] scriptFileName = sys.argv[3] codePath = sys.argv[4] # Should",
"write a line in the script for each for each population bismarkFileName =",
"suffix = sys.argv[2] scriptFileName = sys.argv[3] cod... |
[] |
[
"continue else: logging.warn(f\"Manifest missing {field}\") else: output[field] = result[0].text.strip() # Use first value",
"shape=None, npartitions=len(self._records), extra_metadata={}, ) def read(self): self._load_metadata() return pd.concat([self.read_partition(i) for i in range(self.npartitions)])",
"{}).... |
[
"from sqlalchemy.orm import Session from app.repository import user router = APIRouter(prefix=\"/auth\", tags=['Authentication']) get_db",
"app.hashing import Hash from sqlalchemy.orm import Session from app.repository import user router =",
"detail=f\"Incorrect password\") access_token = token.create_access_to... |
[
"compose of digits from 0 to 9. ''' return re.match(r'^-?[0-9]+$', value) is not",
"return int.from_bytes(_bytes, 'big') def toBytes(self, value): '''Convert Integer to bytes using big endian'''",
"from .BaseType import BaseType from ..Manager import Register import re class Integer(BaseType): '''Integer",
"A... |
[
"from database_management import Database, ResultSet import configparser DBINFO = configparser.ConfigParser() DBINFO.read('database.config') WMM_MAIN_DB =",
"import Database, ResultSet import configparser DBINFO = configparser.ConfigParser() DBINFO.read('database.config') WMM_MAIN_DB = Database(DBINFO['Database']... |
[
"class Todo(db.Model): __tablename__ = 'todo' id = db.Column(db.Integer, primary_key=True) title = db.Column(db.String, nullable=False)",
"default=False, nullable=True) def __init__(self, title: str, contents: str) -> None: self.title = title",
"__repr__(self) -> str: return f'<Todo {self.title}>' class TodoSch... |
[] |
[
"https://www.hackerrank.com/challenges/2d-array a=[0]*6 for i in range(6): a[i]=[int(x) for x in input().split()] c=-9*9 for",
"in range(6): a[i]=[int(x) for x in input().split()] c=-9*9 for i in range(1,5): for",
"in input().split()] c=-9*9 for i in range(1,5): for j in range(1,5): c=max(c,a[i-1][j-1]+a[i-1][j... |
[
"def _handle_msg(self, msg) -> bool: super()._handle_msg(msg) if \"domain_id\" in msg.payload: idx = msg.payload[\"domain_id\"]",
"ATTR_UFH_SYSTEM: { d.id: d.status for d in sorted(self._ctl.devices) if d.type == \"02\" },",
"d.type != \"02\"] ) # devices without a parent zone, NB: CTL can",
"create_dhw(zone_... |
[
"== 'relu': if uniform: init_range = tf.sqrt(6.0 / (n_inputs + n_outputs)) * np.sqrt(2)",
"# 2D convolution def conv2d(x, W, strides=1): conv_2d = tf.nn.conv2d(x, W, strides=[1, strides,",
"crop and concat def crop_and_concat(x1, x2): x1_shape = tf.shape(x1) x2_shape = tf.shape(x2) #",
"x2): x1_shape = tf.sha... |
[
"= enc_units # Size of the hidden units present in GRU. self.embedding =",
"self.GRU(inputs, initial_state = hidden) return output, state if __name__ == '__main__': print('oot sssd",
"= tf.keras.layers.GRU(self.enc_units, return_sequences=True, return_state=True, recurrent_initializer='glorot_uniform', kernel_r... |
[
"the other instances of formatting strings used variables that were not # strings.",
"= \"don't\" y = f\"Those who know {binary} and those who {do_not}.\" hilarious",
"used in a formatted string # recreate the variables from ex6 types_of_people =",
"= f\"Those who know {binary} and those who {do_not}.\" hilar... |
[
"this name? self.pointer = point # points to a linked list in adjacency",
"to a linked list in adjacency list self.rep = rep # string representation",
"= destination self.weight = weight self.capacity = capacity self.name = x self.flow =",
"return self.destination if vertex is self.origin else self.origin def... |
[
"os.makedirs(args.output, exist_ok=True) output_filename = os.path.join(args.output, 'nyc-taxi-fare.pkl') pickle.dump(clf, open(output_filename, 'wb')) print('Model file nyc-taxi-fare.pkl saved!')",
"OneHotEncoder from sklearn_pandas import DataFrameMapper from sklearn.metrics import mean_squared_error print(\"In... |
[
"importlib.import_module(label) except (ImportError, TypeError): pass else: return hasattr(mod, '__path__') return os.path.isdir(os.path.abspath(label)) if __name__",
"module, or \"module.ClassName[.method_name]\", just run those if not os.path.exists(label_as_path): tests = test_loader.loadTestsFromName(label) e... |
[
"coding: utf-8 -*- \"\"\" Singleton class to manage configuration Description: Todo: \"\"\" import",
"to manage configuration Description: Todo: \"\"\" import json import os import sys import",
"except Exception as error: logging.error(error, exc_info=True) return self.config def store(self): try: with open(sel... |
[
"every w in W[l],\", \"this method serves almost no purpose as it causes",
"W[l],\", \"this method serves almost no purpose as it causes neurons to perform",
"almost no purpose as it causes neurons to perform the same calculation in",
"__name__ == \"__main__\": print( \"Zero Initialization:\", \"Since the der... |
[
"Escriba su codigo a partir de este punto <<< ## import pandas as",
"este punto <<< ## import pandas as pd import numpy as np import",
"## Construya una gráfica similar a la presentada en el archivo `original.png` ##",
"## ## Construya una gráfica similar a la presentada en el archivo `original.png`",
"part... |
[
"user_text = dict(zip(keys, row[1:])) write_config_file( user_text, file_name + \".pickle\", directory=\"Resources/Languages/\" + language) #==============================================================================",
"file_name + \".pickle\", directory=\"Resources/Languages/\" + language) #==================... |
[
"= [ ('registration', '0002_auto_20200717_1825'), ] operations = [ migrations.CreateModel( name='Student_Registration', fields=[ ('id', models.AutoField(auto_created=True,",
"[ ('registration', '0002_auto_20200717_1825'), ] operations = [ migrations.CreateModel( name='Student_Registration', fields=[ ('id', models... |
[
"L1) diagonal = retangulo.Diagonal(A1, L1) print(\"Area: {}\".format(area)) print(\"Perímetro: {}\".format(perimetro)) print(\"Diagonal: {}\".format(diagonal)) print(\"\") elif(opcao",
"input(\"Nome: \") s2 = float(input(\"Salário: \")) media =(s1 + s2 ) / 2",
"retângulo: \") L1 = float(input(\"Largura: \")) A1... |
[
"from amara.xpath.locationpaths import nodetests from amara.xpath.functions import nodesets from amara.xpath.expressions import booleans import",
"for attr_op in attr_ops: print attr_op print \" PI OPS\" for pi_op in",
"This would yield nodes, attribute, PIs, and comments #class AnyTest(object): # pass class",
... |
[
"via iteration count = 1 for line in self.tail: assert_that(line, equal_to(u'This is message",
"def teardown_method(self, method): # Revert logger stuff self.handler.close() self.handler = None self.logger =",
"# Check the cache directly to make sure messages were decoded. for i",
"# Revert logger stuff self.... |
[
"0, -1], [1, 0, -1], [1, 0, -1]]) twist_vector = np.array([[0.], [0.], [.5]])",
"offset = np.array([-1, -1, 1]) voxel_size = 2 gradient_field = calculate_gradient_wrt_twist(live_field, twist_vector, array_offset=offset,",
"1] = 0 else: sdf_gradient_wrt_to_voxel[0, 1] = (post_sdf - pre_sdf) / 2 if",
"in range(... |
[
"point): point_name = point.get_point_name() self.point_store[point_name] = point return True def get_point_store(self): return self.point_store",
"__init__(self): self.point_store = {} self.number_points = 0 def set_new_point(self, point): point_name = point.get_point_name()",
"storage options. def __init__(se... |
[
"Número {} foi divisível {} vezes'.format(num,tot)) if tot == 2: print('E por isso",
"não um número primo. num = int(input('Digite um número: ')) tot = 0",
"diga se ele é ou não um número primo. num = int(input('Digite um",
"um número primo. num = int(input('Digite um número: ')) tot = 0 for",
"in range(1,n... |
[
"<reponame>samarv/travo from django.db import models class organization(models.Model): def __str__(self): return self.name name =",
"access_token = models.CharField(max_length=200) installation_date = models.DateTimeField( 'installation date', auto_now_add=True) bot_access_token = models.CharField(max_length=200)... |
[
") -> Image: log(\"Dithering\") palette = hitherdither.palette.Palette( inky._palette_blend(SATURATION, dtype=\"uint24\") ) thresholds = [64,",
"image, palette, thresholds, order=8 ) else: image_dithered = hitherdither.ordered.bayer.bayer_dithering( image, palette, thresholds, order=8",
"thresholds, order=8 ) e... |
[
"be used directly \"\"\" yield @contextmanager def test(testName): \"\"\" As TC.test use \"testName\"",
"TC = TeamcityServiceMessages() ctx_mgr_block = TC.block ctx_mgr_test = TC.test else: ctx_mgr_block = block",
"teamcity.messages import TeamcityServiceMessages @contextmanager def block(name): \"\"\" As TC.bl... |
[
"see in seeAlso: out += \"* `%s`\\n\" % (see[\"data\"]) return out \"\"\" def",
"= sys.modules['DOCC'].DOC dokumentor.report(\"json\", docs) data = json.loads(sys.stdout.data) sys.stdout = sys.__stdout__ hierarchy = {}",
"arg[\"name\"], parseParamsType(arg[\"typed\"]), arg[\"description\"]) if \"params\" in arg... |
[
"import logging import sys import luigi import gokart from gokart_pipeliner.instantiation_task import InstantiationTask from",
"return_value: output = task.output() if type(output) == list: return [x.load() for x in",
"list()): self.config = ConfigManager(params, config_path_list) def run(self, tasks: List[luig... |
[
"data, settings = normalize_data(data, x_column, settings) # x_data = combined_data[x_column].values # Plotting if",
"st.session_state.ever_submitted = submitted | st.session_state.ever_submitted use_plotly = st.checkbox(\"Use plotly?\", value=False) if data is",
"st.markdown(\"### Rescale y-axis\") # st.select... |
[
"mystr_chars[-1]: return palindrome(mystr_chars[1:len(mystr_chars) - 1]) else: return False def main(): print(palindrome(\"racecar\")) print(palindrome(\"kayak\")) print(palindrome(\"Live",
"Write a function that takes a string as a parameter and returns True",
"\"\"\" from string import ascii_lowercase def pal... |
[
"from consensus.entities.ranking import Ranking class Member: @property def name(self): return self._name @property def",
"from typing import Sequence, Optional from consensus.entities.alternative import Alternative from consensus.entities.ranking import Ranking",
"@property def ranking(self) -> Ranking: return... |
[
"= threshold self.denoise = denoise def process_file(self, infile: str, outfile: str) -> None:",
"PIL import Image from pipescaler.core import Processor, validate_image class ThresholdProcessor(Processor): \"\"\"Converts image to",
"as np from PIL import Image from pipescaler.core import Processor, validate_ima... |
[
"Getting arcs for _ in range(m): spoon = input().strip() v, u = spoon.split('",
"_ in range(m): spoon = input().strip() v, u = spoon.split(' ') v, u",
"v, u = spoon.split(' ') v, u = int(v), int(u) grafo.add_edge(v, u) #",
"Getting number of nodes if spoon[:len(\"# number of nodes:\")] == \"# number of",
"i... |
[
"predicts = max(logit, 1)[1] corrects = (predicts.view(y_gt.size()).data == y_gt.data).float().sum() accuracy = 100.0 *",
"torch.nn.functional import cross_entropy def compute_acc(logit, y_gt): predicts = max(logit, 1)[1] corrects = (predicts.view(y_gt.size()).data",
"cross_entropy def compute_acc(logit, y_gt):... |
[
"access_token = r.json()['access_token'] return access_token def hosted_kfp_test(data, context): logging.info('Event ID: {}'.format(context.event_id)) logging.info('Event type:",
"{}'.format(data['metageneration'])) logging.info('Created: {}'.format(data['timeCreated'])) logging.info('Updated: {}'.format(data['up... |
[
"def __init__(self): super().__init__() @abstractmethod def forward_from_batch(self, batch: List[Tensor]): pass class BatchInputModuleFactory(ModuleFactory): def __init__(self):",
"Tensor from torch.nn import Module from tha2.nn.base.module_factory import ModuleFactory class BatchInputModule(Module, ABC): def",
... |
[
"Maybe you didn't compile \" \\ \"the external tools in smodels/lib?\", self.executablePath) return",
"def __init__(self): ExternalNllFast.__init__(self, 7, \"1.2\", testParams=\"gg cteq 500 600\", testCondition=\"500. 600. 0.193E+00 \"",
"executable and executing it. \"\"\" if not os.path.exists(self.executabl... |
[] |
[
"On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python",
"NotificationGroup, ModuleCompliance = mibBuilder.importSymbols(\"SNMPv2-CONF\", \"NotificationGroup\", \"ModuleCompliance\") Bits, Counter64, Gauge32, ObjectIdentity, Counter32, NotificationType, IpAddress,",
"= mibBuilde... |
[
"last code cell. # All args should have a default value if the",
"KIND, either express or implied. # See the License for the specific language",
"Unless required by applicable law or agreed to in writing, software # distributed",
"import yyy import zzz # Top level classes, function definitions, and expression... |
[
"inheriting Chef class from ChineseChef class class ChineseChef(Chef): def make_special_dish(self): print(\"The chef makes",
"from ChineseChef class class ChineseChef(Chef): def make_special_dish(self): print(\"The chef makes orange chicken\") def",
"make_special_dish(self): print(\"The chef makes orange chicke... |
[
"Solution(object): def findMaxLength(self, nums): \"\"\" :type nums: List[int] :rtype: int \"\"\" \"\"\" Method",
"num in enumerate(nums): if num == 0: count -= 1 else: count +=",
"[0, 1] is the longest contiguous subarray with equal number of 0 and",
"[0,1,0] Output: 2 Explanation: [0, 1] (or [1, 0]) is a lo... |
[
"import upy2 from upy2 import u, U from upy2.typesetting import ScientificTypesetter # This",
"anymore since :func:`upy2.numpy_operators.install_numpy_operators` # is now called unconditionally upon importing ``upy2``. U(2).default() ScientificTypesetter(stddevs=2,",
":func:`upy2.numpy_operators.install_numpy_o... |
[
"check each piece has a reasonable size batch_size = 1000 max_piece_size = 100",
"import random import pytest import pandas as pd def build_random_filecounts(min_count=100, max_count=10000): count_before =",
"random import pytest import pandas as pd def build_random_filecounts(min_count=100, max_count=10000): c... |
[
"coroutines to the already running event loop await asyncio.gather( BroadcastTransactionsCommand(self.adapter)(**request), StoreTransactionsCommand(self.adapter)(**request), ) return",
"already running event loop await asyncio.gather( BroadcastTransactionsCommand(self.adapter)(**request), StoreTransactionsCommand... |
[
"True while check: if len(driver.window_handles) > 1: driver.switch_to.window(driver.window_handles[1]) driver.close() else: check = False",
"time from selenium import webdriver import requests driver = webdriver.Chrome(\"driver.exe\") def main(): url",
"webdriver.Chrome(\"driver.exe\") def main(): url = input(... |
[
"= cube_size[2] # 64 self.L = cube_size[0]*cube_size[1] # 90 self.R = self.L*self.D #",
"# * cell ~ [1,batch,H] hidden,cell = self.initializeLSTM(xt) # Prediction container if self.training:",
"hidden ~ [ layers ,batch,H] # * cell ~ [ layers ,batch,H] _,(ht,ct)=",
"# [sequence,batch,4] # Prediction container ... |
[
"''' <NAME> Email: <EMAIL> ''' def retorna_pessoas_preferem_um_unico_palco(quantidade_pessoas_evento): return int ( 25 / 100",
"<EMAIL> ''' def retorna_pessoas_preferem_um_unico_palco(quantidade_pessoas_evento): return int ( 25 / 100 * quantidade_pessoas_evento )",
"<NAME> Email: <EMAIL> ''' def retorna_pessoas... |
[
"value=\"tochigi\">Tochigi</option> <option value=\"gunma\">Gunma</option> <option value=\"saitama\">Saitama</option> <option value=\"chiba\">Chiba</option> <option value=\"tokyo\">Tokyo</option> <option value=\"kanagawa\" selected=\"selected\">Kanagawa</option> <option",
"<option value=\"osaka\">Osaka</option> <... |
[] |
[
"import csv import numpy as np def generate_training_data(folder): r=0 print(\"Generating encodings for db",
"en=face_recognition.face_encodings(known_img)[0] except: print(\"can't generate encodings for \"+img_name+\", give another image\") pass #en=np.array(en) for",
"generate encodings for \"+img_name+\", gi... |
[
"claims_to_quality.lib.util import new_relic_insights, slack import mock def test_new_relic_insights_payload(): \"\"\"Test NR insights payload creation.\"\"\"",
"assert json.loads(payload) == event @mock.patch('subprocess.call') def test_new_relic_insights_post(call): \"\"\"Test NR insights post.\"\"\" payload ="... |
[
"shellcraft.pushstr('/home/pwn/flag') sc += shellcraft.open(\"esp\", 0, 0) # fd = open(\"./flag\", 0, 0); sc",
"pwn import * context.log_level = 'debug' e = ELF('./test_shellcode32') r = remote(\"sunrin.site\", 9017)#process('./test_shellcode32')",
"0, 0) # fd = open(\"./flag\", 0, 0); sc += shellcraft.read(\"e... |
[
"import LaunchConfiguration, ThisLaunchFileDir config = LaunchConfiguration( 'params', default=[ThisLaunchFileDir(), '/teleop.yaml']) def generate_launch_description(): return LaunchDescription([",
"import Node from launch.actions import DeclareLaunchArgument, SetEnvironmentVariable from launch.substitutions impo... |
[
"Pillow #from colors.py import generate_colors import colorthief from colorthief import ColorThief import glob",
"def get_files(): files = list(Path('blockchains').glob('**/*.png')) return files #print (get_files()) def main(): colors_list =",
"= get_colors(i) name = str(i).split('/')[-2] if name == 'info': nam... |
[
"= input(\"请输入查询的单词/输入‘886’离开:\") if unknown_word == '886': empty = input(\"将要替代上次记录的结果,按回车继续...\") df.to_csv('./save_recode_english.csv', index=False, header=False, encoding='utf-8_sig')",
"is None: return None phonetic_symbols = phonetic_symbols.find_all('li') if len(phonetic_symbols) < 2: return None",
"cont... |
[
"locale import time def read_api_key(path): \"\"\"read api key from given path\"\"\" path =",
"key found at given path: \" + path) with open(path) as f: return",
"def set_locale_de(): \"\"\"set the current locale to German or de_DE.utf8 (depending on the",
"setting locale and getting well formated time\"\"\" ... |
[
"= f.behaviour(\"largest interval\") l,r = float(I.args[0]), float(I.args[1]) for f in functions: I =",
"record of the graphs graphed? this can be done by just keeping the",
"make_graph(self, f): I = f.behaviour(\"largest interval\") ps = float(I.args[0]) pe = float(I.args[1]) t",
"= float(I.args[0]) pe = flo... |
[
"peso if peso < menor: menor = peso #saida print(f'O maior peso lido",
"float(input(f'Peso da 1ª pessoa: ')) if i == 0: maior = menor =",
"pessoa: ')) if i == 0: maior = menor = peso else: if",
"if i == 0: maior = menor = peso else: if peso >",
"print(f'O maior peso lido foi de {maior:.2f}Kg') print(f'O men... |
[
"supplied') return json_data # -------- Handled by denzel container -------- def load_model(): \"\"\"",
"to API-caller :rtype: dict \"\"\" # return a dictionary that will be parsed",
"validity of an API request content :param json_data: Parsed JSON accepted from API",
"accepted from API call :type json_data: ... |
[
"Y_train, X_test, Y_test = sc_utils.load_data() X_train, Y_train, X_val, Y_val, X_test, Y_test, tokenizer =",
"str(test_accuracy * 100) + \"%\") # Test model on my own texts reviews",
"\"This movie is bad. I don't like it it all. It's terrible.\", \"I",
"#model = model_factory.create_train_emb_rnn_model(embed... |
[] |
[
"#in #that #way: ') print('Submodule is created.') utils.channels_stuff.set_new_channel(channel_name, subreddit=subreddit_name, tags=tags.lower()) print(channel_name.lower()) print('Run the",
"= input('Channel name: ') tags = input('#Tags #in #that #way: ') print('Submodule is",
"subreddit=subreddit_name, tags=... |
[
"pass def supp_fitness(self): # pylint: disable=no-self-use return 0.0 def set_theta(self, theta): raise NotImplementedError()",
"pylint: disable=no-self-use frame = pickle.dumps((args, kwargs)) return [frame] @classmethod def deserialize(cls, frames): args,",
"License. #You may obtain a copy of the License at ... |
[
"py_client.modules.{module} import endpoints from .common import create_login_model from .mock import mock_post class {classname}(unittest.TestCase):",
"ResponseStatus from ....utils.decoders import build_loader, datetime_decoder __all__ = ['{classname}RequestModel', '{classname}ResponseModel'] class {classname}R... |
[
"raise Exception(raw) return out.get('local') def start(self): self['container'].run(self['cmd']) class MasterModel(BaseModel): def salt_key_raw(self, *args): command",
"salt_key(self, *args): return json.loads(self.salt_key_raw(*args)) def salt_key_accept(self, minion_id): return self.salt_key_raw('-a', minion_i... |
[
"history.events expect = [10, 20, 30] self.assertEqual(expect, result) def test_general_case(self): clicks = rx.Stream()",
"rx.Stream() result = rx.scan_reset_emit_seed( clicks, lambda a, i: a + i, reset=indices) history",
"[] super().__init__() def notify(self, value): self.events.append(value) class TestRx(un... |