I hereby claim:
- I am turian on github.
- I am turian (https://keybase.io/turian) on keybase.
- I have a public key whose fingerprint is B8C4 F42B D493 3F85 FA4E 2E94 7384 B7F2 7748 51AB
To claim this, I am signing this object:
def first_by_column(df, colname): | |
""" | |
Pandas function to take to the first value for each of a column value. | |
Useful if the table if sorted in descending order and you want to group over | |
a particular column, to find the max for each value of that field. | |
""" | |
newdf = [] | |
#print(colname) | |
#print(df) | |
colvals = pd.unique(df.loc[:, [colname]].squeeze()) |
# Number of inputs | |
NIN = 1000 | |
NHID = 10 | |
# Number of examples | |
EXAMPLES = 100000 | |
import timeit | |
import logging | |
from collections import OrderedDict |
""" | |
Tune search_k for annoy library. | |
This is for people who want their nearest-neighbors to be above a | |
certain threshold of precision, but otherwise want it as fast as | |
possible. | |
AUTHOR: Joseph Turian | |
LICENSE: Apache License 2.0 | |
""" |
I hereby claim:
To claim this, I am signing this object:
""" | |
Modified from: https://gist.github.com/1142142 | |
to include the text of the link. | |
""" | |
import re | |
from scrapy.link import Link | |
from urlparse import urljoin | |
from BeautifulSoup import BeautifulSoup |