Skip to content

Instantly share code, notes, and snippets.

View dattasaurabh82's full-sized avatar

Saurabh Datta dattasaurabh82

View GitHub Profile
@dattasaurabh82
dattasaurabh82 / Camera mount control
Created January 27, 2015 11:24
Simple code (untested ver) for the camera mount control
/*
This code will enable auto claibration of light sensors.
After uploading the code when you switch on the Arduino, within 10 seconds:
For the base senosr:
Bgring the sensor to a hole , so that it can see the light followed by covering it so that it can see dark. Do it couple of times with in 10 secs
so that the microcontroller knows and what is the value to reffer to when it sees light and adrk again .
ArrayList<Pathfinder> pathsLeft = new ArrayList<Pathfinder>();
ArrayList<Pathfinder> pathsRight = new ArrayList<Pathfinder>();
PVector center;
PGraphics canvas;
void setup() {
size(displayWidth, displayHeight);
canvas = createGraphics(displayWidth * 2, displayHeight * 2);
canvas.beginDraw();
#--------------------- network File-------------------------
# vi /etc/config/network
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fd82:9ec9:5222::/48'
@dattasaurabh82
dattasaurabh82 / split-transients.py
Created February 3, 2016 07:58 — forked from kylemcdonald/split-transients.py
Split an audio file into multiple files based on detected onsets from librosa.
#!/usr/bin/env python
import argparse
import matplotlib.pyplot as plt
import librosa
import numpy as np
import os
from progressbar import ProgressBar
parser = argparse.ArgumentParser(
float t;
float size = 40; //50
boolean makeGIF = true;
void setup(){
//size(540, 540);
size(270,270);
}
void draw(){
import android.os.Environment;
PImage img;
PImage imgTwo;
String directory = "";
String filename = "beloved.jpg";
void setup() {
size(displayWidth, displayHeight);
@dattasaurabh82
dattasaurabh82 / frameOptions.pde
Created September 16, 2016 17:13 — forked from mariuswatz/frameOptions.pde
Set display options for Processing window: Disable frame borders, set always-on-top and position on screen.
// Marius Watz - http://workshop.evolutionzone.com
//
// Window frame control: Disable frame decoration (see
// init() function), manipulate frame position (see
// keyPressed(), draw() )
int framePosX=0;
int framePosY=0;
@dattasaurabh82
dattasaurabh82 / browserMechSim.py
Last active November 1, 2016 03:17
Browser mechanization with python and terminal calls to applescript
import subprocess
import time
tabs = 0
#----------------- open a new tab
def open_new_tab(serach_website):
new_tab_cmd = "osascript -e 'tell application \"Google Chrome\" to open location \"https://" + serach_website + "\" & activate'"
# this will be executed from a shell moment and will open 3 tabs
new_tab_code = subprocess.call(new_tab_cmd, shell=True)
@dattasaurabh82
dattasaurabh82 / stuff_related_to_hearing.txt
Created November 6, 2016 09:27
A call to poets and essay writers to construct words with a given list of words