Skip to content

Instantly share code, notes, and snippets.

View opotowsky's full-sized avatar

Arrielle Opotowsky opotowsky

View GitHub Profile
@opotowsky
opotowsky / err
Last active August 29, 2015 14:15
Ciclus Cymetric error
opotowsky_eats_CakeBalls ~/cyclus/ciclus (cym) $ conda build cymetric
BUILD START: cymetric-0.0-py27_0
Fetching package metadata: ..........
Solving package specifications: .
The following packages will be downloaded:
package | build
---------------------------|-----------------
numpy-1.9.1 | py27_0 7.7 MB
@opotowsky
opotowsky / prof2
Created April 7, 2015 15:19
line profiling cymetric
$ kernprof -l -v cymetric 60yr.h5 -e "print(Materials[:])"
/home/opotowsky/.local/lib/python2.7/site-packages/cymetric/metrics.py:10: QAWarning: pyne.data is not yet QA compliant.
from pyne import data
SimId QualId ResourceId ObjId \
0 c21bd208-7851-40d0-98ac-c9668490d354 2 11 10
1 c21bd208-7851-40d0-98ac-c9668490d354 2 29 24
2 c21bd208-7851-40d0-98ac-c9668490d354 2 47 38
3 c21bd208-7851-40d0-98ac-c9668490d354 2 65 52
4 c21bd208-7851-40d0-98ac-c9668490d354 2 83 66
5 c21bd208-7851-40d0-98ac-c9668490d354 2 101 80
@opotowsky
opotowsky / gist:63e9a07ed00eb3af1576
Created April 7, 2015 15:50
line profiling cymetric: raw_to_dict type
$ kernprof -l -v cymetric 60yr.h5 -e "print(Materials[:])"
/home/opotowsky/.local/lib/python2.7/site-packages/cymetric/metrics.py:10: QAWarning: pyne.data is not yet QA compliant.
from pyne import data
SimId QualId ResourceId ObjId \
0 c21bd208-7851-40d0-98ac-c9668490d354 2 11 10
1 c21bd208-7851-40d0-98ac-c9668490d354 2 29 24
2 c21bd208-7851-40d0-98ac-c9668490d354 2 47 38
3 c21bd208-7851-40d0-98ac-c9668490d354 2 65 52
4 c21bd208-7851-40d0-98ac-c9668490d354 2 83 66
5 c21bd208-7851-40d0-98ac-c9668490d354 2 101 80
@opotowsky
opotowsky / BrightErr
Last active August 29, 2015 14:18
Bright-lite errors
[ 41%] [ 41%] [ 47%] [ 52%] [ 58%] Building CXX object src/CMakeFiles/Brightlite_unit_tests.dir/__/Brightlite/reactor_facility.cc.o
Building CXX object src/CMakeFiles/Brightlite_unit_tests.dir/__/Brightlite/reactor_facility_tests.cc.o
Building CXX object src/CMakeFiles/Brightlite_unit_tests.dir/__/Brightlite/fuelfab_facility_tests.cc.o
Building CXX object src/CMakeFiles/Brightlite_unit_tests.dir/home/opotowsky/.local/share/cyclus/cyclus_default_unit_test_driver.cc.o
Building CXX object src/CMakeFiles/Brightlite_unit_tests.dir/__/Brightlite/fuelfab_facility.cc.o
/home/opotowsky/cyclus/Bright-lite/src/reactor_facility.cc: In function ‘bool reactor::stream_check(cyclus::Material::Ptr&)’:
/home/opotowsky/cyclus/Bright-lite/src/reactor_facility.cc:24:5: error: ‘comp_new’ was not declared in this scope
comp_new = mat1->comp()->mass();
^
/home/opotowsky/cyclus/Bright-lite/src/reactor_facility.cc:25:5: error: ‘comp_old’ was not declared in this scope
@opotowsky
opotowsky / pd.cut() error
Last active August 29, 2015 14:19
Trying to cut pandas series by even intervals (and sum those values)
For the following code snippet:
```
u = pd.Series(u, index=m.index)
u = u.groupby(level=['TimeCreated']).sum()
u.name = 'FcoUMined'
# sum by years (12 time steps)
print u
u_year = u.groupby(pd.cut(u.index, np.arange(0, 12, 12)))['FcoUMined'].sum()
print u_year
@opotowsky
opotowsky / dell
Created June 30, 2015 21:46
Troubleshoot sound card
ubuntu@ubuntu:~$ sudo lshw -short
H/W path Device Class Description
====================================================
system XPS13 9333 (060A)
/0 bus 0D13CR
/0/0 processor Intel(R) Core(TM) i7-4510U CPU @ 2.00GH
/0/0/2 memory 32KiB L1 cache
/0/0/3 memory 256KiB L2 cache
/0/0/4 memory 4MiB L3 cache
/0/1 memory 32KiB L1 cache
@opotowsky
opotowsky / gamma (2).ipynb
Created July 3, 2015 16:33
PyNE "Spectra"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@opotowsky
opotowsky / gamma-Copy0.ipynb
Created July 7, 2015 15:07
PyNE "Spectra" for Group Meeting
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@opotowsky
opotowsky / test_seproots.ipynb
Created August 13, 2015 17:07
Separation of module-specific tables from cymetric
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@opotowsky
opotowsky / gist:6fe3230114f3bb4c04d4
Created August 13, 2015 17:32
Cym not playing well with others
tbl= 'Inventories'
cym.root_metric(name=tbl)
cym.exec_code("print({0}[:])".format(tbl), db)
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
/home/opotowsky/cyclus/temp/cycamore_root_metrics.py in <module>()
1 tbl= 'Inventories'