query
stringlengths
9
3.4k
document
stringlengths
9
87.4k
metadata
dict
negatives
listlengths
4
101
negative_scores
listlengths
4
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Attach disk to VM by reconfiguration.
def attach_disk_to_vm(self, vm_ref, instance_name, adapter_type, disk_type, vmdk_path=None, disk_size=None, linked_clone=False, controller_key=None, unit_number=None, device_name=None): client_factory = self....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def AttachDisk(self, disk: 'AZComputeDisk') -> None:\n vm = self.compute_client.virtual_machines.get(\n self.resource_group_name, self.name)\n data_disks = vm.storage_profile.data_disks\n # ID to assign to the data disk to attach\n lun = 0 if len(data_disks) == 0 else len(data_disks) + 1\n\n ...
[ "0.73531574", "0.68157685", "0.67563796", "0.66293067", "0.64325035", "0.6426697", "0.63882655", "0.6334873", "0.623497", "0.6223832", "0.62092334", "0.6202001", "0.6195019", "0.61449945", "0.6086266", "0.6073298", "0.6072383", "0.6067116", "0.6057906", "0.59617317", "0.58979...
0.7390084
0
Detach disk from VM by reconfiguration.
def detach_disk_from_vm(self, vm_ref, instance_name, device): client_factory = self._session._get_vim().client.factory vmdk_detach_config_spec = vm_util.get_vmdk_detach_config_spec( client_factory, device) disk_key = device.key LOG.debug(_("Reconfiguri...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def disk_detach(vmdk_path, vm):\n\n device = findDeviceByPath(vmdk_path, vm)\n\n if not device:\n # Could happen if the disk attached to a different VM - attach fails\n # and docker will insist to sending \"unmount/detach\" which also fails.\n msg = \"*** Detach failed: disk={0} not foun...
[ "0.765152", "0.71042055", "0.710292", "0.7051662", "0.6706635", "0.66381764", "0.65310085", "0.63526535", "0.62885463", "0.62843525", "0.6217464", "0.62058824", "0.6176701", "0.61576825", "0.6140649", "0.6140027", "0.6105745", "0.6038374", "0.6036814", "0.5985441", "0.5894797...
0.74518675
1
Return volume connector information.
def get_volume_connector(self, instance): iqn = volume_util.get_host_iqn(self._session, self._cluster) return { 'ip': CONF.vmwareapi_host_ip, 'initiator': iqn, 'host': CONF.vmwareapi_host_ip }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialize_connection(self, volume, connector):\n export = '%s/%s' % (volume['provider_location'], volume['name'])\n data = {'export': export, 'name': 'volume'}\n if volume['provider_location'] in self.shares:\n data['options'] = self.shares[volume['provider_location']]\n ...
[ "0.6858231", "0.6418148", "0.62130344", "0.60607785", "0.6042523", "0.58188075", "0.5792801", "0.5697431", "0.55846596", "0.55579096", "0.5506042", "0.5469819", "0.5426191", "0.5425665", "0.54218316", "0.5421626", "0.54012877", "0.53762865", "0.53762865", "0.5360571", "0.5350...
0.7179875
0
Attach volume storage to VM instance.
def attach_volume(self, connection_info, instance, mountpoint): instance_name = instance['name'] vm_ref = vm_util.get_vm_ref_from_name(self._session, instance_name) if vm_ref is None: raise exception.InstanceNotFound(instance_id=instance_name) # Attach Volume to VM LO...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def attach_volume(self, context, connection_info, instance, mountpoint,\n disk_bus=None, device_type=None, encryption=None):", "def attach_volume(self):\n\n # Choose volume\n volume_id = self._choose_among_available_volumes()\n\n # Cancel\n if not volume_id:\n ...
[ "0.81846446", "0.7974021", "0.79596764", "0.7858076", "0.7515268", "0.74380124", "0.74260545", "0.7417238", "0.72209245", "0.71213835", "0.7119569", "0.7005731", "0.6974186", "0.6920998", "0.68285924", "0.68272907", "0.6788624", "0.67863244", "0.67736286", "0.6771072", "0.672...
0.7598646
4
Detach volume storage to VM instance.
def detach_volume(self, connection_info, instance, mountpoint): instance_name = instance['name'] vm_ref = vm_util.get_vm_ref_from_name(self._session, instance_name) if vm_ref is None: raise exception.InstanceNotFound(instance_id=instance_name) # Detach Volume from VM ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def detach_volume(self, connection_info, instance, mountpoint,\n encryption=None):", "def detach_volume(self):\n\n # Choose the volume\n volume_id = self._choose_among_used_volumes()\n\n # Cancel\n if not volume_id:\n print 'Operation cancelled'\n ...
[ "0.8114062", "0.80263144", "0.7928212", "0.77187544", "0.76588297", "0.7626845", "0.7559527", "0.7490584", "0.74343324", "0.73547065", "0.73352516", "0.73352516", "0.732464", "0.7162539", "0.70716673", "0.7023439", "0.69156", "0.69056416", "0.67387044", "0.6652363", "0.664442...
0.74771315
8
This modules creates a bash file to connect connect the to UCF clusters
def connect(directory_1, directory_2, key_address, user, server): import os # Creates a list of files in the working directory files = os.listdir() # If the bash file already exists, it deletes the bash file before making progress if 'connect.sh' in files: os.remove('connect.sh') el...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def main():\n mvip, user, user_pass, mvip_node = get_inputs()\n headers, url = build_auth(mvip, user, user_pass, mvip_node)\n payload = build_payload()\n response_json = connect_cluster(headers, url, payload)\n account_table = create_table(response_json)\n print(account_table)", "def main():\n\...
[ "0.65127397", "0.62745446", "0.59723467", "0.5956529", "0.59374183", "0.58881605", "0.5853393", "0.5802111", "0.57484627", "0.5721694", "0.5707348", "0.5700164", "0.5663848", "0.56471217", "0.56392187", "0.5619558", "0.55862945", "0.5568309", "0.5539452", "0.55311024", "0.553...
0.58358824
7
This module creates a bash script to compressed desired files and folders and copies them to the UCF Clusters. For security purposes, this module does not save passwords or passphrases
def sync(directory_1, directory_2, key_address, user, server): import os # Creates a list of files in the working directory files = os.listdir() # If the bash file already exists, it deletes the bash file before making progress if 'sync.sh' in files: os.remove('sync.sh') else: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pack():\n clean_local()\n build()\n copy_json()\n optimize()\n tarball()", "def copy_scfu_folder(chem_form):\n\n src = calc_root + \"/\" + chem_form + \"/first_scfu/tmp\"\n dest = calc_root + \"/\" + chem_form + \"/hp/tmp\"\n\n f = open(\"rysnc.sh\",'w')\n f.write(\"\"\"\n #...
[ "0.6320039", "0.6044907", "0.6033638", "0.6010432", "0.5978256", "0.5924643", "0.5897727", "0.5866136", "0.5854039", "0.58496296", "0.5825296", "0.5823549", "0.58181125", "0.57648784", "0.5761756", "0.5755998", "0.57477236", "0.5711603", "0.5669225", "0.5627048", "0.5583162",...
0.5492905
36
Do not return anything, modify nums inplace instead.
def wiggleSort(self, nums: List[int]) -> None: def quickselect(low, hight, k, arr): pivot = random.randint(low, hight) arr[pivot], arr[hight] = arr[hight], arr[pivot] pivot = low for i in range(low, hight): if arr[i] < arr[hight]: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fn(i):\n if i == len(nums): ans.append(nums.copy())\n for j in range(i, len(nums)): \n nums[i], nums[j] = nums[j], nums[i]\n fn(i+1)\n nums[i], nums[j] = nums[j], nums[i]", "def double_nums(num_list):", "def remove_dups(nums):\r\n nums[:...
[ "0.70469916", "0.67161703", "0.66934896", "0.6586775", "0.6501143", "0.6482345", "0.6442288", "0.6407945", "0.6376896", "0.6372343", "0.63671577", "0.6365932", "0.63512594", "0.6328759", "0.6298402", "0.62855035", "0.62671727", "0.62472045", "0.62221444", "0.6193869", "0.6188...
0.0
-1
check that columns_lst is tbset of self.df.columns.names
def validate_col_lst(self, df, columns_lst): if columns_lst == []: raise ValueError("column_lst is empty") col_set = set(columns_lst) df_col_set = set(list(df)) if col_set - df_col_set != set(): msg = "col_lst has columns name that does not exists in the DataFrame...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_columns_in_dataframe(df, columns):\n\n if not isinstance(columns, list):\n columns = [columns]\n return set(columns).issubset(df.columns)", "def _check_columns(df: pd.DataFrame, names: typing.Sequence[str]) -> None:\n for expected in names:\n if expected not in df.columns:\n ...
[ "0.7229939", "0.69595104", "0.6792466", "0.6648041", "0.66035503", "0.65919405", "0.65672946", "0.6438893", "0.64331186", "0.6377156", "0.6362247", "0.63079476", "0.62102634", "0.61988276", "0.6196506", "0.61454993", "0.61221856", "0.61137414", "0.61022323", "0.6095521", "0.6...
0.83148104
0
Function for parsing the recipient folder for FACS data files.
def parse_facs_files(): #Load parser settings parser_settings = getattr(settings,'FACS_PARSER_SETTINGS') files_to_parse = [parser_settings['facs_source_directory']+f for f in os.listdir(parser_settings['facs_source_directory']) if '.exp' in f] for filename in files_to_parse: #Com...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def main(pst_file):\n opst = pypff.open(pst_file)\n root = opst.get_root_folder()\n\n message_data = folder_traverse(root, [], **{'pst_name': pst_file, 'folder_name': 'root'})\n\n header = ['pst_name', 'folder_name', 'creation_time', 'submit_time', 'delivery_time',\n 'sender', 'subject', '...
[ "0.61010617", "0.5539876", "0.5464439", "0.5427242", "0.53528404", "0.5294358", "0.5280345", "0.52603656", "0.5202298", "0.52001935", "0.51878786", "0.5151942", "0.50964266", "0.5094671", "0.49855223", "0.49736506", "0.49720562", "0.4927294", "0.4900818", "0.48834655", "0.487...
0.44602105
76
given an OU, find all the OUs within that OU...
def get_child_ous(logger, org_client, org_unit): logger.debug("Getting OUs for: %s", org_unit) result = [org_unit] # for this OU, get all the children... args = dict(ParentId=org_unit["Id"]) children = utils.generic_paginator(logger, org_client.list_organizational_units_for_parent, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_accounts_for_ou(logger, options, org_client, path):\n logger.debug(\"Getting accounts for OU: %s\", path)\n org_unit = get_ou_from_path(logger, org_client, path)\n ous = []\n if options.no_recursive:\n ous.append(org_unit)\n else:\n ous.extend(get_child_ous(logger, org_client, ...
[ "0.6812674", "0.67796934", "0.61813617", "0.5930881", "0.58512056", "0.54681545", "0.54233587", "0.53596294", "0.52998245", "0.52364296", "0.51616734", "0.51128006", "0.50904953", "0.50900835", "0.5064042", "0.50519156", "0.50236064", "0.5009377", "0.4984651", "0.49781162", "...
0.6912658
0
given a path, traverse Organizations OUs to locate the required OU...
def get_ou_from_path(logger, org_client, path): logger.debug("Getting OU from path: %s", path) current_ou = org_client.list_roots()["Roots"][0]["Id"] if path == "/": return {"Id":current_ou, "Path":path} for dir_name in path.split("/")[1:]: logger.debug("Getting OU from path: %s, looki...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_accounts_for_ou(logger, options, org_client, path):\n logger.debug(\"Getting accounts for OU: %s\", path)\n org_unit = get_ou_from_path(logger, org_client, path)\n ous = []\n if options.no_recursive:\n ous.append(org_unit)\n else:\n ous.extend(get_child_ous(logger, org_client, ...
[ "0.5943409", "0.5662944", "0.5541912", "0.5307396", "0.52833915", "0.52833915", "0.51416296", "0.51335", "0.5058733", "0.5023612", "0.50106674", "0.4983386", "0.49637613", "0.49609458", "0.49326625", "0.49166146", "0.49147454", "0.49008152", "0.4848601", "0.48095214", "0.4798...
0.7749507
0
given a path, get all the AWS accounts within that part of an Organization...
def get_accounts_for_ou(logger, options, org_client, path): logger.debug("Getting accounts for OU: %s", path) org_unit = get_ou_from_path(logger, org_client, path) ous = [] if options.no_recursive: ous.append(org_unit) else: ous.extend(get_child_ous(logger, org_client, org_unit)) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def organizations(self):\n return self.get('{}/orgs'.format(ApiVersion.A1.value))", "def ls():\n return dynamodb.ls(OrganizationModel)", "async def get_organizations(request: Request):\n redis = request.app.state.redis\n organizations_obj = orjson.loads(await redis.get_key(\"influxdb_organizations\...
[ "0.5892514", "0.5680063", "0.5646794", "0.5550604", "0.5464335", "0.5430682", "0.5372216", "0.5369034", "0.53668135", "0.53542835", "0.5335564", "0.5326624", "0.53066283", "0.5276022", "0.5273535", "0.52497715", "0.5233608", "0.5233608", "0.5214551", "0.5214118", "0.52107763"...
0.63345224
0
Checks globals() and builtins for the existence of the object name (used for StuWareSoftSystems' bootstrap)
def checkObjectInNameSpace(objectName): if objectName is None or not isinstance(objectName, basestring) or objectName == u"": return False if objectName in globals(): return True return objectName in dir(builtins)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isbuiltin(object):\n if inspect.isbuiltin(object):\n return True\n\n return getattr(object, '__module__', None) == 'builtins'", "def is_builtin_name(name):\r\n if name.startswith('__') and name.endswith('__'):\r\n return ALL_LOWER_CASE_RE.match(name[2:-2]) is not None\r\n return False", "...
[ "0.6845686", "0.64684844", "0.64186686", "0.63405824", "0.6296543", "0.6213715", "0.60902375", "0.60629964", "0.60133064", "0.5856874", "0.5762603", "0.57043445", "0.56223327", "0.56172764", "0.55805594", "0.5576068", "0.5568513", "0.5556084", "0.55383843", "0.5527319", "0.55...
0.7423229
0
Pass a string in the format 'x.x.x'. Will check that this MacOSX version is at least that version. The 3rd micro number is optional
def isOSXVersionAtLeast(compareVersion): # type: (basestring) -> bool try: if not Platform.isOSX(): return False def convertVersion(convertString): _os_major = _os_minor = _os_micro = 0 _versionNumbers = [] for versionPart in Str...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_from_version(version: str) -> str:\n version_int = [int(v) for v in version.split(\".\")]\n if version_int[0] not in PipetteModelMajorVersion:\n raise ValueError(f\"Major version {version_int[0]} is not supported.\")\n if version_int[1] not in PipetteModelMinorVersion:\n raise Valu...
[ "0.6574004", "0.6253473", "0.6247122", "0.6238033", "0.6165214", "0.6156912", "0.612077", "0.60846204", "0.60516804", "0.6008613", "0.5996625", "0.5967177", "0.59521145", "0.59322596", "0.5885311", "0.5882469", "0.58820486", "0.5845207", "0.5835244", "0.5812287", "0.580141", ...
0.62811625
1
Detect Intel x86 32bit system
def isIntelX86_32bit(): return String(System.getProperty("os.arch", "null").strip()).toLowerCase(Locale.ROOT) == "x86"
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_32bit(self):\n return self.machine in ['i386', 'i586', 'i686']", "def osarch_is_32_bit():\n return osarch_match(\"32-bit\")", "def osarch_is_ia32():\n return osarch_match(\"ia32\")", "def host_arch_win():\n\n arch = os.environ.get('PROCESSOR_ARCHITECTURE', 'x86')\n\n matchup = {\n 'AMD64...
[ "0.81732696", "0.80353045", "0.7400126", "0.6873196", "0.6867948", "0.6770266", "0.6644437", "0.6488959", "0.6488959", "0.6432496", "0.6342804", "0.63230413", "0.6291553", "0.62735385", "0.6245272", "0.615874", "0.6148934", "0.6148358", "0.613531", "0.5986601", "0.5973497", ...
0.8507626
0
Grabs the MD defaultText font, reduces default size down to below 18, sets UIManager defaults (if runtime extension, will probably error, so I catch and skip)
def setDefaultFonts(): if MD_REF_UI is None: return # If a runtime extension, then this may fail, depending on timing... Just ignore and return... try: myFont = MD_REF.getUI().getFonts().defaultText except: myPrint("B","ERROR trying to call .getUI().getFonts().de...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_default_font(cls):\n if platform.system() == \"Linux\":\n for family in (\"DejaVu Sans\", \"Noto Sans\", \"Nimbus Sans\"):\n if family in tk.font.families():\n logger.debug(\"Setting default font to: '%s'\", family)\n tk.font.nametofon...
[ "0.68280387", "0.6737032", "0.6695929", "0.6610507", "0.64827216", "0.6389932", "0.6196747", "0.6126894", "0.60420203", "0.60152656", "0.59716773", "0.596298", "0.593417", "0.5910025", "0.5883346", "0.58664095", "0.58539915", "0.5838941", "0.58219564", "0.58039767", "0.578717...
0.829493
0
sets up Client Properties for JFileChooser() to behave as required >> Mac only
def setJFileChooserParameters(_jf, lReportOnly=False, lDefaults=False, lPackagesT=None, lApplicationsT=None, lOptionsButton=None, lNewFolderButton=None): myPrint("D", "In ", inspect.currentframe().f_code.co_name, "()") if not Platform.isOSX(): return if not isinstance(_jf, JFileChooser): retur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setFileDialogParameters(lReportOnly=False, lDefaults=False, lSelectDirectories=None, lPackagesT=None):\n\n myPrint(\"D\", \"In \", inspect.currentframe().f_code.co_name, \"()\")\n\n if not Platform.isOSX(): return\n\n _TRUE = \"true\"\n _FALSE = \"false\"\n\n _DIRS_FD = \"app...
[ "0.59659076", "0.52273905", "0.52243555", "0.5196339", "0.51798254", "0.51786554", "0.51282394", "0.5127446", "0.51222116", "0.51085234", "0.5083295", "0.50667393", "0.5033301", "0.5033301", "0.5033301", "0.5008447", "0.5006361", "0.4993501", "0.49912578", "0.49555835", "0.49...
0.60916245
0
sets up System Properties for FileDialog() to behave as required >> Mac only
def setFileDialogParameters(lReportOnly=False, lDefaults=False, lSelectDirectories=None, lPackagesT=None): myPrint("D", "In ", inspect.currentframe().f_code.co_name, "()") if not Platform.isOSX(): return _TRUE = "true" _FALSE = "false" _DIRS_FD = "apple.awt.fileDialogForDirec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _startup_system(self):\n\n self._config_path.set(filedialog.asksaveasfilename())\n self._system = System(self._config_path.get())\n\n self._start_frame.pack_forget()\n self._main_frame.pack()", "def pkg_app_file_chooser(self):\n filename = tk.filedialog.askopenfilename()\n ...
[ "0.6109975", "0.5899527", "0.5769735", "0.55686957", "0.55619633", "0.5373799", "0.5356747", "0.5335496", "0.53288305", "0.5298387", "0.5294953", "0.52298236", "0.5206536", "0.51610196", "0.514091", "0.50889593", "0.5086334", "0.5081264", "0.5057602", "0.50511295", "0.5033079...
0.61366576
0
Returns a Python strftime format string in accordance with MD Preferences for Date Format
def convertMDShortDateFormat_strftimeFormat(lIncludeTime=False, lForceYYMMDDHMS=False): # https://strftime.org _MDFormat = MD_REF.getPreferences().getShortDateFormat() rtnFormat = "%Y-%m-%d" if lForceYYMMDDHMS: lIncludeTime = True else: if _MDFormat == ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def strftime(self, format):\n return \"\"", "def strftime(self, format):\n return \"\"", "def strftime(self, format):\n return \"\"", "def strftime(dt):\n return f\"{dt:%b %d,%Y %-H:%M:%S%z}\"", "def get_strftime(date_obj: dt.datetime) -> str:\n return date_obj.strftime(get_setti...
[ "0.76526", "0.76526", "0.76526", "0.7622349", "0.74858314", "0.7395106", "0.7327035", "0.7324193", "0.7300734", "0.71893567", "0.7129464", "0.7052781", "0.7028228", "0.7019862", "0.70110154", "0.693482", "0.692643", "0.683672", "0.6810442", "0.6744643", "0.67248136", "0.668...
0.742588
5
This triggers MD to firePreferencesUpdated().... Hopefully refreshing Home Screen Views too
def fireMDPreferencesUpdated(): myPrint("DB", "In ", inspect.currentframe().f_code.co_name, "()" ) class FPSRunnable(Runnable): def __init__(self): pass def run(self): myPrint("DB",".. Inside FPSRunnable() - calling firePreferencesUpdated()...") ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def refresh_screen(self):", "def preferencesChanged(self):\n # do nothing\n pass", "def on_refresh(self):\n pass", "def updateSettingsUI(self):\n\n pass", "def applyPrefs (self):\r\n self.storyPanel.eachWidget(lambda w: w.applyPrefs())\r\n self.storyPanel.Refresh()...
[ "0.70166314", "0.67420226", "0.67126137", "0.6558181", "0.6547368", "0.6456297", "0.62285334", "0.61892396", "0.6178164", "0.6083877", "0.59968984", "0.59863025", "0.5978254", "0.5940049", "0.5935096", "0.5920283", "0.59084743", "0.58467805", "0.58467805", "0.58374125", "0.58...
0.7383542
0
Searches Moneydance for a specific extension loaded
def find_feature_module(theModule): # type: (str) -> bool fms = MD_REF.getLoadedModules() for fm in fms: if fm.getIDStr().lower() == theModule: myPrint("DB", "Found extension: %s" %(theModule)) return fm return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_loaded_extensions():\n raise NotImplementedError()", "def load_extensions(self):\n extension_module_name = f\"{utils.get_project_name()}.cogs\"\n for extension in CONF.LOADED_EXTENSIONS:\n try:\n self.load_extension(extension_module_name + \".\" + extension)\n ...
[ "0.6085889", "0.60732716", "0.60676134", "0.6062981", "0.5867079", "0.5847451", "0.58071655", "0.57089275", "0.56770766", "0.5671906", "0.56402373", "0.5582146", "0.5570287", "0.5542473", "0.5539861", "0.5514397", "0.549309", "0.54413986", "0.5440934", "0.5427723", "0.5409136...
0.5237927
40
Will detect and then run the codeblock on the EDT
def genericSwingEDTRunner(ifOffEDTThenRunNowAndWait, ifOnEDTThenRunNowAndWait, codeblock, *args): isOnEDT = SwingUtilities.isEventDispatchThread() # myPrint("DB", "** In .genericSwingEDTRunner(), ifOffEDTThenRunNowAndWait: '%s', ifOnEDTThenRunNowAndWait: '%s', codeblock: '%s', args: '%s'" %(ifOffEDTThe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def run(self):\n self.window.mainloop()", "def takeControl(self):\n mainloop()", "def takeControl(self):\n mainloop()", "def exec(self):\n if self._root.master is None:\n self._root.mainloop()", "def run(self):\n self.ident = threading.current_thread().ident\n ...
[ "0.6536498", "0.64465624", "0.64465624", "0.6426398", "0.63144535", "0.61656505", "0.61306715", "0.60988885", "0.6066413", "0.6066413", "0.6001287", "0.59971917", "0.59842736", "0.5967664", "0.59582716", "0.5954346", "0.5944975", "0.59409404", "0.5900608", "0.58864576", "0.58...
0.6598361
0
Will run the codeblock on a new Thread
def genericThreadRunner(daemon, codeblock, *args): # myPrint("DB", "** In .genericThreadRunner(), codeblock: '%s', args: '%s'" %(codeblock, args)) myPrint("DB", "** In .genericThreadRunner(), codeblock: <codeblock>, args: <args>") class GenericThreadRunner(Runnable): def __init__(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Run(self):\n self.RunAsync().join()", "def run(self):\n self.ident = threading.current_thread().ident\n self.ready.set()\n self.exec_()", "def process_thread(self):", "def run(self):\n self.thread = threading.Thread(target=self._main)\n self.thread.start()\n s...
[ "0.6713125", "0.6663096", "0.6575492", "0.6550865", "0.654327", "0.64968747", "0.6474789", "0.6474789", "0.6473518", "0.64723456", "0.64446056", "0.6290869", "0.62402534", "0.62397003", "0.61925733", "0.6187641", "0.6182442", "0.6176061", "0.61667424", "0.6138981", "0.6132365...
0.6160486
19
read table data from csv file
def read_csv(filename, delimiter=','): data = [] try: with open(filename, 'r') as csvfile: reader = csv.DictReader(csvfile, delimiter=delimiter) try: keys = reader.fieldnames for row in reader: data.append(row) excep...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_csv():", "def loadCSV(input_file):", "def get_data(self, csv_file):\n pass", "def read_csv_file(self):\n pass", "def read_csv_as_table(csv_input_file_name, skip_first_line=False):\n output = []\n with open(csv_input_file_name, 'r') as fin:\n csv_content = csv.reader(fin,...
[ "0.8095777", "0.7471686", "0.7406693", "0.7337046", "0.7332259", "0.7143274", "0.69447905", "0.69225657", "0.68924946", "0.68774915", "0.6847433", "0.6822053", "0.6807061", "0.6763969", "0.6755038", "0.675341", "0.6733731", "0.67244375", "0.67158145", "0.67142403", "0.6712804...
0.0
-1
Generate a side by side plot of expected and predicted
def plotExpectedPredicted(input, output, expected, label, fig, axes): n_batches = len(input) for batch in range(0, n_batches): input_2d = np.clip(np.reshape(input[batch], (28, 28)), 0, 1)#.astype(np.uint8) expected_2d = np.clip(np.reshape(expected[batch], (28, 28)), 0, 1)#.astype(np.uint8) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def plot_result(data, gt_y, pred_y):\n assert data.shape[0] == gt_y.shape[0]\n assert data.shape[0] == pred_y.shape[0]\n\n plt.figure()\n\n plt.subplot(1, 2, 1)\n plt.title('Ground Truth', fontsize=18)\n\n for idx in range(data.shape[0]):\n if gt_y[idx] == 0:\n ...
[ "0.7095982", "0.7095982", "0.6836742", "0.6829876", "0.6635602", "0.6579234", "0.6553575", "0.65293133", "0.6511318", "0.64920896", "0.6491192", "0.6463729", "0.6444954", "0.64443487", "0.6430439", "0.6392063", "0.6367903", "0.635039", "0.6348396", "0.63420445", "0.6334286", ...
0.6863375
2
Missing associated documentation comment in .proto file.
def Profile(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_doc(self):\n raise NotImplementedError()", "def inherits_doc():\n pass", "def documentation_only():\n pass", "def DocString():\n return", "def test_module_doc(self):\n self.assertTrue(len(base.__doc__) > 0)", "def pythondoc(self, irc, msg, args, num, req):\n ...
[ "0.6347405", "0.62316597", "0.62253404", "0.6107218", "0.60712713", "0.6055634", "0.60191995", "0.5996731", "0.597168", "0.59466904", "0.59434444", "0.59335643", "0.5919223", "0.5902901", "0.58987755", "0.5864407", "0.5856765", "0.5836615", "0.57913834", "0.57687634", "0.5763...
0.0
-1
Missing associated documentation comment in .proto file.
def Binary(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_doc(self):\n raise NotImplementedError()", "def inherits_doc():\n pass", "def documentation_only():\n pass", "def DocString():\n return", "def test_module_doc(self):\n self.assertTrue(len(base.__doc__) > 0)", "def pythondoc(self, irc, msg, args, num, req):\n ...
[ "0.6348721", "0.6232983", "0.6227791", "0.6107919", "0.6073252", "0.6056996", "0.60199225", "0.5997295", "0.5973073", "0.59475285", "0.59426475", "0.59348774", "0.59195995", "0.59041727", "0.5899058", "0.5865414", "0.5857725", "0.5836395", "0.57917976", "0.57693964", "0.57656...
0.0
-1
Missing associated documentation comment in .proto file.
def Dump(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_doc(self):\n raise NotImplementedError()", "def inherits_doc():\n pass", "def documentation_only():\n pass", "def DocString():\n return", "def test_module_doc(self):\n self.assertTrue(len(base.__doc__) > 0)", "def pythondoc(self, irc, msg, args, num, req):\n ...
[ "0.6347405", "0.62316597", "0.62253404", "0.6107218", "0.60712713", "0.6055634", "0.60191995", "0.5996731", "0.597168", "0.59466904", "0.59434444", "0.59335643", "0.5919223", "0.5902901", "0.58987755", "0.5864407", "0.5856765", "0.5836615", "0.57913834", "0.57687634", "0.5763...
0.0
-1
Missing associated documentation comment in .proto file.
def SetLogLevel(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_doc(self):\n raise NotImplementedError()", "def inherits_doc():\n pass", "def documentation_only():\n pass", "def DocString():\n return", "def test_module_doc(self):\n self.assertTrue(len(base.__doc__) > 0)", "def pythondoc(self, irc, msg, args, num, req):\n ...
[ "0.6348721", "0.6232983", "0.6227791", "0.6107919", "0.6073252", "0.6056996", "0.60199225", "0.5997295", "0.5973073", "0.59475285", "0.59426475", "0.59348774", "0.59195995", "0.59041727", "0.5899058", "0.5865414", "0.5857725", "0.5836395", "0.57917976", "0.57693964", "0.57656...
0.0
-1
Missing associated documentation comment in .proto file.
def GetDumpV2Template(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_doc(self):\n raise NotImplementedError()", "def inherits_doc():\n pass", "def documentation_only():\n pass", "def DocString():\n return", "def test_module_doc(self):\n self.assertTrue(len(base.__doc__) > 0)", "def pythondoc(self, irc, msg, args, num, req):\n ...
[ "0.6347405", "0.62316597", "0.62253404", "0.6107218", "0.60712713", "0.6055634", "0.60191995", "0.5996731", "0.597168", "0.59466904", "0.59434444", "0.59335643", "0.5919223", "0.5902901", "0.58987755", "0.5864407", "0.5856765", "0.5836615", "0.57913834", "0.57687634", "0.5763...
0.0
-1
Missing associated documentation comment in .proto file.
def DumpV2(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_doc(self):\n raise NotImplementedError()", "def inherits_doc():\n pass", "def documentation_only():\n pass", "def DocString():\n return", "def test_module_doc(self):\n self.assertTrue(len(base.__doc__) > 0)", "def pythondoc(self, irc, msg, args, num, req):\n ...
[ "0.6348721", "0.6232983", "0.6227791", "0.6107919", "0.6073252", "0.6056996", "0.60199225", "0.5997295", "0.5973073", "0.59475285", "0.59426475", "0.59348774", "0.59195995", "0.59041727", "0.5899058", "0.5865414", "0.5857725", "0.5836395", "0.57917976", "0.57693964", "0.57656...
0.0
-1
depthfirst search, mark visited in place O(n), O(1)
def maxAreaOfIsland(self, grid): def helper(x, y): if x < 0 or x >= len(grid) or y < 0 or y >= len(grid[0]) or grid[x][y] == 'X': return 0 if grid[x][y] == 1: grid[x][y] = 'X' return 1 + helper(x - 1, y) + helper(x + 1, y) + helper(x, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def depth_first_search(problem):\r\n \"*** YOUR CODE HERE ***\"\r\n fringe = []\r\n path = set()\r\n final = []\r\n acts = dict()\r\n state = problem.get_start_state()\r\n fringe.append(state)\r\n\r\n while(len(fringe) > 0):\r\n state = fringe.pop()\r\n path.add(state)\r\n ...
[ "0.7023242", "0.69994956", "0.6996934", "0.69497895", "0.687699", "0.68541056", "0.6832711", "0.6771857", "0.67687964", "0.67646325", "0.6733643", "0.6710491", "0.66814333", "0.6609042", "0.6607835", "0.6601756", "0.658722", "0.656834", "0.65571326", "0.6551692", "0.65476173"...
0.0
-1
Initializes hidden state vector
def init_hidden(self, batch_size): weight = next(self.parameters()).data if self.train_on_gpu: if self.rnn_type == 'LSTM': hidden = (weight.new(self.n_layers, batch_size, self.hidden_dim).zero_().cuda(), weight.ne...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialize_hidden_state(self):\n initializer = tf.keras.initializers.Zeros()\n rnnten = initializer(shape=(self.batch, self.units))\n return rnnten", "def initialize_hidden_state(self):\n return tf.zeros(shape=(self.batch_size, self.enc_units))", "def init_state(self) -> None:\n...
[ "0.78422564", "0.76011795", "0.75708747", "0.7545913", "0.7402229", "0.7300602", "0.7254794", "0.69414794", "0.69414794", "0.69055253", "0.6872069", "0.68429536", "0.6835688", "0.67922854", "0.6773605", "0.6763473", "0.6744704", "0.67300737", "0.667231", "0.66509145", "0.6650...
0.0
-1
Prepares DataLoaders for 'rnn' generation method
def prepare_dataloaders(data, seq_len, batch_size=64, validation_set=False, validation_size=0.1, random_seed=42): vocab = set(data) token2id = {k: v for v, k in enumerate(vocab)} id2token ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_each_loader(data_path, batch_size, trn_negnum, shuffle=True, num_workers=0):\n \n dataset = ML_Dataset(data_path, trn_negnum)\n \n if data_path.endswith('trn') == True:\n collate = dataset.train_collate\n else:\n collate = test_collate\n\n data_loader = data.DataLoader(datas...
[ "0.68454164", "0.6782941", "0.67057943", "0.66403675", "0.65843046", "0.65607405", "0.65350705", "0.65200335", "0.6494558", "0.6458471", "0.6375916", "0.6352485", "0.63391966", "0.6334616", "0.6328361", "0.6314732", "0.6312712", "0.62332684", "0.62095624", "0.6204455", "0.620...
0.0
-1
Necessary initialisations for command line arguments
def initialise(): # Logfile for logging log_filename = alib.log_filename_init() if log_filename is None: print("\nError: Failed to initialise Log File Name. aborting\n") return alib.FAIL_GENERIC parser = argparse.ArgumentParser(description=""" Example command lines: -d DEBUG -...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialise(self, args, environ):", "def _setup_arguments(self):\n\n self._parser.add_argument(\"-a\", \"--area-interest\",\n help=\"Area of interest to process, \"\n \"shapefile path\", required=True)\n # FUTURE VERSIONS\n ...
[ "0.74415267", "0.7358454", "0.7253338", "0.72039276", "0.7177294", "0.71553427", "0.71082044", "0.70940363", "0.7049619", "0.6945425", "0.6943998", "0.69109726", "0.687143", "0.67964226", "0.6782141", "0.6766867", "0.67629826", "0.6739199", "0.67152214", "0.67124844", "0.6708...
0.6216561
89
This program tests that the classification document, the Sql Server DB and Redshift DB all agree with each other
def main(): args, dummy_l_log_filename_s = initialise() # -- Initialise if not alib.init_app(args): return alib.FAIL_GENERIC work_dir = alib.load_dir(args) print('Loading files from {}'.format(work_dir['l_c_dir'])) work_files = alib.load_files(work_dir, args['quick_debug']) # ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_snippet_1(self):\n\n text = \"Asimov also wrote mysteries and fantasy, as well as much nonfiction. Most of his popular science books explain concepts in a historical way, going as far back as possible to a time when the science in question was at its simplest stage. Examples include Guide to Scienc...
[ "0.61581814", "0.60022753", "0.5817165", "0.5571238", "0.55539113", "0.54944795", "0.54687375", "0.5454587", "0.5425017", "0.5419371", "0.54093176", "0.54064757", "0.53786546", "0.5376907", "0.5369085", "0.53491753", "0.53406453", "0.53396004", "0.5316651", "0.5315632", "0.52...
0.0
-1
Implement your canvas drawing logic here, returning False will stop the rendering, returning True will continue it
def draw(self, canvas) -> bool: return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def draw (self, screen):\n drew = bool(self.draw_fn(self, screen, self.dirty))\n self.dirty = False\n return drew", "def on_draw(self, widget, cr):\n #print \"starting to draw\"\n if self.double_buffer is not None:\n self.draw_tiles()\n cr.set_source_surfa...
[ "0.7068976", "0.70053196", "0.6794968", "0.67545444", "0.66375184", "0.66362685", "0.65746", "0.6460818", "0.6460818", "0.6460818", "0.6460818", "0.64464664", "0.64366764", "0.6423051", "0.63904214", "0.6366687", "0.6364581", "0.63468754", "0.63468754", "0.63468754", "0.62978...
0.8466848
0
Implement your canvas animation drawing logic here, returning False will stop the rendering, returning True will continue it
def draw_animation(self, canvas, animation_tick) -> bool: return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def draw(self, canvas) -> bool:\n return False", "def draw(self):\r\n if not self.stopped:\r\n super().draw()\r\n self.next_frame()", "def on_draw(self, widget, cr):\n #print \"starting to draw\"\n if self.double_buffer is not None:\n self.draw_tiles...
[ "0.78179634", "0.68488324", "0.6405945", "0.6315539", "0.6288791", "0.6209565", "0.6140665", "0.6124815", "0.6104606", "0.60049677", "0.5990784", "0.59893525", "0.5976392", "0.5976392", "0.5976392", "0.5976392", "0.59686214", "0.5960046", "0.5932858", "0.5920046", "0.59116364...
0.8034474
0
Implement your state changing logic here, for example, when a mode is changed
def refresh(self, new_content): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _on_mode_change(self, event):\n mode = event.mode\n if mode == Mode.PAN_ZOOM:\n self.panzoom_button.setChecked(True)\n elif mode == Mode.PICKER:\n self.pick_button.setChecked(True)\n elif mode == Mode.PAINT:\n self.paint_button.setChecked(True)\n ...
[ "0.73479813", "0.7155198", "0.7146986", "0.69878197", "0.696421", "0.6945815", "0.69330287", "0.6821973", "0.67742443", "0.6771602", "0.67632943", "0.6735988", "0.67205477", "0.67016745", "0.6662783", "0.66435605", "0.6638601", "0.6633751", "0.6633751", "0.66132015", "0.66063...
0.0
-1
Mouse move events will be sent here whenever they change to update the UI if neccesary
def mouse_move(self, pos): if (self.setup_type == "position"): x, y = pos self.canvas.move(x, y)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def on_mouse_move(self, event: PointEvent):\n self.x = event.x\n self.y = event.y\n self.handle_mouse(self.x, self.y)", "def mouse_move_callback(self, event):\n # TODO drag and drop figuriek\n print(\"moving at \", event.x + self.offset_x, event.y + self.offset_y)", "def _onm...
[ "0.7725639", "0.75353", "0.7477627", "0.7465811", "0.7323981", "0.72936875", "0.7253632", "0.725092", "0.71977973", "0.71450245", "0.71029884", "0.71029884", "0.70396215", "0.7001727", "0.6984642", "0.6945438", "0.69439787", "0.6930062", "0.69186425", "0.6899531", "0.6893881"...
0.6727378
30
Responds to click or dwell actions
def click(self, pos): # Confirm the setup if (self.setup_type != None): self.start_setup(None)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def click(self):\r\n pass", "def on_dclick ( self, object ):\n pass", "def on_click(self) -> None:\n pass", "def click(self):\n self.dispatch['elementClick'] = self.clickJsFnc", "def on_click ( self, object ):\n pass", "def interact(self):\r\n pass", "def _do_actio...
[ "0.7291359", "0.66233146", "0.660782", "0.65884537", "0.63273966", "0.62724835", "0.6255575", "0.6255575", "0.62212914", "0.61557615", "0.6118316", "0.61125875", "0.6065794", "0.6064975", "0.6038785", "0.599528", "0.59859943", "0.5957505", "0.59489393", "0.59387773", "0.59387...
0.0
-1
Respond to theme load ins here
def load_theme_values(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def on_load_theme (self):\n\n\t\tif self.has_started:\n\t\t\tself.init_buffers()\n\t\t\tself.redraw_background()\n\t\t\tself.redraw_foreground()", "def on_load(self):\n pass", "def on_load(self):\n pass", "def onStartup(event):\n\n plugins = getPlugins()\n\n for themeDirectory in iterDire...
[ "0.68556285", "0.66520184", "0.66520184", "0.6610389", "0.64057696", "0.62862283", "0.61794144", "0.6151126", "0.6137831", "0.59524107", "0.59130126", "0.59130126", "0.5907942", "0.58921796", "0.58286834", "0.58206403", "0.57867295", "0.5769557", "0.576859", "0.5764957", "0.5...
0.6718465
1
Starts a setup mode that is used for moving, resizing and other various changes that the user might setup
def start_setup(self, setup_type): # Persist the user preferences when we end our setup if (self.setup_type != "" and not setup_type): self.setup_type = setup_type rect = self.canvas.get_rect() self.x = int(rect.x) self.y = int(rect.y) self.wi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setup():\n setFormat()\n setFilename()\n setScreenMode()", "def setup_mode():\n status_label.color = WHITE\n status_label.text = \"-SET-\"\n\n ave_label.color = BLACK # Turn off average label and value display\n ave_value.color = BLACK\n\n max_value.text = str(MAX_RANGE_F) # Display...
[ "0.6800144", "0.6734263", "0.66898155", "0.66412646", "0.6498546", "0.633072", "0.62841946", "0.6278032", "0.6212285", "0.6206775", "0.62048006", "0.6197723", "0.61908454", "0.6190276", "0.6158729", "0.6156555", "0.61511356", "0.6121974", "0.6118286", "0.6098591", "0.6072834"...
0.7203417
0
Extract bbox info from file name.
def get_bbox(fname): fname = fname.split('_') # fname -> list i = fname.index('bbox') return map(float, fname[i+1:i+5]) # m
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_bbox(fname):\r\n fname = fname.split('_') # fname -> list\r\n i = fname.index('bbox')\r\n return list(map(float, fname[i+1:i+5])) # m\r", "def get_bbox(fname):\r\n\r\n fname = fname.split('_') # fname -> list\r\n i = fname.index('bbox')\r\n return list(map(float, fname[i+1:i+5])) # ...
[ "0.7414556", "0.73649496", "0.71413463", "0.6696102", "0.62867755", "0.6165321", "0.6104715", "0.59432495", "0.59432495", "0.59264004", "0.59072345", "0.59054977", "0.5792332", "0.5791462", "0.577605", "0.56787", "0.5672523", "0.5659785", "0.5647485", "0.56438744", "0.5634939...
0.7516535
0
Extract EPSG number from file name.
def get_proj(fname): fname = fname.split('_') # fname -> list i = fname.index('epsg') return fname[i+1]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_proj(fname):\r\n\r\n fname = fname.split('_') # fname -> list\r\n i = fname.index('epsg')\r\n return fname[i+1]", "def _epsg(self):\n info = self._info['coordinateSystem']['wkt'].rsplit('\"EPSG\",', 1)[-1]\n return int(re.findall(r\"\\d+\", info)[0])", "def get_version_filename(...
[ "0.63735604", "0.62062746", "0.6061637", "0.58868164", "0.5818382", "0.5740342", "0.5669474", "0.5658069", "0.5641101", "0.5620341", "0.5620254", "0.56191593", "0.56164837", "0.56108224", "0.5606117", "0.55956405", "0.5589816", "0.558568", "0.557769", "0.5521931", "0.55009794...
0.6381265
1
How many tiles per row and col > (ny,nx).
def get_num_tiles(grid_bbox, dxy): xmin, xmax, ymin, ymax = grid_bbox return (int(np.abs(ymax-ymin)/dxy), int(np.abs(xmax-xmin)/dxy))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def num_tiles(self):\n return self.num_row_tiles * self.num_col_tiles", "def get_num_tiles(rows, cols, row_tile_size, col_tile_size):\n num_row_tiles = math.ceil(rows / row_tile_size)\n num_col_tiles = math.ceil(cols / col_tile_size)\n return num_row_tiles, num_col_tiles", "def getNumTiles(self):\n ...
[ "0.83870953", "0.82873094", "0.8044176", "0.80318546", "0.7763642", "0.7731704", "0.75307924", "0.7150116", "0.70772505", "0.7041915", "0.6943248", "0.6927167", "0.6907514", "0.68812686", "0.6836811", "0.67657024", "0.6740372", "0.6629903", "0.6573289", "0.65704787", "0.65530...
0.77562994
5
Return all 2d '/variable' names in the HDF5.
def get_grid_names(fname): with h5py.File(fname, 'r') as f: vnames = [k for k in f.keys() if f[k].ndim == 2] return vnames
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def data_variable_names(self):\n data_names = []\n mesh = self.mesh_names()\n prefix = mesh[0]+'_'\n for vname in self.nc.variables.keys():\n if vname.startswith(prefix):\n if self.nc.dimensions.has_key(vname):\n continue\n if ...
[ "0.6690074", "0.62676114", "0.61328524", "0.60728717", "0.6032376", "0.5962701", "0.5961076", "0.5934028", "0.5920969", "0.5817062", "0.57885367", "0.57675433", "0.57535744", "0.5749644", "0.5723075", "0.57072866", "0.56532377", "0.56390136", "0.5622561", "0.56167597", "0.558...
0.6843741
0
busy wait for robot completion
def waitrobot(robot): while not robot.GetController().IsDone(): time.sleep(0.01)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def busyWait(self):\n time.sleep(0.0)", "def waitForCompletion(self):\n\n while(json.loads(self.robot.device())['state']!=0):\n time.sleep(0.1)\n continue\n\n return", "def wait(self):\n time.sleep(0.010)", "def wait(self):\n pass", "def wait(self):\...
[ "0.7729015", "0.7684526", "0.76390046", "0.7526746", "0.7526746", "0.7480899", "0.7480899", "0.7480899", "0.7480899", "0.7460632", "0.7429611", "0.7353933", "0.73518384", "0.7336683", "0.7308061", "0.7302214", "0.72688043", "0.7262008", "0.7262008", "0.72150105", "0.7173207",...
0.8239064
8
Test that initializing a Matern1/2 kernel with 0 lengthscale raises an exception
def test_matern_zero_lengthscale(matern): with pytest.raises(ValueError) as exp: matern(lengthscale=0.0, variance=1.0, output_dim=1) assert exp.value.args[0].find("lengthscale must be positive.") >= 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def testZeroInput(self):\n nb.rescale_length(2.0)\n nb.rescale_length(0)\n self.assertEqual(2.0, nb.rscale)", "def testZeroInput(self):\n self.assertRaises(TypeError, nb.rscale,)", "def testKernelsNotSpecified(self):\n with self.assertRaisesRegexp(ValueError, \"`kernel_shape` can...
[ "0.6572343", "0.6536193", "0.63661206", "0.6360225", "0.6295031", "0.6194598", "0.6051746", "0.5993452", "0.59858924", "0.59765357", "0.59129274", "0.5900474", "0.5889973", "0.58620816", "0.5820467", "0.58139074", "0.5799146", "0.5781969", "0.57249826", "0.57009274", "0.56885...
0.6592899
0
Test that initializing a Matern1/2 kernel with 0 variance raises an exception
def test_matern12_zero_variance(matern): with pytest.raises(ValueError) as exp: matern(lengthscale=1.0, variance=0.0, output_dim=1) assert exp.value.args[0].find("variance must be positive.") >= 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_gauss_kernel():\n\n gauss = gauss_kernel(2, 5)\n\n assert gauss.shape == (5, 5)\n assert gauss[2, 2] == 0.039788735772973836", "def test_nonpositive_nu_raises_exception(nu):\n with pytest.raises(ValueError):\n kernels.Matern(input_dim=1, nu=nu)", "def testKernelsNotSpecified(self):\...
[ "0.64694107", "0.64663404", "0.63284683", "0.6302467", "0.60142285", "0.59726274", "0.5947721", "0.589947", "0.5893144", "0.589087", "0.5890487", "0.581995", "0.5760517", "0.57496685", "0.57280266", "0.5705864", "0.56650275", "0.5636754", "0.56325996", "0.56217444", "0.560097...
0.6615188
0
Test that the assertion fires for a negative delta time
def test_to_delta_time_positive_difference(with_tf_random_seed, np_time_points): time_points = tf.constant(np_time_points, dtype=default_float()) with pytest.raises(InvalidArgumentError) as exp: to_delta_time(time_points) assert exp.value.message.find("Condition x >= y") >= 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_timeout_elapsed_no_exception(self):\n deadline = Deadline(-MS)\n timeout = deadline.timeout(raise_if_elapsed=False)\n self.assertGreater(timeout, -2 * MS)\n self.assertLess(timeout, -MS)", "def test_negative_timedelta(self):\n @converters.wrap\n def inner_test(p...
[ "0.7007831", "0.6637345", "0.6576894", "0.6474647", "0.64391077", "0.6374031", "0.6313927", "0.6297262", "0.62733597", "0.6259941", "0.62490773", "0.62064755", "0.62022203", "0.6191", "0.6171475", "0.61501443", "0.610897", "0.6103212", "0.6097491", "0.609512", "0.6081113", ...
0.6970346
1
Constructor. Any message fields that are implicitly/explicitly set to None will be assigned a default value. The recommend use is keyword arguments as this is more robust to future message changes. You cannot mix inorder arguments and keyword arguments.
def __init__(self, *args, **kwds): if args or kwds: super(MoveGroupActionGoal, self).__init__(*args, **kwds) #message fields cannot be None, assign default values for those that are if self.header is None: self.header = std_msgs.msg.Header() if self.goal_id is None: self.goal...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, *args, **kwds):\n if args or kwds:\n super(KomodoSpeechRecCommand, self).__init__(*args, **kwds)\n #message fields cannot be None, assign default values for those that are\n if self.header is None:\n self.header = std_msgs.msg.Header()\n if self.cmd is None:\n ...
[ "0.77939296", "0.7720264", "0.7720264", "0.76866186", "0.7626193", "0.756387", "0.74395823", "0.7416946", "0.7308225", "0.72806025", "0.72379386", "0.72272825", "0.7224187", "0.7224187", "0.7218873", "0.7211484", "0.7211484", "0.7211484", "0.7211484", "0.7211484", "0.7211484"...
0.73519075
8
serialize message into buffer
def serialize(self, buff): try: _x = self buff.write(_get_struct_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) _x = self.header.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.writ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def serialize(self, buff):\n try:\n _x = self\n buff.write(_struct_2d2q14dq.pack(_x.tcp, _x.ori, _x.zone, _x.vacuum, _x.workx, _x.worky, _x.workz, _x.workq0, _x.workqx, _x.workqy, _x.workqz, _x.toolx, _x.tooly, _x.toolz, _x.toolq0, _x.toolqx, _x.toolqy, _x.toolqz, _x.ret))\n _x = self.msg\n ...
[ "0.6972838", "0.6802016", "0.6796291", "0.67317253", "0.66948694", "0.66847515", "0.6658851", "0.6626311", "0.66227144", "0.6618303", "0.6607444", "0.65361035", "0.6529462", "0.65220654", "0.64863104", "0.6467052", "0.64530367", "0.6438432", "0.6427743", "0.6426063", "0.63947...
0.0
-1
unpack serialized message in str into this message instance
def deserialize(self, str): try: if self.header is None: self.header = std_msgs.msg.Header() if self.goal_id is None: self.goal_id = actionlib_msgs.msg.GoalID() if self.goal is None: self.goal = moveit_msgs.msg.MoveGroupGoal() end = 0 _x = self start = end...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def deserialize(self, str):\n try:\n end = 0\n _x = self\n start = end\n end += 152\n (_x.tcp, _x.ori, _x.zone, _x.vacuum, _x.workx, _x.worky, _x.workz, _x.workq0, _x.workqx, _x.workqy, _x.workqz, _x.toolx, _x.tooly, _x.toolz, _x.toolq0, _x.toolqx, _x.toolqy, _x.toolqz, _x.ret,) = _stru...
[ "0.76323575", "0.7464221", "0.73207736", "0.7303699", "0.72687525", "0.7223702", "0.72171384", "0.71758324", "0.7169619", "0.7095711", "0.7095332", "0.70419973", "0.70292974", "0.6962802", "0.6956721", "0.69556004", "0.6943546", "0.6941993", "0.6941265", "0.69108033", "0.6894...
0.6215644
92
serialize message with numpy array types into buffer
def serialize_numpy(self, buff, numpy): try: _x = self buff.write(_get_struct_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) _x = self.header.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def serialize_numpy(self, buff, numpy):\n try:\n pass\n except struct.error as se: self._check_types(se)\n except TypeError as te: self._check_types(te)", "def serialize_numpy(self, buff, numpy):\n try:\n _x = self\n buff.write(_struct_2d2q14dq.pack(_x.tcp, _x.ori, _x.zone, _x.vacuum, ...
[ "0.7994329", "0.7972612", "0.7893365", "0.785495", "0.7740611", "0.7677824", "0.7657543", "0.7626826", "0.75874037", "0.7565361", "0.75626636", "0.75620574", "0.7558187", "0.75431186", "0.7534563", "0.7527763", "0.75262064", "0.75172293", "0.75110817", "0.749996", "0.7497972"...
0.6807753
95
unpack serialized message in str into this message instance using numpy for array types
def deserialize_numpy(self, str, numpy): try: if self.header is None: self.header = std_msgs.msg.Header() if self.goal_id is None: self.goal_id = actionlib_msgs.msg.GoalID() if self.goal is None: self.goal = moveit_msgs.msg.MoveGroupGoal() end = 0 _x = self ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def deserialize_numpy(self, str, numpy):\n try:\n end = 0\n _x = self\n start = end\n end += 152\n (_x.tcp, _x.ori, _x.zone, _x.vacuum, _x.workx, _x.worky, _x.workz, _x.workq0, _x.workqx, _x.workqy, _x.workqz, _x.toolx, _x.tooly, _x.toolz, _x.toolq0, _x.toolqx, _x.toolqy, _x.toolqz, _x....
[ "0.8090085", "0.79770607", "0.7917897", "0.7906423", "0.7893816", "0.78317606", "0.78120494", "0.7810609", "0.7784728", "0.77594984", "0.7740543", "0.77159595", "0.77151734", "0.7697443", "0.7693122", "0.768625", "0.76731443", "0.763944", "0.7637318", "0.7629651", "0.7625018"...
0.68092334
90
Compute the log function of the pdf for a fixed value on the support.
def log_pdf_at_x(x): return lambda point: gs.log( self.information_manifold.point_to_pdf(point)(x) )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def logPdf(self,x):\n logPdf = np.log(self.pdf(x))\n return logPdf", "def logPdf(self,x):\n logPdf = np.log(self.pdf(x))\n return logPdf", "def log_pdf(self, x):\n if x < 0:\n raise Exception(\"input value x can't be a negative value!\")\n\n if self.is_fit:\n if ...
[ "0.808809", "0.808809", "0.7765762", "0.767868", "0.7636893", "0.74008185", "0.7215648", "0.7135841", "0.7101646", "0.7030553", "0.6977651", "0.6970404", "0.6965355", "0.6961038", "0.6950404", "0.6910325", "0.6866383", "0.68497586", "0.68354607", "0.6822285", "0.6806993", "...
0.7301884
6
Compute the derivative of the logpdf with respect to the parameters.
def log_pdf_derivative(x): return gs.autodiff.jacobian(log_pdf_at_x(x))(base_point)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def log_pdf_derivative_squared(x):\n dlog = log_pdf_derivative(x)\n return gs.einsum(\"...i, ...j -> ...ij\", dlog, dlog)", "def logpdf(self, x):\n if self.transform is not None:\n x = self.transform(x) \n return (-self.alpha-1)*np.log(x) - (self.beta/float(x)...
[ "0.77660567", "0.70519257", "0.6876588", "0.6850686", "0.67922556", "0.677512", "0.67627126", "0.67627126", "0.6756322", "0.67217326", "0.67073756", "0.65952337", "0.6584878", "0.6568949", "0.65437335", "0.6536892", "0.65261656", "0.65239733", "0.651334", "0.6512677", "0.6508...
0.82203406
0
Compute the square (in matrix terms) of dlog. This is the variable whose expectance is the FisherRao information.
def log_pdf_derivative_squared(x): dlog = log_pdf_derivative(x) return gs.einsum("...i, ...j -> ...ij", dlog, dlog)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def logdim():\n dim = Real(\"yolo4\", \"reciprocal\", 1.0, 10.0, shape=(3, 2))\n return dim", "def dloglam(self):\n # This number was determined using the resolution and sampling quoted on the FIRE website\n R = 6000.0 * 2.7\n dloglam = 1.0 / R / np.log(10.0)\n return dloglam", ...
[ "0.63612115", "0.63412535", "0.6210124", "0.6097916", "0.60911155", "0.60809803", "0.60428435", "0.60420275", "0.6025387", "0.601383", "0.6008682", "0.59616804", "0.5944786", "0.5878604", "0.5871771", "0.5864707", "0.5863798", "0.58423436", "0.5829568", "0.5821031", "0.581717...
0.6198977
3
r"""Compute the derivative of the innerproduct matrix. Compute the derivative of the innerproduct matrix of the Fisher information metric at the tangent space at base point.
def inner_product_derivative_matrix(self, base_point): def pdf(x): """Compute pdf at a fixed point on the support. Parameters ---------- x : float, shape (,) Point on the support of the distribution """ return lambda point...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def integrability_tensor_derivative(\n self,\n horizontal_vec_x,\n horizontal_vec_y,\n nabla_x_y,\n tangent_vec_e,\n nabla_x_e,\n base_point,\n ):\n raise NotImplementedError", "def derivatives(x_p, y_p):\r\n # set up the matrix equation\r\n n = x_...
[ "0.65636075", "0.6383123", "0.6320185", "0.6274132", "0.62254035", "0.6178101", "0.6175668", "0.6127627", "0.61223304", "0.61122054", "0.61108375", "0.60562176", "0.60325277", "0.6020855", "0.6019261", "0.6014277", "0.60129786", "0.60129786", "0.5989726", "0.59852016", "0.598...
0.6529994
1
Compute pdf at a fixed point on the support.
def pdf(x): return lambda point: self.information_manifold.point_to_pdf(point)(x)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pdf(x, point):\n raise NotImplementedError(\"The pdf method has not yet been implemented.\")", "def pdf(self, x):\n raise NotImplementedError", "def pdf(self,x):\n returnPdf = self._distribution.pdf(x)\n return returnPdf", "def pdf(self,x):\n if self.base == 'natural':\n pdfVa...
[ "0.7687768", "0.74538267", "0.74296933", "0.73647636", "0.7215672", "0.71905404", "0.7085889", "0.70647675", "0.70454675", "0.69965947", "0.69869745", "0.69869745", "0.697386", "0.6928952", "0.6928614", "0.69227785", "0.69120353", "0.684598", "0.68387115", "0.6809058", "0.678...
0.73273325
4
Normalize the features in the data set.
def normalize_features(df): mu = df.mean() sigma = df.std() if (sigma == 0).any(): raise Exception("One or more features had the same value for all samples, and thus could " + \ "not be normalized. Please do not include features with only a single value " + \ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def normalizeFeatureVector(self):\n # Normalize features\n total = 0.0\n for v in self.features.values(): total += abs(v)\n if total == 0.0: \n total = 1.0\n for k,v in self.features.iteritems():\n self.features[k] = float(v) / total", "def _normalize(self...
[ "0.79551655", "0.79528546", "0.7853807", "0.77867204", "0.7698743", "0.76595855", "0.76581943", "0.7635334", "0.76207286", "0.7542891", "0.75298584", "0.74793464", "0.74740255", "0.7413795", "0.7318681", "0.73162293", "0.7313582", "0.72916085", "0.72567785", "0.7242953", "0.7...
0.7320142
15
Compute the cost function given a set of features / values, and the values for our thetas.
def compute_cost(features, values, theta): # your code here error = (values - features.dot(theta)) cost = error.dot(error) return cost
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def compute_cost(features, values, theta):\r\n m = len(values)\r\n sum_of_square_errors = numpy.square(numpy.dot(features, theta) - values).sum()\r\n cost = sum_of_square_errors / (2*m)\r\n\r\n return cost", "def compute_cost(features, values, theta):\n m = len(values)\n sum_of_square_errors = ...
[ "0.72324276", "0.7181755", "0.71723294", "0.69701", "0.69247854", "0.6471834", "0.6227543", "0.6182345", "0.617613", "0.6167203", "0.6144014", "0.6132684", "0.61300564", "0.6123157", "0.6107986", "0.6094501", "0.60778195", "0.6051131", "0.60425967", "0.60174876", "0.60173744"...
0.74634284
0
Perform gradient descent given a data set with an arbitrary number of features.
def gradient_descent(features, values, theta, alpha, num_iterations): m = len(values) cost_history = [] for i in range(num_iterations): # your code here cost = compute_cost(features, values, theta)/(2.0*m) cost_history.append([cost]) error = features....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gradient_descent(features, labels, alpha, num_iters):\n # Initial settings of weights\n weights = [0, 0, 0]\n\n # Length of dataset\n N = len(features[0])\n\n # Take 100 gradient steps\n gradient_losses = [0, 0, 0]\n\n # Take num_iters steps of gradient descent\n for step in range(num_i...
[ "0.7502321", "0.73805606", "0.72277737", "0.7210376", "0.71823865", "0.7039117", "0.6943254", "0.69380903", "0.6851058", "0.68016803", "0.66611814", "0.6622531", "0.6600367", "0.65702754", "0.656558", "0.655788", "0.65387475", "0.6533046", "0.6499761", "0.64804655", "0.643184...
0.7124435
5
Reset all counters and greedy parameter
def reset(self): self.c_count = 0 self.a_count = -1 self.epsilon = self.init_epsilon
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reset (self):\n self.counter = 0", "def reset(self):\n self.counter = 0", "def reset(self):\n self.algo_state = {}\n self.actual_repetitions = 0\n self.next_session = -1\n self.last_session = -1\n self.past_quality = []", "def reset(self):\n self.te...
[ "0.706285", "0.70557153", "0.69341266", "0.6901927", "0.6901927", "0.6901927", "0.68682015", "0.6837828", "0.6697244", "0.6697244", "0.6697244", "0.6695066", "0.66831166", "0.66431034", "0.66348666", "0.65636104", "0.65636104", "0.65636104", "0.64995754", "0.64995754", "0.649...
0.69747984
2
Policy that selects one of the available actions at random
def random_action(self, action_list=None): # sample from all actions if action_list is None: return np.random.choice(self.actions) # sample from a subset of actions else: return np.random.choice(action_list)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getAction(self, state):\n # Pick Action\n legalActions = self.getLegalActions(state)\n action = None\n \"*** YOUR CODE HERE ***\"\n # util.raiseNotDefined()\n if random.random() < self.epsilon:\n action = random.choice(legalActions)\n else:\n action = self.getPolicy(state)\n ...
[ "0.7818525", "0.77571136", "0.7665768", "0.76560175", "0.7534476", "0.7534476", "0.7523864", "0.750895", "0.750895", "0.7486864", "0.74745595", "0.74528134", "0.7383261", "0.7376664", "0.7366769", "0.73616487", "0.732289", "0.73151815", "0.7300658", "0.72869414", "0.72837925"...
0.7174809
32
Clone structure and weights and compile
def update_target_network(self): self.target_Qmodel = clone_model(self.Qmodel) self.target_Qmodel.set_weights(self.Qmodel.get_weights()) # target network is never compiled self.target_Qmodel.compile(loss='mse', optimizer=Adam())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def meta_clone(self, include_buffers=False):\n if include_buffers:\n self.buffers_clone = {k: v.data.clone()\n for k, v in self.named_buffers()}\n self.params_clone = {k: v.data.clone()\n for k, v in self.named_parameters()}\n ...
[ "0.64318305", "0.6379705", "0.6327976", "0.6265465", "0.6256646", "0.62523013", "0.61420536", "0.6140329", "0.613779", "0.61183465", "0.6103677", "0.6048058", "0.603064", "0.6028374", "0.60247666", "0.5962394", "0.5946479", "0.5925313", "0.590854", "0.5892423", "0.58535075", ...
0.0
-1
Predict movement of game controler where is epsilon probability randomly move.
def eps_greedy_action(self, phi, tabu): # increase counter of actions taken self.a_count += 1 # if within the initial buffer before learning starts, random action aval_actions = None if self.a_count < self.warmup: if len(tabu) > 0: # Remove tabu act...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def predict_movement(self, data, epsilon):\n\n q_actions = self.model.predict(data, batch_size = 1)\n opt_policy = np.argmax(q_actions)\n rand_val = np.random.random()\n if rand_val < epsilon:\n opt_policy = np.random.randint(0, NUM_ACTIONS)\n return opt_policy, q_acti...
[ "0.702739", "0.69440806", "0.61970955", "0.60627735", "0.60549825", "0.6046344", "0.5988161", "0.5935208", "0.59265876", "0.59182566", "0.58736765", "0.5839762", "0.58332235", "0.5812775", "0.5812775", "0.5780309", "0.5775754", "0.5767696", "0.57500184", "0.57460207", "0.5745...
0.0
-1
Calculate yj = rj + gamma argmaxQ or yj = rj (terminating state) This is the target value used to train the neural network and it uses the target network to make predictions
def get_target(self, batch): # initialise array to store yj values target = np.zeros((len(batch[0]), self.num_actions)) # loop over samples in the minibatch for j in range(len(batch[0])): a0_i = self.action_str2idx(batch[1][j]) r0 = batch[2][j] done ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Q_net(self, state):\n\t\tif not self._prediction_made: \n\t\t\tQ = tf.matmul(tf.nn.relu( tf.matmul(state, self.weights_hidden) + self.bias_hidden ), self.weights_out) + self.bias_out \n\t\t\tself._Qval = Q\t\n\t\t\tself._prediction_made = True\n\t\treturn self._Qval", "def final_result(self, board):\n ...
[ "0.6133086", "0.59240603", "0.59210104", "0.58679605", "0.586299", "0.5832981", "0.58184266", "0.58139116", "0.58036226", "0.5798045", "0.5787385", "0.5786582", "0.5784244", "0.57797366", "0.5778133", "0.57767266", "0.57760173", "0.5755751", "0.57456607", "0.5729801", "0.5724...
0.59281206
1
Perform one step of gradient descent on (yj Q(phi, aj, w))^2
def one_step_gd(self, batch): # get target values yj targets = self.get_target(batch) phi_input = np.vstack(batch[0]) masks = self.get_masks(batch[1]) dummy_targets = targets.max(axis=1) X = [phi_input, targets, masks] Y = [dummy_targets, targets] # upd...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def learning_by_gradient_descent(y, tx, w, gamma):\n loss = calculate_loss(y,tx,w)\n grad = calculate_gradient(y,tx,w)\n w_new = w - gamma*grad\n #grad is for debugging purpose\n return loss, w_new,grad", "def learning_by_gradient_descent(y, tx, w, gamma):\n loss = calculate_loss(y,tx,w)\n g...
[ "0.7216477", "0.71876305", "0.71149236", "0.7052852", "0.7013499", "0.69575596", "0.69293684", "0.68894744", "0.6888488", "0.688774", "0.6869979", "0.68588704", "0.6835098", "0.6807218", "0.6702064", "0.66813123", "0.66674036", "0.65884393", "0.6562325", "0.6562148", "0.65378...
0.0
-1
Small function to build the correct argtypes for the LibXC computers
def _build_comute_argtype(num_nd, num_nd_write): ret = [_xc_func_p, ctypes.c_size_t] ret += [_ndptr] * num_nd ret += [_ndptr_w] * num_nd_write return tuple(ret)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cmd_type(args):", "def _cast_types(args):\n\targs.x_val = None if args.x_val == 'None' else int(args.x_val)\n\targs.test_size = float(args.test_size)\n\targs.alpha = float(args.alpha)\n\targs.fit_prior = (args.fit_prior in ['True', \"True\", 'true', \"true\"])\n\n\t# class_prior - array like type (problem to...
[ "0.6376518", "0.58763367", "0.58502054", "0.5712465", "0.5642069", "0.5633545", "0.56088585", "0.5531215", "0.5515016", "0.550904", "0.5504691", "0.5500384", "0.54895383", "0.5458106", "0.5442237", "0.53984636", "0.5386691", "0.5374875", "0.53544724", "0.5347694", "0.5341656"...
0.6243665
1
A specialized function built to construct and check the sizes of arrays given to the LibXCFunctional class.
def _check_arrays(current_arrays, fields, sizes, factor, required): # Nothing supplied so we build it out if current_arrays is None: current_arrays = {} for label in fields: if required: size = sizes[label] current_arrays[label] = np.zeros((factor, size)) el...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _checkSize(X1,X2):\n \n if len(X1) != len(X2):\n raise ValueError, 'Lists are differnt lengths'", "def check_array_shape(logger, arr, name, expected_shape):\n shape = arr.shape\n check_array_ndim(arr, name, len(expected_shape))\n for i in range(len(shape)):\n check_array_dim(logg...
[ "0.6265682", "0.620982", "0.61681736", "0.6165635", "0.612598", "0.6100851", "0.606523", "0.60568863", "0.6044883", "0.60175836", "0.6015358", "0.60039693", "0.599243", "0.59703016", "0.59418064", "0.5937286", "0.59317034", "0.59271264", "0.59253454", "0.5924653", "0.59069985...
0.5808242
54
The primary LibXCFunctional class used to build and compute DFT exchangecorrelation quantities.
def __init__(self, func_name, spin): self.xc_func = None self._xc_func_init = False # Handle func_name if isinstance(func_name, str): func_id = util.xc_functional_get_number(func_name) if func_id == -1: raise KeyError("LibXCFunctional: name '%s' n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_QFT(self):\n op = qml.QFT(wires=range(3))\n res = op.matrix()\n exp = QFT\n assert np.allclose(res, exp)", "def _function_class(self):\n return FriCASExpectFunction", "def calc_Cinv_FC(P_design_W, FC_cost_data):\n # if the Q_design is below the lowest capacity ava...
[ "0.5634133", "0.5603821", "0.5425639", "0.53961235", "0.5307997", "0.5247506", "0.5236571", "0.5233002", "0.52122086", "0.519866", "0.5186619", "0.51836646", "0.5171188", "0.51476127", "0.51282215", "0.51221067", "0.5082539", "0.5082539", "0.50807905", "0.5078336", "0.5075296...
0.5122659
15
Cleans up the LibXC C struct on deletion
def __del__(self): if self.xc_func is None: return if self._xc_func_init: core.xc_func_end(self.xc_func) core.xc_func_free(self.xc_func)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __del__(self):\n #self.myCModule.free_array(self.arrayRef)\n pass", "def cleanup(self):\n\n self.PLC['1'].set_plc_mode(0)\n self.PLC['1'].plc_clear('all')\n super(Test200SmartSanityClear005, self).cleanup()", "def _clean_up(self):", "def cleanup(self):\n self._tm...
[ "0.6692683", "0.64728636", "0.6445634", "0.6374687", "0.63566375", "0.63566375", "0.63566375", "0.63114005", "0.6220566", "0.62159604", "0.62110907", "0.6195016", "0.61885726", "0.6173303", "0.6173303", "0.615202", "0.6146283", "0.6124178", "0.61184067", "0.6114401", "0.61109...
0.5984679
53
Provides a simple string representation with functional name data.
def __repr__(self): return '<%s.%s (%s) object at %s>' % (self.__class__.__module__, self.__class__.__name__, self._xc_func_name, hex(id(self)))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def name(self):\n name = self.function_name\n\n # Feature type is based on additional data that used\n # for example if insight is for Healthsites Facilities\n # than feature type is Healthsites Facilities\n\n if self.feature_type:\n name = '%s for %s' % (name, self.fe...
[ "0.70717007", "0.6821342", "0.67295676", "0.67295676", "0.6623396", "0.6613039", "0.66009283", "0.6593334", "0.65830815", "0.654439", "0.6526365", "0.6526365", "0.6526365", "0.6526365", "0.6526365", "0.6521252", "0.6521252", "0.6521252", "0.6521252", "0.65120167", "0.6506895"...
0.0
-1
Prints out a short description of the functional
def describe(self): ret = [] ret.append("Functional ID: %s" % self._number) ret.append("Functional Name: %s" % self._xc_func_name) ret.append("Attributes:") ret.append(" Name: %s" % self._name) ret.append(" Kind: %d" % self._kind) ret.append(" Family: %d" ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __repr__(self):\n\t\treturn self.func.__doc__", "def __repr__(self):\r\n return self.func.__doc__", "def __repr__(self):\r\n return self.func.__doc__", "def __repr__(self):\r\n return self.func.__doc__", "def __repr__(self):\r\n return self.func.__doc__", "def __repr__(sel...
[ "0.7420096", "0.73075235", "0.73075235", "0.73075235", "0.73075235", "0.73075235", "0.72935873", "0.72935873", "0.72935873", "0.72896236", "0.7270395", "0.7270395", "0.7270395", "0.7270395", "0.7270395", "0.7270395", "0.7270395", "0.7270395", "0.7167525", "0.7109541", "0.6981...
0.6748803
24
Returns the LibXCFunctional ID.
def get_number(self): return self._number
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getId(self):\n return _libsbml.FunctionDefinition_getId(self)", "def get_func_id_from_tsuid(self, tsuid):\n check_type(value=tsuid, allowed_types=str, var_name=\"tsuid\", raise_exception=True)\n\n response = self.send(root_url=self.session.dm_url + self.root_url,\n ...
[ "0.65617096", "0.63113815", "0.6098559", "0.6041057", "0.59945154", "0.5900914", "0.587187", "0.58197254", "0.5804145", "0.5734139", "0.57230854", "0.5713289", "0.57015187", "0.5693463", "0.56737447", "0.5662043", "0.56479746", "0.5644955", "0.5611577", "0.5568527", "0.556456...
0.0
-1
Returns the LibXCFunctional kind.
def get_kind(self): return self._kind
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_type(self):\n return self.get_udev_property('ID_FS_TYPE')", "def kind(self):\n return self.get_data(\"kind\")", "def kind(self) -> str:\n return pulumi.get(self, \"kind\")", "def kind(self) -> str:\n return pulumi.get(self, \"kind\")", "def kind(self) -> str:\n re...
[ "0.5934257", "0.5878089", "0.582752", "0.582752", "0.582752", "0.582752", "0.582752", "0.582752", "0.582752", "0.582752", "0.582752", "0.582752", "0.582752", "0.582752", "0.582752", "0.582752", "0.582752", "0.582752", "0.582752", "0.582752", "0.582752", "0.582752", "0.582...
0.552994
45
Returns the LibXCFunctional name.
def get_name(self): return self._name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def name(self):\n name = self.function_name\n\n # Feature type is based on additional data that used\n # for example if insight is for Healthsites Facilities\n # than feature type is Healthsites Facilities\n\n if self.feature_type:\n name = '%s for %s' % (name, self.fe...
[ "0.66209394", "0.6552643", "0.6552643", "0.6492396", "0.6492396", "0.64339757", "0.64050496", "0.63731533", "0.6299338", "0.622816", "0.6214293", "0.617792", "0.61538583", "0.61080116", "0.6059312", "0.5927638", "0.58204305", "0.58170474", "0.58135116", "0.58068055", "0.57791...
0.0
-1
Returns the LibXCFunctional family.
def get_family(self): return self._family
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_01_GetFamily(self):\n self.m_device_obj.DeviceFamily = TESTING_FAMILY_NAME_1\n l_family = FamUtil.get_family(self.m_device_obj)\n # print(PrettyFormatAny.form(l_family, 'B3-01-A - Family'))\n self.assertEqual(l_family, TESTING_FAMILY_NAME_1)", "def test_02_GetFamily(self):\n ...
[ "0.6671878", "0.66315264", "0.6380709", "0.6380162", "0.62706983", "0.62706983", "0.62412816", "0.62412816", "0.62412816", "0.6231695", "0.6231695", "0.6231695", "0.6102895", "0.6017814", "0.5974126", "0.5966167", "0.58548194", "0.57114094", "0.5633405", "0.5601125", "0.55779...
0.68424135
0
Returns the LibXCFunctional flags.
def get_flags(self): return self._flags
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def feature_flags(self):\r\n return self.env_tokens.get('FEATURES', dict())", "def get_flags(cls):\n return cls.get_short_flag(), cls.get_flag()", "def get_flags(self):\n return self.short_flag, self.long_flag", "def get_system_flags(self):\n\t\treturn call_sdk_function('PrlVmCfg_GetSyst...
[ "0.68110704", "0.66530377", "0.6499626", "0.6473792", "0.64643645", "0.6449167", "0.6381851", "0.6338008", "0.6265147", "0.6250086", "0.6250086", "0.6250086", "0.6250086", "0.62319344", "0.62319344", "0.62319344", "0.62319344", "0.6223301", "0.61941856", "0.61895657", "0.6145...
0.6317779
8
Returns the LibXCFunctional references.
def get_references(self): return self._refs
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def function_refs(self) -> List[FunctionReference]:\n return self._function_refs", "def getXRefsTo(self):\r\n # type: () -> (list[int], list[int])\r\n crefs = []\r\n drefs = []\r\n # If the current address is function process it\r\n if idc.get_func_flags(self.func_ea) !=...
[ "0.69382197", "0.6387038", "0.6072197", "0.58689415", "0.5774684", "0.57471573", "0.57462764", "0.57416767", "0.5685982", "0.561145", "0.5598167", "0.5594494", "0.55660653", "0.5555497", "0.55140364", "0.55033904", "0.5478641", "0.54763013", "0.5456211", "0.5435863", "0.54161...
0.56396455
9
Returns the LibXCFunctional bibtex references.
def get_bibtex(self): return self._bibtexs
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def references(self):\n ref_nodes = self.root.xpath(\".//bib-reference\")\n return list(\n itertools.chain.from_iterable(\n self.get_reference_iter(node) for node in ref_nodes\n )\n )", "def get_refs(func):\n found = re.findall(\"References:(.*)\",...
[ "0.69096875", "0.63146305", "0.6111194", "0.6034255", "0.5903538", "0.5896246", "0.58946764", "0.58436126", "0.5805503", "0.5782022", "0.5763529", "0.5747076", "0.5733833", "0.57011646", "0.5679117", "0.56542027", "0.5642207", "0.56400794", "0.55577713", "0.55523235", "0.5548...
0.5591979
18
Returns the LibXCFunctional reference DOIs.
def get_doi(self): return self._dois
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def list_defect_refs(self):\n print('-----------\\nDEFECT_REFs\\n-----------')\n self._print_dict(self.defect_refs)", "def list_refs(self):\n pass", "def references(self) -> \"IterableList[Reference]\":\n return Reference.list_items(self)", "def list_defect_ref_keys(self):\n ...
[ "0.6066506", "0.59986335", "0.581545", "0.57736564", "0.5760365", "0.573005", "0.5729725", "0.5693465", "0.5646567", "0.5640934", "0.56323737", "0.55529517", "0.5526186", "0.5518354", "0.55112725", "0.5438071", "0.5417537", "0.5400339", "0.53872216", "0.5386622", "0.53764004"...
0.0
-1
Returns the amount of global exchange to include.
def get_hyb_exx_coef(self): if self._family not in [flags.XC_FAMILY_HYB_LDA, flags.XC_FAMILY_HYB_GGA, flags.XC_FAMILY_HYB_MGGA]: raise ValueError("get_hyb_exx_coef can only be called on hybrid functionals.") if self._have_cam: raise ValueError("get_hyb_exx_coef cannot be called ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_total_instruments(self):\n\n total = 0\n for exchange in self.exchanges:\n total += len(exchange.symbols)\n return total", "def CountGlobal():\r\n return _hiew.HiewGate_Names_CountGlobal()", "def getGlobalSize(self):\n return self._get_global_size( )", "d...
[ "0.6179084", "0.57443017", "0.5690381", "0.54959685", "0.5471419", "0.5430132", "0.54086834", "0.5376728", "0.53472584", "0.532548", "0.52933073", "0.5260959", "0.52479035", "0.52417845", "0.5236068", "0.52341425", "0.52264065", "0.5225553", "0.5212044", "0.5207183", "0.51927...
0.0
-1
Returns the (omega, alpha, beta) quantities
def get_cam_coef(self): if self._family not in [flags.XC_FAMILY_HYB_LDA, flags.XC_FAMILY_HYB_GGA, flags.XC_FAMILY_HYB_MGGA]: raise ValueError("get_cam_coef can only be called on hybrid functionals.") if not self._have_cam: raise ValueError("get_cam_coef can only be called on ran...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def quantities():\n # publish the modules\n return (\n SI,\n angle, area, energy, force, length, mass, power, pressure,\n speed, substance, temperature, time, volume\n )", "def omega(self):\n return self._omega", "def getParam(self):\n return self.__alpha0, self....
[ "0.67075425", "0.5999553", "0.5995143", "0.59202677", "0.58304745", "0.5786519", "0.5735779", "0.572618", "0.5639546", "0.5626567", "0.5616059", "0.55831593", "0.55683064", "0.55592185", "0.5534734", "0.55158263", "0.54844254", "0.5464986", "0.54503083", "0.54469895", "0.5446...
0.0
-1
Returns the VV10 (b, C) coefficients
def get_vv10_coef(self): if self._nlc_b is False: raise ValueError("get_vv10_coeff can only be called on -V functionals.") return (self._nlc_b, self._nlc_C)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def coefficients(self):\r\n return self.coef_['x']", "def coefficients(self) :\n raise NotImplementedError", "def b_coefficients(x1,x2,x3,y1,y2,y3,CCoefficients,DCoefficients):\n\tBCoefficients = np.array([\t((y2-y1)/(x2-x1)-CCoefficients[0]*(x2-x1) - DCoefficients[0]*((x2-x1)**2)), \\\n\t\t\t\t...
[ "0.65958256", "0.65501094", "0.6504454", "0.6486117", "0.6194975", "0.61420995", "0.60554177", "0.60554177", "0.60174334", "0.5979773", "0.59653145", "0.59653145", "0.59482545", "0.59466475", "0.5945674", "0.59176135", "0.59019333", "0.58690476", "0.58312464", "0.582763", "0....
0.83470845
0
Gets the names of all external parameters
def get_ext_param_names(self): num_param = core.xc_func_info_get_n_ext_params(self.xc_func_info) ret = [] for p in range(num_param): tmp = core.xc_func_info_get_ext_params_name(self.xc_func_info, p) ret.append(tmp.decode("UTF-8")) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parameter_names(self) -> List[str]:", "def get_param_names(self):\n return list(self.params.keys())", "def parameter_names(self) -> list:\n parameters = []\n parameters.extend(self.properties.parameter_names)\n return parameters", "def parameters_names(cls):\n return cl...
[ "0.77504754", "0.7389947", "0.72158164", "0.71607", "0.71043503", "0.7083737", "0.7037365", "0.70315456", "0.7013595", "0.70036983", "0.698914", "0.687916", "0.6841593", "0.6833137", "0.68269855", "0.6797805", "0.6785064", "0.6723883", "0.6707179", "0.6698673", "0.6685417", ...
0.7800671
0
Gets the descriptions of all external parameters
def get_ext_param_descriptions(self): num_param = core.xc_func_info_get_n_ext_params(self.xc_func_info) ret = [] for p in range(num_param): tmp = core.xc_func_info_get_ext_params_description(self.xc_func_info, p) ret.append(tmp.decode("UTF-8")) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _external_params():\n list_ext_params = []\n list_ext_params.append(\n (hoomd.md.external.field.Periodic, \"params\",\n list([dict(A=1.5, i=1, w=3.5, p=5),\n dict(A=10, i=0, w=3.4, p=2)]), _evaluate_periodic))\n list_ext_params.append(\n (hoomd.md.external.field.Ele...
[ "0.7344136", "0.66554403", "0.6622951", "0.6612917", "0.6590222", "0.65895045", "0.65495247", "0.6545839", "0.64892864", "0.6436556", "0.6409071", "0.6368646", "0.6351103", "0.6338677", "0.6323158", "0.63069546", "0.628588", "0.628588", "0.6284201", "0.6275635", "0.62606674",...
0.7465921
0
Gets the default values of all external parameters.
def get_ext_param_default_values(self): num_param = core.xc_func_info_get_n_ext_params(self.xc_func_info) ret = [] for p in range(num_param): tmp = core.xc_func_info_get_ext_params_default_value(self.xc_func_info, p) ret.append(tmp) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parameters_default(cls):\n return cls._Parameters.__new__.__defaults__", "def default_parameters(self) -> List[Parameter]:\n return self.settings.job_default_parameters", "def initDefaults(self):\n return _libsbml.Parameter_initDefaults(self)", "def parameters(self):\n return ...
[ "0.7586267", "0.75206536", "0.7345313", "0.7338341", "0.7124671", "0.708384", "0.7017844", "0.68795174", "0.68700486", "0.6861506", "0.68081266", "0.6789644", "0.672888", "0.670684", "0.670621", "0.6609515", "0.6601124", "0.6569071", "0.6553868", "0.6518829", "0.6501356", "...
0.80710435
0
Sets all external parameters.
def set_ext_params(self, ext_params): num_param = core.xc_func_info_get_n_ext_params(self.xc_func_info) if num_param == 0: raise ValueError("LibXCFunctional '%s' has no external parameters to set." % self.get_name()) if len(ext_params) != num_param: raise ValueError( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_params(self):\r\n pass", "def set_params(self, **kwargs):\n ...", "def set_params(self):\n raise NotImplementedError", "def set_params(self, params):", "def set_parameters(self,params):\n K3Supervisor.set_parameters(self,params)\n self.blending.set_parameters(self...
[ "0.7574865", "0.7349388", "0.7286496", "0.7278232", "0.7277006", "0.71515125", "0.712049", "0.712049", "0.712049", "0.712049", "0.712049", "0.70605385", "0.6988655", "0.6949013", "0.67994875", "0.6789911", "0.67877454", "0.67204505", "0.6715573", "0.67097175", "0.6694738", ...
0.6574025
26
Sets the density threshold below which the functional will not be evaluated.
def set_dens_threshold(self, dens_threshold): if dens_threshold < 0: raise ValueError("The density threshold cannot be smaller than 0.") core.xc_func_set_dens_threshold(self.xc_func, ctypes.c_double(dens_threshold))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setThreshold(self, threshold): # real signature unknown; restored from __doc__\n pass", "def clear_density(self):\n self._density = None", "def set_threshold(self, threshold):\n self._threshold = check_value_positive('threshold', threshold)", "def threshold(self,thresholdValue):\n ...
[ "0.63226175", "0.61955786", "0.6171416", "0.61262935", "0.59644085", "0.58235157", "0.58235157", "0.58235157", "0.58235157", "0.58235157", "0.57770663", "0.5771117", "0.5760468", "0.5694355", "0.5690046", "0.56802684", "0.5664838", "0.56599784", "0.56505716", "0.5615393", "0....
0.7752366
0
Sets the spin polarization threshold below which components will not be evaluated.
def set_zeta_threshold(self, zeta_threshold): if zeta_threshold < 0: raise ValueError("The spin polarization threshold cannot be smaller than 0.") core.xc_func_set_zeta_threshold(self.xc_func, ctypes.c_double(zeta_threshold))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_threshold(self, threshold):\n self._threshold = check_value_positive('threshold', threshold)", "def setThreshold(self, threshold): # real signature unknown; restored from __doc__\n pass", "def setAngleLimit(angle_limit):\n return RoboCaller().call(\"setAngleLimit\", \"void\", angle_limit...
[ "0.58173597", "0.57458097", "0.55919087", "0.5545165", "0.55155236", "0.547716", "0.53742176", "0.53729236", "0.5330762", "0.5303351", "0.52957284", "0.52762413", "0.52762413", "0.52762413", "0.52762413", "0.52762413", "0.52495974", "0.52326035", "0.5226283", "0.52042127", "0...
0.56321895
2
Sets the smallest value allowed for sigma = \sqrt(\gamma). Smaller values than this get overwritten in the evaluation.
def set_sigma_threshold(self, sigma_threshold): if sigma_threshold < 0: raise ValueError("The sigma threshold cannot be smaller than 0.") core.xc_func_set_sigma_threshold(self.xc_func, ctypes.c_double(sigma_threshold))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _update_gamma(self):\n # type: () -> None\n if self._world is None:\n self.gamma = np.inf\n return\n # higher bound for the free space volume\n config_space_volume = self._world.get_configuration_space_volume()\n gamma_L = 8*(4/3)* config_space_volume\n ...
[ "0.6821172", "0.6443684", "0.64384013", "0.6321744", "0.6190171", "0.5993369", "0.59834427", "0.5934069", "0.5904044", "0.5883485", "0.5871269", "0.5817794", "0.58008724", "0.57933", "0.5751669", "0.569705", "0.5695616", "0.56666064", "0.5641036", "0.5599601", "0.5595213", ...
0.53603756
39
Sets the smallest value allowed for tau. Smaller values than this get overwritten in the evaluation.
def set_tau_threshold(self, tau_threshold): if tau_threshold < 0: raise ValueError("The tau threshold cannot be smaller than 0.") core.xc_func_set_tau_threshold(self.xc_func, ctypes.c_double(tau_threshold))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self,tau = 1e-3):\n self._tau = tau \n pass", "def __init__(self, tau=1, eps=None):\n self.tau = tau\n self.eps = eps or np.finfo(config.precision).eps\n self.rng = np.random.default_rng()\n self.smax = Softmax()", "def init_tau(self, type: str = 'safest', we...
[ "0.64921534", "0.61496323", "0.61187613", "0.6012751", "0.59901506", "0.58402216", "0.5835517", "0.56944895", "0.5693752", "0.5693752", "0.5661594", "0.55744827", "0.55099267", "0.5492436", "0.5492436", "0.54596823", "0.5449228", "0.5433668", "0.54214495", "0.54214495", "0.54...
0.60347635
3
Evaluates the functional and its derivatives on a grid.
def compute(self, inp, output=None, do_exc=True, do_vxc=True, do_fxc=False, do_kxc=False, do_lxc=False): # Check flags if not self._have_exc and do_exc: raise ValueError("Functional '%s' does not have EXC capabilities." % self.get_name()) if not self._have_vxc and do_vxc: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def grid_eval(self, gridaxes):\n assert len(gridaxes) == self.sdim, \"Input has wrong dimension\"\n # make sure axes are one-dimensional\n if not all(np.ndim(ax) == 1 for ax in gridaxes):\n gridaxes = tuple(np.squeeze(ax) for ax in gridaxes)\n assert all(ax.ndim == 1 for ...
[ "0.62774193", "0.62126994", "0.6181909", "0.6074451", "0.6043692", "0.6043692", "0.6038648", "0.60327077", "0.59558785", "0.58665967", "0.58031106", "0.5786653", "0.57752985", "0.5758363", "0.5745993", "0.57132185", "0.57118523", "0.56945556", "0.56928897", "0.56743944", "0.5...
0.0
-1
Strip path and extension. Return base filename.
def basename(self): return get_basename(self.filename)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def filename_strip_ext(filename):\n base = os.path.basename(filename)\n # Strip file extension\n return os.path.splitext(base)[0]", "def get_filename(file_path):\n\n # Get rid of directories and etc\n just_file = os.path.basename(file_path)\n\n # Now we return just the base name\n return os....
[ "0.80113024", "0.7722132", "0.7642737", "0.7580186", "0.7531498", "0.74958444", "0.7461117", "0.72882116", "0.726376", "0.72585756", "0.7248201", "0.72440237", "0.7239742", "0.7233385", "0.7215656", "0.721015", "0.72061", "0.7173597", "0.7156511", "0.7147149", "0.7107287", ...
0.6472341
80
Construct and return a filename for this tile.
def generate_filename( self, directory=os.getcwd(), prefix="tile", format="png", path=True ): filename = prefix + "_{col:02d}_{row:02d}.{ext}".format( col=self.column, row=self.row, ext=format.lower().replace("jpeg", "jpg") ) if not path: return filename ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tilefilename(self, x, y, z):\n\n tileIndex = x + y * self.tierSizeInTiles[z][0] + self.tileCountUpToTier[z]\n return os.path.join(\"TileGroup%.0f\" % math.floor( tileIndex / 256 ),\n \"%s-%s-%s.%s\" % ( z, x, y, self.tileformat))", "def tilefilename(self, x, y, z):\n\n tileIndex = x + y * self.tie...
[ "0.7717686", "0.77164763", "0.74944174", "0.73645", "0.71533597", "0.7137769", "0.7135323", "0.71192485", "0.7112908", "0.7089001", "0.69753784", "0.69214255", "0.6892904", "0.6883375", "0.686652", "0.68156606", "0.6811536", "0.6807842", "0.6796225", "0.6787518", "0.6782904",...
0.7444088
3
Show tile number, and if saved to disk, filename.
def __repr__(self): if self.filename: return "<Tile #{} - {}>".format( self.number, os.path.basename(self.filename) ) return "<Tile #{}>".format(self.number)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tilefilename(self, x, y, z):\n\n tileIndex = x + y * self.tierSizeInTiles[z][0] + self.tileCountUpToTier[z]\n return os.path.join(\"TileGroup%.0f\" % math.floor( tileIndex / 256 ),\n \"%s-%s-%s.%s\" % ( z, x, y, self.tileformat))", "def tilefilename(self, x, y, z):\n\n tileIndex = x + y * self.tie...
[ "0.7170778", "0.7017842", "0.62615716", "0.6062539", "0.6021516", "0.58989334", "0.5845273", "0.58161515", "0.5786859", "0.5772618", "0.5726611", "0.56966686", "0.568967", "0.5651235", "0.56373155", "0.5635666", "0.56198174", "0.5595406", "0.5574993", "0.5558204", "0.555806",...
0.68945366
2