I hereby claim:
- I am aapris on github.
- I am aapris (https://keybase.io/aapris) on keybase.
- I have a public key whose fingerprint is A35E 3622 48AD 67F6 6BEB FE71 7C58 6186 743C 17BF
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
# Pretty print your Foursquare history | |
# remember to "pip install requests ics" into you virtualenv | |
import sys | |
import requests | |
from ics import Calendar | |
ics_data = requests.get(sys.argv[1]).text | |
cal = Calendar(ics_data) | |
for e in cal.events: | |
print("{} | {}".format(e.begin.format('YYYY-MM-DD HH:mm:ss ZZ'), e.name.lstrip('@ '))) |
""" | |
Sometimes you need to pass forward HttpRequest, which is not directly serializable. | |
serialize_django_request() takes Django HttpRequest as an argument, extracts | |
HttpRequest.headers (available since Django 2.2), HttpRequest.body and most interesting | |
values out from HttpRequest.META and returns them in a dict which is json, msgpack etc. | |
serializable. | |
""" | |
from django.http.request import HttpRequest |
I hereby claim:
To claim this, I am signing this object: