-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNote
108 lines (72 loc) · 2.21 KB
/
Note
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
turtle (OOP)
https://docs.python.org/3/library/turtle.html#turtle.write
pandas (Data analysis)
https://pandas.pydata.org/docs/reference/series.html#function-application-groupby-window
material - https://sparkbyexamples.com/pandas/pandas-convert-column-to-int/#:~:text=Convert%20Column%20to%20int%20(Integer,int64%20or%20int%20as%20param.
tkinter(GUI)
https://docs.python.org/3.11/library/tkinter.html#tkinter.Label
https://tcl.tk/man/tcl8.6/TkCmd/entry.htm
https://tkdocs.com/search.html?q=entry
smtpliib library (Email SMTP)
Google SMTP Port (module)
smtplib.SMTP("smtp.gmail.com", port=587)
Gmail: smtp.gmail.com
Hotmail: smtp.live.com
Outlook: outlook.office365.com
Yahoo: smtp.mailyahoo.com
datetime Module (get date and time)
HTTP Status Codes
https://www.webfx.com/web-development/glossary/http-status-codes/
Python
https://pypi.org/project/pyclip/
Python on cloud
https://www.pythonanywhere.com/user/Haryoh/files/home/Haryoh
API
requests Module (Json() format)
https://www.latlong.net/ (ISS Location finder)
https://sunrise-sunset.org/api
EXTRAS
https://colorhunt.co/
CSV
==========================================
exceptions handling*****
KEYWORDS
try - something that might cause an exception
except - do this if there was an exception
else - do this if there were no exception
finally - do this no matter what
raise - recall a specific line
#Exception Handling
try:
file = open("a_file.txt")
a_dictionary = {"key": "value"}
print(a_dictionary["key"])
except FileNotFoundError:
file = open("a_file.txt", "w")
file.write("Something")
except KeyError as error_message:
print(f"The key {error_message} does not exist.")
else:
content = file.read()
print(content)
finally:
raise TypeError("This is an error that I made up.")
#BMI Example
height = float(input("Height: "))
weight = int(input("Weight: "))
if height > 3:
raise ValueError("Human Height should not be over 3 meters.")
bmi = weight / height ** 2
print(bmi)
=================================================
###################
Json
JavascriptObjectNotation
json.dump() - write
json.load() - Read
json.update() - Update
functions
split()
txt = "hello, my name is Peter, I am 26 years old"
x = txt.split(", ")
print(x)