Arquivo original: https://stackoverflow.com/questions/20518632/importerror-numpy-core-multiarray-failed-to-import Erro de instalação pacote numpy. Corrigir com:
pip install numpy --upgrade --ignore-installed
# code from: https://stackoverflow.com/a/77080460/6085378 | |
from datetime import datetime, timedelta | |
from cryptography import x509 | |
from cryptography.hazmat.primitives import hashes | |
from cryptography.hazmat.primitives.asymmetric import rsa | |
from cryptography.hazmat.primitives.serialization import ( | |
BestAvailableEncryption, | |
PrivateFormat, |
# comand from: https://askubuntu.com/questions/1267534/trying-to-upgrade-from-18-04-to-20-04-your-python3-install-is-corrupted | |
sudo ln -fs /usr/bin/python3.6 /usr/bin/python3 |
Arquivo original: https://stackoverflow.com/questions/20518632/importerror-numpy-core-multiarray-failed-to-import Erro de instalação pacote numpy. Corrigir com:
pip install numpy --upgrade --ignore-installed
Instalar as libs separadamente (python 3.8)
pip install --no-binary lxml lxml==4.6.3
pip install --no-binary xmlsec xmlsec
Instalar as libs separadamente (python 3.10)
pip install --no-binary lxml==4.6.3 lxml==4.6.3 --force-reinstall
pip install --no-binary xmlsec==1.3.13 xmlsec==1.3.13
Note
Highlights information that users should take into account, even when skimming.
Tip
Optional information to help a user be more successful.
Important
Crucial information necessary for users to succeed.
[!WARNING]
def soma(a, b): | |
# ignora apenas a linha abaixo | |
soma = a + b # fmt: skip | |
return soma | |
# ignora todo o bloco de codigo a abaixo | |
# fmt: off | |
def subtracao(a, b): | |
sub = a - b | |
return sub |
Arquivo de configuração alternativo do postgresql. Sobressai sobre o /etc/postgresql/12/main/postgres.conf
sudo nvim /var/lib/postgresql/14/main/postgresql.auto.conf
from ansible import playbook, callbacks | |
# uncomment the following to enable silent running on the playbook call | |
# this monkey-patches the display method on the callbacks module | |
# callbacks.display = lambda *a,**ka: None | |
# the meat of the meal. run a playbook on a path with a hosts file and ssh key | |
def run_playbook(playbook_path, hosts_path, key_file): | |
stats = callbacks.AggregateStats() | |
playbook_cb = callbacks.PlaybookCallbacks(verbose=0) |
# Makefile for python code | |
# | |
# > make help | |
# | |
# The following commands can be used. | |
# | |
# init: sets up environment and installs requirements | |
# install: Installs development requirments | |
# format: Formats the code with autopep8 | |
# lint: Runs flake8 on src, exit if critical rules are broken |