query
stringlengths
9
9.05k
document
stringlengths
10
222k
metadata
dict
negatives
listlengths
30
30
negative_scores
listlengths
30
30
document_score
stringlengths
4
10
document_rank
stringclasses
2 values
Tell the RoboVac to clean a single room.
def start_single_room_clean(self): command = _build_robovac_command(RobovacModes.WORK, RobovacCommands.SINGLE_ROOM_CLEAN) message = self._build_command_user_data_message(command) self._send_packet(message, False)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def clear(self, ctx):\n if ctx.message.author.top_role.name.lower() == 'officer':\n with SQLCursor(self.db) as cur:\n cur.execute('UPDATE govt_info SET officer = Null;')\n await ctx.message.channel.send(\n 'Successfully cleared all officers f...
[ "0.5906659", "0.59003526", "0.5829769", "0.57369155", "0.55835515", "0.5559878", "0.55521303", "0.54984415", "0.54916006", "0.542621", "0.542105", "0.5406405", "0.5371466", "0.5371127", "0.5288914", "0.52766216", "0.52469695", "0.5244343", "0.5212713", "0.520392", "0.520318",...
0.6597308
0
Tell the RoboVac to stop cleaning. The RoboVac will not return to its charging base.
def stop(self): command = _build_robovac_command(RobovacModes.WORK, RobovacCommands.STOP_CLEAN) message = self._build_command_user_data_message(command) self._send_packet(message, False)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def stopclean(self):\n raise Exception(\"Not implemented\")", "def stop(self):\r\n self.terminating = True", "def stop(self):\n print(\"Stopping accessory.\")", "def stop(self):\n self._current_mc_goal = None\n self._mc_goals = []\n self._position_control_client.canc...
[ "0.7290178", "0.69505924", "0.69007415", "0.67673147", "0.674806", "0.67433226", "0.67431015", "0.67431015", "0.67406785", "0.67222804", "0.67222804", "0.67222804", "0.67222804", "0.67222804", "0.6720151", "0.671741", "0.66967374", "0.6682695", "0.667672", "0.6624697", "0.662...
0.8032583
0
Start the 'find me' mode. The RoboVac will repeatedly play a chime.
def start_find_me(self): command = _build_robovac_command(RobovacModes.FIND_ME, RobovacCommands.START_RING) message = self._build_command_user_data_message(command) self._send_packet(message, False)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def main():\n global repeat\n regime = collect()\n start = int(raw_input(\"Which line of the exercise script would you like to begin with? \")) - 1\n regime = regime[start:]\n say(\"Ready?\")\n time.sleep(1)\n for exercise in regime:\n coach(exercise[:-1])\n while repeat:\n ...
[ "0.59182197", "0.5831545", "0.5824273", "0.5812982", "0.581012", "0.579923", "0.5789638", "0.572785", "0.5726542", "0.57101417", "0.56072944", "0.5601628", "0.55859745", "0.555688", "0.55301493", "0.54577565", "0.5447385", "0.5443759", "0.54365546", "0.5422701", "0.54151183",...
0.7234999
0
Stop the 'find me' mode.
def stop_find_me(self): command = _build_robovac_command(RobovacModes.FIND_ME, RobovacCommands.STOP_RING) message = self._build_command_user_data_message(command) self._send_packet(message, False)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __stopSearch(self):\n self.__cancelSearch = True", "def stop_searching(self):\n self.searching = False\n self.receive_msg(\"No one is online :(\", keyboard=True)", "def continue_search( self ):\n return True;", "def stop(self):\n self._should_run = False", "def stop(self)...
[ "0.6852051", "0.65245056", "0.6441062", "0.60047376", "0.59559894", "0.59457433", "0.59007186", "0.58754736", "0.57997805", "0.5778056", "0.5762534", "0.57422465", "0.5702933", "0.5702933", "0.5696768", "0.56846666", "0.56741786", "0.5640267", "0.5640267", "0.56264794", "0.56...
0.7103667
0
Tell the RoboVac to use the standard fan speed.
def use_normal_speed(self): command = _build_robovac_command(RobovacModes.SET_SPEED, RobovacCommands.SLOW_SPEED) message = self._build_command_user_data_message(command) self._send_packet(message, False)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_fan_speed(self, value):\n self.parent.fancoolers.set_speed(value)", "async def async_set_speed(self, value) -> None:\n await self.write_attributes_safe({\"fan_mode\": value})", "def set_speed():\n pass", "def setspeed(speed):\n if speed is None:\n click.echo(\"speed value i...
[ "0.76779467", "0.736443", "0.7363512", "0.7304039", "0.70294833", "0.70021176", "0.70012236", "0.6961615", "0.6888173", "0.686537", "0.67941016", "0.6766449", "0.67494905", "0.6713837", "0.6685503", "0.6615061", "0.66007936", "0.65657735", "0.65587157", "0.65497774", "0.65066...
0.74292755
1
Tell the RoboVac to use the maximum possible fan speed.
def use_max_speed(self): command = _build_robovac_command(RobovacModes.SET_SPEED, RobovacCommands.FAST_SPEED) message = self._build_command_user_data_message(command) self._send_packet(message, False)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_max_speed(self, value):\n if self.mot_type == 'ims':\n return self.put_par(\"max_speed\",value)\n elif self.mot_type == 'xps8p':\n print \"asked to set the max speed to %f but max speed is read only for %s motors\\n\" % (value,mot_type)\n else:\n return self.put_par(\"max_speed\",va...
[ "0.74900687", "0.7249712", "0.7098766", "0.7085992", "0.7081822", "0.70329684", "0.7032855", "0.698288", "0.6789867", "0.6753174", "0.674114", "0.6709674", "0.6582785", "0.65548813", "0.65360487", "0.65114", "0.6508013", "0.647743", "0.63822633", "0.6367871", "0.6339305", "...
0.797232
0
Tell the RoboVac to move forward without vacuuming.
def go_forward(self): command = _build_robovac_command(RobovacModes.GO_FORWARD, RobovacCommands.MOVE) message = self._build_command_user_data_message(command) self._send_packet(message, False)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def move_forward():\n pass", "def forward( self ):\n self._has_change = True\n print( \"Forward\" )", "def drive_forward(self):\n print(f\"{self.make.title()} is now driving forward.\")", "def moveForward(self):\n if self.onGround:\n self.vx = 4", "def go_backward(...
[ "0.69637424", "0.690487", "0.6864352", "0.6808601", "0.6727196", "0.6538748", "0.65017474", "0.64020467", "0.63450474", "0.6310254", "0.6196319", "0.6166948", "0.6153368", "0.61513495", "0.6137633", "0.61126256", "0.6086981", "0.60860014", "0.60540205", "0.6053337", "0.604309...
0.7456065
0
Tell the RoboVac to move backward without vacuuming.
def go_backward(self): command = _build_robovac_command(RobovacModes.GO_BACKWARD, RobovacCommands.MOVE) message = self._build_command_user_data_message(command) self._send_packet(message, False)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def move_back(self):\n\n # slowly drive backwards\n self.velocity = -1 * const.Driving.CAUTIOUS_VELOCITY\n self.angle = const.Driving.NEUTRAL_STEERING_ANGLE\n\n # drive as long there is enough space to the next vehicle or obstacle\n gap = self.formation.calc_gap()\n self.s...
[ "0.7490403", "0.7196898", "0.7087098", "0.70502883", "0.69173604", "0.6865075", "0.6826124", "0.68211675", "0.6742248", "0.6675336", "0.6658164", "0.665498", "0.66415536", "0.66358215", "0.6597827", "0.6591449", "0.6572632", "0.6572632", "0.6572632", "0.65611684", "0.6511425"...
0.8243355
0
Tell the RoboVac to turn left without vacuuming.
def go_left(self): command = _build_robovac_command(RobovacModes.GO_LEFT, RobovacCommands.MOVE) message = self._build_command_user_data_message(command) self._send_packet(message, False)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def turn_left(self):\n pass", "def turn_left(self):\n temp = self.direction[0]\n self.direction[0] = self.direction[1]\n self.direction[1] = -temp", "def turn_left(): #py:turn_left\n RUR._turn_left_()", "def do_left_turn(robot_name):\n global current_direction_index\n\n ...
[ "0.7898152", "0.7493305", "0.7311259", "0.70578676", "0.7055431", "0.70288837", "0.70254827", "0.69394284", "0.692184", "0.6902282", "0.68978935", "0.6850267", "0.68196297", "0.68056685", "0.6805268", "0.6805268", "0.6784195", "0.662146", "0.6527624", "0.64925176", "0.6428156...
0.78428185
1
Tell the RoboVac to turn right without vacuuming.
def go_right(self): command = _build_robovac_command(RobovacModes.GO_RIGHT, RobovacCommands.MOVE) message = self._build_command_user_data_message(command) self._send_packet(message, False)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def turn_right(self):\n pass", "def turn_right(self):\n temp = self.direction[0]\n self.direction[0] = -self.direction[1]\n self.direction[1] = temp", "def rightTurn(self):\n #print('rightTurn\\r')\n #self.linearVector = Vector3(x=0.0, y=0.0, z=0.0)\n #self.ang...
[ "0.74713826", "0.6848282", "0.663373", "0.6517492", "0.63592947", "0.6337446", "0.6301318", "0.62907267", "0.62155974", "0.614369", "0.6089513", "0.6063729", "0.6042315", "0.6024011", "0.6018741", "0.601695", "0.6016896", "0.599335", "0.59697616", "0.5962759", "0.59334576", ...
0.71917444
1
Send a packet to the RoboVac. This method handles all the required encryption. Will attempt to reconnect to the RoboVac if sending a packet fails.
def _send_packet(self, packet: LocalServerInfo_pb2.LocalServerMessage, receive: True) -> Union[None, LocalServerInfo_pb2.LocalServerMessage]: raw_packet_data = packet.SerializeToString() encrypted_packet_data = _encrypt(raw_packet_data) try: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _send_packet(self, packet: bytes):\n self._transport.sendto(packet, self._caddr)", "def send_packet(self, pk):\n try:\n self.out_queue.put(pk, True, 2)\n except queue.Full:\n if self.link_error_callback:\n self.link_error_callback('RadioDriver: Could ...
[ "0.64176506", "0.63706136", "0.6224615", "0.6196162", "0.6173141", "0.6123173", "0.6081629", "0.6043275", "0.5993913", "0.59894913", "0.59562594", "0.59385705", "0.58800924", "0.58748245", "0.5874205", "0.58084327", "0.5799395", "0.57993656", "0.57781637", "0.5766678", "0.575...
0.6370769
1
Check if token is revoked
def is_revoked(self, token: str) -> bool: return token in self.revoked_tokens
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _check_token_is_revoked(self, jti: str) -> None:\n redis = self._conn_redis()\n entry = redis.get(jti)\n if entry and entry == 'true':\n raise HTTPException(status_code=401,detail=\"Token has been revoked\")", "def is_token_revoked(decoded_token):\n jti = decoded_token['jti...
[ "0.85325533", "0.83196324", "0.81468725", "0.73686993", "0.6955454", "0.69062203", "0.69048154", "0.6787738", "0.6749311", "0.6746789", "0.6666206", "0.66284657", "0.6612462", "0.65676683", "0.6503612", "0.6446665", "0.64310426", "0.64228463", "0.641565", "0.6403295", "0.6384...
0.8320756
1
Sets the edges of this tree.
def set_edges(self, edges): assert len(edges) == self._num_edges self._tree_grid = make_tree(edges)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_edges(self, edges):\n self._tree.set_edges(edges)\n self._program = make_propagation_program(self._tree.tree_grid)", "def edges(self, edges):\n\n self._edges = edges", "def edges(self, e):\n self._edges = e", "def set_edges(self, edges):\n if (not isinstance(edges, ...
[ "0.82975215", "0.80445296", "0.7617749", "0.75694954", "0.69215083", "0.65117955", "0.65005696", "0.64635426", "0.63808835", "0.6289433", "0.6289433", "0.6232497", "0.62297255", "0.6196837", "0.61252075", "0.6041478", "0.6040774", "0.5979283", "0.5967948", "0.5943518", "0.593...
0.8505694
0
Makes an efficient schedule for message passing on a tree.
def make_propagation_schedule(grid, root=None): if root is None: root = find_center_of_tree(grid) E = grid.shape[1] V = 1 + E neighbors = [set() for _ in range(V)] edge_dict = {} for e, v1, v2 in grid.T: neighbors[v1].add(v2) neighbors[v2].add(v1) edge_dict[v1, v2...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def algo_schedule():\n\talgo(node.id, node)\n\treactor.callLater(STEP_TIME, algo_schedule)", "def run(self):\n\n # keep track of counter\n counter = 0\n\n while self.queue:\n\n # print depth of tree every 10000 steps\n if counter % 10000 == 0:\n print(len...
[ "0.6145357", "0.5590652", "0.5394166", "0.5393599", "0.538951", "0.53780746", "0.53780746", "0.5376024", "0.53468835", "0.5345341", "0.5336988", "0.5289542", "0.5259551", "0.5243181", "0.52406275", "0.52231073", "0.5221868", "0.52196497", "0.51684105", "0.51681745", "0.514325...
0.5650114
1
Remove edge at position e from tree and update data structures.
def remove_edge(self, e): assert len(self.e2k) == self.VEK[1] assert len(self.k2e) == self.VEK[1] neighbors = self.neighbors components = self.components k = self.e2k.pop(e) self.k2e.pop(k) v1, v2 = self.grid[1:, k] neighbors[v1].remove(v2) neighbo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_edge(self, edge: Edge) -> Edge:", "def remove_edge(self, edge):\n if self.get_edge(edge):\n del self[edge[0]][edge[1]]\n del self[edge[1]][edge[0]]", "def _del(self, handle=\"\", node=\"\", edge=\"\", subg=\"\"):\n head, tail = '', ''\n if edge:\n ...
[ "0.71544826", "0.6813152", "0.6589992", "0.6541133", "0.64621186", "0.6431649", "0.6385933", "0.6373629", "0.63383347", "0.62092847", "0.62010515", "0.6177546", "0.61467075", "0.6116178", "0.6074385", "0.60594064", "0.6028453", "0.5965395", "0.5951493", "0.584998", "0.5843794...
0.7103287
1
Add edge k at location e and update data structures.
def add_edge(self, e, k): assert len(self.e2k) == self.VEK[1] - 1 assert len(self.k2e) == self.VEK[1] - 1 v1, v2 = self.grid[1:, k] assert self.components[v1] != self.components[v2] self.k2e[k] = e self.e2k[e] = k self.neighbors[v1].add(v2) self.neighbors[...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_edge(self, e):\n v, w = e\n self[v][w] = e\n self[w][v] = e", "def add_edge(self, e):\n a, b = e\n self[a][b] = e\n self[b][a] = e", "def addEdge(self, e):\n v = e.either()\n w = e.other(v)\n self._validateVertex(v)\n self._validateVertex(w)\n se...
[ "0.75295997", "0.7464711", "0.6864501", "0.6483626", "0.62846744", "0.6208539", "0.6208539", "0.6100469", "0.6099873", "0.60953695", "0.608646", "0.6033433", "0.6003985", "0.5998347", "0.59671044", "0.5966964", "0.5939195", "0.5916484", "0.5904478", "0.58792466", "0.58771837"...
0.8439938
0
Sample a random spanning tree of a dense weighted graph using MCMC. This uses Gibbs sampling on edges. Consider E undirected edges that can move around a graph of V=1+E vertices. The edges are constrained so that no two edges can span the same pair of vertices and so that the edges must form a spanning tree. To Gibbs s...
def sample_tree(grid, edge_logits, edges, steps=1): logger.debug('sample_tree sampling a random spanning tree') COUNTERS.sample_tree_calls += 1 if len(edges) <= 1: return edges tree = MutableTree(grid, edges) V, E, K = tree.VEK for step in range(steps): for e in range(E): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def random_sample(G):\n E = collections.defaultdict(list) # to store the new sampled preference list\n for student in G.A:\n pref_list = G.E[student]\n E[student] = pref_list[:] # store the pref list of student in E\n for elective in pref_list:\n E[elective].append(student)\...
[ "0.6734483", "0.6609522", "0.6599776", "0.65759814", "0.64373255", "0.6393696", "0.6348071", "0.6322246", "0.62644666", "0.62157667", "0.62151515", "0.60374993", "0.59690386", "0.59388816", "0.5910111", "0.5908384", "0.58963275", "0.5890668", "0.5856513", "0.5833557", "0.5810...
0.7124525
0
Tests GET method on google authenticator
def test_read_ga(self): url = reverse('admin_google_authenticator') data = { } self.client.force_authenticate(user=self.admin) response = self.client.get(url, data) self.assertEqual(response.status_code, status.HTTP_405_METHOD_NOT_ALLOWED)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_0040_registration_get(self):\n response = self.fetch(\n '/registration', method=\"GET\", follow_redirects=False\n )\n self.assertEqual(response.code, 200)", "def test_get_main_route_auth():\n set_token(client, \"user0011\")\n\n response = client.get(url)\n assert...
[ "0.692226", "0.6907537", "0.69011676", "0.684241", "0.68108356", "0.6698029", "0.6575124", "0.6575124", "0.6561964", "0.6536934", "0.65270597", "0.6493965", "0.6480874", "0.6480874", "0.6438329", "0.63903564", "0.63852197", "0.63834625", "0.63834625", "0.63336784", "0.6310726...
0.75863326
0
Tests PUT method on google authenticator
def test_update_ga(self): url = reverse('admin_google_authenticator') data = { } self.client.force_authenticate(user=self.admin) response = self.client.put(url, data) self.assertEqual(response.status_code, status.HTTP_405_METHOD_NOT_ALLOWED)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_PUT(self):\n if not self.url:\n return\n response = self.client.put(self.url, {}, format='json')\n self.assertIn(response.status_code, [status.HTTP_405_METHOD_NOT_ALLOWED,\n status.HTTP_401_UNAUTHORIZED])", "def test_put_method(...
[ "0.75060594", "0.74279714", "0.7279392", "0.7239791", "0.71154946", "0.7027044", "0.6975747", "0.6921709", "0.68776083", "0.68717974", "0.6840171", "0.6779103", "0.6754017", "0.6685355", "0.6685355", "0.6670062", "0.6611915", "0.6585054", "0.6574342", "0.6565525", "0.65529203...
0.74890983
1
Tests POST method on google authenticator
def test_create_ga(self): url = reverse('admin_google_authenticator') data = { } self.client.force_authenticate(user=self.admin) response = self.client.post(url, data) self.assertEqual(response.status_code, status.HTTP_405_METHOD_NOT_ALLOWED)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_0050_registration_post_1(self):\n response = self.fetch(\n '/registration', method=\"POST\", follow_redirects=False,\n body=urlencode({'name':'anoop', 'email':'pqr@example.com',\n 'password':'openlabs', 'confirm_password':'wrong'}\n )\n )\n ...
[ "0.71235955", "0.69123614", "0.68825096", "0.6866466", "0.68049127", "0.67935437", "0.6757084", "0.667855", "0.6642896", "0.66332465", "0.6562463", "0.6533614", "0.65188736", "0.64831114", "0.6460359", "0.6424149", "0.64141566", "0.6398847", "0.6398251", "0.6341648", "0.63391...
0.71679026
0
Tests DELETE method on ga without being an admin
def test_delete_ga_failure_no_admin(self): url = reverse('admin_google_authenticator') data = { 'google_authenticator_id': self.ga.id } self.client.force_authenticate(user=self.test_user_obj) response = self.client.delete(url, data) self.assertEqual(respon...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_delete_ga_failure_no_ga_id(self):\n\n url = reverse('admin_google_authenticator')\n\n data = {\n }\n\n self.client.force_authenticate(user=self.admin)\n response = self.client.delete(url, data)\n\n self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST...
[ "0.78405344", "0.7798382", "0.7431772", "0.73222965", "0.73197466", "0.7210531", "0.71509945", "0.71504116", "0.71398807", "0.71240693", "0.71109575", "0.7097844", "0.7097153", "0.70948076", "0.705479", "0.70487773", "0.7041551", "0.70338", "0.700916", "0.6971044", "0.6954457...
0.80400723
0
Tests DELETE method on ga without a ga id
def test_delete_ga_failure_no_ga_id(self): url = reverse('admin_google_authenticator') data = { } self.client.force_authenticate(user=self.admin) response = self.client.delete(url, data) self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_delete_ga_failure_ga_id_not_exist(self):\n\n url = reverse('admin_google_authenticator')\n\n data = {\n 'google_authenticator_id': '499d3c84-e8ae-4a6b-a4c2-43c79beb069a'\n }\n\n self.client.force_authenticate(user=self.admin)\n response = self.client.delete(ur...
[ "0.75935537", "0.73303866", "0.72282845", "0.7068529", "0.6912258", "0.67213583", "0.6707342", "0.6631806", "0.66277874", "0.6619722", "0.66181743", "0.65358365", "0.6516876", "0.6516742", "0.6514221", "0.6489775", "0.6468499", "0.64639056", "0.6462968", "0.64613545", "0.6457...
0.7927357
0
Tests DELETE method on ga with a ga id that does not exist
def test_delete_ga_failure_ga_id_not_exist(self): url = reverse('admin_google_authenticator') data = { 'google_authenticator_id': '499d3c84-e8ae-4a6b-a4c2-43c79beb069a' } self.client.force_authenticate(user=self.admin) response = self.client.delete(url, data) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_delete_ga_failure_no_ga_id(self):\n\n url = reverse('admin_google_authenticator')\n\n data = {\n }\n\n self.client.force_authenticate(user=self.admin)\n response = self.client.delete(url, data)\n\n self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST...
[ "0.7988406", "0.71753716", "0.7135444", "0.6940979", "0.67862177", "0.67631596", "0.67527014", "0.67248595", "0.6668205", "0.65559757", "0.655533", "0.65383536", "0.65380216", "0.65101993", "0.6438291", "0.64287865", "0.64131516", "0.63993865", "0.6388697", "0.6383335", "0.63...
0.7812305
1
Convert a quaternion into euler angles (roll, pitch, yaw) roll is rotation around x in radians (counterclockwise) pitch is rotation around y in radians (counterclockwise) yaw is rotation around z in radians (counterclockwise)
def euler_from_quaternion(x, y, z, w): t0 = +2.0 * (w * x + y * z) t1 = +1.0 - 2.0 * (x * x + y * y) roll_x = math.atan2(t0, t1) t2 = +2.0 * (w * y - z * x) t2 = +1.0 if t2 > +1.0 else t2 t2 = -1.0 if t2 < -1.0 else t2 pitch_y = math.asin(t2) t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def euler_from_quaternion(self, quaternion):\n x = quaternion.x\n y = quaternion.y\n z = quaternion.z\n w = quaternion.w\n\n sinr_cosp = 2 * (w * x + y * z)\n cosr_cosp = 1 - 2 * (x * x + y * y)\n roll = np.arctan2(sinr_cosp, cosr_cosp)\n\n sinp = 2 * (w * y ...
[ "0.8658502", "0.8394331", "0.8320644", "0.82789195", "0.82181174", "0.81303775", "0.8088952", "0.80464375", "0.7996021", "0.7938749", "0.7929835", "0.7912955", "0.78689206", "0.7632398", "0.74772036", "0.7472176", "0.7432922", "0.7294737", "0.7286224", "0.7286224", "0.7265650...
0.8440425
1
Create / get S3 bucket for tests
def s3_bucket(s3_resource, s3_client, account_id, boto_session): region_name = boto_session.region_name bucket_name = f"amazon-braket-sdk-integ-tests-{account_id}" bucket = s3_resource.Bucket(bucket_name) try: # Determine if bucket exists s3_client.head_bucket(Bucket=bucket_name) e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_create_bucket(self):\n pass", "def mock_s3_bucket():\n with moto.mock_s3():\n bucket_name = \"mock-bucket\"\n my_config = Config(region_name=\"us-east-1\")\n s3_client = boto3.client(\"s3\", config=my_config)\n s3_client.create_bucket(Bucket=bucket_name)\n yi...
[ "0.7903016", "0.7897161", "0.78822505", "0.78671503", "0.76673317", "0.76400506", "0.76379246", "0.746405", "0.74143255", "0.73914135", "0.73775566", "0.7376731", "0.7319354", "0.73147637", "0.7291668", "0.72262007", "0.7194341", "0.7152316", "0.7140391", "0.70995533", "0.708...
0.7979803
0
Create a dictionary with file attributes for FUSE.
def create_file_attributes(permissions, time, size): return { 'st_mode': (stat.S_IFREG | permissions), 'st_ctime': time, 'st_mtime': time, 'st_atime': time, 'st_size': size, 'st_uid': os.getuid(), 'st_gid': os.getgid(), 'st_nlink': 1 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_file_hash_dict(cls, file, file_path):\n\n file_info = {}\n file_info['path'] = file_path\n file_info['hash'] = cls.get_256_hash_from_file(file_path)\n file_info['type'] = 'file'\n file_info['name'] = file\n file_info['perm'] = stat.S_IMODE(os.lstat(file_path).st...
[ "0.6876256", "0.6477355", "0.642789", "0.63974553", "0.6374335", "0.636785", "0.63562584", "0.6264039", "0.62063867", "0.61930203", "0.6149867", "0.61277133", "0.60900444", "0.6011493", "0.59660053", "0.59634185", "0.5940534", "0.5900107", "0.58942765", "0.5891259", "0.588044...
0.7342417
0
Create a dictionary with directory attributes for FUSE.
def create_directory_attributes(time): return { 'st_mode': (stat.S_IFDIR | 0o555), 'st_ctime': time, 'st_mtime': time, 'st_atime': time, 'st_uid': os.getuid(), 'st_gid': os.getgid(), 'st_nlink': 2 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_filesystem_can_get_attributes_of_directory(self):\n time.time = MagicMock(return_value=time.time())\n self.index.photos_directory_exists = MagicMock(return_value=True)\n self.index.photos_unique_domains = MagicMock(\n return_value=['example.com']\n )\n self.in...
[ "0.65125257", "0.63955706", "0.622794", "0.61981", "0.5993693", "0.59099", "0.5832498", "0.58114654", "0.57562417", "0.57512605", "0.5694966", "0.562954", "0.5596386", "0.5554438", "0.5540832", "0.5540053", "0.55319875", "0.5529663", "0.5522666", "0.5500827", "0.54975873", ...
0.7701529
0
Try to resolve a path as something within a ref of a project.
def resolve_ref_prefix(self, path): project, remainingPath = self.resolve_project_prefix(path) if not project: return None, None, None for ref in self.cache.list_project_refs(project, self.tagRefs): try: treePath = remainingPath.relative_to(pathlib.Path(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def resolve_ref(ref):\n if ref == DIRTY:\n return ref\n try:\n return git_rev_parse(ref)\n except CommandFailure:\n for remote in git_remote():\n try:\n return git_rev_parse('{remote}/{ref}'.format(**locals()))\n except CommandFailure:\n ...
[ "0.7151219", "0.694133", "0.69117504", "0.6790696", "0.6727154", "0.67200303", "0.66987157", "0.6604326", "0.64834887", "0.64398366", "0.6264806", "0.6253427", "0.6241761", "0.6132966", "0.60928077", "0.6074949", "0.6051343", "0.60149103", "0.5935395", "0.59204805", "0.590934...
0.69918907
1
Try to resolve a path as a level within a hierarchical ref.
def resolve_ref_hierarchy(self, path): project, ref, refPrefix = self.resolve_partial_ref_prefix(path) if not ref: return None refTime = iso8601.parse_date(ref.commit['committed_date']).timestamp() return Entity( EntityType.REF_LEVEL, path, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def resolve_path(self, path):\n if path:\n if path[0] == '/':\n #zope objects case\n try: return self.unrestrictedTraverse(path)\n except: pass\n else:\n #aliss (python) objects case\n try: return self.get...
[ "0.68845683", "0.6494105", "0.64544624", "0.611602", "0.60794085", "0.60687786", "0.58192456", "0.57265294", "0.5710625", "0.5643911", "0.5628097", "0.5625242", "0.5588643", "0.5578107", "0.5544796", "0.54888475", "0.54879767", "0.5432573", "0.5405383", "0.54042643", "0.53942...
0.71775824
0
List the first level of refs of a project. If the project contains hierarchical refs then only the first level of those is returned. For example, a repository containing the branches "master", "feature/abc" and "feature/def" will have this function return the list ["master", "feature"].
def list_project_refs(self, entity): refs = [] for ref in self.cache.list_project_refs(entity.objects['project'], self.tagRefs): # If ref name is hierarchical then only return first level if '/' in ref.name: refs.append(ref.name.split('/')[0]) else: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def list_project_ref_hierarchy(self, entity):\n\n refs = []\n\n for ref in self.cache.list_project_refs(entity.objects['project'], self.tagRefs):\n if ref.name.startswith(entity.objects['refPrefix']):\n remainingRefName = pathlib.Path(ref.name).relative_to(pathlib.Path(entit...
[ "0.71141195", "0.6230946", "0.6007423", "0.5812723", "0.57256657", "0.56375396", "0.5635291", "0.5497794", "0.54817456", "0.5463489", "0.54529834", "0.5440121", "0.5424686", "0.54045993", "0.53898203", "0.5383756", "0.53767204", "0.5367718", "0.53592324", "0.53535324", "0.535...
0.7210496
0
List the files and directories in a repository subdirectory.
def list_repository_directory(self, entity): members = [] # There is no directory object if this is the repository root path = '' if 'directory' in entity.objects: path = entity.objects['directory']['path'] for entry in self.cache.get_repository_tree(entity.objects...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def list_dir(self, path):", "def listdir(self, subdir=''):\n\n try:\n subdir = subdir.decode()\n except AttributeError:\n pass\n subdir = subdir.rstrip('\\\\')\n # cmd = '\"%s\" \"%s\" 0 ' % (self.ndc_path, self.filename)\n cmd = [\n self.ndc_pa...
[ "0.72475857", "0.6898686", "0.679878", "0.6662444", "0.6644059", "0.6518236", "0.650587", "0.65055865", "0.6437218", "0.6381191", "0.63552994", "0.6319831", "0.6308276", "0.6297127", "0.6295903", "0.6278944", "0.62660915", "0.62306625", "0.62177086", "0.61986166", "0.6197154"...
0.7076131
1
get position of given number
def __getpos__(self, num): return self.num_to_pos[num]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_position(self, number):\n for rowidx, row in enumerate(self.numbers):\n for colidx, num in enumerate(row):\n if num == number:\n return rowidx, colidx", "def find_next_number(line, pos=0):\n m = number_re.search(line[pos:])\n if m:\n span =...
[ "0.7684351", "0.7131418", "0.700196", "0.69044185", "0.6890738", "0.67569715", "0.6752947", "0.66520596", "0.66395706", "0.66072875", "0.65305483", "0.6527862", "0.6512868", "0.6511938", "0.64501953", "0.6410245", "0.64076304", "0.6384556", "0.6376679", "0.6374092", "0.635429...
0.8127358
0
Depthfirst graph traversal, extracts clumps (nodes) and tunnels (edges). Graph must have at least one point that is a junction.
def find_structure(self): cave_graphs = [] starting_point = None # firse initalize points for point in self.points.values(): neighbors = self.get_neighbors(point) if len(neighbors) != 2 and point.node is None: starting_point = point ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def construct_junction_graph(self) -> Graph[Cell]:\n if self.maze is None:\n raise ValueError('No current maze to construct a junction graph from!')\n\n junction_graph = Graph()\n visited = defaultdict(bool)\n\n def cell_visitor(cell: Cell) -> None:\n visited[cell]...
[ "0.62955743", "0.6218852", "0.60339916", "0.5890118", "0.5873582", "0.5675615", "0.5669391", "0.5656545", "0.56498134", "0.5575273", "0.55740166", "0.55538756", "0.5547625", "0.5546689", "0.55386174", "0.5508685", "0.5503386", "0.5432993", "0.5432737", "0.54099274", "0.539502...
0.63038146
0
This test changes the netbios name of the server and then verifies that this results in the server's domain SID changing. The new SID is stored in a global variable so that we can perform additional tests to verify that SIDs are rewritten properly in group_mapping.tdb. old_netbiosname is stored so that we can reset con...
def test_056_netbios_name_change_check_sid(request): depends(request, ["service_cifs_running"], scope="session") global new_sid global old_netbiosname results = GET("/smb/") assert results.status_code == 200, results.text old_netbiosname = results.json()["netbiosname"] old_sid = results.jso...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_058_change_netbios_name_and_check_groupmap(request):\n depends(request, [\"SID_CHANGED\", \"ssh_password\"], scope=\"session\")\n payload = {\n \"netbiosname\": old_netbiosname,\n }\n results = PUT(\"/smb/\", payload)\n assert results.status_code == 200, results.text\n sleep(5)\n\...
[ "0.7362551", "0.61641616", "0.6045183", "0.60308814", "0.5808337", "0.58069056", "0.5755924", "0.5711386", "0.56862813", "0.5601481", "0.55547637", "0.55288833", "0.5508139", "0.5473006", "0.5441461", "0.5417473", "0.54068434", "0.5388924", "0.5378174", "0.5349858", "0.532144...
0.7686053
0
Create testgroup and verify that groupmap entry generated with new SID.
def test_057_create_new_smb_group_for_sid_test(request): depends(request, ["SID_CHANGED", "ssh_password"], scope="session") global group_id payload = { "name": "testsidgroup", "smb": True, } results = POST("/group/", payload) assert results.status_code == 200, results.text gr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_create_group(self):\n pass", "def test_create_group(self):\n pass", "def test_verify_that_you_can_create_a_new_group():", "def test_create_group(self):\n groupid = 'villains'\n\n # create the group\n resp = self.app.post('/groups', data=json.dumps({'name':groupid})...
[ "0.7478963", "0.7478963", "0.7324722", "0.7320051", "0.698248", "0.6931495", "0.68939006", "0.6839453", "0.68214154", "0.6734239", "0.6696365", "0.6614686", "0.65505034", "0.6506986", "0.6498141", "0.6479654", "0.64630705", "0.6456968", "0.6449117", "0.6447869", "0.6438386", ...
0.81538206
0
Verify that changes to netbios name result in groupmap sid changes.
def test_058_change_netbios_name_and_check_groupmap(request): depends(request, ["SID_CHANGED", "ssh_password"], scope="session") payload = { "netbiosname": old_netbiosname, } results = PUT("/smb/", payload) assert results.status_code == 200, results.text sleep(5) cmd = "midclt call ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_056_netbios_name_change_check_sid(request):\n depends(request, [\"service_cifs_running\"], scope=\"session\")\n global new_sid\n global old_netbiosname\n\n results = GET(\"/smb/\")\n assert results.status_code == 200, results.text\n old_netbiosname = results.json()[\"netbiosname\"]\n ...
[ "0.73724425", "0.63812697", "0.60749346", "0.5786616", "0.5737494", "0.5689937", "0.558545", "0.556925", "0.5448637", "0.5431592", "0.5371331", "0.5291523", "0.52891064", "0.5282398", "0.52451235", "0.523351", "0.52235484", "0.52166736", "0.5215772", "0.5207367", "0.52060276"...
0.8209844
0
Parse a C constant value in decimal or hex. Return None if the input isn't a constant.
def convert_value(value): # print "Attempting to match value: %s" % value m = re.match('^(0(x|X)[0-9a-fA-F]+|[0-9]+)$', value) if m is None: return None value = m.group(1) if value.startswith("0x") or value.startswith("0X"): return int(value[2:], 16) else: return int(value)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_constant(name, libgmt):\n c_get_enum = libgmt.GMT_Get_Enum\n c_get_enum.argtypes = [ctypes.c_char_p]\n c_get_enum.restype = ctypes.c_int\n\n value = c_get_enum(name.encode())\n\n if value is None or value == -99999:\n raise GMTCLibError(\n \"Constant '{}' doesn't exits in l...
[ "0.5632588", "0.5586047", "0.5533818", "0.55302715", "0.5484222", "0.5482968", "0.54275924", "0.5395987", "0.53449136", "0.5325055", "0.52999747", "0.5280379", "0.5259344", "0.52487993", "0.52158546", "0.519826", "0.5152143", "0.51404864", "0.51237184", "0.51235414", "0.51213...
0.56358886
0
This method is called when the handler should emit the record. By default, SocketHandler will silently drop a message if it cannot send it. Because this is not desired in our case, we will use a queue that will act as a buffer if the message is not sent
def emit(self, record): self.buffer.append(record) while len(self.buffer) != 0: nextRecord = self.buffer.popleft() super().emit(nextRecord) if self.sock is None: # If we failed to send the record self.buffer.appendleft(nextRecord) br...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def emit(self, record):\n try:\n # Format: [ [queueMsgID, PID], record ]\n self.queue.put([[config.DUMMYMP_LOG_ID, os.getpid(), self.int_pid], record])\n except:\n # Something went wrong...\n self.handleError(record)", "def handle_write(self):\n #s...
[ "0.6777097", "0.67079544", "0.6660982", "0.66555536", "0.66555536", "0.66555536", "0.6519431", "0.6481583", "0.6451602", "0.64207643", "0.64196646", "0.64065015", "0.6357897", "0.6326828", "0.62853485", "0.6271823", "0.62639964", "0.6251536", "0.6215217", "0.61984706", "0.619...
0.7365688
0
Test case for rest_v20_dd_systems_systemid_stats_capacity_get
def test_rest_v20_dd_systems_systemid_stats_capacity_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_capacity(self, meta, raven_vars, dispatch, t, raw=False):\n return self.get_interaction().get_capacity(meta, raven_vars, dispatch, t, raw=raw)", "def get_capacity():\n fs.get_capacity()", "def test_get_cluster_capacity_monthly_resolution(self):\n url = \"?filter[time_scope_units]=month&fil...
[ "0.6880177", "0.6838495", "0.67628455", "0.6728308", "0.66688097", "0.6290439", "0.62468123", "0.61392134", "0.60665524", "0.6012225", "0.59929657", "0.5983629", "0.5947236", "0.5928955", "0.5917592", "0.59040964", "0.5896049", "0.5859963", "0.58585066", "0.5814054", "0.57612...
0.96901834
0
make node without archiving, create temp table, take full backup, check that temp table not present in backup catalogue
def test_exclude_temp_tables(self): fname = self.id().split('.')[3] backup_dir = os.path.join(self.tmp_path, module_name, fname, 'backup') node = self.make_simple_node(base_dir="{0}/{1}/node".format(module_name, fname), set_replication=True, initdb_params=['--data-checksu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_backup_compact(self):\n gen = BlobGenerator(\"ent-backup\", \"ent-backup-\", self.value_size, end=self.num_items)\n self._load_all_buckets(self.master, gen, \"create\", 0)\n self.backup_create()\n self.backup_cluster_validate()\n self.backup_compact_validate()", "def t...
[ "0.59866905", "0.58030164", "0.566614", "0.55969876", "0.5524487", "0.55036587", "0.5501728", "0.54733956", "0.5441421", "0.53914344", "0.53887075", "0.5378152", "0.53320277", "0.5308021", "0.5263021", "0.5219191", "0.5218431", "0.52177876", "0.5212545", "0.5208883", "0.52000...
0.6901967
0
Checks if this intersatellite link could transmit data (stateindependent).
def couldTransmit(self, data, receiver, txLocation, rxLocation, context): return super(InterSatelliteLink, self).couldTransmit(data, receiver) \ and txLocation.isOrbit() \ and rxLocation.isOrbit() \ and (abs(txLocation.sector - rxLocation.sector) <= 1 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def couldReceive(self, data, transmitter, txLocation, rxLocation, context):\n return super(InterSatelliteLink, self).couldReceive(data, transmitter) \\\n and txLocation.isOrbit() \\\n and rxLocation.isOrbit() \\\n and (abs(txLocation.sector - rxLocation.sector) <...
[ "0.6808816", "0.66868186", "0.64477277", "0.64418393", "0.62366825", "0.61757886", "0.6150189", "0.6097931", "0.60884607", "0.60488987", "0.6041025", "0.60021377", "0.5998871", "0.5975922", "0.5969649", "0.5958305", "0.59526134", "0.59449387", "0.5935071", "0.592336", "0.5916...
0.76803
0
Checks if this intersatellite link could receive data (stateindependent).
def couldReceive(self, data, transmitter, txLocation, rxLocation, context): return super(InterSatelliteLink, self).couldReceive(data, transmitter) \ and txLocation.isOrbit() \ and rxLocation.isOrbit() \ and (abs(txLocation.sector - rxLocation.sector) <= 1 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def DataAvailable(self) -> bool:", "def data_available(self):\n return (self.status & 0x08) != 0", "def couldTransmit(self, data, receiver, txLocation, rxLocation, context):\n return super(InterSatelliteLink, self).couldTransmit(data, receiver) \\\n and txLocation.isOrbit() \\\n ...
[ "0.6806446", "0.666152", "0.6657909", "0.6534576", "0.65277207", "0.65100396", "0.6355405", "0.63156337", "0.63156337", "0.6288527", "0.6234863", "0.62215567", "0.61767733", "0.61651605", "0.61578643", "0.6138238", "0.60690147", "0.6063522", "0.60616744", "0.60542154", "0.603...
0.71264654
0
The basic idea here is to represent the file contents as a long string and iterate through it characterbycharacter (the 'ind' variable points to the current character). Whenever we get to a new tree, we call the function again (recursively) to read it in.
def readTree(text, ind, verbose=False): if verbose: print("Reading new subtree", text[ind:][:10]) # consume any spaces before the tree while text[ind].isspace(): ind += 1 if text[ind] == "(": if verbose: print("Found open paren") tree = [] ind += 1 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def traverse_tree(file, tree):\n\n\tfor node in tree.get_children():\n\t\tpass", "def fileparse(filename, node):\n\n fd = open(filename)\n line = fd.readline().strip('\\r\\n')\n\n while line != '':\n node.Add(line, node)\n line = fd.readline().strip('\\r\\n')", "def read_file_into_tree(f...
[ "0.57345337", "0.5500208", "0.54999906", "0.54994", "0.54745203", "0.53851414", "0.5351733", "0.5224818", "0.5221484", "0.5204018", "0.5189784", "0.51858944", "0.51852345", "0.5182749", "0.51462406", "0.51426816", "0.5098841", "0.50946444", "0.50844306", "0.50804096", "0.5069...
0.6211928
0
queries the given url and places in the params and headers into the request if present.
def query(url, params=None, headers_param=None): if params is None: params = {} logging.info("url={0}\tparams={1}".format(url, params)) headers = { 'Referer': url, "Content-Type": "text/xml; charset=UTF-8", # implement after checking if this doesn't kill the other scripts 'U...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def query(url):", "def request(url, headers, params, method=\"GET\"):\n url = UrlManipulation.replace_query_params(url, **params)\n logger.debug(f\"request(): {method} {url}\")\n req = urllib.request.Request(url, headers=headers, method=method)\n try:\n with urllib.request....
[ "0.71451706", "0.64857244", "0.6369296", "0.6307592", "0.63027126", "0.61929387", "0.6177525", "0.6103905", "0.60760415", "0.6020824", "0.60137224", "0.597998", "0.59702086", "0.5964929", "0.59598595", "0.5957351", "0.5942728", "0.59328884", "0.59190345", "0.59136254", "0.586...
0.6601044
1
Make the functions for adding filters and add them to the namespace automatically.
def _make_functions(namespace): for fil in registry.filters: func_name = camel2enthought(fil.id) class_name = fil.id if func_name.endswith('_filter'): func_name = func_name[:-7] class_name = class_name[:-6] class_name = class_name + 'Factory' # Don't ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_custom_filters(environment):\n\n # TODO deprecate ipaddr_index and netmask for the better ipnet ones\n filter_list = {\n 'dpkg_arch': filter_dpkg_arch,\n 'storage_size_num': filter_storage_size_num,\n 'ipnet_hostaddr': filter_ipnet_hostaddr,\n 'ipnet_hostmin': filter_ipne...
[ "0.6854986", "0.65905815", "0.6556149", "0.6516991", "0.6503513", "0.6503041", "0.649308", "0.64256465", "0.6318187", "0.6257711", "0.62176806", "0.6180177", "0.61334944", "0.6132359", "0.6121357", "0.61159486", "0.6114769", "0.609798", "0.6030215", "0.6022262", "0.6016461", ...
0.7930712
0
Sends start cmd to RPKI Validator
def _start_validator(self): logging.info("Starting RPKI Validator") utils.run_cmds((f"cd {self.rpki_package_path} && " f"./{self.rpki_run_name}"))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def start_execution(self):\n self.send_message(\"control.start\",None)", "async def start_validators(self):\n if self.is_client():\n return\n\n await sleep(random.random() * 3)\n\n cmd = \"/home/martijn/stellar-core/stellar-core run\"\n out_file = open(\"stellar.out\...
[ "0.6607596", "0.6571173", "0.6326597", "0.6210207", "0.6210207", "0.6210207", "0.6210207", "0.6158169", "0.613642", "0.6122255", "0.60959846", "0.6072968", "0.60660356", "0.60612607", "0.60051334", "0.5982089", "0.5948722", "0.592256", "0.589133", "0.58726084", "0.5835454", ...
0.74625295
0
Loads all trust anchors
def load_trust_anchors(self): utils.write_to_stdout(f"{datetime.now()}: Loading RPKI Validator\n", logging.root.level) time.sleep(60) while self._get_validation_status() is False: time.sleep(10) utils.write_to_stdout(".", logging.root.level)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FullTrustAssemblies(self) -> _n_1_t_2:", "def UserApplicationTrusts(self) -> ApplicationTrustCollection:", "def FullTrustAssemblies(self) -> _n_2_t_0[StrongName]:", "def ApplicationTrustManager(self) -> IApplicationTrustManager:", "def load_verify_locations(self, cafile: Optional[Any] = ..., dummy: Opt...
[ "0.6452937", "0.6358674", "0.6343231", "0.60823315", "0.60078466", "0.5811615", "0.5778859", "0.5626693", "0.5504848", "0.54254216", "0.54251266", "0.54206556", "0.53962106", "0.53946304", "0.53521353", "0.53237087", "0.5316759", "0.53055185", "0.5273949", "0.5269059", "0.516...
0.72097015
0
Returns the validity dict for the RPKI Validator to decode results I could have this as a class attribute but too messy I think.
def get_validity_dict() -> dict: return {"VALID": ROA_Validity.VALID.value, "UNKNOWN": ROA_Validity.UNKNOWN.value, "INVALID_LENGTH": ROA_Validity.INVALID_BY_LENGTH.value, "INVALID_ASN": ROA_Validity.INVALID_BY_ORIGIN.value}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_validate(self) -> dict:\n response = self.rc.execute(\"GET\",\n self._get_uri(GET_VALIDATE_URI),\n headers=self.header,\n verify=self.verify)\n return response.json()", "def getKrustyValidi...
[ "0.68762314", "0.65788156", "0.6511472", "0.63827586", "0.6343963", "0.62334585", "0.6198675", "0.6181131", "0.6175592", "0.61523205", "0.6139875", "0.61204463", "0.6046817", "0.6017709", "0.5970631", "0.59177464", "0.58760285", "0.5810927", "0.57986134", "0.5791891", "0.5789...
0.7998628
0
Installs RPKI validator with our configs. This might break in the future, but we need to do it this way for now to be able to do what we want with our own prefix origin table.
def install(**kwargs): config_logging(kwargs.get("stream_level", logging.DEBUG), kwargs.get("section")) utils.delete_paths([RPKI_Validator_Wrapper.rpki_package_path, RPKI_Validator_Wrapper.temp_install_path]) RPKI_Validator_Wrapper._download_v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _start_validator(self):\n\n logging.info(\"Starting RPKI Validator\")\n utils.run_cmds((f\"cd {self.rpki_package_path} && \"\n f\"./{self.rpki_run_name}\"))", "def _download_validator():\n\n rpki_url = (\"https://ftp.ripe.net/tools/rpki/validator3/beta/generic/\"\n...
[ "0.63697255", "0.5358504", "0.5253388", "0.5171715", "0.5128011", "0.50729746", "0.5013778", "0.4977327", "0.49645743", "0.48654142", "0.48506802", "0.484606", "0.47760716", "0.46838087", "0.4675308", "0.4669454", "0.46684492", "0.46496302", "0.4635433", "0.46273148", "0.4615...
0.6363485
1
Downloads validator into proper location
def _download_validator(): rpki_url = ("https://ftp.ripe.net/tools/rpki/validator3/beta/generic/" "rpki-validator-3-latest-dist.tar.gz") arin_tal = ("https://www.arin.net/resources/manage/rpki/" "arin-ripevalidator.tal") # This is the java version they us...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _download(self):\n self._system.download(\"http://geant4.web.cern.ch/geant4/support/source/\" + self._tar_name)", "def main():\n sandbox = create_sandbox()\n directory = download_package_to_sandbox(\n sandbox,\n 'https://pypi.python.org/packages/source/c/checkmyreqs/checkmyreqs-0.1...
[ "0.5852008", "0.5642754", "0.5526515", "0.5338583", "0.53289795", "0.5327149", "0.5300025", "0.5300025", "0.52865535", "0.52240986", "0.522238", "0.51255095", "0.51255095", "0.51233405", "0.5114986", "0.5091691", "0.5079647", "0.5037147", "0.5001166", "0.49831185", "0.4979095...
0.7724067
0
Configure rpki validator to run off absolute paths This is necessary due to script being called from elsewhere In other words not from inside the RPKI dir.
def _config_absolute_paths(path): # Since I am calling the script from elsewhere these must be # absolute paths prepend = "rpki.validator.data.path=" replace = "." # Must remove trailing backslash at the end replace_with = RPKI_Validator_Wrapper.rpki_package_path[:-1] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def validate_paths(self):\n # When we're started with a *.qemuboot.conf arg assume that image\n # artefacts are relative to that file, rather than in whatever\n # directory DEPLOY_DIR_IMAGE in the conf file points to.\n if self.qbconfload:\n imgdir = os.path.realpath(os.path....
[ "0.56588614", "0.54540795", "0.5439257", "0.5435881", "0.5407553", "0.53129953", "0.5268416", "0.52518916", "0.5166516", "0.5107923", "0.5076477", "0.5066876", "0.5058214", "0.50226915", "0.49473757", "0.49465066", "0.49405462", "0.49361816", "0.4921926", "0.48854834", "0.486...
0.71353936
0
Retrieves an xy slice at a wavelength specified by the cube's primary wavelength plus the given offset.
def _choose_wavelength_slice(self, offset): if 'WAVE' not in self.axes_wcs.wcs.ctype: raise cu.CubeError(2, "Spectral dimension not present") if self.data.ndim == 4: raise cu.CubeError(4, "Can only work with 3D cubes") axis = -2 if self.axes_wcs.wcs.ctype[0] in ['TIME', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _choose_x_slice(self, offset):\n arr = None\n axis = 0\n length = self.data.shape[axis]\n if isinstance(offset, int) and offset >= 0 and offset < length:\n arr = self.data.take(offset, axis=axis)\n\n if isinstance(offset, u.Quantity):\n unit = self.axes_...
[ "0.6906233", "0.60154533", "0.57687914", "0.56916517", "0.5654022", "0.55755776", "0.55728334", "0.55718255", "0.5528963", "0.5498326", "0.54335445", "0.5349252", "0.53329015", "0.5331418", "0.53038037", "0.52538073", "0.52528626", "0.52475715", "0.5232891", "0.52242994", "0....
0.67115897
1
Retrieves a lambday slice at an x coordinate specified by the cube's primary wavelength plus the given offset.
def _choose_x_slice(self, offset): arr = None axis = 0 length = self.data.shape[axis] if isinstance(offset, int) and offset >= 0 and offset < length: arr = self.data.take(offset, axis=axis) if isinstance(offset, u.Quantity): unit = self.axes_wcs.wcs.cunit...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _choose_wavelength_slice(self, offset):\n if 'WAVE' not in self.axes_wcs.wcs.ctype:\n raise cu.CubeError(2, \"Spectral dimension not present\")\n if self.data.ndim == 4:\n raise cu.CubeError(4, \"Can only work with 3D cubes\")\n\n axis = -2 if self.axes_wcs.wcs.ctype[...
[ "0.63117456", "0.5793032", "0.5629141", "0.5089525", "0.5078301", "0.506176", "0.50505126", "0.5043352", "0.49999565", "0.49748117", "0.4926123", "0.49144813", "0.49112678", "0.4907331", "0.48990658", "0.48967353", "0.4890172", "0.4886623", "0.48143712", "0.4807352", "0.47636...
0.61754596
1
Converts a given frequency chunk to a SunPy Map. Extra parameters are passed on to Map.
def slice_to_map(self, chunk, snd_dim=None, *args, **kwargs): if self.axes_wcs.wcs.ctype[1] == 'WAVE' and self.data.ndim == 3: error = "Cannot construct a map with only one spatial dimension" raise cu.CubeError(3, error) if isinstance(chunk, tuple): item = slice(cu.pi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _createMap(self):\n width = self.map_size[0] * self.chunk_size\n height = self.map_size[1] * self.chunk_size\n map_array = np.zeros((height, width), dtype=float)\n chunks = {}\n clist = []\n for i in range(0, self.map_size[0]*self.map_size[1]):\n chunks[i+1]...
[ "0.57270765", "0.5564925", "0.5475267", "0.54156667", "0.54104096", "0.5340992", "0.52815837", "0.51907945", "0.51874447", "0.51529014", "0.5140967", "0.51343143", "0.50851405", "0.5076608", "0.5042034", "0.5038399", "0.5007617", "0.5004075", "0.4992073", "0.49909553", "0.498...
0.6020252
0
For a timelambday cube, returns a lightcurve with curves at the specified wavelength and given ycoordinate. If no y is given, all of them will be used (meaning the lightcurve object could contain more than one timecurve.)
def slice_to_lightcurve(self, wavelength, y_coord=None, x_coord=None): if self.axes_wcs.wcs.ctype[0] not in ['TIME', 'UTC']: raise cu.CubeError(1, 'Cannot create a lightcurve with no time axis') if self.axes_wcs.wcs.ctype[1] != 'WAVE': raise cu.Cube...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def lightCurve(self, time, filters):\n\n lcMags = np.zeros(time.size, dtype=float)\n\n rise = np.where(time <= self.peakTime)\n lcMags[rise] += self.riseSlope*time[rise]-self.riseSlope*self.peakTime\n decline = np.where(time > self.peakTime)\n lcMags[decline] += self.declineSlope...
[ "0.5951895", "0.5928167", "0.5583655", "0.55513257", "0.54969233", "0.5486457", "0.5382974", "0.5276939", "0.5214253", "0.5212705", "0.51789206", "0.5082815", "0.50349635", "0.49946722", "0.4969627", "0.49492365", "0.4941575", "0.49127588", "0.4905105", "0.490314", "0.4884597...
0.61594796
0
For a cube containing a spectral dimension, returns a sunpy spectrum. The given coordinates represent which values to take. If they are None, then the corresponding axis is summed.
def slice_to_spectrum(self, *coords, **kwargs): if 'WAVE' not in self.axes_wcs.wcs.ctype: raise cu.CubeError(2, 'Spectral axis needed to create a spectrum') axis = -1 if self.axes_wcs.wcs.ctype[0] == 'WAVE' else -2 pixels = [cu.pixelize(coord, self.axes_wcs, axis) for coord in coords...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def convert_to_spectral_cube(self):\n if self.data.ndim == 4:\n raise cu.CubeError(4, \"Too many dimensions: Can only convert a \" +\n \"3D cube. Slice the cube before converting\")\n if 'WAVE' not in self.axes_wcs.wcs.ctype:\n raise cu.CubeError(2,...
[ "0.6098314", "0.57695895", "0.56967276", "0.5517648", "0.5394993", "0.5346096", "0.5340599", "0.52352476", "0.5234346", "0.52302986", "0.52094436", "0.52033246", "0.5161801", "0.5134656", "0.50857544", "0.5084157", "0.50615275", "0.5031639", "0.49863473", "0.49710125", "0.496...
0.62595874
0
For a timelambday cube, given a ycoordinate, returns a sunpy spectrogram. Keyword arguments are passed on to Spectrogram's __init__.
def slice_to_spectrogram(self, y_coord, x_coord=None, **kwargs): if self.axes_wcs.wcs.ctype[0] not in ['TIME', 'UTC']: raise cu.CubeError(1, 'Cannot create a spectrogram with no time axis') if self.axes_wcs.wcs.ctype[1] != 'WAVE': raise cu.CubeError...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mel_spectrogram(self, y):\n # assert(torch.min(y.data) >= -1)\n # assert(torch.max(y.data) <= 1)\n\n magnitudes, phases = self.stft_fn.transform(y)\n # magnitudes = magnitudes.data\n mel_output = torch.matmul(self.mel_basis, magnitudes)\n mel_output = self.spectral_nor...
[ "0.62373495", "0.61111325", "0.5878095", "0.5321949", "0.52246", "0.52145845", "0.51144654", "0.50932705", "0.5055656", "0.50293887", "0.50188696", "0.50037694", "0.49115393", "0.4873337", "0.4850232", "0.48383042", "0.48147768", "0.4789717", "0.4733066", "0.4707515", "0.4701...
0.6674686
0
For a hypercube, return a 3D cube that has been cut along the given axis and with data corresponding to the given chunk.
def slice_to_cube(self, axis, chunk, **kwargs): if self.data.ndim == 3: raise cu.CubeError(4, 'Can only slice a hypercube into a cube') item = [slice(None, None, None) for _ in range(4)] if isinstance(chunk, tuple): if cu.iter_isinstance(chunk, (u.Quantity, u.Quantity)):...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def explode_along_axis(self, axis):\n # If axis is -ve then calculate the axis from the length of the dimensions of one cube\n if axis < 0:\n axis = len(self.dimensions) + axis\n # To store the resultant cube\n result_cubes = []\n # All slices are initially initialised...
[ "0.63870597", "0.61239403", "0.60539335", "0.5832195", "0.57542986", "0.56327647", "0.559867", "0.5501042", "0.5500518", "0.5481983", "0.5481307", "0.54722977", "0.5436329", "0.53984386", "0.53860784", "0.53848904", "0.53785336", "0.5359201", "0.5354345", "0.5327404", "0.5268...
0.83219737
0
Converts this cube into a SpectralCube. It will only work if the cube has exactly three dimensions and one of those is a spectral axis.
def convert_to_spectral_cube(self): if self.data.ndim == 4: raise cu.CubeError(4, "Too many dimensions: Can only convert a " + "3D cube. Slice the cube before converting") if 'WAVE' not in self.axes_wcs.wcs.ctype: raise cu.CubeError(2, 'Spectral axi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def spectral_model(self):\n d = self.data\n spec_type = d['SpectrumType'].strip()\n pars, errs = {}, {}\n pars['amplitude'] = d['Flux_Density']\n errs['amplitude'] = d['Unc_Flux_Density']\n pars['reference'] = d['Pivot_Energy']\n\n if spec_type == 'PowerLaw':\n ...
[ "0.6274869", "0.6003347", "0.5845092", "0.5763128", "0.56499904", "0.55344087", "0.55215806", "0.5233117", "0.5228521", "0.5198386", "0.5195983", "0.51448613", "0.51295257", "0.5123832", "0.5117463", "0.51086575", "0.50924385", "0.50752395", "0.50532764", "0.50532764", "0.505...
0.8686489
0
Returns a numpy array containing the time values for the cube's time dimension, as well as the unit used.
def time_axis(self): if self.axes_wcs.wcs.ctype[0] not in ['TIME', 'UTC']: raise cu.CubeError(1, 'No time axis present') delta = self.axes_wcs.wcs.cdelt[0] crpix = self.axes_wcs.wcs.crpix[0] crval = self.axes_wcs.wcs.crval[0] start = crval - crpix * delta stop...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def time(self):\n return self.time_array", "def time_axis_array(self):\n return self._time_axis.get_array()", "def arr_time(self):\n return self._arr_time", "def times(self):\n if self._times is None:\n self._times = np.zeros((self.ntimestep), dtype=np.float64)\n ...
[ "0.7211374", "0.6856966", "0.68256146", "0.67285633", "0.65972865", "0.6441097", "0.63960433", "0.6338288", "0.6300424", "0.6298656", "0.6298656", "0.62866175", "0.62780577", "0.62295645", "0.6061472", "0.6057796", "0.6039089", "0.60030895", "0.5996386", "0.59960365", "0.5991...
0.6944582
1
Returns whether the wcs system and the array are wellaligned.
def _array_is_aligned(self): rot_matrix = self.axes_wcs.wcs.pc return np.allclose(rot_matrix, np.eye(self.axes_wcs.wcs.naxis))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isaligned(a: np.ndarray, alignment: int) -> bool:\n return (a.ctypes.data % alignment) == 0", "def is_aligned(self):\n\n return self._bits == 0", "def has_wcs(self):\n if self.header is None:\n return False\n\n required = 'CRPIX,CRVAL,CTYPE'.split(',')\n keywords =...
[ "0.6622194", "0.66116005", "0.64189285", "0.629337", "0.6231566", "0.62093145", "0.61557496", "0.61207116", "0.5808725", "0.57705253", "0.5653776", "0.5611747", "0.5607932", "0.5607731", "0.55909234", "0.5550369", "0.5533875", "0.55202824", "0.54235834", "0.5402072", "0.53951...
0.74039537
0
parse case excel file.
def manual_case_parser(self): data = self.excel_parser() result = self.process_module_field(data) self.add_class_name_field(result) self.process_multi_step_field(result) return result
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_parse_sample_sheet(self):\n pass", "def parse_ra():\r\n fname = 'parse/File1.xlsx'\r\n sheet_name = 'Sheet1'\r\n\r\n ra_sheet = get_sheet(fname, sheet_name)\r\n return parse_sheet(ra_sheet)", "def parse_xlsx(filename):\n from openpyxl import load_workbook\n\n workbook = load_w...
[ "0.66888124", "0.6109369", "0.61021197", "0.60966265", "0.5916426", "0.589535", "0.58326924", "0.5774381", "0.56844836", "0.5633092", "0.5630392", "0.56159174", "0.56018525", "0.55881256", "0.55868655", "0.55625945", "0.55516446", "0.55497164", "0.5522616", "0.55121005", "0.5...
0.67918974
0
Add the "ClassName" filed.
def add_class_name_field(data): for case in data: case_id = case['No.'] filed_list = case_id.split('_') filed_list = list(map(lambda x: x.title(), filed_list)) case['ClassName'] = ''.join(filed_list)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setClassName(self,whichDir):\n self.className = whichDir\n self.setClassMap({whichDir : 1})", "def addClassRef(clazz):\n\n global h_classes\n header = \"class %s;\" % clazz\n if not header in h_classes:\n h_classes.append(header)", "def add_class(self, name):\n if name ...
[ "0.6673873", "0.65873694", "0.65540683", "0.65310895", "0.62807566", "0.61844677", "0.61496955", "0.61109734", "0.60883236", "0.5851665", "0.5794981", "0.57527643", "0.57015514", "0.56917053", "0.5677711", "0.5670707", "0.566091", "0.56086993", "0.55906165", "0.55896807", "0....
0.69511896
0
Validation of the implementaiton of periodic angle axis in Magnetic (MagFEMM) and Force (ForceMT) modules
def test_FEMM_periodicity_angle(): SPMSM_015 = load(join(DATA_DIR, "Machine", "SPMSM_015.json")) assert SPMSM_015.comp_periodicity() == (9, False, 9, True) simu = Simu1(name="test_FEMM_periodicity_angle", machine=SPMSM_015) # Definition of the enforced output of the electrical module I0_rms = 25...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_mag_form_fac_case1():\n ion = MagneticFormFactor('Fe')\n formfac, _temp = ion.calc_mag_form_fac()[0], ion.calc_mag_form_fac()[1:]\n del _temp\n assert (abs(np.sum(formfac) - 74.155233575216599) < 1e-12)", "def test_mag_form_fac():\n ion = MagneticFormFactor('Fe')\n formfac, _temp = ion...
[ "0.60290766", "0.6012614", "0.58263516", "0.5755218", "0.56348616", "0.56247103", "0.5583029", "0.5559526", "0.55149376", "0.54994637", "0.5498538", "0.54675615", "0.5454319", "0.5441296", "0.54299664", "0.5414825", "0.54081666", "0.53792536", "0.53736025", "0.53621024", "0.5...
0.6782517
0
Set the RGB value, and optionally brightness, of a single pixel. If you don't supply a brightness value, the last value will be kept.
def set_pixel(x, r, g, b, brightness=None): if brightness is None: brightness = pixels[x][3] else: brightness = int(float(MAX_BRIGHTNESS) * brightness) & 0b11111 pixels[x] = [int(r) & 0xff, int(g) & 0xff, int(b) & 0xff, brightness]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_pixel(self, frame, index, brightness):\n if brightness > 255 or brightness < 0:\n raise ValueError('Value {} out of range. Brightness must be between 0 and 255'.format(brightness))\n\n if index < 0 or index > 143:\n raise ValueError('Index must be between 0 and 143')\n\n...
[ "0.7257801", "0.70964503", "0.7078613", "0.69361275", "0.69103754", "0.6849395", "0.68239653", "0.6787617", "0.67320323", "0.670798", "0.6697311", "0.6621259", "0.65958184", "0.6595451", "0.6569934", "0.6569934", "0.6561587", "0.6554602", "0.653843", "0.6494485", "0.6490676",...
0.7723842
0
Waits for wait_seconds seconds before setting stop_signal.
def sleep_and_set_stop_signal_task(stop_signal, wait_seconds): timer = Timer(wait_seconds, stop_signal.set) timer.daemon = True timer.start()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wait(self, seconds):\n time.sleep(seconds)", "def wait_for_seconds(self, seconds, sleeptime=0.001):\n self.listen_until_return(timeout=seconds, sleeptime=sleeptime)", "def wait (self, seconds=0.0):\r\n\t\tstart_time = time.time()\r\n\t\twhile time.time() < start_time + seconds:\r\n\t\t\tself....
[ "0.70341736", "0.69638157", "0.6919327", "0.69169587", "0.6484378", "0.64468855", "0.63162977", "0.6311919", "0.6281869", "0.62770647", "0.62602526", "0.62214833", "0.62033594", "0.6187091", "0.6172887", "0.6160744", "0.61564934", "0.61425143", "0.6129257", "0.6078051", "0.60...
0.74198914
0
Duplicate one to one fields.
def __duplicate_o2o_fields(self, duplicate): for f in self._meta.related_objects: if f.one_to_one: if any( [ f.name in self._clone_o2o_fields and f not in self._meta.concrete_fields, self._clo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __duplicate_m2o_fields(self, duplicate):\n fields = set()\n\n for f in self._meta.concrete_fields:\n if f.many_to_one:\n if any(\n [\n f.name in self._clone_m2o_or_o2m_fields,\n self._clone_excluded_m2o_or_...
[ "0.6707461", "0.6674422", "0.65932596", "0.6507167", "0.5882289", "0.5850159", "0.5838307", "0.57841384", "0.5691724", "0.55239975", "0.54606026", "0.5400994", "0.5379366", "0.53540444", "0.53528345", "0.5347377", "0.53058666", "0.53031313", "0.5300691", "0.5285195", "0.52776...
0.6830732
0
Duplicate one to many fields.
def __duplicate_o2m_fields(self, duplicate): fields = set() for f in self._meta.related_objects: if f.one_to_many: if any( [ f.get_accessor_name() in self._clone_m2o_or_o2m_fields, self._clone_excluded_m2o_o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __duplicate_m2o_fields(self, duplicate):\n fields = set()\n\n for f in self._meta.concrete_fields:\n if f.many_to_one:\n if any(\n [\n f.name in self._clone_m2o_or_o2m_fields,\n self._clone_excluded_m2o_or_...
[ "0.75518346", "0.716638", "0.7029186", "0.6424519", "0.615692", "0.5902748", "0.580661", "0.57859975", "0.5785186", "0.5717907", "0.5689", "0.56443495", "0.56256235", "0.55974805", "0.55747044", "0.5503478", "0.5490743", "0.5467568", "0.53609717", "0.5352907", "0.53502095", ...
0.74103355
1
Duplicate many to one fields.
def __duplicate_m2o_fields(self, duplicate): fields = set() for f in self._meta.concrete_fields: if f.many_to_one: if any( [ f.name in self._clone_m2o_or_o2m_fields, self._clone_excluded_m2o_or_o2m_fields ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __duplicate_o2m_fields(self, duplicate):\n fields = set()\n\n for f in self._meta.related_objects:\n if f.one_to_many:\n if any(\n [\n f.get_accessor_name() in self._clone_m2o_or_o2m_fields,\n self._clone_e...
[ "0.73184913", "0.717969", "0.69729894", "0.62483776", "0.6107792", "0.58588886", "0.58578765", "0.58333975", "0.57033503", "0.5657808", "0.5648944", "0.563969", "0.54837763", "0.54219484", "0.5397397", "0.5392138", "0.5375547", "0.5354627", "0.5337015", "0.5312537", "0.527723...
0.7469325
0
Duplicate many to many fields.
def __duplicate_m2m_fields(self, duplicate): fields = set() for f in self._meta.many_to_many: if any( [ f.name in self._clone_m2m_fields, self._clone_excluded_m2m_fields and f.name not in self._clone_excluded_m2m_fi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __duplicate_m2o_fields(self, duplicate):\n fields = set()\n\n for f in self._meta.concrete_fields:\n if f.many_to_one:\n if any(\n [\n f.name in self._clone_m2o_or_o2m_fields,\n self._clone_excluded_m2o_or_...
[ "0.71822715", "0.6938308", "0.6353612", "0.618208", "0.6114017", "0.6109971", "0.5827082", "0.5766371", "0.5740473", "0.57385474", "0.56653893", "0.5664595", "0.56420845", "0.55645937", "0.55632085", "0.5549489", "0.547048", "0.54265815", "0.53681564", "0.5348527", "0.5340041...
0.7390873
0
Sets the business_account of this UserResponse.
def business_account(self, business_account): self._business_account = business_account
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def business_id(self, business_id):\n\n self._business_id = business_id", "def business_email(self, business_email):\n\n self._business_email = business_email", "def business_owner(self, business_owner):\n\n self._business_owner = business_owner", "def business_phone(self, business_phone...
[ "0.68295044", "0.6694788", "0.65968657", "0.64488673", "0.63704747", "0.61454445", "0.60893625", "0.58178234", "0.58178234", "0.5807157", "0.5681304", "0.5420851", "0.5420851", "0.5420851", "0.5420851", "0.53558195", "0.5355273", "0.53436404", "0.5324513", "0.52895993", "0.52...
0.8394445
0
Sets the individual_account of this UserResponse.
def individual_account(self, individual_account): self._individual_account = individual_account
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setAccount(self, account_id):\n self.data_struct['_setAccount'] = account_id", "def set_account(self, account: str):\n ret = self._call_txtrader_api('set_account', {'account': account})\n if ret:\n self.account = account\n return ret", "def account(self, account):\n\n...
[ "0.6242222", "0.62353134", "0.6195874", "0.6195874", "0.6195874", "0.6195874", "0.6064232", "0.6054456", "0.599", "0.5941063", "0.59252465", "0.58991206", "0.5867289", "0.5867289", "0.5867289", "0.5867289", "0.5867289", "0.5867289", "0.58530086", "0.56883174", "0.5645553", ...
0.80935436
0
Sets the registration_marketplace_id of this UserResponse.
def registration_marketplace_id(self, registration_marketplace_id): self._registration_marketplace_id = registration_marketplace_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def marketplace_id(self, marketplace_id):\n\n self._marketplace_id = marketplace_id", "def put(self, **kwargs):\n contract = {\n \"pushRegKey\": [\"id\",\"+\"]\n }\n try:\n self.check_params_conform(contract)\n except ValidatorException:\n retur...
[ "0.65472084", "0.563777", "0.5593157", "0.55648047", "0.5374765", "0.52975535", "0.52847886", "0.52847886", "0.52847886", "0.52847886", "0.52847886", "0.52847886", "0.52847886", "0.52847886", "0.52847886", "0.52847886", "0.52847886", "0.52847886", "0.52847886", "0.52847886", ...
0.7918989
0
Convert a pygame surface into string
def surface_to_string( surface ): return pygame.image.tostring( surface, 'RGB' )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pygame_to_cvimage( surface ):\n cv_image = cv.CreateImageHeader( surface.get_size(), cv.IPL_DEPTH_8U, 3 )\n image_string = surface_to_string( surface )\n cv.SetData( cv_image, image_string )\n return cv_image", "def grabRawFrame(self):\r\n \r\n self.surface = self.capture.get_image(...
[ "0.6516572", "0.6308944", "0.59656525", "0.5701781", "0.552377", "0.5499506", "0.54991174", "0.54027945", "0.53784376", "0.5358556", "0.53564054", "0.5315486", "0.5277987", "0.5269198", "0.526664", "0.5256117", "0.52520627", "0.52384955", "0.52231586", "0.5221528", "0.5211215...
0.9001708
0
Convert a pygame surface into a cv image
def pygame_to_cvimage( surface ): cv_image = cv.CreateImageHeader( surface.get_size(), cv.IPL_DEPTH_8U, 3 ) image_string = surface_to_string( surface ) cv.SetData( cv_image, image_string ) return cv_image
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cvimage_to_pygame( image ):\n #image_rgb = cv.CreateMat(image.height, image.width, cv.CV_8UC3)\n #cv.CvtColor(image, image_rgb, cv.CV_BGR2RGB)\n return pygame.image.frombuffer( image.tostring(), cv.GetSize( image ), \"P\" )", "def grabRawFrame(self):\r\n \r\n self.surface = self.captur...
[ "0.7807069", "0.64404505", "0.64314246", "0.6241736", "0.6146377", "0.6104478", "0.5927644", "0.5911911", "0.5818782", "0.58139366", "0.57531345", "0.5712382", "0.56956905", "0.5679619", "0.5668957", "0.5600549", "0.55530584", "0.55383086", "0.5536562", "0.5504997", "0.550327...
0.87929255
0
Convert cvimage into a pygame image
def cvimage_to_pygame( image ): #image_rgb = cv.CreateMat(image.height, image.width, cv.CV_8UC3) #cv.CvtColor(image, image_rgb, cv.CV_BGR2RGB) return pygame.image.frombuffer( image.tostring(), cv.GetSize( image ), "P" )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pygame_to_cvimage( surface ):\n cv_image = cv.CreateImageHeader( surface.get_size(), cv.IPL_DEPTH_8U, 3 )\n image_string = surface_to_string( surface )\n cv.SetData( cv_image, image_string )\n return cv_image", "def input_image():\r\n im = cv2.imread('im7.png')\r\n return im", "def conver...
[ "0.8005469", "0.6535097", "0.64916354", "0.6398854", "0.63530976", "0.62878424", "0.6284432", "0.6251695", "0.6217127", "0.61710984", "0.6155203", "0.6151461", "0.61286163", "0.6122457", "0.610725", "0.6069343", "0.6057519", "0.6040793", "0.6013767", "0.6012021", "0.59809417"...
0.87341195
0
Converts a cvimage into grayscale
def cvimage_grayscale( cv_image ): grayscale = cv.CreateImage( cv.GetSize( cv_image ), 8, 1 ) cv.CvtColor( cv_image, grayscale, cv.CV_RGB2GRAY ) return grayscale
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def grayscale_image(input_image):\n return cv2.cvtColor(input_image, cv2.COLOR_BGR2GRAY)", "def convert_to_gray(image):\n return cv2.cvtColor(image, cv2.COLOR_RGB2GRAY)", "def grayscale(img):\n return cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)", "def grayscale(img):\n return cv2.cvtColor(img, cv2.COLO...
[ "0.8324178", "0.82224435", "0.8202237", "0.8202237", "0.8202237", "0.8202237", "0.81656337", "0.79627913", "0.79627913", "0.79627913", "0.79627913", "0.79627913", "0.79627913", "0.79627913", "0.79627913", "0.79627913", "0.79627913", "0.7926543", "0.79139477", "0.7773947", "0....
0.86633444
0
Return the last gfxinfo dump from the frame collector's raw output.
def gfxinfo_get_last_dump(filepath): record = '' with open(filepath, 'r') as fh: fh_iter = _file_reverse_iter(fh) try: while True: buf = next(fh_iter) ix = buf.find('** Graphics') if ix >= 0: return buf[ix:] + record...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def frame(self):\n try:\n AppHelper.runConsoleEventLoop(installInterrupt=True)\n return str(self._delegate.frame.representations()[0].TIFFRepresentation().bytes())\n except:\n return None", "def grabRawFrame(self):\r\n \r\n self.surface = self.capture....
[ "0.64934605", "0.61334354", "0.6007916", "0.5989006", "0.5923391", "0.58175516", "0.5735115", "0.5702237", "0.5687114", "0.56412464", "0.5596677", "0.55304444", "0.54142034", "0.53991956", "0.539123", "0.5387218", "0.53756607", "0.5365995", "0.5358634", "0.5358058", "0.532298...
0.70381945
0
Return the instantaneous average velocity averaged over all cars
def global_average_speed(cars): velocities = [car.velocity for car in cars] average_speed = sum(velocities)/len(cars) return average_speed
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def class_average_speed(cars):\n # Sort by class name\n class_sorted = sorted(cars, key=lambda car: type(car).__name__)\n class_velocities = []\n class_names = []\n # Group the cars of same class and average their velocities, save class names\n for key, group in groupby(cars, key=lambda car: type...
[ "0.7477088", "0.66271657", "0.6465083", "0.64439666", "0.64348084", "0.64348084", "0.64348084", "0.6413489", "0.6235546", "0.6192724", "0.61520684", "0.61391675", "0.6107132", "0.60472494", "0.6043459", "0.6041461", "0.60177046", "0.6006069", "0.6000753", "0.592879", "0.59059...
0.8024266
0
Return the instantaneous average velocity for each class of cars Return class_velocity list of average velocities for class in class_names class_names list of class names of active cars
def class_average_speed(cars): # Sort by class name class_sorted = sorted(cars, key=lambda car: type(car).__name__) class_velocities = [] class_names = [] # Group the cars of same class and average their velocities, save class names for key, group in groupby(cars, key=lambda car: type(car).__nam...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def global_average_speed(cars):\n velocities = [car.velocity for car in cars]\n average_speed = sum(velocities)/len(cars)\n return average_speed", "def average(cls, vectors):\n return cls.sum(vectors) / len(vectors)", "def get_velocity(self):\n\n vs = []\n pairs = [(-2, -1), (-3, ...
[ "0.66806364", "0.5879501", "0.57972777", "0.5706217", "0.546517", "0.54273754", "0.5395548", "0.5379459", "0.5367989", "0.5266238", "0.5126426", "0.51186705", "0.5099308", "0.50899357", "0.5079416", "0.5076849", "0.50666314", "0.50658333", "0.50573754", "0.5054296", "0.505317...
0.84505486
0
Compute the nodal sum of values defined on elements.
def nodalSum(val,elems,work,avg): nodes = unique1d(elems) for i in nodes: wi = where(elems==i) vi = val[wi] if avg: vi = vi.sum(axis=0)/vi.shape[0] else: vi = vi.sum(axis=0) val[wi] = vi
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def nodalSum2(val,elems,tol):\n nodes = unique1d(elems)\n for i in nodes:\n wi = where(elems==i)\n vi = val[wi]\n ai,ni = average_close(vi,tol=tol)\n ai /= ni.reshape(ai.shape[0],-1)\n val[wi] = ai", "def sum_elements(arr):\n return sum(arr)", "def compute(self, node...
[ "0.72711855", "0.6993915", "0.69905835", "0.6909588", "0.6885086", "0.68823624", "0.6866198", "0.68248475", "0.68051624", "0.6783232", "0.6779679", "0.6768338", "0.67458636", "0.6648012", "0.6581813", "0.65722775", "0.6525247", "0.6508257", "0.6508257", "0.64953786", "0.64827...
0.80045086
0
Compute the nodal sum of values defined on elements.
def nodalSum2(val,elems,tol): nodes = unique1d(elems) for i in nodes: wi = where(elems==i) vi = val[wi] ai,ni = average_close(vi,tol=tol) ai /= ni.reshape(ai.shape[0],-1) val[wi] = ai
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def nodalSum(val,elems,work,avg):\n nodes = unique1d(elems)\n for i in nodes:\n wi = where(elems==i)\n vi = val[wi]\n if avg:\n vi = vi.sum(axis=0)/vi.shape[0]\n else:\n vi = vi.sum(axis=0)\n val[wi] = vi", "def su...
[ "0.80045086", "0.6993915", "0.69905835", "0.6909588", "0.6885086", "0.68823624", "0.6866198", "0.68248475", "0.68051624", "0.6783232", "0.6779679", "0.6768338", "0.67458636", "0.6648012", "0.6581813", "0.65722775", "0.6525247", "0.6508257", "0.6508257", "0.64953786", "0.64827...
0.72711855
1
Sets the focal_device_id of this TopologyAttachmentResultDto.
def focal_device_id(self, focal_device_id): self._focal_device_id = focal_device_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def device_id(self, device_id):\n\n self._device_id = device_id", "def device_id(self, device_id):\n\n self._device_id = device_id", "def attachment_file_id(self, attachment_file_id):\n\n self._attachment_file_id = attachment_file_id", "def set_device(self, device):\n self.device ...
[ "0.5081288", "0.5081288", "0.47622368", "0.4721567", "0.46936834", "0.467642", "0.467642", "0.46551454", "0.4622062", "0.46029237", "0.4589448", "0.45663542", "0.45312893", "0.44925702", "0.4490328", "0.44683826", "0.44367197", "0.43781528", "0.432919", "0.43208218", "0.42943...
0.7755509
0
Sets the link_data of this TopologyAttachmentResultDto.
def link_data(self, link_data): self._link_data = link_data
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_linked_data(\n self,\n val=None\n ):\n if val != None:\n self.linked_data = val", "def link(self, link):\n\n self.container['link'] = link", "def link(self, link):\n\n self._link = link", "def link(self, link):\n\n self._link = link", "def...
[ "0.5885388", "0.5762334", "0.5706907", "0.5706907", "0.5706907", "0.5706907", "0.5706907", "0.5706907", "0.5706907", "0.5507466", "0.5478151", "0.54773843", "0.5213641", "0.518306", "0.51407033", "0.513635", "0.5109374", "0.5109374", "0.5109374", "0.5109374", "0.5109374", "...
0.7365313
0
Sets the node_data of this TopologyAttachmentResultDto.
def node_data(self, node_data): self._node_data = node_data
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def node_data(self, node_data):\n self.node_data_ = node_data\n self.label = node_data.label\n self.node_type = node_data.node_type\n self.arity = node_data.arity\n self.min_depth = node_data.min_depth\n self.child_type = node_data.child_type\n self.numpy_func = nod...
[ "0.5924504", "0.56284124", "0.5487792", "0.52650934", "0.522697", "0.52221644", "0.5181747", "0.5177556", "0.5148225", "0.5126763", "0.51123697", "0.51031524", "0.51031524", "0.51031524", "0.5067002", "0.5042375", "0.5041182", "0.50394917", "0.50161797", "0.4974361", "0.49511...
0.6978998
0
Downloads data from the GDC. Combine the smaller files (~KB range) into a grouped download. The API now supports combining UUID's into one uncompressed tarfile using the ?tarfile url parameter. Combining many smaller files into one download decreases the number of open connections we have to make
def download(parser, args): successful_count = 0 unsuccessful_count = 0 big_errors = [] small_errors = [] total_download_count = 0 validate_args(parser, args) # sets do not allow duplicates in a list ids = set(args.file_ids) for i in args.manifest: if not i.get('id'): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def download(size):\n files = glob(f'{size}_chunk/{FILE_BASE}_rdn_*[!.hdr]') \\\n + glob(f'{size}_chunk/{FILE_BASE}_loc_*[!.hdr]') \\\n + glob(f'{size}_chunk/{FILE_BASE}_obs_*[!.hdr]')\n\n if len(files) != 3:\n Logger.info('Downloading data')\n\n req = requests.get(URLS[size])...
[ "0.63961786", "0.6266496", "0.6059152", "0.6036518", "0.60253733", "0.59880096", "0.5981087", "0.59605277", "0.5922241", "0.58972925", "0.58775", "0.5858991", "0.58549273", "0.58432364", "0.5839691", "0.5825071", "0.5797404", "0.5794432", "0.5772822", "0.57607055", "0.5758049...
0.7188963
0
The percentage of rate limit.
def rate_limit_percentage(self) -> Optional[float]: return pulumi.get(self, "rate_limit_percentage")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pct(self):\n\t\treturn self.bottle.pct()", "def get_percent(self):\n if not (self.votes and self.score):\n return 0\n return 100 * (self.get_rating() / self.field.range)", "def get_real_percent(self):\n if not (self.votes and self.score):\n return 0\n retur...
[ "0.77211916", "0.7705641", "0.7513694", "0.7500773", "0.7500773", "0.74677795", "0.7410109", "0.7388711", "0.73542374", "0.73428303", "0.7216033", "0.72125334", "0.7185409", "0.7185409", "0.7178804", "0.71685594", "0.7082458", "0.70084995", "0.69748604", "0.69652313", "0.6937...
0.8822983
0
Gets the capabilities of the cognitive services account. Each item indicates the capability of a specific feature. The values are readonly and for reference only.
def capabilities(self) -> Sequence['outputs.SkuCapabilityResponse']: return pulumi.get(self, "capabilities")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def capabilities(self):\n\n class Capabilities(ct.Structure):\n _fields_ = [(\"Size\", ct.c_ulong),\n (\"AcqModes\", ct.c_ulong),\n (\"ReadModes\", ct.c_ulong),\n (\"FTReadModes\", ct.c_ulong),\n (\"Trigge...
[ "0.70851606", "0.7014582", "0.6949531", "0.68428165", "0.6804486", "0.6793715", "0.67854387", "0.6769006", "0.66325563", "0.66314065", "0.6474451", "0.64578134", "0.6382425", "0.6382425", "0.6375141", "0.63444567", "0.6304493", "0.6292689", "0.6281157", "0.62223816", "0.61760...
0.7209578
0
The commitment plan associations of Cognitive Services account.
def commitment_plan_associations(self) -> Sequence['outputs.CommitmentPlanAssociationResponse']: return pulumi.get(self, "commitment_plan_associations")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def plans(self):\n title = self.context.Title()\n return self.portal_catalog(portal_type='Plan', Subject=title)", "def crm_associations(self):\n from hubspot3.crm_associations import CRMAssociationsClient\n\n return CRMAssociationsClient(**self.auth, **self.options)", "def plans(se...
[ "0.55934", "0.5511926", "0.53579974", "0.53434294", "0.51984334", "0.51952285", "0.5044473", "0.4975472", "0.49590665", "0.49435046", "0.4921552", "0.49170002", "0.49170002", "0.49170002", "0.4875417", "0.4866419", "0.48434013", "0.48164648", "0.48160282", "0.47532672", "0.47...
0.7754084
0
The deletion date, only available for deleted account.
def deletion_date(self) -> str: return pulumi.get(self, "deletion_date")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def deleted_time(self) -> str:\n return pulumi.get(self, \"deleted_time\")", "def decommission_date(self):\n return self._decommission_date", "def delete_time(self) -> str:\n return pulumi.get(self, \"delete_time\")", "def delete_time(self) -> str:\n return pulumi.get(self, \"dele...
[ "0.75667304", "0.7024116", "0.6854214", "0.6854214", "0.6547442", "0.6326043", "0.6143451", "0.6114624", "0.6068728", "0.6068728", "0.5996998", "0.5946708", "0.59344095", "0.58662504", "0.586075", "0.58573246", "0.58573246", "0.58573246", "0.5817896", "0.5817896", "0.5806128"...
0.90385526
0
The private endpoint connection associated with the Cognitive Services account.
def private_endpoint_connections(self) -> Sequence['outputs.PrivateEndpointConnectionResponse']: return pulumi.get(self, "private_endpoint_connections")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def private_link_endpoint(self) -> pulumi.Output[Optional[str]]:\n return pulumi.get(self, \"private_link_endpoint\")", "def private_endpoint(self) -> Optional['outputs.PrivateEndpointResponse']:\n return pulumi.get(self, \"private_endpoint\")", "def private_endpoint(self) -> Optional['outputs.Pr...
[ "0.6600078", "0.6578945", "0.6578945", "0.65711725", "0.64803904", "0.63739693", "0.6331475", "0.6331475", "0.6241816", "0.62138796", "0.6195896", "0.6108234", "0.6033329", "0.6002076", "0.59658813", "0.5883271", "0.58768934", "0.5868595", "0.5758015", "0.5714617", "0.5701596...
0.67986786
0
The scheduled purge date, only available for deleted account.
def scheduled_purge_date(self) -> str: return pulumi.get(self, "scheduled_purge_date")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def planned_purge_date(self):\n return self._planned_purge_date", "def planned_purge_date(self):\n return self._planned_purge_date", "def deletion_date(self) -> str:\n return pulumi.get(self, \"deletion_date\")", "def scheduled_deletion_time(self) -> Optional[datetime.datetime]:\n ...
[ "0.77084357", "0.77084357", "0.6675982", "0.59855175", "0.597911", "0.5939071", "0.5925011", "0.5922038", "0.5922038", "0.57880515", "0.578128", "0.5759633", "0.56891406", "0.5666457", "0.5608823", "0.5578217", "0.55437165", "0.55437165", "0.55357945", "0.53633654", "0.532083...
0.89512056
0
Sku change info of account.
def sku_change_info(self) -> 'outputs.SkuChangeInfoResponse': return pulumi.get(self, "sku_change_info")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sku(self, sku):\n\n self._sku = sku", "def __init__(__self__, *,\n name: pulumi.Input['SkuName']):\n pulumi.set(__self__, \"name\", name)", "def change_account(self, account):\r\n check_account = Account(account, steem_instance=self.steem)\r\n self.account = chec...
[ "0.6504229", "0.62209433", "0.595125", "0.5903116", "0.57759696", "0.57391024", "0.56339806", "0.5585082", "0.5583133", "0.55682266", "0.5565345", "0.5531113", "0.5486291", "0.54483426", "0.54368883", "0.54215336", "0.53766495", "0.53355706", "0.53355706", "0.53174454", "0.52...
0.64245176
1
The api properties for special APIs.
def api_properties(self) -> Optional['outputs.ApiPropertiesResponse']: return pulumi.get(self, "api_properties")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _setup_api_properties(self):\n self.implicit_api_logical_id = GeneratedLogicalId.implicit_http_api()\n self.implicit_api_condition = \"ServerlessHttpApiCondition\"\n self.api_event_type = \"HttpApi\"\n self.api_type = SamResourceType.HttpApi.value\n self.api_id_property = \"A...
[ "0.7447788", "0.70224255", "0.65719783", "0.65687895", "0.64152324", "0.64069265", "0.6361345", "0.63350254", "0.6326089", "0.6255719", "0.6232385", "0.6232385", "0.6232385", "0.6178087", "0.61595166", "0.61541235", "0.61463284", "0.6104891", "0.5966381", "0.5966381", "0.5966...
0.7195016
1
The flag to enable dynamic throttling.
def dynamic_throttling_enabled(self) -> Optional[bool]: return pulumi.get(self, "dynamic_throttling_enabled")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_change_default_throttling_settings_http_with_overwrite_throttled_rate_above_50():", "def test_change_default_throttling_settings_http_with_overwrite_throttled():", "def test_change_default_throttling_settings_http_with_overwrite_throttled_burst_above_50():", "def should_be_throttled(self, resource):...
[ "0.6286432", "0.6163197", "0.6152936", "0.6117926", "0.605267", "0.5982151", "0.5967855", "0.5847482", "0.5758198", "0.5755627", "0.5700462", "0.569529", "0.5694182", "0.5687345", "0.5619024", "0.55816823", "0.5572103", "0.55682355", "0.5496888", "0.5494714", "0.54758257", ...
0.8219248
0
(Metrics Advisor Only) The Azure AD Client Id (Application Id).
def aad_client_id(self) -> Optional[str]: return pulumi.get(self, "aad_client_id")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def client_id(self) -> str:\n return pulumi.get(self, \"client_id\")", "def client_id(self) -> str:\n return pulumi.get(self, \"client_id\")", "def client_id(self) -> str:\n return pulumi.get(self, \"client_id\")", "def client_id(self):\n return self.__client_id", "def client_id...
[ "0.72582203", "0.72582203", "0.72582203", "0.7254328", "0.7227845", "0.71365494", "0.71189344", "0.6955662", "0.6955662", "0.686798", "0.686798", "0.686798", "0.686798", "0.686798", "0.686798", "0.686798", "0.686798", "0.686798", "0.686798", "0.686798", "0.6854775", "0.6781...
0.8002165
0
(QnAMaker Only) The Azure Search endpoint id of QnAMaker.
def qna_azure_search_endpoint_id(self) -> Optional[str]: return pulumi.get(self, "qna_azure_search_endpoint_id")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def qna_azure_search_endpoint_key(self) -> Optional[str]:\n return pulumi.get(self, \"qna_azure_search_endpoint_key\")", "def endpoint_id(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"endpoint_id\")", "def endpoint_id(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"endpoi...
[ "0.75765604", "0.70053834", "0.70053834", "0.70053834", "0.70053834", "0.6863342", "0.6863342", "0.6831415", "0.6831415", "0.6831415", "0.6378568", "0.6378568", "0.6342887", "0.6290179", "0.62154305", "0.6213062", "0.6106662", "0.60928464", "0.60928464", "0.60928464", "0.6092...
0.82035816
0
(QnAMaker Only) The Azure Search endpoint key of QnAMaker.
def qna_azure_search_endpoint_key(self) -> Optional[str]: return pulumi.get(self, "qna_azure_search_endpoint_key")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def qna_azure_search_endpoint_id(self) -> Optional[str]:\n return pulumi.get(self, \"qna_azure_search_endpoint_id\")", "def _get_query_api_key(self, params: Dict) -> Optional[str]:\n return None", "def endpoint_id(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"endpoint_id\")", "...
[ "0.760087", "0.6005936", "0.59957916", "0.59957916", "0.59957916", "0.59957916", "0.5990177", "0.59611803", "0.59611803", "0.58993065", "0.58993065", "0.58993065", "0.58993065", "0.58035594", "0.58035594", "0.579497", "0.579497", "0.579497", "0.579497", "0.579497", "0.579497"...
0.84970903
0
(QnAMaker Only) The runtime endpoint of QnAMaker.
def qna_runtime_endpoint(self) -> Optional[str]: return pulumi.get(self, "qna_runtime_endpoint")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def endpoint(self) -> str:\n return pulumi.get(self, \"endpoint\")", "def endpoint(self) -> str:\n return pulumi.get(self, \"endpoint\")", "def main():\n return execute_api(Freta(), [Endpoint], __version__)", "def endpoint(self):\n return self.Endpoint", "async def __anext__(self):\...
[ "0.5615672", "0.5615672", "0.5560079", "0.5543251", "0.5528619", "0.55271727", "0.54968864", "0.54968864", "0.5390125", "0.5370197", "0.53535056", "0.53421795", "0.5330651", "0.5318378", "0.5286095", "0.52837664", "0.52837664", "0.5264753", "0.5225494", "0.5222705", "0.521559...
0.7168018
0
(Bing Search Only) The flag to enable statistics of Bing Search.
def statistics_enabled(self) -> Optional[bool]: return pulumi.get(self, "statistics_enabled")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def uses_statistics(self):\n return True", "def query_insights_enabled(self) -> bool:\n return pulumi.get(self, \"query_insights_enabled\")", "def statistics(self, **_):\n raise NotImplementedError(\"{} doesn't support statistics.\".format(__class__.__name__))", "def event_ball_search_en...
[ "0.6719449", "0.58057433", "0.55334", "0.54760736", "0.5386774", "0.53164434", "0.51713836", "0.5164361", "0.5161711", "0.50041795", "0.49931997", "0.49914446", "0.49898", "0.49377626", "0.49150836", "0.4907638", "0.48831502", "0.4852127", "0.48485795", "0.4833888", "0.482493...
0.6361315
1