ngram
listlengths
0
67.8k
[ "-*- coding: utf-8 -*- __author__ = \"\"\"<NAME>\"\"\" __email__ = '<EMAIL>' __version__ = '0.1.0'", "# -*- coding: utf-8 -*- __author__ = \"\"\"<NAME>\"\"\" __email__ = '<EMAIL>' __version__ =" ]
[ "%s\" % path) with ZipFile(self._path, 'a', ZIP_DEFLATED, allowZip64=True) as zipfile: for base,dirs,files in", "name): self.name = name _, self._path = mkstemp() logger.debug(\"Created temporary file %s\" %", "to a temporary location (and using unnecessary extra space) and storing up the", "ZIP file backup N...
[ "serialize=False, verbose_name='投递ID')), ('delivery_status', models.CharField(choices=[('DD', '待定'), ('YQ', '邀请面试'), ('WJ', '婉拒')], default='DD', max_length=2, verbose_name='投递状态')), ],", "verbose_name='创建时间')), ('update_time', models.DateTimeField(auto_now=True, verbose_name='更新时间')), ('is_delete', models.Boolea...
[ "8 hours 15 minutes\" assert date_time(\"17.12.1990 07:42\") == \"17 December 1990 year 7", "months = [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\",", "return f\"{int(time[0:2])} {months[int(time[3:5])-1]} {time[6:10]} year {h...
[ "util.protocol_tuple(version_str) return util.version_string(ptuple) @cachedproperty def protocol_min(self): \"\"\"Minimum protocol version as a string, e.g.,", "[] if isinstance(features, dict): hosts = features.get('hosts') if isinstance(hosts, dict): peers = [Peer(host,", "License (MIT) # # Permission is her...
[ "Platform from .test_gateway import DECONZ_CONFIG, setup_deconz_integration from tests.components.diagnostics import get_diagnostics_for_config_entry async def test_entry_diagnostics(", "deCONZ diagnostics.\"\"\" from unittest.mock import patch from pydeconz.websocket import STATE_RUNNING from homeassistant.const...
[ "idx: Array reference_position: Array did_buffer_overflow: Array max_occupancy: int = dataclasses.static_field() format: NeighborListFormat =", "List @dataclasses.dataclass class CellList: \"\"\"Stores the spatial partition of a system into a", "Unless required by applicable law or agreed to in writing, softwar...
[ "10, \"seed\": seed} base_args.update(**EXPERIMENTS) commands = make_commands( SCRIPT, base_args=base_args, common_hyper_args={\"environment\": ENVIRONMENTS} ) runner.run_batch(commands)", "\"RARL\", \"base-dir\": RARL_DIR}) runner = init_runner(\"EvaluateMassChange.\", num_threads=4) for seed in [0, 1, 2,", "\...
[ "sentry.api.bases.project import ProjectEndpoint from sentry.models import TagKey, TagKeyStatus class ProjectTagsEndpoint(ProjectEndpoint): def get(self, request,", "class ProjectTagsEndpoint(ProjectEndpoint): def get(self, request, project): tag_keys = TagKey.objects.filter( project=project, status=TagKeyStatus....
[ "= asyncio.get_event_loop() @async_eel.expose async def py_random(): return random.random() async def print_num(n): \"\"\"callback of", "from Javascript:', n) async def main(): try: async_eel.init('web') await async_eel.start('callbacks.html', size=(400, 300)) #", "with an inline callback await async_eel.js_ran...
[ "import index_driver_by_name, index_drivers from .index import Index _LOG = logging.getLogger(__name__) def index_connect(local_config=None, application_name=None,", "immediately :rtype: datacube.index.index.Index :raises datacube.drivers.postgres._connections.IndexSetupError: \"\"\" if local_config is None: loca...
[ "that can\\'t be parsed)') optparser.add_option('--filter-msgid', dest='filter_msgid', help='Only process message with given msgid') (opt,", "optparser.add_option('-m', '--mbox', dest='mbox', help='Load all messages in mbox') optparser.add_option('-i', '--interactive', dest='interactive', action='store_true', hel...
[ "from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration):", "Generated by Django 1.11.29 on 2020-03-10 14:30 from __future__ import unicode_literals from django.db", "[ ('shop', '0008_auto_20200310_1134'), ] operatio...
[ "= random.randint(0, self.num_classes - 1) elif self.cfg.TRAIN.SAMPLER.WEIGHTED_SAMPLER.TYPE == \"square\": sample_class = np.random.choice(np.arange(self.num_classes), p=self.square_p)", "__init__(self, mode='train', cfg=None, transform=None): super(iNaturalist, self).__init__(mode, cfg, transform) random.seed(0...
[ "username = '<EMAIL>' title = 'good songs' conference = ConferenceFactory() body = 'dragon", "order to access m2m fields, e.g. tags assert_true(created) assert_equal(fetched.fullname, fullname) assert_equal(fetched.username, username) assert_true('is_spam'", "hmac.new( key=settings.MAILGUN_API_KEY, msg='{}{}'.f...
[ "class Server(object): def __init__(self, handlers): self.handlers = handlers self.config = None self.servers =", "self, \"host\": host, \"port\": port, \"handler\": handler}) def run(config, handlers): server = Server(handlers)", "% kwargs) Handler(server, self.request) self.server = TCPServer((kwargs[\"host\"...
[ "!= -1: fxName=\"\" OnOffblockSize = 0x30 for j in range(12): if data[OnOffstart +", "1 except: pass #print(\"Found {} parameters.\".format(numParameters)) tD['Parameters'] = [] # 0 is the", "(j) * OnOffblockSize + 0x1B] == 0x00 ): print(\"Empty next slot\") break \"\"\"", "tD = { \"fxname\" :fxName } mmax = ...
[ "= [chr(x) for x in range(ord('0'), ord('9') + 1)] source += \"\".join(lower_char) source", "import random source = '' lower_char = [chr(x) for x in range(ord('a'), ord('z')", "number_char = [chr(x) for x in range(ord('0'), ord('9') + 1)] source += \"\".join(lower_char)", "= '' lower_char = [chr(x) for x in r...
[ "= GBICListViewSet.as_view(actions={'get': 'retrieve'}) gbic_type_test = GBICType.objects.create(description='muitoruim') gbic_test = GBIC.objects.create( serial='showdomilhao', patrimony_number='777', gbic_type=gbic_type_test )", "GBICTest(TestCase): def test_gbic_view_set(self): request = APIRequestFactory().ge...
[ "\" if len(self._preparateurs) == 0: summary += \"-\" else: summary += \"\\n\\t+ \"", "sieved_data[:, k+it*nf:k+(it+1)*nf] = sieve.transform( iterated_data[:, it, :], cache=self._cache, ) for callback in callbacks:", "sums signature for different :class:`~fruits.words.word.Word` objects the user can specify. - ...
[ "udev rule and systemd service file\\n\" f\"to your system to enable automated mounting", "s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.connect((\"8.8.8.8\", 80)) ip_address = s.getsockname()[0] s.close() return ip_address def", "variables={ 'address_plus_port': url, 'wkz_executable': wkz_executable, ...
[ "dirs, config): QUALITY_CUTOFF = 5 to_trim = _get_sequences_to_trim(config) resources = config_utils.get_resources(\"AlienTrimmer\", config) try:", "to avoid this? \"\"\" if quality_format == \"illumina\": quality_base = \"64\" else: quality_base", "cores): \"\"\"Trimming with cutadapt, using version installed ...
[ "== 'results.zip': filePath = os.path.join(folderName, filename) # Add file to zip zipObj.write(filePath, os.path.basename(filePath))", "= '''please check if the docker is running, and if a container with", "client = docker.from_env() try: container = client.containers.get(\"FEniCSDocker\") container.stop() ret...
[ "'or <appname>:<author>:<version>' ) app_fs = fs_class( appname, author=author, version=version, create=create ) app_fs =", "import OpenerError from ..subfs import ClosingSubFS from .. import appfs class AppFSOpener(Opener): \"\"\"``AppFS``", "= parse_result.resource.partition('/') tokens = resource.split(':', ...
[ "# Isolation Forest Hyper-parameters estimators = [200, 100] contaminations = [0.01] dimensions =", "tnr, 'model': 'svm', 'auc': area, 'f_beta': fb, 'projection': 'RP'}, ignore_index=True) return svm_results def", "n, 'TPR_train': tpr_train, 'TPR_test': tpr_test, 'TNR': tnr, 'model': 'svm', 'auc': area, 'f_beta...
[ "res[\"response_code\"]) def test_message_provider(self): res = send_message(self.provider, self.provider_token, to=self.user, msg=\"foo test\") self.assertEqual(2201, res[\"response_code\"]) def", "def setUp(self): self.provider = \"test_provider\" self.provider_banned = \"test_provider_msg_banned\" self.user = ...
[ "= [x if x < 180. else x-360. for x in X] return", "SphereGrid: XY = P.SphereGrid(Delta=Delta, Unwrap=Unwrap) else: XY = P.CartGrid(Dx=Delta, Dy=Delta, Bounds=Box) Win =", ".Selection as Sel import .Exploration as Exp import .CatUtils as CU #----------------------------------------------------------------------...
[ "\"\"\" super().__init__(name=name, supported_entities=[supported_entity], supported_language=supported_language) self.terms_recognizer = TermsRecognizer(phrase_list) self.allowed_prepositions = allowed_prepositions if allowed_prepositions else", "to the lexicon phrase itself). Empty list (which means preposition...
[ "folder, command, test ): filepath = PathToTestFile( folder, test[ 'req' ][ 0 ]", "'main.cpp', 4, 10 ), 'res': ( 'quote/b.hpp', 1, 1 ) }, { 'req':", "{ 'fixits': [] } ) ) def FixIt_Check_cpp11_MultiFirst( results ): assert_that( results, has_entries(", "27, 8 ), 'res': 'Cannot jump to location' }, ] for test ...
[ "JSON file. Args: filepath: path of the JSON file. \"\"\" with open(filepath, \"r\")", "scoring tool settings. \"\"\" def __init__(self): \"\"\"Initializes the Config instance. \"\"\" #Elasticsearch settings", "config from a JSON file. Args: filepath: path of the JSON file. \"\"\"", "self.sleep_not_idle_secs ...
[ "KIND, either express or implied. # See the License for the specific language", "Unless required by applicable law or agreed to in writing, software # distributed", "images_original[i]) ** 2) logger.info(\"MSE= {}\".format(str(np.mean(mse)))) if plot: visualize_list(images_original, images_invert) def test_inve...
[ "pos, expected in [[(1, 1), [(0, 1), (2, 1), (1, 0), (1, 2)]],", "1], [2, 2, 1, 1, 1], [1, 2, 1, 1, 1], [2, 2,", "t, candies): collector = candy.CollectCandies(n, m, t, candies) for pos, expected in [[(1,", "= candy.CollectCandies(n, m, t, candies) for pos, expected in [[(1, 1), [(0, 1),", "1, 1, 1], [2, 2,...
[ "song\" if not os.uname()[0].startswith(\"Darw\"): pygame.mixer.music.fadeout(1000) #fadeout current music over 1 sec. pygame.mixer.music.load(\"music/\" +", "\"play song\" if not os.uname()[0].startswith(\"Darw\"): pygame.mixer.music.fadeout(1000) #fadeout current music over 1 sec. pygame.mixer.music.load(\"musi...
[ "= 'query_items: Expecting FilterExpression parameter for table.scan() but non found' try: self.handler.table.scan.assert_called_once_with() #", "\"name\": \"<NAME>\"} self.handler.update_item(key, data) self.handler.table.update_item.assert_called_once() _, kwargs = self.handler.table.update_item.call_args self....
[ "\"Montreal\", \"Montreal\"] }) fig = px.bar(df, x=\"Fruit\", y=\"Amount\", color=\"City\", barmode=\"group\") app.layout = html.Div(children=[", "1, 2, 2, 4, 5], \"City\": [\"SF\", \"SF\", \"SF\", \"Montreal\", \"Montreal\", \"Montreal\"] })", "for more options df = pd.DataFrame({ \"Fruit\": [\"Apples\", \"Ora...
[ "failures.append( \"If any of %s is provided, all must be provided.\" % str(option_set)", "technology submitted.\", ) # require `contact` when uploading a PEM file if formStash.results[\"account_key_file_pem\"]", "the explicit-option privateKeySelection = _PrivateKeySelection() if private_key_option == \"privat...
[ "delay in streams NBitsData = 32; if( dtval.get() == 'int16'): NBitsData = 16", "Xilinx, Inc. # # Licensed under the Apache License, Version 2.0 (the \"License\");", "KIND, either express or implied. # See the License for the specific language", "in phases S = np.zeros((NPhases,int(NSamples1/NPhases),1+HasIma...
[ "int print(type(item1_quantity)) # int print(type(item1_price_total)) # int # output: # <class 'str'> #", "5 item1_price_total = item1_price * item1_quantity print(type(item1)) # str print(type(item1_price)) # int print(type(item1_quantity))", "int # output: # <class 'str'> # <class 'int'> # <class 'int'> #", ...
[]
[ "from .paging import get_page, select_page, process_args from .results import serialize_bookmark, unserialize_bookmark, Page, Paging", ".paging import get_page, select_page, process_args from .results import serialize_bookmark, unserialize_bookmark, Page, Paging __all__", ".columns import OC from .paging import...
[ "License. \"\"\"Simple model for image classification. The model is multiple conv/locally_connected/wide_conv/low_rank_locally_connected layers followed", "KIND, either express or implied. # See the License for the specific language", "= len(filters_list) self.pass_is_training_list = [] self.layers_list = [] if...
[ "between two data rates # Best viewed in the Mu serial plotter where", "# the data rate affects the resolution of the data while True: icm.gyro_data_rate_divisor", "# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries # SPDX-License-Identifier: MIT import time import", "= ICM20948(i2c) # Cycle betwe...
[ "x in range(a-1): out = '*' + ' ' * x + '*'", "* x + '*' + ' ' * x + '*' print(out.center(2*a-1)) a", "* (a-x-2) + '*' + ' ' * (a-x-2) + '*' print(out.center(2*a-1)) print('*'", "<gh_stars>0 a = int(input()) while a: for x in range(a-1): out = '*'", "* a - 1)) for x in range(a-1): out = '*' + '", "1)) for...
[ "get_key_methods: List[Callable]): print(f\"getting sorted paths from {root_path}...\") sorted_paths = get_sorted_paths(path=root_path) print(f\"got {len(sorted_paths)} sorted", "print(f\"got {len(related_path_details)} related paths\") print(\"building events...\") events = build_events_for_related_path_details(...
[ "2019-09-27 14:23 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('schoolio',", "Django 2.2.1 on 2019-09-27 14:23 from django.db import migrations, models class Migration(migrations.Migration): dependencies", "[ migrations.AlterField( model_name='student_assessm...
[ "<gh_stars>0 class Dataset: _data = None _first_text_col = 'text' _second_text_col = None _label_col", "elif isinstance(item, slice): start = item.start if item.start else 0 stop = item.stop", "item = self._data.iloc[item] if self._second_text_col: return item[self._first_text_col], item[self._second_text_col],...
[ "status of the command Returns ------- Boolean bool \"\"\" # subprocess command for", "Use the google scholar web URL and requests API to obtain the citations", "morphed_identity.text) else: return True else: # return just the status return False except:", "password req = TorRequest(password='<PASSWORD>') # r...
[ "t y2 = y0 + radius y3 = y0 + height - radius", "<URL: http://www.tinaja.com/bezarc1.pdf>.\"\"\" self._curves(pdfgeom.bezierArc(x1,y1, x2,y2, startAng, extent)) def arcTo(self, x1,y1, x2,y2, startAng=0, extent=90): \"\"\"Like", "to piddlePDF by <NAME>, 28/7/99. Draw a partial ellipse inscribed within the rectan...
[ "print text answer = wikipedia.summary(text,sentences=3) answer +=\"\\n\" print answer client.send_out(answer) #mic.say(answer) def isValid(text):", "\"entering wiki term\" text = client.grab_input() while text.upper()==\"WIKIPEDIA\": print \"entering while\" text =", "text answer = wikipedia.summary(text,sente...
[ "his \" , random.choice(plural) , \".\") print(\"In his report, the inspector \" +", "in range(2): a = input(\"Enter adjective : \") adjective.append(a) adverb = input(\"Enter adverb", "\") print(\"An inspector from the Department of Health and \", random.choice(noun) , \"", ", random.choice(adjective) , \" s...
[]
[ "self.light, pe.create_string_item(INVALID_ITEM_NAME))) def testOnSwitchTurnedOn_withNonApplicableZone_returnsFalse(self): zone = Zone('ff', [self.light, self.motionSensor]) self.zm.add_zone(zone) self.assertFalse(self.zm.get_immutable_instance().on_switch_turned_on( pe.get_event_dispatcher(), self.light,", "[sel...
[ "= OrderGoods.objects.filter(order_id = order_id, is_commented=False) return skus # 保存评论 class SaveSkuComment(CreateAPIView): serializer_class =", "orders.models import OrderInfo,OrderGoods from orders.utils import PageNum from rest_framework.filters import OrderingFilter # 展示订单信息", "sku in skus: sku.count = ca...
[ "log.info(f\"Starting player: {args.player}\") if player: player.open() except OSError as err: console.exit(f\"Failed to start", "or args.force_progress) ) show_record_progress = ( hasattr(output, \"record\") and isinstance(output.record, FileOutput) and output.record.fd", "# Linux / other else: os_version = pl...
[ "False tagcount = 0 thrashcount = 0 for item in foundMails: for tag", "new_list_new.append({\"totalsize\":totalsize}) logger.debug(new_list_new) #new_list_new.sort(key = lambda x : x[\"name\"]) return json.dumps(new_list_new, default=json_util.default) else: all_list", "import StringIO import json from bson.dbr...
[ "# # Licensed under the Apache License, Version 2.0 (the \"License\"); # you", "writing, software # distributed under the License is distributed on an \"AS IS\"", "50, 'monitoring_dataset': 'test_monitoring_dataset', 'monitoring_table': 'test_monitoring_table', 'monitoring_bq_conn_id': 'test_monitoring_conn', '...
[ "def add_arguments(self, parser): parser.add_argument('file', nargs=1, type=str, help=\"The XML file to load\") parser.add_argument('type', nargs=1,", "= None if options['delete']: collision_behavior = \"delete\" elif options['update']: collision_behavior = \"update\" else:", "Load Report\\n\\tNew: {len(new_ids...
[ "path='tests') self.assertFalse(is_there) for k in range(10): teststring = 'test%s' % k filename =", "as g: g.write(teststring) self.assertEqual(recfile.open(filename, \"r\").read(), teststring) is_there = recfile.exists(filename) self.assertTrue(is_there) recfile.remove(filename) is_there =", "g: g.write(tests...
[ "= subprocess.Popen( [\"aws\", \"lambda\", \"list-functions\"], stdout=subprocess.PIPE ) output = res.communicate() function_dict.update(json.loads(output[0])) return function_dict['Functions']", "subprocess import check_output, Popen, PIPE load_dotenv() # Accessing variables. CLIENT_ID = os.environ.get('CLIENT_I...
[ "# -*- coding: utf-8 -*- ########################################################################### ## Python code generated with wxFormBuilder (version", "wx.GBSpan( 1, 1 ), wx.ALL, 5 ) self.m_button03 = wx.Button( self, wx.ID_ANY, wx.EmptyString,", "onButton13Click( self, event ): event.Skip() def onButton14...
[ "module implements injectable Celery task. :copyright: (c) 2016-2020 by dry-python team. :license: BSD,", "(c) 2016-2020 by dry-python team. :license: BSD, see LICENSE for more details. \"\"\"", "--------------------------- This module implements injectable Celery task. :copyright: (c) 2016-2020 by dry-python t...
[ "0][x[..., 0]<0] += 1 x[..., 1] *= sat x[..., 2] *= val x[x>1]", "image.resize((nw,nh), Image.BICUBIC) new_image = Image.new('RGB', (w,h), (128,128,128)) new_image.paste(image, (dx, dy)) image_data = np.array(new_image)/255.", "hue) sat = rand(1, sat) if rand()<.5 else 1/rand(1, sat) val = rand(1,", "- crop_y...
[ "logging import pathlib logging.basicConfig(level=logging.INFO) # Dirs ROOT_DIR = pathlib.Path(__file__).parent.absolute() DUMP_DIR = ROOT_DIR /", "import pathlib logging.basicConfig(level=logging.INFO) # Dirs ROOT_DIR = pathlib.Path(__file__).parent.absolute() DUMP_DIR = ROOT_DIR / 'dumps'", "<gh_stars>0 impor...
[ "try: change = int(change) except ValueError: change = 0 else: change = 0", "Download the rankings page for the requested year and create a PyQuery object.", "for the final rankings or 'Preseason' for preseason rankings (str), 'previous': The team's", "most recent rankings from the Associated Press where each...
[ "'UPGO'], 'vtrace_error': ['hpc_rll.rl_utils.vtrace', 'VTrace'], } fn_str = fn_name_mapping[fn_name] cls = getattr(importlib.import_module(fn_str[0]), fn_str[1]) hpc_fn", "namedtuple_data=False, include_args=[], include_kwargs=[], is_cls_method=False): def decorate(fn): @wraps(fn) def wrapper(*args, **kwargs): if...
[ "#Return the count of int(s) in passed array. def number_of_occurrences(s, xs): return xs.count(s)" ]
[ "boolTrue#997275b5 = Bool; 0x3fedd339, # true#3fedd339 = True; 0x1cb5c415, # vector#1cb5c415 {t:Type} #", "' ').replace('>', '')\\ .replace('{', '').replace('}', '') representation = re.sub( r' \\w+:flags\\.\\d+\\?true', r'', representation", "on the specified scheme.tl file.\"\"\" layer_regex = re.compile(r'^/...
[ "arguments = [args], env = {\"RUNFILES_MANIFEST_FILE\": customresgen.files_to_run.runfiles_manifest.path}, mnemonic = \"CoreResxCompile\", input_manifests = resolve[1],", "\"Target\" else [src] dotnet.actions.run( inputs = inputs + resolve[0].to_list(), tools = customresgen.default_runfiles.files, outputs", "en...
[ "file is not meant to be run directly, use:\\n\\n\" \"\\tpython test/test_jit.py TESTNAME\\n\\n\" \"instead.\")", "sys from torch.testing._internal.jit_utils import JitTestCase # Make the helper files in test/ importable", "has a __constants__ attribute defined # and intialized to a list. class Net(torch.nn.Lin...
[ "import gym import pix_sample_arena import time import pybullet as p import pybullet_data import", "import pybullet as p import pybullet_data import cv2 if __name__ == \"__main__\": env", "__name__ == \"__main__\": env = gym.make(\"pix_sample_arena-v0\") x = 0 while True: p.stepSimulation() time.sleep(100)", ...
[ "from datetime import time import pytest from i3_battery_block_vgg.timeparser import __parse_time_manually from i3_battery_block_vgg.timeparser import", "] ) def test_manually_time_parsing(time_input: str, expected: time): assert __parse_time_manually(time_input) == expected, \"manual time", "(\"12:13:14\", tim...
[ "import annotations import mlir import pycde from pycde import (Input, Output, Parameter, module,", "label=\"top\"; # CHECK: [shape=record,label=\"{hw.constant\\ni32\\n\\nvalue: 23 : i32}\"]; poly.print() # CHECK-LABEL: hw.module @top() ->", "{parameters = {}} : (i32) -> i32 # CHECK: %example2.y_0 = hw.instance...
[ "arc.Endpoint.COMPUTINGINFO) ] retriever2 = retrieve(uc, computing_elements) # Get all the ExecutionTargets on these", "these ComputingServices targets2 = retriever2.GetExecutionTargets() sys.stdout.write(\"The discovered ExecutionTargets:\\n\") for target in targets2: sys.stdout.write(\"%s\\n\"%str(target))", ...
[ "is_exploration_public(exploration_id): \"\"\"Returns whether exploration is public. Args: exploration_id: str. ID of the exploration.", "import collection_services collection_services.update_collection_summary( activity_rights.id, None) def _update_activity_summary(activity_type, activity_rights): \"\"\"Updates ...
[ "work around this, mypy allows the typing import to be behind a False-y", "= [\"TYPE_CHECKING\", \"cast\"] # The TYPE_CHECKING constant defined by the typing module is", "use - uses the `typing` module, which provides core functionality fundamental to mypy's", "a curious maintainer can reach here to read this...
[ "// 2)) # can_sends.append(create_lta_steer_command(self.packer, actuators.steeringAngleDeg, apply_steer_req, frame // 2)) # we can spam", "== 0 and CS.CP.openpilotLongitudinalControl) or pcm_cancel_cmd: lead = lead or CS.out.vEgo < 12.", "between read value and gas cmd. # This prevents unexpected pedal range r...
[]
[ "code_size = SelectField('Size', choices=[('15', 'Size'), ('5', '5'), ('10', '10'), ('15', '15'), ('20', '20'),", "'Colour'), (\"white\", \"White\"), ('yellow', \"Yellow\"), ('lime', \"Green\"), (\"#ffa500\", \"Orange\")]) code_correction = SelectField('Error Correction',", "import FlaskForm from wtforms import...
[ "a stock price, and return the most recent (last) volatility estimate. Parameters ----------", "pandas.Series A series of adjusted closing prices for a stock. l : float", "the exponential moving average model. Making this value smaller will cause the model", "exponential moving average model of the volatility...
[ "q = map(int, sys.stdin.readline().split()) s = '$' + sys.stdin.readline().rstrip() lr = zip(*[map(int, sys.stdin.read().split())]", "'C') & 1 prev = s[i] for l, r in lr: yield res[r]", "= [None] * (n + 1); res[0] = 0 prev = '$' for", "lr: yield res[r] - res[l] if __name__ == '__main__': ans = main() print(*a...
[ "= torch.sqrt(torch.FloatTensor([embed_dim])).to(device) self.device = device def forward(self, trg, enc_src, trg_mask, src_mask): #trg =", "src len] batch_size = trg.shape[0] trg_len = trg.shape[1] pos = torch.arange(0, trg_len).unsqueeze(0).repeat(batch_size, 1).to(self.device)", "output = self.fc_out(trg) #o...
[ "from salt.exceptions import NxosClientError log = logging.getLogger(__name__) __proxyenabled__ = [\"nxos\"] __virtualname__ = \"nxos\"", "return False, err return __virtualname__ def system_information(proxy=None): if salt.utils.platform.is_proxy(): if proxy is None:", "False, err return __virtualname__ def sy...
[ "self.account = account self.id = device_id self.ipaddr = ipaddr self.mac = mac self.remote_custom_field", "{}, provider: {}, account: {}\"\"\".format( self.id, self.ipaddr, self.mac, self.unique_id, self.remote_custom_field, self.comment, self.last_online, self.last_fw_ver,", "unique_id: str = \"\") -> Optiona...
[ "def _walled_grad(field, dx, walls): assert field.shape == walls.shape assert dx > 0.0 grad", "Scalar.__init__(self, L, dim, dx, a_0=a_0) self.D = D self.dt = dt if self.D", "dim, dx, walls, D, dt, a_0=0.0): Diffusing.__init__(self, L, dim, dx, D, dt, a_0=a_0)", "make_repr_str(self, fs) class WalledScalar(Sca...
[ "variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/ \"\"\" import", "\"\"\" ASGI config for example_django project. It exposes the ASGI callable as a", "information on this file, see https://docs.djangoproject.com/en/3.2/howto/depl...
[ "function for combinations of discount factor and present bias values. The goal is", "function. Given observed moments and weighting matrix in `OUT_ANALYSIS`, \"msm_estimation\", generate values of", "{\"beta\": beta, \"delta\": delta, \"val\": val} results.append(result) return pd.DataFrame.from_dict(results) ...
[ "import dataclass from space_game.domain_names import KeyId from space_game.events.Event import Event @dataclass class KeyPressedEvent(Event):", "dataclass from space_game.domain_names import KeyId from space_game.events.Event import Event @dataclass class KeyPressedEvent(Event): key_id:", "from dataclasses imp...
[ "= frozenset([TEAMS_SUPPORT]) def __init__(self, config): self.webhook = config['webhook'] def send(self, message): heading =", "supports = frozenset([TEAMS_SUPPORT]) def __init__(self, config): self.webhook = config['webhook'] def send(self, message): heading", "logging from oncall.constants import TEAMS_SUPPO...
[ "test/valid data. \"\"\" if data is None: raise ValueError(\"Input invalid data of None\")", "save(self, checkpoint_file): \"\"\" Save the best model after HPO. :param checkpoint_file: The location", "OR CONDITIONS OF ANY KIND, either exp' # ress or implied. # See", "sync training results and checkpoints. It ...
[ "= unconstrained_RQS( upper, W, H, D, inverse = True, tail_bound = self.B) log_det", "@ self.w, 1) + self.b z = x + u * self.h(lin) phi", "nn.Parameter(torch.triu(torch.tensor(U, dtype = torch.float), diagonal = 1)) self.W_inv = None def forward(self, x):", "x, log_det class ActNorm(nn.Module): \"\"\" ActNorm...
[ "s.pop(), 0 if isinstance(op, tuple): op, num_args = op if op == \"unary", "# note: operands are pushed onto the stack in reverse order op2 =", "return fn[op](*args) elif op[0].isalpha(): raise Exception(\"invalid identifier '%s'\" % op) else: return float(op)", "else 1 if a > epsilon else 0, } exprStack = []...
[ "|= flags if dport in scan.ports: return # Add weight for port if", "scan.proto = proto self.scans[key] = scan def loop(self): pc = pcap.pcap() decode =", "None does scan using RST, however this could be # return packets from", "target host # If A does an idle scan on C with B", "socket import time import t...
[ "from itertools import combinations import copy def get_reverse(n): if n == 1: return", "elif target2[0] == domains2[0][0]: closetd2 = get_closet_domain_to_target(target2, domains2) return closetd1, closetd2 def get_closest_target(domains,", "visited[i]: visited[i] = True miggroup.append([i]) cnt += 1 for j in ...
[ "# # Licensed under the Apache License, Version 2.0 (the \"License\"); # you", "writing, software # distributed under the License is distributed on an \"AS IS\"", "specific language governing permissions and # limitations under the License. \"\"\" Sparse Fine-tuning", "task. Pointers for this are left as comm...
[ "# Raid configuration in progress, checking status if not driver_internal_info.get('ilo_raid_create_in_progress'): ilo_object.create_raid_configuration(target_raid_config) self._prepare_for_read_raid(task, 'create_raid')", "Unless required by applicable law or agreed to in writing, software # distributed", "# R...
[ ") from ...base.events import ( # These are generally just bootstrap events. DisposeCompleteEvent,", "...base.bus import ( EventBus, ListenerRegistrar, ListenerSetup, QueuePriority, ExtensionMetadataStruct, register_event, EVENT_WILDCARD, TARGET_WILDCARD, QUEUE_EVENT_NORMAL, QUEUE_EVENT_HIGH,", ") from ...base....
[ "\"<unknown device partition property %d>\") for v in info_value])) else: try: print(f\"{info_name}: {info_value}\")", "== cl.device_info and info_name == \"PARTITION_TYPES_EXT\" and isinstance(info_value, list)): print(\"{}: {}\".format(info_name, [ cl.device_partition_property_ext.to_string(v,", "= result.rep...
[ "and the following disclaimer in the documentation # and/or other materials provided with", "render_template(in_file, out_file, template_dir, json_path) # terminal nonlinear constraints if acados_ocp.constraints.constr_type_e == 'BGH' and", "ny: raise Exception('inconsistent dimension ny, regarding W, Vx, Vu.' ...
[ "sys.exit('The input of pch_size must be a integer or a int tuple!') if", "np.savez_compressed(noiseMapPath, estimatedNoiseMap) return estimatedNoiseMap except: return None # Example # if __name__ ==", "for start_y in rangey: end_x = start_x + psize end_y = start_y +", "- psize tileM = img[start_y:end_y, star...
[ "when the :class:`Application` is not in the specified :class:`AppState` `app_state`. Parameters ---------- app_state", "state. Calling the :func:`cancel()` method while the application is *RUNNING* or *FINISHED* leaves", "PROTECTED: Override when inheriting. \"\"\" pass @abc.abstractmethod def is_finished(self...