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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
934b1639bf4ef07fcac010e24bbac36d3cf740ec | 1,577 | ex | Elixir | lib/glimesh_web/plugs/api_context_plug.ex | Cykotiq/glimesh.tv | 6b998fa0b170b04916378df7246b6c64dd9f401e | [
"MIT"
] | null | null | null | lib/glimesh_web/plugs/api_context_plug.ex | Cykotiq/glimesh.tv | 6b998fa0b170b04916378df7246b6c64dd9f401e | [
"MIT"
] | null | null | null | lib/glimesh_web/plugs/api_context_plug.ex | Cykotiq/glimesh.tv | 6b998fa0b170b04916378df7246b6c64dd9f401e | [
"MIT"
] | null | null | null | defmodule GlimeshWeb.Plugs.ApiContextPlug do
@behaviour Plug
alias Glimesh.Accounts.User
alias Glimesh.OauthApplications.OauthApplication
import Plug.Conn
import Phoenix.Controller, only: [json: 2]
def init(opts), do: opts
def call(conn, opts) do
case authorized(conn, opts) do
{:ok, %User{} ... | 25.031746 | 83 | 0.589727 |
934b36eaa5c4e6583acbf28ff26cd7830d7ba89c | 1,119 | ex | Elixir | lib/admint_web/live/page/view_live.ex | tiberiuc/admint | 6d1bd5462f49053c7c3999c35cc301c7b8f08a70 | [
"MIT"
] | null | null | null | lib/admint_web/live/page/view_live.ex | tiberiuc/admint | 6d1bd5462f49053c7c3999c35cc301c7b8f08a70 | [
"MIT"
] | null | null | null | lib/admint_web/live/page/view_live.ex | tiberiuc/admint | 6d1bd5462f49053c7c3999c35cc301c7b8f08a70 | [
"MIT"
] | null | null | null | defmodule Admint.Web.Page.ViewLive do
use Admint.Web, :live_component
import Admint.Definition.Helpers
# import Admint.Web.Page.Helpers
@impl true
def mount(socket) do
{:ok, socket}
end
@impl true
def update(assigns, socket) do
admint = assigns.admint
module = admint.module
{:page, pag... | 20.345455 | 47 | 0.6479 |
934b42c746b67f787c41ea48599f7e4fffaffbc8 | 295 | ex | Elixir | backend/apps/students_crm_v2/lib/students_crm_v2/interactions/user/delete.ex | KyivKrishnaAcademy/students_crm_v2 | e0ad9b3c5e52dfef5ab8f9179f3c593f935786e6 | [
"MIT"
] | null | null | null | backend/apps/students_crm_v2/lib/students_crm_v2/interactions/user/delete.ex | KyivKrishnaAcademy/students_crm_v2 | e0ad9b3c5e52dfef5ab8f9179f3c593f935786e6 | [
"MIT"
] | 50 | 2018-07-29T09:17:35.000Z | 2019-02-26T05:23:34.000Z | backend/apps/students_crm_v2/lib/students_crm_v2/interactions/user/delete.ex | KyivKrishnaAcademy/students_crm_v2 | e0ad9b3c5e52dfef5ab8f9179f3c593f935786e6 | [
"MIT"
] | null | null | null | defmodule StudentsCrmV2.Interactions.User.Delete do
@moduledoc false
alias StudentsCrmV2.Models.User
alias StudentsCrmV2.Repo
@spec execute(id :: term()) :: {:ok, User.t()} | {:error, Ecto.Changeset.t()}
def execute(id) do
User
|> Repo.get(id)
|> Repo.delete()
end
end
| 21.071429 | 79 | 0.664407 |
934b5f9e984b9ffc9d962bf7af4dbbc45d48784d | 798 | ex | Elixir | services/fc_inventory/lib/fc_inventory/events/entry_deleted.ex | fleadope/freshcom | 8d5944befaa6eea8d31e5f5995939be2a1a44262 | [
"BSD-3-Clause"
] | 46 | 2018-10-13T23:18:13.000Z | 2021-08-07T07:46:51.000Z | services/fc_inventory/lib/fc_inventory/events/entry_deleted.ex | fleadope/freshcom | 8d5944befaa6eea8d31e5f5995939be2a1a44262 | [
"BSD-3-Clause"
] | 25 | 2018-10-14T00:56:07.000Z | 2019-12-23T19:41:02.000Z | services/fc_inventory/lib/fc_inventory/events/entry_deleted.ex | fleadope/freshcom | 8d5944befaa6eea8d31e5f5995939be2a1a44262 | [
"BSD-3-Clause"
] | 5 | 2018-12-16T04:39:51.000Z | 2020-10-01T12:17:03.000Z | defmodule FCInventory.EntryDeleted do
use FCBase, :event
@version 1
typedstruct do
field :__version__, integer(), default: @version
field :request_id, String.t()
field :requester_id, String.t()
field :requester_type, String.t()
field :requester_role, String.t()
field :client_id, String.... | 22.8 | 77 | 0.680451 |
934b7844610e2ec8d7f3b49cf8101f6cf20a9744 | 1,184 | ex | Elixir | create_fun_umbrella/apps/create_fun_web/lib/create_fun_web/channels/user_socket.ex | Vorzious/CreateFun | 5744c913ef706bc29062fa90a8ec5de12d267dab | [
"MIT"
] | null | null | null | create_fun_umbrella/apps/create_fun_web/lib/create_fun_web/channels/user_socket.ex | Vorzious/CreateFun | 5744c913ef706bc29062fa90a8ec5de12d267dab | [
"MIT"
] | 9 | 2018-06-17T09:54:03.000Z | 2018-06-17T09:55:20.000Z | create_fun_umbrella/apps/create_fun_web/lib/create_fun_web/channels/user_socket.ex | Vorzious/CreateFun | 5744c913ef706bc29062fa90a8ec5de12d267dab | [
"MIT"
] | 1 | 2018-06-05T18:38:01.000Z | 2018-06-05T18:38:01.000Z | defmodule CreateFunWeb.UserSocket do
use Phoenix.Socket
## Channels
# channel "room:*", CreateFunWeb.RoomChannel
## Transports
transport :websocket, Phoenix.Transports.WebSocket
# transport :longpoll, Phoenix.Transports.LongPoll
# Socket params are passed from the client and can
# be used to verify a... | 31.157895 | 89 | 0.706081 |
934b9b165dd0d6858189d4168a009b74059ecac2 | 1,143 | exs | Elixir | config/config.exs | subspace-com/subspace_elixir_openapi_client | 9e52d31edb228de2d93f2f988c98207106241a32 | [
"MIT"
] | null | null | null | config/config.exs | subspace-com/subspace_elixir_openapi_client | 9e52d31edb228de2d93f2f988c98207106241a32 | [
"MIT"
] | null | null | null | config/config.exs | subspace-com/subspace_elixir_openapi_client | 9e52d31edb228de2d93f2f988c98207106241a32 | [
"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.870968 | 73 | 0.75678 |
934ba8b2163bec61804b47adb4ea804f7c10f604 | 1,955 | ex | Elixir | clients/cloud_deploy/lib/google_api/cloud_deploy/v1/model/stage.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/cloud_deploy/lib/google_api/cloud_deploy/v1/model/stage.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/cloud_deploy/lib/google_api/cloud_deploy/v1/model/stage.ex | dazuma/elixir-google-api | 6a9897168008efe07a6081d2326735fe332e522c | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 39.1 | 436 | 0.728389 |
934bab09e0a80b61aa471e930be076468c7d42b6 | 26,696 | ex | Elixir | lib/nx/defn/grad.ex | erlsci/nx | 4b99478523da55d65bd9e5f568d9a639cc568e26 | [
"Apache-2.0"
] | null | null | null | lib/nx/defn/grad.ex | erlsci/nx | 4b99478523da55d65bd9e5f568d9a639cc568e26 | [
"Apache-2.0"
] | null | null | null | lib/nx/defn/grad.ex | erlsci/nx | 4b99478523da55d65bd9e5f568d9a639cc568e26 | [
"Apache-2.0"
] | 1 | 2022-03-26T12:13:19.000Z | 2022-03-26T12:13:19.000Z | defmodule Nx.Defn.Grad do
@moduledoc false
alias Nx.Defn.{Expr, Tree}
alias Nx.Tensor, as: T
def transform(to_grad, expr) do
expr = validate_expr!(expr)
initial = Expr.tensor(1.0)
{graded, _} =
Tree.composite(to_grad, %{}, fn to_grad, shared ->
id = grad_id!(to_grad)
{graded... | 27.924686 | 94 | 0.599378 |
934c0264ca41673fac679a86a8a47909cfd7fcc7 | 855 | ex | Elixir | Microsoft.Azure.Management.Preview.Containers/lib/microsoft/azure/management/preview/containers/model/usage.ex | chgeuer/ex_microsoft_azure_management | 99cd9f7f2ff1fdbe69ca5bac55b6e2af91ba3603 | [
"Apache-2.0"
] | 4 | 2018-09-29T03:43:15.000Z | 2021-04-01T18:30:46.000Z | Microsoft.Azure.Management.Preview.Containers/lib/microsoft/azure/management/preview/containers/model/usage.ex | chgeuer/ex_microsoft_azure_management | 99cd9f7f2ff1fdbe69ca5bac55b6e2af91ba3603 | [
"Apache-2.0"
] | null | null | null | Microsoft.Azure.Management.Preview.Containers/lib/microsoft/azure/management/preview/containers/model/usage.ex | chgeuer/ex_microsoft_azure_management | 99cd9f7f2ff1fdbe69ca5bac55b6e2af91ba3603 | [
"Apache-2.0"
] | null | null | null | # NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
defmodule Microsoft.Azure.Management.Preview.Containers.Model.Usage do
@moduledoc """
A single usage result
"""
@derive [Poison.Encoder]
defstruc... | 25.147059 | 108 | 0.693567 |
934c27f60ab9085dfa7c3ffe1808df3a5325078b | 2,372 | exs | Elixir | test/test_helper.exs | Fulnir/ExDgraph-Gremlin | 01488aa04df5c7a92b094d6a1acd4434b3c5e009 | [
"Apache-2.0"
] | 3 | 2018-03-21T20:09:13.000Z | 2019-06-19T03:07:55.000Z | test/test_helper.exs | Fulnir/ExDgraph-Gremlin | 01488aa04df5c7a92b094d6a1acd4434b3c5e009 | [
"Apache-2.0"
] | null | null | null | test/test_helper.exs | Fulnir/ExDgraph-Gremlin | 01488aa04df5c7a92b094d6a1acd4434b3c5e009 | [
"Apache-2.0"
] | null | null | null | # ExUnit.start()
ExUnit.start(exclude: [:skip])
defmodule ExDgraph.TestHelper do
@starwars_schema "id: string @index(exact).
name: string @index(exact, term) @count .
age: int @index(int) .
friend: uid @count .
dob: dateTime ."
@starwars_creation_mutation """
_:luke <name> "Luke Skywalker" .
_:leia... | 26.065934 | 78 | 0.621838 |
934c368f68837cc58aed947602013dd8ab06b327 | 404 | exs | Elixir | config/.credo.exs | edenlabllc/taskafka | 7eda223e233fc23b4c502ec444362c6237185e04 | [
"MIT"
] | null | null | null | config/.credo.exs | edenlabllc/taskafka | 7eda223e233fc23b4c502ec444362c6237185e04 | [
"MIT"
] | null | null | null | config/.credo.exs | edenlabllc/taskafka | 7eda223e233fc23b4c502ec444362c6237185e04 | [
"MIT"
] | null | null | null | %{
configs: [
%{
color: true,
name: "default",
files: %{
included: ["lib/*"]
},
checks: [
{Credo.Check.Design.TagTODO, exit_status: 0},
{Credo.Check.Readability.MaxLineLength, priority: :low, max_length: 120},
{Credo.Check.Readability.Specs, false},
... | 22.444444 | 81 | 0.54703 |
934c3f3228a4db6598acea4c49622bb6c10c5a2f | 2,169 | ex | Elixir | clients/docs/lib/google_api/docs/v1/model/suggested_table_cell_style.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/docs/lib/google_api/docs/v1/model/suggested_table_cell_style.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/docs/lib/google_api/docs/v1/model/suggested_table_cell_style.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... | 40.166667 | 232 | 0.755187 |
934c5f87ea9f463167b834327039ecd82f9209d9 | 1,582 | ex | Elixir | apps/authentication/lib/authentication.ex | Alezrik/game_services_umbrella | 9b9dd6707c200b10c5a73568913deb4d5d8320be | [
"MIT"
] | 4 | 2018-11-09T16:57:06.000Z | 2021-03-02T22:57:17.000Z | apps/authentication/lib/authentication.ex | Alezrik/game_services_umbrella | 9b9dd6707c200b10c5a73568913deb4d5d8320be | [
"MIT"
] | 29 | 2018-10-26T08:29:37.000Z | 2018-12-09T21:02:05.000Z | apps/authentication/lib/authentication.ex | Alezrik/game_services_umbrella | 9b9dd6707c200b10c5a73568913deb4d5d8320be | [
"MIT"
] | null | null | null | defmodule Authentication do
@moduledoc """
Documentation for Authentication.
"""
require Logger
@doc """
Attempt to retrieve a User by its Credential name and password
"""
@spec get_user_by_credential(String.t(), String.t()) ::
{:ok, %GameServices.Account.User{}} | {:error, any()}
def ge... | 26.366667 | 87 | 0.685209 |
934c65a2fe42876f087c50ae41595fa8e04f49c7 | 348 | ex | Elixir | nebulex_telemetry_example/lib/nebulex_telemetry_example/application.ex | cabol/nebulex_examples | 21bd2673eecfc0b5c7a2807a3a47488d99a7d725 | [
"MIT"
] | 25 | 2017-07-30T01:27:54.000Z | 2021-12-10T16:41:03.000Z | nebulex_telemetry_example/lib/nebulex_telemetry_example/application.ex | cabol/nebulex_examples | 21bd2673eecfc0b5c7a2807a3a47488d99a7d725 | [
"MIT"
] | 2 | 2019-11-12T09:41:26.000Z | 2021-11-08T13:51:24.000Z | nebulex_telemetry_example/lib/nebulex_telemetry_example/application.ex | cabol/nebulex_examples | 21bd2673eecfc0b5c7a2807a3a47488d99a7d725 | [
"MIT"
] | 1 | 2019-01-08T19:06:54.000Z | 2019-01-08T19:06:54.000Z | defmodule NebulexTelemetryExample.Application do
@moduledoc false
use Application
def start(_type, _args) do
children = [
NebulexTelemetryExample.Cache,
NebulexTelemetryExample.Telemetry
]
opts = [strategy: :one_for_one, name: NebulexTelemetryExample.Supervisor]
Supervisor.start_lin... | 21.75 | 77 | 0.744253 |
934c729b1066608d02dd39a4b2a390e3d7d08639 | 2,016 | ex | Elixir | clients/game_services/lib/google_api/game_services/v1/model/condition.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/game_services/lib/google_api/game_services/v1/model/condition.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/game_services/lib/google_api/game_services/v1/model/condition.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... | 34.169492 | 159 | 0.683036 |
934c75fbc93c5448f6c4d757ed641d0beb8d5404 | 304 | ex | Elixir | lib/cf_sync/http_client.ex | 3h15/CFSync | 0b5024688bcb40786c8313e77385f935686d1bdd | [
"MIT"
] | null | null | null | lib/cf_sync/http_client.ex | 3h15/CFSync | 0b5024688bcb40786c8313e77385f935686d1bdd | [
"MIT"
] | null | null | null | lib/cf_sync/http_client.ex | 3h15/CFSync | 0b5024688bcb40786c8313e77385f935686d1bdd | [
"MIT"
] | null | null | null | defmodule CFSync.HTTPClient do
@moduledoc false
@type result :: {:ok, any()}
@type error_code :: :unauthorized | :unprocessable
@type error :: {:error, error_code()}
@type rate_limit :: {:rate_limited, integer()}
@callback fetch(String.t(), String.t()) :: result | error | rate_limit
end
| 23.384615 | 72 | 0.667763 |
934c8a91c770a4c1f5383ddd0053d0093df48ace | 266 | exs | Elixir | snake/test/snake_web/views/layout_view_test.exs | Krajzys/Snakelixir | f369408da254115037009c89abc2dfb5924b792e | [
"MIT"
] | null | null | null | snake/test/snake_web/views/layout_view_test.exs | Krajzys/Snakelixir | f369408da254115037009c89abc2dfb5924b792e | [
"MIT"
] | 2 | 2021-05-15T11:28:20.000Z | 2021-06-02T09:21:58.000Z | snake/test/snake_web/views/layout_view_test.exs | Krajzys/Snakelixir | f369408da254115037009c89abc2dfb5924b792e | [
"MIT"
] | 1 | 2021-06-02T09:23:03.000Z | 2021-06-02T09:23:03.000Z | defmodule SnakeWeb.LayoutViewTest do
use SnakeWeb.ConnCase, async: true
# When testing helpers, you may want to import Phoenix.HTML and
# use functions such as safe_to_string() to convert the helper
# result into an HTML string.
# import Phoenix.HTML
end
| 29.555556 | 65 | 0.763158 |
934c9fe996b566225d0fd32b146170fc41b5c3a4 | 3,542 | ex | Elixir | priv/templates/coherence.install/controllers/coherence/unlock_controller.ex | remigijusj/coherence | 36fe35b0bfe7ac63b44b4046f3ba62f2fe69603a | [
"MIT"
] | null | null | null | priv/templates/coherence.install/controllers/coherence/unlock_controller.ex | remigijusj/coherence | 36fe35b0bfe7ac63b44b4046f3ba62f2fe69603a | [
"MIT"
] | null | null | null | priv/templates/coherence.install/controllers/coherence/unlock_controller.ex | remigijusj/coherence | 36fe35b0bfe7ac63b44b4046f3ba62f2fe69603a | [
"MIT"
] | null | null | null | defmodule <%= base %>.Coherence.UnlockController do
@moduledoc """
Handle unlock_with_token actions.
This controller provides the ability generate an unlock token, send
the user an email and unlocking the account with a valid token.
Basic locking and unlocking does not use this controller.
"""
use Coher... | 30.016949 | 93 | 0.639469 |
934d0b8adc11429cb2526a0aaf813eaa5d809427 | 2,282 | ex | Elixir | lib/appsignal/transmitter.ex | brokernetworkapp/appsignal-elixir | 60105779e5ac4565d3fc3d854793eff0fa04a1ea | [
"MIT"
] | null | null | null | lib/appsignal/transmitter.ex | brokernetworkapp/appsignal-elixir | 60105779e5ac4565d3fc3d854793eff0fa04a1ea | [
"MIT"
] | null | null | null | lib/appsignal/transmitter.ex | brokernetworkapp/appsignal-elixir | 60105779e5ac4565d3fc3d854793eff0fa04a1ea | [
"MIT"
] | null | null | null | defmodule Appsignal.Transmitter do
@moduledoc false
require Logger
def request(method, url, headers \\ [], body \\ "") do
http_client = Application.get_env(:appsignal, :http_client, :hackney)
:application.ensure_all_started(http_client)
http_client.request(method, url, headers, body, options())
en... | 25.355556 | 83 | 0.551271 |
934d20177d2117ac318c4145f2a5182c222a18ec | 1,288 | ex | Elixir | lib/zaryn/self_repair.ex | ambareesha7/node-zaryn | 136e542801bf9b6fa4a015d3464609fdf3dacee8 | [
"Apache-2.0"
] | 1 | 2021-07-06T19:47:14.000Z | 2021-07-06T19:47:14.000Z | lib/zaryn/self_repair.ex | ambareesha7/node-zaryn | 136e542801bf9b6fa4a015d3464609fdf3dacee8 | [
"Apache-2.0"
] | null | null | null | lib/zaryn/self_repair.ex | ambareesha7/node-zaryn | 136e542801bf9b6fa4a015d3464609fdf3dacee8 | [
"Apache-2.0"
] | null | null | null | defmodule Zaryn.SelfRepair do
@moduledoc """
Synchronization for all the ArchEthic nodes relies on the self-repair mechanism started during
the bootstrapping phase and stores last synchronization date after each cycle.
"""
alias __MODULE__.Scheduler
alias __MODULE__.Sync
@doc """
Start the self repair... | 29.953488 | 96 | 0.732919 |
934d378a601096802e61b66fa01b06ca25b0b148 | 29,886 | ex | Elixir | lib/ecto/repo/schema.ex | IcyEagle/ecto | 26237057d4ffff2daf5258e181eccc3238b71490 | [
"Apache-2.0"
] | null | null | null | lib/ecto/repo/schema.ex | IcyEagle/ecto | 26237057d4ffff2daf5258e181eccc3238b71490 | [
"Apache-2.0"
] | null | null | null | lib/ecto/repo/schema.ex | IcyEagle/ecto | 26237057d4ffff2daf5258e181eccc3238b71490 | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.Repo.Schema do
# The module invoked by user defined repos
# for schema related functionality.
@moduledoc false
alias Ecto.Changeset
alias Ecto.Changeset.Relation
require Ecto.Query
@doc """
Implementation for `Ecto.Repo.insert_all/3`.
"""
def insert_all(repo, adapter, schema, rows, ... | 37.171642 | 114 | 0.630931 |
934d4fce76678de959b110751dd7cead4c47ab68 | 5,695 | exs | Elixir | test/influxdb_v1/writer/line_test.exs | coder-from-hell/instream | f062e924b74a403e0f41b5374d9ed0e00ae59507 | [
"Apache-2.0"
] | 204 | 2015-06-04T06:38:57.000Z | 2022-01-30T08:56:33.000Z | test/influxdb_v1/writer/line_test.exs | coder-from-hell/instream | f062e924b74a403e0f41b5374d9ed0e00ae59507 | [
"Apache-2.0"
] | 71 | 2015-05-24T02:08:28.000Z | 2022-01-10T17:13:27.000Z | test/influxdb_v1/writer/line_test.exs | coder-from-hell/instream | f062e924b74a403e0f41b5374d9ed0e00ae59507 | [
"Apache-2.0"
] | 41 | 2015-09-05T21:24:04.000Z | 2021-11-10T02:52:48.000Z | defmodule Instream.InfluxDBv1.Writer.LineTest do
use ExUnit.Case, async: true
@moduletag :"influxdb_exclude_2.0"
alias Instream.TestHelpers.Connections.DefaultConnection
defmodule BatchSeries do
use Instream.Series
series do
measurement "location"
tag :scope
field :value
end
... | 23.340164 | 94 | 0.540123 |
934dbabe59e0c396cf2e830d00c19168c8266f46 | 3,839 | ex | Elixir | lib/edgedb/protocol/enum.ex | f0lio/edgedb-elixir | b285bd8037b0b951aabfa1d1733889880f8bfd66 | [
"MIT"
] | null | null | null | lib/edgedb/protocol/enum.ex | f0lio/edgedb-elixir | b285bd8037b0b951aabfa1d1733889880f8bfd66 | [
"MIT"
] | null | null | null | lib/edgedb/protocol/enum.ex | f0lio/edgedb-elixir | b285bd8037b0b951aabfa1d1733889880f8bfd66 | [
"MIT"
] | null | null | null | defmodule EdgeDB.Protocol.Enum do
@moduledoc false
alias EdgeDB.Protocol.Datatypes
@type code() :: integer()
@type value() :: atom()
@callback to_atom(code_or_value :: code() | value()) :: atom()
@callback to_code(value_or_code :: value() | code()) :: integer()
@callback encode(code_or_value :: term())... | 22.063218 | 84 | 0.608492 |
934dd49cd7a4b2f7c2e3b11af82201b605c860db | 4,956 | exs | Elixir | test/purple_web/controllers/user_settings_controller_test.exs | knoebber/petaller | 3532db5a3688459127d2427af42e32ca0f494d44 | [
"MIT"
] | null | null | null | test/purple_web/controllers/user_settings_controller_test.exs | knoebber/petaller | 3532db5a3688459127d2427af42e32ca0f494d44 | [
"MIT"
] | null | null | null | test/purple_web/controllers/user_settings_controller_test.exs | knoebber/petaller | 3532db5a3688459127d2427af42e32ca0f494d44 | [
"MIT"
] | null | null | null | defmodule PurpleWeb.UserSettingsControllerTest do
use PurpleWeb.ConnCase, async: true
alias Purple.Accounts
import Purple.AccountsFixtures
setup :register_and_log_in_user
describe "GET /users/settings" do
test "renders settings page", %{conn: conn} do
conn = get(conn, Routes.user_settings_path(co... | 38.123077 | 96 | 0.650525 |
934dd5ff9e083281c5d85958af429be338ed060a | 1,396 | exs | Elixir | test/grax/id/extensions/hash_test.exs | rdf-elixir/grax | 9628f66d7961cbe62fb38803cb172e67006093af | [
"MIT"
] | 17 | 2021-01-06T12:11:28.000Z | 2021-05-26T00:39:37.000Z | test/grax/id/extensions/hash_test.exs | rdf-elixir/grax | 9628f66d7961cbe62fb38803cb172e67006093af | [
"MIT"
] | null | null | null | test/grax/id/extensions/hash_test.exs | rdf-elixir/grax | 9628f66d7961cbe62fb38803cb172e67006093af | [
"MIT"
] | null | null | null | defmodule Grax.Id.Types.HashTest do
use Grax.TestCase
alias Grax.Id
alias Example.{IdSpecs, User, Post, Comment}
import RDF.Sigils
test "hash id" do
assert {:ok,
~I<http://example.com/f1ca4b7d9f704857b16b6dfef392146c8582930022217359e33cf94bf67a83ed162bdd47d7b51871d4a73083533bf2456ffcac6fca8... | 36.736842 | 166 | 0.682665 |
934dd8e3fe536305f3c63216831d92cddecea41f | 2,446 | ex | Elixir | lib/map_tile_renderer/map_rasterizer.ex | lindend/map-tile-renderer | 28316e9b79e7bfdbd0f0d4439e82becc89418284 | [
"MIT"
] | null | null | null | lib/map_tile_renderer/map_rasterizer.ex | lindend/map-tile-renderer | 28316e9b79e7bfdbd0f0d4439e82becc89418284 | [
"MIT"
] | null | null | null | lib/map_tile_renderer/map_rasterizer.ex | lindend/map-tile-renderer | 28316e9b79e7bfdbd0f0d4439e82becc89418284 | [
"MIT"
] | null | null | null | defmodule MapRasterizer do
require Logger
def rasterize(map_data, grid_width, grid_height, resolution) do
polygons = Stream.map(map_data, &process_map_data &1)
|> Stream.filter(fn p -> p != nil end)
|> Enum.to_list
rasterize_grids(polygons, grid_width, grid_height, resolution)
... | 41.457627 | 135 | 0.589943 |
934e010253f62d835ee29a593429c50f0b6afb6b | 10,203 | ex | Elixir | clients/compute/lib/google_api/compute/v1/api/region_operations.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/api/region_operations.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/api/region_operations.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 47.236111 | 1,213 | 0.685387 |
934e2009d5f2ebdc4f7d84b21dcf7379dabb4d8c | 3,508 | ex | Elixir | lib/hound/helpers/session.ex | NeoArcanjo/hound | 31f15d35aafcebc6263c28948f2bc84eefe8892d | [
"MIT"
] | null | null | null | lib/hound/helpers/session.ex | NeoArcanjo/hound | 31f15d35aafcebc6263c28948f2bc84eefe8892d | [
"MIT"
] | null | null | null | lib/hound/helpers/session.ex | NeoArcanjo/hound | 31f15d35aafcebc6263c28948f2bc84eefe8892d | [
"MIT"
] | null | null | null | defmodule Hound.Helpers.Session do
@moduledoc "Session helpers"
@doc """
Switches to another session.
When you need more than one browser session, use this function switch to another session.
If the session doesn't exist it a new one will be created for you.
All further commands will then run in the sessi... | 29.728814 | 107 | 0.673888 |
934e223a9f62e8cb2689e069a30063163b693ded | 1,138 | exs | Elixir | config/eeyeore.exs | rebpdx/eeyeore | 944ddbfe8fafd67137658948c03492baa340d4de | [
"MIT"
] | 2 | 2021-11-17T17:16:17.000Z | 2021-12-08T04:39:42.000Z | config/eeyeore.exs | rebpdx/eeyeore | 944ddbfe8fafd67137658948c03492baa340d4de | [
"MIT"
] | null | null | null | config/eeyeore.exs | rebpdx/eeyeore | 944ddbfe8fafd67137658948c03492baa340d4de | [
"MIT"
] | null | null | null | # This file is responsible for configuring Eeyeore settings
use Mix.Config
config :eeyeore, target: Mix.target()
# Used for port to listen to HTTP POST request calls
config :eeyeore,
webhook_port: 80
# Used for mqtt configuration
config :eeyeore,
mqtt_broker_address: System.get_env("MQTT_SERVER_ADDRESS"),
mqt... | 30.756757 | 82 | 0.6529 |
934e35fe38d77d4fd48980ff527b0532d772fb70 | 214 | exs | Elixir | complete/test/e2e_with_cypress_web/controllers/page_controller_test.exs | PJUllrich/e2e-testing-with-cypress | 19806edb347d829eef1fd13079ceb905fc2e4a39 | [
"MIT"
] | 2 | 2019-11-03T20:42:36.000Z | 2019-12-03T14:12:52.000Z | complete/test/e2e_with_cypress_web/controllers/page_controller_test.exs | PJUllrich/e2e-testing-with-cypress | 19806edb347d829eef1fd13079ceb905fc2e4a39 | [
"MIT"
] | 1 | 2021-03-09T20:17:35.000Z | 2021-03-09T20:17:35.000Z | incomplete/test/e2e_with_cypress_web/controllers/page_controller_test.exs | PJUllrich/e2e-testing-with-cypress | 19806edb347d829eef1fd13079ceb905fc2e4a39 | [
"MIT"
] | null | null | null | defmodule E2eWithCypressWeb.PageControllerTest do
use E2eWithCypressWeb.ConnCase
test "GET /", %{conn: conn} do
conn = get(conn, "/")
assert html_response(conn, 200) =~ "Welcome to Phoenix!"
end
end
| 23.777778 | 60 | 0.700935 |
934e3d4a2388a058ff0d014510ce8da7c61674e0 | 2,288 | exs | Elixir | test/adoptoposs_web/views/shared_view_test.exs | Adsidera/adoptoposs | e06da0855fe8f06f4774f89a977201fb78d9dafb | [
"MIT"
] | null | null | null | test/adoptoposs_web/views/shared_view_test.exs | Adsidera/adoptoposs | e06da0855fe8f06f4774f89a977201fb78d9dafb | [
"MIT"
] | null | null | null | test/adoptoposs_web/views/shared_view_test.exs | Adsidera/adoptoposs | e06da0855fe8f06f4774f89a977201fb78d9dafb | [
"MIT"
] | null | null | null | defmodule AdoptopossWeb.SharedViewTest do
use AdoptopossWeb.ConnCase, async: true
import Adoptoposs.Factory
alias AdoptopossWeb.SharedView
describe "project_name/1" do
test "returns the full organization/project name when passing a Project" do
organization = "organization-name"
project_name =... | 33.15942 | 91 | 0.686189 |
934e409517c4efd88671f5785159bb3bea80cc1c | 5,369 | ex | Elixir | lib/phoenix/live_dashboard/live/ports_live.ex | bitcrowd/phoenix_live_dashboard | 53d81c0ac1202c6f5da558bc4e29ebe1089425d9 | [
"MIT"
] | null | null | null | lib/phoenix/live_dashboard/live/ports_live.ex | bitcrowd/phoenix_live_dashboard | 53d81c0ac1202c6f5da558bc4e29ebe1089425d9 | [
"MIT"
] | null | null | null | lib/phoenix/live_dashboard/live/ports_live.ex | bitcrowd/phoenix_live_dashboard | 53d81c0ac1202c6f5da558bc4e29ebe1089425d9 | [
"MIT"
] | null | null | null | defmodule Phoenix.LiveDashboard.PortsLive do
use Phoenix.LiveDashboard.Web, :live_view
import Phoenix.LiveDashboard.TableHelpers
alias Phoenix.LiveDashboard.{SystemInfo, PortInfoComponent}
@sort_by ~w(output input)
@impl true
def mount(%{"node" => _} = params, session, socket) do
{:ok, assign_default... | 34.416667 | 172 | 0.54051 |
934e6d4e18470666b0794f7fd52bdf636928b367 | 54 | exs | Elixir | test/stripe/connect_test.exs | Rutaba/stripity_stripe | 12c525301c781f9c8c7e578cc0d933f5d35183d5 | [
"BSD-3-Clause"
] | 555 | 2016-11-29T05:02:27.000Z | 2022-03-30T00:47:59.000Z | test/stripe/connect_test.exs | Rutaba/stripity_stripe | 12c525301c781f9c8c7e578cc0d933f5d35183d5 | [
"BSD-3-Clause"
] | 532 | 2016-11-28T18:22:25.000Z | 2022-03-30T17:04:32.000Z | test/stripe/connect_test.exs | Rutaba/stripity_stripe | 12c525301c781f9c8c7e578cc0d933f5d35183d5 | [
"BSD-3-Clause"
] | 296 | 2016-12-05T14:04:09.000Z | 2022-03-28T20:39:37.000Z | defmodule Stripe.ConnectTest do
use ExUnit.Case
end
| 13.5 | 31 | 0.814815 |
934e6fb225d4ffddc3696edb90072e4dfd9e186a | 551 | ex | Elixir | lib/glimesh/account_follows/followers.ex | Megami-Studios/glimesh.tv | 57dde3a328fabdcc3305be48ae1b82df27b83c9b | [
"MIT"
] | 328 | 2020-07-23T22:13:49.000Z | 2022-03-31T21:22:28.000Z | lib/glimesh/account_follows/followers.ex | Megami-Studios/glimesh.tv | 57dde3a328fabdcc3305be48ae1b82df27b83c9b | [
"MIT"
] | 362 | 2020-07-23T22:38:38.000Z | 2022-03-24T02:11:16.000Z | lib/glimesh/account_follows/followers.ex | Megami-Studios/glimesh.tv | 57dde3a328fabdcc3305be48ae1b82df27b83c9b | [
"MIT"
] | 72 | 2020-07-23T22:50:46.000Z | 2022-02-02T11:59:32.000Z | defmodule Glimesh.AccountFollows.Follower do
@moduledoc false
use Ecto.Schema
import Ecto.Changeset
schema "followers" do
belongs_to :streamer, Glimesh.Accounts.User
belongs_to :user, Glimesh.Accounts.User
field :has_live_notifications, :boolean, default: false
timestamps()
end
@doc fal... | 22.958333 | 69 | 0.725953 |
934ea0b2d0bcf444ecaf024e2337dcff67899bcd | 70 | ex | Elixir | lib/newslettex_web/views/contact_view.ex | silva96/newslettex | 4876392c9900c0ce169dcdcb9ebb01ab3da83d65 | [
"MIT"
] | null | null | null | lib/newslettex_web/views/contact_view.ex | silva96/newslettex | 4876392c9900c0ce169dcdcb9ebb01ab3da83d65 | [
"MIT"
] | 10 | 2019-07-29T03:03:02.000Z | 2021-05-10T23:59:25.000Z | lib/newslettex_web/views/contact_view.ex | silva96/newslettex | 4876392c9900c0ce169dcdcb9ebb01ab3da83d65 | [
"MIT"
] | null | null | null | defmodule NewslettexWeb.ContactView do
use NewslettexWeb, :view
end
| 17.5 | 38 | 0.828571 |
934eb44f58651be3918b9343732532f322ce5651 | 592 | ex | Elixir | lib/auth/account.ex | idabmat/game_api | c12eefb84ff5c9647ee2e06d7893e3aae1b48b2d | [
"MIT"
] | null | null | null | lib/auth/account.ex | idabmat/game_api | c12eefb84ff5c9647ee2e06d7893e3aae1b48b2d | [
"MIT"
] | null | null | null | lib/auth/account.ex | idabmat/game_api | c12eefb84ff5c9647ee2e06d7893e3aae1b48b2d | [
"MIT"
] | null | null | null | defmodule Auth.Account do
@moduledoc """
Defines:
- Structure of an account
- Interface to be implemented by persistence gateways
"""
use TypedStruct
@derive {Jason.Encoder, only: [:uid, :email, :image]}
typedstruct do
field(:provider, atom(), enforce: true)
field(:uid, String.t(), enforce: tr... | 22.769231 | 57 | 0.625 |
934eb6c125cec0ecdd2b5a74118e21b8a21b06ec | 7,771 | ex | Elixir | lib/simplex/response.ex | adamkittelson/simplex | 7cf2b98e30be6dbae05448f4285c212c5ac670ec | [
"MIT"
] | 1 | 2015-11-12T16:43:14.000Z | 2015-11-12T16:43:14.000Z | lib/simplex/response.ex | adamkittelson/simplex | 7cf2b98e30be6dbae05448f4285c212c5ac670ec | [
"MIT"
] | null | null | null | lib/simplex/response.ex | adamkittelson/simplex | 7cf2b98e30be6dbae05448f4285c212c5ac670ec | [
"MIT"
] | null | null | null | defmodule Simplex.Response do
alias Simplex.Response
defstruct status_code: nil, raw_body: nil, body: %{}, headers: %{}
import SweetXml
def handle("CreateDomain", %HTTPotion.Response{status_code: 200, body: body} = response) do
body = body
|> xmap(request_id: ~x"//ResponseMetadata/RequestId/tex... | 42.697802 | 118 | 0.551795 |
934f3d2616d6b3ba706deae4ae939d1982a0b59a | 2,483 | ex | Elixir | clients/analytics_data/lib/google_api/analytics_data/v1alpha/model/dimension_metadata.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/analytics_data/lib/google_api/analytics_data/v1alpha/model/dimension_metadata.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/dimension_metadata.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... | 42.084746 | 323 | 0.716069 |
934f3e04ffe2c4cede18842765bca26b5a7513f0 | 864 | ex | Elixir | web/operations/state_operations.ex | Pianist038801/SprintPoker | ae14f79b8cd4254a1c5f5fef698db1cf2d20cf9c | [
"MIT"
] | null | null | null | web/operations/state_operations.ex | Pianist038801/SprintPoker | ae14f79b8cd4254a1c5f5fef698db1cf2d20cf9c | [
"MIT"
] | null | null | null | web/operations/state_operations.ex | Pianist038801/SprintPoker | ae14f79b8cd4254a1c5f5fef698db1cf2d20cf9c | [
"MIT"
] | null | null | null | defmodule SprintPoker.StateOperations do
alias SprintPoker.Repo
alias SprintPoker.State
def create(game) do
changeset = State.changeset(%State{}, %{name: "none", game_id: game.id})
case changeset do
{:error, errors} ->
raise errors
_ ->
changeset |> Repo.insert!
end
end... | 20.571429 | 76 | 0.578704 |
934f4d7a3daa2ffb8a2d647e2613c457f944c09f | 1,850 | exs | Elixir | clients/real_time_bidding/mix.exs | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/real_time_bidding/mix.exs | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/real_time_bidding/mix.exs | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 27.61194 | 108 | 0.660541 |
934f4df7f3140c0d7df21864cd2940ffde11987d | 1,850 | exs | Elixir | test/cizen/effects/dispatch_test.exs | ryo33/cizen | e1d3e232e4d3e72dfc7ef122d936ae26fa60c084 | [
"MIT"
] | 1 | 2019-04-08T08:00:06.000Z | 2019-04-08T08:00:06.000Z | test/cizen/effects/dispatch_test.exs | ryo33/cizen | e1d3e232e4d3e72dfc7ef122d936ae26fa60c084 | [
"MIT"
] | null | null | null | test/cizen/effects/dispatch_test.exs | ryo33/cizen | e1d3e232e4d3e72dfc7ef122d936ae26fa60c084 | [
"MIT"
] | null | null | null | defmodule Cizen.Effects.DispatchTest do
use Cizen.SagaCase
alias Cizen.TestHelper
alias Cizen.Automaton
alias Cizen.Dispatcher
alias Cizen.Effect
alias Cizen.Effects.Dispatch
alias Cizen.Event
alias Cizen.Filter
alias Cizen.Saga
alias Cizen.SagaID
alias Cizen.StartSaga
require Filter
defmo... | 24.666667 | 98 | 0.653514 |
934f56a76146c2ccbb367f3e9ac8bc7aeb72ac66 | 1,864 | ex | Elixir | clients/datastore/lib/google_api/datastore/v1/model/property_filter.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/datastore/lib/google_api/datastore/v1/model/property_filter.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/datastore/lib/google_api/datastore/v1/model/property_filter.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | 1 | 2018-07-28T20:50:50.000Z | 2018-07-28T20:50:50.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 34.518519 | 131 | 0.744635 |
934f61fb6fa19ee8cc00e8b7eecc17b0fc238acb | 218 | ex | Elixir | exercises/practice/binary/lib/binary.ex | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 343 | 2017-06-22T16:28:28.000Z | 2022-03-25T21:33:32.000Z | exercises/practice/binary/lib/binary.ex | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 583 | 2017-06-19T10:48:40.000Z | 2022-03-28T21:43:12.000Z | exercises/practice/binary/lib/binary.ex | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 228 | 2017-07-05T07:09:32.000Z | 2022-03-27T08:59:08.000Z | defmodule Binary do
@doc """
Convert a string containing a binary number to an integer.
On errors returns nil.
"""
@spec to_decimal(String.t()) :: non_neg_integer | nil
def to_decimal(string) do
end
end
| 19.818182 | 60 | 0.697248 |
934f638f291c3b3b0d64cb1601ce75c653b0cb32 | 21,044 | ex | Elixir | lib/ex_unit/lib/ex_unit/case.ex | jayashe/elixir | 6803c87465552624dac017de53156e806762047d | [
"Apache-2.0"
] | null | null | null | lib/ex_unit/lib/ex_unit/case.ex | jayashe/elixir | 6803c87465552624dac017de53156e806762047d | [
"Apache-2.0"
] | null | null | null | lib/ex_unit/lib/ex_unit/case.ex | jayashe/elixir | 6803c87465552624dac017de53156e806762047d | [
"Apache-2.0"
] | null | null | null | defmodule ExUnit.DuplicateTestError do
defexception [:message]
end
defmodule ExUnit.DuplicateDescribeError do
defexception [:message]
end
defmodule ExUnit.Case do
@moduledoc """
Helpers for defining test cases.
This module must be used in other modules as a way to configure
and prepare them for testing.
... | 30.631732 | 103 | 0.668124 |
934f7dd0d0d667b132f31b8eb65beb2db8ffb371 | 561 | ex | Elixir | lib/nudge_api_web/views/changeset_view.ex | feelja-tech/feelja-api | 03ce15430460cf2dac24a7740242c7e5ac5c5804 | [
"MIT"
] | null | null | null | lib/nudge_api_web/views/changeset_view.ex | feelja-tech/feelja-api | 03ce15430460cf2dac24a7740242c7e5ac5c5804 | [
"MIT"
] | null | null | null | lib/nudge_api_web/views/changeset_view.ex | feelja-tech/feelja-api | 03ce15430460cf2dac24a7740242c7e5ac5c5804 | [
"MIT"
] | null | null | null | defmodule NudgeApiWeb.ChangesetView do
use NudgeApiWeb, :view
@doc """
Traverses and translates changeset errors.
See `Ecto.Changeset.traverse_errors/2` and
`NudgeApiWeb.ErrorHelpers.translate_error/1` for more details.
"""
def translate_errors(changeset) do
Ecto.Changeset.traverse_errors(changeset,... | 28.05 | 65 | 0.73975 |
934f89012cebb83116209ef6bdcf21a7f24db2de | 8,171 | ex | Elixir | lib/utils/encoding.ex | aeternity/aepp-sdk-elixir | a001b0eb264665623c9b05de25a71d1f13990679 | [
"0BSD"
] | 19 | 2019-04-16T07:27:53.000Z | 2022-01-22T21:35:02.000Z | lib/utils/encoding.ex | aeternity/aepp-sdk-elixir | a001b0eb264665623c9b05de25a71d1f13990679 | [
"0BSD"
] | 131 | 2019-04-05T13:01:37.000Z | 2020-07-09T14:53:34.000Z | lib/utils/encoding.ex | aeternity/aepp-sdk-elixir | a001b0eb264665623c9b05de25a71d1f13990679 | [
"0BSD"
] | 5 | 2019-04-11T19:21:42.000Z | 2022-03-06T09:08:34.000Z | defmodule AeppSDK.Utils.Encoding do
@moduledoc """
Contains encoding/decoding utils,
see: [https://github.com/aeternity/protocol/blob/master/node/api/api_encoding.md](https://github.com/aeternity/protocol/blob/master/node/api/api_encoding.md).
"""
@checksum_bytes 4
@prefix_bits 24
@typedoc """
A base... | 45.394444 | 285 | 0.618284 |
934faaffc6191b801886bf080918946a491b947a | 934 | ex | Elixir | apps/omg_eth/lib/omg_eth/metric/ethereumex.ex | omisego/elixir-omg | 2c68973d8f29033d137f63a6e060f12e2a7dcd59 | [
"Apache-2.0"
] | 177 | 2018-08-24T03:51:02.000Z | 2020-05-30T13:29:25.000Z | apps/omg_eth/lib/omg_eth/metric/ethereumex.ex | omisego/elixir-omg | 2c68973d8f29033d137f63a6e060f12e2a7dcd59 | [
"Apache-2.0"
] | 1,042 | 2018-08-25T00:52:39.000Z | 2020-06-01T05:15:17.000Z | apps/omg_eth/lib/omg_eth/metric/ethereumex.ex | omisego/elixir-omg | 2c68973d8f29033d137f63a6e060f12e2a7dcd59 | [
"Apache-2.0"
] | 47 | 2018-08-24T12:06:33.000Z | 2020-04-28T11:49:25.000Z | # Copyright 2019-2020 OMG Network Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 35.923077 | 107 | 0.752677 |
934fce607ff26fac9b4c6a928cc21c615896c741 | 3,072 | ex | Elixir | lib/ja_serializer/builder/included.ex | strzibny/ja_serializer | 9823ada739ec1f0db9f14bd29f62a701dbd3b094 | [
"Apache-2.0"
] | 322 | 2016-11-18T22:58:17.000Z | 2022-01-18T15:07:24.000Z | lib/ja_serializer/builder/included.ex | strzibny/ja_serializer | 9823ada739ec1f0db9f14bd29f62a701dbd3b094 | [
"Apache-2.0"
] | 150 | 2016-11-17T20:14:51.000Z | 2021-03-12T03:56:57.000Z | lib/ja_serializer/builder/included.ex | strzibny/ja_serializer | 9823ada739ec1f0db9f14bd29f62a701dbd3b094 | [
"Apache-2.0"
] | 104 | 2016-11-17T18:02:36.000Z | 2021-04-06T09:52:16.000Z | defmodule JaSerializer.Builder.Included do
@moduledoc false
alias JaSerializer.Builder.ResourceObject
defp resource_key(resource) do
{resource.id, resource.type}
end
def build(%{data: data} = context, primary_resources) when is_list(data) do
known =
primary_resources
|> List.wrap()
... | 27.185841 | 82 | 0.654622 |
934fd13e996e3db4d35cbabf8906658358e2463a | 290 | exs | Elixir | priv/repo/migrations/20160805132301_add_user_profile_fields.exs | superdev999/Phoenix-project | ab13ac9366cdd0aa9581da7faf993b11aaa5344c | [
"MIT"
] | 275 | 2015-06-23T00:20:51.000Z | 2021-08-19T16:17:37.000Z | priv/repo/migrations/20160805132301_add_user_profile_fields.exs | superdev999/Phoenix-project | ab13ac9366cdd0aa9581da7faf993b11aaa5344c | [
"MIT"
] | 1,304 | 2015-06-26T02:11:54.000Z | 2019-12-12T21:08:00.000Z | priv/repo/migrations/20160805132301_add_user_profile_fields.exs | superdev999/Phoenix-project | ab13ac9366cdd0aa9581da7faf993b11aaa5344c | [
"MIT"
] | 140 | 2016-01-01T18:19:47.000Z | 2020-11-22T06:24:47.000Z | defmodule CodeCorps.Repo.Migrations.AddUserProfileFields do
use Ecto.Migration
def change do
alter table(:users) do
add :first_name, :string
add :last_name, :string
add :website, :string
add :twitter, :string
add :biography, :string
end
end
end
| 20.714286 | 59 | 0.668966 |
934fd2cde20b320115c5aee956c08212096ac932 | 512 | exs | Elixir | config/prod.exs | the-mikedavis/doc_gen | efcc884ea65bba5748f41c5601abd00db2777ec4 | [
"BSD-3-Clause"
] | null | null | null | config/prod.exs | the-mikedavis/doc_gen | efcc884ea65bba5748f41c5601abd00db2777ec4 | [
"BSD-3-Clause"
] | 27 | 2018-10-29T18:34:44.000Z | 2019-03-11T18:43:12.000Z | config/prod.exs | the-mikedavis/doc_gen | efcc884ea65bba5748f41c5601abd00db2777ec4 | [
"BSD-3-Clause"
] | null | null | null | use Mix.Config
config :doc_gen, DocGenWeb.Endpoint,
http: [:inet6, port: "${DOC_GEN_PORT}"],
url: [host: "${DOC_GEN_HOST}"],
secret_key_base: "${DOC_GEN_SECRET_KEYBASE}",
cache_static_manifest: "priv/static/cache_manifest.json",
server: true
config :doc_gen,
socket_token_key: "${DOC_GEN_SOCKET_TOKEN_KEY}"... | 25.6 | 59 | 0.724609 |
93500609c17decd6a43af525a4d1aff2ec11fa42 | 309 | ex | Elixir | examples/helloworld/lib/helloworld_app.ex | braverhealth/grpc | eff8a8828d27ddd7f63a3c1dd5aae86246df215e | [
"Apache-2.0"
] | 561 | 2019-03-18T09:10:57.000Z | 2022-03-27T17:34:59.000Z | examples/helloworld/lib/helloworld_app.ex | braverhealth/grpc | eff8a8828d27ddd7f63a3c1dd5aae86246df215e | [
"Apache-2.0"
] | 138 | 2020-07-17T22:08:48.000Z | 2022-03-28T09:49:01.000Z | examples/helloworld/lib/helloworld_app.ex | braverhealth/grpc | eff8a8828d27ddd7f63a3c1dd5aae86246df215e | [
"Apache-2.0"
] | 112 | 2019-03-25T03:27:26.000Z | 2022-03-21T12:43:59.000Z | defmodule HelloworldApp do
use Application
def start(_type, _args) do
import Supervisor.Spec
children = [
supervisor(GRPC.Server.Supervisor, [{Helloworld.Endpoint, 50051}])
]
opts = [strategy: :one_for_one, name: HelloworldApp]
Supervisor.start_link(children, opts)
end
end
| 20.6 | 72 | 0.702265 |
935007882c7078a4cf8952b9c5267d997bb1e015 | 263 | ex | Elixir | lib/inmana/restaurants/get.ex | andrermartins/inmana | 19f36e3b7ab509ea72af2eff22981adf2ffcacab | [
"MIT"
] | null | null | null | lib/inmana/restaurants/get.ex | andrermartins/inmana | 19f36e3b7ab509ea72af2eff22981adf2ffcacab | [
"MIT"
] | null | null | null | lib/inmana/restaurants/get.ex | andrermartins/inmana | 19f36e3b7ab509ea72af2eff22981adf2ffcacab | [
"MIT"
] | null | null | null | defmodule Inmana.Restaurants.Get do
alias Inmana.{Repo, Restaurant}
def call(uuid) do
case Repo.get(Restaurant, uuid) do
nil -> {:error, %{result: "Restaurant not found", status: :not_found}}
restaurant -> {:ok, restaurant}
end
end
end
| 23.909091 | 76 | 0.661597 |
93501f92b9e92d6227d70bb5f71ab9b9ff16f4c6 | 380 | ex | Elixir | lib/fake_server/application.ex | JacksonIsaac/fake_server | a646287b252d1ce4da4b61eac50e897a6423b7ed | [
"Apache-2.0"
] | null | null | null | lib/fake_server/application.ex | JacksonIsaac/fake_server | a646287b252d1ce4da4b61eac50e897a6423b7ed | [
"Apache-2.0"
] | null | null | null | lib/fake_server/application.ex | JacksonIsaac/fake_server | a646287b252d1ce4da4b61eac50e897a6423b7ed | [
"Apache-2.0"
] | null | null | null | defmodule FakeServer.Application do
@moduledoc false
use Application
def start(_type, _args) do
import Supervisor.Spec, warn: false
children = [
worker(FakeServer.Agents.ServerAgent, []),
worker(FakeServer.Agents.EnvAgent, [])
]
opts = [strategy: :one_for_one, name: FakeServer.Supe... | 21.111111 | 64 | 0.697368 |
9350271f51ca413e4f5d1832721e42b5575ac549 | 5,297 | ex | Elixir | clients/remote_build_execution/lib/google_api/remote_build_execution/v2/model/build_bazel_remote_execution_v2_action.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/remote_build_execution/lib/google_api/remote_build_execution/v2/model/build_bazel_remote_execution_v2_action.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/build_bazel_remote_execution_v2_action.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... | 72.561644 | 987 | 0.766849 |
9350565be6df1e93844034fd2a8a96d927123611 | 503 | ex | Elixir | examples/ct_ecto/lib/ct/comment.ex | 50kudos/closure_table | 4c1a8e321318dc2dcb2d178b9dbc58431e0211e4 | [
"Apache-2.0"
] | 16 | 2019-09-08T14:31:36.000Z | 2022-02-14T19:50:23.000Z | examples/ct_ecto/lib/ct/comment.ex | 50kudos/closure_table | 4c1a8e321318dc2dcb2d178b9dbc58431e0211e4 | [
"Apache-2.0"
] | 6 | 2019-09-14T06:03:41.000Z | 2021-05-16T00:53:40.000Z | examples/ct_ecto/lib/ct/comment.ex | 50kudos/closure_table | 4c1a8e321318dc2dcb2d178b9dbc58431e0211e4 | [
"Apache-2.0"
] | 7 | 2019-09-13T16:39:45.000Z | 2021-05-11T06:15:04.000Z | defmodule CT.Comment do
use Ecto.Schema
import Ecto.Changeset
@timestamps_opts [type: :utc_datetime]
schema "comments" do
field :text, :string
belongs_to :author, CT.Author
timestamps()
end
def changeset(params \\ %{}, %CT.Author{} = author) do
%CT.Comment{}
|> cast(params, [:text])
... | 21.869565 | 68 | 0.656064 |
935071dd205d8917a276aeea5d198bd80d254622 | 1,096 | ex | Elixir | lib/live_sup_web/live/admin/project_live/index.ex | livesup-dev/livesup | eaf9ffc78d3043bd9e3408f0f4df26ed16eb8446 | [
"Apache-2.0",
"MIT"
] | null | null | null | lib/live_sup_web/live/admin/project_live/index.ex | livesup-dev/livesup | eaf9ffc78d3043bd9e3408f0f4df26ed16eb8446 | [
"Apache-2.0",
"MIT"
] | 3 | 2022-02-23T15:51:48.000Z | 2022-03-14T22:52:43.000Z | lib/live_sup_web/live/admin/project_live/index.ex | livesup-dev/livesup | eaf9ffc78d3043bd9e3408f0f4df26ed16eb8446 | [
"Apache-2.0",
"MIT"
] | null | null | null | defmodule LiveSupWeb.Admin.ProjectLive.Index do
use LiveSupWeb, :live_view
alias LiveSup.Core.Projects
alias LiveSup.Schemas.Project
@impl true
def mount(_params, _session, socket) do
{:ok, assign(socket, :projects, list_projects())}
end
@impl true
def handle_params(params, _url, socket) do
{... | 23.319149 | 72 | 0.666058 |
935072117f020d44a1134936ec455ef2510aee29 | 247 | exs | Elixir | priv/repo/migrations/20190514141551_rename_auctions_table_price.exs | rstein66/Renaissance | 947880e1b492adc2ce1f4a0883ddb41e597de011 | [
"Unlicense"
] | 2 | 2021-02-01T12:09:07.000Z | 2021-03-14T12:20:43.000Z | priv/repo/migrations/20190514141551_rename_auctions_table_price.exs | rstein66/Renaissance | 947880e1b492adc2ce1f4a0883ddb41e597de011 | [
"Unlicense"
] | 11 | 2019-04-09T18:01:16.000Z | 2019-05-16T15:02:24.000Z | priv/repo/migrations/20190514141551_rename_auctions_table_price.exs | rstein66/Renaissance | 947880e1b492adc2ce1f4a0883ddb41e597de011 | [
"Unlicense"
] | 2 | 2019-04-30T22:43:18.000Z | 2019-05-15T20:34:49.000Z | defmodule Renaissance.Repo.Migrations.RenameAuctionsTablePrice do
use Ecto.Migration
def up do
rename table(:auctions), :price, to: :starting_amount
end
def down do
rename table(:auctions), :starting_amount, to: :price
end
end
| 20.583333 | 65 | 0.740891 |
935085a5e340e3679a914a9d5d9aac8c4bf382ff | 4,169 | ex | Elixir | clients/apigee/lib/google_api/apigee/v1/model/google_cloud_apigee_v1_app.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/apigee/lib/google_api/apigee/v1/model/google_cloud_apigee_v1_app.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/apigee/lib/google_api/apigee/v1/model/google_cloud_apigee_v1_app.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... | 50.228916 | 272 | 0.695131 |
93508ea0356aad46564e7d810a8c69e8c5ff7b58 | 1,932 | ex | Elixir | lib/mix/lib/mix/hex.ex | doughsay/elixir | 7356a47047d0b54517bd6886603f09b1121dde2b | [
"Apache-2.0"
] | 19,291 | 2015-01-01T02:42:49.000Z | 2022-03-31T21:01:40.000Z | lib/mix/lib/mix/hex.ex | doughsay/elixir | 7356a47047d0b54517bd6886603f09b1121dde2b | [
"Apache-2.0"
] | 8,082 | 2015-01-01T04:16:23.000Z | 2022-03-31T22:08:02.000Z | lib/mix/lib/mix/hex.ex | doughsay/elixir | 7356a47047d0b54517bd6886603f09b1121dde2b | [
"Apache-2.0"
] | 3,472 | 2015-01-03T04:11:56.000Z | 2022-03-29T02:07:30.000Z | defmodule Mix.Hex do
@moduledoc false
@compile {:no_warn_undefined, Hex}
@hex_requirement ">= 0.19.0"
@hex_mirror "https://repo.hex.pm"
@doc """
Returns `true` if `Hex` is loaded or installed. Otherwise returns `false`.
"""
@spec ensure_installed?(atom) :: boolean
def ensure_installed?(app) do
if... | 24.769231 | 94 | 0.601967 |
935091d5f5b21e22194e30be33ae422d0b5888db | 2,882 | ex | Elixir | lib/exhort/sat/solver_response.ex | josejimenezjr0/exhort | 07c9b735d82a96d6437554f51229c38cf287b39f | [
"Apache-2.0"
] | null | null | null | lib/exhort/sat/solver_response.ex | josejimenezjr0/exhort | 07c9b735d82a96d6437554f51229c38cf287b39f | [
"Apache-2.0"
] | null | null | null | lib/exhort/sat/solver_response.ex | josejimenezjr0/exhort | 07c9b735d82a96d6437554f51229c38cf287b39f | [
"Apache-2.0"
] | null | null | null | defmodule Exhort.SAT.SolverResponse do
@moduledoc """
A response from solving a model.
Provides functions for retrieving variable values from the response.
"""
@type t :: %__MODULE__{}
defstruct [:res, :model, :status, :int_status, :objective, :walltime, :usertime]
alias __MODULE__
alias Exhort.NIF.N... | 29.408163 | 90 | 0.660652 |
9350c769a6af0c8c279087bf09d047d26db1186a | 9,698 | exs | Elixir | test/avrora/utils/registrar_test.exs | raphaklaus/avrora | c59a45bf84f726d3892cc13a2344965d0e5ef6ad | [
"MIT"
] | 59 | 2019-07-11T15:29:26.000Z | 2022-03-23T19:35:55.000Z | test/avrora/utils/registrar_test.exs | raphaklaus/avrora | c59a45bf84f726d3892cc13a2344965d0e5ef6ad | [
"MIT"
] | 63 | 2019-08-09T17:52:26.000Z | 2022-03-16T22:08:04.000Z | test/avrora/utils/registrar_test.exs | raphaklaus/avrora | c59a45bf84f726d3892cc13a2344965d0e5ef6ad | [
"MIT"
] | 22 | 2019-07-29T10:50:47.000Z | 2021-09-04T13:37:08.000Z | defmodule Avrora.Utils.RegistrarTest do
use ExUnit.Case, async: true
doctest Avrora.Utils.Registrar
import Mox
import Support.Config
import ExUnit.CaptureLog
alias Avrora.Schema
alias Avrora.Utils.Registrar
setup :verify_on_exit!
setup :support_config
describe "register_schema/2" do
test "whe... | 25.930481 | 144 | 0.588369 |
9350d32d0a0566db9ac252c02c5e1a8a8af351de | 311 | exs | Elixir | priv/repo/migrations/2016032505124124_create_batches.exs | simwms/apiv4 | c3da7407eaf3580b759f49726028439b4b8ea9d0 | [
"MIT"
] | 2 | 2016-02-25T20:12:35.000Z | 2018-01-03T00:03:12.000Z | priv/repo/migrations/2016032505124124_create_batches.exs | simwms/apiv4 | c3da7407eaf3580b759f49726028439b4b8ea9d0 | [
"MIT"
] | 1 | 2016-01-11T04:50:39.000Z | 2016-01-12T05:00:08.000Z | priv/repo/migrations/2016032505124124_create_batches.exs | simwms/apiv4 | c3da7407eaf3580b759f49726028439b4b8ea9d0 | [
"MIT"
] | null | null | null | defmodule Apiv4.Repo.Migrations.CreateBatches do
use Ecto.Migration
def change do
create table(:batches) do
add :golive_at, :datetime
add :unlive_at, :datetime
add :deleted_at, :datetime
add :quantity, :string
add :description, :string
timestamps
end
end
end | 19.4375 | 48 | 0.665595 |
9351368837930e6d6ef774b001aa41a4d664434e | 379 | ex | Elixir | lib/jwks_uri_updater/application.ex | tanguilp/jwks_uri_updater | fa2bc8744f5593994d9eef0364165c47babbc2f9 | [
"Apache-2.0"
] | null | null | null | lib/jwks_uri_updater/application.ex | tanguilp/jwks_uri_updater | fa2bc8744f5593994d9eef0364165c47babbc2f9 | [
"Apache-2.0"
] | 1 | 2021-11-05T08:22:12.000Z | 2021-11-05T08:22:12.000Z | lib/jwks_uri_updater/application.ex | tanguilp/jwks_uri_updater | fa2bc8744f5593994d9eef0364165c47babbc2f9 | [
"Apache-2.0"
] | null | null | null | defmodule JWKSURIUpdater.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
children = [
JWKSURIUpdater.Updater
]
opts = [strategy: :one_for_one, name: JWKSURIUpdater.Superv... | 21.055556 | 68 | 0.725594 |
93514f731a44ec0e84efbd534526c453becb197c | 4,289 | ex | Elixir | clients/artifact_registry/lib/google_api/artifact_registry/v1/model/binding.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/artifact_registry/lib/google_api/artifact_registry/v1/model/binding.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/artifact_registry/lib/google_api/artifact_registry/v1/model/binding.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... | 80.924528 | 1,970 | 0.753789 |
9351691eb0db1fee87fa8bd1c15307bf40fb5817 | 78 | exs | Elixir | config/config.exs | Waasi/tru_lock_api | 75750eee3f96e2e2957841ec361c546ae169cdbe | [
"MIT"
] | 1 | 2017-07-09T04:42:25.000Z | 2017-07-09T04:42:25.000Z | config/config.exs | Waasi/tru_lock_api | 75750eee3f96e2e2957841ec361c546ae169cdbe | [
"MIT"
] | null | null | null | config/config.exs | Waasi/tru_lock_api | 75750eee3f96e2e2957841ec361c546ae169cdbe | [
"MIT"
] | null | null | null | use Mix.Config
config :tru_face, api_key: System.get_env("TRUE_FACE_API_KEY")
| 26 | 62 | 0.807692 |
93516c54eeda74bb4c745cafb7273eed80fdbd6b | 1,039 | ex | Elixir | lib/mastani_server/delivery/mention.ex | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | 1 | 2019-05-07T15:03:54.000Z | 2019-05-07T15:03:54.000Z | lib/mastani_server/delivery/mention.ex | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | null | null | null | lib/mastani_server/delivery/mention.ex | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | null | null | null | defmodule MastaniServer.Delivery.Mention do
@moduledoc false
alias __MODULE__
use Ecto.Schema
import Ecto.Changeset
alias MastaniServer.Accounts.User
@required_fields ~w(from_user_id to_user_id source_title source_id source_type source_preview)a
@optional_fields ~w(parent_id parent_type read floor comm... | 26.641026 | 97 | 0.718961 |
93517bdf56146403d7af910e511a267d5c8c7674 | 211 | exs | Elixir | test/controllers/page_controller_test.exs | shanethacker/reference_graphql | 189b86752cd859bbc0a51cd485940c0f5a29ddd6 | [
"MIT"
] | null | null | null | test/controllers/page_controller_test.exs | shanethacker/reference_graphql | 189b86752cd859bbc0a51cd485940c0f5a29ddd6 | [
"MIT"
] | null | null | null | test/controllers/page_controller_test.exs | shanethacker/reference_graphql | 189b86752cd859bbc0a51cd485940c0f5a29ddd6 | [
"MIT"
] | null | null | null | defmodule ReferenceGraphql.PageControllerTest do
use ReferenceGraphql.ConnCase
test "GET /", %{conn: conn} do
conn = get conn, "/"
assert html_response(conn, 200) =~ "Welcome to Phoenix!"
end
end
| 23.444444 | 60 | 0.701422 |
9351896f6ede84fd45219a4a01387bb509c71edb | 1,261 | ex | Elixir | lib/ex_clubhouse/model/input/epic.ex | pootsbook/exclubhouse | 3b93cded0124e4e5df489db4f9262a560595bb8e | [
"MIT"
] | 4 | 2020-03-17T00:42:10.000Z | 2021-04-11T16:39:52.000Z | lib/ex_clubhouse/model/input/epic.ex | pootsbook/exclubhouse | 3b93cded0124e4e5df489db4f9262a560595bb8e | [
"MIT"
] | 7 | 2020-03-21T20:22:13.000Z | 2021-12-30T16:32:07.000Z | lib/ex_clubhouse/model/input/epic.ex | pootsbook/exclubhouse | 3b93cded0124e4e5df489db4f9262a560595bb8e | [
"MIT"
] | 4 | 2020-03-25T18:34:49.000Z | 2021-09-13T16:44:00.000Z | defmodule ExClubhouse.Model.Input.Epic do
@moduledoc """
Epic input model used to create and update
"""
alias ExClubhouse.Model
@type t :: %__MODULE__{
completed_at_override: binary(),
created_at: binary(),
deadline: binary() | nil,
description: binary() | nil,
... | 28.659091 | 52 | 0.534496 |
9351919604640ff5ee8df7f1d374b1fc8a131226 | 767 | ex | Elixir | lib/merchant/individual.ex | ahd-elang/braintree-elixir | c18d37eaff2df8a6d62cc05677b8a03c1d23ad90 | [
"MIT"
] | 108 | 2016-02-03T12:45:03.000Z | 2022-02-19T16:56:36.000Z | lib/merchant/individual.ex | ahd-elang/braintree-elixir | c18d37eaff2df8a6d62cc05677b8a03c1d23ad90 | [
"MIT"
] | 77 | 2016-02-12T15:52:53.000Z | 2022-02-21T14:38:08.000Z | lib/merchant/individual.ex | ahd-elang/braintree-elixir | c18d37eaff2df8a6d62cc05677b8a03c1d23ad90 | [
"MIT"
] | 64 | 2016-04-04T07:07:24.000Z | 2022-03-24T05:42:05.000Z | defmodule Braintree.Merchant.Individual do
@moduledoc """
Represents the individual section of a merchant account.
For additional reference, see:
https://developers.braintreepayments.com/reference/response/merchant-account/ruby
"""
use Braintree.Construction
alias Braintree.Address
@type t :: %__MOD... | 24.741935 | 83 | 0.594524 |
9351977776fd3515e92ca7d38454b56b5093366e | 831 | ex | Elixir | lib/codes/codes_l28.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_l28.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_l28.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | defmodule IcdCode.ICDCode.Codes_L28 do
alias IcdCode.ICDCode
def _L280 do
%ICDCode{full_code: "L280",
category_code: "L28",
short_code: "0",
full_name: "Lichen simplex chronicus",
short_name: "Lichen simplex chronicus",
category_name: "Lichen simplex chronicus"
... | 24.441176 | 51 | 0.580024 |
93519b55b1ae852a5a2c9b0b3445ac1f134c5e59 | 1,079 | ex | Elixir | lib/pay_web/channels/user_socket.ex | israel206/Pay | e1a6ec984e65f783b6e2734805a23cf0ea2e8f78 | [
"MIT"
] | 1 | 2021-12-13T03:30:22.000Z | 2021-12-13T03:30:22.000Z | lib/pay_web/channels/user_socket.ex | israel206/Pay | e1a6ec984e65f783b6e2734805a23cf0ea2e8f78 | [
"MIT"
] | null | null | null | lib/pay_web/channels/user_socket.ex | israel206/Pay | e1a6ec984e65f783b6e2734805a23cf0ea2e8f78 | [
"MIT"
] | null | null | null | defmodule PayWeb.UserSocket do
use Phoenix.Socket
## Channels
# channel "room:*", PayWeb.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 channels, ie
... | 29.972222 | 83 | 0.691381 |
9351a313b4e4a3629146ca91c5b652fd97fca91a | 155 | ex | Elixir | lib/farmbot/celery_script/ast/node/coordinate.ex | pdgonzalez872/farmbot_os | a444248f05ee8f4fe57f6a4865b942131960f76c | [
"MIT"
] | 2 | 2018-08-01T23:07:52.000Z | 2018-10-17T12:49:21.000Z | lib/farmbot/celery_script/ast/node/coordinate.ex | pdgonzalez872/farmbot_os | a444248f05ee8f4fe57f6a4865b942131960f76c | [
"MIT"
] | null | null | null | lib/farmbot/celery_script/ast/node/coordinate.ex | pdgonzalez872/farmbot_os | a444248f05ee8f4fe57f6a4865b942131960f76c | [
"MIT"
] | 1 | 2017-07-22T21:51:14.000Z | 2017-07-22T21:51:14.000Z | defmodule Farmbot.CeleryScript.AST.Node.Coordinate do
@moduledoc false
use Farmbot.CeleryScript.AST.Node
allow_args [:x, :y, :z]
return_self()
end
| 22.142857 | 53 | 0.754839 |
9351c082098d924868e9c881ef60088f8e56ebc5 | 2,410 | ex | Elixir | clients/tool_results/lib/google_api/tool_results/v1beta3/model/screenshot_cluster.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/tool_results/lib/google_api/tool_results/v1beta3/model/screenshot_cluster.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/tool_results/lib/google_api/tool_results/v1beta3/model/screenshot_cluster.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.035714 | 369 | 0.728216 |
9351e349f05ec61073449da951f681eccb472fe0 | 2,241 | ex | Elixir | clients/spanner/lib/google_api/spanner/v1/model/list_backup_operations_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/spanner/lib/google_api/spanner/v1/model/list_backup_operations_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/spanner/lib/google_api/spanner/v1/model/list_backup_operations_response.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... | 44.82 | 537 | 0.759036 |
9351eb946ddb75dbf377dbb1e0650351874e8666 | 3,240 | ex | Elixir | clients/content/lib/google_api/content/v21/model/settlement_report.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v21/model/settlement_report.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v21/model/settlement_report.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 47.647059 | 223 | 0.701235 |
9351f8299da03ab9d8b107bd3d4193cbe6772c85 | 238 | exs | Elixir | apps/images/test/reader/reader_test.exs | jjylik/roni | f4ae61881a5fdc9df7f61dd70ab5898d95c65d46 | [
"MIT"
] | 2 | 2017-10-13T12:17:29.000Z | 2017-10-13T12:17:34.000Z | apps/images/test/reader/reader_test.exs | jjylik/roni | f4ae61881a5fdc9df7f61dd70ab5898d95c65d46 | [
"MIT"
] | null | null | null | apps/images/test/reader/reader_test.exs | jjylik/roni | f4ae61881a5fdc9df7f61dd70ab5898d95c65d46 | [
"MIT"
] | null | null | null | defmodule Images.ReaderTest do
alias Images.Reader
use ExUnit.Case
test "Reader should filter images" do
filename = Reader.get_one("test/test_images", ["gray.png"])
assert filename == "test/test_images/white.png"
end
end | 23.8 | 63 | 0.726891 |
935224e1888860e93c4dc1350a747fe72b0c7a22 | 1,048 | ex | Elixir | test/support/conn_case.ex | StBarCo/pbbuilder | 9d6eb47d6137a6a16cd746a0c1418493f94043d5 | [
"MIT"
] | null | null | null | test/support/conn_case.ex | StBarCo/pbbuilder | 9d6eb47d6137a6a16cd746a0c1418493f94043d5 | [
"MIT"
] | null | null | null | test/support/conn_case.ex | StBarCo/pbbuilder | 9d6eb47d6137a6a16cd746a0c1418493f94043d5 | [
"MIT"
] | null | null | null | defmodule PbbuilderWeb.ConnCase do
@moduledoc """
This module defines the test case to be used by
tests that require setting up a connection.
Such tests rely on `Phoenix.ConnTest` and also
import other functionality to make it easier
to build common datastructures and query the data layer.
Finally, if t... | 26.871795 | 71 | 0.722328 |
935281f25621860bc2fdcc4f76815d8350b1d1c6 | 2,680 | ex | Elixir | clients/gmail/lib/google_api/gmail/v1/connection.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/gmail/lib/google_api/gmail/v1/connection.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/gmail/lib/google_api/gmail/v1/connection.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"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... | 37.222222 | 91 | 0.708955 |
93529156ab7d5e0ca52555649a0580fb2ac95550 | 627 | exs | Elixir | test/util/socket_stream.exs | walkr/porcelain | 4a497495beb8cab7af0d47ae50f720d31a13f039 | [
"MIT"
] | null | null | null | test/util/socket_stream.exs | walkr/porcelain | 4a497495beb8cab7af0d47ae50f720d31a13f039 | [
"MIT"
] | null | null | null | test/util/socket_stream.exs | walkr/porcelain | 4a497495beb8cab7af0d47ae50f720d31a13f039 | [
"MIT"
] | null | null | null | defmodule SocketStream do
def new(host, port) do
Stream.resource(
fn -> open_stream(host, port) end,
&stream_loop/1,
&close_stream/1
)
end
defp open_stream(host, port) do
{:ok, sock} = :gen_tcp.connect(host, port, [:binary, {:active, false}, {:packet, :line}])
req = "GET / HTTP/... | 22.392857 | 93 | 0.606061 |
9352959dd855e151ce75a9458400eb3902dae295 | 370 | ex | Elixir | test/support/fixtures.ex | versus-systems/shopifex | 48b1e7e6b3b5cf31010097ad768325f783168124 | [
"Apache-2.0"
] | null | null | null | test/support/fixtures.ex | versus-systems/shopifex | 48b1e7e6b3b5cf31010097ad768325f783168124 | [
"Apache-2.0"
] | null | null | null | test/support/fixtures.ex | versus-systems/shopifex | 48b1e7e6b3b5cf31010097ad768325f783168124 | [
"Apache-2.0"
] | null | null | null | defmodule Shopifex.Fixtures do
@moduledoc """
Fixtures for the tests
"""
def shop_in_session(%{conn: conn}) do
shop =
Shopifex.Shops.create_shop(%{
url: "shopifex.myshopify.com",
scope: "orders",
access_token: "asdf1234"
})
conn = Plug.Conn.put_private(conn, :shop, s... | 20.555556 | 51 | 0.605405 |
935298ac4c3937e125eaa91aa61a7d50243dc74b | 456 | exs | Elixir | examples/botany/priv/repo/migrations/20190622133407_initial_migration.exs | mfrasca/ecto | e5d9d4a05956cfcf65735916bc2478b791acf541 | [
"Apache-2.0"
] | null | null | null | examples/botany/priv/repo/migrations/20190622133407_initial_migration.exs | mfrasca/ecto | e5d9d4a05956cfcf65735916bc2478b791acf541 | [
"Apache-2.0"
] | null | null | null | examples/botany/priv/repo/migrations/20190622133407_initial_migration.exs | mfrasca/ecto | e5d9d4a05956cfcf65735916bc2478b791acf541 | [
"Apache-2.0"
] | null | null | null | defmodule Botany.Repo.Migrations.InitialMigration do
use Ecto.Migration
def change do
create table(:location) do
add :code, :string
add :name, :string
add :description, :string
end
create table(:plant) do
add :location_id, references(:location)
add :name, :string
ad... | 21.714286 | 52 | 0.644737 |
9352a5866b46b5f2aeffe62776108af35312de48 | 3,881 | exs | Elixir | test/lib/dwolla_test.exs | ark7-inc/dwolla-elixir | a3ee9c149fbf5cd5d38dc2e854278ab321a94bf5 | [
"MIT"
] | 6 | 2018-07-23T07:43:56.000Z | 2021-07-09T01:24:21.000Z | test/lib/dwolla_test.exs | ark7-inc/dwolla-elixir | a3ee9c149fbf5cd5d38dc2e854278ab321a94bf5 | [
"MIT"
] | 1 | 2019-11-05T05:31:35.000Z | 2019-11-06T21:26:38.000Z | test/lib/dwolla_test.exs | ark7-inc/dwolla-elixir | a3ee9c149fbf5cd5d38dc2e854278ab321a94bf5 | [
"MIT"
] | 7 | 2019-02-12T07:48:09.000Z | 2021-11-08T15:58:06.000Z | defmodule DwollaTest do
use ExUnit.Case
alias Plug.Conn
setup do
bypass = Bypass.open()
Application.put_env(:dwolla, :root_uri, "http://localhost:#{bypass.port}/")
{:ok, bypass: bypass}
end
describe "dwolla" do
test "get_cred/0 returns credentials as a map" do
assert %{client_id: _, c... | 33.747826 | 100 | 0.638753 |
9352b205b845fd68a15d995e046793247b3a8b83 | 343 | exs | Elixir | apps/re/priv/repo/migrations/20180827161741_create_district.exs | ruby2elixir/emcasa-backend | 70d7f4f233555417941ffa6ada84cf8740c21dd2 | [
"MIT"
] | 4 | 2019-11-01T16:29:31.000Z | 2020-10-10T21:20:12.000Z | apps/re/priv/repo/migrations/20180827161741_create_district.exs | caspg/backend | 34df9dc14ab8ed75de4578fefa2e087580c7e867 | [
"MIT"
] | null | null | null | apps/re/priv/repo/migrations/20180827161741_create_district.exs | caspg/backend | 34df9dc14ab8ed75de4578fefa2e087580c7e867 | [
"MIT"
] | 5 | 2019-11-04T21:25:45.000Z | 2020-02-13T23:49:36.000Z | defmodule Re.Repo.Migrations.CreateDistrict do
use Ecto.Migration
def change do
create table(:districts) do
add :state, :string
add :city, :string
add :name, :string
add :description, :text
timestamps()
end
create unique_index(:districts, [:state, :city, :name], name: :n... | 20.176471 | 80 | 0.650146 |
9352ef7449d32ea2a59a9618d796fd964f1254fa | 1,668 | ex | Elixir | lib/iex_line_bot_web.ex | pastleo/iex_line_bot | 73d02b45adc05bc7331fa5f88859861d04a2e71f | [
"MIT"
] | 1 | 2019-06-24T23:55:26.000Z | 2019-06-24T23:55:26.000Z | lib/iex_line_bot_web.ex | pastleo/iex_line_bot | 73d02b45adc05bc7331fa5f88859861d04a2e71f | [
"MIT"
] | null | null | null | lib/iex_line_bot_web.ex | pastleo/iex_line_bot | 73d02b45adc05bc7331fa5f88859861d04a2e71f | [
"MIT"
] | null | null | null | defmodule IexLineBotWeb 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 IexLineBotWeb, :controller
use IexLineBotWeb, :view
The definitions below will be executed for every view,
con... | 23.828571 | 83 | 0.696043 |
93532f99ef0f499f77d54c62a4262636e4f576e4 | 783 | ex | Elixir | lib/phoenix/ash_dashboard/live/color_bar_component.ex | ash-project/ash_dashboard | 7685db1fc2e0298d332a71e37bd18b558cb2abf5 | [
"MIT"
] | null | null | null | lib/phoenix/ash_dashboard/live/color_bar_component.ex | ash-project/ash_dashboard | 7685db1fc2e0298d332a71e37bd18b558cb2abf5 | [
"MIT"
] | null | null | null | lib/phoenix/ash_dashboard/live/color_bar_component.ex | ash-project/ash_dashboard | 7685db1fc2e0298d332a71e37bd18b558cb2abf5 | [
"MIT"
] | null | null | null | defmodule AshDashboard.ColorBarComponent do
use AshDashboard.Web, :live_component
def mount(socket) do
{:ok, assign(socket, :title, nil)}
end
def render(assigns) do
~L"""
<div class="progress flex-grow-1 mb-3">
<span class="progress-title"><%= @title %></span>
<%= for {name, value, color... | 26.1 | 55 | 0.581098 |
93533c0302ae429e839a61461f243729f8641082 | 14,332 | ex | Elixir | lib/pow/store/backend/mnesia_cache.ex | thejones/pow | 217d3d915ce6832a5b138535a54fa2c39b2d9be5 | [
"MIT"
] | null | null | null | lib/pow/store/backend/mnesia_cache.ex | thejones/pow | 217d3d915ce6832a5b138535a54fa2c39b2d9be5 | [
"MIT"
] | null | null | null | lib/pow/store/backend/mnesia_cache.ex | thejones/pow | 217d3d915ce6832a5b138535a54fa2c39b2d9be5 | [
"MIT"
] | null | null | null | defmodule Pow.Store.Backend.MnesiaCache do
@moduledoc """
GenServer based key value Mnesia cache store with auto expiration.
When the MnesiaCache starts, it'll initialize invalidators for all stored
keys using the `expire` value. If the `expire` datetime is past, it'll
send call the invalidator immediately.
... | 30.109244 | 126 | 0.645269 |
9353414c5ff14113732c18196dafb30e5af028e6 | 113 | ex | Elixir | testData/org/elixir_lang/formatting/incorrect_spaces_after_catch_keyword.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/formatting/incorrect_spaces_after_catch_keyword.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/formatting/incorrect_spaces_after_catch_keyword.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 145 | 2015-01-15T11:37:16.000Z | 2021-12-22T05:51:02.000Z | try do
GenServer.call(:registered_name, :timeout)
catch :exit, {:timeout, _reason} ->
{:exit, :timeout}
end
| 18.833333 | 44 | 0.681416 |
935363f20e946e0711e89269a6f00a8fb2b0d37c | 692 | ex | Elixir | lib/service/player_service.ex | jcoder39/clans | a674e364816607e238cffc2e85508212bc13462e | [
"MIT"
] | null | null | null | lib/service/player_service.ex | jcoder39/clans | a674e364816607e238cffc2e85508212bc13462e | [
"MIT"
] | null | null | null | lib/service/player_service.ex | jcoder39/clans | a674e364816607e238cffc2e85508212bc13462e | [
"MIT"
] | null | null | null | defmodule Player.Service do
require Player
def init() do
:ets.new(:players,[:set, :protected, :named_table, {:keypos, Player.player(:id) + 1}])
end
def register(name) do
id = UUID.uuid1()
player = Player.player(id: id, name: name)
update(player)
player
end
def get(id) do
hd(:ets.... | 18.702703 | 90 | 0.622832 |
93537461d07826fa379ee0c127514b9cbcbffaf6 | 7,067 | exs | Elixir | test/sorted_set_test.exs | coop/verk | cae9bea1426d5b340b3041b29453f17c709d70a8 | [
"MIT"
] | null | null | null | test/sorted_set_test.exs | coop/verk | cae9bea1426d5b340b3041b29453f17c709d70a8 | [
"MIT"
] | null | null | null | test/sorted_set_test.exs | coop/verk | cae9bea1426d5b340b3041b29453f17c709d70a8 | [
"MIT"
] | 1 | 2018-12-04T03:50:36.000Z | 2018-12-04T03:50:36.000Z | defmodule Verk.SortedSetTest do
use ExUnit.Case
import Verk.SortedSet
import :meck
@requeue_now_script Verk.Scripts.sha("requeue_job_now")
setup do
on_exit fn -> unload() end
{ :ok, redis } = Confex.get_env(:verk, :redis_url) |> Redix.start_link
Redix.command!(redis, ~w(DEL sorted))
{ :ok, %... | 29.818565 | 107 | 0.582142 |
935383d1138a8a0c04fb9ed5631fb6d32f172483 | 2,502 | ex | Elixir | clients/cloud_run/lib/google_api/cloud_run/v1alpha1/model/list_cloud_pub_sub_sources_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/cloud_run/lib/google_api/cloud_run/v1alpha1/model/list_cloud_pub_sub_sources_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/cloud_run/lib/google_api/cloud_run/v1alpha1/model/list_cloud_pub_sub_sources_response.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.40678 | 147 | 0.727418 |
9353a5f6e372c0b70686aec80b2e9dec9d407181 | 711 | ex | Elixir | lib/history_web/gettext.ex | fremantle-industries/history | a8a33744279ff4ca62620785f9a2e9c0c99e4de7 | [
"MIT"
] | 20 | 2021-08-06T01:09:48.000Z | 2022-03-28T18:44:56.000Z | lib/history_web/gettext.ex | fremantle-industries/history | a8a33744279ff4ca62620785f9a2e9c0c99e4de7 | [
"MIT"
] | 13 | 2021-08-21T21:17:02.000Z | 2022-03-27T06:33:51.000Z | lib/history_web/gettext.ex | fremantle-industries/history | a8a33744279ff4ca62620785f9a2e9c0c99e4de7 | [
"MIT"
] | 2 | 2021-09-23T11:31:59.000Z | 2022-01-09T16:19:35.000Z | defmodule HistoryWeb.Gettext do
@moduledoc """
A module providing Internationalization with a gettext-based API.
By using [Gettext](https://hexdocs.pm/gettext),
your module gains a set of macros for translations, for example:
import HistoryWeb.Gettext
# Simple translation
gettext("Here is t... | 28.44 | 72 | 0.677918 |
9353ac4acb2d7add4077aa493673b13317dd8694 | 11,254 | exs | Elixir | test/controllers/recipe_controller_test.exs | blacksph3re/alastair2 | 51fcd8fe666ae768dd8371b2c7835dd294eeddaf | [
"Apache-2.0"
] | null | null | null | test/controllers/recipe_controller_test.exs | blacksph3re/alastair2 | 51fcd8fe666ae768dd8371b2c7835dd294eeddaf | [
"Apache-2.0"
] | null | null | null | test/controllers/recipe_controller_test.exs | blacksph3re/alastair2 | 51fcd8fe666ae768dd8371b2c7835dd294eeddaf | [
"Apache-2.0"
] | 1 | 2017-12-15T15:49:16.000Z | 2017-12-15T15:49:16.000Z | defmodule Alastair.RecipeControllerTest do
use Alastair.ConnCase
alias Alastair.Recipe
@userid "asd123"
@valid_attrs %{description: "some content", instructions: "some content", name: "some content", person_count: 42, published: false}
@invalid_attrs %{person_count: -2}
setup %{conn: conn} do
{:ok, co... | 40.923636 | 161 | 0.669717 |
9353d842099dc5afc76ecce47587a27fb2198b90 | 3,744 | ex | Elixir | clients/safe_browsing/lib/google_api/safe_browsing/v4/api/full_hashes.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/safe_browsing/lib/google_api/safe_browsing/v4/api/full_hashes.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/safe_browsing/lib/google_api/safe_browsing/v4/api/full_hashes.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... | 42.545455 | 196 | 0.65438 |
93542b59c528ceef03bc931d7e111b4334d0b03c | 556 | ex | Elixir | apps/common/lib/mix_helpers/changeset.ex | allen-garvey/phoenix-umbrella | 1d444bbd62a5e7b5f51d317ce2be71ee994125d5 | [
"MIT"
] | 4 | 2019-10-04T16:11:15.000Z | 2021-08-18T21:00:13.000Z | apps/common/lib/mix_helpers/changeset.ex | allen-garvey/phoenix-umbrella | 1d444bbd62a5e7b5f51d317ce2be71ee994125d5 | [
"MIT"
] | 5 | 2020-03-16T23:52:25.000Z | 2021-09-03T16:52:17.000Z | apps/common/lib/mix_helpers/changeset.ex | allen-garvey/phoenix-umbrella | 1d444bbd62a5e7b5f51d317ce2be71ee994125d5 | [
"MIT"
] | null | null | null | defmodule Common.MixHelpers.Changeset do
alias Ecto.Changeset
@doc """
Converts changeset errors to string
"""
def errors_to_string(changeset) do
# based on https://hexdocs.pm/ecto/Ecto.Changeset.html#traverse_errors/2
Changeset.traverse_errors(changeset, fn {msg, opts} ->
Enum.reduce(opts, ms... | 25.272727 | 76 | 0.625899 |
935439c7db1263a9d21785575240c8a9bbbafb07 | 969 | ex | Elixir | test/support/channel_case.ex | marick/eecrit | 50b1ebeadc5cf21ea9f9df6add65e4d7037e2482 | [
"MIT"
] | 10 | 2016-07-15T15:57:33.000Z | 2018-06-09T00:40:46.000Z | test/support/channel_case.ex | marick/eecrit | 50b1ebeadc5cf21ea9f9df6add65e4d7037e2482 | [
"MIT"
] | null | null | null | test/support/channel_case.ex | marick/eecrit | 50b1ebeadc5cf21ea9f9df6add65e4d7037e2482 | [
"MIT"
] | 6 | 2016-07-15T15:57:41.000Z | 2018-03-22T16:38:00.000Z | defmodule Eecrit.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... | 22.022727 | 68 | 0.696594 |
93544c5b8fd5840844c9fde1b1f53353b294aaec | 2,798 | exs | Elixir | test/grizzly/command_class/configuration/get_test.exs | pragdave/grizzly | bcd7b46ab2cff1797dac04bc3cd12a36209dd579 | [
"Apache-2.0"
] | null | null | null | test/grizzly/command_class/configuration/get_test.exs | pragdave/grizzly | bcd7b46ab2cff1797dac04bc3cd12a36209dd579 | [
"Apache-2.0"
] | null | null | null | test/grizzly/command_class/configuration/get_test.exs | pragdave/grizzly | bcd7b46ab2cff1797dac04bc3cd12a36209dd579 | [
"Apache-2.0"
] | null | null | null | defmodule Grizzly.CommandClass.Configuration.Get.Test do
use ExUnit.Case, async: true
alias Grizzly.Packet
alias Grizzly.CommandClass.Configuration
alias Grizzly.CommandClass.Configuration.Get
alias Grizzly.Command.EncodeError
describe "implements Grizzly.Command correctly" do
test "initializes to com... | 31.795455 | 87 | 0.64975 |
935466e745df853fdeb2c8ab9d13649c7ef25d07 | 592 | ex | Elixir | lib/hans_and_franz.ex | dmccraw/hans_and_franz | 26c18d7558f752a44adfafb0a00878847bfe0247 | [
"MIT"
] | 2 | 2016-07-20T17:40:38.000Z | 2016-07-20T19:12:22.000Z | lib/hans_and_franz.ex | dmccraw/hans_and_franz | 26c18d7558f752a44adfafb0a00878847bfe0247 | [
"MIT"
] | null | null | null | lib/hans_and_franz.ex | dmccraw/hans_and_franz | 26c18d7558f752a44adfafb0a00878847bfe0247 | [
"MIT"
] | null | null | null | defmodule HansAndFranz do
use Application
# See http://elixir-lang.org/docs/stable/elixir/Application.html
# for more information on OTP Applications
def start(_type, _args) do
import Supervisor.Spec, warn: false
children = [
# Define workers and child supervisors to be supervised
worker(H... | 29.6 | 67 | 0.724662 |
93547fab3480e6811cea5f393d5408277761e82d | 11,522 | ex | Elixir | lib/zaryn/transaction_chain/transaction/data/keys.ex | ambareesha7/node-zaryn | 136e542801bf9b6fa4a015d3464609fdf3dacee8 | [
"Apache-2.0"
] | 1 | 2021-07-06T19:47:14.000Z | 2021-07-06T19:47:14.000Z | lib/zaryn/transaction_chain/transaction/data/keys.ex | ambareesha7/node-zaryn | 136e542801bf9b6fa4a015d3464609fdf3dacee8 | [
"Apache-2.0"
] | null | null | null | lib/zaryn/transaction_chain/transaction/data/keys.ex | ambareesha7/node-zaryn | 136e542801bf9b6fa4a015d3464609fdf3dacee8 | [
"Apache-2.0"
] | null | null | null | defmodule Zaryn.TransactionChain.TransactionData.Keys do
@moduledoc """
Represents section in the transaction data to store secret and authorized keys to
read the encrypted secret.
"""
defstruct authorized_keys: %{}, secret: ""
alias Zaryn.Crypto
@type t :: %__MODULE__{
secret: binary(),
... | 43.479245 | 116 | 0.53246 |
9354a42e0b5fcdd1fc6ac3ecb50467652883a2f5 | 421 | ex | Elixir | lib/aoc2021/day5/point.ex | jarimatti/aoc-2021 | 02ea9a8137617d0a43f46a5cfe589d69572b653e | [
"MIT"
] | null | null | null | lib/aoc2021/day5/point.ex | jarimatti/aoc-2021 | 02ea9a8137617d0a43f46a5cfe589d69572b653e | [
"MIT"
] | null | null | null | lib/aoc2021/day5/point.ex | jarimatti/aoc-2021 | 02ea9a8137617d0a43f46a5cfe589d69572b653e | [
"MIT"
] | null | null | null | defmodule Aoc2021.Day5.Point do
@moduledoc """
An (x, y) coordinate point on the chart.
"""
@type x() :: non_neg_integer()
@type y() :: non_neg_integer()
@opaque t() :: {x(), y()}
@spec new(x(), y()) :: t()
def new(x, y) do
{x, y}
end
@spec x(t()) :: x()
def x({x0, _}), do: x0
@spec y(t(... | 17.541667 | 42 | 0.494062 |
9354a6af997606c463ef30d016fc363fd95fbd9e | 114 | exs | Elixir | test/unigen_test.exs | selfup/unigen | af32235e33c13185905674932e42bf848110bfdf | [
"MIT"
] | null | null | null | test/unigen_test.exs | selfup/unigen | af32235e33c13185905674932e42bf848110bfdf | [
"MIT"
] | null | null | null | test/unigen_test.exs | selfup/unigen | af32235e33c13185905674932e42bf848110bfdf | [
"MIT"
] | null | null | null | defmodule UnigenTest do
use ExUnit.Case
doctest Unigen
test "the truth" do
assert 1 + 1 == 2
end
end
| 12.666667 | 23 | 0.666667 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.