Skip to content

Instantly share code, notes, and snippets.

@thesamovar
thesamovar / Automatic scientific axes layout for matplotlib.ipynb
Last active August 14, 2024 22:35
Automatic scientific axes layout for matplotlib.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@birkin
birkin / hddm_install_notes.md
Last active April 21, 2020 12:34
hddm install notes

hddm install notes

Issue

Some python package installs these days suggest starting with Anaconda for understandable good reasons.

I'm a software developer working primarily in python, and want to experiment with Anaconda, and learn, in particular, how to best use it with virtual-environments.

However, in the meantime, I like to be able to experiment with packages using my normal dev-architecture:

@glesserd
glesserd / summarySE.py
Created September 1, 2016 13:28
summarySE, normDataWithin and summarySEwithin of cookbook-r in python
import pandas as pd
import scipy as sp
from scipy.stats import t
import numpy as np
#from: http://www.cookbook-r.com/Graphs/Plotting_means_and_error_bars_%28ggplot2%29/
## Gives count, mean, standard deviation, standard error of the mean, and confidence interval (default 95%).
## data: a data frame.
@mwaskom
mwaskom / SDT_Tutorial.ipynb
Last active June 11, 2024 15:48
Translation of Justin Gardner's Signal Detection Theory tutorial from MATLAB into Python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MikeInnes
MikeInnes / startup.jl
Last active April 28, 2025 14:51
Some useful macros for Julia
# Repeat an operation n times, e.g.
# @dotimes 100 println("hi")
macro dotimes(n, body)
quote
for i = 1:$(esc(n))
$(esc(body))
end
end
end
@rpmuller
rpmuller / Crash Course v0.5.ipynb.json
Last active November 24, 2022 09:14
Crash Course in Python for Scientists
This file has been truncated, but you can view the full file.
{
"metadata": {
"name": "",
"signature": "sha256:a04c38d9604adb7eb9ca89860dfa1ef72db66037cc2c07c391ef8e67a31f9254"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
@matsen
matsen / svg2tiff
Created December 12, 2012 01:05
A script to convert SVG to a TIFF acceptable to PLOS
#!/bin/sh
# Convert all arguments (assumed SVG) to a TIFF acceptable to PLOS
# Requires Inkscape and ImageMagick 6.8 (doesn't work with 6.6.9)
for i in $@; do
BN=$(basename $i .svg)
inkscape --without-gui --export-png="$BN.png" --export-dpi 300 $i
convert -compress LZW -alpha remove $BN.png $BN.tiff
mogrify -alpha off $BN.tiff