Skip to content

Instantly share code, notes, and snippets.

View santoshpy's full-sized avatar
🐍
Focusing

Santosh Purbey santoshpy

🐍
Focusing
View GitHub Profile
@santoshpy
santoshpy / celery.conf
Last active June 26, 2020 15:26
Celery worker and scheduler in the background as a daemon with Supervisor.
; install supervisor > sudo apt-get install supervisor
; adding configuration files to the “/etc/supervisor/conf.d/” directory on the remote server
; ==========================
; celery worker supervisor
; ==========================
; the name of your supervisord program
[program:{{appname}}_celery]
@santoshpy
santoshpy / .pylintrc
Created September 2, 2020 06:51
pylintrc config file
[MASTER]
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code.
extension-pkg-whitelist=
# Add files or directories to the blacklist. They should be base names, not
# paths.
ignore=CVS
@santoshpy
santoshpy / .dockerignore
Created January 16, 2021 18:58 — forked from jefftriplett/.dockerignore
How I use Docker and Compose
.*
!.coveragerc
!.env
!.pylintrc
@santoshpy
santoshpy / async_download_images.py
Created June 5, 2021 16:13
Python3 Download Image Asynchronously From List of URLs.
"""
To Download Image Asynchronously From List of URLs
"""
import asyncio
from pathlib import Path
import aiofiles
from aiohttp import ClientSession
"""
Django ORM Optimization Tips
Caveats:
* Only use optimizations that obfuscate the code if you need to.
* Not all of these tips are hard and fast rules.
* Use your judgement to determine what improvements are appropriate for your code.
"""
# ---------------------------------------------------------------------------

Pyenv Important Commands

1. To list available python version

pyenv install -list

2. To install specific version of python