Skip to content

Instantly share code, notes, and snippets.

View rozeappletree's full-sized avatar
🐊
Dedicated to the fool & the foolish.

Rakesh Asapanna rozeappletree

🐊
Dedicated to the fool & the foolish.
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rozeappletree
rozeappletree / index.html
Created November 14, 2025 22:12
Wavy Lines / Canvas 2D version
<a-waves>
<canvas class="js-canvas"></canvas>
</a-waves><!-- .a-waves -->x
@rozeappletree
rozeappletree / index.html
Created February 14, 2025 08:04
you can scroll.
<header>
<h1 class="fluid">you deserve<br />more.</h1>
</header>
<main>
<section class="content fluid">
<h2><span aria-hidden="true">you can&nbsp;</span>
<span class="sr-only">you can ship things.</span>
</h2>
<ul aria-hidden="true" style="--count: 22">
<li style="--i: 0">optimize.</li>
@rozeappletree
rozeappletree / 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)
@rozeappletree
rozeappletree / 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
@rozeappletree
rozeappletree / 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

1WBllCh7h5NjY09cvDby-amOO2FN0HbOA
@rozeappletree
rozeappletree / cpu_bound_vs_io_bound.py
Last active September 12, 2021 23:33
multiprocessing vs multithreading for cpu-bound and io-bound tasks
# source: https://www.geeksforgeeks.org/difference-between-multithreading-vs-multiprocessing-in-python/
import time, os
from threading import Thread, current_thread
from multiprocessing import Process, current_process
COUNT = 200000000
SLEEP = 10
def io_bound(sec):