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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
915e8ee074d6070ed32fe50b1c6591a0b18f450d | 4,375 | ex | Elixir | clients/policy_troubleshooter/lib/google_api/policy_troubleshooter/v1beta/model/google_iam_v1_binding.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | 1 | 2021-10-01T09:20:41.000Z | 2021-10-01T09:20:41.000Z | clients/policy_troubleshooter/lib/google_api/policy_troubleshooter/v1beta/model/google_iam_v1_binding.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/policy_troubleshooter/lib/google_api/policy_troubleshooter/v1beta/model/google_iam_v1_binding.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 82.54717 | 1,972 | 0.760914 |
915e90c0240688853405aa2d4d48c3646b2fa6d7 | 5,530 | ex | Elixir | lib/nostrum/struct/message.ex | jos-b/nostrum | baf5c9de9f17c3bd99c5c06a454e03cc448aad1c | [
"MIT"
] | null | null | null | lib/nostrum/struct/message.ex | jos-b/nostrum | baf5c9de9f17c3bd99c5c06a454e03cc448aad1c | [
"MIT"
] | null | null | null | lib/nostrum/struct/message.ex | jos-b/nostrum | baf5c9de9f17c3bd99c5c06a454e03cc448aad1c | [
"MIT"
] | 1 | 2020-09-03T13:55:55.000Z | 2020-09-03T13:55:55.000Z | defmodule Nostrum.Struct.Message do
@moduledoc """
Struct representing a Discord message.
"""
alias Nostrum.Struct.{Channel, Embed, Guild, User}
alias Nostrum.Struct.Guild.{Member, Role}
alias Nostrum.Struct.Message.{Activity, Application, Attachment, Reaction, Reference}
alias Nostrum.{Snowflake, Util}
... | 29.731183 | 118 | 0.636347 |
915eb4950ff7589ca6e4074bbabcb4cbfc22b579 | 1,540 | ex | Elixir | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_document_location.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_document_location.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_document_location.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 ... | 32.083333 | 129 | 0.744805 |
915edeaaf94cba4f5eeec7d95fb375057bf32c58 | 819 | exs | Elixir | test/cog/command/service/tokens_test.exs | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 1,003 | 2016-02-23T17:21:12.000Z | 2022-02-20T14:39:35.000Z | test/cog/command/service/tokens_test.exs | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 906 | 2016-02-22T22:54:19.000Z | 2022-03-11T15:19:43.000Z | test/cog/command/service/tokens_test.exs | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 95 | 2016-02-23T13:42:31.000Z | 2021-11-30T14:39:55.000Z | defmodule Cog.Command.Service.TokensTest do
use ExUnit.Case
alias Cog.Command.Service.Tokens
alias Cog.ServiceHelpers
test "a token is registered to the process that asked for it" do
{pid, token} = ServiceHelpers.spawn_fake_executor
assert ^pid = Tokens.process_for_token(token)
end
test "a token ... | 27.3 | 80 | 0.737485 |
915ef7456d07ae2971988f99eaf9bfdd51784bd5 | 1,586 | ex | Elixir | clients/webmaster/lib/google_api/webmaster/v3/model/sites_list_response.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/webmaster/lib/google_api/webmaster/v3/model/sites_list_response.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/webmaster/lib/google_api/webmaster/v3/model/sites_list_response.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... | 33.041667 | 175 | 0.761034 |
915effb838550ae0127bf65fdbb31f31339f4c7b | 1,755 | exs | Elixir | apps/admin_app/mix.exs | saurabharch/avia | 74a82a95cf8bfe8143d1fce8136a3bb7ffc9467c | [
"MIT"
] | 1 | 2018-12-01T18:13:55.000Z | 2018-12-01T18:13:55.000Z | apps/admin_app/mix.exs | saurabharch/avia | 74a82a95cf8bfe8143d1fce8136a3bb7ffc9467c | [
"MIT"
] | null | null | null | apps/admin_app/mix.exs | saurabharch/avia | 74a82a95cf8bfe8143d1fce8136a3bb7ffc9467c | [
"MIT"
] | null | null | null | defmodule AdminApp.Mixfile do
use Mix.Project
def project do
[
app: :admin_app,
version: "0.0.1",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixir: "~> 1.7.2",
elixirc_paths: elixirc_p... | 27 | 82 | 0.534473 |
915f7375dcf14685ee92822a19dd28916699193c | 189 | ex | Elixir | elixir/codes-from-books/little-elixir/cap11/concuerror_playground/lib/ping_pong.ex | trxeste/wrk | 3e05e50ff621866f0361cc8494ce8f6bb4d97fae | [
"BSD-3-Clause"
] | 1 | 2017-10-16T03:00:50.000Z | 2017-10-16T03:00:50.000Z | elixir/codes-from-books/little-elixir/cap11/concuerror_playground/lib/ping_pong.ex | trxeste/wrk | 3e05e50ff621866f0361cc8494ce8f6bb4d97fae | [
"BSD-3-Clause"
] | null | null | null | elixir/codes-from-books/little-elixir/cap11/concuerror_playground/lib/ping_pong.ex | trxeste/wrk | 3e05e50ff621866f0361cc8494ce8f6bb4d97fae | [
"BSD-3-Clause"
] | null | null | null | defmodule PingPong do
def ping do
receive do
:pong -> :ok
end
end
def pong(ping_pid) do
send(ping_pid, :pong)
receive do
:ping -> :ok
end
end
end
| 11.117647 | 25 | 0.560847 |
915f79d429014562b14d52360888a4f79fe8ac0d | 1,426 | ex | Elixir | lib/temple/parser/do_expressions.ex | mhanberg/temple | ec484bcef65e1bffa9134c3b259795237c1845d0 | [
"MIT"
] | 366 | 2019-07-12T22:43:35.000Z | 2022-03-31T07:26:25.000Z | lib/temple/parser/do_expressions.ex | mhanberg/temple | ec484bcef65e1bffa9134c3b259795237c1845d0 | [
"MIT"
] | 114 | 2019-07-12T19:49:10.000Z | 2022-03-23T10:48:48.000Z | lib/temple/parser/do_expressions.ex | mhanberg/temple | ec484bcef65e1bffa9134c3b259795237c1845d0 | [
"MIT"
] | 17 | 2019-07-23T15:16:34.000Z | 2021-02-25T02:42:02.000Z | defmodule Temple.Parser.DoExpressions do
@moduledoc false
alias Temple.Parser
@behaviour Parser
defstruct elixir_ast: nil, children: []
@impl Parser
def applicable?({_, _, args}) when is_list(args) do
Enum.any?(args, fn arg -> match?([{:do, _} | _], arg) end)
end
def applicable?(_), do: false
... | 26.407407 | 94 | 0.578541 |
915f92fc20de92cc54251e051430e5ee46242076 | 1,538 | ex | Elixir | src/test/project-stubs/elixir/exunit/agnostic/test/support/data_case.ex | dstrunk/agnostic-test | e4168a926574223982aab3b4da4534727c7b6445 | [
"MIT"
] | null | null | null | src/test/project-stubs/elixir/exunit/agnostic/test/support/data_case.ex | dstrunk/agnostic-test | e4168a926574223982aab3b4da4534727c7b6445 | [
"MIT"
] | 2 | 2021-06-05T02:35:39.000Z | 2021-11-05T14:49:36.000Z | src/test/project-stubs/elixir/exunit/agnostic/test/support/data_case.ex | dstrunk/vscode-test | e4168a926574223982aab3b4da4534727c7b6445 | [
"MIT"
] | null | null | null | defmodule Agnostic.DataCase do
@moduledoc """
This module defines the setup for tests requiring
access to the application's data layer.
You may define functions here to be used as helpers in
your tests.
Finally, if the test case interacts with the database,
we enable the SQL sandbox, so changes done to ... | 27.464286 | 77 | 0.689857 |
915fd3df63e3768583958c25a6bc20687989822c | 794 | ex | Elixir | lib/nerves_hub_link/application.ex | verypossible/nerves_hub_link | fda7d06e7f00e69e3ee0dcf2dd8ea26a60cb5765 | [
"Apache-2.0"
] | null | null | null | lib/nerves_hub_link/application.ex | verypossible/nerves_hub_link | fda7d06e7f00e69e3ee0dcf2dd8ea26a60cb5765 | [
"Apache-2.0"
] | null | null | null | lib/nerves_hub_link/application.ex | verypossible/nerves_hub_link | fda7d06e7f00e69e3ee0dcf2dd8ea26a60cb5765 | [
"Apache-2.0"
] | null | null | null | defmodule NervesHubLink.Application do
use Application
alias NervesHubLink.{
DeviceChannel,
Configurator,
Connection,
ConsoleChannel,
Socket,
UpdateManager
}
def start(_type, _args) do
config = Configurator.build()
children =
[
Connection,
{PhoenixClient.... | 22.055556 | 91 | 0.663728 |
915fdbde93970fb97bc6e1793d5501d93c9d8afd | 33,169 | ex | Elixir | lib/b58.ex | coingaming/b58 | 704aadae8523bbc0d1c2b57a356f67f3b7d9d80e | [
"MIT"
] | null | null | null | lib/b58.ex | coingaming/b58 | 704aadae8523bbc0d1c2b57a356f67f3b7d9d80e | [
"MIT"
] | null | null | null | lib/b58.ex | coingaming/b58 | 704aadae8523bbc0d1c2b57a356f67f3b7d9d80e | [
"MIT"
] | null | null | null | defmodule B58 do
@moduledoc """
This module provides Base58 and Base58Check data encoding and decoding functions.
The following alphabets are supported for encoding and decoding, for both Base58 and Base58Check:
* `Bitcoin`
* `Flickr`
* `Ripple`
Note that `IPFS` uses the same alphabet as Bitcoi... | 45.876902 | 617 | 0.618017 |
9160112cf2573de91be9ea10f5e899738dc971a6 | 979 | ex | Elixir | lib/ash/resource/transformers/countable_actions.ex | smt116/ash | 880a17f197873eb1c8dc8d81a8b4d6d9cb570b3f | [
"MIT"
] | null | null | null | lib/ash/resource/transformers/countable_actions.ex | smt116/ash | 880a17f197873eb1c8dc8d81a8b4d6d9cb570b3f | [
"MIT"
] | null | null | null | lib/ash/resource/transformers/countable_actions.ex | smt116/ash | 880a17f197873eb1c8dc8d81a8b4d6d9cb570b3f | [
"MIT"
] | null | null | null | defmodule Ash.Resource.Transformers.CountableActions do
@moduledoc """
Ensures that countable paginated actions do not exist for resources that are not countable
"""
use Ash.Dsl.Transformer
alias Ash.Dsl.Transformer
# sobelow_skip ["DOS.BinToAtom"]
def transform(resource, dsl_state) do
dsl_state
... | 27.971429 | 95 | 0.610827 |
91603777aa5db30ce0f0994d823cdf5f2a70fb62 | 70 | exs | Elixir | .workshop/exercises/iex/test/check.exs | silesian-beamers/elixir-from-the-ground-up | 1ad8c2a4d429175461dc45e218849eb6a212c776 | [
"MIT"
] | 10 | 2015-12-13T07:29:08.000Z | 2016-09-22T03:47:35.000Z | .workshop/exercises/iex/test/check.exs | silesian-beamers/elixir-from-the-ground-up | 1ad8c2a4d429175461dc45e218849eb6a212c776 | [
"MIT"
] | 4 | 2015-12-02T12:12:14.000Z | 2016-01-11T07:33:24.000Z | .workshop/exercises/iex/test/check.exs | silesian-beamers/elixir-from-the-ground-up | 1ad8c2a4d429175461dc45e218849eb6a212c776 | [
"MIT"
] | null | null | null | defmodule Workshop.Exercise.IexCheck do
use Workshop.Validator
end
| 14 | 39 | 0.828571 |
91604c45c28c60770d7eb1eac0dc75cb2bc07080 | 1,669 | ex | Elixir | apps/test_empty_app_web/lib/test_empty_app_web/endpoint.ex | baseballlover723/test_empty_app | fd7046ea8ee88e1c0eefee82fe95aecc7ede3f82 | [
"MIT"
] | null | null | null | apps/test_empty_app_web/lib/test_empty_app_web/endpoint.ex | baseballlover723/test_empty_app | fd7046ea8ee88e1c0eefee82fe95aecc7ede3f82 | [
"MIT"
] | null | null | null | apps/test_empty_app_web/lib/test_empty_app_web/endpoint.ex | baseballlover723/test_empty_app | fd7046ea8ee88e1c0eefee82fe95aecc7ede3f82 | [
"MIT"
] | null | null | null | defmodule TestEmptyAppWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :test_empty_app_web
# 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,
... | 30.345455 | 97 | 0.72858 |
91604ceaa1af32c70e8a35792c50eee5328a110f | 16,196 | ex | Elixir | lib/myxql/protocol.ex | ludwikbukowski/myxql | 51a770a6bf32c0ea0c69307117cfd6e4738d09f6 | [
"Apache-2.0"
] | null | null | null | lib/myxql/protocol.ex | ludwikbukowski/myxql | 51a770a6bf32c0ea0c69307117cfd6e4738d09f6 | [
"Apache-2.0"
] | null | null | null | lib/myxql/protocol.ex | ludwikbukowski/myxql | 51a770a6bf32c0ea0c69307117cfd6e4738d09f6 | [
"Apache-2.0"
] | null | null | null | defmodule MyXQL.Protocol do
@moduledoc false
import MyXQL.Protocol.{Flags, Records, Types}
alias MyXQL.Protocol.Values
use Bitwise
defdelegate error_code_to_name(code), to: MyXQL.Protocol.ServerErrorCodes, as: :code_to_name
# https://dev.mysql.com/doc/internals/en/com-stmt-execute.html
@cursor_types %{... | 29.663004 | 97 | 0.654174 |
91605c517f4abc4226c34490c1cad76a20a4a96a | 48 | ex | Elixir | lib/quaternion.ex | aebarber/quaternion | 1f772dd110db4b12accbe67ac80276d25fcf2fd6 | [
"MIT"
] | null | null | null | lib/quaternion.ex | aebarber/quaternion | 1f772dd110db4b12accbe67ac80276d25fcf2fd6 | [
"MIT"
] | null | null | null | lib/quaternion.ex | aebarber/quaternion | 1f772dd110db4b12accbe67ac80276d25fcf2fd6 | [
"MIT"
] | null | null | null | defmodule Quaternion do
@moduledoc false
end
| 9.6 | 23 | 0.791667 |
91608106ee528861e5c4d4c3fc283d7fa689b622 | 586 | exs | Elixir | elixir/d01.exs | raftario/aoc2020 | 1bd9159514fe9986b332d77ce4e8e00db261ccfd | [
"MIT"
] | null | null | null | elixir/d01.exs | raftario/aoc2020 | 1bd9159514fe9986b332d77ce4e8e00db261ccfd | [
"MIT"
] | null | null | null | elixir/d01.exs | raftario/aoc2020 | 1bd9159514fe9986b332d77ce4e8e00db261ccfd | [
"MIT"
] | null | null | null | defmodule D01 do
def parse_input(input) do
String.split(input, "\n")
|> Stream.filter(fn s -> String.length(s) > 0 end)
|> Stream.map(&Integer.parse/1)
|> Stream.map(fn {n, _} -> n end)
end
def run(input) do
input = Enum.with_index(input)
sp =
for {n1, i1} <- input, {n2, i2} <- inp... | 23.44 | 88 | 0.546075 |
91608e5395ec2ede8e498c40335044caaf49de16 | 619 | ex | Elixir | Microsoft.Azure.Management.EventGrid/lib/microsoft/azure/management/event_grid/model/event_subscription.ex | chgeuer/ex_microsoft_azure_management | 99cd9f7f2ff1fdbe69ca5bac55b6e2af91ba3603 | [
"Apache-2.0"
] | 4 | 2018-09-29T03:43:15.000Z | 2021-04-01T18:30:46.000Z | Microsoft.Azure.Management.EventGrid/lib/microsoft/azure/management/event_grid/model/event_subscription.ex | chgeuer/ex_microsoft_azure_management | 99cd9f7f2ff1fdbe69ca5bac55b6e2af91ba3603 | [
"Apache-2.0"
] | null | null | null | Microsoft.Azure.Management.EventGrid/lib/microsoft/azure/management/event_grid/model/event_subscription.ex | chgeuer/ex_microsoft_azure_management | 99cd9f7f2ff1fdbe69ca5bac55b6e2af91ba3603 | [
"Apache-2.0"
] | null | null | null | # NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
defmodule Microsoft.Azure.Management.EventGrid.Model.EventSubscription do
@moduledoc """
Event Subscription
"""
@derive [Poison.Encoder]
defstruc... | 20.633333 | 92 | 0.678514 |
9160b671ba8c30955bff5eb53cd21b7cfbee2488 | 21,068 | exs | Elixir | test/ecto/changeset/belongs_to_test.exs | tcrossland/ecto | e028a90920fed27865075787d33c2ad61f45fd24 | [
"Apache-2.0"
] | 3,931 | 2016-06-16T11:38:48.000Z | 2022-03-31T21:24:19.000Z | test/ecto/changeset/belongs_to_test.exs | tcrossland/ecto | e028a90920fed27865075787d33c2ad61f45fd24 | [
"Apache-2.0"
] | 2,343 | 2016-06-16T11:18:09.000Z | 2022-03-27T23:44:43.000Z | test/ecto/changeset/belongs_to_test.exs | tcrossland/ecto | e028a90920fed27865075787d33c2ad61f45fd24 | [
"Apache-2.0"
] | 1,300 | 2016-06-17T13:56:59.000Z | 2022-03-31T01:46:20.000Z | defmodule Ecto.Changeset.BelongsToTest do
use ExUnit.Case, async: true
alias Ecto.Changeset
alias Ecto.Changeset.Relation
alias Ecto.TestRepo
alias __MODULE__.Author
alias __MODULE__.Profile
defmodule Author do
use Ecto.Schema
schema "authors" do
field :title, :string
belongs_to :p... | 37.026362 | 115 | 0.6573 |
9160c5dd9643dea342672d39a047190bf2a3150d | 1,149 | exs | Elixir | config/config.exs | daniel-leal/wabanex | c0666de8f663c59ff3861331db5331e143d94b41 | [
"RSA-MD"
] | null | null | null | config/config.exs | daniel-leal/wabanex | c0666de8f663c59ff3861331db5331e143d94b41 | [
"RSA-MD"
] | null | null | null | config/config.exs | daniel-leal/wabanex | c0666de8f663c59ff3861331db5331e143d94b41 | [
"RSA-MD"
] | 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 :wabanex,
ecto_repos: [Wabanex.Repo]
c... | 31.916667 | 86 | 0.768494 |
9160cb0b0a2504201ac92f29aa1e04839c20cc20 | 1,767 | exs | Elixir | test/maxwell/middleware/middleware_test.exs | zhongwencool/maxwell | 0b04ec5d1aafedbeb00a4ec3e683c9b2216b7349 | [
"MIT"
] | 130 | 2016-03-24T02:48:26.000Z | 2021-04-10T19:29:06.000Z | test/maxwell/middleware/middleware_test.exs | zhongwencool/maxwell | 0b04ec5d1aafedbeb00a4ec3e683c9b2216b7349 | [
"MIT"
] | 78 | 2016-06-28T06:33:01.000Z | 2021-12-15T01:37:54.000Z | test/maxwell/middleware/middleware_test.exs | zhongwencool/maxwell | 0b04ec5d1aafedbeb00a4ec3e683c9b2216b7349 | [
"MIT"
] | 24 | 2016-04-09T16:44:19.000Z | 2020-12-01T10:57:22.000Z | defmodule MiddlewareTest do
use ExUnit.Case
defmodule Adapter do
def call(conn) do
conn = %{conn | state: :sent}
body = unless conn.req_body, do: %{}, else: Poison.decode!(conn.req_body)
if Map.equal?(body, %{"key2" => 101, "key1" => 201}) do
%{
conn
| status: 200... | 27.609375 | 95 | 0.587436 |
9160d3e0458eed95e3212aff89e60358f8a0e47c | 2,769 | exs | Elixir | config/runtime.exs | ThanhUong/Chronos | 5e1b0823c585b784f5c51212513d518cab53a571 | [
"MIT"
] | null | null | null | config/runtime.exs | ThanhUong/Chronos | 5e1b0823c585b784f5c51212513d518cab53a571 | [
"MIT"
] | null | null | null | config/runtime.exs | ThanhUong/Chronos | 5e1b0823c585b784f5c51212513d518cab53a571 | [
"MIT"
] | null | null | null | import Config
# config/runtime.exs is executed for all environments, including
# during releases. It is executed after compilation and before the
# system starts, so it is typically used to load production configuration
# and secrets from environment variables or elsewhere. Do not define
# any compile-time configurati... | 38.458333 | 82 | 0.696641 |
9160ec41dee7e49ca1b2d9d5ee9285d24ca881f3 | 12,834 | ex | Elixir | lib/merkel/tree.ex | brpandey/merkel | c295a27476e2d64481bfb343d2e3671ec1680b29 | [
"MIT"
] | 16 | 2018-02-16T23:04:46.000Z | 2022-01-27T08:41:03.000Z | lib/merkel/tree.ex | brpandey/merkel | c295a27476e2d64481bfb343d2e3671ec1680b29 | [
"MIT"
] | 1 | 2018-06-02T08:47:53.000Z | 2020-01-20T03:21:48.000Z | lib/merkel/tree.ex | brpandey/merkel | c295a27476e2d64481bfb343d2e3671ec1680b29 | [
"MIT"
] | 1 | 2019-02-12T13:28:41.000Z | 2019-02-12T13:28:41.000Z | defmodule Merkel.BinaryHashTree do
@moduledoc """
Implements a merkle binary hash tree that is balanced using AVL rotations
Supports create, lookup, keys, insert, delete operations
Given an initial list of k-v pairs constructs an initial balanced
tree without any initial rotations or initial rehashings
K... | 33.162791 | 109 | 0.599268 |
9161363edc0e1007a872f62fa74620e871ea0eba | 490 | ex | Elixir | lib/bitcoin_simulator_web/views/layout_view.ex | sidharth-shridhar/Bitcoin-Miner-Simulation | 2789dc8fe5f65269789540f675fac682e431e518 | [
"MIT"
] | null | null | null | lib/bitcoin_simulator_web/views/layout_view.ex | sidharth-shridhar/Bitcoin-Miner-Simulation | 2789dc8fe5f65269789540f675fac682e431e518 | [
"MIT"
] | null | null | null | lib/bitcoin_simulator_web/views/layout_view.ex | sidharth-shridhar/Bitcoin-Miner-Simulation | 2789dc8fe5f65269789540f675fac682e431e518 | [
"MIT"
] | null | null | null | defmodule BitcoinSimulatorWeb.LayoutView do
use BitcoinSimulatorWeb, :view
alias BitcoinSimulator.Simulation.Monitor
def simulation_started?(), do: GenServer.call(Monitor, :simulation_started?)
def navbar_title(path) do
case path do
"/" ->
"Dashboard"
"/params" ->
"Simulator P... | 20.416667 | 78 | 0.62449 |
916156bfcb097d010e658fd79e381f3328a582f3 | 2,822 | ex | Elixir | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/pricing_schedule_pricing_period.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/pricing_schedule_pricing_period.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/pricing_schedule_pricing_period.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... | 47.830508 | 510 | 0.720057 |
916160d3182ca4ce71b006cac50e001a0b3f1b59 | 2,668 | ex | Elixir | apps/admin_app/lib/admin_app_web/controllers/option_type_controller.ex | Acrecio/avia | 54d264fc179b5b5f17d174854bdca063e1d935e9 | [
"MIT"
] | 456 | 2018-09-20T02:40:59.000Z | 2022-03-07T08:53:48.000Z | apps/admin_app/lib/admin_app_web/controllers/option_type_controller.ex | Acrecio/avia | 54d264fc179b5b5f17d174854bdca063e1d935e9 | [
"MIT"
] | 273 | 2018-09-19T06:43:43.000Z | 2021-08-07T12:58:26.000Z | apps/admin_app/lib/admin_app_web/controllers/option_type_controller.ex | Acrecio/avia | 54d264fc179b5b5f17d174854bdca063e1d935e9 | [
"MIT"
] | 122 | 2018-09-26T16:32:46.000Z | 2022-03-13T11:44:19.000Z | defmodule AdminAppWeb.OptionTypeController do
use AdminAppWeb, :controller
alias Snitch.Data.Model.OptionType, as: OTModel
alias Snitch.Data.Schema.OptionType, as: OTSchema
def index(conn, _params) do
option_types = OTModel.get_all()
render(conn, "index.html", %{option_types: option_types})
end
de... | 31.761905 | 95 | 0.600825 |
91617bdc7757ed6f74e8a050d517036bac335324 | 2,734 | exs | Elixir | test/credo/code/block_test.exs | harlantwood/credo | 4569c9c8cfcf74a2074d6911541da0265e52ae99 | [
"MIT"
] | null | null | null | test/credo/code/block_test.exs | harlantwood/credo | 4569c9c8cfcf74a2074d6911541da0265e52ae99 | [
"MIT"
] | null | null | null | test/credo/code/block_test.exs | harlantwood/credo | 4569c9c8cfcf74a2074d6911541da0265e52ae99 | [
"MIT"
] | null | null | null | defmodule Credo.Code.BlockTest do
use Credo.TestHelper
alias Credo.Code.Block
test "it should return all the blocks" do
{:ok, ast} =
"""
try do
call_in_try
else
call_in_else
rescue
call_in_rescue
after
call_in_after
end
"""
|> C... | 21.698413 | 102 | 0.443672 |
9161edbf485c0730c69adbbea7ef5ea95af97a2e | 1,013 | exs | Elixir | test/fnv_hash_test.exs | kanishka-linux/FnvHash | bfc4fe6c6b70951d859bfd18c2b3c57fa1536dab | [
"MIT"
] | 1 | 2020-01-17T10:54:53.000Z | 2020-01-17T10:54:53.000Z | test/fnv_hash_test.exs | kanishka-linux/FnvHash | bfc4fe6c6b70951d859bfd18c2b3c57fa1536dab | [
"MIT"
] | null | null | null | test/fnv_hash_test.exs | kanishka-linux/FnvHash | bfc4fe6c6b70951d859bfd18c2b3c57fa1536dab | [
"MIT"
] | null | null | null | defmodule FnvHashTest do
use ExUnit.Case
use ExUnitProperties
doctest FnvHash
test "fnv64a for hello.world" do
assert FnvHash.fnv64a("hello.world") == 1_773_339_632_313_245_565
end
test "test whether hash is an integer and check its byte size for random string" do
check all(list <- list_of(string(... | 28.138889 | 85 | 0.635735 |
9161f44f267b3992379e44b90a26a120cefb4013 | 1,292 | ex | Elixir | apps/app2/web/web.ex | jschoch/umb | 98e4ca8b883777c775d2b1115ae5116cc32570fe | [
"MIT"
] | null | null | null | apps/app2/web/web.ex | jschoch/umb | 98e4ca8b883777c775d2b1115ae5116cc32570fe | [
"MIT"
] | null | null | null | apps/app2/web/web.ex | jschoch/umb | 98e4ca8b883777c775d2b1115ae5116cc32570fe | [
"MIT"
] | null | null | null | defmodule App2.Web do
@moduledoc """
A module that keeps using definitions for controllers,
views and so on.
This can be used in your application as:
use App2.Web, :controller
use App2.Web, :view
The definitions below will be executed for every view,
controller, etc, so keep them short and cl... | 19.283582 | 88 | 0.670279 |
9162030e92adeab6725ace3b36ab7ed1b2528eaa | 27,878 | exs | Elixir | apps/omg_child_chain/test/omg_child_chain/ethereum_event_aggregator_test.exs | omgnetwork/omg-childchain-v1 | 1e2313029ece2282c22ce411edc078a17e6bba09 | [
"Apache-2.0"
] | 1 | 2020-10-06T03:07:47.000Z | 2020-10-06T03:07:47.000Z | apps/omg_child_chain/test/omg_child_chain/ethereum_event_aggregator_test.exs | omgnetwork/omg-childchain-v1 | 1e2313029ece2282c22ce411edc078a17e6bba09 | [
"Apache-2.0"
] | 9 | 2020-09-16T15:31:17.000Z | 2021-03-17T07:12:35.000Z | apps/omg_child_chain/test/omg_child_chain/ethereum_event_aggregator_test.exs | omgnetwork/omg-childchain-v1 | 1e2313029ece2282c22ce411edc078a17e6bba09 | [
"Apache-2.0"
] | 1 | 2020-09-30T17:17:27.000Z | 2020-09-30T17:17:27.000Z | # Copyright 2019-2020 OmiseGO Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 50.872263 | 1,616 | 0.708372 |
91621b7fd8550bb9508bc09c2369f93ce32506b9 | 535 | ex | Elixir | lib/rasa_sdk/model/tracker_active_form.ex | henry-hz/rasa-sdk-elixir | 575a57a32b322eb5647bac67bd88e0e03f36685e | [
"Apache-2.0"
] | 3 | 2020-06-18T11:26:33.000Z | 2021-04-19T18:05:42.000Z | lib/rasa_sdk/model/tracker_active_form.ex | henry-hz/rasa-sdk-elixir | 575a57a32b322eb5647bac67bd88e0e03f36685e | [
"Apache-2.0"
] | null | null | null | lib/rasa_sdk/model/tracker_active_form.ex | henry-hz/rasa-sdk-elixir | 575a57a32b322eb5647bac67bd88e0e03f36685e | [
"Apache-2.0"
] | 3 | 2020-06-15T22:16:56.000Z | 2021-02-04T01:10:35.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 RasaSdk.Model.TrackerActiveForm do
@moduledoc """
Name of the active form
"""
@derive [Poison.Encoder]
defstruct [
:name,
:validate... | 19.107143 | 91 | 0.68785 |
91628a26f8a7076eb73472e487d10ece11bc9d0e | 150 | exs | Elixir | apps/crash_dump_1/test/crash_dump_1_test.exs | WhiteRookPL/elixir-fire-brigade-workshop | 1c6183339fc623842a09f4d10be75bcecf2c37e7 | [
"MIT"
] | 14 | 2017-08-09T14:21:47.000Z | 2022-03-11T04:10:49.000Z | apps/crash_dump_1/test/crash_dump_1_test.exs | nicholasjhenry/elixir-fire-brigade-workshop | 1c6183339fc623842a09f4d10be75bcecf2c37e7 | [
"MIT"
] | null | null | null | apps/crash_dump_1/test/crash_dump_1_test.exs | nicholasjhenry/elixir-fire-brigade-workshop | 1c6183339fc623842a09f4d10be75bcecf2c37e7 | [
"MIT"
] | 15 | 2017-09-05T15:43:53.000Z | 2020-04-13T16:20:18.000Z | defmodule CrashDumpTest do
use ExUnit.Case
test "main application should boot up" do
assert {:ok, _} = CrashDump.start(:normal, [])
end
end | 21.428571 | 50 | 0.7 |
916291e3c361f0a473a7b6ec1f9cb53a021138c1 | 76,528 | ex | Elixir | clients/domains/lib/google_api/domains/v1/api/projects.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/domains/lib/google_api/domains/v1/api/projects.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/domains/lib/google_api/domains/v1/api/projects.ex | dazuma/elixir-google-api | 6a9897168008efe07a6081d2326735fe332e522c | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 47.83 | 1,116 | 0.623785 |
9162c639d7e5bbf7a3da64134e73cffa59badfe2 | 83 | exs | Elixir | test/akd/dsl/form_hook_test.exs | corroded/akd | ed15b8929b6d110552a19522f8a17edf75452e87 | [
"MIT"
] | 51 | 2018-01-07T03:41:05.000Z | 2021-06-17T21:39:27.000Z | test/akd/dsl/form_hook_test.exs | corroded/akd | ed15b8929b6d110552a19522f8a17edf75452e87 | [
"MIT"
] | 42 | 2017-12-24T04:36:39.000Z | 2019-05-21T01:32:00.000Z | test/akd/dsl/form_hook_test.exs | corroded/akd | ed15b8929b6d110552a19522f8a17edf75452e87 | [
"MIT"
] | 2 | 2018-06-15T11:46:28.000Z | 2018-08-22T16:03:56.000Z | defmodule Akd.Dsl.FormHookTest do
use ExUnit.Case
doctest Akd.Dsl.FormHook
end
| 16.6 | 33 | 0.795181 |
9162fac20f7b17441471393586dffae4cfcf60cb | 39,752 | ex | Elixir | lib/mix/lib/mix/tasks/release.ex | Stratus3D/elixir | cef19c9365a93f96436229c244c32977462fb0c7 | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/tasks/release.ex | Stratus3D/elixir | cef19c9365a93f96436229c244c32977462fb0c7 | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/tasks/release.ex | Stratus3D/elixir | cef19c9365a93f96436229c244c32977462fb0c7 | [
"Apache-2.0"
] | null | null | null | defmodule Mix.Tasks.Release do
@moduledoc """
Assembles a release for the current project:
MIX_ENV=prod mix release
MIX_ENV=prod mix release NAME
Once a release is assembled, it can be packaged and deployed to a
target, as long as the target runs on the same operating system (OS)
distribution an... | 34.870175 | 165 | 0.671186 |
916317ad821eafc7c324e46fbbe55138ef052b55 | 7,053 | exs | Elixir | .credo.exs | jdav-dev/estated | a8476b803eff425b5b73517e7ea180bb7f8cc30b | [
"Apache-2.0"
] | null | null | null | .credo.exs | jdav-dev/estated | a8476b803eff425b5b73517e7ea180bb7f8cc30b | [
"Apache-2.0"
] | null | null | null | .credo.exs | jdav-dev/estated | a8476b803eff425b5b73517e7ea180bb7f8cc30b | [
"Apache-2.0"
] | null | null | null | # This file contains the configuration for Credo and you are probably reading
# this after creating it with `mix credo.gen.config`.
#
# If you find anything wrong or unclear in this file, please report an
# issue on GitHub: https://github.com/rrrene/credo/issues
#
%{
#
# You can have as many configs as you like in ... | 37.919355 | 97 | 0.60258 |
91631c1c493fd8aac1669affade8d5355a25d635 | 114 | exs | Elixir | test/seshat_test.exs | camshaft/seshat | 96aae0d3bc06c4652b1119dfc24a59f1fc297462 | [
"MIT"
] | null | null | null | test/seshat_test.exs | camshaft/seshat | 96aae0d3bc06c4652b1119dfc24a59f1fc297462 | [
"MIT"
] | null | null | null | test/seshat_test.exs | camshaft/seshat | 96aae0d3bc06c4652b1119dfc24a59f1fc297462 | [
"MIT"
] | null | null | null | defmodule SeshatTest do
use ExUnit.Case
doctest Seshat
test "the truth" do
assert 1 + 1 == 2
end
end
| 12.666667 | 23 | 0.666667 |
91631c6c12e97a5a2b09dcfb7d870f4ba176e898 | 1,385 | ex | Elixir | lib/shikoba_web/router.ex | vertico/vertico-test | af68000ff99450cf5686d7c5b803931f267c8e19 | [
"MIT"
] | 3 | 2021-11-23T23:07:34.000Z | 2021-11-24T01:40:01.000Z | lib/shikoba_web/router.ex | vertico/vertico-test | af68000ff99450cf5686d7c5b803931f267c8e19 | [
"MIT"
] | null | null | null | lib/shikoba_web/router.ex | vertico/vertico-test | af68000ff99450cf5686d7c5b803931f267c8e19 | [
"MIT"
] | 1 | 2021-07-19T11:48:30.000Z | 2021-07-19T11:48:30.000Z | defmodule ShikobaWeb.Router do
use ShikobaWeb, :router
use Plug.ErrorHandler
import Phoenix.LiveDashboard.Router
pipeline :api do
plug :accepts, ["json"]
end
pipeline :graphql do
plug ShikobaWeb.AbsintheContext
end
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
... | 20.072464 | 69 | 0.696751 |
916326e132a5f704cd403cbecccf70c6bef3d154 | 400 | exs | Elixir | test/elixir_bank_web/views/error_view_test.exs | spacexcorp/elixir-bank | b5cf0592598da469e3c2eb43befeb0a45592ad0a | [
"MIT"
] | null | null | null | test/elixir_bank_web/views/error_view_test.exs | spacexcorp/elixir-bank | b5cf0592598da469e3c2eb43befeb0a45592ad0a | [
"MIT"
] | null | null | null | test/elixir_bank_web/views/error_view_test.exs | spacexcorp/elixir-bank | b5cf0592598da469e3c2eb43befeb0a45592ad0a | [
"MIT"
] | null | null | null | defmodule ElixirBankWeb.ErrorViewTest do
use ElixirBankWeb.ConnCase, async: true
import Phoenix.View
test "should renders 404.json" do
assert render(ElixirBankWeb.ErrorView, "404.json", []) == %{errors: %{detail: "Not Found"}}
end
test "should renders 500.json" do
assert render(ElixirBankWeb.ErrorV... | 28.571429 | 107 | 0.7025 |
91632a91c4772e5a8ee2223f859bb29968798cbd | 495 | ex | Elixir | web/views/currency_view.ex | blacksph3re/alastair3 | d6064e322b8ef5c6eb8da59a080852179a71b9d5 | [
"Apache-2.0"
] | null | null | null | web/views/currency_view.ex | blacksph3re/alastair3 | d6064e322b8ef5c6eb8da59a080852179a71b9d5 | [
"Apache-2.0"
] | null | null | null | web/views/currency_view.ex | blacksph3re/alastair3 | d6064e322b8ef5c6eb8da59a080852179a71b9d5 | [
"Apache-2.0"
] | 1 | 2017-12-15T15:49:16.000Z | 2017-12-15T15:49:16.000Z | defmodule Alastair.CurrencyView do
use Alastair.Web, :view
def render("index.json", %{currencies: currencies}) do
%{data: render_many(currencies, Alastair.CurrencyView, "currency.json")}
end
def render("show.json", %{currency: currency}) do
%{data: render_one(currency, Alastair.CurrencyView, "currency... | 27.5 | 76 | 0.69899 |
91634515f78d08e54bd0eddea2ad56023b152a45 | 180 | exs | Elixir | priv/repo/migrations/20200709182626_users_add_first_name_column.exs | jordyvanvorselen/leaderboards | 0087c756a157f0e9ccbee3ec02a21d0c813e40a9 | [
"MIT"
] | null | null | null | priv/repo/migrations/20200709182626_users_add_first_name_column.exs | jordyvanvorselen/leaderboards | 0087c756a157f0e9ccbee3ec02a21d0c813e40a9 | [
"MIT"
] | null | null | null | priv/repo/migrations/20200709182626_users_add_first_name_column.exs | jordyvanvorselen/leaderboards | 0087c756a157f0e9ccbee3ec02a21d0c813e40a9 | [
"MIT"
] | null | null | null | defmodule Leaderboards.Repo.Migrations.UsersAddFirstNameColumn do
use Ecto.Migration
def change do
alter table(:users) do
add :first_name, :string
end
end
end
| 18 | 65 | 0.733333 |
91634c6051161a3f6f75301623b84513d6545098 | 866 | ex | Elixir | lib/fiet/atom/link.ex | qcam/fiet | 956259c8d03500aec05e92e1f6d38e5fbfdd1163 | [
"MIT"
] | 20 | 2018-04-03T09:35:15.000Z | 2021-09-23T08:41:26.000Z | lib/fiet/atom/link.ex | qcam/viet | 956259c8d03500aec05e92e1f6d38e5fbfdd1163 | [
"MIT"
] | 6 | 2018-06-01T07:28:05.000Z | 2020-02-23T18:39:56.000Z | lib/fiet/atom/link.ex | qcam/viet | 956259c8d03500aec05e92e1f6d38e5fbfdd1163 | [
"MIT"
] | 6 | 2018-05-31T08:29:27.000Z | 2021-09-24T01:27:23.000Z | defmodule Fiet.Atom.Link do
@type t :: %__MODULE__{
href: binary | nil,
rel: binary | nil,
type: binary | nil,
href_lang: binary | nil,
title: binary | nil,
length: binary | nil
}
defstruct [:href, :rel, :type, :href_lang, :title, :length]
def ... | 29.862069 | 61 | 0.622402 |
916352c5cec39aedecb716a12eb12c1b8f8ee8fa | 5,889 | exs | Elixir | .credo.exs | infinity-aps/pummpcomm | 7380585ecd110ab1c19d2aea3880e51e3f433050 | [
"MIT"
] | 15 | 2017-08-31T00:58:47.000Z | 2020-01-12T03:53:13.000Z | .credo.exs | vladhj38/pummpcomm | 7380585ecd110ab1c19d2aea3880e51e3f433050 | [
"MIT"
] | 1 | 2017-09-15T02:09:31.000Z | 2017-09-15T02:09:31.000Z | .credo.exs | vladhj38/pummpcomm | 7380585ecd110ab1c19d2aea3880e51e3f433050 | [
"MIT"
] | 3 | 2017-09-10T17:24:59.000Z | 2019-09-10T19:41:49.000Z | # This file contains the configuration for Credo and you are probably reading
# this after creating it with `mix credo.gen.config`.
#
# If you find anything wrong or unclear in this file, please report an
# issue on GitHub: https://github.com/rrrene/credo/issues
#
%{
#
# You can have as many configs as you like in ... | 40.335616 | 81 | 0.65478 |
9163e7a26cd3b7c29b7d895a8f03664e83172e76 | 18,251 | exs | Elixir | test/sitemap/builders_url_test.exs | nicocaille/sitemap | 2791ce87038baf622d67899f5b87b64226f954c2 | [
"MIT"
] | null | null | null | test/sitemap/builders_url_test.exs | nicocaille/sitemap | 2791ce87038baf622d67899f5b87b64226f954c2 | [
"MIT"
] | null | null | null | test/sitemap/builders_url_test.exs | nicocaille/sitemap | 2791ce87038baf622d67899f5b87b64226f954c2 | [
"MIT"
] | null | null | null | Code.require_file "../../test_helper.exs", __ENV__.file
defmodule Sitemap.BuildersUrlTest do
use ExUnit.Case
alias Sitemap.Builders.Url
import SweetXml
require XmlBuilder
setup do
Sitemap.Builders.File.finalize_state
Sitemap.Builders.Indexfile.finalize_state
Sitemap.Namer.finalize_state :file
... | 42.052995 | 224 | 0.622541 |
916408f1b84141f246479185e79f468bdc2581cb | 2,323 | ex | Elixir | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v2beta1/model/bid_response_without_bids_status_row.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v2beta1/model/bid_response_without_bids_status_row.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v2beta1/model/bid_response_without_bids_status_row.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... | 43.018519 | 150 | 0.779595 |
91641b29df00b71016104b1708aea9d8d04539b5 | 21,209 | ex | Elixir | lib/elixir/lib/map.ex | TurtleAI/elixir | 2fb41ebef4d06315dd6c05ee00899572b27ee50a | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/map.ex | TurtleAI/elixir | 2fb41ebef4d06315dd6c05ee00899572b27ee50a | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/map.ex | TurtleAI/elixir | 2fb41ebef4d06315dd6c05ee00899572b27ee50a | [
"Apache-2.0"
] | null | null | null | defmodule Map do
@moduledoc """
A set of functions for working with maps.
Maps are the "go to" key-value data structure in Elixir. Maps can be created
with the `%{}` syntax, and key-value pairs can be expressed as `key => value`:
iex> %{}
%{}
iex> %{"one" => :two, 3 => "four"}
%{3 => "... | 26.445137 | 102 | 0.574615 |
916452bfe61af915749ee95986650bd78f9ab9c0 | 2,203 | ex | Elixir | lib/nerves_runtime/application.ex | mnishiguchi/nerves_runtime | 8216010b1f4344cd198d0f1a45e37f4be3aaf993 | [
"Apache-2.0"
] | 49 | 2017-03-02T03:38:32.000Z | 2022-02-24T12:11:40.000Z | lib/nerves_runtime/application.ex | mnishiguchi/nerves_runtime | 8216010b1f4344cd198d0f1a45e37f4be3aaf993 | [
"Apache-2.0"
] | 83 | 2017-03-09T09:09:14.000Z | 2022-02-09T11:13:27.000Z | lib/nerves_runtime/application.ex | mnishiguchi/nerves_runtime | 8216010b1f4344cd198d0f1a45e37f4be3aaf993 | [
"Apache-2.0"
] | 21 | 2017-02-28T16:55:32.000Z | 2021-07-29T15:54:13.000Z | defmodule Nerves.Runtime.Application do
@moduledoc false
use Application
require Logger
alias Nerves.Runtime.{Init, Kernel, KV}
alias Nerves.Runtime.Log.{KmsgTailer, SyslogTailer}
@impl Application
def start(_type, _args) do
target = Nerves.Runtime.target()
load_services(target)
children ... | 24.752809 | 85 | 0.648207 |
916473b39d76ee867bdf3ad3060b41592b126c6e | 1,023 | ex | Elixir | backend/lib/backend/application.ex | ericgroom/gatorgoods | c78af60f463c6c8c6762101a2d8e7102d43bd804 | [
"MIT"
] | 3 | 2018-03-16T06:26:39.000Z | 2019-12-17T19:30:24.000Z | backend/lib/backend/application.ex | s6o/elm-msgpack | 71e095eed28ae9803be6cb22f7ccc9f82d717c3d | [
"MIT"
] | 9 | 2020-02-12T00:40:03.000Z | 2021-12-09T01:11:33.000Z | backend/lib/backend/application.ex | s6o/elm-msgpack | 71e095eed28ae9803be6cb22f7ccc9f82d717c3d | [
"MIT"
] | null | null | null | defmodule Backend.Application do
use Application
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
def start(_type, _args) do
import Supervisor.Spec
# Define workers and child supervisors to be supervised
children = [
# Start the Ecto repository
... | 31.96875 | 85 | 0.713587 |
9164bf51ccdc41f41a1b5862dca7a540a396a51a | 1,816 | exs | Elixir | test/json_schema_test_suite/draft6/optional/format/hostname_test.exs | hrzndhrn/json_xema | 955eab7b0919d144b38364164d90275201c89474 | [
"MIT"
] | 54 | 2019-03-10T19:51:07.000Z | 2021-12-23T07:31:09.000Z | test/json_schema_test_suite/draft6/optional/format/hostname_test.exs | hrzndhrn/json_xema | 955eab7b0919d144b38364164d90275201c89474 | [
"MIT"
] | 36 | 2018-05-20T09:13:20.000Z | 2021-03-14T15:22:03.000Z | test/json_schema_test_suite/draft6/optional/format/hostname_test.exs | hrzndhrn/json_xema | 955eab7b0919d144b38364164d90275201c89474 | [
"MIT"
] | 3 | 2019-04-12T09:08:51.000Z | 2019-12-04T01:23:56.000Z | defmodule JsonSchemaTestSuite.Draft6.Optional.Format.HostnameTest do
use ExUnit.Case
import JsonXema, only: [valid?: 2]
describe ~s|validation of host names| do
setup do
%{schema: JsonXema.new(%{"format" => "hostname"})}
end
test ~s|a valid host name|, %{schema: schema} do
assert valid?... | 29.290323 | 108 | 0.646476 |
9164cc2d331608ffe82734776220e29897d96a83 | 4,301 | ex | Elixir | lib/mix/new.ex | szTheory/gringotts | 706774d31a94ce173679f3b91b0feaad0739d006 | [
"MIT"
] | 454 | 2017-12-19T07:03:51.000Z | 2022-03-29T00:52:31.000Z | lib/mix/new.ex | szTheory/gringotts | 706774d31a94ce173679f3b91b0feaad0739d006 | [
"MIT"
] | 140 | 2017-12-19T07:23:36.000Z | 2021-02-13T18:08:58.000Z | lib/mix/new.ex | szTheory/gringotts | 706774d31a94ce173679f3b91b0feaad0739d006 | [
"MIT"
] | 57 | 2017-12-21T18:21:32.000Z | 2021-08-15T13:50:38.000Z | defmodule Mix.Tasks.Gringotts.New do
@shortdoc """
Generates a barebones implementation for a gateway.
"""
@moduledoc """
Generates a barebones implementation for a gateway.
It expects the (brand) name of the gateway as argument and we recommend that
it be capitalized. *This will not necessarily be the ... | 27.928571 | 92 | 0.633341 |
9164db1823c347e9ba9ae4e3c04a2953d506759e | 1,417 | exs | Elixir | alcarin_api/apps/alcarin_web/test/alcarin_web/channels/character_feed_channel_test.exs | alcarin-org/alcarin-elixir | a04d4e043790a7773745e0fba7098e1c06362896 | [
"MIT"
] | null | null | null | alcarin_api/apps/alcarin_web/test/alcarin_web/channels/character_feed_channel_test.exs | alcarin-org/alcarin-elixir | a04d4e043790a7773745e0fba7098e1c06362896 | [
"MIT"
] | 3 | 2018-05-26T10:36:22.000Z | 2018-05-26T13:48:36.000Z | alcarin_api/apps/alcarin_web/test/alcarin_web/channels/character_feed_channel_test.exs | alcarin-org/alcarin-elixir | a04d4e043790a7773745e0fba7098e1c06362896 | [
"MIT"
] | null | null | null | defmodule AlcarinWeb.CharacterFeedChannelTest do
use AlcarinWeb.ChannelCase
import AlcarinWeb.RandomCase
alias AlcarinWeb.CharacterFeedChannel
test "character feed for specific user should be unauthorized for now" do
join_reply =
socket("feed_socket", %{})
|> subscribe_and_join(CharacterFeedCh... | 33.738095 | 93 | 0.666196 |
9164f3624033a843b2ff1f4739aeb148f23a0be5 | 1,687 | ex | Elixir | lib/auto_api/capabilities/theft_alarm_capability.ex | nonninz/auto-api-elixir | 53e11542043285e94bbb5a0a3b8ffff0b1b47167 | [
"MIT"
] | null | null | null | lib/auto_api/capabilities/theft_alarm_capability.ex | nonninz/auto-api-elixir | 53e11542043285e94bbb5a0a3b8ffff0b1b47167 | [
"MIT"
] | null | null | null | lib/auto_api/capabilities/theft_alarm_capability.ex | nonninz/auto-api-elixir | 53e11542043285e94bbb5a0a3b8ffff0b1b47167 | [
"MIT"
] | null | null | null | # AutoAPI
# The MIT License
#
# Copyright (c) 2018- High-Mobility GmbH (https://high-mobility.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without lim... | 37.488889 | 79 | 0.743331 |
9165029eb0ff3e6f5abc9cef5ea6e2d048631904 | 823 | ex | Elixir | lib/rocketpay_web/views/accounts_view.ex | luigiMinardi/nlw-4 | 944a90ca2f858d60172ceb2fd52a645d108b4ef5 | [
"MIT"
] | null | null | null | lib/rocketpay_web/views/accounts_view.ex | luigiMinardi/nlw-4 | 944a90ca2f858d60172ceb2fd52a645d108b4ef5 | [
"MIT"
] | null | null | null | lib/rocketpay_web/views/accounts_view.ex | luigiMinardi/nlw-4 | 944a90ca2f858d60172ceb2fd52a645d108b4ef5 | [
"MIT"
] | null | null | null | defmodule RocketpayWeb.AccountsView do
alias Rocketpay.Account
alias Rocketpay.Accounts.Transactions.Response, as: TransactionResponse
def render("update.json", %{account: %Account{id: account_id, balance: balance}}) do
%{
message: "Ballance changed successfully",
account: %{
id: account... | 23.514286 | 94 | 0.611179 |
916508af1d4a77ea8cf29d917283d2f73c718135 | 212 | exs | Elixir | priv/repo/migrations/20180525055928_create_photo.exs | evliang/photoshare | 9ae1cdc4fc7b7ec8ef1361a292e2eb63c69e0327 | [
"MIT"
] | null | null | null | priv/repo/migrations/20180525055928_create_photo.exs | evliang/photoshare | 9ae1cdc4fc7b7ec8ef1361a292e2eb63c69e0327 | [
"MIT"
] | null | null | null | priv/repo/migrations/20180525055928_create_photo.exs | evliang/photoshare | 9ae1cdc4fc7b7ec8ef1361a292e2eb63c69e0327 | [
"MIT"
] | null | null | null | defmodule Photoshare.Repo.Migrations.CreatePhoto do
use Ecto.Migration
def change do
create table(:photos) do
add :filename, :string
add :path, :string
timestamps()
end
end
end
| 15.142857 | 51 | 0.665094 |
91653a012eafc4523684be9bfb5a04f65c946444 | 7,315 | exs | Elixir | test/mixer/clip_preventing_adder_test.exs | membraneframework/membrane_audio_mix_plugin | 4edcac7f5a0e7b015161a311eafd13016cd107cc | [
"Apache-2.0"
] | null | null | null | test/mixer/clip_preventing_adder_test.exs | membraneframework/membrane_audio_mix_plugin | 4edcac7f5a0e7b015161a311eafd13016cd107cc | [
"Apache-2.0"
] | 1 | 2021-12-07T12:04:15.000Z | 2021-12-07T12:04:15.000Z | test/mixer/clip_preventing_adder_test.exs | membraneframework/membrane_audio_mixer_plugin | 4edcac7f5a0e7b015161a311eafd13016cd107cc | [
"Apache-2.0"
] | null | null | null | defmodule Membrane.AudioMixer.ClipPreventingAdderTest do
@moduledoc false
use ExUnit.Case, async: true
import Membrane.AudioMixer.ClipPreventingAdder
require Membrane.Logger
alias Membrane.AudioMix.TestHelper
alias Membrane.AudioMixer.ClipPreventingAdder
alias Membrane.Caps.Audio.Raw
defp test_for_... | 26.218638 | 94 | 0.532468 |
91654d263be79e85da8b4f8e628a72f076a59140 | 3,587 | exs | Elixir | mix.exs | drj17/accent | 25b42dff1f9051e0a42ed7135890a9f740c65026 | [
"BSD-3-Clause"
] | null | null | null | mix.exs | drj17/accent | 25b42dff1f9051e0a42ed7135890a9f740c65026 | [
"BSD-3-Clause"
] | null | null | null | mix.exs | drj17/accent | 25b42dff1f9051e0a42ed7135890a9f740c65026 | [
"BSD-3-Clause"
] | null | null | null | defmodule Accent.Mixfile do
use Mix.Project
@version "1.6.2"
def project do
[
app: :accent,
version: @version,
elixir: "~> 1.10",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: extra_compilers(Mix.env()) ++ Mix.compilers(),
build_embedded: Mix.env() == :prod,
s... | 26.57037 | 100 | 0.514915 |
916563ceb55ff1da6df98ad823580eb6d72068c4 | 1,592 | ex | Elixir | apps/gullintanni/lib/gullintanni/config.ex | gullintanni/gullintanni | 63c58b7ea438a4c6885a13842d8e33d3b1273ced | [
"0BSD"
] | 15 | 2016-08-09T21:27:54.000Z | 2020-12-03T11:21:10.000Z | apps/gullintanni/lib/gullintanni/config.ex | gullintanni/gullintanni | 63c58b7ea438a4c6885a13842d8e33d3b1273ced | [
"0BSD"
] | 15 | 2016-08-04T21:11:05.000Z | 2017-08-02T17:46:17.000Z | apps/gullintanni/lib/gullintanni/config.ex | gullintanni/gullintanni | 63c58b7ea438a4c6885a13842d8e33d3b1273ced | [
"0BSD"
] | null | null | null | defmodule Gullintanni.Config do
@moduledoc """
Utility module for dealing with application configuration settings.
"""
require Logger
@typedoc "The configuration settings type"
@type t :: Keyword.t
@doc """
Returns `true` if all of the `keys` are present in the `config`, otherwise
`false`.
Logs ... | 24.875 | 79 | 0.650126 |
9165ab0645e6ae753dd60da09ff9abc3d91a70d2 | 2,575 | ex | Elixir | lib/web/controllers/analytics_controller.ex | smartlogic/Challenge_gov | b4203d1fcfb742dd17ecfadb9e9c56ad836d4254 | [
"CC0-1.0"
] | null | null | null | lib/web/controllers/analytics_controller.ex | smartlogic/Challenge_gov | b4203d1fcfb742dd17ecfadb9e9c56ad836d4254 | [
"CC0-1.0"
] | null | null | null | lib/web/controllers/analytics_controller.ex | smartlogic/Challenge_gov | b4203d1fcfb742dd17ecfadb9e9c56ad836d4254 | [
"CC0-1.0"
] | null | null | null | defmodule Web.AnalyticsController do
use Web, :controller
alias ChallengeGov.Agencies
alias ChallengeGov.Analytics
plug(Web.Plugs.EnsureRole, [:super_admin, :admin])
def index(conn, params) do
%{current_user: user} = conn.assigns
filter = Map.get(params, "filter", %{})
year_filter =
Map... | 36.267606 | 85 | 0.751068 |
9165bc9ec69e496cbcaf5439ec4947474e06af8b | 7,094 | exs | Elixir | test/name_of_person_test.exs | acoustep/name_of_person | 502848acc93f1fc4c11ff5b061df723a7b014c06 | [
"MIT"
] | null | null | null | test/name_of_person_test.exs | acoustep/name_of_person | 502848acc93f1fc4c11ff5b061df723a7b014c06 | [
"MIT"
] | null | null | null | test/name_of_person_test.exs | acoustep/name_of_person | 502848acc93f1fc4c11ff5b061df723a7b014c06 | [
"MIT"
] | 1 | 2019-10-05T10:03:24.000Z | 2019-10-05T10:03:24.000Z | defmodule NameOfPersonTest do
use ExUnit.Case
doctest NameOfPerson
doctest NameOfPerson.PersonName
test "first name" do
assert NameOfPerson.PersonName.first(%NameOfPerson.PersonName{
first_name: "John",
middle_name: "Blank",
last_name: "Smith"
}) == "John"
... | 36.756477 | 98 | 0.615873 |
9165ee6ac872f203ddb97456267c74cbd7c00853 | 1,546 | ex | Elixir | apps/engine/lib/engine/db/block/block_query.ex | omgnetwork/omg-childchain-v2 | 31cc9cf9e42718fc3b9bd6668f24a627cac80b4f | [
"Apache-2.0"
] | 4 | 2020-11-30T17:38:57.000Z | 2021-01-23T21:29:41.000Z | apps/engine/lib/engine/db/block/block_query.ex | omgnetwork/omg-childchain-v2 | 31cc9cf9e42718fc3b9bd6668f24a627cac80b4f | [
"Apache-2.0"
] | 24 | 2020-11-30T17:32:48.000Z | 2021-02-22T06:25:22.000Z | apps/engine/lib/engine/db/block/block_query.ex | omgnetwork/omg-childchain-v2 | 31cc9cf9e42718fc3b9bd6668f24a627cac80b4f | [
"Apache-2.0"
] | null | null | null | defmodule Engine.DB.Block.BlockQuery do
@moduledoc """
Queries related to transactions
"""
import Ecto.Query, only: [from: 2]
alias Engine.DB.Block
@doc """
Query all transactions that have not been formed into a block.
"""
def select_forming_block_for_update() do
forming = Block.state_forming(... | 27.607143 | 91 | 0.69599 |
9165f1c2bc0493bf1dd1282c76905105194ea6f5 | 1,795 | exs | Elixir | installer/templates/phx_umbrella/apps/app_name_web/mix.exs | mirego/phoenix | 5871888b77b9d34f9a4a33a3644b87f91c8b30ed | [
"MIT"
] | null | null | null | installer/templates/phx_umbrella/apps/app_name_web/mix.exs | mirego/phoenix | 5871888b77b9d34f9a4a33a3644b87f91c8b30ed | [
"MIT"
] | null | null | null | installer/templates/phx_umbrella/apps/app_name_web/mix.exs | mirego/phoenix | 5871888b77b9d34f9a4a33a3644b87f91c8b30ed | [
"MIT"
] | null | null | null | defmodule <%= web_namespace %>.MixProject do
use Mix.Project
def project do
[
app: :<%= web_app_name %>,
version: "0.1.0",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixir: "~> 1.5",
e... | 29.916667 | 85 | 0.573259 |
91661b192b10e1628b9081d33a7a801851e756ad | 651 | exs | Elixir | test/changelog_web/views/podcast_view_test.exs | wojtekmach/changelog.com | d4a8a7703c5f07a3da63bffd770f4642488cf8fd | [
"MIT"
] | null | null | null | test/changelog_web/views/podcast_view_test.exs | wojtekmach/changelog.com | d4a8a7703c5f07a3da63bffd770f4642488cf8fd | [
"MIT"
] | null | null | null | test/changelog_web/views/podcast_view_test.exs | wojtekmach/changelog.com | d4a8a7703c5f07a3da63bffd770f4642488cf8fd | [
"MIT"
] | null | null | null | defmodule ChangelogWeb.PodcastViewTest do
use ChangelogWeb.ConnCase, async: true
import ChangelogWeb.PodcastView
describe "subscribe_on_overcast_url" do
test "reformats the Apple URL as necessary" do
p = build(:podcast, apple_url: "https://itunes.apple.com/us/podcast/the-changelog/id341623264")
... | 32.55 | 101 | 0.731183 |
916641fa249cb67b028e0912515a4b0ca4f9369c | 705 | ex | Elixir | lib/mix/tasks/server.ex | DefactoSoftware/oauth_mock_server | 47aad87eb19dff448f07cf84f9a6c90982d24c1e | [
"MIT"
] | null | null | null | lib/mix/tasks/server.ex | DefactoSoftware/oauth_mock_server | 47aad87eb19dff448f07cf84f9a6c90982d24c1e | [
"MIT"
] | null | null | null | lib/mix/tasks/server.ex | DefactoSoftware/oauth_mock_server | 47aad87eb19dff448f07cf84f9a6c90982d24c1e | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.Server do
@shortdoc "Starts the mock server"
@moduledoc false
use Mix.Task
alias Mix.Tasks.Run, as: MixTask
@doc false
def run(args) do
port = Application.get_env(:oauth_mock_server, :port, 54_345)
{:ok, _} = Application.ensure_all_started(:logger)
{:ok, _} = Application.... | 22.03125 | 65 | 0.685106 |
916668646fc77b53137f7cc25508660a151e2972 | 2,368 | exs | Elixir | mix.exs | lessless/distillery | e0c4d2fabb1821ab2ebc6380d557fd6e0c739be5 | [
"MIT"
] | null | null | null | mix.exs | lessless/distillery | e0c4d2fabb1821ab2ebc6380d557fd6e0c739be5 | [
"MIT"
] | null | null | null | mix.exs | lessless/distillery | e0c4d2fabb1821ab2ebc6380d557fd6e0c739be5 | [
"MIT"
] | null | null | null | defmodule Distillery.Mixfile do
use Mix.Project
def project do
[
app: :distillery,
version: "2.0.0-rc.11",
elixir: "~> 1.6",
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
deps: deps(),
description: description(),
package: package(),
... | 24.926316 | 86 | 0.550253 |
91666eab27dc1009485f2ee74948fce4f6422758 | 2,420 | ex | Elixir | lib/ex_oauth2_provider/mixin/scopes.ex | aidanranney/ex_oauth2_provider | b6ab9c37d39430cd220b2be9794502111c05585c | [
"MIT"
] | 161 | 2017-02-27T19:29:17.000Z | 2021-12-22T12:29:14.000Z | lib/ex_oauth2_provider/mixin/scopes.ex | lawalalao/ex_oauth2_provider | 093cc3b289a45e6aeac6205d40b632c0a0af8b3c | [
"MIT"
] | 54 | 2017-03-23T21:05:03.000Z | 2022-02-22T00:16:59.000Z | lib/ex_oauth2_provider/mixin/scopes.ex | lawalalao/ex_oauth2_provider | 093cc3b289a45e6aeac6205d40b632c0a0af8b3c | [
"MIT"
] | 49 | 2017-02-26T22:38:34.000Z | 2022-03-07T19:17:03.000Z | defmodule ExOauth2Provider.Mixin.Scopes do
@moduledoc false
alias ExOauth2Provider.{Config, Scopes}
alias Ecto.Changeset
@spec put_scopes(Changeset.t(), binary() | nil, keyword()) :: Changeset.t()
def put_scopes(changeset, "", config), do: put_scopes(changeset, nil, config)
def put_scopes(changeset, defaul... | 35.072464 | 112 | 0.721901 |
91669564631f2dd5496f2fb8dd6cd38a8a2a48ac | 2,308 | ex | Elixir | lib/futaba_web.ex | sean-clayton/futaba | b7cdcb0ce4192f52a631f581ddee5a4f1c8fcd4a | [
"Unlicense"
] | null | null | null | lib/futaba_web.ex | sean-clayton/futaba | b7cdcb0ce4192f52a631f581ddee5a4f1c8fcd4a | [
"Unlicense"
] | null | null | null | lib/futaba_web.ex | sean-clayton/futaba | b7cdcb0ce4192f52a631f581ddee5a4f1c8fcd4a | [
"Unlicense"
] | null | null | null | defmodule FutabaWeb do
@moduledoc """
The entrypoint for defining your web interface, such
as controllers, views, channels and so on.
This can be used in your application as:
use FutabaWeb, :controller
use FutabaWeb, :view
The definitions below will be executed for every view,
controller, etc... | 22.407767 | 78 | 0.680243 |
9166b2fde8a2e32c745a48237b40036399f8acbd | 1,137 | exs | Elixir | clients/testing/config/config.exs | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/testing/config/config.exs | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/testing/config/config.exs | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"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.677419 | 73 | 0.755497 |
9166babf514f60ab3ed1db7a8737db47d65df6ff | 2,682 | ex | Elixir | lib/statistics/distributions/t.ex | alanvardy/elixir-statistics | 21a923bbf84a3e71a133868abe5d3610864b130e | [
"Apache-2.0"
] | 118 | 2015-03-31T18:57:57.000Z | 2022-02-25T18:14:06.000Z | lib/statistics/distributions/t.ex | alanvardy/elixir-statistics | 21a923bbf84a3e71a133868abe5d3610864b130e | [
"Apache-2.0"
] | 13 | 2015-08-10T14:28:27.000Z | 2021-11-23T06:44:40.000Z | lib/statistics/distributions/t.ex | alanvardy/elixir-statistics | 21a923bbf84a3e71a133868abe5d3610864b130e | [
"Apache-2.0"
] | 32 | 2015-06-01T01:50:20.000Z | 2021-11-19T16:00:44.000Z | defmodule Statistics.Distributions.T do
alias Statistics.Math
alias Statistics.Math.Functions
@moduledoc """
Student's t distribution.
This distribution is always centered around 0.0 and allows a *degrees of freedom* parameter.
"""
@doc """
The probability density function
## Examples
iex> ... | 23.946429 | 95 | 0.634228 |
9166c395aacf72b8af4da4770cbed250baa13ccb | 628 | ex | Elixir | lib/conduit/blog/commands/create_author.ex | rudyyazdi/conduit | 8defa60962482fb81f5093ea5d58b71a160db3c4 | [
"MIT"
] | null | null | null | lib/conduit/blog/commands/create_author.ex | rudyyazdi/conduit | 8defa60962482fb81f5093ea5d58b71a160db3c4 | [
"MIT"
] | 2 | 2022-01-15T02:09:30.000Z | 2022-01-22T10:18:43.000Z | lib/conduit/blog/commands/create_author.ex | rudyyazdi/conduit | 8defa60962482fb81f5093ea5d58b71a160db3c4 | [
"MIT"
] | null | null | null | defmodule Conduit.Blog.Commands.CreateAuthor do
defstruct [
author_uuid: "",
user_uuid: "",
username: "",
]
use ExConstructor
use Vex.Struct
alias Conduit.Blog.Commands.CreateAuthor
validates :author_uuid, uuid: true
validates :user_uuid, uuid: true
validates :username,
presence: [m... | 21.655172 | 95 | 0.675159 |
9166d88863b2e03200eb4eeee2cad5175e4bd247 | 1,038 | ex | Elixir | songrep/test/support/conn_case.ex | Galanda/Songrep | a533cbd14f3f9625cc54d358c27fcac16d9e96c0 | [
"MIT"
] | null | null | null | songrep/test/support/conn_case.ex | Galanda/Songrep | a533cbd14f3f9625cc54d358c27fcac16d9e96c0 | [
"MIT"
] | null | null | null | songrep/test/support/conn_case.ex | Galanda/Songrep | a533cbd14f3f9625cc54d358c27fcac16d9e96c0 | [
"MIT"
] | null | null | null | defmodule SongrepWeb.ConnCase do
@moduledoc """
This module defines the test case to be used by
tests that require setting up a connection.
Such tests rely on `Phoenix.ConnTest` and also
import other functionality to make it easier
to build common datastructures and query the data layer.
Finally, if the... | 26.615385 | 69 | 0.719653 |
9166e5a10f94e1d8f7e3c50a6100dc2cd4d1127a | 5,680 | exs | Elixir | mix.exs | jonatanklosko/absinthe | 8671a73280f126eca4ee1caa140206c10a850958 | [
"MIT"
] | null | null | null | mix.exs | jonatanklosko/absinthe | 8671a73280f126eca4ee1caa140206c10a850958 | [
"MIT"
] | null | null | null | mix.exs | jonatanklosko/absinthe | 8671a73280f126eca4ee1caa140206c10a850958 | [
"MIT"
] | null | null | null | defmodule Absinthe.Mixfile do
use Mix.Project
@version "1.5.0-rc.5"
def project do
[
app: :absinthe,
version: @version,
elixir: "~> 1.8",
elixirc_paths: elixirc_paths(Mix.env()),
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
package: packa... | 26.919431 | 91 | 0.579401 |
9166efe740f15c46a55eabca4f32fe93cebe03f8 | 188 | ex | Elixir | Elixir/lib/elec50006.ex | tjm1518/ELEC50006 | ea992df88125cbef2793127e75a1eb470040800b | [
"MIT"
] | null | null | null | Elixir/lib/elec50006.ex | tjm1518/ELEC50006 | ea992df88125cbef2793127e75a1eb470040800b | [
"MIT"
] | null | null | null | Elixir/lib/elec50006.ex | tjm1518/ELEC50006 | ea992df88125cbef2793127e75a1eb470040800b | [
"MIT"
] | null | null | null | defmodule ELEC50006 do
def time(a, ty) do
begin = System.monotonic_time(:nanosecond)
ty.(a)
fin = System.monotonic_time(:nanosecond)
(fin - begin) / 1000000000
end
end
| 20.888889 | 46 | 0.675532 |
916712c89a40e464d7a1d0686e05810863c73cc4 | 3,908 | exs | Elixir | test/monad_test.exs | skirino/croma | b3853e94580a9d8f71f76a9c69a3020802bc3d72 | [
"MIT"
] | 123 | 2015-08-12T07:45:52.000Z | 2022-02-06T21:42:03.000Z | test/monad_test.exs | skirino/croma | b3853e94580a9d8f71f76a9c69a3020802bc3d72 | [
"MIT"
] | 11 | 2015-07-30T01:08:54.000Z | 2021-03-29T04:00:20.000Z | test/monad_test.exs | skirino/croma | b3853e94580a9d8f71f76a9c69a3020802bc3d72 | [
"MIT"
] | 16 | 2015-07-29T16:09:24.000Z | 2021-05-23T14:20:20.000Z | defmodule Croma.MonadTest do
use ExUnit.Case
use ExUnitProperties
alias Croma.Result , as: R
alias Croma.ListMonad, as: L
defp id(a), do: a
defp int2result(i) do
if rem(i, 2) == 0, do: {:ok, i}, else: {:error, i}
end
defp functor_law1(mod, f) do
assert mod.map(f, &id/1) == f
end
proper... | 21.832402 | 96 | 0.604145 |
916712defaadc0462687d252e5a946ab578a2ccc | 1,198 | ex | Elixir | lib/oli/institutions/institution.ex | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | 1 | 2022-03-17T20:35:47.000Z | 2022-03-17T20:35:47.000Z | lib/oli/institutions/institution.ex | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | 9 | 2021-11-02T16:52:09.000Z | 2022-03-25T15:14:01.000Z | lib/oli/institutions/institution.ex | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | null | null | null | defmodule Oli.Institutions.Institution do
use Ecto.Schema
import Ecto.Changeset
schema "institutions" do
field :name, :string
field :country_code, :string
field :institution_email, :string
field :institution_url, :string
field :timezone, :string
# an institution can specify a default bra... | 24.44898 | 98 | 0.689482 |
91671e4529bc4fb402d4a668380e929b32277c2d | 944 | exs | Elixir | test/features/stage_progression_realtime_update_test.exs | codyduval/remote_retro_crd | b3a4adda7503b4e1ca5ec135cd34e1e71ec8d247 | [
"MIT"
] | null | null | null | test/features/stage_progression_realtime_update_test.exs | codyduval/remote_retro_crd | b3a4adda7503b4e1ca5ec135cd34e1e71ec8d247 | [
"MIT"
] | null | null | null | test/features/stage_progression_realtime_update_test.exs | codyduval/remote_retro_crd | b3a4adda7503b4e1ca5ec135cd34e1e71ec8d247 | [
"MIT"
] | null | null | null | defmodule StageProgressionRealtimeUpdateTest do
use RemoteRetro.IntegrationCase, async: false
import ShorterMaps
test "realtime stage progression for connected users", ~M{retro, session: facilitator_session, non_facilitator} do
participant_session = new_authenticated_browser_session(non_facilitator)
ret... | 42.909091 | 116 | 0.760593 |
9167232cc8eda592541a1376b858e4ab26717c2b | 1,507 | ex | Elixir | web/controllers/person_controller.ex | kentcdodds/changelog.com | e1c0d7ee5d47dc83dd443d623adb0f07e4acb28d | [
"MIT"
] | null | null | null | web/controllers/person_controller.ex | kentcdodds/changelog.com | e1c0d7ee5d47dc83dd443d623adb0f07e4acb28d | [
"MIT"
] | null | null | null | web/controllers/person_controller.ex | kentcdodds/changelog.com | e1c0d7ee5d47dc83dd443d623adb0f07e4acb28d | [
"MIT"
] | null | null | null | defmodule Changelog.PersonController do
use Changelog.Web, :controller
alias Changelog.{Email, Mailer, Newsletter, Person}
alias Craisin.Subscriber
plug RequireGuest, "before joining" when action in [:new, :create]
def new(conn, params) do
person = %Person{
name: Map.get(params, "name"),
em... | 30.755102 | 92 | 0.651626 |
9167279c5e58ec76c8fda53359a4654f0070f74b | 373 | ex | Elixir | apps/api/lib/api.ex | elicopter/core | 7731dc7558dea39bd1c473ab9e512c9db9e1b2c9 | [
"MIT"
] | 39 | 2016-11-01T07:21:51.000Z | 2021-02-05T20:19:02.000Z | apps/api/lib/api.ex | elicopter/core | 7731dc7558dea39bd1c473ab9e512c9db9e1b2c9 | [
"MIT"
] | null | null | null | apps/api/lib/api.ex | elicopter/core | 7731dc7558dea39bd1c473ab9e512c9db9e1b2c9 | [
"MIT"
] | null | null | null | defmodule Api do
use Application
def start(_type, _args) do
import Supervisor.Spec
children = [
supervisor(Api.Endpoint, [])
]
opts = [strategy: :one_for_one, name: Api.Supervisor]
Supervisor.start_link(children, opts)
end
def config_change(changed, _new, removed) do
Api.Endpoi... | 18.65 | 57 | 0.680965 |
91677d39995647f6ae1d85445fa3dcc3d32ad758 | 1,416 | exs | Elixir | mix.exs | akdilsiz/iyzico | ec26b55c6c9037c6e76e0927d32653a89a1b5731 | [
"MIT"
] | 1 | 2021-07-06T20:41:20.000Z | 2021-07-06T20:41:20.000Z | mix.exs | akdilsiz/iyzico | ec26b55c6c9037c6e76e0927d32653a89a1b5731 | [
"MIT"
] | null | null | null | mix.exs | akdilsiz/iyzico | ec26b55c6c9037c6e76e0927d32653a89a1b5731 | [
"MIT"
] | null | null | null | defmodule Iyzico.Mixfile do
use Mix.Project
def project do
[app: :iyzico,
version: "1.5.6",
elixir: "~> 1.4",
elixirc_paths: elixirc_paths(Mix.env),
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps(),
test_coverage: [tool: ExCoveralls],
pac... | 26.716981 | 79 | 0.590395 |
91678a939a6d2455038b681b7d93fa273c37623e | 984 | ex | Elixir | elixir-in-action/ch-9/todo_metrics/lib/todo/server.ex | danurna/elixir-playground | 6acb40e513d8ab324368b3ec5151b0a4fd88f849 | [
"MIT"
] | null | null | null | elixir-in-action/ch-9/todo_metrics/lib/todo/server.ex | danurna/elixir-playground | 6acb40e513d8ab324368b3ec5151b0a4fd88f849 | [
"MIT"
] | null | null | null | elixir-in-action/ch-9/todo_metrics/lib/todo/server.ex | danurna/elixir-playground | 6acb40e513d8ab324368b3ec5151b0a4fd88f849 | [
"MIT"
] | null | null | null | defmodule Todo.Server do
use GenServer, restart: :temporary
@impl GenServer
def init(name) do
{:ok, {name, Todo.Database.get(name) || Todo.List.new()}}
end
@impl GenServer
def handle_call({:entries, date}, _, {name, list}) do
{:reply, Todo.List.entries(list, date), {name, list}}
end
@impl Ge... | 24.6 | 76 | 0.677846 |
9167c89645b3ad2ce34bb81d07abe2bffad9d90f | 2,055 | ex | Elixir | clients/dataflow/lib/google_api/dataflow/v1b3/model/stage_source.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/dataflow/lib/google_api/dataflow/v1b3/model/stage_source.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/dataflow/lib/google_api/dataflow/v1b3/model/stage_source.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 36.052632 | 150 | 0.712409 |
9167eb64aeee1664fc7eaaf1dbdb7a062397c504 | 1,207 | ex | Elixir | lib/bus_car/repo/search.ex | elbow-jason/bus_car | cd70b9f6b8dd404eb518f642491e0a4430e2d9f9 | [
"MIT"
] | 18 | 2016-09-25T21:36:39.000Z | 2021-02-17T15:09:52.000Z | lib/bus_car/repo/search.ex | elbow-jason/bus_car | cd70b9f6b8dd404eb518f642491e0a4430e2d9f9 | [
"MIT"
] | 7 | 2016-12-08T05:01:23.000Z | 2018-04-05T08:55:11.000Z | lib/bus_car/repo/search.ex | elbow-jason/bus_car | cd70b9f6b8dd404eb518f642491e0a4430e2d9f9 | [
"MIT"
] | 1 | 2020-04-24T02:10:15.000Z | 2020-04-24T02:10:15.000Z | defmodule BusCar.Repo.Search do
defmacro __using__(opts) do
quote do
opts = unquote(opts)
@repo opts |> Keyword.get(:repo)
if is_nil(@repo) do
raise "BusCar.Repo.Search requires a :repo option when __using__"
end
@api Module.concat(@repo, Api)
def search do
do... | 29.439024 | 90 | 0.597349 |
9167fa3ee8acccdeb3ea897713dc2e2e1f27b8ac | 3,588 | ex | Elixir | lib/batch_elixir/server/consumer.ex | OnceApp/batch_elixir | eabd12abaef7b703c95a30641be27c1658c2a64f | [
"MIT"
] | 3 | 2019-02-11T11:32:44.000Z | 2019-03-01T15:58:46.000Z | lib/batch_elixir/server/consumer.ex | OnceApp/batch_elixir | eabd12abaef7b703c95a30641be27c1658c2a64f | [
"MIT"
] | 1 | 2019-02-05T17:20:15.000Z | 2019-02-11T11:03:14.000Z | lib/batch_elixir/server/consumer.ex | OnceApp/batch_elixir | eabd12abaef7b703c95a30641be27c1658c2a64f | [
"MIT"
] | 1 | 2019-08-08T16:40:26.000Z | 2019-08-08T16:40:26.000Z | defmodule BatchElixir.Server.Consumer do
@moduledoc false
use GenStage
alias BatchElixir.Environment
alias BatchElixir.RestClient.Transactional
alias BatchElixir.Serialisation
alias BatchElixir.Server.Producer
alias BatchElixir.Stats
require Logger
@http_status_code_for_not_retry [400, 401, 404]
d... | 26.382353 | 95 | 0.690357 |
916806c446cd39b37fa83743ae80b7859359e372 | 1,287 | exs | Elixir | config/prod.secret.exs | nickyeager/phoenix-starter | 6940499c28b460916d610929e6a6fec256345018 | [
"MIT"
] | null | null | null | config/prod.secret.exs | nickyeager/phoenix-starter | 6940499c28b460916d610929e6a6fec256345018 | [
"MIT"
] | 2 | 2021-03-10T19:22:36.000Z | 2021-05-11T15:05:23.000Z | config/prod.secret.exs | nickyeager/phoenix-starter | 6940499c28b460916d610929e6a6fec256345018 | [
"MIT"
] | null | null | null | # In this file, we load production configuration and secrets
# from environment variables. You can also hardcode secrets,
# although such is generally not recommended and you have to
# remember to add this file to your .gitignore.
use Mix.Config
database_url =
System.get_env("DATABASE_URL") ||
raise """
envi... | 30.642857 | 70 | 0.72805 |
91680d581410938bd8392632ce771bd77f17aec3 | 939 | exs | Elixir | test/logjam_agent/metadata_test.exs | xing/exbeetle | 6c64ddd7568ef9f79bbabdb4b481ae64b5f2398c | [
"MIT"
] | 3 | 2018-02-02T14:38:21.000Z | 2018-02-05T17:33:35.000Z | test/logjam_agent/metadata_test.exs | xing/elixir_logjam_agent | 6c64ddd7568ef9f79bbabdb4b481ae64b5f2398c | [
"MIT"
] | null | null | null | test/logjam_agent/metadata_test.exs | xing/elixir_logjam_agent | 6c64ddd7568ef9f79bbabdb4b481ae64b5f2398c | [
"MIT"
] | null | null | null | defmodule LogjamAgent.MetadataTest do
use ExUnit.Case, async: false
alias LogjamAgent.{Buffer, Metadata}
setup do
Metadata.new_request_id!
Buffer.delete(Metadata.current_request_id, :rest_calls)
Buffer.delete(Metadata.current_request_id, :exceptions)
:ok
end
test "increment_rest_calls_counte... | 31.3 | 103 | 0.763578 |
91682092a1460a4dce6c39ed7c380ef8b58acc60 | 113 | ex | Elixir | lib/types/get_options_response.ex | smiyabe/cwmp_ex | 9db322497aa3208b5985ccf496ada5286cde3925 | [
"Artistic-2.0"
] | 3 | 2017-11-29T05:07:35.000Z | 2019-12-18T17:16:41.000Z | lib/types/get_options_response.ex | smiyabe/cwmp_ex | 9db322497aa3208b5985ccf496ada5286cde3925 | [
"Artistic-2.0"
] | 1 | 2021-12-02T19:35:28.000Z | 2022-03-29T09:40:52.000Z | lib/types/get_options_response.ex | smiyabe/cwmp_ex | 9db322497aa3208b5985ccf496ada5286cde3925 | [
"Artistic-2.0"
] | 2 | 2017-11-29T05:07:30.000Z | 2020-11-10T07:10:42.000Z | defmodule CWMP.Protocol.Messages.GetOptionsResponse do
@derive [Poison.Encoder]
defstruct optionlist: []
end
| 22.6 | 54 | 0.79646 |
916830a9e9495f5972ca2b563fe20cd1924366e0 | 7,109 | exs | Elixir | apps/ewallet/test/ewallet/fetchers/balance_fetcher_test.exs | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | apps/ewallet/test/ewallet/fetchers/balance_fetcher_test.exs | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | apps/ewallet/test/ewallet/fetchers/balance_fetcher_test.exs | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 OmiseGO Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 29.376033 | 82 | 0.612322 |
91685c68d6cb48db8d968fbe10aa41fdec088d54 | 3,405 | exs | Elixir | config/dev.exs | amacgregor/shouldibuildthat | 572b0ba95f93f6ea0dc7b250baaa1bc90efd521b | [
"MIT"
] | null | null | null | config/dev.exs | amacgregor/shouldibuildthat | 572b0ba95f93f6ea0dc7b250baaa1bc90efd521b | [
"MIT"
] | 2 | 2020-07-18T02:22:22.000Z | 2021-03-09T15:46:44.000Z | config/dev.exs | amacgregor/shouldibuildthat | 572b0ba95f93f6ea0dc7b250baaa1bc90efd521b | [
"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 :sibt, SibtWeb.Endpoint,
http: [port: System.get... | 26.395349 | 72 | 0.657269 |
916867816da9abe38f5223c9a276e9f48221baa1 | 1,325 | exs | Elixir | config/config.exs | ZURASTA/yum | 132cb79ab328d2e4063d581f79fde0ff4243eb02 | [
"BSD-2-Clause"
] | null | null | null | config/config.exs | ZURASTA/yum | 132cb79ab328d2e4063d581f79fde0ff4243eb02 | [
"BSD-2-Clause"
] | 4 | 2017-08-02T08:38:18.000Z | 2017-12-23T12:21:02.000Z | config/config.exs | ZURASTA/yum | 132cb79ab328d2e4063d581f79fde0ff4243eb02 | [
"BSD-2-Clause"
] | 3 | 2017-07-25T10:17:28.000Z | 2017-10-04T05:46:01.000Z | # 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... | 31.547619 | 73 | 0.738868 |
91687feafaace0a09de8a399ef7f0a558eb345fe | 553 | ex | Elixir | apps/game/lib/rules.ex | artvinn/phoenix-tictactoe | 14f9a7dcc18449d8cba755c5625b665b7cfccfff | [
"MIT"
] | 1 | 2019-03-11T09:12:16.000Z | 2019-03-11T09:12:16.000Z | apps/game/lib/rules.ex | artvinn/phoenix-tictactoe | 14f9a7dcc18449d8cba755c5625b665b7cfccfff | [
"MIT"
] | null | null | null | apps/game/lib/rules.ex | artvinn/phoenix-tictactoe | 14f9a7dcc18449d8cba755c5625b665b7cfccfff | [
"MIT"
] | 1 | 2020-09-26T00:37:30.000Z | 2020-09-26T00:37:30.000Z | defmodule Game.Rules do
@win_combos [
[0, 1, 2],
[3, 4, 5],
[6, 7, 8],
[0, 3, 6],
[1, 4, 7],
[2, 5, 8],
[0, 4, 8],
[2, 4, 6]
]
def winning_combo?([:x, :x, :x]), do: true
def winning_combo?([:o, :o, :o]), do: true
def winning_combo?(_), do: false
def get_winner(board) do
... | 18.433333 | 54 | 0.479204 |
916884ae1908f70aca43cb55e9688f92633f9227 | 551 | ex | Elixir | elixir-to-java/elixir_api_server/lib/elixir_api_server_web/views/error_view.ex | poad/grpc-example | d1b775f6d2e89279cd29191d5d4dbec265bf0bf0 | [
"Apache-2.0"
] | null | null | null | elixir-to-java/elixir_api_server/lib/elixir_api_server_web/views/error_view.ex | poad/grpc-example | d1b775f6d2e89279cd29191d5d4dbec265bf0bf0 | [
"Apache-2.0"
] | 64 | 2021-08-30T23:54:04.000Z | 2022-03-14T21:06:11.000Z | elixir-to-java/elixir_api_server/lib/elixir_api_server_web/views/error_view.ex | poad/grpc-example | d1b775f6d2e89279cd29191d5d4dbec265bf0bf0 | [
"Apache-2.0"
] | null | null | null | defmodule ElixirApiServerWeb.ErrorView do
use ElixirApiServerWeb, :view
# If you want to customize a particular status code
# for a certain format, you may uncomment below.
# def render("500.json", _assigns) do
# %{errors: %{detail: "Internal Server Error"}}
# end
# By default, Phoenix returns the sta... | 32.411765 | 83 | 0.727768 |
916899ddd5500151b085c7a718c52337d7596dc1 | 321 | ex | Elixir | web/views/auth/helpers.ex | harry-gao/ex-cart | 573e7f977bb3b710d11618dd215d4ddd8f819fb3 | [
"Apache-2.0"
] | 356 | 2016-03-16T12:37:28.000Z | 2021-12-18T03:22:39.000Z | web/views/auth/helpers.ex | harry-gao/ex-cart | 573e7f977bb3b710d11618dd215d4ddd8f819fb3 | [
"Apache-2.0"
] | 30 | 2016-03-16T09:19:10.000Z | 2021-01-12T08:10:52.000Z | web/views/auth/helpers.ex | harry-gao/ex-cart | 573e7f977bb3b710d11618dd215d4ddd8f819fb3 | [
"Apache-2.0"
] | 72 | 2016-03-16T13:32:14.000Z | 2021-03-23T11:27:43.000Z | defmodule Nectar.Auth.ViewHelper do
def admin_logged_in?(conn), do: Guardian.Plug.authenticated?(conn, :admin)
def admin_user(conn), do: Guardian.Plug.current_resource(conn, :admin)
def logged_in?(conn), do: Guardian.Plug.authenticated?(conn)
def current_user(conn), do: Guardian.Plug.current_resource(conn)
end... | 40.125 | 76 | 0.772586 |
9168a8e08b6d9c2517c0f04eb2614fe6b9033e9e | 1,912 | ex | Elixir | lib/movement/builders/slave_conflict_sync.ex | leonardocouy/accent | 29fb324395ff998cc5cdc6947c60070ffabe647c | [
"BSD-3-Clause"
] | null | null | null | lib/movement/builders/slave_conflict_sync.ex | leonardocouy/accent | 29fb324395ff998cc5cdc6947c60070ffabe647c | [
"BSD-3-Clause"
] | null | null | null | lib/movement/builders/slave_conflict_sync.ex | leonardocouy/accent | 29fb324395ff998cc5cdc6947c60070ffabe647c | [
"BSD-3-Clause"
] | null | null | null | defmodule Movement.Builders.SlaveConflictSync do
@behaviour Movement.Builder
import Movement.Context, only: [assign: 3]
alias Movement.Mappers.Operation, as: OperationMapper
alias Accent.Scopes.Translation, as: TranslationScope
alias Accent.{Repo, Translation}
@included_actions ~w(conflict_on_corrected c... | 31.344262 | 84 | 0.705021 |
9168d21f8995513b11879940bbd841e05da4167b | 856 | ex | Elixir | lib/hl7/2.4/segments/obx.ex | calvinb/elixir-hl7 | 5e953fa11f9184857c0ec4dda8662889f35a6bec | [
"Apache-2.0"
] | null | null | null | lib/hl7/2.4/segments/obx.ex | calvinb/elixir-hl7 | 5e953fa11f9184857c0ec4dda8662889f35a6bec | [
"Apache-2.0"
] | null | null | null | lib/hl7/2.4/segments/obx.ex | calvinb/elixir-hl7 | 5e953fa11f9184857c0ec4dda8662889f35a6bec | [
"Apache-2.0"
] | null | null | null | defmodule HL7.V2_4.Segments.OBX do
@moduledoc false
require Logger
alias HL7.V2_4.{DataTypes}
use HL7.Segment,
fields: [
segment: nil,
set_id_obx: nil,
value_type: nil,
observation_identifier: DataTypes.Ce,
observation_sub_id: nil,
observation_value: nil,
units: D... | 27.612903 | 55 | 0.703271 |
9168e37c2aa86434c49b2bbdbe5d5ccbb35d6b32 | 2,110 | ex | Elixir | clients/pub_sub/lib/google_api/pub_sub/v1/model/pull_request.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/pub_sub/lib/google_api/pub_sub/v1/model/pull_request.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/pub_sub/lib/google_api/pub_sub/v1/model/pull_request.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... | 42.2 | 522 | 0.73981 |
91691fcdb0f8e83216bd86c87f3b75775603ef61 | 2,028 | exs | Elixir | test/controllers/user_controller_test.exs | tykowale/todo_api | 8e154dc2fef0cac79bd97646a338c569486a0e0a | [
"MIT"
] | null | null | null | test/controllers/user_controller_test.exs | tykowale/todo_api | 8e154dc2fef0cac79bd97646a338c569486a0e0a | [
"MIT"
] | null | null | null | test/controllers/user_controller_test.exs | tykowale/todo_api | 8e154dc2fef0cac79bd97646a338c569486a0e0a | [
"MIT"
] | null | null | null | defmodule Todos.UserControllerTest do
use Todos.ConnCase
alias Todos.User
alias Todos.UserView
@valid_attrs %{email: "ty@foo.com", unencrypted_password: "foobar"}
test "#index returns all users" do
conn = build_conn()
user = insert(:user)
conn = get(conn, user_path(conn, :... | 28.166667 | 98 | 0.598126 |
91692cf61ba63ccd13f2fc54c0469e7300e75495 | 318 | ex | Elixir | lib/finance/period.ex | codebay/finance | e8bd1c0427911ed353c15d07b7ab3c55467fcc87 | [
"Apache-2.0"
] | null | null | null | lib/finance/period.ex | codebay/finance | e8bd1c0427911ed353c15d07b7ab3c55467fcc87 | [
"Apache-2.0"
] | null | null | null | lib/finance/period.ex | codebay/finance | e8bd1c0427911ed353c15d07b7ab3c55467fcc87 | [
"Apache-2.0"
] | null | null | null | defmodule Finance.Period do
@moduledoc """
Time Periods
"""
@doc """
Annual time period
"""
def annual, do: 1.0
@doc """
Monthly time period
"""
def monthly, do: 12.0
@doc """
Weekly time period
"""
def weekly, do: 52.0
@doc """
Daily time period
"""
def daily, do: 365.0
end
| 12.230769 | 27 | 0.562893 |
91693212048161a171883108d75c743c306113dc | 24,279 | ex | Elixir | lib/sat_solver.ex | kernel-io/ash | cb59a8e09c61913fb0443a84fc894714e9199686 | [
"MIT"
] | null | null | null | lib/sat_solver.ex | kernel-io/ash | cb59a8e09c61913fb0443a84fc894714e9199686 | [
"MIT"
] | null | null | null | lib/sat_solver.ex | kernel-io/ash | cb59a8e09c61913fb0443a84fc894714e9199686 | [
"MIT"
] | null | null | null | defmodule Ash.SatSolver do
@moduledoc """
Tools for working with the satsolver that drives filter subset checking (for authorization)
"""
alias Ash.Filter
alias Ash.Query.{BooleanExpression, Not, Ref}
@dialyzer {:nowarn_function, overlap?: 2}
defmacro b(statement) do
value =
Macro.prewalk(
... | 27.779176 | 100 | 0.638782 |
916948548bb457ce5680c5a470f942f070a50285 | 6,063 | ex | Elixir | lib/swoosh/adapters/sendgrid.ex | feld/swoosh | 05e70573385830bb345e0fa5f5cc1d1ad524a90a | [
"MIT"
] | 1,214 | 2016-03-21T16:56:42.000Z | 2022-03-31T19:10:11.000Z | lib/swoosh/adapters/sendgrid.ex | feld/swoosh | 05e70573385830bb345e0fa5f5cc1d1ad524a90a | [
"MIT"
] | 399 | 2016-03-21T23:11:32.000Z | 2022-03-04T10:52:28.000Z | deps/swoosh/lib/swoosh/adapters/sendgrid.ex | adrianomota/blog | ef3b2d2ed54f038368ead8234d76c18983caa75b | [
"MIT"
] | 208 | 2016-03-21T21:12:11.000Z | 2022-03-04T06:35:33.000Z | defmodule Swoosh.Adapters.Sendgrid do
@provider_options_personalization_fields [
:custom_args,
:substitutions,
:dynamic_template_data
]
@provider_options_body_fields [
:template_id,
:asm,
:categories,
:mail_settings,
:tracking_settings
]
@moduledoc ~s"""
An adapter that sen... | 27.559091 | 104 | 0.645225 |
91694eb08231695d4c194817f6b9540fbf5c77dc | 1,237 | ex | Elixir | lib/quiz_site_web/router.ex | rbgraham/quiz_site | 57ded7991e355e2cf9f5edecc823b67833ee0ceb | [
"MIT"
] | 2 | 2017-10-30T00:42:01.000Z | 2017-10-30T21:29:15.000Z | lib/quiz_site_web/router.ex | rbgraham/quiz_site | 57ded7991e355e2cf9f5edecc823b67833ee0ceb | [
"MIT"
] | null | null | null | lib/quiz_site_web/router.ex | rbgraham/quiz_site | 57ded7991e355e2cf9f5edecc823b67833ee0ceb | [
"MIT"
] | null | null | null | defmodule QuizSiteWeb.Router do
use QuizSiteWeb, :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"]
plug :fetch_session
plug :protect... | 31.717949 | 71 | 0.697656 |
91699e1c05c5022d09e49b8be1340c1ed215b4ea | 255 | exs | Elixir | test/support/migrations/20220409025430_add_comments_table.exs | enewbury/quarry_absinthe | 0a1b738782c1dea4071ef07b7fa4346eb1325bc8 | [
"MIT"
] | null | null | null | test/support/migrations/20220409025430_add_comments_table.exs | enewbury/quarry_absinthe | 0a1b738782c1dea4071ef07b7fa4346eb1325bc8 | [
"MIT"
] | null | null | null | test/support/migrations/20220409025430_add_comments_table.exs | enewbury/quarry_absinthe | 0a1b738782c1dea4071ef07b7fa4346eb1325bc8 | [
"MIT"
] | null | null | null | defmodule AbsintheQuarry.Repo.Migrations.AddCommentsTable do
use Ecto.Migration
def change do
create table("comments") do
add :message, :string
add :user_id, references(:users)
add :post_id, references(:posts)
end
end
end
| 21.25 | 60 | 0.698039 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.