This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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. |