Skip to content

Instantly share code, notes, and snippets.

Avatar

Terence Tuhinanshu rajadain

View GitHub Profile
@rajadain
rajadain / wbd.ipynb
Created Aug 3, 2022
Demo of using HyRiver to query Watershed Boundary Data
View wbd.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rajadain
rajadain / rename-s10-to-dropbox.ps1
Created Oct 13, 2019
Renames .MP4 files from Samsung Galaxy S10 filename style to Dropbox "Camera Upload" filename style
View rename-s10-to-dropbox.ps1
Get-ChildItem "." -Filter "*.mp4" | Foreach-Object {
$year = $_.BaseName.Substring(0, 4)
$month = $_.BaseName.Substring(4, 2)
$day = $_.BaseName.Substring(6, 2)
$hour = $_.BaseName.Substring(9, 2)
$minute = $_.BaseName.Substring(11, 2)
$second = $_.BaseName.Substring(13, 2)
$newName = "$($year)-$($month)-$($day) $($hour).$($minute).$($second)"
@rajadain
rajadain / README.md
Last active Feb 18, 2019
MMW UtfGrid Visualizer
View README.md

MMW UtfGrid Visualizer

Instructions

Have MMW running locally. Open this page. Hover over the map to highlight UTFGrid blocks.

Credits

Pieced together with ideas from:

@rajadain
rajadain / README.md
Created Jan 2, 2019
JSX Ternary Conditional Assignment
View README.md

JSX Ternary Conditional Assignment

Straight

const legend = isCropLayerActive ? (
    <div
        className="layercontrol__legend"
        onMouseOver={disableMapZoom}
 onFocus={disableMapZoom}
@rajadain
rajadain / README.md
Last active Sep 4, 2018
subbasin-diff
View README.md

Diff in Subbasin results of "South Branch Rancocas Creek, HUC-10 Watershed ID 0204020202" between baseline (production) and post-land use change in WikiWatershed/model-my-watershed#2944

@rajadain
rajadain / haskellbook-chapter-22-exercises.hs
Last active Dec 20, 2017
Notes and exercises for Haskell Book Chapter 22: Reader
View haskellbook-chapter-22-exercises.hs
module ExerciseChapter22 where
import Control.Applicative
import Data.Maybe
x = [1, 2, 3]
y = [4, 5, 6]
z = [7, 8, 9]
xs :: Maybe Integer
@rajadain
rajadain / mmw-cli.py
Created Nov 14, 2017
MapShed CLI Test Query
View mmw-cli.py
from __future__ import print_function
import time
import requests
class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
View bigcz-cocorahs-fail-2-years.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rajadain
rajadain / bigcz-cocorahs-fail.ipynb
Created Oct 29, 2017
Demo of ULMO failure when fetching data for CoCoRAHS service
View bigcz-cocorahs-fail.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rajadain
rajadain / bigcz-differing-dates.ipynb
Last active Sep 28, 2017
Notebook showing differing dates from CUAHSI
View bigcz-differing-dates.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.