query
stringlengths
9
9.05k
document
stringlengths
10
222k
metadata
dict
negatives
listlengths
30
30
negative_scores
listlengths
30
30
document_score
stringlengths
4
10
document_rank
stringclasses
2 values
Gets the screenshots of this Listing. Screenshots of the listing.
def screenshots(self): return self._screenshots
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_snapshots(self) -> SnapshotListing:\n return self.snapshots", "def get_screenshot(self):\n method_name = self._testMethodName\n class_name = type(self).__name__\n time_now = datetime.now().strftime('%Y-%m-%d_%H-%M-%S')\n folder = os.path.dirname(os.getcwd())\n di...
[ "0.6174978", "0.6116951", "0.6091908", "0.6024215", "0.6005619", "0.59941226", "0.59864277", "0.5935582", "0.59189415", "0.59039044", "0.58653", "0.5848835", "0.58187425", "0.5804207", "0.57708025", "0.576877", "0.5758277", "0.57075787", "0.5696212", "0.569035", "0.5667706", ...
0.7933375
0
Sets the screenshots of this Listing. Screenshots of the listing.
def screenshots(self, screenshots): self._screenshots = screenshots
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def screenshots(self):\n return self._screenshots", "def configure_screenshots(scenario):\r\n world.auto_capture_screenshots = False", "def SetImageList(self, imageList):\r\n\r\n self._imageList = imageList", "def set_screens(screen_list):\n global screens, screen_manager\n screens = s...
[ "0.6365965", "0.5973052", "0.57192713", "0.5689033", "0.5593626", "0.5548558", "0.5500021", "0.5379296", "0.537902", "0.53294593", "0.5321024", "0.53020626", "0.528143", "0.5255104", "0.5241511", "0.5227716", "0.5225529", "0.52027875", "0.5186099", "0.5182037", "0.5140037", ...
0.77826786
0
Gets the videos of this Listing. Videos of the listing.
def videos(self): return self._videos
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def get_videos(self) -> APIReturn:\n return await self._request(\"GET\", \"/getVideos\")", "def video_list(self) -> list:\n return self._video_list", "def get_videos(self):\n return list(self._videos.values())", "def get_videos(self, **kwargs):\n return self.get('videos', **...
[ "0.791812", "0.78357685", "0.7770867", "0.772594", "0.76119924", "0.74094355", "0.7159197", "0.7119709", "0.7093945", "0.6897495", "0.68349713", "0.6766724", "0.67164904", "0.66286135", "0.64525926", "0.64008445", "0.6372604", "0.6356699", "0.63502234", "0.6330106", "0.625055...
0.79238147
0
Sets the videos of this Listing. Videos of the listing.
def videos(self, videos): self._videos = videos
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def videos(self):\n return self._videos", "def get_videos(self, **kwargs):\n return self.get('videos', **kwargs)", "def video_list(self) -> list:\n return self._video_list", "def videos(self):\r\n return v3.Videos(self)", "def videos(self) -> List[AbstractVideoLoader]:\n ...
[ "0.68391746", "0.6699461", "0.6632075", "0.6552472", "0.65026706", "0.63689184", "0.6289307", "0.612901", "0.6074", "0.607086", "0.6037618", "0.6023897", "0.59083235", "0.589968", "0.5862606", "0.58311903", "0.5796718", "0.57352465", "0.5617791", "0.5506406", "0.5484566", "...
0.79657626
0
Gets the support_contacts of this Listing. Contact information to use to get support from the publisher for the listing.
def support_contacts(self): return self._support_contacts
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def contact_list(self):\n return self._contact_list", "def get_contacts(self):\n\n\t\treturn self.__contacts", "def list_contacts(self):\n return self.contacts", "def get_contacts(self):\n contacts = Membership.objects.filter(entity = self, key_contact = True).order_by('importance_to_ent...
[ "0.71102977", "0.70214784", "0.70081", "0.6748876", "0.67099714", "0.66819096", "0.6501014", "0.6308295", "0.6275049", "0.6235824", "0.6175169", "0.5944758", "0.5910778", "0.58919144", "0.5812473", "0.5797119", "0.57762897", "0.57244956", "0.57244956", "0.5658239", "0.5623869...
0.79084134
0
Sets the support_contacts of this Listing. Contact information to use to get support from the publisher for the listing.
def support_contacts(self, support_contacts): self._support_contacts = support_contacts
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def contact_list(self, contact_list):\n \n self._contact_list = contact_list", "def support_contacts(self):\n return self._support_contacts", "def set_contacts(self, contacts):\n\n\t\tif contacts is not None and not isinstance(contacts, list):\n\t\t\traise SDKException(Constants.DATA_TYPE_...
[ "0.6686726", "0.6543302", "0.64893526", "0.6251802", "0.6251802", "0.60224813", "0.5890734", "0.58105534", "0.5732187", "0.5686169", "0.55359674", "0.5383936", "0.5290222", "0.52160406", "0.51834357", "0.51061726", "0.50627476", "0.50477874", "0.50451815", "0.5015341", "0.499...
0.8408827
0
Gets the support_links of this Listing. Links to support resources for the listing.
def support_links(self): return self._support_links
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def support_links(self, support_links):\n self._support_links = support_links", "def getLinks(self):\n\n return self.links", "def documentation_links(self):\n return self._documentation_links", "def get_links(self) -> List[str]:\n return self.__links", "def support_url(self) -> ...
[ "0.63963586", "0.6201267", "0.61815244", "0.61208", "0.60785246", "0.6051551", "0.59929067", "0.59713036", "0.5868064", "0.58464664", "0.58464664", "0.58464664", "0.58464664", "0.58464664", "0.57972467", "0.5769803", "0.57259023", "0.56893015", "0.5656609", "0.55859476", "0.5...
0.7983624
0
Sets the support_links of this Listing. Links to support resources for the listing.
def support_links(self, support_links): self._support_links = support_links
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def support_links(self):\n return self._support_links", "def support_url(self, support_url: str):\n\n self._support_url = support_url", "def documentation_links(self, documentation_links):\n self._documentation_links = documentation_links", "def support_contacts(self, support_contacts):\...
[ "0.69751316", "0.62614554", "0.6255054", "0.61495894", "0.59559757", "0.5915402", "0.5915402", "0.5915402", "0.5915402", "0.5915402", "0.5915402", "0.5915402", "0.5915402", "0.5915402", "0.5915402", "0.5915402", "0.5883081", "0.5737501", "0.5633349", "0.5605854", "0.56031364"...
0.84397984
0
Gets the documentation_links of this Listing. Links to additional documentation provided by the publisher specifically for the listing.
def documentation_links(self): return self._documentation_links
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def documentation_links(self, documentation_links):\n self._documentation_links = documentation_links", "def get_links(self) -> List[str]:\n return self.__links", "def getLinks(self):\n\n return self.links", "def get_links(self):\r\n return self.__links", "def links(self):\n ...
[ "0.65572166", "0.6341007", "0.630448", "0.6262078", "0.61744523", "0.61744523", "0.61744523", "0.61744523", "0.61744523", "0.61526346", "0.61452794", "0.6133612", "0.61207443", "0.61080486", "0.608221", "0.60754454", "0.5957445", "0.5935076", "0.59187263", "0.59180135", "0.58...
0.7930184
0
Sets the documentation_links of this Listing. Links to additional documentation provided by the publisher specifically for the listing.
def documentation_links(self, documentation_links): self._documentation_links = documentation_links
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def documentation_links(self):\n return self._documentation_links", "def links(self, links):\n\n self._links = links", "def links(self, links):\n\n self._links = links", "def links(self, links):\n\n self._links = links", "def links(self, links):\n\n self._links = links", ...
[ "0.69023544", "0.66297585", "0.66297585", "0.66297585", "0.66297585", "0.66297585", "0.66297585", "0.66297585", "0.66297585", "0.66297585", "0.66297585", "0.66297585", "0.6629672", "0.6383643", "0.6354247", "0.6296145", "0.604916", "0.6047695", "0.58300346", "0.5776611", "0.5...
0.8419598
0
Sets the icon of this Listing.
def icon(self, icon): self._icon = icon
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_icon(self, val):\n self._icon = val", "def icon(self, value: str | None) -> None:\n self._icon = value", "def setIcon(self, icon):\n if icon:\n self._icon = QIcon(icon)\n else:\n self._icon = None", "def setIcon(self,icon,index=0):\n self.rb[in...
[ "0.8383824", "0.7790951", "0.7645983", "0.7563144", "0.7521918", "0.73360395", "0.7282719", "0.726055", "0.7193644", "0.7176555", "0.7172777", "0.6954962", "0.6954962", "0.6927028", "0.69077444", "0.69077444", "0.69077444", "0.69077444", "0.69077444", "0.69077444", "0.6907744...
0.8216263
1
Gets the banner of this Listing.
def banner(self): return self._banner
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_banner(self,context,request):\n ba = queryMultiAdapter((context,request), interfaces.IBanner)\n if not ba:\n return ''\n return ba()", "def banner_url(self) -> typing.Optional[files.URL]:\n return self.make_banner_url()", "def get_banner(conn) -> str:\n ban...
[ "0.71143806", "0.6777335", "0.65265286", "0.6073808", "0.6052043", "0.58798075", "0.5859273", "0.58299464", "0.5820458", "0.5805905", "0.5702834", "0.5584134", "0.55791813", "0.55625266", "0.5438825", "0.53803754", "0.5352796", "0.5327807", "0.52649236", "0.52467376", "0.5245...
0.8368317
0
Sets the banner of this Listing.
def banner(self, banner): self._banner = banner
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def banner(self):\n return self._banner", "def set_last_banner(self, ip, banner_url):\n self.last_banners[ip] = banner_url", "def present_banner():\n writer(BANNER, FORMAT[\"BANNER\"])\n writer(\" \" * 30 + f\"version {VERSION}\")", "def download_banner(self, banner_path):\n serie ...
[ "0.6423644", "0.5612951", "0.5583017", "0.5382535", "0.5339387", "0.5252789", "0.5187555", "0.5170073", "0.5092044", "0.50683033", "0.50154686", "0.50043285", "0.49510226", "0.4919356", "0.49002323", "0.49002323", "0.49002323", "0.48007524", "0.47906277", "0.47864276", "0.474...
0.82278925
0
Gets the regions of this Listing. The regions where the listing is available.
def regions(self): return self._regions
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_regions(self):\n return self._regions", "def regions(self) -> Sequence[str]:\n return pulumi.get(self, \"regions\")", "def regions(self) -> pulumi.Output[Sequence[str]]:\n return pulumi.get(self, \"regions\")", "def regions(self):\n\n class RegionIter(object):\n ...
[ "0.80393547", "0.7805494", "0.7723249", "0.72262144", "0.7184458", "0.7143942", "0.7119229", "0.7099365", "0.706028", "0.70048416", "0.70002544", "0.6929981", "0.68779176", "0.6825818", "0.6808158", "0.6807868", "0.6655617", "0.6641144", "0.66303986", "0.657817", "0.657202", ...
0.7981078
1
Sets the regions of this Listing. The regions where the listing is available.
def regions(self, regions): self._regions = regions
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def list_regions(self, **kwargs):\n resource_path = \"/regions\"\n method = \"GET\"\n\n expected_kwargs = [\"retry_strategy\"]\n extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]\n if extra_kwargs:\n raise ValueError(\n ...
[ "0.6481046", "0.64200956", "0.6331844", "0.62551534", "0.62191546", "0.61702317", "0.60755", "0.58735037", "0.5828514", "0.5823908", "0.58030134", "0.5796802", "0.57923263", "0.57890207", "0.5787557", "0.57725894", "0.5729864", "0.5729864", "0.5729864", "0.5685778", "0.567117...
0.7949664
0
Gets the package_type of this Listing. The listing's package type.
def package_type(self): return self._package_type
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_type (self):\n return self._stype", "def type(self):\n return 'package'", "def get_type(self):\n return self._type", "def get_type(self):\n return self._type", "def type(self):\n\n return self.manifest[\"type\"]", "def get_type(self):\n return self.type",...
[ "0.6629074", "0.66246414", "0.65971076", "0.65971076", "0.6529473", "0.65072304", "0.65072304", "0.6460079", "0.6435091", "0.6430391", "0.6405827", "0.6404363", "0.64036995", "0.63900316", "0.6379892", "0.6343936", "0.63309747", "0.63023746", "0.63023746", "0.63023746", "0.63...
0.78860635
1
Sets the package_type of this Listing. The listing's package type.
def package_type(self, package_type): allowed_values = ["ORCHESTRATION", "IMAGE"] if not value_allowed_none_or_none_sentinel(package_type, allowed_values): package_type = 'UNKNOWN_ENUM_VALUE' self._package_type = package_type
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def package_type(self, package_type):\n\n self._package_type = package_type", "def setType(self, newType):\n self._itemType = newType", "def set_type(self, type):\n self.type = type", "def set_type(self, type):\n self.type = type", "def set_type(self, type):\n self._type ...
[ "0.8191449", "0.6388714", "0.6379617", "0.6379617", "0.6370877", "0.6280505", "0.62801737", "0.62801737", "0.61183625", "0.61183625", "0.61183625", "0.61183625", "0.61183625", "0.61183625", "0.61183625", "0.61183625", "0.61183625", "0.61183625", "0.61183625", "0.61183625", "0...
0.6474645
1
Gets the default_package_version of this Listing. The default package version.
def default_package_version(self): return self._default_package_version
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getDefaultPackageVersion():\n return _libsbml.CompExtension_getDefaultPackageVersion()", "def getDefaultPackageVersion():\n return _libsbml.MultiExtension_getDefaultPackageVersion()", "def getDefaultPackageVersion():\n return _libsbml.FbcExtension_getDefaultPackageVersion()", "def ge...
[ "0.83390003", "0.8327047", "0.826186", "0.8256483", "0.80970424", "0.8055716", "0.76140296", "0.7595864", "0.75897837", "0.7588637", "0.7577043", "0.75349975", "0.75328416", "0.75281364", "0.7481759", "0.7434644", "0.7396291", "0.73511976", "0.73455566", "0.725068", "0.721839...
0.8867176
0
Sets the default_package_version of this Listing. The default package version.
def default_package_version(self, default_package_version): self._default_package_version = default_package_version
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def default_package_version(self):\n return self._default_package_version", "def getDefaultPackageVersion():\n return _libsbml.LayoutExtension_getDefaultPackageVersion()", "def getDefaultPackageVersion():\n return _libsbml.MultiExtension_getDefaultPackageVersion()", "def getDefaultPackag...
[ "0.7756795", "0.72961414", "0.7260456", "0.7226229", "0.7168602", "0.7086842", "0.70237195", "0.689463", "0.6791142", "0.67155576", "0.6561462", "0.6515818", "0.6482345", "0.64594007", "0.63910294", "0.6364691", "0.63292134", "0.6326202", "0.62639976", "0.62392294", "0.620352...
0.8982981
0
Sets the links of this Listing. Links to reference material.
def links(self, links): self._links = links
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def links(self, links):\n\n self._links = links", "def links(self, links):\n\n self._links = links", "def links(self, links):\n\n self._links = links", "def links(self, links):\n\n self._links = links", "def links(self, links):\n\n self._links = links", "def links(self,...
[ "0.76569706", "0.76569706", "0.76569706", "0.76569706", "0.76569706", "0.76569706", "0.76569706", "0.76569706", "0.76569706", "0.76569706", "0.76569706", "0.7470207", "0.73794794", "0.7082816", "0.6771199", "0.65618646", "0.64178824", "0.61817366", "0.6178725", "0.6121204", "...
0.77638394
0
Gets the is_featured of this Listing. Indicates whether the listing is included in Featured Listings.
def is_featured(self): return self._is_featured
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_featured(self, is_featured):\n self._is_featured = is_featured", "def test_get_featured_front_page_only_returns_featured(self):\r\n\r\n featured_app = self.create_app(None)\r\n non_featured_app = self.create_app(None)\r\n non_featured_app.name = 'other_app'\r\n non_featu...
[ "0.72854847", "0.5756443", "0.54711634", "0.537165", "0.5351628", "0.53243643", "0.5320827", "0.52955836", "0.528026", "0.5253999", "0.5253999", "0.5250387", "0.5224164", "0.52167726", "0.5172859", "0.5123695", "0.50961107", "0.50507337", "0.4989964", "0.49887696", "0.4984692...
0.83817303
0
Sets the is_featured of this Listing. Indicates whether the listing is included in Featured Listings.
def is_featured(self, is_featured): self._is_featured = is_featured
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_featured(self):\n return self._is_featured", "def test_toggle_featured(self):\n story = create_story(title=\"Test Story\", summary=\"Test Summary\",\n byline=\"Test Byline\", status='published',\n on_homepage=True)\n story2 = cre...
[ "0.7416678", "0.56418395", "0.5471387", "0.5297682", "0.5234299", "0.50609577", "0.49377993", "0.49298215", "0.4823086", "0.47666132", "0.47003838", "0.4657619", "0.46520665", "0.46120566", "0.45910445", "0.4579018", "0.45746464", "0.45710957", "0.45710957", "0.4534249", "0.4...
0.85117894
0
Reads the text file of affine transformations as it is returned by the Affine_transformations.py code
def read_affine(file): data = open(file, 'r').read() data = data.split('\n') for i in range(1, 5): data[i] = data[i].split(':') int_lon = np.fromstring(data[1][1], dtype='float', sep=',') int_lat = np.fromstring(data[2][1], dtype='float', sep=',') Nlon = len(int_lon) - 1 Nlat = len(i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_transform(filename, dimension=3, precision='float'):\n filename = os.path.expanduser(filename)\n read_transform_fn = _read_transform_dict[precision][dimension]\n itk_tx = read_transform_fn(filename, dimension, precision)\n return tio.ants_transform(itk_tx)", "def _read_txt(file_path):\n tra...
[ "0.6390113", "0.6214353", "0.5905246", "0.58053416", "0.5798058", "0.5783118", "0.5749797", "0.5664429", "0.5572933", "0.5517509", "0.5496632", "0.5440119", "0.54245305", "0.54138404", "0.5407004", "0.53825873", "0.5361961", "0.5361539", "0.5356766", "0.53254974", "0.5318438"...
0.67697954
0
Given two (nested) lists of tensors, return whether they are equal.
def tensor_lists_equal(t1, t2): if isinstance(t1, torch.Tensor) and isinstance(t2, torch.Tensor): ## round in case of floating errors t1 = np.round(t1.data.numpy(), decimals=5) t2 = np.round(t2.data.numpy(), decimals=5) return np.array_equal(t1, t2) assert isinstance(t1, list) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tensors_equal(self, x, y):\n if isinstance(x, PackedSequence):\n return self.tensors_equal(x[0], y[0]) and self.tensors_equal(x[1], y[1])\n\n if isinstance(x, dict):\n return (\n (x.keys() == y.keys()) and\n all(self.tensors_equal(x[k], y[k]) fo...
[ "0.788319", "0.7249695", "0.7223901", "0.6960324", "0.6813348", "0.6810137", "0.67806697", "0.67561144", "0.6703272", "0.66944456", "0.66410375", "0.6631499", "0.65602744", "0.6520822", "0.6506562", "0.6469257", "0.6439419", "0.6430223", "0.6427981", "0.6399093", "0.6396647",...
0.8785997
0
Check whether we can create a folder. We don't verify folder name, so returned_match = None
async def check_one_foldername(provider: providers.BaseProvider, scenario: typing.Tuple[str, str]) -> report.Report: prose, fn = scenario # TODO: Some providers may have a problem with nested folders; check print(f'Checking: {provider.provider_name} for foldername {fn}') f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_create_folder(self, output, *folder_names):\n path = self.video_file\n\n # if none then create diectory on same level as video directory with the folder_name and video name\n if output is None:\n output = os.path.abspath(os.path.join(os.path.dirname(path), os.pardir, *fold...
[ "0.6989845", "0.6891283", "0.683919", "0.6803831", "0.6788181", "0.6731252", "0.67084515", "0.67037123", "0.66955405", "0.6634677", "0.6596907", "0.6596907", "0.6592645", "0.65525657", "0.6545261", "0.6474729", "0.6458068", "0.6358634", "0.6331798", "0.6315", "0.6301309", "...
0.6929287
1
Creates the phi version of the training and test datasets.
def _create_phi_data(training_data, test_data): _METRICS = ['vmsram', 'tasks', 't_rscthnetno', 't_rscthhfsrb', 'c_ucpupct'] phi_training_data = {} phi_test_data = {} # Iterate and compute arccos of each time series in training and test data for key in training_data.keys(): if key in _METRIC...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def prepare_data(self):\n # Set up the path\n self.path_target_train = os.path.join(self.data_dir, self.train_path_file_target + \".pkl\")\n self.path_target_test = os.path.join(self.data_dir, self.test_path_file_target + \".pkl\")\n\n if not os.path.exists(self.path_target_train) or no...
[ "0.62479264", "0.616918", "0.6110755", "0.6029446", "0.5991397", "0.5972835", "0.59226716", "0.58383435", "0.58339", "0.5822229", "0.57949585", "0.57768095", "0.575245", "0.57448965", "0.57334214", "0.5731233", "0.5727741", "0.5724", "0.5704525", "0.57044905", "0.5703933", ...
0.71205443
0
Interpolate NAN elements in matrix.
def _interpolation(matrix): try: ok = ~np.isnan(matrix) xp = ok.ravel().nonzero()[0] fp = matrix[~np.isnan(matrix)] x = np.isnan(matrix).ravel().nonzero()[0] matrix[np.isnan(matrix)] = np.interp(x, xp, fp) return matrix except: return matrix
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def interpolate_nans(self):\n\n signal = self.signal\n\n # check for more than one nan in row\n for i in range(len(signal)-1) :\n if np.isnan(signal[i]) and np.isnan(signal[i+1]) :\n raise Exception('There are two nans in a row ask moritz what to do !')\n\n if ...
[ "0.7854625", "0.77361774", "0.7462804", "0.703943", "0.6974706", "0.6939863", "0.6854845", "0.6793678", "0.6705853", "0.6682552", "0.65645033", "0.6499139", "0.64525956", "0.6435207", "0.6404386", "0.62853634", "0.6258439", "0.60894126", "0.60201454", "0.59831077", "0.5959317...
0.7968063
0
Create a collection of images for each time series across all metrics
def _create_image(list_of_dicts, largest_dim): timer = datetime.now() # All possible metrics _METRICS = ['vmsram', 'tasks', 't_rscthnetno', 't_rscthhfsrb', 'c_ucpupct'] # Initialize the collection of all images concatenated across all metrics images = np.zeros(shape=(len(list_of_dicts), len(_METRIC...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def genImages(self, gen_ts):\n t1 = time.time()\n ngen = 0\n\n # determine how much logging is desired\n log_success = to_bool(search_up(self.image_dict, 'log_success', True))\n\n # Loop over each time span class (day, week, month, etc.):\n for timespan in self.image_dict....
[ "0.6314589", "0.6075045", "0.5856271", "0.57666314", "0.5765845", "0.5717563", "0.57157075", "0.5714897", "0.57141167", "0.5712262", "0.5707124", "0.57003945", "0.5693764", "0.56889784", "0.56745064", "0.56572545", "0.5643271", "0.5632118", "0.5629158", "0.56117296", "0.56059...
0.724603
0
Extract all line start/length pairs from the hunk header T.i. for "@@ 685,8 +686,14 @@ ..." extract `[(685, 8), (686, 14)]`. We do not extract the `+` signs. All leading segments have a `` sign, and the last segment has a `+`.
def safely_parse_metadata(self): # type: () -> List[Tuple[LineNo, int]] return [ (int(start), int(length or "1")) for start, length in SAFE_PARSE_HUNK_HEADER.findall( self.text.lstrip("@").split("@", 1)[0] ) ]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parse_hunks(diff: str) -> list[Hunk]:\n diff_pattern = (\n r\"diff --git a/.* b/(.*)\\n\" # capture file name\n r\"(?:\\w+ file mode \\d+\\n)?\" # maybe 'new file mode 100644' or similar\n r\"index .*\\n\"\n r\"--- .*\\n\"\n r\"\\+\\+\\+ .*\\n\"\n )\n\n # capture line number and l...
[ "0.6223655", "0.5699987", "0.56324047", "0.5606089", "0.5450486", "0.54438394", "0.5421206", "0.54067975", "0.53794557", "0.5329467", "0.5280043", "0.5274307", "0.522464", "0.5224071", "0.5206199", "0.51972467", "0.5157682", "0.5144656", "0.5139263", "0.5135846", "0.5124622",...
0.6282997
0
Wraps together all actions needed to beautify a string, i.e. parse the string and then stringify the phrases (replace tags with formatting codes).
def beautify(self, string): if not string: return string # string may differ because of escaped characters string, phrases = self.parse(string) if not phrases: return string if not self.positional and not self.always: raise errors.ArgumentError("Found phrases, but no styles " "were su...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def beautify(string, *args, **kwargs):\n\n\tparser = Parser(args, kwargs)\n\treturn parser.beautify(string)", "def as_action_str(string: str) -> str:", "def stringify(self, string, phrases, parent=None):\n\n\t\tlast_tag = 0\n\n\t\tbeauty = \"\"\n\n\t\tfor phrase in phrases:\n\n\t\t\tbeauty += string[last_tag :...
[ "0.7252995", "0.61125165", "0.60799843", "0.5577729", "0.55171436", "0.54867864", "0.5460423", "0.5454511", "0.5451486", "0.5403064", "0.53998154", "0.5373028", "0.5360175", "0.53533274", "0.5329324", "0.53215384", "0.5302686", "0.52969646", "0.525726", "0.5251888", "0.521534...
0.69769526
1
Parses a string to handle escaped tags and retrieve phrases. This method works recursively to parse nested tags. When escaped tags are found, those are removed from the string. Also argument sequences are removed from the string. The string returned can thus be quite different from the string passed.
def parse(self, string, root=None): phrases = [] meta = self.meta.search(string) while meta: # Save some function calls pos = meta.start() if meta.group() == "<": string, child, meta = self.open_phrase(string, pos) if child and root: root.nested.append(child) elif child: phras...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parse_tags(s: str) -> List[str]:\n tags = []\n buf = []\n in_quoted = None\n\n for c in s:\n if in_quoted:\n if c == in_quoted:\n in_quoted = None\n else:\n buf.append(c)\n elif c == '\"' or c == '\\'':\n in_quoted = c\n ...
[ "0.60158527", "0.5769747", "0.5667436", "0.5622337", "0.5511267", "0.5468278", "0.53972864", "0.53505325", "0.53342503", "0.5252123", "0.5247568", "0.52472585", "0.5242414", "0.5227254", "0.5216621", "0.51727295", "0.5151064", "0.50991243", "0.50976443", "0.507275", "0.506487...
0.69416046
0
Checks if a meta character is escaped or else warns about it. If the meta character has an escape character ('\') preceding it, the meta character is escaped. If it does not, a warning is emitted that the user should escape it.
def escape_meta(self, string, pos): # Replace escape character if pos > 0 and string[pos - 1] == "\\": string = string[:pos - 1] + string[pos:] else: warnings.warn("Un-escaped meta-character: '{0}' (Escape" " it with a '\\')".format(string[pos]), Warning) pos += 1 meta = self.meta.sea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_escape(self):\n bad_str = '''`~!@#$%^&*()_+-={}[]|\\\\;:'\",./<>?\\n\\r\\t '''\n self.run_escape_case(bad_str)", "def test_bogus_escape_not_raised(self):\r\n problem = self.build_problem(answer=u\"\\\\\", case_sensitive=False, regexp=True)\r\n\r\n self.assert_grade(problem, u...
[ "0.6439335", "0.6249847", "0.5932821", "0.5907765", "0.5904062", "0.58322513", "0.5758821", "0.5672039", "0.56712896", "0.5663409", "0.56487757", "0.56399053", "0.5608284", "0.5608284", "0.55967253", "0.55713606", "0.55477995", "0.55150324", "0.54088163", "0.54066384", "0.537...
0.68352515
0
Handles phrasearguments. Sets the override and increment flags if found. Also makes sure that the argument sequence is at the start of the phrase and else warns about the unescaped meta characters. If the arguments are indeed at the start but do not match the arguments regular expression, an error is raised.
def handle_arguments(self, string, root, opening, closing): # The actual argument string (ignore whitespace) args = string[opening + 1 : closing].replace(" ", "") # The argument sequence must be at the start of the phrase # and must match the allowed argument regular expression if opening > 0 or not self.ar...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _pre_argument_parsing(self):\n pass", "def process_verb_arguments(self, verb, verb_args, verb_opts):\n # Add fixed arguments passed in through the decorator to the verb object.\n args = copy.copy(verb_args) + verb.command_arguments\n # Set attributes for required arguments.\n ...
[ "0.59499556", "0.56571984", "0.55967647", "0.54486513", "0.5432549", "0.5422066", "0.53706396", "0.5264565", "0.51700866", "0.51585585", "0.5135055", "0.51217204", "0.5113001", "0.5107572", "0.50817484", "0.50805616", "0.50753933", "0.5071565", "0.5038211", "0.50260377", "0.5...
0.68998414
0
Stringifies phrases. After parsing of the string via self.parse(), this method takes the escaped string and the list of phrases returned by self.parse() and replaces the original phrases (with tags) with the Phraseobjects in the list and adds the appropriate flagcombinations as determined by the string or the position ...
def stringify(self, string, phrases, parent=None): last_tag = 0 beauty = "" for phrase in phrases: beauty += string[last_tag : phrase.opening] if phrase.string in self.always and not phrase.override: phrase.style = self.always[phrase.string] if phrase.arguments: combination = 0 for i in...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def beautify(self, string):\n\n\t\tif not string:\n\t\t\treturn string\n\n\t\t# string may differ because of escaped characters\n\t\tstring, phrases = self.parse(string)\n\n\t\tif not phrases:\n\t\t\treturn string\n\n\t\tif not self.positional and not self.always:\n\t\t\traise errors.ArgumentError(\"Found phrases,...
[ "0.6217344", "0.5188642", "0.5167498", "0.5113326", "0.5067161", "0.49915335", "0.49479842", "0.4930011", "0.48945203", "0.4888225", "0.48151892", "0.47859526", "0.4769635", "0.47651082", "0.47107962", "0.46882594", "0.4659527", "0.46528217", "0.4637156", "0.463006", "0.45907...
0.6856967
0
Raises an errors.ArgumentError if not enough arguments were supplied. Takes care of formatting for detailed error messages.
def raise_not_enough_arguments(self, string): requested = errors.number(self.counter + 1) number = len(self.positional) verb = "was" if number == 1 else "were" what = "Requested {} formatting argument for "\ "'{}' but only {} {} supplied!" what = what.format(requested, string, number, verb) rais...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def validate_args(args) -> None:\n if args.input_file is not None:\n assert args.num_entries_per_input_and_label is not None, \"If 'input_file' is set, 'num_entries_per_input_and_label' must be set\"\n assert args.num_entries_per_label is None, \"If 'input_file' is set, 'num_entries_per_label' mus...
[ "0.68111414", "0.66778743", "0.65783757", "0.6564304", "0.6534988", "0.65230286", "0.6501002", "0.6431251", "0.6368672", "0.6361214", "0.6355897", "0.63518065", "0.6280557", "0.627626", "0.6258548", "0.6256336", "0.62545747", "0.6239572", "0.62368023", "0.6219729", "0.6205022...
0.71657497
0
Save the GraphicsContext to a file. Output files are always saved in RGB or RGBA format; if this GC is not in one of these formats, it is automatically converted. If filename includes an extension, the image format is inferred from it. file_format is only required if the format can't be inferred from the filename (e.g....
def save(gc, filename, file_format=None, pil_options=None): FmtsWithoutAlpha = ("jpg", "bmp", "eps", "jpeg") from PIL import Image as PilImage size = (gc.width(), gc.height()) fmt = gc.format() # determine the output pixel format and PIL format if fmt.endswith("32"): pilformat = "RGBA"...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def saveFormatFile(self, filename, format):\n ret = libxml2mod.xmlSaveFormatFile(filename, self._o, format)\n return ret", "def save_figure(\n self,\n filename,\n format=\"png\",\n dpi=None,\n face_colour=\"w\",\n edge_colour=\"w\",\n orientation=\"p...
[ "0.6349469", "0.6296424", "0.62946284", "0.6211686", "0.6203548", "0.6184435", "0.61366194", "0.6020945", "0.59857905", "0.58402926", "0.583672", "0.57930124", "0.57857025", "0.5732518", "0.57183915", "0.57100964", "0.57058245", "0.56932086", "0.56529623", "0.5650282", "0.562...
0.7718939
0
Returns a pandas DataFrame with (Open, High, Low, Close, Volume) columns for the specific symbol and specific time_interval. Returns None if an exception occurs.
def get_stock(symbol, interval): try: time_interval = TIME_INTERVALS[interval] if(time_interval == TIME_INTERVALS['Intraday']): json_data = requests.request('GET', 'https://www.alphavantage.co'+ '/query?function=TIME_SERIES_INTRADAY&symbol='...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_stock_data_frame(time, stock):\n\n print(\"Getting\", time, \"stock data for\", stock)\n url = 'https://api.iextrading.com/1.0/stock/'+stock+'/chart/'+time\n req = requests.get(url)\n print(url)\n\n print(\"Parsing data.\")\n rjson = req.text\n\n rdata = json.loads(rjson)\n\n dates ...
[ "0.680046", "0.64363235", "0.64280266", "0.63833207", "0.62522256", "0.6238682", "0.6104469", "0.61005485", "0.5904347", "0.5890219", "0.58884716", "0.5882514", "0.5852515", "0.5850313", "0.58449453", "0.58279145", "0.5820402", "0.58095807", "0.58015716", "0.580064", "0.58005...
0.768913
0
Register a new User 1. Flag the user as inactive 2. Create the link for the password creation 3. Send the email
def register_new_user(user): user.is_active = False user.set_unusable_password() user.save() url = generate_url_reset(user) #TODO: mettere un body decente per l'email send_email(user.email, url, 'aMUX Registration Confirm')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def form_valid(self, form):\n # Switching between temporary registration and main registration is easy with the is_active attribute.\n # The withdrawal process will also improve if you only set is_active to False.\n user = form.save(commit=False)\n user.is_active = False\n user.s...
[ "0.7495984", "0.7278033", "0.72545713", "0.7148108", "0.7121109", "0.71074307", "0.7102032", "0.6869794", "0.68437666", "0.68377155", "0.6825812", "0.68167186", "0.6780573", "0.67794126", "0.67672414", "0.66898435", "0.6678319", "0.6676729", "0.6669521", "0.66605", "0.6625422...
0.8152107
0
Apply and ESN defined by esncell (as in created from `sparse_esncell`) to each input in xs with the initial state h0. Each new input uses the updated state from the previous step.
def generate_states(esncell, xs, h0): (map_ih, (Whh, shape), bh) = esncell def _step(h, x): #h = jnp.tanh(sp_dot(Whh, h, shape[0]) + map_ih(x) + bh) h = jnp.tanh(sp_dot(Whh, h, shape[0]) + map_ih(x)) return (h, h) (h, hs) = lax.scan(_step, h0, xs) return (h, hs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def train(esncell, states, labels):\n Who = lstsq_stable(states, labels)\n return esncell + (Who,)", "def feedESN(features, neurons, mask, mask_bias, scale, mem, func, f_arg):\n \n ESN = np.hstack((np.matmul(features, mask), np.ones((np.shape(features)[0],1), dtype=np.double)))\n ...
[ "0.54891646", "0.53112125", "0.5259833", "0.5257837", "0.51097727", "0.51014096", "0.5074188", "0.49335226", "0.49120232", "0.4882265", "0.48616293", "0.48532745", "0.4843997", "0.4836578", "0.48361284", "0.4808079", "0.48075026", "0.47982457", "0.47965336", "0.47853282", "0....
0.6747349
0
Given a trained model = (Wih,Whh,bh,Who), a start internal state h0, and input y0 predict in freerunning mode for Npred steps into the future, with
def predict(model, y0, h0, Npred): if y0.ndim == 1: aug_len = y0.shape[0] + 1 elif y0.ndim == 2: aug_len = y0.shape[0] * y0.shape[1] + 1 else: raise ValueError("'y0' must either be a vector or a matrix.") (map_ih,(Whh,shape),bh,Who) = model def _step(input, xs): (y,h...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def train(self, hyps):\n\n # Print Hyperparameters To Screen\n items = list(hyps.items())\n for k, v in sorted(items):\n print(k+\":\", v)\n\n # Make Save Files\n if \"save_folder\" in hyps:\n save_folder = hyps['save_folder']\n else:\n sav...
[ "0.6569588", "0.6339002", "0.6296439", "0.62247455", "0.62247455", "0.62224156", "0.617453", "0.61637294", "0.61443996", "0.6075079", "0.6071582", "0.60711384", "0.60624826", "0.6026027", "0.60046995", "0.599758", "0.5973139", "0.5960339", "0.59414625", "0.5919527", "0.591616...
0.66313094
0
Given a trained ESN and a number input images 'imgs', predicts 'Npred' frames after the last frame of 'imgs'. The input images are used to create the inital state 'h0' for the prediction (warmup).
def warmup_predict(model, imgs, Npred): H = augmented_state_matrix(model[:-1], imgs, 0) h0 = H[-2] y0 = imgs[-1] return predict(model, y0, h0, Npred)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def predict(self, images, batch_size):\n pass", "def predict(self, images):\n\t\t#testing_dataset = tf.data.Dataset.from_tensor_slices(images)\n\t\ttf.keras.backend.set_learning_phase(0)\n\t\ttesting_dataset = tf.data.Dataset.from_tensor_slices(np.asarray(images)).map(lambda x: tf.image.resize(x, [self.image_...
[ "0.641343", "0.63212353", "0.6258062", "0.61219174", "0.60748583", "0.6041475", "0.60248953", "0.59354454", "0.5916165", "0.58947873", "0.58889335", "0.5845712", "0.583477", "0.58249575", "0.58211285", "0.5807858", "0.57785034", "0.5753667", "0.5744161", "0.5721407", "0.57166...
0.74643695
0
Clusters the data of X into k clusters using T iterations of Lloyd's algorithm.
def lloyds_algorithm(X, k, T): n, d = X.shape # Initialize clusters random. clustering = np.random.randint(0, k, (n,)) centroids = np.zeros((k, d)) # Used to stop if cost isn't improving (decreasing) cost = 0 oldcost = 0 # Column names # print("Iterations\tCost") for i in rang...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kmeans(X, k, iterations=1000):\n\n # Initialize the cluster centroids (C <- centroid \"means\")\n C = initialize(X, k)\n\n if C is None:\n return None, None\n if not isinstance(iterations, int) or iterations <= 0:\n return None, None\n\n # n: number of dada points\n # d: dimensi...
[ "0.67442775", "0.6576771", "0.6541134", "0.64928246", "0.64676577", "0.6435194", "0.6364645", "0.6314384", "0.6309969", "0.625905", "0.6255361", "0.6239175", "0.62359464", "0.6196312", "0.6167873", "0.61381966", "0.6135124", "0.6130115", "0.61040205", "0.6082534", "0.607699",...
0.77015615
0
Dequeue at most ``max_length`` bytes. If ``max_length`` is not specified, dequeue the maximum possible contiguous amount of bytes (at least one). Regardless of what was written into the FIFO, ``read`` always returns a ``memoryview`` object.
def read(self, max_length=None): if max_length is None and self._chunk is None: # Fast path. return self._queue.popleft() if max_length == 0: return memoryview(b"") if self._chunk is None: self._chunk = self._queue.popleft() self._off...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def peek(self, size, timeout=_UNSET):\n with self._recv_lock:\n if len(self.rbuf) >= size:\n return self.rbuf[:size]\n data = self.recv_size(size, timeout=timeout)\n self.rbuf = data + self.rbuf\n return data", "def dequeue(self, size=None, returns=No...
[ "0.61215013", "0.59867436", "0.5926825", "0.56842846", "0.56382906", "0.56014174", "0.55567545", "0.55366075", "0.55232185", "0.5293869", "0.5284016", "0.5228891", "0.5205536", "0.5144939", "0.5099088", "0.50602716", "0.504818", "0.5042906", "0.50306386", "0.5030135", "0.4992...
0.72821385
0
Identifies all squares of a disk region from a given start coordinate and sets them to zeroes
def removeRegion(disk, startCoord): coordinates = [startCoord] while coordinates: coord = coordinates.pop() coordinates.extend(getNeighbors(disk, coord)) disk[coord[0], coord[1]] = 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setZeroes(self, matrix: List[List[int]]) -> None:\n colsToZero = set()\n rowsToZero = set()\n for rowIdx, row in enumerate(matrix):\n for colIdx, num in enumerate(row): \n if num == 0: \n colsToZero.add(colIdx)\n rowsToZero.ad...
[ "0.54954433", "0.5491927", "0.5477426", "0.5468548", "0.54557747", "0.5449332", "0.5430204", "0.53731966", "0.53578746", "0.5356577", "0.53494614", "0.53400874", "0.5335713", "0.5330552", "0.5324981", "0.53230536", "0.5312219", "0.5310138", "0.5302936", "0.52781385", "0.52734...
0.7064379
0
Parse a block of code into a parse tree. Then assert the equality of that parse tree to a list of expected tokens.
def assert_parse_tree (code, expected): tranql = TranQL () tranql.resolve_names = False actual = tranql.parser.parse (code).parse_tree #print (f"{actual}") assert_lists_equal ( actual, expected)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __ParseBlock(self, ast):\n for node in ast:\n node_name = node[0]\n node_value = node[1]\n if node_name == 'statement':\n self.__ParseStatement(node_value)\n else:\n logging.info('Unknown AST node in message block: %s' % (node_name))", "def test_fenced_code_blocks_extra_0...
[ "0.6165394", "0.6077054", "0.6012596", "0.5991369", "0.59820217", "0.59499276", "0.5923587", "0.5916354", "0.5867398", "0.58330196", "0.5742467", "0.5714201", "0.5713135", "0.5707342", "0.5696634", "0.56416905", "0.56378657", "0.55859804", "0.5572285", "0.5545311", "0.5509158...
0.6880997
0
Declare attribute for bank account number.
def bank_account_number(cls): # pylint:disable=no-self-argument, # noqa: N805 return db.Column('bank_account_number', StringEncryptedType(String, cls._get_enc_secret, AesEngine, 'pkcs5'), nullable=True, index=True)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, owner, initial_balance=0.0):\n Account.count += 1\n self.owner = owner\n self.account_number = '%sXY-%s-%08d' % (Account.division,\n Account.branch, Account.count)\n self.balance = initial_balance", "def create_account_...
[ "0.6284065", "0.6187421", "0.6022238", "0.5976614", "0.59271795", "0.59124166", "0.58611524", "0.57728064", "0.56861794", "0.56256825", "0.55930215", "0.5584585", "0.5569789", "0.55608404", "0.55424184", "0.55222857", "0.55130976", "0.5481672", "0.5476077", "0.5448975", "0.54...
0.6315163
0
Return account secret key for encryption.
def _get_enc_secret(): return current_app.config.get('ACCOUNT_SECRET_KEY')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def secret_key(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"secret_key\")", "def get_key():\n try:\n return settings.get('backend')['secret_key']\n except AttributeError:\n raise AuthTokenGenerationException()", "def secret_key(self):\n return self....
[ "0.7814786", "0.76241505", "0.75565207", "0.7548872", "0.7499285", "0.7499285", "0.7285755", "0.7270444", "0.7231887", "0.7223162", "0.7222836", "0.72057945", "0.71798694", "0.71600825", "0.71600825", "0.7023351", "0.6951352", "0.6951352", "0.69146353", "0.69061774", "0.68470...
0.7893033
0
Find all pending accounts to be created in CFS.
def find_all_pending_accounts(cls): return cls.query.filter_by(status=CfsAccountStatus.PENDING.value).all()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pending_transactions(self):\n return self._call_account_method(\n 'pendingTransactions'\n )", "def get_pending_friendships(self):\n url = 'friendships/pending/'\n return self.send_request(url)", "def get_pending_registration_requests(self,user,site):\n\n return...
[ "0.60277927", "0.59768397", "0.59724915", "0.59519696", "0.59498996", "0.59382385", "0.59188753", "0.58744895", "0.5854713", "0.58441377", "0.5843147", "0.5704515", "0.5589288", "0.5575046", "0.5569818", "0.55688405", "0.55530936", "0.55303377", "0.5524717", "0.55170417", "0....
0.79221874
0
Create a MayaScene object.
def __init__(self, *args, **kwargs): super(MayaScene, self).__init__(*args, **kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_scene(self):\n \n self.scene=soya.World()", "def create_scene(self, ):\n self.scene = create_scene(\n self.opt.splats_img_size, self.opt.splats_img_size, self.opt.fovy,\n self.opt.focal_length, self.opt.n_splats)", "def new_scene(force=True, **kwargs):\n\n p...
[ "0.73323196", "0.67833483", "0.6756612", "0.672581", "0.6613683", "0.6521628", "0.6344319", "0.63363475", "0.6316412", "0.63114274", "0.63114274", "0.62943345", "0.6286045", "0.62190175", "0.62152356", "0.61051285", "0.61049014", "0.61027217", "0.6061932", "0.60470086", "0.59...
0.68939376
1
Test if the path holder contains a Maya scene.
def test(cls, pathHolder, parentCrawler): if not super(Scene, cls).test(pathHolder, parentCrawler): return False return pathHolder.ext() in cls.extensions()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _check_scene_open(self):\n return self._engine.current_file_path() is not None", "def checkScene ( doc_id ):\n if cmds.objExists ( \"root\" ) :\n \n self.labelStatus.setText ( \"You shouldn't have any named 'root' node in your scene\" )\n return False \n \n return True"...
[ "0.6938421", "0.66223943", "0.605499", "0.5837007", "0.5764086", "0.5731431", "0.5718635", "0.57006675", "0.5642447", "0.5609292", "0.55125946", "0.55025", "0.54665756", "0.54665756", "0.5446389", "0.53687525", "0.53429943", "0.5323305", "0.53167343", "0.52955806", "0.5281899...
0.6686738
1
Initializing a ball object
def __init__(self, x = 140, y = 140): super(Ball, self).__init__(image = Ball.image, x = 600, y = 240, dx = -3, dy = 1)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, *args, **kwargs):\n super(Ball, self).__init__(*args, **kwargs)\n self.speed = kwargs.get('speed', 5)\n self.ball_image = pyglet.image.load(os.path.join(config.ASSETS_DIR, 'ball.png'))\n self.width = self.ball_image.width\n self.height = self.ball_image.height\...
[ "0.7679933", "0.7565953", "0.747588", "0.72836137", "0.7182046", "0.705327", "0.70508504", "0.69490194", "0.69460386", "0.69447124", "0.68870175", "0.683677", "0.6823838", "0.6812778", "0.6801902", "0.67790073", "0.6765068", "0.6759668", "0.674916", "0.6742566", "0.67322433",...
0.77236575
0
Creates a frame worker with the given arguments and then runs it. The queues are assumed to be ZeroMQ queues which are serialized. The error file is not passed to the FrameWorker, but is instead where errors are stored if one occurs.
def frame_worker_target(img_queue, rec_queue, send_queue, frame_gen, ms_per_frame, error_file): img_queue = ZeroMQQueue.deser(img_queue) rec_queue = ZeroMQQueue.deser(rec_queue) send_queue = ZeroMQQueue.deser(send_queue) try: FrameWorker(img_queue, rec_queue, send...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _worker(self, args):\n pass", "def main_loop():\n\n editor = 'FrameEditorEmpty'\n merge = 'FrameMergerFirst'\n editorparams = ''\n mergerparams = ''\n framesrcparams = 'localhost:5005'\n framedstparams = 'localhost:5005'\n framesource = 'CameraFrameGenerator'\n framesdestinatio...
[ "0.53672075", "0.52763987", "0.525807", "0.52311337", "0.5166696", "0.5102056", "0.5101873", "0.5017907", "0.49991044", "0.49972054", "0.4982134", "0.49532136", "0.49340105", "0.49315396", "0.4894124", "0.48782435", "0.4870958", "0.4849824", "0.4847422", "0.4843554", "0.48374...
0.70788133
0
Checks the queue that the worker uses to talk to us
def check_ack_queue(self): try: while True: ack = self.ack_queue.get_nowait() self.handle_ack(ack) except queue.Empty: pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _check_queue(self):\n self._process_incoming_queue_messages()\n self._root.after(200, self._check_queue)", "def testQueueMsg(self):\n self.mgr.isGoproBusy = True\n self.mgr.lastRequestSent = monotonic.monotonic()\n self.mgr.queueMsg(4)\n self.assertFalse( self.mgr.ms...
[ "0.7696136", "0.7004301", "0.6914097", "0.68644655", "0.682932", "0.6723008", "0.66928446", "0.6659868", "0.6654834", "0.65975434", "0.65645915", "0.6548608", "0.64988154", "0.649025", "0.6477076", "0.6465446", "0.64649564", "0.63961077", "0.6396043", "0.6396043", "0.6395173"...
0.7153081
1
Checks if the syncing process is complete
def check_sync(self): if not self.awaiting_sync: return True self.check_ack_queue() return not self.awaiting_sync
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _is_done(self):\n pass", "def is_done():\n return False", "def has_finished():", "def is_finished(self):\n self.refresh()\n return self.progress.remaining_budget is not None and self.progress.remaining_budget <= 0", "def done(self):\n return False", "def check_finish(self):...
[ "0.7570702", "0.7508425", "0.745692", "0.7256559", "0.72279084", "0.7211759", "0.71528757", "0.7147975", "0.7147975", "0.7147975", "0.7139429", "0.71376795", "0.71324706", "0.7129093", "0.71033275", "0.7101565", "0.71015084", "0.7029679", "0.702156", "0.7021484", "0.7021319",...
0.75308084
1
Waits for finish process to complete
def wait_finish(self): self.proc.join()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def wait_until_done(self) -> None:\n ...", "def waitUntilFinished():", "def waitUntilFinished():", "def waitUntilFinished():", "def waitUntilFinished():", "def wait_complete(self):\n self.join()", "def finish(self):\r\n self.start_finish()\r\n self.wait_finish()", "d...
[ "0.7736579", "0.76388836", "0.76388836", "0.76388836", "0.76388836", "0.7635715", "0.73941064", "0.7175193", "0.7058205", "0.6982526", "0.69299793", "0.6926044", "0.69219345", "0.69219345", "0.69219345", "0.69219345", "0.69219345", "0.69219345", "0.69219345", "0.69219345", "0...
0.82706493
0
Notifies this worker that it should render the specified frame number
def send(self, frame_num): self.send_queue.put(('img', frame_num)) self.in_queue += 1 self.num_since_sync += 1 self.last_frame = frame_num
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def on_pre_render(self, event, signal):\n t = ppb.get_time() - self.start_time\n self.frames += 1\n print(f\"Frame {self.frames} rendered at {t}\")", "def frame_number(self, frame_number):\n\n self._frame_number = frame_number", "def render_frame(self, scene_state, scene_view, frame...
[ "0.6239475", "0.6121523", "0.57494473", "0.5613775", "0.55964965", "0.5589799", "0.5520976", "0.54862803", "0.54144496", "0.5320689", "0.53091556", "0.5305608", "0.52953815", "0.5295191", "0.5221626", "0.52124155", "0.5184965", "0.5183667", "0.51628983", "0.5145614", "0.51185...
0.6431125
0
If this worker has fewer than target_in_queue items in its queue, then we send the specified frame numebr to the worker and return true. Otherwise, we return false.
def offer(self, frame_num, target_in_queue) -> bool: if self.in_queue < target_in_queue: self.send(frame_num) return True return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def any(self) -> bool:\n return len(self.queue) > 0", "def isFull(self):\r\n if (len(self.queue) == self.maxlen):\r\n return True\r\n else:\r\n return False", "def isFull(self):\n return len(self.queue) == self.size", "def queue_progress(self):\r\n ret = T...
[ "0.6630116", "0.6628836", "0.65659404", "0.654566", "0.62802523", "0.62745416", "0.6247163", "0.6159139", "0.6119754", "0.6000629", "0.59391946", "0.59151196", "0.5913453", "0.5898343", "0.5897065", "0.5881539", "0.58422446", "0.5802772", "0.5802048", "0.5798299", "0.5796814"...
0.8310253
0
Produces a video with the given frame rate (specified as milliseconds per frame), using the given performance settings. If the performance settings are not provided, reasonable defaults are used. Returns the final performance settings, which may have changed over the course of video production. It may improve performan...
def produce(frame_gen: fg.FrameGenerator, fps: float, dpi: typing.Union[int, float], bitrate: typing.Union[int, float], outfile: str, settings: PerformanceSettings = None, time_per_print: float = 15.0, logger: logging.Logger = None) -> PerformanceSettings: try:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_video_params(video_filename):\n \n width, height = get_video_aspect(video_filename)\n frame_rate = get_video_frame_rate(video_filename)\n return width, height, frame_rate", "def get_output_file(self, path, fps=30):\n return cv2.VideoWriter(\n filename=path,\n four...
[ "0.55007595", "0.5436354", "0.5310099", "0.5290828", "0.52758837", "0.5230646", "0.5117052", "0.50882167", "0.5083284", "0.5064976", "0.5064026", "0.5059811", "0.5054783", "0.5002133", "0.5001402", "0.49894008", "0.49701047", "0.49539283", "0.49424905", "0.49278048", "0.49261...
0.55143076
0
Plan to a desired endeffector offset with movehandstraight constraint. movement less than distance will return failure. The motion will not move further than max_distance. robot direction unit vector in the direction of motion distance minimum distance in meters max_distance maximum distance in meters timelimit timeout...
def PlanToEndEffectorOffset(self, robot, direction, distance, max_distance=None, nullspace=JointLimitAvoidance, timelimit=5.0, step_size=0.001, position_tolerance=0.01, angular_tolerance=0.15, **kw_args): if distance < 0: raise ValueErr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def drive(self, distance, tolerance=0.0, tolerance_step=0.5,\n max_attempts=10, avoid_targets=True, avoid_home=False,\n use_waypoints=True):\n self.cur_loc = self.swarmie.get_odom_location()\n start = self.cur_loc.get_pose()\n\n goal = Point()\n goal.x = start....
[ "0.6225101", "0.62008816", "0.5934905", "0.58985746", "0.58381546", "0.5752612", "0.5699719", "0.5670949", "0.5637514", "0.563369", "0.56063104", "0.5580816", "0.5555075", "0.55549693", "0.5549148", "0.55440676", "0.55309373", "0.552184", "0.54901534", "0.54544854", "0.544704...
0.7091726
0
Get path to previous nightly release results
def getPreviousNightlyPath( numDaysInPast=1 ): myPath= os.environ.get("NICOS_PROJECT_RELNAME_COPY","") #replace rel_x with rel_(x-1) for i in range(0,7): if ("rel_%d" % i) in myPath: myPath = myPath.replace( ("rel_%d" % i), ("rel_%d" % ( (i-numDaysInPast)%7 )) ) break refFi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getPreviousBuild():", "def get_previous_release_info(\n previous_release_version: str | None, past_releases: list[ReleaseInfo], current_release_version: str\n) -> str | None:\n previous_release = None\n if previous_release_version == current_release_version:\n # Re-running for current release...
[ "0.71381366", "0.6181723", "0.58809304", "0.5795301", "0.57847506", "0.56769204", "0.56496173", "0.5642278", "0.56289923", "0.5611356", "0.56105006", "0.5594992", "0.55496407", "0.5513853", "0.54595", "0.54346895", "0.54233766", "0.53764766", "0.5362507", "0.53522503", "0.531...
0.68767756
1
When the set is used as a map this returns the value of for a certain key. The method call is passed down to tree object.
def __getitem__(self, key): result = self.tree[key] if result is not None: """This needs to be deep-copied in order not to change the elements in the map via the reference, but return the value as in SetlX. The index 2 from key implies stands for the value as key-valu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __getitem__(self, key):\n return self.keyvaluepair_set.get(key=key).value", "def __getitem__(self, key: ir.Value) -> ir.Value:\n return ops.MapGet(self, key).to_expr()", "def __getitem__(self, key):\n return self._root.__getitem__(key)", "def lookup(self, key):\n return self.r...
[ "0.67747283", "0.66698855", "0.66177166", "0.65392965", "0.6538317", "0.64918303", "0.64918303", "0.6488301", "0.6405794", "0.639881", "0.6393981", "0.6365527", "0.6331228", "0.6322852", "0.6315035", "0.63031965", "0.6259266", "0.6252264", "0.62365365", "0.6217465", "0.620378...
0.7318522
0
Computes the cartesian product with itself if other is equal to 2.
def __pow__(self, other): if other == 2: # cartesian product new_set = Set() for s1 in self: for s2 in self: new_set += Set(List([[s1, s2]])) return new_set raise TypeError( f"{other} must be 2 to compute car...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def same_side_product(p, q, a, b):\n return line_ccw(a, b, p) * line_ccw(a, b, q)", "def cartesian_product(self, other, only_accessible_components=True):\n def function(*transitions):\n if equal(t.word_in for t in transitions):\n return (transitions[0].word_in,\n ...
[ "0.67812854", "0.65287524", "0.65172505", "0.64342856", "0.63827103", "0.62974447", "0.6271194", "0.6246401", "0.6210645", "0.6202078", "0.6144252", "0.6134404", "0.6120954", "0.6094628", "0.60883814", "0.6088177", "0.6081006", "0.60778904", "0.60576415", "0.60426986", "0.604...
0.7357516
0
query artifacts with a list of specific artifactstatus
def query_artifact(artifactstatus_list): # create empty artifact queryset artifacts_merged = Artifact.objects.none() # iterate over artifactstatus objects for artifactstatus in artifactstatus_list: # get artifacts with specific artifactstatus artifacts = Artifact.objects.filter(artifa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def select_steps_with_status(status, steps):\n return [ step for step in steps if step.status == status ]", "def artifact_types_get_req():\n return {'status': 'success',\n 'message': '',\n 'types': Artifact.types()}", "def test_list_artifacts_for_job(fake_client):\n artifacts = ...
[ "0.56145376", "0.5502256", "0.5482654", "0.54615754", "0.5460564", "0.53760827", "0.53652465", "0.5332104", "0.53205776", "0.52803314", "0.52712375", "0.52260685", "0.5214534", "0.52103305", "0.51927596", "0.517957", "0.51641685", "0.51429254", "0.51265275", "0.50801486", "0....
0.76355225
0
set artifact times according to config
def set_artifact_times(artifact): # get config main_config_model = MainConfigModel.objects.get(main_config_name = 'MainConfig') # get relevant artifactstatus out of config artifactstatus_requested = main_config_model.artifactstatus_requested.all() artifactstatus_acquisition = main_config_model.art...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_analysis_time(self, t):\n for z in self.zones:\n z.set_demand_rate_per_t(t)", "def svn_info_t_prop_time_set(svn_info_t_self, apr_time_t_prop_time): # real signature unknown; restored from __doc__\n pass", "def dt(self, _):\n raise NotImplementedError(\n \"We do no...
[ "0.567912", "0.56485784", "0.56278956", "0.5598909", "0.5496296", "0.54906976", "0.5475135", "0.5384341", "0.5380727", "0.5367412", "0.5335657", "0.5324095", "0.5298101", "0.5286373", "0.5284378", "0.5256725", "0.52557284", "0.52555525", "0.5248737", "0.52438194", "0.52354807...
0.77747446
0
finds nearest task that is unoccupied. This means if another agent is working at that location, that task will not be returned
def find_nearest_unoccupied_task(cur_agent, tasks, agents): current_location = cur_agent.getz() closest_task_distance = np.inf allowable_distance_to_task = .1 closest_task = None for task in tasks: location_occupied = False if not task.isTaskScheduled: task_loc = task.get...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_attack_task_for_unit(self, world, unit):\r\n target_clusters = world.get_enemy_nest_clusters()\r\n max_cluster = max(target_clusters, key=len)\r\n\r\n target = min(max_cluster, key=lambda x: world.get_shortest_path_distance(unit.position, x))\r\n path = world.get_shortest_path(u...
[ "0.6560564", "0.6153575", "0.61524194", "0.5950683", "0.5921171", "0.58735836", "0.58607155", "0.5794781", "0.57347924", "0.5699027", "0.5618542", "0.5607949", "0.55940974", "0.55857736", "0.5556033", "0.5541281", "0.5505964", "0.54815084", "0.5447876", "0.5444861", "0.544193...
0.82706976
0
computes start and finish times of a task given the agent's speed, current location, and task_location
def compute_start_and_finish_times(a, n_t, current_time): duration = n_t.getc() speed = a.getv() current_location = a.getz() task_loc = n_t.getloc() dist = np.sqrt((task_loc[0] - current_location[0]) ** 2 + (task_loc[1] - current_location[1]) ** 2) travel_time = dist / speed start_time = cur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _schedule(self,task_dict):\n times = [time(), None, None, None] # (schedule timestamp, execution timestamp, stop timestamp, get timestamp)\n result_id = self._extract_features.remote(self, times) # calculation is started in new remote task \n task_dict[result_id] = self._idx # add sample i...
[ "0.6099162", "0.60414046", "0.59381944", "0.58190423", "0.5716353", "0.570295", "0.5654997", "0.56370676", "0.56161964", "0.55021346", "0.5477614", "0.5460579", "0.5449442", "0.54475635", "0.54284877", "0.54032576", "0.53916776", "0.5379778", "0.5372666", "0.53617954", "0.534...
0.71098846
0
Are there tasks that can be scheduled?
def tasks_are_available(tasks): task_not_finished_not_scheduled_count = len(tasks) for task in tasks: if task.getisTaskFinished(): continue if task.getisTaskScheduled(): continue else: task_not_finished_not_scheduled_count -= 1 if task_not_finished...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_task_stagnant(task):", "def has_open_tasks(self):\n return self.get_started_tasks()", "def checkUpstreamScheduler():", "def is_task_in_schedule(self, tid: str) -> bool:\n return tid in self.__tasks", "def found_schedules(self) -> bool:\n return self._schedule_list != []", "def...
[ "0.71745074", "0.7151431", "0.7072318", "0.70158434", "0.67972994", "0.6678688", "0.66564685", "0.66272324", "0.66050434", "0.6574776", "0.6508395", "0.6493566", "0.6471567", "0.6463538", "0.6339398", "0.63177663", "0.62976694", "0.6261362", "0.623227", "0.6224766", "0.622469...
0.7639722
0
counts how many tasks are each of the 16 locations also stores which location each task is in, in another array
def update_task_location_vector(self): for counter, task in enumerate(self.tasks): location = task.getloc() if location[0] == 0: vectorized_task_loc = location[1] elif location[0] == 1: vectorized_task_loc = 4 + location[1] elif loc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getCounts(self):\n ret = [0]*len(self.numToLabel)\n for block in self.blocks:\n for label in block[1]: ret[label] += 1\n return ret", "def num_locations(self):\n return len(self.locations)", "def locations_n(self):\n return self.locations[1]", "def run_numbers():\n if run_n...
[ "0.5624857", "0.5569608", "0.55368817", "0.5525221", "0.5519773", "0.5492445", "0.5469183", "0.5433112", "0.54321223", "0.5419543", "0.5411569", "0.5369202", "0.5368313", "0.5351563", "0.53196675", "0.52892", "0.52587813", "0.524506", "0.52282435", "0.5215702", "0.52141505", ...
0.63371027
0
This adds the agent location into vectorized format of the grid. Only updates if the agent is busy.
def update_agent_location_vector(self): for agent in self.agents: location = agent.getz() # print(location) if location[0] == 0: vectorized_agent_loc = location[1] elif location[0] == 1: vectorized_agent_loc = 4 + location[1] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _update_loc(self) -> None:\n self.state[:, :, Boids.Attr.LOC] += self.state[:, :, Boids.Attr.VEL]\n # wrap-around the simulated environment\n self.state[:, :, Boids.Attr.LOC] %= np.expand_dims(self.env_bounds, axis=1)", "def update_agent_distances_vector(self):\n count = 0\n ...
[ "0.6316581", "0.6102098", "0.6024968", "0.59487784", "0.59320974", "0.58403987", "0.57298577", "0.5622365", "0.5591658", "0.55257314", "0.5507829", "0.5465471", "0.54418015", "0.5402544", "0.5368544", "0.53452367", "0.5343779", "0.5331292", "0.527093", "0.52531976", "0.525155...
0.78973
0
updates a vector of euclidean distances to each task. If location of agent moves, this should change.
def update_agent_distances_vector(self): count = 0 for agent in self.agents: agent_loc = agent.getz() for i, each_task in enumerate(self.tasks): dist = euclid_dist(agent_loc, each_task.getloc()) self.agent_distances[count][i] = dist co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_task_location_vector(self):\n for counter, task in enumerate(self.tasks):\n location = task.getloc()\n if location[0] == 0:\n vectorized_task_loc = location[1]\n elif location[0] == 1:\n vectorized_task_loc = 4 + location[1]\n ...
[ "0.6916695", "0.65369725", "0.6202673", "0.5849838", "0.58113796", "0.57360786", "0.57287556", "0.5716288", "0.57080925", "0.56720674", "0.5670715", "0.56695974", "0.56677645", "0.56104976", "0.5585176", "0.5577297", "0.55730516", "0.55699134", "0.5539065", "0.54842377", "0.5...
0.8082939
0
Updates tasks that are alive, enabled, and travel_time_enabled Again, has some redundancies
def update_alive_enabled_travel(self): self.is_task_alive = np.ones((1, self.num_tasks)) # 1 if alive self.is_task_enabled = np.ones((1, self.num_tasks)) # 1 if enabled self.travel_time_constraint_satisfied = np.ones((2, self.num_tasks)) # 1 if satisfied # ALIVE for each_task...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _update_tasks(self, tasks):\n\n self._print('Updating tasks {} with {} ...'.format(self._tasks, tasks))\n\n self._tasks.update(tasks)", "def __update_task(self, tasks, **extra_args):\n for task in tasks:\n assert isinstance(\n task, Task), \"Core.update_job_stat...
[ "0.7101653", "0.7070222", "0.696539", "0.68238944", "0.662848", "0.6610936", "0.654214", "0.6339835", "0.6317559", "0.6245997", "0.6237602", "0.62275285", "0.62232226", "0.61214197", "0.61144865", "0.6111591", "0.6089573", "0.6084587", "0.60815936", "0.6032838", "0.60157925",...
0.77476394
0
Schedules a task based on aggregate score updates agent current task based on this
def schedule_task(self, counter): task_to_schedule = [] each_agent = self.agents[counter] task_found = False H1_score_list = [] H2_score_list = [] H3_score_list = [] H1_dict = {} H2_dict = {} H3_dict = {} # Agent not idle case, exit immedi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def compute_task_to_schedule(self, agent_num):\n task = self.schedule_task(agent_num) # get chosen task\n\n agent = self.agents[agent_num] # get current agent\n # self.write_csv_pairwise(agent_num)\n # self.write_csv(agent_num)\n\n if task[0] == -1: # if null task chosen\n ...
[ "0.6529968", "0.6498752", "0.63196087", "0.6048288", "0.60182256", "0.597258", "0.5806954", "0.57858235", "0.5773089", "0.5643624", "0.56128", "0.56077075", "0.5525462", "0.5467468", "0.54315627", "0.5422822", "0.5416013", "0.53985727", "0.53969085", "0.53964466", "0.5394362"...
0.68702924
0
sets finish times to inf. This basically means they are not completed
def initialize_finish_times_to_inf(self): for i in range(0, self.num_tasks): self.finish_time_per_task_dict[i] = np.inf
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def run_out_of_time(self):\n self.out_of_time = True", "def set_finish(self, t: float = 0.0) -> None:\n if not t:\n t = time()\n self.tfinish = t\n self.log.debug(\"%s %s\", self.prefix, {\"end-time\": self.tfinish})", "def finish(self, finish_time=None):\n pass", ...
[ "0.6520086", "0.6353846", "0.6314697", "0.6176547", "0.60193926", "0.60193926", "0.60193926", "0.5974248", "0.57966334", "0.57080436", "0.5697412", "0.5680997", "0.5624751", "0.5587151", "0.5573249", "0.55686235", "0.55574065", "0.5505439", "0.5498414", "0.54834497", "0.54701...
0.816265
0
Computes Floyd Warshalls Updates agent locations (if they have reached a task move there) Updates implicit deadlines Updates agent distances based on updated agent locations Updates which tasks are alive, enabled and travel_constraint enabled
def update_floyd_warshall_and_all_vectors(self): self.graph.compute_floyd_warshal() # Update where agents are self.update_agent_location_vector() # update deadlines self.populate_deadline_vector() # update distances to each task and orientation to each task self.u...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def computeForces(self, neighbors=[]): #computing forces to drive the agents and avoid collisions \n if not self.atGoal:\n if self.entry_state % 2 == 0 and len(self.entrancex) > 0 and self.id != 4 : #checks if assigned curve is entry and switches to state 1 to follow entry bezier curve\n ...
[ "0.7051051", "0.6387123", "0.6131864", "0.5956313", "0.5933806", "0.5870744", "0.5852478", "0.58488905", "0.5806669", "0.5763782", "0.57401586", "0.57004774", "0.567962", "0.56677824", "0.56226337", "0.55885166", "0.55575943", "0.5544302", "0.547298", "0.54628146", "0.5454522...
0.7724953
0
adds data to the csv for a certain agent
def write_csv(self, agent_num): data = [] data.append(self.t) data.append(self.w_EDR) data.append(self.w_RESOURCE) data.append(self.w_DISTANCE) data.append(agent_num) for task_num, task in enumerate(self.tasks): vectorized_task_loc = self.get_vectorize...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def data_add(invoice_details):\r\n with open(\"beer_data.csv\", \"a\") as data_file:\r\n writer = csv.writer(data_file)\r\n writer.writerow(invoice_details)\r\n data_file.close()", "def setup_csv(self) -> None:\n csvData = ['Followers', 'Time']\n\n # Create our CSV file header\n...
[ "0.662632", "0.6398973", "0.63391227", "0.6135978", "0.61266804", "0.5973132", "0.5939993", "0.5921802", "0.5902474", "0.5853977", "0.5835502", "0.58188224", "0.58076525", "0.575672", "0.5740445", "0.57366645", "0.5726228", "0.5687795", "0.56800157", "0.5677692", "0.56772965"...
0.6684417
0
writes a schedule in pairwise format That means n rows will be presented, where n is the number of tasks. Each row contains task specific features
def write_csv_pairwise(self, agent_num): # self.last_timestep_data = [] for task_num, i in enumerate(self.tasks): current_task_data = [] task_loc = i.getloc() vectorized_task_loc = self.get_vectorized_location(task_loc) current_task_data.append(self.t) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def output_schedule(self) -> None:\n with open(\"Output.txt\", \"w\") as out_file:\n for sem in self.plan:\n out_file.write(sem.title.center(15 + 20 + 50 + 5) + \"\\n\\n\")\n for course in sem.required_courses:\n if course.special:\n ...
[ "0.6155076", "0.58488786", "0.575756", "0.56989926", "0.5652544", "0.5581654", "0.5513856", "0.55035716", "0.5478721", "0.5475027", "0.54018384", "0.5338996", "0.5317282", "0.5311656", "0.5308736", "0.5252338", "0.5228852", "0.51849914", "0.51674294", "0.5137591", "0.510102",...
0.6364437
0
Checks finish condition for schedule
def check_if_schedule_finished(self): tot_num_tasks_scheduled = sum(self.is_task_finished[0]) if tot_num_tasks_scheduled > 19 or self.t > 150: self.data_done_generating = True if self.t > 150: print('Schedule failed to create') print('Schedule will...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def complete(self):\r\n if self.scheduler_launch_time == INVALID_TIME:\r\n print \"Missing task scheduler launch time\"\r\n return False\r\n if self.node_monitor_launch_time == INVALID_TIME:\r\n\t print \"Missing task node monitor launch time\"\r\n\t return False\r\n\tif self.comp...
[ "0.70576763", "0.660566", "0.660566", "0.660566", "0.6559862", "0.6503821", "0.6443644", "0.64333826", "0.6411796", "0.6394543", "0.638096", "0.636754", "0.63611645", "0.6337765", "0.63229", "0.629554", "0.6281088", "0.6274435", "0.6242915", "0.623993", "0.6238348", "0.6218...
0.7545543
0
Retrieve a list of the equities and the quantity held on a particular date by a particular user, if they exist
def get_portfolio(username): user_obj = User.query.filter(User.username == username).first() date = request.args.get('date') if user_obj is None: return util.build_json_response('User does not exist') if not util.is_valid_date_string(date): return util.build_json_response("Not a valid ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_by_date():\n\n input_date = request.args.get('date')\n \n user_id = session['user']\n user_inv = (UserInv.query.filter_by(user_id=user_id)).all()\n\n inv_by_date = []\n\n for item in user_inv: \n if str(item.inv.date_of_investment) == input_date:\n inv_by_date.append...
[ "0.61054766", "0.5950331", "0.5886843", "0.56959987", "0.5685352", "0.54649276", "0.52916914", "0.5280743", "0.52630013", "0.52083814", "0.51895857", "0.5186475", "0.5161704", "0.51446867", "0.5128957", "0.5113111", "0.5106592", "0.51013273", "0.50893575", "0.5071267", "0.503...
0.63688445
0
Adds a positive entry into the database to account for 'buying' a particular holding on a particular date only if the user exists and the price total (quantity price) does not exceed the account balance
def add_to_portfolio(username): user_obj = User.query.filter(User.username == username).first() ticker = request.form.get('ticker') date = request.form.get('date') qty = request.form.get('qty') if user_obj is None: return util.build_json_response('User does not exist') if (len(ticker) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def buy_item(self, item):\n if self.amount < item.price:\n custom_log(\"Insufficient amount. Insert more coins.\", MSG_ERROR)\n else:\n self.amount = round((self.amount - item.price), 2)\n item._buy()\n custom_log(f\"You bought - {item.name}, remaining cash...
[ "0.62969047", "0.6211707", "0.6173486", "0.6135983", "0.61165524", "0.6044539", "0.6012283", "0.6010995", "0.60059714", "0.6000789", "0.5987403", "0.59842676", "0.59677374", "0.5959572", "0.5948626", "0.5947851", "0.59408027", "0.59256536", "0.5917937", "0.59175825", "0.58960...
0.6369183
0
Adds a negative entry into the database to account for 'selling' a particular holding on a particular date only if the user exists and the quantity being sold does not exceed the quantity held up to that date
def remove_from_portfolio(username): user_obj = User.query.filter(User.username == username).first() ticker = request.form.get('ticker') date = request.form.get('date') qty = request.form.get('qty') if user_obj is None: return util.build_json_response('User does not exist') if (len(tic...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_add_with_negative_amount(self):\n good = GoodInfo(\"яйцо 1 кат.\", \"30\", \"-40\", \"2020-12-30\", \n \"14\", \"2020-12-30\")\n check_product_data = self.database.add(good)\n\n self.assertFalse(check_product_data)", "def test_check_user_quantity_stocks_for_gi...
[ "0.608748", "0.59747124", "0.5912512", "0.5866839", "0.5833634", "0.5832183", "0.5770894", "0.5730225", "0.57119876", "0.569739", "0.56778073", "0.5667274", "0.5618804", "0.56061447", "0.556615", "0.55538535", "0.55318004", "0.55185896", "0.5517954", "0.5495279", "0.54871625"...
0.62343097
0
Clear all holdings for a paritcular user, if they exist, and reset the balance back to the default balance amount
def clear_holdings(username): user_obj = User.query.filter(User.username == username).first() if user_obj is None: return util.build_json_response('User does not exist') try: db.session.execute( update(User) .values(balance=Config.DEFAULT_BALANCE) .w...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reset(self):\n for key in self.portfolio.keys():\n self.portfolio[key] = {'holdings': 0}\n self.buys[key] = 0\n self.portfolio['balance'] = 2500000.0", "def reset(cls):\n GrandChallenge.objects.all().delete()\n GrandChallengeUser.objects.update(lost=0, last_r...
[ "0.64368814", "0.6183782", "0.60984427", "0.60094863", "0.59135014", "0.5843152", "0.58169794", "0.5763059", "0.57237643", "0.57175833", "0.5624603", "0.5614059", "0.5593863", "0.5558275", "0.5531175", "0.55167025", "0.5496675", "0.5473267", "0.5462998", "0.54517573", "0.5424...
0.66361046
0
Retrieve price for a particular stock ticker on a particular date of the form YYYYMMDD (default price type to 'low')
def get_price(ticker): date = request.args.get('date') if (date is None) or (not util.is_valid_date_string(date)): return util.build_json_response("No date selected or not in the form YYYY-MM-DD") price = market_data.get_stock_price(ticker, date, 'low') if price is None: return util.bu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_stock_price(stock):\n pass", "def get_stock_price(df_excld):\n\n ts = TimeSeries(os.environ['ALPHA_VANTAGE_KEY'])\n\n info = []\n symbols = []\n counter = 0\n\n for t in df_excld['Ticker']:\n\n if counter % 5 == 0:\n time.sleep(65)\n\n i, m = ts.get_daily(s...
[ "0.6860741", "0.64612657", "0.6285231", "0.627891", "0.6268929", "0.62418354", "0.6219314", "0.6187929", "0.61725336", "0.6109318", "0.6077271", "0.6072425", "0.6063008", "0.6049149", "0.6006757", "0.6006257", "0.5955611", "0.5879088", "0.5806045", "0.5804109", "0.57986856", ...
0.76464707
0
Return the repository path from a CVS path. >>> getrepopath(b'/foo/bar') '/foo/bar'
def getrepopath(cvspath): # According to CVS manual, CVS paths are expressed like: # [:method:][[user][:password]@]hostname[:[port]]/path/to/repository # # CVSpath is splitted into parts and then position of the first occurrence # of the '/' char after the '@' is located. The solution is the rest of...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def repo_path(repo, *path):\n return os.path.join(repo.vcsdir, *path)", "def _branchPath(self, path):\n assert self.branch_dir is not None\n return os.path.join(self.branch_dir, path)", "def path(src, name='default'):\n try:\n return get_output(['hg', 'path', name], cwd=src).strip()\n exc...
[ "0.61027926", "0.6061968", "0.5992272", "0.59105736", "0.5753857", "0.569133", "0.56849474", "0.56822276", "0.56474394", "0.56140965", "0.5577763", "0.5547634", "0.5543549", "0.5512189", "0.54327875", "0.5401934", "0.5398828", "0.53873706", "0.53672487", "0.53585917", "0.5331...
0.811643
0
Returns the project name and the version name
def fullname(self): return "{project}/{version}".format( project=self.project.name, version=self.name )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getProjectName():", "def project_name(self):\n pass", "def name(self):\r\n return self.setuptools_requirement.project_name", "def get_project_name(self):\n return self.line_edit.text()", "def get_package_name(self):\n return self.name + '-' + self.version", "def project(se...
[ "0.811286", "0.7547395", "0.72261554", "0.7059194", "0.7008339", "0.6974289", "0.6974289", "0.6974289", "0.6974289", "0.6974289", "0.6974289", "0.6974289", "0.6974289", "0.6974289", "0.6974289", "0.6974289", "0.6974289", "0.6974289", "0.69604677", "0.69451076", "0.69451076", ...
0.7832595
1
Gets a list of projectversions which are recursive dependencies of the given projectversion.
def get_projectversion_deps(projectversion_id, session): query = """ WITH RECURSIVE getparents(projectversion_id, dependency_id) AS ( SELECT projectversion_id, dependency_id FROM projectversiondependency WHERE projectversion_id = :projectversion_id UNION ALL SELECT s2.p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_dependencies(self, revision: Dict) -> List[Dict]:\n dependency_ids = revision['auxiliary']['phabricator:depends-on']\n revisions = self.get_revisions(phids=dependency_ids)\n result = []\n for r in revisions:\n result.append(r)\n sub = self.get_dependencies(...
[ "0.6127279", "0.6023296", "0.58947617", "0.58304703", "0.5793256", "0.5770767", "0.57204896", "0.5594969", "0.55554485", "0.5517041", "0.54677266", "0.54007363", "0.5350627", "0.5348529", "0.5333446", "0.5318038", "0.5244087", "0.52239704", "0.5212116", "0.520666", "0.5197854...
0.77341354
0
Initializes grid to be empty, take height and width of grid as parameters Indexed by rows (left to right), then by columns (top to bottom)
def __init__(self, grid_height, grid_width): self._grid_height = grid_height self._grid_width = grid_width self._cells = [[EMPTY for dummy_col in range(self._grid_width)] for dummy_row in range(self._grid_height)]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialize_grid(self):\r\n for i in range(self.height):\r\n for j in range(self.width):\r\n self.grid[i][j] = 0\r\n \r\n # fill up unvisited cells\r\n for r in range(self.height):\r\n for c in range(self.width):\r\n if r % ...
[ "0.7630782", "0.74650055", "0.7415772", "0.73265195", "0.7318922", "0.72002435", "0.7185097", "0.7185097", "0.7185097", "0.7169826", "0.7161286", "0.71592313", "0.71498895", "0.71498895", "0.7091087", "0.70734245", "0.7069152", "0.7042371", "0.70330805", "0.7016255", "0.69839...
0.81462014
0
Clears grid to be empty
def clear(self): self._cells = [[EMPTY for dummy_col in range(self._grid_width)] for dummy_row in range(self._grid_height)]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clear(self):\n self._grid = [[None]]", "def clear(self):\r\n\t\tself.grid.fill(False)", "def clear(self):\n board.change_grid(self.x, self.y, 0)", "def reset(self):\n # self.grid = [[0] * self.grid_width] * self.grid_height\n self.grid = []\n for dummy_row in range(self...
[ "0.887634", "0.8503257", "0.8120353", "0.7833024", "0.7820857", "0.7812106", "0.7717571", "0.76588106", "0.7652856", "0.7600189", "0.7595094", "0.7563524", "0.7540327", "0.7539779", "0.7524181", "0.75000095", "0.7498649", "0.7464991", "0.74193263", "0.7418663", "0.73871803", ...
0.8566958
1
Set cell with index (row, col) to be empty
def set_empty(self, row, col): self._cells[row][col] = EMPTY
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clear(self):\n self._cells = [[EMPTY for dummy_col in range(self._grid_width)]\n for dummy_row in range(self._grid_height)]", "def reset(self):\n width = len(self.cell)\n height = len(self.cell[0])\n self.cell = [ [EMPTY for r in range(height)] for c in range...
[ "0.78295135", "0.7669678", "0.76374394", "0.7258782", "0.71456724", "0.71178824", "0.71178824", "0.7110621", "0.71029586", "0.7092802", "0.70917785", "0.7086161", "0.7058204", "0.7033031", "0.6960891", "0.68685335", "0.6855809", "0.68292814", "0.6816586", "0.6803696", "0.6792...
0.8645582
0
Set cell with index (row, col) to be full
def set_full(self, row, col): self._cells[row][col] = FULL
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_empty(self, row, col):\n self._cells[row][col] = EMPTY", "def reset(self):\n width = len(self.cell)\n height = len(self.cell[0])\n self.cell = [ [EMPTY for r in range(height)] for c in range(width) ]", "def setBlank(self, pos):\n self.tiles[-1] = pos", "def set_tile...
[ "0.74354434", "0.6868537", "0.67742896", "0.66115975", "0.65451497", "0.6479824", "0.64311063", "0.6417367", "0.64082235", "0.6407858", "0.64059615", "0.6401799", "0.6378078", "0.6373002", "0.6373002", "0.6368696", "0.6360975", "0.6360384", "0.6356319", "0.63451356", "0.63406...
0.81318814
0
Checks whether cell with index (row, col) is empty
def is_empty(self, row, col): return self._cells[row][col] != FULL
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _empty_cell(self, i_row, i_col):\n return self._board[i_row][i_col] == \" \"", "def is_empty(self, row, col):\n return self.field[row, col] == '-'", "def check_empty(cell):\n return pd.isna(cell)", "def testEmptyCell(self, row, column, gameGrid=None, emptyValue=0):\n if not gameGr...
[ "0.8279983", "0.8197386", "0.81066924", "0.8022967", "0.80025375", "0.79176986", "0.76810986", "0.7655337", "0.7567471", "0.7562856", "0.7515833", "0.75053334", "0.74276817", "0.7426374", "0.7417211", "0.7400333", "0.7385057", "0.73581314", "0.73380595", "0.73341995", "0.7293...
0.87621516
0
Takes point in screen coordinates and returns index of containing cell
def get_index(self, point, cell_size): return (point[1] / cell_size, point[0] / cell_size)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_index(self):\n current = self.from_grid\n #find index of \"*\"\n for x in range(len(current)):\n for y in range(len(current[x])):\n if current[x][y] == \"*\":\n index = (x,y)\n return index", "def cell_index(self, coord):\n\n ...
[ "0.76455384", "0.7513032", "0.74592626", "0.73822683", "0.7260477", "0.72356343", "0.7188108", "0.7178427", "0.71581024", "0.71462774", "0.6948103", "0.69273347", "0.6926569", "0.6914826", "0.6914826", "0.69116056", "0.68796355", "0.6856874", "0.6826299", "0.67381704", "0.673...
0.7794232
0
Return true if the tree element is a widget with typeId menumux
def is_menumux(element): return element.tag == 'widget' and \ element.get('typeId', default=MISSING) == MENU_MUX_ID
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_active(widget):\n return widget in active_widgets or widget in layer_widgets", "def has(self, component_type):\n return component_type in self._children", "def isNodeType(self, t):\n return isinstance(self, t)", "def isTree(self, t):\n\n if type(t) != tree:\n return ...
[ "0.59847116", "0.59238446", "0.59065753", "0.58840156", "0.58742225", "0.5860729", "0.58427274", "0.58137167", "0.57992494", "0.5782972", "0.5708701", "0.5702631", "0.5700949", "0.5691066", "0.5682201", "0.5667302", "0.5559833", "0.55532175", "0.55429095", "0.55364543", "0.55...
0.722235
0
Recursively find all MenuMux symbols from root node. Return a list of (name, first_value).
def find_mm_symbols(node): symbols = {} if len(node) == 0: return symbols else: for child in node: if is_menumux(child): try: # grab the number of sets of target-values defined num_sets = child.find('num_sets') ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getAllNames(self):\n result = []\n node = self\n while not node.isRoot():\n result.insert(0, node.getName())\n node = node.getParent()\n result.insert(0, node.getName())\n return result", "def fn(node):\n ans, stack = [], []\n whi...
[ "0.509325", "0.4992512", "0.49513537", "0.493068", "0.4924768", "0.4924014", "0.48970065", "0.48819217", "0.48680574", "0.48541766", "0.48541066", "0.48351964", "0.48308712", "0.47602692", "0.47494695", "0.47325057", "0.4718129", "0.4705719", "0.46953857", "0.4692597", "0.466...
0.58911955
0
Recursively replace any instance of a symbol with a local PV.
def replace_symbols(node, symbols): warning = False if len(node) == 0: if node.text is not None and not node.text.isspace(): if '$' in node.text and not (node.tag in EXCLUDED_TAGS): node.text = try_replace(node.text, symbols) if node.tag in NON_PV_TAGS: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def recursiveSearchReplace(x, s, r):\n for k, v in x.items():\n if type(v) is dict:\n recursiveSearchReplace(v, s, r)\n else:\n if v == s:\n x[k] = r", "def resolve_symbol(self, symbol):\n if symbol in self.labels:\n return self.labels[symbo...
[ "0.52873677", "0.5232028", "0.51239073", "0.5026712", "0.5018338", "0.5013244", "0.49680254", "0.49638858", "0.49216217", "0.4905777", "0.48270255", "0.48172233", "0.47987476", "0.4792203", "0.47846404", "0.47664478", "0.47544852", "0.47457287", "0.47394028", "0.47348565", "0...
0.61905044
0
Use factory mode to create the backbone. The backbone is ResNet.
def create_backbone(cfg): return backbone_factory[cfg.model.backbone.name](cfg)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_model(self):\n pass", "def create_model(self):\n pass", "def get_factory():", "def viewfactory(self):\n raise NotImplementedError()", "def __init__(self, backbone_name, config):\n\n backbone_config = Schema(\n {\n Required(\"input_shape\"): S...
[ "0.63126415", "0.63126415", "0.6265553", "0.6215484", "0.61930734", "0.618915", "0.6162533", "0.6112772", "0.60765994", "0.59768045", "0.59768045", "0.5896723", "0.5890227", "0.5889007", "0.58806", "0.58799183", "0.58720887", "0.58451647", "0.5835862", "0.5835862", "0.5824702...
0.74776757
0
Register multiple models with the same arguments. Calls register for each argument passed along with all keyword arguments.
def register_models(self, *models, **kwargs): for model in models: self.register(model, **kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def register(self, *model):\n for m in model:\n m.Register()\n self.models.append(m)", "def register_admin_models(*args, **kwargs):\n for model in args:\n admin.register(model, session=kwargs['session'])\n return None", "def register(self, model_or_iterable, handler_class, **kwargs):\...
[ "0.79722357", "0.67167324", "0.66146886", "0.6543116", "0.6176708", "0.600071", "0.600071", "0.600071", "0.600071", "0.600071", "0.600071", "0.600071", "0.600071", "0.59464824", "0.58884686", "0.5851817", "0.58074623", "0.5693294", "0.5667267", "0.5585553", "0.55767953", "0...
0.7950732
1
This will return a string that can be used as a prefix for django's cache key. Something like key.1 or key.1.2 If a version was not found '1' will be stored and returned as the number for that key. If extra is given a version will be returned for that value. Otherwise the major version will be returned.
def get_version(self, extra=None): if extra: key = self._get_extra_key(extra) else: key = self.key v = self._get_cache(key).get(key) if v == None: v = self._increment_version(extra=extra) return "%s.%s" % (key, v)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_cache_key(prefix):\n return '%s' % (prefix)", "def _make_key(self, extra_prefix, key):\n if extra_prefix:\n return \"-\".join((self.prefix, extra_prefix, key))\n else:\n return \"-\".join((self.prefix, key))", "def _make_key(self, extra_prefix, key):\n if e...
[ "0.7012189", "0.6505339", "0.6505339", "0.64505917", "0.6364331", "0.6190883", "0.6112342", "0.6106189", "0.5995421", "0.59854543", "0.59607506", "0.58653015", "0.5854469", "0.5810253", "0.58066434", "0.5804502", "0.57891154", "0.57810754", "0.5778898", "0.56279063", "0.56209...
0.755687
0
Reduce the bond universe to bonds that are in any one grid
def reduceUniverse(self): self.bondList = list(set([bond for grid in self.parent.gridList for bond in grid.bondList]))#set removes duplicates self.df = self.df.reindex(self.bondList) self.df = self.df[pandas.notnull(self.df['ISIN'])] self.rfbonds = list(self.df.loc[self.df['TICKER']....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ignore_biasbn(directions):\n for d in directions:\n if d.dim() <= 1:\n d.fill_(0)", "def _remove_dangling_bonds(self) -> None:\n for residue in self.residues:\n bonds, impropers, cross_maps, ics = [], [], [], []\n for bond in residue.bonds:\n f...
[ "0.612162", "0.60860974", "0.60171133", "0.5589549", "0.55667216", "0.54495823", "0.543323", "0.54215306", "0.54030997", "0.53889775", "0.5369146", "0.5312899", "0.53013843", "0.52954197", "0.5294541", "0.52723455", "0.5264474", "0.5238258", "0.52358246", "0.5229589", "0.5214...
0.62369883
0
Fills positions if trade history data is available
def fillPositions(self): if self.th is not None: self.df['POSITION'] = self.th.positions['Qty'] self.df['REGS'] = self.th.positions['REGS'] self.df['144A'] = self.th.positions['144A'] self.df['POSITION'].fillna(0, inplace=True) self.df['REGS'].fi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def openPositionHistory(self):\n dt_only, tm_only = self.getDatetimeSplit()\n\n # GET OPEN POSITIONS\n open_positions_found = self.open_positions_history.find_one(\n {\"Date\": dt_only, \"Trader\": self.user[\"Name\"], \"Asset_Type\": self.asset_type, \"Account_ID\": self.account_id...
[ "0.6459351", "0.6103853", "0.6029683", "0.59873354", "0.59233195", "0.57485735", "0.5711293", "0.5682093", "0.56430924", "0.56382126", "0.5636288", "0.5630813", "0.56141084", "0.5610457", "0.5599238", "0.55738753", "0.5553225", "0.5523361", "0.551922", "0.55105466", "0.546896...
0.6728969
0
Starts live feed from Bloomberg.
def startUpdates(self): # Analytics stream self.blptsAnalytics = blpapiwrapper.BLPTS() self.streamWatcherAnalytics = StreamWatcher(self, BloombergQuery.ANALYTICS) self.blptsAnalytics.register(self.streamWatcherAnalytics) # Price only stream self.blptsPriceOnly = blp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def start():\n print('Running...')\n with Feed(Config.database) as feed:\n feed.refresh()", "def start(self):\r\n self.debug(\"### starting gox streaming API, trading %s%s\" %\r\n (self.curr_base, self.curr_quote))\r\n self.client.start()", "def feed() -> None:\n .....
[ "0.6780575", "0.64053637", "0.625197", "0.62273294", "0.6178107", "0.6083856", "0.60136896", "0.6011202", "0.59738946", "0.59234995", "0.5886008", "0.5885424", "0.58506644", "0.58455986", "0.5831685", "0.57933074", "0.5747446", "0.5729477", "0.570291", "0.57021135", "0.568273...
0.76409364
0