Skip to content

Instantly share code, notes, and snippets.

View mnarayan's full-sized avatar

mnarayan mnarayan

View GitHub Profile
@mnarayan
mnarayan / ds000031_model.json
Last active October 18, 2018 20:22 — forked from cmaumet/ds114_model.json
BIDS-models for ds000031
{
"name": "ds000031 example",
"description": "An example of connectivity analysis using ds000031",
"input":
{
"task": "rest"
},
"blocks": [
{
"level": "run",
@mnarayan
mnarayan / sidenotes-demo.tex
Created February 8, 2017 20:17 — forked from dgleich/sidenotes-demo.tex
tufte sidenotes -- a tufte-latex ripoff
\documentclass{article}
\usepackage{booktabs}
\usepackage{geometry}
\usepackage{tabularx}
\geometry{lmargin=72pt,tmargin=72pt,textwidth=350pt,marginparwidth=144pt}
\usepackage{tufte-sidenotes}
\begin{document}
Here is demo of the \verb#tufte-sidenotes# style.
@mnarayan
mnarayan / gist:75cd4f9bda2301a843f3
Created January 12, 2016 03:25 — forked from fabianp/gist:3081831
Pool Adjacent Violators
import numpy as np
# Author : Alexandre Gramfort
# license : BSD
def pav(y):
"""
PAV uses the pair adjacent violators method to produce a monotonic
smoothing of y
@mnarayan
mnarayan / springer-free-maths-books.md
Created December 29, 2015 00:03 — forked from bishboria/springer-free-maths-books.md
Springer have made a bunch of maths books available for free, here are the direct links
@mnarayan
mnarayan / tex-to-pdf
Created December 20, 2015 18:04 — forked from AdrianoFerrari/tex-to-pdf
Node server to take Gingko Tex output into PDF
var TreeId = "your_tree_id_here";
var Filename = "output_filename";
var http =require('http');
var fs = require('fs');
var request = require('request');
var exec = require('child_process').exec;
var header = fs.readFileSync('parts/header.tex', 'utf8');
var footer = fs.readFileSync('parts/footer.tex', 'utf8');
var replacements = { '\\\\begin\\{center\\}\\\\rule\\{3in\\}\\{0\\.4pt\}\\\\end\\{center\\}': '\\hr', '\\\\section\{([^\}]*)\}\\\\label\{([^\}]*)\}\\n\\n([^\.]*[\\.\\\'\\\'\\?\\!]*)\\s': '\\finishchapter\n\\section{$1}\\label{$2}\n\\setupchapter\n\\newthought{$3} ' };
---
$if(date)$
Date: $date$
$endif$
$if(title)$
Title: $title$
$endif$
---
<div>
@mnarayan
mnarayan / jekyll.py
Last active August 29, 2015 14:15 — forked from cscorley/jekyll.py
try:
from urllib.parse import quote # Py 3
except ImportError:
from urllib2 import quote # Py 2
import os
import sys
BLOG_DIR = os.environ['BLOG_DIR']
# BLOG_DIR = '/Users/cscorley/git/cscorley.github.io/'
@mnarayan
mnarayan / Makefile
Last active August 29, 2015 14:00 — forked from tskrynnyk/Makefile
PANDOC = pandoc
%.html: %.md style.css Makefile
$(PANDOC) -c style.css -s -f markdown -t html --standalone -o $@ $<
%.odt: %.md Makefile
$(PANDOC) --standalone -f markdown -t odt -o $@ $<
%.epub: %.md Makefile
$(PANDOC) -o $@ $<
@mnarayan
mnarayan / Makefile
Last active August 29, 2015 14:00 — forked from yy/Makefile
Various makfiles for latex paper writing
TEX = pdflatex -interaction nonstopmode
BIB = bibtex
GS = gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite
COVER = cover
PAPER = paper_main
SUPP = paper_supp
BIBFILE = temp.bib
BUNDLE = paper_bundle.pdf