Questions tagged as 'python-3.x'

0
answers

Absurd performance difference between pygame.surfarray.array3d and array2d

Using pygame.surfarray to handle an image as an array, manipulating any element in a array3d is more than 5 times slower than manipulating a array2d element. / p> See this benchmark: from datetime import * import pygam...
asked by 27.09.2018 / 01:06
0
answers

Circular Graph for correlation analysis in Python [closed]

Good afternoon: I'm a beginner in the python language. I would like to know where I can find study material to generate pie charts for correlation analysis in python similar to the one below (in R language). I looked in the documentation for...
asked by 26.12.2018 / 16:15
0
answers

How to insert weights in a string Python 3 [closed]

Example: I have 20 students with above-average grades being that for mathematics the weight for the approval is 3. And in the human sciences the weight is 2. I looked for some tutorials and did not find anything that is compatible to build...
asked by 21.09.2018 / 17:05
0
answers

How to make dynamic charts in Python 3?

I'm making a program for the Raspberry Pi that reads temperature sensors and stores those readings in a buffer. I need to make a dynamic graph that shows the current temperature / time relationship. I tried doing this using the matplotlib librar...
asked by 08.10.2018 / 16:26
0
answers

Error running setup.py in Pycharm

Hello, every time I try to run a setup.py file I find the following error: usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py...
asked by 03.09.2018 / 16:26
1
answer

Photo Gallery sorted in Python

Good morning I'm developing a gallery of images listing them from a directory. What I need to do is separate these images or sort them in order of creation. I have a script that generates the images as follows. pessoa_ID_N.jpg where ID is t...
asked by 22.08.2018 / 14:22
0
answers

Error: "sqlite3.OperationalError: no such table"

I have the following error:    sqlite3.OperationalError: no such table: product I already checked in my database, the product table is there Code: from tkinter import * from tkinter import ttk import sqlite3 root = Tk() root.geome...
asked by 09.08.2018 / 02:38
2
answers

Python python - How to check if a "tuple" of elements of two Series is contained in a set?

I have a "set" of "tuples" as follows set = {(2, 3), (2, 4), (5, 5)} My DataFrame looks like this: df = pd.DataFrame( {'one': [1,2,4,1], 'two' : [5,3,2,2]}) I want to check if in each line the "tuple" formed by the elements of the two se...
asked by 15.07.2018 / 01:57
0
answers

How to subtract two great vectors?

I want to calculate the vector difference between two large vectors. I am able to subtract a list of arrays to an array and put it to the power of 2 (train["quest_emb"][0] - train["sent_emb"][0])**2 but do not generalize it with a column of...
asked by 16.08.2018 / 17:59
0
answers

How do I check a login with sqlite3 + Python3?

from tkinter import * from tkinter import messagebox from random import randint import os import sqlite3 from tkinter import ttk con = sqlite3.connect('BancoDeDadosCadastro.db') cur = con.cursor() cur.execute('CREATE TABLE IF NOT EXISTS BancoDe...
asked by 17.08.2018 / 16:31