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
DEF_NAME print | |
DEF_CONST omgfst "omgfast" | |
DEF_LABEL hi | |
LOAD_GLOBAL print | |
LOAD_CONST omgfst | |
CALL_FUNCTION 1 | |
POP_TOP | |
JUMP_ABSOLUTE hi |
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
#!/usr/bin/env hy3 | |
;;; doto.hy - do something to a bunch of other things. | |
;;; Copyright (c) Paul R. Tagliamonte, MIT/Expat, 2014. | |
;;; | |
(import | |
os sys subprocess | |
[concurrent.futures [ThreadPoolExecutor]] | |
[itertools [groupby]] |
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 collections import ChainMap | |
class Bar(object): | |
y = 1 | |
class Foo(Bar): | |
a = 1 | |
b = 2 |
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 dis | |
>>> def x(): | |
... print(True) | |
... | |
>>> dis.dis(x) | |
2 0 LOAD_GLOBAL 0 (True) | |
3 PRINT_ITEM | |
4 PRINT_NEWLINE | |
5 LOAD_CONST 0 (None) | |
8 RETURN_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
#!/usr/bin/env python | |
from opencv.cv import * | |
from opencv.highgui import * | |
cvNamedWindow("w1", CV_WINDOW_AUTOSIZE) | |
capture = cvCreateCameraCapture(0) | |
def calculate( image ): | |
greyscale = cvCreateImage(cvSize(image.width, image.height), 8, 1) |
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
/* | |
* "Throb" effect. | |
* | |
* Paul Tagliamonte, 2010. | |
* | |
* This is a re-take on the classic "pulse" ( otherwise | |
* known as the standby, throb, blob, mob or rob effect ) | |
* | |
* Yes, that was a joke. Lighten up, this is programming. | |
* |
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
/* | |
* "Throb" effect ( Part Deux ) | |
* | |
* Paul Tagliamonte, 2010. ( Peace, Love and C++, baby ) | |
* | |
* This code is released under the Bacon license. | |
* If you like this code enough, consider sending me bacon. | |
* | |
* That or GPL-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
#include <iostream> | |
#include <limits.h> | |
#include <math.h> | |
using namespace std; | |
int WORLD = 0; | |
int LASTWORLD = 0; | |
int NEWWORLD = 0; |
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
#!/bin/bash | |
BUILD_DIR=/var/builds | |
GNUPG_KEY=DBC1F58D | |
MIRRORDIR=/git/ | |
WORKDIR=/tmp/$$.d/ | |
echo "Creating workdir: $WORKDIR" | |
mkdir $WORKDIR |
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 <iostream> | |
using namespace std; | |
int main ( int argc, char ** argv ) { | |
char msg[] = { | |
0x1B, '[', '2', 'J', 0x1B, '[', 'H', '\0' | |
}; | |
std::cout << msg; | |
} |
OlderNewer