Returns a list of URLs for text files containing all your stats data (from November 26th 2007 onwards) for the currently auth'd user.

@throws FlickrException

@see "http://www.flickr.com/services/api/flickr.stats.getCSVFiles.html"
183735
public List<Csv> getCSVFiles() throws FlickrException {
        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("method", METHOD_GET_CSV_FILES);

        Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
        if (response.isError()) {
            throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
        }

        List<Csv> csvFiles = parseCsvFiles(response);

        return csvFiles;
    }
692906
private static URL[] getUrls(File directory) throws MalformedURLException, IOException
   {
      List<URL> list = new LinkedList<URL>();

      if (directory.exists() && directory.isDirectory())
      {
         // Add directory
         list.add(directory.toURI().toURL());

         // Add the contents of the directory too
         File[] jars = directory.listFiles(new FilenameFilter()
         {
            /**
             * Accept
             * @param dir The directory
             * @param name The name
             * @return True if accepts; otherwise false
             */
            public boolean accept(File dir, String name)
            {
               return name.endsWith(".jar");
            }
         });

         if (jars != null)
         {
            for (int j = 0; j < jars.length; j++)
            {
               list.add(jars[j].getCanonicalFile().toURI().toURL());
            }
         }
      }
      return list.toArray(new URL[list.size()]);
   }
1366799
private UsernamePasswordCredentials getCreds(String url) throws Exception {
        url = normalizeURL(url);
        url = url.substring(url.indexOf("/") + 2);

        UsernamePasswordCredentials longestMatch = null;
        int longestMatchLength = 0;

        Iterator<String> iter = m_creds.keySet().iterator();
        while (iter.hasNext()) {
            String realmPath = (String) iter.next();
            if (url.startsWith(realmPath)) {
                int matchLength = realmPath.length();
                if (matchLength > longestMatchLength) {
                    longestMatchLength = matchLength;
                    longestMatch =
                            (UsernamePasswordCredentials) m_creds
                                    .get(realmPath);
                }
            }
        }
        return longestMatch;
    }
834150
public static URL[] findClassPaths()
   {
      List<URL> list = new ArrayList<URL>();
      String classpath = System.getProperty("java.class.path");
      StringTokenizer tokenizer = new StringTokenizer(classpath, File.pathSeparator);

      while (tokenizer.hasMoreTokens())
      {
         String path = tokenizer.nextToken();
         File fp = new File(path);
         if (!fp.exists()) {
        	 throw new RuntimeException("File in java.class.path does not exist: " + fp);
         }
         try
         {
            list.add(fp.toURL());
         }
         catch (MalformedURLException e)
         {
            throw new RuntimeException(e);
         }
      }
      return list.toArray(new URL[list.size()]);
   }
1186498
public SftpFileAttributes getAttributes() throws SftpStatusException,
			SshException {
		if (attrs == null) {
			attrs = sftp.getAttributes(getAbsolutePath());
		}

		return attrs;
	}
1287650
private static function links()
    {
        $files = ['Link'];
        $folder = static::$root.'Http/Links'.'/';

        self::call($files, $folder);

        $files = ['LinkKeyNotFoundException'];
        $folder = static::$root.'Http/Links/Exceptions'.'/';

        self::call($files, $folder);
    }
429835
protected URL[] getUrls(File directory) throws MalformedURLException, IOException
   {
      List<URL> list = new LinkedList<URL>();

      if (directory.exists() && directory.isDirectory())
      {
         // Add directory
         list.add(directory.toURI().toURL());

         // Add the contents of the directory too
         File[] jars = directory.listFiles(new JarFilter());

         if (jars != null)
         {
            for (int j = 0; j < jars.length; j++)
            {
               list.add(jars[j].getCanonicalFile().toURI().toURL());
            }
         }
      }
      return list.toArray(new URL[list.size()]);
   }
171646
def get_credentials_for_url(url, opts, force_user=None):
    
    creds = None
    verbose = int(opts.get("verbose"))
    force_prompt = opts.get("prompt", False)
    allow_prompt = not opts.get("no_prompt", True)
    allow_keyring = not opts.get("no_keyring", False) and not force_user
    allow_netrc = not opts.get("no_netrc", False) and not force_user

    # print("get_credentials_for_url", force_user, allow_prompt)
    if force_user and not allow_prompt:
        raise RuntimeError(
            "Cannot get credentials for a distinct user ({}) from keyring or .netrc and "
            "prompting is disabled.".format(force_user)
        )

    # Lookup our own pyftpsync 1.x credential store. This is deprecated with 2.x
    home_path = os.path.expanduser("~")
    file_path = os.path.join(home_path, DEFAULT_CREDENTIAL_STORE)
    if os.path.isfile(file_path):
        raise RuntimeError(
            "Custom password files are no longer supported. Delete {} and use .netrc instead.".format(
                file_path
            )
        )

    # Query keyring database
    if creds is None and keyring and allow_keyring:
        try:
            # Note: we pass the url as `username` and username:password as `password`
            c = keyring.get_password("pyftpsync", url)
            if c is not None:
                creds = c.split(":", 1)
                write(
                    "Using credentials from keyring('pyftpsync', '{}'): {}:***.".format(
                        url, creds[0]
                    )
                )
            else:
                if verbose >= 4:
                    write(
                        "No credentials found in keyring('pyftpsync', '{}').".format(
                            url
                        )
                    )
        #        except keyring.errors.TransientKeyringError:
        except Exception as e:
            # e.g. user clicked 'no'
            write_error("Could not get password from keyring {}".format(e))

    # Query .netrc file
    #     print(opts)
    if creds is None and allow_netrc:
        try:
            authenticators = None
            authenticators = netrc.netrc().authenticators(url)
        except CompatFileNotFoundError:
            if verbose >= 4:
                write("Could not get password (no .netrc file).")
        except Exception as e:
            write_error("Could not read .netrc: {}.".format(e))

        if authenticators:
            creds = (authenticators[0], authenticators[2])
            write("Using credentials from .netrc file: {}:***.".format(creds[0]))
        else:
            if verbose >= 4:
                write("Could not find entry for '{}' in .netrc file.".format(url))

    # Prompt for password if we don't have credentials yet, or --prompt was set.
    if allow_prompt:
        if creds is None:
            creds = prompt_for_password(url)
        elif force_prompt:
            # --prompt was set but we can provide a default for the user name
            creds = prompt_for_password(url, default_user=creds[0])

    return creds
946086
@Override
  public final UserCredentials[] retrieveUsersCredentials() throws Exception {
    String query = "select USERTOMCAT.ITSUSER as ITSUSER, ITSPASSWORD, ITSROLE"
      + " from USERTOMCAT join USERROLETOMCAT"
        + " on USERROLETOMCAT.ITSUSER = USERTOMCAT.ITSUSER;";
    ArrayList<UserCredentials> result = null;
    IRecordSet<RS> recordSet = null;
    try {
      this.srvDatabase.setIsAutocommit(false);
      this.srvDatabase.
        setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED);
      this.srvDatabase.beginTransaction();
      recordSet = getSrvDatabase().retrieveRecords(query);
      if (recordSet != null && recordSet.moveToFirst()) {
        result = new ArrayList<UserCredentials>();
        UserCredentials uc = null;
        ArrayList<String> roles = new ArrayList<String>();
        do {
          String currUser = recordSet.getString("ITSUSER");
          if (uc == null) {
            uc = new UserCredentials();
            result.add(uc);
            uc.setUserName(currUser);
            uc.setUserPassword(recordSet.getString("ITSPASSWORD"));
          } else if (!currUser.equals(uc.getUserName())) {
            uc.setUserRoles(roles.toArray(new String[roles.size()]));
            roles.clear();
            uc = new UserCredentials();
            result.add(uc);
            uc.setUserName(currUser);
            uc.setUserPassword(recordSet.getString("ITSPASSWORD"));
          }
          roles.add(recordSet.getString("ITSROLE"));
        } while (recordSet.moveToNext());
        uc.setUserRoles(roles.toArray(new String[roles.size()]));
      }
      this.srvDatabase.commitTransaction();
    } catch (Exception ex) {
      this.srvDatabase.rollBackTransaction();
      throw ex;
    } finally {
      this.srvDatabase.releaseResources();
      if (recordSet != null) {
        recordSet.close();
      }
    }
    if (result == null) {
      return null;
    }
    return result.toArray(new UserCredentials[result.size()]);
  }
402679
def available_files(url):
        
        req = requests.get(url)

        if req.status_code != 200:
            raise base.FailedDownloadException('Failed to download data (status {}) from {}!'.format(req.status_code,
                                                                                                     url))

        page_content = req.text
        link_pattern = re.compile(r'<a href="(.*?)">(.*?)</a>')
        available_files = []

        for match in link_pattern.findall(page_content):
            if match[0].endswith('.tgz'):
                available_files.append(os.path.join(url, match[0]))

        return available_files
869668
public function getRawAnswers()
    {
        if (! is_array($this->_sourceDataRaw)) {
            $this->_sourceDataRaw = $this->getSurvey()->getRawTokenAnswerRow($this->_tokenId);
        }
        return $this->_sourceDataRaw;
    }
1137669
public User getLimits() throws FlickrException {
        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("method", METHOD_GET_LIMITS);

        Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
        if (response.isError()) {
            throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
        }
        Element userElement = response.getPayload();
        User user = new User();
        user.setId(userElement.getAttribute("nsid"));
        NodeList photoNodes = userElement.getElementsByTagName("photos");
        for (int i = 0; i < photoNodes.getLength(); i++) {
            Element plElement = (Element) photoNodes.item(i);
            PhotoLimits pl = new PhotoLimits();
            user.setPhotoLimits(pl);
            pl.setMaxDisplay(plElement.getAttribute("maxdisplaypx"));
            pl.setMaxUpload(plElement.getAttribute("maxupload"));
        }
        NodeList videoNodes = userElement.getElementsByTagName("videos");
        for (int i = 0; i < videoNodes.getLength(); i++) {
            Element vlElement = (Element) videoNodes.item(i);
            VideoLimits vl = new VideoLimits();
            user.setPhotoLimits(vl);
            vl.setMaxDuration(vlElement.getAttribute("maxduration"));
            vl.setMaxUpload(vlElement.getAttribute("maxupload"));
        }
        return user;
    }
706989
public int getPhotosetCount(String userId) throws FlickrException {
        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("method", METHOD_GET_LIST);

        if (userId != null) {
            parameters.put("user_id", userId);
        }

        // Request the bare minimum
        parameters.put("per_page", String.valueOf(1));
        parameters.put("page", String.valueOf(1));

        Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
        if (response.isError()) {
            throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
        }
        Element photosetsElement = response.getPayload();

        return Integer.valueOf(photosetsElement.getAttribute("total"));
    }
257793
public List<Comment> getList(String photosetId) throws FlickrException {
        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("method", METHOD_GET_LIST);

        parameters.put("photoset_id", photosetId);

        Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
        if (response.isError()) {
            throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
        }
        // response:
        // <comments photoset_id="72157594152539675">
        // <comment
        // id="2534725-72157594152539675-72157594172966066"
        // author="99589152@N00"
        // authorname="ortrun"
        // datecreate="1150905040"
        // permalink="http://www.flickr.com/photos/extranoise/sets/72157594152539675/comments#comment72157594172966066">
        // really unreal!
        // </comment>
        // <comment
        // id="2534725-72157594152539675-72157594176993150"
        // author="47093120@N00"
        // authorname="nis.jensen"
        // datecreate="1151259227"
        // permalink="http://www.flickr.com/photos/extranoise/sets/72157594152539675/comments#comment72157594176993150">
        // Wow - you're better than most - this was a great view - i'll just take it again!
        // </comment>
        // <comment
        // id="2534725-72157594152539675-72157594176996639"
        // author="47093120@N00"
        // authorname="nis.jensen"
        // datecreate="1151259453"
        // permalink="http://www.flickr.com/photos/extranoise/sets/72157594152539675/comments#comment72157594176996639">
        // Second it's even better!!!!
        // </comment>
        // </comments>
        List<Comment> comments = new ArrayList<Comment>();
        Element commentsElement = response.getPayload();
        NodeList commentNodes = commentsElement.getElementsByTagName("comment");
        int n = commentNodes.getLength();
        for (int i = 0; i < n; i++) {
            Comment comment = new Comment();
            Element commentElement = (Element) commentNodes.item(i);
            comment.setId(commentElement.getAttribute("id"));
            comment.setAuthor(commentElement.getAttribute("author"));
            comment.setAuthorName(commentElement.getAttribute("authorname"));
            comment.setPermaLink(commentElement.getAttribute("permalink"));
            long unixTime = 0;
            try {
                unixTime = Long.parseLong(commentElement.getAttribute("datecreate"));
            } catch (NumberFormatException e) {
                // what shall we do?
                e.printStackTrace();
            }
            comment.setDateCreate(new Date(unixTime * 1000L));
            comment.setText(XMLUtilities.getValue(commentElement));
            comments.add(comment);
        }
        return comments;
    }
100392
def filelists
      fl = []
      @repomd.xpath("/xmlns:repomd/xmlns:data[@type=\"filelists\"]/xmlns:location").each do |f|
       fl << File.join(@url, f['href'])
      end
      fl
    end
456100
def listall(self):
		'''
		
		'''
		file_name = []
		r = requests.get(
			'%s/users/%s/gists' % (BASE_URL, self.user),
			headers=self.gist.header
			)
		r_text = json.loads(r.text)
		limit = len(r.json())
		if (r.status_code == 200 ):
			for g,no in zip(r_text, range(0,limit)):
				for key,value in r.json()[no]['files'].iteritems():
					file_name.append(value['filename'])
			return file_name

		raise Exception('Username not found')
1108847
def getPhotos(self):
        """"""
        method = 'flickr.photosets.getPhotos'
        data = _doget(method, photoset_id=self.id)
        photos = data.rsp.photoset.photo
        p = []
        for photo in photos:
            p.append(Photo(photo.id, title=photo.title, secret=photo.secret, \
                           server=photo.server))
        return p