This file contains hidden or 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
wget https://dumps.wikimedia.org/other/pagecounts-all-sites/2015/2015-05/pagecounts-20150501-000000.gz | |
gzip -cd pagecounts-20150501-000000.gz | grep "^da " | perl -anle "print @F[2] . ' ' . @F[1] unless @F[1] =~ /(Bruger|Brugerdiskussion|da|Diskussion|Fil|Hj\%C3\%A6lp|Hj\%C3\%A6lp-diskussion|Kategori|Kategoridiskussion|MediaWiki|Portal|Skabelon|Skabelondiskussion|Speciel|Wikipedia|Wikipedia-diskussion):/i" | sort -nr | less |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
s = u"""DTU course 02819 is taught by Mr. Finn Årup Nielsen, | |
Ph.D. Some of aspects of the course are: machine learning and web | |
2.0. The telephone to Finn is (+45) 4525 3921, and his email is | |
[email protected]. A book published by O'Reilly called 'Programming | |
Collective Intelligence' might be useful. It costs $39.99 or 285.00 | |
kroner in Polyteknisk Boghandle. Is 'Text Processing in Python' | |
appropriate for the course? Perhaps! The constructor function in | |
Python is called "__init__()". fMRI will not be a topic of the | |
course.""" |
This file contains hidden or 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 collections import Counter | |
from nltk.corpus import brown | |
from pytagcloud import create_tag_image, make_tags | |
from PIL import Image | |
# Developed from https://pypi.python.org/pypi/pytagcloud | |
create_tag_image(make_tags(Counter(brown.words()).most_common(150), maxsize=300), 'cloud.png', size=(900, 600), fontname='Lobster') | |
Image.open('cloud.png').show() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
import re | |
import requests | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
pd.Series({re.findall('^(.+)\n', section)[0]: len(re.findall('^\*', section, flags=re.MULTILINE)) for section in re.split('^##[^#]', requests.get('https://raw.githubusercontent.com/josephmisiti/awesome-machine-learning/master/README.md').text, flags=re.MULTILINE)[1:-1]}).plot(kind='barh', title="'Awesome' machine learning links") | |
plt.show() |
This file contains hidden or 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 math import exp | |
import numpy as np | |
import matplotlib.pyplot as plt | |
def sigmoid(x): | |
return 1.0 / (1.0 + exp(-x)) | |
def implication(a, b): |