I hereby claim:
- I am python273 on github.
- I am python273 (https://keybase.io/python273) on keybase.
- I have a public key ASDZ5cazye3A_KCFjW091hI3vW_F_l9aIFX5aAD901KS1Ao
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
# Install dependencies | |
NGINX_VERSION=1.10.1 && \ | |
OPENSSL_VERSION=1.0.1t && \ | |
NPS_VERSION=1.11.33.3 && \ | |
sudo apt-get install unzip build-essential checkinstall git libpcre3 libpcre3-dev zlib1g zlib1g-dbg zlib1g-dev && \ | |
mkdir -p ~/sources/ && \ |
import sys | |
import random | |
from itertools import combinations | |
import string | |
MSGS = ( | |
# X -> Y means that the strings start with the same prefix | |
# 1 -> 8 |
import asyncio | |
@asyncio.coroutine | |
def proxify(reader, writer): | |
addr_writer = writer.get_extra_info('peername')[0] | |
while True: | |
data = yield from reader.read(8192) |
# -*- coding: utf-8 -*- | |
""" | |
:authors: python273 | |
:license: Apache License, Version 2.0 | |
:copyright: (c) 2018 python273 | |
""" | |
from functools import reduce | |
from itertools import chain | |
from numbers import Number |
# -*- coding: utf-8 -*- | |
""" | |
:authors: python273 | |
:license: Apache License, Version 2.0 | |
:copyright: (c) 2018 python273 | |
""" | |
from datetime import datetime, timedelta | |
from functools import reduce | |
import operator |
import time | |
from mido import MidiFile | |
from mido import bpm2tempo, tempo2bpm | |
mid = MidiFile('some.midi') | |
new_tempo = 75 | |
# track numbers are hardcoded, might be different | |
old_tempo = tempo2bpm(mid.tracks[0][2].tempo) |
thread 'main' panicked at 'failed printing to stdout: Broken pipe (os error 32)', library/std/src/io/stdio.rs:940:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
use std::error;
use std::io::Write;
Firefox's Reader mode highlights words when using text-to-speech. Here is related code:
const h = new Highlighter(window, document.getElementById('your-el'));
// highlight(startOffset, length)
h.highlight(8, 12);
from pathlib import Path | |
import os | |
import ctypes, re, sys | |
from pprint import pprint | |
import traceback | |
c_ptrace = ctypes.CDLL("libc.so.6").ptrace | |
c_pid_t = ctypes.c_int32 | |
c_ptrace.argtypes = [ctypes.c_int, c_pid_t, ctypes.c_void_p, ctypes.c_void_p] |