smacke
Show HN: Automagically synchronize subtitles with video, in-browser clientside
Input a video and subtitle file, receive a synchronized output, no need to mess with python environments are dependencies (which historically was a challenge for ffsubsync users). This works thanks to ffmpeg.wasm to extract audio + pyodide for all the python dependencies (including one I had to compile to webassembly myself in order to get voice audio detection, since all I had was the...
- https://smacke.net/ffsubsync -- automagically synchronize subtitles, now purely client-side in your browser thanks to pyodide
- https://ipyflow.github.io/ipyflow/lab/index.html?path=demo.i... -- reactive python jupyter notebooks, again in the browser thanks to pyodide / jupyterlite
- https://smacke.net/pipescript/lab/index.html?path=demo.ipynb -- magritter-like pipe / placeholder syntax for ipython / jupyter, again able to run purely in the browser
- https://smacke.net/pycograd/lab/index.html?path=pycograd_sim... -- pyccolo and pipescript-powered autograd, once again able to run purely in the browser since numpy has a wasm target (notice a theme here :) )
Show HN: Magrittr-like pipe syntax for Python
Should be `reduce[$*$]`
Show HN: Magrittr-like pipe syntax for IPython
https://github.com/smacke/pipescript
Hi HN, sharing my holiday season passion project, pipescript, which lets you write code like this in Jupyter Python notebooks:42 |> $+1 # 43The $ is a placeholder for the value in the previous pipeline step, like (.) in magrittr.There's a ton more you can do thanks to macro expansion capabilities added by pipescript. Here's 5 factorial:range(1, 6) |> reduce[$$] # 120Placeholders can also...
Show HN: Powerful pipeline syntax for IPython and Jupyter
Show HN: Powerful pipeline syntax for IPython and Jupyter
Original pdf seems to have been taking down from AOPS but is still available in the internet archive: https://web.archive.org/web/20121018044426/https://artofprob...
nbgather used static slicing to get all the code necessary to reconstruct some cell. I actually worked with Andrew Head (original nbgather author) and Shreya Shankar to implement something similar in ipyflow (but with dynamic slicing and a not-as-nice interface): https://github.com/ipyflow/ipyflow?tab=readme-ov-file#state-...
I have no doubt something like this will make its way into marimo's roadmap at some point :)
Would be cool if we could come up with a standard that works across notebooks / libraries!
Not necessarily indicative of foul play. I have two projects like this (https://github.com/smacke/ffsubsync and https://github.com/ipyflow/ipyflow) and I attribute it to not having great developer documentation.
(Similar to how every Turing complete programming language today runs on something technically weaker than a Turing machine due to finite memory.)
> PEP 669 defines a new API for profilers, debuggers, and other tools to monitor events in CPython. It covers a wide range of events, including calls, returns, lines, exceptions, jumps, and more. This means that you only pay for what you use, providing support for near-zero overhead debuggers and coverage tools. See sys.monitoring for details.
Low-overhead instrumentation opens up a whole bunch of interesting interactive use cases (i.e. Jupyter etc.), and as the author of one library that relies heavily on instrumentation (https://github.com/ipyflow/ipyflow), I'm very keen to explore the possibilities here.
https://smacke.net/papers/nbsafety.pdf https://smacke.net/papers/nbslicer.pdf
It looks like you are using a static approach for dependency inference. There are a lot of benefits to static approaches, but they can only get you so far. My JupyterCon presentation includes a bunch of examples where dynamic approaches are a must: https://t.ly/78rS
Besides that, there are a bunch of interesting design decisions about when to add edges between cells, when to break them, what metadata to annotate edges with, etc.
I'm hoping to abstract a way a bunch of the complexity by developing something like a runtime version of a language server protocol (working name "language kernel protocol") so that any editor that implements the protocol would get reactivity for free when running a kernel that likewise implements the protocol. I have an early version of this which is how IPyflow works for both Jupyter and JupyterLab; VSCode would be a great editor to add support for next.