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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
936c9d99c574384f8128134b551f431e58af4ad4 | 662 | ex | Elixir | lib/cadet/course/sourcecastUpload.ex | Hou-Rui/cadet | f9036d76005bf3b267b632dce176067ae1a19f71 | [
"Apache-2.0"
] | null | null | null | lib/cadet/course/sourcecastUpload.ex | Hou-Rui/cadet | f9036d76005bf3b267b632dce176067ae1a19f71 | [
"Apache-2.0"
] | 2 | 2020-04-22T09:06:38.000Z | 2020-04-22T09:15:33.000Z | lib/cadet/course/sourcecastUpload.ex | Hou-Rui/cadet | f9036d76005bf3b267b632dce176067ae1a19f71 | [
"Apache-2.0"
] | 1 | 2020-06-01T03:26:02.000Z | 2020-06-01T03:26:02.000Z | defmodule Cadet.Course.SourcecastUpload do
@moduledoc """
Represents an uploaded file for Sourcecast
"""
use Arc.Definition
use Arc.Ecto.Definition
@extension_whitelist ~w(.wav)
@versions [:original]
def bucket, do: :cadet |> Application.fetch_env!(:uploader) |> Keyword.get(:sourcecasts_bucket)
def... | 24.518519 | 97 | 0.679758 |
936cd9a3c3cfae6e1cf5d600469fbeb4aa64c89a | 302 | ex | Elixir | lib/ref_inspector/downloader/adapter.ex | elixir-inspector/ref_inspector | f34485a8e32f0aaea2e3951fbb756eac14a9f8dd | [
"Apache-2.0"
] | 7 | 2018-12-22T14:41:26.000Z | 2020-05-04T08:16:11.000Z | lib/ref_inspector/downloader/adapter.ex | elixir-inspector/ref_inspector | f34485a8e32f0aaea2e3951fbb756eac14a9f8dd | [
"Apache-2.0"
] | 2 | 2019-11-25T09:41:27.000Z | 2020-05-06T17:30:45.000Z | lib/ref_inspector/downloader/adapter.ex | elixir-inspector/ref_inspector | f34485a8e32f0aaea2e3951fbb756eac14a9f8dd | [
"Apache-2.0"
] | null | null | null | defmodule RefInspector.Downloader.Adapter do
@moduledoc """
Behaviour for modules used by the downloader.
"""
@doc """
Reads a database file from a remote location and returns it's contents.
"""
@callback read_remote(location :: binary) :: {:ok, contents :: binary} | {:error, term}
end
| 27.454545 | 89 | 0.692053 |
936ce0f47f1a2e34798b8554b618d0c711225361 | 382 | ex | Elixir | test/support/customer.ex | quexpl/paginator | a59563e40d4be1d182b5ce331b52bb66ea8d2cea | [
"MIT"
] | null | null | null | test/support/customer.ex | quexpl/paginator | a59563e40d4be1d182b5ce331b52bb66ea8d2cea | [
"MIT"
] | null | null | null | test/support/customer.ex | quexpl/paginator | a59563e40d4be1d182b5ce331b52bb66ea8d2cea | [
"MIT"
] | null | null | null | defmodule Paginator.Customer do
use Ecto.Schema
import Ecto.Query
schema "customers" do
field(:name, :string)
field(:active, :boolean)
field(:rank_value, :float, virtual: true)
has_many(:payments, Paginator.Payment)
has_one(:address, Paginator.Address)
timestamps()
end
def active(... | 18.190476 | 45 | 0.670157 |
936d028ddb9a86f2253fd8909140d9204426ab7e | 2,603 | ex | Elixir | clients/content/lib/google_api/content/v2/model/account_status.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/account_status.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/account_status.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"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... | 36.152778 | 144 | 0.728774 |
936d1140e70d72f75554f19c758d1b9346ba05c9 | 1,659 | ex | Elixir | clients/iap/lib/google_api/iap/v1/model/test_iam_permissions_request.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/iap/lib/google_api/iap/v1/model/test_iam_permissions_request.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/iap/lib/google_api/iap/v1/model/test_iam_permissions_request.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"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.297872 | 288 | 0.740808 |
936d228a2a882205495ae7bd96603b89e083a9c5 | 141 | exs | Elixir | test/elixibop_test.exs | derrickp/elixibop | e84cee0d0ce1b194a7de91aaefbb0b9ff3c4c9df | [
"MIT"
] | null | null | null | test/elixibop_test.exs | derrickp/elixibop | e84cee0d0ce1b194a7de91aaefbb0b9ff3c4c9df | [
"MIT"
] | null | null | null | test/elixibop_test.exs | derrickp/elixibop | e84cee0d0ce1b194a7de91aaefbb0b9ff3c4c9df | [
"MIT"
] | null | null | null | defmodule ElixibopTest do
use ExUnit.Case
doctest Elixibop
test "greets the world" do
assert Elixibop.hello() == :world
end
end
| 15.666667 | 37 | 0.716312 |
936d63360802420eee4b4107779f0b77d35266fe | 83 | exs | Elixir | test/sneex/basic_types_test.exs | NickMcG/SNEEX | 901215dea41fa21314a4f4db46b51648158f1544 | [
"MIT"
] | 1 | 2019-11-16T00:33:02.000Z | 2019-11-16T00:33:02.000Z | test/sneex/basic_types_test.exs | NickMcG/SNEEX | 901215dea41fa21314a4f4db46b51648158f1544 | [
"MIT"
] | 1 | 2019-08-11T23:02:15.000Z | 2019-08-11T23:02:15.000Z | test/sneex/basic_types_test.exs | NickMcG/SNEEX | 901215dea41fa21314a4f4db46b51648158f1544 | [
"MIT"
] | null | null | null | defmodule Sneex.BasicTypesTest do
use ExUnit.Case
doctest Sneex.BasicTypes
end
| 16.6 | 33 | 0.819277 |
936db83ee8636906d01bc77ca47a162b65e5d93b | 2,218 | ex | Elixir | clients/spanner/lib/google_api/spanner/v1/model/database.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/spanner/lib/google_api/spanner/v1/model/database.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/spanner/lib/google_api/spanner/v1/model/database.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... | 39.607143 | 279 | 0.712804 |
936dbb4339359b3c03680e1fa0d070fc0c6d35ec | 1,441 | ex | Elixir | lib/tourney/tourney_schedule_config.ex | zeroasterisk/wordza | e0cdf317855ce2959865e6551f32e85a7c6fc2e1 | [
"MIT"
] | null | null | null | lib/tourney/tourney_schedule_config.ex | zeroasterisk/wordza | e0cdf317855ce2959865e6551f32e85a7c6fc2e1 | [
"MIT"
] | null | null | null | lib/tourney/tourney_schedule_config.ex | zeroasterisk/wordza | e0cdf317855ce2959865e6551f32e85a7c6fc2e1 | [
"MIT"
] | null | null | null | defmodule Wordza.TourneyScheduleConfig do
@moduledoc """
This is the config for a Schedule of Tourney Games
It contains information needed to start each game
and information about how many games we should run
and how many games we can run in parallel
"""
defstruct [
# config for each Tourney Game
... | 26.685185 | 63 | 0.670368 |
936dc704ca1670341138d95dd366483ca2c80320 | 1,801 | ex | Elixir | lib/obank/accounts/user.ex | o-marchi/o-bank-api | fd4595a6fbffb89a0ca4c2dd9aa8b4f92e700aa4 | [
"MIT"
] | null | null | null | lib/obank/accounts/user.ex | o-marchi/o-bank-api | fd4595a6fbffb89a0ca4c2dd9aa8b4f92e700aa4 | [
"MIT"
] | null | null | null | lib/obank/accounts/user.ex | o-marchi/o-bank-api | fd4595a6fbffb89a0ca4c2dd9aa8b4f92e700aa4 | [
"MIT"
] | null | null | null | defmodule Obank.Accounts.User do
use Ecto.Schema
import Ecto.Changeset
import Comeonin.Bcrypt, only: [hashpwsalt: 1]
alias Obank.Banking.Transfer
schema "users" do
field :email, :string
field :name, :string
field :cpf, :string
field :amount, :integer
field :password, :string, virtual: ... | 26.485294 | 186 | 0.642421 |
936dd66315e611791ab9cf493ecf24a9a8b8b8d7 | 582 | ex | Elixir | lib/zaryn/p2p/message/cross_validation_done.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/cross_validation_done.ex | ambareesha7/node-zaryn | 136e542801bf9b6fa4a015d3464609fdf3dacee8 | [
"Apache-2.0"
] | null | null | null | lib/zaryn/p2p/message/cross_validation_done.ex | ambareesha7/node-zaryn | 136e542801bf9b6fa4a015d3464609fdf3dacee8 | [
"Apache-2.0"
] | null | null | null | defmodule Zaryn.P2P.Message.CrossValidationDone do
@moduledoc """
Represents a message to notify the end of the cross validation for a given transaction address
This message is used during the mining process by the cross validation nodes.
"""
@enforce_keys [:address, :cross_validation_stamp]
defstruct [:ad... | 32.333333 | 96 | 0.750859 |
936dd962af0129a376dce784502e44717358e1f3 | 269 | ex | Elixir | lib/ua_inspector/result/bot_producer.ex | lessless/ua_inspector | 6c01e12f80c629916de0c53ae5950a89dbd5de17 | [
"Apache-2.0"
] | 57 | 2015-04-07T03:10:45.000Z | 2019-03-11T01:01:40.000Z | lib/ua_inspector/result/bot_producer.ex | lessless/ua_inspector | 6c01e12f80c629916de0c53ae5950a89dbd5de17 | [
"Apache-2.0"
] | 16 | 2015-03-09T19:56:17.000Z | 2019-03-16T14:24:02.000Z | lib/ua_inspector/result/bot_producer.ex | lessless/ua_inspector | 6c01e12f80c629916de0c53ae5950a89dbd5de17 | [
"Apache-2.0"
] | 15 | 2015-02-02T23:14:00.000Z | 2019-03-16T13:15:05.000Z | defmodule UAInspector.Result.BotProducer do
@moduledoc """
Bot producer result struct.
"""
@type t :: %__MODULE__{
name: String.t() | :unknown,
url: String.t() | :unknown
}
defstruct name: :unknown,
url: :unknown
end
| 19.214286 | 43 | 0.572491 |
936e1aa0ead5c626d67eb545a908ecae4f7a7633 | 227 | exs | Elixir | scripts/exemplo_pipe.exs | matheuscamarques/curso_de_elixir_sequencial_marco_2022 | a29d7beef321b12c56661bb035bd62ad41d6e7d0 | [
"MIT"
] | 2 | 2022-03-07T18:24:44.000Z | 2022-03-22T09:26:20.000Z | scripts/exemplo_pipe.exs | matheuscamarques/curso_de_elixir_sequencial_marco_2022 | a29d7beef321b12c56661bb035bd62ad41d6e7d0 | [
"MIT"
] | null | null | null | scripts/exemplo_pipe.exs | matheuscamarques/curso_de_elixir_sequencial_marco_2022 | a29d7beef321b12c56661bb035bd62ad41d6e7d0 | [
"MIT"
] | 3 | 2022-03-14T22:34:06.000Z | 2022-03-16T20:56:27.000Z | f = fn x,y -> x/y end
g = fn w,t -> w*t end
num1 = 10.7
num2 = 3.2
num3 = 450
IO.puts(g.(f.(num1,num2), num3))
num1
|> f.(num2)
|> g.(num3)
|> IO.puts()
1
|> then(fn x -> Enum.drop(["a", "b", "c"], x) end)
|> IO.inspect()
| 11.947368 | 50 | 0.493392 |
936e48f28c4115fc6ae83876a18a7f9f0bb58196 | 2,177 | exs | Elixir | persistent_tree/test/persistent_tree_test/day04_test.exs | alex-dukhno/elixir-tdd-katas | 57e25fc275c4274c889f2b3760276cc8a393de9e | [
"MIT"
] | null | null | null | persistent_tree/test/persistent_tree_test/day04_test.exs | alex-dukhno/elixir-tdd-katas | 57e25fc275c4274c889f2b3760276cc8a393de9e | [
"MIT"
] | null | null | null | persistent_tree/test/persistent_tree_test/day04_test.exs | alex-dukhno/elixir-tdd-katas | 57e25fc275c4274c889f2b3760276cc8a393de9e | [
"MIT"
] | null | null | null | defmodule PersistentTreeTest.Day04 do
use ExUnit.Case
alias PersistentTree.Day04, as: Tree
alias PersistentTree.Day04.Leaf
alias PersistentTree.Day04.Node
defp empty(), do: %Leaf{}
defp into_tree(list), do:
empty()
|> into_tree(list)
defp into_tree(tree, []), do: tree
defp into_tree(tree, [h... | 27.2125 | 60 | 0.466697 |
936e66a06c828b3669b2f6f0c3592dea9d74c248 | 1,694 | ex | Elixir | clients/content/lib/google_api/content/v2/model/orders_set_line_item_metadata_response.ex | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/orders_set_line_item_metadata_response.ex | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/orders_set_line_item_metadata_response.ex | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"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.88 | 202 | 0.742621 |
936e7a33d634371eacf64b7d9a0bf49e73cc350b | 2,123 | exs | Elixir | mix.exs | aleDsz/bacen_ccs | 573634bd4cad5f068a120850fe8ef846d270a604 | [
"MIT"
] | 3 | 2021-10-30T20:02:52.000Z | 2021-11-12T22:55:30.000Z | mix.exs | aleDsz/bacen_ccs | 573634bd4cad5f068a120850fe8ef846d270a604 | [
"MIT"
] | 7 | 2021-11-18T00:39:10.000Z | 2022-03-23T11:11:26.000Z | mix.exs | aleDsz/bacen_ccs | 573634bd4cad5f068a120850fe8ef846d270a604 | [
"MIT"
] | null | null | null | defmodule Bacen.CCS.MixProject do
use Mix.Project
@version System.get_env("VERSION", "0.1.0")
def project do
[
app: :bacen_ccs,
version: @version,
elixir: "~> 1.11",
elixirc_paths: elixirc_paths(Mix.env()),
test_coverage: [tool: ExCoveralls],
start_permanent: Mix.env() ==... | 25.578313 | 111 | 0.537447 |
936e86849de43d29496e3383e84aad0a0c10dfbb | 267 | ex | Elixir | example_app/web/controllers/user_controller.ex | aforward-oss/addict | dfb20b7299614becc5c472564a1e6ba6d7994615 | [
"MIT"
] | null | null | null | example_app/web/controllers/user_controller.ex | aforward-oss/addict | dfb20b7299614becc5c472564a1e6ba6d7994615 | [
"MIT"
] | null | null | null | example_app/web/controllers/user_controller.ex | aforward-oss/addict | dfb20b7299614becc5c472564a1e6ba6d7994615 | [
"MIT"
] | null | null | null | defmodule ExampleApp.UserController do
use ExampleApp.Web, :controller
use Addict.BaseController
def signout(conn,_) do
{conn, message} = Addict.SessionInteractor.logout(conn)
json conn, %{message: "Logged out! And this is a custom message"}
end
end
| 26.7 | 69 | 0.741573 |
936e8ac258181a5b50df222da5e129cc9113a7d6 | 1,848 | ex | Elixir | clients/my_business_business_information/lib/google_api/my_business_business_information/v1/model/special_hours.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_business_information/lib/google_api/my_business_business_information/v1/model/special_hours.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_business_information/lib/google_api/my_business_business_information/v1/model/special_hours.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... | 36.235294 | 197 | 0.761905 |
936eb09c0208a1e040ea9c02777f895651ad84b0 | 227 | ex | Elixir | elixir/phoenix/web/router.ex | AllanKlaus/web-frameworks | 87921eb8c90a006ffd4a70b01184ace495beabea | [
"MIT"
] | 1 | 2020-06-03T07:07:48.000Z | 2020-06-03T07:07:48.000Z | elixir/phoenix/web/router.ex | armando170A/web-fraworks | 7efa26caa29edb93cc475e5b5b5942a815090f75 | [
"MIT"
] | null | null | null | elixir/phoenix/web/router.ex | armando170A/web-fraworks | 7efa26caa29edb93cc475e5b5b5942a815090f75 | [
"MIT"
] | null | null | null | defmodule MyPhoenix.Router do
use MyPhoenix.Web, :router
scope "/", MyPhoenix do
get "/", PageController, :index
get "/user/:id", PageController, :show_user
post "/user", PageController, :create_user
end
end
| 22.7 | 47 | 0.687225 |
936ef4c59ab7fb8aed6d8d8b05a06642b09a9e2e | 126 | exs | Elixir | apps/aecore/config/test.exs | gspasov/dogs-blockchain | 884c14cfc98de2c3793a204da069630d090bbc90 | [
"0BSD"
] | null | null | null | apps/aecore/config/test.exs | gspasov/dogs-blockchain | 884c14cfc98de2c3793a204da069630d090bbc90 | [
"0BSD"
] | 2 | 2018-10-01T16:46:26.000Z | 2018-10-01T19:45:42.000Z | apps/aecore/config/test.exs | gspasov/dogs-blockchain | 884c14cfc98de2c3793a204da069630d090bbc90 | [
"0BSD"
] | null | null | null | use Mix.Config
import_config "dev.exs"
config :aecore, :pow, max_target_change: 0
config :aecore, :tx_data, minimum_fee: 1
| 15.75 | 42 | 0.753968 |
936f2c58fed6c1b389375752bde4783579b2a04d | 820 | ex | Elixir | web/models/facebook/message.ex | seansu4you87/betazoids | a8aac9074f5efaad4cd88ffdf7cdef53d4beb5cd | [
"MIT"
] | null | null | null | web/models/facebook/message.ex | seansu4you87/betazoids | a8aac9074f5efaad4cd88ffdf7cdef53d4beb5cd | [
"MIT"
] | null | null | null | web/models/facebook/message.ex | seansu4you87/betazoids | a8aac9074f5efaad4cd88ffdf7cdef53d4beb5cd | [
"MIT"
] | null | null | null | defmodule Betazoids.Facebook.Message do
use Betazoids.Web, :model
schema "facebook_messages" do
field :text, :string
field :facebook_id, :string
field :created_at, Ecto.DateTime
belongs_to :user, Betazoids.Facebook.User
belongs_to :collector_log, Betazoids.CollectorLog
field :collector_log... | 26.451613 | 96 | 0.737805 |
936f36ce7489c2080cf22d5dba9245e5a4fc6b85 | 1,400 | ex | Elixir | lib/fakepage_web/telemetry.ex | murat/fakepagex | e98b4bfb9571ae19f2211542015a706568a755c7 | [
"MIT"
] | null | null | null | lib/fakepage_web/telemetry.ex | murat/fakepagex | e98b4bfb9571ae19f2211542015a706568a755c7 | [
"MIT"
] | null | null | null | lib/fakepage_web/telemetry.ex | murat/fakepagex | e98b4bfb9571ae19f2211542015a706568a755c7 | [
"MIT"
] | null | null | null | defmodule FakepageWeb.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 will execute the given period measurements
# every 10_000ms. Learn... | 28.571429 | 86 | 0.670714 |
936f4d94197998465de36a4e306d16483d3e970f | 95 | exs | Elixir | test/util/map_test.exs | weaver-engine/weaver | b60a59673d7adb0ebfbb5f392d03fe09399054bc | [
"MIT"
] | null | null | null | test/util/map_test.exs | weaver-engine/weaver | b60a59673d7adb0ebfbb5f392d03fe09399054bc | [
"MIT"
] | null | null | null | test/util/map_test.exs | weaver-engine/weaver | b60a59673d7adb0ebfbb5f392d03fe09399054bc | [
"MIT"
] | null | null | null | defmodule Weaver.Util.MapTest do
use ExUnit.Case, async: true
doctest Weaver.Util.Map
end
| 15.833333 | 32 | 0.768421 |
936f592fd5f80cff3c2b7933d6e4e3477c49168f | 283 | ex | Elixir | web/views/auth_token_view.ex | nsarno/winter | a65a6aa61d2b1af39277338277f8b3f479643939 | [
"MIT"
] | 3 | 2015-08-24T11:44:19.000Z | 2016-10-01T21:37:05.000Z | web/views/auth_token_view.ex | nsarno/winter | a65a6aa61d2b1af39277338277f8b3f479643939 | [
"MIT"
] | null | null | null | web/views/auth_token_view.ex | nsarno/winter | a65a6aa61d2b1af39277338277f8b3f479643939 | [
"MIT"
] | null | null | null | defmodule Storm.AuthTokenView do
use Storm.Web, :view
def render("show.json", %{auth_token: token}) do
%{auth_token: render_one(token, Storm.AuthTokenView, "auth_token.json")}
end
def render("auth_token.json", %{auth_token: token}) do
%{token: token.jwt}
end
end
| 23.583333 | 76 | 0.696113 |
936f60e6d9eff0007378fadb41d69ad348c53733 | 1,129 | ex | Elixir | solomon/web/views/user_view.ex | FoxComm/highlander | 1aaf8f9e5353b94c34d574c2a92206a1c363b5be | [
"MIT"
] | 10 | 2018-04-12T22:29:52.000Z | 2021-10-18T17:07:45.000Z | solomon/web/views/user_view.ex | FoxComm/highlander | 1aaf8f9e5353b94c34d574c2a92206a1c363b5be | [
"MIT"
] | null | null | null | solomon/web/views/user_view.ex | FoxComm/highlander | 1aaf8f9e5353b94c34d574c2a92206a1c363b5be | [
"MIT"
] | 1 | 2018-07-06T18:42:05.000Z | 2018-07-06T18:42:05.000Z | defmodule Solomon.UserView do
use Solomon.Web, :view
alias Solomon.UserView
def render("index.json", %{users: users}) do
%{users: render_many(users, UserView, "user.json")}
end
def render("show.json", %{user: user}) do
%{user: render_one(user, UserView, "user.json")}
end
def render("user.json",... | 26.880952 | 68 | 0.666076 |
936f986a99b6d1cf35cca8962c55b5b7bf2b0068 | 2,801 | ex | Elixir | apps/alert_processor/lib/model/query.ex | mbta/alerts_concierge | d8e643445ef06f80ca273f2914c6959daea146f6 | [
"MIT"
] | null | null | null | apps/alert_processor/lib/model/query.ex | mbta/alerts_concierge | d8e643445ef06f80ca273f2914c6959daea146f6 | [
"MIT"
] | 21 | 2021-03-12T17:05:30.000Z | 2022-02-16T21:48:35.000Z | apps/alert_processor/lib/model/query.ex | mbta/alerts_concierge | d8e643445ef06f80ca273f2914c6959daea146f6 | [
"MIT"
] | 1 | 2021-12-09T15:09:53.000Z | 2021-12-09T15:09:53.000Z | defmodule AlertProcessor.Model.Query do
@moduledoc "SQL queries used for reporting on the admin dashboard."
alias AlertProcessor.Repo
@type t :: %__MODULE__{id: String.t(), label: String.t(), query: String.t()}
@enforce_keys [:label, :query]
defstruct [:id] ++ @enforce_keys
@subscription_counts """
... | 30.78022 | 135 | 0.591574 |
936fb2e13ca9f5fbcdb27deb00e7c042b4f4c993 | 2,146 | ex | Elixir | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v2beta1/model/list_non_billable_winning_bids_response.ex | ericrwolfe/elixir-google-api | 3dc0f17edd5e2d6843580c16ddae3bf84b664ffd | [
"Apache-2.0"
] | null | null | null | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v2beta1/model/list_non_billable_winning_bids_response.ex | ericrwolfe/elixir-google-api | 3dc0f17edd5e2d6843580c16ddae3bf84b664ffd | [
"Apache-2.0"
] | null | null | null | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v2beta1/model/list_non_billable_winning_bids_response.ex | ericrwolfe/elixir-google-api | 3dc0f17edd5e2d6843580c16ddae3bf84b664ffd | [
"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... | 38.321429 | 290 | 0.780056 |
936fc554419adaf8eacaf5d030cbd809d9fd96d7 | 14,916 | exs | Elixir | test/bootleg/config_functional_test.exs | jayjun/bootleg | 2283ad22810178625c45eb2661624fac914befdd | [
"MIT"
] | 423 | 2017-07-19T18:40:45.000Z | 2021-12-03T08:26:15.000Z | test/bootleg/config_functional_test.exs | jayjun/bootleg | 2283ad22810178625c45eb2661624fac914befdd | [
"MIT"
] | 115 | 2017-07-19T18:30:14.000Z | 2020-10-27T20:53:32.000Z | test/bootleg/config_functional_test.exs | jayjun/bootleg | 2283ad22810178625c45eb2661624fac914befdd | [
"MIT"
] | 39 | 2017-07-20T03:14:18.000Z | 2020-11-18T13:39:52.000Z | defmodule Bootleg.ConfigFunctionalTest do
use Bootleg.FunctionalCase, async: false
import ExUnit.CaptureIO
setup %{hosts: hosts} do
use Bootleg.DSL
app_host = hd(hosts)
build_hosts = tl(hosts)
role(
:app,
app_host.ip,
port: app_host.port,
user: app_host.user,
passw... | 31.534884 | 97 | 0.582998 |
936febd1a9db6240d8744497df549f456352443f | 1,628 | ex | Elixir | clients/people/lib/google_api/people/v1/model/tagline.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/people/lib/google_api/people/v1/model/tagline.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/people/lib/google_api/people/v1/model/tagline.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... | 32.56 | 118 | 0.719902 |
937020097b9915c0dc8120411d15dbc45cc74f6f | 82 | exs | Elixir | config/waiter_config.exs | mogorman/ditto | 6c19a0c3f2bc3cf243ea46d5eae0087850045a82 | [
"MIT"
] | 1 | 2020-08-29T08:29:14.000Z | 2020-08-29T08:29:14.000Z | config/waiter_config.exs | mogorman/ditto | 6c19a0c3f2bc3cf243ea46d5eae0087850045a82 | [
"MIT"
] | null | null | null | config/waiter_config.exs | mogorman/ditto | 6c19a0c3f2bc3cf243ea46d5eae0087850045a82 | [
"MIT"
] | null | null | null | use Mix.Config
# spin wait
config :ditto,
max_waiters: 0,
waiter_sleep_ms: 0
| 11.714286 | 20 | 0.719512 |
937028a043c4d6dd39b2a8535fd338658c2f9610 | 78 | ex | Elixir | lib/mangopay_ex/resources/auth.ex | StephaneRob/mangopay_ex | d05dab35f431c2f18f6ae95aedf68dede6731402 | [
"MIT"
] | 1 | 2018-02-01T11:10:09.000Z | 2018-02-01T11:10:09.000Z | lib/mangopay_ex/resources/auth.ex | StephaneRob/mangopay_ex | d05dab35f431c2f18f6ae95aedf68dede6731402 | [
"MIT"
] | null | null | null | lib/mangopay_ex/resources/auth.ex | StephaneRob/mangopay_ex | d05dab35f431c2f18f6ae95aedf68dede6731402 | [
"MIT"
] | null | null | null | defmodule MangopayEx.Auth do
use MangopayEx.Resource, import: [:auth]
end
| 13 | 42 | 0.75641 |
93704386094151447f0be4b06c5b3316d21cb5e7 | 11,075 | ex | Elixir | lib/mix/tasks/coh.clean.ex | thefuture2092/coherence | 377d91ff01622773b5a9ec39fadf1f8c27328879 | [
"MIT"
] | null | null | null | lib/mix/tasks/coh.clean.ex | thefuture2092/coherence | 377d91ff01622773b5a9ec39fadf1f8c27328879 | [
"MIT"
] | null | null | null | lib/mix/tasks/coh.clean.ex | thefuture2092/coherence | 377d91ff01622773b5a9ec39fadf1f8c27328879 | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.Coh.Clean do
@moduledoc """
This task will clean most of the files installed by the `mix coh.install` task.
Projects created with both `coh.install` and `coherence.install` can be
cleaned with this task. It will auto detect the project structure and remove
the appropriate files.
## Exa... | 25.876168 | 117 | 0.626637 |
937077ba998fc3ebe5a75d04a66c93fefc995a40 | 186 | exs | Elixir | priv/repo/migrations/20161021000735_create_location.exs | beccanelson/8th-light-library | d0aa70371ca7645abf8609b53202ebb1808ca633 | [
"MIT"
] | null | null | null | priv/repo/migrations/20161021000735_create_location.exs | beccanelson/8th-light-library | d0aa70371ca7645abf8609b53202ebb1808ca633 | [
"MIT"
] | 9 | 2016-09-22T20:30:22.000Z | 2016-09-22T21:00:53.000Z | priv/repo/migrations/20161021000735_create_location.exs | beccanelson/library | d0aa70371ca7645abf8609b53202ebb1808ca633 | [
"MIT"
] | null | null | null | defmodule Bookish.Repo.Migrations.CreateLocation do
use Ecto.Migration
def change do
create table(:locations) do
add :name, :string
timestamps()
end
end
end
| 14.307692 | 51 | 0.682796 |
9370bbb60af80299d647962d15a07be24e1ac7bf | 4,590 | ex | Elixir | clients/testing/lib/google_api/testing/v1/model/android_model.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/testing/lib/google_api/testing/v1/model/android_model.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/testing/lib/google_api/testing/v1/model/android_model.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... | 51.573034 | 460 | 0.673856 |
9370ca4ec8777ed6aba2b3b9a6e88f977eebd234 | 937 | ex | Elixir | lib/mogrify/image.ex | andra49/mogrify | ae8a02f88c979c71808afa09ca024bdc1a74ea25 | [
"MIT"
] | 494 | 2015-01-02T15:54:37.000Z | 2021-07-05T04:24:30.000Z | lib/mogrify/image.ex | andra49/mogrify | ae8a02f88c979c71808afa09ca024bdc1a74ea25 | [
"MIT"
] | 83 | 2015-04-30T21:03:29.000Z | 2021-07-04T23:40:02.000Z | lib/mogrify/image.ex | andra49/mogrify | ae8a02f88c979c71808afa09ca024bdc1a74ea25 | [
"MIT"
] | 79 | 2015-01-18T22:11:03.000Z | 2021-06-22T17:24:02.000Z | defmodule Mogrify.Image do
@type path :: binary
@type ext :: binary
@type format :: binary
@type width :: integer
@type height :: integer
@type animated :: boolean
@type frame_count :: integer
@type buffer :: Collectable.t
@type operations :: Keyword.t
@type ... | 24.657895 | 37 | 0.472785 |
9370cc3ab50028567c10c9000c781e71e01e1b09 | 7,965 | exs | Elixir | test/test_helper.exs | greg-rychlewski/myxql | 13f23153474b26d3b3778b0212de3ecc03305049 | [
"Apache-2.0"
] | null | null | null | test/test_helper.exs | greg-rychlewski/myxql | 13f23153474b26d3b3778b0212de3ecc03305049 | [
"Apache-2.0"
] | null | null | null | test/test_helper.exs | greg-rychlewski/myxql | 13f23153474b26d3b3778b0212de3ecc03305049 | [
"Apache-2.0"
] | null | null | null | defmodule TestHelper do
def opts() do
[
hostname: "127.0.0.1",
username: "root",
database: "myxql_test",
timeout: 5000,
ssl_opts: ssl_opts(),
backoff_type: :stop,
max_restarts: 0,
pool_size: 1,
show_sensitive_data_on_connection_error: true
]
end
defp ... | 26.908784 | 101 | 0.636284 |
93710bb44c660278a80233f5a9d024cbbe55fef9 | 3,839 | ex | Elixir | lib/glimesh/graphql/resolvers/channel_resolver.ex | LittleToonCat/glimesh.tv | 97b0eb7881888faeb525e6a99cc73ebb559e8eba | [
"MIT"
] | null | null | null | lib/glimesh/graphql/resolvers/channel_resolver.ex | LittleToonCat/glimesh.tv | 97b0eb7881888faeb525e6a99cc73ebb559e8eba | [
"MIT"
] | null | null | null | lib/glimesh/graphql/resolvers/channel_resolver.ex | LittleToonCat/glimesh.tv | 97b0eb7881888faeb525e6a99cc73ebb559e8eba | [
"MIT"
] | null | null | null | defmodule Glimesh.Resolvers.ChannelResolver do
@moduledoc false
alias Glimesh.Accounts
alias Glimesh.Payments
alias Glimesh.Streams
# Channels
def all_channels(_, _) do
{:ok, Streams.list_channels()}
end
def find_channel(%{id: id}, _) do
{:ok, Streams.get_channel!(id)}
end
def find_chann... | 27.035211 | 115 | 0.707736 |
93710c74c9ae7ca2bc47b5b53a32dce18629a43d | 1,766 | exs | Elixir | mix.exs | CJPoll/subscribex | 5ea47f7401825e34827d5b288d46e4ff10f8d332 | [
"Unlicense"
] | 22 | 2016-08-11T11:51:13.000Z | 2020-01-12T17:22:11.000Z | mix.exs | CJPoll/subscribex | 5ea47f7401825e34827d5b288d46e4ff10f8d332 | [
"Unlicense"
] | 7 | 2016-10-04T19:26:14.000Z | 2018-12-15T19:18:43.000Z | mix.exs | CJPoll/subscribex | 5ea47f7401825e34827d5b288d46e4ff10f8d332 | [
"Unlicense"
] | 14 | 2016-08-09T14:27:57.000Z | 2021-04-01T20:18:43.000Z | defmodule Subscribex.Mixfile do
use Mix.Project
@version "0.11.0-rc.1"
def project do
[
app: :subscribex,
version: @version,
elixir: "~> 1.12",
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
package: package(),
description: "A high-level li... | 21.277108 | 74 | 0.539071 |
93711db35d5bee70ff962299454efe1ed13434de | 876 | ex | Elixir | clients/drive/lib/google_api/drive/v3/metadata.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/drive/lib/google_api/drive/v3/metadata.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/drive/lib/google_api/drive/v3/metadata.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 32.444444 | 74 | 0.756849 |
93712a0791fbb6cdacec6649129af330e99ba62c | 960 | ex | Elixir | test/support/helpers.ex | carmaproject/formulator | fce2018c360c69c9655a67a8e5de1d3d64d296e7 | [
"MIT"
] | 105 | 2016-08-02T20:51:54.000Z | 2022-02-03T09:38:55.000Z | test/support/helpers.ex | carmaproject/formulator | fce2018c360c69c9655a67a8e5de1d3d64d296e7 | [
"MIT"
] | 59 | 2016-08-02T14:55:41.000Z | 2021-10-21T16:30:32.000Z | test/support/helpers.ex | thoughtbot/formulator | 2d5ee84fc9763d09aae13da39eabc7dcd34eedfd | [
"MIT"
] | 14 | 2017-04-19T15:02:53.000Z | 2021-09-20T20:43:01.000Z | defmodule Formulator.Test.Helpers do
alias Phoenix.HTML.Form
alias Formulator.Test.SampleSchema
def prepare_form(attrs) do
%Form{data: attrs}
end
def extract_html(element) when not is_list(element) do
extract_html([element])
end
def extract_html([{:safe, element} | _]), do: element
def prepa... | 24.615385 | 70 | 0.7 |
93713ba91a525851cb3cd575ff37cb49b7b38328 | 2,115 | ex | Elixir | clients/sheets/lib/google_api/sheets/v4/model/source_and_destination.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | null | null | null | clients/sheets/lib/google_api/sheets/v4/model/source_and_destination.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | null | null | null | clients/sheets/lib/google_api/sheets/v4/model/source_and_destination.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"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... | 38.454545 | 262 | 0.738061 |
937184a3ccc834dcd140798ee36bf3ee6eb2ca45 | 562 | exs | Elixir | test/models/pet_test.exs | SylvainBigonneau/FindAFluff | c88c18cc085254e15445312f41b06b826449b251 | [
"MIT"
] | 1 | 2018-06-03T15:37:23.000Z | 2018-06-03T15:37:23.000Z | test/models/pet_test.exs | SylvainBigonneau/FindAFluff | c88c18cc085254e15445312f41b06b826449b251 | [
"MIT"
] | null | null | null | test/models/pet_test.exs | SylvainBigonneau/FindAFluff | c88c18cc085254e15445312f41b06b826449b251 | [
"MIT"
] | null | null | null | defmodule FindAFluff.PetTest do
use FindAFluff.ModelCase
alias FindAFluff.Pet
@valid_attrs %{birthdate: %{day: 17, month: 4, year: 2010}, gender: "some content", img_url: "some content", link: "some content", name: "some content", neutered: true, tattooed: true}
@invalid_attrs %{}
test "changeset with vali... | 29.578947 | 186 | 0.711744 |
93719c316c7dda775e0218768bf19219c0ccfaa2 | 419 | exs | Elixir | test/ex_rss/user_test.exs | cruessler/exrss | 6ac17b7533d78460a1c34cabaae86fec317f460a | [
"MIT"
] | 4 | 2020-02-16T07:18:35.000Z | 2021-12-09T14:43:10.000Z | test/ex_rss/user_test.exs | cruessler/exrss | 6ac17b7533d78460a1c34cabaae86fec317f460a | [
"MIT"
] | 27 | 2019-10-16T18:35:19.000Z | 2022-03-13T16:39:57.000Z | test/ex_rss/user_test.exs | cruessler/exrss | 6ac17b7533d78460a1c34cabaae86fec317f460a | [
"MIT"
] | null | null | null | defmodule ExRss.UserTest do
use ExRss.DataCase
alias Ecto.Changeset
alias ExRss.User
@user %User{id: 1}
test "gets and validates remember_me_token" do
changeset = User.renew_remember_me_token(@user)
remember_me_token = Changeset.get_change(changeset, :remember_me_token)
assert is_binary(rememb... | 23.277778 | 75 | 0.761337 |
9371ab3c1742458ae52a662e809a7268f636ddf2 | 80 | exs | Elixir | apps/tracing_1/test/rest_api_web/views/page_view_test.exs | WhiteRookPL/elixir-fire-brigade-workshop | 1c6183339fc623842a09f4d10be75bcecf2c37e7 | [
"MIT"
] | 14 | 2017-08-09T14:21:47.000Z | 2022-03-11T04:10:49.000Z | apps/tracing_1/test/rest_api_web/views/page_view_test.exs | nicholasjhenry/elixir-fire-brigade-workshop | 1c6183339fc623842a09f4d10be75bcecf2c37e7 | [
"MIT"
] | null | null | null | apps/tracing_1/test/rest_api_web/views/page_view_test.exs | nicholasjhenry/elixir-fire-brigade-workshop | 1c6183339fc623842a09f4d10be75bcecf2c37e7 | [
"MIT"
] | 15 | 2017-09-05T15:43:53.000Z | 2020-04-13T16:20:18.000Z | defmodule RestApiWeb.PageViewTest do
use RestApiWeb.ConnCase, async: true
end
| 20 | 38 | 0.825 |
9371c9c7eed744d0a3649d3b76f4cd20c541d344 | 1,443 | ex | Elixir | lib/ash_policy_authorizer/check/changing_attributes.ex | TheFirstAvenger/ash_policy_authorizer | 05eef4ee9038b06abbd4f945507067348c45a424 | [
"MIT"
] | null | null | null | lib/ash_policy_authorizer/check/changing_attributes.ex | TheFirstAvenger/ash_policy_authorizer | 05eef4ee9038b06abbd4f945507067348c45a424 | [
"MIT"
] | null | null | null | lib/ash_policy_authorizer/check/changing_attributes.ex | TheFirstAvenger/ash_policy_authorizer | 05eef4ee9038b06abbd4f945507067348c45a424 | [
"MIT"
] | null | null | null | defmodule AshPolicyAuthorizer.Check.ChangingAttributes do
@moduledoc "This check is true when attribute changes correspond to the provided options."
use AshPolicyAuthorizer.SimpleCheck
@impl true
def describe(opts) do
message =
Enum.map_join(opts, " and ", fn
{key, further} ->
field... | 25.315789 | 92 | 0.516979 |
9371d4c78b53f53acc08d907b8113016013b4b28 | 9,292 | exs | Elixir | test/sparql/processor/bgp_test.exs | pukkamustard/sparql-ex | 4f8907ddbd15215c9b6c40edac19362c92e34d91 | [
"MIT"
] | 23 | 2018-09-25T21:09:35.000Z | 2020-05-14T16:28:22.000Z | test/sparql/processor/bgp_test.exs | pukkamustard/sparql-ex | 4f8907ddbd15215c9b6c40edac19362c92e34d91 | [
"MIT"
] | 2 | 2018-06-01T20:47:48.000Z | 2019-03-05T23:20:34.000Z | test/sparql/processor/bgp_test.exs | pukkamustard/sparql-ex | 4f8907ddbd15215c9b6c40edac19362c92e34d91 | [
"MIT"
] | 2 | 2019-12-13T19:20:54.000Z | 2019-12-20T08:23:21.000Z | defmodule SPARQL.Processor.BGPTest do
use SPARQL.Test.Case
import SPARQL.Processor, only: [query: 2]
@example_graph Graph.new([
{EX.s1, EX.p1, EX.o1},
{EX.s1, EX.p2, EX.o2},
{EX.s3, EX.p3, EX.o2}
])
test "empty bgp" do
assert query(@example_graph, "SELECT * WHERE {}") ==
%Quer... | 25.811111 | 86 | 0.387861 |
9371eacfc3243d87b9f59fe6419437699e944a82 | 69 | exs | Elixir | test/test_helper.exs | Conceptx/absinthe-example | 369fbeaf2e688767240e2ec961a2029359580afa | [
"MIT"
] | null | null | null | test/test_helper.exs | Conceptx/absinthe-example | 369fbeaf2e688767240e2ec961a2029359580afa | [
"MIT"
] | null | null | null | test/test_helper.exs | Conceptx/absinthe-example | 369fbeaf2e688767240e2ec961a2029359580afa | [
"MIT"
] | null | null | null | ExUnit.start()
Ecto.Adapters.SQL.Sandbox.mode(Gazol.Repo, :manual)
| 13.8 | 51 | 0.753623 |
9371f2b7377a5d74577e41d66b0a05468c396ac1 | 8,422 | ex | Elixir | lib/new_relic/config.ex | tyler-gibbons/elixir_agent | f9c2f71f327f401c00edebbac1674b6c83e0b7ab | [
"Apache-2.0"
] | null | null | null | lib/new_relic/config.ex | tyler-gibbons/elixir_agent | f9c2f71f327f401c00edebbac1674b6c83e0b7ab | [
"Apache-2.0"
] | null | null | null | lib/new_relic/config.ex | tyler-gibbons/elixir_agent | f9c2f71f327f401c00edebbac1674b6c83e0b7ab | [
"Apache-2.0"
] | null | null | null | defmodule NewRelic.Config do
@moduledoc """
New Relic Agent Configuration
All configuration items can be set via Environment variables _or_ via `Application` config
"""
@doc """
**Required**
Configure your application name. May contain up to 3 names seperated by `;`
Application name can be configure... | 31.543071 | 177 | 0.731418 |
937206e301984cb625b5ef79c3a25ddf31db18d0 | 1,744 | exs | Elixir | test/currency_conversion/source/exchange_rates_api_test.exs | backercampteam/currency-conversion | 143a816fe87f2883a5f5572a7d9d83255a6b541b | [
"MIT"
] | null | null | null | test/currency_conversion/source/exchange_rates_api_test.exs | backercampteam/currency-conversion | 143a816fe87f2883a5f5572a7d9d83255a6b541b | [
"MIT"
] | null | null | null | test/currency_conversion/source/exchange_rates_api_test.exs | backercampteam/currency-conversion | 143a816fe87f2883a5f5572a7d9d83255a6b541b | [
"MIT"
] | null | null | null | defmodule CurrencyConversion.Source.ExchangeRatesApiTest do
@moduledoc false
use ExUnit.Case, async: false
doctest CurrencyConversion.Source.ExchangeRatesApi, except: [load: 1]
import CurrencyConversion.Source.ExchangeRatesApi
import Mock
@not_200_response :something
test "load when status is not 200"... | 32.90566 | 93 | 0.642775 |
937219b156d33043fb540f70a43211e7f3a30a74 | 116 | exs | Elixir | test/philter_test.exs | ditched/philter | 5773f840e8fe90f926a544179f7161a8d7498f17 | [
"MIT"
] | 3 | 2016-01-25T05:30:53.000Z | 2017-03-11T04:12:01.000Z | test/philter_test.exs | ditched/philter | 5773f840e8fe90f926a544179f7161a8d7498f17 | [
"MIT"
] | 1 | 2017-05-08T21:13:24.000Z | 2017-05-08T21:14:14.000Z | test/philter_test.exs | seanc/philter | 5773f840e8fe90f926a544179f7161a8d7498f17 | [
"MIT"
] | null | null | null | defmodule PhilterTest do
use ExUnit.Case
doctest Philter
test "the truth" do
assert 1 + 1 == 2
end
end
| 12.888889 | 24 | 0.672414 |
9372224004fc4b1cf788708909e2e1ea1e322dc6 | 1,517 | ex | Elixir | pig/lib/pig/consumer.ex | queer/mahou | 09b63a2f7431a7b3364ce81dac35114ea508942f | [
"BSD-3-Clause"
] | 37 | 2021-01-31T17:43:03.000Z | 2021-11-17T12:29:00.000Z | pig/lib/pig/consumer.ex | queer/mahou | 09b63a2f7431a7b3364ce81dac35114ea508942f | [
"BSD-3-Clause"
] | 4 | 2021-05-29T04:54:28.000Z | 2021-06-26T20:40:48.000Z | pig/lib/pig/consumer.ex | queer/mahou | 09b63a2f7431a7b3364ce81dac35114ea508942f | [
"BSD-3-Clause"
] | null | null | null | defmodule Pig.Consumer do
use Singyeong.Consumer
alias Mahou.Message
alias Mahou.Message.CreateContainer
alias Pig.Crush
require Logger
def start_link do
Consumer.start_link __MODULE__
end
def handle_event({:send, _nonce, event}) do
process event
end
def handle_event({:broadcast, _nonce, ... | 25.283333 | 125 | 0.636124 |
9372329573d03f9da5f73f3f36d816664c6e8580 | 6,071 | ex | Elixir | lib/ext/api/reconciler.ex | bahanni/custom_rpi4 | ddefa85d30bacaae40151a63a9a0ebbf4ad30ed5 | [
"MIT"
] | null | null | null | lib/ext/api/reconciler.ex | bahanni/custom_rpi4 | ddefa85d30bacaae40151a63a9a0ebbf4ad30ed5 | [
"MIT"
] | null | null | null | lib/ext/api/reconciler.ex | bahanni/custom_rpi4 | ddefa85d30bacaae40151a63a9a0ebbf4ad30ed5 | [
"MIT"
] | null | null | null | defmodule FarmbotOS.API.Reconciler do
@moduledoc """
Handles additions, deletions and changes of remote API resources
Uses the `updated_at` and `created_at` common fields of api resources
to determine if FarmbotOS or the API's resource is more current
"""
require Logger
alias Ecto.Changeset
import Ect... | 33.541436 | 95 | 0.664965 |
93724f5d7efbd35262c878bab0f3e8737c54174e | 1,618 | ex | Elixir | lib/codes/codes_f81.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_f81.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_f81.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | defmodule IcdCode.ICDCode.Codes_F81 do
alias IcdCode.ICDCode
def _F810 do
%ICDCode{full_code: "F810",
category_code: "F81",
short_code: "0",
full_name: "Specific reading disorder",
short_name: "Specific reading disorder",
category_name: "Specific reading disorder... | 31.115385 | 83 | 0.6267 |
937293315dacb602ca288cd423429839f057f74d | 22,475 | ex | Elixir | lib/elixir/lib/calendar/time.ex | doughsay/elixir | 7356a47047d0b54517bd6886603f09b1121dde2b | [
"Apache-2.0"
] | 19,291 | 2015-01-01T02:42:49.000Z | 2022-03-31T21:01:40.000Z | lib/elixir/lib/calendar/time.ex | doughsay/elixir | 7356a47047d0b54517bd6886603f09b1121dde2b | [
"Apache-2.0"
] | 8,082 | 2015-01-01T04:16:23.000Z | 2022-03-31T22:08:02.000Z | lib/elixir/lib/calendar/time.ex | doughsay/elixir | 7356a47047d0b54517bd6886603f09b1121dde2b | [
"Apache-2.0"
] | 3,472 | 2015-01-03T04:11:56.000Z | 2022-03-29T02:07:30.000Z | defmodule Time do
@moduledoc """
A Time struct and functions.
The Time struct contains the fields hour, minute, second and microseconds.
New times can be built with the `new/4` function or using the
`~T` (see `Kernel.sigil_T/2`) sigil:
iex> ~T[23:00:07.001]
~T[23:00:07.001]
Both `new/4` and s... | 28.630573 | 102 | 0.621402 |
9372c648a0c35c6b5d437d8728e5841b8e0a91dc | 3,161 | ex | Elixir | lib/door_frame/adapter/plug.ex | smartvokat/door_frame | 9052ab233b2af65582dd1925a998e2b46b0eb569 | [
"Apache-2.0"
] | 5 | 2019-06-12T11:26:12.000Z | 2022-01-28T19:45:47.000Z | lib/door_frame/adapter/plug.ex | smartvokat/door_frame | 9052ab233b2af65582dd1925a998e2b46b0eb569 | [
"Apache-2.0"
] | 2 | 2019-06-04T13:19:55.000Z | 2021-04-19T07:17:34.000Z | lib/door_frame/adapter/plug.ex | smartvokat/door_frame | 9052ab233b2af65582dd1925a998e2b46b0eb569 | [
"Apache-2.0"
] | 1 | 2019-06-12T11:26:14.000Z | 2019-06-12T11:26:14.000Z | defmodule DoorFrame.Adapter.Plug do
alias DoorFrame.Request
alias DoorFrame.Response
alias DoorFrame.Error
@spec to_request(DoorFrame.Request.t(), Plug.Conn.t(), any()) ::
{:ok, DoorFrame.Request.t()} | {:error, DoorFrame.Error.t()}
def to_request(%Request{} = request, %Plug.Conn{} = conn, _opts \\... | 31.61 | 82 | 0.637457 |
9372d048eb1f0b8374181f058747d59ace8a99d1 | 10,734 | exs | Elixir | priv/repo/example_seeds.exs | richeterre/jumubase-phoenix | 7584f890af117d496971b5284bf9de798e22266f | [
"MIT"
] | 2 | 2019-01-20T07:03:30.000Z | 2019-04-11T10:20:14.000Z | priv/repo/example_seeds.exs | richeterre/jumubase-phoenix | 7584f890af117d496971b5284bf9de798e22266f | [
"MIT"
] | 6 | 2018-09-20T05:52:14.000Z | 2019-04-23T19:27:39.000Z | priv/repo/example_seeds.exs | richeterre/jumubase-phoenix | 7584f890af117d496971b5284bf9de798e22266f | [
"MIT"
] | null | null | null | import Jumubase.Factory
alias Ecto.Changeset
alias Jumubase.Repo
alias Jumubase.JumuParams
alias Jumubase.Accounts.User
alias Jumubase.Foundation.{Category, Host}
alias Jumubase.Showtime.{Participant}
Repo.transaction(fn ->
# Clear existing data
Repo.delete_all(Host)
Repo.delete_all(User)
Repo.delete_all(Categ... | 23.233766 | 73 | 0.606391 |
9372da9a6d6cb282e13d3b595fb57768a9736fbe | 31,854 | exs | Elixir | installer/test/phx_new_umbrella_test.exs | davuuud/Phoenix | dc712f0d910fd26ff3bb3d3b5edce7b228f21d56 | [
"MIT"
] | null | null | null | installer/test/phx_new_umbrella_test.exs | davuuud/Phoenix | dc712f0d910fd26ff3bb3d3b5edce7b228f21d56 | [
"MIT"
] | null | null | null | installer/test/phx_new_umbrella_test.exs | davuuud/Phoenix | dc712f0d910fd26ff3bb3d3b5edce7b228f21d56 | [
"MIT"
] | null | null | null | Code.require_file "mix_helper.exs", __DIR__
defmodule Mix.Tasks.Phx.New.UmbrellaTest do
use ExUnit.Case, async: false
import MixHelper
@app "phx_umb"
setup config do
# The shell asks to install deps.
# We will politely say not.
decline_prompt()
{:ok, tmp_dir: to_string(config.test)}
end
... | 40.681992 | 132 | 0.619012 |
93731ead0206ef560d332999cc14cf27df1709de | 406 | exs | Elixir | test/grovepi/grovepi_test.exs | suranyami/grovepi | 7080639d7a75b48f7c3d6c03a86288bbb1934951 | [
"Apache-2.0"
] | 34 | 2017-08-28T22:44:59.000Z | 2022-02-15T06:37:40.000Z | test/grovepi/grovepi_test.exs | suranyami/grovepi | 7080639d7a75b48f7c3d6c03a86288bbb1934951 | [
"Apache-2.0"
] | 19 | 2017-08-14T17:27:44.000Z | 2019-05-26T02:49:39.000Z | test/grovepi/grovepi_test.exs | suranyami/grovepi | 7080639d7a75b48f7c3d6c03a86288bbb1934951 | [
"Apache-2.0"
] | 5 | 2017-09-06T02:20:28.000Z | 2020-03-29T06:05:16.000Z | defmodule GrovePi.GrovePiTest do
use ComponentTestCase, async: true
test "getting version works", %{prefix: prefix, board: board} do
GrovePi.I2C.add_response(board, <<0, 1, 2, 3>>)
assert GrovePi.Board.firmware_version(prefix) == "1.2.3"
assert GrovePi.I2C.get_last_write_data(board) == <<8, 0, 0, 0>>
... | 33.833333 | 75 | 0.70197 |
937320ceeb3b1eb78becbd4d471759cb0c83aa5a | 640 | ex | Elixir | sequence2/lib/sequence.ex | benjohns1/elixer-app | 6e866ec084c5e75442c0b70f66e35f61b5b74d34 | [
"MIT"
] | null | null | null | sequence2/lib/sequence.ex | benjohns1/elixer-app | 6e866ec084c5e75442c0b70f66e35f61b5b74d34 | [
"MIT"
] | null | null | null | sequence2/lib/sequence.ex | benjohns1/elixer-app | 6e866ec084c5e75442c0b70f66e35f61b5b74d34 | [
"MIT"
] | null | null | null | defmodule Sequence do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, initial_number) do
# List all child processes to be supervised
children = [
# Supervisor.Spec.worker(Sequence.Server, [123])
... | 29.090909 | 67 | 0.714063 |
937323348aad8df93244be94b9207ddb300386d3 | 1,238 | ex | Elixir | lib/appsignal/diagnose/report.ex | sparta-science/appsignal-elixir | 4710b4e7ec514a54b82d5c2561f72369ff48e2e2 | [
"MIT"
] | null | null | null | lib/appsignal/diagnose/report.ex | sparta-science/appsignal-elixir | 4710b4e7ec514a54b82d5c2561f72369ff48e2e2 | [
"MIT"
] | null | null | null | lib/appsignal/diagnose/report.ex | sparta-science/appsignal-elixir | 4710b4e7ec514a54b82d5c2561f72369ff48e2e2 | [
"MIT"
] | null | null | null | defmodule Appsignal.Diagnose.ReportBehaviour do
@callback send(map(), map()) :: {:ok, String.t} | {:error, map()}
end
defmodule Appsignal.Diagnose.Report do
alias Appsignal.Transmitter
@behaviour Appsignal.Diagnose.ReportBehaviour
@spec send(map(), map()) :: {:ok, String.t} | {:error, map()}
def send(confi... | 29.47619 | 67 | 0.594507 |
937354619dd5a7daf5ba54138307054b86e07aab | 241 | ex | Elixir | lib/ww.ex | waterlink/ww | 3574ce55a68c69719d3e65f46c409d088f36de7a | [
"MIT"
] | null | null | null | lib/ww.ex | waterlink/ww | 3574ce55a68c69719d3e65f46c409d088f36de7a | [
"MIT"
] | null | null | null | lib/ww.ex | waterlink/ww | 3574ce55a68c69719d3e65f46c409d088f36de7a | [
"MIT"
] | null | null | null | defmodule WW do
def start(_type, _args) do
{port, _} = Integer.parse(System.get_env("PORT") || "4000")
result = Plug.Adapters.Cowboy.http Web, [], port: port
IO.puts "Listening on http://localhost:#{port}"
result
end
end
| 26.777778 | 63 | 0.647303 |
937388dfa088e04582df1c44fc4c5b062b49d9ed | 7,486 | exs | Elixir | test/decode_test.exs | alaadahmed/jason | 00a7e92026ef1ae838b38c5d7feac088173f52f3 | [
"Apache-2.0"
] | 1 | 2021-11-07T18:55:58.000Z | 2021-11-07T18:55:58.000Z | test/decode_test.exs | alaadahmed/jason | 00a7e92026ef1ae838b38c5d7feac088173f52f3 | [
"Apache-2.0"
] | null | null | null | test/decode_test.exs | alaadahmed/jason | 00a7e92026ef1ae838b38c5d7feac088173f52f3 | [
"Apache-2.0"
] | null | null | null | defmodule Jason.DecodeTest do
use ExUnit.Case, async: true
alias Jason.DecodeError
test "numbers" do
assert_fail_with "-", ~S|unexpected end of input at position 1|
assert_fail_with "--1", ~S|unexpected byte at position 1: 0x2D ("-")|
assert_fail_with "01", ~S|unexpected byte at position 1: 0x31 ("1... | 40.684783 | 108 | 0.581753 |
93739b4a33b81463ca4a46285244c22e1cfa56a7 | 2,117 | ex | Elixir | lib/radiator/auth/guardian.ex | optikfluffel/radiator | b1a1b966296fa6bf123e3a2455009ff52099ace6 | [
"MIT"
] | 1 | 2021-03-02T16:59:40.000Z | 2021-03-02T16:59:40.000Z | lib/radiator/auth/guardian.ex | optikfluffel/radiator | b1a1b966296fa6bf123e3a2455009ff52099ace6 | [
"MIT"
] | null | null | null | lib/radiator/auth/guardian.ex | optikfluffel/radiator | b1a1b966296fa6bf123e3a2455009ff52099ace6 | [
"MIT"
] | null | null | null | defmodule Radiator.Auth.Guardian do
@otp_app Mix.Project.config()[:app]
use Guardian, otp_app: @otp_app
alias Radiator.Auth
@doc """
Generates and returns a Bearer token for api usage.
"""
def api_session_token(%Auth.User{} = user) do
{:ok, token, _claims} =
encode_and_sign(user, %{}, ttl: {45... | 27.141026 | 79 | 0.656117 |
9373ac47a951d149c70c2c085a9a53bc1601608f | 61 | ex | Elixir | lib/cog/eval.ex | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 1,003 | 2016-02-23T17:21:12.000Z | 2022-02-20T14:39:35.000Z | lib/cog/eval.ex | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 906 | 2016-02-22T22:54:19.000Z | 2022-03-11T15:19:43.000Z | lib/cog/eval.ex | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 95 | 2016-02-23T13:42:31.000Z | 2021-11-30T14:39:55.000Z | defprotocol Cog.Eval do
def value_of(expr, context)
end
| 8.714286 | 29 | 0.737705 |
9373e5f436b6d267dae37321079b70ca463bcc0f | 712 | exs | Elixir | test/lib/code_corps/policy/role_skill_test.exs | fikape/code-corps-api | c21674b0b2a19fa26945c94268db8894420ca181 | [
"MIT"
] | 275 | 2015-06-23T00:20:51.000Z | 2021-08-19T16:17:37.000Z | test/lib/code_corps/policy/role_skill_test.exs | fikape/code-corps-api | c21674b0b2a19fa26945c94268db8894420ca181 | [
"MIT"
] | 1,304 | 2015-06-26T02:11:54.000Z | 2019-12-12T21:08:00.000Z | test/lib/code_corps/policy/role_skill_test.exs | fikape/code-corps-api | c21674b0b2a19fa26945c94268db8894420ca181 | [
"MIT"
] | 140 | 2016-01-01T18:19:47.000Z | 2020-11-22T06:24:47.000Z | defmodule CodeCorps.Policy.RoleSkillTest do
use CodeCorps.PolicyCase
import CodeCorps.Policy.RoleSkill, only: [create?: 1, delete?: 1]
describe "create?" do
test "returns true when user is an admin" do
user = build(:user, admin: true)
assert create?(user)
end
test "returns false if use... | 23.733333 | 67 | 0.640449 |
9373ed45cf97b17432ec1f49be315caaddfdbb05 | 2,207 | exs | Elixir | config/prod.exs | DianaOlympos/dianao-softwaremaxims | c153908fb6abe90487a05c64fd806c88b3414295 | [
"MIT"
] | null | null | null | config/prod.exs | DianaOlympos/dianao-softwaremaxims | c153908fb6abe90487a05c64fd806c88b3414295 | [
"MIT"
] | 7 | 2018-10-13T20:45:27.000Z | 2018-10-29T12:42:22.000Z | config/prod.exs | DianaOlympos/dianao-softwaremaxims | c153908fb6abe90487a05c64fd806c88b3414295 | [
"MIT"
] | null | null | null | import Config
# For production, we often load configuration from external
# sources, such as your system environment. For this reason,
# you won't find the :http configuration below, but set inside
# SoftwaremaximsWeb.Endpoint.init/2 when load_from_system_env is
# true. Any dynamic configuration should be done there.
... | 34.484375 | 70 | 0.724966 |
9373edcb83018751c208c0d5d56f713b3a01d570 | 1,270 | ex | Elixir | lib/searchex/adapter/shake/filesys.ex | andyl/searchex | aae186cddd14f0415b116fca198b8cc95eb2c379 | [
"MIT"
] | 91 | 2016-11-22T23:52:01.000Z | 2022-02-12T13:06:24.000Z | lib/searchex/adapter/shake/filesys.ex | andyl/searchex | aae186cddd14f0415b116fca198b8cc95eb2c379 | [
"MIT"
] | 11 | 2016-11-23T17:37:57.000Z | 2018-03-07T13:40:48.000Z | lib/searchex/adapter/shake/filesys.ex | andyl/searchex | aae186cddd14f0415b116fca198b8cc95eb2c379 | [
"MIT"
] | 9 | 2016-11-24T01:44:40.000Z | 2020-05-15T04:16:19.000Z | defmodule Searchex.Adapter.Shake.Filesys do
use Shake.Module
step :validate_file_root_presence
step :validate_file_roots
step :expand_file_roots
def validate_file_root_presence(frame, _opts) do
alias Searchex.Command.CmdHelpers
case length(frame.params.adapter.file_roots) do
0 -> halt(frame, ... | 32.564103 | 97 | 0.652756 |
9373ee2ba4eae04c46754644710129103318bd16 | 1,961 | ex | Elixir | clients/chat/lib/google_api/chat/v1/model/image.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/chat/lib/google_api/chat/v1/model/image.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/chat/lib/google_api/chat/v1/model/image.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... | 37 | 325 | 0.712392 |
9373fbc88e31bad2da9b8aa7cff77ad0b1c070c9 | 519 | ex | Elixir | lib/httparrot/relative_redirect_handler.ex | idabmat/httparrot | 1bc15bf4c7330341b36f7dc7d933285cda7bbf67 | [
"MIT"
] | null | null | null | lib/httparrot/relative_redirect_handler.ex | idabmat/httparrot | 1bc15bf4c7330341b36f7dc7d933285cda7bbf67 | [
"MIT"
] | null | null | null | lib/httparrot/relative_redirect_handler.ex | idabmat/httparrot | 1bc15bf4c7330341b36f7dc7d933285cda7bbf67 | [
"MIT"
] | null | null | null | defmodule HTTParrot.RelativeRedirectHandler do
@moduledoc """
Redirects to the relative foo URL.
"""
use HTTParrot.Cowboy, methods: ~w(GET HEAD OPTIONS)
def malformed_request(req, state) do
HTTParrot.RedirectHandler.malformed_request(req, state)
end
def resource_exists(req, state), do: {false, req, ... | 27.315789 | 60 | 0.687861 |
9374022e0a1cef0a8d228e38721ecd8cf2b5c864 | 505 | ex | Elixir | lib/chankins/web/views/parameter_view.ex | no0x9d/chankins | b4fd37d3145a001e4ebbe86eea91742d5a812858 | [
"MIT"
] | null | null | null | lib/chankins/web/views/parameter_view.ex | no0x9d/chankins | b4fd37d3145a001e4ebbe86eea91742d5a812858 | [
"MIT"
] | null | null | null | lib/chankins/web/views/parameter_view.ex | no0x9d/chankins | b4fd37d3145a001e4ebbe86eea91742d5a812858 | [
"MIT"
] | null | null | null | defmodule Chankins.Web.ParameterView do
use Chankins.Web, :view
def map_versions_for_select(versions) do
versions |> Enum.map(&map_version_for_select/1) |> List.insert_at(0, {"leer", :nil})
end
defp map_version_for_select(v) do
{"#{v.version} (#{v.release.name})", v.id}
end
def map_features_for_s... | 25.25 | 88 | 0.689109 |
937422cf490d709aacf7c706356660daeb21b179 | 157 | exs | Elixir | ch6/import.exs | rafanoronha/prog_elixir_1_6 | 5ae2137da4ffdb6de1c9b164812ed6e43c0922d3 | [
"MIT"
] | null | null | null | ch6/import.exs | rafanoronha/prog_elixir_1_6 | 5ae2137da4ffdb6de1c9b164812ed6e43c0922d3 | [
"MIT"
] | null | null | null | ch6/import.exs | rafanoronha/prog_elixir_1_6 | 5ae2137da4ffdb6de1c9b164812ed6e43c0922d3 | [
"MIT"
] | null | null | null | defmodule Example do
def func1 do
List.flatten [1,[2,3],4]
end
def func2 do
import List, only: [flatten: 1]
flatten [5,[6,7],8]
end
end | 17.444444 | 35 | 0.605096 |
93743bbe25007d51d323aa9b88b5b3778a282c23 | 7,956 | ex | Elixir | lib/mail/parsers/rfc_2822.ex | inside-track/elixir-mail | 9b1c19a5bdd04be232b0f8dbb7ff91925690fbb7 | [
"MIT"
] | null | null | null | lib/mail/parsers/rfc_2822.ex | inside-track/elixir-mail | 9b1c19a5bdd04be232b0f8dbb7ff91925690fbb7 | [
"MIT"
] | null | null | null | lib/mail/parsers/rfc_2822.ex | inside-track/elixir-mail | 9b1c19a5bdd04be232b0f8dbb7ff91925690fbb7 | [
"MIT"
] | null | null | null | defmodule Mail.Parsers.RFC2822 do
@moduledoc """
RFC2822 Parser
Will attempt to parse a valid RFC2822 message back into
a `%Mail.Message{}` data model.
Mail.Parsers.RFC2822.parse(message)
%Mail.Message{body: "Some message", headers: %{to: ["user@example.com"], from: "other@example.com", subject: "... | 30.718147 | 129 | 0.639015 |
9374414b41f479181d1478aaf79d6518454c96d7 | 2,892 | exs | Elixir | test/stormchat_web/controllers/location_controller_test.exs | gautambaghel/stormchat | 1882467113158e7524d02d273e1f88439cc1f152 | [
"MIT"
] | null | null | null | test/stormchat_web/controllers/location_controller_test.exs | gautambaghel/stormchat | 1882467113158e7524d02d273e1f88439cc1f152 | [
"MIT"
] | 7 | 2019-06-25T17:21:41.000Z | 2022-02-10T12:09:08.000Z | test/stormchat_web/controllers/location_controller_test.exs | gautambaghel/stormchat | 1882467113158e7524d02d273e1f88439cc1f152 | [
"MIT"
] | null | null | null | defmodule StormchatWeb.LocationControllerTest do
use StormchatWeb.ConnCase
alias Stormchat.Locations
@create_attrs %{abb: "some abb", name: "some name", pid: "some pid"}
@update_attrs %{abb: "some updated abb", name: "some updated name", pid: "some updated pid"}
@invalid_attrs %{abb: nil, name: nil, pid: ni... | 32.494382 | 94 | 0.673582 |
937458387df7226086b95ba104933d8046a0ecad | 2,029 | exs | Elixir | test/docraptorx_test.exs | STUDITEMPS/docraptorx | 7194eaf7050da4e562645c55bcd7aab1c2b38396 | [
"MIT"
] | null | null | null | test/docraptorx_test.exs | STUDITEMPS/docraptorx | 7194eaf7050da4e562645c55bcd7aab1c2b38396 | [
"MIT"
] | null | null | null | test/docraptorx_test.exs | STUDITEMPS/docraptorx | 7194eaf7050da4e562645c55bcd7aab1c2b38396 | [
"MIT"
] | null | null | null | defmodule DocraptorxTest do
use ExUnit.Case
doctest Docraptorx
test "parse_response should retrieve error message" do
response = %HTTPoison.Response{
status_code: 422,
body: """
<?xml version="1.0" encoding="UTF-8"?>
<errors>
<error>Name can't be blank</error>
</errors>
... | 29.405797 | 112 | 0.65106 |
93745c0ed13ec43c2f549af0c3bc63503a6eaa18 | 1,727 | ex | Elixir | lib/kazan/codegen/models/model_desc.ex | dockup/kazan | eff5ced3615e12a8665790def094719c86a0dfad | [
"MIT"
] | null | null | null | lib/kazan/codegen/models/model_desc.ex | dockup/kazan | eff5ced3615e12a8665790def094719c86a0dfad | [
"MIT"
] | null | null | null | lib/kazan/codegen/models/model_desc.ex | dockup/kazan | eff5ced3615e12a8665790def094719c86a0dfad | [
"MIT"
] | null | null | null | defmodule Kazan.Codegen.Models.ModelDesc do
@moduledoc false
import Kazan.Codegen.Naming, only: [model_name_to_module: 1]
alias Kazan.Codegen.Models.{ResourceId, PropertyDesc}
defstruct [
:id,
:resource_ids,
:module_name,
:description,
:required,
:properties
]
@type property_map ::... | 28.783333 | 78 | 0.639838 |
9374656d7956687c6469848c8643d1f89df3f5fd | 1,299 | exs | Elixir | test/blog/posts/post_test.exs | etori-sangiacomo/blog | 6b7548d6dd5de4ba46803ae21f143644ef36ef41 | [
"MIT"
] | null | null | null | test/blog/posts/post_test.exs | etori-sangiacomo/blog | 6b7548d6dd5de4ba46803ae21f143644ef36ef41 | [
"MIT"
] | null | null | null | test/blog/posts/post_test.exs | etori-sangiacomo/blog | 6b7548d6dd5de4ba46803ae21f143644ef36ef41 | [
"MIT"
] | null | null | null | defmodule Blog.PostsTest do
use Blog.DataCase
alias Blog.{Posts, Posts.Post}
@valid_post %{
title: "Phoenix",
description: "Phoenix description"
}
@update_post %{
title: "updated",
description: "updated"
}
def post_fixture(_attrs \\ %{}) do
user = Blog.Accounts.get_user!(1)
{:ok... | 24.055556 | 74 | 0.630485 |
937475b85443c279483d757542ca0824bdaf3d66 | 1,839 | ex | Elixir | clients/pub_sub/lib/google_api/pub_sub/v1/model/message_storage_policy.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/pub_sub/lib/google_api/pub_sub/v1/model/message_storage_policy.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/pub_sub/lib/google_api/pub_sub/v1/model/message_storage_policy.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... | 39.12766 | 433 | 0.757477 |
93747a860cbfa358f45a374835e3b542c156ae89 | 1,282 | ex | Elixir | lib/clickhouse_ecto.ex | julienmarie/clickhouse_ecto | 48b556bd93884df3b180a974801d7c09f43ade36 | [
"Apache-2.0"
] | null | null | null | lib/clickhouse_ecto.ex | julienmarie/clickhouse_ecto | 48b556bd93884df3b180a974801d7c09f43ade36 | [
"Apache-2.0"
] | null | null | null | lib/clickhouse_ecto.ex | julienmarie/clickhouse_ecto | 48b556bd93884df3b180a974801d7c09f43ade36 | [
"Apache-2.0"
] | 2 | 2020-02-25T02:59:10.000Z | 2020-09-17T20:43:24.000Z | defmodule ClickhouseEcto do
@moduledoc false
@behaviour Ecto.Adapter.Storage
use Ecto.Adapters.SQL,
driver: :clickhousex,
migration_lock: nil
alias ClickhouseEcto.Migration
alias ClickhouseEcto.Storage
import ClickhouseEcto.Type, only: [encode: 2, decode: 2]
def autogenerate(:binary_id), do: E... | 32.05 | 83 | 0.716849 |
9374816f7446635a376479ec6244d8ac070574d0 | 2,601 | ex | Elixir | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/click_through_url.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/click_through_url.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/click_through_url.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... | 44.084746 | 203 | 0.737409 |
9374ccf4ababfc1da3453066c5e21fb66a78fc3d | 1,828 | exs | Elixir | clients/version_history/mix.exs | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/version_history/mix.exs | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/version_history/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... | 27.283582 | 106 | 0.657002 |
9374d7c03e1666104bfcfaf62a342a309347b1da | 233 | ex | Elixir | elixir/elixir-sips/samples/string_processes/lib/process/reverser.ex | afronski/playground-erlang | 6ac4b58b2fd717260c22a33284547d44a9b5038e | [
"MIT"
] | 2 | 2015-12-09T02:16:51.000Z | 2021-07-26T22:53:43.000Z | elixir/elixir-sips/samples/string_processes/lib/process/reverser.ex | afronski/playground-erlang | 6ac4b58b2fd717260c22a33284547d44a9b5038e | [
"MIT"
] | null | null | null | elixir/elixir-sips/samples/string_processes/lib/process/reverser.ex | afronski/playground-erlang | 6ac4b58b2fd717260c22a33284547d44a9b5038e | [
"MIT"
] | 1 | 2016-05-08T18:40:31.000Z | 2016-05-08T18:40:31.000Z | defmodule StringProcesses.Process.Reverser do
def start do
spawn(__MODULE__, :await, [])
end
def await do
receive do
{pid, message} -> send(pid, {__MODULE__, String.reverse(message)})
end
await
end
end
| 17.923077 | 72 | 0.660944 |
9374de7e3db250aacc18adb46813c231ae51ee48 | 2,184 | ex | Elixir | lib/stripe/util.ex | mmmries/stripity_stripe | 7bfaa2316f24a86fbbfc3cf140b1caff05f5ef9d | [
"BSD-3-Clause"
] | null | null | null | lib/stripe/util.ex | mmmries/stripity_stripe | 7bfaa2316f24a86fbbfc3cf140b1caff05f5ef9d | [
"BSD-3-Clause"
] | null | null | null | lib/stripe/util.ex | mmmries/stripity_stripe | 7bfaa2316f24a86fbbfc3cf140b1caff05f5ef9d | [
"BSD-3-Clause"
] | 1 | 2021-12-01T21:49:27.000Z | 2021-12-01T21:49:27.000Z | defmodule Stripe.Util do
@moduledoc false
@doc """
Performs a root-level conversion of map keys from strings to atoms.
This function performs the transformation safely using `String.to_existing_atom/1`, but this has a possibility to raise if
there is not a corresponding atom.
It is recommended that you p... | 25.103448 | 124 | 0.612637 |
9374e1a1e329f238d14bcbe41d88de90f68d6170 | 1,717 | ex | Elixir | apps/omg_watcher_rpc/test/omg_watcher_rpc/web/conn_case.ex | omisego/elixir-omg | 2c68973d8f29033d137f63a6e060f12e2a7dcd59 | [
"Apache-2.0"
] | 177 | 2018-08-24T03:51:02.000Z | 2020-05-30T13:29:25.000Z | apps/omg_watcher_rpc/test/omg_watcher_rpc/web/conn_case.ex | omisego/elixir-omg | 2c68973d8f29033d137f63a6e060f12e2a7dcd59 | [
"Apache-2.0"
] | 1,042 | 2018-08-25T00:52:39.000Z | 2020-06-01T05:15:17.000Z | apps/omg_watcher_rpc/test/omg_watcher_rpc/web/conn_case.ex | omisego/elixir-omg | 2c68973d8f29033d137f63a6e060f12e2a7dcd59 | [
"Apache-2.0"
] | 47 | 2018-08-24T12:06:33.000Z | 2020-04-28T11:49:25.000Z | # Copyright 2019-2020 OMG Network 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... | 30.660714 | 74 | 0.734421 |
93752b1a0cc4b8ba2ca3366bdcbf595fd954a4d8 | 540 | ex | Elixir | lib/mipha_web/controllers/admin/user_controller.ex | ZPVIP/mipha | a7df054f72eec7de88b60d94c501488375bdff6a | [
"MIT"
] | 156 | 2018-06-01T19:52:32.000Z | 2022-02-03T10:58:10.000Z | lib/mipha_web/controllers/admin/user_controller.ex | ZPVIP/mipha | a7df054f72eec7de88b60d94c501488375bdff6a | [
"MIT"
] | 139 | 2018-07-10T01:57:23.000Z | 2021-08-02T21:29:24.000Z | lib/mipha_web/controllers/admin/user_controller.ex | ZPVIP/mipha | a7df054f72eec7de88b60d94c501488375bdff6a | [
"MIT"
] | 29 | 2018-07-17T08:43:45.000Z | 2021-12-14T13:45:30.000Z | defmodule MiphaWeb.Admin.UserController do
use MiphaWeb, :controller
alias Mipha.Accounts
alias Mipha.Accounts.Queries
def index(conn, params) do
result = Queries.list_users() |> Turbo.Ecto.turbo(params)
render(conn, :index, users: result.datas, paginate: result.paginate)
end
def delete(conn, %{"... | 25.714286 | 72 | 0.688889 |
9375573e15566cc115dc74b2bdefc1a971511bb3 | 13,295 | ex | Elixir | lib/phoenix/logger.ex | MarkHoo/phoenix | 3f673093826b0d4db5656dfe6e34393901348ed1 | [
"MIT"
] | null | null | null | lib/phoenix/logger.ex | MarkHoo/phoenix | 3f673093826b0d4db5656dfe6e34393901348ed1 | [
"MIT"
] | null | null | null | lib/phoenix/logger.ex | MarkHoo/phoenix | 3f673093826b0d4db5656dfe6e34393901348ed1 | [
"MIT"
] | null | null | null | defmodule Phoenix.Logger do
@moduledoc """
Instrumenter to handle logging of various instrumentation events.
## Instrumentation
Phoenix uses the `:telemetry` library for instrumentation. The following events
are published by Phoenix with the following measurements and metadata:
* `[:phoenix, :endpoint,... | 34.622396 | 186 | 0.642196 |
93755d4d046d314dfcbcec339f8bfda7cea7a7fb | 356 | exs | Elixir | mix.exs | camshaft/ex_formula_parser | e42285faf9dd376b80ce212da66cacb9518db683 | [
"MIT"
] | 2 | 2018-12-17T11:15:51.000Z | 2021-09-28T22:10:04.000Z | mix.exs | camshaft/ex_formula | e42285faf9dd376b80ce212da66cacb9518db683 | [
"MIT"
] | null | null | null | mix.exs | camshaft/ex_formula | e42285faf9dd376b80ce212da66cacb9518db683 | [
"MIT"
] | null | null | null | defmodule Formula.Mixfile do
use Mix.Project
def project do
[app: :formula,
version: "0.1.0",
elixir: "~> 1.3",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps()]
end
def application do
[applications: [:decimal, :logger]]
end
defp deps do
... | 16.952381 | 39 | 0.581461 |
93755eb997692316fcd53a842fc6ee2244730bc6 | 801 | exs | Elixir | config/config.exs | afatsini/football_api | c17af14733fc7a649c38516045867c72ecab469f | [
"MIT"
] | null | null | null | config/config.exs | afatsini/football_api | c17af14733fc7a649c38516045867c72ecab469f | [
"MIT"
] | null | null | null | config/config.exs | afatsini/football_api | c17af14733fc7a649c38516045867c72ecab469f | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
use Mix.Config
# Configures Elixir's Logger
config :logger, :console,
format: "$time $metadata[$le... | 29.666667 | 68 | 0.735331 |
93756feb6992f6ce99708356def27b7911e85c82 | 5,411 | ex | Elixir | lib/ueberauth/strategy/vkontakte.ex | meduza-corp/ueberauth_vkontakte | 6ba133a07bf3fd4a77f079e66031a65825fec00d | [
"MIT"
] | 1 | 2016-05-11T20:19:16.000Z | 2016-05-11T20:19:16.000Z | lib/ueberauth/strategy/vkontakte.ex | meduza-corp/ueberauth_vkontakte | 6ba133a07bf3fd4a77f079e66031a65825fec00d | [
"MIT"
] | 1 | 2016-12-02T10:37:59.000Z | 2016-12-02T13:39:42.000Z | lib/ueberauth/strategy/vkontakte.ex | meduza-corp/ueberauth_vkontakte | 6ba133a07bf3fd4a77f079e66031a65825fec00d | [
"MIT"
] | null | null | null | defmodule Ueberauth.Strategy.Vkontakte do
require Logger
@moduledoc """
Vkontakte Strategy for Überauth.
"""
use Ueberauth.Strategy, default_scope: "email",
profile_fields: "",
uid_field: :id,
allowed_request_params: [
... | 25.889952 | 108 | 0.607836 |
93757ac08607715f7b32a91a138a4676802cf53d | 478 | ex | Elixir | lib/yummy_web/schema/middleware/authorize.ex | MatthieuSegret/yummy-phoenix-graphql | f0b258293697b0b120ef8e8a3b3905043c998617 | [
"MIT"
] | 122 | 2017-11-24T11:28:17.000Z | 2022-02-25T17:05:20.000Z | lib/yummy_web/schema/middleware/authorize.ex | MatthieuSegret/yummy-phoenix-graphql | f0b258293697b0b120ef8e8a3b3905043c998617 | [
"MIT"
] | 6 | 2018-01-11T22:07:44.000Z | 2021-11-21T15:41:42.000Z | lib/yummy_web/schema/middleware/authorize.ex | MatthieuSegret/yummy-phoenix-graphql | f0b258293697b0b120ef8e8a3b3905043c998617 | [
"MIT"
] | 25 | 2018-04-01T02:43:21.000Z | 2022-02-15T03:22:54.000Z | defmodule YummyWeb.Schema.Middleware.Authorize do
@behaviour Absinthe.Middleware
import YummyWeb.Helpers.ValidationMessageHelpers
alias Yummy.Accounts.User
def call(resolution, _config) do
case resolution.context do
%{current_user: %User{}} ->
resolution
_ ->
message = "Vous d... | 26.555556 | 85 | 0.713389 |
9375b6ac52eab404f4f1e3689e71938556340d75 | 4,289 | ex | Elixir | apps/reaper/lib/reaper/data_extract/processor.ex | msomji/smartcitiesdata | fc96abc1ef1306f7af6bd42bbcb4ed041a6d922c | [
"Apache-2.0"
] | null | null | null | apps/reaper/lib/reaper/data_extract/processor.ex | msomji/smartcitiesdata | fc96abc1ef1306f7af6bd42bbcb4ed041a6d922c | [
"Apache-2.0"
] | null | null | null | apps/reaper/lib/reaper/data_extract/processor.ex | msomji/smartcitiesdata | fc96abc1ef1306f7af6bd42bbcb4ed041a6d922c | [
"Apache-2.0"
] | null | null | null | defmodule Reaper.DataExtract.Processor do
@moduledoc """
This module processes a data source and sends its data to the output topic
"""
require Logger
alias Reaper.{
Decoder,
DataSlurper,
UrlBuilder,
Persistence
}
alias Reaper.DataExtract.{ValidationStage, SchemaStage, LoadStage, Extract... | 32.24812 | 119 | 0.715551 |
9375c29ca3d283aa5b7dd5f5e358103121a4f3bc | 696 | exs | Elixir | apps/ewallet_db/config/adapters/aws.exs | turbo-play/ewallet | b7fee3eed62ac716f46246132c2ead1045f2e4f3 | [
"Apache-2.0"
] | 2 | 2019-07-13T05:49:03.000Z | 2021-08-19T23:58:23.000Z | apps/ewallet_db/config/adapters/aws.exs | turbo-play/ewallet | b7fee3eed62ac716f46246132c2ead1045f2e4f3 | [
"Apache-2.0"
] | null | null | null | apps/ewallet_db/config/adapters/aws.exs | turbo-play/ewallet | b7fee3eed62ac716f46246132c2ead1045f2e4f3 | [
"Apache-2.0"
] | 3 | 2018-05-08T17:15:42.000Z | 2021-11-10T04:08:33.000Z | use Mix.Config
# Required ENV Variables
#
# AWS_ACCESS_KEY_ID
# AWS_SECRET_ACCESS_KEY
# AWS_BUCKET
# AWS_REGION
bucket = System.get_env("AWS_BUCKET")
region = System.get_env("AWS_REGION")
aws_domain = "s3-" <> region <> ".amazonaws.com"
config :ex_aws,
access_key_id: [{:system, "AWS_ACCESS_KEY_ID"}, :instance_role... | 22.451613 | 74 | 0.701149 |
9375c3ad12c109a9ee0a1aa8f1ec71d58330922d | 120 | exs | Elixir | examples/poncho2/a/test/a_test.exs | kelvinst/poncho | 1d52e52f57538a51ce8793fede0afb3f94dca70f | [
"MIT"
] | 3 | 2020-11-06T21:30:44.000Z | 2021-04-05T09:21:25.000Z | examples/poncho2/a/test/a_test.exs | kelvinst/poncho | 1d52e52f57538a51ce8793fede0afb3f94dca70f | [
"MIT"
] | null | null | null | examples/poncho2/a/test/a_test.exs | kelvinst/poncho | 1d52e52f57538a51ce8793fede0afb3f94dca70f | [
"MIT"
] | null | null | null | defmodule ATest do
use ExUnit.Case
doctest A
test "greets the world" do
assert A.hello() == :world
end
end
| 13.333333 | 30 | 0.666667 |
9375cf892d390f4af9f85839a91c7284576423b2 | 3,741 | ex | Elixir | clients/android_enterprise/lib/google_api/android_enterprise/v1/model/web_app.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/android_enterprise/lib/google_api/android_enterprise/v1/model/web_app.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/android_enterprise/lib/google_api/android_enterprise/v1/model/web_app.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"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... | 56.681818 | 681 | 0.728148 |
9375dbca1eadd5b7df70356ad47bd19214d07e45 | 502 | ex | Elixir | lib/mix/tasks/temple.convert.ex | zimt28/temple | 07858739b06cd9f0fa6d76e185514b9a60d922b5 | [
"MIT"
] | null | null | null | lib/mix/tasks/temple.convert.ex | zimt28/temple | 07858739b06cd9f0fa6d76e185514b9a60d922b5 | [
"MIT"
] | null | null | null | lib/mix/tasks/temple.convert.ex | zimt28/temple | 07858739b06cd9f0fa6d76e185514b9a60d922b5 | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.Temple.Convert do
use Mix.Task
@preferred_cli_env :dev
@shortdoc "Converts HTML to Temple syntax"
@moduledoc """
Converts HTML to Temple syntax
Takes HTML from a file or from stdin and outputs temple syntax to stdout.
"""
def run(args) do
html =
if Enum.count(args) > 0 do... | 20.916667 | 75 | 0.63745 |
9375dd2905e05f806a3bd0e03f43b470cef9b4fd | 1,166 | ex | Elixir | lib/pardall_markdown/content/filters.ex | rockchalkwushock/pardall_markdown | 82188d6090a419f346618997d40539a0435ea4d5 | [
"Apache-2.0"
] | 75 | 2021-09-11T15:36:34.000Z | 2022-03-28T17:21:55.000Z | lib/pardall_markdown/content/filters.ex | rockchalkwushock/pardall_markdown | 82188d6090a419f346618997d40539a0435ea4d5 | [
"Apache-2.0"
] | 33 | 2021-09-11T15:34:29.000Z | 2021-11-21T03:47:05.000Z | lib/pardall_markdown/content/filters.ex | rockchalkwushock/pardall_markdown | 82188d6090a419f346618997d40539a0435ea4d5 | [
"Apache-2.0"
] | 4 | 2021-09-27T03:34:35.000Z | 2022-01-31T23:42:58.000Z | defmodule PardallMarkdown.Content.Filters do
def filter_by_is_published(posts), do: posts |> Enum.filter(& &1.is_published)
def sort_by_published_date(posts, sorter \\ {:desc, DateTime}),
do: posts |> Enum.sort_by(& &1.date, sorter)
def sort_by_title(posts), do: posts |> Enum.sort_by(& &1.title)
def sort_... | 36.4375 | 93 | 0.651801 |
9376008c58bcc2cad13cea3dd9f71f5acbfb56ab | 557 | exs | Elixir | 02/day2-part1.exs | andyhansen/advent-of-code-2017 | 8c06a10a119120ec61df964fc59d28c3f93bd72f | [
"MIT"
] | null | null | null | 02/day2-part1.exs | andyhansen/advent-of-code-2017 | 8c06a10a119120ec61df964fc59d28c3f93bd72f | [
"MIT"
] | null | null | null | 02/day2-part1.exs | andyhansen/advent-of-code-2017 | 8c06a10a119120ec61df964fc59d28c3f93bd72f | [
"MIT"
] | null | null | null | # defmodule CaptchaSolver do
# def get_value(file, accumulator) do
# end
# def get_value(file, accumulator) do
# accumulator
# end
# end
defmodule LineMagic do
def subtract_max_from_min(line) do
Enum.max(line) - Enum.min(line)
end
end
file = File.read! "02/input.txt"
file =
Strin... | 21.423077 | 74 | 0.633752 |
9376212d5aa05dface5e1479cb14ff06a6bb5666 | 210 | exs | Elixir | chapter-6/modules-and-functions-3.exs | carlos4ndre/elixir-exercises | 3673cf69d08a6c7de53224f8956f0db21e7c5dad | [
"MIT"
] | 55 | 2015-12-09T09:23:50.000Z | 2022-01-31T21:14:59.000Z | chapter-6/modules-and-functions-3.exs | carlos4ndre/elixir-exercises | 3673cf69d08a6c7de53224f8956f0db21e7c5dad | [
"MIT"
] | 3 | 2016-06-15T12:53:39.000Z | 2017-08-21T18:20:42.000Z | chapter-6/modules-and-functions-3.exs | carlos4ndre/elixir-exercises | 3673cf69d08a6c7de53224f8956f0db21e7c5dad | [
"MIT"
] | 18 | 2016-01-01T18:18:23.000Z | 2021-05-24T02:22:42.000Z | defmodule Times do
def double(n), do: n * 2
def triple(n), do: n * 3
def quadruple(n), do: double(n) * 2
end
IO.puts Times.quadruple(1) # 4
IO.puts Times.quadruple(2) # 8
IO.puts Times.quadruple(3) # 12
| 21 | 37 | 0.652381 |
937624266f6f640ce814bad00aa59663abd4bfbe | 1,002 | ex | Elixir | lib/icon/schema/types/transaction/status.ex | alexdesousa/icon | 2b363582b129bc0485a39e9845d2a18eabd2f6d6 | [
"MIT"
] | 4 | 2022-01-27T09:10:05.000Z | 2022-03-09T04:38:13.000Z | lib/icon/schema/types/transaction/status.ex | alexdesousa/icon | 2b363582b129bc0485a39e9845d2a18eabd2f6d6 | [
"MIT"
] | null | null | null | lib/icon/schema/types/transaction/status.ex | alexdesousa/icon | 2b363582b129bc0485a39e9845d2a18eabd2f6d6 | [
"MIT"
] | null | null | null | defmodule Icon.Schema.Types.Transaction.Status do
@moduledoc """
This module defines a transaction status.
"""
use Icon.Schema.Type
@typedoc """
A transaction status.
"""
@type t() :: :success | :failure
@spec load(any()) :: {:ok, t()} | :error
@impl Icon.Schema.Type
def load(0), do: load(:failu... | 22.266667 | 70 | 0.60978 |
937641574b27ee7c9690f80e39b27a4165326919 | 542 | exs | Elixir | test/exscm_git_test.exs | treebee/exscm | 6176ff7ce9922e6321aa21a55027346b38671ac9 | [
"MIT"
] | null | null | null | test/exscm_git_test.exs | treebee/exscm | 6176ff7ce9922e6321aa21a55027346b38671ac9 | [
"MIT"
] | null | null | null | test/exscm_git_test.exs | treebee/exscm | 6176ff7ce9922e6321aa21a55027346b38671ac9 | [
"MIT"
] | null | null | null | defmodule ExscmGitTest do
use ExUnit.Case
doctest Exscm.Git
test "version from git" do
assert Exscm.Git.git_to_version("0.1.0") == "0.1.0"
assert Exscm.Git.git_to_version("v0.1.2") == "0.1.2"
assert Exscm.Git.git_to_version("v0.1.2-0-g342333") == "0.1.2"
assert Exscm.Git.git_to_version("v0.1.2-0-... | 36.133333 | 92 | 0.678967 |
937669969c1e8f374bd6a858bfc3431a0984b23e | 1,043 | exs | Elixir | lib/elixir/test/elixir/kernel/macros_test.exs | ekosz/elixir | 62e375bc711b4072e1b68de776e96cc31f571d45 | [
"Apache-2.0"
] | 1 | 2017-10-29T16:37:08.000Z | 2017-10-29T16:37:08.000Z | lib/elixir/test/elixir/kernel/macros_test.exs | ekosz/elixir | 62e375bc711b4072e1b68de776e96cc31f571d45 | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/kernel/macros_test.exs | ekosz/elixir | 62e375bc711b4072e1b68de776e96cc31f571d45 | [
"Apache-2.0"
] | null | null | null | Code.require_file "../../test_helper", __FILE__
defmodule Kernel.MacrosTest.Nested do
defmacro value, do: 1
end
defmodule Kernel.MacrosTest do
require Kernel.MacrosTest.Nested, as: Nested
use ExUnit.Case, async: true
defmacro my_macro do
quote do: 1 + 1
end
defmacrop my_private_macro do
quote d... | 18.298246 | 58 | 0.699904 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.