Skip to content

Instantly share code, notes, and snippets.

View insujeon's full-sized avatar

Insu Jeon insujeon

View GitHub Profile
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torchvision
from torchvision import datasets, transforms
import math
import numpy as np
# Hardcoded variables for hyperfan init
@insujeon
insujeon / 30-touchpad.conf
Created April 28, 2022 07:17 — forked from miguelmota/30-touchpad.conf
Arch linux enable tap to click on touchpad
Section "InputClass"
Identifier "touchpad"
Driver "libinput"
MatchIsTouchpad "on"
Option "Tapping" "on"
Option "TappingButtonMap" "lmr"
EndSection
@insujeon
insujeon / get-ieee.txt
Created March 4, 2022 04:51 — forked from paulaksm/get-ieee.txt
Download IEEE papers from command line
# If under a valid institutional IP address, the followng command will download an IEEE hosted paper of a specific <ID-NUMBER>
and saved it as paper.pdf
wget "http://ieeexplore.ieee.org/stampPDF/getPDF.jsp?tp=&isnumber=&arnumber=<ID-NUMBER>" -O paper.pdf

Welcome to WordGrinder

Important note for Windows users

WordGrinder is a port of a Unix program, and a few things don’t map well onto the way Windows works. There are some things you need to know.

  • the mouse is ignored. WordGrinder is keyboard driven.
  • the close button at the top right hand corner of the window won’t work. Instead, to quit, type CTRL+Q (or press ESC to open the menu and pick File_→_Quit).
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@insujeon
insujeon / gan_1d.py
Created October 27, 2017 18:28 — forked from vvanirudh/gan_1d.py
GAN to model a 1D gaussian distribution
# Drawn from https://gist.github.com/rocknrollnerd/06bfed6b9d1bce612fd6 (in theano)
# This is implemented in PyTorch
# Author : Anirudh Vemula
import numpy as np
import torch
import torch.nn as nn
from torch.autograd import Variable
from scipy.stats import norm
import matplotlib.pyplot as plt
@insujeon
insujeon / bayes_by_backprop.py
Created October 27, 2017 18:28 — forked from vvanirudh/bayes_by_backprop.py
Bayes by Backprop in PyTorch (introduced in the paper "Weight uncertainty in Neural Networks", Blundell et. al. 2015)
# Drawn from https://gist.github.com/rocknrollnerd/c5af642cf217971d93f499e8f70fcb72 (in Theano)
# This is implemented in PyTorch
# Author : Anirudh Vemula
import torch
import torch.nn as nn
from torch.autograd import Variable
import numpy as np
from sklearn.datasets import fetch_mldata
def sample_gumbel(shape, eps=1e-20):
"""Sample from Gumbel(0, 1)"""
U = tf.random_uniform(shape,minval=0,maxval=1)
return -tf.log(-tf.log(U + eps) + eps)
def gumbel_softmax_sample(logits, temperature):
""" Draw a sample from the Gumbel-Softmax distribution"""
y = logits + sample_gumbel(tf.shape(logits))
return tf.nn.softmax( y / temperature)
@insujeon
insujeon / .pdbrc.py
Created August 18, 2017 05:35 — forked from justinabrahms/.pdbrc.py
default pdbpp to start with sticky enabled
import pdb
class Config(pdb.DefaultConfig):
sticky_by_default = True
@insujeon
insujeon / nms_fast.m
Created August 17, 2017 02:54 — forked from quantombone/nms_fast.m
blazing fast nms (non-maximum suppression)
function top = nms(boxes, overlap)
% top = nms_fast(boxes, overlap)
% Non-maximum suppression. (FAST VERSION)
% Greedily select high-scoring detections and skip detections
% that are significantly covered by a previously selected
% detection.
% NOTE: This is adapted from Pedro Felzenszwalb's version (nms.m),
% but an inner loop has been eliminated to significantly speed it
% up in the case of a large number of boxes
% Tomasz Malisiewicz (tomasz@cmu.edu)