ngram
listlengths
0
67.8k
[ "\"simulation_time_step (minute)\": 60, \"frequency\": 50, \"upper_voltage\": 1.1, \"lower_voltage\":0.9, \"record_every\": 4, \"parallel_simulation\":True, \"parallel_process\": 1,", "1.1, \"lower_voltage\":0.9, \"record_every\": 96, \"export_voltages\": False, \"export_lineloadings\": False, \"export_transloadi...
[ "self.n_bombs = max(1, int(bombs_density * self.grid_size)) if n_bombs is None else n_bombs self.n_bombs", "+ (1,)] = self.HIDDEN else: self.state[coords + (1,)] = self.FLAG if case_content ==", "self.window.blit(score, (0.1*self.header_size, 0.8*self.width)) ## Time left time_text = self.num_font.render(\"TIME...
[ "prompt self.apps.set_permission('System', 'geolocation', 'deny') self.data_layer.set_setting('lockscreen.passcode-lock.code', self._input_passcode) self.data_layer.set_setting('lockscreen.passcode-lock.enabled', True) # this time we need", "http://mozilla.org/MPL/2.0/. from gaiatest import GaiaTestCase from gaia...
[ "features (x) with from the 1-ring indices (Gi) applys symmetric functions to handle", "in batch with zeros padding = torch.zeros((x.shape[0], x.shape[1], 1), requires_grad=True, device=x.device) # add", "gemm G = torch.cat([self.pad_gemm(i, x.shape[2], x.device) for i in mesh], 0) # build", "edge features (B...
[ "the file. fileh = tables.open_file('development.hdf5', mode='r') # Dimentionality of the data structure. print(fileh.root.utterance_test.shape)", "= tables.open_file('development.hdf5', mode='r') # Dimentionality of the data structure. print(fileh.root.utterance_test.shape) print(fileh.root.utterance_train.shape...
[ "traceback import unittest def async_test(f): def wrapper(test_case: unittest.TestCase, *args, **kwargs): loop = asyncio.get_event_loop()", "**kwargs): loop = asyncio.get_event_loop() task = loop.create_task(f(test_case, *args, **kwargs)) try: loop.run_until_complete(task) except Exception:", "import asyncio im...
[ "вводимых данных.' else: newuser_form = UserCreationForm() return render(request, 'reg.html', locals() ) def main(request):", "return render_to_response('login.html', args) def reg(request): auth.logout(request) error = '' if request.method == \"POST\":", "import HttpResponseRedirect def login(request): args = ...
[ "from Facepatchindependenttrain import runPatch import sys 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=int(sys.argv[4]),", "trainpklID=int(sys.argv[2]), testpklID=int(sys.argv[3]), NetworkType=int(sys.argv[4]), r...
[ "converts po source to tmx source without requiring files\"\"\" inputfile = wStringIO.StringIO(posource) outputfile", "\"Toepassings\" \"\"\" tmx = self.po2tmx(minipo) print \"The generated xml:\" print str(tmx) assert tmx.translate(\"Applications\")", "tmx.document.findall(\".//%s\" % tmx.namespaced(\"tuv\"))[...
[ "show_torrent_info(info_hash): \"\"\" Display current torrent info :param info_hash: :return: \"\"\" torr_info = jsonrq.get_torrent_info(info_hash)", "torrent info :param info_hash: :return: \"\"\" torr_info = jsonrq.get_torrent_info(info_hash) info_dialog = xbmcgui.DialogProgress() info_dialog.create(torr_info['...
[ "#!/usr/bin/env python from distutils.core import setup setup(name='Mimik', version='1.0', description='Python framework for markov models',", "python from distutils.core import setup setup(name='Mimik', version='1.0', description='Python framework for markov models', author='<NAME>',", "setup setup(name='Mimik...
[ "drop the last image from the list (convert tuple) to get the package", "batch_dir) print(e) def get_human_readable_file_size(size, precision=2): suffixes = [\"B\", \"KiB\", \"MiB\", \"GiB\", \"TiB\"] suffixIndex", "+= 1 # increment the index of the suffix size = size /", "os.path.split(batch_dir) new_dir_num...
[ "'SLC17A8', 'SLC26A4', 'SLC52A2', 'SLITRK6', 'SMPX', 'SOX10', 'STRC', 'SYNE4', 'TBC1D24', 'TECTA', 'TIMM8A', 'TMC1', 'TMIE',", "'CLDN14', 'CLIC5', 'CLPP', 'CLRN1', 'COCH', 'COL11A2', 'DIAPH1', 'DIAPH3', 'DMXL2', 'DNMT1', 'DSPP', 'EDN3', 'EDNRB',", "'COCH', 'COL11A2', 'DIAPH1', 'DIAPH3', 'DMXL2', 'DNMT1', 'DSPP'...
[ "} try: measures[\"roc_auc_weighted\"] = multi_class_roc_auc_score(labels, predictions, 'weighted') measures[\"roc_auc_macro\"] = multi_class_roc_auc_score(labels, predictions, 'macro') measures[\"roc_auc_micro\"]", "neg_class = 0 else: neg_class = 1 tp, fp, tn, fn = calculate_cm_states(labels,", "score can not...
[ "patched_get_tenant_model) def test_whowill_with_pending_migrations(self): with warnings.catch_warnings(): warnings.simplefilter(\"ignore\") # Avoid warnings about model being registered", "= TenantModel(schema_name=\"tenant1\") tenant1.save(verbosity=0) @classmethod def tearDownClass(cls): for tenant in TenantMo...
[ "component wraps TensorFlow Transform (tf.Transform) to preprocess data in a TFX pipeline. This", "= types.Channel( type=standard_artifacts.Examples, artifacts=[example_artifact]) spec = TransformSpec( examples=examples, schema=schema, module_file=module_file, preprocessing_fn=preprocessing_fn, transform_graph=tr...
[ "# The object type, either b1000 (regular), b1010 (symlink), b1110 (gitlink) mode_type =", "in bytes size = None # The object's hash as a hex string", "a file's metadata changed. This is a tuple (seconds, nanoseconds) ctime = None", "changed. This is a tuple (seconds, nanoseconds) ctime = None # The last", ...
[ "tf.gather(features_padded, nonempty_examples, axis=0) return features_batch def get_config(self): config = super().get_config() config.update({\"batch_size\": self.batch_size}) return", "= tf.unique(graph_indices)[0] features_batch = tf.gather(features_padded, nonempty_examples, axis=0) return features_batch def...
[ "from .demo import * SITE.verbose_name = SITE.verbose_name + \" (:memory:)\" # SITE =", "= SITE.verbose_name + \" (:memory:)\" # SITE = Site(globals(), title=Site.title+\" (:memory:)\") DATABASES['default']['NAME'] =", "<gh_stars>1-10 from .demo import * SITE.verbose_name = SITE.verbose_name + \" (:memory:)\" #...
[ "import path from . import views app_name = 'reservation' urlpatterns = [ path('',", "from django.urls import path from . import views app_name = 'reservation' urlpatterns =", "views app_name = 'reservation' urlpatterns = [ path('', views.reserve_table, name = 'reserve_table'), ]", "path from . import views a...
[ "'cupy-cuda120', 'cupy-cuda114', 'cupy-cuda113', 'cupy-cuda112', 'cupy-cuda111', 'cupy-cuda110', 'cupy-cuda102', 'cupy-cuda101', 'cupy-cuda100', 'cupy-cuda92', 'cupy-cuda91', 'cupy-cuda90', 'cupy-cuda80',", "'specifier': '>=7.7.0,<8.0.0', 'help': 'https://docs.cupy.dev/en/latest/install.html', }, { 'name': 'iDeep...
[ "'bordervalue': (127, 127, 127), 'zoom_out_value': 0.7, 'output_shape': (416, 416), 'take_value' : 5 }", "loc = box_loc[:,0:4].copy() loc = np.append(loc, loc[:, 0:1], axis=-1) loc = np.append(loc, loc[:,", "out_img, box_loc if __name__ == \"__main__\": img = cv2.imread('./00002.jpg') bbox = load_csv('./00002.x...
[ "get_args(): \"\"\"Get command-line arguments\"\"\" parser = argparse.ArgumentParser( description=\"Working with lists\", formatter_class=argparse.ArgumentDefaultsHelpFormatter, ) parser.add_argument(\"items\",", "sort_flag = args.sorted items = args.items if sort_flag: items = sorted(items) if len(items)", "3:...
[ "triangle is an equilateral triangle.\") elif side_a==side_b or side_a==side_c or side_b==side_c: print(\"The triangle", "third side(c):\")) if side_a==side_b and side_a==side_c: print(\"The triangle is an equilateral triangle.\") elif", "side_a==side_c: print(\"The triangle is an equilateral triangle.\") elif ...
[ "artists(): return Artist.query.all() @bp.route('/artist/<uid>/') def intro(uid): artist = Artist.get_or_404(uid) return st('modules/artist/show.html', **locals()) @bp.route('/artist/<uid>/detail')", "@bp.route('/artist/<uid>/') def intro(uid): artist = Artist.get_or_404(uid) return st('modules/artist/show.html',...
[ "(bbox[2]-bbox[0]+1+bbox[3]-bbox[1]+1)/2 len_per_pix = plate_diameter/float(diameter) avg = 0 k = 0 for point in", "plate_depth/depth return len_per_pix, depth_per_pix def cal_volume(points, img, len_per_pix, depth_per_pix, lowest): volume = 0.0", "for point in points: avg += img[point[1]][point[0]] k += 1 avg ...
[ "!= '#' and tokens[1] not in IGNORES: basepath = tokens[-1].strip('()') # highland and", "external packages for now IGNORES = ['CMT', 'EXTERN', 'GSL', 'MYSQL', 'GEANT', 'CLHEP'] #", "subpackages within a master, so # we need to take that into account", "default=False, help='tag only c/cpp files (default)') pa...
[ "return True def _mine_flush(self, load, skip_verify=False): ''' Allow the minion to delete all", "< min_time: log.warn('Autosign keyid expired {0}'.format(stub_file)) os.remove(stub_file) stub_file = os.path.join(autosign_dir, keyid) if not", "def minion_publish(self, load): ''' Publish a command initiated fro...
[ "# # Licensed under the Apache License, Version 2.0 (the \"License\"); # you", "__future__ import absolute_import # pylint: disable=import-only-modules from __future__ import unicode_literals # pylint: disable=import-only-modules", "KIND, either express or implied. # See the License for the specific language", ...
[ "# shape: batch, filters, output_length output = sum(output, axis=3) # shape: batch, filters,", "less' ' than or equal to rank of then and' ' else expressions.", "is not None and a < 0: _axis[i] = (a % ndim) if", "= not has_seq_axis(inputs) if go_backwards and need_convert is False: raise NotImplementedError(...
[ "access enumeration. # # The require_realm indicates this is the first step in", "import errors class ResourceEndpoint(BaseEndpoint): \"\"\"An endpoint responsible for protecting resources. Typical use is", "\"\"\" try: request = self._create_request(uri, http_method, body, headers) except errors.OAuth1Error: r...
[ "# @ Authors : <NAME> # <NAME> # # @ Hint: you have", "Store height and width and channels of the image row, col, chs =", "retrieve the params of translation row_trans, col_trans = trans # Create the translation", "matrix T = np.float32([[1, 0, col_trans], [0, 1, row_trans]]) # Apply the T", "# translation ...
[ "calculate_iou(ctx_box, proposal['box']) > self.threshold: hit_num += 1 break recall_list.append(hit_num / ctx_num) avg_num_list.append(len(ranked_proposals)) return", "select proposals ranked_proposals = sorted(proposals, key=lambda p: p['score'], reverse=True)[:self.top_N] for proposal in ranked_proposals:", ...
[ "-*- coding: utf-8 -*- \"\"\" Created on Sat Aug 22 19:07:30 2020 @author:", "tempLetLog.append(' '.join(i.split(' ')[1:]+[i.split(' ')[0]])) tempLetLog=sorted(tempLetLog) letLog=[] for i in tempLetLog: tempPrime=i.split(' ')[:-1] temp=i.split('", "on Sat Aug 22 19:07:30 2020 @author: <NAME> \"\"\" class Soluti...
[ "..core.tracing import traced_atomic_transaction @contextmanager def transaction_with_commit_on_errors(): \"\"\"Perform transaction and raise an error in", "transaction and raise an error in any occurred.\"\"\" error = None with traced_atomic_transaction():", "transaction_with_commit_on_errors(): \"\"\"Perform ...
[ "\"2018-05-22T00:00:00\"' scopes = [ '-m \"azgovtest4\"', '', '-g \"defaultresourcegroup-eus\"', '--resource \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/eastusnsggroup/providers/microsoft.network/networksecuritygroups/eastusnsg/securityrules/allow-joba\"', '--resource \"omssecuritydevkeyval...
[ "rep_1_bam = tests.bam.BAM() rep_1_bam.path = sample_1_replicate_template.format(1) rep_2_bam = tests.bam.BAM() rep_2_bam.path = sample_1_replicate_template.format(2) sample_1_bams", "self._read_type = 'paired' self._read_length = 50 self._sample_1_bams_path = os.path.join(self._generated_input_dir, 'b1.txt') sel...
[ "(7, 5)] >>> alignment2pharaohtext(alignment) '0-0 2-1 9-2 21-3 10-4 7-5' :type alignment: Alignment", "str :return: the word alignment outputs in the pharaoh output format \"\"\" pharaoh_text", ":return: the word alignment outputs in the pharaoh output format \"\"\" pharaoh_text =", "import Alignment def pha...
[ "# Writing duplicated signatures is possible, it should not raise. self.db.WriteYaraSignatureReference(blob_id=blob_id, username=\"foo\") self.db.WriteYaraSignatureReference(blob_id=blob_id,", "def testVerifyYaraSignatureReferenceSimple(self): self.db.WriteGRRUser(\"foo\") blob_id = rdf_objects.BlobID(os.urandom(...
[ "1: inducing_points = inducing_points.unsqueeze(-1) self.register_parameter(name=\"inducing_points\", parameter=torch.nn.Parameter(inducing_points)) self.register_added_loss_term(\"inducing_point_loss_term\") def _clear_cache(self): if hasattr(self, \"_cached_kernel_mat\"): del", "else: return covar def num_outpu...
[ "db from app.extensions.schema import ma from app.views import albums, artists, hello, tracks def", "from flask import Flask from flask_cors import CORS from app.extensions import api from", "from flask_cors import CORS from app.extensions import api from app.extensions.database import db from", "= False with...
[ "import json import MySQLdb import decimal class Encoder(json.JSONEncoder): def default(self, obj): if isinstance(obj,", "None] and prod_name not in prod_new: if quantity not in ['', ' ',", "Configure the database db = yaml.load(open('db.yaml')) app.config['MYSQL_HOST'] = db['mysql_host'] app.config['MYSQL_USER...
[ "the License. from __future__ import print_function import unittest import numpy as np from", "KIND, either express or implied. # See the License for the specific language", "language governing permissions and # limitations under the License. from __future__ import print_function", "Unless required by applica...
[ "position='after_conv2') ] ), neck=dict( type='RFP', rfp_steps=2, aspp_out_channels=64, aspp_dilations=(1, 3, 6, 1), rfp_backbone=dict( rfp_inplanes=256,", "), dict( type='Shared2FCBBoxHead', num_classes=14 ) ] ), test_cfg=dict( rpn=dict( nms_thr=0.7 ), rcnn=dict( score_thr=0.0,", "3, 6, 1), rfp_backbone=dict( ...
[ "_validate_x_values) class DistributionsTests(TestCase): def setUp(self): # Test null data list. self.Null = None", "3], None, 3) def test_get_distribution_markers_null_marker_list(self): self.assertEqual(_get_distribution_markers('colors', None, 5), ['b', 'g', 'r', 'c', 'm'])", "(1.0, 0.0, 0.0, 1.0)) self.asse...
[]
[ "# # Licensed under the Apache License, Version 2.0 (the \"License\"); # you", "writing, software # distributed under the License is distributed on an \"AS IS\"", "distribution=tfd.Gamma(concentration=1., rate=2.), bijector=tfb.Invert(tfb.Exp()))) self.assertAllEqual( [], self.evaluate( tf.shape( exp_gamma_dist...
[ "ErrorType\"\"\" self.set_dayu_type(MAlert.ErrorType) return self def closable(self): \"\"\"Set MAlert closebale is True\"\"\" self.set_closeable(True) return", "to InfoType\"\"\" self.set_dayu_type(MAlert.InfoType) return self def success(self): \"\"\"Set MAlert to SuccessType\"\"\" self.set_dayu_type(MAlert.Suc...
[ "<gh_stars>0 input_str = input(\"문자열을 입력해 주세요. >> \") print(\"입력받은 문자열의 길이는\", len(input_str), \"입니다.\")" ]
[ "Formats start_date = \"'\"+strftime(\"%Y-%m-%d %H:%M:%S\", gmtime())+\"'\" log_date =strftime(\"%Y%m%d\", gmtime()) # Job Naming Details", "\"\"\"+ db_schema +\"\"\".SALES_HIERARCHY (SALES_GEOGRAPHY, SALES_MULTI_AREA, SALES_AREA, SALES_MULTI_REGION, SALES_REGION, SALES_DISTRICT, SALES_TEAM, EMPLOYEE_ID, SALES_RE...
[ "t is a nine item tuple returned by the time module. This method", "< 0: high += 4294967296 return high + low def encodeLongLong(i): high =", "return False def printList(lst): #for i in range(len(lst)): # print i, '\\t', repr(lst[i])", "print i, '\\t', repr(lst[i]) pass # t is a nine item tuple returned", "...
[ "objects = {len(new_objs)}\") with open(f\"/work/{media_id}.json\", \"w\") as f: json.dump(new_objs,f) if not args.dry_run: for", "\"max-length\": {}, \"min-length\": 0} if args.strategy_config: strategy = {**default_strategy} with open(args.strategy_config, \"r\") as", "= det['x'] det['orig_y'] = det['y'] det[...
[ "d_real = ds[0] d_fake = tf.add_n(ds[1:])/(len(ds)-1) loss_object = self.config['loss_class'](gan, self.config, d_real=d_real, d_fake=d_fake) losses.append(loss_object)", "config = self.config losses = [] split = self.split for d in gan.discriminator.children:", "d in gan.discriminator.children: if config.swapp...
[ "the rule target. \"\"\" policy = get_policy_or_error(db, policy_key) logger.info(f\"Finding rule with key '{rule_key}'\")", "as schemas from fidesops.schemas.api import BulkUpdateFailed from fidesops.util.oauth_util import verify_oauth_client router = APIRouter(tags=[\"Policy\"],", "Session, policy_key: FidesO...
[ "features: list of features to extract :param company_week: company week of the company", "weeks self.g_client = g_client self.api_source_manager = api_source_manager self.thresholds = () self.table_surveys_replies = []", "topic_comments_scores)) self.insert_to_list_topic_comments(topic_w_scores) entities = nes...
[ "machime' class DimProcess: def __init__( self, *kwargs, process_key: int, module: str, type: str,", "*kwargs, process_key: int, module: str, type: str, step: str, sub_step: str, resource: str", "'qc', 'sub_step': None, 'process_key': 2, 'resource': 'machine', 'module': 'keyed_data', 'step': 'transform', 'sub_s...
[ "= GenericForeignKeyIdField( owner_type, editable=True, blank=True, null=True, verbose_name=format_lazy(u\"{} {}\", owner_label, _('(object)'))) owner = GenericForeignKey(", "_('(type)'))) dd.update_field(cls, 'owner_type', **kwargs) def update_owned_instance(self, controllable): if self.owner: self.owner.update_...
[ "is None or toplam_beyaz>cevap[0]: cevap=(toplam_beyaz,j,s) return yanit[cevap[1]] def sorugrup_islemleri(soru,soru_gri,coords): yanit=[\"A\",\"B\",\"C\",\"D\",\"E\"] sayac=0 thresh=cv2.threshold(soru_gri,180,255,cv2.THRESH_BINARY_INV)[1] coords=contours.sort_contours(coords,method=\"top-to-bottom\")[0]", "yanit+...
[ "and the following disclaimer in the documentation # and/or other materials provided with", "user) movie = grader.get_movie_imdb(self.imdb) print movie if movie[\"grade\"][\"type\"] != \"seen\": dialog = xbmcgui.Dialog()", "EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES",...
[ "Ra(19, 86)]+\\ [Ra(7, 43), Ra(6, 43), Ra(-1, 43)]+[Ra(35, 86), Ra(-13, 86), Ra(-5, 86)])", "0]+[2, 3, 0, 0]+[4, 5, 6, 0]+[7, 8, 9, 10]) notLT = createMatrix(4,", "assert not alternate2.isAntisymmetricMatrix() def testIsSingular(self): assert b6.isSingular() def testTrace(self): self.assertEqual(15, b4.trace())...
[ "<gh_stars>0 # Module Level def setUp(): print 'test setup' def tearDown(): print 'test", "Level def func_1_setup(): print 'test_func_1 setup' def func_1_teardown(): print 'test_func_1_teardown' # Target Func", "Function Level def func_1_setup(): print 'test_func_1 setup' def func_1_teardown(): print 'test_func...
[ "Exception as e: return {'files': 0, \"total_size\": 0} class S3ListBuckets(): def __init__(self, host='127.0.0.1:9000'):", "for userid in sorted(userids): U = askRedis(**redis_conf) data = U.read('accounts', userid) content =", "% (resource, name) files = r.get(res) try: return {'files': int(files), \"total_si...
[ "but got shape: {}\".format(bbox_shape) device = input_ids.device if input_ids is not None else", "sequence_length, hidden_size)`. Hidden-states of the model at the output of each layer plus", "# attention_probs has shape bsz x n_heads x N x N # input", "input_ids.device else: input_shape = inputs_embeds.size...
[ "cpuPercent, 2) # CPU空余 # 内存 m = psutil.virtual_memory() # 内存信息 memoryTotal =", "= psutil.virtual_memory() # 内存信息 memoryTotal = round(m.total / (1024.0 * 1024.0 * 1024.0),", "总储存空间大小 diskUsed = 0 # 已用 diskFree = 0 # 剩余 for i", "= m.percent res['disk'] = o.percent res['memoryTotal'] = memoryTotal res['memoryUs...
[ "0 continue transform[..., i, :, :] = torch.matmul(transform[..., pi, :, :], transform[..., i,", "i, pi in enumerate(self.topology): if pi == 0 or pi == -1: continue", "wy m[..., 2, 1] = yz + wx m[..., 2, 2] = 1.0", "* y2 yz = qy * z2 wy = qw * y2 xz", "1e-10] = 1 rotation = rotation / norm if quater: trans...
[ "string, num int) PARTITIONED BY (ds string); INSERT OVERWRITE TABLE static_babynames_partitioned PARTITION(ds='{{ ds", "distributed on an # \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY", "os.environ[\"AIRFLOW__CORE__SECURITY\"] def test_get_proxy_user_value(self): from airflow.hooks.hive_hooks impo...
[ "= {\"level\": 0, \"coal\": 0, \"iron\": 1, \"copper\":0} tiles = pygame.sprite.Group() rails =", "= window screen = \"game\" s = {\"fullscreen\": False} running = True gamedata", "interactables tiles, rails, interactables, listmap = map.loadmap(int(number)) carts.empty() gamedata[\"level\"] = number gamedata[\...
[ "get_length(xa=-50, ya=99, xb=.67, yb=.26): # calcualte the length of vector AB vector which", "Methods: Extract Method. import math def get_distance(xc1=5, xc2=7.25, yc1=22, yc2=-4.84): # Calculate the", "Example for Compose Methods: Extract Method. import math def get_distance(xc1=5, xc2=7.25, yc1=22, yc2=-4....
[ "b.degree(DE.t) > 0: for i in range(m): si = Poly(Q[i].nth(b.degree(DE.t))/b.LC(), DE.t) H[i] =", "either D == d/dt or deg(b) > max(0, deg(D) - 1), returns h1,", "p of degree <= n in k[t] with c1, ..., cm in Const(k)", "such that Df/f == Du, or None, which means that Df/f is not", "is_log_deriv_k_t_radical,...
[ "if type(wait_for) == str: wait_for = [wait_for] if type(confirmation) == str: confirmation =", "*, wait_for, confirmation): if type(wait_for) == str: wait_for = [wait_for] if type(confirmation) ==", "strip_prompt=False, strip_command=False ) return result if __name__ == \"__main__\": with open(\"devices.yaml\"...
[ "to objects, allowing you to recurse down nested dicts (like: AttributeDict.attr.attr) \"\"\" def", "with key-values accessibly using attribute notation (AttributeDict.attribute) instead of key notation (Dict[\"key\"]). This", "nested Dictionary into an object with key-values accessibly using attribute notation...
[ "in the range 0 to 65535 inclusive. n = 100 while n >", "Level \",n) r.duty_u16(int(red_brightness)*n) g.duty_u16(int(green_brightness)*n) b.duty_u16(int(blue_brightness)*n) w.duty_u16(int(white_brightness)*n) time.sleep(.3) n = n - 5 #Turn", "is low all of the time. # https://projects.raspberrypi.org/en/projec...
[ "not os.path.isdir(constants.PLUGIN_TMP_DIR): raise Exception(\"plugin tmp dir '{}' not found\". format(constants.PLUGIN_TMP_DIR)) if type ==", "os.path.join(constants.PLUGIN_TMP_DIR, \"known_bugs.yaml\") with open(known_bugs_yaml, 'w') as fd: fd.write(yaml.dump(current)) def add_known_bugs_to_master_plugin(): \"...
[ "def echo(msg): print 'Got', msg return msg class echoserver(xmls.SimpleXMLRPCServer): allow_reuse_address = True server", "echoserver(xmls.SimpleXMLRPCServer): allow_reuse_address = True server = echoserver(('127.0.0.1', 8001)) server.register_function(echo, 'echo') print 'Listening on", "print 'Got', msg retu...
[ "# Verifies that depth_multiplier arg scope actually works # if no default min_depth", "KIND, either express or implied. # See the License for the specific language", "governing permissions and # limitations under the License. # ============================================================================== \"\"...
[ "changes detected') else: logger.info('Updating gist with new content') gist.edit(files={ gh_fname: { \"content\": new_content", "f = firebase.FirebaseApplication(firebase_url, None) f.authentication = firebase.FirebaseAuthentication(firebase_secret, firebase_username, admin=True) return f logger.info('==========...
[ "/ 4.0 print( \"missed a %.12f, total area %.12f\" %(missR**2, (R-t)**2) ) return", "- 2*r > 2*f if remain > g+r: totalArea = R**2 / 4.0", "remainMissArea = 0 if remain - 2*r > 2*f if remain > g+r:", "g - 2*f print(\"gridL %.12f; nGrids %d\" %(gridL, nGrids) ) indentSquareLength = nGrids*gridL", "gridL = g+...
[ "a very cheap test to perform, but it's only executed # when rendering", "below which all events have been persisted. \"\"\" pending = self.pending_new_room_events self.pending_new_room_events =", "pending = self.pending_new_room_events self.pending_new_room_events = [] users = set() # type: Set[UserID] rooms",...
[ "zero_taxed_money = TaxedMoney(net=Money(0, currency), gross=Money(0, currency)) subtotal = TaxedMoney(net=Money(10, currency), gross=Money(12, currency)) shipping_price", "= True voucher.discount_value_type = DiscountValueType.PERCENTAGE voucher.save() voucher_percent_value = Decimal(10) voucher_channel_listing ...
[ "date compares later than more specific self.assertTrue(DateValue.parse(\"2000\") > DateValue.parse(\"31 DEC 2000\")) self.assertTrue(DateValue.parse(\"DEC 2000\")", "TO 1 APR 2000\") def test_013_date_parse_range(self): \"\"\"Test date.DateValue class.\"\"\" date = DateValue.parse(\"BEF 1967B.C.\")", "comparin...
[ "noqa: E731, E501 x._get_current_object(), n, v # type: ignore ) __delattr__ = lambda", "% self.__class__.__name__ return repr(obj) def __bool__(self) -> bool: try: return bool(self._get_current_object()) except RuntimeError:", "# noqa: E731 __xor__ = lambda x, o: x._get_current_object() ^ o # noqa:", "lambda...
[ "D * H * W) and transpose -> (D * H * W,", "= self.config['model'].get('output_heads', 1) logger.info(f'Running prediction on {len(self.loader)} patches...') # dimensionality of the the", "regions if the IoU exceeds a given threshold for new_label in new_labels: #", "The resulting volume is the segmentation i...
[ "as a MetaPackage-concept has been merged, please update this package version('1.0', '372ce038842f20bf0ae02de50c26e85d', url='https://github.com/electronicvisions/spack/archive/v0.8.tar.gz')", "version('1.0', '372ce038842f20bf0ae02de50c26e85d', url='https://github.com/electronicvisions/spack/archive/v0.8.tar.gz')...
[ "Variables dirname_name = os.path.dirname(bam_file) split_name = os.path.splitext( os.path.basename(bam_file) ) bed_file = folder +", "else: cmd_samtools = \"%s view %s > %s\" %(samtools_exe, bam_file, sam_file) output_file.write(cmd_samtools) output_file.write(\"\\n\")", "%os.path.realpath(__file__)) exit() ba...
[ "so betty bought a better butter which was not bitter\" v=[a[-1] for a", "a better butter which was not bitter\" v=[a[-1] for a in a.split() if(len(a)%2==0)]", "butter the butter was bitter so betty bought a better butter which was", "was bitter so betty bought a better butter which was not bitter\" v=[a[-1]"...
[ "self.__mutex.acquire() q = persistqueue.SQLiteQueue('data', multithreading=True, auto_commit=True) self.__mutex.release() client = InfluxDBClient(url=url, token=token) write_api =", "does its best to follow the Robert Martin's Clean code guidelines. The comments", "<reponame>lcarnevale/proxy-mqtt2influx<filena...
[ "is NOT tilable. If you are not convinced you can submit a tiling", "for this grid you can submit it to the service 'check_my_tiling'.\")) if ENV['my_conjecture']", "YOUR SERVICE: assert ENV['h']==1 assert ENV['k']==2 print() if (ENV['m'] * ENV['n']) % 2", "from multilanguage import Env, Lang, TALcolors # MET...
[ "locally, but until I findout how to mock ssh, this has to be", "'--timeout', '5000']) p = BasePod(p) with SSHRuntime(p, kind='pod') as pp: assert pp.status.envelope.status.code ==", "skipped') def test_ssh_pea(): p = set_pea_parser().parse_args(['--host', 'pi@172.16.1.110', '--timeout', '5000']) with SSHRuntim...
[ "class PayloadSender: phone: int name: str @dataclass class PayloadBaseModel: sender: PayloadSender payload_id: str", "@dataclass class PayloadSender: phone: int name: str @dataclass class PayloadBaseModel: sender: PayloadSender payload_id:", "import dataclass @dataclass class PayloadSender: phone: int name: st...
[ "stack = [] for c in expr: if c in openingParams: stack.append(c) elif", "return False if len(stack) == 0: return True return False if __name__ =='__main__':", "closingIndex: return False if len(stack) == 0: return True return False if __name__", "def main(expr): openingParams = '({[' closingParams = ')}]' st...
[ "genome\", }, \"bins\": { \"config_groups\": [\"genome\", \"mappable_regions\", \"bins\", \"sge\"], \"help\": \"calculates all bins", "{ \"config_groups\": [ \"aligner\", \"genome\", \"reads\", \"mapping\", \"bins\", \"varbin\", \"scclust\", \"sge\"], \"help\": \"combines", "def build_cli_options(argparser, com...
[ "# # Licensed under the Apache License, Version 2.0 (the \"License\"); # you", "writing, software # distributed under the License is distributed on an \"AS IS\"", "512, 512, 3, pad=1, stride=1) model.Relu('conv5_2', 'conv5_2') model.Conv('conv5_2', 'conv5_3', 512, 512, 3, pad=1,", "KIND, either express or imp...
[ "= {} here = os.path.abspath(os.path.dirname(__file__)) with io.open(os.path.join(here, 'xmind2testcase', '__about__.py'), encoding='utf-8') as f: #", "python # -*- coding: utf-8 -*- import io import os import sys from", "self.status('Building Source and Wheel (universal) distribution...') os.system('{0} setup....
[ "187, 120), (44, 160, 44), (152, 223, 138), (214, 39, 40), (255, 152,", "(214, 39, 40), (255, 152, 150), (148, 103, 189), (197, 176, 213), (140,", "ax.text(7, 1, r'$y(t)=\\exp\\left(-t/1.5\\right)\\cos(\\omega_1t)\\cos(\\omega_2t)$', fontsize=18, va='top', ha='right') #plt.title(\"Hallo\") plt.setp(plt.gca(), x...
[ "2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. from .build_run_source import", "The trigger_info of this GithubBuildRunSource. :rtype: oci.devops.models.TriggerInfo \"\"\" return self._trigger_info @trigger_info.setter def trigger_info(self,", "\"\"\" self.swagger_ty...
[ "is_code(99999) is None code = fixture_code('fleur.inpgen') code.store() assert is_code(code.uuid) assert is_code(code.pk) assert is_code('@'.join([code.label,", "assert is_code(99999) is None code = fixture_code('fleur.inpgen') code.store() assert is_code(code.uuid) assert is_code(code.pk) assert", "''' Tests ...
[ "a :class:`RandomVariable`. Examples -------- \"\"\" # pylint: disable=too-many-instance-attributes,too-many-public-methods def __init__( self, shape: ShapeArgType,", "in_support self.__cdf = cdf self.__logcdf = logcdf self.__quantile = quantile # Properties of", "available in Python >=3.8 from functools import...
[ "'releaseaddress', set_flags=set_flags) calls = [self.mock.Respond('compute.addresses.delete', {}) for x in xrange(len(expected_addresses))] _, exceptions =", "gcutil_unittest.SelectTemplateForVersion( expected_data, command.api.version), data) def testReleaseAddressGeneratesCorrectRequest(self): expected_project...
[ "00:00 import django.contrib.postgres.fields from django.db import migrations, models class Migration(migrations.Migration): dependencies = [", "dependencies = [ ('vote', '0004_auto_20210131_1621'), ] operations = [ migrations.AlterField( model_name='competitor', name='min1', field=django.contrib.postgres.fields....
[ "' + options.dwarfdump) sys.exit(1) process = Popen([options.dwarfdump, \"-debug-info\", \"-debug-line\", wasm], stdout=PIPE) output, err", "0 0 # 0x0000000000000010 23 3 1 0 0 end_sequence # 0x0000000000000011 28", "name.startswith(p['prefix']): if p['replacement'] is None: result = name[len(p['prefix'])::] el...