ngram
listlengths
0
67.8k
[ "= LayersScraper.get_value(building, 'city') province = LayersScraper.get_value(building, 'province') country = LayersScraper.get_value(building, 'country') postal =", "for UofT's buildings. UofT Map is located at http://map.utoronto.ca/. \"\"\" host = 'http://map.utoronto.ca/'", "\"\"\" host = 'http://map.utor...
[ "\\ InventoryArmor, InventoryTool, InventoryWeapon, InventoryWondrousItem, SkillProficiency from .character_class import CharacterClass, Archetype, FeaturesAtLevel, \\", "Characters \"\"\" from .ancestry import Ancestry, SubAncestry from .background import Background from .character", "from .ancestry import Anc...
[ "print(\"class_info=[\",end='') for i in class_list: if len(i)>=1: print(i,('' if(i==class_list[5]) else ','),end='') num+=1 print(\"]\")", "from bs4 import BeautifulSoup def sigleOrDoubel(str0): num=2; if str0.find('单')!=-1: num=1 elif str0.find('每')!=-1: num=0", "html -> text #reglex import re #import Beautif...
[ "address. Need to provide this when doing an Entrez search and fetch\") parser.add_option(\"-d\",", "#!/usr/bin/python # Retrieve FASTA sequence from NCBI based on an Entrez query. #", "return - 4 if not options.info_file: print \"Please specify the download info file", "parser = OptionParser(usage=usage) par...
[ ".version import __version__, VERSION, metadataD from .ancillary import ProcessAncillary from .searchjson import SearchJsonTandemX,", "Package belonging to Karttur´s GeoImagine Framework. Author ------ <NAME> (<EMAIL>) \"\"\" from .version", "<NAME> (<EMAIL>) \"\"\" from .version import __version__, VERSION, me...
[ "-= h; x -= 2.5; } }''' compute = cpp.generate('compute', 'void(std::string, double, double,", "= z * z + c; ++i; } return max_iter - i; }", "<< \" \"; x += h; } f << \"\\n\"; y -= h;", "sys import copperhead as cpp extra_compile_args = \"'/std:c++14'\" if sys.version.split('[')[1].startswith('MSC') else \"'-...
[ "\"\"\" Subtracts a background that is based on multiple images stored in an", "BackgroundSubtractor: \"\"\" Subtracts background from an image \"\"\" @abstractmethod def subtract_background(self, image: np.ndarray)", "super().__init__() self.background_dset = background_dset # Calculate background image self.c...
[ "whether hold should be turned on or off (default: True) Returns: None '''", "be saved. If it is False, then the file is only saved upon", "= cursession() if not document: document = curdoc() if session: return session.store_document(curdoc()) else:", "Returns: plot : the current default plot (or None) ''' re...
[ "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,", "T \\) has positive support ie. \\( T \\in [0, \\infty) \\). *", "= datasets.load_dataset('SUPPORT') ``` #### `auton_survival.preprocessing` This module provides a flexible API to perform", "datasets features, outcomes = data...
[ "open(\"outFiles/outcontent.txt\", mode=\"a\", encoding=\"utf-8\") filecontent.write(\"\\n\\n\\n=========={}==========\\n\".format(filename)) filecontent.write(\"\\n\".join(str(el) for el in outcontent)) except IOError as identifier:", "filecontent = open(\"outFiles/outcontent.txt\", mode=\"a\", encoding=\"utf-8\...
[ "models.ForeignKey(User, on_delete=models.DO_NOTHING, related_name='cards') language = models.ForeignKey(Language, on_delete=models.DO_NOTHING, related_name='cards') times_shown = models.IntegerField(default=0) answered_correctly =", "if not created: grant_achievements(instance) else: grant_achievements(instance....
[ "\"\"\"Replace the Return statement with a Store statement \"\"\" return _make.Store(self.buffer_var, _make.Cast(self.dtype, node.value),", "def addition(x, y): hcl.return_(x+y) A = hcl.compute((10, 10), addition) # example 2 -", "prepare the iteration variables args = [] # list of arguments' names nargs", "i...
[ "if stunde < 0: raise StundeZuKlein(stunde) if stunde > 60: raise StundeZuGross(stunde) self.__stunde", "None self.stunde = stunde pass def __repr__(self): return f\"<Stunde {self.__str__()}>\" def __str__(self): return", "VergleichsStammZahl from Kronos_heureka_code.Zeit.Uhrzeit.Stunde.StundeException import *...
[ "-*- from django.contrib.auth.backends import ModelBackend from django.contrib.auth.models import User class DKSSOBlindTrustAuthenticator(ModelBackend): def authenticate(self,", "utf-8 -*- from django.contrib.auth.backends import ModelBackend from django.contrib.auth.models import User class DKSSOBlindTrustAuthen...
[ "absolute deviation from mean from feature distribution return np.mean(np.absolute(self.dataset[self.column] - np.mean(self.dataset[self.column]))) def absolute_deviation_from_median(self):", "factor from feature distribution return scipy.stats.skew(self.dataset[self.column]) def entropy(self): # call for entropy...
[ "= docs.cpu().data.numpy() ques = ques.cpu().data.numpy() if ex_counter == 0: documents = docs questions", "params['feature_dict'] except BaseException: logger.warn('[ WARN: Saving failed... continuing anyway. ]') # ------------------------------------------------------------------------------ #", "args.domain,...
[ "import sys from pysnptools.snpreader.bed import Bed import subprocess cleanDataPath='/net/mraid08/export/jafar/Microbiome/Analyses/PNPChip/cleanData/' rawDataPath='/net/mraid08/export/jafar/Microbiome/Analyses/PNPChip/rawData' pheno_fn_bac =os.path.join(cleanDataPath,'noMissingKakiPhenotypesWithCovariates_nodfukim...
[ "regex_pattern[3].strip()) new_evidence_text = re.sub(r\"\\s{2,}\", \" \", new_evidence_text) new_evidence_text = re.sub(r'(\\\\)(\\w)', r'\\g<2>', new_evidence_text) new_evidence_text", "elif result['errors']: if not reports: logger.info('\\n'.join([x.to_string() for x in result['errors']]) + \"\\n\") else:", ...
[ "\"report\" INSPECT_CMD = \"inspect\" REMOVE_CMD = \"remove\" RETRIEVE_CMD = \"retrieve\" STATUS_CMD = \"status\"", "ENV_VARS = { \"namespace\": \"PIPESTAT_NAMESPACE\", \"config\": \"PIPESTAT_CONFIG\", \"results_file\": \"PIPESTAT_RESULTS_FILE\", \"schema\": \"PIPESTAT_RESULTS_SCHEMA\", \"status_schema\": \"PIPES...
[ "[ afhsb, cdc, covid_hosp_facility_lookup, covid_hosp_facility, covid_hosp_state_timeseries, covidcast_nowcast, covidcast_meta, covidcast, delphi, dengue_nowcast, dengue_sensors, ecdc_ili,", "nidss_dengue, nidss_flu, norostat, nowcast, paho_dengue, quidel, sensors, twitter, wiki, signal_dashboard_status, signal_d...
[ "id): pass class LoggingLedController(LedController): def reset(self): logging.info('Reset') def set(self, id): logging.info('set {}'.format(id)) #", "connected LEDs class I2CLedController(LoggingLedController): def __init__(self): self.bus = smbus2.SMBus(1) self.bus.write_byte_data(0x20, 0x00, 0x00) self.bus.wri...
[ "td_sigi = read('Sig1000_IMU.ad2cp', userdata=False) td_sigi_ud = read('Sig1000_IMU.ad2cp') td_awac = read('AWAC_test01.wpr', userdata=False) td_awac_ud =", "!CLEANUP! # BUG that's loading different data??! td_sigi.pop('sys.temp_mag') dat_sigi_tmp = dat_sigi.copy() dat_sigi_tmp.pop('sys.temp_mag') td_sigi_ud.pop(...
[ "such device %s:%s', name, device_id) abort(404) log.info('Successfully removed soft limit for device %s:%s", "computation_node = abort_when_node_not_found(name) if int(soft_limit) < 0: log.error(str.format('Number is not positive: {}', soft_limit))", "\\ COMPUTATION_NODE_FETCHED_RESPONSE, DEVICE_IDENTIFIER_PAR...
[]
[ "> 6: print(\"SHOULD NOT CREATE SHUFFLE\") shuffle=\"noshuffle\" list_images = os.listdir(image_folder) driving_video = imageio.mimread(template_video)", "make_animation from skimage import img_as_ubyte warnings.filterwarnings(\"ignore\") if len(sys.argv) < 6: print(\"Usage: deepfake_multiple.py <source", "(256...
[ "language, } ) # Reset id to make sure id does not conflict", ":return: data necessary for API :rtype: dict \"\"\" return { \"id\": event.id, \"start_date\":", "temporary translations of this recurrence recurrence_translations = {} if event.region.fallback_translations_enabled: languages = event.region.active_l...
[ "file_name = r'/Users/andrewlowe/yipitdata/Q4_2013_Groupon_North_America_Data_XLSX.xlsx' df = pd.read_excel(file_name) # Q4_13_NA dataframe Q4_13_NA = df #", "are 138534 items in the dataframe. Q4_13_NA.shape Q4_13_NA.describe() Q4_13_NA.describe(exclude='number') Q4_13_NA[] segment_local = Q4_13_NA[(Q4_13_NA['Se...
[ "\"reverse####.jpg\", \"randwalk####.pdf\", and \"randwalk####.txt\", where \"####\" ranges through the powers of 2 from", "the cumulative differences between the subpopulation and the full population, controlling for the", "FileExistsError: pass dir += '/' # Consider both the original ordering of covariates", ...
[ "Test RemoteAgent Unit \"\"\" import pytest import requests import secrets from starfish.agent.remote_agent import", "assert(agent.http_client) new_client = object() agent.http_client = new_client assert(agent.http_client) assert(isinstance(agent.http_client, object)) def test_remote_agent_get_adapter(): ddo", ...
[ "signatures_nw=signatures_nw, subclip=(5*60,-10*60)) # cut 5-10 minutes to avoid credits. # Get the signatures", "means that the algorithm will iteratively diversify the frames # used until the", "load the image to reconstruct. This could be any image but out of", "the # same dimensions as the frames that wil...
[ "spot check 2% of a file of more than 200 variants. :param mafFile:", "in a if k==i]) # if checkIt==1: UpdateProgress(count, len(a), \"INFO: Verifying maf file\")", "the reference sequence + 1 preceding base for the DEL refAnchorPos = str(int(pos)", "\"NA\"][0] total_reads = str(int(ref_reads) + int(alt_reads...
[ "list = 18pfd_wk{i:02d}.txt folder = repository\\wk{i:02d} count_commits = True run_all = True pound_count", "folder = repository\\wk{i:02d} count_commits = True run_all = True pound_count = True after", "after = 2018-08-27 12:52 \"\"\" for i in range(5, 10+1): if 8 !=", "True run_all = True pound_count = Tru...
[ "def test_finalize(): with raises(TypeError): finalize(1) a = variable(range(10), default=2) assert finalize(a)[finalize(a).value] == finalize(a).value", "import Tunable from tuneit.finalize import finalize from pytest import raises def test_finalize(): with", "finalize(a).value.fixed d = b.copy() assert d.comp...
[ "s3_hello(person_name): print('Hello There Person:', person_name) def s3_push_delete_local(local_file, bucket, bucket_filepath): print('def s3_push_delete_local(local_file, bucket, bucket_filepath):')", "def s3_hello(person_name): print('Hello There Person:', person_name) def s3_push_delete_local(local_file, buck...
[ "elif func == 'sin': outputs['y'] = np.sin(inputs['x']) else: outputs['y'] = func(inputs['x']) class TestOptionsDictionaryFeature(unittest.TestCase):", "OptionsDictionary, ExplicitComponent import unittest from six import PY3, assertRegex import numpy as np", "3.] prob.run_model() assert_rel_error(self, prob['y...
[ "metrics.set_meter_provider(MeterProvider(stateful=False)) # Track telemetry from the requests library RequestsInstrumentor().instrument() meter = RequestsInstrumentor().meter exporter", "All rights reserved. # Licensed under the MIT License. # pylint: disable=import-error #", "RequestsInstrumentor from opentel...
[ "= get_current_commit() commit_applied = get_git_logs(last_commit_id, current_commit_id) if commit_applied: commit_applied = \"••• \" +", "@task def deploy(): try: target_host = env.hosts[0] except IndexError: target_host = 'dev' with", "error\".format(env.hosts[0])) raise SystemExit() else: return result def d...
[ "'app', [App, None], None, ), # 3 (4, TType.STRUCT, 'user', [User, None], None,", "- action - request - context \"\"\" def __init__(self, action=None, request=None, context=None,): self.action", "1 (2, TType.STRING, 'type', 'UTF8', None, ), # 2 (3, TType.MAP, 'config', (TType.STRING,", "if self.url is not Non...
[ "x_t + b_{iz} + W_{hz} h_{(t-1)} + b_{hz}) \\\\ n_t = \\tanh(W_{in} x_t", "i_r + h_r inputgate_tmp = i_i + h_i sigmoid = nn.Sigmoid() resetgate =", "x in torch.unbind(input_, dim=dim): # x dim is B, I hidden = self.cell(x,", "= sigmoid(resetgate_tmp) inputgate = sigmoid(inputgate_tmp) hr = self.h2h(hidden * r...
[ "event evert hour, but with cron schedule = Schedule( actor=instance, verb=EVERY_HOUR, minute=instance.created.minute, hour=\"*/1\"", "datetime from django.db.models.signals import post_save from django.dispatch import receiver from django_celery_beat.models import DAYS", "from django.db.models.signals import p...
[ "Noriter.UI.Layout import * from Noriter.UI import NoriterWindow as nWin class SideWindow (nWin.NoriterWindow, QtGui.QWidget):", "NoriterWindow as nWin class SideWindow (nWin.NoriterWindow, QtGui.QWidget): def __init__(self): super(SideWindow, self).__init__() self.setContextMenuPolicy(QtCore.Qt.CustomContextMenu...
[ "and x.state not in ('done', 'cancel')) if move: product_uom_factor = prod.product_uom_id._compute_quantity(prod.product_qty - prod.qty_produced,", "product_uom_factor = prod.product_uom_id._compute_quantity(prod.product_qty - prod.qty_produced, prod.bom_id.product_uom_id) qty1 = sub_product_line.product_qty qty1...
[]
[ "return np.array(out) def seqs_to_seq_of_prefix(seqs): out = [] for seq in seqs: out.append(seq[0]) return", "= np.split(np_sample, starting_chromosome_idxs)[1:] chromosomes_dists = np.split(np_dists, starting_chromosome_idxs)[1:] out = [] for i in", "= [] noised_seqs = [] for i in range(n_seqs): seq = np.array...
[ "self.ser.write('ATZ\\r'.encode()) time.sleep(0.5) self.ser.write('AT+CMGF=1\\r'.encode()) time.sleep(0.5) self.ser.write(('''AT+CMGS=\"''' + recipient + '''\"\\r''').encode()) time.sleep(0.5) self.ser.write((message + \"\\r\").encode())", "= message def connectPhone(self): self.ser = serial.Serial('COM7', 9600, ...
[ "world\" @app.route('/youtube/<link>') def youtube(link): print(\"ENTERED\") url = 'https://www.youtube.com/watch?v='+link print(url) result,status = (baritone.pipeline(url,'youtube')) convert", "result,status = (baritone.pipeline(url,'youtube')) convert = { 'url': url, 'text': result, 'converted':status } return...
[ "for details. import json import unittest import os.path import requests_mock from pypd import", "PagerDuty. # See LICENSE for details. import json import unittest import os.path import", "self.assertEqual(data[\"routing_keys\"][0], \"<KEY>\") @requests_mock.Mocker() def test_fetch_all_rulesets(self, m): # setu...
[]
[ "class BaseMixin: def __init__(self, name: str): self.name = name def __repr__(self): return '<{module}.{cls}", "base classes for AWS\"\"\" class BaseMixin: def __init__(self, name: str): self.name = name", "BaseMixin: def __init__(self, name: str): self.name = name def __repr__(self): return '<{module}.{cls} {...
[ "enhance the parser with 'on the fly' data quality audit or export. \"\"\"", "] #start event callbacks self._end_callbacks = [ ] #end event callbacks self._children =", "\"\"\" return dict(self._element_ancestors) def registerStartEventCallback(self, func): \"\"\" Register a callback for start event.", "a uni...
[ "SPDX-License-Identifier: Apache-2.0 from subprocess import call, STDOUT from shutil import copyfile import sys", "pass def replace_template_var(template_file, var, value): with fileinput.FileInput(template_file, inplace=True, backup='.bak') as file: for line", "rights reserved. # SPDX-License-Identifier: Apach...
[ "plasmasystem self.eaffinity = 4.05*const.elementary_charge def __call__(self, zcharge, radius): return self.ptunnel(zcharge, radius) def rt_affinity(self,", "np import scipy.constants as const from scipy.integrate import solve_ivp PI = const.pi KE", "0.0, 0.0, tunnel_gain, energy_gain, energy_loss]) nano_qdens...
[ "# # Licensed under the Apache License, Version 2.0 (the \"License\"); # you", "writing, software # distributed under the License is distributed on an \"AS IS\"", "-*- # # Copyright 2009 <NAME> # # Licensed under the Apache License,", "KIND, either express or implied. # See the License for the specific langua...
[]
[]
[ "MB s = list(s) i = j = k = 0 # i:", "while still preserving whitespace and initial word order. 1 <= s.length <= 5", "words in s are separated by a single space. \"\"\" import unittest class", "i += 1 k -= 1 i = k = j + 1", "s, reverse the order of characters in each word within a sentence while", "i += 1...
[ "= sp_typ + f'elodie_{dataset}_{imanum}.fits' path = '' if path is None else path", "= self.BASE + f'c=i&a=mime:application/fits&o=sophie:[{s1d},{seq}]' filename = f'sophie_[{s1d},{seq}].fits' path = '' if path is", "self.BASE + f'n=sophiecc&ob=bjd&a=csv&o={self.obj}&d=' int_cols = ['seq','sseq','slen','nexp','...
[ "DeleteSurvey(self, request, context): \"\"\"Delete a survey and its associated agent (if existent) \"\"\"", "not implemented!') raise NotImplementedError('Method not implemented!') def GetSurveyAnswers(self, request, context): \"\"\"Retrieve answers to", "request_deserializer=ondewo_dot_survey_dot_survey__pb2....
[ "op): setattr(OpcodeDefaults, op, True) class OpcodeStatus(object): _immutable_fields_ = [\"frozen\", \"use_flag_cache\"] + dual_implementation_opcodes def", "== \"AggStep\": self.AggFinal = value elif whichop == \"AggFinal\": self.AggStep = value def", "s == \"all\": for op in unrolling_dual_implementation_opc...
[ "an ID, skip if there is not one try: od['Name'] = record['Cities']['GEO.display-label'] except", "try: od['Name'] = record['Cities']['GEO.display-label'] except KeyError: pass cities_list.append(od) with open(\"output.json\", \"w\") as f:", "key_File = open(\"../resources/key\") BASE_ID = keyFile.readline().rs...
[ "the sums of hits against all their articles from article_hits database view\"\"\" \"\"\"Example", "from executed command and formats for report viewing\"\"\" print \"\\r\\nOn which days did", "popular authors of all time.\"\"\" popular_authors() \"\"\"Generate a report of the day(s) with", "SUM( article_hits...
[ "program import control SOCK_PORT = 4242 HTTP_PORT = 80 robotContoler = control.control(HTTP_PORT, SOCK_PORT)", "#Kent State Univeristy - RMC team #<NAME> 2018 # #Starts program import control", "Univeristy - RMC team #<NAME> 2018 # #Starts program import control SOCK_PORT =", "RMC team #<NAME> 2018 # #Starts...
[ "X, freq_weights = weight, family = bin_family) my_glm_fit = my_glm.fit() theta = my_glm_fit.params", "as sm from statsmodels.genmod.generalized_linear_model import GLM from statsmodels.genmod.families import Binomial from statsmodels.genmod.families.links import", "datetime.datetime.now() cur.execute(\"INSERT ...
[ "* sqrt39) / 54880 C = (297 - 47 * sqrt39) / 32928", "points, 7, citation) def stroud_secrest_11(): sqrt5 = sqrt(5) sqrt39 = sqrt(39) sqrt195 =", "sqrt195) for p_m in [+1, -1] ] eta = sqrt(36 + 4 *", "* sqrt130) / 11) xi = sqrt(288 + 24 * sqrt130) eta =", "[ (A, numpy.array([[0, 0, 0]])), (B, pm_roll(3, [xi...
[ "or SafeOP.eq(a,b) @staticmethod def le(a,b): return SafeOP.lt(a,b) or SafeOP.eq(a,b) @staticmethod def ne(a,b): return", "\"abiFilters\": OPTIONAL [ { name STRING REQUIRED rvalue HEXSTR OR INT REQUIRED type", "def __init__(self,fltr): self._name = fltr[\"name\"] type_factory = getattr(Types,fltr[\"type\"]) sel...
[ "missing months df_new = dd_for_site(stn, next_mo).query('coverage > @MIN_COVERAGE').copy() if len(df_new): # put this", "compression='bz2') If the file is located on a web server, you can read", "\"\"\" from os.path import dirname, join, realpath import sys from datetime import datetime,", "to the existing o...
[ "for move in moves: child = deepcopy(board) self.move_black(child, *move) score = -self.negamax(child, depth", "self.BEST_MOVE = moves[0] for move in moves: child = deepcopy(board) self.move_black(child, *move) v", "if depth == 0 or self.game_over(board): return color * self.evaluate(board) v = float('-inf')", ...
[ "ugly[-1]: i5 += 1 ugly.append(min(ugly[i2] * 2, ugly[i3] * 3, ugly[i5] * 5))", "{integer} def nthUglyNumber(self, n): ugly_number = 0 heap = [] heapq.heappush(heap, 1) for", "ugly = [1] i2 = i3 = i5 = 0 while len(ugly) <", "0 == 30**30 % num # V2 # Time: O(n) # Space: O(1)", "[1] i2 = i3 = i5 = 0 while len...
[ "dbcurs.fetchone() points.append((node[2], node[1])) center = None if len(points) == 2: line = LineString(points)", "= 5000 while offset < count : sql = \"SELECT * FROM ways", "lon, woeid, way_id)) dbconn.commit() time.sleep(2) offset += limit return if __name__ == '__main__'", "= dbconn.cursor() dbcurs.execu...
[ "open(fileName,'r') a = json.loads(file.read()) file.close() return a # NGな単語かNGな語句が入っていたらTrue そうでないならFalse def is_ng_trend(trend): if", "sqlalchemy import and_ import random # /home/*/hama_dbとかが返ってくる #exec_path = os.path.abspath(os.path.dirname(__file__)).rsplit(\"/\",1)[0] exec_path = \".\"", "#l = tw.home_ti...
[ "if len(question[\"options\"]) > 10: raise ValueError(\"options array is greater than 10\") for option", "raise ValueError(\"options array is greater than 10\") for option in question[\"options\"]: if len(option)", "Basic logging setup \"\"\" logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - ...
[ "OF YOUR CODE (DO NOT DELETE/MODIFY THIS LINE)***** ############################################################################# # TODO: # #", "dW[:,y[i]] += -1*X[i] # Right now the loss is a sum over all", "correct_scores = correct_scores_vec[:,np.newaxis] # broadcasting-ready vec # compute margins M = S -", ...
[ "xml.etree.ElementTree import docutils.core def load_pairs(): # Load pairs of \"example ID, rules code\"", "import docutils.core def load_pairs(): # Load pairs of \"example ID, rules code\" for", "pairs of \"example ID, rules code\" for the test suite. rst_code = _load_rst()", "(slug, i), block.text)) return ...
[ "non-negative number, n. #Credits: #Special thanks to @mithmatt for adding this problem and", "description and prototypes) # Question Title and Description on leetcode.com # Function Declaration", "# :type n: int # :rtype: int # \"\"\" # Time Is Money", "\"\"\" # :type n: int # :rtype: int # \"\"\" # Time Is"...
[ "django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations =", "), migrations.CreateModel( name='Post', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_n...
[ "return self.TABLE.__class__.__name__ @property def id(self): return f'{self.TABLE_NAME}ID' @property def cols(self): return [{k: v}", "table \"\"\" NAMESPACE = os.getenv('ECMS_HOST') FORIEGN_KEYS = {} def __init__(self): self.TABLE = self.__class__", "\"\"\" NAMESPACE = os.getenv('ECMS_HOST') FORIEGN_KEYS = {}...
[ "-> int: res = dict() s = 0 ans = 0 for i,", "res[s] = i if s - 1 in res: ans = max(ans, i-res[s-1])", "int: res = dict() s = 0 ans = 0 for i, c", "if s not in res: res[s] = i if s - 1 in", "hours: List[int]) -> int: res = dict() s = 0 ans = 0", "= 0 for i, c in enumerate(hours): s += 1 if c >", "0 for ...
[ "return self._name @property def power(self): \"\"\"Power reading of CT clamp in W\"\"\" return", "= value @property def name(self): \"\"\"Name of CT clamp\"\"\" return self._name @property def", "= name self._value = value @property def name(self): \"\"\"Name of CT clamp\"\"\" return", "-> None: self._name =...
[ "File Dir” # 在当前文件夹下将hello_world.txt文件复制为hello_world_bak.txt src = r'hello_world.txt' dst = r'hello_world_bak.txt' import shutil shutil.copyfile(src,", "# 先确认在VSCode的Settings中,勾选“Terminal:Excute In File Dir” # 在当前文件夹下将hello_world.txt文件复制为hello_world_bak.txt src = r'hello_world.txt' dst = r'hello_world_bak.txt'", ...
[ "\"zone\": \"global\", }, {\"status\": RequestStatus.FAILED, \"error\": \"stream ended\"}, ) except Exception as e:", "rois = [] lines = [] for region in video_info.regions: points = []", "parser.add_argument( \"--debug\", default=False, type=lambda x: (str(x).lower() == \"true\") ) args = parser.parse_args() a...
[ "perturbations. Note this vary rarely makes any significant # differences method='model-scoring') # corss", "test_z): self._skater_model, self._skater_interpreter = _create_skater_stuff(md, test_x, test_z) def save_plot_feature_importance(self, file_path): fig, ax =", "skater.core.explanations import Interpreta...
[ "\"\"\" search = tmdb.Search() response = search.movie(query=title) return search.results def search_tv(title): \"\"\" Connects", "= tmdb.Search() response = search.movie(query=title) return search.results def search_tv(title): \"\"\" Connects to API", "\"\"\" search = tmdb.Search() response = search.tv(query=t...
[ "packages to be created:\\n {}\".format(\"\\n \".join(packages))) # Get long description from README with", "open(requirements_file) as buffer: requirements = buffer.read().splitlines() requirements = list(set(requirements)) requirements_string = \"\\n \".join(requirements)", "import find_packages, setup # Read...
[ "\"city\": address_1.city, \"companyName\": address_1.company_name, \"id\": address_1.id, \"street\": address_1.street, \"zip\": address_1.zip, }, { \"city\":", "data[\"companyName\"] assert address.street == data[\"street\"] assert address.zip == data[\"zip\"] def test_edit_someone_else_delivery_address(client_b...
[ "pygame.image.load(ip4).convert_alpha() def draw_barrier(self): food_obj1 = pygame.Rect(int(self.lis[0].x*cell_size),int(self.lis[0].y*cell_size),cell_size,cell_size) food_obj2 = pygame.Rect(int(self.lis[1].x*cell_size),int(self.lis[1].y*cell_size),cell_size,cell_size) food_obj3 = pygame.Rect(int(self.lis[2].x*cell...
[ "if len(passtotake) < 8: passtotake = nametotake[:nametotake.index('.')] +passtotake pyautogui.write(nametotake) pyautogui.press(\"TAB\") pyautogui.write(passtotake) pyautogui.press(\"ENTER\") sleep(1)", "[i[:-1] for i in passwords if passwords.index(i) % 2 == 0] for i", "pyautogui from time import sleep from r...
[ "None class Client(object): def __init__(self, svc, config, registry): self.svc = svc self.config =", "GetRegistryName(self): \"\"\" Get registry table name \"\"\" return self.registry_name or 'roster' def GetHashKey(self):", "registry_name='', *args, **kwargs): self.registry_name = registry_name self.region = ...
[ "NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version", "admin_service.AdminCommunicatingStub(channel) client = admin_msg.Client() client.client_name = self.client_name messages = stub.Retrieve(client) for i in", "root_cert: root certificate ssl_cert: SSL certificate private_k...
[ "code_name = 'chinook_models_nojoined.py' generate_code_file(code_name, engine, nojoined=True) import_code(code_name) def generate_code(engine, **kwargs): \"\"\" CodeGenerator.__init__(self, metadata,", "nobackrefs=False, flask=False, ignore_cols=None, noclasses=False, nocomments=False) \"\"\" metadata = MetaData...
[ "args.model_name) # if we find an optimized model, then we will use that", "volume_mounts.extend([ \"--volume\", \"{}:{}\".format(output_dir, output_dir)]) docker_run_cmd = [\"docker\", \"run\"] # only use -it when", "KIND, either express or implied. # See the License for the specific language", "action=\"sto...
[ "\"\"\" pass def test_road_segmenter_list(self): \"\"\" The road_segmenter function should return a list :return:", "\"\"\" for road in self.road_net: road = convert(road) self.assertIsInstance(road[\"the_geom\"], dict, \"geometry_to_list should return", ":return: Nothing \"\"\" margin = 3 for road in self.road...
[ "group=\"authority\") x509_cert: str = betterproto.string_field(2, group=\"authority\") presentation_type_uri: str = betterproto.string_field(10) valid_from_utc: int =", "def unregister_issuer( self, *, did_uri: str = \"\", x509_cert: str = \"\", credential_type_uri:", "\"CheckIssuerStatusResponse\": request = ...
[]
[ "from metrics.wasserstein import wasserstein_2 def compute_metrics(ds, split, inv_temp, num_parties, num_classes, alpha, lengthscale, party_datasets,", "dkls_after = average_dkl(party_datasets_with_rewards, reference_dataset) print(dkls_after) print(\"Correlation coefficient with alpha: \\n{}\".format(np.corrcoef...
[ "high influence on the reconstruction error. Transition that have a high gradient on", "should be changed further and therefore given a low reward. \"\"\" batch_dim =", ") action_recon = mode_latent_model.reconstruct_action( features_seq=features_seq, mode_sample=posterior['samples'] ) ll = action_recon['dists'...
[]
[ "= [ ('addresses', '0001_initial'), ('orders', '0002_auto_20200204_1253'), ] operations = [ migrations.AddField( model_name='order', name='billing_address',", "12:55 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [", "] operations ...
[ "Image.open(s) self.assertEqual(im.size, (500, 500)) self._assert_noerr(im) def test_g4_eq_png(self): \"\"\" Checking that we're actually getting", "if tag not in ignored: if tag.endswith('Resolution'): val = original[tag] self.assert_almost_equal( val[0][0]/val[0][1], value[0][0]/value[0][1],", "= Image.open(f...
[ "'val1', 'key2': 'val2'} test_master_url = \"TEST1\" test_app_name = \"TEST_APP\" mock_spark_session_builder = Mock() #", "unittest from unittest.mock import Mock from app_processor.pyspark_hb_app_processor import parse_configs, get_or_generate_spark_session class TestAppProcessor(unittest.TestCase): def", "sel...
[ "check_validation_ID_Post import check_validation from driver_chrome import * from DataScrapting import * tracking_ID =", "i,j in zip( [i for i in dst_lst if not dst_lst.index(i)%2], [i for", "j.text) for i,j in zip( [i for i in dst_lst if not dst_lst.index(i)%2],", ": ghostbusters(f\"\\n {warning.text}\") el...