Skip to content

Instantly share code, notes, and snippets.

View kashimAstro's full-sized avatar
🔒
busy

Dario Longobardi kashimAstro

🔒
busy
View GitHub Profile
@kashimAstro
kashimAstro / BlenderSTLExport.py
Created September 16, 2016 09:44
Blender export .STL separate mesh fracture
import bpy
import os
path = bpy.path.abspath('/tecnici/dario/teststl/')
if not os.path.exists(path):
os.makedirs(path)
for object in bpy.context.selected_objects:
bpy.ops.object.select_all(action='DESELECT')
object.select = True
@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;
<!DOCTYPE HTML>
<html>
<head>
<style>
body {
margin: 0px;
padding: 0px;
}
</style>
</head>
@kashimAstro
kashimAstro / config.make
Created November 10, 2016 23:05
config.make openframeworks PhysX3.3 NVIDIA
PHYSX = /path/PhysXSDK/
var = -I$(PHYSX)/Include
var += -L$(PHYSX)/Lib/linux64
var += -L$(PHYSX)/Bin/linux64
var += -L$(PHYSX)/Snippets/lib/linux64
var += -DPHYSX_PROFILE_SDK
var += -DRENDER_SNIPPET
var += -DPX_DEBUG
var += -DPX_CHECKED
@kashimAstro
kashimAstro / ofwpaconfig.cpp
Last active November 12, 2016 13:32
configure wpa_supplicant.conf
#include "ofMain.h"
#include "ofAppNoWindow.h"
#define WPA_PATH "/etc/wpa_supplicant/wpa_supplicant.conf"
class ofApp : public ofBaseApp
{
public:
string essid;
string passwd;
#include "ofMain.h"
#include <X11/X.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include "ofxTFTTouch.h"
Display *display;
Window root;
ofxTFTTouch touch;
int w,h;
@kashimAstro
kashimAstro / ofLogAudio.h
Last active January 23, 2018 21:07
simple script audio synth for openframeworks
class ofLogAudio : public ofThread{
public:
bool startSpeak = false;
string msg;
string speak;
void start(string _c="/usr/bin/espeak -v mb-it3")
{
speak = _c;
startThread(true);
@kashimAstro
kashimAstro / main.cpp
Last active February 22, 2019 13:08
Simple Motion blur by (Keijiro Takahashi) rewritten in c++
/*
Rewritten Code by Keijiro Takahashi
source:
https://github.com/keijiro/sketches2016/blob/master/Moblur/Moblur.pde
*/
#include "ofMain.h"
@kashimAstro
kashimAstro / OLEDpi.cpp
Created January 24, 2017 14:30
OLED i2c 128x64 script test
#include <iostream>
#include "ofxGPIO.h"
#define OLED 0x3C
#define WIDTH_OLED 128
#define HEIGHT_OLED 64
int main(int argc, char *argv[])
{
if(argc > 2)
@kashimAstro
kashimAstro / imglab_commandline.cpp
Last active March 2, 2017 16:26
dlib imglab command line, tool for train machine learning with dlib
/*
http://dlib.net/train_object_detector.cpp.html
Usage:
first step create positive train:
./bin/imglab_commandline positive/ "30,20,520,520" "person"
second step create negative train in append positive train previously created: