This file contains hidden or 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 uuid | |
import struct | |
import base64 | |
u = uuid.uuid4() | |
max_int64 = 0xFFFFFFFFFFFFFFFF | |
packed = struct.pack('>QQ', (u.int >> 64) & max_int64, u.int & max_int64) | |
client_id = base64.b64encode(packed) | |
print client_id |
This file contains hidden or 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 datetime | |
import sqlite3 | |
from subprocess import Popen, PIPE | |
import Github | |
import sys | |
g = Github(sys.stdin[1]) | |
def get_repo_list(organization): | |
gh_org = g.get_organization(organization) |
This file contains hidden or 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
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package org.lsst.ivoa.votable; | |
import com.google.protobuf.InvalidProtocolBufferException; | |
import java.io.UnsupportedEncodingException; | |
import org.junit.Test; |
This file contains hidden or 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 sys | |
import subprocess | |
import os | |
import re | |
""" | |
Pipeline-II Logscraper | |
You must run this at SLAC currently. |
This file contains hidden or 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
{ | |
"result": { | |
"table": { | |
"data": [ | |
[ | |
8404051561545729, | |
125230127 | |
], | |
[ | |
8404051561545730, |
This file contains hidden or 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
Python 2.7.10 (v2.7.10:15c95b7d81dc, May 23 2015, 09:33:12) | |
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> from pysqlite2 import dbapi2 as sqlite3 | |
>>> | |
>>> | |
>>> conn = sqlite3.connect() | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
TypeError: Required argument 'database' (pos 1) not found |
This file contains hidden or 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
{%- macro safe_type(type) -%} | |
{%- if type in java_mappings -%} | |
{{ java_mappings[type] }} | |
{%- else -%} | |
{{ type }} | |
{%- endif -%} | |
{%- endmacro -%} | |
class {{ name }} { |
This file contains hidden or 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
!/* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
This file contains hidden or 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
SELECT * | |
FROM "II/295/SSTGC","II/293/glimpse" | |
WHERE 1=CONTAINS( | |
POINT('ICRS',"II/295/SSTGC".RAJ2000,"II/295/SSTGC".DEJ2000), | |
BOX('GALACTIC', 0, 0, 30/60., 10/60.) | |
) | |
AND 1=CONTAINS( | |
POINT('ICRS',"II/295/SSTGC".RAJ2000,"II/295/SSTGC".DEJ2000), | |
CIRCLE('ICRS',"II/293/glimpse".RAJ2000,"II/293/glimpse".DEJ2000, 2/3600.) | |
) |
This file contains hidden or 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
Query{queryBody=QuerySpecification{select=Select{distinct=false, selectItems=[(CASE WHEN ("x" = 1) THEN "y" ELSE "z" END), "a"]}, from=Optional[Join{type=IMPLICIT, left=Table{ii/295/sstgc}, right=Table{ii/293/glimpse}, criteria=Optional.empty}], where=((1 = "contains"("point"('ICRS', "ii/295/sstgc"."raj2000", "ii/295/sstgc"."dej2000"), "box"('GALACTIC', 0, 0, (30 / 60.0), (10 / 60.0)))) AND (1 = "contains"("point"('ICRS', "ii/295/sstgc"."raj2000", "ii/295/sstgc"."dej2000"), "circle"('ICRS', "ii/293/glimpse"."raj2000", "ii/293/glimpse"."dej2000", (2 / 3600.0))))), groupBy=[], having=null, orderBy=[], limit=10}, orderBy=[]} | |
SELECT | |
(CASE WHEN ("x" = 1) THEN "y" ELSE "z" END) | |
, "a" | |
FROM | |
ii/295/sstgc | |
, ii/293/glimpse | |
WHERE ((1 = "contains"("point"('ICRS', "ii/295/sstgc"."raj2000", "ii/295/sstgc"."dej2000"), "box"('GALACTIC', 0, 0, (30 / 60.0), (10 / 60.0)))) AND (1 = "contains"("point"('ICRS', "ii/295/sstgc"."raj2000", "ii/295/sstgc"."dej2000"), "circle"('ICRS', "ii/293/glimpse"."raj2000", "ii/293/glimpse"."d |