Skip to content

Instantly share code, notes, and snippets.

View backendbuilderdev's full-sized avatar
🎯
Focusing

Sandeep Pal backendbuilderdev

🎯
Focusing
View GitHub Profile
{
"mcpServers": {
"weather": {
"command": "uv",
"args": [
"--directory",
"C:\\Users\\YourSYS\\OneDrive\\Desktop\\weather",
"run",
"weather.py"
]
@backendbuilderdev
backendbuilderdev / install.sh
Created January 18, 2023 16:35 — forked from kodekracker/install.sh
A shell script to install all required applications and dependencies required to setup working environment after fresh install ubuntu .
#!/usr/bin/env bash
# System wide Constants
# Ubuntu Code Name Ex:- trusty for Ubuntu 14.04
CODE_NAME=$(lsb_release -cs)
## Install basic libraries required for ubuntu environment
sudo apt-get install libcurl4-openssl-dev libssl-dev -y
sudo apt-get install zsh -y
sudo apt-get install python-software-properties -y
@meysam81
meysam81 / patch_database.py
Created April 22, 2021 07:31
Sample application using FastAPI & SQLAlchemy
import pytest
import uvicorn
from faker import Faker
from fastapi import FastAPI, HTTPException
from fastapi.testclient import TestClient
from pydantic import BaseModel
from sqlalchemy import Column, Integer, String, create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
@rg3915
rg3915 / django_orm_optimization_cheat_sheet.py
Last active August 26, 2023 15:51 — forked from levidyrek/django_orm_optimization_cheat_sheet.py
Django ORM optimization cheat sheet
"""
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.
"""
# ---------------------------------------------------------------------------
DEFAULT_FILE_STORAGE = 'backend.custom_azure.AzureMediaStorage'
STATICFILES_STORAGE = 'backend.custom_azure.AzureStaticStorage'
STATIC_LOCATION = "static"
MEDIA_LOCATION = "media"
AZURE_ACCOUNT_NAME = "djangoaccountstorage"
AZURE_CUSTOM_DOMAIN = f'{AZURE_ACCOUNT_NAME}.blob.core.windows.net'
STATIC_URL = f'https://{AZURE_CUSTOM_DOMAIN}/{STATIC_LOCATION}/'
MEDIA_URL = f'https://{AZURE_CUSTOM_DOMAIN}/{MEDIA_LOCATION}/'