Skip to content

Instantly share code, notes, and snippets.

View bormando's full-sized avatar

Dmitrii Bormotov bormando

View GitHub Profile
@bormando
bormando / tsconfig.json
Created November 13, 2022 17:45
Basic TypeScript config file
{
"compilerOptions": {
"baseUrl": "./",
"module": "CommonJS",
"target": "ESNext",
"sourceMap": false,
"moduleResolution": "node",
"allowJs": true,
"skipLibCheck": true,
"resolveJsonModule": true,
@bormando
bormando / csvcreator.py
Created June 16, 2021 17:48
Simple script on Python that creates CSV file using data from console input
import csv
import uuid
languages = input("Languages: ").split(",")
with open('languages.csv', 'w', newline='') as csvfile:
filewriter = csv.writer(csvfile, quotechar=',', quoting=csv.QUOTE_MINIMAL)
lines = [['#', "ID"]]
for i in range(len(languages)):
lines.append([i, uuid.uuid4().hex])
@bormando
bormando / pytest_telegram.py
Last active March 7, 2021 18:45
Telegram integration with Pytest
import pytest
from pytest import ExitCode
import telebot
def pytest_sessionfinish(session, exitstatus):
if exitstatus is ExitCode.TESTS_FAILED:
failed_tests = []
for item in session.items:
if item.rep_call.failed:
@bormando
bormando / seletools_drag_and_drop.py
Created March 3, 2021 13:32
Selenium Tools usage example (Python package)
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.common.by import By
from seletools.actions import drag_and_drop
browser = webdriver.Chrome(ChromeDriverManager().install())
browser.implicitly_wait(10)
browser.get("http://the-internet.herokuapp.com/drag_and_drop")
source = browser.find_element(By.CSS_SELECTOR, "#column-a")
@bormando
bormando / .babelrc
Created January 12, 2021 07:24
Babel config
{
"presets": ["@babel/preset-env"],
"plugins": [
["@babel/transform-runtime"]
]
}