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 division, print_function | |
import subprocess | |
import xml.etree.ElementTree as ET | |
from collections import defaultdict, namedtuple | |
status = namedtuple('status', ['properties', 'np_alloc', 'np_total']) | |
def collect(): | |
xmldata = subprocess.Popen(['/usr/bin/pbsnodes', '-x'], stdout=subprocess.PIPE).communicate()[0] | |
root = ET.fromstring(xmldata) |
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 | |
import subprocess | |
from collections import defaultdict | |
from collections import namedtuple | |
from distutils.spawn import find_executable | |
import xml.etree.ElementTree as ET | |
status = namedtuple('status', ['queue', 'np_alloc', 'np_total']) | |
QHOST_BIN = find_executable('qhost') |
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 time | |
import numpy as np | |
from pyhmc.fftutils import next_fast_fft | |
ns = np.linspace(2, 20000).astype(np.int) | |
t1, t2 = [], [] | |
for n in ns: | |
x = np.random.randn(n) | |
start = time.clock() | |
f = np.fft.fft(x) |
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
#define SET_TIME() (setTime( \ | |
((__TIME__[0]-'0')*10 + (__TIME__[1]-'0')), \ | |
((__TIME__[3]-'0')*10 + (__TIME__[4]-'0')), \ | |
((__TIME__[6]-'0')*10 + (__TIME__[7]-'0')), \ | |
((__DATE__[4]-'0')*10 + (__DATE__[5]-'0')), \ | |
(__DATE__ [2] == 'n' ? (__DATE__ [1] == 'a' ? 1 : 6) \ | |
: __DATE__ [2] == 'b' ? 2 \ | |
: __DATE__ [2] == 'r' ? (__DATE__ [0] == 'M' ? 3 : 4) \ | |
: __DATE__ [2] == 'y' ? 5 \ | |
: __DATE__ [2] == 'l' ? 7 \ |
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
$ doccheck numpy | |
Could not locate executable icc | |
Could not locate executable ecc | |
can cast | |
X ? b h i l q p B H I L Q P e f d g F D G S U V O M m | |
? 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 | |
b 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 1 | |
h 0 0 1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 1 | |
i 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 1 1 0 1 1 1 1 1 1 0 1 | |
l 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 1 1 0 1 1 1 1 1 1 0 1 |
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
$ doccheck scipy | |
scipy.cluster.hierarchy:cophenet ( /home/rmcgibbo/projects/scipy/scipy/cluster/hierarchy.py ) | |
Parameter is optional: Y | |
scipy.cluster.hierarchy:dendrogram ( /home/rmcgibbo/projects/scipy/scipy/cluster/hierarchy.py ) | |
Undocumented arguments: {'no_leaves', 'color_list'} | |
scipy.cluster.hierarchy:pre_order ( /home/rmcgibbo/projects/scipy/scipy/cluster/hierarchy.py ) | |
Parameter is optional: func |
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
$ cat test1.py | |
import gzip | |
from rdkit import Chem | |
mol = Chem.MolFromSmiles('CC(=O)OC1=CC=CC=C1C(=O)O') | |
f = gzip.open('out', 'w') | |
w = Chem.SDWriter(f) | |
w.write(mol) | |
w.flush() | |
f.close() |
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
*DECK EXPREL | |
FUNCTION EXPREL (X) | |
C***BEGIN PROLOGUE EXPREL | |
C***PURPOSE Calculate the relative error exponential (EXP(X)-1)/X. | |
C***LIBRARY SLATEC (FNLIB) | |
C***CATEGORY C4B | |
C***TYPE SINGLE PRECISION (EXPREL-S, DEXPRL-D, CEXPRL-C) | |
C***KEYWORDS ELEMENTARY FUNCTIONS, EXPONENTIAL, FIRST ORDER, FNLIB | |
C***AUTHOR Fullerton, W., (LANL) | |
C***DESCRIPTION |