List of helpful shortcuts for faster coding
If you have any other helpful shortcuts, feel free to add in the comments of this gist :)
# docs/Makefile.dash | |
include Makefile | |
SPHINXBUILD = sphinx-build | |
BUILDDIR = $(shell pwd) | |
PROJECT_NAME = "mne" | |
.PHONY: dashdoc | |
dashdoc: | |
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) -D 'html_theme=epub' $(BUILDDIR)/dashdoc | |
doc2dash -A -v -n $(PROJECT_NAME) -d $(BUILDDIR)/ -f -I index.html -j $(BUILDDIR)/dashdoc | |
@echo |
i3-gaps has some packages that are required for it to work so install these things:
sudo apt install libxcb1-dev libxcb-keysyms1-dev libpango1.0-dev libxcb-util0-dev libxcb-icccm4-dev libyajl-dev libstartup-notification0-dev libxcb-randr0-dev libev-dev libxcb-cursor-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev autoconf xutils-dev libtool automake
You also need to install libxcb-xrm-dev
, but I got Unable to locate package libxcb-xrm-dev
when trying to install from the apt repositories on Ubuntu 16.04. If this happens to you, just install it from source using these commands:
mkdir tmp
set imap_user="[email protected]" | |
set imap_pass=`/usr/bin/security find-generic-password -w -a '[email protected]' -s 'Gmail'` | |
set folder=imaps://imap.gmail.com/ | |
set spoolfile=+INBOX | |
set record="+[Gmail]/Sent Mail" | |
set postponed="+[Gmail]/Drafts" | |
# https://www.neomutt.org/guide/reference search sleep_time for additional info | |
set sleep_time=0 # be faster |
GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.
import numpy as np | |
import seaborn as sns | |
from scipy.ndimage import rotate | |
def plot_heatmap_triu(m, shape=(10,10)): | |
""" | |
Plot a symmetric matrix as a triangluar heatmap. | |
- m: 2d ndarray of numpy (symmetric) |
# check.packages function: install and load multiple R packages. | |
# Check to see if packages are installed. Install them if they are not, then load them into the R session. | |
check.packages <- function(pkg){ | |
new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])] | |
if (length(new.pkg)) | |
install.packages(new.pkg, dependencies = TRUE) | |
sapply(pkg, require, character.only = TRUE) | |
} | |
# Usage example |