Skip to content

Instantly share code, notes, and snippets.

View deep-introspection's full-sized avatar
🎯
Focusing

Guillaume Dumas deep-introspection

🎯
Focusing
View GitHub Profile
import numpy as np
import matplotlib.pyplot as plt
import mne
from mne import io
from mne.connectivity import spectral_connectivity
from mne.datasets import sample
# Set parameters
data_path = sample.data_path()
raw_fname = data_path + '/MEG/sample/sample_audvis_filt-0-40_raw.fif'
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.cm as cm
trials = 200
x = np.random.randn(trials, 9, 16)
effect_size = np.linspace(0, 1, 9)
sample_size = np.linspace(10, 1000, 16)
@deep-introspection
deep-introspection / EffectSizesBehavior.ipynb
Created June 25, 2019 13:27
Empirical simulations to explore the behavior of various effect size estimators on different distributions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import numpy as np
import scipy.stats as st
nperm = 100
mix = 0.1
score = np.zeros((5, 17))
nparticipants = [int(i) for i in np.logspace(1, 5, 5)]
for ipar, npar in enumerate(nparticipants):
for ivar, nvar in enumerate(range(3, 20)):
accu = 0
@deep-introspection
deep-introspection / run_spatio_temporal_maps.py
Last active February 26, 2020 13:44
Plot spatiotemporal maps of Antoine Rémond (60ies).
#!/usr/bin/env python
# coding=utf-8
"""Spatio-temporal maps of evoked activity."""
# ==============================================================================
# title : run_spatio_temporal_maps.py
# description : Plot spatiotemporal maps of Antoine Rémond (60ies).
# authors : Guillaume Dumas
# date : 2020-02-25
# usage : python run_spatio_temporal_maps.py
@deep-introspection
deep-introspection / raincloud.jl
Created January 28, 2021 17:17
Raincloud plot in Julia
#!/usr/bin/env julia
# author : Guillaume Dumas
# date : 2021-01-28
# notes : inspired by Allen M, Poggiali D, Whitaker K et al.
# https://doi.org/10.12688/wellcomeopenres.15191.2
using StatsPlots
function raincloud(data)
p = violin(data,