Skip to content

Instantly share code, notes, and snippets.

View ejc123's full-sized avatar

Eric.J.Christeson ejc123

  • Fargo, North Dakota, USA
View GitHub Profile
@zblanco
zblanco / dagger_demos.livemd
Last active September 26, 2023 15:30
Dagger Demos 5/3/22

Dagger Demos

Summary

Dagger is a tool for modeling your workflows as data that can be composed together at runtime.

Dagger constructs can be integrated into a Dagger.Workflow and evaluated lazily in concurrent contexts.

@zblanco
zblanco / getting_lazy_with_dataflow_graphs_in_elixir.livemd
Last active June 30, 2024 11:45
Getting Lazy with Dataflow Graphs in Elixir

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.

@gcauchon
gcauchon / !Protocol for external APIs
Last active September 8, 2023 15:47
Using protocol for external APIs
iex(1)> Foo.Correspondence.validate_number("234-555-6789")
{:ok, "Verizon Wireless", "mobile"}
@foone
foone / rptimage.py
Created September 19, 2020 04:11
RPT decoder for Super Mario 64 RPT textures from Super Mario 3D All-Stars
# To use:
# 1. extract the NCAs from the NSP (I used NSCB)
# 2. extract the contents of 5977df9d4848858cbde157c6723dd1de.nca
# 3. inside 1 [romfs]\rom\Stardust_JP\Textures you'll find texture_pack.cpio. Extract it (I uzed 7zip)
# 4. run this python 2.7 script in the directory with all the .rpt files. It'll create a out folder containing all the PNGs
import struct,glob,os,zlib
from PIL import Image
OUTDIR='out'

The citations game: Wolverton Ratios

Rubric: Software Engineering : Factual Claims : Defect Cost Increase : Wolverton Ratios

Context

See previous note on the IBM Systems Sciences Institute

In absolute numbers, the Wolverton are as follows: 139:455:977:7136:14102, claimed dollar costs of fixing an "average" defect. (Itself an absurd claim, see Leprechauns, I should perhaps write more on that.)

@alexbezhan
alexbezhan / gist:9bb140dc25c06cdfd56bc748c7fa9c19
Last active June 12, 2024 13:47
Scala Futures vs Kotlin Coroutines comparison

Scala with Futures:

import java.util.UUID
import scala.concurrent.Future

trait User {
    def isAdmin: Boolean
    def id: UUID
@rbnpi
rbnpi / FyGarRubHerOerWithStraw.rb
Last active May 23, 2017 17:10
Sonic Pi plays Fy Gar Rub Her O'er With Straw Traditional Scottish Song played on harpsichord, music from Robert Bremner The Harpsichord and Spinnet Miscellany circa 1765. Listen to it on https://soundcloud.com/scrbn/fygarrubheroerwithstraw
#Fy gar her o'er with Straw arranged for Sonic Pi by Robin Newman, May 2017
#anon scottish song
#music from The harpsichord or spinnet miscellany by Robert Bremner (c 1765)
use_synth :blade #makes a good harpsichord sound when gverb added
use_bpm 140
#note values relative to crotchet=1
m=2;cd=1.5;c=1;q=0.5;sq=0.25;dsq=0.125;hdsq=0.0625;qd=0.75
define :shake do |n,d,f=0| #quick entry for ornament
@Ch4s3
Ch4s3 / install_and_deploy_elixir_phoenix_on_centos7_rhel.md
Last active April 30, 2022 19:44
Instructions for installing Elixir 1.4, Phoenix 1.2.x, and Erlang 19+ on Centos7/RHEL and deploy with edeliver and distillery. Webpack + React + Yarn for JS

Set the environment variables

Install nano(or not if you intend to use vi)

yum install -y nano

Open ~/.profile with nano ~/.profile and add the following:

@srdjan-m
srdjan-m / optimized_badass.rb
Last active December 29, 2016 02:56
sonic_pi: optimized badass
# "The Optimized Badass"
# Sonic Pi v2.11
# ----------------------------------------
# Samples used in this song can be downloaded from:
# https://dl.dropboxusercontent.com/u/657073/sonicpi/badass-samples.zip
# Unpack and put them into your samples folder.
# ----------------------------------------
# This file is too long to be played from the Sonic Pi IDE
# Instead of pasting this code, just enter the following into the Sonic Pi editor:
# run_file "/path/to/this_file.rb"
@emlyn
emlyn / guitar.rb
Last active May 14, 2024 14:11
Strumming guitar chords in Sonic Pi
# Guitar Strumming - by Emlyn
# This tries to work out the guitar (or ukulele etc.) fingering for arbitrary chords (and tuning).
# It seems to work reasonably well for basic chords, but is quite naive and probably makes many mistakes.
# Ideas, bug reports, fixes etc. gratefully received, just comment below, or tweet @emlyn77.
# Feel free to make use of this code as you like (with attribution if you feel like it, but you don't have to).
# Thanks to @Project_Hell_CK for fixing the tuning, and spotting that it gets chord(:f, :major) not quite right.
# Next note higher or equal to base note n, that is in the chord c
define :next_note do |n, c|
# Make sure n is a number