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
76
Spying Linux processes
javierhonduco
0
130
word2vec
javierhonduco
0
94
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
属人化した知識を、 AIが辿れる地図にする
pkshadeck
PRO
1
120
Haskell/Servantを通してWebミドルウェアを捉え直す
pizzacat83
1
630
これって Effect でできたのでは? / TSKaigi Mashup Kansai #2
susisu
0
120
Apache Hive: そしてCloud Native Lakehouseへ
okumin
1
190
Laravelで学ぶ Webアプリケーションチューニング入門/web_application_tuning_101
hanhan1978
4
1.5k
Claude Team Plan導入・ガイド
tk3fftk
0
240
なぜ関数型プログラミングで「型」と「証明」が語られるのか #fp_matsuri
kajitack
3
1.1k
自動化したのに回らないテスト運用の壁ーAI時代の品質責任と生産性
mfunaki
0
110
ソフトウェア設計に溶けるインフラ ― AWS CDK のインフラ認識論
konokenj
3
710
AWS CDK を「作」ってみた 〜フルスクラッチで見えた CDK の裏側〜 / aws-cdk-from-scratch
gotok365
3
2.7k
Built Our Own Background Agent at LayerX #aidevex_findy
layerx
PRO
9
3.8k
ここ半年くらいでAIに作らせたR用ツール
eitsupi
0
340
Featured
See All Featured
The Invisible Side of Design
smashingmag
301
52k
Product Roadmaps are Hard
iamctodd
55
12k
Visualization
eitanlees
152
17k
Mind Mapping
helmedeiros
PRO
1
290
BBQ
matthewcrist
89
10k
Ruling the World: When Life Gets Gamed
codingconduct
0
290
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
sira's awesome portfolio website redesign presentation
elsirapls
0
310
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
Code Review Best Practice
trishagee
74
20k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
230
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.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/