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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Javier Honduvilla Coto
November 24, 2014
Programming
0
90
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
120
Understanding Ruby with BPF
javierhonduco
1
57
Spying Linux processes
javierhonduco
0
120
word2vec
javierhonduco
0
86
UC3M university cafeteria redesign
javierhonduco
0
97
Mac OSX UI toolkit and design guidelines
javierhonduco
0
140
Other Decks in Programming
See All in Programming
maplibre-gl-layers - 地図に移動体たくさん表示したい
kekyo
PRO
0
290
AI 開発合宿を通して得た学び
niftycorp
PRO
0
150
AIコードレビューの導入・運用と AI駆動開発における「AI4QA」の取り組みについて
hagevvashi
0
500
S3ストレージクラスの「見える」「ある」「使える」は全部違う ─ 体験から見た、仕様の深淵を覗く
ya_ma23
0
750
Understanding Apache Lucene - More than just full-text search
spinscale
0
130
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
750
技術検証結果の整理と解析をAIに任せよう!
keisukeikeda
0
130
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
680
へんな働き方
yusukebe
5
2.6k
PHPで TLSのプロトコルを実装してみる
higaki_program
0
230
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
1.1k
メタプログラミングで実現する「コードを仕様にする」仕組み/nikkei-tech-talk43
nikkei_engineer_recruiting
0
200
Featured
See All Featured
The agentic SEO stack - context over prompts
schlessera
0
700
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
460
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
KATA
mclloyd
PRO
35
15k
Writing Fast Ruby
sferik
630
63k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
760
The Pragmatic Product Professional
lauravandoore
37
7.2k
Un-Boring Meetings
codingconduct
0
230
Build your cross-platform service in a week with App Engine
jlugia
234
18k
For a Future-Friendly Web
brad_frost
183
10k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
120
SEO for Brand Visibility & Recognition
aleyda
0
4.4k
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/