Skip to content

Instantly share code, notes, and snippets.

View bayborodin's full-sized avatar
🏠
Looking for a remote job as a Python developer

Nicholas Bayborodin bayborodin

🏠
Looking for a remote job as a Python developer
  • SKAT
  • Khabarovsk, Russia
View GitHub Profile
@bayborodin
bayborodin / neovim_configure.md
Last active February 12, 2022 14:40
Neovim confiruration

Adding an alias: in .zshrc use alias vim="nvim"

Check the version: nvim -v

Configuration file: ~/.config/nvim/init.vim

Installing the Vim-Plug plugin manager:

sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.config/nvim/share}"/site/autoload/plug.vim --create-dirs \
 https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
@bayborodin
bayborodin / setup.cfg
Created October 1, 2021 05:36
isort config for Django style guide
[isort]
default_section = THIRDPARTY
known_first_party = skat-api
known_django = django
sections = FUTURE,STDLIB,THIRDPARTY,DJANGO,FIRSTPARTY,LOCALFOLDER
from __future__ import annotations
import datetime as dt
import decimal
from functools import reduce
class Calculator:
"""Basic functionality for registering records
@bayborodin
bayborodin / ubuntu_server_configure.md
Last active April 27, 2021 11:59
Ubuntu Server Configure

Ubuntu Server Configure

Step1 - Logging in as root

To log into your server, you will need to know your server’s public IP address. You will also need the password or — if you installed an SSH key for authentication — the private key for the root user’s account.

ssh root@your_server_ip

Accept the warning about host authenticity if it appears. If you are using password authentication, provide your root password to log in. If you are using an SSH key that is passphrase protected, you may be prompted to enter the passphrase the first time you use the key each session. If this is your first time logging into the server with a password, you may also be prompted to change the root password.

Step 2 — Creating a New User

Once you are logged in as root, we’re prepared to add the new user account. In the future, we’ll log in with this new account instead of root.

@bayborodin
bayborodin / docker-compose.yml
Created April 5, 2021 12:42
Apache Airflow Docker Compose
version: '3'
volumes:
postgres_data:
x-airflow-common:
&airflow-common
image: apache/airflow:2.0.1
environment:
- AIRFLOW__CORE__EXECUTOR=LocalExecutor
@bayborodin
bayborodin / poetry-project.md
Last active February 20, 2021 12:44
Create a new Poetry project

Create a new Poetry project

Open up a terminal and enter the below command.

poetry new app

After running the above command a new directory called app has been created. Let's go ahead and cd into that directory now.

cd app
@bayborodin
bayborodin / action.yml
Created December 13, 2020 09:30
Integrate CodeClimate with GitHub Actions
- name: Codeclimate test coverage
run: |
export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}"
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter format-coverage -t coverage.py coverage.xml
./cc-test-reporter upload-coverage -r "${{ secrets.CC_TEST_REPORTER_ID }}"
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
from top.api.base import RestApi
class AliexpressAppraiseRedefiningQuerysellerevaluationorderlistRequest(RestApi):
def __init__(self,domain='gw.api.taobao.com',port=80):
RestApi.__init__(self,domain, port)
self.query_d_t_o = None
def getapiname(self):
return 'aliexpress.appraise.redefining.querysellerevaluationorderlist'
@bayborodin
bayborodin / app.rkt
Created June 2, 2020 07:26
Racket STDIN/STDOUT example
#lang racket
(define (sum-of-two-integers a b)
(+ a b))
(let ([a (read)]
[b (read)])
(printf "~a~%" (sum-of-two-integers a b)))