Skip to content

Instantly share code, notes, and snippets.

@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."
@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'
@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
@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;
@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
@dlublin
dlublin / ffmpeg-hap-readme.md
Created April 18, 2017 13:40
Encoding to Hap from the command line using FFmpeg

Encoding to Hap from the command line using FFmpeg

For users who prefer working with a command line or need to access advanced encoding settings for Hap the popular FFmpeg library can be used to work with Hap movies.

  1. If this is your first time using FFmpeg you may need to install it on your system, or compile it from source. In either case be sure that Snappy is enabled as part of the binary. If you already have FFmpeg on your system with Snappy enabled, you can skip this step.

    You can check that your version of FFmpeg can encode Hap using

    ffmpeg -encoders | grep hap
    
@baymaxium
baymaxium / content.md
Created October 18, 2017 09:13
如何用深度学习训练一个像你一样会聊天的机器人?

原文:CSDN大数据

↑ 点击上方蓝字关注我们,和小伙伴一起聊技术!

聊天机器人到底是什么呢?说白了,就是计算机程序通过听觉或文本方法进行对话。当今最流行的四个对话机器人是:苹果的Siri、微软Cortana、谷歌助理、亚马逊的Alexa。他们能够帮你查比分、打电话,当然,偶尔他们也会出错。

本文主要会详细介绍聊天机器人在文本方面的运作,我们将看到如何使用深度学习模型训练聊天机器人用我们所希望的方式在社交媒体上进行对话。

@kylemcdonald
kylemcdonald / CameraSphere.cpp
Created October 30, 2017 07:22
Unwarp an equirectangular projection into a perspective projection using openFrameworks.
#include "ofMain.h"
class ofApp : public ofBaseApp {
public:
ofImage img;
ofEasyCam cam;
ofSpherePrimitive sphere;
float zoom = 0.5;
float xoff = 0;
float yoff = 0;
@mfandl
mfandl / file.cc
Created February 9, 2018 20:59
openFrameworks + ofxVideoRecorder setup to record video with h264
/**
* openFrameworks + ofxVideoRecorder setup to record video with h264
* You will need ffmpeg and libx264 in your system. On mac, you can use homebrew.
* reason for yuv420p:
* 'QuickTime only supports YUV planar color space with 4:2:0 chroma subsampling (use -vf format=yuv420p or -pix_fmt yuv420p) for H.264 video.'
* as mentioned here: https://trac.ffmpeg.org/wiki/Encode/H.264
*/
recorder.setVideoCodec("libx264");
string fileName = ofToDataPath("v" + ofGetTimestampString() + ".mp4");
@shiyuugohirao
shiyuugohirao / ofBase64.h
Last active April 13, 2019 04:31
openFrameworks + simple Base64 encoder
//
// ofBase64.h
//
// Created by shugohirao on 2018/05/09.
//
#pragma once
#include "Poco/Base64Encoder.h"
namespace ofBase64 {