First time:
python setup.py register
Uploading a new version:
python setup.py check
from astropy.coordinates import ICRS, Galactic, Distance, Angle | |
from astropy import units as u | |
import math as mt | |
import numpy as np | |
from astropy.table import Table, Column | |
# inspired by | |
#http://idl-moustakas.googlecode.com/svn-history/r560/trunk/impro/hiiregions/im_hiiregion_deproject.pro | |
def correct_rgc(coord, glx_ctr=ICRS('00h42m44.33s +41d16m07.5s'), glx_PA=Angle('37d42m54s'), glx_incl=Angle('77.5d'), glx_dist=Distance(783,unit=u.kpc)): | |
'''computes deprojected galactocentric distance for an object at coord, |
First time:
python setup.py register
Uploading a new version:
python setup.py check
from astropy.table import Table, Column, join, vstack | |
from uncertainties import ufloat | |
import astropy.units as u | |
def uncert_str(tab_row, col_name, value_fmt): | |
''' format tab_row[col_name] single table row in LaTeX $num \pm unc$ format | |
input: tab_row: single row from an astropy table | |
col_name: name of column to be extracted and formatted | |
value_fmt: format for string output | |
output: |
import cPickle as pickle | |
import numpy as np | |
from bson.binary import Binary | |
from pymongo.son_manipulator import SONManipulator | |
class NumpySONManipulator(SONManipulator): | |
def transform_incoming(self, value, collection): | |
if isinstance(value, (list,tuple,set)): | |
return [self.transform_incoming(item,collection) for item in value] | |
if isinstance(value,dict): |
git clone https://github.com/lsst-sqre/build-graph.git | |
cd build-graph/ | |
wget https://raw.githubusercontent.com/lsst/versiondb/master/manifests/b1780.txt | |
virtualenv deps | |
. deps/bin/activate | |
pip install -r requirements.txt | |
./deps.py b1780.txt |
// ==UserScript== | |
// @name Draft Typekitizer | |
// @namespace http://tyler.menez.es/ | |
// @version 1 | |
// @description Adds Typekit to Draft | |
// @match http*://*.draftin.com/* | |
// @copyright 2013 Tyler Menezes | |
// ==/UserScript== | |
(function() { |
{ | |
"Comment": "A new CNAME for jsick's Read the Docs documentation.", | |
"Changes": [ | |
{ | |
"Action": "CREATE", | |
"ResourceRecordSet": { | |
"Name": "docs.lsst.codes.", | |
"Type": "CNAME", | |
"SetIdentifier" : "Read the Docs", | |
"Weight": 10, |
The EUPS distrib facility (eups distrib ...
) has support for packaging and
publishing binary builds in a package format called "tarballs". Unlike the
"eupspkg" (source) package format that was the sole DM published product
format, "tarballs" are inherently tied to the microarchitecture and ABI of a
platform. As there are currently multiple supported "stack" build platforms, a
means of coordinating multiple independent binary builds from identical sources
is needed both to ensure consistency of product versions across platforms and
''' | |
Pure cython version | |
compile with: | |
$ cython cgibbs.pyx | |
$ gcc -shared -pthread -fPIC -fwrapv -O2 -Wall -fno-strict-aliasing -I/usr/include/python2.6 -o cgibbs.so cgibbs.c | |
then import from python shell and call main() | |
''' | |
import random,math, time |
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" | |
GREEN="\[\033[0;32m\]" | |
BLUE="\[\033[0;34m\]" | |
LIGHT_RED="\[\033[1;31m\]" | |
LIGHT_GREEN="\[\033[1;32m\]" | |
WHITE="\[\033[1;37m\]" | |
LIGHT_GRAY="\[\033[0;37m\]" | |
COLOR_NONE="\[\e[0m\]" |