I hereby claim:
- I am dangom on github.
- I am dangom (https://keybase.io/dangom) on keybase.
- I have a public key ASBKgWA4c8boXP8dXRDZtHTRQ9v9JGGiwsVY8x8Dg1br3Qo
To claim this, I am signing this object:
;; modify ob-js to redirect to skewer if it is currently connected | |
;; this code can go in an emacs settings file | |
(require 'ob-js) | |
(require 'cl) | |
(advice-add 'org-babel-execute:js :around 'bill/org-babel-execute:skewer) | |
;;(advice-remove 'org-babel-execute:js #'bill/org-babel-execute:skewer) | |
(defun bill/org-babel-execute:skewer (oldFunc body params) | |
(if (skewer-ping) | |
(lexical-let* ((result-type (cdr (assoc :result-type params))) |
I hereby claim:
To claim this, I am signing this object:
#! /usr/bin/python | |
# | |
# Author: Gaute Hope ([email protected]) / 2015 | |
# | |
# based on example from matlab sinc function and | |
# interpolate.m by H. Hobæk (1994). | |
# | |
# this implementation is similar to the matlab sinc-example, but | |
# calculates the values sequentially and not as a single matrix | |
# matrix operation for all the values. |
If you’ve tried recently to install matlab engine on a Python 3.6, you’ve seen a message saying that the platform is not supported. That doesn’t make any sense, since Python 3.5 is supported, right?
The problem is that Mathworks hardcodes a list with valid versions, I guess to reduce pressure on their customer service in case something goes wrong with untested versions. Well, that doesn’t mean that we shouldn’t be allowed to try it anyway, right?
#!/bin/bash | |
# Time-stamp: <2017-07-19 15:06:39 dangom> | |
# Script for installing BART and dependencies from source on a CentOS machine without admin rights. | |
# Steps: | |
# 1. Build OpenBLAS from source to enable support for LAPACKE C API. | |
# 2. Build FFTW3 from source to enable float32 support (fftw defaults to double precision. BART doesn't) | |
# 3. Link against Matlab2016, because something changed in Matlab2017 and the BART build breaks. | |
# 4. Download Cmake >= 3 since cluster ships with old cmake 2.8 |
""" | |
Partial Correlation in Python (clone of Matlab's partialcorr) | |
This uses the linear regression approach to compute the partial | |
correlation (might be slow for a huge number of variables). The | |
algorithm is detailed here: | |
http://en.wikipedia.org/wiki/Partial_correlation#Using_linear_regression | |
Taking X and Y two variables of interest and Z the matrix with all the variable minus {X, Y}, |
#!/bin/bash | |
## cf from http://programster.blogspot.com/2014/05/ubuntu-14-desktop-install-fira-sans-and.html | |
cd /tmp | |
# install unzip just in case the user doesn't already have it. | |
if [[ `uname` = Linux ]]; then | |
sudo apt-get install unzip -y | |
wget "http://www.carrois.com/downloads/fira_4_1/FiraFonts4106.zip" |
# Add field | |
echo '{"hello": "world"}' | jq --arg foo bar '. + {foo: $foo}' | |
# { | |
# "hello": "world", | |
# "foo": "bar" | |
# } | |
# Override field value | |
echo '{"hello": "world"}' | jq --arg foo bar '. + {hello: $foo}' | |
{ |
import subprocess | |
import io | |
import pandas as pd | |
# The fslcc binary to use | |
FSLCC = '/opt/fsl/5.0.11/bin/fslcc' | |
# Parameters for the command line. No thresholding, report 4 digits. | |
FSLCC_PARAMS = ['-t', '0', '-p', '4'] |
# By Jake VanderPlas | |
# License: BSD-style | |
import matplotlib.pyplot as plt | |
import numpy as np | |
def discrete_cmap(N, base_cmap=None): | |
"""Create an N-bin discrete colormap from the specified input map""" |