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
0xxxxxxx 7 | |
10xxxxxx xxxxxxxx 14 | |
110xxxxx xxxxxxxx xxxxxxxx 21 | |
1110xxxx xxxxxxxx xxxxxxxx xxxxxxxx 28 | |
11110xxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx 35 | |
111110xx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx 42 | |
1111110x xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx 49 | |
11111110 xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx 56 | |
11111111 xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx 64 |
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
{(a ^ b)} |- (a ^ b): | |
(assume (a ^ b)) | |
{(a ^ (b ^ c))} |- ((a ^ b) ^ c): | |
(conj-intro | |
(conj-intro | |
(conj-elim-l (assume (a ^ (b ^ c)))) | |
(conj-elim-l (conj-elim-r (assume (a ^ (b ^ c)))))) | |
(conj-elim-r (conj-elim-r (assume (a ^ (b ^ c)))))) |
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
* Error: The above package list contains packages which cannot be | |
* installed at the same time on the same system. | |
(dev-util/gdbus-codegen-2.50.3:0/0::gentoo, ebuild scheduled for merge) pulled in by | |
dev-util/gdbus-codegen required by (gnome-base/gvfs-1.30.4:0/0::gentoo, ebuild scheduled for merge) | |
>=dev-util/gdbus-codegen-2.48 required by (x11-libs/gtk+-3.22.15:3/3::gentoo, ebuild scheduled for merge) | |
(dev-libs/glib-2.52.2:2/2::gentoo, ebuild scheduled for merge) pulled in by | |
>=dev-libs/glib-2.40:2=[dbus] required by (sys-auth/consolekit-1.1.0-r1:0/0::gentoo, installed) | |
>=dev-libs/glib-2.38.2-r1:2[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] |
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 math import sqrt | |
class Dedent: | |
@classmethod | |
def method(cls, f=None, *, name=None): | |
def decorator(f): | |
setattr(cls, name if name is not None else f.__name__, f) | |
if f is not None: | |
decorator(f) | |
else: |
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
(define (do-read sock n) | |
(linux/do-syscall 'read (sock n 'linux/onoblock))) | |
(define (read sock n) | |
(let ((result (do-read sock n))) | |
(if (equal? result 'linux/ewouldblock) | |
(call-with-current-continuation | |
(lambda (cc) | |
(wait sock cc)) | |
result))) |
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 builtins | |
def testable(f): | |
def run_test(test): | |
print(test.__doc__) | |
args = {name: value for (name, value) in test.__annotations__.items() | |
if name != 'return'} | |
assert f(**args) == test.__annotations__['return'] | |
return test | |
f.test = run_test |
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
milesrout@mac:~ $ python3 | |
Python 3.6.0 (default, Dec 24 2016, 08:01:42) | |
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> f = open('DATA.txt', 'r') | |
>>> data = f.read() | |
>>> data | |
'01011001 01101111 01110101 00100000\n01101010 01110101 01110011 01110100\n00100000 01110111 01100001 01110011\n01110100 01100101 01100100 00100000\n01111001 01101111 01110101 01110010\n00100000 01110100 01101001 01101101\n01100101 00101110\n' | |
>>> data.split() | |
['01011001', '01101111', '01110101', '00100000', '01101010', '01110101', '01110011', '01110100', '00100000', '01110111', '01100001', '01110011', '01110100', '01100101', '01100100', '00100000', '01111001', '01101111', '01110101', '01110010', '00100000', '01110100', '01101001', '01101101', '01100101', '00101110'] |
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 typing import Iterable, Pattern | |
def scanner(src: string, regexes: Iterable[(str, Pattern)]) -> Iterable[(string, string)]: | |
"""Takes source code, and a list of tuples of the form (token_name, | |
token_regex). Yields pairs (token_name, token_literal).""" |
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 x | |
from y import x | |
from a.z.b import q | |
from .....a import q | |
from x import (a, b, c, d) | |
import a, b, z, d, fe, q | |
import a.ce, efa.f, ae.e | |
def hello(world): | |
def foo(): |
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 x | |
from y import x | |
from a.z.b import q | |
from .....a import q | |
from x import (a, b, c, d) | |
import a, b, z, d, fe, q | |
import a.ce, efa.f, ae.e | |
def hello(world): | |
def foo(): |