Skip to content

Instantly share code, notes, and snippets.

@genekogan
genekogan / _Instructions.md
Last active March 5, 2021 13:10
instructions for generating a style transfer animation from a video

Instructions for making a Neural-Style movie

The following instructions are for creating your own animations using the style transfer technique described by Gatys, Ecker, and Bethge, and implemented by Justin Johnson. To see an example of such an animation, see this video of Alice in Wonderland re-styled by 17 paintings.

Setting up the environment

The easiest way to set up the environment is to simply load Samim's a pre-built Terminal.com snap or use another cloud service like Amazon EC2. Unfortunately the g2.2xlarge GPU instances cost $0.99 per hour, and depending on parameters selected, it may take 10-15 minutes to produce a 512px-wide image, so it can cost $2-3 to generate 1 sec of video at 12fps.

If you do load the

@KdotJPG
KdotJPG / OpenSimplex2S.java
Last active April 29, 2024 17:30
Visually isotropic coherent noise algorithm based on alternate constructions of the A* lattice.
/**
* K.jpg's OpenSimplex 2, smooth variant ("SuperSimplex")
*
* More language ports, as well as legacy 2014 OpenSimplex, can be found here:
* https://github.com/KdotJPG/OpenSimplex2
*/
public class OpenSimplex2S {
private static final long PRIME_X = 0x5205402B9270C86FL;
@bakercp
bakercp / Install
Created July 21, 2014 20:25
openFrameworks on the UDOO Udoobuntu 1.0
To Install:
- Download 0.8.3 or use the 0.8.3 tag on master.
- Install dependencies.
- Copy config.linuxarmv7l.udoo.mk into $OF_ROOT/libs/openFrameworksCompiled/project/linuxarmv7l
- Go to example project.
To Prep:
$ export MAKEFLAGS="-j4 -s PLATFORM_VARIANT=udoo"
@jvcleave
jvcleave / VideoSource.h
Created July 7, 2014 18:27
VideoSource
#pragma once
#include "ofMain.h"
class VideoSource
{
public:
ofVideoGrabber camera;
ofVideoPlayer videoPlayer;
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active May 8, 2024 18:44
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
#include <signal.h>
#include <stdio.h>
#include <string.h>
#include <pthread.h>
#include <sys/time.h>
#include <interface/mmal/mmal.h>
#include <interface/mmal/util/mmal_util.h>
@jasny
jasny / bootstrap-em.less
Last active January 5, 2020 15:36
Use em or rem font-size in Bootstrap 3
/**
* Use em or rem font-size in Bootstrap 3
*/
@font-size-root: 14px;
@font-unit: 0rem; // Pick em or rem here
// Convert all variables to em
@jvcleave
jvcleave / eglinfo
Last active December 7, 2023 15:16
Raspberry Pi GL extensions
source
http://pastebin.com/raw.php?i=Vnje5sEe
gcc -o eglinfo eglinfo.c -lEGL -lGLESv2 -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -L/opt/vc/lib
EGL
Vendor: Broadcom
Version: 1.4
Client APIs: OpenGL_ES OpenVG
@jvcleave
jvcleave / distccd-rpi.plist
Last active April 30, 2024 06:27
mac distcc install instructions
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>distccd-rpi</string>
<key>Program</key>
<string>/Users/YOUR_USER_NAME/Scripts/launchd-distccd.sh</string>
<key>RunAtLoad</key>
<true/>
function themename_menu_link(&$variables) {
$element = $variables['element'];
$sub_menu = '';
$element['#attributes']['data-menu-parent'] = $element['#original_link']['menu_name'] . '-' . $element['#original_link']['depth'];
if ($element['#below']) {
$sub_menu = drupal_render($element['#below']);
}