Skip to content

Instantly share code, notes, and snippets.

View dendisuhubdy's full-sized avatar
🚀
at the speed of light

Dendi Suhubdy dendisuhubdy

🚀
at the speed of light
View GitHub Profile
@dendisuhubdy
dendisuhubdy / video_cap_feed.py
Created May 8, 2017 04:00
Capturing Video and Saving it to disk as AVI
import time
import datetime
import numpy as np
import cv2
import sys
cap = cv2.VideoCapture(0)
now = datetime.datetime.now()
#fname = now.strftime("%B-%d-%Y")

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@dendisuhubdy
dendisuhubdy / updating_fork.sh
Created May 10, 2017 14:18
Keeping Fork Updated
# 1. Clone the repo
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
#2. Add remote from original repository in your forked repository:
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
# 3. Updating your fork from original repo to keep up with their changes:
@dendisuhubdy
dendisuhubdy / .vimrc
Created June 10, 2017 15:53
My vimrc file
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
@dendisuhubdy
dendisuhubdy / crbm.py
Created June 12, 2017 03:19 — forked from gwtaylor/crbm.py
Theano CRBM demonstration
""" Theano CRBM implementation.
For details, see:
http://www.uoguelph.ca/~gwtaylor/publications/nips2006mhmublv
Sample data:
http://www.uoguelph.ca/~gwtaylor/publications/nips2006mhmublv/motion.mat
@author Graham Taylor"""
import numpy
@dendisuhubdy
dendisuhubdy / yellow_fin.py
Created July 4, 2017 12:51 — forked from botev/run_yellow_fin_vae.py
Theano Yellow Fin
import numpy as np
import theano
import theano.tensor as T
from theano.printing import Print
from collections import OrderedDict
def yellow_fin(loss, params, beta=0.99,
learning_rate_init=0.01, momentum_init=0.0,
t=None, window_width=20, debug=False):
.plt.got:
jmp QWORD PTR [rip+0x200c02] # 600ff8 <_DYNAMIC+0x200>
xchg ax,ax
main:
push rbp
mov rbp,rsp
mov eax,0x0
pop rbp
ret
nop WORD PTR cs:[rax+rax*1+0x0]
typedef float mat4[4][4];
inline void mat4_mul(mat4 dest, mat4 src1, mat4 src2)
{
unsigned int i;
for(i = 0; i < 16; i++)
{
unsigned int row = (int) i / 4, col = i % 4;
dest[row][col] = src1[row][0] * src2[0][col] +
src1[row][1] * src2[1][col] +
defscrollback 5000
altscreen on
autodetach on
caption always " | %-w%{= BW}%40L>%n %t%{-}%+w |%<"
hardstatus alwayslastline
# Turn off that annoying start up message
startup_message off
# Turn the even more annoying whole-screen-flash-on-tab-complete "feature"
vbell off
# Window list at the bottom. hostname, centered tabs and redmarked active windows:
@dendisuhubdy
dendisuhubdy / gpu.sh
Created August 20, 2017 16:28
GPU allocation
# obtaining a screen
pkscreen
# attaching to a screen
pkscreen -r
# ask for a low priority allocation for GPUs
sinter --gres=gpu --qos=low --mem=20000