Questions tagged as 'python-2.7'

1
answer

Editing tables, DateField field

In one of the insert's of my application, I have a DateField field, At first there is no error when saving the dates in the database ( SQLite3 ), I I report a date in the format DD/MM/AAAA , and it is saved in the format AAAA/MM/DD...
asked by 14.07.2014 / 03:43
1
answer

with transformation [closed]

def eR(k,x): if k<=1: return 1 else: return (x**k)/eR(k-1,x)*k x=int(input("Insira o X:")) k=int(input("Insira o número de termos:")) print(eR(k,x))     
asked by 28.09.2018 / 21:47
1
answer

How to use keyboard library?

How to use the keyboard to perform an activity if a key is pressed? In my searches, I could not find any examples in this template: import keyboard b = 0 if keyboard.press('b'): #sei que o certo não é utilizar o press, mas, o que boto no luga...
asked by 18.11.2018 / 01:05
1
answer

Convert Python to exe

I have an app made in python that pulls several imports, and my client does not want to install Python in their environment (because it is an Oracle server), the output I found was to create an .exe, however when I I do not know how to do this,...
asked by 20.07.2018 / 21:40
1
answer

Sort 2D vector in descending order

I have the following vector: a = [['UK', 'FR', **numero**], ['UK', 'NL', **numero**], ['UK', 'PT', **numero**]] Where the variable number are floating point values and different. I want to sort the vector elements according to the valu...
asked by 18.05.2018 / 20:54
1
answer

Schedule a function in Python to always run on the last Friday of the month

The code below shows an example of how to program, but is somewhat limited to minutes, hours, and days. I need one that also includes the specific month and day, which in my case is Friday. I got a code that gets the date last Friday of the curr...
asked by 18.01.2018 / 15:58
2
answers

Doubt about the slice function

At reply this question that Guilherme Nascimento P. did, there was a question about using the slice , so far I was unaware of it, and found it at documentation I was confused. Searching here in SOpt did not find anything about...
asked by 28.12.2017 / 01:09
1
answer

Cross valdation n-fold

W1 W2 W3 W4 A/N 0 0.543405 0.278369 0.424518 0.844776 1 1 0.121569 0.670749 0.825853 0.136707 1 2 0.891322 0.209202 0.185328 0.108377 1 3 0.978624 0.811683 0.171941 0.816225 0 4 0.431704...
asked by 31.10.2017 / 10:40
1
answer

How to hold a key press on the pyautogui

I would like to hold down a key for x seconds. I know that tapping the key is: pyautogui.press("key") But how can I keep it pressed?     
asked by 29.10.2017 / 01:55
1
answer

Relation between Python Arrays

I'm a beginner in Python and I'm having a hard time doing the following: I have 1 vector with the following values: position = [34.53, 32.64, 44.20, 43.41] These values are given by the Euclidean distance of the following coordinates:...
asked by 05.08.2017 / 03:50