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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
08119751f9a39e79cf64d967ae51e58729dd632a | 2,529 | ex | Elixir | lib/ory/hydra/request.ex | sitch/ory-hydra-elixir | 529b5d120e0e857f9fadecf0e05f023f56394826 | [
"MIT"
] | null | null | null | lib/ory/hydra/request.ex | sitch/ory-hydra-elixir | 529b5d120e0e857f9fadecf0e05f023f56394826 | [
"MIT"
] | null | null | null | lib/ory/hydra/request.ex | sitch/ory-hydra-elixir | 529b5d120e0e857f9fadecf0e05f023f56394826 | [
"MIT"
] | null | null | null | defmodule ORY.Hydra.Request do
alias ORY.Hydra.{Helpers, Response}
@type t ::
%__MODULE__{
attempt: integer,
body: binary,
headers: ORY.Hydra.http_headers_t(),
method: ORY.Hydra.http_method_t(),
result: any,
url: String.t()
... | 25.545455 | 91 | 0.591934 |
0811eeef20bfeb6ee0b5ee7345df66ac7f66f974 | 2,149 | ex | Elixir | clients/private_ca/lib/google_api/private_ca/v1beta1/model/subject_config.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/private_ca/lib/google_api/private_ca/v1beta1/model/subject_config.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/private_ca/lib/google_api/private_ca/v1beta1/model/subject_config.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 40.54717 | 175 | 0.743136 |
0811f418e55b284d06f1a580b6563e8210378159 | 1,609 | exs | Elixir | config/dev.exs | DaveMuirhead/naboo-server | daf15d9b92ad6a3f85eb42bdbe7125c489a079c1 | [
"Apache-2.0"
] | null | null | null | config/dev.exs | DaveMuirhead/naboo-server | daf15d9b92ad6a3f85eb42bdbe7125c489a079c1 | [
"Apache-2.0"
] | null | null | null | config/dev.exs | DaveMuirhead/naboo-server | daf15d9b92ad6a3f85eb42bdbe7125c489a079c1 | [
"Apache-2.0"
] | null | null | null | use Mix.Config
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with webpack to recompile .js and .css sources.
config :naboo, NabooWeb.Endpoint,
http: [port: 4004],
... | 27.741379 | 68 | 0.717216 |
0811f838c814c27071ea9dd219c5f794262a5ba4 | 1,176 | exs | Elixir | test/command_test.exs | lubien/nats.ex | 9ddb11acbca7727e97c6624425a2cb22243cfafe | [
"MIT"
] | 102 | 2019-04-17T06:19:48.000Z | 2022-03-31T02:36:11.000Z | test/command_test.exs | lubien/nats.ex | 9ddb11acbca7727e97c6624425a2cb22243cfafe | [
"MIT"
] | 68 | 2017-03-23T04:54:00.000Z | 2019-03-04T03:30:28.000Z | test/command_test.exs | lubien/nats.ex | 9ddb11acbca7727e97c6624425a2cb22243cfafe | [
"MIT"
] | 17 | 2019-05-07T19:33:17.000Z | 2022-03-24T18:27:25.000Z | defmodule Gnat.CommandTest do
use ExUnit.Case, async: true
alias Gnat.Command
test "formatting a simple pub message" do
command = Command.build(:pub, "topic", "payload", []) |> IO.iodata_to_binary
assert command == "PUB topic 7\r\npayload\r\n"
end
test "formatting a pub with reply_to set" do
com... | 33.6 | 97 | 0.67432 |
081220245a67e9bf5731b60e0ba76a1a2365771f | 1,356 | exs | Elixir | test/mastani_server/cms/video_test.exs | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | 1 | 2019-05-07T15:03:54.000Z | 2019-05-07T15:03:54.000Z | test/mastani_server/cms/video_test.exs | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | null | null | null | test/mastani_server/cms/video_test.exs | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | null | null | null | defmodule MastaniServer.Test.CMS.Video do
use MastaniServer.TestTools
alias Helper.ORM
alias MastaniServer.CMS
setup do
{:ok, user} = db_insert(:user)
{:ok, community} = db_insert(:community)
video_attrs = mock_attrs(:video, %{community_id: community.id})
{:ok, ~m(user community video_attrs)... | 31.534884 | 92 | 0.675516 |
0812473e65ecf2f2e61e61c4113d9f26a2faac97 | 1,785 | ex | Elixir | clients/plus_domains/lib/google_api/plus_domains/v1/model/videostream.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/plus_domains/lib/google_api/plus_domains/v1/model/videostream.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/plus_domains/lib/google_api/plus_domains/v1/model/videostream.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 ... | 31.875 | 102 | 0.686275 |
0812616ba8dd676b3620eeda35bc947d5e10bdb7 | 61 | exs | Elixir | config/dev.exs | dominique-vassard/boltex | acf71d9c97782d17ad9c07f7ea2a7e7f12dbb311 | [
"Apache-2.0"
] | 31 | 2016-07-19T00:05:56.000Z | 2020-04-28T12:28:43.000Z | config/dev.exs | dominique-vassard/boltex | acf71d9c97782d17ad9c07f7ea2a7e7f12dbb311 | [
"Apache-2.0"
] | 24 | 2016-07-31T20:17:51.000Z | 2019-03-21T15:45:59.000Z | config/dev.exs | dominique-vassard/boltex | acf71d9c97782d17ad9c07f7ea2a7e7f12dbb311 | [
"Apache-2.0"
] | 8 | 2016-08-01T12:56:29.000Z | 2017-03-22T23:02:49.000Z | use Mix.Config
config :boltex,
log: true,
log_hex: true
| 10.166667 | 15 | 0.688525 |
08126df225e1525783621ccd1e44bf76013080b7 | 38,436 | exs | Elixir | lib/elixir/test/elixir/stream_test.exs | mguimas/elixir | 161f5f9a3b6bc38faa152e08c567486b71b0602a | [
"Apache-2.0"
] | 1 | 2018-02-24T19:48:35.000Z | 2018-02-24T19:48:35.000Z | lib/elixir/test/elixir/stream_test.exs | mguimas/elixir | 161f5f9a3b6bc38faa152e08c567486b71b0602a | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/stream_test.exs | mguimas/elixir | 161f5f9a3b6bc38faa152e08c567486b71b0602a | [
"Apache-2.0"
] | null | null | null | Code.require_file("test_helper.exs", __DIR__)
defmodule StreamTest do
use ExUnit.Case, async: true
doctest Stream
defmodule Pdict do
defstruct []
defimpl Collectable do
def into(struct) do
fun = fn
_, {:cont, x} -> Process.put(:stream_cont, [x | Process.get(:stream_cont)])
... | 31.504918 | 97 | 0.56611 |
08126fc274545b8fdef43c41b7b57ffbb449e512 | 481 | ex | Elixir | lib/charlex/application.ex | uduDudu/Charlex | 67da95ed547a5b558373477ed08cacdedb446bfe | [
"MIT"
] | 2 | 2021-08-12T01:15:52.000Z | 2021-10-11T18:28:14.000Z | lib/charlex/application.ex | uduDudu/Charlex | 67da95ed547a5b558373477ed08cacdedb446bfe | [
"MIT"
] | null | null | null | lib/charlex/application.ex | uduDudu/Charlex | 67da95ed547a5b558373477ed08cacdedb446bfe | [
"MIT"
] | null | null | null | defmodule Charlex.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
children = [
Charlex.Consumer,
Charlex.Server
]
# See https://hexdocs.pm/elixir/Supervisor.html
... | 24.05 | 61 | 0.711019 |
0812a23e739f576922ea5f2bc60348e04814cdcd | 1,768 | ex | Elixir | clients/tool_results/lib/google_api/tool_results/v1/model/upgrade_insight.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/tool_results/lib/google_api/tool_results/v1/model/upgrade_insight.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/tool_results/lib/google_api/tool_results/v1/model/upgrade_insight.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... | 34 | 102 | 0.7319 |
0812c39f2a562cabfc66a7fecebf7711c1dfe487 | 1,294 | ex | Elixir | clients/vm_migration/lib/google_api/vm_migration/v1/model/cancel_clone_job_response.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/vm_migration/lib/google_api/vm_migration/v1/model/cancel_clone_job_response.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/vm_migration/lib/google_api/vm_migration/v1/model/cancel_clone_job_response.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... | 30.809524 | 85 | 0.767388 |
0812d0dc43a00a6e353f3264ce9700b37e7d33b1 | 3,683 | ex | Elixir | clients/chat/lib/google_api/chat/v1/model/deprecated_event.ex | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"Apache-2.0"
] | null | null | null | clients/chat/lib/google_api/chat/v1/model/deprecated_event.ex | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"Apache-2.0"
] | null | null | null | clients/chat/lib/google_api/chat/v1/model/deprecated_event.ex | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"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.873239 | 339 | 0.707575 |
08131499f9b8b08ae01e54a1ebd597a4b7393430 | 285 | ex | Elixir | lib/protobuf/wire_types.ex | gialib/protobuf-elixir | 25598a2ae13eee56550467901d789dc9b21aab17 | [
"MIT"
] | 2 | 2019-06-01T05:52:52.000Z | 2019-06-01T06:03:10.000Z | lib/protobuf/wire_types.ex | gialib/protobuf-elixir | 25598a2ae13eee56550467901d789dc9b21aab17 | [
"MIT"
] | 3 | 2019-09-19T14:52:12.000Z | 2019-09-24T15:45:07.000Z | lib/protobuf/wire_types.ex | gialib/protobuf-elixir | 25598a2ae13eee56550467901d789dc9b21aab17 | [
"MIT"
] | 1 | 2018-12-03T07:04:27.000Z | 2018-12-03T07:04:27.000Z | defmodule Protobuf.WireTypes do
@moduledoc """
Protocol buffer wire types.
"""
defmacro wire_varint, do: 0
defmacro wire_64bits, do: 1
defmacro wire_delimited, do: 2
# defmacro wire_start_group, do: 3
# defmacro wire_end_group, do: 4
defmacro wire_32bits, do: 5
end
| 21.923077 | 36 | 0.722807 |
081329881ebdbe00f1c41112463ad0cd07ae63c8 | 2,152 | ex | Elixir | clients/content/lib/google_api/content/v2/model/orders_custom_batch_request_entry_set_line_item_metadata.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/content/lib/google_api/content/v2/model/orders_custom_batch_request_entry_set_line_item_metadata.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/orders_custom_batch_request_entry_set_line_item_metadata.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 ... | 37.103448 | 191 | 0.738848 |
081336e79e29246405a3904ffa62d96389631c1d | 64 | ex | Elixir | web/views/admin_view.ex | thluiz/yehudimtv | 71aba0ee537b4bba28474fb20d3209fc261a03d7 | [
"MIT"
] | null | null | null | web/views/admin_view.ex | thluiz/yehudimtv | 71aba0ee537b4bba28474fb20d3209fc261a03d7 | [
"MIT"
] | null | null | null | web/views/admin_view.ex | thluiz/yehudimtv | 71aba0ee537b4bba28474fb20d3209fc261a03d7 | [
"MIT"
] | null | null | null | defmodule Yehudimtv.AdminView do
use Yehudimtv.Web, :view
end
| 16 | 32 | 0.796875 |
08134d31825906c1b578b96df412019602596849 | 294 | exs | Elixir | priv/repo/migrations/20171029081608_create_tag.exs | OSM-Browser/points-api | 7022d4e61318fc8da507809302a57bf38223207a | [
"MIT"
] | 2 | 2018-01-18T20:38:08.000Z | 2020-01-19T17:44:20.000Z | priv/repo/migrations/20171029081608_create_tag.exs | OSM-Browser/points-api | 7022d4e61318fc8da507809302a57bf38223207a | [
"MIT"
] | 85 | 2018-02-26T05:30:01.000Z | 2021-07-26T06:22:02.000Z | priv/repo/migrations/20171029081608_create_tag.exs | OSM-Browser/points-api | 7022d4e61318fc8da507809302a57bf38223207a | [
"MIT"
] | 1 | 2018-10-07T06:57:34.000Z | 2018-10-07T06:57:34.000Z | defmodule OsmPoints.Repo.Migrations.CreateTag do
use Ecto.Migration
def change do
create table(:tags, primary_key: false) do
add :point_id, references(:points), primary_key: true
add :key, :string, primary_key: true
add :value, :string, null: false
end
end
end
| 24.5 | 59 | 0.693878 |
0813516c5515d0c17f6534f1ccf16bb4cbfb6e44 | 2,978 | exs | Elixir | test/xdr/transactions/operations/set_trust_line_flags_test.exs | einerzg/stellar_base | 2d10c5fc3b8159efc5de10b5c7c665e3b57b3d8f | [
"MIT"
] | 3 | 2021-08-17T20:32:45.000Z | 2022-03-13T20:26:02.000Z | test/xdr/transactions/operations/set_trust_line_flags_test.exs | einerzg/stellar_base | 2d10c5fc3b8159efc5de10b5c7c665e3b57b3d8f | [
"MIT"
] | 45 | 2021-08-12T20:19:41.000Z | 2022-03-27T21:00:10.000Z | test/xdr/transactions/operations/set_trust_line_flags_test.exs | einerzg/stellar_base | 2d10c5fc3b8159efc5de10b5c7c665e3b57b3d8f | [
"MIT"
] | 2 | 2021-09-22T23:11:13.000Z | 2022-01-23T03:19:11.000Z | defmodule StellarBase.XDR.Operations.SetTrustLineFlagsTest do
use ExUnit.Case
alias StellarBase.XDR.{
AccountID,
AlphaNum4,
Asset,
AssetCode4,
AssetType,
PublicKey,
PublicKeyType,
UInt32,
UInt256
}
alias StellarBase.XDR.Operations.SetTrustLineFlags
alias StellarBase.StrK... | 30.387755 | 98 | 0.629617 |
0813a1591af12d33d0d0023f68d2b52eeee81be5 | 1,040 | exs | Elixir | day6/test/day6/part1_test.exs | ryanbillingsley/advent_of_code | 9219a4b763966b70caed85865bb073a26bb3a705 | [
"MIT"
] | null | null | null | day6/test/day6/part1_test.exs | ryanbillingsley/advent_of_code | 9219a4b763966b70caed85865bb073a26bb3a705 | [
"MIT"
] | null | null | null | day6/test/day6/part1_test.exs | ryanbillingsley/advent_of_code | 9219a4b763966b70caed85865bb073a26bb3a705 | [
"MIT"
] | null | null | null | defmodule Day6.Part1Test do
use ExUnit.Case
doctest Day6.Part1
test "Calculates ranges" do
# 1-2-3-4-5
# 1_________
# 2_________
# 3__*_* * *
# 4__*_* * *
# 5__*_* * *
expect = [
{2,3}, {3,3}, {4,3}, {5,3},
{2,4}, {3,4}, {4,4}, {5,4},
{2,5}, {3,5}, {4,5}, {5,5}
... | 19.259259 | 60 | 0.546154 |
0813bdf4dfb0e0e69c4ce7161f88e44aefc4c4ba | 922 | ex | Elixir | lib/my_sensors/broadcast.ex | ConnorRigby/my_sensors | 25296a7e5629b58462576f7c8042bb15c1a0f7e7 | [
"MIT"
] | 6 | 2018-02-21T21:13:24.000Z | 2020-07-06T12:18:24.000Z | lib/my_sensors/broadcast.ex | ConnorRigby/my_sensors | 25296a7e5629b58462576f7c8042bb15c1a0f7e7 | [
"MIT"
] | 2 | 2018-02-09T22:04:46.000Z | 2018-10-09T16:34:00.000Z | lib/my_sensors/broadcast.ex | ConnorRigby/my_sensors | 25296a7e5629b58462576f7c8042bb15c1a0f7e7 | [
"MIT"
] | 1 | 2018-02-09T20:29:09.000Z | 2018-02-09T20:29:09.000Z | defmodule MySensors.Broadcast do
@moduledoc """
Elixir Broadcast mechanism for MySensors data.
Will receive messages in the shape of:
`{:my_sensors, {type, data}}`
where `type` will be:
* `insert_or_update`
* `delete`
and `data` will be a `Node` struct.
"""
@name MySensorsRegistry
@doc false... | 20.954545 | 64 | 0.625813 |
0813cc69c18a41b2ebc63946b1572317536cae59 | 3,028 | exs | Elixir | exercises/parallel-letter-frequency/parallel_letter_frequency_test.exs | jerith/elixir | 9a3f2a2fbee26a7b6a6b3ad74a9e6d1ff2495ed4 | [
"Apache-2.0"
] | null | null | null | exercises/parallel-letter-frequency/parallel_letter_frequency_test.exs | jerith/elixir | 9a3f2a2fbee26a7b6a6b3ad74a9e6d1ff2495ed4 | [
"Apache-2.0"
] | null | null | null | exercises/parallel-letter-frequency/parallel_letter_frequency_test.exs | jerith/elixir | 9a3f2a2fbee26a7b6a6b3ad74a9e6d1ff2495ed4 | [
"Apache-2.0"
] | 1 | 2018-07-19T23:43:56.000Z | 2018-07-19T23:43:56.000Z | if !System.get_env("EXERCISM_TEST_EXAMPLES") do
Code.load_file("frequency.exs", __DIR__)
end
ExUnit.start()
ExUnit.configure(exclude: :pending, trace: true)
# Your code should contain a frequency(texts, workers) function which accepts a
# list of texts and the number of workers to use in parallel.
defmodule Freque... | 28.037037 | 88 | 0.679657 |
0813d02ecf6232620284b03e4185b8b5b8ea4c34 | 2,954 | ex | Elixir | clients/private_ca/lib/google_api/private_ca/v1/model/audit_config.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/private_ca/lib/google_api/private_ca/v1/model/audit_config.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/private_ca/lib/google_api/private_ca/v1/model/audit_config.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... | 59.08 | 1,106 | 0.745091 |
0813d437a76b847c949014342a16fe725e9a1844 | 1,679 | exs | Elixir | test/pumpkin_web/controllers/bug_controller_test.exs | krasio/pumpkin.ex | bfa8d1ae1854ba6c5f7c3df877157656a67e99f9 | [
"BSD-3-Clause"
] | null | null | null | test/pumpkin_web/controllers/bug_controller_test.exs | krasio/pumpkin.ex | bfa8d1ae1854ba6c5f7c3df877157656a67e99f9 | [
"BSD-3-Clause"
] | null | null | null | test/pumpkin_web/controllers/bug_controller_test.exs | krasio/pumpkin.ex | bfa8d1ae1854ba6c5f7c3df877157656a67e99f9 | [
"BSD-3-Clause"
] | null | null | null | defmodule PumpkinWeb.BugControllerTest do
use PumpkinWeb.ConnCase, async: false
alias Pumpkin.Repo
alias Pumpkin.Exceptions
alias Pumpkin.Exceptions.Tasks
alias Pumpkin.Exceptions.Environment
describe "index/2" do
test "responds with list of bugs for environment", %{conn: conn} do
staging = crea... | 34.265306 | 121 | 0.666468 |
0813ddbdbef1e108fb0ca79aa12ee7f382b5d83e | 271 | ex | Elixir | lib/hl7/2.5.1/segments/erq.ex | calvinb/elixir-hl7 | 5e953fa11f9184857c0ec4dda8662889f35a6bec | [
"Apache-2.0"
] | null | null | null | lib/hl7/2.5.1/segments/erq.ex | calvinb/elixir-hl7 | 5e953fa11f9184857c0ec4dda8662889f35a6bec | [
"Apache-2.0"
] | null | null | null | lib/hl7/2.5.1/segments/erq.ex | calvinb/elixir-hl7 | 5e953fa11f9184857c0ec4dda8662889f35a6bec | [
"Apache-2.0"
] | null | null | null | defmodule HL7.V2_5_1.Segments.ERQ do
@moduledoc false
require Logger
alias HL7.V2_5_1.{DataTypes}
use HL7.Segment,
fields: [
segment: nil,
query_tag: nil,
event_identifier: DataTypes.Ce,
input_parameter_list: DataTypes.Qip
]
end
| 18.066667 | 41 | 0.678967 |
08141ac7f910bdbb1b4e1a5f94d27727c32e0ba6 | 2,049 | exs | Elixir | test/mysimplelist/accounts_test.exs | ScorpionResponse/mysimplelist | 3c792373cc372ab5e196fe109b9dae68b97b7220 | [
"Apache-2.0"
] | null | null | null | test/mysimplelist/accounts_test.exs | ScorpionResponse/mysimplelist | 3c792373cc372ab5e196fe109b9dae68b97b7220 | [
"Apache-2.0"
] | null | null | null | test/mysimplelist/accounts_test.exs | ScorpionResponse/mysimplelist | 3c792373cc372ab5e196fe109b9dae68b97b7220 | [
"Apache-2.0"
] | null | null | null | defmodule Mysimplelist.AccountsTest do
use Mysimplelist.DataCase
alias Mysimplelist.Accounts
describe "users" do
alias Mysimplelist.Accounts.User
@valid_attrs %{email: "some@valid.email", name: "some name"}
@update_attrs %{email: "some@updated.email", name: "some updated name"}
@invalid_attrs %... | 30.58209 | 85 | 0.654954 |
08141ec1133432ecf593450ad714f5ca43170933 | 1,037 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/url_map_reference.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/url_map_reference.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/url_map_reference.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... | 28.027027 | 77 | 0.745419 |
081440073d8e6e152cc58b2d7c539d85d9e50049 | 1,178 | ex | Elixir | lib/extensions/invitation/ecto/context.ex | foggy1/pow | c46cf4c4c2d59d10861783faa46f3979d54343a9 | [
"MIT"
] | null | null | null | lib/extensions/invitation/ecto/context.ex | foggy1/pow | c46cf4c4c2d59d10861783faa46f3979d54343a9 | [
"MIT"
] | null | null | null | lib/extensions/invitation/ecto/context.ex | foggy1/pow | c46cf4c4c2d59d10861783faa46f3979d54343a9 | [
"MIT"
] | null | null | null | defmodule PowInvitation.Ecto.Context do
@moduledoc false
alias Ecto.Changeset
alias Pow.Ecto.Context
alias PowInvitation.Ecto.Schema
@doc """
Creates an invited user
"""
@spec create(map(), map(), Config.t()) :: {:ok, map()} | {:error, Changeset.t()}
def create(inviter_user, params, config) do
us... | 26.177778 | 82 | 0.66129 |
081442c463f09fc4b9a9e4c5231814835d9c098b | 1,274 | ex | Elixir | deps/credo/lib/credo/execution/task_runner.ex | BandanaPandey/nary_tree | fb1eeb69e38e43c9f9ffb54297cef52dff5c928d | [
"MIT"
] | 13 | 2018-09-19T21:03:29.000Z | 2022-01-27T04:06:32.000Z | deps/credo/lib/credo/execution/task_runner.ex | BandanaPandey/nary_tree | fb1eeb69e38e43c9f9ffb54297cef52dff5c928d | [
"MIT"
] | 1 | 2020-05-26T04:16:57.000Z | 2020-05-26T04:16:57.000Z | deps/credo/lib/credo/execution/task_runner.ex | BandanaPandey/nary_tree | fb1eeb69e38e43c9f9ffb54297cef52dff5c928d | [
"MIT"
] | 3 | 2020-05-21T04:32:08.000Z | 2021-07-28T05:14:01.000Z | defmodule Credo.Execution.TaskRunner do
@moduledoc """
This module defines all Tasks which make up the execution of Credo.
Each task receives an Execution struct and returns an Execution struct upon completion.
Any Task can mark the Execution as "halted" to stop Credo's execution.
Subsequent Tasks won't be r... | 24.5 | 89 | 0.776295 |
08144ed77865b1ff0d000210c1ba70ca6e081880 | 825 | exs | Elixir | priv/repo/migrations/20151202133406_create_user.exs | yknx4/opencov | dc961a41e29b41b0657bc2a64bb67350a65477b8 | [
"MIT"
] | 8 | 2021-08-22T10:37:57.000Z | 2022-01-10T11:27:06.000Z | priv/repo/migrations/20151202133406_create_user.exs | yknx4/librecov | dc961a41e29b41b0657bc2a64bb67350a65477b8 | [
"MIT"
] | 109 | 2021-08-20T04:08:04.000Z | 2022-01-03T07:39:18.000Z | priv/repo/migrations/20151202133406_create_user.exs | Librecov/librecov | dc961a41e29b41b0657bc2a64bb67350a65477b8 | [
"MIT"
] | null | null | null | defmodule Librecov.Repo.Migrations.CreateUser do
use Ecto.Migration
def change do
create table(:users) do
add(:name, :string)
add(:email, :string)
add(:password_digest, :string)
add(:admin, :boolean, default: false)
add(:password_initialized, :boolean, default: false)
add(... | 26.612903 | 58 | 0.682424 |
081472df0254fcaf491bf07eabf614ebd1d28834 | 1,133 | ex | Elixir | lib/howhow_speak_web/router.ex | pastleo/howhow_speak | c298cc6624cd41da3d3f045ab92d4bcf50b84898 | [
"MIT"
] | 1 | 2020-06-19T11:23:44.000Z | 2020-06-19T11:23:44.000Z | lib/howhow_speak_web/router.ex | pastleo/howhow_speak | c298cc6624cd41da3d3f045ab92d4bcf50b84898 | [
"MIT"
] | null | null | null | lib/howhow_speak_web/router.ex | pastleo/howhow_speak | c298cc6624cd41da3d3f045ab92d4bcf50b84898 | [
"MIT"
] | null | null | null | defmodule HowhowSpeakWeb.Router do
use HowhowSpeakWeb, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
end
pipeline :api do
plug :accepts, ["json"]
end
scope "/", HowhowSpeakWeb ... | 25.177778 | 70 | 0.70609 |
08147d56a818146451a6df267f54f6ee846eca53 | 468 | exs | Elixir | apps/device_fake/mix.exs | rockwood/ExAir | 3944f4b0ea66fc2179784b728e033e7eeaad664f | [
"Apache-2.0"
] | 4 | 2016-09-21T11:22:27.000Z | 2017-12-09T02:06:52.000Z | apps/device_fake/mix.exs | rockwood/ExAir | 3944f4b0ea66fc2179784b728e033e7eeaad664f | [
"Apache-2.0"
] | null | null | null | apps/device_fake/mix.exs | rockwood/ExAir | 3944f4b0ea66fc2179784b728e033e7eeaad664f | [
"Apache-2.0"
] | 2 | 2017-12-09T02:07:22.000Z | 2021-01-06T15:30:03.000Z | defmodule Device.Mixfile do
use Mix.Project
def project do
[app: :device_fake,
version: "0.1.0",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixir: "~> 1.3",
build_embedded: Mix.env == :prod,
s... | 18.72 | 44 | 0.564103 |
081499649d796cc0bb0a8fc62827b6ac096f992c | 894 | ex | Elixir | test/support/conn_case.ex | JPYamamoto/PhoenixLiveView-GameOfLife | 20e671c178c91ad1ccf6d7572ff6c51421f878bd | [
"MIT"
] | null | null | null | test/support/conn_case.ex | JPYamamoto/PhoenixLiveView-GameOfLife | 20e671c178c91ad1ccf6d7572ff6c51421f878bd | [
"MIT"
] | null | null | null | test/support/conn_case.ex | JPYamamoto/PhoenixLiveView-GameOfLife | 20e671c178c91ad1ccf6d7572ff6c51421f878bd | [
"MIT"
] | null | null | null | defmodule GameOfLifeWeb.ConnCase do
@moduledoc """
This module defines the test case to be used by
tests that require setting up a connection.
Such tests rely on `Phoenix.ConnTest` and also
import other functionality to make it easier
to build common data structures and query the data layer.
Finally, if... | 27.090909 | 59 | 0.731544 |
0814cc7d7baee4c59343a70a47f2dd6f4ce18a81 | 1,298 | ex | Elixir | apps/omg_api/lib/root_chain_coordinator/service.ex | hoardexchange/elixir-omg | 423528699d467f1cc0d02c596290ab907af38c2c | [
"Apache-2.0"
] | null | null | null | apps/omg_api/lib/root_chain_coordinator/service.ex | hoardexchange/elixir-omg | 423528699d467f1cc0d02c596290ab907af38c2c | [
"Apache-2.0"
] | null | null | null | apps/omg_api/lib/root_chain_coordinator/service.ex | hoardexchange/elixir-omg | 423528699d467f1cc0d02c596290ab907af38c2c | [
"Apache-2.0"
] | 2 | 2020-06-07T11:14:54.000Z | 2020-08-02T07:36:32.000Z | # 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... | 41.870968 | 120 | 0.753467 |
0814ea1fe36208b225d0b3e58bc61b8daf3114e3 | 1,647 | ex | Elixir | clients/script/lib/google_api/script/v1/model/google_apps_script_type_function_set.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/script/lib/google_api/script/v1/model/google_apps_script_type_function_set.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/script/lib/google_api/script/v1/model/google_apps_script_type_function_set.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"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... | 35.042553 | 148 | 0.757134 |
0814fc7cfa63d817a631f3817ccea14b3488bbb9 | 2,540 | ex | Elixir | lib/cforum/messages/read_messages.ex | campingrider/cforum_ex | cf27684c47d6dc26c9c37a946f1c729a79d27c70 | [
"MIT"
] | null | null | null | lib/cforum/messages/read_messages.ex | campingrider/cforum_ex | cf27684c47d6dc26c9c37a946f1c729a79d27c70 | [
"MIT"
] | null | null | null | lib/cforum/messages/read_messages.ex | campingrider/cforum_ex | cf27684c47d6dc26c9c37a946f1c729a79d27c70 | [
"MIT"
] | null | null | null | defmodule Cforum.Messages.ReadMessages do
use Appsignal.Instrumentation.Decorators
import Ecto.Query, warn: false
alias Cforum.Repo
alias Cforum.Messages.Message
alias Cforum.Messages.ReadMessage
alias Cforum.Threads.InvisibleThread
@doc """
Marks a single message or list of messages as read
## Pa... | 29.195402 | 113 | 0.668504 |
081509c5f6724a82df0a1bd6ec1951ff8220d4a6 | 8,893 | ex | Elixir | lib/mix/lib/mix/project.ex | guilleiguaran/elixir | 952052869ff7af0e293d2a7160b1aebc68fc46be | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/project.ex | guilleiguaran/elixir | 952052869ff7af0e293d2a7160b1aebc68fc46be | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/project.ex | guilleiguaran/elixir | 952052869ff7af0e293d2a7160b1aebc68fc46be | [
"Apache-2.0"
] | null | null | null | defmodule Mix.Project do
@moduledoc """
A module that provides conveniences for defining and working
with projects.
In order to configure Mix, a developer needs to use
`Mix.Project` in a module and define a function named
`project` that returns a keyword list with configuration.
defmodule MyApp do
... | 24.910364 | 91 | 0.646688 |
08150c63eeeb9795ee9d16a92446a1482e126ff5 | 3,062 | exs | Elixir | test/protobuf/protoc/cli_test.exs | matehat/protobuf-elixir | 3f27218842979037c31f355488e5c3350f641b41 | [
"MIT"
] | null | null | null | test/protobuf/protoc/cli_test.exs | matehat/protobuf-elixir | 3f27218842979037c31f355488e5c3350f641b41 | [
"MIT"
] | 3 | 2019-09-19T14:52:12.000Z | 2019-09-24T15:45:07.000Z | test/protobuf/protoc/cli_test.exs | demilletech/protobuf-elixir | 0e79aa7f8dbed615a1c917488b61a84728843bdd | [
"MIT"
] | null | null | null | defmodule Protobuf.Protoc.CLITest do
use ExUnit.Case, async: true
import Protobuf.Protoc.CLI
alias Protobuf.Protoc.Context
alias Google.Protobuf.FileDescriptorProto
alias Google.Protobuf.DescriptorProto
alias Google.Protobuf.EnumDescriptorProto
test "parse_params/2 parse plugins" do
ctx = %Context{... | 31.244898 | 94 | 0.586545 |
081514fdd3191c2367536f4796314b62559b9b01 | 1,504 | ex | Elixir | lib/gateway_web/presence/controller.ex | mmacai/reactive-interaction-gateway | edb9262c65b10a8a5dc21ebf326cf73638e97d36 | [
"Apache-2.0"
] | 1 | 2019-11-06T13:35:35.000Z | 2019-11-06T13:35:35.000Z | lib/gateway_web/presence/controller.ex | mmacai/reactive-interaction-gateway | edb9262c65b10a8a5dc21ebf326cf73638e97d36 | [
"Apache-2.0"
] | null | null | null | lib/gateway_web/presence/controller.ex | mmacai/reactive-interaction-gateway | edb9262c65b10a8a5dc21ebf326cf73638e97d36 | [
"Apache-2.0"
] | null | null | null | defmodule GatewayWeb.Presence.Controller do
@moduledoc """
HTTP-accessible API for client connections.
"""
use GatewayWeb, :controller
use Gateway.Config, [:session_role]
require Logger
alias GatewayWeb.Presence.Channel
alias GatewayWeb.Endpoint
alias Gateway.Blacklist
alias Gateway.Utils.Jwt
de... | 23.873016 | 108 | 0.652926 |
08151f9d24d713d4f1fdf9718674ab5e434208e7 | 974 | ex | Elixir | debian/postinst.ex | sharkwouter/vaporos-flatpak-manager | da1dce2a806fdb51aa9366408ace50c28fbc3ff6 | [
"MIT"
] | null | null | null | debian/postinst.ex | sharkwouter/vaporos-flatpak-manager | da1dce2a806fdb51aa9366408ace50c28fbc3ff6 | [
"MIT"
] | 21 | 2019-09-15T08:42:58.000Z | 2021-08-28T16:48:54.000Z | debian/postinst.ex | sharkwouter/vaporos-flatpak-manager | da1dce2a806fdb51aa9366408ace50c28fbc3ff6 | [
"MIT"
] | null | null | null | #!/bin/sh
# postinst script for vaporos-flatpak-manager
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour... | 24.35 | 71 | 0.643737 |
0815288c2b1336647990e4891caef0c107adc185 | 493 | exs | Elixir | test/helpers/query_test.exs | mahcloud/medium-sdk-elixir | dbdf3ec8bdd3e8224891444cfc64b331660c8933 | [
"MIT"
] | 26 | 2016-11-26T06:17:39.000Z | 2020-03-23T15:20:02.000Z | test/helpers/query_test.exs | mahcloud/medium-sdk-elixir | dbdf3ec8bdd3e8224891444cfc64b331660c8933 | [
"MIT"
] | 3 | 2017-03-09T18:44:15.000Z | 2020-01-03T15:10:36.000Z | test/helpers/query_test.exs | mahcloud/medium-sdk-elixir | dbdf3ec8bdd3e8224891444cfc64b331660c8933 | [
"MIT"
] | 3 | 2017-03-09T18:39:51.000Z | 2020-03-23T15:24:50.000Z | defmodule Medium.QueryTest do
use ExUnit.Case, async: true
alias Medium.Helpers.Query
test "delegates the encoding of simple structures to URI.encode_query/1" do
simple_query = %{one: 1, two: 2}
encoded_query = Query.encode(simple_query)
assert encoded_query == URI.encode_query(simple_query)
end
... | 24.65 | 77 | 0.711968 |
08152e468a2c6ff6e9ad59420a7c3fea90c66e33 | 2,432 | ex | Elixir | DL-5TM/DL-5TM.ex | johannesE/decentlab-decoders | c290ea1218de2c82d665fdc9f71f16682e12d917 | [
"MIT"
] | 1 | 2021-06-25T10:36:07.000Z | 2021-06-25T10:36:07.000Z | DL-5TM/DL-5TM.ex | johannesE/decentlab-decoders | c290ea1218de2c82d665fdc9f71f16682e12d917 | [
"MIT"
] | null | null | null | DL-5TM/DL-5TM.ex | johannesE/decentlab-decoders | c290ea1218de2c82d665fdc9f71f16682e12d917 | [
"MIT"
] | null | null | null |
# https://www.decentlab.com/support
defmodule DecentlabDecoder do
@protocol_version 2
defp sensor_defs do
[
%{
length: 2,
values: [
%{
:name => "Dielectric permittivity",
:convert => fn x -> Enum.at(x, 0) / 50 end,
:unit => nil
},
... | 26.434783 | 160 | 0.528783 |
0815329709dabe03a152c038cf54cf6c2077727c | 2,874 | exs | Elixir | exercises/concept/log-level/test/log_level_test.exs | herminiotorres/exercism-elixir | 0464a968f3e37680b2bf34868b889d6f8de5581e | [
"MIT"
] | 200 | 2019-12-12T13:50:59.000Z | 2022-02-20T22:38:42.000Z | exercises/concept/log-level/test/log_level_test.exs | herminiotorres/exercism-elixir | 0464a968f3e37680b2bf34868b889d6f8de5581e | [
"MIT"
] | 1,938 | 2019-12-12T08:07:10.000Z | 2021-01-29T12:56:13.000Z | exercises/concept/log-level/test/log_level_test.exs | herminiotorres/exercism-elixir | 0464a968f3e37680b2bf34868b889d6f8de5581e | [
"MIT"
] | 239 | 2019-12-12T14:09:08.000Z | 2022-03-18T00:04:07.000Z | defmodule LogLevelTest do
use ExUnit.Case
describe "LogLevel.to_label/1" do
# @tag :pending
test "level 0 has label trace only in a non-legacy app" do
assert LogLevel.to_label(0, false) == :trace
assert LogLevel.to_label(0, true) == :unknown
end
@tag :pending
test "level 1 has labe... | 28.176471 | 69 | 0.651009 |
081540759e4c988893867d74133c481e87a86f7d | 1,371 | ex | Elixir | talks-articles/frameworks/phoenix/book--programming-phoenix-ge-1.4/videologue/lib/videologue_web/controllers/auth.ex | abhishekkr/tutorials_as_code | f355dc62a5025b710ac6d4a6ac2f9610265fad54 | [
"MIT"
] | 37 | 2015-02-01T23:16:39.000Z | 2021-12-22T16:50:48.000Z | talks-articles/frameworks/phoenix/book--programming-phoenix-ge-1.4/videologue/lib/videologue_web/controllers/auth.ex | abhishekkr/tutorials_as_code | f355dc62a5025b710ac6d4a6ac2f9610265fad54 | [
"MIT"
] | 1 | 2017-03-02T04:55:48.000Z | 2018-01-14T10:51:11.000Z | talks-articles/frameworks/phoenix/book--programming-phoenix-ge-1.4/videologue/lib/videologue_web/controllers/auth.ex | abhishekkr/tutorials_as_code | f355dc62a5025b710ac6d4a6ac2f9610265fad54 | [
"MIT"
] | 15 | 2015-03-02T08:09:01.000Z | 2021-06-10T03:25:41.000Z | defmodule VideologueWeb.Auth do
import Plug.Conn
alias Videologue.Accounts
alias VideologueWeb.Router.Helpers, as: Routes
@token_salt Application.get_env(:videologue, :phoenix_token_salt)
def init(opts), do: opts
def call(conn, _opts), do: do_call(conn, conn.assigns[:current_user])
def do_call(conn, ni... | 31.159091 | 97 | 0.71116 |
081560d478c51678ab81afa52d190d5061f94fd3 | 3,219 | ex | Elixir | apps/nightcrawler/lib/nightcrawler/marvel/series.ex | ZucchiniZe/nightcrawler_elixir | be82b0e7c25f55c7d2c2d3aa2860371cb68aeeb6 | [
"MIT"
] | null | null | null | apps/nightcrawler/lib/nightcrawler/marvel/series.ex | ZucchiniZe/nightcrawler_elixir | be82b0e7c25f55c7d2c2d3aa2860371cb68aeeb6 | [
"MIT"
] | null | null | null | apps/nightcrawler/lib/nightcrawler/marvel/series.ex | ZucchiniZe/nightcrawler_elixir | be82b0e7c25f55c7d2c2d3aa2860371cb68aeeb6 | [
"MIT"
] | null | null | null | defmodule Nightcrawler.Marvel.Series do
@moduledoc false
@behaviour Nightcrawler.Marvel.Entity
use Ecto.Schema
import Ecto.Changeset
alias Nightcrawler.Parser
import Ecto.Query, only: [from: 2]
alias Nightcrawler.Marvel.Comic
schema "series" do
field(:title, :string)
field(:description, :strin... | 23.49635 | 95 | 0.58745 |
0815995d823eb1518ded315d00cc2a7cd707bda3 | 819 | exs | Elixir | apps/core/test/buffers/token_audit_test.exs | michaeljguarino/forge | 50ee583ecb4aad5dee4ef08fce29a8eaed1a0824 | [
"Apache-2.0"
] | 59 | 2021-09-16T19:29:39.000Z | 2022-03-31T20:44:24.000Z | apps/core/test/buffers/token_audit_test.exs | svilenkov/plural | ac6c6cc15ac4b66a3b5e32ed4a7bee4d46d1f026 | [
"Apache-2.0"
] | 111 | 2021-08-15T09:56:37.000Z | 2022-03-31T23:59:32.000Z | apps/core/test/buffers/token_audit_test.exs | svilenkov/plural | ac6c6cc15ac4b66a3b5e32ed4a7bee4d46d1f026 | [
"Apache-2.0"
] | 4 | 2021-12-13T09:43:01.000Z | 2022-03-29T18:08:44.000Z | defmodule Core.Buffers.TokenAuditTest do
use Core.SchemaCase, async: false
alias Core.Buffers.TokenAudit
describe "Core.Buffers.TokenAudit" do
test "it will collect token audits and aggregate conuts" do
tok = insert(:persisted_token)
now = Timex.now()
|> Timex.set(minute: 0, second: 0... | 28.241379 | 67 | 0.623932 |
0815ad3e0bfa5e7f232e433de95a2010f0366090 | 50,696 | ex | Elixir | clients/compute/lib/google_api/compute/v1/api/region_disks.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-10-01T09:20:41.000Z | 2021-10-01T09:20:41.000Z | clients/compute/lib/google_api/compute/v1/api/region_disks.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/api/region_disks.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.799607 | 1,174 | 0.621943 |
0815af8c4efb2a2c8e85cd808e18ffc88bcb97ae | 1,035 | exs | Elixir | config/config.exs | smpallen99/exsyslog | 64c7933d551f6a17cf042443f3ec79898aec59f2 | [
"MIT"
] | 2 | 2015-01-14T14:01:03.000Z | 2016-09-13T08:04:33.000Z | config/config.exs | smpallen99/exsyslog | 64c7933d551f6a17cf042443f3ec79898aec59f2 | [
"MIT"
] | null | null | null | config/config.exs | smpallen99/exsyslog | 64c7933d551f6a17cf042443f3ec79898aec59f2 | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application and
# its dependencies. It must return a keyword list containing the
# application name and have as value another keyword list with
# the application key-value pairs.
# Note this configuration is loaded before any dependency and is
# restricted to this projec... | 30.441176 | 67 | 0.720773 |
0815b19b0171f33deb76de7e628c7ab308ff2062 | 484 | ex | Elixir | lib/absinthe/language/null_value.ex | TheRealReal/absinthe | 6eae5bc36283e58f42d032b8afd90de3ad64f97b | [
"MIT"
] | 4,101 | 2016-03-02T03:49:20.000Z | 2022-03-31T05:46:01.000Z | lib/absinthe/language/null_value.ex | TheRealReal/absinthe | 6eae5bc36283e58f42d032b8afd90de3ad64f97b | [
"MIT"
] | 889 | 2016-03-02T16:06:59.000Z | 2022-03-31T20:24:12.000Z | lib/absinthe/language/null_value.ex | TheRealReal/absinthe | 6eae5bc36283e58f42d032b8afd90de3ad64f97b | [
"MIT"
] | 564 | 2016-03-02T07:49:59.000Z | 2022-03-06T14:40:59.000Z | defmodule Absinthe.Language.NullValue do
@moduledoc false
alias Absinthe.{Blueprint, Language}
defstruct [
:loc
]
@type t :: %__MODULE__{
loc: Language.loc_t()
}
defimpl Blueprint.Draft do
def convert(node, _doc) do
%Blueprint.Input.Null{
source_location: source_l... | 19.36 | 75 | 0.644628 |
0815bb894cc83fa320a788c81c1230390fa25254 | 567 | ex | Elixir | lib/postoffice_web/views/changeset_view.ex | IgorRodriguez/postoffice | 9012193e0780f2403bd3db90b8f6258656780fee | [
"Apache-2.0"
] | 15 | 2020-01-24T10:33:57.000Z | 2020-10-24T07:57:14.000Z | lib/postoffice_web/views/changeset_view.ex | IgorRodriguez/postoffice | 9012193e0780f2403bd3db90b8f6258656780fee | [
"Apache-2.0"
] | 24 | 2020-01-24T09:52:56.000Z | 2021-02-19T09:15:12.000Z | lib/postoffice_web/views/changeset_view.ex | IgorRodriguez/postoffice | 9012193e0780f2403bd3db90b8f6258656780fee | [
"Apache-2.0"
] | 5 | 2020-01-25T18:03:44.000Z | 2021-02-23T10:07:03.000Z | defmodule PostofficeWeb.ChangesetView do
use PostofficeWeb, :view
@doc """
Traverses and translates changeset errors.
See `Ecto.Changeset.traverse_errors/2` and
`PostofficeWeb.ErrorHelpers.translate_error/1` for more details.
"""
def translate_errors(changeset) do
Ecto.Changeset.traverse_errors(chan... | 28.35 | 66 | 0.742504 |
0815cafcf0ce8cf0822c852b0b9417ae163408fa | 3,257 | ex | Elixir | lib/fryse/content.ex | fryse/fryse | 56e25ff2dc3dad56593849af7e8786225b918934 | [
"MIT"
] | 7 | 2018-02-03T01:04:22.000Z | 2020-07-19T16:47:03.000Z | lib/fryse/content.ex | fryse/fryse | 56e25ff2dc3dad56593849af7e8786225b918934 | [
"MIT"
] | 3 | 2020-07-16T09:28:38.000Z | 2020-07-22T09:40:45.000Z | lib/fryse/content.ex | fryse/fryse | 56e25ff2dc3dad56593849af7e8786225b918934 | [
"MIT"
] | null | null | null | defmodule Fryse.Content do
@moduledoc false
alias Fryse.File
alias Fryse.Folder
alias Fryse.Sort
def find_page(path, %Fryse{} = fryse) when is_binary(path) do
pieces =
case String.starts_with?(path, "/") do
true -> path |> Path.split() |> Enum.drop(1)
false -> path |> Path.split()
... | 25.849206 | 89 | 0.629721 |
0815cb71d50687937824071677cf5975882239be | 2,148 | ex | Elixir | plugins/ucc_chat/lib/ucc_chat_web/views/admin_view.ex | josephkabraham/ucx_ucc | 0dbd9e3eb5940336b4870cff033482ceba5f6ee7 | [
"MIT"
] | null | null | null | plugins/ucc_chat/lib/ucc_chat_web/views/admin_view.ex | josephkabraham/ucx_ucc | 0dbd9e3eb5940336b4870cff033482ceba5f6ee7 | [
"MIT"
] | null | null | null | plugins/ucc_chat/lib/ucc_chat_web/views/admin_view.ex | josephkabraham/ucx_ucc | 0dbd9e3eb5940336b4870cff033482ceba5f6ee7 | [
"MIT"
] | null | null | null | defmodule UccChatWeb.AdminView do
use UccChatWeb, :view
import UccAdminWeb.View.Utils, warn: false
alias UcxUcc.Accounts
def room_type(0), do: ~g"Channel"
def room_type(1), do: ~g"Private Group"
def room_type(2), do: ~g"Direct Message"
def render_user_action_button(user, "admin") do
if Accounts.has... | 33.5625 | 125 | 0.662477 |
081647587e036d42379d795cbaf1521a984e7559 | 309 | ex | Elixir | archive/ivy/transaction.ex | naramore/ivy | 171c81a23e0657088c6c5156fb181f58313c03d7 | [
"MIT"
] | null | null | null | archive/ivy/transaction.ex | naramore/ivy | 171c81a23e0657088c6c5156fb181f58313c03d7 | [
"MIT"
] | null | null | null | archive/ivy/transaction.ex | naramore/ivy | 171c81a23e0657088c6c5156fb181f58313c03d7 | [
"MIT"
] | null | null | null | defmodule Ivy.Transaction do
alias Ivy.Datom
@enforce_keys [:t, :data]
defstruct [:t, :instant, :id, data: [], attributes: %{}]
@type t :: %__MODULE__{
t: non_neg_integer,
instant: DateTime.t,
id: Ivy.id,
data: [Datom.t],
attributes: %{optional(Ivy.ident) => Datom.value}
}
end
| 22.071429 | 58 | 0.618123 |
081648796dc3cc52a4c3c324ab970f2494893e44 | 512 | ex | Elixir | lib/ethereumex.ex | Boyuan-Chen/ethereumex | 8b269a0651e7904589c5f659a1426ff6b7fe2980 | [
"MIT"
] | 158 | 2018-11-05T23:45:47.000Z | 2022-03-21T18:58:31.000Z | lib/ethereumex.ex | hawku-com/ethereumex | 19a5cf1a4fcfd6c06aae3f97554c8a9af3f2d89b | [
"MIT"
] | 43 | 2018-11-02T18:45:50.000Z | 2022-02-28T09:09:46.000Z | lib/ethereumex.ex | hawku-com/ethereumex | 19a5cf1a4fcfd6c06aae3f97554c8a9af3f2d89b | [
"MIT"
] | 28 | 2018-11-13T16:33:31.000Z | 2022-03-31T17:49:11.000Z | defmodule Ethereumex do
@external_resource "README.md"
@moduledoc "README.md"
|> File.read!()
|> String.split("<!-- MDOC !-->")
|> Enum.fetch!(1)
use Application
import Supervisor.Spec, warn: false
alias Ethereumex.Config
alias Ethereumex.Counter
def start(_type, ... | 24.380952 | 64 | 0.642578 |
08164ed8030924969e7f9dc56c205c3f7e29cf57 | 2,784 | ex | Elixir | test/support/case_helper.ex | blakedietz/courtbot | b18d7eb84fd1405b359c8da980e1175bb1738841 | [
"ISC"
] | 6 | 2018-07-25T18:35:57.000Z | 2018-11-03T17:01:02.000Z | test/support/case_helper.ex | blakedietz/courtbot | b18d7eb84fd1405b359c8da980e1175bb1738841 | [
"ISC"
] | 19 | 2018-11-12T05:29:44.000Z | 2020-04-12T01:04:41.000Z | test/support/case_helper.ex | blakedietz/courtbot | b18d7eb84fd1405b359c8da980e1175bb1738841 | [
"ISC"
] | 1 | 2020-04-12T00:36:50.000Z | 2020-04-12T00:36:50.000Z | ExUnit.start()
defmodule CourtbotTest.Helper.Case do
@moduledoc false
use ExUnit.CaseTemplate
alias Courtbot.Case
using do
quote do
import CourtbotTest.Helper.Case.Conversation
import CourtbotWeb.Router.Helpers
use CourtbotWeb.ConnCase, async: true
# The default endpoint for test... | 26.018692 | 103 | 0.613865 |
0816620a85fa4722a73639704e9dddeab5b55ffa | 718 | ex | Elixir | lib/fancy_chat_web/gettext.ex | LKlemens/fancy_chat | 15ecd005a9b4cc8e3bb5548a942069896811d234 | [
"MIT"
] | 1 | 2020-07-27T14:33:02.000Z | 2020-07-27T14:33:02.000Z | lib/fancy_chat_web/gettext.ex | LKlemens/fancy_chat | 15ecd005a9b4cc8e3bb5548a942069896811d234 | [
"MIT"
] | null | null | null | lib/fancy_chat_web/gettext.ex | LKlemens/fancy_chat | 15ecd005a9b4cc8e3bb5548a942069896811d234 | [
"MIT"
] | null | null | null | defmodule FancyChatWeb.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 FancyChatWeb.Gettext
# Simple translation
gettext("Here ... | 28.72 | 72 | 0.681058 |
0817136ac5197d976374c963da523ab28b0d1c84 | 7,615 | ex | Elixir | lib/challenge_gov/message_context_statuses.ex | jennstein2017/Challenge_gov | e0820df8b124a32ff8b78cb827ae43551492988b | [
"CC0-1.0"
] | 9 | 2020-02-26T20:24:38.000Z | 2022-03-22T21:14:52.000Z | lib/challenge_gov/message_context_statuses.ex | jennstein2017/Challenge_gov | e0820df8b124a32ff8b78cb827ae43551492988b | [
"CC0-1.0"
] | 15 | 2020-04-22T19:33:24.000Z | 2022-03-26T15:11:17.000Z | lib/challenge_gov/message_context_statuses.ex | jennstein2017/Challenge_gov | e0820df8b124a32ff8b78cb827ae43551492988b | [
"CC0-1.0"
] | 4 | 2020-04-27T22:58:57.000Z | 2022-01-14T13:42:09.000Z | defmodule ChallengeGov.MessageContextStatuses do
@moduledoc """
Context for MessageContextStatuses
"""
@behaviour Stein.Filter
import Ecto.Query
alias Ecto.Multi
alias ChallengeGov.Repo
alias ChallengeGov.Accounts
alias ChallengeGov.Challenges
alias ChallengeGov.Challenges.Challenge
alias Chall... | 27.293907 | 96 | 0.673539 |
0817473ddd6b3451285abc0f9a6ec3737e516867 | 1,834 | ex | Elixir | clients/pub_sub/lib/google_api/pub_sub/v1/model/expiration_policy.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/pub_sub/lib/google_api/pub_sub/v1/model/expiration_policy.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/pub_sub/lib/google_api/pub_sub/v1/model/expiration_policy.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 ... | 34.603774 | 122 | 0.731734 |
081763334492edbdb082739e703c920f00b8f5d8 | 1,002 | ex | Elixir | lib/changelog/files/logo.ex | gustavoarmoa/changelog.com | e898a9979a237ae66962714821ed8633a4966f37 | [
"MIT"
] | null | null | null | lib/changelog/files/logo.ex | gustavoarmoa/changelog.com | e898a9979a237ae66962714821ed8633a4966f37 | [
"MIT"
] | null | null | null | lib/changelog/files/logo.ex | gustavoarmoa/changelog.com | e898a9979a237ae66962714821ed8633a4966f37 | [
"MIT"
] | null | null | null | defmodule Changelog.Files.Logo do
defmacro __using__(prefix) do
quote do
use Changelog.File, [:jpg, :jpeg, :png, :svg]
@versions [:original, :large, :medium, :small]
def storage_dir(_, {_, scope}), do: "uploads/logos/#{hashed(scope.id)}"
def filename(version, _), do: "#{unquote(prefix)}_... | 25.692308 | 79 | 0.643713 |
0817ab793eeba428873683bbd8bbaa51b13f98ab | 196 | ex | Elixir | lib/trakki.ex | agschaid/trakki | 28cc4a1bda70c1136089f033eb38220ab557f14c | [
"MIT"
] | null | null | null | lib/trakki.ex | agschaid/trakki | 28cc4a1bda70c1136089f033eb38220ab557f14c | [
"MIT"
] | null | null | null | lib/trakki.ex | agschaid/trakki | 28cc4a1bda70c1136089f033eb38220ab557f14c | [
"MIT"
] | null | null | null | defmodule Trakki do
@moduledoc """
Documentation for Trakki.
"""
@doc """
Hello world.
## Examples
iex> Trakki.hello()
:world
"""
def hello do
:world
end
end
| 10.315789 | 27 | 0.556122 |
0817b7681cf79b9f399bef27916444b0b398bd0c | 575 | ex | Elixir | lib/remote_retro_web/channels/retro_management_handlers.ex | codyduval/remote_retro_crd | b3a4adda7503b4e1ca5ec135cd34e1e71ec8d247 | [
"MIT"
] | null | null | null | lib/remote_retro_web/channels/retro_management_handlers.ex | codyduval/remote_retro_crd | b3a4adda7503b4e1ca5ec135cd34e1e71ec8d247 | [
"MIT"
] | null | null | null | lib/remote_retro_web/channels/retro_management_handlers.ex | codyduval/remote_retro_crd | b3a4adda7503b4e1ca5ec135cd34e1e71ec8d247 | [
"MIT"
] | null | null | null | defmodule RemoteRetroWeb.RetroManagementHandlers do
import Phoenix.Channel
alias RemoteRetro.{Repo}
alias RemoteRetroWeb.{RetroManagement}
def handle_in("retro_edited" = message, payload, socket) do
{reply_atom, _} = atomic_update_and_broadcast(message, payload, socket)
{:reply, reply_atom, socket}
... | 26.136364 | 75 | 0.728696 |
0817caa165bf0b1a798fd3e3f07049be7d97952b | 3,322 | ex | Elixir | lib/tabular/test_support.ex | sparta-developers/tabular | 39c4a97c6378efa274c351dc435afd4bc011c616 | [
"BlueOak-1.0.0"
] | null | null | null | lib/tabular/test_support.ex | sparta-developers/tabular | 39c4a97c6378efa274c351dc435afd4bc011c616 | [
"BlueOak-1.0.0"
] | null | null | null | lib/tabular/test_support.ex | sparta-developers/tabular | 39c4a97c6378efa274c351dc435afd4bc011c616 | [
"BlueOak-1.0.0"
] | null | null | null | defmodule Tabular.TestSupport do
@moduledoc """
Functions to simplify testing with ascii tables.
`compare/2` compares two ascii tables, producing a
matrix of the individual comparisons. `equal?/1`
examines the matrix generated by `compare/2` and
returns true if all cells are true and false
otherwise.
"... | 27.00813 | 96 | 0.528597 |
0817e9fc153819eaba210cd69b41530b1d9e456a | 2,075 | ex | Elixir | test/fixtures/good_handler.ex | NFIBrokerage/beeline | 8280a351a8c36634ced9088f90fe8103b47d685b | [
"Apache-2.0"
] | null | null | null | test/fixtures/good_handler.ex | NFIBrokerage/beeline | 8280a351a8c36634ced9088f90fe8103b47d685b | [
"Apache-2.0"
] | null | null | null | test/fixtures/good_handler.ex | NFIBrokerage/beeline | 8280a351a8c36634ced9088f90fe8103b47d685b | [
"Apache-2.0"
] | null | null | null | defmodule Beeline.Fixtures.GoodHandler do
@moduledoc """
A good-example fixture which sets up a handler that subscribes to two
different versions of EventStoreDB
Note that this handler stores stream positions in GenStage state which
is not a good strategy for an actual process-manager or read-model.
Ideall... | 28.040541 | 75 | 0.670843 |
0817f0c3d86478d0bbf30acddf774f62f99022c4 | 1,193 | ex | Elixir | lib/monocle/options.ex | brianbroderick/monocle | eeabecea658468479c04a02352271f6304447736 | [
"Apache-2.0"
] | 2 | 2018-02-11T01:18:24.000Z | 2020-01-12T17:19:22.000Z | lib/monocle/options.ex | brianbroderick/monocle | eeabecea658468479c04a02352271f6304447736 | [
"Apache-2.0"
] | null | null | null | lib/monocle/options.ex | brianbroderick/monocle | eeabecea658468479c04a02352271f6304447736 | [
"Apache-2.0"
] | null | null | null | defmodule Monocle.Options do
@type t :: %__MODULE__{}
# What we use to render
defstruct renderer: Monocle.HtmlRenderer,
# Inline style options
gfm: true, breaks: false, pedantic: false,
smartypants: true, sanitize: false,
footnotes: false, footnote_offset: 1,... | 30.589744 | 79 | 0.58005 |
08180a6a30a9796acd6a981ced6139c1ef4ed018 | 1,596 | ex | Elixir | web/controllers/registration_controller.ex | timrourke/colorstorm-api | fee60a52701a4f773fcd2c8c5c70a472d0d52f09 | [
"MIT"
] | null | null | null | web/controllers/registration_controller.ex | timrourke/colorstorm-api | fee60a52701a4f773fcd2c8c5c70a472d0d52f09 | [
"MIT"
] | null | null | null | web/controllers/registration_controller.ex | timrourke/colorstorm-api | fee60a52701a4f773fcd2c8c5c70a472d0d52f09 | [
"MIT"
] | null | null | null | defmodule Colorstorm.RegistrationController do
use Colorstorm.Web, :controller
import Ecto.Query, only: [from: 2]
alias Colorstorm.User
alias Colorstorm.Redis
alias JaSerializer.Params
require Logger
plug :scrub_params, "data" when action in [:create]
plug :put_view, Colorstorm.RegistrationView
def ... | 28.5 | 93 | 0.649749 |
08180b2998d69c97d02f0acf646000c36b8596d1 | 831 | ex | Elixir | server/lib/blogsley_web/helpers/auth_helper.ex | blogsley/blogsley-absinthe | 7266f80a0638f8c30c37b37296ba5d78dcf8fb8b | [
"MIT"
] | 3 | 2020-01-23T06:37:18.000Z | 2020-12-05T08:31:00.000Z | server/lib/blogsley_web/helpers/auth_helper.ex | blogsley/blogsley-absinthe | 7266f80a0638f8c30c37b37296ba5d78dcf8fb8b | [
"MIT"
] | 16 | 2020-04-04T05:13:52.000Z | 2022-03-31T11:19:20.000Z | server/lib/blogsley_web/helpers/auth_helper.ex | blogsley/blogsley | 7266f80a0638f8c30c37b37296ba5d78dcf8fb8b | [
"MIT"
] | null | null | null | defmodule Blogsley.AuthHelper do
@moduledoc false
#import Comeonin.Bcrypt, only: [checkpw: 2]
alias Blogsley.Repo
alias Blogsley.Accounts.User
def login_with_username_pass(username, given_pass) do
user = Repo.get_by(User, username: username)
cond do
user && Bcrypt.verify_pass(given_pass, user... | 21.868421 | 67 | 0.632972 |
08180fba5d809af29a1562ff6d0297cbd6e4a8c4 | 2,206 | exs | Elixir | test/raxx/request_test.exs | varnerac/raxx | 0ca9b87cb2b10ca8b0eecaa86f10a9628da8fd93 | [
"Apache-2.0"
] | 401 | 2016-06-13T13:40:53.000Z | 2022-03-29T17:18:50.000Z | test/raxx/request_test.exs | varnerac/raxx | 0ca9b87cb2b10ca8b0eecaa86f10a9628da8fd93 | [
"Apache-2.0"
] | 148 | 2016-06-11T09:59:43.000Z | 2021-03-20T11:28:19.000Z | test/raxx/request_test.exs | varnerac/raxx | 0ca9b87cb2b10ca8b0eecaa86f10a9628da8fd93 | [
"Apache-2.0"
] | 31 | 2017-02-23T14:06:29.000Z | 2021-03-22T06:06:53.000Z | defmodule Raxx.RequestTest do
use ExUnit.Case
alias Raxx.Request
describe "uri/1" do
test "handles a basic https case correctly" do
request = Raxx.request(:GET, "https://example.com/")
uri = Request.uri(request)
assert %URI{
authority: "example.com",
fragment:... | 28.649351 | 105 | 0.552584 |
081816b69989dd81d7812685cb79abd70ce5581d | 141 | exs | Elixir | test/test_helper.exs | Raulkumar/bamboo | 0fcff1bf61e595eb821bc691ed9370b6a092afbf | [
"MIT"
] | 1,845 | 2016-03-29T23:36:36.000Z | 2022-03-31T19:23:38.000Z | test/test_helper.exs | Raulkumar/bamboo | 0fcff1bf61e595eb821bc691ed9370b6a092afbf | [
"MIT"
] | 407 | 2016-03-29T14:55:19.000Z | 2022-02-02T13:53:50.000Z | test/test_helper.exs | Raulkumar/bamboo | 0fcff1bf61e595eb821bc691ed9370b6a092afbf | [
"MIT"
] | 361 | 2016-03-31T13:33:22.000Z | 2022-02-25T12:38:43.000Z | ExUnit.start()
Application.ensure_all_started(:phoenix)
Application.ensure_all_started(:cowboy)
Application.ensure_all_started(:ex_machina)
| 23.5 | 43 | 0.858156 |
08181e98e63cfb34ead6c7de09c5720a398bdcaa | 4,282 | exs | Elixir | test/test_helper.exs | harlantwood/credo | 4569c9c8cfcf74a2074d6911541da0265e52ae99 | [
"MIT"
] | null | null | null | test/test_helper.exs | harlantwood/credo | 4569c9c8cfcf74a2074d6911541da0265e52ae99 | [
"MIT"
] | null | null | null | test/test_helper.exs | harlantwood/credo | 4569c9c8cfcf74a2074d6911541da0265e52ae99 | [
"MIT"
] | null | null | null | Code.require_file("support/test_application.exs", __DIR__)
Credo.Test.Application.start([], [])
ExUnit.start()
check_version =
~w()
|> Enum.reduce([], fn version, acc ->
# allow -dev versions so we can test before the Elixir release.
if System.version() |> Version.match?("< #{version}-dev") do
acc ... | 25.795181 | 93 | 0.686362 |
0818270fecbc74bffaaa971aaddb55fb5102ec0f | 676 | exs | Elixir | src/test/inmana_web/controllers/restaurants_controller_test.exs | igormaraujo/inmana-NLW5-elixir | 819209fd6af6556d941b4a142d8d614b2a05d585 | [
"MIT"
] | null | null | null | src/test/inmana_web/controllers/restaurants_controller_test.exs | igormaraujo/inmana-NLW5-elixir | 819209fd6af6556d941b4a142d8d614b2a05d585 | [
"MIT"
] | null | null | null | src/test/inmana_web/controllers/restaurants_controller_test.exs | igormaraujo/inmana-NLW5-elixir | 819209fd6af6556d941b4a142d8d614b2a05d585 | [
"MIT"
] | null | null | null | defmodule InmanaWeb.RestaurantsControllerTest do
use InmanaWeb.ConnCase, async: true
describe "create/2" do
test "when all params are valid, creates the user", %{conn: conn} do
params = %{name: "Restaurant 01", email: "restaurant01@mail.com"}
response =
conn
|> post(Routes.restaura... | 28.166667 | 72 | 0.535503 |
081830787f1c169895539c8e58b3e3a3ee3bb16e | 717 | ex | Elixir | lib/runosaari_web/gettext.ex | codevictory/runosaari.net | 2462409ccf49987fa562b0ae189247c1fe6f1ccc | [
"MIT"
] | 1 | 2021-11-02T07:43:13.000Z | 2021-11-02T07:43:13.000Z | lib/runosaari_web/gettext.ex | codevictory/runosaari.net | 2462409ccf49987fa562b0ae189247c1fe6f1ccc | [
"MIT"
] | null | null | null | lib/runosaari_web/gettext.ex | codevictory/runosaari.net | 2462409ccf49987fa562b0ae189247c1fe6f1ccc | [
"MIT"
] | 1 | 2021-05-19T18:43:09.000Z | 2021-05-19T18:43:09.000Z | defmodule RunosaariWeb.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 RunosaariWeb.Gettext
# Simple translation
gettext("Here ... | 28.68 | 72 | 0.680614 |
08184016e5031e012216315a9725582d669f6a73 | 353 | exs | Elixir | priv/repo/seeds.exs | Jesterovskiy/geo-tasks | 65fbfdc3d1604084aa288fefba9c548e087a387e | [
"MIT"
] | null | null | null | priv/repo/seeds.exs | Jesterovskiy/geo-tasks | 65fbfdc3d1604084aa288fefba9c548e087a387e | [
"MIT"
] | null | null | null | priv/repo/seeds.exs | Jesterovskiy/geo-tasks | 65fbfdc3d1604084aa288fefba9c548e087a387e | [
"MIT"
] | null | null | null | # Script for populating the database. You can run it as:
#
# mix run priv/repo/seeds.exs
#
# Inside the script, you can read and write to any of your
# repositories directly:
#
# GeoTasks.Repo.insert!(%GeoTasks.SomeSchema{})
#
# We recommend using the bang functions (`insert!`, `update!`
# and so on) as they wi... | 29.416667 | 61 | 0.708215 |
0818a5a702161a9f60ca44f77e03a5b4512c6c02 | 2,344 | exs | Elixir | test/ecto/sql_dust_test.exs | rodrigo-dap/sql_dust | 8fc06bbdb103bd013509b3f5baf071c4584f0775 | [
"MIT",
"Unlicense"
] | 66 | 2016-02-04T21:31:43.000Z | 2016-03-14T19:41:26.000Z | test/ecto/sql_dust_test.exs | rodrigo-dap/sql_dust | 8fc06bbdb103bd013509b3f5baf071c4584f0775 | [
"MIT",
"Unlicense"
] | 11 | 2016-03-22T11:17:43.000Z | 2018-04-03T07:30:10.000Z | test/ecto/sql_dust_test.exs | rodrigo-dap/sql_dust | 8fc06bbdb103bd013509b3f5baf071c4584f0775 | [
"MIT",
"Unlicense"
] | 17 | 2016-05-09T16:42:14.000Z | 2021-09-21T22:30:23.000Z | defmodule Test do
defmodule Weather do
use Ecto.Schema
schema "weather" do
belongs_to :city, Test.City
end
end
defmodule City do
use Ecto.Schema
schema "cities" do
has_many :local_weather, Test.Weather
belongs_to :country, Test.Country
end
end
defmodule Country do
... | 25.478261 | 87 | 0.584898 |
0818b654cd97eae34c319fe7ef2f86563c9ea89d | 621 | ex | Elixir | lib/radiator/constants.ex | djschilling/radiator | 382e22904d7e400a8ffba54e9ddfd2845bc2b623 | [
"MIT"
] | null | null | null | lib/radiator/constants.ex | djschilling/radiator | 382e22904d7e400a8ffba54e9ddfd2845bc2b623 | [
"MIT"
] | null | null | null | lib/radiator/constants.ex | djschilling/radiator | 382e22904d7e400a8ffba54e9ddfd2845bc2b623 | [
"MIT"
] | null | null | null | defmodule Radiator.Constants do
@moduledoc false
defmacro __using__(_) do
quote do
@otp_app Mix.Project.config()[:app]
@permission_values [:readonly, :edit, :manage, :own]
@auth_user_status_values [:unverified, :active, :suspended]
@not_authorized_match {:error, :not_authorized}
... | 28.227273 | 67 | 0.700483 |
0818db61a1037045c1514921af879838278df74c | 55 | ex | Elixir | lib/rps_web/views/layout_view.ex | cabol/rps | 813028c4b7bb18f8c7cbcf4422249a81ccb9f059 | [
"MIT"
] | 3 | 2018-05-28T15:10:11.000Z | 2020-08-02T21:14:25.000Z | lib/rps_web/views/layout_view.ex | cabol/rps | 813028c4b7bb18f8c7cbcf4422249a81ccb9f059 | [
"MIT"
] | null | null | null | lib/rps_web/views/layout_view.ex | cabol/rps | 813028c4b7bb18f8c7cbcf4422249a81ccb9f059 | [
"MIT"
] | null | null | null | defmodule RpsWeb.LayoutView do
use RpsWeb, :view
end
| 13.75 | 30 | 0.781818 |
0818ebc541beb6535ab123f6fb80d47cd31aa5d8 | 1,147 | exs | Elixir | clients/you_tube_analytics/config/config.exs | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/you_tube_analytics/config/config.exs | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/you_tube_analytics/config/config.exs | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | 1 | 2020-11-10T16:58:27.000Z | 2020-11-10T16:58:27.000Z | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the paren... | 37 | 73 | 0.757629 |
0818f561926df6ea395a00fc2515e660f9237f96 | 5,319 | exs | Elixir | apps/omg_child_chain/test/omg_child_chain/release_tasks/set_fee_feed_adapter_opts_test.exs | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | null | null | null | apps/omg_child_chain/test/omg_child_chain/release_tasks/set_fee_feed_adapter_opts_test.exs | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | null | null | null | apps/omg_child_chain/test/omg_child_chain/release_tasks/set_fee_feed_adapter_opts_test.exs | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019-2020 OmiseGO Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 43.598361 | 118 | 0.740929 |
081918b0c681ebbbef68bf6c61a2ca56c08d1122 | 2,757 | ex | Elixir | lib/nostrum/shard/supervisor.ex | mckethanor/nostrum | 13a3927c872c1540266e9f1ba4bcad4182baa9bf | [
"MIT"
] | null | null | null | lib/nostrum/shard/supervisor.ex | mckethanor/nostrum | 13a3927c872c1540266e9f1ba4bcad4182baa9bf | [
"MIT"
] | null | null | null | lib/nostrum/shard/supervisor.ex | mckethanor/nostrum | 13a3927c872c1540266e9f1ba4bcad4182baa9bf | [
"MIT"
] | 1 | 2021-09-13T20:59:42.000Z | 2021-09-13T20:59:42.000Z | defmodule Nostrum.Shard.Supervisor do
@moduledoc false
use Supervisor
alias Nostrum.Cache.Mapping.GuildShard
alias Nostrum.Error.CacheError
alias Nostrum.Shard
alias Nostrum.Shard.Session
alias Nostrum.Shard.Stage.{Cache, Producer}
alias Nostrum.Util
require Logger
def start_link(_args) do
{... | 28.71875 | 100 | 0.630758 |
08192e9925ef9c8f85c1838181aba7ecee45fb64 | 1,611 | ex | Elixir | apps/raptor/lib/raptor/schemas/user_org_assoc.ex | smartcitiesdata/smartcitiesdata | c926c25003a8ee2d09b933c521c49f674841c0b6 | [
"Apache-2.0"
] | 26 | 2019-09-20T23:54:45.000Z | 2020-08-20T14:23:32.000Z | apps/raptor/lib/raptor/schemas/user_org_assoc.ex | smartcitiesdata/smartcitiesdata | c926c25003a8ee2d09b933c521c49f674841c0b6 | [
"Apache-2.0"
] | 757 | 2019-08-15T18:15:07.000Z | 2020-09-18T20:55:31.000Z | apps/raptor/lib/raptor/schemas/user_org_assoc.ex | smartcitiesdata/smartcitiesdata | c926c25003a8ee2d09b933c521c49f674841c0b6 | [
"Apache-2.0"
] | 9 | 2019-11-12T16:43:46.000Z | 2020-03-25T16:23:16.000Z | defmodule Raptor.Schemas.UserOrgAssoc do
@moduledoc """
This module defines the structure for a user organization association
"""
@derive Jason.Encoder
@type t :: %__MODULE__{
user_id: String.t(),
org_id: String.t(),
email: String.t()
}
defstruct [
:user_id,
... | 25.571429 | 83 | 0.657976 |
08194809ebfec02ca72e6c2cad9cafe9e8563fe5 | 2,614 | ex | Elixir | lib/rfx_cli/main.ex | andyl/rfxi | 9007c75693d643555c45a20e9634dd4b3867deba | [
"MIT"
] | 1 | 2021-08-10T14:46:10.000Z | 2021-08-10T14:46:10.000Z | lib/rfx_cli/main.ex | andyl/rfxi | 9007c75693d643555c45a20e9634dd4b3867deba | [
"MIT"
] | 2 | 2021-06-22T14:12:37.000Z | 2021-06-28T05:06:23.000Z | lib/rfx_cli/main.ex | andyl/rfxi | 9007c75693d643555c45a20e9634dd4b3867deba | [
"MIT"
] | null | null | null | defmodule RfxCli.Main do
# READING FROM STDIO
# defp get_stdin do
# case IO.read(:stdio, :line) do
# :eof -> ""
# {:error, _} -> ""
# data -> data
# end
# end
@moduledoc """
Main CLI module.
"""
alias RfxCli.Main
alias RfxCli.State
alias RfxCli.Main
def main(argv), do... | 18.408451 | 72 | 0.607116 |
08194aa64a3d5e76141f358d27f4fa34d028ab9b | 1,877 | ex | Elixir | lib/fun_land/traversable.ex | gerbal/elixir_fun_land | 86adc20dc6af8c7c84d39dffd92195c3e9571009 | [
"MIT"
] | null | null | null | lib/fun_land/traversable.ex | gerbal/elixir_fun_land | 86adc20dc6af8c7c84d39dffd92195c3e9571009 | [
"MIT"
] | null | null | null | lib/fun_land/traversable.ex | gerbal/elixir_fun_land | 86adc20dc6af8c7c84d39dffd92195c3e9571009 | [
"MIT"
] | null | null | null | defmodule FunLand.Traversable do
@moduledoc """
WARNING: This module is not completely stable yet,
and should therefore
not be used in practice yet.
"""
@type traversable(_) :: FunLand.adt
@callback traverse(traversable(a), module(), (a -> FunLand.Applicative.applicative(b))) :: FunLand.Applicative.app... | 34.127273 | 160 | 0.741609 |
0819549e00b3890535d67afaf39aa094f2b076cd | 659 | ex | Elixir | lib/pigeon/tasks.ex | VoiSmart/pigeon | 54735f869dd5500991dfa0b13dc71ca2191cd0ff | [
"MIT"
] | 545 | 2015-09-06T15:50:32.000Z | 2022-03-21T08:21:11.000Z | lib/pigeon/tasks.ex | VoiSmart/pigeon | 54735f869dd5500991dfa0b13dc71ca2191cd0ff | [
"MIT"
] | 178 | 2016-01-14T22:21:20.000Z | 2022-02-18T22:34:30.000Z | lib/pigeon/tasks.ex | VoiSmart/pigeon | 54735f869dd5500991dfa0b13dc71ca2191cd0ff | [
"MIT"
] | 124 | 2016-01-17T11:30:16.000Z | 2022-02-28T16:59:41.000Z | defmodule Pigeon.Tasks do
@moduledoc false
def process_on_response(%{__meta__: %{on_response: nil}}), do: :ok
def process_on_response(%{__meta__: %{on_response: {m, f}}} = notif) do
Task.Supervisor.start_child(Pigeon.Tasks, fn ->
:erlang.apply(m, f, [notif])
end)
end
def process_on_response(%... | 28.652174 | 76 | 0.660091 |
08195eb30f3569e740dc135c70cffc67406bf2ce | 2,570 | ex | Elixir | lib/real_world/account.ex | mihkelal/mihkels-elixir-phoenix-realworld-example-app | f241093522b394c816e7bab8ccf5f18fdd854ac6 | [
"MIT"
] | null | null | null | lib/real_world/account.ex | mihkelal/mihkels-elixir-phoenix-realworld-example-app | f241093522b394c816e7bab8ccf5f18fdd854ac6 | [
"MIT"
] | 4 | 2021-03-23T19:01:21.000Z | 2021-03-30T18:27:24.000Z | lib/real_world/account.ex | mihkelal/mihkels-elixir-phoenix-realworld-example-app | f241093522b394c816e7bab8ccf5f18fdd854ac6 | [
"MIT"
] | null | null | null | defmodule RealWorld.Account do
@moduledoc """
The Account context.
"""
import Ecto.Query, warn: false
alias RealWorld.Repo
alias RealWorld.Account.{Following, User}
@doc """
Returns the list of users.
## Examples
iex> list_users()
[%User{}, ...]
"""
def list_users do
Repo.all... | 20.725806 | 82 | 0.607393 |
08196fc2b73e8e5ed7b4a6d923e45752f7e6fb61 | 6,548 | ex | Elixir | lib/b2_client/backend/memory.ex | jgelens/b2_client | 568d33921b841ff6f363ab19bf79e13541e07557 | [
"MIT"
] | 12 | 2016-06-12T06:56:36.000Z | 2021-12-09T21:58:25.000Z | lib/b2_client/backend/memory.ex | jgelens/b2_client | 568d33921b841ff6f363ab19bf79e13541e07557 | [
"MIT"
] | 9 | 2016-07-18T14:16:07.000Z | 2021-12-05T02:07:57.000Z | lib/b2_client/backend/memory.ex | jgelens/b2_client | 568d33921b841ff6f363ab19bf79e13541e07557 | [
"MIT"
] | 12 | 2016-07-18T14:05:48.000Z | 2021-12-06T22:00:04.000Z | defmodule B2Client.Backend.Memory do
@moduledoc """
A mock to store test data.
"""
use GenServer
alias B2Client.{Authorization, Bucket, File, UploadAuthorization}
@behaviour B2Client.Backend
def start_link do
GenServer.start_link(__MODULE__, :ok, name: __MODULE__)
end
@doc """
Resets the ba... | 25.881423 | 103 | 0.61744 |
0819785cd1285521cfdfe279306ec6ef491c374d | 2,007 | ex | Elixir | clients/domains/lib/google_api/domains/v1beta1/model/configure_management_settings_request.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/domains/lib/google_api/domains/v1beta1/model/configure_management_settings_request.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/domains/lib/google_api/domains/v1beta1/model/configure_management_settings_request.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 40.14 | 254 | 0.758346 |
081989342fa0ae9e693c636b8f6eb11084463784 | 421 | exs | Elixir | priv/repo/migrations/20181228232731_create_craigslist_results_table.exs | ChristopherJHart/disclist | 3a1ce880856ad87f588e902e72004b887064eeb8 | [
"Apache-2.0"
] | 1 | 2021-11-18T03:25:47.000Z | 2021-11-18T03:25:47.000Z | priv/repo/migrations/20181228232731_create_craigslist_results_table.exs | ChristopherJHart/disclist | 3a1ce880856ad87f588e902e72004b887064eeb8 | [
"Apache-2.0"
] | null | null | null | priv/repo/migrations/20181228232731_create_craigslist_results_table.exs | ChristopherJHart/disclist | 3a1ce880856ad87f588e902e72004b887064eeb8 | [
"Apache-2.0"
] | 1 | 2021-11-18T03:25:48.000Z | 2021-11-18T03:25:48.000Z | defmodule Disclist.Repo.Migrations.CreateCraigslistResultsTable do
use Ecto.Migration
def change do
create table("craigslist_results") do
add :data_id, :bigint
add :datetime, :naive_datetime
add :price, :float
add :title, :text
add :url, :string
add :postingbody, :text
... | 24.764706 | 66 | 0.662708 |
0819893b5cb9fc469436fddd3b8f88894483bf45 | 11,341 | ex | Elixir | lib/phoenix/tracker.ex | Goose97/phoenix_pubsub | 35e7c54a6f32babea1638f6c5b74575a66a2fe6f | [
"MIT"
] | 524 | 2016-01-22T23:51:56.000Z | 2022-03-26T00:33:43.000Z | lib/phoenix/tracker.ex | Goose97/phoenix_pubsub | 35e7c54a6f32babea1638f6c5b74575a66a2fe6f | [
"MIT"
] | 136 | 2016-01-22T01:51:57.000Z | 2022-03-23T11:13:56.000Z | lib/phoenix/tracker.ex | Goose97/phoenix_pubsub | 35e7c54a6f32babea1638f6c5b74575a66a2fe6f | [
"MIT"
] | 132 | 2016-01-21T21:20:12.000Z | 2022-03-22T09:33:12.000Z | defmodule Phoenix.Tracker do
@moduledoc ~S"""
Provides distributed presence tracking to processes.
Tracker shards use a heartbeat protocol and CRDT to replicate presence
information across a cluster in an eventually consistent, conflict-free
manner. Under this design, there is no single source of truth or gl... | 35.330218 | 119 | 0.661053 |
08198f9c97049baa546031cbcb77c66960be7679 | 417 | ex | Elixir | web/views/admin/person_view.ex | soleo/changelog.com | 621c7471b23379e1cdd4a0c960b66ed98d8d1a53 | [
"MIT"
] | null | null | null | web/views/admin/person_view.ex | soleo/changelog.com | 621c7471b23379e1cdd4a0c960b66ed98d8d1a53 | [
"MIT"
] | null | null | null | web/views/admin/person_view.ex | soleo/changelog.com | 621c7471b23379e1cdd4a0c960b66ed98d8d1a53 | [
"MIT"
] | null | null | null | defmodule Changelog.Admin.PersonView do
use Changelog.Web, :view
import Changelog.Admin.SharedView
import Scrivener.HTML
def avatar_url(person), do: Changelog.PersonView.avatar_url(person)
def episode_count(person), do: Changelog.Person.episode_count(person)
def list_of_links(person), do: Changelog.Person... | 34.75 | 75 | 0.800959 |
081990060293ec7dc2e4bdd5253bfa5faa2b2fd4 | 2,567 | ex | Elixir | test/support/mocks/api.ex | kuma/teslamate | ea175fddb49cc08070182455e0073c3dcfcb3b4c | [
"MIT"
] | 2,602 | 2019-07-24T23:19:12.000Z | 2022-03-31T15:03:48.000Z | test/support/mocks/api.ex | kuma/teslamate | ea175fddb49cc08070182455e0073c3dcfcb3b4c | [
"MIT"
] | 1,547 | 2019-07-26T22:02:09.000Z | 2022-03-31T15:39:41.000Z | test/support/mocks/api.ex | kuma/teslamate | ea175fddb49cc08070182455e0073c3dcfcb3b4c | [
"MIT"
] | 524 | 2019-07-26T17:31:33.000Z | 2022-03-29T15:16:36.000Z | defmodule ApiMock do
use GenServer
defmodule State do
defstruct [:pid, :events, :captcha]
end
# API
def start_link(opts) do
GenServer.start_link(__MODULE__, opts, name: Keyword.fetch!(opts, :name))
end
def get_vehicle(name, id), do: GenServer.call(name, {:get_vehicle, id})
def get_vehicle_wi... | 28.522222 | 95 | 0.613946 |
0819b74121e754014db5f49fa1ed5e6a37872002 | 960 | exs | Elixir | apps/biz/test/account_test.exs | aforward/wuw | 8f41157aeb9fce738a402e757bf78a322a890b7a | [
"MIT"
] | null | null | null | apps/biz/test/account_test.exs | aforward/wuw | 8f41157aeb9fce738a402e757bf78a322a890b7a | [
"MIT"
] | null | null | null | apps/biz/test/account_test.exs | aforward/wuw | 8f41157aeb9fce738a402e757bf78a322a890b7a | [
"MIT"
] | null | null | null | defmodule Biz.AccountTest do
use ExUnit.Case, async: true
alias Biz.{User,Account,Repo}
doctest Biz.Account
setup do
:ok = Ecto.Adapters.SQL.Sandbox.checkout(Repo)
end
test "latest_for" do
user = User.create_guest
assert %{} == Account.latest_for(user)
{:ok, aaaCash} = Account.changeset... | 30.967742 | 81 | 0.630208 |
0819d331be091702dc03f458f112b86bde2f2957 | 2,154 | exs | Elixir | config/dev.exs | patatoid/kommissar | c6c06ba29257ba7641daf03e8e4a94fa967ecfd6 | [
"MIT"
] | null | null | null | config/dev.exs | patatoid/kommissar | c6c06ba29257ba7641daf03e8e4a94fa967ecfd6 | [
"MIT"
] | null | null | null | config/dev.exs | patatoid/kommissar | c6c06ba29257ba7641daf03e8e4a94fa967ecfd6 | [
"MIT"
] | null | null | null | use Mix.Config
# Configure your database
config :kommissar, Kommissar.Repo,
username: "postgres",
password: "postgres",
database: "kommissar_dev",
hostname: "localhost",
show_sensitive_data_on_connection_error: true,
pool_size: 10
# For development, we disable any cache and enable
# debugging and code rel... | 27.974026 | 68 | 0.693129 |
0819d8cb99f5c2f9f4c0eaf4e4c6abfa9bb5d5a0 | 241 | exs | Elixir | exercises/connect/connect.exs | jerith/elixir | 9a3f2a2fbee26a7b6a6b3ad74a9e6d1ff2495ed4 | [
"Apache-2.0"
] | 343 | 2017-06-22T16:28:28.000Z | 2022-03-25T21:33:32.000Z | exercises/connect/connect.exs | jerith/elixir | 9a3f2a2fbee26a7b6a6b3ad74a9e6d1ff2495ed4 | [
"Apache-2.0"
] | 583 | 2017-06-19T10:48:40.000Z | 2022-03-28T21:43:12.000Z | exercises/connect/connect.exs | jerith/elixir | 9a3f2a2fbee26a7b6a6b3ad74a9e6d1ff2495ed4 | [
"Apache-2.0"
] | 228 | 2017-07-05T07:09:32.000Z | 2022-03-27T08:59:08.000Z | defmodule Connect do
@doc """
Calculates the winner (if any) of a board
using "O" as the white player
and "X" as the black player
"""
@spec result_for([String.t()]) :: :none | :black | :white
def result_for(board) do
end
end
| 21.909091 | 59 | 0.647303 |
0819e6e7d653593d1c5978a363fc02ea45b0d568 | 1,139 | exs | Elixir | gen_fsm_playground/config/config.exs | enilsen16/elixir | b4d1d45858a25e4beb39e07de8685f3d93d6a520 | [
"MIT"
] | null | null | null | gen_fsm_playground/config/config.exs | enilsen16/elixir | b4d1d45858a25e4beb39e07de8685f3d93d6a520 | [
"MIT"
] | null | null | null | gen_fsm_playground/config/config.exs | enilsen16/elixir | b4d1d45858a25e4beb39e07de8685f3d93d6a520 | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the paren... | 36.741935 | 73 | 0.755926 |
0819ff706aae9ed4c84321ddfdd80376030c1894 | 25,037 | ex | Elixir | lib/militerm/machines/script.ex | jgsmith/militerm | c4252d0a93f5620b90750ac2b61baf282e9ef7eb | [
"Apache-2.0"
] | 6 | 2017-06-16T10:26:35.000Z | 2021-04-07T15:01:00.000Z | lib/militerm/machines/script.ex | jgsmith/militerm | c4252d0a93f5620b90750ac2b61baf282e9ef7eb | [
"Apache-2.0"
] | 2 | 2020-04-14T02:17:46.000Z | 2021-03-10T11:09:05.000Z | lib/militerm/machines/script.ex | jgsmith/militerm | c4252d0a93f5620b90750ac2b61baf282e9ef7eb | [
"Apache-2.0"
] | null | null | null | defmodule Militerm.Machines.Script do
alias Militerm.Systems.Entity
alias Militerm.Systems
require Logger
@boolean_ops [:and, :or]
@numeric_ops [:sum, :product]
@boolean_false_values [false, "", 0, 0.0, nil, []]
@moduledoc false
# A simple stack machine used for executing event handlers.
# The co... | 25.626407 | 104 | 0.549347 |
081a1e9c7aacd5f578322940e49cb33b7ca6f46e | 7,803 | ex | Elixir | lib/elixir/lib/kernel/utils.ex | kenichi/elixir | 8c27da88c70623cbe516d5310c885943395a82a2 | [
"Apache-2.0"
] | 1 | 2019-08-13T23:22:33.000Z | 2019-08-13T23:22:33.000Z | lib/elixir/lib/kernel/utils.ex | kenichi/elixir | 8c27da88c70623cbe516d5310c885943395a82a2 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/kernel/utils.ex | kenichi/elixir | 8c27da88c70623cbe516d5310c885943395a82a2 | [
"Apache-2.0"
] | null | null | null | import Kernel, except: [destructure: 2, defdelegate: 2, defstruct: 2]
defmodule Kernel.Utils do
@moduledoc false
@doc """
Callback for destructure.
"""
def destructure(list, count)
when is_list(list) and is_integer(count) and count >= 0,
do: destructure_list(list, count)
def destructure(nil, ... | 27.670213 | 98 | 0.620531 |
081a474d2cd1bac62c66dd7861795c7e0f5a184c | 4,594 | ex | Elixir | lib/membrane_aac_format/aac.ex | membraneframework/membrane_aac_format | 9240395ee27a6469283eaee166eadf47d9a1f8b5 | [
"Apache-2.0"
] | null | null | null | lib/membrane_aac_format/aac.ex | membraneframework/membrane_aac_format | 9240395ee27a6469283eaee166eadf47d9a1f8b5 | [
"Apache-2.0"
] | null | null | null | lib/membrane_aac_format/aac.ex | membraneframework/membrane_aac_format | 9240395ee27a6469283eaee166eadf47d9a1f8b5 | [
"Apache-2.0"
] | null | null | null | defmodule Membrane.AAC do
@moduledoc """
Capabilities for [Advanced Audio Codec](https://wiki.multimedia.cx/index.php/Understanding_AAC).
"""
@type profile_t :: :main | :LC | :SSR | :LTP | :HE | :HEv2
@type mpeg_version_t :: 2 | 4
@type samples_per_frame_t :: 1024 | 960
@typedoc """
Indicates whether ... | 34.02963 | 126 | 0.584676 |
081a5e0775a994f0dab2bb1f29a758c8f4a0dd8b | 1,639 | ex | Elixir | apps/massa_proxy/lib/supervisor.ex | drowzy/massa | 624cb02e0039b0624c534636f96fd157b1e34a95 | [
"Apache-2.0"
] | 20 | 2021-06-28T12:03:49.000Z | 2022-03-28T22:35:56.000Z | apps/massa_proxy/lib/supervisor.ex | drowzy/massa | 624cb02e0039b0624c534636f96fd157b1e34a95 | [
"Apache-2.0"
] | 48 | 2021-03-19T12:01:38.000Z | 2022-03-29T21:19:26.000Z | apps/massa_proxy/lib/supervisor.ex | drowzy/massa | 624cb02e0039b0624c534636f96fd157b1e34a95 | [
"Apache-2.0"
] | 5 | 2021-03-18T21:46:10.000Z | 2021-10-01T17:39:05.000Z | defmodule MassaProxy.Children do
@moduledoc false
use Supervisor
require Logger
def start_link(config) do
Supervisor.start_link(__MODULE__, config, name: __MODULE__)
end
@impl true
def init(config) do
children = [
http_server(config),
{Task.Supervisor, name: MassaProxy.TaskSuperviso... | 23.753623 | 87 | 0.608298 |
081a68976dfdad69f640b8c47b326e3ff3e9bee8 | 1,937 | exs | Elixir | test/bsv_rpc/sighash_test.exs | slashrsm/bsv_rpc | 6ac717f4aefcd26045ad15796e4129fdc6a01434 | [
"MIT"
] | 4 | 2019-09-25T05:52:02.000Z | 2020-08-13T21:09:42.000Z | test/bsv_rpc/sighash_test.exs | slashrsm/bsv_rpc | 6ac717f4aefcd26045ad15796e4129fdc6a01434 | [
"MIT"
] | null | null | null | test/bsv_rpc/sighash_test.exs | slashrsm/bsv_rpc | 6ac717f4aefcd26045ad15796e4129fdc6a01434 | [
"MIT"
] | null | null | null | defmodule BsvRpc.SighashTest do
use ExUnit.Case
doctest BsvRpc.Sighash
@cases [
{[:sighash_all, :sighash_forkid], 0x41},
{[:sighash_none, :sighash_forkid], 0x42},
{[:sighash_single, :sighash_forkid], 0x43},
{[:sighash_all, :sighash_forkid, :sighash_anyonecanpay], 0xC1},
{[:sighash_none, :sigh... | 31.241935 | 248 | 0.699535 |
081a6bf679db319d1a9aec364b62788fdbd2eaaa | 2,546 | exs | Elixir | test/postgres/process_pg_crud_test.exs | elixir-garage/ex_tenant | 2336ab92d4cf0e826fdd6bf6ce5fb0206095f007 | [
"Apache-2.0"
] | 1 | 2022-02-09T23:17:09.000Z | 2022-02-09T23:17:09.000Z | test/postgres/process_pg_crud_test.exs | elixir-garage/ex_tenant | 2336ab92d4cf0e826fdd6bf6ce5fb0206095f007 | [
"Apache-2.0"
] | null | null | null | test/postgres/process_pg_crud_test.exs | elixir-garage/ex_tenant | 2336ab92d4cf0e826fdd6bf6ce5fb0206095f007 | [
"Apache-2.0"
] | null | null | null | defmodule ExTenantRepoProcessPgCrudTest do
use ExTenant.Postgres.Cases.DataCase
alias ExTenant.Support.PgExTenantRepository, as: TenantRepo
alias ExTenant.Support.PgTestTenantRepository, as: TenantRepoWithoutTenantId
alias ExTenant.Test.Support.Repos.PgTestRepo, as: Repo
setup do
{:ok, tenant} = TenantR... | 36.898551 | 95 | 0.715632 |
081a70be979cc95de67beb841d39e0e8682197b0 | 264 | exs | Elixir | priv/repo/migrations/20190811132542_tie_title.exs | TylerTemp/jollacn-api | 4e0d887ea9bf4c5fd94dd1880682de1f6384a078 | [
"MIT"
] | null | null | null | priv/repo/migrations/20190811132542_tie_title.exs | TylerTemp/jollacn-api | 4e0d887ea9bf4c5fd94dd1880682de1f6384a078 | [
"MIT"
] | null | null | null | priv/repo/migrations/20190811132542_tie_title.exs | TylerTemp/jollacn-api | 4e0d887ea9bf4c5fd94dd1880682de1f6384a078 | [
"MIT"
] | null | null | null | defmodule JollaCNAPI.DB.Repo.Migrations.TieTitle do
use Ecto.Migration
def change do
alter table("tie") do
add(:title, :string, null: true, comment: "标题")
end
create(index("tie", [:title], unique: true, comment: "Index Comment"))
end
end
| 22 | 74 | 0.662879 |
081a739564b06eb3ba72a4bb64dd232735359d85 | 418 | ex | Elixir | server/lib/realtime/database_replication_supervisor.ex | gustavoarmoa/realtime | e8075779ed19bfb8c22541dc1e5e8ea032d5b823 | [
"Apache-2.0"
] | 4,609 | 2019-10-25T12:28:35.000Z | 2022-03-31T23:05:06.000Z | server/lib/realtime/database_replication_supervisor.ex | gustavoarmoa/realtime | e8075779ed19bfb8c22541dc1e5e8ea032d5b823 | [
"Apache-2.0"
] | 223 | 2019-09-27T03:21:45.000Z | 2022-03-29T23:04:03.000Z | server/lib/realtime/database_replication_supervisor.ex | gustavoarmoa/realtime | e8075779ed19bfb8c22541dc1e5e8ea032d5b823 | [
"Apache-2.0"
] | 187 | 2019-10-27T07:44:15.000Z | 2022-03-29T19:34:52.000Z | defmodule Realtime.DatabaseReplicationSupervisor do
use Supervisor
alias Realtime.Adapters.Postgres.EpgsqlServer
alias Realtime.Replication
def start_link(config) do
Supervisor.start_link(__MODULE__, config, name: __MODULE__)
end
@impl true
def init(config) do
children = [
Replication,
... | 19.904762 | 63 | 0.73445 |
081a7caa6cbd3c6f3d0fda140c66451a25f6c9c4 | 1,253 | ex | Elixir | hw2/Part 1/bulls_and_cows.ex | alpdenizz/ElixirPlayground | 58b5a16c489058e0067e4811042d96fe6a5f8d59 | [
"MIT"
] | null | null | null | hw2/Part 1/bulls_and_cows.ex | alpdenizz/ElixirPlayground | 58b5a16c489058e0067e4811042d96fe6a5f8d59 | [
"MIT"
] | null | null | null | hw2/Part 1/bulls_and_cows.ex | alpdenizz/ElixirPlayground | 58b5a16c489058e0067e4811042d96fe6a5f8d59 | [
"MIT"
] | null | null | null | defmodule BullsAndCows do
def score_guess(str1, str2) do
if str1 == str2 do "You win"
else
list1 = Enum.with_index(String.codepoints(str1))
list2 = Enum.with_index(String.codepoints(str2))
resultList = Enum.uniq(for tuple1 <- list1, tuple2 <- list2, do: checkTuple... | 41.766667 | 130 | 0.561852 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.