This file contains hidden or 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
############################################################################### | |
# | |
# File: tizz/__init__.py | |
# Author: Ken Sheedlo | |
# | |
# TISEAN interface library for Python | |
# | |
############################################################################### | |
import numpy |
This file contains hidden or 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
$ python look.py | |
File "look.py", line 3 | |
ಠ_ಠ = 42 | |
^ | |
SyntaxError: invalid syntax | |
$ ./look.py | |
42 |
This file contains hidden or 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
HANDLERS = {} | |
def handler_decorator(*dargs, **dkwargs): | |
''' | |
This function is actually a decorator factory. | |
It makes decorators that take arguments. | |
''' | |
print "Ermuhgerd! Erm uh dehcruter!" |
This file contains hidden or 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
''' | |
Usage (from one directory up): | |
$ python -m introspection.introspect | |
''' | |
# The local package's name. | |
import introspection | |
import re |
This file contains hidden or 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<stdint.h> | |
#include<stdio.h> | |
#define MAX_LEVEL 15 | |
int32_t search(int32_t state, int32_t l, int32_t p, int32_t w, int32_t level) { | |
const int32_t table[3][4] = { | |
/* Pattern of XOR operations for the lever */ | |
{ 20, 3, 20, 3 }, | |
/* Pattern of XOR operations for the switch */ |
This file contains hidden or 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 random | |
_rng = random.SystemRandom() | |
def modexp(base, exp, mod): | |
''' | |
Classic modular exponentiation by repeated squaring. | |
''' | |
acc = 1 |
NewerOlder