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
import strformat | |
import tables | |
# A small program to make using 256 colors in Nim less painful. | |
# Original ZSH version from: | |
# P.C. Shyamshankar <sykora@lucentbeing.com> | |
# Copied from https://github.com/sykora/etc/blob/master/zsh/functions/spectrum/ | |
# Nim rewrite by Laszlo Szathmary <jabba.laci@gmail.com> | |
# thanks to narimiran and kickeroo for making the code more idiomatic Nim 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
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" |
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/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 |
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
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.
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
task GenotypeGVCFs { | |
File workspace_tar | |
String interval | |
String output_vcf_filename | |
String gatk_path | |
File ref_fasta | |
File ref_fasta_index |
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
;; TRAMP gcloud ssh | |
(add-to-list 'tramp-methods | |
'("gssh" | |
(tramp-login-program "gssh") | |
(tramp-login-args (("%h"))) | |
(tramp-async-args (("-q"))) | |
(tramp-remote-shell "/bin/sh") | |
(tramp-remote-shell-args ("-c")) | |
(tramp-gw-args (("-o" "GlobalKnownHostsFile=/dev/null") | |
("-o" "UserKnownHostsFile=/dev/null") |