Using VSCode with pipenv

I found out how to use pipenv environment with VS Code from the article “Visual Studio Code, Python and pipenv”. Thanks, Benjamin Pack! I saved the text for myself. First, find out where pipenv has created your virtualenv setup and stashed the python executable you are using. From the command line in your project folder (where your Pipfile is), execute the following: pipenv --py This will give you the full path to your virtualenv python install....

March 15, 2021

Django REST API with React App step-by-step

I use PyCharm for python projects and pipenv for package management. Start new PyCharm project named django-rest-react-blog Optionally git init clone gist .gitignore for Django and React projects Main course pipenv install django pipenv install djangorestframework pipenv install ipython --dev django-admin.py startproject bookcase cd bookcase python manage.py startapp mainapp Edit bookcase/settings.py: ... INSTALLED_APPS = [ ... 'rest_framework' ] ... TEMPLATES = [ { ... 'DIRS': [BASE_DIR / 'mainapp-ui/build'], ... }, ] ....

February 27, 2021

Facial recognition with Python

I tried the facial recognition library for Python ageitgey/face_recognition. This library uses dlib, a toolkit written in C++ that contains machine learning algorithms. For example, I’m trying to check if an actor is playing in the TV series “The Big Bang Theory”. A test image with an actor is compared to real actors filmed in a TV show. I wrote a web service that uses python face_recognition library for face recognition from image and compares the recognized face with the data stored in the database....

January 18, 2021

Watchdog for folder changes with golang

I recently wrote a Python script to log changes in the selected folder. The script has a GUI based on Tkinter, the native Python library. I decide to rewrite this script in the Golang. I only need one executable file that doesn’t require Python installation. Before that, I made an executable file using pyinstaller. But why not try Golang? Apart from Tkinter, I only know a little about the GTK. I used it for a new version of the program written in Golang with a GUI....

September 5, 2020

Management of multiple versions of Python with pyenv

Pyenv pyenv lets you easily install and switch between multiple versions of Python. Install and customization zsh The main issues are described in wiki curl https://pyenv.run | bash echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.zshrc exec $SHELL sudo apt-get update; sudo apt-get install --no-install-recommends make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev Update pyenv...

August 30, 2020

Сохранение паролей в Windows Credentials Locker из Python

Ставим keyring pip install keyring Выполняем import keyring keyring.set_password("system", "username", "password") Результат Доступ к данным keyring.get_password("system", "username") 'password'

April 8, 2020