This is the sequence of steps to follow to create a root gh-pages branch. It is based on a question at [SO]
cd /path/to/repo-name
git symbolic-ref HEAD refs/heads/gh-pages
rm .git/index
git clean -fdx
echo "My GitHub Page" > index.html
| 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.
| import strformat | |
| import tables | |
| # A small program to make using 256 colors in Nim less painful. | |
| # Original ZSH version from: | |
| # P.C. Shyamshankar <[email protected]> | |
| # Copied from https://github.com/sykora/etc/blob/master/zsh/functions/spectrum/ | |
| # Nim rewrite by Laszlo Szathmary <[email protected]> | |
| # thanks to narimiran and kickeroo for making the code more idiomatic Nim code |
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"))$ 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| 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" |
| #!/bin/sh | |
| # tools-deps equivalent of `lein-try` | |
| # | |
| # Additionally see: | |
| # | |
| # https://github.com/hagmonk/find-deps -- what user/find-deps links to | |
| # https://github.com/juxt/edge/blob/master/main/aliases/rebel/edge/rebel/main.clj | |
| # https://clojars.org/seancorfield/depstar -- clj-based uberjarrer |
| p = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE) | |
| # Grab stdout line by line as it becomes available. This will loop until | |
| # p terminates. | |
| while p.poll() is None: | |
| l = p.stdout.readline() # This blocks until it receives a newline. | |
| print l | |
| # When the subprocess terminates there might be unconsumed output | |
| # that still needs to be processed. | |
| print p.stdout.read() |
A Pen by Demetri Ganoff on CodePen.