Skip to content

Instantly share code, notes, and snippets.

View jrleeman's full-sized avatar

John Leeman jrleeman

View GitHub Profile
@jrleeman
jrleeman / mems_timeset.py
Created November 1, 2023 00:05
MEMS Inclinometer Time Setting Script
import serial
import sys
from time import sleep
from datetime import datetime
def find_serial_ports():
""" Lists serial port names
:raises EnvironmentError:
On unsupported or unknown platforms
@jrleeman
jrleeman / newyears.py
Created December 28, 2021 01:59
Simple python dropping new year ball animation.
import time
from console.screen import sc
from math import floor
from console import fg, bg, fx
import random
from datetime import datetime
colors = [fg.green, fg.yellow, fg.blue, fg.red, fg.default,
fg.royalblue, fg.lightslateblue, fg.steelblue,
fg.magenta, fg.violet, fg.mediumpurple,
@jrleeman
jrleeman / lgeo_cla.md
Created July 13, 2020 15:33
Leeman Geophysical LLC Public Project CLA

About the Contributor License Agreement

Everybody who contributes code to Leeman Geophysical LLC public projects is going to be asked to sign a Contributor License Agreement (CLA). Our CLA comes from Project Harmony, which is a community-centered group focused on contributor agreements for free and open source software.

The document you are reading now is not a legal analysis of the CLA. If you want one of those, please talk to your lawyer. This is a description of the

import serial
import sys
import time
from datetime import datetime
def post_data_to_chords(data, time):
# 88.1, 88.7, 93.3, 97.9, 100.3, 101.1, 105.9, T, p, rh
sensor_indices = [1, 4, 27, 50, 62, 66, 90]
sensor_id = 'fmradar'
import serial
from datetime import datetime
def get_infrasound_reading():
data = int(ser.readline())
time = datetime.strftime(datetime.utcnow(), '%m-%d-%YT%H:%M:%S.%f')
return time, data
def get_new_hourly_file():
current_file_time = datetime.utcnow()
@jrleeman
jrleeman / multiprocessing_satellite.py
Created May 7, 2018 21:02
Multiprocessing satellite example from MetPy Monday #41.
import multiprocessing as mp
from datetime import datetime
import cartopy.crs as ccrs
import cartopy.feature as cfeature
import matplotlib.pyplot as plt
from matplotlib import patheffects
from metpy.plots.ctables import registry
from siphon.catalog import TDSCatalog
@jrleeman
jrleeman / rgb_animation.py
Created September 11, 2017 17:10
GOES-16 RGB Animation
from datetime import datetime
from scipy import interpolate
from siphon.catalog import TDSCatalog
from netCDF4 import Dataset
import matplotlib.pyplot as plt
from matplotlib import patheffects
import cartopy.feature as cfeat
import cartopy.crs as ccrs
import numpy as np
from metpy.plots import add_logo
@jrleeman
jrleeman / Circle Filled Region.ipynb
Created August 8, 2017 21:27
Create a circular fill in KiCAD
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jrleeman
jrleeman / CAPE_Demo.ipynb
Last active June 20, 2017 16:17
Snapshot of CAPE/CIN development
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jrleeman
jrleeman / intersections_failure.ipynb
Last active March 24, 2017 19:53
Example of find intersections failure
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.