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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ab882a317dd3be2548191a61f08d703ac704dc0c | 594 | exs | Elixir | test/ua_parser/parsers/operating_system_parser_test.exs | ClarkThan/ua_parser | 51f9ef5d9d0cfc8a7e29e0dde4b48516e7a23a7a | [
"Apache-2.0"
] | 20 | 2019-05-21T17:19:07.000Z | 2022-01-22T14:45:46.000Z | test/ua_parser/parsers/operating_system_parser_test.exs | ClarkThan/ua_parser | 51f9ef5d9d0cfc8a7e29e0dde4b48516e7a23a7a | [
"Apache-2.0"
] | 17 | 2019-05-21T18:38:34.000Z | 2022-03-27T06:07:30.000Z | test/ua_parser/parsers/operating_system_parser_test.exs | ClarkThan/ua_parser | 51f9ef5d9d0cfc8a7e29e0dde4b48516e7a23a7a | [
"Apache-2.0"
] | 8 | 2016-12-20T17:44:36.000Z | 2019-04-09T11:58:45.000Z | defmodule UAParser.Parsers.OperatingSystemTest do
use ExUnit.Case
alias UAParser.Parsers.OperatingSystem, as: Parser
alias UAParser.{OperatingSystem, Version}
@pattern [
regex: ~r/((?:Mac ?|; )OS X)[\s\/](?:(\d+)[_.](\d+)(?:[_.](\d+))?|Mach-O)/,
os_replacement: "Mac OS X"
]
@match ["Mac OS X 10_5_... | 29.7 | 79 | 0.626263 |
ab882f2bf9b12751b6d931416e401fe1165b07fd | 7,326 | exs | Elixir | test/ex_aws/acm_test.exs | malomohq/ex_aws_acm | 515144e5408eaa617e242a29ada7978404a2f540 | [
"MIT"
] | 1 | 2021-02-21T02:06:09.000Z | 2021-02-21T02:06:09.000Z | test/ex_aws/acm_test.exs | ex-aws/ex_aws_acm | 30f4db1b4cd363c2ade5a35d0e5210f27ad5e020 | [
"MIT"
] | 4 | 2021-03-15T07:32:48.000Z | 2021-03-17T06:07:25.000Z | test/ex_aws/acm_test.exs | malomohq/ex_aws_acm | 515144e5408eaa617e242a29ada7978404a2f540 | [
"MIT"
] | null | null | null | defmodule ExAws.ACMTest do
use ExUnit.Case, async: true
test "add_tags_to_certificate/2" do
expected = Map.new()
expected = Map.put(expected, "CertificateArn", "xxx")
expected = Map.put(expected, "Tags", [%{ "Key" => "yyy", "Value" => "zzz" }])
result = ExAws.ACM.add_tags_to_certificate("xxx", [%{... | 37.958549 | 120 | 0.670762 |
ab887ffa1287d2fb3f3ec18e80123150487354a2 | 1,628 | ex | Elixir | hexdocs__pm__phoenix__up_and_running.html/hello_test/lib/hello_test_web/endpoint.ex | jim80net/elixir_tutorial_projects | db19901a9305b297faa90642bebcc08455621b52 | [
"Unlicense"
] | null | null | null | hexdocs__pm__phoenix__up_and_running.html/hello_test/lib/hello_test_web/endpoint.ex | jim80net/elixir_tutorial_projects | db19901a9305b297faa90642bebcc08455621b52 | [
"Unlicense"
] | null | null | null | hexdocs__pm__phoenix__up_and_running.html/hello_test/lib/hello_test_web/endpoint.ex | jim80net/elixir_tutorial_projects | db19901a9305b297faa90642bebcc08455621b52 | [
"Unlicense"
] | null | null | null | defmodule HelloTestWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :hello_test
# The session will be stored in the cookie and signed,
# this means its contents can be read but not tampered with.
# Set :encryption_salt if you would also like to encrypt it.
@session_options [
store: :cookie,
key: "_hell... | 29.6 | 97 | 0.721744 |
ab888f8e609d9cb8a8b273902677a7837feeacec | 2,200 | exs | Elixir | config/prod.exs | allen-garvey/block-quote-phoenix | 5c0f5d16daf6bb515a8f1846c3e4311b368a7bdb | [
"MIT"
] | 4 | 2019-10-04T16:11:15.000Z | 2021-08-18T21:00:13.000Z | apps/blockquote/config/prod.exs | allen-garvey/phoenix-umbrella | 1d444bbd62a5e7b5f51d317ce2be71ee994125d5 | [
"MIT"
] | 5 | 2020-03-16T23:52:25.000Z | 2021-09-03T16:52:17.000Z | apps/blockquote/config/prod.exs | allen-garvey/phoenix-umbrella | 1d444bbd62a5e7b5f51d317ce2be71ee994125d5 | [
"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
# BlockquoteWeb.Endpoint.init/2 when load_from_system_env is
# true. Any dynamic configuration should be done there.
#
#... | 33.846154 | 67 | 0.725 |
ab8891f248cfa6bd635dfadb3fb72b93d66664a3 | 8,095 | exs | Elixir | test/game_test.exs | clszzyh/battle_city_core | 7a3aca9000b186382f1faf526ebce837a76ef86e | [
"MIT"
] | null | null | null | test/game_test.exs | clszzyh/battle_city_core | 7a3aca9000b186382f1faf526ebce837a76ef86e | [
"MIT"
] | 38 | 2020-12-17T12:40:44.000Z | 2022-03-31T02:05:59.000Z | test/game_test.exs | clszzyh/battle_city | 7a3aca9000b186382f1faf526ebce837a76ef86e | [
"MIT"
] | null | null | null | defmodule BattleCity.GameTest do
use ExUnit.Case, async: true
# alias BattleCity.Process.GameDynamicSupervisor
alias BattleCity.Context
alias BattleCity.Event
alias BattleCity.Game
alias BattleCity.Position
# alias BattleCity.Process.GameServer
# alias BattleCity.Process.ProcessRegistry
alias BattleC... | 34.446809 | 98 | 0.617542 |
ab88a10d3748f6877820e5c677feba05cb755d18 | 798 | ex | Elixir | lib/assertions/comparisons.ex | dce2956/assertions | cfbfb30c001969bee430480e4b87397aad499106 | [
"MIT"
] | null | null | null | lib/assertions/comparisons.ex | dce2956/assertions | cfbfb30c001969bee430480e4b87397aad499106 | [
"MIT"
] | null | null | null | lib/assertions/comparisons.ex | dce2956/assertions | cfbfb30c001969bee430480e4b87397aad499106 | [
"MIT"
] | null | null | null | defmodule Assertions.Comparisons do
@moduledoc false
@doc false
def compare_maps(left, right, comparison \\ &Kernel.==/2) do
{left_diff, right_diff, equal?} =
compare_lists(Map.to_list(left), Map.to_list(right), comparison)
{Map.new(left_diff), Map.new(right_diff), equal?}
end
@doc false
de... | 28.5 | 70 | 0.674185 |
ab88bb71040bd2f2316162d9dac1cb8c9dbc0ecf | 2,347 | exs | Elixir | apps/sherbet_service/mix.exs | ScrimpyCat/sherbet | f245c994b15c47bb31b68d5af24de925c853c3d7 | [
"BSD-2-Clause"
] | 3 | 2017-05-02T12:52:54.000Z | 2017-05-28T11:53:17.000Z | apps/sherbet_service/mix.exs | ScrimpyCat/sherbet | f245c994b15c47bb31b68d5af24de925c853c3d7 | [
"BSD-2-Clause"
] | null | null | null | apps/sherbet_service/mix.exs | ScrimpyCat/sherbet | f245c994b15c47bb31b68d5af24de925c853c3d7 | [
"BSD-2-Clause"
] | 2 | 2017-05-02T13:13:25.000Z | 2019-10-24T11:55:39.000Z | defmodule Sherbet.Service.Mixfile do
use Mix.Project
def project do
[
app: :sherbet_service,
version: "0.1.0",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",... | 31.293333 | 95 | 0.52876 |
ab88d5e34447ed6dbe7b7f181128d9f9f946f199 | 1,294 | exs | Elixir | mix.exs | yurikoval/ex_bitmex | d9492789fb319fbdf78d90a99f7c0e40c95c1885 | [
"MIT"
] | null | null | null | mix.exs | yurikoval/ex_bitmex | d9492789fb319fbdf78d90a99f7c0e40c95c1885 | [
"MIT"
] | 28 | 2021-03-29T06:46:42.000Z | 2022-03-28T11:03:38.000Z | mix.exs | yurikoval/ex_bitmex | d9492789fb319fbdf78d90a99f7c0e40c95c1885 | [
"MIT"
] | null | null | null | defmodule ExBitmex.Mixfile do
use Mix.Project
def project do
[
app: :ex_bitmex,
version: "0.5.0",
elixir: "~> 1.8",
package: package(),
start_permanent: Mix.env() == :prod,
description: description(),
deps: deps(),
test_coverage: [tool: ExCoveralls],
prefer... | 22.701754 | 76 | 0.515456 |
ab88f4ff4525642d5af22f96d1493907d10b5523 | 2,170 | exs | Elixir | test/errors_test.exs | lincolnf/pact_elixir | 21e5f473e3c30173881e577ffda8df1e1419d47d | [
"MIT"
] | 27 | 2018-02-28T22:42:14.000Z | 2022-03-20T00:30:08.000Z | test/errors_test.exs | lincolnf/pact_elixir | 21e5f473e3c30173881e577ffda8df1e1419d47d | [
"MIT"
] | 180 | 2017-12-04T09:42:53.000Z | 2022-03-28T09:33:23.000Z | test/errors_test.exs | lincolnf/pact_elixir | 21e5f473e3c30173881e577ffda8df1e1419d47d | [
"MIT"
] | 8 | 2018-08-01T17:14:52.000Z | 2022-01-26T12:46:46.000Z | defmodule PactElixir.ErrorsTest do
@moduledoc false
use ExUnit.Case
alias PactElixir.VerificationError
import PactElixir.Errors
test "outputs request errors" do
mismatches = [missing_request_error()]
assert_raise VerificationError, ~r/Missing Request.*\/foo.*/s, fn ->
convert_to_error(mismatch... | 24.659091 | 84 | 0.551613 |
ab8904a582d8b32d3bf20f2082d4b7e5f97d4593 | 702 | ex | Elixir | lib/chewiepay_web/views/error_view.ex | jennifertakagi/chewiepay | 15b5eca89f56e2933610f3edda7412889dc08137 | [
"MIT"
] | 4 | 2021-02-22T18:27:51.000Z | 2021-02-28T21:54:12.000Z | lib/chewiepay_web/views/error_view.ex | jennifertakagi/chewiepay | 15b5eca89f56e2933610f3edda7412889dc08137 | [
"MIT"
] | null | null | null | lib/chewiepay_web/views/error_view.ex | jennifertakagi/chewiepay | 15b5eca89f56e2933610f3edda7412889dc08137 | [
"MIT"
] | null | null | null | defmodule ChewiepayWeb.ErrorView do
use ChewiepayWeb, :view
import Ecto.Changeset, only: [traverse_errors: 2]
alias Ecto.Changeset
def template_not_found(template, _assigns) do
%{errors: %{detail: Phoenix.Controller.status_message_from_template(template)}}
end
def render("400.json", %{result: %Change... | 26 | 83 | 0.682336 |
ab890b3912bba822fb5e3b11290f20bc2178b5be | 4,932 | exs | Elixir | mix.exs | zorn/phoenix | ac88958550fbd861e2f1e1af6e3c6b787b1a202e | [
"MIT"
] | 1 | 2019-07-15T21:58:09.000Z | 2019-07-15T21:58:09.000Z | mix.exs | zorn/phoenix | ac88958550fbd861e2f1e1af6e3c6b787b1a202e | [
"MIT"
] | null | null | null | mix.exs | zorn/phoenix | ac88958550fbd861e2f1e1af6e3c6b787b1a202e | [
"MIT"
] | null | null | null | defmodule Phoenix.MixProject do
use Mix.Project
@version "1.4.0-dev"
def project do
[
app: :phoenix,
version: @version,
elixir: "~> 1.4",
deps: deps(),
package: package(),
lockfile: lockfile(),
preferred_cli_env: [docs: :docs],
consolidate_protocols: Mix.env !... | 24.909091 | 96 | 0.578264 |
ab890d00e1f8dbd8293e8fccb38fed33bf49b791 | 59,791 | ex | Elixir | lib/plug/conn.ex | adrianomitre/plug | 9bf2f611f766e59adf4f238ea679e13d6ff6da75 | [
"Apache-2.0"
] | null | null | null | lib/plug/conn.ex | adrianomitre/plug | 9bf2f611f766e59adf4f238ea679e13d6ff6da75 | [
"Apache-2.0"
] | null | null | null | lib/plug/conn.ex | adrianomitre/plug | 9bf2f611f766e59adf4f238ea679e13d6ff6da75 | [
"Apache-2.0"
] | null | null | null | alias Plug.Conn.Unfetched
defmodule Plug.Conn do
@moduledoc """
The Plug connection.
This module defines a `Plug.Conn` struct and the main functions
for working with Plug connections.
Note request headers are normalized to lowercase and response
headers are expected to have lowercase keys.
## Request ... | 33.14357 | 104 | 0.669549 |
ab89214aa441a434ba95b807cc3ce0c27b78cc70 | 28,318 | ex | Elixir | clients/compute/lib/google_api/compute/v1/api/node_templates.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/compute/lib/google_api/compute/v1/api/node_templates.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/api/node_templates.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 ... | 48.740103 | 414 | 0.645137 |
ab89220b696989a2223c579403601b29f2295f18 | 4,012 | ex | Elixir | lib/yummy_web/views/helpers/input_helpers.ex | MatthieuSegret/yummy-phoenix | 85b490075e3a0395b4e7cfa9f06936659e9d12b5 | [
"MIT"
] | 5 | 2017-08-27T19:45:43.000Z | 2019-06-28T08:12:25.000Z | lib/yummy_web/views/helpers/input_helpers.ex | MatthieuSegret/yummy-phoenix | 85b490075e3a0395b4e7cfa9f06936659e9d12b5 | [
"MIT"
] | null | null | null | lib/yummy_web/views/helpers/input_helpers.ex | MatthieuSegret/yummy-phoenix | 85b490075e3a0395b4e7cfa9f06936659e9d12b5 | [
"MIT"
] | null | null | null | defmodule YummyWeb.Helpers.InputHelpers do
use Phoenix.HTML
alias YummyWeb.Helpers.ErrorHelpers
def input(form, field, options \\ []) do
options = build_options(form, field, options)
wrapper(form, field, options[:type], options[:label_value], options[:input_options], options[:class])
end
defp wrappe... | 31.590551 | 105 | 0.619641 |
ab89301e1ef3c87bdcab4dc6fcb24c2e560baeff | 564 | ex | Elixir | samples/client/petstore/elixir/lib/open_api_petstore/model/cat.ex | kymbalon/openapi-generator | 8327a920408314aacb7d00f64285ae88e9195633 | [
"Apache-2.0"
] | 2 | 2019-03-26T11:04:18.000Z | 2021-01-03T10:54:10.000Z | samples/client/petstore/elixir/lib/open_api_petstore/model/cat.ex | kymbalon/openapi-generator | 8327a920408314aacb7d00f64285ae88e9195633 | [
"Apache-2.0"
] | 7 | 2021-03-01T21:26:03.000Z | 2022-02-27T10:10:20.000Z | samples/client/petstore/elixir/lib/open_api_petstore/model/cat.ex | kymbalon/openapi-generator | 8327a920408314aacb7d00f64285ae88e9195633 | [
"Apache-2.0"
] | 4 | 2019-04-08T17:06:09.000Z | 2020-06-09T18:16:08.000Z | # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://openapi-generator.tech
# Do not edit the class manually.
defmodule OpenAPIPetstore.Model.Cat do
@moduledoc """
"""
@derive [Poison.Encoder]
defstruct [
:"className",
:"color",
:"declawed"
]
... | 18.8 | 91 | 0.64539 |
ab894cc4f241dec6cd98243f88419d15625fb784 | 2,871 | ex | Elixir | clients/android_publisher/lib/google_api/android_publisher/v2/model/device_metadata.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/android_publisher/lib/google_api/android_publisher/v2/model/device_metadata.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/android_publisher/lib/google_api/android_publisher/v2/model/device_metadata.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 36.807692 | 137 | 0.690003 |
ab89d748406390dcc4c55523f7960bdb7fd8cd7d | 249 | ex | Elixir | lib/elixir_lokalise_api/collections/payment_cards.ex | kianmeng/elixir-lokalise-api | fca59438cbd8ee960adbbce8b13cef12ddc68ef6 | [
"BSD-3-Clause"
] | 3 | 2021-06-24T14:30:31.000Z | 2021-09-06T11:30:17.000Z | lib/elixir_lokalise_api/collections/payment_cards.ex | kianmeng/elixir-lokalise-api | fca59438cbd8ee960adbbce8b13cef12ddc68ef6 | [
"BSD-3-Clause"
] | 8 | 2021-09-15T07:30:59.000Z | 2022-02-01T17:40:17.000Z | lib/elixir_lokalise_api/collections/payment_cards.ex | kianmeng/elixir-lokalise-api | fca59438cbd8ee960adbbce8b13cef12ddc68ef6 | [
"BSD-3-Clause"
] | 2 | 2021-09-07T11:10:51.000Z | 2021-09-26T07:37:39.000Z | defmodule ElixirLokaliseApi.Collection.PaymentCards do
@moduledoc false
defstruct items: [],
total_count: nil,
page_count: nil,
per_page_limit: nil,
current_page: nil,
user_id: nil
end
| 24.9 | 54 | 0.60241 |
ab89f9cb0f471235396b9e39c93ba96466f50806 | 342 | exs | Elixir | priv/repo/migrations/20190323095832_create_users.exs | eendroroy/twitterz_phx | 2611b344bc6216c45c3be8a6352a9405ea643d6b | [
"MIT"
] | 1 | 2019-04-08T04:49:52.000Z | 2019-04-08T04:49:52.000Z | priv/repo/migrations/20190323095832_create_users.exs | eendroroy/twitterz_phx | 2611b344bc6216c45c3be8a6352a9405ea643d6b | [
"MIT"
] | null | null | null | priv/repo/migrations/20190323095832_create_users.exs | eendroroy/twitterz_phx | 2611b344bc6216c45c3be8a6352a9405ea643d6b | [
"MIT"
] | null | null | null | defmodule TwitterZPhx.Repo.Migrations.CreateUsers do
use Ecto.Migration
def change do
create table(:users) do
add :name, :string
add :email, :string
add :password_hash, :string
add :active, :boolean, default: false, null: false
timestamps()
end
create unique_index(:users... | 20.117647 | 56 | 0.657895 |
ab8a04bf8718010c95b191b8f38d40c79f5a666e | 841 | exs | Elixir | apps/omg_conformance/mix.exs | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | null | null | null | apps/omg_conformance/mix.exs | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | null | null | null | apps/omg_conformance/mix.exs | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | null | null | null | defmodule OMG.Conformance.MixProject do
use Mix.Project
def project() do
[
app: :omg_conformance,
version: "#{String.trim(File.read!("../../VERSION"))}",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",
... | 22.72973 | 61 | 0.55648 |
ab8a1bc7281a9ae5af0695c1ba39ca6ab759b3af | 307 | ex | Elixir | lib/course_planner/types/user_role.ex | digitalnatives/course_planner | 27b1c8067edc262685e9c4dcbfcf82633bc8b8dc | [
"MIT"
] | 38 | 2017-04-11T13:37:38.000Z | 2021-05-22T19:35:36.000Z | lib/course_planner/types/user_role.ex | digitalnatives/course_planner | 27b1c8067edc262685e9c4dcbfcf82633bc8b8dc | [
"MIT"
] | 226 | 2017-04-07T13:14:14.000Z | 2018-03-08T16:50:11.000Z | lib/course_planner/types/user_role.ex | digitalnatives/course_planner | 27b1c8067edc262685e9c4dcbfcf82633bc8b8dc | [
"MIT"
] | 7 | 2017-08-30T23:58:13.000Z | 2021-03-28T11:50:45.000Z | defmodule CoursePlanner.Types.UserRole do
@moduledoc """
This module introduces a custom type for Etco for checking user role in the user model
"""
use CoursePlanner.Types.Enum
def type, do: :user_role
def valid_types, do: ["Student", "Teacher", "Coordinator", "Volunteer", "Supervisor"]
end
| 30.7 | 90 | 0.726384 |
ab8a20885ca2dc18b4851fdde20abb66e8706ea4 | 306 | ex | Elixir | code examples/example-14-59.ex | kujua/erlang-elixir-imperative-bookcompanion | 7bc9f033bacd0f8744ec6bcee3932794d594fe69 | [
"Apache-2.0"
] | 8 | 2016-08-14T12:35:16.000Z | 2021-01-26T04:05:31.000Z | code examples/example-14-59.ex | kujua/erlang-elixir-imperative-bookcompanion | 7bc9f033bacd0f8744ec6bcee3932794d594fe69 | [
"Apache-2.0"
] | null | null | null | code examples/example-14-59.ex | kujua/erlang-elixir-imperative-bookcompanion | 7bc9f033bacd0f8744ec6bcee3932794d594fe69 | [
"Apache-2.0"
] | 5 | 2016-08-18T22:12:19.000Z | 2020-02-17T18:52:41.000Z | def getimagelist_as_string(imagelist) do
{_,s} = Enum.map_reduce(
(for n <- imagelist, do: n <> " "),
[],
fn(name,acc) -> {name,List.insert_at(acc,-1,add_path(name))} end)
List.to_string(s)
end
defp add_path(filename) do
Path.join(DarImagelib.Mixfile.getconstant(:respath),filename)
end
| 25.5 | 69 | 0.676471 |
ab8a367ebf6f41eb62ec9ddb19d608a438d912a2 | 7,239 | ex | Elixir | lib/elixir/lib/io/ansi.ex | xtian/elixir | c680eb1a3992309c272e8f808e15990ea5318d6e | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/io/ansi.ex | xtian/elixir | c680eb1a3992309c272e8f808e15990ea5318d6e | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/io/ansi.ex | xtian/elixir | c680eb1a3992309c272e8f808e15990ea5318d6e | [
"Apache-2.0"
] | null | null | null | defmodule IO.ANSI.Sequence do
@moduledoc false
defmacro defsequence(name, code, terminator \\ "m") do
quote bind_quoted: [name: name, code: code, terminator: terminator] do
def unquote(name)() do
"\e[#{unquote(code)}#{unquote(terminator)}"
end
defp format_sequence(unquote(name)) do
... | 28.612648 | 101 | 0.672607 |
ab8a4ae76be28414c609ff6b69ff28b170a67bc6 | 1,230 | ex | Elixir | lib/absinthe_react/endpoint.ex | bessey/phoenix-absinthe-graphiql | 1e7cec10ac0b7de6b513ef47cea9ee71d84323b9 | [
"MIT"
] | 1 | 2017-02-06T23:13:04.000Z | 2017-02-06T23:13:04.000Z | lib/absinthe_react/endpoint.ex | bessey/phoenix-absinthe-graphiql | 1e7cec10ac0b7de6b513ef47cea9ee71d84323b9 | [
"MIT"
] | null | null | null | lib/absinthe_react/endpoint.ex | bessey/phoenix-absinthe-graphiql | 1e7cec10ac0b7de6b513ef47cea9ee71d84323b9 | [
"MIT"
] | null | null | null | defmodule AbsintheReact.Endpoint do
use Phoenix.Endpoint, otp_app: :absinthe_react
socket "/socket", AbsintheReact.UserSocket
# Serve at "/" the static files from "priv/static" directory.
#
# You should set gzip to true if you are running phoenix.digest
# when deploying your static files in production.
... | 28.604651 | 69 | 0.722764 |
ab8a7b8501d4bb759096b5bf9e6cc18e99cbb0df | 1,319 | exs | Elixir | fisherman_server/test/fisherman_server_web/live/linear_shells_table/shell_record_component_test.exs | henrysdev/Fisherman | 57bc51730cedb84a47807e2d617061f2cfe54ffd | [
"MIT"
] | 1 | 2020-05-14T06:07:21.000Z | 2020-05-14T06:07:21.000Z | fisherman_server/test/fisherman_server_web/live/linear_shells_table/shell_record_component_test.exs | henrysdev/Fisherman | 57bc51730cedb84a47807e2d617061f2cfe54ffd | [
"MIT"
] | 19 | 2020-05-04T17:29:44.000Z | 2020-07-05T18:15:10.000Z | fisherman_server/test/fisherman_server_web/live/linear_shells_table/shell_record_component_test.exs | henrysdev/Fisherman | 57bc51730cedb84a47807e2d617061f2cfe54ffd | [
"MIT"
] | null | null | null | defmodule FishermanServerWeb.ShellRecordComponentTest do
use FishermanServerWeb.ConnCase
alias FishermanServerWeb.Live.LinearShellsTable.ShellRecordComponent
test "renders as expected" do
record = %FishermanServer.ShellRecord{
command: "ssh -N -L abc.com user.last@abc",
command_timestamp: ~U[202... | 28.673913 | 70 | 0.624716 |
ab8a84dd536dbd3c3a18f7486c51d30070e4f374 | 214 | ex | Elixir | apps/casher/lib/casher/storage_keys.ex | ehealth-ua/ehealth.api | 4ffe26a464fe40c95fb841a4aa2e147068f65ca2 | [
"Apache-2.0"
] | 8 | 2019-06-14T11:34:49.000Z | 2021-08-05T19:14:24.000Z | apps/casher/lib/casher/storage_keys.ex | edenlabllc/ehealth.api.public | 4ffe26a464fe40c95fb841a4aa2e147068f65ca2 | [
"Apache-2.0"
] | 1 | 2019-07-08T15:20:22.000Z | 2019-07-08T15:20:22.000Z | apps/casher/lib/casher/storage_keys.ex | ehealth-ua/ehealth.api | 4ffe26a464fe40c95fb841a4aa2e147068f65ca2 | [
"Apache-2.0"
] | 6 | 2018-05-11T13:59:32.000Z | 2022-01-19T20:15:22.000Z | defmodule Casher.StorageKeys do
@moduledoc false
@prefix "casher"
@spec person_data(binary, binary) :: binary
def person_data(user_id, client_id), do: "#{@prefix}:person_data:#{user_id}:#{client_id}"
end
| 23.777778 | 91 | 0.724299 |
ab8a8b88d805b60080f1d02b4c595d3fe548aa28 | 789 | ex | Elixir | lib/openflow/meter_band.ex | shun159/tres | 1e3e7f78ba1aa4f184d4be70300e5f4703d50a2f | [
"Beerware"
] | 5 | 2019-05-25T02:25:13.000Z | 2020-10-06T17:00:03.000Z | lib/openflow/meter_band.ex | shun159/tres | 1e3e7f78ba1aa4f184d4be70300e5f4703d50a2f | [
"Beerware"
] | 5 | 2018-03-29T14:42:10.000Z | 2019-11-19T07:03:09.000Z | lib/openflow/meter_band.ex | shun159/tres | 1e3e7f78ba1aa4f184d4be70300e5f4703d50a2f | [
"Beerware"
] | 1 | 2019-03-30T20:48:27.000Z | 2019-03-30T20:48:27.000Z | defmodule Openflow.MeterBand do
def read(meter_band_bin) do
do_read([], meter_band_bin)
end
def to_binary(meter_bands) when is_list(meter_bands) do
to_binary(<<>>, meter_bands)
end
def to_binary(meter_band) do
to_binary([meter_band])
end
# private functions
defp do_read(acc, <<>>), do: E... | 25.451613 | 71 | 0.685678 |
ab8a9d85a203b13ffcbbb014536e5bc9f38766f2 | 908 | ex | Elixir | clients/artifact_registry/lib/google_api/artifact_registry/v1beta1/metadata.ex | mopp/elixir-google-api | d496227d17600bccbdf8f6be9ad1b7e7219d7ec6 | [
"Apache-2.0"
] | null | null | null | clients/artifact_registry/lib/google_api/artifact_registry/v1beta1/metadata.ex | mopp/elixir-google-api | d496227d17600bccbdf8f6be9ad1b7e7219d7ec6 | [
"Apache-2.0"
] | null | null | null | clients/artifact_registry/lib/google_api/artifact_registry/v1beta1/metadata.ex | mopp/elixir-google-api | d496227d17600bccbdf8f6be9ad1b7e7219d7ec6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 33.62963 | 74 | 0.765419 |
ab8a9f5b5441ebdc81c7a58629292aa3a50847ae | 1,114 | ex | Elixir | test/support/conn_case.ex | mogest/superlific | 375d64e3fce594fa1b2322c1652f2f2e648bfe85 | [
"MIT"
] | 6 | 2016-10-13T02:29:54.000Z | 2017-09-13T18:17:56.000Z | test/support/conn_case.ex | mogest/superlific | 375d64e3fce594fa1b2322c1652f2f2e648bfe85 | [
"MIT"
] | null | null | null | test/support/conn_case.ex | mogest/superlific | 375d64e3fce594fa1b2322c1652f2f2e648bfe85 | [
"MIT"
] | null | null | null | defmodule Superlific.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 and query models.
Finally, if the test case interacts with the ... | 24.755556 | 72 | 0.709156 |
ab8ac071891682e350545df2747ef2d8a42a73d2 | 955 | exs | Elixir | test/socket_test.exs | scrogson/phoenix | e5745b9360fa1163246eb507490f1ce760cc0219 | [
"MIT"
] | null | null | null | test/socket_test.exs | scrogson/phoenix | e5745b9360fa1163246eb507490f1ce760cc0219 | [
"MIT"
] | null | null | null | test/socket_test.exs | scrogson/phoenix | e5745b9360fa1163246eb507490f1ce760cc0219 | [
"MIT"
] | null | null | null | defmodule Phoenix.SocketTest do
use ExUnit.Case, async: true
alias Phoenix.Socket.Message
alias Phoenix.Socket.InvalidMessageError
test "from_map! converts a map with string keys into a %Message{}" do
msg = Message.from_map!(%{"topic" => "c", "event" => "e", "payload" => "", "ref" => "r"})
assert msg ... | 35.37037 | 93 | 0.603141 |
ab8afb5c14cbb57de08fe8166df0cc6b0f6b80f9 | 951 | exs | Elixir | examples/server/config/config.exs | charaku/phoenix_wings | b2881ecaea0841d6c27e903ca8965c3ccb6a39c9 | [
"MIT"
] | 132 | 2017-12-30T06:12:34.000Z | 2022-03-13T16:16:24.000Z | examples/server/config/config.exs | charaku/phoenix_wings | b2881ecaea0841d6c27e903ca8965c3ccb6a39c9 | [
"MIT"
] | 25 | 2018-04-04T14:40:30.000Z | 2022-03-23T21:25:17.000Z | examples/server/config/config.exs | charaku/phoenix_wings | b2881ecaea0841d6c27e903ca8965c3ccb6a39c9 | [
"MIT"
] | 46 | 2018-03-18T17:35:21.000Z | 2022-03-23T20:37:01.000Z | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
# General application configuration
use Mix.Config
# Configures the endpoint
config :server, Server... | 33.964286 | 86 | 0.768665 |
ab8b11dfd6e56d6c69d34d5172e165286d28bca9 | 287 | ex | Elixir | apps/alert_processor/lib/aws/aws_client.ex | mbta/alerts_concierge | d8e643445ef06f80ca273f2914c6959daea146f6 | [
"MIT"
] | null | null | null | apps/alert_processor/lib/aws/aws_client.ex | mbta/alerts_concierge | d8e643445ef06f80ca273f2914c6959daea146f6 | [
"MIT"
] | 21 | 2021-03-12T17:05:30.000Z | 2022-02-16T21:48:35.000Z | apps/alert_processor/lib/aws/aws_client.ex | mbta/alerts_concierge | d8e643445ef06f80ca273f2914c6959daea146f6 | [
"MIT"
] | 1 | 2021-12-09T15:09:53.000Z | 2021-12-09T15:09:53.000Z | defmodule AlertProcessor.Aws.AwsClient do
@moduledoc "Wrapper for ExAws allowing it to be mocked in the test environment."
@ex_aws Application.get_env(:alert_processor, :ex_aws)
def request(operation, config_overrides \\ []), do: @ex_aws.request(operation, config_overrides)
end
| 35.875 | 98 | 0.780488 |
ab8b237d3bd30130feedb210552d600455dbe90c | 177 | exs | Elixir | plain-planner/elixir/priv/repo/migrations/20191014200004_create_goals.exs | danielmarreirosdeoliveira/prototypes | 047a7d0cae84b31213c06b45304e41a18e0678cb | [
"Apache-2.0"
] | null | null | null | plain-planner/elixir/priv/repo/migrations/20191014200004_create_goals.exs | danielmarreirosdeoliveira/prototypes | 047a7d0cae84b31213c06b45304e41a18e0678cb | [
"Apache-2.0"
] | 1 | 2020-05-10T13:37:43.000Z | 2020-05-10T13:37:43.000Z | plain-planner/elixir/priv/repo/migrations/20191014200004_create_goals.exs | danielmarreirosdeoliveira/prototypes | 047a7d0cae84b31213c06b45304e41a18e0678cb | [
"Apache-2.0"
] | null | null | null | defmodule Plain.Repo.Migrations.CreateGoals do
use Ecto.Migration
def change do
create table(:goals) do
add :name, :string
timestamps()
end
end
end
| 13.615385 | 46 | 0.666667 |
ab8b43847bad2ff22b7f9df934c479d8a0457198 | 960 | ex | Elixir | lib/shared_settings/config.ex | kieraneglin/shared-settings-ex | 0b2f6e7c7b534ae58158fca01e61e7bd85a4147f | [
"Unlicense"
] | 2 | 2020-10-28T14:15:30.000Z | 2020-12-29T13:52:27.000Z | lib/shared_settings/config.ex | kieraneglin/shared-settings-ex | 0b2f6e7c7b534ae58158fca01e61e7bd85a4147f | [
"Unlicense"
] | null | null | null | lib/shared_settings/config.ex | kieraneglin/shared-settings-ex | 0b2f6e7c7b534ae58158fca01e61e7bd85a4147f | [
"Unlicense"
] | null | null | null | defmodule SharedSettings.Config do
@moduledoc false
@default_redis_config [
host: "localhost",
port: 6379,
database: 0
]
def encryption_key do
case Application.fetch_env!(:shared_settings, :encryption_key) do
nil ->
raise "Encryption key not provided"
key ->
key
... | 20.425532 | 69 | 0.652083 |
ab8b49150263015487d5f2d847a17fd11d7f2d46 | 5,330 | exs | Elixir | test/cachex/actions/put_many_test.exs | botwerk/cachex | d37996d3be35b0d8281e347d44c024ecf2735131 | [
"MIT"
] | 946 | 2017-06-26T00:36:58.000Z | 2022-03-29T19:52:31.000Z | test/cachex/actions/put_many_test.exs | botwerk/cachex | d37996d3be35b0d8281e347d44c024ecf2735131 | [
"MIT"
] | 152 | 2017-06-28T10:01:24.000Z | 2022-03-24T18:46:13.000Z | test/cachex/actions/put_many_test.exs | botwerk/cachex | d37996d3be35b0d8281e347d44c024ecf2735131 | [
"MIT"
] | 84 | 2017-06-30T05:30:31.000Z | 2022-03-01T20:23:16.000Z | defmodule Cachex.Actions.PutManyTest do
use CachexCase
# This test verifies the addition of many new entries to a cache. It will
# ensure that values can be added and can be expired as necessary. These
# test cases operate in the same way as the `set()` tests, jsut using the
# batch insertion method for a ca... | 34.61039 | 93 | 0.621951 |
ab8bd1fa6d23c6f246ac7829e6d630c10c2184a3 | 912 | exs | Elixir | test/suite/draft4/min_properties_test.exs | depressed-pho/xema | 56de4a5d3b3f37827c70f6052f895c59feb0bb51 | [
"MIT"
] | null | null | null | test/suite/draft4/min_properties_test.exs | depressed-pho/xema | 56de4a5d3b3f37827c70f6052f895c59feb0bb51 | [
"MIT"
] | null | null | null | test/suite/draft4/min_properties_test.exs | depressed-pho/xema | 56de4a5d3b3f37827c70f6052f895c59feb0bb51 | [
"MIT"
] | null | null | null | defmodule Draft4.MinPropertiesTest do
use ExUnit.Case, async: true
import Xema, only: [valid?: 2]
describe "minProperties validation" do
setup do
%{schema: Xema.new(min_properties: 1)}
end
test "longer is valid", %{schema: schema} do
data = %{bar: 2, foo: 1}
assert valid?(schema, ... | 21.714286 | 58 | 0.592105 |
ab8be7f28274a6bb8e822eac94e566920165448f | 19,274 | ex | Elixir | lib/ex_azure_key_vault.ex | hecflores/ex_azure_key_vault | 0fcb942ca4c6cfe18c7248cfba119d96cd668e99 | [
"MIT"
] | null | null | null | lib/ex_azure_key_vault.ex | hecflores/ex_azure_key_vault | 0fcb942ca4c6cfe18c7248cfba119d96cd668e99 | [
"MIT"
] | null | null | null | lib/ex_azure_key_vault.ex | hecflores/ex_azure_key_vault | 0fcb942ca4c6cfe18c7248cfba119d96cd668e99 | [
"MIT"
] | null | null | null | defmodule ExAzureKeyVault.Client do
@moduledoc """
Client for creating or getting Azure Key Vault.
"""
alias __MODULE__
alias ExAzureKeyVault.APIVersion
alias ExAzureKeyVault.Auth
alias ExAzureKeyVault.ManagedIdentityAuth
alias ExAzureKeyVault.ClientAssertionAuth
alias ExAzureKeyVault.HTTPUtils
alia... | 33.814035 | 191 | 0.624001 |
ab8c27b9472d08a2827d97a5f01e070361c7670a | 1,520 | ex | Elixir | lib/game_of_life/cell.ex | potto007/elixir-game_of_life | 28402f57f63e16c2c4c0d52b1130f52a2373e1bd | [
"MIT"
] | null | null | null | lib/game_of_life/cell.ex | potto007/elixir-game_of_life | 28402f57f63e16c2c4c0d52b1130f52a2373e1bd | [
"MIT"
] | null | null | null | lib/game_of_life/cell.ex | potto007/elixir-game_of_life | 28402f57f63e16c2c4c0d52b1130f52a2373e1bd | [
"MIT"
] | null | null | null | defmodule GameOfLife.Cell do
alias GameOfLife.Cell
defstruct [:x, :y]
@type t :: %Cell{x: integer, y: integer}
def keep_alive?(alive_cells, {x, y} = _alive_cell) do
case count_neighbours(alive_cells, x, y, 0) do
2 -> true
3 -> true
_ -> false
end
end
def become_alive?(alive_cell... | 28.148148 | 65 | 0.526316 |
ab8c5594b181a9afa8d23add12aeec647263ec1f | 500 | exs | Elixir | config/prod.secret.exs | GregoireLoens/chatbot_api | 0a09ae821332b40d9b0fe1cec0b348fccb874613 | [
"Apache-2.0"
] | null | null | null | config/prod.secret.exs | GregoireLoens/chatbot_api | 0a09ae821332b40d9b0fe1cec0b348fccb874613 | [
"Apache-2.0"
] | null | null | null | config/prod.secret.exs | GregoireLoens/chatbot_api | 0a09ae821332b40d9b0fe1cec0b348fccb874613 | [
"Apache-2.0"
] | null | null | null | use Mix.Config
# In this file, we keep production configuration that
# you'll likely want to automate and keep away from
# your version control system.
#
# You should document the content of this
# file or create a script for recreating it, since it's
# kept out of version control and might be hard to recover
# or rec... | 38.461538 | 85 | 0.798 |
ab8c6b75bae8ea04b5b1ad69589d8e577d2d23df | 1,966 | exs | Elixir | test/elixir/test/reshard_all_docs_test.exs | mtenrero/couchdb-vetcontrol | b7ede3ededdf0072c73f08d8f1217cb723b03f7a | [
"Apache-2.0"
] | null | null | null | test/elixir/test/reshard_all_docs_test.exs | mtenrero/couchdb-vetcontrol | b7ede3ededdf0072c73f08d8f1217cb723b03f7a | [
"Apache-2.0"
] | null | null | null | test/elixir/test/reshard_all_docs_test.exs | mtenrero/couchdb-vetcontrol | b7ede3ededdf0072c73f08d8f1217cb723b03f7a | [
"Apache-2.0"
] | null | null | null | defmodule ReshardAllDocsTest do
use CouchTestCase
import ReshardHelpers
@moduledoc """
Test _all_docs interaction with resharding
"""
setup do
db = random_db_name()
{:ok, _} = create_db(db, query: %{q: 2})
on_exit(fn ->
reset_reshard_state()
delete_db(db)
end)
{:ok, [db: ... | 24.575 | 75 | 0.620549 |
ab8c80b19c23fd73734523df9be8ba497a16bc80 | 3,173 | ex | Elixir | lib/wallaby/phantom/server.ex | JonRowe/wallaby | 00a7b4efdfecb374e4827fa106503e689a4dd967 | [
"MIT"
] | 1 | 2019-01-30T12:08:17.000Z | 2019-01-30T12:08:17.000Z | lib/wallaby/phantom/server.ex | JonRowe/wallaby | 00a7b4efdfecb374e4827fa106503e689a4dd967 | [
"MIT"
] | 2 | 2019-04-10T08:23:27.000Z | 2021-01-25T16:37:23.000Z | lib/wallaby/phantom/server.ex | JonRowe/wallaby | 00a7b4efdfecb374e4827fa106503e689a4dd967 | [
"MIT"
] | 1 | 2019-01-29T16:03:55.000Z | 2019-01-29T16:03:55.000Z | defmodule Wallaby.Phantom.Server do
@moduledoc false
use GenServer
alias Wallaby.Driver.ProcessWorkspace
alias Wallaby.Phantom.Server.ServerState
alias Wallaby.Phantom.Server.StartTask
@type os_pid :: non_neg_integer
@type start_link_opt ::
{:phantom_path, String.t}
@spec start_link([start_link_... | 26.889831 | 129 | 0.709108 |
ab8c905d18c78af97ead726ed89f21cb72c3f321 | 228 | exs | Elixir | config/releases.exs | ream88/jw-dornach | 0a25deae13fafd832421bde21bc21035a128ac7d | [
"MIT"
] | null | null | null | config/releases.exs | ream88/jw-dornach | 0a25deae13fafd832421bde21bc21035a128ac7d | [
"MIT"
] | 4 | 2020-01-28T10:12:25.000Z | 2021-05-10T23:05:12.000Z | config/releases.exs | ream88/jw-dornach | 0a25deae13fafd832421bde21bc21035a128ac7d | [
"MIT"
] | null | null | null | import Config
config :dornach, DornachWeb.Endpoint,
server: true,
http: [port: {:system, "PORT"}],
url: [host: "jw-dornach.at", port: 443]
config :dornach,
env: :prod,
refresh_interval: {:system, "REFRESH_INTERVAL"}
| 20.727273 | 49 | 0.675439 |
ab8c9985ed82bb841d61d1b877e355babc21e327 | 1,921 | exs | Elixir | apps/bifrost/test/bifrost_web/requests/ql_test.exs | thebugcatcher/heimdall | 5da4d2afcf80a8dabd23bbd22b19e24bcbd507a9 | [
"MIT"
] | 2 | 2021-04-03T14:10:20.000Z | 2021-07-07T21:17:35.000Z | apps/bifrost/test/bifrost_web/requests/ql_test.exs | aditya7iyengar/heimdall | 5da4d2afcf80a8dabd23bbd22b19e24bcbd507a9 | [
"MIT"
] | null | null | null | apps/bifrost/test/bifrost_web/requests/ql_test.exs | aditya7iyengar/heimdall | 5da4d2afcf80a8dabd23bbd22b19e24bcbd507a9 | [
"MIT"
] | 1 | 2020-11-12T08:38:35.000Z | 2020-11-12T08:38:35.000Z | defmodule BifrostWeb.QLTest do
use BifrostWeb.APIConnCase
import Mox
alias SecureStorage.EncryptedMessagesMock, as: Mock
alias SecureStorage.Schema.EncryptedMessage
@graphql_path "/api/graphql"
describe "ql list" do
setup ctx do
encrypted_message =
%EncryptedMessage{state: :new, short_... | 24.0125 | 71 | 0.625195 |
ab8cbd73012345926caac26423d337fd084cf44f | 1,786 | ex | Elixir | lib/plug/parsers/multipart.ex | scrogson/plug | 576c04c2cba778f1ac9ca28aa71c50efa1046b50 | [
"Apache-2.0"
] | 1 | 2019-05-07T15:05:52.000Z | 2019-05-07T15:05:52.000Z | lib/plug/parsers/multipart.ex | DavidAlphaFox/Plug | 3a98e7667d76ba8d2eb629e518bcb7ac83a1a188 | [
"Apache-2.0"
] | null | null | null | lib/plug/parsers/multipart.ex | DavidAlphaFox/Plug | 3a98e7667d76ba8d2eb629e518bcb7ac83a1a188 | [
"Apache-2.0"
] | null | null | null | defmodule Plug.Parsers.MULTIPART do
@moduledoc """
Parses multipart request body.
"""
@behaviour Plug.Parsers
def parse(conn, "multipart", subtype, _headers, opts) when subtype in ["form-data", "mixed"] do
{adapter, state} = conn.adapter
try do
adapter.parse_req_multipart(state, opts, &handle... | 27.060606 | 97 | 0.597424 |
ab8cd952086cf32735e8d61f6550e87fd572a6db | 36,625 | exs | Elixir | test/ex_force_test.exs | kianmeng/ex_force | d2f8179d61dce6771d787fc08651071e0f2be448 | [
"MIT"
] | 28 | 2017-09-23T01:05:06.000Z | 2022-03-05T09:59:12.000Z | test/ex_force_test.exs | kianmeng/ex_force | d2f8179d61dce6771d787fc08651071e0f2be448 | [
"MIT"
] | 66 | 2017-09-28T17:08:17.000Z | 2022-03-04T21:04:30.000Z | test/ex_force_test.exs | kianmeng/ex_force | d2f8179d61dce6771d787fc08651071e0f2be448 | [
"MIT"
] | 18 | 2017-09-23T01:07:37.000Z | 2022-02-21T04:12:26.000Z | defmodule ExForceTest do
use ExUnit.Case, async: true
doctest(ExForce)
alias ExForce.{
Client,
QueryResult,
Request,
SObject
}
alias Plug.Conn
@unreachable_url "http://257.0.0.0:0"
setup do
with bypass <- Bypass.open(),
client <-
ExForce.build_client(
... | 30.343828 | 99 | 0.502089 |
ab8cf918c96bbb219ddf0ff1a6320b253a6bcb7e | 2,737 | ex | Elixir | clients/safe_browsing/lib/google_api/safe_browsing/v4/model/threat_entry_set.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/safe_browsing/lib/google_api/safe_browsing/v4/model/threat_entry_set.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/safe_browsing/lib/google_api/safe_browsing/v4/model/threat_entry_set.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... | 45.616667 | 297 | 0.758495 |
ab8d50f44e3942e4a24b0dcc5ef5df7182141377 | 15,493 | exs | Elixir | test/credo/check/warning/unused_path_operation_test.exs | elixir-twister/credo | 619e0ec6e244c5e0c12eeeb58ed9de97e1571d99 | [
"MIT"
] | null | null | null | test/credo/check/warning/unused_path_operation_test.exs | elixir-twister/credo | 619e0ec6e244c5e0c12eeeb58ed9de97e1571d99 | [
"MIT"
] | null | null | null | test/credo/check/warning/unused_path_operation_test.exs | elixir-twister/credo | 619e0ec6e244c5e0c12eeeb58ed9de97e1571d99 | [
"MIT"
] | null | null | null | defmodule Credo.Check.Warning.UnusedPathOperationTest do
use Credo.TestHelper
@described_check Credo.Check.Warning.UnusedPathOperation
test "it should NOT report expected code" do
"""
defmodule CredoSampleModule do
def some_function(parameter1, parameter2) do
Path.join(parameter1) + parameter2
end
end
"... | 24.283699 | 145 | 0.649971 |
ab8d544236928e8cbc48100dfd1722801fb6546a | 3,477 | ex | Elixir | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1__label_detection_config.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1__label_detection_config.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1__label_detection_config.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.4625 | 142 | 0.72505 |
ab8dc8f7a50b52a7a03b8821447e2707b6b2e840 | 272 | ex | Elixir | lib/graphql/resolvers/viewer.ex | suryatmodulus/accent | 6aaf34075c33f3d9d84d38237af4a39b594eb808 | [
"BSD-3-Clause"
] | 806 | 2018-04-07T20:40:33.000Z | 2022-03-30T01:39:57.000Z | lib/graphql/resolvers/viewer.ex | suryatmodulus/accent | 6aaf34075c33f3d9d84d38237af4a39b594eb808 | [
"BSD-3-Clause"
] | 194 | 2018-04-07T13:49:37.000Z | 2022-03-30T19:58:45.000Z | lib/graphql/resolvers/viewer.ex | doc-ai/accent | e337e16f3658cc0728364f952c0d9c13710ebb06 | [
"BSD-3-Clause"
] | 89 | 2018-04-09T13:55:49.000Z | 2022-03-24T07:09:31.000Z | defmodule Accent.GraphQL.Resolvers.Viewer do
alias Accent.{
Plugs.GraphQLContext,
User
}
@spec show(nil, map(), GraphQLContext.t()) :: {:ok, User.t() | nil}
def show(_, _, %{context: context}) do
{:ok, context[:conn].assigns[:current_user]}
end
end
| 22.666667 | 69 | 0.643382 |
ab8df5627564bff053b14195a341ee3508c1faf0 | 386 | exs | Elixir | clients/spanner/test/test_helper.exs | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/spanner/test/test_helper.exs | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | null | null | null | clients/spanner/test/test_helper.exs | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | 1 | 2020-11-10T16:58:27.000Z | 2020-11-10T16:58:27.000Z | ExUnit.start()
defmodule GoogleApi.Spanner.V1.TestHelper do
defmacro __using__(opts) do
quote do
use ExUnit.Case, unquote(opts)
import GoogleApi.Spanner.V1.TestHelper
end
end
def for_scope(scopes) when is_list(scopes), do: for_scope(Enum.join(scopes, " "))
def for_scope(scope) do
{:ok... | 20.315789 | 83 | 0.696891 |
ab8e01ddb79c7c9a1602f544f2d861a175ac1441 | 223 | ex | Elixir | squitter/lib/squitter/decoding/ext_squitter/airborne_position.ex | electricshaman/squitter | 7a0dfbc125118b764d192f02b42b36596f6d4ac6 | [
"MIT"
] | 34 | 2017-08-30T02:29:41.000Z | 2021-05-29T20:21:43.000Z | squitter/lib/squitter/decoding/ext_squitter/airborne_position.ex | electricshaman/squitter | 7a0dfbc125118b764d192f02b42b36596f6d4ac6 | [
"MIT"
] | 7 | 2017-09-12T05:27:23.000Z | 2020-01-06T22:07:52.000Z | squitter/lib/squitter/decoding/ext_squitter/airborne_position.ex | electricshaman/squitter | 7a0dfbc125118b764d192f02b42b36596f6d4ac6 | [
"MIT"
] | 9 | 2017-09-11T22:17:55.000Z | 2022-01-31T03:07:58.000Z | defmodule Squitter.Decoding.ExtSquitter.AirbornePosition do
defstruct [
:tc,
:ss,
:nic_sa,
:nic_sb,
:nic,
:rc,
:alt,
:alt_type,
:utc_time,
:flag,
:lat_cpr,
:lon_cpr
]
end
| 13.117647 | 59 | 0.556054 |
ab8e2d801c7d8cc6c8f078aceaed607e31a214fb | 1,729 | ex | Elixir | lib/auto_api/capabilities/failure_message_capability.ex | nonninz/auto-api-elixir | 53e11542043285e94bbb5a0a3b8ffff0b1b47167 | [
"MIT"
] | null | null | null | lib/auto_api/capabilities/failure_message_capability.ex | nonninz/auto-api-elixir | 53e11542043285e94bbb5a0a3b8ffff0b1b47167 | [
"MIT"
] | null | null | null | lib/auto_api/capabilities/failure_message_capability.ex | nonninz/auto-api-elixir | 53e11542043285e94bbb5a0a3b8ffff0b1b47167 | [
"MIT"
] | null | null | null | # AutoAPI
# The MIT License
#
# Copyright (c) 2018- High-Mobility GmbH (https://high-mobility.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without lim... | 38.422222 | 79 | 0.749566 |
ab8e42cbf81ef4eacfa451ec04f2303ff09f20a2 | 52,386 | ex | Elixir | lib/codes/codes_t71.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_t71.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_t71.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | defmodule IcdCode.ICDCode.Codes_T71 do
alias IcdCode.ICDCode
def _T71111A do
%ICDCode{full_code: "T71111A",
category_code: "T71",
short_code: "111A",
full_name: "Asphyxiation due to smothering under pillow, accidental, initial encounter",
short_name: "Asphyxiation due to s... | 49.420755 | 161 | 0.677624 |
ab8e75b4927d9551b8bad689428edc58cfa6cb0f | 2,022 | exs | Elixir | test/corex_web/controllers/session_controller_test.exs | eahanson/corex | 550020c5cbfc7dc828bc74e1edf0223c1cbffef1 | [
"MIT"
] | null | null | null | test/corex_web/controllers/session_controller_test.exs | eahanson/corex | 550020c5cbfc7dc828bc74e1edf0223c1cbffef1 | [
"MIT"
] | null | null | null | test/corex_web/controllers/session_controller_test.exs | eahanson/corex | 550020c5cbfc7dc828bc74e1edf0223c1cbffef1 | [
"MIT"
] | null | null | null | defmodule CorexWeb.SessionControllerTest do
use CorexWeb.ConnCase
use Plug.Test
import Corex.Test.Auth, only: [assert_auth: 3]
alias Corex.Accounts
alias Corex.Test
alias CorexWeb.Endpoint
alias CorexWeb.Session
describe "new session" do
defp get_new(conn) do
get(conn, session_path(conn, :n... | 27.69863 | 86 | 0.642928 |
ab8e9df14b26915eae4905051669ffd63e5e72a3 | 1,197 | ex | Elixir | lib/shenu/message/coordinate.ex | jsdelivrbot/shenu | 98acf65b915b62528eccd824020e8007931ee01c | [
"MIT"
] | 3 | 2016-06-19T00:21:54.000Z | 2021-09-28T22:04:07.000Z | lib/shenu/message/coordinate.ex | jsdelivrbot/shenu | 98acf65b915b62528eccd824020e8007931ee01c | [
"MIT"
] | null | null | null | lib/shenu/message/coordinate.ex | jsdelivrbot/shenu | 98acf65b915b62528eccd824020e8007931ee01c | [
"MIT"
] | 1 | 2018-12-06T22:51:26.000Z | 2018-12-06T22:51:26.000Z | defmodule Shenu.Message.Coordinate do
use Shenu.Message
defstruct dimensions: %{}
def new(dimensions \\ %{}) when is_map(dimensions) do
cast(%{dimensions: dimensions})
end
def schema(dimensions \\ [])
def schema(dimensions) when is_list(dimensions) do
dimensions
|> Enum.reduce(%{}, fn(key, ac... | 22.584906 | 80 | 0.587302 |
ab8eb0de8f68383c7f11a9fd69414b71cddfbcfa | 1,430 | ex | Elixir | lib/zeroth/token/cache.ex | arnau/zeroth | 6826f140567002449cacc1502ade00e5da23c7ad | [
"MIT"
] | 1 | 2017-06-02T10:07:47.000Z | 2017-06-02T10:07:47.000Z | lib/zeroth/token/cache.ex | arnau/zeroth | 6826f140567002449cacc1502ade00e5da23c7ad | [
"MIT"
] | null | null | null | lib/zeroth/token/cache.ex | arnau/zeroth | 6826f140567002449cacc1502ade00e5da23c7ad | [
"MIT"
] | null | null | null | defmodule Zeroth.Token.Cache do
@moduledoc """
Agent acting as a cache for a token.
"""
alias Zeroth.Token
@doc false
def start_link do
Agent.start_link(fn -> %{} end, name: __MODULE__)
end
def get(key) do
Agent.get(__MODULE__, &Map.get(&1, key))
end
@doc false
def put(key, value) do
... | 19.861111 | 70 | 0.576224 |
ab8eb7d0f01ab4ed1db0f01a3f26ba5ec2490a06 | 4,516 | ex | Elixir | lib/ash/sort/sort.ex | ash-project/ash | 63c240ebbdda6efc2ba8b24547f143cb8bd8c57e | [
"MIT"
] | 528 | 2019-12-08T01:51:54.000Z | 2022-03-30T10:09:45.000Z | lib/ash/sort/sort.ex | ash-project/ash | 63c240ebbdda6efc2ba8b24547f143cb8bd8c57e | [
"MIT"
] | 278 | 2019-12-04T15:25:06.000Z | 2022-03-31T03:40:51.000Z | lib/ash/sort/sort.ex | ash-project/ash | 63c240ebbdda6efc2ba8b24547f143cb8bd8c57e | [
"MIT"
] | 53 | 2020-08-17T22:08:09.000Z | 2022-03-24T01:58:59.000Z | defmodule Ash.Sort do
@moduledoc """
Utilities and types for sorting.
## Important
Keyset pagination cannot currently be used in conjunction with aggregate and calculation sorting.
Combining them will result in an error on the query.
"""
@type sort_order ::
:asc | :desc | :asc_nils_first | :a... | 28.948718 | 99 | 0.632418 |
ab8ec81d5417b4bbb43fdab1dd873228a04fe90f | 2,176 | ex | Elixir | lib/adaptable_costs_evaluator/outputs/output.ex | patrotom/adaptable-costs-evaluator | c97e65af1e021d7c6acf6564f4671c60321346e3 | [
"MIT"
] | null | null | null | lib/adaptable_costs_evaluator/outputs/output.ex | patrotom/adaptable-costs-evaluator | c97e65af1e021d7c6acf6564f4671c60321346e3 | [
"MIT"
] | 4 | 2021-12-07T12:26:50.000Z | 2021-12-30T14:17:25.000Z | lib/adaptable_costs_evaluator/outputs/output.ex | patrotom/adaptable-costs-evaluator | c97e65af1e021d7c6acf6564f4671c60321346e3 | [
"MIT"
] | null | null | null | defmodule AdaptableCostsEvaluator.Outputs.Output do
@moduledoc """
An `AdaptableCostsEvaluator.Outputs.Output` holds the result of the evaluation
of the particular `AdaptableCostsEvaluator.Formulas.Formula`. The value of the
`AdaptableCostsEvaluator.Outputs.Output` is always validated against the linked
`Adap... | 32 | 96 | 0.71829 |
ab8f2d5f954074b89e3c0545ea77be50021d2ed1 | 6,015 | ex | Elixir | clients/proximity_beacon/lib/google_api/proximity_beacon/v1beta1/model/beacon.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/proximity_beacon/lib/google_api/proximity_beacon/v1beta1/model/beacon.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/proximity_beacon/lib/google_api/proximity_beacon/v1beta1/model/beacon.ex | 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... | 49.710744 | 196 | 0.713051 |
ab8f2eebdfa86cf28af208c0190e0fc1d52706c1 | 2,343 | ex | Elixir | clients/spectrum/lib/google_api/spectrum/v1explorer/model/geo_location_polygon.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/spectrum/lib/google_api/spectrum/v1explorer/model/geo_location_polygon.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/spectrum/lib/google_api/spectrum/v1explorer/model/geo_location_polygon.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... | 48.8125 | 874 | 0.775075 |
ab8f55a587a4eeb7f5a9fffa623710281c0710b6 | 1,573 | ex | Elixir | clients/cloud_resource_manager/lib/google_api/cloud_resource_manager/v1/model/get_effective_org_policy_request.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/cloud_resource_manager/lib/google_api/cloud_resource_manager/v1/model/get_effective_org_policy_request.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/cloud_resource_manager/lib/google_api/cloud_resource_manager/v1/model/get_effective_org_policy_request.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 33.468085 | 123 | 0.75588 |
ab8f6a3a4605301b6e703739909f4bdee3a88045 | 3,253 | exs | Elixir | src/apps/utils/test/utils_build_test.exs | fortelabsinc/PlayerExchange | 442629df9716b45dd31f2bb1127309f4f9d2b0ee | [
"MIT"
] | null | null | null | src/apps/utils/test/utils_build_test.exs | fortelabsinc/PlayerExchange | 442629df9716b45dd31f2bb1127309f4f9d2b0ee | [
"MIT"
] | 42 | 2020-04-28T20:39:12.000Z | 2022-02-27T03:54:44.000Z | src/apps/utils/test/utils_build_test.exs | fortelabsinc/PlayerExchange | 442629df9716b45dd31f2bb1127309f4f9d2b0ee | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright (c) 2020 forte labs inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, mer... | 25.023077 | 80 | 0.663695 |
ab8f6f6a01a7b0cb8a3b0938cb2130a6ed515f81 | 1,942 | ex | Elixir | lib/vnu/validator.ex | angelikatyborska/vnu-elixir | c12676e41b7fba3b8acf98812f0e3a054c298458 | [
"MIT"
] | 51 | 2020-04-11T22:30:43.000Z | 2022-01-14T13:24:56.000Z | lib/vnu/validator.ex | angelikatyborska/vnu-elixir | c12676e41b7fba3b8acf98812f0e3a054c298458 | [
"MIT"
] | 20 | 2020-04-13T12:20:49.000Z | 2022-03-29T18:32:41.000Z | lib/vnu/validator.ex | angelikatyborska/vnu-elixir | c12676e41b7fba3b8acf98812f0e3a054c298458 | [
"MIT"
] | null | null | null | defmodule Vnu.Validator do
@moduledoc false
alias Vnu.{Config, HTTP, Error, Result}
@doc false
def valid?(%Result{messages: messages}, opts \\ []) do
fail_on_warnings = Keyword.get(opts, :fail_on_warnings, false)
Enum.all?(messages, fn message ->
message.type == :info && (fail_on_warnings == fa... | 27.352113 | 99 | 0.612255 |
ab8f7d1cbb00b07e289e2ed4d014eb9449e36efa | 2,330 | exs | Elixir | test/recon_trace_test.exs | marcinkoziej/recon_ex | 0f34b75e1d12870ba3b2a30e55f4c3db300b3034 | [
"BSD-3-Clause"
] | null | null | null | test/recon_trace_test.exs | marcinkoziej/recon_ex | 0f34b75e1d12870ba3b2a30e55f4c3db300b3034 | [
"BSD-3-Clause"
] | null | null | null | test/recon_trace_test.exs | marcinkoziej/recon_ex | 0f34b75e1d12870ba3b2a30e55f4c3db300b3034 | [
"BSD-3-Clause"
] | null | null | null | defmodule ReconTraceTest do
use ExUnit.Case
# doctest ReconTrace
import ReconTrace, only: [to_erl_tspec: 1, format: 1]
test "to_erl_tspec/1" do
shellfun = make_shellfun("fn([n, _]) when n > 10 -> :ok end")
matchspec = [{[:"$1", :_], [{:>, :"$1", 10}], [:ok]}]
assert to_erl_tspec({:queue, :in, she... | 30.657895 | 97 | 0.564378 |
ab8f95d870715c1e161b40434844db704353092a | 1,520 | ex | Elixir | src/mailer/lib/mailer/application.ex | alexjoybc/elixir-kafka-phoenix | c3d20415f980455081102f3bd4287647bf2292ba | [
"Apache-2.0"
] | null | null | null | src/mailer/lib/mailer/application.ex | alexjoybc/elixir-kafka-phoenix | c3d20415f980455081102f3bd4287647bf2292ba | [
"Apache-2.0"
] | null | null | null | src/mailer/lib/mailer/application.ex | alexjoybc/elixir-kafka-phoenix | c3d20415f980455081102f3bd4287647bf2292ba | [
"Apache-2.0"
] | null | null | null | defmodule Mailer.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
import Supervisor.Spec
alias Mailer.Consumers.BookingConsumer
consumer_group_opts = [
# setting for the ... | 28.148148 | 82 | 0.699342 |
ab8fc8754bfd202d0350fdc1123adfa77cea1b03 | 1,496 | exs | Elixir | mix.exs | ianatha/ledgerex | 7936bbe3823fb4da5b2d3767cf2a365a00281cfe | [
"Apache-2.0"
] | 4 | 2020-02-17T05:25:36.000Z | 2021-02-26T13:20:46.000Z | mix.exs | ianatha/ledgerex | 7936bbe3823fb4da5b2d3767cf2a365a00281cfe | [
"Apache-2.0"
] | null | null | null | mix.exs | ianatha/ledgerex | 7936bbe3823fb4da5b2d3767cf2a365a00281cfe | [
"Apache-2.0"
] | null | null | null | defmodule Ledger.MixProject do
use Mix.Project
@name :ledgerex
@version "0.0.1"
@maintainers ["Ian Atha <ian@atha.io>"]
@github "https://github.com/ianatha/#{@name}"
@source_url @github
@homepage_url @github
@description """
Parser for ledger-cli accounting files.
"""
def project do
[
... | 22.328358 | 64 | 0.529412 |
ab8fd6e771ebe25c4751035b09e53e55336d08a5 | 1,768 | ex | Elixir | clients/analytics/lib/google_api/analytics/v3/model/ga_data_data_table.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/analytics/lib/google_api/analytics/v3/model/ga_data_data_table.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/analytics/lib/google_api/analytics/v3/model/ga_data_data_table.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 ... | 35.36 | 102 | 0.73586 |
ab8ffd18232a46a2d4332a6e2bf07c492f7d3bb7 | 430 | ex | Elixir | lib/kojin/pod_rust/enum_properties.ex | patefacio/kojin | 34f1959b7fa5fdc48e07ae6d81f8fa3ab31af982 | [
"MIT"
] | 3 | 2021-12-20T04:46:00.000Z | 2022-01-31T22:26:44.000Z | lib/kojin/pod_rust/enum_properties.ex | patefacio/kojin | 34f1959b7fa5fdc48e07ae6d81f8fa3ab31af982 | [
"MIT"
] | 1 | 2021-12-20T14:46:50.000Z | 2021-12-20T14:46:50.000Z | lib/kojin/pod_rust/enum_properties.ex | patefacio/kojin | 34f1959b7fa5fdc48e07ae6d81f8fa3ab31af982 | [
"MIT"
] | 1 | 2021-12-20T00:15:52.000Z | 2021-12-20T00:15:52.000Z | defmodule Kojin.PodRust.EnumProperties do
@moduledoc false
require Logger
alias Kojin.Pod.PodEnum
import Kojin.Rust
def snake_conversions(%PodEnum{} = pod_enum, snake_conversions \\ true)
when is_boolean(snake_conversions) do
put_in(
pod_enum,
[
Access.key(:properties, %{}),
... | 20.47619 | 73 | 0.646512 |
ab904edb36746d40385bae529ab9afee33cefea2 | 1,911 | ex | Elixir | clients/logging/lib/google_api/logging/v2/model/list_logs_response.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | null | null | null | clients/logging/lib/google_api/logging/v2/model/list_logs_response.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | null | null | null | clients/logging/lib/google_api/logging/v2/model/list_logs_response.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | 1 | 2020-11-10T16:58:27.000Z | 2020-11-10T16:58:27.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... | 37.470588 | 254 | 0.744636 |
ab9069aaa90d0cb8deffc9e5b66c642141b608c5 | 85 | ex | Elixir | lib/elixir_google_scraper_web/views/page_view.ex | junan/elixir_google_scraper | d032f3a9d5a30e354f1e6d607434670334936630 | [
"MIT"
] | null | null | null | lib/elixir_google_scraper_web/views/page_view.ex | junan/elixir_google_scraper | d032f3a9d5a30e354f1e6d607434670334936630 | [
"MIT"
] | 25 | 2021-05-21T02:23:37.000Z | 2021-07-09T09:22:32.000Z | lib/elixir_google_scraper_web/views/page_view.ex | junan/elixir_google_scraper | d032f3a9d5a30e354f1e6d607434670334936630 | [
"MIT"
] | null | null | null | defmodule ElixirGoogleScraperWeb.PageView do
use ElixirGoogleScraperWeb, :view
end
| 21.25 | 44 | 0.858824 |
ab907a40ae2c132011234234a7c0f76afff3fc9e | 1,402 | exs | Elixir | exercises/practice/nucleotide-count/test/nucleotide_count_test.exs | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 343 | 2017-06-22T16:28:28.000Z | 2022-03-25T21:33:32.000Z | exercises/practice/nucleotide-count/test/nucleotide_count_test.exs | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 583 | 2017-06-19T10:48:40.000Z | 2022-03-28T21:43:12.000Z | exercises/practice/nucleotide-count/test/nucleotide_count_test.exs | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 228 | 2017-07-05T07:09:32.000Z | 2022-03-27T08:59:08.000Z | defmodule NucleotideCountTest do
use ExUnit.Case
describe "count" do
# @tag :pending
test "empty dna string has no adenine" do
assert NucleotideCount.count('', ?A) == 0
end
@tag :pending
test "one nucleotide" do
assert NucleotideCount.count('G', ?G) == 1
end
@tag :pending
... | 26.45283 | 82 | 0.606277 |
ab9080f2d6caf22d71d1a1057aef936b4102e133 | 1,692 | ex | Elixir | clients/content/lib/google_api/content/v2/model/order_shipment_scheduled_delivery_details.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/order_shipment_scheduled_delivery_details.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/order_shipment_scheduled_delivery_details.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 33.84 | 129 | 0.742908 |
ab908356bfdd0bf4730437edd491c0df15fb8013 | 3,985 | ex | Elixir | lib/bejo/parser/helper.ex | fossabot/bejo | 7d25d68ef97bd77b7d53fc9a9546261fdc99bfba | [
"Apache-2.0"
] | null | null | null | lib/bejo/parser/helper.ex | fossabot/bejo | 7d25d68ef97bd77b7d53fc9a9546261fdc99bfba | [
"Apache-2.0"
] | null | null | null | lib/bejo/parser/helper.ex | fossabot/bejo | 7d25d68ef97bd77b7d53fc9a9546261fdc99bfba | [
"Apache-2.0"
] | null | null | null | defmodule Bejo.Parser.Helper do
import NimbleParsec
def to_ast(c, kind) do
c
|> line()
|> byte_offset()
|> map({Bejo.Parser.Helper, :put_line_offset, []})
|> map({Bejo.Parser.Helper, :do_to_ast, [kind]})
end
def put_line_offset({[{result, {line, line_start_offset}}], string_offset}) do
... | 24.447853 | 91 | 0.593225 |
ab90b3a8a3f7693a3ac24ba4d624de8cbe21381d | 2,652 | ex | Elixir | lib/epicenter_web/presenters/people_presenter.ex | geometricservices/epi-viewpoin | ecb5316ea0f3f7299d5ff63e2de588539005ac1c | [
"Apache-2.0"
] | 5 | 2021-02-25T18:43:09.000Z | 2021-02-27T06:00:35.000Z | lib/epicenter_web/presenters/people_presenter.ex | geometricservices/epi-viewpoint | ecb5316ea0f3f7299d5ff63e2de588539005ac1c | [
"Apache-2.0"
] | 3 | 2021-12-13T17:52:47.000Z | 2021-12-17T01:35:31.000Z | lib/epicenter_web/presenters/people_presenter.ex | geometricservices/epi-viewpoint | ecb5316ea0f3f7299d5ff63e2de588539005ac1c | [
"Apache-2.0"
] | 1 | 2022-01-27T23:26:38.000Z | 2022-01-27T23:26:38.000Z | defmodule EpicenterWeb.Presenters.PeoplePresenter do
alias Epicenter.Cases
alias Epicenter.Cases.Person
alias Epicenter.Extra
alias EpicenterWeb.Format
alias EpicenterWeb.Presenters.CaseInvestigationPresenter
alias EpicenterWeb.Presenters.LabResultPresenter
alias EpicenterWeb.Unknown
def archive_confir... | 33.15 | 118 | 0.714555 |
ab90b86f3de5561dd18c897e9769a566f3bc195a | 77 | ex | Elixir | lib/awesome_elixir/web/views/layout_view.ex | sprql/awesome_elixir | ae1a372bf3060142a546aaf6cb28ffda491d9fa0 | [
"MIT"
] | 1 | 2017-04-13T05:37:08.000Z | 2017-04-13T05:37:08.000Z | lib/awesome_elixir/web/views/layout_view.ex | sprql/awesome_elixir | ae1a372bf3060142a546aaf6cb28ffda491d9fa0 | [
"MIT"
] | null | null | null | lib/awesome_elixir/web/views/layout_view.ex | sprql/awesome_elixir | ae1a372bf3060142a546aaf6cb28ffda491d9fa0 | [
"MIT"
] | null | null | null | defmodule AwesomeElixir.Web.LayoutView do
use AwesomeElixir.Web, :view
end
| 19.25 | 41 | 0.818182 |
ab90cddff507666fdfc78c50161d9cfa35af9cee | 4,494 | ex | Elixir | lib/planga/connection.ex | ResiliaDev/Planga | b21d290dd7c2c7fa30571d0a5124d63bd09c0c9e | [
"MIT"
] | 37 | 2018-07-13T14:08:16.000Z | 2021-04-09T15:00:22.000Z | lib/planga/connection.ex | ResiliaDev/Planga | b21d290dd7c2c7fa30571d0a5124d63bd09c0c9e | [
"MIT"
] | 9 | 2018-07-16T15:24:39.000Z | 2021-09-01T14:21:20.000Z | lib/planga/connection.ex | ResiliaDev/Planga | b21d290dd7c2c7fa30571d0a5124d63bd09c0c9e | [
"MIT"
] | 3 | 2018-10-05T20:19:25.000Z | 2019-12-05T00:30:01.000Z | defmodule Planga.Connection do
@moduledoc """
Functions to handle the initial connection someone makes to the Planga Chat Server.
(Regardless of transport layer)
"""
def connect(encoded_public_api_id, encoded_encrypted_conversation_info) do
# {public_api_id, encrypted_conversation_info} =
public_api_i... | 33.288889 | 113 | 0.737428 |
ab90fc03a04c4e3f963d5557d3d29dc0c310be21 | 2,192 | ex | Elixir | lib/changelog_web/controllers/admin/benefit_controller.ex | PsOverflow/changelog.com | 53f4ecfc39b021c6b8cfcc0fa11f29aff8038a7f | [
"MIT"
] | 1 | 2021-03-14T21:12:49.000Z | 2021-03-14T21:12:49.000Z | lib/changelog_web/controllers/admin/benefit_controller.ex | PsOverflow/changelog.com | 53f4ecfc39b021c6b8cfcc0fa11f29aff8038a7f | [
"MIT"
] | null | null | null | lib/changelog_web/controllers/admin/benefit_controller.ex | PsOverflow/changelog.com | 53f4ecfc39b021c6b8cfcc0fa11f29aff8038a7f | [
"MIT"
] | 1 | 2018-10-03T20:55:52.000Z | 2018-10-03T20:55:52.000Z | defmodule ChangelogWeb.Admin.BenefitController do
use ChangelogWeb, :controller
alias Changelog.Benefit
plug :assign_benefit when action in [:edit, :update, :delete]
plug Authorize, [Policies.AdminsOnly, :benefit]
plug :scrub_params, "benefit" when action in [:create, :update]
def index(conn, params) do
... | 29.621622 | 96 | 0.646898 |
ab90fe6c24b0c1720a80cb7040824afe81347751 | 45,875 | ex | Elixir | apps/astarte_realm_management/lib/astarte_realm_management/queries.ex | Spidey20202022/astarte | 3950855c592b34363af0cf7f8a921762ce64e512 | [
"Apache-2.0"
] | 1 | 2020-02-04T13:15:22.000Z | 2020-02-04T13:15:22.000Z | apps/astarte_realm_management/lib/astarte_realm_management/queries.ex | Spidey20202022/astarte | 3950855c592b34363af0cf7f8a921762ce64e512 | [
"Apache-2.0"
] | 1 | 2020-01-20T09:52:48.000Z | 2020-01-20T09:52:48.000Z | apps/astarte_realm_management/lib/astarte_realm_management/queries.ex | Spidey20202022/astarte | 3950855c592b34363af0cf7f8a921762ce64e512 | [
"Apache-2.0"
] | 1 | 2020-02-04T13:15:50.000Z | 2020-02-04T13:15:50.000Z | #
# This file is part of Astarte.
#
# Copyright 2017 Ispirata Srl
#
# 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 appl... | 33.981481 | 198 | 0.671259 |
ab91216dc18f2795937ca8822d43a6c2876b3acf | 1,386 | exs | Elixir | scripts/code_breaker.exs | rob-brown/genetic | 48996c04c8ff504f37013ba0df0ef5cee2986ea9 | [
"MIT"
] | null | null | null | scripts/code_breaker.exs | rob-brown/genetic | 48996c04c8ff504f37013ba0df0ef5cee2986ea9 | [
"MIT"
] | null | null | null | scripts/code_breaker.exs | rob-brown/genetic | 48996c04c8ff504f37013ba0df0ef5cee2986ea9 | [
"MIT"
] | null | null | null | #! /usr/bin/env elixir
Mix.install([
{:genetic, path: Path.join(__DIR__, "..")}
])
defmodule CodeBreaker do
alias Genetic.{Problem, Chromosome, BasicChromosome}
@behaviour Problem
@impl Problem
def genotype() do
genes = for _ <- 1..64, do: Enum.random(0..1)
%BasicChromosome{genes: genes, size: 64}
... | 23.491525 | 83 | 0.657287 |
ab916b3f1fcb03203f8732d6a548e64419e2be8d | 2,305 | exs | Elixir | test/pool_new_test.exs | alekras/ex.rsr_pool | ea64d407ee3a8e13a8f57efec3a64f0e79a2ffe2 | [
"Apache-2.0"
] | null | null | null | test/pool_new_test.exs | alekras/ex.rsr_pool | ea64d407ee3a8e13a8f57efec3a64f0e79a2ffe2 | [
"Apache-2.0"
] | null | null | null | test/pool_new_test.exs | alekras/ex.rsr_pool | ea64d407ee3a8e13a8f57efec3a64f0e79a2ffe2 | [
"Apache-2.0"
] | null | null | null | defmodule NewResourcePoolTest do
use ExUnit.Case, async: false
def set(:default), do: {Factory, []}
def set(:custom) do
{Factory,
[max_active: 16,
max_idle: 12,
min_idle: 3,
test_on_borrow: true,
test_on_return: true,
fifo: true,
when_exhausted_action: :grow,
ma... | 29.935065 | 86 | 0.646421 |
ab91720396f4a725ab305aaa816627c3afef6634 | 1,852 | exs | Elixir | clients/redis/mix.exs | mopp/elixir-google-api | d496227d17600bccbdf8f6be9ad1b7e7219d7ec6 | [
"Apache-2.0"
] | null | null | null | clients/redis/mix.exs | mopp/elixir-google-api | d496227d17600bccbdf8f6be9ad1b7e7219d7ec6 | [
"Apache-2.0"
] | null | null | null | clients/redis/mix.exs | mopp/elixir-google-api | d496227d17600bccbdf8f6be9ad1b7e7219d7ec6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 27.641791 | 124 | 0.655508 |
ab9178844fc530068e9105684608667f5f4f6463 | 1,784 | ex | Elixir | web/controllers/congregation_controller.ex | melbystyle/jw_ministry_api | 2065d628a84e829b805c71b7e73fb0bee3d0dd44 | [
"Apache-2.0"
] | 1 | 2017-06-19T18:18:11.000Z | 2017-06-19T18:18:11.000Z | web/controllers/congregation_controller.ex | melbystyle/jw_ministry_api | 2065d628a84e829b805c71b7e73fb0bee3d0dd44 | [
"Apache-2.0"
] | null | null | null | web/controllers/congregation_controller.ex | melbystyle/jw_ministry_api | 2065d628a84e829b805c71b7e73fb0bee3d0dd44 | [
"Apache-2.0"
] | null | null | null | defmodule JwMinistryApi.CongregationController do
use JwMinistryApi.Web, :controller
alias JwMinistryApi.Congregation
def index(conn, _params) do
congregations = Repo.all(Congregation)
render(conn, "index.json", congregations: congregations)
end
def create(conn, %{"congregation" => congregation_par... | 31.857143 | 84 | 0.671525 |
ab91b47ec9335b296b1ec05c619ebfa1d9372197 | 17,481 | ex | Elixir | lib/oli/delivery/attempts/activity_lifecycle/evaluate.ex | DevShashi1993/oli-torus | e6e0b66f0973f9790a5785731b22db6fb1c50a73 | [
"MIT"
] | 45 | 2020-04-17T15:40:27.000Z | 2022-03-25T00:13:30.000Z | lib/oli/delivery/attempts/activity_lifecycle/evaluate.ex | DevShashi1993/oli-torus | e6e0b66f0973f9790a5785731b22db6fb1c50a73 | [
"MIT"
] | 944 | 2020-02-13T02:37:01.000Z | 2022-03-31T17:50:07.000Z | lib/oli/delivery/attempts/activity_lifecycle/evaluate.ex | DevShashi1993/oli-torus | e6e0b66f0973f9790a5785731b22db6fb1c50a73 | [
"MIT"
] | 23 | 2020-07-28T03:36:13.000Z | 2022-03-17T14:29:02.000Z | defmodule Oli.Delivery.Attempts.ActivityLifecycle.Evaluate do
alias Oli.Repo
alias Oli.Delivery.Evaluation.{Result, EvaluationContext, Standard, Adaptive}
alias Oli.Delivery.Attempts.Core.{ActivityAttempt, ClientEvaluation, StudentInput}
alias Oli.Delivery.Snapshots
alias Oli.Delivery.Attempts.Scoring
alia... | 35.458418 | 131 | 0.622104 |
ab91c2795291e6c81b0689bd04e9538fd39e3139 | 850 | exs | Elixir | apps/plant_monitor/test/helpers/mutation_adapter_test.exs | bartoszgorka/PlantMonitor | 23e18cd76c51bd8eee021ee98668926de885047b | [
"MIT"
] | 2 | 2019-01-25T21:21:56.000Z | 2021-02-24T08:18:51.000Z | apps/plant_monitor/test/helpers/mutation_adapter_test.exs | bartoszgorka/PlantMonitor | 23e18cd76c51bd8eee021ee98668926de885047b | [
"MIT"
] | null | null | null | apps/plant_monitor/test/helpers/mutation_adapter_test.exs | bartoszgorka/PlantMonitor | 23e18cd76c51bd8eee021ee98668926de885047b | [
"MIT"
] | null | null | null | defmodule PlantMonitor.MutationAdapterTest do
use PlantMonitor.DataCase
alias PlantMonitor.MutationAdapter
# PREVENT
test "[PREVENT] Correct mutation" do
check = {:ok, %PlantMonitor.User{}}
result = MutationAdapter.prevent(check)
assert :ok == result
end
test "[PREVENT] Error with Ecto.Chang... | 22.972973 | 64 | 0.683529 |
ab91ca473dc04a6e335dfa73ce3724c69064e046 | 409 | ex | Elixir | apps/fc_finch/lib/fc_finch.ex | andyl/ragged | 2baab0849e2dfc068652ecb2fe88a7c6fe5437d0 | [
"MIT"
] | null | null | null | apps/fc_finch/lib/fc_finch.ex | andyl/ragged | 2baab0849e2dfc068652ecb2fe88a7c6fe5437d0 | [
"MIT"
] | 10 | 2021-02-08T00:01:41.000Z | 2021-05-27T12:54:28.000Z | apps/fc_finch/lib/fc_finch.ex | andyl/ragged | 2baab0849e2dfc068652ecb2fe88a7c6fe5437d0 | [
"MIT"
] | null | null | null | defmodule FcFinch do
@moduledoc """
Documentation for `FcFinch`.
"""
@doc """
Posts to a URL
"""
def post(url) do
Finch.build(:post, url)
|> Finch.request(FcFinch.App)
end
def get(url) do
Finch.build(:get, url)
|> Finch.request(FcFinch.App)
end
def success?(%Finch.Response{statu... | 15.148148 | 48 | 0.613692 |
ab91d9c09b68ced4216f8d652bde911b27f4a00a | 450 | exs | Elixir | installer/templates/phx_umbrella/config/test.exs | MarkHoo/phoenix | 3f673093826b0d4db5656dfe6e34393901348ed1 | [
"MIT"
] | null | null | null | installer/templates/phx_umbrella/config/test.exs | MarkHoo/phoenix | 3f673093826b0d4db5656dfe6e34393901348ed1 | [
"MIT"
] | null | null | null | installer/templates/phx_umbrella/config/test.exs | MarkHoo/phoenix | 3f673093826b0d4db5656dfe6e34393901348ed1 | [
"MIT"
] | null | null | null | import Config
# Print only warnings and errors during test
config :logger, level: :warn<%= if @mailer do %>
# In test we don't send emails.
config :<%= @app_name %>, <%= @app_module %>.Mailer,
adapter: Swoosh.Adapters.Test
# Disable swoosh api client as it is only required for production adapters.
config :swoosh, ... | 30 | 75 | 0.731111 |
ab91f551adb17ec174facb5bd2e215269447fc98 | 567 | exs | Elixir | day11/mix.exs | bjorng/advent-of-code-2019 | b3612eefb5097f07ae139b5b7c637fabd3c86bef | [
"Apache-2.0"
] | 5 | 2019-12-08T05:14:27.000Z | 2020-10-26T04:06:22.000Z | day11/mix.exs | bjorng/advent-of-code-2019 | b3612eefb5097f07ae139b5b7c637fabd3c86bef | [
"Apache-2.0"
] | 1 | 2019-12-22T18:20:36.000Z | 2019-12-22T19:06:48.000Z | day11/mix.exs | bjorng/advent-of-code-2019 | b3612eefb5097f07ae139b5b7c637fabd3c86bef | [
"Apache-2.0"
] | null | null | null | defmodule Day11.MixProject do
use Mix.Project
def project do
[
app: :day11,
version: "0.1.0",
elixir: "~> 1.9",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applica... | 19.551724 | 87 | 0.573192 |
ab9210cd65c782d802278952e48f0cd780a4d22b | 815 | ex | Elixir | lib/enphex/utils.ex | techgaun/enphex | 4369a4e4681a3f86c4bf974e3e9f1b9b1ce2ab8e | [
"Apache-2.0"
] | null | null | null | lib/enphex/utils.ex | techgaun/enphex | 4369a4e4681a3f86c4bf974e3e9f1b9b1ce2ab8e | [
"Apache-2.0"
] | null | null | null | lib/enphex/utils.ex | techgaun/enphex | 4369a4e4681a3f86c4bf974e3e9f1b9b1ce2ab8e | [
"Apache-2.0"
] | null | null | null | defmodule Enphex.Utils do
@moduledoc """
Collection module of various utils needed for Enphex
"""
def base_url, do: "https://api.enphaseenergy.com/api/v2/"
def api_key, do: Application.get_env(:enphex, :api_key)
def user_id, do: Application.get_env(:enphex, :user_id)
def app_id, do: Application.get_env(:... | 32.6 | 98 | 0.688344 |
ab9227074afcd72cd6a5a98ddd3d00e7fa438183 | 1,813 | ex | Elixir | clients/ad_sense/lib/google_api/ad_sense/v14/model/ad_unit_content_ads_settings_backup_option.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/ad_sense/lib/google_api/ad_sense/v14/model/ad_unit_content_ads_settings_backup_option.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/ad_sense/lib/google_api/ad_sense/v14/model/ad_unit_content_ads_settings_backup_option.ex | 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... | 34.207547 | 122 | 0.715389 |
ab923e010fffde791ab811ee4d52f66f939de995 | 540 | exs | Elixir | config/test.exs | chaiwa-berian/phoenix_react_playground | 6c0394c05439378af46256de2f303d002c2c8b92 | [
"Unlicense"
] | 88 | 2017-09-01T03:13:00.000Z | 2021-06-26T10:56:29.000Z | config/test.exs | chaiwa-berian/phoenix_react_playground | 6c0394c05439378af46256de2f303d002c2c8b92 | [
"Unlicense"
] | 4 | 2020-07-19T02:28:10.000Z | 2021-09-02T04:00:22.000Z | config/test.exs | chaiwa-berian/phoenix_react_playground | 6c0394c05439378af46256de2f303d002c2c8b92 | [
"Unlicense"
] | 21 | 2017-09-01T03:18:09.000Z | 2021-09-23T09:07:41.000Z | use Mix.Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :phoenix_react_playground, PhoenixReactPlaygroundWeb.Endpoint,
http: [port: 4002],
server: false
# Print only warnings and errors during test
config :logger, level: :warn
# Configure your data... | 28.421053 | 69 | 0.772222 |
ab926589b8e080b48939a89c1b29d62c1f464998 | 1,285 | exs | Elixir | test/supervisor/basic_test.exs | ityonemo/multiverses | 24b65367b369cc8122d24836816340ff2072c501 | [
"MIT"
] | 4 | 2020-06-27T02:15:42.000Z | 2020-12-21T14:24:42.000Z | test/supervisor/basic_test.exs | ityonemo/multiverses | 24b65367b369cc8122d24836816340ff2072c501 | [
"MIT"
] | 4 | 2020-06-03T16:51:55.000Z | 2020-09-08T19:28:55.000Z | test/supervisor/basic_test.exs | ityonemo/multiverses | 24b65367b369cc8122d24836816340ff2072c501 | [
"MIT"
] | 1 | 2020-12-21T14:24:47.000Z | 2020-12-21T14:24:47.000Z | import MultiversesTest.Replicant
defmodule MultiversesTest.Supervisor do
use Multiverses, with: Supervisor
use Supervisor
alias MultiversesTest.BasicGenServer, as: TestServer
def start_link do
Supervisor.start_link(__MODULE__, nil)
end
def init(_) do
Supervisor.init([{TestServer, forward_callers... | 25.196078 | 82 | 0.728405 |
ab928fe953fff11babd0420dbc921d31f7e34ea4 | 1,940 | ex | Elixir | clients/games/lib/google_api/games/v1/model/event_period_range.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/games/lib/google_api/games/v1/model/event_period_range.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/games/lib/google_api/games/v1/model/event_period_range.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 ... | 36.603774 | 176 | 0.722165 |
ab92b1d21d28984f33fbd7d4214ded0a1451738c | 831 | ex | Elixir | lib/surface_bootstrap/button_group.ex | joerichsen/surface_bootstrap | 14a8b57126ead9a6593d628b9962e167fc01030d | [
"MIT"
] | null | null | null | lib/surface_bootstrap/button_group.ex | joerichsen/surface_bootstrap | 14a8b57126ead9a6593d628b9962e167fc01030d | [
"MIT"
] | null | null | null | lib/surface_bootstrap/button_group.ex | joerichsen/surface_bootstrap | 14a8b57126ead9a6593d628b9962e167fc01030d | [
"MIT"
] | null | null | null | defmodule SurfaceBootstrap.ButtonGroup do
@moduledoc """
Group of buttons.
Can contain
- Button components
- Link Components
- <input> of type checkbox and radio
https://getbootstrap.com/docs/5.0/components/button-group/
"""
use Surface.Component
use SurfaceBootstrap.AriaBase
@doc "Vertical but... | 18.466667 | 60 | 0.623345 |
ab92c36420022f65bdea975777f13bebcc34616f | 2,485 | ex | Elixir | lib/vintage_net/info.ex | LostKobrakai/vintage_net | fb1e45d39642e5477b0d9f53f7776283967773be | [
"Apache-2.0"
] | null | null | null | lib/vintage_net/info.ex | LostKobrakai/vintage_net | fb1e45d39642e5477b0d9f53f7776283967773be | [
"Apache-2.0"
] | null | null | null | lib/vintage_net/info.ex | LostKobrakai/vintage_net | fb1e45d39642e5477b0d9f53f7776283967773be | [
"Apache-2.0"
] | null | null | null | defmodule VintageNet.Info do
@moduledoc false
@doc """
Print the current network status
"""
@spec info([VintageNet.info_options()]) :: :ok
def info(opts \\ []) do
version = :application.loaded_applications() |> List.keyfind(:vintage_net, 0) |> elem(2)
IO.write("""
VintageNet #{version}
Al... | 26.72043 | 92 | 0.63662 |
ab92e06485a5a83dd6786b830f1e3e2ea58a1db7 | 4,677 | exs | Elixir | test/html_parser/tree_builder_test.exs | HPJM/html_parser | c1e113fd62a984155ad63ffb7c0ad07052f7b743 | [
"MIT"
] | null | null | null | test/html_parser/tree_builder_test.exs | HPJM/html_parser | c1e113fd62a984155ad63ffb7c0ad07052f7b743 | [
"MIT"
] | null | null | null | test/html_parser/tree_builder_test.exs | HPJM/html_parser | c1e113fd62a984155ad63ffb7c0ad07052f7b743 | [
"MIT"
] | null | null | null | defmodule HTMLParser.TreeBuilderTest do
use ExUnit.Case
alias HTMLParser.{HTMLNodeTree, HTMLTextNode, TreeBuilder}
doctest TreeBuilder
defp open_tag(opts \\ []) do
tag(:open, opts)
end
defp close_tag(opts \\ []) do
tag(:close, opts)
end
defp tag(type, opts) do
depth_count = Keyword.get(o... | 30.174194 | 100 | 0.48514 |
ab930dc9ea293bf20bb1ae58bc40049f69d4a8d5 | 1,705 | exs | Elixir | apps/raptor/runtime.exs | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | null | null | null | apps/raptor/runtime.exs | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | null | null | null | apps/raptor/runtime.exs | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | null | null | null | use Mix.Config
get_redix_args = fn host, password ->
[host: host, password: password]
|> Enum.filter(fn
{_, nil} -> false
{_, ""} -> false
_ -> true
end)
end
redix_args = get_redix_args.(System.get_env("REDIS_HOST"), System.get_env("REDIS_PASSWORD"))
kafka_brokers = System.get_env("KAFKA_BROKERS")
... | 23.680556 | 92 | 0.631085 |
ab930e99291428572b447a7fac2d4f850ea890aa | 503 | ex | Elixir | web/models/message.ex | dddrb/phoenix-channel-example | 0f3d52ee97a0b687b3f6464893619024aabd05e8 | [
"MIT"
] | null | null | null | web/models/message.ex | dddrb/phoenix-channel-example | 0f3d52ee97a0b687b3f6464893619024aabd05e8 | [
"MIT"
] | null | null | null | web/models/message.ex | dddrb/phoenix-channel-example | 0f3d52ee97a0b687b3f6464893619024aabd05e8 | [
"MIT"
] | null | null | null | defmodule PhoenixChannelExample.Message do
use PhoenixChannelExample.Web, :model
schema "messages" do
field :content, :string
timestamps
end
@required_fields ~w(content)
@optional_fields ~w()
@doc """
Creates a changeset based on the `model` and `params`.
If no params are provided, an inval... | 20.958333 | 61 | 0.707753 |
ab932b2c40fcce60b39bcf37eab11c1ba64c933d | 1,560 | exs | Elixir | test/controllers/session_controller_test.exs | rawcodehq/webmonitor | 1397c74cb04434d18eb08e447c2c91d23ca97962 | [
"MIT"
] | 5 | 2016-07-05T20:31:46.000Z | 2021-03-20T20:11:48.000Z | test/controllers/session_controller_test.exs | rawcodehq/webmonitor | 1397c74cb04434d18eb08e447c2c91d23ca97962 | [
"MIT"
] | null | null | null | test/controllers/session_controller_test.exs | rawcodehq/webmonitor | 1397c74cb04434d18eb08e447c2c91d23ca97962 | [
"MIT"
] | 1 | 2016-07-18T23:00:46.000Z | 2016-07-18T23:00:46.000Z | defmodule Webmonitor.SesssionControllerTest do
use Webmonitor.ConnCase
test "GET /session/new", %{conn: conn} do
conn = get conn, "/session/new"
assert html_response(conn, 200) =~ "Sign In"
end
@valid_attrs %{"email" => "mujju@email.com", "password" => "zainu"}
test "login sets up the session data p... | 35.454545 | 107 | 0.680128 |
ab934e0d5868520a772f13ae670a1e193b2e89de | 6,978 | ex | Elixir | clients/dataproc/lib/google_api/dataproc/v1/model/job.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/dataproc/lib/google_api/dataproc/v1/model/job.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/dataproc/lib/google_api/dataproc/v1/model/job.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... | 69.089109 | 413 | 0.711092 |
ab935dc57c0ddfc5ee1c44f8d2444ba8126ec423 | 2,480 | ex | Elixir | lib/phoenix_cms/accounts.ex | SerenityIK/phoenix_cms | 2e6f5068c5d3bf0a1372f6da4f910522f7faa6a4 | [
"Apache-2.0"
] | null | null | null | lib/phoenix_cms/accounts.ex | SerenityIK/phoenix_cms | 2e6f5068c5d3bf0a1372f6da4f910522f7faa6a4 | [
"Apache-2.0"
] | 17 | 2021-03-22T06:11:32.000Z | 2022-03-28T20:03:58.000Z | lib/phoenix_cms/accounts.ex | SerenityIK/phoenix_cms | 2e6f5068c5d3bf0a1372f6da4f910522f7faa6a4 | [
"Apache-2.0"
] | null | null | null | defmodule PhoenixCms.Accounts do
@moduledoc """
The Accounts context.
"""
import Ecto.Query, warn: false
alias PhoenixCms.Accounts.Guardian
alias PhoenixCms.Accounts.User
alias PhoenixCms.Accounts.Role
alias PhoenixCms.Repo
@doc """
Returns the list of users.
## Examples
iex> list_users... | 17.714286 | 70 | 0.599597 |
ab9360ad168b5fc894646dc1423f9348e6a3eb5a | 1,745 | exs | Elixir | lib/mix/test/mix/shell_test.exs | enokd/elixir | e39b32f235082b8a29fcb22d250c822cca98609f | [
"Apache-2.0"
] | 1 | 2015-11-12T19:23:45.000Z | 2015-11-12T19:23:45.000Z | lib/mix/test/mix/shell_test.exs | enokd/elixir | e39b32f235082b8a29fcb22d250c822cca98609f | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/shell_test.exs | enokd/elixir | e39b32f235082b8a29fcb22d250c822cca98609f | [
"Apache-2.0"
] | null | null | null | Code.require_file "../test_helper.exs", __DIR__
defmodule Mix.ShellTest do
use MixTest.Case
defp capture_io(somefunc) do
ExUnit.CaptureIO.capture_io(somefunc) |> String.replace("\r\n","\n")
end
defp capture_io(from, somefunc) do
ExUnit.CaptureIO.capture_io(from, somefunc) |> String.replace("\r\n","\n... | 27.265625 | 89 | 0.612034 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.