Skip to content

Instantly share code, notes, and snippets.

View roblevy's full-sized avatar

Rob Levy roblevy

View GitHub Profile
@roblevy
roblevy / async-and-sync.py
Created October 26, 2019 17:20
An awaitable _and_ callable function
""" See https://stackoverflow.com/questions/58564687/test-if-coroutine-was-awaited-or-not/58567980#58567980 """
import asyncio
import pytest
from functools import wraps
class Wrapper:
def __init__(self, _func, *args, **kwargs):
self._conn = None
self._func = _func
country year consumption pdi_not_used income inflation
Australia 1960 6753.28951 7396.794428 9198.327932 1
Australia 1961 6780.7636 7474.129974 9116.087602 1.005527219
Australia 1962 7057.795291 7772.312359 9565.575047 1.010674571
Australia 1963 7368.253626 8313.009697 10324.62399 1.016534202
Australia 1964 7559.988893 8510.96831 10778.41713 1.034120183
Australia 1965 7635.899321 8437.589985 10671.14875 1.032366769
Australia 1966 7864.726181 8917.518573 11206.81103 1.030374162
Australia 1967 8154.376044 8817.564702 11337.69167 1.035934585
Australia 1968 8424.462879 9402.773708 12165.04556 1.03494574
@roblevy
roblevy / .block
Last active July 20, 2017 09:20
BBC pay ranked by gender
border: no
license: gpl-3.0
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.