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
$ python foo.py & | |
[1] 21377 | |
$ gdb -p 21377 | |
GNU gdb (GDB) Fedora 7.7.1-17.fc20 | |
[... gdb loading messages ...] | |
0x00007f9a09af46e3 in __select_nocancel () at ../sysdeps/unix/syscall-template.S:81 | |
81 T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS) | |
(gdb) py-bt | |
#4 Frame 0x22d9c70, for file foo.py, line 12, in forever () | |
sleep(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
import time | |
import uuid | |
import random | |
import requests | |
orig_requestid = "f1aa8814-a007-46ad-aede-ae071cacccbe" | |
orig_sessionid = "2019ed24-e518-4a2c-96d2-af660a7bff97" | |
orig_appid = "98DA7DF2-4E3E-4744-9DE6-EC931886ABAB" | |
orig_bootid = "48cfc9fb-e90a-4ace-81aa-2b9eeb928e83" |
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
""" | |
Code to parse sklearn classification_report | |
""" | |
## | |
import sys | |
import collections | |
## | |
def parse_classification_report(clfreport): | |
""" | |
Parse a sklearn classification report into a dict keyed by class name |
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 asyncio | |
loop = asyncio.get_event_loop() | |
async def hello(): | |
await asyncio.sleep(3) | |
print('Hello!') | |
if __name__ == '__main__': | |
loop.run_until_complete(hello()) | |