Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Python Application Case
Search
Vicky Vernando Dasta
January 27, 2018
Programming
0
63
Python Application Case
Python Workshop @ Kongkow IT 2018
Vicky Vernando Dasta
January 27, 2018
Tweet
Share
More Decks by Vicky Vernando Dasta
See All by Vicky Vernando Dasta
PYTHON 101
vickydasta
0
110
Other Decks in Programming
See All in Programming
LT 2025-06-30: プロダクトエンジニアの役割
yamamotok
0
870
PHP 8.4の新機能「プロパティフック」から学ぶオブジェクト指向設計とリスコフの置換原則
kentaroutakeda
2
1k
dbt民主化とLLMによる開発ブースト ~ AI Readyな分析サイクルを目指して ~
yoshyum
3
1.1k
SQLアンチパターン第2版 データベースプログラミングで陥りがちな失敗とその対策 / Intro to SQL Antipatterns 2nd
twada
PRO
11
1.3k
ニーリーにおけるプロダクトエンジニア
nealle
0
950
Agentic Coding: The Future of Software Development with Agents
mitsuhiko
0
130
オンコール⼊⾨〜ページャーが鳴る前に、あなたが備えられること〜 / Before The Pager Rings
yktakaha4
2
990
코딩 에이전트 체크리스트: Claude Code ver.
nacyot
0
930
Claude Code派?Gemini CLI派? みんなで比較LT会!_20250716
junholee
1
530
AIと”コードの評価関数”を共有する / Share the "code evaluation function" with AI
euglena1215
1
180
マッチングアプリにおけるフリックUIで苦労したこと
yuheiito
0
190
「テストは愚直&&網羅的に書くほどよい」という誤解 / Test Smarter, Not Harder
munetoshi
0
200
Featured
See All Featured
Site-Speed That Sticks
csswizardry
10
700
Measuring & Analyzing Core Web Vitals
bluesmoon
7
520
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.7k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
GitHub's CSS Performance
jonrohan
1031
460k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
Making Projects Easy
brettharned
116
6.3k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.5k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
47
9.6k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
126
53k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
130
19k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
181
54k
Transcript
PYTHON WORKSHOP HAFIZHAN: WEB APPLICATION WITH PYTHON FLASK VICKY: PYTHON
101 AND APPLICATION IN SECURITY & MACHINE LEARNING
Workshop repo github.com/vickydasta/kongkow-python
About • Student @ physics dept. UR • Research assistant
at photonic lab @ UR • Research interest: photonic, applied machine learning on raspberry pi system • Python user 2014-now
Python at a glance • Multipurpose • OOP (everything is
object) • Dynamic typing • Batteries included • Case sensitive
None
Things we can build computer vision search engine security tools
embedded system web services web application machine learning apps
Your First Python Code print “hello, world!” print(“hello, world!”)
Data Structure • Integer • Float • List • String
• Boolean • Dictionary • Tupple
Data Structure: list • Create an empty list • Add
an item into it • Access item • Remove some item fr = [] fr.append(“guava”) fr[0] fr.remove(“guava”)
Data Structure: tupple • Immutable array • Data are read-only
• Items in tupple can’t be deleted • Can’t add more data once it’s created fixed_data = (1, 2) fixed_data[0] # 1 fixed_data[0] = 1
Data Structure: dict • Named-list • Key-value user = {“name”
“vicky”, “age”: 21} user[“name”] user.keys() user.values() user = {name=“vicky”, age=21}
Control Flow In Python, there are: • if • elif
• else • for • while • continue • break
Control Flow: if if 1 > 0: print “1 larger
than 0”
Control Flow: if-else if 1 > 2: print “hola” else:
print “holi”
Control Flow: if-elif-else if 1 > 2: print “hola” elif
1 > 3: print “holu” else: print “holi”
Loop: for • for loop is for iterating over iterable
object • range function creates list which is iterable • in above case, the i is 0, 1, 2, ..., 99 on each iteration for i in range(100): print(i)
Looping: while • while Requires a condition in order to
start or terminate the loop (while-break) while True: print “hello!” N = 0 while N < 10: N += 1
Function: def • def is the keyword for creating function
def gravity_force(M, m, r): return 6.62e+12*(M*m)/r**2 Function keyword Returned value(s) arguments function name
Coding style in Python • Python uses indentation • 3
spaces or 1 tab for each scope • No brackets or semicolons!
Python Application Case: Machine Learning Security
Machine Learning: Security: Predict land price by its size Port
scanner
Sec: Port scanner • Door knocking analogy • Bruteforce
ML: Linear Regression • Linear model out = mx+b •
Scikit learn search for the m • so the predicted value can be close to y
ML: Datasets X (M2) Y ($ USD) 200 2000 250
3500 300 5000 378 5400 456 6500 680 8700 800 10000
ML: model training datasets model f(x)
ML: prediction new input predicted output Trained Model
ML: scikit-learn • Machine learning is difficult problem • Fortunately,
we have scikit-learn
Python resources • github.com/vinta/awesome-python