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
#include <Python.h> | |
#include <numpy/arrayobject.h> | |
#include "chi2.h" | |
/* Docstrings */ | |
static char module_docstring[] = | |
"This module provides an interface for calculating chi-squared using C."; | |
static char chi2_docstring[] = | |
"Calculate the chi-squared of some data given a model."; |
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
Copyright (c) 2012–2013 Daniel Foreman-Mackey | |
Permission is hereby granted, free of charge, to any person obtaining a copy of | |
this software and associated documentation files (the "Software"), to deal in | |
the Software without restriction, including without limitation the rights to | |
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | |
the Software, and to permit persons to whom the Software is furnished to do so, | |
subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all |
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
{ | |
"latex-workshop.latex.external.build": { | |
"command": "tectonic", | |
"args": ["--print", "--synctex", "%DOC%.tex"] | |
} | |
} |
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 matplotlib.pyplot as plt | |
def betterstep(bins, y, **kwargs): | |
"""A 'better' version of matplotlib's step function | |
Given a set of bin edges and bin heights, this plots the thing | |
that I wish matplotlib's ``step`` command plotted. All extra | |
arguments are passed directly to matplotlib's ``plot`` command. | |
Args: |
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
% Expand NASA ADS journal macros | |
% ref: https://ui.adsabs.harvard.edu/help/actions/journal-macros | |
@string{aas="American Astronomical Society Meeting Abstracts"} | |
@string{aj="Astronomical Journal"} | |
@string{actaa="Acta Astronomica"} | |
@string{araa="Annual Review of Astron and Astrophysis"} | |
@string{apj="Astrophysical Journal"} | |
@string{apjl="Astrophysical Journal, Letters"} | |
@string{apjs="Astrophysical Journal, Supplement"} | |
@string{ao="Applied Optics"} |
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
function count_code_booboos() { | |
GIT_DIR=$(git rev-parse --git-dir 2> /dev/null) || return | |
NOTES_PATTERN="FIXME|TODO|MAGIC" | |
NOTES_RES=$(echo $(ack -hi --ignore-dir="venv" --ignore-dir="build" \ | |
"\b$NOTES_PATTERN\b" "$(dirname $GIT_DIR)" 2>/dev/null)) | |
for NM in "FIXME" "MAGIC" "TODO" | |
do | |
num=$(echo $(echo $NOTES_RES | ack -i "\b$NM\b" | wc -l)) | |
if [ $num != 0 ] | |
then |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
libchi2.so: chi2.o | |
gcc -shared -Wl,-soname,libchi2.so.1 -o libchi2.so.1.0.0 chi2.o -lc | |
chi2.o: chi2.c | |
gcc -fPIC -g -c -Wall chi2.c |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder