Skip to content

Instantly share code, notes, and snippets.

@jtniehof
jtniehof / changes_from_20231206.html
Created February 28, 2024 15:02
Diffs of PHEP-0002
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>diff</title>
<meta name="Generator" content="Vim/8.2">
<meta name="plugin-version" content="vim8.1_v2">
<meta name="settings" content="whole_filler,use_css,pre_wrap,no_foldcolumn,prevent_copy=,use_input_for_pc=fallback">
<meta name="colorscheme" content="none">
<style>
@jtniehof
jtniehof / changes_from_20231214.html
Last active February 28, 2024 14:48
PHEP-0001 diffs
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>diff</title>
<meta name="Generator" content="Vim/8.2">
<meta name="plugin-version" content="vim8.1_v2">
<meta name="settings" content="whole_filler,use_css,pre_wrap,no_foldcolumn,prevent_copy=,use_input_for_pc=fallback">
<meta name="colorscheme" content="none">
<style>
@jtniehof
jtniehof / spacedataexample.py
Last active July 1, 2022 13:29
Example of loading CDF file into a SpaceData object
# Download a file from http://research.ssl.berkeley.edu/data/psp/data/sci/fields/l2/mag_SC_1min/
import spacepy.pycdf
with spacepy.pycdf.CDF('psp_fld_l2_mag_SC_1min_20200801_v01.cdf') as f:
alldata = f.copy()
print(alldata.keys())
print(alldata.attrs)
print(alldata['psp_fld_l2_mag_SC_1min'][:5])
print(alldata['psp_fld_l2_mag_SC_1min'].attrs)
alldata.tree()
@jtniehof
jtniehof / disconnect.rb
Last active December 19, 2015 10:49 — forked from gljeremy/disconnect.rb
This fork adds an option to specify the activity start date, making it easier to download just the most recent files. Just the date is accepted, or YYYY-MM-DDTHH:MM
#!/usr/bin/env ruby
## disconnect
# ./disconnect.rb -u yourusername [-o /your/path] [-p yourhttpproxyserver] \
# [-d gmt_to_start_from]
#
# This is a command-line utility for the bulk-downloading of run data from
# the connect.garmin.com web application, which has lackluster export
# capabilities.