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
#!/bin/env python3 | |
import asyncio, os, string, sys | |
from contextlib import suppress | |
from aiolimiter import AsyncLimiter | |
FORMAT = "flac" | |
MAX_INPUT_LENGTH = 4096 | |
COST_PER_CHAR = 0.030 / 1000 | |
REQUESTS_PER_MIN = 10 |
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
from functools import update_wrapper | |
def Mutable(inner): | |
def rebind(unbound): | |
return lambda self, *args, **kwargs: unbound( | |
self.inner, | |
*(a.inner if isinstance(a, type(self)) else a | |
for a in args), | |
**{k: v.inner if isinstance(v, type(self)) else v | |
for k, v in kwargs.items()}, |
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 asyncio | |
def async_agnostic(corofn): | |
@wraps(corofn) | |
def wrapper(*args, **kwargs): | |
with suppress(RuntimeError): | |
loop = asyncio.get_running_loop() | |
if loop.is_running(): | |
return corofn(*args, **kwargs) | |
return asyncio.run(corofn(*args, **kwargs)) |
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 | |
# Usage: with both the terminal and /dev/input keylogger running, press every | |
# key on your keyboard. This program will correlate the two transcripts to | |
# generate a mapping from Linux kernel keycodes to terminal chars/escape codes. | |
# | |
# In other words, run: | |
# | |
# ./keylogger > kb-keylogger.csv & ./terminal > kb-terminal.csv | |
# killall -SIGINT keylogger | |
# ./generate-keymap.py |
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
From 0b8ac062693ce67019dfef28f76e0c79db8fa0a3 Mon Sep 17 00:00:00 2001 | |
From: Will Harris <wfh@chromium.org> | |
Date: Thu, 28 Feb 2019 19:32:41 +0000 | |
Subject: [PATCH] Merge M73: FileReader: Make a copy of the ArrayBuffer when | |
returning partial results. | |
This is to avoid accidentally ending up with multiple references to the | |
same underlying ArrayBuffer. The extra performance overhead of this is | |
minimal as usage of partial results is very rare anyway (as can be seen | |
on https://www.chromestatus.com/metrics/feature/timeline/popularity/2158). |
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
#!/bin/bash | |
# When autoconf configure scripts look for the LIBC PATH, they assume ld | |
# prefaces the paths with "attempt to open /lib/path.so" (the behavior of | |
# GNU ld) while lld uses a different format. With CONFIGURE_LIBC_WORKAROUND | |
# set the output will be transformed to GNU ld's format. | |
if [ -n "${CONFIGURE_LIBC_WORKAROUND+1}" ] && (echo $@ | grep -q -- "--verbose"); then | |
exec -a $0 ld $@ 2> >(sed "s@^$0: /\(.*\)\$@attempt to open /\1 succeeded@g" >&2) | |
else | |
exec -a $0 ld $@ |
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
diff --git a/proc/numa.h b/proc/numa.h | |
index c198d9d..1b2b4eb 100644 | |
--- a/proc/numa.h | |
+++ b/proc/numa.h | |
@@ -22,7 +22,9 @@ | |
#include <features.h> | |
-__BEGIN_DECLS | |
+#ifdef __cplusplus |
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
diff -ruN compiler-rt-6.0.0.src/lib/asan/asan_linux.cc compiler-rt-6.0.0.src-musl/lib/asan/asan_linux.cc | |
--- compiler-rt-6.0.0.src/lib/asan/asan_linux.cc 2018-02-07 20:51:13.000000000 +0100 | |
+++ compiler-rt-6.0.0.src-musl/lib/asan/asan_linux.cc 2018-03-20 11:57:12.381740075 +0100 | |
@@ -46,7 +46,7 @@ | |
#include <link.h> | |
#endif | |
-#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_SOLARIS | |
+#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_SOLARIS || SANITIZER_NONGNU | |
#include <ucontext.h> |
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
# Makefile for musl-clang crt's | |
all: | |
clang -fPIC -c crtbegin.c -o /usr/lib/crtbegin.o | |
ln -s /usr/lib/crtbegin.o /usr/lib/crtbeginS.o | |
ln -s /usr/lib/crtbegin.o /usr/lib/crtbeginT.o | |
clang -fPIC -c crtend.c -o /usr/lib/crtend.o | |
ln -s /usr/lib/crtend.o /usr/lib/crtendS.o | |
ln -s /usr/lib/crtend.o /usr/lib/crtendT.o | |
clean: |
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
$ ./gradlew build --stacktrace | |
Incremental java compilation is an incubating feature. | |
Skipping debug jar:microg-ui-tools:preBuild UP-TO-DATE | |
:microg-ui-tools:preDebugBuild UP-TO-DATE | |
:microg-ui-tools:checkDebugManifest | |
:microg-ui-tools:preDebugAndroidTestBuild UP-TO-DATE | |
:microg-ui-tools:preDebugUnitTestBuild UP-TO-DATE | |
:microg-ui-tools:preReleaseBuild UP-TO-DATE | |
:microg-ui-tools:preReleaseUnitTestBuild UP-TO-DATE | |
:microg-ui-tools:prepareComAndroidSupportAnimatedVectorDrawable2531Library |
NewerOlder