Skip to content

Instantly share code, notes, and snippets.

@Asymptote
Asymptote / Python 3.4+ with OpenCV 3.1.0 Binding on Ubuntu 14.04
Created May 29, 2016 11:27
Python 3.4+ with OpenCV 3.1.0 Binding on Ubuntu 14.04
# I have followed PyImageSearch tutorial http://www.pyimagesearch.com/2015/07/20/install-opencv-3-0-and-python-3-4-on-ubuntu/
# Ubuntu upgrade & update current libraries
sudo apt-get update
sudo apt-get upgrade
# Install dependancies
sudo apt-get install build-essential cmake git pkg-config
sudo apt-get install libjpeg8-dev libtiff4-dev libjasper-dev libpng12-dev
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
@Asymptote
Asymptote / ffmpeg Installation on Ubuntu 14.04 with source code
Created May 29, 2016 11:26
ffmpeg Installation on Ubuntu 14.04 with source code
# For this scripts I have followed offical link https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu#ffmpeg
# Get the Dependencies
sudo apt-get update
sudo apt-get -y install autoconf automake build-essential libass-dev libfreetype6-dev \
libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev \
libxcb-xfixes0-dev pkg-config texinfo zlib1g-dev
# Making sure for installing pre-required dependancies
sudo apt-get git
@Asymptote
Asymptote / Vagrantfile
Created May 29, 2016 11:24
Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@Asymptote
Asymptote / stream.py
Created May 5, 2016 07:56 — forked from my8bit/stream.py
How to save youtube live stream. Python script which allows to save video by sequences
#!/usr/bin/python
# # # # # # # # # # # # # # # # # # # #
# #
# Script was made by Dennis #
# http://stefansundin.com/blog/452 #
# http://pastebin.com/8cw9LHFg #
# #
# # # # # # # # # # # # # # # # # # # #
@Asymptote
Asymptote / ae_toy_example.py
Created May 3, 2016 13:56 — forked from hussius/ae_toy_example.py
Toy example of single-layer autoencoder in TensorFlow
import tensorflow as tf
import numpy as np
import math
#import pandas as pd
#import sys
input = np.array([[2.0, 1.0, 1.0, 2.0],
[-2.0, 1.0, -1.0, 2.0],
[0.0, 1.0, 0.0, 2.0],
[0.0, -1.0, 0.0, -2.0],
@Asymptote
Asymptote / threevideodemo.js
Created April 13, 2016 10:09 — forked from ErikPeterson/threevideodemo.js
THREEJS Video Texture Demo
//Set up scene, camera, and renderer
var scene = new THREE.Scene;
var camera = new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 1, 10000 );
var renderer = new THREE.CanvasRenderer();
renderer.setClearColor( 0xf0f0f0 );
renderer.setSize( window.innerWidth, window.innerHeight );
document.body.appendChild( renderer.domElement );
var video = document.createElement('video');
@Asymptote
Asymptote / gist:14414d4f7fc23dca3154e9c96e6ccf53
Created April 1, 2016 10:57 — forked from ricbra/gist:39ad51dbaa2be90e56fd
Install OpenCV on Ubuntu Trusty Vagrant box
sudo apt-add-repository ppa:jon-severinsson/ffmpeg
sudo apt-get update
sudo apt-get upgrade -y
version="$(wget -q -O - http://sourceforge.net/projects/opencvlibrary/files/opencv-unix | egrep -m1 -o '\"[0-9](\.[0-9]+)+' | cut -c2-)"
echo "Installing OpenCV" $version
mkdir OpenCV
cd OpenCV
echo "Removing any pre-installed ffmpeg and x264"
sudo apt-get -qq remove ffmpeg x264 libx264-dev
echo "Installing Dependenices"
@Asymptote
Asymptote / simple_mjpeg_streamer_http_server
Created March 29, 2016 13:19 — forked from n3wtron/simple_mjpeg_streamer_http_server
Simple Python Motion Jpeg (mjpeg server) from webcam. Using: OpenCV,BaseHTTPServer
#!/usr/bin/python
'''
Author: Igor Maculan - n3wtron@gmail.com
A Simple mjpg stream http server
License: GPL v3
'''
import cv2
import Image
from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer
import StringIO