Skip to content

Instantly share code, notes, and snippets.

View praba230890's full-sized avatar

Prabakaran Santhanam praba230890

View GitHub Profile
@praba230890
praba230890 / Using Astronomer in WSL Ubuntu using Podman.md
Last active April 24, 2023 13:54
Using Astronomer in WSL Ubuntu using Podman

Go to the Ubuntu latest version in WSL:

sudo apt-get -y update
sudo apt-get -y install podman
curl -sSL install.astronomer.io | sudo bash -s
cd /home/
ls
mkdir astronomer
cd astronomer/
podman machine init
@praba230890
praba230890 / _SessionRequestContextManager.py
Created October 4, 2022 10:06
_SessionRequestContextManager from Async HTTP Framework - Async context manager example
class _SessionRequestContextManager:
__slots__ = ("_coro", "_resp", "_session")
def __init__(
self,
coro: Coroutine["asyncio.Future[Any]", None, ClientResponse],
session: ClientSession,
) -> None:
self._coro = coro
@praba230890
praba230890 / database_error_wrapper.py
Created October 4, 2022 09:58
DatabaseErrorWrapper from Django source code - Example usage of Context Manager
class DatabaseErrorWrapper:
"""
Context manager and decorator that reraises backend-specific database
exceptions using Django's common wrappers.
"""
def __init__(self, wrapper):
"""
wrapper is a database wrapper.
@praba230890
praba230890 / bobp-python.md
Created July 23, 2016 17:05 — forked from sloria/bobp-python.md
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens