Skip to content

Instantly share code, notes, and snippets.

fut = None
async def antidogpile(coro, *args, **kwargs):
nonolocal fut
async def helper():
nonlocal fut
try:
return await coro(*args, **kwargs)
finally:
/app # wget https://raw.githubusercontent.com/python/cpython/master/Tools/gdb/libpython.py
...
/app # apk add gdb
...
/app # env PYTHONPATH=. gdb
GNU gdb (GDB) 8.2
...
[
{
"refs": [
"tag: 0.1"
],
"hash": "6bf194888b1c0e40d68aae9424c69e798395b165",
"hashAbbrev": "6bf1948",
"tree": "37097d59d05d6216edb082f62ce15be4eb6b732d",
"treeAbbrev": "37097d5",
"parents": [],
def game():
"""Play a single game, interactively"""
last = None # last word entered by player
seen = set() # all the words player tried so far
while True:
guess = input("Please type a word: ")
if not guess:
00: .... .... .... .... .... .... .... .... .... .... ...# ...# .... .... .... ..## :4
01: .... .... .... .... .... .... .... .... .... .... .##. .#.. .... .... .... ##.. :5
02: .... .... .... #... .... .... ##.. #... .... .... .... #... .... .... .... .... :5
03: .... .... .... .... .... .... .... .... .... ...# .... .... ...# ...# ..## .... :5
04: .... #... .... .... .#.. ##.. .... .... .... .#.. .... .... .... .... .... .... :5
05: ...# ..## .... .... .... ..#. .... .... .... ..#. .... .... .... .... .... .... :5
06: .... .... .... .... .... .... .... .... ..#. .... .... .... ..#. .##. .#.. .... :5
07: .... .... .... .... .... .... .... .... .... .... #... .... ##.. #... #... .... :5
08: .... .... ...# .... .... ...# ..## ...# .... .... .... .... .... .... .... .... :5
09: #... .... .... .... #... .... .... .... ##.. #... .... .... .... .... .... .... :5
diff --git a/Makefile.inc b/Makefile.inc
index 6a68fce..acfd282 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -16,6 +16,7 @@ CSOURCES = ares__close_sockets.c \
ares_getnameinfo.c \
ares_getsock.c \
ares_init.c \
+ ares_reinit.c \
ares_library_init.c \
00: .... .... .... .... .... .... .... .... .... .... ...# ...# .... .... .... ..## :4
01: .... .... .... .... .... .... .... .... .... .... .##. .#.. .... .... .... ##.. :5
02: .... .... .... #... .... .... ##.. #... .... .... .... #... .... .... .... .... :5
03: .... .... .... .... .... .... .... .... .... ...# .... .... ...# ...# ..## .... :5
04: .... #... .... .... .#.. ##.. .... .... .... .#.. .... .... .... .... .... .... :5
05: ...# ..## .... .... .... ..#. .... .... .... ..#. .... .... .... .... .... .... :5
06: .... .... .... .... .... .... .... .... ..#. .... .... .... ..#. .##. .#.. .... :5
07: .... .... .... .... .... .... .... .... .... .... #... .... ##.. #... #... .... :5
08: .... .... ...# .... .... ...# ..## ...# .... .... .... .... .... .... .... .... :5
09: #... .... .... .... #... .... .... .... ##.. #... .... .... .... .... .... .... :5
mysql> describe weather;
+---------+------------+------+-----+---------+-------------------+
| Field | Type | Null | Key | Default | Extra |
+---------+------------+------+-----+---------+-------------------+
| date | char(10) | NO | PRI | NULL | |
| geohash | char(4) | NO | PRI | NULL | |
| weather | json | YES | | NULL | |
| todo | tinyint(4) | YES | MUL | NULL | VIRTUAL GENERATED |
+---------+------------+------+-----+---------+-------------------+
4 rows in set (0.01 sec)
import os
import time
import json
import logging
import platform
import datetime
import requests
import threading
import subprocess
2016-09-12 09:00:05 +0000 [info]: reading config file path="/fluentd/etc/fluent.conf"
2016-09-12 09:00:05 +0000 [info]: starting fluentd-0.14.6
2016-09-12 09:00:05 +0000 [info]: spawn command to main: /usr/bin/ruby -Eascii-8bit:ascii-8bit /usr/bin/fluentd -c /fluentd/etc/fluent.conf -p /fluentd/plugins --under-supervisor
2016-09-12 09:00:05 +0000 [info]: reading config file path="/fluentd/etc/fluent.conf"
2016-09-12 09:00:05 +0000 [info]: starting fluentd-0.14.6 without supervision
2016-09-12 09:00:05 +0000 [info]: gem 'fluent-plugin-loggly' version '0.0.8'
2016-09-12 09:00:05 +0000 [info]: gem 'fluentd' version '0.14.6'
2016-09-12 09:00:05 +0000 [info]: adding filter pattern="**" type="stdout"
2016-09-12 09:00:05 +0000 [info]: adding match pattern="**" type="copy"
2016-09-12 09:00:05 +0000 [info]: adding source type="tail"