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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3ffe12e53a6ac4770ef8c184be332775775ac44c | 1,999 | ex | Elixir | clients/display_video/lib/google_api/display_video/v1/model/sensitive_category_assigned_targeting_option_details.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/display_video/lib/google_api/display_video/v1/model/sensitive_category_assigned_targeting_option_details.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/display_video/lib/google_api/display_video/v1/model/sensitive_category_assigned_targeting_option_details.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... | 36.345455 | 187 | 0.758879 |
3ffe178ea1ae86a8b89d66fd597e65dfb78ade45 | 1,437 | exs | Elixir | apps/firestorm_data/test/firestorm_data/commands/view_thread_test.exs | CircleCI-Public/firestorm | 9ca2c46a2b2377370347ad94d6003eeb77be38d6 | [
"MIT"
] | 10 | 2017-06-28T08:06:52.000Z | 2022-03-19T17:49:21.000Z | apps/firestorm_data/test/firestorm_data/commands/view_thread_test.exs | CircleCI-Public/firestorm | 9ca2c46a2b2377370347ad94d6003eeb77be38d6 | [
"MIT"
] | null | null | null | apps/firestorm_data/test/firestorm_data/commands/view_thread_test.exs | CircleCI-Public/firestorm | 9ca2c46a2b2377370347ad94d6003eeb77be38d6 | [
"MIT"
] | 2 | 2017-10-21T12:01:02.000Z | 2021-01-29T10:26:22.000Z | defmodule FirestormData.Commands.ViewThreadTest do
use FirestormData.UnitCase
alias FirestormData.Commands.{CreateCategory, CreateThread, ViewThread}
alias FirestormData.{Thread, User, Repo, Viewable}
setup do
:ok = Ecto.Adapters.SQL.Sandbox.checkout(Repo)
end
describe "viewing a thread" do
setup ... | 28.176471 | 119 | 0.691023 |
3ffe2829f6bad49f87b8b4ae396e0da6c8dc3a7a | 449 | exs | Elixir | priv/repo/migrations/20211018195413_create_communities.exs | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | 1 | 2022-03-17T20:35:47.000Z | 2022-03-17T20:35:47.000Z | priv/repo/migrations/20211018195413_create_communities.exs | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | 9 | 2021-11-02T16:52:09.000Z | 2022-03-25T15:14:01.000Z | priv/repo/migrations/20211018195413_create_communities.exs | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | null | null | null | defmodule Oli.Repo.Migrations.CreateCommunities do
use Ecto.Migration
def change do
create table(:communities) do
add :name, :string, null: false
add :description, :text
add :key_contact, :string
add :global_access, :boolean, default: true, null: false
add :status, :string, defaul... | 24.944444 | 62 | 0.674833 |
3ffe38b0e7c354d7c27529a73f73600788496d7a | 1,519 | exs | Elixir | exercises/change/change_test.exs | Triangle-Elixir/xelixir | 08d23bf47f57799f286567cb26f635291de2fde5 | [
"MIT"
] | 1 | 2021-08-16T20:24:14.000Z | 2021-08-16T20:24:14.000Z | exercises/change/change_test.exs | Triangle-Elixir/xelixir | 08d23bf47f57799f286567cb26f635291de2fde5 | [
"MIT"
] | null | null | null | exercises/change/change_test.exs | Triangle-Elixir/xelixir | 08d23bf47f57799f286567cb26f635291de2fde5 | [
"MIT"
] | null | null | null | if !System.get_env("EXERCISM_TEST_EXAMPLES") do
Code.load_file("change.exs", __DIR__)
end
ExUnit.start
ExUnit.configure exclude: :pending, trace: true
defmodule ChangeTest do
use ExUnit.Case
test "returns :error on empty list" do
assert Change.generate(1, []) == :error
end
@tag :pending
test "genera... | 29.784314 | 109 | 0.635286 |
3ffe54505bafa2e23c18c00d1b7be047305b6d1d | 360 | ex | Elixir | lib/hologram/compiler/transformers/addition_operator_transformer.ex | gregjohnsonsaltaire/hologram | aa8e9ea0d599def864c263cc37cc8ee31f02ac4a | [
"MIT"
] | 40 | 2022-01-19T20:27:36.000Z | 2022-03-31T18:17:41.000Z | lib/hologram/compiler/transformers/addition_operator_transformer.ex | gregjohnsonsaltaire/hologram | aa8e9ea0d599def864c263cc37cc8ee31f02ac4a | [
"MIT"
] | 42 | 2022-02-03T22:52:43.000Z | 2022-03-26T20:57:32.000Z | lib/hologram/compiler/transformers/addition_operator_transformer.ex | gregjohnsonsaltaire/hologram | aa8e9ea0d599def864c263cc37cc8ee31f02ac4a | [
"MIT"
] | 3 | 2022-02-10T04:00:37.000Z | 2022-03-08T22:07:45.000Z | defmodule Hologram.Compiler.AdditionOperatorTransformer do
alias Hologram.Compiler.{Context, Transformer}
alias Hologram.Compiler.IR.AdditionOperator
def transform({:+, _, [left, right]}, %Context{} = context) do
%AdditionOperator{
left: Transformer.transform(left, context),
right: Transformer.tr... | 30 | 64 | 0.733333 |
3ffe6a6a36ec117934088d82e03bb262170703ba | 709 | exs | Elixir | test/nostrum/struct/user/flags_test.exs | phereford/nostrum | 3d273671f51d839eedac4d6e52ba9cf70720ac01 | [
"MIT"
] | 637 | 2017-03-07T11:25:35.000Z | 2022-03-31T13:37:51.000Z | test/nostrum/struct/user/flags_test.exs | phereford/nostrum | 3d273671f51d839eedac4d6e52ba9cf70720ac01 | [
"MIT"
] | 372 | 2017-03-07T20:42:03.000Z | 2022-03-30T22:46:46.000Z | test/nostrum/struct/user/flags_test.exs | phereford/nostrum | 3d273671f51d839eedac4d6e52ba9cf70720ac01 | [
"MIT"
] | 149 | 2017-03-07T12:11:58.000Z | 2022-03-19T22:11:51.000Z | defmodule Nostrum.Struct.User.FlagsTest do
use ExUnit.Case, async: true
alias Nostrum.Struct.User.Flags
doctest Flags
describe "test flag serialise deserialise" do
test "from_integer/1" do
flags = Flags.from_integer(131_842)
assert(flags.early_supporter == true)
assert(flags.hypesquad_... | 22.870968 | 48 | 0.658674 |
3ffe6b0f9a7515293da3af256aecba9a2162d410 | 2,835 | exs | Elixir | monitoring_hub/apps/monitoring_hub_utils/test/monitoring_hub_utils/stores/app_config_store_test.exs | pvmsikrsna/wallaroo | a08ef579ec809e5bf4ffe10937b2be20059a0530 | [
"Apache-2.0"
] | 1,459 | 2017-09-16T13:13:15.000Z | 2020-10-05T06:19:50.000Z | monitoring_hub/apps/monitoring_hub_utils/test/monitoring_hub_utils/stores/app_config_store_test.exs | pvmsikrsna/wallaroo | a08ef579ec809e5bf4ffe10937b2be20059a0530 | [
"Apache-2.0"
] | 1,413 | 2017-09-14T18:18:14.000Z | 2020-09-28T08:10:30.000Z | monitoring_hub/apps/monitoring_hub_utils/test/monitoring_hub_utils/stores/app_config_store_test.exs | pvmsikrsna/wallaroo | a08ef579ec809e5bf4ffe10937b2be20059a0530 | [
"Apache-2.0"
] | 80 | 2017-09-27T23:16:23.000Z | 2020-06-02T09:18:53.000Z | defmodule MonitoringHubUtils.Stores.AppConfigStoreTest do
use ExUnit.Case
require Logger
alias MonitoringHubUtils.Stores.AppConfigStore
setup do
AppConfigStore.start_link
empty_app_config = %{"metrics" => %{
"start-to-end" => [],
"node-ingress-egress" => [],
"computation" => [],
... | 42.954545 | 126 | 0.712522 |
3ffe7353b6cd617176b245cc9438bb9f226e0024 | 1,854 | ex | Elixir | clients/cloud_search/lib/google_api/cloud_search/v1/model/scoring_config.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/cloud_search/lib/google_api/cloud_search/v1/model/scoring_config.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/cloud_search/lib/google_api/cloud_search/v1/model/scoring_config.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 37.08 | 220 | 0.740561 |
3ffe7fef9d8db490bde20ab7a23da468d97f06fd | 332 | ex | Elixir | apps/health/lib/health/checkers/ports.ex | mbta/automatic-fiesta | de9eb43e4fc7c47aa069f5ded8497ddd39ff74c5 | [
"MIT"
] | 62 | 2019-01-17T12:34:39.000Z | 2022-03-20T21:49:47.000Z | apps/health/lib/health/checkers/ports.ex | mbta/automatic-fiesta | de9eb43e4fc7c47aa069f5ded8497ddd39ff74c5 | [
"MIT"
] | 375 | 2019-02-13T15:30:50.000Z | 2022-03-30T18:50:41.000Z | apps/health/lib/health/checkers/ports.ex | mbta/automatic-fiesta | de9eb43e4fc7c47aa069f5ded8497ddd39ff74c5 | [
"MIT"
] | 14 | 2019-01-16T19:35:57.000Z | 2022-02-26T18:55:54.000Z | defmodule Health.Checkers.Ports do
@moduledoc """
Health check which makes sure there are not too many ports open.
"""
defp port_count do
length(:erlang.ports())
end
def current do
[ports: port_count()]
end
def healthy? do
port_count() < Application.get_env(:health, __MODULE__)[:max_ports... | 18.444444 | 71 | 0.686747 |
3ffea298311f732d2f4ce156bd20362c79851ea7 | 304 | exs | Elixir | priv/repo/migrations/20190910120900_add_email_address_to_settings.exs | wvffle/analytics | 2c0fd55bc67f74af1fe1e2641678d44e9fee61d5 | [
"MIT"
] | 984 | 2019-09-02T11:36:41.000Z | 2020-06-08T06:25:48.000Z | priv/repo/migrations/20190910120900_add_email_address_to_settings.exs | wvffle/analytics | 2c0fd55bc67f74af1fe1e2641678d44e9fee61d5 | [
"MIT"
] | 24 | 2019-09-10T09:53:17.000Z | 2020-06-08T07:35:26.000Z | priv/repo/migrations/20190910120900_add_email_address_to_settings.exs | wvffle/analytics | 2c0fd55bc67f74af1fe1e2641678d44e9fee61d5 | [
"MIT"
] | 51 | 2019-09-03T10:48:10.000Z | 2020-06-07T00:23:34.000Z | defmodule Plausible.Repo.Migrations.AddEmailAddressToSettings do
use Ecto.Migration
use Plausible.Repo
def change do
alter table(:email_settings) do
add :email, :citext
end
flush()
alter table(:email_settings) do
modify :email, :citext, null: false
end
end
end
| 17.882353 | 64 | 0.694079 |
3ffea68803e4a8d84238e315007b7a25b2c97f98 | 1,084 | exs | Elixir | all-your-base/all-your-base.exs | ChrisWilding/exercism-elixir | ee966439b460f82ef9581611f71c2f626402d14a | [
"MIT"
] | null | null | null | all-your-base/all-your-base.exs | ChrisWilding/exercism-elixir | ee966439b460f82ef9581611f71c2f626402d14a | [
"MIT"
] | null | null | null | all-your-base/all-your-base.exs | ChrisWilding/exercism-elixir | ee966439b460f82ef9581611f71c2f626402d14a | [
"MIT"
] | null | null | null | defmodule AllYourBase do
@doc """
Given a number in base a, represented as a sequence of digits, converts it to base b,
or returns nil if either of the bases are less than 2
"""
@spec convert(list, integer, integer) :: list
def convert([], _, _), do: nil
def convert(_, base_a, base_b) when base_a < 2 or ... | 24.088889 | 87 | 0.609779 |
3ffebbafcb9c758bea24059588b2ea9224fdafb0 | 42,327 | ex | Elixir | lib/axon/loop.ex | zeionara/axon | 8b82074b358043c0b685c7831458ec97f8edc378 | [
"Apache-2.0"
] | null | null | null | lib/axon/loop.ex | zeionara/axon | 8b82074b358043c0b685c7831458ec97f8edc378 | [
"Apache-2.0"
] | null | null | null | lib/axon/loop.ex | zeionara/axon | 8b82074b358043c0b685c7831458ec97f8edc378 | [
"Apache-2.0"
] | null | null | null | defmodule Axon.Loop do
@moduledoc """
Abstraction for modeling a reduction of a dataset with an accumulated
state for a number of epochs.
Inspired heavily by [PyTorch Ignite](https://pytorch.org/ignite/index.html).
The main abstraction is the `%Loop{}` struct, which controls a nested
reduction of the form... | 34.272874 | 97 | 0.636308 |
3ffec20657b251d01b6dfcd2ff2bfc7f7ae9193f | 2,155 | exs | Elixir | config/prod.exs | Conceptx/absinthe-example | 369fbeaf2e688767240e2ec961a2029359580afa | [
"MIT"
] | null | null | null | config/prod.exs | Conceptx/absinthe-example | 369fbeaf2e688767240e2ec961a2029359580afa | [
"MIT"
] | null | null | null | config/prod.exs | Conceptx/absinthe-example | 369fbeaf2e688767240e2ec961a2029359580afa | [
"MIT"
] | null | null | null | use Mix.Config
# For production, we often load configuration from external
# sources, such as your system environment. For this reason,
# you won't find the :http configuration below, but set inside
# GazolWeb.Endpoint.init/2 when load_from_system_env is
# true. Any dynamic configuration should be done there.
#
# Don'... | 33.153846 | 67 | 0.719258 |
3ffee64d41e343b53a8fa1abd456cdd14d572e98 | 13,535 | ex | Elixir | backend/lib/windshield/node.ex | EOS-CSX/windshield-docker | 77769dfd16a0b2da09fef2a62b5d393647f0aa6b | [
"MIT"
] | 19 | 2018-06-07T23:28:34.000Z | 2019-04-23T18:57:43.000Z | backend/lib/windshield/node.ex | EOS-CSX/windshield-docker | 77769dfd16a0b2da09fef2a62b5d393647f0aa6b | [
"MIT"
] | 27 | 2018-06-10T14:38:55.000Z | 2018-10-10T23:28:43.000Z | backend/lib/windshield/node.ex | EOS-CSX/windshield-docker | 77769dfd16a0b2da09fef2a62b5d393647f0aa6b | [
"MIT"
] | 7 | 2018-06-08T01:38:46.000Z | 2022-01-12T18:25:34.000Z | defmodule Windshield.Node do
@moduledoc """
GenServer that handles and watch a specific single node
"""
use GenServer
alias Windshield.Database
alias Windshield.PrincipalMonitor
alias Windshield.Alerts
alias Windshield.EosApi
@invalid_ping -1
require Logger
def start_link(options) do
%{no... | 29.360087 | 118 | 0.653269 |
3fff014275b3d27d9b8cd0c32bb2f9efeb8a54fa | 2,286 | ex | Elixir | test/shared/test_helpers.ex | arkgil/env_config_provider | 264a78c7070e1f7745f27dad72ce087911771a18 | [
"MIT"
] | null | null | null | test/shared/test_helpers.ex | arkgil/env_config_provider | 264a78c7070e1f7745f27dad72ce087911771a18 | [
"MIT"
] | 3 | 2018-10-17T23:31:07.000Z | 2018-10-17T23:33:31.000Z | test/shared/test_helpers.ex | arkgil/env_config_provider | 264a78c7070e1f7745f27dad72ce087911771a18 | [
"MIT"
] | null | null | null | defmodule EnvConfigProvider.TestHelpers do
@moduledoc """
Provides various utility functions used in tests
"""
@type env_vars() :: %{EnvConfigProvider.env_var_name() => EnvConfigProvider.env_var_value()}
@type app :: atom()
@type app_env_vars() :: Keyword.t()
## API
@doc """
Sets given system envir... | 33.617647 | 99 | 0.7021 |
3fff465262c8997ed3ca4c8465910d33cad2fed6 | 4,152 | exs | Elixir | test/acceptance/html/table_test.exs | ZeLarpMaster/earmark | 35c9661d6647059e507c0278347e21d92351c417 | [
"Apache-1.1"
] | null | null | null | test/acceptance/html/table_test.exs | ZeLarpMaster/earmark | 35c9661d6647059e507c0278347e21d92351c417 | [
"Apache-1.1"
] | null | null | null | test/acceptance/html/table_test.exs | ZeLarpMaster/earmark | 35c9661d6647059e507c0278347e21d92351c417 | [
"Apache-1.1"
] | null | null | null | defmodule Acceptance.Html.TableTest do
use ExUnit.Case, async: true
import Support.Helpers, only: [as_html: 1, as_html: 2]
describe "complex rendering inside tables:" do
test "simple table" do
markdown = "|a|b|\n|d|e|"
html = "<table>\n<tbody>\n<tr>\n<td style=\"text-align: left\">a</td... | 46.651685 | 350 | 0.577071 |
3fff70f3ea830bcdae89ec2a22d9d78319066ce0 | 591 | ex | Elixir | lib/xtb_client/messages/quote_id.ex | dsienkiewicz/xtb_client_ex | 550f1144eace28ce9bdb2fa3bcc27e891231487b | [
"MIT"
] | null | null | null | lib/xtb_client/messages/quote_id.ex | dsienkiewicz/xtb_client_ex | 550f1144eace28ce9bdb2fa3bcc27e891231487b | [
"MIT"
] | null | null | null | lib/xtb_client/messages/quote_id.ex | dsienkiewicz/xtb_client_ex | 550f1144eace28ce9bdb2fa3bcc27e891231487b | [
"MIT"
] | null | null | null | defmodule XtbClient.Messages.QuoteId do
@moduledoc """
Atoms representing quote ID.
"""
@type t :: :fixed | :float | :depth | :cross | :five | :six
@type quote_code :: 1 | 2 | 3 | 4 | 5 | 6
@doc """
Parse an integer number as valid atom for quote ID.
"""
@spec parse(quote_code()) :: t()
def parse(... | 21.107143 | 76 | 0.565144 |
3fff76cedeb511ee23ea9195a48caf078a219091 | 1,792 | exs | Elixir | elixir/rotational-cipher/test/rotational_cipher_test.exs | nickbosch/exercism | de81b5ff07bb314160e5a171bedcfca3e7d1e307 | [
"MIT"
] | 1 | 2022-01-23T20:34:09.000Z | 2022-01-23T20:34:09.000Z | rotational-cipher/test/rotational_cipher_test.exs | quatauta/exercism-elixir | 3635610f25111f2afd3bb748e86f9b478ec239b0 | [
"MIT"
] | null | null | null | rotational-cipher/test/rotational_cipher_test.exs | quatauta/exercism-elixir | 3635610f25111f2afd3bb748e86f9b478ec239b0 | [
"MIT"
] | 1 | 2021-03-15T11:02:40.000Z | 2021-03-15T11:02:40.000Z | defmodule RotationalCipherTest do
use ExUnit.Case
# @tag :pending
test "rotate a by 1" do
plaintext = "a"
shift = 1
assert RotationalCipher.rotate(plaintext, shift) == "b"
end
# @tag :pending
test "rotate a by 26, same output as input" do
plaintext = "a"
shift = 26
assert Rotationa... | 23.578947 | 79 | 0.643415 |
3fff7771b19089a2dd6fb73a93da358bc6aa8a53 | 1,056 | ex | Elixir | lib/mastani_server/cms/repo_favorite.ex | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | 1 | 2019-05-07T15:03:54.000Z | 2019-05-07T15:03:54.000Z | lib/mastani_server/cms/repo_favorite.ex | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | null | null | null | lib/mastani_server/cms/repo_favorite.ex | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | null | null | null | defmodule MastaniServer.CMS.RepoFavorite do
@moduledoc false
alias __MODULE__
use Ecto.Schema
import Ecto.Changeset
alias MastaniServer.Accounts
alias MastaniServer.CMS.Repo
@required_fields ~w(user_id repo_id)a
@optional_fields ~w(category_id)a
@type t :: %RepoFavorite{}
schema "repos_favorites"... | 27.789474 | 80 | 0.745265 |
3fff7b8e077a06487f498949d97ba461d0144c00 | 583 | ex | Elixir | lib/mix/tasks/wait_for_db.ex | findmypast/hexfmp | 38a50f5e1057833fd98748faac230bf4b9cc26a3 | [
"Apache-2.0"
] | null | null | null | lib/mix/tasks/wait_for_db.ex | findmypast/hexfmp | 38a50f5e1057833fd98748faac230bf4b9cc26a3 | [
"Apache-2.0"
] | null | null | null | lib/mix/tasks/wait_for_db.ex | findmypast/hexfmp | 38a50f5e1057833fd98748faac230bf4b9cc26a3 | [
"Apache-2.0"
] | null | null | null | defmodule Mix.Tasks.WaitForDb do
use Mix.Task
use Retry
require Logger
def run(_) do
host_name = Application.get_env(:hexpm, Hexpm.Repo)
|> Keyword.get(:hostname)
{:ok, {_, _, _, _, _, [ip_tuple]}} = :inet.gethostbyname(to_char_list host_name)
retry with: Stream.cycle([500]) do
Logge... | 24.291667 | 89 | 0.619211 |
3fff7cbd199d7f4a4f3d3952805835850e9946ec | 5,413 | ex | Elixir | lib/jsonrpc2/clients/tcp.ex | fanduel/jsonrpc2-elixir | 9b6f5c6472fa66885d7385e60d0b2f64c0e42e09 | [
"Apache-2.0"
] | 49 | 2016-07-14T01:12:59.000Z | 2022-03-22T02:13:50.000Z | lib/jsonrpc2/clients/tcp.ex | fanduel/jsonrpc2-elixir | 9b6f5c6472fa66885d7385e60d0b2f64c0e42e09 | [
"Apache-2.0"
] | 18 | 2016-09-02T18:08:37.000Z | 2021-06-10T21:28:11.000Z | lib/jsonrpc2/clients/tcp.ex | fanduel/jsonrpc2-elixir | 9b6f5c6472fa66885d7385e60d0b2f64c0e42e09 | [
"Apache-2.0"
] | 26 | 2016-09-07T21:46:16.000Z | 2021-10-09T13:52:16.000Z | defmodule JSONRPC2.Clients.TCP do
@moduledoc """
A client for JSON-RPC 2.0 using a line-based TCP transport.
"""
alias JSONRPC2.Clients.TCP.Protocol
@default_timeout 5_000
@type host :: binary | :inet.socket_address() | :inet.hostname()
@type request_id :: any
@type call_option ::
{:strin... | 36.086667 | 105 | 0.685757 |
3fff887a4c08ef55049a35b2bd65bd8b87c86afe | 66 | exs | Elixir | test/test_helper.exs | mntns/artus | 958380f42612ec0bc9d059037cf7b59dfbe1cfa9 | [
"MIT"
] | null | null | null | test/test_helper.exs | mntns/artus | 958380f42612ec0bc9d059037cf7b59dfbe1cfa9 | [
"MIT"
] | null | null | null | test/test_helper.exs | mntns/artus | 958380f42612ec0bc9d059037cf7b59dfbe1cfa9 | [
"MIT"
] | null | null | null | ExUnit.start
Ecto.Adapters.SQL.Sandbox.mode(Artus.Repo, :manual)
| 16.5 | 51 | 0.787879 |
3fff9a265c44bc0c0273175a970381159c700f2b | 3,503 | ex | Elixir | lib/bundlex/helper/mix_helper.ex | kianmeng/bundlex | c3477977ab1c46bc87c62fbade9b0a7c13c791be | [
"Apache-2.0"
] | 40 | 2018-06-10T20:55:32.000Z | 2021-12-12T22:08:25.000Z | lib/bundlex/helper/mix_helper.ex | kianmeng/bundlex | c3477977ab1c46bc87c62fbade9b0a7c13c791be | [
"Apache-2.0"
] | 40 | 2018-07-18T16:14:52.000Z | 2022-03-27T16:33:09.000Z | lib/bundlex/helper/mix_helper.ex | kianmeng/bundlex | c3477977ab1c46bc87c62fbade9b0a7c13c791be | [
"Apache-2.0"
] | 10 | 2018-08-02T06:07:42.000Z | 2022-03-25T15:41:14.000Z | defmodule Bundlex.Helper.MixHelper do
@moduledoc """
Module containing helper functions that ease retreiving certain values from
Mix configuration files.
"""
alias Bundlex.Output
use Bunch
@doc """
Helper function for retreiving app name from mix.exs and failing if it was
not found.
"""
@spec ge... | 34.683168 | 110 | 0.659435 |
3fff9f3b7d97eb649ef9a4e2596a7db683a84e21 | 631 | ex | Elixir | lib/slacker.ex | mikfreedman/slacker | 9e13b2ab232828ae7050f1c460233e572984d508 | [
"MIT"
] | 1 | 2016-05-19T05:10:16.000Z | 2016-05-19T05:10:16.000Z | lib/slacker.ex | pivotal-sydney/slacker | 9e13b2ab232828ae7050f1c460233e572984d508 | [
"MIT"
] | 3 | 2016-01-17T09:07:17.000Z | 2016-01-19T21:55:21.000Z | lib/slacker.ex | mikfreedman/slacker | 9e13b2ab232828ae7050f1c460233e572984d508 | [
"MIT"
] | null | null | null | defmodule Slacker 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
slack_api_token = Application.get_env(:slacker, :slack_api_token)
children = [
work... | 30.047619 | 82 | 0.729002 |
3fffff08860bd872ec027a25accabb094b98bbbb | 30,222 | ex | Elixir | lib/cldr/interval.ex | kipcole9/cldr_dates_times | c5d495ac8bd4cdd8a279a517ed24c243c9c2e4a3 | [
"Apache-2.0"
] | 9 | 2017-10-07T00:01:18.000Z | 2019-01-12T17:20:09.000Z | lib/cldr/interval.ex | kipcole9/cldr_dates_times | c5d495ac8bd4cdd8a279a517ed24c243c9c2e4a3 | [
"Apache-2.0"
] | 8 | 2017-10-05T20:00:52.000Z | 2019-02-12T00:22:11.000Z | lib/cldr/interval.ex | kipcole9/cldr_dates_times | c5d495ac8bd4cdd8a279a517ed24c243c9c2e4a3 | [
"Apache-2.0"
] | 3 | 2017-10-05T11:35:34.000Z | 2018-12-28T16:31:35.000Z | defmodule Cldr.Interval do
@moduledoc """
Interval formats allow for software to format intervals like "Jan 10-12, 2008" as a
shorter and more natural format than "Jan 10, 2008 - Jan 12, 2008". They are designed
to take a start and end date, time or datetime plus a formatting pattern
and use that information ... | 35.893112 | 103 | 0.659685 |
b2000be196dd3212cffe89868e6a5cc71dceccaf | 1,785 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/instance_group_managers_patch_per_instance_configs_req.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/instance_group_managers_patch_per_instance_configs_req.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/compute/lib/google_api/compute/v1/model/instance_group_managers_patch_per_instance_configs_req.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... | 34.326923 | 195 | 0.763585 |
b2003aac0fe9c60925dc4fcefe25c353ac1b0050 | 879 | exs | Elixir | apps/broker/test/mqtt/subscription_test.exs | tchupp/SteveMQ | a1e84fd5ab9c44094e31a9dee67fe970b3cee163 | [
"BSD-3-Clause"
] | 8 | 2019-12-20T15:44:08.000Z | 2021-01-25T18:30:25.000Z | apps/broker/test/mqtt/subscription_test.exs | tchupp/SteveMQ | a1e84fd5ab9c44094e31a9dee67fe970b3cee163 | [
"BSD-3-Clause"
] | 1 | 2019-11-08T17:20:00.000Z | 2019-11-08T17:20:00.000Z | apps/broker/test/mqtt/subscription_test.exs | tchupp/SteveMQ | a1e84fd5ab9c44094e31a9dee67fe970b3cee163 | [
"BSD-3-Clause"
] | null | null | null | defmodule Mqtt.SubscriptionTest do
use ExUnit.Case
alias Mqtt.Subscription
setup do
:mnesia.clear_table(Subscription)
:ok
end
test "can fetch subscriptions by topic" do
Subscription.add_subscription("bob", "topic/filter", self())
subscribers = Subscription.get_subscribers("topic/filter")
... | 26.636364 | 64 | 0.68942 |
b200664ec033c13cdcff47d4a802bbf1e9effc03 | 1,492 | ex | Elixir | api/web/web.ex | civica-digital/api-estados | dd1a338e4409c01994e931c29e5cc2f328e7e3f4 | [
"Apache-2.0"
] | 11 | 2017-01-20T15:54:54.000Z | 2020-03-24T19:12:34.000Z | api/web/web.ex | civica-digital/api-estados | dd1a338e4409c01994e931c29e5cc2f328e7e3f4 | [
"Apache-2.0"
] | 13 | 2017-02-07T21:45:36.000Z | 2017-04-13T17:38:08.000Z | api/web/web.ex | civica-digital/api-estados | dd1a338e4409c01994e931c29e5cc2f328e7e3f4 | [
"Apache-2.0"
] | 9 | 2017-03-13T19:49:04.000Z | 2021-01-16T00:24:55.000Z | defmodule Api.Web do
@moduledoc """
A module that keeps using definitions for controllers,
views and so on.
This can be used in your application as:
use Api.Web, :controller
use Api.Web, :view
The definitions below will be executed for every view,
controller, etc, so keep them short and clean... | 18.886076 | 88 | 0.658177 |
b200a8078a162f793e520cb722f5e6d80e2504d9 | 23,590 | ex | Elixir | lib/infinity_one/accounts/accounts.ex | smpallen99/ucx_ucc | 47225f205a6ac4aacdb9bb4f7512dcf4092576ad | [
"MIT"
] | 11 | 2017-05-15T18:35:05.000Z | 2018-02-05T18:27:40.000Z | lib/infinity_one/accounts/accounts.ex | anndream/infinity_one | 47225f205a6ac4aacdb9bb4f7512dcf4092576ad | [
"MIT"
] | 15 | 2017-11-27T10:38:05.000Z | 2018-02-09T20:42:08.000Z | lib/infinity_one/accounts/accounts.ex | anndream/infinity_one | 47225f205a6ac4aacdb9bb4f7512dcf4092576ad | [
"MIT"
] | 4 | 2017-09-13T11:34:16.000Z | 2018-02-26T13:37:06.000Z | defmodule InfinityOne.Accounts do
import Ecto.{Query, Changeset}, warn: false
alias InfinityOne.Repo
# alias InfinityOne.Accounts.User
alias InfinityOne.Accounts.{Role, UserRole, User, Account}
alias InfinityOne.Hooks
require Logger
# alias InfinityOne.Permissions.{Permission, PermissionRole}
@defaul... | 22.150235 | 109 | 0.620136 |
b200b3cbd5dd03323ede66aa7b288e9f857ae6ec | 556 | exs | Elixir | test/test_helper.exs | alappe/amqp | 1beda620362ba75b3cedea1c48fffd19be026042 | [
"MIT"
] | 688 | 2015-01-14T14:40:25.000Z | 2022-03-20T11:54:49.000Z | test/test_helper.exs | alappe/amqp | 1beda620362ba75b3cedea1c48fffd19be026042 | [
"MIT"
] | 180 | 2015-03-18T18:57:32.000Z | 2022-03-14T13:12:30.000Z | test/test_helper.exs | alappe/amqp | 1beda620362ba75b3cedea1c48fffd19be026042 | [
"MIT"
] | 170 | 2015-04-18T13:54:35.000Z | 2022-03-04T09:59:49.000Z | ExUnit.start()
defmodule AMQP.ConnectionCheck do
@max_retry 30
def do_check(retry \\ 0) do
case AMQP.Connection.open() do
{:ok, conn} ->
:ok = AMQP.Connection.close(conn)
{:error, reason} ->
message = "Cannot connect to RabbitMQ(amqp://localhost:5672): #{inspect(reason)}"
... | 21.384615 | 89 | 0.579137 |
b200b61a21059ea88ae1d2399c1db0a2ae0f4a89 | 723 | exs | Elixir | mix.exs | simonewebdesign/elixir_pubsub_example | c0cb5376017be5c23f3f05102b62732c00fbe8c0 | [
"MIT"
] | null | null | null | mix.exs | simonewebdesign/elixir_pubsub_example | c0cb5376017be5c23f3f05102b62732c00fbe8c0 | [
"MIT"
] | null | null | null | mix.exs | simonewebdesign/elixir_pubsub_example | c0cb5376017be5c23f3f05102b62732c00fbe8c0 | [
"MIT"
] | null | null | null | defmodule ElixirPubsubExample.Mixfile do
use Mix.Project
def project do
[app: :elixir_pubsub_example,
version: "0.0.1",
elixir: "~> 1.0",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps]
end
# Configuration for the OTP application
#
# Type `mix ... | 21.909091 | 77 | 0.618257 |
b200c5f44addf4c1e6c3bb22a1aedda1aeaff435 | 685 | ex | Elixir | lib/glimesh_web/controllers/user_session_controller.ex | YFG-Online/glimesh.tv | 5d9bb6f4ab383897c383bf33bbfac783b09e294e | [
"MIT"
] | null | null | null | lib/glimesh_web/controllers/user_session_controller.ex | YFG-Online/glimesh.tv | 5d9bb6f4ab383897c383bf33bbfac783b09e294e | [
"MIT"
] | null | null | null | lib/glimesh_web/controllers/user_session_controller.ex | YFG-Online/glimesh.tv | 5d9bb6f4ab383897c383bf33bbfac783b09e294e | [
"MIT"
] | null | null | null | defmodule GlimeshWeb.UserSessionController do
use GlimeshWeb, :controller
alias Glimesh.Accounts
alias GlimeshWeb.UserAuth
def new(conn, _params) do
render(conn, "new.html", error_message: nil)
end
def create(conn, %{"user" => user_params}) do
%{"email" => email, "password" => password} = user_pa... | 25.37037 | 75 | 0.693431 |
b2010446512f51eb7c56049b51c8c36b40f68533 | 1,562 | exs | Elixir | mix.exs | ssmlee/weddell | 99a8de646058904ce4b2d35fc9738f124f0c3d97 | [
"MIT"
] | 1 | 2018-05-18T15:47:34.000Z | 2018-05-18T15:47:34.000Z | mix.exs | ssmlee/weddell | 99a8de646058904ce4b2d35fc9738f124f0c3d97 | [
"MIT"
] | 1 | 2020-06-24T18:52:41.000Z | 2020-06-24T18:52:41.000Z | mix.exs | ssmlee/weddell | 99a8de646058904ce4b2d35fc9738f124f0c3d97 | [
"MIT"
] | 1 | 2018-05-18T15:46:51.000Z | 2018-05-18T15:46:51.000Z | defmodule Weddell.Mixfile do
use Mix.Project
def project do
[
app: :weddell,
version: "0.1.0",
elixir: "~> 1.5",
elixirc_paths: elixirc_paths(Mix.env),
start_permanent: Mix.env == :prod,
deps: deps(),
package: package(),
name: "Weddell",
description: descri... | 24.030769 | 87 | 0.538412 |
b20123110490cc26efc9606b49c92b9a8ed66217 | 6,149 | ex | Elixir | deps/ex_doc/lib/mix/tasks/docs.ex | ench0/ex_identicon | b37e86984cb372d8981b43190b0052e35718f173 | [
"MIT"
] | null | null | null | deps/ex_doc/lib/mix/tasks/docs.ex | ench0/ex_identicon | b37e86984cb372d8981b43190b0052e35718f173 | [
"MIT"
] | null | null | null | deps/ex_doc/lib/mix/tasks/docs.ex | ench0/ex_identicon | b37e86984cb372d8981b43190b0052e35718f173 | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.Docs do
use Mix.Task
@shortdoc "Generate documentation for the project"
@recursive true
@moduledoc """
Uses ExDoc to generate a static web page from the project documentation.
## Command line options
* `--output`, `-o` - Output directory for the generated
docs, default: `"d... | 32.882353 | 110 | 0.64108 |
b201663ca5d4fb21d3b8e8bce634b63bea3263a2 | 1,577 | ex | Elixir | apps/nerves_hub_web_core/lib/nerves_hub_web_core/firmwares/upload/s3.ex | nerves-hub/beamware | 5c239b7125a82d8fcb2b84ff1ad22d3bb0af01eb | [
"Apache-2.0"
] | null | null | null | apps/nerves_hub_web_core/lib/nerves_hub_web_core/firmwares/upload/s3.ex | nerves-hub/beamware | 5c239b7125a82d8fcb2b84ff1ad22d3bb0af01eb | [
"Apache-2.0"
] | null | null | null | apps/nerves_hub_web_core/lib/nerves_hub_web_core/firmwares/upload/s3.ex | nerves-hub/beamware | 5c239b7125a82d8fcb2b84ff1ad22d3bb0af01eb | [
"Apache-2.0"
] | null | null | null | defmodule NervesHubWebCore.Firmwares.Upload.S3 do
alias ExAws.S3
@behaviour NervesHubWebCore.Firmwares.Upload
# Provide URLs to devices that are valid for a day
@firmware_url_validity_time 60 * 60 * 24
@type upload_metadata :: %{s3_key: String.t()}
@impl NervesHubWebCore.Firmwares.Upload
def upload_fi... | 23.537313 | 81 | 0.656309 |
b20177399e58b5cc55188e0d2c211156290dd96f | 2,727 | ex | Elixir | lib/grpc/error.ex | scohen/grpc-elixir | c0eaa61d789f5c5b9e3c2f4c213944bebaf2c72c | [
"Apache-2.0"
] | null | null | null | lib/grpc/error.ex | scohen/grpc-elixir | c0eaa61d789f5c5b9e3c2f4c213944bebaf2c72c | [
"Apache-2.0"
] | null | null | null | lib/grpc/error.ex | scohen/grpc-elixir | c0eaa61d789f5c5b9e3c2f4c213944bebaf2c72c | [
"Apache-2.0"
] | null | null | null | defmodule GRPC.RPCError do
@moduledoc """
The RPC error raised in server side and got in client side.
# server side
raise GRPC.RPCError, status: :unknown # preferred
raise GRPC.RPCError, status: GRPC.Status.unknown, message: "error message"
# client side
{:error, error} = Your.Stub.u... | 40.701493 | 131 | 0.708471 |
b201c0828041c01d92547b874c6900291b51ba51 | 90,699 | ex | Elixir | lib/elixir/lib/enum.ex | jfornoff/elixir | 4ed5e8e66973ae7b0e52ead00f65117ab0d600e0 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/enum.ex | jfornoff/elixir | 4ed5e8e66973ae7b0e52ead00f65117ab0d600e0 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/enum.ex | jfornoff/elixir | 4ed5e8e66973ae7b0e52ead00f65117ab0d600e0 | [
"Apache-2.0"
] | null | null | null | defprotocol Enumerable do
@moduledoc """
Enumerable protocol used by `Enum` and `Stream` modules.
When you invoke a function in the `Enum` module, the first argument
is usually a collection that must implement this protocol.
For example, the expression:
Enum.map([1, 2, 3], &(&1 * 2))
invokes `Enume... | 27.302529 | 110 | 0.615001 |
b201c5d281f0a99a99a34f61b5096a3e7ccdd39b | 2,540 | ex | Elixir | clients/fitness/lib/google_api/fitness/v1/model/aggregate_bucket.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/fitness/lib/google_api/fitness/v1/model/aggregate_bucket.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/fitness/lib/google_api/fitness/v1/model/aggregate_bucket.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 39.076923 | 148 | 0.700394 |
b201ef75033984becd51720614f7492ba288c2f8 | 1,017 | exs | Elixir | test/rock/struct/cluster_test.exs | sitch/rock | 4ed29f0b9bcbbef2b690a4ca903c33b60edb04e4 | [
"MIT"
] | null | null | null | test/rock/struct/cluster_test.exs | sitch/rock | 4ed29f0b9bcbbef2b690a4ca903c33b60edb04e4 | [
"MIT"
] | null | null | null | test/rock/struct/cluster_test.exs | sitch/rock | 4ed29f0b9bcbbef2b690a4ca903c33b60edb04e4 | [
"MIT"
] | null | null | null | defmodule Rock.Struct.ClusterTest do
use ExUnit.Case
alias Rock.Struct.Cluster
alias Rock.Test.TestFactory
test "adds a point to a cluster" do
point = TestFactory.from_string(:point, ["6"])
cluster = TestFactory.from_string(:cluster,
[
["1", "2", "3"],
["5"]
])
%Cluster... | 22.108696 | 53 | 0.565388 |
b201fc47b43c9f6a0de10474671b470bff503790 | 1,113 | exs | Elixir | integration_test/cases/feature/use_feature_test.exs | bobwaycott/wallaby | b25e6937f007f6e56be1b7b6a62591db5ac5a240 | [
"MIT"
] | 926 | 2016-03-28T17:01:54.000Z | 2019-11-05T11:59:58.000Z | integration_test/cases/feature/use_feature_test.exs | marcandre/wallaby | d351c46f1a272bbcf8333c8327d154be3bd12c5c | [
"MIT"
] | 377 | 2016-03-17T00:35:56.000Z | 2019-11-03T07:15:24.000Z | integration_test/cases/feature/use_feature_test.exs | marcandre/wallaby | d351c46f1a272bbcf8333c8327d154be3bd12c5c | [
"MIT"
] | 144 | 2016-03-29T15:28:28.000Z | 2019-10-31T00:48:42.000Z | defmodule Wallaby.Integration.Browser.UseFeatureTest do
use ExUnit.Case, async: true
use Wallaby.Feature
@sessions 2
feature "multi session", %{sessions: [session_1, session_2]} do
session_1
|> visit("/page_1.html")
|> find(Query.css("body > h1"), fn el ->
assert Element.text(el) == "Page 1"
... | 29.289474 | 99 | 0.594789 |
b20202a4b9a3de0aa5da41de506d3e92d9770904 | 249 | ex | Elixir | apps/odd_job/lib/odd_job.ex | holsee/odd_job | 299117ef7cc5c67e8dbe1fc1f47253ff1cda4b2d | [
"MIT"
] | 2 | 2019-09-15T22:55:28.000Z | 2020-01-12T17:39:27.000Z | apps/odd_job/lib/odd_job.ex | holsee/odd_job | 299117ef7cc5c67e8dbe1fc1f47253ff1cda4b2d | [
"MIT"
] | 2 | 2021-03-09T16:37:48.000Z | 2021-05-10T12:02:31.000Z | apps/odd_job/lib/odd_job.ex | holsee/odd_job | 299117ef7cc5c67e8dbe1fc1f47253ff1cda4b2d | [
"MIT"
] | null | null | null | defmodule OddJob do
@moduledoc """
OddJob 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 |
b2020aa4952931408a4553bb5946f12d2a8c60d9 | 4,125 | ex | Elixir | lib/miles_to_go/accounts/user_token.ex | code-shoily/miles_to_go | cf5758d3113244326651320bd19c1887677bcf51 | [
"MIT"
] | 6 | 2020-12-18T08:36:32.000Z | 2021-06-13T03:02:16.000Z | lib/miles_to_go/accounts/user_token.ex | code-shoily/miles_to_go | cf5758d3113244326651320bd19c1887677bcf51 | [
"MIT"
] | null | null | null | lib/miles_to_go/accounts/user_token.ex | code-shoily/miles_to_go | cf5758d3113244326651320bd19c1887677bcf51 | [
"MIT"
] | null | null | null | defmodule MilesToGo.Accounts.UserToken do
@moduledoc false
use Ecto.Schema
import Ecto.Query
@hash_algorithm :sha256
@rand_size 32
# It is very important to keep the reset password token expiry short,
# since someone with access to the email may take over the account.
@reset_password_validity_in_days... | 28.846154 | 94 | 0.689212 |
b2021f980401fb59776b798e5a1d7f9fc500d068 | 1,125 | exs | Elixir | config/config.exs | sa2taka/CaboCha-Elixir | 8b065a2d7bd42e67eb27191804a1910db2092e0f | [
"MIT"
] | null | null | null | config/config.exs | sa2taka/CaboCha-Elixir | 8b065a2d7bd42e67eb27191804a1910db2092e0f | [
"MIT"
] | null | null | null | config/config.exs | sa2taka/CaboCha-Elixir | 8b065a2d7bd42e67eb27191804a1910db2092e0f | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the paren... | 36.290323 | 73 | 0.752 |
b20222392c312883024e8908d8b3591e5ba14f69 | 3,578 | exs | Elixir | test/level_web/graphql/queries/search_test.exs | denismitr/level | 0b01b0e46c252510dd50b3558d987c6f1e0b1da9 | [
"Apache-2.0"
] | 1 | 2019-06-11T20:20:32.000Z | 2019-06-11T20:20:32.000Z | test/level_web/graphql/queries/search_test.exs | denismitr/level | 0b01b0e46c252510dd50b3558d987c6f1e0b1da9 | [
"Apache-2.0"
] | null | null | null | test/level_web/graphql/queries/search_test.exs | denismitr/level | 0b01b0e46c252510dd50b3558d987c6f1e0b1da9 | [
"Apache-2.0"
] | null | null | null | defmodule LevelWeb.GraphQL.SearchTest do
use LevelWeb.ConnCase, async: true
import LevelWeb.GraphQL.TestHelpers
@query """
query Search(
$space_id: ID!,
$query: String!,
$page: Int,
$count: Int
) {
space(id: $space_id) {
search(
query: $query,
pag... | 26.116788 | 95 | 0.392957 |
b202290c534da1298c745368b1604ad63b1669d4 | 1,086 | ex | Elixir | tapestry_algorithm/lib/main_module.ex | kdlogan19/Tapestry-Algorithm | 337445c4569a7f0fd63da31272018a308ed65480 | [
"MIT"
] | null | null | null | tapestry_algorithm/lib/main_module.ex | kdlogan19/Tapestry-Algorithm | 337445c4569a7f0fd63da31272018a308ed65480 | [
"MIT"
] | null | null | null | tapestry_algorithm/lib/main_module.ex | kdlogan19/Tapestry-Algorithm | 337445c4569a7f0fd63da31272018a308ed65480 | [
"MIT"
] | null | null | null | defmodule MainModule do
def start(num_nodes, num_requests) do
Registry.start_link(keys: :unique, name: :registry)
{:ok, create_node_pid} = CreateNode.start_link()
IO.puts "Creating the 80% Network"
#Create 80% Network
network_nodes = floor(num_nodes*0.8)
GenServer.cal... | 43.44 | 96 | 0.666667 |
b202452bdb469b53a99ea119dd76ab359a68127e | 766 | exs | Elixir | apps/tracing_4/mix.exs | WhiteRookPL/elixir-fire-brigade-workshop | 1c6183339fc623842a09f4d10be75bcecf2c37e7 | [
"MIT"
] | 14 | 2017-08-09T14:21:47.000Z | 2022-03-11T04:10:49.000Z | apps/tracing_4/mix.exs | nicholasjhenry/elixir-fire-brigade-workshop | 1c6183339fc623842a09f4d10be75bcecf2c37e7 | [
"MIT"
] | null | null | null | apps/tracing_4/mix.exs | nicholasjhenry/elixir-fire-brigade-workshop | 1c6183339fc623842a09f4d10be75bcecf2c37e7 | [
"MIT"
] | 15 | 2017-09-05T15:43:53.000Z | 2020-04-13T16:20:18.000Z | defmodule CurrencyConverter.Mixfile do
use Mix.Project
def project() do
[
app: :currency_converter,
version: "1.0.0",
elixir: "~> 1.4",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps()
]
end
def application() do
[
applica... | 18.682927 | 60 | 0.483029 |
b20250282280dc7949082b75b246d54fd5ecbd5b | 93 | ex | Elixir | test/dummy/lib/repo.ex | zven21/aasm | f6749269c8317415fe12993d210a234ebf017ec9 | [
"MIT"
] | 2 | 2019-06-10T11:42:02.000Z | 2019-08-06T02:53:59.000Z | test/dummy/lib/repo.ex | zven21/aasm | f6749269c8317415fe12993d210a234ebf017ec9 | [
"MIT"
] | null | null | null | test/dummy/lib/repo.ex | zven21/aasm | f6749269c8317415fe12993d210a234ebf017ec9 | [
"MIT"
] | null | null | null | defmodule Dummy.Repo do
use Ecto.Repo, otp_app: :aasm, adapter: Ecto.Adapters.Postgres
end
| 23.25 | 64 | 0.774194 |
b20256aa5478b5a59e6c4eff26f9e53acc06ad79 | 1,591 | ex | Elixir | lib/elixir/lib/tuple.ex | jbcrail/elixir | f30ef15d9d028a6d0f74d10c2bb320d5f8501bdb | [
"Apache-2.0"
] | 1 | 2015-02-23T00:01:48.000Z | 2015-02-23T00:01:48.000Z | lib/elixir/lib/tuple.ex | jbcrail/elixir | f30ef15d9d028a6d0f74d10c2bb320d5f8501bdb | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/tuple.ex | jbcrail/elixir | f30ef15d9d028a6d0f74d10c2bb320d5f8501bdb | [
"Apache-2.0"
] | 1 | 2020-12-07T08:04:16.000Z | 2020-12-07T08:04:16.000Z | defmodule Tuple do
@moduledoc """
Functions for working with tuples.
"""
@doc """
Creates a new tuple.
Creates a tuple of size `size` containing the
given `data` at every position.
Inlined by the compiler.
## Examples
iex> Tuple.duplicate(:hello, 3)
{:hello, :hello, :hello}
"""
@... | 20.662338 | 63 | 0.642363 |
b2025c1929c32d52b9ca1286695b64857d6edf38 | 381 | ex | Elixir | apps/star_wars/lib/plug/graphql_wrapper.ex | iporaitech/phoenix-webpack-react-docker | c454db0b851b9d00db868a64b96e567d4a0cc3d9 | [
"MIT"
] | 25 | 2016-08-09T15:04:37.000Z | 2021-11-15T12:20:27.000Z | apps/star_wars/lib/plug/graphql_wrapper.ex | iporaitech/phoenix-webpack-react-docker | c454db0b851b9d00db868a64b96e567d4a0cc3d9 | [
"MIT"
] | 62 | 2016-05-23T20:16:40.000Z | 2017-04-18T18:36:29.000Z | apps/star_wars/lib/plug/graphql_wrapper.ex | iporaitech/phoenix-webpack-react-docker | c454db0b851b9d00db868a64b96e567d4a0cc3d9 | [
"MIT"
] | 10 | 2016-08-17T15:29:21.000Z | 2017-02-28T07:58:30.000Z | defmodule StarWars.Plug.GraphQLWrapper do
@moduledoc """
We need to define this module to be able to use Absinthe.Plug multiple times
in Webapp.Router and avoid the error:
`Absinthe.Plug` has already been forwarded to. A module can only be
forwarded a single time.
"""
defdelegate init(opts), to: Absinth... | 29.307692 | 78 | 0.745407 |
b20292f993861da0e2c0c664099c22e91fe22ecc | 67 | exs | Elixir | test/paranoid_test.exs | yorunoR/paranoid | 34c3ab21d2d248c479a47ff1aa408fc7a9d9a6a3 | [
"MIT"
] | null | null | null | test/paranoid_test.exs | yorunoR/paranoid | 34c3ab21d2d248c479a47ff1aa408fc7a9d9a6a3 | [
"MIT"
] | null | null | null | test/paranoid_test.exs | yorunoR/paranoid | 34c3ab21d2d248c479a47ff1aa408fc7a9d9a6a3 | [
"MIT"
] | null | null | null | defmodule ParanoidTest do
use ExUnit.Case
doctest Paranoid
end
| 13.4 | 25 | 0.80597 |
b202dd65dcfc0ecb3dfbc698575b0d852b6142fe | 205 | exs | Elixir | test/tweet_bot_web/controllers/page_controller_test.exs | chenxsan/telegram-bot-for-twitter | 892107c7609123028ac2375342cd7b2329931635 | [
"MIT"
] | 14 | 2018-03-23T04:13:29.000Z | 2021-07-26T06:15:50.000Z | test/tweet_bot_web/controllers/page_controller_test.exs | chenxsan/telegram-bot-for-twitter | 892107c7609123028ac2375342cd7b2329931635 | [
"MIT"
] | 2 | 2021-03-08T18:20:20.000Z | 2021-05-06T22:47:09.000Z | test/tweet_bot_web/controllers/page_controller_test.exs | chenxsan/telegram-bot-for-twitter | 892107c7609123028ac2375342cd7b2329931635 | [
"MIT"
] | 3 | 2020-11-04T08:11:47.000Z | 2022-01-13T17:41:42.000Z | defmodule TweetBotWeb.PageControllerTest do
use TweetBotWeb.ConnCase
test "GET /", %{conn: conn} do
conn = get conn, "/"
assert html_response(conn, 200) =~ "Hello Tweet for me bot!"
end
end
| 22.777778 | 64 | 0.682927 |
b202fc48e027b4fa23459990004f4a80fbe24d26 | 1,192 | exs | Elixir | config/dev.exs | altyaper/live-code | f935c41c0ed198a8eb49b99dc2d45d57e6f31e65 | [
"MIT"
] | 5 | 2016-09-09T16:36:14.000Z | 2019-07-26T19:15:10.000Z | config/dev.exs | altyaper/live-code | f935c41c0ed198a8eb49b99dc2d45d57e6f31e65 | [
"MIT"
] | 3 | 2020-07-17T06:07:38.000Z | 2021-05-09T02:50:05.000Z | config/dev.exs | echavezNS/live-code | f935c41c0ed198a8eb49b99dc2d45d57e6f31e65 | [
"MIT"
] | 3 | 2016-09-18T02:16:09.000Z | 2019-06-10T09:22:51.000Z | use Mix.Config
# 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 :file_presenter, FilePresenterWeb.Endpoint,
ht... | 35.058824 | 73 | 0.706376 |
b203199aa16daac5e9a4054ed714491d21625755 | 344 | ex | Elixir | src/lib/changelog_web/views/email_view.ex | thenets/docker-chocoquest | 856fa5ff41a5831ed67b1ef865cd8951df5af023 | [
"MIT"
] | null | null | null | src/lib/changelog_web/views/email_view.ex | thenets/docker-chocoquest | 856fa5ff41a5831ed67b1ef865cd8951df5af023 | [
"MIT"
] | null | null | null | src/lib/changelog_web/views/email_view.ex | thenets/docker-chocoquest | 856fa5ff41a5831ed67b1ef865cd8951df5af023 | [
"MIT"
] | null | null | null | defmodule ChangelogWeb.EmailView do
use ChangelogWeb, :public_view
alias Changelog.Faker
alias ChangelogWeb.{AuthView, Endpoint, NewsItemView, PersonView}
def greeting(person) do
label = if Enum.member?(Faker.names, person.name) do
"there"
else
PersonView.first_name(person)
end
"H... | 20.235294 | 67 | 0.703488 |
b203336524480825237a6cd1c3be31dee9714666 | 244 | exs | Elixir | elixir_advent/test/day3_test.exs | bwbeach/advent-of-code-2020 | 572810c3adae5815543efde17a4bca9596d05a5b | [
"CC0-1.0"
] | null | null | null | elixir_advent/test/day3_test.exs | bwbeach/advent-of-code-2020 | 572810c3adae5815543efde17a4bca9596d05a5b | [
"CC0-1.0"
] | null | null | null | elixir_advent/test/day3_test.exs | bwbeach/advent-of-code-2020 | 572810c3adae5815543efde17a4bca9596d05a5b | [
"CC0-1.0"
] | null | null | null | defmodule Day3Test do
use ExUnit.Case
doctest Day3
test "parse small input" do
with trees = MapSet.new() |> MapSet.put({2, 0}) |> MapSet.put({1, 1}) do
assert Day3.parse_input(["..#", ".#."]) == {3, 2, trees}
end
end
end
| 22.181818 | 76 | 0.586066 |
b2034c7165ed866019fb8ddf66c9b1ee0c939dd9 | 1,371 | ex | Elixir | lib/particle/base.ex | skruger/particle-elixir | a545ca921b239c2e2edb291cfc98f7d00c2e7310 | [
"MIT"
] | 4 | 2017-04-30T22:16:10.000Z | 2018-05-03T19:52:24.000Z | lib/particle/base.ex | skruger/particle-elixir | a545ca921b239c2e2edb291cfc98f7d00c2e7310 | [
"MIT"
] | 5 | 2016-09-30T10:05:57.000Z | 2019-06-03T22:55:25.000Z | lib/particle/base.ex | skruger/particle-elixir | a545ca921b239c2e2edb291cfc98f7d00c2e7310 | [
"MIT"
] | 3 | 2016-09-27T07:42:26.000Z | 2020-11-04T06:00:53.000Z | defmodule Particle.Base do
alias Particle.Error
alias Particle.Response
alias Particle.Http
alias Particle.Stream
require Logger
@moduledoc false
def get(url, struct) do
url
|> Http.get()
|> to_response(struct)
end
def get(endpoint, url, struct) do
get("#{endpoint}/#{url}", struct)
... | 21.761905 | 88 | 0.636032 |
b2037980acafb6b40ccd0e2c5a3fc7ac81afd9e7 | 86 | exs | Elixir | test/companion_web/views/layout_view_test.exs | praekeltfoundation/nurseconnect-companion | 9afaabaf3ae3e0123abcbd12e0a2073b681e9052 | [
"BSD-3-Clause"
] | 1 | 2018-10-10T18:20:22.000Z | 2018-10-10T18:20:22.000Z | test/companion_web/views/layout_view_test.exs | praekeltfoundation/nurseconnect-companion | 9afaabaf3ae3e0123abcbd12e0a2073b681e9052 | [
"BSD-3-Clause"
] | 23 | 2018-06-07T15:13:15.000Z | 2019-07-30T09:06:03.000Z | test/companion_web/views/layout_view_test.exs | praekeltfoundation/nurseconnect-companion | 9afaabaf3ae3e0123abcbd12e0a2073b681e9052 | [
"BSD-3-Clause"
] | null | null | null | defmodule CompanionWeb.LayoutViewTest do
use CompanionWeb.ConnCase, async: true
end
| 21.5 | 40 | 0.837209 |
b203ad06f97a1acaff98678e1b7462501ca4cebd | 1,446 | ex | Elixir | lib/triton/query.ex | gjaldon/triton | 0a9bf3490816898c3a5012351b4e2830e71a14b6 | [
"MIT"
] | 1 | 2020-05-16T07:34:47.000Z | 2020-05-16T07:34:47.000Z | lib/triton/query.ex | gjaldon/triton | 0a9bf3490816898c3a5012351b4e2830e71a14b6 | [
"MIT"
] | null | null | null | lib/triton/query.ex | gjaldon/triton | 0a9bf3490816898c3a5012351b4e2830e71a14b6 | [
"MIT"
] | 1 | 2019-12-20T16:56:19.000Z | 2019-12-20T16:56:19.000Z | defmodule Triton.Query do
alias Triton.QueryBuilder
@limit_default 100
defmacro prepared(module, prepared \\ []) do
QueryBuilder.build_query(:prepared, module, prepared)
end
defmacro select(module, select \\ []) do
QueryBuilder.build_query(:select, module, select)
end
defmacro where(module, wh... | 24.931034 | 60 | 0.722683 |
b20408b48bb1d198853ab058bcb59d5090f75c5f | 3,314 | exs | Elixir | test/miles_to_go_web/controllers/user_confirmation_controller_test.exs | code-shoily/miles_to_go | cf5758d3113244326651320bd19c1887677bcf51 | [
"MIT"
] | 6 | 2020-12-18T08:36:32.000Z | 2021-06-13T03:02:16.000Z | test/miles_to_go_web/controllers/user_confirmation_controller_test.exs | code-shoily/miles_to_go | cf5758d3113244326651320bd19c1887677bcf51 | [
"MIT"
] | null | null | null | test/miles_to_go_web/controllers/user_confirmation_controller_test.exs | code-shoily/miles_to_go | cf5758d3113244326651320bd19c1887677bcf51 | [
"MIT"
] | null | null | null | defmodule MilesToGoWeb.UserConfirmationControllerTest do
use MilesToGoWeb.ConnCase, async: true
alias MilesToGo.Accounts
alias MilesToGo.Repo
import MilesToGo.AccountsFixtures
setup do
%{user: user_fixture()}
end
describe "GET /users/confirm" do
test "renders the confirmation page", %{conn: con... | 34.884211 | 97 | 0.648461 |
b20437f822c9b341bd853382223d5a2791318a14 | 1,528 | ex | Elixir | lib/postgrex/extensions/timestamptz.ex | activeprospect/postgrex | d267e419de5db61ac8705210dec8527e4bf94a84 | [
"Apache-2.0"
] | null | null | null | lib/postgrex/extensions/timestamptz.ex | activeprospect/postgrex | d267e419de5db61ac8705210dec8527e4bf94a84 | [
"Apache-2.0"
] | 1 | 2020-07-17T10:07:44.000Z | 2020-07-17T10:07:44.000Z | lib/postgrex/extensions/timestamptz.ex | activeprospect/postgrex | d267e419de5db61ac8705210dec8527e4bf94a84 | [
"Apache-2.0"
] | null | null | null | defmodule Postgrex.Extensions.TimestampTZ do
@moduledoc false
import Postgrex.BinaryUtils, warn: false
use Postgrex.BinaryExtension, [send: "timestamptz_send"]
@gs_epoch :calendar.datetime_to_gregorian_seconds({{2000, 1, 1}, {0, 0, 0}})
@max_year 294_276
@gs_unix_epoch :calendar.datetime_to_gregorian_seco... | 31.833333 | 100 | 0.685864 |
b204ac3b567c41db3cd1472d653cab68fd103a66 | 4,785 | exs | Elixir | test/support/test_repo.exs | AndrewDryga/ecto | 9460e610928240800571c4e364fc8041f63e88f1 | [
"Apache-2.0"
] | null | null | null | test/support/test_repo.exs | AndrewDryga/ecto | 9460e610928240800571c4e364fc8041f63e88f1 | [
"Apache-2.0"
] | null | null | null | test/support/test_repo.exs | AndrewDryga/ecto | 9460e610928240800571c4e364fc8041f63e88f1 | [
"Apache-2.0"
] | 1 | 2018-09-21T16:05:29.000Z | 2018-09-21T16:05:29.000Z | defmodule Ecto.TestAdapter do
@behaviour Ecto.Adapter
alias Ecto.Migration.SchemaMigration
defmacro __before_compile__(_opts), do: :ok
def ensure_all_started(_, _) do
{:ok, []}
end
def init(opts) do
:ecto = opts[:otp_app]
"user" = opts[:username]
"pass" = opts[:password]
"hello" ... | 26.583333 | 109 | 0.644723 |
b204b488b0cc9913b178c5d44f145b77cf0dbc35 | 1,257 | exs | Elixir | portfolio/config/prod.secret.exs | JackMaarek/portfolio | 4423e67df870b14228edbc9e4ce3f3cdf1bccc2d | [
"MIT"
] | null | null | null | portfolio/config/prod.secret.exs | JackMaarek/portfolio | 4423e67df870b14228edbc9e4ce3f3cdf1bccc2d | [
"MIT"
] | 11 | 2020-04-29T10:28:20.000Z | 2020-04-29T11:03:13.000Z | portfolio/config/prod.secret.exs | JackMaarek/portfolio | 4423e67df870b14228edbc9e4ce3f3cdf1bccc2d | [
"MIT"
] | null | null | null | # In this file, we load production configuration and secrets
# from environment variables. You can also hardcode secrets,
# although such is generally not recommended and you have to
# remember to add this file to your .gitignore.
use Mix.Config
database_url =
System.get_env("DATABASE_URL") ||
raise """
envi... | 29.928571 | 67 | 0.721559 |
b204bacf33116a0560fa1ff4750138bb359cce23 | 2,826 | ex | Elixir | clients/container/lib/google_api/container/v1/model/node_kubelet_config.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/container/lib/google_api/container/v1/model/node_kubelet_config.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/container/lib/google_api/container/v1/model/node_kubelet_config.ex | dazuma/elixir-google-api | 6a9897168008efe07a6081d2326735fe332e522c | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 53.320755 | 542 | 0.742392 |
b204c6d56ce95ce4bd83e81522cce64e2f09eb83 | 6,970 | exs | Elixir | lib/mix/test/mix/umbrella_test.exs | scrogson/elixir | f6b2ddd81b9e679d67fca7876d446bd74c4901ad | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/umbrella_test.exs | scrogson/elixir | f6b2ddd81b9e679d67fca7876d446bd74c4901ad | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/umbrella_test.exs | scrogson/elixir | f6b2ddd81b9e679d67fca7876d446bd74c4901ad | [
"Apache-2.0"
] | null | null | null | Code.require_file "../test_helper.exs", __DIR__
defmodule Mix.UmbrellaTest do
use MixTest.Case
@moduletag apps: [:foo, :bar]
test "compiles umbrella" do
in_fixture "umbrella_dep/deps/umbrella", fn ->
Mix.Project.in_project(:umbrella, ".", fn _ ->
Mix.Task.run "deps"
assert_received {:... | 31.255605 | 104 | 0.590818 |
b20514764240ae8d495974a85828fabe3ddda548 | 2,250 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/autoscaling_policy_scale_in_control.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/autoscaling_policy_scale_in_control.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/autoscaling_policy_scale_in_control.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... | 45 | 378 | 0.762667 |
b20529d0d4504455c9b0e42d499fc159965c9c14 | 4,214 | ex | Elixir | lib/groupher_server/delivery/delegates/mention.ex | coderplanets/coderplanets_server | 3663e56340d6d050e974c91f7e499d8424fc25e9 | [
"Apache-2.0"
] | 240 | 2018-11-06T09:36:54.000Z | 2022-02-20T07:12:36.000Z | lib/groupher_server/delivery/delegates/mention.ex | coderplanets/coderplanets_server | 3663e56340d6d050e974c91f7e499d8424fc25e9 | [
"Apache-2.0"
] | 363 | 2018-07-11T03:38:14.000Z | 2021-12-14T01:42:40.000Z | lib/groupher_server/delivery/delegates/mention.ex | mydearxym/mastani_server | f24034a4a5449200165cf4a547964a0961793eab | [
"Apache-2.0"
] | 22 | 2019-01-27T11:47:56.000Z | 2021-02-28T13:17:52.000Z | defmodule GroupherServer.Delivery.Delegate.Mention do
@moduledoc """
The Delivery context.
"""
import Ecto.Query, warn: false
import Helper.Utils, only: [done: 1, thread_of: 2, atom_values_to_upcase: 1]
import ShortMaps
alias GroupherServer.{Accounts, CMS, Delivery, Repo}
alias Accounts.Model.User
a... | 28.093333 | 86 | 0.623161 |
b2054adc1de5f9976a14bf081cc73174a4a63015 | 936 | exs | Elixir | bench/ord_map/fetch.exs | sabiwara/aja | cde91e4263e54a11a1685a777dbffd4912fe3864 | [
"MIT"
] | 95 | 2020-10-18T09:27:46.000Z | 2022-03-29T20:03:16.000Z | bench/ord_map/fetch.exs | sabiwara/aja | cde91e4263e54a11a1685a777dbffd4912fe3864 | [
"MIT"
] | 1 | 2021-09-22T20:30:08.000Z | 2021-10-13T23:55:34.000Z | bench/ord_map/fetch.exs | sabiwara/aja | cde91e4263e54a11a1685a777dbffd4912fe3864 | [
"MIT"
] | 1 | 2020-12-15T12:36:16.000Z | 2020-12-15T12:36:16.000Z | defmodule Bench.Maps.Fetch do
def inputs() do
for n <- [10, 100, 10_000] do
{"n = #{n}", n}
end
end
def create_scenario(from_list_callback, fetch_callback) do
{
fn {map, keys} -> Enum.map(keys, fn key -> fetch_callback.(map, key) end) end,
before_scenario: fn n ->
map = 1..n... | 25.297297 | 92 | 0.551282 |
b2054ff1268c1d4c7b9fdaaec6b7f4593de63db3 | 5,304 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/network.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/network.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/network.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"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... | 58.285714 | 516 | 0.70098 |
b20555485afcfe38c465a54618ccdf6b6b38b454 | 1,224 | ex | Elixir | clients/cloud_monitoring/lib/google_api/cloud_monitoring/v2beta2/model/metric_descriptor_type_descriptor.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/cloud_monitoring/lib/google_api/cloud_monitoring/v2beta2/model/metric_descriptor_type_descriptor.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/cloud_monitoring/lib/google_api/cloud_monitoring/v2beta2/model/metric_descriptor_type_descriptor.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"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... | 32.210526 | 111 | 0.760621 |
b20558cb68796482c1762a90cb235b7ce1ab0cde | 64 | ex | Elixir | test/support/mox.ex | 0x6a68/recaptcha | f93e57144b312764feca6cc669a762bf0f0116cd | [
"MIT"
] | null | null | null | test/support/mox.ex | 0x6a68/recaptcha | f93e57144b312764feca6cc669a762bf0f0116cd | [
"MIT"
] | 1 | 2021-03-30T07:27:48.000Z | 2021-03-30T07:27:48.000Z | test/support/mox.ex | steady-media/recaptcha | f93e57144b312764feca6cc669a762bf0f0116cd | [
"MIT"
] | null | null | null | Mox.defmock(Recaptcha.Http.Mock, for: Recaptcha.Http.Interface)
| 32 | 63 | 0.8125 |
b205652fdcbc1871973a574c68f112960829b12c | 1,645 | ex | Elixir | lib/Discord/rate_limits.ex | BenAlbin/alchemy | c31bce54e13a692acdba3c3b581ff49090da7604 | [
"MIT"
] | 1 | 2019-02-24T03:13:22.000Z | 2019-02-24T03:13:22.000Z | lib/Discord/rate_limits.ex | appositum/alchemy | 2e4c06e198fa8c824183782508610815395d7c0e | [
"MIT"
] | null | null | null | lib/Discord/rate_limits.ex | appositum/alchemy | 2e4c06e198fa8c824183782508610815395d7c0e | [
"MIT"
] | null | null | null | defmodule Alchemy.Discord.RateLimits do
@moduledoc false
# Used for parsing ratelimits out of headers
require Logger
defmodule RateInfo do
@moduledoc false
defstruct [:limit, :remaining, :reset_time]
end
# will only match if the ratelimits are present
defp parse_headers(%{"X-RateLimit-Remainin... | 29.375 | 87 | 0.687538 |
b205b5c4f9cf48422c04a0796fdaac8cf1b9e531 | 4,255 | ex | Elixir | apps/blunt/lib/blunt/message/metadata.ex | blunt-elixir/blunt | a88b88984022db7ba2110204248fdb541121e3a0 | [
"MIT"
] | 1 | 2022-03-07T11:54:47.000Z | 2022-03-07T11:54:47.000Z | apps/blunt/lib/blunt/message/metadata.ex | elixir-cqrs/cqrs_tools | afbf82da522a10d2413547a46f316ed3aadebba5 | [
"MIT"
] | null | null | null | apps/blunt/lib/blunt/message/metadata.ex | elixir-cqrs/cqrs_tools | afbf82da522a10d2413547a46f316ed3aadebba5 | [
"MIT"
] | null | null | null | defmodule Blunt.Message.Metadata do
@doc false
defmacro register(opts) do
quote bind_quoted: [opts: opts] do
Module.register_attribute(__MODULE__, :metadata, accumulate: true, persist: true)
@metadata message_type: Keyword.get(opts, :message_type, :message)
end
end
@doc false
def record(n... | 23.77095 | 91 | 0.625147 |
b205c63c718385c826a8c0a9e640796fe148d3f2 | 451 | ex | Elixir | apps/customer/lib/customer/error.ex | JaiMali/job_search-1 | 5fe1afcd80aa5d55b92befed2780cd6721837c88 | [
"MIT"
] | 102 | 2017-05-21T18:24:04.000Z | 2022-03-10T12:53:20.000Z | apps/customer/lib/customer/error.ex | JaiMali/job_search-1 | 5fe1afcd80aa5d55b92befed2780cd6721837c88 | [
"MIT"
] | 2 | 2017-05-21T01:53:30.000Z | 2017-12-01T00:27:06.000Z | apps/customer/lib/customer/error.ex | JaiMali/job_search-1 | 5fe1afcd80aa5d55b92befed2780cd6721837c88 | [
"MIT"
] | 18 | 2017-05-22T09:51:36.000Z | 2021-09-24T00:57:01.000Z | defprotocol Customer.Error do
@fallback_to_any ""
def message(data)
end
defimpl Customer.Error, for: Ecto.Changeset do
def message(changeset) do
Enum.map(changeset.errors, &(build_error_message(&1)))
|> Enum.join(", ")
end
defp build_error_message(params) do
IO.inspect params
{key, {message,... | 20.5 | 58 | 0.678492 |
b205dc8c32fe4ce61824b75e91a89f6baac34551 | 655 | ex | Elixir | Microsoft.Azure.Management.Database.CosmosDb/lib/microsoft/azure/management/database/cosmos_db/model/database_account_regenerate_key_parameters.ex | chgeuer/ex_microsoft_azure_management | 99cd9f7f2ff1fdbe69ca5bac55b6e2af91ba3603 | [
"Apache-2.0"
] | 4 | 2018-09-29T03:43:15.000Z | 2021-04-01T18:30:46.000Z | Microsoft.Azure.Management.Database.CosmosDb/lib/microsoft/azure/management/database/cosmos_db/model/database_account_regenerate_key_parameters.ex | chgeuer/ex_microsoft_azure_management | 99cd9f7f2ff1fdbe69ca5bac55b6e2af91ba3603 | [
"Apache-2.0"
] | null | null | null | Microsoft.Azure.Management.Database.CosmosDb/lib/microsoft/azure/management/database/cosmos_db/model/database_account_regenerate_key_parameters.ex | chgeuer/ex_microsoft_azure_management | 99cd9f7f2ff1fdbe69ca5bac55b6e2af91ba3603 | [
"Apache-2.0"
] | null | null | null | # NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
defmodule Microsoft.Azure.Management.Database.CosmosDb.Model.DatabaseAccountRegenerateKeyParameters do
@moduledoc """
Parameters to regenerate the keys ... | 25.192308 | 121 | 0.751145 |
b205ed9b2003ff58278727548584d3d5bfe7a941 | 284 | exs | Elixir | priv/repo/migrations/20160220234956_create_room.exs | jusroberts/pingpong_server | fd090413076c84e4f7297349d4c9fd6323bd1ddf | [
"MIT"
] | null | null | null | priv/repo/migrations/20160220234956_create_room.exs | jusroberts/pingpong_server | fd090413076c84e4f7297349d4c9fd6323bd1ddf | [
"MIT"
] | null | null | null | priv/repo/migrations/20160220234956_create_room.exs | jusroberts/pingpong_server | fd090413076c84e4f7297349d4c9fd6323bd1ddf | [
"MIT"
] | null | null | null | defmodule PingpongServer.Repo.Migrations.CreateRoom do
use Ecto.Migration
def change do
create table(:rooms) do
add :client_token, :string
add :team_a_score, :integer
add :team_b_score, :integer
add :name, :string
timestamps
end
end
end
| 17.75 | 54 | 0.672535 |
b2060a32d2db3484f7a5a46430824e91ef3a2cb1 | 574 | exs | Elixir | kousa/test/broth/calls/create_room_from_scheduled_room_test.exs | baulml/dogehouse | 53fe8f54fe38a8ce45c2161108877cba24112e30 | [
"MIT"
] | 2 | 2021-03-30T02:44:54.000Z | 2021-11-12T12:05:48.000Z | kousa/test/broth/calls/create_room_from_scheduled_room_test.exs | baulml/dogehouse | 53fe8f54fe38a8ce45c2161108877cba24112e30 | [
"MIT"
] | null | null | null | kousa/test/broth/calls/create_room_from_scheduled_room_test.exs | baulml/dogehouse | 53fe8f54fe38a8ce45c2161108877cba24112e30 | [
"MIT"
] | null | null | null | defmodule KousaTest.Broth.CreateRoomFromScheduledRoomTest do
use ExUnit.Case, async: true
use Kousa.Support.EctoSandbox
alias Beef.Schemas.User
alias Beef.Users
alias Broth.WsClient
alias Broth.WsClientFactory
alias Kousa.Support.Factory
require WsClient
setup do
user = Factory.create(User)
... | 22.96 | 71 | 0.759582 |
b2060f752b8e808aed8a9c6d1998208cafd9a26a | 129 | exs | Elixir | test/test_helper.exs | hrzndhrn/json_xema | 955eab7b0919d144b38364164d90275201c89474 | [
"MIT"
] | 54 | 2019-03-10T19:51:07.000Z | 2021-12-23T07:31:09.000Z | test/test_helper.exs | hrzndhrn/json_xema | 955eab7b0919d144b38364164d90275201c89474 | [
"MIT"
] | 36 | 2018-05-20T09:13:20.000Z | 2021-03-14T15:22:03.000Z | test/test_helper.exs | hrzndhrn/json_xema | 955eab7b0919d144b38364164d90275201c89474 | [
"MIT"
] | 3 | 2019-04-12T09:08:51.000Z | 2019-12-04T01:23:56.000Z | Application.put_env(:xema, :loader, Test.RemoteLoader)
HttpServer.start(port: 1234, dir: "test/fixtures/remote")
ExUnit.start()
| 25.8 | 57 | 0.767442 |
b206237405264c42af5b0635051fadd3654095de | 1,015 | exs | Elixir | test/models/room_test.exs | ulissesalmeida/ikki | a6f3104acea76a0eac917e98f2c8df910c668fdc | [
"MIT"
] | 15 | 2015-09-01T03:38:30.000Z | 2019-01-29T16:16:12.000Z | test/models/room_test.exs | ulissesalmeida/ikki | a6f3104acea76a0eac917e98f2c8df910c668fdc | [
"MIT"
] | null | null | null | test/models/room_test.exs | ulissesalmeida/ikki | a6f3104acea76a0eac917e98f2c8df910c668fdc | [
"MIT"
] | 3 | 2015-09-18T18:42:29.000Z | 2018-09-25T21:45:30.000Z | defmodule Ikki.RoomTest do
use Ikki.ModelCase
alias Ikki.Room
@valid_attrs %{name: "Java"}
@invalid_attrs %{}
test "changeset with valid attributes" do
changeset = build_changeset(@valid_attrs)
assert changeset.valid?
end
test "changeset with invalid attributes" do
changeset = build_change... | 24.756098 | 67 | 0.708374 |
b2062b64162f815f9e99d7cb9e3b5b076ea6e715 | 3,188 | exs | Elixir | apps/gitgud_web/test/gitgud_web/controllers/gpg_key_controller_test.exs | rogervezaro/gitgud | 6656f8c2df16817a6c5325fb4c18b03f9d3f7140 | [
"MIT"
] | null | null | null | apps/gitgud_web/test/gitgud_web/controllers/gpg_key_controller_test.exs | rogervezaro/gitgud | 6656f8c2df16817a6c5325fb4c18b03f9d3f7140 | [
"MIT"
] | null | null | null | apps/gitgud_web/test/gitgud_web/controllers/gpg_key_controller_test.exs | rogervezaro/gitgud | 6656f8c2df16817a6c5325fb4c18b03f9d3f7140 | [
"MIT"
] | null | null | null | defmodule GitGud.Web.GPGKeyControllerTest do
use GitGud.Web.ConnCase, async: true
use GitGud.Web.DataFactory
alias GitGud.DB
alias GitGud.User
alias GitGud.GPGKey
import GitGud.Web.GPGKeyView
setup :create_user
test "renders gpg authentication key creation form if authenticated", %{conn: conn, user:... | 41.402597 | 176 | 0.683814 |
b20632b06637282803efe7c65736235d289a4482 | 911 | exs | Elixir | test/imager_web/plug/metrics_exporter_test.exs | appunite/imager | b41f76be975faf4d255ad0a5d8e972df1924356b | [
"MIT"
] | 55 | 2018-10-02T14:56:04.000Z | 2021-12-10T21:08:07.000Z | test/imager_web/plug/metrics_exporter_test.exs | appunite/imager | b41f76be975faf4d255ad0a5d8e972df1924356b | [
"MIT"
] | 27 | 2018-10-02T14:57:09.000Z | 2019-04-11T07:51:11.000Z | test/imager_web/plug/metrics_exporter_test.exs | appunite/imager | b41f76be975faf4d255ad0a5d8e972df1924356b | [
"MIT"
] | 3 | 2018-10-12T18:31:41.000Z | 2020-04-22T15:26:25.000Z | defmodule ImagerWeb.Plug.MetricsExporterTest do
use ExUnit.Case, async: true
use Plug.Test
use ExUnitProperties
alias ImagerWeb.Plug.MetricsExporter, as: Subject
defp path do
gen all segments <-
list_of(string(:alphanumeric, min_length: 1), min_length: 1) do
"/" <> Path.join(segments... | 22.775 | 77 | 0.624588 |
b2065bf1d04355fd8b0ae295a81107e3d4e346a3 | 5,527 | ex | Elixir | lib/yuki_helper/language.ex | penqen/yuki_helper | 9952dd4711fc2dc98d8cdc41bd758b9b271ea036 | [
"MIT"
] | null | null | null | lib/yuki_helper/language.ex | penqen/yuki_helper | 9952dd4711fc2dc98d8cdc41bd758b9b271ea036 | [
"MIT"
] | 1 | 2021-05-13T16:28:58.000Z | 2021-05-13T16:28:58.000Z | lib/yuki_helper/language.ex | penqen/yuki_helper | 9952dd4711fc2dc98d8cdc41bd758b9b271ea036 | [
"MIT"
] | null | null | null | defmodule YukiHelper.Language do
@moduledoc """
Provides a module to verify compiler, compile and, execute compiled target.
"""
alias YukiHelper.{Config, Problem}
alias YukiHelper.Exceptions.{LanguageError, CompileError}
@typedoc """
A list of language module.
"""
@type modules :: [module()]
@typ... | 23.125523 | 84 | 0.586756 |
b2067907471125d0b8c7d3835a0a43a42d50bc34 | 930 | exs | Elixir | config/test.exs | nontech/graphql_absinthe | c813fcb020c4d2e6eb9fcebdc05cc36d6fcf2dde | [
"MIT"
] | null | null | null | config/test.exs | nontech/graphql_absinthe | c813fcb020c4d2e6eb9fcebdc05cc36d6fcf2dde | [
"MIT"
] | null | null | null | config/test.exs | nontech/graphql_absinthe | c813fcb020c4d2e6eb9fcebdc05cc36d6fcf2dde | [
"MIT"
] | null | null | null | #---
# Excerpted from "Craft GraphQL APIs in Elixir with Absinthe",
# published by The Pragmatic Bookshelf.
# Copyrights apply to this code. It may not be used to create training material,
# courses, books, articles, and the like. Contact us if you are in doubt.
# We make no guarantees that this code is fit for any pur... | 33.214286 | 86 | 0.750538 |
b2067b95f04e5c4a0690621b2359e7cc2e2979ba | 2,990 | ex | Elixir | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/ip_configuration.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/ip_configuration.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/ip_configuration.ex | dazuma/elixir-google-api | 6a9897168008efe07a6081d2326735fe332e522c | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 50.677966 | 446 | 0.722408 |
b206946f35ed6148716af81f275aedf90048966d | 2,726 | ex | Elixir | lib/hound/internal_helpers.ex | NeoArcanjo/hound | 31f15d35aafcebc6263c28948f2bc84eefe8892d | [
"MIT"
] | null | null | null | lib/hound/internal_helpers.ex | NeoArcanjo/hound | 31f15d35aafcebc6263c28948f2bc84eefe8892d | [
"MIT"
] | null | null | null | lib/hound/internal_helpers.ex | NeoArcanjo/hound | 31f15d35aafcebc6263c28948f2bc84eefe8892d | [
"MIT"
] | null | null | null | defmodule Hound.InternalHelpers do
@moduledoc false
@unsupported_features [
phantomjs: [
"dialog_text",
"input_into_prompt",
"accept_dialog",
"dismiss_dialog",
"delete_cookies",
"focus_parent_frame"
],
chrome_driver: [],
selenium: []
]
def selector_strategy(... | 31.697674 | 83 | 0.633529 |
b206a14e8e502597803099267951e3858a9cc8e7 | 461 | exs | Elixir | priv/repo/migrations/20191212012415_add_relationship.exs | PranavPuranik/project_twitter | 0b660e8749488a632d6f64212205757254caaec3 | [
"MIT"
] | null | null | null | priv/repo/migrations/20191212012415_add_relationship.exs | PranavPuranik/project_twitter | 0b660e8749488a632d6f64212205757254caaec3 | [
"MIT"
] | 1 | 2021-03-10T07:27:11.000Z | 2021-03-10T07:27:11.000Z | priv/repo/migrations/20191212012415_add_relationship.exs | PranavPuranik/project_twitter | 0b660e8749488a632d6f64212205757254caaec3 | [
"MIT"
] | null | null | null | defmodule Chirper.Repo.Migrations.AddRelationship do
use Ecto.Migration
def change do
create table(:relationships) do
add :follower_id, references(:users, on_delete: :nothing)
add :followed_id, references(:users, on_delete: :nothing)
timestamps()
end
create index(:relationships, [:fo... | 27.117647 | 69 | 0.720174 |
b206a2ded3302ba2a1449b75fdbc2dc635eb328e | 265 | ex | Elixir | lib/rockelivery/orders/get.ex | LuizFerK/Rockelivery | 4742d73027bcaa97c2fc7969c8d032edf73a28fd | [
"MIT"
] | null | null | null | lib/rockelivery/orders/get.ex | LuizFerK/Rockelivery | 4742d73027bcaa97c2fc7969c8d032edf73a28fd | [
"MIT"
] | null | null | null | lib/rockelivery/orders/get.ex | LuizFerK/Rockelivery | 4742d73027bcaa97c2fc7969c8d032edf73a28fd | [
"MIT"
] | null | null | null | defmodule Rockelivery.Orders.Get do
alias Rockelivery.{Error, Order, Repo}
def by_id(id) do
case Repo.get(Order, id) do
nil -> {:error, Error.build_order_not_found_error()}
order -> {:ok, Repo.preload(order, [:items, :user])}
end
end
end
| 24.090909 | 58 | 0.656604 |
b206d7179ce1374d0ae0130f5ca2585267457ebd | 1,630 | exs | Elixir | apps/activity_logger/priv/repo/migrations/20181129045732_rename_audit_to_activity_log.exs | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | apps/activity_logger/priv/repo/migrations/20181129045732_rename_audit_to_activity_log.exs | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | apps/activity_logger/priv/repo/migrations/20181129045732_rename_audit_to_activity_log.exs | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 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... | 33.958333 | 99 | 0.739877 |
b206f6d53aefdb43f18111c2e9a40e2f0cb11155 | 1,005 | ex | Elixir | apps/gitgud_web/lib/gitgud_web/channels/user_socket.ex | chulkilee/gitgud | 7a9b1023ff986ca08fb821a5e7658904a6061ba3 | [
"MIT"
] | null | null | null | apps/gitgud_web/lib/gitgud_web/channels/user_socket.ex | chulkilee/gitgud | 7a9b1023ff986ca08fb821a5e7658904a6061ba3 | [
"MIT"
] | null | null | null | apps/gitgud_web/lib/gitgud_web/channels/user_socket.ex | chulkilee/gitgud | 7a9b1023ff986ca08fb821a5e7658904a6061ba3 | [
"MIT"
] | null | null | null | defmodule GitGud.Web.UserSocket do
@moduledoc """
Module providing support for bidirectional communication between clients and server.
"""
use Phoenix.Socket
use Absinthe.Phoenix.Socket, schema: GitGud.GraphQL.Schema
alias GitGud.UserQuery
transport :websocket, Phoenix.Transports.WebSocket
def connec... | 23.928571 | 87 | 0.671642 |
b2072f6c8cae8e15e5824b30d13fb806303838da | 10,296 | ex | Elixir | clients/service_user/lib/google_api/service_user/v1/api/projects.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/service_user/lib/google_api/service_user/v1/api/projects.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/service_user/lib/google_api/service_user/v1/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 ... | 44.765217 | 196 | 0.636461 |
b207428308596c9329a969ebe4806b42e4832e35 | 1,018 | ex | Elixir | apps/artemis_notify/test/support/conn_case.ex | artemis-platform/artemis_dashboard | 5ab3f5ac4c5255478bbebf76f0e43b44992e3cab | [
"MIT"
] | 9 | 2019-08-19T19:56:34.000Z | 2022-03-22T17:56:38.000Z | apps/artemis_notify/test/support/conn_case.ex | chrislaskey/artemis_teams | 9930c3d9528e37b76f0525390e32b66eed7eadde | [
"MIT"
] | 7 | 2019-07-12T21:41:01.000Z | 2020-08-17T21:29:22.000Z | apps/artemis_notify/test/support/conn_case.ex | chrislaskey/artemis_teams | 9930c3d9528e37b76f0525390e32b66eed7eadde | [
"MIT"
] | 2 | 2019-07-05T22:51:47.000Z | 2019-08-19T19:56:37.000Z | defmodule ArtemisNotify.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 datastructures and query the data layer.
Finally, if ... | 25.45 | 69 | 0.718075 |
b2075c7ebce880ca3b5853a14a969e3040f20ed6 | 9,796 | ex | Elixir | lib/hexpm_web/views/view_helpers.ex | thiamsantos/hexpm | 790bae9e761fe9b2dd6901618054ad533ef24599 | [
"Apache-2.0"
] | null | null | null | lib/hexpm_web/views/view_helpers.ex | thiamsantos/hexpm | 790bae9e761fe9b2dd6901618054ad533ef24599 | [
"Apache-2.0"
] | null | null | null | lib/hexpm_web/views/view_helpers.ex | thiamsantos/hexpm | 790bae9e761fe9b2dd6901618054ad533ef24599 | [
"Apache-2.0"
] | null | null | null | defmodule HexpmWeb.ViewHelpers do
use Phoenix.HTML
alias Hexpm.Repository.{Package, Release}
alias HexpmWeb.Endpoint
alias HexpmWeb.Router.Helpers, as: Routes
def logged_in?(assigns) do
!!assigns[:current_user]
end
def package_name(package) do
package_name(package.organization.name, package.name... | 29.241791 | 95 | 0.665986 |
b20788504476b991d41efe14936e398dcc1a0330 | 210 | exs | Elixir | test/migration_test.exs | alansousa/ecto_immigrant | 49b89e2d6a03694e6797c6d7cf588611700ea483 | [
"Apache-2.0"
] | 4 | 2019-11-06T04:43:49.000Z | 2021-04-02T09:06:34.000Z | test/migration_test.exs | alansousa/ecto_immigrant | 49b89e2d6a03694e6797c6d7cf588611700ea483 | [
"Apache-2.0"
] | 4 | 2020-09-14T05:14:50.000Z | 2021-04-18T05:42:35.000Z | test/migration_test.exs | alansousa/ecto_immigrant | 49b89e2d6a03694e6797c6d7cf588611700ea483 | [
"Apache-2.0"
] | 7 | 2020-05-28T06:21:43.000Z | 2021-05-28T07:25:47.000Z | defmodule EctoImmigrant.MigrationTest do
use ExUnit.Case
use EctoImmigrant.Migration
test "defines __migration__ function" do
assert function_exported?(__MODULE__, :__data_migration__, 0)
end
end
| 21 | 65 | 0.795238 |
b207930eefc770a4bee2c7517957d57b64b76c68 | 1,231 | ex | Elixir | lib/google_api/you_tube/v3/model/channel_conversion_ping.ex | jesteracer/ytb | 67e3cab899e4f69e586383f7be2c3855c6beea49 | [
"Apache-2.0"
] | null | null | null | lib/google_api/you_tube/v3/model/channel_conversion_ping.ex | jesteracer/ytb | 67e3cab899e4f69e586383f7be2c3855c6beea49 | [
"Apache-2.0"
] | null | null | null | lib/google_api/you_tube/v3/model/channel_conversion_ping.ex | jesteracer/ytb | 67e3cab899e4f69e586383f7be2c3855c6beea49 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 32.394737 | 161 | 0.750609 |
b207d537ed19611c7fd2d3662c94fae647ce1ad3 | 2,122 | ex | Elixir | clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_v2beta1_intent_message_simple_responses.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_v2beta1_intent_message_simple_responses.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_v2beta1_intent_message_simple_responses.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 ... | 34.225806 | 189 | 0.762017 |
b207f9205529252176d0557a7cb3ca1529ba50d3 | 1,153 | ex | Elixir | lib/plug/method_override.ex | wojtekmach/plug | e9afab6c10f173d55b13bd78c64526fb21495b39 | [
"Apache-2.0"
] | null | null | null | lib/plug/method_override.ex | wojtekmach/plug | e9afab6c10f173d55b13bd78c64526fb21495b39 | [
"Apache-2.0"
] | null | null | null | lib/plug/method_override.ex | wojtekmach/plug | e9afab6c10f173d55b13bd78c64526fb21495b39 | [
"Apache-2.0"
] | null | null | null | defmodule Plug.MethodOverride do
@moduledoc """
This plug overrides the request's `POST` method with the method defined in
the `_method` request parameter.
The `POST` method can be overridden only by these HTTP methods:
* `PUT`
* `PATCH`
* `DELETE`
This plug expects the body parameters to be al... | 23.530612 | 76 | 0.667823 |
b2083cb6595dc2a8d0c3abdcbb1dfcce9e574382 | 244 | ex | Elixir | test/support/graphql_helper.ex | alpcanaydin/githubist-api | 6481f8177c5b8573da2d5df52ffaff41340b25d0 | [
"MIT"
] | 33 | 2018-10-13T16:40:36.000Z | 2021-05-23T14:13:34.000Z | test/support/graphql_helper.ex | 5l1v3r1/githubist-api | 6481f8177c5b8573da2d5df52ffaff41340b25d0 | [
"MIT"
] | 1 | 2018-12-23T19:59:05.000Z | 2018-12-24T18:08:00.000Z | test/support/graphql_helper.ex | 5l1v3r1/githubist-api | 6481f8177c5b8573da2d5df52ffaff41340b25d0 | [
"MIT"
] | 3 | 2018-10-13T22:18:38.000Z | 2020-03-29T23:41:23.000Z | defmodule GithubistWeb.TestSupport.GraphQLHelper do
@moduledoc """
Test helpers for GraphQL test.
"""
import Plug.Conn
def put_graphql_headers(conn) do
conn
|> put_req_header("content-type", "application/graphql")
end
end
| 18.769231 | 60 | 0.721311 |
b2084182bd9abe8245efcc7c98672672d990e114 | 1,034 | ex | Elixir | exercism/elixir/luhn/lib/luhn.ex | Tyyagoo/studies | f8fcc3a539cfb6d04a149174c88bf2208e220b96 | [
"Unlicense"
] | null | null | null | exercism/elixir/luhn/lib/luhn.ex | Tyyagoo/studies | f8fcc3a539cfb6d04a149174c88bf2208e220b96 | [
"Unlicense"
] | null | null | null | exercism/elixir/luhn/lib/luhn.ex | Tyyagoo/studies | f8fcc3a539cfb6d04a149174c88bf2208e220b96 | [
"Unlicense"
] | null | null | null | defmodule Luhn do
defguardp is_numerical(char) when ?0 <= char and char <= ?9
@doc """
Checks if the given number is valid via the luhn formula
"""
@spec valid?(String.t()) :: boolean
def valid?(string) do
with {:ok, numbers} <- parse(string, []),
true <- length?(numbers),
true <- che... | 24.619048 | 80 | 0.553191 |
b20849bb3a27747ef0e4d41291ab2141250b7430 | 1,365 | ex | Elixir | test/support/data_case.ex | joaothallis/key | 10e7aa872d907ca585418ca0cd74c4c2a88de033 | [
"MIT"
] | 1 | 2018-09-09T22:30:16.000Z | 2018-09-09T22:30:16.000Z | test/support/data_case.ex | joaothallis/key | 10e7aa872d907ca585418ca0cd74c4c2a88de033 | [
"MIT"
] | 36 | 2018-09-09T15:08:05.000Z | 2022-03-23T09:27:10.000Z | test/support/data_case.ex | joaothallis/key | 10e7aa872d907ca585418ca0cd74c4c2a88de033 | [
"MIT"
] | null | null | null | defmodule Key.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,
it cannot be async. For this reason, every test run... | 24.375 | 77 | 0.672527 |
b2084bb99093160fcb7d8565947808319edb77e4 | 1,839 | ex | Elixir | lib/real_world_web.ex | mihkelal/mihkels-elixir-phoenix-realworld-example-app | f241093522b394c816e7bab8ccf5f18fdd854ac6 | [
"MIT"
] | null | null | null | lib/real_world_web.ex | mihkelal/mihkels-elixir-phoenix-realworld-example-app | f241093522b394c816e7bab8ccf5f18fdd854ac6 | [
"MIT"
] | 4 | 2021-03-23T19:01:21.000Z | 2021-03-30T18:27:24.000Z | lib/real_world_web.ex | mihkelal/mihkels-elixir-phoenix-realworld-example-app | f241093522b394c816e7bab8ccf5f18fdd854ac6 | [
"MIT"
] | null | null | null | defmodule RealWorldWeb 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 RealWorldWeb, :controller
use RealWorldWeb, :view
The definitions below will be executed for every view,
contro... | 23.278481 | 76 | 0.692224 |
b2084ce1c99f881a3d4426ad32d93580627a6b61 | 139 | ex | Elixir | lib/Structs/Messages/Reactions/reaction.ex | ElinksFr/alchemy | 4c64e5c619977a62a5674dbd2b1ef29f76f6f44e | [
"MIT"
] | 1 | 2019-02-24T03:13:22.000Z | 2019-02-24T03:13:22.000Z | lib/Structs/Messages/Reactions/reaction.ex | ElinksFr/alchemy | 4c64e5c619977a62a5674dbd2b1ef29f76f6f44e | [
"MIT"
] | null | null | null | lib/Structs/Messages/Reactions/reaction.ex | ElinksFr/alchemy | 4c64e5c619977a62a5674dbd2b1ef29f76f6f44e | [
"MIT"
] | null | null | null | defmodule Alchemy.Reaction do
@moduledoc false
@derive Poison.Encoder
defstruct [:count,
:me,
:emoji]
end
| 15.444444 | 29 | 0.597122 |
b20870ad6b31a5fc4a899a9c9a6f7efe4d22dcfb | 3,344 | ex | Elixir | apps/ewallet/lib/ewallet/web/v1/event_handlers/event.ex | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 322 | 2018-02-28T07:38:44.000Z | 2020-05-27T23:09:55.000Z | apps/ewallet/lib/ewallet/web/v1/event_handlers/event.ex | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 643 | 2018-02-28T12:05:20.000Z | 2020-05-22T08:34:38.000Z | apps/ewallet/lib/ewallet/web/v1/event_handlers/event.ex | 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 ... | 28.581197 | 101 | 0.654605 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.