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 adoptopenjdk/openjdk11:armv7l-debian-jdk-11.0.8_10 | |
WORKDIR /app | |
RUN apt update && apt install -y wget | |
RUN wget -O /app/Amm https://github.com/lihaoyi/Ammonite/releases/download/2.2.0/2.12-2.2.0 && chmod +x /app/Amm | |
RUN apt install -y git build-essential automake unzip | |
# grab leveldb source and patch it | |
RUN git clone git://github.com/chirino/leveldb.git && cd leveldb && wget https://raw.githubusercontent.com/fusesource/leveldbjni/master/leveldb.patch && git apply ./leveldb.patch | |
# no make install target in leveldb, so manually copy libs | |
RUN cd /app/leveldb && make -j3 && cp libleveldb.* /usr/lib/ | |
# grab native source blob from maven |
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
val libs = classOf[ClassLoader].getDeclaredField("loadedLibraryNames") | |
libs.setAccessible(true) | |
libs.get(ClassLoader.getSystemClassLoader).asInstanceOf[java.util.HashSet[String]].toArray |
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
{ | |
"3a457": { | |
"substrates": { | |
"alfentanil": [ | |
"Human alfentanil metabolism by cytochrome P450 3A3/4. An explanation for the interindividual variability in alfentanil clearance? [ PMID 8484504 ] Kharasch ED, Thummel KE. Anesth Analg 1993;76:1033-1039." | |
], | |
"alprazolam": [ | |
"Alprazolam is another substrate for human cytochrome P450-3A isoforms. [ PMID 9617989 ] Venkatakrishnan K, Greenblatt DJ, von Moltke LL, Shader RI. JClin Psychopharmacol 1998 Jun;18(3):256." | |
], | |
"amlodipine": [ |
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
{ | |
"7 Pot Brain Strain Red Pepper": "Capsicum chinense", | |
"7 Pot Bubble Gum Pepper": "Capsicum chinense", | |
"7 Pot Pepper Barrackpore": "Capsicum chinense", | |
"7 Pot Pepper Brain Strain Yellow": "Capsicum chinense", | |
"7 Pot Pepper Orange": "Capsicum chinense", | |
"7 Pot Pepper Yellow": "Capsicum chinense", | |
"7 Pot Pink Pepper": "Capsicum chinense", | |
"7 Pot Rust Pepper": "Capsicum chinense", | |
"Abe Lincoln Tomato": "Solanum lycopersicum", |
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
REMOTE_SSH_PORT_TO_BIND=8192 | |
REMOTE_SSH_KEY_FULLPATH=/etc/sshtunnel.privkey | |
REMOTE_SSH_IP=255.255.255.255 | |
REMOTE_SSH_USER=root |
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
gcc -O2 -DNDEBUG -fpic -DARM -DARCH="ARM" -DLINUX -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_LITTLE_ENDIAN -fno-omit-frame-pointer -fno-strict-aliasing -static-libgcc -I./sqlite -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_STAT2 -DHAVE_READLINE=0 -DSQLITE_THREADSAFE=1 -DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DTEMP_STORE=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_OMIT_DEPRECATED -DSQLITE_OS_UNIX=1 -c ./sqlite/sqlite3.c -o sqlite3.o | |
gcc -O2 -DNDEBUG -fpic -DARM -DARCH="ARM" -DLINUX -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_LITTLE_ENDIAN -fno-omit-frame-pointer -fno-strict-aliasing -static-libgcc -I./sqlite -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_STAT2 -DHAVE_READLINE=0 -DSQLITE_THREADSAFE= |
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 | |
import sys | |
async def test(): | |
1//0 | |
loop = asyncio.get_event_loop() | |
def asyncio_handler(loop, context): | |
print("XXXX", "got", context) |
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
# | |
# Automatically generated make config: don't edit | |
# Linux/arm 3.0.21 Kernel Configuration | |
# | |
CONFIG_ARM=y | |
CONFIG_SYS_SUPPORTS_APM_EMULATION=y | |
CONFIG_HAVE_SCHED_CLOCK=y | |
CONFIG_GENERIC_GPIO=y | |
# CONFIG_ARCH_USES_GETTIMEOFFSET is not set | |
CONFIG_GENERIC_CLOCKEVENTS=y |
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
f = open('/dev/urandom', 'rb') | |
default_n = 1000000 | |
max_r = 256 | |
def r1dx(x=20): | |
while True: | |
# get one byte, take as int on [1,256] | |
r = int.from_bytes(f.read(1), 'little')+1 | |
# if byte is less than the max factor of 'x' on the interval max_r, return r%x+1 | |
if r < (max_r-(max_r%x)+1): return (r%x)+1 |
NewerOlder