ngram
listlengths
0
67.8k
[ "\"applicant_id\": app.ref_id}) row += [vemp.status] else: row += [\"-\"] if cg.address_check4 == 1:", "emp = frappe.get_doc(\"Family Check1\", { \"applicant_id\": app.ref_id}) if emp.status != \"Allocation Completed\": row", "emp = frappe.get_doc(\"Reference Check1\", { \"applicant_id\": app.ref_id}) if emp.st...
[ "register(name): def decorator(cls): datasets_dt[name] = cls return cls return decorator def make(name, **kwargs):", "def decorator(cls): datasets_dt[name] = cls return cls return decorator def make(name, **kwargs): if", "{} def register(name): def decorator(cls): datasets_dt[name] = cls return cls return decor...
[ "Protobuf from .proto_structures import Syntax class SyntaxParser(): @classmethod def parse_and_add(cls, proto_obj: Protobuf, line,", "not None: raise 'multiple syntax detected!' proto_obj.syntax = cls.parse_syntax(line, top_comment_list) @classmethod def parse_syntax(cls,", "@classmethod def parse_syntax(cls, ...
[ "return render_template('about.html') @core.route('/search', methods=['GET', 'POST']) def search(): search_str = request.args.get('globalsearch') return render_template('search.html', search_str=search_str)", "Blueprint('core', __name__) @core.route(\"/\", methods=['GET', 'POST']) def home(): return render_templa...
[ "( \"with_overdrive_data_source_and_scaled_size_and_custom_region\", \"test-book-covers-s3-bucket\", DataSource.OVERDRIVE, \"https://test-book-covers-s3-bucket.s3.us-east-3.amazonaws.com/scaled/300/Overdrive/\", 300, \"us-east-3\", ), ] ) def test_cover_image_root( self,", "!= \"\" else None) assert \"config\" no...
[ "= os.path.dirname(os.path.dirname(os.path.realpath(__file__))) build_type_path = os.path.join(root_dir, 'lbry', 'build_type.py') log.debug(\"configuring build type file: %s\", build_type_path)", "return 'release' return 'qa' def main(): root_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) buil...
[ "= [] testplan_dict[\"peernodeAlias\"] =[] if os.path.exists(work_dir) != True: print 'certs keyfiles directory do", "install_list = [] for org in org_list: channel_join = template[\"CHANNEL_JOIN\"] channel_join[\"parameters\"][\"connectionProfile\"] = org", "from collections import OrderedDict curr_dir = os.ge...
[ "unplugged.') f2 = dblib.lib.Finding('Monitor switched off', 'my_PC', 'The monitor is switched off.') def", "in db.findings assert len(db.findings) == 1 db.add(f1) assert f1 in db.findings assert len(db.findings)", "f2 = dblib.lib.Finding('Monitor switched off', 'my_PC', 'The monitor is switched off.') def test...
[ "elif management_group: result = client.remediations.list_for_management_group(management_group_id=management_group) else: result = client.remediations.list_for_subscription(subscription_id=sub) return [i.name for i", "import QueryOptions query_options = QueryOptions(top=2000) return [metadata.name for metadata i...
[ "\"mm/yy/dd\"), (\"%m.%y.%d\", \"mm.yy.dd\"), (\"%y-%d-%m\", \"yy-dd-mm\"), (\"%y/%d/%m\", \"yy/dd/mm\"), (\"%y.%d.%m\", \"yy.dd.mm\"), (\"%y-%m-%d\", \"yy-mm-dd\"), (\"%y/%m/%d\", \"yy/mm/dd\"),", "models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, related_name=\"columns\", to=\"hordak.TransactionIm...
[ "Dispatcher(bot) @dp.message_handler(command=['start', 'help']) async def send_welcome(msg: types.Message): await msg.reply_to_message(f'Добро пожаловать,{msg.from_user.first_name}') @dp.message_handler(content_types=['text']) async def", "types.Message): await msg.reply_to_message(f'Добро пожаловать,{msg.from_us...
[ "False return True class LazyEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, Promise): return force_text(obj)", "import import_module try: from django.utils.encoding import force_text except ImportError: from django.utils.encoding import force_unicode", "path.\".format(path) raise Improper...
[ "self._lastCmdTime # Set last time method was called to current time self._lastCmdTime =", "= 0.): \"\"\"Sets the proportional, integral and derivative terms.\"\"\" self._kp = kp self._ki", "TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.", "self._cmdMax = cmdMax ...
[ "= message['from'] attachments.append(attachment) return slack_payload def _report_message_to_slack(self, message): \"\"\" Send a message to", "self.cfg['pmon']['slack.hook'] payload = json.dumps(self._make_slack_payload(message)) headers = {'Accept': 'application/json', 'Content-Type': 'application/json', 'Conte...
[ "before, after) == after[i] \"\"\" def test_ti(): assert S.ti(\"ta\", \"e\") == \"te\" assert", "assert S.ti(\"AtAm\", \"e\") == \"Ate\" def test_antya(): assert S.antya(\"ti\", \"u\") == \"tu\" assert", "\"tam\", \"ta\", \"am\") for i, b in enumerate(before): assert op.yatha(b, before, after) ==", "def test_...
[ "emails = TVSMembers[TVSMembers.primary == primary]['email'].values print (\"These are the members with primary affiliation", "you also want their names and affiliations use: \") print (\"$python extractemailsW.py \"", "json filename parser = ArgumentParser(description='Selecting members by subgroup') parser.ad...
[ "ctx.send(\"You can't remove None\") cur = await self.bot.sus_users.cursor() await cur.execute(\"DELETE FROM RTFM_DICTIONARY WHERE", "user.send(embed=embed_message) except: user = ctx.author await user.send(content=\"Message failed. sending\",embed=embed_message) embed_message.add_field(name=\"Sent To:\",value=st...
[ "= 'sec', arguments = ('z',), expression = '1./cmath.cos(z)') asec = Function(name = 'asec',", "is part of the UFO. # # This file contains definitions for functions", "# shortcuts for functions from cmath # complexconjugate = Function(name = 'complexconjugate', arguments", "= ('z',), expression = '1./cmath.co...
[ "# # Licensed under the Apache License, Version 2.0 (the \"License\"); # you", "writing, software # distributed under the License is distributed on an \"AS IS\"", "config = cls.get_config_or_default() return config.check_count + 1 @classmethod def reset( cls, check_count=None, current_version=None,", "KIND, e...
[ "duckql.properties import Null @pytest.fixture(scope=\"module\") def valid_instance() -> Null: return Null() def test_string(valid_instance: Null):", "test_string(valid_instance: Null): assert str(valid_instance) == 'NULL' def test_obj(valid_instance: Null): assert valid_instance.obj == 'properties.Null'", "-> ...
[ "if (isinstance(param, ast.Parameter) and param.direction in (ast.PARAM_DIRECTION_OUT, ast.PARAM_DIRECTION_INOUT)): suffix = '*' else: suffix", "* %s:\\n\" % (func.symbol, )) for param in func.parameters: self.out_c.write(\" * @%s\" %", "ast.Function): with self._function(node): body = self._function_bodies.get...
[ "super().__init__(prefix=\"tmp_clean_copy_\", dir=dir) self.copyname = Path(self.name) / Path(source).name shutil.copytree(str(source), str(self.copyname)) def __enter__(self) -> Path:", "for line in iter(process.stdout.readline, b''): if not line: break outlines.append(line.decode().strip()) if self.verbose: pri...
[ "paramiko ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ssh.connect(hostname='172.16.58.3',username='ec2-user',password='<PASSWORD>',port=22) sftp_client=ssh.open_sftp() #sftp_client.get('/home/ec2-user/paramiko_download.txt','paramiko_downloaded_file.txt') #sftp_client.chdir(...
[ "Call print_profile_data to print the collected data. :type func: Callable :rtype: Callable \"\"\"", "except ImportError: from io import StringIO debug_on = False if debug_on: sublime.message_dialog(\"NimLime running", "development & testing. \"\"\" from pprint import pprint import sublime try: from cProfile", ...
[ "Mock() await self.monitor.setup() self.monitor.add_behaviour.assert_called_once_with( behaviour_mock() ) @freeze_time(\"1989-08-12\") @patch(\"driftage.monitor.FastNotifyContacts\") @patch(\"driftage.monitor.Template\") def test_should_notify_contacts_on_new_data( self, template_mock,", ") template_mock.assert_c...
[ "import commands.todo as todo import commands.user as user app = fastarg.Fastarg(description=\"productivity app\", prog=\"todo\")", "as user app = fastarg.Fastarg(description=\"productivity app\", prog=\"todo\") @app.command() def hello_world(name: str): \"\"\"hello world\"\"\"", "str): \"\"\"hello world\"\"\" ...
[ "declare_ok.queue, exchange, routing_key=\"test.5\", ) for i in range(10): messages = [ asyncio.ensure_future(channel.basic_publish( b\"test\",", "future = loop.create_future() await channel.basic_consume( declare_ok.queue, future.set_result, no_ack=True, ) message = await future", "await queue.get() assert mes...
[]
[ "def balanced_parens(str): ''' runtime: O(n) space : O(1) ''' if str is None:", "for char in str: if char == '(': open_count += 1 elif char", "O(1) ''' if str is None: return True open_count = 0 for char", "elif char == ')': open_count -= 1 if open_count < 0: return False", ": O(1) ''' if str is None: retur...
[ "* UpdateKey [REG_SZ], contains a date and time formatted as: \"MM/DD/YYYY hh:mm:ss [A|P]M\",", "= (year, month, day_of_month, hours, minutes, seconds) try: date_time = dfdatetime_time_elements.TimeElements( time_elements_tuple=time_elements_tuple) date_time.is_local_time", "= ' '.join(sorted(configuration)) or...
[ "one inhabitant (according to eq and hash). \"\"\" @staticmethod def instance() -> 'Unit':", "import Any, TypeVar X = TypeVar('X') class Closeable(metaclass=ABCMeta): @abstractmethod def close(self) -> None:", "Exception('Absurd') @dataclass(frozen=True) class Unit: \"\"\" A simple type with one inhabitant (acc...
[ "@pytest.fixture(scope=\"class\", autouse=True) def cube_default(self): cube_utils = CubeUtils() cube_utils.generate_cube(\"default_high_res\", 46, 2160, 4320) yield cube_utils", "reading for large area spatial analysis high-res\", timer=time.perf_counter, disable_gc=True, warmup=False ) def test_read_default_hig...
[ "'send_store_hours_flow') directives = convo.process('exit').directives assert_target_dialogue_state(convo, None) assert_reply(directives, templates=['Bye', 'Goodbye', 'Have a nice day.'])", "returned by application templates (Union[str, Set[str]]): The reply must be a member of", "of directives returned by app...
[ "fig = plt.figure() rect = fig.add_subplot(111, aspect='equal') data0 = np.loadtxt('data0.dat', delimiter=',') data1 =", "X[-1]) plt.ylim(Y[0], Y[-1]) plt.xlabel(\"\") plt.ylabel(\"\") plt.grid(ls='dotted') plt.savefig('{}.svg'.format(ID), bbox_inches='tight', pad_inches=0.1) plt.savefig('{}.eps'.format(ID), bbox...
[ "Language from sarna.report_generator import make_run from sarna.report_generator.locale_choice import locale_choice from sarna.report_generator.style import RenderStyle", "sarna.report_generator import make_run from sarna.report_generator.locale_choice import locale_choice from sarna.report_generator.style impor...
[ "def _test_ap_open_wpas_in_bridge(dev, apdev): hapd = hostapd.add_ap(apdev[0]['ifname'], { \"ssid\": \"open\" }) br_ifname='sta-br0' ifname='wlan5' wpas", "hostapd.add_ap(apdev[1]['ifname'], { \"ssid\": \"open\" }) def test_bssid_black_white_list(dev, apdev): \"\"\"BSSID black/white list\"\"\" hapd =", "hostapd...
[ "torch.nn as nn import torch.optim as optim class BinModel(nn.Module): expected_target_type = torch.FloatTensor def", "= torch.from_numpy(transformed_y).type(class_model.expected_target_type) for e in range(n_epochs): train_epoch(class_model, class_opt, class_criterion, bin_t_X, bin_t_y) def train_regressor(X,", ...
[ "* self.steps_per_day + 0.5 ).astype(int) if np.any(offset < 0) or np.any(offset > len(self._table)):", "r[i] # as the fractional time during the night when the dome reopens.", "A relative path name refers to the :meth:`configuration output path <desisurvey.config.Configuration.get_path>`. extra_downtime :", ...
[ "Data Export API response into tabular data. \"\"\" __author__ = 'api.nickm@ (<NAME>)' import", "the target stream self.stream.write(data) # empty queue self.queue.truncate(0) # pylint: disable=g-bad-name def writerows(self,", "KIND, either express or implied. # See the License for the specific language", "ou...
[ "= tf.constant(dataset.values[window_size:], dtype=tf.float32) ds_label = tf.data.Dataset.from_tensor_slices(ds_label) ds_train = tf.data.Dataset.zip((ds_data, ds_label)).batch(128).repeat() return ds_train ds_train", "30 column = 'high' epoches = 300 def batch_dataset(dataset): dataset_batched = dataset.batch(wi...
[ "render_template('userprofile/index.html', userid=userid, form4=CommentForm(prefix='form4'), form3=editForm(prefix='form3'), form6=searchForm(prefix='form6'), form5=ReportForm(prefix='form5'),form7=AddPlaylist(prefix='form7'), friend=getFriend(userid), playlist=getPlaylist(userid), User=getUserData(userid), Comment...
[ "tokenization from language.labs.drkit import input_fns import numpy as np import tensorflow.compat.v1 as tf", "in predictions: if not skip_no_answer: message = \"Unanswered question %s will receive score", "= result[\"qas_ids\"].decode(\"utf-8\") preds = result[\"top_idx\"] scores = result[\"top_vals\"] ans = ...
[ "population to check our different SFRD/SED techniques sfrd_pars = {'pop_sfr_model': 'sfrd-func'} sfrd_pars['pop_sfrd'] =", "test_pop_models.py Author: <NAME> Affiliation: UCLA Created on: Fri Jul 15 15:23:11 PDT 2016", "pop_fcoll.src.Nion sed['pop_Nlw'] = pop_fcoll.src.Nlw # pop_Ex? sed['pop_ion_src_igm'] = Fa...
[ "from leancloud._compat import to_bytes __author__ = 'asaka <<EMAIL>>' def sign_by_key(timestamp, key): return hashlib.md5(to_bytes('{0}{1}'.format(timestamp,", "utf-8 import time import hashlib import leancloud from leancloud._compat import to_bytes __author__ =", "time import hashlib import leancloud from lea...
[ "initialize the simulation time sim_time = SIM.start_time # main simulation loop # sleep(5)", "PUP, 2012 - Update history: 12/27/2018 - RWB 1/17/2019 - RWB \"\"\" import", "print(\"Press Command-Q to exit...\") while sim_time < SIM.end_time: #-------set control surfaces------------- if(sim_time<25): delta_e", ...
[ "pred_name, \"{} not in {}\".format(obj_name, pred_name) pred_path = osp.join(res_root, pred_name) assert osp.exists(pred_path), pred_path", "\"04_05TomatoSoupCan/inference_model_final_wo_optim-5641f5d3/ycbv_005_tomato_soup_can_train_real_uw/results.pkl\", \"05_06MustardBottle/inference_model_final_wo_optim-6ce23...
[ "'root': { 'authorities': ['role_admin'], 'password': '<PASSWORD>', } } def login(self, username: str, password:", "class AccountService: accounts = { 'root': { 'authorities': ['role_admin'], 'password': '<PASSWORD>', } }", "['role_admin'], 'password': '<PASSWORD>', } } def login(self, username: str, password: ...
[ "print \"addends:\" print A print B print print \"sum: \" print A +", "\"E\"] X = pd.Series([0, 1, 2], pd.Index(I2)) Y = pd.Series([10, 20, 0, 0],", "\"addends:\" print X print Y print print \"sum:\" print X + Y print", "twoDigit print print \"sum:\" print oneDigit + twoDigit print I2 = [\"A\", \"B\",", "pr...
[ "raise nelly.error('Please specify pre or post in code section') elif 'start_comment' == token:", "parse zero or more expressions until a semicolon is found self._expressions('pipe', 'semicolon', nonterminal)", "0 (token,value,line,col) = self.tokens.Next() if 'constant' != token: raise nelly.error('Missing ran...
[ "\"\"\" Get the version of the currently installed QCoDeS \"\"\" return qcodes.version.__version__ def", "Optional[bool] try: pipproc = subprocess.run(['python', '-m', 'pip', 'list', '-e', '--no-index', '--format=json'], check=True, stdout=subprocess.PIPE)", "[] package_names = [list(requirements.parse(req))[0]...
[ "== \"POST\": fieldname = request.POST['fieldname'] value = request.POST['value'] fc, created = FieldCategory.objects.get_or_create( fieldname=fieldname,", "= request.POST['fieldname'] value = request.POST['value'] fc, created = FieldCategory.objects.get_or_create( fieldname=fieldname, value=value ) return", "r...
[ "be moved into a required_providers block. # def test_version_source(): # # import terrascript.provider.Mongey.kafka_connect", "generated by tools/makecode.py (24-Sep-2021 15:20:11 UTC) def test_provider_import(): import terrascript.provider.Mongey.kafka_connect def test_resource_import(): from", "to be moved i...
[ "if 'token' not in login_session: return redirect('/login') user = session.query(User).filter_by(email=login_session['email']).first() categoryItem = session.query(Category).filter_by(name=category).first()", ".read())['web']['client_id'] APP_ID = json.loads(open('fb_client_secrets.json', 'r') .read())['web']['ap...
[ "import NooException, cancel from .store import STORE, FileStore, Store __all__ = ( \"FileStore\",", "echo, set_quiet from .errors import NooException, cancel from .store import STORE, FileStore, Store", "from .errors import NooException, cancel from .store import STORE, FileStore, Store __all__ =", ".errors ...
[ "np.logical_or(self.class_masks[cls], unique_masks[color_ind, ...]) def _image_depth(self, image_depth_data, **kwargs): image_depth = read_buffer_image(image_depth_data, self.screen_width, self.screen_height) depth_format", "camera_near_plane = kwargs.pop('camera_near_plane', 0) if depth_format == DepthFormat.Nor...
[ "description=\"\"\"A tool for extracting and converting Google-style docstrings to plain-text, markdown, and JSON.\"\"\",", "tool for extracting and converting Google-style docstrings to plain-text, markdown, and JSON.\"\"\", url='http://github.com/ooreilly/mydocstring',", "for extracting and converting Google-...
[ "import struct from ..err import SerializeError from ..abc import * from ..core import", "= {} kwargs.update(Options.pop_origin_kwargs(options)) self.check_options(options) try: return bson.dumps(obj, **kwargs) except Exception as e: raise", "# -*- coding: utf-8 -*- # # Copyright (c) 2020~2999 - Cologler <<EMAI...
[ "def\" def test_self_append_nonexistent_array(self): config = ConfigFactory.parse_string( \"\"\" x += [1,2] \"\"\" ) assert", "assert config.get('t.e.y.h') == 'hey man' assert [v.strip() for v in config.get('t.e.y.i').split('\\n')] == ['',", "config.get_string(\"A.field2\") == \"12\" assert config.get_string(\"...
[ "None: self._agent.cleanup() self._agent = None CarlaDataProvider.cleanup() def load_scenario(self, scenario, agent=None): \"\"\" Load a", "to analyze, this scenario has no criteria\") return True for criterion in self.scenario.get_criteria():", "the ScenarioManager implementation. It must not be modified and i...
[ "for obj in reversed(object_stack): assert obj is not None alter_cmd_cls = sd.ObjectCommandMeta.get_command_class_or_die( sd.AlterObject,", "with context(sd.DeltaRootContext(schema=schema, op=delta)): schema = delta.apply(schema, context) return schema def derive_ref( self: ReferencedT,", "Unless required by ap...
[ "self.output += f\"{item['title'].replace(' ()', '')}, \" i += 1 if i >= n:", "if i >= n: break return self.output[:-2] def processFilmography(self, list, n): self.output =", "{month_name[int(elements[1])]} {elements[0]}\" def shortenText(self, string, n): #return first n sentences from string first", "first ...
[ "assign(service, arg): if service == \"shop7z\": return True, arg def audit(arg): payload =", "curl.curl2(target) if code == 200 and 'name=\"lipinname\"' in res and 'name=\"showflag\"' in res:", "def assign(service, arg): if service == \"shop7z\": return True, arg def audit(arg): payload", "= 烽火戏诸侯 #_PlugName...
[ "= \"lselect\" del command[\"on\"] elif flash == FLASH_SHORT: command[\"alert\"] = \"select\" del command[\"on\"]", "supported_features self._rooms = rooms if is_group: self.is_osram = False self.is_philips = False self.is_innr", "= \"none\" if ATTR_EFFECT in kwargs: effect = kwargs[ATTR_EFFECT] if effect == EF...
[ "of :class:`~ezdxf.entities.LWPolyline` and 2D :class:`~ezdxf.entities.Polyline` entities start at the vertex which includes the", "center of arc described by the given bulge parameters. Based on Bulge Center", "compatible object bulge: bulge value as float \"\"\" start_point = Vec2(start_point) a =", "2 a = ...
[ "\"__main__\": # print \"Hello World\" from ProgrammingEmail import ManageAttachments import jpype import os.path", "header, choose License Headers in Project Properties. # To change this template file,", "template in the editor. #if __name__ == \"__main__\": # print \"Hello World\" from", "editor. #if __name...
[ "text = buffer.text cursor_position = buffer.cursor_position for m in reversed(list(WORD.finditer(text))): if m.start(0) <", "event.current_buffer.document.selection: from_, to = event.current_buffer.document.selection_range() run_in_terminal(lambda:system_copy(event.current_buffer.document.text[from_:to + 1])) @...
[ "loglikelihood import * from statistics import * from nested import * #import random", "p530_p730_work=Beta('period 5:30pm to 7:30 pm in work',0,-10,10,0) p730_p1000_work=Beta('period 7:30pm to 10pm in work',0,-10,10,0)", "driver_dummy_E*driver_dummy+\\ passenger_dummy_E*passenger_dummy+\\ public_dummy_E*public...
[ "from flask_sqlalchemy import SQLAlchemy # 数据库操作对象 db = SQLAlchemy() # 创建app def create_app():", "# 创建app def create_app(): # flask操作对象 app = Flask(__name__) # 通过配置文件读取并应用配置 app.config.from_object(Config) #", "from app.view import employee # 职位管理子系统 from app.view import post # 部门管理子系统 from", "# 初始化模块 from con...
[ ") def __open_abi(self): return json.load(open(self._abi_path, \"r\")) @property def abi(self): return self.__json_abi @property def", "__open_abi(self): return json.load(open(self._abi_path, \"r\")) @property def abi(self): return self.__json_abi @property def contract(self): return", "def contract(self): retu...
[ "fig1 = self.plot_log_dec(percentile, conf_interval, *args, **kwargs) subplots = make_subplots(rows=1, cols=2) for data in", "is None: fig = go.Figure() default_values = dict(mode=\"lines\") conf_interval = np.sort(conf_interval) percentile =", "p / 2, axis=0) p4 = np.percentile(self.yout[..., ndof * node + 1],...
[ "for pair in itertools.combinations(STRATEGY_LIST, r=2): roundHistory = runRound(pair) scoresA, scoresB = tallyRoundScores(roundHistory) outputRoundResults(f,", "range(LENGTH_OF_GAME): playerAmove, memoryA = moduleA.strategy(getVisibleHistory(history,0,turn),memoryA) playerBmove, memoryB = moduleB.strategy(getVis...
[ "TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE", "db: database to connect to within server :type db: string ''' # If", "self.connection.cursor() # For if caller never exhausts the results by repeated calls: self.cursors.append(cursor)", "BY THE COPYRIGHT HOLDERS AND CO...
[ "FP:\", xkey.parent_fp.hex()) print(\"Child number:\", xkey.child_number_with_tick()) print(\"Chain code:\", xkey.chain_code.hex()) print(\"Key:\", xkey.key) if xkey.key.get_private_bytes(): print(\"Private", "lib.utils import one_line_from_stdin xkey = XKey.from_xkey(one_line_from_stdin()) print(xkey) print(\"Ve...
[ "of tangent image corners = tangent_image_corners(b, s) # Corners of each tangent image", "tangent image corners = tangent_image_corners(b, s) # Corners of each tangent image fov_x,", "to examine def ang_fov(s): print('Spherical Resolution:', s) for b in range(s): dim =", "spherical_distortion.util import * s...
[ "raise RuntimeError(f\"Cannot find {name} in graph nodes. Graph: {self.graph}\") def __len__(self): #TODO: Update", "attr)) for attr in ['start', 'stop', 'step']]) return node except Exception as ex:", "self, graph=self.graph) if not _is_node_type_instance(other, (\"slice_op\", \"var_index\", \"index\")) else o...
[ "models from django.utils.translation import ugettext_lazy as _ # Create your models here. class", "name = models.CharField(_(\"name\"), max_length=200) # if is_star he/she will be directed to hollywood", "Actor(models.Model): name = models.CharField(_(\"name\"), max_length=200) # if is_star he/she will be dire...
[ "docs/html\") gen_sphinx(\"docs/html\") print(\"Generating Doxygen docs in docs/html/api\") gen_api(\"docs/html/api\") if __name__ == \"__main__\": main()", "as null: subprocess.call([\"make\", \"html\"], stdout=null, stderr=null) os.chdir(\"../../../\") if os.path.isdir(\"docs/source/sphinx/build/html\"): os.ren...
[ "0, 1 ) class GameRenderSettings(RenderSettings): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.projection =", "def pop(self): s = self._stack.pop(-1) self.scale = s[\"scale\"] self.rotation_deg = s[\"rotation\"] self.location =", "self.pop() def rotation_matrix_2d(degree: float) -...
[ "= get_previous_reports_for_branch(\"origin/viable/strict\", \"\") # an entry will be like (\"test_doc_examples (__main__.TestTypeHints)\" -> [values]))", "\"between test times for each test are smaller than the threshold and the", "urllib.request import urlopen SLOW_TESTS_FILE = \".pytorch-slow-tests.json\" SL...
[ "\"\"\" num_actions = len(target_propensities[0]) terminals = np.zeros(mdp_ids.shape[0]) for x in range(0, mdp_ids.shape[0]): if", "j_steps, num_j_steps, j_step_returns, infinite_step_returns, j_step_return_trajectories, ): low_bound, high_bound = WeightedSequentialDoublyRobustEstimator.confidence_bounds( infinit...
[ "array to its original configuration and return it. \"\"\" return self.original def shuffle(self)", "coding: utf-8 -*- # @Author: 何睿 # @Create Date: 2019-08-03 10:48:30 # @Last", "nums: List[int]): self.shuffle_ = nums self.original = copy.copy(nums) def reset(self) -> List[int]: \"\"\"", "Modified time: 2019...
[ "- feature x column y - feature y column Returns ---------- phi coefficient", "features \"\"\" if not self.dist_matrix: self._calc_dist_matrix(X) linkage = self._corr_linkage() clusters = self._hierarchical_clustering(linkage) chi2_vals,", "clusters the features in X according to dist_matrix, and selects a feat...
[ "\"Download and extract additional data\", \"Demonstrate maximizing screen\", \"Demonstrate mouse actions for Chrome\",", "= webdriver.Safari() driver.get(\"https://www.google.com\") search = driver.find_element_by_name(\"q\") search.send_keys(\"Sel<PASSWORD>\") # Google Search \"Selenium\" search.submit() elif(i...
[ "system configuration\"\"\" UTIL.SYS.s_configuration.setDefaults([ [\"HOST\", \"127.0.0.1\"], [\"SERVER_PORT\", \"1234\"]]) # ----------------------------------------------------------------------------- def createServer(): \"\"\"create the", "the TCP server\"\"\" server = TCPserver(portNr=int(UTIL.SYS.s_configur...
[ "override must be string {'repo': 'meta', 'hooks': [{'id': 'identity', 'name': False}]}, ), )", "def is_valid_according_to_schema(obj, obj_schema): try: cfgv.validate(obj, obj_schema) return True except cfgv.ValidationError: return False @pytest.mark.parametrize('value',", "cfgv.ValidationError: return False @p...
[ "KIND, either express or implied. # See the License for the specific language", "Unless required by applicable law or agreed to in writing, software # distributed", "for key in output_dict.keys(): if key in misc_keys: continue if key not in", "output: continue output.on_option_tab_create(self.notebook) self.n...
[ "f.read() setup( name='LineBot', version='0.1.0', description='Simple-LINELIB', long_description=long_description, author='<NAME>', author_email='<EMAIL>', url='https://github.com/CyberTKR/Simple-LINELIB', packages=find_packages(include=['CyberTK', 'CyberTK.*']), install_requires=[ 'httpx==0.19.0',", "= f.read() ...
[ "for Cgwsh driver configuration ''' import GlobalModule from EmCommonLog import decorater_log from DriverSetParameterECDB", "routes: tmp_item = {} tmp_item[\"ip_address\"] = route.get(\"ipAddress\") tmp_item[\"subnet_mask\"] = route.get(\"subnetMask\") tmp_item[\"gateway_address\"] = route.get(\"gatewayIpAddress\...
[ "new working directory ----------------------------------------------------------- directoryToUnzipTo = os.path.join(zipDirectory, \"temp\") if not os.path.exists(directoryToUnzipTo): os.makedirs(directoryToUnzipTo) shutil.copy(bundleZip,", "for the docker registry @param pwd the password for the docker registry ...
[ "robot base to aruco tag M_BL = np.array([[1., 0., 0., 0.30000], [0., 1.,", "depth image :param depth_scale: depth scale that trans raw data to mm :return:", "with the depth channel inp_image = pre_process(img_wo_at, depth) # pass the image into", "(int(kp_pr[2] * f_w), int(kp_pr[3] * f_h)) if isWithinRange(k...
[ "# kernel = np.array( # [[1, 1, 1], # [1, 5, 1], #", "= 1.0): angle=level (h, w) = image.shape[:2] if center is None: center =", "level: return np.fliplr(img) return img def augment_hsv(im, level=None, hgain=0.015, sgain=0.7, vgain=0.4): im =", "= option_mode[mode] translate_pixel = int(width * level) M = np....
[ "REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # ## # Import Modules", "__init__(self) : self.Ffs = None self.FdName = None self.CapsuleName = None ## generate", "Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials", "THE PROGRAM IS DISTRIBUTED UNDER THE BSD L...
[ "y = line.split(',') size.append(int(x.strip())) time.append(float(y.strip())) # Plot data fig, ax = plt.subplots() ax.plot(size,", "as file: for line in file.readlines(): x, y = line.split(',') size.append(int(x.strip())) time.append(float(y.strip())) #", "Plot data fig, ax = plt.subplots() ax.plot(size, time)...
[ "the request did not violate any quota. :type throttle_time_ms: int :param replica_election_results: The", ":type partition_id: int :param error_code: The result error, or zero if there was", "throttle_time_ms: int, replica_election_results: List[ReplicaElectionResult]): \"\"\" :param throttle_time_ms: The dura...
[ "assert \"bar\" == stack.get() def test_stack_copy(): stack = py_zipkin.storage.Stack() stack.push(\"a\") stack.push(\"b\") the_copy =", "log.call_count == 1 def test_storage_stack_still_works_if_you_dont_pass_in_storage(): # Let's make sure this still works if", "stack.push(\"b\") the_copy = stack.copy() the_c...
[ "AIR_DS = 'https://www.esrl.noaa.gov/psd/thredds/fileServer/Datasets/ncep.reanalysis.derived/surface/air.mon.ltm.nc' def simple_plot(resource, variable=None, output=None): output = output or 'plot.png' ds", "class SimplePlot(Process): def __init__(self): inputs = [ ComplexInput('dataset', 'Dataset', supported_for...
[]
[ "for row in values: ranking.append({\"email\": row[0], \"correct\": row[1]}) return json.dumps({\"ranking\": ranking}) @app.route('/room_status') def", "(%s)\", [user_id]) return json.dumps({\"id\": room_id}) @app.route('/get_rooms') def get_rooms(): user_id = request.args.get('user_id') values =", "text = valu...
[ "self.src == self.dst: # The src=dst mode should be used if and only", "else: result_files.add(relpath) return sorted(result_files) def _list_dirs_and_files(self, basepath: Path): files = self._list_files(basepath) dirs =", "hashlib import logging import os import threading logger = logging.getLogger(__name__) ...
[ "raise RuntimeError( \"Could not find 'gradle' or 'wrapper' executable\") # Gradle Task (by", "return await run( self.context, cmd, cwd=args.build_base, env=env) async def _install(self, args, env): self.progress('install')", "metavar='*', type=str.lstrip, help='Pass arguments to Gradle projects. ' 'Arguments m...