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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1891df156719362fbc9fde655b7fd34d30146600 | 1,515 | ex | Elixir | lib/mysimplelist_web/live/user_live/form_component.ex | ScorpionResponse/mysimplelist | 3c792373cc372ab5e196fe109b9dae68b97b7220 | [
"Apache-2.0"
] | null | null | null | lib/mysimplelist_web/live/user_live/form_component.ex | ScorpionResponse/mysimplelist | 3c792373cc372ab5e196fe109b9dae68b97b7220 | [
"Apache-2.0"
] | null | null | null | lib/mysimplelist_web/live/user_live/form_component.ex | ScorpionResponse/mysimplelist | 3c792373cc372ab5e196fe109b9dae68b97b7220 | [
"Apache-2.0"
] | null | null | null | defmodule MysimplelistWeb.UserLive.FormComponent do
use MysimplelistWeb, :live_component
alias Mysimplelist.Accounts
@impl true
def update(%{user: user} = assigns, socket) do
changeset = Accounts.change_user(user)
{:ok,
socket
|> assign(assigns)
|> assign(:changeset, changeset)}
end
... | 27.053571 | 67 | 0.642244 |
1891f3aa1e4c115b1a0e6e3a0b63485908a2b0e0 | 14,710 | exs | Elixir | apps/admin_api/test/admin_api/v1/controllers/provider_auth/exchange_pair_controller_test.exs | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | null | null | null | apps/admin_api/test/admin_api/v1/controllers/provider_auth/exchange_pair_controller_test.exs | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | null | null | null | apps/admin_api/test/admin_api/v1/controllers/provider_auth/exchange_pair_controller_test.exs | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | null | null | null | defmodule AdminAPI.V1.ProviderAuth.ExchangePairControllerTest do
use AdminAPI.ConnCase, async: true
alias EWalletDB.{ExchangePair, Repo}
describe "/exchange_pair.all" do
test "returns a list of exchange pairs and pagination data" do
response = provider_request("/exchange_pair.all")
# Asserts ret... | 36.410891 | 99 | 0.645139 |
1891f71701d0cf1ad9ec91b1cbf1a5189798978c | 3,357 | ex | Elixir | lib/bowling_kata.ex | Philpenhas/bowlingkata-phil | 7391aa7197bebb59a17ede5d7464caead7db1861 | [
"MIT"
] | null | null | null | lib/bowling_kata.ex | Philpenhas/bowlingkata-phil | 7391aa7197bebb59a17ede5d7464caead7db1861 | [
"MIT"
] | null | null | null | lib/bowling_kata.ex | Philpenhas/bowlingkata-phil | 7391aa7197bebb59a17ede5d7464caead7db1861 | [
"MIT"
] | null | null | null | defmodule Frame do
defstruct type: :scored, rolls: []
end
defmodule BowlingGame do
defstruct frames: []
end
defmodule BowlingKata do
def parse_input(""), do: []
def parse_input(:nil), do: []
def parse_input(rolls) do
rolls
|> String.upcase
|> String.graphemes
|> parse_frame(%BowlingGa... | 32.278846 | 85 | 0.624665 |
18922f726876e0e6f078d80d921c9445a141de67 | 1,134 | ex | Elixir | lib/timber/utils/map.ex | girishramnani/timber-elixir | 7fda5c3cb5e765a34524d2ec21cfbd5b30240bd5 | [
"ISC"
] | null | null | null | lib/timber/utils/map.ex | girishramnani/timber-elixir | 7fda5c3cb5e765a34524d2ec21cfbd5b30240bd5 | [
"ISC"
] | null | null | null | lib/timber/utils/map.ex | girishramnani/timber-elixir | 7fda5c3cb5e765a34524d2ec21cfbd5b30240bd5 | [
"ISC"
] | null | null | null | defmodule Timber.Utils.Map do
@moduledoc false
def deep_from_struct(%{__struct__: _mod} = struct) do
struct
|> Map.from_struct()
|> deep_from_struct()
end
def deep_from_struct(map) when is_map(map) do
map
|> Enum.reduce(%{}, fn
{k, %DateTime{} = v}, acc ->
Map.put(acc, k, Dat... | 22.68 | 62 | 0.551146 |
18923308d02ce8c3df21d56f3f17be4d2d38abbc | 4,876 | ex | Elixir | lib/sqlite_ecto.ex | danielspofford/sqlite_ecto2 | 7ba0b627108b0e1eb73d46741210bd7a11d4fd8b | [
"MIT"
] | 62 | 2017-01-13T21:01:39.000Z | 2018-07-24T12:57:01.000Z | lib/sqlite_ecto.ex | danielspofford/sqlite_ecto2 | 7ba0b627108b0e1eb73d46741210bd7a11d4fd8b | [
"MIT"
] | 206 | 2016-12-24T01:56:29.000Z | 2018-06-18T01:47:50.000Z | lib/sqlite_ecto.ex | danielspofford/sqlite_ecto2 | 7ba0b627108b0e1eb73d46741210bd7a11d4fd8b | [
"MIT"
] | 27 | 2018-12-22T04:02:30.000Z | 2021-02-18T20:20:57.000Z | defmodule Sqlite.Ecto2 do
@moduledoc ~S"""
Ecto Adapter module for SQLite.
It uses Sqlitex and Esqlite for accessing the SQLite database.
## Configuration Options
When creating an `Ecto.Repo` that uses a SQLite database, you should configure
it as follows:
```elixir
# In your config/config.exs file
... | 30.860759 | 96 | 0.628384 |
189242ace25061377f2e5c621e39ec72e24f71de | 1,911 | exs | Elixir | myApp/config/dev.exs | CaptainAwesomeDi/unnamedproject | 1b2bbdbc9774a073e70eb8fcd255339d7a36df70 | [
"MIT"
] | null | null | null | myApp/config/dev.exs | CaptainAwesomeDi/unnamedproject | 1b2bbdbc9774a073e70eb8fcd255339d7a36df70 | [
"MIT"
] | null | null | null | myApp/config/dev.exs | CaptainAwesomeDi/unnamedproject | 1b2bbdbc9774a073e70eb8fcd255339d7a36df70 | [
"MIT"
] | null | null | null | use Mix.Config
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with brunch.io to recompile .js and .css sources.
config :myApp, MyAppWeb.Endpoint,
http: [port: 4000],... | 32.389831 | 170 | 0.700157 |
189255732da9967f101612bd42a91ffe9d6c1452 | 606 | ex | Elixir | lib/plausible/auth/invitation.ex | plausible-insights/plausible | 88173342b9e969894879bfb2e8d203426f6a1b1c | [
"MIT"
] | 984 | 2019-09-02T11:36:41.000Z | 2020-06-08T06:25:48.000Z | lib/plausible/auth/invitation.ex | plausible-insights/plausible | 88173342b9e969894879bfb2e8d203426f6a1b1c | [
"MIT"
] | 24 | 2019-09-10T09:53:17.000Z | 2020-06-08T07:35:26.000Z | lib/plausible/auth/invitation.ex | plausible-insights/plausible | 88173342b9e969894879bfb2e8d203426f6a1b1c | [
"MIT"
] | 51 | 2019-09-03T10:48:10.000Z | 2020-06-07T00:23:34.000Z | defmodule Plausible.Auth.Invitation do
use Ecto.Schema
import Ecto.Changeset
@derive {Jason.Encoder, only: [:invitation_id, :role, :site]}
@required [:email, :role, :site_id, :inviter_id]
schema "invitations" do
field :invitation_id, :string
field :email, :string
field :role, Ecto.Enum, values: [... | 25.25 | 63 | 0.681518 |
189268e26f40c17a7e403403ea03d7cc488d7268 | 680 | ex | Elixir | lib/vex/error_renderers/parameterized.ex | Apelsinka223/vex | dfd399724f7950d91fe6d894bb5a02e3d27bfa24 | [
"MIT"
] | null | null | null | lib/vex/error_renderers/parameterized.ex | Apelsinka223/vex | dfd399724f7950d91fe6d894bb5a02e3d27bfa24 | [
"MIT"
] | null | null | null | lib/vex/error_renderers/parameterized.ex | Apelsinka223/vex | dfd399724f7950d91fe6d894bb5a02e3d27bfa24 | [
"MIT"
] | null | null | null | defmodule Vex.ErrorRenderers.Parameterized do
@behaviour Vex.ErrorRenderer
@doc """
## Examples
iex> Vex.ErrorRenderers.Parameterized.message(nil, "default")
[message: "default", context: []]
iex> Vex.ErrorRenderers.Parameterized.message([message: "override"], "default")
[message: "over... | 34 | 108 | 0.663235 |
1892693d36c67d2615e66bf1a05eb32d88547e82 | 512 | exs | Elixir | priv/repo/migrations/20161114231216_create_championship_result.exs | axelclark/ex338 | 3fb3c260d93bda61f7636ee1a677770d2dc1b89a | [
"MIT"
] | 17 | 2016-12-22T06:39:26.000Z | 2021-01-20T13:51:13.000Z | priv/repo/migrations/20161114231216_create_championship_result.exs | axelclark/ex338 | 3fb3c260d93bda61f7636ee1a677770d2dc1b89a | [
"MIT"
] | 608 | 2016-08-06T18:57:58.000Z | 2022-03-01T02:48:17.000Z | priv/repo/migrations/20161114231216_create_championship_result.exs | axelclark/ex338 | 3fb3c260d93bda61f7636ee1a677770d2dc1b89a | [
"MIT"
] | 6 | 2017-11-21T22:35:45.000Z | 2022-01-11T21:37:40.000Z | defmodule Ex338.Repo.Migrations.CreateChampionshipResult do
use Ecto.Migration
def change do
create table(:championship_results) do
add :rank, :integer
add :points, :integer
add :championship_id, references(:championships, on_delete: :nothing)
add :fantasy_player_id, references(:fantasy... | 28.444444 | 79 | 0.732422 |
18928298b8c75b388f8fe961c4b49b1d1fef396a | 2,261 | ex | Elixir | lib/astarte_data_updater_plant/value_match_operators.ex | rbino/astarte_data_updater_plant | b1769207636fad9f91fdcad4ed768757af09683f | [
"Apache-2.0"
] | 191 | 2018-03-30T13:23:08.000Z | 2022-03-02T12:05:32.000Z | lib/astarte_data_updater_plant/value_match_operators.ex | rbino/astarte_data_updater_plant | b1769207636fad9f91fdcad4ed768757af09683f | [
"Apache-2.0"
] | 402 | 2018-03-30T13:37:00.000Z | 2022-03-31T16:47:10.000Z | lib/astarte_data_updater_plant/value_match_operators.ex | rbino/astarte_data_updater_plant | b1769207636fad9f91fdcad4ed768757af09683f | [
"Apache-2.0"
] | 24 | 2018-03-30T13:29:48.000Z | 2022-02-28T11:10:26.000Z | #
# This file is part of Astarte.
#
# Copyright 2017 Ispirata Srl
#
# 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 appl... | 29.75 | 98 | 0.766917 |
18928b626fc21e1286bba246d7dac6e7a51f5fea | 3,536 | ex | Elixir | lib/tesla_api/middleware/follow_redirects.ex | jschollenberger/teslamate | a2129b1457ee42399cfedb78cdd6cc618ff691b1 | [
"MIT"
] | 1 | 2021-05-04T18:06:35.000Z | 2021-05-04T18:06:35.000Z | lib/tesla_api/middleware/follow_redirects.ex | jschollenberger/teslamate | a2129b1457ee42399cfedb78cdd6cc618ff691b1 | [
"MIT"
] | 171 | 2020-07-08T18:42:57.000Z | 2022-03-23T00:55:30.000Z | lib/tesla_api/middleware/follow_redirects.ex | jschollenberger/teslamate | a2129b1457ee42399cfedb78cdd6cc618ff691b1 | [
"MIT"
] | null | null | null | defmodule TeslaApi.Middleware.FollowRedirects do
@moduledoc """
Follow 3xx redirects
Source: https://github.com/teamon/tesla/blob/master/lib/tesla/middleware/follow_redirects.ex
## Example
```
defmodule MyClient do
use Tesla
plug Tesla.Middleware.FollowRedirects, max_redirects: 3, except: ["http... | 32.145455 | 94 | 0.628111 |
189296d9ac4c553e2e15792dd6e7a43840327e32 | 3,754 | exs | Elixir | lib/ex_unit/test/ex_unit/supervised_test.exs | andrewtimberlake/elixir | a1c4ffc897f9407fe7e739e20e697805fbbff810 | [
"Apache-2.0"
] | 1 | 2019-10-11T01:36:26.000Z | 2019-10-11T01:36:26.000Z | lib/ex_unit/test/ex_unit/supervised_test.exs | andrewtimberlake/elixir | a1c4ffc897f9407fe7e739e20e697805fbbff810 | [
"Apache-2.0"
] | 1 | 2015-06-09T15:52:43.000Z | 2015-06-09T15:52:43.000Z | lib/ex_unit/test/ex_unit/supervised_test.exs | andrewtimberlake/elixir | a1c4ffc897f9407fe7e739e20e697805fbbff810 | [
"Apache-2.0"
] | null | null | null | Code.require_file("../test_helper.exs", __DIR__)
defmodule ExUnit.SupervisedTest do
use ExUnit.Case, async: true
defmodule MyAgent do
use Agent
def start_link(:error) do
{:error, "some error"}
end
def start_link(:exception) do
raise "some exception"
end
def start_link(arg) d... | 29.793651 | 97 | 0.664358 |
1892b1ecd5a890cd70db67dcee419541fa5360a7 | 240 | ex | Elixir | elixir/lib/aldash.ex | cronokirby/aldash | 3d38c38a4910e800e74b7edbad618f3e817f402c | [
"MIT"
] | null | null | null | elixir/lib/aldash.ex | cronokirby/aldash | 3d38c38a4910e800e74b7edbad618f3e817f402c | [
"MIT"
] | null | null | null | elixir/lib/aldash.ex | cronokirby/aldash | 3d38c38a4910e800e74b7edbad618f3e817f402c | [
"MIT"
] | null | null | null | defmodule Aldash do
use Application
def start(_type, _args) do
children = [
Plug.Adapters.Cowboy.child_spec(:http, Aldash.Router, [], port: 8080)
]
Supervisor.start_link(children, strategy: :one_for_one)
end
end
| 17.142857 | 75 | 0.683333 |
1892b8b565b3fdfffd13e775317dfbbfb44d554b | 677 | ex | Elixir | lib/bitcoin/protocol/messages/pong.ex | anthdm/bitcoin-elixir | 5ca9f8bf4e9b2b38527670e80568a85e0aa612c0 | [
"Apache-2.0"
] | 81 | 2017-04-20T17:42:59.000Z | 2022-02-08T03:49:22.000Z | lib/bitcoin/protocol/messages/pong.ex | anthdm/bitcoin-elixir | 5ca9f8bf4e9b2b38527670e80568a85e0aa612c0 | [
"Apache-2.0"
] | 2 | 2019-04-22T04:24:39.000Z | 2019-04-26T07:03:59.000Z | lib/bitcoin/protocol/messages/pong.ex | anthdm/bitcoin-elixir | 5ca9f8bf4e9b2b38527670e80568a85e0aa612c0 | [
"Apache-2.0"
] | 22 | 2017-08-16T14:19:44.000Z | 2021-12-22T04:36:57.000Z | defmodule Bitcoin.Protocol.Messages.Pong do
@moduledoc """
The pong message is sent in response to a ping message. In modern protocol versions, a pong response is generated
using a nonce included in the ping.
https://en.bitcoin.it/wiki/Protocol_specification#pong
"""
defstruct nonce: 0 # nonce from... | 19.911765 | 117 | 0.66322 |
1892d75c38cdabcb741f06d577aff7633fa06c7e | 2,137 | ex | Elixir | clients/deployment_manager/lib/google_api/deployment_manager/v2/model/resource_update_warnings.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/deployment_manager/lib/google_api/deployment_manager/v2/model/resource_update_warnings.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/deployment_manager/lib/google_api/deployment_manager/v2/model/resource_update_warnings.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 40.320755 | 252 | 0.729995 |
1892e7743408ae2b5da1ed59628d7bf828aacfc3 | 366 | ex | Elixir | lib/exmapper/secure_random.ex | kepit/exmapper | a513ac2f9ae5be2114911b0531003950b5c55a33 | [
"MIT"
] | 1 | 2015-10-09T05:43:34.000Z | 2015-10-09T05:43:34.000Z | lib/exmapper/secure_random.ex | kepit/exmapper | a513ac2f9ae5be2114911b0531003950b5c55a33 | [
"MIT"
] | 1 | 2016-04-13T14:25:27.000Z | 2016-04-13T14:25:27.000Z | lib/exmapper/secure_random.ex | kepit/exmapper | a513ac2f9ae5be2114911b0531003950b5c55a33 | [
"MIT"
] | null | null | null | # borrowed from https://gist.github.com/Myuzu/7367461
defmodule Exmapper.Utils.SecureRandom do
def hex(n) when is_integer(n) do
random_bytes(n)
|> Enum.map(fn (x) -> Integer.to_string(x, 16) end)
|> Enum.join
|> String.downcase
end
def random_bytes(n) when is_integer(n) do
:erlang.binary_to... | 22.875 | 56 | 0.696721 |
18932574997a4131268e3b67fdac8efb37e05b0f | 137 | exs | Elixir | config/dev.exs | venndr/open_exchange_rates | 1e679ac05d8ac924a7329543ec61bd92a0a646ba | [
"MIT"
] | 5 | 2016-08-07T13:57:56.000Z | 2020-10-05T17:17:17.000Z | config/dev.exs | venndr/open_exchange_rates | 1e679ac05d8ac924a7329543ec61bd92a0a646ba | [
"MIT"
] | null | null | null | config/dev.exs | venndr/open_exchange_rates | 1e679ac05d8ac924a7329543ec61bd92a0a646ba | [
"MIT"
] | 5 | 2018-07-01T17:41:40.000Z | 2021-03-31T19:06:47.000Z | use Mix.Config
config :open_exchange_rates,
app_id: System.get_env("OER_APP_ID"),
cache_time_in_minutes: 1440,
auto_update: true
| 17.125 | 39 | 0.773723 |
189381546c38465167c1244bad1604613ea0bb3e | 5,641 | exs | Elixir | test/unit/discovery_api_web/controllers/data_controller_preview_test.exs | PillarTechnology/discovery_api | ee4b91ff492af72cb1d7867775d6cc41c12a43f3 | [
"Apache-2.0"
] | null | null | null | test/unit/discovery_api_web/controllers/data_controller_preview_test.exs | PillarTechnology/discovery_api | ee4b91ff492af72cb1d7867775d6cc41c12a43f3 | [
"Apache-2.0"
] | null | null | null | test/unit/discovery_api_web/controllers/data_controller_preview_test.exs | PillarTechnology/discovery_api | ee4b91ff492af72cb1d7867775d6cc41c12a43f3 | [
"Apache-2.0"
] | null | null | null | defmodule DiscoveryApiWeb.DataController.PreviewTest do
use DiscoveryApiWeb.ConnCase
use Placebo
alias DiscoveryApi.Data.Model
alias DiscoveryApi.Services.PrestoService
alias DiscoveryApiWeb.Utilities.JsonFieldDecoder
@dataset_id "1234-4567-89101"
@system_name "foobar__company_data"
describe "preview ... | 33.577381 | 138 | 0.568693 |
1893ad25fa5c4117082d00afe930459c803521c6 | 500 | ex | Elixir | lib/mgp/sales/op_stock.ex | imprest/mgp | 61457315243d0e0c26713601b9930ca34a116a16 | [
"MIT"
] | null | null | null | lib/mgp/sales/op_stock.ex | imprest/mgp | 61457315243d0e0c26713601b9930ca34a116a16 | [
"MIT"
] | 2 | 2020-12-22T12:30:58.000Z | 2021-05-19T10:07:26.000Z | lib/mgp/sales/op_stock.ex | imprest/mgp | 61457315243d0e0c26713601b9930ca34a116a16 | [
"MIT"
] | null | null | null | defmodule Mgp.Sales.OpStock do
use Ecto.Schema
import Ecto.Changeset
alias Mgp.Sales.OpStock
alias Mgp.Sales.Product
@primary_key false
schema "op_stocks" do
field(:year, :integer)
field(:location, :string)
field(:op_qty, :integer)
belongs_to(:product, Product, type: :string)
end
@doc ... | 22.727273 | 53 | 0.678 |
1893af6e4ba5c9d38c0409d64b5d217cf8382bfc | 2,144 | ex | Elixir | lib/edgedb/types/set.ex | f0lio/edgedb-elixir | b285bd8037b0b951aabfa1d1733889880f8bfd66 | [
"MIT"
] | null | null | null | lib/edgedb/types/set.ex | f0lio/edgedb-elixir | b285bd8037b0b951aabfa1d1733889880f8bfd66 | [
"MIT"
] | null | null | null | lib/edgedb/types/set.ex | f0lio/edgedb-elixir | b285bd8037b0b951aabfa1d1733889880f8bfd66 | [
"MIT"
] | null | null | null | defmodule EdgeDB.Set do
@moduledoc """
A representation of an immutable set of values returned by a query.
Nested sets in the result are also returned as `EdgeDB.Set` objects.
`EdgeDB.Set` implements `Enumerable` protocol for iterating over set values.
```elixir
iex(1)> {:ok, pid} = EdgeDB.start_link()
... | 24.089888 | 140 | 0.627332 |
1893cbb9af523bde1b6652893d80fb4df4a1675b | 1,791 | ex | Elixir | lib/inspector_gadget/pipe.ex | expede/inspector_gadget | 05b5477919f9c0dd59243642412bb56cd5a829ad | [
"MIT"
] | 7 | 2017-01-02T13:00:04.000Z | 2019-04-19T18:36:10.000Z | lib/inspector_gadget/pipe.ex | expede/inspector_gadget | 05b5477919f9c0dd59243642412bb56cd5a829ad | [
"MIT"
] | 1 | 2017-01-23T15:14:45.000Z | 2017-03-10T04:24:17.000Z | lib/inspector_gadget/pipe.ex | expede/inspector_gadget | 05b5477919f9c0dd59243642412bb56cd5a829ad | [
"MIT"
] | null | null | null | defmodule InspectorGadget.Pipe do
@moduledoc """
Alternative pipe function that emits a stream of logs with the current state
"""
import Kernel, except: [|>: 2]
@type ast :: {atom, list, list}
defmacro __using__(_) do
quote do
import Kernel, except: [|>: 2]
import unquote(__MODULE__)
... | 27.136364 | 79 | 0.572864 |
1893cffb56bed766f2d35b05b8f8fc14f114b80a | 149 | ex | Elixir | lib/abnf_parsec/errors.ex | szTheory/abnf_parsec | b3111d517e852244233b4518eeb8e1434da3ce5e | [
"MIT"
] | 34 | 2020-02-09T12:26:14.000Z | 2022-01-15T00:05:13.000Z | lib/abnf_parsec/errors.ex | szTheory/abnf_parsec | b3111d517e852244233b4518eeb8e1434da3ce5e | [
"MIT"
] | 10 | 2020-02-09T13:14:08.000Z | 2022-03-24T21:55:52.000Z | lib/abnf_parsec/errors.ex | szTheory/abnf_parsec | b3111d517e852244233b4518eeb8e1434da3ce5e | [
"MIT"
] | 3 | 2020-02-16T22:47:09.000Z | 2020-12-25T09:07:59.000Z | defmodule AbnfParsec.LeftoverTokenError do
defexception [:message]
end
defmodule AbnfParsec.UnexpectedTokenError do
defexception [:message]
end
| 18.625 | 44 | 0.832215 |
1893e760f9af2dadc90decfc01ce4eb9be869540 | 1,616 | exs | Elixir | test/oban/senator_test.exs | chrismo/oban | f912ccf75a1d89e02229041d578f9263d4de0232 | [
"Apache-2.0"
] | null | null | null | test/oban/senator_test.exs | chrismo/oban | f912ccf75a1d89e02229041d578f9263d4de0232 | [
"Apache-2.0"
] | null | null | null | test/oban/senator_test.exs | chrismo/oban | f912ccf75a1d89e02229041d578f9263d4de0232 | [
"Apache-2.0"
] | null | null | null | defmodule Oban.SenatorTest do
use Oban.Case, async: true
alias Oban.{Config, Connection, Registry, Senator}
property "only a single senator is leader" do
check all key <- positive_integer(),
stop <- one_of([:conn, :both]),
names <- uniq_list_of(atom(:alias), min_length: 2),
... | 30.490566 | 96 | 0.636139 |
189421726fe9408e15b72413b52939569c21c938 | 1,319 | ex | Elixir | lib/siwapp/invoices/payment.ex | jakon89/siwapp | b5f8fd43458deae72c76e434ed0c63b620cb97a4 | [
"MIT"
] | 4 | 2015-02-12T09:23:47.000Z | 2022-03-09T18:11:06.000Z | lib/siwapp/invoices/payment.ex | jakon89/siwapp | b5f8fd43458deae72c76e434ed0c63b620cb97a4 | [
"MIT"
] | 254 | 2021-12-09T14:40:41.000Z | 2022-03-31T08:09:37.000Z | lib/siwapp/invoices/payment.ex | jakon89/siwapp | b5f8fd43458deae72c76e434ed0c63b620cb97a4 | [
"MIT"
] | 1 | 2022-03-07T10:25:49.000Z | 2022-03-07T10:25:49.000Z | defmodule Siwapp.Invoices.Payment do
@moduledoc """
Payment
"""
use Ecto.Schema
import Ecto.Changeset
import Siwapp.Invoices.AmountHelper
alias Siwapp.Invoices.Invoice
@fields [
:date,
:amount,
:notes,
:invoice_id,
:virtual_amount
]
@type t :: %__MODULE__{
id: pos_int... | 23.553571 | 68 | 0.620925 |
189441d2105f31efa1ce3e2c253f62994bb265a4 | 109 | exs | Elixir | .formatter.exs | nulian/ex_microsoft_azure_storage | b147de024ceb1fd21d617863a9c53c41263700a6 | [
"MIT"
] | null | null | null | .formatter.exs | nulian/ex_microsoft_azure_storage | b147de024ceb1fd21d617863a9c53c41263700a6 | [
"MIT"
] | null | null | null | .formatter.exs | nulian/ex_microsoft_azure_storage | b147de024ceb1fd21d617863a9c53c41263700a6 | [
"MIT"
] | null | null | null | # Used by "mix format"
[
import_deps: [:tesla],
inputs: ["mix.exs", "{config,lib,test}/**/*.{ex,exs}"]
]
| 18.166667 | 56 | 0.559633 |
18944543985f2ea2cb9b745fd312899bb573ca26 | 494 | exs | Elixir | config/test.exs | albydarned/shorten | af4f870dbb0f9c3b0699712cc27370e83ed3a730 | [
"MIT"
] | 3 | 2018-09-14T16:16:11.000Z | 2019-07-12T22:25:50.000Z | config/test.exs | albydarned/shorten | af4f870dbb0f9c3b0699712cc27370e83ed3a730 | [
"MIT"
] | null | null | null | config/test.exs | albydarned/shorten | af4f870dbb0f9c3b0699712cc27370e83ed3a730 | [
"MIT"
] | 1 | 2019-07-12T22:25:53.000Z | 2019-07-12T22:25:53.000Z | use Mix.Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :shorten, ShortenWeb.Endpoint,
http: [port: 4001],
server: false
# Print only warnings and errors during test
config :logger, level: :warn
# Configure your database
config :shorten, Shorten.Re... | 24.7 | 56 | 0.734818 |
1894863c5f66ab12716c79cada33baff16673d57 | 14,877 | exs | Elixir | test/utilities/texture_test.exs | jpunie/scenic | 6167639a1cf064635170a448dada562c7f5d13e8 | [
"Apache-2.0"
] | 1,716 | 2018-09-07T21:55:43.000Z | 2022-03-31T16:16:30.000Z | test/utilities/texture_test.exs | jpunie/scenic | 6167639a1cf064635170a448dada562c7f5d13e8 | [
"Apache-2.0"
] | 220 | 2018-09-08T01:28:00.000Z | 2022-03-22T03:55:17.000Z | test/utilities/texture_test.exs | jpunie/scenic | 6167639a1cf064635170a448dada562c7f5d13e8 | [
"Apache-2.0"
] | 137 | 2018-09-07T21:55:56.000Z | 2022-03-26T04:07:27.000Z | #
# Created by Boyd Multerer on 2017-05-07.
# Copyright © 2017 Kry10 Industries. All rights reserved.
#
defmodule Scenic.Utilities.TextureTest do
use ExUnit.Case, async: true
doctest Scenic.Utilities.Texture
alias Scenic.Utilities.Texture
@width 11
@height 13
# ========================================... | 30.801242 | 95 | 0.533105 |
189496467742987700c40bbdca948f0b548b877c | 2,094 | ex | Elixir | clients/health_care/lib/google_api/health_care/v1beta1/model/google_cloud_healthcare_v1beta1_fhir_rest_import_resources_response.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/health_care/lib/google_api/health_care/v1beta1/model/google_cloud_healthcare_v1beta1_fhir_rest_import_resources_response.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/health_care/lib/google_api/health_care/v1beta1/model/google_cloud_healthcare_v1beta1_fhir_rest_import_resources_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... | 33.774194 | 132 | 0.746896 |
1894d3d5d144cc8167fea67e6b839df7b104bfb6 | 1,217 | ex | Elixir | config/dispatcher/dispatcher.ex | big-data-europe/app-stack-builder | 621cdfebabc243322489618ac0923f2f9d52b1db | [
"MIT"
] | 5 | 2017-06-07T02:36:26.000Z | 2019-11-02T20:17:53.000Z | config/dispatcher/dispatcher.ex | big-data-europe/app-stack-builder | 621cdfebabc243322489618ac0923f2f9d52b1db | [
"MIT"
] | 1 | 2018-04-05T20:13:26.000Z | 2018-04-14T09:36:21.000Z | config/dispatcher/dispatcher.ex | big-data-europe/app-stack-builder | 621cdfebabc243322489618ac0923f2f9d52b1db | [
"MIT"
] | 1 | 2018-03-28T04:29:29.000Z | 2018-03-28T04:29:29.000Z | defmodule Dispatcher do
use Plug.Router
def start(_argv) do
port = 80
IO.puts "Starting Plug with Cowboy on port #{port}"
Plug.Adapters.Cowboy.http __MODULE__, [], port: port
:timer.sleep(:infinity)
end
plug Plug.Logger
plug :match
plug :dispatch
# In order to forward the 'themes' resou... | 24.34 | 72 | 0.680362 |
189527f2845464b54a3f9ee04f5148e188f951bd | 3,098 | exs | Elixir | apps/omg_status/test/omg_status/alert/alarm_printer_test.exs | omisego/elixir-omg | 2c68973d8f29033d137f63a6e060f12e2a7dcd59 | [
"Apache-2.0"
] | 177 | 2018-08-24T03:51:02.000Z | 2020-05-30T13:29:25.000Z | apps/omg_status/test/omg_status/alert/alarm_printer_test.exs | omisego/elixir-omg | 2c68973d8f29033d137f63a6e060f12e2a7dcd59 | [
"Apache-2.0"
] | 1,042 | 2018-08-25T00:52:39.000Z | 2020-06-01T05:15:17.000Z | apps/omg_status/test/omg_status/alert/alarm_printer_test.exs | omisego/elixir-omg | 2c68973d8f29033d137f63a6e060f12e2a7dcd59 | [
"Apache-2.0"
] | 47 | 2018-08-24T12:06:33.000Z | 2020-04-28T11:49:25.000Z | # Copyright 2019-2020 OMG Network Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 39.21519 | 115 | 0.614913 |
18952fd6c09d156d0b092b96be016507d263c226 | 627 | exs | Elixir | projects/stack/mix.exs | renanlage/programming-elixir-book | 71e58398269cde2b76a377d28cc906fb528c4134 | [
"MIT"
] | 8 | 2018-08-26T08:10:08.000Z | 2021-04-05T16:05:05.000Z | projects/stack/mix.exs | renanlage/programming-elixir-book | 71e58398269cde2b76a377d28cc906fb528c4134 | [
"MIT"
] | null | null | null | projects/stack/mix.exs | renanlage/programming-elixir-book | 71e58398269cde2b76a377d28cc906fb528c4134 | [
"MIT"
] | 1 | 2019-10-08T09:56:43.000Z | 2019-10-08T09:56:43.000Z | defmodule Stack.Mixfile do
use Mix.Project
def project do
[
app: :stack,
version: "0.1.0",
elixir: "~> 1.5",
start_permanent: Mix.env == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
mod: {Stack, []},
... | 20.225806 | 88 | 0.555024 |
1895402746eb1a72583d1a19a9c9c57071ceb391 | 2,259 | ex | Elixir | lib/ex_aws/dynamo/decoder.ex | Frameio/ex_aws | 3b335b6ed7932b5cf991323d26cf5497e1e6c122 | [
"Unlicense",
"MIT"
] | null | null | null | lib/ex_aws/dynamo/decoder.ex | Frameio/ex_aws | 3b335b6ed7932b5cf991323d26cf5497e1e6c122 | [
"Unlicense",
"MIT"
] | null | null | null | lib/ex_aws/dynamo/decoder.ex | Frameio/ex_aws | 3b335b6ed7932b5cf991323d26cf5497e1e6c122 | [
"Unlicense",
"MIT"
] | 1 | 2021-01-22T12:16:23.000Z | 2021-01-22T12:16:23.000Z | defmodule ExAws.Dynamo.Decoder do
@doc """
Decodes a dynamo response into a struct.
If Dynamo.Decodable is implemented for the struct it will be called
after the completion of the coercion.
This is important for handling nested maps if you wanted the nested maps
to have atom keys.
"""
def decode(item,... | 32.271429 | 86 | 0.63745 |
18958b39303c8a325a7bafca4936cc85aea5648c | 2,134 | ex | Elixir | lib/cased/test_helper.ex | cased/cased-elixir | a19a4c5d6dec3374c1067a908b357db798cfb2c8 | [
"MIT"
] | 3 | 2021-02-06T01:41:33.000Z | 2021-07-09T21:19:06.000Z | lib/cased/test_helper.ex | cased/cased-elixir | a19a4c5d6dec3374c1067a908b357db798cfb2c8 | [
"MIT"
] | 1 | 2021-07-09T20:34:35.000Z | 2021-07-09T20:35:29.000Z | lib/cased/test_helper.ex | cased/cased-elixir | a19a4c5d6dec3374c1067a908b357db798cfb2c8 | [
"MIT"
] | 2 | 2021-03-05T22:52:16.000Z | 2021-03-18T13:18:30.000Z | defmodule Cased.TestHelper do
@moduledoc """
Provides helper functions for testing Cased features.
"""
import ExUnit.Assertions
@doc """
Asserts that a specific `count` of Cased events were published to `publisher` when evaluating `fun`.
"""
@spec assert_publishes_cased_events(
publisher :: ... | 27.714286 | 102 | 0.617619 |
1895bd51d97bc5adc934457f9537304896fce2f8 | 68 | ex | Elixir | web/views/hello_view.ex | bmordas11/fun_in_the_sun | eb6f4f604a8ebf0f12b7a51c3b4e37ac777fe84b | [
"MIT"
] | null | null | null | web/views/hello_view.ex | bmordas11/fun_in_the_sun | eb6f4f604a8ebf0f12b7a51c3b4e37ac777fe84b | [
"MIT"
] | null | null | null | web/views/hello_view.ex | bmordas11/fun_in_the_sun | eb6f4f604a8ebf0f12b7a51c3b4e37ac777fe84b | [
"MIT"
] | null | null | null | defmodule FunInTheSun.HelloView do
use FunInTheSun.Web, :view
end
| 17 | 34 | 0.808824 |
1895dd276ad8c48ceb48c09b7b80bcbb025b08fc | 120 | exs | Elixir | test/exravendb_test.exs | Ghouli/exravendb | c0f1de86ed84896a0fc177a251aa3d08fbb856b6 | [
"MIT"
] | null | null | null | test/exravendb_test.exs | Ghouli/exravendb | c0f1de86ed84896a0fc177a251aa3d08fbb856b6 | [
"MIT"
] | null | null | null | test/exravendb_test.exs | Ghouli/exravendb | c0f1de86ed84896a0fc177a251aa3d08fbb856b6 | [
"MIT"
] | null | null | null | defmodule ExRavenDBTest do
use ExUnit.Case
doctest ExRavenDB
test "the truth" do
assert 1 + 1 == 2
end
end
| 13.333333 | 26 | 0.683333 |
1895e09645a696fbde024ba20ee1e875af8a4ef9 | 1,940 | ex | Elixir | lib/storage/ets_backend.ex | rkstarnerd/bargad | 82886c4934042622498401302024abeab3f0df85 | [
"Apache-2.0"
] | 50 | 2018-10-09T17:21:08.000Z | 2022-01-31T19:48:44.000Z | lib/storage/ets_backend.ex | rkstarnerd/bargad | 82886c4934042622498401302024abeab3f0df85 | [
"Apache-2.0"
] | 8 | 2018-10-09T16:18:10.000Z | 2020-05-18T00:25:08.000Z | lib/storage/ets_backend.ex | rkstarnerd/bargad | 82886c4934042622498401302024abeab3f0df85 | [
"Apache-2.0"
] | 8 | 2018-10-07T13:38:22.000Z | 2020-05-06T19:59:59.000Z | # Copyright 2018 Faraz Haider. All Rights Reserved.
#
# 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... | 35.272727 | 117 | 0.679897 |
1895fc6fd7af47581bf31e6fbe7ceb879baf83d1 | 6,055 | ex | Elixir | lib/ash/resource/attribute.ex | MrFlorius/ash | 247abbb8333d252da5440a58ddf4f1b7f184342f | [
"MIT"
] | null | null | null | lib/ash/resource/attribute.ex | MrFlorius/ash | 247abbb8333d252da5440a58ddf4f1b7f184342f | [
"MIT"
] | null | null | null | lib/ash/resource/attribute.ex | MrFlorius/ash | 247abbb8333d252da5440a58ddf4f1b7f184342f | [
"MIT"
] | null | null | null | defmodule Ash.Resource.Attribute do
@moduledoc "Represents an attribute on a resource"
defstruct [
:name,
:type,
:allow_nil?,
:generated?,
:primary_key?,
:private?,
:writable?,
:always_select?,
:default,
:update_default,
:description,
sensitive?: false,
constrain... | 36.041667 | 165 | 0.578695 |
18961bab7839b312ff2b9144c57ee85e32854336 | 947 | ex | Elixir | lib/phoenix/router/stack.ex | brightroll/phoenix | b93022086322bcc1d797214a28e0c9710f537c22 | [
"MIT"
] | null | null | null | lib/phoenix/router/stack.ex | brightroll/phoenix | b93022086322bcc1d797214a28e0c9710f537c22 | [
"MIT"
] | null | null | null | lib/phoenix/router/stack.ex | brightroll/phoenix | b93022086322bcc1d797214a28e0c9710f537c22 | [
"MIT"
] | null | null | null | defmodule Phoenix.Router.Stack do
@moduledoc """
Stack implementation used to support nested expansion for nested resources and scopes.
It is stored in module attribute given by the stack name.
"""
@doc """
Pushes the element onto the stack with given name.
"""
def push(element, stack_name, module) do... | 23.675 | 88 | 0.664203 |
18965913fdb0d8d6b987e75e2055c1c70caf3f7c | 500 | ex | Elixir | web/router.ex | Neener54/flaming-archer | 5e8262059f44da84b517717af30cfbd2854182fe | [
"MIT"
] | null | null | null | web/router.ex | Neener54/flaming-archer | 5e8262059f44da84b517717af30cfbd2854182fe | [
"MIT"
] | null | null | null | web/router.ex | Neener54/flaming-archer | 5e8262059f44da84b517717af30cfbd2854182fe | [
"MIT"
] | null | null | null | defmodule FlamingArcher.Router do
use FlamingArcher.Web, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
end
pipeline :api do
plug :accepts, ["json"]
end
scope "/", FlamingArcher do
pipe_through :browser # Use t... | 19.230769 | 57 | 0.678 |
18968832c11fc99dd0874911e306ae907a458488 | 2,395 | ex | Elixir | lib/gear_application/error_handler.ex | sylph01/antikythera | 47a93f3d4c70975f7296725c9bde2ea823867436 | [
"Apache-2.0"
] | 144 | 2018-04-27T07:24:49.000Z | 2022-03-15T05:19:37.000Z | lib/gear_application/error_handler.ex | sylph01/antikythera | 47a93f3d4c70975f7296725c9bde2ea823867436 | [
"Apache-2.0"
] | 123 | 2018-05-01T02:54:43.000Z | 2022-01-28T01:30:52.000Z | lib/gear_application/error_handler.ex | 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.
use Croma
defmodule Antikythera.GearApplication.ErrorHandler do
@moduledoc """
Helper module for gear's custom error handler.
To customize HTTP responses returned on errors, gear must implement an error handler module which
- is named `YourGear.... | 33.263889 | 120 | 0.678914 |
189690732495cea954eebb1f253f4ba51ed9266f | 1,101 | exs | Elixir | test/client_connection_test.exs | ityonemo/erps | f3cd859313941b9838c91a32e9c32e84194b0bb5 | [
"BSD-3-Clause"
] | 4 | 2020-03-06T19:04:35.000Z | 2021-01-01T21:23:03.000Z | test/client_connection_test.exs | ityonemo/erps | f3cd859313941b9838c91a32e9c32e84194b0bb5 | [
"BSD-3-Clause"
] | 27 | 2020-02-25T01:45:00.000Z | 2020-07-02T18:39:22.000Z | test/client_connection_test.exs | ityonemo/erps | f3cd859313941b9838c91a32e9c32e84194b0bb5 | [
"BSD-3-Clause"
] | null | null | null | defmodule ErpsTest.ClientConnectionTest do
#
# tests to make sure that an unconnected client works as expected.
#
use ExUnit.Case, async: true
@moduletag :connection
defmodule Client do
use Erps.Client, reconnect: 100
@localhost IP.localhost()
def start(port) do
Erps.Client.start(__MO... | 23.934783 | 80 | 0.657584 |
1896be138e2130dc471a0ea54b7532c82f672707 | 5,839 | exs | Elixir | .credo.exs | jmax/json_api_client | 10518564077860c291008887639dcef13f9ac3a7 | [
"MIT"
] | 36 | 2017-10-06T17:58:27.000Z | 2022-01-07T13:52:50.000Z | .credo.exs | jmax/json_api_client | 10518564077860c291008887639dcef13f9ac3a7 | [
"MIT"
] | 12 | 2017-11-30T00:17:05.000Z | 2019-11-25T18:05:24.000Z | .credo.exs | jmax/json_api_client | 10518564077860c291008887639dcef13f9ac3a7 | [
"MIT"
] | 12 | 2017-12-03T21:14:55.000Z | 2020-09-08T23:43:33.000Z | # This file contains the configuration for Credo and you are probably reading
# this after creating it with `mix credo.gen.config`.
#
# If you find anything wrong or unclear in this file, please report an
# issue on GitHub: https://github.com/rrrene/credo/issues
#
%{
#
# You can have as many configs as you like in ... | 40.832168 | 81 | 0.653879 |
1896cb71727ced51bfc0e7eb8e95e215641ee712 | 644 | exs | Elixir | scrabble-score/example.exs | wobh/xelixir | 63e5beec40d5c441cf6cf87f30c29848f481bb1b | [
"MIT"
] | 1 | 2021-08-16T20:24:14.000Z | 2021-08-16T20:24:14.000Z | exercises/scrabble-score/example.exs | Triangle-Elixir/xelixir | 08d23bf47f57799f286567cb26f635291de2fde5 | [
"MIT"
] | null | null | null | exercises/scrabble-score/example.exs | Triangle-Elixir/xelixir | 08d23bf47f57799f286567cb26f635291de2fde5 | [
"MIT"
] | null | null | null | defmodule Scrabble do
def score(word) do
word |> letters |> summarize
end
defp letters(word), do: word |> String.strip |> String.downcase |> String.codepoints
defp summarize(letters), do: Enum.reduce(letters, 0, fn(letter, acc) -> acc + letter_score(letter) end)
@letter_scores [
{ "aeilnorstu", 1 ... | 24.769231 | 105 | 0.53882 |
18970505d2234cacb3fd4239f2f511593620a937 | 3,130 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/instance_aggregated_list.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/instance_aggregated_list.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/compute/lib/google_api/compute/v1/model/instance_aggregated_list.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... | 48.153846 | 393 | 0.716613 |
18970fc0e73b9d3f0d7b807ac53059c652b10ab4 | 3,043 | exs | Elixir | test/loki/shell_test.exs | Selvaticus/loki | 58006dcf5752595ed7b875bee265423074895ae4 | [
"MIT"
] | 83 | 2016-11-27T11:15:58.000Z | 2021-12-24T21:04:04.000Z | test/loki/shell_test.exs | Selvaticus/loki | 58006dcf5752595ed7b875bee265423074895ae4 | [
"MIT"
] | 28 | 2016-12-08T14:18:32.000Z | 2019-01-08T10:57:54.000Z | test/loki/shell_test.exs | Selvaticus/loki | 58006dcf5752595ed7b875bee265423074895ae4 | [
"MIT"
] | 9 | 2017-02-08T21:56:18.000Z | 2019-06-09T02:14:07.000Z | defmodule Loki.ShellTest do
use ExUnit.Case, async: false
import Loki.Shell
import ExUnit.CaptureIO
describe "Shell" do
test "#ask input" do
assert capture_io("answer", fn ->
awnser = ask("Test question?")
send self(), awnser
end) == "Test question?"
assert_received {[]... | 23.229008 | 74 | 0.542557 |
1897401c0d7179a839c58bedb2af4197f35da7a5 | 56 | exs | Elixir | apps/project_operator/test/project_operator_test.exs | datapio/opencore | 6e766c3b3a2ad8b07295c7fd27cffc0923284197 | [
"Apache-2.0"
] | 5 | 2021-05-14T22:01:08.000Z | 2021-09-21T16:28:09.000Z | apps/project_operator/test/project_operator_test.exs | datapio/opencore | 6e766c3b3a2ad8b07295c7fd27cffc0923284197 | [
"Apache-2.0"
] | 198 | 2019-10-17T12:22:25.000Z | 2022-03-16T02:14:14.000Z | apps/project_operator/test/project_operator_test.exs | datapio/opencore | 6e766c3b3a2ad8b07295c7fd27cffc0923284197 | [
"Apache-2.0"
] | 1 | 2022-03-10T08:54:36.000Z | 2022-03-10T08:54:36.000Z | defmodule ProjectOperator.Test do
use ExUnit.Case
end
| 14 | 33 | 0.821429 |
18975d3f39b976de03826d6b5379142cb297e404 | 1,806 | ex | Elixir | lib/parameterize.ex | PavelTyk/ex_parameterize | 8cad0b65460370d2ef8109febdfea3966e2463fd | [
"MIT"
] | null | null | null | lib/parameterize.ex | PavelTyk/ex_parameterize | 8cad0b65460370d2ef8109febdfea3966e2463fd | [
"MIT"
] | null | null | null | lib/parameterize.ex | PavelTyk/ex_parameterize | 8cad0b65460370d2ef8109febdfea3966e2463fd | [
"MIT"
] | null | null | null | defmodule Parameterize do
@moduledoc """
Replaces special characters in a string so that it may be used as part of a ‘pretty’ URL.
Supports any language.
## Examples:
iex> Parameterize.parameterize("Привет, мир!")
"privet-mir"
"""
@charmap "lib/charmap.exs" |> Code.eval_file() |> elem(0)
@... | 22.296296 | 91 | 0.616833 |
18976e6682e2c9b1f9091099f6c8c4c580250bb3 | 4,408 | ex | Elixir | apps/ewallet_db/lib/ewallet_db/category.ex | enyan94/ewallet | e938e686319867d133b21cd0eb5496e213ae7620 | [
"Apache-2.0"
] | null | null | null | apps/ewallet_db/lib/ewallet_db/category.ex | enyan94/ewallet | e938e686319867d133b21cd0eb5496e213ae7620 | [
"Apache-2.0"
] | null | null | null | apps/ewallet_db/lib/ewallet_db/category.ex | enyan94/ewallet | e938e686319867d133b21cd0eb5496e213ae7620 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018-2019 OmiseGO Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 27.042945 | 92 | 0.661751 |
18977f4bff61873b931725491613a27b579f4707 | 111 | ex | Elixir | lib/remedy/schema/integration_type.ex | bdanklin/nostrum | 554ebd6cff1d0f68c874aa92f475dabf1aed5512 | [
"MIT"
] | 3 | 2021-09-05T09:44:02.000Z | 2022-01-26T15:31:50.000Z | lib/remedy/schema/integration_type.ex | bdanklin/remedy | 554ebd6cff1d0f68c874aa92f475dabf1aed5512 | [
"MIT"
] | null | null | null | lib/remedy/schema/integration_type.ex | bdanklin/remedy | 554ebd6cff1d0f68c874aa92f475dabf1aed5512 | [
"MIT"
] | null | null | null | defmodule Remedy.Schema.IntegrationType do
use Remedy.Type
defstruct TWITCH: 0, YOUTUBE: 1, DISCORD: 2
end
| 22.2 | 45 | 0.774775 |
189780d8b55acf3e7855a62536cb8d5d96924f5a | 109,250 | ex | Elixir | lib/elixir/lib/enum.ex | flash4syth/elixir | 466bfc79fbad69eb6c9e4e3f19c262cdd93d7817 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/enum.ex | flash4syth/elixir | 466bfc79fbad69eb6c9e4e3f19c262cdd93d7817 | [
"Apache-2.0"
] | 1 | 2020-09-14T16:23:33.000Z | 2021-03-25T17:38:59.000Z | lib/elixir/lib/enum.ex | flash4syth/elixir | 466bfc79fbad69eb6c9e4e3f19c262cdd93d7817 | [
"Apache-2.0"
] | null | null | null | defprotocol Enumerable do
@moduledoc """
Enumerable protocol used by `Enum` and `Stream` modules.
When you invoke a function in the `Enum` module, the first argument
is usually a collection that must implement this protocol.
For example, the expression:
Enum.map([1, 2, 3], &(&1 * 2))
invokes `Enume... | 28.606965 | 105 | 0.616568 |
18978136f649b898779108d14e40133644aab540 | 4,067 | ex | Elixir | lib/core/asset_workers/regimen_instance_worker.ex | bahanni/custom_rpi4 | ddefa85d30bacaae40151a63a9a0ebbf4ad30ed5 | [
"MIT"
] | null | null | null | lib/core/asset_workers/regimen_instance_worker.ex | bahanni/custom_rpi4 | ddefa85d30bacaae40151a63a9a0ebbf4ad30ed5 | [
"MIT"
] | null | null | null | lib/core/asset_workers/regimen_instance_worker.ex | bahanni/custom_rpi4 | ddefa85d30bacaae40151a63a9a0ebbf4ad30ed5 | [
"MIT"
] | null | null | null | defimpl FarmbotOS.AssetWorker, for: FarmbotOS.Asset.RegimenInstance do
@moduledoc """
An instance of a running Regimen. Asset.Regimen is the blueprint by which a
Regimen "instance" is created.
"""
use GenServer
require Logger
require FarmbotOS.Logger
alias FarmbotOS.Celery.AST
alias FarmbotOS.Asset
... | 31.284615 | 79 | 0.631915 |
18978562d36fa26decda8a0fdef07b0fb567a88a | 228 | ex | Elixir | presentation/snippets/jade/gulp.ex | mabrasil/slides-nug_ce-2015 | dedd5c2ca1bbc109b5895ae136eac72a399c2ebd | [
"MIT"
] | null | null | null | presentation/snippets/jade/gulp.ex | mabrasil/slides-nug_ce-2015 | dedd5c2ca1bbc109b5895ae136eac72a399c2ebd | [
"MIT"
] | null | null | null | presentation/snippets/jade/gulp.ex | mabrasil/slides-nug_ce-2015 | dedd5c2ca1bbc109b5895ae136eac72a399c2ebd | [
"MIT"
] | null | null | null | 'use strict';
var gulp = require('gulp')
,jade = require('gulp-jade');
module.exports = gulp.task('jade', function () {
return gulp.src('src/templates/*.jade')
.pipe(jade())
.pipe(gulp.dest('index.html'))
});
| 17.538462 | 48 | 0.600877 |
189787b903442cd93264c5feba3f5a0efc328ead | 1,369 | ex | Elixir | lib/types.ex | ZanjeerPlatform/CSMT | 1cd1f39a893f3e5f4cc3d5833c4d21c8924500dd | [
"Apache-2.0"
] | 34 | 2018-10-11T13:19:19.000Z | 2021-04-17T06:17:20.000Z | lib/types.ex | ZanjeerPlatform/CSMT | 1cd1f39a893f3e5f4cc3d5833c4d21c8924500dd | [
"Apache-2.0"
] | null | null | null | lib/types.ex | ZanjeerPlatform/CSMT | 1cd1f39a893f3e5f4cc3d5833c4d21c8924500dd | [
"Apache-2.0"
] | 3 | 2018-10-11T15:33:23.000Z | 2018-11-03T08:56:28.000Z | # Copyright 2018 Faraz Haider. All Rights Reserved.
#
# 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... | 29.76087 | 77 | 0.645727 |
189797d6b01f0b559feec6284f34b3cb9b4b3b36 | 390 | exs | Elixir | priv/repo/migrations/20180818060805_add_xp_to_assessments.exs | Hou-Rui/cadet | f9036d76005bf3b267b632dce176067ae1a19f71 | [
"Apache-2.0"
] | 27 | 2018-01-20T05:56:24.000Z | 2021-05-24T03:21:55.000Z | priv/repo/migrations/20180818060805_add_xp_to_assessments.exs | Hou-Rui/cadet | f9036d76005bf3b267b632dce176067ae1a19f71 | [
"Apache-2.0"
] | 731 | 2018-04-16T13:25:49.000Z | 2021-06-22T07:16:12.000Z | priv/repo/migrations/20180818060805_add_xp_to_assessments.exs | Hou-Rui/cadet | f9036d76005bf3b267b632dce176067ae1a19f71 | [
"Apache-2.0"
] | 43 | 2018-01-20T06:35:46.000Z | 2021-05-05T03:22:35.000Z | defmodule Cadet.Repo.Migrations.AddXpToAssessments do
use Ecto.Migration
def change do
alter table(:questions) do
add(:max_xp, :integer, default: 0)
end
alter table(:submissions) do
add(:xp_bonus, :integer, default: 0)
end
alter table(:answers) do
add(:xp, :integer, default:... | 20.526316 | 53 | 0.651282 |
1897a268d76c9b86a2f395065d97a7e0e4b01c50 | 4,601 | ex | Elixir | lib/exgopigo/board.ex | infiniteNIL/exgopigo | 01599e3ef367f378d9263d1fbab211f5f6502315 | [
"MIT"
] | 5 | 2015-05-30T23:51:26.000Z | 2016-05-05T21:10:48.000Z | lib/exgopigo/board.ex | infiniteNIL/exgopigo | 01599e3ef367f378d9263d1fbab211f5f6502315 | [
"MIT"
] | null | null | null | lib/exgopigo/board.ex | infiniteNIL/exgopigo | 01599e3ef367f378d9263d1fbab211f5f6502315 | [
"MIT"
] | null | null | null | defmodule ExGoPiGo.Board do
use GenServer
use Bitwise
require Logger
@moduledoc """
Handles communicating with the GoPiGo board.
"""
# The device's address.
@gopigo_board_address 0x08
@read_enc_status_cmd 53 # Read encoder status TODO: unused
@timeout_status_cmd 82 # Read the timeout status TOD... | 23.005 | 89 | 0.662247 |
1897c0f9f07f5124da41ae074667cadcfa0729cd | 2,291 | ex | Elixir | lib/glimesh_web/live/user_live/stream.ex | LittleToonCat/glimesh.tv | 97b0eb7881888faeb525e6a99cc73ebb559e8eba | [
"MIT"
] | null | null | null | lib/glimesh_web/live/user_live/stream.ex | LittleToonCat/glimesh.tv | 97b0eb7881888faeb525e6a99cc73ebb559e8eba | [
"MIT"
] | null | null | null | lib/glimesh_web/live/user_live/stream.ex | LittleToonCat/glimesh.tv | 97b0eb7881888faeb525e6a99cc73ebb559e8eba | [
"MIT"
] | null | null | null | defmodule GlimeshWeb.UserLive.Stream do
use GlimeshWeb, :live_view
alias Glimesh.Accounts
alias Glimesh.Accounts.Profile
alias Glimesh.Presence
alias Glimesh.Streams
def mount(%{"username" => streamer_username}, session, socket) do
# If the viewer is logged in set their locale, otherwise it defaults t... | 31.383562 | 103 | 0.656045 |
1897d197ad48c42beb9a5dd616a9bf20f5643d7f | 3,280 | ex | Elixir | clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/expr.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/expr.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/expr.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... | 58.571429 | 1,092 | 0.7375 |
1897f10d91016244be3d4caa76f369eee5511b82 | 1,669 | exs | Elixir | mix.exs | JonGretar/GeoTurf | 47886ddcb3028fb2aff6cea2d168d602c12a5f34 | [
"MIT"
] | 7 | 2019-04-29T12:22:45.000Z | 2022-02-08T06:06:37.000Z | mix.exs | JonGretar/GeoTurf | 47886ddcb3028fb2aff6cea2d168d602c12a5f34 | [
"MIT"
] | null | null | null | mix.exs | JonGretar/GeoTurf | 47886ddcb3028fb2aff6cea2d168d602c12a5f34 | [
"MIT"
] | null | null | null | defmodule Geo.Turf.MixProject do
use Mix.Project
def project do
[
app: :geo_turf,
version: "0.1.0",
elixir: "~> 1.6",
# start_permanent: Mix.env() == :prod,
description: description(),
package: package(),
elixirc_paths: elixirc_paths(Mix.env()),
test_coverage: [t... | 23.842857 | 129 | 0.565009 |
18980d228e710e3485def979d98fe0ffc5b295d4 | 2,516 | ex | Elixir | deps/absinthe/lib/absinthe/schema/rule/object_must_implement_interfaces.ex | JoakimEskils/elixir-absinthe | d81e24ec7c7b1164e6d152101dd50422f192d7e9 | [
"MIT"
] | 3 | 2017-06-22T16:33:58.000Z | 2021-07-07T15:21:09.000Z | lib/absinthe/schema/rule/object_must_implement_interfaces.ex | bruce/absinthe | 19b63d3aaa9fb75aad01ffd5e91d89e0b30d7f91 | [
"MIT"
] | null | null | null | lib/absinthe/schema/rule/object_must_implement_interfaces.ex | bruce/absinthe | 19b63d3aaa9fb75aad01ffd5e91d89e0b30d7f91 | [
"MIT"
] | null | null | null | defmodule Absinthe.Schema.Rule.ObjectMustImplementInterfaces do
use Absinthe.Schema.Rule
alias Absinthe.Schema
alias Absinthe.Type
@moduledoc false
@description """
An object type must be a super-set of all interfaces it implements.
* The object type must include a field of the same name for every fie... | 35.43662 | 124 | 0.685215 |
1898232189b85afc8c65dacffd5b6635344c3321 | 10,188 | exs | Elixir | lib/mix/test/mix/tasks/deps.git_test.exs | jeregrine/elixir | 080201477955bcd2d755fb4162966dc6882b1521 | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/tasks/deps.git_test.exs | jeregrine/elixir | 080201477955bcd2d755fb4162966dc6882b1521 | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/tasks/deps.git_test.exs | jeregrine/elixir | 080201477955bcd2d755fb4162966dc6882b1521 | [
"Apache-2.0"
] | null | null | null | Code.require_file "../../test_helper.exs", __DIR__
defmodule Mix.Tasks.DepsGitTest do
use MixTest.Case
defmodule DepsOnGitApp do
def project do
[ app: :deps_on_git_app,
version: "0.1.0",
deps: [
{ :deps_on_git_repo, "0.2.0", git: MixTest.Case.fixture_path("deps_on_git_repo") }
... | 30.231454 | 117 | 0.625245 |
18982ae7ac22460cb5c56c0b52b79343965c929b | 1,589 | ex | Elixir | lib/blog_web/endpoint.ex | wagncarv/blog | c882bd3363a9d886589131d8deb17dbd504514eb | [
"MIT"
] | null | null | null | lib/blog_web/endpoint.ex | wagncarv/blog | c882bd3363a9d886589131d8deb17dbd504514eb | [
"MIT"
] | 5 | 2022-01-08T15:20:44.000Z | 2022-01-23T21:30:25.000Z | lib/blog_web/endpoint.ex | wagncarv/blog | c882bd3363a9d886589131d8deb17dbd504514eb | [
"MIT"
] | null | null | null | defmodule BlogWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :blog
# 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_options [
store: :cookie,
key: "_blog_key",
... | 28.890909 | 97 | 0.714915 |
189830fcc92cf016742d5df268c66bc98af03af7 | 4,902 | ex | Elixir | lib/grpc/transport/http2.ex | braverhealth/grpc | eff8a8828d27ddd7f63a3c1dd5aae86246df215e | [
"Apache-2.0"
] | 561 | 2019-03-18T09:10:57.000Z | 2022-03-27T17:34:59.000Z | lib/grpc/transport/http2.ex | braverhealth/grpc | eff8a8828d27ddd7f63a3c1dd5aae86246df215e | [
"Apache-2.0"
] | 94 | 2019-03-20T09:34:38.000Z | 2022-02-27T20:44:04.000Z | lib/grpc/transport/http2.ex | braverhealth/grpc | eff8a8828d27ddd7f63a3c1dd5aae86246df215e | [
"Apache-2.0"
] | 112 | 2019-03-25T03:27:26.000Z | 2022-03-21T12:43:59.000Z | defmodule GRPC.Transport.HTTP2 do
@moduledoc false
# A module providing functions for sending HTTP/2 requests.
alias GRPC.Transport.Utils
alias GRPC.Status
require Logger
def server_headers(%{codec: codec}) do
%{"content-type" => "application/grpc+#{codec.name}"}
end
@spec server_trailers(integ... | 31.423077 | 107 | 0.675235 |
189844fc75ea2641a96821a2ebebe3a8a4fdb37d | 3,382 | ex | Elixir | deps/phoenix_live_reload/lib/phoenix_live_reload/live_reloader.ex | pdamoc/cowboy_issue | 3873ffed5cc2b15ead54b2d3e95575b09ba1833a | [
"MIT"
] | null | null | null | deps/phoenix_live_reload/lib/phoenix_live_reload/live_reloader.ex | pdamoc/cowboy_issue | 3873ffed5cc2b15ead54b2d3e95575b09ba1833a | [
"MIT"
] | null | null | null | deps/phoenix_live_reload/lib/phoenix_live_reload/live_reloader.ex | pdamoc/cowboy_issue | 3873ffed5cc2b15ead54b2d3e95575b09ba1833a | [
"MIT"
] | null | null | null | defmodule Phoenix.LiveReloader do
@moduledoc """
Router for live-reload detection in development.
## Usage
Add the `Phoenix.LiveReloader` plug within a `code_reloading?` block
in your Endpoint, ie:
if code_reloading? do
socket "/phoenix/live_reload/socket", Phoenix.LiveReloader.Socket
... | 27.056 | 96 | 0.6233 |
189848b9093234cb13b3e9c5531073e7ed6c58e8 | 6,376 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/network_interface.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/network_interface.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/network_interface.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"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... | 67.829787 | 474 | 0.722867 |
1898873f12a8cfd09b3eda788129143da2ad7fd2 | 1,684 | exs | Elixir | mix.exs | brandnewio/brandnew-mail-tracker | 0f991c82bd95be6a8efaee949b459b77a1e7245d | [
"MIT"
] | null | null | null | mix.exs | brandnewio/brandnew-mail-tracker | 0f991c82bd95be6a8efaee949b459b77a1e7245d | [
"MIT"
] | null | null | null | mix.exs | brandnewio/brandnew-mail-tracker | 0f991c82bd95be6a8efaee949b459b77a1e7245d | [
"MIT"
] | null | null | null | defmodule BrandnewMailTracker.Mixfile do
use Mix.Project
def project do
[app: :brandnew_mail_tracker,
version: "0.0.1",
elixir: "~> 1.2",
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix, :gettext] ++ Mix.compilers,
build_embedded: Mix.env == :prod,
start_permanent: Mix... | 30.618182 | 89 | 0.611045 |
189888db613523aa7ae065e370c9fb39371b543c | 1,941 | ex | Elixir | apps/admin/lib/admin.ex | votiakov/petal | ec03551da6dadc0c3482b25a5f5dcd400c36db43 | [
"MIT"
] | null | null | null | apps/admin/lib/admin.ex | votiakov/petal | ec03551da6dadc0c3482b25a5f5dcd400c36db43 | [
"MIT"
] | null | null | null | apps/admin/lib/admin.ex | votiakov/petal | ec03551da6dadc0c3482b25a5f5dcd400c36db43 | [
"MIT"
] | null | null | null | defmodule Legendary.Admin do
@moduledoc """
The entrypoint for defining your web interface, such
as controllers, views, channels and so on.
This can be used in your application as:
use Legendary.Admin, :controller
use Legendary.Admin, :view
The definitions below will be executed for every view,... | 23.670732 | 76 | 0.68779 |
18988c136799a6f9845d86fcfb1f7addd3a0db30 | 1,422 | ex | Elixir | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/last_modified_info.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/last_modified_info.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/last_modified_info.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... | 30.255319 | 111 | 0.739803 |
1898a376328f787cc2e284e6cf49e51b38328713 | 774 | ex | Elixir | lib/advent2021/day3/day3.ex | takakoshimizu/advent-of-code-2021 | 67ab4180cebb95d371dd085c45bd669581c286e5 | [
"MIT"
] | null | null | null | lib/advent2021/day3/day3.ex | takakoshimizu/advent-of-code-2021 | 67ab4180cebb95d371dd085c45bd669581c286e5 | [
"MIT"
] | null | null | null | lib/advent2021/day3/day3.ex | takakoshimizu/advent-of-code-2021 | 67ab4180cebb95d371dd085c45bd669581c286e5 | [
"MIT"
] | null | null | null | defmodule Advent2021.Day3 do
use Advent2021.Utils
alias Advent2021.Answer
def main() do
lines = input() |> Enum.map(&parse_line/1)
zipped = lines |> zip_lines()
commons = zipped |> Enum.map(&most_common/1)
uncommon = commons |> Enum.map(&flip/1)
answer Answer.new(to_num(commons) * to_num(unc... | 35.181818 | 112 | 0.649871 |
1898a5c73e1afcc3dc4d0842b69e76bb5c767bf0 | 562 | ex | Elixir | apps/language_server/lib/language_server/providers/definition.ex | bottlenecked/elixir-ls | 99ab6e98ff181aae01ca3d119dee0ea9c49c727a | [
"Apache-2.0"
] | null | null | null | apps/language_server/lib/language_server/providers/definition.ex | bottlenecked/elixir-ls | 99ab6e98ff181aae01ca3d119dee0ea9c49c727a | [
"Apache-2.0"
] | null | null | null | apps/language_server/lib/language_server/providers/definition.ex | bottlenecked/elixir-ls | 99ab6e98ff181aae01ca3d119dee0ea9c49c727a | [
"Apache-2.0"
] | null | null | null | defmodule ElixirLS.LanguageServer.Providers.Definition do
@moduledoc """
Go-to-definition provider utilizing Elixir Sense
"""
alias ElixirLS.LanguageServer.{Protocol, SourceFile}
def definition(uri, text, line, character) do
{line, character} = SourceFile.lsp_position_to_elixir(text, {line, character})
... | 24.434783 | 82 | 0.674377 |
1898b1d7746d61f32350e51d93f42ac668d77a77 | 1,168 | exs | Elixir | exercises/02-higher-order-functions/02-goodbye-loops/13-max_by/tests.exs | DennisWinnepenninckx/distributed-applications | 06743e4e2a09dc52ff52be831e486bb073916173 | [
"BSD-3-Clause"
] | 1 | 2021-09-22T09:52:11.000Z | 2021-09-22T09:52:11.000Z | exercises/02-higher-order-functions/02-goodbye-loops/13-max_by/tests.exs | DennisWinnepenninckx/distributed-applications | 06743e4e2a09dc52ff52be831e486bb073916173 | [
"BSD-3-Clause"
] | 22 | 2019-06-19T18:58:13.000Z | 2020-03-16T14:43:06.000Z | exercises/02-higher-order-functions/02-goodbye-loops/13-max_by/tests.exs | DennisWinnepenninckx/distributed-applications | 06743e4e2a09dc52ff52be831e486bb073916173 | [
"BSD-3-Clause"
] | 32 | 2019-09-19T03:25:11.000Z | 2020-10-06T15:01:47.000Z | defmodule Setup do
@script "shared.exs"
def setup(directory \\ ".") do
path = Path.join(directory, @script)
if File.exists?(path) do
Code.require_file(path)
Shared.setup(__DIR__)
else
setup(Path.join(directory, ".."))
end
end
end
Setup.setup
defmodule Tests do
use ExUnit.C... | 29.948718 | 83 | 0.625 |
1898b2b5bcecf4834ea9f053cd4bbe211bb61c00 | 568 | ex | Elixir | lib/still/preprocessor/css_minify.ex | michaeldelago/still | 2c4593779a3c4f987d718fd27ee8a76c79cfd5d8 | [
"0BSD"
] | null | null | null | lib/still/preprocessor/css_minify.ex | michaeldelago/still | 2c4593779a3c4f987d718fd27ee8a76c79cfd5d8 | [
"0BSD"
] | null | null | null | lib/still/preprocessor/css_minify.ex | michaeldelago/still | 2c4593779a3c4f987d718fd27ee8a76c79cfd5d8 | [
"0BSD"
] | null | null | null | defmodule Still.Preprocessor.CSSMinify do
@moduledoc """
Minifies a CSS file. This is a very basic minifier that simply removes
whitespaces.
"""
alias Still.Preprocessor
use Preprocessor
@impl true
def render(%{run_type: :compile_metadata} = source_file),
do: %{source_file | extension: ".css"}
... | 22.72 | 72 | 0.637324 |
1898beb3bbc2ca39083b66b0cf5ef2dc3e742597 | 817 | ex | Elixir | lib/here_maps/reverse_geocode.ex | yurgon/here_maps | 4fa2309f630b1a3d945bb104793d1906db601df6 | [
"MIT"
] | null | null | null | lib/here_maps/reverse_geocode.ex | yurgon/here_maps | 4fa2309f630b1a3d945bb104793d1906db601df6 | [
"MIT"
] | null | null | null | lib/here_maps/reverse_geocode.ex | yurgon/here_maps | 4fa2309f630b1a3d945bb104793d1906db601df6 | [
"MIT"
] | null | null | null | defmodule HereMaps.ReverseGeocode do
@moduledoc false
alias HereMaps.{Request}
@base_url "https://reverse.geocoder.cit.api.here.com/6.2/reversegeocode.json"
def call(location, params \\ %{}, headers \\ []) do
case Request.send(@base_url, reverse_geocode_params(location, params), headers) do
{:ok,... | 29.178571 | 98 | 0.625459 |
1899131ebab9bc434ce4688f6bb75d9b7692a515 | 1,018 | ex | Elixir | web/views/error_helpers.ex | jusroberts/pingpong_server | fd090413076c84e4f7297349d4c9fd6323bd1ddf | [
"MIT"
] | null | null | null | web/views/error_helpers.ex | jusroberts/pingpong_server | fd090413076c84e4f7297349d4c9fd6323bd1ddf | [
"MIT"
] | null | null | null | web/views/error_helpers.ex | jusroberts/pingpong_server | fd090413076c84e4f7297349d4c9fd6323bd1ddf | [
"MIT"
] | null | null | null | defmodule PingpongServer.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(e... | 28.277778 | 85 | 0.685658 |
18991c2f210a369ea6869ed25c0fa590a7bda6c0 | 3,913 | ex | Elixir | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v2beta1/model/client.ex | ericrwolfe/elixir-google-api | 3dc0f17edd5e2d6843580c16ddae3bf84b664ffd | [
"Apache-2.0"
] | null | null | null | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v2beta1/model/client.ex | ericrwolfe/elixir-google-api | 3dc0f17edd5e2d6843580c16ddae3bf84b664ffd | [
"Apache-2.0"
] | null | null | null | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v2beta1/model/client.ex | ericrwolfe/elixir-google-api | 3dc0f17edd5e2d6843580c16ddae3bf84b664ffd | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 64.147541 | 694 | 0.762331 |
18992d66ec94684f1e05f0a6fffbb3c41a20f9e2 | 432 | exs | Elixir | priv/repo/migrations/20170219210329_create_user.exs | GBH/pedal | a2d68c3561f186ee3017a21b4170127b1625e18d | [
"MIT"
] | 48 | 2017-04-25T16:02:08.000Z | 2021-01-23T01:57:29.000Z | priv/repo/migrations/20170219210329_create_user.exs | GBH/pedal | a2d68c3561f186ee3017a21b4170127b1625e18d | [
"MIT"
] | 5 | 2018-03-09T20:17:55.000Z | 2018-07-23T16:29:21.000Z | priv/repo/migrations/20170219210329_create_user.exs | GBH/pedal | a2d68c3561f186ee3017a21b4170127b1625e18d | [
"MIT"
] | 4 | 2017-05-21T14:38:38.000Z | 2017-12-29T11:09:54.000Z | defmodule LoadedBike.Repo.Migrations.CreateUser do
use Ecto.Migration
def change do
create table(:users) do
add :email, :string, null: false
add :name, :string, null: false
add :password_hash, :string, null: false
add :avatar, :string
add :is_admin, :boole... | 22.736842 | 58 | 0.618056 |
1899446e6b44fbf3d3d173d5c5634dfbaf59e3fc | 506 | ex | Elixir | apps/glayu_core/lib/glayu/utils/path_regex.ex | pmartinezalvarez/glayu | 8dc30eea4d04c38f5c7999b593c066828423a3dc | [
"MIT"
] | 51 | 2017-05-21T07:27:34.000Z | 2017-11-30T04:34:17.000Z | apps/glayu_core/lib/glayu/utils/path_regex.ex | doc22940/glayu | 8dc30eea4d04c38f5c7999b593c066828423a3dc | [
"MIT"
] | 17 | 2017-06-14T18:40:44.000Z | 2017-08-20T16:14:58.000Z | apps/glayu_core/lib/glayu/utils/path_regex.ex | doc22940/glayu | 8dc30eea4d04c38f5c7999b593c066828423a3dc | [
"MIT"
] | 5 | 2017-06-04T19:55:56.000Z | 2017-07-29T16:18:58.000Z | defmodule Glayu.Utils.PathRegex do
def base_dir(nil) do
Glayu.Path.source_root()
end
def base_dir(regex) do
names = Regex.named_captures(~r/(?<base_path>[^.^$*+?()[{\|]+)/, regex)
path = names["base_path"]
case path do
nil -> Glayu.Path.source_root
path ->
if String.starts... | 20.24 | 75 | 0.590909 |
1899a622f65903eac9ac8817e26942ae884d05df | 232 | exs | Elixir | config/config.exs | kennethpjdyer/tresmid | 220a18b509fc3ce0911e6db3e18c0861cac5b099 | [
"BSD-3-Clause"
] | null | null | null | config/config.exs | kennethpjdyer/tresmid | 220a18b509fc3ce0911e6db3e18c0861cac5b099 | [
"BSD-3-Clause"
] | null | null | null | config/config.exs | kennethpjdyer/tresmid | 220a18b509fc3ce0911e6db3e18c0861cac5b099 | [
"BSD-3-Clause"
] | null | null | null | import Config
config :tresmid,
conf_path: Path.expand("~/.config/tresmid.yml"),
mongo_user: "tresmid",
mongo_pwd: "tresmid",
mongo_db: "tresmid",
mongo_host: "localhost",
mongo_port: 27017
config :logger, level: :warn
| 19.333333 | 50 | 0.702586 |
1899a66cb99468b15133a566ea36334de25d222c | 1,508 | exs | Elixir | config/dev.exs | jackjoe/ex_2fa | 060708edb9d5c97ff9535ed5adc28526add07d77 | [
"Apache-2.0"
] | 2 | 2020-08-10T17:44:05.000Z | 2021-03-09T10:42:40.000Z | config/dev.exs | jackjoe/ex_2fa | 060708edb9d5c97ff9535ed5adc28526add07d77 | [
"Apache-2.0"
] | null | null | null | config/dev.exs | jackjoe/ex_2fa | 060708edb9d5c97ff9535ed5adc28526add07d77 | [
"Apache-2.0"
] | null | null | null | use Mix.Config
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with webpack to recompile .js and .css sources.
config :ex_2fa, Ex2faWeb.Endpoint,
https: [
port: S... | 30.77551 | 91 | 0.716844 |
1899a80c6b4499e3e63f19df886b3b2deeddd500 | 1,083 | exs | Elixir | integration_test/cases/browser/select_test.exs | bobwaycott/wallaby | b25e6937f007f6e56be1b7b6a62591db5ac5a240 | [
"MIT"
] | 926 | 2016-03-28T17:01:54.000Z | 2019-11-05T11:59:58.000Z | integration_test/cases/browser/select_test.exs | marcandre/wallaby | d351c46f1a272bbcf8333c8327d154be3bd12c5c | [
"MIT"
] | 377 | 2016-03-17T00:35:56.000Z | 2019-11-03T07:15:24.000Z | integration_test/cases/browser/select_test.exs | marcandre/wallaby | d351c46f1a272bbcf8333c8327d154be3bd12c5c | [
"MIT"
] | 144 | 2016-03-29T15:28:28.000Z | 2019-10-31T00:48:42.000Z | defmodule Wallaby.Integration.Browser.SelectTest do
use Wallaby.Integration.SessionCase, async: true
import Wallaby.Query, only: [option: 1, select: 1]
setup %{session: session} do
page =
session
|> visit("select_boxes.html")
{:ok, page: page}
end
test "escapes quotes", %{page: page} d... | 25.186047 | 72 | 0.592798 |
1899c6df82997171398fb547d688be8a7712e5a7 | 190 | ex | Elixir | lib/chat.ex | arjit95/elixir-chat | e4db9d37713edb8398017c8629b8064541c5a110 | [
"MIT"
] | null | null | null | lib/chat.ex | arjit95/elixir-chat | e4db9d37713edb8398017c8629b8064541c5a110 | [
"MIT"
] | null | null | null | lib/chat.ex | arjit95/elixir-chat | e4db9d37713edb8398017c8629b8064541c5a110 | [
"MIT"
] | null | null | null | defmodule Chat do
@moduledoc """
Documentation for Chat.
"""
@doc """
Hello world.
## Examples
iex> Chat.hello()
:world
"""
def hello do
:world
end
end
| 10 | 25 | 0.542105 |
1899d5be7c49500e8aff32a7e5f894688a65e864 | 1,994 | exs | Elixir | lib/iex/test/test_helper.exs | bruce/elixir | d77ccf941541959079e5f677f8717da24b486fac | [
"Apache-2.0"
] | 1 | 2017-09-09T20:59:04.000Z | 2017-09-09T20:59:04.000Z | lib/iex/test/test_helper.exs | bruce/elixir | d77ccf941541959079e5f677f8717da24b486fac | [
"Apache-2.0"
] | null | null | null | lib/iex/test/test_helper.exs | bruce/elixir | d77ccf941541959079e5f677f8717da24b486fac | [
"Apache-2.0"
] | null | null | null | :application.start(:iex)
ExUnit.start [trace: "--trace" in System.argv]
defmodule IEx.Case do
@moduledoc false
#
# Provides convenience functions for testing IEx-related functionality.
# Use this module inside your test module like this:
#
# defmodule IEx.InteractionTest do
# use IEx.Case
#
# ... | 25.896104 | 79 | 0.660983 |
1899ecd90d0c2b28760d98b94a64d2e84b10afa8 | 4,102 | exs | Elixir | test/ai_web/controllers/api/v1/media_controller_test.exs | mirai-audio/- | 365c0fba614543bf40ebaae55de47bc541bd473f | [
"MIT"
] | null | null | null | test/ai_web/controllers/api/v1/media_controller_test.exs | mirai-audio/- | 365c0fba614543bf40ebaae55de47bc541bd473f | [
"MIT"
] | null | null | null | test/ai_web/controllers/api/v1/media_controller_test.exs | mirai-audio/- | 365c0fba614543bf40ebaae55de47bc541bd473f | [
"MIT"
] | null | null | null | defmodule AiWeb.API.V1.MediaControllerTest do
use AiWeb.ConnCase
alias Ai.Medias.Media
alias Ai.Repo
@valid_attrs %{title: "some content", url: "https://www.youtube.com/watch?v=some_content"}
@invalid_attrs %{}
@invalid_attrs_nil %{title: nil, url: nil}
setup %{conn: conn} = config do
if username = ... | 29.941606 | 98 | 0.596782 |
1899f27b3b29db3267c88e1edb20d3dc9d89f152 | 2,046 | ex | Elixir | lib/codes/codes_q97.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_q97.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_q97.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | defmodule IcdCode.ICDCode.Codes_Q97 do
alias IcdCode.ICDCode
def _Q970 do
%ICDCode{full_code: "Q970",
category_code: "Q97",
short_code: "0",
full_name: "Karyotype 47, XXX",
short_name: "Karyotype 47, XXX",
category_name: "Karyotype 47, XXX"
}
end
def ... | 33.540984 | 89 | 0.624145 |
189a08a16ddb962762fd17d758841f1a319edf2f | 4,410 | ex | Elixir | clients/content/lib/google_api/content/v2/model/delivery_time.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/delivery_time.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/delivery_time.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 ... | 62.112676 | 275 | 0.743311 |
189a0e377e40fdf107974cca823e6eb90970888f | 907 | ex | Elixir | test/_support/client_case.ex | ityonemo/erps | f3cd859313941b9838c91a32e9c32e84194b0bb5 | [
"BSD-3-Clause"
] | 4 | 2020-03-06T19:04:35.000Z | 2021-01-01T21:23:03.000Z | test/_support/client_case.ex | ityonemo/erps | f3cd859313941b9838c91a32e9c32e84194b0bb5 | [
"BSD-3-Clause"
] | 27 | 2020-02-25T01:45:00.000Z | 2020-07-02T18:39:22.000Z | test/_support/client_case.ex | ityonemo/erps | f3cd859313941b9838c91a32e9c32e84194b0bb5 | [
"BSD-3-Clause"
] | null | null | null | # credo:disable-for-this-file Credo.Check.Readability.ModuleDoc
defmodule ErpsTest.ClientCase do
#
# Test Case for developing client tests. Note this
# means that a minimal SERVER is created.
#
use ExUnit.CaseTemplate
using do
quote do
defmodule Server do
use Erps.Server
def ... | 21.093023 | 83 | 0.635061 |
189a1bcfce1afbc3e2052526836e734cdec89a71 | 2,423 | ex | Elixir | clients/dataflow/lib/google_api/dataflow/v1b3/model/lease_work_item_request.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/dataflow/lib/google_api/dataflow/v1b3/model/lease_work_item_request.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/dataflow/lib/google_api/dataflow/v1b3/model/lease_work_item_request.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"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... | 38.460317 | 144 | 0.728023 |
189a394ee7ec3fc9e577ab8919b463d212e3f1a4 | 1,605 | ex | Elixir | clients/cloud_build/lib/google_api/cloud_build/v1/model/file_hashes.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/cloud_build/lib/google_api/cloud_build/v1/model/file_hashes.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/cloud_build/lib/google_api/cloud_build/v1/model/file_hashes.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 33.4375 | 118 | 0.742679 |
189aa7cc9444f63243382ca5a67849590f6902b8 | 415 | exs | Elixir | test/control/applicative/maybe_test.exs | slogsdon/elixir-control | 4136ce4fa6b62368b5f3bdf38708c7e28c4b256b | [
"MIT"
] | 23 | 2015-10-04T20:49:56.000Z | 2022-01-09T19:35:52.000Z | test/control/applicative/maybe_test.exs | slogsdon/elixir-control | 4136ce4fa6b62368b5f3bdf38708c7e28c4b256b | [
"MIT"
] | null | null | null | test/control/applicative/maybe_test.exs | slogsdon/elixir-control | 4136ce4fa6b62368b5f3bdf38708c7e28c4b256b | [
"MIT"
] | 2 | 2015-10-11T22:07:56.000Z | 2015-12-21T13:56:07.000Z | defmodule Control.Applicative.MaybeTest do
use ExUnit.Case
alias Data.Maybe
import Maybe
alias Control.Applicative, as: A
test "apply" do
f = &(&1 + 1)
assert just(f)
== %Maybe{just: f, nothing: false}
assert just(f) |> A.apply(just(2))
== just(3)
assert nothing() |> A.apply(just(... | 21.842105 | 42 | 0.592771 |
189af179147afd2d3b72c5f8398cd538a3afcabd | 4,620 | ex | Elixir | clients/cloud_run/lib/google_api/cloud_run/v1alpha1/model/cloud_pub_sub_source_spec.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/cloud_run/lib/google_api/cloud_run/v1alpha1/model/cloud_pub_sub_source_spec.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/cloud_run/lib/google_api/cloud_run/v1alpha1/model/cloud_pub_sub_source_spec.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... | 49.677419 | 178 | 0.720563 |
189af2594f491f788e88ef4301a63ea6e4c9cf90 | 5,098 | exs | Elixir | test/custom_event_test.exs | TheRealReal/elixir_agent | db757b24543c3d213495435e71340897f9455d16 | [
"Apache-2.0"
] | null | null | null | test/custom_event_test.exs | TheRealReal/elixir_agent | db757b24543c3d213495435e71340897f9455d16 | [
"Apache-2.0"
] | null | null | null | test/custom_event_test.exs | TheRealReal/elixir_agent | db757b24543c3d213495435e71340897f9455d16 | [
"Apache-2.0"
] | null | null | null | defmodule CustomEventTest do
use ExUnit.Case
alias NewRelic.Harvest.Collector
alias NewRelic.Custom.Event
test "post a custom event" do
agent_run_id = Collector.AgentRun.agent_run_id()
tr_1 = %Event{
timestamp: System.system_time(:milliseconds) / 1_000,
type: "CustomEventTest",
attr... | 32.679487 | 95 | 0.728913 |
189b027f713874f318dcdd476a51e9ebdc23171e | 1,473 | ex | Elixir | lib/pton_web/views/error_helpers.ex | casey-chow/pton.co | c794dc6903326dc827f5cbd5c7a8e35868a0fa45 | [
"MIT"
] | null | null | null | lib/pton_web/views/error_helpers.ex | casey-chow/pton.co | c794dc6903326dc827f5cbd5c7a8e35868a0fa45 | [
"MIT"
] | 4 | 2017-10-18T15:52:20.000Z | 2017-10-19T00:18:38.000Z | lib/pton_web/views/error_helpers.ex | casey-chow/pton.co | c794dc6903326dc827f5cbd5c7a8e35868a0fa45 | [
"MIT"
] | null | null | null | defmodule PtonWeb.ErrorHelpers do
@moduledoc """
Conveniences for translating and building error messages.
"""
use Phoenix.HTML
@doc """
Returns an error class if field has an error, otherwise nothing.
"""
def error_class(form, field) do
if Keyword.has_key?(form.errors, field) do
"has-error"... | 28.326923 | 73 | 0.659199 |
189b21f3ec562714e3ed124b4891c05d4eadce24 | 1,882 | exs | Elixir | test/parser/definitions_parser_test.exs | dragonwasrobot/json_schema | 00363b64ebadbb885ff8eb01433cb0f36d54caaa | [
"MIT"
] | 3 | 2019-01-07T20:11:40.000Z | 2021-02-03T22:24:07.000Z | test/parser/definitions_parser_test.exs | dragonwasrobot/json_schema | 00363b64ebadbb885ff8eb01433cb0f36d54caaa | [
"MIT"
] | 13 | 2018-07-27T12:39:01.000Z | 2022-03-28T20:16:15.000Z | test/parser/definitions_parser_test.exs | dragonwasrobot/json_schema | 00363b64ebadbb885ff8eb01433cb0f36d54caaa | [
"MIT"
] | null | null | null | defmodule JsonSchemaTest.Parser.DefinitionsParser do
use ExUnit.Case
doctest JsonSchema.Parser.DefinitionsParser, import: true
alias JsonSchema.{Parser, Types}
alias Parser.RootParser
alias Types.{ArrayType, PrimitiveType, SchemaDefinition, TypeReference}
test "parse definitions" do
schema_result =
... | 28.515152 | 73 | 0.607333 |
189b25ed39ad267f6b9ad6cccbf0bcf33ffd6750 | 2,748 | ex | Elixir | lib/nosedrum/storage.ex | Bentheburrito/nosedrum | 944fd69a640473c4fb8fe3b3bdefc3522c5757a0 | [
"0BSD"
] | 25 | 2019-02-10T01:22:02.000Z | 2022-03-16T08:34:04.000Z | lib/nosedrum/storage.ex | Bentheburrito/nosedrum | 944fd69a640473c4fb8fe3b3bdefc3522c5757a0 | [
"0BSD"
] | 19 | 2019-04-11T19:02:18.000Z | 2022-02-18T18:32:13.000Z | lib/nosedrum/storage.ex | Bentheburrito/nosedrum | 944fd69a640473c4fb8fe3b3bdefc3522c5757a0 | [
"0BSD"
] | 6 | 2020-09-22T09:06:24.000Z | 2022-02-05T03:26:42.000Z | defmodule Nosedrum.Storage do
@moduledoc """
Storages contain commands and are used by command invokers to look up commands.
How you start a storage is up to the module itself - what is
expected is that storage modules implement the behaviours
documented in this module.
The public-facing API of storage mo... | 36.157895 | 93 | 0.69869 |
189b800c2c7cbf4f5cc9fc46623c451dd4f8bd17 | 3,244 | ex | Elixir | clients/dfa_reporting/lib/google_api/dfa_reporting/v35/model/reports_configuration.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/dfa_reporting/lib/google_api/dfa_reporting/v35/model/reports_configuration.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/dfa_reporting/lib/google_api/dfa_reporting/v35/model/reports_configuration.ex | dazuma/elixir-google-api | 6a9897168008efe07a6081d2326735fe332e522c | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 60.074074 | 1,126 | 0.723798 |
189b813927937ebc7cfb4e977b363664361995f1 | 2,471 | ex | Elixir | elixir/elixir-mars-water/lib/util/max_heap.ex | marcinbiegun/exercises | 36ad942e8d40d6471136326a3f6d09285bbd90aa | [
"MIT"
] | 1 | 2018-12-11T14:09:14.000Z | 2018-12-11T14:09:14.000Z | elixir/elixir-mars-water/lib/util/max_heap.ex | marcinbiegun/exercises | 36ad942e8d40d6471136326a3f6d09285bbd90aa | [
"MIT"
] | null | null | null | elixir/elixir-mars-water/lib/util/max_heap.ex | marcinbiegun/exercises | 36ad942e8d40d6471136326a3f6d09285bbd90aa | [
"MIT"
] | null | null | null | defmodule MarsWater.Util.MaxHeap do
alias MarsWater.Util.MaxHeap
defstruct list: {}, size: 0
# Unused first element to simplify getting parent / child
@max_priority 999_999_999
def new() do
%MaxHeap{list: {{@max_priority, nil}}, size: 0}
end
def insert(%MaxHeap{list: list, size: size}, {priority, _d... | 24.22549 | 84 | 0.621611 |
189b9f01b0350ec1b07d68dcc02a6ae93de9b309 | 155 | ex | Elixir | lib/farmbot/celery_script/ast/node/explanation.ex | pdgonzalez872/farmbot_os | a444248f05ee8f4fe57f6a4865b942131960f76c | [
"MIT"
] | 2 | 2018-08-01T23:07:52.000Z | 2018-10-17T12:49:21.000Z | lib/farmbot/celery_script/ast/node/explanation.ex | pdgonzalez872/farmbot_os | a444248f05ee8f4fe57f6a4865b942131960f76c | [
"MIT"
] | null | null | null | lib/farmbot/celery_script/ast/node/explanation.ex | pdgonzalez872/farmbot_os | a444248f05ee8f4fe57f6a4865b942131960f76c | [
"MIT"
] | 1 | 2017-07-22T21:51:14.000Z | 2017-07-22T21:51:14.000Z | defmodule Farmbot.CeleryScript.AST.Node.Explanation do
@moduledoc false
use Farmbot.CeleryScript.AST.Node
allow_args [:message]
return_self()
end
| 19.375 | 54 | 0.787097 |
189bac56de90eaeadf3b1efffa79080539ff39d5 | 782 | ex | Elixir | lib/geef/repository.ex | kjg/geef | 9e9aa23af7614cb398e99fb06019884af2cbcd79 | [
"MIT"
] | 107 | 2015-01-08T12:05:20.000Z | 2022-03-21T20:36:43.000Z | lib/geef/repository.ex | kjg/geef | 9e9aa23af7614cb398e99fb06019884af2cbcd79 | [
"MIT"
] | 9 | 2015-03-11T18:32:24.000Z | 2020-03-29T21:08:55.000Z | lib/geef/repository.ex | kjg/geef | 9e9aa23af7614cb398e99fb06019884af2cbcd79 | [
"MIT"
] | 28 | 2015-03-03T16:01:26.000Z | 2022-02-20T19:18:03.000Z | defmodule Geef.Repository do
import Geef
def stop(repo), do: :geef_repo.stop(repo)
def open(path), do: :geef_repo.open(path)
def open!(path), do: :geef_repo.open(path) |> assert_ok
def init(path, bare), do: :geef_repo.init(path, bare)
def init!(path, bare), do: :geef_repo.init(path, bare) |> assert_ok
... | 31.28 | 69 | 0.694373 |
189bb90d69bf52bacfa0e97c971432788dab9599 | 3,849 | ex | Elixir | jpcarver+elixir/day11/lib/day11.ex | NashFP/avent-2021 | d2f4648e904c9105514fd68db2dfe3b0e682093d | [
"MIT"
] | 2 | 2021-11-24T12:54:15.000Z | 2022-01-20T11:02:11.000Z | jpcarver+elixir/day11/lib/day11.ex | NashFP/advent-2021 | d2f4648e904c9105514fd68db2dfe3b0e682093d | [
"MIT"
] | null | null | null | jpcarver+elixir/day11/lib/day11.ex | NashFP/advent-2021 | d2f4648e904c9105514fd68db2dfe3b0e682093d | [
"MIT"
] | null | null | null | defmodule Day11 do
def part1(file_name \\ "test1.txt") do
file_name
|> parse()
|> grid()
|> steps(100)
|> total_flashes()
end
def part2(file_name \\ "test2.txt") do
file_name
|> parse()
|> grid()
|> find_step_all_flashing()
end
def find_step_all_flashing(grid, step \\ 1)
... | 25.66 | 109 | 0.590803 |
189bd52182939d15cab8f44bd65fc160b2aa3db3 | 5,697 | exs | Elixir | apps/admin_api/test/admin_api/v1/controllers/provider_auth/mint_controller_test.exs | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | null | null | null | apps/admin_api/test/admin_api/v1/controllers/provider_auth/mint_controller_test.exs | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | null | null | null | apps/admin_api/test/admin_api/v1/controllers/provider_auth/mint_controller_test.exs | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | null | null | null | defmodule AdminAPI.V1.ProviderAuth.MintControllerTest do
use AdminAPI.ConnCase, async: true
alias EWallet.MintGate
alias EWallet.Web.Date
alias EWallet.Web.V1.{AccountSerializer, TokenSerializer, TransactionSerializer}
alias EWalletDB.{Repo, Mint}
describe "/token.get_mints" do
test "returns a list of ... | 31.475138 | 96 | 0.585571 |
189c0a5f5c5d6607841aa77182c337e1cdeda9a6 | 2,087 | ex | Elixir | lib/game/command/whisper.ex | deep-spaced/ex_venture | 45848abe509620d6d2643b2a780dab01c1ac523b | [
"MIT"
] | null | null | null | lib/game/command/whisper.ex | deep-spaced/ex_venture | 45848abe509620d6d2643b2a780dab01c1ac523b | [
"MIT"
] | null | null | null | lib/game/command/whisper.ex | deep-spaced/ex_venture | 45848abe509620d6d2643b2a780dab01c1ac523b | [
"MIT"
] | null | null | null | defmodule Game.Command.Whisper do
@moduledoc """
The "whisper" command
"""
use Game.Command
import Game.Room.Helpers, only: [find_character: 3]
alias Game.Character
alias Game.Utility
commands(["whisper"], parse: false)
@impl Game.Command
def help(:topic), do: "Whisper"
def help(:short), do: ... | 25.765432 | 85 | 0.63632 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.