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
MAIN="Main1" | |
all: | |
javac -cp ../ -d ../classes $(MAIN).java | |
go: | |
java -cp ../classes $(MAIN) | |
clean: | |
find . -name '../classes/$(MAIN).class' -exec rm -f {} \; |
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
QUESTIONS = q1 q2 | |
COMMAND=all | |
.PHONY: questions $(QUESTIONS) go clean first | |
questions: $(QUESTIONS) | |
$(QUESTIONS): | |
$(MAKE) -C $@ $(COMMAND) $(VARS) | |
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 WiiMote | |
import objc | |
from threading import Thread | |
from threading import Event | |
from time import sleep | |
class Main(Thread): | |
discovery = objc.ivar('discovery') | |
remote = objc.ivar('wii') | |
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 time | |
class Timing(object): | |
def __init__(self): | |
self.timings = {} | |
self.col = self.__collector() | |
self.col.next() #coroutine syntax | |
def __collector(self): | |
while True: |
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
__kernel void part2(__global float4* pos, | |
__global float4* color, | |
__global float4* vel, | |
__global float4* pos_gen, | |
__global float4* vel_gen, | |
float dt) | |
{ | |
//get our index in the array | |
unsigned int i = get_global_id(0); | |
//copy position and velocity for this iteration to a local variable |
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
from OpenGL import GLX | |
def clinit(self): | |
plats = cl.get_platforms() | |
ctx_props = cl.context_properties | |
props = [(ctx_props.PLATFORM, plats[0]), | |
(ctx_props.GL_CONTEXT_KHR, platform.GetCurrentContext())] | |
import sys |
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 "highgui.h" | |
# include "cv.h" | |
# include <stdio.h> | |
# include <vector> | |
# include <string> | |
///blah | |
using namespace cv; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
<title>Testing Pie Chart</title> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.1.3"></script> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.geom.js?2.1.3"></script> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js?2.1.3"></script> | |
<style type="text/css"> |
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
<!-- Annotated javascript available at http://enja.org/code/tuts/d3/bar --> | |
<!-- Code walkthrough screencast available at --> | |
<html> | |
<head> | |
<title>Enjalot's Bar</title> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.1.3"></script> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.geom.js?2.1.3"></script> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js?2.1.3"></script> | |
<style type="text/css"> | |
.bar rect |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
<title>Testing Pie Chart</title> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.1.3"></script> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.geom.js?2.1.3"></script> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js?2.1.3"></script> | |
<style type="text/css"> |
OlderNewer