ngram
listlengths
0
82k
[ "\"log_settings\": { \"save_in_file\": {'type':bool}, \"log_folder\": {'type':str}, \"log_filename\":{'type':str}, \"clear_old_log_file\": {'type':bool} }", ": DO NOT CHANGE !!!\"\"\" LOG_FORMAT = \"%(asctime)s: %(levelname)s: %(message)s\"", "str}, \"dss_filename\":{'type':str}, \"export_folder\":{'type':str},...
[ "numpy as np from copy import copy import colorsys import", "== 1 flaged = observation == 2 observation += self.impact_size", "= max(1, int(bombs_density * self.grid_size)) if n_bombs is None else", "done, {'passed':False} elif case_content == NO_BOMBS_AROUND: self.reveal_around(coords, reward, done) elif", ...
[ "file, You can obtain one at http://mozilla.org/MPL/2.0/. from gaiatest import", "def test_unlock_to_camera_with_passcode(self): # https://github.com/mozilla/gaia-ui-tests/issues/479 camera = self.lock_screen.unlock_to_camera() self.lock_screen.wait_for_lockscreen_not_visible() camera.switch_to_camera_frame() sel...
[ "to make #edges x 5 then pad to desired size", "\"\"\" def __init__(self, in_channels, out_channels, k=5, bias=True): super(MeshConv, self).__init__() self.conv", "Gi = Gi + 1 #shift # first flatten indices", "#edges x 4 add the edge_id itself to make #edges", "edge features (Batch x Features x Edges) mesh:...
[ "= tables.open_file('development.hdf5', mode='r') # Dimentionality of the data structure. print(fileh.root.utterance_test.shape)", "mode='r') # Dimentionality of the data structure. print(fileh.root.utterance_test.shape) print(fileh.root.utterance_train.shape) print(fileh.root.label_train.shape)", "import numpy...
[ "def wrapper(test_case: unittest.TestCase, *args, **kwargs): loop = asyncio.get_event_loop() task =", "= asyncio.get_event_loop() task = loop.create_task(f(test_case, *args, **kwargs)) try: loop.run_until_complete(task) except", "unittest.TestCase, *args, **kwargs): loop = asyncio.get_event_loop() task = loop.c...
[ "request.POST) if newuser_form.is_valid(): newuser_form.save() newuser = auth.authenticate(username = newuser_form.cleaned_data['username'], password", "render(request, 'index.html', {'username': auth.get_user(request).username} ) def logout(request): auth.logout(request) return HttpResponseRedirect(\"/login\")",...
[ "testpklID=int(sys.argv[3]), NetworkType=int(sys.argv[4]), runs=int(sys.argv[5])) else: print(\"argument errors, try\\npython runfile.py <FacePatchID> <trainpklID>", "if len(sys.argv)==6: runPatch(GPU_Device_ID=1, FacePatchID=int(sys.argv[1]), trainpklID=int(sys.argv[2]), testpklID=int(sys.argv[3]), NetworkType=i...
[ "xmltext.index('adminlang') assert xmltext.index('creationtoolversion') assert xmltext.index('datatype') assert xmltext.index('o-tmf') assert xmltext.index('segtype') assert", "posource, sourcelanguage='en', targetlanguage='af'): \"\"\"helper that converts po source to tmx", "the escaping of quotes (and slash)\...
[ "sys.argv[1] == 'resume_all': jsonrq.resume_all() elif sys.argv[1] == 'show_info': show_torrent_info(sys.argv[2]) elif", "def show_torrent_info(info_hash): \"\"\" Display current torrent info :param info_hash: :return:", "torr_info['dl_speed'], torr_info['ul_speed'] ), _('total DL: {0}MB; total UL: {1}MB').form...
[ "from distutils.core import setup setup(name='Mimik', version='1.0', description='Python framework for markov", "import setup setup(name='Mimik', version='1.0', description='Python framework for markov models', author='<NAME>',", "version='1.0', description='Python framework for markov models', author='<NAME>',...
[ "Open Images dataset used for machine learning training. The image", "from their Flickr server source, verified for fixity, had EXIF", "size, and timestamp to the workflow dbase utctime = datetime.utcnow()", "images[-1] path, dirs, files = next(os.walk(batch_dir)) for file in files:", "their Flickr server s...
[ "'MYH9', 'MYO15A', 'MYO3A', 'MYO6', 'MYO7A', 'OSBPL2', 'OTOA', 'OTOF', 'OTOG', 'OTOGL',", "'RIPOR2', 'S1PR2', 'SERPINB6', 'SIX1', 'SLC17A8', 'SLC26A4', 'SLC52A2', 'SLITRK6', 'SMPX', 'SOX10',", "'COCH', 'COL11A2', 'DIAPH1', 'DIAPH3', 'DMXL2', 'DNMT1', 'DSPP', 'EDN3', 'EDNRB', 'EPS8',", "'SOX10', 'STRC', 'SYNE4...
[ "interpolation because it could be too optimistic measures[\"auc_prc_weighted\"] = multi_class_prc_auc_score(labels,", "label_binarizer = sklearn.preprocessing.LabelBinarizer() label_binarizer.fit(label) label = label_binarizer.transform(label) predict = label_binarizer.transform(predict)", "if tp + fp == 0: pa...
[ "= models.TextField() class Meta: app_label = get_tenant_model()._meta.app_label return TenantModel @tag(\"bug\")", "# The goal is that the next line doesn't raise", "should get a ProgrammingError with self.assertRaises(ProgrammingError): management.call_command(\"migrate\", all_schemas=True, verbosity=0) #", ...
[ "component to transform the input examples. The Transform component wraps", "Necessary iff multiple transform components are declared in the same", "the preprocessing_fn from input module file, preprocess both 'train' and", "schema: A Channel of type `standard_artifacts.Schema`. This should contain a", "is ...
[ "number ino = None # The object type, either b1000", "= None # Group ID of owner gid = None", "a tuple (seconds, nanoseconds) ctime = None # The last", "None flag_assume_valid = None flag_extended = None flag_stage = None", "hex string object = None flag_assume_valid = None flag_extended =", "time a file'...
[ "coding: utf-8 -*- \"\"\" Created on Wed Oct 13 14:47:13", "@author: huzongxiang \"\"\" import tensorflow as tf from tensorflow.keras import", "config.update({\"batch\": self.batch_size}) return config class PartitionPaddingPair(layers.Layer): def __init__(self, batch_size, **kwargs):", "= tf.where(tf.reduce_...
[ "+ \" (:memory:)\" # SITE = Site(globals(), title=Site.title+\" (:memory:)\") DATABASES['default']['NAME']", "from .demo import * SITE.verbose_name = SITE.verbose_name + \" (:memory:)\"", "<gh_stars>1-10 from .demo import * SITE.verbose_name = SITE.verbose_name + \"", "import * SITE.verbose_name = SITE.verbos...
[ "django.urls import path from . import views app_name = 'reservation'", "from . import views app_name = 'reservation' urlpatterns = [", "views app_name = 'reservation' urlpatterns = [ path('', views.reserve_table, name", "app_name = 'reservation' urlpatterns = [ path('', views.reserve_table, name =", "'rese...
[ "'iDeep', 'packages': [ 'ideep4py', ], 'specifier': '>=2.0.0.post3, <2.1', 'help': 'https://docs.chainer.org/en/latest/tips.html',", "__version__ = '7.8.0' _optional_dependencies = [ { 'name': 'CuPy', 'packages':", "_optional_dependencies = [ { 'name': 'CuPy', 'packages': [ 'cupy-cuda120', 'cupy-cuda114',", "...
[ "out_img = resize_img(image, **kwargs) else: out_img, box_loc = resize_img(image, box_loc,", "0 if box_loc is None: return out_img else: return out_img,", "bbox, **default_args) #隨機選擇augmentation方法 aug_img = rand_aug_image(img, **default_args) #aug_img, bbox =", "= random_zoom_out(img, bbox, **default_args) #...
[ "\"--sorted\", help=\"a boolean flag\", action=\"store_true\") return parser.parse_args() # -------------------------------------------------- def", "formatter_class=argparse.ArgumentDefaultsHelpFormatter, ) parser.add_argument(\"items\", type=str, nargs=\"+\", metavar=\"str\", help=\"item(s) to bring\") parser.a...
[ "equilateral triangle.\") elif side_a==side_b or side_a==side_c or side_b==side_c: print(\"The triangle", "side(b):\")) side_c=int(input(\"Enter the third side(c):\")) if side_a==side_b and side_a==side_c: print(\"The", "or side_b==side_c: print(\"The triangle is an isosceles triangle.\") else: print(\"The", ...
[ "Blueprint, request from david.lib.template import st from .model import Artist", "import Blueprint, request from david.lib.template import st from .model import", "bp = Blueprint('artist', __name__) @bp.app_template_global('artists') def artists(): return Artist.query.all() @bp.route('/artist/<uid>/')", "def...
[ "def polygons_to_mask(img_shape, polygons): mask = np.zeros(img_shape, dtype=np.uint8) mask = Image.fromarray(mask)", "plate_depth = 1.5 #cm plate_thickness = 0.2 #cm def Max(x,", "np.array(points) shape = points.shape points = points.reshape(shape[0], 1, shape[1]) for", "img[point[1]][point[0]] k += 1 avg = ...
[ "('*.[hc]', '*.[hc]xx', '*.[hc]pp', '*.cc', '*.hh'), 'python':('*.py'), 'java':('*.java')} # Ignore these", "based on cmt show uses \"\"\" parser = OptionParser() parser.add_option('--cpp',", "(default)') parser.add_option('--python', dest='python', action='store_true', default=False, help='tag only python file...
[ "= fs_.symlink_list self._file_envs = fs_.envs def __verify_minion_publish(self, load): ''' Verify", "needs to be written to again. Windows enforces this. os.chmod(keyfile,", "= parts[1] except IndexError: log.critical( 'Unable to extract external pillar", "False if not salt.utils.verify.valid_id(self.opts, l...
[ "from __future__ import unicode_literals # pylint: disable=import-only-modules from core.domain import", "# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law", "Exception, 'Role TEST_ROLE does not exist.'): role_services.get_all_actions('TEST_ROLE') self.assertEqual( role_servic...
[ "constant(value, dtype=None, shape=None, name=None): if dtype is None: dtype =", "C.sqrt(var(x, axis=axis, keepdims=keepdims)) def expand_dims(x, axis=-1): shape = list(int_shape(x)) nones", "l_s, i_s in zip(last_states, initial_states): if _get_dynamic_axis_num(i_s) == 0 and", "if name is None: name = '' sca...
[ "The server SHOULD return a 401 (Unauthorized) status code when", "request # The server SHOULD return a 401 (Unauthorized) status", "body as a string. :param headers: The request headers as", "errors class ResourceEndpoint(BaseEndpoint): \"\"\"An endpoint responsible for protecting resources. Typical", "HTT...
[ "width height, width = image.shape[:2] # retrieve the params of", "translation matrix T = np.float32([[1, 0, col_trans], [0, 1, row_trans]])", "onion_img.dtype # This will give you: uint8 def translation(img, trans):", "100 cols to the right translation(\"onion.png\", (50, 100)) # remove", "(50, 100)) # rem...
[ "ctx_item['box'] for proposal in ranked_proposals: if calculate_iou(ctx_box, proposal['box']) > self.threshold:", "in ranked_proposals: if calculate_iou(ctx_box, proposal['box']) > self.threshold: hit_num += 1", "from utils.misc import calculate_iou, xywh_to_xyxy __all__ = ['NewHitRateEvaluator', 'CtxHitRateEva...
[ "else: letLog.append(logs[i]) tempLetLog=[] for i in letLog: tempLetLog.append(' '.join(i.split(' ')[1:]+[i.split('", "# -*- coding: utf-8 -*- \"\"\" Created on Sat Aug", "in letLog: tempLetLog.append(' '.join(i.split(' ')[1:]+[i.split(' ')[0]])) tempLetLog=sorted(tempLetLog) letLog=[] for i", "in range(len(l...
[ "None with traced_atomic_transaction(): try: yield except DatabaseError: raise except Exception", "raise except Exception as e: error = e if error:", "an error in any occurred.\"\"\" error = None with traced_atomic_transaction():", "import DatabaseError from ..core.tracing import traced_atomic_transaction @co...
[ "desc\"' from_clause = '--from \"2018-04-04T00:00:00\"' to_clause = '--to \"2018-05-22T00:00:00\"' scopes", "assert len(summary[\"policyAssignments\"][0][\"policyDefinitions\"]) >= 0 if len(summary[\"policyAssignments\"][0][\"policyDefinitions\"]) > 0: assert summary[\"policyAssignments\"][0][\"policyDefinitions\...
[ "<reponame>Aslic/rmats_turbo_4.1.0 import glob import os.path import subprocess import sys import", "self._out_dir = os.path.join(self._test_dir, 'out') self._prep_1_tmp_dir = os.path.join(self._test_dir, 'tmp_prep_1') self._prep_2_tmp_dir =", "self._prep_2_tmp_dir, self._post_tmp_dir) def _check_results_inte_1...
[ "tuples) into pharaoh text format. >>> alignment = [(0, 0),", "7-5' >>> pharaohtext2tuples(pharaoh_text) Alignment([(0, 0), (2, 1), (7, 5), (9,", ":rtype: Alignment :return: An Alignment object that contains a list", "# Natural Language Toolkit: Aligner Utilities # # Copyright (C)", "integer tuples :rtype: ...
[ "with self.assertRaises(db.UnknownGRRUserError) as context: self.db.WriteYaraSignatureReference(blob_id=blob_id, username=\"quux\") self.assertEqual(context.exception.username, \"quux\") def testWriteYaraSignatureReferenceDuplicated(self):", "def testWriteYaraSignatureReferenceIncorrectUsername(self): blob_id = r...
[ "likelihood if inducing_points.ndimension() == 1: inducing_points = inducing_points.unsqueeze(-1) self.register_parameter(name=\"inducing_points\", parameter=torch.nn.Parameter(inducing_points))", "for fast variances return exact_prediction_strategies.SGPRPredictionStrategy( train_inputs, train_prior_dist, train_...
[ "import os from flask import Flask from flask_cors import CORS", "ma from app.views import albums, artists, hello, tracks def create_app(config,", "db from app.extensions.schema import ma from app.views import albums, artists,", "\"*\"}}) app.config.from_object(config) # app.url_map.strict_slashes = False wit...
[ "= \"Transaction added successfully\" elif to_loc in [None, '', '", "to_loc)) # IMPORTANT to maintain consistency cursor.execute(\"\"\" UPDATE products SET", "unallocated_quantity) VALUES (%s, %s, %s)\", (prod_name, quantity, quantity)) mysql.connection.commit() except(MySQLdb.Error(not", "machine\": {\"Andam...
[ "{ \"data\": np.random.random([3, 3, 56, 56]).astype(\"float32\"), } self.enable_trt = True", "30, 32, 1, AnalysisConfig.Precision.Half, True, False) self.fetch_list = [out] def", "np from inference_pass_test import InferencePassTest import paddle.fluid as fluid import", "2.0 (the \"License\"); # you may not ...
[ "False, True, True), in_channels=512, position='after_conv2') ] ), neck=dict( type='RFP', rfp_steps=2,", "groups=32, base_width=4, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, norm_cfg=dict(type='BN', requires_grad=True),", "3, 6, 1), rfp_backbone=dict( rfp_inplanes=256, type='DetectoRS_ResNeXt', de...
[ "_validate_input(self.EmptyDeeplyNested, None, None, None) self.assertEqual(num_points, 1) self.assertEqual(num_samples, 1) def test_validate_input_empty_point(self):", "< 1.4.0 creates two Line2D instances, mpl 1.4.0 creates one,", "2, 3], '^', 0.77, 1, 1.5, 'stdv') self.assertEqual(result.get_sizes(), 20) def...
[ "<gh_stars>10-100 from lmsrvcore.api.interfaces.user import User from lmsrvcore.api.interfaces.git import GitCommit, GitRef,", "from lmsrvcore.api.interfaces.user import User from lmsrvcore.api.interfaces.git import GitCommit, GitRef, GitRepository" ]
[ "# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law", "# # Licensed under the Apache License, Version 2.0 (the", "compliance with the License. # You may obtain a copy", "an \"AS IS\" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF", "2.0 (the \"License\"); # you may not use th...
[ "type icon or not.\"\"\" self._icon_label.setVisible(show_icon) def _set_dayu_text(self): self._content_label.setText(self._dayu_text) self.setVisible(bool(self._dayu_text)) def", "Get MAlert feedback message. :return: six.string_types \"\"\" return self._dayu_text dayu_text", "the close icon button or not.\"\"...
[ "<gh_stars>0 input_str = input(\"문자열을 입력해 주세요. >> \") print(\"입력받은 문자열의", "input(\"문자열을 입력해 주세요. >> \") print(\"입력받은 문자열의 길이는\", len(input_str), \"입니다.\")", "= input(\"문자열을 입력해 주세요. >> \") print(\"입력받은 문자열의 길이는\", len(input_str),", "input_str = input(\"문자열을 입력해 주세요. >> \") print(\"입력받은 문자열의 길이는\"," ]
[ "END_DATE, STATUS_CODE, PARTICIPANT_LEVEL_CODE, SALES_REP_TYPE_CODE, CURRENT_RECORD_FLAG, LAST_HIRE_DATE) SELECT B.WW_DIRECT_GEO_DESCRIPTION AS SALES_GEOGRAPHY,", "C ON C.BK_EMPLOYEE_ID = A.EMPLOYEE_ID WHERE RANK = 1\"\"\" return", "'0' dest_count = '0' # start Spark application and get", "SALES_GEOGRAPHY, B....
[ "def encodeTime(t): ret = '' for i in t[:-3]: si", "= int(i / 4294967296) low = i - high return", "i in t[:-3]: si = str(i) if len(si) < 2:", "# MythTV's standard representation used on filenames def encodeTime(t): ret", "if low < 0: low += 4294967296 if high <", "< 2: ret += si.zfill(2) else: ret += si r...
[ "finished!\") # Unfrag the file subprocess.run([\"ffmpeg\", '-i', temp_path, '-c:v', 'copy',", "all visual methods need detection images vid=cv2.VideoCapture(media_file) ok=True frame =", "new track objects based on the result # from the", "\" f\"something other than 'No'!\") continue media_shape = (media.hei...
[ "combine = MultiComponent(combine='concat', components=losses) g_loss = combine.g_loss_features d_loss = combine.d_loss_features", "= combine.g_loss_features d_loss = combine.d_loss_features self.d_loss = d_loss self.g_loss =", "= self.split_batch(d.sample, split) d_real = ds[0] d_fake = tf.add_n(ds[1:])/(len(d...
[ "config found with key {storage_destination_key}\" ) failure = { \"message\":", "Params = Depends(), ) -> AbstractPage[Policy]: \"\"\" Return a paginated", "fidesops.schemas import policy as schemas from fidesops.schemas.api import BulkUpdateFailed from", "for policy: %s\", exc) failure = { \"message\": \"Thi...
[ "item_analyze[2] temp = {} temp.update(id=topic_id) temp.update(comment=emoji.emojize(comment, use_aliases=True)) temp.update(sentiment=sentiment) self.table_topics.append(temp) self.table_topics", "read_json_file(\"en_US.json\") self.image_base64_sr = None self.image_base64_topics = None def sort_by_dimension_se...
[ "document_id self.doc_set_id = doc_set_id self.last_modified_time_key = last_modified_time_key self.last_modified_date_key = last_modified_date_key", "machime' class DimProcess: def __init__( self, *kwargs, process_key: int, module:", "last_modified_date_key: int, user_name: str = None, process_key: int, field_...
[ "if verbose_name is not None: dd.update_field(cls, 'owner', verbose_name=verbose_name) kwargs.update( verbose_name=format_lazy(u\"{}", "_('(type)'))) dd.update_field(cls, 'owner_type', **kwargs) def update_owned_instance(self, controllable): if self.owner: self.owner.update_owned_instance(controllable)", "Trans...
[ "''' TERS İSE TEKRAR BOLGELERİ BUL ''' if ret==True: warp2_gri=cv2.cvtColor(warp2,cv2.COLOR_BGR2GRAY)", "imutils import contours from imutils.perspective import four_point_transform import imutils import", "pts2=np.array([(300,50),(600,50),(302,1545),(602,1545)]) pts3=np.array([(600,50),(900,50),(602,1545),(902...
[ "# and/or other materials provided with the distribution. # #", "materials provided with the distribution. # # THIS SOFTWARE IS", "ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,", "+ \" on filmtipset:\", [\"Skip\", \"1\", \"2\", \"3\", \"4\", \"5\"])", "must reproduce the above copyright ...
[ "createMatrix(3, 3, [1, 0, 0, 9, 1, 0, 5, 6,", "2, 3]+[0, 5, -2]+[0, 0, Ra(-86, 5)]) self.assertEqual(triangle, d3.triangulate()) def", "self.assertRaises(ValueError, b6.smithNormalForm) self.assertEqual([1, 1, 1], b7.smithNormalForm()) self.assertEqual([9, 3, 1], b8.smithNormalForm())", "1, 4, 2]) self.asser...
[ "teardown' # Function Level def func_1_setup(): print 'test_func_1 setup' def", "'test_func_1_teardown' # Target Func def test_func_1(): print 'test_func_1 run' assert", "test_func_1(): print 'test_func_1 run' assert True test_func_1.setUp = func_1_setup test_func_1.tearDown", "print 'test setup' def tearDown...
[ "def run(self): docs = [] url = \"%s/default/bucket/users..bucket\" % self.bucketd_host", "ThreadPoolExecutor import argparse def get_options(): parser = argparse.ArgumentParser() parser.add_argument(\"-i\", \"--sentinel-ip\",", "self._password = password r = redis.Redis(host=ip, port=port, db=0, password=passw...
[ "= None attentions: Optional[torch.FloatTensor] = None hidden_states: Optional[Tuple[torch.FloatTensor]] = None", "[4]), dtype=torch.long, device=device) # We can provide a self-attention mask", "logger = logging.getLogger(__name__) SkimformerEncoderOutput = namedtuple( \"SkimformerEncoderOutput\", [\"hidden_st...
[ "总内存 memoryUsed = round(m.used / (1024.0 * 1024.0 * 1024.0),", "pymysql from fastapi import APIRouter from api.utils import response_code router", "内存信息 memoryTotal = round(m.total / (1024.0 * 1024.0 * 1024.0),", "import psutil import pymysql from fastapi import APIRouter from api.utils", "# cpu cpuCount = ...
[ "self.crit = nn.MSELoss() def step(self): self.optimizer.zero_grad() glb = self.forward(self.rotations, self.position,", "!= 3: raise Exception('Unexpected shape of rotation') if quater and", "torch.empty(rotation.shape[:-1] + (3,), device=position.device) norm = torch.norm(rotation, dim=-1, keepdim=True) rotat...
[ "task_id='hive_partition_check', partition_names=[ \"airflow.static_babynames_partitioned/ds={{ds}}\", \"airflow.static_babynames_partitioned/ds={{ds}}\" ], dag=self.dag) t.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE, ignore_ti_state=True) def", "\"SELECT ${num_col} FROM ${hiveconf:table};\" t = HiveOperat...
[ "m.mode == \"action\": window.blit(box, [m.rect.left+10, m.rect.top+10]) ui.Resize(30) ui.Text(m.hoveritem.type.upper(), [m.rect.left+27, m.rect.top+25])", "[m.rect.left+27, m.rect.top+47]) ui.Text(\"Max Carts: \" + str(m.hoveritem.data[\"max\"]), [m.rect.left+27, m.rect.top+60]) if", "m, listmap) if not m.hove...
[ "+ (yc1 - yc2)**2) print('distance', get_distance()) # *** somewhere else", "else in your program *** def get_length(xa=-50, ya=99, xb=.67, yb=.26):", "your program *** def get_length(xa=-50, ya=99, xb=.67, yb=.26): # calcualte", "print('distance', get_distance()) # *** somewhere else in your program ***", ...
[ "bound is set. Eventually, it will be removed. # the", "# There are no constraints on d1. # Coefficients of", "(B, v, s), where B is a Matrix with coefficients", "these # problems in the integration variable). Au = Au.applyfunc(cancel)", "d if and only if (c1, ..., cm) is a", "computer algebra in general,...
[ "[wait_for] if type(confirmation) == str: confirmation = [confirmation] with netmiko.Netmiko(**device)", "with netmiko.Netmiko(**device) as ssh: ssh.enable() result = ssh.send_command_timing( command, strip_prompt=False,", "= devices[0] out = send_cmd_with_prompt( r1, \"copy run start\", wait_for=\"Destination"...
[ "nested Dictionary into an object with key-values accessibly using attribute", "\"\"\" A class to convert a nested Dictionary into an", "nested dicts (like: AttributeDict.attr.attr) \"\"\" def __init__(self, **entries): self.add_entries(**entries) def", "an object with key-values accessibly using attribute no...
[ "this: the frequency of the toggling, and the duty cycle.", "red_brightness = 100 green_brightness = 100 blue_brightness = 100 white_brightness", "Written by @MarioTheMaker from sys import stdin, stdout, exit import", "the brightness for each color red_brightness = 100 green_brightness =", "that controls # ...
[ "KNOWN_BUGS = {MASTER_YAML_KNOWN_BUGS_KEY: []} class BugSearchDef(SearchDef): def __init__(self, pattern, bug_id,", "master yaml. Note that this can only be called once", "[] for idx in self.reason_format_result_groups: values.append(search_result.get(idx)) return self._reason.format(*values) return self._reaso...
[ "echoserver(xmls.SimpleXMLRPCServer): allow_reuse_address = True server = echoserver(('127.0.0.1', 8001)) server.register_function(echo, 'echo')", "SimpleXMLRPCServer as xmls def echo(msg): print 'Got', msg return msg", "msg return msg class echoserver(xmls.SimpleXMLRPCServer): allow_reuse_address = True server...
[ "224, 16)), conv_defs=mobilenet_v2.V2_DEF, output_stride=8, scope='MobilenetV2') self.assertEqual(out.get_shape().as_list()[1:3], [28, 28]) def testDivisibleBy(self):", "for mobilenet_v2.\"\"\" from __future__ import absolute_import from __future__ import division", "num_convs = len(find_ops('Conv2D')) # This i...
[ "gist') gh = login(token=gh_token) gist = gh.gist(gh_gist) old_content = \"\"", "json import logging from boto.s3.connection import S3Connection from boto.s3.key import", "= login(token=gh_token) gist = gh.gist(gh_gist) old_content = \"\" for f", "firebase import os import datetime import json import logging ...
[ "hitP(f, R, t, r, g): if f>=g/2 : return 0.0", "i in range(numTestCases): f, R, t, r, g = list(map(float,", "g = list(map(float, input().split())) p = hitP(f, R, t, r,", "(nGrids * missGridSideLength)**2 remainMissArea = 0 if remain - 2*r", "return (totalArea - missArea) / (R-t)**2 def main(): numTestCases ...
[ "end_token.copy_and_replace(keyname, new_key) return EventStreamResult(events, (from_token, end_token)) user_id_for_stream = user.to_string() if", "user_stream: _NotifierUserStream): self.user_to_user_stream[user_stream.user_id] = user_stream for room in user_stream.rooms: s", "2.0 (the \"License\"); # you may ...
[ "prices_data.price_with_sale == expected_price assert prices_data.price_with_discounts == expected_price - voucher_amount def", "= Money(5, currency) # when total = base_checkout_total(subtotal, shipping_price, discount,", "assert checkout_line_info.voucher # when prices_data = calculate_base_line_unit_price( c...
[ "JAN 2017\") self.assertIsInstance(date, DateValueTo) self.assertEqual(date.kind, DateValueTypes.TO) self.assertEqual(date.date, GregorianDate(2017, \"JAN\", 1))", "return (\"julian\", date) def visitHebrew(self, date): if not isinstance(date, HebrewDate):", "DateValue.parse(\"2016\") self.assertEqual(hash(dv1)...
[ "Any) -> Any: del self._get_current_object()[key] async def __aiter__(self) -> Any:", "try: return values[name] except KeyError: raise AttributeError(name) def __setattr__(self, name:", "o # noqa: E731 __le__ = lambda x, o: x._get_current_object()", "# noqa: E731 __lshift__ = lambda x, o: x._get_current_objec...
[ "self.loader: # send batch to device batch = batch.to(device) #", "present) self.model.eval() # Set the `testing=true` flag otherwise the final", "min_cluster_size: {min_cluster_size}, min_samples: {min_samples}') return hdbscan.HDBSCAN(min_cluster_size=min_cluster_size, min_samples=min_samples, metric=metric, ...
[ "to make `spack fetch --dependencies visionary-defaults` work url = 'https://github.com/electronicvisions/spack/archive/v0.8.tar.gz'", "depends_on('git+tcltk') depends_on('git-fat-git') depends_on('gtkplus') depends_on('imagemagick') depends_on('jq') depends_on('libpcap') depends_on('libtool') depends_on('llvm+vi...
[ "if not line : break; seq = line.split('\\t')[3] real_seq =", "output_file.write(\"\\n\") try: subprocess.check_output(cmd_bedtools, shell = True) except Exception as exc:", "$1, $2, $3, $16, $6}' cmd_paste = \"paste %s %s", "(\"\\t+ File %s already exists\" %pilfer_tmp) else: ## paste Aligned.sortedByCoord.o...
[ "the butter was bitter so betty bought a better butter", "a=\"<NAME>ought a butter the butter was bitter so betty bought", "bought a better butter which was not bitter\" v=[a[-1] for", "better butter which was not bitter\" v=[a[-1] for a in", "was bitter so betty bought a better butter which was", "a butt...
[ "Point, WritePrecision class Reader: def __init__(self, host, port, token, organization,", "= \"%d/%m/%Y %H:%M:%S\" level = logging.INFO if (verbosity): level =", "based on InfluxDB This implementation does its best to follow", "self.__token = token self.__organization = organization self.__bucket = bucket se...
[ "{ENV['m']}x{ENV['n']}-grid is tilable. If you can not believe a tiling", "'check_my_tiling'.\")) if ENV['my_conjecture'] == \"no\": TAc.OK() print(LANG.render_feedback(\"TRUE-is-not-tilable\", f\"You are perfecty", "you want to exhibit us a tiling for this grid", "('ISATTY',bool), ] ENV =Env(problem, service...
[ "be skipped') def test_ssh_pod(): p = set_pod_parser().parse_args(['--host', 'pi@172.16.1.110', '--timeout', '5000'])", "jina.peapods.pods import BasePod from jina.peapods.runtimes.remote.ssh import SSHRuntime from jina.proto import", "pp.status is None @pytest.mark.skip('not implemented yet') def test_ssh_muta...
[ "@dataclass class PayloadSender: phone: int name: str @dataclass class PayloadBaseModel:", "PayloadSender: phone: int name: str @dataclass class PayloadBaseModel: sender: PayloadSender", "dataclass @dataclass class PayloadSender: phone: int name: str @dataclass class", "dataclasses import dataclass @dataclass...
[ "closingIndex = closingParams.find(c) if openingIndex is not closingIndex: return False", "[] for c in expr: if c in openingParams: stack.append(c)", "if openingIndex is not closingIndex: return False if len(stack) ==", "in expr: if c in openingParams: stack.append(c) elif c in", "openingIndex = openingPara...
[ "each bin \" \"to 10x Genomics datasets without realigning\", },", "int elif arg_type == \"float\": arg_type = float elif arg_type", "pipelines = [ GenomeIndexPipeline(config), MappableRegionsPipeline(config), BinsPipeline(config), ] return CompositePipeline(config, pipelines)", "== \"string\": arg_type = str...
[ "512, 3, pad=1, stride=1) model.Relu('conv4_3', 'conv4_3') model.MaxPool('conv4_3', 'pool4', kernel=2, pad=0,", "512, 3, pad=1, stride=1) model.Relu('conv5_2', 'conv5_2') model.Conv('conv5_2', 'conv5_3', 512, 512,", "# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law", "3, pa...
[ "<4', # custom classifiers=[ \"Programming Language :: Python :: 3\",", "os import sys from shutil import rmtree from setuptools import", "as f: long_description = f.read() install_requires = [ # custom", "'build')) rmtree(os.path.join(here, 'xmind2testcase.egg-info')) # custom except OSError: pass self.statu...
[ "103, 189), (197, 176, 213), (140, 86, 75), (196, 156,", "218, 229)] tableau20 = [(r/255., g/255., b/255.) for r,g,b, in", "plt.subplot(111) x = np.linspace(0, 7, 1000) y = np.exp(-x/1.5)*np.cos(x/1*(2*np.pi))#*np.cos(x/0.05*(2*np.pi)) l,", "219, 141), (23, 190, 207), (158, 218, 229)] tableau20 =", "(127, 1...
[ "this GithubBuildRunSource. The trigger that invoked the build run. :param", "oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 from oci.decorators", "\"\"\" **[Required]** Gets the trigger_info of this GithubBuildRunSource. :return: The", "invoked the build ...
[ "is_code('random_string') is None assert is_code('fleur.inpGUT') is None assert is_code(99999) is", "of expected code type.\\n\" \"Valid labels for a fleur.fleur executable", "'fleur 30', 'energy_units': 'eV', 'kmax': 4.2, 'fermi_energy': 0.0605833326, 'spin_density': 0.0792504665,", "seems to be now way to a...
[ "`np.ndarray` of type `np.float_`, which is not possible \" f\"for", "self.__logpmf = logpmf super().__init__( shape=shape, dtype=dtype, random_state=random_state, parameters=parameters, sample=sample, in_support=in_support,", "cumulative distribution function. The shape of this argument should be", "None, en...
[ "self.assertEqual('GET', request.method) self.assertEqual(None, request.body) parameters = request.parameters self.assertEqual(parameters['project'], expected_project) self.assertEqual(parameters['region'],", "expected_region) self.assertEqual(parameters['address'], expected_address) def testReleaseMultipleAddres...
[ "), migrations.AlterField( model_name='competitor', name='min2', field=django.contrib.postgres.fields.ArrayField(base_field=models.PositiveSmallIntegerField(), blank=True, null=True, size=9, verbose_name='minuto 2'),", "dependencies = [ ('vote', '0004_auto_20210131_1621'), ] operations = [ migrations.AlterField("...
[ "sys.path.insert(1, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from tools.shared import asstr logger = logging.getLogger('wasm-sourcemap') def", "'--output', help='output source map') parser.add_argument('-p', '--prefix', nargs='*', help='replace source debug", "DWARF information from %s' % wa...