Skip to content

Instantly share code, notes, and snippets.

View rajadain's full-sized avatar

Terence Tuhinanshu rajadain

View GitHub Profile
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 October 29, 2017 19:20
Demo of ULMO failure when fetching data for CoCoRAHS service
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 September 28, 2017 14:02
Notebook showing differing dates from CUAHSI
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rajadain
rajadain / haskellbook-chapter-13-hangman.hs
Created September 19, 2017 01:44
Haskell Book Chapter 13
module Main where
import Control.Monad (forever)
import Data.Char (toLower)
import Data.Maybe (isJust)
import Data.List (intersperse, nub)
import System.Exit (exitSuccess)
import System.Random (randomRIO)
import System.IO
@rajadain
rajadain / 11-exercise-phone.hs
Created September 5, 2017 20:10
Haskell Book Chapter 11 Exercise: Phone
-- 11-exercise-phone.hs
module ExercisePhone where
import Data.Char
import Data.List
import Data.Maybe
type Key = Char
type Presses = Int
@rajadain
rajadain / haskellbook-chapter-10-notes.md
Created August 22, 2017 07:39
Haskell Book Chapter 10 Notes and Exercises

Notes and Exercises from Chapter 10 of Haskell Book

Undefined Spine vs Undefined Item

[1, 2, 3] ++ undefined
 :
@rajadain
rajadain / README.md
Last active August 9, 2017 20:44
PNG to GeoTrellis ColorMap

Requirements

Demo

$ ./convert.sh ppt_colorbar.png
+ gm convert ppt_colorbar.png txt:-
@rajadain
rajadain / haskellbook-chapter-5-notes.md
Created July 18, 2017 03:25
Haskell Book Chapter 5 Notes and Exercises

Notes and Exercises from Chapter 5 of Haskell Book

Benefits of a type system:

  • Many errors caught before program execution, at compile time
  • Compiler optimizations
  • Documentation of programs
  • Less code to write because you don't have to validate data at every step

Many, perhaps most, programming languages have type systems that feel like haggling with a petty merchant. Haskell provides a type system that more closely resembles a quiet, pleasant conversation with a colleague than an argument in the bazaar.

@rajadain
rajadain / github-hasklig-fira-code-style.css
Last active February 6, 2019 19:43
Hasklig / Fira Code on GitHub Stylish CSS
@-moz-document domain("github.com"), domain("gist.github.com"), domain("render.githubusercontent.com") {
/* Hasklig https://github.com/i-tu/Hasklig */
/* Fira Code https://github.com/tonsky/FiraCode */
/* Ligaturizer https://github.com/ToxicFrog/Ligaturizer */
.branch-name,
.blob-num,
.blob-code-inner,
.CodeMirror pre,
.commit .sha,
.commit-desc pre,
@rajadain
rajadain / unstable-warner.js
Last active November 15, 2017 02:01
GitHub Pull Request Unstable Warner Tampermonkey Script
// ==UserScript==
// @name Unstable Warner
// @namespace http://tampermonkey.net/
// @version 0.5
// @description Warn before merging unstable pull requests on GitHub
// @author Terence Tuhinanshu @rajadain
// @match https://github.com/**/pull/*
// @grant none
// ==/UserScript==