Skip to content

Instantly share code, notes, and snippets.

View dpnishant's full-sized avatar
🎯
Focusing

Nishant Das Patnaik dpnishant

🎯
Focusing
View GitHub Profile
@dpnishant
dpnishant / canvasrecord.js
Created November 6, 2016 19:03 — forked from PaulKinlan/canvasrecord.js
Screen recorder in JS
let canvas = document.querySelector('canvas');
// Optional frames per second argument.
let stream = canvas.captureStream(25);
let recorder = new MediaRecorder(stream, options);
let blobs = [];
function download(blob) {
var url = window.URL.createObjectURL(blob);
var a = document.createElement('a');
a.style.display = 'none';
@dpnishant
dpnishant / README.md
Created October 20, 2016 19:39 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@dpnishant
dpnishant / postMessage_security.md
Last active February 2, 2016 11:16 — forked from jedp/gist:3005816
postMessage() security review checklist

Security-Reviewing Uses of postMessage()

The postMessage() API is an HTML5 extension that permits string message-passing between frames that don't share the same origin. It is available in all modern browsers. It is not supported in IE6 and IE7.

postMessage is generally considered very secure as long as the programmer is careful to check the origin and source of an arriving

@dpnishant
dpnishant / classifier.py
Last active December 14, 2015 11:31 — forked from zacstewart/classifier.py
Document Classification with scikit-learn
import os
import numpy
from pandas import DataFrame
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.naive_bayes import MultinomialNB
from sklearn.pipeline import Pipeline
from sklearn.cross_validation import KFold
from sklearn.metrics import confusion_matrix, f1_score
NEWLINE = '\n'