ngram
listlengths
0
67.8k
[ "and piece[0][1] == piece[1][1] and piece[1][0] == piece[3][0] and piece[2][1] == piece[3][1]: fshape", "all_keys = [] # grid = {(tup[0],tup[1]) for tup in initial_info['grid']} # x", "válidas if (x_differential + max_x >= x - 1): break keys = [\"w\"]*rot", "# Nova peça elif new_piece: # Caso a peça faça part...
[ "(len(sys.argv) > 3 and sys.argv[3] == '-u'): isUndirected = True time_start = time.time()", "def gen_continuous_id_graph(inputFile, outputFile, isUndirected=False): with open(inputFile, 'r') as fin, open(outputFile, 'w') as fout:", "'\\n') if isUndirected: fout.write(str(v) + '\\t' + str(u) + '\\n') print 'cur...
[ "== ds def test_open_ctable(): with temp_dir() as temp: # Create an table on", "with temp_dir() as temp: # Create an table on disk table_filename = os.path.join(temp,", "as temp: # Create an array on disk array_filename = os.path.join(temp, 'carray') p", "import os.path from blaze.test_utils import temp_dir i...
[ "is less than other. Comparison is reversed when a row is marked descending.", "one or more columns, and each one may be ascending or descending. This", "needed comparison functions for sorting. Rows are assumed to be indexable collections of", "indexable collections of values. Values may be any python type t...
[ "encoded msg_obj.encode.side_effect = can.CanError database = Mock() database.get_message_by_name.return_value = msg_obj mock_load_file.return_value = database", "accuracy of paramters passed into can_send\"\"\" # pylint: disable=attribute-defined-outside-init self.arbitration_id = None self.data", "accuracy of...
[ "Path of the file to hash :param chunk_size: Number of bytes per chunk", "Python < 3.9. :param string: String to remove prefix from :param prefix: Prefix", "return string def normpath(path: str) -> str: \"\"\"Normalize path (actually eliminates double slashes)", "Prefix to remove \"\"\" # return string.remove...
[ "+ data[0] + \"', label:'\"+ data[0] + \" \" + data[2] + \"", "f = open(\"stdList.tsv\").readlines() obj = \"\" data = [] for txtLine in f:", "\" \" + data[2] + \" (\" + data[1] + \" \" +", "in f: data = txtLine.split('\\t') obj += \"{value:'\" + data[0] + \"', label:'\"+", "txtLine in f: data = txtLine.spl...
[ "Checkbutton, IntVar def update_label(): if var.get() == 1: label_text.set(\"On\") else: label_text.set(\"Off\") window =", "var.get() == 1: label_text.set(\"On\") else: label_text.set(\"Off\") window = Tk() label_text = StringVar() label", "StringVar() label = Label(window, textvariable=label_text) label_text....
[ "django.db import migrations class Migration(migrations.Migration): dependencies = [ ('travellifestyleblog22', '0008_alter_category_image'), ] operations =", "2022-04-08 15:01 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('travellifestyleblog22', '0008_alter_category_im...
[ "import keras from tensorflow.keras import layers from tensorflow.keras.datasets import mnist physical_devices = tf.config.list_physical_devices('GPU')", "'relu'), layers.Dense(10) ] ) model.compile( loss= keras.losses.SparseCategoricalCrossentropy(from_logits=True), optimizer=keras.optimizers.Adam(lr=0.001), met...
[ "from django.conf.urls import url import payments.views urlpatterns = [ url(r\"^webhook/$\", payments.views.webhook, name=\"webhook\"), ]" ]
[ "Report equal to 0x03 - Operating Class in AP Channel Report equal to", "r\"got beacon response from STA. mid:\", timeout=10) # Step 8. MAUT sends Beacon", "send Beacon Response to controller.\", self.ieee1905['eMessageType']['BEACON_METRICS_RESPONSE_MESSAGE'], agent.mac, controller.mac) debug(\"Confirming MAUT...
[ "mock_api: todo_id = 0 mock_api.api_delete.return_value = {\"status_code\": 408} mock_api.api_delete.side_effect = ValueError assert_that(mock_api.api_delete).raises(ValueError).when_called_with(todo_id) def", "todo_id, \"deleted_data\": todos[todo_id - 1], \"status_code\": 200} response = mock_api.api_delete(tod...
[ "true if and only if it is a valid mountain array. Recall that", "if and only if: arr.length >= 3 There exists some i with 0", "i break if peak_index == 0: return False for i in range(peak_index, n-1):", "range(n-1): if arr[i] >= arr[i+1]: peak_index = i break if peak_index == 0:", "len(arr) for i in range(...
[ "len(inpl): break else: break if i == len(inpl): break cnt += 1 for", "DNASE score. ''' import sys bed = open(sys.argv[1]) inp = open(sys.argv[2]) out =", "bed.readlines() for i in xrange(len(bedl)): bedl[i] = bedl[i].split() for i in xrange(len(inpl)): inpl[i]", "print('Length of ' + sys.argv[1] + ': ' + str...
[ "ActionContext @dataclasses.dataclass class LambdaAction(Action): delegate: t.Callable[[ActionContext], None] def execute(self, context: ActionContext) -> None:", "dataclasses import typing as t from craftr.core.base import Action, ActionContext @dataclasses.dataclass class LambdaAction(Action):", "import datac...
[ "else: print(\"Returning from cache : \" + cache_key) # Filter Plan def get_price_by_plan_code(self,", "[] addon = Addon() response = self.client.get_from_cache(cache_key) if response is None: list_of_plan_uri =", "result = self.client.send_request(\"GET\", plan_by_plan_code) if type(result) is HTTPError: resul...
[]
[]
[ "projectedTransaction elif self.is_equal(projectedTransaction, previousTransaction): if consecutiveMergeCount == 0: # if the first consecutive", "position2 += 1 return True def sortDatabase(self, transactions): cmp_items = cmp_to_key(self.sort_transaction) transactions.sort(key=cmp_items) def", "+= transaction....
[ "import FitFunction, fit_function from eddington.fit_functions_registry import FitFunctionsRegistry from eddington.fit_result import FitResult from eddington.fit_functions_list", "# Fit functions infrastructure \"FitFunction\", \"fit_function\", \"FitFunctionsRegistry\", # Fit functions \"constant\", \"exponentia...
[ "<reponame>abael/ScrapyCluster<gh_stars>0 ''' Online integration tests ''' import unittest from unittest import TestCase from", "mock import MagicMock import sys from os import path sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) from redis_monitor import", "self.redis_monitor = RedisMonitor...
[ "harness file, %s\" %(harness, e.message)) f.close() tableList = [] if isinstance(harnessModule['tables'], list): tableList.extend(harnessModule['tables'])", "u(a): if PY2: return a.encode(\"utf-8\") return a modes = { 'noContractions': noContractions, 'compbrlAtCursor':", "# i.e. in python2 word and hyphen_mas...
[ "= False for child in expression: graph.parse_tag_expression(child, self) self.parse_text(graph, self.get_tail_from_element(child)) expression_children = True", "self._children] return aiml_manager.nlp.tokenizer.words_to_texts(words) def resolve(self, brain): try: resolved = self.resolve_children_to_string(brain)...
[ "tls._MAX: self.index = tls._MAX if self.index < tls._MIN: self.index = tls._MIN try: self.title.text", "= Image(source=tls.getImageByID(self.index), size_hint=(1, 0.9), nocache=True, allow_stretch=True) background_container.add_widget(self.image) background_container.add_widget(master_layout) self.add_widget(bac...
[ "from PyQt5.QtGui import QTransform from PyQt5.QtCore import QPointF from CarMaintainer import CarMaintainer from", "counter=-1 else: painter.drawEllipse(QPointF(point[0], point[1]),5,5) counter=1 for a_car in CarMaintainer.Inner_Car_List: if a_car.PSUEDO_CAR==False: painter.drawEllipse(a_car.calculate_position()...
[ "len(node2.children) == 1 def test_multi_append(self): node1, node2, node3 = Node(), Node(), Node() node1.children.append(node2,", "== node2 assert node2.parents[0] == node1 assert len(node1.children) == 1 assert len(node2.parents) ==", "color='blue') == node1b1 def test_find_root(self): node1, node1a, node1b, ...
[ "platform import sys if sys.byteorder == \"little\": print(\"Little-endian platform.\") # its an intel,", "import sys if sys.byteorder == \"little\": print(\"Little-endian platform.\") # its an intel, alpha", "a big-endian platform or little-endian platform import sys if sys.byteorder == \"little\": print(\"Lit...
[ "def response(hey_bob): question = hey_bob.rstrip().endswith('?') yell = any(c.isupper() for c in hey_bob) \\", "yell: return \"Whoa, chill out!\" elif question and yell: return \"Calm down, I", "question and yell: return \"Calm down, I know what I'm doing!\" elif nothing:", "hey_bob) \\ and not any(c.islower...
[ "['lock', 'locking', 'singleton', 'process', 'resource', 'exclusive lock'], classifiers = [], platforms='any', install_requires =", "simple Python resource lock to ensure only one process at a time is", "with a particular resource.', author = '<NAME>', author_email = '<EMAIL>', url = 'https://github.com/NateFer...
[ "PotentialSubscriber(models.Model): fio = models.CharField(_('fio'), max_length=256) telephone = models.CharField( max_length=16, verbose_name=_('Telephone'), blank=True, null=True, validators=(RegexValidator(", "max_length=127, blank=True, null=True) house = models.CharField( _('House'), max_length=12, null=True...
[ "repr(tdata)) self.post_checks(tdata, opath) else: # Likewise but without -o <output_path> option. TT.main(args) self.post_checks(tdata)", "self.collector: self.collector.init() def post_checks(self, tdata, *args, **kwargs): \"\"\"Placeholder to do more post checks.", "in self.collector.each_data(): self.run_ma...
[ "str(value)) elif isinstance(value, types.FloatType): valueNode.set(\"constantType\",\"number\") valueNode.set(\"detail\", \"float\") valueNode.set(\"value\", str(value)) elif isinstance(value, types.NoneType): valueNode.set(\"constantType\",\"null\")", "= node if loop_type == \"IF\": cond_node = node.children[0]...
[ "# # PySNMP MIB module MBG-SNMP-ROOT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file://./MBG-SNMP-ROOT-MIB.mib # Produced", "ConstraintsUnion, ValueSizeConstraint, SingleValueConstraint, ValueRangeConstraint, ConstraintsIntersection = mibBuilder.importSymbols(\"ASN1-REFINEMENT\", \"ConstraintsUnion\", \"Value...
[ "# # Licensed under the Apache License, Version 2.0 (the \"License\"); # you", "writing, software # distributed under the License is distributed on an \"AS IS\"", "under the License. # ============================================================================= # TODO: These test look bad/useless - redo", "\...
[]
[ "self.value = value if value else self.value self.contentFilter = \\ contentFilter if contentFilter", "from the my.product add-on located in templates/stickers, and with a filename \"EAN128_default_small.pt\", the", "{'id': <template_id>, 'title': <template_title>} If the template lives outside the bika.lims ad...
[ "at Jisti Meet. \"\"\", \"author\": \"<NAME>\", \"website\": \"https://www.sinerkia.com\", \"depends\": ['base','web','mail'], \"data\": [ 'views/sinerkia_jitsi_meet_views.xml','data/sinerkia_jitsi_meet.xml','data/mail_template.xml','security/ir.model.access.csv','security/base_security.xml',", "coding: utf-8 -*-...
[ "# RIght endpoints integral approximation def right(expr, left_bound, right_bound, delta_x): x = symbols('x')", "mid(expr, left_bound, right_bound, delta_x): x = symbols('x') expression = parse_expr(expr) sum = 0", "type = int(input('Select the type of approximation:\\n \\ 1. Left Endpoints\\n \\ 2.", "delta_...
[ "pode ter os seguintes tamanhos: # 128/192/256 bits - 8bite = 1byte =", "= argparse.ArgumentParser(description=\"hackwareCrypter\") parser.add_argument( '-d', '--decrypt', help='decripta os arquivos [default: no]', action='store_true') return parser", "AES.new(key, AES.MODE_CTR, counter=ctr) if not decrypt: cry...
[ "import migrations, models import django.db.models.deletion import taggit.managers class Migration(migrations.Migration): dependencies = [ (\"taggit\",", "\"0003_taggeditem_add_unique_index\"), (\"accounts\", \"0014_auto_20210314_2305\"), ] operations = [ migrations.CreateModel( name=\"DataCenterLocation\", field...
[ "Find the email address, given the below parameters # Permutates over the possible", "= True) return try_addr else: print(COLOR_RED + \".\" + COLOR_RESET, end = '',", "break domain = correct_for_tld(input(\"Domain: \")) input_list.append((domain, name.split())) prev_domain = \"\" for domain, name_parts", "cor...
[ "range(39): # matriz_do_tabuleiro[(-1)//30][(-1)//30] = # Jogo comeca indo para a direita cabecaXChange =", "1 if not fim_de_jogo and rodada > 1: # Nota: nao muda de", "Game Loop running = True while running: # Setando a Lista de entrada", "esta na cobra macaY = (randint(0,19)*30)+1 macaX = (randint(0,19)*30)...
[ "hiera_data(self, category): res = { 'name': category.name, 'children': [] } sub_categories = category.sub_categories", "fields.Integer() def hiera_data(self, department): res = { 'name': department.name, 'children': [] } categories", "res class CategorySchema(BaseSchema): department_id = fields.Integer() def h...
[ "from flare.i18n import translate from flare import html5 def collectBoneErrors(errorList, currentKey,boneStructure): ''' severity:", "ToDO Field dependency! if isError: thisError = error.copy() thisError[\"fieldPath\"] = error[\"fieldPath\"][1:] boneErrors.append(thisError) return", "\"\\n\", \"<br />\" ) def ...
[ "marty mcfly imports from __future__ import absolute_import # third-party imports from nacelle.core.template.renderers import", "def render_email(template, context=None): \"\"\"Uses Jinja2 to render the email \"\"\" if context is", "\"\"\" # marty mcfly imports from __future__ import absolute_import # third-par...
[ "classes = detection_graph.get_tensor_by_name('detection_classes:0') num_detections = detection_graph.get_tensor_by_name('num_detections:0') # Actual detection. (boxes, scores, classes, num_detections)", "cv2.FONT_HERSHEY_COMPLEX, 1, (0, 0, 0), 2, cv2.LINE_AA) if result == 1: print(\"Blue Cone\")", "scores, cla...
[ "= { 'key' : '0' }, ), ), target = kubernetes.client.models.v2beta2/metric_target.v2beta2.MetricTarget( average_utilization =", "= '0', ), ), external = kubernetes.client.models.v2beta2/external_metric_source.v2beta2.ExternalMetricSource( metric = kubernetes.client.models.v2beta2/metric_identifier.v2beta2.MetricI...
[ "import APITestCase from django.shortcuts import reverse from rest_framework import status from core.models import", "self.assertEqual(res.data['name'], self.product_data['name']) self.assertEqual(res.data['quantity'], self.product_data['quantity']) class TestPurchaseViews(APITestCase): def setUp(self): self.purc...
[ "corresponds to the minimum hamming distance imageLoc = None # result image location", "np.array(rotated_image) # get 2d representation of the rotated image for row in image2d:", "loop thorugh every file in the directory selectedImagePath = os.path.join(directory, imageName) print(\"Checking image", "resultIm...
[ "file, it creates a new file # output_file = open(\"new_pdf_file.pdf\", \"wb\") # pdf_writer.write(output_file)", "PyPDF2.PdfFileReader(pdf_file) print(\"Number of pages in the pdf file:\", pdf_reader.numPages) # 0 based index", "to end but hard to add content to any page # pdf_writer =", "based index grab_a_...
[ "os def file_feature_extraction(dir, filename): ''' Navigates through tokenized words, reconstructs original form by", "x = None punc = '\\',.\\\"?!-;:()' # % left out for now for", "= False if token in punc: # for only punctuation tokens if (token", "pos = len(original_form) - 1 found = True #send for featur...
[ "import sys, os, shutil, subprocess # def storeSourcePath(installdir, simfemsourcedir): # with open(installdir+'/SOURCE_DIR_SIMFEM','w') as", "subprocess # def storeSourcePath(installdir, simfemsourcedir): # with open(installdir+'/SOURCE_DIR_SIMFEM','w') as pathfile: # pathfile.write(simfemsourcedir) #", "# def...
[ "import BaseSearchALS _KWARG_TRANSFORM = 'transform_y' class GridSearchALS(BaseSearchALS): def fit(self, *args, **kwargs): x_df, y_df,", "<gh_stars>0 from sklearn.model_selection import GridSearchCV from sklearn.pipeline import Pipeline from .base_search import BaseSearchALS", "self._make_scorer(transform_y=tra...
[ "x vocab_size bag-of-observation vectors bags = get_bag_vectors(model) flat_bags = tf.sparse.reshape(bags, [model.batch_size * model.max_seq_len,", "bag-of-observation vectors with tf.variable_scope(\"RMLP\"): bags = get_bag_vectors(model) flat_bags = tf.sparse.reshape(bags, [model.batch_size * model.max_seq_len,...
[ "much greater than 100 bytes) out_size = os.path.getsize(self.output_path + '/test_res_R1.trimmed.fastq.gz') self.assertTrue(out_size > 100)", "os.path.dirname(os.path.abspath(__file__)) self.output_path = self.curr_path + \"/data\" self.file_one = self.output_path + \"/all_reads_R1.fq\" self.file_two =", "os.r...
[]
[ "Result(): def __init__(self, path=None): self.path = path def display(self): \"\"\" Displays an image", "self.path: fileInfo = QFileInfo(self.path) path = fileInfo.filePath() baseName = fileInfo.baseName() layer = QgsRasterLayer(path,", "a new created QGIS Layer. \"\"\" # Check if string is provided if", "Qg...
[ "self.__i2cbus.write_i2c_block_data(self.__i2c_addr,self.VL6180X_INTERLEAVED_MODE_ENABLE>>8, [self.VL6180X_INTERLEAVED_MODE_ENABLE,0x01]) ''' @brief Gets the interrupt state of the ranging @return return", "@n VL6180X_LEVEL_HIGH value > thresh_high @n VL6180X_OUT_OF_WINDOW value < thresh_low OR value >", "[self...
[ "free of charge, to any person obtaining a copy ## of this software", "LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ## FITNESS FOR A PARTICULAR PURPOSE AND", "at 2019-3-25 ## ################################################################### ## The MIT License (MIT) ## ## Permission is", "LIABILITY, WHETHER...
[ "engine which contains the logic and order of execution \"\"\" class StagedDeploymentEngine(object): def", "the staged deployment engine which contains the logic and order of execution \"\"\"", "\"\"\" implements the staged deployment engine which contains the logic and order of", "deployment engine which con...
[]
[ "poblacion = 100 elite = 0.1 mutacion = [0.1,0.3,0.5,0.7,0.9] reps = 1000 test", "testeo): while(poblacion <= 1000): for p in mutacion: solucion = optimizar(dominio,poblacion,elite,p,reps,test) #print(\"poblacion: \",", "False) #optimizar(dominio, tam_pobl, porc_elite, prob_mut, reps, testeo): while(poblacion <...
[ "for _ in range(embedded_idxline_count): idxline = self.fh.readline() self.x_embedded_idxlines.append(idxline) xseglen, xsegsum = unpack_idxline(idxline) self.x_overall_len", "= [BlockDir(d) for d in dirnames] def find_block(self, seg_sum): for bd in self.block_dirs:", "xseglen, xsegsum = unpack_idxline(idxline...
[ "pylint: disable=missing-docstring # -1: [too-many-lines] __revision__ = 0 ZERFZAER = 3 HEHEHE =", "# pylint: disable=missing-docstring # -1: [too-many-lines] __revision__ = 0 ZERFZAER = 3 HEHEHE", "disable=missing-docstring # -1: [too-many-lines] __revision__ = 0 ZERFZAER = 3 HEHEHE = 2" ]
[ "class Migration(migrations.Migration): dependencies = [ ('UserProfiles', '0005_auto_20180808_2150'), ] operations = [ migrations.AlterField( model_name='userprofilemodel',", "22:36 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('UserProfiles', '0005_auto_2018080...
[ "[0] yield ret buf2 = list() for b in chunks(buf, 3): i =", "run of 0's if cur != \".\": buf += [run] # iterator to", "l: ret += [b] if len(ret) == n: yield ret ret = list()", "cur = c buf += [run] run = 1 if run > 2", "<< 5 | b[2] << 10 | 1 << 15 buf2 += [i", "return (len(logo[0]), len(logo), buf2) if __...
[ "C: def __init__(self): self.l = range(10) def __getitem__(self, idx): return self.l[idx] def f():", "C() total = 0 for _ in xrange(100000): for i in c: total", "idx): return self.l[idx] def f(): c = C() total = 0 for _", "for _ in xrange(100000): for i in c: total += i print total", "def __getitem__(self, ...
[ "for t in txtwords] if removestopwords: txtwords = _removestopwords(txtwords) if stem: txtwords =", "if len(string.strip(t)) > 0: newtxts.append(t) txts = newtxts if replacehyphenbyspace: txts = [t.replace(\"-\",", "STOPFILE = os.path.join(os.path.abspath(os.path.dirname(os.path.realpath(__file__))), \"english....
[ "name self.description = description self.status = status def __repr__(self): return self.name def __eq__(self,", "description self.status = status def __repr__(self): return self.name def __eq__(self, other): return self.name", "return self.name def __eq__(self, other): return self.name == other.name def key(s...
[ "Exception('output_dir is not a directory') user_pool = collections.defaultdict( lambda: collections.defaultdict( lambda: collections.defaultdict(list)) )", "import os def main(): arg_parser = argparse.ArgumentParser() arg_parser.add_argument('input_dump', type=argparse.FileType('r')) arg_parser.add_argument('out...
[ "epochs_filt = mne.Epochs(raw, events=events, event_id=event_id, tmin=tmin,tmax=tmax, proj=None,baseline=None, reject=None, picks=picks_eeg) Data4detect = epochs4Detect.get_data() Data2Correct", "VEOG cutoff = 5 # Makoto preprocessing says best between 10 and 20", "matplotlib.pyplot as plt from mne.viz import p...
[ "'prd': Production, 'test': Test } if not enviroment: enviroment = os.environ.get('MEDIAPP_BE_API_ENV', 'dev') return", "# from .production import Production # from .test import Test def get_configs(enviroment=None): from", "Development # from .production import Production # from .test import Test def get_confi...
[ "creation_date=environment.creation_date, params=dumps(environment.params)) class SRuntimeInstance(Base, Attaching): __tablename__ = 'instances' id = Column(Integer, primary_key=True, autoincrement=True)", "# pragma: no cover @abstractmethod def to_obj(self) -> T: pass # pragma: no", "Column(DateTime, unique=Fa...
[ "A_vh=0, A_vv=235.2, delta_h=2) >>> print(annex_b_equivalent_time_of_fire_exposure(**kwargs)) >>> 74.27814882871894 \"\"\" # B.1 # Design fire", "k_b, A_f, H, A_vh, A_vv, delta_h ): \"\"\"Calculates time equivalence of standard fire", "A.5 - Heat release rate per unit area of fire for different occupancies", ...
[ "save model parameters (c). Testing stage: test the model on ADNI_test, NACC, FHS", "if transform == None: no augmentation for more details, see Augment class \"\"\"", "with demographic and diagnosis information \"\"\" def __init__(self, Data_dir, exp_idx, stage, seed=1000): random.seed(seed)", "import torch ...
[ "compute min and max of Y min = int(np.min(Y)) max = int(np.max(Y)) #", "''' Check contrast of given images using RMS or Michelson method path :", "using RMS or Michelson method path : str path of given image method", "as np from skimage.exposure import is_low_contrast import matplotlib.pyplot as plt def chec...
[ "index에 있는지를 확인. voc_vectors.append(voc_vector) self.inform['voc_vectors'] = voc_vectors # word_vector >> 입력받은 문장들을 단어별로", "찾아내기 위해, 변환을 해준다. #WI = WI.replace(\"she's\",'she is') # be동사를 찾아내기 위해, 변환을", "위해, 변환을 해준다. #WI = WI.replace(\"you'll\",'you will') # 조동사를 찾아내기 위해, 변환을 해준다.", "조동사를 찾아내기 위해, 변환을 해준다. #WI...
[ "correct number of functions\" ) panels_tested += 1 self.assertEqual(2, panels_tested, \"Copied scoredisplay didn't", "same name for user more than once\" ) self.assertEqual( len(copy.scorepanel_set.all()), len(self.display.scorepanel_set.all()), \"Copied scoredisplay", "\"Copied scoredisplay has wrong number o...
[ "dependency information can be accessed at sentence level print(' ID TEXT DEP HEAD", "HOME directory on linux/macos, no idea where it does it on windows. STANZA_DOWNLOAD_DIR", "the previous pattern; # * `.` means any (single) character. # # https://www.nltk.org/book/ch07.html", "`BB-rel-14633026.txt` from the...
[ "input=sys.stdin.readline for _ in range(int(input())): n, *scores = map(int, input().split()) average = sum(scores)", "= map(int, input().split()) average = sum(scores) / len(scores) answer = len(list(filter(lambda x: x", "sum(scores) / len(scores) answer = len(list(filter(lambda x: x > average, scores))) / le...
[ "colorSortingLine, temperatureSortingLine, voltageSortingLine, temperatureMainUnit, voltageMainUnit, \\ monitorSortingLine, monitorMainUnit json_Dict = json.loads(data) if topic", "json_Dict['Voltage'] monitorMainUnit = True elif topic == \"Monitor/SortingLine\": colorSortingLine = json_Dict['Color'] temperatureS...
[ "- 1) + fib(num - 2) print '\\nPrep for Question 4 follows...' j", "Incrementer(0) fib(8) print 'when n is 8:', j.count # Question 5 def memoized_fib(num,", "else: next_cat = get_next_cat(helper_cat) print helper_cat + \": I'll have\", next_cat, \"clean up!\"", "print 'when n is 5:', j.count j = Incrementer(0...
[ "= os.stat(file_path).st_size ser.write(file_size.to_bytes(4, byteorder=\"big\")) print(\"Sending kernel...\") with open(file_path, 'rb', buffering = 0) as", "parser.parse_args() try: ser = serial.Serial(args.device,115200) except: print(\"Serial init failed!\") exit(1) file_path = args.image", "= args.image fi...
[ "False } ] def buttonPressed(button, num): global trimUp # num is 0 or", "'RB': trimUp['center'] -= 1 def process(data): joysticks = json.loads(data) assert len(joysticks) == 24", "assert len(joysticks) == 24 joystick1 = dict(zip(axis + buttons, joysticks[:12])) joystick2 = dict(zip(axis", "1'.format(v)) else...
[ "flask import Flask from flask import jsonify from flask import request from tensorflow", "def predict(): data = request.json df = tfdf.keras.pd_dataframe_to_tf_dataset(pd.DataFrame(data, index=[0])) prediction = model.predict(df) return", "= tfdf.keras.pd_dataframe_to_tf_dataset(pd.DataFrame(data)) predictions...
[ "conn: AsyncNetworkDriver object Returns: None Raises: N/A \"\"\" await conn.acquire_priv(desired_priv=conn.default_desired_privilege_level) await conn.send_command(command=\"environment cli-engine", "conn.send_command(command=\"environment cli-engine type basic\") await conn.send_command(command=\"environment co...
[ "\"\" def write(self, command, buffering=False): self.message += command + '\\n' if not buffering:", "not self.windows: self.pipe.close() try: os.unlink(self.path) except Exception: pass self.message = \"\" def flush(self):", "y are in [0, 1], with 0.5 as neutral.\"\"\" #assert stick in Stick", "1 self.write(...
[ "window = Tk() window.title(\"Special Midterm Exam in OOP\") window.geometry(\"300x200+20+10\") def changecolor(): button.configure(bg=\"yellow\") button", "tkinter import * window = Tk() window.title(\"Special Midterm Exam in OOP\") window.geometry(\"300x200+20+10\") def", "Tk() window.title(\"Special Midterm ...
[ "return setattr(self._apm_wrap_conn, key, value) @staticmethod def get_host_info(method_info, conn_kwargs): host_info = {} if constants.host", "def __init__(self, conn, comp, host_info): self._apm_wrap_conn = conn self._apm_comp_name = comp self._apm_host_info =", "in ['_apm_wrap_cursor', '_apm_wrap_conn', 'exe...
[ "ReactiveQPController from casclik.controllers.reactive_nlp import ReactiveNLPController from casclik.controllers.pseudo_inverse import PseudoInverseController from casclik.controllers.model_predictive import ModelPredictiveController", "import ReactiveQPController from casclik.controllers.reactive_nlp import Rea...
[ "import ( PipelineResult, ResultState, PipelineElement, ) from ..utils import check_dataset logger = logging.getLogger(\"datalad.metadata.processor.autoget\")", "locally available. It sets a flag in the element that will allow the", "annexed and not locally available. It sets a flag in the element that", "tha...
[ "string_utf) # unicode string string = 'pythön!' # print string print('The string is:',", "string) # ignore error print('The encoded version (with ignore) is:', string.encode(\"ascii\", \"ignore\")) #", "encoded version is:', string_utf) # unicode string string = 'pythön!' # print string", "to utf-8 string_ut...
[ "<gh_stars>10-100 class Solution: def plusOne(self, digits): \"\"\" :type digits: List[int] :rtype: List[int] \"\"\"", "- 1, -1, -1): if result[i] == 9: result[i] = 0 if i", "Solution: def plusOne(self, digits): \"\"\" :type digits: List[int] :rtype: List[int] \"\"\" result =", "0 if i == 0: result.insert(0, ...
[]
[ "# noqa import os import unittest mock = unittest.mock.Mock() master_copnfig = 'etc/weatherman.yml' with", "yaml.load(ycf, Loader=yaml.FullLoader) environment = os.environ.get('ENVIRONMENT') @pytest.fixture(scope=\"function\") def setup_wb(): wb = weather_butler.WeatherButler('db/weatherman_unit') return wb", "...
[ "== \"__main__\": Text = sys.stdin.read().rstrip() suffix_array = SuffixArray(Text) print(', '.join(str(x) for x in", "SuffixArray(Text). ''' suffixes = [] suffix_array = [] for i in range(len(Text)): suffixes.append(Text[i:])", "Output: SuffixArray(Text). ''' suffixes = [] suffix_array = [] for i in range(len(...
[ "minerl import gym import logging logging.basicConfig(level=logging.DEBUG) env = gym.make('MineRLNavigateDense-v0') print('v') obs = env.reset()", "gym import logging logging.basicConfig(level=logging.DEBUG) env = gym.make('MineRLNavigateDense-v0') print('v') obs = env.reset() done =", "= False net_reward = 0 w...
[]
[]