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
93
0
Share
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
120
Understanding Ruby with BPF
javierhonduco
1
61
Spying Linux processes
javierhonduco
0
130
word2vec
javierhonduco
0
89
UC3M university cafeteria redesign
javierhonduco
0
100
Mac OSX UI toolkit and design guidelines
javierhonduco
0
150
Other Decks in Programming
See All in Programming
瑠璃の宝石に学ぶ技術の声の聴き方 / 【劇場版】アニメから得た学びを発表会2026 #エンジニアニメ
mazrean
0
230
メッセージングを利用して時間的結合を分離しよう #phperkaigi
kajitack
3
580
「接続」—パフォーマンスチューニングの最後の一手 〜点と点を結ぶ、その一瞬のために〜
kentaroutakeda
5
2.5k
PHP で mp3 プレイヤーを実装しよう
m3m0r7
PRO
0
240
10 Tips of AWS ~Gen AI on AWS~
licux
5
300
L’IA au service des devs : Anatomie d'un assistant de Code Review
toham
0
220
テレメトリーシグナルが導くパフォーマンス最適化 / Performance Optimization Driven by Telemetry Signals
seike460
PRO
2
220
セグメントとターゲットを意識するプロポーザルの書き方 〜採択の鍵は、誰に刺すかを見極めるマーケティング戦略にある〜
m3m0r7
PRO
0
470
仕様漏れ実装漏れをなくすトレーサビリティAI基盤のご紹介
orgachem
PRO
9
5.5k
ネイティブアプリとWebフロントエンドのAPI通信ラッパーにおける共通化の勘所
suguruooki
0
260
CDK Deployのための ”反響定位”
watany
4
690
Swift Concurrency Type System
inamiy
0
460
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
55
8.1k
BBQ
matthewcrist
89
10k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
330
Site-Speed That Sticks
csswizardry
13
1.2k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Optimising Largest Contentful Paint
csswizardry
37
3.6k
The World Runs on Bad Software
bkeepers
PRO
72
12k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
420
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.7k
Visualization
eitanlees
150
17k
HDC tutorial
michielstock
1
610
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/