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
89
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
110
Understanding Ruby with BPF
javierhonduco
1
56
Spying Linux processes
javierhonduco
0
120
word2vec
javierhonduco
0
84
UC3M university cafeteria redesign
javierhonduco
0
95
Mac OSX UI toolkit and design guidelines
javierhonduco
0
140
Other Decks in Programming
See All in Programming
PJのドキュメントを全部Git管理にしたら、一番喜んだのはAIだった
nanaism
0
220
grapheme_strrev関数が採択されました(あと雑感)
youkidearitai
PRO
1
190
CSC307 Lecture 11
javiergs
PRO
0
580
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
7
2.6k
AIエージェントのキホンから学ぶ「エージェンティックコーディング」実践入門
masahiro_nishimi
7
1.2k
New in Go 1.26 Implementing go fix in product development
sunecosuri
0
100
Rで始めるML・LLM活用入門
wakamatsu_takumu
0
110
並行開発のためのコードレビュー
miyukiw
2
2.1k
JPUG勉強会 OSSデータベースの内部構造を理解しよう
oga5
2
220
Swift ConcurrencyでよりSwiftyに
yuukiw00w
0
210
今更考える「単一責任原則」 / Thinking about the Single Responsibility Principle
tooppoo
3
1.2k
Claude Code、ちょっとした工夫で開発体験が変わる
tigertora7571
0
190
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
234
18k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
340
Evolving SEO for Evolving Search Engines
ryanjones
0
140
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
360
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Context Engineering - Making Every Token Count
addyosmani
9
720
Designing for Timeless Needs
cassininazir
0
150
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
310
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
380
Paper Plane
katiecoart
PRO
0
47k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.1k
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/