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
|= dim=@ud | |
^- @ux | |
:: Pixel bytes for 24bpp dim*dim image | |
:: Note: this calculation does not support padding, so dim%4 must be 0 | |
:: | |
=/ datasize=@ (mul 3 (mul dim dim)) | |
:: The header is a list of [bytes, value] to be composed into a single blob | |
:: | |
=/ header=@ | |
%+ can 3 |
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
--Detective Spooner-- | |
--Author: Sudo (aka SudoNhim) | |
--Version: 1.1 - 22/03/2012 | |
--Detective Spooner examines each significant pair of long words and tries | |
--to establish which pairs make good spoonerisms. If a pair is selected, | |
--the words are substituted for the spoonerism. | |
--Spoonerisms are recorded so they will not happen if the user tries to | |
--repeat them <trollface.jpg> |
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
#ifdef GL_ES | |
precision mediump float; | |
#endif | |
#extension GL_OES_standard_derivatives : enable | |
uniform float time; | |
uniform vec2 mouse; | |
uniform vec2 resolution; |
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 <stdio.h> | |
#include <cstdlib> | |
#include <vector> | |
#include <string> | |
int strToNumber(const char* start, const char* stop) | |
{ | |
int sum = 0; | |
for (const char* c = start; c<stop; c++) | |
sum = sum * 10 + *c - 48; |
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 bluetooth as bt | |
import sys, time | |
from random import random | |
uuid = "94f39d29-7d6d-437d-973b-fba39e49d4ee" | |
matches = bt.find_service(uuid=uuid) | |
if len(matches) == 0: | |
raw_input("No matching service found!") | |
sys.exit(0) |