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 datetime | |
from matplotlib import dates as mpl_dates | |
import matplotlib.font_manager | |
from pylab import figure | |
import scipy.ndimage.filters as filters | |
fontfamily = ["Arial"] | |
dpi = 200.0 |
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
package main | |
import ( | |
"crypto/sha256" | |
"flag" | |
"fmt" | |
"runtime" | |
"time" | |
) |
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
# $Id: screenrc,v 1.15 2003/10/08 11:39:03 zal Exp $ | |
# | |
# /etc/screenrc | |
# | |
# This is the system wide screenrc. | |
# | |
# You can use this file to change the default behavior of screen system wide | |
# or copy it to ~/.screenrc and use it as a starting point for your own | |
# settings. | |
# |
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/env python | |
import numpy as np | |
import sys | |
FRAME_SIZE = 1920*1080*3 | |
BPC = 2 | |
MAXINT = (256**BPC) - 1 | |
GAMMA = 2.0 # A much faster approximation than 2.2 |
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 scipy.linalg as linalg | |
import scipy.optimize as optimize | |
# r0: rate constant for initial partition -> active partition | |
# r1: rate constant for active partition -> inactive partition | |
# rate_constant = np.log(2)/half_life | |
def single_compound_matrix(r0, r1): | |
return np.array([[-r0, r0, 0], [0, -r1, r1], [0, 0, 0]]).T |
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
randomly |
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
/* | |
Copyright _ 2005, Apple Computer, Inc. All rights reserved. | |
NOTE: Use of this source code is subject to the terms of the Software | |
License Agreement for Mac OS X, which accompanies the code. Your use | |
of this source code signifies your agreement to such license terms and | |
conditions. Except as expressly granted in the Software License Agreement | |
for Mac OS X, no other copyright, patent, or other intellectual property | |
license or right is granted, either expressly or by implication, by Apple. | |
*/ |
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
class Timer: | |
def __enter__(self): | |
self.__interval = None | |
self.__start = time.perf_counter() | |
return self | |
def __exit__(self, *args): | |
self.__end = time.perf_counter() | |
self.__interval = self.__end - self.__start | |
print(self.__interval, file=sys.stderr) |
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 time | |
class Timer: | |
def __init__(self, times): | |
self.times = times | |
self.start = None | |
def __enter__(self): | |
self.start = time.perf_counter() | |
return self.start |
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
from contextlib import contextmanager | |
import sys | |
@contextmanager | |
def let(**kwargs): | |
to_del = [] | |
to_set = {} | |
bindings = sys._getframe(2).f_locals | |
for k, v in kwargs.items(): | |
if k in bindings: |
OlderNewer