Skip to content

Instantly share code, notes, and snippets.

View felixpk's full-sized avatar
🐍
developing

Felix felixpk

🐍
developing
View GitHub Profile
@felixpk
felixpk / README.md
Last active January 15, 2020 10:53
Open VS code with nautilus context menu

Add 'Open with VSCode' in Nautilus Context Menu

  • install nautilus-python sudo apt install nautilus-python
  • create directory mkdir -p ~/.local/share/nautilus-python/extensions
  • add open-vscode.py to the extensions path
  • force nautilus to restart nautilus -q
  • right click anywhere in the nautilus window to open CWD in VSCode
import multiprocessing as mp
from concurrent import futures
from concurrent.futures import ProcessPoolExecutor
def foo(doc):
pass
with ProcessPoolExecutor(max_workers=4, mp_context=mp.get_context('spawn')) as executor:
tasks = [executor.submit(foo, doc) for doc in all_docs]

Building Python 3.7.2 from source

  1. Install the required build-tools (some might already be installed on your system).

    sudo apt-get update -y
    sudo apt-get install build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libffi-dev -y