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
0
76
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
80
Understanding Ruby with BPF
javierhonduco
1
31
Spying Linux processes
javierhonduco
0
92
word2vec
javierhonduco
0
59
UC3M university cafeteria redesign
javierhonduco
0
80
Mac OSX UI toolkit and design guidelines
javierhonduco
0
110
Other Decks in Programming
See All in Programming
Conform を推す - Advocating for Conform
mizoguchicoji
3
710
DROBEの生成AI活用事例 with AWS
ippey
0
140
Datadog Workflow Automation で圧倒的価値提供
showwin
1
100
PHPのバージョンアップ時にも役立ったAST
matsuo_atsushi
0
210
Django NinjaによるAPI開発の効率化とリプレースの実践
kashewnuts
1
200
PRレビューのお供にDanger
stoticdev
1
220
一休.com のログイン体験を支える技術 〜Web Components x Vue.js 活用事例と最適化について〜
atsumim
0
770
苦しいTiDBへの移行を乗り越えて快適な運用を目指す
leveragestech
0
880
color-scheme: light dark; を完全に理解する
uhyo
7
480
パスキーのすべて ── 導入・UX設計・実装の紹介 / 20250213 パスキー開発者の集い
kuralab
3
870
Domain-Driven Transformation
hschwentner
2
1.9k
pylint custom ruleで始めるレビュー自動化
shogoujiie
0
140
Featured
See All Featured
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.1k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
27
1.9k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
1k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3k
Mobile First: as difficult as doing things right
swwweet
223
9.4k
Side Projects
sachag
452
42k
Bootstrapping a Software Product
garrettdimon
PRO
306
110k
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/