query_id
stringlengths
32
32
query
stringlengths
9
4.01k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
e3bcf07f29dd0a2ef68aa2ee5d2f3ad4
Test that matchers get registered on an object instance, not just on the class
[ { "docid": "4a39c5a1523715880d07644b7dfcff65", "score": "0.7619825", "text": "def test_matcher_on_instance(self):\n\n skill = _TestSkill(None, None)\n self.assertTrue(hasattr(skill.hello_skill, \"matchers\"))", "title": "" } ]
[ { "docid": "3d7a2ce6ee5ae6ba010c1db150b1f754", "score": "0.65179825", "text": "def test_constructors(self, name, obj):\n assert getattr(forge, name) == obj", "title": "" }, { "docid": "3d7a2ce6ee5ae6ba010c1db150b1f754", "score": "0.65179825", "text": "def test_constructors(sel...
09455bd871518c4a53af2f9f48a37509
Create a dataset from a set of Pandas dataframes.
[ { "docid": "5f505662b44bbcd1d99bc426c0522263", "score": "0.7133669", "text": "def from_pandas(dfs: List[ObjectRef[\"pandas.DataFrame\"]],\n parallelism: int = 200) -> Dataset[ArrowRow]:\n import pyarrow as pa\n\n @ray.remote(num_returns=2)\n def df_to_block(df: \"pandas.DataFrame...
[ { "docid": "e40768fbaba2d023630cbcdf0a2fbf9e", "score": "0.6521647", "text": "def create_datasets():\n df1 = apy.find_datasets(\"ENSEMBL_MART_ENSEMBL\")\n df1.to_pickle(os.path.join(DATADIR, \"datasets_ensembl.pkl\"))\n df2 = apy.find_datasets(\"ENSEMBL_MART_MOUSE\")\n df2.to_pickle(os.path....
f92705a33ea09aa3a95aff8186a07a47
Test that valid arguments does not result in crash. Only validates that there are no crashes, does not validate any other behavior!
[ { "docid": "8b03cc9fbef3905149ad3e71edf82a0f", "score": "0.63943064", "text": "def test_no_crash_on_valid_args(\n self, parsed_args_all_subparsers, dummyapi_instance, command_mock\n ):\n _repobee.cli.dispatch.dispatch_command(\n parsed_args_all_subparsers, dummyapi_instance, ...
[ { "docid": "9f45e9ad983cfb134ea46c64981b0821", "score": "0.72151494", "text": "def test_CleanArgs_err():\n pass", "title": "" }, { "docid": "7d80397c5c922d3fab33ecabb0b21c0c", "score": "0.72042733", "text": "def validate_arguments(args):\n pass", "title": "" }, { "d...
0d2a15b708c95ece5c8488c626ddefba
Use scipy.optimize.fmin_cg() to find the maximum likelihood estimate for the data in logregression.txt.
[ { "docid": "591e0ae89011601957b664f98385a58a", "score": "0.734154", "text": "def prob4(filename=\"logregression.txt\"):\n def objective(b):\n return (np.log(1+np.exp(x.dot(b)))-y*(x.dot(b))).sum()\n \n data=np.loadtxt(filename)\n y=data[:,0]\n x=np.column_stack((np.ones_like(y), da...
[ { "docid": "d2644a818c39fe93faf5848ca557d225", "score": "0.5914348", "text": "def __call__(self, X, y):\n X = np.hstack((np.ones((len(X),1)), X))\n\n # optimizacija\n theta = fmin_l_bfgs_b(\n cost,\n x0=np.zeros(X.shape[1]),\n args=(X, y, self.lambda...
9ec554404ab602d2d537e9d7fe2ae34f
set internal self.params from a Parameters object or a list/tuple of Parameters
[ { "docid": "94a70df51a827fbfd24ce757ea6ce9ca", "score": "0.85300606", "text": "def __set_params(self, params):\n if params is None or isinstance(params, Parameters):\n self.params = params\n elif isinstance(params, (list, tuple)):\n _params = Parameters()\n ...
[ { "docid": "2af869554d507f9e39fd156e99656bad", "score": "0.8027624", "text": "def set_parameters(self, **params):\n with self.parametersLock:\n for param in params:\n setattr(self, param, params[param])", "title": "" }, { "docid": "bc4ea99fdf77f79589f8ebc56bb...
3242bfb4350542e64fc09c95bb72fb58
Sets the fontsize of the legend.
[ { "docid": "574f2950504e126970ecef1b51abdb6e", "score": "0.8113846", "text": "def set_legend_fontsize(command):\n try:\n plt.rc('legend', fontsize=int(command))\n except ValueError:\n print \"couldn't convert {} to int.\".format(command)", "title": "" } ]
[ { "docid": "61a6071a42ba742408afd723536ffc16", "score": "0.7425878", "text": "def setcafontsize(fontsize=20):\n ax = pl.gca()\n for tick in ax.xaxis.get_major_ticks():\n tick.label1.set_fontsize(20)\n for tick in ax.yaxis.get_major_ticks():\n tick.label1.set_fontsize(20)", "ti...
3f97a90acbb37dfb912487589401e8d8
Serialize a dict of cloudinit templates. It will serialize the names of cloudinit templates, thus allowing nailgun to request particular version for every template to be rendered during provisioning.
[ { "docid": "2fcca3281cf15d1f30a48e690ffb7a6e", "score": "0.8214958", "text": "def serialize_cloud_init_templates(cls, release):\n cloud_init_templates = {}\n for k in (consts.CLOUD_INIT_TEMPLATES.boothook,\n consts.CLOUD_INIT_TEMPLATES.cloud_config,\n cons...
[ { "docid": "0d781a4bebda31651e06ba83460827b4", "score": "0.58914036", "text": "def templates(self):\r\n params = {\"f\" : \"json\"}\r\n exportURL = self._url + \"/templates\"\r\n return self._con.get(path=exportURL,\r\n params=params, token=self._toke...
f9406bcd7c389dd26528a55309644db0
This is the customizable parrt of derived classes, used to set parameters for a particular type of implicit solvation
[ { "docid": "f9438647cfc9d1e5c4ede606537bddb7", "score": "0.0", "text": "def setup(self):\n pass", "title": "" } ]
[ { "docid": "9d312f1507d143e7fd675c7906961b22", "score": "0.6681285", "text": "def define_param(self, *pargs): ###\r\n self._subclass_paramdefs = getattr(self, \"_subclass_paramdefs\", [])\r\n self._subclass_paramdefs += list(pargs)", "title": "" }, { "docid": "f92f0b2b9b13eb00...
18772f8e3ebd9b6ba811cbfd85ece254
Ensures that Renderman is loaded, and channels are expected values.
[ { "docid": "ee5f1d66f0bd1cc64a73ff437c03c358", "score": "0.5228379", "text": "def validate(self):\n valid = self.valid_channels()\n filtered_list = []\n \n if not self.channels: raise PassMakerError, 'must select at least one channel'\n \n for chan in self.chann...
[ { "docid": "8f7b5096222aaf3f14153ade9dc5b7b0", "score": "0.5716942", "text": "def _checkInitialization(self):\n if not(self.general and self.runtime and self.groups):\n raise RuntimeError(\"Settings are not completely initialized\")", "title": "" }, { "docid": "1a08789e4e30...
772ff500c953b77f98c57c3de2a8c6fb
Removes detections with lower score than 'score_thres' and performs NonMaximum Suppression to further filter detections.
[ { "docid": "9409c3f76fb8eaac6f934602edc839a7", "score": "0.70985776", "text": "def non_max_suppression(prediction,\n num_classes,\n score_thres=0.5,\n nms_thres=0.4):\n\n # From (center x, center y, width, height) to (x1, y1, x2, y2...
[ { "docid": "7217d95319326f924337efc1a6a0a023", "score": "0.68844444", "text": "def non_max_suppression(prediction, conf_thres=0.5, nms_thres=0.4):\n\n # From (center x, center y, width, height) to (x1, y1, x2, y2)\n prediction[..., :4] = xywh2xyxy(prediction[..., :4])\n output = [None for _ in ...
f49af8f74c165029b6ecd7c9bd35a5ef
Compute the limit of the expression at the infinity. Examples ======== >>> limitinf(exp(x)(exp(1/x exp(x)) exp(1/x)), x) 1
[ { "docid": "2140363f8cc9d011cf824d6cdb5a0520", "score": "0.70066345", "text": "def limitinf(e, x):\n # Rewrite e in terms of tractable functions only:\n e = e.rewrite('tractable', wrt=x)\n\n if not e.has(x):\n # This is a bit of a heuristic for nice results. We always rewrite\n #...
[ { "docid": "5f7b5f373758238dd0dc4b1e16ef8479", "score": "0.6337069", "text": "def inf(self):\n return self._inf", "title": "" }, { "docid": "b3c056338e95bc7f89d42d99169dc947", "score": "0.62408656", "text": "def inf(self):\r\n\t\treturn float('inf')", "title": "" }, { ...
5e7513caf8e5285320509fdb64e9dc85
Run Dragonfly Bayesian optimization to minimize function f.
[ { "docid": "aebc2f1871e7dadc85272c82d92c67c9", "score": "0.64840174", "text": "def minimize_function(self, f, n_iter=10, verbose=True, seed=None):\n if seed is not None:\n np.random.seed(seed)\n\n domain = self._get_domain()\n opt_method = 'bo'\n parsed_config = se...
[ { "docid": "2e2b69b3ef096ecfff7938346f50cb3d", "score": "0.6806004", "text": "def minimize(f,df, x0):\n\n return scipy.optimize.minimize(\n f, x0, method='BFGS', jac=df, options={'maxiter':100})", "title": "" }, { "docid": "e3bfd706e2203a2c42a9b09bac6e85c1", "score": "0.6345694...
03837da3826d0bff0b22a4d8a399f93e
r"""Time clip the input (if time interval is TSeries clip between start and stop).
[ { "docid": "963146cf0cd2edfe32c5da92dfc5a943", "score": "0.65635616", "text": "def time_clip(inp, tint):\n\n if isinstance(inp, xr.Dataset):\n coords_data = [inp[k] for k in filter(lambda x: x != \"time\", inp.dims)]\n coords_data = [time_clip(inp.time, tint), *coords_data]\n out...
[ { "docid": "c6e85b5f14ed32323e7239a36a9143d9", "score": "0.6463437", "text": "def crop(self, tmin: Optional[float] = None, tmax: Optional[float] = None) -> None:\n logger.debug(\"Cropping the signal between %s and %s.\", tmin, tmax)\n self._tmin, self._tmax = Sound._check_tmin_tmax(\n ...
cd64915f0781bb045fb400e7aa888318
SQL insert 1. insert help 2. insert query
[ { "docid": "e62ef99df5246c1e629392599cafe13c", "score": "0.64105207", "text": "def insert(self, arg):\n if arg == '' or arg.lower() == 'help':\n return dbhelp(self, 'insert')\n if not db_ready():\n return\n DB.execute(\"insert \"+arg.replace(\";\", \"\"), db_alias(), list_results ...
[ { "docid": "c4b65951d0e69b1758b99d9c093b7e15", "score": "0.72062004", "text": "def insert(self):\n try:\n \n self.cursor.execute(self.get_insert_query(), self.get_values())\n except Exception as e:\n print(e)\n \n self.conn.commit()", ...
3f38572930214b31e362d80d752a5bef
Loops the queue. Invoke this command again to unloop the queue.
[ { "docid": "85398434c04e430f30d630ab4c452835", "score": "0.7258371", "text": "async def _loop(self, ctx: commands.Context):\n\n await ctx.message.delete(delay=5)\n if not ctx.voice_state.is_playing:\n return await ctx.send('Nothing being played at the moment.', delete_after=5)\n...
[ { "docid": "89b15d25c448917b330f9c88c7c4275a", "score": "0.7013208", "text": "def loop(self, queue, name):\n try:\n while self.running:\n try:\n gcode = queue.get(block=True, timeout=1)\n except Queue.Empty:\n continue...
e0530609128272644ed30911328ec071
Segments the input frame using a trained SVM. This function requires that the SVM classifier is already available. Use the `ml.classifier.trainClassifiers()` function to create it.
[ { "docid": "7b5213ce699472c14495cebf02ccc3f6", "score": "0.5688241", "text": "def locateBricksSvm(self, frame, depth, hsv=False, scale=0.25):\n\n # check if the SVM classifier is available\n if self.svm_clf is None:\n self.logger.error('The SVM classifier is None; cannot do segm...
[ { "docid": "3e67222fc58ff68145d7ff5d86d4d6bc", "score": "0.6459603", "text": "def train_svm():\n\n X, y = load_training_set()\n linear_svm.fit(X, y.flatten())", "title": "" }, { "docid": "5921c2cdf30cfcbc2db0faa0a513742d", "score": "0.634443", "text": "def train_svm(X, y):\n ...
d2944facf207d685092d2fdb00226d73
This API has never heard of any patron.
[ { "docid": "8214a506e3ee07e5063cf26ec01e8faf", "score": "0.6529164", "text": "def patron_remote_identifier_lookup(self, patron):\n return None", "title": "" } ]
[ { "docid": "fde88ffd4ca41b2f91383e063f307889", "score": "0.56945896", "text": "def Pattern(self) -> str:", "title": "" }, { "docid": "fde88ffd4ca41b2f91383e063f307889", "score": "0.56945896", "text": "def Pattern(self) -> str:", "title": "" }, { "docid": "d5763184627af065...
50cb75941cf794fc96b9dbd7f9cf2e89
Returns Number of bikes currently at the station.
[ { "docid": "2a2be470d151c40a4873acb78b349c31", "score": "0.739501", "text": "def bikes(self):\n bikes = [1 if dock.bike else 0 for dock in self.docks]\n return sum(bikes)", "title": "" } ]
[ { "docid": "816080d3a0ea44c12fb05843b733ad49", "score": "0.7562642", "text": "def _get_bikes_available(sta):\n # 'num_ebikes_available\" is not part of the GBFS spec, but it appears\n # in the Divvy API response\n return sta['num_bikes_available'] + sta.get('num_ebikes_available', 0)", "tit...
e8a33131373fbef4487cf5835a7feadb
Update any single hyper parameter or group of parameters ``params`` with ``values``.
[ { "docid": "d05d2b6d5ed40fdac465c9f72cbc14e3", "score": "0.77267337", "text": "def update_hyper(self, params, values):\n self.hyper_parameters.update(params, values)", "title": "" } ]
[ { "docid": "e4a668246ffbf52c77360299cfa41a1f", "score": "0.7678789", "text": "def update_params(self, params, grads):\n updates = self._get_updates(grads)\n for param, update in zip((p for p in params), updates):\n param += update", "title": "" }, { "docid": "140209d...
2885d4cb316da36680a9f9014f740ba0
Given a mapping, return an instance of this wff.
[ { "docid": "5499a8b6d0b49c5ca79eebea683f22a4", "score": "0.51883656", "text": "def makeInstance( self, aMapping ):\n assert isinstance( aMapping, dict )\n\n assert isinstance( self._premiseFormSet, FormSet )\n assert isinstance( self._conclusionFormSet, FormSet )\n\n ...
[ { "docid": "f09b2d07dcb0f3bb276b3001b9dc68a9", "score": "0.65558213", "text": "def makeInstance( self, aMapping ):\n assert isinstance( aMapping, dict )\n\n assert isinstance( self._operator, str )\n assert isinstance( self._operands, list ) and (len(self._operands) in (1,2))\...
7125395a73ffefee23e546967d285002
Defines whether manager email notifications are disabled
[ { "docid": "5c31e01435d151dd270a8668fb24a20e", "score": "0.84846765", "text": "def disable_manager_email_notification(self) -> Optional[pulumi.Input[bool]]:\n return pulumi.get(self, \"disable_manager_email_notification\")", "title": "" } ]
[ { "docid": "61f5b4c8dcc3ca35df9d2c861dee6770", "score": "0.7824334", "text": "def disable_email_notification(self) -> Optional[pulumi.Input[bool]]:\n return pulumi.get(self, \"disable_email_notification\")", "title": "" }, { "docid": "61f5b4c8dcc3ca35df9d2c861dee6770", "score": "0...
752a38333d4fb5079420442a28da054b
Export the image shapes from the exported images in the target folder
[ { "docid": "17b50c9e141e3a6d954a0a85f1430b1e", "score": "0.692356", "text": "def export_shapes(self, *args):\n try:\n # default answer\n ans = list()\n # working variables\n coln = args[0]\n tfext = args[1]\n tsufix = args[2]\n\n ...
[ { "docid": "1edd76a4bc85079ce0cea5930497783b", "score": "0.6876715", "text": "def export(self, img_files, targets, output_folder, filename_prefix=\"dataset\"):\n assert isinstance(img_files, (list, tuple)), \"Arguments `img_files` should be lists or tuples\"\n if targets is not None:\n ...
ac0f065a765912fa47ff960bcb4606e6
r""" Converts a list of connections into a Scipy sparse adjacency matrix
[ { "docid": "0cc0fe08a43fbbda265fbb121d33cbd4", "score": "0.67700714", "text": "def conns_to_am(conns, shape=None, force_triu=True, drop_diag=True,\n drop_dupes=True, drop_negs=True):\n if force_triu: # Sort connections to [low, high]\n conns = np.sort(conns, axis=1)\n if dro...
[ { "docid": "22712fc23bf9be8e59110fc71423b200", "score": "0.6723433", "text": "def retrieve_adjacency_matrix(cgpms, v_to_c):\n adjacency_list = retrieve_adjacency_list(cgpms, v_to_c)\n adjacency_matrix = np.zeros((len(adjacency_list), len(adjacency_list)))\n for i in adjacency_list:\n adj...
a569a968b10802e67698e98d11f0fc52
If needed to initialize within CPU sampler (e.g. vector epsilongreedy, see EpsilonGreedyAgent for details).
[ { "docid": "7fe7fdffb15fc98bad9fff2213283bd3", "score": "0.6219568", "text": "def collector_initialize(self, global_B=1, env_ranks=None):\n pass", "title": "" } ]
[ { "docid": "469d5d7feab90369d1d6c0f4d9d4f23d", "score": "0.70388573", "text": "def initialize(self):\n self.actor_optimizer.sync()\n self.critic_optimizer.sync()\n self.sess.run(self.target_init_updates)", "title": "" }, { "docid": "658e8b56c9e2945fd00f727f4cad78f7", ...
bbcc36d5579f24bc1c2dc5198e458a9d
Adds the feasibility pumprelated configurations.
[ { "docid": "e2e70289d6e3debbad8212b243eff57a", "score": "0.6846095", "text": "def _add_fp_configs(CONFIG):\n CONFIG.declare(\n 'fp_cutoffdecr',\n ConfigValue(\n default=1e-1,\n domain=PositiveFloat,\n description='Additional relative decrement of cutoff ...
[ { "docid": "342b722c53e5f59010effacf09af25a0", "score": "0.55445564", "text": "def pibooth_configure(cfg):", "title": "" }, { "docid": "0ddc05c18d735661f13caa0f82e6d32e", "score": "0.5481886", "text": "def _fp_setup2(self):\n # TODO: right now it's hard to implement this requi...
4e2db4273aef647e4d55e183e06eefd6
Return all company ids listed in organisations.
[ { "docid": "81954b5d12648e52d6fa2fc00a550007", "score": "0.79137444", "text": "def company_ids(self) -> Generator[Optional[CompanyIDType], None, None]:\n for organisation in self:\n yield organisation.company_id", "title": "" } ]
[ { "docid": "0b7a3b6dbcd6a308d05b331ee622257a", "score": "0.75206494", "text": "def listCompanyIds( self ):\n return self._data[ COMPANIES ].keys()", "title": "" }, { "docid": "04e10cbead0a53dd80e56af38a329a04", "score": "0.71382254", "text": "def active_company_ids(self) -> Ge...
26eaf61bb7f4a99fb0e89f50c19e4bf2
__init__(self) > TIntFltKd __init__(self, TIntFltKd KeyDat) > TIntFltKd
[ { "docid": "c593c371c475387a5595c875a3d9bcda", "score": "0.78430516", "text": "def __init__(self, *args):\n _snap.TIntFltKd_swiginit(self,_snap.new_TIntFltKd(*args))", "title": "" } ]
[ { "docid": "3debcee7b0b5e1e909aa548561aac8e6", "score": "0.7764347", "text": "def __init__(self, *args):\n _snap.TIntFltKdV_swiginit(self,_snap.new_TIntFltKdV(*args))", "title": "" }, { "docid": "c3a74e11c3091ae23a0f522af746fbb0", "score": "0.76881486", "text": "def __init__(s...
30cf92c27cfc5ed339a3444c06c710b5
To set up customized header
[ { "docid": "cbf1c5d4831d97c3deaa3c656596ed74", "score": "0.0", "text": "def init_setup(self, header_list):\n assert(isinstance(header_list, list))\n assert(len(header_list) == self._myNumCols)\n\n # Set up header\n for i_col in range(self._myNumCols):\n header = he...
[ { "docid": "2a3fba76992b3059f9c767bed3bb2505", "score": "0.7375767", "text": "def create_header(self, controller, header):\n label = tkinter.Label(self, text=header, font=controller.header_font)\n label.pack(side='top', fill='x', pady=20)", "title": "" }, { "docid": "6b411a021c...
209c4283cd4724a4d2adf5555c56efe6
A simple fully connected network with regression output
[ { "docid": "1545ffa21720990180abeb0b06f3acde", "score": "0.0", "text": "def SimpleFn(x, x_additional, architecture = [100, 1, 32, 32, 1], context = 'buy_'):\n with tf.name_scope(context + 'fc1'):\n W_fc1 = weight_variable([architecture[0], architecture[2]])\n b_fc1 = bias_variable([architecture[2...
[ { "docid": "06e365561eea5dfa4c7ad3164413baed", "score": "0.6496318", "text": "def _simple_network():\n input = paddle.static.data(\n name=\"input\", shape=[None, 2, 2], dtype=\"float32\"\n )\n weight = paddle.create_parameter(\n shape=[2, 3],\n dtype=\"float32\",\n a...
c937572e1392a3d6b5d31b56b7b8c048
Checks if the packet is of a certain type
[ { "docid": "4e73f806677fd2173749ceb58404fe15", "score": "0.8320609", "text": "def check_packet_type(packet, target_packet):\n\n # Grabs the first section of the Packet\n packet_string = str(packet)\n split = packet_string.split(' ')\n\n # Checks for the target packet type\n if target_pack...
[ { "docid": "28a3b0fb6b49327dc364d8b14122cbd8", "score": "0.76044613", "text": "def check_type(cls, packet_type=None, data=None):\n if data is None:\n raise ValueError('Not data supplied. Data cannot be None')\n elif packet_type is None:\n raise ValueError('Not packet_...
840baef06fe1889c2a7a3f59e70fdb1c
Starts a scan and returns a waitable for when the scan completes
[ { "docid": "d8337579a571ba249ad925553b7e5870", "score": "0.65212065", "text": "def start_scan(self, scan_parameters: ScanParameters = None, clear_scan_reports=True) -> scan_waitable.ScanFinishedWaitable:\r\n self.stop()\r\n # Cache the device's address on scan start\r\n self._own_ad...
[ { "docid": "f992fe331afed5a1f4fcc791d974e11d", "score": "0.7121392", "text": "def start(self):\n\n print(\"Starting scan task...\")\n if self.t_scan is None:\n self.t_scan = Timer(-1)\n self.t_scan.init(\n period=self.scan_period,\n mode=...
007d503ca4fa5e3e5cacc0a036098e48
Opens list column to rows Attributes
[ { "docid": "b212ced1fba0651b841b10e760e0a8b0", "score": "0.0", "text": "def listToRows(self, column:str, id:str, column_final:str):\n import pandas as pd\n import numpy as np\n # Creates new column converting the current list into a string\n self.data[column+'_str'] = self.data[column].apply...
[ { "docid": "68dfd020f3fa8e0141a597e0e7a6ceae", "score": "0.642196", "text": "def column2list():", "title": "" }, { "docid": "bbf1d89fde156270f86018b1828732dc", "score": "0.59959775", "text": "def __init__(self, row, kw):\n super().__init__([], **kw)\n\n self._columns = ...
6a5f4d250ef0388ef9618f6955fc436c
_insertStream_ Insert a stream into the stream table in T0AST. This will work even if the stream already exists inside the table.
[ { "docid": "98f7b4eae4e6b60dca02f4125dc85195", "score": "0.7189676", "text": "def insertStream(dbConn, streamName):\n sqlQuery = \"\"\"INSERT INTO stream (ID, NAME) SELECT stream_SEQ.nextval, :p_1\n FROM DUAL WHERE NOT EXISTS\n (SELECT NAME FROM stream WHERE NAME = :...
[ { "docid": "918e1ed716c3d91d297b2e53f580057e", "score": "0.64942634", "text": "def insert_datastream(self, stream):\n for flight in stream:\n # ArrDelay and DepDelay and TailNum can be 'NA' when cancelled is true\n if (flight.year != 'NA'\n and flight.month !=...
d30191c262bc57e94f5ce39f6d349885
smartctl d scsi a
[ { "docid": "3c72ac6085e8b7a17cc81f23544665b8", "score": "0.64197683", "text": "def intel_scsi_cmd_all():\n stderr = \"\"\n stdout = \"\"\"\nsmartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.10.0-327.3.1.el7.x86_64] (local build)\nCopyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools....
[ { "docid": "149a9828f502d9dd58b679576e1b7ba9", "score": "0.67724967", "text": "def intel_scsi_cmd_sasphy():\n stderr = \"\"\n stdout = \"\"\"\nsmartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.10.0-327.3.1.el7.x86_64] (local build)\nCopyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontoo...
d9e0c850fb5ac39f1ac1485d0d02f903
Delete the given entity and save if specified.
[ { "docid": "77927a1bebad2d96ec15cffe291ba3a0", "score": "0.61194575", "text": "def delete(self, commit=True):\n ufo.db.session.delete(self)\n return commit and ufo.db.session.commit()", "title": "" } ]
[ { "docid": "895f750707f81a5f6c61c536bfe65074", "score": "0.78031045", "text": "def delete(self, entity):\n\n entity.delete()\n # entity has been deleted call _onDelete\n self._onDelete(entity)", "title": "" }, { "docid": "dc5642c37ec78fb25ad36ba7f63fa2a4", "score": "0.7014826", ...
a310024ff88502d4a0f995bd83129ca2
Gets the ac of this ResultUniprotEntries.
[ { "docid": "da54b5d5690d45cfaab31f193e2a7fb2", "score": "0.6681408", "text": "def ac(self) -> str:\n return self._ac", "title": "" } ]
[ { "docid": "51c9ab7c299c1a8bb422cc0ec0b90cc8", "score": "0.61584806", "text": "def getAcr(self):\n pass", "title": "" }, { "docid": "22f9792a7026c3202de799bbe14f5e70", "score": "0.5821461", "text": "def ac(self):\n return np.array(self['ac'], dtype=np.float32) / 1000", ...
c094f9d2a50f484f869a9927fcb66753
Return a postorder list of all items in this binary search tree.
[ { "docid": "bd0a7e7e008793639ed841a8839d03af", "score": "0.84094524", "text": "def items_post_order(self):\n items = []\n if not self.is_empty():\n # Traverse tree post-order from root, appending each node's item\n self._traverse_post_order_iterative(self.root, items....
[ { "docid": "811485f014d979a705648958971be696", "score": "0.7364006", "text": "def post_order(self):\n output = []\n def walk(node):\n if not node:\n return\n walk(node.left)\n walk(node.right)\n output.append(node.value)\n w...
9da9283cd11ad789fa2024aae0cc15dd
verifies that the density sums to number of electrons
[ { "docid": "c040f739c7369e7c4ff7b97cb58f507f", "score": "0.81512326", "text": "def _check_density(self,density, num_electrons):\n\n FLOAT_PRECISION = 0.01\n #integrate the density over the spherical space\n #s = float(np.sum(density))\n #s = 4*np.pi * float(np.sum(density * s...
[ { "docid": "a2143906e5d0c2ae91b15a37fbb28e96", "score": "0.6757781", "text": "def _calc_density(self, EigenVecs, num_electrons): \n density = 0\n\n for i in range (0, len(self.occupation_list)):\n #print(\"orbital number - {0} adding occupation: {1}\".format(i, self.occupatio...
f66314df9dbb5323c0a87f20ba09e248
Test add as numarrayarray for basic function with array limit Array code b.
[ { "docid": "ca7e711de6ccf497bd1fac675d6d8c8a", "score": "0.0", "text": "def test_add_basic_num_array_array_d3(self):\n\t\tfor testvalx, testdatay in self.groupeddatay:\n\t\t\twith self.subTest(msg='Failed with parameter', testval = (testvalx, testdatay)):\n\n\t\t\t\tdata1 = array.array('b', testdatay)\n...
[ { "docid": "5d9a0aca89a47d67865d0746fcaa1754", "score": "0.773321", "text": "def test_add_num_array_array_b4(self):\n\t\t# This version is expected to pass.\n\t\tarrayfunc.add(self.MinLimit, self.zero1array, self.dataout)\n\n\t\t# This is the actual test.\n\t\twith self.assertRaises(OverflowError):\n\t\...
4c37e6bc30849391acf8f7382aa80bde
Test precedence of rc over env and whitelisting.
[ { "docid": "3f163da996d456259d8bcfa00adc4413", "score": "0.0", "text": "def test_set_settings(self):\n in_toto.user_settings.set_settings()\n\n # From envvar IN_TOTO_ARTIFACT_BASE_PATH\n self.assertEquals(in_toto.settings.ARTIFACT_BASE_PATH, \"e/n/v\")\n\n # From RCfile setting (has preceden...
[ { "docid": "fb408c71fae228d4c62e72491b1bfd25", "score": "0.6072304", "text": "def check_environment_presets():\n presets = [x for x in os.environ.copy().keys()\n if x.startswith('IRONIC') or x.startswith('OS_')]\n if presets:\n print(\"_\" * 80)\n print(\"*WARNING* Foun...
52e98db146334c52dcf6cc896b73dc5f
Identify stream handlers writing to the given streams(s).
[ { "docid": "08b2c4b0c538d95191f54db5270cadb1", "score": "0.6958262", "text": "def match_stream_handler(handler, streams=[]):\n return (isinstance(handler, logging.StreamHandler) and\n getattr(handler, 'stream') in (streams or (sys.stdout, sys.stderr)))", "title": "" } ]
[ { "docid": "d3ad778637d048076f6d24a6fcd020c0", "score": "0.59115714", "text": "def _file_descriptors_work(*streams):\n # test whether we can get fds for out and error\n try:\n for stream in streams:\n stream.fileno()\n return True\n except BaseException:\n return...
9b484ac9123e68d269b5f623c2c64969
Surface2Right { get; } > SurfaceSurfaceIntersectorConfiguration
[ { "docid": "d277b3aca70753fa1664609bf69d1cf1", "score": "0.9119296", "text": "def Surface2Right(self) -> SurfaceSurfaceIntersectorConfiguration:", "title": "" } ]
[ { "docid": "a0061321502479ed8b10ba1ceaec5cb3", "score": "0.9002965", "text": "def Surface1Right(self) -> SurfaceSurfaceIntersectorConfiguration:", "title": "" }, { "docid": "fa008281c2a24443fcc5dd185b9a55d1", "score": "0.7710068", "text": "def Surface2Left(self) -> SurfaceSurfaceInte...
45c5f13c77ebdc051ef9f5aef0a88630
takes the initiate_mining_package dictionary and the qMachines of each machine to calculate emissions
[ { "docid": "9dc3685d84a3954bced6dda399dcfe18", "score": "0.6304393", "text": "def package_emissions(self):\n\n longwallShearer_emissions = longwallSheerer.qMachine(self.longwallShearer.power,\n self.required_output,\n ...
[ { "docid": "115568d12c9f6c0dc12ac73118cf65c6", "score": "0.5337584", "text": "def post_solve(m, outdir=None):\n\n if outdir is None:\n outdir = m.options.outputs_dir\n\n zone_fuel_cost = get_zone_fuel_cost(m)\n has_subsidies = hasattr(m, 'gen_investment_subsidy_fraction')\n\n gen_data...
a5c96308d71b0c760e1e640269275490
Gzip a given string content.
[ { "docid": "ee9d130fab1feae0dc17187cfa91f5f9", "score": "0.7249553", "text": "def _compress_content(self, content):\n zbuf = StringIO()\n zfile = GzipFile(mode='wb', compresslevel=6, fileobj=zbuf)\n try:\n zfile.write(content.read())\n finally:\n zfile.c...
[ { "docid": "c92d8854cb03b0dee3bae0841a817b12", "score": "0.75606656", "text": "def compress_string(self, s):\n import cStringIO, gzip\n zbuf = cStringIO.StringIO()\n zfile = gzip.GzipFile(mode='wb', compresslevel=6, fileobj=zbuf)\n zfile.write(s)\n zfile.close()\n ...
6200d473f1718524d9d2c9c3a1298ca0
For the most part, reformatting of
[ { "docid": "53b89fad17638ca30b49dff33075ec2b", "score": "0.0", "text": "def plot_county_errors(model, svg_file=Path(\"data/counties.svg\"), save_colorbar=True):\n\n model_sd = torch.load(model, map_location=\"cpu\")\n\n model_dir = model.parents[0]\n\n real_values = model_sd[\"test_real\"]\n ...
[ { "docid": "c71ddc9cfaee61c31bb33d4b6057df39", "score": "0.6501458", "text": "def Format():", "title": "" }, { "docid": "6a147248e93e4251e8b209992430c030", "score": "0.61220425", "text": "def format(self):\n ...", "title": "" }, { "docid": "df179818f68aaad3ea353809...
35ad6880de89a0177445728f2773a0ba
Starts a new subroutine scope (i.e. erases all names in the previous subroutine's scope.)
[ { "docid": "ad7c5468c895132ec22ad7756b240832", "score": "0.6358833", "text": "def start_subroutine(self):\n\n self._subroutine_table.clear()\n self._kind_counter['argument'] = 0\n self._kind_counter['var'] = 0", "title": "" } ]
[ { "docid": "ce7b3e090f92b78d8e305cac7c33755e", "score": "0.6175013", "text": "def startRoutine(self):\n self.symbolTable[\"subroutine\"] = {}\n self.counts['ARG'] = 0\n self.counts['VAR'] = 0", "title": "" }, { "docid": "0b40c38b32a688e503b0eb805ae43e21", "score": "0...
0c45ad1ca37f394b9dd2683d932f02b0
Generates list of cal curve, qc, and blank samples to append in sample_queue()
[ { "docid": "3d72f771a08a44bbfed35e1b09d25845", "score": "0.499762", "text": "def cal_curve(state: int, number: int, platform: str, wash_no: int, pool_no: int):\n cal_list = list()\n std_plate_name = \"SP\" + str(ceil(number/7))\n\n row = list('ABCDEFG')[(number-1) % 7]\n if state < 2:\n ...
[ { "docid": "9f2cb6765d7c16b8e03dd0016209394a", "score": "0.60471046", "text": "def fill_batch_queue(self):\r\n while True:\r\n\r\n # print 'hi'\r\n if self._hps.mode != 'decode' and self._hps.mode != 'calc_features':\r\n # Get bucketing_cache_size-many batches...
ce4d3a818559285dd4ad0d0459e39396
'send2all' sends a message to all users
[ { "docid": "070aca796895cb047b8bcf76b8687a59", "score": "0.7041352", "text": "def send2all(update, context):\n\n # read all users from StatBot.log\n user = []\n with open('./StatBot.log') as fid:\n for line in fid:\n ele = line.split(' - ')\n user.append(int(ele[4]....
[ { "docid": "eb5132fe50e1452e1b243d7e243512af", "score": "0.6550152", "text": "def send_to_all(self, message):\n [self.send(message, addr) for addr in self.clients]", "title": "" }, { "docid": "af6f69d694fb5a50a67dcaf705a9dc1a", "score": "0.6523553", "text": "def send_to_all(cl...
b10c12870f2d2ab26405055591433408
A copy activity source for SAP Cloud for Customer source.
[ { "docid": "fd8c2c3d8b508202dd8f01837b771e6b", "score": "0.55718714", "text": "def __init__(__self__, *,\n type: pulumi.Input[str],\n query: Optional[Any] = None,\n source_retry_count: Optional[Any] = None,\n source_retry_wait: Optional[Any...
[ { "docid": "6a291caf413f569ac7787a8509365b3c", "score": "0.56941664", "text": "def on_copy_source(self):\n source = self.data.get(\"source\", None)\n if not source:\n return\n\n project_name = self.dbcon.Session[\"AVALON_PROJECT\"]\n root = RegisteredRoots.register...
d22a81c545031a3b6b5decaa0d244ede
List all UUIDs in the archive Returns
[ { "docid": "d9d04b7c847b2b6a431bfeace34e5ab2", "score": "0.6825332", "text": "def list_uuids():\n # return common_utils.file_list('ephys/')\n if braingeneers.get_default_endpoint().startswith('http'):\n return [s.split('/')[-2] for s in s3wrangler.list_directories('s3://braingeneers' + '/ep...
[ { "docid": "11ec5dae8e00fc06f688c12de46acdcd", "score": "0.68951184", "text": "def uuids(self, count=None) -> Iterable[str]:\n response = self.session.get(\n urljoin(self.url, '_uuids'), \n params = {'count': count} if count is not None else None\n )\n if not r...
e0d4f32a4abc50f1cee0808579b0aa39
Computes and returns a file's hash digest.
[ { "docid": "ff27398279d04e808916db9a1727ec9e", "score": "0.75774205", "text": "def get_file_hash(filename):\n\t# Use SHA-2 256-bit\n\thash_function = hashlib.sha256()\n\t# Use the storage's default buffer\n\tbuffer_size = io.DEFAULT_BUFFER_SIZE\n\twith open(filename, \"rb\") as handler:\n\t\tbuffer = ha...
[ { "docid": "d79ccda8a7f00e31c016ed25ae02799b", "score": "0.809099", "text": "def _digest_file(file):\n BUF_SIZE = 65536\n\n m = hashlib.sha256()\n with open(file, 'rb') as f:\n while True:\n buf = f.read(BUF_SIZE)\n if not buf:\n break\n m....
bf03a23c0273b35a0d761f0e33ab7b44
DataBall constructor, connect to the go_fish database, define a cursor, and get the start time of the game. Initialize several other fields used in the database. 8
[ { "docid": "50c0f8aaed5ffd2608573129f5b91381", "score": "0.626582", "text": "def __init__(self,difficulty=0):\n self.conn = sqlite3.connect('go_fish.db') #Connect to database\n self.curs = self.conn.cursor()\n \n # start time of game\n self.ts = datetime.datetime.now(...
[ { "docid": "caceb3c401ac325d0e26409cca25db8d", "score": "0.62242234", "text": "def __init__(self):\n self.score = 0\n self.assassin_kills = 0\n self.mage_kills = 0\n self.ogre_kills = 0\n self.db = Database()", "title": "" }, { "docid": "cd3453ce1bf460fd52d...
cf83537c115725c409330215d6b5a422
Represents a list of spdx.document.ExternalDocumentRef as a Python list of dictionaries
[ { "docid": "3aef02b25c3f372a6dd9dc469f800c58", "score": "0.69072384", "text": "def ext_document_references_to_list(cls, ext_doc_refs):\n ext_doc_refs_list = []\n\n for ext_doc_ref in ext_doc_refs:\n ext_doc_ref_dict = OrderedDict([\n ('externalDocumentId', ext_doc...
[ { "docid": "02f0c1fdf2e1ca3705bb50309444c0c7", "score": "0.6509022", "text": "def to_dict(ret, deref_list=[]):\n retdict = ret.to_mongo().to_dict()\n for ref in deref_list:\n if isinstance(ret._data[ref], list):\n retdict[ref] = [x.to_mongo().to_dict() for x in ret._data[ref]]\n ...
5be360da2c57ecc95fded4d0ffa094a2
Filter your queryset as you want, then return it.
[ { "docid": "034fef724d5ff4b2b0c05a72b18f3891", "score": "0.0", "text": "def get_receivers_queryset(self, receiver_ids):\n return receiver_ids", "title": "" } ]
[ { "docid": "2eab7744c15e7982917bedecf46b5c80", "score": "0.76472706", "text": "def filter(self, qs):\n return qs.all()", "title": "" }, { "docid": "0d55fa6bdebd3337e64ce5e6580d617b", "score": "0.7603844", "text": "def filter_queryset(self, qs, filter_param):\n return qs...
eea86eec1e8b1516c6844724dff753de
Checks if a user is a staff in the academic office group. academic office group only has the permissions to view and respond to transcript requests except the student who made them
[ { "docid": "37eb986ac632d23448faf8d27388334b", "score": "0.7403345", "text": "def academic_office_staff_only(function):\n\n def wrap(request, *args, **kwargs):\n staff = Staff.objects.filter(user=request.user).first()\n group = get_object_or_404(Group, name='Academic Office')\n\n ...
[ { "docid": "9ed70dacee95781f7afb5723dc3fb0b1", "score": "0.7718486", "text": "def is_staff(self):\n return self.role == 'AD' or self.role == 'SA'", "title": "" }, { "docid": "ede8d602b0890c5162be4ebab03a37b5", "score": "0.75189376", "text": "def is_staff(self):\n return...
d089ca98a7f206ce1b664456d5053423
Write grasp metrics to database
[ { "docid": "b4e254f3886d18043c38f274672b02c7", "score": "0.61728704", "text": "def write_grasp_metrics(grasp_metric_dict, data, force_overwrite=False):\n for grasp_id, metric_dict in grasp_metric_dict.iteritems():\n grasp_key = GRASP_KEY + '_' + str(grasp_id)\n if grasp_key ...
[ { "docid": "163855fe95f27b3266f7cf87530e0800", "score": "0.65698516", "text": "def write(self, metrics):\n raise NotImplementedError", "title": "" }, { "docid": "ff5e1267431f6473fa5a4050fcf11be3", "score": "0.64918494", "text": "def put_genomicsMetrics(db, metrics):\n retur...
ffef628e950fce7d8be4f34b8515a83f
If no cars created, an appropriate message is displayed
[ { "docid": "ec556e3ffac45418701b4b8e014dfa8c", "score": "0.48073006", "text": "def test_context_data(self):\n response = self.client.get(reverse('popular'))\n self.assertEqual(response.status_code, 200)\n self.assertContains(response, 'No cars added')\n self.assertQuerysetEqu...
[ { "docid": "bdd0de10bfc411623eb167a11b334115", "score": "0.6560931", "text": "def display_no_car(form):\n return render_template(\"/customer/car_view.html\", cars=[], form=form, start_date=\"\", end_date=\"\")", "title": "" }, { "docid": "501ba74b54ecd9bb6f4aa11bed9e743a", "score": "0...
4d4b550de13792535a2bbaa8a9d4149b
Populate the indexing item with a Property, for both lists and dictionaries.
[ { "docid": "7f99c19011917125cda8bfca1c99d0fd", "score": "0.5757633", "text": "def __getitem__(self, item: Union[int, str]):\n if item not in self._items.keys():\n shape = Properties._shapes_map.get(self.service_name, {}).get(self.shape_name)\n member = shape[\"value\"][\"sha...
[ { "docid": "006a309296cbac0e8bfcae5d3ad05ceb", "score": "0.6605211", "text": "def __index_data_for_property(self, data, property_getter):\n self._get_logger().debug(\"Creating index on getter '{}' for #{} entries\".format(property_getter, len(data)))\n return {property_getter(data_item): d...
7546c3e37e518b99914041ff80f2a2e3
Return the field value in the job data identified by jobid. If jobid does not identify a job, the default value is returned. If the named field does not exist, an AttributeError exception is raised.
[ { "docid": "256ec9577e03e7f7ece7d395387949d5", "score": "0.8610517", "text": "def getfield(self, jobid, name, default=None):\n if name not in Fields:\n raise AttributeError(\"Job record has no attribute '%s'\" % name)\n key = _key(jobid)\n if not self.__client.exists(key)...
[ { "docid": "69bf28909f7acc163c363d958c69d13c", "score": "0.6560788", "text": "def _get_field_data_value(self, field_id, key_name):\n d = self._get_field_data_dict(field_id)\n return d.get(key_name, None)", "title": "" }, { "docid": "9ab5e206528d04f8a1e7e2c834bb5f4d", "score...
56a33b94c67f641b5f4000ff1f60be92
Display favorites from Favorite table
[ { "docid": "7c0370360c0dcd5614b530927e1608e2", "score": "0.7621096", "text": "def display_favorites(self):\n self.methods_for_db.get_favorites_products()\n sentence_for_favorites = \"your favorite products!\"\n if self.methods_for_db.favorites == []:\n print(self.messages...
[ { "docid": "ba80cdffd086ef672938b89a19b59f09", "score": "0.75344425", "text": "def show_favorites(self, client_id):\n favorites = self.favorite_m.retrieve_favorites(client_id)\n print(\"\\n****** FAVORIS ******\\n\")\n for i, dictionary in enumerate(favorites):\n code = d...
76688fe53cd914782ded9a48e64176b9
Return a discrete colormap from the continuous colormap cmap.
[ { "docid": "abf7018deae5cecaf093263ba6dfd96b", "score": "0.62132716", "text": "def cmap_discretize(self, cmap, N):\n\t\tif type(cmap) == str:\n\t\t\tcmap = cm.get_cmap(cmap)\n\t\t\tcolors_i = np.concatenate((np.linspace(0, 1., N), (0., 0., 0., 0.)))\n\t\t\tcolors_rgba = cmap(colors_i)\n\t\t\tindices = n...
[ { "docid": "64530397dc432e3fd67edf428f43658b", "score": "0.7468833", "text": "def _continuous_colormap(colormap, values, vmin=None, vmax=None):\n assert values is not None\n assert colormap.shape[1] == 3\n n = colormap.shape[0]\n vmin = vmin if vmin is not None else values.min()\n vmax = ...
db0af1a186c2fbf834cf81400266dddd
Wrapper around submit for python api.
[ { "docid": "1ed696ceed191d790787d19b8ed39d8d", "score": "0.6731706", "text": "def submit_api(config: dict, **kwargs):\n cfg = Config.from_dict(config)\n return submit(cfg=cfg, **kwargs)", "title": "" } ]
[ { "docid": "b3160e79d99c6bf5469e3b1f4a9dcb99", "score": "0.78354293", "text": "def submit(self):\n raise NotImplementedError", "title": "" }, { "docid": "685d566c2b16f9ade7eb9ad70c3d3e39", "score": "0.76533663", "text": "def submit(self):\n pass", "title": "" }, ...
439fbb9be6d578e0ff2961c46bc9a7d4
Saves the coordinates of all zone arrow and aligning vertex groups
[ { "docid": "c0af716381c56c14ccb6fc72e5d9de22", "score": "0.6373062", "text": "def save_vertex_groups(mesh):\n print('saving Zones vertex groups')\n current_object = bpy.context.object\n current_mode = bpy.context.mode\n mesh.update_from_editmode()\n vgroup_names = {vgroup.index: vgroup.na...
[ { "docid": "1b3ae2c9b3a777eb8d116287449da2ec", "score": "0.5913553", "text": "def savepoint():", "title": "" }, { "docid": "61721e6bc0615cdba21eb803df749aa2", "score": "0.53940016", "text": "def save_as_ijk(markupnodes, dir_path, prefix):\n for i, node in enumerate(markupnodes):\n...
80f239ecd1d7f5cd5b2419f1cea49b12
Recibe un mensaje con un color y lo pone en la pantalla en una posicion indicada
[ { "docid": "e7aa712035f605d02fcca551bc774d29", "score": "0.6340553", "text": "def message_to_screen(msg,color,x,y):\n screen_text = font.render(msg, True, color)\n display.blit(screen_text, (x,y))", "title": "" } ]
[ { "docid": "b79ea9df88e1c50474bb5318da2ead30", "score": "0.7239434", "text": "def eyes_color(self, message):\n # TODO use opencv2 to edit frames\n r = message.data.get(\"r\")\n if r > 255/2:\n self.current_frame = self.draw_custom(self.alarm)\n g = message.data.get...
998ac34f3ca67be64fc68b36be75906c
It allows to use set literals.
[ { "docid": "f3ce205a5cc66bbc4d76cef40f77b209", "score": "0.6530405", "text": "def test_Set():\n assert restricted_eval('{1, 2, 3}') == set([1, 2, 3])", "title": "" } ]
[ { "docid": "e70be52f1c10ed4811277ad0453827fc", "score": "0.7011735", "text": "def sets(*args, **kwargs):\n\n pass", "title": "" }, { "docid": "2f47632f0dd26d1d75200dd3a942aa2d", "score": "0.691617", "text": "def set(self, s):\r\n self.handle(set, s)", "title": "" }, ...
eb6bfd65ff86d411b9e914fa5d93df5a
Get movie showtimes for cinema. Given the cinema name as a lowercase string (e.g. arena, delft, rembrandt) gets all the current movie showtimes for this cinema. Returns a list of twovalue tuples representing showtime date and time as `datetime.datetime` object and showtime technology.
[ { "docid": "6d3e5a53c3c54afbc0c3db2b8065824f", "score": "0.7254321", "text": "def get_movie_showtimes_for_cinema(movie_page_doc, cinema):\n cinema_movie_showtimes = []\n showtime_days = movie_page_doc.xpath(SHOWTIME_DAYS.format(cinema))\n for showtime_day in showtime_days:\n day_name = s...
[ { "docid": "274542cf0da3b9dc0d4ffa7f6c2d9c6d", "score": "0.63900685", "text": "def getShowList(self):\n showXML = self.sendRequestAndReadData(\"core/getShows\")\n showNames = [] \n if showXML:\n root = ET.fromstring(showXML)\n shows = root.findall('Show'...
a594995c748a30819fd0e6d94b30a20b
We discard the first 0.5 seconds of each trial as it does not contain any information.
[ { "docid": "ee29ece24dd63cfd2b7b24d1d030d35e", "score": "0.51472926", "text": "def discard_irrelevant_measurements(train_x, sfreq):\n tmin = 0\n tmax = 1\n tmin_original = -0.5\n\n beginning = np.round((tmin - tmin_original) * sfreq).astype(np.int)\n end = np.round((tmax - tmin_original) ...
[ { "docid": "510154af90407dcb2af1c70437e247e3", "score": "0.5970883", "text": "def trimOut(self, time):\n ...", "title": "" }, { "docid": "00b793f9cf69953663cf316d57150db6", "score": "0.58393484", "text": "def _timeskip(self):\n tm = time.time()\n bundy.bundy.comp...
981994ac7d1b428ccae299d8115d26e2
Create an empty list, append an empty list for every row (height) and append a 0 to every sublist for each column (width). For any element cells[i][j], i and j represent x and y coordinates respectively on the grid.
[ { "docid": "17e5bce32d632431826aa3ff78ad80a0", "score": "0.8121759", "text": "def init_empty_cells(width, height):\n cells = []\n if width <= 0 or height <= 0:\n return(cells)\n else:\n for i in range(height):\n cells.append([])\n for i in cells:\n for...
[ { "docid": "e96b05476685bbbae7d04a7e8291668d", "score": "0.7523356", "text": "def create_empty_grid(width: int, height: int, value=tile_empty) -> List:\n\n grid = []\n for row in range(height):\n grid.append([])\n for column in range(width):\n grid[row].append(value)\n ...
a24db6b35b2e15cbd0ffa24ee0106685
Convert a list of ranges to a set of numbers
[ { "docid": "07869e22c41238d7506ad869c60bc49a", "score": "0.78628695", "text": "def range_to_set(ranges):\n return set().union(*[set(range(l, h + 1)) for l, h in ranges])", "title": "" } ]
[ { "docid": "e034e9ef47574a444309c76e9a1af6e0", "score": "0.7111665", "text": "def parse_ranges(ccdlist):\n s = set()\n for r1 in ccdlist.split(','):\n r2 = r1.split('-')\n if len(r2) == 1:\n s.add(int(r2[0]))\n elif len(r2) == 2:\n for j in range(int(r2[0...
a6f2094b23fd016f411dd70f2df2b7ef
Using three different increments, find how much tilt, roll, and twist of the birdbath yields maximum waterholding ability.
[ { "docid": "6001527e7637b1559b11b1ce1fe85531", "score": "0.60584825", "text": "def helper(func):\n curr_best_water = -1\n curr_best_roll = -1\n curr_best_twist = -1\n curr_best_tilt = -1\n mini = -45\n maxi = 45\n delta = [12, 6, 1]\n for d in delta: # use thr...
[ { "docid": "aeef00b8dc0602f922a09d4c7ef36bf5", "score": "0.65780234", "text": "def findbest(roll, tilt, twist, min, max, delta, func):\n best_water = -1\n best_roll = -1\n best_tilt = -1\n best_twist = -1\n while roll < max: # until roll, tilt, twist values hit m...
28ac727e4fdb7ae12cfd62748788dfbe
Test to verify that a configuration error is thrown when supplying the heading_line_length value with a string that is not an integer.
[ { "docid": "4b5961f878003329402a5978b49890bb", "score": "0.76512426", "text": "def test_md013_bad_configuration_heading_line_length():\n\n # Arrange\n scanner = MarkdownScanner()\n source_path = os.path.join(\n \"test\", \"resources\", \"rules\", \"md013\", \"good_small_line.md\"\n )\...
[ { "docid": "62254daa2a5181a2d6752378cd4df595", "score": "0.730549", "text": "def test_md013_bad_configuration_line_length():\n\n # Arrange\n scanner = MarkdownScanner()\n source_path = os.path.join(\n \"test\", \"resources\", \"rules\", \"md013\", \"good_small_line.md\"\n )\n suppl...
ce2fce563527b8e094866bde874c343f
Check Data Objects for Points.
[ { "docid": "e2ebabb16e6e7c6eb007db609116141c", "score": "0.0", "text": "def checkData(file_list):\n for f in file_list:\n f_sp = f[\"syntenic_points\"]\n sp1 = f_sp.keys()[0]\n sp2 = f_sp[sp1].keys()[0]\n data = f_sp[sp1][sp2]\n if len(data) < 1:\n return...
[ { "docid": "08399fe9669baae6573686b86cd56247", "score": "0.6803532", "text": "def check(self, points):\n pts=[tuple(p) for p in points]\n if sorted(list(set(pts))) != sorted(pts):\n raise Exception(\"No point must be upon another.\")", "title": "" }, { "docid": "cb5b...
0bf1acc1c0ed809c58b52cf75dd8fd46
Create a socket for an existing file descriptor Duplicate the file descriptor and return a `Socket` for it. The blocking mode can be set via `blocking`. If `close_fd` is True (the default) `fd` will be closed.
[ { "docid": "25560e410d51cd9abd4df3482b2e9811", "score": "0.7590436", "text": "def new_from_fd(cls, fd: int, *, blocking=True, close_fd=True):\n sock = socket.fromfd(fd, socket.AF_UNIX, socket.SOCK_SEQPACKET)\n sock.setblocking(blocking)\n if close_fd:\n os.close(fd)\n ...
[ { "docid": "846525ea98faa4e7fbc363b4d62f546b", "score": "0.7232971", "text": "def fromfd(fd, family, type, proto=0):\n nfd = dup(fd)\n return socket(family, type, proto, nfd)", "title": "" }, { "docid": "54022c648a189d4cfefa93374116dc19", "score": "0.65049374", "text": "def dup...
948eb2200aadd4573b7870328e1c4953
Create gene fixture for .
[ { "docid": "b987e859690a938cf96237cad8db8225", "score": "0.0", "text": "def loc106783576():\n params = {\n \"match_type\": MatchType.NO_MATCH,\n \"label\": \"nonconserved acetylation island sequence 68 enhancer\",\n \"concept_id\": \"ncbigene:106783576\",\n \"symbol\": \"L...
[ { "docid": "275881221669d5e4e9ea5e76b98e58c3", "score": "0.69135976", "text": "def setUp(self):\n \n self.gene = self.construct_gene()", "title": "" }, { "docid": "91eb98ca9e3d5b66f096f43a6c9dcbd5", "score": "0.6581844", "text": "def create_fixtures(self):", "title"...
6b417230d88e9e07ef0045cbddfe6ec8
Uses the user's chosen automatic allocation method, or if none, assigns all to STR.
[ { "docid": "1ff12aa63eb4f1aca8f2e6e12021aa91", "score": "0.0", "text": "def allocateAllAttributePoints(self):\n\t\turl = \"https://habitica.com/api/v3/user/allocate-now\"\n\t\treturn(postUrl(url, self.credentials))", "title": "" } ]
[ { "docid": "905e351024885095ad50ec9017ad8686", "score": "0.52877396", "text": "def autostring(min_length=3):\n\n assert min_length >= 2\n addr = memorymanager.BinaryAddr(0)\n while addr < len(memory_binary):\n i = 0\n while (addr + i) < len(memory_binary) and memory_binary[addr + ...
7ccb997b2a94b9bc16a7af1440063646
Registers the existence of an image with `name`, and that the image used displayable d. `name` A tuple of strings.
[ { "docid": "aced93de0282fe4d81942a6afc252a95", "score": "0.72605515", "text": "def register_image(name, d):\r\n\r\n tag = name[0]\r\n rest = name[1:]\r\n\r\n images[name] = d\r\n image_attributes[tag].append(rest)", "title": "" } ]
[ { "docid": "63112d4bac877160bcf20cebe0265b09", "score": "0.66050875", "text": "def add_image(self, name, camera_instance):\n lbl = ClientLabel(self.canvas, bg=\"white\", bd=self.canvas.label_border_size).define(name, camera_instance)\n self.canvas.images[name] = lbl\n # self.canvas....
288646a7a29a1398ae5c2c55e1c5a00e
Override of handle function
[ { "docid": "984cb6beaa8290b18073f668e7e95949", "score": "0.0", "text": "def handle(self):\n server_interface = Authorization(self.server.database, self._set_auth_user)\n self.transport.start_server(server=server_interface)\n channel = self.transport.accept(self.TIMEOUT)\n log...
[ { "docid": "b207aca386aaf79999970d1b3215a694", "score": "0.82228774", "text": "def _handle(self, *args, **options):\n return super()._handle(*args, **options)", "title": "" }, { "docid": "2d78b26b871ee02791e22a63f67b33c3", "score": "0.81764233", "text": "def handle(self):", ...
8dd9313f810d85d87377c4c83da5271c
Returns list comprising names of Stan parameters. Note that the length of this list will not generally equal ``n_parameters`` since each name may correspond to a vector.
[ { "docid": "72a6fbab24b7172766423478b29438e6", "score": "0.0", "text": "def names(self):\n return self._names", "title": "" } ]
[ { "docid": "0704c257661eb8a6786f81ceb412dd13", "score": "0.85193115", "text": "def get_parameters_names(self) -> List:\n return [variable[\"name\"] for variable in self.parameters]", "title": "" }, { "docid": "afd09fdd4979c219478623e76aec6235", "score": "0.7589632", "text": "d...
3bcad392966a6fcd6b42d6cc935c47f2
Get `SENTENCE BREAK` property.
[ { "docid": "6a5a4a570ee367fd4599aecc9f3924bc", "score": "0.68026906", "text": "def get_sentence_break_property(value, binary=False):\n\n obj = unidata.ascii_sentence_break if binary else unidata.unicode_sentence_break\n\n if value.startswith('^'):\n negated = value[1:]\n value = '^' ...
[ { "docid": "ca993ec8155e0498f61f8c1284fbd91e", "score": "0.5473725", "text": "def _get_sent(self):\n return self.__sent", "title": "" }, { "docid": "ca993ec8155e0498f61f8c1284fbd91e", "score": "0.5473725", "text": "def _get_sent(self):\n return self.__sent", "title": "" }...
bc12ac2bd81b6cd878534a3d4f323653
Provides the user with a list of options to search the csv file and calls the appropriate search functions
[ { "docid": "4d768fac5d7955f410d296ac111496db", "score": "0.587037", "text": "def search_entry():\n clear_screen()\n print(\"Search for an Existing Entry:\")\n print('''\n [A] Search by Date\n [B] Amount of Time\n [C] Exact Search\n [D] Regex Pattern\n [E] Return to Main Menu\n ...
[ { "docid": "0f8e592987aa93a7d33fabc7963d8d61", "score": "0.64782333", "text": "def search(bot, update, args):\n csv_file = read_csv(file)\n user_string = update.message.text.split()\n result = str()\n if len(user_string) == 2:\n for i in range(len(csv_file)):\n csv_file[i] ...
d1a63422da033794916a714b5fd0b99a
Given the following, generate a list of dict results split by fiscal years/quarters/months
[ { "docid": "68bc9b80b22032ac74bf4c74d2f56c9a", "score": "0.49230993", "text": "def bolster_missing_time_periods(filter_time_periods, queryset, date_range_type, columns):\n min_date, max_date = min_and_max_from_date_ranges(filter_time_periods)\n results = create_full_time_periods(min_date, max_date...
[ { "docid": "d277920cd02ddd135c01e630b1d38afa", "score": "0.6372415", "text": "def get_fiscalyear_revenue_timeseris_data(client_id:str)->List[Dict]:\n df = load_process_data(client_id)\n fiscalyears = df['date'].dt.to_period('A-MAR').astype(str).astype(int).unique().tolist()\n fiscalyears = so...
3d6d60c4d0a2893d1edeb7e1161b1596
Pull ungoogledchromium repositories, run scripts and apply patches.
[ { "docid": "706f0331272d80f78e074f013adb38fa", "score": "0.6706228", "text": "def prepare(config):\n # Checkout ungoogled-chromium\n uc_git_origin = 'https://github.com/Eloston/ungoogled-chromium.git'\\\n if ungoogled_chromium_origin is None else ungoogled_chromium_origin\n git_maybe_che...
[ { "docid": "ecac29780f2dec0c3d136abb6f000c6c", "score": "0.57570237", "text": "def exec_main():\n\n try_get_lock()\n\n # Allow user to force a SHA1 from env, mostly for testing purpose without\n # putting pressure on Github API (anon is rate-limited to 60 reqs/hr from the\n # same IP address...
a5654440ae5c404efcd3140429dcd2df
Excutes 'query' in textarea in respose to the 'submit' button. Either the 'status' div or the cell's output region are updated according to whether the output mode is set to 'html' or 'text'. An explict COMMIT is required to modify a database file opened in either 'r' or 'w' mode. The pseudo command ".schema" dumps the...
[ { "docid": "1aebb93a9022179b9fdb512f14d20a1d", "score": "0.64445883", "text": "def executeSQL(self, button):\n query = self.query.value\n self.history.append(query)\n self.histIdx = -1\n if (query.strip().lower().startswith('.schema')):\n table = query[7:].strip()\...
[ { "docid": "e21bbedcfe57e4dde89c501f78053c1d", "score": "0.5836899", "text": "def commit(message):\n settings = _load_settings()\n status = _load_settings(\".TDB\", check=[])\n settings.update(status)\n database = settings[\"database\"]\n client, msg = _connect(settings)\n click.echo(m...
cab3e85aee2ae1056716a2a86c357d5f
Prefect task to finalize the downscaling run.
[ { "docid": "b68008b92ad4c8e52eef51cd0120f6e8", "score": "0.0", "text": "def finalize(run_parameters: RunParameters = None, **paths):\n _finalize(run_parameters, kind='runs', **paths)", "title": "" } ]
[ { "docid": "f1f9202e19312af090558d9300f3c976", "score": "0.6260884", "text": "def teardown(self, task, job_config):", "title": "" }, { "docid": "1a1c2f4fd22c23c94eab7333d3e99aee", "score": "0.616505", "text": "def finalize(self):\n self.logger.info(\"Please wait while finalizi...
8c0e015fc5660b31466a762e418555be
Updates the total amount of posts made
[ { "docid": "45fe69c7411c9f44665fd644334b8242", "score": "0.0", "text": "def updatepost(id):\n file_name = 'posts.json'\n posts = json.loads(openfile(file_name))\n posts['ids'].append(id)\n writefile(file_name, posts)", "title": "" } ]
[ { "docid": "c75a06323bbbf01792c1d8e98464103f", "score": "0.6925383", "text": "def total_posts():\n return Post.published.count()", "title": "" }, { "docid": "777b5802ad52cea96062f0865321a171", "score": "0.6705593", "text": "def update_totals(self):\r\n result = self.votes.a...
c513c30ba32a62d232eab81145ddc9f0
Moves the aliens to the right.
[ { "docid": "f2ac8bb5224bf272097534b659d3890c", "score": "0.72090906", "text": "def alien_right(self):\n for alien_col in self._aliens:\n for alien in alien_col:\n if alien != None:\n alien.x = alien.x + ALIEN_H_WALK", "title": "" } ]
[ { "docid": "323e0c73ed9e7793c55a6f67e0c32085", "score": "0.80261123", "text": "def move_aliens_right(self):\n self.x += ALIEN_H_WALK", "title": "" }, { "docid": "5ea375b75597fc52cec7d2c55d54c02d", "score": "0.75233734", "text": "def _moveRight(self,list):\n for row in l...
71f970be8e50de1a97900e71ccd59979
Specifies the clear text password used to encrypt traffic. This field will not be displayed.
[ { "docid": "08db6c2f6f5e31900a83b8ab61939029", "score": "0.6029469", "text": "def privacy_password(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"privacy_password\")", "title": "" } ]
[ { "docid": "8175e7a43331357572d476380ddec002", "score": "0.7123115", "text": "def passwordInClear(self):", "title": "" }, { "docid": "0dacc1dd60134b989efcff3f93d26faa", "score": "0.69737387", "text": "def password(self):\n raise AttributeError('password: write-only field')", ...
ffd0299e38b55062b10879e459715b0a
genereates two qubit identity equal circuit with given length
[ { "docid": "12e2084757eca5a7228e3ce921786841", "score": "0.7121084", "text": "def two_qubit_circuit(length: int, qubit_one: int, qubit_two: int):\n\n p = Program()\n\n for j in range(int(length/2)):\n theta = 2 * np.pi * random.random()\n gate_list = [RZ(theta, qubit_one), RX(np.pi /...
[ { "docid": "3bbdc1b872fee8bfda6527b96be9eb4e", "score": "0.6130477", "text": "def test_two_qubit_gates_with_symbols(gate: cirq.Gate, expected_length: int):\n q0 = cirq.GridQubit(5, 3)\n q1 = cirq.GridQubit(5, 4)\n original_circuit = cirq.Circuit(gate(q0, q1))\n converted_circuit = original_c...
6f7832c72923e4e0dee8f9a49ea9635e
Removes a flag from a video.
[ { "docid": "f517e7999eef48df8f719e8d1e866d98", "score": "0.63815784", "text": "def allow_video(self, video_id):\r\n videos = dict([[video.video_id, video] for video in self._video_library.get_all_videos()])\r\n \r\n if video_id in videos:\r\n video = videos[video_id]\r\n ...
[ { "docid": "c42b7812b127cfa046024ccae96f9efc", "score": "0.7078656", "text": "def allow_video(self, video_id):\n video_to_unflag = self._video_library.get_video(video_id)\n\n if video_to_unflag == None:\n print(\"Cannot remove flag from video: Video does not exist\")\n ...
41be8483af4a03a53aafa33f33ad536c
pc_work_time(pll_freqdet_cf_sptr self) > float
[ { "docid": "64d794bfd74730c9df565151b581a2c3", "score": "0.7803105", "text": "def pc_work_time(self):\n return _analog_swig.pll_freqdet_cf_sptr_pc_work_time(self)", "title": "" } ]
[ { "docid": "d7ad19f22cde099f35faba2f23a68439", "score": "0.7412064", "text": "def pc_work_time(self):\n return _analog_swig.frequency_modulator_fc_sptr_pc_work_time(self)", "title": "" }, { "docid": "29328812c152e88a0a6f211c963781ad", "score": "0.74057776", "text": "def pc_wor...
38a4e4a6142363076e0e5fd4ce2c8300
Set the end time.
[ { "docid": "2d79efedc2e0fe4bf7e27917603fc06a", "score": "0.8860281", "text": "def set_end_time(self, t):\n self.end = spss_time(t)", "title": "" } ]
[ { "docid": "ea848c0b6f5e014782c1d4d2645a38c7", "score": "0.89383185", "text": "def end_time(self, end_time):\n\n self._end_time = end_time", "title": "" }, { "docid": "ea848c0b6f5e014782c1d4d2645a38c7", "score": "0.89383185", "text": "def end_time(self, end_time):\n\n s...
db9f171c1c3e83d889bd8b0d52a853ae
Main function, starts the program, setups the paths and submits the bidnumber to process
[ { "docid": "9f9cdb5c08ad1252520c46caea6628bc", "score": "0.59576374", "text": "def main(bid_number, config, logger, test=False,\n test_bids=5, timeout=30, validations=False):\n pd.options.mode.chained_assignment = None\n\n # Load paths from config\n home = os.environ[config[\"PATHS\"][\...
[ { "docid": "5eb65670ae87521a2fc47c3a73258747", "score": "0.67149067", "text": "def main(argv):\n\n\tlogger.setLevel(logging.INFO)\n\thandleOptions(argv)\n\t# Load the config file\n\tconfigfile = 'config.json'\n\twith open(configfile, 'r') as f:\n\t\tconfig = json.load(f)\n\n\tcreateOutputFolder()\n\n\tl...
22d35a6550c7797bc852d7e1e578c7a7
Test we get the expected triggers from a button.
[ { "docid": "f8100c7694ef9f6d37756857cd0f71c9", "score": "0.62324995", "text": "async def test_get_triggers(\n hass: HomeAssistant,\n device_reg: device_registry.DeviceRegistry,\n entity_reg: EntityRegistry,\n) -> None:\n config_entry = MockConfigEntry(domain=\"test\", data={})\n config_en...
[ { "docid": "6923c51cf107f5f2eea29735f0a6cc08", "score": "0.70568377", "text": "def test_get_triggers(self):\n pass", "title": "" }, { "docid": "74a38034de88a9c3953c027771e7e558", "score": "0.7040851", "text": "def getTriggerPressed(self) -> bool:\n ...", "title": ""...
9535fe6c46cb906bf64698332e3cd3aa
Blueprint for a simple model assigning stellar mass and quiescent/active designation to a subhalo catalog.
[ { "docid": "7013fc7bb776bc7cea36b4c0a616cfd0", "score": "0.0", "text": "def SmHmBinarySFR_blueprint(\n prim_haloprop_key = model_defaults.default_smhm_haloprop, \n smhm_model=smhm_components.Moster13SmHm, \n scatter_level = 0.2, \n redshift = sim_defaults.default_redshift, \n sfr_abcissa ...
[ { "docid": "3193e2ab42a83b12b66740baeb711288", "score": "0.6471101", "text": "def Campbell15_blueprint(\n prim_haloprop_key = model_defaults.default_smhm_haloprop, \n sec_galprop_key = 'ssfr', sec_haloprop_key = 'vpeak', \n smhm_model=smhm_components.Moster13SmHm, \n scatter_level = 0.2, \n ...
e3c73bcf5a8acca28636ed972e9037de
Set up the game and initialize the variables.
[ { "docid": "5763ce967360b1ff9e7daaca59da4982", "score": "0.66307664", "text": "def setup(self):\n\n # Sprite lists\n self.player_list = arcade.SpriteList()\n self.wall_list = arcade.SpriteList(use_spatial_hash=True,\n spatial_hash_cell_size=...
[ { "docid": "3956c41832a0e4cb1cf11a8add517eef", "score": "0.8164389", "text": "def setup(self):\n # Create your sprites and sprite lists here\n self.game: Game = Game(SCREEN_WIDTH, SCREEN_HEIGHT, TILE_SIZE, 1, grid_layers = 4)\n self.game.game_message = \"Lead the Rabbit home\"\n\n ...
eff4806a2046b7b3e0818da3f6b39388
create instantiate of a DeploymentRequest This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
[ { "docid": "1f6251f81e8736df9255b2bec99d496b", "score": "0.5890666", "text": "def create_namespaced_deployment_request_instantiate_with_http_info(self, body, name, namespace, **kwargs):\n\n all_params = ['body', 'name', 'namespace', 'pretty']\n all_params.append('callback')\n all_pa...
[ { "docid": "c8faee09c9ac08cfa320b38d31c94c48", "score": "0.74152315", "text": "def create_namespaced_deployment_request_instantiate(self, body, name, namespace, **kwargs):\n kwargs['_return_http_data_only'] = True\n if kwargs.get('callback'):\n return self.create_namespaced_depl...
c708c456f86c5430638d2bf062dea899
r"""Updates a zone resource.
[ { "docid": "dd6d9c86894eb6ab1a1e288ee79a75af", "score": "0.0", "text": "def Patch(self, request, global_params=None):\n config = self.GetMethodConfig('Patch')\n return self._RunMethod(\n config, request, global_params=global_params)", "title": "" } ]
[ { "docid": "b908bbf5043f2fb197e9223c0fc925f6", "score": "0.66193604", "text": "def _update(self) -> None:\n import regenmaschine.exceptions as exceptions\n\n try:\n self._entity_json = self._client.zones.get(self.rainmachine_id)\n except exceptions.HTTPError as exc_info:\...
6e7c3d3e2a05a9577615a6066acf2de1
This method is deprecated. Please switch to AddIsGameOver.
[ { "docid": "c420d43d69cc43b11061c0e151a99f80", "score": "0.5853067", "text": "def DeepSingleAgentEnvWithDiscreteActionsStateDataAddIsGameOver(builder, isGameOver):\n return AddIsGameOver(builder, isGameOver)", "title": "" } ]
[ { "docid": "0741ff7b41ba00efd002b94655689183", "score": "0.67969733", "text": "def game_over(self):\n raise NotImplementedError()", "title": "" }, { "docid": "1110ad2a849ae1de5830ea21087ddd3e", "score": "0.63831997", "text": "def game_over(self):\n # The game is over! D...
797776956240c714c4b1dc4f47bbfbd4
Obtain the value of node_vm_size.
[ { "docid": "25cfcaaaf05a56b0ced7a9b70d3dd850", "score": "0.91161466", "text": "def get_node_vm_size(self) -> str:\n return self._get_node_vm_size()", "title": "" } ]
[ { "docid": "0581d2bf606539b195ce91b0880ccd28", "score": "0.8251246", "text": "def vm_size(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"vm_size\")", "title": "" }, { "docid": "9f2c5a1a0b8fbc3b59c1289a3fdbb736", "score": "0.80528116", "text": "def vm_size(self) -> Op...
708e08f481bab3715f95ae75d509388e
Constructor, load edgeless MNIST dictionary. Also calculate each digit's max size.
[ { "docid": "fbd16a5b9c97236697cc4ed2f6b87374", "score": "0.8259669", "text": "def __init__(self):\n self.dictionary = load_white_edgeless_mnist_dictionary()\n\n self.digit_to_max_size = {d: 0 for d in range(0, 10)}\n\n for k in self.dictionary:\n for arr in self.dictionar...
[ { "docid": "6b75515e27977d064177dbb284d2c0b7", "score": "0.6917801", "text": "def __init__(self, batch_size=50, exluded_digits=(1, 5)):\n mnist = input_data.read_data_sets('MNIST_data', one_hot=True, reshape=False, validation_size=0)\n self.train_data = mnist.train.images # Returns np.arr...