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
88
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
110
Understanding Ruby with BPF
javierhonduco
1
54
Spying Linux processes
javierhonduco
0
120
word2vec
javierhonduco
0
83
UC3M university cafeteria redesign
javierhonduco
0
94
Mac OSX UI toolkit and design guidelines
javierhonduco
0
140
Other Decks in Programming
See All in Programming
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1k
Apache Iceberg V3 and migration to V3
tomtanaka
0
150
CSC307 Lecture 08
javiergs
PRO
0
670
MUSUBIXとは
nahisaho
0
130
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
0
930
Basic Architectures
denyspoltorak
0
660
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
170
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
20
6.9k
Fragmented Architectures
denyspoltorak
0
150
Package Management Learnings from Homebrew
mikemcquaid
0
210
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
4
260
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
170
Featured
See All Featured
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Ruling the World: When Life Gets Gamed
codingconduct
0
140
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Typedesign – Prime Four
hannesfritz
42
2.9k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
Designing for humans not robots
tammielis
254
26k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
200
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
96
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
Designing for Timeless Needs
cassininazir
0
130
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/