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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
62c8d58d2ee9ef78c9e3cee08658377b77526b25 | 616 | ex | Elixir | apps/aecore/lib/aecore/peers/scheduler.ex | wuminzhe/elixir-node | eb87b47339a8349bac767dd4cf597dfaf0ed75c6 | [
"ISC"
] | null | null | null | apps/aecore/lib/aecore/peers/scheduler.ex | wuminzhe/elixir-node | eb87b47339a8349bac767dd4cf597dfaf0ed75c6 | [
"ISC"
] | null | null | null | apps/aecore/lib/aecore/peers/scheduler.ex | wuminzhe/elixir-node | eb87b47339a8349bac767dd4cf597dfaf0ed75c6 | [
"ISC"
] | null | null | null | defmodule Aecore.Peers.Scheduler do
use GenServer
alias Aecore.Peers.Worker, as: Peers
alias Aecore.Peers.Sync
@check_time 60_000
def start_link(_args) do
GenServer.start_link(__MODULE__, %{}, name: __MODULE__)
end
def init(running_tasks) do
schedule_work()
{:ok, running_tasks}
end
de... | 19.25 | 59 | 0.702922 |
62c8e9547efd8a323a0de7b78ee408dd99848acc | 701 | ex | Elixir | web/gettext.ex | chasm/elm_pack | 5bbdc4df335376170b6d161bfc65f9fc7eca2648 | [
"MIT"
] | 1 | 2016-08-02T00:36:46.000Z | 2016-08-02T00:36:46.000Z | web/gettext.ex | chasm/elm_pack | 5bbdc4df335376170b6d161bfc65f9fc7eca2648 | [
"MIT"
] | null | null | null | web/gettext.ex | chasm/elm_pack | 5bbdc4df335376170b6d161bfc65f9fc7eca2648 | [
"MIT"
] | null | null | null | defmodule ElmPack.Gettext do
@moduledoc """
A module providing Internationalization with a gettext-based API.
By using [Gettext](http://hexdocs.pm/gettext),
your module gains a set of macros for translations, for example:
import ElmPack.Gettext
# Simple translation
gettext "Here is the stri... | 28.04 | 71 | 0.677603 |
62c8eca6fb73a59c3a5d89c5d97ecdb1e0917ace | 718 | exs | Elixir | mix.exs | gossiperl/gossiperl-example-elixir | 80e6b8ff0a39bf5ada63e0d6a97bf24701c846bc | [
"MIT"
] | 1 | 2017-09-29T14:37:05.000Z | 2017-09-29T14:37:05.000Z | mix.exs | gossiperl/gossiperl-example-elixir | 80e6b8ff0a39bf5ada63e0d6a97bf24701c846bc | [
"MIT"
] | 1 | 2015-04-15T20:11:44.000Z | 2015-04-15T20:11:44.000Z | mix.exs | gossiperl/gossiperl-example-elixir | 80e6b8ff0a39bf5ada63e0d6a97bf24701c846bc | [
"MIT"
] | null | null | null | defmodule GossiperlClientElixir.Mixfile do
use Mix.Project
def project do
[app: :gossiperl_client_elixir,
version: "0.1.0",
elixir: "~> 1.0",
deps: deps]
end
# Configuration for the OTP application
#
# Type `mix help compile.app` for more information
def application do
[applicatio... | 23.16129 | 106 | 0.639276 |
62c943c7847b0e1274533bf016ca6871ac832939 | 157 | ex | Elixir | lib/hal/link.ex | podlove/hal | c9966e0958dafe977c2e131f158ee31c4d7a092e | [
"MIT"
] | 3 | 2019-02-19T04:32:48.000Z | 2021-07-28T00:19:28.000Z | lib/hal/link.ex | podlove/hal | c9966e0958dafe977c2e131f158ee31c4d7a092e | [
"MIT"
] | null | null | null | lib/hal/link.ex | podlove/hal | c9966e0958dafe977c2e131f158ee31c4d7a092e | [
"MIT"
] | null | null | null | defmodule HAL.Link do
defstruct [:rel, :href, :title]
@type t :: %__MODULE__{rel: String.t() | nil, href: String.t() | nil, title: String.t() | nil}
end
| 31.4 | 96 | 0.630573 |
62c95f208b470f65f7f2f5352a785db910474da7 | 681 | exs | Elixir | config/dev.exs | queer/singyeong | 3d2f5c1052100ed70bb3a4dddd8e22e3ef0df15a | [
"BSD-3-Clause"
] | 70 | 2018-10-25T06:06:37.000Z | 2022-03-14T19:51:56.000Z | config/dev.exs | queer/singyeong | 3d2f5c1052100ed70bb3a4dddd8e22e3ef0df15a | [
"BSD-3-Clause"
] | 140 | 2019-02-19T06:52:59.000Z | 2022-03-01T11:13:41.000Z | config/dev.exs | queer/singyeong | 3d2f5c1052100ed70bb3a4dddd8e22e3ef0df15a | [
"BSD-3-Clause"
] | 9 | 2019-03-20T12:17:28.000Z | 2021-03-11T18:51:00.000Z | use Mix.Config
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with brunch.io to recompile .js and .css sources.
config :singyeong, SingyeongWeb.Endpoint,
http: [port... | 30.954545 | 68 | 0.751836 |
62c9637cbd39d0d798b382471ca1cbf625baea54 | 20,020 | ex | Elixir | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/api/user_roles.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/api/user_roles.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/api/user_roles.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... | 46.235566 | 480 | 0.617632 |
62c96b79e39214cd15aca0699d1b88ba0897564d | 732 | ex | Elixir | lib/weebo/response.ex | stevenschobert/weebo | 630084458fbd6a1adad0296c4752fdd5f6a00490 | [
"MIT"
] | 6 | 2015-06-08T07:34:57.000Z | 2019-03-30T06:49:02.000Z | lib/weebo/response.ex | stevenschobert/weebo | 630084458fbd6a1adad0296c4752fdd5f6a00490 | [
"MIT"
] | null | null | null | lib/weebo/response.ex | stevenschobert/weebo | 630084458fbd6a1adad0296c4752fdd5f6a00490 | [
"MIT"
] | null | null | null | defmodule Weebo.Response do
@moduledoc "Struct used to represent an XML-RPC response."
defstruct error: nil, params: []
@type t :: %Weebo.Response{error: map | nil, params: list}
end
defimpl Weebo.Formattable, for: Weebo.Response do
@spec format(Weebo.Response.t) :: Weebo.xml_tree
def format(response) do
... | 33.272727 | 84 | 0.647541 |
62c96fcbb2995d5b197852b8deaa93c0d7a705a2 | 8,541 | exs | Elixir | test/tpuserve/model_test.exs | seanmor5/tpuserve | 0a0a5fb74457b3893d87cb52bf98a660f8d1190d | [
"Apache-2.0"
] | null | null | null | test/tpuserve/model_test.exs | seanmor5/tpuserve | 0a0a5fb74457b3893d87cb52bf98a660f8d1190d | [
"Apache-2.0"
] | null | null | null | test/tpuserve/model_test.exs | seanmor5/tpuserve | 0a0a5fb74457b3893d87cb52bf98a660f8d1190d | [
"Apache-2.0"
] | null | null | null | defmodule TPUServe.ModelTest do
use ExUnit.Case
import TestUtils
import Nx.Defn
@unsigned_types [{:u, 8}, {:u, 16}, {:u, 32}]
@signed_types [{:s, 8}, {:s, 16}, {:s, 32}]
@float_types [{:bf, 16}, {:f, 16}, {:f, 32}]
@integer_types @unsigned_types ++ @signed_types
@all_types @unsigned_types ++ @signed_... | 27.375 | 109 | 0.523826 |
62c9852fafa69abf29226d2df54461f60e14704e | 3,630 | exs | Elixir | test/open_exchange_rates_test.exs | venndr/open_exchange_rates | 1e679ac05d8ac924a7329543ec61bd92a0a646ba | [
"MIT"
] | 5 | 2016-08-07T13:57:56.000Z | 2020-10-05T17:17:17.000Z | test/open_exchange_rates_test.exs | venndr/open_exchange_rates | 1e679ac05d8ac924a7329543ec61bd92a0a646ba | [
"MIT"
] | null | null | null | test/open_exchange_rates_test.exs | venndr/open_exchange_rates | 1e679ac05d8ac924a7329543ec61bd92a0a646ba | [
"MIT"
] | 5 | 2018-07-01T17:41:40.000Z | 2021-03-31T19:06:47.000Z | defmodule OpenExchangeRatesTest do
use ExUnit.Case
doctest OpenExchangeRates
test "currencies" do
assert 172 = OpenExchangeRates.available_currencies |> Enum.count
end
test "convert non existing currency" do
assert {:error, "unknown currency: BLA"} = OpenExchangeRates.convert_cents(100, :BLA, :EUR)
... | 44.268293 | 126 | 0.712672 |
62c9c34b066d46d726c68fe2da0048b5c053917c | 567 | ex | Elixir | community/betterdev/lib/betterdev/web/views/changeset_view.ex | earthrid/betterdev.link | b8efe279e82810075ba36673483f7f4d6862bc19 | [
"MIT"
] | 79 | 2017-07-03T13:04:08.000Z | 2022-02-11T13:59:37.000Z | community/betterdev/lib/betterdev/web/views/changeset_view.ex | earthrid/betterdev.link | b8efe279e82810075ba36673483f7f4d6862bc19 | [
"MIT"
] | 16 | 2017-07-09T03:16:27.000Z | 2022-01-14T14:29:57.000Z | community/betterdev/lib/betterdev/web/views/changeset_view.ex | earthrid/betterdev.link | b8efe279e82810075ba36673483f7f4d6862bc19 | [
"MIT"
] | 10 | 2017-07-09T02:58:59.000Z | 2021-09-14T08:01:02.000Z | defmodule Betterdev.Web.ChangesetView do
use Betterdev.Web, :view
@doc """
Traverses and translates changeset errors.
See `Ecto.Changeset.traverse_errors/2` and
`Betterdev.Web.ErrorHelpers.translate_error/1` for more details.
"""
def translate_errors(changeset) do
Ecto.Changeset.traverse_errors(chan... | 28.35 | 66 | 0.737213 |
62c9c71438aea48f135b508b34b49c31a22e1b33 | 8,954 | ex | Elixir | lib/xandra/cluster/control_connection.ex | alisina-platogo/xandra | e205b1f1fd0d5c6249c58c7e28fb502ee7c35b3d | [
"ISC"
] | null | null | null | lib/xandra/cluster/control_connection.ex | alisina-platogo/xandra | e205b1f1fd0d5c6249c58c7e28fb502ee7c35b3d | [
"ISC"
] | null | null | null | lib/xandra/cluster/control_connection.ex | alisina-platogo/xandra | e205b1f1fd0d5c6249c58c7e28fb502ee7c35b3d | [
"ISC"
] | null | null | null | defmodule Xandra.Cluster.ControlConnection do
@moduledoc false
@behaviour :gen_statem
alias Xandra.{Frame, Simple, Connection.Utils}
require Logger
@default_backoff 5_000
@default_timeout 5_000
@forced_transport_options [packet: :raw, mode: :binary, active: false]
defstruct [
:cluster,
:nod... | 32.09319 | 97 | 0.654791 |
62c9f3920672ed91e0490318fce46b8d93325b65 | 18,053 | exs | Elixir | test/phoenix_ecto/inputs_for_test.exs | edwinthinks/phoenix_ecto | 6c91a5c18fb05f39d6b422dfb3f8c99456f85d18 | [
"MIT"
] | null | null | null | test/phoenix_ecto/inputs_for_test.exs | edwinthinks/phoenix_ecto | 6c91a5c18fb05f39d6b422dfb3f8c99456f85d18 | [
"MIT"
] | null | null | null | test/phoenix_ecto/inputs_for_test.exs | edwinthinks/phoenix_ecto | 6c91a5c18fb05f39d6b422dfb3f8c99456f85d18 | [
"MIT"
] | null | null | null | defmodule PhoenixEcto.InputsForTest do
use ExUnit.Case, async: true
import Ecto.Changeset
import Phoenix.HTML
import Phoenix.HTML.Form
## inputs_for has_one
test "has one: inputs_for/4" do
changeset =
%User{}
|> cast(%{}, ~w()a)
|> cast_assoc(:comment)
contents =
safe_inp... | 34.321293 | 114 | 0.558688 |
62c9f87680d3dbf080b6b6afa28126603a9f7d40 | 1,043 | ex | Elixir | lib/type_check/builtin/range.ex | ktec/elixir-type_check | 42bde40b4a67e999653c5336294dc651c98a747a | [
"MIT"
] | null | null | null | lib/type_check/builtin/range.ex | ktec/elixir-type_check | 42bde40b4a67e999653c5336294dc651c98a747a | [
"MIT"
] | null | null | null | lib/type_check/builtin/range.ex | ktec/elixir-type_check | 42bde40b4a67e999653c5336294dc651c98a747a | [
"MIT"
] | null | null | null | defmodule TypeCheck.Builtin.Range do
defstruct [:range]
use TypeCheck
@type! t :: %__MODULE__{range: any()}
@type! problem_tuple ::
{t(), :not_an_integer, %{}, any()}
| {t(), :not_in_range, %{}, integer()}
defimpl TypeCheck.Protocols.ToCheck do
def to_check(s = %{range: range}, param)... | 24.833333 | 86 | 0.590604 |
62ca0a6b4c71b764d11057c6e45e16d2c897b1ff | 517 | ex | Elixir | lib/medivh_web/router.ex | vanetix/medivh | 8ad3c05715aed34855d9539c60ec617996bed507 | [
"MIT"
] | 1 | 2019-12-04T20:29:27.000Z | 2019-12-04T20:29:27.000Z | lib/medivh_web/router.ex | vanetix/medivh | 8ad3c05715aed34855d9539c60ec617996bed507 | [
"MIT"
] | null | null | null | lib/medivh_web/router.ex | vanetix/medivh | 8ad3c05715aed34855d9539c60ec617996bed507 | [
"MIT"
] | null | null | null | defmodule MedivhWeb.Router do
use MedivhWeb, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
end
pipeline :api do
plug :accepts, ["json"]
end
scope "/", MedivhWeb do
pipe_thr... | 19.148148 | 57 | 0.676983 |
62ca1c75cce9d4991f90cce421a68be1764070cf | 1,021 | ex | Elixir | lib/web/endpoint.ex | mbuhot/irateburgers | 3ea07805501c10ef9b04cee04c22c36582f26e1e | [
"MIT"
] | 1 | 2020-01-13T09:27:21.000Z | 2020-01-13T09:27:21.000Z | lib/web/endpoint.ex | mbuhot/irateburgers | 3ea07805501c10ef9b04cee04c22c36582f26e1e | [
"MIT"
] | null | null | null | lib/web/endpoint.ex | mbuhot/irateburgers | 3ea07805501c10ef9b04cee04c22c36582f26e1e | [
"MIT"
] | null | null | null | defmodule Irateburgers.Web.Endpoint do
use Phoenix.Endpoint, otp_app: :irateburgers
plug Plug.RequestId
plug Plug.Logger
plug Plug.Parsers,
parsers: [:urlencoded, :multipart, :json],
pass: ["*/*"],
json_decoder: Poison
# The session will be stored in the cookie and signed,
# this means its con... | 30.029412 | 93 | 0.714985 |
62ca8035ece42a3e1c3c0f729ca7ed46d89d23d5 | 1,398 | ex | Elixir | lib/custodian_web.ex | newaperio/custodian | 6614fa63f5aeb88be82927548522617f3d877faf | [
"MIT"
] | 4 | 2018-01-24T19:58:37.000Z | 2021-09-18T13:08:16.000Z | lib/custodian_web.ex | newaperio/custodian | 6614fa63f5aeb88be82927548522617f3d877faf | [
"MIT"
] | 12 | 2017-12-26T21:46:34.000Z | 2019-05-15T17:39:22.000Z | lib/custodian_web.ex | newaperio/custodian | 6614fa63f5aeb88be82927548522617f3d877faf | [
"MIT"
] | 1 | 2018-08-28T16:49:05.000Z | 2018-08-28T16:49:05.000Z | defmodule CustodianWeb do
@moduledoc """
The entrypoint for defining your web interface, such
as controllers, views, channels and so on.
This can be used in your application as:
use CustodianWeb, :controller
use CustodianWeb, :view
The definitions below will be executed for every view,
contro... | 22.548387 | 69 | 0.693133 |
62ca9a0c850782f1685273fbda3dc0f0e5ec6f90 | 4,434 | ex | Elixir | lib/edgedb/protocol/codecs/builtin/named_tuple.ex | nsidnev/edgedb-elixir | bade2b9daba2e83bfaa5915b2addb74f41610968 | [
"MIT"
] | 30 | 2021-05-19T08:54:44.000Z | 2022-03-11T22:52:25.000Z | lib/edgedb/protocol/codecs/builtin/named_tuple.ex | nsidnev/edgedb-elixir | bade2b9daba2e83bfaa5915b2addb74f41610968 | [
"MIT"
] | 3 | 2021-11-17T21:26:01.000Z | 2022-03-12T09:49:25.000Z | lib/edgedb/protocol/codecs/builtin/named_tuple.ex | nsidnev/edgedb-elixir | bade2b9daba2e83bfaa5915b2addb74f41610968 | [
"MIT"
] | 3 | 2021-08-29T14:55:41.000Z | 2022-03-12T01:30:35.000Z | defmodule EdgeDB.Protocol.Codecs.Builtin.NamedTuple do
use EdgeDB.Protocol.Codec
import EdgeDB.Protocol.Types.{
TupleElement,
NamedTupleDescriptorElement
}
alias EdgeDB.Protocol.{
Datatypes,
Error,
Types
}
defcodec(type: EdgeDB.NamedTuple.t())
@spec new(
Datatypes.UUID.t(... | 28.423077 | 96 | 0.65945 |
62ca9e1da63a91a5040a5a8fb8c23a513172e600 | 546 | ex | Elixir | lib/core.ex | codebay/mastermind | 5f983b2e8b7ba488c8cd34d61fceb635174c07ea | [
"Apache-2.0"
] | null | null | null | lib/core.ex | codebay/mastermind | 5f983b2e8b7ba488c8cd34d61fceb635174c07ea | [
"Apache-2.0"
] | null | null | null | lib/core.ex | codebay/mastermind | 5f983b2e8b7ba488c8cd34d61fceb635174c07ea | [
"Apache-2.0"
] | null | null | null | defmodule Mastermind.Core do
@number_of_pins 4
def score(code, guess) do
%{
red: well_placed_colours(code, guess),
white: misplaced_colours(code, guess)
}
end
defp well_placed_colours(code, guess) do
guess
|> Enum.zip(code)
|> Enum.count(&same?/1)
end
defp same?({x,y}), do... | 20.222222 | 69 | 0.663004 |
62cab484642190eebf69f1916f2105fdfb88feac | 1,128 | exs | Elixir | mix.exs | JonnyPower/hlds_logs | be0b58bc5f482da7c6f31cfe3e699875d40ae719 | [
"MIT"
] | 2 | 2021-09-12T00:11:44.000Z | 2022-02-13T20:45:40.000Z | mix.exs | JonnyPower/hlds_logs | be0b58bc5f482da7c6f31cfe3e699875d40ae719 | [
"MIT"
] | 1 | 2018-11-19T04:47:38.000Z | 2018-11-19T04:47:38.000Z | mix.exs | JonnyPower/hlds_logs | be0b58bc5f482da7c6f31cfe3e699875d40ae719 | [
"MIT"
] | null | null | null | defmodule HLDSLogs.MixProject do
use Mix.Project
def project do
[
app: :hlds_logs,
version: "0.1.1",
elixir: "~> 1.7",
start_permanent: Mix.env() == :prod,
deps: deps(),
description: description(),
package: package(),
name: "HLDSLogs",
source_url: "https:/... | 21.283019 | 100 | 0.569149 |
62cb1817e6b431373f4f2f69e9265371e2e598a2 | 128 | ex | Elixir | lib/doc_gen_web/views/embed_view.ex | the-mikedavis/doc_gen | efcc884ea65bba5748f41c5601abd00db2777ec4 | [
"BSD-3-Clause"
] | null | null | null | lib/doc_gen_web/views/embed_view.ex | the-mikedavis/doc_gen | efcc884ea65bba5748f41c5601abd00db2777ec4 | [
"BSD-3-Clause"
] | 27 | 2018-10-29T18:34:44.000Z | 2019-03-11T18:43:12.000Z | lib/doc_gen_web/views/embed_view.ex | the-mikedavis/doc_gen | efcc884ea65bba5748f41c5601abd00db2777ec4 | [
"BSD-3-Clause"
] | null | null | null | defmodule DocGenWeb.EmbedView do
use DocGenWeb, :view
def title(_, %{title: title}), do: title <> " - Full Interviews"
end
| 21.333333 | 66 | 0.6875 |
62cb44e379e9b216fa04f0f2d5e6d74e28e53bed | 471 | ex | Elixir | lib/unplug/predicates/request_header_not_equals.ex | akoutmos/unplug | da8a775e6a8232016d36cdfe1871c807e9e6eb01 | [
"MIT"
] | 26 | 2020-04-13T04:31:42.000Z | 2022-01-19T21:12:21.000Z | lib/unplug/predicates/request_header_not_equals.ex | akoutmos/unplug | da8a775e6a8232016d36cdfe1871c807e9e6eb01 | [
"MIT"
] | null | null | null | lib/unplug/predicates/request_header_not_equals.ex | akoutmos/unplug | da8a775e6a8232016d36cdfe1871c807e9e6eb01 | [
"MIT"
] | 1 | 2021-09-21T00:17:28.000Z | 2021-09-21T00:17:28.000Z | defmodule Unplug.Predicates.RequestHeaderNotEquals do
@moduledoc """
Given a request header, do not execute the plug if the request value matches
the expected value.
Usage:
```elixir
plug Unplug,
if: {Unplug.Predicates.RequestHeaderNotEquals, {"authorization", "super_secret"}},
do: MyApp.Plug
```... | 22.428571 | 86 | 0.717622 |
62cb49335da1e9b06fa09d60ce607293cf3f245a | 2,743 | ex | Elixir | lib/hex/config.ex | hrzndhrn/hex | f74e2ed979e74130bdc4a6974660aa986333f33f | [
"Apache-2.0"
] | 824 | 2015-01-05T09:12:36.000Z | 2022-03-28T12:02:29.000Z | lib/hex/config.ex | hrzndhrn/hex | f74e2ed979e74130bdc4a6974660aa986333f33f | [
"Apache-2.0"
] | 737 | 2015-01-01T05:48:46.000Z | 2022-03-29T12:56:12.000Z | lib/hex/config.ex | hrzndhrn/hex | f74e2ed979e74130bdc4a6974660aa986333f33f | [
"Apache-2.0"
] | 220 | 2015-03-14T17:55:11.000Z | 2022-03-23T22:17:07.000Z | defmodule Hex.Config do
@moduledoc false
def read() do
case File.read(config_path()) do
{:ok, binary} ->
case decode_term(binary) do
{:ok, term} ->
term
{:error, _} ->
config = decode_elixir(binary)
write(config)
config
... | 21.1 | 73 | 0.582938 |
62cb5ea31b3814f5282facc5bdf88f2b50bd8fa4 | 1,028 | ex | Elixir | lib/bible_study_spreadsheet/application.ex | dbishai/bible-study-spreadsheet | 9009cf8c343c215b2d8d6c1d8d24fd1ed2219434 | [
"MIT"
] | null | null | null | lib/bible_study_spreadsheet/application.ex | dbishai/bible-study-spreadsheet | 9009cf8c343c215b2d8d6c1d8d24fd1ed2219434 | [
"MIT"
] | 1 | 2021-03-10T06:25:15.000Z | 2021-03-10T06:25:15.000Z | lib/bible_study_spreadsheet/application.ex | dbishai/bible-study-spreadsheet | 9009cf8c343c215b2d8d6c1d8d24fd1ed2219434 | [
"MIT"
] | null | null | null | defmodule BibleStudySpreadsheet.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
# List all child processes to be supervised
children = [
# Start the Ecto repository
Bibl... | 32.125 | 80 | 0.741245 |
62cb5fb8ed8a1beaf75e316ca69149f62f0e3fe6 | 990 | exs | Elixir | test/changelog_web/controllers/admin/podcast_subscription_controller_test.exs | type1fool/changelog.com | fbec3528cc3f5adfdc75b008bb92b17efc4f248f | [
"MIT"
] | 1 | 2020-05-20T16:58:17.000Z | 2020-05-20T16:58:17.000Z | test/changelog_web/controllers/admin/podcast_subscription_controller_test.exs | type1fool/changelog.com | fbec3528cc3f5adfdc75b008bb92b17efc4f248f | [
"MIT"
] | null | null | null | test/changelog_web/controllers/admin/podcast_subscription_controller_test.exs | type1fool/changelog.com | fbec3528cc3f5adfdc75b008bb92b17efc4f248f | [
"MIT"
] | null | null | null | defmodule ChangelogWeb.Admin.PodcastSubscriptionControllerTest do
use ChangelogWeb.ConnCase
@tag :as_admin
test "lists all subs on index", %{conn: conn} do
podcast = insert(:podcast)
p1 = insert(:person)
p2 = insert(:person)
insert(:subscription_on_podcast, podcast: podcast, person: p1)
inser... | 31.935484 | 88 | 0.708081 |
62cb6a4605c94b08149020979c66349d1074a689 | 9,142 | exs | Elixir | test/syntax/expect_test.exs | sproutapp/pavlov | 7f3c0d7c75c8c2875e21b495511a291194bfc85a | [
"MIT"
] | 148 | 2015-01-04T16:44:30.000Z | 2022-02-15T03:08:28.000Z | test/syntax/expect_test.exs | sproutapp/pavlov | 7f3c0d7c75c8c2875e21b495511a291194bfc85a | [
"MIT"
] | 25 | 2015-01-05T16:24:24.000Z | 2016-05-05T05:28:07.000Z | test/syntax/expect_test.exs | sproutapp/pavlov | 7f3c0d7c75c8c2875e21b495511a291194bfc85a | [
"MIT"
] | 11 | 2015-01-06T11:08:29.000Z | 2019-11-10T01:41:45.000Z | defmodule PavlovExpectTest do
use Pavlov.Case, async: true
import Pavlov.Syntax.Expect
import Pavlov.Matchers.Messages
describe ".is_expected" do
subject do: 5
context "without a message" do
it is_expected |> to_eq 5
end
context "with a message" do
it "is equal to 5" do
is... | 29.395498 | 130 | 0.609495 |
62cb956a58c59d2aaa7b503369388d8cd71d050b | 684 | ex | Elixir | issues/lib/issues/github_issues.ex | nespera/progr-elixir-1.6 | d8b5751d5106ce81e440e2ad0a28abb0d00b18a2 | [
"Apache-2.0"
] | null | null | null | issues/lib/issues/github_issues.ex | nespera/progr-elixir-1.6 | d8b5751d5106ce81e440e2ad0a28abb0d00b18a2 | [
"Apache-2.0"
] | null | null | null | issues/lib/issues/github_issues.ex | nespera/progr-elixir-1.6 | d8b5751d5106ce81e440e2ad0a28abb0d00b18a2 | [
"Apache-2.0"
] | null | null | null | defmodule Issues.GithubIssues do
# use a module attribute to fetch the value at compile time
@github_url Application.get_env(:issues, :github_url)
@user_agent [ {"User-agent", "Elixir c@24.org.uk"} ]
def fetch(user, project) do
issues_url(user, project)
|> HTTPoison.get(@user_agent)
|> handle_re... | 25.333333 | 71 | 0.662281 |
62cbac7cf10d30642c57f5dfada036835394a66f | 80 | exs | Elixir | postgis-ecto/gis_demo/test/gis_demo_web/views/page_view_test.exs | wisq/slides | e0a1b9dd8187b82c8772b4e6ab20f8b069e1feb1 | [
"MIT"
] | null | null | null | postgis-ecto/gis_demo/test/gis_demo_web/views/page_view_test.exs | wisq/slides | e0a1b9dd8187b82c8772b4e6ab20f8b069e1feb1 | [
"MIT"
] | null | null | null | postgis-ecto/gis_demo/test/gis_demo_web/views/page_view_test.exs | wisq/slides | e0a1b9dd8187b82c8772b4e6ab20f8b069e1feb1 | [
"MIT"
] | null | null | null | defmodule GisDemoWeb.PageViewTest do
use GisDemoWeb.ConnCase, async: true
end
| 20 | 38 | 0.825 |
62cbd601aa975f8dd59caa0cb7c26a68a240d961 | 47,934 | ex | Elixir | lib/elixir/lib/kernel/special_forms.ex | gabrielelana/elixir | 7e78113f925d438568b7efa8eaded5ae43dce4b1 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/kernel/special_forms.ex | gabrielelana/elixir | 7e78113f925d438568b7efa8eaded5ae43dce4b1 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/kernel/special_forms.ex | gabrielelana/elixir | 7e78113f925d438568b7efa8eaded5ae43dce4b1 | [
"Apache-2.0"
] | null | null | null | defmodule Kernel.SpecialForms do
@moduledoc """
In this module we define Elixir special forms. Special forms
cannot be overridden by the developer and are the basic
building blocks of Elixir code.
Some of those forms are lexical (like `alias`, `case`, etc).
The macros `{}` and `<<>>` are also special forms... | 27.359589 | 115 | 0.638837 |
62cbe5c401a428ecf875def8962ba02393ec098e | 2,811 | ex | Elixir | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_l_diversity_histogram_bucket.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_l_diversity_histogram_bucket.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_l_diversity_histogram_bucket.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 43.246154 | 239 | 0.743152 |
62cbee146ab056ad3e63929e3d78780169a1f885 | 31 | ex | Elixir | testData/org/elixir_lang/parser_definition/matched_dot_operation_parsing_test_case/StringHeredoc.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/matched_dot_operation_parsing_test_case/StringHeredoc.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/matched_dot_operation_parsing_test_case/StringHeredoc.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 145 | 2015-01-15T11:37:16.000Z | 2021-12-22T05:51:02.000Z | """
One
"""."""
Two
""" | 6.2 | 7 | 0.193548 |
62cc3742cce3e346f0b140d66b99b3e5df2fe083 | 2,416 | ex | Elixir | lib/trifolium/api.ex | daskycodes/trifolium | 322f01f89948c51d974e64b049ca2ce2d0f8b45f | [
"MIT"
] | 1 | 2021-04-19T15:09:35.000Z | 2021-04-19T15:09:35.000Z | lib/trifolium/api.ex | daskycodes/trifolium | 322f01f89948c51d974e64b049ca2ce2d0f8b45f | [
"MIT"
] | 1 | 2021-04-19T18:08:05.000Z | 2021-04-19T18:08:05.000Z | lib/trifolium/api.ex | daskycodes/trifolium | 322f01f89948c51d974e64b049ca2ce2d0f8b45f | [
"MIT"
] | 2 | 2021-04-19T15:09:39.000Z | 2021-04-28T14:05:21.000Z | defmodule Trifolium.API do
@moduledoc """
Thin helper functions to enhance requests to Trefle API.
"""
@type response :: {:ok, %{}} | {:error, non_neg_integer(), %{}}
@doc """
Builds a query params map, which contains the token
used to communicate with Trefle API, along with
the keywords which shoul... | 38.349206 | 99 | 0.665977 |
62cc8992ba64564e244371d9276e1c9875b59c26 | 6,850 | ex | Elixir | lib/stripe/subscriptions.ex | blitzstudios/stripity-stripe | 09034dcc5e01499c0e14a677e21891a2a4307a05 | [
"BSD-3-Clause"
] | 1 | 2020-05-03T15:41:49.000Z | 2020-05-03T15:41:49.000Z | lib/stripe/subscriptions.ex | jakhongirruziev/stripity-stripe | 09034dcc5e01499c0e14a677e21891a2a4307a05 | [
"BSD-3-Clause"
] | null | null | null | lib/stripe/subscriptions.ex | jakhongirruziev/stripity-stripe | 09034dcc5e01499c0e14a677e21891a2a4307a05 | [
"BSD-3-Clause"
] | 2 | 2016-08-23T21:06:49.000Z | 2020-02-13T16:04:16.000Z | defmodule Stripe.Subscriptions do
@moduledoc """
Main API for working with Subscriptions at Stripe. Through this API you can:
- create
- change
- retrieve
- cancel
- cancel_all
- list all
- count all
Supports Connect workflow by allowing to pass in any API key explicitely (vs using the one from env... | 25.183824 | 120 | 0.669927 |
62ccd61f246495243ea26f8957cfad70077dbc62 | 2,451 | ex | Elixir | lib/vintage_net/interface/command_runner.ex | axelson/vintage_net | 68866ff223fa40e7ad6fd4d9fb2f7960cf51b1ca | [
"Apache-2.0"
] | null | null | null | lib/vintage_net/interface/command_runner.ex | axelson/vintage_net | 68866ff223fa40e7ad6fd4d9fb2f7960cf51b1ca | [
"Apache-2.0"
] | null | null | null | lib/vintage_net/interface/command_runner.ex | axelson/vintage_net | 68866ff223fa40e7ad6fd4d9fb2f7960cf51b1ca | [
"Apache-2.0"
] | null | null | null | defmodule VintageNet.Interface.CommandRunner do
@moduledoc """
The CommandRunner module runs commands specified in RawConfigs
See the `RawConfig` documentation for where lists of commands
are specified. The following commands are supported:
* `{:run, command, args}` - Run a system command
* `{:run_ignore_... | 24.757576 | 91 | 0.636475 |
62cce6c64378b9e021db91bd63bbe8308b85a441 | 1,184 | ex | Elixir | lib/darknet_to_onnx/upsampleparams.ex | stefkohub/darknet_to_onnx | 1d378a4dd33452e7eba7a6174e4a13a210fa8cb6 | [
"MIT"
] | 1 | 2021-12-05T10:52:26.000Z | 2021-12-05T10:52:26.000Z | lib/darknet_to_onnx/upsampleparams.ex | stefkohub/darknet_to_onnx | 1d378a4dd33452e7eba7a6174e4a13a210fa8cb6 | [
"MIT"
] | 3 | 2021-12-17T10:12:22.000Z | 2022-02-28T12:17:21.000Z | lib/darknet_to_onnx/upsampleparams.ex | stefkohub/darknet_to_onnx | 1d378a4dd33452e7eba7a6174e4a13a210fa8cb6 | [
"MIT"
] | null | null | null | defmodule DarknetToOnnx.UpsampleParams do
@moduledoc """
Helper class to store the scale parameter for an Upsample node.
"""
use Agent, restart: :transient
@doc """
Constructor based on the base node name (e.g. 86_Upsample),
and the value of the scale input tensor.
Keyword argument... | 28.878049 | 92 | 0.686655 |
62ccf9ea32ed241cb41dafb19a020a2b8391a1e2 | 2,232 | ex | Elixir | lib/hexpm/repository/owners.ex | thiamsantos/hexpm | 790bae9e761fe9b2dd6901618054ad533ef24599 | [
"Apache-2.0"
] | null | null | null | lib/hexpm/repository/owners.ex | thiamsantos/hexpm | 790bae9e761fe9b2dd6901618054ad533ef24599 | [
"Apache-2.0"
] | null | null | null | lib/hexpm/repository/owners.ex | thiamsantos/hexpm | 790bae9e761fe9b2dd6901618054ad533ef24599 | [
"Apache-2.0"
] | null | null | null | defmodule Hexpm.Repository.Owners do
use HexpmWeb, :context
def all(package, preload \\ []) do
assoc(package, :package_owners)
|> Repo.all()
|> Repo.preload(preload)
end
def get(package, user) do
if owner = Repo.get_by(PackageOwner, package_id: package.id, user_id: user.id) do
%{owner | ... | 27.9 | 85 | 0.592294 |
62cd11c4525e9d2b3cdaed56be592133e2ec04ad | 32,795 | ex | Elixir | clients/classroom/lib/google_api/classroom/v1/api/user_profiles.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/classroom/lib/google_api/classroom/v1/api/user_profiles.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/classroom/lib/google_api/classroom/v1/api/user_profiles.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... | 65.985915 | 1,807 | 0.693246 |
62cd1b6020b11dc24c83550603baebf980cd93c8 | 183 | exs | Elixir | strategy/plain_text_formatter.exs | joshnuss/design-patterns-in-elixir | 7f07cae0701ad460b6b275e382fad03324656989 | [
"MIT"
] | 516 | 2015-09-25T18:43:37.000Z | 2022-03-22T16:33:08.000Z | strategy/plain_text_formatter.exs | joshnuss/design-patterns-in-elixir | 7f07cae0701ad460b6b275e382fad03324656989 | [
"MIT"
] | 2 | 2017-10-01T22:33:34.000Z | 2019-02-21T18:21:54.000Z | strategy/plain_text_formatter.exs | joshnuss/design-patterns-in-elixir | 7f07cae0701ad460b6b275e382fad03324656989 | [
"MIT"
] | 52 | 2015-11-15T05:58:45.000Z | 2022-01-21T20:01:17.000Z | defmodule PlainTextFormatter do
@behaviour Formatter
def output_report(context) do
IO.puts("***** #{context.title} *****")
Enum.each(context.text, &IO.puts/1)
end
end
| 18.3 | 43 | 0.666667 |
62cd4a7a019127cee696d31e5155e6384891b58a | 578 | exs | Elixir | lv_sample/config/test.exs | tetsuya-ishida/LiveView | 2a8290b3e0a4c735390b7d3d17ced36638406f54 | [
"Apache-2.0"
] | null | null | null | lv_sample/config/test.exs | tetsuya-ishida/LiveView | 2a8290b3e0a4c735390b7d3d17ced36638406f54 | [
"Apache-2.0"
] | null | null | null | lv_sample/config/test.exs | tetsuya-ishida/LiveView | 2a8290b3e0a4c735390b7d3d17ced36638406f54 | [
"Apache-2.0"
] | null | null | null | import Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :lv_sample, LvSampleWeb.Endpoint,
http: [ip: {127, 0, 0, 1}, port: 4002],
secret_key_base: "l+6eP3jGMw2i/XG+PE5m0qFH4kojxj3lHBSD9i2yMt7clw/a9yGIeS3JAXWVO31u",
server: false
# In test we don't ... | 30.421053 | 86 | 0.761246 |
62cd62b6504daf0b764001133b0ab7b14bcc286d | 925 | ex | Elixir | lib/rfx_cli/state.ex | andyl/rfxi | 9007c75693d643555c45a20e9634dd4b3867deba | [
"MIT"
] | 1 | 2021-08-10T14:46:10.000Z | 2021-08-10T14:46:10.000Z | lib/rfx_cli/state.ex | andyl/rfxi | 9007c75693d643555c45a20e9634dd4b3867deba | [
"MIT"
] | 2 | 2021-06-22T14:12:37.000Z | 2021-06-28T05:06:23.000Z | lib/rfx_cli/state.ex | andyl/rfxi | 9007c75693d643555c45a20e9634dd4b3867deba | [
"MIT"
] | null | null | null | defmodule RfxCli.State do
@moduledoc """
Defines a state token that is used by the command-line parser.
The state is used by the pipeline in RfxCli.Main module.
Fields:
- in_repl? / is the CLI running from within the Repl?
- argv / the command-line input
- optimus_data / results from the Opt... | 24.342105 | 64 | 0.637838 |
62cdcedd25bb29db54fe99d77c8990be0fdd9100 | 390 | ex | Elixir | phoenix_commerce/web/views/error_view.ex | enilsen16/elixir | b4d1d45858a25e4beb39e07de8685f3d93d6a520 | [
"MIT"
] | null | null | null | phoenix_commerce/web/views/error_view.ex | enilsen16/elixir | b4d1d45858a25e4beb39e07de8685f3d93d6a520 | [
"MIT"
] | null | null | null | phoenix_commerce/web/views/error_view.ex | enilsen16/elixir | b4d1d45858a25e4beb39e07de8685f3d93d6a520 | [
"MIT"
] | null | null | null | defmodule PhoenixCommerce.ErrorView do
use PhoenixCommerce.Web, :view
def render("404.html", _assigns) do
"Page not found"
end
def render("500.html", _assigns) do
"Server internal error"
end
# In case no render clause matches or no
# template is found, let's render it as 500
def template_not_... | 21.666667 | 47 | 0.710256 |
62cdd2ac78272470c4f1d67a5e014c000e8ff30c | 34,744 | ex | Elixir | lib/ecto/migration.ex | nathanl/ecto_sql | 8d08addb31e189ed6d31a01f79f3a528df590255 | [
"Apache-2.0"
] | null | null | null | lib/ecto/migration.ex | nathanl/ecto_sql | 8d08addb31e189ed6d31a01f79f3a528df590255 | [
"Apache-2.0"
] | null | null | null | lib/ecto/migration.ex | nathanl/ecto_sql | 8d08addb31e189ed6d31a01f79f3a528df590255 | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.Migration do
@moduledoc """
Migrations are used to modify your database schema over time.
This module provides many helpers for migrating the database,
allowing developers to use Elixir to alter their storage in
a way that is database independent.
Here is an example:
defmodule MyRepo... | 31.614195 | 123 | 0.672087 |
62cde134dc0c2ecdfe412291e08f2584988fdc7d | 19,793 | ex | Elixir | lib/ex_unit/lib/ex_unit/assertions.ex | michaelkschmidt/elixir | 805efd071d220b7431269b9716c5f7ce44ca36e8 | [
"Apache-2.0"
] | null | null | null | lib/ex_unit/lib/ex_unit/assertions.ex | michaelkschmidt/elixir | 805efd071d220b7431269b9716c5f7ce44ca36e8 | [
"Apache-2.0"
] | null | null | null | lib/ex_unit/lib/ex_unit/assertions.ex | michaelkschmidt/elixir | 805efd071d220b7431269b9716c5f7ce44ca36e8 | [
"Apache-2.0"
] | null | null | null | defmodule ExUnit.AssertionError do
@moduledoc """
Raised to signal an assertion error.
"""
@no_value :ex_unit_no_meaningful_value
defexception left: @no_value,
right: @no_value,
message: @no_value,
expr: @no_value
@doc """
Indicates no meaningful val... | 26.390667 | 161 | 0.622089 |
62cde4e7f6f82000f415f1ae9e41889d5534a4bf | 9,736 | ex | Elixir | lib/lexoffice.ex | fbettag/lexoffice.ex | 71be94dd9b1876e87cb6a395a3003ac89ea5d281 | [
"MIT"
] | null | null | null | lib/lexoffice.ex | fbettag/lexoffice.ex | 71be94dd9b1876e87cb6a395a3003ac89ea5d281 | [
"MIT"
] | null | null | null | lib/lexoffice.ex | fbettag/lexoffice.ex | 71be94dd9b1876e87cb6a395a3003ac89ea5d281 | [
"MIT"
] | null | null | null | defmodule LexOffice do
@moduledoc """
Documentation for `LexOffice` which provides an API for lexoffice.de.
## Installation
This package can be installed by adding `lexoffice` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:lexoffice, "~> 0.1"}
]
end
```
## Confi... | 28.890208 | 143 | 0.613599 |
62ce15778a7ba4da22201e88d06ee2c0f6ce59b8 | 525 | exs | Elixir | test/regressions/i131_maybe_inline_ial_test.exs | RichMorin/earmark | e65fcf67345c84c23d237c732e5c174246662c68 | [
"Apache-1.1"
] | null | null | null | test/regressions/i131_maybe_inline_ial_test.exs | RichMorin/earmark | e65fcf67345c84c23d237c732e5c174246662c68 | [
"Apache-1.1"
] | null | null | null | test/regressions/i131_maybe_inline_ial_test.exs | RichMorin/earmark | e65fcf67345c84c23d237c732e5c174246662c68 | [
"Apache-1.1"
] | null | null | null | defmodule Regressions.I131MaybeInlineIalTest do
use ExUnit.Case
import Support.Helpers, only: [as_html!: 1]
@block_level """
[link](url)
{: .shiny }
"""
test "block level IAL on para" do
assert as_html!(@block_level) == ~s{<p class="shiny"><a href="url">link</a></p>\n}
end
@inline_level """
... | 21.875 | 87 | 0.624762 |
62ce2b7367c25857189bce2ee541001c3e47b7fb | 2,254 | ex | Elixir | clients/web_security_scanner/lib/google_api/web_security_scanner/v1/model/authentication.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/web_security_scanner/lib/google_api/web_security_scanner/v1/model/authentication.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/web_security_scanner/lib/google_api/web_security_scanner/v1/model/authentication.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... | 42.528302 | 156 | 0.756433 |
62ce31ba01cb55d981bf41e48e0846b028dc4b6c | 2,036 | exs | Elixir | pub_sub_test/config/prod.exs | KeenMate/phoenix-websocket-auction | 412148ad5621b511c0690b9395f4b6c9ce3a3352 | [
"MIT"
] | null | null | null | pub_sub_test/config/prod.exs | KeenMate/phoenix-websocket-auction | 412148ad5621b511c0690b9395f4b6c9ce3a3352 | [
"MIT"
] | null | null | null | pub_sub_test/config/prod.exs | KeenMate/phoenix-websocket-auction | 412148ad5621b511c0690b9395f4b6c9ce3a3352 | [
"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,
# ... | 36.357143 | 66 | 0.718075 |
62ce94aaf2ab750851526b14a1054d438c0c3770 | 1,868 | ex | Elixir | lib/earmark_ast_dsl/atts.ex | RobertDober/earmark_ast_dsl | d7393cb1981b34a05ede5666b6dbb7bbc05972ca | [
"Apache-2.0"
] | 1 | 2021-10-30T09:12:14.000Z | 2021-10-30T09:12:14.000Z | lib/earmark_ast_dsl/atts.ex | RobertDober/earmark_ast_dsl | d7393cb1981b34a05ede5666b6dbb7bbc05972ca | [
"Apache-2.0"
] | 4 | 2020-06-26T10:06:20.000Z | 2021-12-29T07:04:23.000Z | lib/earmark_ast_dsl/atts.ex | RobertDober/earmark_ast_dsl | d7393cb1981b34a05ede5666b6dbb7bbc05972ca | [
"Apache-2.0"
] | null | null | null | defmodule EarmarkAstDsl.Atts do
@moduledoc false
use EarmarkAstDsl.Types
@spec as_list(content_t()) :: maybe(list())
def as_list(binary_or_list)
def as_list(binary) when is_binary(binary), do: [binary]
def as_list(list) when is_list(list), do: list
def as_list(_), do: nil
@spec make_atts(list({any(),... | 27.470588 | 85 | 0.599572 |
62cec05bf1c7868edfb183dc1dee9b8b18c981bc | 6,107 | exs | Elixir | deps/phoenix_pubsub/test/shared/pubsub_test.exs | rpillar/Top5_Elixir | 9c450d2e9b291108ff1465dc066dfe442dbca822 | [
"MIT"
] | null | null | null | deps/phoenix_pubsub/test/shared/pubsub_test.exs | rpillar/Top5_Elixir | 9c450d2e9b291108ff1465dc066dfe442dbca822 | [
"MIT"
] | null | null | null | deps/phoenix_pubsub/test/shared/pubsub_test.exs | rpillar/Top5_Elixir | 9c450d2e9b291108ff1465dc066dfe442dbca822 | [
"MIT"
] | null | null | null | defmodule Phoenix.PubSubTest do
@moduledoc """
Sets up PubSub Adapter testcases
## Usage
To test a PubSub adapter, set the `:pubsub_test_adapter` on the `:phoenix`
configuration and require this file, ie:
# your_pubsub_adapter_test.exs
Application.put_env(:phoenix, :pubsub_test_adap... | 33.740331 | 102 | 0.642378 |
62cf12d4e5e4d587962b4056637b57a4a4ec9a85 | 3,134 | ex | Elixir | lib/koans/03_numbers.ex | magusd/elixir-koans | 7a9a0bc3658a06339ec8ecd2e2d9569ca8cf3c79 | [
"MIT"
] | null | null | null | lib/koans/03_numbers.ex | magusd/elixir-koans | 7a9a0bc3658a06339ec8ecd2e2d9569ca8cf3c79 | [
"MIT"
] | null | null | null | lib/koans/03_numbers.ex | magusd/elixir-koans | 7a9a0bc3658a06339ec8ecd2e2d9569ca8cf3c79 | [
"MIT"
] | null | null | null | defmodule Numbers do
require Integer
use Koans
@intro "Why is the number six so scared? Because seven eight nine!\nWe should get to know numbers a bit more!"
koan "Is an integer equal to its float equivalent?" do
assert 1 == 1.0 == true
end
koan "Is an integer threequal to its float equivalent?" do
... | 23.923664 | 112 | 0.636567 |
62cf7d375f2086f5f694fa513eda1ef9bfb36209 | 6,698 | ex | Elixir | lib/scenic/component/input/checkbox.ex | tiger808/scenic | 77abc6d891b7a1a9262cdc47d7c5fac3c8609d1f | [
"Apache-2.0"
] | 1,716 | 2018-09-07T21:55:43.000Z | 2022-03-31T16:16:30.000Z | lib/scenic/component/input/checkbox.ex | tiger808/scenic | 77abc6d891b7a1a9262cdc47d7c5fac3c8609d1f | [
"Apache-2.0"
] | 220 | 2018-09-08T01:28:00.000Z | 2022-03-22T03:55:17.000Z | lib/scenic/component/input/checkbox.ex | tiger808/scenic | 77abc6d891b7a1a9262cdc47d7c5fac3c8609d1f | [
"Apache-2.0"
] | 137 | 2018-09-07T21:55:56.000Z | 2022-03-26T04:07:27.000Z | defmodule Scenic.Component.Input.Checkbox do
@moduledoc """
Add a checkbox to a graph
## Data
`{text, checked?}`
* `text` - must be a bitstring
* `checked?` - must be a boolean and indicates if the checkbox is set.
## Messages
When the state of the checkbox, it sends an event message to the host sc... | 27.227642 | 87 | 0.54046 |
62cf84360b0359bc2585193fbe98b870accb4576 | 312 | ex | Elixir | lib/chess_elixir.ex | Robolia/chess_elixir | e738ec8cd6ebbd1835d35546c95954346833532b | [
"MIT"
] | null | null | null | lib/chess_elixir.ex | Robolia/chess_elixir | e738ec8cd6ebbd1835d35546c95954346833532b | [
"MIT"
] | null | null | null | lib/chess_elixir.ex | Robolia/chess_elixir | e738ec8cd6ebbd1835d35546c95954346833532b | [
"MIT"
] | null | null | null | defmodule ChessElixir do
@moduledoc """
Documentation for ChessElixir.
"""
@doc """
Hello world.
## Examples
iex> ChessElixir.hello()
:world
"""
@spec play(%{my_color: String.t(), last_move: String.t(), fen: String.t()}) :: String.t()
def play(_params) do
"e2-e4"
end
end
| 15.6 | 91 | 0.592949 |
62cf866203a3c045279e108cfe8adb026d889727 | 3,475 | ex | Elixir | clients/security_center/lib/google_api/security_center/v1/model/audit_config.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/security_center/lib/google_api/security_center/v1/model/audit_config.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/security_center/lib/google_api/security_center/v1/model/audit_config.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 34.068627 | 170 | 0.641727 |
62cf913dcc4a6c754c029ad2d631b1e8b00365c8 | 1,547 | ex | Elixir | lib/mappers_web/views/error_helpers.ex | evandiewald/mappers | 7359cfb39a4d9d26c42f5917ee04a7e41d3291bc | [
"Apache-2.0"
] | 32 | 2021-04-22T01:55:31.000Z | 2022-02-25T13:17:21.000Z | lib/mappers_web/views/error_helpers.ex | evandiewald/mappers | 7359cfb39a4d9d26c42f5917ee04a7e41d3291bc | [
"Apache-2.0"
] | 58 | 2021-06-04T18:42:59.000Z | 2022-03-31T07:17:01.000Z | lib/mappers_web/views/error_helpers.ex | evandiewald/mappers | 7359cfb39a4d9d26c42f5917ee04a7e41d3291bc | [
"Apache-2.0"
] | 13 | 2021-04-10T06:09:15.000Z | 2022-03-23T13:07:37.000Z | defmodule MappersWeb.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_tag(... | 32.229167 | 76 | 0.665158 |
62cf9e56bde583ace1c3d9ca72cf9139a936d767 | 4,185 | ex | Elixir | test/example_domain/bank_account/bank_account.ex | jccf091/commanded | 5d68a2b1b7a222b6f204c48d886f3d2c9670f26a | [
"MIT"
] | 1 | 2022-02-20T10:42:07.000Z | 2022-02-20T10:42:07.000Z | test/example_domain/bank_account/bank_account.ex | jccf091/commanded | 5d68a2b1b7a222b6f204c48d886f3d2c9670f26a | [
"MIT"
] | null | null | null | test/example_domain/bank_account/bank_account.ex | jccf091/commanded | 5d68a2b1b7a222b6f204c48d886f3d2c9670f26a | [
"MIT"
] | null | null | null | defmodule Commanded.ExampleDomain.BankAccount do
@moduledoc false
@derive Jason.Encoder
defstruct [:account_number, :state, balance: 0]
alias Commanded.ExampleDomain.BankAccount
defmodule Commands do
defmodule OpenAccount do
defstruct [:account_number, :initial_balance]
end
defmodule Dep... | 27.352941 | 99 | 0.68626 |
62cfa488650f2ce485852b94ae3ba6cb590fbdba | 75 | ex | Elixir | lib/portfolio_web/views/global/partial_view.ex | drewfravert/drewfravert.com | 57b3c890d7d931700908bfe9af35921d12419e96 | [
"MIT"
] | null | null | null | lib/portfolio_web/views/global/partial_view.ex | drewfravert/drewfravert.com | 57b3c890d7d931700908bfe9af35921d12419e96 | [
"MIT"
] | null | null | null | lib/portfolio_web/views/global/partial_view.ex | drewfravert/drewfravert.com | 57b3c890d7d931700908bfe9af35921d12419e96 | [
"MIT"
] | null | null | null | defmodule PortfolioWeb.Global.PartialView do
use PortfolioWeb, :view
end
| 18.75 | 44 | 0.826667 |
62cfb1fb0c6e4abf07a1c6a1af32cf388e3b3a5e | 569 | ex | Elixir | lib/mazaryn/mail/html.ex | mazarynxyz/Mazaryn | b84d08d236cbcd356c8b7ec6215c5c0b411b9617 | [
"Apache-2.0"
] | null | null | null | lib/mazaryn/mail/html.ex | mazarynxyz/Mazaryn | b84d08d236cbcd356c8b7ec6215c5c0b411b9617 | [
"Apache-2.0"
] | null | null | null | lib/mazaryn/mail/html.ex | mazarynxyz/Mazaryn | b84d08d236cbcd356c8b7ec6215c5c0b411b9617 | [
"Apache-2.0"
] | null | null | null | defmodule Mail.HTML do
defp templates_path, do: "lib/mazaryn_web/templates"
def render_html_body(assigns, project, action) do
assigns
|> render_email(project, action)
|> render_template()
end
defp render_email(assigns, project, action) do
EEx.eval_file("#{templates_path()}/#{project}/#{action... | 24.73913 | 71 | 0.692443 |
62cfc9a82fa425229132ea879d66c3eb948b172c | 115 | exs | Elixir | .formatter.exs | leonardocouy/accent | 29fb324395ff998cc5cdc6947c60070ffabe647c | [
"BSD-3-Clause"
] | null | null | null | .formatter.exs | leonardocouy/accent | 29fb324395ff998cc5cdc6947c60070ffabe647c | [
"BSD-3-Clause"
] | null | null | null | .formatter.exs | leonardocouy/accent | 29fb324395ff998cc5cdc6947c60070ffabe647c | [
"BSD-3-Clause"
] | null | null | null | [
inputs: ["mix.exs", "{config,lib,test}/**/*.{ex,exs}"],
import_deps: [:ecto, :phoenix],
line_length: 180
]
| 19.166667 | 57 | 0.573913 |
62cfe633f4c7796dc116884b5e5eeb06560c749b | 1,088 | ex | Elixir | lib/unikey_web/channels/user_socket.ex | alexfariac/Unique-Key-Generator | 3493790f8e76f776406e1e33888f4c9009917e24 | [
"MIT"
] | 1 | 2021-12-26T19:35:57.000Z | 2021-12-26T19:35:57.000Z | lib/unikey_web/channels/user_socket.ex | alexfariac/Unique-Key-Generator | 3493790f8e76f776406e1e33888f4c9009917e24 | [
"MIT"
] | null | null | null | lib/unikey_web/channels/user_socket.ex | alexfariac/Unique-Key-Generator | 3493790f8e76f776406e1e33888f4c9009917e24 | [
"MIT"
] | null | null | null | defmodule UnikeyWeb.UserSocket do
use Phoenix.Socket
## Channels
# channel "room:*", UnikeyWeb.RoomChannel
# Socket params are passed from the client and can
# be used to verify and authenticate a user. After
# verification, you can put default assigns into
# the socket that will be set for all channels... | 30.222222 | 83 | 0.693934 |
62d00854de22cb948cc0a65049d26af5d9169b62 | 10,725 | ex | Elixir | lib/console/channels/channel.ex | DasThink/console | 54cde903e3f4e2ca93b14c1d3a7bf3b8a2c7372b | [
"Apache-2.0"
] | 1 | 2021-08-20T17:48:47.000Z | 2021-08-20T17:48:47.000Z | lib/console/channels/channel.ex | mfalkvidd/console | 6427c82bc4f8619b5bb3a5940099a8bdd6167a9e | [
"Apache-2.0"
] | null | null | null | lib/console/channels/channel.ex | mfalkvidd/console | 6427c82bc4f8619b5bb3a5940099a8bdd6167a9e | [
"Apache-2.0"
] | null | null | null | defmodule Console.Channels.Channel do
use Ecto.Schema
import Ecto.Changeset
alias Console.Helpers
alias Console.Organizations.Organization
alias Console.Channels.Channel
@primary_key {:id, :binary_id, autogenerate: true}
@foreign_key_type :binary_id
schema "channels" do
field :active, :boolean, de... | 46.030043 | 201 | 0.597296 |
62d02f7c3920981029f17077eaee3df8caaaa679 | 138 | exs | Elixir | test/fast_rss_test.exs | easypodcasts/fast_rss | c8cd6d19457851639dc34001f4b17208bb4f6803 | [
"Apache-2.0"
] | 69 | 2020-02-21T16:41:21.000Z | 2022-03-22T16:28:08.000Z | test/fast_rss_test.exs | easypodcasts/fast_rss | c8cd6d19457851639dc34001f4b17208bb4f6803 | [
"Apache-2.0"
] | 10 | 2020-02-21T20:02:12.000Z | 2022-01-21T15:22:23.000Z | test/fast_rss_test.exs | easypodcasts/fast_rss | c8cd6d19457851639dc34001f4b17208bb4f6803 | [
"Apache-2.0"
] | 15 | 2020-03-01T09:50:18.000Z | 2022-01-21T12:00:00.000Z | defmodule FastRSSTest do
use ExUnit.Case
doctest FastRSS
test "greets the world" do
assert FastRSS.hello() == :world
end
end
| 15.333333 | 36 | 0.710145 |
62d0564c0395a17aee11dc4a66cd7b76c5889a39 | 164 | exs | Elixir | apps/welcome2_ecto/priv/repo/migrations/20200419041147_create_state.exs | philihp/welcome2_umbrella | f5f494b98fe4b64a3e1bbfc1b8b432aad7f8c3b2 | [
"MIT"
] | null | null | null | apps/welcome2_ecto/priv/repo/migrations/20200419041147_create_state.exs | philihp/welcome2_umbrella | f5f494b98fe4b64a3e1bbfc1b8b432aad7f8c3b2 | [
"MIT"
] | 13 | 2020-03-22T08:00:57.000Z | 2022-03-07T16:35:36.000Z | apps/welcome2_ecto/priv/repo/migrations/20200419041147_create_state.exs | philihp/welcome2_umbrella | f5f494b98fe4b64a3e1bbfc1b8b432aad7f8c3b2 | [
"MIT"
] | null | null | null | defmodule Welcome2Ecto.Repo.Migrations.CreateState do
use Ecto.Migration
def change do
create table(:state) do
add :state, :string
end
end
end
| 16.4 | 53 | 0.707317 |
62d0632979085b644048a98f253d931b3c4463b0 | 3,331 | exs | Elixir | test/output_test.exs | nayed/noaax | ef694a36b44a490a7c54341d5cd9ea8b3d53bbd0 | [
"MIT"
] | null | null | null | test/output_test.exs | nayed/noaax | ef694a36b44a490a7c54341d5cd9ea8b3d53bbd0 | [
"MIT"
] | null | null | null | test/output_test.exs | nayed/noaax | ef694a36b44a490a7c54341d5cd9ea8b3d53bbd0 | [
"MIT"
] | null | null | null | defmodule OutputTest do
use ExUnit.Case
import Noaax.Output
doctest Noaax
@data [
{:pi, "xml", [{"version", "1.0"}, {"encoding", "ISO-8859-1"}]},
{:pi, "xml-stylesheet", [{"href", "latest_ob.xsl"}, {"type", "text/xsl"}]},
{"current_observation",
[
{"version", "1.0"}, {"xmlns:xsd", "h... | 38.287356 | 98 | 0.497448 |
62d07e87d1baa37309f5f9104cebfeaba77a75e9 | 1,767 | ex | Elixir | lib/surface/components/form/label.ex | lnr0626/surface | 11ae4a8cfa167fc11c8f960e9d5821a057c9b5bb | [
"MIT"
] | 1 | 2021-06-04T20:46:52.000Z | 2021-06-04T20:46:52.000Z | lib/surface/components/form/label.ex | lnr0626/surface | 11ae4a8cfa167fc11c8f960e9d5821a057c9b5bb | [
"MIT"
] | null | null | null | lib/surface/components/form/label.ex | lnr0626/surface | 11ae4a8cfa167fc11c8f960e9d5821a057c9b5bb | [
"MIT"
] | null | null | null | defmodule Surface.Components.Form.Label do
@moduledoc """
Defines a label.
Provides similar capabilities to Phoenix's built-in `label/2`
function.
Option `class` can be set directly and will override anything in `opts`.
All given options are forwarded to the underlying tag. A default value is
provided ... | 27.609375 | 95 | 0.693831 |
62d081b27ecc56600b216f9995960c78c7b845e3 | 29,525 | ex | Elixir | lib/elixir/lib/kernel/typespec.ex | guilleiguaran/elixir | 952052869ff7af0e293d2a7160b1aebc68fc46be | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/kernel/typespec.ex | guilleiguaran/elixir | 952052869ff7af0e293d2a7160b1aebc68fc46be | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/kernel/typespec.ex | guilleiguaran/elixir | 952052869ff7af0e293d2a7160b1aebc68fc46be | [
"Apache-2.0"
] | null | null | null | defmodule Kernel.Typespec do
@moduledoc """
Provides macros and functions for working with typespecs.
Elixir comes with a notation for declaring types and specifications. Elixir is
dynamically typed, as such typespecs are never used by the compiler to
optimize or modify code. Still, using typespecs is useful... | 31.210359 | 132 | 0.609382 |
62d087ab068c8e1e2fae7903cfa20bb121ccbe47 | 1,844 | ex | Elixir | 2017/day_09/elixir/lib/day9.ex | nicbet/advent-of-code | a44a16c777081bdc9fabdfee72541a95c291ef18 | [
"MIT"
] | null | null | null | 2017/day_09/elixir/lib/day9.ex | nicbet/advent-of-code | a44a16c777081bdc9fabdfee72541a95c291ef18 | [
"MIT"
] | null | null | null | 2017/day_09/elixir/lib/day9.ex | nicbet/advent-of-code | a44a16c777081bdc9fabdfee72541a95c291ef18 | [
"MIT"
] | null | null | null | defmodule Day9 do
@moduledoc """
Solution for Advent of Code - Day 9
"""
@doc """
Main and only function, will calculate the score for part 1 and part 2
at the same time. Returns a tuple {group_score, number_of_garbage_chars}
"""
def score(input) do
move(input, 0, 0, 0, false)
end
# Pattern ma... | 33.527273 | 83 | 0.649132 |
62d092292030a678c0eea2c07e132ff804a7c62c | 1,226 | ex | Elixir | chatter/web/views/error_helpers.ex | joshmcarthur/learning-elixir | 5ccfdd61dcfaba82c05559fb9c0e6f99cf4319e7 | [
"MIT"
] | null | null | null | chatter/web/views/error_helpers.ex | joshmcarthur/learning-elixir | 5ccfdd61dcfaba82c05559fb9c0e6f99cf4319e7 | [
"MIT"
] | null | null | null | chatter/web/views/error_helpers.ex | joshmcarthur/learning-elixir | 5ccfdd61dcfaba82c05559fb9c0e6f99cf4319e7 | [
"MIT"
] | null | null | null | defmodule Chatter.ErrorHelpers do
@moduledoc """
Conveniences for translating and building error messages.
"""
use Phoenix.HTML
@doc """
Generates tag for inlined form input errors.
"""
def error_tag(form, field) do
if error = form.errors[field] do
content_tag :span, translate_error(error), ... | 29.902439 | 73 | 0.66721 |
62d0a77d6e5af3c1363185e0f03889e294731f7f | 364 | ex | Elixir | lib/accent/repo.ex | samuelnygaard/accent | db753badab1d885397b48a42ac3fb43024345467 | [
"BSD-3-Clause"
] | null | null | null | lib/accent/repo.ex | samuelnygaard/accent | db753badab1d885397b48a42ac3fb43024345467 | [
"BSD-3-Clause"
] | 2 | 2021-09-28T05:37:00.000Z | 2022-02-26T10:10:15.000Z | lib/accent/repo.ex | samuelnygaard/accent | db753badab1d885397b48a42ac3fb43024345467 | [
"BSD-3-Clause"
] | null | null | null | defmodule Accent.Repo do
use Ecto.Repo, otp_app: :accent, adapter: Ecto.Adapters.Postgres
use Scrivener, page_size: 30, max_page_size: 1000
@doc """
Dynamically loads the repository url from the
DATABASE_URL environment variable.
"""
def init(_, opts) do
{:ok, Keyword.put(opts, :url, Application.get_... | 28 | 83 | 0.717033 |
62d0e4eda70a18d251bdfa57a991a1c33eabd1de | 1,004 | ex | Elixir | web/oauth/github.ex | castingclouds/rc4gho | fdbd6665aa233370c857d63b1d6a22459e1833ce | [
"MIT"
] | null | null | null | web/oauth/github.ex | castingclouds/rc4gho | fdbd6665aa233370c857d63b1d6a22459e1833ce | [
"MIT"
] | null | null | null | web/oauth/github.ex | castingclouds/rc4gho | fdbd6665aa233370c857d63b1d6a22459e1833ce | [
"MIT"
] | null | null | null | defmodule GitHub do
@moduledoc """
An OAuth2 strategy for GitHub.
"""
use OAuth2.Strategy
alias OAuth2.Strategy.AuthCode
defp config do
[strategy: GitHub,
site: "https://api.github.com",
authorize_url: "https://github.com/login/oauth/authorize",
token_url: "https://github.com/login/oaut... | 22.818182 | 100 | 0.679283 |
62d0f347b63c432a06f306f9f6b9b62412a32cc8 | 550 | ex | Elixir | lib/exqueue/config.ex | trustcor/exqueue | b122d99080373eb802e0e5d9fa11c05975eabc7b | [
"MIT"
] | null | null | null | lib/exqueue/config.ex | trustcor/exqueue | b122d99080373eb802e0e5d9fa11c05975eabc7b | [
"MIT"
] | null | null | null | lib/exqueue/config.ex | trustcor/exqueue | b122d99080373eb802e0e5d9fa11c05975eabc7b | [
"MIT"
] | null | null | null | defmodule ExQueue.Config do
import Logger, only: [log: 2]
def read_config(nil, _f) do
Application.get_env(:exqueue, :config, %{})
end
def read_config(spec, f) do
case f.(spec) do
{:ok, content} ->
cfg = YamlElixir.read_from_string(content)
read_config(nil, false) |>
Map... | 22 | 84 | 0.601818 |
62d0f41b2650e8c2d5aea6be139960c29199c3a5 | 5,568 | ex | Elixir | archive/parser/lib/parser.ex | pptam/pptam-tool | d306c5d2a45bc771afd366e5feb83ba5fda3f0e6 | [
"MIT"
] | 12 | 2020-06-11T19:49:08.000Z | 2022-01-25T07:10:31.000Z | archive/parser/lib/parser.ex | pptam/pptam-tool | d306c5d2a45bc771afd366e5feb83ba5fda3f0e6 | [
"MIT"
] | 33 | 2020-02-23T08:16:15.000Z | 2021-07-20T08:37:35.000Z | archive/parser/lib/parser.ex | pptam/pptam-tool | d306c5d2a45bc771afd366e5feb83ba5fda3f0e6 | [
"MIT"
] | 5 | 2020-02-19T16:18:02.000Z | 2022-03-24T07:37:54.000Z | defmodule Parser.Parser do
import SweetXml
def main() do
input =
"/Volumes/GoogleDrive/Meine Ablage/research/2018-Performance of Microservices/20190423-experiments9-Mirai/"
output = input
parse_all_directories!(input, output)
end
def parse_all_directories!(input, output) do
IO.puts("Pr... | 26.641148 | 122 | 0.582974 |
62d10458ff2f4c5c7cb4c092250cea3cfc856be2 | 2,691 | exs | Elixir | test/resource/relationships/has_many_test.exs | WolfDan/ash | 7cc60f41a003e2d06b5e19107e22424efafed1be | [
"MIT"
] | null | null | null | test/resource/relationships/has_many_test.exs | WolfDan/ash | 7cc60f41a003e2d06b5e19107e22424efafed1be | [
"MIT"
] | null | null | null | test/resource/relationships/has_many_test.exs | WolfDan/ash | 7cc60f41a003e2d06b5e19107e22424efafed1be | [
"MIT"
] | null | null | null | defmodule Ash.Test.Resource.Relationshihps.HasManyTest do
@moduledoc false
use ExUnit.Case, async: true
defmacrop defposts(do: body) do
quote do
defmodule Post do
@moduledoc false
use Ash.Resource
attributes do
attribute :id, :uuid, primary_key?: true, default: &Ecto.... | 27.181818 | 135 | 0.554069 |
62d12f2a5324f01682fa833eccd562f61fa824db | 2,173 | exs | Elixir | config/prod.exs | ubudget/octopus | 84087fbb6bfd5e7611583d7c1098e18d4239f036 | [
"MIT"
] | null | null | null | config/prod.exs | ubudget/octopus | 84087fbb6bfd5e7611583d7c1098e18d4239f036 | [
"MIT"
] | null | null | null | config/prod.exs | ubudget/octopus | 84087fbb6bfd5e7611583d7c1098e18d4239f036 | [
"MIT"
] | null | null | null | use Mix.Config
# For production, we often load configuration from external
# sources, such as your system environment. For this reason,
# you won't find the :http configuration below, but set inside
# OctopusWeb.Endpoint.init/2 when load_from_system_env is
# true. Any dynamic configuration should be done there.
#
# Do... | 33.430769 | 67 | 0.721583 |
62d1307dcc9f9215ed38f757ad2fd8a3c8e00205 | 1,638 | exs | Elixir | test/collidex/geometry/rect_test.exs | IdahoEv/collidex | ef86928ef264723db8129a9de94acce8183d01bc | [
"MIT"
] | 4 | 2018-08-19T23:05:06.000Z | 2021-01-17T09:17:45.000Z | test/collidex/geometry/rect_test.exs | IdahoEv/collidex | ef86928ef264723db8129a9de94acce8183d01bc | [
"MIT"
] | 2 | 2016-09-14T19:47:17.000Z | 2016-09-14T19:49:17.000Z | test/collidex/geometry/rect_test.exs | IdahoEv/collidex | ef86928ef264723db8129a9de94acce8183d01bc | [
"MIT"
] | null | null | null | defmodule TestRect do
use ExSpec, async: true
doctest Collidex.Geometry.Rect
alias Collidex.Geometry.Rect
describe "make" do
context "from a 3-tuple" do
it "makes a Rect from floats" do
rect = Rect.make({0.0, 0.1, 1.0, 1.1})
assert is_map(rect) == true
assert rect == %Rect{ a... | 29.25 | 83 | 0.546398 |
62d190041ccf7ba1cff193e205aaac7d3ffdcd54 | 1,926 | ex | Elixir | clients/cloud_shell/lib/google_api/cloud_shell/v1/model/start_environment_request.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/cloud_shell/lib/google_api/cloud_shell/v1/model/start_environment_request.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/cloud_shell/lib/google_api/cloud_shell/v1/model/start_environment_request.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.52 | 342 | 0.741952 |
62d193a5a50474850d205bcca66e6db06605fd5a | 565 | ex | Elixir | lib/sticky/customers/customers.ex | kawikadkekahuna/Stickylixer | b81a1953522d5b5873f8893d54ac01e87891af73 | [
"BSD-3-Clause"
] | null | null | null | lib/sticky/customers/customers.ex | kawikadkekahuna/Stickylixer | b81a1953522d5b5873f8893d54ac01e87891af73 | [
"BSD-3-Clause"
] | null | null | null | lib/sticky/customers/customers.ex | kawikadkekahuna/Stickylixer | b81a1953522d5b5873f8893d54ac01e87891af73 | [
"BSD-3-Clause"
] | null | null | null | defmodule Sticky.Customers do
import Sticky.Request
def customer_find(params) do
new()
|> put_endpoint("/customer_find")
|> put_method(:post)
|> put_params(params)
|> make_request()
end
def customer_find_active_product(params) do
new()
|> put_endpoint("/customer_find_active_product... | 20.178571 | 52 | 0.653097 |
62d19df503369715134cc73a794b4f4fcc9d1889 | 437 | exs | Elixir | priv/repo/migrations/20140501023258_create_stations.exs | micahyoung/cbstats-importer | a7176b3a25d8a4e919ddda32475c9ecf65e9892a | [
"Unlicense",
"MIT"
] | 1 | 2016-01-06T18:19:35.000Z | 2016-01-06T18:19:35.000Z | priv/repo/migrations/20140501023258_create_stations.exs | micahyoung/cbstats-importer | a7176b3a25d8a4e919ddda32475c9ecf65e9892a | [
"Unlicense",
"MIT"
] | null | null | null | priv/repo/migrations/20140501023258_create_stations.exs | micahyoung/cbstats-importer | a7176b3a25d8a4e919ddda32475c9ecf65e9892a | [
"Unlicense",
"MIT"
] | null | null | null | defmodule CbstatsImporter.Repo.Migrations.CreateStations do
use Ecto.Migration
def up do
"""
CREATE TABLE stations (
id serial NOT NULL,
latitude double precision,
longitude double precision,
label character varying(255),
created_at timestamp without time zone,
updated_a... | 19 | 59 | 0.652174 |
62d19f13a2bf9904d806ab43268e77c0161706b3 | 134 | ex | Elixir | lib/phoenix_example/cron_scheduler.ex | getong/phoenix_example | cec4ba1ab2d601a3d4c709d3b77b1284f28ae36b | [
"Apache-2.0"
] | null | null | null | lib/phoenix_example/cron_scheduler.ex | getong/phoenix_example | cec4ba1ab2d601a3d4c709d3b77b1284f28ae36b | [
"Apache-2.0"
] | 6 | 2020-07-20T14:24:28.000Z | 2022-03-29T02:25:55.000Z | lib/phoenix_example/cron_scheduler.ex | getong/phoenix_example | cec4ba1ab2d601a3d4c709d3b77b1284f28ae36b | [
"Apache-2.0"
] | null | null | null | defmodule PhoenixExample.CronScheduler do
@moduledoc """
The cron task handler
"""
use Quantum, otp_app: :phoenix_example
end
| 19.142857 | 41 | 0.746269 |
62d205557d2012444db8b26c4942a2e248e7a5cc | 795 | ex | Elixir | Microsoft.Azure.Management.Network/lib/microsoft/azure/management/network/model/subnet_association.ex | chgeuer/ex_microsoft_azure_management | 99cd9f7f2ff1fdbe69ca5bac55b6e2af91ba3603 | [
"Apache-2.0"
] | 4 | 2018-09-29T03:43:15.000Z | 2021-04-01T18:30:46.000Z | Microsoft.Azure.Management.Network/lib/microsoft/azure/management/network/model/subnet_association.ex | chgeuer/ex_microsoft_azure_management | 99cd9f7f2ff1fdbe69ca5bac55b6e2af91ba3603 | [
"Apache-2.0"
] | null | null | null | Microsoft.Azure.Management.Network/lib/microsoft/azure/management/network/model/subnet_association.ex | chgeuer/ex_microsoft_azure_management | 99cd9f7f2ff1fdbe69ca5bac55b6e2af91ba3603 | [
"Apache-2.0"
] | null | null | null | # NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
defmodule Microsoft.Azure.Management.Network.Model.SubnetAssociation do
@moduledoc """
Network interface and its custom security rules.
"""
@derive... | 26.5 | 107 | 0.728302 |
62d207d5e9a77fcfb107dc80f3eb9d25d4ca3bb5 | 770 | ex | Elixir | apps/omg_child_chain_rpc/lib/omg_child_chain_rpc/tracer.ex | PinkDiamond1/elixir-omg | 70dfd24a0a1ddf5d1d9d71aab61ea25300f889f7 | [
"Apache-2.0"
] | 1 | 2020-05-01T12:30:09.000Z | 2020-05-01T12:30:09.000Z | apps/omg_child_chain_rpc/lib/omg_child_chain_rpc/tracer.ex | PinkDiamond1/elixir-omg | 70dfd24a0a1ddf5d1d9d71aab61ea25300f889f7 | [
"Apache-2.0"
] | null | null | null | apps/omg_child_chain_rpc/lib/omg_child_chain_rpc/tracer.ex | 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... | 35 | 74 | 0.764935 |
62d20a7ec37cddd4daaafbbb0c58f765bcfce4ce | 320 | exs | Elixir | tools/astarte_import/config/test.exs | matt-mazzucato/astarte | 34d84941a5019efc42321052f7f34b7d907a38f2 | [
"Apache-2.0"
] | 191 | 2018-03-30T13:23:08.000Z | 2022-03-02T12:05:32.000Z | tools/astarte_import/config/test.exs | matt-mazzucato/astarte | 34d84941a5019efc42321052f7f34b7d907a38f2 | [
"Apache-2.0"
] | 402 | 2018-03-30T13:37:00.000Z | 2022-03-31T16:47:10.000Z | tools/astarte_import/config/test.exs | matt-mazzucato/astarte | 34d84941a5019efc42321052f7f34b7d907a38f2 | [
"Apache-2.0"
] | 24 | 2018-03-30T13:29:48.000Z | 2022-02-28T11:10:26.000Z | use Mix.Config
config :cqerl,
cassandra_nodes: [{System.get_env("CASSANDRA_DB_HOST"), System.get_env("CASSANDRA_DB_PORT")}]
config :logger, :console,
format: {Astarte.Import.LogFmtFormatter, :format},
metadata: [:module, :function, :device_id, :realm, :db_action, :reason]
config :logfmt,
user_friendly: true
| 26.666667 | 95 | 0.740625 |
62d211cf7d9f381751b85d0fc39bc1fb6423f101 | 1,050 | ex | Elixir | lib/mix/lib/mix/tasks/local.hex.ex | xtian/elixir | c680eb1a3992309c272e8f808e15990ea5318d6e | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/tasks/local.hex.ex | xtian/elixir | c680eb1a3992309c272e8f808e15990ea5318d6e | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/tasks/local.hex.ex | xtian/elixir | c680eb1a3992309c272e8f808e15990ea5318d6e | [
"Apache-2.0"
] | null | null | null | defmodule Mix.Tasks.Local.Hex do
use Mix.Task
@hex_list_path "/installs/hex-1.x.csv"
@hex_archive_path "/installs/[ELIXIR_VERSION]/hex-[HEX_VERSION].ez"
@shortdoc "Installs Hex locally"
@moduledoc """
Installs Hex locally.
mix local.hex
## Command line options
* `--force` - forces insta... | 26.923077 | 92 | 0.690476 |
62d216acf08976caa1a2b05e120a5789e1c71d80 | 990 | ex | Elixir | lib/chat/endpoint.ex | ankurp/chat | a9fced84898c9d47a17ea14fda6ed78e57ef04e8 | [
"MIT"
] | null | null | null | lib/chat/endpoint.ex | ankurp/chat | a9fced84898c9d47a17ea14fda6ed78e57ef04e8 | [
"MIT"
] | null | null | null | lib/chat/endpoint.ex | ankurp/chat | a9fced84898c9d47a17ea14fda6ed78e57ef04e8 | [
"MIT"
] | null | null | null | defmodule Chat.Endpoint do
use Phoenix.Endpoint, otp_app: :chat
socket "/socket", Chat.UserSocket
# Serve at "/" the static files from "priv/static" directory.
#
# You should set gzip to true if you are running phoenix.digest
# when deploying your static files in production.
plug Plug.Static,
at: "/... | 24.75 | 69 | 0.70404 |
62d28e177527e35c4fce4ccfa619c71c10e8a8b1 | 591 | exs | Elixir | priv/repo/migrations/20200728204611_change_wows_ship_iteration_changes__on_delete.exs | Rukenshia/sthub-web | 2749e0a08ca71683ca1d44ceecc89310dea70e07 | [
"MIT"
] | null | null | null | priv/repo/migrations/20200728204611_change_wows_ship_iteration_changes__on_delete.exs | Rukenshia/sthub-web | 2749e0a08ca71683ca1d44ceecc89310dea70e07 | [
"MIT"
] | 14 | 2020-07-17T06:00:03.000Z | 2020-10-29T20:28:32.000Z | priv/repo/migrations/20200728204611_change_wows_ship_iteration_changes__on_delete.exs | Rukenshia/sthub-web | 2749e0a08ca71683ca1d44ceecc89310dea70e07 | [
"MIT"
] | null | null | null | defmodule StHub.Repo.Migrations.ChangeWowsShipIterationsOnDelete do
use Ecto.Migration
def change do
execute "ALTER TABLE wows_ship_iteration_changes DROP CONSTRAINT wows_ship_iteration_changes_ship_iteration_id_fkey"
execute "ALTER TABLE wows_ship_iteration_changes DROP CONSTRAINT wows_ship_iteration_cha... | 39.4 | 120 | 0.824027 |
62d2b456bfedb1700ce995f9d6ea32c1f163c260 | 2,107 | exs | Elixir | test/oli_web/live/curriculum/activities_delta_test.exs | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | 45 | 2020-04-17T15:40:27.000Z | 2022-03-25T00:13:30.000Z | test/oli_web/live/curriculum/activities_delta_test.exs | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | 944 | 2020-02-13T02:37:01.000Z | 2022-03-31T17:50:07.000Z | test/oli_web/live/curriculum/activities_delta_test.exs | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | 23 | 2020-07-28T03:36:13.000Z | 2022-03-17T14:29:02.000Z | defmodule OliWeb.Curriculum.ActivityDeltaTest do
use Oli.DataCase
alias OliWeb.Curriculum.ActivityDelta
describe "activity delta test setup" do
setup do
Seeder.base_project_with_resource2()
|> Seeder.add_page(
%{
content: %{
"model" => [
%{
... | 25.695122 | 61 | 0.479829 |
62d2c6fb578b59f03dd15619b8cd725fa52829dc | 558 | exs | Elixir | test/views/error_view_test.exs | orsai-project/orsai-be | 31786c8f0c2e50b3586579c43400a84f83b0781d | [
"MIT"
] | null | null | null | test/views/error_view_test.exs | orsai-project/orsai-be | 31786c8f0c2e50b3586579c43400a84f83b0781d | [
"MIT"
] | 9 | 2017-06-18T00:45:12.000Z | 2017-07-12T22:08:27.000Z | test/views/error_view_test.exs | orsai-project/orsai-be | 31786c8f0c2e50b3586579c43400a84f83b0781d | [
"MIT"
] | null | null | null | defmodule Orsai.ErrorViewTest do
use Orsai.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(Orsai.ErrorView, "404.html", []) ==
"Page not found"
end
test "render 500.html" do
as... | 25.363636 | 66 | 0.670251 |
62d2ea0d3bb1fdaedf8d80dd82df97431d7bc312 | 337 | ex | Elixir | phoenix/lib/plugs/redirects.ex | sap-archive/jam-login-microservice | 9f4e9d465c8e3913754fb73d08a68b4e8f13a8d2 | [
"Apache-2.0"
] | 1 | 2020-01-03T16:00:09.000Z | 2020-01-03T16:00:09.000Z | phoenix/lib/plugs/redirects.ex | SAP/jam-login-microservice | 9f4e9d465c8e3913754fb73d08a68b4e8f13a8d2 | [
"Apache-2.0"
] | null | null | null | phoenix/lib/plugs/redirects.ex | SAP/jam-login-microservice | 9f4e9d465c8e3913754fb73d08a68b4e8f13a8d2 | [
"Apache-2.0"
] | null | null | null | defmodule LoginProxy.Redirects do
import Plug.Conn
def init(options), do: options
def call(conn, options) do
to = options[conn.request_path]
do_redirect(conn, to)
end
defp do_redirect(conn, nil), do: conn
defp do_redirect(conn, to) do
conn
|> Phoenix.Controller.redirect(to: to)
|... | 17.736842 | 44 | 0.670623 |
62d311a845ba9cb8ec204605d4e9e1b6b63baabb | 486 | ex | Elixir | lib/ex_trends/explore.ex | gjaldon/ex_trends | 2240be9c28f5f13754f97e7849d01330122dbf07 | [
"MIT"
] | null | null | null | lib/ex_trends/explore.ex | gjaldon/ex_trends | 2240be9c28f5f13754f97e7849d01330122dbf07 | [
"MIT"
] | null | null | null | lib/ex_trends/explore.ex | gjaldon/ex_trends | 2240be9c28f5f13754f97e7849d01330122dbf07 | [
"MIT"
] | null | null | null | defmodule ExTrends.Explore do
@doc false
@spec request(query :: map) :: ExTrends.Operation.Explore.t()
def request(%{keywords: keywords, time: time, geo: geo, hl: hl, tz: tz, cat: cat, prop: prop}) do
comparison_item = for k <- keywords, do: %{keyword: k, time: time, geo: geo}
req = Jason.encode!(%{compar... | 34.714286 | 99 | 0.648148 |
62d32195bab8e1749fcd138c91f981475f5f1790 | 1,178 | ex | Elixir | lib/local_hex_web/parsers/hex_erlang_parser.ex | imsoulfly/local_hex_repo | 18fca51c44b3dd01d27684877b3c7bc13471f548 | [
"Apache-2.0"
] | 5 | 2021-11-13T13:58:06.000Z | 2022-03-26T03:47:57.000Z | lib/local_hex_web/parsers/hex_erlang_parser.ex | imsoulfly/local_hex_repo | 18fca51c44b3dd01d27684877b3c7bc13471f548 | [
"Apache-2.0"
] | 3 | 2021-11-16T18:45:45.000Z | 2021-12-05T13:58:25.000Z | lib/local_hex_web/parsers/hex_erlang_parser.ex | imsoulfly/local_hex_repo | 18fca51c44b3dd01d27684877b3c7bc13471f548 | [
"Apache-2.0"
] | null | null | null | defmodule LocalHexWeb.HexErlangParser do
@moduledoc """
Module implementing the Plug.Parser behaviour sepcification to identfiy
and handle `vnd.hex+erlang` content type
Apache OS notice:
The original source was taken from here:
https://github.com/wojtekmach/mini_repo/blob/master/lib/mini_repo/hex_erlang_pa... | 22.226415 | 88 | 0.673175 |
62d32b95379b96a9f7ba20e99ce3375a2454daf4 | 1,329 | exs | Elixir | test/protobuf/validator_test.exs | llxff/protobuf-elixir | 365b26833fce85f0f46759a7c50c8858bd3cc1c1 | [
"MIT"
] | null | null | null | test/protobuf/validator_test.exs | llxff/protobuf-elixir | 365b26833fce85f0f46759a7c50c8858bd3cc1c1 | [
"MIT"
] | null | null | null | test/protobuf/validator_test.exs | llxff/protobuf-elixir | 365b26833fce85f0f46759a7c50c8858bd3cc1c1 | [
"MIT"
] | null | null | null | Code.require_file("../support/test_msg.ex", __DIR__)
defmodule Protobuf.ValidatorTest do
use ExUnit.Case, async: true
test "oneof valid for valid tuple and nil" do
msg = TestMsg.Oneof.new(first: {:a, 42})
assert true = Protobuf.Validator.valid?(msg)
end
test "oneof valid for valid tuple and nil when ... | 30.204545 | 68 | 0.672686 |
62d353354b6beef11407715105e3acd838048fc5 | 205 | exs | Elixir | test/ecbolic/store_test.exs | Awlexus/Ecbolic | 754a6601853c211a0d4b7572d7f239b26e9867de | [
"Apache-2.0"
] | null | null | null | test/ecbolic/store_test.exs | Awlexus/Ecbolic | 754a6601853c211a0d4b7572d7f239b26e9867de | [
"Apache-2.0"
] | 1 | 2018-09-10T21:29:27.000Z | 2018-09-10T21:29:27.000Z | test/ecbolic/store_test.exs | Awlexus/Ecbolic | 754a6601853c211a0d4b7572d7f239b26e9867de | [
"Apache-2.0"
] | null | null | null | defmodule StoreTest do
use ExUnit.Case
doctest Ecbolic.Store
alias Ecbolic.Store
test "returns names" do
{:ok, groups} = Store.group_names()
assert groups == [:default, :group]
end
end
| 17.083333 | 39 | 0.687805 |
62d360762e43b6313be8f53a1b9b4c4a97098bfb | 3,195 | ex | Elixir | lib/credo/check/readability/parentheses_on_zero_arity_defs.ex | hrzndhrn/credo | 71a7b24a5ca8e7a48416e0cdfb42cf8a0fef9593 | [
"MIT"
] | 4,590 | 2015-09-28T06:01:43.000Z | 2022-03-29T08:48:57.000Z | lib/credo/check/readability/parentheses_on_zero_arity_defs.ex | hrzndhrn/credo | 71a7b24a5ca8e7a48416e0cdfb42cf8a0fef9593 | [
"MIT"
] | 890 | 2015-11-16T21:07:07.000Z | 2022-03-29T08:52:07.000Z | lib/credo/check/readability/parentheses_on_zero_arity_defs.ex | hrzndhrn/credo | 71a7b24a5ca8e7a48416e0cdfb42cf8a0fef9593 | [
"MIT"
] | 479 | 2015-11-17T19:42:40.000Z | 2022-03-29T00:09:21.000Z | defmodule Credo.Check.Readability.ParenthesesOnZeroArityDefs do
use Credo.Check,
base_priority: :low,
param_defaults: [parens: false],
explanations: [
check: """
Either use parentheses or not when defining a function with no arguments.
By default, this check enforces no parentheses, so ... | 29.583333 | 88 | 0.654147 |
62d367abe4564760ec115b4feb42c1dac2503b77 | 4,977 | ex | Elixir | lib/ex_admin/filter.ex | augnustin/ex_admin | 218d0094de8186808924dcca6157875a7bb382c9 | [
"MIT"
] | 2 | 2019-12-21T12:59:19.000Z | 2020-04-01T15:27:12.000Z | lib/ex_admin/filter.ex | augnustin/ex_admin | 218d0094de8186808924dcca6157875a7bb382c9 | [
"MIT"
] | null | null | null | lib/ex_admin/filter.ex | augnustin/ex_admin | 218d0094de8186808924dcca6157875a7bb382c9 | [
"MIT"
] | 1 | 2020-02-29T22:13:24.000Z | 2020-02-29T22:13:24.000Z | Code.ensure_compiled(ExAdmin.Utils)
defmodule ExAdmin.Filter do
@moduledoc false
require Logger
require Ecto.Query
import ExAdmin.Theme.Helpers
import ExAdmin.Utils
import ExAdmin.Gettext
use Xain
@integer_options [
eq: gettext("Equal To"),
gt: gettext("Greater Than"),
lt: gettext("Less Th... | 26.473404 | 85 | 0.616837 |
62d37100bc625a5c0dfdd5460ab4210ff907e6ce | 1,828 | exs | Elixir | test/cog/rule_test.exs | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 1,003 | 2016-02-23T17:21:12.000Z | 2022-02-20T14:39:35.000Z | test/cog/rule_test.exs | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 906 | 2016-02-22T22:54:19.000Z | 2022-03-11T15:19:43.000Z | test/cog/rule_test.exs | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 95 | 2016-02-23T13:42:31.000Z | 2021-11-30T14:39:55.000Z | defmodule RuleTest do
use Cog.ModelCase
alias Cog.Models.Bundle
alias Cog.Models.Command
alias Cog.Models.Rule
setup do
bundle = Bundle.changeset(%Bundle{}, %{name: "test_bundle", version: "0.0.1", config_file: %{}}) |> Repo.insert!
{:ok, command} = Command.insert_new(%{name: "pugbomb", bundle_id: bu... | 35.843137 | 118 | 0.661926 |
62d3afe4a3890e0154a2444ab97c4b6c6d4f42a8 | 239 | ex | Elixir | lib/arkenston_web/schema/types/enum/user_role.ex | dolfinus/omicron-backend | dd3544a421ce8b05447fe72640f73f180549270f | [
"MIT"
] | 1 | 2019-04-29T18:07:08.000Z | 2019-04-29T18:07:08.000Z | lib/arkenston_web/schema/types/enum/user_role.ex | dolfinus/omicron-backend | dd3544a421ce8b05447fe72640f73f180549270f | [
"MIT"
] | 126 | 2020-12-03T15:39:31.000Z | 2022-03-30T22:02:23.000Z | lib/arkenston_web/schema/types/enum/user_role.ex | dolfinus/arkenston-backend | 258880936dce673eb15db0c4b52e68d3d40c58ff | [
"MIT"
] | null | null | null | defmodule ArkenstonWeb.Schema.Types.Enum.UserRole do
use Absinthe.Schema.Notation
enum :user_role do
value :user, description: "User"
value :moderator, description: "Moderator"
value :admin, description: "Admin"
end
end
| 23.9 | 52 | 0.736402 |
62d3d141a06fcec04acc33cd234a14b1d75a214b | 2,130 | exs | Elixir | test/serum/build_test.exs | nallwhy/Serum | ed9f51a83e328789ccfca18d2a0397b45ac4be0f | [
"MIT"
] | null | null | null | test/serum/build_test.exs | nallwhy/Serum | ed9f51a83e328789ccfca18d2a0397b45ac4be0f | [
"MIT"
] | null | null | null | test/serum/build_test.exs | nallwhy/Serum | ed9f51a83e328789ccfca18d2a0397b45ac4be0f | [
"MIT"
] | null | null | null | defmodule Serum.BuildTest do
use ExUnit.Case
require Serum.TestHelper
import Serum.TestHelper
alias Serum.Build
alias Serum.Project.Loader, as: ProjectLoader
setup do
tmp_dir = get_tmp_dir("serum_test_")
src = Path.join(tmp_dir, "src")
dest = Path.join(tmp_dir, "dest")
Enum.each([tmp_dir, ... | 25.97561 | 89 | 0.626291 |
62d3f4865c8be8577ac0dc258a1f794194c86f91 | 3,153 | ex | Elixir | lib/mazes/rectangular_maze_with_mask.ex | angelikatyborska/mazes | cba3b1d6aaaa896f4ca505b477cf03b67523ebf0 | [
"MIT"
] | 116 | 2020-12-26T20:56:01.000Z | 2022-03-12T15:12:37.000Z | lib/mazes/rectangular_maze_with_mask.ex | lohayon/mazes | 98a6276ea7440af938edfb14476a5877fdc295e1 | [
"MIT"
] | null | null | null | lib/mazes/rectangular_maze_with_mask.ex | lohayon/mazes | 98a6276ea7440af938edfb14476a5877fdc295e1 | [
"MIT"
] | 10 | 2020-12-29T05:11:43.000Z | 2022-01-02T00:57:12.000Z | defmodule Mazes.RectangularMazeWithMask do
@behaviour Mazes.Maze
alias Mazes.{Maze, RectangularMaze, Mask}
@doc "Returns a rectangular maze with given size, either with all walls or no walls"
@impl true
def new(opts) do
file = Keyword.get(opts, :file)
if file do
new_from_file(file, Keyword.del... | 28.926606 | 90 | 0.583254 |
62d3fb4083b186b210c5e0ff252c0be26ba64fa3 | 3,101 | exs | Elixir | test/nickdotcom_web/controllers/post_controller_test.exs | nickyeager/nickdotcom | e1a0f32c44da2111c9d8b22800edeb831d893b5e | [
"MIT"
] | null | null | null | test/nickdotcom_web/controllers/post_controller_test.exs | nickyeager/nickdotcom | e1a0f32c44da2111c9d8b22800edeb831d893b5e | [
"MIT"
] | null | null | null | test/nickdotcom_web/controllers/post_controller_test.exs | nickyeager/nickdotcom | e1a0f32c44da2111c9d8b22800edeb831d893b5e | [
"MIT"
] | null | null | null | defmodule NickdotcomWeb.PostControllerTest do
use NickdotcomWeb.ConnCase
alias Nickdotcom.Articles
@create_attrs %{body: "some body", cover: "some cover", published: true, slug: "some slug", title: "some title", user_id: 42}
@update_attrs %{body: "some updated body", cover: "some updated cover", published: fa... | 32.642105 | 160 | 0.655917 |
62d40835aa18149916e55ee6fe439867d7b4979d | 1,067 | ex | Elixir | lib/groups_chat/application.ex | tyde81/groups-chat | 15cf9aca8339bc2c9813540c33ab85ced9fbc25b | [
"MIT"
] | null | null | null | lib/groups_chat/application.ex | tyde81/groups-chat | 15cf9aca8339bc2c9813540c33ab85ced9fbc25b | [
"MIT"
] | null | null | null | lib/groups_chat/application.ex | tyde81/groups-chat | 15cf9aca8339bc2c9813540c33ab85ced9fbc25b | [
"MIT"
] | null | null | null | defmodule GroupsChat.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
children = [
# Start the Ecto repository
GroupsChat.Repo,
# Start the Telemetry supervisor
G... | 29.638889 | 68 | 0.709466 |
62d44231227ef62b6b430fe3a3d0fe52b75e29c1 | 1,330 | exs | Elixir | test/lucidboard/live_board_test.exs | borodark/lucidboard | 487a9a54053977ea9704121d4a6a4343012d4421 | [
"MIT"
] | 86 | 2019-01-07T20:49:04.000Z | 2021-10-02T21:15:42.000Z | test/lucidboard/live_board_test.exs | borodark/lucidboard | 487a9a54053977ea9704121d4a6a4343012d4421 | [
"MIT"
] | 26 | 2019-03-27T12:06:52.000Z | 2020-09-20T05:21:09.000Z | test/lucidboard/live_board_test.exs | borodark/lucidboard | 487a9a54053977ea9704121d4a6a4343012d4421 | [
"MIT"
] | 19 | 2015-01-06T19:02:49.000Z | 2020-05-25T08:54:00.000Z | defmodule Lucidboard.LiveBoardTest do
@moduledoc false
use LucidboardWeb.ConnCase, async: false
alias Lucidboard.{Board, Column, LiveBoard, Seeds, Twiddler}
test "basic LiveBoard lifecycle" do
user = Seeds.get_user()
# Create a board record in the db
{:ok, %Board{id: board_id, columns: [%Column{id... | 28.297872 | 73 | 0.638346 |
62d4697e45eb1f00491ecc212251c71509baa917 | 2,004 | ex | Elixir | lib/f1_calendar_bot/telegram.ex | evbogdanov/f1_calendar_bot | cc9fb51cea19062dde1cb1b1194406de4ff19938 | [
"BSD-3-Clause"
] | null | null | null | lib/f1_calendar_bot/telegram.ex | evbogdanov/f1_calendar_bot | cc9fb51cea19062dde1cb1b1194406de4ff19938 | [
"BSD-3-Clause"
] | null | null | null | lib/f1_calendar_bot/telegram.ex | evbogdanov/f1_calendar_bot | cc9fb51cea19062dde1cb1b1194406de4ff19938 | [
"BSD-3-Clause"
] | null | null | null | defmodule F1CalendarBot.Telegram do
@token Application.get_env(:f1_calendar_bot, :token)
@url "https://api.telegram.org/bot#{@token}/"
@timeout Application.get_env(:f1_calendar_bot, :long_polling_timeout)
## API
## -----------------------------------------------------------------------------
def get_me, ... | 29.910448 | 82 | 0.548902 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.