Skip to content

Instantly share code, notes, and snippets.

View QuentinAndre's full-sized avatar
🐍

Quentin ANDRE QuentinAndre

🐍
View GitHub Profile
@QuentinAndre
QuentinAndre / mhhb_nma_data_corrected_with_DOI_authors.csv
Created July 20, 2022 18:26
Data of Mertens et al. 2022 (https://doi.org/10.1073/pnas.2107346118), with full author information and DOI added.
We can make this file beautiful and searchable if this error is corrected: Illegal quoting in line 2.
The data of Mertens et al. 2022 (https://doi.org/10.1073/pnas.2107346118), with full author information and DOI added.
To recover authors and DOI, I queried the CrossRef API with the title of the paper: "http://api.crossref.org/works?query.bibliographic={title}&rows=2".
@QuentinAndre
QuentinAndre / distbuilderIE11.min.js
Created November 5, 2020 00:09
IE11-Compatible version of distbuilder
!function(n){var e={};function t(A){if(e[A])return e[A].exports;var o=e[A]={i:A,l:!1,exports:{}};return n[A].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=n,t.c=e,t.d=function(n,e,A){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:A})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var A=Object.create(null);if(t.r(A),Object.defineProperty(A,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)t.d(A,o,function(e){return n[e]}.bind(null,o));return A},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=255)}([function(n,e,t){var A=t(5),o=t(4),r=t(17),i=t(10),c=t(24),s=function(n,e,t){var a,u,l,f,g=n&s.F,d=n&s.G,p=n&s.
@QuentinAndre
QuentinAndre / Bets_S1.csv
Last active September 9, 2020 15:20
Code to reproduce the simulation of André and de Langhe's response to Walasek, Mullett and Stewart.
condition bet_number loss gain
0.0 0.0 6.0 6.0
0.0 1.0 6.0 8.0
0.0 2.0 6.0 10.0
0.0 3.0 6.0 12.0
0.0 4.0 6.0 14.0
0.0 5.0 6.0 16.0
0.0 6.0 6.0 18.0
0.0 7.0 6.0 20.0
0.0 8.0 8.0 6.0
@QuentinAndre
QuentinAndre / simulation.py
Created August 13, 2020 20:21
Simulation of false-positive rates
import numpy as np
import scipy.stats as stats
import matplotlib.pyplot as plt
import seaborn as sns
def exclude_zscore_outliers(x):
"""
A small utility function to exclude *extreme outliers**:
values that are above or below 2 z-score.
"""
std = x.std()
@QuentinAndre
QuentinAndre / README.txt
Created September 13, 2019 11:30
A Jupyter NBConvert HTML template adding a toggle to hide/show each code cell.
# Typical usage: The --no-prompt is important (layout is all messed up otherwise).
jupyter nbconvert MySuperNotebook.ipynb --to html --no-prompt --template code_cells_toggle.tpl
# By default, all cells are hidden. You can override this behavior for some cells by giving them a 'code_shown' tag.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
var default_matrix = [
['V', 'H', 'W', 'X', 'S', 'C', 'E', 'P', 'T', 'E', 'R', 'C', 'R', 'S', 'P', 'S', 'J', 'T'],
['S', 'T', 'T', 'T', 'N', 'X', 'D', 'Y', 'D', 'X', 'L', 'M', 'W', 'K', 'A', 'O', 'B', 'C'],
['G', 'N', 'A', 'R', 'C', 'W', 'O', 'E', 'A', 'Y', 'T', 'R', 'S', 'V', 'L', 'V', 'G', 'J'],
['C', 'T', 'O', 'D', 'O', 'P', 'O', 'F', 'S', 'N', 'N', 'R', 'A', 'H', 'A', 'E', 'G', 'P'],
['E', 'O', 'B', 'M', 'R', 'S', 'D', 'R', 'E', 'C', 'O', 'A', 'O', 'E', 'C', 'R', 'I', 'A'],
['R', 'I', 'L', 'I', 'M', 'F', 'N', 'M', 'C', 'N', 'E', 'U', 'S', 'K', 'E', 'E', 'P', 'A'],
['J', 'E', 'N', 'O', 'A', 'O', 'N', 'O', 'O', 'M', 'S', 'N', 'I', 'T', 'K', 'I', 'U', 'H'],
['H', 'C', 'T', 'M', 'N', 'R', 'C', 'H', 'C', 'E', 'O', 'N', 'T', 'N', 'Y', 'G', 'W', 'L'],
['E', 'T', 'I', 'R', 'E', 'Y', 'H', 'O', 'H', 'M', 'G', 'T', 'I', 'D', 'H', 'N', 'L', 'N'],