ngram
listlengths
0
67.8k
[ "sparse/dense matrices for varying matrices along batch, must have the same nonzero locations.", "default backend can be set globally using `set_global_default_backend()` and locally using `with backend:`.", "self.memory: int = memory \"\"\" Maximum memory of the device that can be", "a node in a graph. Use `...
[ "LazyReCompile COLORS = CURTSIES_COLORS + (\"default\",) CNAMES = dict(zip(\"krgybmcwd\", COLORS)) # hack for", "= CURTSIES_COLORS + (\"default\",) CNAMES = dict(zip(\"krgybmcwd\", COLORS)) # hack for finding the", "= \"k\"): \"\"\"Returns FmtStr constructor for a bpython-style color code\"\"\" if letter_color_...
[ "7, value) self.add_field('ROW_SPACING_UNITS', 's', 1, value) self.add_field('COL_SPACING', 's', 7, value) self.add_field('COL_SPACING_UNITS', 's', 1,", "__init__(self, value): super(BANDSAType, self).__init__() self.add_field('ROW_SPACING', 's', 7, value) self.add_field('ROW_SPACING_UNITS', 's', 1, value) self.a...
[ "| pred:%s)\\n\" % (idx, round(loss,2), truth, pred)) #print(obs) return def layer_output(self, layer_id, example_id=0,", "pred)) #print(obs) return def layer_output(self, layer_id, example_id=0, batch_id=0, use_val=False): \"\"\" ``` Prints output", "help debug models. Uses first example (example_id=0) from tr...
[ "if VegaZero['transform']['sort']['type'] == 'desc': self.VegaLiteSpec[VegaZero['mark']]['encoding']['x']['sort'] = '-y' else: self.VegaLiteSpec[VegaZero['mark']]['encoding']['x']['sort'] = 'y' return self.VegaLiteSpec[VegaZero['mark']]", "'.join(filter_part_token).split() filter_part_token = ['&' if x == 'and' e...
[ "= name self.checker = checker self.block: Optional[ac.Block] = None def update(self, acn: AC)", "raise JCNotFoundException(f'Jízdní cesta {self.name} neexistuje!') return StepJC.name_to_id[name] def disp_str(self) -> str: return f'Stavění", "steps self.stepi = 0 def on_start(self) -> None: logging.info('Start'...
[ "API_PATH class ReportableMixin: \"\"\"Interface for RedditBase classes that can be reported.\"\"\" def report(self,", "\"\"\"Report this object to the moderators of its subreddit. :param reason: The reason", "Raises :class:`.APIException` if ``reason`` is longer than 100 characters. Example usage: .. code-bloc...
[ "def _jpeg_compression(im): assert torch.is_tensor(im) im = ToPILImage()(im) savepath = BytesIO() im.save(savepath, 'JPEG', quality=75)", "assert torch.is_tensor(im) im = ToPILImage()(im) savepath = BytesIO() im.save(savepath, 'JPEG', quality=75) im =", "torch.is_tensor(im) im = ToPILImage()(im) savepath = Byte...
[ "mellonByteFileFromFilePathAndConfigFactory = Factory(MellonByteFileFromFilePathAndConfig) @interface.implementer(mellon.IUnicodeMellonFile) class MellonUnicodeFileFromFilePathAndConfig(object): def __init__(self, file_path, config): self.file_path = file_path", "import mellon @interface.implementer(mellon.IByteM...
[ "'MSCeleb1M') Datasource.register_instance('5celeb', __name__ + '.fivecelebface', 'FiveCelebFace') Datasource.register_instance('ffhq', __name__ + '.ffhq', 'FFHQ') Datasource.register_instance('celeba', __name__", "'.fivecelebface', 'FiveCelebFace') Datasource.register_instance('ffhq', __name__ + '.ffhq', 'FFHQ')...
[ "[0.87, 0.9, 0.9359999999999999, 0.924, 0.944, 0.944, 0.948, 0.888, 0.868, 0.86, 0.888, 0.9, 0.908,", "0.827906976744186, 0.8608695652173913, 0.9333333333333333], 'AB010291.1_Bj': [0.95, 0.984, 0.988, 0.984, 0.98, 0.98, 0.98, 0.92, 0.896,", "0.948, 0.976, 0.976, 0.968, 0.952, 0.896, 0.844, 0.86, 0.908, 0.976, 0...
[ "self.mean2[0] params[2,1] = 1.0/self.variance2 * self.mean2[1] print params return params def plot_data(self,params=np.array([]),name=\"Naive Bayes\",", "\"Bayes Optimal\",\"black\") axis.legend() # fig.show() return fig,axis def add_line(self,fig,axis,params,name,colour): x_max = np.max(self.train_X) x_min", ...
[ "hamming_distance(bs1, bs2) / 2 sizes.update({size: normalized_distance}) return sorted(sizes, key=lambda k: sizes[k])[:n] def hamming_distance(bs1,", "a \"Crypto 101\" thing. But more people \"know how\" to break it than", "The distance between: # # this is a test # # and #", "key. # # This code is going to ...
[ "def count_parameters(self): return sum(p.numel() for p in self.parameters() if p.requires_grad) def count_encoder_parameters(self): return", "prediction[b].index_select(0, blank_b)) prediction[b].index_fill_(0, blank_b, 1e-10) else: prediction = self.generator(decoder_outputs.squeeze(1)) prediction = f.softmax(p...
[ "open('/proc/{}/environ'.format(pid)) as f: for line in f.read().split('\\0'): if not len(line): continue kv =", "return retcode, ''.join(text), data class DockerDelegate(BaseHandler): def __init__(self): self.compute = DockerCompute() pass def", "data = ns_exec(inspect['State']['Pid'], event) if exit_code == 0...
[ "on a timeslice. \\n`timeslice`: a section of trade data with time length equal", "discrete_prices = {} for timeslice in data: timeslice = [float(i) for i in", "bought: \"+str(self.exchange.times_bought)) print(\"Times sold: \"+str(self.exchange.times_sold)) print(\"The Market's performance: \"+str(market_perfo...
[ "return 0 def predict_perceptron_proper(inputs, weights): def step_function(input): return 1 if input > 0", "0 else 0 def linear_model(inputs, weights): return np.dot(inputs, weights) return step_function(linear_model(inputs, weights)) def", "return step_function(linear_model(inputs, weights)) def neuron(inputs...
[ "the z components that we are leaving alone: pad = get_direction_padding_fn(config) direction_size =", "% w_ix, interp_vis[w_ix], 0, fps=24) for epoch in range(state_dict['epoch'], config['num_epochs']): if config['pbar'] ==", "module if config['parallel']: G = nn.DataParallel(DataParallelLoss(G)) if config['cr...
[ "zip(thailand['Year'], thailand['RGDP'], thailand['NGDP'], thailand['GDP_pc'], thailand['Inflation'], thailand['Unemployment_Rate'], thailand['Net_LB'], thailand['Account_Balance']): mycursor.execute(sqlformula13, [a, b, c, d,", "f, g, h]) sqlformula2 = \"INSERT INTO brunei VALUES(%s, %s, %s, %s, %s,", "b, c, d...
[ "not None: subnet_rule = res.group(0) l_subnet_rule = subnet_rule.split() device = l_subnet_rule[2] ip =", "= '/dev/disk/by-id/*{0}'.format(v_id) device = glob.glob(pattern)[0] gdisk_commands = '\\n'.join([ 'n', '1', '34', '', '',", "re.match('default .*', line) if res is not None: r_default_route = res.group(0...
[ "if csv_file == \"Unknown1.csv\": with open(full_path, \"r\") as f: reader = csv.DictReader(f) for", "open(full_path, \"r\") as f: reader = csv.DictReader(f) for line in reader: cur_record =", "\"SruDbIdMapTable.csv\": [], \"Network Usage.csv\": [\"TimeStamp\", \"AppId\", \"UserId\", \"InterfaceLuid\", \"L2Prof...
[ "def test_force_token_to_string(self): request = HttpRequest() test_token = '<KEY>' request.META['CSRF_COOKIE'] = test_token token =", "from django.http import HttpRequest from django.middleware.csrf import _compare_salted_tokens as equivalent_tokens from django.template.context_processors import", "import _com...
[ "index=i+k) for k, x in enumerate(y)] super(Sequence, self).__setslice__(i, j, newvals) try: self._gvalidate() except:", "hasattr(self, k2): # don't need to create forwarding attribute (set __getattr__) return if", "% len(args)) for k, v in kwargs.iteritems(): k = self._adapt_key(k) if k in", "def _get_schema...
[ "'/' + entity): if os.path.isdir(full_path + '/' + entity): no_of_dirs += 1 new_sub_path", "+ entity): no_of_dirs += 1 new_sub_path = sub_path + '/' + entity dir_dict", "full_path + '/' + entity, 'time': get_time(stats)} except FileNotFoundError: errors.append(full_path + '/' +", "= False if _ignore and to_be...
[ "write the captured output too with open(name + '.stderr.txt', 'w') as handle: handle.writelines(opts['error_output'])", "as new output with report_directory(args.output, args.keep_empty, args.output_format) as args.output: # Run the analyzer", "out language (-x) and architecture (-arch) flags for future proces...
[ "\"\"\" Facillite l'usage de l'UNICODE \"\"\" def __init__(self, top_left, top_split, top_right, mid_left, mid_split,", "[TableBorder('+', '+', '+',\\ '+', '+', '+',\\ '+', '+', '+',\\ '-', '|'), TableBorder(u'\\u250c', u'\\u252C',", "u'\\u251C', u'\\u253C', u'\\u2524',\\ u'\\u2514', u'\\u2534', u'\\u2518',\\ u...
[ "from django.conf.urls import url from . import views urlpatterns = [ url(r'^register/', views.register),", "url from . import views urlpatterns = [ url(r'^register/', views.register), url(r'^login/', views.login), url(r'logout/',", "<gh_stars>0 from django.conf.urls import url from . import views urlpatterns =...
[ "= config.get(CONF_SI2_KEY) ri4key = config.get(CONF_RI4_KEY) if sitekey and ri4key: sensorname = sensorconf[ATTR_FRIENDLY_NAME] sensors.append(SLDeparturesSensor(", "to update TL2 for %s...\", self._name) # Object used to create our object.", "'api_minimization' LIST_SENSOR_TYPES = ['departures', 'status', 'tr...
[ "for SN coords, redshift, and host galaxy. If redshift is not given for", "and report its redshift. Returns ( (ra,dec), redshift, host_name, redshift_citation ), with values", "').split(' ')[0]) citation = resred.group().split(' ')[-1] except AttributeError: redshift = None citation =", "A quick library to de...
[ "6.5 \" + \"-85.5 12.5 8.5 \" + \"-83.5 12.5 10.5 \" +", "if all_cables: for i in range(0, nbCables): childname = 'cableS' + str(i) theta", "12.5 10.5 \" + \"-77.5 12.5 12.5 \" + \"-62.5 12.5 12.5 \"", "\")) # Create a CableConstraint object with a name. # the indices are", "[[-97, 0, 45]], 'withAPullPointL...
[ "'median' 'score_type': \"coupling\", # #TODO fill in the rest of the options in", "\"mean\", # 'max', 'median' 'score_type': \"coupling\", # #TODO fill in the rest of", "'opt_tol': 1e-9, # no limits 'opt_round_g': False, # True 'opt_compute_accuracy': False, # True", "(1710,1740), (1740,1770), (1770,1800), (...
[ "data are scaled to have a std of 1 and a mean of", "zero :param dataset: [xr dataset] input or output data :param std: [xr dataset]", "properties will not be included as predictors :param exclude_file: [str] path to exclude", "have multiple discontinuos periods) :param end_dates: [str or list] fmt: \"YYYY-MM...
[ "integer) copies of a given string. Tools: input function, slicing >>>>>>> f4444ec0d72c645d12694e90df7429456db0611c \"\"\"", "7. Write a Python program to test whether a number is within 100", "function : abs() Expected Result : abs(number) -> number Return the absolute value", "This is a ....... multi-line h...
[ "class meta(type): @classmethod def __prepare__(metacls, name, bases, **kwds): assert metacls.__name__ == 'meta' assert", "@classmethod def __prepare__(metacls, name, bases, **kwds): assert metacls.__name__ == 'meta' assert name in", "attributes, **kwds): assert metacls.__name__ == 'meta' assert name in ['base'...
[ "for x in range(w): p = img.get(x, y) if dist(p, key) < threshold:", "r2, g2, b2 = c2 return math.sqrt((r1-r2)**2 + (g1-g2)**2 + (b1-b2)**2) def chroma(img,", "img.get(x, y) if dist(p, key) < threshold: img.set(x, y, Color.yellow) statue = load_picture(\"photos/statue1.jpg\")", "range(h): for x in range(w): p...
[ "* tau # uniform distribution of spot peak times # start well before", "uniform in sin(latitude) lat = scipy.arcsin(scipy.rand(nspot_tot)) # spot rotation rate optionally depends on", "up the contributions of individual spots for i in range(nspot_tot): # Spot area", "time / period0[i] + lon[i] mu = scipy.cos(...
[ "else is worth learning # FIXME: ass -k-1,-1 for negative field indexing #", "negative field indexing # FIXME: think into the mess at \"sort\" vs \"LC_ALL=C", "main(): args = argdoc.parse_args() sys.stderr.write(\"{}\\n\".format(args)) sys.stderr.write(\"{}\\n\".format(argdoc.format_usage().rstrip())) sys.stder...
[ ") def listDevices(): response = doRequest('devices/list', {'supportedMethods': SUPPORTED_METHODS}) logger.debug(\"Number of devices: %i\" %", "== TELLSTICK_TURNON): state = 'ON' elif (device['state'] == TELLSTICK_TURNOFF): state = 'OFF' elif", "Dims device. 'device' must be an integer of the device-id\") print...
[ "api_tag else: suffix = \"observation\" tags = [\"type:%s\" % type_] + api_tag METRICS.incr(\"data.%s.%s\"", "\"report\" tags = api_tag else: suffix = \"observation\" tags = [\"type:%s\" % type_]", "target section id # *_map maps fields inside the section from source to", "or wifis: return report return {} cl...
[ "embedding_vec_size = 16, combiner = \"sum\", sparse_embedding_name = \"sparse_embedding1\", bottom_name = \"data1\", optimizer", "dropout_rate=0.5)) model.add(hugectr.DenseLayer(layer_type = hugectr.Layer_t.InnerProduct, bottom_names = [\"dropout1\"], top_names = [\"fc2\"], num_output=1024)) model.add(hugectr.De...
[ "white. \"\"\" LeafSystem.__init__(self) self._point_cloud_ports = {} self._transform_ports = {} self._id_list = id_list self._default_rgb", "np from pydrake.common.value import AbstractValue from pydrake.math import RigidTransform from pydrake.perception import BaseField,", "system that takes in N point clouds...
[ "'female' catanDBObj.person_bio.name_family = family_names[random.randint(0,len(family_names)-1)] catanDBObj.person_bio.age = random.randint(5,90) # message (message, status, location, etc.)", "centered around Cambridge for i in range(n): # random lat, long lat =", "random nodes, centered around Cambridge for i...
[ "00100 # 00011 # Answer: 3 # # Version: 1.0 # 11/13/17 by", "surrounded by water. # # Example 1: # 11110 # 11010 # 11000", "< len(grid[0]) and grid[i][j] == \"1\": grid[i][j] = \"0\" map(sink, (i+1, i-1, i,", "grid[x][y+1] == '1': # grid[x][y+1] = '2' # self.island(x,y+1,grid, m, n) # if", "n and grid[x][y+...
[ "fseventsd from tests.formatters import test_lib class FseventsdFormatterTest(test_lib.EventFormatterTestCase): \"\"\"Tests for the fseventsd record event", "-*- \"\"\"Tests for the fseventsd record event formatter.\"\"\" from __future__ import unicode_literals import", "record event formatter.\"\"\" from __fut...
[ "= ModelCheckpoint(conf.logPath+\"/\"+trainString+'/Checkpoint-{epoch:02d}-{val_loss:.2f}.hdf5', monitor='val_loss', save_best_only=False, save_weights_only=True) change_lr = LearningRateScheduler(LrPolicy(conf.lr).stepDecay) tbCallBack=TensorBoard(log_dir=conf.logPath+\"/\"+trainString+'/logs', histogram_freq=0, w...
[ "= functions.flatten(x) self.assertEqual(y.shape, self.g_shape) self.assertEqual(y.dtype, self.dtype) testing.assert_allclose(self.x.flatten(), y.data) def test_forward_cpu(self): self.check_forward(self.x) @attr.gpu def", "chainer.Variable(x_data) y = functions.flatten(x) self.assertEqual(y.shape, self.g_shape) ...
[ "('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created', models.DateTimeField(auto_now_add=True)), ('updated', models.DateTimeField(auto_now=True)), ('name', models.CharField(max_length=80)), ('description', models.TextField(blank=True)),", "= [ ('exercises',...
[ "time_step.step_type == StepType.LAST, **time_step.observation) def reset(self): time_step = self._env.reset() return flatten_observation(time_step.observation)['observations'] def render(self,", "close(self): if self._viewer: self._viewer.close() self._env.close() self._viewer = None self._env = None def _flat_s...
[ "return None def materialize(self, context, table_type, table_metadata, value): return None, None def snowflake_table(", "'required_resource_keys') required_resource_keys.add('snowflake') if callable(name): fn = name return create_lakehouse_table_def( name=fn.__name__, lakehouse_fn=fn, input_tables=[], required_r...
[ "checks whether the look has any members of: - lambert1 - initialShadingGroup -", "for any disallowed connections on *all* nodes if any(s in cls.DEFAULT_SHADERS for s", "['look'] hosts = ['maya'] label = 'Look No Default Shaders' actions = [pype.maya.action.SelectInvalidAction]", "{\"lambert1\", \"initialShad...
[ "route @app.route(\"/iris\") def iris(): from sklearn.datasets import load_iris from sklearn.linear_model import LogisticRegression X,", "flask import Flask # initialize the app app = Flask(__name__) # execute iris", "the app app = Flask(__name__) # execute iris function at /iris route @app.route(\"/iris\")", ...
[ "with rttm files in_emb_dir (str|None): path to directory with i-vectors out_emb_dir (str|None): path", "open('{}{}'.format(os.path.join(self.in_rttm_dir, file_name), self.rttm_suffix)) as fp: for line in fp: speakers.add(line.split()[7]) logger.info('Loading pickled normalization", "whole audio features = feat...
[ "cells') ax.set_xlabel('Time (h)') plt.legend() f = plt.gcf() f.set_size_inches(20.0, 8.0) # alternative: 20.0, 8.0", "lattice_dict['B'][0] n = int(total_cells**0.5) plt.figure(1) plt.plot(lattice_dict['time'], lattice_dict['E'], label='Empty lattice points') plt.plot(lattice_dict['time'], lattice_dict['D_a'], la...
[ "of SecurityProviders. :param supported_providers: :type supported_providers: list[~azure.mgmt.network.v2018_10_01.models.VirtualWanSecurityProvider] \"\"\" _attribute_map = { 'supported_providers': {'key':", "Changes may cause incorrect behavior and will be lost if the code is", "Code generated by Microsoft (R...
[ "if regex is not None: date = datetime.date( int(regex.group(\"year\")), int(regex.group(\"month\")), int(regex.group(\"day\"))) else: raise", "import datetime import re from .exceptions import ObjectIsNotADate def format_date(value, format=\"%d %M %Y\"):", "%M %Y\"): regex = re.match(r\"(?P<year>\\d{4})-(?P<mo...
[ "test_path is not None: DataLoader.test = DataLoader.load_image_data_with_label_at_end(os.path.join(DATASET_ROOT_FOLDER, test_path), height=height, length=length) logging.debug('Training data shape:{}'.format(str(DataLoader.train['images'].shape)))", "numpy as np import os import logging from sklearn.model_select...
[ "parte mediaidade = ((sum(idadelista))/4) # Adcionei todos os nomes em uma lista nomelista.append(nome)", "nomelista[indexidade] # ------------------------------------------------------------------- print(f'A media das idades é: {mediaidade}') print(f'A pessoa que tem", "# Armazenei em maximo o maior valor enco...
[ "qargs=[0, 1] targ = np.dot(mat, np.kron(np.eye(2), np.kron(mat_b, mat_a))) self.assertEqual(op.dot(op2, qargs=[0, 1]), Operator(targ)) self.assertEqual(op", "self.UH, np.diag([0, 1])) global_phase_equivalent = matrix_equal( op.data, target, ignore_phase=True) self.assertTrue(global_phase_equivalent) def test_ins...
[ "import By class feature_modal: title_textbox = (By.ID, \"feature-name\") description_textbox = (By.ID, \"description\") save_button", "By class feature_modal: title_textbox = (By.ID, \"feature-name\") description_textbox = (By.ID, \"description\") save_button =", "<gh_stars>0 from selenium.webdriver.common.by ...
[ "= Request(url2) try: response = urlopen(request3) data3 = response.read() except URLError, e: print", "key a= station_prop_json[u'properties'][u'timeseries'].keys() i=a[0] url2 =('https://uk-air.defra.gov.uk/sos-ukair/api/v1/timeseries/'+str(i) +'/getData') request3 = Request(url2) try: response =", "station_p...
[]
[ "# Generated by Django 2.0.6 on 2018-07-02 19:13 import core.models from django.db import", "), migrations.AlterField( model_name='echo', name='audio', field=models.FileField(upload_to=core.models.echo_directory), ), migrations.AlterField( model_name='profile', name='picture', field=models.FileField(blank=True, n...
[ "test_access_logger_atoms(mock_getpid, mock_datetime): utcnow = datetime.datetime(1843, 1, 1, 0, 0) mock_datetime.datetime.utcnow.return_value = utcnow mock_getpid.return_value", "'%s {%s} \"%s\" %%X {X} %%%s' assert expected == access_logger._log_format @mock.patch(\"aiohttp.helpers.datetime\") @mock.patch(\"os....
[ "\"/lhome/trulsas/openwhisk\" #: Location of output data DATA_DIR = join(FAAS_ROOT, \"..\", \"profiler_results\") SYSTEM_CPU_SET =", "WORKLOAD_SPECS=join(FAAS_ROOT, \"specs\", \"workloads\") #FAAS_ROOT=\"/home/truls/uni/phd/faas-profiler\" WSK_PATH = \"wsk\" OPENWHISK_PATH = \"/lhome/trulsas/openwhisk\" #: Locati...
[ "\"Error in sum1 function\" def divide(a,b): try: c = a/b return c except", "def sum1(a,b): try: c = a+b return c except : print \"Error in", "except : print \"Error in sum1 function\" def divide(a,b): try: c = a/b", "function\" def divide(a,b): try: c = a/b return c except : print \"Error", "divide(a,b): t...
[ "answer[0].upper() == 'Y': accept_and_add = True if self.mode in (verify_mode.accept_new, verify_mode.overwrite_blindly): accept_and_add =", "Use known_hosts rewrite instead if using this API warnings.warn(FutureWarning('RadSSH hostkey module is no", "OFF overwrite_blindly=666 # Concentrated evil ) def printabl...
[ "] << 8 | \\ key[ block_start + 8 ] k4 = key[", "( k1 * c2 ) & 0xFFFFFFFF h1 ^= k1 #finalization h1 ^=", "+ h2 ) & 0xFFFFFFFFFFFFFFFF h2 = ( h2 * 5 + 0x38495ab5", "h4 ) & 0xFFFFFFFF h1 = fmix( h1 ) h2 = fmix( h2", "public domain. The authors hereby disclaim copyright to this source code. pure python", "2 ...
[ "print('-- create: ExPerson') ExPerson = dlite.classfactory(Person, url=url) print('-- create: person1') person1 = Person('<NAME>',", "os.path.abspath(os.path.dirname(__file__)) class Person: def __init__(self, name, age, skills): self.name = name self.age =", "ExPerson = dlite.classfactory(Person, url=url) pri...
[ "작성하세요. ''' dp = [0] * len(data) dp[0] = data[0] for i in", "list로 주어질 때, 그 연속 부분 최대합을 반환하는 함수를 작성하세요. ''' dp =", "3, -2, 9], [9, -10] 등이 있을 수 있다. 이 연속 부분들 중에서", "최대 100개입니다. ''' import sys def getSubsum(data) : ''' n개의 숫자가 list로 주어질", "들어, 다음과 같이 8개의 숫자가 있다고 하자. 1 2 -4 5 3 -2", "할 수는 없다. 따라서 연속 부분 최대합은 5...
[ "#!/usr/bin/env python3 import unittest from mockdock import dns class DNSTest(unittest.TestCase): def test_build_packet(self): data", "import dns class DNSTest(unittest.TestCase): def test_build_packet(self): data = b\"^4\\x01\\x00\\x00\\x01\\x00\\x00\\x00\\x00\\x00\\x00\\x06google\\x03com\\x00\\x00\\x01\\x00\\x...
[ "the fixture functions in this file to make them accessible across multiple test", "of test session. # use temporary directory for conf home so user conf", "test_connection delete_index(test_connection) @pytest.fixture(scope=\"function\") def default_config_location(): from escli.conf import __file__ as package...
[ "{}\".format(local_time['time'], local_time['zone']) server_embed.description = \"Created at {}\".format(time_str) online_members = 0 bot_member = 0", "online ({:,g}%)\".format( online_members, len(guild.members) - bot_member, round((online_members/(len(guild.members) - bot_member) * 100), 2) )", "DisplayName.m...
[ "random_state=seed).reset_index(drop=True) df_ones_training = df_ones.loc[:40000] df_zeros_training = df_zeros.loc[:40000] df_ones_test = df_ones.loc[40000:50000] df_zeros_test = df_zeros.loc[40000:50000]", "df_ones_training = df_ones.loc[:40000] df_zeros_training = df_zeros.loc[:40000] df_ones_test = df_ones.loc...
[ "HmassT_INPUTS = _constants.HmassT_INPUTS SmolarT_INPUTS = _constants.SmolarT_INPUTS SmassT_INPUTS = _constants.SmassT_INPUTS TUmolar_INPUTS = _constants.TUmolar_INPUTS TUmass_INPUTS", "DmassSmass_INPUTS = _constants.DmassSmass_INPUTS DmolarSmolar_INPUTS = _constants.DmolarSmolar_INPUTS DmassUmass_INPUTS = _const...
[ "from choosen labels for l in labels_choosen: batch_ids += random.sample(self.label_to_entry_ids[l], self.n_samples) if len(batch_ids)", "generate (if None, then dataset_size / batch_size will be used) n_classes : Number", "batch_ids += random.sample(self.label_to_entry_ids[l], self.n_samples) if len(batch_ids)...
[ "See the NOTICE file distributed with this work for additional information regarding copyright", "the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in", "language governing permissions and limitations under the License. Ambari Agent \"\"\" import re", "th...
[ "range(len(csv)): csv_k[i % k].append(csv[i]) for test in csv_k: train = [] for data", "to_number(n): return float(n) if re.match(r\"^[0-9\\.]+$\", n) else n def to_columm(line): return list(map(to_number, line.strip().split(\",\")))", "[] for row in rows: data.append(row[0:4]) labels.append(row[4]) return (dat...
[ "\"org_specs2_specs2_matcher_2_12\", artifact = \"org.specs2:specs2-matcher_2.12:4.8.3\", artifact_sha256 = \"aadf27b6d015572b2e3842627c09bf0797153dbb329262ea3bcbbce129d51ad8\", srcjar_sha256 = \"01251acc28219aa17aabcb9a26a84e1871aa64980d335cd8f83c2bcea6f4f1be\", deps = [", "def dependencies(): import_external( n...
[ "b == 0: print(\"INF\") else: if (d - b * c / a)", "/ a) == (- b // a): print(- b // a) else: print(\"NO\")", "if (d - b * c / a) != 0 and (- b", "and (- b / a) == (- b // a): print(- b //", "and b == 0: print(\"INF\") else: if (d - b * c /", "= int(input()) b = int(input()) c = int(input()) d = int(input...
[ "from collections import Counter import numpy as np self.bins = 3 self.pd =", "self.bins = 3 self.pd = pd self.LabelEncoder = LabelEncoder self.Counter = Counter self.X", "for merging for i in range(len(classes_count)): if classes_count[i][1] < min_n_samples: self.Y_classes[self.np.where(self.Y_classes == class...
[ "def _split_data(tensor, stratify): # 0.7/0.15/0.15 train/val/test split (train_tensor, testval_tensor, train_stratify, testval_stratify) = sklearn.model_selection.train_test_split(tensor,", "wish.)\") base_loc = base_base_loc + '/SpeechCommands' loc = base_loc + '/speech_commands.tar.gz' if os.path.exists(loc):"...
[ "datetime from typing import List from flask import Blueprint, jsonify, request, json from", "'{\"status\": \"error\", \"msg\": \"categories number must be between 1 and 5\"}', 400 categories", "= Product.query.filter(Product.id == payload['id']) if product: if 'name' in payload.keys(): product.update({'name': ...
[ "app): validator = BitbucketTriggerValidator() with pytest.raises(ConfigValidationException): validator.validate(unvalidated_config) def test_validate_bitbucket_trigger(app): url_hit = [False] @urlmatch(netloc=r\"bitbucket.org\")", "BitbucketTriggerValidator from test.fixtures import * @pytest.mark.parametrize( \...
[ "#plt.legend(loc='best') ##plt.savefig('refraction',dpi=200) #plt.show() #x=np.linspace(-5,5,100) # #plt.figure(2) #plt.plot(x,s(x)) #plt.show() # #d=np.linspace(0,5,100) #xa=-d/2 #xb=d/2 #plt.figure(3)", "matplotlib.pyplot as plt k=1000 n1=2.0 n2=1.0 alpha=np.pi/6.0 beta=np.arcsin(n2/n1*np.sin(alpha)) ya=1.0 xa=...
[ "import settings from django.core.management.base import BaseCommand from elasticsearch import Elasticsearch class Command(BaseCommand): \"\"\"Clear", "readthedocs elasticsearch index.\"\"\" from __future__ import absolute_import from django.conf import settings from django.core.management.base", "elasticsearch...
[ "= 64 # IMG_SIZE_2 = IMG_SIZE * 2 def run(config): # Update the", "# Update the config dict as necessary # This is for convenience, to", "data['img'], data['label'] # Increment the iteration counter state_dict['itr'] += 1 # Make sure", "nn.DataParallel(G) D = nn.DataParallel(D) # If using EMA, prepare it if c...
[ "% settings.TMP_DIR) deleteStaleFiles() FileUtil.mkdirP(d) return d def initZipDir(prefix): return makeTempDir(prefix) def finishZipDir(zipDir): zipFile", "def initZipDir(prefix): return makeTempDir(prefix) def finishZipDir(zipDir): zipFile = '%s.zip' % zipDir oldDir =", "zipFile = '%s.zip' % zipDir oldDir = os...
[ "we got a well-ordered heap assert_goodheap(tau,len(L)+1) @given(lists(elements=integers())) @settings(max_examples=400,deadline=None) def test_delmin(L): L += [10]", "k in K:tau.insert(k)#on rajoute les elements de K assert_goodheap(tau,tau.currentSize) x = [] while", "def __init__(self): #initialise un tas bi...
[ "Use dict to associate the transformation name with its class. flavor_transformation_dict = {'NoTransformation':", "the events from given table flux,det,weighted,smeared = params for c in table.columns: if", "tmax = snmodel.get_time()[-1] if deltat is not None: dt = deltat ntbins =", "distribution, for each r...
[ "(1 - dones) * n_step_gamma * next_z distance = target_z - z_dists quantile_huber_loss", "k * (x.abs() - 0.5 * k)) class CategoricalLoss(Loss): \"\"\"Compute C51 loss\"\"\" def", "offset: torch.Tensor, ) -> torch.Tensor: b = (target_z - network.v_min) / network.delta_z lb", "...], data: Tuple[torch.Tensor, .....
[ "= self.canvas.create_image(w * 0.5, h * 0.56, image=self.imagelists[self.curr_img]) # images and buttons self.img_w_f", "font=(\"Courier\", int(h / 30)), text='') self.zoom = self.canvas.create_text(w * 0.12, h * 0.94,", "[] # unmasked full images self.imgs_pred = [] self.cc = [] for index,", "- b_logos), in...
[ "# 'ordertime': '2009-03-04T20:56:08Z', # 'paymentstatus': 'Completed', # 'paymenttype': 'instant', # 'pendingreason': 'None', #", "# because they're behind paypal's doors. nvp_obj = self.wpp.setExpressCheckout(self.item) self.assertTrue(nvp_obj.ack == \"Success\") ###", "= True self.item = { 'amt': '9.95', 'in...
[ "elif(me_i-pe_i>0): print('UP') me_i=me_i-1 else: if(me_j-pe_j>0): print('LEFT') me_j=me_j-1 elif(me_j-pe_j<0): print('RIGHT') me_j=me_j+1 else: break m", "Dec 7 19:46:40 2020 @author: Intel \"\"\" def displayPathtoPrincess(n,grid): me_i=n//2 me_j=n//2 for i", "me_j=me_j+1 else: break m = int(input()) grid = []...
[ "import tabix import math def plotGenes(genes_bed, exons_bed, introns_bed, region_bed, blacklist=None, gene_map=None, plot_gene_ids=True, y_max=None,", "defaults to None. :type ax: :class:`matplotlib.axes._subplots.AxesSubplot`, optional :return: Nothing to be returned :rtype:", "ids not to be plotted, defaults...
[ "\"state set.\"), message_plural=(\"Accept states {} are not members of the fsa's \" \"state", "current_state = self.start_state for symbol in string: current_state = self.transition_function[(current_state, symbol)] return current_state", "operator_stack.pop() while len(operator_stack) > 1: binary_operate() re...
[ "_start_arabic_to_roman(self): self.assertRaises(ValueError, arabic_to_roman, 4000) self.assertEqual(arabic_to_roman(4), \"IV\") self.assertEqual(arabic_to_roman(12), \"XII\") self.assertEqual(arabic_to_roman(20), \"XX\") if __name__ ==", "#!/usr/bin/env python3 import unittest from roman_number_generator import ...
[ "import os class ModuleBase: def __init__(self, working_dir): self.working_dir = working_dir def runAfterDownload(self, file_name,", "infrastructure.satnogClient import SatnogClient import os class ModuleBase: def __init__(self, working_dir): self.working_dir = working_dir", "os class ModuleBase: def __init__(s...
[ "back to the # verifier, there is no privacy leak by the ommission.", "proxy such as nginx for that purpose. \"\"\" import secrets import sys import", "= [schnorr.BlindSigner() for _co in range(Params.num_components)] lock = threading.Lock() seen_salthashes = set() #", "even restart / end # without sharing co...
[ "o no per l'economia\") def filtrar(dataframe, subject1): df = dataframe[dataframe['subject'].str.contains(subject1, case=False)].copy() # Afegim", "print(\"percentatge not_at_all: {}%\".format(percentnotatall)) grafic4('People_Very', 'People_Not_At_All', percentvery, percentnotatall, \" % Persones\", \"Satisfacc...
[ "pandoc --epub-metadata={epub_metadata} \\ -f html -t epub3 -o {ebook_epub} {html_file} \\ \"\"\".format( script=script_cmd,", "ctx.label.name # steps # run htex on all *md, gives book.htex markdowns =", ") outdir_tar = ctx.actions.declare_file(\"{}.tar\".format(outdir.basename)) tar_command = \"(cd {base} ; ta...