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 Iterator, TypedDict | |
import collections | |
import dataclasses | |
import enum | |
import tokenize | |
# A parenthesized expression list yields whatever that expression list | |
# yields: if the list contains at least one comma, it yields a tuple; | |
# otherwise, it yields the single expression that makes up the expression |
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 subprocess import Popen | |
from concurrent.futures import ThreadPoolExecutor | |
from os import waitpid | |
import time | |
import asyncio | |
start = time.time() | |
for i in range(3000): | |
p1 = Popen(['/bin/true']) |
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 itertools | |
import logging | |
import trio | |
import attr | |
import protocol | |
logging.basicConfig(level=logging.DEBUG) | |
log = logging.getLogger('client') |
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
// gcc -O3 -march=native mask.c -o mask | |
#include <assert.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <time.h> | |
#include <immintrin.h> | |
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
xkbcommon: WARNING: /home/ran/.XCompose:14:40: this compose sequence already exists; overriding | |
xkbcommon: WARNING: /home/ran/.XCompose:16:43: a sequence already exists which is a prefix of this sequence; overriding | |
xkbcommon: WARNING: /home/ran/.XCompose:33:39: this compose sequence already exists; overriding | |
xkbcommon: WARNING: /home/ran/.XCompose:37:41: this compose sequence already exists; overriding | |
xkbcommon: WARNING: /home/ran/.XCompose:43:43: this compose sequence already exists; overriding | |
xkbcommon: WARNING: /home/ran/.XCompose:47:38: this compose sequence already exists; overriding | |
xkbcommon: WARNING: /home/ran/.XCompose:48:38: this compose sequence already exists; overriding | |
xkbcommon: WARNING: /home/ran/.XCompose:50:42: this compose sequence already exists; overriding | |
xkbcommon: WARNING: /home/ran/.XCompose:51:47: this compose sequence already exists; overriding | |
xkbcommon: WARNING: /home/ran/.XCompose:52:38: this compose sequence already exists; overriding |
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
#!/usr/bin/python2 | |
"""Display the error message for an Oracle error either from the internet | |
or from the cache db, based on the error code ("the query") you get when | |
confronted with the error.""" | |
import sys, os, re, urllib2, urlparse, anydbm | |
from BeautifulSoup import BeautifulSoup | |
BASE_URL = "http://download.oracle.com/docs/cd/B19306_01/server.102/b14219/" | |
TOC_URL = BASE_URL + "toc.htm" |
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
/* In linux, the evdev subsystem already has an indirection layer for | |
* keyboard keys. It allows to remap the evdev scancode it gets from | |
* the keyboard to another scancode (keycode). */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> |
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 <assert.h> | |
#include <err.h> | |
#include <stdbool.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <xcb/xcb.h> | |
#include <xcb/xkb.h> |
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
minKeyCode: 8 | |
maxKeyCode: 255 | |
firstType: 0 | |
totalType: 25 | |
nTypes: 25 | |
type 0: | |
mods_mask: 0 | |
mods_mods: 0 | |
mods_vmods: 0 | |
numLevels: 1 |
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 <err.h> | |
#include <stdbool.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <xcb/xcb.h> | |
#include <xcb/xkb.h> |
NewerOlder