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 os | |
import hashlib | |
import argparse | |
def md5(fname): | |
hash_md5 = hashlib.md5() | |
count = 0 | |
with open(fname, "rb") as f: | |
for chunk in iter(lambda: f.read(4096), b""): |
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 os | |
import hashlib | |
import argparse | |
MAX_HASH = 500 | |
def dump(hashes, f): | |
as_str = "\n".join(["{},{},{}".format(*data) for data in hashes]) | |
f.write(as_str + "\n") | |
hashes.clear() |
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 | |
from collections import deque | |
class Future: | |
@property | |
def is_done(self): | |
raise NotImplementedError | |
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 | |
from collections import OrderedDict | |
from functools import partial | |
from itertools import chain | |
class CodeContext: | |
current = None | |
def __init__(self): |
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 PeekableIter: | |
def __init__(self, iterator): | |
self._data = list(iterator) | |
self._index = 0 | |
def __iter__(self): | |
return self | |
def __next__(self): |
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 bge import logic | |
from functools import lru_cache | |
class InspectableProperty: | |
def __init__(self, fget): | |
self.fget = fget | |
self.fset = None | |
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 bge import logic, types | |
from functools import lru_cache | |
class InspectableProperty: | |
def __init__(self, fget): | |
self.fget = fget | |
self.fset = None | |
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
%% | |
% Author: Robin Smith Date: 07/10/2015 %%%% | |
% Modified: Angus Hollands Date: 19/02/2017 %%%% | |
% MULTIPLE GAUSSIAN PEAK FITTER WITH LINEAR BACKGROUND %%%% | |
% | |
% A code that reads in a Maestro .Spe file or an xy %%%% | |
% column file containing a measured gamma spectrum. %%%% | |
% It plots the data and allows the user to fit %%%% | |
% multiple Gaussian peaks to regions of the spectrum. %%%% |
Loading
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
file_input: (type | NEWLINE)* ENDMARKER | |
type: 'Type' NAME ':' suite | |
suite: NEWLINE INDENT (body_stmt|NEWLINE)+ DEDENT | |
body_stmt: stmt | block | |
stmt: inline_stmt | declaration_stmt | |
# declaration stmts |