A Pen by Demetri Ganoff on CodePen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# select the relevant commits i would like to take from source git repoA | |
mkdir -p patches | |
git format-patch -1 --stdout 8adb447ccbfd88bf57a571105f6af3b000f343c5 >patches/1.patch | |
git format-patch -1 --stdout 8f71637c2e407aa8d9e040b1f8168cd5bc9590a4 >patches/2.patch | |
git format-patch -1 --stdout 968ac4b5e74abf26cf3e53c6f2a1722e8ab62de3 >patches/3.patch | |
git format-patch -1 --stdout d7c13e31b502049c436d898b037729d08b6078a0 >patches/4.patch | |
git format-patch -1 --stdout e00ddb86adebb2d528a08abd91bfd7237d32a07e >patches/5.patch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
// goleveldb test | |
// mentioned in bleve google group | |
// https://groups.google.com/forum/#!topic/bleve/aHZ8gmihLiY | |
// | |
// Based on an earlier toy program using bleve defaults (including BoltDB): | |
// https://gist.github.com/indraniel/8108bd7def9b5e222417 | |
import ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy | |
import Gnuplot | |
def rainfall_intensity_t10(t): | |
return 11.23 * (t**(-0.713)) | |
def rainfall_intensity_t50(t): | |
return 18.06 * (t**(-0.713)) | |
g = Gnuplot.Gnuplot() |
Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.
$ rlwrap csi
#;1> (import (prefix (chicken process) p:))
; loading /usr/local/Cellar/chicken/5.0.0/lib/chicken/9/chicken.process.import.so ...
#;2> (p:system "ls")
Applications Library bin
0
import pandas as pd
import numpy as np
from tabulate import tabulate
df = pd.DataFrame(np.random.random((4,3)), columns=['A','B','C'])
print("foo")
return(tabulate(df, headers="keys", tablefmt="orgtbl"))
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env csi -ss | |
;; An example file reading script with chicken scheme | |
(use extras) | |
(define (read-it file) | |
(let ((fh (open-input-file file))) | |
(let loop((c (read-line fh))) | |
(if (eof-object? c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl --header 'Authorization: token INSERTACCESSTOKENHERE' \ | |
--header 'Accept: application/vnd.github.v3.raw' \ | |
--remote-name \ | |
--location https://api.github.com/repos/owner/repo/contents/path | |
# Example... | |
TOKEN="INSERTACCESSTOKENHERE" | |
OWNER="BBC-News" | |
REPO="responsive-news" |