This file contains 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
# Клонируем исходный репозиторий без рабочего каталога (--bare) | |
git clone --bare https://github.com/exampleuser/old-repository.git | |
cd old-repository.git | |
# Делаем mirror-push(будут скопированы все ветки и тэги) в новый репозиторий | |
git push --mirror https://github.com/exampleuser/new-repository.git | |
cd .. | |
# Удаляем папку с репозиторием |
This file contains 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
def limit(num, minimum=1, maximum=255): | |
"""Limits input 'num' between minimum and maximum values. | |
Default minimum value is 1 and maximum value is 255.""" | |
return max(min(num, maximum), minimum) |