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
94
0
Share
Python for Java developers
Javier Honduvilla Coto
November 24, 2014
More Decks by Javier Honduvilla Coto
See All by Javier Honduvilla Coto
Debugging – Learning Linux @ Facebook
javierhonduco
0
130
Understanding Ruby with BPF
javierhonduco
1
65
Spying Linux processes
javierhonduco
0
130
word2vec
javierhonduco
0
90
UC3M university cafeteria redesign
javierhonduco
0
100
Mac OSX UI toolkit and design guidelines
javierhonduco
0
150
Other Decks in Programming
See All in Programming
個人的に嬉しかったpnpmの新機能・3選
matsuo_atsushi
0
120
Firefoxにコントリビューションして得られた学び
ken7253
2
150
ソフトウェア設計の結合バランス #phperkaigi
kajitack
0
170
How Swift's Type System Guides AI Agents
koher
0
320
Claude CodeでETLジョブ実行テストを自動化してみた
yoshikikasama
0
1.1k
エラー処理の温故知新 / history of error handling technic
ryotanakaya
7
1.8k
PHP で mp3 プレイヤーを実装しよう
m3m0r7
PRO
0
300
CDK Deployのための ”反響定位”
watany
5
920
How We Benchmarked Quarkus: Patterns and anti-patterns
hollycummins
1
170
AIベース静的検査器の偽陽性率を抑える工夫3選
orgachem
PRO
4
380
ついに来た!本格的なマルチクラウド時代の Google Cloud
maroon1st
0
340
Spec-driven Development: How AI Changes Everything (And Nothing)
simas
PRO
0
560
Featured
See All Featured
AI: The stuff that nobody shows you
jnunemaker
PRO
6
620
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
530
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
250
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.5k
Scaling GitHub
holman
464
140k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
190
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
65
54k
For a Future-Friendly Web
brad_frost
183
10k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2k
Statistics for Hackers
jakevdp
799
230k
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/