query
stringlengths
9
3.4k
document
stringlengths
9
87.4k
metadata
dict
negatives
listlengths
4
101
negative_scores
listlengths
4
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Static method use to create a new picker / slicer
def create_new_picker(max_value, min_value, step, picker_value, value_changed_func): if isinstance(max_value, int): picker = QtWidgets.QSpinBox() else: picker = QtWidgets.QDoubleSpinBox() picker.setMaximum(max_value) picker.setMinimum(min_value) picker.se...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def from_slicer(cls, *args, **kwargs):\n slicer_instance = cls.__new__(cls)\n cls._init_slicer(slicer_instance, *args, **kwargs)\n return slicer_instance", "def create_sliders(self):\n self.create_contrast_slider()\n self.create_crop_sliders()", "def __init__(self, parent):\n...
[ "0.68959534", "0.63784045", "0.618946", "0.59975266", "0.5988198", "0.5921113", "0.57267493", "0.5704387", "0.56742835", "0.56602216", "0.5659262", "0.5640323", "0.5627229", "0.55925995", "0.55751204", "0.5530813", "0.5516741", "0.548951", "0.548951", "0.54867417", "0.5486436...
0.6350021
2
Move the camera to display the axial view
def set_axial_view(self): self.renderer.ResetCamera() fp = self.renderer.GetActiveCamera().GetFocalPoint() p = self.renderer.GetActiveCamera().GetPosition() dist = math.sqrt((p[0] - fp[0]) ** 2 + (p[1] - fp[1]) ** 2 + (p[2] - fp[2]) ** 2) self.renderer.GetActiveCamera().SetPositi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setCamera(self, viewX=0, viewY=0):\n self.viewX = viewX\n self.viewY = viewY", "def set_view(self):\n self.scene.mlab.view(azimuth=90.0, elevation=-90.0)", "def on_show_view(self):\n self.setup()\n arcade.set_background_color(arcade.color.BLACK)\n arcade.set_viewpo...
[ "0.7212608", "0.71399224", "0.68425083", "0.6840306", "0.6815355", "0.6792847", "0.6789115", "0.6767413", "0.67336446", "0.66762626", "0.667446", "0.6662792", "0.66398436", "0.65895605", "0.6578721", "0.6573344", "0.6547032", "0.6519471", "0.64943886", "0.6483231", "0.6456752...
0.80318666
0
Move the camera to display the coronal view
def set_coronal_view(self): self.renderer.ResetCamera() fp = self.renderer.GetActiveCamera().GetFocalPoint() p = self.renderer.GetActiveCamera().GetPosition() dist = math.sqrt((p[0] - fp[0]) ** 2 + (p[1] - fp[1]) ** 2 + (p[2] - fp[2]) ** 2) self.renderer.GetActiveCamera().SetPosi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def centerCamera(self):\n self.camera = (self.width / 2, self.height / 2)", "def set_axial_view(self):\n self.renderer.ResetCamera()\n fp = self.renderer.GetActiveCamera().GetFocalPoint()\n p = self.renderer.GetActiveCamera().GetPosition()\n dist = math.sqrt((p[0] - fp[0]) ** 2...
[ "0.69981605", "0.68610466", "0.6816325", "0.6801461", "0.6791668", "0.6753843", "0.6710304", "0.66631925", "0.6643434", "0.662266", "0.6570206", "0.6474585", "0.64409626", "0.6439115", "0.6436408", "0.64255387", "0.6420345", "0.6418809", "0.64171857", "0.6415462", "0.6286711"...
0.84081805
0
Move the camera to display the sagittal view
def set_sagittal_view(self): self.renderer.ResetCamera() fp = self.renderer.GetActiveCamera().GetFocalPoint() p = self.renderer.GetActiveCamera().GetPosition() dist = math.sqrt((p[0] - fp[0]) ** 2 + (p[1] - fp[1]) ** 2 + (p[2] - fp[2]) ** 2) self.renderer.GetActiveCamera().SetPos...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_view(self, s):\n #s.scene.reset_zoom()\n s.scene.z_plus_view()\n c = s.scene.camera\n c.azimuth(-30)\n c.elevation(20)\n s.render()", "def set_view(self, s):\n #s.scene.reset_zoom()\n s.scene.z_plus_view()\n c = s.scene.camera\n c.azim...
[ "0.70561534", "0.7050205", "0.6879647", "0.6870642", "0.6862437", "0.6770447", "0.6629652", "0.6603986", "0.65818405", "0.65284383", "0.65133715", "0.65020484", "0.6485723", "0.6480093", "0.64748067", "0.6467349", "0.6407815", "0.63660985", "0.6329483", "0.63262033", "0.63193...
0.7297154
0
Function call by the silhouette when a node is selected
def event_node_selected(self, node): # TODO print("selected node:", node)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def on_NormalNode_clicked(self):\n # TODO: not implemented yet\n # raise NotImplementedError\n print(\"Select Normal Node,not need others attend in! Best Wish\")\n self.select_actor = \"NormalNode\"", "def OnNodeSelected( self, event ):\n try:\n node = self.sorted[ e...
[ "0.63384455", "0.6190276", "0.5896407", "0.57874525", "0.5669783", "0.5633221", "0.5563177", "0.5476702", "0.5465189", "0.54551536", "0.5449223", "0.5443576", "0.54165447", "0.54047793", "0.540049", "0.53979313", "0.53696954", "0.53696954", "0.53685576", "0.53352416", "0.5327...
0.644856
0
Function call by the silhouette when a edge is selected
def event_edge_selected(self, edge): # TODO print("selected edge:", edge)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __filterEdges(self):", "def edge_on_silhouette(self, vertices_2d: np.ndarray) -> np.ndarray:\n assert vertices_2d.ndim == 2\n assert vertices_2d.shape[1] == 2\n triangles = vertices_2d[self.faces, :]\n u = triangles[:, 1, :] - triangles[:, 0, :]\n v = triangles[:, 2, :] - t...
[ "0.6124664", "0.60711336", "0.58666146", "0.5829186", "0.5802818", "0.57219154", "0.56343764", "0.5494429", "0.5428436", "0.5423086", "0.53683704", "0.53628373", "0.5345972", "0.52988225", "0.52867573", "0.52692485", "0.5213829", "0.51858133", "0.51805794", "0.51662755", "0.5...
0.6577793
0
Resets the state of the simulator with the given client environment
def reset_simulation( self, client_env: ClientEnvironment, policy: Optional[Policy] = None, cached_urls: Optional[Set[str]] = None ): self.pq = PriorityQueue() self.request_queue = RequestQueue(client_env.bandwidth, client_env.latency, client_env.loss) self.completed_nodes = {} ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reset(self, env):\n self._env = env\n return", "def _reset(self, env_id: np.ndarray) -> None:", "def reset(self, **kwargs):\n return self.env.reset(**kwargs)", "def reset(self):\n self.success = False\n self.i = 0\n if self.monitor:\n self.env = gym.wrappers.M...
[ "0.70522445", "0.65393215", "0.645413", "0.6435838", "0.64088017", "0.6393082", "0.63084936", "0.62862295", "0.62297934", "0.6194197", "0.6138339", "0.6086158", "0.6065011", "0.6061454", "0.6030044", "0.6022103", "0.5931499", "0.5931393", "0.59284794", "0.5806622", "0.5799125...
0.5906373
19
Schedule all push and preload resources for a given node with the given delay.
def schedule_pushed_and_preloaded_resources( self, node: Node, delay: float, dry_run=False ) -> Optional[List[Tuple[Node, float]]]: push_resources = self.policy.push_set_for_resource(node.resource) if self.policy else [] preload_resources = self.policy.preload_set_for_resource(node.resource...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def run_after_delay(delay_ms: float, callback: Callable[[], None]):\n heapq.heappush(\n _sorted_scheduled_events,\n _ScheduledEvent(\n time=pygame.time.get_ticks() + delay_ms, callback=callback\n ),\n )", "def schedule(self, sleep_time, delay):\n self.sleep_time = sle...
[ "0.6102289", "0.6074285", "0.55365187", "0.5314593", "0.5240758", "0.51047784", "0.4969097", "0.49502808", "0.49491665", "0.49445334", "0.49225804", "0.4915911", "0.4893828", "0.48897707", "0.48873812", "0.48403677", "0.4801317", "0.47886148", "0.47872466", "0.47806123", "0.4...
0.75357234
0
Steps through the request queue once and updates the simulator state based on the results
def step_request_queue(self): completed_this_step, time_ms_this_step = self.request_queue.step() self.total_time_ms += time_ms_this_step for node in completed_this_step: self.completed_nodes[node] = self.total_time_ms + node.resource.execution_ms self.log.verbose("resou...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def on_iteration(self):\n self.send_pending_requests()\n super().on_iteration()", "def request() -> None:\n\t_flag.set()", "def step(self):\n # Pull data from the first available input channel.\n\n input_bag = self.get()\n\n # todo add timer\n self.handle_results(input...
[ "0.61810625", "0.592369", "0.592225", "0.5875259", "0.58692753", "0.58094347", "0.5794984", "0.57932585", "0.57728696", "0.5763457", "0.5760611", "0.57588017", "0.5739882", "0.5738198", "0.572418", "0.57186425", "0.57186425", "0.5717217", "0.5703992", "0.5692217", "0.5689397"...
0.65267473
0
Schedules all children for the given node
def schedule_child_requests(self, parent: Node, dry_run=False) -> Optional[List[Tuple[Node, float]]]: fetch_delay_correction = 0 execution_delay = 0 last_execution_delay = 0 dry_run_list = [] for child in parent.children: # Server processing delay child_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _process_children(self, node):\n for kid in node.children:\n self._process_node(kid)", "def visit_children(self, func):\n for child in self._children:\n func(child)", "def children(self, node):\n for child_id, _ in self.edges[node.identifier].items():\n ...
[ "0.6662146", "0.5890924", "0.58475673", "0.5691821", "0.5625171", "0.5562076", "0.5515334", "0.5511771", "0.5463136", "0.5440007", "0.5423494", "0.5397284", "0.53899723", "0.5343254", "0.5333365", "0.5314404", "0.5302937", "0.5296329", "0.52826023", "0.5277298", "0.52562046",...
0.56013983
5
Simulates the page load time of a webpage in the given client environment with an optional push policy to also simulate.
def simulate_load_time( self, client_env: ClientEnvironment, policy: Optional[Policy] = None, cached_urls: Optional[Set[str]] = None, use_aft: Optional[bool] = False, ) -> float: self.log.verbose("simulating page load with client environment", **client_env._asdict()) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def step_impl(context):\r\n context.browser.get('https://opensource-demo.orangehrmlive.com/')\r\n time.sleep(10)", "def warmup_browser(self, browser: 'Browserify', url: 'Url') -> 'EngineMakerInterface':", "def __call__(self):\n self.page1() # GET web (request 101)\n\n grinder.sleep(1000)\n ...
[ "0.5652721", "0.55101717", "0.5463232", "0.5439354", "0.5430658", "0.5325434", "0.52991545", "0.5253171", "0.5198481", "0.5186823", "0.5095128", "0.50730103", "0.50594103", "0.5050114", "0.49977705", "0.49749178", "0.49519542", "0.494344", "0.49331352", "0.48965228", "0.48575...
0.7346552
0
Computes the completion time up until the given URL, or until the last object in the page if URL is not specified
def completion_time(self, url: Optional[str] = None) -> float: if not url: return max(self.completed_nodes.values()) return self.completed_nodes[self.url_to_node_map[url]]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def paginator(url: str, timeout: int=0.1, **kwargs) -> Generator[Tuple[int, Dict[str, Any]], None, None]:\n while True:\n status, data = fetch(url, **kwargs) \n yield status, data \n next_url = data['next']\n if next_url is None: \n break \n else:\n url =...
[ "0.6120126", "0.610536", "0.5593772", "0.5554222", "0.5485298", "0.54599017", "0.54582006", "0.5422357", "0.5416172", "0.5386441", "0.538519", "0.5384364", "0.5352325", "0.5347377", "0.53389025", "0.5257554", "0.52555287", "0.5252659", "0.5217241", "0.52099425", "0.5205436", ...
0.68649894
0
Creates the execution graph from the environment config
def create_execution_graph(self, env_config: EnvironmentConfig): # create a map of Nodes, mapping their order (basically their ID) to a Node for that resource res_list = sorted(env_config.har_resources, key=lambda r: r.order) self.node_map = { res.order: Node(resource=res, priority=...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def train(config, env_processes):\n tf.reset_default_graph()\n with config.unlocked:\n config.network = functools.partial(\n utility.define_network, config.network, config)\n config.policy_optimizer = getattr(tf.train, config.policy_optimizer)\n config.value_optimizer = getattr(tf.train, config.v...
[ "0.59626645", "0.5879072", "0.5851549", "0.58362114", "0.582692", "0.56316763", "0.56060916", "0.56032616", "0.55222464", "0.5481048", "0.5472875", "0.54267657", "0.5402605", "0.5366224", "0.53651065", "0.5359956", "0.53140163", "0.5304578", "0.5295872", "0.5290212", "0.52884...
0.6807472
0
Prints the execution graph
def print_execution_map(self): def recursive_print(root: Node, depth=0): """ Recursive helper method for printing the execution map """ if not root: return print( (" " * depth) + f"({root.resource.order...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def print_graph() -> None:\n raise NotImplementedError", "def do_printgraph(self, args):\n self.currentGraph.printGraph()", "def printGraph(self):\n print \"-----\"\n for feature in self.features:\n feature.printFeature()\n for constraint in self.constraints:\n ...
[ "0.7954601", "0.79290926", "0.7421822", "0.69881415", "0.6862806", "0.684408", "0.6835108", "0.6643827", "0.6594443", "0.65856314", "0.6576897", "0.6570586", "0.65292037", "0.6511969", "0.6497554", "0.64349854", "0.63920665", "0.6346176", "0.6340656", "0.62972724", "0.6225175...
0.67112935
7
Recursive helper method for printing the execution map
def recursive_print(root: Node, depth=0): if not root: return print( (" " * depth) + f"({root.resource.order}, exec={root.resource.execution_ms:.3f}, " + f"ttfb={root.resource.time_to_first_byte_ms}, delay={root.resource.fetch_dela...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def print_execution_map(self):\n\n def recursive_print(root: Node, depth=0):\n \"\"\"\n Recursive helper method for printing the execution map\n \"\"\"\n if not root:\n return\n print(\n (\" \" * depth)\n + ...
[ "0.80607414", "0.658827", "0.6314408", "0.628583", "0.6083391", "0.60481197", "0.60228336", "0.6010854", "0.5950566", "0.5940669", "0.5923207", "0.5913067", "0.58744264", "0.58710164", "0.5861058", "0.5834924", "0.5762051", "0.57587296", "0.5751645", "0.57422584", "0.5725866"...
0.619131
4
Get Terrapos position Dataset by reading Terrapos position output file
def get_terrapos_position(): dset = parsers.parse_key("terrapos_output_position").as_dataset() dset.add_time("time", val=dset.gpsweek, val2=dset.gpssec, scale="gps", fmt="gps_ws") dset.add_position("site_pos", time="time", itrs=_get_site_pos(dset)) return dset
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_positions():\n return np.genfromtxt(\"POSITIONS.OUT\").transpose()", "def _get_position_data(file):\n return pd.read_csv(file)", "def Load_PositionFile(position_filename):\n positions = pd.read_table(position_filename, delimiter=',', header=None)\n positions.columns = ['x','y']\n return p...
[ "0.69715446", "0.6710099", "0.6453088", "0.6087564", "0.6064013", "0.58249235", "0.582114", "0.57579577", "0.56999654", "0.5672751", "0.56515074", "0.55790323", "0.556288", "0.55591595", "0.549974", "0.5475504", "0.5472769", "0.54613554", "0.5436161", "0.5416727", "0.53835356...
0.58789986
5
Determine site position by converting given longitude, latitude and height for a station to geocentric cartesian coordinates
def _get_site_pos(dset): # TODO hjegei: Workaround -> better would it be if Position object can handle LLH as input format!!! x, y, z = gnss.llh2xyz(np.deg2rad(dset.lat), np.deg2rad(dset.lon), dset.height) return np.stack((x, y, z), axis=1)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def lonlat2xy(s_lon, s_lat): # x: easting, y: northing\r\n # convert decimals to seconds...\r\n s_lon = dec2sec(s_lon)\r\n s_lat = dec2sec(s_lat)\r\n\r\n ## Auxiliary values \r\n # i.e. differences of latitude and longitude relative to Bern in the unit [10000'']\r\n s_lng_aux = (s_lon - 26782.5)/...
[ "0.6473595", "0.64406455", "0.6367665", "0.6359032", "0.6342975", "0.6301968", "0.62030673", "0.61451846", "0.6122501", "0.59740734", "0.59316474", "0.5877593", "0.5861095", "0.5844831", "0.5828851", "0.5814638", "0.58141816", "0.5814044", "0.57828254", "0.5778477", "0.577743...
0.6629958
0
Returns the total number of instances.
def retrieve_num_instances(service): instance_counts = service["instance-counts"] return instance_counts["healthy-instances"] + instance_counts["unhealthy-instances"]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def instance_count(self) -> int:\n return pulumi.get(self, \"instance_count\")", "def get_num_instances(self):\n return len( self.get_instances_ids() )", "def total_size(instance):\n return sum(i.size for i in instance.iter_instances())", "def instance_count(self) -> pulumi.Output[Optional[i...
[ "0.8632915", "0.8555427", "0.83372515", "0.8237169", "0.7763398", "0.7763398", "0.75221026", "0.75215673", "0.74488795", "0.7328797", "0.7304685", "0.7303025", "0.72667897", "0.7248904", "0.72002125", "0.7181913", "0.71448225", "0.71284705", "0.71191907", "0.7108736", "0.7105...
0.78210866
4
Formats the "Current?" column for the given service
def format_using_current_token(service, token_etag, token_name): is_current = is_service_current(service, token_etag, token_name) if is_current: return terminal.success('Current') else: return 'Not Current'
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_column_format(self):\n pass", "def format_status(self) -> str:\n if not self.ready_to_trade:\n return \"Market connectors are not ready.\"\n lines = []\n\n balance_df = self.get_balance_df()\n lines.extend([\"\", \" Balances:\"] + [\" \" + line for lin...
[ "0.53294194", "0.5314236", "0.51500046", "0.49896735", "0.49314412", "0.48342925", "0.48339313", "0.48071983", "0.47880876", "0.47838733", "0.47743535", "0.4739447", "0.4735393", "0.47299096", "0.47188416", "0.4716945", "0.47101995", "0.46654326", "0.46208525", "0.46192995", ...
0.56200206
0
Formats the "Healthy?" column for the given instance
def format_instance_status(instance): if instance['healthy?']: return terminal.success('Healthy') else: if instance['_status'] == 'failed': status = 'Failed' elif instance['_status'] == 'killed': status = 'Killed' else: status = 'Unhealthy' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _health(self) -> str:\n bad = []\n if self.leech:\n bad.append(\"leech\")\n if self.zero:\n bad.append(\"last quality was zero\")\n\n if not bad:\n return \"OK\"\n else:\n return \" & \".join(bad)", "def health(self):\n ret...
[ "0.66063195", "0.61336064", "0.5757227", "0.5724033", "0.556004", "0.556004", "0.55392295", "0.54227436", "0.54227436", "0.54227436", "0.54227436", "0.54227436", "0.54227436", "0.5414834", "0.5352144", "0.52626026", "0.5253913", "0.52401495", "0.52276134", "0.52202225", "0.52...
0.7172031
0
Trains an agent on the given environment following the SARSA algorithm.
def train_agent( self, *, env, test_env, save_name, train_every=32, eval_every=1000, max_steps=100000, start_epsilon=0.9, end_epsilon=0.001, epsilon_decay_steps=1000, render=True, ): agent = self.create_agent(en...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_agent(self, env):\n\n if isinstance(env.action_space, gym.spaces.Discrete):\n return SarsaAgent(\n obs_dim=env.observation_space.shape[0],\n act_dim=env.action_space.n,\n hidden_sizes=[64],\n )\n\n raise ValueError(\"SARSA ...
[ "0.6471993", "0.6248134", "0.62450755", "0.62434036", "0.61865884", "0.617761", "0.61158216", "0.6090393", "0.6033044", "0.59894526", "0.5925283", "0.5920401", "0.58622587", "0.58598787", "0.583117", "0.58229214", "0.5818669", "0.58141965", "0.5806821", "0.58007663", "0.57969...
0.57416856
22
Given a specific environment, creates an SARSA agent specific for this environment. Can only handle discrete environments.
def create_agent(self, env): if isinstance(env.action_space, gym.spaces.Discrete): return SarsaAgent( obs_dim=env.observation_space.shape[0], act_dim=env.action_space.n, hidden_sizes=[64], ) raise ValueError("SARSA can only be use...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_agent(self, env):\n\n if isinstance(env.action_space, gym.spaces.Box):\n return ContinuousReinforceAgent(\n obs_dim=env.observation_space.shape[0],\n act_dim=env.action_space.shape[0],\n hidden_sizes=[64],\n )\n\n if isinst...
[ "0.66630644", "0.6631694", "0.65505534", "0.5953285", "0.59230745", "0.59207326", "0.5811515", "0.56780297", "0.5674116", "0.5648996", "0.56102073", "0.5546342", "0.5455327", "0.5420759", "0.5400671", "0.5400206", "0.5390566", "0.53870106", "0.5293561", "0.52203923", "0.52186...
0.76628625
0
Creates a dictionary from the given csv file of votes.
def create_dict_of_votes(file): with open(file) as csvfile: entries = csv.reader(csvfile) header = next(entries) votes = dict() # add valid entries to the dictionary for entry in entries: # create full name of voter name = " ".join(entry[0:2]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_dict_of_votes(file: str) -> dict:\r\n with open(file) as csvfile:\r\n entries = csv.reader(csvfile)\r\n header = next(entries)\r\n # add valid entries to the dictionary\r\n for entry in entries:\r\n # create full name of voter\r\n name = \" \".join(en...
[ "0.83097434", "0.6771137", "0.6684424", "0.65192115", "0.6435881", "0.63070375", "0.62879527", "0.614326", "0.6132934", "0.6074498", "0.6073671", "0.60459125", "0.6025651", "0.5999806", "0.5969029", "0.5962401", "0.59587884", "0.59540343", "0.5944068", "0.5942996", "0.5933732...
0.8414147
0
Returns dictionary matching party to their number of votes.
def count_party_votes(votes): vote_count = {'Pineapple Pizza Party': 0, 'Pronounced Jiff Union': 0, 'Socks and Crocs Reform League': 0} for person in votes: vote_count[votes[person]] += 1 return vote_count
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def count_party_votes(votes: dict) -> dict:\r\n vote_count = {'Pineapple Pizza Party': 0, 'Pronounced Jiff Union': 0, 'Socks and Crocs Reform League': 0}\r\n for person in votes:\r\n vote_count[votes[person]] += 1\r\n return vote_count", "def _build_votes_dict(self, participants):\n # more idi...
[ "0.8228742", "0.7485642", "0.72830147", "0.6617967", "0.6336069", "0.63264114", "0.6291957", "0.602717", "0.6024599", "0.59887576", "0.59753215", "0.59386176", "0.5893761", "0.5803234", "0.571136", "0.5707201", "0.5667682", "0.56395775", "0.56219697", "0.55806905", "0.5569669...
0.8151295
1
this makes the request call
def make_request(self, method: str, endpoint: str): url: str = f"{self.conn}/{endpoint}" print(url) response: Response = requests.request( method=method, url=url ) if response.status_code == 200: return response.json() else: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __call__(self, request):\n response = self.get_request(request)\n return response", "def call(self):\n\n self.url = self._prepare_url()\n status_code, response = self._do_request(self.url)\n return self._process_response(status_code, response)", "def call(self...
[ "0.7577878", "0.7518195", "0.73158693", "0.7267636", "0.72416264", "0.71884084", "0.7150099", "0.70882493", "0.70504", "0.6991921", "0.6849655", "0.6825241", "0.6753896", "0.6753896", "0.67405343", "0.6728501", "0.6705178", "0.6697111", "0.6695722", "0.6689797", "0.6673106", ...
0.0
-1
This parses the text and calls the stock api's
def create_request(self): try: stock_name, request = self.text.split(" ") print(stock_name) print(request) if request in run_commands.keys(): endpoint: str = run_commands.get(request).get('endpoint') url_maker: str = f"stocks/{stock...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def handle(text, mic, profile):\n mic.say(\"Getting Stock Info\")\n try:\n output = ''\n for symbol in profile['stocks']:\n print symbol\n stock_info = ys.get_all(symbol)\n print stock_info\n current_out = symbol + \" Current Price is \" + stock_info[...
[ "0.6446082", "0.6064416", "0.58562076", "0.5731274", "0.5679771", "0.56551915", "0.56509995", "0.5433896", "0.5427276", "0.5418267", "0.5416561", "0.53897613", "0.5357206", "0.5336395", "0.5328035", "0.5324772", "0.52904373", "0.5286274", "0.5283608", "0.5273834", "0.52720124...
0.6076654
1
Asynchronously sends an email.
def send_mail(email): return email.send()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def send_async_email(self, msg):\n with app.app_context():\n result = mail.send(msg)\n print result", "async def send_async(message: Message,\n smtp_url: str,\n timeout: Optional[float] = None) -> None:\n await aiosmtplib.send(message.as_mim...
[ "0.805142", "0.7082899", "0.69788533", "0.6903616", "0.6663209", "0.6635336", "0.65764534", "0.6436717", "0.6432856", "0.6255557", "0.6238951", "0.620998", "0.61682665", "0.6115785", "0.6109997", "0.6098291", "0.6079861", "0.6077377", "0.6065762", "0.605886", "0.6035348", "...
0.71749014
1
Asynchronously sends an email to ADMINS.
def email_admins(subject, message): mail_admins(subject, message=message)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def send_async_email(self, msg):\n with app.app_context():\n result = mail.send(msg)\n print result", "def mail():\n mail_server = 'localhost'\n mail_port = 1025\n CustomSMTPServer((mail_server, mail_port), None)\n asyncore.loop()", "async def send_async(message: Messag...
[ "0.6686659", "0.59195524", "0.5748638", "0.57086265", "0.5666351", "0.5602222", "0.5601222", "0.557661", "0.5540823", "0.5418634", "0.53853124", "0.5334438", "0.5334438", "0.5289588", "0.52558994", "0.52356714", "0.52177167", "0.52135456", "0.5192638", "0.5190705", "0.5182617...
0.51148987
24
Alert admins of bad data.
def ensure_valid_data(): cursor = connection.cursor() cursor.execute("SELECT id, name, st_area(geom) FROM firestation_firedepartment where st_area(geom)>6.99") messages = [] for id, name, area in cursor.fetchall(): messages.append('{0} ({1}) has an area of {2}.'.format(name, id, area)) if ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def alert(self, msg):\n raise DatacheckException(msg)", "def bad_data_fail(self, good_data, bad_data, message):\n self.add_fail(bad_data, message)\n self.update_fail(good_data, bad_data, message)", "def test_wrong_input():\n dwd = DwdWeatherWarningsAPI(None)\n assert not dwd.data_val...
[ "0.6822392", "0.6797419", "0.6265764", "0.62461734", "0.6173034", "0.61123043", "0.6110145", "0.60627073", "0.60338", "0.5899626", "0.588077", "0.5849682", "0.58488953", "0.57922304", "0.5764811", "0.57638144", "0.57594824", "0.57566947", "0.5752468", "0.57502234", "0.5721725...
0.6419387
2
perform checks before putting
def put(self, obj): if obj is None: return assert isinstance(obj, str), ( f"object is not of type string, " f"but {type(obj)} for chromosome attribute") obj = obj.strip() return obj
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check(self):\n pass", "def check(self):\n pass", "def check(self):\n pass", "def check(self):\n pass", "def check():", "def check(self) -> None:", "def sanity_check(self):\n pass", "def test_kyc_put_legal(self):\n pass", "def test_kyc_put_request_legal(...
[ "0.64063424", "0.64063424", "0.64063424", "0.64063424", "0.6312284", "0.62936074", "0.6288588", "0.62868565", "0.5945857", "0.5909934", "0.5906215", "0.5879941", "0.5835275", "0.58167183", "0.57523745", "0.57318497", "0.57096094", "0.5704199", "0.57000655", "0.5681482", "0.56...
0.0
-1
perform checks before putting
def put(self, obj): if obj is None: return assert isinstance(obj, str), ( f"object is not of type string, " f"but {type(obj)} for email attribute") obj = obj.strip() if not self.is_email(obj): raise dj.DatajointError( f"...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check(self):\n pass", "def check(self):\n pass", "def check(self):\n pass", "def check(self):\n pass", "def check():", "def check(self) -> None:", "def sanity_check(self):\n pass", "def test_kyc_put_legal(self):\n pass", "def test_kyc_put_request_legal(...
[ "0.64063424", "0.64063424", "0.64063424", "0.64063424", "0.6312284", "0.62936074", "0.6288588", "0.62868565", "0.5945857", "0.5909934", "0.5906215", "0.5879941", "0.5835275", "0.58167183", "0.57523745", "0.57318497", "0.57096094", "0.5704199", "0.57000655", "0.5681482", "0.56...
0.0
-1
perform checks before putting
def put(self, obj): if obj is None: return assert isinstance(obj, str), ( f"object is not of type string, " f"but {type(obj)} for link attribute") obj = obj.strip() if not self.is_url(obj): raise dj.DatajointError( f"str...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check(self):\n pass", "def check(self):\n pass", "def check(self):\n pass", "def check(self):\n pass", "def check():", "def check(self) -> None:", "def sanity_check(self):\n pass", "def test_kyc_put_legal(self):\n pass", "def test_kyc_put_request_legal(...
[ "0.64063424", "0.64063424", "0.64063424", "0.64063424", "0.6312284", "0.62936074", "0.6288588", "0.62868565", "0.5945857", "0.5909934", "0.5906215", "0.5879941", "0.5835275", "0.58167183", "0.57523745", "0.57318497", "0.57096094", "0.5704199", "0.57000655", "0.5681482", "0.56...
0.0
-1
perform checks before putting
def put(self, obj): if obj is None: return assert isinstance(obj, str), ( f"object is not of type string, " f"but {type(obj)} for fly identifier attribute") obj = obj.strip() return obj
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check(self):\n pass", "def check(self):\n pass", "def check(self):\n pass", "def check(self):\n pass", "def check():", "def check(self) -> None:", "def sanity_check(self):\n pass", "def test_kyc_put_legal(self):\n pass", "def test_kyc_put_request_legal(...
[ "0.64063424", "0.64063424", "0.64063424", "0.64063424", "0.6312284", "0.62936074", "0.6288588", "0.62868565", "0.5945857", "0.5909934", "0.5906215", "0.5879941", "0.5835275", "0.58167183", "0.57523745", "0.57318497", "0.57096094", "0.5704199", "0.57000655", "0.5681482", "0.56...
0.0
-1
perform checks before putting
def put(self, obj): if obj is None: return assert isinstance(obj, str), ( f"object is not of type string, " f"but {type(obj)} for phone attribute") obj = obj.strip() return obj
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check(self):\n pass", "def check(self):\n pass", "def check(self):\n pass", "def check(self):\n pass", "def check():", "def check(self) -> None:", "def sanity_check(self):\n pass", "def test_kyc_put_legal(self):\n pass", "def test_kyc_put_request_legal(...
[ "0.64063424", "0.64063424", "0.64063424", "0.64063424", "0.6312284", "0.62936074", "0.6288588", "0.62868565", "0.5945857", "0.5909934", "0.5906215", "0.5879941", "0.5835275", "0.58167183", "0.57523745", "0.57318497", "0.57096094", "0.5704199", "0.57000655", "0.5681482", "0.56...
0.0
-1
perform checks before putting
def put(self, obj): if obj is None: return return obj
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check(self):\n pass", "def check(self):\n pass", "def check(self):\n pass", "def check(self):\n pass", "def check():", "def check(self) -> None:", "def sanity_check(self):\n pass", "def test_kyc_put_legal(self):\n pass", "def test_kyc_put_request_legal(...
[ "0.64063424", "0.64063424", "0.64063424", "0.64063424", "0.6312284", "0.62936074", "0.6288588", "0.62868565", "0.5945857", "0.5909934", "0.5906215", "0.5879941", "0.5835275", "0.58167183", "0.57523745", "0.57318497", "0.57096094", "0.5704199", "0.57000655", "0.5681482", "0.56...
0.0
-1
perform checks before putting and archive folder
def put(self, obj): if obj is None: return assert os.path.exists(obj), f'path {obj} does not exist.' return shutil.make_archive(obj, 'tar', obj)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cleanup(self):\n\tprint \"clean up on \" + self.dest\n for root, folders, files in os.walk(self.dest):\n for ignore_dir in self.ignore_dirs:\n if ignore_dir in folders:\n folders.remove(ignore_dir)\n\t\t \n for folder in folders:\n ...
[ "0.6370808", "0.6225592", "0.62077785", "0.6137751", "0.6075538", "0.6057225", "0.60368603", "0.5942488", "0.5918768", "0.5908994", "0.5833908", "0.5781163", "0.57804674", "0.57796544", "0.5739799", "0.5730816", "0.572683", "0.57100546", "0.56980115", "0.5687505", "0.5684778"...
0.0
-1
perform checks before putting and archive folder
def put(self, obj): if obj is None: return obj = self.put_process(obj) return Placeholder(obj).write()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cleanup(self):\n\tprint \"clean up on \" + self.dest\n for root, folders, files in os.walk(self.dest):\n for ignore_dir in self.ignore_dirs:\n if ignore_dir in folders:\n folders.remove(ignore_dir)\n\t\t \n for folder in folders:\n ...
[ "0.6370808", "0.6225592", "0.62077785", "0.6137751", "0.6075538", "0.6057225", "0.60368603", "0.5942488", "0.5918768", "0.5908994", "0.5833908", "0.5781163", "0.57804674", "0.57796544", "0.5739799", "0.5730816", "0.572683", "0.57100546", "0.56980115", "0.5687505", "0.5684778"...
0.0
-1
Test the correctness of parse_cli
def test_parse_cli_inline(argv): args = parse_cli(argv) assert args['do_recovery_mode'] is False assert args['load | inline'] == 'inline' assert args['log_level'] == 'DEBUG' assert args['no_scrape'] is False assert args['master_csv_file'] == 'TEST_search' assert args['log_file'] == 'TEST_log...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_cli_parser_good(self):\n ARGV = ([],)\n for argv in ARGV:\n opts, args = self.cmd.OptionParser.parse_args(argv)\n self.cmd.ValidateOptions(opts, args)", "def test_parse(self):\n cli = Cli()\n cli.create_parser()\n argv = ['/path/to/valetcli.py', '...
[ "0.789649", "0.77669007", "0.760071", "0.7338034", "0.7122659", "0.7029898", "0.7025214", "0.69602925", "0.6853198", "0.6840376", "0.67928237", "0.67558324", "0.67503446", "0.67503446", "0.6691461", "0.6660813", "0.6649965", "0.6646028", "0.6633145", "0.6633145", "0.6619696",...
0.7035463
5
Returns the table ref of this data source
def table_ref(self): return self._table_ref
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def table(self):\n return self.reference.table", "def get_tablename(self):\n return self.ds_table", "def _get_table(self):\n\t\treturn self._table", "def getTable(self):\n return self.table", "def table(self):\n return self._table_name", "def table_reference(self) -> 'outputs....
[ "0.80259466", "0.7685921", "0.74390745", "0.7402559", "0.7323773", "0.730483", "0.72898585", "0.72898585", "0.72102654", "0.7203599", "0.71419007", "0.7136916", "0.7059128", "0.6891377", "0.68354404", "0.6753009", "0.67144763", "0.6667032", "0.658848", "0.6525942", "0.6496132...
0.80833095
0
Sets the table ref of this data source
def table_ref(self, table_ref): self._table_ref = table_ref
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def table(self, table):\n self._table = table", "def table(self, table):\n self._table = table", "def table(self, table):\n self._table = table\n return self", "def set_tablename(self, name):\n self.ds_table = name", "def setTable(self, tabledef):\n if isinstance(t...
[ "0.739735", "0.739735", "0.7211746", "0.7137724", "0.7083364", "0.66676944", "0.65916336", "0.6471779", "0.64186233", "0.6321501", "0.61828244", "0.6096648", "0.606003", "0.58967596", "0.58615065", "0.5810949", "0.57010216", "0.56777436", "0.56641984", "0.5638385", "0.562644"...
0.82613385
0
Creates a HiveOptions from a protobuf representation of a hive option
def from_proto(cls, hive_options_proto: Any): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _pacbio_legacy_option_from_dict(d):\n warnings.warn(\n \"This is obsolete and will disappear soon\",\n DeprecationWarning)\n\n opt_id = d['pb_option']['option_id']\n name = d['pb_option']['name']\n default = d['pb_option']['default']\n desc = d['pb_option']['description']\n opti...
[ "0.61288893", "0.5841968", "0.5561387", "0.541132", "0.5346837", "0.53381705", "0.52984047", "0.5268845", "0.52168745", "0.51290756", "0.5099677", "0.5046146", "0.50235265", "0.5022524", "0.50158", "0.49905807", "0.49835107", "0.49617806", "0.49509934", "0.49315557", "0.49299...
0.7752231
0
Converts an HiveOptionsProto object to its protobuf representation.
def to_proto(self) -> None: pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def from_proto(cls, hive_options_proto: Any):\n\n pass", "def to_proto(self) -> DataSourceProto.SnowflakeOptions:\n snowflake_options_proto = DataSourceProto.SnowflakeOptions(\n database=self.database,\n schema=self.schema,\n table=self.table,\n query=sel...
[ "0.7097873", "0.6357975", "0.6304986", "0.6124311", "0.6100323", "0.60680044", "0.5816296", "0.5685006", "0.5551443", "0.54393303", "0.5410463", "0.5405566", "0.53746617", "0.53456974", "0.532668", "0.52766335", "0.5231321", "0.5231321", "0.5231321", "0.5231321", "0.5231321",...
0.6204155
3
Returns the hive options of this data source
def hive_options(self): return self._hive_options
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hive_options(self, hive_options):\n self._hive_options = hive_options", "def get_options(self):\n\t\treturn self.options", "def options(self):\r\n return self._options", "def options(self):\n return self._options", "def options(self):\n return self._options", "def options(self...
[ "0.6753955", "0.64224505", "0.6406258", "0.6329274", "0.6329274", "0.6329274", "0.6329274", "0.6329274", "0.6297048", "0.62957364", "0.6286461", "0.6261513", "0.6254374", "0.6164323", "0.6094738", "0.60717124", "0.60363626", "0.59543324", "0.5833424", "0.58288234", "0.5753857...
0.8826298
0
Sets the bigquery options of this data source
def hive_options(self, hive_options): self._hive_options = hive_options
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bigquery_options(self) -> 'outputs.BigQueryOptionsResponse':\n return pulumi.get(self, \"bigquery_options\")", "def big_query_options(self) -> Optional['outputs.PreventionJobTriggerInspectJobStorageConfigBigQueryOptions']:\n return pulumi.get(self, \"big_query_options\")", "def set_options(se...
[ "0.65928924", "0.6101593", "0.57456267", "0.5547977", "0.5518901", "0.549859", "0.54235613", "0.54235613", "0.5412499", "0.53887933", "0.537318", "0.5291184", "0.5291184", "0.5283031", "0.52768576", "0.52163446", "0.51997364", "0.51991886", "0.51731884", "0.51692474", "0.5151...
0.5851523
2
Create a weight variable with appropriate initialization.
def weight_variable(shape): initial = tf.truncated_normal(shape, stddev=0.1) return tf.Variable(initial)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_weights(w_shape, layer_index, weight_initializer):\n\n return tf.Variable(weight_initializer(w_shape), name=\"weight{}\".format(layer_index))", "def create_weight_variable(shape):\n\n\tinitial = tf.truncated_normal(shape, stddev=0.1)\n\treturn tf.Variable(initial)", "def create_weight_variable(self...
[ "0.7488408", "0.74720937", "0.7405868", "0.72809917", "0.72787005", "0.71421415", "0.713525", "0.71276236", "0.71212006", "0.70939875", "0.7087074", "0.70695806", "0.70695806", "0.70695806", "0.7069513", "0.7069513", "0.70677656", "0.70641536", "0.70390767", "0.7034903", "0.6...
0.70010847
27
Create a bias variable with appropriate initialization.
def bias_variable(shape): initial = tf.constant(0.1, shape=shape) return tf.Variable(initial)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_bias_variable(shape):\n\tinitial = tf.constant(0.1, shape=shape)\n\treturn tf.Variable(initial)", "def bias_variable(shape):\r\n initial = tf.constant(0.1, shape=shape)\r\n return tf.Variable(initial)", "def bias_variable(shape):\r\n initial = tf.constant(0.1, shape=shape)\r\n return tf.Variable...
[ "0.78015333", "0.75626266", "0.75626266", "0.75626266", "0.7548899", "0.75442374", "0.7518933", "0.75147045", "0.7508021", "0.7448169", "0.7388002", "0.73704433", "0.7368935", "0.7359967", "0.7337988", "0.73341197", "0.73031884", "0.72974455", "0.7269724", "0.718556", "0.7169...
0.7519763
14
Read dataset file and assigns dataframe object to _df
def read_csv(self) -> None: self._df = pd.read_csv(self._dataset_file)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialize_from_file(filename):\r\n df = pd.read_csv(filename)\r\n return df", "def load_file(self):\n\n self.df = self.sqlContext.read.csv(self.source, sep=self.sep, header=True, inferSchema=True)", "def __init__(self, file_path: str):\n self._data: pd.DataFrame = self.read_input_and_s...
[ "0.73519945", "0.71827435", "0.7137628", "0.71346796", "0.7073277", "0.7056249", "0.7042096", "0.7015911", "0.6976835", "0.69308776", "0.6821296", "0.6812685", "0.6812685", "0.6812685", "0.67467344", "0.6741589", "0.67386633", "0.6737851", "0.6723442", "0.669246", "0.6677787"...
0.7191624
1
Splits the dataset in to training set and testing set
def train_test_split(self) -> None: X = self._df[['Avg. Area Income', 'Avg. Area House Age', 'Avg. Area Number of Rooms', 'Avg. Area Number of Bedrooms', 'Area Population']] y = self._df['Price'] self._X_train, self._X_test, self._y_train, self._y_test = train_test_split(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def split_data_into_train_and_test(raw_training_data):\n train_set, test_set = train_test_split(raw_training_data, test_size=0.2, random_state=42)\n return train_set, test_set", "def __split_dataset(self):\n self.train, self.valid, _, _ = train_test_split(self.data, self.data, test_size=0.2)\n ...
[ "0.86097497", "0.8584347", "0.82286584", "0.82185394", "0.8021438", "0.794746", "0.79276013", "0.7921467", "0.791578", "0.7897465", "0.78501225", "0.7830136", "0.7821321", "0.78176755", "0.7755438", "0.7750092", "0.7728479", "0.77197564", "0.77020323", "0.7688907", "0.7685516...
0.0
-1
Predict results by passing testing set
def test(self) -> None: self._predictions = self._lr.predict(self._X_test)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def predict(model, X_testing):\n predictions = model.predict(X_testing)\n\n return predictions", "def _predict(self, testX):\n pass", "def predict(self, model, x_test):\n pass", "def predict(self):\n self.predicted_test_summary = []\n for step in xrange(0, self.test_size // ...
[ "0.77425396", "0.7685487", "0.7646677", "0.7595327", "0.75422746", "0.73988783", "0.7398243", "0.73687375", "0.7357945", "0.73252916", "0.73109376", "0.7283171", "0.7282185", "0.72734445", "0.7265906", "0.72417575", "0.72257596", "0.72181785", "0.7181559", "0.71623665", "0.71...
0.76542985
2
Add performance metrics to database
def add_metrics_to_db(self) -> None: model = { 'id': 'model1', 'name': 'Housing Price Prediction', 'metrics': { 'mean_squared_error': mean_squared_error(self._y_test, self._predictions), 'mean_absolute_error': mean_absolute_error(self....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _upsert_ad_performance(ad_insights: [adsinsights.AdsInsights], con: sqlite3.Connection):\n con.execute(\"\"\"\nCREATE TABLE IF NOT EXISTS ad_performance (\n date DATE NOT NULL,\n ad_id BIGINT NOT NULL,\n device TEXT NOT NULL,\n performance TEXT NOT NULL,\n PRIMARY KEY (a...
[ "0.6532678", "0.6473024", "0.6408329", "0.62970644", "0.6142278", "0.6128735", "0.60779417", "0.60430735", "0.5946224", "0.5942702", "0.58619076", "0.57984644", "0.57819676", "0.57261676", "0.5714961", "0.5689637", "0.56649697", "0.56607974", "0.5641271", "0.56071305", "0.560...
0.6575922
0
Activation Function Factory Fetching activation fns by name with this function allows export or torch script friendly functions to be returned dynamically based on current config.
def get_act_fn(name: Union[Callable, str] = 'relu'): if not name: return None if isinstance(name, Callable): return name if not (is_no_jit() or is_exportable() or is_scriptable()): # If not exporting or scripting the model, first look for a memory-efficient version with # cus...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_activation_function(actfn):\n if actfn is None or actfn == 'leakyrelu':\n def create_actfn(): return nn.LeakyReLU(0.1, inplace=True)\n elif actfn == 'gelu':\n def create_actfn(): return nn.GELU()\n elif actfn == 'relu':\n def create_actfn(): return nn.ReLU()\n elif actfn ==...
[ "0.7709504", "0.7703423", "0.7566543", "0.733727", "0.7217905", "0.70934486", "0.7070261", "0.70144457", "0.6999662", "0.69694537", "0.6923915", "0.6920413", "0.6833888", "0.6814469", "0.6797125", "0.6756928", "0.66894156", "0.6688757", "0.66773456", "0.6592943", "0.6562235",...
0.66144866
19
Activation Layer Factory Fetching activation layers by name with this function allows export or torch script friendly functions to be returned dynamically based on current config.
def get_act_layer(name: Union[Type[nn.Module], str] = 'relu'): if not name: return None if not isinstance(name, str): # callable, module, etc return name if not (is_no_jit() or is_exportable() or is_scriptable()): if name in _ACT_LAYER_ME: return _ACT_LAYER_ME[nam...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_activation_by_name(name: str) -> Any:\n\n methods = {\n \"elu\": nn.ELU,\n \"hardshrink\": nn.Hardshrink,\n \"hardtanh\": nn.Hardtanh,\n \"leakyrelu\": nn.LeakyReLU,\n \"logsigmoid\": nn.LogSigmoid,\n \"prelu\": nn.PReLU,\n \"relu\": nn.ReLU,\n \"r...
[ "0.7152628", "0.70717144", "0.6963733", "0.6800435", "0.6777995", "0.6755335", "0.67358005", "0.6719022", "0.65349716", "0.6503413", "0.6461656", "0.6411131", "0.6332975", "0.6296324", "0.61543286", "0.6150409", "0.61462146", "0.61194414", "0.6103528", "0.60810024", "0.602140...
0.7186623
0
Save experience in replay memory, and use random sample from buffer to learn.
def step(self, i_episode, states, actions, rewards, next_states, dones): #for stepping maddpg # index 0 is for agent 0 and index 1 is for agent 1 full_states = np.reshape(states, newshape=(-1)) full_next_states = np.reshape(next_states, newshape=(-1)) # Save experience /...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def experience_replay(self):\n s,a,r,sp,done = self.memory.sample(self.batch_size)\n # TODO: 5 lines missing.\n raise NotImplementedError(\"\")\n self.Q.fit(s, target=target)", "def learn(self, observation, action, reward, next_observation):\n\n # log transition in replay buffe...
[ "0.7432516", "0.7182478", "0.6886833", "0.67874074", "0.6731716", "0.6636102", "0.66345346", "0.66138947", "0.6543699", "0.6497502", "0.6451577", "0.6389564", "0.6332785", "0.62195915", "0.6159922", "0.6121658", "0.6121271", "0.609036", "0.6004049", "0.6001487", "0.59934896",...
0.0
-1
Declare a shooting problem.
def __init__(self, initialState, runningModels, terminalModel): self.T = len(runningModels) self.initialState = initialState self.runningModels = runningModels self.runningDatas = [m.createData() for m in runningModels] self.terminalModel = terminalModel self.terminalData...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def shoot(self):\n if self.gun_interface:\n self.gun_interface.prepare_fire()", "def shoot(self):\n if self.direction == 'left':\n self.__temp_bullet = Bullet(self.position, 60)\n elif self.direction == 'forward':\n self.__temp_bullet = Bullet(self.position, ...
[ "0.56008565", "0.55270535", "0.54833525", "0.5430301", "0.53918797", "0.5383011", "0.53665394", "0.5345428", "0.5345337", "0.53423893", "0.5324697", "0.529999", "0.528767", "0.5259905", "0.525908", "0.5257776", "0.5252279", "0.52255523", "0.5192397", "0.5189819", "0.51127785"...
0.0
-1
Compute the cost and the next states.
def calc(self, xs, us): return sum([m.calc(d, x, u)[1] for m, d, x, u in zip(self.runningModels, self.runningDatas, xs[:-1], us) ]) + self.terminalModel.calc(self.terminalData, xs[-1])[1]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def calculate_total_cost(state):\n pass", "def calculate_total_cost(state):\r\n return state.cost()", "def _calculate_costs(self):\n cost = 0\n cost += self._cost_route_fine()\n cost += self._cost_petrol()\n cost += self._cost_wage()\n cost += self._cost_refueling()\n ...
[ "0.76373726", "0.72070503", "0.67646766", "0.67577505", "0.67577505", "0.66819763", "0.660391", "0.65538424", "0.65485996", "0.6544549", "0.6538988", "0.64895856", "0.6472427", "0.6431436", "0.6382363", "0.6363025", "0.6363025", "0.6363025", "0.6353716", "0.6349699", "0.63492...
0.0
-1
Compute the costanddynamics derivatives. These quantities are computed along a given pair of trajectories xs (states) and us (controls).
def calcDiff(self, xs, us): assert (len(xs) == self.T + 1) assert (len(us) == self.T) for m, d, x, u in zip(self.runningModels, self.runningDatas, xs[:-1], us): m.calcDiff(d, x, u) self.terminalModel.calcDiff(self.terminalData, xs[-1]) return sum([d.cost for d in self...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _derivatives(self, state, forces_moments):\n # extract the states\n pn = state.item(0)\n pe = state.item(1)\n pd = state.item(2)\n u = state.item(3)\n v = state.item(4)\n w = state.item(5)\n e0 = state.item(6)\n e1 = state.item(7)\n e2 = sta...
[ "0.6736519", "0.66151404", "0.6510984", "0.6409203", "0.63433456", "0.63311434", "0.63311434", "0.628843", "0.62765545", "0.61955446", "0.6077892", "0.6009594", "0.59897405", "0.59870833", "0.59825754", "0.5915391", "0.5874517", "0.5865866", "0.58614683", "0.58387035", "0.582...
0.6450763
3
Integrate the dynamics given a control sequence.
def rollout(self, us): xs = [self.initialState] for m, d, u in zip(self.runningModels, self.runningDatas, us): xs.append(m.calc(d, xs[-1], u)[0].copy()) return xs
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def integrate(self, t):", "def integrate(self, steps, dt = None):\n if not self.rank:\n logging.info('Integrating the system for {} steps'.format(steps))\n\n for tup in self.monitorList:\n self.lmp.command('compute {} {} {}'.format(*tup))\n\n if dt is not None:\n self.lmp.command('timeste...
[ "0.6406757", "0.6278095", "0.6168474", "0.61609006", "0.60761815", "0.6057968", "0.6005796", "0.5933035", "0.59059316", "0.5884235", "0.57506615", "0.5640247", "0.56097686", "0.5600279", "0.559763", "0.5567834", "0.5558304", "0.5551102", "0.5548771", "0.5546171", "0.5543847",...
0.0
-1
Traverse the tree depth first to produce a list of its values, in order.
def in_order(node): result = [] if node is None: return result result.extend(in_order(node._lesser)) result.append(node.value) result.extend(in_order(node._greater)) return result
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def preorder_traverse_to_list(self):\n\t\tif (not self.root()):\n\t\t\treturn None\n\t\tself._synchronize_attributes()\n\t\treturn self._preorder_traverse_to_list_helper(self.root(), 1)", "def _inorder_traverse_to_list_helper(self, node):\n\t\tl = []\n\t\tif (node.lchild()):\n\t\t\tl += self._inorder_traverse_to...
[ "0.7284819", "0.71009934", "0.7031688", "0.68935096", "0.6881712", "0.6846759", "0.6777454", "0.67478263", "0.6723486", "0.67141414", "0.6703881", "0.6651136", "0.66480845", "0.6636946", "0.6624476", "0.6623213", "0.6617307", "0.6609464", "0.6588781", "0.6559577", "0.6545898"...
0.6070567
61
Gets the data created in the preprocessing step
def getData(): with open('obj/documents.pkl', 'rb') as file: data = pickle.load(file) return data
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def preprocess(self,data):\n preprocessObj = PreprocessData()\n preprocess_data = preprocessObj.preprocess(data)\n return preprocess_data", "def get_preprocess(self) -> Dict:\n input_shape = get_input_shape(self.deploy_cfg)\n cfg = process_model_config(self.model_cfg, [''], inp...
[ "0.7315519", "0.6735183", "0.6597745", "0.6570853", "0.65492064", "0.6489413", "0.6478915", "0.6447066", "0.63943356", "0.6359474", "0.6359474", "0.6359474", "0.63155806", "0.62731504", "0.62699586", "0.62156516", "0.6211014", "0.62030315", "0.6199859", "0.6194532", "0.617712...
0.0
-1
This function will create kgram shingles of the given list of documents These shingle will be mapped to an integer starting from 0 upto the amount of unique shingles1
def create_shingles(data, k): shingle_dict = dict() new_shingle_data = list() counter = 0 for row in data: rowLen = len(row) dataSet = set() for i in range(rowLen): shingle = "" end = False for j in range(i, i+k): if j < rowLen:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def computeShingles(q, document):\n shingles = []\n for i in range(len(document) - q + 1):\n shingle = \"\"\n for j in range(i,i+q):\n shingle += document[j]\n shingles.append(shingle)\n return shingles", "def generate_shingles(input_path, output_path, w=3):\n j = 0\n ...
[ "0.67824256", "0.6367405", "0.5835742", "0.5742281", "0.5741155", "0.5707629", "0.56785816", "0.56361556", "0.56329596", "0.5627037", "0.5607358", "0.5552314", "0.5540847", "0.5519311", "0.54999167", "0.5490055", "0.5477467", "0.5469412", "0.5448132", "0.5428961", "0.5425567"...
0.66990095
1
Return a list of fastq files for a sample
def get_fastq_files(wildcards): return expand(os.path.join(fastq_dir, "{sample}_{readpair}.fastq"), readpair=[1, 2], **wildcards)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_fastqc_files(sample, unit, pairs, config, pre):\n if config[\"preprocessing\"][\"fastqc\"]:\n files = expand(config[\"paths\"][\"results\"]+\"/intermediate/fastqc/{sample}_{unit}_{pair}{PREPROCESS}_fastqc.zip\",\n sample=sample, unit=unit, pair=pairs, PREPROCESS=pre)\n ...
[ "0.7235477", "0.69955313", "0.694868", "0.6912009", "0.68494976", "0.68432003", "0.67609453", "0.6671568", "0.6637574", "0.66306156", "0.6463436", "0.63523906", "0.6314824", "0.62729365", "0.62422514", "0.62312776", "0.61750907", "0.61349267", "0.61219597", "0.61131996", "0.6...
0.74324495
0
Establish a new Connection to the target host.
def connect(self, host, auth): return Connection(host, auth)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _connect_to_target(self, host):\n port = 80\n if ':' in host:\n host, _, port = host.partition(':')\n (socket_family, _, _, _, address) = socket.getaddrinfo(host, port)[0]\n self.target = socket.socket(socket_family)\n self.target.connect(address)", "def new_conn...
[ "0.7484223", "0.7296113", "0.71882725", "0.68915063", "0.68278116", "0.68010336", "0.6698556", "0.6666446", "0.6657398", "0.6599172", "0.6592253", "0.65872127", "0.6579724", "0.64832634", "0.64634055", "0.646099", "0.64292514", "0.6424823", "0.6422951", "0.64205223", "0.64008...
0.6826985
5
Manually add a connection to the given host to the manager.
def add(self, host, auth, conn): self.conns[(host, auth)] = conn
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add(self, host, **kwargs):\n self.configs_[0][1].add(host, **kwargs)", "def connect(self, host):\n if not self.app.connect(host):\n command = \"Connect({0})\".format(host).encode(\"utf-8\")\n self.exec_command(command)\n self.last_host = host", "def put_http_conne...
[ "0.6808785", "0.6553107", "0.64744145", "0.63056237", "0.628429", "0.6277616", "0.6277616", "0.6277616", "0.6277616", "0.6183404", "0.61097676", "0.6090129", "0.60137916", "0.59971344", "0.5995894", "0.5946697", "0.59274036", "0.5888396", "0.58841246", "0.58552635", "0.578421...
0.7374451
0
Add a connection hook to call to establish new connections.
def add_conn_hook(self, hook): self._conn_hooks.append(hook)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def handle_connect(self):\n pass", "def __setup_conn__(self, **kwargs):\n self.ext_conn = setup_conn(**kwargs)", "def add_connection(self, connection):\n self.connections.append(connection)", "def install_connection(connection):\n global _connection\n _connection = connection", "...
[ "0.6542846", "0.63578016", "0.62390274", "0.6225715", "0.62094665", "0.6207269", "0.61733675", "0.6155529", "0.613016", "0.6120211", "0.6120178", "0.60572773", "0.6049189", "0.6049189", "0.6049189", "0.60206264", "0.6017511", "0.5992856", "0.59708303", "0.59135336", "0.588404...
0.8143728
0
Drop all connection hooks.
def clear_hooks(self): self._conn_hooks = []
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dropConnection(): #@NoSelf", "def _shutdown(self):\n self.logger.debug(\"Unregistering feature modules.\")\n for feature in self._features.values():\n try:\n if hasattr(feature.handle, \"module_unregister\"):\n self.eventloop.run_until_complete(feat...
[ "0.68577594", "0.6616656", "0.66142684", "0.65215844", "0.6480401", "0.64762944", "0.64350116", "0.64162797", "0.6381791", "0.63806885", "0.63268006", "0.6322851", "0.6251294", "0.6248939", "0.62343895", "0.62227136", "0.6218636", "0.6218636", "0.6214084", "0.61898184", "0.61...
0.8032567
0
Close and forget all connections.
def reset(self): for conn in self.conns.values(): conn.close() self.conns = {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def close_all_connections(self):\n self.close_TCP_connections()\n self.close_UDP_connection()", "def close_connections(self):\n self._connection.close_connection()", "def close(self):\n for conn in self._conns:\n conn.send((self.CLOSE,()))", "def killconnections(self):\n f...
[ "0.8459086", "0.8080514", "0.80522937", "0.7983042", "0.7797313", "0.77388585", "0.7685723", "0.7669269", "0.76438177", "0.76127744", "0.75959915", "0.7548627", "0.74798906", "0.74630356", "0.7419894", "0.74126375", "0.7401742", "0.7373296", "0.7371131", "0.7366986", "0.73507...
0.7572103
11
Find a connection to the given host, trying hooks as needed.
def find(self, host, auth): key = (host, auth) if key not in self.conns: conn = None hooks = self._conn_hooks or self._default_hooks for hook in hooks: conn = hook.connect(host, auth) if conn: logger.info("Establishe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _search_connection(self, host, login, passwd, conn):\n self._connections_lock.acquireRead()\n try:\n if (host in self._connections):\n connections = self._connections[host]\n\n for connection in connections:\n if (connection.login == log...
[ "0.6699842", "0.6128602", "0.6030898", "0.585696", "0.58262634", "0.57517755", "0.57059544", "0.563675", "0.56287616", "0.5608209", "0.5578952", "0.5518781", "0.5487876", "0.5470335", "0.5441373", "0.5431511", "0.5421753", "0.54134536", "0.540528", "0.5404659", "0.53588086", ...
0.7668413
0
Initialize new connection and setup authentication
def __init__(self, hostname, auth=None, port=None, verify=True, timeout=None): p = parse_url(hostname) if not p.scheme: raise URLError('Scheme must be provided (e.g. https:// ' 'or http://).') else: if p.port and port and p.port...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _setup_connection(self):\r\n if self.connection.password:\r\n if not self.format_inline('AUTH', self.connection.password):\r\n raise AuthenticationError(\"Invalid Password\")\r\n self.format_inline('SELECT', self.connection.db)", "def authenticate(self):\n self....
[ "0.7364045", "0.72689015", "0.72319746", "0.7148008", "0.71477985", "0.7095636", "0.70943534", "0.7046933", "0.7017033", "0.70062184", "0.68988526", "0.6887575", "0.6886966", "0.68774736", "0.68099636", "0.6809529", "0.67822766", "0.6779107", "0.67741674", "0.67638195", "0.67...
0.0
-1
Returns a fully qualified URL given a URI.
def get_url(self, uri): # TODO make this a prepend_if_needed type method return urllib.parse.urljoin(self.hostname, uri)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getQualifiedURL(uri = None):\n schema, stdport = ('http', '80')\n host = os.environ.get('HTTP_HOST')\n if not host:\n host = os.environ.get('SERVER_NAME')\n port = os.environ.get('SERVER_PORT', '80')\n if port != stdport: host = host + \":\" + port\n result = \"%s://%s\" % (sch...
[ "0.7353941", "0.69257873", "0.6902368", "0.68242913", "0.64607567", "0.64334136", "0.63883835", "0.6377446", "0.6356064", "0.6309383", "0.6280118", "0.62178695", "0.6212839", "0.61945224", "0.61942387", "0.6174435", "0.61667067", "0.6149685", "0.609751", "0.6057507", "0.60546...
0.7861528
0
Send a JSON request and receive JSON response.
def json_request(self, method, uri, body=None, params=None, extra_headers=None): if extra_headers: extra_headers = CaseInsensitiveDict(extra_headers) else: extra_headers = CaseInsensitiveDict() extra_headers['Content-Type'] = 'application/json' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _send_json(request, data_to_send):\n request.headers['Content-Type'] = 'application/json\"'\n request.write(json.dumps(data_to_send))", "def send_json_response(self, content):\n self.send_response(200, json.dumps(content), {\"Content-Type\": \"application/json\"})", "def send_json_response(sel...
[ "0.69477665", "0.686363", "0.6847515", "0.68208086", "0.6791301", "0.6746234", "0.6717802", "0.6682115", "0.6671656", "0.66660196", "0.6652781", "0.65837145", "0.6582923", "0.65152216", "0.65123564", "0.6426324", "0.64072484", "0.63792855", "0.63408786", "0.6324233", "0.62799...
0.6438396
15
Add headers that are common to all requests.
def add_headers(self, headers): self.conn.headers.update(headers)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_headers():\n # the actual access token -\n g.x_tapis_token = request.headers.get('X-Tapis-Token')\n\n # the tenant associated with the subject of the request; used, for instance, when the subject is different\n # from the subject in the actual access_token (for example, when the access_token re...
[ "0.7274193", "0.7055511", "0.6992353", "0.6958948", "0.68622136", "0.68403894", "0.68397826", "0.6785243", "0.6772927", "0.67124104", "0.6697894", "0.6691658", "0.6691658", "0.6634484", "0.66233236", "0.661905", "0.660117", "0.6595182", "0.6544099", "0.65099794", "0.64934146"...
0.6993097
2
Permet de faire la bijection de la pollution min max vers les couleurs de hsl
def ExpansionHistogram(x,minPol,maxPol,hsl_range_min,hsl_range_max): if(x>maxPol): x=maxPol """ La fonction renvoie un chiffre situé entre 0 (rouge) et 240(bleu foncé) suivant le code hsl (hue saturation light)""" return (hsl_range_max-hsl_range_min)-(x-minPol)*(hsl_range_max-hsl_range_min)/(ma...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hsl2rgb_img(hsl):\r\n\r\n def core(_hsl, _frgb):\r\n\r\n h, s, l = _hsl[:, :, 0], _hsl[:, :, 1], _hsl[:, :, 2]\r\n fr, fg, fb = _frgb[:, :, 0], _frgb[:, :, 1], _frgb[:, :, 2]\r\n\r\n q = np.zeros(l.shape, dtype=np.float)\r\n\r\n lbot = l < 0.5\r\n q[lbot] = l[lbot] * (1 + ...
[ "0.62312704", "0.61314774", "0.6068035", "0.59876543", "0.5940612", "0.58795935", "0.58724594", "0.5851649", "0.5839745", "0.58272713", "0.5802472", "0.5754082", "0.5753215", "0.57415736", "0.5727646", "0.5726134", "0.5722", "0.57144314", "0.57007027", "0.5677919", "0.5664192...
0.5985039
4
Just creating file with latin content
def test_001(compiler, temp_builds_dir): filepath = temp_builds_dir.join("compiler_write_001") content = """Some sample latin text""" compiler.write_content(content, filepath.strpath) # Read file to compare with io.open(filepath.strpath, "r", encoding="utf-8") as f: result = f.read() ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _make_i18n_data_file(cls, filename, encoding):\n cls.cluster.fs.setuser(cls.cluster.superuser)\n f = cls.cluster.fs.open(filename, \"w\")\n for x in range(256):\n f.write(\"%d\\t%s\\n\" % (x, chr(x).encode(encoding)))\n f.close()", "def encoding():\n\n return render_template(\"UTF-8-demo....
[ "0.7064357", "0.6776988", "0.6578836", "0.65013456", "0.62450314", "0.62393785", "0.620594", "0.61627495", "0.6159394", "0.6135996", "0.6135142", "0.6126187", "0.61208713", "0.6098372", "0.604653", "0.60163295", "0.6015391", "0.600724", "0.6000824", "0.5938493", "0.5927096", ...
0.5417048
95
Creating file with unicode content
def test_002(compiler, temp_builds_dir): filepath = temp_builds_dir.join("compiler_write_002") content = """Some sample unicode text: フランス Furansu""" compiler.write_content(content, filepath.strpath) # Read file to compare with io.open(filepath.strpath, "r", encoding="utf-8") as f: result...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _make_i18n_data_file(cls, filename, encoding):\n cls.cluster.fs.setuser(cls.cluster.superuser)\n f = cls.cluster.fs.open(filename, \"w\")\n for x in range(256):\n f.write(\"%d\\t%s\\n\" % (x, chr(x).encode(encoding)))\n f.close()", "def writeToFile(outputFile, unicode_text):\n fp = output...
[ "0.7139403", "0.6796847", "0.67623824", "0.6753765", "0.66229975", "0.658412", "0.649303", "0.6399081", "0.62453264", "0.624415", "0.6229421", "0.6201218", "0.6191225", "0.6185704", "0.61038226", "0.6089903", "0.6053031", "0.60504586", "0.6024504", "0.6020149", "0.6013075", ...
0.6040371
18
Creating file into subdirectory
def test_003(compiler, temp_builds_dir): filepath = temp_builds_dir.join("foo/bar/home.txt") content = """Some sample unicode text: フランス Furansu""" compiler.write_content(content, filepath.strpath) # Read file to compare with io.open(filepath.strpath, "r", encoding="utf-8") as f: result =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create(self, basedir, outdir, name, prefix=None):", "def create_file(dir, path, contents):\n\n fullpath = os.path.join(dir, path)\n fulldir = os.path.dirname(fullpath)\n\n if fulldir:\n try:\n os.makedirs(fulldir)\n except OSError:\n pass\n\n with open(fullpath...
[ "0.7128965", "0.6961224", "0.69359076", "0.67303735", "0.6711864", "0.66364425", "0.66282296", "0.65754485", "0.6557997", "0.65492725", "0.6525128", "0.6505249", "0.6492965", "0.64892393", "0.64599025", "0.645187", "0.64385", "0.6427274", "0.6425376", "0.64211464", "0.6379502...
0.0
-1
Ensure heartbeat route behaves correctly.
def test_heartbeat(self): with self.client: response = self.client.get('/heartbeat') data = response.json self.assert200(response) self.assertIn('status', data)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_heartbeat(self):\n pass", "def test_lbheartbeat(self):\n pass", "def test_heartbeat(self):\n\n def _createHeartbeat():\n heartbeat = self._originalCreateHeartbeat()\n heartbeat.clock = self.clock\n return heartbeat\n\n self.clock = task.Cloc...
[ "0.738589", "0.7217071", "0.71530694", "0.70092535", "0.6911518", "0.6890466", "0.68064296", "0.6629611", "0.6531243", "0.64638907", "0.6451837", "0.64458454", "0.6436933", "0.6274977", "0.620328", "0.61849135", "0.6164859", "0.6147899", "0.61477625", "0.6130222", "0.61235124...
0.6696239
7
Read the "fof_special_particles" files and return an array of the positions of each particles belonging to a group.
def read_groups_particles(filename): f = open(filename,'r') Ntot = fromstring(f.read(4),int32)[0] Pos = fromstring(f.read(3*4*Ntot),float32) Pos.shape = (Ntot,3) f.close() return Pos
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_txt_particles(particles_file, refpart, real_particles, bucket_length, comm, madx_format, verbose):\r\n \r\n four_momentum = refpart.get_four_momentum()\r\n pmass = four_momentum.get_mass()\r\n E_0 = four_momentum.get_total_energy()\r\n p0c = four_momentum.get_momentum()\r\n\r\n myrank = ...
[ "0.6557702", "0.6279666", "0.5980885", "0.59802526", "0.5884605", "0.58215463", "0.5802813", "0.57792974", "0.57417893", "0.57334733", "0.56957585", "0.5649068", "0.5588368", "0.5572744", "0.5500945", "0.54789186", "0.54614913", "0.54000187", "0.53840524", "0.53737193", "0.53...
0.75867194
0
Temporary method compensating heat from CPU
def get_compensated_temperature() -> float: comp_factor = 2.25 cpu_temp = get_cpu_temperature() raw_temp = bme280.get_temperature() comp_temp = raw_temp - ((cpu_temp - raw_temp) / comp_factor) # print(""" # Compensated_Temperature: {:05.2f} *C # Pressure: {:05.2f} hPa # Relative humidity...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def heat(self, delta_temp):\n return self.heat_capacity * self.mass * delta_temp", "def manipulate_heat_data(self): \n self.exh.T_array = ( 0.5 * (self.exh.T_inlet_array +\n self.exh.T_outlet_array) + 273.15)\n self.exh.delta_T_array = ( self.exh.T_inlet_array -\n self.exh.T_ou...
[ "0.6571929", "0.6459942", "0.6335872", "0.6312475", "0.6178309", "0.59901506", "0.59395593", "0.591955", "0.5884153", "0.58707994", "0.58591634", "0.57339036", "0.5699807", "0.56488675", "0.56406903", "0.5631829", "0.5607503", "0.5607118", "0.55986536", "0.55927384", "0.55896...
0.0
-1
returns a parser to take care of the input arguments
def parse_args(): # Define the input parser desc = "computes long term temperature anomaly trend for the GHNC dataset" epilog = """ datarange input argument is of the format: YYYY[MM[DD]][:YYYY[MM[DD]]] Where the date before the optional ':'' represents the lower bound of the range and the optional date after ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_parser():\n p = argparse.ArgumentParser(description='such a good program')\n p.add_argument('infile')\n p.add_argument('outfile')\n return p", "def get_parser():\n parser = argparse.ArgumentParser()\n parser.add_argument('--dataset', type=str)\n parser.add_argument('--method', type=s...
[ "0.80710995", "0.78964806", "0.78557944", "0.7824647", "0.78088844", "0.7806483", "0.7791857", "0.777945", "0.7776109", "0.7775901", "0.77712727", "0.77265626", "0.7722225", "0.767623", "0.76725817", "0.7665575", "0.7636263", "0.7625389", "0.76215315", "0.7595841", "0.7576887...
0.0
-1
Set the randomizer's constraints.
def constraints(self, constraints): if constraints is None: constraints = [] elif not isinstance(constraints, list): constraints = list(constraints) for i, constraint in enumerate(constraints): if isinstance(constraint, TopologicalConstraint): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_constraint(self):\n pass", "def constraints(self, constraints):\n\n self._constraints = constraints", "def constraints(self, constraints):\n if constraints is None:\n constraints = []\n elif not isinstance(constraints, list):\n constraints = list(const...
[ "0.6879659", "0.6500775", "0.6173031", "0.61360043", "0.6097449", "0.6020867", "0.5910971", "0.5768739", "0.5712153", "0.56711173", "0.56591386", "0.5585653", "0.55448335", "0.5540383", "0.5504118", "0.5502025", "0.5500587", "0.54813707", "0.5469679", "0.54523873", "0.5420351...
0.6459238
2
Append a constraint to the randomizer's list of constraints.
def add_constraint(self, constraint): if isinstance(constraint, TopologicalConstraint): pass elif callable(constraint): constraint = GenericTopological(constraint) else: raise TypeError('constraints must be callable or type TopologicalConstraint') sup...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_constraint(self, constraint):\n self.constraints.append(constraint)", "def addConstraint(self, constraint: Constraint, /) -> None:\n ...", "def add_constraint(self, constraint, problem):\n problem += constraint", "def addConstraint(constraint, problem):\n problem += constraint...
[ "0.7566106", "0.7166378", "0.70907533", "0.70876956", "0.6927424", "0.6830355", "0.67416203", "0.663089", "0.6541203", "0.65344965", "0.6498486", "0.64235276", "0.63583535", "0.6280641", "0.62125975", "0.60598946", "0.5997415", "0.58625895", "0.585214", "0.58433443", "0.58116...
0.5698223
24
Set the randomizer's constraints.
def constraints(self, constraints): if constraints is None: constraints = [] elif not isinstance(constraints, list): constraints = list(constraints) for i, constraint in enumerate(constraints): if isinstance(constraint, TopologicalConstraint): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_constraint(self):\n pass", "def constraints(self, constraints):\n\n self._constraints = constraints", "def constraints(self, constraints):\n if constraints is None:\n constraints = []\n elif not isinstance(constraints, list):\n constraints = list(const...
[ "0.6879659", "0.6500775", "0.6459238", "0.61360043", "0.6097449", "0.6020867", "0.5910971", "0.5768739", "0.5712153", "0.56711173", "0.56591386", "0.5585653", "0.55448335", "0.5540383", "0.5504118", "0.5502025", "0.5500587", "0.54813707", "0.5469679", "0.54523873", "0.5420351...
0.6173031
3
Append a constraint to the randomizer's list of constraints.
def add_constraint(self, constraint): if isinstance(constraint, TopologicalConstraint): pass elif callable(constraint): constraint = GenericTopological(constraint) else: raise TypeError('constraints must be callable or type TopologicalConstraint') if ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_constraint(self, constraint):\n self.constraints.append(constraint)", "def addConstraint(self, constraint: Constraint, /) -> None:\n ...", "def add_constraint(self, constraint, problem):\n problem += constraint", "def addConstraint(constraint, problem):\n problem += constraint...
[ "0.7566342", "0.7166384", "0.70904833", "0.70867825", "0.6926663", "0.68307215", "0.6742011", "0.66298604", "0.65407765", "0.6534312", "0.64957863", "0.6423365", "0.63588107", "0.62787634", "0.62115157", "0.60579515", "0.59985334", "0.5861729", "0.58495283", "0.5840765", "0.5...
0.5554728
33
Create a random network variant. Because we check the constraints against the randomizer's graph when they are added, and we are just returning the graph, we can be certain that this will always succeed. That is, this method will not raise a ``ConstraintError``.
def random(self): return self._randomize()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_random(self):\n for key in self.nn_param_choices:\n self.network[key] = random.choice(self.nn_param_choices[key])", "def create_random(self):\n number_of_layers = random.choice(self.parameter_choices['number_of_layers'])\n neurons_per_layer = []\n dropout_per_lay...
[ "0.6665286", "0.63126785", "0.6112261", "0.61047214", "0.6085112", "0.60664433", "0.5995871", "0.5896295", "0.5874111", "0.583322", "0.5797159", "0.5789538", "0.5788285", "0.5707505", "0.5680338", "0.567691", "0.5674098", "0.55641484", "0.55463463", "0.55137", "0.5498324", ...
0.0
-1
Return a graph that is isomorphic to the desired graph.
def _randomize(self): return self.graph
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isomorphic(graph1, graph2):\r\n\r\n gd1 = _TripleCanonicalizer(graph1).to_hash()\r\n gd2 = _TripleCanonicalizer(graph2).to_hash()\r\n return gd1 == gd2", "def build_2_node_graph(directed=False):\n if directed:\n graph = DirectedGraph()\n else:\n graph = UndirectedGraph()\n\n g...
[ "0.6641285", "0.6135792", "0.6120062", "0.6061102", "0.60383886", "0.6019607", "0.6018842", "0.6001123", "0.599365", "0.5985054", "0.59850144", "0.5958011", "0.595538", "0.59325224", "0.5927924", "0.5909028", "0.5889987", "0.58812755", "0.5858698", "0.58456093", "0.5841995", ...
0.0
-1
Initializes the fake attribute.
def __init__(self, request, name) : self.request = request self.name = name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_attrs(self):\n raise NotImplementedError", "def __init__(self, val):\n self.attr = val", "def __init__(self, attr=None):\r\n self.attr = attr", "def test_init_attributes(self):\n t = self.Test({'id': 1, 'poop': 'abc'})\n\n self.assertEqual(t.id, 1)\n self.as...
[ "0.68513376", "0.6607774", "0.6587562", "0.6395826", "0.632985", "0.63089985", "0.6279036", "0.62546307", "0.6223853", "0.6221568", "0.6189354", "0.6172752", "0.6169718", "0.6155283", "0.6140963", "0.61297256", "0.61297256", "0.61297256", "0.61297256", "0.61297256", "0.612972...
0.0
-1
Appends the value to the real attribute.
def __setitem__(self, key, value) : attributeslist = getattr(self.request, "_%s_attributes" % self.name) for i in range(len(attributeslist)) : attribute = attributeslist[i] for j in range(len(attribute)) : (attrname, attrvalue) = attribute[j] if at...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def append_value(self, value):\n self.value += value", "def append_attribute(myobj, attrib_k, val):\n vals = getattr(myobj, attrib_k, [])\n if val not in vals:\n vals.append(val)\n setattr(myobj, attrib_k, vals)", "def append(self, val):\n self.val....
[ "0.7300116", "0.6650453", "0.6603937", "0.6582164", "0.6565652", "0.64369327", "0.634834", "0.6318357", "0.6315645", "0.6267331", "0.62604076", "0.62248695", "0.62203544", "0.6187538", "0.6177455", "0.6141191", "0.61278754", "0.61272675", "0.612382", "0.6117791", "0.6115599",...
0.58155173
42
Returns an attribute's value.
def __getitem__(self, key) : answer = [] attributeslist = getattr(self.request, "_%s_attributes" % self.name) for i in range(len(attributeslist)) : attribute = attributeslist[i] for j in range(len(attribute)) : (attrname, attrvalue) = attribute[j] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def attribute_value(self) -> str:\n return pulumi.get(self, \"attribute_value\")", "def attribute_value(self):\n return self._attribute_value", "def attribute_value(self) -> Optional[str]:\n return pulumi.get(self, \"attribute_value\")", "def get_attribute_value(self, attribute_key):\n ...
[ "0.8491062", "0.8352722", "0.81311697", "0.7812831", "0.7812831", "0.7812831", "0.7751393", "0.7715839", "0.76752424", "0.7649092", "0.76458895", "0.76123345", "0.75031775", "0.7492453", "0.7492453", "0.7475988", "0.74481153", "0.7426615", "0.74168324", "0.7380158", "0.738015...
0.0
-1
Initializes an IPP Message object.
def __init__(self, data="", version=IPP_VERSION, operation_id=None, \ request_id=None, \ debug=False) : self.debug = debug self._data = data self.parsed = False # Initializes message ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, buf=None, *args, **kwargs):\n super(Message, self).__init__(buf, *args, **kwargs)\n self.__initialized = True", "def __init__(self, message=None):\n\n self._message = message", "def __init__(self, message=None):\n self.message = message", "def __init__(self, mes...
[ "0.69959253", "0.6967417", "0.68779296", "0.68779296", "0.68110675", "0.68110675", "0.68110675", "0.6770557", "0.6755397", "0.67232746", "0.67232746", "0.67232746", "0.67232746", "0.67232746", "0.67232746", "0.67232746", "0.67232746", "0.67232746", "0.67232746", "0.6693043", ...
0.0
-1
Returns the parsed IPP message in a readable form.
def __str__(self) : if not self.parsed : return "" mybuffer = [] mybuffer.append("IPP version : %s.%s" % self.version) mybuffer.append("IPP operation Id : 0x%04x" % self.operation_id) mybuffer.append("IPP request Id : 0x%08x" % self.request_id) for attrtype in...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _read_message(self):\n if self.__eof:\n return None\n result = {}\n line = sys.stdin.readline()\n while line == '\\n':\n line = sys.stdin.readline()\n if not line:\n self.__eof = True\n return None\n s = line.split(\" \", 1)\...
[ "0.60272247", "0.5938139", "0.58673644", "0.58623207", "0.5761721", "0.5755809", "0.5738192", "0.57289153", "0.5727499", "0.5727499", "0.5700545", "0.5665022", "0.5658874", "0.55902284", "0.5564594", "0.556166", "0.5557055", "0.5533912", "0.55286163", "0.55037266", "0.5503726...
0.62728494
0
Prints a debug message.
def logDebug(self, msg) : if self.debug : sys.stderr.write("%s\n" % msg) sys.stderr.flush()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dprint(msg):\n if defaults.debug:\n print('debug: %s' % msg)", "def _debug_print(message):\n\n if _debug == True:\n print(message)", "def debug(self, msg):\n if self._debug:\n print \"%s\" % (msg)", "def d_print(msg):\n if (DEBUG == 1):\n print(msg)", "de...
[ "0.8541787", "0.83689785", "0.8321896", "0.8245489", "0.8235786", "0.82134783", "0.81876254", "0.8154714", "0.81216973", "0.8068759", "0.8020079", "0.79399115", "0.7921366", "0.79016554", "0.7899223", "0.7808673", "0.7771317", "0.7766401", "0.773589", "0.7732881", "0.77316684...
0.7172035
59
Sets the request's operation id.
def setVersion(self, version) : if version is not None : try : self.version = [int(p) for p in version.split(".")] except AttributeError : if len(version) == 2 : # 2-tuple self.version = version else : ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setOperationId(self, opid) :\n self.operation_id = opid", "def request_id(self, request_id):\n\n self._request_id = request_id", "def request_id(self, request_id):\n\n self._request_id = request_id", "def request_id(self, request_id):\n\n self._request_id = request_id", "def...
[ "0.80629724", "0.6570105", "0.6570105", "0.6570105", "0.6405243", "0.63805985", "0.6355321", "0.6242067", "0.5786017", "0.5701327", "0.5701327", "0.5689727", "0.56761694", "0.565457", "0.5503637", "0.5461634", "0.53911835", "0.53881204", "0.538676", "0.5347063", "0.53353757",...
0.0
-1
Sets the request's operation id.
def setOperationId(self, opid) : self.operation_id = opid
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def request_id(self, request_id):\n\n self._request_id = request_id", "def request_id(self, request_id):\n\n self._request_id = request_id", "def request_id(self, request_id):\n\n self._request_id = request_id", "def set_operation(self, operation):\n self._data_dict[self.OP_GID] =...
[ "0.6570105", "0.6570105", "0.6570105", "0.6405243", "0.63805985", "0.6355321", "0.6242067", "0.5786017", "0.5701327", "0.5701327", "0.5689727", "0.56761694", "0.565457", "0.5503637", "0.5461634", "0.53911835", "0.53881204", "0.538676", "0.5347063", "0.53353757", "0.53325474",...
0.80629724
0
Sets the request's request id.
def setRequestId(self, reqid) : self.request_id = reqid
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def request_id(self, request_id):\n\n self._request_id = request_id", "def request_id(self, request_id):\n\n self._request_id = request_id", "def request_id(self, request_id):\n\n self._request_id = request_id", "def x_request_id(self, x_request_id):\n self._x_request_id = x_reque...
[ "0.85741603", "0.85741603", "0.85741603", "0.7471922", "0.67885333", "0.67777324", "0.66751134", "0.6537382", "0.6529311", "0.6431815", "0.6392973", "0.6351653", "0.6347694", "0.62926936", "0.6269396", "0.62579936", "0.6220874", "0.6198472", "0.618845", "0.6183277", "0.617363...
0.82049066
3
Generates an IPP Message. Returns the message as a string of text.
def dump(self) : mybuffer = [] if None not in (self.version, self.operation_id) : mybuffer.append(chr(self.version[0]) + chr(self.version[1])) mybuffer.append(pack(">H", self.operation_id)) mybuffer.append(pack(">I", self.request_id or 1)) for attrtype...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def construct_message(self):\n msg_type = self.msg_type\n if msg_type == \"PUBMSG\":\n msg_type = \"PRIVMSG\"\n ret = \"{} {}\".format(msg_type, self.target)\n if self.content:\n ret += \" :{}\".format(self.content)\n return ret + \"\\r\\n\"", "def genMsg(...
[ "0.660275", "0.6068894", "0.6058", "0.6035902", "0.6021112", "0.5987677", "0.59774643", "0.59565526", "0.5929928", "0.591374", "0.58054256", "0.58035034", "0.5764994", "0.57645506", "0.573444", "0.5671204", "0.5671204", "0.5671204", "0.5671204", "0.5671204", "0.56234944", "...
0.0
-1
Parses an IPP Request.
def parse(self) : self._curname = None self._curattributes = None self.setVersion((ord(self._data[0]), ord(self._data[1]))) self.setOperationId(unpack(">H", self._data[2:4])[0]) self.setRequestId(unpack(">I", self._data[4:8])[0]) self.position = 8 endofat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parse (self, request):\n\n data = {}\n body_start = request.find('\\r\\n\\r\\n')\n if body_start == -1:\n data['body'] = None\n else:\n data['body'] = request[body_start+4:]\n parts = request.split(' ', 2)\n data['method'] = parts[0]\n data...
[ "0.6528099", "0.64757895", "0.61394", "0.5950946", "0.59462845", "0.5675356", "0.5629064", "0.55846614", "0.5550108", "0.5486443", "0.54667544", "0.54527074", "0.54460347", "0.54370385", "0.5415422", "0.5405204", "0.53813696", "0.5368089", "0.535009", "0.532463", "0.5311019",...
0.5656866
6
Extracts information from an IPP tag.
def parseTag(self) : pos = self.position tagtype = self.tags[ord(self._data[pos])] if tagtype == 'end-of-attributes-tag': return 0 pos += 1 posend = pos2 = pos + 2 namelength = unpack(">H", self._data[pos:pos2])[0] if not namelength : name ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def extract(extraction: ExtractIoT = Body(...)):\n return await extract_iot_info(extraction.observationGEPid)", "def info(self, tag):\n\n url = \"https://api.instagram.com/v1/tags/{0}?access_token={1}\".format(tag, self.access_token)\n request = requests.get(url)\n print(request.hea...
[ "0.60515285", "0.5476028", "0.5383994", "0.53495926", "0.5237505", "0.523122", "0.51990277", "0.5190629", "0.51722515", "0.51222056", "0.5098803", "0.50943387", "0.5036681", "0.5007075", "0.49958634", "0.4987815", "0.49311846", "0.49204567", "0.4915916", "0.49118233", "0.4899...
0.46260214
54
Indicates that the parser enters into an operationattributestag group.
def operation_attributes_tag(self) : self._curattributes = self._operation_attributes return self.parseTag()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def attrControlGrp(*args, annotation: Union[AnyStr, bool]=\"\", attribute: Union[name, bool]=None,\n changeCommand: Union[Script, bool]=None, enable: bool=True, exists:\n bool=True, handlesAttribute: Union[name, bool]=None, hideMapButton:\n bool=True, label: Un...
[ "0.51638806", "0.4936743", "0.48911783", "0.48018166", "0.47010294", "0.46412504", "0.46040428", "0.45955312", "0.45861644", "0.45599842", "0.4545363", "0.45116305", "0.44554913", "0.44155097", "0.44143426", "0.43964836", "0.43932542", "0.43922263", "0.4387848", "0.43646452", ...
0.599768
0
Indicates that the parser enters into a jobattributestag group.
def job_attributes_tag(self) : self._curattributes = self._job_attributes return self.parseTag()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __on_group_created(self, logger, *args):", "def log_group_arn(self) -> str:\n ...", "def enter_group():\n logline(\"\\\\\", indent=False)\n global group_length\n group_length = group_length + 1", "def process_organism(self, organism):\n all_lineages = list()\n all_lineages.a...
[ "0.5273392", "0.5174234", "0.49992937", "0.48613456", "0.48510054", "0.47950166", "0.47763616", "0.4734989", "0.46720922", "0.46640453", "0.46316695", "0.4626844", "0.46203315", "0.46097058", "0.4609342", "0.46035945", "0.45985746", "0.4584532", "0.4577996", "0.45773083", "0....
0.50302863
2
Indicates that the parser enters into a printerattributestag group.
def printer_attributes_tag(self) : self._curattributes = self._printer_attributes return self.parseTag()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unknown_starttag(self, tag, attrs):\n if tag in self.valid_tags:\n self.result.append('<' + tag)\n for k, v in attrs:\n if string.lower(k[0:2]) != 'on' and", "def enter_group():\n logline(\"\\\\\", indent=False)\n global...
[ "0.4925782", "0.49084425", "0.47429618", "0.47403184", "0.47209662", "0.47065154", "0.46375936", "0.46353352", "0.45543104", "0.45409465", "0.45381525", "0.4515491", "0.44930646", "0.44930646", "0.44722897", "0.44514444", "0.44369882", "0.44209164", "0.44116554", "0.44032434", ...
0.56767845
0