Skip to content

Instantly share code, notes, and snippets.

View jaanaltosaar's full-sized avatar
🍉
Hungry

Jaan Altosaar Li jaanaltosaar

🍉
Hungry
View GitHub Profile
@jaanaltosaar
jaanaltosaar / latexit-template-keynote-whitney.tex
Last active May 15, 2020 06:56
LaTeXiT template for settings that look okay with Keynote and Whitney font
\documentclass[10pt]{article}
\usepackage[usenames]{color} %used for font color
\usepackage{amssymb} %maths
\usepackage{amsmath} %maths
\usepackage{mathtools}
\usepackage[utf8]{inputenc} %useful to type directly diacritic characters
% TABLES
\usepackage{booktabs}
\usepackage{array}
@jaanaltosaar
jaanaltosaar / 2017-06-21-tea-talk-development.md
Last active December 3, 2018 20:38
Quick overview of snapshot of dev environment / workflow

Towards a better mac development environment in 2018

Progress, perspectives, & new beginnings.

Advice: Install everything. Go all-in on all the suggested tools for a week, then see what sticks. Start using all of them at once. There's a large 'activation energy' to switching tools but it is worth the up-front investment for a lifetime of saved milliseconds on everyday tasks like switching directories, etc.

Useful tools:

  • brew cask: install most desktop applications brew cask install spotify evernote simplenote dropbox vlc slack 1password skim caffeine mactex skype anaconda google-chrome alfred iterm2 flux spectacle rescuetime sublime-text macbreakz little-snitch
@jaanaltosaar
jaanaltosaar / Dockerfile
Created June 6, 2017 18:36
Dockerfile for dotfiles with vim + tmux + c++ dev environment & private github ssh key support. Using dotfiles from https://github.com/altosaar/dotfiles
# Fixed ubuntu version
FROM ubuntu:16.04
# Install Ruby and Rails dependencies
RUN apt-get update && apt-get install -y \
tmux \
gdb \
gcc \
g++ \
python \
@jaanaltosaar
jaanaltosaar / black_box_vi_bayesian_linear_regression.py
Created February 11, 2017 17:32
Black box variational inference for Bayesian linear regression. Numpy and scipy only.
"""Use black-box variational inference (https://arxiv.org/abs/1401.0118) to
fit Bayesian linear regression (https://en.wikipedia.org/wiki/Bayesian_linear_regression)
and ensure it gets the analytic posterior mean from wikipedia.
"""
import numpy as np
import scipy.stats
def generate_data(cfg):
"""synthetic data:
@jaanaltosaar
jaanaltosaar / tensorflow_util.py
Last active October 20, 2016 16:23
Utility functions for tensorflow and tensorboard
import tensorflow as tf
from tensorflow.core.framework import summary_pb2
pprint = lambda x, msg: tf.Print(x, [x], message=msg)
def scalar_summary(tag, value):
"""Create a scalar summary and add it to the collection if it doesn't exist."""
if summary_exists(tag) is None: