ngram
listlengths
0
67.8k
[ "is b64ecoded for ease of CLI transfer. Argparse will usually barf when trying", "stdin/out, we have to be able to differentiate what's coming from gooey and", "\"\"\" data = json.loads(stdout.decode(encoding).split(prefix)[-1]) return validate_public_state(data) def decode_payload(x): \"\"\" To avoid quoting s...
[ "+ (1, 1) matrix = np.zeros(shape, dtype=int) for cell, _ in np.ndenumerate(matrix): #", "5), (8, 9)]))) print(part1(np.loadtxt(r\"../assets/day6.txt\", delimiter=',', dtype=int))) print(part2(np.array([(1, 1), (1, 6), (8, 3), (3,", "it is unique mins = np.argwhere(dists == np.amin(dists)) if len(mins) == 1: ma...
[ "vec, direction, result @parametrize_with_cases( argnames=[\"vec\", \"distance\", \"direction\"], cases=\".\", has_tag=CLOSEST_DIRECTION ) def test_closest_direction(vec, distance,", "@case(tags=[CLOSEST_DIRECTION]) def case_closest_direction_down_direction(): vec = Direction.DOWN.to_array() distance = 1 directio...
[ "True: raise ValidationError('Validation Message') class UpdateClient(FlaskForm): class Meta: csrf = False estado_civil =", "= PasswordField('Password', validators=[DataRequired()]) remember = BooleanField('Remember Me') submit = SubmitField('Log in') def validate_field(self,", "num_interior = IntegerField('Núm...
[ "[ { \"target_name\": \"hashermtp\", \"sources\": [ \"src/argon2ref/argon2.c\", \"src/argon2ref/blake2ba.c\", \"src/argon2ref/core.c\", \"src/argon2ref/encoding.c\", \"src/argon2ref/ref.c\", \"src/argon2ref/thread.c\", \"src/merkletree/merkle-tree.cpp\",", "\"hashermtp.cc\" ], \"include_dirs\": [ \".\", \"src\", ...
[ "return ids def search_metabolites_by_name_mass(metabolite_name, metabolite_mass, equal_mass_tolerance_percent = 0.001): TOLERATED_ERROR = metabolite_mass * equal_mass_tolerance_percent", "in info_titles} for title in info_titles: th = request_result.find(\"th\", string=title) if(th != None):", "metabolite_mass...
[ "2020-04-15 07:47 from django.db import migrations class Migration(migrations.Migration): dependencies = [ (\"news\", \"0012_auto_20200409_1452\"),", "by Django 3.0.4 on 2020-04-15 07:47 from django.db import migrations class Migration(migrations.Migration): dependencies", "from django.db import migrations clas...
[ "HTTP status {exception}'.format( exception=e)) def fetch_customer_info_touchpoints(self, client_id): \"\"\" Retrieves the touchpoints information about", "= api_key self._api_secret = api_secret self.RequestException = RequestException \"\"\" General methods \"\"\" @staticmethod", "status {exception}'.format( ...
[ "import setup setup( name=\"google-doc\", version=\"0.1\", description=\"Manipulating files pragmatically\", url=\"https://github.com/ribeirogab/google-doc\", author=\"<NAME>\", author_email=\"<EMAIL>\", license=\"MIT\", packages=[\"app\"],", "setup( name=\"google-doc\", version=\"0.1\", description=\"Manipulatin...
[ "= temp[1] if temp[1] < men: men = temp[1] princ.append(temp[:]) temp.clear() resp =", "todo você cadastrou {len(princ)} pessoas.') print(f'O maior peso foi {mai}Kg de', end='') for", "if len(princ) == 0: mai = men = temp[1] else: if temp[1] >", "mai = men = 0 while True: temp.append(str(input('nome: '))) tem...
[]
[ "= [ ('core', '0032_auto_20190729_1249'), ] operations = [ migrations.AddField( model_name='ocrmodel', name='job', field=models.PositiveSmallIntegerField(choices=[(1, 'Segment'),", "'0032_auto_20190729_1249'), ] operations = [ migrations.AddField( model_name='ocrmodel', name='job', field=models.PositiveSmallInteg...
[ "<reponame>The-Animals/data-pipeline from __future__ import absolute_import from .minio_client import MinioClient from .mysql_client import MySqlClient", ".minio_client import MinioClient from .mysql_client import MySqlClient from .utils import get_config from .schema", "absolute_import from .minio_client impor...
[ "style_guide = flake8.get_style_guide(ignore=ignored_errors, excluded=excluded_files, max_line_length=line_length) report = style_guide.check_files('solution.py') if report.get_statistics('E'): print('Код не соответствует", "flake8 import sys if __name__ == '__main__': ignored_errors = ['W', 'E126'] excluded_file...
[ "self.level = level def manhattan_distance(self, x: Node, y: Node) -> int: x_coords =", "<gh_stars>0 from .level import Level from .graph.interface import Node class ManhattanDistanceHeuristic(): def __init__(self,", "Level): self.level = level def manhattan_distance(self, x: Node, y: Node) -> int: x_coords", ...
[ "auth) request.endheaders() if body: Console.info(\"Sending data (%s bytes)...\" % len(body)) else: Console.info(\"Sending request...\")", "request to %s...\" % (method, url)) parsed = urllib.parse.urlparse(url) if parsed.scheme == \"http\":", "# Encode and join all lines as ascii bytelines = [line if isinstanc...
[ "if args.with_shoutout and since_date: previous_authors = get_author_log(until=since_date, handles=False, count=False) new_authors = get_author_log(since=since_date, handles=False,", "\"<NAME>\": None, \"<NAME>\": \"chris-durand\", \"<NAME>\": \"daniel-k\", \"<NAME>\": \"dhebbeker\", \"<NAME>\": \"dergraaf\", \"<...
[ "<filename>twiml/voice/pay/pay-tokenize-connector/pay-tokenize-connector.6.x.py<gh_stars>0 from twilio.twiml.voice_response import Pay, VoiceResponse response = VoiceResponse() response.pay(charge_amount='0', payment_connector='My_Pay_Connector', action='https://your-callback-function-url.com/pay') print(response)"...
[ "1 AND 2 CODE class Point(): def __init__(self, x, y): self.x, self.y =", "other): return (self.x == other.x) and (self.y == other.y) def __hash__(self): return hash((self.x,", "= [] with open('input_roman.txt', 'r') as f: for line in f: my_input.append(line.strip('\\n')) #%%", "def fold_paper(self, fold): if...
[ "@pytest.mark.parametrize( \"code,expected\", [ (\"DOESNT EXIST\", set()), (\"A\", set()), (\"14112\", {(Standards.ISIC4, \"1410\")}), ], )", "from pyisic.types import Standards @pytest.mark.parametrize( \"code,expected\", [ (\"DOESNT EXIST\", set()), (\"A\", set()), (\"14112\",", "set()), (\"A\", set()), (\"14...
[ "msg['Text']) if res: itchat.send(('fine thanks'), msg['FromUserName']) else: itchat.send(('are you ok?'), msg['FromUserName']) @itchat.msg_register([PICTURE, RECORDING,", "re import time import itchat from itchat.content import * # itchat: https://itchat.readthedocs.io/zh/latest/ def", "main(): LogIn() def Log...
[ "unittest import TestCase, main from ko_pron import romanise def mr_romanize(word): return romanise(word, \"mr\")", "from unittest import TestCase, main from ko_pron import romanise def mr_romanize(word): return romanise(word,", "TestCase, main from ko_pron import romanise def mr_romanize(word): return romanise...
[ "sim.data[error_p], c='b') plt.ylim(-1, 1) plt.legend((\"Error\",), loc='best'); # ## Examine the initial output #", "would need to construct an input # signal that evenly samples the space.", "the element-wise square, # the product is a nonlinear function on multiple inputs.", "label='Actual product') plt.pl...
[ "import terrascript.provider.hashicorp.hashicups def test_resource_import(): from terrascript.resource.hashicorp.hashicups import hashicups_order def test_datasource_import(): from terrascript.data.hashicorp.hashicups import", "generated by tools/makecode.py (24-Sep-2021 15:18:02 UTC) def test_provider_import(): ...
[ "Simulates the operations of the Memory Management Unit Page Table. ''' def __init__(self):", "all pages currently in memory or on the disk ''' memory_output = '\\n\\tPages", "print all pages currently in memory or on the disk ''' memory_output =", "except: import page from collections import OrderedDict # Di...
[ "from enum import Enum import libkol from ..util import parsing from .clan_rumpus import", ".clan_rumpus import Furniture from .request import Request class MeatFurniture(Enum): Orchid = Furniture.MeatOrchid Tree", "Furniture.MeatOrchid Tree = Furniture.MeatTree Bush = Furniture.MeatBush class clan_rumpus_meat(...
[ "with 'aws configure') import boto3 from botocore.exceptions import ClientError def getFirstInstanceID(ec2): # Get", "(configured with 'aws configure') import boto3 from botocore.exceptions import ClientError def getFirstInstanceID(ec2): #", "Get all EC2 instances all_instances = ec2.describe_instances() # Sele...
[ "def __init__(self, chapters: list): self.chapters: list = chapters self.chapterIndex: int = 0 def", "len(self.currentBranch.dialogsList) class StoryManager: def __init__(self, chapters: list): self.chapters: list = chapters self.chapterIndex: int", "0 def getNow(self) -> Dialog: return self.chapters[self.chapt...
[ "from riscv_isac.plugins.specification import * import riscv_isac.plugins as plugins def interface (trace, arch, mode):", "= pluggy.PluginManager(\"decoder\") parser_pm.add_hookspecs(ParserSpec) decoder_pm.add_hookspecs(DecoderSpec) parserfile = importlib.import_module(\"riscv_isac.plugins.\"+mode) parserclass = ...
[ "by Django 3.0.2 on 2020-02-15 16:10 from django.db import migrations, models class Migration(migrations.Migration):", "models class Migration(migrations.Migration): dependencies = [ ('BasicApp', '0008_auto_20200215_1605'), ] operations = [ migrations.AlterField(", "from django.db import migrations, models clas...
[ "import status from profiles_api import serializers class HelloApiView(APIView): \"\"\"Test the Api view\"\"\" serializers_class", "traditional django view'] return Response({'message': 'hello', 'an_apiview': an_apiview}) def post(self, request): \"\"\" Create", "a traditional django view'] return Response({'me...
[ "Disable IPv6 PMTU processing; \\\"enable\\\": Enable IPv6 PMTU processing; \", \"format\": \"enum\", \"default\":", "from a10sdk.common.A10BaseClass import A10BaseClass class Pmtu(A10BaseClass): \"\"\"Class Description:: Configure Path MTU option. Class", "\"maximum\": 900, \"minimum\": 120, \"optional\": true...
[ "= 0): self.ra_readers[index[start_idx]].remove_value(index, start_idx + 1) def ground_location_mut(self, loc: Location, start_idx: int =", "start_idx + 1) def ground_location_mut(self, loc: Location, start_idx: int = 0) -> None:", "List[Union[str, int]], value: Any, start_idx: int = 0): self.ra_readers[index[s...
[ "@author: nilson.nieto ''' import time, datetime # Using Epoch print(time.ctime(time.time())) print('Current day') print(datetime.datetime.today())", "''' Created on Nov 14, 2018 @author: nilson.nieto ''' import time, datetime #", "Created on Nov 14, 2018 @author: nilson.nieto ''' import time, datetime # Using"...
[ "4 - Part One from aoc.day04.game import Game def result(raw_bingo_game: list[str]): game =", "of Code - Day 4 - Part One from aoc.day04.game import Game def", "Part One from aoc.day04.game import Game def result(raw_bingo_game: list[str]): game = Game(raw_bingo_game) game.perform()", "<filename>aoc/day04/par...
[ "= context.pop(\"fields\", None) # Instantiate the superclass normally super(TradeSerializer, self).__init__(*args, **kwargs) if fields:", "list\"\"\" fields = None context = kwargs.get(\"context\") if context: # Don not pass", "Regulate what goes over the wire for a `Trade` resource. \"\"\" class Meta:", "wh...
[ "step produces self.accepts_params = {} self._acceptParameter(\"id\",\"an identifier for this step\",False) self._acceptParameter(\"requires\",\"list of additional", "by queuing copies step.input_queue.put(copy.deepcopy(data)) def _logName(self): return self.__module__ + \".\" + self.__class__.__name__ def", "t...
[ "= userName) itchat.send_image(\"breaker.jpg\", toUserName = userName) print('Success') def send_move_save(): users = itchat.search_friends(name =", "= True send_move_danger() is_break_in = True elif((not os.path.isfile(\"./breaker.jpg\")) and is_break_in): send_move_save() is_break_in =", "are safe!\", toUserN...
[ "from src.config import Config config = Config() dfs = [] for cloth in", "import Config config = Config() dfs = [] for cloth in ['blouse', 'skirt',", "= Config() dfs = [] for cloth in ['blouse', 'skirt', 'outwear', 'dress', 'trousers']:", "'dress', 'trousers']: df = pd.read_csv(config.proj_path + 'kp_predicti...
[ "classes[class_key] new_centroids = np.mean(class_data, axis = 0) centroids[class_key] = list(new_centroids) return classes, centroids", "import random #Reading the dataset iris = pd.read_csv('https://raw.githubusercontent.com/Piyush9323/NaiveBayes_in_Python/main/iris.csv') #iris.head() iris.tail() iris.describe(...
[ "matches expectations for name in utils.__all__: assert name in local return # /def", "for name in decorators.__all__: assert hasattr(decorators, name) # test __all__ matches expectations for", "name in data_utils.__all__: assert hasattr(data_utils, name) # test __all__ matches expectations for name", "\"xmat...
[ "|_| |_| .__/|_|_|_| |_|\\__, | # | | __/ | # |_| |___/", "for x in frodo_indexes] correct_labels = [0] * len(frodo_indexes) correct_names.extend([str(Path('data_root', 'sam', f'sm_{x}.png')) for", "file_name, data in dir_struct: dir_path = Path(root_dir) / dir_name dir_path.mkdir() csv_path = dir_path", "f'f...
[ "= box_info[4:] word = \",\".join(word) box = [ [box[0], box[1]], [box[2], box[1]], [box[2],", "import numpy as np import torch from torch.autograd import Variable from utils.craft_utils import", "# NOTE score_text = score_text[: size_heatmap[0], : size_heatmap[1]] score_link = score_link[: size_heatmap[0], :",...
[ "time import time from telemetry_datastore import Datastore def data_push_to_cloud(data_points): last_id = 0 for", "__name__ == '__main__': start_time = time() total = 0 index = 0 batch_size", "+ 1 total += len(values) else: break elapsed = time() - start_time print(\"{}", "1000 with Datastore(\"/tmp/telemetr...
[ "logging... :return: \"\"\" msg = '' for i in argv: msg += i", ":param alpha should be a float in [0,1] :param base should be a", "iterable, elements in [0,255] :param alpha should be a float in [0,1] :param", "offset: offset for world :return: part of world \"\"\" result = [] offset_before", "offset_before...
[ "else: return t if i is 1: many__2 = [t[0], v__2] append =", "v in iterator: i += 1 append(v.mutate(vary, (last_priority if i is maximum_i_m1 else", "first_priority maximum_i_m1 = length(t) - 1 v = next_method(iterator)() v__2 = v.mutate(vary, first_priority)", "many__2.append else: many__2 = List(t[:i]) appe...
[ "utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from .models import", "-*- from __future__ import unicode_literals from django.contrib import admin from .models import *", "coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from .models...
[ "views.InvoiceItemDetailView.as_view(), name='purchase_invoiceitem_detail'), path('purchase/invoiceitem/update/<int:pk>/', views.InvoiceItemUpdateView.as_view(), name='purchase_invoiceitem_update'), ) urlpatterns += ( # urls for Payment", "path('purchase/invoice/update/<slug:slug>/', views.InvoiceUpdateView.as_vi...
[ "= one(admin_client.list_task, name='agent.ping') ping.execute() def callback(): processes = process_instances(admin_client, c, type='instance') if 'instance.stop'", "instanceTriggeredStop='stop', data={'simForgetImmediately': True}) c = admin_client.wait_success(c) ping = one(admin_client.list_task, name='agent....
[ "def mda_msd (trajectory, atom_sel_list, lateral=False, plane=\"xy\", unwrap=True, verbose=False): dim=3 plane_index = [0,1,2] if", "mean square displacement (MSD) and diffusion constant of a list of MDAnalysis atom", "unwraps all the coordinates if unwrap: if verbose: print(\"unwrapping frame \",ts.frame) curr...
[ "<filename>mokocchi/tomoko/repaint/__init__.py def int_to_pixel(n): return (int(n & 0xff0000) >> 16, int(n & 0x00ff00) >>", "(int(n & 0xff0000) >> 16, int(n & 0x00ff00) >> 8, int(n & 0x0000ff))", "int_to_pixel(n): return (int(n & 0xff0000) >> 16, int(n & 0x00ff00) >> 8, int(n", "16, int(n & 0x00ff00) >> 8, in...
[ "'ffs': ['http://man7.org/linux/man-pages/man3/ffs.3.html', 'http://man7.org/linux/man-pages/man3/ffs.3p.html'], 'ffsl': ['http://man7.org/linux/man-pages/man3/ffsl.3.html'], 'ffsll': ['http://man7.org/linux/man-pages/man3/ffsll.3.html'], 'fg': ['http://man7.org/linux/man-pages/man1/fg.1p.html'], 'fgconsole': ['htt...
[ "to be #drawn. In this case, it is red. cv2.line(img,(x1,y1), (x2,y2), (0,0,255),2) #", "r and theta values # are in the range of the 2d array", "# cv2.line draws a line in img from the point(x1,y1) to (x2,y2). #", "assumes color image # run tesseract, returning the bounding boxes boxes = pytesseract.image_to...
[ "resource path. Currently using ' + self.configManager.get_resource_path() + ': ') if value !=", "Hotkey 4. Add Hotkey 5. Exit ''' print(menu) while self.state == 0: self.state", "+ ': ') if value != '': self.configManager.set_resource_path(value) #List currently used hotkeys def", "= 0 #Ensure valid menu sel...
[ "type=int) def main(): tornado.options.parse_command_line() application = tornado.web.Application(mappings) application.listen(options.port) tornado.ioloop.IOLoop.current().start() if __name__ == \"__main__\":", "under the terms of the Apache License, Version 2.0 # which accompanies this", "Co.,Ltd and others. ...
[ "str(user) else: record.user = \"anonymous\" else: record.user = \"-\" if has_request_context(): record.url =", "request from flask_login import current_user as user import logging class MyFormatter(logging.Formatter): # test:", "-> None: super().__init__(fmt=fmt, style=style) def format(self, record): if user:...
[ "amazon with warnings.catch_warnings(record=True) as w: drop_table( name=\"public.amazon\", cursor=base.cursor, ) class TestvDFStatsTools: def test_adfuller(self,", "KIND, either express or implied. # See the License for the specific language", "Unless required by applicable law or agreed to in writing, softwar...
[ "widgets class ButtonWithValue(widgets.Button): def __init__(self, *args, **kwargs): self.value = kwargs['value'] kwargs.pop('value', None) super(ButtonWithValue,", "ipywidgets as widgets class ButtonWithValue(widgets.Button): def __init__(self, *args, **kwargs): self.value = kwargs['value'] kwargs.pop('value',",...
[ "(i,memory_info.total/1024/1024)) print(\"Device %s: Free memory: %s\" % (i,memory_info.free/1024/1024)) print(\"Device %s: Used memory: %s\"", "(C) 2011 Ion Torrent Systems, Inc. All Rights Reserved from pynvml import *", "Inc. All Rights Reserved from pynvml import * nvmlInit() print(\"Driver Version: %s\" %"...
[ "== '__main__': directory = Path('records') directory.mkdir(exist_ok=True, parents=True) for file in Path('./').glob('*.csv'): df =", "if __name__ == '__main__': directory = Path('records') directory.mkdir(exist_ok=True, parents=True) for file in Path('./').glob('*.csv'):", "pandas as pd import argparse if __na...
[ "noqa: F401 cats = {} def _read_py_hier(name) -> HierarchicalCategorization: mod = importlib.import_module(f\".data.{name}\", package=\"climate_categories\")", "noqa: F401 from ._categories import HierarchicalCategorization from ._conversions import Conversion, ConversionRule # noqa:", "= importlib.import_modul...
[ "Fudge=False,OneSided=True,Tax=None,Steps=None): #check that the frequencies exist if we are using LS #if Freq", "= Spectrogram(t,vz,wind,slip,Freq,Method,WindowFunction,Param,Detrend,FindGaps,GoodData,Quiet=True,Threshold=Threshold,Fudge=Fudge,OneSided=OneSided,Tax=Tax,Steps=Steps) Nf = F.size - 1 #need to calcu...
[ "print(\"Command was successfully executed at \", time) print((\"=\")*55) print() output = net_connect.send_command(\"show lldp", "import datetime device = { \"host\": \"nxos1.lasthop.io\", \"username\": \"pyclass\", \"password\": getpass(), \"device_type\": \"cisco_nxos\",", "time = now.strftime(\"%m/%d/%Y, %H...
[ "data: np.array, metadata: json = {}) -> None: # need to check shape", "self._histogram @property def name(self): return self._name @name.setter def name(self, val): self._name = val", "@property def y_high_edge(self): return self._y_high_edge @y_high_edge.setter def y_high_edge(self, val): self._y_high_edge = ...
[ "None: # Sanity-check model output. if os.path.exists('{0}.log'.format(output_path)): logging.error('Model output already exists.') raise IOError()", "model output. if os.path.exists('{0}.log'.format(output_path)): logging.error('Model output already exists.') raise IOError() # Output to", "' '[%(name)s] [%(lev...
[ "> max_instances: self.instances = self.instances[:max_instances] def index_instances(self, vocab: Vocabulary): \"\"\" Converts all ``UnindexedFields``", "actually padding instances to length: %s\", str(lengths_to_use)) for instance in self.instances: for field,", "for instance in tqdm.tqdm(self.instances): ins...
[ "print(filepath, '...') name = os.path.basename(filepath) template = env.get_template(name) output = template.render() output_path =", "== \"__main__\": handler = Handler() handler.build_project() observer = Observer() for directory in ['examples',", "'templates', 'static']: observer.schedule(handler, directory...
[ "--- parameters: - in: path name: keyword description: prefix or full email required:", "required: true schema: type: string responses: 200: description: Record for the person with", "code default: \"success\" group: schema: id: GroupExtended properties: id: type: number name: type:", "responses as resp from ...
[ "requests.get(f'{ARTAI_GEN_ENDPOINT_URL}/jobs', json={ \"limit\": 1, \"completed\": False, }) response.raise_for_status() data = response.json() if len(data)", "if len(data) == 0: log.info(\"Job's done, waiting...\") time.sleep(2) continue job = data[0] id", "import os import time import subprocess import loggi...
[ "..model import RequiredFunctions from . import ValidationError def _empty_function(): pass class ModelValidator: empty_function_bytecode", "file_path: Path to file Returns: :class:`~model_loader.ValidationError` if validation fails, otherwise `None` \"\"\" mypy_result", "not found.'.format(name)) return None d...
[ "(n,s)) y = T.times(x) y_ref = x[I, :] assert_array_equal(y_ref, y) y2 = T.trans(y)", "lop.restriction(n, I, axis=0) x = random.normal(cnb.KEYS[i], (n,s)) y = T.times(x) y_ref = x[I,", "jnp.zeros_like(x).at[index].set(x[index]) assert lop.dot_test_real(keys[0], T) assert_allclose(T.trans(T.times(x)), y) assert ...
[ "storage: file storage_location: ./storage/twitter.data welcome_message: Thanks for following me \"\"\", ConsoleConfiguration(), \".\") twitter_config", "following me \"\"\", ConsoleConfiguration(), \".\") twitter_config = TwitterConfiguration() twitter_config.load_configuration(yaml, \".\") self.assertEqual(59, ...
[ "Integration Patterns, in specific Messaging Endpoints. \"\"\" @abstract_attribute def exchange(self): pass @abstract_attribute def", "Patterns, in specific Messaging Endpoints. \"\"\" @abstract_attribute def exchange(self): pass @abstract_attribute def queue(self):", "Endpoints. \"\"\" @abstract_attribute def ...
[ "force: shutil.copyfile(from_, to) logger.info(\"Copied {} file to {} file\", from_, to) else: logger.info(\"File", "os.path.join(web_dir, \"app\") conf_dir = os.path.join(web_dir, \"app\", \"conf\") create_directory(conf_dir) copy_file(os.path.join(\"resources\", \"server.pem\"), os.path.join(hostdata_dir, \"ser...
[ "= \"Copyright 2019 <NAME>\" __license__ = \"Apache License 2.0, http://www.apache.org/licenses/LICENSE-2.0\" __date__ = \"2019/12/19\"", "## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ##", "## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0...
[ "testing set minsit_test_set = data[ dt_count/2 : -1] minsit_test_set_lenght = len(minsit_test_set) minsit_test_set_target =", "MINSIT Dataset # ------------------------------------------------------------------------------ # load minsit dataset minsit = datasets.load_digits() dt_count =", "# load minsit datase...
[ "to the db db.insertEntry(\"reviews\", review_to_store) # Try to retrieve the record we just", "project to our path in order to import db_store dir_of_executable = os.path.dirname(__file__) path_to_project_root", "customer.\", \"rating\": 10} # Use the insert operation to add it to the", "markup; API document...
[ "import tornado.options import tornado.template import ResponseObject import traceback class BaseHandler(tornado.web.RequestHandler): def __init__(self, *args,", "as reason: print reason, traceback.format_exc() def write_response(self): try: self.write(self.response.response) except Exception as reason:", "impo...
[ "will be calculated # No jobs to be run in parallel model =", "score print(\"Model score: \", model.score(housing_data_input, housing_data_output)) # Linear coefficient # print(model.coef_) # Intercept", "will be copied # Intercept will be calculated # No jobs to be", "PolynomialFeatures(2, interaction_only=F...
[]
[ "from artifice.scraper.supervisor import Supervisor log = logging.getLogger(__name__) class MetricsResource(Resource): @staticmethod def queue_metrics(): return", "Redis values and uptime. ''' q = self.queue_metrics() c = self.content_metrics() database =", "ready) / done except ZeroDivisionError: ratio = 0 ret...
[ "should implement fit and predict\" \"'%s' (type %s) doesn't\" % (estimator, type(estimator)) )", "type(t)) ) if ( estimator is not None and not hasattr(estimator, \"fit\") and", "import LoadElectricDataSets from sklearn.preprocessing import StandardScaler from spinesTS.nn import TCN1D X_train, X_test, y_train,...
[ "leia nome, ano de nascimento e carteira de trabalho e cadastre-o (com idade)", "65-idade else: cadastro[\"CTPS\"] = \"NÃO POSSUI!\" print(\"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\") print() for k, v in cadastro.items():", "de nascimento (ex.2002): \")) idade = (date.today().year)-ano_nascimento ...
[ "= kwargs.get('output', float()) def __repr__(self): typename = self.__class__.__module__.split('.') typename.pop() typename.append(self.__class__.__name__) args = []", "from std_msgs.msg import Header if Header.__class__._TYPE_SUPPORT is None: Header.__class__.__import_type_support__() @classmethod def __prepare...
[]
[ "== FrameSources.FILE: if not isinstance(images_dir_path, str): raise Exception('`images_dir_path` should be a string path", "self.current_frame_index = 0 if self.frame_source == FrameSources.FILE: if not isinstance(images_dir_path, str): raise Exception('`images_dir_path`", "images') file_names_list = os.listd...
[ ") data.append( ret ) except: pass return data if __name__ == \"__main__\": experiment_name", "if not experiment_dict.has_key( experiment_name ): return None data = [] for run in", "<gh_stars>10-100 #!/usr/bin/python import os import sys def parse_experiments( fd, ignore_blank=False ): ret =", "= \"\" experim...
[ "self.num_measurements # results = self.calc_operators(measurements_tomo[:max_idx], beta_I, beta_Q) # self.results = results # self.dens_mat", "pauli_op_dis): # pauli_1 = np.array([pauli_op_dis[2],pauli_op_dis[3],pauli_op_dis[1]]) # pauli_2 = np.array([pauli_op_dis[8],pauli_op_dis[12],pauli_op_dis[4]]) # pauli_co...
[ "file.) trace = self.document.create_trace() pb = trace.create_property_bundle( 'MftRecord', mftFileID=getattr(event, 'file_reference', None), mftFlags=getattr(event, 'file_attribute_flags',", "have to make separate traces. # (The path spec points to the $Mft", "Figure out how to associate MftRecord pb with the...
[ "and that modifies the understanding of the element in which it is contained", "value that does not contain spaces. \"id\": FHIR_string, # May be used to", "health-related services. FHIR_Patient_Contact = TypedDict( \"FHIR_Patient_Contact\", { # Unique id for the element", "the extension. \"extension\": List[...
[ "('description', models.CharField(max_length=1000)), ], ), migrations.CreateModel( name='Education', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('institution',", "], ), migrations.CreateModel( name='Education', fields=[ ('id', models.AutoField(auto_...
[ "\"\"\"An object representing a commiter.\"\"\" login: str avatar_url: str email: str @dataclass class", "\"\"\"The git commit info.\"\"\" author_login: str short_sha: str sha: str message: str url:", "are associated with a pull request.\"\"\" # pylint: disable=too-many-instance-attributes author: Author merged...
[ "tank.on_for_degrees(10, 10, -120) baseAngle += alignWithTube(40, test = False) tank.on_for_degrees(10, 10, 120) #caminha", "walkUntilColor(1) alinhar(1) rotateTo(180) walkUntilColor(1) alinhar(1) def PegarTubo(): # Rotaciona e acha o angulo", "mexendo rotateTo(10) for i in range(0, 2): rotateTo(-20, speed = 5 ...
[ "trajectory optimization using built-in TensorFlow optimizers. ''' # Validate u_init shape. N =", "tf.global_variables_initializer() # Run the optimization procedure. with tf.Session() as sess: # Initialize all", "of inputs. ''' import tensorflow as tf def run_naive_trajopt(env, x_0, u_init): ''' Runs", "Init...
[ "s) + self.pathSum(root.left, s) + \\ self.pathSum(root.right, s) def find_path(self, node, s): res", "1 res += self.find_path(node.left, s - node.val) res += self.find_path(node.right, s - node.val)", "s) + \\ self.pathSum(root.right, s) def find_path(self, node, s): res = 0 if", "self.find_path(root, s) + s...
[ "model_name='patiente', name='document_type', ), migrations.RemoveField( model_name='patiente', name='gender', ), migrations.RemoveField( model_name='medicalhistory', name='patiente', ), migrations.AddField( model_name='medicine',", "), migrations.RemoveField( model_name='patiente', name='document_type', ), migra...
[ ".base import BaseHandler, DefaultHandler # noqa: F401 from .cast import caster as callback_caster", "import BaseHandler, DefaultHandler # noqa: F401 from .cast import caster as callback_caster #", "BaseHandler, DefaultHandler # noqa: F401 from .cast import caster as callback_caster # noqa:", "DefaultHandler ...
[ "category self.children = self.current.get_categories def is_parent(self): return self.children is not None def products(self):", "self.current.get_categories def is_parent(self): return self.children is not None def products(self): return Product.objects.filter() class", "= category self.children = self.curren...
[ "flipped, and 1 (or larger) stands for masked pixels, 0(<0) stands for unmasked", "array, mask array used in calculation, True for masked pixel, if None, then", "+= self.avgMask(pic, dymask=dymask) self.dynamicmask = (rv > 0) else: self.dynamicmask = None return", "low will be masked :param dymask: 2d bool ar...
[ "update(table, informations): i = 0 for information in informations: if not (type(information) ==", "i obj = database_operation.DatabaseOperation(table) if not obj.create(information): return i i += 1 return", "class HaxiSimpleCrud(object): @staticmethod def get(table, limit=None, skip=None, desc=None, fields=[...