This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from __future__ import print_function, division | |
import os | |
import re | |
import sys | |
import itertools | |
from pprint import pprint | |
import subprocess | |
from distutils.spawn import find_executable | |
from collections import defaultdict |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
import scipy.optimize as so | |
def find_confidence_interval(x, pdf, confidence_level): | |
return pdf[pdf > x].sum() - confidence_level | |
def density_contour(xdata, ydata, nbins_x, nbins_y, ax=None, **contour_kwargs): | |
""" Create a density contour plot. |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import threading | |
import logging | |
from functools import wraps | |
logger = logging.getLogger(__name__) | |
def timeout(secs=None): | |
def my_decorator(target, *args, **kwargs): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def with_setup_args(setup, teardown=None): | |
"""Decorator to add setup and/or teardown methods to a test function:: | |
@with_setup_args(setup, teardown) | |
def test_something(): | |
" ... " | |
The setup function should return (args, kwargs) which will be passed to | |
test function, and teardown function. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Conway's Game Of Life 32 x 64 | |
// based on https://github.com/markfink/GoL_Javascript | |
#include <avr/pgmspace.h> | |
#include "pins_arduino.h" | |
// Connections to board | |
const byte pinSTB=7; | |
const byte pinClock=12; | |
const byte pinURed=10; | |
const byte pinUGreen=11; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/python3 | |
import requests | |
import hashlib | |
import time as tt | |
import ast | |
import os | |
import sys | |
folder = '<where_your_thesis_is>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# assumes that XCode and XCode command line tools have been installed | |
# xcode-select --install | |
# assumes that gfortran has been installed | |
# https://gcc.gnu.org/wiki/GFortranBinaries | |
# install pyenv & set 2.7.11 as current | |
# See: https://github.com/yyuu/pyenv-installer | |
# See: https://github.com/yyuu/pyenv | |
curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash |
NewerOlder