Skip to content

Instantly share code, notes, and snippets.

View Fperdreau's full-sized avatar

Florian Perdreau Fperdreau

  • Spotify
  • Pays-Bas
View GitHub Profile
@bwhite
bwhite / rank_metrics.py
Created September 15, 2012 03:23
Ranking Metrics
"""Information Retrieval metrics
Useful Resources:
http://www.cs.utexas.edu/~mooney/ir-course/slides/Evaluation.ppt
http://www.nii.ac.jp/TechReports/05-014E.pdf
http://www.stanford.edu/class/cs276/handouts/EvaluationNew-handout-6-per.pdf
http://hal.archives-ouvertes.fr/docs/00/72/67/60/PDF/07-busa-fekete.pdf
Learning to Rank for Information Retrieval (Tie-Yan Liu)
"""
import numpy as np
@jakevdp
jakevdp / discrete_cmap.py
Last active July 2, 2024 09:43
Small utility to create a discrete matplotlib colormap
# By Jake VanderPlas
# License: BSD-style
import matplotlib.pyplot as plt
import numpy as np
def discrete_cmap(N, base_cmap=None):
"""Create an N-bin discrete colormap from the specified input map"""
@predictioniogists
predictioniogists / pioexport
Created April 1, 2015 23:47
pio export example
$ bin/pio export --appid 8 --output /home/exportFinal3 --format parquet
@EthanRosenthal
EthanRosenthal / ExplicitMF_ALS.py
Created March 13, 2016 20:38
Class for ALS training of an explicit matrix factorization model
from numpy.linalg import solve
class ExplicitMF():
def __init__(self,
ratings,
n_factors=40,
item_reg=0.0,
user_reg=0.0,
verbose=False):
"""
@aparrish
aparrish / understanding-word-vectors.ipynb
Last active July 9, 2024 15:59
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@max-mapper
max-mapper / bibtex.png
Last active March 10, 2024 21:53
How to make a scientific looking PDF from markdown (with bibliography)
bibtex.png
@unfulvio
unfulvio / epson-iscan-networked-scanner.md
Created July 5, 2017 04:14
Get Epson iScan to work in Ubuntu with a networked/wireless scanner

If you see this error upon starting iScan aka "Image Scan for Linux":

“Could not send command to scanner. Check the scanner’s status.”

It means the iScan couldn't find the scanner. This happens often if it's not connected via USB, but lives in a wireless network for instance.

Do the following:

cd /etc/sane.d/
@luispuerto
luispuerto / r_ubuntu.sh
Last active December 19, 2020 16:16 — forked from ElToro1966/r_ubuntu_18_04.sh
Install R and RStudio on Ubuntu 19.10 with essential libraries for data science. Based on pachamaltese/r_ubuntu_17_10.sh (for Ubuntu 17.10). Note: You need to make sure the default library location - /usr/local/lib/R/site-packages - is writable .
# Add repo to install the last R
sudo apt install apt-transport-https software-properties-common
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu eoan-cran35/'
# Install R
sudo apt update
sudo apt install gdebi libxml2-dev libssl-dev libcurl4-openssl-dev libopenblas-dev r-base r-base-dev
# Install RStudio