{ "metadata": { "name": "", "signature": "sha256:dd2ac927d8bf8ed846a4d2befabcb5cc3a31f0563d863f0b253f8946edc98c82" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "code", "collapsed": false, "input": [ "%load_ext watermark\n", "%watermark -d -v -a 'Sebastian Raschka' " ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Sebastian Raschka 15/12/2014 \n", "\n", "CPython 2.7.8\n", "IPython 2.1.0\n" ] } ], "prompt_number": 1 }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", "
" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Loading artists and titles from the Million Song Dataset into a Pandas DataFrame" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import pandas as pd\n", "import re\n", "\n", "store = pd.HDFStore('/Users/sebastian/Desktop/msd_summary_file.h5')\n", "artists = pd.Series(store.root.metadata.songs.cols.artist_name)\n", "titles = pd.Series(store.root.metadata.songs.cols.title)\n", "store.close()\n", "\n", "df = pd.concat([artists, titles], axis=1)\n", "\n", "df.columns=['artist', 'title']\n", "\n", "df.loc[:, 'artist'] = df.loc[:, 'artist'].apply((lambda x: x.decode('utf-8')))\n", "df.loc[:, 'title'] = df.loc[:, 'title'].apply((lambda x: x.decode('utf-8')))\n", "\n", "# removes parentheses + content e.g., 'Bleed (Album Version)' -> 'Bleed'\n", "df.loc[:, 'title'] = df.loc[:, 'title'].apply(lambda x: re.sub(r'\\([^)]*\\)', '', x))\n", "df.loc[:, 'artist'] = df.loc[:, 'artist'].apply(lambda x: re.sub(r'\\([^)]*\\)', '', x))\n", "\n", "df.tail()" ], "language": "python", "metadata": {}, "outputs": [ { "ename": "NoSuchNodeError", "evalue": "group ``/`` does not have a child named ``metadata``", "output_type": "pyerr", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mNoSuchNodeError\u001b[0m Traceback (most recent call last)", "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0mstore\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mpd\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mHDFStore\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'/Users/sebastian/Desktop/msd_summary_file.h5'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 5\u001b[0;31m \u001b[0martists\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mpd\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mSeries\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mstore\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mroot\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmetadata\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msongs\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcols\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0martist_name\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 6\u001b[0m \u001b[0mtitles\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mpd\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mSeries\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mstore\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mroot\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmetadata\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msongs\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcols\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtitle\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 7\u001b[0m \u001b[0mstore\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mclose\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;32m/Users/sebastian/miniconda3/envs/py34/lib/python3.4/site-packages/tables/group.py\u001b[0m in \u001b[0;36m__getattr__\u001b[0;34m(self, name)\u001b[0m\n\u001b[1;32m 809\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_g_add_children_names\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 810\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mmydict\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mname\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 811\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_f_get_child\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 812\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 813\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m__setattr__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mname\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mvalue\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;32m/Users/sebastian/miniconda3/envs/py34/lib/python3.4/site-packages/tables/group.py\u001b[0m in \u001b[0;36m_f_get_child\u001b[0;34m(self, childname)\u001b[0m\n\u001b[1;32m 679\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_g_check_open\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 680\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 681\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_g_check_has_child\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mchildname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 682\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 683\u001b[0m \u001b[0mchildpath\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mjoin_path\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_v_pathname\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mchildname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;32m/Users/sebastian/miniconda3/envs/py34/lib/python3.4/site-packages/tables/group.py\u001b[0m in \u001b[0;36m_g_check_has_child\u001b[0;34m(self, name)\u001b[0m\n\u001b[1;32m 403\u001b[0m raise NoSuchNodeError(\n\u001b[1;32m 404\u001b[0m \u001b[0;34m\"group ``%s`` does not have a child named ``%s``\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 405\u001b[0;31m % (self._v_pathname, name))\n\u001b[0m\u001b[1;32m 406\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mnode_type\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 407\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;31mNoSuchNodeError\u001b[0m: group ``/`` does not have a child named ``metadata``" ] } ], "prompt_number": 2 }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", "
" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Save the artist-title table as SQLite3 for fututure analyses" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import sqlite3\n", "\n", "conn = sqlite3.connect('../../dataset/million/artist_title.sqlite')\n", "df.to_sql(name='artist_title', con=conn)\n", "conn.commit()\n", "conn.close()" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 3 }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", "
" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Code to scrape lyrics from the web" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import urllib, re\n", "import bs4\n", " \n", "def songlyrics(artist, title):\n", " \n", " artist = artist.encode('utf8', 'replace')\n", " title = title.encode('utf8', 'replace')\n", " \n", " artist = urllib.quote(artist.lower().replace(' ','-'))\n", " title = urllib.quote(title.lower().replace(' ','-'))\n", "\n", " \n", " try:\n", " lyrics = urllib.urlopen('http://www.songlyrics.com/%s/%s-lyrics/' % (artist,title))\n", " except:\n", " return None\n", " text = lyrics.read()\n", " soup = bs4.BeautifulSoup(text)\n", " lyrics = soup.findAll(attrs= {'id' : 'songLyricsDiv'})\n", " if not lyrics:\n", " return None\n", " else:\n", " if str(lyrics[0]).startswith(\"

\"):\n", "\n", " return None\n", " try:\n", " return re.sub('<[^<]+?>', '', ''.join(str(lyrics[0])))\n", " except:\n", " return None\n", "\n", "\n", "def lyricsmode(artist, title):\n", " \n", " artist = artist.encode('utf8', 'replace')\n", " title = title.encode('utf8', 'replace')\n", " \n", " artist = urllib.quote(artist.lower().replace(' ','_'))\n", " title = urllib.quote(title.lower().replace(' ','_'))\n", "\n", " try:\n", " url = 'http://www.lyricsmode.com/lyrics/%s/%s/%s.html' % (artist[0],artist, title)\n", " lyrics = urllib.urlopen(url)\n", " except:\n", " return None \n", " text = lyrics.read()\n", " soup = bs4.BeautifulSoup(text)\n", " #lyricsmode places the lyrics in a span with an id of \"lyrics\"\n", " lyrics = soup.findAll(attrs= {'id' : 'lyrics_text'})\n", " if not lyrics:\n", " return None \n", " try:\n", " return re.sub('<[^<]+?>', '', ''.join(str(lyrics[0])))\n", " except:\n", " return None \n", "\n", "def get_lyrics(artist, title):\n", " lyr = songlyrics(artist, title)\n", " if not lyr:\n", " lyr = lyricsmode(artist, title)\n", " return lyr\n", "\n", "\n", "test = get_lyrics('Bob Dylan','Blowing in the wind')\n", "print(test)\n", "test2 = get_lyrics('test','test')\n", "print(test2)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "How many roads must a man walk down\n", "Before you call him a man?\n", "Yes, 'n' how many seas must a white dove sail\n", "Before she sleeps in the sand?\n", "Yes, 'n' how many times must the cannon balls fly\n", "Before they're forever banned?\n", "\n", "The answer, my friend, is blowin' in the wind\n", "The answer is blowin' in the wind\n", "\n", "How many times must a man look up\n", "Before he can see the sky?\n", "Yes, 'n' how many ears must one man have\n", "Before he can hear people cry?\n", "Yes, 'n' how many deaths will it take till he knows\n", "That too many people have died?\n", "\n", "The answer, my friend, is blowin' in the wind\n", "The answer is blowin' in the wind\n", "\n", "How many years can a mountain exist\n", "Before it's washed to the sea?\n", "Yes, 'n' how many years can some people exist\n", "Before they're allowed to be free?\n", "Yes, 'n' how many times can a man turn his head\n", "Pretending he just doesn't see?\n", "\n", "The answer, my friend, is blowin' in the wind\n", "The answer is blowin' in the wind\n", "None" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\n" ] } ], "prompt_number": 2 }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", "
" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Code to check if lyrics are English" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "As a rule of thumb, I assume that every song that has less than 50% English words (i.e., words that are not in the English vocabulary) is non-English." ] }, { "cell_type": "code", "collapsed": false, "input": [ "import nltk\n", "\n", "def eng_ratio(text):\n", " ''' Returns the ratio of non-English to English words from a text '''\n", "\n", " english_vocab = set(w.lower() for w in nltk.corpus.words.words()) \n", " text_vocab = set(w.lower() for w in text.split() if w.lower().isalpha()) \n", " common = text_vocab.intersection(english_vocab)\n", " try:\n", " diff = len(common)/float(len(text_vocab))\n", " except ZeroDivisionError:\n", " diff = 0.0\n", " return diff\n", " \n", "text = 'This is a test fahrrad'\n", "\n", "print(eng_ratio(text))\n", "lyr = get_lyrics('Pharrell','Happy')\n", "print(eng_ratio(lyr))" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "0.8\n", "0.986666666667" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\n" ] } ], "prompt_number": 3 }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", "
" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Annotating the language of the songs" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The following labels are being used to annotate the songs: \n", "0 = no lyrics \n", "1 = likely English \n", "2 = likely non-English " ] }, { "cell_type": "code", "collapsed": false, "input": [ "#df = df.loc[:3000, :]\n", "df['lang'] = pd.Series('', index=df.index)\n", "df.tail()" ], "language": "python", "metadata": {}, "outputs": [] }, { "cell_type": "code", "collapsed": false, "input": [ "import pyprind\n", "pbar = pyprind.ProgBar(df.shape[0])\n", "for row_id in df.index:\n", " lyr = get_lyrics(artist=df.loc[row_id]['artist'].encode('utf-8'), title=df.loc[row_id]['title'].encode('utf-8'))\n", " \n", " if not lyr:\n", " df.loc[row_id,'lang'] = 0\n", " elif eng_ratio(lyr) >= 0.5:\n", " df.loc[row_id,'lang'] = 1\n", " else:\n", " df.loc[row_id,'lang'] = 2\n", " \n", " pbar.update()" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stderr", "text": [ "0% 100%\n" ] }, { "output_type": "stream", "stream": "stderr", "text": [ "[ ]" ] } ] }, { "cell_type": "code", "collapsed": false, "input": [ "df[df['lang'] == 1].shape" ], "language": "python", "metadata": {}, "outputs": [] }, { "cell_type": "code", "collapsed": false, "input": [ "df = df[df['lang'] == 1]\n", "df.index = range(df.shape[0])\n", "df.tail()" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "
\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
artisttitlelang
647 Suzanne Vega Marlene On The Wall 1
648 Nelly St. Louie 1
649 Larue Reason 1
650 Liam Lynch SOS 1
651 Oasis Boy With The Blues 1
\n", "
" ], "metadata": {}, "output_type": "pyout", "prompt_number": 20, "text": [ " artist title lang\n", "647 Suzanne Vega Marlene On The Wall 1\n", "648 Nelly St. Louie 1\n", "649 Larue Reason 1\n", "650 Liam Lynch SOS 1\n", "651 Oasis Boy With The Blues 1" ] } ], "prompt_number": 20 }, { "cell_type": "code", "collapsed": false, "input": [ "df = df[df['lang'] == 1]\n", "\n", "conn = sqlite3.connect('../../dataset/random_subsets/artist_title_650.sqlite')\n", "df[df['lang'] == 1].loc[:649,:].to_sql(name='artist_title', con=conn)\n", "conn.commit()\n", "conn.close()" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 21 }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", "
" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Pick a random song from the database" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import sqlite3\n", "\n", "conn = sqlite3.connect('../../dataset/random_subsets/artist_title_650.sqlite')\n", "cursor = conn.cursor()\n", "sql = \"SELECT artist,title FROM artist_title ORDER BY RANDOM() LIMIT 1;\"\n", "cursor.execute(sql)\n", "result = cursor.fetchone()\n", "artistname = result[0].decode('utf-8')\n", "songtitle = result[1].decode('utf-8')\n", "print('Arist: %s \\nSong: %s' % (artistname, songtitle))\n", "conn.close()" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Arist: Matisyahu \n", "Song: Warrior\n" ] } ], "prompt_number": 6 }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", "
" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Check songs in the SQLite database" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import sys\n", "import sqlite3\n", "\n", "conn = sqlite3.connect('../../dataset/million/artist_title.sqlite')\n", "c = conn.cursor()\n", "conn.text_factory = str\n", "\n", "sql = \"SELECT COUNT(*) from artist_title WHERE language IS NULL;\"\n", "c.execute(sql)\n", "res = c.fetchone()\n", "print('Started at: %s' %res[0]) \n", "\n", "try:\n", "\n", " while True:\n", "\n", " \n", " \n", " \n", "\n", " sql = \"SELECT rowid,artist,title FROM artist_title WHERE language IS NULL LIMIT 1;\"\n", " c.execute(sql)\n", " result = c.fetchone()\n", " row_id = result[0]\n", " artistname = result[1].decode('utf-8')\n", " songtitle = result[2].decode('utf-8')\n", " \n", " \n", " lyr = get_lyrics(artist=artistname, title=songtitle)\n", " \n", " lang = None\n", " if not lyr:\n", " lang = 0\n", " elif eng_ratio(lyr) >= 0.5:\n", " lang = 1\n", " else:\n", " lang = 2\n", " \n", " sql = \"UPDATE artist_title SET language=?,lyrics=? WHERE rowid=?;\"\n", " \n", " c.execute(sql, (lang, lyr, row_id))\n", " \n", " \n", " conn.commit()\n", " \n", " # count remaining songs\n", " sql = \"SELECT COUNT(*) from artist_title WHERE language IS NULL;\"\n", " c.execute(sql)\n", " res = c.fetchone()\n", " remaining = res[0]\n", " \n", " sys.stdout.write('\\r')\n", " sys.stdout.write('Remaining: %s' %remaining)\n", " sys.stdout.flush()\n", " if not remaining:\n", " break\n", " \n", "finally:\n", " conn.commit()\n", " conn.close()\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Started at: 988287\n", "\r" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Remaining: 988286" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988285" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988284" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988283" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988282" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988281" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988280" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988279" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988278" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988277" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988276" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988275" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988274" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988273" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988272" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988271" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988270" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988269" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988268" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988267" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988266" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988265" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988264" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988263" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988262" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988261" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988260" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988259" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988258" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988257" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988256" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988255" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988254" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988253" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988252" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988251" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988250" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988249" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988248" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988247" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988246" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988245" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988244" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\r", "Remaining: 988243" ] } ] }, { "cell_type": "code", "collapsed": false, "input": [ "print('test')" ], "language": "python", "metadata": {}, "outputs": [] }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }