Skip to content

Instantly share code, notes, and snippets.

View AABur's full-sized avatar

Alexander Burchenko AABur

  • Dubai
  • 09:28 (UTC +04:00)
  • X @AABur
View GitHub Profile
COLOR_RED = '\033[31m'
COLOR_PURPLE = '\033[35m'
COLOR_RESET = '\033[m'
ADDED_STR = 'Property \033[35m{0}\033[m was \033[31madded\033[m with value: \033[35m{1}\033[m'
REMOVED_STR = 'Property \033[35m{0}\033[m was \033[31mremoved\033[m'
UPDATED_STR = 'Property \033[35m{0}\033[m was \033[31mupdated\033[m. From \033[35m{1}\033[m to \033[35m{2}\033[m'
# ADDED_STR = 'Property {0} was added with value: {1}'
# REMOVED_STR = 'Property {0} was removed'

Как протокол языкового сервера влияет на будущее IDE

img1

Visual Studio Code водиночку так сильно повлиял на экосистему разработчиков, что возврата назад уже не будет. Это бесплатный инструмент с открытым исходным кодом и, что самое главное, супермощный инструмент.

Но, благодаря VSCode, Microsoft еще в 2016 году дала жизнь еще одной суперзначимой вещи, которая менее известна. Он называется Language Server Protocol - Протокол языкового сервера.

Что такое Протокол языкового сервера?

@AABur
AABur / python_environment_setup.md
Created March 20, 2021 16:17 — forked from wronk/python_environment_setup.md
Setting up your python development environment (with pyenv, virtualenv, and virtualenvwrapper)

Overview of Python Virtual Environments

This guide is targetted at intermediate or expert users who want low-level control over their Python environments.

When you're working on multiple coding projects, you might want a couple different version of Python and/or modules installed. This helps keep each workflow in its own sandbox instead of trying to juggle multiple projects (each with different dependencies) on your system's version of Python. The guide here covers one way to handle multiple Python versions and Python environments on your own (i.e., without a package manager like conda). See the Using the workflow section to view the end result.


h/t @sharkinsspatial for linking me to the perfect cartoon

@AABur
AABur / gist:f403e2049633b5c030c2817b371008d4
Created March 25, 2021 18:48 — forked from digitaljhelms/gist:4287848
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch

Conventinal Commit Messages

See how a minor change to your commit message style can make a difference. Examples

Have a look at CLI util git-conventional-commits to ensure this conventions and generate changelogs

Commit Formats

Default

# coding: utf-8
import lxml.html
from .abstract import get_strategy
import pytest
@pytest.fixture
def standard_selectors():
return {
# coding: utf-8
import lxml.html
from .abstract import get_strategy
import pytest
class TestTags:
@pytest.mark.parametrize('start_urls_url, actual_url',
@AABur
AABur / naming.md
Last active October 23, 2022 13:33

Практичная структура для именования классов, функций и переменных

Перевод статьи A Useful Framework for Naming Your Classes, Functions, and Variables

Автор оригинала XOR

"В компьютерном программировании соглашение об именах — набор правил для выбора последовательности символов, которая будет использоваться для идентификаторов, которые обозначают переменные, типы, функции и другие объекты в исходном коде и документации." - Википедия

# FIXME: ward/_collect.py:61:1: C901 'get_info_for_modules' is too complex (15)
def get_info_for_modules(
paths: List[Path], exclude: Tuple[Glob]
) -> List[pkgutil.ModuleInfo]:
logger.info("Start get_info_for_modules")
paths = _remove_excluded_paths(set(paths), exclude)
module_infos = []
# Handle case where path points directly to modules
@AABur
AABur / gist:cc66eec6dd9ec9dc0d70b58b9ed2f3f7
Last active May 31, 2021 12:06
How to add poetry to an existing project
https://github.com/python-poetry/poetry/issues/46#issuecomment-450329494
% poetry init
% poetry add `cat requirements.txt`