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
79
Understanding Ruby with BPF
javierhonduco
1
30
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
Boost Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
290
1年目の私に伝えたい!テストコードを怖がらなくなるためのヒント/Tips for not being afraid of test code
push_gawa
0
160
Spring gRPC について / About Spring gRPC
mackey0225
0
220
Flutter × Firebase Genkit で加速する生成 AI アプリ開発
coborinai
0
160
技術を根付かせる / How to make technology take root
kubode
1
250
一休.com のログイン体験を支える技術 〜Web Components x Vue.js 活用事例と最適化について〜
atsumim
0
490
ファインディの テックブログ爆誕までの軌跡
starfish719
2
1.1k
Formの複雑さに立ち向かう
bmthd
1
850
Grafana Loki によるサーバログのコスト削減
mot_techtalk
1
130
負債になりにくいCSSをデザイナとつくるには?
fsubal
9
2.4k
Honoをフロントエンドで使う 3つのやり方
yusukebe
7
3.3k
Linux && Docker 研修/Linux && Docker training
forrep
24
4.5k
Featured
See All Featured
Fireside Chat
paigeccino
34
3.2k
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
The Invisible Side of Design
smashingmag
299
50k
Designing for Performance
lara
604
68k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3k
Building a Scalable Design System with Sketch
lauravandoore
461
33k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
193
16k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
10
1.3k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.7k
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/