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
ネイティブ製ガントチャートUIを作って学ぶUICollectionViewLayoutの威力
jrsaruo
0
130
ててべんす独演会〜Flowの全てを語ります〜
tbsten
1
220
CSC509 Lecture 03
javiergs
PRO
0
330
iOSエンジニア向けの英語学習アプリを作る!
yukawashouhei
0
170
Your Perfect Project Setup for Angular @BASTA! 2025 in Mainz
manfredsteyer
PRO
0
120
Go言語の特性を活かした公式MCP SDKの設計
hond0413
1
170
『毎日の移動』を支えるGoバックエンド内製開発
yutautsugi
2
170
GitHub Actions × AWS OIDC連携の仕組みと経緯を理解する
ota1022
0
240
実践AIチャットボットUI実装入門
syumai
7
2.4k
プロダクト開発をAI 1stに変革する〜SaaS is dead時代で生き残るために〜 / AI 1st Product Development
kobakei
0
490
dynamic!
moro
9
6.3k
開発者への寄付をアプリ内課金として実装する時の気の使いどころ
ski
0
350
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
56
14k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
61k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Docker and Python
trallard
46
3.6k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
36
2.5k
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.6k
We Have a Design System, Now What?
morganepeng
53
7.8k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.2k
Git: the NoSQL Database
bkeepers
PRO
431
66k
Visualization
eitanlees
148
16k
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/