Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@ttezel
ttezel / ECE 406 Algorithms notes.md
Last active December 10, 2015 21:39
ECE 406 Algorithms notes

#Class #2 Wed. Jan 9, 2013

End of last class

f = O(g) if there exist constants c and N s.t.

(notation: ∀ === for all)

f(n) ≤ g(n) ∀ n ≥ N

@ttezel
ttezel / max_subarray
Created December 7, 2012 21:44
Max Subarray
/**
* Given an array of real numbers,
* returns the max contiguous subsequence for which
* the sum of the elements is maximized
*
* @param {Array} arr input array
* @return {Array} slice with maximum sum
*/
function maxSubarray (arr) {
//start & end indices for our max slice
@ttezel
ttezel / gist:4142172
Last active July 31, 2016 08:53
quickly add jquery to a page
var script = document.createElement('script');
script.src = 'https://code.jquery.com/jquery.min.js';
script.type = 'text/javascript';
document.getElementsByTagName('head')[0].appendChild(script);
@ttezel
ttezel / gist:4138642
Last active March 24, 2024 03:24
Natural Language Processing Notes

#A Collection of NLP notes

##N-grams

###Calculating unigram probabilities:

P( wi ) = count ( wi ) ) / count ( total number of words )

In english..

@ttezel
ttezel / gist:3160712
Created July 22, 2012 19:00
Some things I think will happen by 2020

#Some things I think will happen by 2020:

  1. The Voice interface will be mastered. We will be talking to computers and they will understand the meaning/context of our words, and help us live our lives. Siri is where it starts.

  2. Fully articulable, brain-controlled artificial limbs will be in existence. Amputees will have limbs replaced with an artificial limb, and continue to live fully enabled. Price would still be high at this time. There is already great progress in this area.

  3. Driverless cars will start to gain popularity. People who purchase an autonomous vehicle (e.g. Google's driverless car) will be sitting in their cars, working/entertaining themselves with mobile devices while they are driven around. Google is close to launching their autonomous car for sale. They are way ahead of the competition. Google will be heavy in the automotive game. They are lobbying to legalize Autonomous Vehicles in the US.

  4. We will have devices with morphable, touchable interface

@ttezel
ttezel / quickSort.js
Created July 16, 2012 19:10
Simple QuickSort in JS
function quickSort (arr) {
if (!arr.length)
return arr
var pivot = arr.splice(0, 1)
var less = []
var greater = []
arr.forEach(function (el) {
if (el <= pivot)