pydeps: Python module dependency visualization
# Draw a graph for <package> with max depth of 3 and cluster expernal deps. Produces an .svg file
pydeps <my-package>
--noshow \
--max-bacon 3 \
--cluster \| # Download postman (instead of the snap from the Ubuntu Software Store) | |
| wget https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz | |
| sudo tar -xzf postman.tar.gz -C /opt | |
| rm postman.tar.gz | |
| sudo ln -s /opt/Postman/Postman /usr/bin/postman | |
| # Create a desktop entry | |
| cat > ~/.local/share/applications/postman.desktop <<EOL | |
| [Desktop Entry] | |
| Encoding=UTF-8 |
pydeps: Python module dependency visualization
# Draw a graph for <package> with max depth of 3 and cluster expernal deps. Produces an .svg file
pydeps <my-package>
--noshow \
--max-bacon 3 \
--cluster \| CUDA_REPO_PKG=cuda-repo-ubuntu1804_10.2.89-1_amd64.deb | |
| CUDA_URL=http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 | |
| wget -O /tmp/${CUDA_REPO_PKG} ${CUDA_URL}/${CUDA_REPO_PKG} | |
| sudo dpkg -i /tmp/${CUDA_REPO_PKG} | |
| sudo apt-key adv --fetch-keys ${CUDA_URL}/7fa2af80.pub | |
| rm -f /tmp/${CUDA_REPO_PKG} |
| import time | |
| from functools import wraps | |
| from typing import List | |
| from typing import Union | |
| import numpy as np | |
| import psutil | |
| from sklearn import preprocessing | |
| { | |
| // https://www.schemecolor.com/dysfunctional.php | |
| "workbench.colorCustomizations": { | |
| // activity bar | |
| "activityBar.background": "#CE3C63", | |
| "activityBar.inactiveForeground": "#c5c4c4", | |
| "activityBar.activeBackground": "#FBE9B7", | |
| "activityBar.activeBorder": "#04B9B0", | |
| // badge | |
| "activityBarBadge.background": "#04B9B0", |
| # From https://gist.github.com/rbf/195acdfe8f51b65e5ecd | |
| # Forked from https://gist.github.com/jasonlong/5395357 | |
| # // Copy this to your keybindings (Preferences > Key Bindings - User) | |
| # // Change the keybinding, color schemes, and themes to your preferences | |
| # | |
| # { | |
| # "keys": ["ctrl+shift+s"], "command": "toggle_color_scheme", | |
| # "args": { | |
| # "light_color_scheme": "Packages/User/Soda Light - Espresso.tmTheme", |
| class A: | |
| """This is an example of wrong functions default parameters: | |
| This should actually be: | |
| def __init__(self, l=None): | |
| if l is None: | |
| self.l = [] | |
| """ | |
| def __init__(self, l=[]): | |
| self.l = l |
| # Join multiple lines without new line | |
| value: > | |
| part 1 | |
| part 2 | |
| # Join with newline | |
| value2: | | |
| line 1 | |
| line 2 |
| import sys | |
| import os | |
| from loguru import logger | |
| from tqdm.auto import tqdm | |
| from functools import partialmethod | |
| class TqdmStream(object): | |
| @classmethod |
| { | |
| // Use IntelliSense to learn about possible attributes. | |
| // Hover to view descriptions of existing attributes. | |
| // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "name": "Python: Current File", | |
| "type": "python", | |
| "request": "launch", |