This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:: ======================================== | |
:: Small script to automate load developer environment on Windows | |
:: Open it from cmd. it will change directory, load virtual environment and open your IDE automatically. | |
:: Launch it and it will list folders in "YOUR_PROJECTS_FOLDER" | |
:: Then enter a folder you wish to open. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:: ======================================== | |
:: Easy way to make migrations on Django project | |
:: Replace YOUR_APP_NAME on line 13 with your actual Django app name | |
:: Made for fun by Rudolf Nemov | |
:: https://github.com/antibagr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from functools import wraps | |
from typing import Callable, Awaitable, Any, Union | |
from aiogram import types | |
# sends to user when handler raises exception | |
ERROR_MESSAGE = "No, I'm dying. Please tell BotFather I love him ..." | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
from datetime import datetime | |
import pytest | |
from fastapi import FastAPI | |
from starlette.testclient import TestClient | |
from pydantic import BaseModel | |
class CustomDatetime(BaseModel): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import annotations | |
from typing import Any, Callable, Type | |
from dataclasses import dataclass | |
class A: | |
pass | |
@dataclass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import asyncio | |
import threading | |
async def coro(name: str) -> str: | |
await asyncio.sleep(0.001) | |
print(f'[Coroutine] Called with {name=}') | |
return name |