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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
629c5242f73ab8699f743500af055c9bfe07d8d2 | 3,097 | ex | Elixir | clients/jobs/lib/google_api/jobs/v3/model/compensation_entry.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/jobs/lib/google_api/jobs/v3/model/compensation_entry.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/jobs/lib/google_api/jobs/v3/model/compensation_entry.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... | 49.951613 | 365 | 0.722635 |
629c7c8558ec16c649b098d6b90fe2df9337d2ff | 3,142 | ex | Elixir | clients/surveys/lib/google_api/surveys/v2/model/survey.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/surveys/lib/google_api/surveys/v2/model/survey.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/surveys/lib/google_api/surveys/v2/model/survey.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... | 44.253521 | 218 | 0.737747 |
629c8ea3c44ca94736c6f47969586c3069d447af | 2,336 | ex | Elixir | lib/vow/regex_operator.ex | naramore/ex_spec | d3e52be6efd43f112f58e33f8488434c34608247 | [
"MIT"
] | 2 | 2020-06-18T06:24:24.000Z | 2021-02-21T02:16:37.000Z | lib/vow/regex_operator.ex | naramore/ex_spec | d3e52be6efd43f112f58e33f8488434c34608247 | [
"MIT"
] | 45 | 2019-11-21T10:49:14.000Z | 2021-08-02T10:21:01.000Z | lib/vow/regex_operator.ex | naramore/ex_spec | d3e52be6efd43f112f58e33f8488434c34608247 | [
"MIT"
] | null | null | null | # credo:disable-for-this-file CredoContrib.Check.EmptyDocString
defprotocol Vow.RegexOperator do
@moduledoc """
TODO
"""
alias Vow.{Conformable, ConformError}
@fallback_to_any true
@type conformed :: Conformable.conformed()
@type rest :: maybe_improper_list(term, term) | term
@doc """
"""
@spec ... | 26.850575 | 93 | 0.646404 |
629c9b3db27d4977b76057ff98af26df83667a30 | 1,546 | exs | Elixir | test/models/conversation_test.exs | Frylock13/PhoenixChat | 05f9a14df49a981ce1c9ebf41740577ccb2aae81 | [
"MIT"
] | 1 | 2016-02-24T01:45:57.000Z | 2016-02-24T01:45:57.000Z | test/models/conversation_test.exs | Frylock13/PhoenixChat | 05f9a14df49a981ce1c9ebf41740577ccb2aae81 | [
"MIT"
] | null | null | null | test/models/conversation_test.exs | Frylock13/PhoenixChat | 05f9a14df49a981ce1c9ebf41740577ccb2aae81 | [
"MIT"
] | 1 | 2016-02-24T01:47:02.000Z | 2016-02-24T01:47:02.000Z | defmodule ChatDemo.ConversationTest do
use ChatDemo.ModelCase
use ChatDemo.ConnCase
alias ChatDemo.Conversation
user = Repo.get_by(ChatDemo.User, %{email: "testuser1@gmail.com"})
@valid_attrs %{message: "some content", parent_id: 42, user_id: user.id}
@invalid_attrs %{}
setup do
conn = conn()
|... | 39.641026 | 111 | 0.735446 |
629c9d7349c6de6de56c091d4d757a27b923acd8 | 308 | ex | Elixir | lib/spidey/filter.ex | Manzanit0/spidey | 9d5b1de5bc2f8fa8f925c449aa1ffd5613edf99b | [
"MIT"
] | 4 | 2020-09-14T09:21:01.000Z | 2020-09-19T07:31:40.000Z | lib/spidey/filter.ex | Manzanit0/spidey | 9d5b1de5bc2f8fa8f925c449aa1ffd5613edf99b | [
"MIT"
] | 1 | 2021-03-10T23:19:36.000Z | 2021-04-04T10:59:00.000Z | lib/spidey/filter.ex | Manzanit0/spidey | 9d5b1de5bc2f8fa8f925c449aa1ffd5613edf99b | [
"MIT"
] | null | null | null | defmodule Spidey.Filter do
@type filter_options :: [seed: String.t()]
@doc "Filters the urls"
@callback filter_urls(urls :: [String.t()], opts :: filter_options()) :: Enumerable.t()
def filter_urls(urls, filter, opts \\ []) do
urls
|> filter.filter_urls(opts)
|> Stream.uniq()
end
end
| 25.666667 | 89 | 0.646104 |
629ca263d6593081197ec281099f77e8f0e97b9f | 1,763 | exs | Elixir | mix.exs | manojsamanta/codebreaker-prototype | 14d521db45784dee692de9e7252dd6a54bb793bb | [
"MIT"
] | null | null | null | mix.exs | manojsamanta/codebreaker-prototype | 14d521db45784dee692de9e7252dd6a54bb793bb | [
"MIT"
] | null | null | null | mix.exs | manojsamanta/codebreaker-prototype | 14d521db45784dee692de9e7252dd6a54bb793bb | [
"MIT"
] | null | null | null | defmodule LiveViewDemo.MixProject do
use Mix.Project
def project do
[
app: :live_view_demo,
version: "0.1.0",
elixir: "~> 1.8",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
start_permanent: Mix.env() == :prod,
aliases: al... | 26.712121 | 79 | 0.570618 |
629cb813ac8c5e4223353897355faf751f2a4800 | 2,261 | ex | Elixir | spec/factories/olagarro/pdf/dictionary_factory.ex | CraigCottingham/olagarro | 2679c25cee7e4fdd18a39b504aecd23c1e611133 | [
"Apache-2.0"
] | null | null | null | spec/factories/olagarro/pdf/dictionary_factory.ex | CraigCottingham/olagarro | 2679c25cee7e4fdd18a39b504aecd23c1e611133 | [
"Apache-2.0"
] | null | null | null | spec/factories/olagarro/pdf/dictionary_factory.ex | CraigCottingham/olagarro | 2679c25cee7e4fdd18a39b504aecd23c1e611133 | [
"Apache-2.0"
] | null | null | null | defmodule Olagarro.PDF.Dictionary.Factory do
@moduledoc """
Documentation for Olagarro.PDF.Dictionary.Factory.
"""
use ExMachina
# def dictionary_factory(options \\ []), do: dictionary_data(Keyword.get(options, :type), options)
def dictionary_factory(type, options \\ [])
# Begin a Catalog dictionary
... | 22.386139 | 100 | 0.479876 |
629cc5cc50a74b7bd5eab6f5cc04fd9ebef64bb6 | 1,948 | exs | Elixir | clients/service_networking/mix.exs | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/service_networking/mix.exs | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/service_networking/mix.exs | 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... | 29.074627 | 130 | 0.672485 |
629ce4492ca1047d80dcf8036a2e6a8cacd6199a | 3,269 | ex | Elixir | lib/bolt/cogs/modlog/set.ex | CyberFlameGO/bolt | 225e6276983bec646e7f13519df066e8e1e770ed | [
"ISC"
] | 31 | 2018-12-06T23:12:33.000Z | 2022-03-29T18:34:25.000Z | lib/bolt/cogs/modlog/set.ex | CyberFlameGO/bolt | 225e6276983bec646e7f13519df066e8e1e770ed | [
"ISC"
] | 18 | 2021-06-14T19:03:26.000Z | 2022-03-15T17:46:22.000Z | lib/bolt/cogs/modlog/set.ex | CyberFlameGO/bolt | 225e6276983bec646e7f13519df066e8e1e770ed | [
"ISC"
] | 4 | 2018-11-07T18:52:28.000Z | 2022-03-16T00:14:38.000Z | defmodule Bolt.Cogs.ModLog.Set do
@moduledoc false
@behaviour Nosedrum.Command
alias Bolt.Converters
alias Bolt.ErrorFormatters
alias Bolt.Helpers
alias Bolt.Humanizer
alias Bolt.ModLog
alias Bolt.Repo
alias Bolt.Schema.ModLogConfig
alias Nosedrum.Predicates
alias Nostrum.Api
import Ecto.Query... | 30.839623 | 124 | 0.5855 |
629d44f2bdc2a839fb3b1cde02de4f9d8d1829aa | 1,409 | ex | Elixir | interviews/elixir/server/lib/server_web.ex | zchbndcc9/Interview | c44b3fe09f4d3fa8f8c7f19c099b1f48569a136e | [
"MIT"
] | null | null | null | interviews/elixir/server/lib/server_web.ex | zchbndcc9/Interview | c44b3fe09f4d3fa8f8c7f19c099b1f48569a136e | [
"MIT"
] | null | null | null | interviews/elixir/server/lib/server_web.ex | zchbndcc9/Interview | c44b3fe09f4d3fa8f8c7f19c099b1f48569a136e | [
"MIT"
] | null | null | null | defmodule ServerWeb 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 ServerWeb, :controller
use ServerWeb, :view
The definitions below will be executed for every view,
controller, etc... | 24.293103 | 69 | 0.69127 |
629d5fa2d4f530e98add5fda05469a91cc6e4eaf | 3,427 | ex | Elixir | lib/vintage_net/wifi/wpa2.ex | jjcarstens/vintage_net | 221b27f4ea5ff2d43d27357eb3b0a008fe364ecc | [
"Apache-2.0"
] | null | null | null | lib/vintage_net/wifi/wpa2.ex | jjcarstens/vintage_net | 221b27f4ea5ff2d43d27357eb3b0a008fe364ecc | [
"Apache-2.0"
] | null | null | null | lib/vintage_net/wifi/wpa2.ex | jjcarstens/vintage_net | 221b27f4ea5ff2d43d27357eb3b0a008fe364ecc | [
"Apache-2.0"
] | null | null | null | defmodule VintageNet.WiFi.WPA2 do
@moduledoc """
WPA2 preshared key calculations
WPA2 doesn't use passphrases directly, but instead hashes them with the
SSID and uses the result for the network key. The algorithm that runs
the hash takes some time so it's useful to compute the PSK from the
passphrase once ... | 28.322314 | 98 | 0.658302 |
629d985339676d8bd154bce6e65d0b8c5fbc8ffc | 443 | ex | Elixir | lib/mix/tasks/list.ex | kianmeng/clean_mixer | c2ce915156472a86828b53538efb8979bebcd78d | [
"Apache-2.0"
] | 45 | 2020-07-14T11:01:45.000Z | 2022-03-10T18:40:04.000Z | lib/mix/tasks/list.ex | kianmeng/clean_mixer | c2ce915156472a86828b53538efb8979bebcd78d | [
"Apache-2.0"
] | 3 | 2021-07-03T15:37:02.000Z | 2021-07-13T08:59:08.000Z | lib/mix/tasks/list.ex | kianmeng/clean_mixer | c2ce915156472a86828b53538efb8979bebcd78d | [
"Apache-2.0"
] | 4 | 2020-02-01T01:20:53.000Z | 2020-06-18T11:58:55.000Z | defmodule Mix.Tasks.CleanMixer.List do
use Mix.Task
@shortdoc "Lists all project components and their dependencies"
alias CleanMixer.UI.ArchMapRendering.TextRenderes.Dependencies
alias CleanMixer.UI.ListTask
@impl Mix.Task
def run(args, _options \\ []) do
ListTask.run(args, Dependencies, extra_cli_de... | 21.095238 | 65 | 0.715576 |
629dc40398e74aed283477e82979f4aa954216db | 4,259 | ex | Elixir | clients/content/lib/google_api/content/v2/model/datafeed.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/datafeed.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/datafeed.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... | 50.105882 | 230 | 0.69312 |
629de4c8f797e90051eff2b644bc2067152fae4a | 2,114 | ex | Elixir | clients/domains/lib/google_api/domains/v1beta1/model/money.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/domains/lib/google_api/domains/v1beta1/model/money.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/domains/lib/google_api/domains/v1beta1/model/money.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... | 39.886792 | 420 | 0.703406 |
629df026514468d67e14cfe467d84d90d38ec8d8 | 714 | exs | Elixir | config/test.exs | andrermartins/inmana | 19f36e3b7ab509ea72af2eff22981adf2ffcacab | [
"MIT"
] | null | null | null | config/test.exs | andrermartins/inmana | 19f36e3b7ab509ea72af2eff22981adf2ffcacab | [
"MIT"
] | null | null | null | config/test.exs | andrermartins/inmana | 19f36e3b7ab509ea72af2eff22981adf2ffcacab | [
"MIT"
] | null | null | null | use Mix.Config
# Configure your database
#
# The MIX_TEST_PARTITION environment variable can be used
# to provide built-in test partitioning in CI environment.
# Run `mix help test` for more information.
config :inmana, Inmana.Repo,
username: "postgres",
password: "docker",
database: "inmana_test#{System.get_env... | 28.56 | 65 | 0.7507 |
629e1090c6ea794248c2d16c6da36a3cb3eaa073 | 2,011 | ex | Elixir | clients/safe_browsing/lib/google_api/safe_browsing/v4/model/fetch_threat_list_updates_request.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/safe_browsing/lib/google_api/safe_browsing/v4/model/fetch_threat_list_updates_request.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/safe_browsing/lib/google_api/safe_browsing/v4/model/fetch_threat_list_updates_request.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | 1 | 2020-11-10T16:58:27.000Z | 2020-11-10T16:58:27.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 39.431373 | 154 | 0.762805 |
629e2ab8311fd428b929c4b576306a1fbd44b96c | 201 | exs | Elixir | priv/repo/migrations/20180311214249_add_slug_to_company.exs | dreamingechoes/diversity-in-tech | 4eb5dadf69f82fd08e1cdd1b125264930d3b4e6f | [
"MIT"
] | 8 | 2018-06-22T05:43:30.000Z | 2020-04-13T20:31:40.000Z | priv/repo/migrations/20180311214249_add_slug_to_company.exs | dreamingechoes/diversity-in-tech | 4eb5dadf69f82fd08e1cdd1b125264930d3b4e6f | [
"MIT"
] | null | null | null | priv/repo/migrations/20180311214249_add_slug_to_company.exs | dreamingechoes/diversity-in-tech | 4eb5dadf69f82fd08e1cdd1b125264930d3b4e6f | [
"MIT"
] | null | null | null | defmodule DiversityInTech.Repo.Migrations.AddSlugToCompany do
use Ecto.Migration
def change do
alter table(:companies) do
add(:slug, :string, default: "", null: false)
end
end
end
| 20.1 | 61 | 0.706468 |
629e2c5626e43e91afb60b5c90a89ad7907cf3dc | 381 | ex | Elixir | lib/hologram/compiler/transformers/access_operator_transformer.ex | gregjohnsonsaltaire/hologram | aa8e9ea0d599def864c263cc37cc8ee31f02ac4a | [
"MIT"
] | 40 | 2022-01-19T20:27:36.000Z | 2022-03-31T18:17:41.000Z | lib/hologram/compiler/transformers/access_operator_transformer.ex | gregjohnsonsaltaire/hologram | aa8e9ea0d599def864c263cc37cc8ee31f02ac4a | [
"MIT"
] | 42 | 2022-02-03T22:52:43.000Z | 2022-03-26T20:57:32.000Z | lib/hologram/compiler/transformers/access_operator_transformer.ex | gregjohnsonsaltaire/hologram | aa8e9ea0d599def864c263cc37cc8ee31f02ac4a | [
"MIT"
] | 3 | 2022-02-10T04:00:37.000Z | 2022-03-08T22:07:45.000Z | defmodule Hologram.Compiler.AccessOperatorTransformer do
alias Hologram.Compiler.{Context, Transformer}
alias Hologram.Compiler.IR.AccessOperator
def transform({{:., _, [Access, :get]}, _, [data, key]}, %Context{} = context) do
data = Transformer.transform(data, context)
key = Transformer.transform(key, ... | 34.636364 | 83 | 0.724409 |
629e7d638cf1a9ee5f8baf4e3ff2765abd1b7019 | 362 | ex | Elixir | test/ecto/utils_test.ex | scrogson/ecto | fdcf807901683c73c1117d89751e0d5a7a318154 | [
"Apache-2.0"
] | 1 | 2015-08-27T13:17:10.000Z | 2015-08-27T13:17:10.000Z | test/ecto/utils_test.ex | scrogson/ecto | fdcf807901683c73c1117d89751e0d5a7a318154 | [
"Apache-2.0"
] | null | null | null | test/ecto/utils_test.ex | scrogson/ecto | fdcf807901683c73c1117d89751e0d5a7a318154 | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.UtilsTest do
use ExUnit.Case, async: true
import Ecto.Utils
test "app_dir/2" do
assert app_dir(:ecto, "priv/migrations") ==
Path.expand("../../_build/shared/lib/ecto/priv/migrations", __DIR__)
assert_raise RuntimeError, "invalid application :unknown", fn ->
app_dir(:unkn... | 24.133333 | 79 | 0.674033 |
629e7fb2dbc241865b28b2560d2791b7a8eee06e | 17,142 | exs | Elixir | integration_test/cases/type.exs | mjaric/ecto | dfd61ded07e1843afaf3c7bc695c521f7a8b73b6 | [
"Apache-2.0"
] | null | null | null | integration_test/cases/type.exs | mjaric/ecto | dfd61ded07e1843afaf3c7bc695c521f7a8b73b6 | [
"Apache-2.0"
] | null | null | null | integration_test/cases/type.exs | mjaric/ecto | dfd61ded07e1843afaf3c7bc695c521f7a8b73b6 | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.Integration.TypeTest do
use Ecto.Integration.Case, async: Application.get_env(:ecto, :async_integration_tests, true)
alias Ecto.Integration.{Custom, Item, ItemColor, Order, Post, User, Tag, Usec}
alias Ecto.Integration.TestRepo
import Ecto.Query
test "primitive types" do
integer = 1
... | 37.924779 | 139 | 0.628398 |
629e81db2dc6b170f91d048c244f6fc6d50de370 | 1,248 | ex | Elixir | year_2021/lib/day_25.ex | bschmeck/advent_of_code | cbec98019c6c00444e0f4c7e15e01b1ed9ae6145 | [
"MIT"
] | null | null | null | year_2021/lib/day_25.ex | bschmeck/advent_of_code | cbec98019c6c00444e0f4c7e15e01b1ed9ae6145 | [
"MIT"
] | null | null | null | year_2021/lib/day_25.ex | bschmeck/advent_of_code | cbec98019c6c00444e0f4c7e15e01b1ed9ae6145 | [
"MIT"
] | null | null | null | defmodule Day25 do
def part_one(input) do
map =
25
|> input.contents_of(:stream)
|> Stream.map(&String.trim/1)
|> Stream.map(&String.split(&1, "", trim: true))
|> Stream.with_index()
|> Stream.flat_map(fn {line, y} ->
line
|> Enum.with_index()
|> Enum.re... | 22.690909 | 70 | 0.477564 |
629e8de74ba753b0da85de645dc4da83701bc9ce | 502 | exs | Elixir | config/test.exs | mxgrn/pairs.one | 25d4ee801323eb0bba1166ee59aaab9982d67a27 | [
"MIT"
] | 143 | 2016-09-23T15:05:36.000Z | 2022-03-03T03:38:42.000Z | config/test.exs | mxgrn/pairs.one | 25d4ee801323eb0bba1166ee59aaab9982d67a27 | [
"MIT"
] | 16 | 2016-09-29T06:33:42.000Z | 2021-06-17T18:16:07.000Z | config/test.exs | mxgrn/pairs.one | 25d4ee801323eb0bba1166ee59aaab9982d67a27 | [
"MIT"
] | 20 | 2016-09-27T16:25:46.000Z | 2021-06-21T02:03:48.000Z | use Mix.Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :pairs_one, PairsOneWeb.Endpoint,
http: [port: 4001],
server: false
# Print only warnings and errors during test
config :logger, level: :warn
# Configure your database
config :pairs_one, Pairs... | 25.1 | 56 | 0.739044 |
629eb24a8a48efa581e397b04de3c4780b0434f4 | 3,070 | ex | Elixir | clients/slides/lib/google_api/slides/v1/model/image_properties.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/slides/lib/google_api/slides/v1/model/image_properties.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/slides/lib/google_api/slides/v1/model/image_properties.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... | 46.515152 | 220 | 0.728013 |
629ed31a157bb06a659d6760feb6ad35fb22264d | 11,916 | ex | Elixir | lib/elixir/lib/list.ex | fishcakez/elixir | 1b8ab9ae0b28ddbbb867a85f86fcdaa15ef522a0 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/list.ex | fishcakez/elixir | 1b8ab9ae0b28ddbbb867a85f86fcdaa15ef522a0 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/list.ex | fishcakez/elixir | 1b8ab9ae0b28ddbbb867a85f86fcdaa15ef522a0 | [
"Apache-2.0"
] | null | null | null | defmodule List do
@moduledoc """
Implements functions that only make sense for lists
and cannot be part of the Enum protocol. In general,
favor using the Enum API instead of List.
Some functions in this module expect an index. Index
access for list is linear. Negative indexes are also
supported but they ... | 22.314607 | 108 | 0.58434 |
629ed9f3d41fd9355e413b381bad67744cc963e5 | 484 | ex | Elixir | macro/hub/lib/hub.ex | techgaun/dumpster | c2a5394afe759fb99041aea677e9b0bc4bf91aec | [
"Unlicense"
] | 1 | 2019-12-10T22:25:31.000Z | 2019-12-10T22:25:31.000Z | macro/hub/lib/hub.ex | techgaun/dumpster | c2a5394afe759fb99041aea677e9b0bc4bf91aec | [
"Unlicense"
] | 3 | 2020-10-25T04:40:05.000Z | 2020-10-25T04:48:10.000Z | macro/hub/lib/hub.ex | techgaun/dumpster | c2a5394afe759fb99041aea677e9b0bc4bf91aec | [
"Unlicense"
] | null | null | null | defmodule Hub do
@base_url "https://api.github.com"
@username "techgaun"
HTTPoison.start()
"#{@base_url}/users/#{@username}/repos"
|> HTTPoison.get!()
|> Map.get(:body)
|> Jason.decode!()
|> Enum.each(fn repo ->
def unquote(String.to_atom(repo["name"]))() do
unquote(Macro.escape(repo))
e... | 21.043478 | 50 | 0.61157 |
629eddb3b06c9237f94d1492f0de8b57abda6290 | 3,019 | ex | Elixir | clients/content/lib/google_api/content/v21/model/orders_refund_item_request.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/content/lib/google_api/content/v21/model/orders_refund_item_request.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/content/lib/google_api/content/v21/model/orders_refund_item_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... | 45.059701 | 452 | 0.719444 |
629ef3a519f099fce1d70f187645019b2abc4f60 | 1,080 | ex | Elixir | test/support/conn_case.ex | floriank/react_relay_kitten_uploader | 1b8988bdf9fe01a263dc59097652ddb2c50520f6 | [
"MIT"
] | 3 | 2020-02-25T16:49:06.000Z | 2020-04-24T03:14:11.000Z | test/support/conn_case.ex | floriank/react_relay_kitten_uploader | 1b8988bdf9fe01a263dc59097652ddb2c50520f6 | [
"MIT"
] | 3 | 2021-03-09T03:17:50.000Z | 2021-09-01T04:37:12.000Z | test/support/conn_case.ex | floriank/react_relay_kitten_uploader | 1b8988bdf9fe01a263dc59097652ddb2c50520f6 | [
"MIT"
] | 2 | 2019-05-06T08:27:54.000Z | 2021-10-05T20:33:30.000Z | defmodule KittenGraphqlWeb.ConnCase do
@moduledoc """
This module defines the test case to be used by
tests that require setting up a connection.
Such tests rely on `Phoenix.ConnTest` and also
import other functionality to make it easier
to build common data structures and query the data layer.
Finally,... | 27.692308 | 75 | 0.725926 |
629f007c8a0d6d90cd9756b8000088845f08a207 | 522 | ex | Elixir | lib/neural_net/activation_functions.ex | knewter/neural_net | bbef6172cc285c83ba0ba4df21c164688537e207 | [
"MIT"
] | null | null | null | lib/neural_net/activation_functions.ex | knewter/neural_net | bbef6172cc285c83ba0ba4df21c164688537e207 | [
"MIT"
] | null | null | null | lib/neural_net/activation_functions.ex | knewter/neural_net | bbef6172cc285c83ba0ba4df21c164688537e207 | [
"MIT"
] | null | null | null | defmodule NeuralNet.ActivationFunctions do
@moduledoc "A few activation functions and their derivatives."
@doc "Tanh has a range of -1 to 1."
def tanh(x), do: :math.tanh(x)
@doc "Returns the derivative of tanh at x."
def tanh_prime(x), do: 1/:math.pow(:math.cosh(x), 2)
@doc "This sigmoid has a range of 0 ... | 37.285714 | 68 | 0.66092 |
629f0e842b9d666338df64319b330684cac996f3 | 2,264 | exs | Elixir | mix.exs | tinfoil/libgraph | 1b8fb6c2d29239af9058c487bc5d6298d8bb07ad | [
"MIT"
] | null | null | null | mix.exs | tinfoil/libgraph | 1b8fb6c2d29239af9058c487bc5d6298d8bb07ad | [
"MIT"
] | null | null | null | mix.exs | tinfoil/libgraph | 1b8fb6c2d29239af9058c487bc5d6298d8bb07ad | [
"MIT"
] | null | null | null | defmodule Graph.Mixfile do
use Mix.Project
def project do
[
app: :libgraph,
version: "0.14.0",
elixir: "~> 1.4",
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
deps: deps(),
elixirc_paths: elixirc_paths(Mix.env()),
description: "A high-p... | 26.325581 | 88 | 0.564488 |
629f184107fb45691f88f8638c8ee68478d388ac | 3,817 | ex | Elixir | apps/ewallet/lib/ewallet/web/v1/serializers/transaction_request_serializer.ex | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 322 | 2018-02-28T07:38:44.000Z | 2020-05-27T23:09:55.000Z | apps/ewallet/lib/ewallet/web/v1/serializers/transaction_request_serializer.ex | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 643 | 2018-02-28T12:05:20.000Z | 2020-05-22T08:34:38.000Z | apps/ewallet/lib/ewallet/web/v1/serializers/transaction_request_serializer.ex | 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 ... | 44.905882 | 92 | 0.779146 |
629f78339babbf581d82843403ad051808990c67 | 2,142 | ex | Elixir | lib/surface/directive/debug.ex | edgarmiadzieles/surface | 24d1162cc25004df9d40a11dd65fca98d7b65c64 | [
"MIT"
] | null | null | null | lib/surface/directive/debug.ex | edgarmiadzieles/surface | 24d1162cc25004df9d40a11dd65fca98d7b65c64 | [
"MIT"
] | null | null | null | lib/surface/directive/debug.ex | edgarmiadzieles/surface | 24d1162cc25004df9d40a11dd65fca98d7b65c64 | [
"MIT"
] | null | null | null | defmodule Surface.Directive.Debug do
use Surface.Directive
def extract({":debug", {:attribute_expr, [value], expr_meta}, attr_meta}, meta) do
%AST.Directive{
module: __MODULE__,
name: :debug,
value: directive_value(value, Map.merge(meta, expr_meta)),
meta: Helpers.to_meta(attr_meta, met... | 23.8 | 91 | 0.5845 |
629fcaeadf35323850253c39ed0c394b897002f5 | 3,181 | ex | Elixir | clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/company.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/company.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/company.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 ... | 41.855263 | 141 | 0.699466 |
629fdabb766522735c5ce2a8faa2e808b2fa8bd0 | 6,395 | exs | Elixir | test/credo/check/refactor/cyclomatic_complexity_test.exs | codeclimate-community/credo | b960a25d604b4499a2577321f9d61b39dc4b0437 | [
"MIT"
] | null | null | null | test/credo/check/refactor/cyclomatic_complexity_test.exs | codeclimate-community/credo | b960a25d604b4499a2577321f9d61b39dc4b0437 | [
"MIT"
] | null | null | null | test/credo/check/refactor/cyclomatic_complexity_test.exs | codeclimate-community/credo | b960a25d604b4499a2577321f9d61b39dc4b0437 | [
"MIT"
] | 1 | 2020-09-25T11:48:49.000Z | 2020-09-25T11:48:49.000Z | defmodule Credo.Check.Refactor.CyclomaticComplexityTest do
use Credo.TestHelper
@described_check Credo.Check.Refactor.CyclomaticComplexity
def complexity(source) do
{:ok, ast} = Credo.Code.ast(source)
@described_check.complexity_for(ast)
end
def rounded_complexity(source) do
source
|> compl... | 25.682731 | 110 | 0.581235 |
629ff329e4fa7be14a53c5db81da7909fed7cac3 | 511 | ex | Elixir | lib/timber/application.ex | axelson/timber-elixir | def9de8ebbb64a6f6d5dd85f8958d8b24f8d6c31 | [
"0BSD"
] | 244 | 2016-10-10T15:30:32.000Z | 2021-08-11T08:45:53.000Z | lib/timber/application.ex | axelson/timber-elixir | def9de8ebbb64a6f6d5dd85f8958d8b24f8d6c31 | [
"0BSD"
] | 242 | 2016-10-10T19:34:44.000Z | 2020-11-20T18:56:43.000Z | lib/timber/application.ex | axelson/timber-elixir | def9de8ebbb64a6f6d5dd85f8958d8b24f8d6c31 | [
"0BSD"
] | 35 | 2016-12-04T07:33:04.000Z | 2020-06-17T20:22:11.000Z | defmodule Timber.Application do
@moduledoc false
use Application
@doc false
# Handles the application callback start/2
#
# Starts an empty supervisor in order to comply with callback expectations
#
# This is the function that starts up the error logger listener
#
def start(_type, _opts) do
imp... | 21.291667 | 76 | 0.714286 |
62a004e818a22e4249e9f8d28e3768f9cc360ef5 | 860 | ex | Elixir | lib/identicon/image.ex | Tomboyo/identicon | 69df031bc00346964a8fa4639043ea4d96e4a3eb | [
"MIT"
] | null | null | null | lib/identicon/image.ex | Tomboyo/identicon | 69df031bc00346964a8fa4639043ea4d96e4a3eb | [
"MIT"
] | null | null | null | lib/identicon/image.ex | Tomboyo/identicon | 69df031bc00346964a8fa4639043ea4d96e4a3eb | [
"MIT"
] | null | null | null | defmodule Identicon.Image do
require Integer
@enforce_keys [:grid, :color]
defstruct [:grid, :color]
alias Identicon.Image
@type grid :: [ {integer} ]
@type color :: { byte, byte, byte }
@type t :: %__MODULE__{ grid: grid, color: color }
@spec from_bytes([byte]) :: t
def from_bytes(bytes) do
%Im... | 22.051282 | 59 | 0.594186 |
62a019ab355c3d04b4195d6c1a3436b1844740ec | 341 | ex | Elixir | lib/zaryn/p2p/message/unspent_output_list.ex | ambareesha7/node-zaryn | 136e542801bf9b6fa4a015d3464609fdf3dacee8 | [
"Apache-2.0"
] | 1 | 2021-07-06T19:47:14.000Z | 2021-07-06T19:47:14.000Z | lib/zaryn/p2p/message/unspent_output_list.ex | ambareesha7/node-zaryn | 136e542801bf9b6fa4a015d3464609fdf3dacee8 | [
"Apache-2.0"
] | null | null | null | lib/zaryn/p2p/message/unspent_output_list.ex | ambareesha7/node-zaryn | 136e542801bf9b6fa4a015d3464609fdf3dacee8 | [
"Apache-2.0"
] | null | null | null | defmodule Zaryn.P2P.Message.UnspentOutputList do
@moduledoc """
Represents a message with a list of unspent outputs
"""
defstruct unspent_outputs: []
alias Zaryn.TransactionChain.Transaction.ValidationStamp.LedgerOperations.UnspentOutput
@type t :: %__MODULE__{
unspent_outputs: list(UnspentOutpu... | 26.230769 | 89 | 0.73607 |
62a0a69f9b1dd664f673efb7a0686d4d0169f2b9 | 2,376 | exs | Elixir | test/credo/check/refactor/with_clauses_test.exs | codeclimate-community/credo | b960a25d604b4499a2577321f9d61b39dc4b0437 | [
"MIT"
] | null | null | null | test/credo/check/refactor/with_clauses_test.exs | codeclimate-community/credo | b960a25d604b4499a2577321f9d61b39dc4b0437 | [
"MIT"
] | null | null | null | test/credo/check/refactor/with_clauses_test.exs | codeclimate-community/credo | b960a25d604b4499a2577321f9d61b39dc4b0437 | [
"MIT"
] | 1 | 2020-09-25T11:48:49.000Z | 2020-09-25T11:48:49.000Z | defmodule Credo.Check.Refactor.WithClausesTest do
use Credo.TestHelper
@described_check Credo.Check.Refactor.WithClauses
#
# cases NOT raising issues
#
test "it should NOT report expected code" do
"""
defmodule CredoSampleModule do
def some_function(parameter1, parameter2) do
with :... | 22.846154 | 89 | 0.600168 |
62a0bbd0ed2beba62df374efa47956625a2d57fe | 2,507 | ex | Elixir | test/elixir/lib/couch_raw.ex | mtenrero/couchdb-vetcontrol | b7ede3ededdf0072c73f08d8f1217cb723b03f7a | [
"Apache-2.0"
] | 1 | 2022-01-14T20:52:55.000Z | 2022-01-14T20:52:55.000Z | test/elixir/lib/couch_raw.ex | mtenrero/couchdb-vetcontrol | b7ede3ededdf0072c73f08d8f1217cb723b03f7a | [
"Apache-2.0"
] | 1 | 2018-02-08T23:08:43.000Z | 2018-02-08T23:08:43.000Z | test/elixir/lib/couch_raw.ex | mtenrero/couchdb-vetcontrol | b7ede3ededdf0072c73f08d8f1217cb723b03f7a | [
"Apache-2.0"
] | null | null | null | defmodule Rawresp do
use HTTPotion.Base
@moduledoc """
HTTP client that provides raw response as result
"""
@request_timeout 60_000
@inactivity_timeout 55_000
def process_url("http://" <> _ = url) do
url
end
def process_url(url) do
base_url = System.get_env("EX_COUCH_URL") || "http://127.0.... | 23.650943 | 81 | 0.625449 |
62a0cf55b3ebaace0cc93449d2174269aa0142df | 2,010 | ex | Elixir | fisherman_server/lib/fisherman_server_web/live/relative_shells_table/table_menu_component.ex | henrysdev/Fisherman | 57bc51730cedb84a47807e2d617061f2cfe54ffd | [
"MIT"
] | 1 | 2020-05-14T06:07:21.000Z | 2020-05-14T06:07:21.000Z | fisherman_server/lib/fisherman_server_web/live/relative_shells_table/table_menu_component.ex | henrysdev/Fisherman | 57bc51730cedb84a47807e2d617061f2cfe54ffd | [
"MIT"
] | 19 | 2020-05-04T17:29:44.000Z | 2020-07-05T18:15:10.000Z | fisherman_server/lib/fisherman_server_web/live/relative_shells_table/table_menu_component.ex | henrysdev/Fisherman | 57bc51730cedb84a47807e2d617061f2cfe54ffd | [
"MIT"
] | null | null | null | defmodule FishermanServerWeb.Live.RelativeShellsTable.TableMenuComponent do
@moduledoc """
Component for relative shell records
"""
use Phoenix.LiveComponent
use Phoenix.HTML
def render(assigns) do
# TODO break up into sub-components
~L"""
<div class="table-menu">
<div class="table-me... | 32.95082 | 104 | 0.435323 |
62a0e5c49c3ddc0799df4498529c7d0b1a79aab7 | 1,727 | exs | Elixir | mix.exs | wingyplus/parent | 2078955dcd4ba0a23b91d45dc6f22e11c02f52b9 | [
"MIT"
] | null | null | null | mix.exs | wingyplus/parent | 2078955dcd4ba0a23b91d45dc6f22e11c02f52b9 | [
"MIT"
] | null | null | null | mix.exs | wingyplus/parent | 2078955dcd4ba0a23b91d45dc6f22e11c02f52b9 | [
"MIT"
] | null | null | null | defmodule Parent.MixProject do
use Mix.Project
@version "0.12.0"
def project do
[
app: :parent,
version: @version,
elixir: "~> 1.10",
start_permanent: Mix.env() == :prod,
deps: deps(),
elixirc_paths: elixirc_paths(Mix.env()),
dialyzer: [plt_add_deps: :transitive, pl... | 23.986111 | 84 | 0.546613 |
62a109909f12ca74432aeccc7f6eaee014930801 | 156 | ex | Elixir | lib/lavalex/message/pause.ex | TeeSeal/lavalex | 6ce016bcc557189d3ea36ecaafae55d0d5399bd3 | [
"MIT"
] | null | null | null | lib/lavalex/message/pause.ex | TeeSeal/lavalex | 6ce016bcc557189d3ea36ecaafae55d0d5399bd3 | [
"MIT"
] | null | null | null | lib/lavalex/message/pause.ex | TeeSeal/lavalex | 6ce016bcc557189d3ea36ecaafae55d0d5399bd3 | [
"MIT"
] | null | null | null | defmodule Lavalex.Message.Pause do
use Lavalex.Message
@enforce_keys [:guild_id]
defstruct [
:guild_id,
pause: true,
op: "pause"
]
end
| 14.181818 | 34 | 0.660256 |
62a10e964463e235d54d1042dfb1291aa0840cf6 | 1,073 | ex | Elixir | test/support/conn_case.ex | bradurani/dangerouscrossing | 3ab5c25e9ca2230704d56068400cc499632772bb | [
"BSD-3-Clause"
] | null | null | null | test/support/conn_case.ex | bradurani/dangerouscrossing | 3ab5c25e9ca2230704d56068400cc499632772bb | [
"BSD-3-Clause"
] | null | null | null | test/support/conn_case.ex | bradurani/dangerouscrossing | 3ab5c25e9ca2230704d56068400cc499632772bb | [
"BSD-3-Clause"
] | null | null | null | defmodule Dangerouscrossing.ConnCase do
@moduledoc """
This module defines the test case to be used by
tests that require setting up a connection.
Such tests rely on `Phoenix.ConnTest` and also
imports other functionality to make it easier
to build and query models.
Finally, if the test case interacts w... | 25.547619 | 76 | 0.719478 |
62a111474eafb6350e1718de770b81956046cb95 | 1,725 | ex | Elixir | apps/ewallet/lib/ewallet/seeders/seeder.ex | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | 1 | 2018-12-07T06:21:21.000Z | 2018-12-07T06:21:21.000Z | apps/ewallet/lib/ewallet/seeders/seeder.ex | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | null | null | null | apps/ewallet/lib/ewallet/seeders/seeder.ex | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | null | null | null | defmodule EWallet.Seeder do
@moduledoc """
Provides a base functions for handling seeds data.
"""
def gather_seeds(srcs) do
Enum.flat_map(srcs, fn {app_name, seed_name} ->
seed_name =
case seed_name do
s when is_binary(s) -> s
s when is_atom(s) -> Atom.to_string(seed_name)... | 26.538462 | 81 | 0.633623 |
62a1117f752c273b6a49ae55140d51df77a8de22 | 1,347 | ex | Elixir | lib/noted/application.ex | gerhard/noted | c83bfd2e8e2950187268a2e3ba0904ae8a9773e5 | [
"BSD-3-Clause"
] | 1 | 2022-03-24T21:08:44.000Z | 2022-03-24T21:08:44.000Z | lib/noted/application.ex | gerhard/noted | c83bfd2e8e2950187268a2e3ba0904ae8a9773e5 | [
"BSD-3-Clause"
] | null | null | null | lib/noted/application.ex | gerhard/noted | c83bfd2e8e2950187268a2e3ba0904ae8a9773e5 | [
"BSD-3-Clause"
] | null | null | null | defmodule Noted.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
alias Noted.Env
def start(_type, _args) do
Env.require("TELEGRAM_BOT_NAME")
children =
[
# Start the Ecto repository
N... | 26.94 | 78 | 0.672606 |
62a111f2199937d3d85e236f57bb4b65aa38b149 | 3,004 | ex | Elixir | clients/security_center/lib/google_api/security_center/v1/model/security_marks.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/security_center/lib/google_api/security_center/v1/model/security_marks.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/security_center/lib/google_api/security_center/v1/model/security_marks.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 56.679245 | 537 | 0.754328 |
62a14dfd091e1cb1bc1e473e88575eebc15d7ed7 | 420 | ex | Elixir | lib/certbot/certificate_store.ex | maartenvanvliet/certbot | 587bb80058d9e204c0e688d74179dadb70862a94 | [
"MIT"
] | 11 | 2019-07-12T17:25:21.000Z | 2021-03-27T21:07:42.000Z | lib/certbot/certificate_store.ex | maartenvanvliet/certbot | 587bb80058d9e204c0e688d74179dadb70862a94 | [
"MIT"
] | 37 | 2019-07-19T09:25:22.000Z | 2022-03-24T04:17:25.000Z | lib/certbot/certificate_store.ex | maartenvanvliet/certbot | 587bb80058d9e204c0e688d74179dadb70862a94 | [
"MIT"
] | 1 | 2020-01-04T23:48:06.000Z | 2020-01-04T23:48:06.000Z | defmodule Certbot.CertificateStore do
@moduledoc """
Stores and look ups certificates by hostname
Behaviour that can be reimplemented for other storage mechanisms, e.g. redis,
database or mnesia
"""
@callback find_certificate(hostname :: String.t()) ::
Certbot.Certificate.t() | nil
@callb... | 28 | 85 | 0.678571 |
62a15490730455f59d148498c2035726607ab567 | 169 | ex | Elixir | lib/hex/api/auth.ex | sudix/hex | f739a57d8829ea0b0f7759c164dc9149c3340e49 | [
"Apache-2.0"
] | null | null | null | lib/hex/api/auth.ex | sudix/hex | f739a57d8829ea0b0f7759c164dc9149c3340e49 | [
"Apache-2.0"
] | 1 | 2021-06-25T15:19:59.000Z | 2021-06-25T15:19:59.000Z | lib/hex/api/auth.ex | sudix/hex | f739a57d8829ea0b0f7759c164dc9149c3340e49 | [
"Apache-2.0"
] | null | null | null | defmodule Hex.API.Auth do
alias Hex.API
def get(domain, resource, auth) do
API.request(:get, nil, "auth?domain=#{domain}&resource=#{resource}", auth)
end
end
| 21.125 | 78 | 0.686391 |
62a16bd36a2e98687bf78def13de353cb7676153 | 150 | ex | Elixir | web/controllers/page_controller.ex | dmitrinesterenko/sample_phoenix_ecs | d6b94f35680163302e372cf30c70d3e409b0c9b1 | [
"MIT"
] | null | null | null | web/controllers/page_controller.ex | dmitrinesterenko/sample_phoenix_ecs | d6b94f35680163302e372cf30c70d3e409b0c9b1 | [
"MIT"
] | null | null | null | web/controllers/page_controller.ex | dmitrinesterenko/sample_phoenix_ecs | d6b94f35680163302e372cf30c70d3e409b0c9b1 | [
"MIT"
] | null | null | null | defmodule SamplePhoenix.PageController do
use SamplePhoenix.Web, :controller
def index(conn, _params) do
render conn, "index.html"
end
end
| 18.75 | 41 | 0.753333 |
62a1acd25638672a08b978ed0bc6d897bb959d1a | 1,569 | exs | Elixir | mix.exs | tlux/toml_config_provider | 2438db46c072bd5e9b661770443e188f7dd807cc | [
"MIT"
] | 3 | 2020-09-02T16:31:50.000Z | 2020-11-20T19:09:17.000Z | mix.exs | tlux/toml_config | 2438db46c072bd5e9b661770443e188f7dd807cc | [
"MIT"
] | null | null | null | mix.exs | tlux/toml_config | 2438db46c072bd5e9b661770443e188f7dd807cc | [
"MIT"
] | null | null | null | defmodule TomlConfigProvider.MixProject do
use Mix.Project
def project do
[
app: :toml_config,
version: "0.1.0",
elixir: "~> 1.9",
start_permanent: Mix.env() == :prod,
deps: deps(),
dialyzer: [plt_add_apps: [:ex_unit, :mix]],
test_coverage: [tool: ExCoveralls],
p... | 23.41791 | 76 | 0.54557 |
62a1bbf2adc31fe0ebfc1f9ef2d58d6119f3df72 | 156 | exs | Elixir | apps/playground_api/test/playground_api_test.exs | kimlindholm/elixir_playground | 2a44404996b98d88e40faaee4f6b3a546618a1fd | [
"MIT"
] | null | null | null | apps/playground_api/test/playground_api_test.exs | kimlindholm/elixir_playground | 2a44404996b98d88e40faaee4f6b3a546618a1fd | [
"MIT"
] | null | null | null | apps/playground_api/test/playground_api_test.exs | kimlindholm/elixir_playground | 2a44404996b98d88e40faaee4f6b3a546618a1fd | [
"MIT"
] | null | null | null | defmodule PlaygroundApiTest do
use ExUnit.Case
doctest PlaygroundApi
test "greets the world" do
assert PlaygroundApi.hello() == :world
end
end
| 17.333333 | 42 | 0.74359 |
62a1c8bcdac92763e32e284045f1d78f8d21a616 | 5,355 | ex | Elixir | lib/domain_tools.ex | norbu09/domain_tools | cfc4a9b0021c1a4b9c4b1160c30aeb1926c782fd | [
"MIT"
] | null | null | null | lib/domain_tools.ex | norbu09/domain_tools | cfc4a9b0021c1a4b9c4b1160c30aeb1926c782fd | [
"MIT"
] | null | null | null | lib/domain_tools.ex | norbu09/domain_tools | cfc4a9b0021c1a4b9c4b1160c30aeb1926c782fd | [
"MIT"
] | null | null | null | defmodule DomainTools do
require Logger
@moduledoc """
DomainTools imports the suffix list and splits domains based on that list.
This means we can make sure a domain is a valid domain if it splits
correctly, it also does IDN conversion to make sure we use only ascii
internally and can display unicode doma... | 25.745192 | 136 | 0.593277 |
62a1e1cd500f5b1d055f6e3f40a51bc8d9166d54 | 230 | exs | Elixir | priv/repo/migrations/20170511193403_add_user_verification.exs | GBH/pedal | a2d68c3561f186ee3017a21b4170127b1625e18d | [
"MIT"
] | 48 | 2017-04-25T16:02:08.000Z | 2021-01-23T01:57:29.000Z | priv/repo/migrations/20170511193403_add_user_verification.exs | GBH/pedal | a2d68c3561f186ee3017a21b4170127b1625e18d | [
"MIT"
] | 5 | 2018-03-09T20:17:55.000Z | 2018-07-23T16:29:21.000Z | priv/repo/migrations/20170511193403_add_user_verification.exs | GBH/pedal | a2d68c3561f186ee3017a21b4170127b1625e18d | [
"MIT"
] | 4 | 2017-05-21T14:38:38.000Z | 2017-12-29T11:09:54.000Z | defmodule LoadedBike.Repo.Migrations.AddUserVerification do
use Ecto.Migration
def change do
alter table(:users) do
add :verification_token, :string
end
create index(:users, [:verification_token])
end
end
| 20.909091 | 59 | 0.730435 |
62a1f4f2e92fcb1d1787b81f476415af2d970338 | 2,165 | ex | Elixir | clients/cloud_trace/lib/google_api/cloud_trace/v2/model/message_event.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/cloud_trace/lib/google_api/cloud_trace/v2/model/message_event.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/cloud_trace/lib/google_api/cloud_trace/v2/model/message_event.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 38.660714 | 201 | 0.716397 |
62a1fbef914ba86ba5eeb26e2e381c64fa4e37ec | 541 | ex | Elixir | lib/history/sources/ftx/lending_rates.ex | fremantle-industries/history | a8a33744279ff4ca62620785f9a2e9c0c99e4de7 | [
"MIT"
] | 20 | 2021-08-06T01:09:48.000Z | 2022-03-28T18:44:56.000Z | lib/history/sources/ftx/lending_rates.ex | fremantle-industries/history | a8a33744279ff4ca62620785f9a2e9c0c99e4de7 | [
"MIT"
] | 13 | 2021-08-21T21:17:02.000Z | 2022-03-27T06:33:51.000Z | lib/history/sources/ftx/lending_rates.ex | fremantle-industries/history | a8a33744279ff4ca62620785f9a2e9c0c99e4de7 | [
"MIT"
] | 2 | 2021-09-23T11:31:59.000Z | 2022-01-09T16:19:35.000Z | defmodule History.Sources.Ftx.LendingRates do
def period do
{:ok, one_hour} = Time.new(1, 0, 0, 0)
{seconds, _ms} = Time.to_seconds_after_midnight(one_hour)
{:ok, seconds}
end
def periods_per_chunk do
# 20 days
{:ok, 480}
end
def fetch(chunk) do
start_time = DateTime.to_unix(chunk.st... | 25.761905 | 70 | 0.691312 |
62a234cd96938f640b414013d55cdc3b76c10062 | 923 | ex | Elixir | apps/data/lib/grapevine_data/messages.ex | oestrich/grapevine | 7fb745a3a6e4eb68bd761baa190b2df32fa1f73d | [
"MIT"
] | 107 | 2018-10-05T18:20:32.000Z | 2022-02-28T04:02:50.000Z | apps/data/lib/grapevine_data/messages.ex | oestrich/grapevine | 7fb745a3a6e4eb68bd761baa190b2df32fa1f73d | [
"MIT"
] | 33 | 2018-10-05T14:11:18.000Z | 2022-02-10T22:19:18.000Z | apps/data/lib/grapevine_data/messages.ex | oestrich/grapevine | 7fb745a3a6e4eb68bd761baa190b2df32fa1f73d | [
"MIT"
] | 18 | 2019-02-03T03:08:20.000Z | 2021-12-28T04:29:36.000Z | defmodule GrapevineData.Messages do
@moduledoc """
Record messages posted in the chat
"""
import Ecto.Query
alias GrapevineData.Messages.Message
alias GrapevineData.Repo
@doc """
Load messages for a channel
"""
def for(channel, opts \\ []) do
Message
|> where([m], m.channel_id == ^channel... | 20.977273 | 61 | 0.651138 |
62a2506b14aa0ebb3c5ff022976f0f47fa63d3f5 | 2,912 | ex | Elixir | deps/tzdata/lib/tzdata/leap_sec_parser.ex | robot-overlord/starter_kit | 254153221d0a3a06324c65ad8e89d610de2429c3 | [
"MIT"
] | 1 | 2020-01-31T10:23:37.000Z | 2020-01-31T10:23:37.000Z | deps/tzdata/lib/tzdata/leap_sec_parser.ex | robot-overlord/starter_kit | 254153221d0a3a06324c65ad8e89d610de2429c3 | [
"MIT"
] | null | null | null | deps/tzdata/lib/tzdata/leap_sec_parser.ex | robot-overlord/starter_kit | 254153221d0a3a06324c65ad8e89d610de2429c3 | [
"MIT"
] | 1 | 2019-11-23T12:09:14.000Z | 2019-11-23T12:09:14.000Z | defmodule Tzdata.LeapSecParser do
import Tzdata.Util
@moduledoc false
# Parsing of the `leap-seconds.list` file
@secs_between_year_0_and_unix_epoch 719528*24*3600 # From erlang calendar docs: there are 719528 days between Jan 1, 0 and Jan 1, 1970. Does not include leap seconds
@ntp_epoch_and_unix_epoch_diff ... | 34.666667 | 167 | 0.696085 |
62a2588398397f4147fbdbf5cc28650191cbae0f | 1,625 | ex | Elixir | apps/ewallet/lib/ewallet/release_tasks/seed.ex | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | apps/ewallet/lib/ewallet/release_tasks/seed.ex | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | apps/ewallet/lib/ewallet/release_tasks/seed.ex | 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... | 28.508772 | 76 | 0.706462 |
62a296ef2f16d346b8ebe2e16ab67938b6e9990a | 23,760 | ex | Elixir | lib/mix/lib/mix/tasks/xref.ex | mrcasals/elixir | 8cb9ebf708f2789a0e7dbf574294b82a55dd2f21 | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/tasks/xref.ex | mrcasals/elixir | 8cb9ebf708f2789a0e7dbf574294b82a55dd2f21 | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/tasks/xref.ex | mrcasals/elixir | 8cb9ebf708f2789a0e7dbf574294b82a55dd2f21 | [
"Apache-2.0"
] | null | null | null | defmodule Mix.Tasks.Xref do
use Mix.Task
import Mix.Compilers.Elixir,
only: [read_manifest: 1, source: 0, source: 1, source: 2, module: 1]
@shortdoc "Prints cross reference information"
@recursive true
@manifest "compile.elixir"
@moduledoc """
Prints cross reference information between modules.
... | 30.500642 | 98 | 0.635143 |
62a2b13f387b2fa2e6a0a8d9a39cd1fa932fcfb0 | 39,562 | exs | Elixir | test/ecto/repo_test.exs | Psli/ecto | 3e185f1a9c97be2471a98e7fe7374ef35bd59708 | [
"Apache-2.0"
] | null | null | null | test/ecto/repo_test.exs | Psli/ecto | 3e185f1a9c97be2471a98e7fe7374ef35bd59708 | [
"Apache-2.0"
] | null | null | null | test/ecto/repo_test.exs | Psli/ecto | 3e185f1a9c97be2471a98e7fe7374ef35bd59708 | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.RepoTest do
use ExUnit.Case, async: true
import Ecto.Query
import Ecto, only: [put_meta: 2]
require Ecto.TestRepo, as: TestRepo
defmodule MyParent do
use Ecto.Schema
@schema_prefix "private"
schema "my_parent" do
field :n, :integer
end
def changeset(struct, params... | 34.612423 | 119 | 0.631111 |
62a2bd1c3fb034dff98bff51b85de1d41901097f | 1,644 | exs | Elixir | test/sptfy/personalization_test.exs | Joe-noh/sptfy | ce94ec2ec61529ab6fe708248a2360f95ec388ea | [
"MIT"
] | 5 | 2020-12-14T15:46:26.000Z | 2021-03-20T22:32:58.000Z | test/sptfy/personalization_test.exs | Joe-noh/sptfy | ce94ec2ec61529ab6fe708248a2360f95ec388ea | [
"MIT"
] | 9 | 2020-12-25T14:36:11.000Z | 2021-01-25T14:03:18.000Z | test/sptfy/personalization_test.exs | Joe-noh/sptfy | ce94ec2ec61529ab6fe708248a2360f95ec388ea | [
"MIT"
] | null | null | null | defmodule Sptfy.PersonalizationTest do
use ExUnit.Case, async: false
import Mock
alias Sptfy.Personalization
alias Sptfy.Object.{FullArtist, FullTrack, Paging}
describe "get_top_artists/2" do
test "returns a Paging structs" do
json = Fixtures.paging(Fixtures.full_artist())
with_mock Sptfy.... | 36.533333 | 133 | 0.64781 |
62a2c59d0aa2b0a51499944c1c3e789c7cbf6d6c | 5,203 | ex | Elixir | lib/mix/tasks/doctor.ex | kianmeng/doctor | 2b1eb4bc0698b96169f2ad0049010d5428b48c2e | [
"MIT"
] | null | null | null | lib/mix/tasks/doctor.ex | kianmeng/doctor | 2b1eb4bc0698b96169f2ad0049010d5428b48c2e | [
"MIT"
] | null | null | null | lib/mix/tasks/doctor.ex | kianmeng/doctor | 2b1eb4bc0698b96169f2ad0049010d5428b48c2e | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.Doctor do
@moduledoc """
Doctor is a command line utility that can be used to ensure that your project
documentation remains healthy. For more in depth documentation on Doctor or to
file bug/feature requests, please check out https://github.com/akoutmos/doctor.
The `mix doctor` command su... | 28.124324 | 90 | 0.636556 |
62a2e31f9b83cb9b71dfa1fe2038f59091a10042 | 282 | ex | Elixir | lib/accounting/helpers.ex | verypossible/accounting | 25be530e191c7c23c725770deb90d390b9296496 | [
"MIT"
] | 3 | 2017-12-17T22:00:22.000Z | 2020-01-12T17:29:36.000Z | lib/accounting/helpers.ex | verypossible/accounting | 25be530e191c7c23c725770deb90d390b9296496 | [
"MIT"
] | 2 | 2017-12-11T23:31:04.000Z | 2017-12-15T16:44:31.000Z | lib/accounting/helpers.ex | verypossible/accounting | 25be530e191c7c23c725770deb90d390b9296496 | [
"MIT"
] | 3 | 2017-07-26T07:34:30.000Z | 2022-01-11T15:53:07.000Z | defmodule Accounting.Helpers do
@moduledoc false
alias Accounting.AccountTransaction
@spec sort_transactions([AccountTransaction.t]) :: [AccountTransaction.t]
def sort_transactions(transactions) do
Enum.sort(transactions, & Date.diff(&1.date, &2.date) <= 0)
end
end
| 25.636364 | 75 | 0.755319 |
62a30420a534068ddec30316916753c930c9c300 | 870 | ex | Elixir | web/controllers/admin/settings_controller.ex | ramkrishna70/opencov | 7a3415f8eebb797ad1f7b6c832daa4f04d70af8d | [
"MIT"
] | 189 | 2018-09-25T09:02:41.000Z | 2022-03-09T13:52:06.000Z | web/controllers/admin/settings_controller.ex | ramkrishna70/opencov | 7a3415f8eebb797ad1f7b6c832daa4f04d70af8d | [
"MIT"
] | 29 | 2018-09-26T05:51:18.000Z | 2021-11-05T08:55:03.000Z | web/controllers/admin/settings_controller.ex | ramkrishna70/opencov | 7a3415f8eebb797ad1f7b6c832daa4f04d70af8d | [
"MIT"
] | 32 | 2018-10-21T12:28:11.000Z | 2022-03-28T02:20:19.000Z | defmodule Opencov.Admin.SettingsController do
use Opencov.Web, :controller
alias Opencov.SettingsManager
alias Opencov.Repo
# plug :scrub_params, "settings" when action in [:update]
def edit(conn, _params) do
settings = SettingsManager.get!
changeset = SettingsManager.changeset(settings)
render... | 30 | 75 | 0.695402 |
62a31d262cb3605bc466ef5520de6d31ff7041ec | 417 | ex | Elixir | learning/gnome/game/hangman/lib/hangman/server.ex | Mdlkxzmcp/various_elixir | c87527b7118a0c74a042073c04d2228025888ddf | [
"MIT"
] | 2 | 2020-01-20T20:15:20.000Z | 2020-02-27T11:08:42.000Z | learning/gnome/game/hangman/lib/hangman/server.ex | Mdlkxzmcp/various_elixir | c87527b7118a0c74a042073c04d2228025888ddf | [
"MIT"
] | null | null | null | learning/gnome/game/hangman/lib/hangman/server.ex | Mdlkxzmcp/various_elixir | c87527b7118a0c74a042073c04d2228025888ddf | [
"MIT"
] | null | null | null | defmodule Hangman.Server do
alias Hangman.Game
use GenServer
def start_link(_) do
GenServer.start_link(__MODULE__, nil)
end
def init(_) do
{:ok, Game.new_game()}
end
def handle_call({:make_move, guess}, _from, game) do
{game, tally} = Game.make_move(game, guess)
{:reply, tally, game}
... | 18.130435 | 54 | 0.659472 |
62a33b14e50985fdbe458e1f6ff909f65db50231 | 585 | ex | Elixir | elixir/lib/problem003.ex | wadeanthony0100/euler | 8a9639523b2400560add80f73b44a342ad2a8272 | [
"MIT"
] | null | null | null | elixir/lib/problem003.ex | wadeanthony0100/euler | 8a9639523b2400560add80f73b44a342ad2a8272 | [
"MIT"
] | null | null | null | elixir/lib/problem003.ex | wadeanthony0100/euler | 8a9639523b2400560add80f73b44a342ad2a8272 | [
"MIT"
] | null | null | null | defmodule Problem3 do
@doc """
Problem 3:The prime factors of 13195 are 5, 7, 13 and 29.
What is the largest prime factor of the number 600851475143 ?
>iex solve
6857
"""
def solve do
factor(600851475143) |> Enum.max()
end
defp factor(num), do: do_factor(num,2,[])
defp do_factor(num, div,... | 26.590909 | 101 | 0.651282 |
62a3affceae1b57bac3a7693f48f0f2d0b3bdc67 | 1,685 | ex | Elixir | lib/chit_chat_web/telemetry.ex | areski/ex-chitchat | 0ec14e9af6acba40d6708f924b76fb4fbe592dcf | [
"MIT"
] | 1 | 2021-09-10T16:49:36.000Z | 2021-09-10T16:49:36.000Z | lib/chit_chat_web/telemetry.ex | areski/ex-chitchat | 0ec14e9af6acba40d6708f924b76fb4fbe592dcf | [
"MIT"
] | 2 | 2020-05-22T18:42:14.000Z | 2021-01-25T16:34:38.000Z | lib/chit_chat_web/telemetry.ex | areski/ex-chitchat | 0ec14e9af6acba40d6708f924b76fb4fbe592dcf | [
"MIT"
] | null | null | null | defmodule ChitChatWeb.Telemetry do
use Supervisor
import Telemetry.Metrics
def start_link(arg) do
Supervisor.start_link(__MODULE__, arg, name: __MODULE__)
end
@impl true
def init(_arg) do
children = [
{:telemetry_poller, measurements: periodic_measurements(), period: 10_000}
# Add repo... | 31.203704 | 86 | 0.667656 |
62a3b2a5d3def4ce43ab890fd5feee03cb226382 | 856 | ex | Elixir | lib/code_corps/github/sync/github_pull_request/body_parser.ex | fikape/code-corps-api | c21674b0b2a19fa26945c94268db8894420ca181 | [
"MIT"
] | 275 | 2015-06-23T00:20:51.000Z | 2021-08-19T16:17:37.000Z | lib/code_corps/github/sync/github_pull_request/body_parser.ex | fikape/code-corps-api | c21674b0b2a19fa26945c94268db8894420ca181 | [
"MIT"
] | 1,304 | 2015-06-26T02:11:54.000Z | 2019-12-12T21:08:00.000Z | lib/code_corps/github/sync/github_pull_request/body_parser.ex | fikape/code-corps-api | c21674b0b2a19fa26945c94268db8894420ca181 | [
"MIT"
] | 140 | 2016-01-01T18:19:47.000Z | 2020-11-22T06:24:47.000Z | defmodule CodeCorps.GitHub.Sync.GithubPullRequest.BodyParser do
@moduledoc ~S"""
In charge of extracting ids from markdown content, paired to a predefined list
of keywords.
"""
@doc ~S"""
Searches for GitHub closing keyword format inside a content string.
Returns all unique ids matched, as integers.
""... | 32.923077 | 87 | 0.658879 |
62a3d020b14b15c9f52b3af6ffe2d79c7e6b76dc | 3,615 | exs | Elixir | lib/rig_api/v3/messages_test.exs | steveoliver/reactive-interaction-gateway | 59b6dc994fd0f098bed19b7bf1e699513ac87167 | [
"Apache-2.0"
] | 518 | 2017-11-09T13:10:49.000Z | 2022-03-28T14:29:50.000Z | lib/rig_api/v3/messages_test.exs | steveoliver/reactive-interaction-gateway | 59b6dc994fd0f098bed19b7bf1e699513ac87167 | [
"Apache-2.0"
] | 270 | 2017-11-10T00:11:34.000Z | 2022-02-27T13:08:16.000Z | lib/rig_api/v3/messages_test.exs | steveoliver/reactive-interaction-gateway | 59b6dc994fd0f098bed19b7bf1e699513ac87167 | [
"Apache-2.0"
] | 67 | 2017-12-19T20:16:37.000Z | 2022-03-31T10:43:04.000Z | defmodule RigApi.V3.MessagesTest do
@moduledoc false
use RigApi.ConnCase, async: true
alias Plug.Conn.Status
import Mox
setup :verify_on_exit!
@cloud_event_json ~s({"cloudEventsVersion":"0.1","source":"test","eventType":"test.event","eventID":"1"})
@non_cloud_event ~s({"source":"test","eventType":"test... | 32.276786 | 107 | 0.608852 |
62a4106c5c1e90b7dd2b1a63d885944bed4e239c | 1,624 | ex | Elixir | clients/tasks/lib/google_api/tasks/v1/model/task_links.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/tasks/lib/google_api/tasks/v1/model/task_links.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/tasks/lib/google_api/tasks/v1/model/task_links.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 30.074074 | 125 | 0.686576 |
62a46b1f0896fc4c589a13522590cc4205883ba5 | 412 | exs | Elixir | test/teiserver_web/controllers/report/general_controller_test.exs | icexuick/teiserver | 22f2e255e7e21f977e6b262acf439803626a506c | [
"MIT"
] | 6 | 2021-02-08T10:42:53.000Z | 2021-04-25T12:12:03.000Z | test/teiserver_web/controllers/report/general_controller_test.exs | icexuick/teiserver | 22f2e255e7e21f977e6b262acf439803626a506c | [
"MIT"
] | 14 | 2021-08-01T02:36:14.000Z | 2022-01-30T21:15:03.000Z | test/teiserver_web/controllers/report/general_controller_test.exs | icexuick/teiserver | 22f2e255e7e21f977e6b262acf439803626a506c | [
"MIT"
] | 7 | 2021-05-13T12:55:28.000Z | 2022-01-14T06:39:06.000Z | defmodule TeiserverWeb.Report.GeneralControllerTest do
use CentralWeb.ConnCase
alias Central.Helpers.GeneralTestLib
setup do
GeneralTestLib.conn_setup(Teiserver.TeiserverTestLib.admin_permissions())
|> Teiserver.TeiserverTestLib.conn_setup()
end
test "index", %{conn: conn} do
conn = get(conn, R... | 24.235294 | 77 | 0.764563 |
62a47e6ebdd5d3124ec4aeb210359b2f0fea18b0 | 362 | exs | Elixir | test/test_helper.exs | tanguilp/elixir-specify | c526d96d30fd7166336ee2be9c4261056cb1e72c | [
"MIT"
] | 13 | 2020-01-12T21:38:27.000Z | 2022-01-20T16:32:07.000Z | test/test_helper.exs | Qqwy/elixir_confy | e0cfc89a8d043de73da6729e19ad5d0ca6ebd173 | [
"MIT"
] | 12 | 2020-06-05T15:11:59.000Z | 2020-09-27T19:25:31.000Z | test/test_helper.exs | Qqwy/elixir_confy | e0cfc89a8d043de73da6729e19ad5d0ca6ebd173 | [
"MIT"
] | 1 | 2020-06-05T17:38:58.000Z | 2020-06-05T17:38:58.000Z | # Used in multiple modules' doctests
defmodule Pet do
require Specify
Specify.defconfig do
@doc "The name of the pet"
field :name, :string
@doc "is it a dog or a cat?"
field :kind, :atom, system_env_name: "TYPE"
end
end
ExUnit.start()
# We require some atoms to be defined for the doctests
_some_... | 22.625 | 54 | 0.687845 |
62a49f81cac0a2851c412d308906240c65c8c631 | 1,051 | exs | Elixir | mix.exs | team-alembic/assertions | ac70165f1d42fc7f357e7616d8ebe84cc31504ff | [
"MIT"
] | null | null | null | mix.exs | team-alembic/assertions | ac70165f1d42fc7f357e7616d8ebe84cc31504ff | [
"MIT"
] | null | null | null | mix.exs | team-alembic/assertions | ac70165f1d42fc7f357e7616d8ebe84cc31504ff | [
"MIT"
] | 1 | 2021-07-09T18:21:40.000Z | 2021-07-09T18:21:40.000Z | defmodule Assertions.MixProject do
use Mix.Project
def project do
[
app: :assertions,
version: "0.18.1",
elixir: "~> 1.7",
deps: deps(),
description: description(),
package: package(),
name: "Assertions",
source_url: "https://github.com/devonestes/assertions",
... | 22.847826 | 81 | 0.569933 |
62a4f86231145a9ded6387dcf36b4f0242d3047e | 233 | ex | Elixir | lib/karibuex/logger/logger.ex | yanovitchsky/karibu_ex | 85349c6dcda74c90db7fda8b9164680c6103eb49 | [
"MIT"
] | null | null | null | lib/karibuex/logger/logger.ex | yanovitchsky/karibu_ex | 85349c6dcda74c90db7fda8b9164680c6103eb49 | [
"MIT"
] | null | null | null | lib/karibuex/logger/logger.ex | yanovitchsky/karibu_ex | 85349c6dcda74c90db7fda8b9164680c6103eb49 | [
"MIT"
] | null | null | null | defmodule Karibuex.Logger.Formatter do
def format_error(params, error) do
new_params = params
{err, err_msg} = error
new_error = err_msg
[new_params, new_error]
end
def format(params) do
params
end
end
| 17.923077 | 38 | 0.686695 |
62a504051c0094ca1469806415e1b4ffe436bbcc | 976 | ex | Elixir | lib/rules/poker/resolution/hand_deliverers/stud7_deliverer.ex | luismasuelli/poker-elixir | 32b80d79eed3a987531043531b4bff8bf2a1bdee | [
"MIT"
] | null | null | null | lib/rules/poker/resolution/hand_deliverers/stud7_deliverer.ex | luismasuelli/poker-elixir | 32b80d79eed3a987531043531b4bff8bf2a1bdee | [
"MIT"
] | null | null | null | lib/rules/poker/resolution/hand_deliverers/stud7_deliverer.ex | luismasuelli/poker-elixir | 32b80d79eed3a987531043531b4bff8bf2a1bdee | [
"MIT"
] | null | null | null | defmodule Rules.Poker.Resolution.HandDeliverers.Stud7Deliverer do
@moduledoc """
7 Cards Stud deliverers take 7 cards from the user, or 6 cards
from the user and 1 from community if 8 players reach the
showdown.
"""
alias Rules.Poker.Resolution.HandDeliverers.Base
alias Rules.Poker.Resolution.Deliver... | 30.5 | 87 | 0.66291 |
62a510716ed9341d59df47827b91077e816633a0 | 1,766 | ex | Elixir | clients/games/lib/google_api/games/v1/model/room_p2_p_statuses.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/games/lib/google_api/games/v1/model/room_p2_p_statuses.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/games/lib/google_api/games/v1/model/room_p2_p_statuses.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... | 35.32 | 174 | 0.729332 |
62a5284049d5e680472a6f15f18ccee184bb3276 | 2,492 | ex | Elixir | clients/my_business_lodging/lib/google_api/my_business_lodging/v1/model/sustainability_certifications.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/my_business_lodging/lib/google_api/my_business_lodging/v1/model/sustainability_certifications.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/my_business_lodging/lib/google_api/my_business_lodging/v1/model/sustainability_certifications.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... | 40.193548 | 162 | 0.734751 |
62a528ad4e4ac440bac027ad4bcec92ed98c5b96 | 282 | ex | Elixir | apps/re/lib/addresses/policy.ex | ruby2elixir/emcasa-backend | 70d7f4f233555417941ffa6ada84cf8740c21dd2 | [
"MIT"
] | 4 | 2019-11-01T16:29:31.000Z | 2020-10-10T21:20:12.000Z | apps/re/lib/addresses/policy.ex | caspg/backend | 34df9dc14ab8ed75de4578fefa2e087580c7e867 | [
"MIT"
] | null | null | null | apps/re/lib/addresses/policy.ex | caspg/backend | 34df9dc14ab8ed75de4578fefa2e087580c7e867 | [
"MIT"
] | 5 | 2019-11-04T21:25:45.000Z | 2020-02-13T23:49:36.000Z | defmodule Re.Addresses.Policy do
@moduledoc """
Policy module for user permission on addresses
"""
alias Re.User
def authorize(:insert, %User{}, _), do: :ok
def authorize(_, nil, _), do: {:error, :unauthorized}
def authorize(_, _, _), do: {:error, :forbidden}
end
| 20.142857 | 55 | 0.656028 |
62a57b4890c6be9094bcd886fa1b4f74e9a5ccea | 9,419 | ex | Elixir | debian/init.d.lsb.ex | zendesk/zendesk_holland | 5605b15e98704614b308a4cc641c2c2cebb17198 | [
"BSD-3-Clause"
] | 1 | 2019-06-06T01:07:34.000Z | 2019-06-06T01:07:34.000Z | debian/init.d.lsb.ex | zendesk/zendesk_holland | 5605b15e98704614b308a4cc641c2c2cebb17198 | [
"BSD-3-Clause"
] | null | null | null | debian/init.d.lsb.ex | zendesk/zendesk_holland | 5605b15e98704614b308a4cc641c2c2cebb17198 | [
"BSD-3-Clause"
] | 2 | 2015-12-04T12:17:59.000Z | 2022-03-23T07:22:02.000Z | #!/bin/sh
#
# Example init.d script with LSB support.
#
# Please read this init.d carefully and modify the sections to
# adjust it to the program you want to run.
#
# Copyright (c) 2007 Javier Fernandez-Sanguino <jfs@debian.org>
#
# This is free software; you may redistribute it and/or modify
# it under the terms of th... | 31.713805 | 87 | 0.564179 |
62a5b5bc73adae1798cdf02611ace4ee24d5aafb | 2,161 | ex | Elixir | clients/admin/lib/google_api/admin/reports_v1/model/activities.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/admin/lib/google_api/admin/reports_v1/model/activities.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/admin/lib/google_api/admin/reports_v1/model/activities.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 38.589286 | 199 | 0.708931 |
62a5b601e1d6b2df50935d2bf7bc02381f976f07 | 449 | exs | Elixir | myapp/config/test.exs | Hermanlangner/elixir-playground | 202b1956d26068914af0b25b457d6f210a995b94 | [
"MIT"
] | null | null | null | myapp/config/test.exs | Hermanlangner/elixir-playground | 202b1956d26068914af0b25b457d6f210a995b94 | [
"MIT"
] | null | null | null | myapp/config/test.exs | Hermanlangner/elixir-playground | 202b1956d26068914af0b25b457d6f210a995b94 | [
"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 :myapp, MyappWeb.Endpoint,
http: [port: 4002],
server: false
# Print only warnings and errors during test
config :logger, level: :warn
# Configure your database
config :myapp, Myapp.Repo,
us... | 23.631579 | 56 | 0.726058 |
62a5d8f8a2955cc219239e8caa2d02ce13b5b3c2 | 1,064 | exs | Elixir | sphinx_ex/test/sphinx_ex/helpers/quinary_test.exs | maxneuvians/sphinx_ex | 27109d56ebe51c83cde70d44467dabed70b10103 | [
"MIT"
] | null | null | null | sphinx_ex/test/sphinx_ex/helpers/quinary_test.exs | maxneuvians/sphinx_ex | 27109d56ebe51c83cde70d44467dabed70b10103 | [
"MIT"
] | null | null | null | sphinx_ex/test/sphinx_ex/helpers/quinary_test.exs | maxneuvians/sphinx_ex | 27109d56ebe51c83cde70d44467dabed70b10103 | [
"MIT"
] | null | null | null | defmodule SphinxEx.Helpers.QuinaryTest do
use ExUnit.Case, async: true
import SphinxEx.Helpers.Quinary
test "convert_to_decimal" do
assert convert_to_decimal(String.duplicate("0", 48) <> "0") == 0
assert convert_to_decimal(String.duplicate("0", 46) <> "101") == 26
assert convert_to_decimal(String.d... | 32.242424 | 71 | 0.678571 |
62a5e9af10c378df6f3d555b43f504e4e4eb5ebc | 588 | exs | Elixir | test/views/error_view_test.exs | ibnHatab/terpsichore | 6ac9b405df8c64a98ea13a1a026269313d0e2fa1 | [
"BSD-2-Clause"
] | null | null | null | test/views/error_view_test.exs | ibnHatab/terpsichore | 6ac9b405df8c64a98ea13a1a026269313d0e2fa1 | [
"BSD-2-Clause"
] | null | null | null | test/views/error_view_test.exs | ibnHatab/terpsichore | 6ac9b405df8c64a98ea13a1a026269313d0e2fa1 | [
"BSD-2-Clause"
] | null | null | null | defmodule Terpsichore.ErrorViewTest do
use Terpsichore.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(Terpsichore.ErrorView, "404.html", []) ==
"Page not found"
end
test "render 5... | 26.727273 | 69 | 0.687075 |
62a5feb540422833003af48609e2a236fc81dc67 | 33,670 | exs | Elixir | test/encoder_test.exs | jeffgrunewald/kitt | 00298b1804c7c6df1c0983da7bc92c9994b6b0fc | [
"Apache-2.0"
] | 2 | 2020-01-24T14:48:00.000Z | 2021-09-30T12:59:52.000Z | test/encoder_test.exs | jeffgrunewald/kitt | 00298b1804c7c6df1c0983da7bc92c9994b6b0fc | [
"Apache-2.0"
] | 1 | 2020-01-28T15:04:19.000Z | 2020-01-28T15:04:19.000Z | test/encoder_test.exs | jeffgrunewald/kitt | 00298b1804c7c6df1c0983da7bc92c9994b6b0fc | [
"Apache-2.0"
] | 1 | 2020-01-27T13:32:25.000Z | 2020-01-27T13:32:25.000Z | defmodule Kitt.EncoderTest do
use ExUnit.Case
describe "handles frames" do
test "decodes the message frame from a hex string" do
input = TestHelper.bsm_frame_hex()
result =
{:ok,
%Kitt.Message.BSM{
coreData: %Kitt.Message.BSM.CoreData{
accelSet: %{lat: 2001... | 36.321467 | 97 | 0.362459 |
62a64405a3222081a949d771591b8d0c9c476334 | 2,595 | ex | Elixir | apps/definition_presto/lib/presto/table/compactor.ex | jdenen/hindsight | ef69b4c1a74c94729dd838a9a0849a48c9b6e04c | [
"Apache-2.0"
] | 12 | 2020-01-27T19:43:02.000Z | 2021-07-28T19:46:29.000Z | apps/definition_presto/lib/presto/table/compactor.ex | jdenen/hindsight | ef69b4c1a74c94729dd838a9a0849a48c9b6e04c | [
"Apache-2.0"
] | 81 | 2020-01-28T18:07:23.000Z | 2021-11-22T02:12:13.000Z | apps/definition_presto/lib/presto/table/compactor.ex | jdenen/hindsight | ef69b4c1a74c94729dd838a9a0849a48c9b6e04c | [
"Apache-2.0"
] | 10 | 2020-02-13T21:24:09.000Z | 2020-05-21T18:39:35.000Z | defmodule Presto.Table.Compactor do
@moduledoc """
Behaviour for compacting table data from many object-storage
files to one. Compaction should be run to increase read performance
out of object storage.
This behaviour exists to allow easy testing with `Mox`.
"""
use Properties, otp_app: :definition_prest... | 28.206522 | 98 | 0.638536 |
62a66ce457a4e3c2dcb241e9db69411367761173 | 2,531 | ex | Elixir | clients/ad_sense_host/lib/google_api/ad_sense_host/v41/model/association_session.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/ad_sense_host/lib/google_api/ad_sense_host/v41/model/association_session.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/ad_sense_host/lib/google_api/ad_sense_host/v41/model/association_session.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | 1 | 2018-07-28T20:50:50.000Z | 2018-07-28T20:50:50.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 40.822581 | 180 | 0.739234 |
62a692609ec97231976d1b6b78c165a3b45f25e9 | 2,926 | ex | Elixir | lib/coercions/numeric.ex | VitorTrin/exchema_coercion | 8c580c5498979b88dd8bc015bc101606a3be97dd | [
"Apache-2.0"
] | null | null | null | lib/coercions/numeric.ex | VitorTrin/exchema_coercion | 8c580c5498979b88dd8bc015bc101606a3be97dd | [
"Apache-2.0"
] | null | null | null | lib/coercions/numeric.ex | VitorTrin/exchema_coercion | 8c580c5498979b88dd8bc015bc101606a3be97dd | [
"Apache-2.0"
] | null | null | null | defmodule ExchemaCoercion.Coercions.Numeric do
@moduledoc """
Coercion functions for numeric types
"""
alias Exchema.Types, as: T
@doc """
Converts string to a numeric type.
It is a Higher-Order-Function because it allows
customization based on wether or not we want the
coercion to be strict (it is, ... | 32.153846 | 113 | 0.663705 |
62a6a4ceb63bc4437fe989dd828ee9bff26edd6f | 9,139 | ex | Elixir | lib/petal_components/button.ex | doughsay/petal_components | 75e30ab078a205cb642ebea7c5d0ca8357f41464 | [
"MIT"
] | null | null | null | lib/petal_components/button.ex | doughsay/petal_components | 75e30ab078a205cb642ebea7c5d0ca8357f41464 | [
"MIT"
] | null | null | null | lib/petal_components/button.ex | doughsay/petal_components | 75e30ab078a205cb642ebea7c5d0ca8357f41464 | [
"MIT"
] | null | null | null | defmodule PetalComponents.Button do
use Phoenix.Component
alias PetalComponents.Loading
import PetalComponents.Link
# <.button link_type="button|a|live_patch|live_redirect" />
# prop class, :string
# prop label, :string
# prop size, :string
# prop variant, :string
# prop loading, :boolean, default: f... | 43.312796 | 501 | 0.679068 |
62a6c942381d260c6525c9cc0c10d10188536803 | 1,515 | ex | Elixir | clients/gmail/lib/google_api/gmail/v1/model/list_smime_info_response.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/gmail/lib/google_api/gmail/v1/model/list_smime_info_response.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/gmail/lib/google_api/gmail/v1/model/list_smime_info_response.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 31.5625 | 78 | 0.745875 |
62a6d4efdc618fd7b4a3cb4ad8afe4f2145de014 | 3,032 | ex | Elixir | lib/changelog_web.ex | snyk-omar/changelog.com | 66a8cff17ed8a237e439976aa7fb96b58ef276a3 | [
"MIT"
] | 2,599 | 2016-10-25T15:02:53.000Z | 2022-03-26T02:34:42.000Z | lib/changelog_web.ex | snyk-omar/changelog.com | 66a8cff17ed8a237e439976aa7fb96b58ef276a3 | [
"MIT"
] | 253 | 2016-10-25T20:29:24.000Z | 2022-03-29T21:52:36.000Z | lib/changelog_web.ex | snyk-omar/changelog.com | 66a8cff17ed8a237e439976aa7fb96b58ef276a3 | [
"MIT"
] | 298 | 2016-10-25T15:18:31.000Z | 2022-01-18T21:25:52.000Z | defmodule ChangelogWeb do
def controller do
quote do
use Phoenix.Controller, namespace: ChangelogWeb
require Logger
alias Changelog.{Policies, Repo}
alias ChangelogWeb.Plug.{Authorize, RequireUser, RequireGuest}
import Ecto
import Ecto.Query
alias ChangelogWeb.Router.... | 27.816514 | 90 | 0.644459 |
62a6e57f3fd826e5dbc8ec2d62e1af87650b1699 | 3,431 | exs | Elixir | test/ex_rets/search_response_test.exs | jdav-dev/ex_rets | 16eb6a1adc5d1d1eb259f86d6b09080c3c1068bf | [
"Apache-2.0"
] | 1 | 2019-12-20T14:23:19.000Z | 2019-12-20T14:23:19.000Z | test/ex_rets/search_response_test.exs | jdav-dev/ex_rets | 16eb6a1adc5d1d1eb259f86d6b09080c3c1068bf | [
"Apache-2.0"
] | null | null | null | test/ex_rets/search_response_test.exs | jdav-dev/ex_rets | 16eb6a1adc5d1d1eb259f86d6b09080c3c1068bf | [
"Apache-2.0"
] | null | null | null | defmodule ExRets.SearchResponseTest do
use ExUnit.Case, async: true
alias ExRets.HttpClient.Mock
alias ExRets.HttpRequest
alias ExRets.RetsResponse
alias ExRets.SearchResponse
doctest SearchResponse
@search_uri URI.parse("https://example.com/login")
@search_response_body """
<RETS ReplyCode="0" Re... | 32.367925 | 89 | 0.588167 |
62a71dfd46c02530f3bc5e9f3db5493d2b7c3bd2 | 712 | ex | Elixir | lib/course_01_web/gettext.ex | geirilja/web_dev | e1a64336bf52148a63e54a7326ea9ed13a2034a0 | [
"MIT"
] | null | null | null | lib/course_01_web/gettext.ex | geirilja/web_dev | e1a64336bf52148a63e54a7326ea9ed13a2034a0 | [
"MIT"
] | null | null | null | lib/course_01_web/gettext.ex | geirilja/web_dev | e1a64336bf52148a63e54a7326ea9ed13a2034a0 | [
"MIT"
] | null | null | null | defmodule Course01Web.Gettext do
@moduledoc """
A module providing Internationalization with a gettext-based API.
By using [Gettext](https://hexdocs.pm/gettext),
your module gains a set of macros for translations, for example:
import Course01Web.Gettext
# Simple translation
gettext "Here is... | 28.48 | 72 | 0.682584 |
62a72045fa97acaa8ae99a19d7e8c16fbcb3fb62 | 4,127 | ex | Elixir | lib/state_chart/definition.ex | johnnyt/ex_statechart | 54b4df032700917df578b0a4543338a96864d2e5 | [
"MIT"
] | null | null | null | lib/state_chart/definition.ex | johnnyt/ex_statechart | 54b4df032700917df578b0a4543338a96864d2e5 | [
"MIT"
] | null | null | null | lib/state_chart/definition.ex | johnnyt/ex_statechart | 54b4df032700917df578b0a4543338a96864d2e5 | [
"MIT"
] | 1 | 2020-11-11T15:57:52.000Z | 2020-11-11T15:57:52.000Z | defmodule StateChart.Definition do
defmacro __using__([do: block]) do
quote do
def __compute_fields__(model) do
model
end
defoverridable __compute_fields__: 1
import unquote(__MODULE__)
var!(fields) = []
var!(struct) = []
unquote(block)
defstruct var!(struc... | 25.012121 | 82 | 0.567967 |
62a748d0cc607b9fcf0803587a5b811e667f5701 | 1,285 | exs | Elixir | priv/repo/migrations/20190329161411_create_base_tables.exs | akdilsiz/commodity-cloud | 08c366c9fc95fbb3565131672db4cc52f8b870c9 | [
"Apache-2.0"
] | 7 | 2019-04-11T21:12:49.000Z | 2021-04-14T12:56:42.000Z | priv/repo/migrations/20190329161411_create_base_tables.exs | akdilsiz/commodity-cloud | 08c366c9fc95fbb3565131672db4cc52f8b870c9 | [
"Apache-2.0"
] | null | null | null | priv/repo/migrations/20190329161411_create_base_tables.exs | akdilsiz/commodity-cloud | 08c366c9fc95fbb3565131672db4cc52f8b870c9 | [
"Apache-2.0"
] | 2 | 2019-06-06T18:05:33.000Z | 2019-07-16T08:49:45.000Z | ##
# Copyright 2018 Abdulkadir DILSIZ
#
# 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... | 27.934783 | 77 | 0.664591 |
62a76f42ff68931e82710aa32139c220a3a95b2b | 3,986 | ex | Elixir | lib/rig_api/v2/responses.ex | prakriti07/reactive-interaction-gateway | c9d33064982b5ae12e9af7a300e90b3e7973d0b3 | [
"Apache-2.0"
] | null | null | null | lib/rig_api/v2/responses.ex | prakriti07/reactive-interaction-gateway | c9d33064982b5ae12e9af7a300e90b3e7973d0b3 | [
"Apache-2.0"
] | null | null | null | lib/rig_api/v2/responses.ex | prakriti07/reactive-interaction-gateway | c9d33064982b5ae12e9af7a300e90b3e7973d0b3 | [
"Apache-2.0"
] | 1 | 2020-07-17T05:17:32.000Z | 2020-07-17T05:17:32.000Z | defmodule RigApi.V2.Responses do
@moduledoc "Controller for submitting (backend) responses to asynchronous (frontend) requests."
require Logger
use RigApi, :controller
use PhoenixSwagger
alias Rig.Connection.Codec
alias RigCloudEvents.CloudEvent
@prefix "/v2"
action_fallback(RigApi.Fallback)
swag... | 33.495798 | 97 | 0.595083 |
62a7702f731e9f220c9735ef61a036661c33335e | 402 | exs | Elixir | hyperion/config/test.exs | FoxComm/highlander | 1aaf8f9e5353b94c34d574c2a92206a1c363b5be | [
"MIT"
] | 10 | 2018-04-12T22:29:52.000Z | 2021-10-18T17:07:45.000Z | hyperion/config/test.exs | FoxComm/highlander | 1aaf8f9e5353b94c34d574c2a92206a1c363b5be | [
"MIT"
] | null | null | null | hyperion/config/test.exs | FoxComm/highlander | 1aaf8f9e5353b94c34d574c2a92206a1c363b5be | [
"MIT"
] | 1 | 2018-07-06T18:42:05.000Z | 2018-07-06T18:42:05.000Z | use Mix.Config
config :hyperion, Hyperion.Repo,
adapter: Ecto.Adapters.Postgres,
username: System.get_env("HYPERION_DB_USER"),
password: System.get_env("HYPERION_DB_PASSWORD"),
database: System.get_env("HYPERION_DB_NAME"),
hostname: System.get_env("HYPERION_DB_HOST"),
pool: Ecto.Adapters.SQL.Sandbox
confi... | 25.125 | 51 | 0.733831 |
62a7aeb8eebcac67e4d610e89529926c118d18d2 | 1,283 | ex | Elixir | lib/pelemay/generator/interface.ex | christianjgreen/pelemay | b400c4420f9edd41031d7dbc962eff38215d9e05 | [
"Apache-2.0"
] | null | null | null | lib/pelemay/generator/interface.ex | christianjgreen/pelemay | b400c4420f9edd41031d7dbc962eff38215d9e05 | [
"Apache-2.0"
] | null | null | null | lib/pelemay/generator/interface.ex | christianjgreen/pelemay | b400c4420f9edd41031d7dbc962eff38215d9e05 | [
"Apache-2.0"
] | null | null | null | defmodule Pelemay.Generator.Interface do
alias Pelemay.Generator
alias Pelemay.Db
alias Pelemay.Generator
def generate(module) do
funcs = generate_functions()
str = """
# This file was generated by Pelemay.Generator.Interface
defmodule #{Generator.nif_module(module)} do
@compile {:autolo... | 20.046875 | 82 | 0.597818 |
62a7afeb5dbb648dc64d4c09155fa33c2e2c7b5a | 10,593 | ex | Elixir | lib/scaffolding/common/type_handlers/time_stamp.second.ex | noizu-labs/advanced_elixir_scaffolding | 9e7a1199a4b25fcc16fc5a795104b926d2f238df | [
"MIT"
] | null | null | null | lib/scaffolding/common/type_handlers/time_stamp.second.ex | noizu-labs/advanced_elixir_scaffolding | 9e7a1199a4b25fcc16fc5a795104b926d2f238df | [
"MIT"
] | null | null | null | lib/scaffolding/common/type_handlers/time_stamp.second.ex | noizu-labs/advanced_elixir_scaffolding | 9e7a1199a4b25fcc16fc5a795104b926d2f238df | [
"MIT"
] | null | null | null | #-------------------------------------------------------------------------------
# Author: Keith Brings <keith.brings@noizu.com>
# Copyright (C) 2021 Noizu Labs, Inc. All rights reserved.
#-------------------------------------------------------------------------------
defmodule Noizu.DomainObject.TimeStamp.Second do
... | 44.885593 | 171 | 0.610781 |
62a7b70c3422901b7d91e6daa64a100b161b1115 | 3,719 | ex | Elixir | lib/hexpm/billing/hexpm.ex | hubertpompecki/hexpm | 5cd4208b07a70bf2e1490930bf5d577978793b50 | [
"Apache-2.0"
] | null | null | null | lib/hexpm/billing/hexpm.ex | hubertpompecki/hexpm | 5cd4208b07a70bf2e1490930bf5d577978793b50 | [
"Apache-2.0"
] | null | null | null | lib/hexpm/billing/hexpm.ex | hubertpompecki/hexpm | 5cd4208b07a70bf2e1490930bf5d577978793b50 | [
"Apache-2.0"
] | null | null | null | defmodule Hexpm.Billing.Hexpm do
@behaviour Hexpm.Billing
def checkout(repository, data) do
case post("api/customers/#{repository}/payment_source", data, recv_timeout: 15_000) do
{:ok, 204, _headers, body} -> {:ok, body}
{:ok, 422, _headers, body} -> {:error, body}
end
end
def dashboard(re... | 23.839744 | 90 | 0.580801 |
62a7dea8035830d7044696eca7ecbc7ea9fe2328 | 186 | exs | Elixir | priv/repo/migrations/20200325135627_add_active_session_to_users.exs | smartlogic/Challenge_gov | b4203d1fcfb742dd17ecfadb9e9c56ad836d4254 | [
"CC0-1.0"
] | 9 | 2020-02-26T20:24:38.000Z | 2022-03-22T21:14:52.000Z | priv/repo/migrations/20200325135627_add_active_session_to_users.exs | smartlogic/Challenge_gov | b4203d1fcfb742dd17ecfadb9e9c56ad836d4254 | [
"CC0-1.0"
] | 15 | 2020-04-22T19:33:24.000Z | 2022-03-26T15:11:17.000Z | priv/repo/migrations/20200325135627_add_active_session_to_users.exs | smartlogic/Challenge_gov | b4203d1fcfb742dd17ecfadb9e9c56ad836d4254 | [
"CC0-1.0"
] | 4 | 2020-04-27T22:58:57.000Z | 2022-01-14T13:42:09.000Z | defmodule ChallengeGov.Repo.Migrations.AddActiveSessionToUsers do
use Ecto.Migration
def change do
alter table(:users) do
add(:active_session, :boolean)
end
end
end
| 18.6 | 65 | 0.736559 |
62a7e902fb8dddc21ad1b0969305fa8e723e4f9e | 272 | exs | Elixir | test/pescarte_web/views/layout_view_test.exs | cciuenf/pea_pescarte | a9e673e1eeee8090192cd0509225f1f66738b130 | [
"BSD-3-Clause"
] | null | null | null | test/pescarte_web/views/layout_view_test.exs | cciuenf/pea_pescarte | a9e673e1eeee8090192cd0509225f1f66738b130 | [
"BSD-3-Clause"
] | null | null | null | test/pescarte_web/views/layout_view_test.exs | cciuenf/pea_pescarte | a9e673e1eeee8090192cd0509225f1f66738b130 | [
"BSD-3-Clause"
] | null | null | null | defmodule PescarteWeb.LayoutViewTest do
use PescarteWeb.ConnCase, async: true
# When testing helpers, you may want to import Phoenix.HTML and
# use functions such as safe_to_string() to convert the helper
# result into an HTML string.
# import Phoenix.HTML
end
| 30.222222 | 65 | 0.768382 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.