-
Notifications
You must be signed in to change notification settings - Fork 0
/
ONLINE
161 lines (137 loc) · 4.88 KB
/
ONLINE
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
Intro -
My Name - Rajesh Kumar
2014 - As Programmer
=======================
www.RajeshKumar.xyz
=======================
Python Intermediate
=======================
6 Hours - 3.5 Hours - Discussion + Demo by Me
1 Hour - LUNCH
1.5 Hours - Lab
-------------------------
=========================
First 2 Hour - 8:00 PM IST - 10:00 PM IST - Discussion and Demo by Rajesh Kumar
Next one hour - Lab - 0:00 PM IST - 11:00 PM IST - LAB and On Lab Support by Rajesh Kumar
11:00 PM IST - 11.45 PM IST - LUNCH BREAK
11.45 PM IST - 01:30 AM IST - Discussion and Demo by Rajesh Kumar
01:30 AM IST - 2:00 PM IST - - LAB and On Lab Support by Rajesh Kumar
==========================
Demo - Laptop - Mac
Lab - Windows - Mac - Linux
---------------------------
How to learn Programm Lang?
================================
Big Problems - Multiples things....
- 10 things.
School Managment
- students
- teachers
- classeses
- Each class - Convert into multiple domain/class
- Actions (CRUD) AKA METHOD AKA FUNCTION
- ADD Stduent
Conditioning
Looping
OPERATORS & DATATYPES
Looping
Conditioning
- Edit student
- Read student
- Update Student
- Delete Student
- ATTRIBUTES AKA PROPERTIES
Common
Specific
=========================
class
function
based on confition|looping|operarots|datatypes
====================
class -
When you call a class - Instantiate a class AKA OBJECT
MEN ----- 200 MEN -- 200 TIMES
==========================================================
Evolution Of porgramming
-----
Compiled Lang - JAVA - C + C++ DOTNET
Iterpreted Lang - PHP - PERL - PYTHON
Declartive - XML - JSON - YAML -
==========================================================
How to install python3?
Download and Install Python 3.8 using https://www.python.org/downloads/
Mac - /usr/local/bin/python3
MG -> PKG -> CLICK - FOLLOW -----
Windows -
EXE --> Installer
Linux - apt tum tar
==========================
How to install pip3?
$ curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
$ python3 get-pip.py --user
IDE - Visual Studio Code
https://code.visualstudio.com/
1. File operations Using Python
2. Database operations using python - mysql
Step 1 - Install MYSQL Server
start a server
Set a root password
validate
MAC - https://www.devopsschool.com/blog/how-to-download-and-install-mysql-in-macos-10/
LINUX - https://www.devopsschool.com/tutorial/mysql/how-to-install-mysql-on-centos-7.html
Step 2 - Install python mysql connector using PIP3
$ sudo pip3 install mysql-connector-python
Step 3 - Using Python - Check a mysql Connection
Step 4 - Using Python - Create a database
Step 5 - Using Python - Create a Table
Step 6 - Using Python - Insert Row Ops
Step 7 - Using Python - Read Row Ops
Step 8 - Using Python - Update Row Ops
Step 9 - Using Python - Delete Row Ops
COMMAND REFERENCE
================================
Rajeshs-MacBook-Pro:~ rajeshkumar$ /usr/local/mysql/bin/mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 21
Server version: 5.7.28 MySQL Community Server (GPL)
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| devopsschool |
| mysql |
| performance_schema |
| sys |
+--------------------+
5 rows in set (0.00 sec)
mysql> use devopsschol;
ERROR 1049 (42000): Unknown database 'devopsschol'
mysql> use devopsschool;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
+------------------------+
| Tables_in_devopsschool |
+------------------------+
| Laptop |
+------------------------+
1 row in set (0.01 sec)
mysql> select * from Laptop;
+----+-------------+-------+---------------+
| Id | Name | Price | Purchase_date |
+----+-------------+-------+---------------+
| 3 | MacBook Pro | 2499 | 2019-06-20 |
+----+-------------+-------+---------------+
1 row in set (0.00 sec)
3. Web Development using Python with Flask
Step 1 - sudo pip install -U Flask
Step 2 - Lets have a Flask declared in python file and do Ops
Step 3 - Have proper HTML file.