This file contains 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
""" | |
Usage: python3 md-commits.py -r NCEAS/MetacatUI -s 2023-07-01 -e 2023-08-31 -b main,develop -o metacatui-commits_2023-07.md | |
""" | |
import argparse | |
import sys | |
import os | |
import requests | |
def query_github(end_url, repo, params=None): | |
base_url = f"https://api.github.com/repos/{repo}" |
This file contains 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
// Grant CesiumJS access to your ion assets | |
Cesium.Ion.defaultAccessToken = "SECRET"; | |
const viewer = new Cesium.Viewer("cesiumContainer", { | |
terrainProvider : Cesium.createWorldTerrain(), | |
}); | |
const scene = viewer.scene; | |
viewer.scene.globe.depthTestAgainstTerrain = false; // draws points beneath terrain | |
const vertexShader = ` | |
in vec4 osVert; |
This file contains 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
from obspy.clients.fdsn.mass_downloader import Restrictions, MassDownloader | |
from obspy import UTCDateTime | |
# initialize the MassDownloader | |
# from obspy 1.2.0 onward you can use MassDownloader(providers=['RASPISHAKE']) | |
# but prior to that you must specify server location | |
mdl = MassDownloader(providers=['http://fdsnws.raspberryshakedata.com']) | |
# where to put files locally | |
base = '~/seismicdata' |
This file contains 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
from obspy.core.event.catalog import Catalog | |
from datetime import datetime, timedelta | |
import pytz | |
import os | |
import shutil | |
import matplotlib | |
matplotlib.use('Agg') | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from obspy import read |
This file contains 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
c = 299792458 # speed of light in vacuum | |
er = { # epsilon sub r | |
'air (1.00029)': 1.00029, | |
'ice (3)': 3, | |
'clay (17)': 17, | |
'sand (24)': 24, | |
'gyttja (27)': 28, | |
'gyttja (40)': 40, | |
'water (80)': 80, |
This file contains 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
c = 299792458 # speed of light in vacuum | |
er = { # epsilon sub r | |
'air (1.00029)': 1.00029, | |
'ice (3)': 3, | |
'clay (17)': 17, | |
'sand (24)': 24, | |
'gyttja (27)': 28, | |
'gyttja (40)': 40, | |
'water (80)': 80, |
This file contains 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
from obspy import read_inventory, UTCDateTime | |
from obspy.clients.fdsn import Client | |
rs = Client(base_url='https://fdsnws.raspberryshakedata.com/') | |
start = UTCDateTime(2019, 1, 1, 0, 0, 0) | |
end = UTCDateTime(2019, 1, 1, 0, 30, 0) | |
stn = 'R0000' # your station name | |
chn = 'EHZ' # the instrument channel code | |
# (the vertical component is typically called 'EHZ' or 'SHZ' depending on the instrument) |
This file contains 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
from obspy.clients.fdsn import Client | |
from obspy import UTCDateTime | |
rs = Client(base_url='https://fdsnws.raspberryshakedata.com/') | |
starttime = UTCDateTime("2019-02-14T20:00:00.000000Z") | |
endtime = UTCDateTime("2019-02-14T20:10:00.000000Z") | |
waves = rs.get_waveforms('AM', 'R4989', '00', 'EHZ', starttime, endtime) |
This file contains 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 RPi.GPIO as GPIO ## Import GPIO Library | |
import time ## Import 'time' library. Allows us to use 'sleep' | |
## Define function named Blink() | |
def Blink(numTimes, speed, pin): | |
GPIO.setmode(GPIO.BOARD) ## Use BOARD pin numbering | |
GPIO.setup(pin, GPIO.OUT) ## Setup GPIO pin to OUT |
This file contains 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
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: vncboot | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start VNC Server at boot time | |
# Description: Start VNC Server at boot time. | |
### END INIT INFO |