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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
798749324ea20fa6021c4a5f91c435b4abfd1ebe | 825 | ex | Elixir | web/router.ex | avinoth/spaces | 00bec5adf4568fef73b49e57808033295a837931 | [
"MIT"
] | 1 | 2016-09-13T10:40:53.000Z | 2016-09-13T10:40:53.000Z | web/router.ex | avinoth/spaces | 00bec5adf4568fef73b49e57808033295a837931 | [
"MIT"
] | null | null | null | web/router.ex | avinoth/spaces | 00bec5adf4568fef73b49e57808033295a837931 | [
"MIT"
] | null | null | null | defmodule Spaces.Router do
use Spaces.Web, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
end
pipeline :api do
plug :accepts, ["json"]
end
scope "/", Spaces do
pipe_through ... | 22.916667 | 65 | 0.683636 |
79875ab5e5d35e8dce615b9c36a3d4a756ce422f | 711 | ex | Elixir | lib/twaddler_web/gettext.ex | woeye/twaddler | e06a22a94520055bc33aaaacfe51989ba8ab665f | [
"Apache-2.0"
] | 1 | 2018-10-08T13:57:08.000Z | 2018-10-08T13:57:08.000Z | lib/twaddler_web/gettext.ex | woeye/twaddler | e06a22a94520055bc33aaaacfe51989ba8ab665f | [
"Apache-2.0"
] | null | null | null | lib/twaddler_web/gettext.ex | woeye/twaddler | e06a22a94520055bc33aaaacfe51989ba8ab665f | [
"Apache-2.0"
] | 1 | 2018-10-08T13:55:44.000Z | 2018-10-08T13:55:44.000Z | defmodule TwaddlerWeb.Gettext do
@moduledoc """
A module providing Internationalization with a gettext-based API.
By using [Gettext](https://hexdocs.pm/gettext),
your module gains a set of macros for translations, for example:
import TwaddlerWeb.Gettext
# Simple translation
gettext "Here is... | 28.44 | 72 | 0.682138 |
798794eb7ca0d436d82ea6fd95dbc369f754ce6c | 2,782 | exs | Elixir | mix.exs | jwarlander/appsignal-elixir | b0a8a366370cf01a407a381a3041d0f6516f476e | [
"MIT"
] | null | null | null | mix.exs | jwarlander/appsignal-elixir | b0a8a366370cf01a407a381a3041d0f6516f476e | [
"MIT"
] | null | null | null | mix.exs | jwarlander/appsignal-elixir | b0a8a366370cf01a407a381a3041d0f6516f476e | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.Compile.Appsignal do
use Mix.Task
def run(_args) do
{_, _} = Code.eval_file("mix_helpers.exs")
Mix.Appsignal.Helper.install()
end
end
defmodule Appsignal.Mixfile do
use Mix.Project
def project do
[
app: :appsignal,
version: "1.9.3",
name: "AppSignal",
... | 27.27451 | 97 | 0.568656 |
7987a9f58697bde1df2c956c75ce4f2930464de6 | 550 | exs | Elixir | test/joi/validator/required_test.exs | scottming/joi | 1c7546bb0473fa53325533c7ab4aec402bfba0d1 | [
"MIT"
] | 25 | 2020-12-03T08:14:51.000Z | 2021-09-01T15:34:30.000Z | test/joi/validator/required_test.exs | scottming/joi | 1c7546bb0473fa53325533c7ab4aec402bfba0d1 | [
"MIT"
] | 5 | 2021-02-13T12:56:56.000Z | 2021-07-30T01:27:51.000Z | test/joi/validator/required_test.exs | scottming/joi | 1c7546bb0473fa53325533c7ab4aec402bfba0d1 | [
"MIT"
] | 2 | 2021-03-15T00:37:13.000Z | 2021-07-26T15:21:55.000Z | defmodule Joi.Validator.RequiredTest do
use ExUnit.Case, async: true
import Joi.Support.Util
@field :field
describe "required test" do
for t <- all_types() do
test "error: with nil field when validate #{t} type" do
data = %{@field => nil}
type_module = unquote(t) |> atom_type_to_mod(... | 27.5 | 88 | 0.621818 |
7987b054ed5f8f39959a2dba64ed387775425ec1 | 3,188 | ex | Elixir | lib/tai_shang/nft_plus_fetcher.ex | leeduckgo/Tai-Shang | 33831f54b0ef8eb7772b0b559d8fe8897a06b57c | [
"MIT"
] | 17 | 2021-06-10T07:39:18.000Z | 2021-12-16T03:26:53.000Z | lib/tai_shang/nft_plus_fetcher.ex | leeduckgo/Tai-Shang | 33831f54b0ef8eb7772b0b559d8fe8897a06b57c | [
"MIT"
] | 4 | 2021-05-19T02:09:53.000Z | 2021-07-03T09:34:09.000Z | lib/tai_shang/nft_plus_fetcher.ex | leeduckgo/Tai-Shang | 33831f54b0ef8eb7772b0b559d8fe8897a06b57c | [
"MIT"
] | 4 | 2021-07-06T02:50:29.000Z | 2021-12-21T09:33:20.000Z | defmodule TaiShang.NFTPlusFetcher do
@moduledoc """
Fetch NFT-Plus
"""
alias TaiShang.{KeyGenerator, NFTPlusInteractor}
@contract_keys [:limits, :rules]
def fetch_tokens_info(chain_id, evi_contract_addr, erc721_contract_addr, token_id_list) do
Enum.map(token_id_list, fn token_id ->
owner = NFT... | 25.102362 | 94 | 0.664994 |
7987f2de53cf6c7bb74a402e4314969ee2fa3618 | 526 | exs | Elixir | test/subtype_test.exs | PokemonTCG/pokemon-tcg-sdk-elixir | f8866044f4a5439408e04b7a68e893a8bbc1712c | [
"MIT"
] | 7 | 2016-09-01T14:33:45.000Z | 2021-10-01T03:42:06.000Z | test/subtype_test.exs | PokemonTCG/pokemon-tcg-sdk-elixir | f8866044f4a5439408e04b7a68e893a8bbc1712c | [
"MIT"
] | 1 | 2016-09-06T02:03:22.000Z | 2016-09-08T01:03:11.000Z | test/subtype_test.exs | PokemonTCG/pokemon-tcg-sdk-elixir | f8866044f4a5439408e04b7a68e893a8bbc1712c | [
"MIT"
] | 3 | 2017-11-21T16:01:51.000Z | 2021-10-01T03:42:07.000Z | defmodule Pokemon.SubtypeTest do
use ExUnit.Case
use ExVCR.Mock, adapter: ExVCR.Adapter.Hackney
setup_all do
ExVCR.Config.cassette_library_dir("fixture/vcr_cassettes", "fixture/custom_cassettes")
end
test "resource returns subtypes" do
assert Pokemon.Subtype.resource === "subtypes"
end
test "te... | 25.047619 | 90 | 0.722433 |
7988197d2d247ed2e23800ae8efb49f16620d421 | 6,008 | ex | Elixir | lib/cafex/producer/worker.ex | MishaConway/cafex | 32965b7e099bc45de24c229cc76f7b83b35ff7b4 | [
"Apache-2.0"
] | null | null | null | lib/cafex/producer/worker.ex | MishaConway/cafex | 32965b7e099bc45de24c229cc76f7b83b35ff7b4 | [
"Apache-2.0"
] | null | null | null | lib/cafex/producer/worker.ex | MishaConway/cafex | 32965b7e099bc45de24c229cc76f7b83b35ff7b4 | [
"Apache-2.0"
] | null | null | null | defmodule Cafex.Producer.Worker do
use GenServer
defmodule State do
@moduledoc false
defstruct broker: nil,
topic: nil,
partition: nil,
client_id: nil,
conn: nil,
acks: 1,
batch_num: nil,
batches: [],
... | 31.455497 | 127 | 0.519973 |
79881ad4f29223d9a79e42de338baed62cb27149 | 8,189 | exs | Elixir | exercises/scale-generator/scale_generator_test.exs | jerith/elixir | 9a3f2a2fbee26a7b6a6b3ad74a9e6d1ff2495ed4 | [
"Apache-2.0"
] | null | null | null | exercises/scale-generator/scale_generator_test.exs | jerith/elixir | 9a3f2a2fbee26a7b6a6b3ad74a9e6d1ff2495ed4 | [
"Apache-2.0"
] | null | null | null | exercises/scale-generator/scale_generator_test.exs | jerith/elixir | 9a3f2a2fbee26a7b6a6b3ad74a9e6d1ff2495ed4 | [
"Apache-2.0"
] | 1 | 2018-07-19T23:43:56.000Z | 2018-07-19T23:43:56.000Z | if !System.get_env("EXERCISM_TEST_EXAMPLES") do
Code.load_file("scale_generator.exs", __DIR__)
end
ExUnit.start()
ExUnit.configure(trace: true, exclude: :pending)
defmodule ScaleGeneratorTest do
use ExUnit.Case
@major_scale_pattern "MMmMMMm"
@minor_scale_pattern "MmMMmMM"
@dorian_scale_pattern "MmMMMmM"
... | 29.039007 | 94 | 0.618146 |
798823bd5bfdb219c8eb3df83000ad6347a1974c | 2,213 | ex | Elixir | clients/you_tube/lib/google_api/you_tube/v3/model/live_chat_super_chat_details.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/you_tube/lib/google_api/you_tube/v3/model/live_chat_super_chat_details.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/you_tube/lib/google_api/you_tube/v3/model/live_chat_super_chat_details.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 ... | 37.508475 | 151 | 0.70357 |
79883505a90e65ea290936a9467b7e926b500730 | 1,553 | ex | Elixir | clients/dataflow/lib/google_api/dataflow/v1b3/model/launch_template_response.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/dataflow/lib/google_api/dataflow/v1b3/model/launch_template_response.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/dataflow/lib/google_api/dataflow/v1b3/model/launch_template_response.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... | 32.354167 | 134 | 0.755956 |
79883b9fa6a65fdcef7dcafd85a77a15590ed73f | 1,411 | ex | Elixir | lib/possible_unused_methods/token_locator.ex | joshuaclayton/possible_unused_methods | dd9f01d41f9433a6be8cc55e6de8d2f6c038c9dd | [
"MIT"
] | 4 | 2016-01-25T17:20:02.000Z | 2019-05-20T15:34:24.000Z | lib/possible_unused_methods/token_locator.ex | joshuaclayton/possible_unused_methods | dd9f01d41f9433a6be8cc55e6de8d2f6c038c9dd | [
"MIT"
] | null | null | null | lib/possible_unused_methods/token_locator.ex | joshuaclayton/possible_unused_methods | dd9f01d41f9433a6be8cc55e6de8d2f6c038c9dd | [
"MIT"
] | 1 | 2019-06-19T16:05:04.000Z | 2019-06-19T16:05:04.000Z | defmodule PossibleUnusedMethods.TokenLocator do
@moduledoc """
Searches a given codebase for a list of tokens using The Silver Searcher
(https://github.com/ggreer/the_silver_searcher).
This returns a map with tokens mapped to a map of files and the number of
occurrences per file:
%{
"first_name" => %{... | 24.327586 | 75 | 0.603118 |
7988428159c680ac3de3763d7adb21dc748397b5 | 5,976 | exs | Elixir | test/twirp/client_test.exs | daskycodes/twirp-elixir | 51b701111a3b33601980703417388cd099dc7e44 | [
"Apache-2.0"
] | 30 | 2019-11-03T16:30:13.000Z | 2020-06-23T19:38:53.000Z | test/twirp/client_test.exs | daskycodes/twirp-elixir | 51b701111a3b33601980703417388cd099dc7e44 | [
"Apache-2.0"
] | 16 | 2020-03-13T17:56:16.000Z | 2020-06-11T10:40:02.000Z | test/twirp/client_test.exs | daskycodes/twirp-elixir | 51b701111a3b33601980703417388cd099dc7e44 | [
"Apache-2.0"
] | 3 | 2019-12-05T16:43:15.000Z | 2020-05-11T21:34:44.000Z | defmodule Twirp.ClientTest do
use ExUnit.Case, async: false
alias Twirp.Error
alias Twirp.Test.Req
alias Twirp.Test.Resp
alias Twirp.Test.EchoClient, as: Client
setup tags do
service = Bypass.open()
base_url = "http://localhost:#{service.port}"
content_type = tags[:client_type] || :proto
... | 30.963731 | 101 | 0.626171 |
7988797f3e41e0d7ec1394d1165aa5e1d736e12b | 6,018 | exs | Elixir | .credo.exs | pay-it-off/dwolla-elixir | ea71c44ed1b02be5cf416225b872490a4f7e4bf9 | [
"MIT"
] | null | null | null | .credo.exs | pay-it-off/dwolla-elixir | ea71c44ed1b02be5cf416225b872490a4f7e4bf9 | [
"MIT"
] | null | null | null | .credo.exs | pay-it-off/dwolla-elixir | ea71c44ed1b02be5cf416225b872490a4f7e4bf9 | [
"MIT"
] | 1 | 2022-02-13T17:14:59.000Z | 2022-02-13T17:14:59.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 ... | 37.6125 | 91 | 0.633267 |
7988917238112f78e3c75e902b97fedd99e51c40 | 4,448 | ex | Elixir | clients/plus_domains/lib/google_api/plus_domains/v1/model/activity_object_attachments.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/plus_domains/lib/google_api/plus_domains/v1/model/activity_object_attachments.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/plus_domains/lib/google_api/plus_domains/v1/model/activity_object_attachments.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 ... | 48.879121 | 339 | 0.717176 |
79889940f8a9649d36638c6b8c3ebdccbd022bba | 302 | ex | Elixir | lib/events_dashboard/banking_details.ex | Hermanlangner/events_dashboard | 30d5d3666ac8057bfd91dd33131d8132c97cfec9 | [
"MIT"
] | null | null | null | lib/events_dashboard/banking_details.ex | Hermanlangner/events_dashboard | 30d5d3666ac8057bfd91dd33131d8132c97cfec9 | [
"MIT"
] | null | null | null | lib/events_dashboard/banking_details.ex | Hermanlangner/events_dashboard | 30d5d3666ac8057bfd91dd33131d8132c97cfec9 | [
"MIT"
] | null | null | null | defmodule EventsDashboard.BankingDetails do
use Ecto.Schema
import Ecto.Changeset
schema "banking_details" do
field :customer_id, :integer
field :account_number, :integer
end
def changeset(struct, params) do
struct
|> cast(params, [:account_number, :customer_id])
end
end
| 20.133333 | 52 | 0.728477 |
7988c0c40163b396233eb98b1258c0f5ee4370e3 | 458 | ex | Elixir | apps/gitgud_web/test/support/data_factory.ex | rogervezaro/gitgud | 6656f8c2df16817a6c5325fb4c18b03f9d3f7140 | [
"MIT"
] | 449 | 2018-03-06T01:05:55.000Z | 2022-03-23T21:03:56.000Z | apps/gitgud_web/test/support/data_factory.ex | rogervezaro/gitgud | 6656f8c2df16817a6c5325fb4c18b03f9d3f7140 | [
"MIT"
] | 69 | 2018-03-06T09:26:41.000Z | 2022-03-21T22:43:09.000Z | apps/gitgud_web/test/support/data_factory.ex | rogervezaro/gitgud | 6656f8c2df16817a6c5325fb4c18b03f9d3f7140 | [
"MIT"
] | 41 | 2018-03-06T01:06:07.000Z | 2021-11-21T17:55:04.000Z | defmodule GitGud.Web.DataFactory do
@moduledoc """
This module provides functions to generate all kind of test data.
"""
@doc false
defmacro __using__(_opts) do
quote do
def factory(name, params \\ []) do
try do
apply(unquote(__MODULE__), name, List.wrap(params))
rescue
... | 21.809524 | 67 | 0.617904 |
7988ef89dc49e5144f9f62251c96a25f5010455e | 1,649 | ex | Elixir | apps/flair/lib/flair/durations.ex | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | 26 | 2019-09-20T23:54:45.000Z | 2020-08-20T14:23:32.000Z | apps/flair/lib/flair/durations.ex | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | 757 | 2019-08-15T18:15:07.000Z | 2020-09-18T20:55:31.000Z | apps/flair/lib/flair/durations.ex | jakeprem/smartcitiesdata | da309ac0d2261527278951cbae88604455207589 | [
"Apache-2.0"
] | 9 | 2019-11-12T16:43:46.000Z | 2020-03-25T16:23:16.000Z | defmodule Flair.Durations do
@moduledoc """
Calculate durations.
This is done first by reducing multiple data messages to an accumulater,
and then second by calculating the durations for those aggregate metrics.
"""
alias SmartCity.Data
@doc """
Aggregates data messages into a mapping of dataset ids... | 30.537037 | 92 | 0.67071 |
7988faedd410ea429173ed0d31173d22c5194efb | 728 | ex | Elixir | lib/boots_of_speed_web/gettext.ex | Baradoy/boots_of_speed | 6004da8fb43e15cb7443e0bd00fe70c936a41015 | [
"MIT"
] | 1 | 2019-04-18T05:10:21.000Z | 2019-04-18T05:10:21.000Z | lib/boots_of_speed_web/gettext.ex | Baradoy/boots_of_speed | 6004da8fb43e15cb7443e0bd00fe70c936a41015 | [
"MIT"
] | 3 | 2020-07-16T17:41:44.000Z | 2021-05-08T03:39:49.000Z | lib/boots_of_speed_web/gettext.ex | Baradoy/boots_of_speed | 6004da8fb43e15cb7443e0bd00fe70c936a41015 | [
"MIT"
] | null | null | null | defmodule BootsOfSpeedWeb.Gettext do
@moduledoc """
A module providing Internationalization with a gettext-based API.
By using [Gettext](https://hexdocs.pm/gettext),
your module gains a set of macros for translations, for example:
import BootsOfSpeedWeb.Gettext
# Simple translation
gettext(... | 29.12 | 72 | 0.68544 |
79890cfc26daaaab556110e18ade8bcdec8f30cd | 830 | exs | Elixir | priv/repo/migrations/20140623215331_add_package_owners_table.exs | Benjamin-Philip/hexpm | 6f38244f81bbabd234c660f46ea973849ba77a7f | [
"Apache-2.0"
] | 691 | 2017-03-08T09:15:45.000Z | 2022-03-23T22:04:47.000Z | priv/repo/migrations/20140623215331_add_package_owners_table.exs | Benjamin-Philip/hexpm | 6f38244f81bbabd234c660f46ea973849ba77a7f | [
"Apache-2.0"
] | 491 | 2017-03-07T12:58:42.000Z | 2022-03-29T23:32:54.000Z | priv/repo/migrations/20140623215331_add_package_owners_table.exs | Benjamin-Philip/hexpm | 6f38244f81bbabd234c660f46ea973849ba77a7f | [
"Apache-2.0"
] | 200 | 2017-03-12T23:03:39.000Z | 2022-03-05T17:55:52.000Z | defmodule Hexpm.Repo.Migrations.AddPackageOwnersTable do
use Ecto.Migration
def up() do
execute("""
CREATE TABLE package_owners (
id serial PRIMARY KEY,
package_id integer REFERENCES packages,
owner_id integer REFERENCES users)
""")
execute("CREATE INDEX ON package_owners... | 24.411765 | 73 | 0.679518 |
79890fff84b3d0989487d213e0b409a92696cfc8 | 1,113 | exs | Elixir | elixir-22/config/config.exs | rikkus/adventofcode2016 | dceb9af8e3f1f460109bb881e9d9d33fb0892d6e | [
"MIT"
] | null | null | null | elixir-22/config/config.exs | rikkus/adventofcode2016 | dceb9af8e3f1f460109bb881e9d9d33fb0892d6e | [
"MIT"
] | null | null | null | elixir-22/config/config.exs | rikkus/adventofcode2016 | dceb9af8e3f1f460109bb881e9d9d33fb0892d6e | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the paren... | 35.903226 | 73 | 0.750225 |
798917c6d5cf2f5f06a4c7c9486647c80d80e673 | 26,095 | ex | Elixir | lib/elixir/lib/task.ex | Zanadar/elixir | ef967b3e07f189b9cae37d5b12bd7258619b3e15 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/task.ex | Zanadar/elixir | ef967b3e07f189b9cae37d5b12bd7258619b3e15 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/task.ex | Zanadar/elixir | ef967b3e07f189b9cae37d5b12bd7258619b3e15 | [
"Apache-2.0"
] | null | null | null | defmodule Task do
@moduledoc """
Conveniences for spawning and awaiting tasks.
Tasks are processes meant to execute one particular
action throughout their lifetime, often with little or no
communication with other processes. The most common use case
for tasks is to convert sequential code into concurrent c... | 34.380764 | 103 | 0.673079 |
7989407303fd5f044d98e06eedceb11b20a41e79 | 5,593 | ex | Elixir | lib/ex_bitmex/web_socket.ex | eduardoscottini/ex_bitmex | f8528bd635922e1777a5b01ea4941d625da7396e | [
"MIT"
] | 6 | 2019-02-13T04:05:19.000Z | 2020-12-31T07:40:09.000Z | lib/ex_bitmex/web_socket.ex | eduardoscottini/ex_bitmex | f8528bd635922e1777a5b01ea4941d625da7396e | [
"MIT"
] | 28 | 2021-03-29T06:46:42.000Z | 2022-03-28T11:03:38.000Z | lib/ex_bitmex/web_socket.ex | yurikoval/ex_bitmex | d9492789fb319fbdf78d90a99f7c0e40c95c1885 | [
"MIT"
] | 4 | 2019-05-03T21:27:10.000Z | 2021-01-12T09:26:34.000Z | defmodule ExBitmex.WebSocket do
@moduledoc """
BitMEX WebSocket client.
"""
import Process, only: [send_after: 3]
defmacro __using__(_opts) do
quote do
use WebSockex
require Logger
## API
def start_link(args \\ %{}) do
subscription = args[:subscribe] || []
auth_... | 27.150485 | 97 | 0.548006 |
798950c7583214bbdf239acb551f704664182ee4 | 3,200 | ex | Elixir | clients/run/lib/google_api/run/v1/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/run/lib/google_api/run/v1/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/run/lib/google_api/run/v1/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... | 57.142857 | 1,092 | 0.730938 |
79897b9398a77dec325ea67c9dab9d67f0419fa5 | 888 | exs | Elixir | test/test_helper.exs | pguillory/hypex | bc6e315ea2471fc0604c81589984c7ab82c0088c | [
"MIT"
] | 14 | 2018-01-02T15:35:36.000Z | 2021-08-30T21:41:55.000Z | test/test_helper.exs | pguillory/hypex | bc6e315ea2471fc0604c81589984c7ab82c0088c | [
"MIT"
] | 2 | 2019-04-26T03:39:01.000Z | 2020-03-26T06:22:06.000Z | test/test_helper.exs | pguillory/hypex | bc6e315ea2471fc0604c81589984c7ab82c0088c | [
"MIT"
] | 2 | 2018-06-22T00:50:41.000Z | 2020-03-25T18:28:23.000Z | ExUnit.start()
defmodule TestHelper do
def calculate_m(b) do
2
|> :math.pow(b)
|> round
|> (&(&1 * b)).()
end
def read_files_r(root) do
root
|> File.ls!
|> Enum.map(&(Path.join(root, &1)))
|> Enum.reduce([], fn(path, paths) ->
if File.dir?(path) do
[read_files_... | 18.122449 | 41 | 0.541667 |
798a070cace53b568eaf30f5afd76de0a9d6132b | 2,188 | ex | Elixir | clients/app_engine/lib/google_api/app_engine/v1/model/standard_scheduler_settings.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/app_engine/lib/google_api/app_engine/v1/model/standard_scheduler_settings.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/app_engine/lib/google_api/app_engine/v1/model/standard_scheduler_settings.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... | 39.071429 | 167 | 0.734461 |
798a28daed7fd88a19c92815efb402f89377b608 | 148 | exs | Elixir | test/ex_double_entry/guard_test.exs | coinjar/ex_double_entry | e2fde666daac1b42e7a32f704dabb61f8283a70c | [
"MIT"
] | 9 | 2022-02-05T08:00:05.000Z | 2022-03-20T04:53:46.000Z | test/ex_double_entry/guard_test.exs | coinjar/ex_double_entry | e2fde666daac1b42e7a32f704dabb61f8283a70c | [
"MIT"
] | 1 | 2022-02-24T06:14:07.000Z | 2022-02-24T06:14:07.000Z | test/ex_double_entry/guard_test.exs | coinjar/ex_double_entry | e2fde666daac1b42e7a32f704dabb61f8283a70c | [
"MIT"
] | 1 | 2022-02-24T02:54:01.000Z | 2022-02-24T02:54:01.000Z | defmodule ExDoubleEntry.GuardTest do
use ExDoubleEntry.DataCase, async: true
alias ExDoubleEntry.{Account, Guard, Transfer}
doctest Guard
end
| 24.666667 | 48 | 0.804054 |
798a76d7fd342cf84f165b8d103b159a7048df62 | 9,208 | ex | Elixir | clients/poly/lib/google_api/poly/v1/api/users.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/poly/lib/google_api/poly/v1/api/users.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/poly/lib/google_api/poly/v1/api/users.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... | 47.958333 | 196 | 0.635209 |
798a90937c57fa03463e9ffb28d7f0d55305ca5d | 493 | ex | Elixir | fade/lib/snapshot/types/broker_runtime_snapshot.ex | ahives/Fade | 7094b6703933e41a1400b1053764335e32928b0a | [
"Apache-2.0"
] | null | null | null | fade/lib/snapshot/types/broker_runtime_snapshot.ex | ahives/Fade | 7094b6703933e41a1400b1053764335e32928b0a | [
"Apache-2.0"
] | null | null | null | fade/lib/snapshot/types/broker_runtime_snapshot.ex | ahives/Fade | 7094b6703933e41a1400b1053764335e32928b0a | [
"Apache-2.0"
] | null | null | null | defmodule Fade.Snapshot.Types.BrokerRuntimeSnapshot do
use TypedStruct
alias Fade.Snapshot.Types.{GarbageCollection, RuntimeDatabase, RuntimeProcessChurnMetrics}
typedstruct do
field(:identifier, String.t())
field(:cluster_identifier, String.t())
field(:version, String.t())
field(:processes, Run... | 29 | 92 | 0.738337 |
798a9257968b6de2f85ef399952b3c50e3e43acb | 1,946 | ex | Elixir | lib/generator.ex | cthree/ExCRC | 1e9a110ec156f64aed1fb00d3c7274d56e113ce9 | [
"Apache-2.0"
] | 4 | 2018-01-21T07:35:30.000Z | 2021-10-20T10:17:34.000Z | lib/generator.ex | cthree/ExCRC | 1e9a110ec156f64aed1fb00d3c7274d56e113ce9 | [
"Apache-2.0"
] | null | null | null | lib/generator.ex | cthree/ExCRC | 1e9a110ec156f64aed1fb00d3c7274d56e113ce9 | [
"Apache-2.0"
] | 1 | 2018-07-10T11:28:52.000Z | 2018-07-10T11:28:52.000Z | defmodule ExCRC.Generator do
@moduledoc """
Functions used to generate the static tables included by this library
"""
use Bitwise
#
# Provide `print_crc_table/2` with a map and it will print the
# map in Elixir syntax which can be used statically. This is used to
# generate the tables in the `ExCRC.... | 26.657534 | 74 | 0.549332 |
798a9d673f1588f9c171281522ea0a8c3920eda0 | 115 | ex | Elixir | lib/blog/mailer.ex | ench0/blog | 04f7df2357b13dddee9d82cd1c35bbd0ce9618a9 | [
"MIT"
] | 2 | 2017-06-08T23:28:13.000Z | 2017-06-08T23:28:16.000Z | lib/blog/mailer.ex | ench0/blog | 04f7df2357b13dddee9d82cd1c35bbd0ce9618a9 | [
"MIT"
] | null | null | null | lib/blog/mailer.ex | ench0/blog | 04f7df2357b13dddee9d82cd1c35bbd0ce9618a9 | [
"MIT"
] | null | null | null | defmodule Blog.Mailer do
@moduledoc """
Swoosh mailer for Blog.
"""
use Swoosh.Mailer, otp_app: :blog
end
| 14.375 | 35 | 0.678261 |
798aaed2ab1fddb26e5508a45881883c93f3fb1c | 824 | exs | Elixir | binariesstringscharlist/binariesbitstrings.exs | ezkemboi/elixir | 5641c8c9cc24b5e51546328b7fbba04d3b28e3b2 | [
"Apache-2.0"
] | 1 | 2020-01-21T19:58:41.000Z | 2020-01-21T19:58:41.000Z | binariesstringscharlist/binariesbitstrings.exs | ezkemboi/elixir | 5641c8c9cc24b5e51546328b7fbba04d3b28e3b2 | [
"Apache-2.0"
] | null | null | null | binariesstringscharlist/binariesbitstrings.exs | ezkemboi/elixir | 5641c8c9cc24b5e51546328b7fbba04d3b28e3b2 | [
"Apache-2.0"
] | null | null | null | # defining binary using << >>
IO.inspect <<1, 2, 3>> # will print <<1, 2, 3>>
# size of byte
IO.puts byte_size(<< 1,2,3 >>)
# binary is a sequence of bytes
IO.puts String.valid?(<<239, 191, 19>>) # returns false
# binary concatanation operator/string concatanation
IO.inspect <<1, 2, 3>> <> <<4, 5>>
# concatinate inner ... | 34.333333 | 70 | 0.669903 |
798ac831da25acc2b01f1907dcb5ce8331a61707 | 870 | exs | Elixir | test/secrets_cache_test.exs | FloatingGhost/secrets_cache | 72cb49ee5ba51e21d516ad729943cbd97d972e25 | [
"MIT"
] | 1 | 2020-05-11T09:00:53.000Z | 2020-05-11T09:00:53.000Z | test/secrets_cache_test.exs | FloatingGhost/secrets_cache | 72cb49ee5ba51e21d516ad729943cbd97d972e25 | [
"MIT"
] | null | null | null | test/secrets_cache_test.exs | FloatingGhost/secrets_cache | 72cb49ee5ba51e21d516ad729943cbd97d972e25 | [
"MIT"
] | null | null | null | defmodule SecretsCacheTest do
use ExUnit.Case
describe "Config merge" do
test "works for flat keys" do
secret = %{
key: "value"
}
|> Jason.encode!()
{:ok, true} = Cachex.put(:aws_secrets_cache, "test", secret)
Application.put_env(:my_app, :existing_key, "yui")
resu... | 25.588235 | 66 | 0.596552 |
798af181917cc5110f00c40b72530fa0e88a2081 | 1,138 | ex | Elixir | lib/nomex/response.ex | neojin/nomad-elixir | 95d169adcfe42549a4f7d8e939c7a47e211fbb04 | [
"ECL-2.0",
"Apache-2.0"
] | 5 | 2017-12-08T17:56:01.000Z | 2022-01-04T00:26:43.000Z | lib/nomex/response.ex | neojin/nomad-elixir | 95d169adcfe42549a4f7d8e939c7a47e211fbb04 | [
"ECL-2.0",
"Apache-2.0"
] | 6 | 2017-11-24T18:10:47.000Z | 2017-11-26T17:58:11.000Z | lib/nomex/response.ex | neojin/nomad-elixir | 95d169adcfe42549a4f7d8e939c7a47e211fbb04 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-07-20T15:27:13.000Z | 2021-07-20T15:27:13.000Z | defmodule Nomex.Response do
alias Nomex.Response
@type t :: %Response{
headers: list,
body: map,
request_url: String.t,
status_code: integer
}
defstruct headers: [], body: {}, request_url: "", status_code: 0
@typedoc """
tuple that wraps response from `HTTPoison`.
Returns the status of t... | 23.708333 | 67 | 0.65993 |
798b1e3a782a80e3860fd2cb2c4699aefe0f2a3d | 3,369 | ex | Elixir | lib/jumubase/accounts/user.ex | richeterre/jumubase-phoenix | 7584f890af117d496971b5284bf9de798e22266f | [
"MIT"
] | 2 | 2019-01-20T07:03:30.000Z | 2019-04-11T10:20:14.000Z | lib/jumubase/accounts/user.ex | richeterre/jumubase-phoenix | 7584f890af117d496971b5284bf9de798e22266f | [
"MIT"
] | 6 | 2018-09-20T05:52:14.000Z | 2019-04-23T19:27:39.000Z | lib/jumubase/accounts/user.ex | richeterre/jumubase-phoenix | 7584f890af117d496971b5284bf9de798e22266f | [
"MIT"
] | null | null | null | defmodule Jumubase.Accounts.User do
use Jumubase.Schema
import Ecto.Changeset
import Jumubase.Gettext
alias Jumubase.JumuParams
alias Jumubase.Utils
alias Jumubase.Accounts.User
alias Jumubase.Foundation.Host
schema "users" do
field :given_name, :string
field :family_name, :string
field :em... | 29.814159 | 95 | 0.689225 |
798b29ba4808d727f75a6b583329fbaf35745fc5 | 2,153 | ex | Elixir | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/creative_click_through_url.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/creative_click_through_url.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/creative_click_through_url.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... | 40.622642 | 357 | 0.740362 |
798b3993a020842a1702436b1847a58d0d0492c7 | 484 | ex | Elixir | lib/neko_caffe/registry/adoption.ex | kamiyuzu/neko_caffe | 84afd6559c89521ce95d27d65d2f0c3a88a92d11 | [
"MIT"
] | 2 | 2020-07-30T18:40:58.000Z | 2020-08-01T00:14:05.000Z | lib/neko_caffe/registry/adoption.ex | kamiyuzu/neko_caffe | 84afd6559c89521ce95d27d65d2f0c3a88a92d11 | [
"MIT"
] | null | null | null | lib/neko_caffe/registry/adoption.ex | kamiyuzu/neko_caffe | 84afd6559c89521ce95d27d65d2f0c3a88a92d11 | [
"MIT"
] | 1 | 2021-09-23T17:24:45.000Z | 2021-09-23T17:24:45.000Z | defmodule NekoCaffe.Registry.Adoption do
@moduledoc false
use Ecto.Schema
import Ecto.Changeset
alias NekoCaffe.Clients.Owner
schema "adoptions" do
field :worker_name, :string
field :owner_id, :id
has_many :owners, Owner
timestamps()
end
@doc false
def changeset(adoption, attrs) do
... | 19.36 | 51 | 0.688017 |
798b3aba8b01ce05ccdec6a01b3f7b2e34cb792c | 6,477 | exs | Elixir | test/absinthe/type/directive_test.exs | maartenvanvliet/absinthe | ebe820717200f53756e225b3dffbfefe924a94d3 | [
"MIT"
] | null | null | null | test/absinthe/type/directive_test.exs | maartenvanvliet/absinthe | ebe820717200f53756e225b3dffbfefe924a94d3 | [
"MIT"
] | 2 | 2020-07-21T05:23:37.000Z | 2020-08-26T04:56:12.000Z | test/absinthe/type/directive_test.exs | jlgeering/absinthe | a3dbc29640d613928398626ad75a8f03203a1720 | [
"MIT"
] | null | null | null | defmodule Absinthe.Type.DirectiveTest do
use Absinthe.Case, async: true
alias Absinthe.Schema
defmodule TestSchema do
use Absinthe.Schema
query do
field :nonce, :string
end
end
describe "directives" do
test "are loaded as built-ins" do
assert %{skip: "skip", include: "include"}... | 28.407895 | 98 | 0.514127 |
798b589464e65747fedad2b296b5d8245854644b | 12,667 | ex | Elixir | lib/elixir_ex_aliyun_ots_table_store_tunnel_read_records_request.ex | hou8/tablestore_protos | 1a3223326b92bbe196d57ce4dd19b5a8db1c728d | [
"MIT"
] | null | null | null | lib/elixir_ex_aliyun_ots_table_store_tunnel_read_records_request.ex | hou8/tablestore_protos | 1a3223326b92bbe196d57ce4dd19b5a8db1c728d | [
"MIT"
] | 1 | 2022-02-08T06:37:02.000Z | 2022-02-08T06:37:02.000Z | lib/elixir_ex_aliyun_ots_table_store_tunnel_read_records_request.ex | hou8/tablestore_protos | 1a3223326b92bbe196d57ce4dd19b5a8db1c728d | [
"MIT"
] | 2 | 2022-01-24T06:13:03.000Z | 2022-01-24T08:33:41.000Z | # credo:disable-for-this-file
defmodule(ExAliyunOts.TableStoreTunnel.ReadRecordsRequest) do
@moduledoc false
(
defstruct(tunnel_id: nil, client_id: nil, channel_id: nil, token: nil)
(
(
@spec encode(struct) :: {:ok, iodata} | {:error, any}
def(encode(msg)) do
try do
... | 27.358531 | 98 | 0.45812 |
798b5ed01cfa9133b667370e1a5e7175641fdb4d | 3,925 | ex | Elixir | lib/ex_autolink.ex | krepflap/ex_autolink | 941d405824131b90432f309abe2aad5a6a48464a | [
"MIT"
] | null | null | null | lib/ex_autolink.ex | krepflap/ex_autolink | 941d405824131b90432f309abe2aad5a6a48464a | [
"MIT"
] | null | null | null | lib/ex_autolink.ex | krepflap/ex_autolink | 941d405824131b90432f309abe2aad5a6a48464a | [
"MIT"
] | null | null | null | defmodule ExAutolink do
@moduledoc """
This simple module is used for converting http(s):// links in text to
HTML hyperlinks.
It doesn't depend on Phoenix.HTML, but can be used in conjuction with Phoenix.
"""
@doc ~S"""
This method is used for parsing strings or text blocks. We convert all links
start... | 38.861386 | 125 | 0.654013 |
798b81d35451e88a59e2211f779a1f42ce17c147 | 1,671 | ex | Elixir | lib/arkecosystem/client/api/wallets.ex | ArkEcosystem/ARK-Elixir-Client | a62c0f63c3d490b2d8734384ae354444cc279a9a | [
"MIT"
] | 2 | 2018-07-13T23:05:08.000Z | 2019-02-06T10:27:08.000Z | lib/arkecosystem/client/api/wallets.ex | ArkEcosystem/ARK-Elixir-Client | a62c0f63c3d490b2d8734384ae354444cc279a9a | [
"MIT"
] | 59 | 2018-06-11T07:59:59.000Z | 2019-11-17T23:30:19.000Z | lib/arkecosystem/client/api/wallets.ex | ArkEcosystem/ARK-Elixir-Client | a62c0f63c3d490b2d8734384ae354444cc279a9a | [
"MIT"
] | 17 | 2018-07-02T16:10:25.000Z | 2020-11-23T23:43:55.000Z | defmodule ArkEcosystem.Client.API.Wallets do
@moduledoc """
Documentation for ArkEcosystem.Client.API.Wallets
"""
import ArkEcosystem.Client
@spec list(Tesla.Client.t(), Keyword.t()) :: ArkEcosystem.Client.response()
def list(client, parameters \\ []) do
client |> get("wallets", parameters)
end
@... | 33.42 | 97 | 0.67325 |
798b89dd44acf8943444b4ef73afb5ce66cb03ca | 30,434 | ex | Elixir | lib/ex_aws/s3.ex | bettyblocks/ex_aws | 0c9b43b5a1afbfb5fb26131be7f80f69de4431d1 | [
"MIT",
"Unlicense"
] | null | null | null | lib/ex_aws/s3.ex | bettyblocks/ex_aws | 0c9b43b5a1afbfb5fb26131be7f80f69de4431d1 | [
"MIT",
"Unlicense"
] | null | null | null | lib/ex_aws/s3.ex | bettyblocks/ex_aws | 0c9b43b5a1afbfb5fb26131be7f80f69de4431d1 | [
"MIT",
"Unlicense"
] | null | null | null | defmodule ExAws.S3 do
@moduledoc """
Operations on AWS S3
## Basic Operations
The vast majority of operations here represent a single operation on S3.
### Examples
```
S3.list_objects |> ExAws.request! #=> {:ok, %{body: [list, of, objects]}}
S3.list_objects |> ExAws.stream! |> Enum.to_list #=> [list,... | 33.966518 | 157 | 0.668693 |
798bcee27ed37d9536582b1015368ff6c9ca7b9d | 520 | exs | Elixir | test/aoc2021/day1_test.exs | jarimatti/aoc-2021 | 02ea9a8137617d0a43f46a5cfe589d69572b653e | [
"MIT"
] | null | null | null | test/aoc2021/day1_test.exs | jarimatti/aoc-2021 | 02ea9a8137617d0a43f46a5cfe589d69572b653e | [
"MIT"
] | null | null | null | test/aoc2021/day1_test.exs | jarimatti/aoc-2021 | 02ea9a8137617d0a43f46a5cfe589d69572b653e | [
"MIT"
] | null | null | null | defmodule Aoc2021.Day1Test do
use ExUnit.Case, async: true
doctest Aoc2021.Day1
test "increment count produces 7 for part 1 example" do
input = [
199,
200,
208,
210,
200,
207,
240,
269,
260,
263
]
assert Aoc2021.Day1.count_increments(input)... | 17.333333 | 57 | 0.607692 |
798c080f65e1e00a8bb6046fcc30911dcdad7ee1 | 6,333 | exs | Elixir | test/phoenix/integration/endpoint_test.exs | rrrcompagnoni/phoenix | ca7488815a9b5bcaee0b9afee10162d177a2b90d | [
"MIT"
] | 1 | 2020-04-14T09:49:46.000Z | 2020-04-14T09:49:46.000Z | test/phoenix/integration/endpoint_test.exs | rrrcompagnoni/phoenix | ca7488815a9b5bcaee0b9afee10162d177a2b90d | [
"MIT"
] | 1 | 2020-11-08T08:30:10.000Z | 2020-11-08T08:30:10.000Z | test/phoenix/integration/endpoint_test.exs | rrrcompagnoni/phoenix | ca7488815a9b5bcaee0b9afee10162d177a2b90d | [
"MIT"
] | null | null | null | Code.require_file "../../support/http_client.exs", __DIR__
defmodule Phoenix.Integration.EndpointTest do
use ExUnit.Case
import ExUnit.CaptureLog
alias Phoenix.Integration.AdapterTest.ProdEndpoint
alias Phoenix.Integration.AdapterTest.DevEndpoint
alias Phoenix.Integration.AdapterTest.ProdInet6Endpoint
Ap... | 30.157143 | 105 | 0.62498 |
798c48c2977d323b684327515a430c8391b27379 | 3,960 | exs | Elixir | test/changelog_web/controllers/person_controller_test.exs | joebew42/changelog.com | da4ec68d15f3a2b4b6c29033443d7e7afe814d18 | [
"MIT"
] | 1 | 2018-01-22T20:07:10.000Z | 2018-01-22T20:07:10.000Z | test/changelog_web/controllers/person_controller_test.exs | joebew42/changelog.com | da4ec68d15f3a2b4b6c29033443d7e7afe814d18 | [
"MIT"
] | null | null | null | test/changelog_web/controllers/person_controller_test.exs | joebew42/changelog.com | da4ec68d15f3a2b4b6c29033443d7e7afe814d18 | [
"MIT"
] | null | null | null | defmodule ChangelogWeb.PersonControllerTest do
use ChangelogWeb.ConnCase
use Bamboo.Test
import Mock
alias Changelog.{Newsletters, Person}
describe "joining" do
test "getting the form", %{conn: conn} do
conn = get(conn, person_path(conn, :join))
assert conn.status == 200
assert conn.... | 37.009346 | 115 | 0.664899 |
798c68118f025b13cffe5a89530f23e960a066e0 | 275 | ex | Elixir | lib/team_budget_graphql/resolvers/user_resolver.ex | allefgomes/team_budget | cdd02c10fefe6c844a477aae361e6f7a41d4f734 | [
"MIT"
] | null | null | null | lib/team_budget_graphql/resolvers/user_resolver.ex | allefgomes/team_budget | cdd02c10fefe6c844a477aae361e6f7a41d4f734 | [
"MIT"
] | 2 | 2021-07-30T15:19:20.000Z | 2021-07-31T15:06:24.000Z | lib/team_budget_graphql/resolvers/user_resolver.ex | allefgomes/team_budget | cdd02c10fefe6c844a477aae361e6f7a41d4f734 | [
"MIT"
] | null | null | null | defmodule TeamBudgetGraphql.Resolvers.UserResolver do
alias TeamBudget.Accounts
def list_users(_parant, _params, _resolutions) do
{:ok, Accounts.list_users()}
end
def create_user(_parant, %{user: user}, _resolutions) do
Accounts.create_user(user)
end
end
| 22.916667 | 58 | 0.756364 |
798ca18659c8334eb180287afd9d27d0a7e5bca9 | 2,645 | exs | Elixir | test/mssql_ecto/delete_all_test.exs | nikneroz/mssql_ecto | d010b6c9c9041756353fc8184fa7e6368103cfac | [
"Apache-2.0"
] | null | null | null | test/mssql_ecto/delete_all_test.exs | nikneroz/mssql_ecto | d010b6c9c9041756353fc8184fa7e6368103cfac | [
"Apache-2.0"
] | null | null | null | test/mssql_ecto/delete_all_test.exs | nikneroz/mssql_ecto | d010b6c9c9041756353fc8184fa7e6368103cfac | [
"Apache-2.0"
] | null | null | null | defmodule MssqlEcto.DeleteAllTest do
use MssqlEcto.Case, async: true
import Ecto.Query
alias Ecto.Queryable
defmodule Schema do
use Ecto.Schema
schema "schema" do
field(:x, :integer)
field(:y, :integer)
field(:z, :integer)
field(:w, {:array, :integer})
has_many(
... | 25.679612 | 164 | 0.572779 |
798cb4d1dc721a05c20caab49a16f249e048ab92 | 2,309 | ex | Elixir | clients/dataflow/lib/google_api/dataflow/v1b3/model/parameter_metadata.ex | jechol/elixir-google-api | 0290b683dfc6491ca2ef755a80bc329378738d03 | [
"Apache-2.0"
] | null | null | null | clients/dataflow/lib/google_api/dataflow/v1b3/model/parameter_metadata.ex | jechol/elixir-google-api | 0290b683dfc6491ca2ef755a80bc329378738d03 | [
"Apache-2.0"
] | null | null | null | clients/dataflow/lib/google_api/dataflow/v1b3/model/parameter_metadata.ex | jechol/elixir-google-api | 0290b683dfc6491ca2ef755a80bc329378738d03 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 37.241935 | 128 | 0.684279 |
798cca17d725e5cdc934f24bf3a66dadce3c8079 | 24,000 | ex | Elixir | lib/future_made_concerts/spotify/client/http.ex | Future-Made/concerts-for-impact | 5532cd1be5252fa0ccb0b956f0961be8701e0e04 | [
"MIT"
] | null | null | null | lib/future_made_concerts/spotify/client/http.ex | Future-Made/concerts-for-impact | 5532cd1be5252fa0ccb0b956f0961be8701e0e04 | [
"MIT"
] | null | null | null | lib/future_made_concerts/spotify/client/http.ex | Future-Made/concerts-for-impact | 5532cd1be5252fa0ccb0b956f0961be8701e0e04 | [
"MIT"
] | null | null | null | defmodule FutureMadeConcerts.Spotify.Client.HTTP do
@moduledoc """
This module implements the `FutureMadeConcerts.Spotify.Client` behaviour and interacts with the actual Spotify API.
Reference docs are available at: <https://developer.spotify.com/documentation/web-api/>
"""
@behaviour FutureMadeConcerts.Spo... | 24.539877 | 117 | 0.542167 |
798cce5e19a9f93f809078adcce48bc836e78e18 | 808 | ex | Elixir | lib/anchore_engine_api_server/model/content_files_response.ex | michaeljguarino/anchore-elixir-client | 156a44f429ecb62433729a2b4c52de5dc0ef44d2 | [
"MIT"
] | null | null | null | lib/anchore_engine_api_server/model/content_files_response.ex | michaeljguarino/anchore-elixir-client | 156a44f429ecb62433729a2b4c52de5dc0ef44d2 | [
"MIT"
] | null | null | null | lib/anchore_engine_api_server/model/content_files_response.ex | michaeljguarino/anchore-elixir-client | 156a44f429ecb62433729a2b4c52de5dc0ef44d2 | [
"MIT"
] | null | null | null | # NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
defmodule AnchoreEngineAPIServer.Model.ContentFilesResponse do
@moduledoc """
File content listings from images
"""
@derive [Poison.Encoder]
defs... | 25.25 | 102 | 0.740099 |
798ce42272a129be3e32d55a6b05c6279cb3a7f7 | 80 | exs | Elixir | installer/templates/phx_umbrella/apps/app_name_web/test/test_helper.exs | matthewp/phoenix | af86b95db365faada58d326e98de65c811690bc7 | [
"MIT"
] | 2 | 2016-11-01T15:01:48.000Z | 2016-11-01T15:07:20.000Z | installer/templates/phx_umbrella/apps/app_name_web/test/test_helper.exs | matthewp/phoenix | af86b95db365faada58d326e98de65c811690bc7 | [
"MIT"
] | 1 | 2020-05-26T19:38:18.000Z | 2020-05-26T19:38:18.000Z | installer/templates/phx_umbrella/apps/app_name_web/test/test_helper.exs | matthewp/phoenix | af86b95db365faada58d326e98de65c811690bc7 | [
"MIT"
] | 1 | 2020-08-31T15:29:31.000Z | 2020-08-31T15:29:31.000Z | ExUnit.start()<%= if ecto do %>
<%= adapter_config[:test_setup_all] %><% end %>
| 26.666667 | 47 | 0.625 |
798cf6adf8c2b899bdc181f9d067e4ff1a7bbea9 | 1,332 | exs | Elixir | elixir/elixir-sips/samples/agenda/test/agenda/parser.exs | afronski/playground-erlang | 6ac4b58b2fd717260c22a33284547d44a9b5038e | [
"MIT"
] | 2 | 2015-12-09T02:16:51.000Z | 2021-07-26T22:53:43.000Z | elixir/elixir-sips/samples/agenda/test/agenda/parser.exs | afronski/playground-erlang | 6ac4b58b2fd717260c22a33284547d44a9b5038e | [
"MIT"
] | null | null | null | elixir/elixir-sips/samples/agenda/test/agenda/parser.exs | afronski/playground-erlang | 6ac4b58b2fd717260c22a33284547d44a9b5038e | [
"MIT"
] | 1 | 2016-05-08T18:40:31.000Z | 2016-05-08T18:40:31.000Z | defmodule AgendaTest do
use ExUnit.Case
@command1 Code.string_to_quoted!("Module.function(:arg1)")
@command2 Code.string_to_quoted!("Module.function(:arg2, :arg3)")
test "parse a schedule string" do
assert Agenda.Parser.parse("0 0 0 0 0 Module.function(:arg1)") == %Agenda.Schedule{minute: [0], hour: [0], ... | 55.5 | 213 | 0.67042 |
798d0a3c326819650fadeafd357b39055c6c909f | 2,427 | exs | Elixir | mix.exs | soleo/changelog.com | 621c7471b23379e1cdd4a0c960b66ed98d8d1a53 | [
"MIT"
] | null | null | null | mix.exs | soleo/changelog.com | 621c7471b23379e1cdd4a0c960b66ed98d8d1a53 | [
"MIT"
] | null | null | null | mix.exs | soleo/changelog.com | 621c7471b23379e1cdd4a0c960b66ed98d8d1a53 | [
"MIT"
] | null | null | null | defmodule Changelog.Mixfile do
use Mix.Project
def project do
[app: :changelog,
version: "0.0.1",
elixir: "~> 1.3",
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix] ++ Mix.compilers,
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
aliases: ali... | 31.519481 | 78 | 0.542645 |
798d17e99d0d04dfd64f23770a8a3722cab74c82 | 1,144 | ex | Elixir | lib/generator.ex | arisechurch/ash_thrift | 96416cbb34d543758c52813b1137959b309eb602 | [
"MIT"
] | null | null | null | lib/generator.ex | arisechurch/ash_thrift | 96416cbb34d543758c52813b1137959b309eb602 | [
"MIT"
] | null | null | null | lib/generator.ex | arisechurch/ash_thrift | 96416cbb34d543758c52813b1137959b309eb602 | [
"MIT"
] | null | null | null | defmodule AshThrift.Generator do
alias Ash.Dsl.Extension
alias Ash.Resource.Attribute
alias AshThrift.Conversion
alias AshThrift.Field
def resource(resource) do
Extension.get_persisted(resource, :thrift)
|> Enum.map(&thrift_struct/1)
end
def namespace({language, namespace}),
do: """
name... | 19.724138 | 65 | 0.585664 |
798d310ac71c26f99395c41171cf0a2c1a371673 | 3,601 | ex | Elixir | lib/input_event.ex | hez/input_event | e831a1053d7d837ccadfb75d9e70c70b56895eab | [
"Apache-2.0"
] | 20 | 2018-09-23T18:12:14.000Z | 2020-04-18T12:37:34.000Z | lib/input_event.ex | hez/input_event | e831a1053d7d837ccadfb75d9e70c70b56895eab | [
"Apache-2.0"
] | 7 | 2018-09-17T05:40:23.000Z | 2020-06-06T20:17:53.000Z | lib/input_event.ex | hez/input_event | e831a1053d7d837ccadfb75d9e70c70b56895eab | [
"Apache-2.0"
] | 6 | 2020-12-04T21:20:39.000Z | 2022-03-16T19:26:24.000Z | defmodule InputEvent do
use GenServer
alias InputEvent.{Info, Report}
@input_event_report 1
@input_event_version 2
@input_event_name 3
@input_event_id 4
@input_event_report_info 5
@input_event_ready 6
@moduledoc """
Elixir interface to Linux input event devices
"""
@doc """
Start a GenServe... | 27.914729 | 98 | 0.660372 |
798d3af8286df8711bbf31235a49c136a75c290e | 138 | ex | Elixir | test/support/components/void_component.ex | rktjmp/temple | 6fe46cbb4998477d76147fa95c9fd9c7841545ef | [
"MIT"
] | null | null | null | test/support/components/void_component.ex | rktjmp/temple | 6fe46cbb4998477d76147fa95c9fd9c7841545ef | [
"MIT"
] | null | null | null | test/support/components/void_component.ex | rktjmp/temple | 6fe46cbb4998477d76147fa95c9fd9c7841545ef | [
"MIT"
] | null | null | null | defmodule Temple.Components.VoidComponent do
use Temple.Component
render do
div class: "void!!" do
"bar"
end
end
end
| 13.8 | 44 | 0.666667 |
798d3c227abf120b8907de3b4311147d09f0d183 | 1,582 | ex | Elixir | clients/slides/lib/google_api/slides/v1/model/nesting_level.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/slides/lib/google_api/slides/v1/model/nesting_level.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/slides/lib/google_api/slides/v1/model/nesting_level.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 ... | 32.958333 | 137 | 0.742099 |
798d55bbb588d24c21667d6840a87855c83ad66c | 352 | exs | Elixir | project/gamenect/priv/repo/seeds.exs | daemonfire300/learning_phoenix | 0ab0cb1feacda4ec5c0ab0a5324835a150db22ab | [
"MIT"
] | null | null | null | project/gamenect/priv/repo/seeds.exs | daemonfire300/learning_phoenix | 0ab0cb1feacda4ec5c0ab0a5324835a150db22ab | [
"MIT"
] | null | null | null | project/gamenect/priv/repo/seeds.exs | daemonfire300/learning_phoenix | 0ab0cb1feacda4ec5c0ab0a5324835a150db22ab | [
"MIT"
] | null | null | null | # Script for populating the database. You can run it as:
#
# mix run priv/repo/seeds.exs
#
# Inside the script, you can read and write to any of your
# repositories directly:
#
# Gamenect.Repo.insert!(%Gamenect.SomeModel{})
#
# We recommend using the bang functions (`insert!`, `update!`
# and so on) as they wil... | 29.333333 | 61 | 0.707386 |
798d625fb593258b823caaa98fc1f80ee8715ca5 | 1,816 | ex | Elixir | apps/firestorm_web/lib/firestorm_web/aws/upload_signature.ex | CircleCI-Public/firestorm | 9ca2c46a2b2377370347ad94d6003eeb77be38d6 | [
"MIT"
] | 10 | 2017-06-28T08:06:52.000Z | 2022-03-19T17:49:21.000Z | apps/firestorm_web/lib/firestorm_web/aws/upload_signature.ex | CircleCI-Public/firestorm | 9ca2c46a2b2377370347ad94d6003eeb77be38d6 | [
"MIT"
] | null | null | null | apps/firestorm_web/lib/firestorm_web/aws/upload_signature.ex | CircleCI-Public/firestorm | 9ca2c46a2b2377370347ad94d6003eeb77be38d6 | [
"MIT"
] | 2 | 2017-10-21T12:01:02.000Z | 2021-01-29T10:26:22.000Z | defmodule FirestormWeb.AWS.UploadSignature do
@service "s3"
@aws_request "aws4_request"
def signature(filename, mimetype) do
policy = policy(filename, mimetype)
%{
key: filename,
date: get_date(),
content_type: mimetype,
acl: "public-read",
success_action_status: "201",
... | 21.364706 | 83 | 0.603524 |
798d967801cb79a465444436d61902df7b52aaa4 | 937 | ex | Elixir | lib/db.ex | craigspaeth/eql | 6c8d0db667c1871ec60654facd84b7b739b6dba3 | [
"MIT"
] | null | null | null | lib/db.ex | craigspaeth/eql | 6c8d0db667c1871ec60654facd84b7b739b6dba3 | [
"MIT"
] | null | null | null | lib/db.ex | craigspaeth/eql | 6c8d0db667c1871ec60654facd84b7b739b6dba3 | [
"MIT"
] | null | null | null | defmodule Db do
def init do
db = Mongo.connect! |> Mongo.db("eql")
Agent.start_link fn -> [db] end, name: __MODULE__
end
def db do
Agent.get(__MODULE__, fn list -> List.first list end)
end
def find_one(col, query) do
db
|> Mongo.Db.collection(Atom.to_string col)
|> Mongo.Collection.... | 23.425 | 68 | 0.621131 |
798d98758511ef77533f83fa99e214448b5acee6 | 1,422 | ex | Elixir | elixir/advent_of_code/lib/2021/day2.ex | rhishikeshj/advent-of-code | 71231217baaaa27994a2fd1980fe800426aef4bc | [
"Apache-2.0"
] | null | null | null | elixir/advent_of_code/lib/2021/day2.ex | rhishikeshj/advent-of-code | 71231217baaaa27994a2fd1980fe800426aef4bc | [
"Apache-2.0"
] | null | null | null | elixir/advent_of_code/lib/2021/day2.ex | rhishikeshj/advent-of-code | 71231217baaaa27994a2fd1980fe800426aef4bc | [
"Apache-2.0"
] | 1 | 2020-01-02T06:41:43.000Z | 2020-01-02T06:41:43.000Z | defmodule AOC.Day2 do
@moduledoc """
Solution to Day 2 of the Advent of code 2021
https://adventofcode.com/2021/day/2
"""
@doc """
Read the input file
"""
@spec get_inputs(File) :: [String.t()]
def get_inputs(f \\ "lib/inputs/day2.txt"),
do:
File.read!(f)
|> String.trim()
|> Str... | 26.830189 | 95 | 0.528833 |
798da2d473795a5fc4b363b87b61095fa4f97b6e | 859 | exs | Elixir | daily_meals/test/daily_meals/users/update_test.exs | joabehenrique/daily-meals | ea8919a45dc155046289c96854348bd7ed89c1fb | [
"MIT"
] | null | null | null | daily_meals/test/daily_meals/users/update_test.exs | joabehenrique/daily-meals | ea8919a45dc155046289c96854348bd7ed89c1fb | [
"MIT"
] | null | null | null | daily_meals/test/daily_meals/users/update_test.exs | joabehenrique/daily-meals | ea8919a45dc155046289c96854348bd7ed89c1fb | [
"MIT"
] | null | null | null | defmodule DailyMeals.User.UpdateTest do
use DailyMeals.DataCase
import DailyMeals.Factory
alias DailyMeals.User
describe "Update Meal" do
test "when a valid id is given, returns the meal" do
user_params = build(:users_params)
{:ok, %User{id: id}} = DailyMeals.create_user(user_params)
... | 26.030303 | 97 | 0.585565 |
798dac66ec5c900e071a4f5c927f819989744925 | 1,243 | ex | Elixir | example_json_parse/lib/json_reply/product_catalog/product_entry.ex | cuevacreativa/Domo | 5f2f5ff3cb57dfe774408dcae6ccb5b79d1a3089 | [
"MIT"
] | null | null | null | example_json_parse/lib/json_reply/product_catalog/product_entry.ex | cuevacreativa/Domo | 5f2f5ff3cb57dfe774408dcae6ccb5b79d1a3089 | [
"MIT"
] | null | null | null | example_json_parse/lib/json_reply/product_catalog/product_entry.ex | cuevacreativa/Domo | 5f2f5ff3cb57dfe774408dcae6ccb5b79d1a3089 | [
"MIT"
] | null | null | null | defmodule JsonReply.ProductCatalog.ProductEntry do
@moduledoc false
use Domo
alias JsonReply.ProductCatalog.ImageAsset
defstruct product_name: "",
slug: "",
image_asset_id: ImageAsset.id_placeholder(),
price: 0,
tags: [],
updated_at: ~N[2000-01-01 2... | 25.367347 | 70 | 0.547868 |
798dbc432b423a4900c581f17ab85aac1d3618df | 1,715 | ex | Elixir | lib/ellie_web/controllers/oembed_controller.ex | HenkPoley/ellie | 045212b56142341fc95b79659c3ca218b0d5d282 | [
"BSD-3-Clause"
] | 377 | 2018-04-05T03:36:00.000Z | 2022-03-30T19:12:44.000Z | lib/ellie_web/controllers/oembed_controller.ex | HenkPoley/ellie | 045212b56142341fc95b79659c3ca218b0d5d282 | [
"BSD-3-Clause"
] | 91 | 2018-05-24T21:56:06.000Z | 2022-02-26T03:54:04.000Z | lib/ellie_web/controllers/oembed_controller.ex | HenkPoley/ellie | 045212b56142341fc95b79659c3ca218b0d5d282 | [
"BSD-3-Clause"
] | 34 | 2018-05-29T03:54:35.000Z | 2022-01-13T07:12:46.000Z | defmodule EllieWeb.OembedController do
use EllieWeb, :controller
alias Ellie.Types.PrettyId
alias Ellie.Domain.Api
def oembed(conn, %{"url" => url} = params) do
parsed = URI.parse(url)
current = URI.parse(current_url(conn))
if parsed.authority != current.authority do
conn
|> send_resp(... | 28.583333 | 100 | 0.608163 |
798dcb044faacde88e34d53d1b4c928a119ddb82 | 1,640 | ex | Elixir | lib/client/detected.ex | jmerriweather/pn532 | ec072d9270deec19b9acbe15d45b28222a651189 | [
"MIT"
] | null | null | null | lib/client/detected.ex | jmerriweather/pn532 | ec072d9270deec19b9acbe15d45b28222a651189 | [
"MIT"
] | null | null | null | lib/client/detected.ex | jmerriweather/pn532 | ec072d9270deec19b9acbe15d45b28222a651189 | [
"MIT"
] | null | null | null | defmodule PN532.Client.Detected do
@moduledoc """
Functions for when we are in the connected state
"""
require Logger
def detecting(:cast, :stop_target_detection, data) do
{:next_state, :connected, data}
end
def detected(:internal, {:cards_detected, cards},
data = %{current_cards: current_cards... | 43.157895 | 208 | 0.712195 |
798e2d239940a869bd62ff9e2c970e050084f0f2 | 2,679 | ex | Elixir | lib/spell.ex | reverie/spell | 0688cb768b43871a2896a5588194117808dec1e8 | [
"Apache-2.0"
] | 1 | 2016-01-19T00:42:00.000Z | 2016-01-19T00:42:00.000Z | lib/spell.ex | reverie/spell | 0688cb768b43871a2896a5588194117808dec1e8 | [
"Apache-2.0"
] | null | null | null | lib/spell.ex | reverie/spell | 0688cb768b43871a2896a5588194117808dec1e8 | [
"Apache-2.0"
] | null | null | null | defmodule Spell do
use Application
# See http://elixir-lang.org/docs/stable/elixir/Application.html
# for more information on OTP Applications
def start(_type, _args) do
pid = spawn(Spell, :init, [])
{:ok, pid}
end
def init do
import Supervisor.Spec, warn: false
Process.flag(:trap_exit, tr... | 33.074074 | 92 | 0.568122 |
798e48179655476ce3c2419fbb4dce3a98932856 | 490 | exs | Elixir | test/cassandra_graphql_web/views/error_view_test.exs | sgeos/cassandra-graphql | 9d566c23d6499ff7a3a6f05fec3eef2dce54bc0d | [
"BSD-3-Clause"
] | null | null | null | test/cassandra_graphql_web/views/error_view_test.exs | sgeos/cassandra-graphql | 9d566c23d6499ff7a3a6f05fec3eef2dce54bc0d | [
"BSD-3-Clause"
] | null | null | null | test/cassandra_graphql_web/views/error_view_test.exs | sgeos/cassandra-graphql | 9d566c23d6499ff7a3a6f05fec3eef2dce54bc0d | [
"BSD-3-Clause"
] | null | null | null | defmodule CassandraGraphqlWeb.ErrorViewTest do
use CassandraGraphqlWeb.ConnCase, async: true
# Bring render/3 and render_to_string/3 for testing custom views
import Phoenix.View
test "renders 404.json" do
assert render(CassandraGraphqlWeb.ErrorView, "404.json", []) == %{errors: %{detail: "Not Found"}}
e... | 30.625 | 101 | 0.706122 |
798e598629e5540189042bf446f02822f24b4fe3 | 13,670 | ex | Elixir | backend/lib/edgehog/devices.ex | szakhlypa/edgehog | b1193c26f403132dead6964c1c052e5dcae533af | [
"Apache-2.0"
] | null | null | null | backend/lib/edgehog/devices.ex | szakhlypa/edgehog | b1193c26f403132dead6964c1c052e5dcae533af | [
"Apache-2.0"
] | null | null | null | backend/lib/edgehog/devices.ex | szakhlypa/edgehog | b1193c26f403132dead6964c1c052e5dcae533af | [
"Apache-2.0"
] | null | null | null | #
# This file is part of Edgehog.
#
# Copyright 2021 SECO Mind 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 app... | 28.658281 | 102 | 0.65801 |
798e5a36eb966579e189d341075bf9237902479c | 1,854 | ex | Elixir | lib/cotoami_web/controllers/amishi_controller.ex | cruatta/cotoami | 29b7ef66c053cf4e381c6ff65d5fd599066ebabe | [
"Apache-2.0"
] | 337 | 2016-11-28T15:46:58.000Z | 2022-03-01T06:21:25.000Z | lib/cotoami_web/controllers/amishi_controller.ex | cruatta/cotoami | 29b7ef66c053cf4e381c6ff65d5fd599066ebabe | [
"Apache-2.0"
] | 79 | 2017-02-27T05:44:36.000Z | 2021-12-09T00:28:11.000Z | lib/cotoami_web/controllers/amishi_controller.ex | cruatta/cotoami | 29b7ef66c053cf4e381c6ff65d5fd599066ebabe | [
"Apache-2.0"
] | 47 | 2018-02-03T01:32:13.000Z | 2021-11-08T07:54:43.000Z | defmodule CotoamiWeb.AmishiController do
use CotoamiWeb, :controller
require Logger
alias Cotoami.{Amishi, AmishiService, RedisService}
alias CotoamiWeb.AmishiView
def action(conn, _) do
apply(__MODULE__, action_name(conn), [conn, conn.params, conn.assigns.amishi])
end
def show(conn, %{"id" => id}, ... | 27.264706 | 82 | 0.645092 |
798e6c03d457a822ee06f58ecb9eafa1f9e7caa8 | 552 | ex | Elixir | exercises/practice/resistor-color-trio/.meta/example.ex | ryanzidago/elixir | d00ca743340fcc328c70ee351274f91b57fd4c8d | [
"MIT"
] | 343 | 2017-06-22T16:28:28.000Z | 2022-03-25T21:33:32.000Z | exercises/practice/resistor-color-trio/.meta/example.ex | ryanzidago/elixir | d00ca743340fcc328c70ee351274f91b57fd4c8d | [
"MIT"
] | 583 | 2017-06-19T10:48:40.000Z | 2022-03-28T21:43:12.000Z | exercises/practice/resistor-color-trio/.meta/example.ex | ryanzidago/elixir | d00ca743340fcc328c70ee351274f91b57fd4c8d | [
"MIT"
] | 228 | 2017-07-05T07:09:32.000Z | 2022-03-27T08:59:08.000Z | defmodule ResistorColorTrio do
@colors %{
black: 0,
brown: 1,
red: 2,
orange: 3,
yellow: 4,
green: 5,
blue: 6,
violet: 7,
grey: 8,
white: 9
}
@doc """
Calculate the resistance value in ohm or kiloohm from resistor colors
"""
@spec label(colors :: [atom]) :: {number, ... | 19.034483 | 77 | 0.547101 |
798ebddd4fff340a57f47bb36f4d4001a513e784 | 1,003 | ex | Elixir | lib/prometheus_logger.ex | rubberduck203/ex_prometheus_logger | d99c4e2eadde9c94aa14501e05cf7888d05bec44 | [
"MIT"
] | 1 | 2018-11-08T12:15:05.000Z | 2018-11-08T12:15:05.000Z | lib/prometheus_logger.ex | rubberduck203/ex_prometheus_logger | d99c4e2eadde9c94aa14501e05cf7888d05bec44 | [
"MIT"
] | null | null | null | lib/prometheus_logger.ex | rubberduck203/ex_prometheus_logger | d99c4e2eadde9c94aa14501e05cf7888d05bec44 | [
"MIT"
] | null | null | null | defmodule Logger.Backends.Prometheus do
@moduledoc false
@behaviour :gen_event
use Prometheus.Metric
def hostname do
with {:ok, hostname} <- :inet.gethostname() do
hostname
|> to_string()
|> String.trim()
end
end
## Logger implementation
@name :ex_logger
def init(_args) d... | 20.469388 | 95 | 0.636092 |
798f006a690200875e4dbba1d6927a544577a8c0 | 590 | exs | Elixir | exercises/concept/need-for-speed/mix.exs | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 343 | 2017-06-22T16:28:28.000Z | 2022-03-25T21:33:32.000Z | exercises/concept/need-for-speed/mix.exs | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 583 | 2017-06-19T10:48:40.000Z | 2022-03-28T21:43:12.000Z | exercises/concept/need-for-speed/mix.exs | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 228 | 2017-07-05T07:09:32.000Z | 2022-03-27T08:59:08.000Z | defmodule RemoteControlCar.MixProject do
use Mix.Project
def project do
[
app: :need_for_speed,
version: "0.1.0",
# elixir: "~> 1.10",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
... | 20.344828 | 87 | 0.586441 |
798f20206317e8829adc614eb4f923788ffe64b0 | 871 | ex | Elixir | app/lib/rocdev/meetup_api.ex | TomFrink/rocdev | 5c4a19c2d099bd8bad3377e6e08dfc9aa7e0bcf5 | [
"MIT"
] | 14 | 2017-10-10T19:11:21.000Z | 2019-04-20T20:11:01.000Z | app/lib/rocdev/meetup_api.ex | TomFrink/rocdev | 5c4a19c2d099bd8bad3377e6e08dfc9aa7e0bcf5 | [
"MIT"
] | 41 | 2017-10-08T03:07:20.000Z | 2018-10-15T12:47:34.000Z | app/lib/rocdev/meetup_api.ex | TomFrink/rocdev | 5c4a19c2d099bd8bad3377e6e08dfc9aa7e0bcf5 | [
"MIT"
] | 7 | 2017-10-18T10:44:04.000Z | 2019-04-15T20:44:49.000Z | defmodule Rocdev.MeetupAPI do
@moduledoc """
Provides access to Meetup API.
"""
@base_url Application.get_env(:rocdev, :meetup_api_base_url)
def past do
HTTPoison.get(
@base_url <> "/events",
[],
[params: [status: "past", page: 3, desc: true]]
)
|> handle_response
end
def ... | 20.738095 | 63 | 0.574053 |
798f3dc7c9ebf9dc073df9c5991a6b41924884ba | 1,276 | ex | Elixir | test/support/conn_case.ex | ScapeGuru/osrs_api_proxy | 7d4cace8e5185ec60a324de274df225a58049b7a | [
"Apache-2.0"
] | null | null | null | test/support/conn_case.ex | ScapeGuru/osrs_api_proxy | 7d4cace8e5185ec60a324de274df225a58049b7a | [
"Apache-2.0"
] | 37 | 2021-04-19T23:56:46.000Z | 2022-02-28T15:14:04.000Z | test/support/conn_case.ex | ScapeGuru/osrs_api_proxy | 7d4cace8e5185ec60a324de274df225a58049b7a | [
"Apache-2.0"
] | null | null | null | defmodule OsrsApiProxyWeb.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, ... | 29 | 74 | 0.731975 |
798f4de8ef1aabb30986f2be5988840b8a8a10a7 | 17,920 | ex | Elixir | lib/mix/lib/mix/dep.ex | mszczygiel/elixir | 7dd86ec1f782debcb00d9f078478c3a9509a6375 | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/dep.ex | mszczygiel/elixir | 7dd86ec1f782debcb00d9f078478c3a9509a6375 | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/dep.ex | mszczygiel/elixir | 7dd86ec1f782debcb00d9f078478c3a9509a6375 | [
"Apache-2.0"
] | null | null | null | defmodule Mix.Dep do
@moduledoc false
@doc """
The Mix.Dep struct keeps information about your project dependencies.
It contains:
* `scm` - a module representing the source code management tool (SCM)
operations
* `app` - the application name as an atom
* `requirement` - a binary or regula... | 31.057192 | 107 | 0.636942 |
798f7f90eb52496d3438f6c77ad7160ba149dec9 | 1,213 | exs | Elixir | mix.exs | nshafer/plug_assign | cd25050a9d111ac11a0a8550b7078f8063af9452 | [
"MIT"
] | 5 | 2015-10-15T17:43:45.000Z | 2017-09-07T06:09:39.000Z | mix.exs | nshafer/plug_assign | cd25050a9d111ac11a0a8550b7078f8063af9452 | [
"MIT"
] | 1 | 2018-02-17T14:27:33.000Z | 2018-02-17T14:27:33.000Z | mix.exs | nshafer/plug_assign | cd25050a9d111ac11a0a8550b7078f8063af9452 | [
"MIT"
] | 1 | 2018-02-17T14:08:41.000Z | 2018-02-17T14:08:41.000Z | defmodule Plug.Assign.Mixfile do
use Mix.Project
def project do
[
app: :plug_assign,
name: "Plug.Assign",
version: "1.0.2",
elixir: "~> 1.1",
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
deps: deps(),
description: description(),
... | 23.784314 | 97 | 0.567189 |
798f7fc8d00f1aa6a983d1a8f70836d7bca07f4e | 900 | ex | Elixir | umbrella/apps/sunulator_web/lib/sunulator_web/application.ex | plasticine/sunulator | f202518bae70cad06ea9d38e183c1b9873a77b18 | [
"MIT"
] | 2 | 2019-06-05T23:28:44.000Z | 2019-06-05T23:41:20.000Z | umbrella/apps/sunulator_web/lib/sunulator_web/application.ex | plasticine/sunulator | f202518bae70cad06ea9d38e183c1b9873a77b18 | [
"MIT"
] | 3 | 2021-03-09T12:30:08.000Z | 2021-09-01T19:32:06.000Z | umbrella/apps/sunulator_web/lib/sunulator_web/application.ex | plasticine/sunulator | f202518bae70cad06ea9d38e183c1b9873a77b18 | [
"MIT"
] | null | null | null | defmodule SunulatorWeb.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
# List all child processes to be supervised
children = [
# Start the endpoint when the application start... | 30 | 71 | 0.727778 |
798f8c7622d2d49173c044b4396ae00256589125 | 492 | ex | Elixir | lib/club_backend/release.ex | ufosc/club-backend-ex | 87b55bc9fcccd9d458ee3277c3153f608f3a8a5e | [
"MIT"
] | null | null | null | lib/club_backend/release.ex | ufosc/club-backend-ex | 87b55bc9fcccd9d458ee3277c3153f608f3a8a5e | [
"MIT"
] | 6 | 2020-07-31T23:02:34.000Z | 2021-02-26T21:10:10.000Z | lib/club_backend/release.ex | ufosc/club-backend-ex | 87b55bc9fcccd9d458ee3277c3153f608f3a8a5e | [
"MIT"
] | 2 | 2020-08-23T23:04:00.000Z | 2020-10-03T03:18:11.000Z | defmodule ClubBackend.Release do
@app :club_backend
def migrate do
load_app()
for repo <- repos() do
{:ok, _, _} = Ecto.Migrator.with_repo(repo, &Ecto.Migrator.run(&1, :up, all: true))
end
end
def rollback(repo, version) do
load_app()
{:ok, _, _} = Ecto.Migrator.with_repo(repo, &Ect... | 19.68 | 91 | 0.642276 |
798fa8ea9094347372de2b1eb0b804276f38d5a5 | 372 | ex | Elixir | fixtures/elixir_output/post_json_multiple_headers.ex | martinsirbe/curlconverter | c5324e85d2ca24ef4743fb2bb36139d23367e293 | [
"MIT"
] | 4,955 | 2015-01-02T09:04:20.000Z | 2021-10-06T03:54:43.000Z | fixtures/elixir_output/post_json_multiple_headers.ex | martinsirbe/curlconverter | c5324e85d2ca24ef4743fb2bb36139d23367e293 | [
"MIT"
] | 242 | 2015-03-27T05:59:11.000Z | 2021-10-03T08:36:05.000Z | fixtures/elixir_output/post_json_multiple_headers.ex | martinsirbe/curlconverter | c5324e85d2ca24ef4743fb2bb36139d23367e293 | [
"MIT"
] | 504 | 2015-01-02T16:04:36.000Z | 2021-10-01T03:43:55.000Z | request = %HTTPoison.Request{
method: :post,
url: "https://0.0.0.0/rest/login-sessions",
options: [hackney: [:insecure]],
headers: [
{~s|Content-Type|, ~s|application/json|},
{~s|X-API-Version|, ~s|200|},
],
params: [],
body: ~s|{"userName":"username123","password":"password123", "authLoginDomain"... | 26.571429 | 90 | 0.63172 |
798fc10e8d158c19535adb95cbbed581adb85e07 | 123 | exs | Elixir | test/bt_test.exs | fly1ngDream/bt | 81d55ca7a524321fc2af1c255805b9f6826561d8 | [
"MIT"
] | 1 | 2020-07-29T14:39:39.000Z | 2020-07-29T14:39:39.000Z | test/bt_test.exs | yevhenshymotiuk/bt | 81d55ca7a524321fc2af1c255805b9f6826561d8 | [
"MIT"
] | null | null | null | test/bt_test.exs | yevhenshymotiuk/bt | 81d55ca7a524321fc2af1c255805b9f6826561d8 | [
"MIT"
] | null | null | null | defmodule BtTest do
use ExUnit.Case
doctest Bt
test "greets the world" do
assert Bt.hello() == :world
end
end
| 13.666667 | 31 | 0.674797 |
798fc46bfc32ed95354174ec220bb463b709afb8 | 1,091 | ex | Elixir | lib/blog_phx_web/channels/user_socket.ex | the-harry/blog_phx | db7604259f2a1cd32b0243bb1039694ef986b3aa | [
"MIT"
] | null | null | null | lib/blog_phx_web/channels/user_socket.ex | the-harry/blog_phx | db7604259f2a1cd32b0243bb1039694ef986b3aa | [
"MIT"
] | null | null | null | lib/blog_phx_web/channels/user_socket.ex | the-harry/blog_phx | db7604259f2a1cd32b0243bb1039694ef986b3aa | [
"MIT"
] | null | null | null | defmodule BlogPhxWeb.UserSocket do
use Phoenix.Socket
## Channels
# channel "room:*", BlogPhxWeb.RoomChannel
# Socket params are passed from the client and can
# be used to verify and authenticate a user. After
# verification, you can put default assigns into
# the socket that will be set for all channe... | 30.305556 | 83 | 0.694775 |
798fe9507cf50887f7c204d2bb2fddb1f609e04a | 1,747 | ex | Elixir | lib/esi.ex | ajaxify/esi | 04714de809bca83fd84191e08dbaf39ccbad45c8 | [
"MIT"
] | null | null | null | lib/esi.ex | ajaxify/esi | 04714de809bca83fd84191e08dbaf39ccbad45c8 | [
"MIT"
] | null | null | null | lib/esi.ex | ajaxify/esi | 04714de809bca83fd84191e08dbaf39ccbad45c8 | [
"MIT"
] | null | null | null | defmodule ESI do
@doc """
Execute a request.
## Arguments
- `request` -- the request
- `opts` -- any additional options to set on the request
"""
@spec request!(req :: ESI.Request.t(), opts :: ESI.Request.request_opts()) ::
{:ok, any} | {:error, any}
def request(req, opts \\ []) do
req
... | 25.691176 | 83 | 0.605037 |
799036b48b3221e314307f0ac3f70951a7dcb1ae | 5,509 | ex | Elixir | lib/stripe/webhook_plug.ex | erhlee-bird/stripity_stripe | 8c4c5712f391bf76e0a168125882c85048d3192f | [
"BSD-3-Clause"
] | 555 | 2016-11-29T05:02:27.000Z | 2022-03-30T00:47:59.000Z | lib/stripe/webhook_plug.ex | erhlee-bird/stripity_stripe | 8c4c5712f391bf76e0a168125882c85048d3192f | [
"BSD-3-Clause"
] | 532 | 2016-11-28T18:22:25.000Z | 2022-03-30T17:04:32.000Z | lib/stripe/webhook_plug.ex | erhlee-bird/stripity_stripe | 8c4c5712f391bf76e0a168125882c85048d3192f | [
"BSD-3-Clause"
] | 296 | 2016-12-05T14:04:09.000Z | 2022-03-28T20:39:37.000Z | defmodule Stripe.WebhookPlug do
@moduledoc """
Helper `Plug` to process webhook events and send them to a custom handler.
## Installation
To handle webhook events, you must first configure your application's endpoint.
Add the following to `endpoint.ex`, **before** `Plug.Parsers` is loaded.
```elixir
pl... | 28.544041 | 100 | 0.670176 |
799045c121a4e8b09a86f7b77d64722fee6c0f6f | 1,972 | ex | Elixir | lib/cryptozaur/model/account.ex | DenisGorbachev/crypto-cli | 94e5097ff24237fbc5fdd3fea371a5c9a1f727e4 | [
"MIT"
] | 5 | 2018-09-19T09:13:15.000Z | 2021-10-20T23:29:57.000Z | lib/cryptozaur/model/account.ex | DenisGorbachev/crypto-cli | 94e5097ff24237fbc5fdd3fea371a5c9a1f727e4 | [
"MIT"
] | 6 | 2018-07-29T05:33:02.000Z | 2018-09-18T20:42:19.000Z | lib/cryptozaur/model/account.ex | DenisGorbachev/crypto-cli | 94e5097ff24237fbc5fdd3fea371a5c9a1f727e4 | [
"MIT"
] | 3 | 2018-07-24T05:55:04.000Z | 2018-09-19T09:14:08.000Z | defmodule Cryptozaur.Model.Account do
@moduledoc """
## Rationale
* We want to allow developers to connect their own accounts to our system
* Also, we want to spread our funds among different accounts to avoid withdrawal limits
"""
use Ecto.Schema
import Ecto.Query
import Ecto.Changeset
import OK, on... | 20.122449 | 89 | 0.616633 |
799057e8423a38b0ef5d591f0063557a432ce08c | 1,502 | exs | Elixir | mix.exs | emadurandal/pelemay | 9d0cf707fdf545f7179768309779309dd02277e0 | [
"Apache-2.0"
] | 192 | 2019-08-30T06:53:28.000Z | 2022-02-15T06:08:25.000Z | mix.exs | emadurandal/pelemay | 9d0cf707fdf545f7179768309779309dd02277e0 | [
"Apache-2.0"
] | 121 | 2019-09-02T08:13:25.000Z | 2021-12-03T19:04:16.000Z | mix.exs | emadurandal/pelemay | 9d0cf707fdf545f7179768309779309dd02277e0 | [
"Apache-2.0"
] | 15 | 2019-08-31T12:00:03.000Z | 2021-07-03T04:13:10.000Z | defmodule Pelemay.MixProject do
use Mix.Project
def project do
[
app: :pelemay,
version: "0.0.15",
elixir: "~> 1.9",
start_permanent: Mix.env() == :prod,
description: description(),
package: package(),
deps: deps(),
docs: [
api_reference: false,
m... | 21.768116 | 101 | 0.540613 |
79907a9992187fb7f9c4ea93f32c70d7070c79da | 9,436 | ex | Elixir | lib/asteroid/oauth2/client.ex | tanguilp/asteroid | 8e03221d365da7f03f82df192c535d3ba2101f4d | [
"Apache-2.0"
] | 36 | 2019-07-23T20:01:05.000Z | 2021-08-05T00:52:34.000Z | lib/asteroid/oauth2/client.ex | tanguilp/asteroid | 8e03221d365da7f03f82df192c535d3ba2101f4d | [
"Apache-2.0"
] | 19 | 2019-08-23T19:04:50.000Z | 2021-05-07T22:12:25.000Z | lib/asteroid/oauth2/client.ex | tanguilp/asteroid | 8e03221d365da7f03f82df192c535d3ba2101f4d | [
"Apache-2.0"
] | 3 | 2019-09-06T10:47:20.000Z | 2020-09-09T03:43:31.000Z | defmodule Asteroid.OAuth2.Client do
alias Asteroid.Client
alias Asteroid.OAuth2
alias OAuth2Utils.Scope
import Asteroid.Utils
@moduledoc """
Util function to work with OAuth2 clients
"""
defmodule AuthenticationError do
@moduledoc """
Error raised when an client authentication error occurs
... | 28.083333 | 100 | 0.647944 |
79907cb20a0ef54f78ff12e1d03ac969e5c215d3 | 673 | exs | Elixir | test/prima_auth0_ex/token_provider/token_info_test.exs | primait/auth0_ex | 15ef5d6d91d8fe00ff703a4f58e1cb32bb169a82 | [
"MIT"
] | 5 | 2021-12-01T10:50:40.000Z | 2022-02-15T13:07:02.000Z | test/prima_auth0_ex/token_provider/token_info_test.exs | primait/auth0_ex | 15ef5d6d91d8fe00ff703a4f58e1cb32bb169a82 | [
"MIT"
] | 11 | 2021-12-22T09:19:28.000Z | 2022-03-24T06:15:04.000Z | test/prima_auth0_ex/token_provider/token_info_test.exs | primait/auth0_ex | 15ef5d6d91d8fe00ff703a4f58e1cb32bb169a82 | [
"MIT"
] | null | null | null | defmodule PrimaAuth0Ex.TokenProvider.TokenInfoTest do
use ExUnit.Case, async: true
alias PrimaAuth0Ex.TestSupport.JwtUtils
alias PrimaAuth0Ex.TokenProvider.TokenInfo
test "extracts metadata from token" do
issued_at = Timex.now() |> Timex.shift(hours: -12) |> Timex.to_unix()
expires_at = Timex.now() |>... | 33.65 | 109 | 0.656761 |
79907d08e1b4e3375e4623982f2d94b36140aaeb | 991 | exs | Elixir | test/json_schema_test_suite/draft7/optional/format/relative_json_pointer_test.exs | hrzndhrn/json_xema | 955eab7b0919d144b38364164d90275201c89474 | [
"MIT"
] | 54 | 2019-03-10T19:51:07.000Z | 2021-12-23T07:31:09.000Z | test/json_schema_test_suite/draft7/optional/format/relative_json_pointer_test.exs | hrzndhrn/json_xema | 955eab7b0919d144b38364164d90275201c89474 | [
"MIT"
] | 36 | 2018-05-20T09:13:20.000Z | 2021-03-14T15:22:03.000Z | test/json_schema_test_suite/draft7/optional/format/relative_json_pointer_test.exs | hrzndhrn/json_xema | 955eab7b0919d144b38364164d90275201c89474 | [
"MIT"
] | 3 | 2019-04-12T09:08:51.000Z | 2019-12-04T01:23:56.000Z | defmodule JsonSchemaTestSuite.Draft7.Optional.Format.RelativeJsonPointerTest do
use ExUnit.Case
import JsonXema, only: [valid?: 2]
describe ~s|validation of Relative JSON Pointers (RJP)| do
setup do
%{schema: JsonXema.new(%{"format" => "relative-json-pointer"})}
end
test ~s|a valid upwards RJ... | 27.527778 | 81 | 0.638749 |
7990a8188871c2a21d0aafcc34c1baa088922a66 | 3,407 | ex | Elixir | clients/sheets/lib/google_api/sheets/v4/model/batch_update_values_by_data_filter_request.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/sheets/lib/google_api/sheets/v4/model/batch_update_values_by_data_filter_request.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/sheets/lib/google_api/sheets/v4/model/batch_update_values_by_data_filter_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... | 54.079365 | 508 | 0.768418 |
7990b537559574ced4930f6abfd2469e3c725d7f | 1,114 | ex | Elixir | apps/tai/lib/tai/orders/submissions/sell_limit_gtc.ex | yurikoval/tai | 94254b45d22fa0307b01577ff7c629c7280c0295 | [
"MIT"
] | null | null | null | apps/tai/lib/tai/orders/submissions/sell_limit_gtc.ex | yurikoval/tai | 94254b45d22fa0307b01577ff7c629c7280c0295 | [
"MIT"
] | 78 | 2020-10-12T06:21:43.000Z | 2022-03-28T09:02:00.000Z | apps/tai/lib/tai/orders/submissions/sell_limit_gtc.ex | yurikoval/tai | 94254b45d22fa0307b01577ff7c629c7280c0295 | [
"MIT"
] | null | null | null | defmodule Tai.Orders.Submissions.SellLimitGtc do
alias __MODULE__
@type venue_id :: Tai.Venue.id()
@type credential_id :: Tai.Venue.credential_id()
@type venue_product_symbol :: Tai.Venues.Product.venue_symbol()
@type product_symbol :: Tai.Venues.Product.symbol()
@type product_type :: Tai.Venues.Product.ty... | 24.217391 | 65 | 0.663375 |
7990d73c993da20f5a663d4a52a8b27a49d50145 | 1,158 | ex | Elixir | lib/mollie/organizations.ex | LostKobrakai/mollie | dd697dfcf376eb1889d6371cc1179a335ef70b59 | [
"MIT"
] | null | null | null | lib/mollie/organizations.ex | LostKobrakai/mollie | dd697dfcf376eb1889d6371cc1179a335ef70b59 | [
"MIT"
] | null | null | null | lib/mollie/organizations.ex | LostKobrakai/mollie | dd697dfcf376eb1889d6371cc1179a335ef70b59 | [
"MIT"
] | null | null | null | defmodule Mollie.Organizations do
import Mollie
alias Mollie.Client
@doc """
Retrieve the currently authenticated organization.
## Example
Mollie.Organizations.me client
More info at: https://docs.mollie.com/reference/v2/organizations-api/current-organization
"""
@spec me(Client.t()) :: Mollie... | 24.125 | 91 | 0.693437 |
799105aae0d87886f517cd7b8c78cbc762728bfc | 948 | exs | Elixir | mix.exs | bonfire-networks/phoenix_gon | 2b8b3d330ac653751d175286eee6f02cb206f2e4 | [
"MIT"
] | null | null | null | mix.exs | bonfire-networks/phoenix_gon | 2b8b3d330ac653751d175286eee6f02cb206f2e4 | [
"MIT"
] | null | null | null | mix.exs | bonfire-networks/phoenix_gon | 2b8b3d330ac653751d175286eee6f02cb206f2e4 | [
"MIT"
] | null | null | null | defmodule PhoenixGon.Mixfile do
use Mix.Project
def project do
[
app: :phoenix_gon,
version: "0.4.1",
elixir: "~> 1.4",
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
description: description(),
package: package(),
deps: deps()
]
e... | 20.170213 | 73 | 0.53692 |
7991139e046a8e8428e9b912be48ff7bf1debf6c | 148 | exs | Elixir | apps/performance_2/config/test.exs | WhiteRookPL/elixir-fire-brigade-workshop | 1c6183339fc623842a09f4d10be75bcecf2c37e7 | [
"MIT"
] | 14 | 2017-08-09T14:21:47.000Z | 2022-03-11T04:10:49.000Z | apps/performance_2/config/test.exs | nicholasjhenry/elixir-fire-brigade-workshop | 1c6183339fc623842a09f4d10be75bcecf2c37e7 | [
"MIT"
] | null | null | null | apps/performance_2/config/test.exs | nicholasjhenry/elixir-fire-brigade-workshop | 1c6183339fc623842a09f4d10be75bcecf2c37e7 | [
"MIT"
] | 15 | 2017-09-05T15:43:53.000Z | 2020-04-13T16:20:18.000Z | use Mix.Config
config :spell_checker_api, SpellCheckerAPI.Web.Endpoint,
http: [
port: 4001
],
server: false
config :logger, level: :warn | 16.444444 | 56 | 0.709459 |
79911ea42a47aae928916fc186c368b9795f83c2 | 388 | ex | Elixir | lib/postoffice_web/controllers/api/topic_controller.ex | IgorRodriguez/postoffice | 9012193e0780f2403bd3db90b8f6258656780fee | [
"Apache-2.0"
] | 15 | 2020-01-24T10:33:57.000Z | 2020-10-24T07:57:14.000Z | lib/postoffice_web/controllers/api/topic_controller.ex | IgorRodriguez/postoffice | 9012193e0780f2403bd3db90b8f6258656780fee | [
"Apache-2.0"
] | 24 | 2020-01-24T09:52:56.000Z | 2021-02-19T09:15:12.000Z | lib/postoffice_web/controllers/api/topic_controller.ex | IgorRodriguez/postoffice | 9012193e0780f2403bd3db90b8f6258656780fee | [
"Apache-2.0"
] | 5 | 2020-01-25T18:03:44.000Z | 2021-02-23T10:07:03.000Z | defmodule PostofficeWeb.Api.TopicController do
use PostofficeWeb, :controller
alias Postoffice.Messaging.Topic
action_fallback PostofficeWeb.Api.FallbackController
def create(conn, topic_params) do
with {:ok, %Topic{} = topic} <- Postoffice.create_topic(topic_params) do
conn
|> put_status(:cr... | 24.25 | 76 | 0.719072 |
7991242d9fd33b12917e736abecf7a2ffe3c124a | 6,743 | ex | Elixir | lib/tracer/handler_agent.ex | gabiz/tracer | 4659bf3cc9e0cc86e653794b800e9eb5bbe9f0a2 | [
"MIT"
] | 125 | 2017-09-08T06:33:28.000Z | 2022-03-09T10:48:04.000Z | lib/tracer/handler_agent.ex | Gazler/tracer | 4659bf3cc9e0cc86e653794b800e9eb5bbe9f0a2 | [
"MIT"
] | 3 | 2017-09-21T01:56:24.000Z | 2020-10-29T13:27:44.000Z | lib/tracer/handler_agent.ex | Gazler/tracer | 4659bf3cc9e0cc86e653794b800e9eb5bbe9f0a2 | [
"MIT"
] | 6 | 2017-09-08T21:41:32.000Z | 2019-11-16T10:39:16.000Z | defmodule Tracer.HandlerAgent do
@moduledoc """
HandlerAgent takes care of starting and stopping traces in the
NUT (node under test), as well as watching over the event handler
as it processes events.
"""
alias __MODULE__
alias Tracer.PidHandler
import Tracer.Macros
@default_max_tracing_time 30_000
defstruc... | 28.816239 | 79 | 0.619606 |
79912c713e374df974755e580fabadd91e7b2e8f | 5,232 | ex | Elixir | lib/web/websocket.ex | IvanPereyra-23/PaaS | 0179c7b57645473308b0a295a70b6284ed220fbf | [
"Apache-2.0"
] | 1 | 2020-08-27T18:43:11.000Z | 2020-08-27T18:43:11.000Z | lib/web/websocket.ex | IvanPereyra-23/PaaS | 0179c7b57645473308b0a295a70b6284ed220fbf | [
"Apache-2.0"
] | null | null | null | lib/web/websocket.ex | IvanPereyra-23/PaaS | 0179c7b57645473308b0a295a70b6284ed220fbf | [
"Apache-2.0"
] | 1 | 2020-08-27T18:43:21.000Z | 2020-08-27T18:43:21.000Z | # Copyright(c) 2015-2020 ACCESS CO., LTD. All rights reserved.
use Croma
defmodule Antikythera.Websocket do
@moduledoc """
Behaviour module for websocket handlers.
Note the naming convention of the websocket-related modules; we use `Websocket`, `WebSocket` is not allowed.
Websocket module of gears must `use... | 39.636364 | 146 | 0.734327 |
7991324ccbf70195f87390b543a72dc113b48019 | 793 | ex | Elixir | deps/makeup/lib/makeup/styles/html/pygments/vs.ex | arduino-man/fona_modern | 61845bbbbc46a61a50e59a97c68709f2722078a6 | [
"MIT"
] | null | null | null | deps/makeup/lib/makeup/styles/html/pygments/vs.ex | arduino-man/fona_modern | 61845bbbbc46a61a50e59a97c68709f2722078a6 | [
"MIT"
] | null | null | null | deps/makeup/lib/makeup/styles/html/pygments/vs.ex | arduino-man/fona_modern | 61845bbbbc46a61a50e59a97c68709f2722078a6 | [
"MIT"
] | null | null | null |
defmodule Makeup.Styles.HTML.VisualStudioStyle do
@moduledoc false
@styles %{
:error => "border:#FF0000",
:keyword => "#0000ff",
:keyword_type => "#2b91af",
:name_class => "#2b91af",
:string => "#a31515",
:operator_word => "#0000ff",
:comment => "#008000",
:comment_prep... | 23.323529 | 50 | 0.582598 |
79913f0e50407ba548a631411ed18010a4994898 | 759 | exs | Elixir | test/r_utils_test.exs | TORIFUKUKaiou/ex-r_enum | 5fd99b61dae3c7fe8fc3838158af342ff308dff1 | [
"Apache-2.0"
] | 24 | 2022-01-13T23:13:11.000Z | 2022-03-27T18:02:39.000Z | test/r_utils_test.exs | TORIFUKUKaiou/ex-r_enum | 5fd99b61dae3c7fe8fc3838158af342ff308dff1 | [
"Apache-2.0"
] | 16 | 2022-01-16T09:18:17.000Z | 2022-02-08T01:10:09.000Z | test/r_utils_test.exs | TORIFUKUKaiou/ex-r_enum | 5fd99b61dae3c7fe8fc3838158af342ff308dff1 | [
"Apache-2.0"
] | 6 | 2022-01-16T04:40:42.000Z | 2022-02-07T14:56:26.000Z | defmodule RUtilsTest do
use ExUnit.Case
doctest RUtils
test "blank?/1" do
assert RUtils.blank?(%{})
assert RUtils.blank?([])
assert RUtils.blank?(nil)
assert RUtils.blank?(false)
assert RUtils.blank?(" ")
refute RUtils.blank?([1])
refute RUtils.blank?(true)
refute RUtils.blank?(1... | 24.483871 | 37 | 0.627141 |
79914a430469c43304357af326c07f7368ff355f | 2,828 | ex | Elixir | clients/apigee/lib/google_api/apigee/v1/model/google_cloud_apigee_v1_api_proxy.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/apigee/lib/google_api/apigee/v1/model/google_cloud_apigee_v1_api_proxy.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/apigee/lib/google_api/apigee/v1/model/google_cloud_apigee_v1_api_proxy.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 43.507692 | 253 | 0.701556 |
7991817f9c6ec50e0aaecd95e1416f495a8a23ab | 840 | exs | Elixir | elixir/acronym/acronym_test.exs | ArtemGordinsky/exercism | 74e91e3b48ca920803474ec435c13eac66351b9f | [
"Unlicense"
] | null | null | null | elixir/acronym/acronym_test.exs | ArtemGordinsky/exercism | 74e91e3b48ca920803474ec435c13eac66351b9f | [
"Unlicense"
] | null | null | null | elixir/acronym/acronym_test.exs | ArtemGordinsky/exercism | 74e91e3b48ca920803474ec435c13eac66351b9f | [
"Unlicense"
] | null | null | null | if !System.get_env("EXERCISM_TEST_EXAMPLES") do
Code.load_file("acronym.exs", __DIR__)
end
ExUnit.start
ExUnit.configure exclude: :pending, trace: true
defmodule AcronymTest do
use ExUnit.Case
test "it produces acronyms from title case" do
assert Acronym.abbreviate("Portable Networks Graphic") === "PNG"
... | 24 | 83 | 0.727381 |
7991d2f9bceea076eb08cf92cb0493d0d9e70d18 | 1,510 | ex | Elixir | lib/live_view_collection_web/views/error_helpers.ex | sandeshsoni/phoenix-liveview-collection | 6a3ae19f9aec1d2776a38edca2ff8497fc371257 | [
"MIT"
] | 32 | 2019-04-01T02:39:49.000Z | 2020-12-04T02:57:01.000Z | lib/live_view_collection_web/views/error_helpers.ex | sandeshsoni/phoenix-liveview-collection | 6a3ae19f9aec1d2776a38edca2ff8497fc371257 | [
"MIT"
] | 13 | 2020-03-29T19:40:34.000Z | 2021-12-06T22:18:02.000Z | lib/live_view_collection_web/views/error_helpers.ex | sandeshsoni/phoenix-liveview-collection | 6a3ae19f9aec1d2776a38edca2ff8497fc371257 | [
"MIT"
] | 4 | 2019-08-01T16:21:16.000Z | 2020-04-01T17:39:10.000Z | defmodule LiveViewCollectionWeb.ErrorHelpers do
@moduledoc """
Conveniences for translating and building error messages.
"""
use Phoenix.HTML
@doc """
Generates tag for inlined form input errors.
"""
def error_tag(form, field) do
Enum.map(Keyword.get_values(form.errors, field), fn error ->
c... | 33.555556 | 87 | 0.677483 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.