hexsha stringlengths 40 40 | size int64 2 991k | ext stringclasses 2
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 208 | max_stars_repo_name stringlengths 6 106 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses list | max_stars_count int64 1 33.5k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 208 | max_issues_repo_name stringlengths 6 106 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses list | max_issues_count int64 1 16.3k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 208 | max_forks_repo_name stringlengths 6 106 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses list | max_forks_count int64 1 6.91k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 991k | avg_line_length float64 1 36k | max_line_length int64 1 977k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
038b04663d2e8b06ba1234474410ccd2d71dd1c3 | 1,717 | ex | Elixir | clients/tasks/lib/google_api/tasks/v1/model/task_lists.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/tasks/lib/google_api/tasks/v1/model/task_lists.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/tasks/lib/google_api/tasks/v1/model/task_lists.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | 1 | 2018-07-28T20:50:50.000Z | 2018-07-28T20:50:50.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 31.796296 | 112 | 0.727432 |
038b3093471fa0e7bc089bbf38f385d1e4fe7014 | 892 | ex | Elixir | clients/composer/lib/google_api/composer/v1beta1/metadata.ex | jechol/elixir-google-api | 0290b683dfc6491ca2ef755a80bc329378738d03 | [
"Apache-2.0"
] | null | null | null | clients/composer/lib/google_api/composer/v1beta1/metadata.ex | jechol/elixir-google-api | 0290b683dfc6491ca2ef755a80bc329378738d03 | [
"Apache-2.0"
] | null | null | null | clients/composer/lib/google_api/composer/v1beta1/metadata.ex | jechol/elixir-google-api | 0290b683dfc6491ca2ef755a80bc329378738d03 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 33.037037 | 74 | 0.761211 |
038b334f155cf2cd25befb8f029aac1cf309b452 | 118 | ex | Elixir | lib/ecto_network.ex | kianmeng/ecto_network | ed999f408310135d506abc9cb39c6907686b7ed5 | [
"MIT"
] | 41 | 2016-06-30T09:29:35.000Z | 2022-02-02T21:19:44.000Z | lib/ecto_network.ex | kianmeng/ecto_network | ed999f408310135d506abc9cb39c6907686b7ed5 | [
"MIT"
] | 22 | 2016-09-02T02:39:35.000Z | 2021-07-18T12:30:53.000Z | lib/ecto_network.ex | kianmeng/ecto_network | ed999f408310135d506abc9cb39c6907686b7ed5 | [
"MIT"
] | 23 | 2016-08-24T03:16:02.000Z | 2021-09-08T18:19:05.000Z | defmodule EctoNetwork do
@moduledoc ~S"""
Ecto types to support MACADDR, CIDR, and INET Postgrex types.
"""
end
| 19.666667 | 63 | 0.711864 |
038b3ac6fbc71e8a7b10e6b4427ce5871f03f46b | 132 | ex | Elixir | lib/rmc_web/views/screen_view.ex | robbyronk/race-control | f44922cb151c04ccf0e30fa226e49323c537ce2b | [
"Apache-2.0"
] | null | null | null | lib/rmc_web/views/screen_view.ex | robbyronk/race-control | f44922cb151c04ccf0e30fa226e49323c537ce2b | [
"Apache-2.0"
] | null | null | null | lib/rmc_web/views/screen_view.ex | robbyronk/race-control | f44922cb151c04ccf0e30fa226e49323c537ce2b | [
"Apache-2.0"
] | null | null | null | defmodule RmcWeb.ScreenView do
use RmcWeb, :view
def render("index.json", %{screen_data: data}) do
%{data: data}
end
end
| 16.5 | 51 | 0.674242 |
038b4b03c5fc97cbaaccbe41fcaad3a75f7acdcd | 922 | ex | Elixir | lib/types/parsed/hark/unread.ex | mirtyl-wacdec/urbit_ex | 82db4e96c2f3dc2a28e65c442350d7f8b228901f | [
"MIT"
] | 7 | 2021-05-22T12:05:41.000Z | 2021-08-11T20:05:59.000Z | lib/types/parsed/hark/unread.ex | mirtyl-wacdec/urbit_ex | 82db4e96c2f3dc2a28e65c442350d7f8b228901f | [
"MIT"
] | null | null | null | lib/types/parsed/hark/unread.ex | mirtyl-wacdec/urbit_ex | 82db4e96c2f3dc2a28e65c442350d7f8b228901f | [
"MIT"
] | 2 | 2021-05-29T10:10:52.000Z | 2021-08-11T20:06:07.000Z | defmodule UrbitEx.Unread do
@derive Jason.Encoder
alias UrbitEx.Resource
defstruct resource: %Resource{},
index: "/",
last: DateTime.utc_now(),
count: nil,
each: nil
def new(map) do
[type] = map["stats"]["unreads"] |> Map.keys
pair = [{String.to_atom(typ... | 22.487805 | 69 | 0.570499 |
038b5c9512387a0dac5ee189d4092ef806b9fc8c | 576 | ex | Elixir | lib/reflux/packet.ex | lowlandresearch/reflux | 1fa23e4d609bfa0a27f5f231abbfa28c8835f1f2 | [
"MIT"
] | null | null | null | lib/reflux/packet.ex | lowlandresearch/reflux | 1fa23e4d609bfa0a27f5f231abbfa28c8835f1f2 | [
"MIT"
] | null | null | null | lib/reflux/packet.ex | lowlandresearch/reflux | 1fa23e4d609bfa0a27f5f231abbfa28c8835f1f2 | [
"MIT"
] | null | null | null | defmodule PacketDecoder do
@moduledoc """
Given network packet data as a bitstring, this behaviour responsible
for decoding it into the relevant data structure.
"""
@callback from_bitstring(bitstring) :: String.t
end
defprotocol PacketEncoder do
@moduledoc """
Given some packet data structure, this p... | 26.181818 | 70 | 0.730903 |
038b63f672cce9dfac23cde21e8eba7d7d0e9995 | 1,266 | ex | Elixir | lib/blog_api_web/views/error_helpers.ex | ivoferro/CSIAN_Blog_Management | ad95a7e479090adb04c80e1fc635a400b3aa69c2 | [
"MIT"
] | null | null | null | lib/blog_api_web/views/error_helpers.ex | ivoferro/CSIAN_Blog_Management | ad95a7e479090adb04c80e1fc635a400b3aa69c2 | [
"MIT"
] | null | null | null | lib/blog_api_web/views/error_helpers.ex | ivoferro/CSIAN_Blog_Management | ad95a7e479090adb04c80e1fc635a400b3aa69c2 | [
"MIT"
] | null | null | null | defmodule BlogApiWeb.ErrorHelpers do
@moduledoc """
Conveniences for translating and building error messages.
"""
use Phoenix.HTML
@doc """
Generates tag for inlined form input errors.
"""
def error_tag(form, field) do
Enum.map(Keyword.get_values(form.errors, field), fn (error) ->
content_ta... | 30.878049 | 76 | 0.670616 |
038b68a245325dcf015bc8aacc1edd890161a034 | 1,666 | ex | Elixir | apps/mcam_server_web/lib/mcam_server_web/image_streaming/camera_comms_socket.ex | paulanthonywilson/mcam | df9c5aaae00b568749dff22613636f5cb92f905a | [
"MIT"
] | null | null | null | apps/mcam_server_web/lib/mcam_server_web/image_streaming/camera_comms_socket.ex | paulanthonywilson/mcam | df9c5aaae00b568749dff22613636f5cb92f905a | [
"MIT"
] | 8 | 2020-11-16T09:59:12.000Z | 2020-11-16T10:13:07.000Z | apps/mcam_server_web/lib/mcam_server_web/image_streaming/camera_comms_socket.ex | paulanthonywilson/mcam | df9c5aaae00b568749dff22613636f5cb92f905a | [
"MIT"
] | null | null | null | defmodule McamServerWeb.ImageStreaming.CameraCommsSocket do
@moduledoc """
Socket that communicates with "cameras" (Pi Zeros).
"""
@behaviour Phoenix.Socket.Transport
require Logger
alias McamServer.Cameras
@acknowledge_image_receipt "\n"
@ten_minutes 10 * 60 * 1_000
@token_refresh_period @ten_min... | 27.766667 | 87 | 0.678872 |
038b89abcfc80a57d49c88d32e7e883ebd8ed9e8 | 937 | exs | Elixir | lib/mix/test/mix/tasks/compile.erlang_test.exs | Nicd/elixir | e62ef92a4be1b562033d35b2d822cc9d6c661077 | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/tasks/compile.erlang_test.exs | Nicd/elixir | e62ef92a4be1b562033d35b2d822cc9d6c661077 | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/tasks/compile.erlang_test.exs | Nicd/elixir | e62ef92a4be1b562033d35b2d822cc9d6c661077 | [
"Apache-2.0"
] | null | null | null | Code.require_file "../../test_helper.exs", __DIR__
defmodule Mix.Tasks.Compile.ErlangTest do
use MixTest.Case
test "tries to compile src/a.erl" do
in_fixture "compile_erlang", fn ->
output = mix "compile"
assert output =~ "src/a.erl:4: syntax error"
end
end
test "compiles src/b.erl and s... | 23.425 | 57 | 0.629669 |
038b9c1290f1cc95555295d320cf6fdda0f977af | 5,301 | ex | Elixir | lib/oban/telemetry.ex | milmazz/oban | a45c986d4f58870fa8dda47543f5d04e75054960 | [
"Apache-2.0"
] | 1 | 2021-11-20T19:16:24.000Z | 2021-11-20T19:16:24.000Z | lib/oban/telemetry.ex | benwilson512/oban | caccd675ee7b4537bc1e58fa49973932ad685506 | [
"Apache-2.0"
] | null | null | null | lib/oban/telemetry.ex | benwilson512/oban | caccd675ee7b4537bc1e58fa49973932ad685506 | [
"Apache-2.0"
] | null | null | null | defmodule Oban.Telemetry do
@moduledoc """
Telemetry integration for event metrics, logging and error reporting.
### Job Events
Oban emits an event after a job executes: `[:oban, :success]` if the job succeeded or `[:oban,
:failure]` if there was an error or the process crashed.
All job events share the ... | 35.10596 | 110 | 0.631956 |
038ba745e95810af6fc61b12d98d819f97a5df62 | 489 | ex | Elixir | system5/lib/beb.ex | mihaivanea/broadcast_algorithms | 124a93791c0589e4f56088fe98b0a3469b3d90c7 | [
"MIT"
] | null | null | null | system5/lib/beb.ex | mihaivanea/broadcast_algorithms | 124a93791c0589e4f56088fe98b0a3469b3d90c7 | [
"MIT"
] | null | null | null | system5/lib/beb.ex | mihaivanea/broadcast_algorithms | 124a93791c0589e4f56088fe98b0a3469b3d90c7 | [
"MIT"
] | null | null | null | # Mihail Vanea (mv1315)
defmodule BEB do
def start() do
receive do
{:bind, pl, app, neighbours} -> next(pl, app, neighbours)
end
end
defp next(pl, app, neighbours) do
receive do
{:broadcast, message, from} ->
for n <- neighbours, do:
send(pl, {:beb_broadcast, n, messa... | 21.26087 | 63 | 0.578732 |
038badeb1367cf2708f06e92a9cb1e0a712ee679 | 16,269 | ex | Elixir | lib/sanbase/billing/subscription.ex | sitedata/sanbase2 | 8da5e44a343288fbc41b68668c6c80ae8547d557 | [
"MIT"
] | null | null | null | lib/sanbase/billing/subscription.ex | sitedata/sanbase2 | 8da5e44a343288fbc41b68668c6c80ae8547d557 | [
"MIT"
] | 1 | 2021-07-24T16:26:03.000Z | 2021-07-24T16:26:03.000Z | lib/sanbase/billing/subscription.ex | sitedata/sanbase2 | 8da5e44a343288fbc41b68668c6c80ae8547d557 | [
"MIT"
] | null | null | null | defmodule Sanbase.Billing.Subscription do
@moduledoc """
Module for managing user subscriptions - create, upgrade/downgrade, cancel.
Also containing some helper functions that take user subscription as argument and
return some properties of the subscription plan.
"""
use Ecto.Schema
import Ecto.Changeset... | 31.346821 | 128 | 0.684922 |
038bd45d80035f85eafcb76bc3bc10866467ea42 | 2,376 | ex | Elixir | clients/sheets/lib/google_api/sheets/v4/model/update_conditional_format_rule_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/sheets/lib/google_api/sheets/v4/model/update_conditional_format_rule_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/sheets/lib/google_api/sheets/v4/model/update_conditional_format_rule_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 40.271186 | 153 | 0.722643 |
038bea75928e921901ec9ed89cc8f81ca684fc91 | 1,262 | exs | Elixir | test/test_helper.exs | AdamT/axon | 083e1404e7cd4a3346e4728a43f2a6bded500b1f | [
"Apache-2.0"
] | null | null | null | test/test_helper.exs | AdamT/axon | 083e1404e7cd4a3346e4728a43f2a6bded500b1f | [
"Apache-2.0"
] | null | null | null | test/test_helper.exs | AdamT/axon | 083e1404e7cd4a3346e4728a43f2a6bded500b1f | [
"Apache-2.0"
] | null | null | null | ExUnit.start()
defmodule AxonTestUtil do
def check_optimizer!(optimizer, loss, x0, num_steps) do
check_optimizer_functions!(optimizer)
check_optimizer_run!(optimizer, loss, x0, num_steps)
end
defp check_optimizer_functions!(optimizer) do
{init_fn, update_fn} = optimizer
is_function(init_fn, 1) a... | 25.24 | 77 | 0.635499 |
038c06010e2fb8440e7a06465bc13f3bdcd52fd1 | 2,742 | exs | Elixir | test/alfred_result_test.exs | lee-dohm/alfred-ex | 109939aa8cf3e7f87be57cdc569c701fde9d1920 | [
"MIT"
] | 5 | 2018-01-23T05:49:32.000Z | 2020-01-26T17:54:57.000Z | test/alfred_result_test.exs | lee-dohm/alfred-ex | 109939aa8cf3e7f87be57cdc569c701fde9d1920 | [
"MIT"
] | 1 | 2017-11-11T18:31:18.000Z | 2017-11-11T18:31:18.000Z | test/alfred_result_test.exs | lee-dohm/alfred-ex | 109939aa8cf3e7f87be57cdc569c701fde9d1920 | [
"MIT"
] | 1 | 2019-12-28T11:33:37.000Z | 2019-12-28T11:33:37.000Z | defmodule Alfred.ResultTest do
use ExUnit.Case, async: true
doctest Alfred.Result
alias Alfred.Result
import Test.Helpers
describe "basic results" do
test "happy path" do
result = Result.new("title", "subtitle")
assert %Result{} = result
assert result.title == "title"
assert r... | 24.702703 | 77 | 0.60868 |
038c1812f905c36442e4432474b7c57e6e1fe0f4 | 2,804 | exs | Elixir | test/teslamate/settings_test.exs | normalfaults/teslamate | 9c61150bd5614728447e21789ab6edc5169b631e | [
"MIT"
] | 1 | 2020-05-17T05:05:22.000Z | 2020-05-17T05:05:22.000Z | test/teslamate/settings_test.exs | normalfaults/teslamate | 9c61150bd5614728447e21789ab6edc5169b631e | [
"MIT"
] | null | null | null | test/teslamate/settings_test.exs | normalfaults/teslamate | 9c61150bd5614728447e21789ab6edc5169b631e | [
"MIT"
] | null | null | null | defmodule TeslaMate.SettingsTest do
use TeslaMate.DataCase, async: false
alias TeslaMate.Settings.Settings, as: S
alias TeslaMate.Settings
describe "settings" do
@update_attrs %{
unit_of_length: :mi,
unit_of_temperature: :F,
suspend_min: 60,
suspend_after_idle_min: 60,
req_no... | 33.783133 | 87 | 0.659415 |
038c19476ea78231cd1c338c9bf804fed7813cf6 | 6,524 | exs | Elixir | lib/elixir/test/elixir/gen_server_test.exs | tmbb/exdocs_makedown_demo | 6a0039c54d2fa10d79c080efcef8d70d359678f8 | [
"Apache-2.0"
] | 1 | 2017-07-25T21:46:25.000Z | 2017-07-25T21:46:25.000Z | lib/elixir/test/elixir/gen_server_test.exs | tmbb/exdocs_makedown_demo | 6a0039c54d2fa10d79c080efcef8d70d359678f8 | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/gen_server_test.exs | tmbb/exdocs_makedown_demo | 6a0039c54d2fa10d79c080efcef8d70d359678f8 | [
"Apache-2.0"
] | 1 | 2017-07-25T21:46:48.000Z | 2017-07-25T21:46:48.000Z | Code.require_file "test_helper.exs", __DIR__
defmodule GenServerTest do
use ExUnit.Case, async: true
defmodule Stack do
use GenServer
def handle_call(:pop, _from, [h | t]) do
{:reply, h, t}
end
def handle_call(:noreply, _from, h) do
{:noreply, h}
end
def handle_call(request,... | 33.45641 | 159 | 0.625077 |
038c4568d29c29a0095bdab09fb3aec4f3b1afad | 10,026 | exs | Elixir | test/course_planner_web/controllers/teacher_controller_test.exs | digitalnatives/course_planner | 27b1c8067edc262685e9c4dcbfcf82633bc8b8dc | [
"MIT"
] | 38 | 2017-04-11T13:37:38.000Z | 2021-05-22T19:35:36.000Z | test/course_planner_web/controllers/teacher_controller_test.exs | digitalnatives/course_planner | 27b1c8067edc262685e9c4dcbfcf82633bc8b8dc | [
"MIT"
] | 226 | 2017-04-07T13:14:14.000Z | 2018-03-08T16:50:11.000Z | test/course_planner_web/controllers/teacher_controller_test.exs | digitalnatives/course_planner | 27b1c8067edc262685e9c4dcbfcf82633bc8b8dc | [
"MIT"
] | 7 | 2017-08-30T23:58:13.000Z | 2021-03-28T11:50:45.000Z | defmodule CoursePlanner.TeacherControllerTest do
use CoursePlannerWeb.ConnCase
alias CoursePlanner.{Repo, Accounts.User}
import CoursePlanner.Factory
setup do
{:ok, conn: login_as(:coordinator)}
end
defp login_as(user_type) do
user_type
|> insert()
|> guardian_login_html()
end
test "... | 37.410448 | 121 | 0.691103 |
038c76c658d26e6ec234663162534df4707df968 | 509 | ex | Elixir | fixtures/elixir_output/patch.ex | martinsirbe/curlconverter | c5324e85d2ca24ef4743fb2bb36139d23367e293 | [
"MIT"
] | 6 | 2021-10-01T18:49:49.000Z | 2022-01-18T22:49:39.000Z | fixtures/elixir_output/patch.ex | martinsirbe/curlconverter | c5324e85d2ca24ef4743fb2bb36139d23367e293 | [
"MIT"
] | null | null | null | fixtures/elixir_output/patch.ex | martinsirbe/curlconverter | c5324e85d2ca24ef4743fb2bb36139d23367e293 | [
"MIT"
] | 1 | 2021-06-09T17:10:12.000Z | 2021-06-09T17:10:12.000Z | request = %HTTPoison.Request{
method: :patch,
url: "https://ci.example.com/go/api/agents/adb9540a-b954-4571-9d9b-2f330739d4da",
options: [hackney: [basic_auth: {~s|username|, ~s|password|}]],
headers: [
{~s|Accept|, ~s|application/vnd.go.cd.v4+json|},
{~s|Content-Type|, ~s|application/json|},
],
par... | 36.357143 | 138 | 0.650295 |
038c8c59126a3ee601f61a0ece06e0d93cb4adca | 259 | ex | Elixir | examples/echo_phoenix/lib/echo_phoenix.ex | wingyplus/line_ex | 73ae52c5c07998dac55f5f11aa9ce79d751b67d6 | [
"MIT"
] | 3 | 2021-07-27T21:29:43.000Z | 2021-08-06T11:52:24.000Z | examples/echo_phoenix/lib/echo_phoenix.ex | wingyplus/line_ex | 73ae52c5c07998dac55f5f11aa9ce79d751b67d6 | [
"MIT"
] | 7 | 2021-07-26T03:18:39.000Z | 2021-10-11T11:16:49.000Z | examples/echo_phoenix/lib/echo_phoenix.ex | wingyplus/line_ex | 73ae52c5c07998dac55f5f11aa9ce79d751b67d6 | [
"MIT"
] | 1 | 2021-07-29T16:13:47.000Z | 2021-07-29T16:13:47.000Z | defmodule EchoPhoenix do
@moduledoc """
EchoPhoenix keeps the contexts that define your domain
and business logic.
Contexts are also responsible for managing your data, regardless
if it comes from the database, an external API or others.
"""
end
| 25.9 | 66 | 0.760618 |
038ce92852ce2f6a558cc5d5b23cf3a0b1a7ac34 | 2,472 | exs | Elixir | lib/iex/test/iex/options_test.exs | bruce/elixir | d77ccf941541959079e5f677f8717da24b486fac | [
"Apache-2.0"
] | 1 | 2017-09-09T20:59:04.000Z | 2017-09-09T20:59:04.000Z | lib/iex/test/iex/options_test.exs | bruce/elixir | d77ccf941541959079e5f677f8717da24b486fac | [
"Apache-2.0"
] | null | null | null | lib/iex/test/iex/options_test.exs | bruce/elixir | d77ccf941541959079e5f677f8717da24b486fac | [
"Apache-2.0"
] | null | null | null | Code.require_file "../test_helper.exs", __DIR__
defmodule IEx.OptionsTest do
use IEx.Case
@doc """
Hello, I have %{red}ANSI%{reset} escapes.
"""
def ansi_escapes, do: :ok
unless match?({:win32,_}, :os.type) do
test "color" do
opts = [colors: [enabled: true, eval_result: "red"]]
assert cap... | 38.030769 | 118 | 0.596278 |
038d2e5a815ff394df6ddaf577a914a05f760087 | 4,163 | exs | Elixir | exercism/elixir/simple-linked-list/test/linked_list_test.exs | Tyyagoo/studies | f8fcc3a539cfb6d04a149174c88bf2208e220b96 | [
"Unlicense"
] | null | null | null | exercism/elixir/simple-linked-list/test/linked_list_test.exs | Tyyagoo/studies | f8fcc3a539cfb6d04a149174c88bf2208e220b96 | [
"Unlicense"
] | null | null | null | exercism/elixir/simple-linked-list/test/linked_list_test.exs | Tyyagoo/studies | f8fcc3a539cfb6d04a149174c88bf2208e220b96 | [
"Unlicense"
] | null | null | null | defmodule LinkedListTest do
use ExUnit.Case
test "count/1 of new list" do
list = LinkedList.new()
assert LinkedList.count(list) == 0
end
test "empty?/1 of new list" do
list = LinkedList.new()
assert LinkedList.empty?(list)
end
test "count/1 of list of 1 datum" do
list = LinkedList.new... | 29.316901 | 80 | 0.644968 |
038d349a3142d0c928a396e3b4bd0288e4525bfb | 720 | ex | Elixir | lib/diversity_in_tech/companies/review.ex | dreamingechoes/diversity-in-tech | 4eb5dadf69f82fd08e1cdd1b125264930d3b4e6f | [
"MIT"
] | 8 | 2018-06-22T05:43:30.000Z | 2020-04-13T20:31:40.000Z | lib/diversity_in_tech/companies/review.ex | dreamingechoes/diversity-in-tech | 4eb5dadf69f82fd08e1cdd1b125264930d3b4e6f | [
"MIT"
] | null | null | null | lib/diversity_in_tech/companies/review.ex | dreamingechoes/diversity-in-tech | 4eb5dadf69f82fd08e1cdd1b125264930d3b4e6f | [
"MIT"
] | null | null | null | defmodule DiversityInTech.Companies.Review do
use Ecto.Schema
import Ecto.Changeset
alias DiversityInTech.Companies.AttributeReview
alias DiversityInTech.Companies.Review
schema "reviews" do
field(:advice, :string)
field(:cons, :string)
field(:pros, :string)
field(:status, ReviewStatusEnum)
... | 23.225806 | 74 | 0.704167 |
038d51c54011b175836644ff6748d3cc7625db7f | 693 | ex | Elixir | lib/config_cat/constants.ex | kianmeng/elixir-sdk | 89fb73f6249f82ac8415246519c17ad4ade54760 | [
"MIT"
] | null | null | null | lib/config_cat/constants.ex | kianmeng/elixir-sdk | 89fb73f6249f82ac8415246519c17ad4ade54760 | [
"MIT"
] | null | null | null | lib/config_cat/constants.ex | kianmeng/elixir-sdk | 89fb73f6249f82ac8415246519c17ad4ade54760 | [
"MIT"
] | null | null | null | defmodule ConfigCat.Constants do
@moduledoc false
defmacro base_url_global, do: "https://cdn-global.configcat.com"
defmacro base_url_eu_only, do: "https://cdn-eu.configcat.com"
defmacro base_path, do: "configuration-files"
defmacro config_filename, do: "config_v5.json"
defmacro feature_flags, do: "f"
d... | 30.130435 | 66 | 0.730159 |
038d600fd66a353b72d30420de01b8175943b6e8 | 206 | ex | Elixir | lib/school_house_web/views/layout_view.ex | fmterrorf/school_house | b3a1374d4b23fbc027b6bc9c95004c6556c48bf0 | [
"Apache-2.0"
] | 90 | 2021-02-10T23:57:52.000Z | 2022-03-17T18:36:55.000Z | lib/school_house_web/views/layout_view.ex | fmterrorf/school_house | b3a1374d4b23fbc027b6bc9c95004c6556c48bf0 | [
"Apache-2.0"
] | 120 | 2021-02-11T00:32:44.000Z | 2022-03-23T04:11:59.000Z | lib/school_house_web/views/layout_view.ex | fmterrorf/school_house | b3a1374d4b23fbc027b6bc9c95004c6556c48bf0 | [
"Apache-2.0"
] | 18 | 2021-04-15T09:57:44.000Z | 2022-03-23T02:55:26.000Z | defmodule SchoolHouseWeb.LayoutView do
use SchoolHouseWeb, :view
def render_dark_mode?(conn) do
case Map.get(conn.query_params, "ui", nil) do
"dark" -> "dark"
_ -> ""
end
end
end
| 18.727273 | 49 | 0.640777 |
038dbf31935dfe872bf24b8dabb7553e3df8eefa | 628 | ex | Elixir | lib/nudge_api/users/user.ex | feelja-tech/feelja-api | 03ce15430460cf2dac24a7740242c7e5ac5c5804 | [
"MIT"
] | null | null | null | lib/nudge_api/users/user.ex | feelja-tech/feelja-api | 03ce15430460cf2dac24a7740242c7e5ac5c5804 | [
"MIT"
] | null | null | null | lib/nudge_api/users/user.ex | feelja-tech/feelja-api | 03ce15430460cf2dac24a7740242c7e5ac5c5804 | [
"MIT"
] | null | null | null | defmodule NudgeApi.Users.User do
use Ecto.Schema
import Ecto.Changeset
schema "users" do
field :phone_number, :string
field :sms_code, :string
field :state, NudgeApi.Fsms.UserStateEnum
field :otp, :string
field :otp_expires_at, :utc_datetime
has_one :user_profile, NudgeApi.Users.UserProf... | 20.258065 | 53 | 0.664013 |
038dd6727bdedf35780772bd9b65769a0905ce74 | 2,795 | ex | Elixir | clients/service_networking/lib/google_api/service_networking/v1/model/system_parameters.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/service_networking/lib/google_api/service_networking/v1/model/system_parameters.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/service_networking/lib/google_api/service_networking/v1/model/system_parameters.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 34.9375 | 136 | 0.696601 |
038df15fafa4359d47c8786d282b932ecb1c9de8 | 3,891 | ex | Elixir | lib/trie/destroyer.ex | DigixGlobal/merkle_patricia_tree | 76e6b1bca9f7d96592350132bab37fdffcbec09b | [
"MIT"
] | 20 | 2017-06-20T12:46:54.000Z | 2022-02-03T10:38:11.000Z | lib/trie/destroyer.ex | DigixGlobal/merkle_patricia_tree | 76e6b1bca9f7d96592350132bab37fdffcbec09b | [
"MIT"
] | 7 | 2017-08-30T19:30:57.000Z | 2018-05-01T20:15:14.000Z | lib/trie/destroyer.ex | DigixGlobal/merkle_patricia_tree | 76e6b1bca9f7d96592350132bab37fdffcbec09b | [
"MIT"
] | 13 | 2017-08-21T13:03:14.000Z | 2021-05-25T17:51:20.000Z | defmodule MerklePatriciaTree.Trie.Destroyer do
@moduledoc """
Destroyer is responsible for removing keys from a
merkle trie. To remove a key, we need to make a
delta to our trie which ends up as the canonical
form of the given tree as defined in http://gavwood.com/Paper.pdf.
Note: this algorithm is non-obv... | 31.634146 | 97 | 0.659728 |
038df260dfe8f83bc039b65495efc6c444343ae7 | 2,803 | ex | Elixir | clients/document_ai/lib/google_api/document_ai/v1/model/google_cloud_documentai_v1beta1_document_page_anchor_page_ref.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/document_ai/lib/google_api/document_ai/v1/model/google_cloud_documentai_v1beta1_document_page_anchor_page_ref.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/document_ai/lib/google_api/document_ai/v1/model/google_cloud_documentai_v1beta1_document_page_anchor_page_ref.ex | dazuma/elixir-google-api | 6a9897168008efe07a6081d2326735fe332e522c | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 43.123077 | 295 | 0.730289 |
038dfe85b3b14dd56d828631565c9f1922de6409 | 61,259 | ex | Elixir | lib/elixir/lib/calendar/datetime.ex | jmbejar/elixir | 4a5fcbe04a5a477e27c6645a8a4bdb98332fb6eb | [
"Apache-2.0"
] | 1 | 2019-06-27T08:47:13.000Z | 2019-06-27T08:47:13.000Z | lib/elixir/lib/calendar/datetime.ex | jmbejar/elixir | 4a5fcbe04a5a477e27c6645a8a4bdb98332fb6eb | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/calendar/datetime.ex | jmbejar/elixir | 4a5fcbe04a5a477e27c6645a8a4bdb98332fb6eb | [
"Apache-2.0"
] | 1 | 2021-12-09T11:36:07.000Z | 2021-12-09T11:36:07.000Z | defmodule DateTime do
@moduledoc """
A datetime implementation with a time zone.
This datetime can be seen as a snapshot of a date and time
at a given time zone. For such purposes, it also includes both
UTC and Standard offsets, as well as the zone abbreviation
field used exclusively for formatting purpose... | 35.368938 | 306 | 0.642975 |
038e1259b1530ff4548f4ba9991ea2ce30fce692 | 2,533 | exs | Elixir | farmbot_os/test/farmbot_os/syscalls/pin_control_test.exs | adamswsk/farmbot_os | d177d3b74888c1e7bcbf8f8595818708ee97f73b | [
"MIT"
] | 1 | 2021-04-22T10:18:50.000Z | 2021-04-22T10:18:50.000Z | farmbot_os/test/farmbot_os/syscalls/pin_control_test.exs | adamswsk/farmbot_os | d177d3b74888c1e7bcbf8f8595818708ee97f73b | [
"MIT"
] | null | null | null | farmbot_os/test/farmbot_os/syscalls/pin_control_test.exs | adamswsk/farmbot_os | d177d3b74888c1e7bcbf8f8595818708ee97f73b | [
"MIT"
] | null | null | null | defmodule FarmbotOS.SysCalls.PinControlTest do
use ExUnit.Case
use Mimic
setup :verify_on_exit!
alias FarmbotOS.SysCalls.PinControl
alias FarmbotCore.Asset.Peripheral
@digital 0
@tag :capture_log
test "read_pin with %Peripheral{}, pin is 1" do
expect(FarmbotFirmware, :request, 1, fn
{:pin_rea... | 25.846939 | 72 | 0.596131 |
038e3cd4f3db6644fe121763109252bb03eff664 | 236 | ex | Elixir | lib/benchee/output/profile_printer.ex | mayel/benchee | faf3c85c241a4c7eeaab8edfc85094bbbb10c44d | [
"MIT"
] | 636 | 2016-06-06T07:58:36.000Z | 2019-03-19T15:27:37.000Z | lib/benchee/output/profile_printer.ex | mayel/benchee | faf3c85c241a4c7eeaab8edfc85094bbbb10c44d | [
"MIT"
] | 198 | 2016-06-18T08:19:15.000Z | 2019-03-19T15:32:37.000Z | lib/benchee/output/profile_printer.ex | mayel/benchee | faf3c85c241a4c7eeaab8edfc85094bbbb10c44d | [
"MIT"
] | 43 | 2016-06-08T08:04:30.000Z | 2019-02-13T17:10:24.000Z | defmodule Benchee.Output.ProfilePrinter do
@moduledoc false
@doc """
Prints a notification of which job is being profiled.
"""
def profiling(name, profiler) do
IO.puts("\nProfiling #{name} with #{profiler}...")
end
end
| 21.454545 | 55 | 0.690678 |
038e5e211cbfe902a2d1443eae628950f9bf0977 | 136 | ex | Elixir | lib/seren_web/controllers/page_controller.ex | allen-garvey/seren | f61cb7edcd7d3f927d2929db14b2a4a1578a3925 | [
"MIT"
] | 4 | 2019-10-04T16:11:15.000Z | 2021-08-18T21:00:13.000Z | apps/seren/lib/seren_web/controllers/page_controller.ex | allen-garvey/phoenix-umbrella | 1d444bbd62a5e7b5f51d317ce2be71ee994125d5 | [
"MIT"
] | 5 | 2020-03-16T23:52:25.000Z | 2021-09-03T16:52:17.000Z | lib/seren_web/controllers/page_controller.ex | allen-garvey/seren | f61cb7edcd7d3f927d2929db14b2a4a1578a3925 | [
"MIT"
] | null | null | null | defmodule SerenWeb.PageController do
use SerenWeb, :controller
def index(conn, _params) do
render conn, "index.html"
end
end
| 17 | 36 | 0.735294 |
038eb135bbfcb5bb86572c264c25d0216d4b1257 | 1,305 | ex | Elixir | lib/roger/queue.ex | jnylen/roger | 074338eceae4783221088e8b235a635452708ef1 | [
"MIT"
] | null | null | null | lib/roger/queue.ex | jnylen/roger | 074338eceae4783221088e8b235a635452708ef1 | [
"MIT"
] | null | null | null | lib/roger/queue.ex | jnylen/roger | 074338eceae4783221088e8b235a635452708ef1 | [
"MIT"
] | null | null | null | defmodule Roger.Queue do
@moduledoc """
Functions related to queues.
"""
alias Roger.{Queue, AMQPClient}
@type t :: %__MODULE__{}
defstruct type: nil, max_workers: nil, consumer_tag: nil, channel: nil, confirmed: false
def define({type, max_workers}) do
define(type, max_workers)
end
def defin... | 24.622642 | 90 | 0.676628 |
038ec3802186ccf58e93d837d219987161c572c7 | 237 | exs | Elixir | list_length.exs | hvnsweeting/elixir-hackerrank-fp | 1b4c259c7e335b272b0bbc50d3ba92ddb724566f | [
"MIT"
] | null | null | null | list_length.exs | hvnsweeting/elixir-hackerrank-fp | 1b4c259c7e335b272b0bbc50d3ba92ddb724566f | [
"MIT"
] | null | null | null | list_length.exs | hvnsweeting/elixir-hackerrank-fp | 1b4c259c7e335b272b0bbc50d3ba92ddb724566f | [
"MIT"
] | null | null | null | defmodule Solution do
def len([_|tail]) do
1 + len(tail)
end
def len([]) do
0
end
def main() do
data = IO.read(:stdio, :all) |> String.trim |> String.split([" ", "\n"])
IO.puts len(data)
end
end
Solution.main()
| 15.8 | 76 | 0.56962 |
038ee0b2aa56dc091d9b39fc039d5c97d2093ec2 | 16,704 | exs | Elixir | test/graphql/helpers/authorization_test.exs | isshindev/accent | ae4c13139b0a0dfd64ff536b94c940a4e2862150 | [
"BSD-3-Clause"
] | 806 | 2018-04-07T20:40:33.000Z | 2022-03-30T01:39:57.000Z | test/graphql/helpers/authorization_test.exs | isshindev/accent | ae4c13139b0a0dfd64ff536b94c940a4e2862150 | [
"BSD-3-Clause"
] | 194 | 2018-04-07T13:49:37.000Z | 2022-03-30T19:58:45.000Z | test/graphql/helpers/authorization_test.exs | doc-ai/accent | e337e16f3658cc0728364f952c0d9c13710ebb06 | [
"BSD-3-Clause"
] | 89 | 2018-04-09T13:55:49.000Z | 2022-03-24T07:09:31.000Z | defmodule AccentTest.GraphQL.Helpers.Authorization do
use Accent.RepoCase
alias Accent.{
Collaborator,
Document,
GraphQL.Helpers.Authorization,
Integration,
Language,
Operation,
ProjectCreator,
Repo,
Translation,
TranslationCommentsSubscription,
User,
Version
}
... | 36.712088 | 166 | 0.650862 |
038ee0fef1b2142bdada0941162f330f1f7445d9 | 1,076 | ex | Elixir | lib/badges_web/live/group_live/index.ex | TomGrozev/SAD-Badges | a94331433ea21a0d719216ac8473e706166d6004 | [
"MIT"
] | null | null | null | lib/badges_web/live/group_live/index.ex | TomGrozev/SAD-Badges | a94331433ea21a0d719216ac8473e706166d6004 | [
"MIT"
] | null | null | null | lib/badges_web/live/group_live/index.ex | TomGrozev/SAD-Badges | a94331433ea21a0d719216ac8473e706166d6004 | [
"MIT"
] | null | null | null | defmodule BadgesWeb.GroupLive.Index do
use BadgesWeb, :live_view
alias Badges.Students
alias Badges.Students.Group
@impl true
def mount(_params, _session, socket) do
{:ok, assign(socket, :groups, list_groups())}
end
@impl true
def handle_params(params, _url, socket) do
{:noreply, apply_action... | 22.893617 | 72 | 0.66171 |
038eee5d4167ee2937d76ad50a1dfa8948ec8d7b | 1,539 | ex | Elixir | clients/ad_sense/lib/google_api/ad_sense/v2/model/list_alerts_response.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/ad_sense/lib/google_api/ad_sense/v2/model/list_alerts_response.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/ad_sense/lib/google_api/ad_sense/v2/model/list_alerts_response.ex | dazuma/elixir-google-api | 6a9897168008efe07a6081d2326735fe332e522c | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 32.744681 | 130 | 0.739441 |
038f1569a014aa2803e11ba7c808429b416ae07d | 1,854 | exs | Elixir | clients/cloud_scheduler/mix.exs | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/cloud_scheduler/mix.exs | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/cloud_scheduler/mix.exs | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 27.671642 | 106 | 0.658576 |
038f3053171d8d9406864e720fd50497df0195c5 | 1,997 | exs | Elixir | config/prod.exs | cdegroot/clueless | c7f575159a42f55eb843df0e37802e778826c845 | [
"MIT"
] | null | null | null | config/prod.exs | cdegroot/clueless | c7f575159a42f55eb843df0e37802e778826c845 | [
"MIT"
] | 4 | 2015-12-18T20:35:49.000Z | 2015-12-18T20:36:43.000Z | config/prod.exs | cdegroot/clueless | c7f575159a42f55eb843df0e37802e778826c845 | [
"MIT"
] | null | null | null | use Mix.Config
# For production, we configure the host to read the PORT
# from the system environment. Therefore, you will need
# to set PORT=80 before running your server.
#
# You should also configure the url host to something
# meaningful, we use this information when generating URLs.
#
# Finally, we also include t... | 31.698413 | 67 | 0.714071 |
038f4454dc86d5a775ae3db454af2bbb86884bcf | 1,791 | ex | Elixir | clients/display_video/lib/google_api/display_video/v1/model/digital_content_label_targeting_option_details.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/display_video/lib/google_api/display_video/v1/model/digital_content_label_targeting_option_details.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/display_video/lib/google_api/display_video/v1/model/digital_content_label_targeting_option_details.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 31.421053 | 129 | 0.760469 |
038f6b136255af5adb91b261c7ca841e3ccf822b | 1,013 | ex | Elixir | lib/cocktail/rule.ex | gadabout/cocktail | 3dd3b6ee60d6f99b640f092c974d067338dd589b | [
"MIT"
] | 117 | 2017-09-09T00:02:32.000Z | 2022-02-10T15:36:28.000Z | lib/cocktail/rule.ex | gadabout/cocktail | 3dd3b6ee60d6f99b640f092c974d067338dd589b | [
"MIT"
] | 193 | 2017-09-09T22:49:18.000Z | 2022-03-30T13:05:25.000Z | lib/cocktail/rule.ex | gadabout/cocktail | 3dd3b6ee60d6f99b640f092c974d067338dd589b | [
"MIT"
] | 20 | 2018-01-04T14:58:42.000Z | 2021-11-25T13:59:10.000Z | defmodule Cocktail.Rule do
@moduledoc """
Represent a recurrence rule (RRULE).
"""
alias Cocktail.{Builder, Rule, Validation}
@type t :: %__MODULE__{
count: pos_integer | nil,
until: Cocktail.time() | nil,
validations: Validation.validations_map()
}
@enforce_keys [:v... | 25.974359 | 78 | 0.640671 |
038f72fe23cccd0ff612042c0f52611f452f0c76 | 3,629 | ex | Elixir | lib/nerves_network/if_supervisor.ex | mattneel/nerves_network | 192a6f7c0cc59696ad82c95c2ac6c1e979994d21 | [
"Apache-2.0"
] | 1 | 2020-04-25T11:48:00.000Z | 2020-04-25T11:48:00.000Z | lib/nerves_network/if_supervisor.ex | mattneel/nerves_network | 192a6f7c0cc59696ad82c95c2ac6c1e979994d21 | [
"Apache-2.0"
] | null | null | null | lib/nerves_network/if_supervisor.ex | mattneel/nerves_network | 192a6f7c0cc59696ad82c95c2ac6c1e979994d21 | [
"Apache-2.0"
] | null | null | null | defmodule Nerves.Network.IFSupervisor do
use Supervisor
alias Nerves.Network.Types
import Nerves.Network.Utils, only: [log_atomized_iface_error: 1]
@moduledoc false
@spec start_link(GenServer.options()) :: GenServer.on_start()
def start_link(options \\ []) do
Supervisor.start_link(__MODULE__, [], opti... | 29.266129 | 86 | 0.661615 |
038f752da229027a0f3e78eda71f89cf1c17f86f | 3,794 | exs | Elixir | test/lib/canvas_api/github_trackback_test.exs | usecanvas/api-v2 | 59214db3a2cf12eb939f22fed320fd10cb47cdfe | [
"Apache-2.0"
] | 123 | 2017-04-04T18:15:48.000Z | 2021-04-26T08:04:22.000Z | test/lib/canvas_api/github_trackback_test.exs | usecanvas/api-v2 | 59214db3a2cf12eb939f22fed320fd10cb47cdfe | [
"Apache-2.0"
] | null | null | null | test/lib/canvas_api/github_trackback_test.exs | usecanvas/api-v2 | 59214db3a2cf12eb939f22fed320fd10cb47cdfe | [
"Apache-2.0"
] | 17 | 2017-04-04T18:58:29.000Z | 2021-05-10T21:39:16.000Z | defmodule CanvasAPI.GitHubTrackbackTest do
use CanvasAPI.ModelCase
alias CanvasAPI.{Canvas, GitHubTrackback, PulseEvent,Referencer, Repo}
import CanvasAPI.Factory
setup do
{:ok, canvas: insert(:canvas)}
end
test ".add adds an event for a created comment", %{canvas: canvas} do
comment = github_eve... | 27.897059 | 79 | 0.573537 |
038f8cb23d6efd25448b8dbe0cef3f69106b75b4 | 2,761 | ex | Elixir | clients/os_config/lib/google_api/os_config/v1/model/inventory_item.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/os_config/lib/google_api/os_config/v1/model/inventory_item.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/os_config/lib/google_api/os_config/v1/model/inventory_item.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 42.476923 | 174 | 0.709526 |
038fb727f3a3f39dee6b85caadd80cf1b174c16e | 2,261 | exs | Elixir | test/loki/file_manipulation_test.exs | Selvaticus/loki | 58006dcf5752595ed7b875bee265423074895ae4 | [
"MIT"
] | 83 | 2016-11-27T11:15:58.000Z | 2021-12-24T21:04:04.000Z | test/loki/file_manipulation_test.exs | Selvaticus/loki | 58006dcf5752595ed7b875bee265423074895ae4 | [
"MIT"
] | 28 | 2016-12-08T14:18:32.000Z | 2019-01-08T10:57:54.000Z | test/loki/file_manipulation_test.exs | Selvaticus/loki | 58006dcf5752595ed7b875bee265423074895ae4 | [
"MIT"
] | 9 | 2017-02-08T21:56:18.000Z | 2019-06-09T02:14:07.000Z | defmodule Loki.FileManipulationTest do
use ExUnit.Case, async: false
import Loki.File
import Loki.FileManipulation
import ExUnit.CaptureIO
describe "FileManipulation" do
test "#append_to_file" do
capture_io(fn -> create_file("temp/append") end)
assert capture_io(fn ->
append_to_fil... | 29.75 | 92 | 0.62981 |
038fd7222ee97dad4461b12ea77862a3f6ed67ff | 1,005 | ex | Elixir | lib/cineplex/queue/job/extract.ex | upmaru/cineplex | 7d1d516d3e3d3683b2ad4425b61517a8f556f721 | [
"MIT"
] | null | null | null | lib/cineplex/queue/job/extract.ex | upmaru/cineplex | 7d1d516d3e3d3683b2ad4425b61517a8f556f721 | [
"MIT"
] | null | null | null | lib/cineplex/queue/job/extract.ex | upmaru/cineplex | 7d1d516d3e3d3683b2ad4425b61517a8f556f721 | [
"MIT"
] | null | null | null | defmodule Cineplex.Queue.Job.Extract do
alias Cineplex.{
Queue,
Repo
}
alias Queue.Job
@spec perform(Job.t()) :: {:ok, %{job: Job.t(), entries: [Job.Entry.t()]}}
def perform(%Job{source: source} = job) do
source = Repo.preload(source, [:presets])
job = Repo.preload(job, [:parent_entries])
... | 23.372093 | 76 | 0.634826 |
03900444a745073d09009d7f13daa1d97db1510b | 1,847 | exs | Elixir | clients/books/mix.exs | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/books/mix.exs | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/books/mix.exs | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 27.567164 | 104 | 0.654575 |
0390157e536abba1d6df977091549960e09bde53 | 359 | ex | Elixir | lib/message_check/listen.ex | Celeo/gandalf_bot | f8e48b9a0b403fac5e29e514ce6c684d1bebeecc | [
"MIT"
] | null | null | null | lib/message_check/listen.ex | Celeo/gandalf_bot | f8e48b9a0b403fac5e29e514ce6c684d1bebeecc | [
"MIT"
] | null | null | null | lib/message_check/listen.ex | Celeo/gandalf_bot | f8e48b9a0b403fac5e29e514ce6c684d1bebeecc | [
"MIT"
] | null | null | null | defmodule Bot.MessageCheck.HeyListen do
require Logger
@pattern ~r/^listen[! ]*$/i
def is_match!(content) do
content =
content
|> String.trim()
|> Bot.Util.Message.strip_formatting()
|> Bot.Util.Message.strip_punctuation()
Regex.match?(@pattern, content)
end
def emoji(), do... | 19.944444 | 51 | 0.640669 |
03901b441c38f16c265bcfd278bc1fdbde7578ea | 4,259 | ex | Elixir | lib/beats/conductor.ex | mtrudel/beats | 6edf532bc02f2625190cbcb7f99a09fc6f58c5fd | [
"MIT"
] | 37 | 2018-05-19T17:45:46.000Z | 2022-01-18T11:03:36.000Z | lib/beats/conductor.ex | mtrudel/beats | 6edf532bc02f2625190cbcb7f99a09fc6f58c5fd | [
"MIT"
] | 1 | 2020-10-08T09:53:15.000Z | 2020-10-08T09:53:15.000Z | lib/beats/conductor.ex | mtrudel/beats | 6edf532bc02f2625190cbcb7f99a09fc6f58c5fd | [
"MIT"
] | 2 | 2018-11-20T18:16:08.000Z | 2021-02-09T15:14:28.000Z | defmodule Beats.Conductor do
use GenServer
# Client API
def start_link(arg) do
GenServer.start_link(__MODULE__, arg, name: __MODULE__)
end
def do_tick() do
GenServer.call(__MODULE__, :do_tick)
end
def reset_tick(to \\ 1) do
GenServer.call(__MODULE__, {:reset_tick, to})
end
def play_fi... | 25.502994 | 94 | 0.582296 |
03905dc4397cf97d42d502ffa8995cd1d1a80539 | 1,921 | ex | Elixir | clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/list_queues_response.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/list_queues_response.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/list_queues_response.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 37.666667 | 284 | 0.747527 |
039080ba662f2761072e00c909e503dcd68d4735 | 2,323 | ex | Elixir | lib/plug/session/ets.ex | gjaldon/plug | bfe88530b429c7b9b29b69b737772ef7c6aa2f6b | [
"Apache-2.0"
] | 1 | 2019-05-07T15:05:52.000Z | 2019-05-07T15:05:52.000Z | lib/plug/session/ets.ex | gjaldon/plug | bfe88530b429c7b9b29b69b737772ef7c6aa2f6b | [
"Apache-2.0"
] | null | null | null | lib/plug/session/ets.ex | gjaldon/plug | bfe88530b429c7b9b29b69b737772ef7c6aa2f6b | [
"Apache-2.0"
] | 1 | 2019-11-23T12:09:14.000Z | 2019-11-23T12:09:14.000Z | defmodule Plug.Session.ETS do
@moduledoc """
Stores the session in an in-memory ETS table.
This store does not create the ETS table; it expects that an
existing named table with public properties is passed as an
argument.
We don't recommend using this store in production as every
session will be stored ... | 24.712766 | 73 | 0.663366 |
03909fd21baa51374ae5f9afefe78866aec479e5 | 4,874 | exs | Elixir | deps/ecto_sql/mix.exs | Abninho92/RocketseatNLW2021-Rocketpay | 3e492bf582148202a215f6a26e6c0890ed9a0e23 | [
"MIT"
] | 1 | 2021-02-24T13:06:18.000Z | 2021-02-24T13:06:18.000Z | deps/ecto_sql/mix.exs | gleidsonduarte/rocketseat-rocketpay-phoenix-elixir-postgres | 300e0b34e0179380f56a8c6cae707722d9c4d8d0 | [
"MIT"
] | null | null | null | deps/ecto_sql/mix.exs | gleidsonduarte/rocketseat-rocketpay-phoenix-elixir-postgres | 300e0b34e0179380f56a8c6cae707722d9c4d8d0 | [
"MIT"
] | null | null | null | defmodule EctoSQL.MixProject do
use Mix.Project
@version "3.5.4"
@adapters ~w(pg myxql tds)
def project do
[
app: :ecto_sql,
version: @version,
elixir: "~> 1.8",
deps: deps(),
test_paths: test_paths(System.get_env("ECTO_ADAPTER")),
xref: [
exclude: [
M... | 24.128713 | 90 | 0.558063 |
0390e0d7332a7d5365164117f70fe194aac2dd47 | 1,257 | ex | Elixir | parser/lib/quenya_parser/util.ex | yidaoit/quenya | 45fe42c32829a1a2499d325e592553061b876ef8 | [
"MIT"
] | 143 | 2020-12-01T06:53:36.000Z | 2022-03-24T02:33:01.000Z | parser/lib/quenya_parser/util.ex | yidaoit/quenya | 45fe42c32829a1a2499d325e592553061b876ef8 | [
"MIT"
] | 2 | 2020-11-30T05:30:42.000Z | 2020-12-17T06:33:17.000Z | parser/lib/quenya_parser/util.ex | tyrchen/quenya | b9e8ef9e71e0e52b010b930eee66942e30c62ddd | [
"MIT"
] | 12 | 2020-12-07T01:22:17.000Z | 2020-12-27T12:49:39.000Z | defmodule QuenyaParser.Util do
@moduledoc """
Utility functions
"""
require Logger
@spec update_map(map() | String.t(), any, boolean(), fun()) ::
map() | {:error, String.t()}
@doc """
Update the map recursively for $ref
"""
def update_map(context, %{"$ref" => path}, recursive, process_ref_f... | 25.653061 | 92 | 0.558473 |
0390e80494e5fc520f1ca58800fe18e64c576552 | 1,408 | ex | Elixir | lib/mix/tasks/test.ex | KingOfRostov/exavier | fe8020361db6295d9ec92cc71fb5170937c22833 | [
"MIT"
] | null | null | null | lib/mix/tasks/test.ex | KingOfRostov/exavier | fe8020361db6295d9ec92cc71fb5170937c22833 | [
"MIT"
] | null | null | null | lib/mix/tasks/test.ex | KingOfRostov/exavier | fe8020361db6295d9ec92cc71fb5170937c22833 | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.Exavier.Test do
use Mix.Task
@shortdoc "Runs mutation testing"
def run(_args) do
unless System.get_env("MIX_ENV") || Mix.env() == :test do
Mix.raise(
"\"mix test\" is running in the \"#{Mix.env()}\" environment. If you are " <>
"running tests alongside another task... | 29.333333 | 92 | 0.658381 |
0390fb0618acc085c290cb2b3863014d47f229e2 | 289 | ex | Elixir | lib/surface_bulma/navbar/brand.ex | justin-m-morgan/surface_bulma | c31faebc818c39d06250574b913096504bd6eeec | [
"MIT"
] | null | null | null | lib/surface_bulma/navbar/brand.ex | justin-m-morgan/surface_bulma | c31faebc818c39d06250574b913096504bd6eeec | [
"MIT"
] | null | null | null | lib/surface_bulma/navbar/brand.ex | justin-m-morgan/surface_bulma | c31faebc818c39d06250574b913096504bd6eeec | [
"MIT"
] | null | null | null | defmodule SurfaceBulma.Navbar.Brand do
use Surface.Component, slot: "brand"
prop path, :string
@doc "The brand image or text you want displayed."
slot default
def render(assigns) do
~F"""
<a class="navbar-item" href={@path}>
<#slot />
</a>
"""
end
end
| 17 | 52 | 0.619377 |
0390fe22b68f7cecf2113a26baed3a9884836a4a | 178 | exs | Elixir | chapter07/my_list.exs | asux/programming_elixir | 69d27404f5e929541518269a383d571184faebe8 | [
"MIT"
] | null | null | null | chapter07/my_list.exs | asux/programming_elixir | 69d27404f5e929541518269a383d571184faebe8 | [
"MIT"
] | null | null | null | chapter07/my_list.exs | asux/programming_elixir | 69d27404f5e929541518269a383d571184faebe8 | [
"MIT"
] | null | null | null | defmodule MyList do
def span(from, from), do: [from]
def span(from, to) when from > to, do: [from | span(from-1, to)]
def span(from, to), do: [from | span(from+1, to)]
end
| 29.666667 | 66 | 0.623596 |
039105c45c40acbdcdd92a29c1d0f73ccfe08bbe | 1,549 | exs | Elixir | test_apps/dockers_phoenix/mix.exs | emedia-project/xrel | 56d69ad8fbd9da5be043a6a094ca3ef0a2d1db83 | [
"Unlicense"
] | 5 | 2015-12-14T16:02:09.000Z | 2016-11-29T12:50:50.000Z | test_apps/dockers_phoenix/mix.exs | G-Corp/jorel | 56d69ad8fbd9da5be043a6a094ca3ef0a2d1db83 | [
"Unlicense"
] | 3 | 2016-02-12T14:36:50.000Z | 2016-08-29T08:17:55.000Z | test_apps/dockers_phoenix/mix.exs | G-Corp/jorel | 56d69ad8fbd9da5be043a6a094ca3ef0a2d1db83 | [
"Unlicense"
] | 2 | 2016-01-02T15:19:53.000Z | 2016-10-21T15:32:11.000Z | defmodule DockersPhoenix.Mixfile do
use Mix.Project
def project do
[app: :dockers_phoenix,
version: "0.0.1",
elixir: "~> 1.0",
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix, :gettext] ++ Mix.compilers,
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :pr... | 29.226415 | 78 | 0.611362 |
03911cd92673658ccffe3e9d90c9085464346d99 | 397 | exs | Elixir | priv/repo/migrations/20181023160033_create_repos_viewers.exs | coderplanets/coderplanets_server | 3663e56340d6d050e974c91f7e499d8424fc25e9 | [
"Apache-2.0"
] | 240 | 2018-11-06T09:36:54.000Z | 2022-02-20T07:12:36.000Z | priv/repo/migrations/20181023160033_create_repos_viewers.exs | coderplanets/coderplanets_server | 3663e56340d6d050e974c91f7e499d8424fc25e9 | [
"Apache-2.0"
] | 363 | 2018-07-11T03:38:14.000Z | 2021-12-14T01:42:40.000Z | priv/repo/migrations/20181023160033_create_repos_viewers.exs | mydearxym/mastani_server | f24034a4a5449200165cf4a547964a0961793eab | [
"Apache-2.0"
] | 22 | 2019-01-27T11:47:56.000Z | 2021-02-28T13:17:52.000Z | defmodule GroupherServer.Repo.Migrations.CreateReposViewers do
use Ecto.Migration
def change do
create table(:repos_viewers) do
add(:repo_id, references(:cms_repos, on_delete: :delete_all), null: false)
add(:user_id, references(:users, on_delete: :delete_all), null: false)
timestamps()
e... | 26.466667 | 80 | 0.715365 |
0391219541c8b38f97395d32886911c66d867afa | 1,440 | ex | Elixir | clients/cloud_kms/lib/google_api/cloud_kms/v1/model/asymmetric_sign_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/cloud_kms/lib/google_api/cloud_kms/v1/model/asymmetric_sign_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/cloud_kms/lib/google_api/cloud_kms/v1/model/asymmetric_sign_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 30.638298 | 82 | 0.745139 |
0391296e7829a94ecfb1a1a6f5c69d2efab6d6d8 | 1,396 | ex | Elixir | lib/fen_gen_web/telemetry.ex | imsekun/fengen | d24e6583c9aa662a27f8d884b261ec24d4a85807 | [
"MIT"
] | 2 | 2021-05-28T19:33:52.000Z | 2021-05-28T21:10:19.000Z | lib/fen_gen_web/telemetry.ex | hsek/fen_gen | d24e6583c9aa662a27f8d884b261ec24d4a85807 | [
"MIT"
] | 20 | 2021-05-12T15:26:50.000Z | 2021-05-29T14:42:47.000Z | lib/fen_gen_web/telemetry.ex | imsekun/fengen | d24e6583c9aa662a27f8d884b261ec24d4a85807 | [
"MIT"
] | null | null | null | defmodule FenGenWeb.Telemetry do
use Supervisor
import Telemetry.Metrics
def start_link(arg) do
Supervisor.start_link(__MODULE__, arg, name: __MODULE__)
end
@impl true
def init(_arg) do
children = [
# Telemetry poller will execute the given period measurements
# every 10_000ms. Learn m... | 28.489796 | 86 | 0.669771 |
039149e59d62892a99fb9ad946c4c7a17cbb5d65 | 433 | exs | Elixir | test/texas_holdem_web/views/error_view_test.exs | thelightcosine/texas_holdem-phoenix | 31da9754082015b7562639bf2d5b8ac5212f11d0 | [
"BSD-3-Clause"
] | null | null | null | test/texas_holdem_web/views/error_view_test.exs | thelightcosine/texas_holdem-phoenix | 31da9754082015b7562639bf2d5b8ac5212f11d0 | [
"BSD-3-Clause"
] | null | null | null | test/texas_holdem_web/views/error_view_test.exs | thelightcosine/texas_holdem-phoenix | 31da9754082015b7562639bf2d5b8ac5212f11d0 | [
"BSD-3-Clause"
] | null | null | null | defmodule TexasHoldemWeb.ErrorViewTest do
use TexasHoldemWeb.ConnCase, async: true
# Bring render/3 and render_to_string/3 for testing custom views
import Phoenix.View
test "renders 404.html" do
assert render_to_string(TexasHoldemWeb.ErrorView, "404.html", []) == "Not Found"
end
test "renders 500.htm... | 28.866667 | 96 | 0.743649 |
03916f43b847fd0711b67876c3b6becf2f0d3728 | 7,799 | ex | Elixir | apps/ex_wire/lib/ex_wire/kademlia/node.ex | atoulme/mana | cff3fd96c23feaaeb9fe32df3c0d35ee6dc548a5 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | apps/ex_wire/lib/ex_wire/kademlia/node.ex | atoulme/mana | cff3fd96c23feaaeb9fe32df3c0d35ee6dc548a5 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | apps/ex_wire/lib/ex_wire/kademlia/node.ex | atoulme/mana | cff3fd96c23feaaeb9fe32df3c0d35ee6dc548a5 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | defmodule ExWire.Kademlia.Node do
@moduledoc """
Represents a node in Kademlia algorithm; an entity on the network.
"""
alias ExWire.{Crypto, Message}
alias ExWire.Handler.Params
alias ExWire.Kademlia.XorDistance
alias ExWire.Struct.Endpoint
defstruct [
:public_key,
:key,
:endpoint
]
@... | 40.409326 | 179 | 0.531222 |
0391753a79f34a9e1594d9d324aeedc6b8500873 | 677 | ex | Elixir | apps/bus_detective_web/lib/bus_detective_web/views/stop_view.ex | bus-detective/bus_detective_ng | ef54684d4f640384bd20a4d5550ff51ab440190b | [
"MIT"
] | 8 | 2018-07-06T14:44:10.000Z | 2021-08-19T17:24:25.000Z | apps/bus_detective_web/lib/bus_detective_web/views/stop_view.ex | bus-detective/bus_detective_ng | ef54684d4f640384bd20a4d5550ff51ab440190b | [
"MIT"
] | 12 | 2018-07-15T18:43:04.000Z | 2022-02-10T16:07:47.000Z | apps/bus_detective_web/lib/bus_detective_web/views/stop_view.ex | bus-detective/bus_detective_ng | ef54684d4f640384bd20a4d5550ff51ab440190b | [
"MIT"
] | 1 | 2018-07-13T17:30:20.000Z | 2018-07-13T17:30:20.000Z | defmodule BusDetectiveWeb.StopView do
use BusDetectiveWeb, :view
alias BusDetective.GTFS.Stop
alias Geo.Point
def map_shapes(nil), do: "[]"
def map_shapes(departures) do
departures
|> Enum.map(fn departure ->
coords =
departure.trip.shape.geometry.coordinates
|> Enum.map(fn {l... | 24.178571 | 84 | 0.615953 |
0391a46943a52d0e01b6e22c39aec16a4352a74e | 1,639 | exs | Elixir | test/still/compiler/view_helpers/safe_html_test.exs | mrmicahcooper/still | ba785b0b068d998d0343f73a1fd1795edbe9831c | [
"0BSD"
] | 2 | 2021-02-15T07:55:38.000Z | 2021-03-05T18:04:53.000Z | test/still/compiler/view_helpers/safe_html_test.exs | mrmicahcooper/still | ba785b0b068d998d0343f73a1fd1795edbe9831c | [
"0BSD"
] | null | null | null | test/still/compiler/view_helpers/safe_html_test.exs | mrmicahcooper/still | ba785b0b068d998d0343f73a1fd1795edbe9831c | [
"0BSD"
] | null | null | null | defmodule Still.Compiler.ViewHelpers.SafeHTMLTest do
use ExUnit.Case, async: true
alias Still.Compiler.ViewHelpers.SafeHTML
describe "render/1" do
test "renders nil" do
assert "" == SafeHTML.render(nil)
end
test "HTML escapes atoms" do
assert "foo" = SafeHTML.render(:foo)
assert "... | 24.833333 | 77 | 0.600366 |
0391b477553298ae37aa8c9f8fce6924c6110f6f | 65 | ex | Elixir | lib/epi_locator_web/views/tr_view.ex | RatioPBC/epi-locator | 58c90500c4e0071ce365d76ec9812f9051d6a9f9 | [
"Apache-2.0"
] | null | null | null | lib/epi_locator_web/views/tr_view.ex | RatioPBC/epi-locator | 58c90500c4e0071ce365d76ec9812f9051d6a9f9 | [
"Apache-2.0"
] | 6 | 2021-10-19T01:55:57.000Z | 2022-02-15T01:04:19.000Z | lib/epi_locator_web/views/tr_view.ex | RatioPBC/epi-locator | 58c90500c4e0071ce365d76ec9812f9051d6a9f9 | [
"Apache-2.0"
] | 2 | 2022-01-21T08:38:50.000Z | 2022-01-21T08:42:04.000Z | defmodule EpiLocatorWeb.TRView do
use EpiLocatorWeb, :view
end
| 16.25 | 33 | 0.815385 |
0391bdfdbc1fc446aa66103a4f682b13e1966e6a | 2,831 | exs | Elixir | test/kwtool_web/features/keyword_page/view_keyword_page_test.exs | byhbt/kwtool | 8958a160066e3e4c61806202af2563541f2261e3 | [
"MIT"
] | 5 | 2021-12-14T08:18:24.000Z | 2022-03-29T10:02:48.000Z | test/kwtool_web/features/keyword_page/view_keyword_page_test.exs | byhbt/kwtool | 8958a160066e3e4c61806202af2563541f2261e3 | [
"MIT"
] | 32 | 2021-03-21T16:32:18.000Z | 2022-03-23T08:00:37.000Z | test/kwtool_web/features/keyword_page/view_keyword_page_test.exs | byhbt/kwtool | 8958a160066e3e4c61806202af2563541f2261e3 | [
"MIT"
] | 1 | 2021-06-03T17:22:16.000Z | 2021-06-03T17:22:16.000Z | defmodule KwtoolWeb.HomePage.ViewKeywordPageTest do
use KwtoolWeb.FeatureCase, async: true
feature "views the keyword listing page", %{session: session} do
created_user_1 = insert(:user)
keyword_of_user_1 = insert(:keyword, user: created_user_1)
created_user_2 = insert(:user)
custom_keyword_attrs ... | 36.766234 | 91 | 0.707877 |
0391df23f03d603a532adb451d6f266dd224b920 | 1,803 | exs | Elixir | apps/tai/test/tai/iex/commands/products_test.exs | ccamateur/tai | 41c4b3e09dafc77987fa3f6b300c15461d981e16 | [
"MIT"
] | 276 | 2018-01-16T06:36:06.000Z | 2021-03-20T21:48:01.000Z | apps/tai/test/tai/iex/commands/products_test.exs | ccamateur/tai | 41c4b3e09dafc77987fa3f6b300c15461d981e16 | [
"MIT"
] | 78 | 2020-10-12T06:21:43.000Z | 2022-03-28T09:02:00.000Z | apps/tai/test/tai/iex/commands/products_test.exs | yurikoval/tai | 94254b45d22fa0307b01577ff7c629c7280c0295 | [
"MIT"
] | 43 | 2018-06-09T09:54:51.000Z | 2021-03-07T07:35:17.000Z | defmodule Tai.IEx.Commands.ProductsTest do
use Tai.TestSupport.DataCase, async: false
import ExUnit.CaptureIO
test "show products and their trade restrictions for configured exchanges" do
mock_product(
venue_id: :test_exchange_a,
symbol: :btc_usd,
venue_symbol: "BTC_USD",
status: :tra... | 40.977273 | 98 | 0.37604 |
0391ffb38a309fe8f87591513ac2a0f4efa3c9b2 | 1,919 | ex | Elixir | clients/sas_portal/lib/google_api/sas_portal/v1alpha1/model/sas_portal_list_nodes_response.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/sas_portal/lib/google_api/sas_portal/v1alpha1/model/sas_portal_list_nodes_response.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/sas_portal/lib/google_api/sas_portal/v1alpha1/model/sas_portal_list_nodes_response.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 38.38 | 242 | 0.748828 |
03920189f46206b93de91e1b97cdb9b582f15f91 | 5,201 | ex | Elixir | apps/admin_api/lib/admin_api/v1/controllers/account_controller.ex | amadeobrands/ewallet | 505b7822721940a7b892a9b35c225e80cc8ac0b4 | [
"Apache-2.0"
] | 1 | 2018-12-07T06:21:21.000Z | 2018-12-07T06:21:21.000Z | apps/admin_api/lib/admin_api/v1/controllers/account_controller.ex | amadeobrands/ewallet | 505b7822721940a7b892a9b35c225e80cc8ac0b4 | [
"Apache-2.0"
] | null | null | null | apps/admin_api/lib/admin_api/v1/controllers/account_controller.ex | amadeobrands/ewallet | 505b7822721940a7b892a9b35c225e80cc8ac0b4 | [
"Apache-2.0"
] | null | null | null | defmodule AdminAPI.V1.AccountController do
use AdminAPI, :controller
import AdminAPI.V1.ErrorHandler
alias AdminAPI.V1.AccountHelper
alias EWallet.AccountPolicy
alias EWallet.Web.{Orchestrator, Paginator, V1.AccountOverlay}
alias EWalletDB.Account
@doc """
Retrieves a list of accounts based on current ... | 33.127389 | 85 | 0.637377 |
0392111b999a479468e74ac6cf1e74816f1eda22 | 177 | exs | Elixir | priv/templates/brando.upgrade/migrations/brando_09_add_wrapper_to_fragments.exs | brandocms/brando | 4198e0c0920031bd909969055064e4e2b7230d21 | [
"MIT"
] | 4 | 2020-10-30T08:40:38.000Z | 2022-01-07T22:21:37.000Z | priv/templates/brando.upgrade/migrations/brando_09_add_wrapper_to_fragments.exs | brandocms/brando | 4198e0c0920031bd909969055064e4e2b7230d21 | [
"MIT"
] | 1,162 | 2020-07-05T11:20:15.000Z | 2022-03-31T06:01:49.000Z | priv/templates/brando.upgrade/migrations/brando_09_add_wrapper_to_fragments.exs | brandocms/brando | 4198e0c0920031bd909969055064e4e2b7230d21 | [
"MIT"
] | null | null | null | defmodule Brando.Repo.Migrations.AddWrapperToFragments do
use Ecto.Migration
def change do
alter table(:pages_fragments) do
add :wrapper, :text
end
end
end
| 17.7 | 57 | 0.728814 |
03926f3eb31fa467765fe6034a20508abcdee3fc | 144 | exs | Elixir | test/lit/views/filter_view_test.exs | muhammedsekerci/lit | b58c6135134688ed1ed16f7b2e0f9a6396b2be67 | [
"MIT"
] | 14 | 2020-12-22T08:26:15.000Z | 2022-01-11T16:08:14.000Z | test/lit/views/filter_view_test.exs | muhammedsekerci/lit | b58c6135134688ed1ed16f7b2e0f9a6396b2be67 | [
"MIT"
] | 2 | 2021-04-06T19:22:55.000Z | 2021-05-31T14:02:40.000Z | test/lit/views/filter_view_test.exs | muhammedsekerci/lit | b58c6135134688ed1ed16f7b2e0f9a6396b2be67 | [
"MIT"
] | 7 | 2021-02-03T23:44:12.000Z | 2021-12-27T05:09:40.000Z | defmodule Lit.FilterViewTest do
use ExUnit.Case
import Phoenix.HTML, only: [safe_to_string: 1]
doctest Lit.FilterView, import: true
end
| 18 | 48 | 0.763889 |
03927edf77d0d92e180e55e3220570a08a566c50 | 2,375 | exs | Elixir | mix.exs | brianberlin/ecto_diff | 933d4e27d300ff2b01a95233073e972770da8aa7 | [
"MIT"
] | null | null | null | mix.exs | brianberlin/ecto_diff | 933d4e27d300ff2b01a95233073e972770da8aa7 | [
"MIT"
] | null | null | null | mix.exs | brianberlin/ecto_diff | 933d4e27d300ff2b01a95233073e972770da8aa7 | [
"MIT"
] | null | null | null | defmodule EctoDiff.MixProject do
use Mix.Project
@version "0.3.0"
@source_url "https://github.com/peek-travel/ecto_diff"
def project do
[
app: :ecto_diff,
version: @version,
elixir: "~> 1.7",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
... | 23.989899 | 93 | 0.552842 |
03929230c1e0711914bd8c1589191f17f2db14eb | 2,129 | ex | Elixir | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/language.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/language.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/language.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 38.017857 | 256 | 0.709723 |
0392af80bdd610bd8a30809fb1bebfec80288ee3 | 1,602 | ex | Elixir | test/support/test_parser.ex | fossabot/bejo | 7d25d68ef97bd77b7d53fc9a9546261fdc99bfba | [
"Apache-2.0"
] | null | null | null | test/support/test_parser.ex | fossabot/bejo | 7d25d68ef97bd77b7d53fc9a9546261fdc99bfba | [
"Apache-2.0"
] | null | null | null | test/support/test_parser.ex | fossabot/bejo | 7d25d68ef97bd77b7d53fc9a9546261fdc99bfba | [
"Apache-2.0"
] | null | null | null | defmodule TestParser do
import NimbleParsec
alias Bejo.Parser.{
Common,
Types,
Expressions,
FunctionDef
}
exp = parsec({Expressions, :exp})
exps = parsec({Expressions, :exps})
function_def = parsec({FunctionDef, :function_def})
allow_space = parsec({Common, :allow_space})
parse_type = ... | 29.127273 | 80 | 0.679775 |
0392c77fea267dd0bcab9e39f987cb3d7a473eb6 | 4,903 | exs | Elixir | test/wobserver/util/metrics/formatter_test.exs | coby-spotim/wobserver | b0b9d77fb4ff40bb417f6b370ee343b8d42de750 | [
"MIT"
] | null | null | null | test/wobserver/util/metrics/formatter_test.exs | coby-spotim/wobserver | b0b9d77fb4ff40bb417f6b370ee343b8d42de750 | [
"MIT"
] | null | null | null | test/wobserver/util/metrics/formatter_test.exs | coby-spotim/wobserver | b0b9d77fb4ff40bb417f6b370ee343b8d42de750 | [
"MIT"
] | 1 | 2018-09-12T16:13:57.000Z | 2018-09-12T16:13:57.000Z | defmodule Wobserver.Util.Metrics.FormatterTest do
use ExUnit.Case, async: false
alias Wobserver.Util.Metrics.{
Formatter,
Prometheus
}
def example_function do
[point: 5]
end
def local_ip do
with {:ok, ips} <- :inet.getif(),
{ip, _, _} <- List.first(ips),
{ip1, ip2, ip3, ... | 29.011834 | 123 | 0.459311 |
0392dbabdb0fe9e7ad35cd6857fc75336ca14cfa | 3,848 | exs | Elixir | ch04/exmeal/test/exmeal_web/controllers/meals_controller_test.exs | arilsonsouza/rocketseat-ignite-elixir | 93e32d52d589336dfd2d81e755d6dd7f05ee40b8 | [
"MIT"
] | null | null | null | ch04/exmeal/test/exmeal_web/controllers/meals_controller_test.exs | arilsonsouza/rocketseat-ignite-elixir | 93e32d52d589336dfd2d81e755d6dd7f05ee40b8 | [
"MIT"
] | null | null | null | ch04/exmeal/test/exmeal_web/controllers/meals_controller_test.exs | arilsonsouza/rocketseat-ignite-elixir | 93e32d52d589336dfd2d81e755d6dd7f05ee40b8 | [
"MIT"
] | null | null | null | defmodule ExmealWeb.MealsControllerTest do
use ExmealWeb.ConnCase, async: true
import Exmeal.Factory
setup %{} do
user_id = Ecto.UUID.generate()
insert(:user, %{id: user_id})
{:ok, user_id: user_id}
end
describe "create/2" do
test "should create a meal when all params are present", %{conn:... | 27.098592 | 95 | 0.505977 |
0392e0278e2ab6e5c7691f9f1b728c68fbe054e7 | 962 | ex | Elixir | test/support/edge_cases/multiple_def_cases/useless_spaces.ex | Ajwah/ex_debugger | 44cd5b99c0b7751db052887b7a0bc3ce52a2972e | [
"Apache-2.0"
] | 3 | 2020-07-07T20:41:23.000Z | 2020-07-17T09:05:37.000Z | test/support/edge_cases/multiple_def_cases/useless_spaces.ex | Ajwah/ex_debugger | 44cd5b99c0b7751db052887b7a0bc3ce52a2972e | [
"Apache-2.0"
] | 1 | 2020-07-08T00:04:38.000Z | 2020-07-08T00:04:38.000Z | test/support/edge_cases/multiple_def_cases/useless_spaces.ex | Ajwah/ex_debugger | 44cd5b99c0b7751db052887b7a0bc3ce52a2972e | [
"Apache-2.0"
] | null | null | null | defmodule Support.EdgeCases.MultipleDefCases.UselessSpaces do
@moduledoc "In case that `mix format` reorganizes this file, then resort to `useless_spaces.txt`"
use ExDebugger
def run1, do: %{ls: [1, 2, 3, 4]}
|> Map.fetch!(:ls)
|> List.wrap
|> Enum.reverse
|> Enum.reduce(0, &((&1 * 2) + &2)... | 10.808989 | 99 | 0.490644 |
0392f36ac8fdde1510c6630bff49b26d0126f0b5 | 1,028 | ex | Elixir | lib/ex338_web/views/fantasy_league_view.ex | axelclark/ex338 | 3fb3c260d93bda61f7636ee1a677770d2dc1b89a | [
"MIT"
] | 17 | 2016-12-22T06:39:26.000Z | 2021-01-20T13:51:13.000Z | lib/ex338_web/views/fantasy_league_view.ex | axelclark/ex338 | 3fb3c260d93bda61f7636ee1a677770d2dc1b89a | [
"MIT"
] | 608 | 2016-08-06T18:57:58.000Z | 2022-03-01T02:48:17.000Z | lib/ex338_web/views/fantasy_league_view.ex | axelclark/ex338 | 3fb3c260d93bda61f7636ee1a677770d2dc1b89a | [
"MIT"
] | 6 | 2017-11-21T22:35:45.000Z | 2022-01-11T21:37:40.000Z | defmodule Ex338Web.FantasyLeagueView do
use Ex338Web, :view
@line_colors [
"#e6194B",
"#3cb44b",
"#ffe119",
"#4363d8",
"#f58231",
"#42d4f4",
"#f032e6",
"#fabebe",
"#469990",
"#e6beff",
"#9A6324",
"#800000",
"#000075",
"#aaffc3",
"#fffac8"
]
def forma... | 19.037037 | 53 | 0.611868 |
03931577dd0a7f33cf76c3d49600295165f8be9e | 112 | ex | Elixir | lib/component/definitions/npc_brain.ex | doawoo/elixir_rpg | 4dcd0eb717bd1d654b3e6a06be31aba4c3254fb3 | [
"MIT"
] | 23 | 2021-10-24T00:21:13.000Z | 2022-03-13T12:33:38.000Z | lib/component/definitions/npc_brain.ex | doawoo/elixir_rpg | 4dcd0eb717bd1d654b3e6a06be31aba4c3254fb3 | [
"MIT"
] | null | null | null | lib/component/definitions/npc_brain.ex | doawoo/elixir_rpg | 4dcd0eb717bd1d654b3e6a06be31aba4c3254fb3 | [
"MIT"
] | 3 | 2021-11-04T02:42:25.000Z | 2022-02-02T14:22:52.000Z | use ElixirRPG.DSL.Component
defcomponent NPCBrain do
member :brain_name, "flan"
member :cached_src, ""
end
| 16 | 28 | 0.758929 |
03932ef54027885cd1fc87922c5f674514813569 | 9,899 | ex | Elixir | lib/bupe/builder.ex | milmazz/bupe | e06007980297e60fe7663969cdd202a5da578bb6 | [
"Apache-2.0"
] | 79 | 2016-08-02T13:17:09.000Z | 2021-12-24T21:47:28.000Z | lib/bupe/builder.ex | milmazz/bupe | e06007980297e60fe7663969cdd202a5da578bb6 | [
"Apache-2.0"
] | 48 | 2019-07-22T15:00:30.000Z | 2022-02-28T11:17:36.000Z | lib/bupe/builder.ex | milmazz/bupe | e06007980297e60fe7663969cdd202a5da578bb6 | [
"Apache-2.0"
] | 4 | 2017-04-08T17:29:35.000Z | 2021-11-29T01:33:23.000Z | defmodule BUPE.Builder do
@moduledoc ~S"""
Elixir EPUB generator
## Example
iex(1)> files = "~/book/*.xhtml" |> Path.expand() |> Path.wildcard()
["/Users/dev/book/bacon.xhtml", "/Users/dev/book/egg.xhtml", "/Users/dev/book/ham.xhtml"]
iex(2)> get_id = fn file -> Path.basename(file, ".xhtml") e... | 29.99697 | 112 | 0.590969 |
03937c16dbc3559527cd55aa62b9333231a281ad | 1,876 | ex | Elixir | clients/big_query/lib/google_api/big_query/v2/model/list_routines_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/big_query/lib/google_api/big_query/v2/model/list_routines_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/big_query/lib/google_api/big_query/v2/model/list_routines_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 37.52 | 313 | 0.738806 |
0393a1945f7c32e46afc7fa783c30149581766a3 | 8,307 | ex | Elixir | clients/compute/lib/google_api/compute/v1/api/regions.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/api/regions.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/api/regions.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 55.38 | 434 | 0.670398 |
039407b495a41319c159f76cf63661e57e362122 | 503 | ex | Elixir | lib/phoenix_sample_web/views/error_view.ex | jonathanleang/phoenix_sample | 2dbc65d74087fedc9eccb87436870f0927c74522 | [
"Apache-2.0"
] | 19 | 2018-09-24T19:55:31.000Z | 2021-12-12T20:46:17.000Z | lib/phoenix_sample_web/views/error_view.ex | jonathanleang/phoenix_sample | 2dbc65d74087fedc9eccb87436870f0927c74522 | [
"Apache-2.0"
] | 8 | 2018-10-17T13:48:15.000Z | 2021-11-04T05:09:55.000Z | lib/phoenix_sample_web/views/error_view.ex | jonathanleang/phoenix_sample | 2dbc65d74087fedc9eccb87436870f0927c74522 | [
"Apache-2.0"
] | 6 | 2018-10-11T13:59:25.000Z | 2022-02-14T14:04:19.000Z | defmodule PhoenixSampleWeb.ErrorView do
use PhoenixSampleWeb, :view
# If you want to customize a particular status code
# for a certain format, you may uncomment below.
# def render("500.html", _assigns) do
# "Internal Server Error"
# end
# By default, Phoenix returns the status message from
# the t... | 29.588235 | 61 | 0.741551 |
0394126dfd9e77a2060fdf088383d65813406aee | 308 | ex | Elixir | lib/yourbot/editor.ex | ConnorRigby/yourbot | eea40e63b0f93963ed14b7efab9ecbe898ab11dd | [
"Apache-2.0"
] | 3 | 2021-11-08T15:19:19.000Z | 2021-11-11T03:18:35.000Z | lib/yourbot/editor.ex | ConnorRigby/yourbot | eea40e63b0f93963ed14b7efab9ecbe898ab11dd | [
"Apache-2.0"
] | null | null | null | lib/yourbot/editor.ex | ConnorRigby/yourbot | eea40e63b0f93963ed14b7efab9ecbe898ab11dd | [
"Apache-2.0"
] | null | null | null | defmodule YourBot.Editor do
def format(code) do
filename = Path.join(System.tmp_dir!(), Ecto.UUID.generate())
File.write!(filename, code)
{"", 0} = System.cmd("python3", ["-m", "black", "-q", filename])
formatted = File.read!(filename)
File.rm!(filename)
{:ok, formatted}
end
end
| 28 | 68 | 0.626623 |
039447c23aca30f71aeb402bfbd1ee69ffbf1fea | 871 | ex | Elixir | rocketpay/lib/rocketpay_web/controllers/accounts_controller.ex | alfredots/next-level-week-4-elixir | ea47b53a27540454efba2f3007125ee5964a760e | [
"MIT"
] | null | null | null | rocketpay/lib/rocketpay_web/controllers/accounts_controller.ex | alfredots/next-level-week-4-elixir | ea47b53a27540454efba2f3007125ee5964a760e | [
"MIT"
] | null | null | null | rocketpay/lib/rocketpay_web/controllers/accounts_controller.ex | alfredots/next-level-week-4-elixir | ea47b53a27540454efba2f3007125ee5964a760e | [
"MIT"
] | null | null | null | defmodule RocketpayWeb.AccountsController do
use RocketpayWeb, :controller
alias Rocketpay.Accounts.Transactions.Response, as: TransactionResponse
alias Rocketpay.Account
action_fallback RocketpayWeb.FallbackController
def deposit(conn, params) do
with {:ok, %Account{} = account} <- Rocketpay.deposit(pa... | 27.21875 | 88 | 0.67853 |
039462d66485c02ffa4027e9e1c7bc3acfbb06b3 | 149 | ex | Elixir | final-projects/shop_website/lib/shop_website_web/controllers/page_controller.ex | anitabenites/elixir-and-phoenix-mentoring-sessions | 0fa283a8d4a8884edd54c8e16d788e2ca65e4592 | [
"MIT"
] | 3 | 2019-07-31T20:06:34.000Z | 2021-11-16T11:19:45.000Z | final-projects/shop_website/lib/shop_website_web/controllers/page_controller.ex | anitabenites/elixir-and-phoenix-mentoring-sessions | 0fa283a8d4a8884edd54c8e16d788e2ca65e4592 | [
"MIT"
] | null | null | null | final-projects/shop_website/lib/shop_website_web/controllers/page_controller.ex | anitabenites/elixir-and-phoenix-mentoring-sessions | 0fa283a8d4a8884edd54c8e16d788e2ca65e4592 | [
"MIT"
] | 1 | 2019-07-31T16:46:14.000Z | 2019-07-31T16:46:14.000Z | defmodule ShopWebsiteWeb.PageController do
use ShopWebsiteWeb, :controller
def index(conn, _params) do
render(conn, "index.html")
end
end
| 18.625 | 42 | 0.751678 |
03946574c37a92e5d314e89953bfacf3c6467c95 | 847 | exs | Elixir | bank-account/account.exs | nlhuykhang/elixir-exercism | 0462661cc411cb28b4bf800639b16684480a06a7 | [
"MIT"
] | null | null | null | bank-account/account.exs | nlhuykhang/elixir-exercism | 0462661cc411cb28b4bf800639b16684480a06a7 | [
"MIT"
] | null | null | null | bank-account/account.exs | nlhuykhang/elixir-exercism | 0462661cc411cb28b4bf800639b16684480a06a7 | [
"MIT"
] | null | null | null | defmodule BankAccount do
@moduledoc """
A bank account that supports access from multiple processes.
"""
@typedoc """
An account handle.
"""
@opaque account :: pid
@doc """
Open the bank. Makes the account available.
"""
@spec open_bank() :: account
def open_bank() do
%{
:balance => ... | 19.25 | 80 | 0.636364 |
03948b7100bd0b9e2519c52fa4b62339f7e2fef5 | 684 | exs | Elixir | config/config.exs | thaisfiori/blog_da_tha | e860e64e5251dae03b95fdf1e339ec0a3d789a29 | [
"Apache-2.0"
] | null | null | null | config/config.exs | thaisfiori/blog_da_tha | e860e64e5251dae03b95fdf1e339ec0a3d789a29 | [
"Apache-2.0"
] | null | null | null | config/config.exs | thaisfiori/blog_da_tha | e860e64e5251dae03b95fdf1e339ec0a3d789a29 | [
"Apache-2.0"
] | null | null | null | import Config
config :blog_da_tha,
ecto_repos: [BlogDaTha.Repo]
config :blog_da_tha_web,
ecto_repos: [BlogDaTha.Repo],
generators: [context_app: :blog_da_tha, binary_id: true]
config :blog_da_tha_web, BlogDaThaWeb.Endpoint,
url: [host: "localhost"],
secret_key_base: "5kvRDoWr9xSP6eKTB9wYr6nlYRcfw0+HxRAth1... | 24.428571 | 86 | 0.748538 |
039492c1354a2ad5c8ea57cb109d6cd511a29861 | 444 | ex | Elixir | lib/test_that_json/parsing.ex | Ariel-Thomas/test_that_json | 5c6301b77d58681a65383344d2f35d1c291fc0ff | [
"MIT"
] | 11 | 2016-07-19T15:33:25.000Z | 2021-07-11T17:31:33.000Z | lib/test_that_json/parsing.ex | Ariel-Thomas/test_that_json | 5c6301b77d58681a65383344d2f35d1c291fc0ff | [
"MIT"
] | 1 | 2018-05-17T16:15:23.000Z | 2018-05-17T16:15:23.000Z | lib/test_that_json/parsing.ex | Ariel-Thomas/test_that_json | 5c6301b77d58681a65383344d2f35d1c291fc0ff | [
"MIT"
] | 2 | 2016-09-20T11:14:41.000Z | 2018-05-16T15:41:29.000Z | defmodule TestThatJson.Parsing do
def parse!(json) when is_binary(json) do
JSX.decode!(json)
rescue
ArgumentError -> raise TestThatJson.InvalidJsonError
end
def parse!(value), do: value
def parse(json) when is_binary(json) do
case JSX.decode(json) do
{:error, _} -> {:error, {TestThatJson.In... | 26.117647 | 86 | 0.666667 |
0394b63178aef330bfd18088799bd0090f116d9a | 510 | ex | Elixir | lib/app_web/views/lead_source_view.ex | ThanhUong/Chronos | 5e1b0823c585b784f5c51212513d518cab53a571 | [
"MIT"
] | null | null | null | lib/app_web/views/lead_source_view.ex | ThanhUong/Chronos | 5e1b0823c585b784f5c51212513d518cab53a571 | [
"MIT"
] | null | null | null | lib/app_web/views/lead_source_view.ex | ThanhUong/Chronos | 5e1b0823c585b784f5c51212513d518cab53a571 | [
"MIT"
] | null | null | null | defmodule AppWeb.LeadSourceView do
use AppWeb, :view
alias AppWeb.LeadSourceView
def render("index.json", %{lead_sources: lead_sources}) do
%{data: render_many(lead_sources, LeadSourceView, "lead_source.json")}
end
def render("show.json", %{lead_source: lead_source}) do
%{data: render_one(lead_sourc... | 25.5 | 74 | 0.701961 |
03953776242781744635a02e8b76608f5fb8adb1 | 1,774 | exs | Elixir | lib/mix/test/mix/tasks/loadconfig_test.exs | mertonium/elixir | 74e666156906974082f6b4d34dfbe6988d6465c0 | [
"Apache-2.0"
] | 1 | 2018-10-02T13:55:29.000Z | 2018-10-02T13:55:29.000Z | lib/mix/test/mix/tasks/loadconfig_test.exs | mertonium/elixir | 74e666156906974082f6b4d34dfbe6988d6465c0 | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/tasks/loadconfig_test.exs | mertonium/elixir | 74e666156906974082f6b4d34dfbe6988d6465c0 | [
"Apache-2.0"
] | null | null | null | Code.require_file("../../test_helper.exs", __DIR__)
defmodule Mix.Tasks.LoadconfigTest do
use MixTest.Case
@tag apps: [:my_app]
test "reads and persists project configuration", context do
Mix.Project.push(MixTest.Case.Sample)
in_tmp(context.test, fn ->
write_config("""
[my_app: [key: :proje... | 31.122807 | 88 | 0.645434 |
03954b3c2080c962e804e0ddc32973e6592b13e1 | 661 | exs | Elixir | advent_umbrella_2016/apps/day8/mix.exs | lauromoura/adventofcode | 320dc1ea7099fbc7c3ffcbc406bfc0aa236c3b78 | [
"Unlicense"
] | null | null | null | advent_umbrella_2016/apps/day8/mix.exs | lauromoura/adventofcode | 320dc1ea7099fbc7c3ffcbc406bfc0aa236c3b78 | [
"Unlicense"
] | null | null | null | advent_umbrella_2016/apps/day8/mix.exs | lauromoura/adventofcode | 320dc1ea7099fbc7c3ffcbc406bfc0aa236c3b78 | [
"Unlicense"
] | null | null | null | defmodule Day8.Mixfile do
use Mix.Project
def project do
[app: :day8,
version: "0.0.1",
elixir: "~> 1.2",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps]
end
# Configuration for the OTP application
#
# Type "mix help compile.app" for more infor... | 20.030303 | 77 | 0.605144 |
039575de23e75eea3dd442e0bb23df790760517d | 2,363 | exs | Elixir | mix.exs | zubairshokh/asciinema-server | b882f285a84054e94e70def8f9777cc2fc3551b1 | [
"Apache-2.0"
] | null | null | null | mix.exs | zubairshokh/asciinema-server | b882f285a84054e94e70def8f9777cc2fc3551b1 | [
"Apache-2.0"
] | null | null | null | mix.exs | zubairshokh/asciinema-server | b882f285a84054e94e70def8f9777cc2fc3551b1 | [
"Apache-2.0"
] | null | null | null | defmodule Asciinema.Mixfile do
use Mix.Project
def project do
[
app: :asciinema,
version: "0.0.1",
elixir: "~> 1.6",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
build_embedded: Mix.env() == :prod,
start_permanent: Mix.en... | 28.46988 | 79 | 0.519255 |
03959b19a21890a6562c276a28b15ef56ebfdc4c | 3,433 | ex | Elixir | clients/games/lib/google_api/games/v1/model/room_create_request.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/games/lib/google_api/games/v1/model/room_create_request.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/games/lib/google_api/games/v1/model/room_create_request.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 50.485294 | 250 | 0.7224 |
0395b575e4b69ba19c676d068f0129323e62353e | 1,381 | exs | Elixir | integration_test/mysql/test_helper.exs | timgestson/ecto | 1c1eb6d322db04cfa48a4fc81da1332e91adbc1f | [
"Apache-2.0"
] | null | null | null | integration_test/mysql/test_helper.exs | timgestson/ecto | 1c1eb6d322db04cfa48a4fc81da1332e91adbc1f | [
"Apache-2.0"
] | null | null | null | integration_test/mysql/test_helper.exs | timgestson/ecto | 1c1eb6d322db04cfa48a4fc81da1332e91adbc1f | [
"Apache-2.0"
] | null | null | null | Logger.configure(level: :info)
ExUnit.start exclude: [:array_type, :read_after_writes, :case_sensitive]
# Basic test repo
alias Ecto.Integration.TestRepo
Application.put_env(:ecto, TestRepo,
adapter: Ecto.Adapters.MySQL,
url: "ecto://root@localhost/ecto_test",
size: 1,
max_overflow: 0)
defmodule Ecto.Integra... | 24.660714 | 79 | 0.747285 |
0395d69d408ee13beb7b3ad1dac81530420c6642 | 503 | ex | Elixir | lib/central/account/startup.ex | badosu/teiserver | 19b623aeb7c2ab28756405f7486e92b714777c54 | [
"MIT"
] | 4 | 2021-07-29T16:23:20.000Z | 2022-02-23T05:34:36.000Z | lib/central/account/startup.ex | badosu/teiserver | 19b623aeb7c2ab28756405f7486e92b714777c54 | [
"MIT"
] | 14 | 2021-08-01T02:36:14.000Z | 2022-01-30T21:15:03.000Z | lib/central/account/startup.ex | badosu/teiserver | 19b623aeb7c2ab28756405f7486e92b714777c54 | [
"MIT"
] | 7 | 2021-05-13T12:55:28.000Z | 2022-01-14T06:39:06.000Z | defmodule Central.Account.Startup do
@moduledoc false
use CentralWeb, :startup
def startup do
QuickAction.add_items([
%{label: "Logout", icons: ["far fa-sign-out"], url: "/logout"},
%{label: "Edit account", icons: ["far fa-lock", :edit], url: "/account/edit"}
])
add_audit_types([
"... | 25.15 | 83 | 0.61829 |
0395d77bfd2ce84771c1f17cc8e56e9b3da69d4c | 1,546 | ex | Elixir | lib/aws/generated/entitlement_marketplace.ex | kw7oe/aws-elixir | 4ba60502dde270c83143822c9964018c7770bad7 | [
"Apache-2.0"
] | 341 | 2018-04-04T19:06:19.000Z | 2022-03-25T21:34:23.000Z | lib/aws/generated/entitlement_marketplace.ex | kw7oe/aws-elixir | 4ba60502dde270c83143822c9964018c7770bad7 | [
"Apache-2.0"
] | 82 | 2018-04-04T17:32:33.000Z | 2022-03-24T15:12:04.000Z | lib/aws/generated/entitlement_marketplace.ex | kw7oe/aws-elixir | 4ba60502dde270c83143822c9964018c7770bad7 | [
"Apache-2.0"
] | 76 | 2018-04-10T20:19:44.000Z | 2022-03-15T13:49:19.000Z | # WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
# See https://github.com/aws-beam/aws-codegen for more details.
defmodule AWS.Entitlement.Marketplace do
@moduledoc """
AWS Marketplace Entitlement Service
This reference provides descriptions of the AWS Marketplace Entitlement Service
API.
AWS Marketplace Entit... | 30.313725 | 82 | 0.723803 |
039618306d025921b1af7cac82e550f0f83e54d6 | 240 | ex | Elixir | apps/fz_http/lib/fz_http_web/views/root_view.ex | amishakov/firezone | cd85b0847ac1792ca00aedab99fbf0f7a520f1a6 | [
"Apache-2.0"
] | null | null | null | apps/fz_http/lib/fz_http_web/views/root_view.ex | amishakov/firezone | cd85b0847ac1792ca00aedab99fbf0f7a520f1a6 | [
"Apache-2.0"
] | 1 | 2022-03-30T03:57:41.000Z | 2022-03-30T03:57:41.000Z | apps/fz_http/lib/fz_http_web/views/root_view.ex | amishakov/firezone | cd85b0847ac1792ca00aedab99fbf0f7a520f1a6 | [
"Apache-2.0"
] | null | null | null | defmodule FzHttpWeb.RootView do
use FzHttpWeb, :view
alias FzCommon.FzCrypto
def authorization_uri(oidc, provider) do
params = %{
state: FzCrypto.rand_string()
}
oidc.authorization_uri(provider, params)
end
end
| 17.142857 | 44 | 0.708333 |
0396340e388ad07fcf1bf9598e6a6df06900e283 | 2,565 | ex | Elixir | apps/studio/lib/studio/painter.ex | danmarcab/deep_painting | 860c7d02bd6b112fffa199f715e61d895cba6623 | [
"Apache-2.0"
] | null | null | null | apps/studio/lib/studio/painter.ex | danmarcab/deep_painting | 860c7d02bd6b112fffa199f715e61d895cba6623 | [
"Apache-2.0"
] | 11 | 2020-01-28T22:19:10.000Z | 2022-03-11T23:18:18.000Z | apps/studio/lib/studio/painter.ex | danmarcab/deep_painting | 860c7d02bd6b112fffa199f715e61d895cba6623 | [
"Apache-2.0"
] | null | null | null | defmodule Studio.Painter do
@moduledoc """
Module to interact with a painter executable.
"""
use GenServer
require Logger
alias Painting.Iteration
@spec start_link(String.t, Keyword.t) :: GenServer.on_start
def start_link(painting_name, opts \\ []) when is_list(opts) do
watcher = Keyword.get(opts,... | 27.287234 | 92 | 0.659259 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.