Make sure ffmpeg is up-to-date:
brew update
brew upgrade ffmpeg
Convert a MOV into frames. Tweak the 2/1
if you want more or fewer frames.
// ==UserScript== | |
// @name Tumblr image size converter | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Force tumblr post photos use high quality | |
// @author Alashov Berkeli | |
// @include https://www.tumblr.com/* | |
// @require https://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js | |
// @grant none | |
// ==/UserScript== |
Make sure ffmpeg is up-to-date:
brew update
brew upgrade ffmpeg
Convert a MOV into frames. Tweak the 2/1
if you want more or fewer frames.
$ uname -r
// Homework 2 | |
// Image Blurring | |
// | |
// In this homework we are blurring an image. To do this, imagine that we have | |
// a square array of weight values. For each pixel in the image, imagine that we | |
// overlay this square array of weights on top of the image such that the center | |
// of the weight array is aligned with the current pixel. To compute a blurred | |
// pixel value, we multiply each pair of numbers that line up. In other words, we | |
// multiply each weight with the pixel underneath it. Finally, we add up all of the | |
// multiplied numbers and assign that value to our output for the current pixel. |
These commands are based on a askubuntu answer http://askubuntu.com/a/581497 | |
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below. | |
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING. | |
ABSOLUTELY NO WARRANTY. | |
If you are still reading let's carry on with the code. | |
sudo apt-get update && \ | |
sudo apt-get install build-essential software-properties-common -y && \ | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \ |
#include <stdio.h> | |
#include <math.h> | |
#include <immintrin.h> | |
#include <vector> | |
#include <type_traits> | |
#ifdef IACA | |
#include <iacaMarks.h> | |
#else |
/** | |
* Convert standard camera intrinsic and extrinsic parameters to a vtkCamera instance for rendering | |
* Assume square pixels and 0 skew (for now). | |
* | |
* focal_len : camera focal length (units pixels) | |
* nx,ny : image dimensions in pixels | |
* principal_pt: camera principal point, | |
* i.e. the intersection of the principal ray with the image plane (units pixels) | |
* camera_rot, camera_trans : rotation, translation matrix mapping world points to camera coordinates | |
* depth_min, depth_max : needed to set the clipping range |
# construct node | |
def opencv_matrix(loader, node): | |
mapping = loader.construct_mapping(node, deep=True) | |
mat = np.array(mapping["data"]) | |
mat.resize(mapping["rows"], mapping["cols"]) | |
return mat | |
yaml.add_constructor(u"tag:yaml.org,2002:opencv-matrix", opencv_matrix) | |
# loading |
A comparison of Theano with other deep learning frameworks, highlighting a series of low-level design choices in no particular order.
Overview
Symbolic: Theano, CGT; Automatic: Torch, MXNet
Symbolic and automatic differentiation are often confused or used interchangeably, although their implementations are significantly different.
Memory Optimization (Christer Ericson, GDC 2003)
http://realtimecollisiondetection.net/pubs/GDC03_Ericson_Memory_Optimization.ppt
Cache coherency primer (Fabian Giesen)
https://fgiesen.wordpress.com/2014/07/07/cache-coherency/
Code Clinic 2015: How to Write Code the Compiler Can Actually Optimize (Mike Acton)
http://gdcvault.com/play/1021866/Code-Clinic-2015-How-to