Skip to content

Instantly share code, notes, and snippets.

@brianv0
brianv0 / add_to_everyone.py
Created April 7, 2017 19:33
Add users to "everyone" team on GitHub
import os
import sys
from github import Github
token_file = sys.argv[1]
org_name = sys.argv[2]
token = open(os.path.expanduser(token_file)).read().strip()
client = Github(token)
@brianv0
brianv0 / sql.py
Last active May 5, 2017 05:47
io/sql.py
# -*- coding: utf-8 -*-
"""
Collection of query wrappers / abstractions to both facilitate data
retrieval and to reduce dependency on DB-specific API.
"""
from __future__ import print_function, division
from builtins import str, bytes, map, zip
#from datetime import datetime, date, time
@brianv0
brianv0 / kipac-retreat-computing-notes.md
Last active May 11, 2017 16:27
KIPAC Retreat Notes - Computing

KIPAC Retreat Notes (Computing)

Attendants

Tom Sam Mike Jim Brian

@brianv0
brianv0 / packageList.txt
Last active June 9, 2017 23:20
ScienceTools packageList.txt
# ScienceTools packageList.txt
# $Id: packageList.txt,v 1.211 2017/04/28 19:24:14 jchiang Exp $
# in common with GlastRelease
xmlBase xmlBase-05-07-01
astro astro-04-00-02
facilities facilities-02-23-03
flux flux-08-44-00
# infrastructure
@brianv0
brianv0 / demo.py
Created June 20, 2017 17:31
Minimal Marshmallow Demo
from marshmallow import Schema, fields
import json
class Database(Schema):
class Meta:
ordered = True
name = fields.String()
host = fields.String(attribute="conn_host")
@brianv0
brianv0 / output.json
Last active June 21, 2017 01:01
Metaserv V1 Example
# Show tables for S12_sdss (default schema)
GET /meta/v1/db/S12_sdss/tables HTTP/1.1
Accept: application/json
Host: localhost:5000
HTTP/1.0 200 OK
Content-Type: application/json
Content-Length: 47362
@brianv0
brianv0 / notes.md
Created July 21, 2017 16:44
Fermi Containerization Notes

End of week report

Joris and I have been working on a plan for containers, here's our progress and findings so far.

Core technologies to adopt

We believe we will want a few flavors of container images in both and that we will need to leverage both Singularity and Docker.

We believe the adoption of CVMFS will be necessary and viable. At SLAC,

@brianv0
brianv0 / use_cases.md
Last active August 10, 2017 18:43
Butler Working Group

Repository Migration

  • As a consumer of datasets who uses the butler to access them, I'd like to be able to access datasets generated by/according to specifications of an older version of the butler using a newer version of the butler. In this scenario, it's perfectly acceptable and even desired to be able to migrate repositories to be compatible with the newer version of the butler. Succinctly - the user desires a repository migration process.

IVOA Interface Parity

@brianv0
brianv0 / test.py
Created August 15, 2017 18:26
W504 Test
def this():
"""
okay
"""
pass
def this():
r"""
okay
@brianv0
brianv0 / yaml_model.py
Created August 26, 2017 01:03
yaml model
class Database(Schema):
class Meta:
ordered = True
name = fields.String()
id = fields.Integer()
tables = fields.Nested(Table, many=True)
class Table(Schema):
class Meta:
ordered = True