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
64
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
70
Understanding Ruby with BPF
javierhonduco
1
26
Spying Linux processes
javierhonduco
0
77
word2vec
javierhonduco
0
57
UC3M university cafeteria redesign
javierhonduco
0
63
Mac OSX UI toolkit and design guidelines
javierhonduco
0
85
Other Decks in Programming
See All in Programming
Amazon SQSコンシューマー疎結合への旅 - 出張! #DevelopersIO IT技術ブログの中の人が語る勉強会 #3
quiver
0
270
Rethinking UI building strategies @ SFI 2024
letelete
0
270
Elm 0.19.0 Changes
bkuhlmann
0
490
Random\Randomizer クラスで日常のあれこれを解決しよう! / Random\Randomizer class solves familiar trouble
cocoeyes02
0
240
Goのmultiple errorsについて (2024年4月版)
syumai
3
700
PHPの次期バージョンはこの時期どうなっているのか - Internalsの開発体制について - PHPカンファレンス小田原
youkidearitai
PRO
1
190
Build Apps for iOS, Android & Desktop in 100% Kotlin With Compose Multiplatform (mDevCamp 2024)
zsmb
0
330
VS Code をプロダクトにどう取り込むか
onomax
1
360
Zero Waste, Radical Magic, and Italian Graft – Quarkus Efficiency Secrets
hollycummins
0
230
TYPO3 v13 – The road to LTS: What's new and new APIs
luisasofie_xoxo
0
200
デフォルトにして至高、RubyMineの大好きな所
ruzia
0
360
DMMプラットフォームがTiDB Cloudを採用した背景
pospome
8
4.1k
Featured
See All Featured
How GitHub (no longer) Works
holman
304
140k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
21
1.6k
YesSQL, Process and Tooling at Scale
rocio
164
13k
Fireside Chat
paigeccino
21
2.6k
GraphQLの誤解/rethinking-graphql
sonatard
50
9.2k
It's Worth the Effort
3n
180
27k
Designing with Data
zakiwarfel
96
4.8k
Agile that works and the tools we love
rasmusluckow
325
20k
StorybookのUI Testing Handbookを読んだ
zakiyama
13
4.6k
Pencils Down: Stop Designing & Start Developing
hursman
117
11k
The Straight Up "How To Draw Better" Workshop
denniskardys
227
130k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
18
6.9k
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/