Skip to content

Instantly share code, notes, and snippets.

View xqz-u's full-sized avatar

xqz-u xqz-u

  • Amsterdam
  • 15:29 (UTC +02:00)
View GitHub Profile
@timhughes
timhughes / fastapi_websocket_redis_pubsub.py
Last active April 29, 2024 08:00
FastAPI Websocket Bidirectional Redis PubSub
"""
Usage:
Make sure that redis is running on localhost (or adjust the url)
Install uvicorn or some other asgi server https://asgi.readthedocs.io/en/latest/implementations.html
pip install -u uvicorn
Install dependencies
@korakot
korakot / timezone_date.py
Created April 30, 2019 13:17
Change timezone for `date` in Colab
!rm /etc/localtime
!ln -s /usr/share/zoneinfo/Asia/Bangkok /etc/localtime
!date