Skip to content

Instantly share code, notes, and snippets.

@ledovsky
ledovsky / windows_remapping.md
Last active September 10, 2023 15:02
Windows PowerToys remapping (CAPS to CTRL, HJKL navigaion, Mac compatibility etc)

Windows PowerToys remapping

This is my guide how to remap a Windows keyboard using PowerToys

What is PowerToys

PowerToys is a Microsoft's official utility to customize Windows in different ways. Particulary, it allows to remap your keyboard. All the settings I mention below must be added in the Keyboard manager tab.

Caps-Ctrl remapping

@ledovsky
ledovsky / docker_tips.sh
Created October 24, 2020 09:00
Docker tips
docker ps
docker ps -a
# remove all stopped containers, images and networks
docker system prune
# removes container after stopping
docker run --rm
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ledovsky
ledovsky / jupyter_snippets.py
Last active April 1, 2020 08:29
Jupyter Header
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from IPython.display import set_matplotlib_formats
%matplotlib inline
set_matplotlib_formats('svg')
@ledovsky
ledovsky / install.sh
Created February 7, 2017 16:19
Data science server installation script
mkdir -p ~/anaconda_install
wget https://repo.continuum.io/archive/Anaconda2-4.2.0-Linux-x86_64.sh -O ~/anaconda_install/anaconda.sh
bash ~/anaconda_install/anaconda.sh -b -p $HOME/anaconda2
export PATH="$HOME/anaconda2/bin:$PATH"
echo 'PATH="$HOME/anaconda2/bin:$PATH"' >> ~/.bashrc
conda upgrade -y scikit-learn
apt-get update && apt-get install -y git build-essential g++ && apt-get clean
@ledovsky
ledovsky / mc_shortcuts.txt
Created November 5, 2016 15:51 — forked from sgergely/gist:3793166
Midnight Commander Keyboard Shortcuts for Mac OSX
Meta:
Mac = esc
Linux = alt
----- Meta -----
Quick change directory: Meta + c
Quick change directory history: Meta + c and then Meta + h
Quick change directory previous entry: Meta + c and then Meta + p
Command line history: Meta + h
Command line previous command: Meta + p
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Нормализация признаков\n",
"\n",
"## Задание курса Machine learning - неделя 2 - линейные методы"
]
Function lngLastRow(shtSheet) As Long
'Searching last row with data
Dim MyRange As Range
Set MyRange = shtSheet.Range("A1")
lngLastRow = shtSheet.Cells(65536, MyRange.Column).End(xlUp).Row
End Function
@ledovsky
ledovsky / gist:50cdece546326935f457
Created June 28, 2015 07:50
Convert FLAC to ALAC
for f in *.flac; do ffmpeg -i "$f" -vf "crop=((in_w/2)*2):((in_h/2)*2)" -c:a alac "${f%.flac}.m4a"; done
@ledovsky
ledovsky / unix_best_practices.sh
Last active December 21, 2020 08:47
My linux best practices #pinned
# Add to .bash_profile to get instructions from .bashrc
[[ -r ~/.bashrc ]] && . ~/.bashrc
# Change shell
chsh -s /bin/bash
# ssh tunel
ssh zoo -L 8001:localhost:8001 -N