Questions tagged as 'python'

2
answers

No module named 'urls' in Django

I'm studying about URL splitting in Django and I can not get my main url file to target. Tracking: Traceback (most recent call last): File "C:\PASTAD~1\MOOC\lib\site-packages\django\utils\autoreload.py", line 228, in wrapper fn(*args,...
asked by 01.10.2017 / 05:07
1
answer

Django - Problems saving objects with ID of type UUID in admin

I work on a Python with Django Framework project and recently decided to change the generation of the integer to UUID IDs for merge (we have data that comes from different bases and needs to be aggregated on a central basis). All of our ent...
asked by 11.10.2017 / 16:16
1
answer

Error to use np.concatenate

I'm doing a mergesort using the numpy library. It turned out that it was giving error. in the line "np.concatenate (result, left [i:])" there in merge function. The error is this: /sorts/main.py", line 30, in merge np.concatenate(resultado,esq...
asked by 10.10.2017 / 23:31
2
answers

How to add multiple dictionaries using the pickle to save in txt

I have the problem when saving a file using the pickle module, every time I run the program it rewrites the existing dictionary. I already tried to use shelve to replace it but I did not get an exite. Below is part of the algorithm for better...
asked by 07.11.2017 / 06:07
1
answer

How to mount an array in python with undefined value of i and j

I'm a beginner in python and I'm doubtful about array assembly. In the case, I did the following: import numpy as np n=3 A = np.zeros((n*n,n*n)) j= 2 i = 2 k = i+n*(j-1) a = -4 L1 = i-1+n*(j-1) a1 = 1 L2 = i+1+n*(j-1) a2 = 1 L3 = k-n a3 = 1 L4...
asked by 08.11.2017 / 03:50
1
answer

Multiprocessor execution

I'm researching about parallel execution in Python and I was left with a question that I have not found a clear answer yet. Let's say I want to multiply two arrays and add in a task list where each task is a row of array A and a column of arr...
asked by 03.11.2017 / 13:52
1
answer

Error installing pyaudio and pocketsphinx

When I type sudo pip install pyaudio this error message appears, I already researched google but can not find a solution:    Command "/usr/bin/python3.6 -u -c" import setuptools,   tokenize; file = '/ tmp / pip-build-eeidouwx / pyaud...
asked by 25.09.2017 / 17:08
1
answer

Even or odd through random module (Python)

Recently I started learning programming language with python, I created a classic "game" to learn with random.randint for the user to try to guess the number chosen by the machine. I tried to do the same but this time to guess if the computer...
asked by 20.10.2017 / 20:28
1
answer

Template Inheritance is not working

I'm trying to create blocks inside my base template (index.html), but apparently the block is not used. index.html {% load static %} <!DOCTYPE html> <html lang="pt-br"> <head> <title>Portfolio's</title>...
asked by 24.09.2017 / 19:26
2
answers

python vector input

I have some input values of an array that will have the input of the following form: 1 2 3 4 2 3 4 0 So I'm trying to get the first row of m + n elements to turn everything into float, but it's not working. aux = [0]*(m+n) for i in r...
asked by 22.09.2017 / 20:53