Skip to content

Instantly share code, notes, and snippets.

Getting Lazy with Dataflow Graphs in Elixir

Intro

What do Tensorflow, Apache Airflow, Rule Engines, and Excel have in common?

Under the hood they all use DAGs to model data-flow dependencies of the program. Using graphs to model programs is great because you can modify the program at runtime. Lets talk about doing this in Elixir for great good.

@ds604
ds604 / web-servers.md
Created February 10, 2024 11:29 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@ds604
ds604 / Matrix Examples.swift
Created February 27, 2023 21:58 — forked from JadenGeller/Matrix Examples.swift
Matrices in Swift
// Numerical matrix examples
let x: Matrix = [[10, 9, 8], [3, 2, 1]]
let y: Matrix = [[1, 2, 3], [4, 5, 6]]
let z: Matrix = [[1, 2], [3, 4], [5, 6]]
x + y // [[11, 11, 11], [7, 7, 7]]
x * y // [[10, 18, 24], [12, 10, 6]]
2 * x // [[20, 18, 16], [6, 4, 2]]
y ** z // [[22, 28], [49, 64]]

Import CustomElements from .html files

This is the technical implementation of the idea and concept described in my article “Why don’t we use HTML to author web components?

Instead of using template literals, constructors and other specifics to define CustomElements, this is a proposal to just use standard HTML to define CustomElements.

The goal is to import CustomElements like this:

@ds604
ds604 / README.md
Created April 3, 2020 08:25
SCRIPT-8
@ds604
ds604 / README.md
Created April 1, 2020 07:00
SCRIPT-8
@ds604
ds604 / bouncing-ball.markdown
Created November 13, 2018 12:02
Bouncing Ball
@ds604
ds604 / counter.markdown
Created October 29, 2018 10:42
Counter
@ds604
ds604 / index.html
Created October 27, 2018 22:42
Rich Text Editor - Draft.js example
<!--
Source https://github.com/facebook/draft-js/tree/master/examples/draft-0-10-0/rich
-->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Draft • Rich Text</title>
<style>
#target { width: 600px; }
@ds604
ds604 / index.html
Created October 27, 2018 22:34
Quill Playground
<div id="editor-container">
</div>