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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e83d3e1518b9d81856f1736d80807714b4926713 | 8,279 | ex | Elixir | elixir/codes-from-books/little-elixir/cap8/blitzy/deps/timex/lib/interval/interval.ex | trxeste/wrk | 3e05e50ff621866f0361cc8494ce8f6bb4d97fae | [
"BSD-3-Clause"
] | 1 | 2017-10-16T03:00:50.000Z | 2017-10-16T03:00:50.000Z | elixir/codes-from-books/little-elixir/cap8/blitzy/deps/timex/lib/interval/interval.ex | trxeste/wrk | 3e05e50ff621866f0361cc8494ce8f6bb4d97fae | [
"BSD-3-Clause"
] | null | null | null | elixir/codes-from-books/little-elixir/cap8/blitzy/deps/timex/lib/interval/interval.ex | trxeste/wrk | 3e05e50ff621866f0361cc8494ce8f6bb4d97fae | [
"BSD-3-Clause"
] | null | null | null | defmodule Timex.Interval do
@moduledoc """
This module is used for creating and manipulating DateTime intervals.
"""
alias Timex.Duration
defmodule FormatError do
@moduledoc """
Thrown when an error occurs with formatting an Interval
"""
defexception message: "Unable to format interval!"
... | 35.995652 | 127 | 0.607561 |
e83d498544329e01bf7fec58cad1d32f88948f13 | 49,340 | ex | Elixir | lib/elixir/lib/stream.ex | irisTa56/elixir | 0a953d75fb2cbdc6f3d33040aa60738d85512a1f | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/stream.ex | irisTa56/elixir | 0a953d75fb2cbdc6f3d33040aa60738d85512a1f | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/stream.ex | irisTa56/elixir | 0a953d75fb2cbdc6f3d33040aa60738d85512a1f | [
"Apache-2.0"
] | null | null | null | defmodule Stream do
@moduledoc """
Functions for creating and composing streams.
Streams are composable, lazy enumerables (for an introduction on
enumerables, see the `Enum` module). Any enumerable that generates
elements one by one during enumeration is called a stream. For example,
Elixir's `Range` is a ... | 30.269939 | 110 | 0.615484 |
e83d81617941ca839e09ff15f62ff1f18433d87a | 675 | exs | Elixir | 2018/Day02/part1.exs | CarpeNoctem/AdventOfCode | 8dcfb735514fa474c8e90865664b35408ccead25 | [
"MIT"
] | null | null | null | 2018/Day02/part1.exs | CarpeNoctem/AdventOfCode | 8dcfb735514fa474c8e90865664b35408ccead25 | [
"MIT"
] | null | null | null | 2018/Day02/part1.exs | CarpeNoctem/AdventOfCode | 8dcfb735514fa474c8e90865664b35408ccead25 | [
"MIT"
] | null | null | null | defmodule Day2 do
defp get_checksum([], twos, threes) do
twos * threes
end
defp get_checksum([id | ids], twos, threes) do
stats = parse_id(String.split(id, ""), %{}) |> Map.values
twos = 2 in stats && twos + 1 || twos
threes = 3 in stats && threes + 1 || threes
get_... | 23.275862 | 71 | 0.568889 |
e83d901da180d2bf473a8cd083ade4e27d9e33b2 | 6,174 | exs | Elixir | test/c_backend_tests/c_client_tests/connection_test.exs | juljimm/opex62541 | c44c157213a8a3fb07283f6e697e6dd018693315 | [
"MIT"
] | null | null | null | test/c_backend_tests/c_client_tests/connection_test.exs | juljimm/opex62541 | c44c157213a8a3fb07283f6e697e6dd018693315 | [
"MIT"
] | null | null | null | test/c_backend_tests/c_client_tests/connection_test.exs | juljimm/opex62541 | c44c157213a8a3fb07283f6e697e6dd018693315 | [
"MIT"
] | null | null | null | defmodule CClientConnectionTest do
use ExUnit.Case
doctest Opex62541
setup do
executable = :code.priv_dir(:opex62541) ++ '/opc_ua_client'
port =
Port.open({:spawn_executable, executable}, [
{:args, []},
{:packet, 2},
:use_stdio,
:binary,
:exit_status
]... | 25.618257 | 119 | 0.50162 |
e83d96d16613c09149b849c6250e7e9f94281ca1 | 2,825 | ex | Elixir | lib/ex_algo/list/linked_list.ex | code-shoily/ex_algo | 7837c222fd2844a151b6b92038f94ea088bec0a2 | [
"MIT"
] | 21 | 2021-11-21T08:07:38.000Z | 2022-03-13T06:19:35.000Z | lib/ex_algo/list/linked_list.ex | code-shoily/ex_algo | 7837c222fd2844a151b6b92038f94ea088bec0a2 | [
"MIT"
] | 3 | 2021-11-26T22:54:09.000Z | 2022-03-06T21:16:12.000Z | lib/ex_algo/list/linked_list.ex | code-shoily/ex_algo | 7837c222fd2844a151b6b92038f94ea088bec0a2 | [
"MIT"
] | null | null | null | defmodule ExAlgo.List.LinkedList do
@moduledoc """
Implementation of a singly linked list.
"""
@type neg_index_error :: {:error, :negative_index}
@type empty_error :: {:error, :empty_list}
@type value_type :: any()
@type t :: %__MODULE__{container: [value_type()]}
defstruct container: []
@doc """
... | 23.739496 | 93 | 0.613097 |
e83dc2f95a52d22e4ca9087f12fc082497e9edb7 | 75 | exs | Elixir | test/views/layout_view_test.exs | chasm/elm_pack | 5bbdc4df335376170b6d161bfc65f9fc7eca2648 | [
"MIT"
] | 1 | 2016-08-02T00:36:46.000Z | 2016-08-02T00:36:46.000Z | test/views/layout_view_test.exs | chasm/elm_pack | 5bbdc4df335376170b6d161bfc65f9fc7eca2648 | [
"MIT"
] | null | null | null | test/views/layout_view_test.exs | chasm/elm_pack | 5bbdc4df335376170b6d161bfc65f9fc7eca2648 | [
"MIT"
] | null | null | null | defmodule ElmPack.LayoutViewTest do
use ElmPack.ConnCase, async: true
end | 25 | 35 | 0.826667 |
e83dcc19fb4bfe51bd6757ff62852d740d15798d | 698 | ex | Elixir | lib/geolix/adapter/mmdb2/record/enterprise_subdivision.ex | coladarci/geolix | 0a0508db410732fa8a24cbcd28e44f89b1b30afa | [
"Apache-2.0"
] | null | null | null | lib/geolix/adapter/mmdb2/record/enterprise_subdivision.ex | coladarci/geolix | 0a0508db410732fa8a24cbcd28e44f89b1b30afa | [
"Apache-2.0"
] | null | null | null | lib/geolix/adapter/mmdb2/record/enterprise_subdivision.ex | coladarci/geolix | 0a0508db410732fa8a24cbcd28e44f89b1b30afa | [
"Apache-2.0"
] | null | null | null | defmodule Geolix.Adapter.MMDB2.Record.EnterpriseSubdivision do
@moduledoc """
Record for `subdivision` information (enterprise database).
"""
alias Geolix.Adapter.MMDB2.Model
alias Geolix.Adapter.MMDB2.Record
defstruct %Record.Subdivision{}
|> Map.keys()
|> List.delete(:__struct__)... | 22.516129 | 62 | 0.654728 |
e83e12dbfa850b4b19f338790d0623c481c14e79 | 83 | exs | Elixir | test/test_helper.exs | AquarHEAD/mashiro_no_asobiba | 84badd8410087b61807cd225226feec5646775bd | [
"Unlicense"
] | 1 | 2016-07-25T10:16:20.000Z | 2016-07-25T10:16:20.000Z | test/test_helper.exs | AquarHEAD/mashiro_no_asobiba | 84badd8410087b61807cd225226feec5646775bd | [
"Unlicense"
] | 2 | 2016-10-31T22:13:02.000Z | 2016-11-19T01:33:42.000Z | test/test_helper.exs | aquarhead/mashiro_no_asobiba | 84badd8410087b61807cd225226feec5646775bd | [
"Unlicense"
] | null | null | null | ExUnit.start()
defmodule TestA do
def write, do: :nothing
end
:meck.new(TestA)
| 10.375 | 25 | 0.710843 |
e83e32c3fb32c9fa9b0cacc97e68e3e104547aae | 1,653 | ex | Elixir | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/disk_encryption_status.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/disk_encryption_status.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/disk_encryption_status.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... | 33.06 | 130 | 0.733212 |
e83e7895711f9d7eb8866d3fb5c34c8c0677eb47 | 2,314 | ex | Elixir | clients/monitoring/lib/google_api/monitoring/v3/model/monitored_resource_metadata.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/monitoring/lib/google_api/monitoring/v3/model/monitored_resource_metadata.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/monitoring/lib/google_api/monitoring/v3/model/monitored_resource_metadata.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... | 46.28 | 436 | 0.742005 |
e83ebe6a0401fc4152bc06ea5299a2f5156ed926 | 3,786 | ex | Elixir | apps/crawler/lib/crawler/task_manager.ex | gregredhead/belethor | 255925396b18ba4a6950f386abf8a9e17a7e5e7c | [
"Apache-2.0"
] | 3 | 2018-07-20T22:14:36.000Z | 2018-12-21T19:54:48.000Z | apps/crawler/lib/crawler/task_manager.ex | gregredhead/belethor | 255925396b18ba4a6950f386abf8a9e17a7e5e7c | [
"Apache-2.0"
] | 36 | 2018-09-15T21:46:54.000Z | 2020-03-28T16:10:18.000Z | apps/crawler/lib/crawler/task_manager.ex | gregredhead/belethor | 255925396b18ba4a6950f386abf8a9e17a7e5e7c | [
"Apache-2.0"
] | 2 | 2018-07-22T08:47:07.000Z | 2021-12-11T01:39:19.000Z | defmodule Crawler.TaskManager do
@moduledoc """
Module to limit the amount of concurrent running task.
If the task maximum is reached, the request will be queued.
"""
# struct to represent the inner gen_server state
defstruct [:max, :queue, :supervisor]
use GenServer
require Logger
alias Crawler
i... | 26.475524 | 85 | 0.624142 |
e83ec99148948baf2ca178d287ed05876cd2c487 | 574 | exs | Elixir | mix.exs | Pragmatic-Elixir-Meetup/rpi_video | eb70bc19eb96ee2e617ae3a6477480e5c41cbe3a | [
"MIT"
] | 1 | 2019-12-12T09:00:18.000Z | 2019-12-12T09:00:18.000Z | mix.exs | silathdiir/rpi_video | eb70bc19eb96ee2e617ae3a6477480e5c41cbe3a | [
"MIT"
] | 2 | 2019-12-12T01:25:26.000Z | 2019-12-12T17:51:33.000Z | mix.exs | Pragmatic-Elixir-Meetup/rpi_video | eb70bc19eb96ee2e617ae3a6477480e5c41cbe3a | [
"MIT"
] | 1 | 2019-12-12T09:13:47.000Z | 2019-12-12T09:13:47.000Z | defmodule RpiVideo.MixProject do
use Mix.Project
def project do
[
app: :rpi_video,
version: "0.0.1",
elixir: "~> 1.8",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_... | 19.793103 | 87 | 0.578397 |
e83ec9f2951aab265ce644a43331101e8967c17c | 751 | exs | Elixir | test/tags/feature_filterer_test.exs | ejscunha/white-bread | 1c2eed1c98545beeb70b590426ce9026a8455e97 | [
"MIT"
] | 209 | 2015-03-03T14:14:28.000Z | 2020-10-26T03:23:48.000Z | test/tags/feature_filterer_test.exs | ejscunha/white-bread | 1c2eed1c98545beeb70b590426ce9026a8455e97 | [
"MIT"
] | 83 | 2015-03-23T11:46:51.000Z | 2020-11-04T09:47:06.000Z | test/tags/feature_filterer_test.exs | ejscunha/white-bread | 1c2eed1c98545beeb70b590426ce9026a8455e97 | [
"MIT"
] | 46 | 2015-06-12T17:37:21.000Z | 2020-10-30T09:52:45.000Z | defmodule WhiteBread.Tags.FeatureFiltererTest do
use ExUnit.Case
import WhiteBread.Tags.FeatureFilterer, only: [get_for_tags: 2]
alias Gherkin.Elements.Feature, as: Feature
alias Gherkin.Elements.Scenario, as: Scenario
test "Returns a feature if it has a matching tag" do
feature = %Feature{tags: ["matchi... | 37.55 | 97 | 0.723036 |
e83f1071a990eed3ee57b337a956672c34dfb616 | 781 | ex | Elixir | ros/ros_ui_station/test/support/channel_case.ex | kujua/elixir-handbook | 4185ad8da7f652fdb59c799dc58bcb33fda10475 | [
"Apache-2.0"
] | 1 | 2019-07-01T18:47:28.000Z | 2019-07-01T18:47:28.000Z | ros/ros_ui_station/test/support/channel_case.ex | kujua/elixir-handbook | 4185ad8da7f652fdb59c799dc58bcb33fda10475 | [
"Apache-2.0"
] | 4 | 2020-07-17T16:57:18.000Z | 2021-05-09T23:50:52.000Z | ros/ros_ui_station/test/support/channel_case.ex | kujua/elixir-handbook | 4185ad8da7f652fdb59c799dc58bcb33fda10475 | [
"Apache-2.0"
] | null | null | null | defmodule Ros.StationWeb.ChannelCase do
@moduledoc """
This module defines the test case to be used by
channel tests.
Such tests rely on `Phoenix.ChannelTest` and also
import other functionality to make it easier
to build common data structures and query the data layer.
Finally, if the test case interac... | 24.40625 | 59 | 0.727273 |
e83f1cd76906f99446af18083f52648fd3072c7c | 6,475 | ex | Elixir | lib/hedwig/robot.ex | scrogson/hedwig | a453847d04a9d730952fc5b2f8239848f4285573 | [
"MIT"
] | 51 | 2015-01-15T10:47:58.000Z | 2020-10-21T19:55:23.000Z | lib/hedwig/robot.ex | scrogson/hedwig | a453847d04a9d730952fc5b2f8239848f4285573 | [
"MIT"
] | 13 | 2015-01-27T13:39:45.000Z | 2015-09-10T22:16:45.000Z | lib/hedwig/robot.ex | scrogson/hedwig | a453847d04a9d730952fc5b2f8239848f4285573 | [
"MIT"
] | 16 | 2015-04-02T10:24:16.000Z | 2022-01-04T10:34:40.000Z | defmodule Hedwig.Robot do
@moduledoc """
Defines a robot.
Robots receive messages from a chat source (XMPP, Slack, Console, etc), and
dispatch them to matching responders. See the documentation for
`Hedwig.Responder` for details on responders.
When used, the robot expects the `:otp_app` as option. The `:o... | 26.108871 | 84 | 0.60417 |
e83f2c755581d562ef6cf98118e54805d9939edf | 1,542 | ex | Elixir | lib/nostrum/struct/event/message_reaction_remove.ex | mckethanor/nostrum | 13a3927c872c1540266e9f1ba4bcad4182baa9bf | [
"MIT"
] | null | null | null | lib/nostrum/struct/event/message_reaction_remove.ex | mckethanor/nostrum | 13a3927c872c1540266e9f1ba4bcad4182baa9bf | [
"MIT"
] | null | null | null | lib/nostrum/struct/event/message_reaction_remove.ex | mckethanor/nostrum | 13a3927c872c1540266e9f1ba4bcad4182baa9bf | [
"MIT"
] | 1 | 2021-09-13T20:59:42.000Z | 2021-09-13T20:59:42.000Z | defmodule Nostrum.Struct.Event.MessageReactionRemove do
@moduledoc "Sent when a user removes a reaction from a message"
@moduledoc since: "0.5.0"
alias Nostrum.Struct.{Channel, Emoji, Guild, Message, User}
alias Nostrum.{Snowflake, Util}
defstruct [:user_id, :channel_id, :message_id, :guild_id, :emoji]
#... | 31.469388 | 70 | 0.649157 |
e83f57ee02af165828632889b61ac8af73902c54 | 1,562 | ex | Elixir | lib/arc_ecto_paperclip/interpolations.ex | gregpardo/arc_ecto_paperclip | 4b1af69597ed0dadf7de1efa3b920ddae8cd3b53 | [
"Apache-2.0"
] | 1 | 2019-07-10T16:00:08.000Z | 2019-07-10T16:00:08.000Z | lib/arc_ecto_paperclip/interpolations.ex | gregpardo/arc_ecto_paperclip | 4b1af69597ed0dadf7de1efa3b920ddae8cd3b53 | [
"Apache-2.0"
] | null | null | null | lib/arc_ecto_paperclip/interpolations.ex | gregpardo/arc_ecto_paperclip | 4b1af69597ed0dadf7de1efa3b920ddae8cd3b53 | [
"Apache-2.0"
] | null | null | null | defmodule Arc.Ecto.Paperclip.Interpolations do
@doc """
Paperclip default interpolation of class name... Example: Book -> books
"""
@spec class(struct, atom, atom) :: {String.t}
def class(scope, _attachment_name, _version \\ :original) do
scope.__struct__ |> Inflex.pluralize |> Macro.underscore |> Strin... | 33.956522 | 94 | 0.673496 |
e83f94e04a7f03adfb2e6d443207705007a3ef91 | 45,971 | ex | Elixir | lib/elixir/lib/calendar/datetime.ex | IvanRublev/elixir | 1ce201aa1ebbfc1666c4e4bde64f706a89629d59 | [
"Apache-2.0"
] | 2 | 2020-06-02T18:00:28.000Z | 2021-12-10T03:21:42.000Z | lib/elixir/lib/calendar/datetime.ex | IvanRublev/elixir | 1ce201aa1ebbfc1666c4e4bde64f706a89629d59 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/calendar/datetime.ex | IvanRublev/elixir | 1ce201aa1ebbfc1666c4e4bde64f706a89629d59 | [
"Apache-2.0"
] | null | null | null | defmodule DateTime do
@moduledoc """
A datetime implementation with a time zone.
This datetime can be seen as an ephemeral snapshot
of a datetime 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... | 33.75257 | 134 | 0.634704 |
e83fd2457e561e071f6dfbc17a8bf91c87d0e8d0 | 296 | exs | Elixir | api_gateway/test/controllers/ping_controller_test.exs | lcnascimento/pokerapp | d7928aebc867c49f01546611ed65a5befa3a6429 | [
"MIT"
] | 2 | 2020-04-20T16:31:01.000Z | 2020-04-20T16:45:03.000Z | api_gateway/test/controllers/ping_controller_test.exs | lcnascimento/pokerapp | d7928aebc867c49f01546611ed65a5befa3a6429 | [
"MIT"
] | null | null | null | api_gateway/test/controllers/ping_controller_test.exs | lcnascimento/pokerapp | d7928aebc867c49f01546611ed65a5befa3a6429 | [
"MIT"
] | null | null | null | defmodule ApiGateway.PingControllerTest do
use ApiGateway.ConnCase
test "index/2 should respond with 'pong' message", %{conn: conn} do
response =
conn
|> get(Routes.ping_path(conn, :index))
|> json_response(200)
assert response == %{"message" => "pong"}
end
end
| 22.769231 | 69 | 0.655405 |
e8404658c20b9315f303c38252faa690c0b26d34 | 140 | ex | Elixir | lib/club_backend_web/controllers/ping_controller.ex | ufosc/club-backend-ex | 87b55bc9fcccd9d458ee3277c3153f608f3a8a5e | [
"MIT"
] | null | null | null | lib/club_backend_web/controllers/ping_controller.ex | ufosc/club-backend-ex | 87b55bc9fcccd9d458ee3277c3153f608f3a8a5e | [
"MIT"
] | 6 | 2020-07-31T23:02:34.000Z | 2021-02-26T21:10:10.000Z | lib/club_backend_web/controllers/ping_controller.ex | ufosc/club-backend-ex | 87b55bc9fcccd9d458ee3277c3153f608f3a8a5e | [
"MIT"
] | 2 | 2020-08-23T23:04:00.000Z | 2020-10-03T03:18:11.000Z | defmodule ClubBackendWeb.PingController do
use ClubBackendWeb, :controller
def ping(conn, _) do
conn
|> text("pong")
end
end
| 15.555556 | 42 | 0.7 |
e84085409b16e5339b29cdc5e4f32b75916cebcf | 1,724 | ex | Elixir | lib/stranger_web/live/login_form_component.ex | Arp-G/stranger | 1c7c804b0ab4dbee4c77f1c5adf0d9d5a09aaf41 | [
"MIT"
] | 11 | 2021-01-27T17:21:00.000Z | 2021-12-07T13:02:59.000Z | lib/stranger_web/live/login_form_component.ex | Arp-G/stranger | 1c7c804b0ab4dbee4c77f1c5adf0d9d5a09aaf41 | [
"MIT"
] | null | null | null | lib/stranger_web/live/login_form_component.ex | Arp-G/stranger | 1c7c804b0ab4dbee4c77f1c5adf0d9d5a09aaf41 | [
"MIT"
] | null | null | null | defmodule StrangerWeb.LoginFormComponent do
use StrangerWeb, :live_component
use Phoenix.HTML
@impl true
def mount(socket) do
{:ok, assign(socket, %{email: "", password: ""})}
end
@impl true
def render(assigns) do
~L"""
<div class="form_heading"> Login </div>
<section class="login-sectio... | 27.365079 | 137 | 0.589327 |
e840892813a9c7f714299c857369a36587d59a66 | 13,902 | ex | Elixir | lib/ex_unit/lib/ex_unit/diff.ex | Joe-noh/elixir | 34bf464bc1a035b6015366463e04f1bf9d2065f3 | [
"Apache-2.0"
] | null | null | null | lib/ex_unit/lib/ex_unit/diff.ex | Joe-noh/elixir | 34bf464bc1a035b6015366463e04f1bf9d2065f3 | [
"Apache-2.0"
] | null | null | null | lib/ex_unit/lib/ex_unit/diff.ex | Joe-noh/elixir | 34bf464bc1a035b6015366463e04f1bf9d2065f3 | [
"Apache-2.0"
] | null | null | null | defmodule ExUnit.Diff do
@moduledoc false
@doc """
Returns an edit script representing the difference between `left` and `right`.
Returns `nil` if they are not the same data type,
or if the given data type is not supported.
"""
def script(left, right)
def script(term, term)
when is_binary(term)... | 30.287582 | 107 | 0.603151 |
e8408ba9b437c9d88d935510a548b4f969255f93 | 305 | ex | Elixir | lib/Structs/Guild/emoji.ex | BenAlbin/alchemy | c31bce54e13a692acdba3c3b581ff49090da7604 | [
"MIT"
] | 1 | 2019-02-24T03:13:22.000Z | 2019-02-24T03:13:22.000Z | lib/Structs/Guild/emoji.ex | appositum/alchemy | 2e4c06e198fa8c824183782508610815395d7c0e | [
"MIT"
] | null | null | null | lib/Structs/Guild/emoji.ex | appositum/alchemy | 2e4c06e198fa8c824183782508610815395d7c0e | [
"MIT"
] | null | null | null | defmodule Alchemy.Guild.Emoji do
@moduledoc false
@derive Poison.Encoder
defstruct [:id,
:name,
:roles,
:require_colons,
:managed]
defimpl String.Chars, for: __MODULE__ do
def to_string(emoji), do: "<:#{emoji.name}:#{emoji.id}>"
end
end
| 20.333333 | 60 | 0.577049 |
e840a7b5a5b932a6731f51c4f395fddfda4e3f00 | 160 | ex | Elixir | with-op1/w2.ex | leogtzr/elixir_code_snippets | 5c8c921dc165de8fc29bb14046386efa81ce7542 | [
"MIT"
] | null | null | null | with-op1/w2.ex | leogtzr/elixir_code_snippets | 5c8c921dc165de8fc29bb14046386efa81ce7542 | [
"MIT"
] | null | null | null | with-op1/w2.ex | leogtzr/elixir_code_snippets | 5c8c921dc165de8fc29bb14046386efa81ce7542 | [
"MIT"
] | null | null | null | vals = [1, 2, 3, 4, 5]
mean =
with(
count = Enum.count(vals),
sum =
Enum.sum vals do
sum / count
end
)
IO.puts(inspect(mean))
| 12.307692 | 29 | 0.49375 |
e840bdc7eb51764d44ab603f2a7733ed35415694 | 276 | exs | Elixir | test/channels/routine_channel_test.exs | mcousillas6/BioMonitor | 312a903fe19751b6896aca9346340ea502397350 | [
"MIT"
] | null | null | null | test/channels/routine_channel_test.exs | mcousillas6/BioMonitor | 312a903fe19751b6896aca9346340ea502397350 | [
"MIT"
] | null | null | null | test/channels/routine_channel_test.exs | mcousillas6/BioMonitor | 312a903fe19751b6896aca9346340ea502397350 | [
"MIT"
] | null | null | null | defmodule BioMonitor.RoutineChannelTest do
use BioMonitor.ChannelCase
alias BioMonitor.RoutineChannel
setup do
{:ok, _, socket} =
socket("user_id", %{some: :assign})
|> subscribe_and_join(RoutineChannel, "routine")
{:ok, socket: socket}
end
end
| 19.714286 | 54 | 0.688406 |
e840c2aa4efcb2ef3e421f3810c002a2230dcf4a | 4,356 | ex | Elixir | priv/templates/coherence.install/controllers/coherence/password_controller.ex | harmon25/coherence | 5c4f26d3c87f6a16638adf623d041e2723ccf2b8 | [
"MIT"
] | 1 | 2022-03-06T16:30:21.000Z | 2022-03-06T16:30:21.000Z | priv/templates/coherence.install/controllers/coherence/password_controller.ex | ysbaddaden/coherence | 5c4f26d3c87f6a16638adf623d041e2723ccf2b8 | [
"MIT"
] | null | null | null | priv/templates/coherence.install/controllers/coherence/password_controller.ex | ysbaddaden/coherence | 5c4f26d3c87f6a16638adf623d041e2723ccf2b8 | [
"MIT"
] | 2 | 2017-09-22T16:54:36.000Z | 2021-11-09T20:55:58.000Z | defmodule <%= base %>.Coherence.PasswordController do
@moduledoc """
Handle password recovery actions.
Controller that handles the recover password feature.
Actions:
* new - render the recover password form
* create - verify user's email address, generate a token, and send the email
* edit - render the... | 31.114286 | 88 | 0.637282 |
e840e9cf453fed48e58c8ff47757cfad728e787c | 5,111 | exs | Elixir | test/support/api_server_test.exs | TheRealReal/spandex_datadog | c3b98af7328fe966a1640b3444dfcf4dcbf9ee7d | [
"MIT"
] | null | null | null | test/support/api_server_test.exs | TheRealReal/spandex_datadog | c3b98af7328fe966a1640b3444dfcf4dcbf9ee7d | [
"MIT"
] | null | null | null | test/support/api_server_test.exs | TheRealReal/spandex_datadog | c3b98af7328fe966a1640b3444dfcf4dcbf9ee7d | [
"MIT"
] | null | null | null | defmodule SpandexDatadog.ApiServerTest do
use ExUnit.Case
import ExUnit.CaptureLog
alias Spandex.{
Span,
Trace
}
alias SpandexDatadog.ApiServer
defmodule TestOkApiServer do
def put(url, body, headers) do
send(self(), {:put_datadog_spans, body |> Msgpax.unpack!() |> hd(), url, headers})... | 27.627027 | 96 | 0.499902 |
e841014928493297c7dd5a8e93df503abf83a188 | 941 | exs | Elixir | implementations/elixir/ockam/ockam/test/ockam/router/message_test.exs | digikata/ockam | 015a834ce0d34921b634439d965f726d877fd076 | [
"Apache-2.0"
] | null | null | null | implementations/elixir/ockam/ockam/test/ockam/router/message_test.exs | digikata/ockam | 015a834ce0d34921b634439d965f726d877fd076 | [
"Apache-2.0"
] | null | null | null | implementations/elixir/ockam/ockam/test/ockam/router/message_test.exs | digikata/ockam | 015a834ce0d34921b634439d965f726d877fd076 | [
"Apache-2.0"
] | null | null | null | defmodule Ockam.Router.Message.Tests do
use ExUnit.Case, async: true
doctest Ockam.Router.Message
alias Ockam.Router.Message
describe "Ockam.Router.Message.Any" do
test "empty onward_route is default" do
assert [] === Message.onward_route(:test)
assert [] === Message.onward_route(100)
ass... | 34.851852 | 82 | 0.645058 |
e84110014b7fac08ce8d1d9bdb503edbad284a19 | 11,851 | exs | Elixir | lib/elixir/test/elixir/task/supervisor_test.exs | mertonium/elixir | 74e666156906974082f6b4d34dfbe6988d6465c0 | [
"Apache-2.0"
] | 1 | 2021-04-28T21:35:01.000Z | 2021-04-28T21:35:01.000Z | lib/elixir/test/elixir/task/supervisor_test.exs | mertonium/elixir | 74e666156906974082f6b4d34dfbe6988d6465c0 | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/task/supervisor_test.exs | mertonium/elixir | 74e666156906974082f6b4d34dfbe6988d6465c0 | [
"Apache-2.0"
] | 1 | 2018-04-18T11:25:33.000Z | 2018-04-18T11:25:33.000Z | Code.require_file("../test_helper.exs", __DIR__)
defmodule Task.SupervisorTest do
use ExUnit.Case
@moduletag :capture_log
setup do
{:ok, pid} = Task.Supervisor.start_link()
{:ok, supervisor: pid}
end
def wait_and_send(caller, atom) do
send(caller, :ready)
receive do: (true -> true)
sen... | 32.379781 | 97 | 0.636402 |
e84140b20db7116738901c2bd3d95ab05b318015 | 1,885 | ex | Elixir | clients/firestore/lib/google_api/firestore/v1beta1/model/lat_lng.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/firestore/lib/google_api/firestore/v1beta1/model/lat_lng.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/firestore/lib/google_api/firestore/v1beta1/model/lat_lng.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.907407 | 125 | 0.722016 |
e8414626c8d5630c15fb0bdc3dd3eb63b305e475 | 2,476 | exs | Elixir | test/redixcontrol_test.exs | beehive-spg/beehive-routing-buffer | a7748b1789e82718db5ab2f8c4e3620ce79c7f2e | [
"Apache-2.0"
] | null | null | null | test/redixcontrol_test.exs | beehive-spg/beehive-routing-buffer | a7748b1789e82718db5ab2f8c4e3620ce79c7f2e | [
"Apache-2.0"
] | null | null | null | test/redixcontrol_test.exs | beehive-spg/beehive-routing-buffer | a7748b1789e82718db5ab2f8c4e3620ce79c7f2e | [
"Apache-2.0"
] | null | null | null | ExUnit.start
defmodule RedixcontrolTest do
use ExUnit.Case, async: true
doctest Buffer.Redixcontrol
# NOTE Make sure the Redis Server is started
test "Worker creation and operability." do
assert Buffer.Redixcontrol.query(["PING"]) == "PONG"
end
test "Redis operability. Insert \"fav_c... | 36.411765 | 290 | 0.601777 |
e8414630a54810a5c3caae536902fe91e59fce53 | 5,637 | exs | Elixir | test/captain_hook/webhook_endpoints/secrets/webhook_endpoint_secret_test.exs | annatel/captain_hook | e16a01107d11756d37d96d1e9092c17d9aa9260b | [
"MIT"
] | 4 | 2020-11-13T11:27:24.000Z | 2021-08-19T17:28:53.000Z | test/captain_hook/webhook_endpoints/secrets/webhook_endpoint_secret_test.exs | annatel/captain_hook | e16a01107d11756d37d96d1e9092c17d9aa9260b | [
"MIT"
] | null | null | null | test/captain_hook/webhook_endpoints/secrets/webhook_endpoint_secret_test.exs | annatel/captain_hook | e16a01107d11756d37d96d1e9092c17d9aa9260b | [
"MIT"
] | null | null | null | defmodule CaptainHook.WebhookEndpoints.Secrets.WebhookEndpointSecretTest do
use ExUnit.Case, async: true
use CaptainHook.DataCase
alias CaptainHook.WebhookEndpoints.Secrets.WebhookEndpointSecret
@datetime_1 DateTime.from_naive!(~N[2018-05-24 12:27:48], "Etc/UTC")
@datetime_2 DateTime.from_naive!(~N[2018-06-... | 33.553571 | 98 | 0.697179 |
e84153004f2b7f1848eed5799fbe88d7a53ef962 | 4,532 | exs | Elixir | dpp/test/genserver_distributor_test.exs | XiaoxiaoZ/Distributed-path-planner | a7467e08e60248793dc55624497fd91bdb45ca14 | [
"MIT"
] | null | null | null | dpp/test/genserver_distributor_test.exs | XiaoxiaoZ/Distributed-path-planner | a7467e08e60248793dc55624497fd91bdb45ca14 | [
"MIT"
] | 6 | 2021-12-12T13:23:17.000Z | 2021-12-17T12:03:46.000Z | dpp/test/genserver_distributor_test.exs | XiaoxiaoZ/Distributed-path-planner | a7467e08e60248793dc55624497fd91bdb45ca14 | [
"MIT"
] | null | null | null | defmodule GenServerDistributorTest do
use ExUnit.Case
test "GenServer test distributor" do
points = [[0.0, 1.0, 0.0, -1.0, -0.5, 0.0, 0.0, -0.5, -1.0, 1.0, -0.5, 0.0],
[0.0, 2.0, 0.0, -2.0, -1.0, 0.0, 0.0, -1.0, -2.0, 2.0, -1.0, 0.0]]
indices = [[0, 1, 2, 0, 2, 3, 0, 3, 1],
... | 74.295082 | 375 | 0.661959 |
e841641b7ddef50125ec957726db748bd48ceac6 | 320 | ex | Elixir | lib/page_change_notifier_web/controllers/search_controller.ex | elitau/page_change_notifier | 55c02ef0a464040d98cf416c131e39e7a09df975 | [
"MIT"
] | null | null | null | lib/page_change_notifier_web/controllers/search_controller.ex | elitau/page_change_notifier | 55c02ef0a464040d98cf416c131e39e7a09df975 | [
"MIT"
] | null | null | null | lib/page_change_notifier_web/controllers/search_controller.ex | elitau/page_change_notifier | 55c02ef0a464040d98cf416c131e39e7a09df975 | [
"MIT"
] | null | null | null | defmodule PageChangeNotifierWeb.SearchController do
use PageChangeNotifierWeb, :controller
plug(PageChangeNotifierWeb.Plug.Authenticate)
def search(conn, %{"q" => query}) do
new_results = PageChangeNotifier.Search.run(query)
render(conn, "results.html", query: query, new_results: new_results)
end
end
| 29.090909 | 72 | 0.76875 |
e84197b232107032ca2a106304fe9e5566c0d328 | 74 | exs | Elixir | test/views/layout_view_test.exs | frbaroni/budget | c8bd78eff0607f98ffa49265d9485d0c85a28ede | [
"MIT"
] | null | null | null | test/views/layout_view_test.exs | frbaroni/budget | c8bd78eff0607f98ffa49265d9485d0c85a28ede | [
"MIT"
] | null | null | null | test/views/layout_view_test.exs | frbaroni/budget | c8bd78eff0607f98ffa49265d9485d0c85a28ede | [
"MIT"
] | null | null | null | defmodule Budget.LayoutViewTest do
use Budget.ConnCase, async: true
end
| 18.5 | 34 | 0.810811 |
e8419b54b31ea0a9bec0abb7244c19d9b41f0413 | 2,603 | exs | Elixir | test/lib/bamboo/sent_email_test.exs | njwest/bamboo | 024286443a4e1aae57cbaa87dbcafe62c9a5755a | [
"MIT"
] | null | null | null | test/lib/bamboo/sent_email_test.exs | njwest/bamboo | 024286443a4e1aae57cbaa87dbcafe62c9a5755a | [
"MIT"
] | null | null | null | test/lib/bamboo/sent_email_test.exs | njwest/bamboo | 024286443a4e1aae57cbaa87dbcafe62c9a5755a | [
"MIT"
] | 1 | 2018-08-02T12:36:21.000Z | 2018-08-02T12:36:21.000Z | defmodule Bamboo.SentEmailTest do
use ExUnit.Case
alias Bamboo.SentEmail
import Bamboo.Email
setup do
Bamboo.SentEmail.reset
:ok
end
test "get_id gets the emails id" do
email = new_email() |> put_private(:local_adapter_id, 1)
assert SentEmail.get_id(email) == 1
end
test "raises when... | 24.327103 | 75 | 0.685747 |
e841a22cc731be8c342c07d41117fa42d4cd0110 | 682 | ex | Elixir | Tree/MultiwayTree/build.ex | hscspring/TheAlgorithms-Python | 5c2faea1d2d25a9a81a4786e053b0cc58ab46c6f | [
"MIT"
] | 10 | 2020-07-06T11:00:58.000Z | 2022-01-29T09:25:24.000Z | Tree/MultiwayTree/build.ex | hscspring/TheAlgorithms-Python | 5c2faea1d2d25a9a81a4786e053b0cc58ab46c6f | [
"MIT"
] | null | null | null | Tree/MultiwayTree/build.ex | hscspring/TheAlgorithms-Python | 5c2faea1d2d25a9a81a4786e053b0cc58ab46c6f | [
"MIT"
] | 3 | 2020-07-13T06:39:23.000Z | 2020-08-15T16:29:48.000Z | defmodule Tree do
def build_tree(list) do
list
|> Enum.reverse()
|> Enum.reduce(%{}, fn foo, map ->
foo = %{foo | children: Map.get(map, foo.location, [])}
Map.update(map, foo.parent, [foo], fn foos ->
[foo | foos]
end)
end)
|> Map.get(nil)
|> hd
end
end
items = [... | 24.357143 | 78 | 0.552786 |
e841cf96007c3f2d1d91681421726a4383415d4e | 5,506 | ex | Elixir | lib/implied.ex | jalcine/microformats2-elixir | a7b1d0e6ac3e01dc4f0f9e96d57948dc53b127ad | [
"MIT"
] | null | null | null | lib/implied.ex | jalcine/microformats2-elixir | a7b1d0e6ac3e01dc4f0f9e96d57948dc53b127ad | [
"MIT"
] | null | null | null | lib/implied.ex | jalcine/microformats2-elixir | a7b1d0e6ac3e01dc4f0f9e96d57948dc53b127ad | [
"MIT"
] | null | null | null | defmodule Microformats2.Items.ImpliedProperties do
def parse(entry, root, url, doc) do
implied_name_property(entry, root)
|> implied_photo_property(root)
|> implied_url_property(root, url, doc)
end
defp implied_url_property(entry, root, doc_url, doc) do
if entry[:properties][:url] == nil do
... | 25.728972 | 114 | 0.581911 |
e841f668db8fd0986bc186b5e02010afb99f8684 | 748 | ex | Elixir | widget_market_phoenix/lib/widget_market_phoenix/web/gettext.ex | thegillis/from_rails_to_phoenix | fb230b787fd441e71e93dc8d82b3769eeaeddbf8 | [
"MIT"
] | null | null | null | widget_market_phoenix/lib/widget_market_phoenix/web/gettext.ex | thegillis/from_rails_to_phoenix | fb230b787fd441e71e93dc8d82b3769eeaeddbf8 | [
"MIT"
] | null | null | null | widget_market_phoenix/lib/widget_market_phoenix/web/gettext.ex | thegillis/from_rails_to_phoenix | fb230b787fd441e71e93dc8d82b3769eeaeddbf8 | [
"MIT"
] | null | null | null | defmodule WidgetMarketPhoenix.Web.Gettext do
@moduledoc """
A module providing Internationalization with a gettext-based API.
By using [Gettext](https://hexdocs.pm/gettext),
your module gains a set of macros for translations, for example:
import WidgetMarketPhoenix.Web.Gettext
# Simple translatio... | 29.92 | 72 | 0.695187 |
e8421d4916121d9afa9342cf489f306056c500d7 | 355 | ex | Elixir | apps/definition_extract/lib/extract/v1.ex | kennyatpillar/hindsight | e90e2150a14218e5d6fdf5874f57eb055fd2dd07 | [
"Apache-2.0"
] | null | null | null | apps/definition_extract/lib/extract/v1.ex | kennyatpillar/hindsight | e90e2150a14218e5d6fdf5874f57eb055fd2dd07 | [
"Apache-2.0"
] | null | null | null | apps/definition_extract/lib/extract/v1.ex | kennyatpillar/hindsight | e90e2150a14218e5d6fdf5874f57eb055fd2dd07 | [
"Apache-2.0"
] | null | null | null | defmodule Extract.V1 do
use Definition.Schema
@impl true
def s do
schema(%Extract{
version: version(1),
id: id(),
dataset_id: required_string(),
subset_id: required_string(),
destination: required_string(),
steps: spec(is_list() and not_nil?()),
dictionary: of_struct... | 20.882353 | 44 | 0.633803 |
e84265311d015ad3e05afb929e073c3bcdac236e | 84 | ex | Elixir | elixir-primer/v01/ch12/hello2.ex | Atla0903/Study-Elixir | 155fbf30e508e513278425b89262a0a444e0936c | [
"Unlicense"
] | null | null | null | elixir-primer/v01/ch12/hello2.ex | Atla0903/Study-Elixir | 155fbf30e508e513278425b89262a0a444e0936c | [
"Unlicense"
] | null | null | null | elixir-primer/v01/ch12/hello2.ex | Atla0903/Study-Elixir | 155fbf30e508e513278425b89262a0a444e0936c | [
"Unlicense"
] | null | null | null | defmodule Hello2 do
def greet(name) do
IO.puts "Hello, #{name}!"
end
end
| 14 | 29 | 0.619048 |
e84266c00caf2503f3e65b8fe0c4738b377e860a | 325 | ex | Elixir | lib/ggity/scale/size_manual.ex | kianmeng/ggity | 75f0097464eae4086f8c70e4bea995d60571eba9 | [
"MIT"
] | 47 | 2020-06-21T15:23:54.000Z | 2022-03-13T01:24:19.000Z | lib/ggity/scale/size_manual.ex | kianmeng/ggity | 75f0097464eae4086f8c70e4bea995d60571eba9 | [
"MIT"
] | 3 | 2020-11-28T11:00:59.000Z | 2020-11-30T18:20:37.000Z | lib/ggity/scale/size_manual.ex | kianmeng/ggity | 75f0097464eae4086f8c70e4bea995d60571eba9 | [
"MIT"
] | 2 | 2020-11-28T10:40:10.000Z | 2021-05-28T06:44:47.000Z | defmodule GGity.Scale.Size.Manual do
@moduledoc false
alias GGity.Scale.Size
@default_size 4
@type t() :: %__MODULE__{}
defstruct transform: nil
@spec new(number()) :: Size.Manual.t()
def new(size \\ @default_size) when is_number(size) do
struct(Size.Manual, transform: fn _size -> size end)
end... | 19.117647 | 56 | 0.686154 |
e842d6ff5347215d2029e5b8f107899061682da3 | 331 | ex | Elixir | test/support/belongs_to.ex | pedromlcosta/dictator | 1b81c6a7c340b0c8338fd69c8123827a97d0ce06 | [
"0BSD"
] | 78 | 2020-02-21T14:35:54.000Z | 2021-11-08T23:03:47.000Z | test/support/belongs_to.ex | pedromlcosta/dictator | 1b81c6a7c340b0c8338fd69c8123827a97d0ce06 | [
"0BSD"
] | 11 | 2020-04-23T07:17:00.000Z | 2020-12-17T14:46:56.000Z | test/support/belongs_to.ex | pedromlcosta/dictator | 1b81c6a7c340b0c8338fd69c8123827a97d0ce06 | [
"0BSD"
] | 4 | 2020-09-16T15:08:53.000Z | 2021-10-14T01:52:06.000Z | defmodule Dictator.Test.BelongsTo do
defmodule Struct do
defstruct [:id, :user_id]
end
defmodule Repo do
def get_by(Struct, id: id), do: %Struct{id: id, user_id: id}
end
defmodule Policy do
alias Dictator.Test.BelongsTo.{Repo, Struct}
use Dictator.Policies.BelongsTo, for: Struct, repo: Repo... | 20.6875 | 64 | 0.700906 |
e842d913f9b4dcbfe1f3eec68b923da85f5148e4 | 880 | ex | Elixir | clients/spanner/lib/google_api/spanner/v1/metadata.ex | richiboi1977/elixir-google-api | c495bb3548090eb7a63d12f6fb145ec48aecdc0b | [
"Apache-2.0"
] | 1 | 2021-10-01T09:20:41.000Z | 2021-10-01T09:20:41.000Z | clients/spanner/lib/google_api/spanner/v1/metadata.ex | richiboi1977/elixir-google-api | c495bb3548090eb7a63d12f6fb145ec48aecdc0b | [
"Apache-2.0"
] | null | null | null | clients/spanner/lib/google_api/spanner/v1/metadata.ex | richiboi1977/elixir-google-api | c495bb3548090eb7a63d12f6fb145ec48aecdc0b | [
"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... | 32.592593 | 74 | 0.757955 |
e842ed00d1ba14ab457f606579cd904b4867c3d0 | 1,499 | ex | Elixir | lib/exq/support/config.ex | JamesFerguson/exq | 4457ea50ad4c8a6a7e127da5acafc130960822bb | [
"Apache-2.0"
] | null | null | null | lib/exq/support/config.ex | JamesFerguson/exq | 4457ea50ad4c8a6a7e127da5acafc130960822bb | [
"Apache-2.0"
] | null | null | null | lib/exq/support/config.ex | JamesFerguson/exq | 4457ea50ad4c8a6a7e127da5acafc130960822bb | [
"Apache-2.0"
] | null | null | null | defmodule Exq.Support.Config do
@default_config %{
name: Exq,
mode: :default,
host: "127.0.0.1",
port: 6379,
database: 0,
redis_options: [],
namespace: "exq",
queues: ["default"],
json_library: Jason,
heartbeat_enable: false,
heartbeat_interval: 60_000,
missed_heartbeat... | 23.421875 | 71 | 0.665777 |
e8431fbb669a5963e23811f21bc2877054d377ca | 12,159 | ex | Elixir | lib/sanbase/intercom/intercom.ex | santiment/sanbase2 | 9ef6e2dd1e377744a6d2bba570ea6bd477a1db31 | [
"MIT"
] | 81 | 2017-11-20T01:20:22.000Z | 2022-03-05T12:04:25.000Z | lib/sanbase/intercom/intercom.ex | santiment/sanbase2 | 9ef6e2dd1e377744a6d2bba570ea6bd477a1db31 | [
"MIT"
] | 359 | 2017-10-15T14:40:53.000Z | 2022-01-25T13:34:20.000Z | lib/sanbase/intercom/intercom.ex | santiment/sanbase2 | 9ef6e2dd1e377744a6d2bba570ea6bd477a1db31 | [
"MIT"
] | 16 | 2017-11-19T13:57:40.000Z | 2022-02-07T08:13:02.000Z | defmodule Sanbase.Intercom do
@moduledoc """
Sync all users and user stats into intercom
"""
import Ecto.Query
require Sanbase.Utils.Config, as: Config
require Logger
alias Sanbase.Accounts.{User, Statistics}
alias Sanbase.Billing.{Subscription, Product}
alias Sanbase.Alert.UserTrigger
alias Sanb... | 29.656098 | 119 | 0.632371 |
e84338cf183eb746a2128eeef10857b03eaab44e | 1,599 | ex | Elixir | web/web.ex | harmon25/phonix_react | 390d2663d1d796224588d94c5073b3bac600bb7f | [
"MIT"
] | null | null | null | web/web.ex | harmon25/phonix_react | 390d2663d1d796224588d94c5073b3bac600bb7f | [
"MIT"
] | null | null | null | web/web.ex | harmon25/phonix_react | 390d2663d1d796224588d94c5073b3bac600bb7f | [
"MIT"
] | null | null | null | defmodule PhoenixReact.Web do
@moduledoc """
A module that keeps using definitions for controllers,
views and so on.
This can be used in your application as:
use PhoenixReact.Web, :controller
use PhoenixReact.Web, :view
The definitions below will be executed for every view,
controller, etc, s... | 20.766234 | 88 | 0.666667 |
e8433e80b4e22447a6a29f0a1df55f343b31ba51 | 41,496 | ex | Elixir | lib/ecto/query/builder.ex | elielhaouzi/ecto | 66900f472713a27a38dfe78a72af4400855d1dc0 | [
"Apache-2.0"
] | 1 | 2019-11-11T21:48:20.000Z | 2019-11-11T21:48:20.000Z | lib/ecto/query/builder.ex | elielhaouzi/ecto | 66900f472713a27a38dfe78a72af4400855d1dc0 | [
"Apache-2.0"
] | 3 | 2021-06-20T14:51:14.000Z | 2021-06-25T00:56:11.000Z | deps/ecto/lib/ecto/query/builder.ex | carlosviana/blog | 1dcf58c3ca40bc3a7105d75de6f51954eb44bca8 | [
"MIT"
] | null | null | null | defmodule Ecto.Query.Builder do
@moduledoc false
alias Ecto.Query
@comparisons [
is_nil: 1,
==: 2,
!=: 2,
<: 2,
>: 2,
<=: 2,
>=: 2
]
@dynamic_aggregates [
max: 1,
min: 1,
first_value: 1,
last_value: 1,
nth_value: 2,
lag: 3,
lead: 3,
lag: 2,
le... | 34.988196 | 117 | 0.627868 |
e84344c7c9bdbd435d589eb7a0ba4fa20056225d | 1,587 | ex | Elixir | lib/livebook_web/router.ex | benjreinhart/livebook | 0500ad5c6237167ce9769d8cc78fca360834f576 | [
"Apache-2.0"
] | null | null | null | lib/livebook_web/router.ex | benjreinhart/livebook | 0500ad5c6237167ce9769d8cc78fca360834f576 | [
"Apache-2.0"
] | null | null | null | lib/livebook_web/router.ex | benjreinhart/livebook | 0500ad5c6237167ce9769d8cc78fca360834f576 | [
"Apache-2.0"
] | null | null | null | defmodule LivebookWeb.Router do
use LivebookWeb, :router
import Phoenix.LiveDashboard.Router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_live_flash
plug :put_root_layout, {LivebookWeb.LayoutView, :root}
plug :protect_from_forgery
plug :put_secure_browser_h... | 33.0625 | 76 | 0.711405 |
e84346dc14e963973e5c8909774c61099a169549 | 667 | exs | Elixir | test/iodized/notification_test.exs | envato/iodized | 396a051262fbdfb051e696a5d39e76414dab3568 | [
"MIT"
] | 16 | 2015-01-13T20:56:40.000Z | 2021-07-16T08:05:36.000Z | test/iodized/notification_test.exs | envato/iodized | 396a051262fbdfb051e696a5d39e76414dab3568 | [
"MIT"
] | 5 | 2015-01-11T23:50:58.000Z | 2017-06-06T05:24:04.000Z | test/iodized/notification_test.exs | envato/iodized | 396a051262fbdfb051e696a5d39e76414dab3568 | [
"MIT"
] | 2 | 2015-04-06T11:16:10.000Z | 2016-08-01T05:28:03.000Z | defmodule Iodized.NotificationTest do
use ExUnit.Case, async: true
import Mock
test_with_mock "call registered urls with message",
HTTPoison,
[start: &mock_start/0,
get: &mock_get/1] do
webhooks = [
%Iodized.Webhook{id: 1, event_type: "created", url: "http://someurl.com/msg={{message}}"}
... | 23 | 95 | 0.68066 |
e8435be969c57ade42bd09378fa5094cb4a98dbe | 203 | exs | Elixir | Chapter11/vocial-demo-chapter-11/priv/repo/migrations/20180114145743_add_oauth_data_to_users.exs | PacktPublishing/Phoenix-Web-Development | a071392abe2a459be1896580446b006126c393bf | [
"MIT"
] | 10 | 2018-05-13T14:53:05.000Z | 2021-11-08T13:10:44.000Z | Chapter11/vocial-demo-chapter-11/priv/repo/migrations/20180114145743_add_oauth_data_to_users.exs | PacktPublishing/Phoenix-Web-Development | a071392abe2a459be1896580446b006126c393bf | [
"MIT"
] | null | null | null | Chapter11/vocial-demo-chapter-11/priv/repo/migrations/20180114145743_add_oauth_data_to_users.exs | PacktPublishing/Phoenix-Web-Development | a071392abe2a459be1896580446b006126c393bf | [
"MIT"
] | 2 | 2019-04-23T10:54:33.000Z | 2019-04-27T15:47:07.000Z | defmodule Vocial.Repo.Migrations.AddOauthDataToUsers do
use Ecto.Migration
def change do
alter table(:users) do
add :oauth_provider, :string
add :oauth_id, :string
end
end
end
| 18.454545 | 55 | 0.704433 |
e8435e04f11a69175ad5ee541d2eddfe73f68c1a | 5,498 | exs | Elixir | apps/ewallet/test/ewallet/web/inviter_test.exs | amadeobrands/ewallet | 505b7822721940a7b892a9b35c225e80cc8ac0b4 | [
"Apache-2.0"
] | 1 | 2018-12-07T06:21:21.000Z | 2018-12-07T06:21:21.000Z | apps/ewallet/test/ewallet/web/inviter_test.exs | amadeobrands/ewallet | 505b7822721940a7b892a9b35c225e80cc8ac0b4 | [
"Apache-2.0"
] | null | null | null | apps/ewallet/test/ewallet/web/inviter_test.exs | amadeobrands/ewallet | 505b7822721940a7b892a9b35c225e80cc8ac0b4 | [
"Apache-2.0"
] | null | null | null | defmodule EWallet.Web.InviterTest do
use EWallet.DBCase
use Bamboo.Test
alias EWallet.Web.{Inviter, MockInviteEmail, Preloader}
alias EWalletDB.{Account, Invite, Membership, User}
@user_redirect_url "http://localhost:4000/some_redirect_url?email={email}&token={token}"
@user_success_url "http://localhost:40... | 29.089947 | 91 | 0.604402 |
e8435f289fa0b1233bb5f79cb7e96ad6fe85c642 | 514 | exs | Elixir | config/test.exs | bitriot/phoenix_base | 15ec83a9acf46202102f2b006d577972f5564b2f | [
"MIT"
] | null | null | null | config/test.exs | bitriot/phoenix_base | 15ec83a9acf46202102f2b006d577972f5564b2f | [
"MIT"
] | null | null | null | config/test.exs | bitriot/phoenix_base | 15ec83a9acf46202102f2b006d577972f5564b2f | [
"MIT"
] | null | null | null | use Mix.Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :phoenix_base, PhoenixBase.Endpoint,
http: [port: 4001],
server: false
# Print only warnings and errors during test
config :logger, level: :warn
# Configure your database
config :phoenix_base,... | 25.7 | 56 | 0.745136 |
e84360e49ad8af4747c13d08f0babefd96d332d9 | 4,986 | ex | Elixir | lib/sentinel/ueberauthenticator.ex | lumenlunae/sentinel | 189d9b02aeeea942a41963b42ef8523ef192fd03 | [
"MIT"
] | 125 | 2016-01-29T11:46:20.000Z | 2021-06-08T09:25:38.000Z | lib/sentinel/ueberauthenticator.ex | lumenlunae/sentinel | 189d9b02aeeea942a41963b42ef8523ef192fd03 | [
"MIT"
] | 54 | 2016-02-18T01:11:58.000Z | 2017-10-19T11:25:26.000Z | lib/sentinel/ueberauthenticator.ex | lumenlunae/sentinel | 189d9b02aeeea942a41963b42ef8523ef192fd03 | [
"MIT"
] | 29 | 2016-02-20T12:59:16.000Z | 2018-04-11T14:29:41.000Z | defmodule Sentinel.Ueberauthenticator do
@moduledoc """
Common authentication logic using the ueberauth underlying layer
"""
alias Ueberauth.Auth
alias Sentinel.Authenticator
alias Sentinel.Changeset.Registrator
alias Sentinel.Changeset.Confirmator
alias Sentinel.Config
alias Sentinel.Ueberauth
@un... | 36.130435 | 238 | 0.68231 |
e8439fe7b44b3f7443e029fe67244241a372d252 | 605 | ex | Elixir | lib/squarestore/product/products.ex | NinjaAnge/forksquare | ee9ea91e45e50b9f1ba4a8261ebdd99b7fe3333d | [
"MIT"
] | null | null | null | lib/squarestore/product/products.ex | NinjaAnge/forksquare | ee9ea91e45e50b9f1ba4a8261ebdd99b7fe3333d | [
"MIT"
] | null | null | null | lib/squarestore/product/products.ex | NinjaAnge/forksquare | ee9ea91e45e50b9f1ba4a8261ebdd99b7fe3333d | [
"MIT"
] | null | null | null | defmodule Squarestore.Product.Products do
use Ecto.Schema
import Ecto.Changeset
schema "products" do
field :alternative_products, :integer
field :base_price, :integer
field :image, :map
field :storage_status, :integer
field :name, :string
field :pnr, :string
field :summary, :string
... | 25.208333 | 115 | 0.689256 |
e843b5643483802c2ae9e7fba2c8d4d9e6757fd5 | 1,542 | ex | Elixir | clients/books/lib/google_api/books/v1/model/offers.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/books/lib/google_api/books/v1/model/offers.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/books/lib/google_api/books/v1/model/offers.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... | 30.84 | 108 | 0.708171 |
e843f9b97b171d4b0918a10a215b3a60db9e1c6e | 560 | exs | Elixir | mix.exs | imeraj/elixir_git | 27792b6aa9f8b14c946543cd81b253977d8686f8 | [
"MIT"
] | 22 | 2021-03-07T17:00:42.000Z | 2022-03-21T07:16:11.000Z | mix.exs | imeraj/elixir_git | 27792b6aa9f8b14c946543cd81b253977d8686f8 | [
"MIT"
] | null | null | null | mix.exs | imeraj/elixir_git | 27792b6aa9f8b14c946543cd81b253977d8686f8 | [
"MIT"
] | 2 | 2021-03-10T21:16:51.000Z | 2021-05-06T10:49:13.000Z | defmodule Egit.MixProject do
use Mix.Project
def project do
[
app: :egit,
version: "0.1.0",
elixir: "~> 1.11",
start_permanent: Mix.env() == :prod,
deps: deps(),
escript: escript()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
... | 16.969697 | 59 | 0.573214 |
e84415a472659a71bae094f05b04c0b2cef8ba76 | 1,265 | ex | Elixir | test/support/phoenix/endpoint.ex | randaalex/pow | 2a8c8db4652f7cb2c58d3a897e02b1d47e76f27b | [
"MIT"
] | 1 | 2021-06-25T10:36:01.000Z | 2021-06-25T10:36:01.000Z | test/support/phoenix/endpoint.ex | randaalex/pow | 2a8c8db4652f7cb2c58d3a897e02b1d47e76f27b | [
"MIT"
] | null | null | null | test/support/phoenix/endpoint.ex | randaalex/pow | 2a8c8db4652f7cb2c58d3a897e02b1d47e76f27b | [
"MIT"
] | 1 | 2020-07-13T01:11:17.000Z | 2020-07-13T01:11:17.000Z | defmodule Pow.Test.Phoenix.Endpoint do
defmodule SessionPlugHelper do
@moduledoc false
alias Pow.Plug.Session
def init(config), do: Session.init(config)
def call(conn, config) do
additional_config =
case conn.private[:pow_test_config] do
:username_user -> [user: Pow.Test.Ecto... | 26.354167 | 118 | 0.6917 |
e844160d650713c3b492daad4b7c52d41251c84b | 135 | exs | Elixir | config/dev.exs | Amtelco-Software/ex_ari | 3280d830a7911d11bf30878a99b2534058a145bd | [
"MIT"
] | null | null | null | config/dev.exs | Amtelco-Software/ex_ari | 3280d830a7911d11bf30878a99b2534058a145bd | [
"MIT"
] | null | null | null | config/dev.exs | Amtelco-Software/ex_ari | 3280d830a7911d11bf30878a99b2534058a145bd | [
"MIT"
] | null | null | null | import Config
config :ex_ari,
clients: %{
ari_test: %{
name: "test",
module: ARI.WebSocketTest.TestClient
}
}
| 13.5 | 42 | 0.585185 |
e844358786f8f148482c24e4078c826e5a614246 | 8,227 | exs | Elixir | apps/pipeline/test/integration/pipeline/writer/table_writer_test.exs | SmartColumbusOS/smartcitiesdata | c8553d34631c822b034945eebf396994bf1001ff | [
"Apache-2.0"
] | 1 | 2021-04-05T19:17:18.000Z | 2021-04-05T19:17:18.000Z | apps/pipeline/test/integration/pipeline/writer/table_writer_test.exs | SmartColumbusOS/smartcitiesdata | c8553d34631c822b034945eebf396994bf1001ff | [
"Apache-2.0"
] | 11 | 2020-01-07T15:43:42.000Z | 2020-12-22T15:23:25.000Z | apps/pipeline/test/integration/pipeline/writer/table_writer_test.exs | SmartColumbusOS/smartcitiesdata | c8553d34631c822b034945eebf396994bf1001ff | [
"Apache-2.0"
] | null | null | null | defmodule Pipeline.Writer.TableWriterTest do
use ExUnit.Case
use Divo
use Placebo
alias Pipeline.Writer.TableWriter
alias Pipeline.Writer.TableWriter.Compaction
alias Pipeline.Application
alias SmartCity.TestDataGenerator, as: TDG
import SmartCity.TestHelper, only: [eventually: 1]
setup do
sessi... | 32.646825 | 114 | 0.547587 |
e8443a570b7695b5b6e9cc2607138cb797601833 | 128 | exs | Elixir | whoppex_runner/test/whoppex_runner_test.exs | benjaminplee/whoppex | 63cbe7f9f07079925c43a1e0e1896f043993e9e7 | [
"Apache-2.0"
] | 3 | 2017-08-14T13:53:34.000Z | 2021-07-03T12:46:41.000Z | whoppex_runner/test/whoppex_runner_test.exs | benjaminplee/whoppex | 63cbe7f9f07079925c43a1e0e1896f043993e9e7 | [
"Apache-2.0"
] | null | null | null | whoppex_runner/test/whoppex_runner_test.exs | benjaminplee/whoppex | 63cbe7f9f07079925c43a1e0e1896f043993e9e7 | [
"Apache-2.0"
] | null | null | null | defmodule WhoppexRunnerTest do
use ExUnit.Case
doctest WhoppexRunner
test "the truth" do
assert 1 + 1 == 2
end
end
| 14.222222 | 30 | 0.703125 |
e8443fd9c015b734d5f8afcadac5cd380498341c | 96 | exs | Elixir | packet_analyzer/test/packet_analyzer_web/views/layout_view_test.exs | niya1123/PacketAnalyzer | 65236372812ef9f593df460d054ee7ee487d1a74 | [
"MIT"
] | null | null | null | packet_analyzer/test/packet_analyzer_web/views/layout_view_test.exs | niya1123/PacketAnalyzer | 65236372812ef9f593df460d054ee7ee487d1a74 | [
"MIT"
] | 2 | 2021-03-10T02:15:32.000Z | 2021-05-10T21:48:57.000Z | packet_analyzer/test/packet_analyzer_web/views/layout_view_test.exs | niya1123/PacketAnalyzer | 65236372812ef9f593df460d054ee7ee487d1a74 | [
"MIT"
] | null | null | null | defmodule PacketAnalyzerWeb.LayoutViewTest do
use PacketAnalyzerWeb.ConnCase, async: true
end
| 24 | 45 | 0.854167 |
e844536d255d765cb16d889ae3eb71788016700e | 1,277 | ex | Elixir | backend/lib/comeonin_ecto_password.ex | ui-icts/aptamer-web | a28502c22a4e55ab1fbae8bbeaa6b11c9a477c06 | [
"MIT"
] | null | null | null | backend/lib/comeonin_ecto_password.ex | ui-icts/aptamer-web | a28502c22a4e55ab1fbae8bbeaa6b11c9a477c06 | [
"MIT"
] | 7 | 2019-02-08T18:28:49.000Z | 2022-02-12T06:44:59.000Z | backend/lib/comeonin_ecto_password.ex | ui-icts/aptamer-web | a28502c22a4e55ab1fbae8bbeaa6b11c9a477c06 | [
"MIT"
] | null | null | null | defmodule Comeonin.Ecto.Password do
@behaviour Ecto.Type
@moduledoc """
A custom Ecto type for storing encrypted passwords.
## Usage
On your schema, define secure fields with this type:
field :password, Comeonin.Ecto.Password
Then on your changeset just cast from plain-text params
cast(changes... | 25.039216 | 80 | 0.700078 |
e84459c80cafa9454992d8ba29d8776beb3a56d5 | 3,324 | exs | Elixir | exercises/practice/binary-search-tree/test/binary_search_tree_test.exs | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 343 | 2017-06-22T16:28:28.000Z | 2022-03-25T21:33:32.000Z | exercises/practice/binary-search-tree/test/binary_search_tree_test.exs | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 583 | 2017-06-19T10:48:40.000Z | 2022-03-28T21:43:12.000Z | exercises/practice/binary-search-tree/test/binary_search_tree_test.exs | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 228 | 2017-07-05T07:09:32.000Z | 2022-03-27T08:59:08.000Z | defmodule BinarySearchTreeTest do
use ExUnit.Case
test "data is retained" do
root = BinarySearchTree.new(4)
assert root.data == 4
assert root.left == nil
assert root.right == nil
end
describe "insert data at proper node" do
@tag :pending
test "smaller number at left node" do
root... | 25.767442 | 66 | 0.619134 |
e8446d7db834a5b0daad95301841611c3332d802 | 1,021 | ex | Elixir | lib/nostrum/struct/embed/thumbnail.ex | phereford/nostrum | 3d273671f51d839eedac4d6e52ba9cf70720ac01 | [
"MIT"
] | 637 | 2017-03-07T11:25:35.000Z | 2022-03-31T13:37:51.000Z | lib/nostrum/struct/embed/thumbnail.ex | phereford/nostrum | 3d273671f51d839eedac4d6e52ba9cf70720ac01 | [
"MIT"
] | 372 | 2017-03-07T20:42:03.000Z | 2022-03-30T22:46:46.000Z | lib/nostrum/struct/embed/thumbnail.ex | phereford/nostrum | 3d273671f51d839eedac4d6e52ba9cf70720ac01 | [
"MIT"
] | 149 | 2017-03-07T12:11:58.000Z | 2022-03-19T22:11:51.000Z | defmodule Nostrum.Struct.Embed.Thumbnail do
@moduledoc """
Struct representing a Discord embed thumbnail.
"""
alias Nostrum.Util
alias Jason.{Encode, Encoder}
defstruct [
:url,
:proxy_url,
:height,
:width
]
defimpl Encoder do
def encode(thumbnail, options) do
thumbnail
... | 19.634615 | 67 | 0.596474 |
e844985b94cb594d19c9583aeb5dab8993b73ef6 | 1,704 | ex | Elixir | bullion/lib/bullion_web.ex | ttymck/bullion | d15babe80d30f9775e45f2a143b88a66b539d318 | [
"MIT"
] | null | null | null | bullion/lib/bullion_web.ex | ttymck/bullion | d15babe80d30f9775e45f2a143b88a66b539d318 | [
"MIT"
] | 8 | 2021-03-10T20:53:42.000Z | 2021-07-30T06:52:16.000Z | bullion/lib/bullion_web.ex | ttymck/bullion | d15babe80d30f9775e45f2a143b88a66b539d318 | [
"MIT"
] | null | null | null | defmodule BullionWeb do
@moduledoc """
The entrypoint for defining your web interface, such
as controllers, views, channels and so on.
This can be used in your application as:
use BullionWeb, :controller
use BullionWeb, :view
The definitions below will be executed for every view,
controller, ... | 23.666667 | 83 | 0.691901 |
e844ac49480fdbfab1f89a4495b430ab3eef2bde | 1,565 | ex | Elixir | lib/bitcoin/protocol/types/tx_input.ex | coinscript/bitcoinsv-elixir | 2dda03c81edc5662743ed2922abb5b1910d9c09a | [
"Apache-2.0"
] | 2 | 2019-08-12T04:53:57.000Z | 2019-09-03T03:47:33.000Z | lib/bitcoin/protocol/types/tx_input.ex | coinscript/bitcoinsv-elixir | 2dda03c81edc5662743ed2922abb5b1910d9c09a | [
"Apache-2.0"
] | null | null | null | lib/bitcoin/protocol/types/tx_input.ex | coinscript/bitcoinsv-elixir | 2dda03c81edc5662743ed2922abb5b1910d9c09a | [
"Apache-2.0"
] | null | null | null | defmodule Bitcoin.Protocol.Types.TxInput do
alias Bitcoin.Protocol.Types.VarString
alias Bitcoin.Protocol.Types.Outpoint
# The previous output transaction reference, as an OutPoint structure
defstruct previous_output: %Outpoint{},
# Computational Script for confirming transaction authorization
... | 35.568182 | 161 | 0.677955 |
e8451d3035ef3f1cdf7dcd08b5bfb05496add907 | 4,266 | ex | Elixir | clients/firebase_rules/lib/google_api/firebase_rules/v1/model/test_result.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/firebase_rules/lib/google_api/firebase_rules/v1/model/test_result.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/firebase_rules/lib/google_api/firebase_rules/v1/model/test_result.ex | 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... | 68.806452 | 443 | 0.751289 |
e8452f48e868e66bee367869ec5ef6b173cd967c | 334 | exs | Elixir | examples/swagger_demo/test/test_helper.exs | Whatnot-Inc/bureaucrat | d0634c6017dc68f8a23078cbc8c181a4b2d3e6db | [
"Unlicense"
] | 326 | 2015-08-19T10:05:07.000Z | 2022-03-28T08:49:33.000Z | examples/swagger_demo/test/test_helper.exs | Whatnot-Inc/bureaucrat | d0634c6017dc68f8a23078cbc8c181a4b2d3e6db | [
"Unlicense"
] | 64 | 2015-08-19T06:44:19.000Z | 2022-03-29T06:23:34.000Z | examples/swagger_demo/test/test_helper.exs | Whatnot-Inc/bureaucrat | d0634c6017dc68f8a23078cbc8c181a4b2d3e6db | [
"Unlicense"
] | 66 | 2016-01-08T20:40:40.000Z | 2022-03-03T02:15:15.000Z | Bureaucrat.start(
writer: Bureaucrat.SwaggerSlateMarkdownWriter,
default_path: "doc/source/index.html.md",
env_var: "DOC",
swagger: "priv/static/swagger.json" |> File.read!() |> Poison.decode!())
Ecto.Adapters.SQL.Sandbox.mode(SwaggerDemo.Repo, :manual)
ExUnit.start(formatters: [ExUnit.CLIFormatter, Bureaucra... | 33.4 | 74 | 0.754491 |
e8453e8dea0b15a39e40fe68194d1e6219c45b62 | 275 | ex | Elixir | lib/erlixir_web/views/layout_view.ex | itsemilano/erlixir | 39fdcb86a9ccd55058682b3263d40efb9cbad11f | [
"MIT"
] | null | null | null | lib/erlixir_web/views/layout_view.ex | itsemilano/erlixir | 39fdcb86a9ccd55058682b3263d40efb9cbad11f | [
"MIT"
] | null | null | null | lib/erlixir_web/views/layout_view.ex | itsemilano/erlixir | 39fdcb86a9ccd55058682b3263d40efb9cbad11f | [
"MIT"
] | null | null | null | defmodule ErlixirWeb.LayoutView do
use ErlixirWeb, :view
# Phoenix LiveDashboard is available only in development by default,
# so we instruct Elixir to not warn if the dashboard route is missing.
@compile {:no_warn_undefined, {Routes, :live_dashboard_path, 2}}
end
| 34.375 | 72 | 0.774545 |
e8454aa1512b44fba90bb923a0d6e0eb8e113913 | 967 | exs | Elixir | config/config.exs | neslinesli93/advent-of-code-2019-phoenix-react | d7523d0bda5581990c21e8113e5c78c4f0ff921a | [
"MIT"
] | 5 | 2019-12-02T08:50:54.000Z | 2021-03-31T22:54:20.000Z | config/config.exs | neslinesli93/advent-of-code-2019-phoenix-react | d7523d0bda5581990c21e8113e5c78c4f0ff921a | [
"MIT"
] | 1 | 2019-12-18T07:19:26.000Z | 2019-12-18T07:19:26.000Z | config/config.exs | neslinesli93/advent-of-code-2019-phoenix-react | d7523d0bda5581990c21e8113e5c78c4f0ff921a | [
"MIT"
] | 2 | 2019-12-16T07:52:16.000Z | 2019-12-17T17:49:05.000Z | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
# General application configuration
use Mix.Config
# Configures the endpoint
config :advent2019, Ad... | 34.535714 | 86 | 0.77456 |
e84565ad2a42eb7c34c28db0b67ed0314e192efc | 4,732 | exs | Elixir | test/crawlie/stats/server_test.exs | kianmeng/crawlie | 19883f17a208107927ba14d15312f5a908d5e8ea | [
"MIT"
] | 91 | 2016-12-29T12:31:14.000Z | 2021-09-25T23:09:34.000Z | test/crawlie/stats/server_test.exs | kianmeng/crawlie | 19883f17a208107927ba14d15312f5a908d5e8ea | [
"MIT"
] | 40 | 2016-12-14T00:55:52.000Z | 2022-01-29T08:46:03.000Z | test/crawlie/stats/server_test.exs | kianmeng/crawlie | 19883f17a208107927ba14d15312f5a908d5e8ea | [
"MIT"
] | 10 | 2017-04-06T11:18:10.000Z | 2021-10-30T00:04:09.000Z | defmodule Crawlie.Stats.ServerTest do
use ExUnit.Case
alias Crawlie.Stats.Server
alias Crawlie.Stats.Server.Data
alias Crawlie.Utils
alias Crawlie.Page
alias Crawlie.Response
test "get_stats on a fresh server" do
ref = Server.start_new()
assert %Data{} = data = Server.get_stats(ref)
assert ... | 26.58427 | 72 | 0.64497 |
e8458086e1c5104270fc060d9c933ac6df278847 | 4,714 | ex | Elixir | lib/mix/tasks/parse_to_json.ex | ryoung786/jeopardy | 5558fc49013c5a22e556a0040cbc116aa8f63912 | [
"MIT"
] | null | null | null | lib/mix/tasks/parse_to_json.ex | ryoung786/jeopardy | 5558fc49013c5a22e556a0040cbc116aa8f63912 | [
"MIT"
] | 32 | 2020-06-08T14:50:46.000Z | 2021-01-01T05:40:44.000Z | lib/mix/tasks/parse_to_json.ex | ryoung786/jeopardy | 5558fc49013c5a22e556a0040cbc116aa8f63912 | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.ParseToJson do
use Mix.Task
@shortdoc "Parse jarchive html files and write to json files"
@archive_path "/Users/ryany/dev/jeopardy-parser/j-archive"
@out_path Path.join(:code.priv_dir(:jeopardy), "jarchive")
def run(args) do
Mix.Task.run("app.start")
get_files(args) |> process_f... | 29.279503 | 97 | 0.606491 |
e8458c35c8a07d2ebd55b8654c8fb9635645900e | 1,295 | exs | Elixir | kousa/test/ad_hoc_user_test.exs | LeonardSSH/dogehouse | 584055ad407bc37fa35cdf36ebb271622e29d436 | [
"MIT"
] | 9 | 2021-03-17T03:56:18.000Z | 2021-09-24T22:45:14.000Z | kousa/test/ad_hoc_user_test.exs | ActuallyTomas/dogehouse | 8c3d2cd1d7e99e173f0658759467a391c4a90c4e | [
"MIT"
] | 12 | 2021-07-06T12:51:13.000Z | 2022-03-16T12:38:18.000Z | kousa/test/ad_hoc_user_test.exs | ActuallyTomas/dogehouse | 8c3d2cd1d7e99e173f0658759467a391c4a90c4e | [
"MIT"
] | 4 | 2021-07-15T20:33:50.000Z | 2022-03-27T12:46:47.000Z | defmodule KousaTest.AdHocUserTest do
use ExUnit.Case, async: true
use KousaTest.Support.EctoSandbox
@moduledoc """
ad-hoc test set to give coverage for all modules
that have 'alias Beef.Schemas.User', prior to refactoring.
"""
# TODO: recategorize into appropriate test cases over
# time.
alias Beef... | 26.979167 | 85 | 0.601544 |
e845d8d0085f4bb2bdbfc19209c82ec34afcd510 | 1,665 | ex | Elixir | lib/handler/example.ex | ColaCheng/elixir_cowboy_example | 6c432ecaa72137af78899db15af0c66d4155fe92 | [
"MIT"
] | null | null | null | lib/handler/example.ex | ColaCheng/elixir_cowboy_example | 6c432ecaa72137af78899db15af0c66d4155fe92 | [
"MIT"
] | null | null | null | lib/handler/example.ex | ColaCheng/elixir_cowboy_example | 6c432ecaa72137af78899db15af0c66d4155fe92 | [
"MIT"
] | null | null | null | defmodule ElixirCowboyExample.Handler.Example do
alias ElixirCowboyExample.Handler.Utils, as: HUtils
def init(req_in, opts) do
request = %{
method: :cowboy_req.method(req_in),
query: :cowboy_req.parse_qs(req_in),
data: %{}
}
{result, req_done} =
case :cowboy_req.has_body(req_in... | 24.130435 | 87 | 0.555556 |
e845f0a2b30fe2588d9a282cbc82ac0239ec2368 | 1,003 | ex | Elixir | test/support/channel_case.ex | gustavoarmoa/changelog.com | e898a9979a237ae66962714821ed8633a4966f37 | [
"MIT"
] | 2,599 | 2016-10-25T15:02:53.000Z | 2022-03-26T02:34:42.000Z | test/support/channel_case.ex | sdrees/changelog.com | 955cdcf93d74991062f19a03e34c9f083ade1705 | [
"MIT"
] | 253 | 2016-10-25T20:29:24.000Z | 2022-03-29T21:52:36.000Z | test/support/channel_case.ex | sdrees/changelog.com | 955cdcf93d74991062f19a03e34c9f083ade1705 | [
"MIT"
] | 298 | 2016-10-25T15:18:31.000Z | 2022-01-18T21:25:52.000Z | defmodule ChangelogWeb.ChannelCase do
@moduledoc """
This module defines the test case to be used by
channel tests.
Such tests rely on `Phoenix.ChannelTest` and also
imports other functionality to make it easier
to build and query models.
Finally, if the test case interacts with the database,
it canno... | 23.880952 | 71 | 0.703888 |
e84610c8f87d53e55fc813093391d4472d112092 | 2,341 | exs | Elixir | episode06/test/test/controllers/post_controller_test.exs | paulfioravanti/learn_phoenix | 3767f28b09bb5e740231dd261a0bfa8b3eea98d3 | [
"MIT"
] | null | null | null | episode06/test/test/controllers/post_controller_test.exs | paulfioravanti/learn_phoenix | 3767f28b09bb5e740231dd261a0bfa8b3eea98d3 | [
"MIT"
] | null | null | null | episode06/test/test/controllers/post_controller_test.exs | paulfioravanti/learn_phoenix | 3767f28b09bb5e740231dd261a0bfa8b3eea98d3 | [
"MIT"
] | null | null | null | defmodule Test.PostControllerTest do
use Test.ConnCase
alias Test.Post
@valid_attrs %{}
@invalid_attrs %{}
setup do
conn = conn()
{:ok, conn: conn}
end
test "lists all entries on index", %{conn: conn} do
conn = get conn, post_path(conn, :index)
assert html_response(conn, 200) =~ "Listin... | 32.513889 | 98 | 0.670226 |
e846575417c6d77bfec8d2315facab3150af51aa | 2,357 | ex | Elixir | deps/sqlitex/lib/sqlitex/sql_builder.ex | lgandersen/jocker_dist | b5e676f8d9e60bbc8bc7a82ccd1e05389f2cd5b5 | [
"BSD-2-Clause"
] | null | null | null | deps/sqlitex/lib/sqlitex/sql_builder.ex | lgandersen/jocker_dist | b5e676f8d9e60bbc8bc7a82ccd1e05389f2cd5b5 | [
"BSD-2-Clause"
] | null | null | null | deps/sqlitex/lib/sqlitex/sql_builder.ex | lgandersen/jocker_dist | b5e676f8d9e60bbc8bc7a82ccd1e05389f2cd5b5 | [
"BSD-2-Clause"
] | null | null | null | defmodule Sqlitex.SqlBuilder do
@moduledoc """
This module contains functions for SQL creation. At the moment
it is only used for `CREATE TABLE` statements.
"""
# Returns an SQL CREATE TABLE statement as a string. `name` is the name of the
# table, and `table_opts` contains the table constraints (at the mo... | 35.179104 | 104 | 0.63216 |
e84688cb5b024275709219d0c70460b550423956 | 38,460 | ex | Elixir | lib/phoenix_live_view/channel.ex | khionu/phoenix_live_view | 4ada690fb1579eebf787bd7459233086b383bd7b | [
"MIT"
] | null | null | null | lib/phoenix_live_view/channel.ex | khionu/phoenix_live_view | 4ada690fb1579eebf787bd7459233086b383bd7b | [
"MIT"
] | 4 | 2021-03-04T13:00:52.000Z | 2021-03-12T12:42:09.000Z | deps/phoenix_live_view/lib/phoenix_live_view/channel.ex | adrianomota/blog | ef3b2d2ed54f038368ead8234d76c18983caa75b | [
"MIT"
] | null | null | null | defmodule Phoenix.LiveView.Channel do
@moduledoc false
use GenServer, restart: :temporary
require Logger
alias Phoenix.LiveView.{Socket, Utils, Diff, Upload, UploadConfig, Route, Session, Lifecycle}
alias Phoenix.Socket.Message
@prefix :phoenix
@not_mounted_at_router :not_mounted_at_router
def start... | 32.238055 | 130 | 0.631097 |
e846f93d791e3747cdc60a2870f6b1d655353d45 | 1,268 | ex | Elixir | lib/blue_heron/hci/commands/controller_and_baseband/write_local_name.ex | kevinansfield/blue_heron | 8339e6747e135030f7d1e67801391f03f2558e0d | [
"Apache-2.0"
] | 45 | 2020-10-17T13:34:15.000Z | 2022-03-08T09:40:43.000Z | lib/blue_heron/hci/commands/controller_and_baseband/write_local_name.ex | kevinansfield/blue_heron | 8339e6747e135030f7d1e67801391f03f2558e0d | [
"Apache-2.0"
] | 20 | 2020-10-15T15:05:54.000Z | 2022-03-27T15:54:36.000Z | lib/blue_heron/hci/commands/controller_and_baseband/write_local_name.ex | kevinansfield/blue_heron | 8339e6747e135030f7d1e67801391f03f2558e0d | [
"Apache-2.0"
] | 11 | 2020-10-23T17:18:57.000Z | 2022-03-15T20:01:49.000Z | defmodule BlueHeron.HCI.Command.ControllerAndBaseband.WriteLocalName do
use BlueHeron.HCI.Command.ControllerAndBaseband, ocf: 0x0013
@moduledoc """
The HCI_Write_Local_Name command provides the ability to modify the user- friendly name for the BR/EDR Controller.
* OGF: `#{inspect(@ogf, base: :hex)}`
* OCF: ... | 28.818182 | 116 | 0.685331 |
e84706f76d6e975df24bf23916ba431c03f1cacc | 833 | exs | Elixir | test/magnemite/repo_test.exs | andsleonardo/magnemite | 2a06c1520defeb193d718313ad3fc6a50349bc8d | [
"MIT"
] | null | null | null | test/magnemite/repo_test.exs | andsleonardo/magnemite | 2a06c1520defeb193d718313ad3fc6a50349bc8d | [
"MIT"
] | null | null | null | test/magnemite/repo_test.exs | andsleonardo/magnemite | 2a06c1520defeb193d718313ad3fc6a50349bc8d | [
"MIT"
] | null | null | null | defmodule Magnemite.RepoTest do
use ExUnit.Case, async: true
alias Magnemite.Repo
describe "handle_operation_result/1" do
test "returns the successful output when given an :ok tuple" do
output = {:ok, %{field: "value"}}
assert ^output = Repo.handle_operation_result(output)
end
test "re... | 27.766667 | 94 | 0.581032 |
e84725073d9bcf181a9ba861822df7e59bc61305 | 266 | exs | Elixir | config/test.exs | licaonfee/phoenix_gitlab_monitor | 1b7dd437018d42a2b7b9a1643e6767a48f312eee | [
"MIT"
] | 12 | 2018-11-04T03:39:34.000Z | 2020-04-29T19:30:58.000Z | config/test.exs | licaonfee/phoenix_gitlab_monitor | 1b7dd437018d42a2b7b9a1643e6767a48f312eee | [
"MIT"
] | 16 | 2018-11-07T01:05:01.000Z | 2021-05-07T21:32:07.000Z | config/test.exs | licaonfee/phoenix_gitlab_monitor | 1b7dd437018d42a2b7b9a1643e6767a48f312eee | [
"MIT"
] | 3 | 2019-08-27T20:29:00.000Z | 2020-05-25T20:36:12.000Z | use Mix.Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :monitor, MonitorWeb.Endpoint,
http: [port: 4001],
server: false
# Print only warnings and errors during test
config :logger, level: :warn
| 24.181818 | 56 | 0.736842 |
e847381cbdc5ac308af85c8ae754ea856c5e36e9 | 251 | ex | Elixir | lib/dornach.ex | ream88/jw-dornach | 0a25deae13fafd832421bde21bc21035a128ac7d | [
"MIT"
] | null | null | null | lib/dornach.ex | ream88/jw-dornach | 0a25deae13fafd832421bde21bc21035a128ac7d | [
"MIT"
] | 4 | 2020-01-28T10:12:25.000Z | 2021-05-10T23:05:12.000Z | lib/dornach.ex | ream88/jw-dornach | 0a25deae13fafd832421bde21bc21035a128ac7d | [
"MIT"
] | null | null | null | defmodule Dornach do
@moduledoc """
Dornach 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.1 | 66 | 0.752988 |
e8473cb3dcc3914978395456e1425c384d11ba64 | 506 | exs | Elixir | year_2020/test/day_13_test.exs | bschmeck/advent_of_code | cbec98019c6c00444e0f4c7e15e01b1ed9ae6145 | [
"MIT"
] | null | null | null | year_2020/test/day_13_test.exs | bschmeck/advent_of_code | cbec98019c6c00444e0f4c7e15e01b1ed9ae6145 | [
"MIT"
] | null | null | null | year_2020/test/day_13_test.exs | bschmeck/advent_of_code | cbec98019c6c00444e0f4c7e15e01b1ed9ae6145 | [
"MIT"
] | null | null | null | defmodule Day13Test do
use ExUnit.Case, async: true
test "it computes time to the next shuttle" do
assert Day13.part_one(InputTestFile) == 295
end
test "it computes the right timestamp" do
assert Day13.part_two(InputTestFile) == 1_068_781
end
test "it computes factors used by GCD" do
assert D... | 24.095238 | 53 | 0.693676 |
e84758712cb3a1bbb39575d3d3c931341a920d2d | 1,226 | ex | Elixir | lib/text_based_fps/command_helper.ex | guisehn/elixir-text-based-fps | 59a815da337309297f8b42ef3481277dd4d9b371 | [
"MIT"
] | 1 | 2022-03-02T12:18:07.000Z | 2022-03-02T12:18:07.000Z | lib/text_based_fps/command_helper.ex | guisehn/elixir-text-based-fps | 59a815da337309297f8b42ef3481277dd4d9b371 | [
"MIT"
] | 12 | 2021-05-31T21:41:09.000Z | 2021-07-30T03:18:09.000Z | lib/text_based_fps/command_helper.ex | guisehn/elixir-text-based-fps | 59a815da337309297f8b42ef3481277dd4d9b371 | [
"MIT"
] | null | null | null | defmodule TextBasedFPS.CommandHelper do
import TextBasedFPS.Text, only: [highlight: 1]
alias TextBasedFPS.{Room, ServerState}
@spec require_alive_player(ServerState.t(), Player.t()) ::
{:ok, Room.t()} | {:error, ServerState.t(), String.t()}
def require_alive_player(state, player) do
with {:ok, r... | 32.263158 | 110 | 0.668842 |
e84766d811e9449ef43b480f85ddcb399b7b7634 | 801 | ex | Elixir | lib/nomad_client/model/server_members.ex | mrmstn/nomad_client | a586022e5eb4d166acba08b55b198ec079d4b118 | [
"Apache-2.0"
] | 8 | 2021-09-04T21:22:53.000Z | 2022-02-22T22:48:38.000Z | lib/nomad_client/model/server_members.ex | mrmstn/nomad_client | a586022e5eb4d166acba08b55b198ec079d4b118 | [
"Apache-2.0"
] | null | null | null | lib/nomad_client/model/server_members.ex | mrmstn/nomad_client | a586022e5eb4d166acba08b55b198ec079d4b118 | [
"Apache-2.0"
] | null | null | null | # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://openapi-generator.tech
# Do not edit the class manually.
defmodule NomadClient.Model.ServerMembers do
@moduledoc """
"""
@derive [Poison.Encoder]
defstruct [
:ServerName,
:ServerRegion,
:ServerDc... | 23.558824 | 91 | 0.654182 |
e847742193b1f0c2efb42f771f17274cc98095f9 | 1,193 | ex | Elixir | lib/pco_api/actions/create.ex | geolessel/pco-api-elixir | 6f4d9f86247a1f6370a512166e9fed3a216302e5 | [
"MIT"
] | 4 | 2016-05-13T20:04:32.000Z | 2020-12-03T11:25:01.000Z | lib/pco_api/actions/create.ex | geolessel/pco-api-elixir | 6f4d9f86247a1f6370a512166e9fed3a216302e5 | [
"MIT"
] | 23 | 2016-05-14T01:34:02.000Z | 2016-08-16T22:34:40.000Z | lib/pco_api/actions/create.ex | geolessel/pco-api-elixir | 6f4d9f86247a1f6370a512166e9fed3a216302e5 | [
"MIT"
] | 4 | 2016-05-27T23:40:39.000Z | 2019-10-06T17:36:40.000Z | defmodule PcoApi.Actions.Create do
defmacro __using__(_opts) do
quote do
import PcoApi.Actions.Create
import PcoApi.Record
def post(url) when is_binary(url), do: create("", url)
def create(%PcoApi.Record{attributes: _, type: _} = record, url) when is_binary(url) do
# TODO: Error ... | 35.088235 | 119 | 0.631182 |
e847957edbef9cb0c532502bd38a5a93a7869d50 | 1,253 | ex | Elixir | web/views/error_helpers.ex | gedzubo/pagila_phoenix_api | c72063672a1b09c8d9bcc2814b03a4863a09a7b4 | [
"MIT"
] | null | null | null | web/views/error_helpers.ex | gedzubo/pagila_phoenix_api | c72063672a1b09c8d9bcc2814b03a4863a09a7b4 | [
"MIT"
] | null | null | null | web/views/error_helpers.ex | gedzubo/pagila_phoenix_api | c72063672a1b09c8d9bcc2814b03a4863a09a7b4 | [
"MIT"
] | null | null | null | defmodule PagilaPhoenixApi.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
if error = form.errors[field] do
content_tag :span, translate_error... | 30.560976 | 82 | 0.674381 |
e847eb7af073f4a7e26eb28b58574ebc82f30591 | 1,830 | ex | Elixir | apps/omg_child_chain/lib/omg_child_chain/fees/feed_adapter.ex | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | 1 | 2020-10-06T03:07:47.000Z | 2020-10-06T03:07:47.000Z | apps/omg_child_chain/lib/omg_child_chain/fees/feed_adapter.ex | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | 9 | 2020-09-16T15:31:17.000Z | 2021-03-17T07:12:35.000Z | apps/omg_child_chain/lib/omg_child_chain/fees/feed_adapter.ex | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | 1 | 2020-09-30T17:17:27.000Z | 2020-09-30T17:17:27.000Z | # Copyright 2019-2020 OmiseGO Pte Ltd
#
# 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 ... | 33.888889 | 100 | 0.732787 |
e847ec33e27b5d6fec2fb205dd89581cfa2225ef | 4,328 | ex | Elixir | lib/coherence/controllers/confirmation_controller.ex | dipth/coherence | 64ad450c5d8d020172875c4bf52f2bbdaa6e59de | [
"MIT"
] | null | null | null | lib/coherence/controllers/confirmation_controller.ex | dipth/coherence | 64ad450c5d8d020172875c4bf52f2bbdaa6e59de | [
"MIT"
] | null | null | null | lib/coherence/controllers/confirmation_controller.ex | dipth/coherence | 64ad450c5d8d020172875c4bf52f2bbdaa6e59de | [
"MIT"
] | null | null | null | defmodule Coherence.ConfirmationController do
@moduledoc """
Handle confirmation actions.
A single action, `edit`, is required for the confirmation module.
"""
use CoherenceWeb, :controller
use Timex
alias Coherence.{ConfirmableService, Messages}
alias Coherence.Schemas
require Logger
plug Cohe... | 29.643836 | 109 | 0.580176 |
e84810b1cc74652c5d42b47f03040e385e21f4e1 | 948 | ex | Elixir | api/lib/api.ex | acoustep/ember-phoenix-slug-example | 871e667e8cf84605f3bb1b4d2bb5a7dca914a614 | [
"MIT"
] | 1 | 2016-05-08T07:52:50.000Z | 2016-05-08T07:52:50.000Z | api/lib/api.ex | acoustep/ember-phoenix-slug-example | 871e667e8cf84605f3bb1b4d2bb5a7dca914a614 | [
"MIT"
] | null | null | null | api/lib/api.ex | acoustep/ember-phoenix-slug-example | 871e667e8cf84605f3bb1b4d2bb5a7dca914a614 | [
"MIT"
] | null | null | null | defmodule Api do
use Application
# See http://elixir-lang.org/docs/stable/elixir/Application.html
# for more information on OTP Applications
def start(_type, _args) do
import Supervisor.Spec, warn: false
children = [
# Start the endpoint when the application starts
supervisor(Api.Endpoint,... | 30.580645 | 71 | 0.702532 |
e8485debacc9336202e2116c687c64c4b7d5640d | 757 | ex | Elixir | apps/dead_letter/lib/dead_letter/supervisor.ex | PillarTechnology/smartcitiesdata | 9420a26820e38267513cd1bfa82c7f5583222bb1 | [
"Apache-2.0"
] | null | null | null | apps/dead_letter/lib/dead_letter/supervisor.ex | PillarTechnology/smartcitiesdata | 9420a26820e38267513cd1bfa82c7f5583222bb1 | [
"Apache-2.0"
] | null | null | null | apps/dead_letter/lib/dead_letter/supervisor.ex | PillarTechnology/smartcitiesdata | 9420a26820e38267513cd1bfa82c7f5583222bb1 | [
"Apache-2.0"
] | null | null | null | defmodule DeadLetter.Supervisor do
@moduledoc """
DeadLetter application supervisor. Orchestrates and monitors
the server and driver processes.
"""
use Supervisor
@doc """
Start a DeadLetter supervisor and link it to the current process
"""
def start_link(opts) do
Supervisor.start_link(__MODULE__... | 23.65625 | 66 | 0.681638 |
e8488ac04633f350325710ecb325cf5531491486 | 882 | ex | Elixir | lib/combine/parser_state.ex | kianmeng/combine | f3a16b56efab388abe2608188d519291549b7eb5 | [
"MIT"
] | 199 | 2015-07-27T11:42:38.000Z | 2022-01-16T13:42:32.000Z | lib/combine/parser_state.ex | kianmeng/combine | f3a16b56efab388abe2608188d519291549b7eb5 | [
"MIT"
] | 45 | 2015-07-27T00:16:26.000Z | 2018-03-02T23:27:04.000Z | lib/combine/parser_state.ex | kianmeng/combine | f3a16b56efab388abe2608188d519291549b7eb5 | [
"MIT"
] | 24 | 2015-07-26T23:52:14.000Z | 2021-09-12T01:35:14.000Z | defmodule Combine.ParserState do
@moduledoc """
Defines a struct representing the state of the parser.
The struct has following fields:
- `input` - the unparsed part of the input
- `column` - column position of the next character (zero based)
- `line` - current line position
- `results` - list o... | 26.727273 | 77 | 0.591837 |
e848adaaad566c03e70a7b2e69bb91b54fd43c90 | 30,330 | exs | Elixir | lib/elixir/test/elixir/stream_test.exs | Tica2/elixir | 6cf1dcbfe4572fc75619f05e40c10fd0844083ef | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/stream_test.exs | Tica2/elixir | 6cf1dcbfe4572fc75619f05e40c10fd0844083ef | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/stream_test.exs | Tica2/elixir | 6cf1dcbfe4572fc75619f05e40c10fd0844083ef | [
"Apache-2.0"
] | null | null | null | Code.require_file "test_helper.exs", __DIR__
defmodule StreamTest do
use ExUnit.Case, async: true
defmodule PDict do
defstruct []
defimpl Collectable do
def into(struct) do
{struct,
fn
_, {:cont, x} -> Process.put(:stream_cont, [x|Process.get(:stream_cont)])
_... | 34.544419 | 108 | 0.546818 |
e848baeff9da8d53e24127835806fe560364e22e | 446 | exs | Elixir | priv/repo/migrations/20180916231415_create_answers.exs | the-mikedavis/mole | 73d884b5dca4e5371b1b399d7e65c0f4a0229851 | [
"BSD-3-Clause"
] | 1 | 2020-07-15T14:39:10.000Z | 2020-07-15T14:39:10.000Z | priv/repo/migrations/20180916231415_create_answers.exs | the-mikedavis/mole | 73d884b5dca4e5371b1b399d7e65c0f4a0229851 | [
"BSD-3-Clause"
] | 59 | 2018-11-05T23:09:10.000Z | 2020-07-11T20:44:14.000Z | priv/repo/migrations/20180916231415_create_answers.exs | the-mikedavis/mole | 73d884b5dca4e5371b1b399d7e65c0f4a0229851 | [
"BSD-3-Clause"
] | null | null | null | defmodule Mole.Repo.Migrations.CreateAnswers do
use Ecto.Migration
def change do
create table(:answers) do
add :correct, :boolean, default: false, null: false
add :user_id, references(:users, on_delete: :nothing)
add :image_id, references(:images, on_delete: :nothing)
add :time_spent, :... | 24.777778 | 61 | 0.674888 |
e848be335027144f336a4e55cef83ea75a041ebc | 840 | ex | Elixir | lib/changelog/transcripts/parser.ex | wojtekmach/changelog.com | d4a8a7703c5f07a3da63bffd770f4642488cf8fd | [
"MIT"
] | 1 | 2020-05-20T16:58:17.000Z | 2020-05-20T16:58:17.000Z | lib/changelog/transcripts/parser.ex | type1fool/changelog.com | fbec3528cc3f5adfdc75b008bb92b17efc4f248f | [
"MIT"
] | null | null | null | lib/changelog/transcripts/parser.ex | type1fool/changelog.com | fbec3528cc3f5adfdc75b008bb92b17efc4f248f | [
"MIT"
] | null | null | null | defmodule Changelog.Transcripts.Parser do
@speaker_regex ~r{\*\*(.*?):\*\*}
def parse_text(string, participants \\ [])
def parse_text(string, participants) when is_nil(string), do: parse_text("", participants)
def parse_text(string, participants) do
@speaker_regex
|> Regex.split(string, include_capture... | 31.111111 | 100 | 0.640476 |
e848bfae9bf9254533d11466d911754243476f4d | 580 | exs | Elixir | mix.exs | yudistrange/diffrential | 251b3e5fdb61bedcd4160ce1f0e207adb5485644 | [
"MIT"
] | null | null | null | mix.exs | yudistrange/diffrential | 251b3e5fdb61bedcd4160ce1f0e207adb5485644 | [
"MIT"
] | 3 | 2021-07-26T17:53:32.000Z | 2021-07-26T18:05:56.000Z | mix.exs | yudistrange/diffrential | 251b3e5fdb61bedcd4160ce1f0e207adb5485644 | [
"MIT"
] | null | null | null | defmodule Diffrential.MixProject do
use Mix.Project
def project do
[
app: :diffrential,
version: "0.1.0",
elixir: "~> 1.11",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
... | 20 | 87 | 0.582759 |
e848c0e0ffa778d85b47906e2c1c694bd3549870 | 2,517 | exs | Elixir | tests/dummy/test/autox/plugs/broadcast_session_plug_test.exs | foxnewsnetwork/autox | 66ea3f0f7ba8b3f9e910984a2ed3cdf0ef5ef29a | [
"MIT"
] | null | null | null | tests/dummy/test/autox/plugs/broadcast_session_plug_test.exs | foxnewsnetwork/autox | 66ea3f0f7ba8b3f9e910984a2ed3cdf0ef5ef29a | [
"MIT"
] | 20 | 2016-04-05T06:28:58.000Z | 2016-05-12T15:45:37.000Z | tests/dummy/test/autox/plugs/broadcast_session_plug_test.exs | foxnewsnetwork/autox | 66ea3f0f7ba8b3f9e910984a2ed3cdf0ef5ef29a | [
"MIT"
] | null | null | null | defmodule Dummy.BroadcastSessionPlugTest do
use Dummy.ConnChanCase
alias Autox.SessionUtils
alias Dummy.UserSocket
import Dummy.SeedSupport
setup do
user = build_user
owner = build_owner
relationships = %{
"owner" => %{
"data" => %{
"id" => owner.id,
"type" => ... | 27.064516 | 108 | 0.582439 |
e848cea7528c497e7c38aa5198ea65f3b3c40a82 | 2,361 | ex | Elixir | lib/exqlite/sqlite3_nif.ex | LostKobrakai/exqlite | ab64f59d2f88155a19027d18f63ed7ad07b8d2f4 | [
"MIT"
] | null | null | null | lib/exqlite/sqlite3_nif.ex | LostKobrakai/exqlite | ab64f59d2f88155a19027d18f63ed7ad07b8d2f4 | [
"MIT"
] | null | null | null | lib/exqlite/sqlite3_nif.ex | LostKobrakai/exqlite | ab64f59d2f88155a19027d18f63ed7ad07b8d2f4 | [
"MIT"
] | null | null | null | defmodule Exqlite.Sqlite3NIF do
@moduledoc """
This is the module where all of the NIF entry points reside. Calling this directly
should be avoided unless you are aware of what you are doing.
"""
@on_load :load_nifs
@type db() :: reference()
@type statement() :: reference()
@type reason() :: :atom | S... | 38.704918 | 85 | 0.647607 |
e848e553d4ec798cdefe730e5b65c367ad103f78 | 2,919 | ex | Elixir | clients/cloud_run/lib/google_api/cloud_run/v1alpha1/model/revision.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/cloud_run/lib/google_api/cloud_run/v1alpha1/model/revision.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/cloud_run/lib/google_api/cloud_run/v1alpha1/model/revision.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 ... | 42.304348 | 170 | 0.729017 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.