Skip to content

Instantly share code, notes, and snippets.

View mwcraig's full-sized avatar

Matt Craig mwcraig

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mwcraig
mwcraig / aij_centroiding.ipynb
Last active December 22, 2015 07:49
AIJ centroiding
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mwcraig
mwcraig / gist:6547072
Created September 13, 2013 05:39
astropy masked Table print/repr error traceback
In [1]: from astropy.table import Table
In [2]:
In [2]: numbers = [1, 2, 3]
In [3]: strings = ['a', 'b', 'c']
In [4]:
@mwcraig
mwcraig / astropy_unmasked_table_bug.py
Created September 13, 2013 05:41
Generates astropy issue #1446
from astropy.table import Table
numbers = [1, 2, 3]
strings = ['a', 'b', 'c']
t_numbers = Table(data=[numbers])
comparison_numbers = (t_numbers['col0'] == 1)
type(comparison_numbers) # this is a Column object
print comparison_numbers
@mwcraig
mwcraig / astropy_masked_table_error.py
Created September 13, 2013 05:42
Generates astropy issue #1447
from astropy.table import Table
numbers = [1, 2, 3]
strings = ['a', 'b', 'c']
t_mask_numbers = Table(data=[numbers], masked=True)
comparison_numbers_masked = (t_mask_numbers['col0'] == 1)
type(comparison_numbers_masked) # this is a MaskedColumn object
comparison_numbers_masked # that causes an error on display...
print (comparison_numbers_masked) # ...but can be printed!
@mwcraig
mwcraig / parser_bug.py
Created September 24, 2013 14:34
Files for sphinx-argparse bug

Notice there is no visual difference between single dash - and double-dash --, and the -h option isn't listed under options.

.. argparse::
    :module: parser_bug
    :func: construct_parser
    :prog: python parser_bug.py
@mwcraig
mwcraig / SummaryDataGraphs.ipynb
Last active December 28, 2015 06:59
Graphical representation of data being used to prioritize academic programs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mwcraig
mwcraig / gist:7489676
Created November 15, 2013 18:56
py.test output with error
======================================================================================== test session starts ========================================================================================
platform darwin -- Python 2.7.5 -- pytest-2.4.0
Running tests with Astropy version 0.3rc1.
Running tests in /Users/mcraig/anaconda/envs/astropy-0.3rc1/lib/python2.7/site-packages/astropy.
Platform: Darwin-12.5.0-x86_64-i386-64bit
Executable: /Users/mcraig/anaconda/envs/astropy-0.3rc1/python.app/Contents/MacOS/python