Skip to content

Instantly share code, notes, and snippets.

View SanjarbekSaminjonov's full-sized avatar
👋
I may be slow to respond.

Sanjarbek SanjarbekSaminjonov

👋
I may be slow to respond.
View GitHub Profile
@SanjarbekSaminjonov
SanjarbekSaminjonov / resume.md
Last active May 17, 2024 08:51
Sanjarbek's resume

Sanjarbek Saminjonov

Back-End Engineer (Python)

GitHub | LinkedIn | Email | Website

+998911531263 | Fergana, Uzbekistan

I' m a Back-End Engineer 2 year of experience in Back-End development with Python and Django. Graduated Fergana State University.

import math
import time
def is_prime(number: int, prime_numbers: list) -> bool:
if number < 2:
return False
root_of_number = int(math.sqrt(number))
for devider in prime_numbers:
if devider > root_of_number:
@SanjarbekSaminjonov
SanjarbekSaminjonov / createdb-with-locale.sh
Created December 8, 2022 18:07 — forked from khoazany/createdb-with-locale.sh
Create a new PostgreSQL database with UTF8 encoding
#Replace 'symplcms' with the database'name
createdb --template=template0 --locale=en_US.UTF-8 --encoding=UTF8 -U postgres symplcms
@SanjarbekSaminjonov
SanjarbekSaminjonov / main.py
Created January 19, 2023 14:42 — forked from gabbhack/main.py
aiogram i18n example
from pathlib import Path
from typing import Tuple, Any
from aiogram import Bot, Dispatcher, executor, types
from aiogram.contrib.middlewares.i18n import I18nMiddleware
TOKEN = "TOKEN"
I18N_DOMAIN = "mybot"
BASE_DIR = Path(__file__).parent
@SanjarbekSaminjonov
SanjarbekSaminjonov / upload-to-google-drive.py
Created May 3, 2024 11:40 — forked from prasathmani/upload-to-google-drive.py
upload files to google drive using python
import requests, json
# Get refresh token from google drive api
# Generating a refresh token for DRIVE API calls using the OAuth playground
# https://www.youtube.com/watch?v=hfWe1gPCnzc
def getToken():
oauth = 'https://www.googleapis.com/oauth2/v4/token' # Google API oauth url
headers = {'content-type': 'application/x-www-form-urlencoded'}
data = {
'grant_type': 'refresh_token',