Skip to content

Instantly share code, notes, and snippets.

//
// HudlHlsAvPlayerCache.m
// Hudl
//
// Created by Brian Clymer on 3/6/15.
// Copyright (c) 2015 Agile Sports Technologies, Inc. All rights reserved.
//
#import "HudlHlsAvPlayerCache.h"
@skeeet
skeeet / fish_lazy_commits.sh
Created September 10, 2016 05:27 — forked from orta/fish_lazy_commits.sh
Fish versions of my bash commands from Lazy Automation
# http://artsy.github.io/blog/2016/03/02/Lazily-Automation/
function git_branch_info
git branch ^/dev/null | grep \* | sed 's/* //'
end
function branch
git checkout master;
git pull upstream master;
git checkout -b $argv[1]
@skeeet
skeeet / gist:8cb0e34811229883d58f704640cc2658
Created September 19, 2016 22:01 — forked from boredzo/gist:4604459
Two-color angle gradient in Core Image
kernel vec4 coreImageKernel(__color startColor, __color endColor)
{
vec2 point = destCoord();
float angle = atan(point.y, point.x) + radians(180.0);
//Start from the upper middle, not the left middle
angle += radians(90.0);
angle = mod(angle, radians(360.0));
float fraction = angle / radians(360.0);
@skeeet
skeeet / tmux-cheatsheet.markdown
Created February 27, 2017 11:45 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@skeeet
skeeet / setup.md
Created March 13, 2017 20:22 — forked from fortunto2/setup.md
Setup Amazon AWS EC2 g2.2xlarge instance with OpenCV 3.1, Cuda 7.5, ffmpeg, OpenFace
@skeeet
skeeet / setup.md
Created March 13, 2017 20:22 — forked from fortunto2/setup.md
Setup Amazon AWS EC2 g2.2xlarge instance with OpenCV 3.1, Cuda 7.5, ffmpeg, OpenFace
@skeeet
skeeet / async_worker_pool.py
Created March 15, 2017 10:19 — forked from thehesiod/async_worker_pool.py
Asynchronous Worker Pool
import asyncio
from datetime import datetime, timezone
import os
def utc_now():
# utcnow returns a naive datetime, so we have to set the timezone manually <sigh>
return datetime.utcnow().replace(tzinfo=timezone.utc)
class Terminator:
pass
@skeeet
skeeet / ffmppeg-advanced-playbook-nvenc-and-libav-and-vaapi.md
Created March 24, 2017 11:05 — forked from Brainiarc7/ffmppeg-advanced-playbook-nvenc-and-libav-and-vaapi.md
FFMpeg's playbook: Advanced encoding options with hardware-accelerated acceleration for both NVIDIA NVENC's and Intel's VAAPI-based hardware encoders in both ffmpeg and libav.

FFmpeg and libav's playbook: Advanced encoding options with hardware-based acceleration, NVIDIA's NVENC and Intel's VAAPI-based encoder.

Hello guys,

Continuing from this guide to building ffmpeg and libav with NVENC and VAAPI enabled, this snippet will cover advanced options that you can use with ffmpeg and libav on both NVENC and VAAPI hardware-based encoders.

For ffmpeg:

# Example for my blog post at:
# http://danijar.com/introduction-to-recurrent-networks-in-tensorflow/
import functools
import sets
import tensorflow as tf
def lazy_property(function):
attribute = '_' + function.__name__
@skeeet
skeeet / fail.py
Created April 3, 2017 10:27 — forked from guicho271828/fail.py
minimal failure cases, only on tensorflow backend
from keras.layers import Input, Dense
from keras.models import Model, Sequential
from keras.datasets import mnist
from keras.layers.normalization import BatchNormalization as BN
autoencoder1 = Sequential([
Dense(128, activation='relu',input_shape=(784,)),
BN(),
Dense(784, activation='relu'),
])