Yogesh

@yogeshkd
5 Followers
5 Following
14 Posts
used to build genes👨‍🔬🧬 now software 👨‍💻with #python and #javascript
#altair charts on python-fiddle powered by #pyodide: https://python-fiddle.com/examples/altair
Online Altair Compiler

Code, compile, and run Altair programs online

Making #plotly work in #pyodide for python-fiddle was challenging but I managed to get it mostly working by exporting it to HTML and then loading it as an iframe. You can try it for yourself here: https://python-fiddle.com/saved/56SLkB0uQWYBln6ZmbSS
Python-Fiddle: Online Python Compiler, IDE, and Interpreter

Run Python code in your browser. Share code snippets with others.

Here's a #Python script you can run on Python-Fiddle to fetch your followers and display how many of them are in each instance: https://python-fiddle.com/saved/R46n7IEdrUps0prVY128

Looks like this for me:

Total followers retrieved: 585
585 accounts in 175 instances.
121 single accounts in a instance.

Follower accounts per instance:
mastodon.social: 157
fosstodon.org: 82
hachyderm.io: 26
ursal.zone: 24
bolha.one: 12
mstdn.social: 12
bolha.us: 11
mastodon.online: 7
tech.lgbt: 6
bertha.social: 6
infosec.exchange: 6
[...]

Python-Fiddle: Online Python Compiler, IDE, and Interpreter

Run Python code in your browser. Share code snippets with others.

Simply in love with Python-Fiddle: https://python-fiddle.com/

"""
Online Python Compiler, IDE, and Interpreter

This platform was created make #Python programming accessible to everyone and everywhere. You can write, run, and share Python code directly from the web browser without any need to install and maintain Python and packages on your computer.
"""

Backed by #Pyodide to run Python in your browser, it supports a long list of packages: https://pyodide.org/en/stable/usage/packages-in-pyodide.html

Thanks @yogeshkd!

#PythonFiddle

Python-Fiddle: Online Python IDE, Compiler, and Interpreter

Run Python code in your browser. Share code snippets with others.

@danzin @rzeta0 @villares I hacked together a quick demo: https://python-fiddle.com/tools/pyp5js

It's on a separate page because I don't want to load up all the extra dependencies without knowing that the user wants to use p5js. I don't know yet how to guess that because I haven't seen any imports in any of the examples.

@danzin @rzeta0 @villares There isn't a separate step of "installing" packages on python-fiddle. I just load any packages used by inspecting code. Pyodide makes that easy. You are correct though. pyp5js cannot be loaded because pyodide is unable to install some dependencies: Can't find a pure Python 3 wheel for: 'watchdog==2.1.9', 'markupsafe==2.1.1', 'cprint==1.2.2'
@danzin @villares @rzeta0 I just found out about p5 from this thread. It looks really cool. Both p5py pyp5js do not have a pure python wheel on pypi so pyodide is not able to load it. The demo loads it from a CDN but also has a bunch of extra code which I'll need to figure out the purpose of. If the extra code is not necessary, it may be feasible to load it from the CDN, but otherwise it'd be great to find a way to load the extra code from some CDN/github etc so it can stay updated.
need to work on the image quality a bit but I automatically generate OG images for previewing these code snippets
People are already sharing some interesting #python snippets with python-fiddle: https://python-fiddle.com/saved/SbrOl6Eo5ux91iGZ45pq
Python-Fiddle: Online Python Compiler, IDE, and Interpreter

Run Python code in your browser. Share code snippets with others.

@TomSwirly Thanks! Pytorch would be a great addition even if the download size is on the larger end. I don't see anyone training real models in the browser but it's just fun to send people a small script that they can quickly run and play with to understand the code better.