Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
83
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
46
Spying Linux processes
javierhonduco
0
110
word2vec
javierhonduco
0
78
UC3M university cafeteria redesign
javierhonduco
0
89
Mac OSX UI toolkit and design guidelines
javierhonduco
0
130
Other Decks in Programming
See All in Programming
Microservices Platforms: When Team Topologies Meets Microservices Patterns
cer
PRO
1
960
社内オペレーション改善のためのTypeScript / TSKaigi Hokuriku 2025
dachi023
1
540
STYLE
koic
0
100
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
190
テストやOSS開発に役立つSetup PHP Action
matsuo_atsushi
0
140
[堅牢.py #1] テストを書かない研究者に送る、最初にテストを書く実験コード入門 / Let's start your ML project by writing tests
shunk031
12
7k
ハイパーメディア駆動アプリケーションとIslandアーキテクチャ: htmxによるWebアプリケーション開発と動的UIの局所的適用
nowaki28
0
360
tsgolintはいかにしてtypescript-goの非公開APIを呼び出しているのか
syumai
5
1.9k
WebRTC と Rust と8K 60fps
tnoho
2
1.9k
AIと協働し、イベントソーシングとアクターモデルで作る後悔しないアーキテクチャ Regret-Free Architecture with AI, Event Sourcing, and Actors
tomohisa
5
19k
React Native New Architecture 移行実践報告
taminif
1
140
開発に寄りそう自動テストの実現
goyoki
1
680
Featured
See All Featured
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.8k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.6k
Speed Design
sergeychernyshev
33
1.4k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Designing for humans not robots
tammielis
254
26k
It's Worth the Effort
3n
187
29k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
The Cost Of JavaScript in 2023
addyosmani
55
9.3k
Raft: Consensus for Rubyists
vanstee
141
7.2k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
What's in a price? How to price your products and services
michaelherold
246
12k
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/