Skip to content

Instantly share code, notes, and snippets.

View canismarko's full-sized avatar

Mark Wolfman canismarko

View GitHub Profile
@canismarko
canismarko / Django recursion stacktrace
Created November 26, 2012 14:34
Stacktrace for an error when deleting a specific django model object through admin interface
Environment:
Request Method: GET
Request URL: http://orgwolf.artiosband.com/admin/gtd/node/1470/delete/
Django Version: 1.5a1
Python Version: 2.7.3
Installed Applications:
('django.contrib.auth',
@canismarko
canismarko / node_view.js
Created December 8, 2012 00:36
Creates an expandable hierarchy of projects and their sub-projects
var counter = 0;
var workspace_string = '';
// An object prototype for a heading
function heading(args) {
// CSS classes
this.ICON = 'icon-chevron-right'; // Eg. Bootstrap glyphicon
this.ICON_WIDTH; // Set dynamically at onReady()
this.COLORS = new Array('red', 'green', 'blue');
if(typeof args['heading_div'] != 'undefined') {
(help!)
|-------/----|
| \ o / |
| | |
| / \ |
|------------|
@canismarko
canismarko / gist:6716344
Created September 26, 2013 16:08
Lotus Notes on Wine Stacktrace
Unhandled exception: page fault on read access to 0x00000004 in 32-bit code (0x60008a12).
Register dump:
CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b
EIP:60008a12 ESP:003386e8 EBP:00338704 EFLAGS:00010246( R- -- I Z- -P- )
EAX:003386fc EBX:00000000 ECX:00000000 EDX:00000004
ESI:000001a5 EDI:00000000
Stack dump:
0x003386e8: 00000000 00000004 00000179 00338718
0x003386f8: 00000000 0000000c 00000001 0033871c
0x00338708: 601d6fc3 00000060 00338718 0033872c
@canismarko
canismarko / gist:7563541
Created November 20, 2013 13:54
Failed tests for python development (test.test_logging)
-*- mode: compilation; default-directory: "~/src/cpython/Lib/test/" -*-
Compilation started at Wed Nov 20 08:35:57
~/src/cpython/python -m test -v -j3 test_logging
== CPython 3.4.0a4+ (default:1300d94d6e88, Nov 19 2013, 20:02:15) [GCC 4.8.2]
== Linux-3.11.6-1-ARCH-x86_64-with-arch little-endian
== /home/mwolf/src/cpython/build/test_python_12750
Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0)
[1/1/1] test_logging
test_flat (test.test_logging.BuiltinLevelsTest) ... ok
@canismarko
canismarko / Eva Error Log
Created February 18, 2015 15:44
Eva Error Log
EurekaLog 6.5.12
Application:
---------------------------------------------------------------------------------------------------------------------------------
1.1 Start Date : Tue, 17 Feb 2015 19:41:22 -0600
1.2 Name/Description: Framework.exe (Framework)
1.3 Version Number : 3.3.37
1.4 Parameters : /pc:ProfilecatalogEva.xml /splash:DIFFRAC.EVA.png /applicationicon:DIFFRAC.EVA.ico /evalonly /nodatabase
1.5 Compilation Date: Thu, 14 Mar 2013 17:03:36 -0600
1.6 Up Time : 9 minutes, 1 seconds
@canismarko
canismarko / unit-test-fix.diff
Last active September 20, 2015 16:55
pyGSAS Unit Test Fix
diff --git a/GSASIIspc.py b/GSASIIspc.py
index 8c3cda3..a95e101 100644
--- a/GSASIIspc.py
+++ b/GSASIIspc.py
@@ -1062,7 +1062,11 @@ def MoveToUnitCell(xyz):
:param xyz: a list or numpy array of fractional coordinates
:returns: XYZ - numpy array of new coordinates now 0 or greater and less than 1
'''
- XYZ = (xyz+10.)%1.
+ try:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-12-c9dd0017b691> in <module>()
----> 1 quarterLithiumMapC10.plot_map_gtk()
/home/mwolf/.ipython/scimap/xrd/map.py in plot_map_gtk(self)
265
266 def plot_map_gtk(self):
--> 267 from xrd.gtkmapwindow import GtkXrdMapWindow
268 return super().plot_map_gtk(WindowClass=GtkXrdMapWindow)
In [1]: runfile('/run/media/mwolf/WOLF_DATA/txm-2016-06-07-aps-32-ID-C/Scripts/rec_ASTRA_one.py', wdir='/run/media/mwolf/WOLF_DATA/txm-2016-06-07-aps-32-ID-C')
#### Processing NCA2b_3.9V_8400eV_10X_stepscan_721proj_1s_wfilter_5_123.h5
Test reconstruction of slice [0]
/usr/lib/python2.7/site-packages/dxchange-0.1.1-py2.7.egg/dxchange/exchange.py:644: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future.
Traceback (most recent call last):
File "<ipython-input-1-283c6f023cda>", line 1, in <module>
runfile('/run/media/mwolf/WOLF_DATA/txm-2016-06-07-aps-32-ID-C/Scripts/rec_ASTRA_one.py', wdir='/run/media/mwolf/WOLF_DATA/txm-2016-06-07-aps-32-ID-C')
@canismarko
canismarko / NCA_ptycho_analysis.ipynb
Created January 13, 2017 03:10
NCA Ptychography Analysis
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.