8000 python tutorial init · CodingCoffee-01/python_tutorial@cc08f41 · GitHub
[go: up one dir, main page]

Skip to content

Commit cc08f41

Browse files
python tutorial init
0 parents  commit cc08f41

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+11479
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
a*.out

.gitpod.Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# This will pull the official Gitpod `vnc` image
2+
# which has much of what you need to start
3+
FROM gitpod/workspace-full-vnc
4+
5+
USER gitpod
6+
7+
# Install wxPython dependencies
8+
#RUN sudo apt-get -q update && \
9+
# sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq freeglut3-dev libgl1-mesa-dev libglu1-mesa-dev libgstreamer-plugins-base1.0-dev libgtk-3-dev libnotify-dev libsdl2-dev libwebkit2gtk-4.0-dev libxtst-dev libgtk2.0-dev && \
10+
# sudo rm -rf /var/lib/apt/lists/*
11+
12+
# Install wxPython
13+
#RUN pip3 install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04/ wxPython

.gitpod.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# CodingCoffee C/C++ GitPod Examples more courses : http://www.codingcoffee.org
2+
image:
3+
file: .gitpod.Dockerfile
4+
5+
tasks:
6+
- init: echo 'this is c c++ hello gitpod example' && pip3 install -r requirements.txt && sudo apt-get -y install python3-scipy
7+
command: echo 'build hello.c and hello.cpp' && cp -r /workspace/python_tutorial/.jupyter /home/gitpod/
8+
9+
# CodingCoffee C/C++ GitPod Examples more courses : http://www.codingcoffee.org
10+
ports:
11+
- port: 8050
12+
onOpen: open-preview
13+
- port: 8888
14+
onOpen: open-browser
15+
- port: 3000
16+
onOpen: open-preview
17+
- port: 6080
18+
onOpen: open-preview
19+
- port: 5900
20+
onOpen: ignore
21+
- port: 35900
22+
onOpen: ignore
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"id": "50a0f414",
7+
"metadata": {},
8+
"outputs": [],
9+
"source": []
10+
}
11+
],
12+
"metadata": {
13+
"kernelspec": {
14+
"display_name": "Python 3 (ipykernel)",
15+
"language": "python",
16+
"name": "python3"
17+
},
18+
"language_info": {
19+
"codemirror_mode": {
20+
"name": "ipython",
21+
"version": 3
22+
},
23+
"file_extension": ".py",
24+
"mimetype": "text/x-python",
25+
"name": "python",
26+
"nbconvert_exporter": "python",
27+
"pygments_lexer": "ipython3",
28+
"version": "3.8.16"
29+
}
30+
},
31+
"nbformat": 4,
32+
"nbformat_minor": 5
33+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"cells": [],
3+
"metadata": {},
4+
"nbformat": 4,
5+
"nbformat_minor": 5
6+
}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"id": "b5732900",
6+
"metadata": {},
7+
"source": [
8+
"# High School Math "
9+
]
10+
},
11+
{
12+
"cell_type": "markdown",
13+
"id": "5687716e",
14+
"metadata": {},
15+
"source": [
16+
"## Polynomial"
17+
]
18+
},
19+
{
20+
"cell_type": "markdown",
21+
"id": "a221dd79",
22+
"metadata": {},
23+
"source": [
24+
"Latex Eguation Example \n",
25+
"\n",
26+
"\n",
27+
"- $x + y$\n",
28+
"- $x - y$\n",
29+
"- $x \\times y$ \n",
30+
"- $x \\div y$\n",
31+
"- $\\dfrac{x}{y}$\n",
32+
"- $\\sqrt{x}$'\n",
33+
"\n",
34+
"### Latex expression\n",
35+
" $x + y$\n",
36+
" $x - y$\n",
37+
" $x \\times y$ \n",
38+
" $x \\div y$\n",
39+
" $\\dfrac{x}{y}"
40+
]
41+
},
42+
{
43+
"cell_type": "code",
44+
"execution_count": null,
45+
"id": "e4d21882",
46+
"metadata": {},
47+
"outputs": [],
48+
"source": []
49+
}
50+
],
51+
"metadata": {
52+
"kernelspec": {
53+
"display_name": "Python 3 (ipykernel)",
54+
"language": "python",
55+
"name": "python3"
56+
},
57+
"language_info": {
58+
"codemirror_mode": {
59+
"name": "ipython",
60+
"version": 3
61+
},
62+
"file_extension": ".py",
63+
"mimetype": "text/x-python",
64+
"name": "python",
65+
"nbconvert_exporter": "python",
66+
"pygments_lexer": "ipython3",
67+
"version": "3.8.16"
68+
}
69+
},
70+
"nbformat": 4,
71+
"nbformat_minor": 5
72+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"cells": [],
3+
"metadata": {},
4+
"nbformat": 4,
5+
"nbformat_minor": 5
6+
}

.ipynb_checkpoints/highschool-math_1_Polynomial_I-checkpoint.ipynb

Lines changed: 483 additions & 0 deletions
Large diffs are not rendered by default.

.ipynb_checkpoints/highschool-math_2_Polynomial_II-checkpoint.ipynb

Lines changed: 202 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"id": "6883cb26",
6+
"metadata": {},
7+
"source": [
8+
"# High School Math"
9+
]
10+
},
11+
{
12+
"cell_type": "code",
13+
"execution_count": 1,
14+
"id": "9e77cb3e",
15+
"metadata": {},
16+
"outputs": [
17+
{
18+
"name": "stdout",
19+
"output_type": "stream",
20+
"text": [
21+
"4.5\n"
22+
]
23+
}
24+
],
25+
"source": [
26+
"import statistics\n",
27+
"\n",
28+
"arr = [1, 2, 3, 4, 5, 6, 7, 8]\n",
29+
"a = statistics.mean(arr) \n",
30+
"print(a) "
31+
]
32+
},
33+
{
34+
"cell_type": "code",
35+
"execution_count": 2,
36+
"id": "d98e0806",
37+
"metadata": {},
38+
"outputs": [
39+
{
40+
"name": "stdout",
41+
"output_type": "stream",
42+
"text": [
43+
"4.5\n",
44+
"4\n"
45+
]
46+
}
47+
],
48+
"source": [
49+
"import statistics\n",
50+
"\n",
51+
"arr = [1, 2, 3, 4, 5, 6, 7, 8]\n",
52+
"arr2 = [1, 2, 3, 4, 5, 6, 7]\n",
53+
"a = statistics.median(arr) \n",
54+
"b = statistics.median(arr2) \n",
55+
"print(a) # 4.5\n",
56+
"print(b) # 4"
57+
]
58+
},
59+
{
60+
"cell_type": "code",
61+
"execution_count": 3,
62+
"id": "9493fadc",
63+
"metadata": {},
64+
"outputs": [
65+
{
66+
"name": "stdout",
67+
"output_type": "stream",
68+
"text": [
69+
"4\n",
70+
"5\n"
71+
]
72+
}
73+
],
74+
"source": [
75+
"import statistics\n",
76+
"\n",
77+
"arr = [1, 2, 3, 4, 5, 6, 7, 8]\n",
78+
"a = statistics.median_low(arr) \n",
79+
"b = statistics.median_high(arr) \n",
80+
"print(a) # 4\n",
81+
"print(b) # 5"
82+
]
83+
},
84+
{
85+
"cell_type": "code",
86+
"execution_count": 4,
87+
"id": "a0a3bde6",
88+
"metadata": {},
89+
"outputs": [
90+
{
91+
"name": "stdout",
92+
"output_type": "stream",
93+
"text": [
94+
"4\n"
95+
]
96+
}
97+
],
98+
"source": [
99+
"import statistics\n",
100+
"\n",
101+
"arr = [1, 2, 2, 3, 4, 4, 4, 4, 4, 4, 5, 5]\n",
102+
"a = statistics.mode(arr) \n",
103+
"print(a) # 4"
104+
]
105+
},
106+
{
107+
"cell_type": "code",
108+
"execution_count": 5,
109+
"id": "24726d94",
110+
"metadata": {},
111+
"outputs": [
112+
{
113+
"name": "stdout",
114+
"output_type": "stream",
115+
"text": [
116+
"l\n"
117+
]
118+
}
119+
],
120+
"source": [
121+
"import statistics\n",
122+
"\n",
123+
"text = 'hello world'\n",
124+
"a = statistics.mode(text) \n",
125+
"print(a) # l"
126+
]
127+
},
128+
{
129+
"cell_type": "code",
130+
"execution_count": 6,
131+
"id": "6f43f7e6",
132+
"metadata": {},
133+
"outputs": [
134+
{
135+
"name": "stdout",
136+
"output_type": "stream",
137+
"text": [
138+
"2.581988897471611\n",
139+
"6.666666666666667\n"
140+
]
141+
}
142+
],
143+
"source": [
144+
"import statistics\n",
145+
"\n",
146+
"arr = [1, 2, 3, 4, 5, 6, 7, 8, 9]\n",
147+
"a = statistics.pstdev(arr)\n",
148+
"b = statistics.pvariance(arr)\n",
149+
"print(a) # 2.581988897471611\n",
150+
"print(b) # 6.666666666666667"
151+
]
152+
},
153+
{
154+
"cell_type": "code",
155+
"execution_count": null,
156+
"id": "886cf10e",
157+
"metadata": {},
158+
"outputs": [],
159+
"source": [
160+
"import statistics\n",
161+
"\n",
162+
"arr = [1, 2, 3, 4, 5, 6, 7, 8, 9]\n",
163+
"a = statistics.stdev(arr)\n",
164+
"b = statistics.variance(arr)\n",
165+
"print(a) # 2.7386127875258306\n",
166+
"print(b) # 7.5"
167+
]
168+
}
169+
],
170+
"metadata": {
171+
"kernelspec": {
172+
"display_name": "Python 3 (ipykernel)",
173+
"language": "python",
174+
"name": "python3"
175+
},
176+
"language_info": {
177+
"codemirror_mode": {
178+
"name": "ipython",
179+
"version": 3
180+
},
181+
"file_extension": ".py",
182+
"mimetype": "text/x-python",
183+
"name": "python",
184+
"nbconvert_exporter": "python",
185+
"pygments_lexer": "ipython3",
186+
"version": "3.8.16"
187+
}
188+
},
189+
"nbformat": 4,
190+
"nbformat_minor": 5
191+
}

0 commit comments

Comments
 (0)
0