Questions tagged as 'python'

0
answers

Updating the obsolete Pandas package pd.ewma () to pd.Dataframe.ewm ()

I had a code that averaged exponentially from the pandas pd.ewma () method --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipyth...
asked by 14.12.2018 / 15:04
0
answers

TypeError: list indices must be integers or slices, not list. Can you help me?

Here's the code import numpy from pandas import DataFrame, Series countries = ['Russian Fed', 'Norway', 'Canada', 'United States', 'Netherlands', 'Germany', 'Switzerland', 'Belarus', 'Austria', 'France', '...
asked by 01.05.2018 / 21:08
1
answer

How to insert data by default in Python-Flask avoiding duplication?

When you work with Flask in debug mode, Werzeug runs a child thread of your application which will receive the changes you make to the source code and update them live. You can disable this option of the son thread but what you read is not re...
asked by 15.04.2018 / 06:37
1
answer

Record (write) PGM image file in P2 format (ASCII)

Is there a python command -opencv to write in PGM P2 (Ascii) format ?.  By default, python-opencv records it in binary (P5)     
asked by 07.04.2018 / 23:24
1
answer

The bars do not start at the desired x value

Hello, sorry, I'm new to Matplotlib and I have a problem. I have 2 queries to Mysql and I get 2 lists of data to graph with bars. The problem is that the second bar (red) should start at point 06 of the x axis and start at 01 with the other bar...
asked by 29.03.2018 / 02:39
1
answer

Runtine error when using multiprocessing in Windows: freeze_suport ()

This is the code of an audio player (.wav), which uses Matplotlib to graph the spectrum, which I have been modifying: import matplotlib import pyaudio import wave import sys import numpy as np import multiprocessing duration = 12.5 filename...
asked by 29.03.2018 / 02:47
0
answers

Limit of queries in google API

I'm conducting distance queries using the google API for r in cursorConsulta: googleGeocodeUrl = 'https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=' punto = str(r[1])+','+str(r[0]) id = r[2]...
asked by 10.04.2018 / 13:46
2
answers

python to oracle connection

Someone will know how to make the python to oracle connection and try to do it with    import cx_Oracle but I got the following error    cx_Oracle.DatabaseError: DPI-1047: 32-bit Oracle Client library can not   be loaded: "The specifie...
asked by 27.03.2018 / 02:14
1
answer

Problem with threads in python.

I'm having some problems finishing some threads. My program has a function runthreads (): def runThreads(): """ Creates and runs threads. """ t1 = threading.Thread(target=netstatCapture, name='netstatCapture') t2 = thre...
asked by 18.03.2018 / 18:39
1
answer

WinError 10053 in script with Python and PyTS3

I have made a small script with Python and the PyTS3 module to mutate from my client automatically to all users connected to a TeamSpeak3 server that has not been added to my friends list. It connects to the client through an add-on called Cl...
asked by 13.03.2018 / 16:04