Skip to content

Instantly share code, notes, and snippets.

View ksindi's full-sized avatar
🚀
Shipping

Kamil Sindi ksindi

🚀
Shipping
View GitHub Profile
@ksindi
ksindi / tmux.md
Created March 29, 2017 15:43 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

import random
import pandas
from sklearn.cross_validation import train_test_split
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import accuracy_score
from sklearn.preprocessing import LabelEncoder
from sklearn.utils import check_array
import tensorflow as tf
from tensorflow.contrib import layers
@ksindi
ksindi / Faster save-load for word2vec
Created February 5, 2017 18:09 — forked from moustaki/Faster save-load for word2vec
Faster save-load for word2vec
import dbm, os
import cPickle as pickle
from gensim.models import Word2Vec
import numpy as np
def save_model(model, directory):
model.init_sims() # making sure syn0norm is initialised
if not os.path.exists(directory):
os.makedirs(directory)
# Saving indexes as DBM'ed dictionary
@ksindi
ksindi / strip_output.py
Created December 19, 2016 20:45
Strip jupyter notebook output
#!/usr/bin/env python
def strip_output(nb):
for cell in nb.cells:
if hasattr(cell, "outputs"):
cell.outputs = []
if hasattr(cell, "prompt_number"):
del cell["prompt_number"]
@ksindi
ksindi / readme.md
Created December 9, 2016 12:54 — 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

@ksindi
ksindi / readme.md
Created December 9, 2016 12:53 — forked from baraldilorenzo/readme.md
Deep Scene

A Deep Siamese Network for Scene Detection

This is a model from the paper:

A Deep Siamese Network for Scene Detection in Broadcast Videos
Lorenzo Baraldi, Costantino Grana, Rita Cucchiara
Proceedings of the 23rd ACM International Conference on Multimedia, 2015

Please cite the paper if you use the models.

@ksindi
ksindi / .gitignore
Created December 4, 2016 00:48 — forked from zed/.gitignore
Build 1d array of unknown size in Cython
/build/
*.so
*.cpp
/cachegrind.out.profilestats
/profilestats.prof
/build1darray.s
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os.path
import re
import sys
import tarfile
import numpy as np
# Working example for my blog post at:
# https://danijar.github.io/structuring-your-tensorflow-models
import functools
import tensorflow as tf
import sets
def lazy_property(function):
attribute = '_' + function.__name__
import pandas as pd
from io import StringIO
datastring = StringIO("""\
ticker avg_spread max_spread timestamp
a 0.22 1.84 2016-06-03 03:00:00
aa 0.01 0.10 2016-06-03 02:00:00
aaap 2.07 2.17 2016-06-03 01:00:00
aal 0.15 0.5 2016-06-03 04:00:00
""")