Questions tagged as 'python'

1
answer

Write to csv file

I have a function that returns a line and this must be inserted into a CSV file. The line has the following structure when returned by the function: ['x' - 'y', 'z', ['a', 'b', 'c', 'd', 'e', 'f']] . When I try to insert, using the c...
asked by 19.08.2018 / 19:29
0
answers

I can not capture data provided in a lineEdit

Good afternoon everyone! I need to reuse the data from lineEdit's obj and obj1 in another class, but when I try to do this, I get the error: AppCAD 'object has no attribute' coord. Where am I going wrong? import sys import PyQt4.QtCore as qc i...
asked by 21.08.2018 / 20:39
0
answers

Interface to plot points on a graph with matplotlib

Good afternoon guys, I use pyqt4 and python 2.7. How do I create what I described in the title? I'm a beginner, forgive me if my programming or explanation is not the best. Below is the code I have so far class AppCAD(qg.QMainWindow): def...
asked by 21.08.2018 / 19:27
0
answers

PYAUTOGUI functions not working

I am automating the installation of software using python with pyautogui: import pyautogui import time import pyperclip for window in pyautogui.getWindows(): pyautogui.getWindow(window).minimize() ##Abre local do .exe pyautogui.hotkey("w...
asked by 28.08.2018 / 15:50
0
answers

Error string index out of range

Good evening everyone! I'm creating a calculator, but when it comes to finding the object that sent the signal to get the last character of the name to display on the lcd display, I get the above error. What am I missing? import sys from Py...
asked by 14.08.2018 / 23:48
1
answer

Application deploy flask in heroku with flask-sqlalchemy

Good afternoon. I have a small application written in flask and I'm having problems with the database when trying to deploy in heroku and after searching for two days I did not find any solution that would meet me. In summary, this is the...
asked by 22.08.2018 / 20:34
0
answers

Why does my phrase embeddings function define one of the output vectors with 0?

I'm trying to apply the embeddings algorithm in sentences to a dataset , but I only have 0 in a single column of the outputs. This is done in the context of the reproduction of this text understanding tutorial . I have a data set of questions...
asked by 14.08.2018 / 11:02
2
answers

How does the "for" inline command work?

I did a question regarding a Python algorithm, but in resolution of the user Anderson Carlos Woss he used a type of% inline that I had never seen and that left me confused. Here is the code snippet corresponding to for : groups...
asked by 27.09.2017 / 13:54
1
answer

Summarize history

I have the dataset called gd, taken from an xls, an example: DATA_CRIA FROTA 1971 2 1972 19 1973 19 This dataset has several entries with the pattern listed above, I would like to create a dictionary with the valu...
asked by 13.08.2018 / 21:56
0
answers

How to install the matplotlib package in Python 2.7?

I looked at other sites like install matplotlib in Python, but I can not do it at all. I need this module to do some 2D graphics. As an example, I'm trying to use the script: from numpy import * from matplotlib.pyplot import* def main():...
asked by 09.08.2018 / 21:35