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
| {"name":"nvim_min","settings":"{\"settings\":\"{\\n \\\"extensions.experimental.affinity\\\": {\\n \\\"asvetliakov.vscode-neovim\\\": 1\\n },\\n \\\"editor.fontFamily\\\": \\\"JetBrainsMono Nerd Font\\\",\\n \\\"terminal.integrated.fontFamily\\\": \\\"JetBrainsMono Nerd Font, Kalpurush, monospace\\\",\\n \\\"editor.lineNumbers\\\": \\\"relative\\\",\\n \\\"workbench.colorTheme\\\": \\\"Aura Dark\\\",\\n \\\"workbench.iconTheme\\\": \\\"catppuccin-mocha\\\",\\n \\\"cursor.cpp.enablePartialAccepts\\\": true,\\n \\\"editor.fontLigatures\\\": true,\\n \\\"editor.wordWrap\\\": \\\"on\\\",\\n \\\"editor.wordWrapColumn\\\": 120,\\n \\\"git.autofetch\\\": true,\\n \\\"notebook.formatOnSave.enabled\\\": true,\\n \\\"ruff.nativeServer\\\": \\\"on\\\",\\n \\\"ruff.lineLength\\\": 160,\\n \\\"[python]\\\": {\\n \\\"editor.defaultFormatter\\\": \\\"charliermarsh.ruff\\\",\\n \\\"editor.formatOnSave\\\": true,\\n \\\"editor.formatOnType\\\": true\\ |
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
| // Place your key bindings in this file to override the defaults | |
| [ | |
| // navigation | |
| { | |
| "command": "workbench.action.togglePanel", | |
| "key": "cmd-j", | |
| "when": "vim.mode == 'Normal'" | |
| }, | |
| { | |
| "command": "workbench.action.createTerminalEditor", |
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
| # ------------------ node ------------------ | |
| # https://nodejs.org/en/download | |
| # Download and install nvm: | |
| curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.2/install.sh | bash | |
| # in lieu of restarting the shell | |
| \. "$HOME/.nvm/nvm.sh" | |
| # Download and install Node.js: |
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
| # pip install udocker | |
| udocker pull vllm/vllm-openai:latest | |
| udocker create --name=vllm vllm/vllm-openai:latest | |
| udocker setup --nvidia --force vllm | |
| udocker run \ | |
| --volume="/${PWD}:/workspace" \ |
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
| # pip install udocker | |
| udocker pull lmsysorg/sglang:latest | |
| udocker create --name=sglang lmsysorg/sglang:latest | |
| udocker setup --nvidia sglang | |
| udocker run \ | |
| --volume="/${PWD}:/workspace" \ |
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 wandb | |
| from tqdm import tqdm | |
| WANDB_PROJECT = "project" | |
| TEST_CHANGES = True # Run once before changing | |
| api = wandb.Api() | |
| runs = [run for run in api.runs(WANDB_PROJECT)] | |
| print(f"{len(runs)} runs found") |
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
| from zipfile import ZipFile | |
| import os | |
| EXCLUDE = ['./wandb', './.history', './data', './__pycache__', './results', './models', | |
| './logs', './config.json', './saved_configs', './saved_models', './.ipynb_checkpoints'] | |
| INCLUDE = ['.py', '.sh'] | |
| def create(filename): | |
| not_excluded = lambda root: not any(root.startswith(path) for path in EXCLUDE) |
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
| # Ugly Code | |
| def set(var, val): | |
| if var not in mp: | |
| return False | |
| mp[var] = val | |
| return True | |
| if set(count, 1): | |
| pass |
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
| def check_password(username, password): | |
| user = user_model.find_by_username(username) | |
| if user.password != password: | |
| user.increase_wrong_attempt() # Side Effect | |
| return False | |
| return True |
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
| def one_argument(*args): | |
| pass | |
| def two_arguemnts(name, *args): | |
| pass | |
| def three_arguments(name, count, *args): | |
| pass |
NewerOlder