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 for Java developers
Search
Javier Honduvilla Coto
November 24, 2014
Programming
0
81
Python for Java developers
Javier Honduvilla Coto
November 24, 2014
Tweet
Share
More Decks by Javier Honduvilla Coto
See All by Javier Honduvilla Coto
Debugging – Learning Linux @ Facebook
javierhonduco
0
100
Understanding Ruby with BPF
javierhonduco
1
43
Spying Linux processes
javierhonduco
0
100
word2vec
javierhonduco
0
74
UC3M university cafeteria redesign
javierhonduco
0
88
Mac OSX UI toolkit and design guidelines
javierhonduco
0
120
Other Decks in Programming
See All in Programming
CSC305 Summer Lecture 12
javiergs
PRO
0
130
rage against annotate_predecessor
junk0612
0
140
Protocol Buffersの型を超えて拡張性を得る / Beyond Protocol Buffers Types Achieving Extensibility
linyows
0
100
為你自己學 Python - 冷知識篇
eddie
1
310
Rancher と Terraform
fufuhu
2
160
テストカバレッジ100%を10年続けて得られた学びと品質
mottyzzz
2
360
go test -json そして testing.T.Attr / Kyoto.go #63
utgwkk
1
190
ソフトウェアテスト徹底指南書の紹介
goyoki
1
120
コンテキストエンジニアリング Cursor編
kinopeee
1
730
testingを眺める
matumoto
1
130
Kiroで始めるAI-DLC
kaonash
2
490
Claude Codeで実装以外の開発フロー、どこまで自動化できるか?失敗と成功
ndadayo
3
1.8k
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
53
7.8k
Git: the NoSQL Database
bkeepers
PRO
431
66k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Visualization
eitanlees
147
16k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.5k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
11
1.1k
Optimising Largest Contentful Paint
csswizardry
37
3.4k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
185
54k
Intergalactic Javascript Robots from Outer Space
tanoku
272
27k
Transcript
Can I haz ur pythons? Rafael Medina García @rmed_dev Fco.
Javier Honduvilla Coto @javierhonduco
Where is python?
Examples for the Java weenies
Simple TCP Socket: Java
Simple TCP Socket: Python
Reading a file: Java
Reading a file: Python
Hashtable: Java
“Hashtable”: Python
Why python rocks? • Function parameters • GC ◦ Reference
counting • Decorators • Types (WTF) • List-Stack-Queue-[...] • PyPI
Concurrency is not parallelism • Concurrency ◦ GIL: Global Interpreter
Lock (</3) i. threads vs processes • celery ii. tasks iii. groups iv. pipes • cpython, pypy
Celery • Async framework task Queue + Tasks = fun
Cpython and moar • cpython ◦ Guido’s Python Interpreter •
pypy ◦ “an implementation of the Python programming language written in Python itself”
Web frameworks + wsgi • Django • Flask • ∞
Scientific packages • ipython + notebook • cython • numba...
Our fav libs • requests (http for humans) • SQLAlchemy
(database toolkit)
SQLAlchemy I
SQLAlchemy II
Is (c)python slow? • Overhead • Cache misses • Complex
data structures • Any variable can change its type • (dynamic)
None
Bibliography • https://jakevdp.github.io/blog/2014/05/09/why-python-is- slow/ • http://docs.python-requests.org/en/latest/ • https://bitbucket.org/zzzeek/sqlalchemy • http://wsgi.readthedocs.org/en/latest/
• http://www.dabeaz.com/python/UnderstandingGIL.pdf • https://docs.python.org/2/library/gc.html • https://pypi.python.org/pypi • http://pypy.org/ • http://www.scipy.org/