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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
21ca2b6125eec94cc300b8a917f2ac96d46c5b15 | 890 | ex | Elixir | clients/domains/lib/google_api/domains/v1beta1/metadata.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/domains/lib/google_api/domains/v1beta1/metadata.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/domains/lib/google_api/domains/v1beta1/metadata.ex | dazuma/elixir-google-api | 6a9897168008efe07a6081d2326735fe332e522c | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 32.962963 | 74 | 0.760674 |
21ca726d95b35d199566b56455117eb54c004e4a | 1,021 | exs | Elixir | rel/config.exs | tedstrauss/sonar | 65de7a9a78eae9fd4e02f5abdf00f9fdec19b081 | [
"MIT"
] | 1 | 2020-07-17T14:02:31.000Z | 2020-07-17T14:02:31.000Z | rel/config.exs | tedstrauss/sonar | 65de7a9a78eae9fd4e02f5abdf00f9fdec19b081 | [
"MIT"
] | null | null | null | rel/config.exs | tedstrauss/sonar | 65de7a9a78eae9fd4e02f5abdf00f9fdec19b081 | [
"MIT"
] | 1 | 2019-12-02T17:51:36.000Z | 2019-12-02T17:51:36.000Z | use Mix.Releases.Config,
# This sets the default release built by `mix release`
default_release: :default,
# This sets the default environment used by `mix release`
default_environment: :dev
# For a full list of config options for both releases
# and environments, visit https://hexdocs.pm/distillery/co... | 29.171429 | 74 | 0.764936 |
21ca7791718a905b4fd4f9707ec679590361455b | 630 | ex | Elixir | examples/find_k.ex | mbta/solverl | 3d972db4fa173e9453357814884bd37f52a9713d | [
"MIT"
] | 30 | 2020-07-30T19:22:34.000Z | 2022-03-28T02:06:55.000Z | examples/find_k.ex | mbta/solverl | 3d972db4fa173e9453357814884bd37f52a9713d | [
"MIT"
] | 1 | 2022-02-14T22:56:02.000Z | 2022-02-15T14:13:53.000Z | examples/find_k.ex | mbta/solverl | 3d972db4fa173e9453357814884bd37f52a9713d | [
"MIT"
] | 4 | 2020-08-18T04:31:38.000Z | 2022-03-19T19:33:26.000Z | defmodule FindK do
@moduledoc false
require Logger
## Mirror of the 'find_k_solution' Minizinc example:
## https://github.com/MiniZinc/libminizinc/blob/feature/minisearch/tests/minisearch/regression_tests/queen_k_sols.mzn
##
def run(k, model, data, solver_opts) do
## Get the original solution handler
... | 22.5 | 119 | 0.695238 |
21ca8d1540102c4a7c3c82963f4b5c7bd2305419 | 12,093 | ex | Elixir | lib/aws/cognito.ex | ttyerl/aws-elixir | 48f6360fccee5dd587fab7a6efb109a399ff9a46 | [
"Apache-2.0"
] | 223 | 2015-05-29T17:45:35.000Z | 2021-06-29T08:37:14.000Z | lib/aws/cognito.ex | ttyerl/aws-elixir | 48f6360fccee5dd587fab7a6efb109a399ff9a46 | [
"Apache-2.0"
] | 33 | 2015-11-20T20:56:43.000Z | 2021-07-09T20:13:34.000Z | lib/aws/cognito.ex | ttyerl/aws-elixir | 48f6360fccee5dd587fab7a6efb109a399ff9a46 | [
"Apache-2.0"
] | 62 | 2015-06-14T20:53:24.000Z | 2021-12-13T07:20:15.000Z | # WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
# See https://github.com/jkakar/aws-codegen for more details.
defmodule AWS.Cognito do
@moduledoc """
Amazon Cognito
Amazon Cognito is a web service that delivers scoped temporary credentials
to mobile devices and other untrusted environments. Amazon Cognito unique... | 39.262987 | 116 | 0.727198 |
21ca9c181bd1e35b32897f805ad030da2690e29d | 1,899 | exs | Elixir | test/cash_flow_ex_web/errors_test.exs | diogobaracho/cashflowex | 7b66ff98239407f2ea2e11bf1693783dd94a725b | [
"Apache-2.0"
] | null | null | null | test/cash_flow_ex_web/errors_test.exs | diogobaracho/cashflowex | 7b66ff98239407f2ea2e11bf1693783dd94a725b | [
"Apache-2.0"
] | null | null | null | test/cash_flow_ex_web/errors_test.exs | diogobaracho/cashflowex | 7b66ff98239407f2ea2e11bf1693783dd94a725b | [
"Apache-2.0"
] | null | null | null | defmodule CashFlowExWeb.ErrorsTest do
use CashFlowEx.DataCase, async: true
alias CashFlowExWeb.Errors
defmodule UserRole do
use Ecto.Schema
import Ecto.Changeset
embedded_schema do
field(:type, :string)
timestamps()
end
def changeset(%__MODULE__{} = user_role, params) do
... | 22.607143 | 73 | 0.586625 |
21caa14760496eacef7cec4fd3b4d3b482ebc100 | 481 | ex | Elixir | lib/mastani_server/accounts/delegates/search.ex | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | 1 | 2019-05-07T15:03:54.000Z | 2019-05-07T15:03:54.000Z | lib/mastani_server/accounts/delegates/search.ex | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | null | null | null | lib/mastani_server/accounts/delegates/search.ex | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | null | null | null | defmodule MastaniServer.Accounts.Delegate.Search do
@moduledoc """
search for users
"""
import Helper.Utils, only: [done: 1]
import Ecto.Query, warn: false
alias Helper.ORM
alias MastaniServer.Accounts.User
@search_items_count 15
@doc """
search community by title
"""
def search_users(%{name... | 20.041667 | 56 | 0.654886 |
21caaf6638e261b6bb11bc6696e39d812b28a7cc | 274 | exs | Elixir | priv/repo/migrations/20211016012926_alter_users_table.exs | riosvictor/wabanex | 380b8078db1ac700d6cf2a232a92730fbe3ffc64 | [
"MIT"
] | 1 | 2022-03-16T20:41:59.000Z | 2022-03-16T20:41:59.000Z | priv/repo/migrations/20211016012926_alter_users_table.exs | riosvictor/wabanex | 380b8078db1ac700d6cf2a232a92730fbe3ffc64 | [
"MIT"
] | null | null | null | priv/repo/migrations/20211016012926_alter_users_table.exs | riosvictor/wabanex | 380b8078db1ac700d6cf2a232a92730fbe3ffc64 | [
"MIT"
] | null | null | null | defmodule Wabanex.Repo.Migrations.AlterUsersTable do
use Ecto.Migration
def change do
alter table("users") do
add :height, :float
add :weight, :float
add :fat_index, :float, default: 0
add :muscle_index, :float, default: 0
end
end
end
| 21.076923 | 52 | 0.660584 |
21cab8613d48f5c058997c5edce89166b405235d | 200 | ex | Elixir | lib/small_url_web/live/link_helpers.ex | AlexJuca/small-url | 25f4828ac3566a435b15e6b9581e1e1e508d6650 | [
"Apache-2.0"
] | 7 | 2021-06-28T14:43:10.000Z | 2021-09-21T21:00:30.000Z | lib/small_url_web/live/link_helpers.ex | AlexJuca/small-url | 25f4828ac3566a435b15e6b9581e1e1e508d6650 | [
"Apache-2.0"
] | 2 | 2021-06-30T21:43:06.000Z | 2021-07-01T16:40:10.000Z | lib/small_url_web/live/link_helpers.ex | AlexJuca/small-url | 25f4828ac3566a435b15e6b9581e1e1e508d6650 | [
"Apache-2.0"
] | null | null | null | defmodule SmallUrlWeb.LinkHelpers do
def generate_key(), do: Ksuid.generate() |> String.slice(4, 7)
def generate_expiration_date(), do: DateTime.utc_now() |> DateTime.add(2_592_000, :second)
end
| 33.333333 | 92 | 0.745 |
21cac07bb98f3b34684c4bb3682058757d6bef84 | 1,999 | exs | Elixir | clients/firebase_hosting/mix.exs | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/firebase_hosting/mix.exs | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/firebase_hosting/mix.exs | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 29.835821 | 236 | 0.672836 |
21cb4a0861b2996efdc979202bc442b66ea8287d | 167,011 | ex | Elixir | clients/cloud_kms/lib/google_api/cloud_kms/v1/api/projects.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/cloud_kms/lib/google_api/cloud_kms/v1/api/projects.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/cloud_kms/lib/google_api/cloud_kms/v1/api/projects.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... | 48.074554 | 802 | 0.62245 |
21cb7c4d1e2d46c165528aa82497ba00dd43d45b | 1,408 | ex | Elixir | test/support/data_case.ex | mattiaslundberg/phoenix-deploy-example | 4c1c3855ecbce145cb951d14287bcd3a9044e593 | [
"MIT"
] | null | null | null | test/support/data_case.ex | mattiaslundberg/phoenix-deploy-example | 4c1c3855ecbce145cb951d14287bcd3a9044e593 | [
"MIT"
] | null | null | null | test/support/data_case.ex | mattiaslundberg/phoenix-deploy-example | 4c1c3855ecbce145cb951d14287bcd3a9044e593 | [
"MIT"
] | null | null | null | defmodule HelloRelease.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... | 26.074074 | 77 | 0.685369 |
21cb8450f992e790d5c0d3de7d9ad0efb5eee300 | 1,990 | exs | Elixir | test/til_web/integrations/user_integration_test.exs | kw7oe/til | 5ecaa3d199c06d535d1bbbfa05e2dc88e86ad815 | [
"MIT"
] | null | null | null | test/til_web/integrations/user_integration_test.exs | kw7oe/til | 5ecaa3d199c06d535d1bbbfa05e2dc88e86ad815 | [
"MIT"
] | 2 | 2020-04-26T14:03:27.000Z | 2020-12-12T17:14:02.000Z | test/til_web/integrations/user_integration_test.exs | kw7oe/til | 5ecaa3d199c06d535d1bbbfa05e2dc88e86ad815 | [
"MIT"
] | null | null | null | defmodule Til.UserIntegrationTest do
use Til.IntegrationCase
@moduletag integration: true
def click_more do
find_element(:id, "more_dropdown") |> click()
end
def fill_in_user_info(%{username: username, email: email, password: password}) do
find_element(:id, "user_username") |> fill_field(username)
... | 34.310345 | 86 | 0.687437 |
21cb8fb80cc3ee757ef544799e4bcc1309359c4b | 272 | ex | Elixir | lib/livebook_web/live/output/html_component.ex | byjpr/livebook | 350cd13853eb4c2357203b365d9f6fb59f0601f4 | [
"Apache-2.0"
] | null | null | null | lib/livebook_web/live/output/html_component.ex | byjpr/livebook | 350cd13853eb4c2357203b365d9f6fb59f0601f4 | [
"Apache-2.0"
] | null | null | null | lib/livebook_web/live/output/html_component.ex | byjpr/livebook | 350cd13853eb4c2357203b365d9f6fb59f0601f4 | [
"Apache-2.0"
] | null | null | null | defmodule LivebookWeb.Output.HTMLComponent do
use LivebookWeb, :live_component
@impl true
def render(assigns) do
~H"""
<div class="html-renderer"
id={"html-renderer-#{@id}"}
data-id={@id}>
<%= raw(@content) %>
</div>
"""
end
end
| 18.133333 | 45 | 0.584559 |
21cba1c685f6af6015f9282167111eaa6bf73ac4 | 1,280 | ex | Elixir | lib/singyeong/metadata/types.ex | queer/singyeong | 3d2f5c1052100ed70bb3a4dddd8e22e3ef0df15a | [
"BSD-3-Clause"
] | 70 | 2018-10-25T06:06:37.000Z | 2022-03-14T19:51:56.000Z | lib/singyeong/metadata/types.ex | queer/singyeong | 3d2f5c1052100ed70bb3a4dddd8e22e3ef0df15a | [
"BSD-3-Clause"
] | 140 | 2019-02-19T06:52:59.000Z | 2022-03-01T11:13:41.000Z | lib/singyeong/metadata/types.ex | queer/singyeong | 3d2f5c1052100ed70bb3a4dddd8e22e3ef0df15a | [
"BSD-3-Clause"
] | 9 | 2019-03-20T12:17:28.000Z | 2021-03-11T18:51:00.000Z | defmodule Singyeong.Metadata.Types do
@moduledoc """
The types that 신경 supports for metadata storage. If a type isn't in here,
then it can't be used for registering metadata, and the client that tries to
register bad metadata will be disconnected.
"""
alias Singyeong.Metadata.Type
@types %{
"string"... | 34.594595 | 99 | 0.659375 |
21cba3196b2aef4452a80ebe5abc8d050716518c | 2,114 | exs | Elixir | agent.exs | MeterSoft/appsignal-elixir | 52e3505b9dc90bce0795c4753a758d40bdf41463 | [
"MIT"
] | null | null | null | agent.exs | MeterSoft/appsignal-elixir | 52e3505b9dc90bce0795c4753a758d40bdf41463 | [
"MIT"
] | null | null | null | agent.exs | MeterSoft/appsignal-elixir | 52e3505b9dc90bce0795c4753a758d40bdf41463 | [
"MIT"
] | null | null | null | defmodule Appsignal.Agent do
def version, do: "44e4d97"
def triples do
%{
"x86_64-darwin" => %{
checksum: "24039f3e9febf1a7e94f55e4b2b90f1acb498efd14e83d944f992aea54bb8b02",
download_url: "https://appsignal-agent-releases.global.ssl.fastly.net/44e4d97/appsignal-x86_64-darwin-all-static.ta... | 51.560976 | 132 | 0.720435 |
21cbaff90b835f3c2ed40910ed4d5cfe4c796d19 | 50,258 | exs | Elixir | lib/elixir/test/elixir/kernel/warning_test.exs | iloveitaly/elixir | c36791091f1af728b081b4bc84070fedcc3ca306 | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/kernel/warning_test.exs | iloveitaly/elixir | c36791091f1af728b081b4bc84070fedcc3ca306 | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/kernel/warning_test.exs | iloveitaly/elixir | c36791091f1af728b081b4bc84070fedcc3ca306 | [
"Apache-2.0"
] | null | null | null | Code.require_file("../test_helper.exs", __DIR__)
defmodule Kernel.WarningTest do
use ExUnit.Case
import ExUnit.CaptureIO
defp capture_err(fun) do
capture_io(:stderr, fun)
end
test "outdented heredoc" do
output =
capture_err(fn ->
Code.eval_string("""
'''
outdented
... | 26.890316 | 149 | 0.493951 |
21cbcb2111246f871791b765b02a1027373b39bf | 1,555 | ex | Elixir | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/operation_error.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/operation_error.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/operation_error.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | 1 | 2018-07-28T20:50:50.000Z | 2018-07-28T20:50:50.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 31.1 | 94 | 0.747267 |
21cbd09bf1e8843bc516289e97816450d34d10e6 | 1,036 | exs | Elixir | apps/aecore/config/dev.exs | SingularityMatrix/elixir-node | ad126aa97931165185cf35454718ed2eee40ceed | [
"ISC"
] | null | null | null | apps/aecore/config/dev.exs | SingularityMatrix/elixir-node | ad126aa97931165185cf35454718ed2eee40ceed | [
"ISC"
] | null | null | null | apps/aecore/config/dev.exs | SingularityMatrix/elixir-node | ad126aa97931165185cf35454718ed2eee40ceed | [
"ISC"
] | null | null | null | use Mix.Config
persistence_path =
case System.get_env("PERSISTENCE_PATH") do
nil -> "apps/aecore/priv/rox_db/"
env -> env
end
config :aecore, :persistence,
path: Path.absname(persistence_path),
write_options: [sync: true, disable_wal: false]
accounts_path =
case System.get_env("ACCOUNTS_PATH") do
... | 22.521739 | 64 | 0.71332 |
21cbdd3d473e77f7da6d9b1572f1d10f6d61b65f | 1,672 | ex | Elixir | lib/pigeon/adm/result_parser.ex | VoiSmart/pigeon | 54735f869dd5500991dfa0b13dc71ca2191cd0ff | [
"MIT"
] | 545 | 2015-09-06T15:50:32.000Z | 2022-03-21T08:21:11.000Z | lib/pigeon/adm/result_parser.ex | VoiSmart/pigeon | 54735f869dd5500991dfa0b13dc71ca2191cd0ff | [
"MIT"
] | 178 | 2016-01-14T22:21:20.000Z | 2022-02-18T22:34:30.000Z | lib/pigeon/adm/result_parser.ex | VoiSmart/pigeon | 54735f869dd5500991dfa0b13dc71ca2191cd0ff | [
"MIT"
] | 124 | 2016-01-17T11:30:16.000Z | 2022-02-28T16:59:41.000Z | defmodule Pigeon.ADM.ResultParser do
@moduledoc false
@doc ~S"""
Parses response and updates notification.
## Examples
iex> parse(%Pigeon.ADM.Notification{}, %{})
%Pigeon.ADM.Notification{response: :success}
iex> parse(%Pigeon.ADM.Notification{}, %{"registrationID" => "test"})
%Pigeo... | 34.833333 | 84 | 0.721292 |
21cbdf355f9268a3e3be1a5659db19cf4b2e647a | 6,844 | exs | Elixir | test/warpath/query/slice_operator_test.exs | mmmries/warpath | 352e41bedae8a3b4597e5105477483e3fcd5f5b7 | [
"MIT"
] | 16 | 2020-04-28T12:39:27.000Z | 2021-12-21T16:50:58.000Z | test/warpath/query/slice_operator_test.exs | mmmries/warpath | 352e41bedae8a3b4597e5105477483e3fcd5f5b7 | [
"MIT"
] | 41 | 2020-02-01T18:10:50.000Z | 2022-01-18T08:11:22.000Z | test/warpath/query/slice_operator_test.exs | mmmries/warpath | 352e41bedae8a3b4597e5105477483e3fcd5f5b7 | [
"MIT"
] | 3 | 2020-04-27T12:53:57.000Z | 2020-10-02T18:33:32.000Z | defmodule Warpath.Query.SliceOperatorTest do
use ExUnit.Case, async: true
use ExUnitProperties
alias Warpath.Element
alias Warpath.Execution.Env
alias Warpath.Query.SliceOperator
defp env_for_slice(config \\ []) do
Env.new({:slice, config})
end
defp element({term, index}), do: Element.new(term, [... | 30.968326 | 104 | 0.614991 |
21cc3cf8c61b5539a119a7752d58c6a5c68bfa13 | 1,804 | ex | Elixir | test/support/test_utils.ex | elpikel/fun_with_flags | 1c409e8872eb7e370f827a0d471082aeff09cf33 | [
"MIT"
] | 736 | 2017-02-16T12:55:57.000Z | 2022-03-31T19:50:43.000Z | test/support/test_utils.ex | elpikel/fun_with_flags | 1c409e8872eb7e370f827a0d471082aeff09cf33 | [
"MIT"
] | 86 | 2017-04-02T16:42:33.000Z | 2022-03-25T01:07:13.000Z | test/support/test_utils.ex | elpikel/fun_with_flags | 1c409e8872eb7e370f827a0d471082aeff09cf33 | [
"MIT"
] | 63 | 2017-04-28T23:38:15.000Z | 2022-03-28T12:49:02.000Z | defmodule FunWithFlags.TestUtils do
alias FunWithFlags.Config
@test_db 5
@redis FunWithFlags.Store.Persistent.Redis
# Since the flags are saved on shared storage (ETS and
# Redis), in order to keep the tests isolated _and_ async
# each test must use unique flag names. Not doing so would
# cause some tes... | 23.428571 | 62 | 0.642461 |
21cc70c189d351382e34cb42b0c7d5d7c9a514fd | 1,467 | ex | Elixir | clients/document_ai/lib/google_api/document_ai/v1beta3/model/google_cloud_documentai_v1_deploy_processor_version_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/document_ai/lib/google_api/document_ai/v1beta3/model/google_cloud_documentai_v1_deploy_processor_version_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/document_ai/lib/google_api/document_ai/v1beta3/model/google_cloud_documentai_v1_deploy_processor_version_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 31.212766 | 101 | 0.779141 |
21cc9921c81cf26b6e7b92e23a6257844cb831ae | 410 | exs | Elixir | countdown.exs | karlosmid/book_programming_elixir_12 | 53769b35728a82eddde3a21d4cbd45c1c21596a4 | [
"MIT"
] | null | null | null | countdown.exs | karlosmid/book_programming_elixir_12 | 53769b35728a82eddde3a21d4cbd45c1c21596a4 | [
"MIT"
] | null | null | null | countdown.exs | karlosmid/book_programming_elixir_12 | 53769b35728a82eddde3a21d4cbd45c1c21596a4 | [
"MIT"
] | null | null | null | defmodule Countdown do
def sleep(seconds) do
receive do
after seconds * 1000 -> nil
end
end
def say(text) do
spawn fn -> :os.cmd('say #{text}') end
end
def timer do
Stream.resource(
fn -> {_h,_m,s} = :erlang.time
60 - s - 1
end,
fn
0 -> {:halt, 0}
count... | 17.083333 | 42 | 0.507317 |
21cca311fda97c6921b7ecb36e339b75f59b8044 | 4,865 | ex | Elixir | lib/day_07_the_sum_of_its_parts_part_two.ex | scmx/advent-of-code-2018-elixir | bad5a125fdc98519c29cbca1e5b7f64d61da5869 | [
"MIT"
] | 2 | 2019-01-16T16:10:31.000Z | 2019-05-14T04:41:15.000Z | lib/day_07_the_sum_of_its_parts_part_two.ex | scmx/advent-of-code-2018-elixir | bad5a125fdc98519c29cbca1e5b7f64d61da5869 | [
"MIT"
] | null | null | null | lib/day_07_the_sum_of_its_parts_part_two.ex | scmx/advent-of-code-2018-elixir | bad5a125fdc98519c29cbca1e5b7f64d61da5869 | [
"MIT"
] | 1 | 2019-01-02T18:13:23.000Z | 2019-01-02T18:13:23.000Z | defmodule Adventofcode.Day07TheSumOfItsParts.PartTwo do
use Adventofcode
@enforce_keys [:steps, :dependencies, :workers, :delay]
defstruct second: -1,
workers: [],
steps: [],
completed: [],
dependencies: [],
delay: 0,
print: false
def ste... | 23.389423 | 81 | 0.587873 |
21ccb0bf35a85798683a3c8623dedca505b65ecb | 1,298 | ex | Elixir | clients/cloud_identity/lib/google_api/cloud_identity/v1/model/update_membership_metadata.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/cloud_identity/lib/google_api/cloud_identity/v1/model/update_membership_metadata.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/cloud_identity/lib/google_api/cloud_identity/v1/model/update_membership_metadata.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 30.904762 | 89 | 0.770416 |
21ccbc86c51b877db67e069fd8ff192c7e1c1e21 | 2,401 | exs | Elixir | test/cheerland_reservas/reservations/reservations_test.exs | fskinner/cheerland-reservas | 48a782d7e49736a89b4fd2136c98906269b6351e | [
"MIT"
] | 2 | 2019-03-14T20:03:44.000Z | 2019-08-30T13:30:42.000Z | test/cheerland_reservas/reservations/reservations_test.exs | fskinner/cheerland-reservas | 48a782d7e49736a89b4fd2136c98906269b6351e | [
"MIT"
] | 1 | 2021-05-08T08:23:18.000Z | 2021-05-08T08:23:18.000Z | test/cheerland_reservas/reservations/reservations_test.exs | fskinner/cheerland-reservas | 48a782d7e49736a89b4fd2136c98906269b6351e | [
"MIT"
] | null | null | null | defmodule CheerlandReservas.ReservationsTest do
use CheerlandReservas.DataCase
alias CheerlandReservas.Reservations
describe "rooms" do
alias CheerlandReservas.Reservations.Room
@valid_attrs %{
max_beds: 42,
label: "some label",
women_only: true,
description: "description",
... | 28.927711 | 89 | 0.648896 |
21ccd27a07d3ded93d186af3d73682b559277618 | 824 | exs | Elixir | elixir/bob/bob.exs | macborowy/exercism | c5d45e074e81b946a82a340b2730e0d2732b7e0a | [
"MIT"
] | null | null | null | elixir/bob/bob.exs | macborowy/exercism | c5d45e074e81b946a82a340b2730e0d2732b7e0a | [
"MIT"
] | null | null | null | elixir/bob/bob.exs | macborowy/exercism | c5d45e074e81b946a82a340b2730e0d2732b7e0a | [
"MIT"
] | null | null | null | defmodule Bob do
def hey(input) do
cond do
silence?(input) -> "Fine. Be that way!"
question?(input) -> "Sure."
yelling?(input) -> "Whoa, chill out!"
true -> "Whatever."
end
end
@doc """
Empty string means silence
"""
def silence?(""), do: true
@doc """
Checks if in... | 21.684211 | 69 | 0.591019 |
21ccfc6bc6fdfcc6c308a253a253cab51a6d5acf | 1,311 | ex | Elixir | lib/elasticsearch/exception.ex | steffkes/elasticsearch-elixir | ce904e5dea959a5caefe2cde15669bba43ac3fa6 | [
"MIT"
] | null | null | null | lib/elasticsearch/exception.ex | steffkes/elasticsearch-elixir | ce904e5dea959a5caefe2cde15669bba43ac3fa6 | [
"MIT"
] | null | null | null | lib/elasticsearch/exception.ex | steffkes/elasticsearch-elixir | ce904e5dea959a5caefe2cde15669bba43ac3fa6 | [
"MIT"
] | null | null | null | defmodule Elasticsearch.Exception do
@moduledoc """
Represents an Elasticsearch exception raised while executing a query.
"""
alias __MODULE__
@keys [
:status,
:line,
:col,
:message,
:type,
:query,
:raw
]
@enforce_keys @keys
defexception @keys
def exception(opts \\ []) ... | 19.863636 | 71 | 0.584287 |
21cd0b8b77e5ab28d87542a3138dae3c772f298b | 574 | exs | Elixir | test/pocket_reducer/reducer_test.exs | czogori/pocket_reducer | 09ecb2fcdf56a360b827a93c6e211e2885d3b8a3 | [
"MIT"
] | null | null | null | test/pocket_reducer/reducer_test.exs | czogori/pocket_reducer | 09ecb2fcdf56a360b827a93c6e211e2885d3b8a3 | [
"MIT"
] | null | null | null | test/pocket_reducer/reducer_test.exs | czogori/pocket_reducer | 09ecb2fcdf56a360b827a93c6e211e2885d3b8a3 | [
"MIT"
] | null | null | null | defmodule PocketReducer.ReducerTest do
use ExUnit.Case
alias PocketReducer.Filter
@now DateTime.utc_now() |> DateTime.to_unix()
@year 60 * 60 * 24 * 365
@year_ago @now - @year
@more_than_year_ago @year_ago - 1
@items [
{"1", %{"time_added" => @now |> Integer.to_string()}},
{"1", %{"time_added" ... | 26.090909 | 72 | 0.644599 |
21cd14fe8b6b4e57e00e6e4903daeb7e07a8ae58 | 659 | ex | Elixir | lib/mastani_server_web/schema/statistics/statistics_types.ex | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | 1 | 2019-05-07T15:03:54.000Z | 2019-05-07T15:03:54.000Z | lib/mastani_server_web/schema/statistics/statistics_types.ex | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | null | null | null | lib/mastani_server_web/schema/statistics/statistics_types.ex | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | null | null | null | defmodule MastaniServerWeb.Schema.Statistics.Types do
use Absinthe.Schema.Notation
use Absinthe.Ecto, repo: MastaniServer.Repo
# import MastaniServerWeb.Schema.Utils.Helper
# alias MastaniServer.Accounts
object :user_contribute do
meta(:cache, max_age: 30)
field(:count, :integer)
field(:date, :... | 24.407407 | 53 | 0.720789 |
21cd44d2db4c92e53b822fe257492a675b03c381 | 1,153 | ex | Elixir | test/support/changeset_assertions.ex | geometricservices/epi-viewpoin | ecb5316ea0f3f7299d5ff63e2de588539005ac1c | [
"Apache-2.0"
] | 5 | 2021-02-25T18:43:09.000Z | 2021-02-27T06:00:35.000Z | test/support/changeset_assertions.ex | geometricservices/epi-viewpoint | ecb5316ea0f3f7299d5ff63e2de588539005ac1c | [
"Apache-2.0"
] | 3 | 2021-12-13T17:52:47.000Z | 2021-12-17T01:35:31.000Z | test/support/changeset_assertions.ex | geometricservices/epi-viewpoint | ecb5316ea0f3f7299d5ff63e2de588539005ac1c | [
"Apache-2.0"
] | 1 | 2022-01-27T23:26:38.000Z | 2022-01-27T23:26:38.000Z | defmodule Epicenter.Test.ChangesetAssertions do
import ExUnit.Assertions
alias Epicenter.DataCase
def assert_invalid(tuple_or_changeset, expected_errors \\ nil)
def assert_invalid({:error, %Ecto.Changeset{} = changeset}, expected_errors),
do: assert_invalid(changeset, expected_errors)
def assert_inval... | 37.193548 | 111 | 0.731136 |
21cd716491edd1eceec18ef070a3036a5f8768af | 2,556 | exs | Elixir | priv/repo/migrations/20170327153407_initial_permissions.exs | sahilpaudel/AfterGlow | 0859ec14b47c8c5704cc8e5cba86d39aa258fff5 | [
"MIT"
] | null | null | null | priv/repo/migrations/20170327153407_initial_permissions.exs | sahilpaudel/AfterGlow | 0859ec14b47c8c5704cc8e5cba86d39aa258fff5 | [
"MIT"
] | null | null | null | priv/repo/migrations/20170327153407_initial_permissions.exs | sahilpaudel/AfterGlow | 0859ec14b47c8c5704cc8e5cba86d39aa258fff5 | [
"MIT"
] | null | null | null | require IEx
defmodule AfterGlow.Repo.Migrations.InitialPermissions do
use Ecto.Migration
def up do
alias AfterGlow.Repo
alias AfterGlow.PermissionSet
alias AfterGlow.UserPermissionSet
alias AfterGlow.Permission
alias AfterGlow.User
import Ecto.Query
{:ok, admin} = Repo.insert(Permissi... | 50.117647 | 108 | 0.693271 |
21cd943c3cce7331c2c8b523df7fdcdc55d7a338 | 1,905 | ex | Elixir | clients/games/lib/google_api/games/v1/model/games_achievement_increment.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/games_achievement_increment.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/games/lib/google_api/games/v1/model/games_achievement_increment.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.943396 | 194 | 0.725984 |
21cd9df4274dc1dfbe80ee25ac953c2373ee73f0 | 1,302 | exs | Elixir | config/prod.secret.exs | manojsamanta/stripe-multiple-products | 746895c2a4ef375c74bf0a643cbd3db7a8e19bcc | [
"MIT"
] | null | null | null | config/prod.secret.exs | manojsamanta/stripe-multiple-products | 746895c2a4ef375c74bf0a643cbd3db7a8e19bcc | [
"MIT"
] | null | null | null | config/prod.secret.exs | manojsamanta/stripe-multiple-products | 746895c2a4ef375c74bf0a643cbd3db7a8e19bcc | [
"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... | 31 | 75 | 0.731183 |
21cdb79c4590e8cbf155875d5e23de13e4693a0f | 1,096 | ex | Elixir | solomon/test/support/conn_case.ex | FoxComm/highlander | 1aaf8f9e5353b94c34d574c2a92206a1c363b5be | [
"MIT"
] | 10 | 2018-04-12T22:29:52.000Z | 2021-10-18T17:07:45.000Z | solomon/test/support/conn_case.ex | FoxComm/highlander | 1aaf8f9e5353b94c34d574c2a92206a1c363b5be | [
"MIT"
] | null | null | null | solomon/test/support/conn_case.ex | FoxComm/highlander | 1aaf8f9e5353b94c34d574c2a92206a1c363b5be | [
"MIT"
] | 1 | 2018-07-06T18:42:05.000Z | 2018-07-06T18:42:05.000Z | defmodule Solomon.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 dat... | 24.355556 | 69 | 0.70438 |
21cdea4d0721e4ae9e53be9fbc7f7b27d7023db8 | 1,131 | exs | Elixir | config/config.exs | bettio/ExAtomVM | 828dae6353b00c75a14627829f477efae1dd47fc | [
"Apache-2.0"
] | 4 | 2020-03-03T01:58:16.000Z | 2020-09-26T04:24:02.000Z | config/config.exs | bettio/ExAtomVM | 828dae6353b00c75a14627829f477efae1dd47fc | [
"Apache-2.0"
] | null | null | null | config/config.exs | bettio/ExAtomVM | 828dae6353b00c75a14627829f477efae1dd47fc | [
"Apache-2.0"
] | 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.483871 | 73 | 0.751547 |
21ce321c7a01189988715f7428a7db5b25fcbbcb | 886 | ex | Elixir | clients/health_care/lib/google_api/health_care/v1/metadata.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/health_care/lib/google_api/health_care/v1/metadata.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/health_care/lib/google_api/health_care/v1/metadata.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 32.814815 | 74 | 0.759594 |
21ce33745acc0979f17d089a5cfb0f5a289ce53f | 1,244 | ex | Elixir | memcached.json.ex | jimwwalker/memcached | 0b4aec7aff016c56edc9fb6008f21cf4ec06edcd | [
"BSD-3-Clause"
] | 2 | 2015-01-04T06:02:07.000Z | 2015-06-27T09:09:15.000Z | memcached.json.ex | yunba/memcached | d49b8eecddd79679930246340c96d877ee6b6cf3 | [
"BSD-3-Clause"
] | null | null | null | memcached.json.ex | yunba/memcached | d49b8eecddd79679930246340c96d877ee6b6cf3 | [
"BSD-3-Clause"
] | null | null | null | {
"threads" : 4,
"interfaces" :
[
{
"maxconn" : 10000,
"port" : 11210,
"backlog" : 1024,
"host" : "*",
"IPv6" : true,
"ssl" :
{
"key" : "/etc/memcached/pkey",
"cert" : "/etc/memcached/... | 24.392157 | 93 | 0.438907 |
21ce639649a050349a745a8725225368b605a74b | 474 | ex | Elixir | backend/lib/caffe/ordering/use_cases/get_activity_feed.ex | eeng/caffe | d85d0dd56a8204c715052ddaf3d990e47c5df0e9 | [
"MIT"
] | 7 | 2020-03-27T08:26:52.000Z | 2021-08-29T09:50:31.000Z | backend/lib/caffe/ordering/use_cases/get_activity_feed.ex | eeng/caffe | d85d0dd56a8204c715052ddaf3d990e47c5df0e9 | [
"MIT"
] | null | null | null | backend/lib/caffe/ordering/use_cases/get_activity_feed.ex | eeng/caffe | d85d0dd56a8204c715052ddaf3d990e47c5df0e9 | [
"MIT"
] | null | null | null | defmodule Caffe.Ordering.UseCases.GetActivityFeed do
use Caffe.Mediator.UseCase
alias Caffe.Accounts.User
alias Caffe.Ordering.Projections.Activity
defstruct [:user]
@impl true
def execute(%GetActivityFeed{}) do
{:ok, query() |> Repo.all()}
end
def query do
from o in Activity, order_by: [des... | 22.571429 | 84 | 0.700422 |
21ce74e7581c870ff788b5dfe5eca057682e0de7 | 1,832 | ex | Elixir | base/fc_state_storage/lib/fc_state_storage/adapters/dynamo_adapter.ex | dclausen/freshcom | 7e1d6397c8ab222cfd03830232cee0718f050490 | [
"BSD-3-Clause"
] | null | null | null | base/fc_state_storage/lib/fc_state_storage/adapters/dynamo_adapter.ex | dclausen/freshcom | 7e1d6397c8ab222cfd03830232cee0718f050490 | [
"BSD-3-Clause"
] | null | null | null | base/fc_state_storage/lib/fc_state_storage/adapters/dynamo_adapter.ex | dclausen/freshcom | 7e1d6397c8ab222cfd03830232cee0718f050490 | [
"BSD-3-Clause"
] | null | null | null | defmodule FCStateStorage.DynamoAdapter do
@behaviour FCStateStorage
alias ExAws.Dynamo
@dynamo_table System.get_env("AWS_DYNAMO_TABLE")
@primary_key_name :__key
def get(primary_key, _ \\ []) do
raw_response =
@dynamo_table
|> Dynamo.get_item(%{@primary_key_name => primary_key})
|> ExA... | 24.105263 | 106 | 0.632096 |
21ce7a37db5b483d4e89b23dee1ca7400ea0085c | 1,997 | ex | Elixir | lib/scaffolding/common/sphinx/time_stamp.ex | noizu-labs/advanced_elixir_scaffolding | 9e7a1199a4b25fcc16fc5a795104b926d2f238df | [
"MIT"
] | null | null | null | lib/scaffolding/common/sphinx/time_stamp.ex | noizu-labs/advanced_elixir_scaffolding | 9e7a1199a4b25fcc16fc5a795104b926d2f238df | [
"MIT"
] | null | null | null | lib/scaffolding/common/sphinx/time_stamp.ex | noizu-labs/advanced_elixir_scaffolding | 9e7a1199a4b25fcc16fc5a795104b926d2f238df | [
"MIT"
] | null | null | null | #-------------------------------------------------------------------------------
# Author: Keith Brings <keith.brings@noizu.com>
# Copyright (C) 2021 Noizu Labs Inc. All rights reserved.
#-------------------------------------------------------------------------------
defmodule Noizu.AdvancedScaffolding.Sphinx.Type.Ti... | 25.278481 | 80 | 0.454682 |
21ce847a034974fb832db6d22c23bd7c102c0677 | 2,240 | ex | Elixir | lib/jsonpatch/operation/remove.ex | corka149/jsonpatch | d7dc1cddb8363ab531385b9f20db5cfbff865e0e | [
"MIT"
] | 19 | 2020-06-01T17:28:31.000Z | 2022-03-20T04:41:56.000Z | lib/jsonpatch/operation/remove.ex | corka149/jsonpatch | d7dc1cddb8363ab531385b9f20db5cfbff865e0e | [
"MIT"
] | 5 | 2021-03-29T20:32:58.000Z | 2022-01-12T08:19:00.000Z | lib/jsonpatch/operation/remove.ex | corka149/jsonpatch | d7dc1cddb8363ab531385b9f20db5cfbff865e0e | [
"MIT"
] | 2 | 2021-03-29T20:55:32.000Z | 2021-08-17T20:38:03.000Z | defmodule Jsonpatch.Operation.Remove do
@moduledoc """
A JSON patch remove operation is responsible for removing values.
## Examples
iex> remove = %Jsonpatch.Operation.Remove{path: "/a/b"}
iex> target = %{"a" => %{"b" => %{"c" => "Bob"}}, "d" => false}
iex> Jsonpatch.Operation.apply_op(remove,... | 28.35443 | 89 | 0.586161 |
21ce8730082952ffcd0aea57c822af58879b6fdd | 342 | ex | Elixir | lib/glue_web/controllers/react_controller.ex | seanbreckenridge/glue | 60cbe6478be27572de6c6d5276a806b5940ffcbc | [
"Apache-2.0"
] | 5 | 2020-07-04T12:18:58.000Z | 2022-01-13T22:35:40.000Z | lib/glue_web/controllers/react_controller.ex | seanbreckenridge/glue | 60cbe6478be27572de6c6d5276a806b5940ffcbc | [
"Apache-2.0"
] | 37 | 2020-07-20T23:35:56.000Z | 2022-03-19T02:13:16.000Z | lib/glue_web/controllers/react_controller.ex | seanbreckenridge/glue | 60cbe6478be27572de6c6d5276a806b5940ffcbc | [
"Apache-2.0"
] | null | null | null | defmodule GlueWeb.ReactController do
use GlueWeb, :controller
@moduledoc """
This defines the single entrypoint to the react part of this site.
react_layout.html has the compiled js bundle as part of the <head>
"""
plug :put_layout, "react_layout.html"
def catchall(conn, _params) do
render(conn, "i... | 22.8 | 68 | 0.725146 |
21ce92df8effd5d71f39835ee9434b911668263e | 761 | ex | Elixir | apps/elixir_security_advisory_api_v1/lib/elixir_security_advisory_api_v1/pub_sub_consumer/package.ex | ex-security-advisory/api | 75674d42efd3b9f2406233e36244d5cb5f174971 | [
"MIT"
] | 5 | 2019-01-03T18:33:40.000Z | 2021-01-25T10:15:06.000Z | apps/elixir_security_advisory_api_v1/lib/elixir_security_advisory_api_v1/pub_sub_consumer/package.ex | ex-security-advisory/api | 75674d42efd3b9f2406233e36244d5cb5f174971 | [
"MIT"
] | 15 | 2018-12-27T16:59:06.000Z | 2019-01-04T17:34:38.000Z | apps/elixir_security_advisory_api_v1/lib/elixir_security_advisory_api_v1/pub_sub_consumer/package.ex | ex-security-advisory/api | 75674d42efd3b9f2406233e36244d5cb5f174971 | [
"MIT"
] | null | null | null | defmodule ElixirSecurityAdvisoryApiV1.PubSubConsumer.Package do
@moduledoc """
Relay messages from ElixirSecurityAdvisory PubSub to Subscriptions
"""
use GenServer
@vulnerabilities Application.fetch_env!(:elixir_security_advisory, ElixirSecurityAdvisory)
def start_link(_args) do
GenServer.start_link(... | 21.138889 | 92 | 0.717477 |
21ce9f40f99cdd52259c8ab41a62cb53719c3d16 | 3,116 | exs | Elixir | test/hexpm/throttle_test.exs | Benjamin-Philip/hexpm | 6f38244f81bbabd234c660f46ea973849ba77a7f | [
"Apache-2.0"
] | 691 | 2017-03-08T09:15:45.000Z | 2022-03-23T22:04:47.000Z | test/hexpm/throttle_test.exs | Benjamin-Philip/hexpm | 6f38244f81bbabd234c660f46ea973849ba77a7f | [
"Apache-2.0"
] | 491 | 2017-03-07T12:58:42.000Z | 2022-03-29T23:32:54.000Z | test/hexpm/throttle_test.exs | Benjamin-Philip/hexpm | 6f38244f81bbabd234c660f46ea973849ba77a7f | [
"Apache-2.0"
] | 200 | 2017-03-12T23:03:39.000Z | 2022-03-05T17:55:52.000Z | defmodule Hexpm.ThrottleTest do
use ExUnit.Case, async: true
alias Hexpm.Throttle
setup context do
{:ok, pid} = Throttle.start_link(rate: 5, unit: 100)
{:ok, Map.put(context, :pid, pid)}
end
defp diff(start) do
:erlang.monotonic_time(:milli_seconds) - start
end
test "throttle and then reset... | 21.79021 | 56 | 0.630937 |
21ce9fedf4108bca0c0030f0e25eef3d85cc1778 | 3,879 | ex | Elixir | lib/mappers/ingest/validate.ex | mgrog/mappers | 79eb3f1e004253da9d7916784d031a707ec90ca6 | [
"Apache-2.0"
] | 32 | 2021-04-22T01:55:31.000Z | 2022-02-25T13:17:21.000Z | lib/mappers/ingest/validate.ex | mgrog/mappers | 79eb3f1e004253da9d7916784d031a707ec90ca6 | [
"Apache-2.0"
] | 58 | 2021-06-04T18:42:59.000Z | 2022-03-31T07:17:01.000Z | lib/mappers/ingest/validate.ex | mgrog/mappers | 79eb3f1e004253da9d7916784d031a707ec90ca6 | [
"Apache-2.0"
] | 13 | 2021-04-10T06:09:15.000Z | 2022-03-23T13:07:37.000Z | defmodule Mappers.Ingest.Validate do
def validate_message(message) do
if match?(%{"decoded" => %{"payload" => %{"latitude" => _}}}, message) == false do
{:error, "Missing Field: latitude"}
else
if match?(%{"decoded" => %{"payload" => %{"longitude" => _}}}, message) == false do
{:error, "Mi... | 41.709677 | 103 | 0.427945 |
21cea4a687f96bcc5b6747a7df80e5435b9b9cd6 | 2,731 | ex | Elixir | apps/fz_http/lib/fz_http_web.ex | jasonboukheir/firezone | 79d610b94f67ae25c8ca26f391c0edf288f6aaa5 | [
"Apache-2.0"
] | null | null | null | apps/fz_http/lib/fz_http_web.ex | jasonboukheir/firezone | 79d610b94f67ae25c8ca26f391c0edf288f6aaa5 | [
"Apache-2.0"
] | null | null | null | apps/fz_http/lib/fz_http_web.ex | jasonboukheir/firezone | 79d610b94f67ae25c8ca26f391c0edf288f6aaa5 | [
"Apache-2.0"
] | null | null | null | defmodule FzHttpWeb 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 FzHttpWeb, :controller
use FzHttpWeb, :view
The definitions below will be executed for every view,
controller, etc... | 23.95614 | 83 | 0.688759 |
21ceb3861baa171f40dbf75a2270405e25dbca6e | 2,361 | exs | Elixir | test/context/dashboard_test.exs | substantial/bors-ng | 4f2a30f83f7024cc851c8bed8589f82d42fd5ae5 | [
"Apache-2.0"
] | null | null | null | test/context/dashboard_test.exs | substantial/bors-ng | 4f2a30f83f7024cc851c8bed8589f82d42fd5ae5 | [
"Apache-2.0"
] | null | null | null | test/context/dashboard_test.exs | substantial/bors-ng | 4f2a30f83f7024cc851c8bed8589f82d42fd5ae5 | [
"Apache-2.0"
] | 3 | 2020-11-15T16:17:58.000Z | 2021-06-04T11:26:42.000Z | defmodule BorsNG.Database.DashboardContextTest do
use BorsNG.Database.ModelCase
alias BorsNG.Database.Batch
alias BorsNG.Database.Patch
alias BorsNG.Database.Installation
alias BorsNG.Database.Project
alias BorsNG.Database.User
alias BorsNG.Database.LinkPatchBatch
alias BorsNG.Database.LinkUserProject
... | 28.445783 | 76 | 0.647607 |
21ceb683cf6e8f17ee8b797bd7ede2e74578666c | 484 | ex | Elixir | test/support/calendar_service.ex | Kr00lIX/gen_server_async | 16127c1b39b702173c1c1faae0d375949cacefdc | [
"MIT"
] | 1 | 2018-04-10T15:50:36.000Z | 2018-04-10T15:50:36.000Z | test/support/calendar_service.ex | Kr00lIX/gen_server_async | 16127c1b39b702173c1c1faae0d375949cacefdc | [
"MIT"
] | 1 | 2020-07-17T07:57:54.000Z | 2020-07-17T07:57:54.000Z | test/support/calendar_service.ex | Kr00lIX/gen_server_async | 16127c1b39b702173c1c1faae0d375949cacefdc | [
"MIT"
] | null | null | null | defmodule GenServerAsync.Support.CalendarService do
@moduledoc """
Simple GenServerAsync usage
use only async calling
"""
use GenServerAsync
def handle_call({:add, _calendar}, _from, :ok) do
{:noreply, :ok}
end
@impl true
def handle_call_async({:add, timeout}, :ok) do
# IO.inspect timeout, ... | 22 | 52 | 0.673554 |
21ceb93140fb12f31221af43d45db7745e11d483 | 1,197 | ex | Elixir | deps/absinthe/lib/absinthe/language/fragment.ex | JoakimEskils/elixir-absinthe | d81e24ec7c7b1164e6d152101dd50422f192d7e9 | [
"MIT"
] | 3 | 2017-06-22T16:33:58.000Z | 2021-07-07T15:21:09.000Z | lib/absinthe/language/fragment.ex | bruce/absinthe | 19b63d3aaa9fb75aad01ffd5e91d89e0b30d7f91 | [
"MIT"
] | null | null | null | lib/absinthe/language/fragment.ex | bruce/absinthe | 19b63d3aaa9fb75aad01ffd5e91d89e0b30d7f91 | [
"MIT"
] | null | null | null | defmodule Absinthe.Language.Fragment do
@moduledoc false
alias Absinthe.{Blueprint, Language}
defstruct [
name: nil,
type_condition: nil,
directives: [],
selection_set: nil,
loc: %{start_line: nil}
]
@type t :: %__MODULE__{
name: String.t,
type_condition: nil | Language.NamedTyp... | 24.428571 | 80 | 0.67335 |
21ced9efdf1e94d3dd5733d7c2a7bae59e1d65ac | 3,846 | exs | Elixir | test/core/executor_pool/tenant_setting_test.exs | sylph01/antikythera | 47a93f3d4c70975f7296725c9bde2ea823867436 | [
"Apache-2.0"
] | 144 | 2018-04-27T07:24:49.000Z | 2022-03-15T05:19:37.000Z | test/core/executor_pool/tenant_setting_test.exs | sylph01/antikythera | 47a93f3d4c70975f7296725c9bde2ea823867436 | [
"Apache-2.0"
] | 123 | 2018-05-01T02:54:43.000Z | 2022-01-28T01:30:52.000Z | test/core/executor_pool/tenant_setting_test.exs | sylph01/antikythera | 47a93f3d4c70975f7296725c9bde2ea823867436 | [
"Apache-2.0"
] | 14 | 2018-05-01T02:30:47.000Z | 2022-02-21T04:38:56.000Z | # Copyright(c) 2015-2021 ACCESS CO., LTD. All rights reserved.
defmodule AntikytheraCore.ExecutorPool.TenantSettingTest do
use Croma.TestCase
alias Antikythera.Test.ProcessHelper
alias AntikytheraCore.TenantExecutorPoolsManager
alias AntikytheraCore.Path, as: CorePath
@tenant_id "dummy_tenant"
@tenant_set... | 42.263736 | 112 | 0.75351 |
21cee81014457aa9bec7411eac6b6a7b5be476b4 | 2,512 | exs | Elixir | test/petal/pagination_test.exs | cohawk/petal_components | 2741c4de66fa8dfa2896fe1e6e02f1d1653422cd | [
"MIT"
] | null | null | null | test/petal/pagination_test.exs | cohawk/petal_components | 2741c4de66fa8dfa2896fe1e6e02f1d1653422cd | [
"MIT"
] | null | null | null | test/petal/pagination_test.exs | cohawk/petal_components | 2741c4de66fa8dfa2896fe1e6e02f1d1653422cd | [
"MIT"
] | null | null | null | defmodule PetalComponents.PaginationTest do
use ComponentCase
import PetalComponents.Pagination
test "previous doesn't show on page 1" do
assigns = %{}
html = rendered_to_string(
~H"""
<.pagination path="/page/:page" total_pages={10} current_page={1} />
"""
)
refute html =~ "/pa... | 26.166667 | 86 | 0.55414 |
21cefcb01e52fcc9681e04b3829d867a6430b06f | 153 | ex | Elixir | web/policies/skill_policy.ex | superdev999/Phoenix-project | ab13ac9366cdd0aa9581da7faf993b11aaa5344c | [
"MIT"
] | null | null | null | web/policies/skill_policy.ex | superdev999/Phoenix-project | ab13ac9366cdd0aa9581da7faf993b11aaa5344c | [
"MIT"
] | null | null | null | web/policies/skill_policy.ex | superdev999/Phoenix-project | ab13ac9366cdd0aa9581da7faf993b11aaa5344c | [
"MIT"
] | null | null | null | defmodule CodeCorps.SkillPolicy do
alias CodeCorps.User
def create?(%User{admin: true}), do: true
def create?(%User{admin: false}), do: false
end
| 21.857143 | 45 | 0.718954 |
21cf1deb76b17b48aaf61c8dc32dfa6e393aa07b | 3,280 | ex | Elixir | lib/platform/speech/google/text_to_speech.ex | lucab85/audioslides.io | cb502ccf6ed0b2db42d9fb20bb4c963bcca3cfa9 | [
"MIT"
] | 17 | 2017-11-14T14:03:18.000Z | 2021-12-10T04:18:48.000Z | lib/platform/speech/google/text_to_speech.ex | lucab85/audioslides.io | cb502ccf6ed0b2db42d9fb20bb4c963bcca3cfa9 | [
"MIT"
] | 21 | 2017-11-19T13:38:07.000Z | 2022-02-10T00:11:14.000Z | lib/platform/speech/google/text_to_speech.ex | lucab85/audioslides.io | cb502ccf6ed0b2db42d9fb20bb4c963bcca3cfa9 | [
"MIT"
] | 2 | 2019-09-03T03:32:13.000Z | 2021-02-23T21:52:57.000Z | defmodule Platform.Speech.Google.TextToSpeech do
@moduledoc """
The Speech context
"""
@behaviour Platform.SpeechAPI
alias Goth.Token
alias Platform.Speech.Google.Voice
#@access_key Application.get_env(:platform, :aws)[:access_key_id]
#@secret_key Application.get_env(:platform, :aws)[:secret]
@re... | 24.848485 | 104 | 0.640854 |
21cf2fcb48c987f09b581ce1b1594ae224d773b9 | 1,679 | ex | Elixir | clients/big_query/lib/google_api/big_query/v2/model/test_iam_permissions_request.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/big_query/lib/google_api/big_query/v2/model/test_iam_permissions_request.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/big_query/lib/google_api/big_query/v2/model/test_iam_permissions_request.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"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... | 35.723404 | 288 | 0.743895 |
21cf4369c3f504aba2a8bdd23cbffdf2159a4b1b | 7,171 | ex | Elixir | lib/falcon_plus_api/api/tpl.ex | sawater/falcon-plus-api | a41b1cc04cc0d71b72341e803de88d16b4bba77d | [
"Apache-2.0"
] | 2 | 2018-05-03T14:35:37.000Z | 2018-07-30T09:32:38.000Z | lib/falcon_plus_api/api/tpl.ex | mon-suit/falcon-plus-api | a41b1cc04cc0d71b72341e803de88d16b4bba77d | [
"Apache-2.0"
] | null | null | null | lib/falcon_plus_api/api/tpl.ex | mon-suit/falcon-plus-api | a41b1cc04cc0d71b72341e803de88d16b4bba77d | [
"Apache-2.0"
] | null | null | null | defmodule FalconPlusApi.Api.Tpl do
alias Maxwell.Conn
alias FalconPlusApi.{Util, Sig, Api}
@doc """
Create Action to a Template
* [Session](#/authentication) Required
* params:
* url: callback url
* uic: 需要通知的使用者群组(name)
* callback: enable/disable
### Request
```{
... | 21.862805 | 58 | 0.465904 |
21cf438299b202ff8121e9e7e1ecb0872211211d | 1,320 | exs | Elixir | demo/sitBRU_Demo/config/dev.exs | ceedee666/sitbru_2016 | b23b4a81a1daec87801c6435ff04d32be043e0b9 | [
"MIT"
] | null | null | null | demo/sitBRU_Demo/config/dev.exs | ceedee666/sitbru_2016 | b23b4a81a1daec87801c6435ff04d32be043e0b9 | [
"MIT"
] | null | null | null | demo/sitBRU_Demo/config/dev.exs | ceedee666/sitbru_2016 | b23b4a81a1daec87801c6435ff04d32be043e0b9 | [
"MIT"
] | null | null | null | 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 :sitBRU_Demo, SitBRU_Demo.Endpoint,
http: [por... | 29.333333 | 74 | 0.716667 |
21cf6347e587eab28785d5ace6442c7a63be577e | 1,862 | ex | Elixir | clients/ad_sense/lib/google_api/ad_sense/v14/model/ad_code.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/ad_sense/lib/google_api/ad_sense/v14/model/ad_code.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/ad_sense/lib/google_api/ad_sense/v14/model/ad_code.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... | 33.25 | 123 | 0.684748 |
21cf6ca3455e1aa94e085a4258a20a42e29726b9 | 41,070 | ex | Elixir | lib/phoenix/endpoint.ex | mathieuprog/phoenix | 385bdebdcc879dfb06f02faa5bef7d5e0b97761c | [
"MIT"
] | null | null | null | lib/phoenix/endpoint.ex | mathieuprog/phoenix | 385bdebdcc879dfb06f02faa5bef7d5e0b97761c | [
"MIT"
] | null | null | null | lib/phoenix/endpoint.ex | mathieuprog/phoenix | 385bdebdcc879dfb06f02faa5bef7d5e0b97761c | [
"MIT"
] | null | null | null | defmodule Phoenix.Endpoint do
@moduledoc ~S"""
Defines a Phoenix endpoint.
The endpoint is the boundary where all requests to your
web application start. It is also the interface your
application provides to the underlying web servers.
Overall, an endpoint has three responsibilities:
* to provide a w... | 45.181518 | 10,138 | 0.736961 |
21cf6dda07deb92a5213c1bdff4a4a6ba8e53bb7 | 259 | exs | Elixir | apps/rig_api/config/test.exs | maxglassie/reactive-interaction-gateway | 36b68fc75c71b9b4c3b6bd70fb11900c67172137 | [
"Apache-2.0"
] | null | null | null | apps/rig_api/config/test.exs | maxglassie/reactive-interaction-gateway | 36b68fc75c71b9b4c3b6bd70fb11900c67172137 | [
"Apache-2.0"
] | null | null | null | apps/rig_api/config/test.exs | maxglassie/reactive-interaction-gateway | 36b68fc75c71b9b4c3b6bd70fb11900c67172137 | [
"Apache-2.0"
] | null | null | null | use Mix.Config
config :rig_api, RigApi.Endpoint,
env: :test,
# server: false,
http: [port: System.get_env("API_PORT") || 4011]
config :rig, RigApi.ApisController, rig_proxy: RigInboundGateway.ProxyMock
config :rig, :event_filter, Rig.EventFilterMock
| 23.545455 | 74 | 0.745174 |
21cf7f7caa62e50d8d9a9e3b35f83ab65f71589c | 2,943 | exs | Elixir | test/guardian/db_test.exs | BenMorganIO/guardian_db | e16a4d76e6286c77e7b0097c6234be085eb23160 | [
"MIT"
] | null | null | null | test/guardian/db_test.exs | BenMorganIO/guardian_db | e16a4d76e6286c77e7b0097c6234be085eb23160 | [
"MIT"
] | null | null | null | test/guardian/db_test.exs | BenMorganIO/guardian_db | e16a4d76e6286c77e7b0097c6234be085eb23160 | [
"MIT"
] | null | null | null | defmodule Guardian.DBTest do
use Guardian.DB.TestSupport.CaseTemplate
alias Guardian.DB.Token
setup do
{:ok,
%{
claims: %{
"jti" => "token-uuid",
"typ" => "token",
"aud" => "token",
"sub" => "the_subject",
"iss" => "the_issuer",
"exp" => Guard... | 27 | 97 | 0.609922 |
21cfa25fb89b478af4913633e7d7f2e5f50f0b90 | 391 | ex | Elixir | lib/open_pantry/web/models/offer.ex | neilfulwiler/open_pantry | 4b705f2282c7b2365a784503c9f1bdd34c741798 | [
"MIT"
] | 41 | 2017-10-04T00:33:46.000Z | 2021-04-09T01:33:34.000Z | lib/open_pantry/web/models/offer.ex | openpantry/open_pantry | 27d898a65dd6f44b325f48d41bc448bb486d9c6f | [
"MIT"
] | 74 | 2017-09-20T03:36:17.000Z | 2018-11-20T20:46:16.000Z | lib/open_pantry/web/models/offer.ex | neilfulwiler/open_pantry | 4b705f2282c7b2365a784503c9f1bdd34c741798 | [
"MIT"
] | 12 | 2017-10-04T10:02:49.000Z | 2021-12-28T22:57:20.000Z | defmodule OpenPantry.Offer do
use OpenPantry.Web, :model
schema "offers" do
field :name, :string
field :description, :string
timestamps()
end
@doc """
Builds a changeset based on the `struct` and `params`.
"""
def changeset(struct, params \\ %{}) do
struct
|> cast(params, [:name, :d... | 19.55 | 56 | 0.639386 |
21cfa332701afa3380cc70b38bc7884005397920 | 1,875 | exs | Elixir | examples/hello_world_tcp.exs | drdgvhbh/jsonrpc2-elixir | 02d41b41e3625da1a81b8dd911a0b23bb99b1c9e | [
"Apache-2.0"
] | 49 | 2016-07-14T01:12:59.000Z | 2022-03-22T02:13:50.000Z | examples/hello_world_tcp.exs | drdgvhbh/jsonrpc2-elixir | 02d41b41e3625da1a81b8dd911a0b23bb99b1c9e | [
"Apache-2.0"
] | 18 | 2016-09-02T18:08:37.000Z | 2021-06-10T21:28:11.000Z | examples/hello_world_tcp.exs | drdgvhbh/jsonrpc2-elixir | 02d41b41e3625da1a81b8dd911a0b23bb99b1c9e | [
"Apache-2.0"
] | 26 | 2016-09-07T21:46:16.000Z | 2021-10-09T13:52:16.000Z | # Run with `mix run hello_world_tcp.exs`
# Ensure Ranch and shackle are started (usually via mix.exs)
Application.ensure_all_started(:ranch)
Application.ensure_all_started(:shackle)
# Define a handler
defmodule Handler do
use JSONRPC2.Server.Handler
def handle_request("hello", [name]) do
"Hello, #{name}!"
... | 24.350649 | 85 | 0.7024 |
21cfa5c946f7f3a79cb61e9bf65e89fb62421129 | 24,433 | ex | Elixir | lib/aws/generated/work_mail.ex | pecigonzalo/aws-elixir | b52181ebfb9e62349dc8e8067b7fbcd4f7a18c68 | [
"Apache-2.0"
] | null | null | null | lib/aws/generated/work_mail.ex | pecigonzalo/aws-elixir | b52181ebfb9e62349dc8e8067b7fbcd4f7a18c68 | [
"Apache-2.0"
] | null | null | null | lib/aws/generated/work_mail.ex | pecigonzalo/aws-elixir | b52181ebfb9e62349dc8e8067b7fbcd4f7a18c68 | [
"Apache-2.0"
] | null | null | null | # WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
# See https://github.com/aws-beam/aws-codegen for more details.
defmodule AWS.WorkMail do
@moduledoc """
Amazon WorkMail is a secure, managed business email and calendaring service with
support for existing desktop and mobile email clients.
You can access your emai... | 37.245427 | 173 | 0.72222 |
21cfaac132718de5de287e0cff1d810b12656b9c | 505 | exs | Elixir | config/adjectives.exs | knrz/haikunator | df49b4114b271ed899e8e67cdaa3c87be9620931 | [
"MIT"
] | 25 | 2015-05-27T17:30:33.000Z | 2021-03-02T09:07:54.000Z | config/adjectives.exs | knrz/Haikunator | df49b4114b271ed899e8e67cdaa3c87be9620931 | [
"MIT"
] | 5 | 2015-11-08T21:21:11.000Z | 2020-04-01T11:22:57.000Z | config/adjectives.exs | knrz/haikunator | df49b4114b271ed899e8e67cdaa3c87be9620931 | [
"MIT"
] | 11 | 2015-11-08T19:31:02.000Z | 2020-09-08T23:46:53.000Z | use Mix.Config
config :haikunator, :adjectives, ~w(
autumn hidden bitter misty silent empty dry dark summer
icy delicate quiet white cool spring winter patient
twilight dawn crimson wispy weathered blue billowing
broken cold damp falling frosty green long late lingering
bold little morning muddy old red roug... | 38.846154 | 59 | 0.809901 |
21cfae5763febfcffa470a8127b21341e1d30b94 | 372 | ex | Elixir | lib/blog/web/views/error_view.ex | ench0/blog | 04f7df2357b13dddee9d82cd1c35bbd0ce9618a9 | [
"MIT"
] | 2 | 2017-06-08T23:28:13.000Z | 2017-06-08T23:28:16.000Z | lib/blog/web/views/error_view.ex | ench0/blog | 04f7df2357b13dddee9d82cd1c35bbd0ce9618a9 | [
"MIT"
] | null | null | null | lib/blog/web/views/error_view.ex | ench0/blog | 04f7df2357b13dddee9d82cd1c35bbd0ce9618a9 | [
"MIT"
] | null | null | null | defmodule Blog.Web.ErrorView do
use Blog.Web, :view
def render("404.html", _assigns) do
"Page not found"
end
def render("500.html", _assigns) do
"Internal server error"
end
# In case no render clause matches or no
# template is found, let's render it as 500
def template_not_found(_template, a... | 20.666667 | 47 | 0.693548 |
21cfc3f93d904d1c3180e6ddb0deae78c6938481 | 489 | ex | Elixir | apps/email/lib/email/pubsub/consumer.ex | michaeljguarino/forge | 50ee583ecb4aad5dee4ef08fce29a8eaed1a0824 | [
"Apache-2.0"
] | 59 | 2021-09-16T19:29:39.000Z | 2022-03-31T20:44:24.000Z | apps/email/lib/email/pubsub/consumer.ex | svilenkov/plural | ac6c6cc15ac4b66a3b5e32ed4a7bee4d46d1f026 | [
"Apache-2.0"
] | 111 | 2021-08-15T09:56:37.000Z | 2022-03-31T23:59:32.000Z | apps/email/lib/email/pubsub/consumer.ex | svilenkov/plural | ac6c6cc15ac4b66a3b5e32ed4a7bee4d46d1f026 | [
"Apache-2.0"
] | 4 | 2021-12-13T09:43:01.000Z | 2022-03-29T18:08:44.000Z | defmodule Email.PubSub.Consumer do
@moduledoc nil
use Piazza.PubSub.Consumer,
broadcaster: Core.PubSub.Broadcaster,
max_demand: 10
require Logger
def handle_event(event) do
with %Bamboo.Email{} = email <- Email.Deliverable.email(event) do
Core.Email.Mailer.deliver_now(email)
|> log_erro... | 23.285714 | 69 | 0.685072 |
21cfc404b55bca0ef78ece351343c4c460645dff | 954 | exs | Elixir | test/rosetta_euler/d_test.exs | seaneshbaugh/rosetta-euler | 14f24dfc347e7d9a4c9c0f090acf2811aa65f453 | [
"MIT"
] | 36 | 2015-01-24T08:11:52.000Z | 2021-03-21T00:32:00.000Z | test/rosetta_euler/d_test.exs | seaneshbaugh/rosetta-euler | 14f24dfc347e7d9a4c9c0f090acf2811aa65f453 | [
"MIT"
] | null | null | null | test/rosetta_euler/d_test.exs | seaneshbaugh/rosetta-euler | 14f24dfc347e7d9a4c9c0f090acf2811aa65f453 | [
"MIT"
] | 4 | 2015-01-24T08:17:42.000Z | 2022-01-11T16:10:56.000Z | Code.require_file "../rosetta_euler_test.exs", __DIR__
Code.require_file "../support/answers.exs", __DIR__
defmodule RosettaEuler.DTest do
use ExUnit.Case, async: true
import RosettaEuler.Test, only: [rosetta_euler_tests: 2]
import RosettaEuler.Answers, only: [answer_for: 1]
setup context do
{:ok, [test_... | 25.783784 | 72 | 0.66457 |
21cfc9e597b00f3ee120670068f567e37e40489f | 1,362 | exs | Elixir | bench.exs | ckampfe/etfx | 36160c740dddf4405860947590094bbf6834dbb8 | [
"BSD-3-Clause"
] | null | null | null | bench.exs | ckampfe/etfx | 36160c740dddf4405860947590094bbf6834dbb8 | [
"BSD-3-Clause"
] | null | null | null | bench.exs | ckampfe/etfx | 36160c740dddf4405860947590094bbf6834dbb8 | [
"BSD-3-Clause"
] | null | null | null | small_map = <<
131,
116,
0,
0,
0,
6,
100,
0,
1,
97,
97,
73,
100,
0,
1,
98,
98,
0,
0,
32,
56,
100,
0,
1,
99,
109,
0,
0,
0,
5,
104,
101,
108,
108,
111,
100,
0,
1,
100,
100,
0,
2,
111,
107,
100,
0,
1,
101,
97,
99,
100,
... | 15.303371 | 65 | 0.624816 |
21cfccda21742b1e3ae227ebf7efa67d94d95386 | 4,151 | ex | Elixir | farmbot_os/lib/farmbot_os/sys_calls/movement.ex | adamswsk/farmbot_os | d177d3b74888c1e7bcbf8f8595818708ee97f73b | [
"MIT"
] | null | null | null | farmbot_os/lib/farmbot_os/sys_calls/movement.ex | adamswsk/farmbot_os | d177d3b74888c1e7bcbf8f8595818708ee97f73b | [
"MIT"
] | null | null | null | farmbot_os/lib/farmbot_os/sys_calls/movement.ex | adamswsk/farmbot_os | d177d3b74888c1e7bcbf8f8595818708ee97f73b | [
"MIT"
] | null | null | null | defmodule FarmbotOS.SysCalls.Movement do
@moduledoc false
require FarmbotCore.Logger
def get_current_x do
get_position(:x)
end
def get_current_y do
get_position(:y)
end
def get_current_z do
get_position(:z)
end
def get_cached_x do
get_cached_position(:x)
end
def get_cached_y ... | 23.585227 | 78 | 0.627801 |
21cff204fe7a9bc38cd3efe13d00b34b5d84dddc | 1,111 | exs | Elixir | config/config.exs | lastcanal/bert | 0a53f0b372fb469b56c258fcc926a8e4a3409c6d | [
"WTFPL"
] | null | null | null | config/config.exs | lastcanal/bert | 0a53f0b372fb469b56c258fcc926a8e4a3409c6d | [
"WTFPL"
] | null | null | null | config/config.exs | lastcanal/bert | 0a53f0b372fb469b56c258fcc926a8e4a3409c6d | [
"WTFPL"
] | 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... | 35.83871 | 73 | 0.749775 |
21d003c7dfcb1f2a7da027a1d6806239da9a92cd | 1,117 | ex | Elixir | lib/mix/utils.ex | ntsai/xadmin | 82d8be63e69483ff66472481e66f9870face355b | [
"MIT"
] | 5 | 2016-08-30T01:23:50.000Z | 2021-09-22T14:39:00.000Z | lib/mix/utils.ex | ntsai/xadmin | 82d8be63e69483ff66472481e66f9870face355b | [
"MIT"
] | null | null | null | lib/mix/utils.ex | ntsai/xadmin | 82d8be63e69483ff66472481e66f9870face355b | [
"MIT"
] | 1 | 2021-12-10T11:10:55.000Z | 2021-12-10T11:10:55.000Z | defmodule Mix.XAdmin.Utils do
def get_package_path do
__ENV__.file
|> Path.dirname
|> String.split("/lib/mix")
|> hd
end
def get_module do
Mix.Project.get
|> Module.split
|> Enum.reverse
|> Enum.at(1)
end
@doc "Print a status message to the console"
def status_msg(status, ... | 31.914286 | 83 | 0.647269 |
21d02bbc13ca2f087369e157f7abe071225e1281 | 283 | ex | Elixir | lib/seed/create_payment_methods.ex | harry-gao/ex-cart | 573e7f977bb3b710d11618dd215d4ddd8f819fb3 | [
"Apache-2.0"
] | 356 | 2016-03-16T12:37:28.000Z | 2021-12-18T03:22:39.000Z | lib/seed/create_payment_methods.ex | harry-gao/ex-cart | 573e7f977bb3b710d11618dd215d4ddd8f819fb3 | [
"Apache-2.0"
] | 30 | 2016-03-16T09:19:10.000Z | 2021-01-12T08:10:52.000Z | lib/seed/create_payment_methods.ex | harry-gao/ex-cart | 573e7f977bb3b710d11618dd215d4ddd8f819fb3 | [
"Apache-2.0"
] | 72 | 2016-03-16T13:32:14.000Z | 2021-03-23T11:27:43.000Z | defmodule Seed.CreatePaymentMethod do
def seed! do
payment_methods = ["cheque"]
Enum.each(payment_methods, fn(method_name) ->
Nectar.PaymentMethod.changeset(%Nectar.PaymentMethod{}, %{name: method_name, enabled: true})
|> Nectar.Repo.insert!
end)
end
end
| 28.3 | 98 | 0.699647 |
21d078ef6a249582852631c536dbfdb4a5eb288b | 2,036 | exs | Elixir | raspberry_phoenix/test/controllers/track_controller_test.exs | raymondboswel/raspberry_phoenix | ec0594c765db4405f2ec1f876ef9f76e685fcea4 | [
"Apache-2.0"
] | null | null | null | raspberry_phoenix/test/controllers/track_controller_test.exs | raymondboswel/raspberry_phoenix | ec0594c765db4405f2ec1f876ef9f76e685fcea4 | [
"Apache-2.0"
] | null | null | null | raspberry_phoenix/test/controllers/track_controller_test.exs | raymondboswel/raspberry_phoenix | ec0594c765db4405f2ec1f876ef9f76e685fcea4 | [
"Apache-2.0"
] | null | null | null | defmodule RaspberryPhoenix.TrackControllerTest do
use RaspberryPhoenix.ConnCase
alias RaspberryPhoenix.Track
@valid_attrs %{}
@invalid_attrs %{}
setup %{conn: conn} do
{:ok, conn: put_req_header(conn, "accept", "application/json")}
end
test "lists all entries on index", %{conn: conn} do
conn = ... | 33.933333 | 98 | 0.672888 |
21d097309eac73d94ae0fe982d06efd61e94b41b | 4,149 | ex | Elixir | clients/games_configuration/lib/google_api/games_configuration/v1configuration/model/games_number_affix_configuration.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/games_configuration/lib/google_api/games_configuration/v1configuration/model/games_number_affix_configuration.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/games_configuration/lib/google_api/games_configuration/v1configuration/model/games_number_affix_configuration.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... | 56.835616 | 317 | 0.75464 |
21d0b6cc47d8cc4df85f026f5480896c7109877c | 1,804 | ex | Elixir | lib/esx/checks.ex | gor181/esx | 8cc247ff92e2dac7f4ee4601298521622597f10c | [
"MIT"
] | 27 | 2017-03-21T15:42:07.000Z | 2021-10-18T21:15:53.000Z | lib/esx/checks.ex | ikeikeikeike/es | f38d6576e9bce466b91e4d75ed2c690756db6fb0 | [
"MIT"
] | 2 | 2017-06-03T19:25:13.000Z | 2019-06-05T00:06:48.000Z | lib/esx/checks.ex | ikeikeikeike/es | f38d6576e9bce466b91e4d75ed2c690756db6fb0 | [
"MIT"
] | 4 | 2017-10-08T20:17:14.000Z | 2021-05-24T11:22:13.000Z | defprotocol ESx.Checks do
@fallback_to_any true
def blank?(data)
def present?(data)
end
defimpl ESx.Checks, for: Integer do
alias ESx.Checks
def blank?(_), do: false
def present?(data), do: not Checks.blank?(data)
end
defimpl ESx.Checks, for: String do
alias ESx.Checks
def blank?(''), do: true
def ... | 23.428571 | 61 | 0.661863 |
21d0d76874c7f89341fda339fe4ce9416bb0b972 | 1,778 | ex | Elixir | test/support/model_case.ex | soarpatriot/cloud | 07b19fc9c02da59b3eb3a75c42e61965ad2128cb | [
"MIT"
] | null | null | null | test/support/model_case.ex | soarpatriot/cloud | 07b19fc9c02da59b3eb3a75c42e61965ad2128cb | [
"MIT"
] | null | null | null | test/support/model_case.ex | soarpatriot/cloud | 07b19fc9c02da59b3eb3a75c42e61965ad2128cb | [
"MIT"
] | null | null | null | defmodule Cloud.ModelCase do
@moduledoc """
This module defines the test case to be used by
model tests.
You may define functions here to be used as helpers in
your model tests. See `errors_on/2`'s definition as reference.
Finally, if the test case interacts with the database,
it cannot be async. For th... | 26.939394 | 84 | 0.68279 |
21d0e1e1038eb7e2bde07b879c1b3638218785d8 | 738 | ex | Elixir | lib/absinthe/blueprint/document/variable_definition.ex | maartenvanvliet/absinthe | ebe820717200f53756e225b3dffbfefe924a94d3 | [
"MIT"
] | null | null | null | lib/absinthe/blueprint/document/variable_definition.ex | maartenvanvliet/absinthe | ebe820717200f53756e225b3dffbfefe924a94d3 | [
"MIT"
] | 2 | 2018-08-02T13:35:38.000Z | 2018-08-02T13:36:42.000Z | lib/absinthe/blueprint/document/variable_definition.ex | jlgeering/absinthe | a3dbc29640d613928398626ad75a8f03203a1720 | [
"MIT"
] | null | null | null | defmodule Absinthe.Blueprint.Document.VariableDefinition do
@moduledoc false
alias Absinthe.{Blueprint, Type}
@enforce_keys [:name, :type]
defstruct [
:name,
:type,
default_value: nil,
source_location: nil,
# Added by phases
flags: %{},
provided_value: nil,
errors: [],
sche... | 24.6 | 71 | 0.607046 |
21d0f02dc28194cb13527a5958092c6b31ece345 | 3,463 | ex | Elixir | lib/console_web/controllers/v1/function_controller.ex | Oliv4945/console | fd7b85c8ff3b0702c8a524eb888104612946934c | [
"Apache-2.0"
] | null | null | null | lib/console_web/controllers/v1/function_controller.ex | Oliv4945/console | fd7b85c8ff3b0702c8a524eb888104612946934c | [
"Apache-2.0"
] | null | null | null | lib/console_web/controllers/v1/function_controller.ex | Oliv4945/console | fd7b85c8ff3b0702c8a524eb888104612946934c | [
"Apache-2.0"
] | null | null | null | defmodule ConsoleWeb.V1.FunctionController do
use ConsoleWeb, :controller
import Ecto.Query, warn: false
alias Console.Organizations
# alias Console.Flows
alias Console.Functions
alias Console.Functions.Function
action_fallback(ConsoleWeb.FallbackController)
plug CORSPlug, origin: "*"
def index(... | 37.236559 | 142 | 0.655501 |
21d16b1ed890eeb6409520adb1fff35c62405a35 | 8,144 | ex | Elixir | lib/xfighter/account.ex | bitchef/xfighter | 99a589eb148342e590a419795bbf69c701dca926 | [
"MIT"
] | 2 | 2015-12-18T20:33:08.000Z | 2016-04-06T12:23:56.000Z | lib/xfighter/account.ex | bitchef/xfighter | 99a589eb148342e590a419795bbf69c701dca926 | [
"MIT"
] | null | null | null | lib/xfighter/account.ex | bitchef/xfighter | 99a589eb148342e590a419795bbf69c701dca926 | [
"MIT"
] | null | null | null | defmodule Xfighter.Account do
alias Xfighter.AccountStatus
alias Xfighter.Exception.ConnectionError
alias Xfighter.Exception.InvalidJSON
alias Xfighter.Exception.RequestError
import Xfighter.API, only: [decode_response: 2, request: 2]
@doc """
Get the status of all orders sent for a given account on a v... | 47.075145 | 98 | 0.571955 |
21d1854acd6fa5d306a31e5d8a5cf845c6204c7f | 43,481 | exs | Elixir | test/ecto/type_test.exs | chefconnie/ecto | 6b4b6d3eba18d6d44484bc5b636e36a52bd7eafa | [
"Apache-2.0"
] | null | null | null | test/ecto/type_test.exs | chefconnie/ecto | 6b4b6d3eba18d6d44484bc5b636e36a52bd7eafa | [
"Apache-2.0"
] | null | null | null | test/ecto/type_test.exs | chefconnie/ecto | 6b4b6d3eba18d6d44484bc5b636e36a52bd7eafa | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.TypeTest do
use ExUnit.Case, async: true
defmodule Custom do
use Ecto.Type
def type, do: :custom
def load(_), do: {:ok, :load}
def dump(_), do: {:ok, :dump}
def cast(_), do: {:ok, :cast}
def equal?(true, _), do: true
def equal?(_, _), do: false
def embed_as... | 44.687564 | 134 | 0.574918 |
21d18bf46808b57adc5572ec65a486e9b6e42aab | 950 | exs | Elixir | mix.exs | skroutz/skroutz.ex | d0915212f1bfd6a7c2a721cf4d50e80939f71947 | [
"MIT"
] | 10 | 2016-02-22T08:23:00.000Z | 2020-02-12T12:42:18.000Z | mix.exs | skroutz/skroutz.ex | d0915212f1bfd6a7c2a721cf4d50e80939f71947 | [
"MIT"
] | null | null | null | mix.exs | skroutz/skroutz.ex | d0915212f1bfd6a7c2a721cf4d50e80939f71947 | [
"MIT"
] | 1 | 2020-02-12T12:42:21.000Z | 2020-02-12T12:42:21.000Z | defmodule Skroutz.Mixfile do
use Mix.Project
def project do
[app: :skroutz,
version: "0.1.0",
elixir: "~> 1.2",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps,
package: package,
source_url: "https://github.com/skroutz/skroutz.ex",
descrip... | 22.093023 | 70 | 0.573684 |
21d191ab3688157c6468e03bd18cfeb16b800894 | 2,641 | ex | Elixir | clients/container/lib/google_api/container/v1/model/set_maintenance_policy_request.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/container/lib/google_api/container/v1/model/set_maintenance_policy_request.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/container/lib/google_api/container/v1/model/set_maintenance_policy_request.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... | 40.630769 | 181 | 0.713745 |
21d1abd7748e0289e30210b19124d28f0025a033 | 478 | exs | Elixir | mix.exs | mkremins/alembic | 2ae459201220b63af083d0d54325af93afa877f1 | [
"MIT"
] | 2 | 2016-01-21T23:36:48.000Z | 2016-10-08T09:55:45.000Z | mix.exs | mkremins/alembic | 2ae459201220b63af083d0d54325af93afa877f1 | [
"MIT"
] | null | null | null | mix.exs | mkremins/alembic | 2ae459201220b63af083d0d54325af93afa877f1 | [
"MIT"
] | null | null | null | defmodule Alembic.Mixfile do
use Mix.Project
def project do
[ app: :alembic,
version: "0.1.0-dev",
name: "Alembic",
source_url: "https://github.com/mkremins/alembic",
elixir: "~> 0.10.3",
deps: deps ]
end
def application do
[ applications: [:socket],
mod: {Alembic, ... | 20.782609 | 60 | 0.564854 |
21d1e916db996f5f1c88802e275388d075a827a8 | 1,204 | ex | Elixir | lib/imagineer/image/png/interlace/adam7.ex | ndemonner/imagineer | a6872296756cde19f8f575a7d1854d0fe7cbcb02 | [
"MIT"
] | 103 | 2015-01-28T19:09:42.000Z | 2018-10-22T15:05:46.000Z | lib/imagineer/image/png/interlace/adam7.ex | tyre/imagineer | a6872296756cde19f8f575a7d1854d0fe7cbcb02 | [
"MIT"
] | 12 | 2015-07-11T05:12:41.000Z | 2018-07-21T04:42:47.000Z | lib/imagineer/image/png/interlace/adam7.ex | ndemonner/imagineer | a6872296756cde19f8f575a7d1854d0fe7cbcb02 | [
"MIT"
] | 18 | 2015-06-16T15:48:34.000Z | 2018-06-22T02:34:40.000Z | defmodule Imagineer.Image.PNG.Interlace.Adam7 do
alias Imagineer.Image.PNG
alias PNG.Interlace.Adam7
@doc """
Extract scanlines from the given image's decompressed data. The unfiltered
rows will be grouped into 7 passes, each essentially a sub-image.
"""
def extract_scanlines(image) do
Adam7.Scanline... | 26.173913 | 84 | 0.653654 |
21d233bf1d3941ebdffb597b5d2e98dc0d59fd31 | 878 | ex | Elixir | clients/pub_sub/lib/google_api/pub_sub/v1/metadata.ex | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"Apache-2.0"
] | null | null | null | clients/pub_sub/lib/google_api/pub_sub/v1/metadata.ex | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"Apache-2.0"
] | null | null | null | clients/pub_sub/lib/google_api/pub_sub/v1/metadata.ex | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 32.518519 | 74 | 0.757403 |
21d25198d74627de54442bf42e6c4626c56cb7d0 | 1,274 | ex | Elixir | questions/date/00070000-daysremaining.ex | morenoh149/pgexercises | ae5b46d84d5e4cdb6af49047960d7abd76e80f30 | [
"BSD-2-Clause"
] | null | null | null | questions/date/00070000-daysremaining.ex | morenoh149/pgexercises | ae5b46d84d5e4cdb6af49047960d7abd76e80f30 | [
"BSD-2-Clause"
] | null | null | null | questions/date/00070000-daysremaining.ex | morenoh149/pgexercises | ae5b46d84d5e4cdb6af49047960d7abd76e80f30 | [
"BSD-2-Clause"
] | 1 | 2019-10-08T04:46:40.000Z | 2019-10-08T04:46:40.000Z | |QUESTIONNAME|
Work out the number of days remaining in the month
|QUESTION|
For any given timestamp, work out the number of days remaining in the month. The current day should count as a whole day, regardless of the time. Use '2012-02-11 01:00:00' as an example timestamp for the purposes of making the answer. Forma... | 67.052632 | 431 | 0.755887 |
21d27c30653fc4ef5a90e7401984f2bbb09c5f93 | 986 | exs | Elixir | test/idefix/ast_test.exs | arjan/idefix | d6a2f074ed2b18b77c7058ce82ab73eed62feb26 | [
"MIT"
] | 1 | 2020-03-26T16:46:05.000Z | 2020-03-26T16:46:05.000Z | test/idefix/ast_test.exs | arjan/idefix | d6a2f074ed2b18b77c7058ce82ab73eed62feb26 | [
"MIT"
] | null | null | null | test/idefix/ast_test.exs | arjan/idefix | d6a2f074ed2b18b77c7058ce82ab73eed62feb26 | [
"MIT"
] | null | null | null | defmodule Idefix.ASTTest do
use ExUnit.Case
alias Idefix.AST
@ast """
defmodule Test do
def add(x, y) do
x + y
test("hello there")
end
end
"""
|> AST.parse()
|> elem(1)
test "find_node" do
assert {:x, _, nil} = AST.find_node(@ast,... | 24.04878 | 91 | 0.554767 |
21d28b67c166baba770155487e7b1621020ef867 | 884 | exs | Elixir | config/prod.secret.exs | kawakami-o3/epcc | e0a102b5471e133580c92feb91ec9597f1cf7021 | [
"MIT"
] | null | null | null | config/prod.secret.exs | kawakami-o3/epcc | e0a102b5471e133580c92feb91ec9597f1cf7021 | [
"MIT"
] | 3 | 2020-07-17T03:56:23.000Z | 2021-05-09T00:04:45.000Z | config/prod.secret.exs | kawakami-o3/epcc | e0a102b5471e133580c92feb91ec9597f1cf7021 | [
"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 """
en... | 29.466667 | 76 | 0.720588 |
21d2c7953c84fd035675fdb3158943725368dbb4 | 20,794 | exs | Elixir | test/broadway_cloud_pub_sub/google_api_client_test.exs | wronfim/broadway_cloud_pub_sub | d955db978352089f6d10964cb4e905e424542eaa | [
"Apache-2.0"
] | null | null | null | test/broadway_cloud_pub_sub/google_api_client_test.exs | wronfim/broadway_cloud_pub_sub | d955db978352089f6d10964cb4e905e424542eaa | [
"Apache-2.0"
] | null | null | null | test/broadway_cloud_pub_sub/google_api_client_test.exs | wronfim/broadway_cloud_pub_sub | d955db978352089f6d10964cb4e905e424542eaa | [
"Apache-2.0"
] | null | null | null | defmodule BroadwayCloudPubSub.GoogleApiClientTest do
use ExUnit.Case
import ExUnit.CaptureLog
alias BroadwayCloudPubSub.Acknowledger
alias BroadwayCloudPubSub.GoogleApiClient
alias Broadway.Message
@subscription_base "https://pubsub.googleapis.com/v1/projects/foo/subscriptions/bar"
@pull_response """
... | 33.217252 | 98 | 0.622439 |
21d2cd64a3ffc9cd143035368bb33c07db66f5ee | 11,701 | exs | Elixir | apps/andi/test/integration/andi/input_schemas/datasets_test.exs | msomji/smartcitiesdata | fc96abc1ef1306f7af6bd42bbcb4ed041a6d922c | [
"Apache-2.0"
] | null | null | null | apps/andi/test/integration/andi/input_schemas/datasets_test.exs | msomji/smartcitiesdata | fc96abc1ef1306f7af6bd42bbcb4ed041a6d922c | [
"Apache-2.0"
] | null | null | null | apps/andi/test/integration/andi/input_schemas/datasets_test.exs | msomji/smartcitiesdata | fc96abc1ef1306f7af6bd42bbcb4ed041a6d922c | [
"Apache-2.0"
] | null | null | null | defmodule Andi.InputSchemas.DatasetsTest do
use ExUnit.Case
use Andi.DataCase
@moduletag shared_data_connection: true
alias SmartCity.TestDataGenerator, as: TDG
alias Andi.InputSchemas.Datasets
alias Andi.InputSchemas.Datasets.Business
alias Andi.InputSchemas.Datasets.Technical
alias Andi.InputSchema... | 37.745161 | 142 | 0.658576 |
21d2d17fb71497ed471e32789472433e20efa8f8 | 1,397 | ex | Elixir | learning/cards/lib/cards.ex | Mdlkxzmcp/various_elixir | c87527b7118a0c74a042073c04d2228025888ddf | [
"MIT"
] | 2 | 2020-01-20T20:15:20.000Z | 2020-02-27T11:08:42.000Z | learning/cards/lib/cards.ex | Mdlkxzmcp/various_elixir | c87527b7118a0c74a042073c04d2228025888ddf | [
"MIT"
] | null | null | null | learning/cards/lib/cards.ex | Mdlkxzmcp/various_elixir | c87527b7118a0c74a042073c04d2228025888ddf | [
"MIT"
] | null | null | null | defmodule Cards do
@moduledoc """
Provides methods for creating and handling a deck of cards.
"""
@values Application.get_env(:cards, :values)
@suits Application.get_env(:cards, :suits)
@doc """
Returns a list of strings representing a deck of playing cards.
"""
def create_hand(hand_size) do
... | 19.402778 | 67 | 0.626342 |
21d2d994eeadaa955cd30021b89199864abf7709 | 3,599 | ex | Elixir | lib/extensions/reset_password/phoenix/controllers/reset_password_controller.ex | thejones/pow | 217d3d915ce6832a5b138535a54fa2c39b2d9be5 | [
"MIT"
] | null | null | null | lib/extensions/reset_password/phoenix/controllers/reset_password_controller.ex | thejones/pow | 217d3d915ce6832a5b138535a54fa2c39b2d9be5 | [
"MIT"
] | null | null | null | lib/extensions/reset_password/phoenix/controllers/reset_password_controller.ex | thejones/pow | 217d3d915ce6832a5b138535a54fa2c39b2d9be5 | [
"MIT"
] | null | null | null | defmodule PowResetPassword.Phoenix.ResetPasswordController do
@moduledoc false
use Pow.Extension.Phoenix.Controller.Base
alias Plug.Conn
alias Pow.Plug, as: PowPlug
alias PowResetPassword.{Phoenix.Mailer, Plug}
plug :require_not_authenticated
plug :load_user_from_reset_token when action in [:edit, :upda... | 31.570175 | 85 | 0.655738 |
21d30aac34a8ac96cfcae3cb457dd9ae5900de53 | 436 | ex | Elixir | lib/app_search.ex | ivanovv/app_search | 5e38db8a008930f5a3e6b1864c184b1efd5d386a | [
"MIT"
] | null | null | null | lib/app_search.ex | ivanovv/app_search | 5e38db8a008930f5a3e6b1864c184b1efd5d386a | [
"MIT"
] | null | null | null | lib/app_search.ex | ivanovv/app_search | 5e38db8a008930f5a3e6b1864c184b1efd5d386a | [
"MIT"
] | null | null | null | defmodule AppSearch do
use Application
def start(_type, _args) do
import Supervisor.Spec
children = [
supervisor(AppSearch.Repo, []),
supervisor(AppSearch.Endpoint, []),
]
opts = [strategy: :one_for_one, name: AppSearch.Supervisor]
Supervisor.start_link(children, opts)
end
de... | 20.761905 | 63 | 0.690367 |
21d31e16855c4bd17e128b10772d243bad54ece3 | 448 | ex | Elixir | lib/transhook/webhook/responder.ex | linjunpop/transhook | 59000e5a346c6c059d95c5a1f48190f698b4e7a3 | [
"0BSD"
] | null | null | null | lib/transhook/webhook/responder.ex | linjunpop/transhook | 59000e5a346c6c059d95c5a1f48190f698b4e7a3 | [
"0BSD"
] | null | null | null | lib/transhook/webhook/responder.ex | linjunpop/transhook | 59000e5a346c6c059d95c5a1f48190f698b4e7a3 | [
"0BSD"
] | null | null | null | defmodule Transhook.Webhook.Responder do
use Ecto.Schema
import Ecto.Changeset
embedded_schema do
field :payload, :string, default: "OK"
field :content_type, :string, default: "plain/text"
field :status_code, :integer, default: 200
end
@doc false
def changeset(hook, attrs) do
hook
|> c... | 24.888889 | 65 | 0.700893 |
21d3693e7c3dac4f9e41825265902510851e88dd | 3,905 | ex | Elixir | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_transformation_summary.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_transformation_summary.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_transformation_summary.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 54.236111 | 309 | 0.749296 |
21d36b0d2cac68f7a306fbeea6090d5c04847fdd | 413 | exs | Elixir | test/battle_box_web/controllers/docs_controller_test.exs | GrantJamesPowell/battle_box | 301091955b68cd4672f6513d645eca4e3c4e17d0 | [
"Apache-2.0"
] | 2 | 2020-10-17T05:48:49.000Z | 2020-11-11T02:34:15.000Z | test/battle_box_web/controllers/docs_controller_test.exs | FlyingDutchmanGames/battle_box | 301091955b68cd4672f6513d645eca4e3c4e17d0 | [
"Apache-2.0"
] | 3 | 2020-05-18T05:52:21.000Z | 2020-06-09T07:24:14.000Z | test/battle_box_web/controllers/docs_controller_test.exs | FlyingDutchmanGames/battle_box | 301091955b68cd4672f6513d645eca4e3c4e17d0 | [
"Apache-2.0"
] | null | null | null | defmodule BattleBoxWeb.DocsControllerTest do
use BattleBoxWeb.ConnCase, async: false
import BattleBoxWeb.DocsController, only: [paths: 0]
for path <- paths() do
test "doc (#{Enum.join(["docs" | path], "/")}) renders correctly", %{conn: conn} do
path = Routes.docs_path(conn, :docs, unquote(Macro.escape(... | 31.769231 | 87 | 0.673123 |
21d3da4a0bb5e773fc41681578c05345209afcc4 | 1,929 | exs | Elixir | clients/jobs/mix.exs | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"Apache-2.0"
] | null | null | null | clients/jobs/mix.exs | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"Apache-2.0"
] | null | null | null | clients/jobs/mix.exs | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"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... | 28.791045 | 196 | 0.659409 |
21d3efbf7d15fddd06bbda683bdb89a41e7b5d55 | 1,519 | ex | Elixir | clients/pub_sub_lite/lib/google_api/pub_sub_lite/v1/model/empty.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/pub_sub_lite/lib/google_api/pub_sub_lite/v1/model/empty.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/pub_sub_lite/lib/google_api/pub_sub_lite/v1/model/empty.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"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.166667 | 345 | 0.756419 |
21d4037cd195be3a6b01f9cc03e128e97e5ee720 | 1,166 | ex | Elixir | lib/flickrex/rest.ex | christopheradams/flickrex | 67e3a507e128c55969aeda3802f6dacd94bb03c5 | [
"MIT"
] | 13 | 2017-04-02T10:55:10.000Z | 2022-03-02T02:55:40.000Z | lib/flickrex/rest.ex | christopheradams/flickrex | 67e3a507e128c55969aeda3802f6dacd94bb03c5 | [
"MIT"
] | null | null | null | lib/flickrex/rest.ex | christopheradams/flickrex | 67e3a507e128c55969aeda3802f6dacd94bb03c5 | [
"MIT"
] | 1 | 2021-01-31T17:47:27.000Z | 2021-01-31T17:47:27.000Z | defmodule Flickrex.Rest do
@moduledoc """
Operations on Flickr REST Service.
Supports all methods listed in the [Flickr API](https://www.flickr.com/services/api/) docs.
Prefer to use the `Flickrex.Flickr` modules instead of calling these functions
directly.
## Examples
operation = Flickrex.Rest.ge... | 24.291667 | 93 | 0.658662 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.