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
75
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
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
350
Cursorハンズオン実践!
eltociear
2
1.2k
Leading Effective Engineering Teams in the AI Era
addyosmani
7
670
AI 駆動開発におけるコミュニティと AWS CDK の価値
konokenj
5
290
Developer Joy - The New Paradigm
hollycummins
1
380
contribution to astral-sh/uv
shunsock
0
550
Amazon Verified Permissions実践入門 〜Cedar活用とAppSync導入事例/Practical Introduction to Amazon Verified Permissions
fossamagna
2
100
SODA - FACT BOOK(JP)
sodainc
1
8.9k
テーブル定義書の構造化抽出して、生成AIでDWH分析を試してみた / devio2025tokyo
kasacchiful
0
320
Go言語はstack overflowの夢を見るか?
logica0419
0
640
登壇は dynamic! な営みである / speech is dynamic
da1chi
0
390
理論と実務のギャップを超える
eycjur
0
190
Featured
See All Featured
Facilitating Awesome Meetings
lara
57
6.6k
Done Done
chrislema
185
16k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.6k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.1k
Balancing Empowerment & Direction
lara
5
700
Java REST API Framework Comparison - PWX 2021
mraible
34
8.9k
Building Adaptive Systems
keathley
44
2.8k
Being A Developer After 40
akosma
91
590k
Code Review Best Practice
trishagee
72
19k
How to train your dragon (web standard)
notwaldorf
97
6.3k
Bash Introduction
62gerente
615
210k
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/