Mix.install([
{:scholar, "~> 0.3.1"},
{:tucan, "~> 0.4.1"},
{:kino_vega_lite, "~> 0.1.13"}
])
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Epub do | |
def parse_container(xml) do | |
import SweetXml | |
xml | |
|> configure_parse() | |
|> xmap( | |
rootfile: [~x"//rootfile"l, full_path: ~x"./@full-path", media_type: ~x"./@media-type"] | |
) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mix.install([ | |
{:emlx, github: "elixir-nx/emlx"}, | |
{:axon, github: "elixir-nx/axon"}, | |
{:scidata, "~> 0.1.11"} | |
]) | |
Nx.default_backend(EMLX.Backend) | |
Nx.default_backend({EMLX.Backend, device: :gpu}) | |
{images, labels} = Scidata.MNIST.download() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Application.put_env(:sample, Example.Endpoint, | |
http: [ip: {127, 0, 0, 1}, port: 5001], | |
server: true, | |
live_view: [signing_salt: "aaaaaaaa"], | |
secret_key_base: String.duplicate("a", 64) | |
) | |
Mix.install([ | |
{:plug_cowboy, "~> 2.5"}, | |
{:jason, "~> 1.0"}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; -*- lexical-binding: t; -*- | |
(defvar monorepo-root-markers '(("package.json" | |
(ignores . ("node_modules"))) | |
("mix.exs" | |
(ignores . ("_build/" "deps/"))) | |
"*.asd")) | |
(defun monorepo-try-find-project (dir) | |
(let* ((found (monorepo--find-project dir))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; https://github.com/ocaml-multicore/ocaml-effects-tutorial/blob/master/sources/input_line_eff.ml | |
(define-condition conversion-failure (error) | |
((string :initarg :string)) | |
(:report (lambda (condition stream) | |
(format stream "Conversion failure ~S" (slot-value condition 'string))))) | |
(defun int-of-string (string) | |
(handler-case | |
(parse-integer string) |
NewerOlder