Skip to content

Instantly share code, notes, and snippets.

turian /
Created Aug 6, 2020
Pandas function to take to the first value for each of a column value
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 = []
colvals = pd.unique(df.loc[:, [colname]].squeeze())
View pl-binary
# Number of inputs
NIN = 1000
NHID = 10
# Number of examples
EXAMPLES = 100000
import timeit
import logging
from collections import OrderedDict
turian / pytorch-lightning-siamese.ipynb
Last active Jun 25, 2020
Pytorch Lightning Siamese
View pytorch-lightning-siamese.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
turian /
Last active Jun 19, 2019
Tune search_k for annoy library.
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
AUTHOR: Joseph Turian
LICENSE: Apache License 2.0

Keybase proof

I hereby claim:

  • I am turian on github.
  • I am 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:

turian /
Created Aug 5, 2012 — forked from osiloke/
A scrapy link extractor that uses BeautifulSoup
Modified from:
to include the text of the link.
import re
from import Link
from urlparse import urljoin
from BeautifulSoup import BeautifulSoup