Example of flocking
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "FilteringScheme.h" | |
KalmanFilter::KalmanFilter() {} | |
KalmanFilter::KalmanFilter(float _q, float _r, float _p, float _intial_value) { | |
q = _q; | |
r = _r; | |
p = _p; | |
intial_value = _intial_value; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Flocking | |
* by Daniel Shiffman. | |
* | |
* An implementation of Craig Reynold's Boids program to simulate | |
* the flocking behavior of birds. Each boid steers itself based on | |
* rules of avoidance, alignment, and coherence. | |
* | |
* Click the mouse to add a new boid. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function SaveGmailReceiptsToDriveAndForwardToXero(){ | |
var label = GmailApp.getUserLabelByName("Receipts"); | |
if(label == null){ | |
GmailApp.createLabel('Receipts'); | |
} | |
var savedLabel = GmailApp.getUserLabelByName("_savedAsPDF"); | |
if(savedLabel == null){ | |
GmailApp.createLabel("_savedAsPDF"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Date; | |
String server = "http://medtek.ruc.dk/2/fql.php?s=m&q="; | |
//String query = "SELECT author_uid,message,target_id,timestamp,coords FROM checkin WHERE author_uid IN (SELECT uid2 FROM friend WHERE uid1 = me() LIMIT 0, 10)"; | |
String query = "SELECT timestamp,author_uid,message,target_id,coords FROM checkin WHERE author_uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) ORDER BY timestamp DESC LIMIT 0, 10"; | |
String access = "INSERT ACCESS TOKEN"; | |
String[] result = loadStrings(server+query.replace(' ', '+')+access); | |
int maks=min(10000, result.length); | |
PImage mapImage; | |
//String kortURL="http://maps.googleapis.com/maps/api/staticmap?size=800x900"; | |
String kortURL="http://maps.googleapis.com/maps/api/staticmap?size=800x900&maptype=roadmap"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var five = require("johnny-five") | |
// or "./lib/johnny-five" when running from the source | |
var express = require('express'); | |
var app = express(); | |
var value = 0; | |
// Add headers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version 120 | |
uniform sampler2DRect tex0; | |
uniform sampler2DRect tex1; | |
uniform vec2 aTexSize; | |
uniform vec2 bTexSize; | |
uniform float fadeToB; | |
varying vec2 texCoordVarying; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local position = vector.new(gps.locate(5)) | |
cost_only = false | |
blocks = 0 | |
fuel = 0 | |
function up(b) | |
b = b or 1 | |
for i = 1, b do | |
turtle.up() |
I hereby claim:
- I am mrbichel on github.
- I am yo (https://keybase.io/yo) on keybase.
- I have a public key whose fingerprint is CC6E 8DDD C259 0C21 0DF7 2E29 B4BC 33A9 4A12 DFCC
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Cocoa/Cocoa.h> | |
#include <AppKit/NSOpenGL.h> | |
#include "macGlutfix.h" | |
// The standard ScreenSaverView class actually sets the window | |
// level to 2002, not the 1000 defined by NSScreenSaverWindowLevel | |
// and kCGScreenSaverWindowLevel | |
#define RealSaverLevel 1 | |
// Glut sets the window level to 100 when it sets full screen mode |