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
81
Understanding Ruby with BPF
javierhonduco
1
34
Spying Linux processes
javierhonduco
0
95
word2vec
javierhonduco
0
63
UC3M university cafeteria redesign
javierhonduco
0
83
Mac OSX UI toolkit and design guidelines
javierhonduco
0
110
Other Decks in Programming
See All in Programming
PHPer's Guide to Daemon Crafting Taming and Summoning
uzulla
2
1.1k
海外のアプリで見かけたかっこいいTransitionを真似てみる
shogotakasaki
1
140
リアクティブシステムの変遷から理解するalien-signals / Learning alien-signals from the evolution of reactive systems
yamanoku
2
1.2k
Day0 初心者向けワークショップ実践!ソフトウェアテストの第一歩
satohiroyuki
0
510
DomainException と Result 型で作る型安全なエラーハンドリング
karszawa
0
840
家族・子育て重視/沖縄在住を維持しながらエンジニアとしてのキャリアをどのように育てていくか?
ug
0
260
AIコーディングワークフローの試行 〜AIエージェント×ワークフローでの自動化を目指して〜
rkaga
2
1.4k
Chrome Extension Techniques from Hell
moznion
1
100
ミリしらMCP勉強会
watany
4
670
SLI/SLOの設定を進めるその前に アラート品質の改善に取り組んだ話
tanden
2
770
List とは何か? / PHPerKaigi 2025
meihei3
0
590
snacks.nvim内のセットアップ不要なプラグインを紹介 / introduce_snacks_nvim
uhooi
0
370
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
245
12k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
How to train your dragon (web standard)
notwaldorf
91
5.9k
Bash Introduction
62gerente
611
210k
How STYLIGHT went responsive
nonsquared
99
5.4k
Rebuilding a faster, lazier Slack
samanthasiow
80
8.9k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
12k
Fontdeck: Realign not Redesign
paulrobertlloyd
83
5.5k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Unsuck your backbone
ammeep
670
57k
Java REST API Framework Comparison - PWX 2021
mraible
29
8.5k
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/