Skip to content

Instantly share code, notes, and snippets.

@jordic
jordic / arpc.py
Created September 13, 2020 19:55
asgi rpc proto
from functools import partial
from imaplib import Int2AP
from starlette.responses import JSONResponse
from starlette.applications import Starlette
from starlette.routing import Route
import httpx
import json
import pydantic as pd
import random
@curran
curran / README.md
Last active November 9, 2023 10:09
United Nations World Population Prospects 2019
Development Status :: 1 - Planning">Development Status :: 1 - Planning
Development Status :: 2 - Pre-Alpha">Development Status :: 2 - Pre-Alpha
Development Status :: 3 - Alpha">Development Status :: 3 - Alpha
Development Status :: 4 - Beta">Development Status :: 4 - Beta
Development Status :: 5 - Production/Stable">Development Status :: 5 - Production/Stable
Development Status :: 6 - Mature">Development Status :: 6 - Mature
Development Status :: 7 - Inactive">Development Status :: 7 - Inactive
Environment :: Console">Environment :: Console
Environment :: Console :: Curses">Environment :: Console :: Curses
Environment :: Console :: Framebuffer">Environment :: Console :: Framebuffer
python ~/work/e/gprof2dot.py -f pstats exam_output2.dat | dot -Tpng -o exam_output2.png
# -*- coding:utf-8 -*-
import mock
from not_change_work import work
with mock.patch("not_change_source.add") as m:
result = work(1, 2)
print(result)
print(m.called)
# [1, 2]
@atotto
atotto / eg.go
Last active December 11, 2015 07:58
package eg
func foo() string {
return "foo"
}
func Bar() string {
return "Bar"
}