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
80
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
98
Understanding Ruby with BPF
javierhonduco
1
41
Spying Linux processes
javierhonduco
0
100
word2vec
javierhonduco
0
71
UC3M university cafeteria redesign
javierhonduco
0
86
Mac OSX UI toolkit and design guidelines
javierhonduco
0
120
Other Decks in Programming
See All in Programming
自作OSでDOOMを動かしてみた
zakki0925224
1
1.2k
バイブスあるコーディングで ~PHP~ 便利ツールをつくるプラクティス
uzulla
1
330
Reactの歴史を振り返る
tutinoko
1
180
SwiftでMCPサーバーを作ろう!
giginet
PRO
2
230
AI Ramen Fight
yusukebe
0
130
JetBrainsのAI機能の紹介 #jjug
yusuke
0
190
Constant integer division faster than compiler-generated code
herumi
2
560
Workers を定期実行する方法は一つじゃない
rokuosan
0
140
マイコンでもRustのtestがしたい その2/KernelVM Tokyo 18
tnishinaga
2
1.8k
[DevinMeetupTokyo2025] コード書かせないDevinの使い方
takumiyoshikawa
2
280
大規模FlutterプロジェクトのCI実行時間を約8割削減した話
teamlab
PRO
0
450
DataformでPythonする / dataform-de-python
snhryt
0
160
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.6k
GraphQLとの向き合い方2022年版
quramy
49
14k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.8k
Code Review Best Practice
trishagee
69
19k
Why You Should Never Use an ORM
jnunemaker
PRO
58
9.5k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.4k
Site-Speed That Sticks
csswizardry
10
760
How to Ace a Technical Interview
jacobian
278
23k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Optimising Largest Contentful Paint
csswizardry
37
3.4k
Practical Orchestrator
shlominoach
190
11k
Agile that works and the tools we love
rasmusluckow
329
21k
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/