This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul class="lang-menu"> | |
<li><a href="{{ path(app.request.get('_route'), app.request.get('_route_params')|merge({'_locale': 'ca'})) }}">Català</a></li> | |
<li><a href="{{ path(app.request.get('_route'), app.request.get('_route_params')|merge({'_locale': 'en'}))}}">English</a></li> | |
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyspark import SparkContext | |
from heapq import heappush, heappop | |
import re | |
logFilePath = '/Users/rkempter/Downloads/lastfm-dataset-1K/userid-timestamp-artid-artname-traid-traname.tsv' | |
def get_top_N_artists(tuple, top_N=10): | |
""" | |
Returns the top N artists | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
awk 'BEGIN {srand()} !/^$/ { if (rand() <= .5) print $0}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Installing tmux on Amazon-EC2 | |
# If you don't have libevent install use wget to install the libevent and install | |
wget https://github.com/downloads/libevent/libevent/libevent-2.0.18-stable.tar.gz | |
tar zxf libevent-2.0.18-stable.tar.gz | |
cd libevent-2.0.18-stable && sudo ./configure && sudo make install | |
# If you don't have curses install use yum to install the curses |