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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
335e8b0c48626082bfac5fad017ac480ace98d08 | 79 | ex | Elixir | web/views/page_view.ex | bradurani/dangerouscrossing | 3ab5c25e9ca2230704d56068400cc499632772bb | [
"BSD-3-Clause"
] | null | null | null | web/views/page_view.ex | bradurani/dangerouscrossing | 3ab5c25e9ca2230704d56068400cc499632772bb | [
"BSD-3-Clause"
] | null | null | null | web/views/page_view.ex | bradurani/dangerouscrossing | 3ab5c25e9ca2230704d56068400cc499632772bb | [
"BSD-3-Clause"
] | null | null | null | defmodule Dangerouscrossing.PageView do
use Dangerouscrossing.Web, :view
end
| 19.75 | 39 | 0.835443 |
335eb5620fb98d4d63ea7959804f74c5933bbb53 | 1,101 | ex | Elixir | lib/easypost/carrier_account.ex | winestyr/ex_easypost | a8563ccbff429ad181280c438efeea65383ff852 | [
"MIT"
] | 6 | 2017-09-21T13:19:56.000Z | 2021-01-07T18:31:42.000Z | lib/easypost/carrier_account.ex | winestyr/ex_easypost | a8563ccbff429ad181280c438efeea65383ff852 | [
"MIT"
] | null | null | null | lib/easypost/carrier_account.ex | winestyr/ex_easypost | a8563ccbff429ad181280c438efeea65383ff852 | [
"MIT"
] | 2 | 2018-07-11T07:12:08.000Z | 2020-06-29T02:04:48.000Z | defmodule EasyPost.CarrierAccount do
@doc """
Create a `CarrierAccount`.
"""
@spec create(map) :: EasyPost.Operation.t()
def create(params) do
%EasyPost.Operation{
method: :post,
params: params,
path: "/carrier_accounts"
}
end
@doc """
Delete a `CarrierAccount`.
"""
@spec ... | 22.02 | 75 | 0.613987 |
335ebf80bd7a2a75280ecd731273e448662b3e1e | 388 | ex | Elixir | lib/textex/sms_message.ex | facto/textex | 6f23b8727b8aaf79a4b8d66aa2798c058fceb270 | [
"MIT"
] | 2 | 2016-07-31T19:39:46.000Z | 2020-03-13T21:26:13.000Z | lib/textex/sms_message.ex | facto/textex | 6f23b8727b8aaf79a4b8d66aa2798c058fceb270 | [
"MIT"
] | null | null | null | lib/textex/sms_message.ex | facto/textex | 6f23b8727b8aaf79a4b8d66aa2798c058fceb270 | [
"MIT"
] | 2 | 2017-10-27T15:23:32.000Z | 2020-03-11T13:30:20.000Z | defmodule Textex.SmsMessage do
alias Textex.HttpClient
defstruct phone_number: nil, message: nil
def send!(sms_messages) when is_list(sms_messages) do
Enum.map(sms_messages, &send!(&1))
end
def send!(sms_message) do
HttpClient.post_sms_message!(sms_message, base_sends_uri())
end
def base_sends... | 21.555556 | 63 | 0.747423 |
335ebfca9c4adf50a7b642de6fa70fe2e7e84452 | 2,189 | ex | Elixir | clients/apigee/lib/google_api/apigee/v1/model/google_cloud_apigee_v1_announcement.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/apigee/lib/google_api/apigee/v1/model/google_cloud_apigee_v1_announcement.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/apigee/lib/google_api/apigee/v1/model/google_cloud_apigee_v1_announcement.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... | 37.101695 | 136 | 0.71037 |
335f28bcbe7e3be3efeefe25e462595cb49762b3 | 1,420 | ex | Elixir | lib/game/environment.ex | nomicflux/ex_venture | 3e87dc8802c24067256d99856198c814d0bae4d6 | [
"MIT"
] | null | null | null | lib/game/environment.ex | nomicflux/ex_venture | 3e87dc8802c24067256d99856198c814d0bae4d6 | [
"MIT"
] | null | null | null | lib/game/environment.ex | nomicflux/ex_venture | 3e87dc8802c24067256d99856198c814d0bae4d6 | [
"MIT"
] | null | null | null | defmodule Game.Environment do
@moduledoc """
Look at your surroundings, whether a room or an overworld
"""
@environment Application.get_env(:ex_venture, :game)[:environment]
@doc """
Get the type of room based on its id
"""
def room_type(room_id) do
case room_id do
"overworld:" <> _id ->
... | 20.57971 | 68 | 0.695775 |
335f2b5ddb5cac07f438a2c4d701a8d69a56f482 | 71 | ex | Elixir | elixirChat/lib/elixirChat/repo.ex | Dmdv/ElixirPlayground | 02d9e8a7fdd6e8742e200430debc9f0ec7fd28a1 | [
"Apache-2.0"
] | null | null | null | elixirChat/lib/elixirChat/repo.ex | Dmdv/ElixirPlayground | 02d9e8a7fdd6e8742e200430debc9f0ec7fd28a1 | [
"Apache-2.0"
] | null | null | null | elixirChat/lib/elixirChat/repo.ex | Dmdv/ElixirPlayground | 02d9e8a7fdd6e8742e200430debc9f0ec7fd28a1 | [
"Apache-2.0"
] | null | null | null | defmodule ElixirChat.Repo do
use Ecto.Repo, otp_app: :elixirChat
end
| 17.75 | 37 | 0.788732 |
335f41d5999233ce115fdfac4399254822003851 | 414 | ex | Elixir | lib/a2billing_rest_api/guardian_serializer.ex | max-konin/a2billing-rest-api | 3f8430caa2b9cbedfbe842e81030c861aa25dd89 | [
"MIT"
] | 1 | 2017-08-01T04:31:38.000Z | 2017-08-01T04:31:38.000Z | lib/a2billing_rest_api/guardian_serializer.ex | max-konin/a2billing-rest-api | 3f8430caa2b9cbedfbe842e81030c861aa25dd89 | [
"MIT"
] | null | null | null | lib/a2billing_rest_api/guardian_serializer.ex | max-konin/a2billing-rest-api | 3f8430caa2b9cbedfbe842e81030c861aa25dd89 | [
"MIT"
] | 1 | 2020-05-05T15:21:59.000Z | 2020-05-05T15:21:59.000Z | defmodule A2billingRestApi.GuardianSerializer do
@behaviour Guardian.Serializer
alias A2billingRestApi.Repo
alias A2billingRestApi.ApiUser
def for_token(user = %ApiUser{}), do: { :ok, "ApiUser:#{user.id}" }
def for_token(_), do: { :error, "Unknown resource type" }
def from_token("ApiUser:" <> id), do: { ... | 31.846154 | 70 | 0.698068 |
335f498812ebe4b0390e727f5ae398a959771e6e | 480 | ex | Elixir | lib/elixir_awesome/projects/category.ex | ddidwyll/awesome-elixir | 55b72305884cfd10510e25dd5f17f1a32765a17f | [
"MIT"
] | null | null | null | lib/elixir_awesome/projects/category.ex | ddidwyll/awesome-elixir | 55b72305884cfd10510e25dd5f17f1a32765a17f | [
"MIT"
] | null | null | null | lib/elixir_awesome/projects/category.ex | ddidwyll/awesome-elixir | 55b72305884cfd10510e25dd5f17f1a32765a17f | [
"MIT"
] | null | null | null | defmodule ElixirAwesome.Projects.Category do
use Ecto.Schema
alias ElixirAwesome.Projects.Project
@fields [
:description,
:projects,
:exist,
:name
]
@primary_key {:name, :string, autogenerated: false}
@derive {Jason.Encoder, only: @fields}
@derive {Phoenix.Param, key: :name}
schema "ca... | 21.818182 | 60 | 0.695833 |
335f8a0a2aae63256e918cd1a870ccb217c2c9d4 | 2,193 | exs | Elixir | config/dev.exs | jiachen247/cadet | 4219acaa9ba1d3672b2220d9d1acb2cb671443a3 | [
"MIT"
] | null | null | null | config/dev.exs | jiachen247/cadet | 4219acaa9ba1d3672b2220d9d1acb2cb671443a3 | [
"MIT"
] | null | null | null | config/dev.exs | jiachen247/cadet | 4219acaa9ba1d3672b2220d9d1acb2cb671443a3 | [
"MIT"
] | null | null | null | use Mix.Config
config :cadet, environment: :dev
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with brunch.io to recompile .js and .css sources.
config :cadet, CadetW... | 28.855263 | 170 | 0.698586 |
335fed99b606c190952b8bb587ae31b7919672c7 | 2,436 | exs | Elixir | apps/omg/test/omg/state_test.exs | PinkDiamond1/elixir-omg | 70dfd24a0a1ddf5d1d9d71aab61ea25300f889f7 | [
"Apache-2.0"
] | null | null | null | apps/omg/test/omg/state_test.exs | PinkDiamond1/elixir-omg | 70dfd24a0a1ddf5d1d9d71aab61ea25300f889f7 | [
"Apache-2.0"
] | null | null | null | apps/omg/test/omg/state_test.exs | PinkDiamond1/elixir-omg | 70dfd24a0a1ddf5d1d9d71aab61ea25300f889f7 | [
"Apache-2.0"
] | 1 | 2021-12-04T00:37:46.000Z | 2021-12-04T00:37:46.000Z | # Copyright 2019 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 writi... | 36.909091 | 116 | 0.699507 |
335ff0dd1205166c7478689496b037894b2f4517 | 588 | ex | Elixir | lib/wabanex/training.ex | danielhessell/wabanex | c0ad713a558a3cd52ca83bd22cd093e3c3c1b0f5 | [
"MIT"
] | null | null | null | lib/wabanex/training.ex | danielhessell/wabanex | c0ad713a558a3cd52ca83bd22cd093e3c3c1b0f5 | [
"MIT"
] | null | null | null | lib/wabanex/training.ex | danielhessell/wabanex | c0ad713a558a3cd52ca83bd22cd093e3c3c1b0f5 | [
"MIT"
] | null | null | null | defmodule Wabanex.Training do
use Ecto.Schema
import Ecto.Changeset
alias Wabanex.{User, Exercise}
@primary_key {:id, :binary_id, autogenerate: true}
@foreign_key_type :binary_id
@fields [:start_date, :end_date, :user_id]
schema "trainings" do
field :start_date, :date
field :end_date, :date
... | 19.6 | 52 | 0.681973 |
335fffa7fadf59da7ce6808db7e34d13e722133b | 2,932 | ex | Elixir | lib/graphql/types/translation.ex | paulelliott/accent | fabd0d2768088adf780317c6e44fcabcccadba11 | [
"BSD-3-Clause"
] | null | null | null | lib/graphql/types/translation.ex | paulelliott/accent | fabd0d2768088adf780317c6e44fcabcccadba11 | [
"BSD-3-Clause"
] | null | null | null | lib/graphql/types/translation.ex | paulelliott/accent | fabd0d2768088adf780317c6e44fcabcccadba11 | [
"BSD-3-Clause"
] | null | null | null | defmodule Accent.GraphQL.Types.Translation do
use Absinthe.Schema.Notation
import Absinthe.Resolution.Helpers, only: [dataloader: 1, dataloader: 2]
import Accent.GraphQL.Helpers.Authorization
import Accent.GraphQL.Helpers.Fields
enum :translation_value_type do
value(:string, as: "string")
value(:plu... | 37.113924 | 156 | 0.731583 |
33601c249c35b15f60e4f9889c756ce97ed0c716 | 216 | ex | Elixir | lib/advent_of_code.ex | odarriba/advent_of_code_2021 | 658059cc83438c588d72fd6b30685f555cf8f7a2 | [
"MIT"
] | 5 | 2021-11-30T15:26:47.000Z | 2021-12-25T19:31:44.000Z | lib/advent_of_code.ex | odarriba/advent_of_code_2021 | 658059cc83438c588d72fd6b30685f555cf8f7a2 | [
"MIT"
] | null | null | null | lib/advent_of_code.ex | odarriba/advent_of_code_2021 | 658059cc83438c588d72fd6b30685f555cf8f7a2 | [
"MIT"
] | null | null | null | defmodule AdventOfCode do
@moduledoc """
Documentation for `AdventOfCode`.
"""
@doc """
Hello world.
## Examples
iex> AdventOfCode.hello()
:world
"""
def hello do
:world
end
end
| 11.368421 | 35 | 0.587963 |
3360413ee50db433fab8b264703b1a30f838b601 | 249 | ex | Elixir | apps/enchat/lib/enchat.ex | Allypost/enchat | f9cff2906116550099f4574bf44e8dc1fea6d476 | [
"MIT"
] | null | null | null | apps/enchat/lib/enchat.ex | Allypost/enchat | f9cff2906116550099f4574bf44e8dc1fea6d476 | [
"MIT"
] | null | null | null | apps/enchat/lib/enchat.ex | Allypost/enchat | f9cff2906116550099f4574bf44e8dc1fea6d476 | [
"MIT"
] | null | null | null | defmodule Enchat do
@moduledoc """
Enchat 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
| 24.9 | 66 | 0.751004 |
3360456fd8e2c08715d136482927c7b425141419 | 1,072 | ex | Elixir | fw/phoenix/hello_phoenix/lib/hello_phoenix.ex | alexgarzao/learning_elixir | f1b06f26898be35803591245d033d30dd4bd1e1a | [
"MIT"
] | 14 | 2016-09-11T02:31:36.000Z | 2021-07-15T12:51:31.000Z | fw/phoenix/hello_phoenix/lib/hello_phoenix.ex | alexgarzao/learning_elixir | f1b06f26898be35803591245d033d30dd4bd1e1a | [
"MIT"
] | 4 | 2020-08-25T13:48:31.000Z | 2021-09-01T12:56:54.000Z | fw/phoenix/hello_phoenix/lib/hello_phoenix.ex | alexgarzao/learning_elixir | f1b06f26898be35803591245d033d30dd4bd1e1a | [
"MIT"
] | 2 | 2017-08-14T22:05:47.000Z | 2017-11-10T18:42:23.000Z | defmodule HelloPhoenix 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
# Define workers and child supervisors to be supervised
children = [
# Start the Ecto reposi... | 33.5 | 90 | 0.722015 |
3360553838fca67f24f78aac5ee35ebc52cb441b | 277 | ex | Elixir | sensors/lib/air_sensors.ex | Jwsonic/air | b4f6ed4b2be47aee78b40345044c96de1fc49813 | [
"MIT"
] | 1 | 2021-12-14T09:20:06.000Z | 2021-12-14T09:20:06.000Z | sensors/lib/air_sensors.ex | Jwsonic/air | b4f6ed4b2be47aee78b40345044c96de1fc49813 | [
"MIT"
] | null | null | null | sensors/lib/air_sensors.ex | Jwsonic/air | b4f6ed4b2be47aee78b40345044c96de1fc49813 | [
"MIT"
] | null | null | null | defmodule AirSensors do
@moduledoc """
Documentation for `AirSensors`.
"""
def script do
:air_sensors |> :code.priv_dir() |> Path.join("pm2.py")
end
def pm2(serial) do
System.cmd("python3", [AirSensors.script(), serial], stderr_to_stdout: true)
end
end
| 19.785714 | 80 | 0.66426 |
33606acf8adc731dc48d2732e50cfd7e52507033 | 314 | exs | Elixir | priv/old_repo/migrations/20160726145406_add_old_animals_table.exs | marick/eecrit | 50b1ebeadc5cf21ea9f9df6add65e4d7037e2482 | [
"MIT"
] | 10 | 2016-07-15T15:57:33.000Z | 2018-06-09T00:40:46.000Z | priv/old_repo/migrations/20160726145406_add_old_animals_table.exs | marick/eecrit | 50b1ebeadc5cf21ea9f9df6add65e4d7037e2482 | [
"MIT"
] | null | null | null | priv/old_repo/migrations/20160726145406_add_old_animals_table.exs | marick/eecrit | 50b1ebeadc5cf21ea9f9df6add65e4d7037e2482 | [
"MIT"
] | 6 | 2016-07-15T15:57:41.000Z | 2018-03-22T16:38:00.000Z | defmodule Eecrit.OldRepo.Migrations.AddOldAnimalsTable do
use Ecto.Migration
def change do
create table(:animals) do
add :name, :string
add :nickname, :string
add :kind, :string
add :procedure_description_kind, :string
add :date_removed_from_service, :date
end
end
end
| 22.428571 | 57 | 0.694268 |
33609f0d73a6421f35c62c5a2d3db5cebdd3ebe0 | 63,893 | ex | Elixir | clients/firestore/lib/google_api/firestore/v1beta1/api/projects.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/firestore/lib/google_api/firestore/v1beta1/api/projects.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/firestore/lib/google_api/firestore/v1beta1/api/projects.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 ... | 43.882555 | 196 | 0.615607 |
3360a1cb565f1fdd926289536c1d9b359311f993 | 405 | exs | Elixir | phoenix/eiga/test/eiga_web/views/error_view_test.exs | defndaines/eiga | 89adc25dd6c7a5be86d6dc6be9dffc62ad05bdd8 | [
"Apache-2.0"
] | null | null | null | phoenix/eiga/test/eiga_web/views/error_view_test.exs | defndaines/eiga | 89adc25dd6c7a5be86d6dc6be9dffc62ad05bdd8 | [
"Apache-2.0"
] | 2 | 2016-03-10T03:04:11.000Z | 2017-02-11T17:43:44.000Z | phoenix/eiga/test/eiga_web/views/error_view_test.exs | defndaines/eiga | 89adc25dd6c7a5be86d6dc6be9dffc62ad05bdd8 | [
"Apache-2.0"
] | null | null | null | defmodule EigaWeb.ErrorViewTest do
use EigaWeb.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(EigaWeb.ErrorView, "404.html", []) == "Not Found"
end
test "renders 500.html" do
assert rend... | 27 | 89 | 0.725926 |
3360d101d6ec86e8130f277a942ba3783dd071fc | 392 | ex | Elixir | lib/raft_fleet/per_member_options_maker.ex | queer/raft_fleet | 4b18f93428c8a948e621eb92ecc771816df8347f | [
"MIT"
] | 66 | 2016-07-12T16:55:22.000Z | 2021-12-09T09:41:14.000Z | lib/raft_fleet/per_member_options_maker.ex | queer/raft_fleet | 4b18f93428c8a948e621eb92ecc771816df8347f | [
"MIT"
] | 6 | 2017-10-26T01:36:58.000Z | 2021-07-25T16:56:03.000Z | lib/raft_fleet/per_member_options_maker.ex | queer/raft_fleet | 4b18f93428c8a948e621eb92ecc771816df8347f | [
"MIT"
] | 4 | 2017-07-31T20:48:51.000Z | 2020-10-25T08:06:31.000Z | use Croma
defmodule RaftFleet.PerMemberOptions do
alias RaftFleet.Config
defun build(name :: atom):: [RaftedValue.option] do
case Config.per_member_options_maker() do
nil -> []
mod -> mod.make(name)
end
|> Keyword.put(:name, name)
end
end
defmodule RaftFleet.PerMemberOptionsMaker do
@... | 21.777778 | 70 | 0.709184 |
3360f2edcc627427dec37e5578a8f56d4562b453 | 443 | ex | Elixir | rocketpay/lib/rocketpay_web/views/user_view.ex | includeVitor/includeVitor-Elixir_NLW4- | 93ed9d3d0a05e43c8b8391f8936f3f040dc39a62 | [
"MIT"
] | null | null | null | rocketpay/lib/rocketpay_web/views/user_view.ex | includeVitor/includeVitor-Elixir_NLW4- | 93ed9d3d0a05e43c8b8391f8936f3f040dc39a62 | [
"MIT"
] | null | null | null | rocketpay/lib/rocketpay_web/views/user_view.ex | includeVitor/includeVitor-Elixir_NLW4- | 93ed9d3d0a05e43c8b8391f8936f3f040dc39a62 | [
"MIT"
] | null | null | null | defmodule RocketpayWeb.UsersView do
alias Rocketpay.{Account,User}
def render("create.json", %{
user: %User{account: %Account{id: account_id, balance: balance}, id: id, name: name, nickname: nickname}
}) do
%{
message: "User created",
user: %{
id: id,
name: name,
nick... | 22.15 | 108 | 0.548533 |
336114ae6306cce978df58996ea016caf47bdc3d | 6,536 | ex | Elixir | lib/oli_web/views/view_helpers.ex | dtiwarATS/oli-torus | d14e2f42f3a94c57ad1cd6e9c9930b54f122215c | [
"MIT"
] | null | null | null | lib/oli_web/views/view_helpers.ex | dtiwarATS/oli-torus | d14e2f42f3a94c57ad1cd6e9c9930b54f122215c | [
"MIT"
] | null | null | null | lib/oli_web/views/view_helpers.ex | dtiwarATS/oli-torus | d14e2f42f3a94c57ad1cd6e9c9930b54f122215c | [
"MIT"
] | null | null | null | defmodule OliWeb.ViewHelpers do
use Phoenix.HTML
import Oli.Branding
import Oli.Utils, only: [value_or: 2]
alias Oli.Accounts
alias Oli.Accounts.Author
alias Oli.Delivery.Sections
alias Oli.Delivery.Sections.Section
alias Oli.Branding.Brand
def brand_logo_html(conn_or_brand, opts \\ [])
def bran... | 28.792952 | 133 | 0.64795 |
336115cfbaaad56146ae7e2f92c72470c242dc83 | 3,869 | ex | Elixir | clients/people/lib/google_api/people/v1/model/contact_group.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/people/lib/google_api/people/v1/model/contact_group.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/people/lib/google_api/people/v1/model/contact_group.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... | 54.492958 | 419 | 0.707418 |
33611761d43bcdd47a3c3700ceaf167621044a2a | 1,026 | ex | Elixir | lib/requestbx/application.ex | semlabs/requestbx | b9dfb33efd04f067ede1a8e2659f84c92abbed67 | [
"MIT"
] | null | null | null | lib/requestbx/application.ex | semlabs/requestbx | b9dfb33efd04f067ede1a8e2659f84c92abbed67 | [
"MIT"
] | 1 | 2018-01-19T15:23:36.000Z | 2018-01-19T15:23:36.000Z | lib/requestbx/application.ex | semlabs/requestbx | b9dfb33efd04f067ede1a8e2659f84c92abbed67 | [
"MIT"
] | null | null | null | defmodule Requestbx.Application do
use Application
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
def start(_type, _args) do
import Supervisor.Spec
# Define workers and child supervisors to be supervised
children = [
# Start the endpoint when the ... | 32.0625 | 87 | 0.719298 |
33611ce5578e2f61af9dea7ec59cb8cd46fa056c | 4,015 | ex | Elixir | lib/app/dialog.ex | ilgarsh/travelbot | f6a10bf39e1942e46d571b59b41fb3001436f520 | [
"MIT"
] | null | null | null | lib/app/dialog.ex | ilgarsh/travelbot | f6a10bf39e1942e46d571b59b41fb3001436f520 | [
"MIT"
] | 1 | 2017-12-11T21:11:44.000Z | 2017-12-11T21:11:44.000Z | lib/app/dialog.ex | ilgarsh/travelbot | f6a10bf39e1942e46d571b59b41fb3001436f520 | [
"MIT"
] | null | null | null | defmodule App.Dialog do
use GenServer
## Client
def start_link do
GenServer.start_link(__MODULE__, :ok, name: __MODULE__)
end
def get_user_progress(user_id) do
{:ok, progress} = user_id
|> get_user_state
|> Map.fetch(:dialog)
progress
end
def get_user_city(user_id) do
{:ok, city} =... | 26.589404 | 175 | 0.657036 |
33611e4ff441ffd17290beb65e473476fa0ebc4a | 94 | exs | Elixir | test/nubank_api_test.exs | jeffhsta/nubank_api | c4ca246f6e6ff6e77e349293daaff3741d3975ff | [
"MIT"
] | 14 | 2019-02-19T16:59:16.000Z | 2021-10-30T14:57:10.000Z | test/nubank_api_test.exs | fernandozoomp/API_NuBank | cb05de00d48275f3eae94fa3cb4ea55684289937 | [
"MIT"
] | 32 | 2019-02-21T02:40:03.000Z | 2020-06-09T00:04:03.000Z | test/nubank_api_test.exs | fernandozoomp/API_NuBank | cb05de00d48275f3eae94fa3cb4ea55684289937 | [
"MIT"
] | 3 | 2019-02-22T00:20:34.000Z | 2021-04-08T20:35:07.000Z | defmodule NubankAPITest do
use ExUnit.Case
test "the truth" do
assert true
end
end
| 11.75 | 26 | 0.712766 |
336122313efab5b0cbfc6a0d11ef6ce4bdc7be62 | 1,182 | ex | Elixir | lib/exotus/plug/head.ex | elixir-depot/exotus | 6441ccb4312a182cffa9fd6042c1497b523f1c62 | [
"Apache-2.0"
] | null | null | null | lib/exotus/plug/head.ex | elixir-depot/exotus | 6441ccb4312a182cffa9fd6042c1497b523f1c62 | [
"Apache-2.0"
] | null | null | null | lib/exotus/plug/head.ex | elixir-depot/exotus | 6441ccb4312a182cffa9fd6042c1497b523f1c62 | [
"Apache-2.0"
] | null | null | null | defmodule Exotus.Plug.Head do
@moduledoc false
use Plug.Router
def call(conn, path) do
conn
|> assign(:path, path)
|> super(path)
end
plug :disable_caching
plug :find_file
plug :match
plug :dispatch
match _ do
%{offset: offset} = status = Exotus.Upload.status(conn.assigns.file)
... | 22.730769 | 73 | 0.611675 |
33612515eb3077529e81fc4ebdac255e60d015ae | 933 | ex | Elixir | test/support/channel_case.ex | daskycodes/better_psso | 01954d9a84667ff22a4e5dc70856c2023f5e1276 | [
"MIT"
] | null | null | null | test/support/channel_case.ex | daskycodes/better_psso | 01954d9a84667ff22a4e5dc70856c2023f5e1276 | [
"MIT"
] | null | null | null | test/support/channel_case.ex | daskycodes/better_psso | 01954d9a84667ff22a4e5dc70856c2023f5e1276 | [
"MIT"
] | null | null | null | defmodule PssoWeb.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 interacts with... | 26.657143 | 61 | 0.735263 |
336131c06a23cf45defa1f51138a1bad61ad3d51 | 1,060 | exs | Elixir | clients/vault/test/test_helper.exs | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/vault/test/test_helper.exs | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/vault/test/test_helper.exs | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"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... | 29.444444 | 83 | 0.737736 |
33614d46ebfb2b2cb05986e912d1c61e1be4cd48 | 209 | exs | Elixir | phoenix_commerce/test/controllers/page_controller_test.exs | enilsen16/elixir | b4d1d45858a25e4beb39e07de8685f3d93d6a520 | [
"MIT"
] | null | null | null | phoenix_commerce/test/controllers/page_controller_test.exs | enilsen16/elixir | b4d1d45858a25e4beb39e07de8685f3d93d6a520 | [
"MIT"
] | null | null | null | phoenix_commerce/test/controllers/page_controller_test.exs | enilsen16/elixir | b4d1d45858a25e4beb39e07de8685f3d93d6a520 | [
"MIT"
] | null | null | null | defmodule PhoenixCommerce.PageControllerTest do
use PhoenixCommerce.ConnCase
test "GET /", %{conn: conn} do
conn = get conn, "/"
assert html_response(conn, 200) =~ "Welcome to Phoenix!"
end
end
| 23.222222 | 60 | 0.698565 |
3361708c02dc08f5fb39a5833e0fae0b48a372fb | 13,200 | ex | Elixir | lib/ex_unit/lib/ex_unit/assertions.ex | carlosantoniodasilva/elixir | 0b7d1c9d4964cd6699b72298294844d8d7d694b5 | [
"Apache-2.0"
] | null | null | null | lib/ex_unit/lib/ex_unit/assertions.ex | carlosantoniodasilva/elixir | 0b7d1c9d4964cd6699b72298294844d8d7d694b5 | [
"Apache-2.0"
] | null | null | null | lib/ex_unit/lib/ex_unit/assertions.ex | carlosantoniodasilva/elixir | 0b7d1c9d4964cd6699b72298294844d8d7d694b5 | [
"Apache-2.0"
] | null | null | null | defmodule ExUnit.AssertionError do
@no_value :ex_unit_no_meaningful_value
defexception left: @no_value,
right: @no_value,
message: @no_value,
expr: @no_value
@doc """
Indicates no meaningful value for a field.
"""
def no_value do
@no_value
end
end... | 24.175824 | 113 | 0.621212 |
3361750d57dc85036acc627ac694e79c32e25fb7 | 164 | ex | Elixir | web/controllers/page_controller.ex | keichan34/phoenix_exfile_test_app | 63de22ab04a61ef7f13a53f2b34d3c752a1def7a | [
"MIT"
] | 1 | 2016-04-19T11:56:32.000Z | 2016-04-19T11:56:32.000Z | web/controllers/page_controller.ex | keichan34/phoenix_exfile_test_app | 63de22ab04a61ef7f13a53f2b34d3c752a1def7a | [
"MIT"
] | 1 | 2016-08-05T07:52:34.000Z | 2016-09-02T03:45:03.000Z | web/controllers/page_controller.ex | keichan34/phoenix_exfile_test_app | 63de22ab04a61ef7f13a53f2b34d3c752a1def7a | [
"MIT"
] | null | null | null | defmodule PhoenixExfileTestApp.PageController do
use PhoenixExfileTestApp.Web, :controller
def index(conn, _params) do
render conn, "index.html"
end
end
| 20.5 | 48 | 0.77439 |
3361a2e68b01e9216b0ae35e0a7fc25ad8f077ee | 5,230 | exs | Elixir | test/gen_rmq_publisher_test.exs | eqmvii/gen_rmq | 074b0cf45fbc0ab2c3ab29b1ff79df51fa64c2bf | [
"MIT"
] | null | null | null | test/gen_rmq_publisher_test.exs | eqmvii/gen_rmq | 074b0cf45fbc0ab2c3ab29b1ff79df51fa64c2bf | [
"MIT"
] | null | null | null | test/gen_rmq_publisher_test.exs | eqmvii/gen_rmq | 074b0cf45fbc0ab2c3ab29b1ff79df51fa64c2bf | [
"MIT"
] | null | null | null | defmodule GenRMQ.PublisherTest do
use ExUnit.Case, async: false
use GenRMQ.RabbitCase
alias GenRMQ.Publisher
alias GenRMQ.Test.Assert
@uri "amqp://guest:guest@localhost:5672"
@exchange "gen_rmq_out_exchange"
@out_queue "gen_rmq_out_queue"
defmodule TestPublisher do
@behaviour GenRMQ.Publisher
... | 30.946746 | 108 | 0.658891 |
336203689a31b8e831718913c1244b6ad784b94d | 1,389 | ex | Elixir | apps/ewallet/lib/mix/tasks/omg.deps.ex | Macavirus/ewallet | ce62177b8bd3f7e72156930d384a1c4c047a3b5b | [
"Apache-2.0"
] | null | null | null | apps/ewallet/lib/mix/tasks/omg.deps.ex | Macavirus/ewallet | ce62177b8bd3f7e72156930d384a1c4c047a3b5b | [
"Apache-2.0"
] | null | null | null | apps/ewallet/lib/mix/tasks/omg.deps.ex | Macavirus/ewallet | ce62177b8bd3f7e72156930d384a1c4c047a3b5b | [
"Apache-2.0"
] | null | null | null | # Copyright 2018-2019 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 ... | 26.711538 | 77 | 0.693305 |
33621de8eeb8cc5d443071caf779877d7ba90ce4 | 587 | ex | Elixir | lib/pummpcomm/history/change_capture_event_enable.ex | infinity-aps/pummpcomm | 7380585ecd110ab1c19d2aea3880e51e3f433050 | [
"MIT"
] | 15 | 2017-08-31T00:58:47.000Z | 2020-01-12T03:53:13.000Z | lib/pummpcomm/history/change_capture_event_enable.ex | vladhj38/pummpcomm | 7380585ecd110ab1c19d2aea3880e51e3f433050 | [
"MIT"
] | 1 | 2017-09-15T02:09:31.000Z | 2017-09-15T02:09:31.000Z | lib/pummpcomm/history/change_capture_event_enable.ex | vladhj38/pummpcomm | 7380585ecd110ab1c19d2aea3880e51e3f433050 | [
"MIT"
] | 3 | 2017-09-10T17:24:59.000Z | 2019-09-10T19:41:49.000Z | defmodule Pummpcomm.History.ChangeCaptureEventEnable do
@moduledoc """
When `Utilities` > `Capture Options` is toggled `On` or `Off`
"""
@behaviour Pummpcomm.History.Decoder
# Functions
## Pummpcomm.History.Decoder callbacks
@doc """
`timestamp` when `Utilities` > `Capture Options` is toggled `On` or... | 30.894737 | 93 | 0.729131 |
336230c29881fb5b2dddfec90715e6a86eed5a34 | 1,813 | ex | Elixir | lib/wechat/storage/cache.ex | hsieh/wechat | 6a49033d3a35a80358481778a0609f214c340a0c | [
"Apache-2.0"
] | null | null | null | lib/wechat/storage/cache.ex | hsieh/wechat | 6a49033d3a35a80358481778a0609f214c340a0c | [
"Apache-2.0"
] | null | null | null | lib/wechat/storage/cache.ex | hsieh/wechat | 6a49033d3a35a80358481778a0609f214c340a0c | [
"Apache-2.0"
] | null | null | null | defmodule WeChat.Storage.Cache do
@moduledoc "缓存存储器"
@type cache_id :: WeChat.appid()
@type cache_sub_key :: atom
@type cache_key :: {cache_id, cache_sub_key}
@type cache_value :: String.t() | integer
@compile {:inline, put_cache: 2, get_cache: 1, del_cache: 1}
def init_table() do
:ets.new(:wechat,... | 27.892308 | 76 | 0.666851 |
3362388179da263a120a17c6a001934bf2bc529d | 1,316 | ex | Elixir | clients/slides/lib/google_api/slides/v1/model/word_art.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/slides/lib/google_api/slides/v1/model/word_art.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/slides/lib/google_api/slides/v1/model/word_art.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... | 28.608696 | 78 | 0.74772 |
336239f769017585e14598a112f2b4fc1ca14514 | 224 | exs | Elixir | priv/repo/migrations/20190902085252_change_poc_receipts_table.exs | pakorn186c/blockchain-api | 3c9fbc892e645f9bb144414f3da36749603f37bc | [
"Apache-2.0"
] | 17 | 2019-11-03T03:02:41.000Z | 2022-01-13T17:03:32.000Z | priv/repo/migrations/20190902085252_change_poc_receipts_table.exs | AddressXception/blockchain-api | eea98fa78af2887cc84762f84532c602c3b8b666 | [
"Apache-2.0"
] | 5 | 2019-11-07T23:26:53.000Z | 2020-11-24T21:45:35.000Z | priv/repo/migrations/20190902085252_change_poc_receipts_table.exs | AddressXception/blockchain-api | eea98fa78af2887cc84762f84532c602c3b8b666 | [
"Apache-2.0"
] | 11 | 2019-12-04T07:03:16.000Z | 2022-01-13T17:03:50.000Z | defmodule BlockchainAPI.Repo.Migrations.ChangePocReceiptsTable do
use Ecto.Migration
def change do
create_if_not_exists(unique_index("poc_receipts", ["poc_path_elements_id"], name: "unique_path_receipt"))
end
end
| 28 | 109 | 0.803571 |
336250f2342efb283e21b8f9463591567429410f | 71 | ex | Elixir | bleacher_fire/lib/bleacher_fire_web/views/page_view.ex | nyolamike/bleacher_fire | 4ec43b01d06b44c3e39200248f709400a1d60b70 | [
"Apache-2.0"
] | null | null | null | bleacher_fire/lib/bleacher_fire_web/views/page_view.ex | nyolamike/bleacher_fire | 4ec43b01d06b44c3e39200248f709400a1d60b70 | [
"Apache-2.0"
] | 1 | 2021-03-10T05:45:29.000Z | 2021-03-10T05:45:29.000Z | bleacher_fire/lib/bleacher_fire_web/views/page_view.ex | nyolamike/bleacher_fire | 4ec43b01d06b44c3e39200248f709400a1d60b70 | [
"Apache-2.0"
] | null | null | null | defmodule BleacherFireWeb.PageView do
use BleacherFireWeb, :view
end
| 17.75 | 37 | 0.830986 |
3362674e729278b6c4b7ac68459e3a94fab80d0a | 527 | ex | Elixir | lib/servy/conv.ex | lcr0815/pcw | 17b3b86059fa5e7fac41e28b2b54e4011491c3f9 | [
"MIT"
] | null | null | null | lib/servy/conv.ex | lcr0815/pcw | 17b3b86059fa5e7fac41e28b2b54e4011491c3f9 | [
"MIT"
] | null | null | null | lib/servy/conv.ex | lcr0815/pcw | 17b3b86059fa5e7fac41e28b2b54e4011491c3f9 | [
"MIT"
] | null | null | null | defmodule Servy.Conv do
defstruct method: "",
path: "",
params: %{},
headers: %{},
resp_content_type: "text/html",
response_body: "",
status: nil
def full_status(conv) do
"#{conv.status} #{status_reason(conv.status)}"
end
defp status_... | 20.269231 | 50 | 0.497154 |
33627f174b597b7ae85ca672fbc76a8b7ab0d4e1 | 292 | exs | Elixir | test/day_2/day_2_test.exs | hcru20/advent-of-code-2021 | 4cb764b5c6ef2b986214609f9cb8d240797196db | [
"MIT"
] | 1 | 2021-12-07T02:57:40.000Z | 2021-12-07T02:57:40.000Z | test/day_2/day_2_test.exs | hcru20/advent-of-code-2021 | 4cb764b5c6ef2b986214609f9cb8d240797196db | [
"MIT"
] | null | null | null | test/day_2/day_2_test.exs | hcru20/advent-of-code-2021 | 4cb764b5c6ef2b986214609f9cb8d240797196db | [
"MIT"
] | null | null | null | defmodule Day2Test do
use ExUnit.Case
doctest Day2
# analyze()
test "returns depth and forward changes in position" do
data = ["forward 5", "down 5", "forward 8", "up 3", "down 8", "forward 2"]
assert Day2.analyze(data, 0, 0) == %{ :forward => 15, :depth => 10 }
end
end
| 22.461538 | 78 | 0.619863 |
33628df10d21c76711b7f2c37d78b40eafb95f07 | 175 | exs | Elixir | test/algos_test.exs | aforward/algos | 3961dd8cc0749980cad8bf20581152616f6a5bd5 | [
"MIT"
] | null | null | null | test/algos_test.exs | aforward/algos | 3961dd8cc0749980cad8bf20581152616f6a5bd5 | [
"MIT"
] | null | null | null | test/algos_test.exs | aforward/algos | 3961dd8cc0749980cad8bf20581152616f6a5bd5 | [
"MIT"
] | null | null | null | defmodule AlgosTest do
use ExUnit.Case
doctest Algos
doctest Athlete
test "fib less than 0 isn't valid" do
catch_error do
Algos.fib!(-1)
end
end
end
| 13.461538 | 39 | 0.668571 |
3362955e8f13f3ed508656aa1aef11d6c33c4f13 | 2,747 | exs | Elixir | elixir/binary-search/binary_search_test.exs | macborowy/exercism | c5d45e074e81b946a82a340b2730e0d2732b7e0a | [
"MIT"
] | null | null | null | elixir/binary-search/binary_search_test.exs | macborowy/exercism | c5d45e074e81b946a82a340b2730e0d2732b7e0a | [
"MIT"
] | null | null | null | elixir/binary-search/binary_search_test.exs | macborowy/exercism | c5d45e074e81b946a82a340b2730e0d2732b7e0a | [
"MIT"
] | null | null | null | if !System.get_env("EXERCISM_TEST_EXAMPLES") do
Code.load_file("binary_search.exs")
end
ExUnit.start
ExUnit.configure exclude: :pending, trace: true
defmodule ChooseListTests do
use ExUnit.Case
test "when any of lists contains value should return empty list" do
assert BinarySearch.choose_list(%{lower: [{1,... | 27.47 | 104 | 0.660721 |
3362a9fea9d13fbd84eedf45ed58c93554c35096 | 1,819 | ex | Elixir | lib/codewar_web/telemetry.ex | hanam1ni/codewar-web | 0d7c46ac32d85b1d76c604226e0f3d6f2b76b0ad | [
"MIT"
] | 2 | 2021-06-29T02:22:28.000Z | 2022-02-15T06:32:15.000Z | lib/codewar_web/telemetry.ex | hanam1ni/codewar-web | 0d7c46ac32d85b1d76c604226e0f3d6f2b76b0ad | [
"MIT"
] | 14 | 2021-05-06T04:27:19.000Z | 2021-08-24T11:15:33.000Z | lib/codewar_web/telemetry.ex | hanam1ni/codewar-web | 0d7c46ac32d85b1d76c604226e0f3d6f2b76b0ad | [
"MIT"
] | 1 | 2021-08-20T07:50:19.000Z | 2021-08-20T07:50:19.000Z | defmodule CodewarWeb.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 ... | 32.482143 | 86 | 0.671798 |
3362d1150ec34bc88831eb8c4c61978ed477fe3e | 1,722 | ex | Elixir | lib/burnex.ex | kianmeng/burnex | bc9c475e43e60a2faf3240b1c101bde32d50e86f | [
"MIT"
] | null | null | null | lib/burnex.ex | kianmeng/burnex | bc9c475e43e60a2faf3240b1c101bde32d50e86f | [
"MIT"
] | null | null | null | lib/burnex.ex | kianmeng/burnex | bc9c475e43e60a2faf3240b1c101bde32d50e86f | [
"MIT"
] | null | null | null | defmodule Burnex do
@moduledoc """
Elixir burner email (temporary address) detector.
List from https://github.com/wesbos/burner-email-providers/blob/master/emails.txt
"""
@dialyzer {:nowarn_function, is_burner_domain?: 1}
@external_resource "priv/burner-email-providers/emails.txt"
@providers @external_... | 22.363636 | 83 | 0.578978 |
3362eed667f133384e38c7bf72ea83fa6093d0a6 | 273 | exs | Elixir | apps/re_web/.formatter.exs | ruby2elixir/emcasa-backend | 70d7f4f233555417941ffa6ada84cf8740c21dd2 | [
"MIT"
] | 4 | 2019-11-01T16:29:31.000Z | 2020-10-10T21:20:12.000Z | apps/re_web/.formatter.exs | eduardomartines/emcasa-backend | 70d7f4f233555417941ffa6ada84cf8740c21dd2 | [
"MIT"
] | null | null | null | apps/re_web/.formatter.exs | eduardomartines/emcasa-backend | 70d7f4f233555417941ffa6ada84cf8740c21dd2 | [
"MIT"
] | 5 | 2019-11-04T21:25:45.000Z | 2020-02-13T23:49:36.000Z | [
inputs: ["mix.exs", "lib/**/*.{ex,exs}", "test/**/*.{ex,exs}"],
locals_without_parens: [
field: 2,
field: 3,
pipe_through: 1,
forward: 3,
import_types: 1,
resolve: 1,
arg: 2,
config: 1,
config: 2,
trigger: 2,
enum: 2
]
]
| 16.058824 | 65 | 0.494505 |
336329a3e76875d8f4c7f9dd7282aacd519a2e52 | 297 | ex | Elixir | lib/k8s/application.ex | pedep/k8s | 7390339e1f7d9a773ef54a761552a33373b31e25 | [
"MIT"
] | null | null | null | lib/k8s/application.ex | pedep/k8s | 7390339e1f7d9a773ef54a761552a33373b31e25 | [
"MIT"
] | null | null | null | lib/k8s/application.ex | pedep/k8s | 7390339e1f7d9a773ef54a761552a33373b31e25 | [
"MIT"
] | null | null | null | # credo:disable-for-this-file
defmodule K8s.Application do
@moduledoc false
use Application
def start(_type, _args) do
children = [
{K8s.Middleware.Registry, []}
]
opts = [strategy: :one_for_one, name: K8s.Supervisor]
Supervisor.start_link(children, opts)
end
end
| 18.5625 | 57 | 0.683502 |
3363380ad89fe30525ebb2650da1fdb1e5b47db4 | 1,239 | exs | Elixir | mix.exs | marcelotto/behaviour_reflection | cd4d4a6c85e8c0420a8cf8ad7d1fa66cf4024b48 | [
"MIT"
] | 9 | 2020-05-12T00:50:03.000Z | 2021-09-09T21:27:28.000Z | mix.exs | marcelotto/behaviour_reflection | cd4d4a6c85e8c0420a8cf8ad7d1fa66cf4024b48 | [
"MIT"
] | null | null | null | mix.exs | marcelotto/behaviour_reflection | cd4d4a6c85e8c0420a8cf8ad7d1fa66cf4024b48 | [
"MIT"
] | null | null | null | defmodule BehaviourReflection.MixProject do
use Mix.Project
@repo_url "https://github.com/marcelotto/behaviour_reflection"
@version "0.1.0"
def project do
[
app: :behaviour_reflection,
version: @version,
elixir: "~> 1.8",
start_permanent: Mix.env() == :prod,
elixirc_paths: e... | 19.359375 | 64 | 0.565779 |
336372a8ab928f255400fbeaf3083fb8736e10ad | 3,207 | ex | Elixir | apps/andi/lib/andi_web/controllers/api/organization_controller.ex | msomji/smartcitiesdata | fc96abc1ef1306f7af6bd42bbcb4ed041a6d922c | [
"Apache-2.0"
] | null | null | null | apps/andi/lib/andi_web/controllers/api/organization_controller.ex | msomji/smartcitiesdata | fc96abc1ef1306f7af6bd42bbcb4ed041a6d922c | [
"Apache-2.0"
] | null | null | null | apps/andi/lib/andi_web/controllers/api/organization_controller.ex | msomji/smartcitiesdata | fc96abc1ef1306f7af6bd42bbcb4ed041a6d922c | [
"Apache-2.0"
] | null | null | null | defmodule AndiWeb.API.OrganizationController do
@moduledoc """
Creates new organizations and retrieves existing ones in ViewState.
"""
use AndiWeb, :controller
require Logger
alias SmartCity.Organization
alias Andi.InputSchemas.Organizations
alias Andi.Services.OrgStore
import SmartCity.Event, only: ... | 24.860465 | 83 | 0.606486 |
33638ec4d10897200260d9fe4ed4edbf44cd20a0 | 1,322 | ex | Elixir | lib/hierbautberlin_web/router.ex | gildesmarais/website-1 | 7a19bd98d06a064e52fa279e226002e9c3b986f0 | [
"MIT"
] | null | null | null | lib/hierbautberlin_web/router.ex | gildesmarais/website-1 | 7a19bd98d06a064e52fa279e226002e9c3b986f0 | [
"MIT"
] | null | null | null | lib/hierbautberlin_web/router.ex | gildesmarais/website-1 | 7a19bd98d06a064e52fa279e226002e9c3b986f0 | [
"MIT"
] | null | null | null | defmodule HierbautberlinWeb.Router do
use HierbautberlinWeb, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_live_flash
plug :put_root_layout, {HierbautberlinWeb.LayoutView, :root}
plug :protect_from_forgery
plug :put_secure_browser_headers
end
pipe... | 26.44 | 70 | 0.70348 |
3363a96765d51073170d568f140e67c81a4ab383 | 2,511 | exs | Elixir | apps/ewallet/test/ewallet/fetchers/uuid_fetcher_test.exs | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 322 | 2018-02-28T07:38:44.000Z | 2020-05-27T23:09:55.000Z | apps/ewallet/test/ewallet/fetchers/uuid_fetcher_test.exs | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 643 | 2018-02-28T12:05:20.000Z | 2020-05-22T08:34:38.000Z | apps/ewallet/test/ewallet/fetchers/uuid_fetcher_test.exs | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 63 | 2018-02-28T10:57:06.000Z | 2020-05-27T23:10:38.000Z | # Copyright 2018-2019 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 ... | 31.78481 | 81 | 0.670649 |
3363ab9de0bd10f0aa236971ad5fee6be6b94775 | 80 | exs | Elixir | test/web/views/layout_view_test.exs | lukkor/exlog | f2812d25e7712c41db5a9bf5bf3977255916c8e1 | [
"MIT"
] | null | null | null | test/web/views/layout_view_test.exs | lukkor/exlog | f2812d25e7712c41db5a9bf5bf3977255916c8e1 | [
"MIT"
] | null | null | null | test/web/views/layout_view_test.exs | lukkor/exlog | f2812d25e7712c41db5a9bf5bf3977255916c8e1 | [
"MIT"
] | null | null | null | defmodule Exlog.Web.LayoutViewTest do
use Exlog.Web.ConnCase, async: true
end
| 20 | 37 | 0.8 |
3363b559ce705f13297c513b366d2d152551163a | 592 | ex | Elixir | lib/type/metrics.ex | wses-yoshida/antikythera | e108e59d2339edd0b0fad31ad4f41f56df45be55 | [
"Apache-2.0"
] | null | null | null | lib/type/metrics.ex | wses-yoshida/antikythera | e108e59d2339edd0b0fad31ad4f41f56df45be55 | [
"Apache-2.0"
] | null | null | null | lib/type/metrics.ex | wses-yoshida/antikythera | e108e59d2339edd0b0fad31ad4f41f56df45be55 | [
"Apache-2.0"
] | null | null | null | # Copyright(c) 2015-2019 ACCESS CO., LTD. All rights reserved.
use Croma
defmodule Antikythera.Metrics.Data do
alias AntikytheraCore.Metrics.Buffer
alias AntikytheraCore.Metrics.AggregateStrategy, as: Strategy
@type t :: {String.t, Strategy.Name.t, Buffer.metrics_value}
defun valid?(v :: term) :: boolean do... | 29.6 | 79 | 0.6875 |
3363f3a3c6576f509356a461f767e2eb8aa7d077 | 11,270 | ex | Elixir | lib/arp_server/admin.ex | arpnetwork/arp_server | 4f3ed266ca68f7d6db5db6839067dd810079075a | [
"Apache-2.0"
] | 3 | 2018-07-23T01:50:50.000Z | 2018-08-13T13:12:05.000Z | lib/arp_server/admin.ex | arpnetwork/arp_server | 4f3ed266ca68f7d6db5db6839067dd810079075a | [
"Apache-2.0"
] | null | null | null | lib/arp_server/admin.ex | arpnetwork/arp_server | 4f3ed266ca68f7d6db5db6839067dd810079075a | [
"Apache-2.0"
] | null | null | null | defmodule ARP.Admin do
@moduledoc """
Admin service
"""
alias ARP.{
Account,
Config,
Contract,
Crypto,
DappManager,
DeviceManager,
Service,
Utils
}
require Logger
@status_stopped 0
@status_starting 1
@status_registering 2
@status_running 3
def init do
:ets.n... | 25.848624 | 101 | 0.56504 |
33642a51173d4789700de6313c8539b0d61e7d86 | 876 | ex | Elixir | lib/grovepi/supervisor.ex | asummers/grovepi | 8092fd704457265929e4d9676bedd8cf2176f48d | [
"Apache-2.0"
] | 34 | 2017-08-28T22:44:59.000Z | 2022-02-15T06:37:40.000Z | lib/grovepi/supervisor.ex | asummers/grovepi | 8092fd704457265929e4d9676bedd8cf2176f48d | [
"Apache-2.0"
] | 19 | 2017-08-14T17:27:44.000Z | 2019-05-26T02:49:39.000Z | lib/grovepi/supervisor.ex | asummers/grovepi | 8092fd704457265929e4d9676bedd8cf2176f48d | [
"Apache-2.0"
] | 5 | 2017-09-06T02:20:28.000Z | 2020-03-29T06:05:16.000Z | defmodule GrovePi.Supervisor do
@moduledoc """
This is the top level supervisor that is started by the grovepi application. You
can use this to start your own grovepi supervision tree by passing a prefix to the
`start_link` function.
```elixir
iex> GrovePi.Supervisor.start_link(0x04, MyPrefix)
... | 27.375 | 86 | 0.690639 |
336442a8008e67861c0e6f16e7d36650676a646c | 1,065 | ex | Elixir | test/support/conn_case.ex | Adsidera/findmeajob | 5a2df0267bd29b7fd55441f7dd1de21dcd4c13ea | [
"MIT"
] | 1 | 2021-07-31T16:28:53.000Z | 2021-07-31T16:28:53.000Z | test/support/conn_case.ex | Adsidera/findmeajob | 5a2df0267bd29b7fd55441f7dd1de21dcd4c13ea | [
"MIT"
] | null | null | null | test/support/conn_case.ex | Adsidera/findmeajob | 5a2df0267bd29b7fd55441f7dd1de21dcd4c13ea | [
"MIT"
] | null | null | null | defmodule FindmeajobWeb.ConnCase do
@moduledoc """
This module defines the test case to be used by
tests that require setting up a connection.
Such tests rely on `Phoenix.ConnTest` and also
import other functionality to make it easier
to build common data structures and query the data layer.
Finally, if... | 27.307692 | 72 | 0.722066 |
33644a9606ae0139b2f3508d9d4adbfc04d3a868 | 2,193 | ex | Elixir | lib/pg_ranges/numrange.ex | blockfi/pg_ranges | d61f51323169fb10706fe61d902dec4b3f42595b | [
"MIT"
] | null | null | null | lib/pg_ranges/numrange.ex | blockfi/pg_ranges | d61f51323169fb10706fe61d902dec4b3f42595b | [
"MIT"
] | null | null | null | lib/pg_ranges/numrange.ex | blockfi/pg_ranges | d61f51323169fb10706fe61d902dec4b3f42595b | [
"MIT"
] | null | null | null | defmodule PgRanges.NumRange do
@moduledoc """
Wraps a `Postgrex.Range` and casts to a PostgreSQL `numrange` type.
"""
use PgRanges
@type t :: %__MODULE__{
lower: float(),
lower_inclusive: boolean(),
upper: float(),
upper_inclusive: boolean()
}
@doc false
@... | 25.5 | 97 | 0.610123 |
3364705eabe7f7cb5db43ce515b58b996a8fc4dd | 115 | ex | Elixir | lib/hxl/ast/literal.ex | drowzy/hcl | afb65a3fe4c86d90ba02ab8402d99019bb6509bc | [
"Apache-2.0"
] | 18 | 2021-09-28T23:15:46.000Z | 2021-12-21T15:04:40.000Z | lib/hxl/ast/literal.ex | drowzy/hxl | afb65a3fe4c86d90ba02ab8402d99019bb6509bc | [
"Apache-2.0"
] | 4 | 2021-09-28T14:50:16.000Z | 2022-03-29T13:22:49.000Z | lib/hxl/ast/literal.ex | drowzy/hcl | afb65a3fe4c86d90ba02ab8402d99019bb6509bc | [
"Apache-2.0"
] | null | null | null | defmodule HXL.Ast.Literal do
@moduledoc false
defstruct [:value]
@type t :: %__MODULE__{value: term()}
end
| 14.375 | 39 | 0.686957 |
33647605fdb2368bb4b86b4f9a1cd92b8974f840 | 1,271 | ex | Elixir | web/lib/squitter_web/views/error_helpers.ex | electricshaman/squitter | 7a0dfbc125118b764d192f02b42b36596f6d4ac6 | [
"MIT"
] | 34 | 2017-08-30T02:29:41.000Z | 2021-05-29T20:21:43.000Z | web/lib/squitter_web/views/error_helpers.ex | electricshaman/squitter | 7a0dfbc125118b764d192f02b42b36596f6d4ac6 | [
"MIT"
] | 7 | 2017-09-12T05:27:23.000Z | 2020-01-06T22:07:52.000Z | web/lib/squitter_web/views/error_helpers.ex | electricshaman/squitter | 7a0dfbc125118b764d192f02b42b36596f6d4ac6 | [
"MIT"
] | 9 | 2017-09-11T22:17:55.000Z | 2022-01-31T03:07:58.000Z | defmodule Squitter.Web.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... | 31 | 78 | 0.670338 |
33648bc2659c9bb2a3d3aaefac8ba9da7b4adb47 | 264 | exs | Elixir | programming/elixir/simple_pay/priv/repo/migrations/20161006203440_create_user.exs | NomikOS/learning | 268f94605214f6861ef476ca7573e68c068ccbe5 | [
"Unlicense"
] | null | null | null | programming/elixir/simple_pay/priv/repo/migrations/20161006203440_create_user.exs | NomikOS/learning | 268f94605214f6861ef476ca7573e68c068ccbe5 | [
"Unlicense"
] | null | null | null | programming/elixir/simple_pay/priv/repo/migrations/20161006203440_create_user.exs | NomikOS/learning | 268f94605214f6861ef476ca7573e68c068ccbe5 | [
"Unlicense"
] | null | null | null | defmodule SimplePay.Repo.Migrations.CreateUser do
use Ecto.Migration
def change do
create table(:users) do
add :email, :string
add :password_hash, :string
timestamps()
end
create index(:users, [:email], unique: true)
end
end
| 17.6 | 49 | 0.662879 |
33648e4cf68c64eb3784d53ead9bfffbe573014c | 591 | ex | Elixir | misc/lib/application.ex | feihong/elixir-examples | dda6128f729199dad21220925df3bae241911fbd | [
"Apache-2.0"
] | null | null | null | misc/lib/application.ex | feihong/elixir-examples | dda6128f729199dad21220925df3bae241911fbd | [
"Apache-2.0"
] | null | null | null | misc/lib/application.ex | feihong/elixir-examples | dda6128f729199dad21220925df3bae241911fbd | [
"Apache-2.0"
] | null | null | null | defmodule Misc.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
# List all child processes to be supervised
children = [
# Starts a worker by calling: Hello.Worker.start_link(a... | 26.863636 | 64 | 0.700508 |
33649c7efdb45b435b1ac8bd942bf8f045ba412e | 860 | exs | Elixir | mix.exs | ScrimpyCat/LikeSanitizer | 12e11166fff66336c4cea1598139c035def3eb8a | [
"BSD-2-Clause"
] | null | null | null | mix.exs | ScrimpyCat/LikeSanitizer | 12e11166fff66336c4cea1598139c035def3eb8a | [
"BSD-2-Clause"
] | null | null | null | mix.exs | ScrimpyCat/LikeSanitizer | 12e11166fff66336c4cea1598139c035def3eb8a | [
"BSD-2-Clause"
] | null | null | null | defmodule LikeSanitizer.Mixfile do
use Mix.Project
def project do
[
app: :like_sanitizer,
description: "SQL-LIKE sanitization for strings.",
version: "0.1.0",
elixir: "~> 1.3",
start_permanent: Mix.env == :prod,
deps: deps(),
... | 25.294118 | 81 | 0.530233 |
3364fd4a2c67aa03be12afcc3992176f321c4c2b | 2,127 | ex | Elixir | clients/sheets/lib/google_api/sheets/v4/model/spreadsheet.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/sheets/lib/google_api/sheets/v4/model/spreadsheet.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/sheets/lib/google_api/sheets/v4/model/spreadsheet.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... | 36.672414 | 102 | 0.739539 |
33651131d9563e58ae30e88185eaf1f3e697cfb9 | 1,640 | exs | Elixir | ex_cubic_ods_ingestion/test/ex_cubic_ods_ingestion/oban_ingest_worker_error_test.exs | paulswartz/data_platform | 0d8a7d6a75026a68d0fa49777892e9edcbdaa71f | [
"MIT"
] | null | null | null | ex_cubic_ods_ingestion/test/ex_cubic_ods_ingestion/oban_ingest_worker_error_test.exs | paulswartz/data_platform | 0d8a7d6a75026a68d0fa49777892e9edcbdaa71f | [
"MIT"
] | 2 | 2022-03-10T22:29:35.000Z | 2022-03-18T19:52:27.000Z | ex_cubic_ods_ingestion/test/ex_cubic_ods_ingestion/oban_ingest_worker_error_test.exs | paulswartz/data_platform | 0d8a7d6a75026a68d0fa49777892e9edcbdaa71f | [
"MIT"
] | null | null | null | defmodule ExCubicOdsIngestion.Schema.ObanIngestWorkerErrorTest do
@moduledoc """
Test for ingest worker error handler.
"""
use ExCubicOdsIngestion.DataCase, async: true
alias ExCubicOdsIngestion.ObanIngestWorkerError
alias ExCubicOdsIngestion.Schema.CubicOdsLoad
setup do
table = Repo.insert!(MockEx... | 28.275862 | 97 | 0.622561 |
33651960ae30771bf4082b3b2187421eebb28ca7 | 5,547 | ex | Elixir | lib/algae/either.ex | jechol/algae | 82fb57df0961f905ad9dd2d944738695ad3b2a0b | [
"MIT"
] | null | null | null | lib/algae/either.ex | jechol/algae | 82fb57df0961f905ad9dd2d944738695ad3b2a0b | [
"MIT"
] | null | null | null | lib/algae/either.ex | jechol/algae | 82fb57df0961f905ad9dd2d944738695ad3b2a0b | [
"MIT"
] | null | null | null | defmodule Algae.Either do
@moduledoc ~S"""
Represent branching conditions. These could be different return types,
error vs nominal value, and so on.
## Examples
iex> require Integer
...>
...> even_odd = fn(value) ->
...> if Integer.is_even(value) do
...> Algae.Either.Right.... | 22.45749 | 94 | 0.621778 |
33656fe32fe6b25532be393d89a4e1318ce3f5a0 | 300 | ex | Elixir | apps/kafka_tasker/lib/kafka_tasker.ex | mpearson-11/kafka_es_cacher | 93be333029ca245411010ff77f1c4632ec49f8ca | [
"MIT"
] | null | null | null | apps/kafka_tasker/lib/kafka_tasker.ex | mpearson-11/kafka_es_cacher | 93be333029ca245411010ff77f1c4632ec49f8ca | [
"MIT"
] | null | null | null | apps/kafka_tasker/lib/kafka_tasker.ex | mpearson-11/kafka_es_cacher | 93be333029ca245411010ff77f1c4632ec49f8ca | [
"MIT"
] | null | null | null | defmodule KafkaTasker do
import Application
def start(_type, _args) do
import Supervisor.Spec
children = [
supervisor(KafkaConsumer.Supervisor, []),
]
opts = [strategy: :one_for_one, supervisor: KafkaTasker.Supervisor]
Supervisor.start_link(children, opts)
end
end
| 20 | 71 | 0.706667 |
336595b8f41fdba35e544b7ee56bc4abfddafe5c | 962 | exs | Elixir | test/cloak/fields/map_test.exs | tizpuppi/cloak | cdeae97c69f7c54aeadf0921db30dc411d7a9938 | [
"MIT"
] | null | null | null | test/cloak/fields/map_test.exs | tizpuppi/cloak | cdeae97c69f7c54aeadf0921db30dc411d7a9938 | [
"MIT"
] | null | null | null | test/cloak/fields/map_test.exs | tizpuppi/cloak | cdeae97c69f7c54aeadf0921db30dc411d7a9938 | [
"MIT"
] | null | null | null | defmodule Cloak.Fields.MapTest do
use ExUnit.Case
defmodule Field do
use Cloak.Fields.Map, vault: Cloak.TestVault
end
@map %{"key" => "value"}
test ".type is :binary" do
assert Field.type() == :binary
end
test ".cast rejects invalid types" do
assert :error = Field.cast("binary")
assert... | 24.05 | 75 | 0.635135 |
3365ab3b76d29e6f3f98597785c99a304b5721a3 | 235 | ex | Elixir | test/support/factory.ex | mijailr/CommentEX | 942749f3723c0fcca616b2e3459876b328a72411 | [
"MIT"
] | 1 | 2019-11-18T07:01:13.000Z | 2019-11-18T07:01:13.000Z | test/support/factory.ex | mijailr/CommentEX | 942749f3723c0fcca616b2e3459876b328a72411 | [
"MIT"
] | 4 | 2019-11-18T08:38:19.000Z | 2019-11-25T00:58:06.000Z | test/support/factory.ex | mijailr/CommentEX | 942749f3723c0fcca616b2e3459876b328a72411 | [
"MIT"
] | null | null | null | defmodule Comment.Factory do
@moduledoc """
The factories for the models in the application
"""
use ExMachina.Ecto, repo: Comment.Repo
alias Comment.Factory.{Installation, Repository}
use Installation
use Repository
end
| 21.363636 | 50 | 0.753191 |
3365b1357daf20c37163f6ff354bc5ee838a0478 | 16,622 | exs | Elixir | test/calendar_test.exs | enter-haken/postgrex | fb3438d4e6a56db81ddd0d578cdfc0484909c233 | [
"Apache-2.0"
] | null | null | null | test/calendar_test.exs | enter-haken/postgrex | fb3438d4e6a56db81ddd0d578cdfc0484909c233 | [
"Apache-2.0"
] | 1 | 2020-05-26T02:38:50.000Z | 2020-05-26T02:38:50.000Z | test/calendar_test.exs | enter-haken/postgrex | fb3438d4e6a56db81ddd0d578cdfc0484909c233 | [
"Apache-2.0"
] | null | null | null | defmodule CalendarTest do
use ExUnit.Case, async: true
import Postgrex.TestHelper
alias Postgrex, as: P
Postgrex.Types.define(Postgrex.InfiniteCalendarTypes, [], allow_infinite_timestamps: true)
setup do
opts = [database: "postgrex_test", backoff_type: :stop]
{:ok, pid} = P.start_link(opts)
{:ok... | 34.84696 | 149 | 0.457646 |
3365bfbbef9859ffdd76588da501a009f7f2a80a | 2,316 | ex | Elixir | apps/ewallet/lib/ewallet/fetchers/account_fetcher.ex | amadeobrands/ewallet | 505b7822721940a7b892a9b35c225e80cc8ac0b4 | [
"Apache-2.0"
] | 1 | 2018-12-07T06:21:21.000Z | 2018-12-07T06:21:21.000Z | apps/ewallet/lib/ewallet/fetchers/account_fetcher.ex | amadeobrands/ewallet | 505b7822721940a7b892a9b35c225e80cc8ac0b4 | [
"Apache-2.0"
] | null | null | null | apps/ewallet/lib/ewallet/fetchers/account_fetcher.ex | amadeobrands/ewallet | 505b7822721940a7b892a9b35c225e80cc8ac0b4 | [
"Apache-2.0"
] | null | null | null | defmodule EWallet.AccountFetcher do
@moduledoc """
Handles retrieval of accounts from params for transactions.
"""
alias EWallet.WalletFetcher
alias EWalletDB.{Account, Repo}
def fetch_exchange_account(
%{
"token_id" => _token_id
},
exchange
) do
{:ok, exchange}
... | 26.318182 | 100 | 0.608377 |
3365cc150635ea91bf684f6fba58a4e274b3e377 | 2,312 | ex | Elixir | lib/zero_phoenix_web/telemetry.ex | conradwt/zero-to-graphql-using-elixir | 1014681c5708e2ee02db6fb9b6f64cee0f533150 | [
"MIT"
] | 6 | 2021-12-15T13:29:04.000Z | 2022-01-23T14:13:03.000Z | lib/zero_phoenix_web/telemetry.ex | conradwt/zero-to-graphql-using-elixir | 1014681c5708e2ee02db6fb9b6f64cee0f533150 | [
"MIT"
] | null | null | null | lib/zero_phoenix_web/telemetry.ex | conradwt/zero-to-graphql-using-elixir | 1014681c5708e2ee02db6fb9b6f64cee0f533150 | [
"MIT"
] | null | null | null | defmodule ZeroPhoenixWeb.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. Le... | 32.111111 | 88 | 0.658304 |
3365d5974e5e771f89e8280f5fd2c454a9193e62 | 238 | ex | Elixir | lib/phone/es/na.ex | ajmath/phone | 0c7c7033ea93d028d3bd2a9e445d3aa93a6bc2fa | [
"Apache-2.0"
] | null | null | null | lib/phone/es/na.ex | ajmath/phone | 0c7c7033ea93d028d3bd2a9e445d3aa93a6bc2fa | [
"Apache-2.0"
] | null | null | null | lib/phone/es/na.ex | ajmath/phone | 0c7c7033ea93d028d3bd2a9e445d3aa93a6bc2fa | [
"Apache-2.0"
] | null | null | null | defmodule Phone.ES.NA do
@moduledoc false
use Helper.Area
def regex, do: ~r/^(34)(948|848)(.{6})/
def area_name, do: "Navarra"
def area_type, do: "province"
def area_abbreviation, do: "NA"
matcher(["34948", "34848"])
end
| 18.307692 | 41 | 0.647059 |
3366692198ddc11ef0186671f210da1614f06d5e | 574 | ex | Elixir | lib/shortly_web/router.ex | abratashov/shortly | 39dbf813f0cf643525b9038adb39764466e75d5e | [
"MIT"
] | null | null | null | lib/shortly_web/router.ex | abratashov/shortly | 39dbf813f0cf643525b9038adb39764466e75d5e | [
"MIT"
] | null | null | null | lib/shortly_web/router.ex | abratashov/shortly | 39dbf813f0cf643525b9038adb39764466e75d5e | [
"MIT"
] | null | null | null | defmodule ShortlyWeb.Router do
use ShortlyWeb, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
end
pipeline :api do
plug :accepts, ["json"]
end
scope "/", ShortlyWeb do
pipe_... | 19.133333 | 44 | 0.674216 |
336672609539543e71012544eed8f59c0da96c6e | 643 | ex | Elixir | lib/grpc_health_checker/handler.ex | hiveetoolkit/grpc-health-checker | b4067dc9fcb2ccefad5e3b1bf5fd40995c069631 | [
"MIT"
] | 1 | 2019-09-04T07:25:09.000Z | 2019-09-04T07:25:09.000Z | lib/grpc_health_checker/handler.ex | hiveetoolkit/grpc-health-checker | b4067dc9fcb2ccefad5e3b1bf5fd40995c069631 | [
"MIT"
] | null | null | null | lib/grpc_health_checker/handler.ex | hiveetoolkit/grpc-health-checker | b4067dc9fcb2ccefad5e3b1bf5fd40995c069631 | [
"MIT"
] | 1 | 2021-02-22T06:27:57.000Z | 2021-02-22T06:27:57.000Z | defmodule GrpcHealthChecker.Handler do
@moduledoc false
@behaviour :cowboy_handler
alias GrpcHealthChecker.Health
# API
def init(request, state) do
method = :cowboy_req.method(request)
handle(method, request, state)
end
def handle("GET", request, state) do
request = gen_response(request)
... | 20.09375 | 58 | 0.692068 |
3366949f66ae375199470ee18f24060639361bde | 827 | ex | Elixir | lib/vex/validator/source.ex | Apelsinka223/vex | dfd399724f7950d91fe6d894bb5a02e3d27bfa24 | [
"MIT"
] | null | null | null | lib/vex/validator/source.ex | Apelsinka223/vex | dfd399724f7950d91fe6d894bb5a02e3d27bfa24 | [
"MIT"
] | null | null | null | lib/vex/validator/source.ex | Apelsinka223/vex | dfd399724f7950d91fe6d894bb5a02e3d27bfa24 | [
"MIT"
] | null | null | null | defprotocol Vex.Validator.Source do
def lookup(source, name)
end
defimpl Vex.Validator.Source, for: Atom do
import Macro, only: [camelize: 1]
def lookup(source, name) do
validator_by_function(source, name) || validator_by_structure(source, name)
end
defp validator_by_function(source, name) do
Co... | 19.690476 | 79 | 0.718259 |
3366a4d483d2e7363f91432fca3bc8b8f8f890bc | 2,509 | exs | Elixir | test/bootloader_test.exs | nerves-project-attic/bootloader | 685ddff0641ee9287c8725bade822f9b5587b5a1 | [
"Apache-2.0"
] | 10 | 2017-06-13T00:20:01.000Z | 2019-08-02T13:52:51.000Z | test/bootloader_test.exs | nerves-project-attic/bootloader | 685ddff0641ee9287c8725bade822f9b5587b5a1 | [
"Apache-2.0"
] | 6 | 2017-06-12T18:49:21.000Z | 2017-09-20T16:31:26.000Z | test/bootloader_test.exs | mobileoverlord/bootloader | 685ddff0641ee9287c8725bade822f9b5587b5a1 | [
"Apache-2.0"
] | 1 | 2021-01-10T01:09:45.000Z | 2021-01-10T01:09:45.000Z | Code.require_file("test/mix_test_helper.exs")
defmodule BootloaderTest do
use Bootloader.TestCase, async: false
doctest Bootloader
import MixTestHelper
@simple_app_path Path.join([File.cwd!, "test", "fixtures", "simple_app"])
defmacrop with_simple_app(body) do
quote do
old_dir = File.cwd!
... | 26.691489 | 143 | 0.587485 |
3366f9c5cead5e893a54777f7b2363988ce48d9d | 2,229 | ex | Elixir | db_server/lib/db_server_web/controllers/controller_helpers.ex | Graveyardillon/db_server | ce5a5884d7d1f0eacb3c5cc27066203424594cf4 | [
"MIT"
] | null | null | null | db_server/lib/db_server_web/controllers/controller_helpers.ex | Graveyardillon/db_server | ce5a5884d7d1f0eacb3c5cc27066203424594cf4 | [
"MIT"
] | null | null | null | db_server/lib/db_server_web/controllers/controller_helpers.ex | Graveyardillon/db_server | ce5a5884d7d1f0eacb3c5cc27066203424594cf4 | [
"MIT"
] | null | null | null | defmodule DbServerWeb.ControllerHelpers do
import Plug.Conn
import Phoenix.Controller
alias DbServerWeb.Router.Helpers, as: Routes
def creation_failed(conn, %Ecto.Changeset{} = changeset) do
errors = translate_errors(changeset)
render_error(conn, 501, errors: errors)
end
def creation_failed(conn,... | 26.855422 | 77 | 0.617317 |
336709ac08a677bcaef108850af78c4ae36db934 | 2,362 | exs | Elixir | spec/lib/validators/each_spec.exs | gmartsenkov/gate | 67a1d9a3b0c0515312b49e9a110cb00ebc46d402 | [
"MIT"
] | 3 | 2019-11-04T21:40:10.000Z | 2021-12-22T11:25:37.000Z | spec/lib/validators/each_spec.exs | gmartsenkov/gate | 67a1d9a3b0c0515312b49e9a110cb00ebc46d402 | [
"MIT"
] | null | null | null | spec/lib/validators/each_spec.exs | gmartsenkov/gate | 67a1d9a3b0c0515312b49e9a110cb00ebc46d402 | [
"MIT"
] | null | null | null | defmodule Gate.Validators.EachSpec do
use ESpec
use Gate.Validators.Each
use Gate.Validators.Type
use Gate.Validators.Generic
describe "each" do
context "when the value is not a list" do
it "returns the correct error" do
expect(validate(1, {:each, :int}))
|> to(eq ("Value is not a list"))
e... | 25.673913 | 72 | 0.582134 |
33670e78bea601e019604058138c7728cba44357 | 424 | ex | Elixir | lib/bracketeer_web/views/match_view.ex | caromo/bracketeer | 93b4fcaed0e4f6e83c49af6b3ed2573e3b44fac0 | [
"MIT"
] | 1 | 2019-06-20T20:29:10.000Z | 2019-06-20T20:29:10.000Z | lib/bracketeer_web/views/match_view.ex | caromo/bracketeer | 93b4fcaed0e4f6e83c49af6b3ed2573e3b44fac0 | [
"MIT"
] | 3 | 2020-07-16T23:11:31.000Z | 2021-05-08T14:44:21.000Z | lib/bracketeer_web/views/match_view.ex | caromo/bracketeer | 93b4fcaed0e4f6e83c49af6b3ed2573e3b44fac0 | [
"MIT"
] | null | null | null | defmodule BracketeerWeb.MatchView do
use BracketeerWeb, :view
alias BracketeerWeb.MatchView
def render("index.json", %{matches: matches}) do
%{data: render_many(matches, MatchView, "match.json")}
end
def render("show.json", %{match: match}) do
%{data: render_one(match, MatchView, "match.json")}
en... | 23.555556 | 58 | 0.669811 |
33673801e6884a6b2d7ba5422b4d22923363da0f | 2,969 | ex | Elixir | lib/bootstrap_form/input.ex | feliperenan/bootstrap_form | a12d0665973687bfefeee499f8581398a25ccf75 | [
"MIT"
] | 6 | 2019-02-07T00:37:24.000Z | 2021-05-29T23:37:32.000Z | lib/bootstrap_form/input.ex | feliperenan/bootstrap_form | a12d0665973687bfefeee499f8581398a25ccf75 | [
"MIT"
] | 7 | 2019-02-07T00:19:39.000Z | 2019-11-04T17:01:50.000Z | lib/bootstrap_form/input.ex | feliperenan/bootstrap_form | a12d0665973687bfefeee499f8581398a25ccf75 | [
"MIT"
] | 3 | 2019-10-30T13:49:44.000Z | 2021-09-26T23:45:02.000Z | defmodule BootstrapForm.Input do
@moduledoc false
defstruct errors: [],
hint: nil,
label_text: nil,
options: [],
value: nil,
values: nil,
wrapper_options: []
@type t :: %__MODULE__{}
@doc """
Setup a `BootstrapForm.Input` according to ... | 32.988889 | 111 | 0.681711 |
33675108781709e36777a0731f7bebbacc721dca | 8,443 | exs | Elixir | test/mix/tasks/phx.gen.schema_test.exs | raspo/phoenix | 438b74255e7a4d68b4eaf1a295d0fcd201c71421 | [
"MIT"
] | null | null | null | test/mix/tasks/phx.gen.schema_test.exs | raspo/phoenix | 438b74255e7a4d68b4eaf1a295d0fcd201c71421 | [
"MIT"
] | null | null | null | test/mix/tasks/phx.gen.schema_test.exs | raspo/phoenix | 438b74255e7a4d68b4eaf1a295d0fcd201c71421 | [
"MIT"
] | null | null | null | Code.require_file "../../../installer/test/mix_helper.exs", __DIR__
defmodule Phoenix.DupSchema do
end
defmodule Mix.Tasks.Phx.Gen.SchemaTest do
use ExUnit.Case
import MixHelper
alias Mix.Tasks.Phx.Gen
alias Mix.Phoenix.Schema
setup do
Mix.Task.clear()
:ok
end
test "build" do
in_tmp_projec... | 34.044355 | 131 | 0.64894 |
33675783a958f84958c26bc09630e4a72d3f2a11 | 69 | ex | Elixir | lib/sbom_poc_web/views/user_settings_view.ex | TraceyOnim/SbomPoc-sFractal | bac895a7eda61c47c00b8bbe682a6fda4dd7255c | [
"MIT"
] | 2 | 2020-10-04T12:41:58.000Z | 2021-03-11T20:51:26.000Z | lib/sbom_poc_web/views/user_settings_view.ex | TraceyOnim/SbomPoc-sFractal | bac895a7eda61c47c00b8bbe682a6fda4dd7255c | [
"MIT"
] | 113 | 2020-07-25T02:29:33.000Z | 2022-03-01T01:07:23.000Z | lib/sbom_poc_web/views/user_settings_view.ex | TraceyOnim/SbomPoc-sFractal | bac895a7eda61c47c00b8bbe682a6fda4dd7255c | [
"MIT"
] | 5 | 2020-07-10T09:57:58.000Z | 2021-03-11T20:51:29.000Z | defmodule SbomPocWeb.UserSettingsView do
use SbomPocWeb, :view
end
| 17.25 | 40 | 0.826087 |
336764c75452637f7ae1b323a1c02efa97138b64 | 1,446 | ex | Elixir | installer/templates/phx_ecto/data_case.ex | faheempatel/phoenix | a83318f2a2284b7ab29b0b86cdd9d2e1f4d0a7c9 | [
"MIT"
] | 18,092 | 2015-01-01T01:51:04.000Z | 2022-03-31T19:37:14.000Z | installer/templates/phx_ecto/data_case.ex | faheempatel/phoenix | a83318f2a2284b7ab29b0b86cdd9d2e1f4d0a7c9 | [
"MIT"
] | 3,905 | 2015-01-01T00:22:47.000Z | 2022-03-31T17:06:21.000Z | installer/templates/phx_ecto/data_case.ex | faheempatel/phoenix | a83318f2a2284b7ab29b0b86cdd9d2e1f4d0a7c9 | [
"MIT"
] | 3,205 | 2015-01-03T10:58:22.000Z | 2022-03-30T14:55:57.000Z | defmodule <%= @app_module %>.DataCase do
@moduledoc """
This module defines the setup for tests requiring
access to the application's data layer.
You may define functions here to be used as helpers in
your tests.
Finally, if the test case interacts with the database,
we enable the SQL sandbox, so change... | 28.352941 | 77 | 0.678423 |
336768701efdcb41d1b56963c8e4d2a8b7757d5e | 144 | ex | Elixir | lib/zerobs_stack/http.ex | zero-bullshit-engineering/zerobs_stack | eb2d54b5b2cf6f4df8fd27024e47338c11cbf17b | [
"MIT"
] | null | null | null | lib/zerobs_stack/http.ex | zero-bullshit-engineering/zerobs_stack | eb2d54b5b2cf6f4df8fd27024e47338c11cbf17b | [
"MIT"
] | null | null | null | lib/zerobs_stack/http.ex | zero-bullshit-engineering/zerobs_stack | eb2d54b5b2cf6f4df8fd27024e47338c11cbf17b | [
"MIT"
] | 1 | 2019-12-26T21:21:18.000Z | 2019-12-26T21:21:18.000Z | defmodule ZerobsStack.HTTP do
defmacro __using__(_) do
quote do
use Tesla
plug(Tesla.Middleware.Telemetry)
end
end
end
| 14.4 | 38 | 0.680556 |
336780d8d92e82010352a944c6d9f3b2df571092 | 1,303 | ex | Elixir | clients/tool_results/lib/google_api/tool_results/v1/model/launcher_activity_not_found.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/tool_results/lib/google_api/tool_results/v1/model/launcher_activity_not_found.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/tool_results/lib/google_api/tool_results/v1/model/launcher_activity_not_found.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... | 31.02381 | 87 | 0.76746 |
33679dd9423a7129756412d5b25f2ddf793fd251 | 289 | ex | Elixir | codefights/elixir/late_ride/code.ex | lowks/levelup | 805e48cbf33d48616f55ef1b3740bb15b548054d | [
"MIT"
] | null | null | null | codefights/elixir/late_ride/code.ex | lowks/levelup | 805e48cbf33d48616f55ef1b3740bb15b548054d | [
"MIT"
] | 39 | 2018-04-15T12:36:36.000Z | 2018-09-16T15:31:50.000Z | codefights/elixir/late_ride/code.ex | lowks/levelup | 805e48cbf33d48616f55ef1b3740bb15b548054d | [
"MIT"
] | null | null | null | def lateRide(n) do
[{h,_}|m] = [n/60|> Float.to_string |> Integer.parse(10)|rem(n, 60)]
h_list = Integer.to_string(h)|> String.codepoints
m_list = Integer.to_string(m)|> String.codepoints
h_list ++ m_list |> Enum.reduce(0, fn(x, acc) -> String.to_integer(x) + acc end)
end
| 41.285714 | 84 | 0.647059 |
33679fad711dcf7bf3e1763d7f91e8885f827771 | 3,632 | exs | Elixir | test/functional/scanner/line_type_fn_test.exs | brianbroderick/monocle | eeabecea658468479c04a02352271f6304447736 | [
"Apache-2.0"
] | 2 | 2018-02-11T01:18:24.000Z | 2020-01-12T17:19:22.000Z | test/functional/scanner/line_type_fn_test.exs | brianbroderick/monocle | eeabecea658468479c04a02352271f6304447736 | [
"Apache-2.0"
] | null | null | null | test/functional/scanner/line_type_fn_test.exs | brianbroderick/monocle | eeabecea658468479c04a02352271f6304447736 | [
"Apache-2.0"
] | null | null | null | defmodule Functional.Scanner.LineTypeFnTest do
use ExUnit.Case
alias Monocle.Line
id1 = ~S{[ID1]: http://example.com "The title"}
id2 = ~S{[ID2]: http://example.com 'The title'}
id3 = ~S{[ID3]: http://example.com (The title)}
id4 = ~S{[ID4]: http://example.com}
id5 = ~S{[ID5]: <http://example.com> "... | 42.729412 | 106 | 0.512665 |
3367e858591b30915cad17985d8d1cb2d8f16beb | 2,160 | ex | Elixir | elixir/lib/homework_web/resolvers/transactions_resolver.ex | XanderHarris/web-homework | d0b5c2bbbd055341d51f02f824a2020188f6c094 | [
"MIT"
] | null | null | null | elixir/lib/homework_web/resolvers/transactions_resolver.ex | XanderHarris/web-homework | d0b5c2bbbd055341d51f02f824a2020188f6c094 | [
"MIT"
] | null | null | null | elixir/lib/homework_web/resolvers/transactions_resolver.ex | XanderHarris/web-homework | d0b5c2bbbd055341d51f02f824a2020188f6c094 | [
"MIT"
] | null | null | null | defmodule HomeworkWeb.Resolvers.TransactionsResolver do
alias Homework.Merchants
alias Homework.Transactions
alias Homework.Users
alias Homework.Companies
@doc """
Get a list of transactions
"""
def transactions(_root, args, _info) do
{:ok, Transactions.list_transactions(args)}
end
@doc """
... | 25.411765 | 79 | 0.670833 |
3367f7712bd4cb0acbe060d1a52c5c8f6fdac2e9 | 1,895 | exs | Elixir | test/kaffe/consumer_group/subscriber/group_member_startup_test.exs | marinakr/kaffe | 7abc5a85f28e770fd077854c975afef9894a8768 | [
"MIT"
] | null | null | null | test/kaffe/consumer_group/subscriber/group_member_startup_test.exs | marinakr/kaffe | 7abc5a85f28e770fd077854c975afef9894a8768 | [
"MIT"
] | null | null | null | test/kaffe/consumer_group/subscriber/group_member_startup_test.exs | marinakr/kaffe | 7abc5a85f28e770fd077854c975afef9894a8768 | [
"MIT"
] | null | null | null | defmodule Kaffe.GroupMemberStartupTest do
@moduledoc """
First setup a topic as described in the README.
"""
use ExUnit.Case
@moduletag :e2e
defmodule TestSubscriber do
def subscribe(subscriber_name, _group_coordinator_pid, _worker_pid, _gen_id, topic, partition, _ops) do
send(:test_case, {:sub... | 30.079365 | 107 | 0.64591 |
3368195126aaf0ca14ac1b5a7034920eb785a339 | 34,151 | ex | Elixir | lib/redix.ex | keathley/redix | b87e786ca269a4cacd0c8511e6f32c3784e64bec | [
"MIT"
] | null | null | null | lib/redix.ex | keathley/redix | b87e786ca269a4cacd0c8511e6f32c3784e64bec | [
"MIT"
] | null | null | null | lib/redix.ex | keathley/redix | b87e786ca269a4cacd0c8511e6f32c3784e64bec | [
"MIT"
] | null | null | null | defmodule Redix do
@moduledoc """
This module provides the main API to interface with Redis.
## Overview
`start_link/2` starts a process that connects to Redis. Each Elixir process
started with this function maps to a client TCP connection to the specified
Redis server.
The architecture is very simple:... | 40.272406 | 118 | 0.682147 |
33681fcc1396064fd8414eebe57923b1092e79d3 | 1,031 | ex | Elixir | lib/fiber/application.ex | Union-Chat/Nerve | e0e6668c5783f21d5b310254b6938b56c1f1b177 | [
"MIT"
] | null | null | null | lib/fiber/application.ex | Union-Chat/Nerve | e0e6668c5783f21d5b310254b6938b56c1f1b177 | [
"MIT"
] | null | null | null | lib/fiber/application.ex | Union-Chat/Nerve | e0e6668c5783f21d5b310254b6938b56c1f1b177 | [
"MIT"
] | null | null | null | defmodule Fiber.Application do
@moduledoc """
Supervisor responsible of Fiber worker management
"""
use Application
require Logger
def start(_type, _args) do
import Supervisor.Spec
Logger.info "Starting Fiber version #{Fiber.version}"
hash = :crypto.hash(
:sha,
:os.s... | 23.431818 | 99 | 0.57711 |
33684673d236a10c692899913b278a4429904d79 | 751 | exs | Elixir | mix.exs | machine-manager/chronocache | d4741cbd6efec548846aada11afc159562cb02fe | [
"MIT"
] | null | null | null | mix.exs | machine-manager/chronocache | d4741cbd6efec548846aada11afc159562cb02fe | [
"MIT"
] | null | null | null | mix.exs | machine-manager/chronocache | d4741cbd6efec548846aada11afc159562cb02fe | [
"MIT"
] | null | null | null | defmodule ChronoCache.Mixfile do
use Mix.Project
def project do
[
app: :chronocache,
version: "1.0.0",
elixir: "~> 1.6",
description: "A simple in-memory cache with minimum freshness checks, backed by ETS",
package: [
maintainers: ["ivan"],
licenses: ["MIT"],
... | 24.225806 | 91 | 0.581891 |
33685d24f208aec822f6d2c561a302aa2695541e | 1,826 | ex | Elixir | lib/app_web/channels/user_socket.ex | vsyrovat/inn-checker | 03cb3f282af598c7d62ea96c483540edead4ba1e | [
"MIT"
] | null | null | null | lib/app_web/channels/user_socket.ex | vsyrovat/inn-checker | 03cb3f282af598c7d62ea96c483540edead4ba1e | [
"MIT"
] | null | null | null | lib/app_web/channels/user_socket.ex | vsyrovat/inn-checker | 03cb3f282af598c7d62ea96c483540edead4ba1e | [
"MIT"
] | null | null | null | defmodule AppWeb.UserSocket do
use Phoenix.Socket
## Channels
channel "inn:main", AppWeb.MainChannel
# Socket params are passed from the client and can
# be used to verify and authenticate a user. After
# verification, you can put default assigns into
# the socket that will be set for all channels, ie
... | 33.2 | 110 | 0.705915 |
336883c34b1e54f811a6f0433464aba2f7f68bc2 | 586 | ex | Elixir | priv/catalogue/your_bot_web/example02.ex | ConnorRigby/yourbot | eea40e63b0f93963ed14b7efab9ecbe898ab11dd | [
"Apache-2.0"
] | 3 | 2021-11-08T15:19:19.000Z | 2021-11-11T03:18:35.000Z | priv/catalogue/your_bot_web/example02.ex | ConnorRigby/yourbot | eea40e63b0f93963ed14b7efab9ecbe898ab11dd | [
"Apache-2.0"
] | null | null | null | priv/catalogue/your_bot_web/example02.ex | ConnorRigby/yourbot | eea40e63b0f93963ed14b7efab9ecbe898ab11dd | [
"Apache-2.0"
] | null | null | null | defmodule YourBotWeb.Components.Hero.Example02 do
@moduledoc """
Example using the `color` property.
"""
use Surface.Catalogue.Example,
subject: YourBotWeb.Components.Hero,
height: "700px",
title: "Colors"
alias YourBotWeb.Components.Hero
def render(assigns) do
~F"""
<Hero
name=... | 17.757576 | 49 | 0.583618 |
33689585da9405dafe1a4815852814fa4bec3fc1 | 11,780 | ex | Elixir | lib/integrate/claims.ex | integratedb/core | 0b4a7a38d014e5ae973a1fa807c137834dfdf9cb | [
"MIT"
] | 13 | 2021-01-28T14:45:43.000Z | 2021-11-04T21:54:19.000Z | lib/integrate/claims.ex | integratedb/integrate | 0b4a7a38d014e5ae973a1fa807c137834dfdf9cb | [
"MIT"
] | null | null | null | lib/integrate/claims.ex | integratedb/integrate | 0b4a7a38d014e5ae973a1fa807c137834dfdf9cb | [
"MIT"
] | null | null | null | defmodule Integrate.Claims do
@moduledoc """
The Claims context.
"""
import Ecto.Query, warn: false
alias Integrate.Repo
alias Integrate.Specification.Spec
alias Integrate.Claims.Claim
@doc """
Returns the list of claims.
## Examples
iex> list_claims()
[%Claim{}, ...]
"""
def l... | 20.666667 | 91 | 0.622835 |
3368aefcc9c4d813beccd2f8bb76814dff8c44a0 | 815 | exs | Elixir | exercises/concept/german-sysadmin/test/username_test.exs | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | null | null | null | exercises/concept/german-sysadmin/test/username_test.exs | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 9 | 2021-09-12T15:19:06.000Z | 2022-03-30T22:24:24.000Z | exercises/concept/german-sysadmin/test/username_test.exs | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | null | null | null | defmodule UsernameTest do
use ExUnit.Case
describe "sanitize/1" do
@tag task_id: 1
test "works for an empty charlist" do
assert Username.sanitize('') == ''
end
@tag task_id: 1
test "it keeps lowercase latin letters" do
input = Enum.to_list(0..0x10FFFF) -- [?_, ?ß, ?ä, ?ö, ?ü]
... | 27.166667 | 69 | 0.639264 |
3368c738aad92615eec862c785937249a2fbf94f | 5,277 | ex | Elixir | lib/epi_contacts/commcare/client.ex | RatioPBC/epi-contacts | 6c43eea52cbfe2097f48b02e3d0c8fce3b46f1ee | [
"Apache-2.0"
] | null | null | null | lib/epi_contacts/commcare/client.ex | RatioPBC/epi-contacts | 6c43eea52cbfe2097f48b02e3d0c8fce3b46f1ee | [
"Apache-2.0"
] | 13 | 2021-06-29T04:35:41.000Z | 2022-02-09T04:25:39.000Z | lib/epi_contacts/commcare/client.ex | RatioPBC/epi-contacts | 6c43eea52cbfe2097f48b02e3d0c8fce3b46f1ee | [
"Apache-2.0"
] | null | null | null | defmodule EpiContacts.Commcare.ClientBehaviour do
@moduledoc """
this module defines the Commcare Client Behaviour
"""
@callback get_case(domain :: String.t(), case_id :: String.t()) :: {:ok, map()} | {:error, atom()}
@callback update_properties!(domain :: String.t(), case_id :: String.t(), properties :: keyw... | 38.23913 | 111 | 0.671594 |
3368d2960a604cefbc670e9408d83faf2e1ccb0f | 1,983 | ex | Elixir | clients/dataflow/lib/google_api/dataflow/v1b3/model/sdk_harness_container_image.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/dataflow/lib/google_api/dataflow/v1b3/model/sdk_harness_container_image.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/dataflow/lib/google_api/dataflow/v1b3/model/sdk_harness_container_image.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... | 39.66 | 371 | 0.753908 |
3368e4092fd216d2d53f5fb4b7b56b6479e24580 | 49 | exs | Elixir | elixir/10.exs | merxer/kata | 5dbbca8b4173029f9311398148de9437a329cf9a | [
"MIT"
] | null | null | null | elixir/10.exs | merxer/kata | 5dbbca8b4173029f9311398148de9437a329cf9a | [
"MIT"
] | null | null | null | elixir/10.exs | merxer/kata | 5dbbca8b4173029f9311398148de9437a329cf9a | [
"MIT"
] | null | null | null | a = 1
IO.puts a
[1, a, 3] = [1, 2, 3]
IO.puts a
| 8.166667 | 21 | 0.44898 |
3368f53fd54e4c715320c7b946ac80f4671f894b | 856 | exs | Elixir | events/apps/daniel_web/config/config.exs | MrCeleryman/elixirtute | 797e3cb29a68a54728258329b49ac4ae0787cc76 | [
"MIT"
] | null | null | null | events/apps/daniel_web/config/config.exs | MrCeleryman/elixirtute | 797e3cb29a68a54728258329b49ac4ae0787cc76 | [
"MIT"
] | null | null | null | events/apps/daniel_web/config/config.exs | MrCeleryman/elixirtute | 797e3cb29a68a54728258329b49ac4ae0787cc76 | [
"MIT"
] | null | null | null | # 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.
use Mix.Config
# Configures the endpoint
config :daniel_web, DanielWeb.Endpoint,
url: [host: "loca... | 35.666667 | 86 | 0.764019 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.