Get user's tracks.
178785
def get_tracks(self, offset=0, limit=50):
        
        response = self.client.get(
            self.client.USER_TRACKS % (self.name, offset, limit))
        return self._parse_response(response, strack)
403193
def _read_track(chunk):
    """"""

    TEMPO, MIDI = range(2)

    # Deviations: The running status should be reset on non midi events, but
    # some files contain meta events inbetween.
    # TODO: Offset and time signature are not considered.

    tempos = []
    events = []

    chunk = bytearray(chunk)
    deltasum = 0
    status = 0
    off = 0
    while off < len(chunk):
        delta, off = _var_int(chunk, off)
        deltasum += delta
        event_type = chunk[off]
        off += 1
        if event_type == 0xFF:
            meta_type = chunk[off]
            off += 1
            num, off = _var_int(chunk, off)
            # TODO: support offset/time signature
            if meta_type == 0x51:
                data = chunk[off:off + num]
                if len(data) != 3:
                    raise SMFError
                tempo = struct.unpack(">I", b"\x00" + bytes(data))[0]
                tempos.append((deltasum, TEMPO, tempo))
            off += num
        elif event_type in (0xF0, 0xF7):
            val, off = _var_int(chunk, off)
            off += val
        else:
            if event_type < 0x80:
                # if < 0x80 take the type from the previous midi event
                off += 1
                event_type = status
            elif event_type < 0xF0:
                off += 2
                status = event_type
            else:
                raise SMFError("invalid event")

            if event_type >> 4 in (0xD, 0xC):
                off -= 1

            events.append((deltasum, MIDI, delta))

    return events, tempos
11976
def user(netease, name, id):
    """"""
    if name:
        netease.download_user_playlists_by_search(name)

    if id:
        netease.download_user_playlists_by_id(id)
334820
def get_tracks(self):
        
        if not self._track_list:
            tracks = itunespy.lookup(id=self.collection_id, entity=itunespy.entities['song'])[1:]
            for track in tracks:
                self._track_list.append(track)
        return self._track_list
1100886
def get_tracks(self, *args, **kwargs):
        
        args = tuple(['tracks'] + list(args))
        return self.get_music_library_information(*args, **kwargs)
186351
public function getTracks(int $start = 0, int $total = 0): array
    {
        $tracks = [];

        if ($total > 0 && $total < 100) {
            $limit = $total;
        } else {
            $limit = 100;
        }

        do {
            $data = $this->browse("DirectChildren", $start, $limit);
            $parser = new XmlParser($data["Result"]);
            foreach ($parser->getTags("item") as $item) {
                $tracks[] = $this->trackFactory->createFromXml($item);
                if ($total > 0 && count($tracks) >= $total) {
                    return $tracks;
                }
            }

            $start += $limit;
        } while ($data["NumberReturned"] && $data["TotalMatches"] && count($tracks) < $data["TotalMatches"]);

        return $tracks;
    }
1358301
def get_user_profiles(self, prefix):
        """"""
        filepath = "{}{}".format(self.base_path, prefix)
        return UserProfiles(filepath, prefix)
1093661
def get_now_playing(self):
        

        params = self._get_params()
        params["limit"] = "1"

        doc = self._request(self.ws_prefix + ".getRecentTracks", False, params)

        tracks = doc.getElementsByTagName("track")

        if len(tracks) == 0:
            return None

        e = tracks[0]

        if not e.hasAttribute("nowplaying"):
            return None

        artist = _extract(e, "artist")
        title = _extract(e, "name")

        return Track(artist, title, self.network, self.name)
1173913
def track(name, properties = {}, options = {})
      if exclude?
        debug "Event excluded"
      elsif missing_params?
        debug "Missing required parameters"
      else
        data = {
          visit_token: visit_token,
          user_id: user.try(:id),
          name: name.to_s,
          properties: properties,
          time: trusted_time(options[:time]),
          event_id: options[:id] || generate_id
        }.select { |_, v| v }

        @store.track_event(data)
      end
      true
    rescue => e
      report_exception(e)
    end
627845
def trackSeek(path, artist, album, track, trackNum, fmt):
    """"""
    hiddenName = "(Hidden Track).{}".format(fmt)
    trackName = track + ".{}".format(fmt)
    songIn = instantiateSong(path)
    times = findGap(songIn)
    saveFiles(trackName, hiddenName, splitSong(songIn, times[0], times[1]), artist, album, trackNum)
    # return [path, track.rsplit('/',1)[0] +'/{}'.format(hiddenName)]
    return [trackName, hiddenName]
392867
function getTrackInfo( list, keyOf ){

  var untrack = [], trackMap = {};

  for(var i = 0, len = list.length; i < len ; i++){

    var item = list[i];
    var trackKey = keyOf(list[i]);

    // can be stringify
    if( !trackMap.hasOwnProperty(trackKey) ){

      trackMap[ trackKey ] = i
    }else{

      untrack.push( i )
    }
  }

  return {
    untrack: untrack,
    trackMap: trackMap
  }
}
547188
public List<Integer> getTrackIds() {
        ArrayList<Integer> results = new ArrayList<Integer>(trackCount);
        Enumeration<? extends ZipEntry> entries = zipFile.entries();
        while (entries.hasMoreElements()) {
            ZipEntry entry = entries.nextElement();
            if (entry.getName().startsWith(CACHE_METADATA_ENTRY_PREFIX)) {
                String idPart = entry.getName().substring(CACHE_METADATA_ENTRY_PREFIX.length());
                if (idPart.length() > 0) {
                    results.add(Integer.valueOf(idPart));
                }
            }
        }

        return Collections.unmodifiableList(results);
    }
460843
private int dropUnusedTracks() {

		List<PointTrack> all = tracker.getAllTracks(null);
		int num = 0;

		for (PointTrack t : all) {
			VoTrack p = t.getCookie();
			if (tick - p.lastInlier > thresholdRetire) {
				tracker.dropTrack(t);
				num++;
			}
		}

		return num;
	}
10369
def _parse_track_id(self,sdp):
        ''''''
        m = re.search(r'a=control:(?P<trackid>[\w=\d]+)',sdp,re.S)
        return (m and m.group('trackid')) or ''
519595
public Observable<ArrayList<SoundCloudTrack>> getArtistTracks() {
        checkState();
        if (mCacheRam.tracks.size() != 0) {
            return Observable.create(new Observable.OnSubscribe<ArrayList<SoundCloudTrack>>() {
                @Override
                public void call(Subscriber<? super ArrayList<SoundCloudTrack>> subscriber) {
                    subscriber.onNext(mCacheRam.tracks);
                    subscriber.onCompleted();
                }
            });
        } else {
            return mRetrofitService.getUserTracks(mArtistName)
                    .map(RxParser.PARSE_USER_TRACKS)
                    .map(cacheTracks());
        }
    }
726459
def traceCount(self):
        
        nsegs = sum([len(track) for track in self._segments])
        if nsegs == 0:
            return 0
        ntraces = 1
        for irow in range(self._autoParams.nrows()):
            ntraces = ntraces*self._autoParams.numSteps(irow)
        return ntraces
699678
def get_tagged_tracks(self, tag, limit=None, cacheable=True):
        """"""

        params = self._get_params()
        params["tag"] = tag
        params["taggingtype"] = "track"
        if limit:
            params["limit"] = limit
        doc = self._request(self.ws_prefix + ".getpersonaltags", cacheable, params)
        return _extract_tracks(doc, self.network)