This file contains hidden or 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 | |
import ( | |
"fmt" | |
// "compress/gzip" | |
gzip "github.com/klauspost/pgzip" | |
"bufio" | |
"os" | |
"log" | |
) |
This file contains hidden or 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 python3 | |
# do an action in parallel across multiple threads in Python | |
# example: get the average of lists of numbers | |
# references; | |
# https://stackoverflow.com/questions/8533318/multiprocessing-pool-when-to-use-apply-apply-async-or-map | |
# https://e2eml.school/multiprocessing.html | |
# https://docs.python.org/3.7/library/multiprocessing.html#multiprocessing.pool.Pool.apply_async |
A visual example for interpretting the output of git diff
, along with a helper alias gdiff
to make it easier to git diff
two files or directories.
Example input files:
$ cat example1.txt
Sample1
Sample2
Sample3
Sample4
This file contains hidden or 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 python | |
""" | |
Module to send email messages | |
https://www.tutorialspoint.com/python/python_sending_email.htm | |
""" | |
import getpass | |
import smtplib | |
# default global configs |
- Application manager for OS X
- some homebrew downloads you might need:
brew tap caskroom/cask
This file contains hidden or 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 python | |
# -*- coding: utf-8 -*- | |
""" | |
Convert SLURM squeue output to JSON format | |
""" | |
import subprocess as sp | |
import json | |
process = sp.Popen(['squeue', '-o', '%all'], stdout = sp.PIPE, stderr = sp.PIPE, shell = False, universal_newlines = True) | |
proc_stdout, proc_stderr = process.communicate() |
This file contains hidden or 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
{ | |
"draw_white_space": "all", | |
"font_size": 17, | |
"open_files_in_new_window": false, | |
"scroll_past_end": true, | |
"update_check": false | |
} |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
<style> | |
.box { | |
height: 100px; | |
width: 100px; | |
top: 100px; |
This file contains hidden or 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
> install.packages("ggrepel") | |
also installing the dependencies ‘viridisLite’, ‘scales’, ‘ggplot2’ | |
trying URL 'https://cran.rstudio.com/bin/macosx/mavericks/contrib/3.3/viridisLite_0.2.0.tgz' | |
Content type 'application/x-gzip' length 54110 bytes (52 KB) | |
================================================== | |
downloaded 52 KB | |
trying URL 'https://cran.rstudio.com/bin/macosx/mavericks/contrib/3.3/scales_0.5.0.tgz' | |
Content type 'application/x-gzip' length 336683 bytes (328 KB) |
NewerOlder