ngram
listlengths
0
82k
[ "animals which have been rehabilitated. Our mission is to promote", "center. We aim to help you connect with purrfect furbaby", "We aim to help you connect with purrfect furbaby for", "Rescue Center 🐾\" @app.route(\"/about\") def about(): return \"\"\"We are a", "= Flask(__name__) @app.route(\"/\") def hom...
[ "return bounding_box(xyz) def mesh_bounding_box_xy(mesh): \"\"\"Compute the (axis aligned) bounding box", "mesh_bounding_box(mesh): \"\"\"Compute the (axis aligned) bounding box of a mesh.", "The 8 corners of the bounding box of the mesh.", "point The 4 corners of the bounding polygon in the", "= [ 'mesh_bo...
[ "NaiveSourceSelection from star_based import StarBasedSourceSelection from utils import AskSourceSelector, HybridSourceSelector,", "import StarBasedSourceSelection from utils import AskSourceSelector, HybridSourceSelector, StatSourceSelector from charset_selector", "StarBasedSourceSelection from utils import As...
[ "201/21/19 10:47 @Author : TaylorMei @Email : <EMAIL> @Project :", "\"\"\" @Time : 201/21/19 10:47 @Author : TaylorMei @Email :", "10:47 @Author : TaylorMei @Email : <EMAIL> @Project : iccv", "@Time : 201/21/19 10:47 @Author : TaylorMei @Email : <EMAIL>", ": TaylorMei @Email : <EMAIL> @Project : iccv @File ...
[ "2) dq = np.quaternion(w, *v) q = (dq * q)", "is None: assert False, 'Give either tol or points' elif", "importlib._bootstrap>\"), # tracemalloc.Filter(False, \"<unknown>\"), # )) # top_stats = snapshot.statistics(key_type,", "def smooth1d(xt, x, Y, weight_fun=lambda d: 0.9 ** abs(d)): if", "* max_rng) for ...
[ "the edges gx = edges[:, :, 0] gy = edges[:,", "tmp_kernel.unsqueeze(1).unsqueeze(1) # convolve input tensor with sobel kernel kernel_flip =", "4: raise ValueError(\"Invalid input shape, we expect BxCxHxW. Got: {}\"", "{}\" .format(input.shape)) # allocate kernel kernel = get_spatial_gradient_kernel3d(mode, o...
[ "line in io.TextIOWrapper(f, encoding='ascii'): fields = line.split() if fields[6] ==", "glob from concurrent import futures def find_robots(filename): ''' Find all", "all of the hosts that access robots.txt in a single", "'/robots.txt': robots.add(fields[0]) return robots def find_all_robots(logdir): ''' Fin...
[ "from setuptools import setup setup( name=\"runestone-docker-tools\", version=\"0.1\", install_requires=[\"click\"], entry_points={ \"console_scripts\":", "****************************************************************** from setuptools import setup setup( name=\"runestone-docker-tools\", version=\"0.1\", insta...
[ "CallData WHERE start_time < \"{till}\" AND start_time > \"{since}\";' result", "def query_4(): headers = [\"Dialled Number\",\"Total Dialled Calls\",\"Total Duration\"] query", "query = f'''SELECT called_number, count(*) as 'Frequency', sum(duration) as 'Total", "and Loaded to Database Successfully\" @app.ro...
[ "cnnblstm_with_adabn.PARAMS_FILE)) # self.ae.save_params() # print(\"save_params success!\") def save_adabn_variables(self): \"\"\" save", "in self.children() if model not in [self.ae]] optimizer = torch.optim.Adam(params,", "in net3_weights: nn.init.xavier_uniform_(params_data) for name, params_data in net3_bi...
[ "task should use \" f\"different task name.\" ) # Combine", "ignore \"\"\"Load the state dict. Args: state_dict: The state dict", "the current model, skip...\") return # Remove task by task_name", "raise ValueError(f\"Unrecognized task type {task}.\") if task.name in self.task_names: raise", "does not exist...
[ "elif command == \"play-sound\": sound_id = params[\"sound\"] self._soundpad.playSound(sound_id) elif command", "\"play-sound\": sound_id = params[\"sound\"] self._soundpad.playSound(sound_id) elif command == \"stop-sound\": self._soundpad.stopSound()", "for socket in self._index_sockets: await socket.send(msg)...
[ "route.get('total_time') node_osm_ids = route.get('node_osm_ids') points = route.get('points') edges = route.get('edges')", "} timetable_document: { '_id', 'timetable_id', 'bus_line_id', 'bus_vehicle_id', 'timetable_entries': [{ 'starting_bus_stop':", "'_id', 'client_id', 'bus_line_id', 'starting_bus_stop': {'_...
[ "agent.model.restore(directory=\"\", file=save_path) restored_model_values = agent.model.session.run(agent.model.get_variables( include_submodules=True, include_nontrainable=False )) assert len(model_values)", "train_step = optimizer.minimize(loss) batch_size = 64 with tf.Session(graph=g) as sess:", "+ \".index...
[ "return (x.a, x.b, x.c, x.d) def fromTuple(x): ret=msg.Guid() ret.a=x[0] ret.b=x[1]", "(x.a, x.b, x.c, x.d) def fromTuple(x): ret=msg.Guid() ret.a=x[0] ret.b=x[1] ret.c=x[2]", "and x.d==0) def setZero(x): x.a=0; x.b=0; x.c=0; x.d=0 def toStr(x):", "x.a=0; x.b=0; x.c=0; x.d=0 def toStr(x): return \"%08x-%08x-%...
[ "from .instructionreporter import InstructionReporter as InstructionReporter from .instructionreporter import SerumInstructionReporter", "ModelState from .notification import CompoundNotificationTarget as CompoundNotificationTarget from .notification import", "ImmediateTradeExecutor from .tradeexecutor import N...
[ "Gutenberg Project: https://www.gutenberg.org/ebooks/author/69 lc.showPlots(text_directory_pathname=\"./Books/\", title=\"<NAME>'s favourite letters\", legend_label_main=\"in Doyle's stories\")", "form Gutenberg Project: https://www.gutenberg.org/ebooks/author/69 lc.showPlots(text_directory_pathname=\"./Books/\",...
[ "getType(self): return bbTurret def fromDict(turretDict): if turretDict[\"builtIn\"]: return bbData.builtInTurretObjs[turretDict[\"name\"]] else:", "wiki=wiki, manufacturer=manufacturer, icon=icon, emoji=emoji) self.dps = dps def statsStringShort(self): return", "\"\", manufacturer=turretDict[\"manufacturer\"] ...
[ "urlpatterns = [ path(\"\", WCICFilterView.as_view(), name=\"wcic-start\"), path(\"results/\", WCICResultView.as_view(), name=\"wcic-results\"), ]", "path from what_can_i_cook.views import WCICFilterView, WCICResultView app_name = \"wcic\" urlpatterns", "import WCICFilterView, WCICResultView app_name = \"wcic\"...
[ "escape dot, this is used in oval regex data[\"escaped_arg_name_value\"] =", "used in test / object / state ids data[\"sanitized_arg_name\"] =", "\"=\" + data[\"arg_value\"] if lang == \"oval\": # escape dot,", "data[\"arg_name\"] + \"=\" + data[\"arg_value\"] if lang == \"oval\": #", "is used in oval regex...
[ "'rev_eng_tok', col2= 'teach_force_tok', col3= 'target_tok'): enc_seq= np.array([df[col1].values[i] for i in", "y= np.array([df[col3].values[i] for i in range(len(df[col3]))]) y= tf.data.Dataset.from_tensor_slices(y).batch(params.batch_size) return enc_seq,", "df_col] if not nlp_en: vocab.update([\"<sos>\"]) vo...
[ "as fstream: long_description = fstream.read() setup( name='dsigma', version='0.5.0', description=('A Galaxy-Galaxy", ":: Python :: 3.7', ], keywords='astronomy, weak-lensing', url='https://github.com/johannesulf/dsigma', author='<NAME>, <NAME>',", "Only', 'Programming Language :: Python :: 3', 'Programming Lan...
[ "frame_h) # prepare text, depending on what atributes we predict", "draw_bbox(self, face_probs, bbox_dict, frame, col = (255, 0, 255), gender", "gender + \": \" + str(round(gender_score, 2)) # draw bbox", "0.5): self.model_selection = model_selection self.threshold = threshold self.mp_draw = mp.solutions.draw...
[ "formatter = logging.Formatter(FORMAT, DATE_FMT) # # # Create handler and", "= squid_py.did.did_to_id(registered_did) owner = ocn._keeper.did_registry.contract_concise.getDIDOwner(asset_id) # print(\"Asset ID\", asset_id, \"owned", "logging.info(\"Encrypted files to secret store, cipher text: [{}...] . \".forma...
[ "coding: utf-8 -*- \"\"\" pyRofex.components.messages Defines APIs messages templates \"\"\"", "instrument in a market data subscription message INSTRUMENT = '{{\"symbol\":\"{ticker}\",\"marketId\":\"{market}\"}}'", "-*- coding: utf-8 -*- \"\"\" pyRofex.components.messages Defines APIs messages templates", "'...
[ "fibonacci(n): return str(fib(int(n))) if __name__ == \"__main__\": app.run(host='0.0.0.0', port=8082, debug=True)", "def count(key): return requests.get('http://127.0.0.1:8080/count/{}'.format(key)).text @app.route('/fibonacci/<n>') def fibonacci(n): return str(fib(int(n))) if", "return requests.get('http://12...
[ "This state is also used for recalled exceptions! class VulnerabilityExceptionReason(object):", "self.id = 0 self.vulnerability_id = '' self.vulnerability_key = '' self.expiration_date", "division, print_function, unicode_literals) from builtins import object from .xml_utils import", "self.reason = '' self.sc...
[ "import AppConfig class SignupConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'signup'", "django.apps import AppConfig class SignupConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name =", "from django.apps import AppConfig class SignupConfig(AppConfig): def...
[ "# 成批写 WriteBatch = 0x1401 class EnumSubCmd(Enum): # 有存储扩展模块b7=0,b6=0:随机读出,监视数据注册用外 #", "按字读写 WordEx = 0x0080 class EnumType(Enum): # 位类型 Bit =", "0xD400 class EnumEndCode(Enum): # 正常应答 Ok = 0x0000 # 异常应答", "按位读写 BitEx = 0x0081 # 按字读写 WordEx = 0x0080 class", "Request4e = 0x5400 # 请求 Request = 0x5000 # 应答", ...
[ "import path from jsonschema_typed import JSONSchema with path(\"sentry_data_schemas\", \"event.schema.json\") as", "path from jsonschema_typed import JSONSchema with path(\"sentry_data_schemas\", \"event.schema.json\") as schema_path:", "jsonschema_typed import JSONSchema with path(\"sentry_data_schemas\", \"e...
[ "char_indices = dict((c, i) for i, c in enumerate(chars)) indices_char", "chars = set(text) print('total chars:', len(chars)) char_indices = dict((c, i)", "for i, c in enumerate(chars)) indices_char = dict((i, c) for", "generated = '' sentence = text[start_index: start_index + maxlen] generated", "= model.p...
[ "New instance correctly added to object_list.\") def test_03__check_if_container_time_to_live_not_elapsed__return_bool(self): self.assertIsInstance(self.box.is_alive(), bool,", "simulation import container from simulation import person class ContainerTestCase(unittest.TestCase): def", "= 0 self.assertFalse(self...
[ "migrations.AddField( model_name=\"locale\", name=\"cldr_plurals\", field=models.CommaSeparatedIntegerField( blank=True, max_length=11, verbose_name=b\"CLDR Plurals\", validators=[pontoon.base.models.validate_cldr], ),", "from django.db import models, migrations import pontoon.base.models class Migration(migratio...
[ "program. In C, the usual convention is to give header", "here\" % click.style(\"src\", fg=\"cyan\")) click.echo( \"%s - Project Configuration File\"", "C++, etc) located in `src` folder by including it, with", "C preprocessing directive `#include'. ```src/main.c #include \"header.h\" int main (void)", "fil...
[]
[ "return_403=True) def my_view(request): return HttpResponse('Hello') @permission_required('auth.change_user', (User, 'username', 'username')) def", "django.db.models import Model, get_model from django.db.models.base import ModelBase from django.db.models.query", "Defaults to ``django.conf.settings.LOGIN_URL``....
[ "from django import forms from django.forms import ModelForm from images.models", "import ModelForm from images.models import Image class ImageForm(ModelForm): class Meta:", "ModelForm from images.models import Image class ImageForm(ModelForm): class Meta: model", "forms from django.forms import ModelForm fro...
[ "self._analogCount @request(\"GET\", \"analog/resolution\") @response(\"%d\") def analogResolution(self): return self._analogResolution @request(\"GET\", \"analog/max\")", "channel): self.checkPWMChannel(channel) return self.__pwmRead__(channel) @request(\"GET\", \"pwm/%(channel)d/float\") @response(\"%.2f\") def...
[ "# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law", "distributed on an \"AS IS\" BASIS, WITHOUT # WARRANTIES OR", "may obtain # a copy of the License at #", "self.cmd = train.TrainList(self.app, None) def test_train_list(self): arglist = [] verifylist", "import base from ...
[ "`firefox -version` first to check the version if len(sys.argv) ==", "join(dirname(abspath(__file__)), 'firefox') argvs = list(sys.argv) argvs[0] = FIREFOX_BINARY # geckdriver", "# Note this does not resolve symbolic links # https://stackoverflow.com/a/17806123", "old_profile_path, new_profile_path]) argvs[id...
[ "object instead of a dictionary and make use of the", "is not None and ps > Decimal(self.settings._total_max): return False if", "you don\\'t select any country, all countries are allowed. This", "self.identifier, event) # Default values if self.settings.get('_fee_reverse_calc') is None: self.settings.set('_f...
[ "execute(self): corr = CorrelatorHelper(self, name='correlator') corr.start(logfile='correlator.log') corr.injectEPL(os.getenv('APAMA_HOME','') + '/monitors/ManagementImpl.mon') corr.injectEPL(os.getenv('APAMA_HOME','')", "+ '/monitors/ManagementImpl.mon') corr.injectEPL(os.getenv('APAMA_HOME','') + '/monitors/Ma...
[ "\"-std=c++11 -frtti -fno-strict-aliasing -DWOMBAT\" }\"\"\" ENV = \"\"\" # An", "import Terminal Terminal.CAN_CHANGE_COLOR = False JSON = \"\"\" { \"FOO\":", "'bar bar bar', 'CPPFLAGS': '-std=c++11 -frtti -fno-strict-aliasing -DWOMBAT', } BAD_ENV", "RESULT) self.assertEqual(errors, [ \"WARNING: Didn't unders...
[ "= User.objects.create_user(username='testusername', password='<PASSWORD>') self.custom_user = CustomUser.objects.create(django_user=self.django_user) def test_apps(self): self.assertEqual(SigninConfig.name, 'signin')", "def test_login(self): response = self.client.post('/sign_in/', {'username': 'testusername', '...
[ "data def setLeft(self, aNode): self.left = aNode def setRight(self, aNode):", "getData(self): return self.data def getLeft(self): return self.left def getRight(self): return", "data, left, right): self.data = data self.left = left self.right", "def setLeft(self, aNode): self.left = aNode def setRight(self, a...
[ "tokens ): \"\"\" Turns a list of tokens into a", "B* = A and B ... C* = not C", "turnoff ) tokens = tokenize( text ) init = init_tokens(", "init_lines.extend( [ '%s=True' % node for node in turnon ]", "contain assignment to any of the nodes Will use the", "Lexer: \"\"\" Lexer for boolean rules \"\"\" lit...
[ "Test that the type validation gets called on values entered", "['--opt=']) self.assertIsNone(result.exception) self.assertEqual(result.output, '\\n') def test_default_empty_prompt(self): \"\"\"Test that default=\"\" allows", "for the InteractiveOption.\"\"\" from __future__ import absolute_import import unitte...
[ "required for the prereg-prize \"\"\" import json import sys import", "value in schema.items() } registered_schemas.append(meta_schema._id) db['node'].update( {'_id': node['_id']}, {'$set': {", "MetaSchema.find( Q('name', 'eq', name) ).sort('-schema_version')[0] except IndexError as e: logger.error('No", "= '...
[ "childref = weakref.ref(child) netref = weakref.ref(self.network) def undo(update=True): parent =", "MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO", "is not None and toReverse is not None and network", "substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS", "not...
[ "class Edge: def __init__(self, target, weight): self.target = target self.weight", "Edge('x', 6), Edge('z', 3)]) tsp.add_vertex('x', [Edge('w', 6), Edge('z', 3), Edge('y',", "arbitrarily long edge will complete the graph without affecting the", "self.weight = weight def __repr__(self): return self.target cla...
[ "\"y\": hero.pos.y + 28} moveBothTo(nextPoint) nextPoint = {\"x\": hero.pos.x +", "while True: hero.command(peasant, \"buildXY\", \"decoy\", peasant.pos.x + 2, peasant.pos.y) var", "\"decoy\", peasant.pos.x + 2, peasant.pos.y) var nextPoint = {\"x\": hero.pos.x,", "= {\"x\": hero.pos.x + 28, \"y\": hero.pos.y...
[ "start + 1 < end: mid = start + (end", "1 end = n while start + 1 < end:", "isBadVersion API is already defined for you. # @param version,", "a bool # def isBadVersion(version): class Solution(object): def firstBadVersion(self, n):", "defined for you. # @param version, an integer # @return", "# @return a ...
[ "('High', 'High')], default='Low', max_length=20)), ('assignee', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='assigned', to=settings.AUTH_USER_MODEL)), ('creator', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,", "('Medium', 'Medium'), ('High', 'High')], default='Lo...
[ "Complete.' path = path.replace('file', 'analysis') conn = httplib.HTTPConnection(host) conn.request('GET', path)", "file...' conn.close() time.sleep(15) print '[+] Scan Complete.' path = path.replace('file',", "\"\\r\\nSubmit File\\r\\n\" params += \"------WebKitFormBoundaryF17rwCZdGuPNPT9U--\\r\\n\" conn = ht...
[ "add_reminder( self, ctx, date: str, user_time: str, text: str, repeating:", "raise commands.UserInputError(\"Date or time was not in the correct format.\")", "tasks asyncio.gather(*self.tasks) async def clear_tasks(self): for task in self.tasks: if", "result: await asyncio.create_task(self.setup_reminders())...
[ "'free-to-use'], long_description=long_description, long_description_content_type='text/markdown', url='https://github.com/csengor/toraman-py', packages=setuptools.find_packages(), install_requires=[ 'lxml', 'python-levenshtein', 'regex' ],", "], classifiers=[ 'Development Status :: 3 - Alpha', 'License ::", "o...
[ "unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies =", "Migration(migrations.Migration): dependencies = [ ('cms_pages', '0014_homepage_news_count'), ] operations = [", "from __future__ import unicode_literals from django.db import models, migrations cl...
[ "EvalModelTemplate from tests.base.develop_utils import reset_seed class ModelWithManualGradTracker(EvalModelTemplate): def __init__(self, norm_type,", "2.0 (the \"License\"); # you may not use this file", "val_dataloader = None def training_step(self, batch, batch_idx, optimizer_idx=None): # just", "flat = p...
[ "'tf.assert_rank_in': 'tf.compat.v1.assert_rank_in', 'tf.assert_same_float_dtype': 'tf.debugging.assert_same_float_dtype', 'tf.assert_scalar': 'tf.compat.v1.assert_scalar', 'tf.assert_type': 'tf.compat.v1.assert_type', 'tf.assert_variables_initialized': 'tf.compat.v1.assert_variables_initialized',", "should be up...
[ "for index in index_list]) def ctc_decode(probs_seq, vocabulary, method): \"\"\" CTC-like", "decoding or greedy decoding. Path consisting of the most probable", "len(prob_list) == len(vocabulary) + 1: raise ValueError(\"probs dimension mismatchedd with", "dimension verification for probs in probs_seq: if not ...
[ "%s (FORCED)...\" % ref.name) subprocess.check_call([\"git\", \"push\", \"-f\", ghurl, \"%s:%s\" %", "= \"git@github:apache/%s.git\" % cfg.repo_name os.chdir(\"/x1/repos/asf/%s.git\" % cfg.repo_name) try: for ref", "print(\"Syncing %s...\" % ref.name) subprocess.check_call([\"git\", \"push\", ghurl, \"%s:%s\" %...
[ "ROS limitations) - my_pkg/__init__.py # doesnt really matters ( we", "is not supported\".format(rosdef_extension)) import filefinder2.machinery class ROSDefLoader(filefinder2.machinery.SourceFileLoader): \"\"\" Python Loader", "ROS communication, although it cannot be used as another package", "import failed...
[ "+= \"\\n\" + \"=\" + (\" \" * 48) +", "\"\\n\" + \"=\" + (\" \" * 48) + \"=\"", "sys.stdout.write( color(msg, \"red\") ) def warning(self, msg): sys.stdout.write( color(msg, \"yellow\")", "color(msg, \"yellow\") ) def success(self, msg): sys.stdout.write( color(msg, \"green\") )", "50 msg += \"\\n\" + \"=\...
[ "= [\"pytimeparse==1.1.8\"] # Dev Requirements EXTRA_REQUIRE = { \"tests\": [", "\"docs\": [ \"sphinx==4.3.1\", \"sphinx-rtd-theme==1.0.0\", \"sphinx-click>=3.0,<3.1\", \"myst-parser>=0.16, <0.17\", \"docutils>=0.17,<0.18\", ], }", "url=\"https://github.com/getindata/dbt-airflow-factory/\", packages=find_packag...
[ "MISSING_CONFIG_VALUE = \"\"\" '{0}' is not specified or invalid in", "strings raised by the application.\"\"\" MISSING_CONFIG_VALUE = \"\"\" '{0}' is", "raised by the application.\"\"\" MISSING_CONFIG_VALUE = \"\"\" '{0}' is not", "application.\"\"\" MISSING_CONFIG_VALUE = \"\"\" '{0}' is not specified or in...
[ "msg = serialize(data, protocol_version=protocol_version, dummy_timestamps=True) d, m = deserialize(msg) assert", ".utils import compare_nested_dict def test_serialize(data, protocol_version): msg = serialize(data, protocol_version=protocol_version)", "= serialize(data, metadata, protocol_version=protocol_versi...
[ "def monkeypatch_methods(monkeypatch): \"\"\"Monkeypatch all methods from `cls` onto `target`. This", "multiple methods in an existing class. In case of classmethods", "need to copy the underlying function method = method.__func__ monkeypatch.setattr(f'{target}.{name}',", "it using the actual `now()` function...
[ "LOG_FILE = \"log.txt\" # 是否启用日志 ENABLE_LOGGER = True # 循环检查的间隔时间(默认:", "20 # 是否为 Socks5 代理 IS_SOCKS = False # 是否启用", "是否启用日志 ENABLE_LOGGER = True # 循环检查的间隔时间(默认: 180分钟) LOOP_CHECK_INTERVAL = 180", "* 60 # 代理服务器 PROXIES = \"127.0.0.1:1080\" # 请求超时 TIMEOUT", "Socks5 代理 IS_SOCKS = False # 是否启用 TG BOT 发送消息的功能"...
[ "= session.query(HipaaData).filter( or_(HipaaData.profile.like('%{}%'.format(key)), HipaaData.result.like('%{}%'.format(key)), HipaaData.level.like('%{}%'.format(key)), HipaaData.region.like('%{}%'.format(key)), HipaaData.account_id.like('%{}%'.format(key)), HipaaData.group.like('%{}%'.format(key)), HipaaData.group...
[ "std_msgs.msg import Int32 import time rospy.init_node('count') # ノード名「count」に設定 pub =", "import time rospy.init_node('count') # ノード名「count」に設定 pub = rospy.Publisher('count_up', Int32, queue_size=1)", "ノード名「count」に設定 pub = rospy.Publisher('count_up', Int32, queue_size=1) # パブリッシャ「count_up」を作成 rate =", "0: pri...
[ "\"v2m\" : { \"nodetype\" : \"namednumber\", \"number\" : \"2\" },", "\"type\" : { \"module\" :\"SNMPv2-SMI\", \"name\" : \"IpAddress\"}, }, \"access\"", "\"2\" }, }, }, \"access\" : \"readwrite\", \"description\" : \"\"\"This", "column \"ospfLsdbExtTable\" : { \"nodetype\" : \"table\", \"moduleName\" : \"ZYX...
[ "\"\"\"Schedules an action to be executed after duetime.\"\"\" duetime =", "via a timed callback based upon platform.\"\"\" def schedule(self, action,", "period, action): timer = Timer(period, action) timer.setDaemon(True) timer.start() return timer", "an action to be executed after duetime.\"\"\" scheduler =...
[ "link.text.split(\"-\")[1].split(\".tar.gz\")[0] elif (versionMajor == maxVersionMajor and versionMinor == maxVersionMinor and", "maxVersionMajor and versionMinor == maxVersionMinor and versionPatch == maxVersionPatch and", "versionSubpatch = int(version[3]) if versionMajor > maxVersionMajor: maxVersionMajor = ...
[ "import partial from pathlib import Path from typing import Optional", "np.histogram(finite_values, bins=max_bins, weights=None) return stats def chi_square( values: Optional[np.ndarray] =", ") def mad(arr: np.ndarray) -> np.ndarray: \"\"\"Median Absolute Deviation: a", "return counts.sum() - len(counts) def ...
[ "check_sizes(img, 'img', 'BCHW') check_sizes(flow, 'flow', 'B2HW') bs, _, h, w", "depth, pose, intrinsics, intrinsics_inv, rotation_mode='euler', padding_mode='zeros'): \"\"\" Inverse warp a", "(X.abs()>1).add(Y.abs()>1)>0 return oob def occlusion_mask(grid, depth): check_sizes(img, 'grid', 'BHW2') check_sizes(...
[ "the gradient EMA. gain_learning_rate: `float` gain learning rate. scale_learning_rate: `float`", "corrected_gbar), self._min_gain, self._max_gain) # Normalized update uses sign(grad) * sign(gbar)", "_resource_apply_sparse(self, grad_values, var, grad_indices): return control_flow_ops.no_op() def _apply_sparse(...
[ "minibatch inp = dev_train.slice(batch*batch_size,(batch + 1)*batch_size) target = dev_lbl.slice(batch*batch_size,(batch +", "0.01 momentum = 0.9 num_epochs = 30 batch_size = 128", "num_batches = dat_train.shape[1]//batch_size # model parameters dim_in = dat_train.shape[0] dim_out", "1, beta = momentum) # upd...
[ "- PI[3]) # The RCP scenarios give a negative forcing", "include temperature feedback on ozone forcing? fix_pre1850_RCP: Use different relationship", "em_NMVOC F_NOx = beta[3] * em_NOx F = F_CH4 +", "and NOx emissions beta: : coefficients of how CH4 concentrations,", "np from ..constants import molwt def re...
[ "db, schemas, mappings, prepare_es): with disable_test_authenticated(): with db.session.begin_nested(): draft_uuid =", "'2', 'ref': {'published': '1'}, 'ref_pub': {'published': '3'}, 'title': 'rec2'} es_draft2", "PublishedRecord.create({ 'id': '3', 'title': 'rec1a' }, id_=published_uuid) published_pid = Persist...
[ "\"GRAY8\" if liveview: p = 'tcambin serial=\"%s\" name=source ! video/x-raw,format=%s,width=%d,height=%d,framerate=%d/1'", "a property. Use list_properties for querying names of available properties.", "GLib.Error as error: raise RuntimeError(\"Error get Property {0}: {1}\", property_name,", "\"\"\" Construc...
[ "from typing import Dict, Any from yaml import load def", "raise Exception('ERROR: Missing config/config.yml file.') from e CONFIG = get_config()", "load(open('config/config.yml').read()) except Exception as e: raise Exception('ERROR: Missing config/config.yml file.')", "get_config() -> Dict[str, Any]: try: r...
[ "* cp.pnorm(X, p=1) + p_lambda_tv * tv # constraints constr", "1) # opimiztion problem prob = cp.Problem(cp.Minimize(obj), constr) # init", "if tv_type == 'iso': D = [x*x for x in", "1 # if additional_constraint is 'sum_to_one' with || X ||_1", "array - N x m_1 x ... x m_d, target", "reshape Y from [spect...
[]
[ "self._name = value @property def attribute_type(self): return self._attribute_type @attribute_type.setter def", "from_dict(cls, element_attribute_as_dict): return cls(name=element_attribute_as_dict['Name'], attribute_type=element_attribute_as_dict['Type']) def __eq__(self, other): return self.name", "name(self...
[ "'No Stock by this name' } def update_portfolio_buy(ticker, units, total_price):", "return False def remove_from_watchlist(ticker): try: Watchlist.query.filter(Watchlist.ticker == ticker).delete() db.session.commit() return", "= db.session.query(func.max(Activity.activity_id)).scalar() old_buying_power = Activi...
[ "verts: vert_cos = [obj_mtx @ v.co for v in verts]", "modified = [] for v,co in zip(verts, vert_cos): new_coords =", "od = obj.data bm = bmesh.from_edit_mesh(od) obj_mtx = obj.matrix_world.copy() verts", "i in co]) if new_coords != old_coords: new_coords = new_coords", "world grid step.\" bl_options = {'REG...
[ "import AVLTree class AVLTreeUpdateTest(unittest.TestCase): def test_add_one(self): a = AVLTree() a.update({1:'a'})", "import unittest from pyavl3 import AVLTree class AVLTreeUpdateTest(unittest.TestCase): def test_add_one(self):", "AVLTree class AVLTreeUpdateTest(unittest.TestCase): def test_add_one(self): a =...
[ "open('input5.txt') as f: for line in f.readlines(): line = line[:-1]", "line[:-1] row = binary(line[:7], 7, {'F': '0', 'B': '1'}) col", "= binary(line[7:], 3, {'R': '1', 'L': '0'}) sid = row", "as f: for line in f.readlines(): line = line[:-1] row", "= [] for i in range(max): ret.append(bits[code[i]]) retu...
[ "base_method(self) -> str: \"\"\" Base method. \"\"\" return \"hello from", "init and then choose `flask` as template. \"\"\" class BaseClass:", "classes and objects. Be creative! do whatever you want! If", "self.base_method() def base_function() -> str: \"\"\" Base function. \"\"\" return", "`flask` as tem...
[ "GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): def do_GET(self): self.send_response(200) self.send_header('Content-type','text/html') self.end_headers() self.wfile.write(\"Hello World ! '{}'\".format(self.path))", "python import SimpleHTTPServer import SocketServer import logging PORT = 8000", "class G...
[]
[ "open_output, get_args import boto3 # from boto.s3.connection import S3Connection import", ".log files (even those in subdirs or .zip) and combines", "in obj.key: print(\"Name: %s LastModified:%s\" % (obj.key.encode('utf-8'), obj.last_modified)) for fn,", "#!/usr/bin/env python3 # Usage: # $0 -o log.txt produ...
[ "the book chapters, printing the status of each link found", "be printed. \"\"\" chapters_f = open(chapters_list_filename, 'r') pattern = re.compile(r'\\[([^]]+)]\\(\\s*(http[s]?://[^)]+)\\s*\\)')", "Checks for broken links in the book chapters, printing the", "book chapters, printing the status of each link ...
[ "# -*- coding = utf-8 -*- # @Time: 2020/9/4 18:52", "coding = utf-8 -*- # @Time: 2020/9/4 18:52 # @Author:", "-*- coding = utf-8 -*- # @Time: 2020/9/4 18:52 #", "-*- # @Time: 2020/9/4 18:52 # @Author: dimples_yj # @File:", "# @Time: 2020/9/4 18:52 # @Author: dimples_yj # @File: __init__.py.py", "@Time: 20...
[ "image_id # compute features images = model.preprocess_image(inputs) features = model.backbone(images.tensor)", "dump_folder = \"/dnn/sheng.s/clip_boi/grid-feats-vqa/\" + dump_folder if not os.path.exists(dump_folder): os.makedirs(dump_folder) for", "with PathManager.open(os.path.join(dump_folder, file_name), \...
[ "def get_chain(): chain_data = [] for block in blockchain.chain: chain_data.append(block.__dict__)", "from flask import Flask, request import time import requests import", "chain_data }) @app.route('/mine', methods=['GET']) def mine_unconfirmed_transactions(): result = blockchain.mine() if", "def validate_and...
[ "y) if x < size-1: visit(grid, x+1, y) if y", "numpy as np size = 1000 def create_wall(x, y): return", "visit(grid, x+1, y) if y > 0: visit(grid, x, y-1)", "np size = 1000 def create_wall(x, y): return \"{0:b}\".format(x**3 +", "x-1, y) if x < size-1: visit(grid, x+1, y) if", "i in range(size) for j in ra...
[ "criarTabela(\"tracks\",\"title text,plays integer\") music=[('trunder',20), ('my way',15)] insertInto(\"tracks\",\"title,plays\",music) #cur.executemany(\"insert into tracks", "integer\") music=[('trunder',20), ('my way',15)] insertInto(\"tracks\",\"title,plays\",music) #cur.executemany(\"insert into tracks (tit...
[ "range thresholded_df = self.flow_df[self.flow_df['distance'] > motion_threshold].copy() if thresholded_df.empty: is_static =", "column of interest frame_size: Returns: Proportion of pixels that are", "1 moving frame per 4 frames is_static = pts_ratio <", "around beginning/end of scene if remove_transitions: ...
[ "font = {'family': 'normal', 'weight': 'bold', 'size': 22} matplotlib.rc('font', **font)", "True} if use_cuda else {} if args.dataset == 'mnist': test_loader", "= [40, 80] # VGG elif args.dataset == 'fmnist': test_loader", "Training settings parser = argparse.ArgumentParser(description='PyTorch MNIST Example'...