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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
62df7d1c3c0f0e3c0c0dd3b844209ccbf374f6a8 | 538 | ex | Elixir | apps/demon_spirit/lib/guest.ex | mreishus/demon_spirit_umbrella | 1ab9161427361ac7d35132fce2aed36923896a4b | [
"MIT"
] | 12 | 2019-09-17T13:47:57.000Z | 2021-12-11T17:11:11.000Z | apps/demon_spirit/lib/guest.ex | mreishus/demon_spirit_umbrella | 1ab9161427361ac7d35132fce2aed36923896a4b | [
"MIT"
] | 181 | 2019-10-15T01:21:44.000Z | 2021-08-31T19:26:54.000Z | apps/demon_spirit/lib/guest.ex | mreishus/demon_spirit_umbrella | 1ab9161427361ac7d35132fce2aed36923896a4b | [
"MIT"
] | 2 | 2020-07-11T02:18:46.000Z | 2021-05-31T10:46:39.000Z | defmodule DemonSpirit.Guest do
@moduledoc """
Guest represents a low-friction, ephemeral login.
"""
use Ecto.Schema
import Ecto.Changeset
schema "guests" do
field(:name, :string)
end
def changeset(base, params \\ %{}) do
base
|> cast(params, [:name, :id])
|> validate_required([:name, :... | 23.391304 | 60 | 0.652416 |
62df898f766a8e67fad381e02b34d17dfef1ecf8 | 703 | ex | Elixir | lib/surface_bulma/form/checkbox.ex | justin-m-morgan/surface_bulma | c31faebc818c39d06250574b913096504bd6eeec | [
"MIT"
] | 30 | 2021-02-05T18:50:38.000Z | 2022-03-12T22:42:29.000Z | lib/surface_bulma/form/checkbox.ex | justin-m-morgan/surface_bulma | c31faebc818c39d06250574b913096504bd6eeec | [
"MIT"
] | 19 | 2021-01-15T19:14:24.000Z | 2022-02-05T14:57:18.000Z | lib/surface_bulma/form/checkbox.ex | justin-m-morgan/surface_bulma | c31faebc818c39d06250574b913096504bd6eeec | [
"MIT"
] | 17 | 2021-02-01T20:57:51.000Z | 2022-03-20T17:06:57.000Z | defmodule SurfaceBulma.Form.Checkbox do
@moduledoc """
The checkbox component
"""
use SurfaceBulma.Component
alias Surface.Components.Form.{Field, Checkbox}
include(Checkbox)
@doc "Disable selection"
prop disabled, :boolean, default: false
@doc "The text / label of the checkbox"
slot default
d... | 21.96875 | 55 | 0.567568 |
62dfaf48d92c6b222a33c6126272b96616547a8e | 3,303 | ex | Elixir | lib/narou/query_builder.ex | harukikubota/narou_wrapper | d8b4279ca57760f44bc3da8fbb70e2927a987809 | [
"MIT"
] | null | null | null | lib/narou/query_builder.ex | harukikubota/narou_wrapper | d8b4279ca57760f44bc3da8fbb70e2927a987809 | [
"MIT"
] | 2 | 2021-01-15T17:14:26.000Z | 2021-01-16T12:58:06.000Z | lib/narou/query_builder.ex | harukikubota/narou | d8b4279ca57760f44bc3da8fbb70e2927a987809 | [
"MIT"
] | null | null | null | defmodule Narou.QueryBuilder do
alias Narou.ApiKeyNameConverter, as: C
alias Narou.Entity
@query_start_str "?"
@col_delimita "&"
@key_val_delimita "="
@in_value_delimita "-"
@spec build(map) :: binary
def build(map) do
Entity.to_map_for_build_query(map)
|> Enum.map(fn {k, v} -> conver... | 35.138298 | 106 | 0.627006 |
62dfb045e36ef2179961df366a9f3ebb49e8c06d | 1,172 | exs | Elixir | test/controllers/controller_helpers_test.exs | remigijusj/coherence | 36fe35b0bfe7ac63b44b4046f3ba62f2fe69603a | [
"MIT"
] | null | null | null | test/controllers/controller_helpers_test.exs | remigijusj/coherence | 36fe35b0bfe7ac63b44b4046f3ba62f2fe69603a | [
"MIT"
] | null | null | null | test/controllers/controller_helpers_test.exs | remigijusj/coherence | 36fe35b0bfe7ac63b44b4046f3ba62f2fe69603a | [
"MIT"
] | null | null | null | defmodule CoherenceTest.ControllerHelpers do
use TestCoherence.ConnCase
alias Coherence.{InvitationController, Config}
alias TestCoherence.{User, Repo, Config}
alias Coherence.ControllerHelpers, as: Helpers
import TestCoherence.TestHelpers
test "confirm!" do
user = insert_user
refute User.confirmed... | 30.051282 | 72 | 0.682594 |
62dfed13593f039765b632b1d2dfad569d8f49e7 | 2,570 | ex | Elixir | lib/membrane/core/helper/genserver.ex | vKxni/membrane_core | d14a67304b63706d6df520fa306dd2fda147c07c | [
"Apache-2.0"
] | null | null | null | lib/membrane/core/helper/genserver.ex | vKxni/membrane_core | d14a67304b63706d6df520fa306dd2fda147c07c | [
"Apache-2.0"
] | null | null | null | lib/membrane/core/helper/genserver.ex | vKxni/membrane_core | d14a67304b63706d6df520fa306dd2fda147c07c | [
"Apache-2.0"
] | null | null | null | defmodule Membrane.Core.Helper.GenServer do
@moduledoc false
require Membrane.Logger
@type genserver_return_t :: {:noreply, any()} | {:reply, any(), any()}
@spec noreply({:ok, state}) :: {:noreply, state} when state: any()
def noreply({:ok, new_state}), do: {:noreply, new_state}
@spec noreply(
... | 32.531646 | 81 | 0.589105 |
62e0119133d6f0dbdbeafda334b71d010a480e3e | 745 | exs | Elixir | test/timex/calendar/julian_test.exs | chungwong/timex | bcd2504119f5c11ada7455d19726b5a49254dabf | [
"MIT"
] | null | null | null | test/timex/calendar/julian_test.exs | chungwong/timex | bcd2504119f5c11ada7455d19726b5a49254dabf | [
"MIT"
] | null | null | null | test/timex/calendar/julian_test.exs | chungwong/timex | bcd2504119f5c11ada7455d19726b5a49254dabf | [
"MIT"
] | null | null | null | defmodule Timex.Calendar.JulianTest do
use ExUnit.Case, async: true
alias Timex.Calendar.Julian
# test values generated from:
# http://aa.usno.navy.mil/data/docs/JulianDate.php
test "Test Julian Date" do
assert Julian.julian_date(2018, 10, 1) == 2458393
end
test "Test Julian Date right after midnight" ... | 26.607143 | 72 | 0.69396 |
62e014868c0306a7cbc40f16273c0d7df7c321f0 | 308 | ex | Elixir | lib/th_stat/covid19/supervisor.ex | wingyplus/th_stat_covid19 | d114653d98336e0f342dc4f566ed47b30c25f299 | [
"MIT"
] | null | null | null | lib/th_stat/covid19/supervisor.ex | wingyplus/th_stat_covid19 | d114653d98336e0f342dc4f566ed47b30c25f299 | [
"MIT"
] | null | null | null | lib/th_stat/covid19/supervisor.ex | wingyplus/th_stat_covid19 | d114653d98336e0f342dc4f566ed47b30c25f299 | [
"MIT"
] | null | null | null | defmodule ThStat.Covid19.Supervisor do
use Supervisor
def start_link(args), do: Supervisor.start_link(__MODULE__, args, name: __MODULE__)
@impl true
def init(_args) do
children = [
{Finch, name: ThStat.Covid19.Finch}
]
Supervisor.init(children, strategy: :one_for_one)
end
end
| 20.533333 | 85 | 0.707792 |
62e02f5d659c89c166f9da7c1665eb663a5468ce | 848 | ex | Elixir | lib/phantomchain/client/api/blocks.ex | PhantomChain/elixir-client | d776f84f9a407877a029043325973a8fdd2574a5 | [
"MIT"
] | null | null | null | lib/phantomchain/client/api/blocks.ex | PhantomChain/elixir-client | d776f84f9a407877a029043325973a8fdd2574a5 | [
"MIT"
] | null | null | null | lib/phantomchain/client/api/blocks.ex | PhantomChain/elixir-client | d776f84f9a407877a029043325973a8fdd2574a5 | [
"MIT"
] | null | null | null | defmodule PhantomChain.Client.API.Blocks do
@moduledoc """
Documentation for PhantomChain.Client.API.Blocks
"""
import PhantomChain.Client
@spec list(Tesla.Client.t(), Keyword.t()) :: PhantomChain.Client.response()
def list(client, parameters \\ []) do
client |> get("blocks", parameters)
end
@spe... | 30.285714 | 97 | 0.681604 |
62e045127d3a52cdb92c2cfe1dc98c9c1b479c4d | 320 | ex | Elixir | lib/techtree_web/controllers/index_redirection_controller.ex | kenkeiras/MonTree | 7ec724634c123ee085921c4cac07800c9a15e4ec | [
"WTFPL"
] | 2 | 2018-10-26T06:06:42.000Z | 2020-02-16T15:01:42.000Z | lib/techtree_web/controllers/index_redirection_controller.ex | kenkeiras/TechTree | 26c8ca59855002a88bf15eb0b64a6c788f438ec8 | [
"WTFPL"
] | 108 | 2018-10-25T10:30:33.000Z | 2021-07-28T04:18:03.000Z | lib/techtree_web/controllers/index_redirection_controller.ex | kenkeiras/TechTree | 26c8ca59855002a88bf15eb0b64a6c788f438ec8 | [
"WTFPL"
] | null | null | null | defmodule TechtreeWeb.IndexRedirectionController do
use TechtreeWeb, :controller
def index(conn, _params) do
case get_session(conn, :user_id) do
nil ->
redirect(conn, to: session_path(conn, :new))
_user_id ->
redirect(conn, to: project_project_path(conn, :index))
end
end
end
| 22.857143 | 62 | 0.678125 |
62e05409f0b0e7525f038cfd5d1b95d314f653ce | 469 | ex | Elixir | lib/elixirpb.pb.ex | wojtekmach/protobuf | 3b251d286dc94745fc6a92fcbf9be03f44bb9b46 | [
"MIT"
] | null | null | null | lib/elixirpb.pb.ex | wojtekmach/protobuf | 3b251d286dc94745fc6a92fcbf9be03f44bb9b46 | [
"MIT"
] | null | null | null | lib/elixirpb.pb.ex | wojtekmach/protobuf | 3b251d286dc94745fc6a92fcbf9be03f44bb9b46 | [
"MIT"
] | null | null | null | defmodule Elixirpb.FileOptions do
@moduledoc false
use Protobuf, syntax: :proto2
@type t :: %__MODULE__{
module_prefix: String.t()
}
defstruct [:module_prefix]
field :module_prefix, 1, optional: true, type: :string
def transform_module(), do: nil
end
defmodule Elixirpb.PbExtension do
... | 22.333333 | 93 | 0.716418 |
62e0606ed5ef6828b2d2e4a8f0feb11af469db8b | 2,058 | ex | Elixir | clients/jobs/lib/google_api/jobs/v2/model/list_jobs_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/jobs/lib/google_api/jobs/v2/model/list_jobs_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/jobs/lib/google_api/jobs/v2/model/list_jobs_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... | 34.881356 | 158 | 0.715743 |
62e06d8f525741827994b0e29852d8ef856c367c | 573 | exs | Elixir | test/web/views/error_view_test.exs | ench0/blog | 04f7df2357b13dddee9d82cd1c35bbd0ce9618a9 | [
"MIT"
] | 2 | 2017-06-08T23:28:13.000Z | 2017-06-08T23:28:16.000Z | test/web/views/error_view_test.exs | ench0/blog | 04f7df2357b13dddee9d82cd1c35bbd0ce9618a9 | [
"MIT"
] | null | null | null | test/web/views/error_view_test.exs | ench0/blog | 04f7df2357b13dddee9d82cd1c35bbd0ce9618a9 | [
"MIT"
] | null | null | null | defmodule Blog.Web.ErrorViewTest do
use Blog.Web.ConnCase, async: true
# Bring render/3 and render_to_string/3 for testing custom views
import Phoenix.View
test "renders 404.html" do
assert render_to_string(Blog.Web.ErrorView, "404.html", []) ==
"Page not found"
end
test "render 500.html" ... | 26.045455 | 66 | 0.670157 |
62e0934f218448544018858f15b15183a14c1ddd | 1,871 | exs | Elixir | config/prod.exs | colindensem/petal-k8s | def9dc653dcae2ef35021d44821e6c69d8744e15 | [
"MIT"
] | 1 | 2021-02-12T09:17:38.000Z | 2021-02-12T09:17:38.000Z | config/prod.exs | colindensem/petal-k8s | def9dc653dcae2ef35021d44821e6c69d8744e15 | [
"MIT"
] | null | null | null | config/prod.exs | colindensem/petal-k8s | def9dc653dcae2ef35021d44821e6c69d8744e15 | [
"MIT"
] | null | null | null | use Mix.Config
# For production, don't forget to configure the url host
# to something meaningful, Phoenix uses this information
# when generating URLs.
#
# Note we also include the path to a cache manifest
# containing the digested version of static files. This
# manifest is generated by the `mix phx.digest` task,
# ... | 35.301887 | 66 | 0.704971 |
62e0abaf82bf28dde0fe83ceabc8aa7d495c594a | 8,317 | ex | Elixir | lib/finch.ex | Jwsonic/finch | 2f2daefe91cc1c0d28a35e78fa001039323838c9 | [
"MIT"
] | null | null | null | lib/finch.ex | Jwsonic/finch | 2f2daefe91cc1c0d28a35e78fa001039323838c9 | [
"MIT"
] | null | null | null | lib/finch.ex | Jwsonic/finch | 2f2daefe91cc1c0d28a35e78fa001039323838c9 | [
"MIT"
] | null | null | null | defmodule Finch do
@external_resource "README.md"
@moduledoc "README.md"
|> File.read!()
|> String.split("<!-- MDOC !-->")
|> Enum.fetch!(1)
alias Finch.{PoolManager, Request, Response}
use Supervisor
@default_pool_size 10
@default_pool_count 1
@pool_config_schem... | 32.873518 | 259 | 0.64819 |
62e0c01fbc11bcee0b7ce916fd881b9a7f1bb891 | 3,658 | exs | Elixir | test/sundog/submitter_test.exs | wisq/sundog | 78ec18a07ad2a21bcb0ff9f069679497096ce916 | [
"Apache-2.0"
] | null | null | null | test/sundog/submitter_test.exs | wisq/sundog | 78ec18a07ad2a21bcb0ff9f069679497096ce916 | [
"Apache-2.0"
] | null | null | null | test/sundog/submitter_test.exs | wisq/sundog | 78ec18a07ad2a21bcb0ff9f069679497096ce916 | [
"Apache-2.0"
] | null | null | null | defmodule Sundog.SubmitterTest do
use ExUnit.Case
import Mock
alias Sundog.Submitter
alias Sundog.Datadog
setup do
start_supervised(Sundog.Submitter.Supervisor)
:ok
end
test "submit_datapoints/3 submits data to Datadog" do
metric1 = "my.metric"
points1 = sample_data(5)
tags1 = [foo:... | 34.509434 | 103 | 0.679333 |
62e0dcbb6e360721b80c0af7051e9d09e6e6088e | 1,598 | ex | Elixir | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/instances_truncate_log_request.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/instances_truncate_log_request.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/instances_truncate_log_request.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... | 33.291667 | 116 | 0.773467 |
62e0ef2d22284f5d39ad6214b63699088f65ac10 | 2,149 | ex | Elixir | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1_text_annotation.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1_text_annotation.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1_text_annotation.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... | 33.578125 | 163 | 0.747324 |
62e15c631f0a39afcff4ae3f8db9eda474b0230b | 1,644 | ex | Elixir | clients/gke_hub/lib/google_api/gke_hub/v1/model/config_management_hierarchy_controller_version.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/gke_hub/lib/google_api/gke_hub/v1/model/config_management_hierarchy_controller_version.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/gke_hub/lib/google_api/gke_hub/v1/model/config_management_hierarchy_controller_version.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... | 32.88 | 101 | 0.737226 |
62e18ecfb71d99a7ed9815753b02dde484f3b423 | 491 | ex | Elixir | broker/lib/broker/trigger.ex | mikehelmick/broker-prototype | 68082f753d3a7ea29399706504419e495287b35f | [
"Apache-2.0"
] | 1 | 2019-02-04T21:09:16.000Z | 2019-02-04T21:09:16.000Z | broker/lib/broker/trigger.ex | mikehelmick/broker-prototype | 68082f753d3a7ea29399706504419e495287b35f | [
"Apache-2.0"
] | null | null | null | broker/lib/broker/trigger.ex | mikehelmick/broker-prototype | 68082f753d3a7ea29399706504419e495287b35f | [
"Apache-2.0"
] | null | null | null | defmodule Trigger do
# Type is the Type of the cloud environment
# Source is an optional source filter
# Destionation is required delivery address
@derive Jason.Encoder
@enforce_keys [:type, :destination]
defstruct [:type, :source, :destination]
def type(trigger = %{"type": type}) when is_map(trigger), d... | 37.769231 | 81 | 0.720978 |
62e19a913edaff778ed5ade2a01ff195513470f0 | 780 | ex | Elixir | web/views/course_view.ex | mark-b-kauffman/phoenixDSK3LO | 999d7f66515a3bf1974d25c3d7ff3b439266452c | [
"BSD-3-Clause",
"MIT"
] | null | null | null | web/views/course_view.ex | mark-b-kauffman/phoenixDSK3LO | 999d7f66515a3bf1974d25c3d7ff3b439266452c | [
"BSD-3-Clause",
"MIT"
] | null | null | null | web/views/course_view.ex | mark-b-kauffman/phoenixDSK3LO | 999d7f66515a3bf1974d25c3d7ff3b439266452c | [
"BSD-3-Clause",
"MIT"
] | null | null | null | defmodule PhoenixDSK3LO.CourseView do
use PhoenixDSK3LO.Web, :view
# See http://www.phoenixframework.org/docs/adding-pages
# Views render templates. They also act as a presentation layer for raw data
# from the controller, preparing it for use in a template. Functions which
# perform this transformation shoul... | 55.714286 | 78 | 0.75641 |
62e1b4bd7bef394f65fcd37cf51f7f51c9577b3e | 1,392 | exs | Elixir | test/eds_web/channels/socket_test.exs | the-mediocre-dev/elixir-dev-server | 1ea20f92e1344f7f9fe3f9ac4fee91fb7371d136 | [
"MIT"
] | null | null | null | test/eds_web/channels/socket_test.exs | the-mediocre-dev/elixir-dev-server | 1ea20f92e1344f7f9fe3f9ac4fee91fb7371d136 | [
"MIT"
] | null | null | null | test/eds_web/channels/socket_test.exs | the-mediocre-dev/elixir-dev-server | 1ea20f92e1344f7f9fe3f9ac4fee91fb7371d136 | [
"MIT"
] | null | null | null | defmodule EDSWeb.SocketTest do
use EDS.DataCase, async: false
alias EDS.Repo
alias EDSWeb.{
Socket,
TestClient
}
setup do
{:ok, _pid} = start_supervised({TestClient, []})
:ok
end
test "push" do
TestClient.connect("client_1")
TestClient.connect("client_2")
Socket.push("cli... | 22.095238 | 59 | 0.64727 |
62e1c462a86db8506d7a34ac8044fc029c9a8703 | 1,767 | ex | Elixir | lib/hexpm/billing/report.ex | christopherlai/hexpm | 054dd5b30f0c8010681fa5cf8e84dc17b9a23a7c | [
"Apache-2.0"
] | null | null | null | lib/hexpm/billing/report.ex | christopherlai/hexpm | 054dd5b30f0c8010681fa5cf8e84dc17b9a23a7c | [
"Apache-2.0"
] | null | null | null | lib/hexpm/billing/report.ex | christopherlai/hexpm | 054dd5b30f0c8010681fa5cf8e84dc17b9a23a7c | [
"Apache-2.0"
] | null | null | null | defmodule Hexpm.Billing.Report do
use GenServer
import Ecto.Query, only: [from: 2]
alias Hexpm.Repo
alias Hexpm.Accounts.Organization
def start_link(opts \\ []) do
GenServer.start_link(__MODULE__, opts, opts)
end
def init(opts) do
Process.send_after(self(), :update, opts[:interval])
{:ok, op... | 22.948052 | 80 | 0.621958 |
62e20351c64c8f3feb5e049127e9c55c68223040 | 1,002 | exs | Elixir | examples/listnotes.exs | gmassman/everex | ce0f3037e69041127776181afafe6b2d14f0e343 | [
"Apache-2.0"
] | 11 | 2015-02-22T17:42:03.000Z | 2018-09-23T07:48:57.000Z | examples/listnotes.exs | gmassman/everex | ce0f3037e69041127776181afafe6b2d14f0e343 | [
"Apache-2.0"
] | 38 | 2015-03-11T16:13:27.000Z | 2021-08-02T07:14:50.000Z | examples/listnotes.exs | gmassman/everex | ce0f3037e69041127776181afafe6b2d14f0e343 | [
"Apache-2.0"
] | 4 | 2015-05-20T01:33:33.000Z | 2020-06-09T04:44:46.000Z | alias Everex.Client
alias Everex.NoteStore
alias Everex.Types
defmodule ListNotes do
def run do
# Empty filter will retrieve all notes
filter = %Types.NoteFilter{}
# For each result, include title in addition to the guid
spec = %Types.NotesMetadataResultSpec{includeTitle: true}
# Start a new cl... | 32.322581 | 88 | 0.688623 |
62e2260628e907bb40162c49238941d0eb2a79dc | 4,364 | ex | Elixir | test/support/api_case.ex | fikape/code-corps-api | c21674b0b2a19fa26945c94268db8894420ca181 | [
"MIT"
] | 275 | 2015-06-23T00:20:51.000Z | 2021-08-19T16:17:37.000Z | test/support/api_case.ex | fikape/code-corps-api | c21674b0b2a19fa26945c94268db8894420ca181 | [
"MIT"
] | 1,304 | 2015-06-26T02:11:54.000Z | 2019-12-12T21:08:00.000Z | test/support/api_case.ex | fikape/code-corps-api | c21674b0b2a19fa26945c94268db8894420ca181 | [
"MIT"
] | 140 | 2016-01-01T18:19:47.000Z | 2020-11-22T06:24:47.000Z | defmodule CodeCorpsWeb.ApiCase do
@moduledoc """
This module defines the test case to be used by
tests that require setting up a connection, specificaly,
those working with the API endpoints.
It's basically a clone of CodeCorpsWeb.ConnCase, with some extras,
mainly authentication and proper headers, added.... | 31.854015 | 120 | 0.681714 |
62e2313e5c694e525bb2ab3f041066fad999f16a | 2,457 | ex | Elixir | apps/fz_http/lib/fz_http/shared_validators.ex | bhardwajRahul/firezone | 836bfda9e28350443f2093f810872f2bee7c6cdc | [
"Apache-2.0"
] | null | null | null | apps/fz_http/lib/fz_http/shared_validators.ex | bhardwajRahul/firezone | 836bfda9e28350443f2093f810872f2bee7c6cdc | [
"Apache-2.0"
] | 1 | 2020-04-24T01:53:41.000Z | 2020-04-24T01:53:41.000Z | apps/fz_http/lib/fz_http/shared_validators.ex | CloudFire-LLC/cloudfire-ce | 416ea0d9c9528790fdf70c432aa4eb507d7b2074 | [
"Apache-2.0"
] | null | null | null | defmodule FzHttp.SharedValidators do
@moduledoc """
Shared validators to use between schemas.
"""
import Ecto.Changeset
import FzCommon.FzNet,
only: [
valid_ip?: 1,
valid_fqdn?: 1,
valid_cidr?: 1
]
def validate_no_duplicates(changeset, field) when is_atom(field) do
validate_... | 26.138298 | 93 | 0.612536 |
62e23d5cf7e54cb059832b25223b065efbc61204 | 67 | ex | Elixir | lib/nickdotcom_web/views/page_view.ex | nickyeager/nickdotcom | e1a0f32c44da2111c9d8b22800edeb831d893b5e | [
"MIT"
] | null | null | null | lib/nickdotcom_web/views/page_view.ex | nickyeager/nickdotcom | e1a0f32c44da2111c9d8b22800edeb831d893b5e | [
"MIT"
] | null | null | null | lib/nickdotcom_web/views/page_view.ex | nickyeager/nickdotcom | e1a0f32c44da2111c9d8b22800edeb831d893b5e | [
"MIT"
] | null | null | null | defmodule NickdotcomWeb.PageView do
use NickdotcomWeb, :view
end
| 16.75 | 35 | 0.820896 |
62e23deea2828210cda26836263ef4a30101740d | 821 | ex | Elixir | lib/books_web/controllers/user_registration_controller.ex | nickagliano/books | eec595ed4add9d678278785d9ab10106e1e426d1 | [
"MIT"
] | null | null | null | lib/books_web/controllers/user_registration_controller.ex | nickagliano/books | eec595ed4add9d678278785d9ab10106e1e426d1 | [
"MIT"
] | null | null | null | lib/books_web/controllers/user_registration_controller.ex | nickagliano/books | eec595ed4add9d678278785d9ab10106e1e426d1 | [
"MIT"
] | null | null | null | defmodule BooksWeb.UserRegistrationController do
use BooksWeb, :controller
alias Books.Accounts
alias Books.Accounts.User
alias BooksWeb.UserAuth
def new(conn, _params) do
changeset = Accounts.change_user_registration(%User{})
render(conn, "new.html", changeset: changeset)
end
def create(conn, ... | 26.483871 | 61 | 0.644336 |
62e244a478e48d694d22d7e48ab36a08503377e8 | 4,207 | ex | Elixir | clients/content/lib/google_api/content/v21/model/order_line_item_product.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v21/model/order_line_item_product.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/v21/model/order_line_item_product.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... | 44.755319 | 314 | 0.666746 |
62e259a49f323e0bb859547646ba5314a62d4000 | 1,218 | exs | Elixir | test/day7_test.exs | erljef/adventofcode-2020 | fdae924b34eb9b324e529b02e2aed45a79078102 | [
"WTFPL"
] | null | null | null | test/day7_test.exs | erljef/adventofcode-2020 | fdae924b34eb9b324e529b02e2aed45a79078102 | [
"WTFPL"
] | null | null | null | test/day7_test.exs | erljef/adventofcode-2020 | fdae924b34eb9b324e529b02e2aed45a79078102 | [
"WTFPL"
] | null | null | null | defmodule Day7Test do
use ExUnit.Case
import Day7
test "solves day 7 part 1" do
input =
"""
light red bags contain 1 bright white bag, 2 muted yellow bags.
dark orange bags contain 3 bright white bags, 4 muted yellow bags.
bright white bags contain 1 shiny gold bag.
muted yellow bags con... | 34.8 | 81 | 0.686371 |
62e2b1acdd2dbd9b02e9a27f00801eeea076803a | 564 | ex | Elixir | lib/niacademy_web/views/changeset_view.ex | Ruin0x11/niacademy | f0b07aefa7b2bf5a8f643d851523ee43c6fd1c0f | [
"MIT"
] | null | null | null | lib/niacademy_web/views/changeset_view.ex | Ruin0x11/niacademy | f0b07aefa7b2bf5a8f643d851523ee43c6fd1c0f | [
"MIT"
] | null | null | null | lib/niacademy_web/views/changeset_view.ex | Ruin0x11/niacademy | f0b07aefa7b2bf5a8f643d851523ee43c6fd1c0f | [
"MIT"
] | null | null | null | defmodule NiacademyWeb.ChangesetView do
use NiacademyWeb, :view
@doc """
Traverses and translates changeset errors.
See `Ecto.Changeset.traverse_errors/2` and
`NiacademyWeb.ErrorHelpers.translate_error/1` for more details.
"""
def translate_errors(changeset) do
Ecto.Changeset.traverse_errors(changes... | 28.2 | 65 | 0.741135 |
62e2b29c524e9cba27f3d9681791885710f20d5c | 2,371 | ex | Elixir | clients/firebase/lib/google_api/firebase/v1beta1/model/android_app.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/firebase/lib/google_api/firebase/v1beta1/model/android_app.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/firebase/lib/google_api/firebase/v1beta1/model/android_app.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... | 37.046875 | 131 | 0.693378 |
62e2c7b959297d54fff190a151a116220ddf98ac | 2,821 | ex | Elixir | clients/document_ai/lib/google_api/document_ai/v1/model/google_cloud_documentai_v1beta3_batch_process_metadata.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/document_ai/lib/google_api/document_ai/v1/model/google_cloud_documentai_v1beta3_batch_process_metadata.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/document_ai/lib/google_api/document_ai/v1/model/google_cloud_documentai_v1beta3_batch_process_metadata.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... | 38.121622 | 222 | 0.722084 |
62e2cd02d226b9e536f3c7b8a292471965d6fd05 | 917 | ex | Elixir | apps/note_it/lib/users/user.ex | sushilman/note-it | c47edafb4272b9f01d53f8566f5ed7858f2d355c | [
"Apache-2.0"
] | null | null | null | apps/note_it/lib/users/user.ex | sushilman/note-it | c47edafb4272b9f01d53f8566f5ed7858f2d355c | [
"Apache-2.0"
] | null | null | null | apps/note_it/lib/users/user.ex | sushilman/note-it | c47edafb4272b9f01d53f8566f5ed7858f2d355c | [
"Apache-2.0"
] | null | null | null | defmodule NoteIt.User do
use Ecto.Schema
import Ecto.Changeset
alias NoteIt.Group
schema "users" do
field :email, :string
field :password, :string
field :name, :string
has_many :groups_owned, Group, foreign_key: :group_id
many_to_many :groups, Group, join_through: "groups_users"
time... | 20.840909 | 61 | 0.68048 |
62e2ec5bedc483e3d26af2b88e052a8e7af1b6f3 | 270 | ex | Elixir | lib/validation.ex | silppuri/daily | a31034dedbcc2eb74bd2e07e703df836c5b3607f | [
"MIT"
] | null | null | null | lib/validation.ex | silppuri/daily | a31034dedbcc2eb74bd2e07e703df836c5b3607f | [
"MIT"
] | null | null | null | lib/validation.ex | silppuri/daily | a31034dedbcc2eb74bd2e07e703df836c5b3607f | [
"MIT"
] | 1 | 2019-09-05T12:37:23.000Z | 2019-09-05T12:37:23.000Z | defmodule Validation do
def uri(_field, value) do
case URI.parse(value) do
%URI{scheme: nil} -> [scheme: "cannot be blank"]
%URI{host: nil} -> [host: "cannot be blank"]
%URI{path: nil} -> [path: "cannot be blank"]
_ -> []
end
end
end
| 24.545455 | 54 | 0.57037 |
62e2f2629c88af98f23aa58cc856e558cba5817d | 2,010 | ex | Elixir | lib/ecto/model.ex | yrashk/ecto | 1462d5ad4cbb7bf74c292ec405852bc196808daf | [
"Apache-2.0"
] | 1 | 2016-08-15T21:23:28.000Z | 2016-08-15T21:23:28.000Z | lib/ecto/model.ex | yrashk/ecto | 1462d5ad4cbb7bf74c292ec405852bc196808daf | [
"Apache-2.0"
] | null | null | null | lib/ecto/model.ex | yrashk/ecto | 1462d5ad4cbb7bf74c292ec405852bc196808daf | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.Model do
@moduledoc """
Models are Elixir modules with Ecto-specific behaviour.
This module is an "umbrella" module that adds a bunch of functionality
to your module:
* `Ecto.Model.Schema` - provides the API necessary to define schemas;
* `Ecto.Model.Callbacks` - to be implemented;
* `Ect... | 25.443038 | 92 | 0.676119 |
62e31f949a33eed0496b8fcdf884b0a0fb0baf43 | 1,908 | ex | Elixir | lib/ash/resource/relationships/has_one.ex | smt116/ash | 880a17f197873eb1c8dc8d81a8b4d6d9cb570b3f | [
"MIT"
] | null | null | null | lib/ash/resource/relationships/has_one.ex | smt116/ash | 880a17f197873eb1c8dc8d81a8b4d6d9cb570b3f | [
"MIT"
] | null | null | null | lib/ash/resource/relationships/has_one.ex | smt116/ash | 880a17f197873eb1c8dc8d81a8b4d6d9cb570b3f | [
"MIT"
] | null | null | null | defmodule Ash.Resource.Relationships.HasOne do
@moduledoc "Represents a has_one relationship on a resource"
defstruct [
:name,
:source,
:destination,
:destination_field,
:private?,
:source_field,
:allow_orphans?,
:writable?,
:context,
:description,
:filter,
:sort,
... | 27.257143 | 111 | 0.540356 |
62e342f2e4896da7df08c37b1de8cf151d821b66 | 1,127 | exs | Elixir | config/config.exs | thebriz24/gen_timer | 563dddd268f665527939a58fe6f8d4ae7604b94b | [
"MIT"
] | null | null | null | config/config.exs | thebriz24/gen_timer | 563dddd268f665527939a58fe6f8d4ae7604b94b | [
"MIT"
] | null | null | null | config/config.exs | thebriz24/gen_timer | 563dddd268f665527939a58fe6f8d4ae7604b94b | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the paren... | 36.354839 | 73 | 0.75244 |
62e35000d90b10e320aae558f5e2eb81d671a72d | 9,337 | ex | Elixir | lib/mariaex/query.ex | olafz/mariaex | caa1ec6b251ddde395a610020629603d73aab8ea | [
"Apache-2.0"
] | null | null | null | lib/mariaex/query.ex | olafz/mariaex | caa1ec6b251ddde395a610020629603d73aab8ea | [
"Apache-2.0"
] | null | null | null | lib/mariaex/query.ex | olafz/mariaex | caa1ec6b251ddde395a610020629603d73aab8ea | [
"Apache-2.0"
] | null | null | null | defmodule Mariaex.Query do
@moduledoc """
Query struct returned from a successfully prepared query. Its fields are:
* `name` - The name of the prepared statement;
* `statement` - The prepared statement;
* `num_params` - The number of parameters;
* `ref` - Reference that uniquely identifies when the... | 41.869955 | 163 | 0.653957 |
62e3ca0c6b9017617dd4fb2ed8d397d277326107 | 8,804 | ex | Elixir | lib/carguero_task_bunny/worker.ex | carguero/carguero_task_bunny | e6f4346904433a5ffe3b3b256a97f348839ab514 | [
"MIT"
] | 2 | 2020-12-03T18:09:00.000Z | 2021-01-17T22:44:50.000Z | lib/carguero_task_bunny/worker.ex | carguero/carguero_task_bunny | e6f4346904433a5ffe3b3b256a97f348839ab514 | [
"MIT"
] | null | null | null | lib/carguero_task_bunny/worker.ex | carguero/carguero_task_bunny | e6f4346904433a5ffe3b3b256a97f348839ab514 | [
"MIT"
] | null | null | null | defmodule CargueroTaskBunny.Worker do
@moduledoc """
A GenServer that listens a queue and consumes messages.
You don't have to call or start worker explicity.
CargueroTaskBunny loads config and starts workers automatically for you.
"""
use GenServer
require Logger
alias CargueroTaskBunny.{
Conne... | 28.491909 | 110 | 0.637892 |
62e3eff1661759ff556caa311cb5146bb6d18fc5 | 1,285 | ex | Elixir | lib/helios/pipeline/test.ex | exponentially/helios | 3a7b66bd95a8c53c500272eb8a269a73e6de6d8a | [
"Apache-2.0"
] | 12 | 2018-09-20T21:33:07.000Z | 2020-01-14T19:31:11.000Z | lib/helios/pipeline/test.ex | exponentially/helios | 3a7b66bd95a8c53c500272eb8a269a73e6de6d8a | [
"Apache-2.0"
] | null | null | null | lib/helios/pipeline/test.ex | exponentially/helios | 3a7b66bd95a8c53c500272eb8a269a73e6de6d8a | [
"Apache-2.0"
] | null | null | null | defmodule Helios.Pipeline.Test do
@moduledoc false
defmacro __using__(_) do
quote do
import Helios.Pipeline.Test
import Helios.Context
end
end
alias Helios.Context
@spec ctx(atom(), binary(), map()) :: Context.t()
def ctx(method, path, params \\ %{}) do
Helios.Pipeline.Adapter.Test... | 24.711538 | 84 | 0.627237 |
62e40ba1f1d348b697a8488c11d29f41a3b2ec27 | 12,097 | ex | Elixir | lib/mix/lib/mix/deps.ex | MSch/elixir | fc42dc9bb76ec1fdcfcbdbfb11fea6a845a62fca | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/deps.ex | MSch/elixir | fc42dc9bb76ec1fdcfcbdbfb11fea6a845a62fca | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/deps.ex | MSch/elixir | fc42dc9bb76ec1fdcfcbdbfb11fea6a845a62fca | [
"Apache-2.0"
] | null | null | null | defrecord Mix.Dep, [ scm: nil, app: nil, requirement: nil, status: nil, opts: nil,
deps: [], source: nil, manager: nil, from: nil ] do
@moduledoc """
This is a record that keeps information about your project
dependencies. It contains:
* `scm` - a module representing the source code manage... | 31.750656 | 107 | 0.648012 |
62e41a626f42a41b7b82296b78284e1e71548d7b | 8,465 | exs | Elixir | apps/stops/test/api_test.exs | noisecapella/dotcom | d5ef869412102d2230fac3dcc216f01a29726227 | [
"MIT"
] | 42 | 2019-05-29T16:05:30.000Z | 2021-08-09T16:03:37.000Z | apps/stops/test/api_test.exs | noisecapella/dotcom | d5ef869412102d2230fac3dcc216f01a29726227 | [
"MIT"
] | 872 | 2019-05-29T17:55:50.000Z | 2022-03-30T09:28:43.000Z | apps/stops/test/api_test.exs | noisecapella/dotcom | d5ef869412102d2230fac3dcc216f01a29726227 | [
"MIT"
] | 12 | 2019-07-01T18:33:21.000Z | 2022-03-10T02:13:57.000Z | defmodule Stops.ApiTest do
use ExUnit.Case
import Stops.Api
alias Stops.Stop
use ExVCRHelpers
describe "by_gtfs_id/1" do
test "uses the gtfs ID to find a stop" do
{:ok, stop} = by_gtfs_id("place-NHRML-0127")
assert stop.id == "place-NHRML-0127"
assert stop.name == "Anderson/Woburn"
... | 33.196078 | 89 | 0.5101 |
62e41cdaf88abeb6042527bec07717d8716dae9a | 3,139 | ex | Elixir | clients/vision/lib/google_api/vision/v1/model/product_search_params.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/vision/lib/google_api/vision/v1/model/product_search_params.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/vision/lib/google_api/vision/v1/model/product_search_params.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... | 56.053571 | 559 | 0.729532 |
62e4242d02e8fe0f6e5a1b4bc8debddcf5a67fff | 93,637 | ex | Elixir | clients/cloud_iot/lib/google_api/cloud_iot/v1/api/projects.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/cloud_iot/lib/google_api/cloud_iot/v1/api/projects.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/cloud_iot/lib/google_api/cloud_iot/v1/api/projects.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 ... | 46.400892 | 196 | 0.620449 |
62e441b37e0e7cf852e5b2712520d56839975e80 | 1,404 | ex | Elixir | test/support/data_case.ex | caironoleto/futibas | 5e827211ed91621ce5fe1fe99829f567bc7acb20 | [
"MIT"
] | null | null | null | test/support/data_case.ex | caironoleto/futibas | 5e827211ed91621ce5fe1fe99829f567bc7acb20 | [
"MIT"
] | null | null | null | test/support/data_case.ex | caironoleto/futibas | 5e827211ed91621ce5fe1fe99829f567bc7acb20 | [
"MIT"
] | null | null | null | defmodule Futibas.DataCase do
@moduledoc """
This module defines the setup for tests requiring
access to the application's data layer.
You may define functions here to be used as helpers in
your tests.
Finally, if the test case interacts with the database,
it cannot be async. For this reason, every test... | 26 | 77 | 0.679487 |
62e44c115d8dac3998f866f0730634f06c56be2b | 10,815 | exs | Elixir | test/ecto/query/subquery_test.exs | jccf091/ecto | 42d47a6da0711f842e1a0e6724a89b318b9b2144 | [
"Apache-2.0"
] | null | null | null | test/ecto/query/subquery_test.exs | jccf091/ecto | 42d47a6da0711f842e1a0e6724a89b318b9b2144 | [
"Apache-2.0"
] | null | null | null | test/ecto/query/subquery_test.exs | jccf091/ecto | 42d47a6da0711f842e1a0e6724a89b318b9b2144 | [
"Apache-2.0"
] | null | null | null | Code.require_file "../../../integration_test/support/types.exs", __DIR__
defmodule Ecto.Query.SubqueryTest do
use ExUnit.Case, async: true
import Ecto.Query
alias Ecto.Query.Planner
alias Ecto.Query.JoinExpr
defmodule Comment do
use Ecto.Schema
schema "comments" do
field :text, :string
... | 38.215548 | 116 | 0.601294 |
62e46a765a4db3b0686472d53f117648df569ccd | 352 | exs | Elixir | priv/repo/migrations/20200723210155_add_users_token_ver_column.exs | WOCyo/policr-mini | 23e5e9f927d083cba5993f39e9f122e3a0ad1be2 | [
"MIT"
] | 487 | 2020-06-08T03:04:21.000Z | 2022-03-31T14:51:36.000Z | priv/repo/migrations/20200723210155_add_users_token_ver_column.exs | WOCyo/policr-mini | 23e5e9f927d083cba5993f39e9f122e3a0ad1be2 | [
"MIT"
] | 141 | 2020-06-11T01:03:29.000Z | 2022-03-30T20:23:32.000Z | priv/repo/migrations/20200723210155_add_users_token_ver_column.exs | WOCyo/policr-mini | 23e5e9f927d083cba5993f39e9f122e3a0ad1be2 | [
"MIT"
] | 61 | 2020-06-10T05:25:03.000Z | 2022-03-23T15:54:26.000Z | defmodule PolicrMini.Repo.Migrations.AddUsersTokenVerColumn do
use PolicrMini.Migration
def up do
alter table("users") do
add :token_ver, :integer, comment: "令牌版本"
end
flush()
PolicrMini.Repo.update_all("users", set: [token_ver: 0])
end
def down do
alter table("users") do
remo... | 18.526316 | 62 | 0.670455 |
62e4a404b1e1f23eb2449eb9ab4d647663d06374 | 491 | exs | Elixir | .iex.exs | marcelotto/rdf-ex | 12adce69eb2dbff027cbc83aaaf912067aea1b02 | [
"MIT"
] | 53 | 2017-06-25T22:20:44.000Z | 2020-04-27T17:27:51.000Z | .iex.exs | marcelotto/rdf-ex | 12adce69eb2dbff027cbc83aaaf912067aea1b02 | [
"MIT"
] | 7 | 2017-06-25T00:29:11.000Z | 2020-03-11T00:23:47.000Z | .iex.exs | marcelotto/rdf-ex | 12adce69eb2dbff027cbc83aaaf912067aea1b02 | [
"MIT"
] | 2 | 2018-01-19T15:48:27.000Z | 2020-03-01T00:29:35.000Z | import RDF.Sigils
import RDF.Guards
require RDF.Graph
alias RDF.NS
alias RDF.NS.{RDFS, OWL, SKOS}
alias RDF.{
Term,
IRI,
BlankNode,
Literal,
XSD,
Triple,
Quad,
Statement,
Description,
Graph,
Dataset,
PrefixMap,
PropertyMap
}
alias RDF.BlankNode, as: BNode
alias RDF.{NTriples, NQuads, T... | 12.275 | 72 | 0.694501 |
62e4ab6ecefa2ed64b4a1337004dc7617d4f11c8 | 36,241 | ex | Elixir | lib/phoenix_live_view/engine.ex | tmjoen/phoenix_live_view | 20feab3ebbcc61ca78f5db53d57bde28654e7dd5 | [
"MIT"
] | null | null | null | lib/phoenix_live_view/engine.ex | tmjoen/phoenix_live_view | 20feab3ebbcc61ca78f5db53d57bde28654e7dd5 | [
"MIT"
] | null | null | null | lib/phoenix_live_view/engine.ex | tmjoen/phoenix_live_view | 20feab3ebbcc61ca78f5db53d57bde28654e7dd5 | [
"MIT"
] | null | null | null | defmodule Phoenix.LiveView.Component do
@moduledoc """
The struct returned by components in .heex templates.
This component is never meant to be output directly
into the template. It should always be handled by
the diffing algorithm.
"""
defstruct [:id, :component, :assigns]
@type t :: %__MODULE__{
... | 31.081475 | 100 | 0.626169 |
62e4cac483e6fce03608d3faf182c17921fb21b1 | 1,234 | ex | Elixir | lib/wonderland/type_class/bifunctor.ex | tkachuk-labs/wonderland | 575cb23fa14b9adba5520b5e608e6029296d7b11 | [
"MIT"
] | 14 | 2020-03-09T22:43:01.000Z | 2021-01-20T01:50:00.000Z | lib/wonderland/type_class/bifunctor.ex | 21it/wonderland | 575cb23fa14b9adba5520b5e608e6029296d7b11 | [
"MIT"
] | 1 | 2020-04-04T15:06:42.000Z | 2020-04-10T18:13:25.000Z | lib/wonderland/type_class/bifunctor.ex | 21it/wonderland | 575cb23fa14b9adba5520b5e608e6029296d7b11 | [
"MIT"
] | null | null | null | defmodule Wonderland.TypeClass.Bifunctor do
import Wonderland.TypeClass
define_using()
@typep a :: term
@typep b :: term
@typep c :: term
@typep d :: term
@type t(x, y) :: __MODULE__.t(x, y)
@callback bifunctor_bimap((a -> b), (c -> d), t(a, c)) :: t(b, d)
defmacro bimap(f, g, x) do
quote locat... | 19.28125 | 67 | 0.588331 |
62e52486b84cadf422886c00cb134dcd5f006431 | 1,416 | ex | Elixir | test/support/data_case.ex | floriank/react_relay_kitten_uploader | 1b8988bdf9fe01a263dc59097652ddb2c50520f6 | [
"MIT"
] | 3 | 2020-02-25T16:49:06.000Z | 2020-04-24T03:14:11.000Z | test/support/data_case.ex | floriank/react_relay_kitten_uploader | 1b8988bdf9fe01a263dc59097652ddb2c50520f6 | [
"MIT"
] | 3 | 2021-03-09T03:17:50.000Z | 2021-09-01T04:37:12.000Z | test/support/data_case.ex | floriank/react_relay_kitten_uploader | 1b8988bdf9fe01a263dc59097652ddb2c50520f6 | [
"MIT"
] | 2 | 2019-05-06T08:27:54.000Z | 2021-10-05T20:33:30.000Z | defmodule KittenGraphql.DataCase do
@moduledoc """
This module defines the setup for tests requiring
access to the application's data layer.
You may define functions here to be used as helpers in
your tests.
Finally, if the test case interacts with the database,
it cannot be async. For this reason, ever... | 26.222222 | 77 | 0.687147 |
62e5427f98734f5bc0ae53ed11e2558258587743 | 1,555 | ex | Elixir | lib/cv_creator_web/views/error_helpers.ex | Foxlabsdevelopers/cv_creator | c77d52cdc67180ed369a3dbd298ca2dea5131c60 | [
"MIT"
] | null | null | null | lib/cv_creator_web/views/error_helpers.ex | Foxlabsdevelopers/cv_creator | c77d52cdc67180ed369a3dbd298ca2dea5131c60 | [
"MIT"
] | 2 | 2021-05-24T21:41:25.000Z | 2021-05-25T16:02:09.000Z | lib/cv_creator_web/views/error_helpers.ex | Foxlabsdevelopers/cv_creator | c77d52cdc67180ed369a3dbd298ca2dea5131c60 | [
"MIT"
] | null | null | null | defmodule CvCreatorWeb.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
Enum.map(Keyword.get_values(form.errors, field), fn error ->
content_ta... | 32.395833 | 78 | 0.666881 |
62e559cf6b4e1bd969e10d0a50d405f29a22d131 | 278 | ex | Elixir | apps/configure/lib/configure/own_hotspot.ex | paulanthonywilson/mcam | df9c5aaae00b568749dff22613636f5cb92f905a | [
"MIT"
] | null | null | null | apps/configure/lib/configure/own_hotspot.ex | paulanthonywilson/mcam | df9c5aaae00b568749dff22613636f5cb92f905a | [
"MIT"
] | 8 | 2020-11-16T09:59:12.000Z | 2020-11-16T10:13:07.000Z | apps/configure/lib/configure/own_hotspot.ex | paulanthonywilson/mcam | df9c5aaae00b568749dff22613636f5cb92f905a | [
"MIT"
] | null | null | null | defmodule Configure.OwnHotspot do
@moduledoc """
Runs the Wifi wizard, turning the board into a hot spot
for the duration.
"""
def start do
if function_exported?(VintageNetWizard, :run_wizard, 0) do
apply(VintageNetWizard, :run_wizard, [])
end
end
end
| 23.166667 | 62 | 0.701439 |
62e55bfec1ee949baad22c7ac8a943d051f27d50 | 539 | ex | Elixir | lib/members/member.ex | ftenario/members | 3de1ecc46a93053fa30f7e6845aee05352c9b03e | [
"MIT"
] | null | null | null | lib/members/member.ex | ftenario/members | 3de1ecc46a93053fa30f7e6845aee05352c9b03e | [
"MIT"
] | null | null | null | lib/members/member.ex | ftenario/members | 3de1ecc46a93053fa30f7e6845aee05352c9b03e | [
"MIT"
] | null | null | null | defmodule Members.Member do
use Ecto.Schema
schema "member" do
field :member_id, :string
field :first_name, :string
field :last_name, :string
field :birthdate, Timex.Ecto.Date
field :gender, :string
timestamps()
end
def changeset(member, params \\ %{}) ... | 26.95 | 98 | 0.6141 |
62e562d8fe820c93ef32cde0a459ca1303b54efd | 411 | exs | Elixir | test/models/race_boat_test.exs | openrowing/raceman2 | eee2d51c50bddf63b9c5b9b351424d4c056fa27d | [
"Apache-2.0"
] | null | null | null | test/models/race_boat_test.exs | openrowing/raceman2 | eee2d51c50bddf63b9c5b9b351424d4c056fa27d | [
"Apache-2.0"
] | null | null | null | test/models/race_boat_test.exs | openrowing/raceman2 | eee2d51c50bddf63b9c5b9b351424d4c056fa27d | [
"Apache-2.0"
] | null | null | null | defmodule Web.RaceBoatTest do
use Web.ModelCase
alias Web.RaceBoat
@valid_attrs %{lane: 42}
@invalid_attrs %{}
test "changeset with valid attributes" do
changeset = RaceBoat.changeset(%RaceBoat{}, @valid_attrs)
assert changeset.valid?
end
test "changeset with invalid attributes" do
changes... | 21.631579 | 63 | 0.725061 |
62e56d134c07b14bd1c219182f75fb4f0d965160 | 1,608 | ex | Elixir | clients/jobs/lib/google_api/jobs/v3/model/spelling_correction.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/jobs/lib/google_api/jobs/v3/model/spelling_correction.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/jobs/lib/google_api/jobs/v3/model/spelling_correction.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 32.16 | 124 | 0.72699 |
62e579f881ab6644d484a2f607545ad04ed8871f | 13,762 | exs | Elixir | test/alter_test.exs | ivan/postgrex | dd377695fbe469bc3823116b9e4e8f498996b9a3 | [
"Apache-2.0"
] | null | null | null | test/alter_test.exs | ivan/postgrex | dd377695fbe469bc3823116b9e4e8f498996b9a3 | [
"Apache-2.0"
] | null | null | null | test/alter_test.exs | ivan/postgrex | dd377695fbe469bc3823116b9e4e8f498996b9a3 | [
"Apache-2.0"
] | null | null | null | defmodule AlterTest do
use ExUnit.Case, async: false
import Postgrex.TestHelper
@moduletag :capture_log
@moduletag min_crdb_version: nil
setup context do
options = [database: "postgrex_test", backoff_type: :stop,
prepare: context[:prepare] || :named]
reset = fn() ->
{:ok, pid} ... | 39.096591 | 113 | 0.646272 |
62e581d7f07762f3327a4556aa84c9ec4d9825a2 | 1,844 | ex | Elixir | clients/classroom/lib/google_api/classroom/v1/model/list_announcements_response.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/list_announcements_response.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/list_announcements_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... | 36.88 | 160 | 0.742408 |
62e5a8aa2d2f76893fbda156647289808659921c | 562 | ex | Elixir | create_fun_umbrella/apps/create_fun_api/lib/create_fun_api/views/error_view.ex | Vorzious/CreateFun | 5744c913ef706bc29062fa90a8ec5de12d267dab | [
"MIT"
] | null | null | null | create_fun_umbrella/apps/create_fun_api/lib/create_fun_api/views/error_view.ex | Vorzious/CreateFun | 5744c913ef706bc29062fa90a8ec5de12d267dab | [
"MIT"
] | 9 | 2018-06-17T09:54:03.000Z | 2018-06-17T09:55:20.000Z | create_fun_umbrella/apps/create_fun_api/lib/create_fun_api/views/error_view.ex | Vorzious/CreateFun | 5744c913ef706bc29062fa90a8ec5de12d267dab | [
"MIT"
] | 1 | 2018-06-05T18:38:01.000Z | 2018-06-05T18:38:01.000Z | defmodule CreateFunApi.ErrorView do
use CreateFunApi, :view
def render("404.json", _assigns) do
%{errors: %{detail: "Page not found"}}
end
def render("404.html", _assigns) do
"Page not found"
end
def render("500.json", _assigns) do
%{errors: %{detail: "Internal server error"}}
end
def rend... | 22.48 | 49 | 0.677936 |
62e5ab2c541bbb96338689fdf2c2c20a7a9d81df | 563 | ex | Elixir | lib/spender_web/controllers/fallback_controller.ex | LittleKidogo/Budgetinization | eae6dd62208ec7fb43c8c212f40611f8635205d5 | [
"MIT"
] | 2 | 2018-02-27T06:29:59.000Z | 2018-06-09T16:53:49.000Z | lib/spender_web/controllers/fallback_controller.ex | LittleKidogo/Budgetinization | eae6dd62208ec7fb43c8c212f40611f8635205d5 | [
"MIT"
] | 94 | 2018-02-22T06:03:19.000Z | 2018-06-28T14:30:31.000Z | lib/spender_web/controllers/fallback_controller.ex | LittleKidogo/Budgetinization | eae6dd62208ec7fb43c8c212f40611f8635205d5 | [
"MIT"
] | 1 | 2020-03-04T19:41:06.000Z | 2020-03-04T19:41:06.000Z | defmodule SpenderWeb.FallbackController do
@moduledoc """
Translates controller action results into valid `Plug.Conn` responses.
See `Phoenix.Controller.action_fallback/1` for more details.
"""
use SpenderWeb, :controller
def call(conn, {:error, %Ecto.Changeset{} = changeset}) do
conn
|> put_statu... | 26.809524 | 75 | 0.705151 |
62e5ed89feeff2a7a86994e5150fe0793e89236f | 3,258 | ex | Elixir | clients/dfa_reporting/lib/google_api/dfa_reporting/v35/model/path_to_conversion_report_compatible_fields.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/dfa_reporting/lib/google_api/dfa_reporting/v35/model/path_to_conversion_report_compatible_fields.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/dfa_reporting/lib/google_api/dfa_reporting/v35/model/path_to_conversion_report_compatible_fields.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... | 52.548387 | 238 | 0.751074 |
62e5f26846457c3d7751707647517fdd5d7bde42 | 1,062 | ex | Elixir | web/channels/push_change_channel.ex | mukilarasan101/todos-backend | b7b3e00aa17bb117ea031dd0cba1d14d3d298159 | [
"MIT"
] | null | null | null | web/channels/push_change_channel.ex | mukilarasan101/todos-backend | b7b3e00aa17bb117ea031dd0cba1d14d3d298159 | [
"MIT"
] | null | null | null | web/channels/push_change_channel.ex | mukilarasan101/todos-backend | b7b3e00aa17bb117ea031dd0cba1d14d3d298159 | [
"MIT"
] | null | null | null | defmodule Todo.PushChangeChannel do
use Todo.Web, :channel
def join("pushchanges:"<> lobby, payload, socket) do
if authorized?(payload) do
{:ok, socket}
else
{:error, %{reason: "unauthorized"}}
end
end
# Channels can be used in a request/response fashion
# by sending replies to reque... | 27.947368 | 67 | 0.69774 |
62e63f94ea5f53186b4006e4f0dd723644f1e873 | 1,513 | ex | Elixir | clients/spanner/lib/google_api/spanner/v1/model/get_database_ddl_response.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/spanner/lib/google_api/spanner/v1/model/get_database_ddl_response.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/spanner/lib/google_api/spanner/v1/model/get_database_ddl_response.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 32.191489 | 162 | 0.743556 |
62e64b10753112244e1a88961c5962a0f0f9c03c | 300 | ex | Elixir | lib/threehundred60/categories/category.ex | nesimtunc/ThreeHundred60 | 1dd8465b44f037ecf7d43be9ebd99b9eadcee6af | [
"MIT"
] | 13 | 2020-06-03T08:17:45.000Z | 2021-03-11T04:37:52.000Z | lib/threehundred60/categories/category.ex | nesimtunc/ThreeHundred60 | 1dd8465b44f037ecf7d43be9ebd99b9eadcee6af | [
"MIT"
] | null | null | null | lib/threehundred60/categories/category.ex | nesimtunc/ThreeHundred60 | 1dd8465b44f037ecf7d43be9ebd99b9eadcee6af | [
"MIT"
] | 1 | 2020-06-26T16:53:14.000Z | 2020-06-26T16:53:14.000Z | defmodule Threehundred60.Categories.Category do
use Ecto.Schema
import Ecto.Changeset
schema "categories" do
field :name, :string
timestamps()
end
@doc false
def changeset(category, attrs) do
category
|> cast(attrs, [:name])
|> validate_required([:name])
end
end
| 16.666667 | 47 | 0.68 |
62e672c5bf562738854e188796dfc6df223599b6 | 1,616 | ex | Elixir | clients/tool_results/lib/google_api/tool_results/v1/model/pending_google_update_insight.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/tool_results/lib/google_api/tool_results/v1/model/pending_google_update_insight.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/tool_results/lib/google_api/tool_results/v1/model/pending_google_update_insight.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 33.666667 | 141 | 0.755569 |
62e6735bd709c8a80956fee802ef47dc0beb1511 | 2,806 | exs | Elixir | test/myxql/sync_test.exs | chulkilee/myxql | dc6ad092ff8dc6849ee7e2546083df33dfd07758 | [
"Apache-2.0"
] | 230 | 2018-08-27T11:07:46.000Z | 2022-02-19T17:39:16.000Z | test/myxql/sync_test.exs | chulkilee/myxql | dc6ad092ff8dc6849ee7e2546083df33dfd07758 | [
"Apache-2.0"
] | 138 | 2018-10-08T00:38:33.000Z | 2022-03-15T09:02:25.000Z | test/myxql/sync_test.exs | chulkilee/myxql | dc6ad092ff8dc6849ee7e2546083df33dfd07758 | [
"Apache-2.0"
] | 54 | 2018-09-10T21:27:18.000Z | 2022-03-15T13:46:36.000Z | # used for tests that affect global state
defmodule MyXQL.SyncTest do
use ExUnit.Case
@opts TestHelper.opts()
test "do not leak statements with :cache_statement and prepare: :unnamed" do
{:ok, conn} = MyXQL.start_link(@opts ++ [prepare: :unnamed])
assert prepared_stmt_count() == 0
MyXQL.query!(conn... | 32.252874 | 94 | 0.652887 |
62e68333abf966e9ad3cb54ef48182e1221110ed | 1,618 | exs | Elixir | apps/ewallet_db/priv/repo/migrations/20180612115524_remove_encryption_version.exs | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 322 | 2018-02-28T07:38:44.000Z | 2020-05-27T23:09:55.000Z | apps/ewallet_db/priv/repo/migrations/20180612115524_remove_encryption_version.exs | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 643 | 2018-02-28T12:05:20.000Z | 2020-05-22T08:34:38.000Z | apps/ewallet_db/priv/repo/migrations/20180612115524_remove_encryption_version.exs | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 63 | 2018-02-28T10:57:06.000Z | 2020-05-27T23:10:38.000Z | # Copyright 2018-2019 OmiseGO Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 29.962963 | 74 | 0.770087 |
62e69d0fa6b4cf7e5f6cf6f742f607f3832c1180 | 6,652 | ex | Elixir | lib/jhn_elixir/gen_supervisor.ex | JanHenryNystrom/jhn_elixir | 4feebf6f0f24829965515cdd9a160f3a3695cb7f | [
"Apache-2.0"
] | null | null | null | lib/jhn_elixir/gen_supervisor.ex | JanHenryNystrom/jhn_elixir | 4feebf6f0f24829965515cdd9a160f3a3695cb7f | [
"Apache-2.0"
] | null | null | null | lib/jhn_elixir/gen_supervisor.ex | JanHenryNystrom/jhn_elixir | 4feebf6f0f24829965515cdd9a160f3a3695cb7f | [
"Apache-2.0"
] | null | null | null | ##==============================================================================
## Copyright 2020 Jan Henry Nystrom <JanHenryNystrom@gmail.com>
##
## 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 Licen... | 29.048035 | 80 | 0.521648 |
62e6ac4dbc5e0b1e05b0c66de1dedb7c0ce84b45 | 66 | exs | Elixir | test/test_helper.exs | luca-apostoli/ruru-chat | d6c62000b78592f03cf56f63acd23a6404df1924 | [
"MIT"
] | 1 | 2017-04-22T12:36:19.000Z | 2017-04-22T12:36:19.000Z | test/test_helper.exs | luca-apostoli/ruru-chat | d6c62000b78592f03cf56f63acd23a6404df1924 | [
"MIT"
] | null | null | null | test/test_helper.exs | luca-apostoli/ruru-chat | d6c62000b78592f03cf56f63acd23a6404df1924 | [
"MIT"
] | null | null | null | ExUnit.start
Ecto.Adapters.SQL.Sandbox.mode(Ruru.Repo, :manual)
| 13.2 | 50 | 0.772727 |
62e6ffc91b37aff192f80e6af0d46a15a3c74b4c | 2,865 | ex | Elixir | clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_recaptcha_enterprise_config.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_recaptcha_enterprise_config.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_recaptcha_enterprise_config.ex | dazuma/elixir-google-api | 6a9897168008efe07a6081d2326735fe332e522c | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 47.75 | 484 | 0.754276 |
62e708b63bdc255aa5148e4fcf0d2c9de449ad7e | 1,628 | ex | Elixir | lib/history/lending_rate_history_jobs.ex | fremantle-industries/history | a8a33744279ff4ca62620785f9a2e9c0c99e4de7 | [
"MIT"
] | 20 | 2021-08-06T01:09:48.000Z | 2022-03-28T18:44:56.000Z | lib/history/lending_rate_history_jobs.ex | fremantle-industries/history | a8a33744279ff4ca62620785f9a2e9c0c99e4de7 | [
"MIT"
] | 13 | 2021-08-21T21:17:02.000Z | 2022-03-27T06:33:51.000Z | lib/history/lending_rate_history_jobs.ex | fremantle-industries/history | a8a33744279ff4ca62620785f9a2e9c0c99e4de7 | [
"MIT"
] | 2 | 2021-09-23T11:31:59.000Z | 2022-01-09T16:19:35.000Z | defmodule History.LendingRateHistoryJobs do
require Ecto.Query
require Indifferent
import Ecto.Query
alias History.Repo
alias History.LendingRates.LendingRateHistoryJob, as: Job
@spec get!(Job.id()) :: Job.t()
def get!(id) do
Repo.get!(Job, id)
end
@default_latest_page 1
@default_latest_page_s... | 21.421053 | 82 | 0.621007 |
62e70e852558b6256091a07eecb3e1518af19325 | 2,513 | ex | Elixir | lib/coinbase_commerce/checkout.ex | allenan/coinbase_commerce | cbd97484fe559b47cc62d6bf068094942d8e0d86 | [
"MIT"
] | 4 | 2018-08-13T20:41:37.000Z | 2021-11-11T04:58:58.000Z | lib/coinbase_commerce/checkout.ex | allenan/coinbase_commerce | cbd97484fe559b47cc62d6bf068094942d8e0d86 | [
"MIT"
] | null | null | null | lib/coinbase_commerce/checkout.ex | allenan/coinbase_commerce | cbd97484fe559b47cc62d6bf068094942d8e0d86 | [
"MIT"
] | null | null | null | defmodule CoinbaseCommerce.Checkout do
@moduledoc """
Work with Coinbase Commerce Checkouts
Coinbase Commerce API reference: https://commerce.coinbase.com/docs/api/#checkouts
"""
alias CoinbaseCommerce.Checkout
alias CoinbaseCommerce.Request
defstruct [
:id,
:name,
:description,
:logo_u... | 31.024691 | 91 | 0.640669 |
62e730e1e8f6718b7f8bc1af0e7808a825409f35 | 4,774 | ex | Elixir | lib/new_relic/util.ex | binaryseed/elixir_agent | 25f1242c10516618d9ea3a9b18712e5bc41efad6 | [
"Apache-2.0"
] | null | null | null | lib/new_relic/util.ex | binaryseed/elixir_agent | 25f1242c10516618d9ea3a9b18712e5bc41efad6 | [
"Apache-2.0"
] | null | null | null | lib/new_relic/util.ex | binaryseed/elixir_agent | 25f1242c10516618d9ea3a9b18712e5bc41efad6 | [
"Apache-2.0"
] | null | null | null | defmodule NewRelic.Util do
@moduledoc false
alias NewRelic.Util.Vendor
def hostname do
maybe_heroku_dyno_hostname() || get_hostname()
end
def pid, do: System.get_pid() |> String.to_integer()
def time_to_ms({megasec, sec, microsec}),
do: (megasec * 1_000_000 + sec) * 1_000 + round(microsec / 1_00... | 25.393617 | 86 | 0.609971 |
62e74ffc6540e14f4dcf1021e1aebc862718719c | 4,498 | exs | Elixir | test/cf_sync/store/table_test.exs | 3h15/CFSync | 0b5024688bcb40786c8313e77385f935686d1bdd | [
"MIT"
] | null | null | null | test/cf_sync/store/table_test.exs | 3h15/CFSync | 0b5024688bcb40786c8313e77385f935686d1bdd | [
"MIT"
] | null | null | null | test/cf_sync/store/table_test.exs | 3h15/CFSync | 0b5024688bcb40786c8313e77385f935686d1bdd | [
"MIT"
] | null | null | null | defmodule CFSync.Store.TableTest do
use ExUnit.Case, async: true
doctest CFSync.Store.Table
alias CFSync.Store.Table
alias CFSync.Entry
alias CFSync.Asset
test "new/1 creates a named ETS table using name param" do
name = Faker.Util.format("%A%4a%A%3a") |> String.to_atom()
reference = Table.new(na... | 29.019355 | 103 | 0.656069 |
62e75e3c66bab2cab5111129cc604df8ea781671 | 3,513 | exs | Elixir | test/oli/activities/parse_utils_test.exs | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | 1 | 2022-03-17T20:35:47.000Z | 2022-03-17T20:35:47.000Z | test/oli/activities/parse_utils_test.exs | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | 9 | 2021-11-02T16:52:09.000Z | 2022-03-25T15:14:01.000Z | test/oli/activities/parse_utils_test.exs | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | null | null | null | defmodule Oli.Activities.ParseUtilsTest do
use ExUnit.Case, async: true
alias Oli.Activities.ParseUtils
test "items_or_errors/1 handles empty list" do
assert {:ok, []} == ParseUtils.items_or_errors([])
end
test "items_or_errors/1 handles all oks" do
assert {:ok, [1, 2, 3]} =
ParseUtils... | 20.074286 | 71 | 0.360945 |
62e768496fb4eca1c4bfe29b37b80958c1efbfb3 | 14,377 | ex | Elixir | lib/prom_ex/plugins/broadway.ex | lucazulian/prom_ex | b87e77f2e0fcfb132f8d19046d2a42d51954ce77 | [
"MIT"
] | 1 | 2022-02-20T10:42:44.000Z | 2022-02-20T10:42:44.000Z | lib/prom_ex/plugins/broadway.ex | lucazulian/prom_ex | b87e77f2e0fcfb132f8d19046d2a42d51954ce77 | [
"MIT"
] | null | null | null | lib/prom_ex/plugins/broadway.ex | lucazulian/prom_ex | b87e77f2e0fcfb132f8d19046d2a42d51954ce77 | [
"MIT"
] | null | null | null | if Code.ensure_loaded?(Broadway) do
defmodule PromEx.Plugins.Broadway do
@moduledoc """
This plugin captures metrics emitted by Broadway.
This plugin exposes the following metric groups:
- `:broadway_init_event_metrics`
- `:broadway_message_event_metrics`
- `:broadway_batch_event_metrics`
... | 35.763682 | 119 | 0.611811 |
62e78e593850df740cc473f3ddeaa48c066a0482 | 1,248 | ex | Elixir | apps/artemis/lib/artemis/helpers/search.ex | artemis-platform/artemis_dashboard | 5ab3f5ac4c5255478bbebf76f0e43b44992e3cab | [
"MIT"
] | 9 | 2019-08-19T19:56:34.000Z | 2022-03-22T17:56:38.000Z | apps/artemis/lib/artemis/helpers/search.ex | chrislaskey/artemis_teams | 9930c3d9528e37b76f0525390e32b66eed7eadde | [
"MIT"
] | 7 | 2019-07-12T21:41:01.000Z | 2020-08-17T21:29:22.000Z | apps/artemis/lib/artemis/helpers/search.ex | chrislaskey/artemis_teams | 9930c3d9528e37b76f0525390e32b66eed7eadde | [
"MIT"
] | 2 | 2019-07-05T22:51:47.000Z | 2019-08-19T19:56:37.000Z | defmodule Artemis.Helpers.Search do
import Artemis.Helpers
import Ecto.Query
@doc """
Example Usage:
where(ecto_query, [table], fragment("? @@ ?", table.tsv_search, to_tsquery(^value)))
"""
defmacro to_tsquery(query) do
quote do
fragment("to_tsquery('english', ?)", unquote(query))
end
end... | 24.96 | 88 | 0.652244 |
62e7a0b279e68c019e46046bc5522397c5128acd | 6,832 | ex | Elixir | lib/nostrum/cache/guild/guild_server.ex | defnorep/nostrum | daf869afc0f98fd132460296a2c999fea033fd63 | [
"MIT"
] | null | null | null | lib/nostrum/cache/guild/guild_server.ex | defnorep/nostrum | daf869afc0f98fd132460296a2c999fea033fd63 | [
"MIT"
] | null | null | null | lib/nostrum/cache/guild/guild_server.ex | defnorep/nostrum | daf869afc0f98fd132460296a2c999fea033fd63 | [
"MIT"
] | null | null | null | defmodule Nostrum.Cache.Guild.GuildServer do
@moduledoc false
use GenServer, restart: :transient
alias Nostrum.Cache.Guild.GuildRegister
alias Nostrum.Struct.{Channel, Guild}
alias Nostrum.Struct.Guild.{Member, Role}
alias Nostrum.Util
require Logger
@doc false
# REVIEW: If a guild server crashes,... | 28.705882 | 100 | 0.63305 |
62e7b41420dbf6b4a18c9c401ec1c40213d20271 | 407 | exs | Elixir | test/juice/expression_test.exs | rupurt/juice | 5bb77b55b288f5dd244046a19479815bac8d54e6 | [
"MIT"
] | 24 | 2018-05-10T19:56:14.000Z | 2022-02-16T19:10:57.000Z | test/juice/expression_test.exs | rupurt/juice | 5bb77b55b288f5dd244046a19479815bac8d54e6 | [
"MIT"
] | 2 | 2021-03-27T02:23:46.000Z | 2021-04-06T16:45:53.000Z | test/juice/expression_test.exs | rupurt/juice | 5bb77b55b288f5dd244046a19479815bac8d54e6 | [
"MIT"
] | 2 | 2018-07-01T13:41:21.000Z | 2021-03-25T10:09:10.000Z | defmodule Juice.ExpressionTest do
use ExUnit.Case, async: true
doctest Juice.Expression
test "builds a list" do
assert Juice.Expression.parse("") == []
assert Juice.Expression.parse("* citrus citrus.lemons -citrus.oranges") == [
{:+, ["*"]},
{:+, ["citrus"]},
{:+, ... | 25.4375 | 80 | 0.518428 |
62e7c91c6e919eb413f8f82a6641ebc8cd99cec2 | 13,104 | ex | Elixir | lib/modbus/packet.ex | egillet/ex_modbus | 8516b8be855ebd2dfdc3234103faf1f183fd395f | [
"MIT"
] | null | null | null | lib/modbus/packet.ex | egillet/ex_modbus | 8516b8be855ebd2dfdc3234103faf1f183fd395f | [
"MIT"
] | null | null | null | lib/modbus/packet.ex | egillet/ex_modbus | 8516b8be855ebd2dfdc3234103faf1f183fd395f | [
"MIT"
] | null | null | null | defmodule Modbus.Packet do
@moduledoc """
Handle Modbus packet creation and parsing.
"""
# Function Codes
@read_coils 0x01
@read_coils_exception 0x81
@read_discrete_inputs 0x02
@read_discrete_inputs_exception 0x82
@read_holding_registers ... | 34.944 | 136 | 0.693529 |
62e7f52e5a3e333f35f8488529aa46c84224b15b | 200 | ex | Elixir | testData/org/elixir_lang/parser_definition/anonymous_function_parsing_test_case/KernelTypespecRegression.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/parser_definition/anonymous_function_parsing_test_case/KernelTypespecRegression.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/parser_definition/anonymous_function_parsing_test_case/KernelTypespecRegression.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 145 | 2015-01-15T11:37:16.000Z | 2021-12-22T05:51:02.000Z | fn
# OTP 18
{:type, _, :map_field_assoc, [k, v]} ->
{typespec_to_ast(k), typespec_to_ast(v)}
# OTP 17
{:type, _, :map_field_assoc, k, v} ->
{typespec_to_ast(k), typespec_to_ast(v)}
end | 25 | 44 | 0.615 |
62e7f5dbcb99f5e857fab1a2f0096a1cddfacc36 | 126 | exs | Elixir | test/kraken_client_test.exs | catuss-a/kraken_client | 185053d45daea9ef351e14d6a5254099e5e3ac03 | [
"MIT"
] | null | null | null | test/kraken_client_test.exs | catuss-a/kraken_client | 185053d45daea9ef351e14d6a5254099e5e3ac03 | [
"MIT"
] | null | null | null | test/kraken_client_test.exs | catuss-a/kraken_client | 185053d45daea9ef351e14d6a5254099e5e3ac03 | [
"MIT"
] | null | null | null | defmodule KrakenClientTest do
use ExUnit.Case
doctest KrakenClient
test "the truth" do
assert 1 + 1 == 2
end
end
| 14 | 29 | 0.698413 |
62e81ead13daa3d249a27a2853e9377144273b7b | 594 | exs | Elixir | apps/omg_bus/test/test_helper.exs | PinkDiamond1/elixir-omg | 70dfd24a0a1ddf5d1d9d71aab61ea25300f889f7 | [
"Apache-2.0"
] | 1 | 2020-05-01T12:30:09.000Z | 2020-05-01T12:30:09.000Z | apps/omg_bus/test/test_helper.exs | PinkDiamond1/elixir-omg | 70dfd24a0a1ddf5d1d9d71aab61ea25300f889f7 | [
"Apache-2.0"
] | null | null | null | apps/omg_bus/test/test_helper.exs | PinkDiamond1/elixir-omg | 70dfd24a0a1ddf5d1d9d71aab61ea25300f889f7 | [
"Apache-2.0"
] | 1 | 2021-12-04T00:37:46.000Z | 2021-12-04T00:37:46.000Z | # Copyright 2019 OmiseGO Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 39.6 | 74 | 0.762626 |
62e81fe5cbf85a5e171fe521446a820f195a15e2 | 2,236 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/target_https_proxy_aggregated_list_warning.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/target_https_proxy_aggregated_list_warning.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/compute/lib/google_api/compute/v1/model/target_https_proxy_aggregated_list_warning.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... | 37.898305 | 198 | 0.729875 |
62e82a670561d47a9e60319318029f6f124f65c7 | 40 | ex | Elixir | lib/owl.ex | kianmeng/owl | 55c0f31438866d79526d1feab44e23728ad88dd6 | [
"Apache-2.0"
] | 123 | 2021-12-15T22:42:04.000Z | 2022-03-30T22:21:29.000Z | lib/owl.ex | kianmeng/owl | 55c0f31438866d79526d1feab44e23728ad88dd6 | [
"Apache-2.0"
] | 2 | 2021-12-16T16:42:24.000Z | 2022-01-25T23:47:17.000Z | lib/owl.ex | kianmeng/owl | 55c0f31438866d79526d1feab44e23728ad88dd6 | [
"Apache-2.0"
] | 1 | 2022-01-25T14:02:40.000Z | 2022-01-25T14:02:40.000Z | defmodule Owl do
@moduledoc false
end
| 10 | 18 | 0.775 |
62e83ca89cb83a39473703f1396ec529cb5dd463 | 1,201 | exs | Elixir | mix.exs | edennis/ex_binance | c57c7633bb2606b585e2348689d1f23fe07ca9fc | [
"MIT"
] | null | null | null | mix.exs | edennis/ex_binance | c57c7633bb2606b585e2348689d1f23fe07ca9fc | [
"MIT"
] | null | null | null | mix.exs | edennis/ex_binance | c57c7633bb2606b585e2348689d1f23fe07ca9fc | [
"MIT"
] | null | null | null | defmodule ExBinance.MixProject do
use Mix.Project
def project do
[
app: :ex_binance,
version: "0.0.5",
elixir: "~> 1.8",
start_permanent: Mix.env() == :prod,
description: description(),
package: package(),
deps: deps(),
test_coverage: [tool: ExCoveralls],
p... | 23.54902 | 77 | 0.531224 |
62e843b5a119820527d1d85e4b00e5b430b14154 | 223 | ex | Elixir | apps/api/lib/api_web/plugs/cache_body_reader.ex | michaeljguarino/forge | 50ee583ecb4aad5dee4ef08fce29a8eaed1a0824 | [
"Apache-2.0"
] | null | null | null | apps/api/lib/api_web/plugs/cache_body_reader.ex | michaeljguarino/forge | 50ee583ecb4aad5dee4ef08fce29a8eaed1a0824 | [
"Apache-2.0"
] | 2 | 2019-12-13T23:55:50.000Z | 2019-12-17T05:49:58.000Z | apps/api/lib/api_web/plugs/cache_body_reader.ex | michaeljguarino/chartmart | a34c949cc29d6a1ab91c04c5e4f797e6f0daabfc | [
"Apache-2.0"
] | null | null | null | defmodule ApiWeb.CacheBodyReader do
def read_body(conn, opts) do
{:ok, body, conn} = Plug.Conn.read_body(conn, opts)
conn = update_in(conn.assigns[:raw_body], &[body | (&1 || [])])
{:ok, body, conn}
end
end
| 27.875 | 67 | 0.636771 |
62e86be4109e3ffa89efda8339f3c0171c3fd9c3 | 6,514 | exs | Elixir | test/lib/bamboo/adapters/mailjet_adapter_test.exs | tonnenpinguin/bamboo_mailjet | 6ee4b4b89cf4c2d6db172957b907f562517433e8 | [
"MIT"
] | null | null | null | test/lib/bamboo/adapters/mailjet_adapter_test.exs | tonnenpinguin/bamboo_mailjet | 6ee4b4b89cf4c2d6db172957b907f562517433e8 | [
"MIT"
] | null | null | null | test/lib/bamboo/adapters/mailjet_adapter_test.exs | tonnenpinguin/bamboo_mailjet | 6ee4b4b89cf4c2d6db172957b907f562517433e8 | [
"MIT"
] | null | null | null | defmodule Bamboo.MailjetAdapterTest do
use ExUnit.Case
alias Bamboo.Email
alias Bamboo.MailjetAdapter
alias Bamboo.MailjetHelper
@config %{adapter: MailjetAdapter, api_key: "123_abc", api_private_key: "321_cba"}
@config_with_no_api_key %{adapter: MailjetAdapter, api_key: nil, api_private_key: "321_cba"}
... | 29.609091 | 95 | 0.628032 |
62e8c24f3d10691dd3c78dfa8d0ab0e7893ba1d0 | 2,649 | ex | Elixir | clients/language/lib/google_api/language/v1/model/document.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/language/lib/google_api/language/v1/model/document.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/language/lib/google_api/language/v1/model/document.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... | 47.303571 | 488 | 0.704417 |
62e8cb65b7ee4f29abec96b2f100acad6322aa48 | 1,866 | exs | Elixir | clients/spanner/mix.exs | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"Apache-2.0"
] | null | null | null | clients/spanner/mix.exs | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"Apache-2.0"
] | null | null | null | clients/spanner/mix.exs | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 27.850746 | 145 | 0.657556 |
62e8d7aa1b692d3d102c3f2ed326c53785542f57 | 1,242 | ex | Elixir | lib/radixir/core/request/submit_transaction.ex | radixir/radixir | 703034330e857bc084b78dd927ec611c3ea54349 | [
"Apache-2.0"
] | 16 | 2022-01-05T20:41:55.000Z | 2022-03-25T09:06:43.000Z | lib/radixir/core/request/submit_transaction.ex | radixir/radixir | 703034330e857bc084b78dd927ec611c3ea54349 | [
"Apache-2.0"
] | null | null | null | lib/radixir/core/request/submit_transaction.ex | radixir/radixir | 703034330e857bc084b78dd927ec611c3ea54349 | [
"Apache-2.0"
] | 1 | 2022-02-10T21:55:26.000Z | 2022-02-10T21:55:26.000Z | defmodule Radixir.Core.Request.SubmitTransaction do
@moduledoc false
# @moduledoc """
# Methods to create each map in `SubmitTransaction` request body.
# """
alias Radixir.StitchPlan
@type stitch_plans :: list(keyword)
@type params :: keyword
@doc """
Generates stitch plan for `network_identifier` m... | 37.636364 | 138 | 0.723833 |
62e916fa5782e9e1f352e32441f0d9a2def523cd | 1,566 | ex | Elixir | clients/dataflow/lib/google_api/dataflow/v1b3/model/job_execution_details.ex | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"Apache-2.0"
] | null | null | null | clients/dataflow/lib/google_api/dataflow/v1b3/model/job_execution_details.ex | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"Apache-2.0"
] | null | null | null | clients/dataflow/lib/google_api/dataflow/v1b3/model/job_execution_details.ex | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 33.319149 | 130 | 0.746488 |
62e93cdfd9aadd9a59c5f68ff8acaed384f9b312 | 273 | exs | Elixir | examples/phoenix_app/config/test.exs | kianmeng/bakeware | 3c008a1c149ccf22cb3924126f2b8f0be522191f | [
"Apache-2.0"
] | 828 | 2020-09-12T18:56:48.000Z | 2022-03-01T22:34:39.000Z | examples/phoenix_app/config/test.exs | kianmeng/bakeware | 3c008a1c149ccf22cb3924126f2b8f0be522191f | [
"Apache-2.0"
] | 54 | 2020-10-23T15:01:10.000Z | 2022-03-22T23:23:15.000Z | examples/phoenix_app/config/test.exs | kianmeng/bakeware | 3c008a1c149ccf22cb3924126f2b8f0be522191f | [
"Apache-2.0"
] | 25 | 2020-09-14T12:01:54.000Z | 2022-02-23T03:30:08.000Z | use Mix.Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :phoenix_app, PhoenixAppWeb.Endpoint,
http: [port: 4002],
server: false
# Print only warnings and errors during test
config :logger, level: :warn
| 24.818182 | 56 | 0.74359 |
62e95b14897cbb16401030b2be4f452171d86741 | 4,628 | ex | Elixir | lib/tortoise311/package/connect.ex | ngenic/tortoise311 | 18aa234c26f0e1d7b3dcac5dad562231346a20ef | [
"Apache-2.0"
] | 2 | 2021-12-23T21:51:31.000Z | 2022-02-20T22:29:24.000Z | lib/tortoise311/package/connect.ex | ngenic/tortoise311 | 18aa234c26f0e1d7b3dcac5dad562231346a20ef | [
"Apache-2.0"
] | 11 | 2021-11-18T01:23:15.000Z | 2022-03-28T18:15:18.000Z | lib/tortoise311/package/connect.ex | ngenic/tortoise311 | 18aa234c26f0e1d7b3dcac5dad562231346a20ef | [
"Apache-2.0"
] | 3 | 2021-11-19T16:23:38.000Z | 2022-03-18T11:36:54.000Z | defmodule Tortoise311.Package.Connect do
@moduledoc false
alias Tortoise311.Package
@opcode 1
@opaque t :: %__MODULE__{
__META__: Package.Meta.t(),
protocol: binary(),
protocol_version: non_neg_integer(),
user_name: binary() | nil,
password: binary(... | 28.392638 | 87 | 0.56828 |
62e9746cd9a17bda944b3054e7de8e89742374f4 | 15,858 | ex | Elixir | clients/you_tube_analytics/lib/google_api/you_tube_analytics/v2/api/groups.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/you_tube_analytics/lib/google_api/you_tube_analytics/v2/api/groups.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/you_tube_analytics/lib/google_api/you_tube_analytics/v2/api/groups.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... | 57.875912 | 732 | 0.666477 |
62e97786d1d704882a73e803d121d8bc3fe28930 | 99 | ex | Elixir | apps/nerves_hub_web_core/lib/nerves_hub_web_core/scheduler.ex | Gazler/nerves_hub_web | 9a636a17310382819eaa6cee590e053cb47f0dcc | [
"Apache-2.0"
] | null | null | null | apps/nerves_hub_web_core/lib/nerves_hub_web_core/scheduler.ex | Gazler/nerves_hub_web | 9a636a17310382819eaa6cee590e053cb47f0dcc | [
"Apache-2.0"
] | null | null | null | apps/nerves_hub_web_core/lib/nerves_hub_web_core/scheduler.ex | Gazler/nerves_hub_web | 9a636a17310382819eaa6cee590e053cb47f0dcc | [
"Apache-2.0"
] | null | null | null | defmodule NervesHubWebCore.Scheduler do
use Quantum.Scheduler, otp_app: :nerves_hub_web_core
end
| 24.75 | 54 | 0.848485 |
62e97d1a8e79bdc9eee55954f7b741d1c7d5653e | 194 | ex | Elixir | lib/phone/pl.ex | net/phone | 18e1356d2f8d32fe3f95638c3c44bceab0164fb2 | [
"Apache-2.0"
] | null | null | null | lib/phone/pl.ex | net/phone | 18e1356d2f8d32fe3f95638c3c44bceab0164fb2 | [
"Apache-2.0"
] | null | null | null | lib/phone/pl.ex | net/phone | 18e1356d2f8d32fe3f95638c3c44bceab0164fb2 | [
"Apache-2.0"
] | null | null | null | defmodule Phone.PL do
@moduledoc false
use Helper.Country
def regex, do: ~r/^(48)()(.+)/
def country, do: "Poland"
def a2, do: "PL"
def a3, do: "POL"
matcher :regex, ["48"]
end
| 14.923077 | 32 | 0.592784 |
62e9b1ae134f7993ab26be9b3711ea851eabf854 | 1,731 | ex | Elixir | lib/auto_api/capabilities/dashboard_lights_capability.ex | nonninz/auto-api-elixir | 53e11542043285e94bbb5a0a3b8ffff0b1b47167 | [
"MIT"
] | null | null | null | lib/auto_api/capabilities/dashboard_lights_capability.ex | nonninz/auto-api-elixir | 53e11542043285e94bbb5a0a3b8ffff0b1b47167 | [
"MIT"
] | null | null | null | lib/auto_api/capabilities/dashboard_lights_capability.ex | nonninz/auto-api-elixir | 53e11542043285e94bbb5a0a3b8ffff0b1b47167 | [
"MIT"
] | null | null | null | # AutoAPI
# The MIT License
#
# Copyright (c) 2018- High-Mobility GmbH (https://high-mobility.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without lim... | 38.466667 | 79 | 0.749856 |
62e9be4eddc760379d9fb69aafceb19097f8258a | 7,964 | ex | Elixir | lib/redix/connector.ex | EvoluxBR/redix | bc90891d76f8a4d77cccd107199e0494d8e78423 | [
"MIT"
] | null | null | null | lib/redix/connector.ex | EvoluxBR/redix | bc90891d76f8a4d77cccd107199e0494d8e78423 | [
"MIT"
] | null | null | null | lib/redix/connector.ex | EvoluxBR/redix | bc90891d76f8a4d77cccd107199e0494d8e78423 | [
"MIT"
] | null | null | null | defmodule Redix.Connector do
@moduledoc false
@socket_opts [:binary, active: false]
@default_timeout 5000
@default_ssl_opts [verify: :verify_peer, depth: 2]
alias Redix.ConnectionError
require Logger
@spec connect(keyword()) :: {:ok, socket, connected_address} | {:error, term} | {:stop, term}
... | 35.238938 | 97 | 0.629458 |
62e9c780ae82f97f38a0b1051148a838966746df | 2,448 | ex | Elixir | lib/akd/generator/hook.ex | corroded/akd | ed15b8929b6d110552a19522f8a17edf75452e87 | [
"MIT"
] | null | null | null | lib/akd/generator/hook.ex | corroded/akd | ed15b8929b6d110552a19522f8a17edf75452e87 | [
"MIT"
] | null | null | null | lib/akd/generator/hook.ex | corroded/akd | ed15b8929b6d110552a19522f8a17edf75452e87 | [
"MIT"
] | null | null | null | defmodule Akd.Generator.Hook do
@moduledoc """
This module handles the generation of custom hooks which use `Akd.Hook`.
This can either directly be called, or called through a mix task,
`mix akd.gen.hook`.
This class uses EEx and Mix.Generator to fetch file contents from an eex
template and populate the in... | 28.465116 | 80 | 0.685866 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.