$30 off During Our Annual Pro Sale. View Details »
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
85
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
110
Understanding Ruby with BPF
javierhonduco
1
47
Spying Linux processes
javierhonduco
0
110
word2vec
javierhonduco
0
79
UC3M university cafeteria redesign
javierhonduco
0
93
Mac OSX UI toolkit and design guidelines
javierhonduco
0
130
Other Decks in Programming
See All in Programming
sbt 2
xuwei_k
0
290
まだ間に合う!Claude Code元年をふりかえる
nogu66
5
820
これだけで丸わかり!LangChain v1.0 アップデートまとめ
os1ma
6
1.8k
Go コードベースの構成と AI コンテキスト定義
andpad
0
120
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
140
C-Shared Buildで突破するAI Agent バックテストの壁
po3rin
0
390
AIコードレビューがチームの"文脈"を 読めるようになるまで
marutaku
0
350
Rubyで鍛える仕組み化プロヂュース力
muryoimpl
0
110
DSPy Meetup Tokyo #1 - はじめてのDSPy
masahiro_nishimi
1
170
Tinkerbellから学ぶ、Podで DHCPをリッスンする手法
tomokon
0
130
20251127_ぼっちのための懇親会対策会議
kokamoto01_metaps
2
430
手が足りない!兼業データエンジニアに必要だったアーキテクチャと立ち回り
zinkosuke
0
680
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
Designing for humans not robots
tammielis
254
26k
Scaling GitHub
holman
464
140k
Making Projects Easy
brettharned
120
6.5k
The Pragmatic Product Professional
lauravandoore
37
7.1k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
How to Ace a Technical Interview
jacobian
280
24k
Code Review Best Practice
trishagee
74
19k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Speed Design
sergeychernyshev
33
1.4k
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.2k
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/