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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d56ccc222668218744d61010694f0beef2a32be5 | 6,992 | ex | Elixir | clients/service_management/lib/google_api/service_management/v1/model/metric_descriptor.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/service_management/lib/google_api/service_management/v1/model/metric_descriptor.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/service_management/lib/google_api/service_management/v1/model/metric_descriptor.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... | 89.641026 | 2,383 | 0.673913 |
d56ccf53185367c6fd05d37062c5466cbc50465b | 1,122 | exs | Elixir | config/config.exs | ohr486/eggman | 82eb614dab64aadaa556454b9c3c89ca9ed3c9b2 | [
"MIT"
] | 1 | 2020-01-13T20:50:40.000Z | 2020-01-13T20:50:40.000Z | config/config.exs | ohr486/eggman | 82eb614dab64aadaa556454b9c3c89ca9ed3c9b2 | [
"MIT"
] | 25 | 2019-07-02T05:57:46.000Z | 2021-07-26T05:20:55.000Z | config/config.exs | ohr486/eggman | 82eb614dab64aadaa556454b9c3c89ca9ed3c9b2 | [
"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... | 35.0625 | 73 | 0.754011 |
d56cfb6fdc3c8b0a9004ade29bb0ab3fda1c071f | 21,514 | ex | Elixir | lib/ash/actions/side_load.ex | mhussa/ash | 983a711837e4091d49a2ebff8010827ca2e8c889 | [
"MIT"
] | null | null | null | lib/ash/actions/side_load.ex | mhussa/ash | 983a711837e4091d49a2ebff8010827ca2e8c889 | [
"MIT"
] | null | null | null | lib/ash/actions/side_load.ex | mhussa/ash | 983a711837e4091d49a2ebff8010827ca2e8c889 | [
"MIT"
] | null | null | null | defmodule Ash.Actions.SideLoad do
@moduledoc false
alias Ash.Engine
alias Ash.Engine.Request
require Ash.Query
def requests(
query,
use_data_for_filter? \\ true,
root_data \\ [],
root_query \\ nil,
path \\ [],
tenant \\ nil
)
def requests(nil, _, _, ... | 27.76 | 101 | 0.564098 |
d56cfcc77bee3bb7096e78b4efbd42746c3f9b14 | 2,874 | exs | Elixir | test/c3p0/id_test.exs | drewrey/c3p0 | 8b74af0d7a61c90480bbaf24803100063765ec7e | [
"MIT"
] | null | null | null | test/c3p0/id_test.exs | drewrey/c3p0 | 8b74af0d7a61c90480bbaf24803100063765ec7e | [
"MIT"
] | null | null | null | test/c3p0/id_test.exs | drewrey/c3p0 | 8b74af0d7a61c90480bbaf24803100063765ec7e | [
"MIT"
] | 1 | 2020-10-29T05:28:35.000Z | 2020-10-29T05:28:35.000Z | defmodule C3P0.IDTest do
use ExUnit.Case, async: true
alias C3P0.ID
alias C3P0.Test.{IDStruct, FullIDStruct, UnknownIDStruct, UnimplementedStruct}
describe "id/1" do
test "map" do
assert ID.id(%{id: "id"}) == "id"
assert ID.id(%{"id" => "id"}) == "id"
assert ID.id(%{guid: "id"}) == "id"
... | 30.252632 | 106 | 0.524704 |
d56d0b5a29e04398b711c817676d93e73425bfd3 | 1,129 | exs | Elixir | test/pnum_test.exs | adlawson/elixir-pnum | 5e81894d144a9922dccddf9b0714134176216201 | [
"MIT"
] | 1 | 2018-06-12T12:33:11.000Z | 2018-06-12T12:33:11.000Z | test/pnum_test.exs | adlawson/elixir-pnum | 5e81894d144a9922dccddf9b0714134176216201 | [
"MIT"
] | null | null | null | test/pnum_test.exs | adlawson/elixir-pnum | 5e81894d144a9922dccddf9b0714134176216201 | [
"MIT"
] | null | null | null | defmodule PnumTest.List do
use ExUnit.Case, async: true
test :filter do
assert Pnum.filter([1, 2, 3], &(rem(&1, 2) === 0)) === [2]
assert Pnum.filter([2, 4, 6], &(rem(&1, 2) === 0)) === [2, 4, 6]
end
test :filter_map do
assert Pnum.filter_map([1, 2, 3], &(rem(&1, 2) === 0), &(&... | 29.710526 | 88 | 0.445527 |
d56d38137bb7beb82764ef3d5d625388fe159f52 | 2,098 | ex | Elixir | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/targeting_templates_list_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/targeting_templates_list_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/targeting_templates_list_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... | 38.851852 | 166 | 0.737846 |
d56d3c4df993ba09674fe8300f015ba58e13798b | 1,482 | ex | Elixir | lib/pow_assent.ex | danhunsaker/pow_assent | c572883b5c8f89561faee0a220ddf06de98f7415 | [
"MIT"
] | null | null | null | lib/pow_assent.ex | danhunsaker/pow_assent | c572883b5c8f89561faee0a220ddf06de98f7415 | [
"MIT"
] | null | null | null | lib/pow_assent.ex | danhunsaker/pow_assent | c572883b5c8f89561faee0a220ddf06de98f7415 | [
"MIT"
] | null | null | null | defmodule PowAssent do
@moduledoc false
defmodule CallbackError do
defexception [:message, :error, :error_uri]
end
defmodule CallbackCSRFError do
defexception message: "CSRF detected"
end
defmodule RequestError do
defexception [:message, :error]
alias PowAssent.HTTPAdapter.HTTPResponse
... | 22.119403 | 99 | 0.579622 |
d56d5a9d6d7e6e24913fd69981070dc04752b6fc | 546 | ex | Elixir | apps/ello_feeds/lib/ello_feeds/endpoint.ex | ello/apex | 4acb096b3ce172ff4ef9a51e5d068d533007b920 | [
"MIT"
] | 16 | 2017-06-21T21:31:20.000Z | 2021-05-09T03:23:26.000Z | apps/ello_feeds/lib/ello_feeds/endpoint.ex | ello/apex | 4acb096b3ce172ff4ef9a51e5d068d533007b920 | [
"MIT"
] | 25 | 2017-06-07T12:18:28.000Z | 2018-06-08T13:27:43.000Z | apps/ello_feeds/lib/ello_feeds/endpoint.ex | ello/apex | 4acb096b3ce172ff4ef9a51e5d068d533007b920 | [
"MIT"
] | 3 | 2018-06-14T15:34:07.000Z | 2022-02-28T21:06:13.000Z | # Note: When running in an umbrella we do not start this endpoint directly.
# Instead Ello.Dispatch.Endpoint is run.
defmodule Ello.Feeds.Endpoint do
use Phoenix.Endpoint, otp_app: :ello_feeds
# Code reloading can be explicitly enabled under the
# :code_reloader configuration of your endpoint.
if code_reloadin... | 24.818182 | 75 | 0.732601 |
d56d70e0014d8950d559df73aeb5142da795d6c8 | 1,121 | ex | Elixir | lib/currencyconverter_web/views/transaction_view.ex | Aguiar575/Currency-ConvertEX | 886181476c49bd068df5450ab98dcb885ac55746 | [
"MIT"
] | 1 | 2021-12-27T01:29:58.000Z | 2021-12-27T01:29:58.000Z | lib/currencyconverter_web/views/transaction_view.ex | Aguiar575/Currency-ConvertEX | 886181476c49bd068df5450ab98dcb885ac55746 | [
"MIT"
] | null | null | null | lib/currencyconverter_web/views/transaction_view.ex | Aguiar575/Currency-ConvertEX | 886181476c49bd068df5450ab98dcb885ac55746 | [
"MIT"
] | null | null | null | defmodule CurrencyconverterWeb.ConverterView do
use CurrencyconverterWeb, :view
def render("show.json", %{transaction: transaction}) do
IO.inspect(transaction)
%{
data:
Enum.map(transaction, fn t ->
%{
user_id: Enum.at(t, 0),
origin_currency: Enum.at(t, 1),
... | 28.74359 | 94 | 0.647636 |
d56dbe11dd0af6b6933e481613f9f1b0d30b52f8 | 10,194 | ex | Elixir | lib/surface/type_handler.ex | doorgan/surface | 6b73878c29705a5c45248986c326dc2fa1fc701e | [
"MIT"
] | 468 | 2021-03-11T23:10:41.000Z | 2022-03-30T20:12:06.000Z | lib/surface/type_handler.ex | doorgan/surface | 6b73878c29705a5c45248986c326dc2fa1fc701e | [
"MIT"
] | 248 | 2021-03-12T07:39:37.000Z | 2022-03-31T13:36:44.000Z | lib/surface/type_handler.ex | doorgan/surface | 6b73878c29705a5c45248986c326dc2fa1fc701e | [
"MIT"
] | 46 | 2021-03-22T09:28:58.000Z | 2022-03-23T21:32:20.000Z | defmodule Surface.TypeHandler do
@moduledoc false
alias Surface.IOHelper
@type clauses :: list(Macro.t())
@type opts :: keyword(Macro.t())
@callback literal_to_ast_node(
type :: atom(),
name :: atom(),
value :: any(),
meta :: Surface.AST.Meta.t()
... | 29.377522 | 93 | 0.618697 |
d56e2c6ce3cc09ca0045600dd913fb027d08d146 | 3,741 | ex | Elixir | lib/aws/generated/honeycode.ex | smanolloff/aws-elixir | c7cb6577802f5010be7e7b6ccb2c0f3c8c73ea84 | [
"Apache-2.0"
] | null | null | null | lib/aws/generated/honeycode.ex | smanolloff/aws-elixir | c7cb6577802f5010be7e7b6ccb2c0f3c8c73ea84 | [
"Apache-2.0"
] | null | null | null | lib/aws/generated/honeycode.ex | smanolloff/aws-elixir | c7cb6577802f5010be7e7b6ccb2c0f3c8c73ea84 | [
"Apache-2.0"
] | null | null | null | # WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
# See https://github.com/aws-beam/aws-codegen for more details.
defmodule AWS.Honeycode do
@moduledoc """
Amazon Honeycode is a fully managed service that allows you to quickly build
mobile and web apps for teams—without programming.
Build Honeycode apps for managi... | 35.628571 | 159 | 0.682171 |
d56e3623c69fbb56984d90eb8e05906ffb679d50 | 2,165 | exs | Elixir | config/dev.exs | BenBera/littleChatWebrtc | 91850323d0e60c4049a84ff8985b09856b356016 | [
"MIT"
] | null | null | null | config/dev.exs | BenBera/littleChatWebrtc | 91850323d0e60c4049a84ff8985b09856b356016 | [
"MIT"
] | null | null | null | config/dev.exs | BenBera/littleChatWebrtc | 91850323d0e60c4049a84ff8985b09856b356016 | [
"MIT"
] | null | null | null | use Mix.Config
# Configure your database
config :littlechat, Littlechat.Repo,
username: "postgres",
password: "kemboi4199",
database: "littlechat_dev",
hostname: "localhost",
show_sensitive_data_on_connection_error: true,
pool_size: 10
# For development, we disable any cache and enable
# debugging and cod... | 28.116883 | 68 | 0.694688 |
d56ea85b7c6def72e9f39214dfed923c7518b9b4 | 2,171 | exs | Elixir | test/phoenix/live_dashboard/pages/metrics_page_test.exs | alexcastano/phoenix_live_dashboard | 71579bb49d53a1dbf6eac017de3bb80e6b6c2d21 | [
"MIT"
] | null | null | null | test/phoenix/live_dashboard/pages/metrics_page_test.exs | alexcastano/phoenix_live_dashboard | 71579bb49d53a1dbf6eac017de3bb80e6b6c2d21 | [
"MIT"
] | null | null | null | test/phoenix/live_dashboard/pages/metrics_page_test.exs | alexcastano/phoenix_live_dashboard | 71579bb49d53a1dbf6eac017de3bb80e6b6c2d21 | [
"MIT"
] | null | null | null | defmodule Phoenix.LiveDashboard.MetricsPageTest do
use ExUnit.Case, async: true
import Phoenix.ConnTest
import Phoenix.LiveViewTest
@endpoint Phoenix.LiveDashboardTest.Endpoint
test "menu_link/2" do
assert :skip = Phoenix.LiveDashboard.MetricsPage.menu_link(%{}, %{dashboard_running?: false})
link =... | 34.460317 | 97 | 0.647628 |
d56eaedfc65ea26a43d083c3cee0ed039acc83fc | 1,755 | exs | Elixir | test/absinthe/integration/execution/introspection/full_test.exs | TheRealReal/absinthe | 6eae5bc36283e58f42d032b8afd90de3ad64f97b | [
"MIT"
] | 2 | 2021-04-22T23:45:04.000Z | 2021-05-07T01:01:15.000Z | test/absinthe/integration/execution/introspection/full_test.exs | TheRealReal/absinthe | 6eae5bc36283e58f42d032b8afd90de3ad64f97b | [
"MIT"
] | 1 | 2019-09-23T21:26:01.000Z | 2019-09-23T21:26:01.000Z | test/absinthe/integration/execution/introspection/full_test.exs | TheRealReal/absinthe | 6eae5bc36283e58f42d032b8afd90de3ad64f97b | [
"MIT"
] | null | null | null | defmodule Elixir.Absinthe.Integration.Execution.Introspection.FullTest do
use Absinthe.Case, async: true
@query """
query IntrospectionQuery {
__schema {
queryType { name }
mutationType { name }
subscriptionType { name }
types {
...FullType
}
directives {
n... | 17.376238 | 73 | 0.468946 |
d56ec94c236a210fa80896f9f30588bd51de06df | 89 | ex | Elixir | lib/reservation_book_web/views/user_confirmation_view.ex | chargio/reservation_book_phoenix | 87f07e390f0da2bed162d55b26d3c73c0f3aea4a | [
"MIT"
] | null | null | null | lib/reservation_book_web/views/user_confirmation_view.ex | chargio/reservation_book_phoenix | 87f07e390f0da2bed162d55b26d3c73c0f3aea4a | [
"MIT"
] | null | null | null | lib/reservation_book_web/views/user_confirmation_view.ex | chargio/reservation_book_phoenix | 87f07e390f0da2bed162d55b26d3c73c0f3aea4a | [
"MIT"
] | null | null | null | defmodule ReservationBookWeb.UserConfirmationView do
use ReservationBookWeb, :view
end
| 22.25 | 52 | 0.865169 |
d56ecb6a9336db720fa35e6cbeff70eddd8fa729 | 2,218 | exs | Elixir | test/crit/users/password_api/pure_password_test.exs | brownt23/crit19 | c45c7b3ae580c193168d83144da0eeb9bc91c8a9 | [
"MIT"
] | 6 | 2019-07-16T19:31:23.000Z | 2021-06-05T19:01:05.000Z | test/crit/users/password_api/pure_password_test.exs | brownt23/crit19 | c45c7b3ae580c193168d83144da0eeb9bc91c8a9 | [
"MIT"
] | null | null | null | test/crit/users/password_api/pure_password_test.exs | brownt23/crit19 | c45c7b3ae580c193168d83144da0eeb9bc91c8a9 | [
"MIT"
] | 3 | 2020-02-24T23:38:27.000Z | 2020-08-01T23:50:17.000Z | defmodule Crit.Users.PasswordApi.PurePasswordTest do
use Crit.DataCase
import Crit.Assertions.User
alias Crit.Users.PasswordApi
alias Crit.Users.Schemas.Password
alias Crit.Exemplars.{PasswordFocused, Minimal}
setup do
[user: Minimal.user()]
end
describe "setting a password..." do
test "succes... | 28.075949 | 65 | 0.671776 |
d56ee8e324f3b9dc1183381b349f40c1489399b1 | 2,330 | ex | Elixir | lib/exsync/beam_monitor.ex | axelson/exsync | 4cf13c294bbef95c97f68bf7dc24fb3e7e60ee2e | [
"BSD-3-Clause"
] | null | null | null | lib/exsync/beam_monitor.ex | axelson/exsync | 4cf13c294bbef95c97f68bf7dc24fb3e7e60ee2e | [
"BSD-3-Clause"
] | null | null | null | lib/exsync/beam_monitor.ex | axelson/exsync | 4cf13c294bbef95c97f68bf7dc24fb3e7e60ee2e | [
"BSD-3-Clause"
] | 1 | 2020-01-27T17:59:26.000Z | 2020-01-27T17:59:26.000Z | defmodule ExSync.BeamMonitor do
use GenServer
def start_link(opts \\ []) do
GenServer.start_link(__MODULE__, opts)
end
@impl GenServer
def init(opts) when is_list(opts) do
{:ok, watcher_pid} = FileSystem.start_link(dirs: ExSync.Config.beam_dirs())
FileSystem.subscribe(watcher_pid)
ExSync.Log... | 30.25974 | 93 | 0.645064 |
d56f003f939de3656507de43f59f1702c144c529 | 2,209 | ex | Elixir | clients/dfa_reporting/lib/google_api/dfa_reporting/v34/model/d_v3_ids.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/dfa_reporting/lib/google_api/dfa_reporting/v34/model/d_v3_ids.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/dfa_reporting/lib/google_api/dfa_reporting/v34/model/d_v3_ids.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... | 35.629032 | 142 | 0.681756 |
d56f090a683cf5c1e7dfcc5fee75264f9a80943d | 1,504 | ex | Elixir | lib/ecto_network/inet.ex | ntodd/ecto_network | 6703827f52d1ca411b18a94794779bc4eac31fe1 | [
"MIT"
] | null | null | null | lib/ecto_network/inet.ex | ntodd/ecto_network | 6703827f52d1ca411b18a94794779bc4eac31fe1 | [
"MIT"
] | null | null | null | lib/ecto_network/inet.ex | ntodd/ecto_network | 6703827f52d1ca411b18a94794779bc4eac31fe1 | [
"MIT"
] | null | null | null | defmodule EctoNetwork.INET do
@moduledoc ~S"""
Support for using Ecto with :inet fields
"""
@behaviour Ecto.Type
def type, do: :inet
@doc "Handle casting to Postgrex.INET"
def cast(address) do
address
|> case do
%Postgrex.INET{}=address -> {:ok, address}
address when is_tuple(addres... | 26.385965 | 81 | 0.670878 |
d56f20112c2b75c2bfee395be7f944798569ca01 | 94 | exs | Elixir | apps/incident_bridge_web/test/incident_comm_web/views/page_view_test.exs | LivewareProblems/incident-comm-hq | c0c35f30c2a0f99a640be2988bae836d3a2abd5a | [
"Apache-2.0"
] | null | null | null | apps/incident_bridge_web/test/incident_comm_web/views/page_view_test.exs | LivewareProblems/incident-comm-hq | c0c35f30c2a0f99a640be2988bae836d3a2abd5a | [
"Apache-2.0"
] | 12 | 2019-05-11T22:47:51.000Z | 2019-05-18T17:18:44.000Z | apps/incident_bridge_web/test/incident_comm_web/views/page_view_test.exs | LivewareProblems/incident-comm-hq | c0c35f30c2a0f99a640be2988bae836d3a2abd5a | [
"Apache-2.0"
] | null | null | null | defmodule IncidentBridgeWeb.PageViewTest do
use IncidentBridgeWeb.ConnCase, async: true
end
| 23.5 | 45 | 0.851064 |
d56f2a2fc1f89603fe33df0407f0d4ff8e9ee06f | 74 | exs | Elixir | config/test.exs | cnrad/lanyard | 780fe08435f7f0219e725c9676c92a378dfe2781 | [
"MIT"
] | 2 | 2021-08-04T00:20:36.000Z | 2021-09-26T03:55:48.000Z | config/test.exs | cnrad/lanyard | 780fe08435f7f0219e725c9676c92a378dfe2781 | [
"MIT"
] | null | null | null | config/test.exs | cnrad/lanyard | 780fe08435f7f0219e725c9676c92a378dfe2781 | [
"MIT"
] | null | null | null | use Mix.Config
config :lanyard,
bot_token: System.get_env("BOT_TOKEN")
| 14.8 | 40 | 0.756757 |
d56f3447b0b9fd2ca92283902544ccb9bf4151e6 | 25,279 | exs | Elixir | lib/elixir/test/elixir/macro_test.exs | tmbb/exdocs_makedown_demo | 6a0039c54d2fa10d79c080efcef8d70d359678f8 | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/macro_test.exs | tmbb/exdocs_makedown_demo | 6a0039c54d2fa10d79c080efcef8d70d359678f8 | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/macro_test.exs | tmbb/exdocs_makedown_demo | 6a0039c54d2fa10d79c080efcef8d70d359678f8 | [
"Apache-2.0"
] | null | null | null | Code.require_file "test_helper.exs", __DIR__
defmodule Macro.ExternalTest do
defmacro external do
line = 18
file = __ENV__.file
^line = __CALLER__.line
^file = __CALLER__.file
^line = Macro.Env.location(__CALLER__)[:line]
^file = Macro.Env.location(__CALLER__)[:file]
end
defmacro oror(le... | 35.061026 | 126 | 0.541714 |
d56f392deb5b729c7078fffcc0bd6b2adbda6f0c | 617 | exs | Elixir | projects/api/test/margaret_web/views/error_view_test.exs | strattadb/margaret | dde5d7b42f6d9b4d320069a0117136dae03b13b5 | [
"MIT"
] | 82 | 2017-11-06T01:00:55.000Z | 2020-12-09T10:35:29.000Z | projects/api/test/margaret_web/views/error_view_test.exs | dbstratta/margaret | dde5d7b42f6d9b4d320069a0117136dae03b13b5 | [
"MIT"
] | 98 | 2017-11-06T22:57:32.000Z | 2020-07-03T04:46:39.000Z | projects/api/test/margaret_web/views/error_view_test.exs | strattadb/margaret | dde5d7b42f6d9b4d320069a0117136dae03b13b5 | [
"MIT"
] | 10 | 2017-11-16T05:31:58.000Z | 2020-10-29T18:02:35.000Z | defmodule MargaretWeb.ErrorViewTest do
use MargaretWeb.ConnCase, async: true
# Bring render/3 and render_to_string/3 for testing custom views
import Phoenix.View
test "renders 404.json" do
assert render(MargaretWeb.ErrorView, "404.json", []) == %{errors: %{detail: "Page not found"}}
end
test "render ... | 29.380952 | 98 | 0.664506 |
d56f4560d20110bfdc8eea37f5b657d6510f9569 | 109,164 | ex | Elixir | lib/elixir/lib/enum.ex | gordalina/elixir | 9c99bc28a39ec289dc5602d6022586cdd844c736 | [
"Apache-2.0"
] | 2 | 2020-06-02T18:00:28.000Z | 2021-12-10T03:21:42.000Z | lib/elixir/lib/enum.ex | gordalina/elixir | 9c99bc28a39ec289dc5602d6022586cdd844c736 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/enum.ex | gordalina/elixir | 9c99bc28a39ec289dc5602d6022586cdd844c736 | [
"Apache-2.0"
] | null | null | null | defprotocol Enumerable do
@moduledoc """
Enumerable protocol used by `Enum` and `Stream` modules.
When you invoke a function in the `Enum` module, the first argument
is usually a collection that must implement this protocol.
For example, the expression:
Enum.map([1, 2, 3], &(&1 * 2))
invokes `Enume... | 28.584446 | 105 | 0.616458 |
d56f4955d6ba2f7578730981a4f3c20c21609eac | 902 | exs | Elixir | test/scenic/primitive/transform/rotate_test.exs | zacck/scenic | 5f2170b7fba63b0af597ddeb3107fb1ffb79c2fe | [
"Apache-2.0"
] | null | null | null | test/scenic/primitive/transform/rotate_test.exs | zacck/scenic | 5f2170b7fba63b0af597ddeb3107fb1ffb79c2fe | [
"Apache-2.0"
] | null | null | null | test/scenic/primitive/transform/rotate_test.exs | zacck/scenic | 5f2170b7fba63b0af597ddeb3107fb1ffb79c2fe | [
"Apache-2.0"
] | null | null | null | #
# Created by Boyd Multerer on 11/02/17
# Copyright © 2017 Kry10 Industries. All rights reserved.
#
defmodule Scenic.Primitive.Transform.RotateTest do
use ExUnit.Case, async: true
doctest Scenic
alias Scenic.Primitive.Transform.Rotate
test "info works" do
assert Rotate.info(:test_data) =~ ":test_data"... | 23.736842 | 58 | 0.677384 |
d56f51f668d645b546209c7e6d19be7294290102 | 104 | exs | Elixir | test/paidy/util_test.exs | shufo/paidy-elixir | 7e61990209339cf01dc88504855b29402526c09f | [
"MIT"
] | 2 | 2020-01-12T18:58:52.000Z | 2021-01-18T09:50:41.000Z | test/paidy/util_test.exs | shufo/paidy-elixir | 7e61990209339cf01dc88504855b29402526c09f | [
"MIT"
] | 46 | 2017-07-26T14:15:12.000Z | 2021-08-02T20:39:53.000Z | test/paidy/util_test.exs | shufo/paidy-elixir | 7e61990209339cf01dc88504855b29402526c09f | [
"MIT"
] | null | null | null | defmodule Paidy.UtilTest do
use ExUnit.Case, async: true
doctest Paidy.Util
@moduletag :util
end
| 14.857143 | 30 | 0.75 |
d56f5eeaecf60d2914128cf2a0c4ff49ba27bce9 | 1,871 | ex | Elixir | clients/testing/lib/google_api/testing/v1/model/ios_runtime_configuration.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/testing/lib/google_api/testing/v1/model/ios_runtime_configuration.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/testing/lib/google_api/testing/v1/model/ios_runtime_configuration.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... | 37.42 | 134 | 0.73597 |
d56f89eafeb95f5de56adc3e3dd411d1a4d5b459 | 1,817 | exs | Elixir | clients/api_keys/mix.exs | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/api_keys/mix.exs | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/api_keys/mix.exs | 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... | 27.119403 | 99 | 0.652174 |
d56fa2bd820f5da42967eee5c797168b0489f0d8 | 36,842 | ex | Elixir | lib/elixir/lib/supervisor.ex | steven-solomon/elixir | ee83248b8dd78ad67ef1282efc791006e8712d9e | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/supervisor.ex | steven-solomon/elixir | ee83248b8dd78ad67ef1282efc791006e8712d9e | [
"Apache-2.0"
] | 1 | 2015-06-09T15:52:43.000Z | 2015-06-09T15:52:43.000Z | lib/elixir/lib/supervisor.ex | steven-solomon/elixir | ee83248b8dd78ad67ef1282efc791006e8712d9e | [
"Apache-2.0"
] | null | null | null | defmodule Supervisor do
@moduledoc ~S"""
A behaviour module for implementing supervisors.
A supervisor is a process which supervises other processes, which we
refer to as *child processes*. Supervisors are used to build a hierarchical
process structure called a *supervision tree*. Supervision trees provide
... | 37.064386 | 106 | 0.693231 |
d56fa820e8436d545d71e0a74598ed7a982e8533 | 2,724 | exs | Elixir | config/config.exs | mbta/arrow | abbac9c7f300790d452ecec027a6c609775b72d1 | [
"MIT"
] | null | null | null | config/config.exs | mbta/arrow | abbac9c7f300790d452ecec027a6c609775b72d1 | [
"MIT"
] | 775 | 2019-11-18T16:23:57.000Z | 2022-03-28T18:20:04.000Z | config/config.exs | mbta/arrow | abbac9c7f300790d452ecec027a6c609775b72d1 | [
"MIT"
] | 1 | 2019-12-23T13:52:25.000Z | 2019-12-23T13:52:25.000Z | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
# General application configuration
use Mix.Config
config :arrow,
ecto_repos: [Arrow.Repo],
aws... | 29.290323 | 98 | 0.706681 |
d56faef7750b618962545389e6dcc8601a016333 | 1,681 | exs | Elixir | config/dev.exs | christhekeele/ex_venture | 4f4b329f50a133e219969f9823144a4cb9bf738d | [
"MIT"
] | 1 | 2021-12-28T20:57:32.000Z | 2021-12-28T20:57:32.000Z | config/dev.exs | christhekeele/ex_venture | 4f4b329f50a133e219969f9823144a4cb9bf738d | [
"MIT"
] | null | null | null | config/dev.exs | christhekeele/ex_venture | 4f4b329f50a133e219969f9823144a4cb9bf738d | [
"MIT"
] | null | null | null | use Mix.Config
#
# If you're looking to update variables, you probably want to:
# - Edit `.env`
# - Add to `ExVenture.Config` for loading through Vapor
#
# Configure your database
config :ex_venture, ExVenture.Repo, show_sensitive_data_on_connection_error: true
# For development, we disable any cache and enable
# de... | 27.557377 | 81 | 0.708507 |
d56fc14cdfa6cd7eeb2831ac1a994c227da19801 | 77 | ex | Elixir | lib/stripe_app_web/views/coherence/coherence_view.ex | hotpyn/stripe_demo | 2a0ac3ab34a616ffcd6d7e979c25517b5f1636b5 | [
"MIT"
] | null | null | null | lib/stripe_app_web/views/coherence/coherence_view.ex | hotpyn/stripe_demo | 2a0ac3ab34a616ffcd6d7e979c25517b5f1636b5 | [
"MIT"
] | null | null | null | lib/stripe_app_web/views/coherence/coherence_view.ex | hotpyn/stripe_demo | 2a0ac3ab34a616ffcd6d7e979c25517b5f1636b5 | [
"MIT"
] | null | null | null | defmodule Coherence.CoherenceView do
use StripeAppWeb.Coherence, :view
end
| 19.25 | 36 | 0.831169 |
d56fd6eb976348673dc6d0c163c2ff73d6b97f95 | 7,447 | ex | Elixir | lib/soap/wsdl.ex | tnyavdc/soap | 24489ea5ad8c62724ac4de675f4810bd7f033da9 | [
"MIT"
] | null | null | null | lib/soap/wsdl.ex | tnyavdc/soap | 24489ea5ad8c62724ac4de675f4810bd7f033da9 | [
"MIT"
] | null | null | null | lib/soap/wsdl.ex | tnyavdc/soap | 24489ea5ad8c62724ac4de675f4810bd7f033da9 | [
"MIT"
] | null | null | null | defmodule Soap.Wsdl do
@moduledoc """
Provides functions for parsing wsdl file
"""
@soap_version_namespaces %{
"1.1" => :"http://schemas.xmlsoap.org/wsdl/soap/",
"1.2" => :"http://schemas.xmlsoap.org/wsdl/soap12/"
}
import SweetXml, except: [parse: 1, parse: 2]
alias Soap.{Type, Xsd}
@spec pa... | 33.394619 | 130 | 0.622801 |
d56fda1ff952c7ba2cc43b51eb9a700bd8fe0c10 | 410 | ex | Elixir | kv_umbrella/apps/kv/lib/kv/kv_supervisor.ex | GameEssa/ElixirProject | 8f5fef5256719ef2ebcfb77c7bb7eb70687ece4f | [
"MIT"
] | null | null | null | kv_umbrella/apps/kv/lib/kv/kv_supervisor.ex | GameEssa/ElixirProject | 8f5fef5256719ef2ebcfb77c7bb7eb70687ece4f | [
"MIT"
] | null | null | null | kv_umbrella/apps/kv/lib/kv/kv_supervisor.ex | GameEssa/ElixirProject | 8f5fef5256719ef2ebcfb77c7bb7eb70687ece4f | [
"MIT"
] | null | null | null | defmodule KV.Supervisor do
use Supervisor
def start_link( opts ) do
Supervisor.start_link( __MODULE__, :ok, opts )
end
def init( :ok ) do
children = [
{ DynamicSupervisor, name: KV.BucketSupervisor, strategy: :one_for_one },
{ KV.Registry, name: KV.Registry},
{ Task.Supervisor, name:... | 22.777778 | 79 | 0.665854 |
d56fe9aa724186d6ff706384af244ea4166b7818 | 4,638 | ex | Elixir | clients/double_click_search/lib/google_api/double_click_search/v2/request_builder.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/double_click_search/lib/google_api/double_click_search/v2/request_builder.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/double_click_search/lib/google_api/double_click_search/v2/request_builder.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | 1 | 2018-07-28T20:50:50.000Z | 2018-07-28T20:50:50.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 28.807453 | 137 | 0.670116 |
d5702cb26a9396c5bbb6ac5af19e4d2376b14132 | 1,777 | ex | Elixir | clients/health_care/lib/google_api/health_care/v1beta1/model/group_or_segment.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/health_care/lib/google_api/health_care/v1beta1/model/group_or_segment.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/health_care/lib/google_api/health_care/v1beta1/model/group_or_segment.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... | 35.54 | 99 | 0.74395 |
d5703e22df21259cc31f79b84ede6946613363bd | 653 | ex | Elixir | lib/anchore_engine_api_server/model/package_reference.ex | michaeljguarino/anchore-elixir-client | 156a44f429ecb62433729a2b4c52de5dc0ef44d2 | [
"MIT"
] | null | null | null | lib/anchore_engine_api_server/model/package_reference.ex | michaeljguarino/anchore-elixir-client | 156a44f429ecb62433729a2b4c52de5dc0ef44d2 | [
"MIT"
] | null | null | null | lib/anchore_engine_api_server/model/package_reference.ex | michaeljguarino/anchore-elixir-client | 156a44f429ecb62433729a2b4c52de5dc0ef44d2 | [
"MIT"
] | 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 AnchoreEngineAPIServer.Model.PackageReference do
@moduledoc """
A record of a software item which is vulnerable or carries a fix for a vulnera... | 21.766667 | 86 | 0.701378 |
d5707374437825f570f287ad293b962238c56f1d | 1,840 | exs | Elixir | rotational-cipher/rotational_cipher.exs | RamanBut-Husaim/exercism.elixir | 683bb3b5700945dbbebcedf26d37208d4201ef49 | [
"MIT"
] | null | null | null | rotational-cipher/rotational_cipher.exs | RamanBut-Husaim/exercism.elixir | 683bb3b5700945dbbebcedf26d37208d4201ef49 | [
"MIT"
] | null | null | null | rotational-cipher/rotational_cipher.exs | RamanBut-Husaim/exercism.elixir | 683bb3b5700945dbbebcedf26d37208d4201ef49 | [
"MIT"
] | null | null | null | defmodule RotationalCipher do
@doc """
Given a plaintext and amount to shift by, return a rotated string.
Example:
iex> RotationalCipher.rotate("Attack at dawn", 13)
"Nggnpx ng qnja"
"""
@spec rotate(text :: String.t(), shift :: integer) :: String.t()
def rotate(text, shift) do
alphabet = "abcdefgh... | 25.555556 | 80 | 0.675 |
d5709a3c89d69b0620f68ab3bf49a070b6bedb5f | 1,976 | ex | Elixir | clients/logging/lib/google_api/logging/v2/model/linear.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/logging/lib/google_api/logging/v2/model/linear.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/logging/lib/google_api/logging/v2/model/linear.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... | 37.283019 | 383 | 0.701417 |
d5709dcf5112fb5007846b16d0f2ef46ddc5ea4a | 123 | exs | Elixir | .iex.exs | jsangilve/ecto_jsonb_macro_example | 809ac94c59b4d8ef1beed3170d7b62709754da98 | [
"MIT"
] | 1 | 2020-07-21T09:32:34.000Z | 2020-07-21T09:32:34.000Z | .iex.exs | jsangilve/ecto_jsonb_macro_example | 809ac94c59b4d8ef1beed3170d7b62709754da98 | [
"MIT"
] | null | null | null | .iex.exs | jsangilve/ecto_jsonb_macro_example | 809ac94c59b4d8ef1beed3170d7b62709754da98 | [
"MIT"
] | null | null | null | alias JsonbMacroExample.Schemas.Vehicle
alias JsonbMacroExample.Helpers.Vehicle, as: HVehicle
alias JsonbMacroExample.Repo
| 30.75 | 53 | 0.878049 |
d570cb84de9966bb2aef67bb4acf769988525cc5 | 33,026 | ex | Elixir | lib/elixir/lib/kernel/typespec.ex | DmitryKakurin/elixir | a5df6a5a830d4cff8b7c8da54342b66cab999e0f | [
"Apache-2.0"
] | 1 | 2020-01-14T18:44:56.000Z | 2020-01-14T18:44:56.000Z | lib/elixir/lib/kernel/typespec.ex | DmitryKakurin/elixir | a5df6a5a830d4cff8b7c8da54342b66cab999e0f | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/kernel/typespec.ex | DmitryKakurin/elixir | a5df6a5a830d4cff8b7c8da54342b66cab999e0f | [
"Apache-2.0"
] | 1 | 2018-01-09T20:10:59.000Z | 2018-01-09T20:10:59.000Z | defmodule Kernel.Typespec do
@moduledoc false
## Deprecated API moved to Code.Typespec
@doc false
@deprecated "Use Code.Typespec.spec_to_quoted/2 instead"
def spec_to_ast(name, spec) do
Code.Typespec.spec_to_quoted(name, spec)
end
@doc false
@deprecated "Use Code.Typespec.type_to_quoted/1 instead... | 32.763889 | 99 | 0.61827 |
d570eddaf646862c4278e14b7205eea1b9b9d84d | 5,964 | exs | Elixir | test/conform_utils_code_test.exs | blendmedia/conform | 439be07c742bca51a7941eb2794dc6df26866adf | [
"MIT"
] | null | null | null | test/conform_utils_code_test.exs | blendmedia/conform | 439be07c742bca51a7941eb2794dc6df26866adf | [
"MIT"
] | null | null | null | test/conform_utils_code_test.exs | blendmedia/conform | 439be07c742bca51a7941eb2794dc6df26866adf | [
"MIT"
] | 1 | 2021-07-01T09:02:19.000Z | 2021-07-01T09:02:19.000Z | defmodule ConformCodeTest do
use ExUnit.Case
test "can stringify function and case blocks" do
source = """
[transforms: [
"single_clause": fn val ->
case val do
:foo ->
bar = String.to_atom("bar")
bar
:baz -> :qux
end
end,
"multi... | 24.85 | 85 | 0.454561 |
d570f6aad1951638267f042ac5f19605bb4f68db | 1,222 | ex | Elixir | apps/ewallet/lib/ewallet/permissions/bouncer/scopes/mint_scope.ex | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 322 | 2018-02-28T07:38:44.000Z | 2020-05-27T23:09:55.000Z | apps/ewallet/lib/ewallet/permissions/bouncer/scopes/mint_scope.ex | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 643 | 2018-02-28T12:05:20.000Z | 2020-05-22T08:34:38.000Z | apps/ewallet/lib/ewallet/permissions/bouncer/scopes/mint_scope.ex | 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 ... | 30.55 | 89 | 0.739771 |
d571389f04771422eae6363893760f73b032a618 | 112 | exs | Elixir | test/good_times/convert_test.exs | elixir-twister/good_times | 62c111dbd160aa678c2c652dbc0ee06230d632c6 | [
"MIT"
] | 53 | 2015-04-15T13:28:26.000Z | 2021-07-27T15:49:12.000Z | test/good_times/convert_test.exs | elixir-twister/good_times | 62c111dbd160aa678c2c652dbc0ee06230d632c6 | [
"MIT"
] | 3 | 2015-09-14T07:03:58.000Z | 2019-03-01T14:39:44.000Z | test/good_times/convert_test.exs | elixir-twister/good_times | 62c111dbd160aa678c2c652dbc0ee06230d632c6 | [
"MIT"
] | 4 | 2016-09-04T20:05:15.000Z | 2018-09-10T15:10:54.000Z | defmodule GoodTimes.ConvertTest do
use ExUnit.Case, async: true
doctest GoodTimes.Convert, import: true
end
| 22.4 | 41 | 0.794643 |
d57140a4c40ca8ea7e85d4113b27e86df95ba097 | 1,411 | exs | Elixir | db_server/test/db_server_web/schema/chat_text_schema_test.exs | Graveyardillon/db_server | ce5a5884d7d1f0eacb3c5cc27066203424594cf4 | [
"MIT"
] | null | null | null | db_server/test/db_server_web/schema/chat_text_schema_test.exs | Graveyardillon/db_server | ce5a5884d7d1f0eacb3c5cc27066203424594cf4 | [
"MIT"
] | null | null | null | db_server/test/db_server_web/schema/chat_text_schema_test.exs | Graveyardillon/db_server | ce5a5884d7d1f0eacb3c5cc27066203424594cf4 | [
"MIT"
] | null | null | null | defmodule DbServerWeb.ChatTextSchemaTest do
use ExUnit.Case, async: true
use DbServer.DataCase
use DbServer.AroundRepo
# Chat text uses 2 many_to_many relationships.
describe "chat text schema test." do
@insert_params %{
text: "Hello, World!"
}
@update_params %{
text: "Updated one."... | 29.395833 | 97 | 0.649894 |
d5719d3aff0b01086206bdc4e98b0d8376a368e2 | 6,421 | exs | Elixir | apps/fetch/test/fetch/worker_test.exs | pacebus/mbta-api-fork | 6bf1d3a16e8917c9cfac0001b184c443be1f3abd | [
"MIT"
] | null | null | null | apps/fetch/test/fetch/worker_test.exs | pacebus/mbta-api-fork | 6bf1d3a16e8917c9cfac0001b184c443be1f3abd | [
"MIT"
] | null | null | null | apps/fetch/test/fetch/worker_test.exs | pacebus/mbta-api-fork | 6bf1d3a16e8917c9cfac0001b184c443be1f3abd | [
"MIT"
] | 1 | 2019-09-09T20:40:13.000Z | 2019-09-09T20:40:13.000Z | defmodule Fetch.WorkerTest do
use ExUnit.Case, async: true
import Plug.Conn
@moduletag capture_log: true
setup do
bypass = Bypass.open()
url = "http://localhost:#{bypass.port}"
{:ok, pid} = Fetch.Worker.start_link(url)
{:ok, %{bypass: bypass, pid: pid, url: url}}
end
test "can fetch a UR... | 26.643154 | 99 | 0.610653 |
d571a3d8c2f0794625e7ef9af691e28173869eda | 1,557 | ex | Elixir | web/web.ex | markevich/travel | f6f7dd7dd459149926c305984685d91ca1376f77 | [
"MIT"
] | 4 | 2016-11-01T14:59:33.000Z | 2016-11-01T15:05:57.000Z | web/web.ex | markevich/travel | f6f7dd7dd459149926c305984685d91ca1376f77 | [
"MIT"
] | null | null | null | web/web.ex | markevich/travel | f6f7dd7dd459149926c305984685d91ca1376f77 | [
"MIT"
] | null | null | null | defmodule Travel.Web do
@moduledoc """
A module that keeps using definitions for controllers,
views and so on.
This can be used in your application as:
use Travel.Web, :controller
use Travel.Web, :view
The definitions below will be executed for every view,
controller, etc, so keep them short ... | 20.220779 | 88 | 0.657675 |
d571b1f9b0dad4f5bfef2d322fc23d503ea0031b | 12,621 | ex | Elixir | lib/paginator.ex | the-vinner/paginator | e9cb1bf42eb230bd7981fa46c79e0444d5841549 | [
"MIT"
] | null | null | null | lib/paginator.ex | the-vinner/paginator | e9cb1bf42eb230bd7981fa46c79e0444d5841549 | [
"MIT"
] | null | null | null | lib/paginator.ex | the-vinner/paginator | e9cb1bf42eb230bd7981fa46c79e0444d5841549 | [
"MIT"
] | null | null | null | defmodule Paginator do
@moduledoc """
Defines a paginator.
This module adds a `paginate/3` function to your `Ecto.Repo` so that you can
paginate through results using opaque cursors.
## Usage
defmodule MyApp.Repo do
use Ecto.Repo, otp_app: :my_app
use Paginator
end
## Options... | 32.032995 | 139 | 0.662547 |
d571c565c62a09b2d8fad76d33c8e07360dd7288 | 1,141 | exs | Elixir | lib/otp_applications/config/config.exs | mikan/elixir-practice | 624525605eb2324e0c55a4ddcb68388c0d2ecefc | [
"Apache-2.0"
] | null | null | null | lib/otp_applications/config/config.exs | mikan/elixir-practice | 624525605eb2324e0c55a4ddcb68388c0d2ecefc | [
"Apache-2.0"
] | 1 | 2020-01-28T00:19:53.000Z | 2020-01-28T00:19:53.000Z | lib/otp_applications/config/config.exs | mikan/elixir-practice | 624525605eb2324e0c55a4ddcb68388c0d2ecefc | [
"Apache-2.0"
] | 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.806452 | 73 | 0.755478 |
d571d1e7898c8cba708e6610388f40e1c4e6b497 | 7,275 | exs | Elixir | test/game/command/skills_test.exs | jgsmith/ex_venture | 546adaa8fe80d45a72fde6de8d8d6906902c12d4 | [
"MIT"
] | 2 | 2019-05-14T11:36:44.000Z | 2020-07-01T08:54:04.000Z | test/game/command/skills_test.exs | nickwalton/ex_venture | d8ff1b0181db03f9ddcb7610ae7ab533feecbfbb | [
"MIT"
] | null | null | null | test/game/command/skills_test.exs | nickwalton/ex_venture | d8ff1b0181db03f9ddcb7610ae7ab533feecbfbb | [
"MIT"
] | 1 | 2021-01-29T14:12:40.000Z | 2021-01-29T14:12:40.000Z | defmodule Game.Command.SkillsTest do
use ExVenture.CommandCase
alias Game.Character
alias Game.Command.ParseContext
alias Game.Command.Skills
alias Game.Session
doctest Skills
setup do
start_and_clear_skills()
slash = create_skill(%{
level: 1,
name: "Slash",
points: 2,
... | 31.907895 | 134 | 0.606048 |
d571da1ee2ab4b67149d6e31513391c9da8e2dac | 265 | ex | Elixir | lib/instagram_clone.ex | elixirprogrammer/InstagramClonePETAL | 5710f89de32a95b0416a960a46d081e7ad4833ab | [
"MIT"
] | 69 | 2021-04-11T21:57:26.000Z | 2022-03-30T01:09:40.000Z | lib/instagram_clone.ex | hminy572/InstagramClonePETAL | 577cdad0e17399e47ef9d3f8e789bd07e33012b9 | [
"MIT"
] | 1 | 2021-04-16T17:38:11.000Z | 2021-04-16T17:38:11.000Z | lib/instagram_clone.ex | hminy572/InstagramClonePETAL | 577cdad0e17399e47ef9d3f8e789bd07e33012b9 | [
"MIT"
] | 4 | 2021-04-16T10:45:18.000Z | 2021-07-23T15:08:08.000Z | defmodule InstagramClone do
@moduledoc """
InstagramClone keeps the contexts that define your domain
and business logic.
Contexts are also responsible for managing your data, regardless
if it comes from the database, an external API or others.
"""
end
| 26.5 | 66 | 0.766038 |
d571f8cf13345a8f1a33dc11735f1f7c4b537dfe | 287 | ex | Elixir | tests/dummy/web/controllers/export_batch_relationship_controller.ex | autoxjs/autox-phoenix | 6446f4487e3af28955f6560973cff6add34be4d4 | [
"MIT"
] | null | null | null | tests/dummy/web/controllers/export_batch_relationship_controller.ex | autoxjs/autox-phoenix | 6446f4487e3af28955f6560973cff6add34be4d4 | [
"MIT"
] | 20 | 2016-04-05T06:28:58.000Z | 2016-05-12T15:45:37.000Z | tests/dummy/web/controllers/export_batch_relationship_controller.ex | foxnewsnetwork/autox | 66ea3f0f7ba8b3f9e910984a2ed3cdf0ef5ef29a | [
"MIT"
] | null | null | null | defmodule Dummy.ExportBatchRelationshipController do
use Dummy.Web, :controller
plug :scrub_params, "data" when action in [:create, :update, :delete]
plug Autox.AutoPaginatePlug when action in [:index]
plug Autox.AutoParentPlug, Dummy
use Autox.RelationshipController
end | 31.888889 | 71 | 0.777003 |
d571fb85c1f20d9500f3826805ecd0cc7850347f | 3,261 | exs | Elixir | test/bitpal_web/controllers/user_session_controller_test.exs | bitpal/bitpal | 0e10eeaacf7a65b23945cfb95e4dbda8bffd4590 | [
"BSD-3-Clause-Clear"
] | 5 | 2021-05-04T21:28:00.000Z | 2021-12-01T11:19:48.000Z | test/bitpal_web/controllers/user_session_controller_test.exs | bitpal/bitpal | 0e10eeaacf7a65b23945cfb95e4dbda8bffd4590 | [
"BSD-3-Clause-Clear"
] | 71 | 2021-04-21T05:48:49.000Z | 2022-03-23T06:30:37.000Z | test/bitpal_web/controllers/user_session_controller_test.exs | bitpal/bitpal | 0e10eeaacf7a65b23945cfb95e4dbda8bffd4590 | [
"BSD-3-Clause-Clear"
] | 1 | 2021-04-25T10:35:41.000Z | 2021-04-25T10:35:41.000Z | defmodule BitPalWeb.UserSessionControllerTest do
use BitPalWeb.ConnCase, async: true
setup do
password = valid_user_password()
%{user: create_user(password: password), password: password}
end
describe "GET /users/log_in" do
test "renders log in page", %{conn: conn} do
conn = get(conn, Routes... | 33.27551 | 94 | 0.604109 |
d571fd5b006d462c3c6fc599cc7b1e880f2e50fb | 387 | ex | Elixir | lib/hap/characteristics/current_temperature.ex | petermm/hap | 550433a78bccd586ab6a7d8bf85765bfae58b13b | [
"MIT"
] | 40 | 2019-10-26T01:58:42.000Z | 2022-03-09T18:18:39.000Z | lib/hap/characteristics/current_temperature.ex | petermm/hap | 550433a78bccd586ab6a7d8bf85765bfae58b13b | [
"MIT"
] | 11 | 2021-04-02T14:55:02.000Z | 2021-11-05T13:49:55.000Z | lib/hap/characteristics/current_temperature.ex | petermm/hap | 550433a78bccd586ab6a7d8bf85765bfae58b13b | [
"MIT"
] | 6 | 2020-05-18T09:34:14.000Z | 2021-11-04T11:14:15.000Z | defmodule HAP.Characteristics.CurrentTemperature do
@moduledoc """
Definition of the `public.hap.characteristic.temperature.current` characteristic
"""
@behaviour HAP.CharacteristicDefinition
def type, do: "11"
def perms, do: ["pr", "ev"]
def format, do: "float"
def min_value, do: 0.0
def max_value,... | 24.1875 | 82 | 0.705426 |
d57238571c521fa8fd4d1c421bf929756b89b3c3 | 940 | exs | Elixir | test/bonny/server/reconciler_test.exs | victoriavilasb/bonny | c5f2b3f69d8f4750d796a619d71692d76445b509 | [
"MIT"
] | null | null | null | test/bonny/server/reconciler_test.exs | victoriavilasb/bonny | c5f2b3f69d8f4750d796a619d71692d76445b509 | [
"MIT"
] | null | null | null | test/bonny/server/reconciler_test.exs | victoriavilasb/bonny | c5f2b3f69d8f4750d796a619d71692d76445b509 | [
"MIT"
] | null | null | null | defmodule Bonny.Server.ReconcilerTest do
@moduledoc false
use ExUnit.Case, async: true
alias Bonny.Server.Reconciler
defmodule TestReconciler do
use Bonny.Server.Reconciler, frequency: 15, client: Bonny.K8sMockClient
@impl true
def reconcile(pod) do
Agent.update(TestReconcilerCache, fn pods ... | 22.926829 | 75 | 0.652128 |
d57241405f13d30e889ecd2602b88e93aa6bb0b5 | 3,019 | ex | Elixir | clients/cloud_run/lib/google_api/cloud_run/v1alpha1/model/list_jobs_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/cloud_run/lib/google_api/cloud_run/v1alpha1/model/list_jobs_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/cloud_run/lib/google_api/cloud_run/v1alpha1/model/list_jobs_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... | 48.693548 | 586 | 0.71845 |
d572495f4270670e561ec5425f34a35ca8d8fc5c | 4,676 | ex | Elixir | lib/redix/start_options.ex | keathley/redix | b87e786ca269a4cacd0c8511e6f32c3784e64bec | [
"MIT"
] | null | null | null | lib/redix/start_options.ex | keathley/redix | b87e786ca269a4cacd0c8511e6f32c3784e64bec | [
"MIT"
] | null | null | null | lib/redix/start_options.ex | keathley/redix | b87e786ca269a4cacd0c8511e6f32c3784e64bec | [
"MIT"
] | null | null | null | defmodule Redix.StartOptions do
@moduledoc false
@default_sentinel_options [
timeout: 500,
socket_opts: [],
ssl: false,
role: :primary
]
@default_options [
socket_opts: [],
ssl: false,
sync_connect: false,
backoff_initial: 500,
backoff_max: 30000,
exit_on_disconnection:... | 30.167742 | 95 | 0.614414 |
d572549c9f65d451ad0ae122c73c2ee943bbfdf0 | 3,609 | ex | Elixir | lib/nano_planner_web/views/plan_item_view.ex | ysaito8015/nano_planner | 1819b4091e490a6478d6ca91adb39c6e54930e94 | [
"MIT"
] | null | null | null | lib/nano_planner_web/views/plan_item_view.ex | ysaito8015/nano_planner | 1819b4091e490a6478d6ca91adb39c6e54930e94 | [
"MIT"
] | null | null | null | lib/nano_planner_web/views/plan_item_view.ex | ysaito8015/nano_planner | 1819b4091e490a6478d6ca91adb39c6e54930e94 | [
"MIT"
] | null | null | null | defmodule NanoPlannerWeb.PlanItemView do
use NanoPlannerWeb, :view
alias Timex.Format.DateTime.Formatters.Strftime
alias NanoPlanner.Schedule.PlanItem
import NanoPlannerWeb.BootstrapHelpers
def document_title(assigns) do
page_title =
case assigns.view_template do
"index.html" -> "予定表"
... | 25.778571 | 76 | 0.622333 |
d572723c4df09441e4beb791829d998cea62aa1c | 36,625 | exs | Elixir | test/ex_force_test.exs | LeoLeiteSC/ex_force | 62ff9a6624c432ed4d3e8e5102f070ff4129db39 | [
"MIT"
] | null | null | null | test/ex_force_test.exs | LeoLeiteSC/ex_force | 62ff9a6624c432ed4d3e8e5102f070ff4129db39 | [
"MIT"
] | null | null | null | test/ex_force_test.exs | LeoLeiteSC/ex_force | 62ff9a6624c432ed4d3e8e5102f070ff4129db39 | [
"MIT"
] | null | null | null | defmodule ExForceTest do
use ExUnit.Case, async: true
doctest(ExForce)
alias ExForce.{
Client,
QueryResult,
Request,
SObject
}
alias Plug.Conn
@unreachable_url "http://257.0.0.0:0"
setup do
with bypass <- Bypass.open(),
client <-
ExForce.build_client(
... | 30.343828 | 99 | 0.502089 |
d5729fc277da056f8da3b403bcaab9006de85684 | 1,964 | ex | Elixir | clients/android_management/lib/google_api/android_management/v1/model/list_enterprises_response.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/android_management/lib/google_api/android_management/v1/model/list_enterprises_response.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/android_management/lib/google_api/android_management/v1/model/list_enterprises_response.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 39.28 | 177 | 0.751018 |
d572d692a6f2b9deacc84d4781332f76d44e18a0 | 176 | ex | Elixir | lib/pelemay/generator.ex | muramasa8191/pelemay | f6b51ad8acc9b6fc66280e238a67364293b2b7d5 | [
"Apache-2.0"
] | null | null | null | lib/pelemay/generator.ex | muramasa8191/pelemay | f6b51ad8acc9b6fc66280e238a67364293b2b7d5 | [
"Apache-2.0"
] | null | null | null | lib/pelemay/generator.ex | muramasa8191/pelemay | f6b51ad8acc9b6fc66280e238a67364293b2b7d5 | [
"Apache-2.0"
] | null | null | null | defmodule Pelemay.Generator do
alias Pelemay.Generator.Interface
alias Pelemay.Generator.Native
def generate do
Interface.generate()
Native.generate()
end
end
| 17.6 | 35 | 0.761364 |
d572e142ded9f08328017abf57f531e68d34465c | 425 | exs | Elixir | test/models/user_test.exs | luca-apostoli/ruru-chat | d6c62000b78592f03cf56f63acd23a6404df1924 | [
"MIT"
] | 1 | 2017-04-22T12:36:19.000Z | 2017-04-22T12:36:19.000Z | test/models/user_test.exs | luca-apostoli/ruru-chat | d6c62000b78592f03cf56f63acd23a6404df1924 | [
"MIT"
] | null | null | null | test/models/user_test.exs | luca-apostoli/ruru-chat | d6c62000b78592f03cf56f63acd23a6404df1924 | [
"MIT"
] | null | null | null | defmodule Ruru.UserTest do
use Ruru.ModelCase
alias Ruru.User
@valid_attrs %{email: "some content", name: "some content"}
@invalid_attrs %{}
test "changeset with valid attributes" do
changeset = User.changeset(%User{}, @valid_attrs)
assert changeset.valid?
end
test "changeset with invalid attr... | 22.368421 | 61 | 0.710588 |
d572e404709bd742debf9fa5455a925485faea9c | 924 | ex | Elixir | lib/votr/plurality.ex | wjanssens/votr | 4fdd2a6e5ac9178a7fa90578f75a248e2bf161b6 | [
"MIT"
] | 1 | 2018-04-27T09:43:27.000Z | 2018-04-27T09:43:27.000Z | lib/votr/plurality.ex | wjanssens/votr | 4fdd2a6e5ac9178a7fa90578f75a248e2bf161b6 | [
"MIT"
] | null | null | null | lib/votr/plurality.ex | wjanssens/votr | 4fdd2a6e5ac9178a7fa90578f75a248e2bf161b6 | [
"MIT"
] | null | null | null | defmodule Votr.Plurality do
def eval(ballots, seats \\ 1) do
ballots
|> Stream.filter(fn b -> Enum.count(b) <= seats end)
|> Stream.flat_map(fn ballot -> Enum.reduce(ballot, [], fn {k, _}, acc -> [k | acc] end) end)
|> Enum.reduce(%{}, fn c, acc -> Map.update(acc, c, %{votes: 1}, fn x -> Map.update!(x... | 31.862069 | 120 | 0.503247 |
d57304d8eb1c775781502647b1f01d4252474840 | 1,902 | exs | Elixir | elixir/quick-elixir-blog/blog_phoenix/config/dev.exs | Jufebrown/learning-projects | 9b8e0718c18ad00b7bb40a72c5c204471b28a100 | [
"MIT"
] | null | null | null | elixir/quick-elixir-blog/blog_phoenix/config/dev.exs | Jufebrown/learning-projects | 9b8e0718c18ad00b7bb40a72c5c204471b28a100 | [
"MIT"
] | null | null | null | elixir/quick-elixir-blog/blog_phoenix/config/dev.exs | Jufebrown/learning-projects | 9b8e0718c18ad00b7bb40a72c5c204471b28a100 | [
"MIT"
] | null | null | null | use Mix.Config
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with brunch.io to recompile .js and .css sources.
#
# In order to use HTTPS in development, a self-signed... | 33.368421 | 170 | 0.706625 |
d5732e51759b7e9349a4c2946c0193811b8434d0 | 410 | ex | Elixir | backend/lib/backend_web/controllers/about_controller.ex | ericgroom/gatorgoods | c78af60f463c6c8c6762101a2d8e7102d43bd804 | [
"MIT"
] | null | null | null | backend/lib/backend_web/controllers/about_controller.ex | ericgroom/gatorgoods | c78af60f463c6c8c6762101a2d8e7102d43bd804 | [
"MIT"
] | 9 | 2020-02-12T00:40:03.000Z | 2021-12-09T01:11:33.000Z | backend/lib/backend_web/controllers/about_controller.ex | ericgroom/gatorgoods | c78af60f463c6c8c6762101a2d8e7102d43bd804 | [
"MIT"
] | null | null | null | defmodule BackendWeb.AboutController do
use BackendWeb, :controller
alias Backend.{About} #Repo,
def index(conn, _) do
render conn, "index.html"
end
def jonas(conn, _) do
render conn, "jonas.html"
end
def eric(conn, _) do
render conn, "eric.html"
end
def mariko(conn, _) do
render con... | 16.4 | 39 | 0.658537 |
d573755737a5408dc08d48f1cc09a323022cb855 | 6,057 | exs | Elixir | test/upload/ecto_test.exs | rzane/upload | 2f679d65d8571b1598c5613d81cf216009d65bd1 | [
"MIT"
] | 30 | 2017-12-23T15:00:30.000Z | 2021-09-29T19:33:09.000Z | test/upload/ecto_test.exs | rzane/upload | 2f679d65d8571b1598c5613d81cf216009d65bd1 | [
"MIT"
] | 6 | 2018-05-03T18:44:36.000Z | 2021-04-21T17:15:25.000Z | test/upload/ecto_test.exs | rzane/upload | 2f679d65d8571b1598c5613d81cf216009d65bd1 | [
"MIT"
] | 5 | 2019-09-27T16:37:58.000Z | 2021-10-04T21:04:35.000Z | defmodule Upload.EctoTest do
use ExUnit.Case, async: true
import Ecto.Changeset, only: [get_field: 2]
doctest Upload.Ecto
alias Upload.Adapters.Test, as: Adapter
@fixture Path.expand("../fixtures/text.txt", __DIR__)
@filename ~r"^[a-z0-9]{32}\.txt$"
defmodule Company do
use Ecto.Schema
schema... | 31.546875 | 90 | 0.652303 |
d5738ca10277bac952149baebfa2ad284dca779c | 1,659 | ex | Elixir | lib/koans/10_structs.ex | fantgeass/elixir-koans | 493d5bc4d63a19b905ad96f94d5cae5c7b283530 | [
"MIT"
] | null | null | null | lib/koans/10_structs.ex | fantgeass/elixir-koans | 493d5bc4d63a19b905ad96f94d5cae5c7b283530 | [
"MIT"
] | null | null | null | lib/koans/10_structs.ex | fantgeass/elixir-koans | 493d5bc4d63a19b905ad96f94d5cae5c7b283530 | [
"MIT"
] | null | null | null | defmodule Structs do
use Koans
@intro "Structs"
defmodule Person do
defstruct [:name, :age]
end
koan "Structs are defined and named after a module" do
person = %Person{}
assert person == %Person{}
end
koan "Unless previously defined, fields begin as nil" do
nobody = %Person{}
asser... | 27.65 | 112 | 0.6522 |
d573d647692850ab8c319ecf2488174b9562bae8 | 7,049 | ex | Elixir | lib/mix/tasks.ex | brauliobz/excoveralls | 8108405bda1c6ef27253edc294415f02d78760f4 | [
"MIT"
] | null | null | null | lib/mix/tasks.ex | brauliobz/excoveralls | 8108405bda1c6ef27253edc294415f02d78760f4 | [
"MIT"
] | null | null | null | lib/mix/tasks.ex | brauliobz/excoveralls | 8108405bda1c6ef27253edc294415f02d78760f4 | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.Coveralls do
@moduledoc """
Provides an entry point for displaying
coveralls.io from local server.
"""
use Mix.Task
@shortdoc "Display the test coverage"
@preferred_cli_env :test
defmodule Runner do
def run(task, args) do
Mix.Task.run(task, args)
end
end
def run(... | 29.742616 | 142 | 0.648603 |
d573d80f9771880d41eed395e92208964a867d8b | 1,140 | exs | Elixir | projects/sirena_email/mix.exs | idfumg/ElixirSynopsis | 74c668d84300812dd41eb18772aecfb89bc7628b | [
"MIT"
] | null | null | null | projects/sirena_email/mix.exs | idfumg/ElixirSynopsis | 74c668d84300812dd41eb18772aecfb89bc7628b | [
"MIT"
] | null | null | null | projects/sirena_email/mix.exs | idfumg/ElixirSynopsis | 74c668d84300812dd41eb18772aecfb89bc7628b | [
"MIT"
] | null | null | null | defmodule SirenaEmail.Mixfile do
use Mix.Project
def project do
[
app: :sirena_email,
version: "0.0.1",
elixir: "~> 1.4",
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix, :gettext] ++ Mix.compilers,
start_permanent: Mix.env == :prod,
deps: deps()
]
en... | 24.782609 | 74 | 0.578947 |
d573e72b2d9e911270b6a34735b76da8109ae012 | 517 | ex | Elixir | lib/game/format/shop.ex | shanesveller/ex_venture | 68507da11442a9e0423073fcd305e9021f649ca1 | [
"MIT"
] | null | null | null | lib/game/format/shop.ex | shanesveller/ex_venture | 68507da11442a9e0423073fcd305e9021f649ca1 | [
"MIT"
] | null | null | null | lib/game/format/shop.ex | shanesveller/ex_venture | 68507da11442a9e0423073fcd305e9021f649ca1 | [
"MIT"
] | null | null | null | defmodule Game.Format.Shop do
@moduledoc """
Formatting for a shop
"""
use Game.Currency
alias Game.Format
alias Game.Format.Table
def list(shop, items)
def list(shop, items) do
rows =
items
|> Enum.map(&item/1)
Table.format(Format.shop_name(shop), rows, [10, 10, 30])
end
d... | 18.464286 | 84 | 0.638298 |
d573fea389386814a391ce6eae56f1a2c4e734da | 26,279 | exs | Elixir | test/phoenix_live_view/integrations/elements_test.exs | Nicd/phoenix_live_view | 672a77913901dd7e005d214c32e6397791718cde | [
"MIT"
] | 1 | 2020-10-23T15:17:10.000Z | 2020-10-23T15:17:10.000Z | test/phoenix_live_view/integrations/elements_test.exs | alvises/phoenix_live_view | 37e32ffe9c59ca4e1176dfa878dbd8f41a002508 | [
"MIT"
] | null | null | null | test/phoenix_live_view/integrations/elements_test.exs | alvises/phoenix_live_view | 37e32ffe9c59ca4e1176dfa878dbd8f41a002508 | [
"MIT"
] | null | null | null | defmodule Phoenix.LiveView.ElementsTest do
use ExUnit.Case, async: true
use Phoenix.ConnTest
import Phoenix.LiveViewTest
alias Phoenix.LiveViewTest.{Endpoint}
@endpoint Endpoint
defp last_event(view) do
view |> element("#last-event") |> render() |> HtmlEntities.decode()
end
setup do
{:ok, li... | 39.998478 | 168 | 0.548993 |
d57411b4fee37f3b3f528487ec72fe41858f6591 | 2,412 | ex | Elixir | clients/ad_sense/lib/google_api/ad_sense/v2/model/ad_unit.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/ad_sense/lib/google_api/ad_sense/v2/model/ad_unit.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/ad_sense/lib/google_api/ad_sense/v2/model/ad_unit.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... | 40.881356 | 156 | 0.706468 |
d57464b0b4e96a6fafa3df44d7147926f95b11e8 | 45,125 | ex | Elixir | clients/compute/lib/google_api/compute/v1/api/network_endpoint_groups.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-10-01T09:20:41.000Z | 2021-10-01T09:20:41.000Z | clients/compute/lib/google_api/compute/v1/api/network_endpoint_groups.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/api/network_endpoint_groups.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... | 55.986352 | 1,174 | 0.645917 |
d57470dc4097fc56207b668ce0d7ce7e56815035 | 2,089 | exs | Elixir | test/examples/example_test.exs | Kukunin/espec | 71f8f9382b6038fd46b46a159b05600c73a96308 | [
"Apache-2.0"
] | null | null | null | test/examples/example_test.exs | Kukunin/espec | 71f8f9382b6038fd46b46a159b05600c73a96308 | [
"Apache-2.0"
] | null | null | null | test/examples/example_test.exs | Kukunin/espec | 71f8f9382b6038fd46b46a159b05600c73a96308 | [
"Apache-2.0"
] | null | null | null | defmodule ExampleTest do
use ExUnit.Case, async: true
defmodule SomeSpec do
use ESpec
example(do: "some example")
example "failed example with name" do
:timer.sleep(2)
expect(true) |> to(be(false))
end
it [a: 1, b: 2], do: "it example with opts"
it "is named example with opt... | 25.790123 | 91 | 0.644806 |
d57475ce820c61cc04f182720498504cbb85b1fe | 2,460 | ex | Elixir | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/site_skippable_setting.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/site_skippable_setting.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/site_skippable_setting.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... | 43.928571 | 220 | 0.738618 |
d57477bfa7a072cda707fd9ee6d60a583cae85ff | 8,247 | exs | Elixir | apps/omg_watcher/test/omg_watcher/state/persistence_test.exs | omisego/elixir-omg | 2c68973d8f29033d137f63a6e060f12e2a7dcd59 | [
"Apache-2.0"
] | 177 | 2018-08-24T03:51:02.000Z | 2020-05-30T13:29:25.000Z | apps/omg_watcher/test/omg_watcher/state/persistence_test.exs | omisego/elixir-omg | 2c68973d8f29033d137f63a6e060f12e2a7dcd59 | [
"Apache-2.0"
] | 1,042 | 2018-08-25T00:52:39.000Z | 2020-06-01T05:15:17.000Z | apps/omg_watcher/test/omg_watcher/state/persistence_test.exs | 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... | 31.120755 | 111 | 0.644356 |
d574795be8a1e9687e1f651390a499a8aeea5528 | 736 | ex | Elixir | lib/oli_web/live/breadcrumb/breadcrumb_live.ex | ChristianMurphy/oli-torus | ffeee4996b66b7c6c6eb3e0082d030b8cc6cea97 | [
"MIT"
] | null | null | null | lib/oli_web/live/breadcrumb/breadcrumb_live.ex | ChristianMurphy/oli-torus | ffeee4996b66b7c6c6eb3e0082d030b8cc6cea97 | [
"MIT"
] | null | null | null | lib/oli_web/live/breadcrumb/breadcrumb_live.ex | ChristianMurphy/oli-torus | ffeee4996b66b7c6c6eb3e0082d030b8cc6cea97 | [
"MIT"
] | null | null | null | defmodule OliWeb.Breadcrumb.BreadcrumbLive do
use OliWeb, :live_component
import Phoenix.HTML.Link
def render(assigns) do
render_breadcrumb(assigns)
end
defp render_breadcrumb(%{is_last: true} = assigns) do
~L"""
<li class="breadcrumb-item active" aria-current="page">
<%= get_title(@breadc... | 25.37931 | 76 | 0.66712 |
d57490ad5fd3fbaf1ecbef7ac7c4b6f2f6a32a71 | 5,395 | exs | Elixir | test/unit/dogstat_test.exs | Nebo15/dogstat | 44095b3f9c3925e72130baa6a750ae796780db93 | [
"MIT"
] | 1 | 2017-08-05T15:26:12.000Z | 2017-08-05T15:26:12.000Z | test/unit/dogstat_test.exs | Nebo15/dogstat | 44095b3f9c3925e72130baa6a750ae796780db93 | [
"MIT"
] | null | null | null | test/unit/dogstat_test.exs | Nebo15/dogstat | 44095b3f9c3925e72130baa6a750ae796780db93 | [
"MIT"
] | null | null | null | defmodule DogStatTest do
use ExUnit.Case
# doctest DogStat
defmodule Server do
def start(test, port) do
{:ok, sock} = :gen_udp.open(port, [:binary, active: false])
Task.start_link(fn ->
recv(test, sock)
end)
end
defp recv(test, sock) do
send(test, {:server, recv(sock)... | 26.18932 | 77 | 0.594254 |
d574a9c4cd1922576a13e5bdb866cd98cf022bcb | 5,548 | ex | Elixir | lib/helpers/expandable.ex | mnussbaumer/cssex | da3b0add68d766faacb459c14a8eb43ca32aa9f4 | [
"MIT"
] | 13 | 2021-03-16T15:02:08.000Z | 2021-09-22T02:40:25.000Z | lib/helpers/expandable.ex | mnussbaumer/cssex | da3b0add68d766faacb459c14a8eb43ca32aa9f4 | [
"MIT"
] | 3 | 2021-03-19T20:14:19.000Z | 2021-03-29T13:34:17.000Z | lib/helpers/expandable.ex | mnussbaumer/cssex | da3b0add68d766faacb459c14a8eb43ca32aa9f4 | [
"MIT"
] | null | null | null | defmodule CSSEx.Helpers.Expandable do
import CSSEx.Parser, only: [close_current: 1, create_data_for_inner: 3]
import CSSEx.Helpers.Interpolations, only: [maybe_replace_val: 2]
@moduledoc false
def parse(rem, data) do
case CSSEx.Helpers.Shared.search_for(rem, '{') do
{:ok, {new_rem, selector}} ->
... | 27.063415 | 97 | 0.503965 |
d574d2b807f368fb1ee19fc2593c08d724a93cf0 | 1,549 | ex | Elixir | lib/chat_api/companies/company.ex | Tiamat-Tech/papercups | f17d2b0ce080c0edab92a4b2e6d4afcef04aa291 | [
"MIT"
] | 1 | 2021-06-17T03:17:24.000Z | 2021-06-17T03:17:24.000Z | lib/chat_api/companies/company.ex | Tiamat-Tech/papercups | f17d2b0ce080c0edab92a4b2e6d4afcef04aa291 | [
"MIT"
] | 1 | 2021-01-17T10:42:34.000Z | 2021-01-17T10:42:34.000Z | lib/chat_api/companies/company.ex | Tiamat-Tech/papercups | f17d2b0ce080c0edab92a4b2e6d4afcef04aa291 | [
"MIT"
] | null | null | null | defmodule ChatApi.Companies.Company do
use Ecto.Schema
import Ecto.Changeset
alias ChatApi.{Accounts.Account, Customers.Customer}
@type t :: %__MODULE__{
name: String.t(),
description: String.t() | nil,
external_id: String.t() | nil,
website_url: String.t() | nil,
... | 23.830769 | 54 | 0.588767 |
d574ff377008264d87712d86d1245d9a7d7580e0 | 1,477 | exs | Elixir | mix.exs | markevich/travel | f6f7dd7dd459149926c305984685d91ca1376f77 | [
"MIT"
] | 4 | 2016-11-01T14:59:33.000Z | 2016-11-01T15:05:57.000Z | mix.exs | markevich/travel | f6f7dd7dd459149926c305984685d91ca1376f77 | [
"MIT"
] | null | null | null | mix.exs | markevich/travel | f6f7dd7dd459149926c305984685d91ca1376f77 | [
"MIT"
] | null | null | null | defmodule Travel.Mixfile do
use Mix.Project
def project do
[app: :travel,
version: "0.0.1",
elixir: "~> 1.0",
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix] ++ Mix.compilers,
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
aliases: aliases,
... | 28.403846 | 78 | 0.608666 |
d5755366e9a692f814cb88ad354f4690f55dcb7a | 1,943 | exs | Elixir | clients/big_query_data_transfer/mix.exs | jamesvl/elixir-google-api | 6c87fb31d996f08fb42ce6066317e9d652a87acc | [
"Apache-2.0"
] | null | null | null | clients/big_query_data_transfer/mix.exs | jamesvl/elixir-google-api | 6c87fb31d996f08fb42ce6066317e9d652a87acc | [
"Apache-2.0"
] | null | null | null | clients/big_query_data_transfer/mix.exs | jamesvl/elixir-google-api | 6c87fb31d996f08fb42ce6066317e9d652a87acc | [
"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... | 29 | 151 | 0.670098 |
d57563ef109a86d6d62bc3ddaa4341e68d96e4d8 | 895 | ex | Elixir | apps/plant_monitor/test/support/data_case.ex | bartoszgorka/PlantMonitor | 23e18cd76c51bd8eee021ee98668926de885047b | [
"MIT"
] | 2 | 2019-01-25T21:21:56.000Z | 2021-02-24T08:18:51.000Z | apps/plant_monitor/test/support/data_case.ex | bartoszgorka/PlantMonitor | 23e18cd76c51bd8eee021ee98668926de885047b | [
"MIT"
] | null | null | null | apps/plant_monitor/test/support/data_case.ex | bartoszgorka/PlantMonitor | 23e18cd76c51bd8eee021ee98668926de885047b | [
"MIT"
] | null | null | null | defmodule PlantMonitor.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... | 22.375 | 74 | 0.707263 |
d57573b365f5e1041786794baeb3f8bf20ddbda2 | 1,544 | exs | Elixir | apps/omg_eth/test/omg_eth/release_tasks/set_ethereum_block_time_test.exs | omisego/elixir-omg | 2c68973d8f29033d137f63a6e060f12e2a7dcd59 | [
"Apache-2.0"
] | 177 | 2018-08-24T03:51:02.000Z | 2020-05-30T13:29:25.000Z | apps/omg_eth/test/omg_eth/release_tasks/set_ethereum_block_time_test.exs | omisego/elixir-omg | 2c68973d8f29033d137f63a6e060f12e2a7dcd59 | [
"Apache-2.0"
] | 1,042 | 2018-08-25T00:52:39.000Z | 2020-06-01T05:15:17.000Z | apps/omg_eth/test/omg_eth/release_tasks/set_ethereum_block_time_test.exs | 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... | 39.589744 | 95 | 0.746762 |
d5758f0ab08f31739e5f1dff4bf320cacf9d3082 | 362 | exs | Elixir | config/prod.secret.sample.exs | cruessler/exrss | 6ac17b7533d78460a1c34cabaae86fec317f460a | [
"MIT"
] | 4 | 2020-02-16T07:18:35.000Z | 2021-12-09T14:43:10.000Z | config/prod.secret.sample.exs | cruessler/exrss | 6ac17b7533d78460a1c34cabaae86fec317f460a | [
"MIT"
] | 27 | 2019-10-16T18:35:19.000Z | 2022-03-13T16:39:57.000Z | config/prod.secret.sample.exs | cruessler/exrss | 6ac17b7533d78460a1c34cabaae86fec317f460a | [
"MIT"
] | null | null | null | use Mix.Config
# In this file, we keep production configuration that
# you likely want to automate and keep it away from
# your version control system.
config :ex_rss, ExRssWeb.Endpoint, secret_key_base: ""
# Configure your database
config :ex_rss, ExRss.Repo,
adapter: Ecto.Adapters.Postgres,
username: "",
pass... | 24.133333 | 54 | 0.734807 |
d5759a036fe530a8c0d0220c5bfde3be78963f5a | 767 | ex | Elixir | lib/team_budget/accounts/core/session.ex | AkioCode/elxpro4-teambudget | a7e67d5e1ec538df6cc369cc4f385d005bf60eda | [
"MIT"
] | null | null | null | lib/team_budget/accounts/core/session.ex | AkioCode/elxpro4-teambudget | a7e67d5e1ec538df6cc369cc4f385d005bf60eda | [
"MIT"
] | null | null | null | lib/team_budget/accounts/core/session.ex | AkioCode/elxpro4-teambudget | a7e67d5e1ec538df6cc369cc4f385d005bf60eda | [
"MIT"
] | null | null | null | defmodule TeamBudget.Accounts.Core.Session do
alias TeamBudget.Accounts.Core.UserRepo
alias TeamBudget.Accounts.Core.Guardian
alias TeamBudget.Accounts.Data.User
def login(%{email: _email, password: _password} = credentials) do
with {:ok, %User{} = user} <- authenticate(credentials),
{:ok, token, ... | 26.448276 | 74 | 0.64146 |
d575a3eb78ce02c67f2f9621f04428faa67800b9 | 969 | exs | Elixir | config/config.exs | victusfate/hello_phoenix | 8a63878e5317386c693a214d4db836f9128621d2 | [
"MIT"
] | null | null | null | config/config.exs | victusfate/hello_phoenix | 8a63878e5317386c693a214d4db836f9128621d2 | [
"MIT"
] | null | null | null | config/config.exs | victusfate/hello_phoenix | 8a63878e5317386c693a214d4db836f9128621d2 | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
use Mix.Config
# Configures the endpoint
config :hello_phoenix, HelloPhoenix.Endpoint,
url: [host:... | 32.3 | 86 | 0.760578 |
d575abf3d706345aa40da1ef5d103442020eb0a2 | 121 | ex | Elixir | lib/doctor_schedule/repo.ex | adrianomota/doctor_schedule | 626eef47df8f1ff082c7a7d76342cb9c361c75a2 | [
"MIT"
] | 2 | 2022-03-11T12:15:01.000Z | 2022-03-11T13:53:21.000Z | lib/doctor_schedule/repo.ex | adrianomota/doctor_schedule | 626eef47df8f1ff082c7a7d76342cb9c361c75a2 | [
"MIT"
] | 3 | 2020-12-12T22:10:17.000Z | 2021-04-05T12:53:12.000Z | lib/doctor_schedule/repo.ex | adrianomota/doctor_schedule | 626eef47df8f1ff082c7a7d76342cb9c361c75a2 | [
"MIT"
] | 1 | 2021-02-26T04:24:34.000Z | 2021-02-26T04:24:34.000Z | defmodule DoctorSchedule.Repo do
use Ecto.Repo,
otp_app: :doctor_schedule,
adapter: Ecto.Adapters.Postgres
end
| 20.166667 | 35 | 0.760331 |
d575b27381bcb47ad53808def9e686956d51ffc4 | 1,528 | ex | Elixir | web/controllers/session_controller.ex | nihonjinrxs/peep-stack-tutorial-app | 8c10b2b589d645ba5a3e31f86754828579e139c9 | [
"MIT"
] | null | null | null | web/controllers/session_controller.ex | nihonjinrxs/peep-stack-tutorial-app | 8c10b2b589d645ba5a3e31f86754828579e139c9 | [
"MIT"
] | null | null | null | web/controllers/session_controller.ex | nihonjinrxs/peep-stack-tutorial-app | 8c10b2b589d645ba5a3e31f86754828579e139c9 | [
"MIT"
] | null | null | null | defmodule Peepchat.SessionController do
use Peepchat.Web, :controller
import Ecto.Query, only: [where: 2]
import Comeonin.Bcrypt
import Logger
alias Peepchat.User
def create(conn, %{"grant_type" => "password",
"username" => username,
"password" => password}) do
## Handle a user login
tr... | 29.384615 | 85 | 0.572644 |
d575b76d9f428ff5df919c4f0d5bf7d1baec7136 | 2,711 | ex | Elixir | lib/exzeitable/database.ex | clayscode/exzeitable | 312e7a0aebda51f5cd3ccee800c1d1affd9d4248 | [
"MIT"
] | null | null | null | lib/exzeitable/database.ex | clayscode/exzeitable | 312e7a0aebda51f5cd3ccee800c1d1affd9d4248 | [
"MIT"
] | null | null | null | lib/exzeitable/database.ex | clayscode/exzeitable | 312e7a0aebda51f5cd3ccee800c1d1affd9d4248 | [
"MIT"
] | null | null | null | defmodule Exzeitable.Database do
@moduledoc "Database interactions"
import Ecto.Query
@doc "Get the data using query"
@spec get_records(map) :: [map]
def get_records(%{query: query} = assigns) do
query
|> order_query(assigns)
|> search_query(assigns)
|> paginate_query(assigns)
|> get_quer... | 28.840426 | 93 | 0.628919 |
d5760166eaff3221328f8442b0c622884c1484fc | 1,082 | ex | Elixir | test/support/channel_case.ex | beltranaceves/docker_phx | 06a9cba602ccd4f054568b7a40ca36bedc9a3e27 | [
"MIT"
] | null | null | null | test/support/channel_case.ex | beltranaceves/docker_phx | 06a9cba602ccd4f054568b7a40ca36bedc9a3e27 | [
"MIT"
] | null | null | null | test/support/channel_case.ex | beltranaceves/docker_phx | 06a9cba602ccd4f054568b7a40ca36bedc9a3e27 | [
"MIT"
] | null | null | null | defmodule DockerPhxWeb.ChannelCase do
@moduledoc """
This module defines the test case to be used by
channel tests.
Such tests rely on `Phoenix.ChannelTest` and also
import other functionality to make it easier
to build common data structures and query the data layer.
Finally, if the test case interacts... | 27.05 | 71 | 0.728281 |
d5760d966c4d6d88e937200808bad1a0b42e0a29 | 6,613 | ex | Elixir | lib/oli_web/pow/pow_helpers.ex | ChristianMurphy/oli-torus | ffeee4996b66b7c6c6eb3e0082d030b8cc6cea97 | [
"MIT"
] | null | null | null | lib/oli_web/pow/pow_helpers.ex | ChristianMurphy/oli-torus | ffeee4996b66b7c6c6eb3e0082d030b8cc6cea97 | [
"MIT"
] | null | null | null | lib/oli_web/pow/pow_helpers.ex | ChristianMurphy/oli-torus | ffeee4996b66b7c6c6eb3e0082d030b8cc6cea97 | [
"MIT"
] | null | null | null | defmodule OliWeb.Pow.PowHelpers do
alias PowAssent.Plug
alias Phoenix.{HTML, HTML.Link, Naming}
alias PowAssent.Phoenix.AuthorizationController
def get_pow_config(:user) do
[
repo: Oli.Repo,
user: Oli.Accounts.User,
current_user_assigns_key: :current_user,
session_key: "user_auth",... | 30.615741 | 103 | 0.660064 |
d5761a314ae6d7e27a47e6b6dd991e0d7dfff45b | 719 | ex | Elixir | bidding_poc/lib/bidding_poc/user/user_store_agent.ex | KeenMate/phoenix-websocket-auction | 412148ad5621b511c0690b9395f4b6c9ce3a3352 | [
"MIT"
] | null | null | null | bidding_poc/lib/bidding_poc/user/user_store_agent.ex | KeenMate/phoenix-websocket-auction | 412148ad5621b511c0690b9395f4b6c9ce3a3352 | [
"MIT"
] | null | null | null | bidding_poc/lib/bidding_poc/user/user_store_agent.ex | KeenMate/phoenix-websocket-auction | 412148ad5621b511c0690b9395f4b6c9ce3a3352 | [
"MIT"
] | null | null | null | defmodule BiddingPoc.UserStoreAgent do
use Agent
def start_link(arg) do
# you may want to register your server with `name: __MODULE__`
# as a third argument to `start_link`
Agent.start_link(fn -> arg end, name: via_tuple(arg.user_id))
end
def via_tuple(user_id) do
{:via, Registry, {Registry.Us... | 23.966667 | 66 | 0.700974 |
d576273c34d5545c57eacb33e7607aebc5cba61b | 896 | ex | Elixir | clients/document_ai/lib/google_api/document_ai/v1beta3/metadata.ex | jamesvl/elixir-google-api | 6c87fb31d996f08fb42ce6066317e9d652a87acc | [
"Apache-2.0"
] | null | null | null | clients/document_ai/lib/google_api/document_ai/v1beta3/metadata.ex | jamesvl/elixir-google-api | 6c87fb31d996f08fb42ce6066317e9d652a87acc | [
"Apache-2.0"
] | null | null | null | clients/document_ai/lib/google_api/document_ai/v1beta3/metadata.ex | jamesvl/elixir-google-api | 6c87fb31d996f08fb42ce6066317e9d652a87acc | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 33.185185 | 74 | 0.762277 |
d57642456ad667620340fbec24729b93380e0498 | 600 | ex | Elixir | example/amex/lib/amex/user.ex | romul/xema | 8273e10645cf54e8765a197b1ff0c097994275d9 | [
"MIT"
] | 49 | 2018-06-05T09:42:19.000Z | 2022-02-15T12:50:51.000Z | example/amex/lib/amex/user.ex | romul/xema | 8273e10645cf54e8765a197b1ff0c097994275d9 | [
"MIT"
] | 152 | 2017-06-11T13:43:06.000Z | 2022-01-09T17:13:45.000Z | example/amex/lib/amex/user.ex | romul/xema | 8273e10645cf54e8765a197b1ff0c097994275d9 | [
"MIT"
] | 6 | 2019-05-31T05:41:47.000Z | 2021-12-14T08:09:36.000Z | defmodule Amex.User do
use Xema
alias Amex.{Grant, KeyValue, Location, UnixTimestamp}
@regex_uuid ~r/^[a-z0-9]{8}\-[a-z0-9]{4}\-[a-z0-9]{4}\-[a-z0-9]{4}\-[a-z0-9]{12}$/
xema do
field :id, :string, default: {UUID, :uuid4}, pattern: @regex_uuid
field :name, :string, min_length: 1
field :age, [:inte... | 30 | 84 | 0.645 |
d57665f9a7b25a5d4385aa2ec6f5610d4a5d33fd | 933 | exs | Elixir | test/plausible_web/controllers/api/stats_controller/operating_systems_test.exs | pmhoudry/plausible | 454feec36e62b866ae86e07a1f4133d9782d4365 | [
"MIT"
] | 1 | 2020-04-08T16:39:00.000Z | 2020-04-08T16:39:00.000Z | test/plausible_web/controllers/api/stats_controller/operating_systems_test.exs | pmhoudry/plausible | 454feec36e62b866ae86e07a1f4133d9782d4365 | [
"MIT"
] | null | null | null | test/plausible_web/controllers/api/stats_controller/operating_systems_test.exs | pmhoudry/plausible | 454feec36e62b866ae86e07a1f4133d9782d4365 | [
"MIT"
] | null | null | null | defmodule PlausibleWeb.Api.StatsController.OperatingSystemsTest do
use PlausibleWeb.ConnCase
import Plausible.TestUtils
describe "GET /api/stats/:domain/operating_systems" do
setup [:create_user, :log_in, :create_site]
test "returns operating systems by new visitors", %{conn: conn, site: site} do
... | 42.409091 | 109 | 0.665595 |
d57676b6944a9a7d6f002fb9f18571660b2b6e4e | 3,750 | exs | Elixir | mix.exs | moosecodebv/tesla | eb919a534aa115e7d1555d0c833fa2ebecbe5b9e | [
"MIT"
] | null | null | null | mix.exs | moosecodebv/tesla | eb919a534aa115e7d1555d0c833fa2ebecbe5b9e | [
"MIT"
] | null | null | null | mix.exs | moosecodebv/tesla | eb919a534aa115e7d1555d0c833fa2ebecbe5b9e | [
"MIT"
] | null | null | null | defmodule Tesla.Mixfile do
use Mix.Project
@version "1.4.0"
def project do
[
app: :tesla,
version: @version,
description: description(),
package: package(),
source_url: "https://github.com/teamon/tesla",
elixir: "~> 1.7",
elixirc_paths: elixirc_paths(Mix.env()),
... | 27.573529 | 77 | 0.5672 |
d5767a2b46bd660606fe8ea2aa28a24620c7cc00 | 869 | exs | Elixir | test/jumubase_web/views/internal/participant_view_test.exs | richeterre/jumubase-phoenix | 7584f890af117d496971b5284bf9de798e22266f | [
"MIT"
] | 2 | 2019-01-20T07:03:30.000Z | 2019-04-11T10:20:14.000Z | test/jumubase_web/views/internal/participant_view_test.exs | richeterre/jumubase-phoenix | 7584f890af117d496971b5284bf9de798e22266f | [
"MIT"
] | 6 | 2018-09-20T05:52:14.000Z | 2019-04-23T19:27:39.000Z | test/jumubase_web/views/internal/participant_view_test.exs | richeterre/jumubase-phoenix | 7584f890af117d496971b5284bf9de798e22266f | [
"MIT"
] | null | null | null | defmodule JumubaseWeb.Internal.ParticipantViewTest do
use JumubaseWeb.ConnCase, async: true
alias JumubaseWeb.Internal.ParticipantView
describe "full_name/1" do
test "returns a participant's full name" do
participant = build(:participant, given_name: "Jane", family_name: "Doe")
assert Participant... | 36.208333 | 79 | 0.695052 |
d5767d6d4f97ad8575f4bdee4ee471aed12dc740 | 1,811 | ex | Elixir | lib/oli_web/live/projects/table_model.ex | chrislawson/oli-torus | 94165b211ab74fac3e7c8a14110a394fa9a6f320 | [
"MIT"
] | null | null | null | lib/oli_web/live/projects/table_model.ex | chrislawson/oli-torus | 94165b211ab74fac3e7c8a14110a394fa9a6f320 | [
"MIT"
] | null | null | null | lib/oli_web/live/projects/table_model.ex | chrislawson/oli-torus | 94165b211ab74fac3e7c8a14110a394fa9a6f320 | [
"MIT"
] | null | null | null | defmodule OliWeb.Projects.TableModel do
alias OliWeb.Common.Table.{ColumnSpec, SortableTableModel}
use Surface.LiveComponent
alias OliWeb.Router.Helpers, as: Routes
def new(author, sections, include_status?) do
column_specs =
[
%ColumnSpec{
name: :title,
label: "Title",
... | 24.146667 | 101 | 0.547764 |
d576af8c58d5bfb5daa1f0084f86fdf8315c7cf0 | 5,322 | ex | Elixir | lib/ot/text/component.ex | LaudateCorpus1/ot_ex | 0e1c9c7c770a3979c71601a451c704ad0c995818 | [
"0BSD"
] | 3 | 2020-04-12T11:56:08.000Z | 2021-11-13T05:16:05.000Z | lib/ot/text/component.ex | LaudateCorpus1/ot_ex | 0e1c9c7c770a3979c71601a451c704ad0c995818 | [
"0BSD"
] | null | null | null | lib/ot/text/component.ex | LaudateCorpus1/ot_ex | 0e1c9c7c770a3979c71601a451c704ad0c995818 | [
"0BSD"
] | 6 | 2021-11-13T05:15:53.000Z | 2022-02-22T18:51:20.000Z | defmodule OT.Text.Component do
@moduledoc """
An individual unit of work to be performed on a piece of text.
A component represents a retain or modification of the text:
- `5`: Retain 5 characters of the text
- `%{i:"Hello"}`: Insert the string "Hello"
- `%{d:"World"}`: Delete the string "World... | 23.972973 | 82 | 0.60109 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.