Skip to content

Instantly share code, notes, and snippets.

@kashimAstro
kashimAstro / README.md
Last active March 28, 2026 14:30
H3 / Mali GPU driver and openframeworks armv7 ES / ES2

#A small guide to compile openFrameworks armv7 with driver OpenGL ES / ES2 sunxi for H3 / Mali GPU on ARMBIAN OS, compatible with orangepi and bananapi.

tested on: orangepi one banana pi M2

dependencies:

apt-get install libx11-dev libxext-dev xutils-dev libdrm-dev \ 
           x11proto-xf86dri-dev libxfixes-dev x11proto-dri2-dev xserver-xorg-dev \
 build-essential automake pkg-config libtool ca-certificates git cmake subversion
@kashimAstro
kashimAstro / CVShape.h
Last active October 21, 2016 06:41
Class Opencv shape detection for openframeworks
#include "ofMain.h"
#include "ofxCv.h"
using namespace ofxCv;
using namespace cv;
class CVShape{
public:
Mat gray;
Mat bw;
@philcn
philcn / C4DObjects.py
Created September 6, 2016 17:18
Cinema 4D gltf exporter
import Base
reload( Base )
from Base import BaseMaterial
from Base import BaseMesh
from Base import BaseLight
from Base import BaseCamera
from Base import BaseNode
from Base import BaseTransformAnimation
from Base import BaseVectorAnimation
@littlecodersh
littlecodersh / main.py
Last active April 28, 2025 05:39
Main script behind itchat robot
#coding=utf8
import itchat
# tuling plugin can be get here:
# https://github.com/littlecodersh/EasierLife/tree/master/Plugins/Tuling
from tuling import get_response
@itchat.msg_register('Text')
def text_reply(msg):
if u'作者' in msg['Text'] or u'主人' in msg['Text']:
return u'你可以在这里了解他:https://github.com/littlecodersh'
@shawnlau
shawnlau / gist:f465a6c17f5fa3fb3fa2
Last active April 15, 2017 09:37
Latest incarnation of a processing program that allows real time screen filtering
/////////////////////////////////////////////
//Update 10 -05-15
// Up and down arrows control the flow rate of the brush for the tool you are using. (new) Now each tool has its own flow rate
// (new)The strength off the tool in current use displays in the title bar. 1 is the strongest, 500 the lightest
// Hold shift and drag the mouse to change brush size, or use the "[" and "]" keys.
// press Control while in paint mode to pick up a paint color. Press control while in clone mode to
// to set clone position. Keypad "+" zooms up. Keypad "-" zooms down. Keys "z" and "x" control the mouse easing.
// The onColor mode allows you to just draw on the color of the image. The "add Frequencies" menu item becomes enable
// only when frequencies have been separated. To separate frequencies, go to settings screen and choose a separation method.
// Blur, SNN, median etc. Set the radius. Then you must click the menu item "Separate frequencies."
@genekogan
genekogan / _Instructions.md
Last active September 21, 2024 10:33
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

@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active July 16, 2026 07:28
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);
@darrenmothersele
darrenmothersele / gist:7597016
Created November 22, 2013 09:06
Sending base64 encoded data via HTTP in C++ using openFrameworks and Poco Net Libraries
// The main openFrameworks include
#include "ofMain.h"
// Poco is included in openFrameworks 0.8.0
#include "Poco/Net/HTTPClientSession.h"
#include "Poco/Net/HTTPRequest.h"
#include "Poco/Net/HTTPResponse.h"
#include "Poco/Base64Encoder.h"
#include "Poco/Net/HTMLForm.h"
#include "Poco/Net/StringPartSource.h"
#include "Poco/StreamCopier.h"
@madc
madc / testApp.cpp
Last active May 4, 2019 14:53
Find cam by device name instead of id. (openFrameworks)
string deviceName = "Logitech Camera";
vector<ofVideoDevice> devices = vidGrabber.listDevices();
for(vector<ofVideoDevice>::iterator it = devices.begin(); it != devices.end(); ++it) {
if(it->deviceName == deviceName) {
vidGrabber.setDeviceID(it->id);
break;
}
}