Skip to content

Instantly share code, notes, and snippets.

@Dulani
Dulani / THREDDS_Radar_Server_AWS.ipynb
Created January 11, 2023 03:47 — forked from dopplershift/THREDDS_Radar_Server_AWS.ipynb
A Jupyter notebook showing how to use Python to access the NCEI radar archive on Amazon S3 through Unidata's THREDDS server.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Dulani
Dulani / example.md
Created April 7, 2021 02:12 — forked from ericclemmons/example.md
HTML5 <details> in GitHub

Using <details> in GitHub

Suppose you're opening an issue and there's a lot noisey logs that may be useful.

Rather than wrecking readability, wrap it in a <details> tag!

<details>
 Summary Goes Here
@Dulani
Dulani / stitch_transcript.py
Created June 25, 2020 03:10 — forked from turtlemonvh/stitch_transcript.py
Stitch together AWS Transcribe transcripts, including speaker labels
#!/usr/bin/env python
"""
Stitch multiple files worth of AWS transcripts together.
Does not attempt to match speakers across filesm but does label all speaker changes.
Usage:
python stitch_transcript.py *.mp3.json -o out.txt
See blog post: http://turtlemonvh.github.io/aws-transcribe-for-long-zoom-meetings.html
@Dulani
Dulani / markdown-details-collapsible.md
Created February 12, 2020 19:05 — forked from pierrejoubert73/markdown-details-collapsible.md
How to add a collapsible section in markdown.

A collapsible section containing markdown

Click to expand!

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets
import sys
debug = True
def exceptionHandler(exception_type, exception, traceback, debug_hook=sys.excepthook):
'''Print user friendly error messages normally, full traceback if DEBUG on.
Adapted from http://stackoverflow.com/questions/27674602/hide-traceback-unless-a-debug-flag-is-set
'''
if debug:
print('\n*** Error:')
# raise
@Dulani
Dulani / README.md
Created October 17, 2019 23:47 — forked from timelyportfolio/README.md
Using arbitrary Leaflet plugins with Leaflet for R

Using arbitrary Leaflet JS plugins with Leaflet for R

The Leaflet JS mapping library has lots of plugins available. The Leaflet package for R provides direct support for some, but far from all, of these plugins, by providing R functions for invoking the plugins.

If you as an R user find yourself wanting to use a Leaflet plugin that isn't directly supported in the R package, you can use the technique shown here to load the plugin yourself and invoke it using JS code.

yum install httpd yum-utils createrepo
@Dulani
Dulani / miniconda_on_rpi.md
Created September 15, 2019 00:43 — forked from simoncos/miniconda_on_rpi.md
Install Miniconda 3 on Raspberry Pi
@Dulani
Dulani / idletime.sh
Created April 18, 2019 14:33 — forked from Neil-Smithline/idletime.sh
Mac OS X Idle Time Shell Script
#!/bin/sh
# Get MacOSX idletime. Shamelessly stolen from http://bit.ly/yVhc5H
/usr/sbin/ioreg -c IOHIDSystem | /usr/bin/awk '/HIDIdleTime/ {print int($NF/1000000000); exit}'
@Dulani
Dulani / pushpop.R
Created April 4, 2019 13:34 — forked from leeper/pushpop.R
One-line push and pop in R
# push
push <- function(x, values) (assign(as.character(substitute(x)), c(x, values), parent.frame()))
# pop
pop <- function(x) (assign(as.character(substitute(x)), x[-length(x)], parent.frame()))
# example
z <- 1:3
push(z, 4)
z