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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6270665b23004ebdb4cb9320f463538e44c50e2c | 285 | ex | Elixir | lib/authoritex/fast/uniform_title.ex | nulib/authoritex | a9b277e20873a886e2578f14f58acb277a501f01 | [
"MIT"
] | 2 | 2020-06-11T10:37:21.000Z | 2020-10-13T18:12:42.000Z | lib/authoritex/fast/uniform_title.ex | nulib/authoritex | a9b277e20873a886e2578f14f58acb277a501f01 | [
"MIT"
] | 21 | 2020-05-12T21:06:32.000Z | 2022-01-14T14:43:45.000Z | lib/authoritex/fast/uniform_title.ex | nulib/authoritex | a9b277e20873a886e2578f14f58acb277a501f01 | [
"MIT"
] | null | null | null | defmodule Authoritex.FAST.UniformTitle do
@desc "Faceted Application of Subject Terminology -- Uniform Title"
@moduledoc "Authoritex implementation for #{@desc}"
use Authoritex.FAST.Base,
subauthority: "suggest30",
code: "fast-uniform-title",
description: @desc
end
| 28.5 | 69 | 0.740351 |
6270740bc9b917545a2d98bf438dea689e428320 | 1,021 | ex | Elixir | code-sample-elixir/kv/lib/random_functions.ex | aquatir/learntocode | 9b860a528ded64fab2686a93c49dfd4b3947d6c9 | [
"MIT"
] | null | null | null | code-sample-elixir/kv/lib/random_functions.ex | aquatir/learntocode | 9b860a528ded64fab2686a93c49dfd4b3947d6c9 | [
"MIT"
] | 1 | 2017-10-03T11:25:54.000Z | 2017-10-03T11:25:54.000Z | code-sample-elixir/kv/lib/random_functions.ex | aquatir/remember_java_api | 6acc72e23a954152d922e380d06f337f55921950 | [
"MIT"
] | null | null | null | defmodule RandomFunctions do
@spec f_with_default(number, number) :: number
def f_with_default(value, value_with_default \\ 10) do
value * value_with_default
end
@spec f_with_two_default(number, number) :: number
def f_with_two_default(value, another \\ 10, yet_another \\ 15) do
value * another * ye... | 32.935484 | 95 | 0.708129 |
6270bd1025488d507aa71bdc4fae0c270888b540 | 4,472 | exs | Elixir | test/chunkr/opts_test.exs | goodpixel/pager | d3ab68add7f7d08af1a80132e2981c802d446b5f | [
"MIT"
] | 3 | 2021-09-15T13:21:37.000Z | 2021-10-14T06:07:49.000Z | test/chunkr/opts_test.exs | goodpixel/pager | d3ab68add7f7d08af1a80132e2981c802d446b5f | [
"MIT"
] | 2 | 2021-09-20T16:39:56.000Z | 2021-10-14T18:38:34.000Z | test/chunkr/opts_test.exs | goodpixel/pager | d3ab68add7f7d08af1a80132e2981c802d446b5f | [
"MIT"
] | 1 | 2021-09-20T16:19:13.000Z | 2021-09-20T16:19:13.000Z | defmodule Chunkr.OptsTest do
use ExUnit.Case, async: true
alias Chunkr.{Opts, User}
doctest Chunkr.Opts
describe "Chunkr.Opts.new/3" do
test "when paginating forwards without a cursor" do
assert {:ok,
%Opts{
query: User,
strategy: :first_name,
... | 33.125926 | 94 | 0.5 |
6270de4e7bfd816290acce5ee53a728325a7e19e | 3,199 | ex | Elixir | apps/artemis_web/lib/artemis_web/controllers/user_controller.ex | chrislaskey/atlas_platform | 969aea95814f62d3471f93000ee5ad77edb9d1bf | [
"MIT"
] | 10 | 2019-07-05T19:59:20.000Z | 2021-05-23T07:36:11.000Z | apps/artemis_web/lib/artemis_web/controllers/user_controller.ex | chrislaskey/atlas_platform | 969aea95814f62d3471f93000ee5ad77edb9d1bf | [
"MIT"
] | 3 | 2019-03-05T23:55:09.000Z | 2019-05-29T13:46:34.000Z | apps/artemis_web/lib/artemis_web/controllers/user_controller.ex | chrislaskey/atlas_platform | 969aea95814f62d3471f93000ee5ad77edb9d1bf | [
"MIT"
] | 4 | 2019-07-05T20:04:08.000Z | 2021-05-13T16:28:33.000Z | defmodule ArtemisWeb.UserController do
use ArtemisWeb, :controller
alias Artemis.CreateUser
alias Artemis.User
alias Artemis.DeleteUser
alias Artemis.GetUser
alias Artemis.ListRoles
alias Artemis.ListUsers
alias Artemis.UpdateUser
@preload [:user_roles]
def index(conn, params) do
authorize(co... | 29.081818 | 83 | 0.605814 |
6270faeccecf1abfe22c04d3a2675e58df595930 | 2,105 | ex | Elixir | src/Day09/day09/lib/day09.ex | Hutchythesmall/AdventOfCode2020 | 5bf25f74da5eca434b38a5bef64d2b8d5337907d | [
"MIT"
] | null | null | null | src/Day09/day09/lib/day09.ex | Hutchythesmall/AdventOfCode2020 | 5bf25f74da5eca434b38a5bef64d2b8d5337907d | [
"MIT"
] | null | null | null | src/Day09/day09/lib/day09.ex | Hutchythesmall/AdventOfCode2020 | 5bf25f74da5eca434b38a5bef64d2b8d5337907d | [
"MIT"
] | null | null | null | defmodule Day09 do
@moduledoc """
Documentation for `Day09`.
"""
def hack_xmas(filePath, preambleSize) do
input = load_input(filePath)
vulnerability = get_vulnerability(input, preambleSize)
IO.puts(vulnerability)
{i,j} = get_longest_combination(input,vulnerability)
input = input
... | 28.066667 | 110 | 0.567221 |
62714919745c594f97867deeaed204abd5c8b0ea | 35 | ex | Elixir | testData/org/elixir_lang/parser_definition/interpolated_sigil_heredoc_parsing_test_case/WhitespaceEndPrefix.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 1,668 | 2015-01-03T05:54:27.000Z | 2022-03-25T08:01:20.000Z | testData/org/elixir_lang/parser_definition/interpolated_sigil_heredoc_parsing_test_case/WhitespaceEndPrefix.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 2,018 | 2015-01-01T22:43:39.000Z | 2022-03-31T20:13:08.000Z | testData/org/elixir_lang/parser_definition/interpolated_sigil_heredoc_parsing_test_case/WhitespaceEndPrefix.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 145 | 2015-01-15T11:37:16.000Z | 2021-12-22T05:51:02.000Z | ~x"""
custom
sigil"""
""" | 8.75 | 11 | 0.342857 |
6271721d760e9ef0f4f6520d0204ab835a1ef277 | 520 | exs | Elixir | test/currencyconverter_web/views/error_view_test.exs | Aguiar575/Currency-ConvertEX | 886181476c49bd068df5450ab98dcb885ac55746 | [
"MIT"
] | 1 | 2021-12-27T01:29:58.000Z | 2021-12-27T01:29:58.000Z | test/currencyconverter_web/views/error_view_test.exs | Aguiar575/Currency-ConvertEX | 886181476c49bd068df5450ab98dcb885ac55746 | [
"MIT"
] | null | null | null | test/currencyconverter_web/views/error_view_test.exs | Aguiar575/Currency-ConvertEX | 886181476c49bd068df5450ab98dcb885ac55746 | [
"MIT"
] | null | null | null | defmodule CurrencyconverterWeb.ErrorViewTest do
use CurrencyconverterWeb.ConnCase, async: true
# Bring render/3 and render_to_string/3 for testing custom views
import Phoenix.View
test "renders 404.json" do
assert render(CurrencyconverterWeb.ErrorView, "404.json", []) == %{
errors: %{detail: ... | 28.888889 | 71 | 0.673077 |
62718f5bb36484613c439e3be5f10acb6e4ca205 | 2,534 | ex | Elixir | lib/companies_web/controllers/company_controller.ex | jordelver/elixir-companies | a54f06a3aec04775760d86577a95da6ce494abb8 | [
"MIT"
] | null | null | null | lib/companies_web/controllers/company_controller.ex | jordelver/elixir-companies | a54f06a3aec04775760d86577a95da6ce494abb8 | [
"MIT"
] | null | null | null | lib/companies_web/controllers/company_controller.ex | jordelver/elixir-companies | a54f06a3aec04775760d86577a95da6ce494abb8 | [
"MIT"
] | null | null | null | defmodule CompaniesWeb.CompanyController do
use CompaniesWeb, :controller
alias Companies.{Companies, Industries, Schema.Company}
def recent(conn, _params) do
companies_count = Companies.count()
recent_companies = Companies.recent()
render(conn, "recent.html", recent_companies: recent_companies, co... | 33.342105 | 115 | 0.669298 |
6271bf90e27817950ecff0a6b7c941afacf5c698 | 903 | ex | Elixir | web/oauth/google.ex | cdegroot/clueless | c7f575159a42f55eb843df0e37802e778826c845 | [
"MIT"
] | null | null | null | web/oauth/google.ex | cdegroot/clueless | c7f575159a42f55eb843df0e37802e778826c845 | [
"MIT"
] | 4 | 2015-12-18T20:35:49.000Z | 2015-12-18T20:36:43.000Z | web/oauth/google.ex | cdegroot/clueless | c7f575159a42f55eb843df0e37802e778826c845 | [
"MIT"
] | null | null | null | defmodule Google do
@moduledoc """
An OAuth2 strategy for Google.
"""
use OAuth2.Strategy
alias OAuth2.Strategy.AuthCode
defp config do
[strategy: Google,
site: "https://accounts.google.com",
authorize_url: "/o/oauth2/auth",
token_url: "/o/oauth2/token"]
end
# Public API
def cli... | 20.522727 | 50 | 0.663344 |
6271c76aac483803c9a2f6c78461b52105f095e6 | 3,605 | ex | Elixir | lib/mason.ex | spacepilots/mason | 9b1e587a4daae886a09d3f043bd4e57c5ac2481c | [
"MIT"
] | 8 | 2018-06-21T11:51:01.000Z | 2022-01-28T00:02:17.000Z | lib/mason.ex | spacepilots/mason | 9b1e587a4daae886a09d3f043bd4e57c5ac2481c | [
"MIT"
] | null | null | null | lib/mason.ex | spacepilots/mason | 9b1e587a4daae886a09d3f043bd4e57c5ac2481c | [
"MIT"
] | null | null | null | defmodule Mason do
@moduledoc """
Mason is a small module to help you coerce values in structs. Note:
Since we cannot define structs in doctests we simply import the `User` module
from in our tests (see test/mason_test.exs).
"""
@doc """
The struct method takes a module and some params and coerces the pa... | 25.75 | 87 | 0.567268 |
6271c9593c1e05155f9895da186dd23208b3464e | 667 | ex | Elixir | lib/bsv_p2p/command/block.ex | slashrsm/bsv_p2p | 59e8971c0f107e71ba38a295f07a0a30699e0ed5 | [
"MIT"
] | 1 | 2021-12-07T13:28:54.000Z | 2021-12-07T13:28:54.000Z | lib/bsv_p2p/command/block.ex | slashrsm/bsv_p2p | 59e8971c0f107e71ba38a295f07a0a30699e0ed5 | [
"MIT"
] | null | null | null | lib/bsv_p2p/command/block.ex | slashrsm/bsv_p2p | 59e8971c0f107e71ba38a295f07a0a30699e0ed5 | [
"MIT"
] | null | null | null | defmodule BsvP2p.Command.Block do
@moduledoc """
Bitcoin P2P "block" command.
"""
alias BSV.Block
@enforce_keys [:block]
defstruct [:block]
@type t :: %__MODULE__{block: Block.t()}
defimpl BsvP2p.Command, for: __MODULE__ do
@spec name(BsvP2p.Command.Block.t()) :: String.t()
def name(_), do: ... | 21.516129 | 57 | 0.649175 |
6271cedba7c07d928e0c8b202227a8e88b31f456 | 408 | ex | Elixir | lib/rocketpay/accounts/withdraw.ex | lucas-sachet/NLW04 | 1c678764d49d421d73d6beb942036593863397e0 | [
"MIT"
] | null | null | null | lib/rocketpay/accounts/withdraw.ex | lucas-sachet/NLW04 | 1c678764d49d421d73d6beb942036593863397e0 | [
"MIT"
] | null | null | null | lib/rocketpay/accounts/withdraw.ex | lucas-sachet/NLW04 | 1c678764d49d421d73d6beb942036593863397e0 | [
"MIT"
] | null | null | null | defmodule Rocketpay.Accounts.Withdraw do
alias Rocketpay.Accounts.Operation
alias Rocketpay. Repo
def call(params) do
params
|> Operation.call( :withdraw)
|> run_transaction()
end
defp run_transaction(multi) do
case Repo.transaction(multi) do
{:error, _operation, reason, _changes} ->... | 20.4 | 64 | 0.666667 |
6271e33863e60e95a7e839b32a84685757fe8d86 | 1,896 | ex | Elixir | clients/sheets/lib/google_api/sheets/v4/model/borders.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/sheets/lib/google_api/sheets/v4/model/borders.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/sheets/lib/google_api/sheets/v4/model/borders.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.263158 | 81 | 0.720464 |
6271f31d12d0ede208628ab03fe5ee7be4718fa6 | 1,892 | ex | Elixir | lib/grovepi/i2c/state.ex | asummers/grovepi | 8092fd704457265929e4d9676bedd8cf2176f48d | [
"Apache-2.0"
] | 34 | 2017-08-28T22:44:59.000Z | 2022-02-15T06:37:40.000Z | lib/grovepi/i2c/state.ex | asummers/grovepi | 8092fd704457265929e4d9676bedd8cf2176f48d | [
"Apache-2.0"
] | 19 | 2017-08-14T17:27:44.000Z | 2019-05-26T02:49:39.000Z | lib/grovepi/i2c/state.ex | asummers/grovepi | 8092fd704457265929e4d9676bedd8cf2176f48d | [
"Apache-2.0"
] | 5 | 2017-09-06T02:20:28.000Z | 2020-03-29T06:05:16.000Z | defmodule GrovePi.I2C.State do
@moduledoc false
alias __MODULE__
defstruct responses: [], writes: []
def add_input(%State{} = state, write) do
%{state | writes: [add_time_to_write(write) | state.writes]}
end
def add_responses(%State{} = state, responses) do
%{state | responses: state.responses +... | 25.567568 | 66 | 0.671247 |
6271f6a9d6b216d79faa818c959559f6d89d2e04 | 2,272 | exs | Elixir | test/test_helper.exs | aclemmensen/relay | 4bce71ed7d8bd4936f96d62ed08d007729c4253d | [
"BSD-3-Clause"
] | 5 | 2018-10-12T13:13:19.000Z | 2020-10-03T17:51:37.000Z | test/test_helper.exs | aclemmensen/relay | 4bce71ed7d8bd4936f96d62ed08d007729c4253d | [
"BSD-3-Clause"
] | 207 | 2018-02-09T14:24:14.000Z | 2020-07-25T11:09:19.000Z | test/test_helper.exs | aclemmensen/relay | 4bce71ed7d8bd4936f96d62ed08d007729c4253d | [
"BSD-3-Clause"
] | 1 | 2019-08-08T11:30:59.000Z | 2019-08-08T11:30:59.000Z | defmodule TestHelpers do
import ExUnit.Callbacks
defmodule StubGenServer do
@moduledoc """
Stub GenServer that forwards all `call`s to the pid it's configured with
and replies with `:ok`.
"""
use GenServer
def start_link(pid), do: GenServer.start_link(__MODULE__, pid, name: StubGenServer)
... | 23.666667 | 87 | 0.65757 |
6272079e1fd970f62e04e61bddb01588cb719215 | 1,016 | exs | Elixir | mix.exs | mpihlak/proj | 02546dd31cf1395c46df58030147a8b3b45f39d2 | [
"CC0-1.0"
] | null | null | null | mix.exs | mpihlak/proj | 02546dd31cf1395c46df58030147a8b3b45f39d2 | [
"CC0-1.0"
] | null | null | null | mix.exs | mpihlak/proj | 02546dd31cf1395c46df58030147a8b3b45f39d2 | [
"CC0-1.0"
] | null | null | null | defmodule Mix.Tasks.Compile.Proj do
def run(_) do
{result, _error_code} = System.cmd("make", [])
Mix.shell.info result
end
end
defmodule Proj.Mixfile do
use Mix.Project
def project do
[app: :proj,
version: "0.2.2",
elixir: "~> 1.0",
compilers: [:proj, :elixir, :app],
deps: deps... | 22.577778 | 78 | 0.520669 |
62720e08d792c242da44ba8a9608930d8e73e118 | 3,034 | ex | Elixir | clients/android_management/lib/google_api/android_management/v1/model/hardware_status.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/android_management/lib/google_api/android_management/v1/model/hardware_status.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/android_management/lib/google_api/android_management/v1/model/hardware_status.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 ... | 46.676923 | 231 | 0.709954 |
62720e4069c05c08a01042a50926286216d146cf | 547 | ex | Elixir | backend/lib/cpsim_backend_web/views/error_view.ex | azhi/cpsim | a10a3e068a8a319e66cc9cf8a6c9c97457d9bf8b | [
"MIT"
] | null | null | null | backend/lib/cpsim_backend_web/views/error_view.ex | azhi/cpsim | a10a3e068a8a319e66cc9cf8a6c9c97457d9bf8b | [
"MIT"
] | null | null | null | backend/lib/cpsim_backend_web/views/error_view.ex | azhi/cpsim | a10a3e068a8a319e66cc9cf8a6c9c97457d9bf8b | [
"MIT"
] | null | null | null | defmodule CPSIM.BackendWeb.ErrorView do
use CPSIM.BackendWeb, :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 status ... | 32.176471 | 83 | 0.722121 |
627218885ef77ce29537db626f9fc43e195ea280 | 1,658 | ex | Elixir | clients/gmail/lib/google_api/gmail/v1/model/watch_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/gmail/lib/google_api/gmail/v1/model/watch_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/gmail/lib/google_api/gmail/v1/model/watch_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... | 33.16 | 194 | 0.722557 |
62722294b5bec19bcc21b60f2b611428ba58ade8 | 400 | ex | Elixir | lib/log_analyzer/supervisor.ex | ColdOrange/log_analyzer | a48566addc154d1bc2a0434b78b36562ac15f130 | [
"MIT"
] | null | null | null | lib/log_analyzer/supervisor.ex | ColdOrange/log_analyzer | a48566addc154d1bc2a0434b78b36562ac15f130 | [
"MIT"
] | null | null | null | lib/log_analyzer/supervisor.ex | ColdOrange/log_analyzer | a48566addc154d1bc2a0434b78b36562ac15f130 | [
"MIT"
] | null | null | null | defmodule LogAnalyzer.Supervisor do
use Supervisor
def start_link() do
Supervisor.start_link(__MODULE__, :ok, name: __MODULE__)
end
def init(:ok) do
children = [
{LogAnalyzer.Repo.Supervisor, []},
{LogAnalyzer.DBConfig, []},
{LogAnalyzer.LogConfig, []},
{LogAnalyzer.Server, por... | 21.052632 | 60 | 0.66 |
627232fb758ffc1844121504bc0e16be2ef15a5a | 2,635 | exs | Elixir | apps/ewallet_db/priv/repo/seeds_sample/00_admin_panel_user.exs | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 322 | 2018-02-28T07:38:44.000Z | 2020-05-27T23:09:55.000Z | apps/ewallet_db/priv/repo/seeds_sample/00_admin_panel_user.exs | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 643 | 2018-02-28T12:05:20.000Z | 2020-05-22T08:34:38.000Z | apps/ewallet_db/priv/repo/seeds_sample/00_admin_panel_user.exs | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 63 | 2018-02-28T10:57:06.000Z | 2020-05-27T23:10:38.000Z | # Copyright 2018-2019 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 ... | 27.164948 | 83 | 0.590892 |
62725d33ff5fc7c80db8dbc0518cd999d7350ea5 | 86 | exs | Elixir | test/turtle_tube_web/views/page_view_test.exs | ConnorRigby/turtletube_web | 0e6618395918234584edbb74ccceb589fc79bc68 | [
"MIT"
] | null | null | null | test/turtle_tube_web/views/page_view_test.exs | ConnorRigby/turtletube_web | 0e6618395918234584edbb74ccceb589fc79bc68 | [
"MIT"
] | null | null | null | test/turtle_tube_web/views/page_view_test.exs | ConnorRigby/turtletube_web | 0e6618395918234584edbb74ccceb589fc79bc68 | [
"MIT"
] | null | null | null | defmodule TurtleTubeWeb.PageViewTest do
use TurtleTubeWeb.ConnCase, async: true
end
| 21.5 | 41 | 0.837209 |
62726c1136a998d20583b3e1ebd5397fb3b2670d | 523 | ex | Elixir | lib/suomidev/votes/like.ex | yliaho/suomi.dev | 4e1946adbeb67cebdc1b7e2009ddecf66497a9c7 | [
"MIT"
] | 19 | 2020-08-24T02:50:26.000Z | 2021-05-31T20:54:30.000Z | lib/suomidev/votes/like.ex | yliaho/suomi.dev | 4e1946adbeb67cebdc1b7e2009ddecf66497a9c7 | [
"MIT"
] | 2 | 2020-08-24T06:59:46.000Z | 2020-08-26T09:51:40.000Z | lib/suomidev/votes/like.ex | yliaho/suomi.dev | 4e1946adbeb67cebdc1b7e2009ddecf66497a9c7 | [
"MIT"
] | 6 | 2020-08-26T02:52:48.000Z | 2022-03-08T12:55:51.000Z | defmodule Suomidev.Votes.Like do
use Ecto.Schema
import Ecto.Changeset
alias Suomidev.Accounts.User
alias Suomidev.Submissions.Submission
@primary_key false
schema "likes" do
belongs_to :user, User
belongs_to :submission, Submission
timestamps()
end
def changeset(like, attrs) do
like
... | 22.73913 | 89 | 0.724665 |
6272e7b3900d009ba9c45ca34227c9df6f431173 | 199 | exs | Elixir | test/controllers/page_controller_test.exs | meilab/meilab_blog | 86fca779c8b01559440ea3f686695700e8cf5ed2 | [
"MIT"
] | null | null | null | test/controllers/page_controller_test.exs | meilab/meilab_blog | 86fca779c8b01559440ea3f686695700e8cf5ed2 | [
"MIT"
] | null | null | null | test/controllers/page_controller_test.exs | meilab/meilab_blog | 86fca779c8b01559440ea3f686695700e8cf5ed2 | [
"MIT"
] | null | null | null | defmodule MeilabBlog.PageControllerTest do
use MeilabBlog.ConnCase
test "GET /", %{conn: conn} do
conn = get conn, "/"
assert html_response(conn, 200) =~ "Welcome to Phoenix!"
end
end
| 22.111111 | 60 | 0.683417 |
6272fc15e6ec28ffc18370b57586f203ba4f7c3a | 2,908 | ex | Elixir | lib/storage/ets.ex | linduxed/plug_attack | 34d68548147ce3929482138712f0b2ab4ea7279f | [
"Apache-2.0"
] | null | null | null | lib/storage/ets.ex | linduxed/plug_attack | 34d68548147ce3929482138712f0b2ab4ea7279f | [
"Apache-2.0"
] | null | null | null | lib/storage/ets.ex | linduxed/plug_attack | 34d68548147ce3929482138712f0b2ab4ea7279f | [
"Apache-2.0"
] | null | null | null | defmodule PlugAttack.Storage.Ets do
@moduledoc """
Storage solution for PlugAttack using a local ets table.
## Usage
You need to start the process in your supervision tree, for example:
children = [
# ...
worker(PlugAttack.Storage.Ets, [MyApp.PlugAttackStorage])
]
This will lat... | 23.264 | 89 | 0.622077 |
6273380b44f13ff766ba0ded1aeaa578775798d9 | 20,259 | ex | Elixir | lib/cldr/backend/interval.ex | fertapric/cldr_dates_times | d1eff81c7a6e4d84484646465650d26d5dfc51db | [
"Apache-2.0"
] | null | null | null | lib/cldr/backend/interval.ex | fertapric/cldr_dates_times | d1eff81c7a6e4d84484646465650d26d5dfc51db | [
"Apache-2.0"
] | null | null | null | lib/cldr/backend/interval.ex | fertapric/cldr_dates_times | d1eff81c7a6e4d84484646465650d26d5dfc51db | [
"Apache-2.0"
] | null | null | null | defmodule Cldr.Interval.Backend do
@moduledoc false
def define_interval_module(config) do
backend = config.backend
config = Macro.escape(config)
quote location: :keep, bind_quoted: [config: config, backend: backend] do
defmodule Interval do
@moduledoc """
Interval formats allow f... | 39.568359 | 106 | 0.603238 |
6273a9de2a3ca541996689f2067275baa4cd76dd | 1,051 | ex | Elixir | lib/unf_swuber.ex | Swuber/Epik-Club | 0e56e602f0934e0e6225c7456bcb37f5b852be2d | [
"Apache-2.0"
] | 2 | 2017-04-23T17:31:55.000Z | 2017-07-22T12:54:24.000Z | lib/unf_swuber.ex | Swuber/Epik-Club | 0e56e602f0934e0e6225c7456bcb37f5b852be2d | [
"Apache-2.0"
] | 7 | 2017-04-11T18:42:57.000Z | 2017-04-16T22:54:11.000Z | lib/unf_swuber.ex | MichaelDimmitt/unf-swuber | 7c205c6e80bcc3ef4ee55490ad497061253bcc61 | [
"Apache-2.0"
] | 3 | 2017-08-10T22:54:28.000Z | 2018-10-18T22:32:55.000Z | defmodule UnfSwuber do
use Application
# See http://elixir-lang.org/docs/stable/elixir/Application.html
# for more information on OTP Applications
def start(_type, _args) do
import Supervisor.Spec
# Define workers and child supervisors to be supervised
children = [
# Start the Ecto repositor... | 32.84375 | 87 | 0.716461 |
6273bac76255f57c2f0e018ed601805ad19efaae | 4,744 | exs | Elixir | test/phoenix/event_handler_test.exs | taverngoal/appsignal-elixir | b7a991e14ff2482131daef0071f27b3d6b32b649 | [
"MIT"
] | null | null | null | test/phoenix/event_handler_test.exs | taverngoal/appsignal-elixir | b7a991e14ff2482131daef0071f27b3d6b32b649 | [
"MIT"
] | null | null | null | test/phoenix/event_handler_test.exs | taverngoal/appsignal-elixir | b7a991e14ff2482131daef0071f27b3d6b32b649 | [
"MIT"
] | null | null | null | defmodule Appsignal.Phoenix.EventHandlerTest do
use ExUnit.Case, async: true
alias Appsignal.FakeTransaction
setup do
{:ok, fake_transaction} = FakeTransaction.start_link()
[fake_transaction: fake_transaction]
end
describe "after receiving a router_dispatch-start event" do
setup [:start_transac... | 30.606452 | 96 | 0.678331 |
6273ca23b8e7194fb69a61a143b8cd6a5718ea50 | 1,003 | ex | Elixir | apps/game/lib/board.ex | artvinn/phoenix-tictactoe | 14f9a7dcc18449d8cba755c5625b665b7cfccfff | [
"MIT"
] | 1 | 2019-03-11T09:12:16.000Z | 2019-03-11T09:12:16.000Z | apps/game/lib/board.ex | artvinn/phoenix-tictactoe | 14f9a7dcc18449d8cba755c5625b665b7cfccfff | [
"MIT"
] | null | null | null | apps/game/lib/board.ex | artvinn/phoenix-tictactoe | 14f9a7dcc18449d8cba755c5625b665b7cfccfff | [
"MIT"
] | 1 | 2020-09-26T00:37:30.000Z | 2020-09-26T00:37:30.000Z | defmodule Game.Board do
# Our game board will be a simple list of 9 elements,
# with :empty value for empty cell and :x or :o for a captured cell
def new(), do: List.duplicate(:empty, 9)
def put(_board, position, _value) when position not in 0..8, do: {:error, "Out of range"}
def put(_board, _position, valu... | 27.108108 | 91 | 0.569292 |
6273eb910450e20d5eabc2e24477e63a7ae19ad7 | 1,976 | ex | Elixir | apps/nectar/web/gateways/braintree.ex | saurabharch/nectarcommerce | 3497ab8f0c3fcf5a679dc112d905fea9e6df45ac | [
"MIT"
] | 356 | 2016-03-16T12:37:28.000Z | 2021-12-18T03:22:39.000Z | apps/nectar/web/gateways/braintree.ex | sshyran/elixir-nectar-commerce | 87f846ef1bc5cd2d675165b468ae7014dd4fe354 | [
"MIT"
] | 30 | 2016-03-16T09:19:10.000Z | 2021-01-12T08:10:52.000Z | apps/nectar/web/gateways/braintree.ex | sshyran/nectarcommerce | 3497ab8f0c3fcf5a679dc112d905fea9e6df45ac | [
"MIT"
] | 72 | 2016-03-16T13:32:14.000Z | 2021-03-23T11:27:43.000Z | defmodule Nectar.Gateway.Braintree do
alias Nectar.Repo
alias Commerce.Billing.Address
alias Commerce.Billing.CreditCard
alias Commerce.Billing
alias Nectar.Billing.Gateways.BraintreeImpl
def authorize(order, %{"nonce" => nonce}) do
billing_address = get_billing_address(order)
nonce = nonce
cas... | 28.637681 | 98 | 0.648785 |
62741efce171a057bced6dd64f6c5fe7e8b7775c | 976 | exs | Elixir | config/dev.exs | selfup/unigen_visualizer | 8c80290e71ff485f815929a0fe7269034345fea4 | [
"MIT"
] | null | null | null | config/dev.exs | selfup/unigen_visualizer | 8c80290e71ff485f815929a0fe7269034345fea4 | [
"MIT"
] | null | null | null | config/dev.exs | selfup/unigen_visualizer | 8c80290e71ff485f815929a0fe7269034345fea4 | [
"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 :uni_api, UniApi.Endpoint,
http: [port: 4000],... | 28.705882 | 68 | 0.705943 |
62742797576489550295189af55c217fbca8df98 | 712 | ex | Elixir | lib/espec/assertions/result/be_error_result.ex | MeneDev/espec | ec4b3d579c5192999e930224a8a2650bb1fdf0bc | [
"Apache-2.0"
] | 807 | 2015-03-25T14:00:19.000Z | 2022-03-24T08:08:15.000Z | lib/espec/assertions/result/be_error_result.ex | MeneDev/espec | ec4b3d579c5192999e930224a8a2650bb1fdf0bc | [
"Apache-2.0"
] | 254 | 2015-03-27T10:12:25.000Z | 2021-07-12T01:40:15.000Z | lib/espec/assertions/result/be_error_result.ex | MeneDev/espec | ec4b3d579c5192999e930224a8a2650bb1fdf0bc | [
"Apache-2.0"
] | 85 | 2015-04-02T10:25:19.000Z | 2021-01-30T21:30:43.000Z | defmodule ESpec.Assertions.Result.BeErrorResult do
@moduledoc """
Defines 'be_ok_result' assertion.
it do: expect({:ok, :result}).to be_ok_result
"""
use ESpec.Assertions.Interface
defp match(tuple, _data) do
case tuple do
{:error, _} -> {true, nil}
_ -> {false, nil}
end
end
defp ... | 26.37037 | 70 | 0.627809 |
62742949688a526786bb917b906c2ff80ef8c274 | 7,387 | ex | Elixir | lib/ash/error/error.ex | kernel-io/ash | cb59a8e09c61913fb0443a84fc894714e9199686 | [
"MIT"
] | 528 | 2019-12-08T01:51:54.000Z | 2022-03-30T10:09:45.000Z | lib/ash/error/error.ex | kernel-io/ash | cb59a8e09c61913fb0443a84fc894714e9199686 | [
"MIT"
] | 278 | 2019-12-04T15:25:06.000Z | 2022-03-31T03:40:51.000Z | lib/ash/error/error.ex | kernel-io/ash | cb59a8e09c61913fb0443a84fc894714e9199686 | [
"MIT"
] | 53 | 2020-08-17T22:08:09.000Z | 2022-03-24T01:58:59.000Z | defmodule Ash.Error do
@moduledoc """
Tools and utilities used by Ash to manage and conform errors
"""
alias Ash.Error.{Forbidden, Framework, Invalid, Unknown}
@type error_class() :: :invalid | :authorization | :framework | :unknown
@type t :: struct
# We use these error classes also to choose a singl... | 26.764493 | 91 | 0.611209 |
627433753460bfab1336b8058de21d0ecba1cc90 | 1,978 | exs | Elixir | clients/my_business_account_management/mix.exs | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/my_business_account_management/mix.exs | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/my_business_account_management/mix.exs | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 29.522388 | 160 | 0.674924 |
62743962f8827b578823cf0e8265b121dbd6cffd | 1,028 | ex | Elixir | lib/real_world/application.ex | mihkelal/mihkels-elixir-phoenix-realworld-example-app | f241093522b394c816e7bab8ccf5f18fdd854ac6 | [
"MIT"
] | 2 | 2021-09-02T23:20:13.000Z | 2021-11-15T09:39:48.000Z | lib/real_world/application.ex | mihkelal/mihkels-elixir-phoenix-realworld-example-app | f241093522b394c816e7bab8ccf5f18fdd854ac6 | [
"MIT"
] | 4 | 2021-03-23T19:01:21.000Z | 2021-03-30T18:27:24.000Z | lib/real_world/application.ex | mihkelal/mihkels-elixir-phoenix-realworld-example-app | f241093522b394c816e7bab8ccf5f18fdd854ac6 | [
"MIT"
] | null | null | null | defmodule RealWorld.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
children = [
# Start the Ecto repository
RealWorld.Repo,
# Start the Telemetry supervisor
Rea... | 29.371429 | 67 | 0.707198 |
6274792d6cfe1a744a5409a7c30d911ac560adb5 | 135 | exs | Elixir | .formatter.exs | mattiaslundberg/uptime | cef2657e5b5a4a851c088947ee9050c3b31dabdf | [
"MIT"
] | null | null | null | .formatter.exs | mattiaslundberg/uptime | cef2657e5b5a4a851c088947ee9050c3b31dabdf | [
"MIT"
] | null | null | null | .formatter.exs | mattiaslundberg/uptime | cef2657e5b5a4a851c088947ee9050c3b31dabdf | [
"MIT"
] | null | null | null | # Used by "mix format"
[
inputs: ["mix.exs", "{config,lib,test,priv}/**/*.{ex,exs}"],
locals_without_parens: [
config: 2
]
]
| 16.875 | 62 | 0.57037 |
6274943347cddb675f335411e7982f2d7d794f33 | 4,282 | ex | Elixir | clients/cloud_kms/lib/google_api/cloud_kms/v1/model/crypto_key.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/cloud_kms/lib/google_api/cloud_kms/v1/model/crypto_key.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/cloud_kms/lib/google_api/cloud_kms/v1/model/crypto_key.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... | 62.970588 | 450 | 0.737739 |
6274cab27f494933d6ef38aca40a68b75df8e38f | 5,602 | ex | Elixir | lib/extensions/email_confirmation/ecto/schema.ex | randaalex/pow | 2a8c8db4652f7cb2c58d3a897e02b1d47e76f27b | [
"MIT"
] | 1 | 2021-06-25T10:36:01.000Z | 2021-06-25T10:36:01.000Z | lib/extensions/email_confirmation/ecto/schema.ex | randaalex/pow | 2a8c8db4652f7cb2c58d3a897e02b1d47e76f27b | [
"MIT"
] | null | null | null | lib/extensions/email_confirmation/ecto/schema.ex | randaalex/pow | 2a8c8db4652f7cb2c58d3a897e02b1d47e76f27b | [
"MIT"
] | null | null | null | defmodule PowEmailConfirmation.Ecto.Schema do
@moduledoc """
Handles the e-mail confirmation schema for user.
## Customize PowEmailConfirmation fields
If you need to modify any of the fields that `PowEmailConfirmation` adds to
the user schema, you can override them by defining them before
`pow_user_fields... | 31.296089 | 139 | 0.707783 |
6274cda74270ba56515692fd24ab7978cf07402c | 509 | exs | Elixir | test/apps/phoenix-app/config/test.exs | karolsluszniak/cloudless-box | ed7189e50f7c4b4c36b682e09b117fb1ba907b0f | [
"MIT"
] | 15 | 2015-10-15T20:58:00.000Z | 2021-08-28T19:50:42.000Z | test/apps/phoenix-app/config/test.exs | karolsluszniak/cloudless-box | ed7189e50f7c4b4c36b682e09b117fb1ba907b0f | [
"MIT"
] | 1 | 2016-08-21T15:50:34.000Z | 2016-08-21T18:24:07.000Z | test/apps/phoenix-app/config/test.exs | karolsluszniak/cloudless-box | ed7189e50f7c4b4c36b682e09b117fb1ba907b0f | [
"MIT"
] | null | null | null | use Mix.Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :phoenix_app, PhoenixApp.Endpoint,
http: [port: 4001],
server: false
# Print only warnings and errors during test
config :logger, level: :warn
# Configure your database
config :phoenix_app, Ph... | 25.45 | 56 | 0.742633 |
6274d48f7cbdeed7e7872772e944b8614bcc81eb | 59 | ex | Elixir | web/views/layout_view.ex | alissonfpmorais/tucano | d22480fc416d14b44862be2ed89040d92b7c08d1 | [
"MIT"
] | null | null | null | web/views/layout_view.ex | alissonfpmorais/tucano | d22480fc416d14b44862be2ed89040d92b7c08d1 | [
"MIT"
] | null | null | null | web/views/layout_view.ex | alissonfpmorais/tucano | d22480fc416d14b44862be2ed89040d92b7c08d1 | [
"MIT"
] | null | null | null | defmodule Tucano.LayoutView do
use Tucano.Web, :view
end
| 14.75 | 30 | 0.779661 |
6274e99756623e21feb03d9dc78a0f3d5f31126c | 83 | ex | Elixir | web/views/layout_view.ex | rjdellecese/hon-graffiti-phoenix | a1ee866ef89f9b8ebb45a644db0b19729a37b07d | [
"MIT"
] | null | null | null | web/views/layout_view.ex | rjdellecese/hon-graffiti-phoenix | a1ee866ef89f9b8ebb45a644db0b19729a37b07d | [
"MIT"
] | null | null | null | web/views/layout_view.ex | rjdellecese/hon-graffiti-phoenix | a1ee866ef89f9b8ebb45a644db0b19729a37b07d | [
"MIT"
] | null | null | null | defmodule HonGraffitiPhoenix.LayoutView do
use HonGraffitiPhoenix.Web, :view
end
| 20.75 | 42 | 0.843373 |
627503524d4324fb2cb737ec3103df3382b1c936 | 1,344 | ex | Elixir | lib/hexpm_web/controllers/api/repository_controller.ex | Benjamin-Philip/hexpm | 6f38244f81bbabd234c660f46ea973849ba77a7f | [
"Apache-2.0"
] | 691 | 2017-03-08T09:15:45.000Z | 2022-03-23T22:04:47.000Z | lib/hexpm_web/controllers/api/repository_controller.ex | Benjamin-Philip/hexpm | 6f38244f81bbabd234c660f46ea973849ba77a7f | [
"Apache-2.0"
] | 491 | 2017-03-07T12:58:42.000Z | 2022-03-29T23:32:54.000Z | lib/hexpm_web/controllers/api/repository_controller.ex | Benjamin-Philip/hexpm | 6f38244f81bbabd234c660f46ea973849ba77a7f | [
"Apache-2.0"
] | 200 | 2017-03-12T23:03:39.000Z | 2022-03-05T17:55:52.000Z | defmodule HexpmWeb.API.RepositoryController do
use HexpmWeb, :controller
plug :fetch_repository when action in [:show]
plug :maybe_authorize, [domain: "api", resource: "read"] when action in [:index]
plug :maybe_authorize,
[domain: "api", resource: "read", fun: &repository_access/2]
when action ... | 28 | 82 | 0.689732 |
62750e0e112c6852cb6d972becf4f329dd9fa284 | 580 | ex | Elixir | lib/mail_slurp_api/model/expired_inbox_dto.ex | sumup-bank/mailslurp-client-elixir | 87ccdedf2f0f4cd3e50f5781ffb088142e3cf4e8 | [
"MIT"
] | 1 | 2021-06-17T18:07:49.000Z | 2021-06-17T18:07:49.000Z | lib/mail_slurp_api/model/expired_inbox_dto.ex | sumup-bank/mailslurp-client-elixir | 87ccdedf2f0f4cd3e50f5781ffb088142e3cf4e8 | [
"MIT"
] | null | null | null | lib/mail_slurp_api/model/expired_inbox_dto.ex | sumup-bank/mailslurp-client-elixir | 87ccdedf2f0f4cd3e50f5781ffb088142e3cf4e8 | [
"MIT"
] | 1 | 2021-03-16T18:55:56.000Z | 2021-03-16T18:55:56.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 MailSlurpAPI.Model.ExpiredInboxDto do
@moduledoc """
Expired inbox
"""
@derive [Poison.Encoder]
defstruct [
:"emailAddress",
:"id",... | 19.333333 | 91 | 0.665517 |
62750f597085df50c3b48b85abd6459a2837e95d | 10,591 | ex | Elixir | lib/natural_set.ex | standupdev/naturalset | ebdf8dc01d70559f1ed3cbb9d85660eeda49050e | [
"BSD-2-Clause"
] | 2 | 2020-08-28T03:11:02.000Z | 2020-09-05T07:50:08.000Z | lib/natural_set.ex | standupdev/natural_set | ebdf8dc01d70559f1ed3cbb9d85660eeda49050e | [
"BSD-2-Clause"
] | null | null | null | lib/natural_set.ex | standupdev/natural_set | ebdf8dc01d70559f1ed3cbb9d85660eeda49050e | [
"BSD-2-Clause"
] | null | null | null | defmodule NaturalSet do
@moduledoc """
Functions that work on sets of small integers >= 0.
`NaturalSet` is an alternative set type in Elixir
emulating the `MapSet` interface as closely as possible,
with one important limitation: every element must be a non-negative integers.
Many of the `Natural... | 27.725131 | 104 | 0.638183 |
6275111ae7a1aaae61297de4d90eb2a7c9fef2b5 | 368 | ex | Elixir | lib/arkecosystem/crypto/identities/wif.ex | whitehat/elixir-crypto | 6347868ee15c7b79676df58bef54376a8dc6fd02 | [
"MIT"
] | null | null | null | lib/arkecosystem/crypto/identities/wif.ex | whitehat/elixir-crypto | 6347868ee15c7b79676df58bef54376a8dc6fd02 | [
"MIT"
] | null | null | null | lib/arkecosystem/crypto/identities/wif.ex | whitehat/elixir-crypto | 6347868ee15c7b79676df58bef54376a8dc6fd02 | [
"MIT"
] | null | null | null | defmodule ArkEcosystem.Crypto.Identities.WIF do
alias ArkEcosystem.Crypto.Helpers.Base58Check
alias ArkEcosystem.Crypto.Configuration.Network
def from_passphrase(passphrase, network \\ nil) do
network = network || Network.get()
passphrase = :crypto.hash(:sha256, passphrase) <> <<1>>
Base58Check.encod... | 33.454545 | 59 | 0.752717 |
62753997edc7d67aef99805558155aea7b102a76 | 2,933 | ex | Elixir | clients/display_video/lib/google_api/display_video/v1/model/insertion_order_budget_segment.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/display_video/lib/google_api/display_video/v1/model/insertion_order_budget_segment.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/display_video/lib/google_api/display_video/v1/model/insertion_order_budget_segment.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... | 52.375 | 509 | 0.742925 |
62757e74ff1688643490b910f0764167f60616e2 | 144 | exs | Elixir | test/ccb_import_test.exs | msawka/ccb_import | da9dfb22fdf016c6bcfc19f4e9b00e67f4137a20 | [
"Apache-2.0"
] | null | null | null | test/ccb_import_test.exs | msawka/ccb_import | da9dfb22fdf016c6bcfc19f4e9b00e67f4137a20 | [
"Apache-2.0"
] | null | null | null | test/ccb_import_test.exs | msawka/ccb_import | da9dfb22fdf016c6bcfc19f4e9b00e67f4137a20 | [
"Apache-2.0"
] | null | null | null | defmodule CcbImportTest do
use ExUnit.Case
doctest CcbImport
test "greets the world" do
assert CcbImport.hello() == :world
end
end
| 16 | 38 | 0.722222 |
6275bb61cff6fa06dd869f0e67f27221dc1dd54b | 1,169 | ex | Elixir | web/channels/user_socket.ex | mehmetboraezer/elephant | 2e23af1b632fbef0a1371acd3ae27bd063e1212e | [
"Apache-2.0"
] | null | null | null | web/channels/user_socket.ex | mehmetboraezer/elephant | 2e23af1b632fbef0a1371acd3ae27bd063e1212e | [
"Apache-2.0"
] | null | null | null | web/channels/user_socket.ex | mehmetboraezer/elephant | 2e23af1b632fbef0a1371acd3ae27bd063e1212e | [
"Apache-2.0"
] | null | null | null | defmodule Elephant.UserSocket do
use Phoenix.Socket
## Channels
# channel "room:*", Elephant.RoomChannel
## Transports
transport :websocket, Phoenix.Transports.WebSocket
# transport :longpoll, Phoenix.Transports.LongPoll
# Socket params are passed from the client and can
# be used to verify and authe... | 30.763158 | 83 | 0.70231 |
6275e3493cf90853545ea5dada573964e50dc8a2 | 373 | ex | Elixir | synapse.ex | jjcarstens/synapse | e0c432dc5505ba035bd19ba43379cfb551921120 | [
"Apache-2.0"
] | 3 | 2018-10-18T15:06:34.000Z | 2020-02-04T05:57:06.000Z | synapse.ex | jjcarstens/synapse | e0c432dc5505ba035bd19ba43379cfb551921120 | [
"Apache-2.0"
] | null | null | null | synapse.ex | jjcarstens/synapse | e0c432dc5505ba035bd19ba43379cfb551921120 | [
"Apache-2.0"
] | null | null | null | defmodule Synapse do
use Application
@impl true
def start(_type, _args) do
children = [
{DynamicSupervisor, strategy: :one_for_one, name: Synapse.Supervisor},
{Registry, keys: :unique, name: Registry.GPIO}
]
Supervisor.start_link(children, strategy: :one_for_one)
end
def gpio_via(gp... | 23.3125 | 76 | 0.686327 |
6275ed0a4bb92f918b60f1f3bb0545dedf0f726c | 571 | exs | Elixir | test/boilerplate_web/views/error_view_test.exs | chernyshof/react-phoenix-users-boilerplate | 2642c88aadff377f38dce5a85a3caa7f4b088588 | [
"MIT"
] | 152 | 2017-05-29T06:04:01.000Z | 2021-12-11T19:24:02.000Z | test/boilerplate_web/views/error_view_test.exs | chernyshof/react-phoenix-users-boilerplate | 2642c88aadff377f38dce5a85a3caa7f4b088588 | [
"MIT"
] | 13 | 2017-07-29T18:26:37.000Z | 2018-10-26T08:33:16.000Z | test/boilerplate_web/views/error_view_test.exs | chernyshof/react-phoenix-users-boilerplate | 2642c88aadff377f38dce5a85a3caa7f4b088588 | [
"MIT"
] | 12 | 2017-11-18T19:13:44.000Z | 2019-10-10T01:29:28.000Z | defmodule BoilerplateWeb.ErrorViewTest do
use BoilerplateWeb.ConnCase, async: true
# Bring render/3 and render_to_string/3 for testing custom views
import Phoenix.View
test "renders 404.html" do
assert render_to_string(BoilerplateWeb.ErrorView, "404.html", []) == "Page not found"
end
test "renders 50... | 30.052632 | 96 | 0.735552 |
6275fb658d2f00d0ddb9c1b08f573088cea34381 | 403 | ex | Elixir | lib/ex_no_cache/application.ex | zentetsukenz/ex_no_cache | b88c02ab0c91d81a1e4d516f843310f2d7db45df | [
"Apache-2.0"
] | null | null | null | lib/ex_no_cache/application.ex | zentetsukenz/ex_no_cache | b88c02ab0c91d81a1e4d516f843310f2d7db45df | [
"Apache-2.0"
] | null | null | null | lib/ex_no_cache/application.ex | zentetsukenz/ex_no_cache | b88c02ab0c91d81a1e4d516f843310f2d7db45df | [
"Apache-2.0"
] | null | null | null | defmodule ExNoCache.Application do
@moduledoc false
use Application
@doc """
Starts ExNoCache application.
"""
@spec start(any, any) :: {:error, any} | {:ok, pid}
def start(_type, _args) do
children = [
{ExNoCache.Cache.GenServer, []}
]
opts = [
strategy: :one_for_one,
nam... | 17.521739 | 53 | 0.622829 |
6275fba76154103b329bf3a3079ce6dbe310c4bb | 51,650 | ex | Elixir | lib/teslamate/vehicles/vehicle.ex | edward4hgl/teslamate | d61e2fa88b6cb8b9c82146deda0feb33001042ce | [
"MIT"
] | null | null | null | lib/teslamate/vehicles/vehicle.ex | edward4hgl/teslamate | d61e2fa88b6cb8b9c82146deda0feb33001042ce | [
"MIT"
] | null | null | null | lib/teslamate/vehicles/vehicle.ex | edward4hgl/teslamate | d61e2fa88b6cb8b9c82146deda0feb33001042ce | [
"MIT"
] | null | null | null | defmodule TeslaMate.Vehicles.Vehicle do
use GenStateMachine
require Logger
alias __MODULE__.Summary
alias TeslaMate.{Vehicles, Api, Log, Locations, Settings, Convert, Repo, Terrain}
alias TeslaMate.Settings.CarSettings
alias TeslaMate.Locations.GeoFence
alias TeslaMate.Log.Car
alias TeslaApi.Vehicle.... | 34.273391 | 101 | 0.62302 |
627617c79be02da33f12f4b6603693a006d306e7 | 602 | ex | Elixir | test/support/capture_io_frames.ex | kianmeng/owl | 55c0f31438866d79526d1feab44e23728ad88dd6 | [
"Apache-2.0"
] | null | null | null | test/support/capture_io_frames.ex | kianmeng/owl | 55c0f31438866d79526d1feab44e23728ad88dd6 | [
"Apache-2.0"
] | null | null | null | test/support/capture_io_frames.ex | kianmeng/owl | 55c0f31438866d79526d1feab44e23728ad88dd6 | [
"Apache-2.0"
] | null | null | null | defmodule CaptureIOFrames do
import ExUnit.CaptureIO
@render_separator "#@(₴?$0"
def capture_io_frames(callback, opts \\ []) when is_function(callback, 2) do
capture_io(fn ->
live_screen_pid =
ExUnit.Callbacks.start_supervised!(
{Owl.LiveScreen, Keyword.merge([terminal_width: 50], opt... | 24.08 | 78 | 0.627907 |
6276aa50f253bc1be60805cf7260287b181ccd6b | 9,723 | exs | Elixir | test/changelog_web/controllers/admin/episode_controller_test.exs | yanokwa/changelog.com | 88093bada9ff294159246b8200b3121cf41666f7 | [
"MIT"
] | 1 | 2020-10-12T13:28:41.000Z | 2020-10-12T13:28:41.000Z | test/changelog_web/controllers/admin/episode_controller_test.exs | yanokwa/changelog.com | 88093bada9ff294159246b8200b3121cf41666f7 | [
"MIT"
] | null | null | null | test/changelog_web/controllers/admin/episode_controller_test.exs | yanokwa/changelog.com | 88093bada9ff294159246b8200b3121cf41666f7 | [
"MIT"
] | 1 | 2018-10-03T20:55:52.000Z | 2018-10-03T20:55:52.000Z | defmodule ChangelogWeb.Admin.EpisodeControllerTest do
use ChangelogWeb.ConnCase
use Bamboo.Test
import Mock
alias Changelog.{Episode, EpisodeGuest, Github, NewsItem, NewsQueue}
@valid_attrs %{title: "The one where we win", slug: "181-win"}
@invalid_attrs %{title: ""}
setup_with_mocks([
{Github.Pus... | 36.011111 | 104 | 0.685179 |
6276e9ae66e0ec46e71da474d96c3a1a1b10e6c6 | 1,702 | ex | Elixir | clients/android_publisher/lib/google_api/android_publisher/v3/model/apks_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/android_publisher/lib/google_api/android_publisher/v3/model/apks_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/android_publisher/lib/google_api/android_publisher/v3/model/apks_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... | 34.04 | 118 | 0.727967 |
6276ed1bff1c8f263b1b47c83ee1ae29ebac98c6 | 126 | exs | Elixir | test/rem_test.exs | pyzlnar/rem-bot | 100b71949026eb191c1ebf80d64270406f237958 | [
"MIT"
] | 4 | 2022-02-20T13:33:48.000Z | 2022-03-31T00:48:52.000Z | test/rem_test.exs | pyzlnar/rem-bot | 100b71949026eb191c1ebf80d64270406f237958 | [
"MIT"
] | 1 | 2022-02-22T05:42:05.000Z | 2022-02-22T05:42:05.000Z | test/rem_test.exs | pyzlnar/rem-bot | 100b71949026eb191c1ebf80d64270406f237958 | [
"MIT"
] | null | null | null | defmodule RemTest do
use ExUnit.Case
doctest Rem
test "greets the world" do
assert Rem.hello() == :world
end
end
| 14 | 32 | 0.68254 |
6276f19ededc31934293f5d25c66803d37cd914a | 2,042 | ex | Elixir | lib/security/null_security_mechanism.ex | SmartCasual/elixir-zeromq | 91430a6a662399d2d96be731a778e29e8425ce7f | [
"MIT"
] | null | null | null | lib/security/null_security_mechanism.ex | SmartCasual/elixir-zeromq | 91430a6a662399d2d96be731a778e29e8425ce7f | [
"MIT"
] | null | null | null | lib/security/null_security_mechanism.ex | SmartCasual/elixir-zeromq | 91430a6a662399d2d96be731a778e29e8425ce7f | [
"MIT"
] | null | null | null | defmodule ZeroMQ.NullSecurityMechanism do
@moduledoc """
A GenServer which manages the state machine for the NULL security mechanism.
"""
@doc """
Returns a greeting pre-set with the NULL security mechanism.
"""
def greeting do
%ZeroMQ.Greeting{mechanism: "NULL"}
end
use GenServer
@doc """
... | 28.361111 | 110 | 0.667973 |
6276f656ee458a39133ed5ec43f2d0e5078facc4 | 4,369 | exs | Elixir | test/middlewares/query_authorization_test.exs | jotaviobiondo/rajska | d678d501fed0e698d697bb8d58648451091ec1ff | [
"MIT"
] | 24 | 2020-04-22T18:39:53.000Z | 2022-01-07T22:11:36.000Z | test/middlewares/query_authorization_test.exs | jotaviobiondo/rajska | d678d501fed0e698d697bb8d58648451091ec1ff | [
"MIT"
] | 10 | 2020-05-11T12:37:15.000Z | 2021-11-11T01:47:13.000Z | test/middlewares/query_authorization_test.exs | jotaviobiondo/rajska | d678d501fed0e698d697bb8d58648451091ec1ff | [
"MIT"
] | 5 | 2020-05-15T20:14:44.000Z | 2021-06-04T13:17:11.000Z | defmodule Rajska.QueryAuthorizationTest do
use ExUnit.Case, async: true
defmodule Authorization do
use Rajska,
valid_roles: [:viewer, :user, :admin],
super_role: :admin
end
defmodule Schema do
use Absinthe.Schema
def context(ctx), do: Map.put(ctx, :authorization, Authorization)
d... | 31.207143 | 126 | 0.624399 |
6277152a677db31b86ed1eca370b4f4163687962 | 540 | ex | Elixir | server/lib/server_web/router.ex | lsjroberts/fintech-framework-comparison | 5a1194f7de51fc4dcb27215ae1daaeafe63eab65 | [
"MIT"
] | 1 | 2019-06-15T14:14:55.000Z | 2019-06-15T14:14:55.000Z | server/lib/server_web/router.ex | lsjroberts/fintech-framework-comparison | 5a1194f7de51fc4dcb27215ae1daaeafe63eab65 | [
"MIT"
] | null | null | null | server/lib/server_web/router.ex | lsjroberts/fintech-framework-comparison | 5a1194f7de51fc4dcb27215ae1daaeafe63eab65 | [
"MIT"
] | null | null | null | defmodule ServerWeb.Router do
use ServerWeb, :router
pipeline :api do
plug(:accepts, ["json"])
plug(CORSPlug)
end
scope "/api" do
pipe_through(:api)
forward("/", Absinthe.Plug,
schema: ServerWeb.Schema,
analyze_complexity: true,
max_complexity: 1000,
json_codec: Jason
... | 18 | 48 | 0.627778 |
62772b32051a5c4b7366cabc00d05dda3cc1e787 | 22,399 | ex | Elixir | lib/elixir/lib/map.ex | Zanadar/elixir | ef967b3e07f189b9cae37d5b12bd7258619b3e15 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/map.ex | Zanadar/elixir | ef967b3e07f189b9cae37d5b12bd7258619b3e15 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/map.ex | Zanadar/elixir | ef967b3e07f189b9cae37d5b12bd7258619b3e15 | [
"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.351765 | 102 | 0.574267 |
6277359202ecf92d71ff81f294fff9614350698a | 1,728 | ex | Elixir | golden/lib/golden_web/router.ex | NduatiK/marker | a0af6f083feba029ae02221b0ab44cfe865c43bb | [
"Apache-2.0"
] | null | null | null | golden/lib/golden_web/router.ex | NduatiK/marker | a0af6f083feba029ae02221b0ab44cfe865c43bb | [
"Apache-2.0"
] | null | null | null | golden/lib/golden_web/router.ex | NduatiK/marker | a0af6f083feba029ae02221b0ab44cfe865c43bb | [
"Apache-2.0"
] | null | null | null | defmodule GoldenWeb.Router do
use GoldenWeb, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_live_flash
plug :put_root_layout, {GoldenWeb.LayoutView, :root}
plug :protect_from_forgery
plug :put_secure_browser_headers
end
pipeline :api do
plug :a... | 25.791045 | 70 | 0.681134 |
627739444f8bc41bf24553377ec7ca134061b814 | 495 | exs | Elixir | priv/repo/migrations/20160120080228_create_card_member.exs | gridgentoo/ElixirTrelloKanban | 11b91d9d864d2e332a94838d43c7a9b1015e17c6 | [
"MIT"
] | 2,784 | 2016-01-06T03:16:07.000Z | 2022-03-14T03:52:20.000Z | priv/repo/migrations/20160120080228_create_card_member.exs | gridgentoo/ElixirTrelloKanban | 11b91d9d864d2e332a94838d43c7a9b1015e17c6 | [
"MIT"
] | 49 | 2016-01-07T11:48:10.000Z | 2020-04-27T16:10:12.000Z | priv/repo/migrations/20160120080228_create_card_member.exs | gridgentoo/ElixirTrelloKanban | 11b91d9d864d2e332a94838d43c7a9b1015e17c6 | [
"MIT"
] | 586 | 2016-01-11T17:02:13.000Z | 2021-12-01T10:54:47.000Z | defmodule PhoenixTrello.Repo.Migrations.CreateCardMember do
use Ecto.Migration
def change do
create table(:card_members) do
add :card_id, references(:cards, on_delete: :delete_all), null: false
add :user_board_id, references(:user_boards, on_delete: :delete_all), null: false
timestamps
e... | 29.117647 | 87 | 0.725253 |
627762ae4715fcb850754a8e1312e727cf09b7c1 | 1,795 | ex | Elixir | test/support/model_case.ex | mwindholtz/has_many_blog | 521f13c8b91620713a305f44040581276d162abc | [
"Apache-2.0"
] | 7 | 2016-12-15T00:33:22.000Z | 2019-04-24T20:42:17.000Z | test/support/model_case.ex | mwindholtz/has_many_blog | 521f13c8b91620713a305f44040581276d162abc | [
"Apache-2.0"
] | 1 | 2017-07-19T16:41:35.000Z | 2017-07-19T16:41:35.000Z | test/support/model_case.ex | mwindholtz/has_many_blog | 521f13c8b91620713a305f44040581276d162abc | [
"Apache-2.0"
] | 2 | 2017-04-28T21:52:38.000Z | 2020-04-24T14:41:31.000Z | defmodule Blog.ModelCase do
@moduledoc """
This module defines the test case to be used by
model tests.
You may define functions here to be used as helpers in
your model tests. See `errors_on/2`'s definition as reference.
Finally, if the test case interacts with the database,
it cannot be async. For thi... | 27.19697 | 84 | 0.679666 |
6277877c40d6c946bf858b939f6022c7763bb3f8 | 1,957 | exs | Elixir | mix.exs | Jim-Hodapp-Coaching/ambi | aeb7b90d4393fbade4633cdacd55042f6e280f2e | [
"BSD-2-Clause-Patent"
] | null | null | null | mix.exs | Jim-Hodapp-Coaching/ambi | aeb7b90d4393fbade4633cdacd55042f6e280f2e | [
"BSD-2-Clause-Patent"
] | 10 | 2022-02-02T17:50:41.000Z | 2022-03-24T23:50:31.000Z | mix.exs | Jim-Hodapp-Coaching/ambi | aeb7b90d4393fbade4633cdacd55042f6e280f2e | [
"BSD-2-Clause-Patent"
] | null | null | null | defmodule Ambi.MixProject do
use Mix.Project
def project do
[
app: :ambi,
version: "0.1.0",
elixir: "~> 1.13.1",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
start_permanent: Mix.env() == :prod,
aliases: aliases(),
... | 27.957143 | 84 | 0.56464 |
627799f57566236e46f08cb9efd6176c8cb7ff35 | 6,328 | ex | Elixir | lib/realleasy/realleasy.ex | maxdrift/realleasy | f12121b67475a95d6862adb21153bb068fd0e49b | [
"MIT"
] | null | null | null | lib/realleasy/realleasy.ex | maxdrift/realleasy | f12121b67475a95d6862adb21153bb068fd0e49b | [
"MIT"
] | null | null | null | lib/realleasy/realleasy.ex | maxdrift/realleasy | f12121b67475a95d6862adb21153bb068fd0e49b | [
"MIT"
] | null | null | null | defmodule Realleasy do
@moduledoc """
Finds all commits between `rc_branch` and `base_branch`, prompts for a new version
and extracts Changelog information from each commit's PR description.
"""
require Logger
alias ChangelogHelper
alias GitHelper
alias GitHubHelper
@doc """
Inserts a new release ... | 30.718447 | 109 | 0.618363 |
62779bf30a9e7140d5cf9ecea061763ac6bc73f7 | 765 | ex | Elixir | lib/learn/course_contents_body.ex | mark-b-kauffman/bblearn_rest_client | 63fb0da9b8027e385df927f43ec5e9ea4a517570 | [
"BSD-3-Clause"
] | null | null | null | lib/learn/course_contents_body.ex | mark-b-kauffman/bblearn_rest_client | 63fb0da9b8027e385df927f43ec5e9ea4a517570 | [
"BSD-3-Clause"
] | null | null | null | lib/learn/course_contents_body.ex | mark-b-kauffman/bblearn_rest_client | 63fb0da9b8027e385df927f43ec5e9ea4a517570 | [
"BSD-3-Clause"
] | null | null | null | defmodule Learn.CourseContentsBody do
alias Learn.{CourseContentsBody}
import Poison
# JSON: availability\":{\"available\":\"Yes\",\"allowGuests\":true,\"adaptiveRelease\":{}}
defstruct [:parentId, :title, :body, :description, :position, :availability, :contentHandler]
def new_blti_link(parentId, title, url... | 30.6 | 117 | 0.718954 |
6277cced77bffbc4378c7791db5c78df0623b0e6 | 730 | exs | Elixir | test/goon/chaining_test.exs | samgaw/porcelain | 3a19526b61945736e682704c5d873b5dcf7c50ad | [
"MIT"
] | null | null | null | test/goon/chaining_test.exs | samgaw/porcelain | 3a19526b61945736e682704c5d873b5dcf7c50ad | [
"MIT"
] | null | null | null | test/goon/chaining_test.exs | samgaw/porcelain | 3a19526b61945736e682704c5d873b5dcf7c50ad | [
"MIT"
] | null | null | null | defmodule PorcelainTest.ChainingTest do
use ExUnit.Case
alias Porcelain.Result
alias Porcelain.Process, as: Proc
setup_all do
:ok = Porcelain.reinit(Porcelain.Driver.Goon)
end
test "multiple AND filters" do
input = """
squeak
sponge
silly
abcdef
elixir
erlang
"""
... | 22.8125 | 96 | 0.638356 |
6277fb60b680065150389f7964469cdb7b7ae5a2 | 1,113 | ex | Elixir | test/support/conn_case.ex | EBKH/cap-react-webpack | 08638c4e4cc30e2cb35e0299a99a7c68a24f2128 | [
"MIT"
] | null | null | null | test/support/conn_case.ex | EBKH/cap-react-webpack | 08638c4e4cc30e2cb35e0299a99a7c68a24f2128 | [
"MIT"
] | null | null | null | test/support/conn_case.ex | EBKH/cap-react-webpack | 08638c4e4cc30e2cb35e0299a99a7c68a24f2128 | [
"MIT"
] | null | null | null | defmodule CapPhoenixReactWebpackWeb.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.
... | 28.538462 | 84 | 0.738544 |
6278003d716939c3e4d31be96df6a93b89225e19 | 1,037 | ex | Elixir | apps/mishka_html/lib/mishka_html_web/live/components/admin/setting/add_field_component.ex | mishka-group/mishka-cms | 4e34ed646f807687f4ae809e862acb6f2c5aacef | [
"Apache-2.0"
] | 35 | 2021-06-26T09:05:50.000Z | 2022-03-30T15:41:22.000Z | apps/mishka_html/lib/mishka_html_web/live/components/admin/setting/add_field_component.ex | mishka-group/mishka-cms | 4e34ed646f807687f4ae809e862acb6f2c5aacef | [
"Apache-2.0"
] | 101 | 2021-01-01T09:54:07.000Z | 2022-03-28T10:02:24.000Z | apps/mishka_html/lib/mishka_html_web/live/components/admin/setting/add_field_component.ex | mishka-group/mishka-cms | 4e34ed646f807687f4ae809e862acb6f2c5aacef | [
"Apache-2.0"
] | 8 | 2021-01-17T17:08:07.000Z | 2022-03-11T16:12:06.000Z | defmodule MishkaHtmlWeb.Admin.Setting.AddFieldComponent do
use MishkaHtmlWeb, :live_component
def render(assigns) do
~L"""
<div class="col-sm-3 vazir" id="title-<%= @id %>">
<label for="add_field_label<%= @id %>"><%= MishkaTranslator.Gettext.dgettext("html_live_component", "تیتر فیلد:") %></label... | 45.086957 | 142 | 0.598843 |
627853f898c29bb6c80ad55cf7205841c255f0b4 | 4,270 | ex | Elixir | clients/eventarc/lib/google_api/eventarc/v1beta1/model/binding.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/eventarc/lib/google_api/eventarc/v1beta1/model/binding.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/eventarc/lib/google_api/eventarc/v1beta1/model/binding.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... | 80.566038 | 1,972 | 0.752693 |
62785ff2612d5a3923071a57a8607070d4202963 | 24,997 | ex | Elixir | lib/global_supervisor.ex | farhadi/global_supervisor | 3ef5c681abcb802d8bc3ce7e9153f31245fab551 | [
"MIT"
] | 6 | 2019-02-15T20:30:43.000Z | 2021-02-26T03:30:26.000Z | lib/global_supervisor.ex | farhadi/global_supervisor | 3ef5c681abcb802d8bc3ce7e9153f31245fab551 | [
"MIT"
] | null | null | null | lib/global_supervisor.ex | farhadi/global_supervisor | 3ef5c681abcb802d8bc3ce7e9153f31245fab551 | [
"MIT"
] | null | null | null | defmodule GlobalSupervisor do
@moduledoc """
A supervisor that dynamically distributes children across the cluster.
A `GlobalSupervisor` is like a `DynamicSupervisor` that coordinates with other
GlobalSupervisors registered with the same name in the cluster to dynamically
distribute children across the clust... | 32.088575 | 98 | 0.645237 |
6278856e91291b2e488c34a78df2468c553f9e7b | 5,545 | ex | Elixir | clients/you_tube/lib/google_api/you_tube/v3/model/live_chat_message_snippet.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/you_tube/lib/google_api/you_tube/v3/model/live_chat_message_snippet.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/you_tube/lib/google_api/you_tube/v3/model/live_chat_message_snippet.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... | 63.011364 | 525 | 0.733814 |
6278881db0f5dd68dd06dcaaf1c105b1a09ffe02 | 5,228 | ex | Elixir | lib/desk_clock/faces/lazy.ex | mtrudel/desk_clock | 9e6ea5ea58bbab12a7188b3c00237f2a8bf066a6 | [
"MIT"
] | 7 | 2020-07-30T23:58:52.000Z | 2022-01-24T19:10:11.000Z | lib/desk_clock/faces/lazy.ex | mtrudel/desk_clock | 9e6ea5ea58bbab12a7188b3c00237f2a8bf066a6 | [
"MIT"
] | null | null | null | lib/desk_clock/faces/lazy.ex | mtrudel/desk_clock | 9e6ea5ea58bbab12a7188b3c00237f2a8bf066a6 | [
"MIT"
] | 1 | 2020-12-22T15:28:16.000Z | 2020-12-22T15:28:16.000Z | defmodule DeskClock.Faces.Lazy do
@moduledoc """
A face that optimizes writes to be minimal on every pass
"""
@behaviour DeskClock.Face
alias ExPaint.{Color, Font}
@impl DeskClock.Face
def create(upper_zone, lower_zone) do
%{
label_font: Font.load("fixed6x12"),
time_font: Font.load("Ter... | 29.536723 | 100 | 0.663351 |
62788949d4dfad55ff527e428efc65326792f5f5 | 13,957 | ex | Elixir | lib/ex_raft.ex | bajankristof/ex_raft | 09c3234355d2792922b17a71e3c32b3e57f0a277 | [
"Apache-2.0"
] | 1 | 2021-08-25T10:49:26.000Z | 2021-08-25T10:49:26.000Z | lib/ex_raft.ex | bajankristof/ex_raft | 09c3234355d2792922b17a71e3c32b3e57f0a277 | [
"Apache-2.0"
] | null | null | null | lib/ex_raft.ex | bajankristof/ex_raft | 09c3234355d2792922b17a71e3c32b3e57f0a277 | [
"Apache-2.0"
] | null | null | null | defmodule ExRaft do
@moduledoc """
`ExRaft` provides an Elixir implementation and an easy to use API
for the raft consensus protocol.
## Internals
### Servers
When starting an `ExRaft` server, there are 2 processes spawned:
1. a `Supervisor` process that ensures that the logs are not
lost when... | 38.769444 | 110 | 0.675862 |
6278a7c5b239ce61e07cf75883d07304a04ed27d | 1,388 | exs | Elixir | mix.exs | s-bernard/NXRedirect | 057f892ccfe8c1f404e6ed65b05a17e04b14b785 | [
"Apache-2.0"
] | null | null | null | mix.exs | s-bernard/NXRedirect | 057f892ccfe8c1f404e6ed65b05a17e04b14b785 | [
"Apache-2.0"
] | null | null | null | mix.exs | s-bernard/NXRedirect | 057f892ccfe8c1f404e6ed65b05a17e04b14b785 | [
"Apache-2.0"
] | null | null | null | defmodule NXRedirect.Mixfile do
use Mix.Project
def project do
[
app: :nxredirect,
version: "1.0.0",
elixir: "~> 1.6",
description: description(),
package: package(),
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
escript: escript(),
... | 23.525424 | 74 | 0.606628 |
6278c67f06d8f656d05f3d8d9ea5d7e2e3981ed7 | 2,052 | ex | Elixir | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/database_instance_failover_replica.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/database_instance_failover_replica.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/database_instance_failover_replica.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 41.04 | 276 | 0.751949 |
6279065fc290b0893747ac29f5703065a2c67034 | 217 | ex | Elixir | lib/chess_app/chess/board/castling_rights.ex | leobessa/exchess | 289819d183f3001dddf56810c36298fa669c3a06 | [
"MIT"
] | 3 | 2017-06-02T20:47:07.000Z | 2018-05-25T11:17:12.000Z | lib/chess_app/chess/board/castling_rights.ex | leobessa/exchess | 289819d183f3001dddf56810c36298fa669c3a06 | [
"MIT"
] | null | null | null | lib/chess_app/chess/board/castling_rights.ex | leobessa/exchess | 289819d183f3001dddf56810c36298fa669c3a06 | [
"MIT"
] | null | null | null | defmodule ChessApp.Chess.Board.CastlingRights do
@enforce_keys [:white_kingside,:white_queenside,:black_kingside,:black_queenside]
defstruct [:white_kingside,:white_queenside,:black_kingside,:black_queenside]
end
| 43.4 | 83 | 0.843318 |
627917bf1637901f1e03925fabdaed9f14f852a6 | 1,657 | ex | Elixir | lib/membrane_udp/socket.ex | membraneframework/membrane_udp_plugin | 55acb0bfd26f9364a7e1e2f3eee42fd654f57e96 | [
"Apache-2.0"
] | 4 | 2019-02-05T18:33:40.000Z | 2020-08-30T00:15:29.000Z | lib/membrane_udp/socket.ex | membraneframework/membrane_udp_plugin | 55acb0bfd26f9364a7e1e2f3eee42fd654f57e96 | [
"Apache-2.0"
] | 2 | 2020-08-12T09:29:18.000Z | 2020-11-19T13:43:22.000Z | lib/membrane_udp/socket.ex | membraneframework/membrane-element-udp | 55acb0bfd26f9364a7e1e2f3eee42fd654f57e96 | [
"Apache-2.0"
] | null | null | null | defmodule Membrane.UDP.Socket do
@moduledoc false
@enforce_keys [:port_no, :ip_address]
defstruct [:port_no, :ip_address, :socket_handle, sock_opts: []]
@type t :: %__MODULE__{
port_no: :inet.port_number(),
ip_address: :inet.socket_address(),
socket_handle: :gen_udp.socket() | ni... | 33.816327 | 91 | 0.628847 |
62791c1686dc194f028c9580baba4fc0811fa6f6 | 1,765 | ex | Elixir | lib/mppm/game_ui/chat_commands.ex | QBonaventure/mppm | 06047083e3f56e750b60a2c2bd2c430228066e63 | [
"MIT"
] | 6 | 2020-11-18T10:10:51.000Z | 2021-03-17T14:28:36.000Z | lib/mppm/game_ui/chat_commands.ex | QBonaventure/mppm | 06047083e3f56e750b60a2c2bd2c430228066e63 | [
"MIT"
] | 6 | 2020-11-10T21:50:43.000Z | 2021-03-04T09:41:22.000Z | lib/mppm/game_ui/chat_commands.ex | QBonaventure/mppm | 06047083e3f56e750b60a2c2bd2c430228066e63 | [
"MIT"
] | null | null | null | defmodule Mppm.GameUI.ChatCommands do
use GenServer
@behaviour Mppm.GameUI.Module
def name(), do: "ChatCommands"
def execute("hello", _input) do
:ok
end
def execute(_unknown_command, _input) do
:unknown_command
end
###########################################################################... | 26.742424 | 101 | 0.501983 |
62793619342010a0e9dd7df542351e3b6fbf3931 | 2,275 | exs | Elixir | risteys_elixir/test/risteys/icd10_test.exs | vincent-octo/risteys | 5bb1e70b78988770048b91b42fad025faf98d84a | [
"MIT"
] | null | null | null | risteys_elixir/test/risteys/icd10_test.exs | vincent-octo/risteys | 5bb1e70b78988770048b91b42fad025faf98d84a | [
"MIT"
] | null | null | null | risteys_elixir/test/risteys/icd10_test.exs | vincent-octo/risteys | 5bb1e70b78988770048b91b42fad025faf98d84a | [
"MIT"
] | null | null | null | defmodule Risteys.Icd10v2Test do
use ExUnit.Case, async: true
alias Risteys.Icd10
setup_all do
icd10_test_path = "test/data/test_icd10.csv"
{
icd10s,
map_undotted_dotted,
map_child_parent,
map_parent_children
} = Icd10.init_parser(icd10_test_path)
[
icd10s: icd10s... | 24.728261 | 96 | 0.634725 |
62793ae41feaf236461631affaa1052ac764b1e6 | 5,172 | exs | Elixir | test/credo/check/readability/alias_order_test.exs | hrzndhrn/credo | 71a7b24a5ca8e7a48416e0cdfb42cf8a0fef9593 | [
"MIT"
] | 4,590 | 2015-09-28T06:01:43.000Z | 2022-03-29T08:48:57.000Z | test/credo/check/readability/alias_order_test.exs | hrzndhrn/credo | 71a7b24a5ca8e7a48416e0cdfb42cf8a0fef9593 | [
"MIT"
] | 890 | 2015-11-16T21:07:07.000Z | 2022-03-29T08:52:07.000Z | test/credo/check/readability/alias_order_test.exs | hrzndhrn/credo | 71a7b24a5ca8e7a48416e0cdfb42cf8a0fef9593 | [
"MIT"
] | 479 | 2015-11-17T19:42:40.000Z | 2022-03-29T00:09:21.000Z | defmodule Credo.Check.Readability.AliasOrderTest do
use Credo.Test.Case
@described_check Credo.Check.Readability.AliasOrder
#
# cases NOT raising issues
#
test "it should NOT report violation" do
"""
defmodule Test do
alias App.Module1
alias App.Module2
alias Credo.CLI.Command
... | 22.293103 | 90 | 0.638051 |
62793babfa61706113c53a9f630aaadeb10ceb5d | 2,041 | exs | Elixir | elixir/sieve/test/sieve_test.exs | paulfioravanti/exercism | b3bf15814b89b0ef50b9bf062b3c800e80e37e75 | [
"MIT"
] | 6 | 2019-06-19T15:43:20.000Z | 2020-07-17T19:46:09.000Z | elixir/sieve/test/sieve_test.exs | paulfioravanti/exercism | b3bf15814b89b0ef50b9bf062b3c800e80e37e75 | [
"MIT"
] | 10 | 2021-05-10T21:02:55.000Z | 2021-05-11T20:29:41.000Z | elixir/sieve/test/sieve_test.exs | paulfioravanti/exercism | b3bf15814b89b0ef50b9bf062b3c800e80e37e75 | [
"MIT"
] | 1 | 2019-06-25T10:42:14.000Z | 2019-06-25T10:42:14.000Z | defmodule SieveTest do
use ExUnit.Case
test "a few primes" do
assert Sieve.primes_to(10) == [2, 3, 5, 7]
end
test "primes to 1000" do
result = [
2,
3,
5,
7,
11,
13,
17,
19,
23,
29,
31,
37,
41,
43,
47,
53,
... | 11.153005 | 46 | 0.300343 |
62795d98eb64d19fe8021dbcaf390856eb1e2feb | 13,858 | ex | Elixir | clients/service_consumer_management/lib/google_api/service_consumer_management/v1/model/http_rule.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/service_consumer_management/lib/google_api/service_consumer_management/v1/model/http_rule.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/service_consumer_management/lib/google_api/service_consumer_management/v1/model/http_rule.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 177.666667 | 9,771 | 0.744119 |
6279963c87628ce0bd7e1a416d95b7af4374a2a4 | 477 | ex | Elixir | lib/elixfregle.ex | CristianOliveiraDaRosa/elixfregle | f1f078ab2193c4d69cfd8ae6627bd91ce5f3b94a | [
"Artistic-2.0"
] | null | null | null | lib/elixfregle.ex | CristianOliveiraDaRosa/elixfregle | f1f078ab2193c4d69cfd8ae6627bd91ce5f3b94a | [
"Artistic-2.0"
] | null | null | null | lib/elixfregle.ex | CristianOliveiraDaRosa/elixfregle | f1f078ab2193c4d69cfd8ae6627bd91ce5f3b94a | [
"Artistic-2.0"
] | null | null | null | defmodule Elixfregle do
alias Translator
@doc """
Return a translated text of a given `text` `from` language `to` another
language
See language codes on
{http://sites.google.com/site/tomihasa/google-language-codes}
Example:
{ translated: "Ola mundo", original: "Hello word" }
"... | 25.105263 | 75 | 0.672956 |
6279a41e17020493129fa368cd4f2f3f06d2af38 | 1,107 | exs | Elixir | mix.exs | brainn-co/casex | 147e1b3f3623b41e7c779a5d425a42c1748a65dd | [
"Apache-2.0"
] | 12 | 2020-05-05T14:09:31.000Z | 2021-01-09T20:35:24.000Z | mix.exs | brainn-co/casex | 147e1b3f3623b41e7c779a5d425a42c1748a65dd | [
"Apache-2.0"
] | 1 | 2020-06-24T14:25:24.000Z | 2020-06-24T14:25:24.000Z | mix.exs | brainn-co/casex | 147e1b3f3623b41e7c779a5d425a42c1748a65dd | [
"Apache-2.0"
] | null | null | null | defmodule Casex.MixProject do
use Mix.Project
def project do
[
app: :casex,
version: "0.4.1",
elixir: "~> 1.7",
start_permanent: Mix.env() == :prod,
deps: deps(),
elixirc_paths: elixirc_paths(Mix.env()),
description: "Simple case conversion for web applications",
... | 20.886792 | 65 | 0.557362 |
6279a52527db6b5f6481fb29cbe08c62dc006b36 | 813 | exs | Elixir | test/doctor_schedule_web/controllers/api/reset_password_controller_test.exs | theguuholi/doctor_schedule | a92dfa92d1398c59718be2428d36bb326d6bc361 | [
"MIT"
] | 2 | 2022-03-11T12:15:01.000Z | 2022-03-11T13:53:21.000Z | test/doctor_schedule_web/controllers/api/reset_password_controller_test.exs | theguuholi/doctor_schedule | a92dfa92d1398c59718be2428d36bb326d6bc361 | [
"MIT"
] | 3 | 2020-12-12T22:10:17.000Z | 2021-04-05T12:53:12.000Z | test/doctor_schedule_web/controllers/api/reset_password_controller_test.exs | theguuholi/doctor_schedule | a92dfa92d1398c59718be2428d36bb326d6bc361 | [
"MIT"
] | 1 | 2021-02-26T04:24:34.000Z | 2021-02-26T04:24:34.000Z | defmodule DoctorScheduleWeb.Api.ResetPasswordControllerTest do
use DoctorScheduleWeb.ConnCase
alias DoctorSchedule.Accounts.Repositories.AccountRepository
alias DoctorSchedule.Accounts.Services.SendForgotPasswordToEmail
alias DoctorSchedule.UserFixture
setup %{conn: conn} do
conn =
conn
|> p... | 27.1 | 73 | 0.702337 |
6279bb85b5bb087aa17fc4be8011de19c913e95d | 906 | ex | Elixir | lib/espec/assertions/assert_receive.ex | MeneDev/espec | ec4b3d579c5192999e930224a8a2650bb1fdf0bc | [
"Apache-2.0"
] | 807 | 2015-03-25T14:00:19.000Z | 2022-03-24T08:08:15.000Z | lib/espec/assertions/assert_receive.ex | MeneDev/espec | ec4b3d579c5192999e930224a8a2650bb1fdf0bc | [
"Apache-2.0"
] | 254 | 2015-03-27T10:12:25.000Z | 2021-07-12T01:40:15.000Z | lib/espec/assertions/assert_receive.ex | MeneDev/espec | ec4b3d579c5192999e930224a8a2650bb1fdf0bc | [
"Apache-2.0"
] | 85 | 2015-04-02T10:25:19.000Z | 2021-01-30T21:30:43.000Z | defmodule ESpec.Assertions.AssertReceive do
@moduledoc """
Defines 'assert_receive' and 'assert_received' assertions.
it do: assert_receive :hello
"""
use ESpec.Assertions.Interface
@join_sym "\n\t"
defp match(subject, [pattern, _pins, _mailbox_messages]) do
case subject do
{:error, :timeout}... | 26.647059 | 93 | 0.6766 |
6279c85b98934b39f7764629bd94e0e70ef5ff63 | 3,493 | ex | Elixir | apps/packet/lib/packet/puback.ex | tchupp/SteveMQ | a1e84fd5ab9c44094e31a9dee67fe970b3cee163 | [
"BSD-3-Clause"
] | 8 | 2019-12-20T15:44:08.000Z | 2021-01-25T18:30:25.000Z | apps/packet/lib/packet/puback.ex | tchupp/SteveMQ | a1e84fd5ab9c44094e31a9dee67fe970b3cee163 | [
"BSD-3-Clause"
] | 1 | 2019-11-08T17:20:00.000Z | 2019-11-08T17:20:00.000Z | apps/packet/lib/packet/puback.ex | tchupp/SteveMQ | a1e84fd5ab9c44094e31a9dee67fe970b3cee163 | [
"BSD-3-Clause"
] | null | null | null | defmodule Packet.Puback do
use Bitwise
require Logger
@type status :: {:accepted, accept_reasons()} | {:refused, refusal_reasons()}
@type accept_reasons ::
:ok
| :no_matching_subscribers
@type refusal_reasons ::
:unacceptable_protocol_version
| :identifier_rejected
... | 28.398374 | 82 | 0.569425 |
6279e5bfcafb96eb401cd5d64847004d49f04bfe | 537 | ex | Elixir | lib/ash/error/side_load/invalid_query.ex | savish/ash | 7faf73097a6c6f801851e9d89569b6f5e6e87f81 | [
"MIT"
] | null | null | null | lib/ash/error/side_load/invalid_query.ex | savish/ash | 7faf73097a6c6f801851e9d89569b6f5e6e87f81 | [
"MIT"
] | null | null | null | lib/ash/error/side_load/invalid_query.ex | savish/ash | 7faf73097a6c6f801851e9d89569b6f5e6e87f81 | [
"MIT"
] | null | null | null | defmodule Ash.Error.SideLoad.InvalidQuery do
@moduledoc "Used when an invalid query is provided in a side load"
use Ash.Error.Exception
def_ash_error([:side_load_path], class: :invalid)
defimpl Ash.ErrorKind do
def id(_), do: Ash.UUID.generate()
def code(_), do: "invalid_side_load_query"
def cla... | 25.571429 | 77 | 0.690875 |
6279e7ba4bddc60ca9a4f240345d8eb96684b7ba | 274 | ex | Elixir | ex/loqui/lib/loqui/protocol/compressors.ex | NorthIsUp/loqui | 8d394a7951fd3a82d109becc1aebbd9e7ccc894a | [
"MIT"
] | 147 | 2017-10-02T18:16:52.000Z | 2020-03-16T03:26:40.000Z | ex/loqui/lib/loqui/protocol/compressors.ex | NorthIsUp/loqui | 8d394a7951fd3a82d109becc1aebbd9e7ccc894a | [
"MIT"
] | 14 | 2017-09-19T16:13:32.000Z | 2019-06-25T21:18:47.000Z | ex/loqui/lib/loqui/protocol/compressors.ex | NorthIsUp/loqui | 8d394a7951fd3a82d109becc1aebbd9e7ccc894a | [
"MIT"
] | 25 | 2017-10-01T20:10:31.000Z | 2020-03-19T14:00:20.000Z | defmodule Loqui.Protocol.Compressors do
@moduledoc false
@enabled_compressors [NoOp, Gzip]
|> Enum.map(&Module.concat(__MODULE__, &1))
|> Enum.filter(&Code.ensure_compiled?/1)
def all(),
do: @enabled_compressors
end
| 24.909091 | 66 | 0.605839 |
627a3c835eeaa199801a341c62563b48516b2a29 | 1,706 | exs | Elixir | test/livebook_web/plugs/static_plug_test.exs | aleDsz/livebook | 3ad817ac69b8459b684ff8d00c879ae7787b6dcc | [
"Apache-2.0"
] | 1,846 | 2021-04-13T14:46:36.000Z | 2021-07-14T20:37:40.000Z | test/livebook_web/plugs/static_plug_test.exs | aleDsz/livebook | 3ad817ac69b8459b684ff8d00c879ae7787b6dcc | [
"Apache-2.0"
] | 411 | 2021-07-15T07:41:54.000Z | 2022-03-31T21:34:22.000Z | test/livebook_web/plugs/static_plug_test.exs | aleDsz/livebook | 3ad817ac69b8459b684ff8d00c879ae7787b6dcc | [
"Apache-2.0"
] | 130 | 2021-04-13T15:43:55.000Z | 2021-07-12T16:57:46.000Z | defmodule LivebookWeb.StaticPlugTest do
use ExUnit.Case, async: true
use Plug.Test
defmodule MyProvider do
@behaviour LivebookWeb.StaticPlug.Provider
@impl true
def get_file(["app.js"], :gzip) do
%LivebookWeb.StaticPlug.File{content: "content", digest: "digest"}
end
def get_file(["ico... | 25.462687 | 80 | 0.643025 |
627a4af772891f59c4ae281ec8ce792c4b3e859e | 2,740 | exs | Elixir | test/indacoin/helpers_test.exs | akrisanov/indacoin | aa4679c6979ddd78b1c39b38f67070f55b402e56 | [
"MIT"
] | 1 | 2022-03-21T08:32:16.000Z | 2022-03-21T08:32:16.000Z | test/indacoin/helpers_test.exs | akrisanov/indacoin | aa4679c6979ddd78b1c39b38f67070f55b402e56 | [
"MIT"
] | null | null | null | test/indacoin/helpers_test.exs | akrisanov/indacoin | aa4679c6979ddd78b1c39b38f67070f55b402e56 | [
"MIT"
] | 1 | 2019-01-29T09:45:14.000Z | 2019-01-29T09:45:14.000Z | defmodule Indacoin.HelperTest do
use ExUnit.Case, async: true
describe "required_params_present?/2" do
test "returns true when all required keys are present" do
request_params = %{"a" => "", "b" => nil, "c" => "foo", "d" => "bar"}
required_fields = ~w(c d)
assert true == Indacoin.Helpers.requ... | 35.584416 | 99 | 0.637956 |
627a51351be0c2cacb35fd024bd934865ca89f26 | 459 | ex | Elixir | lib/errors.ex | workpathco/firebase-admin-ex | 83305a4bfcc5b1cc7b692eee9d4c93fa080759f2 | [
"MIT"
] | 38 | 2018-05-29T14:22:03.000Z | 2021-11-16T11:33:05.000Z | lib/errors.ex | workpathco/firebase-admin-ex | 83305a4bfcc5b1cc7b692eee9d4c93fa080759f2 | [
"MIT"
] | 8 | 2018-12-05T02:41:12.000Z | 2020-06-24T18:41:21.000Z | lib/errors.ex | workpathco/firebase-admin-ex | 83305a4bfcc5b1cc7b692eee9d4c93fa080759f2 | [
"MIT"
] | 22 | 2018-11-21T03:10:07.000Z | 2022-02-18T01:45:14.000Z | defmodule FirebaseAdminEx.Errors.ApiError do
defexception [:reason]
def exception(reason), do: %__MODULE__{reason: reason}
def message(%__MODULE__{reason: reason}), do: "FirebaseAdminEx::ApiError - #{reason}"
end
defmodule FirebaseAdminEx.Errors.ApiLimitExceeded do
defexception [:reason]
def exception(rea... | 28.6875 | 95 | 0.75817 |
627ab6df8ffebfb9c7fef56fd385a1e0e854c0e6 | 1,353 | ex | Elixir | apps/omg_watcher/lib/omg_watcher/api/transaction.ex | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | null | null | null | apps/omg_watcher/lib/omg_watcher/api/transaction.ex | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | null | null | null | apps/omg_watcher/lib/omg_watcher/api/transaction.ex | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | null | null | null | # 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 ... | 30.066667 | 80 | 0.728012 |
627ac8f4297b537ff3c6ed389ce25bcb86ade14b | 2,208 | ex | Elixir | clients/apigee/lib/google_api/apigee/v1/model/google_cloud_apigee_v1_list_environment_group_attachments_response.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/apigee/lib/google_api/apigee/v1/model/google_cloud_apigee_v1_list_environment_group_attachments_response.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/apigee/lib/google_api/apigee/v1/model/google_cloud_apigee_v1_list_environment_group_attachments_response.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... | 36.8 | 212 | 0.765399 |
627af2a799f659b5f31859c10ca374bd36bf73a4 | 1,750 | exs | Elixir | test/xdr/operations/liquidity_pool_deposit_result_code_test.exs | kommitters/stellar_base | cf36723d5add4fead1029526230299def68048fe | [
"MIT"
] | 3 | 2021-08-17T20:32:45.000Z | 2022-03-13T20:26:02.000Z | test/xdr/operations/liquidity_pool_deposit_result_code_test.exs | kommitters/stellar_base | cf36723d5add4fead1029526230299def68048fe | [
"MIT"
] | 45 | 2021-08-12T20:19:41.000Z | 2022-03-27T21:00:10.000Z | test/xdr/operations/liquidity_pool_deposit_result_code_test.exs | kommitters/stellar_base | cf36723d5add4fead1029526230299def68048fe | [
"MIT"
] | 2 | 2021-09-22T23:11:13.000Z | 2022-01-23T03:19:11.000Z | defmodule StellarBase.XDR.Operations.LiquidityPoolDepositResultCodeTest do
use ExUnit.Case
alias StellarBase.XDR.Operations.LiquidityPoolDepositResultCode
describe "LiquidityPoolDepositResultCode" do
setup do
%{
code: :LIQUIDITY_POOL_DEPOSIT_SUCCESS,
result: LiquidityPoolDepositResultC... | 33.018868 | 91 | 0.692 |
627b1cf86eac733149dce2497e3f3c92b91f76d2 | 949 | ex | Elixir | lib/dnscreen/slack/attachment.ex | serokell/dnscreen | bf59d7eeb058c28581c41cf9582c7d756def899f | [
"CC0-1.0"
] | null | null | null | lib/dnscreen/slack/attachment.ex | serokell/dnscreen | bf59d7eeb058c28581c41cf9582c7d756def899f | [
"CC0-1.0"
] | null | null | null | lib/dnscreen/slack/attachment.ex | serokell/dnscreen | bf59d7eeb058c28581c41cf9582c7d756def899f | [
"CC0-1.0"
] | null | null | null | defmodule DNScreen.Slack.Attachment do
def format(%{"actor" => %{"pretty" => email, "id" => user_id},
"name" => action, "data" => data}) do
%{"fallback" => "", "text" => "#{email} [#{user_id}] #{description(action)}"}
end
def description("account.update"), do: "updated account details"
def d... | 52.722222 | 92 | 0.699684 |
627b63d8f53b9c51b5520e11102678548bb13cea | 1,568 | exs | Elixir | day11/test/day11_test.exs | carlism/aoc_2020 | 5ffdba5d41d243562fa448a92ff02900354956bb | [
"MIT"
] | null | null | null | day11/test/day11_test.exs | carlism/aoc_2020 | 5ffdba5d41d243562fa448a92ff02900354956bb | [
"MIT"
] | null | null | null | day11/test/day11_test.exs | carlism/aoc_2020 | 5ffdba5d41d243562fa448a92ff02900354956bb | [
"MIT"
] | null | null | null | defmodule Day11Test do
use ExUnit.Case
doctest Day11
test "parses the file" do
assert Day11.read_seats("test/input.txt") |> Enum.count() == 100
end
test "calculates a neighborhood" do
assert Day11.neighborhood({0, 0}) |> Enum.count() == 8
end
test "calculates a step" do
assert Day11.read_se... | 33.361702 | 98 | 0.607143 |
627b682806fb0a37c4c2fba6d86067ce4c4835fb | 63 | ex | Elixir | lib/refinery/repo.ex | castingclouds/rc4gho | fdbd6665aa233370c857d63b1d6a22459e1833ce | [
"MIT"
] | null | null | null | lib/refinery/repo.ex | castingclouds/rc4gho | fdbd6665aa233370c857d63b1d6a22459e1833ce | [
"MIT"
] | null | null | null | lib/refinery/repo.ex | castingclouds/rc4gho | fdbd6665aa233370c857d63b1d6a22459e1833ce | [
"MIT"
] | null | null | null | defmodule Rocket.Repo do
use Ecto.Repo, otp_app: :rocket
end
| 15.75 | 33 | 0.761905 |
627b75f280a6ade360b381d58a9a167aede0f595 | 7,772 | exs | Elixir | test/phoenix/integration/channel_test.exs | bitgamma/phoenix | c06fc0fa03a95f2c863c49711da58fedfa56c374 | [
"MIT"
] | null | null | null | test/phoenix/integration/channel_test.exs | bitgamma/phoenix | c06fc0fa03a95f2c863c49711da58fedfa56c374 | [
"MIT"
] | null | null | null | test/phoenix/integration/channel_test.exs | bitgamma/phoenix | c06fc0fa03a95f2c863c49711da58fedfa56c374 | [
"MIT"
] | null | null | null | Code.require_file "websocket_client.exs", __DIR__
Code.require_file "http_client.exs", __DIR__
defmodule Phoenix.Integration.ChannelTest do
use ExUnit.Case, async: false
import RouterHelper, only: [capture_log: 1]
alias Phoenix.Integration.WebsocketClient
alias Phoenix.Integration.HTTPClient
alias Phoenix.S... | 31.212851 | 100 | 0.612841 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.