Skip to content

Instantly share code, notes, and snippets.

View aterrel's full-sized avatar
💻

Andy R. Terrel aterrel

💻
  • NVIDIA
  • Austin, TX
View GitHub Profile
@aterrel
aterrel / gist:842f8e92f119f58eb8af
Created November 11, 2015 03:29
possible pandas bug on agg via dict
In [13]: %cpaste
Pasting code; enter '--' alone on the line to stop or use Ctrl-D.
:In [1]: df = pd.DataFrame({'A' : ['foo', 'bar', 'foo', 'bar',
: ...: 'foo', 'bar', 'foo', 'foo'],
: ...: 'B' : ['one', 'one', 'two', 'three',
: ...: 'two', 'two', 'one', 'three'],
: ...: 'C' : np.random.randn(8),
: ...: 'D' : np.random.randn(8)})
:--
File "/root/miniconda/envs/boldmetrics/lib/python2.7/site-packages/flask/app.py" line 1817 in wsgi_app [args]
response = self.full_dispatch_request()
2
File "/root/miniconda/envs/boldmetrics/lib/python2.7/site-packages/flask/app.py" line 1477 in full_dispatch_request [args]
rv = self.handle_user_exception(e)
3
File "/root/miniconda/envs/boldmetrics/lib/python2.7/site-packages/flask/app.py" line 1381 in handle_user_exception [args]
reraise(exc_type, exc_value, tb)
4
Verifying that +aterrel is my blockchain ID. https://onename.com/aterrel
data = [
{
"key_as_string": "1980-01-01T00:00:00.000Z",
"key": 315532800000,
"doc_count": 1
},
{
"key_as_string": "1981-01-01T00:00:00.000Z",
"key": 347155200000,
"doc_count": 1
import bokeh.plotting as plt
words = ['air', 'atm', 'atm', 'complexes', 'internal', 'oxidizer']
topics = ['b', 'a', 'b', 'a', 'a', 'b']
sizes = [0.17070214219087501,
0.20783267646346201,
0.17070214219087501,
0.20783267646346201,
0.20783267646346201,
@aterrel
aterrel / 1PasswordDualMonitorBug.png
Last active January 1, 2016 01:19
1password bug
1PasswordDualMonitorBug.png
@aterrel
aterrel / convolve.pyx
Last active December 29, 2015 14:28
Cython Test
from __future__ import division
import numpy as np
# "cimport" is used to import special compile-time information
# about the numpy module (this is stored in a file numpy.pxd which is
# currently part of the Cython distribution).
cimport numpy as np
# We now need to fix a datatype for our arrays. I've used the variable
# DTYPE for this, which is assigned to the usual NumPy runtime
# type info object.
DTYPE = np.int
@aterrel
aterrel / README
Last active December 15, 2015 08:59
Easybuild lmod errors
$ cat /etc/redhat-release
Scientific Linux release 6.3 (Carbon)
$ module --version
Modules based on Lua: Version 3.4.1 2012-05-23 13:21
by Robert McLay [email protected]
$ ls -l `which modulecmd`
lrwxrwxrwx 1 aterrel chg 33 Mar 22 21:15 /workspace/opt/apps/easybuild/1.2.0/bin/modulecmd -> /usr/local/lmod/lmod/libexec/lmod
| [10-30 13:26] aterrel@172-30-28-152:~/scratch (13.996 Mb)
$ hg clone http://petsc.cs.iit.edu/petsc/BuildSystem
destination directory: BuildSystem
requesting all changes
adding changesets
adding manifests
adding file changes
added 2876 changesets with 4053 changes to 208 files
updating to branch default
119 files updated, 0 files merged, 0 files removed, 0 files unresolved
@aterrel
aterrel / gist:2219565
Created March 27, 2012 19:36
errors in call
c210-104$ ./src/benchmarks/benchmarkExample.py --events IntegBatchCPU IntegBatchGPU IntegGPUOnly --num 52 DMComplex --refine 0.0625 0.00625 0.000625 0.0000625 0.00003125 0.000015625 0.0000078125 0.00000390625 --blockExp 4 --order 1 CPU='dm_view show_residual=0 compute_function batch' GPU='dm_view show_residual=0 compute_function batch gpu gpu_batches=8'
Namespace(batch=False, blockExp=['4'], dim=2, events=['IntegBatchCPU', 'IntegBatchGPU', 'IntegGPUOnly'], library='SNES', module='summary', num=52, operator='laplacian', order=1, refine=['0.0625', '0.00625', '0.000625', '0.0000625', '0.00003125', '0.000015625', '0.0000078125', '0.00000390625'], runs=['CPU=dm_view show_residual=0 compute_function batch', 'GPU=dm_view show_residual=0 compute_function batch gpu gpu_batches=8'], stage='Main_Stage')
./bin/pythonscripts/PetscGenerateFEMQuadrature.py 2 1 1 16 laplacian /home/01392/aterrel/petsc-dev/src/snes/examples/tutorials/ex52.h
[{(-1.0, -1.0): [(1.0, ())]}, {(1.0, -1.0): [(1.0, ())]}, {(-1.0, 1.0): [(1.0, ())]}]