In iTerm2, in the menu bar go to Scripts > Manage > New Python Script
Select Basic. Select Long-Running Daemon
Give the script a decent name (I chose auto_dark_mode.py)
Save and open the script in your editor of choice.
The latest beta (3.5) includes separate color settings for light & dark mode. Toggling dark mode automatically switches colors.
Vist iTerm 2 homepage to download the beta. Thanks @stefanwascoding.
switch_automatic.py to ~/Library/ApplicationSupport/iTerm2/Scripts/AutoLaunch with:| # vim:ft=zsh ts=2 sw=2 sts=2 | |
| # | |
| # agnoster's Theme - https://gist.github.com/3712874 | |
| # A Powerline-inspired theme for ZSH | |
| # | |
| # # README | |
| # | |
| # In order for this theme to render correctly, you will need a | |
| # [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts). | |
| # Make sure you have a recent version: the code points that Powerline |
| #### | |
| #### pyenv-virtualenv bash prompt customization | |
| #### | |
| # pyenv | |
| eval "$(pyenv init -)" | |
| # pyenv-virtualenv: |
| import torch | |
| import triton | |
| import triton.language as tl | |
| def unpack_weights(packed: torch.Tensor, bits: int = 2) -> torch.Tensor: | |
| values_per_item = 8 // bits | |
| packed_shape = packed.shape | |
| if len(packed_shape) == 1: |
| import torch | |
| import triton | |
| import triton.language as tl | |
| def unpack_weights(packed: torch.Tensor, bits: int = 2) -> torch.Tensor: | |
| values_per_item = 8 // bits | |
| packed_shape = packed.shape | |
| if len(packed_shape) == 1: |