query_id
stringlengths
32
32
query
stringlengths
9
4.01k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
3c3766f1297fd85edb092f78192a84df
Update a Stateful Node State Arguments
[ { "docid": "8cdeebced06899fc39392bbc52dd47c3", "score": "0.0", "text": "def update_stateful_node_state(self, node_id: str, state: str):\n body_json = json.dumps(dict(state=state))\n\n response = self.send_put(\n body=body_json,\n url=self.__base_stateful_node_url + \"...
[ { "docid": "20470c312404ef6ea44cc12a2a14db5c", "score": "0.7455913", "text": "def update_state(self, state, args):\n # TODO: Implement state update\n # This will be a big function\n state(self, *args)", "title": "" }, { "docid": "813bf3aaef1bb46886d0893211b44434", "s...
cbe92fc3d30239c40e6629120bd7c1e3
Publish a new ``event`` on a ``channel``
[ { "docid": "454c3492a91babb42f08db903337dc36", "score": "0.75689447", "text": "async def publish(self, channel, event, data=None):\n msg = {'event': event, 'channel': channel}\n if data:\n msg['data'] = data\n try:\n await self.pubsub.publish(self.prefixed(chan...
[ { "docid": "9587ef13186e6db711317b41aeb40082", "score": "0.7104358", "text": "def publish(self, event: Event):\n self.events_queue.put(event)", "title": "" }, { "docid": "8e4f4c5f3697d39b1be9ad193465386c", "score": "0.70263994", "text": "def publish(self, channel, message):\n ...
56515db8662221a8a65b82e7a7d4560f
Mock a Aeotec thermostat node.
[ { "docid": "11777d6e6bccc97f7762bdcb5eed140d", "score": "0.65429515", "text": "def aeotec_radiator_thermostat_fixture(client, aeotec_radiator_thermostat_state):\n node = Node(client, aeotec_radiator_thermostat_state)\n client.driver.controller.nodes[node.node_id] = node\n return node", "tit...
[ { "docid": "aaecca4a15eea6143cbb16b138d506c4", "score": "0.6052555", "text": "def setUp(self):\n vals = {\n \"name\": \"Ecobee\",\n \"program\": {\n \"climates\": [\n {\"name\": \"Climate1\", \"climateRef\": \"c1\"},\n {\"...
2afaae3a124adf69099d3fb92181a88b
Returns the name of the testing location
[ { "docid": "8c978d7cc1bd01dc292af9c9e44c8ca6", "score": "0.6202428", "text": "def get_testsite(input):\n\tbase = get_filename(input)\n\treturn base.split('_',1)[0]", "title": "" } ]
[ { "docid": "392a74788ff7c29dc56cf193234207ac", "score": "0.69871753", "text": "def Location(self) -> str:", "title": "" }, { "docid": "2ce99033809f7a04352d082dd91f767f", "score": "0.6938344", "text": "def get_test_name(self):\n\n frames = inspect.getouterframes(inspect.current...
718fcf74032b304b53a0dd38a29c6648
The initial horizontal position for the scan
[ { "docid": "5acc9a5763edda2194a0bd529ebf4a51", "score": "0.5978934", "text": "def startx(self):\n return self._x", "title": "" } ]
[ { "docid": "3d525e22c3fb671adc656eebba1455b5", "score": "0.6845583", "text": "def find_starting_location(self):\n\n self.current_row = 0\n self.current_col = self.path[0].index(\"|\")\n self.current_direction = \"down\"", "title": "" }, { "docid": "753d0c10d7916d178823db...
f3b432acd6c90f973684fbe8a79ae157
Get all possible cardset id
[ { "docid": "662acda943d795974cf313da5aefd815", "score": "0.55051076", "text": "def get_setids(file_path: str) -> list:\n setids = []\n with open(file_path) as f:\n lines = f.readlines()\n for line in lines:\n setids.append(line.strip())\n return setids", "title": "" } ]
[ { "docid": "c971932543eade088f65a4f8fe01c226", "score": "0.7555017", "text": "def get_all_cardset():\n setids = get_setids(default_setids_path)\n for setid in setids:\n save_cardset(setid)", "title": "" }, { "docid": "91fe7c508e52bddd80006d26d0258794", "score": "0.6444697", ...
d56d27a04dffa32334af0fddef254c07
Adds a player to the tournament database. The database assigns a unique serial id number for the player. (This should be handled by your SQL database schema, not in your Python code.)
[ { "docid": "5b2eaed157be9880ea84a10d5e11cd85", "score": "0.75457585", "text": "def registerPlayer(name, tournament = False):\n\n return execQueryAndCommit(\n \"INSERT INTO player (t_id, name) VALUES (%s,%s) RETURNING p_id\",\n **{\n \"parms\": (tournament, name),\n ...
[ { "docid": "b28344858e63ea673aaee173313c955a", "score": "0.82379323", "text": "def addPlayerToDb(self,player):\r\n try:\r\n print(\"[SQL] inserting \"+player.name)\r\n string='INSERT INTO users(name,phone,email,points,timeRoot,timeUser) VALUES(\"{}\",{},\"{}\",{},\"{}\",{})'...
fd9d3fb6af87c0517d9927e57906e628
computes the size (in bytes) of all contained files
[ { "docid": "ff6545f775a28aee8ff0945b1672d246", "score": "0.71110624", "text": "def get_size(start_path: str = './') -> float:\n\n total_size = 0\n for dirpath, dirnames, filenames in os.walk(start_path):\n for f in filenames:\n fp = os.path.join(dirpath, f)\n if not os...
[ { "docid": "78bcec5626343cdfcff3657f48051c02", "score": "0.8575421", "text": "def size(self):\n return sum(osp.getsize(d['path']) for d in self._files)", "title": "" }, { "docid": "09fc4a6da1fe5d6b5b53923f24b623ee", "score": "0.81680053", "text": "def size(self):\n total = ...
8758fc68f07147cae8415af5151b8311
builds and visualizes networkx Graph for gene networks
[ { "docid": "3dd6b249120676b0e71204c060d8f639", "score": "0.7146621", "text": "def network_graph(net_dict=None):\n if net_dict == None:\n net_dict = {}\n else:\n G = nx.from_dict_of_lists(net_dict)\n plt.figure(num=None, figsize=(30, 30), dpi=80, facecolor='w', edgecolor='c')\n ...
[ { "docid": "7dedcb61e283c29ac7d26adc5da42dbe", "score": "0.71572155", "text": "def draw_graph(self):\n pos = nx.kamada_kawai_layout(self.G)\n fig,ax = plt.subplots(figsize = (8,8))\n \n \n nx.draw_networkx_nodes(self.G,pos,ax=ax,\n nodelist = self.G.nodes(),\n ...
3ffbcacc52783be322e74793a47343d7
Test the snowball stemmer for a standard sentence
[ { "docid": "4cc82bab7bc6d9f2da54a652f7ecf595", "score": "0.80717385", "text": "def test_apply_nltk_snowball_stemmer():\n stemmer = 'Snowball'\n expected_output = ['the', 'fox', 'was', 'quick', 'walk', 'by',\n 'the', 'seashor', 'in', 'the', 'morn', 'daylight.']\n tokens = t...
[ { "docid": "92efc9072ac1da607e9e9ee87c27dfe2", "score": "0.78030926", "text": "def test_stemming(self):\n\n s = \"Toko-Ekambi scores, assisted by Mendes!\"\n t = Tokenizer(stem=True)\n self.assertEqual([ \"toko\", \"ekambi\", \"score\", \"assist\", \"mend\" ], t.tokenize(s))", "...
eae8cfaa42b7253926e1f91971dd93f0
Translates the 'ChannelState' header's value into an int, setting it to `None` if coercion fails.
[ { "docid": "2513640b7b2e6a1c6c5cfd6d18d0dbd1", "score": "0.5043914", "text": "def process(self):\n (headers, data) = _Event.process(self)\n generic_transforms.to_int(headers, ('ChannelState',), None)\n return (headers, data)", "title": "" } ]
[ { "docid": "287a079864609786d6c5a8a05404306f", "score": "0.547437", "text": "def native_value(self) -> float | int | None:\n if self._is_counter:\n return float(self._channel.get_counter_state())\n return float(self._channel.get_state())", "title": "" }, { "docid": "...
b49c68ba0c9455036b1440dd3ec0fe4b
Print the closest prime number larger than number.
[ { "docid": "62104e576ee10c707b481e00ad87ba49", "score": "0.66522646", "text": "def print_next_prime(number):\r\n index = number\r\n while True:\r\n index += 1\r\n if is_prime(index):\r\n print(index)", "title": "" } ]
[ { "docid": "6a2f3578406c458b1eb613a213a82f68", "score": "0.6859278", "text": "def main():\n\n number = int(input())\n if number > 1:\n least_factor = min(prime_factors(number))\n else:\n least_factor = 1\n\n if least_factor != number:\n print(number - number // least_fac...
c7e2a524cd9adf6b89023ec0ed9c7d11
Remove the data directory path from filenames
[ { "docid": "ac198a68326fc904ff02d2da2f4406d2", "score": "0.7594078", "text": "def _remove_data_dir_path(self, inp=None):\n # import string\n # need to add a check in here to make sure data_dir path is actually in\n # the filename\n if inp is not None:\n split_str =...
[ { "docid": "9ed69e657a7e06ac66df40d6f695f8aa", "score": "0.659365", "text": "def removePath(cls, filename):\n if filename is not None:\n filename = re.sub('^.*[/\\\\\\\\]', '', filename)\n\n return filename", "title": "" }, { "docid": "4bed96882207a7485d70f66061e3cc3...
903dac3023dc69dc9ed9e9cd1fcc9de7
Get an ITK image from the provided vtkImageData object. This image can be passed to ITK filters.
[ { "docid": "e2e17b5d2cc45c12d57af73581bd71cd", "score": "0.76533484", "text": "def convert_vtk_to_itk_image(vtk_image_data):\n\n # Save the VTKGlue optimization for later\n #------------------------------------------\n #itk_import = itk.VTKImageToImageFilter[image_type].New()\n #itk_import.S...
[ { "docid": "e176320f3b5143b9c18fcba06ba1327c", "score": "0.67150855", "text": "def _get_itk_image_type(vtk_image_data):\n image_type = None\n\n # Get the scalars\n pd = vtk_image_data.GetPointData()\n scalars = pd.GetScalars()\n\n vtk_class_name = scalars.GetClassName()\n\n try:\n ...
7253bba8b309753fbdfab01a69fb5fa9
This function loads data into staging_tables
[ { "docid": "b32976dea2fe82570a2bba3336c153bb", "score": "0.7094328", "text": "def load_staging_tables(cur, conn):\n for query in copy_table_queries:\n try:\n # Execute query and commit the results\n cur.execute(query)\n conn.commit()\n except Exception a...
[ { "docid": "e238c7a932e2d6af5f2a180e2566e45b", "score": "0.77354974", "text": "def load_data_into_table(client, staging_table):\n\n dir_name = 'ad_data'\n for filename in os.listdir(dir_name):\n rows = []\n logging.info(f'Reading file: {filename}')\n with jsonlines.open(f'{dir...
1fc1d869ae81ca45e2e28f8d4f509f65
return iterator to generate the elements of the group
[ { "docid": "7ab081a8bb44eb0d34c426013988cce0", "score": "0.0", "text": "def generate(self, method=\"coset\", af=False):\n if method == \"coset\":\n return self.generate_schreier_sims(af)\n elif method == \"dimino\":\n return self.generate_dimino(af)\n else:\n ...
[ { "docid": "02a1f366aad699ebd518e22e4bcd0b92", "score": "0.76486987", "text": "def __iter__(self):\n return self.groupList.__iter__()", "title": "" }, { "docid": "ce6ed2a8992327e0d2ab1bf6140a6a03", "score": "0.70087254", "text": "def __iter__(self):\n \n return i...
b3fbf1972df5153ec19b17fc6ed496a2
Takes a dictionary of markov chains and returns random text based off an original text.
[ { "docid": "25ac592f4bcde749dbd32a31581f83f6", "score": "0.5955309", "text": "def make_text(chains):\n\n\n tupled_list = lyrics.items()\n print lyrics\n #get random dictionary key pair\n dict_length = len(tupled_list)\n print dict_length\n starter_keypair = random.randint(0,dict_length...
[ { "docid": "53868debcc9e7ba350786bd26bd2e235", "score": "0.74235207", "text": "def make_text(chain_dict):\n \n #initialize empty list and make random choice from keys in chain_dict\n text_block = []\n start_phrase = random.choice(chain_dict.keys()) \n\n #assign variable key to start of ra...
2ad03de18bd34be8e2e96f5b72d4875f
Creates a target for each lastframe's pipe, any pipe starting
[ { "docid": "817c7e2943762f2215d581068f220a73", "score": "0.58443964", "text": "def _create_previous_pipes(self):\r\n if self.previous_pipes:\r\n self._prev_stage = UpdatePreviousPipesStage(self.pipeline)\r\n for prev_pipe, prev_tex in iteritems(self.previous_pipes):\r\n\r\n ...
[ { "docid": "660e16fa0b2a156010fe710e43475764", "score": "0.5539378", "text": "def genTarget():\n global loopCount\n lab = '.L' + str(loopCount); loopCount += 1\n putLab(lab)\n return lab", "title": "" }, { "docid": "dc17514220c7aae098f7252107767b6d", "score": "0.5448055", ...
c90645975d58916657ebdd4881216503
If applicable unselect this option
[ { "docid": "dec4f83937a4ff047c32f156f0aa0fa8", "score": "0.81006885", "text": "def unselectOption(self):\r\n return self.client.nowait('browser.unselectOption', (self.element,))", "title": "" } ]
[ { "docid": "c884c47bec55f667bce84d4465de8573", "score": "0.8056833", "text": "def unselectOption(self):\n return self.client.nowait('browser.unselectOption', (self.element,))", "title": "" }, { "docid": "f7ffa51ac93c005096355e5ae813837c", "score": "0.7896933", "text": "def uns...
c7467a234036812d5cf5ee5b85aa6b78
Performs a single optimization step.
[ { "docid": "d3d7589b0ec1178a28a65494b84c26a3", "score": "0.0", "text": "def step(self, closure=None):\n loss = None\n if closure is not None:\n loss = closure()\n\n for group in self.param_groups:\n for p in group[\"params\"]:\n if p.grad is None...
[ { "docid": "fc8f599bd19d33e08ee4918b1dff69f6", "score": "0.7238263", "text": "def optimize():\n raise NotImplementedError", "title": "" }, { "docid": "e8b16b8d3c9751f70ce08ce92102ce02", "score": "0.68457", "text": "def optimize(self):\n raise NotImplementedError", "...
e3e97acd6844f1e4b3ff20643225326b
Tool used in _format().
[ { "docid": "78a61781e601f5fb984ed2af66dd16db", "score": "0.0", "text": "def _format_data(self, data, name):\n try:\n val = data[name]\n except KeyError:\n val = None\n return val", "title": "" } ]
[ { "docid": "1fd09b4bd37ddf1ac1d83bef2f3f7740", "score": "0.78909135", "text": "def format_(self) -> Any:", "title": "" }, { "docid": "f0ef23e1f312434467c94c45c8094c12", "score": "0.7415282", "text": "def __format__(self, format_spec): # real signature unknown; restored from __doc__\n...
a2cbb1881b82366cccefb4c3a24b009c
Set up calculators for tests.
[ { "docid": "fc5d7957383a02c9eaf1c51b51513ee9", "score": "0.8050646", "text": "def setUp(self) -> None:\n self.first_calculator = Calculator(60, 170, 17, 'F', 1.9)\n self.second_calculator = Calculator(80, 180, 25, 'M', 1.2)\n self.third_calculator = Calculator(75, 176, 30, 'M', 1.7)...
[ { "docid": "31f3e45912b6f74dc4d35bde00451dcf", "score": "0.6592788", "text": "def setUp(self):\n o, r = loadTestReactor(\n os.path.join(TEST_ROOT, \"detailedAxialExpansion\"),\n customSettings={\"inputHeightsConsideredHot\": True},\n )\n reduceTestReactorRings(...
e64d4bb277199d04a29fb9f3909ec61a
Output D x N x R
[ { "docid": "03383d4f38277365c6512771b3b383c1", "score": "0.0", "text": "def build_predict(self, Xnew):\n mu = tf.einsum('dr,nd->dnr', self.q_A_mu, Xnew)\n var = tf.einsum('dr,nd->dnr', tf.square(self.q_A_sqrt), tf.square(Xnew))\n return mu,var", "title": "" } ]
[ { "docid": "d4be365955cf2431b028aaeaee5d1904", "score": "0.58140504", "text": "def generate(self, n):", "title": "" }, { "docid": "4653cd46931570f3f90ab27808413713", "score": "0.5588879", "text": "def print_row(base, n):\r\n for i in range(1, n + 1):\r\n print(\"{0:>4}\".fo...
f1a1023b98b579d7bcc140258bce727d
Loads this image with pixel data from a bytes object.
[ { "docid": "327f6fd607f27d8f5dc9d3d41aa91e08", "score": "0.6282929", "text": "def frombytes(self, data, decoder_name=\"raw\", *args):\r\n\r\n # may pass tuple instead of argument list\r\n if len(args) == 1 and isinstance(args[0], tuple):\r\n args = args[0]\r\n\r\n # defau...
[ { "docid": "d880873652bb2fdae43df29047336b0a", "score": "0.73065776", "text": "def frombytes(self, buffer):\r\n return self.image.frombytes(buffer)", "title": "" }, { "docid": "3b219f784b91c5f63acf07f227e9bfbd", "score": "0.7045793", "text": "def loadPixels(self):\n n =...
393f2b2481feb0157d5fe5b38f663725
Process incoming message stanzas. Be aware that this also includes MUC messages and error messages. It is usually a good idea to check the messages's type before processing or sending replies.
[ { "docid": "370a931f0d44cbd3dd5d54f8f744fa1d", "score": "0.0", "text": "def guest_message(self, msg):\n self.log.debug('guest message: {}'.format(msg['body']))\n\n if msg['type'] in ('chat', 'normal') and msg['body']:\n reply = self.process_command(msg)\n if reply:\n ...
[ { "docid": "1a797e23c1af7b815abde05d5b690c17", "score": "0.72993636", "text": "def _process(self):\n logger.info('Received message %s, a %s message: %r',\n self.message_id, self.message_type, self.message_body)\n\n # Since the example messages publish vary in type, redef...
67f8b86bba66c28bd5cf6cd3dda68006
Updates the unified dataset for a categorization project
[ { "docid": "b14552d1c0b382b727de1624594b2ed6", "score": "0.6976473", "text": "def update_unified_dataset(project: CategorizationProject) -> List[Operation]:\n return _run_custom(\n project,\n run_update_unified_dataset=True,\n run_apply_feedback=False,\n run_update_results...
[ { "docid": "224d3823e703cb387135d9d394b89d58", "score": "0.60381895", "text": "def _run_custom(\n project: CategorizationProject,\n *,\n run_update_unified_dataset: bool = False,\n run_apply_feedback: bool = False,\n run_update_results: bool = False,\n) -> List[Operation]:\n if Project...
77fc82eec2c34b0bdb8c79d642aff7a1
Close the current video and open a new one
[ { "docid": "c2bd4085de8a0e8b75fba907f65ecd0c", "score": "0.0", "text": "def _reset_video_recorder(self):\n\n # Close any existing video recorder\n if self.video_recorder is not None:\n self.video_recorder.close()\n\n # episode_id = self.env.monitor.num_episodes\n #...
[ { "docid": "3609bc86e612012f506154c4f5c57e99", "score": "0.6926669", "text": "def close_video(self):\n if hasattr(self, 'mraw'):\n self.mraw._mmap.close()\n del self.mraw", "title": "" }, { "docid": "3131771d735ab8e2cb6dda2d85bccb0c", "score": "0.66836154", ...
1781dbf8a3e658963b942dd4d150a21b
Calculate correction sensor from bandpass calibration solution sensor. Given the bandpass calibration solution `sensor`, this extracts the time series of bandpasses (channelised by `cal_freqs`) for the input specified by `index` (in the form (pol, ant)) and builds a categorical sensor for the corresponding complex corr...
[ { "docid": "3adb898c8601e51ebd344b8d201712fa", "score": "0.75315213", "text": "def calc_bandpass_correction(sensor, index, data_freqs, cal_freqs):\n corrections = []\n for segment, value in sensor.segments():\n bp = value[(slice(None),) + index]\n valid = np.isfinite(bp)\n if ...
[ { "docid": "c8d0ff7fe87cbfad400603128b53311a", "score": "0.6032222", "text": "def calc_delay_correction(sensor, index, data_freqs):\n delays = [np.nan_to_num(value[index]) for segm, value in sensor.segments()]\n # Delays produced by cal pipeline are raw phase slopes, i.e. exp(2 pi j d f)\n corr...
cd411db67420250d030333d8bd595b03
Verify that the contents of the PrivateKey object are valid.
[ { "docid": "b83dd70f94096e9a51e50f0d45b3d976", "score": "0.58293355", "text": "def validate(self):\n if not isinstance(self.value, bytes):\n raise TypeError(\"key value must be bytes\")\n elif not isinstance(self.cryptographic_algorithm,\n enums.Crypto...
[ { "docid": "1b2e2eea39bb3d328413ef430619f571", "score": "0.6874005", "text": "def test_verifyValidPrivateKey(self):\n blob = keys.Key.fromString(keydata.publicRSA_openssh).blob()\n packet = (NS('foo') + NS('none') + NS('publickey') + '\\x00'\n + NS('ssh-rsa') + NS(blob))\n ...
7ba3ba8012712185005d25e1ff0f1266
Method to update a review object
[ { "docid": "fa9ba80f1b94b488f94d4ff7576153ec", "score": "0.677282", "text": "def put_review(review_id):\n payload = request.get_json(silent=True)\n reviews = storage.all(Review)\n\n if payload is None:\n abort(400, 'Not a JSON')\n\n for review in reviews.values():\n if review.i...
[ { "docid": "6beb46614b3a073877df4d460fc26c60", "score": "0.79591966", "text": "def update(self, request, *args, **kwargs):\n try:\n resources.review_request.get_object(request, *args, **kwargs)\n review = resources.review.get_object(request, *args, **kwargs)\n except ...
e3b1a8a1106dc43c9f0ef69adf7d44d8
3x3 convolution with padding
[ { "docid": "52cc726eb46371a1f313f7a15369e092", "score": "0.71639067", "text": "def conv3x3(in_planes, out_planes, stride=1, groups=1, dilation=1):\n return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=dilation, groups=groups, bias=False, dilation=dilation)", "title": "" ...
[ { "docid": "704b1ec366cc2821e73ccd551ecf5e75", "score": "0.7521464", "text": "def conv3x3(in_planes, out_planes, stride=1, dilation=1, padding=1):\n return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, dilation=dilation,\n padding=padding, bias=False)", "title...
3498a7cc29ff5590fe2fde94dffe5450
Save network layouts to self.full_graph. These will be outputted to the analyzed gml file.
[ { "docid": "c5f34d9464c49c44a9d4c58072641df8", "score": "0.78721035", "text": "def _save_network_layouts(self):\n\n # Set values for network layouts and minimum edge weights\n funcs = [nx.fruchterman_reingold_layout, nx.kamada_kawai_layout]\n min_weights = [0.0, 0.2, 0.4, 0.6, 0.8]\...
[ { "docid": "fb02b937a6fd588a1c140c9a3dad723f", "score": "0.746374", "text": "def saveGraph(self):\n\t\tif self.save_folder == None:\n\t\t\tnx.write_gexf(self.DG, \"graph.gexf\")\n\t\telse:\n\t\t\tnx.write_gexf(self.DG, self.save_folder + \"/\" + \"graph.gexf\")", "title": "" }, { "docid": "1...
be6b3b9b4402fa1846ce5a964f80745a
Returns comment for the event.
[ { "docid": "d439f706d1e59a83da3ac0e6bc2a6275", "score": "0.73312235", "text": "def get_comment(self):\n return self.__comment", "title": "" } ]
[ { "docid": "b7554a7f4e179014f7b73ab8b7528e3b", "score": "0.75873995", "text": "def comment(self) -> str:\n return pulumi.get(self, \"comment\")", "title": "" }, { "docid": "b7554a7f4e179014f7b73ab8b7528e3b", "score": "0.75873995", "text": "def comment(self) -> str:\n re...
055e97ca6054cd2c478730be9dd70d7c
Checks that the input is a differential object and is one of the allowed class types.
[ { "docid": "142930a3f80bb1c41c4e5cf438f7686d", "score": "0.61701965", "text": "def convert_input(self, value):\n if value is None:\n return None, False\n\n if not isinstance(value, self.allowed_classes):\n if len(self.allowed_classes) == 1:\n value = se...
[ { "docid": "0932d9c7992509ae372bbea1cc7e01b6", "score": "0.6821848", "text": "def is_kind_of_class(obj, a_class):", "title": "" }, { "docid": "0b4be828357e11ff2935dfe1cdaff0d3", "score": "0.6765005", "text": "def is_instance_check(cls, obj):\n if isinstance(obj, cls):\n ...
7c12a8529fc8bd3642c4e5b4b1741c93
Create a new ImageDataGenerator. Recieves a path string to a text file, which consists of many lines, where each line has first a path string to an image and seperated by a space an integer, referring to the class number. Using this data, this class will create TensrFlow datasets, that can be used to train e.g. a convo...
[ { "docid": "c77f3ce864547be70553ac4e5a2d6f26", "score": "0.7018784", "text": "def __init__(self, txt_file, mode, batch_size, num_classes, shuffle=True, buffer_size=1000, img_out_size=224):\n\n self.txt_file = txt_file\n self.num_classes = num_classes\n\n # retrieve the data from the...
[ { "docid": "d353213e4316bf49056fec55c10bfd59", "score": "0.649757", "text": "def get_train_data_gen(self, train_data_path):\n train_datagen = ImageDataGenerator(rotation_range=180, horizontal_flip=True, vertical_flip=True)\n train_generator = train_datagen.flow_from_directory(\n ...
c6481e9c7727bea1df9e5d4020d05fe3
Documentacion para la funcion .
[ { "docid": "4df190a302a56c2b94df3ff61a12d69d", "score": "0.0", "text": "def poblar_mapa(self, obts=0):\n\t\tif obts==0 or obts<((self.filas*self.columnas)//3) or obts>(((self.filas*self.columnas)//3)*2):\n\t\t\tobts = (self.filas * self.columnas)//3\n\t\twhile True:\n\t\t\ta_x, a_y = random.randint(0,se...
[ { "docid": "70f58445cd1f2d39a33a90573343aef0", "score": "0.75110817", "text": "def function(self):", "title": "" }, { "docid": "cfa74ecf76709ca612bed25272d7c559", "score": "0.7438437", "text": "def explaination(self):", "title": "" }, { "docid": "0c6b50969ed269d10634f34ef...
2ab950e19f28d65cd80cf50c55a6b220
Implement accountactivation logic here.
[ { "docid": "735d4b9dda73bfbef17bfbb7a768fe41", "score": "0.0", "text": "def activate(self, *args, **kwargs):\n raise NotImplementedError", "title": "" } ]
[ { "docid": "c17689b758389e6c1b74af0c63d2373b", "score": "0.7125156", "text": "def test_activate_account(self):\n pass", "title": "" }, { "docid": "c17689b758389e6c1b74af0c63d2373b", "score": "0.7125156", "text": "def test_activate_account(self):\n pass", "title": ""...
f711ca37a1fdec93e8a60278f7c73cba
Defines the parameters for the URL file extension condition.
[ { "docid": "f560c1554531ace2643728faa2cfc4c3", "score": "0.0", "text": "def __init__(__self__, *,\n extensions: Sequence[str],\n odata_type: str):\n pulumi.set(__self__, \"extensions\", extensions)\n pulumi.set(__self__, \"odata_type\", odata_type)", "ti...
[ { "docid": "3c8dedea53fa6892400d0ed462827869", "score": "0.69008166", "text": "def __init__(__self__, *,\n name: str,\n parameters: 'outputs.UrlFileExtensionConditionParametersResponse'):\n pulumi.set(__self__, \"name\", 'UrlFileExtension')\n pulumi.set(__se...
98d408709aadb6dcc58288bcc29b0d8e
Keep and forward the propose to other proposers if receive it for the first time.
[ { "docid": "96f8cee9f5053856dd73219d9ded8c49", "score": "0.55881333", "text": "def handle_value_propose(self, message):\n\n message = tuple(message.split(\",\"))\n logging.info(\"{} {} received propose:{},{}\".format(self.role, self.id, *message))\n \n if not message in self....
[ { "docid": "bb5c4aff698b5f7723a6e3de829420b3", "score": "0.6077841", "text": "def msg_propose_accept(self, conn, msg):\r\n if msg.commandnumber in self.outstandingproposes:\r\n prc = self.outstandingproposes[msg.commandnumber]\r\n if msg.inresponseto == prc.ballotnumber:\r\n...
a9f28799bdc2e3a75c189e9bf6332bde
Finds the square root of the number passed in
[ { "docid": "0e4325d6e117d0376dd29e1ef40d39ca", "score": "0.8401177", "text": "def sqroot(x):\r\n return math.sqrt(x)", "title": "" } ]
[ { "docid": "1d04741b2844d4809581ed89a4c5afeb", "score": "0.84071213", "text": "def square_root(number):\n return math.sqrt(number)", "title": "" }, { "docid": "52578eaa2bf5a63e0685f70d6af221dd", "score": "0.80676985", "text": "def mySqrt(self, x):\n a = x\n b = (a + ...
b0377bbae547987257813ce50934fe39
Returns True if the game is over, and false if not
[ { "docid": "243eabe38d03783381e9856ff2fc5a3c", "score": "0.77313864", "text": "def gameOver(self):\r\n if self.hasWonPlayer(\"X\") or self.hasWonPlayer(\"O\"):\r\n return True\r\n else:\r\n for move in self.board:\r\n if move == ' ':\r\n ...
[ { "docid": "b7b6e3c1761505622aa0e8ec5753c7c9", "score": "0.8727644", "text": "def is_game_over(self):\r\n pass", "title": "" }, { "docid": "40a3298c329d5c988cad7bdf39cbb1bd", "score": "0.8521025", "text": "def is_game_over(self):", "title": "" }, { "docid": "487fc9...
0110e515d731456038d0a30ee57217d6
Creates a custom OpenAPI schema.
[ { "docid": "f77c75e533e37619f46cd9e7aec44b9a", "score": "0.68512565", "text": "def custom_openapi() -> t.Dict[str, t.Any]:\n if app.openapi_schema:\n return app.openapi_schema\n openapi_schema = get_openapi(\n title=\"Pixels API\",\n description=None,\n version=\"1.0.0\...
[ { "docid": "4da381989d0549e941efa772b8e5285b", "score": "0.7369258", "text": "def custom_openapi():\r\n if app.openapi_schema:\r\n return app.openapi_schema\r\n openapi_schema = get_openapi(\r\n title=handler.FUNCTION_NAME,\r\n version=f\"v{handler.FUNCTION_VERSION}\",\r\n ...
2589bff24ae753f876adb3845642c57b
Use this parameter to enable sessionless load balancing.
[ { "docid": "884de96cf3f76c8947909b56cee4f95f", "score": "0.60458386", "text": "def set_sessionless(self, sessionless):\n self.options['sessionless'] = sessionless", "title": "" } ]
[ { "docid": "f270baae5754a122166b60ba38ef538e", "score": "0.5495329", "text": "def enable_member(b, session_objects):\r\n #Note how easy it is to simply 'toggle' the session state now that\r\n #we are dealing with object attributes.\r\n for x in sstate_seq.item:\r\n x.session_state = 'STA...
7332477105e1efa102399b422ee7a4e8
Uniform Cost Search algorithm
[ { "docid": "d5f48166743c873d97767e611ef4e795", "score": "0.57536024", "text": "def uniform_cost_search(origin_id, destination_id, map, type_preference=0):\n\n list_of_path = [Path(origin_id)]\n\n while len(list_of_path) != 0 and destination_id not in list_of_path[0].route:\n first_element_l...
[ { "docid": "194d4fc2a27e6e232cd9c7027070e744", "score": "0.82053727", "text": "def uniformCostSearch(problem):\n \"*** DO NOT IMPLEMENT ***\"\n util.raiseNotDefined()", "title": "" }, { "docid": "bb4ae15eaacc2394f7027814947b26a3", "score": "0.8203106", "text": "def uniformCostS...
120ccbba0c7350d61e4993ccac089151
patch existing users with email addresses
[ { "docid": "00004123bb44d268e53fe6b6e48adb09", "score": "0.580055", "text": "def patch_emails(csv_filename, verbose=False):\n patched = 0\n skipped = 0\n\n with open(csv_filename, 'r') as f:\n reader = csv.reader(f, delimiter=',')\n for row in reader:\n if len(row) > 1:...
[ { "docid": "9bbdb970850cba99d90ec9e6e70e1cb3", "score": "0.7227075", "text": "def update_user_email(user_id, new_email):\n\n user = get_user_by_id(user_id)\n user.email = new_email\n db.session.commit()", "title": "" }, { "docid": "6a64ab15c225a824a0d60d9aabaf60df", "score": "0....
3db79cc0b13f76a9ed8a25932cff0f21
GET the listing prefix(header) to current heading node according to the current level and position
[ { "docid": "7841e7091f7749d4c3041758476861df", "score": "0.673707", "text": "def outline_prefix(self):\n # alternate the listing headers. recylce if needed\n list_type = (self.level - 1) % ListTypes.OPTIONS\n if list_type is ListTypes.NUMBER:\n return str(self.position + ...
[ { "docid": "55189f5bfe0380ae74651a5bf051da36", "score": "0.66593266", "text": "def _prefix_getter(self):\r\n if not self.children:\r\n return \"\"\r\n return self.children[0].prefix", "title": "" }, { "docid": "1c89337cb6bf2be4969b8108d04edffe", "score": "0.61878...
0eeefe075868164149395a919de1d1f2
Interpolate the array to a new, larger size. Uses scipy.misc.imresize. The ranges are interpolated accordingly.
[ { "docid": "8d03d5f217a7ead5cb9052db7c919c2f", "score": "0.61982614", "text": "def resize(self, new_ywidth, new_xwidth, order=1):\n # Check if scipy is available\n try:\n from scipy.ndimage import zoom\n except ImportError:\n logging.error(\n 'Mo...
[ { "docid": "649b12961f9f06319afd48fa09a8382c", "score": "0.6544772", "text": "def resize_mri(img, size, interpolation=0):\n zoom_factors = np.asarray(size) / np.asarray(img.shape)\n # img_arr = img_arr.resize((256,256,128))\n return sp.ndimage.zoom(img, zoom_factors, order=interpolation)", ...
888e108f89e839d82cd32a669358aaf5
Format a dictionary representation of an SFF read as text.
[ { "docid": "07a1c0d96f1f963310d63f3555444875", "score": "0.0", "text": "def format_read(read):\n out = StringIO()\n out.write(format_read_header(read))\n out.write(format_read_data(read, read))\n return out.getvalue()", "title": "" } ]
[ { "docid": "c9f0c13491df0c21bcff05ccb5df1645", "score": "0.5651693", "text": "def dump_text(filename,the_dict):\n with open(filename,'w') as f:\n for the_temp in the_dict['temps'].values():\n f.write(\"{:d}\\n\".format(the_temp))", "title": "" }, { "docid": "4849649e7d40...
cb16b693e584944a7e77739f9d40aa4b
Retrieves a single instance of egtpPgwS5S8Range data from the server. Args
[ { "docid": "a7f1e55f5aeb78cb808fb3b652ebcdc4", "score": "0.0", "text": "def read(self, href):\n return self._read(href)", "title": "" } ]
[ { "docid": "9d93e9d987aeea759f2457eb5e6a9cd5", "score": "0.5590422", "text": "def _get_range(self):\n\n pass", "title": "" }, { "docid": "201c5d245c84868cbe476b5f4568f99a", "score": "0.5568858", "text": "def find(\n self,\n ChangeReportingMode=None,\n Enab...
d3abaaaadfb5d3eb00b3d6973bdd0eb0
Redirect the user to authorize the client, and get them verification code
[ { "docid": "666ef409caa8b159baa1ccf8098a3d30", "score": "0.65969336", "text": "def get_user_authorization(request_token):\n authorize_url = AUTHORIZE_URL\n authorize_url = authorize_url.format(request_token=request_token)\n print 'Please go here and authorize: ' + authorize_url\n return raw_...
[ { "docid": "4e8f86e0e9a605919054f72914dd03a3", "score": "0.78330654", "text": "def authorize(req, resp):\n api.redirect(resp, location=authorize_url())", "title": "" }, { "docid": "3f7f60126b7a2fec15682ebc60a264e2", "score": "0.7126038", "text": "def _authorization_code_flow(self)...
b31ebce4c7201d1504501250d1b982c1
Receives the day and time in a list and returns it in a datetime form if it's valid
[ { "docid": "20900a8652daabd363d5bdd7a7c569e4", "score": "0.55915296", "text": "def check_dates(self, date):\n\n if len(date[0]) == 4: #Fyrsta stakið er árið, það verður að koma á formi fjögurra stafa því annars bætir datetime 0 við og úr verður algjört bull\n try:\n va...
[ { "docid": "da6dddcc9c81bc45e1377ae2ea2591ac", "score": "0.6805444", "text": "def check_time(self, date, unavailable_time_list): \n \n date_time = \":\".join(date[3:])\n new_list = []\n for unavailable_time_ob in unavailable_time_list:\n new_list.append(unavailab...
c24768a77439507119a3a6354b108b18
delete collection of NetNamespace 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": "0f33948f2729be0efc3d225f85e1b7c0", "score": "0.6659838", "text": "def delete_netnamespaces_with_http_info(self, **kwargs):\n\n all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds']\n all_params.append('callback')\n al...
[ { "docid": "423a97b7c0770c96dbfc718f268eedc6", "score": "0.7025836", "text": "def delete_netnamespaces(self, **kwargs):\n kwargs['_return_http_data_only'] = True\n if kwargs.get('callback'):\n return self.delete_netnamespaces_with_http_info(**kwargs)\n else:\n ...
c93753c8afb08a545112b056bc0f28f0
pool using a 2x2 input and use the max algorithm
[ { "docid": "2fa41d3bc1cf9b83baf0525d8a4a14d3", "score": "0.78795815", "text": "def max_pool_2x2(x):\n return tf.nn.max_pool(x, ksize=[1,2,2,1], strides=[1,2,2,1], padding='SAME')", "title": "" } ]
[ { "docid": "2eae5b63f04a74e2ec4ec6ebce404bd6", "score": "0.8062191", "text": "def maxpool2x2(x):\n # YOUR CODE HERE\n x_h, x_w, x_dep = x.shape\n win_size = 2\n stride = 2\n step_y = (x_h - win_size) // stride + 1\n step_x = (x_w - win_size) // stride + 1\n tmp = np.zeros((step_y, s...
7b35124295eb845671f544af3f04f9eb
Instantiates the robot the scene. Loads the URDF, sets initial state of parameters, joints, motors, etc...
[ { "docid": "dde9025e422c7b9f345ab0219d94551c", "score": "0.0", "text": "def reconfigure(self) -> None:\n Manipulator.reconfigure(self)\n ArticulatedAgentBase.reconfigure(self)", "title": "" } ]
[ { "docid": "95dd577585073e05235fdae44c273186", "score": "0.68957335", "text": "def __init__(self):\n\n \trospy.init_node(\"robot\") # start node\n\tself.path = None\n\tself.path_changed = False\n \t#rospy.init_node('RobotControl', anonymous=True)\n\tself.reset_odam()\n\t## Sets up the cmd_vel pub...
a17d1a571b52d3953500e8792effebe5
This decorator sets the callback function for dynamically setting the JWT decode key based on the UNVERIFIED contents of the token. Think carefully before using this functionality, in most cases you probably don't need it. The decorated function must take two arguments. The first argument is a dictionary containing the...
[ { "docid": "61bda5e43c504087b6a950d9534098ad", "score": "0.52614766", "text": "def decode_key_loader(self, callback: Callable) -> Callable:\n self._decode_key_callback = callback\n return callback", "title": "" } ]
[ { "docid": "77ed2c7c0ec1e4f13cee23bcaa72e8e6", "score": "0.614135", "text": "def jwt_decode_handler(token):\n options = {\n 'verify_exp': False,\n }\n\n return decode(\n token,\n api_settings.JWT_SECRET_KEY,\n api_settings.JWT_VERIFY,\n options=options,\n ...
46dd7a0b6465ddc360187dce1af3fe54
Given the list containing the parameter dicts for all available rewards, this method returns a dict, whose keys are the rarity indentifiers and the values are lists with all the parameter dicts of the rewards with that rarity CHANGELOG Added 12.06.2019
[ { "docid": "48a7d0face9d02b8b5b0d2d4553e535f", "score": "0.6307732", "text": "def _available_rewards_by_rarity(cls, available_rewards: List[Dict]) -> Dict:\n mapping = {}\n for rarity in Rarity.RARITIES:\n rewards = list(filter(rarity_filter(rarity), available_rewards))\n ...
[ { "docid": "8cd00bdd78f7c3713d53f17a1c7ea04d", "score": "0.58022445", "text": "def get_rewards_by_name(self) -> Dict[str, List]:\n rewards_dict = defaultdict(list)\n for reward in self.rewards:\n rewards_dict[reward.name].append(reward)\n return rewards_dict", "title"...
7ce4c27c26f7eafeb5c9ba17863fd043
Format the elapsed time from the given date to now or the given timedelta. This function is also available in the template context as filter named `timedeltaformat`.
[ { "docid": "52ff51c9d6ff2c2d1a5b65c3f784e691", "score": "0.68898124", "text": "def format_timedelta(self, datetime_or_timedelta, granularity='second',\n add_direction=False, threshold=0.85):\n if isinstance(datetime_or_timedelta, datetime):\n datetime_or_timedel...
[ { "docid": "2a9b5adbd756d4fe3c4ef0cc217dda0d", "score": "0.6974653", "text": "def format_timedelta(\r\n datetime_or_timedelta,\r\n granularity=\"second\",\r\n add_direction=False,\r\n threshold=0.85,\r\n request=None,\r\n):\r\n if isinstance(datetime_or_timedelta, datetime):\r\n ...
7d6335d29da5c277e290e05412518fd1
The permission bits as an octal integer.
[ { "docid": "f57f2a04d9b7b37f1f433b59470bd055", "score": "0.59944504", "text": "def number(self):\n return os.stat(self.path).st_mode & 0o0777", "title": "" } ]
[ { "docid": "6ca6f89c82377ce8483931dc293ae5ba", "score": "0.66869646", "text": "def permissions(self, flag: int) -> None:\n return self.set_integer('permissions', flag)", "title": "" }, { "docid": "45517c7a1400d98cbcbc6a91b4c711c4", "score": "0.65820366", "text": "def permissio...
b931b556e57f809db9247e801470b1bd
Return n chooses r, or n!/r!/(nr)!
[ { "docid": "10d66a7086fddab0599bce41d2771243", "score": "0.78110343", "text": "def chooses(n, r):\n return factorial(n)/factorial(r)/factorial(n-r)", "title": "" } ]
[ { "docid": "04c81a6690a644bf76f5e49c85d2a527", "score": "0.75664914", "text": "def choose_r(n):\r\n r = 1\r\n while n % 2 == 0:\r\n r += 1\r\n n = n // 2\r\n return r - 1", "title": "" }, { "docid": "a324d78962fec4addf95ecccb5bb5426", "score": "0.72688043", "te...
44cba881612adb75761dbba32be55117
Create necessary user accounts and login as an admin user.
[ { "docid": "cecd23b2f17c718e8d4802d2e20bc74c", "score": "0.62966883", "text": "def test_0000_initiate_users(self):\n self.login(email=common.test_user_1_email, username=common.test_user_1_name)\n test_user_1 = self.test_db_util.get_user(common.test_user_1_email)\n assert test_user_1...
[ { "docid": "00713b0f96bed33b60fc121b60a6e795", "score": "0.7546469", "text": "def p_makeAdminUser(self):\n\n # If already in database, return\n if self.dbManager.userExists(C_ADMINISTRATOR_USERNAME):\n return\n # Store admin in database\n self.dbManager.createUser(...
903d5f542a2e807e35b3198bef1ffaa9
Handle logout of user.
[ { "docid": "f97b4f46bf2fa048a49a8aba7416e172", "score": "0.0", "text": "def logout():\n do_logout()\n flash('Success logging out', 'success')\n return redirect('/')", "title": "" } ]
[ { "docid": "5415155b12d3cc37bb140d0d9eaf3af6", "score": "0.7879216", "text": "def _user_logout(self):\n \n self._user = None", "title": "" }, { "docid": "f8fffaa154dcf2eccd4acc3d996b70a3", "score": "0.7867465", "text": "def handlelogout(request):\n logout(request)\n ...
ad05ad1b6c8774666498d281ac8eefac
Returns the values of plane0 and plane1 at the x, y coordinates
[ { "docid": "2476103f45b1418c9f62913c4116eeba", "score": "0.613089", "text": "def __getitem__(self, item):\n x, y = item\n offset = (x + self.width * y) << 1\n p0 = struct.unpack('<H', self.plane0[offset: offset + 2])[0]\n p1 = struct.unpack('<H', self.plane1[offset: offset + ...
[ { "docid": "feda3b68fc0925e9df0003336c79c729", "score": "0.67105764", "text": "def plane(X1,Y1,X2,Y2,n):\n\n x = linspace(X1,X2,n)\n y = linspace(Y1,Y2,n)\n # Create the mesh grid, of a XY plane sitting on the orgin\n X,Y = meshgrid(x,y)\n Z = zeros([10,10])\n print(X, X.shape)\n ...
4f00eaca0fc433e411723abda22c137d
Residual bias to apply to the original series.
[ { "docid": "320c987c473f838ff6deea0f1ae4e5d8", "score": "0.57894796", "text": "def bias(self):\n return self.mbmod.bias", "title": "" } ]
[ { "docid": "acb249e0cd8c60c67e636075f8019064", "score": "0.6814907", "text": "def bellman_residual(self, Q, samples, weights=None):\n pass", "title": "" }, { "docid": "e49b2a09e0363f2a786c0dc2bed04578", "score": "0.6548202", "text": "def __residuals__(self):\n\t\tself.fitted =...
7049b094f1c8a271d841ce0e7df9399a
This is used to submit a new transaction to the chain. Endusers send transactions and aren't concerned about the blocks, per se. This function takes a signed transaction will validate it is cryptographically sound. It will then need to check that there is sufficient balance to make the transfer. If these are good, we w...
[ { "docid": "cce96330cccdbd3709dd3ae9f1be3f0f", "score": "0.73359656", "text": "def submit_transaction(self, transaction: Transaction) -> None:\n \n # Ensure the transaction is properly signed by the private key\n transaction.validate()\n \n # Make sure the funds exist ...
[ { "docid": "cee49b3b4a228ec167664066a94e01d5", "score": "0.64855164", "text": "def add_transaction(transaction_amount, last_transaction=[1]):\n if last_transaction == None:\n last_transaction = [1]\n\n blockchain.append([last_transaction, transaction_amount])", "title": "" }, { ...
582141432733f2b1f1d5a8945ebb99ad
These are the characters in the game show. host wil be populated randomly by one of the elements in possibleHosts. aud is the audience.
[ { "docid": "cbcf5d6d6ac70fe5fb469dbc9bdd44bb", "score": "0.5040293", "text": "def __init__(self):\n self.host = \"\"\n self.possibleHosts = [\"STEVE HARVEY\", \"PAT SAJAK\", \"BARACK OBAMA\",\n \"SNOOP DOGG\", \"ALEX TREBEK\", \"SETH ROGEN\", \"JOHN MULANEY\",\...
[ { "docid": "e6538d50f277d3cb79a190fa0c116ef3", "score": "0.5911751", "text": "def get_adv_actors(self):\n vision = self.curr_state.board\n characters = []\n for i in range(0, len(vision)):\n for j in range(0, len(vision[0])):\n\n occupied_by = vision[i][j]....
cc5defd274a4954d67fd47e856d48480
Tests that when the email address is missing from the sociallogin email verification kicks in.
[ { "docid": "23cb442dbf31df330244aea3b631a8a2", "score": "0.81232715", "text": "def test_email_address_required_missing_from_sociallogin(\n db, settings, sociallogin_factory, client, rf\n):\n settings.ACCOUNT_EMAIL_REQUIRED = True\n settings.ACCOUNT_UNIQUE_EMAIL = True\n settings.ACCOUNT_USER...
[ { "docid": "f6695ab87d34ed6b71c3e950fa736397", "score": "0.7807229", "text": "def test_email_address_clash_username_not_required(self):\n request, resp = self._email_address_clash(\"test\", \"test@example.com\")\n self.assertEqual(resp[\"location\"], reverse(\"socialaccount_signup\"))\n\n ...
6e04ce63e8a78e8499e2eef3284600ae
Reference (start, end, strand) block
[ { "docid": "bcc85c32280cca386c969f5be579d1f3", "score": "0.6698357", "text": "def ref_block(self) -> tuple[int, int, int]:\n if self.ref_start < self.ref_end:\n return (self.ref_start, self.ref_end, self.ref_strand)\n else:\n return (self.ref_end, self.ref_start, self...
[ { "docid": "e15be92cb7ad2d8e4bd439fb43d7c26e", "score": "0.60712653", "text": "def __init__ (self,start,end):\n self.start=start\n self.end=end", "title": "" }, { "docid": "4960a09897c9d25595292b38a51fa8bf", "score": "0.5889693", "text": "def __init__(self, start, end):...
41fa50a6a8868a4f24da5894655df3c0
Return `true` when self and other are not equal, false otherwise.
[ { "docid": "1440db2a248ce1382e63667cb5d4b50e", "score": "0.0", "text": "def __ne__(self, other: 'VolumeCollectionNext') -> bool:\n return not self == other", "title": "" } ]
[ { "docid": "87ebdeb25fa7429b0644fcaa1762fc07", "score": "0.8563128", "text": "def __eq__(self, other):\n return self != other", "title": "" }, { "docid": "bc10854e638575ab1efa1cf275b9677b", "score": "0.8528623", "text": "def __ne__(self, other):\n return False if self._...
b75a97c734e3388d69d630dcd8032152
Builds a notification channel message from args.
[ { "docid": "eea622a8cc2d7165c2e894b1bab6a893", "score": "0.6235747", "text": "def CreateNotificationChannelsFromArgs(args, messages):\n\n if args.IsSpecified('channels_from_prometheus_alertmanager_yaml'):\n alert_manager_yaml = args.channels_from_prometheus_alertmanager_yaml\n channels = Notifica...
[ { "docid": "85f4a0cd449992fd864a84b85c7225f8", "score": "0.7001008", "text": "def GetNotificationChannelFromArgs(args, messages):\n channels_base_flags = ['--display-name', '--channel-content',\n '--channel-content-from-file']\n ValidateAtleastOneSpecified(args, channels_base_f...
a2c5d12cdab9305340eea3544e06c91b
Passes the input in a roundrobin manner. The roundrobin application means that each element of the input batch will be passed through a single ensemble member in a deterministic roundrobin manner, i.e. element_i > member_k where k = i % num_networks.
[ { "docid": "08a1dc2038aed43b9a94bce3889ff8c1", "score": "0.67145306", "text": "def apply_round_robin(base_apply: Callable[[networks.Params, Any], Any],\n params: networks.Params, *args, **kwargs) -> Any:\n # `num_networks` is the size of the batch dimension in `params`.\n num_netw...
[ { "docid": "866d75e472380b64851b9dadd81a9c84", "score": "0.5458495", "text": "def roundrobin(*iterables):\n pending = len(iterables)\n nexts = cycle(iter(it).next for it in iterables)\n while pending:\n try:\n for next in nexts:\n yield next()\n except St...
9d2f56353cb6e4881608d47089c161a0
Get handlers with message getters.
[ { "docid": "d006d47f0b167f698b4af69021ed3490", "score": "0.76746863", "text": "def get_message_handlers(self) -> List[Tuple[Callable[[Any], None], Callable]]:\n return [\n (self.handle_envelope, self.inbox.async_get),\n ]", "title": "" } ]
[ { "docid": "3d2089feac37be2e44e8248b9248cf1d", "score": "0.72188824", "text": "def get_handlers(self):\n return self.handlers", "title": "" }, { "docid": "e6fca13c850fa160f0c2b816c9e7625c", "score": "0.6957104", "text": "def handlers(self):\n return self._handlers", ...
3830d0d4336cd35387978d6134d9bd1b
Returns a given response header.
[ { "docid": "0f539e759758ad2c6dbf4862eea2a942", "score": "0.7335741", "text": "def getheader(self, name, default=None):\n return self.urllib3_response.getheader(name, default)", "title": "" } ]
[ { "docid": "4962b3e57245ea8b0c37467c6e765eb8", "score": "0.7827818", "text": "def header(self, name):\n key = name.upper()\n if key not in _RESPONSE_HEADER_DICT:\n key = name\n return self._headers.get(key)", "title": "" }, { "docid": "5d50e8a060a518468b44d559...
dbaad6bac4211be8b5d715909a0ae04e
Collects and formats population data for France by commune (source INSEE). Reads the information location and outputs in the `source_config.py` file.
[ { "docid": "47ba6c20e1c1ca5e6cd3d37a1c03495d", "score": "0.660819", "text": "def make_population_commune():\n print('>> Handling \"INSEE / population / commune\" data for year :')\n latest_year = str(max(\n [int(item) for item in source_config.population_data_raw_file[\n 'commune...
[ { "docid": "7982c373c8c406cf15bdf6e8007ff6d2", "score": "0.56587607", "text": "def extract_data(file):\n countries = [\n \"Brunei Darussalam\",\n \"Cambodia\",\n \"Indonesia\",\n \"Lao People's Democratic Republic\",\n \"Malaysia\",\n \"Myanmar\",\n \"...
498e44c7bfe87ed358f51196e968c737
Calls the string in a subprocess and dies if the return value is not 0
[ { "docid": "03c86c546da2e8f5032a29efab714fae", "score": "0.61249554", "text": "def call(self, args, strict = True, cwd = None):\n self.dbg(\"Executing: %s\" % args)\n rv = subprocess.call(args, env = self._env(), cwd = self._cwd(cwd))\n if strict and not rv == 0:\n raise ...
[ { "docid": "e85a19aea3de35751e1b7ea767315347", "score": "0.75284", "text": "def run(string):\n\n # shlex.split will preserve inner quotes\n prog = shlex.split(string)\n p0 = subprocess.Popen(prog, stdout=subprocess.PIPE,\n stderr=subprocess.STDOUT)\n\n stdout0, stder...
9be33284d225994574b3fdffd5f29267
Displays the name of the object in a vieweraware manner.
[ { "docid": "565ff90e8cd1f8ed43fd67d0004d8982", "score": "0.0", "text": "def get_display_name(self, looker, **kwargs):\n #overrides the same method in DefaultObject\n string = self.name\n if self.locks.check_lockstring(looker, \"perm(Builder)\") and looker.db.settings_viewNumbers == ...
[ { "docid": "c7e5e5ee59874bf65c57d2c2ae3d9ca4", "score": "0.74172854", "text": "def show_name(self):\r\n return print(self.__name)", "title": "" }, { "docid": "c7e5e5ee59874bf65c57d2c2ae3d9ca4", "score": "0.74172854", "text": "def show_name(self):\r\n return print(self._...
4f6f40244a426bbab693292cb8d599c5
Calculate Utility based on Edmunds Rating from the User's Requirements.
[ { "docid": "22c21d39c48a42e9ec61ce41618132c9", "score": "0.0", "text": "def knowledge_based_rec(df,\n manufacturer=None,\n category=None,\n price=None,\n comfort=None,\n driving=None,\n ...
[ { "docid": "37fbe4192b5c8647e710d339021da4b6", "score": "0.60642374", "text": "def calcOffensivePointsRating(self):\n evG = self.goals5v5 * 1\n evA1 = self.fAssists5v5 * self.fAssistToGoalWeight\n evA2 = self.sAssists5v5 * self.sAssistToGoalWeight\n\n ppG = self.ppGoals * sel...
cf4de57d473a86eab5179fa5926a1e81
set_car(swig_int_ptr pair, swig_int_ptr value) Stores in the car field of .
[ { "docid": "2d00be2864280cb7b8c6b73722c609bb", "score": "0.67336106", "text": "def set_car(*args, **kwargs):\n return _pmt_swig.set_car(*args, **kwargs)", "title": "" } ]
[ { "docid": "10c6f080f447cf0c29f145940470ac59", "score": "0.5541338", "text": "def setInteger(self, value):", "title": "" }, { "docid": "10c6f080f447cf0c29f145940470ac59", "score": "0.5541338", "text": "def setInteger(self, value):", "title": "" }, { "docid": "10c6f080f447...
c736f23138350c486dd77f9d3c4bbf00
Create and run askOkCancelString dialog .
[ { "docid": "430b9a89b0aefd6448a466c9eb575fcb", "score": "0.852891", "text": "def runAskOkCancelStringDialog(self,c,title,message):\n d = leoSwingDialog.swingAskOkCancelString(c,title,message)\n return d.run(modal=True)", "title": "" } ]
[ { "docid": "f66eb5cdc17560741b7c73d79c9a0604", "score": "0.78492826", "text": "def runAskOkDialog(self,c,title,message=None,text=\"Ok\"):\n d = leoSwingDialog.swingAskOk(c,title,message,text)\n return d.run(modal=True)", "title": "" }, { "docid": "3ac0223cc94fa779bb9ede45da716a...
a5910b8a2b1611b02a3d90d9189dc480
Test valid json file of a single dict can be used to update value of existing object in database. First modify one author's url and then recover it.
[ { "docid": "0ea34ceb45587c36eb03dc85ca739ece", "score": "0.8090758", "text": "def test_valid_one_dict_update(self):\n path = JSON_PATH + \"legal_one_author.json\"\n _, author_db = connect_to_mongo()\n with open(path, \"r+\") as file:\n author_dic = json.load(file)\n\n ...
[ { "docid": "0bc629ea2a9577bca28d1265639fd4c9", "score": "0.6717318", "text": "def test_malformatted_json(self):\n path = JSON_PATH + \"malformed_author.json\"\n try:\n insert_into_db(path, db_type=\"author\")\n self.assertTrue(False) # An error should be thrown\n ...
0534129d8f69459003afa67094aa5eab
Get a line from syslog throw meaningless log Make a log to form as list
[ { "docid": "e94aecd27f026bc21f7a641c848dd732", "score": "0.58972514", "text": "def preprocess_line(line):\n\n global hostname\n\n temp_log = []\n\n # Remove space\n line_data = line.strip().split(hostname)\n \n # Time creater\n if(line_data[0] is not None):\n time = []\n ...
[ { "docid": "8a651a87029f6443409d75cf50639614", "score": "0.6557162", "text": "def log_splitter(log):\n if log is None:\n return []\n return log.splitlines()", "title": "" }, { "docid": "f78b4f63143ca02ed06004b9da286fc8", "score": "0.63221747", "text": "def parse_log(path...
e1f21db3ba0f5c708ddcdb84c7e9bdf3
Rotate with a given angle around x axis
[ { "docid": "818e1330d879aaadfbfd054c753eef39", "score": "0.0", "text": "def rx(self, angle: float) -> \"Mate\":\n a = angle / 180 * pi\n self.y_dir = Mate._rotate(self.y_dir, self.x_dir, a)\n self.z_dir = Mate._rotate(self.z_dir, self.x_dir, a)\n return self", "title": ""...
[ { "docid": "d20982e96b47fde51e7401a4cb1b9bff", "score": "0.8066317", "text": "def rotate_x(self, angle):\n angle *= np.pi / 180\n return self.transform(np.matrix([[1, 0, 0],\n [0, np.cos(angle), -np.sin(angle)],\n ...
f41f95f0d47bf4698f1b3e6d929154ee
return dict to copy self when calling make_address(result)
[ { "docid": "6a1668551d2e929f85c5adc0a12f833c", "score": "0.0", "text": "def to_dict(self):\n raise NotImplementedError(\"derived class must override this method\")", "title": "" } ]
[ { "docid": "f98dc2ea3a10e34509c40b246be66dee", "score": "0.6085023", "text": "def copy(self):\n return dict(self)", "title": "" }, { "docid": "08bb84a713f287a2e3ba6a811ef324e3", "score": "0.5942571", "text": "def copy(self):\n return ndict(super().copy())", "title":...
e48b8f096488845f34830d6f36652abc
method that the agent calls when it gets offline
[ { "docid": "0c592c6a75e8b02731b38ce364aa5dd9", "score": "0.673978", "text": "def agent_offline(self, request, timeout, metadata=None, with_call=False, protocol_options=None):\n raise NotImplementedError()", "title": "" } ]
[ { "docid": "c0fa22975fe5d791e5801d73e226d912", "score": "0.80011284", "text": "def offline(self):\n raise Fail(\"offline\")", "title": "" }, { "docid": "9e8365a06a73f5c571e04e37e5d1c765", "score": "0.73997015", "text": "def agent_offline(self, request, context):\n context...
bd6f4ba7a07c5cb4218907446d63b252
Tone for incrementing the payout
[ { "docid": "832ec2d6bd1db7aec4c32e23a6680f76", "score": "0.7596992", "text": "def increment_tone(self):\n\n self.tone(100, 0.05)", "title": "" } ]
[ { "docid": "a90b7c476331ae9f007c10f6366ccbc0", "score": "0.6023244", "text": "def button_tone(self):\n\n self.tone(783, 0.05)\n self.tone(987, 0.05)\n self.tone(523, 0.10)\n self.tone(1760, 0.05)", "title": "" }, { "docid": "4dd951c490ef945ddd8f925e38adefd8", "score": "0.5921...
855a029d5c8a787f021ccb154df032d1
Add change message for a change to the user that is in form of a UserChangeMessage
[ { "docid": "95552ef26efe004ccd40b0c03dad34ac", "score": "0.64958537", "text": "def add_info(self, change_message):\n self._update_change_messages(change_message)\n self._save = True", "title": "" } ]
[ { "docid": "51a119222f2668a85ef16088ec556e39", "score": "0.75375736", "text": "def add_change_message(self, message):\n if self.is_new_user:\n return\n self._update_change_messages(message)\n self._save = True", "title": "" }, { "docid": "ccc720e96f448591a52dc...
3f62537049bf2b6378f5ee941fc033c3
Test case for watch_extensions_v1beta1_namespaced_ingress_list
[ { "docid": "b32ac6cd95145f0d686371cca5c886cb", "score": "0.9473907", "text": "def test_watch_extensions_v1beta1_namespaced_ingress_list(self):\n pass", "title": "" } ]
[ { "docid": "a61919137b977e1ade8bd4e4a35a0b99", "score": "0.8538603", "text": "def test_list_extensions_v1beta1_namespaced_ingress(self):\n pass", "title": "" }, { "docid": "532a0c68be7f6306bfa24ae5f01f9637", "score": "0.8520756", "text": "def test_watch_extensions_v1beta1_ingr...
cb911eb2f6a94538cd22adcc20af829d
Decide if a token in a document is an valid English word. For this project, we define valid English words to be ASCII strings that contain only letters (both upper and lower case), single quotes ('), double quotes ("), and hyphens (). Double quotes may only appear at the beginning or end of a token unless the beginning...
[ { "docid": "92b23a3d6bc9c240d5283674c2d064b9", "score": "0.7346011", "text": "def is_english_word(word):\n return all([char in [\"\\\"\", \"\\'\", \"-\", \"*\", \"~\", \"*\", \".\"] or char.isalpha() for char in word])", "title": "" } ]
[ { "docid": "87d892bc625e0032a7064acad6b543c7", "score": "0.70654637", "text": "def valid_english_word(word):\n return word.isalpha()", "title": "" }, { "docid": "cd0ddf0ce14e543b39777531f88283f5", "score": "0.70102686", "text": "def _is_tokenized(word):\n return not ((word.ends...
ddac9e7b5347d89c48b6db4ac68d0389
Fetch the product; return 404 or redirect as needed
[ { "docid": "db82d666c6839b6d9b68c65077befefc", "score": "0.65228117", "text": "def get(self, request, *args, **kwargs):\n self.object = get_obj(self.kwargs['slug'], Product)\n potential_redirect = redirect_if_necessary(request.path, self.object)\n\n if potential_redirect is not None...
[ { "docid": "e663e554f3aae5a892e1c8e614abc42b", "score": "0.69985074", "text": "def test_get_product_not_found(self):\n resp = self.app.get(\"/products/0\")\n self.assertEqual(resp.status_code, status.HTTP_404_NOT_FOUND)", "title": "" }, { "docid": "559f1e35e242076dc48f14f3d1460...
93a36c4fe30acaf89dcd5cc040164c27
identifies picks on a truncated timeseries and creates attr.
[ { "docid": "135553abc9c41eea9f48d9a2907c11cd", "score": "0.6437175", "text": "def truncated_picks(self, date_range, value, which):\n\n pass", "title": "" } ]
[ { "docid": "1f32af4fefb08350a084de27f7dc1039", "score": "0.51315945", "text": "def convert_timestamp_attrs(self) -> None:\n\n def _get_datetime_str(timestamp: int) -> str:\n \"\"\"Auxiliary method to return datetime string from timestamp.\"\"\"\n if not timestamp: # ...
e29578e2e5aab1a500f30973814aac38
Do not return anything, modify matrix inplace instead.
[ { "docid": "401475e234cb27b5cd2d5f92cd413843", "score": "0.0", "text": "def setZeroes(matrix):\n m, n = len(matrix), len(matrix[0])\n row, column = set(), set()\n\n for i in range(m):\n for j in range(n):\n if matrix[i][j] == 0:\n row.add(i)\n col...
[ { "docid": "1f49d776fa96295bcaed2ee8e8797509", "score": "0.70165074", "text": "def as_mutable_matrix(matrix):\n return matrix.as_mutable()", "title": "" }, { "docid": "25a772c33720f902dc942d7194d9f308", "score": "0.6949418", "text": "def matrix(self, matrix):", "title": "" }...
4a4f34489a65f9304f10439e7d7a7847
Returns an image with reduced opacity.
[ { "docid": "7a6d677a22fd5484810a8b3f07511e89", "score": "0.7732773", "text": "def reduce_opacity(im, opacity):\n assert opacity >= 0 and opacity <= 1\n if im.mode != 'RGBA':\n im = im.convert('RGBA')\n else:\n im = im.copy()\n alpha = im.split()[3]\n alpha = ImageEnhance.Bri...
[ { "docid": "1d34bf218e495a1d7eb729956713e97b", "score": "0.7735883", "text": "def reduce_opacity(im, opacity):\r\n assert opacity >= 0 and opacity <= 1\r\n if im.mode != 'RGBA':\r\n im = im.convert('RGBA')\r\n else:\r\n im = im.copy()\r\n alpha = im.split()[3]\r\n alpha = Im...
2cbe506a10e6bea626cbfd3812ef22cf
checks if table position is of expected color
[ { "docid": "85e4fb4ef5c56c335a3a8b96f450ee88", "score": "0.7153457", "text": "def is_expected_cell_color(self, position, expected_cell_color):\n obj = self.deck[position[0]][position[1]]\n\n if isinstance(obj, Checker) and obj.color.lower() == expected_cell_color:\n return True\...
[ { "docid": "dbac32eb9693bda25524684035fcb65b", "score": "0.6258472", "text": "def check_color(board):\n columns_empt = empty_columns(board)\n columns = fill_columns(columns_empt,board)\n colors = []\n for i in range(len(columns)):\n color = columns[i][:-(i+1)] + board[-(i+1)][i:]\n ...
e67e51330f164c6d60d6be4a3131d4cd
Deal with pending expunges that have built up for this client. This can only be called during a command, but not during FETCH, STORE, or SEARCH commands. Also we will not call this during things like 'select' or 'close' because they are no longer listening to the mailbox (but they will empty the list of pending expunge...
[ { "docid": "b07282ff39a535ced3b1e138f9db0479", "score": "0.7527915", "text": "def send_pending_expunges(self):\n for p in self.pending_expunges:\n self.client.push(p)\n self.pending_expunges = []", "title": "" } ]
[ { "docid": "da21b9287702e38ed21ecd0769c303ec", "score": "0.64203936", "text": "def do_fetch(self, cmd):\n if self.state != \"selected\":\n raise No(\"Client must be in the selected state\")\n\n # If self.mbox is None then this mailbox was deleted while this user\n # had i...
6013a3aa67e5ee497f635a33110033b3
Register image stacks to pixel accuracy.
[ { "docid": "385c627cffd41c090132693113c74cc7", "score": "0.0", "text": "def register_images(images, index=None, window=(500, 500), upsample=1.):\n if index is None:\n index = ((0,) * (images[0].ndim - 2) + (slice(None),) * 2)\n\n sz = [image[index].shape for image in images]\n sz = np.ar...
[ { "docid": "5d59599f609447a64fef6ffe295e5015", "score": "0.64948565", "text": "def init_stack():\n global image_stack_\n global h_, w_\n global max_frames_in_trial\n image_stack_ = np.zeros(\n shape=(max_frames_in_trial, h_ + 1, w_), dtype=np.uint8\n )", "title": "" }, { ...
757a3d880d7b3d20791405a3456e394a
Returns the data in the csv file.
[ { "docid": "78a72f498df468c4941317e889c7bc2c", "score": "0.68766993", "text": "def getCsvData():\n return np.genfromtxt(FILENAME, delimiter=',', skip_header=1)", "title": "" } ]
[ { "docid": "f6ef013293c3bf7f89588462c68c3cd4", "score": "0.77819395", "text": "def getCsv(self,nomeCsv):", "title": "" }, { "docid": "cc799882a598874b392766febc2f51cf", "score": "0.7663828", "text": "def get_data(self):\n with open(os.path.join('data_file.csv'), 'r') as fin:\n...
33e9dd697aa0873d63e601ff171033aa
Two test users are created, but only the first one is loggedin.
[ { "docid": "b9a23a5f8000f9fed04b15d7eef592eb", "score": "0.0", "text": "def setUp(self):\n # set up an active test user and log them in\n first_test_user = factories.MTUserFactory(is_active=True)\n first_test_user_profile = factories.UserProfileFactory(user=first_test_user)\n ...
[ { "docid": "cecd23b2f17c718e8d4802d2e20bc74c", "score": "0.7482575", "text": "def test_0000_initiate_users(self):\n self.login(email=common.test_user_1_email, username=common.test_user_1_name)\n test_user_1 = self.test_db_util.get_user(common.test_user_1_email)\n assert test_user_1 ...
e8709b2d66cca368ee1046dd9e976275
get_portfolio_date extracts the list of stock by the date period
[ { "docid": "232d02e0f68a63921ef4f1602c848e54", "score": "0.7507132", "text": "def get_date(self,start_date, end_date, n_threads = 8):\n stockList = self._get_stock_list_multi(n_threads,'get_date', [start_date, end_date])\n self.portfolio = Portfolio(\n stockList,\n ti...
[ { "docid": "754e943e07f3c2f47d78658c43324332", "score": "0.6763785", "text": "def get_period(self,period, n_threads= 8):\n stockList = self._get_stock_list_multi(n_threads,'get_period', [period])\n self.portfolio = Portfolio(\n stockList,\n time_index='Date',\n ...
0733abbd7642aa08c3140ea6d494350f
Creates a AXIC card
[ { "docid": "ba0cb07a746135e2e85079c710aade0b", "score": "0.5038087", "text": "def add_axic(self, nharmonics, comment='') -> AXIC:\n axic = AXIC(nharmonics, comment=comment)\n self._add_methods._add_axic_object(axic)\n return axic", "title": "" } ]
[ { "docid": "33301934c51f8083554de3d42b4d471c", "score": "0.6408132", "text": "def test_basicCardCreation():\n\tc = Card(\"A\",\"Diamond\")\n\tassert c.getName() == \"A\"\n\tassert c.getValue() == [1,11]\n\tassert c.getSuit() == \"Diamond\"", "title": "" }, { "docid": "d93da30fcd080c31d68bff4...
d9bcdbc72f4aa3fd4e0f5c9765f49d60
An array of string values. If the operator is In or NotIn, the values array must be nonempty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a stra...
[ { "docid": "83bedbf18fa8b31ed46d6fdafb101161", "score": "0.0", "text": "def values(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:\n return pulumi.get(self, \"values\")", "title": "" } ]
[ { "docid": "44858bb949c773b36d20a908517608f3", "score": "0.58816344", "text": "def getOperatorQuery(values:list):\n if(values[0]=='>'):\n return {'$gt':float(values[1])}\n elif(values[0]=='>='):\n return {'$gte':float(values[1])}\n elif(values[0]=='<'):\n return {'$lt':floa...
bcc66fe3430836eecca2a21f7952ef75
\remarksimplements the AbstractSceneObject._nativeCaches method to return a list of the native caches that are applied to this object \paramcacheTypefitler by the inputed cache type \return [ nativeCache, .. ]
[ { "docid": "bc30bd28eea3197355a87e3333426621", "score": "0.8371028", "text": "def _nativeCaches( self, cacheType = 0 ):\r\n\t\toutput = []\r\n\r\n\t\tfrom cross3d.constants import CacheType\r\n\r\n\t\t# store maxscript methods used\r\n\t\tclassof \t= mxs.classof\r\n\r\n\t\t# collect point cache modifier...
[ { "docid": "5e8c0cf4aaac44379c07e7e302ae9f6a", "score": "0.5680656", "text": "def get_cache(self):", "title": "" }, { "docid": "8db0c5aae69f2fb6e30128c2aa022fab", "score": "0.55789125", "text": "def getCache(self, sType):\n dRet = self.ddCaches.get(sType, None);\n if dR...