ngram
listlengths
0
67.8k
[ "# ЗАПУСК ---------------------- m.start(terminationCount=MAX_TIME, maxTime=MAX_TIME) # ТЕСТЫ ---------------------- for t in list_all_transact: self.assertEqual(t[TIME_CREATED],", "k in t.keys() if k in [TIME_CREATED, TERMINATED_TIME, LIFE_TIME_LIST]]) if t[LABEL] == TRANSACT_A:", "import Segment from pyss.gen...
[ "rollout, NoFilter(), gamma=1.0, use_gae=False) return samples def update_target(self): \"\"\"Updates target critic and target", "SyncSampler( self.env, self.model.model, NoFilter(), config[\"num_local_steps\"], horizon=config[\"horizon\"]) def sample(self): \"\"\"Returns a batch of samples.\"\"\"", "self.model...
[ "edge: dict :returns: Updated edge with _to and _from key. :rtype: dict '''", "collections import namedtuple class NetworkGraph: ''' Representation of the network connections. This class", "dot graph of the network graph. :params graphargs: Arguments to graphviz.Digraph. :type graphargs:", "'hosts/' if edge['...
[ "= [blobs_log, blobs_dog, blobs_doh] colors = ['yellow', 'lime', 'red'] titles = ['Laplacian of", "3, figsize=(9, 3), sharex=True, sharey=True) ax = axes.ravel() for idx, (blobs, color, title)", "in blobs: y, x, r = blob c = plt.Circle((x, y), r, color=color,", "import data from skimage.feature import blob_do...
[ "indexof(listofnames, value): if value in listofnames: value_index = listofnames.index(value) return(listofnames, value_index) else: return(-1)", "def indexof(listofnames, value): if value in listofnames: value_index = listofnames.index(value) return(listofnames, value_index) else:" ]
[ "class Ball(Turtle): def __init__(self): super().__init__() self.penup() self.color(\"white\") self.shape(\"circle\") self.move_speed = 0.1 self.y_bounce =", "+ SPEED*self.x_bounce new_y = self.ycor() + SPEED*self.y_bounce self.goto(new_x, new_y) def reset(self): self.goto(0, 0)", "new_x = self.xcor() + SPEED*s...
[ "right): self.pred = pred self.left = left self.right = right def getExpr(self): return", "from jry2.semantics import Expr class TreeNode: pass class TreeLeaf(TreeNode): def __init__(self, term): self.term", "def getExpr(self): return self.term class TreeInnerNode(TreeNode): def __init__(self, pred, left, right...
[ "`n`-torsion subgroup, where `n` is the exponent of `(\\ZZ/N\\ZZ)^*`. Many operations, such as", "c in self.values()[1:]: z *= zeta g += phi(c)*z return g def jacobi_sum(self,", "% (self.modulus(), self.conductor()) r = len(self.values_on_gens()) if r != 0: s += r'", "order 12 and degree 4 sage: e.minimize_ba...
[ "i+width]) return lines def is_binary(file): if isinstance(file, io.BufferedIOBase): return True # for file", "file.readline() if not line: break yield line def write(self, file): \"\"\" Write the", "read. Alternatively a file path can be supplied. Yields ------ line : str", "all line based text files. When r...
[ "( secondary_pnt.title == \"\" and pnt_const.USE_MAIN_LANGUAGE == self.push_notification.mode ): secondary_pnt.title = self.primary_pnt.title secondary_pnt.text", "translations in other languages \"\"\" secondary_pnts = PushNotificationTranslation.objects.filter( push_notification=self.push_notification ).exclude...
[ "from firebird.qa import db_factory, isql_act, Action # version: 1.0 # resources: None substitutions_1", "= \"\"\"CREATE ASC INDEX test ON t(a); SHOW INDEX test;\"\"\" act_1 = isql_act('db_1',", "SHOW INDEX test;\"\"\" act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1) expected_stdout_1 = \"...
[ "object, it contains information about the pare we are refering, index, items per", "the pare we are refering, index, items per page, etc. \"\"\" page_index =", "items_per_page, page_index): \"\"\" Creates the page \"\"\" self.page_index = int(page_index) self.items_per_page = int(items_per_page)", "informati...
[ "# # Licensed under the Apache License, Version 2.0 (the \"License\"); # you", "writing, software # distributed under the License is distributed on an \"AS IS\"", "def init_dataset(name, *args, **kwargs): if name not in __factory.keys(): raise KeyError(\"Unknown datasets: {}\".format(name))", "KIND, either ex...
[ "\\\"Resources\\\", \\\"budget_data.csv\\\") #set path\\n\", \"\\n\", \"\\n\", \"#read file\\n\", \"with open(bankcsv, 'r') as csv_file:\\n\",", "\"output_type\": \"stream\", \"text\": [ \"Financial Analysis\\n\", \"---------------------------------------------------------------------\\n\", \"Total Months: 86\\n\...
[ "from ctypes import POINTER, Structure from ..wintypes import VARIANT, dll_import @dll_import('OleAut32') def VariantInit(", "<reponame>jkennedyvz/DeepFaceLive<gh_stars>0 from ctypes import POINTER, Structure from ..wintypes import VARIANT, dll_import @dll_import('OleAut32') def", "POINTER, Structure from ..win...
[ "ResourceContainer from .models import SessionToken from .models import Subscription from .models import SubscriptionsQuery", "Changes may cause incorrect behavior and will be lost if the code is", "InputValuesError from .models import InputValuesQuery from .models import Notification from .models import Notifi...
[ "__logger if not PizdyukLogger._PizdyukLogger__logger: PizdyukLogger._PizdyukLogger__logger = PizdyukLogger() return PizdyukLogger._PizdyukLogger__logger def log_info(self, msg): self.__log(msg,", "PizdyukLogger: __logger = None def __init__(self): global __logger if self.__logger: raise RuntimeError(\"Logger ins...
[ "subset of cubic symmetries that give unique orientations when the # Burgers transformation", "the # Burgers transformation is applied unq_hex_syms = [ hex_syms[0], hex_syms[5], hex_syms[4], hex_syms[2],", "when the # Burgers transformation is applied unq_hex_syms = [ hex_syms[0], hex_syms[5], hex_syms[4],", ...
[]
[ "\"Phone number is required\" })), 400 if not username or not username.split(): return", "= data.get('is_admin') password = data.get('password') if not firstname or not firstname.split(): return make_response(jsonify({", "if not VALIDATOR.validate_email(email): return jsonify({ \"status\": 400, \"message\": \"I...
[ "('revolution', 'cycle')) self.assertEqual(x.symbol, 'turn') self.assertFalse(x.is_base) self.assertIsInstance(x.converter, ScaleConverter) self.assertEqual(x.converter.scale, 6.28) self.assertEqual(x.reference, UnitsContainer(radian=1)) def test_dimension_definition(self):", "self.assertIsInstance(x.converter, S...
[ "# # Permission is hereby granted, free of charge, to any person #", "Copyright (C) 2015 <NAME> # # Permission is hereby granted, free of charge,", "dns.dnssec.make_ds(name, dnskey, htype) if ds == good_ds: break else: continue break else: raise", "set in record') if keys is None: keys = {dns.name.from_text(s...
[ "Interface(\"ID3D11GeometryShader\", ID3D11DeviceChild) ID3D11PixelShader = Interface(\"ID3D11PixelShader\", ID3D11DeviceChild) ID3D11ComputeShader = Interface(\"ID3D11ComputeShader\", ID3D11DeviceChild) ID3D11InputLayout = Interface(\"ID3D11InputLayout\",", "\"StartVertexLocation\"), (UINT, \"StartInstanceLocati...
[ "acc played_indices.add(index) line = seq[index].split() op = line[0] value = int(line[1]) if op", "def boot(seq): index = 0 played_indices = set() acc = 0 while True:", "[] for idx, value in enumerate(list_): if value[:3] == 'nop': seq = deepcopy(list_)", "'jmp': seq = deepcopy(list_) seq[idx] = 'nop' + valu...
[ "os.makedirs(train_dir) with tf.Graph().as_default(): global_step = tf.contrib.framework.get_or_create_global_step() tf.logging.set_verbosity(tf.logging.INFO) with tf.device(\"/cpu:0\"): samples=input_data.get_images_labels(tfRecorf_dir,num_classes,66, crop_size=[224,224], batch_size=4) batch_queue", "Create some...
[ "of any file/buffer. ' 'No external dependencies.', long_description=codecs.open('README.rst', 'r', encoding='utf-8', errors='ignore').read(), keywords='file libmagic", "'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Topic", "Audience :: System Administrators', 'License :: OS...
[ "about them # git clone https://github.com/networktocode/ntc-templates # export NET_TEXTFSM=/home/ntc/ntc-templates/templates/ # see https://github.com/networktocode/ntc-templates/tree/master/templates #", "clone https://github.com/networktocode/ntc-templates # export NET_TEXTFSM=/home/ntc/ntc-templates/templates...
[ "KIND, either express or implied. # See the License for the specific language", "return _validate_iap_jwt(iap_jwt, expected_audience) def _validate_iap_jwt(iap_jwt, expected_audience): try: key_id = jwt.get_unverified_header(iap_jwt).get('kid') if not key_id:", "Unless required by applicable law or agreed to in...
[ "keyboard self[\"onkeyup\"] = self.bind( self.presskey, b\"event.key\" ) def presskey(self,key): if key in \"0123456789+-*/.\":", "a pywebview instance from htag.runners import * # here is another runner, in", "\"\"\" class Calc(Tag.div): statics=[Tag.H.style(\"\"\" .mycalc *,button {font-size:2em;font-family: ...
[ "<filename>res/example1.py from giraphics.graphing.graph import Graph def func(x): return (x-3)*(x+2)*x*0.2 g = Graph(800,600,8,6, 'example1.svg')", "giraphics.graphing.graph import Graph def func(x): return (x-3)*(x+2)*x*0.2 g = Graph(800,600,8,6, 'example1.svg') g.bg() g.grid()", "Graph def func(x): return (x...
[ "name=[\"ga\",\"albano\",\"blaz1\",\"blaz2\",\"dighe1\",\"dighe2\",\"fu\",\"han\",\"jakobs1\",\"jakobs2\",\"mao\",\"marques\",\"shapes\",\"shirts\",\"swim\",\"trousers\"] print(\"开始处理\",name[index],\"数据集\") '''暂时没有考虑宽度,全部缩放来表示''' scale=[100,0.5,100,100,20,20,20,10,20,20,0.5,20,50] print(\"缩放\",scale[index],\"倍\") d...
[ "export_image, export_sample, export_as_image from .table_sqlite import TableStream, SQLITE_TYPE_PATTERN, get_table_number_of_rows from .reporting_bokeh import report,", "\\ # safe_lookup, len_batch from .export import as_image_ui8, as_rgb_image, export_image, export_sample, export_as_image from", "# safe_looku...
[ "video reader fp = pool_item['fp'] result = {'fp': fp} # add media metadata", "from vframe.utils import file_utils from vframe.utils.video_utils import FileVideoStream, mediainfo log = app_cfg.LOG #", "= file_utils.glob_multi(opt_dir_in, opt_exts, recursive=opt_recursive) if any(opt_slice): fp_items = fp_items[...
[ "learndash.api_resources.abstract import UpdateableAPIResource from learndash.api_resources.abstract import NestedAPIResource from learndash.api_resources.typing import UserDict from learndash.api_resources.typing", "deleteable api_path = learndash.path_user_groups def instance_url(self): # This endpoint accepts ...
[ "return default @abstractmethod def resolve(self, enabled_container_types, tool_info, **kwds): \"\"\"Find a container matching all", "defines the abstract interface for resolving container images for tool execution.\"\"\" from abc", "``ContainerResolver`` subclasses.\"\"\" self.app_info = app_info self.resolver...
[ "file_name in file_names: df: pd.DataFrame = pd.read_csv(f'{SRC_DIR}/{file_name}').set_index('EyeTrackerTimestamp').sort_index()[ ['GazePointX (ADCSpx)', 'GazePointY (ADCSpx)', 'PupilLeft', 'PupilRight']].reset_index()", "'dr'] # fill blanks (order=interpolate(inter)->bfill+ffill(edges))->zerofill df = df.apply(l...
[ "return datafiles #checking if loss ever doesn't decrease for numEpochs epochs in a", "accuracy, loss) stored at FILENAME def grabNNData(FILENAME, header='infer', sep=' '): data = pd.read_csv(FILENAME,", "x,y #if we get to this point in function, it means z and", "one of the expected columns: epochs trainLoss...
[ "# class Solution: def isValid(self , s ): # write code here if", "here if not s: return True stack = [] dic = {'{':'}','[':']','(':')'} for", "stack = [] dic = {'{':'}','[':']','(':')'} for char in s: if not stack", "def isValid(self , s ): # write code here if not s: return", "s string字符串 # @return bool布尔...
[ "path_mode == 'relative': dirname, _ = os.path.split(path) info.files = [os.path.join(dirname, f) for f", "def getOutputFilenames(self, filename): return [filename[:-7]] def process(self, path, out_dir): dirname, filename = os.path.split(path)", "p in info.files: with open(p, 'rb') as ifp: ofp.write(ifp.read())...
[ "src.events import Event class CellPressed(Event): def __init__(self, position): self.position = position def get_position(self):", "Event class CellPressed(Event): def __init__(self, position): self.position = position def get_position(self): return self.position", "from src.events import Event class CellPress...
[ "(in GeV) wMass = cms.double(80.4), ## use b-tagging two distinguish between light and", "FWCore.ParameterSet.Config as cms # # module to make the MaxSumPtWMass jet combination #", "bTagAlgorithm = cms.string(\"trackCountingHighEffBJetTags\"), ## minimum b discriminator value required for b jets and", "## nom...
[ "python #-*- coding:utf-8 -*- __all__ = [\"args\", \"colors\", \"libcolors\", \"routine\"] __version__ = \"0.96\"", "#!/usr/bin/env python #-*- coding:utf-8 -*- __all__ = [\"args\", \"colors\", \"libcolors\", \"routine\"] __version__ =", "<reponame>runapp/xortool<filename>xortool/__init__.py #!/usr/bin/env pyth...
[ "= color file = property(lambda self: self._file) color = property(lambda self: self._color) height", "170), ): assert is_color(background_color) self._background_color = background_color background_color = property(lambda self: self._background_color) #", "class RessourcePack: def config(self, **kwargs): for n...
[ "if name in station_names: sloc, = np.where(station_names == name) if lat in latitudes:", "\"\", doText = False): ''' Standard scatter map :param str outname: output filename", "2017 \"\"\" # ECMWF import defaults import traceback import sys from eccodes import", "check for new keys which give station ID info...
[ "*args, **kwargs): raise base.MethodNotSupported() def delete(self, *args, **kwargs): raise base.MethodNotSupported() class ConnectAppsBase(resource.TwilioResource): path", "is 50, and the maximum is 1000. :vartype PageSize: int :var AfterSid: The", "Applications belonging to an account. :var FriendlyName: Only...
[ "KIND, either express or implied. # See the License for the specific language", "= np.dot(np.concatenate((test_positive_z, test_negative_z), axis=0), weight) + bias probability_scores = np.exp(softmax(scores)) predictions = probability_scores[:,", "Unless required by applicable law or agreed to in writing, soft...
[ "= 1 elif not any(VarsAreOnGpu): MemType = 0 else: raise ValueError('At least two", "1: # CPU or GPU return self.dev[split_backend[0]], self._find_grid(), self._find_mem(variables) elif len(split_backend) == 2:", "the options used in PyKeops. \"\"\" dev = OrderedDict([('CPU',0),('GPU',1)]) grid = OrderedDict([(...
[ "\"Y\")) if overwrite: skip_feature_extraction = False if skip_feature_extraction: print(\"Features seems to be prepared,", "disk\") for idx, (x, y) in tqdm(enumerate(zip(X, Y))): # paths src_name = splitext(basename(X_dataset.collected_files[idx][0]))[0]", "speakers, max_files=None): super(MGCSource, self).__i...
[ "# # Licensed under the Apache License, Version 2.0 (the \"License\"); # you", "writing, software # distributed under the License is distributed on an \"AS IS\"", "class PyDeckTest(testutil.DeltaGeneratorTestCase): def test_basic(self): \"\"\"Test that pydeck object orks.\"\"\" st.pydeck_chart( pdk.Deck( layers...
[ "of just a # table name. if dataset is None: match = re.match(", "API endpoint. Docs for this BQ call: https://cloud.google.com/bigquery/docs/reference\\ /rest/v2/tabledata/insertAll.\"\"\" # The rows argument", "with schema %s. Result: %s.', project_id, dataset_id, table_id, schema or found_table.schema, creat...
[ "software. #----------------------------------------------------------------------------- import os from PyInstaller.utils.hooks import ( get_module_attribute, is_module_satisfies, qt_menu_nib_dir, get_module_file_attribute, collect_data_files)", "# Distributed under the terms of the GNU General Public License wi...
[ "test_output_class(): old_node = vy_ast.parse_to_ast(\"foo = 42\") new_node = vy_ast.Int.from_node(old_node, value=666) assert isinstance(new_node, vy_ast.Int)", "vy_ast.parse_to_ast(\"foo = 42\") new_node = vy_ast.Int.from_node(old_node, value=666) assert old_node.src == new_node.src assert old_node.node_source_...
[ "\\ -D WITH_CUDA=OFF \\ -D WITH_TBB=ON \\ -D WITH_V4L=ON \\ -D WITH_QT=ON \\", "mkdir -p opencv/build && cd opencv/build && \\ cmake -D CMAKE_BUILD_TYPE=RELEASE \\ -D", "\\ libxvidcore-dev \\ x264 \\ v4l-utils \\ ffmpeg \\ && \\ $GIT_CLONE --branch", "-D BUILD_TESTS=OFF \\ -D BUILD_PERF_TESTS=OFF \\ -D WITH_F...
[ "= [] # Change this to 1 for the solution to part 1.", "loop_length n += complete_cycles * loop_length history.append(copy.copy(stage)) n += 1 spin(pos % stage_length)", "stage in history: print(\"Duplicate found: %r at index %d matches at stage %d\"%(stage,", "stage_length = 16 stage = map(chr, range(ord('a'...
[ "np from numpy.testing import assert_equal, assert_array_equal from nose.tools import assert_greater from skimage.segmentation import", "from skimage.segmentation import felzenszwalb def test_grey(): # very weak tests. This algorithm is", ":10], 0) assert_array_equal(seg[10:, :10], 2) assert_array_equal(seg[:10...
[ "TestCSRFMiddleware: def setup_method(self): self.app = App() self.request = Request(generate_wsgi()) self.view = View(self.app) self.app.bind('Request',", "'POST' self.middleware.exempt = [] with pytest.raises(InvalidCSRFToken): self.middleware.before() def test_incoming_token_does_not_throw_exception_with_token...
[ "open(faq_file, 'r') as f: faq_page = f.read() return {'content': faq_page} @view_config(route_name='conventions', renderer='conventions.mako') def", "renderer='conventions.mako') def conventions_view(request): dir_path = os.path.dirname(__file__) conventions_file = os.path.join(dir_path, 'static/conventions.html...
[ "self.app.test_client() as client: response = client.get(url) headers = response.headers self.assertEqual(headers.get(ACL_ORIGIN), '*') ############### computers", "filter ############# def test_structure_attributes_filter(self): \"\"\" Get the list of given calculation attributes filtered", "] received_attr = ...
[ "metric.cpu, metric.mem, metric.files]) iteration = iteration + 1 reportpath = f\"./{filename}\" print(f\"Metrics report:", "= string_to_integer(args['<overall_duration>']) except: print(\"duration parameter is not an integer\") return ExitStatus.BAD_DURATION try: interval", "files_avg != None: print(f\"Metrics...
[ "init_train(self): train_x, train_y = [], [] for (path, dirs, files) in os.walk(os.path.join(self.data_path, 'train')):", "train_normal(self, x, y): with tf.variable_scope(name_or_scope='train_normal'): x = tf.read_file(filename=x) x = tf.image.decode_png(contents=x, channels=3, name='decode_png')", "repeat(): ...
[ "not os.path.isfile(args.base_html): stderr.write(\"The given base HTML file doesn't exist\") exit(1) script_path = os.path.dirname(os.path.realpath(__file__))", "str(int(time())) tmp_dir = gettempdir() + \"/\" + timestamp + \"_md-report/\" os.makedirs(tmp_dir, exist_ok=True) #", "== \"\": copyfile(script_path ...
[ "= False if __name__ == '__main__': input = __import__('sys').stdin.readline target_depth = 4 N,", "_ in range(N)] for _ in range(M): a, b = map(int, input().split()) graph[a].append(b)", "visited[cur]: return if depth == target_depth: is_possible[0] = True return visited[cur] = True", "visited, is_possible) ...
[ "version='0.1.0', description='bst: BigchainDB Sharing Tools', long_description=( 'A collection of scripts with different patterns", "description='bst: BigchainDB Sharing Tools', long_description=( 'A collection of scripts with different patterns to", "author='<NAME>', author_email='<EMAIL>', license='AGPLv3', ...
[]
[ "run_name=\"test_pca\" ) data_ranked_dict,_ = ftsel_obj.ftsel_pca(data_dict) fts = data_sel_dict['X_train'].shape[1] questions_int = list(map(str, list(range(1,fts+1,1)))) ranked_questions", "data_ranked_dict, ranked_questions = ftsel_obj.ftsel_decision_tree_method(data_dict, thres) for num in list_num_features: ...
[ "smart_imports smart_imports.all() class HeroDescriptionTests(utils_testcase.TestCase): def setUp(self): super().setUp() game_logic.create_test_map() account = self.accounts_factory.create_account(is_fast=True) self.storage =", "test_modifier_bonus(self): self.assertFalse(self.places[0].is_modifier_active()) with...
[]
[ "+ 8*self.Fr1**2) - 1)/2 self.Fr2 = self.U/np.sqrt(9.81*self.d2) iso05 = tbl.isoline(self.case, \"alpha.waterMean\", 0.5) idx", "# (c) <NAME> # The code is released under the MIT Licence. #", "self.U/np.sqrt(9.81*self.d) self.d2 = self.d*(np.sqrt(1 + 8*self.Fr1**2) - 1)/2 self.Fr2 = self.U/np.sqrt(9.81*self.d2)...
[ "step(self, mcs): if mcs in [3, 5, 19,20, 23, 29, 31]: self.request_screenshot(mcs=mcs, screenshot_label='Cell_Field_CellField_2D_XY_0')", "random import random class ScreenshotSteppable(SteppableBasePy): def __init__(self, frequency=10): SteppableBasePy.__init__(self, frequency) def step(self, mcs):", "from cc...
[ "# which ones take precedence over others. abstractconv_groupopt = LocalGroupDB() abstractconv_groupopt.__name__ = \"gpuarray_abstractconv_opts\"", "import GraphToGPULocalOptGroup, TopoOptimizer, local_optimizer from aesara.graph.optdb import ( EquilibriumDB, LocalGroupDB, OptimizationDatabase, SequenceDB, )", ...
[ "%s\" % (self._data['offline'], self._data['temporarilyOffline'])) def set_offline(self, message=\"requested from jenkinsapi\"): \"\"\" Set node offline.", "providing all relevant pointers to it :param baseurl: basic url for querying information", "JenkinsBase.__init__(self, baseurl) def get_jenkins_obj(self): ...
[ "for x in xrange(len(buf)): if x == 0: continue #headlines and text before", "Text, then # we may have to add bullets. # if incTextFlag and", "User Guide # Section on \"Tkgnats: Task Reporting System\". #------------------------------------------------------------------------- # Additional Information:", "\" ...
[ "def save_normalized_buried_area(path_file_buried_area, full_dataRDD): f_buried_area = open(path_file_buried_area,\"w\") line = \"# normalized_buried_area_total[nm2]\\tpose\"+\"\\n\" f_buried_area.write(line) for area", "normalized_buried_area DESC \"\"\" #Getting all data full_dataRDD = sqlCtx.sql(sql) #Saving n...
[ "or tmp_port > 65535: error_flag = True error_msg['port'] += get_message('MOSJA27206', request.user.get_lang_mode()) + '\\n'", "KIND, either express or implied. # See the License for the specific language", "'user' : '', 'password' : '', } now = datetime.datetime.now(pytz.timezone('UTC')) emo_chk = UnicodeCheck...
[ "\" current = current.next_node return string + \"END\" def is_empty(self) -> bool: if", "= LinkedList() self.order = 0 def enqueue(self, animal: Union[Dog, Cat]) -> None: if", "return self.dequeDog() def print_cats(self) -> str: string = \"\" cat = self.cats.head while", "self.tail = self.tail.next_node def ...
[ "C(cam.EigerDetectorCam, 'cam1:') class FirewireLinDetector(DetectorBase): _html_docs = ['FirewireWinDoc.html'] cam = C(cam.FirewireLinDetectorCam, 'cam1:') class FirewireWinDetector(DetectorBase):", "Dict[str, Any], optional Any datum kwargs that should go to all children. \"\"\"", "'Mar345Detector', 'MarCCDDe...
[ "a area print('Controle de Terrenos') print('-' * 20) l = float(input('Largura (m): '))", "l = float(input('Largura (m): ')) c = float(input('Comprimento (m): ')) area(f'A área do", "* 20) l = float(input('Largura (m): ')) c = float(input('Comprimento (m): ')) area(f'A", "= float(input('Comprimento (m): ')) a...
[ "or dash.Dash The flask or dash application excluded_resources_endpoints: tuple(str) Tuple with endpoints where", "= authorize_endpoint(function) def load_template(filename): \"\"\"Loads the login html template.\"\"\" pyfile_path = os.path.dirname(os.path.abspath(__file__)) path", "from flask import make_respon...
[ "), migrations.AlterField( model_name='orderedproduct', name='_id', field=models.AutoField(editable=False, primary_key=True, serialize=False), ), migrations.AlterField( model_name='orderedproduct', name='price', field=models.CharField(blank=True, max_length=20,", "field=models.AutoField(editable=False, primary_ke...
[ "models.CharField(max_length=1024)), ('description', models.TextField(blank=True, default='')), ('publisher', models.CharField(blank=True, default='', max_length=512)), ('tags', models.CharField(blank=True, max_length=1024, null=True)), ('created_on',", "django.db.models.deletion class Migration(migrations.Migrat...
[ "compliance_suite.exceptions.user_config_exception.py This module contains class definition for user config file exceptions. \"\"\" class", "This module contains class definition for user config file exceptions. \"\"\" class UserConfigException(Exception):", "# -*- coding: utf-8 -*- \"\"\"Module compliance_suit...
[ "= self._levels[pos.y % self._nrows][pos.x % self._ncols] risk += pos.y // self._nrows risk +=", "2021, Day 15 (https://adventofcode.com/2021/day/15) # Author: <NAME> import collections import heapq Point =", "9 else: risk = self._levels[pos.y][pos.x] return risk @staticmethod def load (filename): \"\"\"Creates...
[ "Indico is free software; you can redistribute it and/or # modify it under", "is part of Indico. # Copyright (C) 2002 - 2020 CERN # #", "friendly_id, track_id=None, management=False): abstract = Abstract.find(event_id=confId, friendly_id=friendly_id).first_or_404() return redirect(url_for('abstracts.' + endpoin...
[ "'type': 'str'}, } def __init__(self, **kwargs) -> None: super(DatabaseAccountListKeysResult, self).__init__(**kwargs) self.primary_master_key = None", "Changes may cause incorrect behavior and will be lost if the code is", "code is # regenerated. # --------------------------------------------------------------...
[ "\"en\" } headers = { \"User-Agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36", "title = book_result.css(\".DKV0Md::text\").get() link = book_result.css(\".bHexk a::attr(href)\").get() displayed_link = book_result.css(\".tjvcx::text\").get() snippet = book_result.css(\".cmlJmd", "book_res...
[ "different games. \"\"\" from hol import ( cards, constants, ) from hol._hol import", "statistical analysis on different games. \"\"\" from hol import ( cards, constants, )", "and methods that can be used when simulating the game Higher-or-Lower and performing", "hol import ( cards, constants, ) from hol._hol...
[ "def update_font(self): self.font = CurrentFont() if self.font is not None: self.w.box.text.set(get_full_name(self.font)) self.set_defaults() self.restore_x()", "self.w.button_restore_y = SquareButton( (x, y, self.button_width, self.text_height), \"reset y\", callback=self.restore_y_callback, sizeStyle=self.size_...
[ "length <= 32 letters = string.ascii_letters + string.digits return ''.join(choice(letters) for _ in", "*args, **kwargs)) return getattr(self, prop_name) return property(wrapped_func) def to_text(value, encoding=\"utf-8\"): if isinstance(value, six.text_type):", "return isinstance(value, string_types) def byte2...
[ "the License. # ============================================================================== # pylint: disable=unused-import \"\"\"Import names of Tensor Flow standard", "is under control. # from tensorflow.python.ops.state_ops import scatter_nd_mul # from tensorflow.python.ops.state_ops import scatter_nd_div",...
[ "__name__ == '__main__': PARSER = argparse.ArgumentParser(description='Device registration time.') PARSER.add_argument('num_devices', metavar='N', type=int, default=1, nargs='?',", "scaling tests.\"\"\" import sys import time import argparse import tango from tango.server import", "\"\"\"Register devices in the...
[ "results[\"answers\"][0][\"answer\"] == \"Berlin\" def test_parallel_paths_in_pipeline_graph(): class A(RootNode): def run(self, **kwargs): kwargs[\"output\"] = \"A\"", "@pytest.mark.slow @pytest.mark.elasticsearch @pytest.mark.parametrize(\"retriever_with_docs\", [\"tfidf\"], indirect=True) def test_extractive_q...
[ "return None if check_exist(consensus): consensus_rename = os.path.join(asm_dir, contig_name + \".cns.fa\") os.rename(consensus, consensus_rename) return", "sv_reads_rename = sv_reads_dir + \"/\" + contig_name + \".reads.fa\" os.rename(sv_reads, sv_reads_rename) thread_asm =", "= \"map-pb\" else: presets_minima...
[ "lib.virtualfile_from_vectors(*data.T) as vfile: with GMTTempFile() as outfile: lib.call_module(\"info\", \"{} -C ->{}\".format(vfile, outfile.name)) output", "(\"x\", x)]) matrix, region, inc = dataarray_to_matrix(grid) npt.assert_allclose(actual=matrix, desired=data) npt.assert_allclose(actual=region, desired=[...
[ "class actually has more functions than are specified here. # We don't use", "actually has more functions than are specified here. # We don't use these", "This class actually has more functions than are specified here. # We don't", "# them in our type stub. We can always change it later. class", "<reponame>...
[ "prime # reducing the number after dividing it by the prime number else:", "break # if the number is not divisible by the paricular prime number", "== 0: # checks if the number is divisible by a particular prime", "the number is further divided by the next prime number until the number", "# if the number is...
[ "-> RangeIndex: result = type(self)._simple_new(self._range, name=self._name) result._cache = self._cache return result @doc(Int64Index.copy) def", "attr_name)) for attr_name in [\"start\", \"stop\", \"step\"] ) def memory_usage(self, deep: bool =", "range, name: Hashable = None) -> RangeIndex: result = object....
[ "__init__(self, input_size, hidden_size, num_classes): super(NeuralNet, self).__init__() self.l1 = nn.Linear(input_size, hidden_size) self.l2 = nn.Linear(hidden_size,", "nn.Linear(hidden_size, num_classes) self.relu = nn.ReLU() def forward(self, x): out = self.l1(x) out =", "= nn.Linear(input_size, hidden_size)...
[ "The name of the module being logged. production_mode : bool Whether or not", "the execution of modules. Log files are written to the ``logs/`` directory in", "+ sys.version.replace('\\n', '')) logging.info('Python Executable Path: ' + sys.executable) # Read in setup.py", "= production_mode # Create the log f...
[ "from aiohttp import ClientSession from typing import Optional session: Optional[ClientSession] = None __all__", "import ClientSession from typing import Optional session: Optional[ClientSession] = None __all__ = (session,)", "aiohttp import ClientSession from typing import Optional session: Optional[ClientSess...
[ "'rb') while True: chunk = fh.read(CHUNK) if not chunk: break _sha1.update(chunk) fh.close() return", "_sha256.update(chunk) fh.close() return _sha256.hexdigest() def sha384(path): _sha384 = hashlib.sha384() fh = open(path, 'rb')", "2 ** 20 def crc(path): _crc = 0 fh = open(path, 'rb') while", "hashlib.sha384...