Skip to content

Instantly share code, notes, and snippets.

View yrevar's full-sized avatar

yrevar

View GitHub Profile
import numpy
import pylab
from pylab import *
from matplotlib.widgets import Slider, Button, RadioButtons
# default 2d transformation matrix values
x1_def, x2_def, y1_def, y2_def = 1,0,0,1
ax = subplot(111)
subplots_adjust(bottom=0.25)
# -*- coding: utf-8 -*-
import numpy as np
import pylab
"""
Imagine you have two random variables X_1 and X_2 and both of them are normally distributed, but with different parameters. In this example, let's say distribution of X_1 is g1(x) and for X2 it is g2(x).
P(X_1) ~ N(µ1,Σ1), P(X_2) ~ N(µ2, Σ2). Where Σ1 and Σ2 are variances of X_1 and X_2 consecutively which are in this example s1^2 and s2^2.
export PATH=$PATH:/$HOME/bin
if [ -z ${DISPLAY} ]
then
export DISPLAY=:0.0
fi
# Terminal history settings
export HISTCONTROL=ignoredups:erasedups # no duplicate entries
export HISTSIZE=1000000 # big big history
export HISTFILESIZE=1000000 # big big history
@yrevar
yrevar / bashrc backup gist
Created March 17, 2016 19:51
Backup your bashrc on gist with a very simple command. It preserves the gist url and updates the same file you backed up on gist before.
# Target OS: Linux/Mac
# Prerequisites: Make sure you have installed and setup gist (https://github.com/defunkt/gist), and modified bashrc path as per your own setup which in my case was $HOME/.bash_profile.
gist -u $(cat $HOME/.bashrc_gisturl) -c -p -f "my_last_bashrc" -d "`date`" $HOME/.bash_profile > $HOME/.bashrc_gisturl
@yrevar
yrevar / imagenet1000_clsid_to_human.pkl
Created March 17, 2016 22:05
pickle dictionary: imagenet 1000 class id to human readable labels
(dp0
I0
S'tench, Tinca tinca'
p1
sI1
S'goldfish, Carassius auratus'
p2
sI2
S'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias'
p3
@yrevar
yrevar / imagenet1000_clsidx_to_labels.txt
Last active April 25, 2024 01:57
text: imagenet 1000 class idx to human readable labels (Fox, E., & Guestrin, C. (n.d.). Coursera Machine Learning Specialization.)
{0: 'tench, Tinca tinca',
1: 'goldfish, Carassius auratus',
2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias',
3: 'tiger shark, Galeocerdo cuvieri',
4: 'hammerhead, hammerhead shark',
5: 'electric ray, crampfish, numbfish, torpedo',
6: 'stingray',
7: 'cock',
8: 'hen',
9: 'ostrich, Struthio camelus',
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
name: "CaffeNet"
layer {
name: "data"
type: "Input"
top: "data"
input_param { shape: { dim: 10 dim: 3 dim: 227 dim: 227 } }
}
layer {
name: "conv1"
type: "Convolution"
name: "CaffeNet"
layer {
name: "data"
type: "Data"
top: "data"
top: "label"
include {
phase: TRAIN
}
transform_param {
@yrevar
yrevar / readme.md
Created January 4, 2017 00:07 — forked from baraldilorenzo/readme.md
VGG-16 pre-trained model for Keras

##VGG16 model for Keras

This is the Keras model of the 16-layer network used by the VGG team in the ILSVRC-2014 competition.

It has been obtained by directly converting the Caffe model provived by the authors.

Details about the network architecture can be found in the following arXiv paper:

Very Deep Convolutional Networks for Large-Scale Image Recognition

K. Simonyan, A. Zisserman