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
*.acn | |
*.acr | |
*.alg | |
*.aux | |
*.bak | |
*.bbl | |
*.bcf | |
*.blg | |
*.brf | |
*.dvi |
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
class Element: | |
"""I represent an unspecific UI component""" | |
def __init__(self, id, env): | |
self.id = id | |
self.env = env | |
self.children = [] | |
def trigger(self, event): |
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 os | |
import time | |
ITERATIONS = 3 # Number of passes | |
BLOCKSIZE = 1 << 20 # Bytes to be written at once | |
INFO_SECONDS = 3 # Interval in which output is displayed | |
FILE = 'crap' # File where random output is dumped | |
def format_bytes(n): | |
'''Human readable representation of bytes''' |
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 "Python.h" | |
#include "numpy/arrayobject.h" | |
// ---------------------------------------------------------------------------- | |
// BASIC API | |
typedef struct { | |
int data[1024]; | |
} internalColumn; |
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
# | |
# NEURAL NETWORK CLASSIFIERS | |
# Pure Python Implementation | |
# | |
# Copyright (c) 2008 - 2013 | Toni Mattis <solaris@live.de> | |
# | |
import random, math | |
# ------------------------------------------------------------------------------ |
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
# Imports a Wikipedia dump into a CouchDB | |
# ... and makes it searchable by Apache Lucene | |
# REQUIREMENTS: | |
# - CouchDB | |
# - couchdb-lucene (https://github.com/rnewson/couchdb-lucene) | |
# - couchdb-python (http://code.google.com/p/couchdb-python/) | |
# Run CouchDB, start this script, run couchdb-lucene while script is running | |
# Trigger Indexing by Sample Query: |
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
# | |
# K-Nearest-Neighbours Function Approximator | |
# 2013 | by Toni Mattis | |
# | |
import math | |
import heapq # for efficient top-k retrieval | |
import random # for cross-validation | |
import csv # for loading samples from a file |
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
""" | |
KADOKUSEI Number and Byte-Stream Representation | |
(c) 2013 | Toni Mattis | MIT Licensed | |
This code allows abstract numbers, i.e. coordinates, public keys or hashes | |
to be represented in a pronounceable way. Composition is based on Hiragana. | |
Example: | |
>>> encode_number(718428) |
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 base64_fixpoint(prefix_len): | |
s = 'rofl' | |
t = 'lol' | |
while s != t: | |
s = t | |
t = s.encode("base64")[:prefix_len] | |
return t |
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 | |
#-*- coding: utf-8 -*- | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
OlderNewer