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
# Backup environment to file | |
conda env export --channel $ENV_NAME --file "$FILE_PATH.yaml" | |
# Clone conda env | |
conda create --name myclone --clone root |
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
# Install Poetry 1.2 | |
mamba install -c "conda-forge/label/cleo_dev" cleo | |
mamba install -c "conda-forge/label/poetry_dev" poetry=1.2 |
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
# Clear cache | |
poetry cache clear _default_cache --all | |
poetry cache clear pypi --all |
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
# Get current speed | |
defaults read -g com.apple.mouse.scaling | |
# Set speed (maximum of 7.0) | |
defaults write -g com.apple.mouse.scaling 5.0 |
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
# Get value on variable in .env file | |
cat .env | grep $VAR_NAME | sed 's/.*=//' |
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
class SuppressExceptionsDecorator: | |
"""Decorator for temporarily suppressing specified exceptions. | |
Exception suppression is limited to the function execution. | |
Example: | |
```python | |
import warnings | |
@SuppressErrorsDecorator(MyException) | |
def foo(): |
OlderNewer