Skip to content

Instantly share code, notes, and snippets.

View asjadsyed's full-sized avatar
🧑‍💻

Asjad Syed asjadsyed

🧑‍💻
View GitHub Profile
@achimnol
achimnol / example.py
Created October 28, 2017 06:45
async getitem with futures
import asyncio
class MyAsyncDict:
async def async_getitem(self, fut, key):
try:
await asyncio.sleep(0.5)
raise RuntimeError('oops')
except Exception as e:
@myusuf3
myusuf3 / uninstall.sh
Created April 21, 2011 03:06
how to cleanly uninstall python packages installed with python setup.py
# Next time you need to install something with python setup.py -- which should be never but things happen.
python setup.py install --record files.txt
# This will cause all the installed files to be printed to that directory.
# Then when you want to uninstall it simply run; be careful with the 'sudo'
cat files.txt | xargs sudo rm -rf