Questions tagged as 'python'

1
answer

Two str.split followed

I have a series of data ordered such that:    {"PseudorangeRateUncertaintyMetersPerSecond": 0.1289496429081,   "DriftUncertaintyNanosPerSecond": "", "AccumulatedDeltaRangeState": 1,   "ReceivedSvTimeNanos": 491721930367520.0, "TimeUncertainty...
asked by 05.07.2018 / 10:29
1
answer

Generate a list from the keys of a dictionary taking into account the values of these keys

For example if you have the following dictionary: {1:2, 2:3} I want to get the following list: [1, 1, 2, 2, 2] That is: there are as many "1" as values indicates the value of the key "1" (2) and as many "2" as values indicates the valu...
asked by 04.07.2018 / 03:44
1
answer

Query with dates using a range

I have the following query: query=Detalles.objects.filter(fecha_creacion__range=(fecha_inicio,fecha_final)) The expected result is to filter the results between date A and date B, that is: fechaA= 01-07-2018 FechaB=04-07-2018 However,...
asked by 04.07.2018 / 22:40
1
answer

Queries with firebase and python

I have the following problem: This is my database in firebase: path /Usuarios/Administradores/Angel,{'Nombre':'Angel'} create directly within firebase. However, the other 3 believe them from the following code: from fireb...
asked by 09.07.2018 / 17:44
1
answer

Selenium in Python - Implicitly wait and explicitly wait

This happens to me with this function, if I use a time.sllep () it works correctly but from what I understand it is quite inefficient to use it. def visible_en_tienda(driver): time.sleep(2) xpath = "/html/body/div[1]/main/div[2]/section/di...
asked by 09.07.2018 / 19:09
1
answer

Problem in urls.py

urls.py #home/urls.py from django.urls import path, re_path from home.views import homePageView, dashboardPageView, userPageView, CoinsPageView urlpatterns = [ path('',homePageView.as_view(),name='home'), re_path('activate/(?P...
asked by 09.07.2018 / 23:44
1
answer

Can I do this in python (django)?

I'm in a model and I want to get an attribute of the model, but I have the attribute as a string. It would be right to do this: self.nombre but I have this: text = "nombre" how do I access the attribute with what I have...
asked by 28.06.2018 / 05:47
1
answer

Get MAC in Django / python

I want to get the mac from a device, I'm importing: from uuid import getnode as get_mac mac = get_mac() print ('mac...>>>:',mac) However, it brings digits that do not correspond to a MAC (00: 00: 00: 00: 00: 00)     
asked by 14.06.2018 / 23:20
1
answer

Save values in pyautogui

How could I save the values of displayMousePosition() , something like x, y, rgb = pyautogui.displayMousePosition()     
asked by 12.06.2018 / 08:11
2
answers

Problem with python cycle

Good afternoon could you help me with this code please: try: numero1=int(input("Digite el primer numero entero:")) numero2=int(input("Digite el segundo numero entero:")) for i in range(numero1+1,numero2,1): if i % 5 == 0:...
asked by 25.08.2018 / 22:07