Skip to content

Instantly share code, notes, and snippets.

View ShilGen's full-sized avatar

Shilov Gennady ShilGen

View GitHub Profile
@ShilGen
ShilGen / Fast_API_deploy.md
Last active June 14, 2024 14:38
how to deploy fast-api on ubuntu 22.04 for real project? (step-by-step tutorial)

Deploy a FastAPI app on Ubuntu 22.04 VPS

Ubuntu Nginx Gunicorn Python FastAPI

Deploying a FastAPI application on Ubuntu 22.04 for a real project involves several steps, including setting up the server, installing necessary software, configuring the application, and setting up a reverse proxy. Here's a step-by-step tutorial

def get_wb_url(nm):
vol = nm // 100000
part = nm // 1000
if (vol >= 0 and vol <= 143) :
host = "//basket-01.wb.ru"
if vol >= 144 and vol <= 287:
host = "//basket-02.wb.ru"
if vol >= 288 and vol <= 431:
host = "//basket-03.wb.ru"
if vol >= 432 and vol <= 719:

Обновление репозитариев

apt-get update

Проверка версии Python

python3 --version
@ShilGen
ShilGen / SG_Git_mini_course.md
Created November 22, 2023 19:43
Мини-курс: Работа Git

Мини-курс: Работа Git

Программа курса:

  1. Основы. Git в pet-проекте
  2. Повседневные инструменты
  3. Ветки.

1. Основы. Git в pet-проекте

Начните с использования Git для личных нужд. Пока не думайте ни про какие ветки, делайте все в main.

@ShilGen
ShilGen / MOXA_NPort_Ubuntu.md
Last active October 4, 2023 06:04
Алгоритм настройки связи Модем - MOXA NPort 5250A - сервер Ubuntu 20.04

Алгоритм настройки связи Модем - MOXA NPort 5250A - сервер Ubuntu 20.04

1520864-67

1) установка зависимостей

sudo apt install libssl-dev
sudo apt install gcc
sudo apt install make
sudo apt install minicom
public static class Helper
{
public static string getMonthName ( DateTime dt ) {
string[] m = new string[]{
"Январь",
"Февраль",
"Март",
"Апрель",
"Май",
@ShilGen
ShilGen / .vimrc
Last active November 5, 2023 19:20
Моя шпаргалка по Vim
set number
set foldmethod=manual
set viminfo='1000,f1
set showcmd
set incsearch
set hlsearch
set ruler
set showmatch
set cursorline
@ShilGen
ShilGen / JS_Fetch_GET_example.html
Last active September 21, 2023 16:26
JS Fetch GET example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>FETCH JS</title>
</head>
<body>
<h1>Authors</h1>
<ul id="authors"></ul>
@ShilGen
ShilGen / csv.cs
Created June 19, 2023 09:40
C# | Как создать csv файл
using System;
using System.IO;
using System.Text;
public class Script
{
public static object Execute()
{
using (var sw = new StreamWriter(@"C:\Users\shilgen\Documents\1.csv", false, Encoding.UTF8))
{