Skip to content

Instantly share code, notes, and snippets.

View eSkry's full-sized avatar
🍪

Artur Leonov (Depish) eSkry

🍪
View GitHub Profile
@eSkry
eSkry / config.nu
Created July 21, 2025 07:56
nushell python virtual environment activation (python venv)
# add this code to your ~/.config/nushell/config.nu file
# usage:
# activate_pyvenv .venv - for activate python virtual environment in .venv folder
# deactivate_pyvenv - deactivating py venv
# pyenv_check - show current activated python venv
export def --env activate_pyvenv [a_venv_path: path] {
let venv_path = $a_venv_path | path expand
let bin_path = $venv_path | path join "bin"
@eSkry
eSkry / gist:b30ae1fa4d5ae7e05145d1f4747f03ca
Last active July 21, 2025 08:01
Изменил бенчмарк плюсов на более похожий вариант как это было сделано в Си и ржавом
// benchmark.cpp
// g++ benchmark.cpp -o benchmark_cpp
// clang++ benchmark.cpp -o benchmark_cpp
// /usr/bin/time -f "Total execution time: %E" ./benchmark_cpp
#include <iostream> // For input/output operations
#include <vector> // For dynamic array (vector)
#include <memory> // For smart pointers (unique_ptr)
#include <cstdint> // For int64_t type
#include <array> // For fixed-size array
@eSkry
eSkry / CompileUI.py
Last active June 11, 2023 12:44
Сборка .ui файлов в файл Python
import os
import sys
import subprocess
BUILD_SCRIPT_FOLDER = os.path.dirname(os.path.abspath(__file__))
UI_FOLDER = os.path.join(BUILD_SCRIPT_FOLDER, "depishgui")
UI_FILE = os.path.join(BUILD_SCRIPT_FOLDER, "depishgui/UI.py")
if __name__ == "__main__":
with open(UI_FILE, 'w') as f:
@eSkry
eSkry / migrate_repo.sh
Created October 10, 2019 14:12 — forked from mariozig/migrate_repo.sh
Migrate repo from GitLab to GitHub Full blog post @ http://ruby.zigzo.com/2015/03/23/moving-from-gitlab-to-github/
# Assume we are in your home directory
cd ~/
# Clone the repo from GitLab using the `--mirror` option
$ git clone --mirror [email protected]:mario/my-repo.git
# Change into newly created repo directory
$ cd ~/my-repo.git
# Push to GitHub using the `--mirror` option. The `--no-verify` option skips any hooks.