Questions tagged as 'python'

2
answers

What's the difference between the MVC architecture and Django's MTV?

I would like to know if there is any difference in practice between these two architectures.     
asked by 17.10.2017 / 18:59
1
answer

Reuse function variables

I have a script in Python divided into functions and need to access a variable from a function in another example function: import glob, os, time, datetime, sys, platform from datetime import datetime from datetime import timedelta os.chdir...
asked by 30.07.2018 / 16:42
0
answers

Interface hangs while running while using from kivy.app

I'm studying image processing using Python. I made an interface with Kivy.app , but it is crashing when it runs while . I'm using the code below to fill an array with "0" or "1", making the image binarized . Any tips on how to...
asked by 31.07.2018 / 14:54
1
answer

Group Data by Month / Year

import numpy as np import pandas as pd BASE_GERAL = pd.read_csv('base_prestadores.csv') indice | data_utilização| preço | quantidade_itens 1 | 2014-05-01 | 20.00 | 5 2 | 2014-05-08 | 30.00 | 6 3 | 2014-04-10...
asked by 26.07.2018 / 20:57
1
answer

Adafruit_BMP in python 3

I'm testing the BMP180 sensor on RaspberryPi 3 B + and when I run the file on Raspbian it gives me this error: WhenIrunthesamefilethroughthecommandlineitgivesthevaluesitshouldgive,itdoesnotgiveanerror,ascanbeseenfromthefollowingimage: W...
asked by 26.07.2018 / 11:31
3
answers

How to make flask run the launch of Python 3 instead of Python2.7?

I tried to launch a Flask app, which you can find on GitHub . Surprised it starts with Python2.7 now, while it launched with Python3 before. It did not work very badly. I do not know what the reason is. (MyFlaskAppEnv) mike@mike-thinks:~/Prog...
asked by 01.08.2018 / 18:18
0
answers

Code matplotlib does not show y-axis scale

I'm doing a program in Python 2.7.15 to display the data of various temperature sensors in real time by serial communication with the Arduino. However, the chart showed some unwanted problems that I broke my mind trying to solve, but no solution...
asked by 24.07.2018 / 15:22
2
answers

How to run a python script that is located on another machine

I have 2 raspberry and a windows computer that has an apache server. I want to run a script that is on the server from those 2 raspberry. I type in the command line: sudo python3 192.168.0.8//teste/teste.py but the following message com...
asked by 24.07.2018 / 16:02
1
answer

Import CSV into the Django database

I have a database in CSV and wanted to import into my Django models, CSV has this structure: NAME,CLUB,LEAGUE,POSITION,RATING,PACE,SHOOTING,PASSING,DRIBBLING,DEFENDING,PHYSICAL,LOADDATE Tore Reginiussen,Rosenborg BK,Tippeligaen,CB,82,65,53...
asked by 24.07.2018 / 19:54
2
answers

Python - Select clickable

I have to display on the screen (Tkinter) a list drawn from the database (mysql) containing information about a person (name and id) and make it possible for any item in this list to be clickable and, select that person's id and call another fun...
asked by 26.07.2018 / 14:44