Skip to content

Instantly share code, notes, and snippets.

View meetps's full-sized avatar
IDDQD

Meet Shah meetps

IDDQD
View GitHub Profile
@kastnerkyle
kastnerkyle / pascalvoc.py
Last active June 4, 2018 21:41
Wrapper to read pascal voc data
# Author: Kyle Kastner # License: BSD 3-Clause # For a reference on parallel processing in Python see tutorial by David Beazley # http://www.slideshare.net/dabeaz/an-introduction-to-python-concurrency # Loosely based on IBM example # http://www.ibm.com/developerworks/aix/library/au-threadingpython/ # If you want to download all the PASCAL VOC data, use the following in bash... """ #! /bin/bash # 2008 wget http://host.robots.ox.ac.uk/pascal/VOC/voc2008/VOCtrainval_14-Jul-2008.tar # 2009 wget http://host.robots.ox.ac.uk/pascal/VOC/voc2009/VOCtrainval_11-May-2009.tar # 2010 wget http://host.robots.ox.ac.uk/pascal/VOC/voc2010/VOCtrainval_03-May-2010.tar # 2011 wget http://host.robots.ox.ac.uk/pascal/VOC/voc2011/VOCtrainval_25-May-2011.tar # 2012 wget http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCtrainval_11-May-2012.tar # Latest devkit wget http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCdevkit_18-May-2011.tar """ try: import Queue except ImportError: import queue as Queue import threading import ti
@kukuruza
kukuruza / gist_cifar10_train.py
Last active November 4, 2024 17:36
Tensorflow: visualize convolutional filters (conv1) in Cifar10 model
from math import sqrt
def put_kernels_on_grid (kernel, pad = 1):
'''Visualize conv. filters as an image (mostly for the 1st layer).
Arranges filters into a grid, with some paddings between adjacent filters.
Args:
kernel: tensor of shape [Y, X, NumChannels, NumKernels]
pad: number of black pixels around each filter (between them)
@shagunsodhani
shagunsodhani / Batch Normalization.md
Last active July 25, 2023 18:07
Notes for "Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift" paper

The Batch Normalization paper describes a method to address the various issues related to training of Deep Neural Networks. It makes normalization a part of the architecture itself and reports significant improvements in terms of the number of iterations required to train the network.

Issues With Training Deep Neural Networks

Internal Covariate shift

Covariate shift refers to the change in the input distribution to a learning system. In the case of deep networks, the input to each layer is affected by parameters in all the input layers. So even small changes to the network get amplified down the network. This leads to change in the input distribution to internal layers of the deep network and is known as internal covariate shift.

It is well established that networks converge faster if the inputs have been whitened (ie zero mean, unit variances) and are uncorrelated and internal covariate shift leads to just the opposite.

@ebenolson
ebenolson / Dockerfile
Created November 9, 2015 17:23
openslide dockerfile
FROM ubuntu:trusty
########################################
#
# openslide 3.4.1 image based on Ubuntu:trusty
#
#######################################
# Set Locale
@hnykda
hnykda / keras_prediction.py
Last active August 21, 2020 01:33
Predicting sequences of vectors (regression) in Keras using RNN - LSTM (danielhnyk.cz)
import pandas as pd
from random import random
flow = (list(range(1,10,1)) + list(range(10,1,-1)))*100
pdata = pd.DataFrame({"a":flow, "b":flow})
pdata.b = pdata.b.shift(9)
data = pdata.iloc[10:] * random() # some noise
import numpy as np
@calderonroberto
calderonroberto / app.py
Last active June 1, 2022 20:06
Flask Redis Example
#!/bin/python
# Dependencies:
# pip install flask
# pip install redis
from flask import Flask
from flask import request
import flask
import redis
@jasonleonhard
jasonleonhard / gist:301d277a8684c0a9f79d
Last active March 18, 2025 15:32
Invert colors in Chrome Browser (with DevTools JavaScript console)
javascript: (function () {
// the css we are going to inject
var css =
"html {" +
" -webkit-filter: invert(100%);" +
" -moz-filter: invert(100%);" +
" -o-filter: invert(100%);" +
" -ms-filter: invert(100%);" +
"}",
head = document.getElementsByTagName("head")[0],
// With little creativity and some coding skills you can do a lot of things using this code to annoy some one.
// works on the first chat box opened. only works in google chrome!
function dispatch(target) {
var evt = document.createEvent("Event");
evt.initEvent("keydown",true,true);
evt.keyCode = 13;
evt.which = 13;
target.dispatchEvent(evt);
}
//Works on http://web.whatsapp.com
// With little creativity and some coding skills you can do a lot of things using this code to annoy some one.
function dispatch(target, eventType, char) {
var evt = document.createEvent("TextEvent");
evt.initTextEvent (eventType, true, true, window, char, 0, "en-US");
target.focus();
target.dispatchEvent(evt);
}
function triggerClick() {
var event = new MouseEvent('click', {
@staringispolite
staringispolite / asciiputsonglasses
Last active January 20, 2025 07:52
Ascii art sunglasses meme
Puts on glasses:
(•_•)
( •_•)>⌐■-■
(⌐■_■)
Takes off glasses ("mother of god..."):
(⌐■_■)
( •_•)>⌐■-■