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
name: "CI" | |
on: ["push", "pull_request"] | |
jobs: | |
build_and_test: | |
name: "Run tests and build artifacts" | |
strategy: | |
matrix: | |
os: ["windows-latest", "ubuntu-latest", "macOS-latest"] | |
go: ["1.14.x"] |
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
f(). | |
Str = fun(X) -> io_lib:format("~p", [X]) end. | |
Percent = fun | |
(A, 0) -> "100%"; | |
(A, B) -> [Str(round(100*A/B)), "%"] | |
end. | |
Get = fun |
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 Wx do | |
@vsn "0.0.2" | |
@author "Onorio Catenacci" | |
@author "Dominic Letz" | |
@last_revision_date "22 May 2019" | |
@moduledoc """ | |
Elixir version of the constants found in the wx.hrl file | |
""" | |
import Bitwise | |
require Record |
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
>elixir test.exs | |
Operating System: Linux | |
CPU Information: AMD Ryzen 9 6900HS with Radeon Graphics | |
Number of Available Cores: 16 | |
Available memory: 30.58 GB | |
Elixir 1.17.0 | |
Erlang 26.2.3 | |
JIT enabled: true | |
Benchmark suite executing with the following configuration: |
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
percent = fn | |
_a, 0 -> "100%" | |
a, b -> "#{round(100 * a / b)}%" | |
end | |
get = fn | |
nil, _key -> 0 | |
info, key -> | |
elem(List.keyfind(info, key, 0), 1) | |
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
#!/usr/bin/env elixir | |
Mix.install([:jason]) | |
filename = | |
case System.argv() do | |
[filename] -> | |
filename | |
_ -> | |
IO.puts("Missing filename") |