@AniketParulekar/

PointlessApprehensiveBucket

Python

No description

fork
loading
Files
  • main.py
  • requirements.txt
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
'''
test={"data":[{"Id":"12345",
              "Name":"C123",
              "StartTime": 153507240000,
              "EndTime": 1535077800000},
             {"Id": "12346",
              "Name": "C124",
              "StartTime": 1530839700000,
              "EndTime": 1530864000000}
             ]}

#print(test['data'])

test['data'].sort(key=lambda e:e['StartTime'])

pprint(test)


d={}

while True:
    key = input('Enter NEW KEY : ')
    value = int(input('Enter NEW Value : '))
    d.update({key:value})
    print(d)
    sorted_d = sorted(d.items(), key=lambda x:x[0])
    print(sorted_d)
'''
'''
#Comprehension with if
x={ x:x*x for x in range(6) if x%2 == 0 }
print(x)



a=[1,2,3,4,5,6]

for i in a[::2]:
    print(i, end=" ")
'''

from PyQt5 import QtWidgets, QtGui, QtCore
class PyQtApp(QtWidgets.QWidget):
   
    def __init__(self, parent=None):
        QtWidgets.QWidget.__init__(self, parent)
        self.setWindowTitle("PyQt Application")
        self.setWindowIcon(QtGui.QIcon("Your/image/file.png"))

if __name__ == "__main__":
    import sys
    app = QtWidgets.QApplication(sys.argv)
    myapp = PyQtApp()
    myapp.show()
    sys.exit(app.exec_())