Skip to content

Instantly share code, notes, and snippets.

Antoine Lizee antoine-lizee

Block or report user

Report or block antoine-lizee

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:4bc599cce4296dc95d16
Verifying that +alizee is my Bitcoin username. You can send me #bitcoin here: https://onename.io/alizee
View s_dplyr.R
# Helper functions that allow string arguments for dplyr's data modification functions like arrange, select etc.
# Author: Sebastian Kranz
# Examples are below
#' Modified version of dplyr's filter that uses string arguments
#' @export
s_filter = function(.data, ...) {
eval.string.dplyr(.data,"filter", ...)
}
View claim_queries.R
## claim_queries.R
# Quick R-script to test the claim API built by
# Andrew.
# Setup -------------------------------------------------------------------
# Library
library(httr)
# Constants
View devaluation.R
## Fuction that computes the devaluation factor depending on the
# time interval, based on the target yearly ratio.
decrease <- function(days, yrRatio = 0.5) {
exp(days/365.25 * log(yrRatio))
}
# Test & plot
x <- 0:800;
plot(x, decrease(x), type = "l", yaxp = c(0.25, 1, 3), #xaxp = c(0, 365.25*2, 6),
@antoine-lizee
antoine-lizee / install_ensurepip.py
Last active Jul 6, 2016 — forked from uranusjr/install_ensurepip.py
Script to install ensurepip to Python. Works on MacOSX for Anaconda and classic python installs.
View install_ensurepip.py
import os
import sys
import io
import tarfile
import urllib.request
import re
ARCHIVE_URL = 'http://d.pr/f/YqS5+'
@antoine-lizee
antoine-lizee / host_routed_app.py
Last active Dec 22, 2016
Implement exception-based catchall host routing with flask & tests
View host_routed_app.py
from werkzeug.routing import Rule as BaseRule
class Rule(BaseRule):
except_hosts = []
def match(self, path):
""" Monkey patched version of the default Werkzeug behavior to achieve host matching with catchall.
By default, if host matching is enabled, the match is only done if the host is always provided, which is
View email_provider_domains.txt
gmail.com
yahoo.com
hotmail.com
aol.com
hotmail.co.uk
hotmail.fr
msn.com
yahoo.fr
wanadoo.fr
orange.fr
You can’t perform that action at this time.