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
79
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
87
Understanding Ruby with BPF
javierhonduco
1
39
Spying Linux processes
javierhonduco
0
96
word2vec
javierhonduco
0
68
UC3M university cafeteria redesign
javierhonduco
0
83
Mac OSX UI toolkit and design guidelines
javierhonduco
0
120
Other Decks in Programming
See All in Programming
Rethinking Data Access: The New httpResource in Angular
manfredsteyer
PRO
0
220
Spring gRPC で始める gRPC 入門 / Introduction to gRPC with Spring gRPC
mackey0225
0
140
Practical Domain-Driven Design - Workshop at NDC 2025
mufrid
0
130
〜可視化からアクセス制御まで〜 BigQuery×Looker Studioで コスト管理とデータソース認証制御する方法
cuebic9bic
2
270
從零到一:搭建你的第一個 Observability 平台
blueswen
0
220
Investigating Multithreaded PostgreSQL
macdice
0
150
「兵法」から見る質とスピード
ickx
0
200
コードに語らせよう――自己ドキュメント化が内包する楽しさについて / Let the Code Speak
nrslib
5
1.1k
ワンバイナリWebサービスのススメ
mackee
10
7.5k
バリデーションライブラリ徹底比較
nayuta999999
1
440
ts-morph実践:型を利用するcodemodのテクニック
ypresto
1
540
人には人それぞれのサービス層がある
shimabox
3
470
Featured
See All Featured
The World Runs on Bad Software
bkeepers
PRO
68
11k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.2k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
47
2.8k
Into the Great Unknown - MozCon
thekraken
39
1.8k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.3k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.8k
Side Projects
sachag
454
42k
Producing Creativity
orderedlist
PRO
346
40k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.2k
How to Think Like a Performance Engineer
csswizardry
23
1.6k
Art, The Web, and Tiny UX
lynnandtonic
298
21k
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/