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 python3 | |
import subprocess, os | |
import sys | |
ERR1 = 'Latexmk: Errors, so I did not complete making targets' | |
ERR2 = 'pdflatex: Command for \'pdflatex\' gave return code 256' | |
def main(): | |
proc = subprocess.Popen(['latexmk', '-pvc'] + sys.argv[1:], | |
stdin=subprocess.PIPE, | |
stdout=subprocess.PIPE, | |
stderr=subprocess.STDOUT, |
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
# remap prefix from 'C-b' to 'C-o' | |
unbind C-b | |
set-option -g prefix C-o | |
bind-key C-o send-prefix | |
bind-key A rename-session | |
unbind , | |
# split panes using | and - | |
bind | split-window -h | |
bind - split-window -v | |
unbind '"' |
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 python | |
import sys | |
from pdb import set_trace | |
import sympy as ss | |
from mpmath import * | |
import matplotlib.pyplot as plt | |
from matplotlib import cm | |
import numpy as np | |
import argparse | |
from sympy.abc import x,y |
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 bash | |
cat <<EOF | |
{ | |
"cells": [], | |
"metadata": {}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} | |
EOF |
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
$pdf_previewer = 'open -a Skim'; | |
$pdflatex = 'pdflatex -synctex=1 -interaction=nonstopmode '; | |
$pdf_mode = 1; | |
## $out_dir = 'build'; | |
@generated_exts = (@generated_exts, 'synctex.gz'); |
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
[flake8] | |
ignore = E226,E302,E41,E402,E261,E305,E111,E121,E401,E701,W501,C901,W503,E266,E114,E228,E722,E741 | |
max-line-length = 120 | |
exclude = tests/* | |
max-complexity = 10 |
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
## https://askubuntu.com/a/423555/625555 | |
## There is also libapt, and python-dpkg and other packages that | |
## can talk to ubuntu package managers. | |
name=libqt5sql5 | |
CMDPFX=echo | |
DEPS="$(apt-cache depends $name | grep Depends | awk '{print $2}')" | |
i=0 | |
while [[ $i < ${#DEPS} ]] ; do | |
i=$(( i + 1 )) | |
# dpkg -s libpng16-16 | grep Status | wc -l |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
FNC=${1-2clsp} | |
PFX=${2-echo} | |
2clsp () { | |
$PFX rsync -av ../nevergrad clsp:~/project/ | |
} | |
2mac () { | |
$PFX rsync -av clsp:~/project/nevergrad/nevergrad/optimization/recorded_recommendations.csv nevergrad/optimization/ |
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
## --- Save this file as pymeta.py ---- ## | |
# inspired by pyxl and github.com/SyrusAkbary/interpy | |
# >> import pymeta | |
# >> print(codecs.decode("1\n2", encoding='pymeta')) | |
# 1 | |
# import time; print(time.time()); | |
# 2 | |
## ---------------------- ## | |
from six import StringIO | |
import codecs, tokenize, encodings |