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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Javier Honduvilla Coto
November 24, 2014
Programming
94
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
62
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
Liberating Ruby's Parser from Lexer Hacks
ydah
2
1.9k
AI-DLC Deep Dive
yuukiyo
9
4.7k
Back to the roots of date
jinroq
0
320
tRPCの概要と少しだけパフォーマンス
misoton665
2
220
AI時代のエンジニアリングの原則 / Engineering Principles in the AI Era
haru860
0
570
AI時代のPhpStorm最新事情 #phpcon_odawara
yusuke
0
190
GNU Makeの使い方 / How to use GNU Make
kaityo256
PRO
16
5.6k
How Swift's Type System Guides AI Agents
koher
0
290
The Less-Told Story of Socket Timeouts
coe401_
3
590
ハーネスエンジニアリングにどう向き合うか 〜ルールファイルを超えて開発プロセスを設計する〜 / How to approach harness engineering
rkaga
24
14k
CDK Deployのための ”反響定位”
watany
5
800
Kubernetes上でAgentを動かすための最新動向と押さえるべき概念まとめ
sotamaki0421
3
600
Featured
See All Featured
Paper Plane
katiecoart
PRO
1
49k
Done Done
chrislema
186
16k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.7k
Believing is Seeing
oripsolob
1
110
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
130
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
190
30 Presentation Tips
portentint
PRO
1
280
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
23k
Faster Mobile Websites
deanohume
310
31k
GitHub's CSS Performance
jonrohan
1032
470k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.9k
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/