Skip to content

Instantly share code, notes, and snippets.

View DustinAlandzes's full-sized avatar

Dustin Alandzes DustinAlandzes

View GitHub Profile
@DustinAlandzes
DustinAlandzes / webcam-cv2.py
Created February 21, 2017 03:19 — forked from tedmiston/webcam-cv2.py
Display the webcam in Python using OpenCV (cv2)
'''
Simply display the contents of the webcam with optional mirroring using OpenCV
via the new Pythonic cv2 interface. Press <esc> to quit.
'''
import cv2
def show_webcam(mirror=False):
cam = cv2.VideoCapture(0)
while True:
@DustinAlandzes
DustinAlandzes / FFMPEG_Notes.md
Created August 7, 2017 20:33 — forked from pjobson/FFMPEG_Notes.md
FFMPEG Notes

Some Recipies for ffmpeg Usage

I screw around with ffmpeg a lot, here are some recipies which I frequently use.

AUDIO

... to MP3

ffmpeg -i <input>.wav -codec:a libmp3lame -b:a 320k output.mp3

ffmpeg -i .wav -codec:a libmp3lame -q:a 0 output.mp3

#!/usr/bin/env python
# This script generates high volume of 802.11 Probe Requests frames.
# Each frame have uniq random source MAC.
# It use Scapy http://www.secdev.org/projects/scapy/ for frames crafting.
# You need injection supported device.
import logging
logging.getLogger("scapy.runtime").setLevel(logging.ERROR) # Disable IPv6 warnings
@DustinAlandzes
DustinAlandzes / index.html
Created August 18, 2017 08:20 — forked from anonymous/index.html
start of vanguard layout clone // source https://jsbin.com/tezigitava
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
<style id="jsbin-css">
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
"""
This is a batched LSTM forward and backward pass
"""
import numpy as np
import code
class LSTM:
@staticmethod
def init(input_size, hidden_size, fancy_forget_bias_init = 3):
@DustinAlandzes
DustinAlandzes / ANOVA.ipynb
Created September 23, 2017 20:15 — forked from tlinnet/ANOVA.ipynb
ANOVA in python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
//single file version of https://github.com/kchapelier/wavefunctioncollapse
function randomIndice (array, r) {
var sum = 0,
i,
x;
for (i = 0; i < array.length; i++) {
sum += array[i];
}