Skip to content

Instantly share code, notes, and snippets.

View kelcecil's full-sized avatar
:shipit:

Kel Cecil kelcecil

:shipit:
View GitHub Profile
@kelcecil
kelcecil / errata.md
Created July 20, 2023 14:22
Machine Learning in Elixir - Errata and Feedback

For any randos that stumble on this gist, you should consider buying Machine Learning in Elixir. Despite any notes I add here, it's an exceptional book that's worth your time and money.

Chapter 1

Pg 13

I can't get the code snippet to work as written:

cols = ~w(sepal_width sepal_length petal_length petal_width)
@kelcecil
kelcecil / readme.md
Last active August 27, 2021 19:34
Altering a table to add a new field

As mentioned at the end of class, you're now equipped with everything you need to know to add a new field our app with one exception. Our first database migration used the create/2 function to create the table and add our initial fields. We need to use the alter/2 function make modifications such as adding/modifying/or removing fields.

You can run mix ecto.gen.migration add_new_field to get something that looks like this (pay close attention to the snake case in add_new_field):

defmodule AnnieMae.Repo.Migrations.AddNewField do

Keybase proof

I hereby claim:

  • I am kelcecil on github.
  • I am kelcecil (https://keybase.io/kelcecil) on keybase.
  • I have a public key ASATNcG6-oaE-gcZJfPJJZYgpDvridCWHX7Rc1eNYJ9paQo

To claim this, I am signing this object:

@kelcecil
kelcecil / README.md
Created September 1, 2016 00:04
Implementation of binary search tree in OCaml and Rust (modeled after the OCaml solution).

Here's two implementations of a binary search tree in OCaml and Rust. The Rust version was written to deliberately look as close to the OCaml as possible (and it'd get pretty close if I used match instead of OCaml's variants). I'm pretty sure my OCaml implementation is idiomatic, and I'd like some advice on what steps I'd probably take to make the Rust example more idiomatic. My objective is to talk about how close the examples can be to each other as well as how different the examples can be (hopefully demonstrating strengths for both.)

Any other thoughts or ideas are also helpful and super appreciated!