query
stringlengths
10
2k
document
stringlengths
20
51.2k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Return a list of interceptors.
def get_interceptors(cls): return cls._interceptors
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def interceptions(self):\n return self._interceptions", "def getInterceptions(self):\n return self.interceptions", "def computeIntercepts():\n pass", "def intercept(self) -> np.ndarray:\n return self._intercept", "def get_registered_handlers(self):\n return list(self._registr...
[ "0.652202", "0.64001137", "0.5994348", "0.5528268", "0.5525158", "0.5523417", "0.550799", "0.55015993", "0.54154575", "0.5402809", "0.5382086", "0.5359293", "0.5358335", "0.5321518", "0.5302534", "0.5293866", "0.5278781", "0.5264514", "0.51896423", "0.5177481", "0.5170946", ...
0.85444534
0
Get the coherence for each topic. Can be used to measure the quality of the model, or to inspect the convergence through training via a callback.
def dtm_coherence(self, time): coherence_topics = [] for topics in self.print_topics(time): coherence_topic = [] for word, dist in topics: coherence_topic.append(word) coherence_topics.append(coherence_topic) return coherence_topics
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def calc_coherence(model, corpus):\n cm = CoherenceModel(model=model, corpus=corpus, coherence='u_mass')\n coherence = cm.get_coherence()\n print(timestamp(),\"Topic coherence:\", coherence)", "def compute_coherence(self, topics, dictionary, corpus, token_lists, measure):\n coherence = 0.0\n ...
[ "0.7510522", "0.7462677", "0.7390939", "0.6852715", "0.66730416", "0.6616091", "0.6528601", "0.6486628", "0.6484061", "0.64590216", "0.64497983", "0.64497983", "0.63979244", "0.63726914", "0.6266864", "0.6183971", "0.617949", "0.6178669", "0.61627346", "0.61203957", "0.611894...
0.6437099
12
Initialize the posterior value structure for the given LDA model.
def __init__(self, doc=None, lda=None, max_doc_len=None, num_topics=None, gamma=None, lhood=None): self.doc = doc self.lda = lda self.gamma = gamma self.lhood = lhood if self.gamma is None: self.gamma = np.zeros(num_topics) if self.lhood is None: s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_model(self, likelihood_model_instance):\n pass", "def set_model(self, likelihood_model_instance):\n pass", "def __init__(self, model):\n if model == \"biblis\" :\n data = [1.3200e+00, 2.7720e-01, 2.6562e-03, \\\n 7.1596e-02, 0.00000000, 0.00000000, \\\...
[ "0.57226205", "0.57226205", "0.56255525", "0.55797815", "0.5571952", "0.5551159", "0.5536104", "0.55181235", "0.55097896", "0.5387139", "0.5378102", "0.5352952", "0.5343827", "0.5308831", "0.53032327", "0.5282731", "0.52730983", "0.5245981", "0.5235536", "0.52319115", "0.5227...
0.5759829
0
Since the loss has been computed in forward(), this function simply returns x.
def loss(self, x, y): return x
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def forward(self, x): # pylint: disable=invalid-name\n x = self.layer4(self.layer3(self.layer2(self.layer1(x))))\n return x.mean((-2, -1))", "def forward(self, x):\n h = self.relu(self.en_x_1(self.dropout(x)))\n h = self.relu(self.en_x_2(self.dropout(h)))\n h = self.relu(self....
[ "0.7725097", "0.7651448", "0.76429844", "0.75633603", "0.7515931", "0.7465838", "0.7460723", "0.7411795", "0.7384678", "0.7322202", "0.7317488", "0.7307639", "0.730554", "0.7267379", "0.7267179", "0.7258937", "0.72520167", "0.7227916", "0.722564", "0.722564", "0.7221383", "...
0.7652943
1
Creates a `FileWriter` and an file. On construction the summary writer creates a new event file in `logdir`.
def __init__(self, fname, wtype="tfevent"): if wtype == "tfevent": self._reader = EventFileReader(fname=fname) else: raise SMDebugNotImplementedError("Only tfevent format is supported for now.")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self,\n logdir,\n graph=None,\n max_queue=10,\n flush_secs=120,\n graph_def=None,\n filename_suffix=None,\n session=None):\n if context.executing_eagerly():\n raise RuntimeError(\n \"v1.s...
[ "0.7084379", "0.6968738", "0.68269694", "0.6813645", "0.66885847", "0.66081536", "0.65937066", "0.6532418", "0.64965326", "0.64241725", "0.63339156", "0.6145331", "0.6102968", "0.60990393", "0.60803896", "0.6069281", "0.5989965", "0.598109", "0.5939338", "0.5879727", "0.58747...
0.0
-1
Returns the requested column
def get_col(b, ci): return [b[0][ci], b[1][ci], b[2][ci]]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_column(self, name):\r\n return self.column(name)", "def _get_column(cls, name):\r\n return cls._columns[name]", "def column(self):\n return self[\"column\"]", "def get_column(self, key):\n return self._get_column(key)", "def column(self): \r\n\r\n return self._co...
[ "0.8455889", "0.83821183", "0.83186114", "0.8041277", "0.7975456", "0.79446125", "0.7865537", "0.7792219", "0.77817154", "0.7722103", "0.7706166", "0.7662439", "0.7652514", "0.76440066", "0.76440066", "0.76440066", "0.76440066", "0.76440066", "0.76440066", "0.76440066", "0.76...
0.0
-1
Given a ``QuerySet`` or a ``Model``, returns a twotuple of (queryset, model). If a ``Model`` is given, the ``QuerySet`` returned will be created using its default manager.
def get_queryset_and_model(queryset_or_model): try: return queryset_or_model, queryset_or_model.model except AttributeError: return queryset_or_model._default_manager.all(), queryset_or_model
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_queryset_and_model(queryset_or_model):\r\n try:\r\n return queryset_or_model, queryset_or_model.model\r\n except AttributeError:\r\n return queryset_or_model._default_manager.all(), queryset_or_model", "def get_by_model(self, queryset_or_model, tags):\r\n tags = get_tag_list(ta...
[ "0.7950485", "0.6242415", "0.61413026", "0.60081124", "0.5964729", "0.5946938", "0.57412136", "0.56107336", "0.55685", "0.5560428", "0.5411625", "0.5327171", "0.5314415", "0.5309461", "0.5300973", "0.52999574", "0.5212893", "0.52045405", "0.5162601", "0.51351094", "0.51340777...
0.8060272
0
Calculate the great circle distance between two points on the earth (specified in decimal degrees)
def haversine(lon1, lat1, lon2, lat2): # convert decimal degrees to radians lon1, lat1, lon2, lat2 = map(radians, [lon1, lat1, lon2, lat2]) # haversine formula dlon = lon2 - lon1 dlat = lat2 - lat1 a = sin(dlat/2)**2 + cos(lat1) * cos(lat2) * sin(dlon/2)**2 c = 2 * asin(sqrt(a))...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def great_circle(lat_1, long_1, lat_2, long_2):\n long_1 = m.radians(long_1)\n lat_1 = m.radians(lat_1)\n long_2 = m.radians(long_2)\n lat_2 = m.radians(lat_2)\n\n d = 2 * 6367.45 * m.asin(\n m.sqrt(haversine(lat_2 - lat_1)\n + m.cos(lat_1)*m.cos(lat_2) *\n haversine(long...
[ "0.81444913", "0.78628397", "0.76311773", "0.7604652", "0.75954515", "0.75949824", "0.7592846", "0.757015", "0.75629693", "0.7554376", "0.752855", "0.7515809", "0.7492531", "0.7465686", "0.7450806", "0.74330103", "0.73909706", "0.73566103", "0.73473287", "0.7329735", "0.73278...
0.0
-1
Encode filename to the filesystem encoding with 'surrogateescape' error handler, return bytes unchanged. On Windows, use 'strict' error handler if the file system encoding is 'mbcs' (which is the default encoding).
def fsencode(filename): if isinstance(filename, bytes): return filename else: return filename.encode(encoding, errors)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getfilesystemencoding(): # real signature unknown; restored from __doc__\n return \"\"", "def safe_path(path, encoding=\"utf8\"):\n return ensure_unicode(path, encoding) if sys.platform.startswith(\"win\") else ensure_bytes(path, encoding)", "def getSafeFilename(untrustedFilename: unicode) -> unicode...
[ "0.651757", "0.6455461", "0.6395669", "0.63621086", "0.6160829", "0.594721", "0.58776665", "0.58256036", "0.5803574", "0.57494634", "0.5694522", "0.5689783", "0.56487423", "0.5620979", "0.56083506", "0.5552291", "0.5539115", "0.54941255", "0.5459801", "0.54596245", "0.5447503...
0.7900618
0
Identify the courses in a wall of blocks.
def assembly_courses(wall): courses = [] vertices = set(wall.nodes()) base = set(wall.nodes_where({'is_support': True})) if base: courses.append(list(base)) seen = set() seen.update(base) vertices -= base while vertices: nbrs = set(nbr for key in c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_courses(self, branch, **kwargs): # lint-amnesty, pylint: disable=arguments-differ\n # get the blocks for each course index (s/b the root)\n return self._get_structures_for_branch_and_locator(branch, self._create_course_locator, **kwargs)", "def get_courses_for_wiki(self, wiki_slug):\r\n ...
[ "0.628558", "0.61771023", "0.61603737", "0.5980654", "0.59093595", "0.5881269", "0.58156854", "0.5754952", "0.5695493", "0.5659082", "0.56130946", "0.55792826", "0.5544979", "0.5542452", "0.5532582", "0.5532363", "0.5506931", "0.5492477", "0.5482742", "0.5480086", "0.5473625"...
0.7221494
0
Returns if the word is in the trie.
def search(self, word: str) -> bool: node = self.root for c in word: if c not in node: return False node = node[c] return self.end in node
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def in_trie(self, trie, word):\n current_dict = trie\n for letter in word:\n if letter in current_dict:\n current_dict = current_dict[letter]\n else:\n return False\n else:\n if '_end_' in current_dict:\n return curr...
[ "0.838632", "0.8150416", "0.8123471", "0.7856802", "0.7830664", "0.77935004", "0.7792806", "0.77642965", "0.7753436", "0.7747724", "0.7711298", "0.76816714", "0.7664614", "0.76506114", "0.76338875", "0.7628353", "0.76114196", "0.7577657", "0.75695884", "0.756079", "0.75591743...
0.7677101
12
A view for creating new comments. Accepts only post requests.
def add_comment_view(request, e_pk): element = get_object_or_404(Element, pk=e_pk) group = element.tab.group if request.user not in group.users.all(): return redirect(reverse('my_groups_view')) if request.method == 'POST': form = CreateCommentForm(request.POST) if form.is_vali...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def createcomment(request, pk):\n issue = get_object_or_404(Issue, pk=pk)\n if request.method == \"POST\":\n form = CommentCreationForm(request.POST)\n if form.is_valid():\n comment = form.save(commit=False)\n comment.issue = issue\n comment.author = request.use...
[ "0.732073", "0.70777166", "0.70452726", "0.68587387", "0.6801563", "0.67347527", "0.67242646", "0.67154956", "0.65881443", "0.6585732", "0.657652", "0.6560818", "0.65395665", "0.6520081", "0.64622486", "0.6430551", "0.6410628", "0.640164", "0.6400846", "0.6399972", "0.6382992...
0.59036046
67
Validate the current interaction if possible If was designed to close the polygon interaction.
def _validate(self): self._eventHandler.validate()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_valid(self):\n if len(self.exterior) < 3:\n return False\n return self.to_shapely_polygon().is_valid", "def _is_closing_shape(self, x, y, new_obstacle):\n first_obstacle_edge = new_obstacle[0]\n\n close_x = abs(first_obstacle_edge[0] - x) < self.CLOSE_ENOUGH_POINTS_T...
[ "0.6950399", "0.61015177", "0.57520294", "0.5750079", "0.5706128", "0.57034296", "0.5701767", "0.56965226", "0.5668515", "0.56516266", "0.5602968", "0.56003606", "0.55850375", "0.55358154", "0.54913616", "0.54811543", "0.5469568", "0.5416918", "0.53759515", "0.5335851", "0.53...
0.50955397
45
Current status of the deployment.
def deployment_state(self) -> Optional[pulumi.Input[Union[str, 'DeploymentState']]]: return pulumi.get(self, "deployment_state")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def status(self) -> pulumi.Output['outputs.JobStatus']:\n return pulumi.get(self, \"status\")", "def status(self) -> pulumi.Output['outputs.ReleaseStatus']:\n return pulumi.get(self, \"status\")", "def status(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"status\")", "def statu...
[ "0.7782016", "0.77078307", "0.7688909", "0.7688909", "0.7688909", "0.7688909", "0.7688909", "0.7688909", "0.7688909", "0.7688909", "0.7688909", "0.7688909", "0.7688909", "0.7688909", "0.7688909", "0.7688909", "0.7688909", "0.7688909", "0.7688909", "0.7688909", "0.7688909", ...
0.0
-1
Determines if the given item is in the menu.
def is_valid_menu_item(self, item_name: str) -> bool: return item_name in self._items()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isin(self, item):\n return self.get(item) is not None", "def has_item(self, item):\n return item in self.set", "def has_item(self, item):\n return item in self.set", "def has_item(self, item_name):\n if item_name in self.item_list:\n return True\n return Fals...
[ "0.7260474", "0.6914659", "0.6914659", "0.6885672", "0.68483317", "0.67421645", "0.668236", "0.6612121", "0.6594586", "0.65698266", "0.6541478", "0.6504499", "0.6462016", "0.64461344", "0.6435118", "0.6420998", "0.64049363", "0.6402514", "0.63775414", "0.6368396", "0.6357117"...
0.75369847
0
Strip empty keyvalue pairs from a dict
def stripper(data): new_data = {} for k, v in data.items(): if isinstance(v, dict): v = stripper(v) if not v in (u'', None, {}): new_data[k] = v return new_data
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_empty_values(_dict):\n return {k: v for k, v in list(_dict.items()) if v is not None}", "def _strip_all(dic):\n for k, v in dic.items():\n\n if len(v) == 0:\n dic[k] = 'NULL'\n if isinstance(v, str):\n v = v.strip().replace('\\t', '').replace('\\n', '').encode...
[ "0.8092229", "0.80436766", "0.7891762", "0.76917493", "0.75093937", "0.74296725", "0.73282534", "0.7313634", "0.7308647", "0.71516085", "0.7148632", "0.7090035", "0.70488083", "0.7001711", "0.69942254", "0.69556576", "0.6907633", "0.6887875", "0.6812849", "0.67851627", "0.671...
0.785884
3
The storage format of this array. Returns str The storage format of this array. See Also
def format(self): return "dok"
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def data_format(self):\n return self._data_format", "def __str__(self):\n return str(self.storage)", "def __repr__(self):\n return repr(self.storage)", "def storage_type(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"storage_type\")", "def as_str(self) -> str:\n ...
[ "0.70083654", "0.6946693", "0.670835", "0.665189", "0.6495402", "0.63711596", "0.6340954", "0.62381744", "0.62168145", "0.6184099", "0.61761415", "0.6142614", "0.6142614", "0.6125778", "0.60374284", "0.6021945", "0.6007642", "0.59644115", "0.59596896", "0.59408605", "0.593079...
0.57428324
35
The number of bytes taken up by this object. Note that for small arrays, this may undercount the number of bytes due to the large constant overhead. Returns int The approximate bytes of memory taken by this object. See Also
def nbytes(self): return self.nnz * self.dtype.itemsize
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def size(self):\n size = 0\n size += self.data.size * sys.getsizeof(self.data)\n return size / 1024.0 / 1024.0 / 1024.0", "def MemoryUsage(cls):\n\t\tmeminfo = cls.MemoryInfo()\n\t\treturn (meminfo[\"MemTotal\"] - meminfo[\"MemFree\"] - meminfo[\"Cached\"]) / float(meminfo[\"MemTotal\"])", ...
[ "0.7894345", "0.7280458", "0.7251675", "0.71349216", "0.7113518", "0.7103175", "0.7089896", "0.70840764", "0.7067105", "0.70364183", "0.70173436", "0.699536", "0.69783443", "0.69605243", "0.6899824", "0.68825936", "0.6864577", "0.6836177", "0.67988944", "0.6786141", "0.678200...
0.6838002
17
Subset of fancy indexing, when all dimensions are accessed
def _fancy_getitem(self, key): new_data = {} for i, k in enumerate(zip(*key)): if k in self.data: new_data[i] = self.data[k] return DOK( shape=(len(key[0])), data=new_data, dtype=self.dtype, fill_value=self.fill_value, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subset_(self):\n return self.X.ix[:, self.important_features_]", "def indexed(cls, dataset, selection):\n selected = list(selection.keys())\n all_scalar = all((not isinstance(sel, (tuple, slice, set, list))\n and not callable(sel)) for sel in selection.values())\...
[ "0.6621852", "0.66015744", "0.622842", "0.6200075", "0.61889464", "0.6157416", "0.6142102", "0.61327195", "0.6083674", "0.60645115", "0.60329807", "0.60053366", "0.5995639", "0.5986479", "0.59672284", "0.5965816", "0.59485936", "0.59267634", "0.59262305", "0.58971137", "0.588...
0.0
-1
The Email Address which is associated with this Elasticsearch account.
def elastic_cloud_email_address(self) -> str: return pulumi.get(self, "elastic_cloud_email_address")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def account_email(self) -> str:\n return pulumi.get(self, \"account_email\")", "def email_address(self) -> str:\n return self._email_address", "def email(self):\n return self._dict.get('email')", "def service_account_email_address(self) -> str:\n return pulumi.get(self, \"service_...
[ "0.84596837", "0.8439412", "0.83134234", "0.8256063", "0.82078093", "0.82078093", "0.82078093", "0.82078093", "0.82053393", "0.82053393", "0.82053393", "0.8169902", "0.8149143", "0.8139127", "0.811696", "0.8045552", "0.7959723", "0.7925609", "0.7870851", "0.7868287", "0.77582...
0.8136002
14
The ID of the User Account within Elastic Cloud.
def elastic_cloud_user_id(self) -> str: return pulumi.get(self, "elastic_cloud_user_id")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def account_id(self):\n return self.get('/accounts')[0]['Id']", "def account_id(self) -> str:\n return pulumi.get(self, \"account_id\")", "def account_id(self) -> str:\n return pulumi.get(self, \"account_id\")", "def account_id(self) -> str:\n return pulumi.get(self, \"account_id\...
[ "0.8136092", "0.802382", "0.802382", "0.802382", "0.802382", "0.802382", "0.802382", "0.802382", "0.802382", "0.79416674", "0.7827401", "0.7790851", "0.7673553", "0.76709306", "0.7655674", "0.76127815", "0.76127815", "0.7603293", "0.75974905", "0.7560099", "0.7539339", "0.7...
0.8394314
0
The URL to the Elasticsearch Service associated with this Elasticsearch.
def elasticsearch_service_url(self) -> str: return pulumi.get(self, "elasticsearch_service_url")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kibana_service_url(self) -> str:\n return pulumi.get(self, \"kibana_service_url\")", "def service_endpoint(self) -> str:\n return pulumi.get(self, \"service_endpoint\")", "def service_url(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"service_url\")", "def get_service_url()...
[ "0.7508979", "0.72961205", "0.7161416", "0.6732969", "0.6685639", "0.6617807", "0.6617807", "0.658461", "0.6444466", "0.64309883", "0.63896054", "0.6353285", "0.63281506", "0.6315058", "0.6315058", "0.6176289", "0.61187303", "0.61089224", "0.6098389", "0.60855925", "0.6081793...
0.90453
0
The URL to the Kibana Dashboard associated with this Elasticsearch.
def kibana_service_url(self) -> str: return pulumi.get(self, "kibana_service_url")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cluster_dashboard_url_view(self):\n\n result = self._client.get(\n \"{}/dashboard\".format(LKECluster.api_endpoint), model=self\n )\n\n return result[\"url\"]", "def dashboard_url(self) -> str:\n return self._dashboard_url", "def dashboardUrl(self):\n\t\turl = \"http:...
[ "0.7372582", "0.72652364", "0.68033195", "0.67246217", "0.63817173", "0.6346805", "0.6071543", "0.59138167", "0.589158", "0.58710074", "0.58164954", "0.58164954", "0.5795844", "0.5681393", "0.5648551", "0.56203157", "0.5587022", "0.5584116", "0.5576829", "0.5563253", "0.55472...
0.75838083
0
The Azure Region in which this Elasticsearch exists.
def location(self) -> str: return pulumi.get(self, "location")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def region(self):\n return self.config.region", "def get_region(self):\n return self.creds.get('region_name')", "def region(self):\n return self._get(\"region\")", "def region(self) -> str:\n return pulumi.get(self, \"region\")", "def region(self) -> str:\n return pulumi....
[ "0.7485415", "0.73678076", "0.7352813", "0.7268095", "0.7268095", "0.7268095", "0.7268095", "0.7268095", "0.7268095", "0.70876896", "0.70876896", "0.7058388", "0.7058388", "0.7058388", "0.7058388", "0.7010235", "0.69905865", "0.69524837", "0.69524837", "0.69524837", "0.695248...
0.0
-1
The name of the SKU used for this Elasticsearch.
def sku_name(self) -> str: return pulumi.get(self, "sku_name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sku_name(self) -> pulumi.Output[Optional[str]]:\n return pulumi.get(self, \"sku_name\")", "def sku_name(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"sku_name\")", "def sku_name(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"sku_name\")", "def v...
[ "0.8473993", "0.8388727", "0.8388727", "0.79735416", "0.78507024", "0.78267235", "0.7726095", "0.7726095", "0.7656114", "0.7656114", "0.74602395", "0.7398446", "0.7281727", "0.72803843", "0.72803843", "0.7276081", "0.7234472", "0.7234472", "0.7117306", "0.70149463", "0.698477...
0.8902016
1
Get cache tags for this view.
def _get_cache_tags(self): try: project = self._get_project() version = self._get_version() except Exception: log.warning( "Error while retrieving project or version for this view.", exc_info=True, ) return [] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_tags(self):\n\n return self.tags", "def get_tags(self):\n return self.tags", "def getTags(self,):\n\t\treturn self.tags;", "def getCacheContents(self):\n return self._cache", "def get(self, key):\n if self._is_expired():\n send_forwarder_internal_metrics(\"loc...
[ "0.67021877", "0.6687954", "0.6598899", "0.65097386", "0.6505349", "0.65045065", "0.6463745", "0.6437309", "0.6437309", "0.6437309", "0.6437309", "0.64283216", "0.63394386", "0.63394386", "0.63394386", "0.63394386", "0.63394386", "0.63394386", "0.63394386", "0.63394386", "0.6...
0.8156594
0
Convert Slot to module from archdesc.
def convert(self, slot, desc, *args, **kwargs): desc = desc[0] if isinstance(desc, list) else desc return build_module(desc, slot, *args, **kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def convert(self, slot):\n m_type = self.get_next_desc()\n return build_module(m_type, slot, **copy.deepcopy(self.fn_args))", "def deserialize(serialized_module) -> Module:\n pass", "def get_slot_model(device):\n\n try:\n out = device.parse('show module')\n except SubCommandFa...
[ "0.7217866", "0.5498718", "0.5403806", "0.52846724", "0.52504313", "0.5247306", "0.51090664", "0.4962965", "0.49063134", "0.4881178", "0.48208466", "0.4703148", "0.47028503", "0.46340746", "0.461936", "0.45931432", "0.45918083", "0.45842147", "0.45585543", "0.4543439", "0.454...
0.7791126
0
Convert Slot to module from archdesc.
def convert(self, slot): m_type = self.get_next_desc() return build_module(m_type, slot, **copy.deepcopy(self.fn_args))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def convert(self, slot, desc, *args, **kwargs):\n desc = desc[0] if isinstance(desc, list) else desc\n return build_module(desc, slot, *args, **kwargs)", "def deserialize(serialized_module) -> Module:\n pass", "def get_slot_model(device):\n\n try:\n out = device.parse('show modul...
[ "0.77906525", "0.54993343", "0.5404508", "0.5286855", "0.5248744", "0.5247137", "0.510864", "0.49627215", "0.4907", "0.48807067", "0.48210222", "0.47024608", "0.47021508", "0.46345738", "0.46203792", "0.45952404", "0.45922777", "0.45837224", "0.455835", "0.45424095", "0.45419...
0.7216971
1
This function transfroms from a fractional age of a burst to an absolute age. With this transformation one can sample in ``fage_burst`` without worry about the case ``tburst`` > ``tage``.
def tburst_from_fage(tage=0.0, fage_burst=0.0, **extras): return tage * fage_burst
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def AGEDEP(age, baserate):\n \n ## STRONG DEPENDENCE ##\n # sigmoid with age 50 arbitrarily chosen as new/old cutoff\n agepar = (-1*np.arctan(0.5*(age-100))/np.pi)+0.5\n ## NO DEPENDENCE ##\n # agepar = 1\n \n return agepar*baserate", "def tachycardic_range(self):\n self.adjust_age...
[ "0.54613405", "0.52444357", "0.52319384", "0.52058345", "0.5136747", "0.5052027", "0.49815208", "0.4936529", "0.4908989", "0.48441148", "0.482845", "0.48235497", "0.478815", "0.47693312", "0.47577968", "0.47092766", "0.468345", "0.46746817", "0.46558213", "0.46154734", "0.460...
0.7748888
0
This function calculates a galaxy age from the age of the univers at ``zred`` and the age given as a fraction of the age of the universe. This allows for both ``zred`` and ``tage`` parameters without ``tage`` exceeding the age of the universe.
def tage_from_tuniv(zred=0.0, tage_tuniv=1.0, **extras): tuniv = cosmo.age(zred).value tage = tage_tuniv * tuniv return tage
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def age(self, z):\n if self.k0 == 0.0:\n return(self.age_flat(z))\n fullage = self.lookback_time(np.Inf)\n tl = self.lookback_time(z)\n age = fullage - tl\n return(age)", "def age(self, year=None):\n y, m = self.master['birthYear'], self.master['birthMonth']\n...
[ "0.68025047", "0.56039417", "0.55876005", "0.5585719", "0.5560764", "0.5560764", "0.5535003", "0.5493915", "0.54910827", "0.54621994", "0.5457593", "0.54490405", "0.5443602", "0.5441151", "0.5420275", "0.5371797", "0.5340313", "0.53175175", "0.52733755", "0.52713865", "0.5262...
0.61120355
1
Two cards equal each other if their suit and rank are the same.
def __eq__(self, card2): return self.suit == card2.suit and self.rank == card2.rank
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __eq__(self, other_card):\n if self.rank == other_card.rank or self.suit == other_card.suit:\n return True\n else:\n return False", "def __eq__(self, other: Card) -> bool:\n return compare_map[self.number] == compare_map[other.number]", "def __eq__(self, other):\n...
[ "0.7956556", "0.6859082", "0.6857074", "0.6849458", "0.6841346", "0.67598736", "0.6644434", "0.6554397", "0.65416247", "0.65261686", "0.65139174", "0.65025413", "0.6472206", "0.6324116", "0.6315248", "0.6278739", "0.6271642", "0.62551916", "0.62434393", "0.62287265", "0.61946...
0.807557
0
Returns the weighted mean of a list of numbers. If any entries of the list are 'None' or '', they are removed first.
def weightedMean(numlist, weights): wxsum = 0.0 wsum = 0.0 assert len(numlist) == len(weights) for (x,w) in zip(numlist, weights): wxsum += x*w wsum += w if wsum == 0.0: return 0.0 return wxsum/wsum
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_mean(lst):\n if len(lst) == 0:\n return None\n else:\n return float(sum(lst)) / len(lst)", "def mean(l):\n if l:\n return sum(l)/len(l)\n else:\n raise ValueError(\"list empty\")", "def mean(l):\n return sum(l) / len(l) if len(l) != 0 else 0.0", "def mean(l,...
[ "0.7655883", "0.74071074", "0.73382056", "0.7236992", "0.7236992", "0.72311807", "0.7220772", "0.7217297", "0.72037584", "0.7203385", "0.7177509", "0.717722", "0.6893201", "0.6878431", "0.68711764", "0.6855868", "0.6829374", "0.68153244", "0.67646146", "0.6736162", "0.6729042...
0.73774254
2
Returns the Robins et al. variance phi_US(W) for MantelHaenszel odds ratio W, per
def MantelHaenszelOddsRatioVariance(tables): N_t = 0 R_t = 0 S_t = 0 sum_PR = 0.0 sum_PS = 0.0 sum_QR = 0.0 sum_QS = 0.0 n_tables = 0 for table in tables: (X_k, Y_k, n_k_X_k, m_k_Y_k) = table N_k = float(X_k + Y_k + n_k_X_k + m_k_Y_k) if N_k <= 0: continue n_tables += 1 P_k = (X_k + m_k_Y_k)/N_k ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def variance(y, w):\n # w = clip_normalize(w)\n # Compute the expectance (d_y, n_q)\n y_q_exp = np.dot(y.T, w)\n\n # Compute the expectance of squares (d_y, n_q)\n y_q_exp_sq = np.dot((y ** 2).T, w)\n\n # Compute the variance (d_y, n_q)\n return y_q_exp_sq - (y_q_exp ** 2)", "def width_v_phi...
[ "0.62804246", "0.61452115", "0.6068277", "0.60420823", "0.6023259", "0.59826875", "0.5969516", "0.5874943", "0.5870322", "0.5851713", "0.5829096", "0.5774958", "0.57540834", "0.5752337", "0.5726849", "0.57103693", "0.5697254", "0.56795317", "0.5653737", "0.5646566", "0.562957...
0.67439705
0
Saves a json file.
def json(filepath, mode=DataSaver.MODE_OVERWRITE, date_format=None, double_precision=10, force_ascii=True, date_unit='ms'): format_file = DataSaver.FORMAT_JSON kwargs = locals() _apply_datasaver(format_file, kwargs, last_uuid) return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def save(self, filename):\n content = self.to_dict()\n with open(filename, 'w') as f:\n json.dump(content, f)", "def save_file(data, filename):\n with open(filename, \"w\") as outfile:\n json.dump(data, outfile)", "def save_file(file_path, json_obj):\n try:\n with o...
[ "0.82316506", "0.8180923", "0.8160182", "0.81062007", "0.8073119", "0.8052003", "0.8044366", "0.804311", "0.804311", "0.804311", "0.7993746", "0.7992267", "0.79692596", "0.7937609", "0.79219204", "0.7895137", "0.78909296", "0.787797", "0.7866063", "0.78501093", "0.78245693", ...
0.0
-1
Saves a pickle file.
def pickle(filepath, mode=DataSaver.MODE_OVERWRITE, compression='infer'): format_file = DataSaver.FORMAT_PICKLE kwargs = locals() _apply_datasaver(format_file, kwargs, last_uuid) return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def save_file(self, file_name: str):\n pickle.dump(self, open(file_name, \"wb\"))", "def save_pickle(self, path):\n with open(path, 'wb') as f:\n pickle.dump(self, f, protocol=pickle.HIGHEST_PROTOCOL)", "def save(self, file_name: str) -> None:\n with open(file_name, \"wb\") as f...
[ "0.8204382", "0.8116353", "0.8101937", "0.8049143", "0.8001073", "0.8000429", "0.79548097", "0.79116154", "0.7901959", "0.7876148", "0.783124", "0.7824659", "0.77987295", "0.77803826", "0.77222955", "0.76961905", "0.7695314", "0.7683473", "0.7635593", "0.7596936", "0.75692695...
0.0
-1
Normalize a bridge identifier.
def normalize_bridge_id(bridge_id: str): bridge_id = bridge_id.lower() # zeroconf: properties['id'], field contains semicolons after each 2 char if len(bridge_id) == 17 and sum(True for c in "aa:bb:cc:dd:ee:ff" if c == ":"): return bridge_id.replace(":", "") # nupnp: contains 4 extra character...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def normalize_identifier(prefix: str, identifier: str) -> str:\n # A \"banana\" is an embedded prefix that isn't actually part of the identifier.\n # Usually this corresponds to the prefix itself, with some specific stylization\n # such as in the case of FBbt. The banana does NOT include a colon \":\" at ...
[ "0.63649136", "0.61995095", "0.6106728", "0.60983026", "0.5954703", "0.5853727", "0.566113", "0.56413746", "0.56173956", "0.55942863", "0.5593512", "0.55899954", "0.55893177", "0.55802083", "0.5575825", "0.5570939", "0.5548602", "0.55295926", "0.55106384", "0.5494894", "0.548...
0.79394555
0
Returns a square of GridQubits.
def square(diameter: int, top: int = 0, left: int = 0) -> List['GridQubit']: return GridQubit.rect(diameter, diameter, top=top, left=left)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _generate_qubits(self) -> Sequence[cirq.Qid]:\n return cirq.LineQubit.range(openfermion.count_qubits(self.hamiltonian))", "def _generate_qubits(self):\n return cq.LineQubit.range(4)", "def rect(rows: int, cols: int, top: int = 0,\n left: int = 0) -> List['GridQubit']:\n ret...
[ "0.6384157", "0.63497394", "0.6298015", "0.6284878", "0.62623054", "0.6212041", "0.61872137", "0.6165957", "0.61096895", "0.60857666", "0.6060323", "0.6028229", "0.60258687", "0.6013158", "0.59815073", "0.59409237", "0.59405965", "0.59249055", "0.58705014", "0.5867746", "0.58...
0.72140694
0
Add an integer feature to TF record
def add_int_feature(val): return tf.train.Feature(int64_list=tf.train.Int64List(value=[val]))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def int64_feature(value):\r\n return tf.train.Feature(int64_list=tf.train.Int64List(value=[value]))", "def int64_feature(value):\n return tf.train.Feature(int64_list=tf.train.Int64List(value=[value]))", "def _int64_feature(value):\n return tf.train.Feature(int64_list=tf.train.Int64List(value=[value]))", "...
[ "0.7422823", "0.7389926", "0.7379409", "0.7379409", "0.7379409", "0.7379409", "0.7370605", "0.7370605", "0.7370605", "0.7370605", "0.7370605", "0.7370605", "0.73412895", "0.73410165", "0.7331751", "0.7331751", "0.7327149", "0.7327149", "0.7327149", "0.7272386", "0.72716635", ...
0.83855206
0
Add a byte feature to TF record
def add_bytes_feature(val): return tf.train.Feature(bytes_list=tf.train.BytesList(value=[val]))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _bytes_feature(value):\n # return tf.train.Feature(bytes_list=tf.train.BytesList(value=[str(value)]))\n return tf.train.Feature(bytes_list=tf.train.BytesList(value=[value]))", "def _bytes_feature(value):\n\treturn tf.train.Feature(bytes_list=tf.train.BytesList(value=[value]))", "def bytes_feature(val...
[ "0.7683079", "0.7680102", "0.76524216", "0.76524216", "0.76469606", "0.7634248", "0.7634248", "0.7631949", "0.76295227", "0.76295227", "0.76295227", "0.76295227", "0.76295227", "0.7628643", "0.7628643", "0.7628643", "0.7628643", "0.7628643", "0.7628643", "0.7628643", "0.76286...
0.81043416
0
Add a float feature to TF record
def add_float_feature(val): return tf.train.Feature(float_list=tf.train.FloatList(value=[val]))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _float_feature(value):\r\n return tf.train.Feature(float_list=tf.train.FloatList(value=[value]))", "def _float_feature(value):\n\treturn tf.train.Feature(float_list=tf.train.FloatList(value=[value]))", "def _float_feature(value):\n return tf.train.Feature(float_list=tf.train.FloatList(value=[value]))",...
[ "0.8245549", "0.82245797", "0.82132673", "0.82132673", "0.82132673", "0.82132673", "0.82132673", "0.8211439", "0.8211439", "0.8211439", "0.82025266", "0.8199593", "0.8199593", "0.8198177", "0.8183827", "0.814349", "0.7981543", "0.7978574", "0.7963922", "0.7953178", "0.7879383...
0.8699266
0
Return a string representation of ``self``.
def _repr_(self): return "Hyperbolic plane"
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def toString(self) -> str:\n raise NotImplementedError", "def to_string(self):\r\n return self.__str__()", "def __str__ (self) :\n\n return self.as_string()", "def __repr__(self) -> str:\n return str(self)", "def as_string(self):\n return self.__repr__()", "def __str__(...
[ "0.8741423", "0.87224996", "0.8680442", "0.85674626", "0.85082954", "0.8498878", "0.8472973", "0.84432036", "0.84432036", "0.84432036", "0.84432036", "0.84149486", "0.84149486", "0.84149486", "0.84149486", "0.84149486", "0.84149486", "0.84149486", "0.84149486", "0.84149486", ...
0.0
-1
r""" Return the representation of ``self``.
def _repr_(self): return "Category of hyperbolic models of {}".format(self.base())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __repr__(self):\n return self.to_str()", "def __repr__(self):\n return self.to_str()", "def __repr__(self):\n return self.to_str()", "def __repr__(self):\n return self.to_str()", "def __repr__(self):\n return self.to_str()", "def __repr__(self):\n return self...
[ "0.8492433", "0.8492433", "0.8492433", "0.8492433", "0.8492433", "0.8492433", "0.8492433", "0.8492433", "0.8492433", "0.8492433", "0.8492433", "0.8492433", "0.8492433", "0.8492433", "0.8492433", "0.8492433", "0.8492433", "0.8492433", "0.8492433", "0.8492433", "0.8492433", "...
0.0
-1
Return an element of ``self``.
def _an_element_(self): from sage.rings.integer_ring import ZZ return self(self.realization_of().PD().get_point(ZZ.zero()))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def element(self):\n raise NotImplementedError('must be implemented by subclass')", "def element(self):\n raise NotImplementedError('must be implemented by subclass')", "def element(self):\n raise NotImplementedError('must be implemented by subclass')", "def element(self):\n ...
[ "0.81783766", "0.81098413", "0.81098413", "0.81098413", "0.81098413", "0.80804527", "0.8019886", "0.8019886", "0.7876684", "0.7832662", "0.7787052", "0.7787052", "0.7787052", "0.75894713", "0.7509793", "0.73849463", "0.7304684", "0.726448", "0.726448", "0.726448", "0.726448",...
0.688019
27
Sets both arms back into a neutral pose.
def set_slide_neutral(self): print("Moving to neutral pose...") joint_positions = deepcopy(self.neutral_joint_positions) joint_positions['right_j5'] = joint_positions['right_j5'] - np.pi / 2. self._right_arm.move_to_joint_positions(joint_positions)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def untuck(self):\n self.move_to_neutral()", "def set_neutral(self):\n\t\tself._head.set_pan(0.0)", "def specific_reset(self) -> None:\n self.agent.specific_reset() # reset joints\n new_pos = self.agent.init_xyz\n new_pos[:2] = np.random.uniform(-0.01, 0.01, 2)\n self.agent....
[ "0.6257", "0.62118137", "0.58830476", "0.57880026", "0.57558197", "0.5745818", "0.5722585", "0.570441", "0.56580836", "0.56580836", "0.5652807", "0.5652807", "0.5652807", "0.5639779", "0.5622309", "0.5611245", "0.56068724", "0.5550298", "0.5543597", "0.54904944", "0.54556614"...
0.6974061
0
The content id for the attachment. This is used when the Disposition is set to "inline" and the attachment is an image, allowing the file to be displayed within the email body.
def content_id(self): return self._content_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def media_content_id(self):\n return self._media_uri_final", "def content_id(self) -> Optional[str]:\n return pulumi.get(self, \"content_id\")", "def media_content_id(self):\n return int(self._gallery_status[\"current_item\"])", "def media_id(self):\n try:\n return Html...
[ "0.72976", "0.72968405", "0.6980438", "0.6888248", "0.6880548", "0.67309517", "0.66719824", "0.6555705", "0.65214354", "0.6505851", "0.64215696", "0.63582194", "0.63025564", "0.6213194", "0.6165843", "0.61495125", "0.61381423", "0.6129025", "0.6043038", "0.59756404", "0.59755...
0.76029843
0
The content id for the attachment. This is used when the Disposition is set to "inline" and the attachment is an image, allowing the file to be displayed within the email body.
def content_id(self, value): self._content_id = value
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def content_id(self):\n return self._content_id", "def media_content_id(self):\n return self._media_uri_final", "def content_id(self) -> Optional[str]:\n return pulumi.get(self, \"content_id\")", "def media_content_id(self):\n return int(self._gallery_status[\"current_item\"])", ...
[ "0.7603127", "0.72977793", "0.7297247", "0.697985", "0.6887459", "0.688012", "0.6730774", "0.66714644", "0.6555836", "0.6521059", "0.65050447", "0.6356957", "0.630258", "0.62113297", "0.61649114", "0.6148165", "0.61359584", "0.6126797", "0.6043087", "0.59755147", "0.597388", ...
0.6422164
11
Get a JSONready representation of this ContentId.
def get(self): return self.content_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def json(self):\n if self.resource:\n return jsonify(self.resource)\n return jsonify({'id': self.id})", "def to_json(self):\n properties = self.to_dict()\n if isinstance(self, db.Model):\n properties['id'] = unicode(self.key().id())\n return json.dumps(properties)", "def ...
[ "0.73052007", "0.7269874", "0.70611835", "0.70229465", "0.69953454", "0.6900262", "0.6873173", "0.6873173", "0.6873173", "0.68401384", "0.6805812", "0.68042696", "0.679642", "0.67664343", "0.67552537", "0.67552537", "0.6744171", "0.6742844", "0.67325854", "0.67192954", "0.670...
0.0
-1
Returns the kernel version.
def scan_kernel_version(kdir): version = None patch = None sub = None with open('{0}/Makefile'.format(kdir)) as makefile: for line in makefile.readlines(): m = re.match('VERSION = ([0-9]+).*', line) if m: version = m.group(1) continue ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_kernel_version():\r\n try:\r\n return utils.run('uname -r').stdout.strip()\r\n except:\r\n logging.info(\"Not Found\")\r\n return -1", "def get_kernel_version(self):\n raise DeviceException(DeviceException.FEATURE_NOT_IMPLEMENTED)", "def eurologic_kernel_version(self):...
[ "0.81008846", "0.79032165", "0.76334137", "0.7586205", "0.74808306", "0.74736696", "0.7275094", "0.71766865", "0.7101252", "0.7101252", "0.7096936", "0.7096661", "0.7065959", "0.70581996", "0.70436347", "0.69865215", "0.6975471", "0.69579965", "0.6933185", "0.6918746", "0.691...
0.0
-1
Returns a placeholder expression for use in a template field, based on the values provided in the placeholder assistant.
def build_expression(self, field_name, sub_field_name, null_value): expression = '' if field_name: expression = "${object." + field_name if sub_field_name: expression += "." + sub_field_name if null_value: expression += " or '''%s'''" %...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_geom_placeholder(self, value, srid):\r\n if hasattr(value, 'expression'):\r\n placeholder = '%s.%s' % tuple(map(self.quote_name, value.cols[value.expression]))\r\n else:\r\n placeholder = '%s(%%s)' % self.from_text\r\n return placeholder", "def placeholders(self...
[ "0.63743526", "0.59445417", "0.57625693", "0.5759558", "0.5702519", "0.5691603", "0.5575827", "0.55489147", "0.55346024", "0.5504435", "0.5497936", "0.54882425", "0.5423418", "0.5413989", "0.5346246", "0.5346246", "0.5346246", "0.5345721", "0.5253856", "0.5253217", "0.5235489...
0.504602
36
Set up figure frame.
def set_frame(self): plt.tick_params( bottom=False, labelbottom=False, left=False, labelleft=False, ) # Thicken frame. for axis in ["top", "bottom", "left", "right"]: self.ax.spines[axis].set_linewidth(self.framesize) # ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setupFrame(self, frame_width, frame_height):\n x, y = 0.0, 0.4\n self.x0 = int(frame_width*x)\n self.y0 = int(frame_height*y)\n self.width = 260\n self.height = 260", "def __init__(self, frame):\n self.frame = frame\n self._configure()", "def _setup_figure(s...
[ "0.72571784", "0.71929306", "0.7163306", "0.70162094", "0.6966143", "0.69639933", "0.69631886", "0.6958903", "0.68378246", "0.6823735", "0.68210393", "0.67005605", "0.66420925", "0.6628201", "0.66205955", "0.6618886", "0.66081244", "0.6606809", "0.6575992", "0.6560256", "0.64...
0.69308066
8
Add axes with rugs to figure.
def rug(self): self.rax_y = self.ax.inset_axes(bounds=[0.97, 0, 0.03, 1], zorder=-1) for index, value in self.df[f"order_{self.y}"].items(): if self.df.loc[index, f"highlight_{self.y}"] == 1: color_set = self.fgcolors zorder = 1 else: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setup_axes():\n\taxes = visuals.subplots(1, 2, figsize = (14, 7))\n\taxes[1].set_yscale(\"log\")\n\taxes[0].set_xlabel(\"[Fe/H]\")\n\taxes[0].set_ylabel(\"[Sr/Fe]\")\n\taxes[1].set_xlabel(\"[Sr/Fe]\")\n\taxes[1].set_ylabel(\"Stellar Probability Density\")\n\taxes[0].set_xlim([-2.2, 0.2])\n\taxes[0].set_ylim([-...
[ "0.6779655", "0.6731698", "0.6708752", "0.6679015", "0.65061593", "0.6420661", "0.6408931", "0.6408931", "0.6408931", "0.63229954", "0.62250024", "0.6214776", "0.6186683", "0.6183489", "0.6158858", "0.6138531", "0.61096376", "0.60924375", "0.6034165", "0.6026676", "0.59567374...
0.58557254
27
Annotate the highlights for one axis.
def annotate(self, model, refloc, margin, axis): step = 0 start_loc = self.df.loc[ self.df[f"neg_{model}"] == 1, f"order_{model}" ].min() if axis == "x": trans = self.ax.get_xaxis_transform() rotation = -90 va, ha = ("top", "center") ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def highlight_annotations(\n document_text: str, annotations: Iterable[Dict], highlight_color: str = \"On_Green\"\n) -> None:\n last_position = 0\n for annotation in sorted(annotations, key=lambda ann: ann[\"begin\"]):\n sys.stdout.write(document_text[last_position : annotation[\"begin\"]])\n ...
[ "0.6317909", "0.6051034", "0.586773", "0.5854627", "0.57734704", "0.57734704", "0.5568986", "0.5555706", "0.555398", "0.5539849", "0.5532791", "0.5518127", "0.55089915", "0.55068", "0.5489375", "0.5482988", "0.5429712", "0.54177785", "0.5388355", "0.5386648", "0.5385117", "...
0.52528864
33
Return the vector of partial derivatives \partial C_x / \partial a for the output activations.
def cost_derivative(self, output_activations, y): return (output_activations-y)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def compute_partials(self, inputs, partials):\n SOC = inputs['SOC']\n temperature = inputs['temperature']\n P_bat = inputs['P_bat']\n\n # dI_dP\n dV_dvoc = IR * self.exponential\n dV_dT = - IR * self.voc * np.exp(alpha*(temperature[4, :] - T0)/T0) * alpha / T0\n dVo...
[ "0.6179092", "0.6114064", "0.6112309", "0.60656875", "0.60630757", "0.5840356", "0.583547", "0.57925415", "0.57858336", "0.5762614", "0.5666805", "0.56219006", "0.56147337", "0.5574663", "0.5564686", "0.55597377", "0.5543099", "0.5522981", "0.5515255", "0.5511236", "0.5507647...
0.5604834
14
Calculate the softmax for the give inputs (array)
def softmax(inputs): return np.exp(inputs) / float(sum(np.exp(inputs)))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def softmax(inputs):\n probs = np.exp(inputs)\n # print(probs.shape)\n # t = np.sum(probs, axis=0)\n # print(t.shape)\n\n probs /= np.sum(probs, axis=0)[np.newaxis,:]\n return probs", "def softmax(x): \n return np.exp(x) / np.sum(np.exp(x), axis=0)", "def softmax(x):\n #pass ...
[ "0.84179634", "0.84082896", "0.84056705", "0.8404417", "0.8369695", "0.8365485", "0.83650833", "0.83619505", "0.83619505", "0.8347469", "0.83423907", "0.8340787", "0.83245265", "0.8308075", "0.8308075", "0.8308075", "0.8308075", "0.8308075", "0.8308075", "0.8308075", "0.83080...
0.84288365
0
Get raw YAML config file
def get(self, session: Session = None) -> Response: with open(self.manager.config_path, encoding='utf-8') as f: raw_config = base64.b64encode(f.read().encode("utf-8")) return jsonify(raw_config=raw_config.decode('utf-8'))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_config():\n\n _, res = DBX.files_download(c.io.FILE_CONFIG)\n return yaml.load(io.BytesIO(res.content), Loader=yaml.SafeLoader)", "def get_config():\n dir_path = os.path.dirname(os.path.realpath(__file__))\n with open(\"{0}/config.yaml\".format(dir_path), 'r') as ymlfile:\n cfg = yaml....
[ "0.7698308", "0.73629576", "0.71795374", "0.7147415", "0.7138259", "0.7101616", "0.7042093", "0.699779", "0.6987213", "0.6983033", "0.6979199", "0.69554466", "0.6927361", "0.6919509", "0.69022644", "0.68880963", "0.68742836", "0.68740237", "0.68654865", "0.6857767", "0.684961...
0.0
-1
Restores the state of a searcher from a given checkpoint_dir. Typically, you should use this function to restore from an experiment directory such as `~/ray_results/trainable`.
def restore_from_dir(self, checkpoint_dir: str): pattern = self.CKPT_FILE_TMPL.format("*") full_paths = glob.glob(os.path.join(checkpoint_dir, pattern)) if not full_paths: raise RuntimeError( "Searcher unable to find checkpoint in {}".format( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_from_path(self, checkpoint_dir):\n\n vars = self.save_var_names\n saver = tf.train.Saver(vars)\n\n def load_aux(ckpt_path):\n \"\"\"Helper function to not repeat the same code in the following lines.\"\"\"\n\n ckpt_name = os.path.basename(ckpt_path)\n ...
[ "0.69842064", "0.6946219", "0.68119496", "0.6662722", "0.66029936", "0.6584024", "0.64467186", "0.63855886", "0.63450915", "0.63288695", "0.62638265", "0.62571913", "0.6254052", "0.6243543", "0.6236257", "0.6220438", "0.62131906", "0.62090015", "0.6206836", "0.6178947", "0.61...
0.8037819
0
If a simulation has been run, then all of the simulated data is stored in the Community instance. This method allows reset the simulated data. This includes setting the space all equal to zero (all population is susceptible), making the number of susceptible people equal to the population, setting both the numbers of i...
def resetSimulatedData(self): self.space = 0*self.space # numpy array that represents the physical space self.susceptible = self.space.size # the current number of healthy people in the population self.infected = 0 # the current number of infected people in the population self.recovered ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reset(self):\n #print(self.agent.n_sim, self.score)\n # update the highscore if needed\n if self.isHuman and (self.score > self.highscore[0]):\n self.highscore[0] = self.score\n update_score(self.highscore, self.args.highscore_filename)\n elif (not self.isHuman...
[ "0.66978985", "0.6506713", "0.64672965", "0.64533985", "0.6412368", "0.6404691", "0.6326306", "0.6325623", "0.6306816", "0.6237314", "0.62287617", "0.622786", "0.62150884", "0.62078494", "0.62078494", "0.61849165", "0.61845803", "0.61740685", "0.6164537", "0.6164537", "0.6164...
0.8476137
0
Hashes the password with sha512 and a custom salt
def _hash_password(password: str) -> str: # return pbkdf2_sha512.encrypt(password, rounds=ROUNDS, salt=SALT) return pbkdf2_sha512.using(rounds=ROUNDS, salt=SALT).hash(password)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hash_password(password, salt):\n password = str(password).encode('utf-8')\n salt = str(salt).encode('utf-8')\n return hashlib.sha512(password + salt).hexdigest()", "def hash_pass(password, salt):\n return hashlib.pbkdf2_hmac('sha512', password.encode(), salt, 100000)", "def hash_password(userna...
[ "0.8544934", "0.81607574", "0.793365", "0.7686147", "0.7651949", "0.7635891", "0.76132005", "0.75970155", "0.75530016", "0.75530016", "0.75530016", "0.7551159", "0.7517355", "0.74149907", "0.7413352", "0.7399131", "0.73284376", "0.7300888", "0.726408", "0.7222791", "0.7165853...
0.7560769
8
Check if the given table (key) is available for the current database.
def __contains__(self, key: str) -> bool: return key in self.tables
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_table(cur, table: str) -> bool:\n table_data = cur.execute(f\"\"\"\n SELECT name \n FROM sqlite_master \n WHERE type='table' \n AND name='{table}'\n \"\"\")\n table_fetch = table_data.fetchall()\n if table_fetch:\n return True\n return False", "def table_check(tablen...
[ "0.7298775", "0.7286412", "0.72614473", "0.7253681", "0.724226", "0.7241168", "0.7179379", "0.7178198", "0.7146519", "0.71286076", "0.71249735", "0.7115607", "0.7111249", "0.7104864", "0.7095528", "0.7067111", "0.7065363", "0.70441204", "0.7035651", "0.7010644", "0.70074713",...
0.7333707
0
Checks if two chromosomes are equal.
def __eq__(self, other): if self.environment != other.environment: return False for i in range(0, len(self.genes)): if self.genes[i] != other.genes[i]: return False return True
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __eq__(self, other):\n # for each gene in each chromosome\n for g in range(len(self.genes)):\n # if any gene values don't match, then the chromosomes aren't equal\n if self.genes[g].value != other.genes[g].value:\n return False\n # everything matched, s...
[ "0.778959", "0.6994585", "0.6798651", "0.6668185", "0.6626954", "0.6623503", "0.6541541", "0.6535586", "0.64526373", "0.64474386", "0.6443252", "0.64266527", "0.6420439", "0.63989216", "0.63935906", "0.63893735", "0.6373956", "0.63720953", "0.63720953", "0.6368265", "0.635734...
0.6636454
4
Convert string to be usable with letters.
def sanitize_str(s): # throw away unkown characters return [c for c in s if c in letters]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def toAscii(s):\n return ''.join(\n char for char in unicodedata.normalize('NFD', s)\n if unicodedata.category(char) != 'Mn'\n and char in letters\n )", "def toChar(s):\n s = s.lower()\n ans = \"\"\n for c in s:\n if c in \"abcdefghijklmnopqrstuvwxyz\":\...
[ "0.7262935", "0.7157806", "0.7077717", "0.7019355", "0.6738509", "0.6702765", "0.66923785", "0.66702545", "0.6647793", "0.66234714", "0.6606909", "0.6600981", "0.65492404", "0.654188", "0.65063345", "0.64768803", "0.6449067", "0.640431", "0.6358249", "0.6332949", "0.63115746"...
0.6254122
23
Insert a single document into the database.
def insert_one(self, document: dict) -> None: if isinstance(document, dict): self._store_document(document) else: raise TypeError("The document must be a dictionary.") self._dump()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def insert_document(self, collection, doc):\n # Create/Access your collection\n mycol = self.db[collection]\n # Insert your document into the collection\n x = mycol.insert_one(doc)\n # Return the inserted id to verify success\n return x.inserted_id", "def write_to_db(sel...
[ "0.7577887", "0.7344655", "0.7302612", "0.7247188", "0.72302127", "0.69675297", "0.6962828", "0.6859846", "0.68276256", "0.6821491", "0.6810934", "0.68095297", "0.67823136", "0.67765546", "0.67170346", "0.6716065", "0.6716065", "0.6716065", "0.67146134", "0.66771656", "0.6643...
0.74187636
1
Remove and return a single item from this container.
def remove(self) -> T: raise NotImplementedError
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def popitem(self):\n return self.pop(0)", "def pop(self):\n if self.is_empty():\n return None\n\n return self.container.pop()", "def remove_item(self, item):\n node = self.find(item)\n if node:\n self.delete(node)\n return node.item\n e...
[ "0.77904224", "0.7588507", "0.74131995", "0.7311794", "0.72347856", "0.722206", "0.7209616", "0.71976835", "0.7193738", "0.7191363", "0.7181083", "0.7181083", "0.71752405", "0.71693474", "0.71510214", "0.70831436", "0.70820045", "0.70654213", "0.7006786", "0.6963707", "0.6963...
0.65258455
69
Initialize this to an empty PriorityQueue.
def __init__(self) -> None: self._queue = []
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self):\n # NOTE: DO not modify this method\n self.items = SimpleQueue()", "def __init__(self):\n self._head = None\n self._tail = None\n self._size = 0 # number of queue elements", "def __init__(self):\n self._data = [None]*ArrayQu...
[ "0.6948991", "0.6868646", "0.6764978", "0.675184", "0.66920394", "0.66715366", "0.6567047", "0.65492576", "0.6539167", "0.6522626", "0.65118873", "0.64532346", "0.64371717", "0.64270544", "0.6370677", "0.6370677", "0.6370677", "0.6370677", "0.6370677", "0.63680404", "0.636446...
0.6788094
2
Return True iff this PriorityQueue is empty. >>> pq = PriorityQueue() >>> pq.is_empty() True >>> pq.add('fred') >>> pq.is_empty() False
def is_empty(self): return not self._queue
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_empty(self):\n return len(self.priority_queue) == 0", "def is_empty(self) -> bool:\n return self.heap.length() == 0", "def is_empty(self) -> bool:\n return self.heap.length() == 0", "def is_empty(self):\n return len(self.the_queue) == 0", "def is_empty(self):\n ret...
[ "0.84815097", "0.817299", "0.817299", "0.8149176", "0.8086538", "0.8086538", "0.80703014", "0.8069835", "0.80422956", "0.80348605", "0.80176985", "0.799782", "0.79949874", "0.7968242", "0.79462737", "0.79342693", "0.79286665", "0.787511", "0.7868687", "0.7833849", "0.7819219"...
0.79697263
13
Returns the button toggle status as ``True`` if the button is down, ``False`` otherwise.
def GetIsDown(self): return self.isDown
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetToggle(self):\n\n return not self.up", "def is_on(self) -> bool:\n return self.tuya_device.status.get(DPCODE_SWITCH, False)", "def toggle(self):\n s = self.status()\n if s == self.POWER_OFF:\n self.on()\n else:\n self.off()\n return self.st...
[ "0.75451785", "0.6868887", "0.67516875", "0.67407733", "0.6735934", "0.67005575", "0.6684815", "0.6655542", "0.65768325", "0.65566736", "0.649138", "0.643725", "0.64340746", "0.642516", "0.6411064", "0.6368675", "0.6333683", "0.63252383", "0.63165075", "0.6315045", "0.6303490...
0.661361
8
Returns the object associated with this event.
def GetButtonObj(self): return self.theButton
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def event(self) -> object:\n return self._event", "def event(self):\n return self.events[0]", "def get_event(self):\r\n return self.events[0]", "def get_object(self):\n return self._object", "def event_object(self):\n return gevent.event.Event()", "def object(self):\n ...
[ "0.76154447", "0.75479025", "0.7494468", "0.7493104", "0.74510443", "0.7413265", "0.7101417", "0.69345385", "0.68949264", "0.6874278", "0.67343676", "0.6708251", "0.665867", "0.6631008", "0.6595437", "0.65767366", "0.64964503", "0.6488125", "0.64770263", "0.6468949", "0.64669...
0.0
-1
Returns the width of the 3D effect, in pixels.
def GetBezelWidth(self): return self.bezelWidth
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def width(self):\n return (self.scene.shape[2] - self.size) // self.size + 1", "def get_width(self) -> int:\n return int(self._surface.get_width())", "def width(self):\n return self.figure.scene.get_size()[0]", "def getWidth(self):\n wsum = 0.0\n for quad in self._quadrilat...
[ "0.75076944", "0.7350693", "0.71501404", "0.70440346", "0.7021647", "0.7014263", "0.69993365", "0.69502336", "0.6923199", "0.6920391", "0.690316", "0.6902643", "0.6844744", "0.6831388", "0.6822259", "0.6797453", "0.67792004", "0.676707", "0.6766191", "0.67578036", "0.67231643...
0.0
-1
Returns the toggled state of a button.
def GetToggle(self): return not self.up
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_button_state(self, button):\n\n\t\treturn self._interface.get_button_state(button)", "def get_button(self, button):\n return getattr(self.get_buttons_state(), button)", "def GetToolToggled(self, tool_id): \r\n\r\n tool = self.FindTool(tool_id)\r\n\r\n if tool:\r\n ...
[ "0.7299118", "0.66801935", "0.63489115", "0.63388854", "0.63388854", "0.63388854", "0.6327377", "0.6256028", "0.6251193", "0.62141967", "0.62102526", "0.6205126", "0.6137661", "0.6126939", "0.612023", "0.612023", "0.61143553", "0.6101284", "0.60972315", "0.607738", "0.6034381...
0.68893754
1
Histogram equalization for greyscale image. Perform histogram equalization on the 8bit greyscale intensity image I to produce a contrastenhanced image J. Full details of the algorithm are provided in the Szeliski text.
def histogram_eq(I): # Verify I is grayscale. if I.dtype != np.uint8: raise ValueError('Incorrect image format!') # Initialize constants total_pixels = I.shape[0] * I.shape[1] # Construct pixel intensity histogram histogram = np.zeros((256)) for i in range(I.shape[0]): for...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def histogram_equalize(im_orig):\n\n shape_len = len(im_orig.shape)\n if shape_len == 2: # grayscale\n return histogram_equalization_helper(im_orig)\n elif shape_len == 3 and im_orig.shape[2] == 3: # rgb\n im_yiq = rgb2yiq(im_orig)\n y = im_yiq[:, :, 0]\n y_eq, hist_orig, his...
[ "0.7097499", "0.70193976", "0.7011442", "0.6999644", "0.69969034", "0.69140625", "0.67905045", "0.6770471", "0.6766191", "0.6731226", "0.6717735", "0.66860473", "0.664666", "0.65857327", "0.6577627", "0.6567752", "0.64502776", "0.63522387", "0.6319445", "0.6225796", "0.617201...
0.76979345
0
Closes the storage writer.
def Close(self): self._RaiseIfNotWritable() self._storage_file.Close() self._storage_file = None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def storage_close(self):\n storage.close()", "def close_storage(self):\n storage.close()", "def handle_close(self):\n storage.close()", "async def close(self):\n self.writer.close()\n await self.writer.wait_closed()\n self.reader = None\n self.writer = None\n self....
[ "0.7711787", "0.76564044", "0.7175822", "0.7034548", "0.6880454", "0.67974627", "0.67561924", "0.6690417", "0.6690417", "0.6690417", "0.66590804", "0.6655008", "0.6633822", "0.66205126", "0.6560293", "0.65326536", "0.6512392", "0.6444899", "0.6414356", "0.63797855", "0.636066...
0.7903123
0
Retrieves a specific type of attribute containers.
def GetAttributeContainers(self, container_type): return self._storage_file.GetAttributeContainers(container_type)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _GetAttributeContainers(\n self, container_type, callback=None, cursor=0, maximum_number_of_items=0):\n if not cursor:\n cursor = 0\n\n cursor, items = self._store.GetSerializedAttributeContainers(\n container_type, cursor, maximum_number_of_items)\n\n containers = []\n identifiers...
[ "0.6628463", "0.6596773", "0.6255436", "0.6254775", "0.5965462", "0.59252703", "0.58050764", "0.5775991", "0.57129604", "0.56800145", "0.5620318", "0.5478619", "0.5466378", "0.53581125", "0.5351583", "0.5348908", "0.5317792", "0.52939755", "0.528698", "0.5285917", "0.5279", ...
0.76405406
0
Sets the storage profiler.
def SetStorageProfiler(self, storage_profiler): self._storage_profiler = storage_profiler if self._storage_file: self._storage_file.SetStorageProfiler(storage_profiler)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SetSerializersProfiler(self, serializers_profiler):\n self._serializers_profiler = serializers_profiler\n if self._storage_file:\n self._storage_file.SetSerializersProfiler(serializers_profiler)", "def set_storage(self):\n pass", "def setUseStorage(self, value):\n return self._set(...
[ "0.7276464", "0.66255844", "0.6276183", "0.6017577", "0.5644702", "0.5633347", "0.56164354", "0.5539386", "0.5455604", "0.5431376", "0.5415026", "0.53170526", "0.5293441", "0.5253116", "0.51604486", "0.51297575", "0.5110745", "0.5090203", "0.5069205", "0.5026467", "0.50220656...
0.8806733
0
Initialize the encoder hidden state.
def _init_state(self, encoder_hidden): if encoder_hidden is None: return None if isinstance(encoder_hidden, tuple): encoder_hidden = tuple([self._cat_directions(h) for h in encoder_hidden]) else: encoder_hidden = self._cat_directions(encoder_hidden) re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_hidden_state(self, encoder_out: torch.Tensor):\n pass", "def initialize_hidden_state(self):\n return tf.zeros(shape=(self.batch_size, self.enc_units))", "def init_hidden_state(self, encoder_out):\n init_internal_state = []\n mean_encoder_out = encoder_out.mean(dim=1)\n ...
[ "0.83275086", "0.74040484", "0.7290414", "0.7279931", "0.7215229", "0.7215229", "0.70479804", "0.69852823", "0.6901168", "0.68980813", "0.689464", "0.68280524", "0.6804546", "0.67857987", "0.6757444", "0.6757444", "0.6757444", "0.66996604", "0.6488062", "0.6274202", "0.620734...
0.77102697
1
If the encoder is bidirectional, do the following transformation. (directions layers, batch, hidden_size) > (layers, batch, directions hidden_size)
def _cat_directions(self, h): if self.bidirectional_encoder: h = torch.cat([h[0:h.size(0):2], h[1:h.size(0):2]], 2) return h
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def encoder_decoder_archi_gan(inputs, is_train):\n\n encoder_layers = []\n\n encoded = inputs\n\n encoder_layers.append(encoded)\n\n for i in range(config.encoder_layers):\n encoded = encoder_conv_block_gan(encoded, i, is_train)\n encoder_layers.append(encoded)\n \n encoder_layers.r...
[ "0.63273656", "0.6275077", "0.6270109", "0.62468034", "0.62136173", "0.6086984", "0.6011517", "0.60074687", "0.5992102", "0.5970551", "0.5915067", "0.5903836", "0.58467996", "0.58417934", "0.582856", "0.5822673", "0.5803436", "0.5800285", "0.57880664", "0.57573855", "0.575651...
0.0
-1
Gets an upload destination for a user to upload a video
def GetUploadDestination(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_destination(self):\n\n return self.destination", "def get_destination(self):\n return self._destination", "def getDestination(self):\n return self.__destination", "def destination(self) -> str:\n return pulumi.get(self, \"destination\")", "def get_video_uploader(self, vi...
[ "0.62036264", "0.61371875", "0.5917423", "0.58642936", "0.5795723", "0.57692134", "0.5739637", "0.5739637", "0.5723045", "0.5690933", "0.56629807", "0.5633953", "0.56088006", "0.5602488", "0.555997", "0.5542365", "0.5460711", "0.5427822", "0.5329352", "0.5297377", "0.5269809"...
0.622991
0
Adds a new aspect to the aspect stack.
def push_aspect(name, func): _aspects[name].append(func) return func
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def aspect(self, aspect):\n\n self._aspect = aspect", "def aspect(name):\n\t###########################################################################\n\tdef decorator(func):\n\t\t\"\"\" Injects an aspect.\n\t\t\"\"\"\n\t\t#######################################################################\n\t\t@wrap...
[ "0.6590813", "0.5982683", "0.5529745", "0.52931756", "0.52415067", "0.5222859", "0.5193024", "0.51448274", "0.5094769", "0.50875425", "0.50823927", "0.49313036", "0.48661923", "0.48474908", "0.48309085", "0.4798404", "0.4775284", "0.4773566", "0.47732422", "0.4772551", "0.477...
0.70453256
0
The drift component of flux across the boundary at position `x_bound` at time `t`. Flux here is essentially the amount of the mass of the PDF that is past the boundary point `x_bound`. There is generally no need to redefine this method in subclasses.
def get_flux(self, x_bound, t, dx, dt, conditions, **kwargs): return 0.5*dt/dx * np.sign(x_bound) * self.get_drift(x=x_bound, t=t, dx=dx, dt=dt, conditions=conditions, **kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def driftRHS(field,drift_velocity,t,x):\n f = field.getValue(x)\n fs = np.linalg.norm(f)\n f = f/fs\n return -f*drift_velocity(fs)", "def driftRHS_3D(field,drift_velocity,t,x):\n f = field.getValue(x)\n fs = np.sqrt(f[0]**2 + f[1]**2 + f[2]**2)\n f = f/fs\n return -f*drift_velocity(fs)", ...
[ "0.63681835", "0.617701", "0.60752255", "0.607218", "0.57572776", "0.57043827", "0.5599544", "0.55361813", "0.5529505", "0.54733574", "0.54657805", "0.54639107", "0.5378155", "0.5360081", "0.53446394", "0.53238505", "0.5254196", "0.5251151", "0.52437097", "0.5242792", "0.5214...
0.77867216
0
Computes the next update datetime based on the minimum update interval.
def _compute_next_update(self): self.next_update = datetime.now() + timedelta(seconds=self.min_interval)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _next_update_time(self, seconds=10):\n now = get_aware_utc_now()\n next_update_time = now + datetime.timedelta(\n seconds=seconds)\n return next_update_time", "def nextUpdate(self) -> datetime:\n next_update = self['tbs_cert_list']['next_update'].native\n return ...
[ "0.71117336", "0.7036454", "0.6355982", "0.63291264", "0.62791497", "0.60372615", "0.59528196", "0.5825545", "0.5778033", "0.5765978", "0.5731774", "0.5700743", "0.5675503", "0.5675503", "0.56210774", "0.5579245", "0.5541402", "0.5541402", "0.5536488", "0.5492636", "0.5467546...
0.83682543
0
Mock the container write test path in to pytest's tmp directory.
def mock_write_test_path(tmp_path, monkeypatch): write_test_path = tmp_path / "mock_write_test" # Wrap the path so read-only methods can be replaced write_test_path = MagicMock(wraps=write_test_path) monkeypatch.setattr(Docker, "_write_test_path", lambda self: write_test_path) return write_test_path
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_user_mapping_write_file_path(mock_tools):\n expected_path = Path.cwd() / \"build\" / \"container_write_test\"\n assert Docker(mock_tools)._write_test_path() == expected_path", "def test_file_get_tmp_path(self):\n with mock.patch(\"JumpScale.j\") as j_mock:\n from JumpScale import...
[ "0.73017126", "0.69020396", "0.6734275", "0.64868826", "0.64392155", "0.6429126", "0.628909", "0.62798464", "0.626127", "0.6175567", "0.61468744", "0.6141561", "0.60951006", "0.606143", "0.60552305", "0.60512805", "0.60433507", "0.6013311", "0.60041976", "0.5977282", "0.59593...
0.77810174
0
If docker info fails in unknown ways, the check fails.
def test_docker_exists_but_unknown_error_when_running_command(mock_tools): mock_tools.subprocess.check_output.side_effect = [ VALID_DOCKER_VERSION, subprocess.CalledProcessError( returncode=1, cmd="docker info", output="This command failed!", ), ] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_docker_exists_but_process_lacks_permission_to_use_it(mock_tools):\n error_message = \"\"\"\nClient:\n Debug Mode: false\n\nServer:\nERROR: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock:\n\nGet http://%2Fvar%2Frun%2Fdocker.sock/v1.40/info: dial ...
[ "0.68912244", "0.68887734", "0.6790249", "0.6752919", "0.6732436", "0.66849923", "0.66396654", "0.65444404", "0.6492621", "0.6478369", "0.63943005", "0.6363799", "0.6287431", "0.61586285", "0.6143665", "0.61081743", "0.6096299", "0.608642", "0.60820615", "0.60734266", "0.6022...
0.71094847
0
Test that the proper exception is raised when the user could not be authenticated
def test_bad_auth(): def auth_denied(request): request.send_error(401) with test_server(handler=auth_denied, methods=("post", "get"), port="random") as server: stream = TweetStream("foo", "bar", url=server.baseurl) assert_raises(AuthenticationError, stream.next) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_not_authenticated(self):\n pass # lint-amnesty, pylint: disable=unnecessary-pass", "def test_not_authenticated(self):\n pass # lint-amnesty, pylint: disable=unnecessary-pass", "def test_invalid_login(self):\n self.assertRaises(\n session.AuthenticationError,\n ...
[ "0.80265975", "0.80265975", "0.7918248", "0.78779113", "0.7777211", "0.7757006", "0.77400136", "0.76763177", "0.767103", "0.76533085", "0.7619449", "0.7551753", "0.7531073", "0.7526834", "0.74753904", "0.74635243", "0.74528605", "0.7450236", "0.7445279", "0.743466", "0.743352...
0.0
-1
Check we get a string back and can parse it okay when want_json=True
def test_want_json(): def tweetsource(request): yield single_tweet + "\n" def do_test(klass, *args): with test_server(handler=tweetsource, methods=("post", "get"), port="random") as server: stream = klass("foo", "bar", *args, url=server.baseurl, want_json=Tr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __valid_json(string):\n try:\n obj = json.loads(string)\n except ValueError:\n return False\n else:\n return json.dumps(obj)", "def try_json(string):\n try:\n return json.loads(string)\n except:\n return string", "def is_correct_json...
[ "0.78765416", "0.7727453", "0.75180465", "0.7162169", "0.70228195", "0.7012049", "0.6904843", "0.68610847", "0.6768262", "0.6747166", "0.67167264", "0.67083615", "0.6636443", "0.6619809", "0.6619809", "0.6619809", "0.66142577", "0.6610956", "0.6578211", "0.6578211", "0.654034...
0.0
-1
Initialize the first name, last name, and annual salary attributes
def __init__(self, first_name, last_name, annual_salary): self.first_name = first_name self.last_name = last_name self.annual_salary = annual_salary
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self,fname,lname,salary):\n self.first_name = fname\n self.last_name = lname\n self.salary = salary", "def __init__(self, first, last, salary):\n\t\tself.first = first \n\t\tself.last = last \n\t\tself.salary = salary", "def __init__(self, first_name, last_name, department, ag...
[ "0.75280595", "0.7447084", "0.7255864", "0.69865215", "0.67941487", "0.659205", "0.65308046", "0.65003425", "0.64944786", "0.64699334", "0.6456898", "0.6456898", "0.6456898", "0.6456898", "0.6456898", "0.6456898", "0.6456898", "0.6456898", "0.64486945", "0.6434271", "0.626107...
0.86451817
0
Returns true if worker has no tasks to do. False otherwise.
def worker_done(ID): start = time.time() completedTasks = Task.objects.filter(workerID=ID) completedIP = IP_Pair.objects.filter(id__in=completedTasks.values('ip_pair')) incompleteIP = IP_Pair.objects.filter(isDone=False).exclude(id__in=completedIP) # if queue_pending_system: if (toggles.EDDY_SYS == 1): outOfF...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_trivial_worker(self, state):\n if self.assistant:\n return False\n \n return all(not task.resources for task in self.get_tasks(state, PENDING))", "def _workers_available(self) -> bool:\n total_compute_power = sum(self.client.nthreads().values())\n if len(self....
[ "0.77842504", "0.72381073", "0.72274053", "0.71967787", "0.7089857", "0.7073187", "0.7009198", "0.7007339", "0.7007339", "0.69822454", "0.69822454", "0.6981235", "0.6977663", "0.6975328", "0.6974978", "0.69628346", "0.69305575", "0.6929279", "0.6926294", "0.6923365", "0.69152...
0.0
-1
Checks to see if ticket has reached lifetime
def move_window(): if SLIDING_WINDOW: # get the chosen predicates pred = Predicate.objects.filter(pk__in=[p+1 for p in toggles.CHOSEN_PREDS]) # handle window properties for p in pred: p.move_window()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isValid( self ):\n\n assert self.issueDate\n now = int(time.time())\n\n if (now - self.issueDate) > const.SESSION_TICKET_LIFETIME:\n log.debug(\"Ticket is not valid anymore.\")\n return False\n\n return Tr...
[ "0.75031286", "0.69881225", "0.68629116", "0.6801228", "0.6683087", "0.66756445", "0.6592605", "0.65032005", "0.6500314", "0.648864", "0.6486985", "0.6464055", "0.6440451", "0.6415744", "0.6407286", "0.640708", "0.6388619", "0.63703513", "0.6359454", "0.63459146", "0.63389075...
0.0
-1
Chooses random item for right now
def chooseItem(ipSet): if (toggles.ITEM_SYS == 1): #if item_started_system: tempSet = ipSet.filter(item__isStarted=True) if len(tempSet) != 0: ipSet = tempSet elif (toggles.ITEM_SYS == 2): #if item_almost_false_system: tempSet = ipSet.filter(item__almostFalse=True) if len(tempSet) != 0: ipSet = tempS...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def random_item(self):\n if self.sample_negative_items_empirically:\n # just pick something someone rated!\n u = self.uniform_user()\n i = random.choice(self.dataModel.getItemIDsFromUid(u))\n else:\n i = random.randint(0,self.num_items-1)\n return i"...
[ "0.7681807", "0.756321", "0.7554254", "0.7553406", "0.74940026", "0.7223411", "0.70853555", "0.7079729", "0.7075651", "0.7075651", "0.7075651", "0.7075651", "0.70417917", "0.69233906", "0.6882103", "0.6868762", "0.68575984", "0.68165153", "0.67943484", "0.6779314", "0.6775591...
0.62942547
61
Returns whether the thread should terminate.
def should_terminate(self): return self._pdialog.should_terminate()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def should_terminate(self):\n return self._terminate.isSet()", "def check_termination(self) -> bool:\n return self.terminate", "def terminating(self):\n if self._terminateLock.acquire(False):\n self._terminateLock.release()\n return False\n return True", "def...
[ "0.79474115", "0.769951", "0.7508292", "0.7405596", "0.7228737", "0.7208057", "0.71831405", "0.68301445", "0.6704397", "0.6680145", "0.6653033", "0.6628355", "0.6599662", "0.6580868", "0.6568525", "0.6560918", "0.65279526", "0.6497856", "0.6478082", "0.6471028", "0.6456913", ...
0.6545773
16
Get timezone from JSON object.
def timezone(self): return self.data.get("timezone")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def timezone(self):\n tz_data = self._router_request(\n self._make_request_data(\n 'getTimeZone',\n data=dict()\n )\n )\n\n return tz_data['data']", "def getTimezone(profile):\n try:\n return timezone(profile['timezone'])\n exc...
[ "0.64240223", "0.62670374", "0.60126", "0.60059047", "0.59843534", "0.5952691", "0.59187204", "0.5917319", "0.58998543", "0.5898519", "0.5857339", "0.5833262", "0.580277", "0.57778513", "0.5752802", "0.5713357", "0.56907284", "0.56907284", "0.56907284", "0.5643438", "0.562670...
0.67213875
0
Returns the Currently object for this forecast.
def currently(self): return c.Currently(self)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def forecast_currently():\n forecast = get_forecast()\n currently = forecast.currently()\n return currently", "def get_current(self) -> typing.Any:\n\n return self.current_obj", "def getCurrent(self):\n return self.__current", "def get_current(self):\n self._raise_not_implemente...
[ "0.7974358", "0.71039456", "0.6754112", "0.67170024", "0.65010786", "0.64250106", "0.6387724", "0.6384996", "0.6370885", "0.63598627", "0.63598627", "0.63598627", "0.62923765", "0.62623864", "0.62556076", "0.6088064", "0.60771173", "0.606048", "0.6058058", "0.60558784", "0.59...
0.76892203
1
Returns the Minutely object for this forecast.
def minutely(self): return c.Minutely(self)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def take_min(self):\n return self.get_first()", "def min(self):\n return self.get_first()", "def _get_minimum(self):\n return self._minimum", "def get_min(self):\n return self.serie.min()", "def minimum_temperature(self):\n return self._minimum_temperature", "def Minimu...
[ "0.59117514", "0.5826272", "0.57651365", "0.5696232", "0.5664116", "0.5652094", "0.56354177", "0.56297123", "0.5615924", "0.5615924", "0.55786777", "0.5545955", "0.5505301", "0.5505301", "0.5477315", "0.5473182", "0.5469875", "0.54676616", "0.54590464", "0.54536873", "0.54072...
0.6779775
0
Returns the Hourly object for this forecast.
def hourly(self): return c.Hourly(self)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_hourly(self):\n pass", "def hourly_data(self):\n return self._hourly_data", "def get_hourly(self, from_currency, to_currency, limit = DEFAULT_LIMIT, aggregate = DEFAULT_AGGREGATE):\n return self.__get(HISTORY_HOUR, from_currency, to_currency, limit, aggregate)", "def getHour(self...
[ "0.72207147", "0.6782359", "0.6485721", "0.63921386", "0.6271694", "0.62637603", "0.6138476", "0.6093286", "0.6029575", "0.60273796", "0.60273796", "0.602431", "0.6022983", "0.59905833", "0.59390634", "0.59268713", "0.5840864", "0.58353907", "0.58283454", "0.58283454", "0.582...
0.7937558
0
Return an OpenMOC material corresponding to an OpenMC material.
def get_openmoc_material(openmc_material): cv.check_type('openmc_material', openmc_material, openmc.Material) material_id = openmc_material.id # If this Material was already created, use it if material_id in OPENMOC_MATERIALS: return OPENMOC_MATERIALS[material_id] # Create an OpenMOC Mat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_openmc_material(openmoc_material):\n\n cv.check_type('openmoc_material', openmoc_material, openmoc.Material)\n\n material_id = openmoc_material.getId()\n\n # If this Material was already created, use it\n if material_id in OPENMC_MATERIALS:\n return OPENMC_MATERIALS[material_id]\n\n #...
[ "0.8735244", "0.67762583", "0.66410154", "0.66345185", "0.6525797", "0.648403", "0.64300996", "0.6384585", "0.6216925", "0.6146153", "0.6019584", "0.59865904", "0.5945007", "0.59367746", "0.5873887", "0.5840313", "0.57828736", "0.5770278", "0.5766001", "0.57538843", "0.559800...
0.8786085
0
Return an OpenMC material corresponding to an OpenMOC material.
def get_openmc_material(openmoc_material): cv.check_type('openmoc_material', openmoc_material, openmoc.Material) material_id = openmoc_material.getId() # If this Material was already created, use it if material_id in OPENMC_MATERIALS: return OPENMC_MATERIALS[material_id] # Create an Open...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_openmoc_material(openmc_material):\n\n cv.check_type('openmc_material', openmc_material, openmc.Material)\n\n material_id = openmc_material.id\n\n # If this Material was already created, use it\n if material_id in OPENMOC_MATERIALS:\n return OPENMOC_MATERIALS[material_id]\n\n # Create...
[ "0.86616486", "0.6853294", "0.6639219", "0.66306", "0.6469908", "0.6436285", "0.6377287", "0.63524336", "0.6201692", "0.60699224", "0.60421264", "0.6014813", "0.6010914", "0.5947996", "0.58896595", "0.5853345", "0.5842483", "0.58386713", "0.57723063", "0.5737843", "0.56091523...
0.8640302
1
Return an OpenMOC region corresponding to an OpenMC region.
def get_openmoc_region(openmc_region): cv.check_type('openmc_region', openmc_region, openmc.Region) # Recursively instantiate a region of the appropriate type if isinstance(openmc_region, openmc.Halfspace): surface = openmc_region.surface halfspace = -1 if openmc_region.side == '-' else 1 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_openmc_region(openmoc_region):\n\n cv.check_type('openmoc_region', openmoc_region, openmoc.Region)\n\n # Recursively instantiate a region of the appropriate type\n if openmoc_region.getRegionType() == openmoc.HALFSPACE:\n openmoc_region = openmoc.castRegionToHalfspace(openmoc_region)\n ...
[ "0.8168617", "0.6238885", "0.60693747", "0.6023928", "0.59750843", "0.5787302", "0.57264614", "0.56637657", "0.55827737", "0.55693793", "0.542767", "0.542767", "0.5408503", "0.5354147", "0.53396237", "0.529081", "0.5234005", "0.52330047", "0.52330047", "0.52330047", "0.523300...
0.81600696
1
Return an OpenMC region corresponding to an OpenMOC region.
def get_openmc_region(openmoc_region): cv.check_type('openmoc_region', openmoc_region, openmoc.Region) # Recursively instantiate a region of the appropriate type if openmoc_region.getRegionType() == openmoc.HALFSPACE: openmoc_region = openmoc.castRegionToHalfspace(openmoc_region) surface =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_openmoc_region(openmc_region):\n\n cv.check_type('openmc_region', openmc_region, openmc.Region)\n\n # Recursively instantiate a region of the appropriate type\n if isinstance(openmc_region, openmc.Halfspace):\n surface = openmc_region.surface\n halfspace = -1 if openmc_region.side ==...
[ "0.8085679", "0.5989654", "0.5968801", "0.5884552", "0.58451515", "0.57534915", "0.5735959", "0.5722116", "0.5646576", "0.5646576", "0.56162536", "0.5560258", "0.5511791", "0.5511791", "0.5511791", "0.5511791", "0.5511791", "0.5511791", "0.55083287", "0.5496168", "0.5486139",...
0.8183092
0
Get all the nodes and edges corresponding to our conductor's graph of concert clients.
def get_nodes_and_edges(self, conductor_graph_instance): nodes = conductor_graph_instance.concert_clients.values() edges = [] important_states = [ concert_msgs.ConcertClientState.MISSING, concert_msgs.ConcertClientState.AVAILABLE ] for node in nodes: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clients(self, r):\r\n return r.clients", "def getNodes(self):\n data = self.connect('get','nodes',None)\n return data", "def get_clients(self):\n clis = []\n for c in self._clients:\n clis.append(c.get_address())\n return clis", "def get_clients(self):...
[ "0.65350705", "0.6400401", "0.6398392", "0.6398392", "0.63628703", "0.63580626", "0.63475424", "0.6346742", "0.6313117", "0.62991047", "0.621144", "0.6174126", "0.61601233", "0.6159495", "0.61531204", "0.6145184", "0.6130077", "0.61158913", "0.6113137", "0.60688573", "0.60452...
0.788209
0
Plots hyperconnectivity in 3D.
def plot_links_3d_inter(ax: str, epo1: mne.Epochs, epo2: mne.Epochs, C: np.ndarray, threshold: str='auto', steps: int=10): # extract sensor infos and transform loc to fit with headmodel loc1 = copy(np.array([ch['loc'][:3] for ch in epo1.info['chs']])) loc1 = transform(loc1, traX=-0.17, traY=0, traZ=0....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def plot3d(self):\n plot_rupture_wire3d(self)", "def plot_3d_plot(self, features, headers, labels):\n self.master_plot.scatter(features[:, 0], features[:, 1], features[:, 2], c=labels)\n self.master_plot.set_xlabel(headers[0])\n self.master_plot.set_ylabel(headers[1])\n self.ma...
[ "0.740988", "0.6841408", "0.680333", "0.6557689", "0.6546958", "0.6427141", "0.6426638", "0.64190346", "0.63411844", "0.6326457", "0.62901676", "0.62557065", "0.6214867", "0.61868155", "0.61695606", "0.612503", "0.61064655", "0.608286", "0.60490936", "0.6036209", "0.60334635"...
0.5864446
36
Visualization of interbrain connectivity in 3D.
def viz_3D_inter (epo1: mne.Epochs, epo2: mne.Epochs, C: np.ndarray, threshold: float=0.95, steps: int=10, lab: bool = False): # defining head model and adding sensors vertices, faces = get_3d_heads_inter() fig = plt.figure() ax = fig.add_subplot(projection='3d') ax.axis("off") plot_3d_heads(ax...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def plot3d(self):\n plot_rupture_wire3d(self)", "def visualize_scan(self):\n fig = plt.figure()\n ax = fig.add_subplot(111, projection='3d')\n ax.scatter(self.p1_points[:, 0], self.p1_points[:, 1], self.p1_points[:, 2], c='r')\n ax.scatter(self.p2_points[:, 0], self.p2_points[:...
[ "0.7151554", "0.70256764", "0.66784364", "0.6626505", "0.6504304", "0.6248685", "0.6137891", "0.6095599", "0.6083701", "0.60728925", "0.60529244", "0.59890217", "0.5957225", "0.5952916", "0.59520364", "0.59432256", "0.5928648", "0.59260994", "0.59082717", "0.5876128", "0.5844...
0.5843858
21
Visualization of interbrain connectivity in 3D.
def viz_2D_topomap_intra (epo1: mne.Epochs, epo2: mne.Epochs, C1: np.ndarray, C2: np.ndarray, threshold: float=0.95, steps: int=2, lab: bool = False): # defining head model and adding sensors fig = plt.figure() ax = fig.add_subpl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def plot3d(self):\n plot_rupture_wire3d(self)", "def visualize_scan(self):\n fig = plt.figure()\n ax = fig.add_subplot(111, projection='3d')\n ax.scatter(self.p1_points[:, 0], self.p1_points[:, 1], self.p1_points[:, 2], c='r')\n ax.scatter(self.p2_points[:, 0], self.p2_points[:...
[ "0.7151554", "0.70256764", "0.66784364", "0.6626505", "0.6504304", "0.6248685", "0.6137891", "0.6095599", "0.6083701", "0.60728925", "0.60529244", "0.59890217", "0.5957225", "0.5952916", "0.59520364", "0.59432256", "0.5928648", "0.59260994", "0.59082717", "0.5876128", "0.5844...
0.0
-1