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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
85c77e77285076c35a81120de867328ef20c90ce | 1,111 | ex | Elixir | server/test/support/channel_case.ex | lemartin19/cs4550-project | bd7baf279021543db33fe52beb3e0d5413dbe405 | [
"Xnet",
"X11"
] | null | null | null | server/test/support/channel_case.ex | lemartin19/cs4550-project | bd7baf279021543db33fe52beb3e0d5413dbe405 | [
"Xnet",
"X11"
] | null | null | null | server/test/support/channel_case.ex | lemartin19/cs4550-project | bd7baf279021543db33fe52beb3e0d5413dbe405 | [
"Xnet",
"X11"
] | null | null | null | defmodule ProjectWeb.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 w... | 27.097561 | 69 | 0.727273 |
85c78d50334266fc5eee5a819ced55499468c36f | 767 | ex | Elixir | lib/hacker_news_aggregator/state_updater.ex | SanketSapkal/hacker_news_aggregator | 06aa17915b31c4a404d8835621e311885fef7285 | [
"MIT"
] | null | null | null | lib/hacker_news_aggregator/state_updater.ex | SanketSapkal/hacker_news_aggregator | 06aa17915b31c4a404d8835621e311885fef7285 | [
"MIT"
] | null | null | null | lib/hacker_news_aggregator/state_updater.ex | SanketSapkal/hacker_news_aggregator | 06aa17915b31c4a404d8835621e311885fef7285 | [
"MIT"
] | null | null | null | defmodule HackerNewsAggregator.StateUpdater do
@moduledoc """
Minimal timer process which also fetches the top stories from HTTPClient.
"""
use Task
alias HackerNewsAggregator.HTTPClient
@timeout :timer.minutes(Application.get_env(:hacker_news_aggregator, :update_timeout))
def start_link... | 24.741935 | 90 | 0.636245 |
85c79cf87dde8a00bd337dc0d44a6190ad93ac3c | 2,808 | ex | Elixir | lib/cforum_web/mailers/notification_mailer.ex | multitain/cforum_ex | 95634a547893f5392345b173f3c264b149e2b124 | [
"MIT"
] | 16 | 2019-04-04T06:33:33.000Z | 2021-08-16T19:34:31.000Z | lib/cforum_web/mailers/notification_mailer.ex | multitain/cforum_ex | 95634a547893f5392345b173f3c264b149e2b124 | [
"MIT"
] | 294 | 2019-02-10T11:10:27.000Z | 2022-03-30T04:52:53.000Z | lib/cforum_web/mailers/notification_mailer.ex | multitain/cforum_ex | 95634a547893f5392345b173f3c264b149e2b124 | [
"MIT"
] | 10 | 2019-02-10T10:39:24.000Z | 2021-07-06T11:46:05.000Z | defmodule CforumWeb.NotificationMailer do
use Phoenix.Swoosh, view: CforumWeb.NotificationMailerView, layout: {CforumWeb.LayoutView, :email}
import CforumWeb.Gettext
alias Cforum.ConfigManager
def pm_notification_mail(user, pm) do
new()
|> from(Application.get_env(:cforum, :mail_sender, "cforum@exampl... | 35.1 | 100 | 0.67094 |
85c7cc47ff443ec1bbdbaa45b721ffa38dd1975c | 68 | ex | Elixir | lib/asciinema_web/views/session_view.ex | sergey-nechaev/asciinema-server | 64f87acec9c9b45fefa8bed8f70b41f0068ccb2b | [
"Apache-2.0"
] | 893 | 2017-09-14T14:18:29.000Z | 2022-03-31T21:45:08.000Z | lib/asciinema_web/views/session_view.ex | sergey-nechaev/asciinema-server | 64f87acec9c9b45fefa8bed8f70b41f0068ccb2b | [
"Apache-2.0"
] | 103 | 2017-09-29T22:15:33.000Z | 2022-03-27T21:47:43.000Z | lib/asciinema_web/views/session_view.ex | sergey-nechaev/asciinema-server | 64f87acec9c9b45fefa8bed8f70b41f0068ccb2b | [
"Apache-2.0"
] | 152 | 2017-09-07T12:43:15.000Z | 2022-03-10T18:47:47.000Z | defmodule AsciinemaWeb.SessionView do
use AsciinemaWeb, :view
end
| 17 | 37 | 0.823529 |
85c7e72f8efc910eced372479dc73f5a1d16b067 | 2,355 | exs | Elixir | config/prod.exs | davidgrupp/Option-Calc | 0b0e4607d827412e207d5fc5102aee001e93a821 | [
"Apache-2.0"
] | null | null | null | config/prod.exs | davidgrupp/Option-Calc | 0b0e4607d827412e207d5fc5102aee001e93a821 | [
"Apache-2.0"
] | null | null | null | config/prod.exs | davidgrupp/Option-Calc | 0b0e4607d827412e207d5fc5102aee001e93a821 | [
"Apache-2.0"
] | null | null | null | use Mix.Config
# For production, we configure the host to read the PORT
# from the system environment. Therefore, you will need
# to set PORT=80 before running your server.
#
# You should also configure the url host to something
# meaningful, we use this information when generating URLs.
#
# Finally, we also include t... | 34.130435 | 75 | 0.72569 |
85c82269d9003bf2cacfc851e09b6ced81fa901f | 7,233 | exs | Elixir | test/plate_slate_web/schema/query/menu_items_test.exs | conradwt/crafting-graphql-apis-in-elixir-with-absinthe | b26d050a350425ac189ea6d205834da1e47d4f90 | [
"MIT"
] | 1 | 2019-05-11T21:50:09.000Z | 2019-05-11T21:50:09.000Z | test/plate_slate_web/schema/query/menu_items_test.exs | conradwt/crafting-graphql-apis-in-elixir-with-absinthe | b26d050a350425ac189ea6d205834da1e47d4f90 | [
"MIT"
] | null | null | null | test/plate_slate_web/schema/query/menu_items_test.exs | conradwt/crafting-graphql-apis-in-elixir-with-absinthe | b26d050a350425ac189ea6d205834da1e47d4f90 | [
"MIT"
] | null | null | null | # ---
# Excerpted from "Craft GraphQL APIs in Elixir with Absinthe",
# published by The Pragmatic Bookshelf.
# Copyrights apply to this code. It may not be used to create training material,
# courses, books, articles, and the like. Contact us if you are in doubt.
# We make no guarantees that this code is fit for any pu... | 26.494505 | 122 | 0.528411 |
85c831e060e29acba9bb52acb9ff193d8b79d73c | 832 | ex | Elixir | lib/pokedex/pokemon.ex | erickgnavar/pokedex-api | ed6dbe831192e684e9605b35844bde80b085ab2e | [
"MIT"
] | null | null | null | lib/pokedex/pokemon.ex | erickgnavar/pokedex-api | ed6dbe831192e684e9605b35844bde80b085ab2e | [
"MIT"
] | null | null | null | lib/pokedex/pokemon.ex | erickgnavar/pokedex-api | ed6dbe831192e684e9605b35844bde80b085ab2e | [
"MIT"
] | null | null | null | defmodule Pokedex.Pokemon do
use Ecto.Schema
import Ecto.Changeset
@timestamps_opts [type: :utc_datetime_usec]
@fields [
:attack,
:defense,
:hp,
:image_url,
:name,
:number,
:speed,
:speed_attack,
:speed_defense,
:total,
:types
]
@derive {Jason.Encoder, only: @f... | 18.909091 | 45 | 0.622596 |
85c838b439bdd7636527e8de3a959e3f7832313a | 160 | ex | Elixir | reflow_controller/lib/reflow_controller/web/controllers/page_controller.ex | harmon25/ReflowToaster | e38bb6dcff2be5a738b432897c4f46628c20cf26 | [
"Apache-2.0"
] | null | null | null | reflow_controller/lib/reflow_controller/web/controllers/page_controller.ex | harmon25/ReflowToaster | e38bb6dcff2be5a738b432897c4f46628c20cf26 | [
"Apache-2.0"
] | null | null | null | reflow_controller/lib/reflow_controller/web/controllers/page_controller.ex | harmon25/ReflowToaster | e38bb6dcff2be5a738b432897c4f46628c20cf26 | [
"Apache-2.0"
] | null | null | null | defmodule ReflowController.Web.PageController do
use ReflowController.Web, :controller
def index(conn, _params) do
render conn, "index.html"
end
end
| 20 | 48 | 0.7625 |
85c83f7148c31bd09f1d3f94e4a478a038ca5c3f | 96,789 | exs | Elixir | test/game/engine_test.exs | toranb/liveview-workshop | bd78cf16e246c0cdb575c824f812335dd752c6d0 | [
"MIT"
] | 2 | 2021-09-14T02:46:48.000Z | 2021-10-15T20:52:30.000Z | test/game/engine_test.exs | toranb/liveview-workshop | bd78cf16e246c0cdb575c824f812335dd752c6d0 | [
"MIT"
] | 3 | 2021-09-06T19:26:18.000Z | 2021-09-06T19:27:04.000Z | test/game/engine_test.exs | toranb/liveview-workshop | bd78cf16e246c0cdb575c824f812335dd752c6d0 | [
"MIT"
] | null | null | null | defmodule Game.EngineTest do
use ExUnit.Case, async: true
alias Game.Card
@game_name "apple-9395"
@playing_cards ["jack", "king"]
@image_one "/images/cards/one"
@image_two "/images/cards/two"
@image_three "/images/cards/three"
@image_four "/images/cards/four"
@id_jack_one "09011E9F1"
@id_jack_two ... | 30.513556 | 101 | 0.59732 |
85c83f7af25e03b4fdacaec28627860a2c5d2dd9 | 1,647 | ex | Elixir | apps/core/lib/core/conduit/base.ex | michaeljguarino/forge | 50ee583ecb4aad5dee4ef08fce29a8eaed1a0824 | [
"Apache-2.0"
] | 59 | 2021-09-16T19:29:39.000Z | 2022-03-31T20:44:24.000Z | apps/core/lib/core/conduit/base.ex | svilenkov/plural | ac6c6cc15ac4b66a3b5e32ed4a7bee4d46d1f026 | [
"Apache-2.0"
] | 111 | 2021-08-15T09:56:37.000Z | 2022-03-31T23:59:32.000Z | apps/core/lib/core/conduit/base.ex | svilenkov/plural | ac6c6cc15ac4b66a3b5e32ed4a7bee4d46d1f026 | [
"Apache-2.0"
] | 4 | 2021-12-13T09:43:01.000Z | 2022-03-29T18:08:44.000Z | defmodule Core.Conduit.Base do
defmacro __using__(opts) do
quote do
use Conduit.Broker, unquote(opts)
import Core.Conduit.Base
configure do
exchange "plural.topic", type: :topic, durable: true
defqueue "plural.rtc"
defqueue "plural.webhook"
defqueue "plural.dkr"... | 29.410714 | 101 | 0.63813 |
85c89a14a2c614873659dc76b6c0cc1474b3eefd | 3,926 | ex | Elixir | lib/nerves_livebook/pattern_led.ex | livebook-dev/nerves_livebook | 949b3f99d12fe875a89f08f06ebd239e2405b24c | [
"Apache-2.0"
] | 51 | 2021-09-21T12:23:41.000Z | 2022-03-31T08:37:17.000Z | lib/nerves_livebook/pattern_led.ex | livebook-dev/nerves_livebook | 949b3f99d12fe875a89f08f06ebd239e2405b24c | [
"Apache-2.0"
] | 37 | 2021-09-21T11:35:28.000Z | 2022-03-18T13:00:31.000Z | lib/nerves_livebook/pattern_led.ex | livebook-dev/nerves_livebook | 949b3f99d12fe875a89f08f06ebd239e2405b24c | [
"Apache-2.0"
] | 7 | 2021-09-26T22:33:35.000Z | 2022-02-20T10:59:29.000Z | defmodule NervesLivebook.PatternLED do
@moduledoc """
Functions for sending patterns to LEDs
This module uses the Linux's sysclass LED pattern trigger to control LEDs.
With it, you can make LEDs do tons of things without spending any time in the
Erlang VM. The code in this module constructs patterns to blink... | 32.446281 | 81 | 0.674733 |
85c8aece51eb2907782f23cf5b1c03dbe92e2db5 | 3,805 | exs | Elixir | test/day_17_two_steps_forward_test.exs | scmx/advent-of-code-2016-elixir | 774145cfee448998d3c35314872bff9afad4d287 | [
"MIT"
] | 1 | 2016-12-07T07:48:01.000Z | 2016-12-07T07:48:01.000Z | test/day_17_two_steps_forward_test.exs | scmx/advent-of-code-2016-elixir | 774145cfee448998d3c35314872bff9afad4d287 | [
"MIT"
] | null | null | null | test/day_17_two_steps_forward_test.exs | scmx/advent-of-code-2016-elixir | 774145cfee448998d3c35314872bff9afad4d287 | [
"MIT"
] | null | null | null | defmodule Adventofcode.Day17TwoStepsForwardTest do
use ExUnit.Case
import Adventofcode.Day17TwoStepsForward
import Adventofcode.Day17TwoStepsForward.Utils
import Adventofcode.TestHelpers
describe "open_doors/1" do
test "ced9, up, down, left are open, and right is closed" do
assert "ced9" = "hijkl"... | 30.44 | 95 | 0.654665 |
85c8b4da057220448baae07425c8000abdf43059 | 291 | exs | Elixir | templates/formatter.exs | alice-bot/alice_new | 0fa9aeb2a26225a46af20daf3af028b5ab283e52 | [
"MIT"
] | null | null | null | templates/formatter.exs | alice-bot/alice_new | 0fa9aeb2a26225a46af20daf3af028b5ab283e52 | [
"MIT"
] | null | null | null | templates/formatter.exs | alice-bot/alice_new | 0fa9aeb2a26225a46af20daf3af028b5ab283e52 | [
"MIT"
] | null | null | null | # Used by "mix format"
#
# Importing alice here will allow you to use Alice's built-in formatting rules.
# These include rules excluding parenthesis for the `command` and `router`
# functions
[
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"],
import_deps: [:alice]
]
| 29.1 | 79 | 0.690722 |
85c8b5d730af161b375a089fd31804d9d380d7a9 | 120 | ex | Elixir | test/browser/port_pool/leases_test.ex | heydtn/crony | 1bc9335edaf6220a724e6a1129f7aef1124ed71f | [
"MIT"
] | null | null | null | test/browser/port_pool/leases_test.ex | heydtn/crony | 1bc9335edaf6220a724e6a1129f7aef1124ed71f | [
"MIT"
] | null | null | null | test/browser/port_pool/leases_test.ex | heydtn/crony | 1bc9335edaf6220a724e6a1129f7aef1124ed71f | [
"MIT"
] | null | null | null | defmodule Crony.Browser.PortPool.LeasesTest do
use ExUnit.Case, async: true
alias Crony.Browser.PortPool.Leases
end
| 24 | 46 | 0.808333 |
85c8e1751fb7f99ffd58d4d91190b0958070e780 | 1,009 | exs | Elixir | test/influxdb_v2/connection/response_parser_v2_test.exs | coder-from-hell/instream | f062e924b74a403e0f41b5374d9ed0e00ae59507 | [
"Apache-2.0"
] | null | null | null | test/influxdb_v2/connection/response_parser_v2_test.exs | coder-from-hell/instream | f062e924b74a403e0f41b5374d9ed0e00ae59507 | [
"Apache-2.0"
] | null | null | null | test/influxdb_v2/connection/response_parser_v2_test.exs | coder-from-hell/instream | f062e924b74a403e0f41b5374d9ed0e00ae59507 | [
"Apache-2.0"
] | null | null | null | defmodule Instream.Connection.ResponseParserV2Test do
use ExUnit.Case, async: true
@moduletag :"influxdb_include_2.0"
alias Instream.Connection.ResponseParserV2
alias Instream.TestHelpers.Connections.DefaultConnection
test "response format: default (parsed)" do
assert %{} = DefaultConnection.query("SEL... | 30.575758 | 89 | 0.714569 |
85c8e383b85bb368823242350410118576983a55 | 601 | ex | Elixir | lib/ElCloud_web/controllers/file_controller.ex | Sapfir0/elCloud | 3ef9e8d2400898250ee65d36870672e76006c263 | [
"Unlicense"
] | 2 | 2021-05-30T20:11:44.000Z | 2021-12-20T19:08:56.000Z | lib/ElCloud_web/controllers/file_controller.ex | Sapfir0/elCloud | 3ef9e8d2400898250ee65d36870672e76006c263 | [
"Unlicense"
] | null | null | null | lib/ElCloud_web/controllers/file_controller.ex | Sapfir0/elCloud | 3ef9e8d2400898250ee65d36870672e76006c263 | [
"Unlicense"
] | 1 | 2022-01-23T05:29:08.000Z | 2022-01-23T05:29:08.000Z | defmodule ElCloudWeb.FileController do
use ElCloudWeb, :controller
use PhoenixSwagger
alias ElCloud.FileStorage
action_fallback ElCloudWeb.FallbackController
@data_dir Application.get_env(:elCloud, ElCloudWeb.FileStorageController)[:data_dir]
swagger_path(:show) do
get("/api/file")
summary("files"... | 24.04 | 86 | 0.728785 |
85c8e46ef58b203805c305073112363280bcd492 | 969 | ex | Elixir | lib/derivco/models/match.ex | AdolfodelSel/Derivco | ad3090208dfc9e11415825f5ce1374ef3f8c2985 | [
"MIT"
] | null | null | null | lib/derivco/models/match.ex | AdolfodelSel/Derivco | ad3090208dfc9e11415825f5ce1374ef3f8c2985 | [
"MIT"
] | 2 | 2021-03-09T15:53:17.000Z | 2021-05-10T09:50:18.000Z | lib/derivco/models/match.ex | AdolfodelSel/Derivco | ad3090208dfc9e11415825f5ce1374ef3f8c2985 | [
"MIT"
] | null | null | null | defmodule Derivco.Models.Match do
use Ecto.Schema
import Ecto.Changeset
schema "matches" do
field :date, :string
belongs_to :home_team, Derivco.Models.Team, foreign_key: :home_team_id
belongs_to :away_team, Derivco.Models.Team, foreign_key: :away_team_id
field :fthg, :integer
field :ftag, :in... | 32.3 | 129 | 0.695562 |
85c8eab987d37bac207fa6c4fcc5407adcefc044 | 1,234 | ex | Elixir | test/support/conn_case.ex | AkioCode/calculatorAPI_ex | e4fc9e8d4df69f8a50c021b6fb7cd55dfb9436e2 | [
"MIT"
] | null | null | null | test/support/conn_case.ex | AkioCode/calculatorAPI_ex | e4fc9e8d4df69f8a50c021b6fb7cd55dfb9436e2 | [
"MIT"
] | null | null | null | test/support/conn_case.ex | AkioCode/calculatorAPI_ex | e4fc9e8d4df69f8a50c021b6fb7cd55dfb9436e2 | [
"MIT"
] | null | null | null | defmodule ContaiWeb.ConnCase do
@moduledoc """
This module defines the test case to be used by
tests that require setting up a connection.
Such tests rely on `Phoenix.ConnTest` and also
import other functionality to make it easier
to build common data structures and query the data layer.
Finally, if the... | 28.045455 | 68 | 0.722853 |
85c9039da531b929559dce288a64c354cdc8a093 | 946 | ex | Elixir | lib/util/gettext.ex | IvanPereyra-23/PaaS | 0179c7b57645473308b0a295a70b6284ed220fbf | [
"Apache-2.0"
] | 1 | 2020-08-27T18:43:11.000Z | 2020-08-27T18:43:11.000Z | lib/util/gettext.ex | IvanPereyra-23/PaaS | 0179c7b57645473308b0a295a70b6284ed220fbf | [
"Apache-2.0"
] | null | null | null | lib/util/gettext.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.
defmodule Antikythera.Gettext do
@moduledoc """
A thin wrapper around `Gettext.__using__/1` to forward error logs to each gear's logger.
Usage of this module is exactly the same as `Gettext`; just `use #{inspect(__MODULE__)}` instead of `use Gettext... | 35.037037 | 116 | 0.725159 |
85c91c4153810c24e5d33ac214b372c680bf04f0 | 1,453 | exs | Elixir | test/hexpm_web/controllers/api/repository_controller_test.exs | Benjamin-Philip/hexpm | 6f38244f81bbabd234c660f46ea973849ba77a7f | [
"Apache-2.0"
] | 691 | 2017-03-08T09:15:45.000Z | 2022-03-23T22:04:47.000Z | test/hexpm_web/controllers/api/repository_controller_test.exs | Benjamin-Philip/hexpm | 6f38244f81bbabd234c660f46ea973849ba77a7f | [
"Apache-2.0"
] | 491 | 2017-03-07T12:58:42.000Z | 2022-03-29T23:32:54.000Z | test/hexpm_web/controllers/api/repository_controller_test.exs | Benjamin-Philip/hexpm | 6f38244f81bbabd234c660f46ea973849ba77a7f | [
"Apache-2.0"
] | 200 | 2017-03-12T23:03:39.000Z | 2022-03-05T17:55:52.000Z | defmodule HexpmWeb.API.RepositoryControllerTest do
use HexpmWeb.ConnCase, async: true
setup do
user = insert(:user)
repository1 = insert(:repository, public: false)
repository2 = insert(:repository, public: false)
insert(:organization_user, user: user, organization: repository1.organization)
%{... | 28.490196 | 82 | 0.635926 |
85c91d01cee081b10745e6301853883f26edc238 | 980 | ex | Elixir | apps/core/lib/core/policies/dns.ex | pluralsh/plural | d33d08dee6348126334810e044b3699ef3f74819 | [
"Apache-2.0"
] | 59 | 2021-09-16T19:29:39.000Z | 2022-03-31T20:44:24.000Z | apps/core/lib/core/policies/dns.ex | svilenkov/plural | ac6c6cc15ac4b66a3b5e32ed4a7bee4d46d1f026 | [
"Apache-2.0"
] | 111 | 2021-08-15T09:56:37.000Z | 2022-03-31T23:59:32.000Z | apps/core/lib/core/policies/dns.ex | svilenkov/plural | ac6c6cc15ac4b66a3b5e32ed4a7bee4d46d1f026 | [
"Apache-2.0"
] | 4 | 2021-12-13T09:43:01.000Z | 2022-03-29T18:08:44.000Z | defmodule Core.Policies.Dns do
use Piazza.Policy
alias Core.Services.Rbac
alias Core.Schema.{User, DnsDomain, DnsRecord}
def can?(%User{id: uid}, %DnsDomain{creator_id: uid}, :edit),
do: :pass
def can?(_, %DnsDomain{}, :edit), do: {:error, :forbidden}
def can?(%User{account_id: aid}, %DnsDomain{accoun... | 36.296296 | 97 | 0.644898 |
85c920384388708f021fb774b469bb9ce49caeb7 | 2,477 | ex | Elixir | lib/plug/http_status_codes.ex | erikvullings/json-service | c920346e503e05d98e20b17283d43037c6202d7f | [
"MIT"
] | null | null | null | lib/plug/http_status_codes.ex | erikvullings/json-service | c920346e503e05d98e20b17283d43037c6202d7f | [
"MIT"
] | null | null | null | lib/plug/http_status_codes.ex | erikvullings/json-service | c920346e503e05d98e20b17283d43037c6202d7f | [
"MIT"
] | null | null | null | # List of possible HTTP status codes:
# Source: https://gist.github.com/koudelka/f4d07b9d998d723e55a0
defmodule JsonService.Plug.StatusCodes do
@http_status_codes %{
100 => "Continue",
101 => "Switching Protocols",
102 => "Processing",
200 => "OK",
201 => "Created",
202 => "Accep... | 30.9625 | 88 | 0.55874 |
85c92a57068d5b61125c63954933627fd684cfef | 566 | exs | Elixir | test/unit/hologram/compiler/js_encoders/binary_type_test.exs | gregjohnsonsaltaire/hologram | aa8e9ea0d599def864c263cc37cc8ee31f02ac4a | [
"MIT"
] | 40 | 2022-01-19T20:27:36.000Z | 2022-03-31T18:17:41.000Z | test/unit/hologram/compiler/js_encoders/binary_type_test.exs | gregjohnsonsaltaire/hologram | aa8e9ea0d599def864c263cc37cc8ee31f02ac4a | [
"MIT"
] | 42 | 2022-02-03T22:52:43.000Z | 2022-03-26T20:57:32.000Z | test/unit/hologram/compiler/js_encoders/binary_type_test.exs | gregjohnsonsaltaire/hologram | aa8e9ea0d599def864c263cc37cc8ee31f02ac4a | [
"MIT"
] | 3 | 2022-02-10T04:00:37.000Z | 2022-03-08T22:07:45.000Z | defmodule Hologram.Compiler.JSEncoder.BinaryTypeTest do
use Hologram.Test.UnitCase, async: true
alias Hologram.Compiler.{Context, JSEncoder, Opts}
alias Hologram.Compiler.IR.{BinaryType, StringType}
test "encode/3" do
ir = %BinaryType{
parts: [
%StringType{value: "abc"},
%StringType{... | 24.608696 | 104 | 0.618375 |
85c940dd28f4f766f1fce68c8810994f8c4c5a78 | 1,020 | ex | Elixir | lib/mix_audit/audit.ex | wolcanism/mix_audit | 5217f4be56519dd67dba0084929d1ed50517bc18 | [
"BSD-3-Clause"
] | 173 | 2020-03-04T14:04:46.000Z | 2022-03-26T21:50:27.000Z | lib/mix_audit/audit.ex | wolcanism/mix_audit | 5217f4be56519dd67dba0084929d1ed50517bc18 | [
"BSD-3-Clause"
] | 5 | 2020-03-09T17:04:19.000Z | 2021-12-29T17:38:20.000Z | lib/mix_audit/audit.ex | wolcanism/mix_audit | 5217f4be56519dd67dba0084929d1ed50517bc18 | [
"BSD-3-Clause"
] | 6 | 2020-03-11T21:43:48.000Z | 2021-12-21T19:20:48.000Z | defmodule MixAudit.Audit do
def report(dependencies, advisories) do
vulnerabilities =
Enum.reduce(dependencies, [], fn dependency, memo ->
advisories
|> Map.get(dependency.package, [])
|> Enum.filter(&is_vulnerability?(&1, dependency))
|> Enum.map(&map_vulnerability(&1, depen... | 31.875 | 165 | 0.686275 |
85c94e758cf6a72696d9e3da5b0ba270c23e54fc | 1,354 | exs | Elixir | example/test/example_test.exs | parody/chronik | ec2dbc5b415433d8732575db6ce24b02ebaf5da3 | [
"MIT"
] | 28 | 2017-09-12T13:54:17.000Z | 2021-07-20T22:04:28.000Z | example/test/example_test.exs | parody/chronik | ec2dbc5b415433d8732575db6ce24b02ebaf5da3 | [
"MIT"
] | 18 | 2017-09-22T14:06:00.000Z | 2018-06-09T14:18:35.000Z | example/test/example_test.exs | parody/chronik | ec2dbc5b415433d8732575db6ce24b02ebaf5da3 | [
"MIT"
] | 2 | 2018-05-11T09:36:50.000Z | 2019-09-23T18:29:58.000Z | defmodule ExampleTest do
use ExUnit.Case
alias Example.Cart
test "Double creating a cart" do
cart_id = "1"
# Create a cart.
assert :ok = Cart.create(cart_id)
# Check that we cannot re-create the cart.
assert {:error, _} = Cart.create(cart_id)
end
test "Removing from an empty cart" do
... | 22.196721 | 74 | 0.627031 |
85c95f6fb346daef70ca9dfb70be9459061ae0d0 | 1,774 | ex | Elixir | clients/web_security_scanner/lib/google_api/web_security_scanner/v1alpha/model/list_finding_type_stats_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/web_security_scanner/lib/google_api/web_security_scanner/v1alpha/model/list_finding_type_stats_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/web_security_scanner/lib/google_api/web_security_scanner/v1alpha/model/list_finding_type_stats_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 33.471698 | 163 | 0.761556 |
85c9a94fc72d7fc7d43dfe087d8ce7a28482a201 | 433 | exs | Elixir | integration_test/chrome/test_helper.exs | carl-al/wallaby | a4c9811902370b15db17fc62d451035ee7464eea | [
"MIT"
] | 1 | 2019-01-30T12:08:17.000Z | 2019-01-30T12:08:17.000Z | integration_test/chrome/test_helper.exs | carl-al/wallaby | a4c9811902370b15db17fc62d451035ee7464eea | [
"MIT"
] | 2 | 2019-04-10T08:23:27.000Z | 2021-01-25T16:37:23.000Z | integration_test/chrome/test_helper.exs | carl-al/wallaby | a4c9811902370b15db17fc62d451035ee7464eea | [
"MIT"
] | 1 | 2019-01-29T16:03:55.000Z | 2019-01-29T16:03:55.000Z | ExUnit.configure(max_cases: 4, exclude: [pending: true])
ExUnit.start()
# Load support files
Code.require_file "../support/test_server.ex", __DIR__
Code.require_file "../support/pages/index_page.ex", __DIR__
Code.require_file "../support/pages/page_1.ex", __DIR__
Code.require_file "../support/session_case.ex", __DIR__... | 36.083333 | 59 | 0.773672 |
85c9bf3ca002d2b4350f475dfea5d53b76be0d41 | 348 | ex | Elixir | lib/hex/set.ex | sudix/hex | f739a57d8829ea0b0f7759c164dc9149c3340e49 | [
"Apache-2.0"
] | null | null | null | lib/hex/set.ex | sudix/hex | f739a57d8829ea0b0f7759c164dc9149c3340e49 | [
"Apache-2.0"
] | 1 | 2021-06-25T15:19:59.000Z | 2021-06-25T15:19:59.000Z | lib/hex/set.ex | sudix/hex | f739a57d8829ea0b0f7759c164dc9149c3340e49 | [
"Apache-2.0"
] | null | null | null | defmodule Hex.Set do
if Version.compare(System.version(), "1.1.0") == :lt do
@module HashSet
else
@module MapSet
end
def new(enum) do
Enum.into(enum, new())
end
defdelegate new(), to: @module
defdelegate put(set, value), to: @module
defdelegate delete(set, value), to: @module
defdelegate... | 20.470588 | 57 | 0.658046 |
85ca1f39515ed0f6da761c1081c4df8f5684fff9 | 924 | ex | Elixir | lib/whatsupwith/format.ex | aleandros/whatsupwith | ccbd70e4dab795a7771ef3ffa66649aa347a23d1 | [
"MIT"
] | null | null | null | lib/whatsupwith/format.ex | aleandros/whatsupwith | ccbd70e4dab795a7771ef3ffa66649aa347a23d1 | [
"MIT"
] | null | null | null | lib/whatsupwith/format.ex | aleandros/whatsupwith | ccbd70e4dab795a7771ef3ffa66649aa347a23d1 | [
"MIT"
] | null | null | null | defmodule Whatsupwith.Format do
@moduledoc """
Presentation layer for the program.
Provides the necessary functions correctly building
the program output.
"""
@doc """
Build a string in simple tabular fashion
given a list of `Whatsupwith.Program` elements.
"""
def tabular_format([]), do: ""
def ... | 24.972973 | 55 | 0.670996 |
85ca66d56dcec9b21d455484852f0525eaa7f872 | 107 | ex | Elixir | lib/proto/protobuf/empty.pb.ex | mladenml/weddell | 3b28cc06d6acd94279152b44f025cd8a70fc04fc | [
"MIT"
] | 24 | 2018-01-22T18:38:26.000Z | 2022-01-14T13:26:03.000Z | lib/proto/protobuf/empty.pb.ex | mladenml/weddell | 3b28cc06d6acd94279152b44f025cd8a70fc04fc | [
"MIT"
] | 15 | 2018-10-28T08:36:55.000Z | 2022-01-09T15:54:16.000Z | lib/proto/protobuf/empty.pb.ex | mladenml/weddell | 3b28cc06d6acd94279152b44f025cd8a70fc04fc | [
"MIT"
] | 13 | 2018-05-17T22:04:00.000Z | 2021-05-21T10:36:13.000Z | defmodule Google.Protobuf.Empty do
@moduledoc false
use Protobuf, syntax: :proto3
defstruct []
end
| 13.375 | 34 | 0.738318 |
85ca754020f4868cb11539103da9bf3617b033b7 | 1,938 | exs | Elixir | exercises/wordy/test/wordy_test.exs | DuoPan/elixir | e96388f242c383c1f45935570ed2f42394171fc6 | [
"MIT"
] | 2 | 2019-07-09T05:23:38.000Z | 2019-07-29T01:39:59.000Z | exercises/wordy/test/wordy_test.exs | DuoPan/elixir | e96388f242c383c1f45935570ed2f42394171fc6 | [
"MIT"
] | null | null | null | exercises/wordy/test/wordy_test.exs | DuoPan/elixir | e96388f242c383c1f45935570ed2f42394171fc6 | [
"MIT"
] | null | null | null | defmodule WordyTest do
use ExUnit.Case
test "addition" do
assert Wordy.answer("What is 1 plus 1?") == 2
end
@tag :pending
test "more addition" do
assert Wordy.answer("What is 53 plus 2?") == 55
end
@tag :pending
test "addition with negative numbers" do
assert Wordy.answer("What is -1 plus... | 22.275862 | 77 | 0.650155 |
85cada221d9644eb3c56d3b4e6f01ca2986314f8 | 129 | exs | Elixir | test/eris_test.exs | LegoRemix/eris | b63ac8c1fd373e3eb225dcb42d1012b9633ef306 | [
"MIT"
] | null | null | null | test/eris_test.exs | LegoRemix/eris | b63ac8c1fd373e3eb225dcb42d1012b9633ef306 | [
"MIT"
] | null | null | null | test/eris_test.exs | LegoRemix/eris | b63ac8c1fd373e3eb225dcb42d1012b9633ef306 | [
"MIT"
] | null | null | null | defmodule ErisTest do
use ExUnit.Case
doctest Eris
test "greets the world" do
assert Eris.hello() == :world
end
end
| 14.333333 | 33 | 0.689922 |
85caf95fbb5c241e0523888e992af2f0e246c4aa | 2,430 | ex | Elixir | lib/slack_logger_backend/logger.ex | h3poteto/slack_logger_backend | 537aee5328963d5f4b8d22c48a932d9e0a09f501 | [
"MIT"
] | 34 | 2016-03-02T12:15:01.000Z | 2020-06-22T02:13:06.000Z | lib/slack_logger_backend/logger.ex | h3poteto/slack_logger_backend | 537aee5328963d5f4b8d22c48a932d9e0a09f501 | [
"MIT"
] | 6 | 2016-06-03T18:05:01.000Z | 2022-02-07T08:20:39.000Z | lib/slack_logger_backend/logger.ex | h3poteto/slack_logger_backend | 537aee5328963d5f4b8d22c48a932d9e0a09f501 | [
"MIT"
] | 14 | 2016-03-08T09:40:20.000Z | 2022-01-28T08:46:11.000Z | defmodule SlackLoggerBackend.Logger do
@moduledoc """
The actual logger backend for sending logger events to Slack.
"""
use GenEvent
alias SlackLoggerBackend.Producer
@env_webhook "SLACK_LOGGER_WEBHOOK_URL"
@default_log_levels [:error]
@doc false
def init(__MODULE__) do
{:ok, %{levels: []}}
... | 24.545455 | 161 | 0.660494 |
85cafcdfdf79c3f60b80a781a1639098366e1056 | 2,994 | ex | Elixir | lib/example_web/live/scan_live.ex | BenSchZA/kawapi-phoenix | 5ed91b1d30d91bcc85c5f120d18691d236a41e88 | [
"MIT"
] | 1 | 2020-12-18T17:23:31.000Z | 2020-12-18T17:23:31.000Z | lib/example_web/live/scan_live.ex | BenSchZA/kawapi-phoenix | 5ed91b1d30d91bcc85c5f120d18691d236a41e88 | [
"MIT"
] | null | null | null | lib/example_web/live/scan_live.ex | BenSchZA/kawapi-phoenix | 5ed91b1d30d91bcc85c5f120d18691d236a41e88 | [
"MIT"
] | null | null | null | defmodule ExampleWeb.ScanLive do
use Phoenix.LiveView
alias ExampleWeb.ScanView
def render(assigns) do
~L"""
<form phx-submit="scan">
<input name="repo" class="input" type="text" placeholder="e.g. Uniswap/uniswap-frontend"/>
</form>
<table class="table is-striped is-hoverable is-f... | 27.218182 | 100 | 0.49499 |
85cb37b900f2d45e467c851e59aeeaf6a1bfe20d | 131 | ex | Elixir | lib/ex_queue_bus_client/behaviours/event_handler_behaviour.ex | lets-talk/ex-queue-bus-client | 64de7faa0d6d3f88df6fa185d7a664404b90cab5 | [
"MIT"
] | 3 | 2019-08-03T14:01:07.000Z | 2020-08-28T14:33:43.000Z | lib/ex_queue_bus_client/behaviours/event_handler_behaviour.ex | lets-talk/ex-queue-bus-client | 64de7faa0d6d3f88df6fa185d7a664404b90cab5 | [
"MIT"
] | 10 | 2019-05-07T19:30:14.000Z | 2020-03-04T19:24:14.000Z | lib/ex_queue_bus_client/behaviours/event_handler_behaviour.ex | lets-talk/ex-queue-bus-client | 64de7faa0d6d3f88df6fa185d7a664404b90cab5 | [
"MIT"
] | null | null | null | defmodule ExQueueBusClient.EventHandlerBehaviour do
@callback handle_event(binary, binary, map(), map()) :: :process | :skip
end
| 32.75 | 74 | 0.763359 |
85cb5ee297ba75d1731c497a2a2f362078b48575 | 15,217 | ex | Elixir | lib/inductive_graph/internal.ex | rtvu/inductive_graph | d6b0bebabf9d1124774c9c4e53d621593735c6e7 | [
"MIT"
] | 3 | 2021-01-25T13:13:23.000Z | 2021-03-30T19:51:38.000Z | lib/inductive_graph/internal.ex | rtvu/inductive_graph | d6b0bebabf9d1124774c9c4e53d621593735c6e7 | [
"MIT"
] | null | null | null | lib/inductive_graph/internal.ex | rtvu/inductive_graph | d6b0bebabf9d1124774c9c4e53d621593735c6e7 | [
"MIT"
] | null | null | null | defmodule InductiveGraph.Internal do
@moduledoc """
Functions to manage internal representation of inductive graph.
"""
alias InductiveGraph.Utilities
@type value :: InductiveGraph.value
@type edge_value :: InductiveGraph.edge_value
@type vertex_value :: InductiveGraph.vertex_value
@type vertex :: Ind... | 33.008677 | 166 | 0.664191 |
85cba0bd8d09251cf93fe55ad0850a4ab9985170 | 937 | ex | Elixir | test/support/channel_case.ex | Robolia/robolia | cbd3ea24db460f213a3411f474d765536ae7871c | [
"MIT"
] | 1 | 2020-01-19T04:27:46.000Z | 2020-01-19T04:27:46.000Z | test/support/channel_case.ex | Robolia/robolia | cbd3ea24db460f213a3411f474d765536ae7871c | [
"MIT"
] | null | null | null | test/support/channel_case.ex | Robolia/robolia | cbd3ea24db460f213a3411f474d765536ae7871c | [
"MIT"
] | 1 | 2018-05-13T14:06:46.000Z | 2018-05-13T14:06:46.000Z | defmodule RoboliaWeb.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 datastructures and query the data layer.
Finally, if the test case interacts wi... | 24.657895 | 69 | 0.716115 |
85cba6e05f2abc7fa55e8b6479894c41b06e4f5a | 1,456 | ex | Elixir | apps/rtc/lib/rtc_web/endpoint.ex | michaeljguarino/forge | 50ee583ecb4aad5dee4ef08fce29a8eaed1a0824 | [
"Apache-2.0"
] | 59 | 2021-09-16T19:29:39.000Z | 2022-03-31T20:44:24.000Z | apps/rtc/lib/rtc_web/endpoint.ex | svilenkov/plural | ac6c6cc15ac4b66a3b5e32ed4a7bee4d46d1f026 | [
"Apache-2.0"
] | 111 | 2021-08-15T09:56:37.000Z | 2022-03-31T23:59:32.000Z | apps/rtc/lib/rtc_web/endpoint.ex | svilenkov/plural | ac6c6cc15ac4b66a3b5e32ed4a7bee4d46d1f026 | [
"Apache-2.0"
] | 4 | 2021-12-13T09:43:01.000Z | 2022-03-29T18:08:44.000Z | defmodule RtcWeb.Endpoint do
use Sentry.PlugCapture
use Phoenix.Endpoint, otp_app: :rtc
use Absinthe.Phoenix.Endpoint
# The session will be stored in the cookie and signed,
# this means its contents can be read but not tampered with.
# Set :encryption_salt if you would also like to encrypt it.
@session_o... | 27.471698 | 69 | 0.714973 |
85cbaca4bbe5e6347a033fcf451cb30cbe561bf1 | 1,451 | exs | Elixir | mix.exs | chgeuer/scrogson_elixir_oauth2 | 3b6e9f49dce969e6a49c3dab7210d8b030e18b15 | [
"MIT"
] | null | null | null | mix.exs | chgeuer/scrogson_elixir_oauth2 | 3b6e9f49dce969e6a49c3dab7210d8b030e18b15 | [
"MIT"
] | null | null | null | mix.exs | chgeuer/scrogson_elixir_oauth2 | 3b6e9f49dce969e6a49c3dab7210d8b030e18b15 | [
"MIT"
] | null | null | null | defmodule OAuth2.Mixfile do
use Mix.Project
@version "0.9.1"
def project do
[app: :oauth2,
name: "OAuth2",
version: @version,
elixir: "~> 1.2",
deps: deps(),
package: package(),
description: description(),
docs: docs(),
elixirc_paths: elixirc_paths(Mix.env),
test... | 23.031746 | 60 | 0.568573 |
85cbc31df6f613fc68b23c7dbcd5eb50bf4c03a9 | 2,008 | exs | Elixir | app/test/app/todo_test.exs | Cate-Lukner/cate-lukner-internship | 43e8b467287ea3a7955e23f18180cb4f849e6620 | [
"MIT"
] | null | null | null | app/test/app/todo_test.exs | Cate-Lukner/cate-lukner-internship | 43e8b467287ea3a7955e23f18180cb4f849e6620 | [
"MIT"
] | null | null | null | app/test/app/todo_test.exs | Cate-Lukner/cate-lukner-internship | 43e8b467287ea3a7955e23f18180cb4f849e6620 | [
"MIT"
] | 1 | 2020-05-22T19:21:24.000Z | 2020-05-22T19:21:24.000Z | defmodule App.TodoTest do
use App.DataCase
alias App.Todo
describe "items" do
alias App.Todo.Item
@valid_attrs %{person_id: 42, status: 42, text: "some text"}
@update_attrs %{person_id: 43, status: 43, text: "some updated text"}
@invalid_attrs %{person_id: nil, status: nil, text: nil}
def ... | 29.101449 | 81 | 0.636952 |
85cbc463da729334d0f38d9f9fde6c81305f57a3 | 1,398 | ex | Elixir | test/support/data_case.ex | matthewess/boilertalk | f8382108e6e029e5cc04f6420d60dd1adafa4c30 | [
"MIT"
] | null | null | null | test/support/data_case.ex | matthewess/boilertalk | f8382108e6e029e5cc04f6420d60dd1adafa4c30 | [
"MIT"
] | null | null | null | test/support/data_case.ex | matthewess/boilertalk | f8382108e6e029e5cc04f6420d60dd1adafa4c30 | [
"MIT"
] | null | null | null | defmodule Boilertalk.DataCase do
@moduledoc """
This module defines the setup for tests requiring
access to the application's data layer.
You may define functions here to be used as helpers in
your tests.
Finally, if the test case interacts with the database,
it cannot be async. For this reason, every t... | 25.888889 | 77 | 0.683119 |
85cbd851b46ce960aeff5002e384c16710ff7c9b | 2,283 | exs | Elixir | test/watch_faces/comments_test.exs | DaniruKun/watchfaces-ex | 699e345596000ec3e50141e44217b155400261d6 | [
"MIT"
] | null | null | null | test/watch_faces/comments_test.exs | DaniruKun/watchfaces-ex | 699e345596000ec3e50141e44217b155400261d6 | [
"MIT"
] | null | null | null | test/watch_faces/comments_test.exs | DaniruKun/watchfaces-ex | 699e345596000ec3e50141e44217b155400261d6 | [
"MIT"
] | null | null | null | defmodule WatchFaces.CommentsTest do
use WatchFaces.DataCase
alias WatchFaces.Comments
describe "comments" do
alias WatchFaces.Comments.Comment
@valid_attrs %{author: 42, content: "some content", face: 42}
@update_attrs %{author: 43, content: "some updated content", face: 43}
@invalid_attrs %{a... | 33.086957 | 91 | 0.680683 |
85cbe785232856b21b582a67ec4c42982ea7fee9 | 7,181 | ex | Elixir | lib/xgit/repository.ex | scouten/xgit | 0e2f849c83cdf39a9249b319d63ff3682c482c2f | [
"Apache-2.0"
] | 94 | 2019-05-28T05:29:54.000Z | 2022-02-18T20:03:20.000Z | lib/xgit/repository.ex | scouten/xgit | 0e2f849c83cdf39a9249b319d63ff3682c482c2f | [
"Apache-2.0"
] | 156 | 2019-05-26T03:27:24.000Z | 2020-10-08T05:44:26.000Z | lib/xgit/repository.ex | scouten/redo | 0e2f849c83cdf39a9249b319d63ff3682c482c2f | [
"Apache-2.0"
] | 5 | 2019-05-28T16:35:55.000Z | 2021-06-16T14:25:17.000Z | defmodule Xgit.Repository do
@moduledoc ~S"""
Represents a git repository.
Create a repository by calling the `start_link` function on one of the modules
that implements `Xgit.Repository.Storage`. The resulting PID can be used when
calling functions in this module and `Xgit.Repository.Plumbing`.
The funct... | 29.920833 | 106 | 0.648378 |
85cbf26d51240adab96bf10a6f7bfeb7db92951a | 1,935 | ex | Elixir | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v2beta1/model/metric_value.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v2beta1/model/metric_value.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v2beta1/model/metric_value.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... | 40.3125 | 453 | 0.751421 |
85cc22f67e99214e14df956272bff8ea1fbcfb11 | 2,595 | ex | Elixir | lib/companies/accounts.ex | beam-community/elixir-companies | 7488075d1a372c9ca8fa6603f93e384b73977526 | [
"MIT"
] | 333 | 2019-05-18T14:01:17.000Z | 2022-03-22T05:07:40.000Z | lib/companies/accounts.ex | beam-community/elixir-companies | 7488075d1a372c9ca8fa6603f93e384b73977526 | [
"MIT"
] | 89 | 2019-05-18T10:01:54.000Z | 2021-05-12T15:19:26.000Z | lib/companies/accounts.ex | envato/elixir-companies | 7488075d1a372c9ca8fa6603f93e384b73977526 | [
"MIT"
] | 33 | 2019-06-07T00:33:53.000Z | 2022-03-21T05:38:28.000Z | defmodule Companies.Accounts do
@moduledoc """
The Accounts context.
"""
import Ecto.Query, warn: false
alias Companies.{Repo, Schema.User}
def list_users(params \\ %{}) do
page = Map.get(params, "page", "1")
(u in User)
|> from()
|> order_by(:nickname)
|> predicates(params)
|> R... | 18.274648 | 91 | 0.587669 |
85cc3c98936cb14a158749177b7155f3f1e36b19 | 1,776 | ex | Elixir | clients/remote_build_execution/lib/google_api/remote_build_execution/v2/model/build_bazel_remote_execution_v2_command_environment_variable.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/remote_build_execution/lib/google_api/remote_build_execution/v2/model/build_bazel_remote_execution_v2_command_environment_variable.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/remote_build_execution/lib/google_api/remote_build_execution/v2/model/build_bazel_remote_execution_v2_command_environment_variable.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 30.62069 | 106 | 0.736486 |
85cc5c5940d8e802e80c326b8f4cef093e370496 | 2,413 | ex | Elixir | lib/plumbapius/request.ex | Amuhar/plumbapius | a9066512f520f2ad97e677b04d70cc62695f2def | [
"Apache-2.0"
] | null | null | null | lib/plumbapius/request.ex | Amuhar/plumbapius | a9066512f520f2ad97e677b04d70cc62695f2def | [
"Apache-2.0"
] | null | null | null | lib/plumbapius/request.ex | Amuhar/plumbapius | a9066512f520f2ad97e677b04d70cc62695f2def | [
"Apache-2.0"
] | null | null | null | defmodule Plumbapius.Request do
@moduledoc "Defines methods for validating requests by schema"
defmodule NotFoundError do
defexception [:method, :path]
@impl true
def message(exception) do
"Request.NotFoundError request #{exception.method}: #{exception.path} was not found in schema"
end
... | 29.426829 | 108 | 0.697472 |
85cc80019f8c58375e0b8611449ab04db360c7f2 | 437 | ex | Elixir | apps/ello_auth/test/support/ello_auth_case.ex | ello/apex | 4acb096b3ce172ff4ef9a51e5d068d533007b920 | [
"MIT"
] | 16 | 2017-06-21T21:31:20.000Z | 2021-05-09T03:23:26.000Z | apps/ello_auth/test/support/ello_auth_case.ex | ello/apex | 4acb096b3ce172ff4ef9a51e5d068d533007b920 | [
"MIT"
] | 25 | 2017-06-07T12:18:28.000Z | 2018-06-08T13:27:43.000Z | apps/ello_auth/test/support/ello_auth_case.ex | ello/apex | 4acb096b3ce172ff4ef9a51e5d068d533007b920 | [
"MIT"
] | 3 | 2018-06-14T15:34:07.000Z | 2022-02-28T21:06:13.000Z | defmodule Ello.Auth.Case do
use ExUnit.CaseTemplate
# When running Ello.Auth tests use the network stub.
setup_all do
Application.put_env(:ello_auth, :user_lookup_mfa, {Ello.Auth.NetworkStub, :user})
on_exit fn ->
Application.put_env(:ello_auth, :user_lookup_mfa, {Ello.Core.Network, :load_current_u... | 23 | 96 | 0.704805 |
85cca7468dc05db1145fc65aca1bbd98b4bb6657 | 1,553 | ex | Elixir | lib/cadet/assessments/query.ex | source-academy/cadet | c447552453f78799755de73f66999e4c9d20383c | [
"Apache-2.0"
] | 27 | 2018-01-20T05:56:24.000Z | 2021-05-24T03:21:55.000Z | lib/cadet/assessments/query.ex | source-academy/cadet | c447552453f78799755de73f66999e4c9d20383c | [
"Apache-2.0"
] | 731 | 2018-04-16T13:25:49.000Z | 2021-06-22T07:16:12.000Z | lib/cadet/assessments/query.ex | source-academy/cadet | c447552453f78799755de73f66999e4c9d20383c | [
"Apache-2.0"
] | 43 | 2018-01-20T06:35:46.000Z | 2021-05-05T03:22:35.000Z | defmodule Cadet.Assessments.Query do
@moduledoc """
Generate queries related to the Assessments context
"""
use Cadet, :context
import Ecto.Query
alias Cadet.Assessments.{Assessment, Question}
@doc """
Returns a query with the following bindings:
[assessments_with_xp, questions]
"""
@spec all_a... | 27.732143 | 94 | 0.678042 |
85ccabf2e83ce9089b52a973debcf87faac7edca | 1,369 | exs | Elixir | mix.exs | rarguelloF/credo | 7251a7988e8b4c4281faa418228a5170af91145c | [
"MIT"
] | null | null | null | mix.exs | rarguelloF/credo | 7251a7988e8b4c4281faa418228a5170af91145c | [
"MIT"
] | null | null | null | mix.exs | rarguelloF/credo | 7251a7988e8b4c4281faa418228a5170af91145c | [
"MIT"
] | null | null | null | defmodule Credo.Mixfile do
use Mix.Project
def project do
[
app: :credo,
version: "1.0.0",
elixir: ">= 1.4.0",
escript: [main_module: Credo.CLI],
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
deps: deps(),
test_coverage: [tool: Coverex.... | 24.890909 | 96 | 0.533236 |
85ccbf23f675ff3d39e87b3c5a423f222c8b1f60 | 439 | ex | Elixir | lib/disco/application.ex | andreapavoni/disco | e168e0cba38aa61c10fa7ae156133618aef5c25a | [
"MIT"
] | 32 | 2018-12-10T10:54:03.000Z | 2022-01-03T23:55:23.000Z | lib/disco/application.ex | andreapavoni/disco | e168e0cba38aa61c10fa7ae156133618aef5c25a | [
"MIT"
] | 2 | 2018-12-10T09:15:52.000Z | 2019-06-25T10:50:10.000Z | lib/disco/application.ex | andreapavoni/disco | e168e0cba38aa61c10fa7ae156133618aef5c25a | [
"MIT"
] | 2 | 2019-05-08T16:06:54.000Z | 2019-07-12T11:57:59.000Z | defmodule Disco.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 = child_apps(Mix.env())
opts = [strategy: :one_for_one, name: Disco.Supervisor]
Supervisor.start_link(c... | 19.086957 | 59 | 0.685649 |
85cd3ffcd1fbd0d3ec5a84069793f7e239999bef | 4,476 | exs | Elixir | test/oli_web/controllers/registration_controller_test.exs | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | 1 | 2022-03-17T20:35:47.000Z | 2022-03-17T20:35:47.000Z | test/oli_web/controllers/registration_controller_test.exs | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | 9 | 2021-11-02T16:52:09.000Z | 2022-03-25T15:14:01.000Z | test/oli_web/controllers/registration_controller_test.exs | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | null | null | null | defmodule OliWeb.RegistrationControllerTest do
use OliWeb.ConnCase
alias Oli.Repo
alias Oli.Accounts.SystemRole
alias Oli.Accounts.Author
alias Oli.Institutions
@create_attrs %{
auth_login_url: "some auth_login_url",
auth_server: "some auth_server",
auth_token_url: "some auth_token_url",
c... | 26.963855 | 95 | 0.649464 |
85cd63dc1064c9344b409b3816a7158191a444dd | 757 | ex | Elixir | lib/xadmin/themes/active_admin/paginate.ex | ntsai/xadmin | 82d8be63e69483ff66472481e66f9870face355b | [
"MIT"
] | 5 | 2016-08-30T01:23:50.000Z | 2021-09-22T14:39:00.000Z | lib/xadmin/themes/active_admin/paginate.ex | ntsai/xadmin | 82d8be63e69483ff66472481e66f9870face355b | [
"MIT"
] | null | null | null | lib/xadmin/themes/active_admin/paginate.ex | ntsai/xadmin | 82d8be63e69483ff66472481e66f9870face355b | [
"MIT"
] | 1 | 2021-12-10T11:10:55.000Z | 2021-12-10T11:10:55.000Z | defmodule XAdmin.Theme.ActiveAdmin.Paginate do
@moduledoc false
import XAdmin.Paginate
use Xain
def wrap_pagination1(fun) do
nav ".pagination" do
fun.()
end
end
def wrap_pagination2(fun) do
div ".pagination_information" do
fun.()
end
end
def build_item(_, {:current, num}) d... | 19.921053 | 81 | 0.587847 |
85cda3d3b2c095c703d566713e041ce7b92fa69b | 1,159 | ex | Elixir | lib/nudge_api/matches/workers/timeout_match.ex | feelja-tech/feelja-api | 03ce15430460cf2dac24a7740242c7e5ac5c5804 | [
"MIT"
] | null | null | null | lib/nudge_api/matches/workers/timeout_match.ex | feelja-tech/feelja-api | 03ce15430460cf2dac24a7740242c7e5ac5c5804 | [
"MIT"
] | null | null | null | lib/nudge_api/matches/workers/timeout_match.ex | feelja-tech/feelja-api | 03ce15430460cf2dac24a7740242c7e5ac5c5804 | [
"MIT"
] | null | null | null | defmodule NudgeApi.Matches.Workers.TimeoutMatch do
use Oban.Worker, queue: :events, unique: [period: :infinity], max_attempts: 3
alias NudgeApi.{Users, Fsms, Matches}
defp finalize_match(match_id) do
{:ok, _} =
Matches.get_match!(match_id)
|> Matches.update_match(%{
finalized_at: Timex.n... | 21.867925 | 79 | 0.597929 |
85cdb9a645b0e7ca7c4c38e8e216b3528b0cb8b1 | 6,802 | exs | Elixir | integration_test/pg/migrations_test.exs | scrogson/ecto | fdcf807901683c73c1117d89751e0d5a7a318154 | [
"Apache-2.0"
] | null | null | null | integration_test/pg/migrations_test.exs | scrogson/ecto | fdcf807901683c73c1117d89751e0d5a7a318154 | [
"Apache-2.0"
] | null | null | null | integration_test/pg/migrations_test.exs | scrogson/ecto | fdcf807901683c73c1117d89751e0d5a7a318154 | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.Integration.MigrationsTest do
use Ecto.Integration.Postgres.Case
import Support.FileHelpers
import ExUnit.CaptureIO
alias Ecto.Adapters.Postgres
defmodule GoodMigration do
use Ecto.Migration
def up do
"CREATE TABLE migrations_test(id serial primary key, name text)"
end
... | 26.885375 | 96 | 0.625404 |
85cddf169fd4c15462b078af810b63b2286c6071 | 1,074 | ex | Elixir | test/support/support.ex | Sitata/memento | 137ff84c40b4a1c2e3496f160cecdb0428dd397a | [
"MIT"
] | 679 | 2018-08-17T23:10:00.000Z | 2022-03-27T07:23:27.000Z | test/support/support.ex | Sitata/memento | 137ff84c40b4a1c2e3496f160cecdb0428dd397a | [
"MIT"
] | 26 | 2018-09-06T01:27:31.000Z | 2022-03-09T07:16:05.000Z | test/support/support.ex | Sitata/memento | 137ff84c40b4a1c2e3496f160cecdb0428dd397a | [
"MIT"
] | 23 | 2018-09-06T01:06:14.000Z | 2022-03-09T00:55:06.000Z | defmodule Memento.Support do
alias Memento.Support
@moduledoc "Helper functions for tests"
# Capture Helpers
defdelegate capture_io(fun), to: ExUnit.CaptureIO
defdelegate capture_log(fun), to: ExUnit.CaptureLog
defmodule Mnesia do
@moduledoc "Mnesia-related helpers"
def reset do
stop... | 20.653846 | 76 | 0.662011 |
85cdfc9f8f9d3dcdba7f6a56445081a112dd6ca0 | 3,452 | ex | Elixir | lib/ueberauth/strategy/auth0/oauth.ex | coenerd/ueberauth_auth0 | 9e22d788c5c5c50d8e7df05afda6a56fc7b1e105 | [
"MIT"
] | null | null | null | lib/ueberauth/strategy/auth0/oauth.ex | coenerd/ueberauth_auth0 | 9e22d788c5c5c50d8e7df05afda6a56fc7b1e105 | [
"MIT"
] | null | null | null | lib/ueberauth/strategy/auth0/oauth.ex | coenerd/ueberauth_auth0 | 9e22d788c5c5c50d8e7df05afda6a56fc7b1e105 | [
"MIT"
] | null | null | null | defmodule Ueberauth.Strategy.Auth0.OAuth do
@moduledoc """
An implementation of OAuth2 for Auth0.
To add your `domain`, `client_id` and `client_secret` include these values in your configuration.
config :ueberauth, Ueberauth.Strategy.Auth0.OAuth,
domain: System.get_env("AUTH0_DOMAIN"),
clien... | 31.099099 | 102 | 0.683372 |
85ce30c64f1198a479d6a874be7ed173a611b48e | 211 | ex | Elixir | 08-chapter/07_example.ex | herminiotorres/programming-elixir | 70add5ec9fe7f91129da0a4e39ab329afb9be598 | [
"MIT"
] | null | null | null | 08-chapter/07_example.ex | herminiotorres/programming-elixir | 70add5ec9fe7f91129da0a4e39ab329afb9be598 | [
"MIT"
] | null | null | null | 08-chapter/07_example.ex | herminiotorres/programming-elixir | 70add5ec9fe7f91129da0a4e39ab329afb9be598 | [
"MIT"
] | null | null | null | # Pattern matching can match variable keys
data = %{name: "Dave", state: "TX", likes: "Elixir"}
data |> IO.inspect()
IO.puts("")
for key <- [:name, :likes] do
%{ ^key => value } = data
IO.puts(value)
end
| 17.583333 | 52 | 0.601896 |
85ce59e8fcc075cbdc5b901caa5e42cf915ae295 | 1,266 | exs | Elixir | test/auto_api/capabilities/seats_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/seats_test.exs | nonninz/auto-api-elixir | 53e11542043285e94bbb5a0a3b8ffff0b1b47167 | [
"MIT"
] | 5 | 2020-07-16T07:20:21.000Z | 2021-09-22T10:18:04.000Z | test/auto_api/capabilities/seats_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... | 46.888889 | 79 | 0.779621 |
85ce62be539a26b18e9734a42e1b4a67385330f9 | 757 | ex | Elixir | lib/oniichain/p2p/p2p_message.ex | freester1/OniiChain | 28153c2fa3b1425aeac240df016c907d5b822101 | [
"Apache-2.0"
] | 9 | 2017-12-17T02:58:48.000Z | 2018-11-07T13:48:50.000Z | lib/oniichain/p2p/p2p_message.ex | freester1/OniiChain | 28153c2fa3b1425aeac240df016c907d5b822101 | [
"Apache-2.0"
] | 1 | 2017-12-12T23:58:22.000Z | 2017-12-13T00:00:21.000Z | lib/oniichain/p2p/p2p_message.ex | freester1/OniiChain | 28153c2fa3b1425aeac240df016c907d5b822101 | [
"Apache-2.0"
] | 3 | 2017-12-12T23:57:20.000Z | 2018-03-03T22:13:38.000Z | defmodule Oniichain.P2pMessage do
@moduledoc """
p2p messaging protocol. Defines message options.
"""
@query_latest_block "get_latest_block"
@query_all_blocks "get_all_blocks"
@update_block_chain "update_block_chain"
@add_peer_request "add_peer_request"
@already_connected "already_connected"
@con... | 36.047619 | 50 | 0.784676 |
85ce81e8819ba0fcfa907fa3f98c70d849012e30 | 9,822 | ex | Elixir | apps/ex_wire/lib/ex_wire/packet/capability/par/snapshot_data/block_chunk.ex | wolflee/mana | db66dac85addfaad98d40da5bd4082b3a0198bb1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 152 | 2018-10-27T04:52:03.000Z | 2022-03-26T10:34:00.000Z | apps/ex_wire/lib/ex_wire/packet/capability/par/snapshot_data/block_chunk.ex | wolflee/mana | db66dac85addfaad98d40da5bd4082b3a0198bb1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 270 | 2018-04-14T07:34:57.000Z | 2018-10-25T18:10:45.000Z | apps/ex_wire/lib/ex_wire/packet/capability/par/snapshot_data/block_chunk.ex | wolflee/mana | db66dac85addfaad98d40da5bd4082b3a0198bb1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 25 | 2018-10-27T12:15:13.000Z | 2022-01-25T20:31:14.000Z | defmodule ExWire.Packet.Capability.Par.SnapshotData.BlockChunk do
@moduledoc """
Block chunks contain raw block data: blocks themselves, and their transaction
receipts. The blocks are stored in the "abridged block" format (referred to
by AB), and the the receipts are stored in a list: [`receipt_1`: `P`,
`rece... | 33.408163 | 338 | 0.480147 |
85ce84aa683fc2715e5b4612954c4ce5ab93260a | 2,921 | exs | Elixir | src/server/test/game/player_test.exs | pedromykul/csb-wonhu1 | 5fe81fbc99d2b9859fbdb3c87c23e788264c0b9c | [
"MIT"
] | null | null | null | src/server/test/game/player_test.exs | pedromykul/csb-wonhu1 | 5fe81fbc99d2b9859fbdb3c87c23e788264c0b9c | [
"MIT"
] | null | null | null | src/server/test/game/player_test.exs | pedromykul/csb-wonhu1 | 5fe81fbc99d2b9859fbdb3c87c23e788264c0b9c | [
"MIT"
] | null | null | null | defmodule Game.PlayerTest do
use ExUnit.Case
alias Game.{
Player,
Dice
}
test "update/2" do
actual = Player.update(%Player{}, %{turns: 2})
expected = %Player{turns: 2}
assert actual == expected
end
describe "increase/2" do
test "when turns are added" do
actual = Player.incr... | 22.469231 | 83 | 0.504622 |
85ced2549d273d54f0bbf23791e29927d89550bd | 204 | exs | Elixir | priv/repo/migrations/20200501103440_create_users.exs | mattiaslundberg/booking | 469d1469f306b2ab62ce1ee971a825101af6fc7e | [
"MIT"
] | null | null | null | priv/repo/migrations/20200501103440_create_users.exs | mattiaslundberg/booking | 469d1469f306b2ab62ce1ee971a825101af6fc7e | [
"MIT"
] | 2 | 2021-03-10T16:49:07.000Z | 2021-05-11T12:50:22.000Z | priv/repo/migrations/20200501103440_create_users.exs | mattiaslundberg/booking | 469d1469f306b2ab62ce1ee971a825101af6fc7e | [
"MIT"
] | null | null | null | defmodule Booking.Repo.Migrations.CreateUsers do
use Ecto.Migration
def change do
create table(:users) do
add :name, :string
add :email, :string
timestamps()
end
end
end
| 15.692308 | 48 | 0.656863 |
85cef3c866878aa747505106edb331f109f96198 | 38 | ex | Elixir | lib/conreality/scripting.ex | bendiken/consensus | e03328ef1f0056b58e4ffe181a279a1dc776e094 | [
"Unlicense"
] | 2 | 2015-09-23T19:18:50.000Z | 2015-09-24T21:08:13.000Z | lib/conreality/scripting.ex | bendiken/consensus | e03328ef1f0056b58e4ffe181a279a1dc776e094 | [
"Unlicense"
] | 3 | 2015-09-24T20:38:41.000Z | 2015-09-26T21:26:49.000Z | lib/conreality/scripting.ex | bendiken/consensus | e03328ef1f0056b58e4ffe181a279a1dc776e094 | [
"Unlicense"
] | null | null | null | defmodule Conreality.Scripting do
end
| 12.666667 | 33 | 0.868421 |
85cf051989bb7ae1dc65338519ceca3e56d26396 | 164 | ex | Elixir | lib/ex_yapay/params.ex | denvera/ex-yapay | 18ac9a20108f21554a4c61b9c822694fa5189eb8 | [
"MIT"
] | 3 | 2020-08-11T19:05:55.000Z | 2020-08-19T21:57:39.000Z | lib/ex_yapay/params.ex | denvera/ex-yapay | 18ac9a20108f21554a4c61b9c822694fa5189eb8 | [
"MIT"
] | 2 | 2020-08-20T16:32:02.000Z | 2021-09-27T18:46:40.000Z | lib/ex_yapay/params.ex | denvera/ex-yapay | 18ac9a20108f21554a4c61b9c822694fa5189eb8 | [
"MIT"
] | 3 | 2020-08-11T19:20:22.000Z | 2021-10-17T17:29:59.000Z | defmodule ExYapay.Params do
@moduledoc false
@doc "Returns the encoded request body."
@callback build(map()) :: {:ok, String.t()} | {:error, String.t()}
end
| 23.428571 | 68 | 0.664634 |
85cf2bafb1d69bdc590efb01e4644e303bb8c5b7 | 3,472 | ex | Elixir | lib/wechat/mini_program/code.ex | hsieh/wechat | 6a49033d3a35a80358481778a0609f214c340a0c | [
"Apache-2.0"
] | 7 | 2021-01-22T04:07:29.000Z | 2021-12-14T14:01:30.000Z | lib/wechat/mini_program/code.ex | hsieh/wechat | 6a49033d3a35a80358481778a0609f214c340a0c | [
"Apache-2.0"
] | 1 | 2021-03-17T15:44:26.000Z | 2021-03-17T15:44:26.000Z | lib/wechat/mini_program/code.ex | hsieh/wechat | 6a49033d3a35a80358481778a0609f214c340a0c | [
"Apache-2.0"
] | 2 | 2021-03-17T14:35:56.000Z | 2021-08-10T07:44:10.000Z | defmodule WeChat.MiniProgram.Code do
@moduledoc "小程序码"
import Jason.Helpers
import WeChat.Utils, only: [doc_link_prefix: 0]
@typedoc """
场景值
最大`32`个可见字符,只支持数字,大小写英文以及部分特殊字符:`!#$&'()*+,/:;=?@-._~`,
其它字符请自行编码为合法字符(因不支持%,中文无法使用 `UrlEncode` 处理,请使用其他编码方式)
`scene` 字段的值会作为 `query` 参数传递给小程序/小游戏。用户扫描该码进入小程序/小... | 30.725664 | 116 | 0.653226 |
85cf5d2ee49cfa56242f2f4cbc337071939e511d | 950 | exs | Elixir | test/suite/draft4/pattern_test.exs | starbelly/json_xema | 73ca23f9ce51d450d2f9cf0509ee6bb82f9a8c79 | [
"MIT"
] | 1 | 2019-06-21T10:55:33.000Z | 2019-06-21T10:55:33.000Z | test/suite/draft4/pattern_test.exs | starbelly/json_xema | 73ca23f9ce51d450d2f9cf0509ee6bb82f9a8c79 | [
"MIT"
] | null | null | null | test/suite/draft4/pattern_test.exs | starbelly/json_xema | 73ca23f9ce51d450d2f9cf0509ee6bb82f9a8c79 | [
"MIT"
] | null | null | null | defmodule Draft4.PatternTest do
use ExUnit.Case, async: true
import JsonXema, only: [valid?: 2]
describe "pattern validation" do
setup do
%{schema: ~s(
{
"pattern": "^a*$"
}
) |> Jason.decode!() |> JsonXema.new()}
end
test "a matching pattern is valid", %{sch... | 20.652174 | 66 | 0.546316 |
85cf66e29e311f486849001ac13f04b549724ab2 | 2,948 | ex | Elixir | lib/actions/cookbook.ex | adobe/bot_army_ui_testing_demo | c9def9bf445b4747b79fae1f04522c84693f5c7e | [
"MIT"
] | 2 | 2020-08-29T14:15:03.000Z | 2020-09-24T01:57:21.000Z | lib/actions/cookbook.ex | adobe/bot_army_ui_testing_demo | c9def9bf445b4747b79fae1f04522c84693f5c7e | [
"MIT"
] | null | null | null | lib/actions/cookbook.ex | adobe/bot_army_ui_testing_demo | c9def9bf445b4747b79fae1f04522c84693f5c7e | [
"MIT"
] | 1 | 2020-09-27T11:43:35.000Z | 2020-09-27T11:43:35.000Z | defmodule BotArmyStarter.Actions.Cookbook do
@moduledoc """
Tests out the bot army cookbook content.
"""
alias Hound.Helpers.{Session, Navigation, Page, Element}
require Logger
def visit(_context, url) when is_binary(url) do
Session.start_session()
Navigation.navigate_to(url)
:succeed
end
... | 24.773109 | 90 | 0.676052 |
85cfb34cfd10e67fbe717e0f6dc726c5a5ca4021 | 623 | ex | Elixir | test/support/factory.ex | nickdichev/cloak_ecto | 4e7c49dc3eaf623162aa5d55e91b83c49f3b2854 | [
"MIT"
] | 139 | 2018-12-17T13:52:42.000Z | 2022-03-27T02:58:55.000Z | test/support/factory.ex | nickdichev/cloak_ecto | 4e7c49dc3eaf623162aa5d55e91b83c49f3b2854 | [
"MIT"
] | 25 | 2019-08-07T16:49:03.000Z | 2022-03-14T18:17:54.000Z | test/support/factory.ex | nickdichev/cloak_ecto | 4e7c49dc3eaf623162aa5d55e91b83c49f3b2854 | [
"MIT"
] | 30 | 2019-01-09T12:36:16.000Z | 2022-03-14T18:03:28.000Z | defmodule Cloak.Ecto.Factory do
@moduledoc false
@doc """
Creates a user.
"""
def create_user(email) do
email = Cloak.Ecto.TestVault.encrypt!(email, :secondary)
{:ok, email_hash} = Cloak.Ecto.Hashed.HMAC.dump(email)
{_count, [user]} =
Cloak.Ecto.TestRepo.insert_all(
"users",
... | 21.482759 | 60 | 0.540931 |
85cfb4b02f4c3a69115fbfc9d20b213ba3607cbe | 2,496 | ex | Elixir | lib/common_filters.ex | jack-s9/ecto_shorts | 44046a9d259be24c2d4f260100cf81dd0d112196 | [
"MIT"
] | null | null | null | lib/common_filters.ex | jack-s9/ecto_shorts | 44046a9d259be24c2d4f260100cf81dd0d112196 | [
"MIT"
] | null | null | null | lib/common_filters.ex | jack-s9/ecto_shorts | 44046a9d259be24c2d4f260100cf81dd0d112196 | [
"MIT"
] | null | null | null | defmodule EctoShorts.CommonFilters do
@moduledoc """
This modules main purpose is to house a collection of common schema filters
and functionality to be included in params -> filters
Common filters available include
- `preload` - Preloads fields onto the query results
- `start_date` - Query for items inse... | 33.72973 | 106 | 0.701923 |
85cfcaedf7f0ad1c4b95f78427ee26fbf341d609 | 388 | ex | Elixir | lib/punting_server_web/views/error_view.ex | codingmelee/punting_server | 81c5423b556951beb7412bea5b3610b9e37ba9aa | [
"Apache-2.0"
] | null | null | null | lib/punting_server_web/views/error_view.ex | codingmelee/punting_server | 81c5423b556951beb7412bea5b3610b9e37ba9aa | [
"Apache-2.0"
] | null | null | null | lib/punting_server_web/views/error_view.ex | codingmelee/punting_server | 81c5423b556951beb7412bea5b3610b9e37ba9aa | [
"Apache-2.0"
] | null | null | null | defmodule PuntingServerWeb.ErrorView do
use PuntingServerWeb, :view
def render("404.html", _assigns) do
"Page not found"
end
def render("500.html", _assigns) do
"Internal server error"
end
# In case no render clause matches or no
# template is found, let's render it as 500
def template_not_fo... | 21.555556 | 47 | 0.71134 |
85d05ee3732bc0a647683b66b0732cb71ec16bda | 1,904 | exs | Elixir | test/friendly_test.exs | m4ta1l/bors-ng | a4d04fd740e24d03833cd46a76f0f9e5be96f818 | [
"Apache-2.0"
] | 1,223 | 2017-01-11T19:25:08.000Z | 2022-03-21T12:31:28.000Z | test/friendly_test.exs | seanpm2001/bors-ng | 2482df1c2f4680b33534620571f04075b6b4390a | [
"Apache-2.0"
] | 1,428 | 2017-01-09T16:36:18.000Z | 2022-03-28T14:19:40.000Z | test/friendly_test.exs | seanpm2001/bors-ng | 2482df1c2f4680b33534620571f04075b6b4390a | [
"Apache-2.0"
] | 184 | 2017-01-10T18:08:06.000Z | 2022-03-14T18:53:24.000Z | defmodule BorsNG.FriendlyMockTest do
use BorsNG.Worker.TestCase
alias BorsNG.GitHub.FriendlyMock
setup do
FriendlyMock.init_state()
# Can't figure out why syncing doesn't add the user.
# Probably because we're missing all the Supervisors?
BorsNG.Database.Repo.insert!(%BorsNG.Database.User{
... | 32.827586 | 128 | 0.647059 |
85d078f08763973681ced2df648a499c08e180d8 | 202 | exs | Elixir | priv/repo/migrations/20211116222804_transaction_belongs_to_address.exs | herman-rogers/blue_book | 84c1d173c4e953e68f5a8df1dd1afce0ab57d876 | [
"MIT"
] | null | null | null | priv/repo/migrations/20211116222804_transaction_belongs_to_address.exs | herman-rogers/blue_book | 84c1d173c4e953e68f5a8df1dd1afce0ab57d876 | [
"MIT"
] | null | null | null | priv/repo/migrations/20211116222804_transaction_belongs_to_address.exs | herman-rogers/blue_book | 84c1d173c4e953e68f5a8df1dd1afce0ab57d876 | [
"MIT"
] | null | null | null | defmodule BlueBook.Repo.Migrations.TransactionBelongsToAddress do
use Ecto.Migration
def change do
alter table(:transactions) do
add :address_id, references(:addresses)
end
end
end
| 20.2 | 65 | 0.752475 |
85d08a3b4ccb1166c7c3caca68b0fae4715cc82d | 1,944 | ex | Elixir | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v14/model/pretargeting_config_video_player_sizes.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-10-01T09:20:41.000Z | 2021-10-01T09:20:41.000Z | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v14/model/pretargeting_config_video_player_sizes.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v14/model/pretargeting_config_video_player_sizes.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 35.345455 | 146 | 0.727881 |
85d0bc22a9ce66e8d1bc4b8cfea3e28dc41933c7 | 1,263 | exs | Elixir | mix.exs | kianmeng/exvcr | d757ad434aa877deeb3868bc2efd4e7bb372cb93 | [
"MIT"
] | null | null | null | mix.exs | kianmeng/exvcr | d757ad434aa877deeb3868bc2efd4e7bb372cb93 | [
"MIT"
] | null | null | null | mix.exs | kianmeng/exvcr | d757ad434aa877deeb3868bc2efd4e7bb372cb93 | [
"MIT"
] | null | null | null | defmodule ExVCR.Mixfile do
use Mix.Project
def project do
[ app: :exvcr,
version: "0.12.1",
elixir: "~> 1.3",
deps: deps(),
description: description(),
package: package(),
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [coveralls: :test]
]
end
# Config... | 25.26 | 75 | 0.561362 |
85d0d07e18adf09daef9e05620ec1bc999f39901 | 1,716 | ex | Elixir | clients/firestore/lib/google_api/firestore/v1/model/google_firestore_admin_v1_progress.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/firestore/lib/google_api/firestore/v1/model/google_firestore_admin_v1_progress.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/firestore/lib/google_api/firestore/v1/model/google_firestore_admin_v1_progress.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 34.32 | 123 | 0.73951 |
85d0da678c22c1b0b2827892c49a1db07c193cc0 | 398 | ex | Elixir | web/views/error_view.ex | WillsonSmith/similarfilms_phoenix | 2466a3796ace5e0a09d345da3c76d90cf7747c13 | [
"MIT"
] | null | null | null | web/views/error_view.ex | WillsonSmith/similarfilms_phoenix | 2466a3796ace5e0a09d345da3c76d90cf7747c13 | [
"MIT"
] | null | null | null | web/views/error_view.ex | WillsonSmith/similarfilms_phoenix | 2466a3796ace5e0a09d345da3c76d90cf7747c13 | [
"MIT"
] | null | null | null | defmodule SimilarfilmsPhoenix.ErrorView do
use SimilarfilmsPhoenix.Web, :view
def render("404.html", _assigns) do
"Page not found"
end
def render("500.html", _assigns) do
"Internal server error"
end
# In case no render clause matches or no
# template is found, let's render it as 500
def templ... | 22.111111 | 47 | 0.71608 |
85d12e6d41e597f55b1c34fff7d663abf073b3c6 | 1,103 | ex | Elixir | examples/echo_phoenix/lib/echo_phoenix/application.ex | wingyplus/line_ex | 73ae52c5c07998dac55f5f11aa9ce79d751b67d6 | [
"MIT"
] | 3 | 2021-07-27T21:29:43.000Z | 2021-08-06T11:52:24.000Z | examples/echo_phoenix/lib/echo_phoenix/application.ex | wingyplus/line_ex | 73ae52c5c07998dac55f5f11aa9ce79d751b67d6 | [
"MIT"
] | 7 | 2021-07-26T03:18:39.000Z | 2021-10-11T11:16:49.000Z | examples/echo_phoenix/lib/echo_phoenix/application.ex | wingyplus/line_ex | 73ae52c5c07998dac55f5f11aa9ce79d751b67d6 | [
"MIT"
] | 1 | 2021-07-29T16:13:47.000Z | 2021-07-29T16:13:47.000Z | defmodule EchoPhoenix.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
channel_access_token = System.get_env("LINE_CHANNEL_ACCESS_TOKEN")
children = [
{Finch, name: EchoPhoeni... | 30.638889 | 78 | 0.725295 |
85d12e9baab1269bedb2c7010f08e15a214cc98f | 1,218 | ex | Elixir | lib/sentinel_api/endpoint.ex | fs/sentinel_api | 6f6f8ab3e3bf10c44a1d8e025aceded121a420e0 | [
"MIT"
] | null | null | null | lib/sentinel_api/endpoint.ex | fs/sentinel_api | 6f6f8ab3e3bf10c44a1d8e025aceded121a420e0 | [
"MIT"
] | null | null | null | lib/sentinel_api/endpoint.ex | fs/sentinel_api | 6f6f8ab3e3bf10c44a1d8e025aceded121a420e0 | [
"MIT"
] | null | null | null | defmodule SentinelApi.Endpoint do
use Phoenix.Endpoint, otp_app: :sentinel_api
socket "/socket", SentinelApi.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 P... | 28.325581 | 69 | 0.720854 |
85d14c5e16ed848b16287a5bd66047c876042e2b | 1,139 | ex | Elixir | lib/currency/ecto.ex | jeremytregunna/currency | df17596741e40f61997fe51e49fbfe3c2280afb2 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-10-02T21:44:55.000Z | 2019-10-02T21:44:55.000Z | lib/currency/ecto.ex | jeremytregunna/currency | df17596741e40f61997fe51e49fbfe3c2280afb2 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-08-09T21:19:03.000Z | 2019-08-09T21:19:03.000Z | lib/currency/ecto.ex | jeremytregunna/currency | df17596741e40f61997fe51e49fbfe3c2280afb2 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | defmodule Currency.Ecto do
@moduledoc """
Provides a custom type for use in an Ecto schema to use Currency as a field
type.
## Usage:
Schema:
defmodule Thing do
use Ecto.Schema
schema "things" do
field :name, :string
field :cost, Currency.Ecto
end
en... | 18.983333 | 81 | 0.590869 |
85d1737fcceef4db0a0e9e1a6ac5f0bab86d9bc7 | 3,115 | ex | Elixir | clients/chat/lib/google_api/chat/v1/model/key_value.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/chat/lib/google_api/chat/v1/model/key_value.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/chat/lib/google_api/chat/v1/model/key_value.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | 1 | 2020-11-10T16:58:27.000Z | 2020-11-10T16:58:27.000Z | # Copyright 2018 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... | 44.5 | 370 | 0.718459 |
85d1967244df60d92e2e279f89231336ce36dc9e | 28,428 | ex | Elixir | clients/admin/lib/google_api/admin/directory_v1/api/groups.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-10-01T09:20:41.000Z | 2021-10-01T09:20:41.000Z | clients/admin/lib/google_api/admin/directory_v1/api/groups.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/admin/lib/google_api/admin/directory_v1/api/groups.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 47.939292 | 419 | 0.617244 |
85d1c60096fc12aee2bf89635eb63deae7da8d4b | 11,563 | exs | Elixir | test/teslamate/settings_test.exs | qianbin/teslamate | ef673e88824c24c934b9fc7b155ad8766c1377bb | [
"MIT"
] | 1 | 2021-10-31T13:22:49.000Z | 2021-10-31T13:22:49.000Z | test/teslamate/settings_test.exs | qianbin/teslamate | ef673e88824c24c934b9fc7b155ad8766c1377bb | [
"MIT"
] | null | null | null | test/teslamate/settings_test.exs | qianbin/teslamate | ef673e88824c24c934b9fc7b155ad8766c1377bb | [
"MIT"
] | null | null | null | defmodule TeslaMate.SettingsTest do
use TeslaMate.DataCase, async: false
alias TeslaMate.Settings.{GlobalSettings, CarSettings}
alias TeslaMate.{Settings, Log}
defp car_fixture(attrs \\ %{}) do
{:ok, car} =
attrs
|> Enum.into(%{
efficiency: 0.153,
eid: 42,
model: "S",
... | 31.506812 | 99 | 0.573727 |
85d1d19d2a1a4831990aa6669edf80b7e961338a | 528 | ex | Elixir | apps/customer/lib/customer/cron.ex | JaiMali/job_search-1 | 5fe1afcd80aa5d55b92befed2780cd6721837c88 | [
"MIT"
] | 102 | 2017-05-21T18:24:04.000Z | 2022-03-10T12:53:20.000Z | apps/customer/lib/customer/cron.ex | JaiMali/job_search-1 | 5fe1afcd80aa5d55b92befed2780cd6721837c88 | [
"MIT"
] | 2 | 2017-05-21T01:53:30.000Z | 2017-12-01T00:27:06.000Z | apps/customer/lib/customer/cron.ex | JaiMali/job_search-1 | 5fe1afcd80aa5d55b92befed2780cd6721837c88 | [
"MIT"
] | 18 | 2017-05-22T09:51:36.000Z | 2021-09-24T00:57:01.000Z | defmodule Customer.Cron do
use GenServer
require Logger
# NOTE: every day
@period 24 * 60 * 60 * 1000
def start_link do
GenServer.start_link(__MODULE__, %{})
end
def init(state) do
set_schedule_work()
{:ok, state}
end
def handle_info(:work, state) do
Logger.info("esreindex executes... | 17.6 | 59 | 0.670455 |
85d1eabfce5960c5e7d0612ed968e2e09a881632 | 1,603 | exs | Elixir | mix.exs | coinjar/elixir-grpc | 69b160799d57d69c07b7979823f1f7f69dfe31d0 | [
"Apache-2.0"
] | null | null | null | mix.exs | coinjar/elixir-grpc | 69b160799d57d69c07b7979823f1f7f69dfe31d0 | [
"Apache-2.0"
] | null | null | null | mix.exs | coinjar/elixir-grpc | 69b160799d57d69c07b7979823f1f7f69dfe31d0 | [
"Apache-2.0"
] | null | null | null | defmodule GRPC.Mixfile do
use Mix.Project
@version "0.5.1"
def project do
[
app: :grpc,
version: @version,
elixir: "~> 1.5",
elixirc_paths: elixirc_paths(Mix.env()),
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
deps: deps(),
package... | 25.444444 | 72 | 0.545228 |
85d1f1b9a35e48b302c05d766007b36bbe290623 | 20,850 | ex | Elixir | lib/jerboa/client/worker.ex | ACollectionOfAtoms/jerboa | 16000d450bb60b544b5c91f0fd7540a31b6c90b8 | [
"Apache-2.0"
] | 14 | 2016-12-22T10:38:34.000Z | 2021-03-11T23:20:26.000Z | lib/jerboa/client/worker.ex | ACollectionOfAtoms/jerboa | 16000d450bb60b544b5c91f0fd7540a31b6c90b8 | [
"Apache-2.0"
] | 94 | 2016-12-22T13:13:29.000Z | 2021-02-10T14:22:32.000Z | lib/jerboa/client/worker.ex | ACollectionOfAtoms/jerboa | 16000d450bb60b544b5c91f0fd7540a31b6c90b8 | [
"Apache-2.0"
] | 6 | 2017-04-03T20:23:00.000Z | 2022-03-06T10:14:30.000Z | defmodule Jerboa.Client.Worker do
@moduledoc false
use GenServer
alias :gen_udp, as: UDP
alias Jerboa.Format
alias Jerboa.Params
alias Jerboa.ChannelData
alias Jerboa.Client
alias Jerboa.Client.Credentials
alias Jerboa.Client.Relay
alias Jerboa.Client.Relay.Channel
alias Jerboa.Client.Protocol
... | 34.69218 | 82 | 0.663022 |
85d209df309bc6858b85fd9e675c654a587ab09b | 2,620 | ex | Elixir | lib/nerves_hub/http_client.ex | aadavids/nerves_hub | 504f143381b2cc7c7e76a049febbb590ad5752f1 | [
"Apache-2.0"
] | null | null | null | lib/nerves_hub/http_client.ex | aadavids/nerves_hub | 504f143381b2cc7c7e76a049febbb590ad5752f1 | [
"Apache-2.0"
] | null | null | null | lib/nerves_hub/http_client.ex | aadavids/nerves_hub | 504f143381b2cc7c7e76a049febbb590ad5752f1 | [
"Apache-2.0"
] | null | null | null | defmodule NervesHub.HTTPClient do
@moduledoc false
alias NervesHub.Certificate
alias NervesHub.HTTPClient.Default
@type method :: :get | :put | :post
@type url :: binary()
@type header :: {binary(), binary()}
@type body :: binary()
@type opts :: keyword()
@callback request(method(), url(), [header(... | 24.036697 | 99 | 0.602672 |
85d21d5a0a4eec849122cfd355b97a69eafa0255 | 1,683 | exs | Elixir | impl/ex/test/zipper/list_test.exs | riddler/statifier | 4f4e2d1cdbb0e570a06ddf087caf2f986d1024b5 | [
"MIT"
] | 9 | 2020-08-06T23:45:07.000Z | 2020-12-21T01:47:06.000Z | impl/ex/test/zipper/list_test.exs | riddler/statifier | 4f4e2d1cdbb0e570a06ddf087caf2f986d1024b5 | [
"MIT"
] | 19 | 2020-03-12T03:57:46.000Z | 2020-09-11T03:40:48.000Z | impl/ex/test/zipper/list_test.exs | riddler/statifier | 4f4e2d1cdbb0e570a06ddf087caf2f986d1024b5 | [
"MIT"
] | null | null | null | defmodule Statifier.Zipper.ListTest do
use ExUnit.Case, async: true
alias Statifier.Zipper.List, as: ZList
setup do
zipper = ZList.from_list([1, 2, 3, 4, 5, 6])
{:ok, %{zipper: zipper}}
end
test "can see if anything exists to the right" do
one_item_zipper = ZList.from_list([1])
two_item_zip... | 29.017241 | 79 | 0.68984 |
85d22b2e6dc8ce2f835f17b0105ebb2dca09c4ea | 5,926 | ex | Elixir | lib/ash/actions/create.ex | axelson/ash | 5992fc00f7bdc0ba0ebdb476a5191245145ef7c8 | [
"MIT"
] | null | null | null | lib/ash/actions/create.ex | axelson/ash | 5992fc00f7bdc0ba0ebdb476a5191245145ef7c8 | [
"MIT"
] | null | null | null | lib/ash/actions/create.ex | axelson/ash | 5992fc00f7bdc0ba0ebdb476a5191245145ef7c8 | [
"MIT"
] | null | null | null | defmodule Ash.Actions.Create do
@moduledoc false
require Logger
alias Ash.Actions.Helpers
alias Ash.Engine
alias Ash.Engine.Request
@spec run(Ash.Api.t(), Ash.Changeset.t(), Ash.Resource.Actions.action(), Keyword.t()) ::
{:ok, Ash.Resource.record()} | {:error, term}
def run(api, changeset, act... | 31.026178 | 97 | 0.573743 |
85d26539d7ab19b596a0a5b6ffcd41076d3056ac | 10,760 | exs | Elixir | test/xema/tuple_test.exs | xadhoom/xema | 267fbdbdd30c3e9a99542141d3959dd6cd7f5708 | [
"MIT"
] | 49 | 2018-06-05T09:42:19.000Z | 2022-02-15T12:50:51.000Z | test/xema/tuple_test.exs | xadhoom/xema | 267fbdbdd30c3e9a99542141d3959dd6cd7f5708 | [
"MIT"
] | 152 | 2017-06-11T13:43:06.000Z | 2022-01-09T17:13:45.000Z | test/xema/tuple_test.exs | xadhoom/xema | 267fbdbdd30c3e9a99542141d3959dd6cd7f5708 | [
"MIT"
] | 6 | 2019-05-31T05:41:47.000Z | 2021-12-14T08:09:36.000Z | defmodule Xema.TupleTest do
use ExUnit.Case, async: true
import Xema, only: [valid?: 2, validate: 2]
alias Xema.ValidationError
describe "tuple schema" do
setup do
%{schema: Xema.new(:tuple)}
end
test "validate/2 with an empty tuple", %{schema: schema} do
assert validate(schema, {}) ... | 28.315789 | 93 | 0.50223 |
85d2662258b6a8212fc05185d13fff8b57cc3d1a | 1,093 | ex | Elixir | web/models/tp_action_plan.ex | zombalo/cgrates_web_jsonapi | 47845be4311839fe180cc9f2c7c6795649da4430 | [
"MIT"
] | null | null | null | web/models/tp_action_plan.ex | zombalo/cgrates_web_jsonapi | 47845be4311839fe180cc9f2c7c6795649da4430 | [
"MIT"
] | null | null | null | web/models/tp_action_plan.ex | zombalo/cgrates_web_jsonapi | 47845be4311839fe180cc9f2c7c6795649da4430 | [
"MIT"
] | null | null | null | defmodule CgratesWebJsonapi.TpActionPlan do
use CgratesWebJsonapi.Web, :model
use EctoConditionals, repo: CgratesWebJsonapi.Repo
@attributes ~w[tpid tag actions_tag timing_tag weight]a
use CgratesWebJsonapi.CsvImport, module: __MODULE__, attributes: @attributes
schema "tp_action_plans" do
field :tpid, :... | 31.228571 | 117 | 0.718207 |
85d288ce13e6d5cda48c5372389a09c608c7d3c6 | 1,322 | ex | Elixir | lib/ex_nrel/buildings/cbr.ex | techgaun/ex_nrel | 6a6509903f9340e0d48b88b985ef2aa0eaae4594 | [
"Apache-2.0"
] | null | null | null | lib/ex_nrel/buildings/cbr.ex | techgaun/ex_nrel | 6a6509903f9340e0d48b88b985ef2aa0eaae4594 | [
"Apache-2.0"
] | null | null | null | lib/ex_nrel/buildings/cbr.ex | techgaun/ex_nrel | 6a6509903f9340e0d48b88b985ef2aa0eaae4594 | [
"Apache-2.0"
] | null | null | null | defmodule ExNrel.Buildings.CBR do
@moduledoc """
Commercial Building Resources API wrapper
Please refer to the [Commercial Building Resources](http://developer.nrel.gov/docs/buildings/commercial-building-resource-database-v1/)
## Examples
iex> ExNrel.Buildings.CBR.get(portal: "Energy")
iex> ExNr... | 24.036364 | 137 | 0.642209 |
85d2897c11cea65efa3d1c561fd3f86a2c615740 | 507 | ex | Elixir | lib/grapevine/telnet/client_supervisor.ex | shanesveller/grapevine | fe74ade1adff88dfe4c1ab55fee3902dbb4664fe | [
"MIT"
] | null | null | null | lib/grapevine/telnet/client_supervisor.ex | shanesveller/grapevine | fe74ade1adff88dfe4c1ab55fee3902dbb4664fe | [
"MIT"
] | null | null | null | lib/grapevine/telnet/client_supervisor.ex | shanesveller/grapevine | fe74ade1adff88dfe4c1ab55fee3902dbb4664fe | [
"MIT"
] | null | null | null | defmodule Grapevine.Telnet.ClientSupervisor do
@moduledoc """
A supervisor to look over all web client processes
"""
use DynamicSupervisor
alias Grapevine.Telnet.Client
def start_link(opts) do
DynamicSupervisor.start_link(__MODULE__, [], opts)
end
def start_client(callback_module, opts) do
s... | 22.043478 | 54 | 0.737673 |
85d2cb238152ed177f80e473d1551899178d585c | 4,177 | ex | Elixir | clients/data_labeling/lib/google_api/data_labeling/v1beta1/model/google_cloud_datalabeling_v1p1alpha1_human_annotation_config.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-10-01T09:20:41.000Z | 2021-10-01T09:20:41.000Z | clients/data_labeling/lib/google_api/data_labeling/v1beta1/model/google_cloud_datalabeling_v1p1alpha1_human_annotation_config.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/data_labeling/lib/google_api/data_labeling/v1beta1/model/google_cloud_datalabeling_v1p1alpha1_human_annotation_config.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... | 54.960526 | 375 | 0.726119 |
85d3107776c4dda5a6a413983f34677f5cda2b72 | 2,223 | ex | Elixir | clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/query_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-10-01T09:20:41.000Z | 2021-10-01T09:20:41.000Z | clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/query_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/query_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 44.46 | 308 | 0.761134 |
85d311e0c6dd44ded646eef1811c25da06e342dd | 1,204 | exs | Elixir | test/integration/large_file_test.exs | subvisual/http_stream | 081fb87a7eadc4680560291fb3e39670d47fd115 | [
"0BSD"
] | 11 | 2019-09-13T13:44:52.000Z | 2022-01-27T01:14:06.000Z | test/integration/large_file_test.exs | subvisual/http_stream | 081fb87a7eadc4680560291fb3e39670d47fd115 | [
"0BSD"
] | 2 | 2020-09-29T22:02:21.000Z | 2020-09-30T23:05:48.000Z | test/integration/large_file_test.exs | subvisual/http_stream | 081fb87a7eadc4680560291fb3e39670d47fd115 | [
"0BSD"
] | 1 | 2020-09-22T19:00:36.000Z | 2020-09-22T19:00:36.000Z | defmodule HTTPStream.Integration.LargeFileTest do
use HTTPStream.HTTPCase
alias HTTPStream.HTTPServer.RespondWithFixture
@output_path "out.tif"
describe "large file download" do
@describetag respond_with: RespondWithFixture
test "streaming to another process" do
pid = self()
spawn fn ->... | 23.607843 | 58 | 0.605482 |
85d32998adb307eca942f4d417da1ac28269510b | 1,493 | ex | Elixir | lib/credo/execution/task/initialize_command.ex | andersonmcook/credo | cea1ac63dc378316f5e6dd050165a00e5b20ca2f | [
"MIT"
] | null | null | null | lib/credo/execution/task/initialize_command.ex | andersonmcook/credo | cea1ac63dc378316f5e6dd050165a00e5b20ca2f | [
"MIT"
] | null | null | null | lib/credo/execution/task/initialize_command.ex | andersonmcook/credo | cea1ac63dc378316f5e6dd050165a00e5b20ca2f | [
"MIT"
] | 1 | 2021-07-05T19:04:48.000Z | 2021-07-05T19:04:48.000Z | defmodule Credo.Execution.Task.InitializeCommand do
@moduledoc false
alias Credo.Execution
def call(%Execution{} = exec, _opts) do
command_name = Execution.get_command_name(exec)
command_mod = Execution.get_command(exec, command_name)
init_command(exec, command_mod)
end
defp init_command(exec,... | 28.169811 | 87 | 0.666443 |
85d33a15f357f1628b02c5fd8527a6e5525c863e | 116 | exs | Elixir | test/fixtures/parser/drop_table.exs | maximemenager/strong_migrations | b7e091d2cfed73098d3bf683c7ce5c8ceee3159b | [
"MIT"
] | 23 | 2021-10-29T19:58:35.000Z | 2021-11-13T21:42:45.000Z | test/fixtures/parser/drop_table.exs | maximemenager/strong_migrations | b7e091d2cfed73098d3bf683c7ce5c8ceee3159b | [
"MIT"
] | 1 | 2021-10-31T03:57:47.000Z | 2021-10-31T14:33:45.000Z | test/fixtures/parser/drop_table.exs | surgeventures/strong_migrations | 3c82e34a6e7a372c6de17ba7a0b07da7664baa26 | [
"MIT"
] | 3 | 2021-10-31T02:14:10.000Z | 2021-11-09T08:07:22.000Z | defmodule DropTable do
@moduledoc false
use Ecto.Migration
def change do
drop(table("posts"))
end
end
| 11.6 | 24 | 0.698276 |
85d34618e5c77aafca54c0dc07ead281223cd3d2 | 562 | ex | Elixir | lib/controller/controller.ex | JVZELLER/sistema-financeiro | 98ed39019219f5c0065912fe3be2f9e33e10cf41 | [
"MIT"
] | 2 | 2020-04-01T02:35:59.000Z | 2021-07-26T05:21:01.000Z | lib/controller/controller.ex | JVZELLER/sistema-financeiro | 98ed39019219f5c0065912fe3be2f9e33e10cf41 | [
"MIT"
] | null | null | null | lib/controller/controller.ex | JVZELLER/sistema-financeiro | 98ed39019219f5c0065912fe3be2f9e33e10cf41 | [
"MIT"
] | null | null | null | defmodule SistemaFinanceiro.Controller do
@moduledoc """
A controller to receive incoming calls/requests from our view, parse/adapt the data if necessary
and bypass to the service layer
"""
alias SistemaFinanceiro.AccountService
def list_accounts do
AccountService.list()
end
def split_money(accou... | 26.761905 | 98 | 0.788256 |
85d3481452b7e027e616727a8c78daac6bf77262 | 7,021 | ex | Elixir | lib/bonny_plug/admission_review/request.ex | ufirstgroup/bonny_plug | 4f2b49fd6d3db245745a9b1073be7328721cdb53 | [
"MIT"
] | 6 | 2020-11-09T15:02:45.000Z | 2021-04-17T12:50:25.000Z | lib/bonny_plug/admission_review/request.ex | ufirstgroup/bonny_plug | 4f2b49fd6d3db245745a9b1073be7328721cdb53 | [
"MIT"
] | 44 | 2020-12-14T06:55:48.000Z | 2022-03-28T02:04:08.000Z | lib/bonny_plug/admission_review/request.ex | ufirstgroup/bonny_plug | 4f2b49fd6d3db245745a9b1073be7328721cdb53 | [
"MIT"
] | null | null | null | defmodule BonnyPlug.AdmissionReview.Request do
@moduledoc """
Helper functions for admission review request handling. This module is imported when using `WebhookHandler`.
"""
alias BonnyPlug.AdmissionReview
@doc """
Responds by allowing the operation
## Examples
iex> admission_review = %BonnyPlu... | 57.54918 | 387 | 0.654038 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.