Skip to content

Instantly share code, notes, and snippets.

View kashimAstro's full-sized avatar
🔒
busy

Dario Longobardi kashimAstro

🔒
busy
View GitHub Profile
<!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 / 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 / fhogOF.cpp
Created January 25, 2017 11:46
extract fhog with dlib and openframeworks
void drawFHOG(ofPixels store, int x, int y)
{
ofPixels pix;
ofImage debug;
ofPushMatrix();
array2d<matrix<float,31,1> > hog;
array2d<rgb_pixel> img;
toDLib(store,img);//<-- view ofxDLib
@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:
@kashimAstro
kashimAstro / google_image.cpp
Created March 3, 2017 18:26
search image by google for popular trainer dlib
#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <stdio.h>
#include <regex>
#include <fstream>
#include <curl/curl.h>
void write_file(std::string p, std::string d)
@kashimAstro
kashimAstro / tcp.ino
Created March 13, 2017 14:54
TCP server for ESP-07
#include <ESP8266WiFi.h>
const char* ssid = "************";
const char* password = "************";
WiFiServer server(5055);
int pinLeft = 13;
int pinRight = 12;
bool ValLeft = false;
@kashimAstro
kashimAstro / kalman_filter.h
Created March 1, 2016 20:46
kalman filter IMU / MPU6050
//https://en.wikipedia.org/wiki/Kalman_filter#Example_application.2C_technical
class Kalman {
public:
Kalman() {
Q_angle = 0.001;
Q_bias = 0.003;
R_measure = 0.03;
angle = 0;
bias = 0;