Skip to content

Instantly share code, notes, and snippets.

@kod3r
kod3r / introrx.md
Created October 9, 2015 02:29 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@kod3r
kod3r / RESPONSE_TIME_READ.py
Last active September 19, 2015 02:27 — forked from jirah/RESPONSE_TIME_READ.py
Print Response Time READ Operations on a VMAX, using Unisphere API.
#!/usr/bin/python
import requests, json, pprint, time, socket
CARBON_SERVER = '0.0.0.0'
CARBON_PORT = 2003
def send_msg(message):
#print 'sending message: %s' % message
sock = socket.socket()
@kod3r
kod3r / tsws
Last active September 7, 2015 04:18 — forked from dfletcher/tsws
Totally simple web server using Bash and netcat (nc)
Moved to a proprer repositoy, TSWS is a real boy now!
https://github.com/dfletcher/tsws
PRs welcomed.
@kod3r
kod3r / The Technical Interview Cheat Sheet.md
Last active August 26, 2015 01:03 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@Smerity
Smerity / uniq_tasks_10k.txt
Created August 7, 2015 02:50
Analysis of duplicated data within bAbi Tasks v1.2
Unique samples in tasks_1-20_v1-2/en-10k/qa10_indefinite-knowledge_{}.txt
Train length: 9989
Test length: 1000
Intersection: 0
Unique samples in tasks_1-20_v1-2/en-10k/qa11_basic-coreference_{}.txt
Train length: 9827
Test length: 997
Intersection: 25
Unique samples in tasks_1-20_v1-2/en-10k/qa12_conjunction_{}.txt
Train length: 9991
/*
* OGL_OCV_common.cpp
* Common interop between OpenCV and OpenGL
*
* Created by Roy Shilkrot on 2/16/2015
* Copyright 2015 Roy Shilkrot. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
@whistler
whistler / import.sh
Created March 16, 2015 17:31
Copy files to another repository while saving git history
# copied from http://gbayer.com/development/moving-files-from-one-git-repository-to-another-preserving-history/
git clone <git repository A url> # clone source repository
cd <git repository A directory>
git remote rm origin # to make sure it doesn't affect the original repository
git filter-branch --subdirectory-filter <directory 1> -- --all # remove all files other than the ones needed
mkdir <directory 1> # move them into another directory where they will be stored in the destination repository (if needed)
mv * <directory 1>
git add .
git commit
@richardkundl
richardkundl / shuffle.cs
Created August 20, 2014 18:27
Fisher-Yates algorithm shuffle an array with O(n) time complexity
/// <summary>
/// Fisher-Yates algorithm with O(n) time complexity
/// </summary>
/// <param name="array">array to be shuffled</param>
/// <returns>shuffled array</returns>
public static int[] FisherYates(int[] array)
{
Random r = new Random();
for (int i = array.Length - 1; i > 0; i--)
{
@Zer0t3ch
Zer0t3ch / voronoi-generator.js
Last active August 2, 2017 20:48
Point/Line Manager for my Voronoi diagram generator
/**=- VERSION 1.2 -=**/
var canvas, c;
var dots = [ ];
var lines = [ ];
var count = 0;
var m = {
mousePos : function(canvas, evt) {
var rect = canvas.getBoundingClientRect();
import cv2
import numpy as np
class BagOfFeatures:
"""This is a class of Bag-of-Features by K-means for OpenCV"""
codebookSize=0
classifier=None
def __init__(self, codebookSize):
self.codebookSize=codebookSize
self.classifier=cv2.KNearest()