Questions tagged as 'python'

0
answers

Doubt when calculating area [closed]

I was testing an algorithm that returns me to the area of objects based on a reference, a priori this gave me results very close to the real, when the reference was the same height of the object measured, but I decided to observe at a different...
asked by 21.09.2016 / 20:53
1
answer

View jpg image dynamically in python Tkinter label

I'm trying to display a chosen image from a Listbox in a Label. The following code works: import Tkinter as tk from PIL import ImageTk, Image window = tk.Tk() path = 'img\2015722_univ_sqs_sm.jpg' img = ImageTk.PhotoImage(Image.open(path)) pa...
asked by 08.07.2015 / 18:34
0
answers

How to make an animation show every change in the dataset? With matplotlib

I'm using matplotlib to show my data set in 3d. But I'd like to show each change to the dataset in a 3D chart. And create an animation of it or maybe save the animation. Follow the code I'm using: from mpl_toolkits.mplot3d import Axes3D from m...
asked by 17.07.2017 / 23:18
3
answers

Maximum and minimum Python

What is the function that I use to find the maximum and minimum values between 2 values in the Python language? Thank you     
asked by 29.09.2017 / 05:05
2
answers

Generate random numbers in Python without repeating

I have the following situation: I have a vector with 4 indexes. At each index a random value of 0 to 100 is generated. I have a code that does it perfectly, but sometimes the numbers repeat. Below the code: from random import randint...
asked by 06.04.2017 / 04:28
2
answers

Generate float values between -1 and 1

I am trying to generate float values between -1 and 1 to test if they are within the defined limits in order to create a vector with the amount of data I want only that I am only able to generate% between 0 and 1 through the function f...
asked by 23.11.2018 / 10:01
2
answers

See how the native functions were written - Python

Is there a practical way to check, as the code for a Python function is written, max() ?     
asked by 01.08.2018 / 20:30
2
answers

What determines a variable as an array in Python?

I'm studying about queues in Python and I'm using the object deque of the module collections . So, in Python I can access the values of an array by index simply by typing: array = [1, 2, 3] arra[0] # 1 However, the deque o...
asked by 04.09.2018 / 21:14
2
answers

Block Django source code

I'm developing some projects where I'll use django , but I'll have to host the server on the client machine. Where it will be installed there is no internet, so I have to make the system work locally. I need to know if I can somehow protect...
asked by 30.10.2015 / 16:49
2
answers

What is the difference between the math and cmath modules?

In Python we realize that there are the following modules: math and cmath , however I did not understand what difference between the two. Here's how they can be imported: import math import cmath What differences between module...
asked by 01.02.2017 / 18:28