Questions tagged as 'python'

2
answers

IF, ELIF and ELSE

I'm taking my first steps in Python, and I had a question in the if / else statement, trying to solve the following exercise: "Based on input data for a person's height and gender, construct an algorithm that calculates their ideal weight usi...
asked by 04.10.2016 / 19:54
1
answer

How to make MYSQL Reverse Bank Engineering with SqlAlchemy?

I asked this question on Stackoverflow these days ago: How to import database to Django models? But now, I need something similar for Flask . I have a bank ready, using MYSQL . I want to reverse engineer my database, tr...
asked by 11.05.2016 / 18:35
1
answer

How to add an image in the menu?

I need to add an image in the menu of my program in Python. I am using the wxpython library. The menu looks like this: The code: #!/usr/bin/env python # -*- coding: utf-8 -*- import wx class Frame(wx.Frame): title = "SEA" def __i...
asked by 22.10.2016 / 02:51
2
answers

SIT tones using Python or C #

Hello,  I'm making an app that detects SIT tones ( link ).  I understand very little about mathematics involved in Fourier transform and signal processing.  What I'm wanting is to understand how I can identify if these patterns occurred on a voi...
asked by 23.01.2016 / 00:44
1
answer

How can I use Django 1.9.6 within my virtual environment?

I'm trying to use django version 1.9.6 in the virtual environment 'myvenv' I created through the ubuntu terminal, but even after I installed it using the pip3 install django==1.9.6 command, when I use python manage.py runserver I g...
asked by 16.05.2016 / 20:16
1
answer

Create executables in python (portability)

I have python code developed in MacOs system. Is it possible to generate executables to run on other systems (windows, linux)? Example:    The file.py file was written and tested on the MacOs system, but I want to generate an execut...
asked by 25.11.2015 / 22:54
1
answer

How do I join with Django?

I'm trying to run this SQL using Django's ORM SELECT * FROM test JOIN questionnaire q ON (q.id = test.questionnaire) WHERE q.discipline = 4; Templates:    Test, Questionnaire, Discipline     
asked by 31.10.2015 / 05:38
1
answer

Remove session data dictionary with ajax in Django

I have an array with a data dictionary in my session and would like to remove according to the line that the user is clicking on a table where those values are displayed. My view: def deletar_servico_ou_item_selecionado(request): if re...
asked by 29.10.2015 / 14:14
1
answer

Find out if a point is inside a circle in a Cartesian plane

I was doing the Target Shooting task of the 2013 Olympiad of Computing (OBI) level 2, which can be found here , and I was able to do without great difficulties. The task was to figure out how many points a person would make by shooting at a t...
asked by 24.04.2016 / 23:19
2
answers

How to define a function that calculates the lowest speed?

The program must have a function that calculates the lowest speed among those that are calculated from the data provided. The user must provide as input, 9 values, 3 in 3, which correspond to speed, acceleration and elapsed time for 3 different...
asked by 04.04.2016 / 20:26