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
#!/usr/bin/env python | |
import argparse | |
import psycopg2 | |
import psycopg2.extras | |
import csv | |
from getpass import getpass, getuser | |
def main(args): | |
''' | |
Inserts a TSV into table in postgresql |
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
#!/usr/bin/env python | |
from netCDF4 import Dataset | |
import os | |
import argparse | |
import numpy as np | |
import sys | |
import glob | |
import logging |
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 time | |
import argparse | |
import os | |
import shutil | |
import sh | |
import logging | |
from sh import sudo | |
from watchdog.events import FileSystemEventHandler, DirCreatedEvent |
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
{ | |
"CP": { | |
"CP02PMCI-RII01": { | |
"display_name": "Pioneer Central Inshore Profiler Mooring - Mooring Riser", | |
"instruments": { | |
"CP02PMCI-RII01-00-ENG000000": { | |
"display_name": "Engineering Data", | |
"streams": {} | |
}, | |
"CP02PMCI-RII01-02-ADCPTG000": { |
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 requests | |
from lxml import etree | |
def main(): | |
url = 'https://raw.githubusercontent.com/oceanobservatories/dataset-spring/master/res/spring/ooi-ctdgv-m-glider-decode.xml' | |
response = requests.get(url) | |
if response.status_code != 200: | |
raise IOError("Failed to read XML document") |
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
*** constructing EDDTableFromFiles dataset_id | |
Table.readFlatNc /scratch/erddap/dataset/id/dataset_id/dirTable.nc | |
Table.readFlatNc done. nColumns=1 nRows=1 TIME=0 | |
1 rows in dirTable | |
Table.readFlatNc /scratch/erddap/dataset/id/dataset_id/fileTable.nc | |
Table.readFlatNc done. nColumns=55 nRows=1 TIME=12 | |
1 rows in fileTable | |
1 files found in /data/data/erddap/test-output | |
regex=.*\.nc recursive=false time=0ms | |
old nBadFiles size=0 nMissing=0 |
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
parsed: | |
-------------------------------------------------------------------------------- | |
{u'CE4D0268': [(u'HM', | |
datetime.datetime(2013, 7, 26, 16, 30, tzinfo=<UTC>), | |
4.94), | |
(u'HM', | |
datetime.datetime(2013, 7, 26, 17, 0, tzinfo=<UTC>), | |
4.41), | |
(u'PA', | |
datetime.datetime(2013, 7, 26, 16, 30, tzinfo=<UTC>), |
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
#!/usr/bin/env python | |
''' | |
somepackage.module | |
Example Class | |
''' | |
from somepackage.base import BaseClass | |
class Example(BaseClass): |
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 use as example run with: | |
* Does nothing | |
* java Example | |
* Displays Debug | |
* java -Ddebug Example | |
*/ | |
public class Example { | |
public static void main(String[] args) { | |
/* |
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
#!/usr/bin/env python | |
from flask import Flask | |
from datetime import datetime | |
import json | |
app = Flask("ooi_services") | |
@app.route("/") | |
def index(): |