Skip to content

Instantly share code, notes, and snippets.

@brianv0
brianv0 / authorizer.cfg
Last active December 12, 2018 23:45
Authorizer
[Global]
# Comma separated list of acceptable audience strings (aud in the token)
# If the audience string has commas in it, then use audience_json below
default_resource = fs
audience = testing
realm = lsst.org
# Options are Bearer, Basic, none
www_authenticate = Basic
loglevel = DEBUG
@brianv0
brianv0 / authorizer.py
Created December 12, 2018 23:39
Authorizer
import argparse
import base64
import configparser
import errno
import json
import logging
import os
import re
import struct
import subprocess
@brianv0
brianv0 / output.txt
Created December 10, 2018 22:18
WebDAV Mac Native
Stream 1:
OPTIONS /bvan HTTP/1.1
Host: 0.0.0.0
Accept: */*
Content-Length: 0
Connection: close
User-Agent: WebDAVLib/1.3
HTTP/1.1 401 Unauthorized
@brianv0
brianv0 / wise_00.yml
Last active November 19, 2018 21:45
felis wise_00
---
name: wise_00
description: ALLWISE, All-Sky, NeoWISE
tables:
- name: allsky_2band_p1bm_frm
"@id": "#allsky_2band_p1bm_frm"
description: WISE Post-Cryo Single Exposure (L1b) Image Inventory Table
columns:
- name: band
"@id": "#allsky_2band_p1bm_frm.band"
@brianv0
brianv0 / felis.yml
Created November 9, 2018 05:07
Felis Output
---
name: sdqa
description: The SDQA Schema
tables:
- name: sdqa_ImageStatus
'@id': "#sdqa_ImageStatus"
description: Unique set of status names and their definitions, e.g. 'passed', 'failed',
etc.
columns:
- name: sdqa_imageStatusId
@brianv0
brianv0 / mysql.sql
Created November 7, 2018 23:21
processed sdqa file
CREATE TABLE sdqa.`sdqa_ImageStatus` (
`sdqa_imageStatusId` SMALLINT COMMENT 'Primary key',
`statusName` VARCHAR(30) COMMENT 'One-word, camel-case, descriptive name of a possible image status (e.g., passedAuto, marginallyPassedManual, etc.)',
definition VARCHAR(255) COMMENT 'Detailed Definition of the image status'
)COMMENT='Unique set of status names and their definitions, e.g. ''passed'', ''failed'', etc.'
CREATE TABLE sdqa.`sdqa_Metric` (
@brianv0
brianv0 / auth.md
Last active October 19, 2018 21:50
auth doc

LSP Authentication

Introduction

This document covers core technologies and interactions between services, APIs, and applications interacting with the LSST Science Platform. The authentication use cases covered in this cover interactive users who are primarily interacting with the LSP in the following ways:

@brianv0
brianv0 / headers.txt
Last active August 28, 2018 03:19
Standard FITS headers maybe applicable to Tables
KEYWORD: (blank)
REFERENCE: FITS Standard
STATUS: reserved
HDU: any
VALUE: none
COMMENT: descriptive comment
DEFINITION: Columns 1-8 contain ASCII blanks. This keyword has no
associated value. Columns 9-80 may contain any ASCII text. Any number
of card images with blank keyword fields may appear in a header.
@brianv0
brianv0 / skip_waiting.py
Created August 24, 2018 17:29
Skip Waiting Process Instances
# Find the Stream primary key with process instances you want to skip
# Usually you do this from the web interfaces
stream_id = 254077443L
# Some things you will need along the way.
# This is actually java code you are importing
from org.srs.pipeline.server.sql import DatabaseUtilities
from org.srs.pipeline.server.sql.ProcessInstance import ProcessingStatus
from org.srs.pipeline.server.sql.Stream import StreamStatus
@brianv0
brianv0 / terminate_running.py
Created August 21, 2018 22:51
Terminate Running subprocesses
from org.srs.pipeline.server.sql import DatabaseUtilities
from org.srs.pipeline.server.sql.ProcessInstance import ProcessingStatus
from org.srs.pipeline.server.sql.Stream import StreamStatus
from org.srs.pipeline.server.sql.Process import ProcessType
status = ProcessingStatus.TERMINATED
import sys
def terminate(pi, dbu=None):
doClose = dbu is None
if doClose: