Skip to content

Instantly share code, notes, and snippets.

View INF800's full-sized avatar
🍁
For truth we seek infinite and beyond.

Asapanna Rakesh INF800

🍁
For truth we seek infinite and beyond.
View GitHub Profile
@INF800
INF800 / multipro_template.py
Created March 9, 2022 19:13 — forked from blaylockbk/multipro_template.py
Template for Python multiprocessing and multithreading
import multiprocessing #:)
def do_this(number):
print number
return number*2
# Create a list to iterate over.
# (Note: Multiprocessing only accepts one item at a time)
some_list = range(0,10)
@INF800
INF800 / fastapi_websocket_redis_pubsub.py
Created January 19, 2022 17:40 — forked from timhughes/fastapi_websocket_redis_pubsub.py
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
@INF800
INF800 / uninstall_python3.MD
Created October 9, 2021 22:31 — forked from zhensongren/uninstall_python3.MD
How to uninstall python3 from Ubuntu

To list all python versions in default locations

ls /usr/bin/python*

To remove just python3 package

sudo apt-get remove python3.5

plus it's dependent packages

sudo apt-get remove --auto-remove python3.5

plus configuration and/or data files of python3

sudo apt-get purge python3.5