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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1adebec25709598137af8a6bdac25847e97740df | 1,783 | ex | Elixir | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1p3beta1__normalized_vertex.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1p3beta1__normalized_vertex.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1p3beta1__normalized_vertex.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... | 31.280702 | 104 | 0.734717 |
1adef4baff4e265c5c64c6bca1b958a105b8fc2b | 3,300 | ex | Elixir | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/api/regions.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/api/regions.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/api/regions.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... | 41.772152 | 187 | 0.67 |
1adeffa15871e72bf61efeff4f2b2ef338bae4a2 | 82 | exs | Elixir | test/derivco_web/views/layout_view_test.exs | AdolfodelSel/Derivco | ad3090208dfc9e11415825f5ce1374ef3f8c2985 | [
"MIT"
] | null | null | null | test/derivco_web/views/layout_view_test.exs | AdolfodelSel/Derivco | ad3090208dfc9e11415825f5ce1374ef3f8c2985 | [
"MIT"
] | 2 | 2021-03-09T15:53:17.000Z | 2021-05-10T09:50:18.000Z | test/derivco_web/views/layout_view_test.exs | AdolfodelSel/Derivco | ad3090208dfc9e11415825f5ce1374ef3f8c2985 | [
"MIT"
] | null | null | null | defmodule DerivcoWeb.LayoutViewTest do
use DerivcoWeb.ConnCase, async: true
end
| 20.5 | 38 | 0.829268 |
1adf1639d69e5d04a2aa94d89e93c1c8d73a1bb2 | 98 | exs | Elixir | test/views/layout_view_test.exs | gabriel-letarte/functional-todo-list | 06d292a66219c7a0114059be8b268d4fec4de95f | [
"MIT"
] | null | null | null | test/views/layout_view_test.exs | gabriel-letarte/functional-todo-list | 06d292a66219c7a0114059be8b268d4fec4de95f | [
"MIT"
] | null | null | null | test/views/layout_view_test.exs | gabriel-letarte/functional-todo-list | 06d292a66219c7a0114059be8b268d4fec4de95f | [
"MIT"
] | null | null | null | defmodule FunctionalTodoList.LayoutViewTest do
use FunctionalTodoList.ConnCase, async: true
end
| 24.5 | 46 | 0.857143 |
1adf5b75c5a3a7b4f9c3120002d06ebd8de1bf72 | 2,791 | ex | Elixir | lib/pbcs/key_manager.ex | fhunleth/pbcs | 253fef9127725a9bc1d5310a10d95878af8c5d27 | [
"Apache-2.0"
] | 16 | 2018-09-03T21:59:29.000Z | 2021-11-27T08:15:17.000Z | lib/pbcs/key_manager.ex | fhunleth/pbcs | 253fef9127725a9bc1d5310a10d95878af8c5d27 | [
"Apache-2.0"
] | 8 | 2018-08-28T17:46:23.000Z | 2021-06-02T00:19:43.000Z | lib/pbcs/key_manager.ex | fhunleth/pbcs | 253fef9127725a9bc1d5310a10d95878af8c5d27 | [
"Apache-2.0"
] | 3 | 2018-09-12T12:32:16.000Z | 2021-05-10T13:39:08.000Z | defmodule PBCS.KeyManager do
@moduledoc """
Callback module for key managers.
Implement this behaviour if you want to implement your own key manager.
"""
alias PBCS
alias PBCS.ContentEncryptor
alias __MODULE__
@type t :: %KeyManager{
module: module,
params: any
}
defstr... | 28.191919 | 98 | 0.614475 |
1adf62a04d1858b71a3b282c19094eafb2426ca9 | 905 | ex | Elixir | lib/scenic/primitive/transform/translate.ex | mikeover/scenic | 4b61c4996ed2d06b8cdf94f88c8a0522160e10b5 | [
"Apache-2.0"
] | null | null | null | lib/scenic/primitive/transform/translate.ex | mikeover/scenic | 4b61c4996ed2d06b8cdf94f88c8a0522160e10b5 | [
"Apache-2.0"
] | null | null | null | lib/scenic/primitive/transform/translate.ex | mikeover/scenic | 4b61c4996ed2d06b8cdf94f88c8a0522160e10b5 | [
"Apache-2.0"
] | null | null | null | #
# Created by Boyd Multerer on 10/03/17.
# Copyright © 2017 Kry10 Industries. All rights reserved.
#
defmodule Scenic.Primitive.Transform.Translate do
use Scenic.Primitive.Transform
# ============================================================================
# data verification and serialization
# -----... | 26.617647 | 80 | 0.454144 |
1adf7556dd5194d475042999d2a86f846204dd5e | 214 | exs | Elixir | elixir/priv/repo/migrations/20210407061318_update_users.exs | sirryanscott/web-homework | f705ea05a76f68b759a486595351313289ac6e85 | [
"MIT"
] | null | null | null | elixir/priv/repo/migrations/20210407061318_update_users.exs | sirryanscott/web-homework | f705ea05a76f68b759a486595351313289ac6e85 | [
"MIT"
] | null | null | null | elixir/priv/repo/migrations/20210407061318_update_users.exs | sirryanscott/web-homework | f705ea05a76f68b759a486595351313289ac6e85 | [
"MIT"
] | null | null | null | defmodule Homework.Repo.Migrations.UpdateUsers do
use Ecto.Migration
def change do
alter table(:users) do
add(:company_id, references(:companies, type: :uuid, on_delete: :nothing))
end
end
end
| 21.4 | 80 | 0.714953 |
1adfb8569c48173f88dcc1cf6f7303f6939f4b56 | 3,314 | ex | Elixir | lib/day_4.ex | andersonmcook/aoc2018 | 59f599eb7df7ae1272260ebbf41236ba91178a9e | [
"MIT"
] | null | null | null | lib/day_4.ex | andersonmcook/aoc2018 | 59f599eb7df7ae1272260ebbf41236ba91178a9e | [
"MIT"
] | null | null | null | lib/day_4.ex | andersonmcook/aoc2018 | 59f599eb7df7ae1272260ebbf41236ba91178a9e | [
"MIT"
] | null | null | null | defmodule AOC.Day4 do
@moduledoc """
https://adventofcode.com/2018/day/4
"""
@doc """
iex> AOC.Day4.part_1([
...> %{
...> action: ["Guard", "#10", "begins", "shift"],
...> time: ~N[1518-11-01 00:00:00.000]
...> },
...> %{action: ["falls", "asleep"], time: ~N[1518-11-01 00:05:00.000]},
..... | 30.40367 | 94 | 0.467109 |
1adfd4762b661b2899f45192596a7d3b607ea59d | 5,765 | ex | Elixir | apps/andi/lib/andi_web/live/edit_live_view/data_dictionary_field_editor.ex | msomji/smartcitiesdata | fc96abc1ef1306f7af6bd42bbcb4ed041a6d922c | [
"Apache-2.0"
] | null | null | null | apps/andi/lib/andi_web/live/edit_live_view/data_dictionary_field_editor.ex | msomji/smartcitiesdata | fc96abc1ef1306f7af6bd42bbcb4ed041a6d922c | [
"Apache-2.0"
] | null | null | null | apps/andi/lib/andi_web/live/edit_live_view/data_dictionary_field_editor.ex | msomji/smartcitiesdata | fc96abc1ef1306f7af6bd42bbcb4ed041a6d922c | [
"Apache-2.0"
] | null | null | null | defmodule AndiWeb.EditLiveView.DataDictionaryFieldEditor do
@moduledoc """
LiveComponent for a nested data dictionary tree view
"""
use Phoenix.LiveComponent
import Phoenix.HTML.Form
alias AndiWeb.Views.Options
alias AndiWeb.ErrorHelpers
def mount(socket) do
{:ok, assign(socket, expansion_map: %... | 49.698276 | 168 | 0.631917 |
1ae01978bddfdceebcac229ea674da89dfa47b42 | 6,835 | exs | Elixir | test/badge_generator_test.exs | samuelnygaard/accent | db753badab1d885397b48a42ac3fb43024345467 | [
"BSD-3-Clause"
] | 1 | 2020-07-01T16:08:34.000Z | 2020-07-01T16:08:34.000Z | test/badge_generator_test.exs | samuelnygaard/accent | db753badab1d885397b48a42ac3fb43024345467 | [
"BSD-3-Clause"
] | 6 | 2021-03-11T07:37:48.000Z | 2022-02-13T21:10:33.000Z | test/badge_generator_test.exs | doc-ai/accent | e337e16f3658cc0728364f952c0d9c13710ebb06 | [
"BSD-3-Clause"
] | 1 | 2020-05-29T21:47:35.000Z | 2020-05-29T21:47:35.000Z | defmodule AccentTest.BadgeGenerator do
use Accent.RepoCase, async: false
import Mock
alias Accent.{
BadgeGenerator,
Document,
Language,
Project,
Repo,
Revision,
Translation
}
setup do
french_language = %Language{name: "french", slug: Ecto.UUID.generate()} |> Repo.insert!()
... | 56.958333 | 168 | 0.697293 |
1ae02482b72c2526c7b35f65442c34d209c9bf30 | 499 | ex | Elixir | lib/farmbot/farm_event/execution/execution.ex | colocolo317/farmbot | 570281057c3f2791a2e0f8c6b8b659aa338d7b40 | [
"MIT"
] | 2 | 2018-08-01T23:07:52.000Z | 2018-10-17T12:49:21.000Z | lib/farmbot/farm_event/execution/execution.ex | colocolo317/farmbot | 570281057c3f2791a2e0f8c6b8b659aa338d7b40 | [
"MIT"
] | null | null | null | lib/farmbot/farm_event/execution/execution.ex | colocolo317/farmbot | 570281057c3f2791a2e0f8c6b8b659aa338d7b40 | [
"MIT"
] | 1 | 2017-07-22T21:51:14.000Z | 2017-07-22T21:51:14.000Z | defprotocol Farmbot.FarmEvent.Execution do
@moduledoc """
Protocol to be implemented by any struct that can be executed by
Farmbot.FarmEvent.Manager.
"""
@dialyzer {:nowarn_function, __protocol__: 1}
@typedoc "Data to be executed."
@type data :: map
@doc """
Execute an item.
* `data` - A `Farmb... | 26.263158 | 73 | 0.683367 |
1ae042812532529a854861698f75e1f74e5a05f1 | 6,937 | ex | Elixir | clients/cloud_asset/lib/google_api/cloud_asset/v1/model/google_cloud_asset_v1p7beta1_asset.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/cloud_asset/lib/google_api/cloud_asset/v1/model/google_cloud_asset_v1p7beta1_asset.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/cloud_asset/lib/google_api/cloud_asset/v1/model/google_cloud_asset_v1p7beta1_asset.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... | 73.021053 | 647 | 0.751333 |
1ae04d2d7bd506e7bbcc117e46e76eb84a1404f1 | 4,326 | ex | Elixir | lib/codewar_web/controllers/admin/session_controller.ex | nimblehq/codewar-web | 5038bc09d4fc42f6be0737857a4c053ff42463f1 | [
"MIT"
] | 2 | 2021-06-29T02:22:28.000Z | 2022-02-15T06:32:15.000Z | lib/codewar_web/controllers/admin/session_controller.ex | nimblehq/codewar-web | 5038bc09d4fc42f6be0737857a4c053ff42463f1 | [
"MIT"
] | 14 | 2021-05-06T04:27:19.000Z | 2021-08-24T11:15:33.000Z | lib/codewar_web/controllers/admin/session_controller.ex | nimblehq/codewar-web | 5038bc09d4fc42f6be0737857a4c053ff42463f1 | [
"MIT"
] | 1 | 2021-08-20T07:50:19.000Z | 2021-08-20T07:50:19.000Z | defmodule CodewarWeb.Admin.SessionController do
use CodewarWeb, :controller
alias Codewar.Competition.Competitions
alias Codewar.Competition.Leaderboards
alias Codewar.Competition.Schemas.Session
alias CodewarWeb.Channels.CompetitionChannel
def new(conn, _params) do
changeset = Session.changeset(%Ses... | 31.576642 | 81 | 0.66736 |
1ae07734255b05273039c00aeb47d25448202b85 | 69 | ex | Elixir | web/views/registration_view.ex | mfunaro/handiman-phoenix | 5d94114f37561647096f1695e3f0a3a3d1c7ca34 | [
"MIT",
"Unlicense"
] | 1 | 2015-08-15T02:40:27.000Z | 2015-08-15T02:40:27.000Z | web/views/registration_view.ex | mfunaro/handiman-phoenix | 5d94114f37561647096f1695e3f0a3a3d1c7ca34 | [
"MIT",
"Unlicense"
] | 1 | 2015-09-11T00:02:33.000Z | 2015-09-11T03:24:21.000Z | web/views/registration_view.ex | mfunaro/handiman-phoenix | 5d94114f37561647096f1695e3f0a3a3d1c7ca34 | [
"MIT",
"Unlicense"
] | null | null | null | defmodule Handiman.RegistrationView do
use Handiman.Web, :view
end
| 17.25 | 38 | 0.811594 |
1ae09fa4cd8f7991cf9688fe873ca55734431bee | 8,545 | ex | Elixir | lib/logger/lib/logger/config.ex | kenichi/elixir | 8c27da88c70623cbe516d5310c885943395a82a2 | [
"Apache-2.0"
] | 1 | 2019-04-29T12:35:51.000Z | 2019-04-29T12:35:51.000Z | lib/logger/lib/logger/config.ex | kenichi/elixir | 8c27da88c70623cbe516d5310c885943395a82a2 | [
"Apache-2.0"
] | null | null | null | lib/logger/lib/logger/config.ex | kenichi/elixir | 8c27da88c70623cbe516d5310c885943395a82a2 | [
"Apache-2.0"
] | null | null | null | defmodule Logger.Config do
@moduledoc false
@behaviour :gen_event
@name __MODULE__
@table __MODULE__
@counter_pos 1
@update_counter_message {__MODULE__, :update_counter}
def configure(options) do
:gen_event.call(Logger, @name, {:configure, options})
end
def add_translator(translator) do
:ge... | 29.364261 | 92 | 0.675834 |
1ae0a59fec5a8d2b1196f4923a436ab5ff46a4bb | 270 | exs | Elixir | chp02/exercise-01.exs | ulissesalmeida/learn-fp-with-elixir-exercises | 4286f6ecbca55c7487f4ad0f4dfbc323efa8e105 | [
"MIT"
] | 5 | 2019-03-21T00:01:38.000Z | 2021-02-26T12:41:43.000Z | chp02/exercise-01.exs | ulissesalmeida/learn-fp-with-elixir-exercises | 4286f6ecbca55c7487f4ad0f4dfbc323efa8e105 | [
"MIT"
] | null | null | null | chp02/exercise-01.exs | ulissesalmeida/learn-fp-with-elixir-exercises | 4286f6ecbca55c7487f4ad0f4dfbc323efa8e105 | [
"MIT"
] | 4 | 2019-07-12T22:00:20.000Z | 2020-12-23T22:23:40.000Z | # * Create an expression that solves the following problem: Sarah has bought
# ten slices of bread for ten cents each, three bottles of milk for two dollars
# each, and a cake for fifteen dollars. How many dollars has Sarah spent?
iex> (10 * 0.1) + (3 * 2) + 15
22.0 | 54 | 80 | 0.714815 |
1ae0a830e4d15e79053c41c378cb13bff4e99909 | 1,855 | ex | Elixir | lib/liveview_bindings_web.ex | rafalgolarz/liveview_bindings | c64fbf9661d5ff78c839daa7561549bbf6cbc731 | [
"MIT"
] | null | null | null | lib/liveview_bindings_web.ex | rafalgolarz/liveview_bindings | c64fbf9661d5ff78c839daa7561549bbf6cbc731 | [
"MIT"
] | 1 | 2021-03-10T09:32:06.000Z | 2021-03-10T09:32:06.000Z | lib/liveview_bindings_web.ex | rafalgolarz/liveview_bindings | c64fbf9661d5ff78c839daa7561549bbf6cbc731 | [
"MIT"
] | null | null | null | defmodule LiveviewBindingsWeb do
@moduledoc """
The entrypoint for defining your web interface, such
as controllers, views, channels and so on.
This can be used in your application as:
use LiveviewBindingsWeb, :controller
use LiveviewBindingsWeb, :view
The definitions below will be executed for... | 25.410959 | 83 | 0.710512 |
1ae0b0ddd774dee43bc71e40b9a0eda70f0c4c5d | 1,414 | ex | Elixir | lib/dgraph_ex/core/delete.ex | sunny-g/dgraph_ex | fab9f1fd684538758ed211537c3b0869233e7ce4 | [
"MIT"
] | 1 | 2019-05-01T15:18:41.000Z | 2019-05-01T15:18:41.000Z | lib/dgraph_ex/core/delete.ex | sunny-g/dgraph_ex | fab9f1fd684538758ed211537c3b0869233e7ce4 | [
"MIT"
] | null | null | null | lib/dgraph_ex/core/delete.ex | sunny-g/dgraph_ex | fab9f1fd684538758ed211537c3b0869233e7ce4 | [
"MIT"
] | 1 | 2019-05-01T15:18:48.000Z | 2019-05-01T15:18:48.000Z | defmodule DgraphEx.Core.Delete do
@moduledoc false
alias DgraphEx.Core.{Delete, Field}
defstruct fields: []
defmacro __using__(_) do
quote do
def delete(), do: %Delete{}
def delete(block), do: Delete.delete(block)
def delete(%Delete{} = m, block), do: Delete.delete(m, block)
def ... | 25.709091 | 78 | 0.648515 |
1ae0bd34dcbe630c64160952e4bb2ff4b4f870dd | 715 | ex | Elixir | lib/ex_component_schema/validator/max_length.ex | lenra-io/ex_component_schema | a051ba94057cdd3218c4625e24f56a834a586aa6 | [
"MIT"
] | 2 | 2022-03-18T08:52:29.000Z | 2022-03-18T08:52:33.000Z | lib/ex_component_schema/validator/max_length.ex | lenra-io/ex_component_schema | a051ba94057cdd3218c4625e24f56a834a586aa6 | [
"MIT"
] | 8 | 2021-09-15T11:52:45.000Z | 2022-01-10T13:13:53.000Z | lib/ex_component_schema/validator/max_length.ex | lenra-io/ex_component_schema | a051ba94057cdd3218c4625e24f56a834a586aa6 | [
"MIT"
] | null | null | null | defmodule ExComponentSchema.Validator.MaxLength do
@moduledoc """
`ExComponentSchema.Validator` implementation for `"maxLength"` attributes.
See:
"""
alias ExComponentSchema.Validator.Error
@behaviour ExComponentSchema.Validator
@impl ExComponentSchema.Validator
def validate(_, _, {"maxLength", max... | 19.861111 | 77 | 0.686713 |
1ae0cc63f8fffc970c02bc3c7814282ef74a41c6 | 1,845 | exs | Elixir | clients/bigtable_admin/mix.exs | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/bigtable_admin/mix.exs | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/bigtable_admin/mix.exs | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 27.537313 | 105 | 0.657995 |
1ae0d38409f720a040195c594aaee67612600f1e | 233 | ex | Elixir | lib/coxir/voice/payload/resume.ex | satom99/coxir | 75bce94dcbe5dfa49e920d2f4ce0de224c315ce4 | [
"Apache-2.0"
] | 178 | 2018-04-08T17:11:56.000Z | 2022-03-25T15:36:41.000Z | lib/coxir/voice/payload/resume.ex | satom99/coxir | 75bce94dcbe5dfa49e920d2f4ce0de224c315ce4 | [
"Apache-2.0"
] | 21 | 2018-04-30T21:33:59.000Z | 2019-09-03T17:25:26.000Z | lib/coxir/voice/payload/resume.ex | satom99/coxir | 75bce94dcbe5dfa49e920d2f4ce0de224c315ce4 | [
"Apache-2.0"
] | 25 | 2018-04-21T19:41:03.000Z | 2021-07-24T22:40:40.000Z | defmodule Coxir.Voice.Payload.Resume do
@moduledoc """
Work in progress.
"""
use Coxir.Voice.Payload
embedded_schema do
field(:server_id, Snowflake)
field(:session_id, :string)
field(:token, :string)
end
end
| 17.923077 | 39 | 0.686695 |
1ae11b43793f803b9ef90074b6e2d74f0b75b299 | 218 | ex | Elixir | lib/quasar/plug/current_user.ex | okbreathe/quasar | 58449a190aefde36aa83e5b1f3116f458ced7c09 | [
"Apache-2.0"
] | 11 | 2017-07-10T10:13:42.000Z | 2021-12-19T16:46:20.000Z | lib/quasar/plug/current_user.ex | okbreathe/quasar | 58449a190aefde36aa83e5b1f3116f458ced7c09 | [
"Apache-2.0"
] | null | null | null | lib/quasar/plug/current_user.ex | okbreathe/quasar | 58449a190aefde36aa83e5b1f3116f458ced7c09 | [
"Apache-2.0"
] | 3 | 2017-07-18T20:03:34.000Z | 2019-07-28T13:32:49.000Z | defmodule Quasar.Web.Plug.CurrentUser do
def init(opts), do: opts
def call(conn, _opts) do
current_user = Guardian.Plug.current_resource(conn)
Plug.Conn.assign(conn, :current_user, current_user)
end
end
| 24.222222 | 55 | 0.743119 |
1ae12731e019bcd8e0169015f3bc6660f4d82674 | 17,054 | exs | Elixir | test/linkir/accounts_test.exs | byhbt/linkir | 8ac72cd0da2696b628f6981595e75164adfc5945 | [
"MIT"
] | null | null | null | test/linkir/accounts_test.exs | byhbt/linkir | 8ac72cd0da2696b628f6981595e75164adfc5945 | [
"MIT"
] | null | null | null | test/linkir/accounts_test.exs | byhbt/linkir | 8ac72cd0da2696b628f6981595e75164adfc5945 | [
"MIT"
] | null | null | null | defmodule Linkir.AccountsTest do
use Linkir.DataCase
alias Linkir.Accounts
import Linkir.AccountsFixtures
alias Linkir.Accounts.{User, UserToken}
describe "get_user_by_email/1" do
test "does not return the user if the email does not exist" do
refute Accounts.get_user_by_email("unknown@example.com"... | 33.770297 | 97 | 0.659376 |
1ae13a649a9bb83caf5258419525c3084297ee22 | 197 | ex | Elixir | apps/blog/web/controllers/read_controller.ex | richeterre/phoenix-example | cd01a3401387c63dc11e64ca89e500e8eabd5fb0 | [
"MIT"
] | null | null | null | apps/blog/web/controllers/read_controller.ex | richeterre/phoenix-example | cd01a3401387c63dc11e64ca89e500e8eabd5fb0 | [
"MIT"
] | null | null | null | apps/blog/web/controllers/read_controller.ex | richeterre/phoenix-example | cd01a3401387c63dc11e64ca89e500e8eabd5fb0 | [
"MIT"
] | null | null | null | defmodule Blog.ReadController do
use Blog.Web, :controller
alias Blog.Post
def show(conn, %{"id" => id}) do
post = Repo.get!(Post, id)
render conn, "show.html", post: post
end
end
| 19.7 | 40 | 0.649746 |
1ae14db56024379f276310262d4567c7537e01fa | 26,748 | ex | Elixir | lib/rpi/compile.ex | cdegroot/scenic_driver_nerves_rpi | 69b1a2219ffacae23506b1aae9bb0934c50719e6 | [
"Apache-2.0"
] | null | null | null | lib/rpi/compile.ex | cdegroot/scenic_driver_nerves_rpi | 69b1a2219ffacae23506b1aae9bb0934c50719e6 | [
"Apache-2.0"
] | null | null | null | lib/rpi/compile.ex | cdegroot/scenic_driver_nerves_rpi | 69b1a2219ffacae23506b1aae9bb0934c50719e6 | [
"Apache-2.0"
] | 1 | 2020-06-04T19:45:09.000Z | 2020-06-04T19:45:09.000Z | #
# Created by Boyd Multerer on 06/01/18.
# Copyright © 2018 Kry10 Industries. All rights reserved.
#
# compile a graph out to a series of commands that can be drawn
# by the C render code
#
#
defmodule Scenic.Driver.Nerves.Rpi.Compile do
@moduledoc false
alias Scenic.Primitive
require Logger
# import IEx
... | 25.793635 | 97 | 0.551107 |
1ae1637cd507430bd7c0e9a31ee72130accfb73a | 613 | exs | Elixir | spec/zen_ex/query_spec.exs | otoyo/zendex | 4995571464e11e891d7136a97b135be313d14cb1 | [
"CC0-1.0"
] | null | null | null | spec/zen_ex/query_spec.exs | otoyo/zendex | 4995571464e11e891d7136a97b135be313d14cb1 | [
"CC0-1.0"
] | null | null | null | spec/zen_ex/query_spec.exs | otoyo/zendex | 4995571464e11e891d7136a97b135be313d14cb1 | [
"CC0-1.0"
] | null | null | null | defmodule ZenEx.QuerySpec do
use ESpec
alias ZenEx.Query
let(:ids, do: [1, 2, 3])
let(:per_page, do: 100)
let(:role, do: "agent")
describe "build" do
describe "with params" do
subject(do: Query.build(ids: ids(), per_page: per_page(), role: role()))
it(do: is_expected() |> to(eq("?ids=1,2,... | 22.703704 | 78 | 0.588907 |
1ae181abd88b12940f37b3935bf950b731c4afab | 1,548 | exs | Elixir | test/groupher_server_web/mutation/cms/upvotes/job_upvote_test.exs | coderplanets/coderplanets_server | 3663e56340d6d050e974c91f7e499d8424fc25e9 | [
"Apache-2.0"
] | 240 | 2018-11-06T09:36:54.000Z | 2022-02-20T07:12:36.000Z | test/groupher_server_web/mutation/cms/upvotes/job_upvote_test.exs | coderplanets/coderplanets_server | 3663e56340d6d050e974c91f7e499d8424fc25e9 | [
"Apache-2.0"
] | 363 | 2018-07-11T03:38:14.000Z | 2021-12-14T01:42:40.000Z | test/groupher_server_web/mutation/cms/upvotes/job_upvote_test.exs | mydearxym/mastani_server | f24034a4a5449200165cf4a547964a0961793eab | [
"Apache-2.0"
] | 22 | 2019-01-27T11:47:56.000Z | 2021-02-28T13:17:52.000Z | defmodule GroupherServer.Test.Mutation.Upvotes.JobUpvote do
@moduledoc false
use GroupherServer.TestTools
alias GroupherServer.CMS
setup do
{:ok, job} = db_insert(:job)
{:ok, user} = db_insert(:user)
guest_conn = simu_conn(:guest)
user_conn = simu_conn(:user, user)
{:ok, ~m(user_conn gue... | 23.815385 | 80 | 0.603359 |
1ae1b5e9d4db49d837f62d236e70183619d35338 | 118 | ex | Elixir | lib/livrodealemao/repo.ex | rmartinsc/livrodealemao | 337e2b7f5bd6de6b84d6ec44a37a839bee71319e | [
"MIT"
] | null | null | null | lib/livrodealemao/repo.ex | rmartinsc/livrodealemao | 337e2b7f5bd6de6b84d6ec44a37a839bee71319e | [
"MIT"
] | null | null | null | lib/livrodealemao/repo.ex | rmartinsc/livrodealemao | 337e2b7f5bd6de6b84d6ec44a37a839bee71319e | [
"MIT"
] | null | null | null | defmodule Livrodealemao.Repo do
use Ecto.Repo,
otp_app: :livrodealemao,
adapter: Ecto.Adapters.Postgres
end
| 19.666667 | 35 | 0.754237 |
1ae1baadafdc22259e6ded4b97d9ba3bf6c70fe0 | 1,007 | ex | Elixir | lib/still/preprocessor/markdown.ex | tomasz-tomczyk/still | 3f2fdb64c72244b789e14b31d514199f8adeb796 | [
"ISC"
] | null | null | null | lib/still/preprocessor/markdown.ex | tomasz-tomczyk/still | 3f2fdb64c72244b789e14b31d514199f8adeb796 | [
"ISC"
] | null | null | null | lib/still/preprocessor/markdown.ex | tomasz-tomczyk/still | 3f2fdb64c72244b789e14b31d514199f8adeb796 | [
"ISC"
] | null | null | null | defmodule Still.Preprocessor.Markdown do
@moduledoc """
Transforms markdown into HTML using [`Markdown`](https://github.com/still-ex/markdown).
Set the property `:use_responsive_images` in your config to render responsive images:
```
config :still, Still.Preprocessor.Markdown, use_responsive_images: true
... | 25.820513 | 89 | 0.718967 |
1ae1c5327614ad3a9c73cd9c9889ce70a0301b9d | 1,015 | ex | Elixir | test/support/channel_case.ex | UnofficialJuliaMirror/bors-ng-bors-ng | fcec51b5f6e5a691d3e310bd35ba7b74e55b667f | [
"Apache-2.0"
] | null | null | null | test/support/channel_case.ex | UnofficialJuliaMirror/bors-ng-bors-ng | fcec51b5f6e5a691d3e310bd35ba7b74e55b667f | [
"Apache-2.0"
] | 1 | 2020-03-07T08:28:14.000Z | 2020-03-07T08:28:14.000Z | test/support/channel_case.ex | UnofficialJuliaMirror/bors-ng-bors-ng | fcec51b5f6e5a691d3e310bd35ba7b74e55b667f | [
"Apache-2.0"
] | 3 | 2020-11-15T16:17:58.000Z | 2021-06-04T11:26:42.000Z | defmodule BorsNG.ChannelCase do
@moduledoc """
This module defines the test case to be used by
channel tests.
Such tests rely on `Phoenix.ChannelTest` and also
import other functionality to make it easier
to build and query models.
Finally, if the test case interacts with the database,
it cannot be as... | 23.068182 | 77 | 0.703448 |
1ae1d67d5e0c591c09981fcad6e67a8a55d432d1 | 166 | exs | Elixir | priv/repo/migrations/20220405165320_add_cars_table.exs | eahanson/schema_assertions | 35760374e2c1e837c5ea6fc0bde4baea53677c83 | [
"Apache-2.0"
] | null | null | null | priv/repo/migrations/20220405165320_add_cars_table.exs | eahanson/schema_assertions | 35760374e2c1e837c5ea6fc0bde4baea53677c83 | [
"Apache-2.0"
] | null | null | null | priv/repo/migrations/20220405165320_add_cars_table.exs | eahanson/schema_assertions | 35760374e2c1e837c5ea6fc0bde4baea53677c83 | [
"Apache-2.0"
] | null | null | null | defmodule SchemaAssertions.Test.Repo.Migrations.AddCars do
use Ecto.Migration
def change do
create table(:cars) do
add :brand, :text
end
end
end
| 16.6 | 58 | 0.704819 |
1ae1dee6ac9f3139191447cb1aaa6e7d968ba891 | 189 | exs | Elixir | graphical/priv/repo/migrations/20180615033154_add_encrypted_password_to_users.exs | joshmcarthur/learning-elixir | 5ccfdd61dcfaba82c05559fb9c0e6f99cf4319e7 | [
"MIT"
] | null | null | null | graphical/priv/repo/migrations/20180615033154_add_encrypted_password_to_users.exs | joshmcarthur/learning-elixir | 5ccfdd61dcfaba82c05559fb9c0e6f99cf4319e7 | [
"MIT"
] | null | null | null | graphical/priv/repo/migrations/20180615033154_add_encrypted_password_to_users.exs | joshmcarthur/learning-elixir | 5ccfdd61dcfaba82c05559fb9c0e6f99cf4319e7 | [
"MIT"
] | null | null | null | defmodule Graphical.Repo.Migrations.AddEncryptedPasswordToUsers do
use Ecto.Migration
def change do
alter table(:users) do
add :encrypted_password, :string
end
end
end
| 18.9 | 66 | 0.746032 |
1ae1f9e0eb676f646ad6a216890cbcb1f1a2f935 | 2,373 | ex | Elixir | lib/elixirdo/instance/monad_trans/except.ex | slepher/elixirdo | 9417f275f1c908f9144e93325e6c52717896058f | [
"Xnet",
"X11"
] | null | null | null | lib/elixirdo/instance/monad_trans/except.ex | slepher/elixirdo | 9417f275f1c908f9144e93325e6c52717896058f | [
"Xnet",
"X11"
] | 5 | 2018-07-20T12:36:25.000Z | 2018-08-01T04:55:46.000Z | lib/elixirdo/instance/monad_trans/except.ex | slepher/elixirdo | 9417f275f1c908f9144e93325e6c52717896058f | [
"Xnet",
"X11"
] | null | null | null | defmodule Elixirdo.Instance.MonadTrans.Except do
use Elixirdo.Base
use Elixirdo.Typeclass.Monad.Trans, import_typeclasses: true
use Elixirdo.Typeclass.Monad.Fail, import_monad_fail: true
use Elixirdo.Instance.Either
alias Elixirdo.Instance.MonadTrans.Except, as: ExceptT
defmacro __using__(_) do
quote... | 21.572727 | 70 | 0.540666 |
1ae250abd5536871215c0300ca3b30161d2fb745 | 465 | ex | Elixir | api/lib/imaas_web/controllers/error_controller.ex | yunmikun2/imaas | 54df995e89f7f497f11e63faee9ad4ecbb51b6cc | [
"WTFPL"
] | null | null | null | api/lib/imaas_web/controllers/error_controller.ex | yunmikun2/imaas | 54df995e89f7f497f11e63faee9ad4ecbb51b6cc | [
"WTFPL"
] | null | null | null | api/lib/imaas_web/controllers/error_controller.ex | yunmikun2/imaas | 54df995e89f7f497f11e63faee9ad4ecbb51b6cc | [
"WTFPL"
] | null | null | null | defmodule ImaasWeb.ErrorController do
@moduledoc false
use ImaasWeb, :controller
alias ImaasWeb.ErrorView
def call(conn, {:error, %Ecto.Changeset{} = changeset}) do
conn
|> put_view(ErrorView)
|> put_status(:unprocessable_entity)
|> render(:unprocessable_entity, errors: errors_from_changeset(... | 24.473684 | 78 | 0.696774 |
1ae25dc937bbf6cd7dc2468d70d95ac4c420607b | 2,151 | ex | Elixir | clients/cloud_search/lib/google_api/cloud_search/v1/model/boolean_operator_options.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/cloud_search/lib/google_api/cloud_search/v1/model/boolean_operator_options.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/cloud_search/lib/google_api/cloud_search/v1/model/boolean_operator_options.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... | 45.765957 | 646 | 0.759647 |
1ae291ca94c0237dbfe1909a18eacbf9676c5c83 | 2,647 | ex | Elixir | talks-articles/frameworks/phoenix/book--programming-phoenix-ge-1.4/videologue/lib/videologue_web/controllers/video_controller.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/video_controller.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/video_controller.ex | abhishekkr/tutorials_as_code | f355dc62a5025b710ac6d4a6ac2f9610265fad54 | [
"MIT"
] | 15 | 2015-03-02T08:09:01.000Z | 2021-06-10T03:25:41.000Z | defmodule VideologueWeb.VideoController do
use VideologueWeb, :controller
alias Videologue.Multimedia
alias Videologue.Multimedia.Video
plug :load_categories when action in [:new, :create, :edit, :update, :show]
def action(conn, _params) do
args = [conn, conn.params, conn.assigns.current_user]
appl... | 32.280488 | 77 | 0.665659 |
1ae2a7cd7899436c63a96745a49840c455708787 | 945 | ex | Elixir | graphical/test/support/channel_case.ex | joshmcarthur/learning-elixir | 5ccfdd61dcfaba82c05559fb9c0e6f99cf4319e7 | [
"MIT"
] | null | null | null | graphical/test/support/channel_case.ex | joshmcarthur/learning-elixir | 5ccfdd61dcfaba82c05559fb9c0e6f99cf4319e7 | [
"MIT"
] | null | null | null | graphical/test/support/channel_case.ex | joshmcarthur/learning-elixir | 5ccfdd61dcfaba82c05559fb9c0e6f99cf4319e7 | [
"MIT"
] | null | null | null | defmodule GraphicalWeb.ChannelCase do
@moduledoc """
This module defines the test case to be used by
channel tests.
Such tests rely on `Phoenix.ChannelTest` and also
import other functionality to make it easier
to build common datastructures and query the data layer.
Finally, if the test case interacts ... | 24.868421 | 71 | 0.718519 |
1ae2d17279988b5c6ca374055caea53c426b8285 | 1,091 | ex | Elixir | lib/habitat_web/channels/user_socket.ex | ninedraft/habitat | 425c6753e0f15b008c7c452bad7878c0e1e4ce07 | [
"MIT"
] | null | null | null | lib/habitat_web/channels/user_socket.ex | ninedraft/habitat | 425c6753e0f15b008c7c452bad7878c0e1e4ce07 | [
"MIT"
] | 2 | 2020-08-15T08:57:57.000Z | 2020-12-14T08:41:30.000Z | lib/habitat_web/channels/user_socket.ex | ninedraft/habitat | 425c6753e0f15b008c7c452bad7878c0e1e4ce07 | [
"MIT"
] | null | null | null | defmodule HabitatWeb.UserSocket do
use Phoenix.Socket
## Channels
# channel "room:*", HabitatWeb.RoomChannel
# Socket params are passed from the client and can
# be used to verify and authenticate a user. After
# verification, you can put default assigns into
# the socket that will be set for all channe... | 30.305556 | 83 | 0.694775 |
1ae2e79f14a63e4b44c8b253bcc3d6fc4d409841 | 16,321 | ex | Elixir | lib/sourceror/code/normalizer.ex | maartenvanvliet/sourceror | 02fff81a59d6c9a2d4de3fc1b27e2d40ff77ea2d | [
"Apache-2.0"
] | 118 | 2021-05-26T05:00:32.000Z | 2022-03-13T16:25:36.000Z | lib/sourceror/code/normalizer.ex | maartenvanvliet/sourceror | 02fff81a59d6c9a2d4de3fc1b27e2d40ff77ea2d | [
"Apache-2.0"
] | 35 | 2021-06-02T20:18:48.000Z | 2022-03-31T20:52:22.000Z | lib/sourceror/code/normalizer.ex | maartenvanvliet/sourceror | 02fff81a59d6c9a2d4de3fc1b27e2d40ff77ea2d | [
"Apache-2.0"
] | 5 | 2021-06-15T18:01:04.000Z | 2022-02-13T09:14:28.000Z | # This module was vendored from the Elixir source code to backport new features.
defmodule Sourceror.Code.Normalizer do
@moduledoc false
defguard is_literal(x)
when is_integer(x) or
is_float(x) or
is_binary(x) or
is_atom(x)
@doc """
Wraps liter... | 27.615905 | 98 | 0.592182 |
1ae2eb1f449d3491a15d37708e90939f6d536c05 | 41 | ex | Elixir | testData/org/elixir_lang/reference/module/multiple_alias/nested/multiple_alias_bee.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 1,668 | 2015-01-03T05:54:27.000Z | 2022-03-25T08:01:20.000Z | testData/org/elixir_lang/reference/module/multiple_alias/nested/multiple_alias_bee.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 2,018 | 2015-01-01T22:43:39.000Z | 2022-03-31T20:13:08.000Z | testData/org/elixir_lang/reference/module/multiple_alias/nested/multiple_alias_bee.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 145 | 2015-01-15T11:37:16.000Z | 2021-12-22T05:51:02.000Z | defmodule Prefix.MultipleAliasBee do
end
| 13.666667 | 36 | 0.878049 |
1ae2fb1d2b097ebf4122cc3f68128904ea82a8c8 | 2,249 | exs | Elixir | test/events_tools/comments/comments_test.exs | community-tools/community-tools | 40b0e6cc9234b44593d2ab60bb2303d7224deb30 | [
"Apache-2.0"
] | 2 | 2017-10-06T01:14:35.000Z | 2017-11-18T16:44:44.000Z | test/events_tools/comments/comments_test.exs | community-tools/community-tools | 40b0e6cc9234b44593d2ab60bb2303d7224deb30 | [
"Apache-2.0"
] | 6 | 2017-10-06T00:04:59.000Z | 2017-10-06T00:09:27.000Z | test/events_tools/comments/comments_test.exs | apps-team/community-tools | 40b0e6cc9234b44593d2ab60bb2303d7224deb30 | [
"Apache-2.0"
] | 1 | 2017-10-06T01:17:35.000Z | 2017-10-06T01:17:35.000Z | defmodule CommunityTools.CommentsTest do
use CommunityTools.DataCase
alias CommunityTools.Comments
describe "comments" do
alias CommunityTools.Comments.Comment
@valid_attrs %{body: "some body", title: "some title"}
@update_attrs %{body: "some updated body", title: "some updated title"}
@invalid... | 33.073529 | 91 | 0.68297 |
1ae30d985977ef4766a62e198d4701853d992b49 | 5,435 | exs | Elixir | apps/ldap_write/test/ldap_write_test.exs | jeffweiss/openrobby | 9fed2024e6ce87a6fe27ef3af85558f3116aca2a | [
"Apache-2.0"
] | null | null | null | apps/ldap_write/test/ldap_write_test.exs | jeffweiss/openrobby | 9fed2024e6ce87a6fe27ef3af85558f3116aca2a | [
"Apache-2.0"
] | null | null | null | apps/ldap_write/test/ldap_write_test.exs | jeffweiss/openrobby | 9fed2024e6ce87a6fe27ef3af85558f3116aca2a | [
"Apache-2.0"
] | null | null | null | defmodule LdapWriteWorkerTest do
use ExUnit.Case
alias LdapWrite.Worker
test "given a valid connection, user_dn, and password, do_write returns :ok" do
assert Worker.write_password("uid=tom,ou=users,dc=example,dc=com", "new_password") == :ok
end
test "given an error message from LDAP, handle_write_resu... | 51.273585 | 357 | 0.659062 |
1ae30dbaa17d29c6bdf6ea825f452f4164da54c4 | 419 | ex | Elixir | lib/websockets/base/transport.ex | rradz/testy | 76ac242ea4a4e42a5457663f046fdb4ecae1b5ff | [
"MIT"
] | null | null | null | lib/websockets/base/transport.ex | rradz/testy | 76ac242ea4a4e42a5457663f046fdb4ecae1b5ff | [
"MIT"
] | null | null | null | lib/websockets/base/transport.ex | rradz/testy | 76ac242ea4a4e42a5457663f046fdb4ecae1b5ff | [
"MIT"
] | null | null | null | defmodule Testy.Websockets.Base.Transport do
@moduledoc """
Module defining behaviour to which transport implementations for Testy must adhere.
"""
@doc """
Decodes a binary message
"""
@callback decode(:binary) :: {:ok, Testy.Websockets.Base.Request.t()} | {:error, any()}
@doc """
Encodes a map.
... | 26.1875 | 90 | 0.658711 |
1ae31dfa60320bed0e5ead571d28c25b926ffaea | 126 | ex | Elixir | builder-0.0.1/debian/menu.ex | milindsingh/dev-shell-scripts | 1fbae838287bd504b0f401234cdcc4bdc5fafa53 | [
"MIT"
] | 11 | 2019-06-18T15:47:44.000Z | 2021-12-03T00:20:10.000Z | builder-0.0.1/debian/menu.ex | milindsingh/dev-shell-scripts | 1fbae838287bd504b0f401234cdcc4bdc5fafa53 | [
"MIT"
] | null | null | null | builder-0.0.1/debian/menu.ex | milindsingh/dev-shell-scripts | 1fbae838287bd504b0f401234cdcc4bdc5fafa53 | [
"MIT"
] | 1 | 2019-09-27T13:28:28.000Z | 2019-09-27T13:28:28.000Z | ?package(builder):needs="X11|text|vc|wm" section="Applications/see-menu-manual"\
title="builder" command="/usr/bin/builder"
| 42 | 80 | 0.746032 |
1ae32180653e79de6246884bf1a6029f57f8fd1d | 1,045 | exs | Elixir | test/validations/nested_test.exs | Apelsinka223/vex | dfd399724f7950d91fe6d894bb5a02e3d27bfa24 | [
"MIT"
] | null | null | null | test/validations/nested_test.exs | Apelsinka223/vex | dfd399724f7950d91fe6d894bb5a02e3d27bfa24 | [
"MIT"
] | null | null | null | test/validations/nested_test.exs | Apelsinka223/vex | dfd399724f7950d91fe6d894bb5a02e3d27bfa24 | [
"MIT"
] | null | null | null | defmodule NestedTestRecord do
defstruct author: nil
use Vex.Struct
validates [:author, :name], presence: true
end
defmodule NestedTest do
use ExUnit.Case
test "nested" do
assert Vex.valid?([author: [name: "Foo"]], %{[:author, :name] => [presence: true]})
nested_errors = [{:error, [:author, :name]... | 31.666667 | 108 | 0.630622 |
1ae32235f4ebe1116b63bb591c55ccb7efe60bcd | 1,735 | exs | Elixir | test/xema/cast/true_false_test.exs | depressed-pho/xema | 56de4a5d3b3f37827c70f6052f895c59feb0bb51 | [
"MIT"
] | null | null | null | test/xema/cast/true_false_test.exs | depressed-pho/xema | 56de4a5d3b3f37827c70f6052f895c59feb0bb51 | [
"MIT"
] | null | null | null | test/xema/cast/true_false_test.exs | depressed-pho/xema | 56de4a5d3b3f37827c70f6052f895c59feb0bb51 | [
"MIT"
] | null | null | null | defmodule Xema.Cast.TrueFalseTest do
use ExUnit.Case, async: true
import Xema, only: [cast: 2, cast!: 2]
alias Xema.ValidationError
@set [:atom, "str", 1.1, 1, [], %{}, {:tuple}]
describe "true schema" do
setup do
%{
schema: Xema.new(true)
}
end
test "cast/2", %{schema: sc... | 22.828947 | 72 | 0.532565 |
1ae3538e6b14a121321afc105d6274701610021d | 4,527 | ex | Elixir | clients/analytics_data/lib/google_api/analytics_data/v1alpha/model/run_report_response.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/analytics_data/lib/google_api/analytics_data/v1alpha/model/run_report_response.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/analytics_data/lib/google_api/analytics_data/v1alpha/model/run_report_response.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... | 63.760563 | 459 | 0.74376 |
1ae3720f4d50c2c65c1b17e4468e8aba8b15f9ae | 2,191 | exs | Elixir | countdown/config/prod.exs | cashmann/phoenix-tutorial | ea37b9d54a79df9bc1351a948eb8f8400c5e62ff | [
"MIT"
] | null | null | null | countdown/config/prod.exs | cashmann/phoenix-tutorial | ea37b9d54a79df9bc1351a948eb8f8400c5e62ff | [
"MIT"
] | 3 | 2021-03-09T20:36:45.000Z | 2021-05-10T17:47:02.000Z | countdown/config/prod.exs | cashmann/phoenix-tutorial | ea37b9d54a79df9bc1351a948eb8f8400c5e62ff | [
"MIT"
] | null | null | null | use Mix.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
# CountdownWeb.Endpoint.init/2 when load_from_system_env is
# true. Any dynamic configuration should be done there.
#
# ... | 33.707692 | 67 | 0.72387 |
1ae37a578737529c6947f3c58afa83e60be734ed | 1,192 | ex | Elixir | lib/money/currency/ecto_type.ex | SafeBoda/money | 249af6078039825b4d332931838dded5e15bdfaf | [
"MIT"
] | null | null | null | lib/money/currency/ecto_type.ex | SafeBoda/money | 249af6078039825b4d332931838dded5e15bdfaf | [
"MIT"
] | null | null | null | lib/money/currency/ecto_type.ex | SafeBoda/money | 249af6078039825b4d332931838dded5e15bdfaf | [
"MIT"
] | null | null | null | if Code.ensure_compiled?(Ecto.Type) do
defmodule Money.Currency.Ecto.Type do
@moduledoc """
Provides a type for Ecto to store a currency.
The underlying data type is a string.
## Migration Example
create table(:my_table) do
add :currency, :string
end
## Schema Example
... | 22.923077 | 71 | 0.592282 |
1ae3a85e31dd8cd5e897f31ee4826636950affd9 | 3,082 | ex | Elixir | lib/parser.ex | wilwade/arguments | 2e58cb41146291e7944b556b2fea0f76d209341f | [
"Apache-2.0"
] | 2 | 2017-07-16T13:15:33.000Z | 2017-07-21T00:55:52.000Z | lib/parser.ex | wilwade/arguments | 2e58cb41146291e7944b556b2fea0f76d209341f | [
"Apache-2.0"
] | null | null | null | lib/parser.ex | wilwade/arguments | 2e58cb41146291e7944b556b2fea0f76d209341f | [
"Apache-2.0"
] | null | null | null | defmodule Arguments.Parser do
@moduledoc """
Parses arguments into a map for easy pattern matching
"""
@doc """
Parse will take a list of incoming arguments and a list of built arguments to generate a map
"""
@spec parse(String.t, [map]) :: map
def parse(incoming, arguments) do
incoming
|> Opti... | 29.634615 | 94 | 0.648929 |
1ae3f3989306b6cccd61733e3ffd6aef7df227d0 | 325 | exs | Elixir | test/fortnox_ex_test.exs | rsystem-se/fortnox_ex | 42516a8d364d7b3efb2d09bcfd1bd6dbb0238463 | [
"MIT"
] | 2 | 2021-02-03T14:40:22.000Z | 2021-02-03T17:11:48.000Z | test/fortnox_ex_test.exs | rsystem-se/fortnox_ex | 42516a8d364d7b3efb2d09bcfd1bd6dbb0238463 | [
"MIT"
] | null | null | null | test/fortnox_ex_test.exs | rsystem-se/fortnox_ex | 42516a8d364d7b3efb2d09bcfd1bd6dbb0238463 | [
"MIT"
] | null | null | null | defmodule FortnoxExTest do
use ExUnit.Case
@tag :skip
test "test connectivity" do
FortnoxEx.Connection.new("1234", "567890")
|> FortnoxEx.Api.Default.list_customers()
end
@tag :skip
test "test get_auth_code" do
{:ok, access_token} = FortnoxEx.Connection.get_access_token("1234", "567890")
end... | 21.666667 | 81 | 0.704615 |
1ae3fdd74820a72c862ff5314dc0bc82d66677a4 | 822 | exs | Elixir | apps/buzzcms_web/test/buzzcms_web/resolvers/resolver_test.exs | buzzcms/buzzcms | 8ca8e6dea381350f94cc4a666448b5dba6676520 | [
"Apache-2.0"
] | null | null | null | apps/buzzcms_web/test/buzzcms_web/resolvers/resolver_test.exs | buzzcms/buzzcms | 8ca8e6dea381350f94cc4a666448b5dba6676520 | [
"Apache-2.0"
] | 41 | 2020-02-12T07:53:14.000Z | 2020-03-30T02:18:14.000Z | apps/buzzcms_web/test/buzzcms_web/resolvers/resolver_test.exs | buzzcms/buzzcms | 8ca8e6dea381350f94cc4a666448b5dba6676520 | [
"Apache-2.0"
] | null | null | null | files = Path.wildcard("test/support/graphql/public/*/*")
defmodule BuzzcmsWeb.ResolverTest do
use BuzzcmsWeb.ConnCase
describe "resolver test" do
Enum.each(files, fn file ->
test "#{file |> String.replace("test/support/graphql/public/", "")}", %{conn: conn} do
%{query: query, result: result} = r... | 28.344828 | 92 | 0.599757 |
1ae46eeb285169b98dd5204abc5afd51bc9424b4 | 2,130 | ex | Elixir | lib/shared_settings/ui/router.ex | kieraneglin/shared-settings-ui-ex | c885d1d191bdc6641a5dfdefae5ec764ba379e0e | [
"Unlicense"
] | 2 | 2020-09-08T17:25:41.000Z | 2020-10-28T14:15:36.000Z | lib/shared_settings/ui/router.ex | kieraneglin/shared-settings-ui-ex | c885d1d191bdc6641a5dfdefae5ec764ba379e0e | [
"Unlicense"
] | null | null | null | lib/shared_settings/ui/router.ex | kieraneglin/shared-settings-ui-ex | c885d1d191bdc6641a5dfdefae5ec764ba379e0e | [
"Unlicense"
] | null | null | null | defmodule SharedSettings.UI.Router do
use Plug.Router
require EEx
alias SharedSettings.UI.Parser
plug(Plug.Logger, log: :debug)
plug(Plug.Static,
at: "/public",
from: :shared_settings_ui,
gzip: true
)
plug(Plug.Parsers,
parsers: [:json],
json_decoder: Jason
)
plug(:match)
pl... | 22.659574 | 97 | 0.651643 |
1ae47103c55ee6e8283e389e3c0152dc3a8b4074 | 776 | ex | Elixir | elixir/lib/homework/transactions/transaction.ex | MilioFrankie/transactions-app | 5299526824393d2de3c4d6435286d665829991c5 | [
"MIT"
] | null | null | null | elixir/lib/homework/transactions/transaction.ex | MilioFrankie/transactions-app | 5299526824393d2de3c4d6435286d665829991c5 | [
"MIT"
] | 3 | 2021-09-02T19:01:31.000Z | 2022-02-27T11:09:27.000Z | elixir/lib/homework/transactions/transaction.ex | MilioFrankie/transactions-app | 5299526824393d2de3c4d6435286d665829991c5 | [
"MIT"
] | null | null | null | defmodule Homework.Transactions.Transaction do
use Ecto.Schema
import Ecto.Changeset
alias Homework.Merchants.Merchant
alias Homework.Users.User
@fields [:user_id, :amount, :credit, :debit, :description, :merchant_id]
@primary_key {:id, :binary_id, autogenerate: true}
schema "transactions" do
field(:... | 27.714286 | 80 | 0.710052 |
1ae47b8a6d1665b2ebdfecd5e8e6fa63007c84f3 | 2,454 | ex | Elixir | lib/algs/matrix.ex | penqen/yukicoder-elixir | 4f3e9e4694a14434cc3700280e9205226434733b | [
"MIT"
] | null | null | null | lib/algs/matrix.ex | penqen/yukicoder-elixir | 4f3e9e4694a14434cc3700280e9205226434733b | [
"MIT"
] | null | null | null | lib/algs/matrix.ex | penqen/yukicoder-elixir | 4f3e9e4694a14434cc3700280e9205226434733b | [
"MIT"
] | null | null | null | defmodule Matrix do
@moduledoc """
多次元配列を取り扱うヘルパーモジュールです。
## 2 x 3 行列の場合
iex> Matrix.new(2, 3)
[
[nil, nil],
[nil, nil],
[nil, nil]
]
## 行列をマップに変換する
iex> Matrix.new(3, 3)
...> |> Matrix.to_map()
%{
0 => %{ 0 => nil, 1 => nil, 2 => nil},
1 => %{ 0 => nil,... | 23.596154 | 110 | 0.486553 |
1ae48ca0c3342a3388f2bfe32a48756861d9d8ac | 1,142 | exs | Elixir | deps/dialyxir/mix.exs | robot-overlord/starter_kit | 254153221d0a3a06324c65ad8e89d610de2429c3 | [
"MIT"
] | 1 | 2020-01-31T10:23:37.000Z | 2020-01-31T10:23:37.000Z | deps/dialyxir/mix.exs | robot-overlord/starter_kit | 254153221d0a3a06324c65ad8e89d610de2429c3 | [
"MIT"
] | null | null | null | deps/dialyxir/mix.exs | robot-overlord/starter_kit | 254153221d0a3a06324c65ad8e89d610de2429c3 | [
"MIT"
] | null | null | null | defmodule Dialyxir.Mixfile do
use Mix.Project
def project do
[
app: :dialyxir,
version: "0.5.0",
elixir: "> 1.3.2",
description: description(),
package: package(),
deps: [ {:ex_doc, ">= 0.0.0", only: :dev} ],
dialyzer: [ plt_apps: [:dialyzer, :elixir, :kernel, :mix, :s... | 26.55814 | 75 | 0.570053 |
1ae48dceac3262889c2c65a77505a0d0843f44b6 | 2,257 | exs | Elixir | config/dev.exs | rheubach/live-share-prop | b92bcaca16fc42e31a3edb5d8922cbfcb2cceb88 | [
"MIT"
] | 68 | 2020-02-13T15:17:39.000Z | 2022-03-29T23:21:19.000Z | config/dev.exs | rheubach/live-share-prop | b92bcaca16fc42e31a3edb5d8922cbfcb2cceb88 | [
"MIT"
] | 30 | 2020-04-16T17:21:22.000Z | 2021-09-20T21:47:12.000Z | config/dev.exs | rheubach/live-share-prop | b92bcaca16fc42e31a3edb5d8922cbfcb2cceb88 | [
"MIT"
] | 7 | 2020-06-07T16:19:14.000Z | 2022-02-09T23:31:25.000Z | use Mix.Config
# Configure your database
config :live_deck, LiveDeck.Repo,
username: "postgres",
password: "postgres",
database: "live_deck_dev",
hostname: "localhost",
show_sensitive_data_on_connection_error: true,
pool_size: 10
# For development, we disable any cache and enable
# debugging and code relo... | 29.311688 | 96 | 0.709349 |
1ae4a4b3d44eb16a60ea50cc79ce4ca5a8a6516f | 16,869 | ex | Elixir | test/support/test_support.ex | Zurga/cldr_units | d90ae5987608b741bd0f531fd760f1e142ff9293 | [
"Apache-2.0"
] | null | null | null | test/support/test_support.ex | Zurga/cldr_units | d90ae5987608b741bd0f531fd760f1e142ff9293 | [
"Apache-2.0"
] | null | null | null | test/support/test_support.ex | Zurga/cldr_units | d90ae5987608b741bd0f531fd760f1e142ff9293 | [
"Apache-2.0"
] | null | null | null | defmodule Cldr.Unit.TestSupport do
@moduledoc """
Helper functions for formatting and the formatting protocols.
Formatters are `GenServer`s specified during ExUnit configuration
that receive a series of events as casts.
The following events are possible:
* `{:suite_started, opts}` -
the suite has... | 29.646749 | 101 | 0.637026 |
1ae4a5439726c0bd27cb35bde4f2fdf49207f80f | 358 | ex | Elixir | apps/object_storage/lib/object_storage.ex | IrinaS-D/tailwind-beginner-site | 999b16fd89b20b6af4e33bb51acca670ccda6216 | [
"MIT"
] | null | null | null | apps/object_storage/lib/object_storage.ex | IrinaS-D/tailwind-beginner-site | 999b16fd89b20b6af4e33bb51acca670ccda6216 | [
"MIT"
] | null | null | null | apps/object_storage/lib/object_storage.ex | IrinaS-D/tailwind-beginner-site | 999b16fd89b20b6af4e33bb51acca670ccda6216 | [
"MIT"
] | null | null | null | defmodule Legendary.ObjectStorage do
@moduledoc """
Legendary.ObjectStorage keeps the contexts that define your domain
and business logic.
Contexts are also responsible for managing your data, regardless
if it comes from the database, an external API or others.
"""
def bucket_name, do: Application.get_e... | 29.833333 | 73 | 0.776536 |
1ae4c493e5d35690ad28bbf8a50d475e6d9db401 | 750 | exs | Elixir | config/config.exs | verrchu/james | 266ad1bc81afe239b962a9f8106fa695b237dcb1 | [
"MIT"
] | null | null | null | config/config.exs | verrchu/james | 266ad1bc81afe239b962a9f8106fa695b237dcb1 | [
"MIT"
] | null | null | null | config/config.exs | verrchu/james | 266ad1bc81afe239b962a9f8106fa695b237dcb1 | [
"MIT"
] | null | null | null | use Mix.Config
config :logger,
backends: [:console]
config :logger, :console,
level: :debug,
format: "\n$time $metadata[$level] $levelpad$message\n",
metadata: [:pid]
config :james,
api_scheme: {:system, :atom, "JAMES_API_SCHEME", :https},
api_host: {:system, :string, "JAMES_API_HOST", "api.telegram.org"... | 35.714286 | 91 | 0.702667 |
1ae4c62492c36c8ff3a64dd920448420cad1dfc8 | 447 | ex | Elixir | lib/chat_web/channels/water_cooler_channel.ex | MarbilleJuntado/phoenix_chat | 5e6847db74a86eed57ebbf75a418a1f9279f89f9 | [
"MIT"
] | null | null | null | lib/chat_web/channels/water_cooler_channel.ex | MarbilleJuntado/phoenix_chat | 5e6847db74a86eed57ebbf75a418a1f9279f89f9 | [
"MIT"
] | null | null | null | lib/chat_web/channels/water_cooler_channel.ex | MarbilleJuntado/phoenix_chat | 5e6847db74a86eed57ebbf75a418a1f9279f89f9 | [
"MIT"
] | null | null | null | defmodule ChatWeb.WaterCoolerChannel do
use ChatWeb, :channel
alias Chat.Chats
def join("water_cooler:lobby", _payload, socket) do
{:ok, socket}
end
# It is also common to receive messages from the client and
# broadcast to everyone in the current topic (water_cooler:lobby).
def handle_in("shout", ... | 24.833333 | 68 | 0.720358 |
1ae4fb0d822768b189b62c43ceaedd8b66fd8649 | 459 | ex | Elixir | lib/mix_yy_scaffold/Utils.ex | Vorzious/Phoenix-Scaffolder | 334f42e6b94a38f19558767a937ab72e5b8f85dc | [
"MIT"
] | null | null | null | lib/mix_yy_scaffold/Utils.ex | Vorzious/Phoenix-Scaffolder | 334f42e6b94a38f19558767a937ab72e5b8f85dc | [
"MIT"
] | null | null | null | lib/mix_yy_scaffold/Utils.ex | Vorzious/Phoenix-Scaffolder | 334f42e6b94a38f19558767a937ab72e5b8f85dc | [
"MIT"
] | null | null | null | defmodule MixYyScaffold.Utils do
@moduledoc """
Utility functions relating to YY Scaffolding
"""
def downcase(x) when is_binary(x), do: String.downcase(x)
def downcase(nil), do: nil
def downcase(_), do: raise("Not implemented")
def parse_name(name) when is_binary(name) do
name
|> String.trim()
... | 22.95 | 59 | 0.666667 |
1ae520757b676c7f20ce210516b68f5af402ef23 | 36,352 | ex | Elixir | lib/elixir/lib/task.ex | tverlaan/elixir | d25b61db13d94ee83374748581c7bcb8e2dfc0e6 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/task.ex | tverlaan/elixir | d25b61db13d94ee83374748581c7bcb8e2dfc0e6 | [
"Apache-2.0"
] | 1 | 2020-09-14T16:23:33.000Z | 2021-03-25T17:38:59.000Z | lib/elixir/lib/task.ex | tverlaan/elixir | d25b61db13d94ee83374748581c7bcb8e2dfc0e6 | [
"Apache-2.0"
] | null | null | null | defmodule Task do
@moduledoc """
Conveniences for spawning and awaiting tasks.
Tasks are processes meant to execute one particular
action throughout their lifetime, often with little or no
communication with other processes. The most common use case
for tasks is to convert sequential code into concurrent c... | 34.29434 | 106 | 0.672315 |
1ae598d24cf2edaf37c2964ca0fce2ee8c3be310 | 1,815 | ex | Elixir | lib/credo/check/readability/module_names.ex | isaacsanders/credo | 5623570bb2e3944345f1bf11819ca613533b5e10 | [
"MIT"
] | null | null | null | lib/credo/check/readability/module_names.ex | isaacsanders/credo | 5623570bb2e3944345f1bf11819ca613533b5e10 | [
"MIT"
] | null | null | null | lib/credo/check/readability/module_names.ex | isaacsanders/credo | 5623570bb2e3944345f1bf11819ca613533b5e10 | [
"MIT"
] | 1 | 2020-06-30T16:32:44.000Z | 2020-06-30T16:32:44.000Z | defmodule Credo.Check.Readability.ModuleNames do
@moduledoc false
@checkdoc """
Module names are always written in PascalCase in Elixir.
# PascalCase
defmodule MyApp.WebSearchController do
# ...
end
# not PascalCase
defmodule MyApp.Web_searchController do
# ...
... | 22.6875 | 78 | 0.644628 |
1ae5a49300feb6dc8be8dacfb39f605e0e66c7c1 | 6,608 | ex | Elixir | lib/tesla.ex | brittlewis12/tesla | 6f0969733142fb59fbce16af6c13352a928b4783 | [
"MIT"
] | null | null | null | lib/tesla.ex | brittlewis12/tesla | 6f0969733142fb59fbce16af6c13352a928b4783 | [
"MIT"
] | null | null | null | lib/tesla.ex | brittlewis12/tesla | 6f0969733142fb59fbce16af6c13352a928b4783 | [
"MIT"
] | null | null | null | defmodule Tesla.Error do
defexception env: nil, stack: [], reason: nil
def message(%Tesla.Error{env: %{url: url, method: method}, reason: reason}) do
"#{inspect(reason)} (#{method |> to_string |> String.upcase()} #{url})"
end
end
defmodule Tesla.Env do
@type client :: Tesla.Client.t()
@type method :: :h... | 25.913725 | 94 | 0.592464 |
1ae5b1d0445ee1ab0dbc51575942f00215b6cc94 | 2,153 | ex | Elixir | lib/whistler_news_reader/entry_parser.ex | fdietz/whistler_news_reader | 501f3f95e1ba3a684da8b34b60e426da85e7852d | [
"MIT"
] | 8 | 2016-06-12T20:11:26.000Z | 2017-05-02T04:36:41.000Z | lib/whistler_news_reader/entry_parser.ex | fdietz/whistler_news_reader | 501f3f95e1ba3a684da8b34b60e426da85e7852d | [
"MIT"
] | 2 | 2016-06-12T15:49:06.000Z | 2016-06-12T20:00:02.000Z | lib/whistler_news_reader/entry_parser.ex | fdietz/whistler_news_reader | 501f3f95e1ba3a684da8b34b60e426da85e7852d | [
"MIT"
] | null | null | null | defmodule WhistlerNewsReader.EntryParser do
@moduledoc """
Parser for feed entry as returned by elixir-feed-parser hex package.
Generates unique id for all feed entry.
"""
def parse(feed, parsed_entry) do
published = parse_published(feed, parsed_entry)
guid = generate_guid(feed, parsed_en... | 31.661765 | 96 | 0.701811 |
1ae5d2e80caa5d51c672383904776b2b202759a9 | 1,649 | ex | Elixir | clients/dataproc/lib/google_api/dataproc/v1/model/job_scheduling.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/dataproc/lib/google_api/dataproc/v1/model/job_scheduling.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/dataproc/lib/google_api/dataproc/v1/model/job_scheduling.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 35.085106 | 343 | 0.748939 |
1ae5e61514bf77f7670e9573cbccdfc546167151 | 1,128 | ex | Elixir | backend/test/support/mocks/astarte/device/device_status.ex | bejolithic/honeyland | 8c4a0d3b56543648d3acb96cc6906df86526743b | [
"Apache-2.0"
] | null | null | null | backend/test/support/mocks/astarte/device/device_status.ex | bejolithic/honeyland | 8c4a0d3b56543648d3acb96cc6906df86526743b | [
"Apache-2.0"
] | null | null | null | backend/test/support/mocks/astarte/device/device_status.ex | bejolithic/honeyland | 8c4a0d3b56543648d3acb96cc6906df86526743b | [
"Apache-2.0"
] | null | null | null | #
# This file is part of Honeyland.
#
# Copyright 2022 Nervive Studio
#
# 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 ... | 30.486486 | 74 | 0.738475 |
1ae5f68b4ad340703c47edbcbddf54e56c09f75c | 584 | ex | Elixir | lib/crater_web/controllers/fallback_controller.ex | blvdgroup/crater | 78d03de2eac73d90148df6c5d2d03e99b9b5ccb7 | [
"Apache-2.0"
] | 1 | 2018-03-13T08:15:50.000Z | 2018-03-13T08:15:50.000Z | lib/crater_web/controllers/fallback_controller.ex | blvdgroup/crater | 78d03de2eac73d90148df6c5d2d03e99b9b5ccb7 | [
"Apache-2.0"
] | 1 | 2018-03-17T15:45:26.000Z | 2018-03-17T15:45:26.000Z | lib/crater_web/controllers/fallback_controller.ex | blvdgroup/crater | 78d03de2eac73d90148df6c5d2d03e99b9b5ccb7 | [
"Apache-2.0"
] | 1 | 2017-08-30T16:13:09.000Z | 2017-08-30T16:13:09.000Z | defmodule CraterWeb.FallbackController do
@moduledoc """
Translates controller action results into valid `Plug.Conn` responses.
See `Phoenix.Controller.action_fallback/1` for more details.
"""
use CraterWeb, :controller
def call(conn, {:error, %Ecto.Changeset{} = changeset}) do
conn
|> put_status(... | 27.809524 | 74 | 0.707192 |
1ae6172ef5fd974367832e530ec3c793191b1088 | 1,345 | exs | Elixir | test/recurring_events/yearly_test.exs | voughtdq/recurring_events | 93bc1ce12f20d18c6ba9decb33a74bf8619fab0e | [
"MIT"
] | 21 | 2017-01-11T00:02:46.000Z | 2020-12-28T15:59:04.000Z | test/recurring_events/yearly_test.exs | voughtdq/recurring_events | 93bc1ce12f20d18c6ba9decb33a74bf8619fab0e | [
"MIT"
] | 20 | 2017-04-11T20:39:55.000Z | 2021-09-18T09:20:44.000Z | test/recurring_events/yearly_test.exs | voughtdq/recurring_events | 93bc1ce12f20d18c6ba9decb33a74bf8619fab0e | [
"MIT"
] | 9 | 2017-04-11T19:31:20.000Z | 2020-10-14T18:36:27.000Z | defmodule RecurringEvents.YearlyTest do
use ExUnit.Case
doctest RecurringEvents.Yearly
alias RecurringEvents.Yearly
@date ~D[2017-01-01]
@valid_rrule %{freq: :yearly}
test "for count 1 should return only one event" do
events = Yearly.unfold(@date, @valid_rrule |> Map.put(:count, 1))
assert [@date... | 33.625 | 73 | 0.658736 |
1ae62b319fe23285065980ad12ecf11e4aefd912 | 852 | exs | Elixir | test/csv_generator_test.exs | Hermanverschooten/csv_generator | 8cd13ab6859a58d7078f1f33447bf3e2d8676766 | [
"MIT"
] | 10 | 2020-03-29T17:09:39.000Z | 2021-05-13T15:43:19.000Z | test/csv_generator_test.exs | Hermanverschooten/csv_generator | 8cd13ab6859a58d7078f1f33447bf3e2d8676766 | [
"MIT"
] | null | null | null | test/csv_generator_test.exs | Hermanverschooten/csv_generator | 8cd13ab6859a58d7078f1f33447bf3e2d8676766 | [
"MIT"
] | 1 | 2020-04-01T00:56:06.000Z | 2020-04-01T00:56:06.000Z | defmodule CsvGeneratorTest do
use ExUnit.Case
defmodule MyCSV do
use CsvGenerator
header true
column :name, :string, header: "player"
column :points, :integer
column :calculated, :float, digits: 1, source: :points, with: &calc/1
hardcoded :date, "today", ~D[2020-03-29]
column :hour, :... | 25.818182 | 79 | 0.539906 |
1ae6374769de0581e4378a1e323255956675fbcf | 668 | exs | Elixir | test/remote_points/updater_test.exs | DianaOlympos/remote_test | e222d4e937789871baab3a7b4fd8428b714c1af4 | [
"MIT"
] | 1 | 2020-09-18T03:32:45.000Z | 2020-09-18T03:32:45.000Z | test/remote_points/updater_test.exs | DianaOlympos/remote_test | e222d4e937789871baab3a7b4fd8428b714c1af4 | [
"MIT"
] | null | null | null | test/remote_points/updater_test.exs | DianaOlympos/remote_test | e222d4e937789871baab3a7b4fd8428b714c1af4 | [
"MIT"
] | null | null | null | defmodule RemotePoints.UpdaterTest do
use RemotePoints.DataCase
alias RemotePoints.Points
alias RemotePoints.Points.Updater
describe "update" do
alias RemotePoints.Points.User
@valid_attrs %{points: 42}
def user_fixture(attrs \\ %{}) do
{:ok, user} =
attrs
|> Enum.into(@val... | 20.875 | 55 | 0.642216 |
1ae65de8a6d75d379b3f5819a3831abcbb61edfa | 1,203 | exs | Elixir | config/prod.secret.exs | barboza/chatter | 16a56aea83eceb0fd1a709f3bc8d3a24812996cd | [
"MIT"
] | 2 | 2019-08-29T19:35:01.000Z | 2019-08-31T04:08:03.000Z | config/prod.secret.exs | barboza/chatter | 16a56aea83eceb0fd1a709f3bc8d3a24812996cd | [
"MIT"
] | 1 | 2021-03-09T16:10:46.000Z | 2021-03-09T16:10:46.000Z | config/prod.secret.exs | barboza/chatter | 16a56aea83eceb0fd1a709f3bc8d3a24812996cd | [
"MIT"
] | null | null | null | # In this file, we load production configuration and secrets
# from environment variables. You can also hardcode secrets,
# although such is generally not recommended and you have to
# remember to add this file to your .gitignore.
use Mix.Config
database_url =
System.get_env("DATABASE_URL") ||
raise """
envi... | 30.846154 | 76 | 0.727348 |
1ae6694537f2a1af2dded74a688637a7bdea1e67 | 33,886 | ex | Elixir | lib/messages.ex | bminevsb/extreme | 1f6902be1726ad5c686a67f0658af5504a30b195 | [
"MIT"
] | null | null | null | lib/messages.ex | bminevsb/extreme | 1f6902be1726ad5c686a67f0658af5504a30b195 | [
"MIT"
] | null | null | null | lib/messages.ex | bminevsb/extreme | 1f6902be1726ad5c686a67f0658af5504a30b195 | [
"MIT"
] | null | null | null | defmodule Extreme.Msg do
defmodule OperationResult do
@moduledoc false
use Protobuf, enum: true, syntax: :proto2
@type t ::
integer
| :Success
| :PrepareTimeout
| :CommitTimeout
| :ForwardTimeout
| :WrongExpectedVersion
|... | 28.962393 | 97 | 0.612318 |
1ae66dcdaef95de9dca1b34b6a58f71720a39995 | 12,826 | ex | Elixir | lib/tesla_api/auth.ex | sit/teslamate | 0ecca44209f99646d363805a2206c8a7885d62fa | [
"MIT"
] | null | null | null | lib/tesla_api/auth.ex | sit/teslamate | 0ecca44209f99646d363805a2206c8a7885d62fa | [
"MIT"
] | 11 | 2020-07-22T06:23:22.000Z | 2020-08-31T06:38:50.000Z | lib/tesla_api/auth.ex | sit/teslamate | 0ecca44209f99646d363805a2206c8a7885d62fa | [
"MIT"
] | null | null | null | defmodule TeslaApi.Auth do
use Tesla
require Logger
alias TeslaApi.Error
@web_client_id "ownerapi"
@client_id "81527cff06843c8634fdc09e8ac0abefb46ac849f38fe1e431c2ef2106796384"
@client_secret "c7257eb71a564034f9419ee651c7d0e5f7aa6bfbd18bafb5c5c033b093bb2fa3"
@redirect_uri "https://auth.tesla.com/void/c... | 29.485057 | 93 | 0.563075 |
1ae67962143d019f0ca9d4cf7fd459612c675fcb | 152 | exs | Elixir | code_examples/ping.exs | carlosipe/intro-to-elixir-slides | 65c5705d3250e848f08e4c59d97a9dc3b706be24 | [
"MIT"
] | null | null | null | code_examples/ping.exs | carlosipe/intro-to-elixir-slides | 65c5705d3250e848f08e4c59d97a9dc3b706be24 | [
"MIT"
] | null | null | null | code_examples/ping.exs | carlosipe/intro-to-elixir-slides | 65c5705d3250e848f08e4c59d97a9dc3b706be24 | [
"MIT"
] | null | null | null | defmodule Table do
def ping do
receive do
:ping -> IO.puts "received ping"
end
end
def start do
spawn(&Table.ping/0)
end
end
| 12.666667 | 38 | 0.611842 |
1ae681e5d36ef7b65e215112fd6364f3f5649f90 | 377 | ex | Elixir | lib/phx_api/reports/statement.ex | trevligare/phx_api | ea622cfe15b2c3248374a70aaa65edca53cc3171 | [
"MIT"
] | null | null | null | lib/phx_api/reports/statement.ex | trevligare/phx_api | ea622cfe15b2c3248374a70aaa65edca53cc3171 | [
"MIT"
] | null | null | null | lib/phx_api/reports/statement.ex | trevligare/phx_api | ea622cfe15b2c3248374a70aaa65edca53cc3171 | [
"MIT"
] | null | null | null | defmodule PhxApi.Reports.Statement do
use Ecto.Schema
import Ecto.Changeset
schema "statements" do
field :nice, :boolean, default: false
field :text, :string
field :reporter_id, :id
timestamps()
end
@doc false
def changeset(statement, attrs) do
statement
|> cast(attrs, [:text, :n... | 17.952381 | 41 | 0.66313 |
1ae70402ba3f947916110eb2f5a951d71939dedc | 4,562 | ex | Elixir | clients/android_publisher/lib/google_api/android_publisher/v2/model/in_app_product.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/android_publisher/lib/google_api/android_publisher/v2/model/in_app_product.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/android_publisher/lib/google_api/android_publisher/v2/model/in_app_product.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 ... | 55.634146 | 312 | 0.696624 |
1ae7064fb8861e4d3034916a696b6356ef91b44a | 365 | exs | Elixir | auth_api_example/priv/repo/seeds.exs | JohnBortotti/learning-elixir | 54ce9c50904e809065d0321d51367cea7a5b2bf8 | [
"MIT"
] | null | null | null | auth_api_example/priv/repo/seeds.exs | JohnBortotti/learning-elixir | 54ce9c50904e809065d0321d51367cea7a5b2bf8 | [
"MIT"
] | null | null | null | auth_api_example/priv/repo/seeds.exs | JohnBortotti/learning-elixir | 54ce9c50904e809065d0321d51367cea7a5b2bf8 | [
"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:
#
# AuthApiExample.Repo.insert!(%AuthApiExample.SomeSchema{})
#
# We recommend using the bang functions (`insert!`, `update!`
# and so on... | 30.416667 | 63 | 0.717808 |
1ae7090f621e6268dfd2a7fd8133b832caed7df5 | 1,821 | ex | Elixir | lib/songmate_web/controllers/user_controller.ex | jenny-codes/music-dating-app | ac0bdba90d26cad327992bc0c3ead34f42b3f82f | [
"MIT"
] | 8 | 2020-06-06T02:12:36.000Z | 2021-10-12T16:47:20.000Z | lib/songmate_web/controllers/user_controller.ex | jenny-codes/music-dating-app | ac0bdba90d26cad327992bc0c3ead34f42b3f82f | [
"MIT"
] | 2 | 2021-03-10T18:43:20.000Z | 2021-07-16T04:37:20.000Z | lib/songmate_web/controllers/user_controller.ex | jenny-codes/music-dating-app | ac0bdba90d26cad327992bc0c3ead34f42b3f82f | [
"MIT"
] | 1 | 2020-06-24T08:41:09.000Z | 2020-06-24T08:41:09.000Z | defmodule SongmateWeb.UserController do
use SongmateWeb, :controller
alias Songmate.UseCase.{
GetUserMusicRecords,
FindTopMatch,
FindSharedMusic
}
alias Songmate.AccountService
plug(SongmateWeb.SyncUserInfoPlug)
def index(conn, _params) do
music_records = GetUserMusicRecords.call(conn.as... | 27.179104 | 85 | 0.653487 |
1ae709b79fb14566c31d3f1c67a97f87a9d528b3 | 4,705 | exs | Elixir | test/graphql/lang/lexer_test.exs | seanabrahams/graphql-elixir | 568a07da317e19621cc0c931d738b4eda75f0a35 | [
"BSD-3-Clause"
] | null | null | null | test/graphql/lang/lexer_test.exs | seanabrahams/graphql-elixir | 568a07da317e19621cc0c931d738b4eda75f0a35 | [
"BSD-3-Clause"
] | null | null | null | test/graphql/lang/lexer_test.exs | seanabrahams/graphql-elixir | 568a07da317e19621cc0c931d738b4eda75f0a35 | [
"BSD-3-Clause"
] | null | null | null | defmodule GraphQL.Lang.Lexer.LexerTest do
use ExUnit.Case, async: true
def assert_tokens(input, tokens) do
case :graphql_lexer.string(input) do
{:ok, output, _} ->
assert output == tokens
{:error, {_, :graphql_lexer, output}, _} ->
assert output == tokens
end
end
# Ignored ... | 34.851852 | 70 | 0.472051 |
1ae70bebab96c0af8bb7c4ff870a13e0989605f6 | 3,610 | ex | Elixir | clients/game_services/lib/google_api/game_services/v1/model/operation_metadata.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/game_services/lib/google_api/game_services/v1/model/operation_metadata.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/game_services/lib/google_api/game_services/v1/model/operation_metadata.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... | 50.138889 | 395 | 0.701385 |
1ae71c0c5ac7f7e3f254b85afa999a024c8315bc | 3,807 | ex | Elixir | lib/koans/13_functions.ex | tootoobeepbeep/elixir-koans-ans | 01b0962e1db0c51a72e33820a360c216ce466f31 | [
"MIT"
] | null | null | null | lib/koans/13_functions.ex | tootoobeepbeep/elixir-koans-ans | 01b0962e1db0c51a72e33820a360c216ce466f31 | [
"MIT"
] | null | null | null | lib/koans/13_functions.ex | tootoobeepbeep/elixir-koans-ans | 01b0962e1db0c51a72e33820a360c216ce466f31 | [
"MIT"
] | null | null | null | defmodule Functions do
use Koans
@intro "Functions"
def greet(name) do
"Hello, #{name}!"
end
koan "Functions map arguments to outputs" do
assert greet("World") == "Hello, World!"
end
def multiply(a, b), do: a * b
koan "Single line functions are cool, but mind the comma and the colon!" do
... | 29.976378 | 104 | 0.640662 |
1ae723d0493b2b8a9771b26878a388db9a0c0e56 | 2,174 | ex | Elixir | clients/fusion_tables/lib/google_api/fusion_tables/v2/model/style_setting_list.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/fusion_tables/lib/google_api/fusion_tables/v2/model/style_setting_list.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/fusion_tables/lib/google_api/fusion_tables/v2/model/style_setting_list.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... | 38.821429 | 170 | 0.718031 |
1ae73b902da13bdfb641221182fc3295bc3556ec | 405 | ex | Elixir | lib/twaddler/db/role.ex | woeye/twaddler | e06a22a94520055bc33aaaacfe51989ba8ab665f | [
"Apache-2.0"
] | 1 | 2018-10-08T13:57:08.000Z | 2018-10-08T13:57:08.000Z | lib/twaddler/db/role.ex | woeye/twaddler | e06a22a94520055bc33aaaacfe51989ba8ab665f | [
"Apache-2.0"
] | null | null | null | lib/twaddler/db/role.ex | woeye/twaddler | e06a22a94520055bc33aaaacfe51989ba8ab665f | [
"Apache-2.0"
] | 1 | 2018-10-08T13:55:44.000Z | 2018-10-08T13:55:44.000Z | defmodule Twaddler.Db.Role do
use Ecto.Schema
import Ecto.Changeset
import Twaddler.Db.Common
schema "roles" do
field :uuid, :string
field :name, :string
timestamps()
many_to_many :users, Twaddler.Db.User, join_through: "users_roles"
end
def changeset(role, attrs) do
role
|> cast(... | 19.285714 | 70 | 0.666667 |
1ae73dc6cccbe1f7f921fa3cb23d996a2434e545 | 677 | ex | Elixir | lib/console/schema/role_binding.ex | pluralsh/console | 38a446ce1bc2f7bc3e904fcacb102d3d57835ada | [
"Apache-2.0"
] | 6 | 2021-11-17T21:10:49.000Z | 2022-02-16T19:45:28.000Z | lib/console/schema/role_binding.ex | pluralsh/console | 38a446ce1bc2f7bc3e904fcacb102d3d57835ada | [
"Apache-2.0"
] | 18 | 2021-11-25T04:31:06.000Z | 2022-03-27T04:54:00.000Z | lib/console/schema/role_binding.ex | pluralsh/console | 38a446ce1bc2f7bc3e904fcacb102d3d57835ada | [
"Apache-2.0"
] | null | null | null | defmodule Console.Schema.RoleBinding do
use Piazza.Ecto.Schema
alias Console.Schema.{User, Group, Role}
schema "role_bindings" do
belongs_to :user, User
belongs_to :role, Role
belongs_to :group, Group
timestamps()
end
@valid ~w(user_id group_id role_id)a
def changeset(model, attrs \\ %{}... | 27.08 | 92 | 0.698671 |
1ae74e864988b69a50a48ae72d1ce2e98ef560c3 | 1,581 | exs | Elixir | installer/templates/phx_umbrella/apps/app_name/mix.exs | sheharyarn/phoenix | 60fce56798cf074a784988ebedb97d17247e5d68 | [
"MIT"
] | 1 | 2019-04-24T09:28:15.000Z | 2019-04-24T09:28:15.000Z | installer/templates/phx_umbrella/apps/app_name/mix.exs | sheharyarn/phoenix | 60fce56798cf074a784988ebedb97d17247e5d68 | [
"MIT"
] | null | null | null | installer/templates/phx_umbrella/apps/app_name/mix.exs | sheharyarn/phoenix | 60fce56798cf074a784988ebedb97d17247e5d68 | [
"MIT"
] | null | null | null | defmodule <%= app_module %>.MixProject do
use Mix.Project
def project do
[
app: :<%= app_name %>,
version: "0.1.0",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixir: "~> 1.5",
elixirc_... | 27.258621 | 84 | 0.57938 |
1ae750830164b96c1fcedea0fb30012c4665365c | 982 | ex | Elixir | examples/event_consumer.ex | skwerlman/nostrum | 4a6642df9fbfd9a9247e565ab3f4d8d1e6f6ed4f | [
"MIT"
] | 2 | 2020-03-03T02:51:57.000Z | 2021-01-18T02:24:42.000Z | examples/event_consumer.ex | skwerlman/nostrum | 4a6642df9fbfd9a9247e565ab3f4d8d1e6f6ed4f | [
"MIT"
] | null | null | null | examples/event_consumer.ex | skwerlman/nostrum | 4a6642df9fbfd9a9247e565ab3f4d8d1e6f6ed4f | [
"MIT"
] | null | null | null | defmodule ExampleSupervisor do
def start_link do
import Supervisor.Spec
children = [ExampleConsumer]
Supervisor.start_link(children, strategy: :one_for_one)
end
end
defmodule ExampleConsumer do
use Nostrum.Consumer
alias Nostrum.Api
def start_link do
Consumer.start_link(__MODULE__)
end
... | 21.822222 | 81 | 0.665988 |
1ae751b01b517dcd7f0f6b73a5659f53719c88d3 | 322 | exs | Elixir | examples/ecto_job_priority_demo/priv/repo/migrations/20190714001622_create_job_queue.exs | thedelchop/ecto_job | 0157d857e4436a35ebcc0a9f5cd4b28b33292f62 | [
"MIT"
] | 268 | 2017-08-15T12:55:41.000Z | 2022-03-20T22:42:18.000Z | examples/ecto_job_priority_demo/priv/repo/migrations/20190714001622_create_job_queue.exs | thedelchop/ecto_job | 0157d857e4436a35ebcc0a9f5cd4b28b33292f62 | [
"MIT"
] | 52 | 2018-01-15T20:47:54.000Z | 2021-12-24T06:13:55.000Z | examples/ecto_job_priority_demo/priv/repo/migrations/20190714001622_create_job_queue.exs | thedelchop/ecto_job | 0157d857e4436a35ebcc0a9f5cd4b28b33292f62 | [
"MIT"
] | 38 | 2018-01-08T12:26:19.000Z | 2021-06-01T12:41:09.000Z | defmodule EctoJobPriorityDemo.Repo.Migrations.CreateJobQueue do
@moduledoc false
use Ecto.Migration
def up do
EctoJob.Migrations.Install.up()
EctoJob.Migrations.CreateJobTable.up("jobs")
end
def down do
EctoJob.Migrations.CreateJobTable.down("jobs")
EctoJob.Migrations.Install.down()
end
en... | 21.466667 | 63 | 0.754658 |
1ae76db8cf08d26cd4bf44e4bc13d70fd08e87bc | 11,892 | ex | Elixir | printer/lib/printer/server/logic.ex | Jwsonic/cliff_swallow | 6ea69bcb10a844e10dd002a309eb4f48d0f0d1b8 | [
"MIT"
] | null | null | null | printer/lib/printer/server/logic.ex | Jwsonic/cliff_swallow | 6ea69bcb10a844e10dd002a309eb4f48d0f0d1b8 | [
"MIT"
] | null | null | null | printer/lib/printer/server/logic.ex | Jwsonic/cliff_swallow | 6ea69bcb10a844e10dd002a309eb4f48d0f0d1b8 | [
"MIT"
] | null | null | null | defmodule Printer.Server.Logic do
@moduledoc """
Business logic functions/gaurds/macros to help make the server a bit more readable.
This could(should?) probably be broken down more in the future.
"""
alias Printer.{Connection, Gcode, PubSub, Status}
alias Printer.Server.{Command, PrintJob, ResponseParser... | 24.826722 | 97 | 0.601076 |
1ae7a27ca9ed0f4429519c710bbdd7251f585f4d | 246 | ex | Elixir | test/domain/conference/commands.ex | work-capital/workflow | d6f8918cd433b018dc65eb3a9662ae165e2d3e36 | [
"MIT"
] | 14 | 2017-01-19T09:24:17.000Z | 2021-02-09T17:28:31.000Z | test/domain/conference/commands.ex | work-capital/elixir-cqrs-eventsourcing | d6f8918cd433b018dc65eb3a9662ae165e2d3e36 | [
"MIT"
] | 2 | 2017-01-24T14:52:14.000Z | 2017-01-27T08:49:46.000Z | test/domain/conference/commands.ex | work-capital/elixir-cqrs-eventsourcing | d6f8918cd433b018dc65eb3a9662ae165e2d3e36 | [
"MIT"
] | 1 | 2021-03-17T01:26:13.000Z | 2021-03-17T01:26:13.000Z | defmodule Workflow.Domain.Conference.Commands do
defmodule MakeSeatReservation,
do: defstruct [uuid: nil]
defmodule CommitSeatReservation,
do: defstruct [uuid: nil]
defmodule CancelSeatReservation,
do: defstruct [uuid: nil]
end
| 27.333333 | 48 | 0.764228 |
1ae7bf2ed62a77b40635f163a5ffc7551960c502 | 630 | exs | Elixir | test/gossip/presence_test.exs | SwiftAusterity/gossip | d79c53acd02fcb9905acb9730e59065efdd5a589 | [
"MIT"
] | null | null | null | test/gossip/presence_test.exs | SwiftAusterity/gossip | d79c53acd02fcb9905acb9730e59065efdd5a589 | [
"MIT"
] | null | null | null | test/gossip/presence_test.exs | SwiftAusterity/gossip | d79c53acd02fcb9905acb9730e59065efdd5a589 | [
"MIT"
] | null | null | null | defmodule Gossip.PresenceTest do
use Gossip.DataCase
alias Gossip.Presence
describe "updating presence of a game" do
setup do
user = create_user()
game = create_game(user, %{name: "MUD Game"})
supports = ["channels"]
players = ["player"]
Presence.reset()
%{game: game, s... | 25.2 | 104 | 0.653968 |
1ae8020b994b82161b7e37d65ef932834d218da2 | 1,730 | ex | Elixir | clients/remote_build_execution/lib/google_api/remote_build_execution/v2/model/google_devtools_remotebuildexecution_admin_v1alpha_delete_instance_request.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/remote_build_execution/lib/google_api/remote_build_execution/v2/model/google_devtools_remotebuildexecution_admin_v1alpha_delete_instance_request.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/remote_build_execution/lib/google_api/remote_build_execution/v2/model/google_devtools_remotebuildexecution_admin_v1alpha_delete_instance_request.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.037037 | 142 | 0.760116 |
1ae805f9e352e1cf95ab7e63e502828d4a456886 | 1,751 | exs | Elixir | clients/vault/mix.exs | corp-momenti/elixir-google-api | fe1580e305789ab2ca0741791b8ffe924bd3240c | [
"Apache-2.0"
] | null | null | null | clients/vault/mix.exs | corp-momenti/elixir-google-api | fe1580e305789ab2ca0741791b8ffe924bd3240c | [
"Apache-2.0"
] | null | null | null | clients/vault/mix.exs | corp-momenti/elixir-google-api | fe1580e305789ab2ca0741791b8ffe924bd3240c | [
"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... | 26.134328 | 96 | 0.645346 |
1ae81a3ee5dc500b63f50cc65d064f8d2fb96ef7 | 2,591 | ex | Elixir | clients/drive_activity/lib/google_api/drive_activity/v2/model/actor.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/drive_activity/lib/google_api/drive_activity/v2/model/actor.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/drive_activity/lib/google_api/drive_activity/v2/model/actor.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... | 43.915254 | 142 | 0.725975 |
1ae8213e904541da05459f203f9d9a957c760afe | 372 | ex | Elixir | web/views/error_view.ex | ktornwall/wooper | 95b55d95853cf9c20f0dfaa7b6c5285956c02693 | [
"MIT"
] | 1 | 2017-05-11T08:06:52.000Z | 2017-05-11T08:06:52.000Z | web/views/error_view.ex | ktornwall/wooper | 95b55d95853cf9c20f0dfaa7b6c5285956c02693 | [
"MIT"
] | null | null | null | web/views/error_view.ex | ktornwall/wooper | 95b55d95853cf9c20f0dfaa7b6c5285956c02693 | [
"MIT"
] | null | null | null | defmodule Wooper.ErrorView do
use Wooper.Web, :view
def render("404.html", _assigns) do
"Page not found"
end
def render("500.html", _assigns) do
"Internal server error"
end
# In case no render clause matches or no
# template is found, let's render it as 500
def template_not_found(_template, a... | 20.666667 | 47 | 0.696237 |
1ae8330e0d3c6c1483de0f9150bed2841a3680cf | 1,127 | exs | Elixir | config/config.exs | Zensavona/ninjaproxies | c02ffffe2037a6b3aac6ae040c2d150be1dac738 | [
"MIT"
] | 1 | 2015-11-29T10:52:55.000Z | 2015-11-29T10:52:55.000Z | config/config.exs | Zensavona/ninjaproxies | c02ffffe2037a6b3aac6ae040c2d150be1dac738 | [
"MIT"
] | null | null | null | config/config.exs | Zensavona/ninjaproxies | c02ffffe2037a6b3aac6ae040c2d150be1dac738 | [
"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.354839 | 73 | 0.753327 |
1ae85e9f6cc5870d759e6e309ae2598bc6b820fc | 5,151 | ex | Elixir | clients/ad_sense/lib/google_api/ad_sense/v14/api/savedadstyles.ex | ericrwolfe/elixir-google-api | 3dc0f17edd5e2d6843580c16ddae3bf84b664ffd | [
"Apache-2.0"
] | null | null | null | clients/ad_sense/lib/google_api/ad_sense/v14/api/savedadstyles.ex | ericrwolfe/elixir-google-api | 3dc0f17edd5e2d6843580c16ddae3bf84b664ffd | [
"Apache-2.0"
] | null | null | null | clients/ad_sense/lib/google_api/ad_sense/v14/api/savedadstyles.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... | 43.652542 | 217 | 0.69734 |
1ae88a2483dcd02d21b0322a78e71f1fd84c2311 | 6,083 | ex | Elixir | clients/composer/lib/google_api/composer/v1beta1/model/node_config.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/composer/lib/google_api/composer/v1beta1/model/node_config.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/composer/lib/google_api/composer/v1beta1/model/node_config.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 88.15942 | 1,031 | 0.753411 |
1ae8b7e85e32114f24211661d970d430f6437254 | 568 | ex | Elixir | lib/phoenix_example_app_web/auth/auth_pipeline.ex | dreamingechoes/phoenix-example-app | 9b3e9cd0c7acbe2ffee627c58b0150fe0e811780 | [
"MIT"
] | 2 | 2018-06-03T19:33:09.000Z | 2020-01-14T03:19:05.000Z | lib/phoenix_example_app_web/auth/auth_pipeline.ex | dreamingechoes/phoenix-example-app | 9b3e9cd0c7acbe2ffee627c58b0150fe0e811780 | [
"MIT"
] | null | null | null | lib/phoenix_example_app_web/auth/auth_pipeline.ex | dreamingechoes/phoenix-example-app | 9b3e9cd0c7acbe2ffee627c58b0150fe0e811780 | [
"MIT"
] | 1 | 2018-06-22T00:00:39.000Z | 2018-06-22T00:00:39.000Z | defmodule PhoenixExampleAppWeb.Guardian.AuthPipeline do
use Guardian.Plug.Pipeline,
otp_app: :phoenix_example_app,
module: PhoenixExampleApp.Guardian,
error_handler: PhoenixExampleApp.Guardian.AuthErrorHandler
# If there is a session token, validate it
plug(Guardian.Plug.VerifySession, claims: %{"typ... | 40.571429 | 65 | 0.762324 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.