Skip to content

Instantly share code, notes, and snippets.

View jasmainak's full-sized avatar

Mainak Jas jasmainak

View GitHub Profile
@wmvanvliet
wmvanvliet / checker.py
Last active August 6, 2016 17:45
Script that extracts all docstrings from a Python module, saves them to a file, and proceeds to compile a list of possible duplicates based on levenshtein distance.
from __future__ import print_function
import os.path as op
import inspect
import distance
import numpy as np
from scipy.misc import comb
import progressbar as pb
import progressbar.widgets as pw
@clbarnes
clbarnes / neuron_install.md
Last active February 29, 2024 13:11
These instructions are for installing NEURON and NetPyNE with linux and a conda environment.

Install instructions

These instructions are for installing NEURON and NetPyNE with linux and a conda environment.

Create a neuron directory in your home directory, put the gzipped source files in it, and expand them.

cd $HOME
mkdir neuron
mv iv-mm.tar.gz neuron
# -*- coding: utf-8 -*-
# Authors: Eric Larson <[email protected]>
#
# License: BSD (3-clause)
from __future__ import print_function
from copy import deepcopy
import time
@agramfort
agramfort / lasso_ista_fista.py
Created January 31, 2016 14:33
Lasso with ISTA and FISTA
#!/usr/bin/env python
#
# Solve LASSO regression problem with ISTA and FISTA
# iterative solvers.
# Author : Alexandre Gramfort, [email protected]
# License BSD
import time
from math import sqrt
@DrDub
DrDub / selectfile.py
Created January 3, 2016 11:44
A file selection class build for ipywidgets without any extra dependencies.
import os
import ipywidgets as widgets
class FileBrowser(object):
def __init__(self):
self.path = os.getcwd()
self._update_files()
@mmcc
mmcc / install-docker-mint.sh
Last active October 17, 2022 19:52 — forked from sirkkalap/Install-Docker-on-Linux-Mint.sh
Install Docker on Linux Mint 17
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sh -c 'echo deb https://apt.dockerproject.org/repo ubuntu-trusty main > /etc/apt/sources.list.d/docker.list'
# Install docker
sudo apt-get update
sudo apt-get purge lxc-docker
sudo apt-get install linux-image-extra-$(uname -r)
sudo apt-get install docker-engine
sudo service docker start
@AnwarShah
AnwarShah / sublime-text-3.desktop
Created December 12, 2015 14:23 — forked from thebinarypenguin/sublime-text-2.desktop
A desktop application launcher for Sublime Text 3
[Desktop Entry]
Type=Application
Terminal=false
StartupNotify=true
Name=Sublime Text 3
Name[en_US]=Sublime Text 3
GenericName=Text Editor
GenericName[en_US]=Text Editor
Comment=Edit text files
Comment[en_US]=Edit text files
@agramfort
agramfort / output.txt
Created March 16, 2014 08:05
Test effect of nave on dSPM
returns:
27.0745537031
365.073216463
27.1356784749
@agramfort
agramfort / ft_buffer_realtime_plot.py
Last active January 4, 2016 00:49
plot data from Fieldtrip realtime buffer with Python and Chaco
# Author : Alex Gramfort
# license BSD (copied for Chaco example data_stream.py)
# to use it:
# Start ./sine2ft in the background (available in fieldtrip repo)
# Start the buffer
# Then run this script in a python terminal
# Major library imports
import sys
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: