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
100
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
140
Understanding Ruby with BPF
javierhonduco
1
80
Spying Linux processes
javierhonduco
0
140
word2vec
javierhonduco
0
99
UC3M university cafeteria redesign
javierhonduco
0
110
Mac OSX UI toolkit and design guidelines
javierhonduco
0
170
Other Decks in Programming
See All in Programming
AIを上手に使っていこうとしたら越境せざるを得なくなった話 〜実践1年で見えた境界を越えなければならない理由と進め方〜 / Crossing borders with AI
tomoyakitaura
4
1.1k
AIは賢い。でも実行環境は? CLIおじさんがAI時代に伝えたいこと ~ CLIおじさんがAI時代に伝えたいこと ~
curekoshimizu
1
160
Discordを用いたラボオートメーション関連情報収集の自動化
noguhiro2002
0
500
RSSとCodexを使ってX投稿自動化してみた
ochtum
0
110
AIに既存システムを理解させる技術 ~レガシーを見捨てないハーネスエンジニアリング入門~
ochtum
0
210
in-process GraphQL のすすめ #ginzajs
izumin5210
4
1.5k
XHTMLが残したもの
yosuke_furukawa
PRO
2
420
異なる設計思想のフレームワークを経験して得た学び
amekuhideki
2
1.5k
レビュー履歴をAIに食わせて、 Compose移行を加速するs
shihochan
0
270
まだ間に合う!今年の夏こそSchemeのマクロ展開器を完全理解!
omasanori
0
630
高専、大学編入、そして未踏へ〜プロダクト開発とキャリアの歩み - Technical College, University Transfer, and On to “Mitou” / My Journey in Product Development and Career
pkmiya
0
140
高専キャリア LT 発表内容
crysta1221
6
5.6k
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Designing Powerful Visuals for Engaging Learning
tmiket
1
530
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.5k
HDC tutorial
michielstock
2
850
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
370
30 Presentation Tips
portentint
PRO
1
390
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
Designing for humans not robots
tammielis
254
26k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6.2k
Building Adaptive Systems
keathley
44
3.2k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4.7k
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/