Skip to content

Instantly share code, notes, and snippets.

View jdnc's full-sized avatar

Madhura Parikh jdnc

View GitHub Profile
@jdnc
jdnc / .gdbinit
Created September 1, 2016 22:17 — forked from skyscribe/.gdbinit
GDB init file to print STL containers and data members
#
# STL GDB evaluators/views/utilities - 1.03
#
# The new GDB commands:
# are entirely non instrumental
# do not depend on any "inline"(s) - e.g. size(), [], etc
# are extremely tolerant to debugger settings
#
# This file should be "included" in .gdbinit as following:
# source stl-views.gdb or just paste it into your .gdbinit file
@jdnc
jdnc / dpla-collections.json
Created September 3, 2014 23:04
Eyeballing the collections from dpla to pinpoint the most common fields, also some playing around with mongodb
{
"metadata": {
"name": "dpla-collections"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@jdnc
jdnc / Naive_bayes_starter.json
Created March 22, 2014 23:17
Experimenting with Naive Bayes for neurosynth, just the beginning steps
{
"metadata": {
"name": "Naive Bayes Starter"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
{
"metadata": {
"name": "mini-code"
},
"name": "mini-code",
"nbformat": 2,
"worksheets": [
{
"cells": [
{
<?xml version="1.0"?>
<!DOCTYPE VOTABLE SYSTEM "http://us-vo.org/xml/VOTable.dtd">
<VOTABLE >
<DESCRIPTION>
Obs Summary Query. NRAO : https://archive.nrao.edu/archive/ArchiveQuery?OBS_BANDS=ALL&amp;RECEIVER_ID=ALL&amp;SUBARRAY=ALL&amp;QUERY_MODE=AAT_TOOL&amp;SUBMIT=Submit Query&amp;EQUINOX=J2000&amp;SRAD=1.0'&amp;TELESCOPE=ALL&amp;CENTER_RA=68.29d&amp;SORT_ORDER=Asc&amp;QUERYTYPE=OBSSUMMARY&amp;QUERY_ID=9999&amp;PROTOCOL=VOTable-XML&amp;BACKEND_ID=ALL&amp;TELESCOPE_CONFIG=ALL&amp;SITE_CODE=AOC&amp;WRITELOG=0&amp;OBS_POLAR=ALL&amp;SORT_PARM=Starttime&amp;SORT_PARM2=Starttime&amp;LOCKMODE=PROJECT&amp;DATATYPE=ALL&amp;DBHOST=CHEWBACCA&amp;CENTER_DEC=5.352d&amp;SRC_SEARCH_TYPE=SIMBAD or NED&amp;SORT_ORDER2=Asc&amp;MAX_ROWS=NO LIMIT
</DESCRIPTION>
<RESOURCE type="results">
<INFO name="QUERY_STATUS" value="OK">Successful Search</INFO>
<TABLE >
<FIELD datatype="char" name="Source" ucd="string" arraysize="*" />
{
"metadata": {
"name": "vizier-examples"
},
"name": "vizier-examples",
"nbformat": 2,
"worksheets": [
{
"cells": [
{
@jdnc
jdnc / vizier-vstack-errors.json
Created July 8, 2013 14:40
vstack is ideal for combining votables with unequal number of columns but can't get it to work currently...
This file has been truncated, but you can view the full file.
{
"metadata": {
"name": "vizier-examples-vstack"
},
"name": "vizier-examples-vstack",
"nbformat": 2,
"worksheets": [
{
"cells": [
{
@jdnc
jdnc / vizier-add-row-examples.json
Created July 8, 2013 14:35
add_row seems to work well when the number of columns is restricted to be the same in all the votables from different catalogs. Here are some common examples with this
{
"metadata": {
"name": "vizier-examples-add-row"
},
"name": "vizier-examples-add-row",
"nbformat": 2,
"worksheets": [
{
"cells": [
{
{
"metadata": {
"name": "get_votable_fields"
},
"name": "get_votable_fields",
"nbformat": 2,
"worksheets": [
{
"cells": [
{
@jdnc
jdnc / blogExample.py
Last active December 18, 2015 14:08
example of @pytest.mark.parametrize
@pytest.mark.parametrize(('coordinate', 'radius', 'expected_payload'),
[
("m81", None, dict(locstr="m81")),
("m31", "5d", dict(locstr="m31", regSize=5.0))
])
def test_args_to_payload_instance_1(self, coordinate, radius,
expected_payload):
payload = irsa_dust.core.IrsaDust().args_to_payload(coordinate, radius=radius)
assert payload == expected_payload