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
99
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Python for Java developers
Javier Honduvilla Coto
November 24, 2014
More Decks by Javier Honduvilla Coto
See All by Javier Honduvilla Coto
Debugging – Learning Linux @ Facebook
javierhonduco
0
130
Understanding Ruby with BPF
javierhonduco
1
73
Spying Linux processes
javierhonduco
0
130
word2vec
javierhonduco
0
92
UC3M university cafeteria redesign
javierhonduco
0
100
Mac OSX UI toolkit and design guidelines
javierhonduco
0
160
Other Decks in Programming
See All in Programming
AIとASP.NET Coreで雑Webアプリを作った話
mayuki
0
510
AIチームを指揮するOSS「TAKT」活用術 / How to Use “TAKT,” an OSS Tool for Orchestrating AI Teams
nrslib
6
890
[2026年度第1回ORセミナー] 計画最適化ベンチャーと競技プログラミング人材
terryu16
0
260
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
320
AIだと陥りがちなJakarta EE最新技術への移行時の落とし穴と解決策
tnagao7
0
100
Language Server 使ってる? 〜VSCode と Zed の場合〜 / Are you using a Language Server? ~For VS Code and Zed~
handlename
0
780
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
3.6k
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
270
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
160
DynamoDBには集計系のクエリがないけどなんとかしたい
musan
1
140
Java × distroless で 軽量なコンテナイメージを / Java on Distroless
contour_gara
0
540
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
13
3.7k
Featured
See All Featured
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
450
Into the Great Unknown - MozCon
thekraken
41
2.6k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
GitHub's CSS Performance
jonrohan
1033
470k
Chasing Engaging Ingredients in Design
codingconduct
0
220
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
470
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
220
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
Music & Morning Musume
bryan
47
7.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/