<commit_before>#!/usr/bin/python

from datetime import datetime
from optparse import OptionParser
from urllib2 import urlopen

from BeautifulSoup import BeautifulSoup


if __name__ == '__main__':
    usage = "%prog <USERNAME> <WEB SERVER>"
    parser = OptionParser(usage=usage)
    opts,args = parser.parse_args()
    if len(args) != 2:
        parser.error("All arguments are required.")

    username,server = args
    if server[:7] != "http://":
        server = "http://%s" % (server,)
    soup = BeautifulSoup(urlopen('%s/user/%s/recent-tracks'
                                    % (server, username)))
    gobbles_list = soup.find('ul', {'class': 'gobbles'})
    timestamp = gobbles_list.find('li')['about'].split('#')[1].split('.')[0]
    print datetime.fromtimestamp(float(timestamp))<commit_msg>Made libre.fm server default for most_recent.py.<commit_after>#!/usr/bin/python

from datetime import datetime
from optparse import OptionParser
from urllib2 import urlopen

from BeautifulSoup import BeautifulSoup
from gobble import get_parser


if __name__ == '__main__':
    usage = "%prog [-s <WEB SERVER>] <USERNAME>"
    parser = get_parser(usage=usage)
    parser.set_defaults(server='alpha.libre.fm')
    opts,args = parser.parse_args()
    if len(args) != 1:
        parser.error("All arguments are required.")

    username, = args
    server = opts.server
    if server[:7] != "http://":
        server = "http://%s" % (server,)
    soup = BeautifulSoup(urlopen('%s/user/%s/recent-tracks'
                                    % (server, username)))
    gobbles_list = soup.find('ul', {'class': 'gobbles'})
    timestamp = gobbles_list.find('li')['about'].split('#')[1].split('.')[0]
    print datetime.fromtimestamp(float(timestamp))
{'fraction_non_alphanumeric': 0.15446224256292906, 'fraction_numerical': 0.005720823798627002, 'mean_word_length': 3.361596009975062, 'pattern_counts': {'":': 2, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6237239', 'n_tokens_mistral': 561, 'n_tokens_neox': 542, 'n_words': 124}