Questions tagged as 'python'

1
answer

Specific Url in Django

I am rewriting a website using Django. This is a blog and I need the urls to be the same as the old site so that the site does not lose ranking in the search engines. What would be the best way to handle this problem?     
asked by 15.02.2017 / 20:23
1
answer

Anaconda is a type of platform for Python?

Is Anaconda a Python platform / solution type like ActiveState or is it a distribution? I am using the Windows operating system and would like to know if Anaconda is a good choice for data mining!     
asked by 17.11.2016 / 22:30
2
answers

How can I use two methods on the same line in python?

How could I sort the methods of the last two lines of comnetado code, so that it works in this code: # É criada a hash 'pontuações' a qual ira armazenar e ao mesmo tempo linkar os nomes as pontuações pontuações = { } arquivo = open("results.tx...
asked by 22.01.2017 / 21:31
1
answer

Format value in pyhton [closed]

I have a crawler where I get values in this format: "$ 450,000.00." But I need to convert these values to float and save in the database to make queries of this type: Get the values that are between 40,000.00 and 100,000.00.     
asked by 02.01.2017 / 17:16
1
answer

Access Denied when entering value in windows registry by Python

In an attempt to create a function that inserts a value into a windows registry key, I came across an error. I use Windows 8 and Python 3.5. The function is as follows: def inserir1(nome,path): import winreg key=winreg.OpenKey(winreg.H...
asked by 02.01.2017 / 21:59
1
answer

Error "No module named 'pytube'"

When installing a package using PIP, I can not use it. Example: pip install pytube So far so good, download without problems # No IDLE: import pytube Result: Traceback (most recent call last): File "<pyshell#0>", line 1,...
asked by 02.01.2017 / 17:34
2
answers

How to include content from a page .py on another page .py

How do I make a include or open a python page in another, for example in php : include 'content/filename.php'; Load the Html it loads the file .py no, I already tried the command open fp = open('content/header.py') h...
asked by 13.11.2016 / 15:56
1
answer

No module named numpy

porco1 = [1,1,0] porco2 = [1,1,0] porco3 = [1,1,0] cachorro1 = [1,1,1] cachorro2 = [0,1,1] cachorro3 = [0,1,1] dados = [porco1, porco2, porco3, cachorro1, cachorro2, cachorro3] marcacoes = [1, 1, 1, -1, -1, -1] misterioso = [1, 1, 1]...
asked by 28.10.2016 / 04:17
1
answer

Matrix in Python using matplotlib and mplot3d

Hello, The code below has the following error: ValueError: shapes (1,2) and (3,3) not aligned: 2 (dim 1) != 3 (dim 0) Does anyone know a solution? import numpy as np import matplotlib.pyplot as plt from matplotlib import cm from mpl_to...
asked by 12.10.2016 / 18:17
1
answer

Concurrent.futures and Class object

I'm trying to create a class (Processor) that performs a series of functions to get results from a State-to-State API. (STATE) 1- READ DATA FROM A TABLE. 2- SEND request for the API to process. 3- WAIT jobs to be complete. 4- DOWNLOAD the re...
asked by 02.10.2016 / 23:30