This file contains hidden or 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 | |
# Read all tsv files from passed folder and average lines 469:535, take index from file name | |
from sys import argv, exit | |
from os import listdir | |
from pandas import DataFrame, read_csv | |
from datetime import datetime | |
try: |
This file contains hidden or 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
E355P E355S | |
3327.0 1126.0 | |
3327.0 1126.0 | |
3687.0 1144.0 | |
4436.0 1324.0 |
This file contains hidden or 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
grid = [['.', '.', '.', '.', '.', '.'], | |
['.', 'O', 'O', '.', '.', '.'], | |
['O', 'O', 'O', 'O', '.', '.'], | |
['O', 'O', 'O', 'O', 'O', '.'], | |
['.', 'O', 'O', 'O', 'O', 'O'], | |
['O', 'O', 'O', 'O', 'O', '.'], | |
['O', 'O', 'O', 'O', '.', '.'], | |
['.', 'O', 'O', '.', '.', '.'], | |
['.', '.', '.', '.', '.', '.'],] |
This file contains hidden or 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
anddam@bibook /opt/macports/ports-git master $ /usr/bin/git pull --rebase upstream master | |
remote: Counting objects: 244, done. | |
remote: Compressing objects: 100% (142/142), done. | |
remote: Total 244 (delta 114), reused 54 (delta 54), pack-reused 40 | |
Receiving objects: 100% (244/244), 182.93 KiB | 0 bytes/s, done. | |
Resolving deltas: 100% (115/115), completed with 32 local objects. | |
From github.com:macports/macports-ports | |
* branch master -> FETCH_HEAD | |
9ce3c03..41fad2d master -> upstream/master | |
First, rewinding head to replay your work on top of it... |
This file contains hidden or 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
anddam@bibook /opt/macports/ports-git master $ git pull --rebase | |
Current branch master is up to date. | |
anddam@bibook /opt/macports/ports-git master $ port -d sync | |
---> Updating the ports tree | |
Synchronizing local ports tree from file:///opt/macports/ports-local | |
Creating port index in /opt/macports/ports-local | |
Total number of ports parsed: 0 | |
Ports successfully parsed: 0 | |
Ports failed: 0 |
This file contains hidden or 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
, {"inp": "git pull\n", "rtn": 1, "ts": [1482309128.985267, 1482309132.066719] | |
} | |
, {"inp": "git pull remote upstream\n", "rtn": 1, "ts": [1482309138.439869, 1482309138.633955] | |
} | |
, {"inp": "git pull upstream\n", "rtn": 1, "ts": [1482309146.976664, 1482309152.688904] | |
} | |
, {"inp": "git pull upstream master\n", "rtn": 128, "ts": [1482309161.529076, 1482309164.844261] | |
} | |
, {"inp": "cd /opt/macports/ports\n", "rtn": 0, "ts": [1482309756.327485, 1482309756.33121] | |
} |
This file contains hidden or 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
# coding: utf-8 | |
class Test: | |
def __init__(self, seed=0): | |
self.seed = seed | |
def __hash__(self): | |
return seed | |
def print_bits(seed): | |
print("{:0>64s}".format(bin(Test(seed).__hash__())[2:])) | |
print("{:0>64s}".format(bin(hash(Test(seed)))[2:])) |
This file contains hidden or 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 pandas import DataFrame, concat | |
from numpy import nan | |
correct = DataFrame({'foo': ((1, 'a'), (2, 'b')), | |
'bar': ((nan, 123), (3, 7)), | |
'valid_1': (144, 169), | |
'valid_2': (12, 13)}) | |
wrong = DataFrame({'foo': (), | |
'bar': (), |
This file contains hidden or 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
anddam@bibook ~ bibook $ vox ls | |
No environments available. Create one with "vox new". | |
anddam@bibook ~ bibook $ vox new test | |
Creating environment... | |
Traceback (most recent call last): | |
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/xonsh/__amalgam__.py", line 9607, in wrapped_simple_command | |
r = f(args, i) | |
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/xontrib/vox.py", line 154, in handle | |
return vox(args, stdin=stdin) |
This file contains hidden or 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
In [18]: %run semaphores.py | |
In [19]: working.size | |
Out[19]: 0 | |
In [20]: len(working) | |
Out[20]: 0 | |
In [21]: nonworking.size | |
Out[21]: 0 |