Questions tagged as 'python'

0
answers

ModuleNotFoundError: No module named 'psr'

I have started to make a library for my application, in Python 3.6, however I get the following Module error not found, I have checked carefully and I have done several tests, until now several modules I import them correctly, until with the fil...
asked by 30.03.2018 / 01:06
0
answers

Limit the entries in the models.ForeignKey ()

Is it possible to limit the entries in models.ForeignKey () to an exact amount? I have a model called a Card that belongs to a Profile, I want each profile to have a maximum of 2 cards. class Tarjeta(models.Model): perfil = models.OneTo...
asked by 22.03.2018 / 16:47
0
answers

Change the limit of x on a seaborn graph

I'm having problems changing the x limit of a large dispersion chart. g = sns.distplot(df['growth_rate']) I would like to see the distribution of the following graph, in the range of x = (-10 to 10) Thank you very much     
asked by 22.03.2018 / 18:01
0
answers

how to run a Python script from Wordpress

Hello everyone and thanks in advance. I'm pretty new to Python and for now I'm just taking my first steps doing web scrappers and networking tools. The problem: I have a web scrapper that works wonders from the Idle. Now, I have to use it fro...
asked by 21.03.2018 / 14:21
1
answer

unpack requires a byte object of length 17665190

I am trying to read the data from a .wav file for an audio visualization however I get the following error. Here I leave my code I hope you can help me import matplotlib matplotlib.use('Agg') from matplotlib import pylab import matplo...
asked by 29.03.2018 / 01:31
0
answers

matplotlib barplot does not draw the complete x axis

I create a barplot with matplotlib, which has two groups of data, and the x-axis is drawn only under the sets of bars drawn, and not along the entire figure. Initially, a figure with 6 subplots is declared, and then, within a for loop, they a...
asked by 29.03.2018 / 08:08
0
answers

Binary search, get index

What I want is to get the index of the first value> = 8 by binary search. EJ: [5,10,18,19] the result would be the index of element 10. I tried the following but it returns the empty list def terceraParte(lista,i,j,punto): if j == i+1:...
asked by 28.03.2018 / 15:41
0
answers

python error list index out of range

I am generating a project in python an audio visualizer, without embark I find an error when running the program. This is the error: This is the code: import wave import struct import sys import numpy as np from math import sqrt im...
asked by 28.03.2018 / 16:21
1
answer

Filter data already read

I have the following code. read = fiona.open(r"\pre\data\PLANTA\URBANA.shp") for feat in read: corPoligono = feat['geometry']['coordinates'] poligonoType = feat['geometry']['type'] idCapaOrigen = feat['id'] Thes...
asked by 20.03.2018 / 11:06
1
answer

Interface in python terminal?

Dear users of the community, I would like to know if in Windows using Python 3.x it is possible to create and / or execute a program from the terminal as it would usually be done in systems like Linux. I leave an image as an example. I also...
asked by 16.03.2018 / 17:58