This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <thread> | |
| #include <iostream> | |
| #include <vector> | |
| #include <string> | |
| #include <algorithm> | |
| #include <cassert> | |
| using namespace std; | |
| void foncI(int m) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(ggplot2) | |
| # First get the Iris histogram | |
| histo_list <- lapply(names(iris)[1:4], | |
| function (colname) qplot(iris[[colname]], geom = "histogram", xlab = colname)) | |
| # Add two sets of random normal samples | |
| n <- 100 | |
| histo_list[[5]] <- qplot(rnorm(n), geom='histogram', xlab='rand-norm-1') | |
| histo_list[[6]] <- qplot(rnorm(n), geom='histogram', xlab='rand-norm-2') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \RequirePackage{amsmath,amsfonts,amsthm,amssymb} | |
| \RequirePackage{mathtools} | |
| \RequirePackage{graphicx} | |
| % http://tex.stackexchange.com/questions/229355/algorithm-algorithmic-algorithmicx-algorithm2e-algpseudocode-confused | |
| %\RequirePackage{algorithmicx, algpseudocode} | |
| \RequirePackage[ruled,vlined]{algorithm2e} | |
| \RequirePackage[T1]{fontenc} | |
| \RequirePackage[utf8]{inputenc} | |
| \RequirePackage{mathpazo} % add possibly `sc` and `osf` options | |
| \RequirePackage{eulervm} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Change file names -> change spaces to under-scores | |
| find . -name \*.ipynb -type f -exec bash -c 'mv "$@" $(echo "$@" | tr " " "_")' -- {} \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import OpenEXR, Imath | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| def exr_split_channels(exr_fname): | |
| """ | |
| Load a Mitsuba render generated multi-channel OpenEXR file. | |
| Split the channels according to the information stored. | |
| """ | |
| ## Load all images |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Find an optimal way to explore the Olympic Park west of Seattle | |
| Ref: http://www.nps.gov/olym/planyourvisit/gettingaround.htm | |
| """ | |
| import z3 | |
| # import matplotlib.pyplot as plt | |
| # import seaborn as sns | |
| # sns.set_context("paper") # also: talk, poster, etc. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git ls-files -ci --exclude-standard -z | xargs -0 git rm --cached 2>/dev/null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json # export data for d3 visualization | |
| import numpy as np | |
| import scipy.cluster.hierarchy as hclust | |
| ## Compute histogram based on the Wasserstein distance matrix | |
| def build_json_tree(node, parent): | |
| """ | |
| Build a tree for the json format | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Recursively reload depedencies | |
| # Ref: https://ipython.org/ipython-doc/dev/interactive/reference.html#dreload | |
| from IPython.lib.deepreload import reload as dreload | |
| # %load_ext autoreload | |
| # %autoreload 2 | |
| import numpy as np | |
| import scipy.io as sio | |
| import json # export data for d3 visualization | |
| from mlearn_hclust import hierarchical_clustering |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <meta charset="utf-8"> | |
| <title>Votre Titre</title> | |
| <style> | |
| .node circle { | |
| fill: #fff; | |
| stroke: steelblue; | |
| stroke-width: 1.5px; | |
| } |