Skip to content

Instantly share code, notes, and snippets.

View xraymemory's full-sized avatar
💽

M E A xraymemory

💽
View GitHub Profile
@xraymemory
xraymemory / gist:2727748
Created May 18, 2012 21:39
Strange timing bug
import hypermedia.video.*;
import java.awt.Rectangle;
int MAXFACES = 500;
int DX, DY, DW, DH;
int TX, TY, TW, TH;
int numberOfFacesCaptured = 0;
int faceLengthFlag = 0;
int cueFlag = 0;
int sleepCount = 5000;
# /etc/apache2/sites-available/default
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName default
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
@xraymemory
xraymemory / switches.c
Created September 14, 2012 18:34
Program to read in primes from a text file and perform the "switch flipping" problem
#include <stdio.h>
#include <stdlib.h>
#define N 10
int switches[N];
void flipSwitches(int p) {
int j;
int flipped = 0;
for (j = 1; j <= N; j++) {
@xraymemory
xraymemory / user_db.py
Created September 17, 2012 19:46
User row
class User(db.Model):
__tablename__ = 'user'
id = db.Column(db.Integer, primary_key=True)
username = db.Column(db.String(80), unique=True)
email = db.Column(db.String(120), unique=True)
password = db.Column(db.String(120), unique=True)
biography = db.Column(db.String(300), unique=False)
upvotes = db.Column(db.Integer)
downvotes = db.Column(db.Integer)
@xraymemory
xraymemory / Logcat log
Created October 31, 2012 20:26
Android Apache errors
10-31 16:22:50.102: I/System.out(4843): URL: http://ds_product_photos.s3.amazonaws.com/medium/17401.jpg
10-31 16:22:50.112: I/System.out(4843): Request: org.apache.http.client.methods.HttpGet@412ee880
10-31 16:22:50.112: W/dalvikvm(4843): threadid=12: thread exiting with uncaught exception (group=0x40b05300)
10-31 16:22:50.122: E/AndroidRuntime(4843): FATAL EXCEPTION: AsyncTask #2
10-31 16:22:50.122: E/AndroidRuntime(4843): java.lang.RuntimeException: An error occured while executing doInBackground()
10-31 16:22:50.122: E/AndroidRuntime(4843): at android.os.AsyncTask$3.done(AsyncTask.java:299)
10-31 16:22:50.122: E/AndroidRuntime(4843): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
10-31 16:22:50.122: E/AndroidRuntime(4843): at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
10-31 16:22:50.122: E/AndroidRuntime(4843): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
10-31 16:22:50.122: E/AndroidRuntime(4843): at java.util.concurrent.
from csc.nl import get_nl
import itertools as it
import divisi2
en_nl = get_nl('en')
A = divisi2.network.conceptnet_matrix('en')
concept_axes, axis_weights, feature_axes = A.normalize_all().svd(k=100)
sim = divisi2.reconstruct_similarity(concept_axes, axis_weights, post_normalize=True)
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 239, in process
return self.handle()
File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 230, in handle
return self._delegate(fn, self.fvars, args)
File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 420, in _delegate
return handle_class(cls)
File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 396, in handle_class
return tocall(*args)
File "/usr/local/lib/python2.7/dist-packages/waltz/decorations.py", line 40, in inner
PImage poemImg;
PFont poemFont;
String sourceText[];
String displayPoemText;
int defaultXSlice = 4;
int defaultYSlice = 6;
int ySlice = defaultXSlice;
int xSlice = defaultYSlice;
int poemIndexer = 0;
boolean firstRun = true;
String [] poem1 ={"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"};
String [] poem ={"e", "x", "m", "a", "c", "h", "i", "n", "a", "c", "t", "r", "l", "o", "r", "g", "m", "o", "d", "e", "i", "c", "e", "n", "o", "x"};
String loadPath = "./sample.jpg"
PImage picture;
int devisions = 1; // pixels
PFont font;
float xDiv;
float yDiv;
This file has been truncated, but you can view the full file.
ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ ÛÛÛÛÛÝÛÛÛÝÛÛÛÝÛÛ ÝÛÛ Ý ÛÛÛÛÝÛÛÛÝÛÛÛÝÛÛÛÝÛÛ ÝÛÛ ÝÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ
±±±±±±±±±±±±±±± ÛÛ Û ÝÛÛ ÝÛÛ ÛÛ ÝÛÛ Ý ÛÛ Ý Û ÛÛ ÛÛ ÛÛ ÝÛÛ Ý±±±±±±±±±±±±±±±
±±±±±±±±±±±±±±± ÛÛ ÝÛÛÜÝÛÛ ÛÛÜÝÛÛ Ý ÛÛÜÜÝ Û ÛÛ ÛÛ ÛÛÜÝÛÛ Ý±±±±±±±±±±±±±±±
ßßßßßßßßßßßßßßß ÛÛ ÝÛÛ ÝÛÛÛÝÛÛ ÝÛÛÛÝ ÛÛ ÛÛÛÝÛÛÛÝÛÛÛÝÛÛ ÝÛÛÛÝßßßßßßßßßßßßßßß
ÜÛÜ ÜÛÜ ÜÛÜ ÜÛÜ ÜÜÜÛßßß ÜÛÜ ÜÛÜ ÜÛÜ ÜÛÜ ÜÜÜÛßßß Ü ÜÛÜ ÜÛÜ
ÛÛßÛÝ ÛÛßÛÝ ÛÛßÛÝÛÛßÛÝ ßÛÝ ÛÛßÛÝ O ÛÛßÛÝÛÛßÛÝ ÛÛßÛÝ ßÛÝ Û ÛÝ ÛÛßÛÝ ÛÛßÛÝ
Þ² Û²Þ² Þ² Þ² ²Û ²Û Þ² F Þ² Þ² Þ²Þ² ²Û ²Û Þ² Þ²Þ² ²ÛÞ²