Skip to content

Instantly share code, notes, and snippets.

View ktaranov's full-sized avatar
🎯
Focusing

Konstantin Taranov ktaranov

🎯
Focusing
View GitHub Profile
@ktaranov
ktaranov / extract_all_links_from_web_page.js
Last active March 17, 2025 07:49
[extract_all_links_from_web_pag] Quickly extract all links from a web page using the browser console to html table
@ktaranov
ktaranov / .gitconfig
Created January 27, 2021 10:50 — forked from Xitsa/.gitconfig
Интеграция git и fzf
[alias]
xdiff = "!f() { \
git diff "$@" $(git ls-files --modified --exclude-standard | fzf -m); \
}; f"
xadd = "!f() { \
git add "$@" $(git ls-files --modified --others --exclude-standard | fzf -m); \
}; f"
# Пакет работы с Excel файлами
library("openxlsx")
library("logging")
library("RODBC")
suppressPackageStartupMessages(library("data.table"))
loggerName <- "ge_dcast"
file_name <- "GE обр НТ_v06.xlsx"
@ktaranov
ktaranov / Find_Top_Exec_Plans_to_Optimize.sql
Created September 21, 2020 19:21 — forked from EitanBlumin/Find_Top_Exec_Plans_to_Optimize.sql
T-SQL script to find cached execution plans with good potential for performance optimization (warnings, missing indexes, bad operators, etc.)
/*
=======================================================
Find Top Exec Plans to Optimize
=======================================================
Author: Eitan Blumin | eitanblumin.com , madeiradata.com
Date: 2020-08-12
Description:
Use this script to discover execution plans with a good
potential for performance optimization.
Finds execution plans with warnings and problematic operators.
DECLARE @t TABLE (
id int NOT NULL
, c nvarchar(1000) NULL
);
INSERT INTO @t(id, c)
SELECT 1 AS id, 'Это русский язык' AS c
UNION ALL
SELECT 2, 'This is not Russian Language'
UNION ALL
print @@version
USE tempdb;
GO
SET ANSI_NULLS ON;
GO
SET QUOTED_IDENTIFIER ON;
GO
CREATE OR ALTER FUNCTION dbo.TryParseAFID (@stringAFID nvarchar(MAX))
@ktaranov
ktaranov / pandas_crossjoin_example.py
Created February 12, 2020 15:01 — forked from internaut/pandas_crossjoin_example.py
Shows how to do a cross join (i.e. cartesian product) between two pandas DataFrames using an example on calculating the distances between origin and destination cities. See https://mkonrad.net/2016/04/16/cross-join--cartesian-product-between-pandas-dataframes.html
"""
Shows how to do a cross join (i.e. cartesian product) between two pandas DataFrames using an example on
calculating the distances between origin and destination cities.
Tested with pandas 0.17.1 and 0.18 on Python 3.4 and Python 3.5
Best run this with Spyder (see https://github.com/spyder-ide/spyder)
Author: Markus Konrad <[email protected]>
April 2016
/* Note: don't run this all at once. There are prompts to run some queries in another session, etc. */
WHILE @@trancount > 0
ROLLBACK
GO
USE master;
GO
IF DB_ID('lockingtest') IS NOT NULL