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
PyScriptの話
Search
2bo
July 11, 2023
Technology
320
0
Share
PyScriptの話
Python東海 第43回勉強会 発表資料
2bo
July 11, 2023
More Decks by 2bo
See All by 2bo
おっきなガジェットの回線事情
2bo
1
200
おたく監視してみた
2bo
0
96
巨大ガジェット買ってみた
2bo
0
690
ZabbixAPIをつんつんした
2bo
0
480
名古屋とお菓子🍪
2bo
0
480
名古屋 勉強会 会場 選定 2019
2bo
2
200
お城Pythonの作り方/OshiroPython
2bo
1
690
Python勉強法
2bo
0
880
Python 環境構築方法 2016
2bo
2
1.8k
Other Decks in Technology
See All in Technology
基盤を育てる 外部SaaS連携の運用
gamonges_dresscode
1
120
Claude Code を安全に使おう勉強会 / Claude Code Security Basics
masahirokawahara
12
38k
AI와 협업하는 조직으로의 여정
arawn
0
560
GKE Agent SandboxでAIが生成したコードを 安全に実行してみた
lamaglama39
0
140
No Types Needed, Just Callable Method Check
dak2
1
2.4k
国内外の生成AIセキュリティの最新動向 & AIガードレール製品「chakoshi」のご紹介 / Latest Trends in Generative AI Security (Domestic & International) & Introduction to AI Guardrail Product "chakoshi"
nttcom
4
1.6k
社内エンジニア勉強会の醍醐味と苦しみ/tamadev
nishiuma
0
260
AIが書いたコードを信じられない問題 〜レビュー負荷を下げるために変えたこと〜 / The AI Code Trust Gap: Reducing the Review Burden
bitkey
PRO
8
1.4k
AI時代 に増える データ活用先
takahal
0
340
UIライブラリに依存しすぎないReact Native設計を目指して
grandbig
0
160
VespaのParent Childを用いたフィードパフォーマンスの改善
taking
0
150
[Oracle TechNight#99] 生成AI時代のAI/ML入門 ~ AIとオラクルデータベースの関係 (後半)
oracle4engineer
PRO
1
120
Featured
See All Featured
Game over? The fight for quality and originality in the time of robots
wayneb77
1
160
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.7k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
140
Thoughts on Productivity
jonyablonski
76
5.1k
Automating Front-end Workflow
addyosmani
1370
200k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
170
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
Testing 201, or: Great Expectations
jmmastey
46
8.1k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
410
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
120
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.9k
Transcript
͓લ୭Α • ͓ࣄ αʔόʔNWΠϯϑϥԂࣇʹ͋ • झຯ ञɺຊɺϘʔυήʔϜ •
ॅΜͰΔͱ͜ ذෞʢ໊ݹͷ২ຽʣ • ίϛϡχςΟɿPython౦ւɺRaspberryPiUGɺଞ • Twitterɿ@2box2bo (΄΅͍ͳ͍) • ကɿ@
[email protected]
(͍͍ͩͨͬͪ͜) • Python౦ւୈ20ճ͘Β͍?͔ΒࢀՃ
ͳΜͱ͔GPTͱ͔ྲྀߦͬͯΔͷͰ
ڈͪΐͬͱʹͳͬͨ PyScriptͷͰ͠·͔͢
PyScriptͷ͓ Python౦ւ ୈ43ճษڧձ 2023/7/8 @2box2bo
PyScript ͬͯ·͔͢?
PyScriptͬͯԿऀ? • PyCon US 2022ͷΩʔϊʔτͰAnaconda͕ൃ දͨ͠ϒϥβͰಈ͘Python • ʮRun Python in
Your HTMLʯ • https://pyscript.net/
ϒϥβͰಈ͘ʁ
ϒϥβͰಈ͘ • WebαʔόʔͰಈ࡞ͰPythonΛಈ͔͢Θ͚Ͱ ͳ͘ɺWebϒϥβͰPythonΛಈ͔͢ • Python࣮ߦڥͷΠϯετʔϧWebϒϥ βͰಈ͔͢ͷͰෆཁ • WebAssemblyΛ༻
ͳΜͷͬͪ͜Ό? ͬͯͳΔͷͰ Ұͭͮͭઆ໌͍ͯ͘͠
WebAssemblyͬͯ? • ݩʑWebϑϩϯτΤϯυͷߴԽٕज़ͱͯ͠ ੜ • ུশWasm • RustC++ͷιʔεΛWasmʹίϯύΠϧͯ͠ JavaScriptΑΓߴʹಈ͔ٕ͢ज़ •
Disney+ͱ͔AmazonPrimeVideoͰΘΕ͍ͯΔ • PythonͷιʔείʔυWasmίϯύΠϧͰ͖ͳ ͍
Python͑ͳ͍͡ΌΜ
PyodideͬͯͷͰ͑Δ
Pyodide? • Pythonͷιʔείʔυ͕WasmίϯύΠϧͰ͖ͳ ͍ͷͰɺPython࣮ߦڥ(PythonΠϯλϓϦλ)Λ WasmίϯύΠϧͨ͠ͷ • PythonιʔείʔυΛPyodideͰ࣮ߦ͢Δ • ࠷৽0.23.3ͰPython3.11.2ΛWasmίϯύΠϧ •
…ಡΈํʮͺ͍͓͍ͩͲʯ…ʁ • ৄࡉͪ͜Β https://pyodide.org/en/stable/
Pyodided͚ͩͰPython࣮ߦ • Pyodided͚ͩͰPythonΛಈ͔ͤΔʂ • ʮpyodide.runPython(`Pythonίʔυ`);ʯ • ࢼͯ͠ΈΔͱΘ͔Γ·͕͢ɺ͜Εॻ͖ͮΒ ͍…
͜͜·Ͱͷ·ͱΊ • WebAssembly(Wasm)Λ͏ͱWebϒϥβ Ͱ৭ʑͰ͖Δ • PythonΛWasmίϯύΠϧ͢Δ͜ͱͰ͖ͳ͍ • Python࣮ߦڥΛWasmίϯύΠϧͨ͠ Pyodided͕͋Δ͕ͪΐͬͱ͍ʹ͍͘
Α͏͘PyScriptͷʹΔ
ͰɺPyScriptͬͯʁ • WebϒϥβͰಈ͘Python࣮ߦڥ • PyodidedΛ͍ͨ͘͢͠ͷ͕PyScript • PyScriptΛಡΈࠐΜͰɺ<py-script>λάͰғΜ ͩதʹPythonίʔυॻ͚ಈ͘ • ϒϥβίϯιʔϧݟͳͯ݁͘Ռදࣔ͞ΕΔ
• ͪΖΜJavaScriptͱ࿈ܞͰ͖Δ
ಈ࡞Πϝʔδ͕… • ͜Μͳײ͡Ͱಈ͍͍ͯΔ • https://anaconda.cloud/pyscript-python-in-the-browser •
ͱ͍͏͜ͱͰσϞ
σϞ • σϞίʔυ https://github.com/2bobo/PyScript-demo • ެࣜαϯϓϧ https://pyscript.net/examples/ •
·ͱΊ
PyScript·ͱΊ • Webϒϥβ্ͰPythonΛಈ͔͢͜ͱ͕Ͱ͖Δ • Python࣮ߦڥͷΠϯετʔϧෆཁʂ • (ͨΓલ͚ͩͲ)ಈ࡞͍ • ·ͩ·ͩ։ൃத͚ͩͲࠓޙظ͍ͯ͠Δ •
Կʹ͑Δ͔ʁ·ͩ·ͩ͜Ε͔Β • Anaconda͕ؔΘ͍ͬͯΔͷਖ਼…
͓ΘΓ