Skip to content

Instantly share code, notes, and snippets.

View Dovermore's full-sized avatar

Calvin Huang Dovermore

  • Melbourne
View GitHub Profile
@backslash112
backslash112 / open_vim_file_in_iterm.sh
Last active August 22, 2023 11:12
Use vim to open a file in iTerm2 from IntelliJ IDEA
#!/bin/sh
vim="vim $1 $2 $3"
osascript -e "
tell application \"iTerm\"
set myterm to (create window with default profile)
tell myterm
activate current session
launch session \"Default Session\"
tell the current session
@bmmalone
bmmalone / paper.tex
Last active May 23, 2023 06:53
Simple template for latex file with many useful includes and comments
\documentclass[a4paper,10pt]{article}
% make writing commands easier
\usepackage{xparse}
% colored text
\usepackage{color}
% include eps, pdf graphics
\usepackage{graphicx}
@akiross
akiross / Convolutional Arithmetic.ipynb
Last active September 11, 2025 18:04
Few experiments on how convolution and transposed convolution (deconvolution) should work in tensorflow.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pbugnion
pbugnion / ipython_notebook_in_git.md
Last active October 22, 2023 12:25
Keeping IPython notebooks under Git version control

This gist lets you keep IPython notebooks in git repositories. It tells git to ignore prompt numbers and program outputs when checking that a file has changed.

To use the script, follow the instructions given in the script's docstring.

For further details, read this blogpost.

The procedure outlined here is inspired by this answer on Stack Overflow.

@pv
pv / colorized_voronoi.py
Last active July 16, 2025 04:11
Colorized Voronoi diagram with Scipy, in 2D, including infinite regions
import numpy as np
import matplotlib.pyplot as plt
from scipy.spatial import Voronoi
def voronoi_finite_polygons_2d(vor, radius=None):
"""
Reconstruct infinite voronoi regions in a 2D diagram to finite
regions.
Parameters