Skip to content

Instantly share code, notes, and snippets.

View Sadbot's full-sized avatar
🐍
python

Sem Sadbot

🐍
python
View GitHub Profile
@Sadbot
Sadbot / poetry_private_repos
Created March 14, 2022 11:03
How to fix python poetry "Unable to find installation candidates"
https://github.com/python-poetry/poetry/issues/3456#issuecomment-743732386
Edit pyproject.toml
[[tool.poetry.source]]
name = "myprivate_pypi"
url = "https://pypi.myprivate_pypi.com/simple/"
At terminal, add poetry config credentials for private_pypi
poetry config http-basic.myprivate_pypi <username> <password>
Update lock with --no-update
@Sadbot
Sadbot / async.py
Created August 2, 2021 10:01 — forked from konpatp/async.py
Python turn sync functions to async (and async to sync)
import functools
def force_async(fn):
'''
turns a sync function to async function using threads
'''
from concurrent.futures import ThreadPoolExecutor
import asyncio
pool = ThreadPoolExecutor()
This article will help you to install Python 3.5.6 on Ubuntu and Linuxmint operating system. To know more about this version visit Python official website.
Step 1 – Prerequsites
You must have fulfilled all the prerequisites for installing Python on Ubuntu and Linuxmint. Use the following command to install all the prerequisites. After that go for the Python installation on Ubuntu.
sudo apt-get install build-essential checkinstall
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
Step 2 – Download Python 3.5
Download Python source code archive from its official download website. You can also download Python 3.5 version using the following commands.
Add to end of file *.ovpn
script-security 2
up /etc/openvpn/scripts/update-systemd-resolved
down /etc/openvpn/scripts/update-systemd-resolved
down-pre
and add /etc/openvpn/scripts/update-systemd-resolved file with script and chmod +x:
# Git alias
alias gs='git status'
alias ga='git add'
alias gb='git branch'
alias gc='git commit'
alias gd='git diff'
alias gco='git checkout'
alias gp='git pull'
alias gps='git push'
alias gm='git merge'
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
default-character-set=utf8
default-collation=utf8_general_ci
character-set-server=utf8
collation-server=utf8_general_ci
init-connect='SET NAMES utf8'