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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
913c53d51c12e66b6d4766221c9c65e18e532440 | 12,988 | ex | Elixir | lib/oban/telemetry.ex | stefanchrobot/oban | 961015b92b9cae442d2834ad220a85ccdcc9da2d | [
"Apache-2.0"
] | null | null | null | lib/oban/telemetry.ex | stefanchrobot/oban | 961015b92b9cae442d2834ad220a85ccdcc9da2d | [
"Apache-2.0"
] | null | null | null | lib/oban/telemetry.ex | stefanchrobot/oban | 961015b92b9cae442d2834ad220a85ccdcc9da2d | [
"Apache-2.0"
] | null | null | null | defmodule Oban.Telemetry do
@moduledoc """
Telemetry integration for event metrics, logging and error reporting.
### Initialization Events
Oban emits the following telemetry event when an Oban supervisor is started:
* `[:oban, :supervisor, :init]` - when the Oban supervisor is started this will execute
... | 39.003003 | 110 | 0.573067 |
913c7d70c21e3c429130e928e49bb29a8f7679bc | 1,995 | ex | Elixir | lib/phoenix_toggl/time_boundries/time_boundries.ex | arashm/phoenix-toggl | 3a7b8470c48efdbe84bd9dc29403aea851e90986 | [
"MIT"
] | null | null | null | lib/phoenix_toggl/time_boundries/time_boundries.ex | arashm/phoenix-toggl | 3a7b8470c48efdbe84bd9dc29403aea851e90986 | [
"MIT"
] | null | null | null | lib/phoenix_toggl/time_boundries/time_boundries.ex | arashm/phoenix-toggl | 3a7b8470c48efdbe84bd9dc29403aea851e90986 | [
"MIT"
] | 1 | 2020-02-14T20:31:58.000Z | 2020-02-14T20:31:58.000Z | defmodule PhoenixToggl.TimeBoundries do
@moduledoc """
The boundary for the TimeBoundries system.
"""
import Ecto.Query, warn: false
alias PhoenixToggl.Repo
alias PhoenixToggl.TimeBoundries.TimeEntry
@doc """
Returns the list of time_entries.
## Examples
iex> list_time_entries()
[%Tim... | 19 | 65 | 0.63609 |
913c866297ceb37cfd464a3c822b261b6a26d295 | 1,104 | ex | Elixir | lib/banchan_web/live/studio_live/index.ex | riamaria/banchan | c4f8bd9374acaf0a8bb2c501e2ae1eb78f96579f | [
"BlueOak-1.0.0",
"Apache-2.0"
] | null | null | null | lib/banchan_web/live/studio_live/index.ex | riamaria/banchan | c4f8bd9374acaf0a8bb2c501e2ae1eb78f96579f | [
"BlueOak-1.0.0",
"Apache-2.0"
] | null | null | null | lib/banchan_web/live/studio_live/index.ex | riamaria/banchan | c4f8bd9374acaf0a8bb2c501e2ae1eb78f96579f | [
"BlueOak-1.0.0",
"Apache-2.0"
] | null | null | null | defmodule BanchanWeb.StudioLive.Index do
@moduledoc """
Listing of studios belonging to the current user
"""
use BanchanWeb, :surface_view
alias Surface.Components.LiveRedirect
alias Banchan.Studios
alias BanchanWeb.Components.{Layout, StudioCard}
alias BanchanWeb.Endpoint
@impl true
def mount(_p... | 28.307692 | 98 | 0.651268 |
913c8ef8ebbc15776d8d01fec2d6ceae057c5ce1 | 40,397 | exs | Elixir | lib/logger/test/logger/translator_test.exs | RyanBard/elixir | 3e0f3b47cf26aa121470141b9a1aa55a366c066e | [
"Apache-2.0"
] | 2 | 2018-11-15T06:38:14.000Z | 2018-11-17T18:03:14.000Z | lib/logger/test/logger/translator_test.exs | RyanBard/elixir | 3e0f3b47cf26aa121470141b9a1aa55a366c066e | [
"Apache-2.0"
] | null | null | null | lib/logger/test/logger/translator_test.exs | RyanBard/elixir | 3e0f3b47cf26aa121470141b9a1aa55a366c066e | [
"Apache-2.0"
] | null | null | null | defmodule Logger.TranslatorTest do
use Logger.Case
defmodule MyGenServer do
use GenServer
def init(args) do
{:ok, args}
end
def handle_cast(:error, _) do
raise "oops"
end
def handle_call(:exit, _, _) do
exit(:oops)
end
def handle_call(:error, _, _) do
rai... | 38.002822 | 146 | 0.564423 |
913c9fe946c04bca964ea1ad54e25ca1222e7329 | 326 | ex | Elixir | lib/bonfire/sharing/supervisor.ex | qhwa/bonfire | 4a368d6d5300539399dcaff167ac69e3165c2bff | [
"MIT"
] | 71 | 2020-03-09T02:09:30.000Z | 2022-03-09T06:10:23.000Z | lib/bonfire/sharing/supervisor.ex | qhwa/bonfire | 4a368d6d5300539399dcaff167ac69e3165c2bff | [
"MIT"
] | null | null | null | lib/bonfire/sharing/supervisor.ex | qhwa/bonfire | 4a368d6d5300539399dcaff167ac69e3165c2bff | [
"MIT"
] | 4 | 2020-04-03T02:28:05.000Z | 2021-11-24T20:07:25.000Z | defmodule Bonfire.Sharing.Supervisor do
@moduledoc false
use Supervisor
def start_link(init_arg) do
Supervisor.start_link(__MODULE__, init_arg, name: __MODULE__)
end
def init(_init_arg) do
children = [
Bonfire.Sharing.Projector
]
Supervisor.init(children, strategy: :one_for_one)
en... | 18.111111 | 65 | 0.723926 |
913ca78655ed6c7572463433198c869f9cafc544 | 942 | ex | Elixir | test/support/channel_case.ex | nullpilot/pawmon | 00623bf1cd2ca126af385bf0c81e5fe3afca11a3 | [
"MIT"
] | null | null | null | test/support/channel_case.ex | nullpilot/pawmon | 00623bf1cd2ca126af385bf0c81e5fe3afca11a3 | [
"MIT"
] | null | null | null | test/support/channel_case.ex | nullpilot/pawmon | 00623bf1cd2ca126af385bf0c81e5fe3afca11a3 | [
"MIT"
] | null | null | null | defmodule PawMonWeb.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 wi... | 26.914286 | 63 | 0.737792 |
913cd311bc20eff8bb9be37a472a1f633df22c71 | 2,585 | ex | Elixir | clients/admin/lib/google_api/admin/datatransfer_v1/model/application.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/admin/lib/google_api/admin/datatransfer_v1/model/application.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/admin/lib/google_api/admin/datatransfer_v1/model/application.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... | 40.390625 | 291 | 0.716054 |
913cf3652c771d4bfddad50f495369843b58ced9 | 667 | ex | Elixir | lib/type/timestamp.ex | IvanPereyra-23/PaaS | 0179c7b57645473308b0a295a70b6284ed220fbf | [
"Apache-2.0"
] | 1 | 2020-08-27T18:43:11.000Z | 2020-08-27T18:43:11.000Z | lib/type/timestamp.ex | IvanPereyra-23/PaaS | 0179c7b57645473308b0a295a70b6284ed220fbf | [
"Apache-2.0"
] | null | null | null | lib/type/timestamp.ex | IvanPereyra-23/PaaS | 0179c7b57645473308b0a295a70b6284ed220fbf | [
"Apache-2.0"
] | 1 | 2020-08-27T18:43:21.000Z | 2020-08-27T18:43:21.000Z | # Copyright(c) 2015-2020 ACCESS CO., LTD. All rights reserved.
use Croma
alias Croma.Result, as: R
alias Antikythera.Time
defmodule Antikythera.IsoTimestamp do
@moduledoc """
A strict subset of ISO8601 format of timestamp.
"""
@type t :: String.t
defun valid?(v :: term) :: boolean do
t when is_binary(... | 20.84375 | 64 | 0.622189 |
913cfb3ceb13e938d7b929e526d003c05cb63aed | 2,988 | ex | Elixir | apps/irc/lib/irc/links_handler.ex | friendshipismagic/Hekateros | 0d340b6818583e2e65b0395227c9bb91796e5f89 | [
"MIT"
] | 2 | 2019-03-22T12:29:37.000Z | 2021-01-08T17:25:32.000Z | apps/irc/lib/irc/links_handler.ex | friendshipismagic/Hecateros | 0d340b6818583e2e65b0395227c9bb91796e5f89 | [
"MIT"
] | 8 | 2017-12-04T16:53:35.000Z | 2018-04-08T11:01:46.000Z | apps/irc/lib/irc/links_handler.ex | friendshipismagic/Hekateros | 0d340b6818583e2e65b0395227c9bb91796e5f89 | [
"MIT"
] | null | null | null | defmodule IRC.LinksHandler do
alias IRC.{State, Helpers}
alias Core.Chan
alias Core.Repo
use GenServer
require Logger
def start_link(%State{}=state) do
GenServer.start_link(__MODULE__, state.client, name: __MODULE__)
end
def init(client) do
ExIRC.Client.add_handler(client, self())
{:ok, c... | 29.009709 | 189 | 0.553213 |
913cff4dc90a6db7637f19dcd52a6db09cbc090b | 1,217 | ex | Elixir | web/views/error_helpers.ex | luca-apostoli/ruru-chat | d6c62000b78592f03cf56f63acd23a6404df1924 | [
"MIT"
] | 1 | 2017-04-22T12:36:19.000Z | 2017-04-22T12:36:19.000Z | web/views/error_helpers.ex | luca-apostoli/ruru-chat | d6c62000b78592f03cf56f63acd23a6404df1924 | [
"MIT"
] | null | null | null | web/views/error_helpers.ex | luca-apostoli/ruru-chat | d6c62000b78592f03cf56f63acd23a6404df1924 | [
"MIT"
] | null | null | null | defmodule Ruru.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), cla... | 29.682927 | 70 | 0.664749 |
913d2ed75c7db9955fca33c458e8299d5de206f1 | 3,100 | ex | Elixir | lib/honeydew/workers.ex | rodrigues/honeydew | 05777189f30b3b13428027ce75bdecf6d7b760db | [
"MIT"
] | null | null | null | lib/honeydew/workers.ex | rodrigues/honeydew | 05777189f30b3b13428027ce75bdecf6d7b760db | [
"MIT"
] | null | null | null | lib/honeydew/workers.ex | rodrigues/honeydew | 05777189f30b3b13428027ce75bdecf6d7b760db | [
"MIT"
] | null | null | null | defmodule Honeydew.Workers do
alias Honeydew.{WorkerGroupsSupervisor, WorkerStarter}
@type queue_name :: Honeydew.queue_name()
@type mod_or_mod_args :: Honeydew.mod_or_mod_args()
@type worker_spec_opt :: Honeydew.worker_spec_opt()
@doc """
Creates a supervision spec for workers.
`queue` is the name of ... | 34.444444 | 109 | 0.673548 |
913d332d9ad8be9c16256edc013879d3df689b94 | 4,226 | exs | Elixir | spec/aoc/day03_spec.exs | CraigCottingham/advent-of-code-2019 | 76a1545e4cca14fe1e9e0de475de253170da1645 | [
"Apache-2.0"
] | null | null | null | spec/aoc/day03_spec.exs | CraigCottingham/advent-of-code-2019 | 76a1545e4cca14fe1e9e0de475de253170da1645 | [
"Apache-2.0"
] | null | null | null | spec/aoc/day03_spec.exs | CraigCottingham/advent-of-code-2019 | 76a1545e4cca14fe1e9e0de475de253170da1645 | [
"Apache-2.0"
] | null | null | null | defmodule AoC.Day03.Spec do
@moduledoc false
use ESpec
describe "sanity checks" do
it "tests closest_intersection/2" do
p = AoC.Day03.closest_intersection([["R8", "U5", "L5", "D3"], ["U7", "R6", "D4", "L4"]])
expect(p) |> to(eq({3, 3}))
expect(AoC.Day03.manhattan_distance({0, 0}, p)) |> to... | 32.507692 | 98 | 0.420256 |
913d4ec37324e00b46c65d7c2f10caeb5e67188e | 1,553 | ex | Elixir | apps/torrent_downloader/lib/torrent_downloader/peer_swarm.ex | sschneider1207/ex_torrent | 39e58891ddb642b058a4739752453276aa16ce0d | [
"MIT"
] | null | null | null | apps/torrent_downloader/lib/torrent_downloader/peer_swarm.ex | sschneider1207/ex_torrent | 39e58891ddb642b058a4739752453276aa16ce0d | [
"MIT"
] | null | null | null | apps/torrent_downloader/lib/torrent_downloader/peer_swarm.ex | sschneider1207/ex_torrent | 39e58891ddb642b058a4739752453276aa16ce0d | [
"MIT"
] | null | null | null | defmodule TorrentDownloader.PeerSwarm do
@moduledoc """
Process that manages open connections to peers, and the states associated with said connections.
"""
use GenServer
alias TorrentDownloader.{NameRegistry, Torrent, TrackerRegistry}
alias GenPeer.UTorrentTransportProtocol
defmodule State do
@mod... | 28.759259 | 109 | 0.70058 |
913d9ee6647db89b08350b0780b5d3d35c19f534 | 377 | exs | Elixir | test/furlex/parser/facebook_test.exs | chrisalmeida/furlex | 28a2f1eb68e829b98ad805a5113a2a942213c778 | [
"Apache-2.0"
] | 1 | 2019-01-23T13:39:18.000Z | 2019-01-23T13:39:18.000Z | test/furlex/parser/facebook_test.exs | alexcastano/furlex | c8e4e474aa2494285fdc19b133d3ad1ea348add9 | [
"Apache-2.0"
] | null | null | null | test/furlex/parser/facebook_test.exs | alexcastano/furlex | c8e4e474aa2494285fdc19b133d3ad1ea348add9 | [
"Apache-2.0"
] | 1 | 2019-01-11T09:52:03.000Z | 2019-01-11T09:52:03.000Z | defmodule Furlex.Parser.FacebookTest do
use ExUnit.Case
alias Furlex.Parser.Facebook
doctest Facebook
test "parses Facebook Open Graph" do
html = "<html><head><meta property=\"og:url\" " <>
"content=\"www.example.com\"/></head></html>"
assert {:ok, %{
"og" => %{
"url" => "ww... | 20.944444 | 56 | 0.591512 |
913da6ea87f2a83f1a10845b9171ee297b8c2e85 | 313 | exs | Elixir | config/dogma.exs | cgiffard/plug_graphql | 588fcef49ae429fb12e3241a28bbcc35c73eb5fb | [
"BSD-3-Clause"
] | 91 | 2016-03-02T11:40:21.000Z | 2021-08-04T08:42:03.000Z | config/dogma.exs | cgiffard/plug_graphql | 588fcef49ae429fb12e3241a28bbcc35c73eb5fb | [
"BSD-3-Clause"
] | 20 | 2015-11-24T20:52:12.000Z | 2016-02-29T17:21:27.000Z | config/dogma.exs | cgiffard/plug_graphql | 588fcef49ae429fb12e3241a28bbcc35c73eb5fb | [
"BSD-3-Clause"
] | 9 | 2015-11-26T00:45:11.000Z | 2016-02-26T19:29:50.000Z | use Mix.Config
alias Dogma.Rule
config :dogma,
# Select a set of rules as a base
rule_set: Dogma.RuleSet.All,
# Pick paths not to lint
exclude: [
~r(\Atest/),
],
# Override an existing rule configuration
override: [
%Rule.LineLength{max_length: 120},
%Rule.FunctionArity{max: 5}
]
| 16.473684 | 43 | 0.658147 |
913dacad0df8456cd8df5d2d356eb52b73740dc2 | 1,218 | ex | Elixir | apps/ewallet/lib/ewallet/web/v1/overlays/configuration_overlay.ex | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | apps/ewallet/lib/ewallet/web/v1/overlays/configuration_overlay.ex | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | apps/ewallet/lib/ewallet/web/v1/overlays/configuration_overlay.ex | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 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... | 20.644068 | 74 | 0.646962 |
913dee7ea58da3da62a36c155c67a9888c36f70e | 4,908 | ex | Elixir | lib/elixir_bme280.ex | fhunleth/elixir_bme680 | b0dadd877e9eff9a7a3ad166702899cf552c7ab1 | [
"Apache-2.0"
] | null | null | null | lib/elixir_bme280.ex | fhunleth/elixir_bme680 | b0dadd877e9eff9a7a3ad166702899cf552c7ab1 | [
"Apache-2.0"
] | null | null | null | lib/elixir_bme280.ex | fhunleth/elixir_bme680 | b0dadd877e9eff9a7a3ad166702899cf552c7ab1 | [
"Apache-2.0"
] | null | null | null | defmodule Bme280 do
@moduledoc """
`elixir_bme280` provides a high level abstraction to interface with the
BME280 environmental sensor on Linux platforms.
"""
use Bitwise
use GenServer
require Logger
defmodule State do
@moduledoc false
defstruct port: nil, subscribers: [], async_subscribers: []... | 28.870588 | 90 | 0.636919 |
913e0a030c27dc13a525c0aa84514b7a8c2d1d7e | 1,670 | ex | Elixir | web/web.ex | simwms/apiv4 | c3da7407eaf3580b759f49726028439b4b8ea9d0 | [
"MIT"
] | 2 | 2016-02-25T20:12:35.000Z | 2018-01-03T00:03:12.000Z | web/web.ex | simwms/apiv4 | c3da7407eaf3580b759f49726028439b4b8ea9d0 | [
"MIT"
] | 1 | 2016-01-11T04:50:39.000Z | 2016-01-12T05:00:08.000Z | web/web.ex | simwms/apiv4 | c3da7407eaf3580b759f49726028439b4b8ea9d0 | [
"MIT"
] | null | null | null | defmodule Apiv4.Web do
@moduledoc """
A module that keeps using definitions for controllers,
views and so on.
This can be used in your application as:
use Apiv4.Web, :controller
use Apiv4.Web, :view
The definitions below will be executed for every view,
controller, etc, so keep them short and... | 20.365854 | 88 | 0.655689 |
913e0f38358b4a358e1cad4dc17937e07488e684 | 17,801 | ex | Elixir | lib/storage/blob.ex | nulian/ex_microsoft_azure_storage | b147de024ceb1fd21d617863a9c53c41263700a6 | [
"MIT"
] | null | null | null | lib/storage/blob.ex | nulian/ex_microsoft_azure_storage | b147de024ceb1fd21d617863a9c53c41263700a6 | [
"MIT"
] | null | null | null | lib/storage/blob.ex | nulian/ex_microsoft_azure_storage | b147de024ceb1fd21d617863a9c53c41263700a6 | [
"MIT"
] | null | null | null | defmodule ExMicrosoftAzureStorage.Storage.Blob do
@moduledoc """
Blob
"""
require Logger
import SweetXml
import ExMicrosoftAzureStorage.Storage.RequestBuilder
alias ExMicrosoftAzureStorage.Storage.{BlobProperties, Container}
@enforce_keys [:container, :blob_name]
@max_concurrency 3
@max_number_of_... | 29.717863 | 110 | 0.626482 |
913e16af0670182927ab02cc3f0c50bf2270e7ac | 4,326 | ex | Elixir | lib/plaid/institutions.ex | mrhooray/plaid-elixir | 3fe1a3794c49cfa50af2b372990394f14c5b8054 | [
"MIT"
] | null | null | null | lib/plaid/institutions.ex | mrhooray/plaid-elixir | 3fe1a3794c49cfa50af2b372990394f14c5b8054 | [
"MIT"
] | null | null | null | lib/plaid/institutions.ex | mrhooray/plaid-elixir | 3fe1a3794c49cfa50af2b372990394f14c5b8054 | [
"MIT"
] | null | null | null | defmodule Plaid.Institutions do
@moduledoc """
Functions for Plaid `institutions` endpoint.
"""
import Plaid, only: [make_request_with_cred: 4, get_cred: 0, get_key: 0]
alias Plaid.Utils
@derive Jason.Encoder
defstruct institutions: [], request_id: nil, total: nil
@type t :: %__MODULE__{
i... | 28.84 | 98 | 0.564263 |
913e2faab2484045186553384d788e2941916828 | 168 | exs | Elixir | priv/repo/migrations/20180404091422_rename_cmspassport_roles.exs | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | 1 | 2019-05-07T15:03:54.000Z | 2019-05-07T15:03:54.000Z | priv/repo/migrations/20180404091422_rename_cmspassport_roles.exs | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | null | null | null | priv/repo/migrations/20180404091422_rename_cmspassport_roles.exs | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | null | null | null | defmodule MastaniServer.Repo.Migrations.RenameCmspassportRoles do
use Ecto.Migration
def change do
rename(table(:cms_passports), :roles, to: :rules)
end
end
| 21 | 65 | 0.767857 |
913ec139574691daddc94381d853dcaf928b8d3b | 8,189 | ex | Elixir | apps/artemis_web/lib/artemis_web/controllers/macros/comments_show.ex | artemis-platform/artemis_dashboard | 5ab3f5ac4c5255478bbebf76f0e43b44992e3cab | [
"MIT"
] | 9 | 2019-08-19T19:56:34.000Z | 2022-03-22T17:56:38.000Z | apps/artemis_web/lib/artemis_web/controllers/macros/comments_show.ex | chrislaskey/artemis_teams | 9930c3d9528e37b76f0525390e32b66eed7eadde | [
"MIT"
] | 7 | 2019-07-12T21:41:01.000Z | 2020-08-17T21:29:22.000Z | apps/artemis_web/lib/artemis_web/controllers/macros/comments_show.ex | chrislaskey/artemis_teams | 9930c3d9528e37b76f0525390e32b66eed7eadde | [
"MIT"
] | 2 | 2019-07-05T22:51:47.000Z | 2019-08-19T19:56:37.000Z | defmodule ArtemisWeb.Controller.CommentsShow do
@moduledoc """
Functions to list Comments related to the resource.
## Setup
### Router
The suggested way to route requests is by defining two new routes.
Given a typical resource:
resources "/permissions", PermissionController
Add the following r... | 34.699153 | 105 | 0.634876 |
913ecdd83668ceda22feafe8dd32405e5c78b22a | 553 | ex | Elixir | webpage/lib/skeleton_webpage_web/router.ex | psychowico/phoenix-vuejs-skeleton | 6e8fa12bf1050bb08c5e312fd972db92a1e0b214 | [
"MIT"
] | null | null | null | webpage/lib/skeleton_webpage_web/router.ex | psychowico/phoenix-vuejs-skeleton | 6e8fa12bf1050bb08c5e312fd972db92a1e0b214 | [
"MIT"
] | null | null | null | webpage/lib/skeleton_webpage_web/router.ex | psychowico/phoenix-vuejs-skeleton | 6e8fa12bf1050bb08c5e312fd972db92a1e0b214 | [
"MIT"
] | null | null | null | defmodule SkeletonWebpageWeb.Router do
use SkeletonWebpageWeb, :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 "/", Skeleto... | 20.481481 | 57 | 0.698011 |
913ed9b2330ad126b979adcc59cc666f2ba182bf | 260 | exs | Elixir | config/test.exs | NatTuck/draw | e2a709925ae5dbcea008904fe03590623008c50e | [
"Apache-1.1"
] | null | null | null | config/test.exs | NatTuck/draw | e2a709925ae5dbcea008904fe03590623008c50e | [
"Apache-1.1"
] | null | null | null | config/test.exs | NatTuck/draw | e2a709925ae5dbcea008904fe03590623008c50e | [
"Apache-1.1"
] | null | null | null | use Mix.Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :draw, DrawWeb.Endpoint,
http: [port: 4002],
server: false
# Print only warnings and errors during test
config :logger, level: :warn
| 23.636364 | 56 | 0.730769 |
913f17b7d31eeb7f3a475d1420bb06fddfd81cf4 | 827 | ex | Elixir | apps/exred_scheduler/lib/exred_scheduler/application.ex | exredorg/exred | 0ece8e6680747ba8f30b4413ede598a45495aa7c | [
"MIT"
] | null | null | null | apps/exred_scheduler/lib/exred_scheduler/application.ex | exredorg/exred | 0ece8e6680747ba8f30b4413ede598a45495aa7c | [
"MIT"
] | null | null | null | apps/exred_scheduler/lib/exred_scheduler/application.ex | exredorg/exred | 0ece8e6680747ba8f30b4413ede598a45495aa7c | [
"MIT"
] | null | null | null | defmodule Exred.Scheduler.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 = [
Exred.Scheduler.DeployManager,
Exred.S... | 30.62963 | 74 | 0.723096 |
913f1b166e51ac8f62e999dbd9dc1c4c0c69d250 | 660 | exs | Elixir | mix.exs | artemeff/ex_unit_assertions | c11e1a7dc0ab36ebedc15754bd7b77624818a075 | [
"MIT"
] | 1 | 2017-05-18T13:16:38.000Z | 2017-05-18T13:16:38.000Z | mix.exs | artemeff/ex_unit_assertions | c11e1a7dc0ab36ebedc15754bd7b77624818a075 | [
"MIT"
] | null | null | null | mix.exs | artemeff/ex_unit_assertions | c11e1a7dc0ab36ebedc15754bd7b77624818a075 | [
"MIT"
] | null | null | null | defmodule ExUnitAssertions.Mixfile do
use Mix.Project
def project do
[app: :ex_unit_assertions,
version: "0.2.0",
elixir: "~> 1.4",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
description: description(),
package: package(),
deps: deps()]
end
def ... | 20 | 76 | 0.615152 |
913f2cde2c624923dc8d0e07bae1009a432d9429 | 2,430 | exs | Elixir | test/controllers/subasta_controller_test.exs | lucaslencinas/iasc-subastas | ef431a0820bff3f87d89f6f7bdcfaf2101e3002e | [
"MIT"
] | null | null | null | test/controllers/subasta_controller_test.exs | lucaslencinas/iasc-subastas | ef431a0820bff3f87d89f6f7bdcfaf2101e3002e | [
"MIT"
] | null | null | null | test/controllers/subasta_controller_test.exs | lucaslencinas/iasc-subastas | ef431a0820bff3f87d89f6f7bdcfaf2101e3002e | [
"MIT"
] | null | null | null | defmodule IascSubastas.SubastaControllerTest do
use IascSubastas.ConnCase
alias IascSubastas.Subasta
@valid_attrs %{precio_base: "120.5", duracion: 42, titulo: "some content", vendedor: "vendedor"}
@invalid_attrs %{}
setup do
conn = conn() |> put_req_header("accept", "application/json")
{:ok, conn: ... | 36.268657 | 98 | 0.67572 |
913f2d43101ab59dfa211980920ee7386d5c585e | 555 | ex | Elixir | lib/extracker/format.ex | Cantido/ex_tracker | 32f5785a39b5da209e2a4564f6e004479283fc1e | [
"MIT"
] | 1 | 2021-11-23T04:29:37.000Z | 2021-11-23T04:29:37.000Z | lib/extracker/format.ex | Cantido/ex_tracker | 32f5785a39b5da209e2a4564f6e004479283fc1e | [
"MIT"
] | 6 | 2020-11-10T03:44:44.000Z | 2022-02-28T11:05:39.000Z | lib/extracker/format.ex | Cantido/ex_tracker | 32f5785a39b5da209e2a4564f6e004479283fc1e | [
"MIT"
] | 1 | 2020-01-08T16:23:42.000Z | 2020-01-08T16:23:42.000Z | # SPDX-FileCopyrightText: 2021 Rosa Richter
#
# SPDX-License-Identifier: MIT
defmodule Extracker.Format do
@moduledoc """
Serializer for peers.
"""
@doc """
Serialize a peer into a binary, either `:standard` or `:compact`.
"""
def format(body, style)
def format(body, :standard), do: Extracker.Format.... | 24.130435 | 73 | 0.637838 |
913f35a1cb91e07d693df45917d1ac3e852902a4 | 281 | exs | Elixir | priv/repo/migrations/20211113001103_add_api_tokens.exs | ConnorRigby/yourbot | eea40e63b0f93963ed14b7efab9ecbe898ab11dd | [
"Apache-2.0"
] | 3 | 2021-11-08T15:19:19.000Z | 2021-11-11T03:18:35.000Z | priv/repo/migrations/20211113001103_add_api_tokens.exs | ConnorRigby/yourbot | eea40e63b0f93963ed14b7efab9ecbe898ab11dd | [
"Apache-2.0"
] | null | null | null | priv/repo/migrations/20211113001103_add_api_tokens.exs | ConnorRigby/yourbot | eea40e63b0f93963ed14b7efab9ecbe898ab11dd | [
"Apache-2.0"
] | null | null | null | defmodule YourBot.Repo.Migrations.AddApiTokens do
use Ecto.Migration
def change do
create table(:api_tokens) do
add :user_id, references(:users), null: false
add :token, :binary, null: false
end
create index(:api_tokens, [:user_id, :token])
end
end
| 21.615385 | 51 | 0.686833 |
913f95c4077ccf8a1a022f318c411a8b6245bb1a | 1,719 | ex | Elixir | apps/discovery_api/test/integration/support/data_case.ex | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | 26 | 2019-09-20T23:54:45.000Z | 2020-08-20T14:23:32.000Z | apps/discovery_api/test/integration/support/data_case.ex | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | 757 | 2019-08-15T18:15:07.000Z | 2020-09-18T20:55:31.000Z | apps/discovery_api/test/integration/support/data_case.ex | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | 9 | 2019-11-12T16:43:46.000Z | 2020-03-25T16:23:16.000Z | defmodule DiscoveryApi.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.
Additionally, the ecto database will be created and migrated.
Finally, if the test case interact... | 26.446154 | 77 | 0.688191 |
913fa09c098c072c52e965f71128750410e0222b | 284 | ex | Elixir | auto_hangman/lib/auto_hangman/summary.ex | Greenheart/elixir-hangman | 1f4f652e212be318de97660ea405b7588c899be8 | [
"MIT"
] | null | null | null | auto_hangman/lib/auto_hangman/summary.ex | Greenheart/elixir-hangman | 1f4f652e212be318de97660ea405b7588c899be8 | [
"MIT"
] | null | null | null | auto_hangman/lib/auto_hangman/summary.ex | Greenheart/elixir-hangman | 1f4f652e212be318de97660ea405b7588c899be8 | [
"MIT"
] | null | null | null | defmodule AutoHangman.Summary do
def display(game = %{tally: tally}) do
IO.puts([
"\n",
"Word so far: #{Enum.join(tally.letters, " ")}\n",
"Guesses left: #{tally.turns_left}\n",
"Letters used: #{Enum.join(tally.used, ", ")}\n"
])
game
end
end
| 21.846154 | 56 | 0.556338 |
913fb897a496834d1765dd7069588b1eedad3f7d | 6,096 | ex | Elixir | lib/scenic/component/input/radio_button.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/radio_button.ex | tiger808/scenic | 77abc6d891b7a1a9262cdc47d7c5fac3c8609d1f | [
"Apache-2.0"
] | 220 | 2018-09-08T01:28:00.000Z | 2022-03-22T03:55:17.000Z | lib/scenic/component/input/radio_button.ex | tiger808/scenic | 77abc6d891b7a1a9262cdc47d7c5fac3c8609d1f | [
"Apache-2.0"
] | 137 | 2018-09-07T21:55:56.000Z | 2022-03-26T04:07:27.000Z | defmodule Scenic.Component.Input.RadioButton do
@moduledoc """
Add a single radio button to a graph.
## Data
`{text, id}`
`{text, id, selected?}`
* `text` - a bitstring of the text to display
* `id` - any term. Identifies the radio button.
* `selected?` - boolean. `true` if selected. `false if not`. ... | 28.619718 | 92 | 0.547408 |
913fd2f5006af0e00566f193ecdc5cdbe7434d3a | 1,920 | ex | Elixir | clients/firebase_rules/lib/google_api/firebase_rules/v1/model/issue.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | null | null | null | clients/firebase_rules/lib/google_api/firebase_rules/v1/model/issue.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | null | null | null | clients/firebase_rules/lib/google_api/firebase_rules/v1/model/issue.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | 1 | 2020-11-10T16:58:27.000Z | 2020-11-10T16:58:27.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 34.909091 | 106 | 0.733854 |
913fffba722c4585de96ef86e60dd01b82a7bdf5 | 945 | ex | Elixir | farmbot_core/lib/farmbot_core/asset/first_party_farmware.ex | adamswsk/farmbot_os | d177d3b74888c1e7bcbf8f8595818708ee97f73b | [
"MIT"
] | 843 | 2016-10-05T23:46:05.000Z | 2022-03-14T04:31:55.000Z | farmbot_core/lib/farmbot_core/asset/first_party_farmware.ex | adamswsk/farmbot_os | d177d3b74888c1e7bcbf8f8595818708ee97f73b | [
"MIT"
] | 455 | 2016-10-15T08:49:16.000Z | 2022-03-15T12:23:04.000Z | farmbot_core/lib/farmbot_core/asset/first_party_farmware.ex | adamswsk/farmbot_os | d177d3b74888c1e7bcbf8f8595818708ee97f73b | [
"MIT"
] | 261 | 2016-10-10T04:37:06.000Z | 2022-03-13T21:07:38.000Z | defmodule FarmbotCore.Asset.FirstPartyFarmware do
@moduledoc """
Exactly the same as FarmwareInstallation
but for first party installations
"""
alias FarmbotCore.Asset.FarmwareInstallation.Manifest
use FarmbotCore.Asset.Schema, path: "/api/first_party_farmwares"
schema "first_party_farmwares" do
fi... | 23.04878 | 68 | 0.683598 |
91400cfe5d1eaca1e588fc7f1217d7384e6959f6 | 13,939 | ex | Elixir | installer/lib/phx_new/generator.ex | jwarwick/phoenix | 46dccaec5c7b79ab3fa863b2138d5a9eb6b4a34b | [
"MIT"
] | null | null | null | installer/lib/phx_new/generator.ex | jwarwick/phoenix | 46dccaec5c7b79ab3fa863b2138d5a9eb6b4a34b | [
"MIT"
] | 1 | 2020-10-12T15:53:00.000Z | 2020-10-12T15:53:00.000Z | installer/lib/phx_new/generator.ex | jwarwick/phoenix | 46dccaec5c7b79ab3fa863b2138d5a9eb6b4a34b | [
"MIT"
] | null | null | null | defmodule Phx.New.Generator do
@moduledoc false
import Mix.Generator
alias Phx.New.{Project}
@phoenix Path.expand("../..", __DIR__)
@phoenix_version Version.parse!(Mix.Project.config()[:version])
@callback prepare_project(Project.t()) :: Project.t()
@callback generate(Project.t()) :: Project.t()
defm... | 31.60771 | 105 | 0.635268 |
914024c121c37029108f55208900a1f5ffbdaf64 | 2,919 | ex | Elixir | clients/you_tube/lib/google_api/you_tube/v3/model/member_list_response.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/you_tube/lib/google_api/you_tube/v3/model/member_list_response.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/you_tube/lib/google_api/you_tube/v3/model/member_list_response.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... | 41.7 | 142 | 0.691675 |
91402dbc3ec946d57ff6c1dd0d97c5b7c1328319 | 462 | exs | Elixir | summer/test/counter_test.exs | mitchelhaan/otpv_2021 | daa795594637657726c8aef88e81fca1ab3f2205 | [
"MIT"
] | null | null | null | summer/test/counter_test.exs | mitchelhaan/otpv_2021 | daa795594637657726c8aef88e81fca1ab3f2205 | [
"MIT"
] | null | null | null | summer/test/counter_test.exs | mitchelhaan/otpv_2021 | daa795594637657726c8aef88e81fca1ab3f2205 | [
"MIT"
] | 3 | 2021-04-22T17:15:08.000Z | 2021-04-26T13:10:55.000Z | defmodule CounterTest do
use ExUnit.Case
alias Summer.Core.Counter
test("Core counter does the needful") do
"42"
|> Counter.new()
|> assert_value(42)
|> Counter.add(1)
|> assert_value(43)
|> Counter.add(1)
|> assert_value(44)
|> Counter.subtract(1)
|> assert_value(43)
|> ... | 18.48 | 42 | 0.623377 |
914088976e67e4997df2b3c6d716f3433a599bc6 | 1,987 | ex | Elixir | lib/mix/lib/mix/generator.ex | ekosz/elixir | 62e375bc711b4072e1b68de776e96cc31f571d45 | [
"Apache-2.0"
] | 1 | 2017-10-29T16:37:08.000Z | 2017-10-29T16:37:08.000Z | lib/mix/lib/mix/generator.ex | ekosz/elixir | 62e375bc711b4072e1b68de776e96cc31f571d45 | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/generator.ex | ekosz/elixir | 62e375bc711b4072e1b68de776e96cc31f571d45 | [
"Apache-2.0"
] | null | null | null | defmodule Mix.Generator do
@moduledoc """
Conveniences for working with paths and generating content.
"""
@doc """
Creates a file with the given contents.
If the file already exists, asks for user confirmation.
"""
def create_file(path, contents) do
Mix.shell.info "* creating #{path}"
if overw... | 25.151899 | 120 | 0.669351 |
9140af37b4ef58f51d1912bed2b75bb0ce9d9b93 | 24 | exs | Elixir | HelloWorld/hello_world.exs | celfilgueiras/BabySteps | 741a10270feaec9a75cb179edea441cc372376fd | [
"MIT"
] | 37 | 2020-10-01T03:50:42.000Z | 2021-11-23T00:49:51.000Z | HelloWorld/hello_world.exs | celfilgueiras/BabySteps | 741a10270feaec9a75cb179edea441cc372376fd | [
"MIT"
] | 27 | 2020-10-03T23:16:13.000Z | 2021-11-19T19:53:01.000Z | HelloWorld/hello_world.exs | celfilgueiras/BabySteps | 741a10270feaec9a75cb179edea441cc372376fd | [
"MIT"
] | 97 | 2020-10-01T11:39:01.000Z | 2021-11-01T00:30:53.000Z | IO.puts("Hello, World!") | 24 | 24 | 0.666667 |
9140b19849a6dd091f88f4cd53cbb127ebe87716 | 88 | exs | Elixir | test/instant_poll_web/views/page_view_test.exs | workgena/instant_poll | 94be29da99cfcb54576ae0ce34d395fff7b8ca39 | [
"MIT"
] | 1 | 2018-11-30T09:08:09.000Z | 2018-11-30T09:08:09.000Z | test/instant_poll_web/views/page_view_test.exs | workgena/instant_poll | 94be29da99cfcb54576ae0ce34d395fff7b8ca39 | [
"MIT"
] | 5 | 2021-01-28T19:08:56.000Z | 2021-05-07T22:43:54.000Z | test/instant_poll_web/views/page_view_test.exs | workgena/instant_poll | 94be29da99cfcb54576ae0ce34d395fff7b8ca39 | [
"MIT"
] | null | null | null | defmodule InstantPollWeb.PageViewTest do
use InstantPollWeb.ConnCase, async: true
end
| 22 | 42 | 0.840909 |
9140b415ee3c61f75160d5b3d5cea0036b00e7bf | 201 | ex | Elixir | lib/phone/mu.ex | net/phone | 18e1356d2f8d32fe3f95638c3c44bceab0164fb2 | [
"Apache-2.0"
] | null | null | null | lib/phone/mu.ex | net/phone | 18e1356d2f8d32fe3f95638c3c44bceab0164fb2 | [
"Apache-2.0"
] | null | null | null | lib/phone/mu.ex | net/phone | 18e1356d2f8d32fe3f95638c3c44bceab0164fb2 | [
"Apache-2.0"
] | null | null | null | defmodule Phone.MU do
@moduledoc false
use Helper.Country
def regex, do: ~r/^(230)()(.{8})/
def country, do: "Mauritius"
def a2, do: "MU"
def a3, do: "MUS"
matcher :regex, ["230"]
end
| 15.461538 | 35 | 0.60199 |
9140e2e8eef5ebbcef5e91ed6cfefffa2d330085 | 2,670 | ex | Elixir | lib/asciinema_web/controllers/api/asciicast_controller.ex | sergey-nechaev/asciinema-server | 64f87acec9c9b45fefa8bed8f70b41f0068ccb2b | [
"Apache-2.0"
] | null | null | null | lib/asciinema_web/controllers/api/asciicast_controller.ex | sergey-nechaev/asciinema-server | 64f87acec9c9b45fefa8bed8f70b41f0068ccb2b | [
"Apache-2.0"
] | null | null | null | lib/asciinema_web/controllers/api/asciicast_controller.ex | sergey-nechaev/asciinema-server | 64f87acec9c9b45fefa8bed8f70b41f0068ccb2b | [
"Apache-2.0"
] | null | null | null | defmodule AsciinemaWeb.Api.AsciicastController do
use AsciinemaWeb, :controller
import AsciinemaWeb.Auth, only: [get_basic_auth: 1, put_basic_auth: 3]
alias Asciinema.{Asciicasts, Accounts}
alias Asciinema.Accounts.User
plug :accepts, ~w(text json)
plug :parse_v0_params
plug :authenticate
def create(c... | 32.168675 | 117 | 0.608614 |
9140e4d47c7a309215d9d83ab38fb283eefd8fd2 | 201 | exs | Elixir | test/course_01_web/controllers/page_controller_test.exs | geirilja/web_dev | e1a64336bf52148a63e54a7326ea9ed13a2034a0 | [
"MIT"
] | null | null | null | test/course_01_web/controllers/page_controller_test.exs | geirilja/web_dev | e1a64336bf52148a63e54a7326ea9ed13a2034a0 | [
"MIT"
] | null | null | null | test/course_01_web/controllers/page_controller_test.exs | geirilja/web_dev | e1a64336bf52148a63e54a7326ea9ed13a2034a0 | [
"MIT"
] | null | null | null | defmodule Course01Web.PageControllerTest do
use Course01Web.ConnCase
test "GET /", %{conn: conn} do
conn = get conn, "/"
assert html_response(conn, 200) =~ "Welcome to Phoenix!"
end
end
| 22.333333 | 60 | 0.686567 |
914124e4f7a19bec1b7256f5a6e25e587d0b5ee0 | 816 | exs | Elixir | test/pg/test_helper.exs | Packlane/ecto_enum | 4431a2f6e0762b67e75b47d17004c6ac0c256352 | [
"MIT"
] | 1 | 2019-08-31T04:07:54.000Z | 2019-08-31T04:07:54.000Z | test/pg/test_helper.exs | Packlane/ecto_enum | 4431a2f6e0762b67e75b47d17004c6ac0c256352 | [
"MIT"
] | null | null | null | test/pg/test_helper.exs | Packlane/ecto_enum | 4431a2f6e0762b67e75b47d17004c6ac0c256352 | [
"MIT"
] | 3 | 2019-08-29T22:10:03.000Z | 2020-06-16T09:10:27.000Z | Logger.configure(level: :info)
ExUnit.start()
alias Ecto.Integration.TestRepo
Application.put_env(:ecto, TestRepo,
adapter: Ecto.Adapters.Postgres,
url: "ecto://postgres@localhost/ecto_test",
pool: Ecto.Adapters.SQL.Sandbox
)
defmodule Ecto.Integration.TestRepo do
use Ecto.Repo, otp_app: :ecto
def log(_cm... | 25.5 | 75 | 0.751225 |
91415468890cf3a9731e78ec13723a7ad034bbb6 | 1,107 | exs | Elixir | test/exmagic_test.exs | fanzeyi/exmagic | f8dafc5a0a8428f1692bbf24865f387f121683d7 | [
"MIT"
] | 5 | 2018-03-22T15:25:52.000Z | 2020-09-23T00:50:14.000Z | test/exmagic_test.exs | fanzeyi/exmagic | f8dafc5a0a8428f1692bbf24865f387f121683d7 | [
"MIT"
] | 1 | 2018-05-31T15:08:53.000Z | 2018-05-31T15:08:53.000Z | test/exmagic_test.exs | fanzeyi/exmagic | f8dafc5a0a8428f1692bbf24865f387f121683d7 | [
"MIT"
] | 3 | 2018-05-29T18:24:47.000Z | 2021-02-09T05:36:06.000Z | defmodule ExMagicTest do
use ExUnit.Case
doctest ExMagic
test "from_binary works" do
# Small (valid) transparent PNG
png_str = "89504E470D0A1A0A0000000D4948445200000001000000010100000000376EF9240000001049444154789C626001000000FFFF03000006000557BFABD40000000049454E44AE426082"
png = Base.decode16!(png_... | 27 | 162 | 0.709124 |
914169a6a288ca6c87df4f811e8feb684514abf6 | 3,618 | ex | Elixir | clients/alert_center/lib/google_api/alert_center/v1beta1/model/activity_rule.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/alert_center/lib/google_api/alert_center/v1beta1/model/activity_rule.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/alert_center/lib/google_api/alert_center/v1beta1/model/activity_rule.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... | 45.225 | 259 | 0.681316 |
91416e9dd8de76186ead8a90755d42c93ba71e4a | 3,074 | ex | Elixir | lib/loader.ex | micapam/SerumRecipes | ba604cfe3d9e9b00909d7d21ba8120efcc9b8b55 | [
"CC0-1.0"
] | null | null | null | lib/loader.ex | micapam/SerumRecipes | ba604cfe3d9e9b00909d7d21ba8120efcc9b8b55 | [
"CC0-1.0"
] | null | null | null | lib/loader.ex | micapam/SerumRecipes | ba604cfe3d9e9b00909d7d21ba8120efcc9b8b55 | [
"CC0-1.0"
] | null | null | null | defmodule SerumRecipes.Plugin.Loader do
require EEx
import Serum.IOProxy, only: [ put_msg: 2 ]
@behaviour Serum.Plugin
@markdown_temporary_path "/tmp/recipes"
@html_output_path "/recipes"
def name, do: "SerumRecipes.Plugin.Loader"
def version, do: "0.0.1"
def elixir, do: "~> 1.12"
def serum, do: ">=... | 24.99187 | 97 | 0.660703 |
91418b046e7850339c9d547964704addc5674c1d | 2,378 | ex | Elixir | lib/mix/tasks/zachaeus.gen.keys.ex | railsmechanic/zachaeus | 4a9a6d424a1080cb54fdcaa3536d773fe7b1dc01 | [
"MIT"
] | 16 | 2020-01-12T16:29:22.000Z | 2021-10-30T22:31:54.000Z | lib/mix/tasks/zachaeus.gen.keys.ex | railsmechanic/zachaeus | 4a9a6d424a1080cb54fdcaa3536d773fe7b1dc01 | [
"MIT"
] | null | null | null | lib/mix/tasks/zachaeus.gen.keys.ex | railsmechanic/zachaeus | 4a9a6d424a1080cb54fdcaa3536d773fe7b1dc01 | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.Zachaeus.Gen.Keys do
@shortdoc "Generates the public/secret key pair"
@moduledoc """
Generates a Zachaeus key pair.
mix zachaeus.gen.keys
Generation of a public/secret key pair in order to sign/verify licenses.
The generated key pair can to be stored in your `config.exs` according... | 27.651163 | 126 | 0.591253 |
91418bc656c310408417025229944d186475424e | 2,810 | ex | Elixir | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_statistical_table.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_statistical_table.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_statistical_table.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 46.065574 | 175 | 0.761922 |
914199cfba90bbde12f695599f96cd58e7aacd68 | 4,241 | exs | Elixir | test/projections/ecto_projection_test.exs | edwardzhou/commanded-ecto-projections | e7e16d3feb04d8faa42c682d77db2cefdc899051 | [
"MIT"
] | null | null | null | test/projections/ecto_projection_test.exs | edwardzhou/commanded-ecto-projections | e7e16d3feb04d8faa42c682d77db2cefdc899051 | [
"MIT"
] | null | null | null | test/projections/ecto_projection_test.exs | edwardzhou/commanded-ecto-projections | e7e16d3feb04d8faa42c682d77db2cefdc899051 | [
"MIT"
] | null | null | null | defmodule Commanded.Projections.EctoProjectionTest do
use ExUnit.Case
import Commanded.Projections.ProjectionAssertions
alias Commanded.Projections.Repo
defmodule AnEvent do
defstruct name: "AnEvent"
end
defmodule AnotherEvent do
defstruct name: "AnotherEvent"
end
defmodule IgnoredEvent do
... | 29.047945 | 94 | 0.661401 |
9141b42a954befbdd61e5035ddbd846f577ded53 | 708 | ex | Elixir | lib/amrita_web/gettext.ex | u3paka/Amrita | de2c566d856fd75925a4dfec58c28c2484c29d5d | [
"Apache-2.0"
] | null | null | null | lib/amrita_web/gettext.ex | u3paka/Amrita | de2c566d856fd75925a4dfec58c28c2484c29d5d | [
"Apache-2.0"
] | 2 | 2020-07-17T08:34:44.000Z | 2021-03-09T08:33:47.000Z | lib/amrita_web/gettext.ex | u3paka/amrita | de2c566d856fd75925a4dfec58c28c2484c29d5d | [
"Apache-2.0"
] | null | null | null | defmodule AmritaWeb.Gettext do
@moduledoc """
A module providing Internationalization with a gettext-based API.
By using [Gettext](https://hexdocs.pm/gettext),
your module gains a set of macros for translations, for example:
import AmritaWeb.Gettext
# Simple translation
gettext("Here is the... | 28.32 | 72 | 0.676554 |
9141ba20fa793275edf1b678634c25ef5f6d3a92 | 1,806 | ex | Elixir | clients/monitoring/lib/google_api/monitoring/v3/model/create_time_series_request.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/monitoring/lib/google_api/monitoring/v3/model/create_time_series_request.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/monitoring/lib/google_api/monitoring/v3/model/create_time_series_request.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | 1 | 2018-07-28T20:50:50.000Z | 2018-07-28T20:50:50.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 37.625 | 381 | 0.766888 |
9141bc93c41c7d534e383a26989fc3318604401d | 65 | ex | Elixir | lib/pdftotext_web/views/page_view.ex | MSP95/pdftotext | f68fb0c661d76c0a14fd8c3c6d831a1d32675cbe | [
"MIT"
] | 5 | 2018-07-19T09:29:54.000Z | 2019-08-04T18:37:15.000Z | lib/pdftotext_web/views/page_view.ex | MSP95/pdftotext | f68fb0c661d76c0a14fd8c3c6d831a1d32675cbe | [
"MIT"
] | 1 | 2021-11-01T08:43:41.000Z | 2021-11-01T08:43:41.000Z | lib/pdftotext_web/views/page_view.ex | MSP95/pdftotext | f68fb0c661d76c0a14fd8c3c6d831a1d32675cbe | [
"MIT"
] | null | null | null | defmodule PdftotextWeb.PageView do
use PdftotextWeb, :view
end
| 16.25 | 34 | 0.815385 |
9141ea5203219567917a0bc879c729a443837920 | 704 | ex | Elixir | lib/ingram_marketplace/model/order_estimation_details.ex | fbettag/ingram_marketplace.ex | 1c63d391707058fb8cf58fdefd54e2ade97acf4b | [
"MIT"
] | null | null | null | lib/ingram_marketplace/model/order_estimation_details.ex | fbettag/ingram_marketplace.ex | 1c63d391707058fb8cf58fdefd54e2ade97acf4b | [
"MIT"
] | null | null | null | lib/ingram_marketplace/model/order_estimation_details.ex | fbettag/ingram_marketplace.ex | 1c63d391707058fb8cf58fdefd54e2ade97acf4b | [
"MIT"
] | null | null | null | defmodule Ingram.Marketplace.Model.OrderEstimationDetails do
@moduledoc """
The representation of an order estimation.
"""
@derive [Poison.Encoder]
defstruct [
:total,
:products
]
@type t :: %__MODULE__{
:total => TotalOrderPriceEstimation,
:products => [OrderProductEstimatio... | 26.074074 | 96 | 0.72017 |
9141eca94d954d69b0a8e77ed4fef72be4f20a88 | 664 | ex | Elixir | lib/cforum/badges/badge_user.ex | jrieger/cforum_ex | 61f6ce84708cb55bd0feedf69853dae64146a7a0 | [
"MIT"
] | 16 | 2019-04-04T06:33:33.000Z | 2021-08-16T19:34:31.000Z | lib/cforum/badges/badge_user.ex | jrieger/cforum_ex | 61f6ce84708cb55bd0feedf69853dae64146a7a0 | [
"MIT"
] | 294 | 2019-02-10T11:10:27.000Z | 2022-03-30T04:52:53.000Z | lib/cforum/badges/badge_user.ex | jrieger/cforum_ex | 61f6ce84708cb55bd0feedf69853dae64146a7a0 | [
"MIT"
] | 10 | 2019-02-10T10:39:24.000Z | 2021-07-06T11:46:05.000Z | defmodule Cforum.Badges.BadgeUser do
use CforumWeb, :model
@primary_key {:badge_user_id, :id, autogenerate: true}
@derive {Phoenix.Param, key: :badge_user_id}
schema "badges_users" do
field(:active, :boolean, default: true)
belongs_to(:badge, Cforum.Badges.Badge, references: :badge_id)
belongs_to... | 26.56 | 66 | 0.685241 |
9141efb0ae368c75f718fcf93e0bc15d11d0f637 | 699 | exs | Elixir | test/dailymeal/users/delete_test.exs | LuizFerK/DailyMealRelations | 57f9cc60bf263267fb8c5a3da8e25e86a0e0aca4 | [
"MIT"
] | null | null | null | test/dailymeal/users/delete_test.exs | LuizFerK/DailyMealRelations | 57f9cc60bf263267fb8c5a3da8e25e86a0e0aca4 | [
"MIT"
] | null | null | null | test/dailymeal/users/delete_test.exs | LuizFerK/DailyMealRelations | 57f9cc60bf263267fb8c5a3da8e25e86a0e0aca4 | [
"MIT"
] | null | null | null | defmodule Dailymeal.Users.DeleteTest do
use Dailymeal.DataCase, async: true
import Dailymeal.Factory
alias Dailymeal.{Error, User}
alias Dailymeal.Users.Delete
describe "call/1" do
setup do
id = "2baadea4-1d22-4d8c-9455-2ea5d692f931"
insert(:user, id: id)
{:ok, id: id}
end
t... | 23.3 | 86 | 0.652361 |
914207a40aead39cf40718073e9f96e530588de5 | 384 | exs | Elixir | machine_translation/MorpHIN/Learned/Resources/TrainingInstances/74.exs | AdityaPrasadMishra/NLP--Project-Group-16 | fb62cc6a1db4a494058171f11c14a2be3933a9a1 | [
"MIT"
] | null | null | null | machine_translation/MorpHIN/Learned/Resources/TrainingInstances/74.exs | AdityaPrasadMishra/NLP--Project-Group-16 | fb62cc6a1db4a494058171f11c14a2be3933a9a1 | [
"MIT"
] | null | null | null | machine_translation/MorpHIN/Learned/Resources/TrainingInstances/74.exs | AdityaPrasadMishra/NLP--Project-Group-16 | fb62cc6a1db4a494058171f11c14a2be3933a9a1 | [
"MIT"
] | null | null | null | **EXAMPLE FILE**
SYM * particle * * pnoun * cm;
noun * noun adjective * cm * cm;
pnoun * noun conj * cm * cm;
verb a34 adjective adjective * noun * cm;
pnoun * adjective conj * noun * cm;
verb * pn pn * particle * pn;
adverb * pn SYM * noun * pn;
pn * noun adverb * pnoun * pn;
pn * noun conj * particle * cm;
... | 27.428571 | 42 | 0.614583 |
91421aa3569f6953e1105d5ded91b09521a1ddab | 2,212 | ex | Elixir | clients/document_ai/lib/google_api/document_ai/v1beta2/model/google_cloud_documentai_v1beta2_table_bound_hint.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/document_ai/lib/google_api/document_ai/v1beta2/model/google_cloud_documentai_v1beta2_table_bound_hint.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/document_ai/lib/google_api/document_ai/v1beta2/model/google_cloud_documentai_v1beta2_table_bound_hint.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.491525 | 273 | 0.75226 |
91421e1825a5e637f951b95d771b45a91f58ac40 | 1,298 | ex | Elixir | apps/engine/lib/engine/ethereum/supervisor.ex | omgnetwork/omg-childchain-v2 | 31cc9cf9e42718fc3b9bd6668f24a627cac80b4f | [
"Apache-2.0"
] | 4 | 2020-11-30T17:38:57.000Z | 2021-01-23T21:29:41.000Z | apps/engine/lib/engine/ethereum/supervisor.ex | omgnetwork/omg-childchain-v2 | 31cc9cf9e42718fc3b9bd6668f24a627cac80b4f | [
"Apache-2.0"
] | 24 | 2020-11-30T17:32:48.000Z | 2021-02-22T06:25:22.000Z | apps/engine/lib/engine/ethereum/supervisor.ex | omgnetwork/omg-childchain-v2 | 31cc9cf9e42718fc3b9bd6668f24a627cac80b4f | [
"Apache-2.0"
] | null | null | null | defmodule Engine.Ethereum.Supervisor do
@moduledoc """
Engine Ethereum top level supervisor is supervising connection monitor towards Eth clients and
a gen server that serves as a unified view of reported block height (`Engine.Ethereum.Height`).
"""
use Supervisor
alias Engine.Configuration
alias Engin... | 29.5 | 98 | 0.719569 |
914284c936d854ff4ce77b3117706b966065dd1d | 1,282 | exs | Elixir | test/auto_api/capabilities/cruise_control_capability_test.exs | nonninz/auto-api-elixir | 53e11542043285e94bbb5a0a3b8ffff0b1b47167 | [
"MIT"
] | 4 | 2018-01-19T16:11:10.000Z | 2019-12-13T16:35:10.000Z | test/auto_api/capabilities/cruise_control_capability_test.exs | nonninz/auto-api-elixir | 53e11542043285e94bbb5a0a3b8ffff0b1b47167 | [
"MIT"
] | 5 | 2018-11-29T09:48:29.000Z | 2019-11-06T12:11:35.000Z | test/auto_api/capabilities/cruise_control_capability_test.exs | nonninz/auto-api-elixir | 53e11542043285e94bbb5a0a3b8ffff0b1b47167 | [
"MIT"
] | 1 | 2021-02-17T18:36:13.000Z | 2021-02-17T18:36:13.000Z | # AutoAPI
# The MIT License
#
# Copyright (c) 2018- High-Mobility GmbH (https://high-mobility.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without lim... | 47.481481 | 79 | 0.782371 |
9142b7c2b6423a8d9a50ff807e164cce6a7bfdc3 | 206 | exs | Elixir | priv/repo/migrations/20170317205716_add_max_likes_constraints_to_posts.exs | plicjo/tilex | f3d9cba7f2ca99c75622cd1a9992508614dd455f | [
"MIT"
] | 460 | 2016-12-28T21:50:05.000Z | 2022-03-16T14:34:08.000Z | priv/repo/migrations/20170317205716_add_max_likes_constraints_to_posts.exs | plicjo/tilex | f3d9cba7f2ca99c75622cd1a9992508614dd455f | [
"MIT"
] | 412 | 2016-12-27T17:32:01.000Z | 2021-09-17T23:51:47.000Z | priv/repo/migrations/20170317205716_add_max_likes_constraints_to_posts.exs | plicjo/tilex | f3d9cba7f2ca99c75622cd1a9992508614dd455f | [
"MIT"
] | 140 | 2017-01-06T06:55:58.000Z | 2022-02-04T13:35:21.000Z | defmodule Tilex.Repo.Migrations.AddMaxLikesConstraintsToPosts do
use Ecto.Migration
def change do
create constraint(:posts, "max_likes_must_be_greater_than_zero", check: "max_likes > 0")
end
end
| 25.75 | 92 | 0.791262 |
9142bdb4d8fbd49c874a37873659abf40793927b | 495 | exs | Elixir | apps/robby_web/test/models/user_test.exs | jeffweiss/openrobby | 9fed2024e6ce87a6fe27ef3af85558f3116aca2a | [
"Apache-2.0"
] | null | null | null | apps/robby_web/test/models/user_test.exs | jeffweiss/openrobby | 9fed2024e6ce87a6fe27ef3af85558f3116aca2a | [
"Apache-2.0"
] | null | null | null | apps/robby_web/test/models/user_test.exs | jeffweiss/openrobby | 9fed2024e6ce87a6fe27ef3af85558f3116aca2a | [
"Apache-2.0"
] | null | null | null | defmodule RobbyWeb.UserTest do
use RobbyWeb.ModelCase
alias RobbyWeb.User
@valid_attrs %{dn: "some content", salt: "some content", username: "some content", email: "superawesome@example.com"}
@invalid_attrs %{}
test "changeset with valid attributes" do
changeset = User.changeset(%User{}, @valid_attrs)
... | 26.052632 | 119 | 0.721212 |
9142e7252896c700430ae4c8b1126898d24af233 | 1,287 | ex | Elixir | lib/mix/tasks/coveralls.lint.ex | miros/excoveralls_linter | 661e9d4019d9f8842340c172d78341e8822d4d6c | [
"Apache-2.0"
] | 4 | 2019-11-25T15:32:45.000Z | 2020-01-29T23:27:45.000Z | lib/mix/tasks/coveralls.lint.ex | miros/excoveralls_linter | 661e9d4019d9f8842340c172d78341e8822d4d6c | [
"Apache-2.0"
] | null | null | null | lib/mix/tasks/coveralls.lint.ex | miros/excoveralls_linter | 661e9d4019d9f8842340c172d78341e8822d4d6c | [
"Apache-2.0"
] | null | null | null | defmodule Mix.Tasks.Coveralls.Lint do
use Mix.Task
@shortdoc "Runs excoveralls and checks coverage"
@preferred_cli_env :test
alias Mix.Tasks.Coveralls.Lint.CLI.ArgsParser
@impl Mix.Task
def run(args, options \\ []) do
linter_fn = Keyword.get(options, :linter_fn, &ExCoverallsLinter.run/1)
exit_fn ... | 24.75 | 98 | 0.666667 |
9142ed0782e61ff334d0040689dbfda9a2270e4f | 5,645 | ex | Elixir | lib/foundation.ex | clangley/foundation | ed75c1adf1f4c9a237056a82f4c7720d87c2458c | [
"MIT"
] | null | null | null | lib/foundation.ex | clangley/foundation | ed75c1adf1f4c9a237056a82f4c7720d87c2458c | [
"MIT"
] | null | null | null | lib/foundation.ex | clangley/foundation | ed75c1adf1f4c9a237056a82f4c7720d87c2458c | [
"MIT"
] | null | null | null | defmodule Foundation do
@moduledoc """
Documentation for Foundation.
Opinionated and high level wrapper around :erlfdb, this library is build to provide shortcuts around the erlang api and simplify the interface.
"""
alias Foundation.Utils
require Logger
@type path :: list(term()) | binary()
@type val... | 28.510101 | 145 | 0.638441 |
91431252882d87761ad66dcb82a00c5059becf55 | 2,428 | ex | Elixir | lib/dp/bellman_equation.ex | taskd19/rl-study | a0b80f720471341adada0bc1452b58d6c608b097 | [
"Apache-2.0"
] | null | null | null | lib/dp/bellman_equation.ex | taskd19/rl-study | a0b80f720471341adada0bc1452b58d6c608b097 | [
"Apache-2.0"
] | null | null | null | lib/dp/bellman_equation.ex | taskd19/rl-study | a0b80f720471341adada0bc1452b58d6c608b097 | [
"Apache-2.0"
] | null | null | null | defmodule RlStudy.DP.BellmanEquation do
@moduledoc """
Value base
"""
require Logger
@spec v(String.t(), float()) :: float()
def v(s, gamma \\ 0.99) do
Logger.info("v: #{inspect(s)}")
v = r(s) + gamma * max_v_on_next_state(s)
Logger.info("v: #{inspect(s)} -> #{inspect(v)}")
v
end
@spe... | 26.391304 | 87 | 0.533773 |
914337ebadbd278a9dac56b6fd683734bc3b0a44 | 7,841 | ex | Elixir | clients/content/lib/google_api/content/v21/model/metrics.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/content/lib/google_api/content/v21/model/metrics.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/content/lib/google_api/content/v21/model/metrics.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... | 75.394231 | 517 | 0.713557 |
914381d7a6417eedda59ebcd23e701c1d0e44949 | 1,917 | ex | Elixir | year_2021/lib/day_08.ex | bschmeck/advent_of_code | cbec98019c6c00444e0f4c7e15e01b1ed9ae6145 | [
"MIT"
] | null | null | null | year_2021/lib/day_08.ex | bschmeck/advent_of_code | cbec98019c6c00444e0f4c7e15e01b1ed9ae6145 | [
"MIT"
] | null | null | null | year_2021/lib/day_08.ex | bschmeck/advent_of_code | cbec98019c6c00444e0f4c7e15e01b1ed9ae6145 | [
"MIT"
] | null | null | null | defmodule Day08 do
@digits %{
"abcefg" => 0,
"cf" => 1,
"acdeg" => 2,
"acdfg" => 3,
"bcdf" => 4,
"abdfg" => 5,
"abdefg" => 6,
"acf" => 7,
"abcdefg" => 8,
"abcdfg" => 9
}
@translator %{
[2, 3, 4, 5, 5, 6, 6, 6, 7] => "f",
[2, 3, 4, 5, 5, 6, 6, 7] => "c",
[3, 5, ... | 21.784091 | 96 | 0.476265 |
91438fa5badbcac88d5ded416dbbdcb877bbf1a6 | 1,353 | exs | Elixir | learning/adopting_elixir/chapter_8/sample/mix.exs | Mdlkxzmcp/various_elixir | c87527b7118a0c74a042073c04d2228025888ddf | [
"MIT"
] | 2 | 2020-01-20T20:15:20.000Z | 2020-02-27T11:08:42.000Z | learning/adopting_elixir/chapter_8/sample/mix.exs | Mdlkxzmcp/various_elixir | c87527b7118a0c74a042073c04d2228025888ddf | [
"MIT"
] | null | null | null | learning/adopting_elixir/chapter_8/sample/mix.exs | Mdlkxzmcp/various_elixir | c87527b7118a0c74a042073c04d2228025888ddf | [
"MIT"
] | null | null | null | defmodule Sample.MixProject do
use Mix.Project
@version "0.1.0"
def project do
[
app: :sample,
version: @version,
elixir: "~> 1.6",
start_permanent: Mix.env() == :prod,
deps: deps(),
aliases: aliases(),
dialyzer: [plt_add_deps: :transitive],
preferred_cli_env:... | 20.5 | 85 | 0.554324 |
914395ae52c31bc72e5b75859efc76d1b33de342 | 2,146 | ex | Elixir | lib/cafex/protocol/metadata.ex | MishaConway/cafex | 32965b7e099bc45de24c229cc76f7b83b35ff7b4 | [
"Apache-2.0"
] | null | null | null | lib/cafex/protocol/metadata.ex | MishaConway/cafex | 32965b7e099bc45de24c229cc76f7b83b35ff7b4 | [
"Apache-2.0"
] | null | null | null | lib/cafex/protocol/metadata.ex | MishaConway/cafex | 32965b7e099bc45de24c229cc76f7b83b35ff7b4 | [
"Apache-2.0"
] | null | null | null | defmodule Cafex.Protocol.Metadata do
use Cafex.Protocol, api: :metadata
defrequest do
field :topics, [default: []], [binary]
end
defresponse do
field :brokers, [broker]
field :topics, [topic]
@type broker :: %{node_id: integer,
host: binary,
port: 0... | 34.063492 | 83 | 0.578751 |
9143a8529ebfe0ce13e393d14199456af2c721ed | 67,512 | ex | Elixir | lib/elixir/lib/string.ex | KronicDeth/elixir | 1c9be51dc3264c36af475c55140be4ad5c2bde19 | [
"Apache-2.0"
] | 1 | 2018-08-08T12:15:48.000Z | 2018-08-08T12:15:48.000Z | lib/elixir/lib/string.ex | Achibiway/elixir | b37220ccfa44c0bfe1e070886a0817e76de35973 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/string.ex | Achibiway/elixir | b37220ccfa44c0bfe1e070886a0817e76de35973 | [
"Apache-2.0"
] | null | null | null | import Kernel, except: [length: 1]
defmodule String do
@moduledoc ~S"""
A String in Elixir is a UTF-8 encoded binary.
## Codepoints and grapheme cluster
The functions in this module act according to the Unicode
Standard, version 11.0.0.
As per the standard, a codepoint is a single Unicode Character,
w... | 27.589702 | 100 | 0.644034 |
9144015017b98fa3e71e9ac7a27bc4937ce8e866 | 71 | exs | Elixir | apps/ejoi_stats_web/test/test_helper.exs | vahansoft/ejoi-stats | f2faf5fce3324e1dd9980917f78b9bfa3d006380 | [
"MIT"
] | null | null | null | apps/ejoi_stats_web/test/test_helper.exs | vahansoft/ejoi-stats | f2faf5fce3324e1dd9980917f78b9bfa3d006380 | [
"MIT"
] | 2 | 2021-03-10T05:08:08.000Z | 2021-05-11T01:05:07.000Z | apps/ejoi_stats_web/test/test_helper.exs | vahansoft/ejoi-stats | f2faf5fce3324e1dd9980917f78b9bfa3d006380 | [
"MIT"
] | null | null | null | ExUnit.start()
Ecto.Adapters.SQL.Sandbox.mode(EjoiStats.Repo, :manual)
| 23.666667 | 55 | 0.788732 |
91444a1472654a7b986261fb72880b14b0cf7f3c | 701 | ex | Elixir | lib/html_error.ex | praliedutzel/formulator | 9eb5708c2e9ebafcf6df795084d849a84c3b535c | [
"MIT"
] | 1 | 2019-05-20T04:59:50.000Z | 2019-05-20T04:59:50.000Z | lib/html_error.ex | ByteDecoder/formulator | 289d74889c60dc3aab0f065cdce1c71cd246ded1 | [
"MIT"
] | null | null | null | lib/html_error.ex | ByteDecoder/formulator | 289d74889c60dc3aab0f065cdce1c71cd246ded1 | [
"MIT"
] | null | null | null | defmodule Formulator.HtmlError do
defstruct [
class: "",
html: ""
]
@doc """
Returns a struct with the appropriate error class and html for a form error.
If there are errors on the given field,
it will have a class to use in the form field in the `:class` field
and an appropriate html tag to di... | 24.172414 | 78 | 0.634807 |
91444aefe9a5807d8ac6ce8455fe9980e1eaa6b1 | 71 | exs | Elixir | test/bio/player_test.exs | xire28/bio | c3266b551f8ac855653d6de7f13fd566f2daa549 | [
"MIT"
] | null | null | null | test/bio/player_test.exs | xire28/bio | c3266b551f8ac855653d6de7f13fd566f2daa549 | [
"MIT"
] | null | null | null | test/bio/player_test.exs | xire28/bio | c3266b551f8ac855653d6de7f13fd566f2daa549 | [
"MIT"
] | null | null | null | defmodule Bio.PlayerTest do
use ExUnit.Case
doctest Bio.Player
end
| 14.2 | 27 | 0.788732 |
91445f6be4012567eb59934dbc1562df37f38f98 | 2,790 | ex | Elixir | clients/datastore/lib/google_api/datastore/v1/model/mutation.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/datastore/lib/google_api/datastore/v1/model/mutation.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/datastore/lib/google_api/datastore/v1/model/mutation.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 47.288136 | 221 | 0.716846 |
9144657e1f67dfc9b77daf37f6d75adab4d3a16a | 675 | ex | Elixir | lib/blockchain_info.ex | cyberpunk-ventures/blockchain_info_ex | 9841cdf1a8c74e9cbc552965be67b9a5cf2ae353 | [
"MIT"
] | 2 | 2016-03-12T09:19:02.000Z | 2016-09-06T05:12:55.000Z | lib/blockchain_info.ex | cyberpunk-ventures/blockchain_info_ex | 9841cdf1a8c74e9cbc552965be67b9a5cf2ae353 | [
"MIT"
] | null | null | null | lib/blockchain_info.ex | cyberpunk-ventures/blockchain_info_ex | 9841cdf1a8c74e9cbc552965be67b9a5cf2ae353 | [
"MIT"
] | null | null | null | defmodule BlockchainInfo do
use HTTPoison.Base
@moduledoc """
Blockchain.info endpoints wrapped with HTTPoison
"""
def bitcoins_in_circulation do
{:ok, res} = BlockchainInfo.get("/q/totalbc")
res.body
|> String.to_integer
|> div(100000000)
end
def blocks do
{:ok, res} = BlockchainI... | 16.463415 | 59 | 0.625185 |
914469e88891a590763a66d947e300f2cdfd225e | 1,585 | ex | Elixir | lib/koans/19_protocols.ex | flowerett/elixir-koans | 174f4610e846f59cc34b41a36b813f5d684fd510 | [
"MIT"
] | null | null | null | lib/koans/19_protocols.ex | flowerett/elixir-koans | 174f4610e846f59cc34b41a36b813f5d684fd510 | [
"MIT"
] | null | null | null | lib/koans/19_protocols.ex | flowerett/elixir-koans | 174f4610e846f59cc34b41a36b813f5d684fd510 | [
"MIT"
] | null | null | null | defmodule Protocols do
use Koans
@intro "Want to follow the rules? Adhere to the protocol!"
defprotocol School, do: def enroll(person)
defimpl School, for: Any do
def enroll(_) do
"Pupil enrolled at school"
end
end
defmodule Student do
@derive School
defstruct name: ""
end
def... | 26.416667 | 79 | 0.671924 |
914491d148ac72796e9f1a68f8511033d1e0f77d | 630 | ex | Elixir | lib/taglet/tagging.ex | mirko314/taglet | e9f50af7fd6bc144e6980d06b536e618a7ee3f53 | [
"Apache-2.0"
] | 15 | 2017-06-21T20:17:23.000Z | 2020-08-27T05:33:37.000Z | lib/taglet/tagging.ex | mirko314/taglet | e9f50af7fd6bc144e6980d06b536e618a7ee3f53 | [
"Apache-2.0"
] | 3 | 2017-07-20T10:13:38.000Z | 2018-01-08T23:51:17.000Z | lib/taglet/tagging.ex | mirko314/taglet | e9f50af7fd6bc144e6980d06b536e618a7ee3f53 | [
"Apache-2.0"
] | 14 | 2017-08-07T14:54:31.000Z | 2021-04-05T00:09:01.000Z | defmodule Taglet.Tagging do
use Ecto.Schema
import Ecto.Changeset
@taggable_id_type if Application.get_env(:taglet, :taggable_id) == :uuid, do: :binary_id, else: :integer
schema "taggings" do
field :taggable_id, @taggable_id_type, null: false
field :taggable_type, :string, null: false
field :conte... | 27.391304 | 106 | 0.7 |
9144c41f14cc99a6826487f046afb857395faf9c | 434 | exs | Elixir | mix.exs | aquarhead/eve_swagger_interface | 0597ee9601707ca1c53c663e625b0c0d5ef01abf | [
"MIT"
] | null | null | null | mix.exs | aquarhead/eve_swagger_interface | 0597ee9601707ca1c53c663e625b0c0d5ef01abf | [
"MIT"
] | null | null | null | mix.exs | aquarhead/eve_swagger_interface | 0597ee9601707ca1c53c663e625b0c0d5ef01abf | [
"MIT"
] | null | null | null | defmodule EVESwaggerInterface.Mixfile do
use Mix.Project
def project do
[
app: :eve_swagger_interface,
version: "0.1.0",
elixir: "~> 1.5",
start_permanent: Mix.env == :prod,
deps: deps()
]
end
def application do
[]
end
defp deps do
[
{:tesla, "~> 0.9"},... | 16.074074 | 40 | 0.504608 |
9144cb1f7118126d85540ea8edd8f996f0d3b33b | 4,722 | exs | Elixir | implementations/elixir/ockam/ockam_vault_software/mix.exs | plaxi0s/ockam | 2cc911dff720228bca950d83faf095ea84717981 | [
"Apache-2.0"
] | null | null | null | implementations/elixir/ockam/ockam_vault_software/mix.exs | plaxi0s/ockam | 2cc911dff720228bca950d83faf095ea84717981 | [
"Apache-2.0"
] | null | null | null | implementations/elixir/ockam/ockam_vault_software/mix.exs | plaxi0s/ockam | 2cc911dff720228bca950d83faf095ea84717981 | [
"Apache-2.0"
] | null | null | null | defmodule Ockam.Vault.Software.MixProject do
use Mix.Project
@version "0.10.1"
@elixir_requirement "~> 1.10"
@ockam_github_repo "https://github.com/ockam-network/ockam"
@ockam_github_repo_path "implementations/elixir/ockam/ockam_vault_software"
def project do
[
app: :ockam_vault_software,
... | 23.848485 | 93 | 0.573698 |
9144e5c6ffef7ce6471fb513fa4cb55fac728d82 | 2,291 | exs | Elixir | test/petal/link_test.exs | thomasbrus/petal_components | e862861d10ff53e4e6e515183e2c635f2fbbc938 | [
"MIT"
] | null | null | null | test/petal/link_test.exs | thomasbrus/petal_components | e862861d10ff53e4e6e515183e2c635f2fbbc938 | [
"MIT"
] | null | null | null | test/petal/link_test.exs | thomasbrus/petal_components | e862861d10ff53e4e6e515183e2c635f2fbbc938 | [
"MIT"
] | null | null | null | defmodule PetalComponents.LinkTest do
use ComponentCase
import PetalComponents.Link
test "a link with label" do
assigns = %{}
html =
rendered_to_string(~H"""
<.link link_type="a" to="/" label="Press me" phx-click="click_event" />
""")
assert html =~ "Press me"
assert html =~ "... | 22.028846 | 89 | 0.547359 |
91452d91f14f816aaab2a4deeb60690b99834516 | 1,284 | exs | Elixir | mix.exs | infinitered/elavon-elixir | cabe1dcbc4b8ca06145975825a45bfaa59f63eff | [
"MIT"
] | 3 | 2017-11-29T23:02:37.000Z | 2017-11-29T23:11:31.000Z | mix.exs | infinitered/elavon-elixir | cabe1dcbc4b8ca06145975825a45bfaa59f63eff | [
"MIT"
] | 1 | 2017-11-30T21:02:14.000Z | 2017-11-30T21:11:05.000Z | mix.exs | infinitered/elavon-elixir | cabe1dcbc4b8ca06145975825a45bfaa59f63eff | [
"MIT"
] | null | null | null | defmodule Elavon.Mixfile do
use Mix.Project
def project do
[
app: :elavon,
description: "Native elixir client for USBank Elavon Converge API",
version: "0.1.2",
elixir: "~> 1.5",
start_permanent: Mix.env == :prod,
deps: deps(),
test_coverage: [tool: ExCoveralls],
... | 23.345455 | 123 | 0.566978 |
91453c2f211cce667472d4836c2f32a7dba04b11 | 582 | ex | Elixir | apps/mishka_translator/lib/mishka_translator/application.ex | mojtaba-naserei/mishka-cms | 1f31f61347bab1aae6ba0d47c5515a61815db6c9 | [
"Apache-2.0"
] | 35 | 2021-06-26T09:05:50.000Z | 2022-03-30T15:41:22.000Z | apps/mishka_translator/lib/mishka_translator/application.ex | iArazar/mishka-cms | 8b579101d607d91e80834527c1508fe5f4ceefef | [
"Apache-2.0"
] | 101 | 2021-01-01T09:54:07.000Z | 2022-03-28T10:02:24.000Z | apps/mishka_translator/lib/mishka_translator/application.ex | iArazar/mishka-cms | 8b579101d607d91e80834527c1508fe5f4ceefef | [
"Apache-2.0"
] | 8 | 2021-01-17T17:08:07.000Z | 2022-03-11T16:12:06.000Z | defmodule MishkaTranslator.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
@impl true
def start(_type, _args) do
children = [
# Starts a worker by calling: MishkaTranslator.Worker.start_link(arg)
# ... | 27.714286 | 75 | 0.725086 |
91454d132e6850b1140c72f815788430f539a96c | 384 | ex | Elixir | lib/ex_app.ex | kuffel/ex_app | c67c1c9f9b48d6020859ea2b1f9d070dca69c84f | [
"MIT"
] | null | null | null | lib/ex_app.ex | kuffel/ex_app | c67c1c9f9b48d6020859ea2b1f9d070dca69c84f | [
"MIT"
] | 12 | 2020-11-02T21:22:41.000Z | 2021-05-18T13:08:30.000Z | lib/ex_app.ex | kuffel/ex_app | c67c1c9f9b48d6020859ea2b1f9d070dca69c84f | [
"MIT"
] | null | null | null | defmodule ExApp do
@moduledoc """
ExApp 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.
"""
def version() do
:ex_app
|> Application.spec()
|> Keyword.get(... | 21.333333 | 66 | 0.674479 |
914558beb6bf8a6befe5fc521be1087445a1b181 | 2,803 | ex | Elixir | lib/nashville_zone_lookup/zoning/land_use.ex | enlore/setback-jack | 7ee603eb991b80923258210e28f97ff1110ddeae | [
"MIT"
] | 14 | 2017-07-16T02:59:33.000Z | 2018-04-28T19:06:11.000Z | lib/nashville_zone_lookup/zoning/land_use.ex | code-for-nashville/setback-615 | 7ee603eb991b80923258210e28f97ff1110ddeae | [
"MIT"
] | 47 | 2017-07-16T20:18:37.000Z | 2018-04-17T02:54:26.000Z | lib/nashville_zone_lookup/zoning/land_use.ex | code-for-nashville/nashville-zone-lookup | 7ee603eb991b80923258210e28f97ff1110ddeae | [
"MIT"
] | 3 | 2018-05-01T23:52:30.000Z | 2018-08-14T09:50:31.000Z | defmodule NashvilleZoneLookup.Zoning.LandUse do
@moduledoc ~S"""
An arrangement, activity, or input that might be undertaken on a property
For example, a Land Use might be a class of business ("Bed and breakfast
inn"), an agricultural activity ("Domestic hens"), or an institution
("Correctional facility").
... | 32.593023 | 107 | 0.767392 |
91455bbd84d5de136867a7c079e32a9f40442fbf | 701 | exs | Elixir | test/query/control_structures_adv_test.exs | scottdavis/rethinkdb-elixir | 28727810d6af07f07056082ce471be90cb10f4a0 | [
"MIT"
] | 6 | 2018-09-21T09:15:06.000Z | 2020-12-05T21:50:35.000Z | test/query/control_structures_adv_test.exs | scottdavis/rethinkdb-elixir | 28727810d6af07f07056082ce471be90cb10f4a0 | [
"MIT"
] | 44 | 2018-09-25T13:16:41.000Z | 2021-08-02T13:14:38.000Z | test/query/control_structures_adv_test.exs | scottdavis/rethinkdb-elixir | 28727810d6af07f07056082ce471be90cb10f4a0 | [
"MIT"
] | 3 | 2019-03-13T03:11:47.000Z | 2020-12-15T00:50:54.000Z | defmodule ControlStructuresAdvTest do
use ExUnit.Case, async: false
use RethinkDB.Connection
import RethinkDB.Query
alias RethinkDB.Collection
@table_name "control_test_table_1"
setup_all do
start_link()
q = table_create(@table_name)
run(q)
on_exit(fn ->
start_link()
table_dro... | 17.097561 | 53 | 0.611983 |
9145a2e983f05279bc175aa78e3b28c38a238015 | 688 | ex | Elixir | apps/nerves_hub_api/lib/nerves_hub_api_web/views/deployment_view.ex | tonnenpinguin/nerves_hub_web | 9d36921eb7e20d20a3e3bd308cc98ad7b60cfa72 | [
"Apache-2.0"
] | 111 | 2018-07-25T01:07:51.000Z | 2022-01-25T17:03:01.000Z | apps/nerves_hub_api/lib/nerves_hub_api_web/views/deployment_view.ex | tonnenpinguin/nerves_hub_web | 9d36921eb7e20d20a3e3bd308cc98ad7b60cfa72 | [
"Apache-2.0"
] | 361 | 2018-07-22T12:53:00.000Z | 2022-03-31T18:50:34.000Z | apps/nerves_hub_api/lib/nerves_hub_api_web/views/deployment_view.ex | tonnenpinguin/nerves_hub_web | 9d36921eb7e20d20a3e3bd308cc98ad7b60cfa72 | [
"Apache-2.0"
] | 54 | 2018-08-26T02:58:04.000Z | 2022-03-09T10:12:19.000Z | defmodule NervesHubAPIWeb.DeploymentView do
use NervesHubAPIWeb, :view
alias NervesHubAPIWeb.DeploymentView
def render("index.json", %{deployments: deployments}) do
%{data: render_many(deployments, DeploymentView, "deployment.json")}
end
def render("show.json", %{deployment: deployment}) do
%{data: ... | 29.913043 | 72 | 0.709302 |
9145a58e21e73a144b02236f402f8571a1900e4e | 541 | ex | Elixir | lib/ucx_ucc_web/utils.ex | josephkabraham/ucx_ucc | 0dbd9e3eb5940336b4870cff033482ceba5f6ee7 | [
"MIT"
] | null | null | null | lib/ucx_ucc_web/utils.ex | josephkabraham/ucx_ucc | 0dbd9e3eb5940336b4870cff033482ceba5f6ee7 | [
"MIT"
] | null | null | null | lib/ucx_ucc_web/utils.ex | josephkabraham/ucx_ucc | 0dbd9e3eb5940336b4870cff033482ceba5f6ee7 | [
"MIT"
] | null | null | null | defmodule UcxUccWeb.Utils do
def format_error_list(%Ecto.Changeset{valid?: false, errors: errors}) do
for {field, error} <- errors do
"#{field} - #{elem(error, 0)}"
end
end
def format_error_list(_), do: [""]
def format_errors(changeset, join_by \\ "<br>") do
changeset
|> format_error_li... | 23.521739 | 74 | 0.658041 |
9145ae270d63ed141f17e97513348f9130065334 | 17,609 | exs | Elixir | lib/mix/test/mix/dep_test.exs | gsphanikumar/elixir | 6ca225da4e016200a462888348ff1c3feb625b78 | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/dep_test.exs | gsphanikumar/elixir | 6ca225da4e016200a462888348ff1c3feb625b78 | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/dep_test.exs | gsphanikumar/elixir | 6ca225da4e016200a462888348ff1c3feb625b78 | [
"Apache-2.0"
] | null | null | null | Code.require_file "../test_helper.exs", __DIR__
defmodule Mix.DepTest do
use MixTest.Case
defmodule DepsApp do
def project do
[ deps: [
{:ok, "0.1.0", path: "deps/ok"},
{:invalidvsn, "0.2.0", path: "deps/invalidvsn"},
{:invalidapp, "0.1.0", path: "deps/invalidapp"},... | 32.914019 | 100 | 0.583792 |
9145b645e571a8ef6887f67572edc3c659546450 | 2,861 | exs | Elixir | test/animina/trains_test.exs | wintermeyer/animina | 44fb98b4cd2efd4ab425fc37e1ae68a6fa1c1f5a | [
"MIT"
] | 1 | 2021-04-17T20:36:24.000Z | 2021-04-17T20:36:24.000Z | test/animina/trains_test.exs | wintermeyer/animina | 44fb98b4cd2efd4ab425fc37e1ae68a6fa1c1f5a | [
"MIT"
] | 3 | 2021-04-15T19:45:43.000Z | 2021-04-16T06:08:24.000Z | test/animina/trains_test.exs | wintermeyer/animina | 44fb98b4cd2efd4ab425fc37e1ae68a6fa1c1f5a | [
"MIT"
] | null | null | null | defmodule Animina.TrainsTest do
use Animina.DataCase
alias Animina.Trains
describe "track_plans" do
alias Animina.Trains.TrackPlan
@valid_attrs %{description: "some description", name: "some name", slug: "some slug"}
@update_attrs %{
description: "some updated description",
name: "some ... | 36.679487 | 95 | 0.69626 |
9145fc625fde0bba64134427c78fc59a848fe6c4 | 956 | ex | Elixir | lib/annon_api/plugins/cors/settings_validator.ex | gabheadz/annon.api | 9921d98e44c8472c133554dd55ea649c0f55726c | [
"MIT"
] | 328 | 2017-05-05T15:19:46.000Z | 2022-03-11T10:52:45.000Z | lib/annon_api/plugins/cors/settings_validator.ex | gabheadz/annon.api | 9921d98e44c8472c133554dd55ea649c0f55726c | [
"MIT"
] | 83 | 2017-04-30T10:36:15.000Z | 2019-10-14T13:14:34.000Z | lib/annon_api/plugins/cors/settings_validator.ex | gabheadz/annon.api | 9921d98e44c8472c133554dd55ea649c0f55726c | [
"MIT"
] | 29 | 2017-05-02T14:36:50.000Z | 2021-09-03T13:36:17.000Z | defmodule Annon.Plugins.CORS.SettingsValidator do
@moduledoc """
Validation helpers for CORS plugin.
Original settings can be found in
[CORSPlug source](https://github.com/mschae/cors_plug/blob/master/lib/cors_plug.ex).
"""
import Annon.Plugin.JsonSchemaValidator
def validate_settings(changeset) do
... | 23.317073 | 86 | 0.519874 |
9146040b13f3bc3f8374dbcb52df7151bdf308d2 | 1,706 | ex | Elixir | clients/content/lib/google_api/content/v2/model/orders_in_store_refund_line_item_response.ex | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/orders_in_store_refund_line_item_response.ex | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/orders_in_store_refund_line_item_response.ex | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 34.12 | 206 | 0.744431 |
914610334b304d1c4d4b20d1b7dddc0842d3de3d | 27,338 | ex | Elixir | lib/phoenix/router.ex | shritesh/phoenix | 4bf53ecaae5a9057ea57c248964490dfdee312af | [
"MIT"
] | null | null | null | lib/phoenix/router.ex | shritesh/phoenix | 4bf53ecaae5a9057ea57c248964490dfdee312af | [
"MIT"
] | null | null | null | lib/phoenix/router.ex | shritesh/phoenix | 4bf53ecaae5a9057ea57c248964490dfdee312af | [
"MIT"
] | null | null | null | defmodule Phoenix.Router do
defmodule NoRouteError do
@moduledoc """
Exception raised when no route is found.
"""
defexception plug_status: 404, message: "no route found", conn: nil, router: nil
def exception(opts) do
conn = Keyword.fetch!(opts, :conn)
router = Keyword.fetch!(opts, ... | 30.647982 | 100 | 0.633148 |
9146967ee095e4ea4cb7bfcb57b9f40c0440dbf2 | 1,613 | ex | Elixir | clients/content/lib/google_api/content/v21/model/liasettings_set_inventory_verification_contact_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/content/lib/google_api/content/v21/model/liasettings_set_inventory_verification_contact_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/content/lib/google_api/content/v21/model/liasettings_set_inventory_verification_contact_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... | 31.019231 | 183 | 0.751395 |
9146a55cc358c11806b5ff472ad8f58495930a90 | 789 | exs | Elixir | test/lib/util/env_test.exs | sylph01/antikythera | 47a93f3d4c70975f7296725c9bde2ea823867436 | [
"Apache-2.0"
] | 144 | 2018-04-27T07:24:49.000Z | 2022-03-15T05:19:37.000Z | test/lib/util/env_test.exs | sylph01/antikythera | 47a93f3d4c70975f7296725c9bde2ea823867436 | [
"Apache-2.0"
] | 123 | 2018-05-01T02:54:43.000Z | 2022-01-28T01:30:52.000Z | test/lib/util/env_test.exs | sylph01/antikythera | 47a93f3d4c70975f7296725c9bde2ea823867436 | [
"Apache-2.0"
] | 14 | 2018-05-01T02:30:47.000Z | 2022-02-21T04:38:56.000Z | # Copyright(c) 2015-2021 ACCESS CO., LTD. All rights reserved.
defmodule Antikythera.EnvTest do
use Croma.TestCase
alias Antikythera.Test.ConnHelper
describe "base_url/1" do
test "should return the url based on Host HTTP header" do
conn1 = ConnHelper.make_conn(%{headers: %{"host" => "example.com"}})
... | 31.56 | 86 | 0.667934 |
91471544513969b3af3f85ec169b6e96bccd4744 | 2,157 | exs | Elixir | test/arbor/siblings_test.exs | devonestes/arbor | d8a608f09977ae6904008f01acc1c9971b00c381 | [
"MIT"
] | null | null | null | test/arbor/siblings_test.exs | devonestes/arbor | d8a608f09977ae6904008f01acc1c9971b00c381 | [
"MIT"
] | null | null | null | test/arbor/siblings_test.exs | devonestes/arbor | d8a608f09977ae6904008f01acc1c9971b00c381 | [
"MIT"
] | null | null | null | defmodule Arbor.SiblingsTest do
use Arbor.TestCase
describe "siblings/1 with an integer PK" do
test "given a struct w/ returns it's children" do
[_, _, leaf1, leaf2, _, _] = create_chatter("pupperinos")
siblings =
leaf1
|> Comment.siblings()
|> Repo.all()
assert sibl... | 28.76 | 71 | 0.629115 |
914741039c08516872d2acb26c2d695152642327 | 674 | ex | Elixir | lib/rube/amm.ex | icecube11/rube | 5d813c5b9f7b984786ac7db6fd2eca0939bf5468 | [
"MIT"
] | null | null | null | lib/rube/amm.ex | icecube11/rube | 5d813c5b9f7b984786ac7db6fd2eca0939bf5468 | [
"MIT"
] | null | null | null | lib/rube/amm.ex | icecube11/rube | 5d813c5b9f7b984786ac7db6fd2eca0939bf5468 | [
"MIT"
] | null | null | null | defmodule Rube.Amm do
alias __MODULE__
@type blockchain_id :: Slurp.Blockchains.Blockchain.id()
@type address :: term
@type pair :: Amm.Pair.t()
@spec pairs :: [pair]
def pairs do
Amm.PairStore.all()
end
@spec find_pair(blockchain_id, address) :: {:ok, pair} | {:error, :not_found}
def find_pair... | 24.071429 | 79 | 0.707715 |
9147e3102a2e09cd70be65d825a497aced53b2b9 | 883 | ex | Elixir | lib/vivid/math.ex | jamesotron/vivid | 01a0089384d8daced8f22a97c49e657fc245fb3c | [
"MIT"
] | 26 | 2017-01-03T01:18:38.000Z | 2019-02-21T09:26:20.000Z | lib/vivid/math.ex | jamesotron/vivid | 01a0089384d8daced8f22a97c49e657fc245fb3c | [
"MIT"
] | null | null | null | lib/vivid/math.ex | jamesotron/vivid | 01a0089384d8daced8f22a97c49e657fc245fb3c | [
"MIT"
] | 2 | 2017-03-18T22:45:49.000Z | 2017-05-08T07:24:58.000Z | defmodule Vivid.Math do
@moduledoc """
I made this because I was constantly importing a small selection of
Erlang's `:math` module, and then manually implementing
`degrees_to_radians/1` which got pretty annoying after a while.
"""
@doc """
Delegates to `:math.pi/0`.
"""
defdelegate pi(), to: :math
... | 20.068182 | 69 | 0.622877 |
9147ff8b5fabc2db7a1ee87adc4ab659632728a7 | 1,662 | ex | Elixir | lib/evm/operation/logging.ex | oraclesorg/evm | 04076d31356b3ec64c935cf9896e8115c0209c88 | [
"MIT"
] | 1 | 2018-04-23T01:57:52.000Z | 2018-04-23T01:57:52.000Z | lib/evm/operation/logging.ex | poanetwork/evm | 04076d31356b3ec64c935cf9896e8115c0209c88 | [
"MIT"
] | null | null | null | lib/evm/operation/logging.ex | poanetwork/evm | 04076d31356b3ec64c935cf9896e8115c0209c88 | [
"MIT"
] | 1 | 2018-04-25T22:58:39.000Z | 2018-04-25T22:58:39.000Z | defmodule EVM.Operation.Logging do
alias EVM.Operation
@doc """
Append log record with no topics.
TODO: Implement opcode
## Examples
iex> EVM.Operation.Logging.log0([], %{stack: []})
:unimplemented
"""
@spec log0(Operation.stack_args(), Operation.vm_map()) :: Operation.op_result()
def lo... | 21.037975 | 81 | 0.641396 |
91481dba322f37c8a1e4029e94ce4aa38b196b33 | 279 | exs | Elixir | api/priv/repo/migrations/20210624054637_create_contacts.exs | jeepers3327/contacts | 75f46dba78e23380fab77838fa9eff06931bd609 | [
"MIT"
] | null | null | null | api/priv/repo/migrations/20210624054637_create_contacts.exs | jeepers3327/contacts | 75f46dba78e23380fab77838fa9eff06931bd609 | [
"MIT"
] | null | null | null | api/priv/repo/migrations/20210624054637_create_contacts.exs | jeepers3327/contacts | 75f46dba78e23380fab77838fa9eff06931bd609 | [
"MIT"
] | null | null | null | defmodule Api.Repo.Migrations.CreateContacts do
use Ecto.Migration
def change do
create table(:contacts) do
add :name, :string, null: false
add :phone_number, :string, null: false
add :email, :string, null: false
timestamps()
end
end
end
| 18.6 | 47 | 0.659498 |
914821dd86418a8c5301ab0906a29164f5687be1 | 1,503 | exs | Elixir | mix.exs | moldmn/clickhousex | b39016714e346490ff8e9c4432006827612fba11 | [
"Apache-2.0"
] | 1 | 2021-06-04T10:21:15.000Z | 2021-06-04T10:21:15.000Z | mix.exs | moldmn/clickhousex | b39016714e346490ff8e9c4432006827612fba11 | [
"Apache-2.0"
] | null | null | null | mix.exs | moldmn/clickhousex | b39016714e346490ff8e9c4432006827612fba11 | [
"Apache-2.0"
] | null | null | null | defmodule Clickhousex.Mixfile do
use Mix.Project
def project do
[
app: :clickhousex,
version: "0.5.0",
elixir: "~> 1.5",
elixirc_paths: elixirc_paths(Mix.env()),
deps: deps(),
package: package(),
source_url: "https://github.com/clickhouse-elixir/clickhousex"
]
en... | 22.772727 | 78 | 0.566866 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.