ngram
listlengths
0
67.8k
[ "< (3, 6)) def tmphome(request, monkeypatch): \"\"\"Set up HOME in a temporary directory.", "is _orig_trace orig_settrace = sys.settrace # Wrap sys.settrace to restore original tracing function", "monkeypatch): \"\"\"Set up HOME in a temporary directory. This ignores any real ~/.pdbrc.py", "else: m.setattr(\"...
[ "amount to \"zoom\" into the image. E.g. 2.0 would cut out half of", "to \"zoom\" into the image. E.g. 2.0 would cut out half of the", "would cut out half of the width, half of the height, and only", "relative_corners are floats between 0 and 1 designating where the corners of a", "raw_width), int(rc[0][1] ...
[ "self.assertEquals(result, True) def test_base_domain_matches_domain_with_explicit_port(self): result = self.isValidOrigin('http://example.com:80', ['example.com:80']) assert result is True def", "def test_custom_protocol_with_domainish_match(self): result = self.isValidOrigin('sp://custom-thing.foobar/foo/bar', ...
[ "date, feedgenerator, html, number, misc, text from markupsafe import Markup def bold(text): return", "used in project.\"\"\" #from webhelpers import date, feedgenerator, html, number, misc, text from", "<gh_stars>0 # -*- coding: utf-8 -*- \"\"\"WebHelpers used in project.\"\"\" #from webhelpers import", "num...
[ "else: remoteYcsbNodes = []; cluster = RiakCluster(NORMAL_BINDING, CONSISTENCY_BINDING, IPS_IN_CLUSTER); runLoadBenchmarkAsBatch(cluster, remoteYcsbNodes, pathToWorkloadFile, runtimeBenchmarkInMinutes,", "ycsb nodes>]'; exit(); cluster = RiakCluster(NORMAL_BINDING, CONSISTENCY_BINDING, IPS_IN_CLUSTER); runLoadBen...
[ "'<EMAIL>', 'cd', ) assert rr.get(self.mk_bug('P2::C2'), '2019-02-24') == ( '<EMAIL>', 'cd', ) assert rr.get(self.mk_bug('P3::C3'),", "assert rr.get(self.mk_bug('P2::C2'), '2019-03-08') == ( '<EMAIL>', 'gh', ) assert rr.get(self.mk_bug('P3::C3'), '2019-03-08') == (", "( '<EMAIL>', 'ef', ) assert rr.get(self.mk_...
[ "function_code(self): from .ext_tools import indent decl_code = indent(self.arg_declaration_code(),4) cleanup_code = indent(self.arg_cleanup_code(),4) function_code =", "= os.path.split(module_path) mod = inline_ext_module(module_name,compiler) # create the function. This relies on the", "indent decl_code = ind...
[ "in which they were applied. \"\"\" name_pattern = self._build_rev_name_pattern(group_name=group_name) return sorted(operating_system.list_files_in_directory( self._revision_dir, recursive=True,", "an override is applied or removed a new configuration file is generated by", "Unless required by applicable law or...
[ "in content: if \"description\" in content[\"requestBody\"]: description_ = str(content[\"requestBody\"][\"description\"]) if description_[-1] != \".\":", "{eg}</sub></i>' if isinstance(eg, str): eg = '\"' + eg + '\"' example_ =", "description_[-1] != \".\": description_ += \".\" if \"enum\" in properties: type...
[ "getHub(self, hub_id): url = self.api_url + '/project/v1/hubs/%s' % hub_id headers = { 'Authorization':", "return get_request(url, headers) @authorized def getHub(self, hub_id): url = self.api_url + '/project/v1/hubs/%s' %", "class Hubs: @authorized def getHubs(self): url = self.api_url + '/project/v1/hubs' hea...
[ "# from .views import BaseIndexView urlpatterns = [ # url(r'^$', BaseIndexView.as_view(), name=\"index\"), ]", "import url # from .views import BaseIndexView urlpatterns = [ # url(r'^$', BaseIndexView.as_view(),", "url # from .views import BaseIndexView urlpatterns = [ # url(r'^$', BaseIndexView.as_view(), name...
[ "subdirectories for {0}'.format(config_type)) return myconfigdir def create_context(config_var_file): # read the metafile to get", "variables = oyaml.safe_load(var_metadata.read()) except IOError as ioe: print(f'Could not open metadata file {config_var_file}')", "template.render(context) return rendered_templat...
[ "clearer return \"ignore fail\", \"f\", \"IGNORE_FAIL\" @pytest.fixture() def pact_verifier(pytestconfig, request): interaction, consumer =", "\"and will be removed in the 3.0.0 release.\", DeprecationWarning, ) if filter_consumer_name: pacts", "provider_name: raise ValueError(\"--pact-broker-url requires the -...
[ "is 10.' \"\"\" def wrapper(fget): return DocstringProperty(class_doc, fget) return wrapper class DocstringProperty(object): \"\"\"Property", "for docstrings. Took from: https://gist.github.com/bfroehle/4041015 >>> class A(object): ... '''Main docstring''' ... def", "the attribute is accessed from the main clas...
[ "symmetry check is required. The ratio check is embedded on the cuda side", "need to be remapped to the source_kps, # destin_kps indices. This is the", "= pd.concat([pd.Series(source), pd.Series(matches.index), pd.Series(destination), matches.match, matches.score, matches.ambiguity], axis=1) df.columns = ['sour...
[ "app.apis.hello import api as hello api = Api( title='api', version='1.0', description='', prefix='/api', doc='/api'", "flask_restx import Api from app.apis.hello import api as hello api = Api( title='api',", "api as hello api = Api( title='api', version='1.0', description='', prefix='/api', doc='/api' ) api.ad...
[ "unittest from test.support import captured_stdout from brainfuck import BrainFuck class TestCore(unittest.TestCase): def test_hello_world(self):", "as stdout: bf.run() self.assertEqual(stdout.getvalue(), \"Hello, world!\\n\") def test_fizzbuzz(self): bf = BrainFuck() bf.load_file(\"./tests/fizz_buzz.txt\") with"...
[ "requests with cookies return get_page_data(request) if __name__ == \"__main__\": uvicorn.run(\"main:app\", host=\"127.0.0.1\", port=8050, log_level=\"info\")", "StaticFiles(directory=\"static\"), name=\"static\") @app.get(\"/\", response_class=HTMLResponse) async def home(request: Request): # Expect requests wit...
[ "KIND, either express or implied. # See the License for the specific language", "Unless required by applicable law or agreed to in writing, software # distributed", "to create a new static group # # _author_ = <NAME> <<EMAIL>> #", "using OME API to create a new static group # # _author_ =", "Script to creat...
[ "limit_train_num_samples: Optional[int] = None, limit_val_num_samples: Optional[int] = None) -> Tuple[DataLoader, DataLoader, DataLoader]: train_ds", "train_ds = get_train_dataset(root_path) val_ds = get_val_dataset(root_path) if with_sbd is not None: sbd_train_ds =", "val_sampler = data_dist.DistributedSampler...
[ "-> Optional[User]: user = User.objects.filter(email=payload[\"email\"], is_active=True).first() user_jwt_token = payload.get(\"token\") if not user_jwt_token or", "import settings from django.core.handlers.wsgi import WSGIRequest from ..account.models import User from ..app.models import", "token was generated...
[ "if path.startswith('./') : path = path[1:] elif not path.startswith('/'): path = '/%s' %", "MATCH.PATH. Each item is a path component, start from outer most item. \"\"\"", "Exception as err: logger.info(err) self.config_data = json.load({}) return self.config_data def update_json_config(self, json_added, json_...
[ "('data', '0022_discardaction'), ] operations = [ migrations.AddField( model_name='discardaction', name='answers', field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, null=True), ), ]", "import django.contrib.postgres.fields.jsonb from django.db import migrations class Migration(migrations.Migration)...
[ "ComplexJsonEncoder(JSONEncoder): \"\"\"Basic JSON encoder for 'complex (nested)' Python objects.\"\"\" def default(self, o): if", "method to be implemented by any class that wants to be serialized to", "def __init__(self): self.id = \"\" self.name = \"\" self.time = int(round(time() * 1000))", "time class Js...
[ "\"\"\"Compute pi to a specific precision using multiple algorithms.\"\"\" @staticmethod def BBP(precision): \"\"\"Compute", "<gh_stars>0 \"\"\"Compute pi.\"\"\" from decimal import Decimal, getcontext import argparse import itertools class", "pi @staticmethod def arctan_euler(x, one=1000000): \"\"\"Calculate a...
[ "# If we want an intializer function we can add # `initializer=box.store, 1`", "{network.show_active()}\") data_types = DataTypes.deploy( {\"from\": account}, publish_source=config[\"networks\"][network.show_active()][\"verify\"], ) # Optional, deploy the ProxyAdmin", "being the `store` function # with a `newVa...
[ "class BidirectionalLSTM(nn.Module): # Module to extract BLSTM features from convolutional feature map def", "nIn, nHidden, nOut): super(BidirectionalLSTM, self).__init__() self.rnn = nn.LSTM(nIn, nHidden, bidirectional=True) self.embedding = nn.Linear(nHidden", "T, b, h = recurrent.size() t_rec = recurrent.vie...
[ "self,v: None,lambda self: None) \"\"\"Gets the rectangle in which to paint. Get: ClipRectangle(self:", "PaintEventArgs() def Dispose(self): \"\"\" Dispose(self: PaintEventArgs) Releases all resources used by the System.Windows.Forms.PaintEventArgs.", "paint. Get: ClipRectangle(self: PaintEventArgs) -> Rectangl...
[ "total training iteration') parser.add_argument('--batch_size', default=32, type=int, help='size of minibatch') parser.add_argument('--test_batch_size', default=32, type=int, help='size", "training mode') os.environ['CUDA_VISIBLE_DEVICES'] = str(opt.gpu) opt.device = torch.device('cuda' if torch.cuda.is_available...
[ "fileServers: - operation: \"all\" url: \"file://{work_dir}/scratch\" - type: \"localStorage\" path: \"{work_dir}/outputs\" fileServers: -", "file for registration jobs with (TOP_DIR / \"replicas.yml\").open(\"w\") as f: rc.write(f) wf.add_transformation_catalog(tc) try:", "\" + current_file.name + \".\", \"-da...
[ "from ceem.opt_criteria import * from ceem.systems import LorenzAttractor from ceem.dynamics import * from", "= 0.04 sys = LorenzAttractor(sigma, rho, beta, C, dt, method='midpoint') B = 1", "Test BlockSparseGroupSOSCriterion crit = BlockSparseGroupSOSCriterion([obscrit, dyncrit]) xsm, metrics = NLSsmoother(tor...
[ "import pulse from qiskit.providers import BaseBackend, BackendConfigurationError class DrawerBackendInfo(ABC): \"\"\"Backend information to be", "of the backend. dt: System cycle time. channel_frequency_map: Mapping of channel and associated", "complex(*u_lo_mapper.scale) chan_freqs[pulse.ControlChannel(qind)]...
[ "messages from django.urls import reverse from django.http import HttpResponseRedirect from django_gotolong.lastrefd.models import Lastrefd,", "model = Mfund def get_queryset(self): self.queryset = Mfund.objects.all().filter(mf_user_id=self.request.user.id). \\ values('mf_subcat').annotate(scheme_sum=Sum('mf_nav_...
[ "re.sub(pattern,'{:0>3}'.format(r),lastTs,1) + \".ts\" req = urllib.request.Request(url=nextTs,headers=headers,method='GET') retry -= 1 isOk = False return", "[urllib.parse.urljoin(m3u8_url, n.strip()) for n in str(body, encoding = \"utf8\").split('\\n') if n and not", "file_name = self.succed.get(index, '') if...
[ "= [ ('restaurants', '0001_initial'), ] operations = [ migrations.AddField( model_name='restaurant', name='description', field=models.CharField(default='Description', max_length=255,", "<filename>buzzbox/restaurants/migrations/0002_restaurant_description.py # Generated by Django 3.2.9 on 2021-12-06 10:02 from dja...
[ "**kwargs): layout = self._stack.pop() if self._stack: parent = self._stack[-1] if isinstance(layout, QtWidgets.QSplitter): parent.addWidget(layout)", "settings: path = QtCore.QStandardPaths.writableLocation(QtCore.QStandardPaths.DocumentsLocation) sname = 'save_%s' % domain if settings.contains(sname): path =", ...
[ "common_test_param: :return: \"\"\" try: test_plan = self.test_plan[self.test_module] for test_method_name in test_method_names: self.__prepare_test_vars(test_method_name, **common_test_param)", "method_to_execute() except Exception as e: log_print(f'!!! Exception in {method_name} code !!!', color='red') log_prin...
[ "return valid, cache_training_set_metadata, cached_training_set, cached_test_set, cached_validation_set def put(self, training_set, test_set, validation_set, training_set_metadata): logger.info(\"Writing", "isinstance(dataset, str): # TODO(travis): could try hashing the in-memory dataset, but this is", "alphanu...
[ "test_calculator_base(failed_dict): mrms = [0, 0.3] pm = [None, [\"assembling-machine-2\", \"stone-furnace\", \"burner-mining-drill\"]] uk =", "am = [1, 101.5] failed_dict['init_failed'] = {} failed_dict['method_failed'] = { 'change_machine_failed': { }", "failed_dict['init_failed'] = {} failed_dict['method_fai...
[ "16 UTF16 = 17 class TMessageType: CALL = 1 REPLY = 2 EXCEPTION", "= 0 VOID = 1 BOOL = 2 BYTE = 3 I08 =", "pass class TException(Exception): \"\"\"Base class for all thrift exceptions.\"\"\" def __init__(self, message=None): Exception.__init__(self,", "iprot.readI32(); else: iprot.skip(ftype) else: iprot.skip...
[ "engines import AudioRecognition, FeatureExtractor class Engines(Enum): POCKET_SPHINX = 'PocketSphinx' PORCUPINE = 'Porcupine' SNOWBOY", "namedtuple from enum import Enum import numpy as np from pocketsphinx import get_model_path", "KIND, either express or implied. # See the License for the specific language", ...
[ "I haven't tested it. import weakref #https://docs.python.org/3/library/weakref.html class InsaneClass(object): _alive = [] def", "__new__(cls): # there is a difference btw. cls and self, but i don't", "instance = InsaneClass() instance.__enter__() instance.commit_suicide() #print(instance) print(InsaneClass) #...
[ "epsilon, True) # find convexity hull and defects hull = cv2.convexHull(max_contour, returnPoints=False) defects", "(contour, defects) = find_hull_defects(segment) # detect the number of fingers depending on the", "imageheight frame center_half = 10 # half-width of 21 is 21/2-1 center =", "# defects, then dra...
[ "-*- coding: utf-8 -*- ''' // Copyright (c) 2015 Intel Corporation // //", "\" panic_gbuffer=\" + str(self.args.gbuffer) self._kernel_module_parameters += \" exclude_userspace=\" + str(self.args.userspace) self._kernel_module_parameters += \"", "not use this file except in compliance with the License. // You ma...
[ "os from . import filesys MAIN_USAGE_MESSAGE = \"\"\" usage: xlab command ... Options:", "Invalid arguments.\") exit() if args[0] == 'init': root = os.getcwd() dirs = filesys.Directories()", "== 'init': root = os.getcwd() dirs = filesys.Directories() dirs.set_root(root) def main(): if len(sys.argv)", "'init':...
[ "Unless required by applicable law or agreed to in writing, software # distributed", "make sure _create_param_lr() be called after # optimizer._create_global_learning_rate(). learning_rate = self._create_param_lr(param_and_grad) with block.program._optimized_guard(", "the result will be reused. # NOTE(wangxi): ...
[ "function test retrieving protein interactions for various species' genes. \"\"\" # Valid request", "expected = { \"wasSuccessful\": False, \"error\": \"There are no data found for the", "\"Num_species\": 1, \"Quality\": 1, \"pcc\": -0.116, }, ], } self.assertEqual(response.json, expected) # Invalid", "def se...
[ "#pathToCSV = '/Users/Michal/Downloads/dialogflow-java-client-master2/samples/clients/VirtualTradingAssistant/src/main/java/ai/api/examples/fileStore/file.csv' #pathToCSV = 'C:\\\\Users\\\\ojwoo\\\\Documents\\\\Warwick\\\\CS261\\\\Coursework\\\\dialogflow-java-client-master\\\\samples\\\\clients\\\\VirtualTradingAs...
[ "= 1 parsed_length = 0 mtype = 0 msg_length = 0 while self.running:", "Client class for hotbox serial connection \"\"\" parsers = { MSG_STATUS: OvenStatus, MSG_RUN_STATUS:", "parsed_length < 3: # Abort if not a null byte if c[0]: parsed_length", "*args, **kwargs): if self.state == \"connected\": try: fun(self...
[ "b in random.sample(blocks, len(blocks)): node0conn.send_block(b) # The node should eventually, completely sync without", "(potentially out of order) blocks exits initial block download (IBD; this occurs once", "Bitcoin developers # Distributed under the MIT software license, see the accompanying #", "send_he...
[ "TimeStamedModel(models.Model): created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now_add=True) # An option that makes this", "image_likes = models.ManyToManyField(user_model.User, related_name='post_image_likes') class Comments(TimeStamedModel): author = models.ForeignKe...
[ "object has been moved\"\"\" def __init__(self, object, workflow, action, comments): ObjectEvent.__init__(self, object) self.object", "from guillotina.contrib.workflows.interfaces import IWorkflowChangedEvent from guillotina.events import ObjectEvent from zope.interface import implementer @implementer(IWorkflowCh...
[ "imports from google.cloud.exceptions import GoogleCloudError LOGGER = logging.getLogger(__name__) SUPPRESSION_RULE_CONCEPT_TABLE = 'covid_vaccine_concepts' COVID_VACCINE_CONCEPT_QUERY =", "table. if your class deletes a subset of rows in the tables you", "the count of final final row counts + deleted rows shou...
[ "the API endpoint data : Dict[str, Any] data to be processed to the", "the server. Returns ------- Tuple[List[Any], str] The returned data is - a list", "str url of the API endpoint. data : Dict[str, Any] data to be", "if response.status_code != 201: # The returned status code indicates something went wrong",...
[ "[] picked_winners = [\"picked team\"] with pytest.raises(ValueError, match=r\".*invalid winner\"): round_score(VALID_ROUND, all_teams, round_winners, picked_winners)", "a seed # seed doesn't change, so maybe make that not passed around", "match=r\".*range*\"): round_score(0) with pytest.raises(ValueError, matc...
[ "remapped by PyOBO self.assertEqual({'pubmed', 'cas', 'beilstein', 'reaxys'}, { xref.prefix for xref in xrefs", ") from tests.constants import TEST_CHEBI_OBO_PATH class TestParseObonet(unittest.TestCase): \"\"\"\"\"\" @classmethod def setUpClass(cls) -> None:", "\"\"\"Test getting synonyms from a node in a :mod...
[ "[777], 'latitude': [lat], 'longitude': [lon]}) \"\"\" El proceso es muy pesado y no", "import codecs from math import cos, asin, sqrt # + def read_csv_with_encoding(filename, delimiter=\"|\",", "-*- coding: utf-8 -*- # + ## Utilidades comunes entre places y OSM.", "distance(lat1, lon1, lat2, lon2): \"\"\" El...
[ "= %s)' mycursor.execute(query_string, query_list) elif matchedGames[b][5] == team0OddsInfo[a][0]: query_list = [team0OddsInfo[a][1], team1OddsInfo[a][1], matchedGames[b][0]]", "- from the dates for the URLs, then making the URLs. todayShort =", "(str(allGames[c][0]),) mycursor.execute(query_string, gameID) if ...
[ "in out main(args.format('--copy path/to/file.txt /tmp/file.txt').split()) out, _ = capsys.readouterr() assert 'COPY [\"path/to/file.txt\", \"/tmp/file.txt\"]'", "main(args.split()) with pytest.raises(SystemExit): main() args = \"generate -b ubuntu -p apt --ants option=value\"", "neurodocker.main\"\"\" # Author...
[ "# -*- coding: utf-8 -*- # # Copyright (C) 2020 The Project U-Ray", "On name: The primitives you listed have a control input to set the", "{\"1'b0\": 0, \"1'b1\": 1}[s] print(\"Loading tags from design.txt\") with open(\"design.txt\", \"r\") as f:", "LUT5 FF is2 = '2' in ff_name if used: segmk.add_site_tag(si...
[ "self._jac_metric = value @jac_metric.deleter def jac_metric(self): del self._jac_metric @property def grad_logdet_metric(self): return self._grad_logdet_metric", "in the Euclidean case. \"\"\" def __init__(self, position: np.ndarray, momentum: np.ndarray): super().__init__(position, momentum)", "from typing im...
[ "Foundation; either version 2 # of the License, or (at your option) any", "___/ ___/ __ `/_ / / _ \\ # +------+ / /_/ /", "either pressing Ctrl-C or by holding your hand above the Crazyflie. For the", "# as published by the Free Software Foundation; either version 2 # of", "Street, Fifth Floor, Boston, # MA...
[ "ugettext_lazy as _ USER_TYPE_STAFF = 'STAFF' USER_TYPE_ADMIN = 'ADMIN' USER_TYPE_BARBER = 'BARBER' USER_TYPE_CHOICES", "_ USER_TYPE_STAFF = 'STAFF' USER_TYPE_ADMIN = 'ADMIN' USER_TYPE_BARBER = 'BARBER' USER_TYPE_CHOICES = (", "'STAFF' USER_TYPE_ADMIN = 'ADMIN' USER_TYPE_BARBER = 'BARBER' USER_TYPE_CHOICES = ( ...
[ "HTML5TestStorySet(story.StorySet): \"\"\" Chrome proxy test page for traffic over https. \"\"\" def __init__(self):", "# Use of this source code is governed by a BSD-style license that", "2016 The Chromium Authors. All rights reserved. # Use of this source code", "code is governed by a BSD-style license that...
[ "user credentials database with: user_id & password logger showing connection logs, DB version,", "FROM websites WHERE url = \\'{}\\';' # url, popularity, visitations = database.fetch(database.command.get_site.format('https://www.python.org'))[0] #", "{}'.format(sqlite3.version)) if commands is None: commands =...
[ "import re_path from projectx.consumers import UserWebSocketConsumer from .consumers import UserWebSocketConsumer websocket_urlpatterns = [", "from django.urls import re_path from projectx.consumers import UserWebSocketConsumer from .consumers import UserWebSocketConsumer websocket_urlpatterns", "<gh_stars>0 fr...
[ "AldrynSearchApphook(CMSApp): name = _(\"aldryn search\") def get_urls(self, *args, **kwargs): return ['aldryn_search.urls'] if settings.ALDRYN_SEARCH_REGISTER_APPHOOK:", "name = _(\"aldryn search\") def get_urls(self, *args, **kwargs): return ['aldryn_search.urls'] if settings.ALDRYN_SEARCH_REGISTER_APPHOOK: app...
[ "<filename>BizPy/openpyxl/20200513/horizontal_chart.py import pandas as pd from openpyxl import Workbook from openpyxl.chart import BarChart,", "chart.type = 'bar' chart.style = 11 chart.shape = 4 chart.title = '都道府県別の人口' chart.x_axis.title", "import BarChart, Reference wb = Workbook() ws = wb.active df = pd.re...
[ "LogSourceSerializer(Serializer): def serialize(self, instance, attrs): return { 'id': instance.id.hex, 'job': { 'id': instance.job_id.hex,", "LogSource @register(LogSource) class LogSourceSerializer(Serializer): def serialize(self, instance, attrs): return { 'id': instance.id.hex, 'job':", "serialize(self, ins...
[ "# # Licensed under the Apache License, Version 2.0 (the \"License\"); # you", "writing, software # distributed under the License is distributed on an \"AS IS\"", "NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version", "governing permissions and # limitations under the Licen...
[ "document.', long_description=long_description, license='BSD', author='<NAME>', author_email='<EMAIL>', url='https://github.com/jszakmeister/rst2ctags', version=version, py_modules=['rst2ctags'], zip_safe=True, entry_points={ 'console_scripts': [ 'rst2ctags", "version=version, py_modules=['rst2ctags'], zip_safe=T...
[ "to workspace deployments' attach_camera_parser = subparsers.add_parser('attach-camera', description=attach_camera_commanddesc, help=attach_camera_commanddesc) attach_camera_parser.add_argument('camera', default=0, type=int, help=('on Linux,", "help='print version number and exit.') help_parser = subparsers.add_p...
[ "v*(10**i) if (2**31 - 1>= d >= -(2**31)): return d else: return 0", "p[ind] = val for i, v in p.items(): d += v*(10**i) if (2**31", "1>= d >= -(2**31)): return d else: return 0 if x>=0: return (solve(x))", "<reponame>kkcookies99/UAST class Solution: def XXX(self, x: int) -> int: def solve(x): a =", "list(m...
[ "= [] for i in range(limit): line = response[i]['address']['line'] city = response[i]['address']['city'] state", "querystring, headers = headers,) return response_for_rent.json()['properties'] @router.get('/for_rent_list/{property_id}') async def property_detail(property_id: str = \"O3599084026\"):", "= {\"prop...
[ "dateTime >= %(start)s);\" sql_stmt = SQL_TEMPLATE % interpolate_dict print(sql_stmt) # Get the number", "StartTime , b.dateTime as EndTime , b.dateTime-a.dateTime as TimeChange , b.ch8_a_energy2-a.ch8_a_energy2 as ValueChange", "MIN(dateTime) FROM archive WHERE dateTime >= %(start)s);\" sql_stmt = SQL_TEMPLATE...
[ "}] } def test_post_orders8(): response = client.post('/orders/', json={ \"isin\": \"blablablabla\", \"limit_price\": 0.2, \"side\":", "\"isin\": \"blablablablabla\", \"limit_price\": 0.2, \"side\": \"buy\", \"quantity\": 1, \"valid_until\": 1996950863 }) assert response.status_code", "}) assert response.status...
[ "oldformat = 0)] line = subprocess.check_output([PUC, \"-n\", r, p, v, n]) matches =", "#!/bin/python2 import collections import re import subprocess import sys PUC = \"../pamu2fcfg/pamu2fcfg\" resident", "free_block + end.format(devices = len(credentials)) print(code) # Single credentials print >> sys.stderr, ...
[ "x_value): x_value = np.array(x_value) x = array_ops.placeholder(dtypes.float32, name=\"x\") return sess.run(fun(x), feed_dict={x: x_value}) for", "run(bijector.inverse, x)) self.assertAllClose([0., 0.], run(bijector.inverse_log_det_jacobian, x)) def testTwoBatchScalarIdentityViaScale(self): with self.test_sessio...
[ "Download and install algod. \"\"\" node_package_dir = file_util.ensure_folder(f\"/tmp/algod-pkg-{time_util.get_timestamp()}\") data_dir = file_util.ensure_folder(data_dir) bin_dir =", "goal_args = [ 'node', 'stop', ] print(f\"Stopping node with:\\n\\tdata_dir: {data_dir}\\n\\tkmd_dir: {kmd_dir}\") goal(data_dir,...
[ "use it where you want it to fill out a parent widget of", "if needed. \"\"\" from pyjamas.ui.SimplePanel import SimplePanel from pyjamas.ui.ScrollPanel import ScrollPanel from pyjamas.ui.HTML", "from pyjamas.ui.ScrollPanel import ScrollPanel from pyjamas.ui.HTML import HTML from pyjamas.ui.VerticalPanel import...
[ "your weaknesses and share your strengths. # May you share freely, never taking", "than you give. # May you find love and love everyone you find.", "share freely, never taking more than you give. # May you find love", "taking more than you give. # May you find love and love everyone", "False: try: query = w...
[ "''' def __init__(self, config): self.config = config self.CallGoTCList = [] def create_testcase_list(self): '''", "self.config.test_case['call'][k][0], rx_node_addr = self.config.test_case['call'][k][1], msg_id = self.config.test_case['call'][k][2], msg_class = self.config.test_case['call'][k][3], hdr_len = self...
[ "get_cart from cart.forms import SelectProductForm, SetQtyForm @require_POST def _cart_action_view(request, action_factory, form_class, message): form", "cart.printable_total }) def add(request): return _cart_action_view( request, action_factory=lambda cart, data: cart.add(**data), form_class=SelectProductForm, m...
[ "3 ROOK = 4 QUEEN = 5 KING = 6 FIGURE_NAME = [", "\"#FFB87A\") } #----- move types -----# NORMAL_MOVE, CAPTURE, PROMOTION, DOUBLE_STEP, ENPASSANT_CAPTURE, CASTLING, KING_CAPTURE", "(22, 2) #----- castling -----# CASTLING_LEFT = 0 CASTLING_RIGHT = 1 #----- player", "B3, C3, D3, E3, F3, G3, H3, \\ A4, B4, C4, D...
[ "= env.step(action) total_reward += reward total_steps += 1 print(\"Currently %d steps, total reward", "<reponame>kapzlok2408/Pokemon-Showdown-Node-Bot<gh_stars>0 import gym import gym_pokemon import random if __name__ == \"__main__\": env =", "random.randint(-1,8) obs, reward, done, _ = env.step(action) total_...
[ "print('O {} é maior que {}'.format(num1, num2)) elif num1 < num2: print('O {}", "')) if num1 > num2: print('O {} é maior que {}'.format(num1, num2)) elif", "int(input('Digite o 1º número: ')) num2 = int(input('Digite o 2º número: ')) if", "if num1 > num2: print('O {} é maior que {}'.format(num1, num2)) elif ...
[ ":: OS Independent', 'Development Status :: 4 - Beta', 'Intended Audience :: Developers',", "Independent', 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', ], install_requires=[", "'Operating System :: OS Independent', 'Development Status :: 4 - Beta', 'Intended Audience", "), long_descrip...
[ "= app.MemorySuppressionSummary.all() monthly_timestamp = datetime.date.today().replace(day=1) query.filter('monthly_timestamp =', monthly_timestamp) query.order('monthly_timestamp') query.order('-%s' % sort) if", "name, values): \"\"\" Wrapper for template.render that updates response and knows where to", "lin...
[ "= workspace.FetchBlob(\"out\") np.testing.assert_array_almost_equal(out, X * Y) self.assertDeviceChecks(dc, op, [X, Y], [0]) self.assertGradientChecks(gc, op,", "array increased by one dim def powt_op_mixed(X, Y): return powt_op(X, Y[np.newaxis, :, :,", "\"SumReduceLike\", [\"X\", \"Y\"], \"out\", broadcast=1,...
[ "[ \"ansible/overcloud-host-image-workaround-resolv.yml\", \"ansible/seed-introspection-rules.yml\", \"ansible/dell-switch-bmp.yml\", ], ), ] self.assertEqual(expected_calls, mock_run.call_args_list) expected_calls = [ mock.call(", "extra_vars={ \"ansible_python_interpreter\": \"/usr/bin/python\", \"ansible_user\...
[ "tensor_shape] def dump_graph_into_tensorboard(tf_graph): # type: (_tf.Graph) -> None _tb_log_dir = os.environ.get('TB_LOG_DIR') if _tb_log_dir:", "License. See License.txt in the project root for # license information. ############################################################################### import", "pr...
[ "\"\"\" # Needed for python2 / python3 print function compatibility from __future__ import", "the # webserver 'http_method': 'GET', # 'http_method': 'PUT', # total duration, in nanoseconds.", "PUT: Standard HTTP upload, the wireless endpoint will push data to the #", "duration, in nanoseconds. # This is the d...
[ "in doc.findall(\"kretsar/krets/startpoints/number\"): startnumbers[n.text] = True for p in doc.findall(\"points/point\"): number = p.find(\"number\").text if", "None: print(\"** error: no distance: src: %s dst: %s\" % (src, dst)) properties", "int(src) > MAXPOINT or int(dst) > MAXPOINT: continue if int(src) < ...
[ "= {} self.filesystems = [] plugin_files = load_conf_list(plugin_config('files', default='[]')) self._load_from_files(plugin_files) self.plugin_files = plugin_files", "rv._registry.get_file_system(uri, search_plugins=False) local_path = download_if_needed(uri, plugin_path, fs=fs) local_dir = os.path.dirname(local...
[ "from __future__ import print_function from absl import app from absl import flags import", "// 2, 16) up = nb.upconv2d(inner_nc, outnc) decoder.append(up) inner_nc = outnc up =", "absolute_import from __future__ import division from __future__ import print_function from absl import app", "import torchvision ...
[ "and the following disclaimer in the documentation # and/or other materials provided with", "# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR #", "awkward.util.numpy.bitwise_and(out, tmp.y < tolerance) out = awkward.util.numpy.bitwise_and(out, tmp.z < tolerance) return out class", ...
[ "\"\"\" Implements a non interactive controller to controt non-interactive visualizers. (i.e. those that", "self.vis.visualize(page.next_line(), eop) if eop: break def close(self): \"\"\" Todo: ApiDoc. :return: \"\"\" self.vis.close()", "input: :param output: :param visualizer_class: \"\"\" super(ConversionCont...
[ "data=sum_data) return [response.json(), response_sum.json()] if __name__ == '__main__': cs = CovidScraper() results =", "BeautifulSoup(page.content, 'html.parser') return soup def scrape_page_content_contains_tests(self): page = requests.get(self.scrape_tests_url) soup = BeautifulSoup(page.content, 'html.parser'...
[ "os from PIL import Image DATEI_WEB_GROSSE = 700 def isimg(isitimg): ext = os.path.splitext(isitimg)[1].lower()", "float(img.size[1]) * float(wrel) ) splt = os.path.splitext(datei) newfilename = splt[0] + splt[1].lower() img", "float(wrel) ) splt = os.path.splitext(datei) newfilename = splt[0] + splt[1].lower()...
[ "flamewreath(self, ctx): \"\"\"I will not move when Flame Wreath is cast!\"\"\" await self._play(\"https://www.youtube.com/watch?v=gcA6y7sxKcA\",", "url_or_search_terms=url) @commands.command(pass_context=True, no_pm=True) async def flamewreath(self, ctx): \"\"\"I will not move when Flame", "no_pm=True) async d...