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
99
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
73
Spying Linux processes
javierhonduco
0
130
word2vec
javierhonduco
0
93
UC3M university cafeteria redesign
javierhonduco
0
100
Mac OSX UI toolkit and design guidelines
javierhonduco
0
160
Other Decks in Programming
See All in Programming
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
180
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.7k
Spec Driven Development | AI Summit Lisbon
danielsogl
PRO
0
230
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
270
これからAgentCoreを触る方へトレンドはGatewayです
har1101
6
460
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
630
AI時代のUIはどこへ行く?その2!
yusukebe
22
7.7k
Hatena Engineer Seminar #37「言語モデルの活用に関する研究」
slashnephy
0
470
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
280
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
140
どこまでゆるくて許されるのか
tk3fftk
0
300
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
4.8k
Featured
See All Featured
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
800
Building AI with AI
inesmontani
PRO
1
1.1k
The SEO identity crisis: Don't let AI make you average
varn
0
510
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
610
For a Future-Friendly Web
brad_frost
183
10k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
Side Projects
sachag
455
43k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
350
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
410
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
760
Designing for Timeless Needs
cassininazir
1
270
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/