-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
push current work from cluster computing
- Loading branch information
Jia Jie Wu
committed
Nov 27, 2018
1 parent
ebdbec5
commit 8208ddd
Showing
11 changed files
with
71 additions
and
17 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.pyc | ||
data/pickles/* | ||
reports/* |
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
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
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
EXP_NAME: controls_only_test | ||
TUBE_FILE: data/exp_controls_only_test_tube_table.txt | ||
SIGMA34: 2 | ||
SIGMA41: 3 | ||
THRESHOLD34: 500 | ||
THRESHOLD41: 1000 | ||
BASE41: fitcapc | ||
COMPENSATION: True |
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import time | ||
|
||
def timeit(method): | ||
def timed(*args, **kw): | ||
""" | ||
Stores the number of milliseconds it took to run a function. | ||
Output is the result dict -> keys are function names, | ||
values are dicts -> in which keys are iteration number and values are ms. | ||
""" | ||
ts = time.time() | ||
result = method(*args, **kw) | ||
te = time.time() | ||
if 'log_time' in kw: | ||
name = kw.get('log_name', method.__name__.upper()) | ||
|
||
if name in kw['log_time']: | ||
iter_number = len(kw['log_time'][name].keys()) | ||
kw['log_time'][name][iter_number] = int((te - ts) * 1000) | ||
else: | ||
kw['log_time'][name] = {} | ||
kw['log_time'][name][0] = int((te - ts) * 1000) | ||
else: | ||
print '%r %2.2f ms' % \ | ||
(method.__name__, (te - ts) * 1000) | ||
return result | ||
return timed |
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
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