Skip to content

Instantly share code, notes, and snippets.

@pckujawa
pckujawa / keybase.md
Created October 31, 2017 01:35
Keybase verification

Keybase proof

I hereby claim:

  • I am pckujawa on github.
  • I am patku (https://keybase.io/patku) on keybase.
  • I have a public key ASBLpvh1xYD2nZ3Ms-sMWzto6nX0vkTYllYMPM23Efq7kwo

To claim this, I am signing this object:

@pckujawa
pckujawa / tweet.js
Created June 28, 2014 20:07
Twitter bookmarklet that actually works
//javascript:
(function() {
window.twttr = window.twttr || {};
var D = 550,
A = 450,
C = screen.height,
B = screen.width,
H = Math.round((B / 2) - (D / 2)),
G = 0,
F = document,
@pckujawa
pckujawa / code.js
Last active August 29, 2015 13:56
MapReduce, would love a second opinion / another pair of eyes (SO question)
function getUnique() {
var u = {}, a = [];
for (var i = 0, l = this.length; i < l; ++i) {
if (u.hasOwnProperty(this[i])) {
continue;
}
a.push(this[i]);
u[this[i]] = 1;
}
return a;
@pckujawa
pckujawa / a4.py
Created December 15, 2013 20:17
Simple audio classifier (speech vs music) using scikit-learn (Naive Bayes classifier). Made for Multimedia Processing course.
""" usage:
a4.py train TRAIN_FEATURE_FILE [--new] [--validate]
a4.py classify MUSIC_FEATURE_FILE
The files should be CSV with 6 columns, the last of which is the target/label/class (or empty, if classifying), and the first of which is ignored.
"""
#-------------------------------------------------------------------------------
# Name: Pat Kujawa
# Purpose: MM audio classification asn 4
#-------------------------------------------------------------------------------
@pckujawa
pckujawa / hw4-using-module.ipynb
Last active December 31, 2015 04:28
It works! Hw4 big data with calibration. Put in same folder so the notebook can use the module.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pckujawa
pckujawa / hw4-new-calibration (1).ipynb
Last active December 31, 2015 02:19
hw4 big data, calibration still not working but "known A" seems to be
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pckujawa
pckujawa / hw4-tuesday-afternoon.ipynb
Created December 11, 2013 01:47
hw4 big data - "known A" code seems to be working
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pckujawa
pckujawa / hw4-monday.ipynb
Created December 10, 2013 02:21
big data hw4 calibration measurements
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pckujawa
pckujawa / hw5.ipynb
Last active December 30, 2015 04:49
math 491 big data
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.