ngram
listlengths
0
82k
[ "<= 25: # lookahead 3 shapes = [current_shape] + next_shapes[:]", "percorrer colunas [1,8] for a in range(1, x-1): x_differential =", "#quando está é true, temos de usar o search() e", "+ 1 # y = max(grid, key = lambda coord", "o search if not all_keys: first_piece = True else: new_piece", "websockets.con...
[ "= v org_id_list.append(v) edges.append((u, v)) org_id_list.sort() for i in xrange(len(org_id_list)):", "def gen_continuous_id_graph(inputFile, outputFile, isUndirected=False): with open(inputFile, 'r') as fin, open(outputFile,", "str(v) + '\\n') if isUndirected: fout.write(str(v) + ' ' +", "u,v in edges: fou...
[ "disk array_filename = os.path.join(temp, 'carray') p = params(storage=array_filename) ds =", "disk table_filename = os.path.join(temp, 'ctable') p = params(storage=table_filename) ds =", "dshape('1,{ x: int32; y: int32 }') t = CTableSource(data=[(1, 1),", "from blaze.eclass import eclass def test_open_carray...
[ "= indexes self.ascending = ascending def less(self, other): \"\"\" True", "type that itself is comparable. The underlying python comparison functions", "False def greater(self, other): \"\"\" True if self is greater", "\"\"\" True if self is greater than other. Comparison is", "self.ascending): left = self...
[ "into parameter_test mock_send_message.side_effect = parameter_test can_send_raw(0, [10, 255, 0], BABYDRIVER_DEVICE_ID,", "match # parameters passed into parameter_test mock_send_message.side_effect = parameter_test can_send_raw(0,", "mock_cantools_load_file.side_effect = can.CanError self.assertRaises(Exceptio...
[ "(actually eliminates double slashes) :param path: Path to normalize \"\"\"", "file to hash :param chunk_size: Number of bytes per chunk", "from a string Add support for :meth:`str.removeprefix` for Python <", "-> str: \"\"\"Normalize path (actually eliminates double slashes) :param path:", "3.9. :param str...
[ "\" \" + data[2] + \" (\" + data[1] +", "+ \"\\n\" print(obj) obj = str('['+ obj +']').replace(',]',']') save =", "in f: data = txtLine.split('\\t') obj += \"{value:'\" + data[0]", "+ \")'},\" + \"\\n\" print(obj) obj = str('['+ obj +']').replace(',]',']')", "(\" + data[1] + \" \" + data[3].replace('\\n',''...
[ "= Label(window, textvariable=label_text) label_text.set(\"Off\") var = IntVar() check= Checkbutton(window, text=\"On\",", "textvariable=label_text) label_text.set(\"Off\") var = IntVar() check= Checkbutton(window, text=\"On\", variable=var, onvalue=1,", "check= Checkbutton(window, text=\"On\", variable=var, on...
[ "migrations class Migration(migrations.Migration): dependencies = [ ('travellifestyleblog22', '0008_alter_category_image'), ] operations", "3.2 on 2022-04-08 15:01 from django.db import migrations class Migration(migrations.Migration):", "by Django 3.2 on 2022-04-08 15:01 from django.db import migrations", "d...
[ "#Sequential API model = keras.Sequential( [ layers.Dense(512,activation='relu'), layers.Dense(216, activation =", "layers.Dense(512,activation='relu'), layers.Dense(216, activation = 'relu'), layers.Dense(10) ] ) model.compile( loss=", "layers from tensorflow.keras.datasets import mnist physical_devices = tf.c...
[ "url import payments.views urlpatterns = [ url(r\"^webhook/$\", payments.views.webhook, name=\"webhook\"), ]", "import url import payments.views urlpatterns = [ url(r\"^webhook/$\", payments.views.webhook, name=\"webhook\"),", "django.conf.urls import url import payments.views urlpatterns = [ url(r\"^webhook/$\...
[ "contributors (see AUTHORS.md) # This code is subject to the", "response from the STA, and sending the contents of that", "See LICENSE file for more details. ############################################################### from .prplmesh_base_test import", "agent.mac, controller.mac) debug(\"Confirming MAUT se...
[ "def test_method_api_delete_assert_that_called_once_with_id_1_exception(self): with patch('src.Api.Api', autospec=True) as mock_api: mock_id = Mock()", "mock_id.return_value = 1 mock_api.api_delete(mock_id) mock_api.api_delete.assert_called_with(mock_id) def test_method_api_delete_assert_that_called_once_with_id_...
[ "1 such that: arr[0] < arr[1] < ... < arr[i", "0 n = len(arr) for i in range(n-1): if arr[i]", "Given an array of integers arr, return true if and", "array if and only if: arr.length >= 3 There exists", "arr[i+1]: peak_index = i break if peak_index == 0: return", "i break if peak_index == 0: return False ...
[ "= int(el[1]) high = int(el[2]) dnase = el[3] while True:", "= inpl[i] if int(elem[1]) <= high: line += str(elem[0]) +", "<gh_stars>1-10 ''' mod_dnase_score.py usage: python mod_dnase_score.py bedgraph_file.bedgraph dataset.dat output.dat modify", "+ '\\t' + str(elem[6]) + '\\n' out.write(line) print('Length ...
[ "class LambdaAction(Action): delegate: t.Callable[[ActionContext], None] def execute(self, context: ActionContext) ->", "import dataclasses import typing as t from craftr.core.base import Action,", "Action, ActionContext @dataclasses.dataclass class LambdaAction(Action): delegate: t.Callable[[ActionContext], No...
[ "return result_dict['message'] else: response = result['plan'] self.client.add_to_cache(cache_key, response) recurring_price =", "import settings as configuration except ImportError: try: import config as", "plan in response: if (plan['name'] == filters['name'] or plan['plan_code'] ==", "cache_key = 'plan_%s'...
[]
[ "from .production import * try: from.local import * except: pass" ]
[ "transaction2.offset while position1 < len(transaction1.items): if transaction1.items[position1] != transaction2.items[position2]: return", "if previousTransaction == transactionsOfP[0]: # if it is the first", "len(previousTransaction.items) while positionPrevious < itemsCount: previousTransaction.utilities[pos...
[ "\"exponential\", \"hyperbolic\", \"linear\", \"parabolic\", \"polynom\", \"cos\", \"sin\", \"straight_power\", \"inverse_power\", #", "\"\"\"Core functionalities of the Eddington platform.\"\"\" from eddington.exceptions import (", "cos, sin, straight_power, inverse_power, ) from eddington.fitting import fit_t...
[ "unittest import TestCase from mock import MagicMock import sys from", "self.consumer = SimpleConsumer( self.kafka_conn, \"demo-id\", \"demo_test.outbound_firehose\" ) def test_process_item(self): #", "None, 'plugins.stop_monitor.StopMonitor': None, 'plugins.expire_monitor.ExpireMonitor': None, 'tests.tests_onl...
[ "tb)) self.res.append(\"--- Error: ---\\n%s\\n--- end ---\\n\" % errMsg) def addFailure(self,", "def u(a): if PY2: return a.encode(\"utf-8\") return a modes =", "= json.load(f, encoding=\"UTF-8\") except ValueError as e: raise ValueError(\"%s doesn't", "a, word, hyphen_mask)[:-1] ) else: return \"\".join( lis...
[ "node.parse_text(graph, self.get_text_from_element(child)) return node def parse_expression(self, graph, expression): raise NotImplementedError(\"Never", "dump(self, tabs, output_func, eol, verbose): self.output(tabs, output_func, eol, verbose) def", "graph.parse_tag_expression(sub_pattern, self) tail_text = se...
[ "tls._MIN > min_i and _CLEAR_CACHE: for i in range(tls._MIN, min_i):", "str(self.index)) try: self.title.text = tls.getTimeByID(self.index) self.image.source = tls.getImageByID(self.index) except: pass", "if touch.is_mouse_scrolling: if touch.button == 'scrolldown': if self.index > tls._MIN:", "Rectangle, Col...
[ "CarMaintainer() Algorithm() self.InitWindow() def InitWindow(self): self.setWindowIcon(QtGui.QIcon('icon.png')) self.setWindowTitle(self.title) self.setGeometry(self.top,self.left,self.width,self.height) self.show() def", "#button.move(0,0) #button.clicked.connect(self.on_click) CarMaintainer() Algorithm() self....
[ ") for i, node in enumerate(node1.walk()): assert node == result[i],", "Node() node3.attribute_to_find = 'find me' node1.parents.append(node2) node2.parents.append(node3) assert node1.find_parent_with_attribute('attribute_to_find') ==", "node1b = Node() node1b1 = Node() node1b1.find_me = True node1b1.color", ...
[ "the system is a big-endian platform or little-endian platform import", "little-endian platform import sys if sys.byteorder == \"little\": print(\"Little-endian platform.\")", "\"little\": print(\"Little-endian platform.\") # its an intel, alpha else: print(\"Big-endian", "whether the system is a big-endian p...
[ "not any(c.islower() for c in hey_bob) nothing = not hey_bob.strip()", "question = hey_bob.rstrip().endswith('?') yell = any(c.isupper() for c in hey_bob)", "yell: return \"Calm down, I know what I'm doing!\" elif", "know what I'm doing!\" elif nothing: return \"Fine. Be that", "\"Whoa, chill out!\" elif qu...
[ "setup( name = 'quicklock', packages = ['quicklock'], version = '0.1.7',", "version = '0.1.7', description = 'A simple Python resource lock", "author_email = '<EMAIL>', url = 'https://github.com/NateFerrero/quicklock', download_url = 'https://github.com/NateFerrero/quicklock/tarball/0.1.7', keywords", "= 'htt...
[ "telephone = models.CharField( max_length=16, verbose_name=_('Telephone'), blank=True, null=True, validators=(RegexValidator( getattr(settings, 'TELEPHONE_REGEXP',", "null=True, blank=True ) make_data = models.DateTimeField(_('Create date'), auto_now_add=True) deadline =", "if group does not already exist'), ma...
[ "stderr: self._run_main(tdata) exc = ctx.exception self.assertTrue(isinstance(exc, expected.exception)) ecode = getattr(exc,", "Run anyconfig.cli.main and check if the exit code was expected", "disable=missing-docstring \"\"\"test cases for anyconfig.cli module. \"\"\" import contextlib import", "which does n...
[ "= node.get(\"detail\") if constdetail == \"int\": value = util.parseInt(constvalue) elif", "\"float\") valueNode.set(\"value\", str(value)) elif isinstance(value, types.NoneType): valueNode.set(\"constantType\",\"null\") valueNode.set(\"value\", \"null\") else:", "operation(op1,op2) operations['LSH'] = func.pa...
[ "version 3.6.9 (default, Apr 18 2020, 01:56:04) # OctetString, Integer,", "at Fri May 1 22:39:55 2020 # On host grumpy", "Produced by pysmi-0.3.4 at Fri May 1 22:39:55 2020 #", "class MeinbergSwitch(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec +", "\"Counter64\", \"N...
[ "# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law", ") tn = nemo.backends.pytorch.tutorials.TaylorNet(dim=4) # note that real port's name:", "from nemo.core.neural_types import ChannelType, NeuralType from tests.common_setup import NeMoUnitTest class", "look bad/useless - r...
[ "<gh_stars>0 import tensorflow as tf class CharCNN(tf.keras.Model): def __init__(self, ):", "import tensorflow as tf class CharCNN(tf.keras.Model): def __init__(self, ): pass" ]
[ "and value() or value items.append((key, t(value))) return DisplayList(items) class BikaContentVocabulary(object):", "'bika.lims.vocabularies.AnalysisRequestWorkflowStates' >>> util = queryUtility(IVocabularyFactory, name) >>> tool = getToolByName(portal,", "= [] templates.sort() for template in templates: titl...
[ "new browser tab so you can keep working on Odoo,", "'Create and share Jitsi Meet video conferences with other users", "# © 2020 Sinerkia iD (<https://www.sinerkia.com>). { 'name': 'Sinerkia Jitsi", "\"website\": \"https://www.sinerkia.com\", \"depends\": ['base','web','mail'], \"data\": [ 'views/sinerkia_jit...
[ "right(expr, left_bound, right_bound, delta_x)) elif type == 3: print('Result:', mid(expr,", "0 or i == len(numbers) - 1: sum += expression.subs(x,", "type == 1: print('Result:', left(expr, left_bound, right_bound, delta_x)) elif type", "delta_x)) elif type == 5: print('Result:', simpson(expr, left_bound, rig...
[ "a encriptação, voce pode alterar o wallpaper # alterar icons,", "strike force strikes u! ' def get_parser(): parser = argparse.ArgumentParser(description=\"hackwareCrypter\")", "startDirs: for filename in Discovery.discover(currentDir): Crypter.change_files(filename, cryptoFn) # limpa a", "HARDCODED_KEY ctr ...
[ "operations = [ migrations.CreateModel( name=\"DataCenterLocation\", fields=[ ( \"id\", models.AutoField( auto_created=True,", "= [ migrations.CreateModel( name=\"DataCenterLocation\", fields=[ ( \"id\", models.AutoField( auto_created=True, primary_key=True,", "( \"datacenter\", models.ForeignKey( db_column=\"i...
[ "print(COLOR_GREEN + \".\" + COLOR_RESET, end = '', flush =", "last[0]) ] if middle: elems.append((middle, middle[0])) email, email_list = None,", "first successful\") if __name__ == \"__main__\": if not check_connectivity(): print(\"Can't", "post_form = { \"email\": email_addr } enc_data = parse.urlencode(po...
[ "a ponta da cauda com quadrado verde # Caso crescer", "e icone pygame.display.set_caption(\"Jogo da Cobrenha de ThurMP\") icone = pygame.image.load(\"images/snake", "y): screen.blit(imagemMaca, (x,y)) # Funcao para placar def placarFunc(x,y): placar", "do corpo # (Ja com a configuracao inicial) listaXCorpo ="...
[ "created_at = fields.DateTime(attribute=\"created_at\") class LocationSchema(BaseSchema): def hiera_data(self, location): res =", "category_schema.hiera_data(category)) return res class CategorySchema(BaseSchema): department_id = fields.Integer() def hiera_data(self,", "department in departments: res['children'...
[ "isError = False if (error[\"severity\"] == 0 or error[\"severity\"] ==", "and error[ \"fieldPath\" ][ 0 ] not in boneErrors: boneErrors.update({error[", "bone ''' errors = bone[\"errors\"] #no errors for this bone", "if isError: thisError = error.copy() thisError[\"fieldPath\"] = error[\"fieldPath\"][1:] bon...
[ "\"\"\"Utilities used to render and send emails \"\"\" # marty", "render and send emails \"\"\" # marty mcfly imports from", "# third-party imports from nacelle.core.template.renderers import render_jinja2_template def render_email(template, context=None):", "absolute_import # third-party imports from nacelle...
[ "= int(cap.get(cv2.CAP_PROP_FPS)) count = 0 img_number = 1000 with detection_graph.as_default():", "0, 0), 7) cv2.putText(output_img, 'blue cone', (int(b[1] * width),int(b[0] *", "result == 0: print(\"Yellow Cone\") cv2.rectangle(output_img, (int(b[1] * width),int(b[0] *", "Endurance- DHBW Engineering with th...
[ "both required and optional params are included \"\"\" # model", "), target = kubernetes.client.models.v2beta2/metric_target.v2beta2.MetricTarget( average_utilization = 56, average_value = '0',", "kubernetes.client.rest import ApiException class TestV2beta2MetricSpec(unittest.TestCase): \"\"\"V2beta2MetricSpec ...
[ "= PurchaseTransactionTbl.objects.create( product=self.product, purchase_id='d6asd65asd654as5d4', purchased_quantity=75 ) self.purchase_detail_url = reverse( 'purchases-detail',", "ProductsTbl.objects.get(id=self.product.id).quantity self.assertEqual(res.status_code, status.HTTP_204_NO_CONTENT) self.assertEqual(n...
[ "hamming distance minHMD = currentHMD # then set minimum hamming", "range(1, 20, 2)), os.listdir(directory)): # loop thorugh every file in", "import constants import os import math import matplotlib.pyplot as plt", "and 9 to search image\") print(\"Enter a number smaller than", "from barcodes.txt file image...
[ "end but hard to add content to any page #", "print(\"Number of pages in the pdf file:\", pdf_reader.numPages) # 0", "read text content, not the images and other media content", "It can only read text content, not the images and", "pdf files # It can only read text content, not", "print(\"Content of a giv...
[ "token == ':': punc_type = punc.index(token) original_form = tokens[i -", "':': punc_type = punc.index(token) original_form = tokens[i - 1] +", "j) x.extend(x_temp) y.extend(y_temp) with open('../features/tokenization_features_and_labels.txt', 'r+', encoding='utf8') as f: for", "for feature extraction elif to...
[ "subprocess # def storeSourcePath(installdir, simfemsourcedir): # with open(installdir+'/SOURCE_DIR_SIMFEM','w') as pathfile:", "open(installdir+'/SOURCE_DIR_SIMFEM','w') as pathfile: # pathfile.write(simfemsourcedir) # def getSourcePath(installdir): # with", "as pathfile: # pathfile.write(simfemsourcedir) # de...
[ "y_df, cols = args transform_y = kwargs.get(_KWARG_TRANSFORM, None) cv =", "cols = args transform_y = kwargs.get(_KWARG_TRANSFORM, None) cv = self._make_cv(cols)", "= args transform_y = kwargs.get(_KWARG_TRANSFORM, None) cv = self._make_cv(cols) scorer", "def fit(self, *args, **kwargs): x_df, y_df, cols = arg...
[ "x = tf.reshape(x, [model.batch_size, model.max_seq_len, model.embedding_size]) return x return _vhn_encoder", "def get_bag_vectors(model): \"\"\" Represents snapshots as a bag of clinical", "too big to fit in GPU memory) with tf.device(\"/cpu:0\"): #", "tensorflow.compat.v1 as tf import layers import rnn_cel...
[ "+ \"/all_reads_R1.fq\" self.file_two = self.output_path + \"/all_reads_R2.fq\" self.database_path = self.curr_path", "line in file.readlines()] # check file size (should be much", "no host reads passing filter rel_tol = len(set(res_lines) & set(exp_lines))", "/ len(set(exp_lines)) * 100 self.assertTrue(rel_t...
[ "<filename>tonggong/validations/__init__.py from . import errors, utils, validators __all__ = [\"validators\",", ". import errors, utils, validators __all__ = [\"validators\", \"errors\", \"utils\"]", "from . import errors, utils, validators __all__ = [\"validators\", \"errors\"," ]
[ "Result(): def __init__(self, path=None): self.path = path def display(self): \"\"\"", "was loaded successfully!\" else: print \"Unable to read basename and", "print \"Unable to read basename and file path - Your", "read basename and file path - Your string is probably", "<filename>openeo-qgis-plugin-master...
[ "if(reset): self.__i2cbus.write_i2c_block_data(self.__i2c_addr,0x02, [0x07,0x01]) self.__i2cbus.write_i2c_block_data(self.__i2c_addr,0x02, [0x08,0x01]) self.__i2cbus.write_i2c_block_data(self.__i2c_addr,0x00, [0x96,0x00]) self.__i2cbus.write_i2c_block_data(self.__i2c_addr,0x00, [0x97,0xfd]) self.__i2cbus.write_i2c_...
[ "= str(d.year) + \"-Q\" + str(pd.Timestamp(d).quarter) else: header_key = str(d.year)", "+ str(pd.Timestamp(d).quarter) else: header_key = str(d.year) if(header_key not in summary):", "groups = dict() transactions = self.obj[\"TransactionsInfo\"][\"Transactions\"] for t in transactions:", "in t[\"Receipt\"]: ...
[ "\"\"\" implements the staged deployment engine which contains the logic", "order of execution \"\"\" class StagedDeploymentEngine(object): def __init__(self): raise NotImplementedError", "which contains the logic and order of execution \"\"\" class", "the logic and order of execution \"\"\" class StagedDeplo...
[]
[ "= time() - start_time #print(\"Elapsed time: %0.10f seconds.\" % elapsed_time)", "mutacion: solucion = optimizar(dominio,poblacion,elite,p,reps,test) #print(\"poblacion: \", poblacion, \", mutacion: \",", "\"\"\" #Annealing: 1250000.0 0.99 1762.4 1856 #Genetico: 700 0.1 1675.0", "DominioTSP('datos/ciudades_c...
[ "(self.x_overall_idxline, unpacked_data) offset = 0 for idxline in self.x_embedded_idxlines: xseglen,", "!= self.main_seg_sum: self.extra_idxlines.add(idxline) self.x_overall_idxline = pack_idxline(self.x_overall_len, self.x_overall_sum) if self.main_seg_sum !=", "return FlatBlockDir(dirname) class BlockSearchP...
[ "-1: [too-many-lines] __revision__ = 0 ZERFZAER = 3 HEHEHE =", "disable=missing-docstring # -1: [too-many-lines] __revision__ = 0 ZERFZAER = 3", "# -1: [too-many-lines] __revision__ = 0 ZERFZAER = 3 HEHEHE", "pylint: disable=missing-docstring # -1: [too-many-lines] __revision__ = 0 ZERFZAER =", "# pylint: d...
[ "# Generated by Django 2.0.7 on 2018-08-12 22:36 from django.db", "operations = [ migrations.AlterField( model_name='userprofilemodel', name='UserProfileBio', field=models.TextField(blank=True, max_length=300, null=True), ),", "2018-08-12 22:36 from django.db import migrations, models class Migration(migrations...
[ "it's a run of 0's if cur != \".\": buf", "i >> 8 & 0xff] return (len(logo[0]), len(logo), buf2) if", "** bits - 1: buf += [2 ** bits -", "len(ret) == 0: return while len(ret) % n != 0:", "len(ret) == n: yield ret ret = list() if len(ret)", "[2 ** bits - 1] buf += [0] run =", "15 buf2 += [i & 0xff, i >>...
[ "total = 0 for _ in xrange(100000): for i in", "0 for _ in xrange(100000): for i in c: total", "def __getitem__(self, idx): return self.l[idx] def f(): c = C()", "def __init__(self): self.l = range(10) def __getitem__(self, idx): return self.l[idx]", "self.l[idx] def f(): c = C() total = 0 for", "c = C() ...
[ "in C and is thus much faster than the NLTK", "is written in C and is thus much faster than", "]\", re.UNICODE) #stemmer = PorterStemmer() stemmer = Stemmer.Stemmer(\"english\") def textpreprocess(txt,", "\"\"\" if converthtml: txt = html2text.html2text(txt) if sentencetokenize: txts =", "t in txts] txts = ...
[ "__init__(self, name, status=None, description=None): self.name = name self.description = description", "description self.status = status def __repr__(self): return self.name def __eq__(self,", "self.name = name self.description = description self.status = status def", "Project: def __init__(self, name, statu...
[ "arg_parser.add_argument('output_dir') args = arg_parser.parse_args() if not os.path.isdir(args.output_dir): raise Exception('output_dir is", "subpool.items(): path = 'video/{0}/data-{1}.json'.format(key, subkey) path = os.path.join(args.output_dir, path) dir_path", "in subpool.items(): path = 'channel/{0}/data...
[ "ixdev)))),:] events = np.squeeze(events, axis=0) tmin, tmax = -0.2, 0.5", "= 20 Wn = [l_freq/(raw.info['sfreq']/2.), h_freq/(raw.info['sfreq']/2.) ] b, a =", "mne from mne import io import sys sys.path.append('C:/_MANU/_U821/Python_Dev/') import scipy", "tmax*srate evoked_clean_dev.first=-200 evoked_clean_de...
[ "import os from .development import Development # from .production import", "if not enviroment: enviroment = os.environ.get('MEDIAPP_BE_API_ENV', 'dev') return configs[enviroment]() env", "# from .production import Production # from .test import Test", "<reponame>MedPy-C/backend import os from .development im...
[ "import dumps, loads from sqlalchemy import Column, DateTime, ForeignKey, Integer,", "Iterable['SImage'] = relationship(\"SImage\", back_populates='task') datasets = Column(Text) metrics = Column(Text)", "relationship(\"SModel\", back_populates=\"task\") pipelines: Iterable['SPipeline'] = relationship(\"SPipeli...
[ "Medium | | Office | Medium | | Hotel reception", "factor alpha_h = A_vh / A_f # just a factor", "A_vh / A_f # just a factor b_v = (", "| Medium | | Hospital room | Medium | |", "( 12.5 * (1 + 10 * alpha_v - alpha_v", "A_vv, delta_h ): \"\"\"Calculates time equivalence of standard fire exposure", "Theat...
[ "/ count0 if i == 0 else count / count1", "== 'train' and not self.whole: data = np.load(self.Data_dir + self.Data_list[idx]", "model on ADNI_test, NACC, FHS and AIBL datasets \"\"\" class", "1. FCN dataloader (data split into 60% train, 20% validation", "= [count / count0 if i == 0 else count", "self.roi...
[ "') check_contrast(file, args.method) else: print('Image name :', args.image, end=' ')", "plt def check_contrast(path, method='rms'): ''' Check contrast of given images", "parser = argparse.ArgumentParser(description='FcarScan Task - Blur and Contrast check') parser.add_argument('--image',", "or Michelson (mi...
[ "해준다. #WI = WI.replace(\"he'll\",'he will') # 조동사를 찾아내기 위해, 변환을", "해준다. #WI = WI.replace(\"i'd\",'i would') # 조동사를 찾아내기 위해, 변환을", "# 한단어가 단어장의 몇번 index에 있는지를 확인. voc_vectors.append(voc_vector) self.inform['voc_vectors'] =", "WI.replace(\"you'd\",'you would') # 조동사를 찾아내기 위해, 변환을 해준다. #WI =", "해준다. #WI = WI.r...
[ "demographics = ScorePanel.objects.get(title='Demographics') display.scorepanel_set.add(summary) display.scorepanel_set.add(demographics) functions = ScoreFunction.objects.filter( name__in=('Voting Age", "new_copy.id, \"Scorefunctions not added to current display\") self.assertEqual( len(copy.scorepanel_set.all()...
[ "characterize the mosquitocidal activity of parasporal inclusions of the Bacillus", "dir=STANZA_DOWNLOAD_DIR, processors={'ner': ner_model}) doc = nlp(text) print(f'\\nNER MODEL: {ner_model}') print('TYPE", "# for sent in doc.sentences: # # Operating on the", "print(f'SENTENCE {i+1}') print(' ID WORD TEXT <--...
[ "sys; input=sys.stdin.readline for _ in range(int(input())): n, *scores = map(int,", "map(int, input().split()) average = sum(scores) / len(scores) answer = len(list(filter(lambda", "input=sys.stdin.readline for _ in range(int(input())): n, *scores = map(int, input().split())", "input().split()) average = sum...
[ "json.loads(data) if topic == \"Monitor/MainUnit\": temperatureMainUnit = json_Dict['Temperature'] voltageMainUnit =", "monitorSortingLine: monitorMainUnit = False monitorSortingLine = False channel_layer = get_channel_layer()", "'storage1': json_Dict['Storage1'], 'storage2': json_Dict['Storage2'], 'storage3': ...
[ "# inserting the initial character in all possible positions within", "increment(self): self.count += 1 \"\"\" Recursion according to the \"Cat", "# get those cats to work!!!!! print 'Question 1 prep...'", "word[0] + string[index:]) l.increment() return outcomes(word[1:]) + possibilities print '\\nPrep", ":...
[ "buffering = 0) as f: for i in range(file_size): ser.write(f.read(1))", "0) as f: for i in range(file_size): ser.write(f.read(1)) print(ser.readline()) print(\"done\")", "kernel...\") with open(file_path, 'rb', buffering = 0) as f: for", "= serial.Serial(args.device,115200) except: print(\"Serial init failed!...
[ "== 1 and not jPressed[k]: # just pressed buttonPressed(k, stickNum)", "18) # side (maybe right) def move1(pow): m1.set(pow) def move2(pow):", "# 2nd chip m3 = motorInterface.motor(27, 23) # side (maybe", "for i in old: print(index, i) index += 1 webSocketClient.start('miniROV',", "def move3(pow): m3.set(po...
[ "flask import request from tensorflow import keras app = Flask(__name__)", "Flask from flask import jsonify from flask import request from", "import jsonify from flask import request from tensorflow import keras", "tfdf.keras.pd_dataframe_to_tf_dataset(pd.DataFrame(data)) predictions = model.predict(df) retur...
[ "\"\"\" await conn.acquire_priv(desired_priv=conn.default_desired_privilege_level) await conn.send_command(command=\"environment cli-engine type basic\") await conn.send_command(command=\"environment", "def default_async_on_open(conn: AsyncNetworkDriver) -> None: \"\"\" nokia_srlinux on_open callable Args:", "\...
[ "button, buffering=False): \"\"\"Press a button.\"\"\" #assert button in Button or", "except Exception: pass self.message = \"\" def flush(self): if self.windows:", "but do not open the fifo.\"\"\" self.pipe = None self.path", "self).__init__() \"\"\"Create, but do not open the fifo.\"\"\" self.pipe =", "de...
[ "= Tk() window.title(\"Special Midterm Exam in OOP\") window.geometry(\"300x200+20+10\") def changecolor():", "\"Click to Change Color\", command= changecolor) button.place(relx=.5, y=100, anchor=\"center\") window.mainloop()", "button = Button(window, text = \"Click to Change Color\", command=", "in OOP\") w...
[ "host_info = ConnectionProxy.get_host_info(method_info, kwargs) new_conn = ConnectionProxy(conn, comp, host_info) return", "default_wrapper class CursorProxy(): def __init__(self, cursor, conn): self._apm_wrap_cursor = cursor", "conn self._apm_comp_name = comp self._apm_host_info = host_info def cursor(self, *a...
[ "from casclik.controllers.reactive_nlp import ReactiveNLPController from casclik.controllers.pseudo_inverse import PseudoInverseController from casclik.controllers.model_predictive", "ReactiveQPController from casclik.controllers.reactive_nlp import ReactiveNLPController from casclik.controllers.pseudo_inverse im...
[ "locally available. It sets a flag in the element that", "from ..utils import check_dataset logger = logging.getLogger(\"datalad.metadata.processor.autoget\") class AutoGet(Processor): \"\"\"", "False: fs_dataset_path = ( traverse_result.fs_base_path / traverse_result.dataset_path ) dataset =", "{path} \" f\"...
[ "# print string print('The string is:', string) # ignore error", "is:', string.encode(\"ascii\", \"ignore\")) # replace error print('The encoded version (with", "'pythön!' # print string print('The string is:', string) # default", "in a string\"\"\" #Utf-8 Encoding # unicode string string =", "encode functi...
[ ":type digits: List[int] :rtype: List[int] \"\"\" result = digits[:] for", "-1, -1): if result[i] == 9: result[i] = 0 if", ":rtype: List[int] \"\"\" result = digits[:] for i in range(len(result)", "i == 0: result.insert(0, 1) else: result[i] += 1 return", "def plusOne(self, digits): \"\"\" :type digits: Lis...
[ "from stable_baselines3 import PPO filename = \"exp5/model-ant-400-500-600-s0.zip\" model = PPO.load(filename)", "stable_baselines3 import PPO filename = \"exp5/model-ant-400-500-600-s0.zip\" model = PPO.load(filename) print(model)", "<reponame>liusida/thesis-bodies from stable_baselines3 import PPO filename = ...
[ "import yaml import json # noqa import os import unittest", "noqa import sqlite3 # noqa import yaml import json #", "json # noqa import os import unittest mock = unittest.mock.Mock()", "weather_butler.WeatherButler('db/weatherman_unit') return wb # def test_get_response(): # def test_format_request_city_id_li...
[ "SuffixArray(Text): ''' Suffix Array Input: A string Text. Output: SuffixArray(Text).", "= [] for i in range(len(Text)): suffixes.append(Text[i:]) suffix_array.append(i) suffix_array =", "= [x for _, x in sorted(zip(suffixes, suffix_array), key=lambda pair:", "== \"__main__\": Text = sys.stdin.read().rstrip()...
[ "reward, done, info = env.step(action) env.render() net_reward += reward print(\"Total", "= env.step(action) env.render() net_reward += reward print(\"Total reward: \", net_reward)", "action = env.action_space.noop() print(action) action['camera'] = [0, 0.03 * obs[\"compassAngle\"]]", "0.03 * obs[\"compassAng...
[]
[]