Questions tagged as 'python-3.x'

1
answer

Error trying to encrypt with BCRYPT in Python

Code: import bcrypt hashed = bcrypt.hashpw('teste',bcrypt.gensalt()) error:    TypeError: Unicode-objects must be encoded before hashing When running the program, you have this error, how can I solve it?     
asked by 15.05.2018 / 21:15
1
answer

For Python, what is the difference between pip x conda x anaconda

I'm learning python and saw that tutorials always appear for the tools: pip conda anaconda And I was in doubt what the practical difference between them?     
asked by 01.05.2018 / 17:52
1
answer

Error every time I do a Requests Flask

When I make a request from an Api to show the number of players in my template where "For in range (200)" it returns the data and not the error. <table class="cor"> <tr class="fundo"> <th>T...
asked by 01.05.2018 / 22:40
1
answer

python - Print, by line, the letter and nickname method append ()

Based on the following list: escritores = [['Pedro', 'Tamen'], ['Almeida', 'Garrett'], ['Camilo', 'Pessanha'], ['Almada', 'Negreiros'], ['Ibn', 'Bassam'], ['Antonio', 'Aleixo'], ['Ricardo', 'Reis'], ['Mario', 'Sá-Carneiro'], ['Mario', 'Cesarin...
asked by 03.05.2018 / 11:44
1
answer

Pandas: How to make a Serial fragment in the field (Column) of the DataFrame

I have this excel below: NÚMERO "URL NÚMERO 16571 SICAN" "URL DECRETOS 2011 PRINCIPAL" 1 CCIVIL_03/Atos/decretos/1991/D00001.html CCIVIL_03/decreto/1990-1994/D0001.htm 4 CCIVIL_03/Atos/decretos/1889/D00004.html CCIVIL_03/dec...
asked by 10.06.2018 / 21:09
1
answer

Transfer list to binary file in python

Good morning programmers. I need to put a list in a binary file but it is displaying an error. lista = [-1, 333.0, -1, 333.0, 10, 8.0, 45, -66.5999984741211, 12, -44.70000076293945] Code: open("saida.bin", "wb") as arq1: for x in lis...
asked by 28.04.2018 / 13:36
1
answer

Iterating web pages using Requests and Python

I am a beginner in web scraping. How to learn how to make a database from data on selling new cars on some websites. One of the sites eh esse url = https://www.seminovosunidas.com.br/veiculos/page:1?utm_source=afilio&utm_medium=display&...
asked by 19.05.2018 / 07:32
1
answer

How to encrypt password with Python

I need to encrypt password using Python, from what I saw in PHP examples, they use a "module" that encrypts the password and that in theory does not to decrypt, to validate the password they encrypt the password that the user typed and compares...
asked by 04.05.2018 / 20:20
1
answer

Error in requests with aiohttp in asyncio

import time import urllib.request import asyncio import aiohttp URL = 'https://api.github.com/events' MAX_CLIENTS = 10 def fetch_sync(pid): print('Fetch sync process {} started'.format(pid)) start = time.time() response = urllib.re...
asked by 12.04.2018 / 07:19
1
answer

Create file without knowing directory? Python

It is known that it is possible to create a new file through Python through file_create = open(r'C:\Diretório\Diretório...\FileName', 'w') . However, it is necessary to indicate where this file will be created on the computer. If we wan...
asked by 09.04.2018 / 19:41