Skip to content

Instantly share code, notes, and snippets.

View leezu's full-sized avatar

Leonard Lausen leezu

View GitHub Profile
$ 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)
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"
@leezu
leezu / sklearn_classif_report_to_latex.py
Created August 11, 2017 08:12 — forked from julienr/sklearn_classif_report_to_latex.py
Parse and convert scikit-learn classification_report to latex
"""
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
import asyncio
loop = asyncio.get_event_loop()
async def hello():
await asyncio.sleep(3)
print('Hello!')
if __name__ == '__main__':
loop.run_until_complete(hello())