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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2d3bdc496a97ef9e3309fcff6c76dd8d0c171467 | 9,696 | ex | Elixir | lib/Uni2Z1.ex | szTheory/ParabaikElixirConverter | 5b4ed17b7c76d630c64c59641f05404c301de7ad | [
"Apache-2.0"
] | 2 | 2015-04-26T14:05:24.000Z | 2020-01-09T13:51:55.000Z | lib/Uni2Z1.ex | szTheory/ParabaikElixirConverter | 5b4ed17b7c76d630c64c59641f05404c301de7ad | [
"Apache-2.0"
] | null | null | null | lib/Uni2Z1.ex | szTheory/ParabaikElixirConverter | 5b4ed17b7c76d630c64c59641f05404c301de7ad | [
"Apache-2.0"
] | 1 | 2020-03-03T16:34:34.000Z | 2020-03-03T16:34:34.000Z | defmodule Uni2Z1 do
def convert(text) do
text = Regex.replace(~r/\x{104E}\x{1004}\x{103A}\x{1038}/u, text, "\x{104E}")
text = Regex.replace(~r/\x{102B}\x{103A}/u, text, "\x{105A}")
text = Regex.replace(~r/\x{102D}\x{1036}/u, text, "\x{108E}")
text = Regex.replace(~r/\x{103F}/u, text, "\x{1086}")
text = Reg... | 30.683544 | 189 | 0.501031 |
2d3bec717758651e090424bcde0e06a3f5ae55cf | 590 | ex | Elixir | lib/ua_inspector/database/supervisor.ex | Route-Now/ua_inspector | 4e6ced73fc40b6e9947e0a1b0612d5517f343293 | [
"Apache-2.0"
] | 44 | 2019-03-17T10:44:04.000Z | 2022-01-30T10:09:28.000Z | lib/ua_inspector/database/supervisor.ex | Route-Now/ua_inspector | 4e6ced73fc40b6e9947e0a1b0612d5517f343293 | [
"Apache-2.0"
] | 12 | 2019-06-06T15:26:26.000Z | 2022-03-09T17:21:21.000Z | lib/ua_inspector/database/supervisor.ex | Route-Now/ua_inspector | 4e6ced73fc40b6e9947e0a1b0612d5517f343293 | [
"Apache-2.0"
] | 8 | 2020-04-21T07:49:37.000Z | 2021-12-07T00:18:33.000Z | defmodule UAInspector.Database.Supervisor do
@moduledoc false
use Supervisor
alias UAInspector.Database
@doc false
def start_link(default \\ nil) do
Supervisor.start_link(__MODULE__, default)
end
@doc false
def init(_state) do
children = [
Database.Bots,
Database.BrowserEngines,
... | 19.666667 | 53 | 0.7 |
2d3c046c8386030e8f3cf8071cca5e7ae03e85bd | 1,627 | ex | Elixir | lib/ymn_link_web_web/router.ex | t-yamanashi/ymn_link_web | d883a14a10235230c6dbc935860de995004493b7 | [
"Apache-2.0"
] | null | null | null | lib/ymn_link_web_web/router.ex | t-yamanashi/ymn_link_web | d883a14a10235230c6dbc935860de995004493b7 | [
"Apache-2.0"
] | null | null | null | lib/ymn_link_web_web/router.ex | t-yamanashi/ymn_link_web | d883a14a10235230c6dbc935860de995004493b7 | [
"Apache-2.0"
] | null | null | null | defmodule YmnLinkWebWeb.Router do
use YmnLinkWebWeb, :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 "/api/rest/", YmnLinkW... | 26.241935 | 70 | 0.688384 |
2d3c34bd6c26dbd51e7b309f3557e64cc402754d | 1,275 | ex | Elixir | lib/blockquote_web/views/error_helpers.ex | allen-garvey/block-quote-phoenix | 5c0f5d16daf6bb515a8f1846c3e4311b368a7bdb | [
"MIT"
] | 4 | 2019-10-04T16:11:15.000Z | 2021-08-18T21:00:13.000Z | apps/blockquote/lib/blockquote_web/views/error_helpers.ex | allen-garvey/phoenix-umbrella | 1d444bbd62a5e7b5f51d317ce2be71ee994125d5 | [
"MIT"
] | 5 | 2020-03-16T23:52:25.000Z | 2021-09-03T16:52:17.000Z | apps/blockquote/lib/blockquote_web/views/error_helpers.ex | allen-garvey/phoenix-umbrella | 1d444bbd62a5e7b5f51d317ce2be71ee994125d5 | [
"MIT"
] | null | null | null | defmodule BlockquoteWeb.ErrorHelpers do
@moduledoc """
Conveniences for translating and building error messages.
"""
use Phoenix.HTML
@doc """
Generates tag for inlined form input errors.
"""
def error_tag(form, field) do
Enum.map(Keyword.get_values(form.errors, field), fn (error) ->
content... | 31.097561 | 79 | 0.672941 |
2d3c41070237c68d5b6d5992177adcc5af1445bf | 2,069 | ex | Elixir | clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_cx_v3beta1_fulfillment_conditional_cases.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_cx_v3beta1_fulfillment_conditional_cases.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_cx_v3beta1_fulfillment_conditional_cases.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.483333 | 185 | 0.752537 |
2d3c53c4a51aa8712f5ee68d1086783f6794bc6f | 31,828 | exs | Elixir | test/sha3_512_hex_test.exs | stampery/elixir-merkle | ee5b270543103a02766639ac8eb3b9ad75567f0b | [
"MIT"
] | 37 | 2016-05-12T12:39:36.000Z | 2021-12-24T15:59:20.000Z | test/sha3_512_hex_test.exs | stampery/elixir-merkle | ee5b270543103a02766639ac8eb3b9ad75567f0b | [
"MIT"
] | null | null | null | test/sha3_512_hex_test.exs | stampery/elixir-merkle | ee5b270543103a02766639ac8eb3b9ad75567f0b | [
"MIT"
] | 4 | 2016-05-18T01:01:40.000Z | 2021-11-25T07:50:05.000Z | defmodule MerkleSHA3_512HexTest do
use ExUnit.Case
defmodule Tree do
use Merkle, {&Merkle.Mixers.Hex.sha3_512/2, 64}
end
@foo "4BCA2B137EDC580FE50A88983EF860EBACA36C857B1F492839D6D7392452A63C82CBEBC68E3B70A2A1480B4BB5D437A7CBA6ECF9D89F9FF3CCD14CD6146EA7E7"
@hashes ["A69F73CCA23A9AC5C8B567DC185A756E97C9... | 111.677193 | 153 | 0.861945 |
2d3c8de1e1cec14acada1c547990a154deddda8d | 2,123 | ex | Elixir | clients/os_login/lib/google_api/os_login/v1/model/login_profile.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/os_login/lib/google_api/os_login/v1/model/login_profile.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/os_login/lib/google_api/os_login/v1/model/login_profile.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 ... | 39.314815 | 188 | 0.723976 |
2d3c901e6e30fc68fb56d3396463e3eaf8f86aa6 | 14,114 | exs | Elixir | lib/elixir/test/elixir/module/types/types_test.exs | spencerdcarlson/elixir | 23d75ecdf58df80969e12f4420282238e19219a1 | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/module/types/types_test.exs | spencerdcarlson/elixir | 23d75ecdf58df80969e12f4420282238e19219a1 | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/module/types/types_test.exs | spencerdcarlson/elixir | 23d75ecdf58df80969e12f4420282238e19219a1 | [
"Apache-2.0"
] | null | null | null | Code.require_file("type_helper.exs", __DIR__)
defmodule Module.Types.TypesTest do
use ExUnit.Case, async: true
alias Module.Types
alias Module.Types.{Pattern, Expr, Unify}
defmacro warning(patterns \\ [], guards \\ [], body) do
min_line = min_line(patterns ++ guards ++ [body])
patterns = reset_line(pa... | 25.849817 | 125 | 0.478036 |
2d3caf9960f3f52a3f51635aa5008a4fc897c12b | 293 | exs | Elixir | whoppex/test/whoppex/application_test.exs | benjaminplee/whoppex | 63cbe7f9f07079925c43a1e0e1896f043993e9e7 | [
"Apache-2.0"
] | 3 | 2017-08-14T13:53:34.000Z | 2021-07-03T12:46:41.000Z | whoppex/test/whoppex/application_test.exs | benjaminplee/whoppex | 63cbe7f9f07079925c43a1e0e1896f043993e9e7 | [
"Apache-2.0"
] | null | null | null | whoppex/test/whoppex/application_test.exs | benjaminplee/whoppex | 63cbe7f9f07079925c43a1e0e1896f043993e9e7 | [
"Apache-2.0"
] | null | null | null | defmodule Whoppex.ApplicationTest do
use ExUnit.Case, async: true
import Whoppex.Utils
doctest Whoppex.Application
test "Is an Application" do
assert implements?(Whoppex.Application, Application)
end
test "App is started clean" do
assert app_started? :whoppex
end
end
| 19.533333 | 56 | 0.750853 |
2d3ccc4ffb2398072516baefe6f173dddc9f72cf | 1,256 | ex | Elixir | server/lib/events_app_web/controllers/company_controller.ex | kylesmith-1/blazeneu | 83cb68b8112bac8d51c9f92e709720d7e7ba1472 | [
"MIT"
] | null | null | null | server/lib/events_app_web/controllers/company_controller.ex | kylesmith-1/blazeneu | 83cb68b8112bac8d51c9f92e709720d7e7ba1472 | [
"MIT"
] | null | null | null | server/lib/events_app_web/controllers/company_controller.ex | kylesmith-1/blazeneu | 83cb68b8112bac8d51c9f92e709720d7e7ba1472 | [
"MIT"
] | 1 | 2021-04-10T18:37:30.000Z | 2021-04-10T18:37:30.000Z | defmodule CompanyTestWeb.CompanyController do
use CompanyTestWeb, :controller
alias CompanyTest.Companies
alias CompanyTest.Companies.Company
action_fallback CompanyTestWeb.FallbackController
def index(conn, _params) do
companies = Companies.list_companies()
render(conn, "index.json", companies: co... | 29.209302 | 92 | 0.677548 |
2d3ce02a346a0f9aad7a02647d1ad1dffa544227 | 61 | exs | Elixir | test/bennu_test.exs | coingaming/bennu | 9e8095b338e77bc6ea230129960bb824e1c552fd | [
"MIT"
] | 2 | 2019-12-23T21:11:24.000Z | 2020-01-23T22:15:17.000Z | test/bennu_test.exs | coingaming/bennu | 9e8095b338e77bc6ea230129960bb824e1c552fd | [
"MIT"
] | null | null | null | test/bennu_test.exs | coingaming/bennu | 9e8095b338e77bc6ea230129960bb824e1c552fd | [
"MIT"
] | 1 | 2021-02-03T17:56:58.000Z | 2021-02-03T17:56:58.000Z | defmodule BennuTest do
use ExUnit.Case
doctest Bennu
end
| 12.2 | 22 | 0.786885 |
2d3ce3efc9788a990ec2d183df445f87e35d7481 | 951 | ex | Elixir | lib/mfpb_web/controllers/request_controller.ex | rbino/mfpb | 07ab703f4d8480e3662406115d3258a412cccbcb | [
"Apache-2.0"
] | 22 | 2019-10-13T17:03:09.000Z | 2021-11-09T11:05:44.000Z | lib/mfpb_web/controllers/request_controller.ex | rbino/mfpb | 07ab703f4d8480e3662406115d3258a412cccbcb | [
"Apache-2.0"
] | 11 | 2021-03-09T19:59:47.000Z | 2022-02-16T23:34:25.000Z | lib/mfpb_web/controllers/request_controller.ex | rbino/mfpb | 07ab703f4d8480e3662406115d3258a412cccbcb | [
"Apache-2.0"
] | 5 | 2019-10-17T16:40:26.000Z | 2022-03-08T01:45:35.000Z | defmodule MFPBWeb.RequestController do
use MFPBWeb, :controller
alias MFPB.Requests
alias MFPB.Requests.Request
def request(conn, %{"bin_id" => bin_id, "path_tokens" => path_tokens}) do
http_version = get_http_protocol(conn)
body = conn.assigns[:body]
%{
method: method,
query_string: ... | 22.642857 | 75 | 0.602524 |
2d3d034e3367f98aef2506f8c21479ed82c1cd82 | 1,151 | ex | Elixir | lib/ecto/migration/schema_migration.ex | mschae/ecto | 00f85444c4f61080617179232c0d528381de5ec3 | [
"Apache-2.0"
] | null | null | null | lib/ecto/migration/schema_migration.ex | mschae/ecto | 00f85444c4f61080617179232c0d528381de5ec3 | [
"Apache-2.0"
] | null | null | null | lib/ecto/migration/schema_migration.ex | mschae/ecto | 00f85444c4f61080617179232c0d528381de5ec3 | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.Migration.SchemaMigration do
# Define a schema that works with the schema_migrations table
@moduledoc false
use Ecto.Model
import Ecto.Query, only: [from: 2]
@primary_key false
schema "schema_migrations" do
field :version, :integer
timestamps updated_at: false
end
@table %Ecto.M... | 27.404762 | 78 | 0.698523 |
2d3d05ee6b0b25eb0809a1701a46d82466085cd3 | 1,065 | ex | Elixir | test/support/conn_case.ex | yosufali/socializer | abbd75cf1cedbf1a398fc72b64f4129e39d3e373 | [
"MIT"
] | null | null | null | test/support/conn_case.ex | yosufali/socializer | abbd75cf1cedbf1a398fc72b64f4129e39d3e373 | [
"MIT"
] | null | null | null | test/support/conn_case.ex | yosufali/socializer | abbd75cf1cedbf1a398fc72b64f4129e39d3e373 | [
"MIT"
] | null | null | null | defmodule SocializerWeb.ConnCase do
@moduledoc """
This module defines the test case to be used by
tests that require setting up a connection.
Such tests rely on `Phoenix.ConnTest` and also
import other functionality to make it easier
to build common data structures and query the data layer.
Finally, if... | 27.307692 | 72 | 0.722066 |
2d3d1f483a96790c0da7f300bab4fcfe1a60f863 | 80,897 | ex | Elixir | lib/sequence/oeis/multiples.ex | patricknevindwyer/chunky | e17df98df24d079c84fc8c51fbbd3ec57f77166b | [
"BSD-3-Clause"
] | 1 | 2020-12-18T11:00:32.000Z | 2020-12-18T11:00:32.000Z | lib/sequence/oeis/multiples.ex | patricknevindwyer/chunky | e17df98df24d079c84fc8c51fbbd3ec57f77166b | [
"BSD-3-Clause"
] | null | null | null | lib/sequence/oeis/multiples.ex | patricknevindwyer/chunky | e17df98df24d079c84fc8c51fbbd3ec57f77166b | [
"BSD-3-Clause"
] | null | null | null | defmodule Chunky.Sequence.OEIS.Multiples do
@moduledoc """
Sequences from the [Online Encyclopedia of Integer Sequences](https://oeis.org) dealing with multiples
and additions.
## Available Sequences
### Multiples of an integer
- `create_sequence_a008585/1` - A008585 - a(n) = 3*n.
- `create_sequen... | 30.185448 | 328 | 0.680408 |
2d3d46afb049f691791238eb8b3656d63864c0d2 | 5,691 | ex | Elixir | clients/monitoring/lib/google_api/monitoring/v3/model/uptime_check_config.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/monitoring/lib/google_api/monitoring/v3/model/uptime_check_config.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/monitoring/lib/google_api/monitoring/v3/model/uptime_check_config.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 69.402439 | 388 | 0.75101 |
2d3d47dc05bb23e8e88fe9013b096c8b79ca7620 | 1,181 | exs | Elixir | config/config.exs | moogle19/scenic_driver_nerves_waveshare_touch | 7da186c87973a67915fc5e2753e4f43891b14f60 | [
"Apache-2.0"
] | null | null | null | config/config.exs | moogle19/scenic_driver_nerves_waveshare_touch | 7da186c87973a67915fc5e2753e4f43891b14f60 | [
"Apache-2.0"
] | null | null | null | config/config.exs | moogle19/scenic_driver_nerves_waveshare_touch | 7da186c87973a67915fc5e2753e4f43891b14f60 | [
"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... | 38.096774 | 73 | 0.76376 |
2d3d4bb381f4658e74df4eab42ca072005035b78 | 2,033 | ex | Elixir | clients/dfa_reporting/lib/google_api/dfa_reporting/v34/model/order_documents_list_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/dfa_reporting/lib/google_api/dfa_reporting/v34/model/order_documents_list_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/dfa_reporting/lib/google_api/dfa_reporting/v34/model/order_documents_list_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... | 38.358491 | 162 | 0.735858 |
2d3d53cc38ad8d8e2b794de4c08f17780dc5aa14 | 2,706 | exs | Elixir | config/prod.exs | notactuallypagemcconnell/remote_retro | 972e24ee3d7132a1646473ebb3b6b2fda4d6bf2e | [
"MIT"
] | null | null | null | config/prod.exs | notactuallypagemcconnell/remote_retro | 972e24ee3d7132a1646473ebb3b6b2fda4d6bf2e | [
"MIT"
] | null | null | null | config/prod.exs | notactuallypagemcconnell/remote_retro | 972e24ee3d7132a1646473ebb3b6b2fda4d6bf2e | [
"MIT"
] | 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... | 32.214286 | 77 | 0.716556 |
2d3d7dacd82938c41c2c70a99c1489d546cae38d | 5,855 | ex | Elixir | lib/helper/converter/editor_to_html/index.ex | coderplanets/coderplanets_server | 3663e56340d6d050e974c91f7e499d8424fc25e9 | [
"Apache-2.0"
] | 240 | 2018-11-06T09:36:54.000Z | 2022-02-20T07:12:36.000Z | lib/helper/converter/editor_to_html/index.ex | coderplanets/coderplanets_server | 3663e56340d6d050e974c91f7e499d8424fc25e9 | [
"Apache-2.0"
] | 363 | 2018-07-11T03:38:14.000Z | 2021-12-14T01:42:40.000Z | lib/helper/converter/editor_to_html/index.ex | coderplanets/coderplanets_server | 3663e56340d6d050e974c91f7e499d8424fc25e9 | [
"Apache-2.0"
] | 22 | 2019-01-27T11:47:56.000Z | 2021-02-28T13:17:52.000Z | defmodule Helper.Converter.EditorToHTML do
@moduledoc """
parse editor.js's json data to raw html and sanitize it
see https://editorjs.io/
"""
alias Helper.Types, as: T
alias Helper.Utils
alias Helper.Converter.{Article, EditorToHTML, HtmlSanitizer}
alias EditorToHTML.{Class, Frags}
# alias Editor... | 31.648649 | 98 | 0.601879 |
2d3dd4e2ff270fc7b82cd8a763ff7920186992b5 | 1,810 | ex | Elixir | test/support/factories.ex | bus-detective/pro | d313f4facdb4c9229bd7a022eeabb85170000e18 | [
"MIT"
] | null | null | null | test/support/factories.ex | bus-detective/pro | d313f4facdb4c9229bd7a022eeabb85170000e18 | [
"MIT"
] | null | null | null | test/support/factories.ex | bus-detective/pro | d313f4facdb4c9229bd7a022eeabb85170000e18 | [
"MIT"
] | null | null | null | defmodule BdPro.Factories do
use ExMachina.Ecto, repo: BdPro.Repo
# By default, all factoried models with lat-long coordinates will fall within
# this shape
@default_shape [[[
{ -84.819946,39.334297 },
{ -84.303589,39.330049 },
{ -84.270630,39.040520 },
{ -84.852905,39.027719 },
{ -84.81994... | 24.133333 | 79 | 0.633149 |
2d3ddffe7e4475e94472a5e371beadbde99086d6 | 1,511 | ex | Elixir | lib/thesis/router.ex | devshane/thesis-phoenix | afe22a25542f91e15cfffb1e93ff8d833a64c25b | [
"MIT"
] | 681 | 2016-06-21T20:49:21.000Z | 2022-02-19T04:08:38.000Z | lib/thesis/router.ex | devshane/thesis-phoenix | afe22a25542f91e15cfffb1e93ff8d833a64c25b | [
"MIT"
] | 125 | 2016-06-21T21:14:49.000Z | 2020-12-12T20:15:48.000Z | lib/thesis/router.ex | devshane/thesis-phoenix | afe22a25542f91e15cfffb1e93ff8d833a64c25b | [
"MIT"
] | 76 | 2016-09-06T03:40:55.000Z | 2022-01-20T21:29:22.000Z | defmodule Thesis.Router do
@moduledoc """
Creates the routes that Thesis uses to handle requests from its javascript
editor client as well as static assets.
Typically, you'll add this to your `web/web.ex` file, under the `router`
function:
def router do
quote do
use Phoenix.Router
... | 26.982143 | 79 | 0.624752 |
2d3de651d9129ba82cfe9c6129da23284cb54f7e | 2,389 | ex | Elixir | web/managers/job_manager.ex | temp/opencov | 0fc7d5af8d4d88162f9f74f371ed5799a0c8808e | [
"MIT"
] | 189 | 2018-09-25T09:02:41.000Z | 2022-03-09T13:52:06.000Z | web/managers/job_manager.ex | temp/opencov | 0fc7d5af8d4d88162f9f74f371ed5799a0c8808e | [
"MIT"
] | 29 | 2018-09-26T05:51:18.000Z | 2021-11-05T08:55:03.000Z | web/managers/job_manager.ex | temp/opencov | 0fc7d5af8d4d88162f9f74f371ed5799a0c8808e | [
"MIT"
] | 32 | 2018-10-21T12:28:11.000Z | 2022-03-28T02:20:19.000Z | defmodule Opencov.JobManager do
use Opencov.Web, :manager
import Ecto.Query
import Opencov.Job
alias Opencov.Job
alias Opencov.FileManager
@required_fields ~w(build_id)a
@optional_fields ~w(run_at job_number files_count)a
def changeset(model, params \\ :invalid) do
model
|> cast(params, @requ... | 35.132353 | 102 | 0.717455 |
2d3df0dcc584cb01267fb3a1a5811f85382adf9b | 1,751 | exs | Elixir | test/exchange_rate/exchange_rate_test.exs | fstromback/bitpal | 2c50e6700d7383b4f025b3734ba37257c69ce47e | [
"BSD-3-Clause-Clear"
] | null | null | null | test/exchange_rate/exchange_rate_test.exs | fstromback/bitpal | 2c50e6700d7383b4f025b3734ba37257c69ce47e | [
"BSD-3-Clause-Clear"
] | null | null | null | test/exchange_rate/exchange_rate_test.exs | fstromback/bitpal | 2c50e6700d7383b4f025b3734ba37257c69ce47e | [
"BSD-3-Clause-Clear"
] | null | null | null | defmodule BitPal.ExchangeRateTest do
use ExUnit.Case, async: true
alias BitPal.ExchangeRate
test "new" do
assert :error = ExchangeRate.new(Decimal.new(2), {:USD, :USD})
assert :error = ExchangeRate.new(Decimal.new(-2), {:BCH, :USD})
assert {:ok,
%ExchangeRate{
rate: Decimal... | 34.333333 | 92 | 0.593946 |
2d3e3c5234f66cf96add310c994b3be7a7d6b43e | 1,300 | ex | Elixir | clients/vision/lib/google_api/vision/v1/model/cancel_operation_request.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/vision/lib/google_api/vision/v1/model/cancel_operation_request.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/vision/lib/google_api/vision/v1/model/cancel_operation_request.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 30.952381 | 80 | 0.766154 |
2d3e8e3fe76c73871a547c811600602f6c20c3d1 | 1,111 | exs | Elixir | config/config.exs | austinsmorris/compass | 752108902a4d249579174abcf19fc1c944112c86 | [
"MIT"
] | null | null | null | config/config.exs | austinsmorris/compass | 752108902a4d249579174abcf19fc1c944112c86 | [
"MIT"
] | null | null | null | config/config.exs | austinsmorris/compass | 752108902a4d249579174abcf19fc1c944112c86 | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the paren... | 35.83871 | 73 | 0.755176 |
2d3e996e2ccec6f2e5f934e0030dd81fc33a1d67 | 1,299 | exs | Elixir | test/blockchain_api/query/block_test.exs | pakorn186c/blockchain-api | 3c9fbc892e645f9bb144414f3da36749603f37bc | [
"Apache-2.0"
] | 17 | 2019-11-03T03:02:41.000Z | 2022-01-13T17:03:32.000Z | test/blockchain_api/query/block_test.exs | AddressXception/blockchain-api | eea98fa78af2887cc84762f84532c602c3b8b666 | [
"Apache-2.0"
] | 5 | 2019-11-07T23:26:53.000Z | 2020-11-24T21:45:35.000Z | test/blockchain_api/query/block_test.exs | AddressXception/blockchain-api | eea98fa78af2887cc84762f84532c602c3b8b666 | [
"Apache-2.0"
] | 11 | 2019-12-04T07:03:16.000Z | 2022-01-13T17:03:50.000Z | defmodule BlockchainAPI.BlockTest do
use BlockchainAPI.DataCase
alias BlockchainAPI.Query
describe "blocks" do
alias BlockchainAPI.Schema.Block
@valid_attrs %{hash: "some hash", height: 42, round: 42, time: 42}
@invalid_attrs %{hash: nil, height: nil, round: nil, time: nil}
def block_fixture(a... | 28.23913 | 77 | 0.634334 |
2d3e9c622a6d79e14be98f2dd7e4d89dcebf0b79 | 1,008 | ex | Elixir | lib/que/helpers.ex | inhji/que | 4c7abbbfecb7b90aaa291151e8962d1a0fe69bde | [
"MIT"
] | 645 | 2017-01-07T21:34:26.000Z | 2022-03-16T06:58:04.000Z | lib/que/helpers.ex | inhji/que | 4c7abbbfecb7b90aaa291151e8962d1a0fe69bde | [
"MIT"
] | 19 | 2017-05-03T14:48:14.000Z | 2021-05-30T19:33:05.000Z | lib/que/helpers.ex | inhji/que | 4c7abbbfecb7b90aaa291151e8962d1a0fe69bde | [
"MIT"
] | 33 | 2017-05-01T20:04:32.000Z | 2021-05-27T09:48:13.000Z | defmodule Que.Helpers do
require Logger
@prefix "[Que]"
@moduledoc false
@log_levels [low: 0, medium: 1, high: 2]
@min_level Application.get_env(:que, :log_level, :low)
## Helper Module for `Que`. Exports methods that are used in the
## project internally. Not meant to be used as part of the Public
... | 21 | 67 | 0.650794 |
2d3ea6404f9571ec5dc933e0d88d097c64cdcfe4 | 370 | exs | Elixir | priv/repo/seeds.exs | victorspringer/recommendationsEx | f9facf8672d91df1037ccb065609a2a756d7fcc3 | [
"MIT"
] | 3 | 2017-06-20T07:47:32.000Z | 2020-10-27T15:25:10.000Z | priv/repo/seeds.exs | victorspringer/zionRecs | f9facf8672d91df1037ccb065609a2a756d7fcc3 | [
"MIT"
] | null | null | null | priv/repo/seeds.exs | victorspringer/zionRecs | f9facf8672d91df1037ccb065609a2a756d7fcc3 | [
"MIT"
] | 1 | 2019-08-22T03:38:19.000Z | 2019-08-22T03:38:19.000Z | # Script for populating the database. You can run it as:
#
# mix run priv/repo/seeds.exs
#
# Inside the script, you can read and write to any of your
# repositories directly:
#
# RecommendationsEx.Repo.insert!(%RecommendationsEx.SomeModel{})
#
# We recommend using the bang functions (`insert!`, `update!`
# and ... | 30.833333 | 68 | 0.721622 |
2d3eac45cfbc04c12e019fa1a3b422fb10181962 | 1,306 | ex | Elixir | 12-new-project/my_agent/lib/my_agent.ex | kranfix/elixir-playground | 28f1314b137eb591946f501647e76d8017070ffa | [
"MIT"
] | null | null | null | 12-new-project/my_agent/lib/my_agent.ex | kranfix/elixir-playground | 28f1314b137eb591946f501647e76d8017070ffa | [
"MIT"
] | null | null | null | 12-new-project/my_agent/lib/my_agent.ex | kranfix/elixir-playground | 28f1314b137eb591946f501647e76d8017070ffa | [
"MIT"
] | 1 | 2020-11-17T07:06:17.000Z | 2020-11-17T07:06:17.000Z | defmodule MyAgent do
def start_link(on_create) when not is_nil(on_create) do
try do
initial_state = on_create.()
{:ok, spawn(fn -> loop({initial_state, true}) end)}
rescue
e -> {:error, e}
end
end
def get(agent, on_get) when is_pid(agent) and not is_nil(on_get) do
send(agent, {:... | 22.135593 | 69 | 0.555896 |
2d3eaf8fe761e662a9f2ace31b6b73f1320a1411 | 8,860 | ex | Elixir | lib/phoenix/endpoint/supervisor.ex | codeangler/phoenix | a5ea7869fb6721633fbb2939a102b188dba54235 | [
"MIT"
] | null | null | null | lib/phoenix/endpoint/supervisor.ex | codeangler/phoenix | a5ea7869fb6721633fbb2939a102b188dba54235 | [
"MIT"
] | null | null | null | lib/phoenix/endpoint/supervisor.ex | codeangler/phoenix | a5ea7869fb6721633fbb2939a102b188dba54235 | [
"MIT"
] | null | null | null | defmodule Phoenix.Endpoint.Supervisor do
# This module contains the logic used by most functions
# in Phoenix.Endpoint as well the supervisor for starting
# the adapters/handlers.
@moduledoc false
require Logger
use Supervisor
@doc """
Starts the endpoint supervision tree.
"""
def start_link(otp_a... | 27.515528 | 111 | 0.644921 |
2d3ef55730975a40c387047851fa2fafdfece90e | 424 | exs | Elixir | exercises/03-processes/06-state/solution.exs | DennisWinnepenninckx/distributed-applications | 06743e4e2a09dc52ff52be831e486bb073916173 | [
"BSD-3-Clause"
] | 1 | 2021-09-22T09:52:11.000Z | 2021-09-22T09:52:11.000Z | exercises/03-processes/06-state/solution.exs | DennisWinnepenninckx/distributed-applications | 06743e4e2a09dc52ff52be831e486bb073916173 | [
"BSD-3-Clause"
] | 22 | 2019-06-19T18:58:13.000Z | 2020-03-16T14:43:06.000Z | exercises/03-processes/06-state/solution.exs | DennisWinnepenninckx/distributed-applications | 06743e4e2a09dc52ff52be831e486bb073916173 | [
"BSD-3-Clause"
] | 32 | 2019-09-19T03:25:11.000Z | 2020-10-06T15:01:47.000Z | defmodule Counter do
def counter(parent_pid, current \\ 0) do
receive do
_ -> send(parent_pid, current)
end
counter(parent_pid, current + 1)
end
end
parent_pid = self()
pid = spawn( fn -> Counter.counter(parent_pid) end )
send(pid, nil)
receive do
answer -> IO.puts(answer)
end
send(pid, nil... | 14.62069 | 52 | 0.669811 |
2d3efe1f4f2d0788f18aefa61fea8e5a2af685cf | 6,401 | ex | Elixir | apps/blunt_ddd/lib/blunt/bounded_context/proxy.ex | blunt-elixir/blunt | a88b88984022db7ba2110204248fdb541121e3a0 | [
"MIT"
] | 1 | 2022-03-07T11:54:47.000Z | 2022-03-07T11:54:47.000Z | apps/blunt_ddd/lib/blunt/bounded_context/proxy.ex | elixir-cqrs/cqrs_tools | afbf82da522a10d2413547a46f316ed3aadebba5 | [
"MIT"
] | null | null | null | apps/blunt_ddd/lib/blunt/bounded_context/proxy.ex | elixir-cqrs/cqrs_tools | afbf82da522a10d2413547a46f316ed3aadebba5 | [
"MIT"
] | null | null | null | defmodule Blunt.BoundedContext.Proxy do
@moduledoc false
alias Blunt.DispatchError
alias Blunt.Message.{Input, Metadata}
alias Blunt.BoundedContext.{Error, Proxy}
def validate!({:command, command_module, _function_name}, context_module) do
error = "#{inspect(command_module)} in #{inspect(context_module)... | 32.658163 | 112 | 0.62709 |
2d3f007433f5a8e3c7d1591d16f1a5e9a3d35a3f | 2,385 | ex | Elixir | lib/credo/check/readability/predicate_function_names.ex | isaacsanders/credo | 5623570bb2e3944345f1bf11819ca613533b5e10 | [
"MIT"
] | null | null | null | lib/credo/check/readability/predicate_function_names.ex | isaacsanders/credo | 5623570bb2e3944345f1bf11819ca613533b5e10 | [
"MIT"
] | null | null | null | lib/credo/check/readability/predicate_function_names.ex | isaacsanders/credo | 5623570bb2e3944345f1bf11819ca613533b5e10 | [
"MIT"
] | 1 | 2020-06-30T16:32:44.000Z | 2020-06-30T16:32:44.000Z | defmodule Credo.Check.Readability.PredicateFunctionNames do
@moduledoc false
@checkdoc """
Predicate functions/macros should be named accordingly:
* For functions, they should end in a question mark.
# preferred
defp user?(cookie) do
end
defp has_attachment?(mail) do
end
... | 23.85 | 98 | 0.631866 |
2d3f0c54f29e7b63cf40d34a58b5813839a0b541 | 71,583 | ex | Elixir | lib/ecto/schema.ex | cas27/ecto | c572a53bca07b7ae3253cc21724265e3b05153f2 | [
"Apache-2.0"
] | null | null | null | lib/ecto/schema.ex | cas27/ecto | c572a53bca07b7ae3253cc21724265e3b05153f2 | [
"Apache-2.0"
] | null | null | null | lib/ecto/schema.ex | cas27/ecto | c572a53bca07b7ae3253cc21724265e3b05153f2 | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.Schema do
@moduledoc ~S"""
Defines a schema.
An Ecto schema is used to map any data source into an Elixir struct.
The definition of the schema is possible through two main APIs:
`schema/2` and `embedded_schema/1`.
`schema/2` is typically used to map data from a persisted source,
usually a... | 35.595724 | 123 | 0.670913 |
2d3f1684d628ed5962535ceb11a55204bfc2f4cb | 1,510 | ex | Elixir | wabanex/lib/wabanex_web/endpoint.ex | shonorio/nlwt_elixir | 029b731c747e4b4954bc0197881b325fb80b4ab6 | [
"MIT"
] | null | null | null | wabanex/lib/wabanex_web/endpoint.ex | shonorio/nlwt_elixir | 029b731c747e4b4954bc0197881b325fb80b4ab6 | [
"MIT"
] | null | null | null | wabanex/lib/wabanex_web/endpoint.ex | shonorio/nlwt_elixir | 029b731c747e4b4954bc0197881b325fb80b4ab6 | [
"MIT"
] | null | null | null | defmodule WabanexWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :wabanex
# The session will be stored in the cookie and signed,
# this means its contents can be read but not tampered with.
# Set :encryption_salt if you would also like to encrypt it.
@session_options [
store: :cookie,
key: "_wabanex_k... | 28.490566 | 97 | 0.71457 |
2d3f1a733f892cf9f61af3738091a341930d154d | 1,043 | exs | Elixir | config/dev.exs | smoynes/get_a_job_ex | 13b17562f48561803ee4635342c345d28cffe27d | [
"MIT"
] | 1 | 2020-06-10T11:19:17.000Z | 2020-06-10T11:19:17.000Z | config/dev.exs | smoynes/get_a_job_ex | 13b17562f48561803ee4635342c345d28cffe27d | [
"MIT"
] | null | null | null | config/dev.exs | smoynes/get_a_job_ex | 13b17562f48561803ee4635342c345d28cffe27d | [
"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 :get_a_job_ex, GetAJobEx.Endpoint,
http: [port... | 28.972222 | 63 | 0.710451 |
2d3f2fc2dce6314eccbab99ddadcac5c1ab74b44 | 878 | ex | Elixir | clients/sheets/lib/google_api/sheets/v4/metadata.ex | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"Apache-2.0"
] | null | null | null | clients/sheets/lib/google_api/sheets/v4/metadata.ex | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"Apache-2.0"
] | null | null | null | clients/sheets/lib/google_api/sheets/v4/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 |
2d3f4f52e58304e3a1fa7d4350004c00eed72f07 | 2,137 | exs | Elixir | test/distribution/static_quorum_ring_test.exs | ileamo/swarm | 04353ff27fec3a24753e3c1f3b03d589fce78907 | [
"MIT"
] | 1,111 | 2016-07-30T05:50:23.000Z | 2022-03-31T07:50:15.000Z | test/distribution/static_quorum_ring_test.exs | ileamo/swarm | 04353ff27fec3a24753e3c1f3b03d589fce78907 | [
"MIT"
] | 128 | 2016-08-07T22:40:18.000Z | 2021-12-15T05:47:01.000Z | test/distribution/static_quorum_ring_test.exs | ileamo/swarm | 04353ff27fec3a24753e3c1f3b03d589fce78907 | [
"MIT"
] | 115 | 2016-08-17T12:43:02.000Z | 2022-03-29T22:47:22.000Z | defmodule Swarm.Distribution.StaticQuorumRingTests do
use ExUnit.Case, async: false
@moduletag :capture_log
alias Swarm.Distribution.StaticQuorumRing
test "key to node should return `:undefined` until quorum size reached" do
quorum =
StaticQuorumRing.create()
|> StaticQuorumRing.add_node("nod... | 29.680556 | 91 | 0.714553 |
2d3f71272b1c1dba50a44eac237b8873a1326fda | 18 | ex | Elixir | broadway_test/start_link_prefetch.ex | kujua/blog-kujuahub-articles-code | 1a65b1a481cbf5269a3f8846a5ac353937d45a2d | [
"Apache-2.0"
] | 2 | 2019-05-25T13:25:33.000Z | 2019-05-29T15:36:17.000Z | broadway_test/start_link_prefetch.ex | kujua/blog-kujuahub-articles-code | 1a65b1a481cbf5269a3f8846a5ac353937d45a2d | [
"Apache-2.0"
] | null | null | null | broadway_test/start_link_prefetch.ex | kujua/blog-kujuahub-articles-code | 1a65b1a481cbf5269a3f8846a5ac353937d45a2d | [
"Apache-2.0"
] | null | null | null | prefetch_count: 10 | 18 | 18 | 0.888889 |
2d3f78a2026f7d5891f655b78f0e1e36d0d978f4 | 744 | exs | Elixir | config/test.exs | douglastofoli/inmana | 0c2bd661f5a3c83557dc3fd1d094a195dae3a839 | [
"MIT"
] | null | null | null | config/test.exs | douglastofoli/inmana | 0c2bd661f5a3c83557dc3fd1d094a195dae3a839 | [
"MIT"
] | null | null | null | config/test.exs | douglastofoli/inmana | 0c2bd661f5a3c83557dc3fd1d094a195dae3a839 | [
"MIT"
] | null | null | null | use Mix.Config
# Configure your database
#
# The MIX_TEST_PARTITION environment variable can be used
# to provide built-in test partitioning in CI environment.
# Run `mix help test` for more information.
config :inmana, Inmana.Repo,
username: System.get_env("DB_TEST_USERNAME"),
password: System.get_env("DB_TEST_PA... | 32.347826 | 86 | 0.760753 |
2d3f7f22e75c43cd960d59c682c79e6f053d2e2a | 707 | ex | Elixir | lib/sugar/templates/engine.ex | sugar-framework/templates | 747925376230a439b7e5b44bbd6ba20333402330 | [
"MIT"
] | 7 | 2016-01-28T13:31:07.000Z | 2021-01-30T06:20:08.000Z | lib/sugar/templates/engine.ex | sugar-framework/templates | 747925376230a439b7e5b44bbd6ba20333402330 | [
"MIT"
] | 3 | 2015-05-08T07:05:17.000Z | 2015-08-23T19:03:33.000Z | lib/sugar/templates/engine.ex | sugar-framework/templates | 747925376230a439b7e5b44bbd6ba20333402330 | [
"MIT"
] | 8 | 2015-05-08T06:31:46.000Z | 2019-05-30T19:56:18.000Z | defmodule Sugar.Templates.Engine do
@moduledoc """
Specification of the template engine API implemented
by individual template engines.
"""
use Behaviour
@type template :: Sugar.Templates.Template.t
@type reason :: String.t
@type vars :: list | Keyword.t
@doc """
Compiles a `template`.
It... | 27.192308 | 69 | 0.701556 |
2d3fb0c49519e7880259ddfb1c85c52741a6f73e | 1,227 | ex | Elixir | test/support/conn_case.ex | mzgajner/smena | 6c0243ae1e8d1cef6e8a8e240f0f6b703ea638c9 | [
"Unlicense"
] | null | null | null | test/support/conn_case.ex | mzgajner/smena | 6c0243ae1e8d1cef6e8a8e240f0f6b703ea638c9 | [
"Unlicense"
] | null | null | null | test/support/conn_case.ex | mzgajner/smena | 6c0243ae1e8d1cef6e8a8e240f0f6b703ea638c9 | [
"Unlicense"
] | null | null | null | defmodule SmenaWeb.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 |
2d3fb95d286eecd916c8f5df4196cdbcc0c49bd6 | 295 | exs | Elixir | test/integration/comparison_test.exs | univers-agency/liquex | 1a12e56be21da064d092b76fa3cce9bcb192103c | [
"MIT"
] | null | null | null | test/integration/comparison_test.exs | univers-agency/liquex | 1a12e56be21da064d092b76fa3cce9bcb192103c | [
"MIT"
] | null | null | null | test/integration/comparison_test.exs | univers-agency/liquex | 1a12e56be21da064d092b76fa3cce9bcb192103c | [
"MIT"
] | null | null | null | defmodule Liquex.ComparisonTest do
use ExUnit.Case, async: true
import Liquex.TestHelpers
test "run examples" do
File.ls!("test/integration/cases/")
|> Enum.filter(&String.ends_with?(&1, ".liquid"))
|> Enum.each(&assert_match_liquid("test/integration/cases/#{&1}"))
end
end
| 26.818182 | 70 | 0.694915 |
2d3ff4cb2260fb2401ec5dfc611c4062624a51d1 | 3,463 | ex | Elixir | clients/cloud_billing/lib/google_api/cloud_billing/v1/model/audit_config.ex | chingor13/elixir-google-api | 85e13fa25c4c9f4618bb463ab4c79245fc6d2a7b | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/cloud_billing/lib/google_api/cloud_billing/v1/model/audit_config.ex | chingor13/elixir-google-api | 85e13fa25c4c9f4618bb463ab4c79245fc6d2a7b | [
"Apache-2.0"
] | null | null | null | clients/cloud_billing/lib/google_api/cloud_billing/v1/model/audit_config.ex | chingor13/elixir-google-api | 85e13fa25c4c9f4618bb463ab4c79245fc6d2a7b | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 33.95098 | 168 | 0.639041 |
2d400d3f72790f033f03478f156e14f91b473a85 | 3,763 | exs | Elixir | test/live_component_events_test.exs | bwittenbrook3/surface | 8697032e907a349e195ff7c495e69e5a6fec6c78 | [
"MIT"
] | null | null | null | test/live_component_events_test.exs | bwittenbrook3/surface | 8697032e907a349e195ff7c495e69e5a6fec6c78 | [
"MIT"
] | null | null | null | test/live_component_events_test.exs | bwittenbrook3/surface | 8697032e907a349e195ff7c495e69e5a6fec6c78 | [
"MIT"
] | null | null | null | defmodule Surface.EventsTest do
use ExUnit.Case, async: true
import Phoenix.ConnTest
import Phoenix.LiveViewTest
import ComponentTestHelper
@endpoint Endpoint
defmodule LiveDiv do
use Surface.LiveComponent
def render(assigns) do
~H"""
<div>Live div</div>
"""
end
end
de... | 20.015957 | 86 | 0.56152 |
2d40201fcd3a5612f202ebdc150b05ba8fc1494d | 3,710 | exs | Elixir | test/expokefight_web/views/battles_view_test.exs | vbertazzo/expokefight | 19b6bd39af43e17c3ee14eab845cb24fb71d6d80 | [
"MIT"
] | null | null | null | test/expokefight_web/views/battles_view_test.exs | vbertazzo/expokefight | 19b6bd39af43e17c3ee14eab845cb24fb71d6d80 | [
"MIT"
] | null | null | null | test/expokefight_web/views/battles_view_test.exs | vbertazzo/expokefight | 19b6bd39af43e17c3ee14eab845cb24fb71d6d80 | [
"MIT"
] | null | null | null | defmodule ExpokefightWeb.BattlesViewTest do
use ExpokefightWeb.ConnCase, async: true
import Expokefight.Factory
import Phoenix.View
alias Expokefight.Pokemon
alias ExpokefightWeb.BattlesView
test "renders create.json" do
battle = build(:battle)
response = render(BattlesView, "create.json", battle:... | 34.036697 | 126 | 0.47655 |
2d4044fef0b4fdc04be0b492a6b7326258e636c6 | 4,333 | exs | Elixir | test/sanbase/kafka/kafka_exporter_test.exs | santiment/sanbase2 | 9ef6e2dd1e377744a6d2bba570ea6bd477a1db31 | [
"MIT"
] | 81 | 2017-11-20T01:20:22.000Z | 2022-03-05T12:04:25.000Z | test/sanbase/kafka/kafka_exporter_test.exs | rmoorman/sanbase2 | 226784ab43a24219e7332c49156b198d09a6dd85 | [
"MIT"
] | 359 | 2017-10-15T14:40:53.000Z | 2022-01-25T13:34:20.000Z | test/sanbase/kafka/kafka_exporter_test.exs | rmoorman/sanbase2 | 226784ab43a24219e7332c49156b198d09a6dd85 | [
"MIT"
] | 16 | 2017-11-19T13:57:40.000Z | 2022-02-07T08:13:02.000Z | defmodule KafkaExporterTest do
use ExUnit.Case, async: false
setup do
topic = :crypto.strong_rand_bytes(12) |> Base.encode64()
%{topic: topic}
end
# Setting buffering max messages to 0 sends to kafka on each `persist_async` call
test "buffering max messages works", %{topic: topic} do
{:ok, expor... | 31.398551 | 97 | 0.670205 |
2d40846af6b98656668c67b56e3f4dfae3561416 | 4,329 | ex | Elixir | clients/policy_troubleshooter/lib/google_api/policy_troubleshooter/v1/model/google_iam_v1_binding.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/policy_troubleshooter/lib/google_api/policy_troubleshooter/v1/model/google_iam_v1_binding.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/policy_troubleshooter/lib/google_api/policy_troubleshooter/v1/model/google_iam_v1_binding.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... | 81.679245 | 1,972 | 0.760453 |
2d409b6d066493b62872dd1b5baddbdbcc073153 | 2,074 | ex | Elixir | test/support/test_helpers.ex | b-a-b-e/ProComPrag | 50c6c87933e71cb69b5c95bc77bf591a34661410 | [
"MIT"
] | 1 | 2018-05-19T12:08:10.000Z | 2018-05-19T12:08:10.000Z | test/support/test_helpers.ex | b-a-b-e/ProComPrag | 50c6c87933e71cb69b5c95bc77bf591a34661410 | [
"MIT"
] | 64 | 2019-07-29T22:06:16.000Z | 2022-03-28T23:46:58.000Z | test/support/test_helpers.ex | babe-project/BABE | 50c6c87933e71cb69b5c95bc77bf591a34661410 | [
"MIT"
] | 1 | 2021-02-06T10:23:25.000Z | 2021-02-06T10:23:25.000Z | defmodule Magpie.TestHelpers do
@moduledoc """
Helper functions for tests
"""
@dynamic_experiment_attrs %{
name: "some name",
author: "some author",
description: "some description",
active: true,
dynamic_retrieval_keys: ["key1", "key2", "key3"],
is_dynamic: true,
num_variants: 2,
... | 22.06383 | 96 | 0.63163 |
2d40b3dbd94f7acc33ba402dca5af3af541f0dd3 | 4,481 | ex | Elixir | lib/erlnote/accounts/accounts.ex | alchexmist/erlnote | e1f164e63616316e1d3869ebfae5ed2ae96c3ccd | [
"Apache-2.0"
] | null | null | null | lib/erlnote/accounts/accounts.ex | alchexmist/erlnote | e1f164e63616316e1d3869ebfae5ed2ae96c3ccd | [
"Apache-2.0"
] | 1 | 2019-11-02T13:46:12.000Z | 2019-11-02T13:46:12.000Z | lib/erlnote/accounts/accounts.ex | alchexmist/erlnote | e1f164e63616316e1d3869ebfae5ed2ae96c3ccd | [
"Apache-2.0"
] | null | null | null | defmodule Erlnote.Accounts do
@moduledoc """
The Accounts context.
"""
import Ecto.Query, warn: false
alias Erlnote.Repo
alias Erlnote.Accounts.{User, Credential}
@doc """
User authentication.
## Examples
iex> authenticate(email, valid_password)
{:ok, %User{}}
iex> authenticate... | 19.567686 | 105 | 0.595403 |
2d40bc5c91d0458faddd2a799fcd35e92127a5af | 2,110 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/network_endpoint_group_aggregated_list_warning_data.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/compute/lib/google_api/compute/v1/model/network_endpoint_group_aggregated_list_warning_data.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/network_endpoint_group_aggregated_list_warning_data.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 ... | 38.363636 | 527 | 0.742654 |
2d40c7ed689b7bbc469f52a9a6b35e970206323c | 2,063 | ex | Elixir | lib/avrora/config.ex | apellizzn/avrora | 02a5eb563d85f06b6af25fbed220c508bc2bf410 | [
"MIT"
] | null | null | null | lib/avrora/config.ex | apellizzn/avrora | 02a5eb563d85f06b6af25fbed220c508bc2bf410 | [
"MIT"
] | null | null | null | lib/avrora/config.ex | apellizzn/avrora | 02a5eb563d85f06b6af25fbed220c508bc2bf410 | [
"MIT"
] | null | null | null | defmodule Avrora.Config do
@moduledoc """
Configuration for Avrora.
## Options:
* `schemas_path` path to local schema files, default ./priv/schemas
* `registry_url` URL for Confluent Schema Registry, default nil
* `registry_auth` authentication settings for Confluent Schema Registry, default n... | 32.746032 | 111 | 0.723219 |
2d40cc7c2d36b5b711184a59bdfe2c6fde82b42f | 297 | exs | Elixir | test/gcs_test.exs | jdrakes/gcs | d54ee5292cb1b27beb171b756f3081c95b26ce22 | [
"MIT"
] | null | null | null | test/gcs_test.exs | jdrakes/gcs | d54ee5292cb1b27beb171b756f3081c95b26ce22 | [
"MIT"
] | 1 | 2020-05-12T19:48:27.000Z | 2020-05-12T19:48:27.000Z | test/gcs_test.exs | jdrakes/gcs | d54ee5292cb1b27beb171b756f3081c95b26ce22 | [
"MIT"
] | null | null | null | defmodule GCSTest do
use ExUnit.Case
describe "delete_object/4" do
test "Makes request to correct url" do
assert {:ok, url} = GCS.delete_object("a_bucket", "a_path", [], return: :url)
assert "https://www.googleapis.com/storage/v1/b/a_bucket/o/a_path" == url
end
end
end
| 27 | 83 | 0.670034 |
2d40cfc718130e9db49cbe8c0370037845979622 | 3,175 | exs | Elixir | test/credo/check/refactor/match_in_condition_test.exs | rodrigues/credo | b4e08477a2141d5537d8fc9c5cc08ebf93a5ee23 | [
"MIT"
] | null | null | null | test/credo/check/refactor/match_in_condition_test.exs | rodrigues/credo | b4e08477a2141d5537d8fc9c5cc08ebf93a5ee23 | [
"MIT"
] | null | null | null | test/credo/check/refactor/match_in_condition_test.exs | rodrigues/credo | b4e08477a2141d5537d8fc9c5cc08ebf93a5ee23 | [
"MIT"
] | null | null | null | defmodule Credo.Check.Refactor.MatchInConditionTest do
use Credo.TestHelper
@described_check Credo.Check.Refactor.MatchInCondition
test "it should NOT report expected code" do
"""
defmodule CredoSampleModule do
def some_function(parameter1, parameter2) do
# comparison should not affect this check in any w... | 24.236641 | 78 | 0.67811 |
2d4102ca75a0847e8bb7940775d78bf81d05abcc | 2,567 | exs | Elixir | basic/functionAndModules.exs | MaraniMatias/elixir-hola-mundo | 325a6ba623378521ec6f79bd4627a0eb7c6cd1fa | [
"MIT"
] | 1 | 2016-12-25T09:53:53.000Z | 2016-12-25T09:53:53.000Z | basic/functionAndModules.exs | MaraniMatias/elixir-hola-mundo | 325a6ba623378521ec6f79bd4627a0eb7c6cd1fa | [
"MIT"
] | null | null | null | basic/functionAndModules.exs | MaraniMatias/elixir-hola-mundo | 325a6ba623378521ec6f79bd4627a0eb7c6cd1fa | [
"MIT"
] | null | null | null | # Anonymous Functions
add = fn a, b -> a + b end
sum = &(&1 + &2)
IO.puts is_function(add) # true
IO.puts add.(4, 5) # 9
IO.puts is_function(sum) # true
IO.puts sum.(5,4) # 9
# Pattern Matching
handle_result = fn
{:ok, result} -> IO.puts "Handling result... #{result}"
{:error} -> IO.puts "An error has occurred... | 22.517544 | 73 | 0.634593 |
2d410a1be3b9946718d6639758f93a618d904dfd | 9,218 | ex | Elixir | lib/waffle/storage/s3.ex | tsufurukawa/waffle | f0ba0509fbb4bf05f4bcbfe75c82aff1ee17e714 | [
"Apache-2.0"
] | null | null | null | lib/waffle/storage/s3.ex | tsufurukawa/waffle | f0ba0509fbb4bf05f4bcbfe75c82aff1ee17e714 | [
"Apache-2.0"
] | 1 | 2021-08-24T13:12:13.000Z | 2021-08-24T13:12:13.000Z | lib/waffle/storage/s3.ex | ringofhealth/waffle | b797eabd3b16628370659c805aea067b2da204d5 | [
"Apache-2.0"
] | 2 | 2021-01-12T23:24:19.000Z | 2021-01-13T03:41:24.000Z | defmodule Waffle.Storage.S3 do
@moduledoc ~S"""
The module to facilitate integratin with S3 through ExAws.S3
config :waffle,
storage: Waffle.Storage.S3,
bucket: {:system, "AWS_S3_BUCKET"}
Along with any configuration necessary for ExAws.
[ExAws](https://github.com/CargoSense/ex_aws) is ... | 35.04943 | 251 | 0.668149 |
2d4112824ead3827905ffc4dc078f92aefcd9d6d | 3,861 | ex | Elixir | lib/fun_with_flags/notifications/phoenix_pubsub.ex | kieraneglin/fun_with_flags | 10ef8e9cde5cc6518e981d2f5deff380141a99be | [
"MIT"
] | null | null | null | lib/fun_with_flags/notifications/phoenix_pubsub.ex | kieraneglin/fun_with_flags | 10ef8e9cde5cc6518e981d2f5deff380141a99be | [
"MIT"
] | null | null | null | lib/fun_with_flags/notifications/phoenix_pubsub.ex | kieraneglin/fun_with_flags | 10ef8e9cde5cc6518e981d2f5deff380141a99be | [
"MIT"
] | null | null | null | if Code.ensure_loaded?(Phoenix.PubSub) do
defmodule FunWithFlags.Notifications.PhoenixPubSub do
@moduledoc false
use GenServer
require Logger
alias FunWithFlags.{Config, Store}
@channel "fun_with_flags_changes"
@max_attempts 5
def worker_spec do
%{
id: __MODULE__,
start: {__MODULE__, :... | 29.7 | 144 | 0.671588 |
2d4113ad31b5a40b8341a24473206e78eac4861d | 14,355 | ex | Elixir | clients/test_client/lib/google_api/test_client/v2/api/objects.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/test_client/lib/google_api/test_client/v2/api/objects.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/test_client/lib/google_api/test_client/v2/api/objects.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... | 34.927007 | 121 | 0.607802 |
2d4139fa8cc7a40285dd1405ae322e2c65f272be | 2,138 | ex | Elixir | lib/ash/resource/transformers/belongs_to_attribute.ex | MrFlorius/ash | 247abbb8333d252da5440a58ddf4f1b7f184342f | [
"MIT"
] | null | null | null | lib/ash/resource/transformers/belongs_to_attribute.ex | MrFlorius/ash | 247abbb8333d252da5440a58ddf4f1b7f184342f | [
"MIT"
] | null | null | null | lib/ash/resource/transformers/belongs_to_attribute.ex | MrFlorius/ash | 247abbb8333d252da5440a58ddf4f1b7f184342f | [
"MIT"
] | null | null | null | defmodule Ash.Resource.Transformers.BelongsToAttribute do
@moduledoc """
Creates the attribute for belongs_to relationships that have `define_field?: true`
"""
use Ash.Dsl.Transformer
alias Ash.Dsl.Transformer
alias Ash.Error.Dsl.DslError
@extension Module.concat(["Ash", Resource, Dsl])
def transform... | 31.441176 | 96 | 0.631431 |
2d413ea2bd4adc6db0a155baabd7d36894565eb6 | 848 | ex | Elixir | lib/ex_microsoft_azure_samples.ex | chgeuer/ex_microsoft_azure_samples | 6b00a1ec53882557bca6fbd763c95d7c34601dc2 | [
"Apache-2.0"
] | 1 | 2016-10-06T10:21:05.000Z | 2016-10-06T10:21:05.000Z | lib/ex_microsoft_azure_samples.ex | chgeuer/ex_microsoft_azure_samples | 6b00a1ec53882557bca6fbd763c95d7c34601dc2 | [
"Apache-2.0"
] | null | null | null | lib/ex_microsoft_azure_samples.ex | chgeuer/ex_microsoft_azure_samples | 6b00a1ec53882557bca6fbd763c95d7c34601dc2 | [
"Apache-2.0"
] | null | null | null | defmodule ExMicrosoftAzure.Samples do
def get_access_token_de do
{:ok, pid} = ExMicrosoftAzure.ActiveDirectory.start_link
pid |> ExMicrosoftAzure.ActiveDirectory.get_access_token(%{
environment: :azure_german_cloud,
aad_tenant_id: "AZURE_DE_PACKER_TENANTID" |> System.get_env,
client_id: "A... | 32.615385 | 66 | 0.725236 |
2d414768b098b03f500c6f3319b6ed6fed734ba4 | 51 | ex | Elixir | lib/vex/validators.ex | emjrdev/vex | c4a863ed39d4723ccf45231252d81c0f0df45de1 | [
"MIT"
] | 560 | 2015-01-12T00:07:27.000Z | 2022-02-07T03:21:44.000Z | lib/vex/validators.ex | emjrdev/vex | c4a863ed39d4723ccf45231252d81c0f0df45de1 | [
"MIT"
] | 55 | 2015-02-16T18:59:57.000Z | 2021-12-23T12:34:25.000Z | lib/vex/validators.ex | emjrdev/vex | c4a863ed39d4723ccf45231252d81c0f0df45de1 | [
"MIT"
] | 63 | 2015-02-12T03:49:50.000Z | 2021-12-12T00:11:01.000Z | defmodule Vex.Validators do
@moduledoc false
end
| 12.75 | 27 | 0.803922 |
2d415d8c4ff290d72967ce118dffc0f5c8255fca | 580 | exs | Elixir | package.head.exs | zotonic/mimetypes | a60b350819c8ba5602ed85b9d0050cc8e3cb1152 | [
"BSD-3-Clause"
] | 14 | 2017-07-14T15:48:19.000Z | 2021-03-12T13:09:33.000Z | package.head.exs | zotonic/mimetypes | a60b350819c8ba5602ed85b9d0050cc8e3cb1152 | [
"BSD-3-Clause"
] | 3 | 2017-07-14T09:17:37.000Z | 2019-02-25T14:00:00.000Z | package.head.exs | zotonic/mimetypes | a60b350819c8ba5602ed85b9d0050cc8e3cb1152 | [
"BSD-3-Clause"
] | 5 | 2017-09-02T21:54:50.000Z | 2021-08-06T09:52:18.000Z | Expm.Package.new(name: "mimetypes", description: "Erlang MIME types library",
version: :head, keywords: ["Erlang","mime","type","file","extension"],
maintainers: [[name: "Yurii Rashkovskii", email: "yrashk@gmail.com"]],
contributors: [[name: "Magnus Klaar", email: "mag... | 72.5 | 88 | 0.543103 |
2d415ff56ebb5d96ae7d66914eb9ae7c89c16a66 | 813 | ex | Elixir | apps/rig_api/lib/rig_api/router.ex | hlavacek/reactive-interaction-gateway | 6b968b742d8f0456a51c31dbc744ccfacd57191e | [
"Apache-2.0"
] | null | null | null | apps/rig_api/lib/rig_api/router.ex | hlavacek/reactive-interaction-gateway | 6b968b742d8f0456a51c31dbc744ccfacd57191e | [
"Apache-2.0"
] | null | null | null | apps/rig_api/lib/rig_api/router.ex | hlavacek/reactive-interaction-gateway | 6b968b742d8f0456a51c31dbc744ccfacd57191e | [
"Apache-2.0"
] | null | null | null | defmodule RigApi.Router do
use RigApi, :router
pipeline :api do
plug :put_format, :json
end
scope "/v1", RigApi do
pipe_through :api
resources "/messages", MessageController, only: [:create]
end
scope "/v1/users", RigApi do
pipe_through :api
get "/", ChannelsController, :list_channels... | 24.636364 | 69 | 0.686347 |
2d4167751688d29fb8cca28ec1604a9a348e567a | 1,337 | exs | Elixir | apps/decoder_json/test/decoder/json_arrays_test.exs | jdenen/hindsight | ef69b4c1a74c94729dd838a9a0849a48c9b6e04c | [
"Apache-2.0"
] | 12 | 2020-01-27T19:43:02.000Z | 2021-07-28T19:46:29.000Z | apps/decoder_json/test/decoder/json_arrays_test.exs | jdenen/hindsight | ef69b4c1a74c94729dd838a9a0849a48c9b6e04c | [
"Apache-2.0"
] | 81 | 2020-01-28T18:07:23.000Z | 2021-11-22T02:12:13.000Z | apps/decoder_json/test/decoder/json_arrays_test.exs | jdenen/hindsight | ef69b4c1a74c94729dd838a9a0849a48c9b6e04c | [
"Apache-2.0"
] | 10 | 2020-02-13T21:24:09.000Z | 2020-05-21T18:39:35.000Z | defmodule Decoder.JsonArraysTest do
use ExUnit.Case
test "serialization" do
struct = Decoder.JsonArrays.new!([])
serialized = JsonSerde.serialize!(struct)
assert JsonSerde.deserialize!(serialized) == struct
end
describe "Decoder" do
test "decodes string with arrays to json" do
input = ... | 39.323529 | 150 | 0.453254 |
2d416ee18c950e05105a2c8035aa484291933a79 | 88 | exs | Elixir | apps/summoner_web/test/summoner_web_web/views/page_view_test.exs | making3/summoner_alerts | fda7a43cab0e2022a90e8fe3d766f95628d9ac00 | [
"MIT"
] | null | null | null | apps/summoner_web/test/summoner_web_web/views/page_view_test.exs | making3/summoner_alerts | fda7a43cab0e2022a90e8fe3d766f95628d9ac00 | [
"MIT"
] | null | null | null | apps/summoner_web/test/summoner_web_web/views/page_view_test.exs | making3/summoner_alerts | fda7a43cab0e2022a90e8fe3d766f95628d9ac00 | [
"MIT"
] | null | null | null | defmodule SummonerWebWeb.PageViewTest do
use SummonerWebWeb.ConnCase, async: true
end
| 22 | 42 | 0.840909 |
2d41b8ccfc60dbb67432d8b691b4078804e0a494 | 89 | exs | Elixir | exercises/01-elixir/01-basics/09-multiple-clauses/student.exs | engelenv/distributed-applications | e78693a4ffa22b653e2e840427bcc1704040af4e | [
"BSD-3-Clause"
] | null | null | null | exercises/01-elixir/01-basics/09-multiple-clauses/student.exs | engelenv/distributed-applications | e78693a4ffa22b653e2e840427bcc1704040af4e | [
"BSD-3-Clause"
] | null | null | null | exercises/01-elixir/01-basics/09-multiple-clauses/student.exs | engelenv/distributed-applications | e78693a4ffa22b653e2e840427bcc1704040af4e | [
"BSD-3-Clause"
] | null | null | null | defmodule Numbers do
def abs(x) when x >= 0, do: x
def abs(x) when x < 0, do: -x
end
| 17.8 | 31 | 0.595506 |
2d41d1d30d9e731c79e36bb22bcfbe8eddbdcaf4 | 1,432 | exs | Elixir | inventory/config/dev.exs | DivvyPayHQ/federation_poc | 74839abf7d3eb8e3029468bbe4d335d7b240da97 | [
"MIT"
] | 2 | 2021-09-21T13:36:49.000Z | 2021-09-25T13:17:40.000Z | inventory/config/dev.exs | DivvyPayHQ/federation_poc | 74839abf7d3eb8e3029468bbe4d335d7b240da97 | [
"MIT"
] | null | null | null | inventory/config/dev.exs | DivvyPayHQ/federation_poc | 74839abf7d3eb8e3029468bbe4d335d7b240da97 | [
"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 webpack to recompile .js and .css sources.
config :inventory, InventoryWeb.Endpoint,
http: [port: ... | 29.22449 | 68 | 0.723464 |
2d41d2d879b0b412131f0bb43fd1108fbf1b5711 | 1,121 | exs | Elixir | test/exattack/throttle_test.exs | imkmf/exattack | dc7b0fa047ef586be4f1ac29950a19213f75f90f | [
"Apache-2.0"
] | 3 | 2016-10-02T17:15:47.000Z | 2018-04-19T09:28:51.000Z | test/exattack/throttle_test.exs | imkmf/exattack | dc7b0fa047ef586be4f1ac29950a19213f75f90f | [
"Apache-2.0"
] | 1 | 2016-10-29T23:06:07.000Z | 2017-05-10T23:38:13.000Z | test/exattack/throttle_test.exs | imkmf/exattack | dc7b0fa047ef586be4f1ac29950a19213f75f90f | [
"Apache-2.0"
] | null | null | null | defmodule ExAttack.ThrottleTest do
use ExUnit.Case
doctest ExAttack
@limit 5
@period 1
test "can do a request throttle" do
throttled = ExAttack.Throttle.throttle("test1", %{limit: @limit, period: @period}, "foo")
assert :ok == throttled
end
test "can set a value" do
ExAttack.Throttle.cache(... | 28.025 | 93 | 0.660125 |
2d41f64d2a9c94d24af489b8a14bb2f4e829b68c | 4,249 | ex | Elixir | lib/gen_browser/raxx.ex | CrowdHailer/gen_browser | 800be2283586f0b6bdbf5716ff866d0fd93b29fe | [
"Apache-2.0"
] | 66 | 2018-09-21T20:13:08.000Z | 2021-09-30T00:31:43.000Z | lib/gen_browser/raxx.ex | CrowdHailer/gen_browser | 800be2283586f0b6bdbf5716ff866d0fd93b29fe | [
"Apache-2.0"
] | 1 | 2018-10-04T16:34:18.000Z | 2018-10-04T16:34:18.000Z | lib/gen_browser/raxx.ex | CrowdHailer/gen_browser | 800be2283586f0b6bdbf5716ff866d0fd93b29fe | [
"Apache-2.0"
] | null | null | null | defmodule GenBrowser.Raxx do
@moduledoc false
use Raxx.Server
# use Raxx.Logger
require OK
@sse_mime_type ServerSentEvent.mime_type()
@impl Raxx.Server
def handle_request(%{method: :GET, path: ["_gb", "client.js"]}, _state) do
response(:ok)
|> set_header("content-type", "application/javascript"... | 26.892405 | 97 | 0.616851 |
2d42085d97fc5f7633a621bf915188382b004fdb | 95 | ex | Elixir | test/support/posts/posts.ex | sbrink/ecto_context | eb67c10aac30fdd69028229b3da7f240d01a2c59 | [
"MIT"
] | 1 | 2019-03-03T20:23:29.000Z | 2019-03-03T20:23:29.000Z | test/support/posts/posts.ex | sbrink/ecto_context | eb67c10aac30fdd69028229b3da7f240d01a2c59 | [
"MIT"
] | 30 | 2020-07-06T05:19:08.000Z | 2021-07-28T04:49:23.000Z | test/support/posts/posts.ex | sbrink/ecto_context | eb67c10aac30fdd69028229b3da7f240d01a2c59 | [
"MIT"
] | null | null | null | defmodule EctoContext.Test.Posts do
use EctoContext, module: EctoContext.Test.Posts.Post
end
| 23.75 | 54 | 0.821053 |
2d421dfd55cad80b2ca0c3daff44bcf1da32d0ab | 1,724 | ex | Elixir | clients/content/lib/google_api/content/v2/model/unit_invoice_tax_line.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/unit_invoice_tax_line.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/unit_invoice_tax_line.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | 1 | 2020-11-10T16:58:27.000Z | 2020-11-10T16:58:27.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 31.925926 | 77 | 0.724478 |
2d422097c967f018943d11b6277cf4a1e9eac127 | 76 | exs | Elixir | strategy/formatter.exs | joshnuss/design-patterns-in-elixir | 7f07cae0701ad460b6b275e382fad03324656989 | [
"MIT"
] | 516 | 2015-09-25T18:43:37.000Z | 2022-03-22T16:33:08.000Z | strategy/formatter.exs | joshnuss/design-patterns-in-elixir | 7f07cae0701ad460b6b275e382fad03324656989 | [
"MIT"
] | 2 | 2017-10-01T22:33:34.000Z | 2019-02-21T18:21:54.000Z | strategy/formatter.exs | joshnuss/design-patterns-in-elixir | 7f07cae0701ad460b6b275e382fad03324656989 | [
"MIT"
] | 52 | 2015-11-15T05:58:45.000Z | 2022-01-21T20:01:17.000Z | defmodule Formatter do
@callback output_report(context :: map) :: nil
end
| 19 | 48 | 0.75 |
2d422782ada3cc145eddebcb24f7c3dbaf646afe | 3,052 | exs | Elixir | test/cpf/ecto/type/bigint_test.exs | basmoura/cpf | a3c37daa7598358b7e15a5ce4b342ed551df79d3 | [
"MIT"
] | 34 | 2019-04-14T22:57:21.000Z | 2022-01-06T01:26:25.000Z | test/cpf/ecto/type/bigint_test.exs | basmoura/cpf | a3c37daa7598358b7e15a5ce4b342ed551df79d3 | [
"MIT"
] | 4 | 2019-06-09T15:48:53.000Z | 2022-01-29T13:13:57.000Z | test/cpf/ecto/type/bigint_test.exs | basmoura/cpf | a3c37daa7598358b7e15a5ce4b342ed551df79d3 | [
"MIT"
] | 10 | 2019-04-16T04:26:56.000Z | 2020-10-08T18:00:47.000Z | defmodule CPF.Ecto.Type.BigintTest do
use CPF.DataCase, async: false
test "inserts and reads CPFs" do
cpf = CPF.generate()
profile = Repo.insert!(%Profile{integer_cpf: cpf})
profile_from_db = Repo.get(Profile, profile.id)
assert profile_from_db.integer_cpf == cpf
end
test "doesn't insert inv... | 25.864407 | 80 | 0.645478 |
2d422a41e5adade13abc7ed01caadd4d68865642 | 1,649 | exs | Elixir | mix.exs | bbulpett/chatroom | 21a869b4e82ba7311fd1a40d359eadccbbf650fe | [
"MIT"
] | 2 | 2017-02-16T09:44:44.000Z | 2018-07-30T06:17:05.000Z | mix.exs | bbulpett/chatroom | 21a869b4e82ba7311fd1a40d359eadccbbf650fe | [
"MIT"
] | null | null | null | mix.exs | bbulpett/chatroom | 21a869b4e82ba7311fd1a40d359eadccbbf650fe | [
"MIT"
] | null | null | null | defmodule Chatroom.Mixfile do
use Mix.Project
def project do
[app: :chatroom,
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.env == :prod,
alia... | 29.981818 | 89 | 0.60279 |
2d4252a950db2e9bb94316b2681c1f39306601ec | 788 | ex | Elixir | lib/exshome_player/variables/title.ex | exshome/exshome | ef6b7a89f11dcd2016856dd49517b74aeebb6513 | [
"MIT"
] | 2 | 2021-12-21T16:32:56.000Z | 2022-02-22T17:06:39.000Z | lib/exshome_player/variables/title.ex | exshome/exshome | ef6b7a89f11dcd2016856dd49517b74aeebb6513 | [
"MIT"
] | null | null | null | lib/exshome_player/variables/title.ex | exshome/exshome | ef6b7a89f11dcd2016856dd49517b74aeebb6513 | [
"MIT"
] | null | null | null | defmodule ExshomePlayer.Variables.Title do
@moduledoc """
Playback title.
"""
alias ExshomePlayer.Services.PlayerState
use Exshome.Dependency.GenServerDependency,
name: "player_title",
dependencies: [{PlayerState, :player}]
@impl GenServerDependency
def handle_dependency_change(%DependencyState... | 31.52 | 101 | 0.694162 |
2d427a8efaa4d10efa8e92444f110a8082f18b79 | 202 | ex | Elixir | lib/perspective/utilities/app_id/app_id_from_opts.ex | backmath/perspective | a0a577d0ffb06805b64e4dcb171a093e051884b0 | [
"MIT"
] | 2 | 2020-04-24T19:43:06.000Z | 2020-04-24T19:52:27.000Z | lib/perspective/utilities/app_id/app_id_from_opts.ex | backmath/perspective | a0a577d0ffb06805b64e4dcb171a093e051884b0 | [
"MIT"
] | null | null | null | lib/perspective/utilities/app_id/app_id_from_opts.ex | backmath/perspective | a0a577d0ffb06805b64e4dcb171a093e051884b0 | [
"MIT"
] | null | null | null | defmodule Perspective.AppIdFromOpts do
def find(opts) when is_list(opts) do
Keyword.get(opts, :app_id)
end
def find(%{app_id: app_id}) do
app_id
end
def find(_) do
nil
end
end
| 14.428571 | 38 | 0.668317 |
2d428373cce727e78b8c0fd48f1f187804a46589 | 628 | ex | Elixir | lib/grizzly/zwave/commands/clock_get.ex | smartrent/grizzly | 65a397ea7bfedb5518fe63a3f058a0b6af473e39 | [
"Apache-2.0"
] | 76 | 2019-09-04T16:56:58.000Z | 2022-03-29T06:54:36.000Z | lib/grizzly/zwave/commands/clock_get.ex | smartrent/grizzly | 65a397ea7bfedb5518fe63a3f058a0b6af473e39 | [
"Apache-2.0"
] | 124 | 2019-09-05T14:01:24.000Z | 2022-02-28T22:58:14.000Z | lib/grizzly/zwave/commands/clock_get.ex | smartrent/grizzly | 65a397ea7bfedb5518fe63a3f058a0b6af473e39 | [
"Apache-2.0"
] | 10 | 2019-10-23T19:25:45.000Z | 2021-11-17T13:21:20.000Z | defmodule Grizzly.ZWave.Commands.ClockGet do
@moduledoc """
This command is used to request the current time set at a supporting node.
Params: - none -
"""
@behaviour Grizzly.ZWave.Command
alias Grizzly.ZWave.Command
alias Grizzly.ZWave.CommandClasses.Clock
@impl true
def new(params \\ []) do
... | 16.972973 | 76 | 0.644904 |
2d42a8ba031cc6c67ad6badc1481ab95414669e7 | 3,096 | ex | Elixir | clients/you_tube/lib/google_api/you_tube/v3/model/subscription.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/you_tube/lib/google_api/you_tube/v3/model/subscription.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/you_tube/lib/google_api/you_tube/v3/model/subscription.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 ... | 49.935484 | 282 | 0.737403 |
2d42e08defaa785ec7fbc5d56e1398968ab13630 | 658 | ex | Elixir | apps/worker/lib/worker/conduit/broker.ex | michaeljguarino/forge | 50ee583ecb4aad5dee4ef08fce29a8eaed1a0824 | [
"Apache-2.0"
] | 59 | 2021-09-16T19:29:39.000Z | 2022-03-31T20:44:24.000Z | apps/worker/lib/worker/conduit/broker.ex | svilenkov/plural | ac6c6cc15ac4b66a3b5e32ed4a7bee4d46d1f026 | [
"Apache-2.0"
] | 111 | 2021-08-15T09:56:37.000Z | 2022-03-31T23:59:32.000Z | apps/worker/lib/worker/conduit/broker.ex | svilenkov/plural | ac6c6cc15ac4b66a3b5e32ed4a7bee4d46d1f026 | [
"Apache-2.0"
] | 4 | 2021-12-13T09:43:01.000Z | 2022-03-29T18:08:44.000Z | defmodule Worker.Conduit.Broker do
use Core.Conduit.Base, otp_app: :worker
pipeline :in_tracking do
plug Conduit.Plug.CorrelationId
plug Conduit.Plug.LogIncoming
end
pipeline :error_handling do
plug Core.Conduit.Plug.DeadLetter, broker: __MODULE__, publish_to: :error
plug Core.Conduit.Plug.Ret... | 27.416667 | 77 | 0.743161 |
2d42ee600214888c166b3b0e68e349446c57b6d0 | 136 | ex | Elixir | lab_5/factorial.ex | kamilok1965/erlang-lab | 50817faf59c366ff61b67cf89b04c51c9b804a7b | [
"MIT"
] | null | null | null | lab_5/factorial.ex | kamilok1965/erlang-lab | 50817faf59c366ff61b67cf89b04c51c9b804a7b | [
"MIT"
] | null | null | null | lab_5/factorial.ex | kamilok1965/erlang-lab | 50817faf59c366ff61b67cf89b04c51c9b804a7b | [
"MIT"
] | null | null | null | defmodule Factorial do
def factorial(upto) do
case upto do
x when x < 2 ->
1
x ->
x * factorial(x-1)
end
end
end
| 12.363636 | 24 | 0.573529 |
2d42f313ec799edf31e6681453394ca1dcf1cb96 | 60,462 | ex | Elixir | lib/packed_decimal.ex | kipcole9/packed_decimal | 0831d4702191f9d249c724c1bac73744237636f3 | [
"Apache-2.0"
] | null | null | null | lib/packed_decimal.ex | kipcole9/packed_decimal | 0831d4702191f9d249c724c1bac73744237636f3 | [
"Apache-2.0"
] | null | null | null | lib/packed_decimal.ex | kipcole9/packed_decimal | 0831d4702191f9d249c724c1bac73744237636f3 | [
"Apache-2.0"
] | null | null | null | defmodule PackedDecimal do
@moduledoc """
Decimal arithmetic on *fixed* precision floating-point numbers.
A number is represented by a signed coefficient and exponent such that: `sign
* coefficient * 10 ^ exponent`. All numbers are represented and calculated
exactly, but the result of an operation may be rou... | 28.860143 | 124 | 0.619315 |
2d43521ffc885d515d8e164a90ec522ca73f0c8c | 6,561 | ex | Elixir | lib/scenic/cache/support/hash.ex | tiger808/scenic | 77abc6d891b7a1a9262cdc47d7c5fac3c8609d1f | [
"Apache-2.0"
] | 1,716 | 2018-09-07T21:55:43.000Z | 2022-03-31T16:16:30.000Z | lib/scenic/cache/support/hash.ex | tiger808/scenic | 77abc6d891b7a1a9262cdc47d7c5fac3c8609d1f | [
"Apache-2.0"
] | 220 | 2018-09-08T01:28:00.000Z | 2022-03-22T03:55:17.000Z | lib/scenic/cache/support/hash.ex | tiger808/scenic | 77abc6d891b7a1a9262cdc47d7c5fac3c8609d1f | [
"Apache-2.0"
] | 137 | 2018-09-07T21:55:56.000Z | 2022-03-26T04:07:27.000Z | #
# Created by Boyd Multerer on 2017-11-13.
# Copyright © 2017 Kry10 Industries. All rights reserved.
#
defmodule Scenic.Cache.Support.Hash do
@moduledoc """
Helper functions to work with hash signatures.
Both the [`Cache.File`](Scenic.Cache.File.html) and [`Cache.Term`](Scenic.Cache.Term.html)
modules use ... | 29.822727 | 94 | 0.565005 |
2d4366d3d981c56ad5e7c8977c816e7e5aca8a87 | 1,301 | ex | Elixir | channel-sender/lib/channel_sender_ex/core/channel_supervisor.ex | santitigaga/async-dataflow | 66132c7353ae0b3b9d5a3704699b5ba130b4da9d | [
"MIT"
] | 2 | 2022-01-11T21:03:44.000Z | 2022-03-15T15:13:11.000Z | channel-sender/lib/channel_sender_ex/core/channel_supervisor.ex | santitigaga/async-dataflow | 66132c7353ae0b3b9d5a3704699b5ba130b4da9d | [
"MIT"
] | 3 | 2021-12-21T21:04:20.000Z | 2022-03-15T16:16:45.000Z | channel-sender/lib/channel_sender_ex/core/channel_supervisor.ex | santitigaga/async-dataflow | 66132c7353ae0b3b9d5a3704699b5ba130b4da9d | [
"MIT"
] | 2 | 2022-02-08T22:33:36.000Z | 2022-03-25T19:55:18.000Z | defmodule ChannelSenderEx.Core.ChannelSupervisor do
@moduledoc """
Module to start supervised channels in a distributed way
"""
alias ChannelSenderEx.Core.ChannelRegistry
alias ChannelSenderEx.Core.Channel
alias ChannelSenderEx.Core.RulesProvider
@supervisor_module Application.get_env(:channel_sender_e... | 36.138889 | 88 | 0.746349 |
2d4377cd4a4c77741f9e73decf954683fc865fee | 4,409 | ex | Elixir | lib/paddle/schema_parser.ex | aef-/paddle | 89e2739d4234d262eabb1118bb2dfbead5aafe56 | [
"MIT"
] | 40 | 2017-04-22T11:49:06.000Z | 2021-12-24T13:54:28.000Z | lib/paddle/schema_parser.ex | aef-/paddle | 89e2739d4234d262eabb1118bb2dfbead5aafe56 | [
"MIT"
] | 67 | 2017-03-10T19:02:17.000Z | 2022-03-23T23:26:27.000Z | lib/paddle/schema_parser.ex | aef-/paddle | 89e2739d4234d262eabb1118bb2dfbead5aafe56 | [
"MIT"
] | 8 | 2017-03-27T01:23:49.000Z | 2021-01-13T17:31:23.000Z | defmodule Paddle.SchemaParser do
@moduledoc ~S"""
Module used to parse *.schema files and generate Paddle classes.
"""
require Logger
for file <- Paddle.config(:schema_files) do
@external_resource file
end
@definitions Paddle.config(:schema_files)
|> Enum.flat_map(fn file ->
... | 31.719424 | 123 | 0.619415 |
2d4383ac4babc9b55f2220c682c3f0cba7ffa4b7 | 3,499 | ex | Elixir | apps/andi/lib/andi/harvest/harvester.ex | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | 26 | 2019-09-20T23:54:45.000Z | 2020-08-20T14:23:32.000Z | apps/andi/lib/andi/harvest/harvester.ex | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | 757 | 2019-08-15T18:15:07.000Z | 2020-09-18T20:55:31.000Z | apps/andi/lib/andi/harvest/harvester.ex | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | 9 | 2019-11-12T16:43:46.000Z | 2020-03-25T16:23:16.000Z | defmodule Andi.Harvest.Harvester do
@moduledoc """
retreives data json and maps it to a smartcity dataset
"""
use Tesla
import SmartCity.Event, only: [dataset_harvest_end: 0, dataset_harvest_start: 0, dataset_update: 0, dataset_delete: 0]
alias SmartCity.Organization
alias Andi.Harvest.DataJsonDatasetMa... | 30.964602 | 123 | 0.68391 |
2d438b79a0ddda3db7518798bc66e37783ed35b2 | 2,485 | exs | Elixir | test/riffed/shared_client_test.exs | fakeNetflix/pinterest-repo-riffed | 26ecaee4e97628174020c2da4cc477645633dc38 | [
"Apache-2.0"
] | 326 | 2015-12-18T20:40:26.000Z | 2022-02-20T18:14:19.000Z | test/riffed/shared_client_test.exs | fakeNetflix/pinterest-repo-riffed | 26ecaee4e97628174020c2da4cc477645633dc38 | [
"Apache-2.0"
] | 50 | 2015-12-22T18:31:32.000Z | 2020-06-17T22:14:38.000Z | test/riffed/shared_client_test.exs | fakeNetflix/pinterest-repo-riffed | 26ecaee4e97628174020c2da4cc477645633dc38 | [
"Apache-2.0"
] | 37 | 2015-12-20T05:35:34.000Z | 2020-12-24T11:23:43.000Z | defmodule SharedClientTest do
use ExUnit.Case
import Mock
defmodule ClientModels do
use Riffed.Struct, account_types: [:Account, :Preferences]
end
defmodule AccountClient do
use Riffed.Client, structs: ClientModels,
client_opts: [host: "localhost",
port: 3112,
... | 28.238636 | 71 | 0.575453 |
2d439a53dfc79b20cd9beb327d0c490df6f5e87f | 212 | exs | Elixir | apps/alert_processor/priv/repo/migrations/20170324164902_add_role_to_user.exs | mbta/alerts_concierge | d8e643445ef06f80ca273f2914c6959daea146f6 | [
"MIT"
] | null | null | null | apps/alert_processor/priv/repo/migrations/20170324164902_add_role_to_user.exs | mbta/alerts_concierge | d8e643445ef06f80ca273f2914c6959daea146f6 | [
"MIT"
] | 21 | 2021-03-12T17:05:30.000Z | 2022-02-16T21:48:35.000Z | apps/alert_processor/priv/repo/migrations/20170324164902_add_role_to_user.exs | mbta/alerts_concierge | d8e643445ef06f80ca273f2914c6959daea146f6 | [
"MIT"
] | 1 | 2021-12-09T15:09:53.000Z | 2021-12-09T15:09:53.000Z | defmodule MbtaServer.Repo.Migrations.AddRoleToUser do
use Ecto.Migration
def change do
alter table(:users, primary_key: false) do
add :role, :string, null: false, default: "user"
end
end
end
| 21.2 | 54 | 0.707547 |
2d43aec9c4c8943c0c09e3050c7fd99f44559e11 | 1,813 | ex | Elixir | clients/slides/lib/google_api/slides/v1/model/delete_table_row_request.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/slides/lib/google_api/slides/v1/model/delete_table_row_request.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/slides/lib/google_api/slides/v1/model/delete_table_row_request.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | 1 | 2018-07-28T20:50:50.000Z | 2018-07-28T20:50:50.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 36.26 | 305 | 0.756757 |
2d43b87de570218988a478b9b39e156241251e54 | 225 | exs | Elixir | priv/repo/migrations/20170623210454_add_consignments_topic.exs | artsy/aprb | 9e93200462a76823c831b92f02bddcf1b326a451 | [
"MIT"
] | 11 | 2016-08-18T23:18:57.000Z | 2019-05-03T17:46:55.000Z | priv/repo/migrations/20170623210454_add_consignments_topic.exs | artsy/aprb | 9e93200462a76823c831b92f02bddcf1b326a451 | [
"MIT"
] | 105 | 2016-08-17T23:36:07.000Z | 2019-09-26T18:14:24.000Z | priv/repo/migrations/20170623210454_add_consignments_topic.exs | artsy/aprb | 9e93200462a76823c831b92f02bddcf1b326a451 | [
"MIT"
] | 14 | 2016-08-17T17:23:45.000Z | 2019-09-16T16:14:59.000Z | defmodule Aprb.Repo.Migrations.AddConsignmentsTopic do
use Ecto.Migration
alias Aprb.{Repo,Topic}
def change do
changeset = Topic.changeset(%Topic{}, %{name: "consignments"})
Repo.insert!(changeset)
end
end
| 20.454545 | 66 | 0.724444 |
2d43bbe3d4d7abe1b5ebf990678880e8f26eec14 | 3,050 | exs | Elixir | test/groupher_server_web/query/accounts/published/published_posts_test.exs | mydearxym/mastani_server | f24034a4a5449200165cf4a547964a0961793eab | [
"Apache-2.0"
] | 2 | 2018-03-26T08:56:21.000Z | 2018-07-02T22:34:51.000Z | test/groupher_server_web/query/accounts/published/published_posts_test.exs | mydearxym/mastani_server | f24034a4a5449200165cf4a547964a0961793eab | [
"Apache-2.0"
] | 22 | 2018-03-21T03:40:50.000Z | 2018-07-10T06:33:10.000Z | test/groupher_server_web/query/accounts/published/published_posts_test.exs | mydearxym/mastani_server | f24034a4a5449200165cf4a547964a0961793eab | [
"Apache-2.0"
] | null | null | null | defmodule GroupherServer.Test.Query.Accounts.Published.Posts do
use GroupherServer.TestTools
alias GroupherServer.CMS
@publish_count 10
setup do
{:ok, user} = db_insert(:user)
{:ok, post} = db_insert(:post)
{:ok, community} = db_insert(:community)
guest_conn = simu_conn(:guest)
user_conn... | 29.047619 | 87 | 0.572787 |
2d43c484d01b668d8b307635fd574d773048b95d | 752 | exs | Elixir | config/releases.exs | Pavinati/astarte_flow | 82b6bee82e23907f7623a94a072239591b19b9d8 | [
"Apache-2.0"
] | 11 | 2020-01-30T17:44:35.000Z | 2022-01-13T19:17:21.000Z | config/releases.exs | Pavinati/astarte_flow | 82b6bee82e23907f7623a94a072239591b19b9d8 | [
"Apache-2.0"
] | 100 | 2020-02-11T10:01:35.000Z | 2022-02-17T10:39:35.000Z | config/releases.exs | Pavinati/astarte_flow | 82b6bee82e23907f7623a94a072239591b19b9d8 | [
"Apache-2.0"
] | 7 | 2020-01-30T11:33:20.000Z | 2021-05-03T09:48:41.000Z | #
# This file is part of Astarte.
#
# Copyright 2020 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... | 32.695652 | 74 | 0.75133 |
2d43f064f7a898bcf4f7c0e7546beac13d25cdde | 629 | exs | Elixir | priv/repo/migrations/20200614162015_create_sub_sells.exs | abmBispo/elixir-ecommerce | 0507f7621d68ba8f0f65409a1a503683b7c0d37b | [
"MIT"
] | 4 | 2020-05-29T03:33:02.000Z | 2021-08-21T23:01:48.000Z | priv/repo/migrations/20200614162015_create_sub_sells.exs | abmBispo/elixir-ecommerce | 0507f7621d68ba8f0f65409a1a503683b7c0d37b | [
"MIT"
] | 2 | 2020-07-29T01:50:46.000Z | 2021-08-31T20:10:47.000Z | priv/repo/migrations/20200614162015_create_sub_sells.exs | abmBispo/elixir-ecommerce | 0507f7621d68ba8f0f65409a1a503683b7c0d37b | [
"MIT"
] | 1 | 2022-03-21T18:13:21.000Z | 2022-03-21T18:13:21.000Z | defmodule ElixirEcommerce.Repo.Migrations.CreateSubSells do
use Ecto.Migration
def change do
create table(:sub_sells) do
add :amount_sold, :integer, null: false
add :status, :string, null: false, default: "in_analysis"
add :sell_id, references(:sells, on_delete: :nothing), null: false
a... | 31.45 | 78 | 0.694754 |
2d43f4ca2e43c9d4cbbd532bedc7fb31862afc64 | 781 | ex | Elixir | lib/lye/client.ex | Blackstaff/lye | 51d1413c0130ea5854df9dedf58245111645cb7e | [
"Apache-2.0"
] | null | null | null | lib/lye/client.ex | Blackstaff/lye | 51d1413c0130ea5854df9dedf58245111645cb7e | [
"Apache-2.0"
] | null | null | null | lib/lye/client.ex | Blackstaff/lye | 51d1413c0130ea5854df9dedf58245111645cb7e | [
"Apache-2.0"
] | null | null | null | defmodule Lye.Client do
@moduledoc false
alias Lye.Client.Envelope
alias Lye.Client.Response
defstruct [operations: %{}, url: nil, tns: nil]
def call(client, operation_name, parameters) do
operation = client.operations[operation_name]
body = parameters
|> Envelope.envelope(operation.name, clien... | 31.24 | 93 | 0.674776 |
2d43f872b9c261f485b4b3955af99edbf6877317 | 616 | ex | Elixir | lib/queuerbackend_web/router.ex | ayushpandey8439/QueuerBackend | 36195b98e02ee8af2b8ba95b9a73547887efb9ce | [
"MIT"
] | null | null | null | lib/queuerbackend_web/router.ex | ayushpandey8439/QueuerBackend | 36195b98e02ee8af2b8ba95b9a73547887efb9ce | [
"MIT"
] | null | null | null | lib/queuerbackend_web/router.ex | ayushpandey8439/QueuerBackend | 36195b98e02ee8af2b8ba95b9a73547887efb9ce | [
"MIT"
] | null | null | null | defmodule QueuerbackendWeb.Router do
use QueuerbackendWeb, :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 "/", Queuerbac... | 18.666667 | 39 | 0.693182 |
2d43fa1072eafd0fb65d53ce678031c1f04c9b86 | 2,491 | ex | Elixir | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_inspect_job_config.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_inspect_job_config.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_inspect_job_config.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | 1 | 2020-11-10T16:58:27.000Z | 2020-11-10T16:58:27.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 43.701754 | 223 | 0.76114 |
2d44080244064580030a01b98bd8d72cf4ceeed2 | 2,626 | ex | Elixir | day14/lib/day14.ex | carlism/aoc_2020 | 5ffdba5d41d243562fa448a92ff02900354956bb | [
"MIT"
] | null | null | null | day14/lib/day14.ex | carlism/aoc_2020 | 5ffdba5d41d243562fa448a92ff02900354956bb | [
"MIT"
] | null | null | null | day14/lib/day14.ex | carlism/aoc_2020 | 5ffdba5d41d243562fa448a92ff02900354956bb | [
"MIT"
] | null | null | null | use Bitwise
defmodule Day14 do
@moduledoc """
Documentation for Day14.
"""
def part1() do
Day14.process("input.txt") |> IO.puts()
end
def part2() do
Day14.process_v2("input.txt") |> IO.puts()
end
def apply_mask(mask, value) do
value = String.to_integer(value)
{or_mask, _} = String.rep... | 27.642105 | 84 | 0.567403 |
2d441afa60fff789ddc95835467abdf76de42016 | 1,335 | exs | Elixir | test/stripe/issuing/authorization_test.exs | Rutaba/stripity_stripe | 12c525301c781f9c8c7e578cc0d933f5d35183d5 | [
"BSD-3-Clause"
] | 555 | 2016-11-29T05:02:27.000Z | 2022-03-30T00:47:59.000Z | test/stripe/issuing/authorization_test.exs | Rutaba/stripity_stripe | 12c525301c781f9c8c7e578cc0d933f5d35183d5 | [
"BSD-3-Clause"
] | 532 | 2016-11-28T18:22:25.000Z | 2022-03-30T17:04:32.000Z | test/stripe/issuing/authorization_test.exs | Rutaba/stripity_stripe | 12c525301c781f9c8c7e578cc0d933f5d35183d5 | [
"BSD-3-Clause"
] | 296 | 2016-12-05T14:04:09.000Z | 2022-03-28T20:39:37.000Z | defmodule Stripe.Issuing.AuthorizationTest do
use Stripe.StripeCase, async: true
test "is retrievable" do
assert {:ok, %Stripe.Issuing.Authorization{}} =
Stripe.Issuing.Authorization.retrieve("iauth_123")
assert_stripe_requested(:get, "/v1/issuing/authorizations/iauth_123")
end
test "is ... | 32.560976 | 90 | 0.709363 |
2d44326622ea2f66cfa04490576097f2600afb4c | 1,914 | exs | Elixir | test/storage/blob_storage_test.exs | nulian/ex_microsoft_azure_storage | b147de024ceb1fd21d617863a9c53c41263700a6 | [
"MIT"
] | null | null | null | test/storage/blob_storage_test.exs | nulian/ex_microsoft_azure_storage | b147de024ceb1fd21d617863a9c53c41263700a6 | [
"MIT"
] | null | null | null | test/storage/blob_storage_test.exs | nulian/ex_microsoft_azure_storage | b147de024ceb1fd21d617863a9c53c41263700a6 | [
"MIT"
] | null | null | null | defmodule ExMicrosoftAzureStorage.Storage.BlobStorageTest do
@moduledoc false
use ExUnit.Case, async: true
@moduletag :external
import ExMicrosoftAzureStorage.Factory
alias ExMicrosoftAzureStorage.Storage.BlobStorage
alias ExMicrosoftAzureStorage.Storage.BlobStorage.ServiceProperties
setup do
sto... | 30.870968 | 91 | 0.719958 |
2d4442399be23558f564d448e169d5f95f71f995 | 144 | ex | Elixir | lib/igdb/resources/character_mug_shot.ex | facto/igdb | 9662e9ffd41e0925c22b1d3cd4774ae49b68e89e | [
"MIT"
] | 2 | 2018-04-09T07:34:37.000Z | 2020-03-08T06:50:03.000Z | lib/igdb/resources/character_mug_shot.ex | tomasz-tomczyk/igdb | 98d777798503f427e6c302da0251e819b9583c65 | [
"MIT"
] | null | null | null | lib/igdb/resources/character_mug_shot.ex | tomasz-tomczyk/igdb | 98d777798503f427e6c302da0251e819b9583c65 | [
"MIT"
] | null | null | null | defmodule Igdb.CharacterMugShot do
@moduledoc """
Represents an Character Mug Shot resource in the IGDB API.
"""
use Igdb.Resource
end
| 18 | 60 | 0.736111 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.