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
ileAST: | |
FuncDef: | |
Decl: send, [], [], [] | |
FuncDecl: | |
ParamList: | |
Decl: to, [], [], [] | |
TypeDecl: to, [] | |
IdentifierType: ['int'] | |
Decl: from, [], [], [] | |
TypeDecl: from, [] |
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 multiprocessing | |
from multiprocessing.managers import SyncManager | |
import Queue | |
import time | |
from factorize import factorize_naive | |
from eblib.utils import Timer | |
IP = '192.168.1.102' | |
PORTNUM = 55444 | |
AUTHKEY = 'shufflin' |
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
class Timer(object): | |
def __init__(self, name=None): | |
self.name = name | |
def __enter__(self): | |
self.tstart = time.time() | |
def __exit__(self, type, value, traceback): | |
if self.name: |
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
from collections import namedtuple | |
TOK_TEXT = 'TOK_TEXT' | |
TOK_LEFT_META = 'TOK_LEFT_META' | |
TOK_RIGHT_META = 'TOK_RIGHT_META' | |
TOK_DUMMY = 'TOK_DUMMY' | |
# A token has |
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
# Regex for matching/capturing role text. | |
# E.g. :name:`text` - first capture group is "name", second group is "text" | |
# | |
ROLE_REGEX = re.compile(r':(\w+):`([^`]*)`') |
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
struct SS { | |
long n1; | |
long n2; | |
long n3; | |
long n4; | |
}; | |
int foo(struct SS s) { |
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
====> lli | |
lli | |
AsmParser | |
Core | |
Support | |
Support | |
BitReader | |
Core | |
Support | |
IRReader |
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
#------------------------------------------------------------------------------- | |
# lexer.py | |
# | |
# A generic regex-based Lexer/tokenizer tool. | |
# See the if __main__ section in the bottom for an example. | |
# | |
# Eli Bendersky ([email protected]) | |
# This code is in the public domain | |
# Last modified: August 2010 | |
#------------------------------------------------------------------------------- |
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 io | |
from test.support import import_fresh_module | |
import csv | |
csv_other = import_fresh_module('csv', fresh=['_csv', 'csv']) | |
f = io.StringIO('foo\x00,bar\nbaz,42') | |
reader = csv.reader(f) |
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
const unsigned N = 400 * 1000 * 1000; | |
volatile unsigned long long counter = 0; | |
// Don't inline the benchmarking code into main | |
void __attribute__((noinline)) tightloop(); | |
void __attribute__((noinline)) loop_with_extra_call(); | |
void tightloop() { | |
unsigned j; |
OlderNewer