Skip to content

Instantly share code, notes, and snippets.

View PhDP's full-sized avatar
🏠
Working from home

Philippe Desjardins-Proulx PhDP

🏠
Working from home
View GitHub Profile
@tpoisot
tpoisot / scriptoria-scheme.json
Created October 27, 2013 17:25
Scheme for scriptoria papers
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Scriptoria object",
"description": "Meta-data about a publication registered in scriptoria",
"type": "object",
"properties": {
"source": {
"description": "URI of the original repository",
"type": "string"
},
@PhDP
PhDP / scriptoria-scheme.json
Last active December 26, 2015 17:09 — forked from tpoisot/scriptoria-scheme.json
First draft of Scriptoria's JSON schema (has bugs I think).
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Scriptoria object",
"description": "Meta-data about a publication registered in scriptoria",
"type": "object",
"properties": {
"source": {
"description": "URL of the original repository",
"type": "string"
},
@PhDP
PhDP / Titles.fs
Last active December 31, 2015 18:49
Get titles from arXiv's Stat.ML
open System.Xml.Linq
open FSharp.Data
/// Use F#'s awesome type provider to access arXiv's API.
type StatML = XmlProvider<"http://export.arxiv.org/api/query?search_query=stat.ML&start=0&max_results=1000">
/// Request Stat.ML articles from 'a' to 'b'.
let APIReq (a: int) (b: int) =
"http://export.arxiv.org/api/query?search_query=stat.ML&start=" + (string a) + "&max_results=" + (string b)
@tpoisot
tpoisot / ecology.py
Created January 8, 2014 17:15
Read random tweets, and tweets mentioning words related to ecology
#! /usr/bin/python2
import json
from TwitterAPI import TwitterAPI
c_key = '...'
c_sec = '...'
t_key = '...'
t_sec = '...'
@PhDP
PhDP / ecology.py
Created January 8, 2014 17:36 — forked from tpoisot/ecology.py
#! /usr/bin/python2
import json
from TwitterAPI import TwitterAPI
c_key = '...'
c_sec = '...'
t_key = '...'
t_sec = '...'
@bitemyapp
bitemyapp / gist:8739525
Last active May 7, 2021 23:22
Learning Haskell
@johnmyleswhite
johnmyleswhite / gist:14dbd928019669faef82
Last active August 29, 2015 14:06
Benchmarking Resources
#include <RcppArmadillo.h>
#include <omp.h>
using namespace Rcpp;
using namespace arma;
// [[Rcpp::depends(RcppArmadillo)]]
// [[Rcpp::plugins(openmp)]]
// [[Rcpp::export]]
void updateImplicitX_p(arma::mat & X, const arma::mat & Y, const arma::mat & P, const arma::mat & C, double lambda, int cores = 1) {
@mullr
mullr / core_match.clj
Created August 4, 2015 15:33
simplifier-clojure
(ns clj-automated-reasoning.core-match
(:require [clojure.core.match :as cm]))
(defn simplify1 [e]
(cm/match [e]
[(['+ 0 x] :seq)] x
[(['+ x 0] :seq)] x
[(['* x 1] :seq)] x
[(['* 1 x] :seq)] x
[(['* x 0] :seq)] 0
@erikbern
erikbern / install-tensorflow.sh
Last active June 26, 2023 00:40
Installing TensorFlow on EC2
# Note – this is not a bash script (some of the steps require reboot)
# I named it .sh just so Github does correct syntax highlighting.
#
# This is also available as an AMI in us-east-1 (virginia): ami-cf5028a5
#
# The CUDA part is mostly based on this excellent blog post:
# http://tleyden.github.io/blog/2014/10/25/cuda-6-dot-5-on-aws-gpu-instance-running-ubuntu-14-dot-04/
# Install various packages
sudo apt-get update