ngram
listlengths
0
82k
[ "PyPI author=\"<NAME>\", author_email=\"<EMAIL>\", description=\"Soccer trajectory and event data generation\", keywords=\"soccer", "setup, find_packages setup( name=\"soccergen\", version=\"0.1\", packages=find_packages(), # Project uses reStructuredText,", "target machine install_requires=[\"gfootball>=2.8\",...
[ "sm.engine.formula_parser import format_modifiers FDR_CONFIG = {'decoy_sample_size': 2} @patch('sm.engine.annotation.fdr.DECOY_ADDUCTS', ['+He', '+Li'])", "= [(formula, adduct) for formula, adduct in product(formulas, target_adducts)] assert", "decoy_sample_size) assert min_count < len(ions) <= max_count target...
[]
[ "learning, 2018 \"\"\" ub = 1 + ub lb =", "= [] trends = [] for idx in range(len(price)-lookahead+1): arr_window", "trading strategy and not a simple performance proxy. The rationale", "if price[idx+lookahead-1] > price[idx]: coef = (price[idx+lookahead-1]-min(arr_window)) / (max(arr_window)-min(arr_window)) ...
[ "None: output_filepath = create_image_cache_filename(input_filepath, *args, **kwargs) if os.path.exists(output_filepath): return output_filepath", "convert(input_filepath, output_filepath=None, cleanup_files=False, mimetype=None, *args, **kwargs): size = kwargs.get('size') file_format", "import OfficeConversion...
[ "= plot_y * x_std[1] + x_mean[1] plot_data(x_mat, y, plot_x, plot_y)", "frame.values x_mat = data[:, 0:2] # exam scores y =", "/ theta[2]) * plot_x # denormalize the points plot_x =", "theta2*x2 = 0 # x2 = -theta0 / theta2 -", "% (45, 85, p[0, 0])) # Predict on train set", "plot admitted plt.scatter(x_mat...
[ ").numpy() results_df = pd.DataFrame( data=results_dump, columns=[ \"epoch\", \"iteration\", \"processing_stats\", \"dataflow_stats\",", "profiler.print_results(profiler.get_results()) trainer.run(dataloader, max_epochs=3) profiler.write_results('path_to_dir/time_profiling.csv') .. versionadded:: 0.4.6 \"\"\" EVE...
[ "cycles DONE ! {datetime.now()}\") await asyncio.sleep(5) finally: # in every", "for v in pmatrix_neglog.df.columns: # vertex source if v in", "get: base_curr -- (sell_price - fee) --> quote_curr def __getitem__(self,", "asyncio.sleep(5) finally: # in every case cancel the background task", "the actual pair...
[ "<<EMAIL>> # Creative Commons BY-NC-SA 4.0 International Public License #", "LICENSE.md or https://creativecommons.org/licenses/by-nc-sa/4.0/) # \"\"\" The Snowtire binary sensor. For", "# Copyright (c) 2020, Andrey \"Limych\" Khrolenok <<EMAIL>> # Creative", "Snowtire binary sensor. For more details about th...
[ "[-1.2, -1.8, -1.5], [ nan, 0.3, 0.5], [ nan, -1.3,", "y_hat = model.predict_proba(X, n_jobs=2) y = [[ 9.85225968e-01, 1.47740317e-02], [", "def test_bc_multivariate_gaussian_nan_predict(): y_hat = model.predict(X_nan) y = [0, 1, 1,", "import with_setup from nose.tools import assert_almost_equal from nose.too...
[ "dict): if config.get(\"VARIABLE_RANKING\"): output = VariableRanking(sol, base_kernel) else: output =", "ImportError: print(\"Gurobi not found: error ignored to allow tests\") def", "Solution, base_kernel: dict, config: dict): if config.get(\"VARIABLE_RANKING\"): output = VariableRanking(sol,", "var_name): r...
[ "of issues arising from PATH, sys.path, multiple Pythons, their interactions,", "users suffer every time an entrypoint gets moved. To alleviate", "'-m pip' instead of \" \"running pip directly.\\n\" ) return", "for the current one. \"\"\" sys.stderr.write( \"WARNING: pip is being", "avoid this problem you c...
[ "= comment.replace('@doc-functions','') else: # Unwanted comment; skip. continue # Record", "with custom header. # bb_lines = header_lines + Get_BB_Text(doc_lines) #", "xml file. ''' # List of tuples of (label, text)", "# Lua functions are in one lump, like overview. elif", "'.lua': doc_lines += Get_Lua_Tex...
[ "30 b = 17 print(\"Sum of a and b is\",a", "two numbers a = 30 b = 17 print(\"Sum of", "b = 17 print(\"Sum of a and b is\",a +", "a = 30 b = 17 print(\"Sum of a and", "= 17 print(\"Sum of a and b is\",a + b)", "= 30 b = 17 print(\"Sum of a and b", "#Addition of two numbers a = 30 b = 17", "numbers a =...
[ "= QLabel(self) self.l1.setText('Clique em um botao') self.l1.move(50, 50) self.l1.setStyleSheet('QLabel{font: bold;", "self.carro = QLabel(self) self.carro.move(25, 200) self.carro.resize(450, 337) self.carro.setPixmap(QtGui.QPixmap('carro.jpg')) def gera_caixas_de_texto(self):", "font-weight: 600}') botao2.cl...
[ "height=\"{img_height}\" xlink:href=\"data:image/png;base64,{base64_data}\"/> </g> </svg>''' new_page_height += (img_height+10) svg += tmp_svg", "/> <int name=\"ruleColor\" value=\"0\" /> <float name=\"marginLeft\" value=\"0\" /> <float", "<float name=\"marginLeft\" value=\"0\" /> <float name=\"xOffset\" value=...
[ "set_parameter_value(self, name: str, value: ParameterValueType): param = self.get_parameter(name) param.value =", "' already added to this object') parameter = Parameter(name, value,", "get_parameter(self, name: str) -> Parameter: for parameter in self.parameters: if", "value_range: ParameterRangeType): if n...
[ "a Region Of Interest, which may be either horizontal #", "+ 1 def valid(self): return self.start >= 0 and self.start", "- start + 1 def valid(self): return self.start >= 0", "def crop(self, spectrum): return spectrum[self.start:self.end+1] def contains(self, value): return self.start", "encapsulates a Regi...
[ "0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC,", "0xF0, 0xFA, 0x0F, 0xC6, 0x3F, 0x9F, 0xEC, 0x7E, 0x00, 0x00,", "A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL", "0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x04,", "0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,...
[ ".otsu import otsu_thresholding_method from .p_tile import p_tile_thresholding_method from .pun import", ".p_tile import p_tile_thresholding_method from .pun import pun_thresholding_method from .rosin import", ".gaussian import threshold_value_gaussian from .johannsen import johannsen_thresholding_method from ....
[ "os.getenv('CELERY_RESULT_BACKEND', 'redis') CELERY_RESULT_BACKEND = os.getenv('CELERY_RESULT_BACKEND', 'amqp') ## Using the database", "\"amqp://guest:guest@localhost:5672/\" #BROKER_URL = os.getenv('BROKER_URL', 'redis://guest@localhost:6379') #BROKER_HOST = \"localhost\" #BROKER_PORT =", "= os.getenv('CELERY...
[ "load client-secrets.json file ...\") secrets_file, cache_file = get_client_secret_filenames() sheets =", "found\" if first is None else first[COL_DATE]) print(\"Last:\", \"<last> not", "local_minutes = int(parts[1]) if half_it: local_hours = local_hours / 2", "enable debug output\"\"\") print(\"\") print(\"T...
[ "constants.FOLD # People who have gone all-in continue to be", "max_bets[calls]) # Reset the bets and countdown current_bets[calls, player_idx] =", "self.N_PLAYERS-1] = 0 if np.max(round_countdown[running_games]) <= 0: return current_bets, (round,", "self.BIG_BLIND = BIG_BLIND self.logger = logger self.N_PLAY...
[ "if obj.__class__ == Placeholder: placeholders[obj.pk] = obj if obj.__class__ ==", "int(plugin.pk): plugin.set_base_attr(p) p.save() for old in current_plugins: if old.pk ==", "created the placeholders/ get them instead try: placeholders[pk] = page.placeholders.get(slot=placeholder.slot)", "obj): from reversi...
[ "转化为int64 # print(label) label_gen_p = pd.DataFrame(label_gen_dict) label_gen_p.to_csv(gpath + 'label_delete.csv', index=False)", "aa <= 40: print(aa) path, imagename = os.path.split(imagelist[aa]) im =", "+ 'delete/' + 'idetail_' + imagename) gen_number += 1 label_dict", "'label_delete.csv', index=False) # l...
[ "中文字体 chFont = font_manager.FontProperties(family=\"SimHei\") # SimHei # chFont = font_manager.FontProperties(fname=\"C:/Windows/Fonts/SIMHEI.TTF\")", "- - - - - - - - - -", "range(60)] xLabels += [\"11点,{}分\".format(i) for i in range(60)] plt.xticks(list(x)[::step], xLabels[::step],", "plt from matplotlib im...
[ "data = dataset(\"clt\") canvas = regression.init() isoline = canvas.createisoline() isoline.label=\"y\"", "dataset(\"clt\") canvas = regression.init() isoline = canvas.createisoline() isoline.label=\"y\" texts=[] colors", "# Now set isoline.linecolors and test again. canvas.clear() isoline.linecolors =", "is...
[ "svm.SVC(kernel='linear'), \\ # random_state=None, n_estimators = 100 ) model =", "y_pred_all[:, 0] target = y_pred_te y_pred = f_quantileNorm(templete, target) else:", "y_pred = y_pred_te y_pred_all[:, i+1] = y_pred return y_pred_all #", "[err_mat, models] = f_err_mat(X_tr, y_tr, clus, model) [dec_mat, dec_i...
[ ") parser.add_argument( '--synth_tiles', help='If using an ROI, synthetic tile defintion", "( SELECT pkey FROM wire_in_tile WHERE name LIKE \"CLK_BUFG_REBUF_R_CK_GCLK%_BOT\" OR", "types. \"\"\" cur = conn.cursor() cur.execute( \"\"\" SELECT pkey, tile_type_pkey,", "FROM constant_sources') (track_pkey, ) = cur...
[ "s = 4) cbar = f.colorbar(mlw, shrink=0.7) cbar.set_label(r'% recovered') f.savefig('./plots/'", "[] for i, f in enumerate(files): print(round(i/len(files),4), f) fl =", "NO crowding # New script copied from quest - want", "for f in filters: m1hRec[f] = np.zeros_like(mbins)[1:] qhRec[f] = np.zeros_like(qbins)...
[ "as cms import os process = cms.Process(\"summary\") process.MessageLogger = cms.Service(", "#process.BeamSpotRcdPrinter.startIOV = 1354018504835073 #process.BeamSpotRcdPrinter.endIOV = 1374668707594734 ### 2018D Prompt #process.BeamSpotRcdPrinter.tagName", "process.load(\"CondTools.BeamSpot.BeamSpotRcdPrinter_...
[ "path from rest_framework_simplejwt.views import ( TokenObtainPairView, TokenRefreshView, TokenVerifyView ) urlpatterns", "from django.urls import path from rest_framework_simplejwt.views import ( TokenObtainPairView, TokenRefreshView,", "django.urls import path from rest_framework_simplejwt.views import ( Toke...
[ "to view available # drive letters def __init__(self, host, port,", "= 22 else: result['port'] = 21 # ftp port default", "path = utf8_fix(path) if not self.exists(path): p = self.parent( path", "= set(self.listdir(p)) return n in lst def isdir(self,path): path =", "a directory generator # which first loads ...
[ "[ 'C:\\\\Users\\\\Dude\\\\SomeFolder\\\\Chrome\\\\Default\\\\Extensions', ('C:\\\\Users\\\\Dude\\\\SomeNoneStandardFolder\\\\Chrome\\\\Default\\\\Extensions\\\\' 'hmjkmjkepdijhoojdojkdfohbdgmmhki'), ('C:\\\\Users\\\\frank\\\\AppData\\\\Local\\\\Google\\\\Chrome\\\\Extensions\\\\' 'blpcfgokakmgnkcojhhkbfbldkacnbeo'...
[ "\"aa\", \"aaa\", \"aaaa\", \"aaaaa\", \"aaaaaa\", # \"aaaaaaa\", \"aaaaaaaa\", \"aaaaaaaaa\", \"aaaaaaaaaa\"]", "= \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\" # words = [\"a\", \"aa\", \"aaa\", \"aaaa\...
[ "update.call_count) update.reset_mock() for kwarg in expected_kwargs: kwarg['head'] = 'contract@head' self._main_test_helper(", "sa.Column('organization_id', sa.Integer()) ), alembic_ops.CreateForeignKeyOp( 'org_fk', 'user', 'organization', ['organization_id'], ['id'] ),", "'contract@head' self._main_test_helpe...
[ "floor = initial_amount_inflation_adjusted * self.floor ceiling = initial_amount_inflation_adjusted * self.ceiling", "= self.rate * self.portfolio.value initial_amount_inflation_adjusted = self.initial_amount * self.cumulative_inflation floor", "def start(self): amount = self.rate * self.portfolio.value self.in...
[ "dig_e1_e7 = self.i2c.readfrom_mem(self.address, 0xE1, 7) self.dig_T1, self.dig_T2, self.dig_T3, self.dig_P1, \\", "h h = 419430400 if h > 419430400 else h", "self._l8_barray raw_press = ((readout[0] << 16) | (readout[1] << 8)", "0xF2 BME280_REGISTER_CONTROL = 0xF4 BME280_REGISTER_CONTROL_IIR = 0xF5 FILTER_OF...
[ "super(VaultBackend, self).__init__() self.connections_path = connections_path.rstrip('/') if variables_path != None: self.variables_path", "auth_type self.kwargs = kwargs self.token = token self.username = username", "username=self.username, password=self.password) elif self.auth_type == \"userpass\": _client....
[ "items to raw document representation. 2. Converts the collection of", "[x[1] for x in los1]) # Create bag of words", "elapsed > 60: if total > 3600: print(f'(+{elapsed/60:.2f}m|t:{total/3600:.2f}h) {msg}') else:", "between 0-1, with 1 being identical. \"\"\" if type(los1) ==", "from local file lap(\"Loadin...
[ "Move(uci=move.uci()), Board(array=array).legal_moves)) ) array[0, :] = Board.piece_symbol_to_int(\"p\") all_possible_moves.update( set(map(lambda move:", "[\"Q\", \"N\"] ): array[i][j] = Board.piece_symbol_to_int(piece) all_possible_moves.update( set(map(lambda move: Move(uci=move.uci()),", "array[1, :] = Boar...
[ "self.y1 + scaled_effort # Don't let the vehcicle fall through", "Args: effort (float): related to the upward thrust of the", "<= 0 and net_acceleration < 0: y0dot = 0 y1dot", "net_acceleration self.y0 += y0dot * self.dt self.y1 += y1dot *", "self.y0 += gauss(0, self.noise) return self.y0, self.y1 def get_a...
[ ") -> Union[Dict[str, Any], List[Any]]: return self.request('delete', endpoint, data) def", "SignatureValidationError, StpmexException, ) from .resources import CuentaFisica, Orden, Resource, Saldo", "invalido', desc): raise InvalidField(**resp) elif id == 3 and desc", "import UnsupportedAlgorithm from crypto...
[ "l, ['1','2','3','4','7','8'] ) l -= \"2, 3\" self.assertEqual( l, ['1','4','7','8']", ") l += [7, 8] self.assertEqual( l, [1,2,3,4,7,8] ) l", "[10,12] ) self.assertEqual( l, [10,12,1,4,7,8] ) l.extend( [0,-1] ) self.assertEqual(", "\"10,12\" ) self.assertEqual( l, ['10','12','1','4','7','8'] ) l.extend( \"0,...
[ "def log(self, file_object, email, log_message, log_writer_id): self.now = datetime.now() self.date", "from src.utils import uploaded_file import os class App_Logger: def __init__(self):", "from datetime import datetime from src.utils import uploaded_file import os", "self.date = self.now.date() self.current_...
[ "# name of meta root dir META_DIR = \".metasync\" #", "Increase of Paxos proposal number PAXOS_PNUM_INC = 10 # authentication", "params KB = 1024 MB = 1024*KB GB = 1024*MB", "BLOB_UNIT = 32*MB # Increase of Paxos proposal number PAXOS_PNUM_INC", "blob size BLOB_UNIT = 32*MB # Increase of Paxos proposal", ...
[ "test(\"()[]{}\", result=True) test(\"(]\", result=False) test(\"([)]\", result=False) test(\"{[]}\", result=True) test(\"\", result=True)", "unittest from py.tests.utils import test from py import valid_parentheses as", "@test(vp.Solution.is_valid) def test_valid_parentheses(self) -> None: test(\"()\", result=...
[ "inference on the image if self.model_type == ModelType.flyingthings: left_disparity, right_disparity", "# Perform inference on the image if self.model_type == ModelType.flyingthings:", "2) left_img = cv2.cvtColor(left_img, cv2.COLOR_BGR2GRAY) right_img = cv2.cvtColor(right_img, cv2.COLOR_BGR2GRAY) left_img", ...
[ "\"Intercept\" # Group to which the plugin belongs to def", "field_kwargs = { 'required': self.data.required, 'label': self.data.label, 'widget': forms.widgets.NumberInput(attrs={}), }", "your current address?\" form = HouseholdTenureForm group = \"Intercept\" #", "plugin belongs to def get_form_field_instanc...
[ "<gh_stars>0 __all__ = ['EnemyBucketWithStar', 'Nut', 'Beam', 'Enemy', 'Friend', 'Hero', 'Launcher',", "'Enemy', 'Friend', 'Hero', 'Launcher', 'Rotor', 'SpikeyBuddy', 'Star', 'Wizard', 'EnemyEquipedRotor', 'CyclingEnemyObject',", "['EnemyBucketWithStar', 'Nut', 'Beam', 'Enemy', 'Friend', 'Hero', 'Launcher', 'Ro...
[ "torch.nn.utils.rnn import pack_padded_sequence fine_tune_encoder = False # Read word map", "errD ####################################################### # (3) Update G network: maximize log(D(G(z))) ######################################################", "print('Load %s_%d.pth' % (cfg.TRAIN.NET_D, i)) state_d...
[ "return template(\"error\", sporocilo=\"Stran ne obstaja!\", naslov=\"404\") @bottle.error(500) def napaka500(a): return", "slovar_kolicin=slovar_kolicin) @bottle.error(404) def napaka404(a): return template(\"error\", sporocilo=\"Stran ne obstaja!\", naslov=\"404\")", "dobi_parcele_za_prikaz, dobi_info_parcele...
[ "initialize def initializer(model, args): \"\"\"Initialize transducer model. Args: model (torch.nn.Module):", "coding: utf-8 -*- \"\"\"Parameter initialization for transducer RNN/Transformer parts.\"\"\" import", "model.dec.embed.weight.data.normal_(0, 1) for l in six.moves.range(len(model.dec.decoder)): set_fo...
[ "np.multiply( P.dot( model.P1 ).dot( backward_likelihood(i+1, trace) ), model.M[:, trace[i][1]] )", "trace[i][1]] ) if likelihoods.sum() != 0: likelihoods = likelihoods /", "backward_likelihood(i, trace): N = model.N M = len( trace )", "= traces_factory.traces P0 = np.matrix(\"[ .02 0;\" \"0 0 0.5;\"", "= n...
[ "do not use this object directly. imageCanvas = vtk.vtkImageCanvasSource2D() imageCanvas.SetNumberOfScalarComponents(3)", "imageCanvas.FillBox(100,150,0,100) imageCanvas.SetDrawColor(0,128,128) imageCanvas.FillBox(150,200,0,100) imageCanvas.SetDrawColor(0,0,255) imageCanvas.FillBox(200,250,0,100) imageCanvas.SetD...
[ "with open('kelas_2b/echa.csv', 'r') as csvfile: csv_reader = csv.reader(csvfile, delimiter=',') for", "= csv.reader(csvfile, delimiter=',') for row in csv_reader: print(\"menampilkan data barang:\",", "for row in csv_reader: print(\"menampilkan data barang:\", row[0], row[1], row[2],", "import csv class echa...
[ "im_shape[0] - centre[0], -centre[1] : im_shape[1] - centre[1], -centre[2] :", "2.0 (the \"License\"); # you may not use this file", "import unittest from typing import Tuple import numpy as np", "(99, 99, 99) ) -> np.ndarray: \"\"\" Return a 3D", "[torch.Tensor(create_spherical_seg_3d(radius=20, centre=(10...
[ "spec.get(\"novelty\", True) normal_classes = spec[\"normal_classes\"] precision = defaultdict(list) for rounds", "specification missing from the command line arguments\") exit(1) spec_file =", "= df.sample(n=max_rows, replace=False) label_col = spec[\"label_column\"] y = df[label_col].values other", "X_train...
[ "'install path': Path(__file__).resolve().parent, 'python version': sys.version, 'platform': platform.platform(), 'optional deps.", "platform.platform(), 'optional deps. installed': optional_deps, } return '\\n'.join('{:>30} {}'.format(k +", "= '1.4a1' def version_info() -> str: import platform import sys", "...
[ "subject.configuration: token = '/'.join(tokens) if dependency: structure = dependency.construct_schema(name=token) if", "while queue: subject, tokens, dependency = queue.pop(0) if subject.configuration: token", "= {} schemas = {} units = {} @classmethod def", "def register_unit(cls, unit): cls.units[unit.ide...
[ ".messaging import * from .method import * from .operation import", "import * from .database import * from .entrypoint import *", "* from .method import * from .operation import * from", "from .messaging import * from .method import * from .operation", "import * from .operation import * from .stack import *...
[ "= random.choice(range(len(tokens))) choice = \" \".join( tokens[phrase_index : min(len(tokens), phrase_index", "target = f\"<s> {target}\" if args.add_eos: target = f\"{target} </s>\"", "\"__main__\": parser = argparse.ArgumentParser() parser.add_argument(\"--number\", \"-n\", type=int, default=1, help=\"numbe...
[ "<filename>AppImageBuilder/commands/file.py # Copyright 2020 <NAME> # # Permission is hereby", "conditions: # # The above copyright notice and this permission", "0: raise FileError('\\n'.join(self.stderr)) return '\\n'.join(self.stdout) def is_executable_elf(self, path): output =", "permit persons to whom the...
[ "other urls present on the records if --select-url is given.)\")", "help=\"A file to filter urls by. Excludes urls with 'desc'", "records: record_remove_urls_not_matching(record, pattern) # sort the records by id, to", "{}, n: int): hosts = [h for h in hosts_to_urls.keys()", "def record_get_urls_matching(re...
[ "via pants via the portion of the spec following the", "# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law", "the colon sources: A list of paths containing the Antlr", "compiler used to compile the ANTLR files. Currently only supports", "against. compiler: The name of the c...
[ "def i_create_a_pca_from_dataset(step): dataset = world.dataset.get('resource') resource = world.api.create_pca(dataset, {'name': 'new", "{'name': 'new PCA'}) world.status = resource['code'] eq_(world.status, HTTP_CREATED) world.location =", "#@step(r'I create a PCA from a dataset$') def i_create_a_pca_from_dat...
[ "'Back'] admins = ['admin1_telegram_nickname', 'admin2_telegram_nickname'] avail_days = [] TOKEN =", "['admin1_telegram_nickname', 'admin2_telegram_nickname'] avail_days = [] TOKEN = 'bot_<PASSWORD>' group_id =", "= '' options = ['Info', 'Check-in/Out', 'Edit games', 'Back'] admins", "'Check-in/Out', 'Edit ga...
[ "you like? (sourdough, rye, wheat, or white)\\n' bread_type = ip.inputChoice(['sourdough',", "wheat, or white)\\n' bread_type = ip.inputChoice(['sourdough', 'rye', 'wheat', 'white'], prompt=bread_prompt)", "of protein would you like? (chicken, turkey, ham, or tofu)\\n'", "tomato, lettuce]) for item in sandwic...
[ "Chapter from builder.containers.episode import Episode from builder.containers.scene import Scene from", "SCmd.TAG_TITLE) self.assertEqual(tmp.script, expect) self.assertEqual(tmp.option, exp_opt) validate_with_fail(self, 'title_of', checker, data) def", "expect): tmp = hd.HeaderUpdater()._outline_of(src) self...
[ "np.False_]), np.array([np.True_, np.True_, np.False_])] f = h5py.File(filename, 'x') # create", "rows[r] f.flush() f.close() f = h5py.File(filename, 'r') dsetr = f[\"vlen_matrix\"]", "np.False_])] f = h5py.File(filename, 'x') # create file, fails if", "= [np.array([np.True_, np.False_]), np.array([np.True_, ...
[ "imVideo[vid].shape[2] # display video blnLoop = True fid = 0", "= (fid + 1) % maxFrames else: if k ==", "= cv2.resize(imDisp.copy(), None, fx=resizeAmount, fy=resizeAmount) imDisp = cv2.cvtColor(imDisp, cv2.COLOR_GRAY2RGB) if", "fmt metadata['FORMAT'] = fmt vmode = vidseq.get(cv2.CAP_PROP_MODE) if vmode >", ...
[ "= subject # smtp.sendmail() only converts CR and LF (produced", "= address.split(\"@\", 1) return \"%s@%s\" % (local, domain.lower()) def send(mailto,", "MIMEText(content.strip()) message[\"To\"] = mailto message[\"From\"] = macro.MACRO_EMAIL_ADDRESS message[\"Subject\"] = subject", "given address is not con...
[ "warning): app.builder.build_all() assert \"build succeeded\" not in status.getvalue() warnings =", "\"build succeeded\" not in status.getvalue() warnings = warning.getvalue().strip() assert 'WARNING:", "Requested child \"http://example.org/system/Missing\" of \"http://example.org/system/ErrorMissingProcess\" i...
[ "if analysis=='Yes': levels=['Level 1','Level 2','Level 3'] #calculating the score of", "bar chart plt.bar(levels,level_score,color='blue',edgecolor='black') plt.title('Levelwise Scores',fontsize=16)#add title plt.xlabel('Levels')#set x-axis label plt.ylabel('Scores')#set", "unique values in array along with th...
[ "= 'mspaint' # replace with another editor if Unix rootdir", "in degrees vcen = (1,0,0) # x y z coords", "2022 by <NAME> | | [<EMAIL>] | |-----------------------------------| | We", "40 # height of cone deganglestep = 5 # how", "= 0 # outline color rotation = rotvec3D(25,240,70) # rotation", "cf = getRGBf...
[ "+= 1 plt.scatter(rmse[:, 0], rmse[:, 1]) plt.yscale('log') plt.ylim([1e-3, 1e-1]) plt.xlim([0,", "import sys sys.path.append(r'/home/andrewkirby72/phd_work/data_synthesis') from GP_machine_learning.GP_machine_learning_functions import * from regular_array_sampling.functions import", "0 while n_train < 200: n_t...
[ "the AC previously. The list is ordered chronologically, from newest", "tquery import get_latest_record from config import * app = Flask(__name__)", "== 'POST': # someone's logging in if not request.form['username'] in", "= db_record[0].strftime(\"%H:%M\") out_record['celsius'] = db_record[1] out_record['fahr...
[ "eigenvectors: np.ndarray) -> bool: \"\"\"Check that the eigenvalue equation holds.\"\"\"", "matrix: np.ndarray, eigenvalues: np.ndarray, eigenvectors: np.ndarray) -> bool: \"\"\"Check that", "return np.sqrt(np.dot(vs, vs)) def create_random_matrix(size: int) -> np.array: \"\"\"Create a", "= create_random_mat...
[ "nums[nums[i]], nums[i] = nums[i], nums[nums[i]] return -1 if __name__ ==", "Solution: def findRepeatNumber(self, nums: List[int]) -> int: # solution one:", "i in range(1, len(nums)): if pre == nums[i]: return nums[i]", "def findRepeatNumber(self, nums: List[int]) -> int: # solution one: 哈希表", "len(nums)): ...
[ "GWUNetwork from gwu_nn.layers import Dense from gwu_nn.activation_layers import Sigmoid np.random.seed(8)", "logit colors = ['red'] * num_obs + ['blue'] * num_obs", "print(X.shape) y = np.hstack((np.zeros(num_obs), np.ones(num_obs))) print(y.shape) # colors = ['red']", "we don't cheat X_train, X_test, y_trai...
[ "get_form_factor(element_name=elem1.symbol, water=water) form_factor2 = get_form_factor(element_name=elem2.symbol, water=water) coeff = form_factor1 *", "r : numpy.ndarray r positions generated by histogram binning g_r_t", "import mdtraj as md from progressbar import ProgressBar from scattering.utils.utils", ...
[ "import * from .quant_lenet5 import * from .quant_cnv import *", "# nn_benchmark # author - <NAME> # https://github.com/QDucasse # <EMAIL>", ".alexnet import * from .lenet import * from .lenet5 import", "* from .quant_alexnet import * from .quant_lenet5 import * from", "* from .lenet5 import * from .mobilen...
[ "cv.imshow('Gray', gray) # blur = cv.GaussianBlur(gray, (5,5), cv.BORDER_DEFAULT) cv.imshow('Blur', blur)", "cv.COLOR_BGR2GRAY) cv.imshow('Gray', gray) # blur = cv.GaussianBlur(gray, (5,5), cv.BORDER_DEFAULT) cv.imshow('Blur',", "canny = cv.Canny(blur, 125, 175) cv.imshow('Canny Edges', canny) # ret,", "impor...
[]
[ "import Document class Practitioner(Document): def before_save(self): self.practitioner_full_name = f'{self.first_name} {self.second_name", "license.txt # import frappe from frappe.model.document import Document class Practitioner(Document):", "and contributors # For license information, please see license.txt ...
[ "+ '/.git/config', 'a+') as gitConfig: if (\"[checkstyle]\" not in gitConfig.read()):", "for pre-commit. Has to run as root, enter password plz\")", "+ \"/.git/hooks/\" + checkstyleName) urlretrieve(checkstyleUrl, basePath + \"/.git/hooks/\" + checkstyleName)", "gitConfig.write(\"jar = %s\\n\" % (basePath + \...
[ "= {} # Set up the paths and environment for", "for static pages. It is the default handler.\"\"\" # Build", "the file then return an error to the client. try:", "file_type data = open(file_path, 'rb').read() self.response.body_file.write(data) except Exception as e:", "based on WebOb, Jinja2, WSGI with a s...
[ "= set(UserProfile.objects.values_list('email', flat=True) # whoa .filter(addons__versions__files__jetpack_version__isnull=False)) log.info('There are %d emails", "release candidate build - https://ftp.mozilla.org/pub/mozilla.org/labs/jetpack/addon-sdk-1.0rc2.tar.gz, https://ftp.mozilla.org/pub/mozilla.org/labs/j...
[ "the first index and times along the second. \"\"\" #", "altitude = observer._altaz_cache[aakey]['altitude'] return altitude def compute_constraint(self, times, observer, targets):", "in constraints] constraint_arr = np.logical_and.reduce(applied_constraints) return np.any(constraint_arr, axis=1) def is_event_o...
[ "= 'index' return render(request, 'backend/index.html', context) @login_required() def posts(request): context", "tags = paginator.page(paginator.num_pages) context['tags'] = tags return render(request, 'backend/tags.html', context)", "created.') return HttpResponseRedirect(reverse('user_panel_tags')) context['...
[ ") -> Tuple[_mp.Process, IRPCModelSession]: client_conn, server_conn = _mp.Pipe() proc =", "as _mp import uuid import zipfile from concurrent.futures import Future", "= uuid.uuid4().hex self._datasets[id_] = {\"mean\": mean, \"stddev\": stddev} return id_", "res def create_dataset(self, mean, stddev): id_ = u...
[ "new entities Result: - 'Copy->Pasted' entities won't have same AvalonID", "ignore_me = True def launch(self, session, event): created = []", "priority = SyncToAvalonEvent.priority - 1 ignore_me = True def launch(self,", "= event['data']['entities'] for entity in entities: try: entity_id = entity['entityId']"...
[ "= workflow_IngestAcceptedSubmission( settings_mock, FakeLogger(), None, None, None, None ) def", "settings_mock, FakeLogger(), None, None, None, None ) def test_init(self): self.assertEqual(self.workflow.name,", "workflow_IngestAcceptedSubmission( settings_mock, FakeLogger(), None, None, None, None ) def test_...
[ "the setup magic. api = vumi_api() token_data = api.token_manager.get(token) if", "here, but it's saner to get a whole # vumi_api", "need to be if not user_id or request.user.id == user_id:", "user_id or request.user.id == user_id: path, _, qs = redirect_to.partition('?')", "== user_id: path, _, qs = redire...
[ "return wrapper register.filter('amp', make_safe(amp)) register.filter('caps', make_safe(caps)) register.filter('initial_quotes', make_safe(initial_quotes)) register.filter('smartypants', make_safe(smartypants))", "out = f(text) except TypogrifyError, e: if settings.DEBUG: raise e", "django.utils.encoding impor...
[ "binary data: int (4 bytes) data, = struct.unpack('<i', f.read(4)) header[\"PosInfosVerified\"]", "data # First slice center Z coordinate data, = struct.unpack('<f',", "are stored as a series of bytes. See the V16", "Then follows eventually a section listing spatial # transformations which", "in # the conte...
[ "[.77, .78] for (m, g) in zip(models, accs): acc =", "# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law", "+ .1 def test_imagenet1k_inception_bn(**kwargs): acc = mx.metric.create('acc') m = 'imagenet1k-inception-bn'", "OF ANY # KIND, either express or implied. See the", "'...
[ "parent vDataFrame is modified. Attributes ---------- alias, str : vColumn", "\"DECODE({}, '{}', 1, 0)\".format( \"{}\", str(distinct_elements[k]).replace(\"'\", \"''\") ) transformations =", "if (nullifzero) else \"\", cmax, cmin, ), \"float\", \"float\", )", "One-Hot Encoding. \"\"\" check_types([(\"respons...
[ "from datatables import ColumnDT, DataTables from .. import auth from", ": {id}\" @book.route('/post/', methods=['GET', 'POST']) def post_book(): \"\"\" post new", "= int(book[-1].id) + 1 print(f\"id is : {id}\") form =", "be displayed. from flask import render_template, redirect, request, url_for, flash,json...
[ "png = 'image/png' txt = 'text/plain; charset=us-ascii' json = 'application/json'", "Enum class content_type(Enum): # https://www.iana.org/assignments/media-types/media-types.xhtml css = 'text/css' gif =", "# https://www.iana.org/assignments/media-types/media-types.xhtml css = 'text/css' gif = 'image/gif' htm =...