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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
18ca612af003d9eadec291de9994ff9c58463490 | 506 | exs | Elixir | test/hacker_news_aggregator_web/views/error_view_test.exs | rhnonose/hacker_news_aggregator | 2dbcf9db4fb08c9cdc716959e0283c5e98312586 | [
"MIT"
] | null | null | null | test/hacker_news_aggregator_web/views/error_view_test.exs | rhnonose/hacker_news_aggregator | 2dbcf9db4fb08c9cdc716959e0283c5e98312586 | [
"MIT"
] | null | null | null | test/hacker_news_aggregator_web/views/error_view_test.exs | rhnonose/hacker_news_aggregator | 2dbcf9db4fb08c9cdc716959e0283c5e98312586 | [
"MIT"
] | null | null | null | defmodule HackerNewsAggregatorWeb.ErrorViewTest do
use HackerNewsAggregatorWeb.ConnCase, async: true
# Bring render/3 and render_to_string/3 for testing custom views
import Phoenix.View
test "renders 404.json" do
assert render(HackerNewsAggregatorWeb.ErrorView, "404.json", []) == %{errors: %{detail: "Not ... | 31.625 | 105 | 0.715415 |
18ca7a74de7d390f36deda9285c88c08c4ccec1e | 2,037 | exs | Elixir | test/flaky_connection_test.exs | JamesFerguson/exq | 4457ea50ad4c8a6a7e127da5acafc130960822bb | [
"Apache-2.0"
] | 1,406 | 2015-01-16T03:00:32.000Z | 2022-03-28T11:38:22.000Z | test/flaky_connection_test.exs | JamesFerguson/exq | 4457ea50ad4c8a6a7e127da5acafc130960822bb | [
"Apache-2.0"
] | 372 | 2015-01-08T05:15:11.000Z | 2022-03-18T18:05:34.000Z | test/flaky_connection_test.exs | JamesFerguson/exq | 4457ea50ad4c8a6a7e127da5acafc130960822bb | [
"Apache-2.0"
] | 217 | 2015-02-01T20:21:36.000Z | 2022-01-28T16:19:55.000Z | defmodule FlakyConnectionTest do
use ExUnit.Case
require Logger
import ExqTestUtil
@moduletag :failure_scenarios
setup do
TestRedis.setup()
on_exit(fn ->
TestRedis.teardown()
end)
:ok
end
defmodule Worker do
def perform(_) do
send(:tester, :done)
end
end
test ... | 23.964706 | 93 | 0.671085 |
18ca89a810d9cd66c67dec1c19db42cdf99b1262 | 816 | ex | Elixir | web/router.ex | Project-ShangriLa/sana_server_phoenix | d2ea4cc023d02e7249ae9267bb2b41a212b79ce7 | [
"Apache-2.0"
] | 5 | 2015-11-07T11:27:08.000Z | 2017-06-23T00:54:20.000Z | web/router.ex | Project-ShangriLa/sana_server_phoenix | d2ea4cc023d02e7249ae9267bb2b41a212b79ce7 | [
"Apache-2.0"
] | null | null | null | web/router.ex | Project-ShangriLa/sana_server_phoenix | d2ea4cc023d02e7249ae9267bb2b41a212b79ce7 | [
"Apache-2.0"
] | null | null | null | defmodule SanaServerPhoenix.Router do
use SanaServerPhoenix.Web, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
end
pipeline :api do
plug :accepts, ["json"]
end
scope "/", SanaS... | 24.727273 | 100 | 0.714461 |
18cabc581cc6a89c9f0fb7622fef87b152a206af | 1,580 | ex | Elixir | clients/analytics_reporting/lib/google_api/analytics_reporting/v4/model/metric_header_entry.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/analytics_reporting/lib/google_api/analytics_reporting/v4/model/metric_header_entry.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/analytics_reporting/lib/google_api/analytics_reporting/v4/model/metric_header_entry.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 ... | 31.6 | 100 | 0.722152 |
18cac3930d8c43cbb3b8bc2aa635671a4f88369a | 1,309 | ex | Elixir | lib/cms/v1/entities/post_entity.ex | noizu/KitchenSink | 34f51fb93dfa913ba7be411475d02520d537e676 | [
"MIT"
] | 2 | 2019-04-15T22:17:59.000Z | 2022-01-03T15:35:36.000Z | lib/cms/v1/entities/post_entity.ex | noizu/KitchenSink | 34f51fb93dfa913ba7be411475d02520d537e676 | [
"MIT"
] | null | null | null | lib/cms/v1/entities/post_entity.ex | noizu/KitchenSink | 34f51fb93dfa913ba7be411475d02520d537e676 | [
"MIT"
] | null | null | null | #-------------------------------------------------------------------------------
# Author: Keith Brings
# Copyright (C) 2018 Noizu Labs, Inc. All rights reserved.
#-------------------------------------------------------------------------------
defmodule Noizu.Cms.PostEntity do
@vsn 1.0
@type t :: %__MODULE__{
... | 27.851064 | 80 | 0.485103 |
18caeb427c80bd3c1067f3800fc0c1ff92d50e25 | 1,610 | exs | Elixir | test/controllers/queues_controller_test.exs | tinenbruno/verk_web | 70911a77ba12efcafca495bb43e3074c6cad3cfb | [
"MIT"
] | null | null | null | test/controllers/queues_controller_test.exs | tinenbruno/verk_web | 70911a77ba12efcafca495bb43e3074c6cad3cfb | [
"MIT"
] | null | null | null | test/controllers/queues_controller_test.exs | tinenbruno/verk_web | 70911a77ba12efcafca495bb43e3074c6cad3cfb | [
"MIT"
] | 1 | 2018-06-24T04:11:11.000Z | 2018-06-24T04:11:11.000Z | defmodule VerkWeb.QueuesControllerTest do
use VerkWeb.ConnCase
import :meck, except: [delete: 3]
alias Verk.QueueStats
alias Verk
@stats [%{ queue: "default", running_counter: 1,
finished_counter: 1, failed_counter: 0, status: :running }]
setup do
new QueueStats
new Verk
on_exit f... | 24.393939 | 72 | 0.604348 |
18cb0add742998ad7287279c9faedb9a9aa9ab79 | 495 | ex | Elixir | clients/elixir/generated/lib/swaggy_jenkins/model/unlabeled_load_statistics.ex | PankTrue/swaggy-jenkins | aca35a7cca6e1fcc08bd399e05148942ac2f514b | [
"MIT"
] | 23 | 2017-08-01T12:25:26.000Z | 2022-01-25T03:44:11.000Z | clients/elixir/generated/lib/swaggy_jenkins/model/unlabeled_load_statistics.ex | PankTrue/swaggy-jenkins | aca35a7cca6e1fcc08bd399e05148942ac2f514b | [
"MIT"
] | 35 | 2017-06-14T03:28:15.000Z | 2022-02-14T10:25:54.000Z | clients/elixir/generated/lib/swaggy_jenkins/model/unlabeled_load_statistics.ex | PankTrue/swaggy-jenkins | aca35a7cca6e1fcc08bd399e05148942ac2f514b | [
"MIT"
] | 11 | 2017-08-31T19:00:20.000Z | 2021-12-19T12:04:12.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 SwaggyJenkins.Model.UnlabeledLoadStatistics do
@moduledoc """
"""
@derive [Poison.Encoder]
defstruct [
:"_class"
]
@type t :: %__... | 19.038462 | 91 | 0.70303 |
18cb141dc1d63eb19e6ca50046e6fbeaf54b1322 | 2,581 | ex | Elixir | lib/codes/codes_q68.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_q68.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_q68.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | defmodule IcdCode.ICDCode.Codes_Q68 do
alias IcdCode.ICDCode
def _Q680 do
%ICDCode{full_code: "Q680",
category_code: "Q68",
short_code: "0",
full_name: "Congenital deformity of sternocleidomastoid muscle",
short_name: "Congenital deformity of sternocleidomastoid muscle",
... | 32.670886 | 81 | 0.619527 |
18cb4519c8bf4fa6091db8aaad2cb72d34d603f8 | 92 | exs | Elixir | robotica_face/test/robotica_face_web/views/layout_view_test.exs | brianmay/robotica-elixir | 8656510e54b7e32a547e3a54bf946f0e327911c9 | [
"RSA-MD"
] | 1 | 2019-04-23T09:16:44.000Z | 2019-04-23T09:16:44.000Z | robotica_face/test/robotica_face_web/views/layout_view_test.exs | brianmay/robotica-elixir | 8656510e54b7e32a547e3a54bf946f0e327911c9 | [
"RSA-MD"
] | 107 | 2019-05-26T08:03:26.000Z | 2022-02-03T19:13:56.000Z | robotica_face/test/robotica_face_web/views/layout_view_test.exs | brianmay/robotica-elixir | 8656510e54b7e32a547e3a54bf946f0e327911c9 | [
"RSA-MD"
] | 1 | 2019-08-10T20:44:24.000Z | 2019-08-10T20:44:24.000Z | defmodule RoboticaFaceWeb.LayoutViewTest do
use RoboticaFaceWeb.ConnCase, async: true
end
| 23 | 43 | 0.847826 |
18cb917b44f0212b7fd4071d07bd3f8dc755466d | 680 | ex | Elixir | tests/dummy/test/support/conn_chan_case.ex | autoxjs/autox-phoenix | 6446f4487e3af28955f6560973cff6add34be4d4 | [
"MIT"
] | null | null | null | tests/dummy/test/support/conn_chan_case.ex | autoxjs/autox-phoenix | 6446f4487e3af28955f6560973cff6add34be4d4 | [
"MIT"
] | null | null | null | tests/dummy/test/support/conn_chan_case.ex | autoxjs/autox-phoenix | 6446f4487e3af28955f6560973cff6add34be4d4 | [
"MIT"
] | null | null | null | defmodule Dummy.ConnChanCase do
use ExUnit.CaseTemplate
using do
quote do
# Import conveniences for testing with channels
use Phoenix.ChannelTest
alias Dummy.Repo
import Plug.Conn
import Phoenix.ConnTest, except: [connect: 2]
import Ecto
import Ecto.Query, only: [from:... | 23.448276 | 67 | 0.667647 |
18cb97504f1c05653c0fc4d48e9f0ca0a930542d | 826 | ex | Elixir | blog/test/support/conn_case.ex | xymbol/otp-examples | daa9bc1392d4324d2aa9f37657b205f9b1dfa447 | [
"MIT"
] | 6 | 2017-04-17T22:19:53.000Z | 2019-05-14T09:49:22.000Z | blog/test/support/conn_case.ex | xymbol/otp-examples | daa9bc1392d4324d2aa9f37657b205f9b1dfa447 | [
"MIT"
] | null | null | null | blog/test/support/conn_case.ex | xymbol/otp-examples | daa9bc1392d4324d2aa9f37657b205f9b1dfa447 | [
"MIT"
] | null | null | null | defmodule Blog.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 databa... | 23.6 | 56 | 0.717918 |
18cbc2608cc956e73f334d2cfcf28e9a1943da5c | 102 | ex | Elixir | plain-planner/elixir/lib/plain/repo.ex | danielmarreirosdeoliveira/prototypes | 047a7d0cae84b31213c06b45304e41a18e0678cb | [
"Apache-2.0"
] | null | null | null | plain-planner/elixir/lib/plain/repo.ex | danielmarreirosdeoliveira/prototypes | 047a7d0cae84b31213c06b45304e41a18e0678cb | [
"Apache-2.0"
] | 1 | 2020-05-10T13:37:43.000Z | 2020-05-10T13:37:43.000Z | plain-planner/elixir/lib/plain/repo.ex | danielmarreirosdeoliveira/prototypes | 047a7d0cae84b31213c06b45304e41a18e0678cb | [
"Apache-2.0"
] | null | null | null | defmodule Plain.Repo do
use Ecto.Repo,
otp_app: :plain,
adapter: Ecto.Adapters.Postgres
end
| 17 | 35 | 0.715686 |
18cc0eba423fbb5dcae1a086193f9c15f3f9838f | 236 | ex | Elixir | testData/org/elixir_lang/parser_definition/matched_arrow_operation_parsing_test_case/List.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 1,668 | 2015-01-03T05:54:27.000Z | 2022-03-25T08:01:20.000Z | testData/org/elixir_lang/parser_definition/matched_arrow_operation_parsing_test_case/List.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 2,018 | 2015-01-01T22:43:39.000Z | 2022-03-31T20:13:08.000Z | testData/org/elixir_lang/parser_definition/matched_arrow_operation_parsing_test_case/List.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 145 | 2015-01-15T11:37:16.000Z | 2021-12-22T05:51:02.000Z | [one: ()] <~ [two: ()]
[one: ()] |> [two: ()]
[one: ()] ~> [two: ()]
[one: ()] <<< [two: ()]
[one: ()] <<~ [two: ()]
[one: ()] <|> [two: ()]
[one: ()] <~> [two: ()]
[one: ()] >>> [two: ()]
[one: ()] ~>> [two: ()]
[one: ()] ^^^ [two: ()] | 23.6 | 23 | 0.254237 |
18cc1069ae9e79ab205e17f4835f1bc840f2601d | 2,735 | exs | Elixir | test/mime_headers_test.exs | ks1venberg/mailibex | 01115dba93560257c6641efea3baacaa9ac03a39 | [
"MIT"
] | 30 | 2017-05-25T11:39:13.000Z | 2021-12-10T01:40:59.000Z | test/mime_headers_test.exs | ks1venberg/mailibex | 01115dba93560257c6641efea3baacaa9ac03a39 | [
"MIT"
] | 16 | 2017-05-23T13:16:54.000Z | 2022-01-14T11:03:33.000Z | test/mime_headers_test.exs | ks1venberg/mailibex | 01115dba93560257c6641efea3baacaa9ac03a39 | [
"MIT"
] | 18 | 2017-06-02T18:56:57.000Z | 2022-03-10T08:17:02.000Z | defmodule MimeHeadersTest do
use ExUnit.Case
test "decoded params with quoted string" do
assert %{withoutquote: "with no quote",
withquote: " with; some \"quotes\" "}
= MimeMail.Params.parse_header(" withoutquote = with no quote ; WithQuote =\" with; some \\\"quotes\\\" \"")
end
... | 40.820896 | 143 | 0.650091 |
18cc3ab6b58fc50ebd5c11e4cd75bb36ec943706 | 157 | exs | Elixir | .dialyzer_ignore.exs | staring-frog/dialyxir | b78735f75b325238b7db20d9eed22f018cca5f26 | [
"Apache-2.0"
] | 1,455 | 2015-01-03T02:53:19.000Z | 2022-03-12T00:31:25.000Z | .dialyzer_ignore.exs | staring-frog/dialyxir | b78735f75b325238b7db20d9eed22f018cca5f26 | [
"Apache-2.0"
] | 330 | 2015-05-14T13:53:13.000Z | 2022-03-29T17:12:23.000Z | .dialyzer_ignore.exs | staring-frog/dialyxir | b78735f75b325238b7db20d9eed22f018cca5f26 | [
"Apache-2.0"
] | 146 | 2015-02-03T18:19:43.000Z | 2022-03-07T10:05:20.000Z | [
{":0:unknown_function Function :erl_types.t_is_opaque/1 does not exist."},
{":0:unknown_function Function :erl_types.t_to_string/1 does not exist."}
]
| 31.4 | 76 | 0.738854 |
18cc794720979421ed604bd8bce0180cf2ec872b | 2,094 | ex | Elixir | clients/storage_transfer/lib/google_api/storage_transfer/v1/model/gcs_data.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/storage_transfer/lib/google_api/storage_transfer/v1/model/gcs_data.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/storage_transfer/lib/google_api/storage_transfer/v1/model/gcs_data.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"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... | 41.88 | 339 | 0.734002 |
18cc81fca6ad3897f456cad19b62b0898a609439 | 791 | exs | Elixir | test/priv/test_repo/migrations/20190401765456_add_name_index_to_billing_mode_test.exs | circles-learning-labs/ecto-adapters-dynamodb | 6ee42c68c350786aba3e5dbcbfbc07e70c72b4e6 | [
"Apache-2.0"
] | 50 | 2017-06-21T00:15:15.000Z | 2022-01-18T04:12:24.000Z | test/priv/test_repo/migrations/20190401765456_add_name_index_to_billing_mode_test.exs | circles-learning-labs/ecto-adapters-dynamodb | 6ee42c68c350786aba3e5dbcbfbc07e70c72b4e6 | [
"Apache-2.0"
] | 91 | 2018-01-10T19:29:25.000Z | 2022-02-24T16:12:26.000Z | test/priv/test_repo/migrations/20190401765456_add_name_index_to_billing_mode_test.exs | circles-learning-labs/ecto-adapters-dynamodb | 6ee42c68c350786aba3e5dbcbfbc07e70c72b4e6 | [
"Apache-2.0"
] | 11 | 2017-11-28T06:22:58.000Z | 2022-01-04T18:03:11.000Z | defmodule Ecto.Adapters.DynamoDB.TestRepo.Migrations.AddNameIndexToBillingModeTest do
@moduledoc """
Used when testing migrations.
See the moduledoc for the previous migration for an explanation of this migration's purpose.
"""
use Ecto.Migration
def up do
alter table(:billing_mode_test,
o... | 23.969697 | 94 | 0.567636 |
18ccf2503d098ae6537efbbd6287ad563d63cfe0 | 1,163 | exs | Elixir | config/prod.secret.exs | linjunpop/transhook | 59000e5a346c6c059d95c5a1f48190f698b4e7a3 | [
"0BSD"
] | null | null | null | config/prod.secret.exs | linjunpop/transhook | 59000e5a346c6c059d95c5a1f48190f698b4e7a3 | [
"0BSD"
] | null | null | null | config/prod.secret.exs | linjunpop/transhook | 59000e5a346c6c059d95c5a1f48190f698b4e7a3 | [
"0BSD"
] | null | null | null | import Config
database_url =
System.get_env("DATABASE_URL") ||
raise """
environment variable DATABASE_URL is missing.
For example: ecto://USER:PASS@HOST/DATABASE
"""
config :transhook, Transhook.Repo,
ssl: true,
url: database_url,
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "1... | 27.690476 | 67 | 0.716251 |
18ccf4fd22fa26b4f47df95fe21a905409e88528 | 5,496 | exs | Elixir | test/earmark_helpers_tests/link_parser_test.exs | wojtekmach/earmark_parser | bdf579786d160f8c0cce1a67fbc3072a505af818 | [
"Apache-2.0"
] | null | null | null | test/earmark_helpers_tests/link_parser_test.exs | wojtekmach/earmark_parser | bdf579786d160f8c0cce1a67fbc3072a505af818 | [
"Apache-2.0"
] | null | null | null | test/earmark_helpers_tests/link_parser_test.exs | wojtekmach/earmark_parser | bdf579786d160f8c0cce1a67fbc3072a505af818 | [
"Apache-2.0"
] | null | null | null | defmodule EarmarkParserHelpersTests.LinkParserTest do
use ExUnit.Case, async: true
describe "text part" do
test "text part: empty" do
assert parse_link("[]()") == {~s<[]()>, "", "", nil, :link}
end
test "text part: incorrect" do
assert nil == parse_link("([]")
assert nil == parse_lin... | 36.397351 | 134 | 0.554221 |
18cd33db394b0c4f700dcc72a3ce16e409ce5e4a | 1,972 | exs | Elixir | config/prod.exs | domix/xebex | e1c9e21245a1daf3c818ddd60433fdbc4d7611be | [
"Apache-2.0"
] | 1 | 2015-10-13T02:11:26.000Z | 2015-10-13T02:11:26.000Z | config/prod.exs | domix/xebex | e1c9e21245a1daf3c818ddd60433fdbc4d7611be | [
"Apache-2.0"
] | null | null | null | config/prod.exs | domix/xebex | e1c9e21245a1daf3c818ddd60433fdbc4d7611be | [
"Apache-2.0"
] | null | null | null | use Mix.Config
# For production, we configure the host to read the PORT
# from the system environment. Therefore, you will need
# to set PORT=80 before running your server.
#
# You should also configure the url host to something
# meaningful, we use this information when generating URLs.
#
# Finally, we also include t... | 31.806452 | 67 | 0.710953 |
18cd45974b91875079c33ab8a65f8c43acfa92f2 | 4,391 | exs | Elixir | test/bamboo/elastic_email_test.exs | KineticCafe/bamboo_elastic_email | f88521805eabc55c021fbe1a755f0cae3533db63 | [
"MIT"
] | 1 | 2018-11-09T00:58:44.000Z | 2018-11-09T00:58:44.000Z | test/bamboo/elastic_email_test.exs | KineticCafe/bamboo_elastic_email | f88521805eabc55c021fbe1a755f0cae3533db63 | [
"MIT"
] | 3 | 2018-07-19T03:13:52.000Z | 2018-08-19T00:59:42.000Z | test/bamboo/elastic_email_test.exs | KineticCafe/bamboo_elastic_email | f88521805eabc55c021fbe1a755f0cae3533db63 | [
"MIT"
] | 2 | 2018-07-18T13:48:13.000Z | 2020-11-13T06:27:29.000Z | defmodule Bamboo.ElasticEmailTest do
@moduledoc false
use ExUnit.Case
import Bamboo.ElasticEmail
test "attachments/2 works with a single binary" do
new_email()
|> attachments("one")
|> assert_elastic_send_option(:attachments, ["one"])
end
test "attachments/2 works with a list of binaries" do... | 27.968153 | 82 | 0.671829 |
18cd9e11cb2357e8017a1c77e8bbda2c306f9712 | 1,057 | exs | Elixir | test/integration/sign_in_test.exs | behrendtio/phoenix-toggl | dcaa2409ed8b53d3b56dc7ce02cdc4252dd19647 | [
"MIT"
] | 207 | 2016-02-24T06:43:04.000Z | 2021-03-05T02:26:47.000Z | test/integration/sign_in_test.exs | behrendtio/phoenix-toggl | dcaa2409ed8b53d3b56dc7ce02cdc4252dd19647 | [
"MIT"
] | 6 | 2016-02-26T00:13:06.000Z | 2017-06-15T07:49:02.000Z | test/integration/sign_in_test.exs | behrendtio/phoenix-toggl | dcaa2409ed8b53d3b56dc7ce02cdc4252dd19647 | [
"MIT"
] | 24 | 2016-02-24T18:02:21.000Z | 2019-11-11T12:47:06.000Z | defmodule PhoenixToggl.SignInTest do
use PhoenixToggl.IntegrationCase
@tag :integration
test "GET /" do
navigate_to "/"
assert element_displayed?({:id, "sign_in_form"})
assert page_title =~ "Sign in"
end
@tag :integration
test "Sign in with wrong email/password" do
navigate_to "/"
as... | 22.020833 | 53 | 0.672658 |
18cdcb4c2aedecccfcb2e613ece1b600cb9b3673 | 2,676 | ex | Elixir | lib/suffix.ex | shannonwells/verbs-en-elixir | 4b27067385390d4d2063ec1a09f9d96b97ed9a73 | [
"MIT"
] | 3 | 2018-03-22T05:59:36.000Z | 2020-10-26T20:21:37.000Z | lib/suffix.ex | shannonwells/verbs-en-elixir | 4b27067385390d4d2063ec1a09f9d96b97ed9a73 | [
"MIT"
] | null | null | null | lib/suffix.ex | shannonwells/verbs-en-elixir | 4b27067385390d4d2063ec1a09f9d96b97ed9a73 | [
"MIT"
] | 1 | 2018-03-22T05:59:38.000Z | 2018-03-22T05:59:38.000Z | defmodule Suffix do
@consonant_pattern "[bcdfghjklmnpqrstvz]"
@doubled_consonant_pattern "[bcdfghklmnprstz]{2}"
@vowel_pattern "[aeiouy]"
@doubled_vowel_pattern "[aeiouy]"
def with_ed(infinitive) do
cond do
ends_e?(infinitive) -> infinitive <> "d"
ends_consonant_plus_y?(infinitive) ->
... | 30.409091 | 89 | 0.646114 |
18cdf43e7074c9cec4af37cff78116299557c8e7 | 1,133 | exs | Elixir | config/config.exs | wasnotrice/elixir_intro | 9f4085478400d43cc5c432f6b0684af6f6f47861 | [
"Apache-2.0"
] | null | null | null | config/config.exs | wasnotrice/elixir_intro | 9f4085478400d43cc5c432f6b0684af6f6f47861 | [
"Apache-2.0"
] | null | null | null | config/config.exs | wasnotrice/elixir_intro | 9f4085478400d43cc5c432f6b0684af6f6f47861 | [
"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.548387 | 73 | 0.753751 |
18cdf4d443064375a20c7b86b7c20df85916dd32 | 27,617 | ex | Elixir | lib/elixir/lib/keyword.ex | davidsulc/elixir | dd4fd6ab742acd75862e34e26dbdb86e0cf6453f | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/keyword.ex | davidsulc/elixir | dd4fd6ab742acd75862e34e26dbdb86e0cf6453f | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/keyword.ex | davidsulc/elixir | dd4fd6ab742acd75862e34e26dbdb86e0cf6453f | [
"Apache-2.0"
] | null | null | null | defmodule Keyword do
@moduledoc """
A set of functions for working with keywords.
A keyword is a list of two-element tuples where the first
element of the tuple is an atom and the second element
can be any value.
For example, the following is a keyword list:
[{:exit_on_close, true}, {:active, :once... | 27.479602 | 114 | 0.592497 |
18cdfbb30c32d4df6f52841cd31d7c42d3bb2488 | 1,884 | ex | Elixir | apps/tai/lib/tai/test_support/factories/order_transition_factory.ex | ccamateur/tai | 41c4b3e09dafc77987fa3f6b300c15461d981e16 | [
"MIT"
] | 276 | 2018-01-16T06:36:06.000Z | 2021-03-20T21:48:01.000Z | apps/tai/lib/tai/test_support/factories/order_transition_factory.ex | ccamateur/tai | 41c4b3e09dafc77987fa3f6b300c15461d981e16 | [
"MIT"
] | 73 | 2018-10-05T18:45:06.000Z | 2021-02-08T05:46:33.000Z | apps/tai/lib/tai/test_support/factories/order_transition_factory.ex | ccamateur/tai | 41c4b3e09dafc77987fa3f6b300c15461d981e16 | [
"MIT"
] | 43 | 2018-06-09T09:54:51.000Z | 2021-03-07T07:35:17.000Z | defmodule Tai.TestSupport.Factories.OrderTransitionFactory do
alias Tai.Orders.{OrderRepo, OrderTransition}
def create_order_transition(order_client_id, attrs, type) do
with {:ok, generated_attrs} <- generate_order_transition_attrs(type),
merged_attrs <- Map.merge(generated_attrs, attrs) do
%Ord... | 24.153846 | 97 | 0.674098 |
18cdfdd0cac97b4149c3777eee4f6e25f3563d6f | 1,227 | ex | Elixir | test/support/conn_case.ex | spotifun/funix | c81a1b4584b826264241fcf2da13552a610842dd | [
"MIT"
] | null | null | null | test/support/conn_case.ex | spotifun/funix | c81a1b4584b826264241fcf2da13552a610842dd | [
"MIT"
] | null | null | null | test/support/conn_case.ex | spotifun/funix | c81a1b4584b826264241fcf2da13552a610842dd | [
"MIT"
] | null | null | null | defmodule FunixWeb.ConnCase do
@moduledoc """
This module defines the test case to be used by
tests that require setting up a connection.
Such tests rely on `Phoenix.ConnTest` and also
import other functionality to make it easier
to build common data structures and query the data layer.
Finally, if the ... | 27.886364 | 67 | 0.721271 |
18ce040c3e4a32710b7b7d23673d48d7eaa4b4b0 | 573 | ex | Elixir | apps/banking_api_web/lib/banking_api_web/controllers/user_controller.ex | vinolivae/banking_api | ba91a3396776ea279e648f99120f415df43bd168 | [
"Apache-2.0"
] | 1 | 2021-06-10T03:29:16.000Z | 2021-06-10T03:29:16.000Z | apps/banking_api_web/lib/banking_api_web/controllers/user_controller.ex | vinolivae/banking_api | ba91a3396776ea279e648f99120f415df43bd168 | [
"Apache-2.0"
] | null | null | null | apps/banking_api_web/lib/banking_api_web/controllers/user_controller.ex | vinolivae/banking_api | ba91a3396776ea279e648f99120f415df43bd168 | [
"Apache-2.0"
] | null | null | null | defmodule BankingApiWeb.UserController do
use BankingApiWeb, :controller
require Logger
alias BankingApi.Users.Inputs.User, as: UserInput
alias BankingApi.Validation.ChangesetValidation
alias BankingApiWeb.UserView
#
def register(conn, params) do
with {:ok, input} <- ChangesetValidation.cast_and_ap... | 26.045455 | 79 | 0.69459 |
18ce452e4b8eab49e670443a4ffbbeda6b04b6b9 | 393 | ex | Elixir | lib/diversity_in_tech_web/views/error_view.ex | dreamingechoes/diversity-in-tech | 4eb5dadf69f82fd08e1cdd1b125264930d3b4e6f | [
"MIT"
] | 8 | 2018-06-22T05:43:30.000Z | 2020-04-13T20:31:40.000Z | lib/diversity_in_tech_web/views/error_view.ex | dreamingechoes/diversity-in-tech | 4eb5dadf69f82fd08e1cdd1b125264930d3b4e6f | [
"MIT"
] | null | null | null | lib/diversity_in_tech_web/views/error_view.ex | dreamingechoes/diversity-in-tech | 4eb5dadf69f82fd08e1cdd1b125264930d3b4e6f | [
"MIT"
] | null | null | null | defmodule DiversityInTechWeb.ErrorView do
use DiversityInTechWeb, :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_no... | 21.833333 | 47 | 0.712468 |
18ce49cacfea91ae0e19b22c7da480afc75894be | 271 | ex | Elixir | test/support/apps/phx1_6/lib/phx1_6_web/views/layout_view.ex | infinitered/torch | ea55326f9c3521933c86af398bfea584e7ffe1ed | [
"MIT"
] | 203 | 2016-10-28T00:37:15.000Z | 2019-01-21T16:33:42.000Z | test/support/apps/phx1_6/lib/phx1_6_web/views/layout_view.ex | jamonholmgren/torch | ea55326f9c3521933c86af398bfea584e7ffe1ed | [
"MIT"
] | 61 | 2016-11-01T02:29:22.000Z | 2019-01-01T22:35:21.000Z | test/support/apps/phx1_6/lib/phx1_6_web/views/layout_view.ex | jamonholmgren/torch | ea55326f9c3521933c86af398bfea584e7ffe1ed | [
"MIT"
] | 37 | 2016-11-01T18:13:55.000Z | 2019-01-07T00:35:48.000Z | defmodule Phx16Web.LayoutView do
use Phx16Web, :view
# Phoenix LiveDashboard is available only in development by default,
# so we instruct Elixir to not warn if the dashboard route is missing.
@compile {:no_warn_undefined, {Routes, :live_dashboard_path, 2}}
end
| 33.875 | 72 | 0.771218 |
18ce60007b7adfe74364bafc300a339b4a81cf42 | 4,590 | exs | Elixir | test/code_generation_test.exs | moogle19/protox | b0efbce60efd7c38725b74575f7ff0074efd6c65 | [
"MIT"
] | null | null | null | test/code_generation_test.exs | moogle19/protox | b0efbce60efd7c38725b74575f7ff0074efd6c65 | [
"MIT"
] | null | null | null | test/code_generation_test.exs | moogle19/protox | b0efbce60efd7c38725b74575f7ff0074efd6c65 | [
"MIT"
] | null | null | null | defmodule Protox.CodeGenerationTest do
use ExUnit.Case, async: false
@moduletag :slow
setup_all _context do
tmp_dir = System.tmp_dir!()
code_generation_path = "#{tmp_dir}/code_generation"
# Remove possible leftovers
File.rm_rf!(code_generation_path)
{_, 0} = System.cmd("mix", ["new", "code... | 25.21978 | 98 | 0.61024 |
18ce79f4f5a902109a93036889f5a489bf0fcc88 | 27,565 | exs | Elixir | apps/astarte_appengine_api/test/support/database_test_helper.exs | Spidey20202022/astarte | 3950855c592b34363af0cf7f8a921762ce64e512 | [
"Apache-2.0"
] | 1 | 2020-02-04T13:15:22.000Z | 2020-02-04T13:15:22.000Z | apps/astarte_appengine_api/test/support/database_test_helper.exs | Spidey20202022/astarte | 3950855c592b34363af0cf7f8a921762ce64e512 | [
"Apache-2.0"
] | 1 | 2020-01-20T09:52:48.000Z | 2020-01-20T09:52:48.000Z | apps/astarte_appengine_api/test/support/database_test_helper.exs | 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... | 43.546603 | 225 | 0.709414 |
18ce842a444012af36a5137b84404acb05a7d950 | 2,692 | ex | Elixir | clients/content/lib/google_api/content/v2/model/refund_reason.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/content/lib/google_api/content/v2/model/refund_reason.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/content/lib/google_api/content/v2/model/refund_reason.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... | 53.84 | 1,274 | 0.72474 |
18ceac6aa0c99e40bb7b44d754b380ef409f4659 | 17,071 | ex | Elixir | lib/phoenix_live_view/diff.ex | groxio-learning/phoenix_live_view | df25d2d016b54d59beff20bd778ee2459abb6978 | [
"MIT"
] | null | null | null | lib/phoenix_live_view/diff.ex | groxio-learning/phoenix_live_view | df25d2d016b54d59beff20bd778ee2459abb6978 | [
"MIT"
] | null | null | null | lib/phoenix_live_view/diff.ex | groxio-learning/phoenix_live_view | df25d2d016b54d59beff20bd778ee2459abb6978 | [
"MIT"
] | null | null | null | defmodule Phoenix.LiveView.Diff do
# The diff engine is responsible for tracking the rendering state.
# Given that components are part of said state, they are also
# handled here.
@moduledoc false
alias Phoenix.LiveView.{Utils, Rendered, Comprehension, Component}
@components :c
@static :s
@dynamics :d... | 31.094718 | 100 | 0.639974 |
18ced0bb1789025269dba5fdfd8c1b279a72c6b2 | 1,729 | ex | Elixir | lib/ambry_web/endpoint.ex | froseph/ambry | 86c1a8528b9f3cc7e4a7debd8005df4116a7d1b1 | [
"MIT"
] | null | null | null | lib/ambry_web/endpoint.ex | froseph/ambry | 86c1a8528b9f3cc7e4a7debd8005df4116a7d1b1 | [
"MIT"
] | null | null | null | lib/ambry_web/endpoint.ex | froseph/ambry | 86c1a8528b9f3cc7e4a7debd8005df4116a7d1b1 | [
"MIT"
] | null | null | null | defmodule AmbryWeb.Endpoint do
@moduledoc false
use Phoenix.Endpoint, otp_app: :ambry
require Application
# 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 [
... | 27.887097 | 97 | 0.711394 |
18cee17d721c42bb15e463405b6b4bd872effe2a | 2,765 | ex | Elixir | lib/ex_tectonicdb/connection.ex | 0b01/ex_tectonicdb | 49d0ea4920aa60e97f1a63e72d660b7dd5231654 | [
"MIT"
] | 2 | 2020-05-18T07:16:14.000Z | 2020-10-07T19:25:46.000Z | lib/ex_tectonicdb/connection.ex | 0b01/ex_tectonicdb | 49d0ea4920aa60e97f1a63e72d660b7dd5231654 | [
"MIT"
] | null | null | null | lib/ex_tectonicdb/connection.ex | 0b01/ex_tectonicdb | 49d0ea4920aa60e97f1a63e72d660b7dd5231654 | [
"MIT"
] | null | null | null | defmodule ExTectonicdb.Connection do
@moduledoc """
Handles connection to the database socket
`tdb-server` uses first bit in the reply to denote success/failure, so `:gen_tcp` needs to connect with `packet: :raw`.
Incoming message format: 1 byte for success failure, 8 bytes big endian (64 bit) for length n, a... | 27.376238 | 121 | 0.63689 |
18cf27dc72f62f5c3bbd20740bbdfe27d8c40f07 | 1,860 | ex | Elixir | lib/radiator/directory/title_slug.ex | djschilling/radiator | 382e22904d7e400a8ffba54e9ddfd2845bc2b623 | [
"MIT"
] | null | null | null | lib/radiator/directory/title_slug.ex | djschilling/radiator | 382e22904d7e400a8ffba54e9ddfd2845bc2b623 | [
"MIT"
] | null | null | null | lib/radiator/directory/title_slug.ex | djschilling/radiator | 382e22904d7e400a8ffba54e9ddfd2845bc2b623 | [
"MIT"
] | null | null | null | defmodule Radiator.Directory.TitleSlug do
use EctoAutoslugField.Slug, to: :slug
import Ecto.Changeset
alias Radiator.Directory
alias Radiator.Directory.{Episode, Network, Podcast}
# for Network Changesets just get the title
def get_sources(%Ecto.Changeset{data: %Network{}} = changeset, _opts) do
title... | 24.473684 | 92 | 0.646237 |
18cf2f3dec7cbd1242964ff7b516a194a17c8b11 | 628 | exs | Elixir | test/length_of_longest_substring_test.exs | kenspirit/leetcode_elixir_solutions | c146f8303f4e5830cf52bdf48b1c327ee46bc2a8 | [
"MIT"
] | null | null | null | test/length_of_longest_substring_test.exs | kenspirit/leetcode_elixir_solutions | c146f8303f4e5830cf52bdf48b1c327ee46bc2a8 | [
"MIT"
] | null | null | null | test/length_of_longest_substring_test.exs | kenspirit/leetcode_elixir_solutions | c146f8303f4e5830cf52bdf48b1c327ee46bc2a8 | [
"MIT"
] | null | null | null | defmodule LeetcodeElixirSolution.LengthOfLongestSubstringTest do
use ExUnit.Case
doctest LeetcodeElixirSolution.LengthOfLongestSubstring
test "multiple character repeat" do
assert LeetcodeElixirSolution.LengthOfLongestSubstring.resolve("abcabcbb") == 3
end
test "single character repeat" do
assert Le... | 29.904762 | 83 | 0.794586 |
18cf9b47b8f0d85459f344be630f0dfac9bf1125 | 1,173 | ex | Elixir | apps/forklift/lib/forklift/jobs/job_utils.ex | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | 26 | 2019-09-20T23:54:45.000Z | 2020-08-20T14:23:32.000Z | apps/forklift/lib/forklift/jobs/job_utils.ex | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | 757 | 2019-08-15T18:15:07.000Z | 2020-09-18T20:55:31.000Z | apps/forklift/lib/forklift/jobs/job_utils.ex | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | 9 | 2019-11-12T16:43:46.000Z | 2020-03-25T16:23:16.000Z | defmodule Forklift.Jobs.JobUtils do
@moduledoc false
use Retry.Annotation
alias Pipeline.Writer.TableWriter.Helper.PrestigeHelper
@retries Application.get_env(:forklift, :compaction_retries, 10)
@backoff Application.get_env(:forklift, :compaction_backoff, 10)
@retry with: constant_backoff(@backoff) |> Str... | 31.702703 | 137 | 0.665814 |
18cfa7f4faa0bf7a3441b9053f1583c3e7bd0d8f | 183 | exs | Elixir | spec/phoenix_helper.exs | enixdark/audit_api | 3aa6e9169cd9e80f06d91e4104438398a012a86f | [
"MIT"
] | 1 | 2018-01-20T00:58:33.000Z | 2018-01-20T00:58:33.000Z | spec/phoenix_helper.exs | enixdark/audit_api | 3aa6e9169cd9e80f06d91e4104438398a012a86f | [
"MIT"
] | null | null | null | spec/phoenix_helper.exs | enixdark/audit_api | 3aa6e9169cd9e80f06d91e4104438398a012a86f | [
"MIT"
] | null | null | null | Code.require_file("spec/espec_phoenix_extend.ex")
Mix.Task.run "ecto.create", ["--quiet"]
Mix.Task.run "ecto.migrate", ["--quiet"]
Ecto.Adapters.SQL.begin_test_transaction(App.Repo)
| 30.5 | 50 | 0.748634 |
18cfb8f2f28202944ee90bd3bcacfbb4b4ce4074 | 237 | exs | Elixir | config/dev.exs | tandemequity/docusign_elixir | f27115235de92631b03b6a1d65a503ce2b447d7a | [
"MIT"
] | 3 | 2018-12-15T18:08:02.000Z | 2020-01-26T19:46:45.000Z | config/dev.exs | tandemequity/docusign_elixir | f27115235de92631b03b6a1d65a503ce2b447d7a | [
"MIT"
] | 12 | 2018-09-18T15:26:34.000Z | 2019-09-28T15:29:39.000Z | config/dev.exs | tandemequity/docusign_elixir | f27115235de92631b03b6a1d65a503ce2b447d7a | [
"MIT"
] | 4 | 2019-04-08T13:04:03.000Z | 2019-09-24T17:45:17.000Z | import Config
config :docusign, app_env: :dev
config :docusign, hostname: "account-d.docusign.com"
config :oauth2,
debug: true,
request_options: [
recv_timeout: 10_000,
timeout: 8_000
],
warn_missing_serializer: false
| 16.928571 | 52 | 0.721519 |
18cfbce4fb5aff11937a912284f32e0117ca168c | 1,084 | ex | Elixir | test/support/conn_case.ex | gilacost/task_manager | 550d8ce603b555f017dd689a2db6819b85ddbbd1 | [
"MIT"
] | 1 | 2020-07-24T17:13:26.000Z | 2020-07-24T17:13:26.000Z | test/support/conn_case.ex | gilacost/task_manager | 550d8ce603b555f017dd689a2db6819b85ddbbd1 | [
"MIT"
] | null | null | null | test/support/conn_case.ex | gilacost/task_manager | 550d8ce603b555f017dd689a2db6819b85ddbbd1 | [
"MIT"
] | null | null | null | defmodule PhoenixTrello.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
imports other functionality to make it easier
to build and query models.
Finally, if the test case interacts with ... | 25.209302 | 72 | 0.711255 |
18cfe2ef8be1f9940bfe04db6de3e8989b677734 | 1,695 | ex | Elixir | lib/uro/events.ex | V-Sekai/uro | 0b23da65d5c7e459efcd6b2c3d9bdf91c533b737 | [
"MIT"
] | 1 | 2022-01-11T04:05:39.000Z | 2022-01-11T04:05:39.000Z | lib/uro/events.ex | V-Sekai/uro | 0b23da65d5c7e459efcd6b2c3d9bdf91c533b737 | [
"MIT"
] | 35 | 2021-02-10T08:18:57.000Z | 2021-05-06T17:19:50.000Z | lib/uro/events.ex | V-Sekai/uro | 0b23da65d5c7e459efcd6b2c3d9bdf91c533b737 | [
"MIT"
] | null | null | null | defmodule Uro.Events do
@moduledoc """
The Events context.
"""
import Ecto.Query, warn: false
alias Uro.Repo
alias Uro.Events.Event
@doc """
Returns the list of events.
## Examples
iex> list_events()
[%Event{}, ...]
"""
def list_events do
Repo.all(Event)
end
@doc """
G... | 16.142857 | 60 | 0.574041 |
18cfeab84e0d0f8be7795295b42f1feb9df2e3ef | 2,162 | exs | Elixir | test/paths_test.exs | katehedgpeth/resemblixir | 0ff32c75d9e9cd897477c721c38227cf0e62b969 | [
"MIT"
] | null | null | null | test/paths_test.exs | katehedgpeth/resemblixir | 0ff32c75d9e9cd897477c721c38227cf0e62b969 | [
"MIT"
] | null | null | null | test/paths_test.exs | katehedgpeth/resemblixir | 0ff32c75d9e9cd897477c721c38227cf0e62b969 | [
"MIT"
] | null | null | null | defmodule Resemblixir.PathsTest do
use ExUnit.Case, async: true
alias Resemblixir.Paths
test "parent_directory" do
assert Paths.parent_directory() == File.cwd!()
end
describe "file_directory" do
test "with no arguments" do
assert Paths.file_directory() == Path.join([File.cwd!(), "priv", "resem... | 32.268657 | 119 | 0.648936 |
18cfec9397778b3e46724e2055dde11b6406322e | 3,492 | ex | Elixir | lib/structs/user.ex | SpaceEEC/crux_structs | c10adb64ab6392c8601e4c53447128294daf0ae3 | [
"MIT"
] | 6 | 2018-05-22T07:13:47.000Z | 2019-10-17T03:40:22.000Z | lib/structs/user.ex | SpaceEEC/crux_structs | c10adb64ab6392c8601e4c53447128294daf0ae3 | [
"MIT"
] | 2 | 2018-11-01T17:11:51.000Z | 2019-06-15T13:33:31.000Z | lib/structs/user.ex | SpaceEEC/crux_structs | c10adb64ab6392c8601e4c53447128294daf0ae3 | [
"MIT"
] | 2 | 2018-10-29T06:53:41.000Z | 2019-06-14T19:15:56.000Z | defmodule Crux.Structs.User do
@moduledoc """
Represents a Discord [User Object](https://discord.com/developers/docs/resources/user#user-object)
"""
@moduledoc since: "0.1.0"
@behaviour Crux.Structs
alias Crux.Structs
alias Crux.Structs.{Member, Message, Presence, Snowflake, User, Util, VoiceState}
d... | 24.25 | 100 | 0.631443 |
18d0251a8e86491626b115a4f774d04b3db5d15a | 1,545 | ex | Elixir | lib/plug/logger.ex | se-apc/plug | ab79ac2fe0261b9865d71154be0c2c1530646629 | [
"Apache-2.0"
] | null | null | null | lib/plug/logger.ex | se-apc/plug | ab79ac2fe0261b9865d71154be0c2c1530646629 | [
"Apache-2.0"
] | null | null | null | lib/plug/logger.ex | se-apc/plug | ab79ac2fe0261b9865d71154be0c2c1530646629 | [
"Apache-2.0"
] | null | null | null | defmodule Plug.Logger do
@moduledoc """
A plug for logging basic request information in the format:
GET /index.html
Sent 200 in 572ms
To use it, just plug it into the desired module.
plug Plug.Logger, log: :debug
## Options
* `:log` - The log level at which this plug should log its re... | 26.186441 | 98 | 0.662136 |
18d036f7f7019cd8a7d10b64c04eeacb7b027b93 | 5,981 | exs | Elixir | test/controllers/account_controller_test.exs | zombalo/cgrates_web_jsonapi | 47845be4311839fe180cc9f2c7c6795649da4430 | [
"MIT"
] | null | null | null | test/controllers/account_controller_test.exs | zombalo/cgrates_web_jsonapi | 47845be4311839fe180cc9f2c7c6795649da4430 | [
"MIT"
] | null | null | null | test/controllers/account_controller_test.exs | zombalo/cgrates_web_jsonapi | 47845be4311839fe180cc9f2c7c6795649da4430 | [
"MIT"
] | null | null | null | defmodule CgratesWebJsonapi.AccountControllerTest do
use CgratesWebJsonapi.ConnCase
import Mock
import CgratesWebJsonapi.Factory
alias CgratesWebJsonapi.Account
@valid_attrs %{allow_negative: true}
@invalid_attrs %{}
def fake_account_response(id) do
%{
"action_triggers" => nil,
"allow_... | 28.89372 | 103 | 0.535195 |
18d04f62d543b00c723c4d292dff634fa192ac98 | 10,963 | ex | Elixir | lib/currency_formatter.ex | molbrown/currency_formatter | 35bd8779700d1508a9f8cde8301f71a81bc461d7 | [
"WTFPL"
] | 14 | 2016-03-23T21:51:07.000Z | 2022-01-26T18:33:43.000Z | lib/currency_formatter.ex | molbrown/currency_formatter | 35bd8779700d1508a9f8cde8301f71a81bc461d7 | [
"WTFPL"
] | 12 | 2016-06-24T14:22:22.000Z | 2021-08-09T22:58:52.000Z | lib/currency_formatter.ex | molbrown/currency_formatter | 35bd8779700d1508a9f8cde8301f71a81bc461d7 | [
"WTFPL"
] | 13 | 2016-06-24T09:48:16.000Z | 2021-07-15T21:55:08.000Z | defmodule CurrencyFormatter do
@moduledoc """
This module takes care of formatting a number to a currency.
You can also request a map containing all the formatting settings for a currency.
"""
@currencies "./lib/currency_iso.json"
|> File.read!()
|> Poison.decode!()
@doc """
... | 29.710027 | 121 | 0.638694 |
18d0910c03e390143bc643c2809daea9f9e201b2 | 316 | ex | Elixir | lib/flash_web/plug_attack.ex | sickill/flash | 8797cb00b70c94b6f3bdd51e9cb456483f1c5741 | [
"Apache-2.0"
] | 1 | 2021-09-08T16:56:39.000Z | 2021-09-08T16:56:39.000Z | lib/flash_web/plug_attack.ex | sickill/flash | 8797cb00b70c94b6f3bdd51e9cb456483f1c5741 | [
"Apache-2.0"
] | null | null | null | lib/flash_web/plug_attack.ex | sickill/flash | 8797cb00b70c94b6f3bdd51e9cb456483f1c5741 | [
"Apache-2.0"
] | null | null | null | defmodule FlashWeb.PlugAttack do
use PlugAttack
rule "allow local", conn do
allow(conn.remote_ip == {127, 0, 0, 1})
end
rule "throttle by ip", conn do
throttle(conn.remote_ip,
period: 1_000,
limit: 5,
storage: {PlugAttack.Storage.Ets, FlashWeb.PlugAttack.Storage}
)
end
end
| 19.75 | 68 | 0.655063 |
18d0a9930fe3acf4b692f0ecd137e256821af661 | 460 | exs | Elixir | priv/repo/migrations/20211030153106_create_contexts_to_contexts.exs | danielmarreirosdeoliveira/cometoid | 7a1c4f7700eb4dbb5f4c44fdc5185d048a429e50 | [
"Apache-2.0"
] | null | null | null | priv/repo/migrations/20211030153106_create_contexts_to_contexts.exs | danielmarreirosdeoliveira/cometoid | 7a1c4f7700eb4dbb5f4c44fdc5185d048a429e50 | [
"Apache-2.0"
] | null | null | null | priv/repo/migrations/20211030153106_create_contexts_to_contexts.exs | danielmarreirosdeoliveira/cometoid | 7a1c4f7700eb4dbb5f4c44fdc5185d048a429e50 | [
"Apache-2.0"
] | null | null | null | defmodule Cometoid.Repo.Migrations.CreateContextsToContexts do
use Ecto.Migration
def change do
create table(:context_context, primary_key: false) do
add(:parent_id, references(:contexts, on_delete: :nothing), primary_key: true)
add(:child_id, references(:contexts, on_delete: :nothing), primary_key... | 30.666667 | 94 | 0.730435 |
18d0ac4dfff7fe8e293a5ae53d0937bae0882a00 | 1,813 | exs | Elixir | mix.exs | muziyoshiz/phoenix_sample_ap_app | d8ef72af5ab55f688c3e4e3ca028af9a9642b727 | [
"MIT"
] | null | null | null | mix.exs | muziyoshiz/phoenix_sample_ap_app | d8ef72af5ab55f688c3e4e3ca028af9a9642b727 | [
"MIT"
] | null | null | null | mix.exs | muziyoshiz/phoenix_sample_ap_app | d8ef72af5ab55f688c3e4e3ca028af9a9642b727 | [
"MIT"
] | null | null | null | defmodule PhoenixSampleAdApp.Mixfile do
use Mix.Project
def project do
[app: :phoenix_sample_ad_app,
version: "0.0.1",
elixir: "~> 1.2",
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix, :gettext] ++ Mix.compilers,
build_embedded: Mix.env == :prod,
start_permanent: Mix.... | 31.258621 | 89 | 0.60342 |
18d0bb3467d985df18961fd25413cac80f2d8960 | 19,380 | ex | Elixir | lib/mix/lib/mix/tasks/test.ex | cdfuller/elixir | 3bd3f88d57d7fff6cab7b171294b89fb08eedfe7 | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/tasks/test.ex | cdfuller/elixir | 3bd3f88d57d7fff6cab7b171294b89fb08eedfe7 | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/tasks/test.ex | cdfuller/elixir | 3bd3f88d57d7fff6cab7b171294b89fb08eedfe7 | [
"Apache-2.0"
] | null | null | null | defmodule Mix.Tasks.Test do
defmodule Cover do
@default_threshold 90
@moduledoc false
def start(compile_path, opts) do
Mix.shell().info("Cover compiling modules ...")
_ = :cover.stop()
_ = :cover.start()
case :cover.compile_beam_directory(compile_path |> to_charlist) do
... | 31.512195 | 104 | 0.646027 |
18d0c479212e08c9e4d05cf49ebe4515c51d37ea | 2,651 | exs | Elixir | test/cachex/actions/update_test.exs | botwerk/cachex | d37996d3be35b0d8281e347d44c024ecf2735131 | [
"MIT"
] | 946 | 2017-06-26T00:36:58.000Z | 2022-03-29T19:52:31.000Z | test/cachex/actions/update_test.exs | botwerk/cachex | d37996d3be35b0d8281e347d44c024ecf2735131 | [
"MIT"
] | 152 | 2017-06-28T10:01:24.000Z | 2022-03-24T18:46:13.000Z | test/cachex/actions/update_test.exs | botwerk/cachex | d37996d3be35b0d8281e347d44c024ecf2735131 | [
"MIT"
] | 84 | 2017-06-30T05:30:31.000Z | 2022-03-01T20:23:16.000Z | defmodule Cachex.Actions.UpdateTest do
use CachexCase
# This test just ensures that we can update the value associated with a key
# when the value already exists inside the cache. We make sure that any TTL
# associated with the key remains unchanged (as the record is being modified,
# not overwritten).
tes... | 31.188235 | 79 | 0.646548 |
18d0e414744329a2eb4e4f925ffc42eb5eb87e9e | 2,050 | ex | Elixir | clients/content/lib/google_api/content/v21/model/account_label.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/content/lib/google_api/content/v21/model/account_label.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/content/lib/google_api/content/v21/model/account_label.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... | 34.745763 | 110 | 0.683415 |
18d0f46a7152b1594f4bb3cf4eae7eae29880f65 | 919 | exs | Elixir | spec/message/handshake_spec.exs | rdalin82/pixie | add50e2bd7fbd807c7b82cd10a2123828be4c58f | [
"MIT"
] | null | null | null | spec/message/handshake_spec.exs | rdalin82/pixie | add50e2bd7fbd807c7b82cd10a2123828be4c58f | [
"MIT"
] | null | null | null | spec/message/handshake_spec.exs | rdalin82/pixie | add50e2bd7fbd807c7b82cd10a2123828be4c58f | [
"MIT"
] | null | null | null | defmodule PixieMessageHandshakeSpec do
use ESpec
let :message do
Pixie.Message.Handshake.init %{
channel: "/meta/handshake",
supported_connection_types: [],
minimum_version: "1.0",
ext: "foo bar",
id: "ab... | 23.564103 | 61 | 0.620239 |
18d102d9cc655fe75ae70999eb5c47e23741a800 | 1,770 | ex | Elixir | clients/firebase_hosting/lib/google_api/firebase_hosting/v1beta1/model/acting_user.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/firebase_hosting/lib/google_api/firebase_hosting/v1beta1/model/acting_user.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/firebase_hosting/lib/google_api/firebase_hosting/v1beta1/model/acting_user.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... | 35.4 | 180 | 0.731073 |
18d10b8fa96406354197d5ab1f96207d4b73d38e | 1,720 | ex | Elixir | lib/scenic/primitive/style/text_base.ex | bruceme/scenic | bd8a1e63c122c44cc263e1fb5dfab2547ce8ef43 | [
"Apache-2.0"
] | null | null | null | lib/scenic/primitive/style/text_base.ex | bruceme/scenic | bd8a1e63c122c44cc263e1fb5dfab2547ce8ef43 | [
"Apache-2.0"
] | null | null | null | lib/scenic/primitive/style/text_base.ex | bruceme/scenic | bd8a1e63c122c44cc263e1fb5dfab2547ce8ef43 | [
"Apache-2.0"
] | null | null | null | #
# Created by Boyd Multerer on 2021-02-05.
# Copyright © 2021-2021 Kry10 Limited. All rights reserved.
#
defmodule Scenic.Primitive.Style.TextBase do
@moduledoc """
Set the vertical alignment of text.
Example:
```elixir
graph
|> text( "Some Text", text_base: :alphabetic )
```
### Data Format
... | 28.666667 | 90 | 0.635465 |
18d10d178bbc558ca429f24cb19786dc9a5455a6 | 6,668 | exs | Elixir | elixir/test/homework/transactions_test.exs | MitchellJeppson/DivvyPayHQ-web-homework | 01dc6a7ee0173c92633d93f7ba7e9162b1189985 | [
"MIT"
] | null | null | null | elixir/test/homework/transactions_test.exs | MitchellJeppson/DivvyPayHQ-web-homework | 01dc6a7ee0173c92633d93f7ba7e9162b1189985 | [
"MIT"
] | null | null | null | elixir/test/homework/transactions_test.exs | MitchellJeppson/DivvyPayHQ-web-homework | 01dc6a7ee0173c92633d93f7ba7e9162b1189985 | [
"MIT"
] | 1 | 2021-03-30T07:41:56.000Z | 2021-03-30T07:41:56.000Z | defmodule Homework.TransactionsTest do
use Homework.DataCase
alias Ecto.UUID
alias Homework.Merchants
alias Homework.Transactions
alias Homework.Users
alias Homework.Companies
describe "transactions" do
alias Homework.Transactions.Transaction
setup do
{:ok, merchant1} =
Merchants.... | 32.21256 | 133 | 0.646821 |
18d11b6dc8f3ea63a943964fb2c9f36ad3c15e65 | 2,160 | ex | Elixir | clients/you_tube/lib/google_api/you_tube/v3/model/promoted_item.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/you_tube/lib/google_api/you_tube/v3/model/promoted_item.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/you_tube/lib/google_api/you_tube/v3/model/promoted_item.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... | 40 | 225 | 0.75463 |
18d11d86d53d30f985d37d753b5260c8736cbbb1 | 1,250 | ex | Elixir | lib/consul/agent.ex | emoragaf/consul-ex | 4ae8f6ea76d48c7fe3177fa8c4897beaebffbc2c | [
"MIT"
] | 48 | 2015-03-27T01:29:57.000Z | 2021-03-02T04:09:49.000Z | lib/consul/agent.ex | emoragaf/consul-ex | 4ae8f6ea76d48c7fe3177fa8c4897beaebffbc2c | [
"MIT"
] | 7 | 2015-03-11T20:44:33.000Z | 2019-03-13T09:02:52.000Z | lib/consul/agent.ex | emoragaf/consul-ex | 4ae8f6ea76d48c7fe3177fa8c4897beaebffbc2c | [
"MIT"
] | 29 | 2015-03-11T20:41:26.000Z | 2020-07-01T05:02:01.000Z | #
# The MIT License (MIT)
#
# Copyright (c) 2014-2015 Undead Labs, LLC
#
defmodule Consul.Agent do
alias Consul.Endpoint
use Consul.Endpoint, handler: Consul.Handler.Base
@agent "agent"
@checks "checks"
@force_leave "force-leave"
@join "join"
@members "members"
@self "self... | 22.727273 | 59 | 0.612 |
18d15a03afe296d53955cb33142ee0776c1e2768 | 1,266 | exs | Elixir | test/auto_api/capabilities/doors_capability_test.exs | nonninz/auto-api-elixir | 53e11542043285e94bbb5a0a3b8ffff0b1b47167 | [
"MIT"
] | 4 | 2018-01-19T16:11:10.000Z | 2019-12-13T16:35:10.000Z | test/auto_api/capabilities/doors_capability_test.exs | nonninz/auto-api-elixir | 53e11542043285e94bbb5a0a3b8ffff0b1b47167 | [
"MIT"
] | 5 | 2020-07-16T07:20:21.000Z | 2021-09-22T10:18:04.000Z | test/auto_api/capabilities/doors_capability_test.exs | nonninz/auto-api-elixir | 53e11542043285e94bbb5a0a3b8ffff0b1b47167 | [
"MIT"
] | 1 | 2021-02-17T18:36:13.000Z | 2021-02-17T18:36:13.000Z | # 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... | 46.888889 | 79 | 0.779621 |
18d1631b7912454e3c68af3aee327b6fcf94711b | 2,086 | ex | Elixir | clients/service_management/lib/google_api/service_management/v1/model/set_iam_policy_request.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/service_management/lib/google_api/service_management/v1/model/set_iam_policy_request.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/service_management/lib/google_api/service_management/v1/model/set_iam_policy_request.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... | 41.72 | 317 | 0.745925 |
18d169a1bdc4c9be08aca727de7a7598fcb6ae92 | 2,016 | ex | Elixir | clients/deployment_manager/lib/google_api/deployment_manager/v2/model/deployments_stop_request.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/deployment_manager/lib/google_api/deployment_manager/v2/model/deployments_stop_request.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/deployment_manager/lib/google_api/deployment_manager/v2/model/deployments_stop_request.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... | 41.142857 | 470 | 0.762897 |
18d1879195b4b3314de6465d481153014ead7d26 | 1,085 | exs | Elixir | config/config.exs | sealas/sealax | 3f11b7f649972a43f4812ea959bd2be2e0151baa | [
"MIT"
] | null | null | null | config/config.exs | sealas/sealax | 3f11b7f649972a43f4812ea959bd2be2e0151baa | [
"MIT"
] | 9 | 2021-08-19T01:09:55.000Z | 2022-03-08T01:18:45.000Z | config/config.exs | sealas/sealax | 3f11b7f649972a43f4812ea959bd2be2e0151baa | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
# General application configuration
use Mix.Config
config :sealax,
ecto_repos: [Sealax.Repo],
a... | 31.911765 | 86 | 0.764055 |
18d18e948d3205fff762d9f99474384dcdefd188 | 1,213 | ex | Elixir | lib/find_my_personal_web/controllers/api/teacher_controller.ex | gissandrogama/find_my_personal | 12f23b37e967949af9f3e511cf1ce684452d8f66 | [
"MIT"
] | null | null | null | lib/find_my_personal_web/controllers/api/teacher_controller.ex | gissandrogama/find_my_personal | 12f23b37e967949af9f3e511cf1ce684452d8f66 | [
"MIT"
] | 11 | 2022-01-12T02:39:42.000Z | 2022-02-09T02:17:04.000Z | lib/find_my_personal_web/controllers/api/teacher_controller.ex | gissandrogama/find_my_personal | 12f23b37e967949af9f3e511cf1ce684452d8f66 | [
"MIT"
] | null | null | null | defmodule FindMyPersonalWeb.Api.TeacherController do
use FindMyPersonalWeb, :controller
alias FindMyPersonal.Teachers
alias FindMyPersonal.Teachers.Teacher
action_fallback FindMyPersonalWeb.FallbackController
def index(conn, _params) do
teacher = Teachers.list_teacher()
render(conn, "index.json", t... | 28.880952 | 91 | 0.675185 |
18d1989d3dd427b42984e296246f1eddffff898f | 711 | ex | Elixir | lib/posts/explore.ex | Lechindianer/ex_pnut | 99164b73e9b60bfccb90574dd1a6f418a7bd96ed | [
"ISC"
] | 2 | 2019-07-12T04:07:34.000Z | 2019-11-26T01:08:14.000Z | lib/posts/explore.ex | Lechindianer/ex_pnut | 99164b73e9b60bfccb90574dd1a6f418a7bd96ed | [
"ISC"
] | null | null | null | lib/posts/explore.ex | Lechindianer/ex_pnut | 99164b73e9b60bfccb90574dd1a6f418a7bd96ed | [
"ISC"
] | 1 | 2019-11-26T01:18:54.000Z | 2019-11-26T01:18:54.000Z | defmodule ExPnut.Posts.Explore do
import ExPnut.Helper.HTTP
alias ExPnut.Posts.PostParams
@moduledoc """
Explore streams are basically pre-built searches with some simple criteria.
"""
@doc """
Retrieve a list of explore streams.
"""
def explore(client, %PostParams{} = post_params \\ %PostParams{}) ... | 28.44 | 103 | 0.701828 |
18d19b737ab2e79424bd2495fd0814ec6dfe6066 | 960 | ex | Elixir | lib/my_app.ex | mrDarcyMurphy/elixir-phoenix-playground | 8ae7237609a52c9a7a3a31f354329acadfb092a9 | [
"MIT"
] | null | null | null | lib/my_app.ex | mrDarcyMurphy/elixir-phoenix-playground | 8ae7237609a52c9a7a3a31f354329acadfb092a9 | [
"MIT"
] | null | null | null | lib/my_app.ex | mrDarcyMurphy/elixir-phoenix-playground | 8ae7237609a52c9a7a3a31f354329acadfb092a9 | [
"MIT"
] | null | null | null | defmodule MyApp do
use Application
# See http://elixir-lang.org/docs/stable/elixir/Application.html
# for more information on OTP Applications
def start(_type, _args) do
import Supervisor.Spec, warn: false
children = [
# Start the endpoint when the application starts
supervisor(MyApp.Endpo... | 30.967742 | 71 | 0.70625 |
18d1b8b4f9f71c20eb1916428223966979eb821b | 1,945 | ex | Elixir | lib/slime/parser/attributes_keyword.ex | thepeoplesbourgeois/slime | 55c4d738632ed6540a0a03e0a4022b02e398c2d9 | [
"MIT"
] | 312 | 2015-12-28T05:25:47.000Z | 2022-02-16T05:18:16.000Z | lib/slime/parser/attributes_keyword.ex | thepeoplesbourgeois/slime | 55c4d738632ed6540a0a03e0a4022b02e398c2d9 | [
"MIT"
] | 105 | 2015-12-27T21:20:58.000Z | 2022-02-24T05:23:38.000Z | lib/slime/parser/attributes_keyword.ex | thepeoplesbourgeois/slime | 55c4d738632ed6540a0a03e0a4022b02e398c2d9 | [
"MIT"
] | 45 | 2016-01-12T04:02:01.000Z | 2021-09-14T16:19:18.000Z | defmodule Slime.Parser.AttributesKeyword do
@moduledoc "
Utilities for handling element attributes.
"
@doc """
Merges multiply attributes values for keys specified in merge_rules.
Attribute value may be given by string, list, or {:eex, args} node
`merge_rules` should me an `%{attribute_name: joining_char... | 27.785714 | 91 | 0.585604 |
18d1e1bf25f0c9749cce6cfab0697572c03228b7 | 4,337 | ex | Elixir | lib/chit_chat/accounts.ex | areski/ex-chitchat | 0ec14e9af6acba40d6708f924b76fb4fbe592dcf | [
"MIT"
] | 1 | 2021-09-10T16:49:36.000Z | 2021-09-10T16:49:36.000Z | lib/chit_chat/accounts.ex | areski/ex-chitchat | 0ec14e9af6acba40d6708f924b76fb4fbe592dcf | [
"MIT"
] | 2 | 2020-05-22T18:42:14.000Z | 2021-01-25T16:34:38.000Z | lib/chit_chat/accounts.ex | areski/ex-chitchat | 0ec14e9af6acba40d6708f924b76fb4fbe592dcf | [
"MIT"
] | null | null | null | defmodule ChitChat.Accounts do
@moduledoc """
The Accounts context.
"""
import Ecto.Query, warn: false
import Comeonin.Argon2, only: [checkpw: 2, dummy_checkpw: 0]
alias ChitChat.Repo
alias ChitChat.Accounts.{Credential, User}
@doc """
Returns the list of users.
## Examples
iex> list_user... | 19.190265 | 89 | 0.607793 |
18d211ee72cd399b4d109ff97219aae532de79fe | 32,493 | exs | Elixir | test/livebook/intellisense_test.exs | danhuynhdev/livebook | d20d4f6bf123d58e4666c064027b55e3b300702f | [
"Apache-2.0"
] | null | null | null | test/livebook/intellisense_test.exs | danhuynhdev/livebook | d20d4f6bf123d58e4666c064027b55e3b300702f | [
"Apache-2.0"
] | null | null | null | test/livebook/intellisense_test.exs | danhuynhdev/livebook | d20d4f6bf123d58e4666c064027b55e3b300702f | [
"Apache-2.0"
] | null | null | null | defmodule Livebook.IntellisenseTest.Utils do
@moduledoc false
@doc """
Returns `{binding, env}` resulting from evaluating
the given block of code in a fresh context.
"""
defmacro eval(do: block) do
binding = []
env = :elixir.env_for_eval([])
{_, binding, env} = :elixir.eval_quoted(block, bindin... | 30.395697 | 339 | 0.465947 |
18d2274e0bf81594607ca2baa0d51aa43fed82a8 | 3,441 | exs | Elixir | test/controllers/json/account_controller_test.exs | suranyami/sentinel | aeb421e2e61a4bc14abe89b4a92cb1943a5965fb | [
"MIT"
] | null | null | null | test/controllers/json/account_controller_test.exs | suranyami/sentinel | aeb421e2e61a4bc14abe89b4a92cb1943a5965fb | [
"MIT"
] | null | null | null | test/controllers/json/account_controller_test.exs | suranyami/sentinel | aeb421e2e61a4bc14abe89b4a92cb1943a5965fb | [
"MIT"
] | null | null | null | defmodule Json.AccountControllerTest do
use Sentinel.ConnCase
alias Ecto.Changeset
alias Sentinel.Ueberauthenticator
alias Sentinel.User
@new_email "user@example.com"
@new_password "secret"
defp old_email do
"old@example.com"
end
setup do
on_exit fn ->
Application.delete_env :sentine... | 32.462264 | 93 | 0.674513 |
18d296a56bdd4aeeebc1ee6566ace8d5b68df23c | 16,155 | ex | Elixir | clients/content/lib/google_api/content/v21/api/products.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v21/api/products.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/content/lib/google_api/content/v21/api/products.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"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... | 47.795858 | 198 | 0.62705 |
18d29b67a0b4e9df026a74a411c4a2d4e0881cc6 | 45 | ex | Elixir | lib/base/sigil.ex | auroche/commerce_cure | 82e2d60d1044f86dd2f491f4713a31132d709ccf | [
"MIT"
] | null | null | null | lib/base/sigil.ex | auroche/commerce_cure | 82e2d60d1044f86dd2f491f4713a31132d709ccf | [
"MIT"
] | null | null | null | lib/base/sigil.ex | auroche/commerce_cure | 82e2d60d1044f86dd2f491f4713a31132d709ccf | [
"MIT"
] | null | null | null | defmodule CommerceCure.Sigil do
# Stub
end
| 11.25 | 31 | 0.777778 |
18d29bdc6301154ac5bfba467eaf685b379e548f | 928 | exs | Elixir | test/four_lucha/promo_test.exs | Thomas-Jean/four_lucha | 591627059c02edc3315b5cac2c35eacb821108ff | [
"Apache-2.0"
] | 1 | 2021-02-21T19:15:27.000Z | 2021-02-21T19:15:27.000Z | test/four_lucha/promo_test.exs | Thomas-Jean/four_lucha | 591627059c02edc3315b5cac2c35eacb821108ff | [
"Apache-2.0"
] | null | null | null | test/four_lucha/promo_test.exs | Thomas-Jean/four_lucha | 591627059c02edc3315b5cac2c35eacb821108ff | [
"Apache-2.0"
] | null | null | null | defmodule FourLucha.PromoTest do
use ExUnit.Case, async: true
use ExVCR.Mock, adapter: ExVCR.Adapter.Hackney, options: [clear_mock: true]
ExVCR.Config.filter_url_params(true)
setup_all do
HTTPoison.start()
end
setup do
{status, _cleared} = Cachex.clear(:gb_cache)
status
end
test "respons... | 26.514286 | 77 | 0.681034 |
18d2b340956dc7749265874849e495b850a354f8 | 8,648 | ex | Elixir | lib/finch.ex | k-cross/finch | 6cccfb2d5f00515ea52b5267695b290d9415e148 | [
"MIT"
] | null | null | null | lib/finch.ex | k-cross/finch | 6cccfb2d5f00515ea52b5267695b290d9415e148 | [
"MIT"
] | null | null | null | lib/finch.ex | k-cross/finch | 6cccfb2d5f00515ea52b5267695b290d9415e148 | [
"MIT"
] | null | null | null | defmodule Finch do
@external_resource "README.md"
@moduledoc "README.md"
|> File.read!()
|> String.split("<!-- MDOC !-->")
|> Enum.fetch!(1)
alias Finch.{PoolManager, Request, Response}
use Supervisor
@default_pool_size 10
@default_pool_count 1
@pool_config_schem... | 31.677656 | 134 | 0.63876 |
18d2f39aaa94cdaf19e3edd4f3c9ed197d36a48e | 68,025 | ex | Elixir | lib/ecto/repo.ex | matteing/ecto | beabc36931222ac574bb0047fef90d84cb138459 | [
"Apache-2.0"
] | 3,931 | 2016-06-16T11:38:48.000Z | 2022-03-31T21:24:19.000Z | lib/ecto/repo.ex | matteing/ecto | beabc36931222ac574bb0047fef90d84cb138459 | [
"Apache-2.0"
] | 2,343 | 2016-06-16T11:18:09.000Z | 2022-03-27T23:44:43.000Z | lib/ecto/repo.ex | matteing/ecto | beabc36931222ac574bb0047fef90d84cb138459 | [
"Apache-2.0"
] | 1,300 | 2016-06-17T13:56:59.000Z | 2022-03-31T01:46:20.000Z | defmodule Ecto.Repo do
@moduledoc """
Defines a repository.
A repository maps to an underlying data store, controlled by the
adapter. For example, Ecto ships with a Postgres adapter that
stores data into a PostgreSQL database.
When used, the repository expects the `:otp_app` and `:adapter` as
option. Th... | 37.479339 | 137 | 0.674267 |
18d36d45d4fafce1e6d57b68dc58bbf54c86d1b8 | 33,551 | ex | Elixir | lib/teiserver/protocols/spring/spring_in.ex | adelq/teiserver | 77140896df6b4e1ec9e680d64c31ffb528158d14 | [
"MIT"
] | null | null | null | lib/teiserver/protocols/spring/spring_in.ex | adelq/teiserver | 77140896df6b4e1ec9e680d64c31ffb528158d14 | [
"MIT"
] | null | null | null | lib/teiserver/protocols/spring/spring_in.ex | adelq/teiserver | 77140896df6b4e1ec9e680d64c31ffb528158d14 | [
"MIT"
] | null | null | null | defmodule Teiserver.Protocols.SpringIn do
@moduledoc """
In component of the Spring protocol
Protocol definition:
https://springrts.com/dl/LobbyProtocol/ProtocolDescription.html
"""
require Logger
alias Teiserver.Battle.Lobby
alias Teiserver.{Coordinator, Room, User, Client}
alias Teiserver.Account.U... | 29.124132 | 128 | 0.600995 |
18d37f2f48aad97f29312f93e28877eb34220727 | 378 | ex | Elixir | lib/words_with_enemies/game/supervisor.ex | deerob4/words-with-enemies | f9de13d599bdecc71007db57d3c21651b9be7463 | [
"MIT"
] | 1 | 2015-02-15T23:50:29.000Z | 2015-02-15T23:50:29.000Z | lib/words_with_enemies/game/supervisor.ex | deerob4/words-with-enemies | f9de13d599bdecc71007db57d3c21651b9be7463 | [
"MIT"
] | null | null | null | lib/words_with_enemies/game/supervisor.ex | deerob4/words-with-enemies | f9de13d599bdecc71007db57d3c21651b9be7463 | [
"MIT"
] | null | null | null | defmodule WordsWithEnemies.Game.Supervisor do
@moduledoc """
Supervises game servers.
"""
use Supervisor
def start_link() do
Supervisor.start_link(__MODULE__, [], name: __MODULE__)
end
def init(_) do
children = [
worker(WordsWithEnemies.Game.Server, [], restart: :transient)
]
sup... | 18.9 | 67 | 0.690476 |
18d39ba277e448c0afd0419cb878067cadf2bfdc | 1,922 | ex | Elixir | lib/cache_money/adapters/ets.ex | kianmeng/cache_money | 5132689056660675f9e5b9a74a00d77478401f34 | [
"MIT"
] | null | null | null | lib/cache_money/adapters/ets.ex | kianmeng/cache_money | 5132689056660675f9e5b9a74a00d77478401f34 | [
"MIT"
] | null | null | null | lib/cache_money/adapters/ets.ex | kianmeng/cache_money | 5132689056660675f9e5b9a74a00d77478401f34 | [
"MIT"
] | null | null | null | defmodule CacheMoney.Adapters.ETS do
@moduledoc """
Redis Adapter for Cache Money
"""
use GenServer
@behaviour CacheMoney.Adapter
# 10 years
@max_cache_expiry :timer.hours(24 * 365 * 10)
@impl true
def start_link(config) do
{:ok, pid} = GenServer.start_link(__MODULE__, config)
send(pid, :p... | 27.457143 | 90 | 0.630073 |
18d3a4c2d0372277a2ab7e089c1c9fb875c8d26f | 606 | ex | Elixir | ping_pong/ping_pong.ex | ipmsteven/little_elixir | 3d6355de38afb9cd87571028013a760616152332 | [
"MIT"
] | null | null | null | ping_pong/ping_pong.ex | ipmsteven/little_elixir | 3d6355de38afb9cd87571028013a760616152332 | [
"MIT"
] | null | null | null | ping_pong/ping_pong.ex | ipmsteven/little_elixir | 3d6355de38afb9cd87571028013a760616152332 | [
"MIT"
] | null | null | null | defmodule Ping do
def act do
receive do
{pong_pid} ->
IO.puts "Start! Ping!"
send(pong_pid, {self})
{pong_pid, :pong} ->
IO.puts "Got Pong, Ping! it back!"
send(pong_pid, {self, :ping})
_ ->
IO.puts "unknown msg"
end
act
end
end
defmodule Pong d... | 18.9375 | 42 | 0.511551 |
18d3a584f99c0fdf0fc2b81bdfd5287177856657 | 1,497 | ex | Elixir | clients/drive_activity/lib/google_api/drive_activity/v2/model/group.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/drive_activity/lib/google_api/drive_activity/v2/model/group.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/drive_activity/lib/google_api/drive_activity/v2/model/group.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 29.94 | 86 | 0.708751 |
18d3a81072cceac6423111f2380db545373de674 | 782 | ex | Elixir | lib/ebnf_parser/interpreter_terms/array.ex | langens-jonathan/mu-authorization | 3b411460b81b87581af7c7f302b1d3bec4610608 | [
"MIT"
] | 1 | 2019-09-05T23:00:48.000Z | 2019-09-05T23:00:48.000Z | lib/ebnf_parser/interpreter_terms/array.ex | langens-jonathan/mu-authorization | 3b411460b81b87581af7c7f302b1d3bec4610608 | [
"MIT"
] | 7 | 2020-10-27T20:42:06.000Z | 2021-11-15T07:41:15.000Z | lib/ebnf_parser/interpreter_terms/array.ex | langens-jonathan/mu-authorization | 3b411460b81b87581af7c7f302b1d3bec4610608 | [
"MIT"
] | 6 | 2016-04-06T09:28:43.000Z | 2021-08-09T12:29:16.000Z | defmodule InterpreterTerms.Array do
alias Generator.State, as: State
defstruct [:elements, {:state, %State{}}]
@type t :: %InterpreterTerms.Array{
elements: [EbnfParser.GeneratorConstructor.ebnf_term()],
state: Generator.State.t()
}
defimpl EbnfParser.GeneratorProtocol do
def ... | 32.583333 | 84 | 0.681586 |
18d3cf6e85bea63c13d1fbe26c43d933a9263cce | 2,642 | ex | Elixir | lib/membrane/srtp/encryptor.ex | simoexpo/membrane_rtp_plugin | 925053eb6ad0befbfe79ab1dad51e40f3b68ae69 | [
"Apache-2.0"
] | null | null | null | lib/membrane/srtp/encryptor.ex | simoexpo/membrane_rtp_plugin | 925053eb6ad0befbfe79ab1dad51e40f3b68ae69 | [
"Apache-2.0"
] | null | null | null | lib/membrane/srtp/encryptor.ex | simoexpo/membrane_rtp_plugin | 925053eb6ad0befbfe79ab1dad51e40f3b68ae69 | [
"Apache-2.0"
] | null | null | null | defmodule Membrane.SRTP.Encryptor do
@moduledoc """
Converts plain RTP packets to SRTP.
Requires adding [srtp](https://github.com/membraneframework/elixir_libsrtp) dependency to work.
"""
use Membrane.Filter
require Membrane.Logger
alias Membrane.Buffer
def_input_pad :input, caps: :any, demand_unit:... | 25.901961 | 97 | 0.629826 |
18d3d9da6dbbbce738f4ef5b80d71e2b386df215 | 307 | ex | Elixir | lib/consumer/supervisor.ex | Bangor-Makerspace/JADBot | 3e8ca9da46eea22db19f5da585aeb2329a978d12 | [
"BSD-3-Clause"
] | null | null | null | lib/consumer/supervisor.ex | Bangor-Makerspace/JADBot | 3e8ca9da46eea22db19f5da585aeb2329a978d12 | [
"BSD-3-Clause"
] | null | null | null | lib/consumer/supervisor.ex | Bangor-Makerspace/JADBot | 3e8ca9da46eea22db19f5da585aeb2329a978d12 | [
"BSD-3-Clause"
] | 1 | 2021-07-01T19:02:14.000Z | 2021-07-01T19:02:14.000Z | defmodule JADBot.ConsumerSupervisor do
use Supervisor
def start_link(args) do
Supervisor.start_link(__MODULE__, args, name: __MODULE__)
end
@impl true
def init(_init_arg) do
children = [JADBot.BasicConsumer]
Supervisor.init(children, strategy: :one_for_one)
end
end
| 20.466667 | 62 | 0.710098 |
18d3e0d1556b4c7d2ab9ebe85188db4709ab77ec | 5,122 | ex | Elixir | lib/ingram_marketplace/api/order_management.ex | fbettag/ingram_marketplace.ex | 1c63d391707058fb8cf58fdefd54e2ade97acf4b | [
"MIT"
] | null | null | null | lib/ingram_marketplace/api/order_management.ex | fbettag/ingram_marketplace.ex | 1c63d391707058fb8cf58fdefd54e2ade97acf4b | [
"MIT"
] | null | null | null | lib/ingram_marketplace/api/order_management.ex | fbettag/ingram_marketplace.ex | 1c63d391707058fb8cf58fdefd54e2ade97acf4b | [
"MIT"
] | null | null | null | defmodule Ingram.Marketplace.OrderManagement do
@moduledoc """
API calls for all endpoints tagged `OrderManagement`.
"""
import Ingram.Marketplace.RequestBuilder
alias Ingram.Marketplace.Connection
alias Ingram.Marketplace.Model
@doc """
Create a new order
Place an order for a set of products for a s... | 33.045161 | 153 | 0.638032 |
18d3f858f576d3ac188d40e0662b175a57c65239 | 8,353 | ex | Elixir | lib/battle_box/games/marooned/logic.ex | GrantJamesPowell/battle_box | 301091955b68cd4672f6513d645eca4e3c4e17d0 | [
"Apache-2.0"
] | 2 | 2020-10-17T05:48:49.000Z | 2020-11-11T02:34:15.000Z | lib/battle_box/games/marooned/logic.ex | FlyingDutchmanGames/battle_box | 301091955b68cd4672f6513d645eca4e3c4e17d0 | [
"Apache-2.0"
] | 3 | 2020-05-18T05:52:21.000Z | 2020-06-09T07:24:14.000Z | lib/battle_box/games/marooned/logic.ex | FlyingDutchmanGames/battle_box | 301091955b68cd4672f6513d645eca4e3c4e17d0 | [
"Apache-2.0"
] | null | null | null | defmodule BattleBox.Games.Marooned.Logic do
alias BattleBox.Games.Marooned
alias BattleBox.Games.Marooned.Error.{
CannotMoveIntoOpponent,
CannotMoveIntoRemovedSquare,
CannotMoveOffBoard,
CannotMoveToNonAdjacentSquare,
CannotMoveToSquareYouAlreadyOccupy,
CannotRemoveASquareAlreadyRemoved,
... | 34.659751 | 98 | 0.620855 |
18d467e251442859f10f56b5523338656a54e2a6 | 191 | exs | Elixir | codefights/elixir/circle_of_numbers/code.exs | lowks/levelup | 805e48cbf33d48616f55ef1b3740bb15b548054d | [
"MIT"
] | null | null | null | codefights/elixir/circle_of_numbers/code.exs | lowks/levelup | 805e48cbf33d48616f55ef1b3740bb15b548054d | [
"MIT"
] | 39 | 2018-04-15T12:36:36.000Z | 2018-09-16T15:31:50.000Z | codefights/elixir/circle_of_numbers/code.exs | lowks/levelup | 805e48cbf33d48616f55ef1b3740bb15b548054d | [
"MIT"
] | null | null | null | def circleOfNumbers(n, firstNumber) when (firstNumber >= 0.5*n) do
firstNumber - 0.5*n
end
def circleOfNumbers(n, firstNumber) when (firstNumber < 0.5*n) do
(firstNumber) + 0.5*n
end
| 27.285714 | 66 | 0.701571 |
18d470014ec29d36a5eb306a26816b2d68c97aa7 | 3,236 | exs | Elixir | test/plausible_web/controllers/stats_controller_test.exs | etienneCharignon/analytics | 924c96f0a563432fffcb83c6c01cb04169d1a819 | [
"MIT"
] | 2 | 2020-05-16T13:48:44.000Z | 2020-05-22T09:52:36.000Z | test/plausible_web/controllers/stats_controller_test.exs | etienneCharignon/analytics | 924c96f0a563432fffcb83c6c01cb04169d1a819 | [
"MIT"
] | 2 | 2020-07-09T21:44:35.000Z | 2020-07-14T07:06:10.000Z | test/plausible_web/controllers/stats_controller_test.exs | ffMathy/analytics | 4e8c06076a7a94c4ad3b2410437f2b0ab31e1f8e | [
"MIT"
] | null | null | null | defmodule PlausibleWeb.StatsControllerTest do
use PlausibleWeb.ConnCase
use Plausible.Repo
import Plausible.TestUtils
describe "GET /:website - anonymous user" do
test "public site - shows site stats", %{conn: conn} do
insert(:site, domain: "public-site.io", public: true)
conn = get(conn, "/pu... | 33.708333 | 97 | 0.634116 |
18d472b034e547a2658ecad291895e90e5df7b0a | 1,167 | exs | Elixir | config/dev.exs | powerhome/clockr | 751ceb03885a1a0a0f20e7443e961d6f1ca0a091 | [
"Apache-2.0"
] | null | null | null | config/dev.exs | powerhome/clockr | 751ceb03885a1a0a0f20e7443e961d6f1ca0a091 | [
"Apache-2.0"
] | null | null | null | config/dev.exs | powerhome/clockr | 751ceb03885a1a0a0f20e7443e961d6f1ca0a091 | [
"Apache-2.0"
] | 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 :clockr, Clockr.Endpoint,
http: [port: 4000],
... | 27.785714 | 73 | 0.676949 |
18d492c4967034a4ec5191993e77c7f29ac7fa8c | 2,370 | ex | Elixir | clients/sheets/lib/google_api/sheets/v4/model/extended_value.ex | jechol/elixir-google-api | 0290b683dfc6491ca2ef755a80bc329378738d03 | [
"Apache-2.0"
] | null | null | null | clients/sheets/lib/google_api/sheets/v4/model/extended_value.ex | jechol/elixir-google-api | 0290b683dfc6491ca2ef755a80bc329378738d03 | [
"Apache-2.0"
] | null | null | null | clients/sheets/lib/google_api/sheets/v4/model/extended_value.ex | jechol/elixir-google-api | 0290b683dfc6491ca2ef755a80bc329378738d03 | [
"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.169492 | 235 | 0.70211 |
18d4d8b6f74777fa25c74dc1fbc10aeb8f54d6a7 | 5,898 | ex | Elixir | lib/phoenix/live_dashboard/helpers.ex | albertored/phoenix_live_dashboard | 2807be12795cff88661e6d430de12b960edf1bde | [
"MIT"
] | null | null | null | lib/phoenix/live_dashboard/helpers.ex | albertored/phoenix_live_dashboard | 2807be12795cff88661e6d430de12b960edf1bde | [
"MIT"
] | null | null | null | lib/phoenix/live_dashboard/helpers.ex | albertored/phoenix_live_dashboard | 2807be12795cff88661e6d430de12b960edf1bde | [
"MIT"
] | null | null | null | defmodule Phoenix.LiveDashboard.Helpers do
@moduledoc false
import Phoenix.LiveView.Helpers
@format_limit 100
@doc """
Computes a route path to the given route, node, and params.
"""
def live_dashboard_path(socket, route, node, params) do
apply(
socket.router.__helpers__(),
:live_dashboa... | 26.687783 | 96 | 0.619702 |
18d5061cd351d461428fba498a1aea0a7de86806 | 68 | exs | Elixir | test/test_helper.exs | jakon89/siwapp | b5f8fd43458deae72c76e434ed0c63b620cb97a4 | [
"MIT"
] | 4 | 2015-02-12T09:23:47.000Z | 2022-03-09T18:11:06.000Z | test/test_helper.exs | jakon89/siwapp | b5f8fd43458deae72c76e434ed0c63b620cb97a4 | [
"MIT"
] | 254 | 2021-12-09T14:40:41.000Z | 2022-03-31T08:09:37.000Z | test/test_helper.exs | jakon89/siwapp | b5f8fd43458deae72c76e434ed0c63b620cb97a4 | [
"MIT"
] | 1 | 2022-03-07T10:25:49.000Z | 2022-03-07T10:25:49.000Z | ExUnit.start()
Ecto.Adapters.SQL.Sandbox.mode(Siwapp.Repo, :manual)
| 22.666667 | 52 | 0.779412 |
18d5249c8f967f415855b7c495ce4a844ffc3225 | 994 | ex | Elixir | test/support/channel_case.ex | silppuri/daily | a31034dedbcc2eb74bd2e07e703df836c5b3607f | [
"MIT"
] | null | null | null | test/support/channel_case.ex | silppuri/daily | a31034dedbcc2eb74bd2e07e703df836c5b3607f | [
"MIT"
] | null | null | null | test/support/channel_case.ex | silppuri/daily | a31034dedbcc2eb74bd2e07e703df836c5b3607f | [
"MIT"
] | 1 | 2019-09-05T12:37:23.000Z | 2019-09-05T12:37:23.000Z | defmodule DailyWeb.ChannelCase do
@moduledoc """
This module defines the test case to be used by
channel tests.
Such tests rely on `Phoenix.ChannelTest` and also
import other functionality to make it easier
to build and query models.
Finally, if the test case interacts with the database,
it cannot be ... | 22.590909 | 67 | 0.699195 |
18d524b1e5b15cf69e1a1a5fcf99c8cbc533d388 | 1,639 | ex | Elixir | web/controllers/tp_threshold_controller.ex | zombalo/cgrates_web_jsonapi | 47845be4311839fe180cc9f2c7c6795649da4430 | [
"MIT"
] | null | null | null | web/controllers/tp_threshold_controller.ex | zombalo/cgrates_web_jsonapi | 47845be4311839fe180cc9f2c7c6795649da4430 | [
"MIT"
] | null | null | null | web/controllers/tp_threshold_controller.ex | zombalo/cgrates_web_jsonapi | 47845be4311839fe180cc9f2c7c6795649da4430 | [
"MIT"
] | null | null | null | defmodule CgratesWebJsonapi.TpThresholdController do
use CgratesWebJsonapi.Web, :controller
use JaResource
use CgratesWebJsonapi.TpSubresource
use CgratesWebJsonapi.DefaultSorting
use CgratesWebJsonapi.CsvExport
use CgratesWebJsonapi.DeleteAll
alias CgratesWebJsonapi.TpThreshold
plug JaResource
def... | 49.666667 | 121 | 0.632093 |
18d5324b9c192991686f9db4650ae3a195c9507b | 810 | ex | Elixir | lib/tnd_web/controllers/user_registration_controller.ex | tndrpg/tnd | a9a348ed7ce2f3d8f55046559f9551e2607f3236 | [
"0BSD"
] | null | null | null | lib/tnd_web/controllers/user_registration_controller.ex | tndrpg/tnd | a9a348ed7ce2f3d8f55046559f9551e2607f3236 | [
"0BSD"
] | 1 | 2021-05-11T14:31:58.000Z | 2021-05-11T14:31:58.000Z | lib/tnd_web/controllers/user_registration_controller.ex | tndrpg/tnd | a9a348ed7ce2f3d8f55046559f9551e2607f3236 | [
"0BSD"
] | null | null | null | defmodule TndWeb.UserRegistrationController do
use TndWeb, :controller
alias Tnd.Accounts
alias Tnd.Accounts.User
alias TndWeb.UserAuth
def new(conn, _params) do
changeset = Accounts.change_user_registration(%User{})
render(conn, "new.html", changeset: changeset)
end
def create(conn, %{"user" =... | 26.129032 | 61 | 0.639506 |
18d5629f2db365cc52a109b5a9dbad9506864201 | 700 | ex | Elixir | lib/mix/tasks/political.multi.ex | wisq/political | 7a28dd9da95bc461be8f39411361519b471fa4c3 | [
"MIT"
] | null | null | null | lib/mix/tasks/political.multi.ex | wisq/political | 7a28dd9da95bc461be8f39411361519b471fa4c3 | [
"MIT"
] | null | null | null | lib/mix/tasks/political.multi.ex | wisq/political | 7a28dd9da95bc461be8f39411361519b471fa4c3 | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.Political.Multi do
use Mix.Task
@shortdoc "Show messages that span multiple topics"
def run([file]) do
Mix.Task.run("app.start")
count =
Political.Parser.parse_file(file)
|> Stream.map(fn msg ->
{msg, Political.Stats.message_categories(msg)}
end)
|> S... | 24.137931 | 76 | 0.584286 |
18d566fc353516a76d419fa28a9744de9a4e6665 | 1,473 | ex | Elixir | clients/cloud_functions/lib/google_api/cloud_functions/v1/model/retry.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/cloud_functions/lib/google_api/cloud_functions/v1/model/retry.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/cloud_functions/lib/google_api/cloud_functions/v1/model/retry.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 32.021739 | 77 | 0.760353 |
18d5685eea557bee584b0ee67ea2c54d7454c4c3 | 7,291 | ex | Elixir | lib/sanbase/metric/sql_query_helper.ex | rmoorman/sanbase2 | 226784ab43a24219e7332c49156b198d09a6dd85 | [
"MIT"
] | 1 | 2022-01-30T19:51:39.000Z | 2022-01-30T19:51:39.000Z | lib/sanbase/metric/sql_query_helper.ex | rmoorman/sanbase2 | 226784ab43a24219e7332c49156b198d09a6dd85 | [
"MIT"
] | null | null | null | lib/sanbase/metric/sql_query_helper.ex | rmoorman/sanbase2 | 226784ab43a24219e7332c49156b198d09a6dd85 | [
"MIT"
] | null | null | null | defmodule Sanbase.Metric.SqlQuery.Helper do
@aggregations [:any, :sum, :avg, :min, :max, :last, :first, :median, :count, :ohlc]
@type operator ::
:inside_channel
| :outside_channel
| :less_than
| :less_than_or_equal_to
| :greater_than
| :greater_than_or_e... | 36.273632 | 112 | 0.678919 |
18d5954e9b254e54d2407033a3fa9ec768726288 | 1,785 | exs | Elixir | config/dev.exs | jvdvleuten/jetlog | 916ebaa4c163279c078ebe0a7c0e14f7d0a3c3f2 | [
"Apache-2.0"
] | null | null | null | config/dev.exs | jvdvleuten/jetlog | 916ebaa4c163279c078ebe0a7c0e14f7d0a3c3f2 | [
"Apache-2.0"
] | null | null | null | config/dev.exs | jvdvleuten/jetlog | 916ebaa4c163279c078ebe0a7c0e14f7d0a3c3f2 | [
"Apache-2.0"
] | null | null | null | use Mix.Config
# Configure your database
config :jetlog, Jetlog.Repo,
username: "postgres",
password: "postgres",
database: "jetlog_dev",
hostname: "localhost",
show_sensitive_data_on_connection_error: true,
pool_size: 10
# For development, we disable any cache and enable
# debugging and code reloading.
#... | 28.333333 | 68 | 0.710364 |
18d5a498b766bc092740e60a6a7bfd6ea67ad9ff | 2,902 | ex | Elixir | clients/health_care/lib/google_api/health_care/v1beta1/model/user_data_mapping.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/health_care/lib/google_api/health_care/v1beta1/model/user_data_mapping.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/health_care/lib/google_api/health_care/v1beta1/model/user_data_mapping.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 46.806452 | 404 | 0.71847 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.