I screw around with ffmpeg a lot, here are some recipies which I frequently use.
ffmpeg -i <input>.wav -codec:a libmp3lame -b:a 320k output.mp3
ffmpeg -i .wav -codec:a libmp3lame -q:a 0 output.mp3
| ''' | |
| 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: |
| #!/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 |
| <!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"> |
| """ | |
| 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): |
| //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]; | |
| } |