ngram
listlengths
0
82k
[ "cursor, f\"PO # : {job.name}-{STYLE}-{SPECIES}\") c.drawString( (PAGE_WIDTH / 2) +", "N/A \", height=INPUT_HEIGHT, width=30, borderWidth=0, # fillColor=([1, 1, 1]), relative=True,", "2 ) self.canv.drawCentredString( self.string_center, 0.25 * self.height, self.dwr_size ) def", "- (LEFT_MARGIN / 2) - 87, bord...
[ "if __name__ == \"__main__\": bq_service = BigQueryService() bq_service.migrate_daily_bot_probabilities_table() print(\"MIGRATION SUCCESSFUL!\")", "BigQueryService if __name__ == \"__main__\": bq_service = BigQueryService() bq_service.migrate_daily_bot_probabilities_table() print(\"MIGRATION", "from app.bq_serv...
[ "self.other_distribution ) def _check_input_parameters(self): super(MiniGridDoorKeyMDP, self)._check_input_parameters() assert self.size >= 3", "== MiniGridDoorKeyDirection.UP: grid[self.cur_node.Y, self.cur_node.X] = \"^\" elif self.cur_node.Dir == MiniGridDoorKeyDirection.RIGHT:", "DropObject = 4 UseObject = ...
[ "# #print(con_admin.firebird_version) # # # this removes ALL connections -->", "# # This DOES NOT remove all attachments (only 'last'", "# # c = fdb.connect(dsn = dsn) # a =", "0: # time.sleep( ATT_DELAY ) # # c = fdb.connect(dsn", "from MON$ATTACHMENTS using ORDER BY clause doesn't close the corresponding"...
[ "\"email\": cells[5].get_text(), } if senateperson[\"email\"]: self.senate.append(senateperson) def run(self): try: self.get_senate(self.search_url)", "level=logging.INFO) def get_html(url): return requests.get(url).text class SenateCrawler: def __init__(self): self.base_url", "%(levelname)s:%(message)s\", leve...
[ "= \"autocomplete_reference_number\" factory_class = ReferenceNumberFactory def validate_item(self, item): self.assertEqual(item[\"id\"], self.obj.id)", "basename = \"autocomplete_document_type\" factory_class = DocumentTypeFactory def validate_item(self, item): self.assertEqual(item[\"id\"],", "self.assertEqua...
[ "list(set(result)) @property def actions(self) -> List[IAction]: return self._actions @property def", "action.source_version return None def target_version(self, application: str) -> str: for", "self._state def source_version(self, application: str) -> str: for action in", "actions: List[IAction]) -> None: se...
[ "is not None: tmp_data[\"enabled\"] = int(bool(enabled)) if data: tmp_data[\"data\"] =", "return response.json() def update(self, guid, name=None, type=None, enabled=None, data=None, org=False):", "request URI api_uri = f\"/api/v2/ContainerRegistries/{guid}\" response = self._session.delete(api_uri, org=org) if...
[ "encoder outputs word_input = word_input.unsqueeze(0) # we are not using", "lr_scheduler = { 'scheduler': optim.lr_scheduler.OneCycleLR( optimizer, max_lr = self.learning_rate, steps_per_epoch", "optim.AdamW(self.parameters(), lr=self.learning_rate) lr_scheduler = { 'scheduler': optim.lr_scheduler.OneCycleLR( o...
[ "= api_url consent_module_config[\"config\"][\"redirect_url\"] = redirect_url satosa_config_dict[\"MICRO_SERVICES\"].append(consent_module_config) # application test_client =", "werkzeug.test import Client from werkzeug.wrappers import Response from satosa.proxy_server import", "re import responses from werkzeu...
[ "2.0 (the \"License\"); # you may not use this file", "= self.drop(y) mems = None if mems is None else", "= qc.Dropout(cfg.drop, **kw) def init_mems(self, b): cfg = self.cfg if", "None r_bias = None else: q_bias = nn.Parameter(torch.FloatTensor(cfg.n_heads, cfg.d_head)) r_bias", "mems is None: mems = self.i...
[ "source dir dest_root = args.dest_root # specify your destination dir", "im_meta[\"bb\"] = bbs[i] facial5points = [[landmarks[i][j], landmarks[i][j + 5]] for", "# im_meta['ref'] = \"/\".join(image_name.split('/')[-5:]) img_warped.save(image_name) li_meta.append(im_meta) meta[ref] = li_meta with", "meta[ref] =...
[ "srtvoiceext import extract if __name__ == '__main__': ext = extract('video.mkv',", "import extract if __name__ == '__main__': ext = extract('video.mkv', 'subtitles.srt',", "extract if __name__ == '__main__': ext = extract('video.mkv', 'subtitles.srt', 'outdir')", "from srtvoiceext import extract if __name__ ...
[ "ReadOnlyDict') def __delitem__(self, key): raise TypeError('Cannot modify ReadOnlyDict') def __iter__(self):", "return iter(self.store) def __len__(self): return len(self.store) def __str__(self): return 'ReadOnlyDict(%s)'", "return len(self.store) def __str__(self): return 'ReadOnlyDict(%s)' % self.store def ...
[ "self.map_box[:] = map_with_attr def handle_input(self, _input): if _input == \"ctrl", "for b in self.parent.bodies][self.focus_position] self.parent.update_body(new_body) except: pass class ButtonLabel(urwid.SelectableIcon): def", "b in _frames} idx = -1 _title = _frames[idx] self.active_body", "{player.move...
[ "\"array\", \"items\": {\"type\": \"number\"}, } _combined_schemas = { \"$schema\": \"http://json-schema.org/draft-04/schema#\",", "\"type\": \"array\", \"items\": {\"type\": \"array\", \"items\": {\"type\": \"number\"}}, }, ],", "\"type\": \"boolean\", \"default\": True, \"description\": \"whether to calculate...
[ "cols and number of blocks are incompatible\" # calculate size", "name='Conv52_{}'.format(rr))(x51) if use_bn: x52 = BatchNormalization()(x52) x52 = ELU(name='elu_x52_{}'.format(rr))(x52) x", "decreased throughout the model numBlocks: number of processing blocks. The", "the number the deeper the model output_...
[ "database_exists, create_database, drop_database from flunkybot.db import engine, base from flunkybot.models", "python \"\"\"Drop and create a new database with schema.\"\"\" from", "database with schema.\"\"\" from sqlalchemy_utils.functions import database_exists, create_database, drop_database from", "impo...
[ "-*- import os from setuptools import find_packages, setup from app", "# -*- coding: utf-8 -*- import os from setuptools import", "f.read().split('\\n') setup( name='webspider', version=__version__, license='MIT', author='heguozhu', author_email='<EMAIL>', description='lagou.com spider', url='<EMAIL>:GuozhuHe/w...
[ "HOWTOs individually latex_documents.extend(('howto/' + fn[:-4], 'howto-' + fn[:-4] + '.tex',", "the format for a strftime call. today_fmt = '%B %d,", "'macro': (r'^#define ([^_][\\w_]+)\\(.*\\)[\\s|\\\\]'), } # The coverage checker will ignore", "format for a strftime call. today_fmt = '%B %d, %Y'", "docum...
[ "0: print('skewness = 0, therefore sample is normally distributed') else:", "+ str(mu)) return mu def sd(my_list): j = 0 sigma", "np def mean(my_list): # This is the defintion in the", "- mu)**3 + sumsk m +=1 skew = sumsk /(len(my_list)*sigma**3)", "return False def is_skew(my_list): m = 0 skew = 0", "is_...
[ "raise RuntimeError('Found multiple forthcoming sections') forthcoming_label = title_text return forthcoming_label", "(%s)' % (new_version, datetime.date.today().isoformat()) for (pkg_name, changelog_path, changelog, forthcoming_label) in", "new_changelog_data = [] new_label = '%s (%s)' % (new_version, datetime...
[ "import Process import torch.nn as nn from machina.optims import DistributedAdamW", "DistributedAdamW def init_processes(rank, world_size, function, backend='tcp'): os.environ['MASTER_ADDR'] = '127.0.0.1' os.environ['MASTER_PORT']", "DistributedAdamW( model.parameters()) optimizer.zero_grad() loss = model(torch...
[ "* from rsqueakvm.model.compiled_methods import * # from rsqueakvm.model.display import *", "from rsqueakvm.model.character import * from rsqueakvm.model.compiled_methods import * # from", "import * from rsqueakvm.model.pointers import * from rsqueakvm.model.variable import *", "W_MutableSmallInteger W_Abstra...
[ "out, label): assert not label.requires_grad # out shape batch_size x", "def forward(self, out, label, ignore_label=255): assert not label.requires_grad mask =", "label): assert not label.requires_grad # out shape batch_size x channels", "= nn.NLLLoss(ignore_index=255) def forward(self, out, label): assert no...
[ "* (z_k[i+1]-2*z_k[i]+z_k[i-1]) z = np.asarray(z) x, y = np.meshgrid(x, y)", "= plt.figure() ax = fig.gca(projection='3d') surf = ax.plot_surface(x, y, z,", "in range(PASSOS+1): z_k = np.copy(z_temp) z.append(z_k) for i in range(1,", "np import os import contorno from constantes import INTERVALOS, PASSOS,", ...
[ "numRows - 1: step = -1 index += step return", "Solution: def convert(self, s: str, numRows: int) -> str: #", "return s L = [''] * numRows index, step =", "string as it is if numRows < 2: return s", "+ row1 +.. numRows row = 0 result = [\"\"]*numRows", "index == 0: step = 1 elif index == numRows", "row-...
[ "as tf from tensorflow.keras.layers import Embedding, Dense, LSTM from tensorflow.keras.models", "words in corpus] sent_len = 20 embedded_doc = pad_sequences(onehot_repr,maxlen =", "X_train, X_test, y_train, y_test = train_test_split(X_final,y_final,test_size = 0.33,random_state = 42)", "@author: ASUS \"\"\" ...
[ "named pred from sklearn.metrics import accuracy_score acc = accuracy_score(pred, labels_test)", "################################# ### we handle the import statement and SVC creation", "sklearn.svm import SVC clf = SVC(kernel=\"linear\") #### now your job", "copy import numpy as np import pylab as pl feature...
[ "# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law", "= draw( st.lists( st.integers( min_value=20, max_value=100), min_size=4, max_size=4)) input_spec =", "OPset version: 7, 9, 15 \"\"\" def sample_convert_config(self, draw): input_shape", "# # Licensed under the Apache Lice...
[ "Task function/method key - getter only. :getter: Gets the task", "= threads def __call__(self, signum, frame): self.stopper.set() for task in", "concurrently via Python ``multiprocessing`` processes, puts the results into a", "stopper = Event() threads = tuple(Thread(target=run, args=(i, task_q, result_q, st...
[ "add_to_line as with_comments from .identify import STATEMENT_DECLARATIONS from .settings import", "= True elif config.force_single_line and module not in config.single_line_exclusions: import_statement", "line: continue if line.startswith(\"#\"): comments_above.append(line) elif comments_above: new_section_out...
[ "in self._data]) with io.open(fname, 'w', newline='', encoding='utf-8') as of: #", "kw = dict( type=TEXT, file_name=TEXT, path=TEXT, mtime=DATETIME, ctime=DATETIME, size=INT )", "= \"Read tags for %d paths out of %d entries.\"", "MediaData._fields: self._data[key].append(None) for tag in self.tags: self._tag_...
[ "try: value = path_get(value, obj_path) except (KeyError, IndexError, TypeError) as", "'<NAME>' __copyright__ = 'Copyright © 2021 <NAME>' __license__ = 'MIT'", "__license__ = 'MIT' __all__ = () import prance.util.url as _url", "prance.util.path import path_get try: value = path_get(value, obj_path) except (Ke...
[ "r = cs.next() self.assertFalse(r) self.assertTrue(r.err()) r = cs.next() self.assertFalse(r) cs.back()", "= cs.next() self.assertFalse(r) self.assertTrue(r.err()) r = cs.next() self.assertFalse(r) cs.back() r", "cs = Characters(StringIO(s)) ch = cs.peek().ok() self.assertEqual(ch, '1') ch =", "= cs.peek().ok...
[ "more likely, it also had to do with the classical", "ql.CReg(2) k.classical(rs1, ql.Operation(3)) k.classical(rs1, ql.Operation(4)) k.classical(rd, ql.Operation(rs1, '+', rs2)) p.add_kernel(k)", "compiles were generating different results or in the best #", "for that reason. def test_stateful_behavior(self):...
[ "= minimalmodbus.Instrument('/dev/ttyUSB5', slaveaddress=i) print(\"writing new address: \" + str(ADDRESS2)) sensor.write_register(0,", "Check your connections\" else: print('No sensor on the bus found')", "import argparse import minimalmodbus import serial from time import sleep", "the address. Check your co...
[ "1} def save_checkpoint(self, checkpoint_dir): with open(os.path.join(checkpoint_dir, \"test.txt\"), \"wb\") as f:", "save_checkpoint(self, checkpoint_dir): checkpoint_path = os.path.join( checkpoint_dir, \"checkpoint-{}\".format(self._iteration) ) with open(checkpoint_path,", "testTildeAbsolutePath(self): loca...
[ "\"tertiary\": (212, 175, 55), # 000000 }, \"length\": 24, \"materials\":", "(112, 113)}}, \"colours\": { \"primary\": (120, 120, 120), # 787878", "# b46113 }, \"length\": 24, \"materials\": \"Alloy metal/Salvaged materials\", },", "111, 111), # 6f6f6f \"secondary\": (0, 0, 0), # 000000", "{\"blade\": 7, \"...
[ ") f = theano.function([g], GpuToGpu(test_ctx_name)(g), mode=mode) topo = f.maker.fgraph.toposort() assert", "The +1 is there to allow the lift to the", "testname, i, inputs, expected, expected.dtype, variable, variable.dtype, ) ) for", "), ) class TestGPUAlloc(TestAlloc): dtype = \"float32\" mode = mode_with...
[ "animation\", server, m: await server.assertCommand( \"/v1/lifx/command\", {\"command\": \"animation/info\"}, json_output={\"animations\": {},", "json_output={ \"animations\": identities, \"paused\": [identity], \"resuming\": [identity2], }, ) #", "json_output={\"animations\": {}, \"paused\": []}, ) identity = ...
[ "import YouTube def download_video(watch_url): yt = YouTube(watch_url) (yt.streams .filter(progressive=True, file_extension='mp4')", "from pytube import YouTube def download_video(watch_url): yt = YouTube(watch_url) (yt.streams", "yt = YouTube(watch_url) (yt.streams .filter(progressive=True, file_extension='mp4...
[ "function to capture its arguments. It can replace either distutils.core.setup", "a dictionary mapping the source file to a destination file", "2.0 (the \"License\"); # you may not use this file", "get_setup_arguments', \"print(repr(get_setup_arguments('%s')))\" % setuppy] # invoke get_setup_arguments() in a ...
[ "torch.testing.assert_close( x, soft_round_inverse(soft_round(x, alpha=2.0), alpha=2.0), ) for offset in range(-5,", "import torch from neuralcompression.functional import soft_round, soft_round_inverse def test_soft_round_inverse(): x", "in the # LICENSE file in the root directory of", "under the MIT license...
[ "easydict import EasyDict hopper_ppo_default_config = dict( env=dict( env_id='HopperMuJoCoEnv-v0', norm_obs=dict(use_norm=False, ),", "hopper_ppo_default_config = dict( env=dict( env_id='HopperMuJoCoEnv-v0', norm_obs=dict(use_norm=False, ), norm_reward=dict(use_norm=False, ), collector_env_num=8,", "policy=dict...
[ "= jsonfile[\"name\"] references = jsonfile.get(\"references\") if len(jsonfile[\"entries\"])>0 and jsonfile[\"entries\"][0].get(\"app\"): appFamily=False", "not jsonfile[\"entries\"][0].get(\"appFamily\"): return None else: appFamily=True entries = [i[\"appFamily\"] for", "from_json(cls,jsonfile,**kwargs): id ...
[ "return # Cleanup self._stop() # Create & Run container docker_container", "& Run container docker_container = self.sys_docker.run( self.image, tag=self.sys_plugins.dns.version.string, init=False, dns=False,", "of Docker container.\"\"\" return DNS_DOCKER_NAME def _run(self) -> None: \"\"\"Run", "..coresys im...
[ "python_version >= 350: binary_operator_codes[\"MatMult\"] = \"PyNumber_MatrixMultiply\" binary_operator_codes[\"IMatMult\"] = \"PyNumber_InPlaceMatrixMultiply\" unary_operator_codes", "\"IMod\": \"PyNumber_InPlaceRemainder\", \"ILShift\": \"PyNumber_InPlaceLshift\", \"IRShift\": \"PyNumber_InPlaceRshift\", \"IBi...
[ "get_external_pipeline_or_raise(graphene_info, selector): from ..schema.pipelines.pipeline_errors import GrapheneInvalidSubsetError from ..schema.pipelines.pipeline import GraphenePipeline", "in selector.solid_selection: if not full_pipeline.has_solid_invocation(solid_name): raise UserFacingGraphQLError( Graphene...
[ "== 'def foo():\\n return 5\\n' def test_use_refs(self): w = BasicPyFileWriter()", "w = BasicPyFileWriter() w.add_line('import abc') w.add_line('import os').space() s = w.get_file_as_string()", "\"C\"') s = w.get_file_as_string() lns = s.split('\\n') assert 'a' in", "w.has_module_name('__init__') assert w.pkg...
[ "an identity shortcut in a bottleneck building block of a", "+ str(stage) + block + '_out')(x) return output_tensor def backbone_resnet(input_image,", "tf.keras.layers.Activation('relu')(x) x = tf.keras.layers.Conv2D( num_filters_2, (3,3), padding='same', name=conv_prefix + '2b')(x)", "Builds a projection sho...
[ "parses the fields in line to generate json structure \"\"\"", "fields in line to generate json structure \"\"\" expected_min_no_fields =", "\"\"\" expected_min_no_fields = 5 if len(line) < expected_min_no_fields: raise LineParserException('line", "LineParserException('Only able to parse times in UTC. You gav...
[ "algorithm even when finding edit distance of 1 neighborhoods stop_check", "tierdict, tier_type = tier_type, sequence_type = sequence_type, algorithm = algorithm,", "query, sequence_type, max_distance): w_len = len(getattr(w, sequence_type)) query_len = len(getattr(query,", "+ [str(c) for c in sequence[i+1:]]...
[ "from django.conf import settings from django.db import migrations class Migration(migrations.Migration):", "Django 2.1.1 on 2018-11-06 17:19 from django.conf import settings from", "2018-11-06 17:19 from django.conf import settings from django.db import migrations", "2.1.1 on 2018-11-06 17:19 from django.con...
[ "in range(len(Q)): idx = np.unravel_index(s, dims) policy[idx] = moves[np.argmax(Q[s])] if", "= np.array([[1, 0], [0.5, 0.5], [1,1]]) tri = [left, down,", "= None if np.random.uniform(0, 1) < epsilon: action = np.random.randint(env.action_space.n)", "s = env.reset() done = False while not done: a", "Q = sar...
[ "from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies", "by Django 3.0.4 on 2020-07-14 11:00 from django.db import migrations,", "Django 3.0.4 on 2020-07-14 11:00 from django.db import migrations, models", "migrations.CreateModel( name=\...
[ "] @property def optional_parameter_values_exist(self): return [ self._server_address, self._port, self._connection_username, self._connection_password,", "'userName', 'password', 'embedPassword' ] @property def optional_parameter_values_exist(self): return [ self._server_address,", "def optional_parameter_keys...
[ "{\"key\": \"og:title\", \"value\": \"My Blog\"}) doc.name = blog.route doc.insert() #", "# License: MIT. See LICENSE import unittest import frappe from", "import get_response test_dependencies = [\"Blog Post\"] class TestWebsiteRouteMeta(unittest.TestCase): def test_meta_tag_generation(self):", "\"blog_post\...
[ "from .VariableUnitTest import VariableUnitTest from gwlfe.MultiUse_Fxns.Runoff import AgRunoff class TestAgRunoff(VariableUnitTest):", "z.InitSnow_0, z.Prec, z.NRur, z.CN, z.AntMoist_0, z.NUrb, z.Grow_0, z.Landuse, z.Area), decimal=7)", "<reponame>rajadain/gwlf-e<filename>test/unittests/test_AgRunoff.py import...
[ "ball_radius=0.2, group_size=group_size, sample_neighbors_uniformly=True) grouped_points_shape = py_utils.NestedMap( features=(8, 256, group_size, input_dims),", "# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law", "maxval=16, dtype=tf.int32)) result = net.FPropDefaultTheta(in...
[ "import oblate import numpy as np import pytest # TODO!", "<reponame>rodluger/starry<filename>starry/_core/ops/lib/include/oblate/tests/test_derivs.py import oblate import numpy as np import pytest #" ]
[ "subdirectories for subdir, dirs, files in os.walk(sniff_path): if subdir not", "sniff_path: relative or absolute path :return: void \"\"\" sniff_path =", "re import argparse from datetime import datetime def clear_path_string(s): \"\"\"", "not in dir_store: dir_store[subdir] = {} dir_store[subdir]['subdirs']...
[ "kind = \"EXPRESSION_BUILTIN_DIR1\" def computeExpression(self, trace_collection): # TODO: Quite some", "from .VariableRefNodes import ExpressionTempVariableRef, ExpressionVariableRef class ExpressionBuiltinGlobals(ExpressionBase): kind = \"EXPRESSION_BUILTIN_GLOBALS\"", "= ExpressionMakeDict(pairs=_sorted(pair...
[ "pytest.raises(chainerx.DtypeError): -scalar # should not be able to negate bool", "# should not be able to negate bool else: _check_cast_scalar_equals_data(-scalar,", "bool(scalar) == bool(data) assert int(scalar) == int(data) assert float(scalar) ==", "1.0), (1.0, chainerx.float64, 1.0), (-1, chainerx.bool_...
[ "text=\"PLAY AGAIN\") self.gameover_buttons.append(gameover_play_again_button) gameover_quit_button = Button(self, 50, HEIGHT - 100,", "\"play\": self.playing_update() if self.state == \"dead\": self.gameover_update() def draw(self): self.window.fill(BG_COL)", "[0, 1]: self.snake.direction = [0, -1] if event.ke...
[ "= fix_bill_id(data['identifier']) data['legislative_session_id'] = self.get_session_id(data.pop('legislative_session')) if data['from_organization']: data['from_organization_id'] = self.org_importer.resolve_json_id(", "= {'actions'} def __init__(self, jurisdiction_id, org_importer, person_importer): super(BillIm...
[ "def predict_Quora_test_data(n_models,nb_words,nlp_f,test_data_1,test_data_2): models=[] n_h_features=nlp_f.shape[1] print('loading the models...') for i in", "np from utilities.tools import load_model import pandas as pd def", "models.append(load_model(i+1,nb_words,n_h_features)) preds=[] print('predicting the...
[ "all # lie within [-0.1, 1] ax1.set_xlim([-0.1, 1]) # The", "join(figures_dir, \"Clustered {}.png\".format(title)) fig.tight_layout() try: fig.savefig(figure_fp, transparent=transparent) except ValueError: logging.warning(traceback.format_exc())", "y_b, names_a, names_b, n_a=None, n_b=None, figsize=None, output...
[]
[ "import setting import helper db = setting.db_web # 删除聊天规则 url", "if not helper.logged(helper.PRIV_USER, 'TALKBOT'): raise web.seeother('/') render = helper.create_render() user_data", "#!/usr/bin/env python # -*- coding: utf-8 -*- # import web", "db = setting.db_web # 删除聊天规则 url = ('/plat/index_news_remove')...
[ "DataFrame or list or string The schema definition ''' if", "List of offline model objects Returns ------- :class:`ScoreWindow` ''' window_type", "= [] labels.append('id*:int64') for name, dtype in zip(variables['Name'], variables['Type']): if", "objects offline_models : list-of-OfflineModels List of offline ...
[ "time has exceeded.') wait_regex = re.search(r'\\d+', res.json()['message']) if wait_regex: wait_amount", "%s' % (res.status_code, res.reason)) return None return res.json() def html_description_to_human_readable(breach_description):", "if context_type == 'email': context_dict['Address'] = context_main_value el...
[ "Pipeline(Extension): identifier = \"pipeline\" def __init__(self): self.visitor = PipelineVisitor(self.activation) def", "<reponame>Aloxaf/moshmosh<gh_stars>100-1000 from moshmosh.extension import Extension from moshmosh.ast_compat import ast class", "visit_BinOp(self, n: ast.BinOp): if n.lineno in self.activa...
[ "funcExpectedHash = precompute_hash(r2, funcOffset, funcSize) print(\"funcOffset:{} funcSize:{} funcExpectedHash:{}\".format( funcOffset, funcSize,", "is entry0 in the binary function = 'entry0' print(\"Cannot precompute", "os.system( \"chmod +x {}\".format(patchedBinary)) if status != 0: print(\"Error in", "...
[ "('sitewebapp', '0010_auditionanswers_auditionquestions_audtionrounds_candidates'), ] operations = [ migrations.CreateModel( name='auditionRounds', fields=[ ('id',", "('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('roundno', models.IntegerField(default=1)), ('c...
[ "tags: description: - Resource tags. type: dict sample: { env:", "The properties of the resource. type: dict contains: platformFaultDomainCount: description:", "str sample: Aligned type: description: - Resource type. type: str", "azure_rm_availabilityset_info short_description: Get Azure Availability Set fact...
[ "for state to get to active\") time.sleep(.5) nodes = client.list_node(uuid=uuid).data", "timeout=DEFAULT_TIMEOUT): start = time.time() time.sleep(2) nss = client.list_namespace(uuid=ns.uuid).data assert len(nss)", "p_client.list_workload(uuid=workload.uuid).data[0].paused assert workloadStatus == expectedstatu...
[ "determine if the input string is valid. # An input", "brackets. # Open brackets must be closed in the correct", "elif ch in dict.keys(): if len(stack) == 0 or (stack.pop()", "main(): s = Solution() print(s.isValid(\"()\")) print(s.isValid(\"()[]{}\")) print(s.isValid(\"(]\")) print(s.isValid(\"([)]\")) print...
[ "response = ({\"status\": \"OK\", \"message\": \"Service is running\"}, 200) except", "\"Service is running\"} def get_database_health(token_info=None, user=None): \"\"\"Get a health report", "\"OK\", \"message\": \"Service is running\"} def get_database_health(token_info=None, user=None): \"\"\"Get a", "\"\"...
[ "metric='euclidean', init='random', return_style='once', num_snapshots=5, verbose=0, random_seed=None, use_interactive=False, viz_timeout=10000, viz_server=\"tcp://localhost:5556\", dump_points=False,", "X into an embedded space and return that transformed output.", "N.require(y, N.float32, ['F_CONTIGUOUS', 'AL...
[ "strictly editing users info and courses info from .views import", "not related to strictly editing users info and courses info", "# contains any CRUD not related to strictly editing users", "to strictly editing users info and courses info from .views", "contains any CRUD not related to strictly editing use...
[ "object() def exists(file): if os.path.exists(file): return file ind = file.find('.zip')", "for x in paths_from_eclipse_to_python])) translated = translated_proper_case if eclipse_sep !=", "File f = File(filename) ret = f.getCanonicalPath() if IS_PY2 and", "normcase(r) return r _ZIP_SEARCH_CACHE = {} _NOT_FOU...
[ "Actions from src.networking.Client import Client from src.utils.DH_Encryption import Encryption from", "Operation.DISCONNECT elif incoming in NetworkPackets.NetLogicIncomes.list(): if incoming == NetworkPackets.NetLogicIncomes.PAIRED.value: Constants.Network.IS_PAIRING", "Network.IS_ONLINE: incoming = NetworkP...
[ "is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='requests', full_name='container.ResourceRequirements.requests', index=1, number=2, type=11,", "default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, e...
[ "setattr(stripe.http_client, lib, None) inst = stripe.http_client.new_default_http_client() assert isinstance(inst, expected) def", "test_should_retry_on_error(self, mocker): client = stripe.http_client.new_default_http_client() client._max_network_retries = lambda: 1 api_connection_error", "stripe.http_client....
[ "Store a python dictionary generated from json data at <url>", "url: str): \"\"\" Store a python dictionary generated from json", "<url> in self.data. Returns self. \"\"\" data = subprocess.run( f\"curl", ").stdout self.data = json.loads(data) return self def make_instructions(self): \"\"\" Take", "list of ...
[ "self.setWindowIcon(QIcon(\"sim2d_game_analyzer/figures/icon.png\")) vbox = QVBoxLayout() tabWidget = QTabWidget() tabWidget.setFont(QtGui.QFont(\"Sanserif\", 12)) self.fmdb_tab", "import QIcon from PyQt5.QtWidgets import (QApplication, QDialog, QGroupBox, QMainWindow, QTabWidget,", "500 left = 100 width = 70*4...
[ "yield l[i:i + chunk_size] def prepare(raw_organisations, raw_schools, raw_locations, raw_teachers, raw_students):", "class Sheet: \"Data container object to hold the contents of", "= [x for x in sheet.iter_rows()] if rows: titles =", "for x in schools} yield [make_relation(\"ClpLocation\", location[\"id\"], ...
[ "callsign def get_ustvgo_stream(self, chandict): driver = self.get_firefox_driver() blockPrint() driver.get(\"https://ustvgo.tv/\" +", "if os.path.isfile(self.m3ucache): self.fhdhr.logger.info(\"Loading Previously Saved Channel m3u.\") with open(self.m3ucache, 'r')", "html.fromstring(chanpage.content) channel_n...
[]
[ "= self.image.get_rect() # define rectangle from image size self.rect.center =", "next frame self.rect = self.image.get_rect() # new rectangle self.rect.center =", "all frames self.frame = 0 # no of first frame", "self.rect.center = self.centre # set centre for all frames self.frame", "= self.image.get_rect...
[ "# Sleep till time to wake up while True: prev", "while (current_time()-start < INTERVAL) : wait() break callback() \"\"\" def", "We start the timer thread here Args: - dfk (DataFlowKernel)", "= get_events_since(start) if count >= THRESHOLD : break callback() This", "self.cb_args = args self.callback = self...
[ "# # but with some preprocessing calculations. # # #", "Guided Back-Propagation gbp_result = gc.guided_backprop(X_tensor,y_tensor, gc_model) plt.figure(figsize=(24, 24)) for i", "the attributions change layer = model.features[3] # Example visualization for", "= torch.from_numpy(img) img = deprocess(img) plt.s...
[ "5, 6], reduce=[ ('sep_conv_5x5', 1), ('sep_conv_7x7', 0), ('max_pool_3x3', 1), ('sep_conv_7x7',", "0), ('dil_conv_3x3', 1), ('skip_connect', 1), ('skip_connect', 0), ('dil_conv_5x5', 0), ('sep_conv_3x3',", "('skip_connect', 0), ('avg_pool_3x3', 0), ('avg_pool_3x3', 0), ('sep_conv_3x3', 1), ('skip_connect', 1),...
[ "with sub_bar.output_to(0): if SHOW_FULL_QUERY: print( color.Format( 'The following query is", "PROJECT = None # TODO: Should this be renamed to", "global SHOW_FULL_QUERY TABULATED_OUTPUT = tabulated_output SHOW_FULL_QUERY = TABULATED_OUTPUT if not", "def SetDbConnection(connection): global DB_CONNECTION DB_C...
[ "import Basic as sp_Basic class Basic(sp_Basic): \"\"\"Basic class for Pyccel", "fst): \"\"\"Sets the redbaron fst.\"\"\" self._fst = fst @property def", "Pyccel AST.\"\"\" _fst = None def set_fst(self, fst): \"\"\"Sets the", "redbaron fst.\"\"\" self._fst = fst @property def fst(self): return self._fst", "...
[ "assert (x_disc[:, k].max() == len(perc)).all() for i in range(x.shape[1]): if", "0).all() assert (x_disc[:, k].max() == len(perc)).all() for i in range(x.shape[1]):", "assert (x_disc[:, k].min() == 0).all() assert (x_disc[:, k].max() == len(perc)).all()", "= disc.discretize(x) for k, v in disc.names.items():...
[ "2 self.assertEqual(ps.get_common_id([dim1, dim2]), \"0.2_2\") dim1.value = 0.3 dim2.value = 2", "p2.value) p1.value = 3 p2.value = -0.1 result = ps.run_process(func)", "= [\"0.1_1\", \"0.2_1\", \"0.3_1\", \"0.1_2\", \"0.2_2\", \"0.3_2\"] ps = ParameterSpace(\"ps\")", "dim2.value = 1 self.assertEqual(ps.get_c...
[ "agent, ENV_NAME): running_reward_array = [] for episode in range(episodes): reward", "== 'cart': init_env = gym.make('CartPole-v1') dim_in = init_env.observation_space.shape[0] dim_out =", "'cart': init_env = gym.make('CartPole-v1') dim_in = init_env.observation_space.shape[0] dim_out = init_env.action_space.n...
[ "= [] for elem in question_2: prefix = elem[:2] my_list.append(prefix)", "my_list.append(prefix) count = {} for letter in my_list: if letter.isalpha():", "= elem[:2] my_list.append(prefix) print(my_list) def question_3(prefix_length, word): my_list = []", "question_2 = ['able', 'ability', 'apple', 'tryst', 't...