text
stringlengths
78
104k
score
float64
0
0.18
def cli_head(context, path=None): """ Performs a HEAD on the item (account, container, or object). See :py:mod:`swiftly.cli.head` for context usage information. See :py:class:`CLIHead` for more information. """ path = path.lstrip('/') if path else None with context.client_manager.with_clie...
0.000579
def psh_fire_msg_action_if_new(sender, instance, created, **kwargs): """ Post save hook to fire message send task """ if created: from message_sender.tasks import send_message send_message.apply_async(kwargs={"message_id": str(instance.id)})
0.003704
def forward(self, is_train=False, **kwargs): """Calculate the outputs specified by the bound symbol. Parameters ---------- is_train: bool, optional Whether this forward is for evaluation purpose. If True, a backward call is expected to follow. **kwargs ...
0.004174
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'status') and self.status is not None: _dict['status'] = self.status return _dict
0.008734
def check_for_bypass_url(raw_creds, nova_args): """ Return a list of extra args that need to be passed on cmdline to nova. """ if 'BYPASS_URL' in raw_creds.keys(): bypass_args = ['--bypass-url', raw_creds['BYPASS_URL']] nova_args = bypass_args + nova_args return nova_args
0.003236
def admin(self, server=None): """ Get the admin information. Optional arguments: * server=None - Get admin information for - server instead of the current server. """ with self.lock: if not server: self.send('ADMIN') els...
0.004027
def ms_cmap_restore(self, viewer, event, data_x, data_y, msg=True): """An interactive way to restore the colormap settings after a rotate or invert operation. """ if self.cancmap and (event.state == 'down'): self.restore_colormap(viewer, msg) return True
0.006536
def comparedist(df, *args, **kwargs): """ Compare the distributions of two DataFrames giving visualisations of: - individual and combined distributions - distribution of non-common values - distribution of non-common values vs. each side Plot distribution as area (fill_between) + mean, media...
0.005268
def __update_existing(self, msg, req): """Propagate changes based on type of message. MUST be called within self.__requests lock. Performs additional actions when solicited messages arrive.""" req._messages.append(msg) payload = msg[M_PAYLOAD] if msg[M_TYPE] in _RSP_TYPE_CREA...
0.003911
def img(self): '''return a cv image for the thumbnail''' if self._img is not None: return self._img self._img = cv2.cvtColor(self.original_img, cv2.COLOR_BGR2RGB) if self.border_width and self.border_colour is not None: cv2.rectangle(self._img, (0, 0), (self.widt...
0.006977
def train_with_graph(p_graph, qp_pairs, dev_qp_pairs): ''' Train a network from a specific graph. ''' global sess with tf.Graph().as_default(): train_model = GAG(cfg, embed, p_graph) train_model.build_net(is_training=True) tf.get_variable_scope().reuse_variables() dev...
0.001976
def run_script(self, script_id, params=None): """ Runs a stored script. script_id:= id of stored script. params:= up to 10 parameters required by the script. ... s = pi.run_script(sid, [par1, par2]) s = pi.run_script(sid) s = pi.run_script(sid, [1, 2,...
0.002123
def cmd_full_return( self, tgt, fun, arg=(), timeout=None, tgt_type='glob', ret='', verbose=False, kwarg=None, **kwargs): ''' Execute a salt command and return ''' was_...
0.001715
def detect_volumes(self, vstype=None, method=None, force=False): """Iterator for detecting volumes within this volume system. :param str vstype: The volume system type to use. If None, uses :attr:`vstype` :param str method: The detection method to use. If None, uses :attr:`detection` :p...
0.004545
def get_labels(cs): """Return list of every label.""" records = [] for c in cs: records.extend(c.get('labels', [])) return records
0.006494
def get_rfu(): """ Returns a list of al "regular file urls" for all plugins. """ global _rfu if _rfu: return _rfu plugins = plugins_base_get() rfu = [] for plugin in plugins: if isinstance(plugin.regular_file_url, str): rfu.append(plugin.regular_file_url) ...
0.002469
def default_returns_func(symbol, start=None, end=None): """ Gets returns for a symbol. Queries Yahoo Finance. Attempts to cache SPY. Parameters ---------- symbol : str Ticker symbol, e.g. APPL. start : date, optional Earliest date to fetch data for. Defaults to earli...
0.000779
def from_dict(d): """Transform the dict to a DateRange object.""" start = d.get('start') end = d.get('end') if not (start and end): raise ValueError('DateRange must have both start and end') start = str_to_date(start) end = str_to_date(end) ret...
0.005797
def get_value(self, key, args, kwargs): """Override to substitute {ATTRIBUTE} by attributes of our _item.""" if hasattr(self._item, key): return getattr(self._item, key) return super().get_value(key, args, kwargs)
0.008032
def remove(self, key, column_path, timestamp, consistency_level): """ Remove data from the row specified by key at the granularity specified by column_path, and the given timestamp. Note that all the values in column_path besides column_path.column_family are truly optional: you can remove the entire ro...
0.00578
def get_resource_types(self): """ Returns set of resource types of FileFields of all registered models. Needed by Cloudinary as resource type is needed to browse or delete specific files. """ resource_types = set() for model in self.models(): for field in self...
0.006173
def _get_formatted_val(self, obj, name, column): """ Format the value of the attribute 'name' from the given object """ attr_path = name.split('.') val = None tmp_val = obj for attr in attr_path: tmp_val = getattr(tmp_val, attr, None) if tm...
0.004228
def get_image(self, source): """ Returns the backend image objects from a ImageFile instance """ with NamedTemporaryFile(mode='wb', delete=False) as fp: fp.write(source.read()) return {'source': fp.name, 'options': OrderedDict(), 'size': None}
0.00678
def get_connections(self, data=True, as_coro=False): """Return connections from all the agents in the slave environments. :param bool data: If ``True``, returns also the data stored for each connection. :param bool as_coro: If ``True`` returns a coroutine, otherwise run...
0.002591
def _CalculateDOWDelta(self, wd, wkdy, offset, style, currentDayStyle): """ Based on the C{style} and C{currentDayStyle} determine what day-of-week value is to be returned. @type wd: integer @param wd: day-of-week value for the current day @typ...
0.001005
def to_JSON(self): """Dumps object fields into a JSON formatted string :returns: the JSON string """ return json.dumps({"interval": self._interval, "reception_time": self._reception_time, "Location": json.loads(self._location.to_JSO...
0.008163
def run_apidoc(_): """Generage API documentation""" import better_apidoc better_apidoc.main([ 'better-apidoc', '-t', os.path.join('.', '_templates'), '--force', '--no-toc', '--separate', '-o', os.path.join('.', 'API'), os.path.join('..'...
0.002907
def create_diff_storage(self, target, variant): """Starts creating an empty differencing storage unit based on this medium in the format and at the location defined by the @a target argument. The target medium must be in :py:attr:`MediumState.not_created` state (i.e. mu...
0.00478
def _darwin_current_arch(self): """Add Mac OS X support.""" if sys.platform == "darwin": if sys.maxsize > 2 ** 32: # 64bits. return platform.mac_ver()[2] # Both Darwin and Python are 64bits. else: # Python 32 bits return platform.processor()
0.019169
def send_messages(self, messages): """Redirect messages to the dummy outbox""" msg_count = 0 for message in messages: # .message() triggers header validation message.message() email.outbox.append(message) msg_count += 1 return msg_count
0.006536
def _get_search_direction(state): """Computes the search direction to follow at the current state. On the `k`-th iteration of the main L-BFGS algorithm, the state has collected the most recent `m` correction pairs in position_deltas and gradient_deltas, where `k = state.num_iterations` and `m = min(k, num_corr...
0.003859
def length_of_geographical_area_code(numobj): """Return length of the geographical area code for a number. Gets the length of the geographical area code from the PhoneNumber object passed in, so that clients could use it to split a national significant number into geographical area code and subscriber ...
0.00105
def _parse_msg(client, command, actor, args): """Parse a PRIVMSG or NOTICE and dispatch the corresponding event.""" recipient, _, message = args.partition(' :') chantypes = client.server.features.get("CHANTYPES", "#") if recipient[0] in chantypes: recipient = client.server.get_channel(recipient)...
0.002227
def close(self): """ Called to clean all possible tmp files created during the process. """ if self.read_option('save_pointer'): self._update_last_pointer() super(S3Writer, self).close()
0.008403
def add_array(self, name, values, array): """Add a new array to the DAF file. The summary will be initialized with the `name` and `values`, and will have its start word and end word fields set to point to where the `array` of floats has been appended to the file. """ f ...
0.000952
def rhyme_scheme(self): """ Calculates the rhyme scheme of a given stanza. It doesn't yet support phonetical rhyming (homophones) and thus is still error-prone Example: >>> stanza = ['Ein rîchiu küneginne, frou Uote ir muoter hiez.', 'ir vater der hiez Dancrât, der in diu er...
0.00485
def debugrequest(self, event): """Handler for client-side debug requests""" try: self.log("Event: ", event.__dict__, lvl=critical) if event.data == "storejson": self.log("Storing received object to /tmp", lvl=critical) fp = open('/tmp/hfosdebugger...
0.001064
def bods2c(name): """ Translate a string containing a body name or ID code to an integer code. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bods2c_c.html :param name: String to be translated to an ID code. :type name: str :return: Integer ID code corresponding to name. :rtype: i...
0.001876
def add_record(cls, fqdn, name, type, value, ttl): """Create record for a domain.""" data = { "rrset_name": name, "rrset_type": type, "rrset_values": value, } if ttl: data['rrset_ttl'] = int(ttl) meta = cls.get_fqdn_info(fqdn) ...
0.004843
def write_pkg_file(self, file): """Write the PKG-INFO format data to a file object. """ version = self.get_metadata_version() if six.PY2: def write_field(key, value): file.write("%s: %s\n" % (key, self._encode_field(value))) else: def write_field(key, value): ...
0.000401
def plot_self(self, func): """define your callback function with the decorator @plotter.plot_self. in the callback function set the data of lines in the plot using self.lines[i][j].set_data(your data)""" def func_wrapper(): func() try: self.ma...
0.003205
def write_node(self, a, **attrs): "a [a1=x,a2=y];" with self.rule(): nodename = self._nodename(a) self.write(nodename) self._delattr(attrs, 'label', nodename) self._delattr(attrs, 'fillcolor', self.fillcolor) self._delattr(attrs, 'fontcolor', s...
0.005333
def register(self, device, callback): """Register a callback. device: device to be updated by subscription callback: callback for notification of changes """ if not device: logger.error("Received an invalid device: %r", device) return logger.debu...
0.004211
def _setup_services(self): """ Construct a ContextService and a thread to service requests for it arriving from worker processes. """ self.pool = mitogen.service.Pool( router=self.router, services=[ mitogen.service.FileService(router=self.r...
0.002878
def save_images(images, filenames, output_dir): """Saves images to the output directory. Args: images: array with minibatch of images filenames: list of filenames without path If number of file names in this list less than number of images in the minibatch then only first len(filenames) images ...
0.005865
def render(self, template_name: str, **ctx): """ Convenience method for rendering a template. :param template_name: The template's name. Can either be a full path, or a filename in the controller's template folder. :param ctx: Context variables to pass into...
0.003476
def _rts_smoother_update_step(k, p_m , p_P, p_m_pred, p_P_pred, p_m_prev_step, p_P_prev_step, p_dynamic_callables): """ Rauch–Tung–Striebel(RTS) update step Input: ----------------------------- k: int Iteration No. Starts at 0. Tot...
0.009519
def _pys2macros(self, line): """Updates macros in code_array""" if self.code_array.dict_grid.macros and \ self.code_array.dict_grid.macros[-1] != "\n": # The last macro line does not end with \n # Therefore, if not new line is inserted, the codeis broken s...
0.004706
def do_s1(self, line): """Send a SelectAndOperate BinaryOutput (group 12) index 8 LATCH_ON to the Outstation. Command syntax is: s1""" self.application.send_select_and_operate_command(opendnp3.ControlRelayOutputBlock(opendnp3.ControlCode.LATCH_ON), ...
0.010025
def set_config_file(name): ''' Sets the configuration's name. This function is intended to be used from states. CLI Example: .. code-block:: bash salt '*' syslog_ng.set_config_file name=/etc/syslog-ng ''' global __SYSLOG_NG_CONFIG_FILE old = __SYSLOG_NG_CONFIG_FILE __SYSL...
0.002208
def setup_task_signals(self, ): """Setup the signals for the task page :returns: None :rtype: None :raises: None """ log.debug("Setting up task page signals.") self.task_user_view_pb.clicked.connect(self.task_view_user) self.task_user_add_pb.clicked.conne...
0.002915
def get_additional_resources(settings_module): """ if HENDRIX_CHILD_RESOURCES is specified in settings_module, it should be a list resources subclassed from hendrix.contrib.NamedResource example: HENDRIX_CHILD_RESOURCES = ( 'apps.offload.resources.LongRunningProcessResource', ...
0.001217
def get_urls_for_profiles(edx_video_id, profiles): """ Returns a dict mapping profiles to URLs. If the profiles or video is not found, urls will be blank. Args: edx_video_id (str): id of the video profiles (list): list of profiles we want to search for Returns: (dict): A d...
0.001305
def move(zone, zonepath): ''' Move zone to new zonepath. zone : string name or uuid of the zone zonepath : string new zonepath CLI Example: .. code-block:: bash salt '*' zoneadm.move meave /sweetwater/meave ''' ret = {'status': True} ## verify zone re...
0.00406
def tweetqueue(ctx, dry_run, config): """A command line tool for time-delaying your tweets.""" ctx.obj = {} ctx.obj['DRYRUN'] = dry_run # If the subcommand is "config", bypass all setup code if ctx.invoked_subcommand == 'config': return # If the config file wasn't provided, attempt to ...
0.001689
def get_qp_ctext(value): """ctext = <printable ascii except \ ( )> This is not the RFC ctext, since we are handling nested comments in comment and unquoting quoted-pairs here. We allow anything except the '()' characters, but if we find any ASCII other than the RFC defined printable ASCII an NonPr...
0.002821
def make_storage_key(portal_type, prefix=None): """Make a storage (dict-) key for the number generator """ key = portal_type.lower() if prefix: key = "{}-{}".format(key, prefix) return key
0.00463
def delete(self, custom_field, params={}, **options): """A specific, existing custom field can be deleted by making a DELETE request on the URL for that custom field. Returns an empty data record. Parameters ---------- custom_field : {Id} Globally unique identifier for...
0.010846
def dictToH5Group(d, group, link_copy=True): """ helper function that transform (recursive) a dictionary into an hdf group by creating subgroups link_copy = True, tries to save space in the hdf file by creating an internal link. the current implementation uses memory though ... ...
0.015993
def contains_opposite_color_piece(self, square, position): """ Finds if square on the board is occupied by a ``Piece`` belonging to the opponent. :type: square: Location :type: position: Board :rtype: bool """ return not position.is_square_empty(square) a...
0.005141
def update_button_status(self): """Function to enable or disable the Ok button. """ # enable/disable ok button if len(self.displaced.currentField()) > 0: self.button_box.button( QtWidgets.QDialogButtonBox.Ok).setEnabled(True) else: self.but...
0.005
def delete_orphaned_attachments(portal): """Delete attachments where the Analysis was removed https://github.com/senaite/senaite.core/issues/1025 """ attachments = api.search({"portal_type": "Attachment"}) total = len(attachments) logger.info("Integrity checking %d attachments" % total) f...
0.001114
def startLoading(self): """ Updates this item to mark the item as loading. This will create a QLabel with the loading ajax spinner to indicate that progress is occurring. """ if self._loading: return False tree = self.treeWidget() ...
0.008621
def _populate_and_save_user_profile(self): """ Populates a User profile object with fields from the LDAP directory. """ try: app_label, class_name = django.conf.settings.AUTH_PROFILE_MODULE.split('.') profile_model = apps.get_model(app_label, class_name) ...
0.008234
def get_parent_ar(self, ar): """Returns the parent AR """ parent = ar.getParentAnalysisRequest() # Return immediately if we have no parent if parent is None: return None # Walk back the chain until we reach the source AR while True: ppare...
0.003984
def load(self): """Load the data file, do some basic type conversions """ df = pd.read_csv(self.input_file, encoding='utf8') df['wiki_id'] = df['painting'].str.split('/').str[-1] df['creator_wiki_id'] = df['creator'].str.split('/').str[-1] df['d...
0.006536
def _get_json(self, url): """ Get json from url """ self.log.info(u"/GET " + url) r = requests.get(url) if hasattr(r, 'from_cache'): if r.from_cache: self.log.info("(from cache)") if r.status_code != 200: throw_request_err(r) ...
0.005917
def reload(self): """ Re-reads all layers again. In theory this should overwrite all the old values with any newer ones. It assumes we never delete a config item before reload. """ oldlayers = self.layers self.layers = [] for cp, filename, fp in oldlayers: cp = cp # pylint if fp is None: self....
0.042895
def to_array(self, channels=2): """Generate the array of volume multipliers for the dynamic""" if self.fade_type == "linear": return np.linspace(self.in_volume, self.out_volume, self.duration * channels)\ .reshape(self.duration, channels) elif self.fad...
0.008639
def uniprot_reviewed_checker_batch(uniprot_ids): """Batch check if uniprot IDs are reviewed or not Args: uniprot_ids: UniProt ID or list of UniProt IDs Returns: A dictionary of {UniProtID: Boolean} """ uniprot_ids = ssbio.utils.force_list(uniprot_ids) invalid_ids = [i for i i...
0.002223
def get_unresolved_variables(f): """ Gets unresolved vars from file """ reporter = RReporter() checkPath(f, reporter=reporter) return dict(reporter.messages)
0.005525
def subject_pair_overlap(subject1, subject2, object_category=None, **kwargs): """ Jaccard similarity """ set1 = get_object_closure(subject1, object_category=object_category, **kwargs) set2 = get_object_closure(subject2, ...
0.002151
def _check_transition_origin(self, transition): """Checks the validity of a transition origin Checks whether the transition origin is valid. :param rafcon.core.transition.Transition transition: The transition to be checked :return bool validity, str message: validity is True, when the ...
0.005272
def read_model_yaml(self, modelkey): """ Read the yaml file for the diffuse components """ model_yaml = self._name_factory.model_yaml(modelkey=modelkey, fullpath=True) model = yaml.safe_load(open(model_yaml)) return model
0.00641
def parse_xml_report(cls, conf, path): """Parse the ivy xml report corresponding to the name passed to ivy. :API: public :param string conf: the ivy conf name (e.g. "default") :param string path: The path to the ivy report file. :returns: The info in the xml report. :rtype: :class:`IvyInfo` ...
0.00869
def simDeath(self): ''' Determines which agents in the current population "die" or should be replaced. Takes no inputs, returns a Boolean array of size self.AgentCount, which has True for agents who die and False for those that survive. Returns all False by default, must be overwritten ...
0.009537
async def data_update(queue): """ Update data sent by the background process to global allData variable """ global allData while True: while not queue.empty(): data = queue.get() allData[data[0]] = data[1] for key, value in tags.items(): if key in ...
0.002463
def toggle_reciprocal(self): """Flip my ``reciprocal_portal`` boolean, and draw (or stop drawing) an extra arrow on the appropriate button to indicate the fact. """ self.screen.boardview.reciprocal_portal = not self.screen.boardview.reciprocal_portal if self.screen.board...
0.003741
def bcesboot(y1,y1err,y2,y2err,cerr,nsim=10000): """ Does the BCES with bootstrapping. Usage: >>> a,b,aerr,berr,covab=bcesboot(x,xerr,y,yerr,cov,nsim) :param x,y: data :param xerr,yerr: measurement errors affecting x and y :param cov: covariance between the measurement errors (all are arrays) :param ns...
0.081423
def start(self): """ Perform full system setup. Method logs in and sets auth token, urls, and ids for future requests. Essentially this is just a wrapper function for ease of use. """ if self._username is None or self._password is None: if not self.login(): ...
0.001894
def getRecommendedRenderTargetSize(self): """Suggested size for the intermediate render target that the distortion pulls from.""" fn = self.function_table.getRecommendedRenderTargetSize pnWidth = c_uint32() pnHeight = c_uint32() fn(byref(pnWidth), byref(pnHeight)) return...
0.008571
def layer_post_save(instance, *args, **kwargs): """ Used to do a layer full check when saving it. """ if instance.is_monitored and instance.service.is_monitored: # index and monitor if not settings.REGISTRY_SKIP_CELERY: check_layer.delay(instance.id) else: check_...
0.005063
def set_tag(self, key, value): """ :param key: :param value: """ with self.update_lock: if key == ext_tags.SAMPLING_PRIORITY and not self._set_sampling_priority(value): return self if self.is_sampled(): tag = thrift.make_tag...
0.005906
def get_limit_log(self, stat_name, default_action=False): """Return the log tag for the alert.""" # Get the log tag for stat + header # Exemple: network_wlan0_rx_log try: log_tag = self._limits[stat_name + '_log'] except KeyError: # Try fallback to plugin ...
0.00312
def data_collector(iterable, def_buf_size=5242880): """ Buffers n bytes of data. :param iterable: Could be a list, generator or string :type iterable: List, generator, String :returns: A generator object """ buf = b'' for data in iterable: buf += data ...
0.002037
def resolve_modifier_to_ansi_code(modifiername, colormode): """ Resolve the given modifier name to a valid ANSI escape code. :param str modifiername: the name of the modifier to resolve :param int colormode: the color mode to use. See ``translate_rgb_to_ansi_code`` :returns str: the ANSI escap...
0.004459
def query_sequence_length(self): """ does not include hard clipped""" if self.entries.seq: return len(self.entries.seq) if not self.entries.cigar: raise ValueError('Cannot give a query length if no cigar and no query sequence are present') return sum([x[0] for x in self.cigar_array if re.match('[...
0.014925
def failed_extra_capabilities(self): """Check to see if instance passes its `extra_capability_checks`.""" failed = [] for capability, f_name in self.extra_capability_checks.items(): f = getattr(self, f_name) instance_capable = f() if not instance_capable: ...
0.005277
def mean_absolute_percentage_error(df, col_true, col_pred=None): """ Compute mean absolute percentage error of a predicted DataFrame. Note that this method will trigger the defined flow to execute. :param df: predicted data frame :type df: DataFrame :param col_true: column name of true value ...
0.00295
def file_copy(self, source, destination, flags): """Copies a file from one guest location to another. Will overwrite the destination file unless :py:attr:`FileCopyFlag.no_replace` is specified. in source of type str The path to the file to copy (in the guest). Gue...
0.004557
def keyframe(self, keyframe): """Set keyframe.""" if self._keyframe == keyframe: return if self._keyframe is not None: raise RuntimeError('cannot reset keyframe') if len(self._offsetscounts[0]) != len(keyframe.dataoffsets): raise RuntimeError('incompat...
0.00299
def set_time(self, value: float): """ Set the current time jumping in the timeline. Args: value (float): The new time """ if value < 0: value = 0 self.controller.row = self.rps * value
0.007752
def _set_source(self, v, load=False): """ Setter method for source, mapped from YANG variable /acl_mirror/source (list) If this variable is read-only (config: false) in the source YANG file, then _set_source is considered as a private method. Backends looking to populate this variable should do ...
0.003469
def insert_entry_for_bucket(self, bucket_key, tree_depth): """ Increases counter for specified bucket_key (leaf of tree) and also increases counters along the way from the root to the leaf. """ # First increase vector count of this subtree self.vector_count = self.vector...
0.008397
def document_stat(stat): """ Create a structured documentation for the stat It replaces `{usage}`, `{common_parameters}` and `{aesthetics}` with generated documentation. """ # Dedented so that it lineups (in sphinx) with the part # generated parts when put together docstring = dedent(st...
0.000623
def by(self, technology): """ Get the plugins registered in PedalPi by technology :param PluginTechnology technology: PluginTechnology identifier """ if technology == PluginTechnology.LV2 \ or str(technology).upper() == PluginTechnology.LV2.value.upper(): ret...
0.007895
def create_and_append_rally_point(self, lat, lon, alt, break_alt, land_dir, flags): '''add a point via latitude/longitude''' p = mavutil.mavlink.MAVLink_rally_point_message(self.target_system, self.target_component, self.rally_count(), 0, lat, lon,...
0.012887
def selectAll( self ): """ Selects all the items in the scene. """ currLayer = self._currentLayer for item in self.items(): layer = item.layer() if ( layer == currLayer or not layer ): item.setSelected(True)
0.020906
def getPlannedFors(self, projectarea_id=None, projectarea_name=None, archived=False, returned_properties=None): """Get all :class:`rtcclient.models.PlannedFor` objects by project area id or name If both `projectarea_id` and `projectarea_name` are None, all the pla...
0.00234
def get_path_name(self): """Gets path and name of song :return: Name of path, name of file (or folder) """ path = fix_raw_path(os.path.dirname(os.path.abspath(self.path))) name = os.path.basename(self.path) return path, name
0.007326