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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5a658f2c9d28aa0a7c99d3619fc4cedf1d79242c | 7,319 | ex | Elixir | lib/pointer.ex | lygaret/ex-jsonrfc | 8403e9f62ef2a64cba433f92d11f9669d29042e6 | [
"MIT"
] | 1 | 2020-09-15T04:56:23.000Z | 2020-09-15T04:56:23.000Z | lib/pointer.ex | lygaret/ex-jsonrfc | 8403e9f62ef2a64cba433f92d11f9669d29042e6 | [
"MIT"
] | 1 | 2020-09-18T07:20:45.000Z | 2020-09-21T08:04:37.000Z | lib/pointer.ex | lygaret/ex-jsonrfc | 8403e9f62ef2a64cba433f92d11f9669d29042e6 | [
"MIT"
] | null | null | null | defmodule JsonRfc.Pointer do
@moduledoc ~s"""
Fetch and transform data in Maps by evaluating JSON pointers
"""
@doc """
Parses a string representing a JSON pointer into an array of traversals.
## Rules (per RFC 6901)
* pointers must start with a `/` character
* the string `~1` is translated to `/`, bu... | 32.242291 | 109 | 0.60664 |
5a65cb16f6369e0e072534a16132e4be6c34acb1 | 3,932 | ex | Elixir | lib/receipt_verifier/parser.ex | kianmeng/receipt_verifier | 7111c95ba23ab57c4ea78e88f8816a05536c9e50 | [
"MIT"
] | 18 | 2016-09-05T15:04:27.000Z | 2022-02-11T12:27:24.000Z | lib/receipt_verifier/parser.ex | kianmeng/receipt_verifier | 7111c95ba23ab57c4ea78e88f8816a05536c9e50 | [
"MIT"
] | 13 | 2017-08-25T19:58:20.000Z | 2022-01-16T19:20:34.000Z | lib/receipt_verifier/parser.ex | kianmeng/receipt_verifier | 7111c95ba23ab57c4ea78e88f8816a05536c9e50 | [
"MIT"
] | 8 | 2017-10-27T11:31:20.000Z | 2021-04-21T05:12:34.000Z | defmodule ReceiptVerifier.Parser do
@moduledoc false
alias ReceiptVerifier.ResponseData
alias ReceiptVerifier.AppReceipt
alias ReceiptVerifier.IAPReceipt
alias ReceiptVerifier.PendingRenewalReceipt
alias ReceiptVerifier.Error
@doc false
@spec parse_response(map()) :: {:ok, ResponseData.t()} | {:error,... | 30.48062 | 125 | 0.664802 |
5a65dd710036bf1eb7faa414ae461ea31b2fc2ec | 7,948 | ex | Elixir | implementations/elixir/ockam/ockam/lib/ockam/transport/tcp/listener.ex | cipherboy/ockam | bbb6c19d8ba01847dda14ecc11588fe875512a8d | [
"Apache-2.0"
] | null | null | null | implementations/elixir/ockam/ockam/lib/ockam/transport/tcp/listener.ex | cipherboy/ockam | bbb6c19d8ba01847dda14ecc11588fe875512a8d | [
"Apache-2.0"
] | null | null | null | implementations/elixir/ockam/ockam/lib/ockam/transport/tcp/listener.ex | cipherboy/ockam | bbb6c19d8ba01847dda14ecc11588fe875512a8d | [
"Apache-2.0"
] | null | null | null | if Code.ensure_loaded?(:ranch) do
defmodule Ockam.Transport.TCP.Listener do
@moduledoc false
use Ockam.Worker
alias Ockam.Message
alias Ockam.Transport.TCP.Client
alias Ockam.Transport.TCPAddress
require Logger
@tcp 1
@doc false
@impl true
def setup(options, state) do
... | 29.220588 | 96 | 0.621288 |
5a65dff82da75ea57a3aef3a4e0adf2dfc8bd3f6 | 1,353 | ex | Elixir | clients/secret_manager/lib/google_api/secret_manager/v1beta1/model/enable_secret_version_request.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/secret_manager/lib/google_api/secret_manager/v1beta1/model/enable_secret_version_request.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/secret_manager/lib/google_api/secret_manager/v1beta1/model/enable_secret_version_request.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... | 32.214286 | 96 | 0.77901 |
5a66105e4c9e656c9a7cf4e6fe4d6bbf8eb87030 | 188 | ex | Elixir | tags/lib/tags_web/views/messages_view.ex | GustavoSrr/nlw-heat | 7d92dbd94d6db303d1c0d604b85707de2135c2dc | [
"MIT"
] | null | null | null | tags/lib/tags_web/views/messages_view.ex | GustavoSrr/nlw-heat | 7d92dbd94d6db303d1c0d604b85707de2135c2dc | [
"MIT"
] | null | null | null | tags/lib/tags_web/views/messages_view.ex | GustavoSrr/nlw-heat | 7d92dbd94d6db303d1c0d604b85707de2135c2dc | [
"MIT"
] | null | null | null | defmodule TagsWeb.MessagesView do
use TagsWeb, :view
def render("create.json", %{message: message}) do
%{
result: "Mensagem criada!",
message: message
}
end
end
| 17.090909 | 51 | 0.632979 |
5a661b0ec684faf546ca863ff9684c8b0f2eb3c2 | 1,437 | ex | Elixir | lib/whistler_news_reader_web/controllers/api/session_controller.ex | fdietz/whistler_news_reader | 501f3f95e1ba3a684da8b34b60e426da85e7852d | [
"MIT"
] | 8 | 2016-06-12T20:11:26.000Z | 2017-05-02T04:36:41.000Z | lib/whistler_news_reader_web/controllers/api/session_controller.ex | fdietz/whistler_news_reader | 501f3f95e1ba3a684da8b34b60e426da85e7852d | [
"MIT"
] | 2 | 2016-06-12T15:49:06.000Z | 2016-06-12T20:00:02.000Z | lib/whistler_news_reader_web/controllers/api/session_controller.ex | fdietz/whistler_news_reader | 501f3f95e1ba3a684da8b34b60e426da85e7852d | [
"MIT"
] | null | null | null | defmodule WhistlerNewsReaderWeb.Api.SessionController do
use WhistlerNewsReaderWeb, :controller
require Logger
alias WhistlerNewsReader.Repo
alias WhistlerNewsReader.User
plug :scrub_params, "session" when action in [:create]
def create(conn, %{"session" => session_params}) do
case authenticate(sessi... | 24.355932 | 98 | 0.645094 |
5a6689337dff2573b6193d16b31ddd8435d5399a | 1,234 | ex | Elixir | clients/testing/lib/google_api/testing/v1/connection.ex | richiboi1977/elixir-google-api | c495bb3548090eb7a63d12f6fb145ec48aecdc0b | [
"Apache-2.0"
] | 1 | 2021-10-01T09:20:41.000Z | 2021-10-01T09:20:41.000Z | clients/testing/lib/google_api/testing/v1/connection.ex | richiboi1977/elixir-google-api | c495bb3548090eb7a63d12f6fb145ec48aecdc0b | [
"Apache-2.0"
] | null | null | null | clients/testing/lib/google_api/testing/v1/connection.ex | richiboi1977/elixir-google-api | c495bb3548090eb7a63d12f6fb145ec48aecdc0b | [
"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.277778 | 74 | 0.732577 |
5a66a47508a1bef3ce26ad2245af386440d46670 | 1,245 | exs | Elixir | config/prod.secret.exs | moroz/renraku | 845e6a72573f138094ba8f868ac91b7f3440bdab | [
"BSD-3-Clause"
] | null | null | null | config/prod.secret.exs | moroz/renraku | 845e6a72573f138094ba8f868ac91b7f3440bdab | [
"BSD-3-Clause"
] | null | null | null | config/prod.secret.exs | moroz/renraku | 845e6a72573f138094ba8f868ac91b7f3440bdab | [
"BSD-3-Clause"
] | 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... | 29.642857 | 67 | 0.718876 |
5a66b0dbfe7749b88bd3ada207dcd11096dc1cf6 | 193 | ex | Elixir | lib/hexpm_web/controllers/dashboard_controller.ex | Benjamin-Philip/hexpm | 6f38244f81bbabd234c660f46ea973849ba77a7f | [
"Apache-2.0"
] | 691 | 2017-03-08T09:15:45.000Z | 2022-03-23T22:04:47.000Z | lib/hexpm_web/controllers/dashboard_controller.ex | Benjamin-Philip/hexpm | 6f38244f81bbabd234c660f46ea973849ba77a7f | [
"Apache-2.0"
] | 491 | 2017-03-07T12:58:42.000Z | 2022-03-29T23:32:54.000Z | lib/hexpm_web/controllers/dashboard_controller.ex | Benjamin-Philip/hexpm | 6f38244f81bbabd234c660f46ea973849ba77a7f | [
"Apache-2.0"
] | 200 | 2017-03-12T23:03:39.000Z | 2022-03-05T17:55:52.000Z | defmodule HexpmWeb.DashboardController do
use HexpmWeb, :controller
plug :requires_login
def index(conn, _params) do
redirect(conn, to: Routes.profile_path(conn, :index))
end
end
| 19.3 | 57 | 0.751295 |
5a66d4e9c83ceca7ec09378a84fbd307d075c073 | 301 | ex | Elixir | lib/online_editor_web/controllers/page_controller.ex | zzats/online-editor | 2532315b40c974fe766e960e0b0933773907906d | [
"MIT"
] | null | null | null | lib/online_editor_web/controllers/page_controller.ex | zzats/online-editor | 2532315b40c974fe766e960e0b0933773907906d | [
"MIT"
] | null | null | null | lib/online_editor_web/controllers/page_controller.ex | zzats/online-editor | 2532315b40c974fe766e960e0b0933773907906d | [
"MIT"
] | null | null | null | defmodule OnlineEditorWeb.PageController do
use OnlineEditorWeb, :controller
@file_module Application.get_env(:online_editor, :file_module)
def index(conn, _params) do
index = Application.app_dir(:online_editor, "priv/static/index.html")
html(conn, @file_module.read!(index))
end
end
| 30.1 | 73 | 0.767442 |
5a673217a0e9eca1c94833abdd6ddc84e3689e45 | 515 | ex | Elixir | elixir_demo/lib/elixir_demo/consumer.ex | vanvoljg/KafkaDemo | 25c735111dd44c5df46bb7f2b7495d330fffc903 | [
"MIT"
] | null | null | null | elixir_demo/lib/elixir_demo/consumer.ex | vanvoljg/KafkaDemo | 25c735111dd44c5df46bb7f2b7495d330fffc903 | [
"MIT"
] | null | null | null | elixir_demo/lib/elixir_demo/consumer.ex | vanvoljg/KafkaDemo | 25c735111dd44c5df46bb7f2b7495d330fffc903 | [
"MIT"
] | null | null | null | defmodule ElixirDemo.Consumer do
@moduledoc false
# %{
# headers: [],
# key: "47",
# offset: 43,
# partition: 1,
# topic: "cities",
# ts: 1606358168801,
# ts_type: :create,
# value: "message #47"
# }
def handle_messages(messages) do
for %{
parti... | 19.807692 | 76 | 0.512621 |
5a67445bca89312453f01262214a83af092c7f4f | 534 | ex | Elixir | lib/rocketpay_web/controllers/wellcome_controller.ex | RafaelVsc/phx-rocketpay | 91435f0539a961691394809058b97a4e1b58fa84 | [
"RSA-MD"
] | null | null | null | lib/rocketpay_web/controllers/wellcome_controller.ex | RafaelVsc/phx-rocketpay | 91435f0539a961691394809058b97a4e1b58fa84 | [
"RSA-MD"
] | null | null | null | lib/rocketpay_web/controllers/wellcome_controller.ex | RafaelVsc/phx-rocketpay | 91435f0539a961691394809058b97a4e1b58fa84 | [
"RSA-MD"
] | null | null | null | defmodule RocketpayWeb.WelcomeController do
use RocketpayWeb, :controller
alias Rocketpay.Numbers
def index(conn, %{"filename" => filename}) do
filename
|> Numbers.sum_from_file()
|> handle_response(conn)
end
defp handle_response({:ok, %{result: result}}, conn) do
conn
|> put_status(:ok... | 22.25 | 83 | 0.666667 |
5a6777c0d5262c535977fee9f0731d34d36b405b | 457 | exs | Elixir | priv/repo/migrations/20210517134611_create_articles_join_tags.exs | coderplanets/coderplanets_server | 3663e56340d6d050e974c91f7e499d8424fc25e9 | [
"Apache-2.0"
] | 240 | 2018-11-06T09:36:54.000Z | 2022-02-20T07:12:36.000Z | priv/repo/migrations/20210517134611_create_articles_join_tags.exs | coderplanets/coderplanets_server | 3663e56340d6d050e974c91f7e499d8424fc25e9 | [
"Apache-2.0"
] | 363 | 2018-07-11T03:38:14.000Z | 2021-12-14T01:42:40.000Z | priv/repo/migrations/20210517134611_create_articles_join_tags.exs | mydearxym/mastani_server | f24034a4a5449200165cf4a547964a0961793eab | [
"Apache-2.0"
] | 22 | 2019-01-27T11:47:56.000Z | 2021-02-28T13:17:52.000Z | defmodule GroupherServer.Repo.Migrations.CreateArticlesJoinTags do
use Ecto.Migration
def change do
create table(:articles_join_tags) do
add(:article_tag_id, references(:article_tags, on_delete: :delete_all), null: false)
add(:post_id, references(:cms_posts, on_delete: :delete_all))
add(:job_... | 35.153846 | 90 | 0.737418 |
5a678f125001faf7005729535aa92ac663e8cc41 | 3,276 | ex | Elixir | clients/network_management/lib/google_api/network_management/v1beta1/model/expr.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/network_management/lib/google_api/network_management/v1beta1/model/expr.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/network_management/lib/google_api/network_management/v1beta1/model/expr.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... | 58.5 | 1,092 | 0.737179 |
5a67e4130c96259f0c16288ffa3132d161de59c9 | 2,735 | ex | Elixir | clients/android_management/lib/google_api/android_management/v1/model/device_settings.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/android_management/lib/google_api/android_management/v1/model/device_settings.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/android_management/lib/google_api/android_management/v1/model/device_settings.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... | 42.076923 | 190 | 0.714442 |
5a67f5f780370e4d829425e91b612495e7b47ddc | 1,065 | ex | Elixir | apps/demo_web/lib/demo_web_web/channels/user_socket.ex | kimlindholm/gigalixir_umbrella_demo | 369cd029687bb05273d881082afe72e9ac3bc0c1 | [
"MIT"
] | 2 | 2019-05-26T12:57:38.000Z | 2020-01-22T20:28:32.000Z | apps/demo_web/lib/demo_web_web/channels/user_socket.ex | kimlindholm/gigalixir_umbrella_demo | 369cd029687bb05273d881082afe72e9ac3bc0c1 | [
"MIT"
] | null | null | null | apps/demo_web/lib/demo_web_web/channels/user_socket.ex | kimlindholm/gigalixir_umbrella_demo | 369cd029687bb05273d881082afe72e9ac3bc0c1 | [
"MIT"
] | null | null | null | defmodule DemoWebWeb.UserSocket do
use Phoenix.Socket
## Channels
# channel "room:*", DemoWebWeb.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... | 31.323529 | 83 | 0.696714 |
5a68071aa6ba17cade793a1864c0292b25c2fc4f | 574 | ex | Elixir | lib/kayrock/request/implementations.ex | joshuawscott/kayrock | 614b930d568f7d0655a00e8d0d760e3b33314366 | [
"MIT"
] | 24 | 2019-06-26T22:08:13.000Z | 2022-01-27T00:10:41.000Z | lib/kayrock/request/implementations.ex | joshuawscott/kayrock | 614b930d568f7d0655a00e8d0d760e3b33314366 | [
"MIT"
] | 10 | 2020-04-10T07:48:53.000Z | 2021-03-26T10:50:25.000Z | lib/kayrock/request/implementations.ex | joshuawscott/kayrock | 614b930d568f7d0655a00e8d0d760e3b33314366 | [
"MIT"
] | 11 | 2019-10-30T12:53:09.000Z | 2022-03-09T23:16:42.000Z | defimpl Kayrock.Request, for: Kayrock.RecordBatch do
alias Kayrock.RecordBatch
defdelegate serialize(record_batch), to: RecordBatch
def api_vsn(%RecordBatch{}), do: 2
def response_deserializer(%RecordBatch{}) do
fn data -> {RecordBatch.deserialize(data), <<>>} end
end
end
defimpl Kayrock.Request, for:... | 23.916667 | 56 | 0.733449 |
5a680c75d6ee8d7adbedefbe2a3e8b9c6188d70c | 602 | exs | Elixir | lesson_09/demo/4_phx/a_webpack_demo_umbrella/mix.exs | martijnmeeldijk/ip_major | 867f09975aa8db0b308081216ace639c5677446b | [
"BSD-3-Clause"
] | 1 | 2021-09-22T09:56:35.000Z | 2021-09-22T09:56:35.000Z | lesson_09/demo/4_phx/a_webpack_demo_umbrella/mix.exs | martijnmeeldijk/ip_major | 867f09975aa8db0b308081216ace639c5677446b | [
"BSD-3-Clause"
] | 7 | 2020-03-14T19:30:29.000Z | 2022-02-27T01:20:40.000Z | lesson_09/demo/4_phx/a_webpack_demo_umbrella/mix.exs | martijnmeeldijk/ip_major | 867f09975aa8db0b308081216ace639c5677446b | [
"BSD-3-Clause"
] | 11 | 2020-02-13T14:52:45.000Z | 2020-08-03T12:18:56.000Z | defmodule AWebpackDemo.Umbrella.MixProject do
use Mix.Project
def project do
[
apps_path: "apps",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Dependencies can be Hex packages:
#
# {:mydep, "~> 0.3.0"}
#
# Or git/path repositories:
#
# {:mydep, git: "http... | 21.5 | 77 | 0.631229 |
5a6821499b70e18781a83297911ff521f77b9803 | 7,498 | exs | Elixir | test/simple_pool/basic_test.exs | Prodev2017/Simple_Elixir | e210071df8a6ac7cc8de2ed3360fcdb1ba440785 | [
"MIT"
] | null | null | null | test/simple_pool/basic_test.exs | Prodev2017/Simple_Elixir | e210071df8a6ac7cc8de2ed3360fcdb1ba440785 | [
"MIT"
] | null | null | null | test/simple_pool/basic_test.exs | Prodev2017/Simple_Elixir | e210071df8a6ac7cc8de2ed3360fcdb1ba440785 | [
"MIT"
] | null | null | null | #-------------------------------------------------------------------------------
# Author: Keith Brings
# Copyright (C) 2018 Noizu Labs, Inc. All rights reserved.
#-------------------------------------------------------------------------------
defmodule Noizu.SimplePool.BasicTest do
use ExUnit.Case
import ExUnit.... | 36.222222 | 135 | 0.675247 |
5a683a7d36dfd253df6fc51e5dea3d2564ff4926 | 306 | exs | Elixir | priv/repo/migrations/20200714211433_add_from_to_dc_purchases.exs | maco2035/console | 2a9a65678b8c671c7d92cdb62dfcfc71b84957c5 | [
"Apache-2.0"
] | 83 | 2018-05-31T14:49:10.000Z | 2022-03-27T16:49:49.000Z | priv/repo/migrations/20200714211433_add_from_to_dc_purchases.exs | maco2035/console | 2a9a65678b8c671c7d92cdb62dfcfc71b84957c5 | [
"Apache-2.0"
] | 267 | 2018-05-22T23:19:02.000Z | 2022-03-31T04:31:06.000Z | priv/repo/migrations/20200714211433_add_from_to_dc_purchases.exs | maco2035/console | 2a9a65678b8c671c7d92cdb62dfcfc71b84957c5 | [
"Apache-2.0"
] | 18 | 2018-11-20T05:15:54.000Z | 2022-03-28T08:20:13.000Z | defmodule Console.Repo.Migrations.AddFromToDcPurchases do
use Ecto.Migration
def change do
alter table(:dc_purchases) do
add :from_organization, references(:organizations)
add :to_organization, references(:organizations)
modify :payment_id, :string, null: true
end
end
end
| 25.5 | 57 | 0.738562 |
5a68509177629dcbca1f81f2585b5d7b7d47970f | 407 | ex | Elixir | lib/rockelivery/error.ex | LuizFerK/Rockelivery | 4742d73027bcaa97c2fc7969c8d032edf73a28fd | [
"MIT"
] | null | null | null | lib/rockelivery/error.ex | LuizFerK/Rockelivery | 4742d73027bcaa97c2fc7969c8d032edf73a28fd | [
"MIT"
] | null | null | null | lib/rockelivery/error.ex | LuizFerK/Rockelivery | 4742d73027bcaa97c2fc7969c8d032edf73a28fd | [
"MIT"
] | null | null | null | defmodule Rockelivery.Error do
@keys [:status, :result]
@enforce_keys @keys
defstruct @keys
def build(status, result), do: %__MODULE__{status: status, result: result}
def build_user_not_found_error, do: build(:not_found, "User not found")
def build_item_not_found_error, do: build(:not_found, "Item not f... | 29.071429 | 76 | 0.746929 |
5a686bbc61f3ccd843d58f85b4c4b185ed70678a | 1,238 | ex | Elixir | web/views/error_helpers.ex | andreihod/cryptofolio-api | 063bfcf39a0b334204e6b6ef01990622a1f316af | [
"MIT"
] | 2 | 2017-07-19T17:03:41.000Z | 2017-09-18T12:58:42.000Z | web/views/error_helpers.ex | mateusfs/cryptofolio-api | 063bfcf39a0b334204e6b6ef01990622a1f316af | [
"MIT"
] | 7 | 2017-07-18T23:32:45.000Z | 2017-08-18T01:09:11.000Z | web/views/error_helpers.ex | mateusfs/cryptofolio-api | 063bfcf39a0b334204e6b6ef01990622a1f316af | [
"MIT"
] | 2 | 2017-08-03T19:55:21.000Z | 2018-07-01T19:54:22.000Z | defmodule Cryptofolio.ErrorHelpers do
@moduledoc """
Conveniences for translating and building error messages.
"""
use Phoenix.HTML
@doc """
Generates tag for inlined form input errors.
"""
def error_tag(form, field) do
if error = form.errors[field] do
content_tag :span, translate_error(erro... | 30.195122 | 77 | 0.670436 |
5a686ddb0d31873a8b4b915d359bef600b9c1cee | 2,580 | exs | Elixir | apps/fz_http/test/fz_http_web/live/rule_live/index_test.exs | jasonboukheir/firezone | 79d610b94f67ae25c8ca26f391c0edf288f6aaa5 | [
"Apache-2.0"
] | 5 | 2020-05-22T00:24:39.000Z | 2021-06-18T18:28:45.000Z | apps/fz_http/test/fz_http_web/live/rule_live/index_test.exs | jasonboukheir/firezone | 79d610b94f67ae25c8ca26f391c0edf288f6aaa5 | [
"Apache-2.0"
] | 64 | 2020-05-22T00:31:00.000Z | 2021-06-28T15:21:33.000Z | apps/fz_http/test/fz_http_web/live/rule_live/index_test.exs | jasonboukheir/firezone | 79d610b94f67ae25c8ca26f391c0edf288f6aaa5 | [
"Apache-2.0"
] | 2 | 2020-05-22T00:27:52.000Z | 2021-03-14T19:37:27.000Z | defmodule FzHttpWeb.RuleLive.IndexTest do
use FzHttpWeb.ConnCase, async: true
describe "allowlist" do
setup :create_accept_rule
@destination "1.2.3.4"
@allow_params %{"rule" => %{"action" => "accept", "destination" => @destination}}
test "adds to allowlist", %{authed_conn: conn} do
path = R... | 25.8 | 85 | 0.561628 |
5a6892dab6bd582982d66df19a136310d01c5986 | 492 | ex | Elixir | lib/expletive/blacklist.ex | rsolovjov/expletive | 75bbd20cc701b1dc743b8e294b9fc0ee6ca3e27c | [
"Apache-2.0"
] | null | null | null | lib/expletive/blacklist.ex | rsolovjov/expletive | 75bbd20cc701b1dc743b8e294b9fc0ee6ca3e27c | [
"Apache-2.0"
] | null | null | null | lib/expletive/blacklist.ex | rsolovjov/expletive | 75bbd20cc701b1dc743b8e294b9fc0ee6ca3e27c | [
"Apache-2.0"
] | null | null | null | defmodule Expletive.Blacklist do
strip_quotes = fn (word) -> String.replace(word, ~r/^"\s*|\s*"$/, "") end
data_dir = Path.join([__DIR__, "..", "..", "data", "*.txt"])
for file <- Path.wildcard(data_dir) do
fun_name = Path.basename(file, ".txt") |> String.to_atom
words = File.read!(file)
... | 22.363636 | 75 | 0.587398 |
5a6892dbd15ddfe1f546c4042190b4853d4b4603 | 4,057 | exs | Elixir | git_graphed_api/test/git_graphed_api/repos/repos_test.exs | bahodge/git_graphed | 773d34a0522028ef3ecc3f246d8ddf18031205d0 | [
"MIT"
] | 2 | 2019-04-14T04:19:08.000Z | 2019-04-14T05:22:00.000Z | git_graphed_api/test/git_graphed_api/repos/repos_test.exs | bahodge/git_graphed | 773d34a0522028ef3ecc3f246d8ddf18031205d0 | [
"MIT"
] | null | null | null | git_graphed_api/test/git_graphed_api/repos/repos_test.exs | bahodge/git_graphed | 773d34a0522028ef3ecc3f246d8ddf18031205d0 | [
"MIT"
] | null | null | null | defmodule GitGraphedApi.ReposTest do
use GitGraphedApi.DataCase
alias GitGraphedApi.Repos
describe "repositories" do
alias GitGraphedApi.Repos.Repository
@valid_attrs %{
repo_name: "repo_name",
repo_id: 321,
repo_private: true,
fullname: "repo_fullname",
html_url: "www.rep... | 26.344156 | 86 | 0.610057 |
5a68d174156a486e955074fcaa9570db313454e8 | 133 | ex | Elixir | test/unit/fixtures/compiler/pruner/module_34.ex | gregjohnsonsaltaire/hologram | aa8e9ea0d599def864c263cc37cc8ee31f02ac4a | [
"MIT"
] | 40 | 2022-01-19T20:27:36.000Z | 2022-03-31T18:17:41.000Z | test/unit/fixtures/compiler/pruner/module_34.ex | gregjohnsonsaltaire/hologram | aa8e9ea0d599def864c263cc37cc8ee31f02ac4a | [
"MIT"
] | 42 | 2022-02-03T22:52:43.000Z | 2022-03-26T20:57:32.000Z | test/unit/fixtures/compiler/pruner/module_34.ex | gregjohnsonsaltaire/hologram | aa8e9ea0d599def864c263cc37cc8ee31f02ac4a | [
"MIT"
] | 3 | 2022-02-10T04:00:37.000Z | 2022-03-08T22:07:45.000Z | defmodule Hologram.Test.Fixtures.Compiler.Pruner.Module34 do
use Hologram.Component
def template do
~H"""
"""
end
end
| 14.777778 | 60 | 0.699248 |
5a68db038eeb940375b9513e1e22bd8d1596a592 | 3,183 | ex | Elixir | lib/particle/stream.ex | tompesman/particle-elixir | 90226405b868f8e8ff308c84c34e88ea68a8570a | [
"MIT"
] | null | null | null | lib/particle/stream.ex | tompesman/particle-elixir | 90226405b868f8e8ff308c84c34e88ea68a8570a | [
"MIT"
] | null | null | null | lib/particle/stream.ex | tompesman/particle-elixir | 90226405b868f8e8ff308c84c34e88ea68a8570a | [
"MIT"
] | null | null | null | defmodule Particle.Stream.Event do
@moduledoc false
defstruct event: nil, data: nil, ttl: nil, published_at: nil, coreid: nil
end
defmodule Particle.Stream do
require Logger
alias Experimental.GenStage
alias Particle.Stream.Event
alias Particle.Http
use GenStage
@moduledoc false
@base_url "https:/... | 30.314286 | 99 | 0.617656 |
5a68ef152ec98a4cb9df5a467c1b9e88847aa3f1 | 319 | ex | Elixir | lib/excommerce_web/helpers/template_helper.ex | roger120981/planet | a662006551d11427c08cf6cdbacd37d377bcd9c5 | [
"MIT"
] | 1 | 2019-04-01T19:14:16.000Z | 2019-04-01T19:14:16.000Z | lib/excommerce_web/helpers/template_helper.ex | roger120981/planet | a662006551d11427c08cf6cdbacd37d377bcd9c5 | [
"MIT"
] | null | null | null | lib/excommerce_web/helpers/template_helper.ex | roger120981/planet | a662006551d11427c08cf6cdbacd37d377bcd9c5 | [
"MIT"
] | 1 | 2019-03-24T01:50:48.000Z | 2019-03-24T01:50:48.000Z | defmodule TemplateHelper do
@moduledoc """
Template Helper for Store.
"""
alias Excommerce.Themer
defp do_render(conn, status, template, assigns \\ []) do
body = Themer.render(conn, template, assigns)
conn
|> put_resp_header("Content-Type", "text/html")
|> send_resp(status, body)
end
end
| 21.266667 | 58 | 0.673981 |
5a6935f4aaa098e2d9433f2e90eebe8bd7c3bdbb | 1,980 | exs | Elixir | mix.exs | manojsamanta/stripe-single-product | d0af1cede55ce6ac71100b9f4b5473919c16c884 | [
"MIT"
] | null | null | null | mix.exs | manojsamanta/stripe-single-product | d0af1cede55ce6ac71100b9f4b5473919c16c884 | [
"MIT"
] | null | null | null | mix.exs | manojsamanta/stripe-single-product | d0af1cede55ce6ac71100b9f4b5473919c16c884 | [
"MIT"
] | null | null | null | defmodule SingleProduct.MixProject do
use Mix.Project
def project do
[
app: :single_product,
version: "0.1.0",
elixir: "~> 1.7",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
start_permanent: Mix.env() == :prod,
aliases: a... | 28.695652 | 84 | 0.577778 |
5a693d12392699cd579a1fde522629d0c4c9ceb3 | 1,165 | exs | Elixir | config/config.exs | eiel-sample-code/elixir_app_env | 1a4783b58bddcb795672ed74d8ad7b16efb2023b | [
"MIT"
] | null | null | null | config/config.exs | eiel-sample-code/elixir_app_env | 1a4783b58bddcb795672ed74d8ad7b16efb2023b | [
"MIT"
] | null | null | null | config/config.exs | eiel-sample-code/elixir_app_env | 1a4783b58bddcb795672ed74d8ad7b16efb2023b | [
"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
config :appenv, value: "load config.exs"
# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
#... | 35.30303 | 73 | 0.748498 |
5a694f403930ca07494b5c378af1fcfc93469b77 | 1,723 | ex | Elixir | clients/data_catalog/lib/google_api/data_catalog/v1beta1/model/test_iam_permissions_request.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/data_catalog/lib/google_api/data_catalog/v1beta1/model/test_iam_permissions_request.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/data_catalog/lib/google_api/data_catalog/v1beta1/model/test_iam_permissions_request.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.46 | 135 | 0.74173 |
5a695667bf66bba75d0f05d10c1c273f1b9b1fc3 | 11,582 | ex | Elixir | lib/phoenix_live_view/helpers.ex | smeade/phoenix_live_view | c981846c1e350bc689c28b4cbdaeffe1e30240b2 | [
"MIT"
] | 1 | 2020-10-23T15:17:10.000Z | 2020-10-23T15:17:10.000Z | lib/phoenix_live_view/helpers.ex | smeade/phoenix_live_view | c981846c1e350bc689c28b4cbdaeffe1e30240b2 | [
"MIT"
] | null | null | null | lib/phoenix_live_view/helpers.ex | smeade/phoenix_live_view | c981846c1e350bc689c28b4cbdaeffe1e30240b2 | [
"MIT"
] | null | null | null | defmodule Phoenix.LiveView.Helpers do
@moduledoc """
A collection of helpers to be imported into your views.
"""
alias Phoenix.LiveView.{Component, Socket, Static}
@doc false
def live_patch(opts) when is_list(opts) do
live_link("patch", Keyword.fetch!(opts, :do), Keyword.delete(opts, :do))
end
@d... | 31.818681 | 101 | 0.650233 |
5a695ccc1dd3f9e23f53f9b7c58fc94b38d092a7 | 2,401 | ex | Elixir | router_light_ui/lib/router_light_ui_web.ex | itwasscience/router_light | 2c25643e43f8b670fbd1975d2eabddd3d9c3fd79 | [
"MIT"
] | 1 | 2021-04-26T12:35:03.000Z | 2021-04-26T12:35:03.000Z | router_light_ui/lib/router_light_ui_web.ex | itwasscience/router_light | 2c25643e43f8b670fbd1975d2eabddd3d9c3fd79 | [
"MIT"
] | null | null | null | router_light_ui/lib/router_light_ui_web.ex | itwasscience/router_light | 2c25643e43f8b670fbd1975d2eabddd3d9c3fd79 | [
"MIT"
] | null | null | null | defmodule RouterLightUiWeb 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 RouterLightUiWeb, :controller
use RouterLightUiWeb, :view
The definitions below will be executed for every vi... | 23.31068 | 78 | 0.692628 |
5a696433ce36c4d866455009defce88f545332c6 | 4,089 | exs | Elixir | test/integration/kayrock/compatibility_0_p_10_and_later_test.exs | Zarathustra2/kafka_ex | 436a84c7a32bee40f1dbffc17a3c1a0f2fc98c30 | [
"MIT"
] | 536 | 2015-08-10T03:14:39.000Z | 2022-03-24T15:07:33.000Z | test/integration/kayrock/compatibility_0_p_10_and_later_test.exs | Zarathustra2/kafka_ex | 436a84c7a32bee40f1dbffc17a3c1a0f2fc98c30 | [
"MIT"
] | 349 | 2015-09-16T21:27:42.000Z | 2022-03-28T08:51:56.000Z | test/integration/kayrock/compatibility_0_p_10_and_later_test.exs | Zarathustra2/kafka_ex | 436a84c7a32bee40f1dbffc17a3c1a0f2fc98c30 | [
"MIT"
] | 180 | 2015-09-01T22:58:26.000Z | 2022-03-25T16:47:49.000Z | defmodule KafkaEx.KayrockCompatibility0p10AndLaterTest do
@moduledoc """
These are tests using the original KafkaEx API with the kayrock server
These come from server0_p_10*_test.exs. Note that even though Kayrock does
not support this version of Kafka, the original implementations often delegate
to previou... | 25.716981 | 80 | 0.600147 |
5a698ee816fe9e289772314de8c3fa7009d65bbe | 1,594 | ex | Elixir | lib/webapp_web/channels/admin_channel.ex | runhyve/webapp | 434b074f98c1ebac657b56062c1c1a54e683dea1 | [
"BSD-2-Clause"
] | 12 | 2019-07-02T14:30:06.000Z | 2022-03-12T08:22:18.000Z | lib/webapp_web/channels/admin_channel.ex | runhyve/webapp | 434b074f98c1ebac657b56062c1c1a54e683dea1 | [
"BSD-2-Clause"
] | 9 | 2020-03-16T20:10:50.000Z | 2021-06-17T17:45:44.000Z | lib/webapp_web/channels/admin_channel.ex | runhyve/webapp | 434b074f98c1ebac657b56062c1c1a54e683dea1 | [
"BSD-2-Clause"
] | null | null | null | defmodule WebappWeb.AdminChannel do
use WebappWeb, :channel
alias Webapp.{
Machines,
Machines.Machine
}
import WebappWeb.MachineView, only: [map_status_to_css: 1, status_icon: 1]
def join("machines:" <> machines, payload, socket) do
if authorized?(payload) do
socket = assign(socket, :mach... | 24.90625 | 76 | 0.641782 |
5a69f55d85da0f792244c214526ef049ddd073f5 | 1,637 | ex | Elixir | clients/cloud_kms/lib/google_api/cloud_kms/v1/model/key_ring.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/cloud_kms/lib/google_api/cloud_kms/v1/model/key_ring.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/cloud_kms/lib/google_api/cloud_kms/v1/model/key_ring.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... | 32.098039 | 118 | 0.714111 |
5a6a00b3e9e576b4617384ac81d24f21babff888 | 912 | exs | Elixir | test/requests/zip_codes_request_test.exs | bus-detective/pro | d313f4facdb4c9229bd7a022eeabb85170000e18 | [
"MIT"
] | null | null | null | test/requests/zip_codes_request_test.exs | bus-detective/pro | d313f4facdb4c9229bd7a022eeabb85170000e18 | [
"MIT"
] | null | null | null | test/requests/zip_codes_request_test.exs | bus-detective/pro | d313f4facdb4c9229bd7a022eeabb85170000e18 | [
"MIT"
] | null | null | null | defmodule BdPro.ZipCodesRequestTest do
use BdPro.ConnCase
import BdPro.Factories
setup do
conn = conn() |> put_req_header("accept", "application/json")
{:ok, conn: conn}
end
setup do
{:ok, timestamp} = Ecto.DateTime.cast({{2015, 01, 01}, {0,0,0}})
campaign = create(:campaign)
vehicle = c... | 36.48 | 124 | 0.656798 |
5a6a37ecce3ec1840296ea36adbf9b01fb71e3b7 | 1,028 | exs | Elixir | test/structs/snowflake_test.exs | Drahcirius/crux_structs | 53ba17c6ab0adfadbf69e236ec936fed8015420e | [
"MIT"
] | null | null | null | test/structs/snowflake_test.exs | Drahcirius/crux_structs | 53ba17c6ab0adfadbf69e236ec936fed8015420e | [
"MIT"
] | null | null | null | test/structs/snowflake_test.exs | Drahcirius/crux_structs | 53ba17c6ab0adfadbf69e236ec936fed8015420e | [
"MIT"
] | null | null | null | defmodule Crux.Structs.SnowflakeTest do
use ExUnit.Case, async: true
doctest Crux.Structs.Snowflake
alias Crux.Structs.Snowflake
test "from_integer alias works" do
id = 218_348_062_828_003_328
assert Snowflake.from_integer(id) === Snowflake.deconstruct(id)
end
test "to_integer alias works" do
... | 25.7 | 82 | 0.703307 |
5a6a6b3ff62bdfe5bb2a9382ef6e1850c02f710f | 2,340 | ex | Elixir | clients/sheets/lib/google_api/sheets/v4/model/extended_value.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/sheets/lib/google_api/sheets/v4/model/extended_value.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/sheets/lib/google_api/sheets/v4/model/extended_value.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 39.661017 | 235 | 0.704701 |
5a6ab59e8d8691840802d28c3656282b8cda8d3b | 1,278 | exs | Elixir | config/dev.exs | wsmoak/elm_colors | 94dd2887965274938de4722adfaf19d6bd939b04 | [
"MIT"
] | null | null | null | config/dev.exs | wsmoak/elm_colors | 94dd2887965274938de4722adfaf19d6bd939b04 | [
"MIT"
] | null | null | null | config/dev.exs | wsmoak/elm_colors | 94dd2887965274938de4722adfaf19d6bd939b04 | [
"MIT"
] | null | null | null | use Mix.Config
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with brunch.io to recompile .js and .css sources.
config :elm_colors, ElmColors.Endpoint,
http: [port: ... | 29.72093 | 74 | 0.712833 |
5a6ad964c916458cdee01faba44ecca219afd5b1 | 916 | exs | Elixir | apps/writer_dlq/mix.exs | kennyatpillar/hindsight | e90e2150a14218e5d6fdf5874f57eb055fd2dd07 | [
"Apache-2.0"
] | null | null | null | apps/writer_dlq/mix.exs | kennyatpillar/hindsight | e90e2150a14218e5d6fdf5874f57eb055fd2dd07 | [
"Apache-2.0"
] | null | null | null | apps/writer_dlq/mix.exs | kennyatpillar/hindsight | e90e2150a14218e5d6fdf5874f57eb055fd2dd07 | [
"Apache-2.0"
] | null | null | null | defmodule WriterDlq.MixProject do
use Mix.Project
def project do
[
app: :writer_dlq,
version: "0.1.0",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixir: "~> 1.9",
start_permanent: Mix.... | 22.9 | 56 | 0.548035 |
5a6add5db2c18cf705ea8d212651df787bb6a3e8 | 142 | ex | Elixir | lib/queue/queue/reserved.ex | elfelrandcor/learning_elixir_simple_queue | efc01fa09d7f7f67c6772250fe68a125c8858de9 | [
"MIT"
] | null | null | null | lib/queue/queue/reserved.ex | elfelrandcor/learning_elixir_simple_queue | efc01fa09d7f7f67c6772250fe68a125c8858de9 | [
"MIT"
] | null | null | null | lib/queue/queue/reserved.ex | elfelrandcor/learning_elixir_simple_queue | efc01fa09d7f7f67c6772250fe68a125c8858de9 | [
"MIT"
] | null | null | null | defmodule Queue.Reserved do
use Ecto.Schema
schema "queue_reserved" do
field(:queueId, :integer)
field(:pid, :integer)
end
end
| 15.777778 | 29 | 0.697183 |
5a6b1a7a90c571177e1e7fed16a071a5af0bda36 | 2,405 | exs | Elixir | test/real_world_web/controllers/user_controller_test.exs | nenjotsu/elixir-phoenix-realworld-example-app | 46ab9c7f971ccf2fdf52c52983803d567ff86b4c | [
"MIT"
] | 1 | 2019-09-28T05:50:46.000Z | 2019-09-28T05:50:46.000Z | test/real_world_web/controllers/user_controller_test.exs | nenjotsu/elixir-phoenix-realworld-example-app | 46ab9c7f971ccf2fdf52c52983803d567ff86b4c | [
"MIT"
] | null | null | null | test/real_world_web/controllers/user_controller_test.exs | nenjotsu/elixir-phoenix-realworld-example-app | 46ab9c7f971ccf2fdf52c52983803d567ff86b4c | [
"MIT"
] | null | null | null | defmodule RealWorldWeb.UserControllerTest do
@moduledoc false
use RealWorldWeb.ConnCase
@user_default_attrs %{email: "john@jacob.com", username: "john", password: "some password", bio: "some bio", image: "some image"}
@user_create_attrs %{email: "john@jacob.com", username: "john", password: "some password", bi... | 32.945205 | 131 | 0.621622 |
5a6b28cec788cb1ef07277655f6932571ad587ae | 1,891 | exs | Elixir | clients/firestore/mix.exs | Contractbook/elixir-google-api | 342751041aaf8c2e7f76f9922cf24b9c5895802b | [
"Apache-2.0"
] | 1 | 2021-10-01T09:20:41.000Z | 2021-10-01T09:20:41.000Z | clients/firestore/mix.exs | Contractbook/elixir-google-api | 342751041aaf8c2e7f76f9922cf24b9c5895802b | [
"Apache-2.0"
] | null | null | null | clients/firestore/mix.exs | Contractbook/elixir-google-api | 342751041aaf8c2e7f76f9922cf24b9c5895802b | [
"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... | 28.223881 | 161 | 0.661026 |
5a6b67690c9fc20771e8396a2da18d260121f952 | 1,691 | exs | Elixir | example_applications/web_app/config/config.exs | oestrich/prom_ex | 73265068450c865d6544ea0722ecd2aaab5cab0b | [
"MIT"
] | null | null | null | example_applications/web_app/config/config.exs | oestrich/prom_ex | 73265068450c865d6544ea0722ecd2aaab5cab0b | [
"MIT"
] | 1 | 2021-06-25T18:21:34.000Z | 2021-06-25T18:21:34.000Z | example_applications/web_app/config/config.exs | emoragaf/prom_ex | 0bc739a1524bb71f15485ec8b1448afa22309878 | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
# General application configuration
use Mix.Config
config :web_app,
ecto_repos: [WebApp.Repo, Web... | 28.661017 | 86 | 0.74039 |
5a6b6fbc9ec46ec5b00ce544404f2ff77bf252b1 | 7,204 | ex | Elixir | host_core/lib/host_core.ex | mattwilkinsonn/wasmcloud-otp | 09b918e08cb566028c0fe9223ce9f0bdbc69b2cd | [
"Apache-2.0"
] | null | null | null | host_core/lib/host_core.ex | mattwilkinsonn/wasmcloud-otp | 09b918e08cb566028c0fe9223ce9f0bdbc69b2cd | [
"Apache-2.0"
] | null | null | null | host_core/lib/host_core.ex | mattwilkinsonn/wasmcloud-otp | 09b918e08cb566028c0fe9223ce9f0bdbc69b2cd | [
"Apache-2.0"
] | null | null | null | defmodule HostCore do
@moduledoc """
`HostCore` Application.
"""
require Logger
use Application
def start(_type, _args) do
config = Vapor.load!(HostCore.ConfigPlan)
config = post_process_config(config)
children = mount_supervisor_tree(config)
opts = [strategy: :one_for_one, name: HostCore... | 30.525424 | 105 | 0.599389 |
5a6b73cb18f789c3daed345774b7edcdacca4970 | 555 | exs | Elixir | mix.exs | erpuno/soa | f664cc49e39dd435a7c8878c3874279c827d6fc6 | [
"MIT"
] | 2 | 2020-01-12T23:34:52.000Z | 2020-01-30T04:16:28.000Z | mix.exs | voxoz/soa | f664cc49e39dd435a7c8878c3874279c827d6fc6 | [
"MIT"
] | null | null | null | mix.exs | voxoz/soa | f664cc49e39dd435a7c8878c3874279c827d6fc6 | [
"MIT"
] | 1 | 2021-01-20T12:50:07.000Z | 2021-01-20T12:50:07.000Z | defmodule Soap.MixProject do
use Mix.Project
def project do
[
app: :soa,
version: "0.1.7",
deps: deps(),
package: package(),
description: "SOA Simple Object Access Protocol",
]
end
def deps, do: [{:ex_doc, "~> 0.11", only: :dev}]
def application, do: [extra_applications... | 22.2 | 59 | 0.563964 |
5a6b9f90faeff6f33735c6505f65d7c00eb755ab | 1,909 | exs | Elixir | test/client_tests/connection_test.exs | valiot/opex62541 | 8e50ef9508c25b0693123840d20dcae708e98bfe | [
"MIT"
] | 11 | 2020-04-24T20:54:23.000Z | 2022-01-11T03:13:13.000Z | test/client_tests/connection_test.exs | valiot/opex62541 | 8e50ef9508c25b0693123840d20dcae708e98bfe | [
"MIT"
] | 3 | 2021-02-25T10:03:49.000Z | 2021-09-15T03:37:12.000Z | test/client_tests/connection_test.exs | valiot/opex62541 | 8e50ef9508c25b0693123840d20dcae708e98bfe | [
"MIT"
] | 4 | 2020-09-28T16:18:43.000Z | 2021-09-09T16:29:14.000Z | defmodule ClientConnectionTest do
use ExUnit.Case
alias OpcUA.{Client, Server}
setup_all do
#Server with no auth.
{:ok, s_pid} = Server.start_link()
:ok = Server.set_default_config(s_pid)
:ok = Server.set_port(s_pid, 4001)
:ok = Server.start(s_pid)
#Server with Auth
{:ok, s_pid} = S... | 27.666667 | 125 | 0.647983 |
5a6bb0928b11a060b5d2f9d09dd51a9566cc9402 | 1,797 | exs | Elixir | mix.exs | Miradorn/absinthe_tutorial | fbe63be1d4acc92c7a85d4a04fd259ac6b5ef072 | [
"MIT"
] | null | null | null | mix.exs | Miradorn/absinthe_tutorial | fbe63be1d4acc92c7a85d4a04fd259ac6b5ef072 | [
"MIT"
] | null | null | null | mix.exs | Miradorn/absinthe_tutorial | fbe63be1d4acc92c7a85d4a04fd259ac6b5ef072 | [
"MIT"
] | null | null | null | defmodule Blog.Mixfile do
use Mix.Project
def project do
[
app: :blog,
version: "0.0.1",
elixir: "~> 1.4",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: ... | 26.043478 | 79 | 0.549805 |
5a6c40c8f41ad625a9b2a7825f370a293cb60309 | 7,406 | ex | Elixir | lib/storm_web/live/components/text/content.ex | enter-haken/storm | 9730508c119763bcf5efe852387603dcc7eeb648 | [
"MIT"
] | null | null | null | lib/storm_web/live/components/text/content.ex | enter-haken/storm | 9730508c119763bcf5efe852387603dcc7eeb648 | [
"MIT"
] | 1 | 2021-03-28T22:57:30.000Z | 2021-04-10T23:05:04.000Z | lib/storm_web/live/components/text/content.ex | enter-haken/storm | 9730508c119763bcf5efe852387603dcc7eeb648 | [
"MIT"
] | null | null | null | defmodule StormWeb.Live.Components.Text.Content do
use Phoenix.LiveComponent
require Logger
def render(assigns) do
~L"""
<%= if(@text_edit_mode) do %>
<article class="message <%= get_article_class(@prefix) %>">
<div class="message-body">
<%= if not is_nil(@prefix) do %>
... | 28.159696 | 128 | 0.454766 |
5a6c49af273f5d14945575955215811eedba9d25 | 781 | ex | Elixir | lib/aph_web/views/comment_view.ex | tometoproject/tometo | ed91069b11a020723edb9a143de29d9bac86a2b0 | [
"BlueOak-1.0.0",
"Apache-2.0"
] | 8 | 2019-09-26T13:59:25.000Z | 2020-03-30T21:26:48.000Z | lib/aph_web/views/comment_view.ex | tometoproject/tometo | ed91069b11a020723edb9a143de29d9bac86a2b0 | [
"BlueOak-1.0.0",
"Apache-2.0"
] | 39 | 2019-11-16T02:24:28.000Z | 2020-01-14T16:40:28.000Z | lib/aph_web/views/comment_view.ex | tometoproject/tometo | ed91069b11a020723edb9a143de29d9bac86a2b0 | [
"BlueOak-1.0.0",
"Apache-2.0"
] | 2 | 2019-12-16T07:55:14.000Z | 2020-06-11T04:14:00.000Z | defmodule AphWeb.CommentView do
use AphWeb, :view
alias AphWeb.AvatarView
alias AphWeb.CommentView
def render("comments.json", %{comments: comments}) do
render_many(comments, CommentView, "comment.json")
end
def render("comment.json", %{comment: comment}) do
%{
id: comment.id,
content:... | 24.40625 | 68 | 0.661972 |
5a6c6456e85e41c8cb6d12f0d0e766770b22fce2 | 629 | ex | Elixir | lib/ja_serializer/formatter/resource.ex | mbta/ja_serializer | efb1d4489809e31e4b54b4af9e85f0b3ceeb650b | [
"Apache-2.0"
] | null | null | null | lib/ja_serializer/formatter/resource.ex | mbta/ja_serializer | efb1d4489809e31e4b54b4af9e85f0b3ceeb650b | [
"Apache-2.0"
] | 1 | 2021-06-25T13:28:34.000Z | 2021-06-25T13:28:34.000Z | lib/ja_serializer/formatter/resource.ex | mbta/ja_serializer | efb1d4489809e31e4b54b4af9e85f0b3ceeb650b | [
"Apache-2.0"
] | null | null | null | defimpl JaSerializer.Formatter, for: JaSerializer.Builder.ResourceObject do
alias JaSerializer.Formatter.Utils
def format(resource) do
relationships = Utils.array_to_hash(resource.relationships)
links = Utils.array_to_hash(resource.links)
json = %{
"id" => to_string(resource.id),
"type" =>... | 27.347826 | 75 | 0.694754 |
5a6c8a908ac24582b11e69c6763e8b8b632e584d | 1,996 | ex | Elixir | clients/jobs/lib/google_api/jobs/v2/model/get_histogram_response.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/jobs/lib/google_api/jobs/v2/model/get_histogram_response.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/jobs/lib/google_api/jobs/v2/model/get_histogram_response.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 ... | 35.642857 | 158 | 0.741483 |
5a6cf26a6752779dc2db6da3ce574e512180247c | 1,086 | ex | Elixir | lib/cog/commands/permission/list.ex | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 1,003 | 2016-02-23T17:21:12.000Z | 2022-02-20T14:39:35.000Z | lib/cog/commands/permission/list.ex | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 906 | 2016-02-22T22:54:19.000Z | 2022-03-11T15:19:43.000Z | lib/cog/commands/permission/list.ex | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 95 | 2016-02-23T13:42:31.000Z | 2021-11-30T14:39:55.000Z | defmodule Cog.Commands.Permission.List do
use Cog.Command.GenCommand.Base,
bundle: Cog.Util.Misc.embedded_bundle,
name: "permission-list"
alias Cog.Repository.Permissions
@description "List all permissions"
@output_description "Returns list of serialized permissions"
@output_example """
[
{
... | 26.487805 | 135 | 0.672192 |
5a6cfacebb6881f45eaae52893657123c93038fc | 892 | ex | Elixir | clients/domains/lib/google_api/domains/v1alpha2/metadata.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | clients/domains/lib/google_api/domains/v1alpha2/metadata.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | clients/domains/lib/google_api/domains/v1alpha2/metadata.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 33.037037 | 74 | 0.761211 |
5a6d0f9fef0bfe6a62373db968e407334cf95d6c | 1,118 | ex | Elixir | lib/observables/zip_n.ex | DriesDeBackker/observables-extended | c4f66384369e8a827337451ba9d10f5c9fc4701c | [
"MIT"
] | 2 | 2019-07-18T12:44:08.000Z | 2019-07-18T13:50:42.000Z | lib/observables/zip_n.ex | DriesDeBackker/observables-extended | c4f66384369e8a827337451ba9d10f5c9fc4701c | [
"MIT"
] | null | null | null | lib/observables/zip_n.ex | DriesDeBackker/observables-extended | c4f66384369e8a827337451ba9d10f5c9fc4701c | [
"MIT"
] | null | null | null | defmodule Observables.Operator.ZipN do
@moduledoc false
use Observables.GenObservable
def init([n]) do
Logger.debug("Zipn: #{inspect(self())}")
inits = 1..n |> Enum.map(fn _ -> [] end)
{:ok, inits}
end
def handle_event({index, value}, state) do
#Add the received value to the back of the list ... | 31.942857 | 101 | 0.641324 |
5a6d10f140a0bbcab798e505caa083a9e347eac4 | 537 | ex | Elixir | web/router.ex | vjdavid/elixir_trello | 2c44f467b86432369eacec7c045ab3d3551a1cb0 | [
"MIT"
] | null | null | null | web/router.ex | vjdavid/elixir_trello | 2c44f467b86432369eacec7c045ab3d3551a1cb0 | [
"MIT"
] | null | null | null | web/router.ex | vjdavid/elixir_trello | 2c44f467b86432369eacec7c045ab3d3551a1cb0 | [
"MIT"
] | null | null | null | defmodule PhoenixTrello.Router do
use PhoenixTrello.Web, :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 "/", PhoenixTrello... | 19.888889 | 57 | 0.687151 |
5a6d1b117c6675f1baec06b32a930e79192e38eb | 1,100 | ex | Elixir | lib/emeck.ex | bencode/emeck | 867fd4acf27a4605077a9f8303dfd56c5d076d00 | [
"MIT"
] | 2 | 2017-05-14T08:29:14.000Z | 2017-05-14T12:59:25.000Z | lib/emeck.ex | bencode/emeck | 867fd4acf27a4605077a9f8303dfd56c5d076d00 | [
"MIT"
] | 1 | 2018-08-21T12:28:18.000Z | 2018-08-21T12:28:18.000Z | lib/emeck.ex | bencode/emeck | 867fd4acf27a4605077a9f8303dfd56c5d076d00 | [
"MIT"
] | null | null | null | defmodule Emeck do
@moduledoc """
Mock modules for unit test
"""
defmacro with_meck(mods, do: test) do
mods = is_list(mods) && mods || [mods]
quote do
import Emeck.Helper
mods = unquote(mods)
Enum.map(mods, fn
{mod, opts} -> :meck.new(mod, opts)
mod -> :meck.new(mod, ... | 20.37037 | 61 | 0.511818 |
5a6d3915f793ccdd904e4f72f428e94d3359ec98 | 478 | exs | Elixir | test/unit/core/automaton/types/behavior_tree/component/state/action_state_test.exs | venomnert/automata | 26b9bf3cb57fa8bc152fac8992ddcfe07c6e07a9 | [
"Apache-2.0"
] | null | null | null | test/unit/core/automaton/types/behavior_tree/component/state/action_state_test.exs | venomnert/automata | 26b9bf3cb57fa8bc152fac8992ddcfe07c6e07a9 | [
"Apache-2.0"
] | null | null | null | test/unit/core/automaton/types/behavior_tree/component/state/action_state_test.exs | venomnert/automata | 26b9bf3cb57fa8bc152fac8992ddcfe07c6e07a9 | [
"Apache-2.0"
] | null | null | null | # test the Action state changes, data flows, and contract checking as applicable
defmodule ActionStateTest do
use ExUnit.Case
setup_all do
automata_config = [
[name: "MockSeq1", mfa: {MockSeq1, :start_link, []}]
]
Automata.start_automata(automata_config: automata_config)
:ok
end
describ... | 22.761905 | 80 | 0.690377 |
5a6d3952bf1b841749de855951ec31b4f94a2365 | 2,034 | ex | Elixir | apps/hefty/lib/hefty/traders.ex | Cinderella-Man/crypto-streamer | b1e990d375f7143c5149930be991249f0d9c3ee3 | [
"MIT"
] | 49 | 2019-10-28T22:27:28.000Z | 2021-10-11T06:40:29.000Z | apps/hefty/lib/hefty/traders.ex | Cinderella-Man/crypto-streamer | b1e990d375f7143c5149930be991249f0d9c3ee3 | [
"MIT"
] | 9 | 2019-08-30T13:15:36.000Z | 2019-10-10T21:25:14.000Z | apps/hefty/lib/hefty/traders.ex | Cinderella-Man/crypto-streamer | b1e990d375f7143c5149930be991249f0d9c3ee3 | [
"MIT"
] | 7 | 2019-10-31T06:19:26.000Z | 2021-09-30T04:20:58.000Z | defmodule Hefty.Traders do
import Ecto.Query, only: [from: 2]
require Logger
def fetch_naive_trader_settings() do
from(nts in Hefty.Repo.NaiveTraderSetting,
order_by: nts.symbol
)
|> Hefty.Repo.all()
end
def fetch_naive_trader_settings(offset, limit, symbol \\ "") do
Logger.debug("Fetc... | 30.358209 | 86 | 0.639626 |
5a6d41ec73fa111dfa5dec285b9eadd71fb594dd | 8,103 | ex | Elixir | clients/content/lib/google_api/content/v2/api/datafeedstatuses.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/api/datafeedstatuses.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/api/datafeedstatuses.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... | 43.101064 | 293 | 0.69283 |
5a6dc0bc9ecb20c3ae9ca3cd44caf6db4cde0980 | 96 | exs | Elixir | test/blue_heron/gatt/service_test.exs | amclain/blue_heron | e1802097ef6a845e28a8be56076f3b81ebb56206 | [
"Apache-2.0"
] | 45 | 2020-10-17T13:34:15.000Z | 2022-03-08T09:40:43.000Z | test/blue_heron/gatt/service_test.exs | amclain/blue_heron | e1802097ef6a845e28a8be56076f3b81ebb56206 | [
"Apache-2.0"
] | 20 | 2020-10-15T15:05:54.000Z | 2022-03-27T15:54:36.000Z | test/blue_heron/gatt/service_test.exs | amclain/blue_heron | e1802097ef6a845e28a8be56076f3b81ebb56206 | [
"Apache-2.0"
] | 11 | 2020-10-23T17:18:57.000Z | 2022-03-15T20:01:49.000Z | defmodule BlueHeron.GATT.ServiceTest do
use ExUnit.Case
doctest BlueHeron.GATT.Service
end
| 16 | 39 | 0.8125 |
5a6dd2c1f265cd208c146f18f46dad3f3c3f99c2 | 2,557 | exs | Elixir | test/matchers_test.exs | bbalser/Placebo | 89a578472c5534145f1b68cdfa2e13f326aeff9f | [
"Apache-2.0"
] | 20 | 2018-06-09T19:02:58.000Z | 2021-01-05T09:01:10.000Z | test/matchers_test.exs | bbalser/Mockit | 89a578472c5534145f1b68cdfa2e13f326aeff9f | [
"Apache-2.0"
] | 2 | 2018-10-17T01:55:26.000Z | 2020-01-30T20:37:12.000Z | test/matchers_test.exs | bbalser/Mockit | 89a578472c5534145f1b68cdfa2e13f326aeff9f | [
"Apache-2.0"
] | 2 | 2018-10-17T01:28:49.000Z | 2021-03-09T23:03:54.000Z | defmodule Placebo.MatchersTest do
use ExUnit.Case
use Placebo
test "is_true/is_false" do
allow Regex.regex?(any()), return: "Something Else"
allow Regex.regex?(is_true()), return: "True"
allow Regex.regex?(is_false()), return: "False"
assert Regex.regex?(true) == "True"
assert Regex.regex?(f... | 31.567901 | 74 | 0.615174 |
5a6ddc5a89208a4af568eb1521d881a8c05163d1 | 1,375 | ex | Elixir | lib/toniq/takeover.ex | itskoko/toniq | 1f96db00556bfac4a929c98fd7f9044906879492 | [
"MIT",
"Unlicense"
] | null | null | null | lib/toniq/takeover.ex | itskoko/toniq | 1f96db00556bfac4a929c98fd7f9044906879492 | [
"MIT",
"Unlicense"
] | null | null | null | lib/toniq/takeover.ex | itskoko/toniq | 1f96db00556bfac4a929c98fd7f9044906879492 | [
"MIT",
"Unlicense"
] | 3 | 2021-04-07T14:59:09.000Z | 2021-04-07T14:59:21.000Z | defmodule Toniq.Takeover do
@moduledoc """
Checks redis for orphaned jobs from other vms and moves them into a incoming jobs list.
This list is then imported by Toniq.JobImporter.
"""
use GenServer
require Logger
def start_link(name \\ __MODULE__, keepalive_name \\ Toniq.Keepalive) do
GenServer.sta... | 26.960784 | 106 | 0.736 |
5a6e04a589086419581b9d4a753a64c143a0eddd | 651 | exs | Elixir | mix.exs | arpnetwork/kids_chain | f320a6468c78ae7e1727d72ad3ede1befbdf931c | [
"Apache-2.0"
] | null | null | null | mix.exs | arpnetwork/kids_chain | f320a6468c78ae7e1727d72ad3ede1befbdf931c | [
"Apache-2.0"
] | null | null | null | mix.exs | arpnetwork/kids_chain | f320a6468c78ae7e1727d72ad3ede1befbdf931c | [
"Apache-2.0"
] | null | null | null | defmodule KidsChain.MixProject do
use Mix.Project
def project do
[
app: :kids_chain,
version: "0.1.0",
elixir: "~> 1.6",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extr... | 19.727273 | 59 | 0.537634 |
5a6e231d2157f8e98e84ec4099a952e24b8d97dd | 3,774 | ex | Elixir | lib/scripts/random.ex | Inouju/mambo | facc3b4bca4ce88ae1e65219d9342105108d97f3 | [
"MIT"
] | 15 | 2016-01-24T00:08:40.000Z | 2017-09-04T05:40:48.000Z | lib/scripts/random.ex | Inouju/mambo | facc3b4bca4ce88ae1e65219d9342105108d97f3 | [
"MIT"
] | 7 | 2016-02-07T07:14:16.000Z | 2020-01-26T23:57:09.000Z | lib/scripts/random.ex | Inouju/mambo | facc3b4bca4ce88ae1e65219d9342105108d97f3 | [
"MIT"
] | 2 | 2016-03-23T14:16:44.000Z | 2020-03-22T13:46:59.000Z | defmodule Random do
@moduledoc """
Luck games.
Examples:
.roll
.roll <max number>
.roll 2d6+11 - rolls 2 6-sided die and adds 11
.rock
.paper
.scissors
"""
use GenEvent
def init(_) do
{:ok, []}
end
def handle_event({:msg, {".help random", _, {cid,_,_}}}, _) do
Mambo.B... | 23.153374 | 85 | 0.511659 |
5a6e24f29c5e183baeb60d0df291341ca464ab74 | 63 | exs | Elixir | test/bmp280_test.exs | mattludwigs/bmp280 | aa066c5490cf571db84b4350c427f29241329ebe | [
"Apache-2.0"
] | null | null | null | test/bmp280_test.exs | mattludwigs/bmp280 | aa066c5490cf571db84b4350c427f29241329ebe | [
"Apache-2.0"
] | null | null | null | test/bmp280_test.exs | mattludwigs/bmp280 | aa066c5490cf571db84b4350c427f29241329ebe | [
"Apache-2.0"
] | null | null | null | defmodule BMP280Test do
use ExUnit.Case
doctest BMP280
end
| 12.6 | 23 | 0.793651 |
5a6e3beb1c81009fb38a6b571a56e35c2811b1d8 | 737 | ex | Elixir | test/support/hooks/live_view.ex | exshome/exshome | ef6b7a89f11dcd2016856dd49517b74aeebb6513 | [
"MIT"
] | 2 | 2021-12-21T16:32:56.000Z | 2022-02-22T17:06:39.000Z | test/support/hooks/live_view.ex | exshome/exshome | ef6b7a89f11dcd2016856dd49517b74aeebb6513 | [
"MIT"
] | null | null | null | test/support/hooks/live_view.ex | exshome/exshome | ef6b7a89f11dcd2016856dd49517b74aeebb6513 | [
"MIT"
] | null | null | null | defmodule ExshomeTest.Hooks.LiveView do
@moduledoc """
Custom hooks for setting up tests.
"""
alias ExshomeTest.TestRegistry
alias Phoenix.LiveView.Socket
def on_mount(:default, _params, _session, %Socket{} = socket) do
owner_pid =
case socket do
%Socket{parent_pid: parent_pid} when not i... | 26.321429 | 70 | 0.672999 |
5a6e4cc583e12d5023d3aa357b9b782f6d2045f9 | 1,216 | ex | Elixir | lib/events_api_web/views/error_helpers.ex | gissandrogama/events | 1b21b151a336ae5eef8bf1d68f2a792194f21be3 | [
"MIT"
] | null | null | null | lib/events_api_web/views/error_helpers.ex | gissandrogama/events | 1b21b151a336ae5eef8bf1d68f2a792194f21be3 | [
"MIT"
] | 4 | 2021-02-10T22:04:56.000Z | 2021-02-12T22:01:42.000Z | lib/events_api_web/views/error_helpers.ex | gissandrogama/events | 1b21b151a336ae5eef8bf1d68f2a792194f21be3 | [
"MIT"
] | 1 | 2021-03-22T13:48:48.000Z | 2021-03-22T13:48:48.000Z | defmodule EventsApiWeb.ErrorHelpers do
@moduledoc """
Conveniences for translating and building error messages.
"""
@doc """
Translates an error message using gettext.
"""
def translate_error({msg, opts}) do
# When using gettext, we typically pass the strings we want
# to translate as a static ar... | 35.764706 | 78 | 0.672697 |
5a6e4fb8af17280a737b3ce155a7df19751a4159 | 8,365 | exs | Elixir | test/battle_box/games/marooned/logic_test.exs | GrantJamesPowell/battle_box | 301091955b68cd4672f6513d645eca4e3c4e17d0 | [
"Apache-2.0"
] | 2 | 2020-10-17T05:48:49.000Z | 2020-11-11T02:34:15.000Z | test/battle_box/games/marooned/logic_test.exs | FlyingDutchmanGames/battle_box | 301091955b68cd4672f6513d645eca4e3c4e17d0 | [
"Apache-2.0"
] | 3 | 2020-05-18T05:52:21.000Z | 2020-06-09T07:24:14.000Z | test/battle_box/games/marooned/logic_test.exs | FlyingDutchmanGames/battle_box | 301091955b68cd4672f6513d645eca4e3c4e17d0 | [
"Apache-2.0"
] | null | null | null | defmodule BattleBox.Games.Marooned.LogicTest do
use ExUnit.Case, async: true
alias BattleBox.Games.Marooned.Logic
import BattleBox.Games.Marooned.Helpers
alias BattleBox.Games.Marooned.Error
describe "opponent/1" do
test "it gives the mortal enemy of a player" do
assert Logic.opponent(2) == 1
... | 27.883333 | 103 | 0.497549 |
5a6e91fcba37299708bec4af84a5c8e6b7b850e9 | 886 | ex | Elixir | clients/tag_manager/lib/google_api/tag_manager/v2/metadata.ex | richiboi1977/elixir-google-api | c495bb3548090eb7a63d12f6fb145ec48aecdc0b | [
"Apache-2.0"
] | 1 | 2021-10-01T09:20:41.000Z | 2021-10-01T09:20:41.000Z | clients/tag_manager/lib/google_api/tag_manager/v2/metadata.ex | richiboi1977/elixir-google-api | c495bb3548090eb7a63d12f6fb145ec48aecdc0b | [
"Apache-2.0"
] | null | null | null | clients/tag_manager/lib/google_api/tag_manager/v2/metadata.ex | richiboi1977/elixir-google-api | c495bb3548090eb7a63d12f6fb145ec48aecdc0b | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 32.814815 | 74 | 0.759594 |
5a6eac35eddada887965d3cd7a6bd35e1a5aaf0f | 731 | exs | Elixir | test/elixir_sense/core/ast_test.exs | BartOtten/elixir_sense | 4a857f2c262b9f8ac2d72e31f4806cecc740192a | [
"MIT",
"Unlicense"
] | 216 | 2019-01-05T02:08:51.000Z | 2022-03-23T23:59:56.000Z | test/elixir_sense/core/ast_test.exs | BartOtten/elixir_sense | 4a857f2c262b9f8ac2d72e31f4806cecc740192a | [
"MIT",
"Unlicense"
] | 102 | 2019-01-18T04:59:06.000Z | 2022-01-10T14:21:24.000Z | test/elixir_sense/core/ast_test.exs | BartOtten/elixir_sense | 4a857f2c262b9f8ac2d72e31f4806cecc740192a | [
"MIT",
"Unlicense"
] | 31 | 2019-01-16T08:19:34.000Z | 2022-03-07T08:06:22.000Z | defmodule ElixirSense.Core.AstTest do
use ExUnit.Case, async: true
alias ElixirSense.Core.Ast
defmodule ExpandRecursive do
defmacro my_macro do
quote do
abc = my_macro()
end
end
end
test "expand_partial cannot expand recursive macros" do
import ExpandRecursive
result =
... | 19.756757 | 69 | 0.659371 |
5a6ee44f457d11fc9279efa3a3fc2d273b6e2297 | 1,963 | ex | Elixir | clients/content/lib/google_api/content/v2/model/shippingsettings_get_supported_pickup_services_response.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/shippingsettings_get_supported_pickup_services_response.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/content/lib/google_api/content/v2/model/shippingsettings_get_supported_pickup_services_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... | 35.690909 | 181 | 0.75191 |
5a6ee7934b10fa27230a53d93cfbd2cbb913b988 | 467 | ex | Elixir | lib/esshd/application.ex | OffgridElectric/esshd | f994409a95fb2539a668e7f91742bacec295457a | [
"Apache-2.0"
] | 46 | 2017-07-27T22:00:28.000Z | 2021-12-28T23:08:30.000Z | lib/esshd/application.ex | OffgridElectric/esshd | f994409a95fb2539a668e7f91742bacec295457a | [
"Apache-2.0"
] | 7 | 2017-10-19T09:11:42.000Z | 2021-07-26T19:56:20.000Z | lib/esshd/application.ex | OffgridElectric/esshd | f994409a95fb2539a668e7f91742bacec295457a | [
"Apache-2.0"
] | 9 | 2019-01-28T16:13:30.000Z | 2021-12-28T11:07:50.000Z | defmodule Sshd.Application do
# See http://elixir-lang.org/docs/stable/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
import Supervisor.Spec, warn: false
# Define workers and child supervisors to be supervised
child... | 25.944444 | 66 | 0.736617 |
5a6ef2991720fd6fac1b97b5dd9056fe595721f6 | 122 | ex | Elixir | lib/kuddle/config/types/tuple.ex | IceDragon200/kuddle_config | f9006f20e4a05d968858f2b2bc9c625132e4ac54 | [
"MIT"
] | 1 | 2022-02-15T00:59:16.000Z | 2022-02-15T00:59:16.000Z | lib/kuddle/config/types/tuple.ex | IceDragon200/kuddle_config | f9006f20e4a05d968858f2b2bc9c625132e4ac54 | [
"MIT"
] | null | null | null | lib/kuddle/config/types/tuple.ex | IceDragon200/kuddle_config | f9006f20e4a05d968858f2b2bc9c625132e4ac54 | [
"MIT"
] | null | null | null | defmodule Kuddle.Config.Types.Tuple do
def cast(value) when is_list(value) do
{:ok, List.to_tuple(value)}
end
end
| 20.333333 | 40 | 0.721311 |
5a6f0247c981b9f7d4bf942926502d8e2b4573ce | 8,891 | ex | Elixir | lib/mix/lib/mix/tasks/profile.cprof.ex | tmbb/exdocs_makedown_demo | 6a0039c54d2fa10d79c080efcef8d70d359678f8 | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/tasks/profile.cprof.ex | tmbb/exdocs_makedown_demo | 6a0039c54d2fa10d79c080efcef8d70d359678f8 | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/tasks/profile.cprof.ex | tmbb/exdocs_makedown_demo | 6a0039c54d2fa10d79c080efcef8d70d359678f8 | [
"Apache-2.0"
] | null | null | null | defmodule Mix.Tasks.Profile.Cprof do
use Mix.Task
@shortdoc "Profiles the given file or expression with cprof"
@moduledoc """
Profiles the given file or expression using Erlang's `cprof` tool.
`cprof` can be useful when you want to discover the bottlenecks related
to function calls.
Before running the... | 39.340708 | 98 | 0.623102 |
5a6f1bec372976d1976519181ca3da15fd43c1f7 | 1,812 | exs | Elixir | test/similarity/weighted_levenshtein_test.exs | jmoggee/the_fuzz | 20e1eb0acd8a070f9e0fab87fb5dae02a632f6c4 | [
"Apache-2.0"
] | 76 | 2015-02-05T13:54:38.000Z | 2021-11-23T12:31:00.000Z | test/similarity/weighted_levenshtein_test.exs | jmoggee/the_fuzz | 20e1eb0acd8a070f9e0fab87fb5dae02a632f6c4 | [
"Apache-2.0"
] | 6 | 2015-08-26T13:40:26.000Z | 2019-01-09T17:00:48.000Z | test/similarity/weighted_levenshtein_test.exs | jmoggee/the_fuzz | 20e1eb0acd8a070f9e0fab87fb5dae02a632f6c4 | [
"Apache-2.0"
] | 8 | 2015-05-13T14:06:48.000Z | 2021-10-31T19:43:27.000Z | defmodule WeightedLevenshteinTest do
use ExUnit.Case
import TheFuzz.Similarity.WeightedLevenshtein, only: [compare: 3]
test "returns nil with empty arguments" do
assert compare("", "", %{delete: 10, insert: 0.1, replace: 1}) == nil
assert compare("abc", "", %{delete: 10, insert: 0.1, replace: 1}) == nil... | 43.142857 | 77 | 0.621413 |
5a6f415d8f83d38740942ab4d5e6348fbe32c50b | 1,137 | exs | Elixir | mix.exs | msaraiva/surface_app | 000ed8c9e5f206c646937aac77e83071cd58a03d | [
"Unlicense"
] | 13 | 2020-04-14T07:49:11.000Z | 2021-09-12T09:49:33.000Z | mix.exs | msaraiva/surface_app | 000ed8c9e5f206c646937aac77e83071cd58a03d | [
"Unlicense"
] | 2 | 2020-05-10T19:33:37.000Z | 2020-10-06T13:45:14.000Z | mix.exs | msaraiva/surface_app | 000ed8c9e5f206c646937aac77e83071cd58a03d | [
"Unlicense"
] | 3 | 2020-08-01T08:12:46.000Z | 2020-11-27T02:03:21.000Z | defmodule SurfaceApp.MixProject do
use Mix.Project
def project do
[
app: :surface_app,
version: "0.1.0",
elixir: "~> 1.5",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix] ++ Mix.compilers(),
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
... | 25.266667 | 84 | 0.583993 |
5a6f5e374768df31e56a981d1a30ba2072fcc1dd | 9,312 | exs | Elixir | test/challenge_gov/challenges/challenge_judging_criteria_test.exs | smartlogic/Challenge_gov | b4203d1fcfb742dd17ecfadb9e9c56ad836d4254 | [
"CC0-1.0"
] | null | null | null | test/challenge_gov/challenges/challenge_judging_criteria_test.exs | smartlogic/Challenge_gov | b4203d1fcfb742dd17ecfadb9e9c56ad836d4254 | [
"CC0-1.0"
] | null | null | null | test/challenge_gov/challenges/challenge_judging_criteria_test.exs | smartlogic/Challenge_gov | b4203d1fcfb742dd17ecfadb9e9c56ad836d4254 | [
"CC0-1.0"
] | null | null | null | defmodule ChallengeGov.ChallengeJudgingCriteriaTest do
use ChallengeGov.DataCase
use Bamboo.Test
alias ChallengeGov.Challenges
alias ChallengeGov.TestHelpers.AccountHelpers
alias ChallengeGov.TestHelpers.ChallengeHelpers
describe "adding judging criteria to single phase challenge" do
test "successfull... | 28.303951 | 91 | 0.478737 |
5a6f80f4e096f21d4519824150a1e64b3f80d0ef | 4,586 | ex | Elixir | clients/os_config/lib/google_api/os_config/v1/model/patch_job.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/os_config/lib/google_api/os_config/v1/model/patch_job.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/os_config/lib/google_api/os_config/v1/model/patch_job.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... | 45.86 | 152 | 0.68949 |
5a6f8700b3d1eeb1e6684ee6fca561eef318e739 | 1,445 | ex | Elixir | clients/elixir/generated/lib/swaggy_jenkins/model/queue_left_item.ex | cliffano/jenkins-api-clients-generator | 522d02b3a130a29471df5ec1d3d22c822b3d0813 | [
"MIT"
] | null | null | null | clients/elixir/generated/lib/swaggy_jenkins/model/queue_left_item.ex | cliffano/jenkins-api-clients-generator | 522d02b3a130a29471df5ec1d3d22c822b3d0813 | [
"MIT"
] | null | null | null | clients/elixir/generated/lib/swaggy_jenkins/model/queue_left_item.ex | cliffano/jenkins-api-clients-generator | 522d02b3a130a29471df5ec1d3d22c822b3d0813 | [
"MIT"
] | null | null | null | # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://openapi-generator.tech
# Do not edit the class manually.
defmodule SwaggyJenkins.Model.QueueLeftItem do
@moduledoc """
"""
@derive [Poison.Encoder]
defstruct [
:"_class",
:"actions",
:"blocked"... | 26.759259 | 91 | 0.621453 |
5a6f90c8390a44311b8be52fd00c1f7194ebf3f0 | 673 | exs | Elixir | priv/repo/migrations/20150428053201_change_to_citext.exs | findmypast/hexfmp | 38a50f5e1057833fd98748faac230bf4b9cc26a3 | [
"Apache-2.0"
] | null | null | null | priv/repo/migrations/20150428053201_change_to_citext.exs | findmypast/hexfmp | 38a50f5e1057833fd98748faac230bf4b9cc26a3 | [
"Apache-2.0"
] | null | null | null | priv/repo/migrations/20150428053201_change_to_citext.exs | findmypast/hexfmp | 38a50f5e1057833fd98748faac230bf4b9cc26a3 | [
"Apache-2.0"
] | null | null | null | defmodule Hexpm.Repo.Migrations.ChangeToCitext do
use Ecto.Migration
def up do
execute "CREATE EXTENSION citext"
drop index(:users, [:username], name: :users_lower_idx)
alter table(:users) do
modify :username, :citext
end
alter table(:packages) do
modify :name, :citext
end
... | 18.694444 | 69 | 0.647845 |
5a6fb60dc8a6aff50b172f16af29d2b8abaa392e | 3,884 | ex | Elixir | lib/ex_algo/list/bidirectional_list.ex | code-shoily/ex_algo | 7837c222fd2844a151b6b92038f94ea088bec0a2 | [
"MIT"
] | 21 | 2021-11-21T08:07:38.000Z | 2022-03-13T06:19:35.000Z | lib/ex_algo/list/bidirectional_list.ex | code-shoily/ex_algo | 7837c222fd2844a151b6b92038f94ea088bec0a2 | [
"MIT"
] | 3 | 2021-11-26T22:54:09.000Z | 2022-03-06T21:16:12.000Z | lib/ex_algo/list/bidirectional_list.ex | code-shoily/ex_algo | 7837c222fd2844a151b6b92038f94ea088bec0a2 | [
"MIT"
] | null | null | null | defmodule ExAlgo.List.BidirectionalList do
@moduledoc """
Implementation of bidirectional list using Zipper.
"""
@type error :: {:error, :start_of_list} | {:error, :end_of_list} | {:error, :empty}
@type value_type :: any()
@type t :: %__MODULE__{visited: list(value_type()), upcoming: list(value_type())}
... | 29.648855 | 85 | 0.620494 |
5a6fc9e8aabff658c8f5635bba315e32db625d27 | 6,006 | ex | Elixir | lib/elixir/lib/task/supervisor.ex | rcoppolo/elixir | c4092e071f8b42f5a9ad213dd8b3632918097213 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/task/supervisor.ex | rcoppolo/elixir | c4092e071f8b42f5a9ad213dd8b3632918097213 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/task/supervisor.ex | rcoppolo/elixir | c4092e071f8b42f5a9ad213dd8b3632918097213 | [
"Apache-2.0"
] | null | null | null | defmodule Task.Supervisor do
@moduledoc """
A task supervisor.
This module defines a supervisor which can be used to dynamically
supervise tasks. Behind the scenes, this module is implemented as a
`:simple_one_for_one` supervisor where the workers are temporary by
default (that is, they are not restarted a... | 35.329412 | 87 | 0.7003 |
5a6fe80dc476c67d541cf593fb25374029a735a5 | 1,811 | ex | Elixir | clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/set_iam_policy_request.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/set_iam_policy_request.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/set_iam_policy_request.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 38.531915 | 321 | 0.760906 |
5a6ffff8f6bded7128cb5009133794a73db86180 | 67 | ex | Elixir | examples/apps/phx_example/lib/phx_example_web/views/page_view.ex | tpitale/elixir_agent | f356b588fe9d7cc3b9db00d9a251e009a20b3e0e | [
"Apache-2.0"
] | 227 | 2018-09-05T15:33:23.000Z | 2022-02-25T18:12:06.000Z | examples/apps/phx_example/lib/phx_example_web/views/page_view.ex | tpitale/elixir_agent | f356b588fe9d7cc3b9db00d9a251e009a20b3e0e | [
"Apache-2.0"
] | 211 | 2018-09-05T21:42:41.000Z | 2022-03-25T17:51:56.000Z | examples/apps/phx_example/lib/phx_example_web/views/page_view.ex | tpitale/elixir_agent | f356b588fe9d7cc3b9db00d9a251e009a20b3e0e | [
"Apache-2.0"
] | 84 | 2018-09-05T04:26:26.000Z | 2022-03-09T14:28:14.000Z | defmodule PhxExampleWeb.PageView do
use PhxExampleWeb, :view
end
| 16.75 | 35 | 0.820896 |
5a7014ca782f14a1004c073b800dfaf22af0fbe7 | 1,461 | ex | Elixir | app_ui/lib/app_ui_web/endpoint.ex | samuelventura/nerves_sample_bbb_emmc | 13b2d376b002c420f71f62cfe48fc3eea4c83a1d | [
"Apache-2.0"
] | null | null | null | app_ui/lib/app_ui_web/endpoint.ex | samuelventura/nerves_sample_bbb_emmc | 13b2d376b002c420f71f62cfe48fc3eea4c83a1d | [
"Apache-2.0"
] | null | null | null | app_ui/lib/app_ui_web/endpoint.ex | samuelventura/nerves_sample_bbb_emmc | 13b2d376b002c420f71f62cfe48fc3eea4c83a1d | [
"Apache-2.0"
] | null | null | null | defmodule AppUiWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :app_ui
# The session will be stored in the cookie and signed,
# this means its contents can be read but not tampered with.
# Set :encryption_salt if you would also like to encrypt it.
@session_options [
store: :cookie,
key: "_app_ui_key",... | 29.22 | 97 | 0.718001 |
5a70298e1dc40b7cbbcfa1209c7d6856c75484e3 | 446 | ex | Elixir | elixir/elixir/lib/homework/companies/company.ex | connernance1/web-homework | 0ec80f58f366359bf09e88afb18ccc3d69974457 | [
"MIT"
] | null | null | null | elixir/elixir/lib/homework/companies/company.ex | connernance1/web-homework | 0ec80f58f366359bf09e88afb18ccc3d69974457 | [
"MIT"
] | null | null | null | elixir/elixir/lib/homework/companies/company.ex | connernance1/web-homework | 0ec80f58f366359bf09e88afb18ccc3d69974457 | [
"MIT"
] | null | null | null | defmodule Homework.Companies.Company do
use Ecto.Schema
import Ecto.Changeset
@primary_key {:id, :binary_id, autogenerate: true}
schema "companies" do
field :available_credit, :integer
field :credit_line, :integer
field :name, :string
timestamps()
end
@doc false
def changeset(company, a... | 21.238095 | 60 | 0.692825 |
5a70322cc9682f01c97c6d4289ca0f0a36226403 | 2,482 | ex | Elixir | clients/game_services/lib/google_api/game_services/v1beta/model/game_server_deployment.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/game_services/lib/google_api/game_services/v1beta/model/game_server_deployment.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/game_services/lib/google_api/game_services/v1beta/model/game_server_deployment.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.032258 | 292 | 0.701853 |
5a70354a02255107335344862b279a4a978caa39 | 23,511 | ex | Elixir | deps/timex/lib/parse/datetime/parser.ex | luishendrix92/exrez | c9a001ff32c2081449ce190d151e7df09a0a42ee | [
"MIT"
] | null | null | null | deps/timex/lib/parse/datetime/parser.ex | luishendrix92/exrez | c9a001ff32c2081449ce190d151e7df09a0a42ee | [
"MIT"
] | null | null | null | deps/timex/lib/parse/datetime/parser.ex | luishendrix92/exrez | c9a001ff32c2081449ce190d151e7df09a0a42ee | [
"MIT"
] | null | null | null | defmodule Timex.Parse.DateTime.Parser do
@moduledoc """
This is the base plugin behavior for all Timex date/time string parsers.
"""
import Combine.Parsers.Base, only: [eof: 0, map: 2, pipe: 2]
alias Timex.{Timezone, TimezoneInfo, AmbiguousDateTime, AmbiguousTimezoneInfo}
alias Timex.Parse.ParseError
ali... | 40.12116 | 134 | 0.510655 |
5a70394a8c537fe1c50e267e4a6834e01708f1ef | 1,161 | ex | Elixir | template/$PROJECT_NAME$/lib/$PROJECT_NAME$_web/controllers/session_controller.ex | luke-hawk/degree | 9274fc979ea0715d3bdf65a0adb14fdd2419db9a | [
"MIT"
] | 3 | 2019-08-01T08:28:24.000Z | 2019-08-18T14:50:32.000Z | template/$PROJECT_NAME$/lib/$PROJECT_NAME$_web/controllers/session_controller.ex | luke-hawk/degree | 9274fc979ea0715d3bdf65a0adb14fdd2419db9a | [
"MIT"
] | 3 | 2021-03-09T12:14:26.000Z | 2022-02-10T18:46:15.000Z | template/$PROJECT_NAME$/lib/$PROJECT_NAME$_web/controllers/session_controller.ex | luke-hawk/degree | 9274fc979ea0715d3bdf65a0adb14fdd2419db9a | [
"MIT"
] | null | null | null | defmodule <%= @project_name_camel_case %>Web.SessionController do
use <%= @project_name_camel_case %>Web, :controller
def new(conn, _) do
render(conn, "new.html")
end
def create(conn, %{"session" => %{"email" => user, "password" => password}}) do
case <%= @project_name_camel_case %>.Auth.authenticate_... | 26.386364 | 82 | 0.613264 |
5a7047b8458ff9b8c6d9283ce03a50ba2be7555d | 82 | exs | Elixir | test/august_db_web/views/page_view_test.exs | Terkwood/AugustDB | 6de696a80bc4eb523b89d64cd4292ac342bdb3aa | [
"MIT"
] | 5 | 2021-07-28T15:56:42.000Z | 2021-08-18T20:58:43.000Z | test/august_db_web/views/page_view_test.exs | Terkwood/AugustDB | 6de696a80bc4eb523b89d64cd4292ac342bdb3aa | [
"MIT"
] | 54 | 2021-07-28T14:51:49.000Z | 2021-08-11T21:56:10.000Z | test/august_db_web/views/page_view_test.exs | Terkwood/AugustDB | 6de696a80bc4eb523b89d64cd4292ac342bdb3aa | [
"MIT"
] | null | null | null | defmodule AugustDbWeb.PageViewTest do
use AugustDbWeb.ConnCase, async: true
end
| 20.5 | 39 | 0.829268 |
5a7093635a205d6041f1ba9b53da7dd6f2186e1b | 1,319 | exs | Elixir | mix.exs | mpraski/flow-monitor | c88e60506c5f1cd3a23b57e6844d0451adb8aaa5 | [
"MIT"
] | null | null | null | mix.exs | mpraski/flow-monitor | c88e60506c5f1cd3a23b57e6844d0451adb8aaa5 | [
"MIT"
] | null | null | null | mix.exs | mpraski/flow-monitor | c88e60506c5f1cd3a23b57e6844d0451adb8aaa5 | [
"MIT"
] | null | null | null | defmodule FlowMonitor.MixProject do
use Mix.Project
def project do
[
app: :flow_monitor,
version: "0.1.2",
elixir: ">= 1.6.0",
start_permanent: Mix.env() == :prod,
deps: deps(),
description: description(),
docs: docs(),
package: package(),
name: "Flow Monit... | 23.140351 | 88 | 0.569371 |
5a70a902e1641b9f8729df932ad33c6a869b7c83 | 2,073 | ex | Elixir | test/aggregates/support/multi_bank_account.ex | Aleksion/commanded | 266587f7786d27b390a355991cbb792944ac0885 | [
"MIT"
] | null | null | null | test/aggregates/support/multi_bank_account.ex | Aleksion/commanded | 266587f7786d27b390a355991cbb792944ac0885 | [
"MIT"
] | null | null | null | test/aggregates/support/multi_bank_account.ex | Aleksion/commanded | 266587f7786d27b390a355991cbb792944ac0885 | [
"MIT"
] | null | null | null | defmodule Commanded.Aggregate.Multi.BankAccount do
defstruct [
account_number: nil,
balance: 0,
state: nil,
]
alias Commanded.Aggregate.Multi
alias Commanded.Aggregate.Multi.BankAccount
defmodule Commands do
defmodule OpenAccount, do: defstruct [:account_number, :initial_balance]
... | 27.276316 | 100 | 0.710564 |
5a70c6a71c8d15e51c23881ca6c2014968417067 | 1,611 | ex | Elixir | clients/classroom/lib/google_api/classroom/v1/model/individual_students_options.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/classroom/lib/google_api/classroom/v1/model/individual_students_options.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/classroom/lib/google_api/classroom/v1/model/individual_students_options.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 34.276596 | 143 | 0.749224 |
5a70ce30166580a3f3f589bd6d48de956295da4b | 1,402 | ex | Elixir | lib/rodeo/http_case.ex | carpodaster/rodeo | 70acaffd2e2a12ca0c54ff72dca19de002d8d38f | [
"BSD-3-Clause"
] | 18 | 2017-04-24T03:39:11.000Z | 2017-09-09T09:55:02.000Z | lib/rodeo/http_case.ex | carpodaster/rodeo | 70acaffd2e2a12ca0c54ff72dca19de002d8d38f | [
"BSD-3-Clause"
] | 5 | 2017-04-22T09:43:37.000Z | 2017-04-25T15:06:59.000Z | lib/rodeo/http_case.ex | carpodaster/rodeo | 70acaffd2e2a12ca0c54ff72dca19de002d8d38f | [
"BSD-3-Clause"
] | null | null | null | defmodule Rodeo.HTTPCase do
@doc false
defmacro __using__(_opts) do
quote do
import(unquote(__MODULE__))
end
end
@doc ~S"""
Starts a cowboy server at a random open TCP port with handler `handler`
(see `Rodeo.Handler`), calls the passed function and terminates the server
instance.
The fu... | 25.490909 | 95 | 0.663338 |
5a70cf26d4a2108d7fe6ce43bb6573a4db9e8360 | 2,397 | exs | Elixir | test_fixtures/precompiled/good-posts.exs | starbelly/Serum | 6bb1b8ee1dbc457e278087bf605c964dac9e5d3d | [
"MIT"
] | 1 | 2019-06-21T10:55:33.000Z | 2019-06-21T10:55:33.000Z | test_fixtures/precompiled/good-posts.exs | starbelly/Serum | 6bb1b8ee1dbc457e278087bf605c964dac9e5d3d | [
"MIT"
] | null | null | null | test_fixtures/precompiled/good-posts.exs | starbelly/Serum | 6bb1b8ee1dbc457e278087bf605c964dac9e5d3d | [
"MIT"
] | null | null | null | [%{__struct__: Serum.Post, date: "2019-01-01", file: "/home/dalgona/repo/Serum/priv/fixtures/posts/good-post.md", html: "<h1>Hello, world!</h1>\n<p>The quick brown fox jumps over the lazy dog.\nThe quick brown fox jumps over the lazy dog.\nThe quick brown fox jumps over the lazy dog.\nThe quick brown fox jumps over the... | 2,397 | 2,397 | 0.721318 |
5a70f041321d315d3c1ec03ae83e87694ca69268 | 178 | ex | Elixir | lib/stripe/balance_transaction.ex | Finger-Ink/stripe-elixir | 018cef01a6645074547be4a93b6a443d21be2484 | [
"MIT"
] | 70 | 2016-07-28T16:39:36.000Z | 2021-08-03T14:26:19.000Z | lib/stripe/balance_transaction.ex | Finger-Ink/stripe-elixir | 018cef01a6645074547be4a93b6a443d21be2484 | [
"MIT"
] | 29 | 2018-09-17T11:35:17.000Z | 2021-08-01T11:15:09.000Z | lib/stripe/balance_transaction.ex | Finger-Ink/stripe-elixir | 018cef01a6645074547be4a93b6a443d21be2484 | [
"MIT"
] | 30 | 2016-10-11T21:07:27.000Z | 2020-12-23T20:15:41.000Z | defmodule Stripe.BalanceTransaction do
use Stripe.API, [:retrieve, :list]
def endpoint do
"balance/history"
end
def all(opts \\ []) do
list([], opts)
end
end
| 14.833333 | 38 | 0.646067 |
5a7107e94267d2b726a335a520fdbdb0455c23af | 5,039 | ex | Elixir | lib/codes/codes_m27.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_m27.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_m27.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | defmodule IcdCode.ICDCode.Codes_M27 do
alias IcdCode.ICDCode
def _M270 do
%ICDCode{full_code: "M270",
category_code: "M27",
short_code: "0",
full_name: "Developmental disorders of jaws",
short_name: "Developmental disorders of jaws",
category_name: "Developmental... | 33.370861 | 102 | 0.616987 |
5a7125be125b048a485263feec0255a10ff55512 | 440 | ex | Elixir | app/lib/noodl/events/event/registry.ex | nathanjohnson320/noodl | 2e449aab15b54fc5a1dc45ebf4b79e7b64b7c967 | [
"MIT"
] | 1 | 2021-01-20T20:00:50.000Z | 2021-01-20T20:00:50.000Z | app/lib/noodl/events/event/registry.ex | nathanjohnson320/noodl | 2e449aab15b54fc5a1dc45ebf4b79e7b64b7c967 | [
"MIT"
] | null | null | null | app/lib/noodl/events/event/registry.ex | nathanjohnson320/noodl | 2e449aab15b54fc5a1dc45ebf4b79e7b64b7c967 | [
"MIT"
] | null | null | null | defmodule Noodl.Events.Event.Registry do
@moduledoc ~S"""
Registry that contains state on in progress sessions
"""
alias Noodl.Events.Session
def register(%Session{} = session) do
Registry.register(EventRegistry, session.id, session)
end
def lookup(%Session{} = session) do
case Registry.lookup(... | 23.157895 | 57 | 0.679545 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.