sudo apt update && sudo apt upgrade| Better way to create alias/shortcut in python package than `from .module import *` | |
| ## purpose | |
| When a module is loaded with `from .module import ...` and if `module` is placed within some nested directory structure, python tends to load all hierarchy of modules upstream, even when user only need this single module. This hinders if different modules in the package is supposed to operate independently, and significantly increase the loading time. In addition, adding alias and shortcut in `__init__.py` requires careful management to avoid circular import. | |
| The script dynamically load the module upon request, and the request happens at the file-level such that it does not load the entire modules in parent trees. | |
| ## import order | |
| - pre-defined dictionary | |
| - regular import | |
| - ImportError |
| #!/usr/bin/env bash | |
| declare -A compilers | |
| # compilers[gcc]="/home/linuxbrew/.linuxbrew/opt/gcc@8/bin/g++-8" | |
| compilers[gcc10]=g++-10 | |
| # compilers[gcc11]=g++-11 | |
| # compilers[clang]=clang++-8 | |
| declare -A cmake_build_types | |
| # cmake_build_types[debug]="Debug" |
| #!/usr/bin/env bash | |
| declare -A compilers | |
| compilers[gcc]=/opt/homebrew/opt/gcc/bin/g++-12 | |
| compilers[clang]=/opt/homebrew/opt/llvm/bin/clang++ | |
| declare -A cmake_build_types | |
| cmake_build_types[debug]="Debug" | |
| # cmake_build_types[release]="Release" | |
| # cmake_build_types[relwithdebuginfo]="RelWithDebInfo" |
| name: Use Python Poetry cache on GitHub Actions workflow | |
| on: | |
| push: | |
| branches: | |
| - main | |
| env: | |
| PYTHON_VERSION: "3.11" | |
| POETRY_VERSION: "1.4.2" |
| #!/bin/bash | |
| function prompt_for_multiselect { | |
| # little helpers for terminal print control and key input | |
| GREEN='\033[00;32m' | |
| YELLOW='\033[00;33m' | |
| RESTORE='\033[0m' | |
| ESC=$( printf "\033") | |
| cursor_blink_on() { printf "$ESC[?25h"; } |
| # Purge the reflog of anything farther back than 180 days, specifying --all, otherwise unreachable 'dangling' objects will be missed, | |
| # optional --expire-unreachable flag could differ on when to expire unreachables | |
| git reflog expire --all --expire=180.days.ago --expire-unreachable=180.days.ago --all | |
| # other examples for expire | |
| --expire=now | |
| --expire=never | |
| --expire="Jan 01 2019" | |
| --expire="2019-01-01 00:00" |
In this quick walkthough you'll learn how to create a separate branch in your repo to house your screenshots and demo gifs for use in your master's readme.
In order to prevent any loss of work it is best to clone the repo in a separate location to complete this task.
Create a new branch in your repo by using git checkout --orphan assets
๊ธ์ด์ด: ๊น์ ์ฃผ(haje01@gmail.com)
์ด ๋ฌธ์๋ ํ ์ํ๋ก์ฐ ๊ณต์ ํ์ด์ง ๋ด์ฉ์ ๋ฐํ์ผ๋ก ๋ง๋ค์ด์ก์ต๋๋ค.
ํ ์ํ๋ก์ฐ(TensorFlow)๋ ๊ธฐ๊ณ ํ์ต๊ณผ ๋ฅ๋ฌ๋์ ์ํด ๊ตฌ๊ธ์์ ๋ง๋ ์คํ์์ค ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ ๋๋ค. ๋ฐ์ดํฐ ํ๋ก์ฐ ๊ทธ๋ํ(Data Flow Graph) ๋ฐฉ์์ ์ฌ์ฉํ์์ต๋๋ค.
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
Please note we have a code of conduct, please follow it in all your interactions with the project.
- Ensure any install or build dependencies are removed before the end of the layer when doing a