SYNC

(★ 14)

Strategic SYNthesis of Cognitive Networks

File Explorer

  • LICENSE
  • README.md

# Use via CDN

jsDelivr

jsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.

Command Glossary

Commands referenced in this DOCs, explained below.

🔍

black

View Details ▼

Format Python code automatically.
See also: `ruff`.

black {{path/to/file_or_directory}}

Auto-format a file or entire directory:

black {{[-c|--code]}} "{{code}}"

Format the code passed in as a string:

black --check {{path/to/file_or_directory}}

Show whether a file or a directory would have changes made to them if they were to be formatted:

🔍

docker stats

View Details ▼

This command is an alias of `docker container stats`.

tldr docker container stats

View documentation for the original command:

🔍

docker system

View Details ▼

Manage Docker data and display system-wide information.

docker system df

Show Docker disk usage:

docker system df {{[-v|--verbose]}}

Show detailed information on disk usage:

docker system prune

Remove unused data (append `--volumes` to remove unused volumes as well):

🔍

docker tag

View Details ▼

This command is an alias of `docker image tag`.

tldr docker image tag

View documentation for the original command:

🔍

done

View Details ▼

This shell keyword is used with `for`, `while`, `select`, and `until` to mark the end of a loop.

tldr for

View documentation for the `for` keyword:

tldr while

View documentation for the `while` keyword:

tldr select

View documentation for the `select` keyword:

🔍

flake8

View Details ▼

Check the style and quality of Python code.

flake8 {{path/to/file_or_directory}}

Lint a file or directory recursively:

flake8 --show-source {{path/to/file_or_directory}}

Lint a file or directory recursively and show the line on which each error occurred:

flake8 --ignore {{rule1,rule2,...}} {{path/to/file_or_directory}}

Lint a file or directory recursively and ignore a list of rules. (All available rules can be found at <https://www.flake8rules.com/>):

🔍

git checkout

View Details ▼

Checkout a branch or paths to the working tree.

git checkout -b {{branch_name}}

Create and switch to a new branch:

git checkout -b {{branch_name}} {{reference}}

Create and switch to a new branch based on a specific reference (branch, remote/branch, tag are examples of valid references):

git checkout {{branch_name}}

Switch to an existing local branch:

🔍

git clone

View Details ▼

Clone an existing repository.

git clone {{remote_repository_location}} {{path/to/directory}}

Clone an existing repository into a new directory (the default directory is the repository name):

git clone --recursive {{remote_repository_location}}

Clone an existing repository and its submodules:

git clone {{[-n|--no-checkout]}} {{remote_repository_location}}

Clone only the `.git` directory of an existing repository:

🔍

mypy

View Details ▼

Type check Python code.

mypy {{path/to/file.py}}

Type check a specific file:

mypy {{[-m|--module]}} {{module_name}}

Type check a specific module:

mypy {{[-p|--package]}} {{package_name}}

Type check a specific package:

🔍

nano

View Details ▼

Text editor. An enhanced `pico` clone.
See also: `pico`, `rnano`.

nano {{path/to/file1 path/to/file2 ...}}

Open specific files, moving to the next file after closing the previous one:

nano {{[-I|--ignorercfiles]}}

Start the editor without using configuration files:

nano +{{line}},{{column}} {{path/to/file}}

Open a file and position the cursor at a specific line and column:

🔍

pip install

View Details ▼

Install Python packages.

pip install {{package1 package2 ...}}

Install one or more packages:

pip install {{package1 package2 ...}} {{[-U|--upgrade]}}

Upgrade all specified packages to the latest version, installing any that are not already present:

pip install {{package}}=={{version}}

Install a specific version of a package:

🔍

pre-commit

View Details ▼

Create Git hooks that run before commits.

pre-commit install

Install pre-commit into your Git hooks:

pre-commit run

Run pre-commit hooks on all staged files:

pre-commit run --all-files

Run pre-commit hooks on all files, staged or unstaged:

🔍

pylint

View Details ▼

A Python code linter.

pylint {{path/to/file.py}}

Show lint errors in a file:

pylint {{package_or_module}}

Lint a package or module (must be importable; no `.py` suffix):

pylint {{path/to/directory}}

Lint a package from a directory path (must contain an `__init__.py` file):

🔍

pytest

View Details ▼

Run Python tests.

pytest {{path/to/test_file1.py path/to/test_file2.py ...}}

Run tests from specific files:

pytest -k {{expression}}

Run tests with names matching a specific [k]eyword expression:

pytest {{[-x|--exitfirst]}}

Exit as soon as a test fails or encounters an error:

🔍

python

View Details ▼

Python language interpreter.

python

Start a REPL (interactive shell):

python {{path/to/file.py}}

Execute a specific Python file:

python -i {{path/to/file.py}}

Execute a specific Python file and start a REPL:

🔍

uvicorn

View Details ▼

Python ASGI HTTP Server, for asynchronous projects.

uvicorn {{import.path:app_object}}

Run Python web app:

uvicorn --host {{localhost}} --port {{8080}} {{import.path:app_object}}

Listen on port 8080 on localhost:

uvicorn --reload {{import.path:app_object}}

Turn on live reload:

🔍

apt-get

View Details ▼

Debian and Ubuntu package management utility.
Search for packages using `apt-cache`.
It is recommended to use `apt` when used interactively in Ubuntu versions 16.04 and later.

sudo apt-get update

Update the list of available packages and versions (it's recommended to run this before other `apt-get` commands):

sudo apt-get install {{package}}

Install a package, or update it to the latest available version:

sudo apt-get remove {{package}}

Remove a package:

🔍

systemctl start

View Details ▼

Start systemd units.

systemctl start {{unit}}

Start a unit:

systemctl start {{unit}} --user

Start a user unit:

// repository documentation