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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
280f882d94b701d174413636b0a49e71c4447fee | 752 | ex | Elixir | lib/upman/managed_table.ex | flat235/upman | c480bc102ea20ceb597d261a290e07a1f6fa3e8a | [
"Apache-2.0"
] | 4 | 2018-08-10T20:41:49.000Z | 2018-11-29T15:56:05.000Z | lib/upman/managed_table.ex | flat235/upman | c480bc102ea20ceb597d261a290e07a1f6fa3e8a | [
"Apache-2.0"
] | 6 | 2018-06-11T16:03:12.000Z | 2020-04-06T00:08:15.000Z | lib/upman/managed_table.ex | flat235/upman | c480bc102ea20ceb597d261a290e07a1f6fa3e8a | [
"Apache-2.0"
] | null | null | null | defmodule Upman.ManagedTable do
defmacro __using__(_) do
quote([]) do
use GenServer
require Logger
def init(_args) do
Process.flag(:trap_exit, true)
Logger.info("#{__MODULE__}: claiming ETS Table named #{__MODULE__}")
Upman.TableManager.claim_table(__MODULE__)
{:... | 25.931034 | 76 | 0.630319 |
280f8c91177df459284b7db27cddaa97ef6b7ad9 | 508 | exs | Elixir | test/structs/overwrite_test.exs | SpaceEEC/crux_structs | c10adb64ab6392c8601e4c53447128294daf0ae3 | [
"MIT"
] | 6 | 2018-05-22T07:13:47.000Z | 2019-10-17T03:40:22.000Z | test/structs/overwrite_test.exs | SpaceEEC/crux_structs | c10adb64ab6392c8601e4c53447128294daf0ae3 | [
"MIT"
] | 2 | 2018-11-01T17:11:51.000Z | 2019-06-15T13:33:31.000Z | test/structs/overwrite_test.exs | SpaceEEC/crux_structs | c10adb64ab6392c8601e4c53447128294daf0ae3 | [
"MIT"
] | 2 | 2018-10-29T06:53:41.000Z | 2019-06-14T19:15:56.000Z | defmodule Crux.Structs.OverwriteTest do
use ExUnit.Case, async: true
doctest Crux.Structs.Overwrite
test "create" do
overwrite =
%{
"type" => 1,
"id" => "218348062828003328",
"allow" => 0x400,
"deny" => 0x800
}
|> Crux.Structs.create(Crux.Structs.Overwrite)
... | 22.086957 | 52 | 0.543307 |
280f9e9ce676b0a974f506528baf1c07f319cf83 | 425 | ex | Elixir | lib/meta.ex | enter-haken/static | f3ae079a923ba7f738dd0128af4a6cb660ac1226 | [
"MIT"
] | null | null | null | lib/meta.ex | enter-haken/static | f3ae079a923ba7f738dd0128af4a6cb660ac1226 | [
"MIT"
] | null | null | null | lib/meta.ex | enter-haken/static | f3ae079a923ba7f738dd0128af4a6cb660ac1226 | [
"MIT"
] | null | null | null | defmodule Static.Meta do
alias __MODULE__
@type t :: %Meta{
created_at: Date.t()
}
defstruct created_at: nil
def create(nil), do: %Meta{}
def create(raw) do
with {:ok, %{"created_at" => raw_created_at}} <- YamlElixir.read_from_string(raw),
{:ok, created_at} <- Date.from_iso8... | 20.238095 | 86 | 0.609412 |
280fb8772540c5b8b4234c458b0ccf38b9fd1c53 | 116 | exs | Elixir | test/int_pool_test.exs | keichan34/int_pool | 683a77ba4d0bd7c8811b9e0df7447ab88b8c2336 | [
"MIT"
] | null | null | null | test/int_pool_test.exs | keichan34/int_pool | 683a77ba4d0bd7c8811b9e0df7447ab88b8c2336 | [
"MIT"
] | null | null | null | test/int_pool_test.exs | keichan34/int_pool | 683a77ba4d0bd7c8811b9e0df7447ab88b8c2336 | [
"MIT"
] | null | null | null | defmodule IntPoolTest do
use ExUnit.Case
doctest IntPool
test "the truth" do
assert 1 + 1 == 2
end
end
| 12.888889 | 24 | 0.672414 |
28100d4562309c56f3a99c8fba85d43cff3ae36c | 543 | ex | Elixir | Strings.ex | hectorip/ErlangExercises | 4a1aa5de0504da1bfe5a6c31c1d20277524ab363 | [
"MIT"
] | 4 | 2016-09-22T03:47:56.000Z | 2017-02-02T17:42:57.000Z | Strings.ex | hectorip/ErlangExercises | 4a1aa5de0504da1bfe5a6c31c1d20277524ab363 | [
"MIT"
] | null | null | null | Strings.ex | hectorip/ErlangExercises | 4a1aa5de0504da1bfe5a6c31c1d20277524ab363 | [
"MIT"
] | null | null | null | # Strings, Elixir doesn't have strings as a primitive type
an_string = "This is an String"
embedded_expression = "Pi value is #{3 + 0.141592 }"
IO.puts an_string
IO.puts embedded_expression
# Concatenating Strings
concat = "My String " <> " was built by " <> "concatenation"
IO.puts concat
multi_line = "
Thi... | 16.454545 | 60 | 0.710866 |
2810366fc5d7b2e89a0c075e0992934efa0a9d59 | 429 | exs | Elixir | test/leafblower_web/views/error_view_test.exs | aquap/leafblower | aa5f48dc99efef405af84de072199eaa3b13c02f | [
"Apache-2.0"
] | 31 | 2021-11-28T05:48:48.000Z | 2022-02-03T01:46:17.000Z | test/leafblower_web/views/error_view_test.exs | aquap/leafblower | aa5f48dc99efef405af84de072199eaa3b13c02f | [
"Apache-2.0"
] | 8 | 2021-11-28T06:38:17.000Z | 2021-12-10T01:21:17.000Z | test/leafblower_web/views/error_view_test.exs | aquap/leafblower | aa5f48dc99efef405af84de072199eaa3b13c02f | [
"Apache-2.0"
] | 2 | 2021-11-28T21:09:47.000Z | 2022-01-16T03:51:21.000Z | defmodule LeafblowerWeb.ErrorViewTest do
use LeafblowerWeb.ConnCase, async: true
# Bring render/3 and render_to_string/3 for testing custom views
import Phoenix.View
test "renders 404.html" do
assert render_to_string(LeafblowerWeb.ErrorView, "404.html", []) == "Not Found"
end
test "renders 500.html" ... | 28.6 | 95 | 0.741259 |
281046a258e112d3918b259740c6e4542189a47d | 3,795 | ex | Elixir | lib/bitpal/invoices/invoice_manager.ex | bitpal/bitpal | 0e10eeaacf7a65b23945cfb95e4dbda8bffd4590 | [
"BSD-3-Clause-Clear"
] | 5 | 2021-05-04T21:28:00.000Z | 2021-12-01T11:19:48.000Z | lib/bitpal/invoices/invoice_manager.ex | bitpal/bitpal | 0e10eeaacf7a65b23945cfb95e4dbda8bffd4590 | [
"BSD-3-Clause-Clear"
] | 71 | 2021-04-21T05:48:49.000Z | 2022-03-23T06:30:37.000Z | lib/bitpal/invoices/invoice_manager.ex | bitpal/bitpal | 0e10eeaacf7a65b23945cfb95e4dbda8bffd4590 | [
"BSD-3-Clause-Clear"
] | 1 | 2021-04-25T10:35:41.000Z | 2021-04-25T10:35:41.000Z | defmodule BitPal.InvoiceManager do
use DynamicSupervisor
alias BitPal.InvoiceHandler
alias BitPal.Invoices
alias BitPal.ProcessRegistry
alias BitPalSchemas.Invoice
alias Ecto.Changeset
@type server_name :: atom | {:via, term, term}
@spec start_link(keyword) :: Supervisor.on_start()
def start_link(op... | 27.70073 | 95 | 0.65112 |
28104b20f4dc2173686536cd8bc2feae0f9b1368 | 21,525 | ex | Elixir | teachme/deps/postgrex/lib/postgrex.ex | kodeklubben-sandefjord/kodeklubben-sandefjord.github.io | 89351bceb132f87b1d2a0bcb325fb278d7ad48a4 | [
"MIT"
] | null | null | null | teachme/deps/postgrex/lib/postgrex.ex | kodeklubben-sandefjord/kodeklubben-sandefjord.github.io | 89351bceb132f87b1d2a0bcb325fb278d7ad48a4 | [
"MIT"
] | 1 | 2020-07-17T10:07:44.000Z | 2020-07-17T10:07:44.000Z | teachme/deps/postgrex/lib/postgrex.ex | kodeklubben-sandefjord/kodeklubben-sandefjord.github.io | 89351bceb132f87b1d2a0bcb325fb278d7ad48a4 | [
"MIT"
] | null | null | null | defmodule Postgrex do
@moduledoc """
PostgreSQL driver for Elixir.
This module handles the connection to Postgres, providing support
for queries, transactions, connection backoff, logging, pooling and
more.
Note that the notifications API (pub/sub) supported by Postgres is
handled by `Postgrex.Notificat... | 39.568015 | 108 | 0.672846 |
28105e299ba5ac9d1ab6ba166efb9f857e23ced9 | 116 | exs | Elixir | config/dev.exs | ScrimpyCat/Translecto | 4874ea31b720ee4ab554c46c2db05d374db3bae4 | [
"BSD-2-Clause"
] | 4 | 2016-09-23T13:20:18.000Z | 2018-11-03T21:52:20.000Z | config/dev.exs | ScrimpyCat/Translecto | 4874ea31b720ee4ab554c46c2db05d374db3bae4 | [
"BSD-2-Clause"
] | 1 | 2017-10-18T11:59:46.000Z | 2017-10-18T11:59:46.000Z | config/dev.exs | ScrimpyCat/Translecto | 4874ea31b720ee4ab554c46c2db05d374db3bae4 | [
"BSD-2-Clause"
] | null | null | null | use Mix.Config
import_config "simple_markdown_rules.exs"
config :ex_doc, :markdown_processor, ExDocSimpleMarkdown
| 19.333333 | 56 | 0.844828 |
2810a401e5ed80563bfd1b0e2c6105cf9ba42150 | 378 | ex | Elixir | lib/inflator_web/views/error_view.ex | astoica1986/inflator | ca0e99a8e114956edae0b0456eb8b8d97c67a342 | [
"Apache-2.0"
] | null | null | null | lib/inflator_web/views/error_view.ex | astoica1986/inflator | ca0e99a8e114956edae0b0456eb8b8d97c67a342 | [
"Apache-2.0"
] | null | null | null | lib/inflator_web/views/error_view.ex | astoica1986/inflator | ca0e99a8e114956edae0b0456eb8b8d97c67a342 | [
"Apache-2.0"
] | null | null | null | defmodule InflatorWeb.ErrorView do
use InflatorWeb, :view
def render("404.html", _assigns) do
"Page not found"
end
def render("500.html", _assigns) do
"Internal server error"
end
# In case no render clause matches or no
# template is found, let's render it as 500
def template_not_found(_templ... | 21 | 47 | 0.703704 |
2810aeb4d28a8304ae493f39f7fddda3ae0dfb25 | 3,328 | ex | Elixir | apps/blunt/lib/blunt/message/constructor.ex | blunt-elixir/blunt | a88b88984022db7ba2110204248fdb541121e3a0 | [
"MIT"
] | 1 | 2022-03-07T11:54:47.000Z | 2022-03-07T11:54:47.000Z | apps/blunt/lib/blunt/message/constructor.ex | blunt-elixir/blunt | a88b88984022db7ba2110204248fdb541121e3a0 | [
"MIT"
] | null | null | null | apps/blunt/lib/blunt/message/constructor.ex | blunt-elixir/blunt | a88b88984022db7ba2110204248fdb541121e3a0 | [
"MIT"
] | null | null | null | defmodule Blunt.Message.Constructor do
@moduledoc false
alias Ecto.Changeset
alias __MODULE__, as: Constructor
alias Blunt.Message.Changeset, as: MessageChangeset
alias Blunt.Message.{Documentation, Input, Metadata}
defmacro register(opts) do
quote bind_quoted: [opts: opts] do
constructor = Keyw... | 35.404255 | 120 | 0.670072 |
2810d8aa2e2f6770edc7fe49df625d51f72e1659 | 2,440 | exs | Elixir | apps/admin_api/test/admin_api/v1/auth/admin_api_auth_test.exs | amadeobrands/ewallet | 505b7822721940a7b892a9b35c225e80cc8ac0b4 | [
"Apache-2.0"
] | 1 | 2018-12-07T06:21:21.000Z | 2018-12-07T06:21:21.000Z | apps/admin_api/test/admin_api/v1/auth/admin_api_auth_test.exs | amadeobrands/ewallet | 505b7822721940a7b892a9b35c225e80cc8ac0b4 | [
"Apache-2.0"
] | null | null | null | apps/admin_api/test/admin_api/v1/auth/admin_api_auth_test.exs | amadeobrands/ewallet | 505b7822721940a7b892a9b35c225e80cc8ac0b4 | [
"Apache-2.0"
] | null | null | null | defmodule AdminAPI.Web.V1.AdminAPIAuthTest do
use AdminAPI.ConnCase, async: true
alias AdminAPI.V1.AdminAPIAuth
alias EWalletDB.User
def authenticate(scheme, user_id, token) do
encoded_key = Base.encode64(user_id <> ":" <> token)
AdminAPIAuth.authenticate(%{
"headers" => [{"authorization", "#{sc... | 32.105263 | 82 | 0.67582 |
2810db7f78f4b66b38233bb4d3011ef25510e95a | 1,234 | exs | Elixir | mix.exs | ni-kismet/excoveralls-overall | c232b2a928a9e1ea61bc0e9d0fd645237726b54f | [
"MIT"
] | 1 | 2020-05-06T15:16:11.000Z | 2020-05-06T15:16:11.000Z | mix.exs | ni-kismet/excoveralls-overall | c232b2a928a9e1ea61bc0e9d0fd645237726b54f | [
"MIT"
] | null | null | null | mix.exs | ni-kismet/excoveralls-overall | c232b2a928a9e1ea61bc0e9d0fd645237726b54f | [
"MIT"
] | null | null | null | defmodule ExCoveralls.Mixfile do
use Mix.Project
def project do
[ app: :excoveralls,
version: "0.7.4",
elixir: "~> 1.2",
deps: deps(),
description: description(),
package: package(),
test_coverage: [tool: ExCoveralls],
preferred_cli_env: cli_env_for(:test, [
"c... | 24.196078 | 94 | 0.571313 |
28115480d21f5c15cad32a90f608a1563d268b23 | 1,153 | ex | Elixir | web/channels/refresh_channel.ex | kluthen/upsilon_battle | 3e01bb162def2c42c78936afc07b4a74c67624ac | [
"MIT"
] | null | null | null | web/channels/refresh_channel.ex | kluthen/upsilon_battle | 3e01bb162def2c42c78936afc07b4a74c67624ac | [
"MIT"
] | 2 | 2017-07-05T06:48:59.000Z | 2017-07-13T14:16:25.000Z | web/channels/refresh_channel.ex | kluthen/upsilon_battle | 3e01bb162def2c42c78936afc07b4a74c67624ac | [
"MIT"
] | null | null | null | defmodule UpsilonBattle.RefreshChannel do
use Phoenix.Channel
#
# Channels
#
# UpsilonBattle.Endpoint.
#
# subscribe(topic, opts) - subscribes the caller to the given topic. See Phoenix.PubSub.subscribe/3 for options.
#
# unsubscribe(topic) - unsubscribes the caller from the given topic.
#
# ... | 32.027778 | 142 | 0.693842 |
2811678b8e21ff66f29e9dd58184756d15501a89 | 2,610 | ex | Elixir | clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/renew_lease_request.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/renew_lease_request.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/renew_lease_request.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... | 35.753425 | 124 | 0.721839 |
28117c75bc6829070309490bc37e6c5809db6852 | 852 | exs | Elixir | apps/ewallet_db/priv/repo/migrations/20180705182907_drop_name_from_exchange_pair.exs | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | apps/ewallet_db/priv/repo/migrations/20180705182907_drop_name_from_exchange_pair.exs | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | apps/ewallet_db/priv/repo/migrations/20180705182907_drop_name_from_exchange_pair.exs | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 OmiseGO Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 28.4 | 74 | 0.738263 |
28118c3a5c312c109d950011365c04656c5116f2 | 12,317 | exs | Elixir | test/concentrate/parser/gtfs_realtime_enhanced_test.exs | paulswartz/concentrate | a69aa51c16071f2669932005be810da198f622c8 | [
"MIT"
] | 19 | 2018-01-22T18:39:20.000Z | 2022-02-22T16:15:30.000Z | test/concentrate/parser/gtfs_realtime_enhanced_test.exs | mbta/concentrate | bae6e05713ed079b7da53867a01dd007861fb656 | [
"MIT"
] | 216 | 2018-01-22T14:22:39.000Z | 2022-03-31T10:30:31.000Z | test/concentrate/parser/gtfs_realtime_enhanced_test.exs | paulswartz/concentrate | a69aa51c16071f2669932005be810da198f622c8 | [
"MIT"
] | 5 | 2018-01-22T14:18:15.000Z | 2021-04-26T18:34:19.000Z | defmodule Concentrate.Parser.GTFSRealtimeEnhancedTest do
@moduledoc false
use ExUnit.Case
import ExUnit.CaptureLog
import Concentrate.TestHelpers
import Concentrate.Parser.GTFSRealtimeEnhanced
alias Concentrate.{
TripDescriptor,
StopTimeUpdate,
VehiclePosition,
Alert,
Alert.InformedEnti... | 29.256532 | 115 | 0.503369 |
28119ba966467bef9a2b69ebb3187f30d4080945 | 2,277 | exs | Elixir | day_05.exs | itwasscience/AdventOfCode-2021 | 45867c902f737ed22291826b7ce8dcf8c932e8af | [
"MIT"
] | null | null | null | day_05.exs | itwasscience/AdventOfCode-2021 | 45867c902f737ed22291826b7ce8dcf8c932e8af | [
"MIT"
] | null | null | null | day_05.exs | itwasscience/AdventOfCode-2021 | 45867c902f737ed22291826b7ce8dcf8c932e8af | [
"MIT"
] | null | null | null | defmodule Day_05 do
def run() do
vh_intersections = get_coord_pairs()
|> build_vh_map()
|> render_map()
|> Enum.reduce(0, fn {_k, v}, acc -> if v > 1, do: acc + 1, else: acc end)
IO.puts("Part 1: #{vh_intersections}")
diag_intersections = get_coord_pairs()
|> build_diag_map()
|> Enum... | 25.3 | 106 | 0.483531 |
2811afb0571369b30d3dc70c45892c6cd4cc9b00 | 4,046 | ex | Elixir | test/support/shared_case.ex | f0lio/edgedb-elixir | b285bd8037b0b951aabfa1d1733889880f8bfd66 | [
"MIT"
] | 30 | 2021-05-19T08:54:44.000Z | 2022-03-11T22:52:25.000Z | test/support/shared_case.ex | f0lio/edgedb-elixir | b285bd8037b0b951aabfa1d1733889880f8bfd66 | [
"MIT"
] | 3 | 2021-11-17T21:26:01.000Z | 2022-03-12T09:49:25.000Z | test/support/shared_case.ex | f0lio/edgedb-elixir | b285bd8037b0b951aabfa1d1733889880f8bfd66 | [
"MIT"
] | 3 | 2021-08-29T14:55:41.000Z | 2022-03-12T01:30:35.000Z | # credo:disable-for-this-file Credo.Check.Readability.Specs
defmodule Tests.Support.SharedCase do
use ExUnit.CaseTemplate
import Mox
alias Tests.Support.Mocks
require Logger
using do
quote do
import Mox
import Tests.Support.EdgeDBCase
import unquote(__MODULE__)
@debug_shared... | 21.752688 | 98 | 0.570687 |
2811bd3405da03930099ba598e31f9f9543a647a | 2,090 | exs | Elixir | config/prod.exs | gratraw/home_appliances_store | 36b5274294ef3e0124740c2f992695860884976d | [
"MIT"
] | null | null | null | config/prod.exs | gratraw/home_appliances_store | 36b5274294ef3e0124740c2f992695860884976d | [
"MIT"
] | null | null | null | config/prod.exs | gratraw/home_appliances_store | 36b5274294ef3e0124740c2f992695860884976d | [
"MIT"
] | null | null | null | use Mix.Config
# For production, don't forget to configure the url host
# to something meaningful, Phoenix uses this information
# when generating URLs.
#
# Note we also include the path to a cache manifest
# containing the digested version of static files. This
# manifest is generated by the `mix phx.digest` task,
# ... | 37.321429 | 69 | 0.725359 |
2811c6a0b567bc51e659b34acfa3533b7eb810bf | 1,840 | ex | Elixir | lib/plausible/event/write_buffer.ex | samuel-p/analytics | 5d35bab9c6c2aafc556659f64e4213848a37ed8a | [
"MIT"
] | 2 | 2020-05-16T13:48:44.000Z | 2020-05-22T09:52:36.000Z | lib/plausible/event/write_buffer.ex | samuel-p/analytics | 5d35bab9c6c2aafc556659f64e4213848a37ed8a | [
"MIT"
] | 2 | 2020-07-09T21:44:35.000Z | 2020-07-14T07:06:10.000Z | lib/plausible/event/write_buffer.ex | ffMathy/analytics | 4e8c06076a7a94c4ad3b2410437f2b0ab31e1f8e | [
"MIT"
] | null | null | null | defmodule Plausible.Event.WriteBuffer do
use GenServer
require Logger
alias Plausible.Clickhouse
@flush_interval_ms 5_000
@max_buffer_size 10_000
def start_link(_opts) do
GenServer.start_link(__MODULE__, [], name: __MODULE__)
end
def init(buffer) do
Process.flag(:trap_exit, true)
timer = P... | 25.915493 | 71 | 0.657609 |
2811c6cd5086c87d0281bf4e2da27535f624e24f | 1,516 | ex | Elixir | clients/notebooks/lib/google_api/notebooks/v1/model/update_instance_metadata_items_request.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/notebooks/lib/google_api/notebooks/v1/model/update_instance_metadata_items_request.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/notebooks/lib/google_api/notebooks/v1/model/update_instance_metadata_items_request.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"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... | 32.255319 | 98 | 0.746702 |
2811d3919468c1219b6816f51439746895c59db3 | 440 | ex | Elixir | lib/simpler_cache/table_worker.ex | v-kat/simpler_cache | e8a40d504be12ba3f4eb7500d3fc19a8e4356384 | [
"MIT"
] | 17 | 2018-09-24T21:30:29.000Z | 2020-05-18T21:29:48.000Z | lib/simpler_cache/table_worker.ex | v-kat/simpler_cache | e8a40d504be12ba3f4eb7500d3fc19a8e4356384 | [
"MIT"
] | 1 | 2019-01-31T04:17:31.000Z | 2019-02-05T00:52:14.000Z | lib/simpler_cache/table_worker.ex | v-kat/simpler_cache | e8a40d504be12ba3f4eb7500d3fc19a8e4356384 | [
"MIT"
] | 1 | 2019-04-02T13:33:42.000Z | 2019-04-02T13:33:42.000Z | defmodule SimplerCache.TableWorker do
use GenServer
@table_name Application.get_env(:simpler_cache, :cache_name, :simpler_cache)
def start_link(_arg) do
GenServer.start_link(__MODULE__, %{})
end
@impl true
def init(_state) do
table =
:ets.new(@table_name, [
:set,
:public,
... | 19.130435 | 78 | 0.634091 |
2811e0b77b94e9ee6d28b5c452ea93a1eb408c36 | 985 | ex | Elixir | lib/url/mailto.ex | kianmeng/url | e65a0f3cff4bea203c7965d4d7c4cf612169d726 | [
"Apache-2.0"
] | 13 | 2018-11-26T09:08:52.000Z | 2022-01-21T10:21:35.000Z | lib/url/mailto.ex | kianmeng/url | e65a0f3cff4bea203c7965d4d7c4cf612169d726 | [
"Apache-2.0"
] | 1 | 2021-05-11T18:48:26.000Z | 2021-05-11T18:48:26.000Z | lib/url/mailto.ex | kipcole9/url | 0840f51a96f618b0123bdf33cebcaac517b830e3 | [
"Apache-2.0"
] | null | null | null | defmodule URL.Mailto do
@moduledoc """
Parses a `mailto` URL
"""
import NimbleParsec
import URL.ParseHelpers.{Core, Mailto, Unwrap}
@type t() :: %__MODULE__{
to: [binary(), ...],
params: map()
}
defstruct to: nil, params: %{}
@doc """
Parse a URI with the `:scheme` of "tel"
## Example
... | 24.02439 | 99 | 0.579695 |
2811ec956b8f92c0c43c7a4d7142e612e702a866 | 10,671 | exs | Elixir | apps/discovery_api/test/integration/discovery_api/auth/auth_test.exs | smartcitiesdata/smartcitiesdata | c926c25003a8ee2d09b933c521c49f674841c0b6 | [
"Apache-2.0"
] | 26 | 2019-09-20T23:54:45.000Z | 2020-08-20T14:23:32.000Z | apps/discovery_api/test/integration/discovery_api/auth/auth_test.exs | smartcitiesdata/smartcitiesdata | c926c25003a8ee2d09b933c521c49f674841c0b6 | [
"Apache-2.0"
] | 757 | 2019-08-15T18:15:07.000Z | 2020-09-18T20:55:31.000Z | apps/discovery_api/test/integration/discovery_api/auth/auth_test.exs | smartcitiesdata/smartcitiesdata | c926c25003a8ee2d09b933c521c49f674841c0b6 | [
"Apache-2.0"
] | 9 | 2019-11-12T16:43:46.000Z | 2020-03-25T16:23:16.000Z | defmodule DiscoveryApi.Auth.AuthTest do
use ExUnit.Case
use DiscoveryApi.DataCase
use DiscoveryApiWeb.Test.AuthConnCase.IntegrationCase
use Placebo
import ExUnit.CaptureLog
import SmartCity.TestHelper, only: [eventually: 3]
alias DiscoveryApi.Test.Helper
alias DiscoveryApi.Schemas.Users
alias Discov... | 35.57 | 140 | 0.665636 |
28121015480e68a5749d3eefb5c900a56b969b7e | 492 | exs | Elixir | time_tracker_backend/test/models/organization_test.exs | knewter/time-tracker | 1f58031112a24c26a1a54ac33105b4430a04e954 | [
"MIT"
] | 382 | 2016-08-18T07:34:27.000Z | 2021-02-25T20:46:34.000Z | time_tracker_backend/test/models/organization_test.exs | knewter/time-tracker | 1f58031112a24c26a1a54ac33105b4430a04e954 | [
"MIT"
] | 1 | 2017-09-30T00:01:26.000Z | 2017-09-30T00:01:26.000Z | time_tracker_backend/test/models/organization_test.exs | knewter/time-tracker | 1f58031112a24c26a1a54ac33105b4430a04e954 | [
"MIT"
] | 45 | 2016-08-30T07:34:04.000Z | 2020-01-27T11:39:26.000Z | defmodule TimeTrackerBackend.OrganizationTest do
use TimeTrackerBackend.ModelCase
alias TimeTrackerBackend.Organization
@valid_attrs %{name: "some content"}
@invalid_attrs %{}
test "changeset with valid attributes" do
changeset = Organization.changeset(%Organization{}, @valid_attrs)
assert changese... | 25.894737 | 71 | 0.764228 |
28121ebb7ee8b271efe9bf3126f972210cedb128 | 1,402 | exs | Elixir | machine_translation/MorpHIN/Learned/Resources/Set1/TrainingInstances/66.exs | AdityaPrasadMishra/NLP--Project-Group-16 | fb62cc6a1db4a494058171f11c14a2be3933a9a1 | [
"MIT"
] | null | null | null | machine_translation/MorpHIN/Learned/Resources/Set1/TrainingInstances/66.exs | AdityaPrasadMishra/NLP--Project-Group-16 | fb62cc6a1db4a494058171f11c14a2be3933a9a1 | [
"MIT"
] | null | null | null | machine_translation/MorpHIN/Learned/Resources/Set1/TrainingInstances/66.exs | AdityaPrasadMishra/NLP--Project-Group-16 | fb62cc6a1db4a494058171f11c14a2be3933a9a1 | [
"MIT"
] | null | null | null | **EXAMPLE FILE**
neg verb adjective noun conj;
noun cm pnoun cm particle;
verb verb_aux noun quantifier conj;
noun verb adjective verb conj;
verb verb_aux demonstrative noun conj;
verb verb_aux particle demonstrative conj;
noun verb verb_aux conj particle;
pn nst adjective noun particle;
verb_aux pn quantifie... | 30.478261 | 43 | 0.780314 |
281223e95490b701d175013c5f5e611dfe7ec015 | 795 | ex | Elixir | 05-chapter/03_my_list.ex | herminiotorres/learn-funcional-programming-with-elixir | 01b0696e0859da20f389a6e53c51b5ab6c4f6e24 | [
"MIT"
] | 1 | 2022-03-01T13:54:43.000Z | 2022-03-01T13:54:43.000Z | 05-chapter/03_my_list.ex | herminiotorres/learn-funcional-programming-with-elixir | 01b0696e0859da20f389a6e53c51b5ab6c4f6e24 | [
"MIT"
] | null | null | null | 05-chapter/03_my_list.ex | herminiotorres/learn-funcional-programming-with-elixir | 01b0696e0859da20f389a6e53c51b5ab6c4f6e24 | [
"MIT"
] | null | null | null | defmodule MyList do
def reduce([], accumulator, _function), do: accumulator
def reduce([head | tail], accumulator, function) do
reduce(tail, function.(head, accumulator), function)
end
end
enchanted_items = [
%{title: "Edwin's Longsword", price: 150},
%{title: "Healing Potion", price: 60},
%{title: "E... | 23.382353 | 63 | 0.625157 |
2812458f6de396da269f4a29f9064112ad987d5a | 1,103 | exs | Elixir | test/mix/tasks/sbom.cyclonedx_test.exs | TraceyOnim/sbom | 55ee8867d4c7f53b6e282a8aad584435c82d5379 | [
"BSD-3-Clause"
] | 21 | 2019-10-24T16:19:21.000Z | 2021-07-21T07:40:53.000Z | test/mix/tasks/sbom.cyclonedx_test.exs | TraceyOnim/sbom | 55ee8867d4c7f53b6e282a8aad584435c82d5379 | [
"BSD-3-Clause"
] | 5 | 2020-05-31T05:30:51.000Z | 2022-03-21T14:31:18.000Z | test/mix/tasks/sbom.cyclonedx_test.exs | TraceyOnim/sbom | 55ee8867d4c7f53b6e282a8aad584435c82d5379 | [
"BSD-3-Clause"
] | 8 | 2019-11-02T08:08:57.000Z | 2022-03-02T07:19:24.000Z | defmodule Mix.Tasks.Sbom.CyclonedxTest do
use ExUnit.Case
setup_all do
Mix.shell(Mix.Shell.Process)
:ok
end
setup do
Mix.Shell.Process.flush()
:ok
end
test "mix task" do
Mix.Project.in_project(__MODULE__, "test/fixtures/sample1", fn _mod ->
Mix.Task.rerun("deps.clean", ["--all"]... | 26.902439 | 89 | 0.612874 |
2812784d3548d604b84536a887973186f37a9ab9 | 126 | ex | Elixir | lib/complete_binary_tree/leaf.ex | msmykowski/random_access_list | 06167cdce53e6916d79c0e639b8837dedec86471 | [
"MIT"
] | 3 | 2020-11-16T23:38:08.000Z | 2020-12-15T12:33:37.000Z | lib/complete_binary_tree/leaf.ex | msmykowski/random_access_list | 06167cdce53e6916d79c0e639b8837dedec86471 | [
"MIT"
] | 1 | 2020-11-17T17:49:44.000Z | 2020-11-17T17:49:44.000Z | lib/complete_binary_tree/leaf.ex | msmykowski/random_access_list | 06167cdce53e6916d79c0e639b8837dedec86471 | [
"MIT"
] | null | null | null | defmodule CompleteBinaryTree.Leaf do
defstruct [:value]
def new(value) do
struct(__MODULE__, value: value)
end
end
| 15.75 | 36 | 0.730159 |
28128386ef1000f1fce22606af7976620f7edfc1 | 30,466 | ex | Elixir | bench/lib/datasets/google_message3/benchmark_message3_2.pb.ex | arctic-grpc/protobuf | 228e1a2912af7b7f7f49ef871e43dd6b886f6675 | [
"MIT"
] | null | null | null | bench/lib/datasets/google_message3/benchmark_message3_2.pb.ex | arctic-grpc/protobuf | 228e1a2912af7b7f7f49ef871e43dd6b886f6675 | [
"MIT"
] | null | null | null | bench/lib/datasets/google_message3/benchmark_message3_2.pb.ex | arctic-grpc/protobuf | 228e1a2912af7b7f7f49ef871e43dd6b886f6675 | [
"MIT"
] | null | null | null | defmodule Benchmarks.GoogleMessage3.Message22853 do
@moduledoc false
use Protobuf, protoc_gen_elixir_version: "0.9.0-dev", syntax: :proto2
field :field22869, 1, optional: true, type: Benchmarks.GoogleMessage3.Enum22854, enum: true
field :field22870, 2, repeated: true, type: :uint32, packed: true, deprecated: f... | 50.357025 | 96 | 0.750312 |
281296899f460160183cc90dfd05bfe4286a334e | 1,295 | exs | Elixir | test/cog/chat/slack/templates/common/error_test.exs | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 1,003 | 2016-02-23T17:21:12.000Z | 2022-02-20T14:39:35.000Z | test/cog/chat/slack/templates/common/error_test.exs | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 906 | 2016-02-22T22:54:19.000Z | 2022-03-11T15:19:43.000Z | test/cog/chat/slack/templates/common/error_test.exs | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 95 | 2016-02-23T13:42:31.000Z | 2021-11-30T14:39:55.000Z | defmodule Cog.Chat.Slack.Templates.Common.ErrorTest do
use Cog.TemplateCase
test "error template; planning failure" do
data = %{"id" => "deadbeef",
"started" => "some time in the past",
"initiator" => "somebody",
"pipeline_text" => "echo foo",
"error_message"... | 35 | 74 | 0.588417 |
2812a2b80793dc89c5c1adc66969223337cd2128 | 928 | exs | Elixir | test/deployments_test.exs | fhaynes/exkube | c713cdce9efe22fa432855c8e41a28b18c10967b | [
"Apache-2.0"
] | 2 | 2017-06-29T01:25:25.000Z | 2017-07-16T13:29:16.000Z | test/deployments_test.exs | fhaynes/exkube | c713cdce9efe22fa432855c8e41a28b18c10967b | [
"Apache-2.0"
] | null | null | null | test/deployments_test.exs | fhaynes/exkube | c713cdce9efe22fa432855c8e41a28b18c10967b | [
"Apache-2.0"
] | null | null | null | defmodule Exkube.DeploymentsTest do
@moduledoc """
Tests for the Namespaces module
"""
use ExUnit.Case, async: true
alias Exkube.Deployments
require Logger
test "can list deployments", %{} do
result = Deployments.all
assert elem(result, 0) == :ok
end
test "can create and delete deployment", ... | 21.090909 | 57 | 0.524784 |
2812cdacb9f06263e75ab18e7c5b33e89e16fc37 | 1,963 | ex | Elixir | lib/quiz_site/results/results.ex | rbgraham/quiz_site | 57ded7991e355e2cf9f5edecc823b67833ee0ceb | [
"MIT"
] | 2 | 2017-10-30T00:42:01.000Z | 2017-10-30T21:29:15.000Z | lib/quiz_site/results/results.ex | rbgraham/quiz_site | 57ded7991e355e2cf9f5edecc823b67833ee0ceb | [
"MIT"
] | null | null | null | lib/quiz_site/results/results.ex | rbgraham/quiz_site | 57ded7991e355e2cf9f5edecc823b67833ee0ceb | [
"MIT"
] | null | null | null | defmodule QuizSite.Results do
@moduledoc """
The Results context.
"""
import Ecto.Query, warn: false
alias QuizSite.Repo
alias QuizSite.Results.Response
@doc """
Returns the list of responses.
## Examples
iex> list_responses()
[%Response{}, ...]
"""
def list_responses do
Repo... | 17.684685 | 63 | 0.614366 |
2812def10d8305b52f63b7618813afe84637df04 | 2,017 | ex | Elixir | apps/omg_api/lib/omg_api/fresh_blocks.ex | kendricktan/elixir-omg | 834c103fd5c4b9e063c1d32b9b4e5728abb64009 | [
"Apache-2.0"
] | null | null | null | apps/omg_api/lib/omg_api/fresh_blocks.ex | kendricktan/elixir-omg | 834c103fd5c4b9e063c1d32b9b4e5728abb64009 | [
"Apache-2.0"
] | null | null | null | apps/omg_api/lib/omg_api/fresh_blocks.ex | kendricktan/elixir-omg | 834c103fd5c4b9e063c1d32b9b4e5728abb64009 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 OmiseGO Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 30.560606 | 106 | 0.688647 |
2812e1251916908f76c6f8864959801ab9377949 | 3,613 | ex | Elixir | clients/content/lib/google_api/content/v2/model/orders_custom_batch_request_entry.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/orders_custom_batch_request_entry.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/orders_custom_batch_request_entry.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... | 48.173333 | 181 | 0.765846 |
28131e6712a26a3a60a1a024ad56816ac40bed3b | 3,167 | ex | Elixir | test/support/mojito_test_server.ex | Vaysman/mojito | abfbedceea04bbdd66a1bbe20d3cb22b10642039 | [
"MIT"
] | null | null | null | test/support/mojito_test_server.ex | Vaysman/mojito | abfbedceea04bbdd66a1bbe20d3cb22b10642039 | [
"MIT"
] | null | null | null | test/support/mojito_test_server.ex | Vaysman/mojito | abfbedceea04bbdd66a1bbe20d3cb22b10642039 | [
"MIT"
] | null | null | null | defmodule Mojito.TestServer do
use Application
def start(_type, _args) do
children = [
Plug.Adapters.Cowboy.child_spec(
:http,
Mojito.TestServer.PlugRouter,
[],
port: Application.get_env(:mojito, :test_server_http_port)
),
Plug.Adapters.Cowboy.child_spec(
... | 22.621429 | 74 | 0.594885 |
28132df671cca4763fe43bd48797129f141688be | 77 | ex | Elixir | portfolio/lib/portfolio_web/views/user_registration_view.ex | JackMaarek/portfolio | 4423e67df870b14228edbc9e4ce3f3cdf1bccc2d | [
"MIT"
] | null | null | null | portfolio/lib/portfolio_web/views/user_registration_view.ex | JackMaarek/portfolio | 4423e67df870b14228edbc9e4ce3f3cdf1bccc2d | [
"MIT"
] | 11 | 2020-04-29T10:28:20.000Z | 2020-04-29T11:03:13.000Z | portfolio/lib/portfolio_web/views/user_registration_view.ex | JackMaarek/portfolio | 4423e67df870b14228edbc9e4ce3f3cdf1bccc2d | [
"MIT"
] | null | null | null | defmodule PortfolioWeb.UserRegistrationView do
use PortfolioWeb, :view
end
| 19.25 | 46 | 0.844156 |
281341bac23eb3b8d8cc3b545ce3b53499a5b8f1 | 241 | ex | Elixir | lib/tokenbalance_web/router.ex | imerkle/tokenbalance | 35c304f36da315f9d38e3f5bf2565be2e6d46185 | [
"Apache-2.0"
] | null | null | null | lib/tokenbalance_web/router.ex | imerkle/tokenbalance | 35c304f36da315f9d38e3f5bf2565be2e6d46185 | [
"Apache-2.0"
] | null | null | null | lib/tokenbalance_web/router.ex | imerkle/tokenbalance | 35c304f36da315f9d38e3f5bf2565be2e6d46185 | [
"Apache-2.0"
] | null | null | null | defmodule TokenbalanceWeb.Router do
use TokenbalanceWeb, :router
pipeline :api do
plug :accepts, ["json"]
end
scope "/api", TokenbalanceWeb do
pipe_through :api
post "/balance", TokenController, :balance
end
end
| 17.214286 | 46 | 0.688797 |
281348f6ad358a8a79337b9236d2d3a5de6ddac2 | 721 | ex | Elixir | lib/samly_howto_web/gettext.ex | handnot2/samly_howto | 6ae346bf184b802f89ee116afb3dfc64ebe7e769 | [
"MIT"
] | 10 | 2018-07-25T12:32:32.000Z | 2022-01-31T17:36:01.000Z | lib/samly_howto_web/gettext.ex | handnot2/samly_howto | 6ae346bf184b802f89ee116afb3dfc64ebe7e769 | [
"MIT"
] | null | null | null | lib/samly_howto_web/gettext.ex | handnot2/samly_howto | 6ae346bf184b802f89ee116afb3dfc64ebe7e769 | [
"MIT"
] | 4 | 2017-10-25T23:35:59.000Z | 2022-03-17T18:29:41.000Z | defmodule SamlyHowtoWeb.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 SamlyHowtoWeb.Gettext
# Simple translation
gettext("Her... | 28.84 | 72 | 0.682386 |
2813cab346d3eb3c8b230a810217d26fb8851587 | 4,344 | ex | Elixir | lib/avrora/client.ex | raphaklaus/avrora | c59a45bf84f726d3892cc13a2344965d0e5ef6ad | [
"MIT"
] | null | null | null | lib/avrora/client.ex | raphaklaus/avrora | c59a45bf84f726d3892cc13a2344965d0e5ef6ad | [
"MIT"
] | null | null | null | lib/avrora/client.ex | raphaklaus/avrora | c59a45bf84f726d3892cc13a2344965d0e5ef6ad | [
"MIT"
] | null | null | null | defmodule Avrora.Client do
@moduledoc """
Generates client module with isolated memory storage.
## Examples
defmodule MyClient do
use Avrora.Client,
schemas_path: Path.expand("./priv/schemas"),
registry_url: "https://registry.io"
end
It will expose `Avrora.Encoder... | 30.166667 | 95 | 0.628223 |
2813e52404da00825f0b5130d8a3bc855fce7ad5 | 508 | exs | Elixir | config/test.exs | mvdwg/red_potion | 3026b13d80d9157a598b08e959beb5e56c6f9ff9 | [
"MIT"
] | null | null | null | config/test.exs | mvdwg/red_potion | 3026b13d80d9157a598b08e959beb5e56c6f9ff9 | [
"MIT"
] | null | null | null | config/test.exs | mvdwg/red_potion | 3026b13d80d9157a598b08e959beb5e56c6f9ff9 | [
"MIT"
] | null | null | null | use Mix.Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :red_potion, RedPotion.Web.Endpoint,
http: [port: 4001],
server: false
# Print only warnings and errors during test
config :logger, level: :warn
# Configure your database
config :red_potion, R... | 25.4 | 56 | 0.740157 |
28140303ff606b118192a7c3b1517beaad145cb8 | 290 | ex | Elixir | lib/stripe/subscriptions/subscription.ex | Finger-Ink/stripe-elixir | 018cef01a6645074547be4a93b6a443d21be2484 | [
"MIT"
] | 70 | 2016-07-28T16:39:36.000Z | 2021-08-03T14:26:19.000Z | lib/stripe/subscriptions/subscription.ex | Finger-Ink/stripe-elixir | 018cef01a6645074547be4a93b6a443d21be2484 | [
"MIT"
] | 29 | 2018-09-17T11:35:17.000Z | 2021-08-01T11:15:09.000Z | lib/stripe/subscriptions/subscription.ex | Finger-Ink/stripe-elixir | 018cef01a6645074547be4a93b6a443d21be2484 | [
"MIT"
] | 30 | 2016-10-11T21:07:27.000Z | 2020-12-23T20:15:41.000Z | defmodule Stripe.Subscription do
use Stripe.API, [:create, :retrieve, :update, :delete, :list]
def endpoint do
"subscriptions"
end
def delete_discount(subscription_id, opts \\ []) do
Stripe.request(:delete, "#{endpoint()}/#{subscription_id}/discount", [], opts)
end
end
| 24.166667 | 82 | 0.686207 |
281414b328f102b193f612c8e8bfadb7f9623d3b | 4,339 | ex | Elixir | apps/omg/test/support/state/prop_test/transaction.ex | PinkDiamond1/elixir-omg | 70dfd24a0a1ddf5d1d9d71aab61ea25300f889f7 | [
"Apache-2.0"
] | null | null | null | apps/omg/test/support/state/prop_test/transaction.ex | PinkDiamond1/elixir-omg | 70dfd24a0a1ddf5d1d9d71aab61ea25300f889f7 | [
"Apache-2.0"
] | null | null | null | apps/omg/test/support/state/prop_test/transaction.ex | PinkDiamond1/elixir-omg | 70dfd24a0a1ddf5d1d9d71aab61ea25300f889f7 | [
"Apache-2.0"
] | 1 | 2021-12-04T00:37:46.000Z | 2021-12-04T00:37:46.000Z | # Copyright 2019 OmiseGO Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 35.276423 | 112 | 0.665361 |
281424722c19ec6b928643e42661e4fd5a7dea51 | 1,046 | ex | Elixir | lib/mix/tasks/calecto.add_type_migration.ex | svrdlans/calecto | 6423a6958b545dcec2974750b82f5634c0db94c7 | [
"MIT"
] | 137 | 2015-05-23T20:13:40.000Z | 2021-11-08T17:04:43.000Z | lib/mix/tasks/calecto.add_type_migration.ex | svrdlans/calecto | 6423a6958b545dcec2974750b82f5634c0db94c7 | [
"MIT"
] | 35 | 2015-07-14T14:46:28.000Z | 2021-01-27T20:40:49.000Z | lib/mix/tasks/calecto.add_type_migration.ex | svrdlans/calecto | 6423a6958b545dcec2974750b82f5634c0db94c7 | [
"MIT"
] | 25 | 2015-07-29T08:40:27.000Z | 2021-09-30T15:48:04.000Z | defmodule Mix.Tasks.Calecto.AddTypeMigration do
use Mix.Task
import Mix.Generator
import Mix.Ecto
@migration_name "AddCalendarDateTimeType"
def run(args) do
path = "#{Mix.Project.app_path}/priv/repo/migrations/"
Mix.Task.run "app.start", args
repo = parse_repo(args) |> hd
filename = "#{times... | 24.904762 | 75 | 0.639579 |
28144be58fe149abe99ea3445692074098fe818b | 61 | exs | Elixir | test/docs_test.exs | lizhaochao/ExHmac | 9e7e00999362107e17528d6d9af97da7f461d6a9 | [
"MIT"
] | null | null | null | test/docs_test.exs | lizhaochao/ExHmac | 9e7e00999362107e17528d6d9af97da7f461d6a9 | [
"MIT"
] | null | null | null | test/docs_test.exs | lizhaochao/ExHmac | 9e7e00999362107e17528d6d9af97da7f461d6a9 | [
"MIT"
] | null | null | null | defmodule DocsTest do
use ExUnit.Case
doctest ExHmac
end
| 12.2 | 21 | 0.786885 |
28145ad7100c77f2df5d207e4883692d5eca4a21 | 3,726 | ex | Elixir | lib/calamity.ex | Cantido/calamity | 203c95eca8cbe6cf7eab8a8f88f14ece6246935f | [
"MIT"
] | null | null | null | lib/calamity.ex | Cantido/calamity | 203c95eca8cbe6cf7eab8a8f88f14ece6246935f | [
"MIT"
] | 1 | 2022-02-28T11:22:00.000Z | 2022-02-28T11:22:00.000Z | lib/calamity.ex | Cantido/calamity | 203c95eca8cbe6cf7eab8a8f88f14ece6246935f | [
"MIT"
] | null | null | null | # SPDX-FileCopyrightText: 2021 Rosa Richter
#
# SPDX-License-Identifier: MIT
defmodule Calamity do
@moduledoc """
Documentation for `Calamity`.
"""
alias Calamity.Command
alias Calamity.Stack
alias Calamity.AggregateStore
alias Calamity.ProcessManagerStore
alias Calamity.VersionStore
require Logger... | 32.12069 | 124 | 0.712829 |
28148c0d054007fcbd6e5dc04971af50183713eb | 992 | exs | Elixir | config/config.exs | bitpay/elixir-client | cccf8abbad5da7ad3d01d186bd14bf69eca68770 | [
"MIT"
] | 35 | 2015-01-18T02:16:11.000Z | 2021-11-14T01:55:34.000Z | config/config.exs | philosodad/bitpay-elixir | cccf8abbad5da7ad3d01d186bd14bf69eca68770 | [
"MIT"
] | 3 | 2015-06-24T15:18:57.000Z | 2017-05-17T17:52:05.000Z | config/config.exs | bitpay/elixir-client | cccf8abbad5da7ad3d01d186bd14bf69eca68770 | [
"MIT"
] | 13 | 2015-01-16T21:11:22.000Z | 2021-10-29T23:23:59.000Z | # 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 parent... | 43.130435 | 73 | 0.753024 |
28149f2ad3d05c44615e234283928fdc760441bc | 5,460 | ex | Elixir | lib/dynamic_inputs_for.ex | maartenvanvliet/dynamic_inputs_for | cfedcf1e23d68049c02af92ecbccdb98ecb6b4ed | [
"MIT"
] | null | null | null | lib/dynamic_inputs_for.ex | maartenvanvliet/dynamic_inputs_for | cfedcf1e23d68049c02af92ecbccdb98ecb6b4ed | [
"MIT"
] | null | null | null | lib/dynamic_inputs_for.ex | maartenvanvliet/dynamic_inputs_for | cfedcf1e23d68049c02af92ecbccdb98ecb6b4ed | [
"MIT"
] | null | null | null | defmodule DynamicInputsFor do
@moduledoc """
Helpers to create HTML forms with nested fields that can be created and deleted dynamically from
the client.
The functions in this module extend the functionality of `Phoenix.HTML.Form.inputs_for/4` to
return the html of a form with nested fields grouped in HTML t... | 35.921053 | 100 | 0.685531 |
2814b127e9ce98fa0a0c47bb79c2fa587a730fb6 | 2,012 | ex | Elixir | lib/html_to_pdf.pb.ex | michaelst/html-to-pdf | 280b0a065aeb6f59b1ad235a41aac220a41a51f0 | [
"Apache-2.0"
] | null | null | null | lib/html_to_pdf.pb.ex | michaelst/html-to-pdf | 280b0a065aeb6f59b1ad235a41aac220a41a51f0 | [
"Apache-2.0"
] | 12 | 2020-08-09T19:43:02.000Z | 2021-10-04T05:03:07.000Z | lib/html_to_pdf.pb.ex | michaelst/html-to-pdf | 280b0a065aeb6f59b1ad235a41aac220a41a51f0 | [
"Apache-2.0"
] | 1 | 2020-09-09T18:51:05.000Z | 2020-09-09T18:51:05.000Z | defmodule HtmlToPdf.HTMLRequest.PageSize do
@moduledoc false
use Protobuf, enum: true, syntax: :proto3
@type t ::
integer
| :LETTER
| :A0
| :A1
| :A2
| :A3
| :A4
| :A5
| :A6
| :A7
| :A8
| :A9
... | 18.803738 | 71 | 0.53827 |
2814e4eadaf5749f7233da966f0610e7e2a072a8 | 2,431 | ex | Elixir | apps/omg_db/lib/omg_db/measure.ex | PinkDiamond1/elixir-omg | 70dfd24a0a1ddf5d1d9d71aab61ea25300f889f7 | [
"Apache-2.0"
] | 1 | 2020-05-01T12:30:09.000Z | 2020-05-01T12:30:09.000Z | apps/omg_db/lib/omg_db/measure.ex | PinkDiamond1/elixir-omg | 70dfd24a0a1ddf5d1d9d71aab61ea25300f889f7 | [
"Apache-2.0"
] | null | null | null | apps/omg_db/lib/omg_db/measure.ex | PinkDiamond1/elixir-omg | 70dfd24a0a1ddf5d1d9d71aab61ea25300f889f7 | [
"Apache-2.0"
] | 1 | 2021-12-04T00:37:46.000Z | 2021-12-04T00:37:46.000Z | # Copyright 2019 OmiseGO Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 34.239437 | 106 | 0.63513 |
2814f9b8511d67af588a4d1a1b834b22a99cfd95 | 588 | ex | Elixir | lib/port_runner.ex | bryanstearns/port_quitting | b1b8b5d5e132fef028b68e0db6fbf34b31e66a61 | [
"Apache-2.0"
] | null | null | null | lib/port_runner.ex | bryanstearns/port_quitting | b1b8b5d5e132fef028b68e0db6fbf34b31e66a61 | [
"Apache-2.0"
] | null | null | null | lib/port_runner.ex | bryanstearns/port_quitting | b1b8b5d5e132fef028b68e0db6fbf34b31e66a61 | [
"Apache-2.0"
] | null | null | null | defmodule PortQuitting.PortRunner do
use GenServer
require Logger
@path_to_port_wrapper Application.get_env(:port_quitting, :port_wrapper_path)
def start_link(cmd_and_args) do
GenServer.start_link(__MODULE__, cmd_and_args)
end
# ----
def init(cmd_and_args) do
port =
Port.open({:spawn_exe... | 19.6 | 79 | 0.654762 |
2814fd5e61d46393b86b2acd17e25da330b63466 | 723 | ex | Elixir | lib/obelisk/assets.ex | FreedomBen/obelisk | f8f5ca8d73f619f26213c3b2442127c25dec45a2 | [
"MIT"
] | 406 | 2015-01-01T14:59:37.000Z | 2022-02-19T08:08:47.000Z | lib/obelisk/assets.ex | FreedomBen/obelisk | f8f5ca8d73f619f26213c3b2442127c25dec45a2 | [
"MIT"
] | 38 | 2015-01-19T11:58:30.000Z | 2019-01-18T14:06:24.000Z | lib/obelisk/assets.ex | FreedomBen/obelisk | f8f5ca8d73f619f26213c3b2442127c25dec45a2 | [
"MIT"
] | 64 | 2015-01-19T09:59:55.000Z | 2021-02-06T01:14:59.000Z | defmodule Obelisk.Assets do
alias Obelisk.Theme
def copy, do: File.cp_r("./themes/#{Theme.current}/assets", "./build/assets")
def css_files do
File.ls!("./build/assets/css")
|> Enum.sort
|> Enum.map(&("assets/css/#{&1}"))
|> Enum.filter(&(!File.dir? "./build/#{&1}"))
end
def js_files do
... | 21.909091 | 79 | 0.538036 |
2815635b77970ca6085a38b72093e712c73dbd0f | 1,194 | exs | Elixir | config/releases.exs | code-mancers/nudge | 6237a508203e73fbb0280d6aa428d83cbd347c11 | [
"MIT"
] | null | null | null | config/releases.exs | code-mancers/nudge | 6237a508203e73fbb0280d6aa428d83cbd347c11 | [
"MIT"
] | 17 | 2021-08-04T12:44:20.000Z | 2021-09-09T07:25:00.000Z | config/releases.exs | code-mancers/nudge | 6237a508203e73fbb0280d6aa428d83cbd347c11 | [
"MIT"
] | null | null | null | # In this file, we load production configuration and secrets
# from environment variables. You can also hardcode secrets,
# although such is generally not recommended and you have to
# remember to add this file to your .gitignore.
import Config
database_url =
System.get_env("DATABASE_URL") ||
raise """
envir... | 28.428571 | 67 | 0.716918 |
28156d22656be1bf03825b5381564128b246c8de | 1,139 | exs | Elixir | config/config.exs | lyraeve/lyrae-elixir | 329256ec23cb7861ec2fa7055520baac1fc181e6 | [
"MIT"
] | 1 | 2019-03-17T22:03:05.000Z | 2019-03-17T22:03:05.000Z | config/config.exs | lyraeve/lyrae-elixir | 329256ec23cb7861ec2fa7055520baac1fc181e6 | [
"MIT"
] | null | null | null | config/config.exs | lyraeve/lyrae-elixir | 329256ec23cb7861ec2fa7055520baac1fc181e6 | [
"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... | 36.741935 | 73 | 0.753292 |
28157e4b14b186f137f330a549425e78381e2d75 | 1,800 | ex | Elixir | lib/d05/challenge.ex | Meldanor/AdventOfCode2021 | c0e625865a0b717f73b712c846a2f8f0729ad82b | [
"MIT"
] | null | null | null | lib/d05/challenge.ex | Meldanor/AdventOfCode2021 | c0e625865a0b717f73b712c846a2f8f0729ad82b | [
"MIT"
] | null | null | null | lib/d05/challenge.ex | Meldanor/AdventOfCode2021 | c0e625865a0b717f73b712c846a2f8f0729ad82b | [
"MIT"
] | null | null | null | defmodule D05.Challenge do
@moduledoc false
require Logger
def run(1) do
lines = Utils.read_input(5, &map_input/1)
result =
lines
|> Stream.reject(&diagonal?/1)
|> Stream.flat_map(&cover_points/1)
# Count how often a point is covered
|> Enum.frequencies()
# Count the... | 24.657534 | 96 | 0.583333 |
2815e018eb6c8752427169e1aeeb813caee086f5 | 2,215 | ex | Elixir | clients/dfa_reporting/lib/google_api/dfa_reporting/v34/model/targetable_remarketing_lists_list_response.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/v34/model/targetable_remarketing_lists_list_response.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/v34/model/targetable_remarketing_lists_list_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 36.916667 | 174 | 0.744018 |
2815ee4bb1452318e2bcf2563997028144496604 | 2,719 | ex | Elixir | lib/rules/alpha.ex | MajAhd/elx_validation | 4146a86bf16ea1154d391bde1aa847fe5cc79c4e | [
"MIT"
] | 3 | 2021-07-03T08:27:46.000Z | 2021-08-18T06:00:38.000Z | lib/rules/alpha.ex | MajAhd/elx_validation | 4146a86bf16ea1154d391bde1aa847fe5cc79c4e | [
"MIT"
] | 1 | 2021-06-21T19:27:35.000Z | 2021-06-30T18:24:39.000Z | lib/rules/alpha.ex | MajAhd/elx_validation | 4146a86bf16ea1154d391bde1aa847fe5cc79c4e | [
"MIT"
] | 1 | 2021-08-13T16:14:13.000Z | 2021-08-13T16:14:13.000Z | defmodule ElxValidation.Alpha do
@moduledoc """
### string
- The field under validation must be a string. If you would like to allow the field to also be null, you should assign
the nullable rule to the field.
```
data = %{
user_name1: "john_007",
user_name2: 1879, ---> return error
}
rules ... | 20.140741 | 120 | 0.538801 |
281612731c38f5dc16b11f9c126db303e4f530ba | 1,901 | exs | Elixir | mix.exs | jjcarstens/dht | ef69d545f4aefd33eb91bb78173da782b1120816 | [
"Apache-2.0"
] | 15 | 2020-06-11T20:08:00.000Z | 2021-12-22T12:37:23.000Z | mix.exs | jjcarstens/dht | ef69d545f4aefd33eb91bb78173da782b1120816 | [
"Apache-2.0"
] | 6 | 2020-06-17T17:12:45.000Z | 2021-09-17T09:01:02.000Z | mix.exs | jjcarstens/dht | ef69d545f4aefd33eb91bb78173da782b1120816 | [
"Apache-2.0"
] | 2 | 2020-06-18T01:42:07.000Z | 2020-10-09T10:57:40.000Z | defmodule Dht.MixProject do
use Mix.Project
@source_url "https://github.com/jjcarstens/dht"
@version "0.1.2"
def project do
[
app: :dht,
version: @version,
elixir: "~> 1.9",
start_permanent: Mix.env() == :prod,
build_embedded: Mix.env() == :prod,
compilers: [:elixir_mak... | 25.013158 | 108 | 0.568648 |
281636ede10a9e5b7d61246898af186b3492d603 | 104 | exs | Elixir | test/support/messages.exs | moogle19/protox | b0efbce60efd7c38725b74575f7ff0074efd6c65 | [
"MIT"
] | 176 | 2017-02-01T13:09:25.000Z | 2022-03-18T02:36:17.000Z | test/support/messages.exs | moogle19/protox | b0efbce60efd7c38725b74575f7ff0074efd6c65 | [
"MIT"
] | 94 | 2020-07-20T05:54:51.000Z | 2022-03-09T04:13:03.000Z | test/support/messages.exs | moogle19/protox | b0efbce60efd7c38725b74575f7ff0074efd6c65 | [
"MIT"
] | 19 | 2017-02-13T09:17:14.000Z | 2022-02-22T09:29:18.000Z | defmodule Protox.Messages do
use Protox,
files: [
"./test/samples/messages.proto"
]
end
| 14.857143 | 37 | 0.634615 |
28164db226e5dba27ae8404ed675286c19606103 | 10,592 | exs | Elixir | lib/elixir/test/elixir/inspect_test.exs | diogovk/elixir | 7b8213affaad38b50afaa3dfc3a43717f35ba4e7 | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/inspect_test.exs | diogovk/elixir | 7b8213affaad38b50afaa3dfc3a43717f35ba4e7 | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/inspect_test.exs | diogovk/elixir | 7b8213affaad38b50afaa3dfc3a43717f35ba4e7 | [
"Apache-2.0"
] | null | null | null | Code.require_file "test_helper.exs", __DIR__
defmodule Inspect.AtomTest do
use ExUnit.Case, async: true
doctest Inspect
test "basic" do
assert inspect(:foo) == ":foo"
end
test "empty" do
assert inspect(:"") == ":\"\""
end
test "true false nil" do
assert inspect(false) == "false"
asser... | 26.951654 | 114 | 0.551926 |
28165098a171738f164379d94cc023df8feaee2a | 4,980 | ex | Elixir | lib/inspect/reason.ex | ElixirWerkz/exlogger | 57e2da8c0883b5e83be00fe0764628f4b5f3bdf5 | [
"MIT"
] | 2 | 2015-08-25T09:23:21.000Z | 2016-04-14T12:30:06.000Z | lib/inspect/reason.ex | ElixirWerkz/exlogger | 57e2da8c0883b5e83be00fe0764628f4b5f3bdf5 | [
"MIT"
] | null | null | null | lib/inspect/reason.ex | ElixirWerkz/exlogger | 57e2da8c0883b5e83be00fe0764628f4b5f3bdf5 | [
"MIT"
] | null | null | null | defimpl ExLogger.Inspect, for: ExLogger.ErrorLoggerHandler.Reason do
alias ExLogger.ErrorLoggerHandler.Reason
alias ExLogger.MFA
import Kernel, except: [to_string: 1]
def to_string(Reason[reason: {:"function not exported", [{m, f, a}, mfa|_]}]) do
"call to undefined function " <> ExLogger.Inspect.to_strin... | 38.307692 | 123 | 0.669679 |
28171f992ddded12d93f3296894edf70917435be | 3,365 | ex | Elixir | clients/docs/lib/google_api/docs/v1/model/response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/docs/lib/google_api/docs/v1/model/response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/docs/lib/google_api/docs/v1/model/response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 51.769231 | 176 | 0.744725 |
2817207671284bf6ebfb3ef1396404341681b3ea | 2,722 | exs | Elixir | test/serum/project_test.exs | starbelly/Serum | 6bb1b8ee1dbc457e278087bf605c964dac9e5d3d | [
"MIT"
] | 1 | 2019-06-21T10:55:33.000Z | 2019-06-21T10:55:33.000Z | test/serum/project_test.exs | igalic/Serum | 352f80ebcc8ed160230e7775aac3590787c912c6 | [
"MIT"
] | null | null | null | test/serum/project_test.exs | igalic/Serum | 352f80ebcc8ed160230e7775aac3590787c912c6 | [
"MIT"
] | null | null | null | defmodule Serum.ProjecTest do
use ExUnit.Case, async: true
import ExUnit.CaptureIO
alias Serum.Project
describe "fallback string format" do
test "default" do
proj = Project.new(%{})
assert proj.date_format === Project.default_date_format()
assert proj.list_title_tag === Project.default_l... | 32.795181 | 74 | 0.632623 |
2817207dc8601b8353babd9450d1d22d3b92ee6a | 759 | ex | Elixir | lib/liquor/filters/null.ex | polyfox/liquor | 20be9ce4dc887c5298cee380e32a37f6b3eeb073 | [
"MIT"
] | 2 | 2019-07-28T16:19:17.000Z | 2019-07-31T10:34:01.000Z | lib/liquor/filters/null.ex | polyfox/liquor | 20be9ce4dc887c5298cee380e32a37f6b3eeb073 | [
"MIT"
] | null | null | null | lib/liquor/filters/null.ex | polyfox/liquor | 20be9ce4dc887c5298cee380e32a37f6b3eeb073 | [
"MIT"
] | 2 | 2019-07-28T16:19:20.000Z | 2021-12-06T15:19:28.000Z | defmodule Liquor.Filters.Null do
import Ecto.Query
@spec apply_filter(Ecto.Query.t, Liquor.op, atom, nil) :: Ecto.Query.t
def apply_filter(query, op, key, nil) do
# the field allows nils, and the field is currently nil
case op do
:match -> where(query, [r], is_nil(field(r, ^key)))
:unmatch ->... | 37.95 | 72 | 0.575758 |
28172effba51802437789dbf4b67ecfd175f6dc0 | 6,211 | exs | Elixir | apps/snitch_core/test/data/schema/order_test.exs | Acrecio/avia | 54d264fc179b5b5f17d174854bdca063e1d935e9 | [
"MIT"
] | 456 | 2018-09-20T02:40:59.000Z | 2022-03-07T08:53:48.000Z | apps/snitch_core/test/data/schema/order_test.exs | Acrecio/avia | 54d264fc179b5b5f17d174854bdca063e1d935e9 | [
"MIT"
] | 273 | 2018-09-19T06:43:43.000Z | 2021-08-07T12:58:26.000Z | apps/snitch_core/test/data/schema/order_test.exs | Acrecio/avia | 54d264fc179b5b5f17d174854bdca063e1d935e9 | [
"MIT"
] | 122 | 2018-09-26T16:32:46.000Z | 2022-03-13T11:44:19.000Z | defmodule Snitch.Data.Schema.OrderTest do
use ExUnit.Case, async: true
use Snitch.DataCase
import Snitch.Factory
alias Snitch.Data.Model.LineItem
alias Snitch.Data.Schema.Order
@address_params %{
first_name: "Tony",
last_name: "Stark",
address_line_1: "10-8-80 Malibu Point",
zip_code: "90... | 26.429787 | 94 | 0.616165 |
281798a1535c49070fd405c29529892c2e396619 | 1,636 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/target_https_proxies_set_ssl_certificates_request.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/target_https_proxies_set_ssl_certificates_request.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/compute/lib/google_api/compute/v1/model/target_https_proxies_set_ssl_certificates_request.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 33.387755 | 221 | 0.761614 |
2817a6d94aa7fad683fe0cbf77ab0497e763243d | 5,200 | exs | Elixir | apps/app/priv/templates/phx.gen.live/live_test.exs | votiakov/petal | ec03551da6dadc0c3482b25a5f5dcd400c36db43 | [
"MIT"
] | null | null | null | apps/app/priv/templates/phx.gen.live/live_test.exs | votiakov/petal | ec03551da6dadc0c3482b25a5f5dcd400c36db43 | [
"MIT"
] | null | null | null | apps/app/priv/templates/phx.gen.live/live_test.exs | votiakov/petal | ec03551da6dadc0c3482b25a5f5dcd400c36db43 | [
"MIT"
] | null | null | null | defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web_namespace, schema.alias) %>LiveTest do
use <%= inspect context.web_module %>.ConnCase
import Phoenix.LiveViewTest
@create_attrs <%= inspect schema.params.create %>
@update_attrs <%= inspect schema.params.update %>
@invalid_attr... | 47.272727 | 124 | 0.601346 |
2817aba1d0cc4be1887a2208a7eb74efd49a957f | 1,064 | ex | Elixir | lib/surface/directive/let.ex | kreenotes/Underware | b593d52001e6fd768ef36acd320c0b93bc8b89fd | [
"MIT"
] | 1 | 2021-06-04T20:46:52.000Z | 2021-06-04T20:46:52.000Z | lib/surface/directive/let.ex | kreenotes/surface | b593d52001e6fd768ef36acd320c0b93bc8b89fd | [
"MIT"
] | null | null | null | lib/surface/directive/let.ex | kreenotes/surface | b593d52001e6fd768ef36acd320c0b93bc8b89fd | [
"MIT"
] | null | null | null | defmodule Surface.Directive.Let do
use Surface.Directive
def extract({":let", {:attribute_expr, value, expr_meta}, attr_meta}, meta) do
%AST.Directive{
module: __MODULE__,
name: :let,
value: directive_value(value, Helpers.to_meta(expr_meta, meta)),
meta: Helpers.to_meta(attr_meta, meta)... | 26.6 | 98 | 0.636278 |
2817db6f55c5d698121952ba130b0c5a833806cd | 2,149 | ex | Elixir | lib/singleton/s2.ex | micahrye/example_singleton | b482319b2005cd7e7d0046ef02537a619ae8cea5 | [
"MIT"
] | null | null | null | lib/singleton/s2.ex | micahrye/example_singleton | b482319b2005cd7e7d0046ef02537a619ae8cea5 | [
"MIT"
] | null | null | null | lib/singleton/s2.ex | micahrye/example_singleton | b482319b2005cd7e7d0046ef02537a619ae8cea5 | [
"MIT"
] | null | null | null | defmodule Singleton.S2 do
use GenServer
require Logger
@delay 6_000
def start_link() do
# This way you can put the singleton under supervision if yuo want.
GenServer.start_link(__MODULE__, [], name: __MODULE__)
end
def start() do
# This way you ths singleton is not linked to any other process... | 25.891566 | 105 | 0.666822 |
2817dff78f7074ceed0fce271255d4f8bb974ea0 | 7,086 | ex | Elixir | lib/aws/polly.ex | tylerpearson/aws-elixir | 09b7d3a3b9da1d775249cca291ab42ec5a081ff2 | [
"Apache-2.0"
] | 223 | 2015-05-29T17:45:35.000Z | 2021-06-29T08:37:14.000Z | lib/aws/polly.ex | tylerpearson/aws-elixir | 09b7d3a3b9da1d775249cca291ab42ec5a081ff2 | [
"Apache-2.0"
] | 33 | 2015-11-20T20:56:43.000Z | 2021-07-09T20:13:34.000Z | lib/aws/polly.ex | tylerpearson/aws-elixir | 09b7d3a3b9da1d775249cca291ab42ec5a081ff2 | [
"Apache-2.0"
] | 62 | 2015-06-14T20:53:24.000Z | 2021-12-13T07:20:15.000Z | # WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
# See https://github.com/jkakar/aws-codegen for more details.
defmodule AWS.Polly do
@moduledoc """
Amazon Polly is a web service that makes it easy to synthesize speech from
text.
The Amazon Polly service provides API operations for synthesizing
high-quality spe... | 38.51087 | 94 | 0.676545 |
2817f861cbc957171e315ba28166f43bc3800620 | 1,053 | ex | Elixir | lib/reserva/user.ex | AminArria/reserva | 13faef72927aeb84d456f080d65249b8ef50180e | [
"MIT"
] | null | null | null | lib/reserva/user.ex | AminArria/reserva | 13faef72927aeb84d456f080d65249b8ef50180e | [
"MIT"
] | 2 | 2021-03-09T00:49:12.000Z | 2021-05-08T03:13:05.000Z | lib/reserva/user.ex | AminArria/reserva | 13faef72927aeb84d456f080d65249b8ef50180e | [
"MIT"
] | null | null | null | defmodule Reserva.User do
use Ecto.Schema
import Ecto.Changeset
alias Reserva.{Repo, User}
alias Reserva.Reservation.MacroReservation
schema "users" do
field :usbid, :string
field :type, :string
field :name, :string
field :email, :string
field :phone_number, :string
has_many :reserva... | 23.931818 | 80 | 0.664767 |
28181461c9f1b6327b0a8236a73ef27a88116337 | 1,027 | ex | Elixir | lib/game/format/scan.ex | NatTuck/ex_venture | 7a74d33025a580f1e3e93d3755f22258eb3e9127 | [
"MIT"
] | null | null | null | lib/game/format/scan.ex | NatTuck/ex_venture | 7a74d33025a580f1e3e93d3755f22258eb3e9127 | [
"MIT"
] | null | null | null | lib/game/format/scan.ex | NatTuck/ex_venture | 7a74d33025a580f1e3e93d3755f22258eb3e9127 | [
"MIT"
] | null | null | null | defmodule Game.Format.Scan do
@moduledoc """
Formatting for the scan command
"""
alias Game.Format
@doc """
Format the scan for the room you're in
"""
def room(room, rooms) do
[
room_current(room),
rooms(rooms)
]
|> Enum.join("\n")
|> String.trim()
end
defp rooms(rooms... | 17.40678 | 53 | 0.564752 |
28181e3a2acdb4bd0ca437e534978dc5ab75bd16 | 2,048 | exs | Elixir | clients/gmail_postmaster_tools/mix.exs | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/gmail_postmaster_tools/mix.exs | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/gmail_postmaster_tools/mix.exs | 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... | 30.567164 | 257 | 0.678711 |
28183526f5c9282232fd086df226550cca76b1a2 | 596 | ex | Elixir | lib/manager/request_manager.ex | carlogilmar/le_toille_learning_manager | 00c5679bed5fb9ecf43a71c5d355610db9792bbf | [
"MIT"
] | 1 | 2018-09-21T01:14:38.000Z | 2018-09-21T01:14:38.000Z | lib/manager/request_manager.ex | carlogilmar/le_toille_learning_manager | 00c5679bed5fb9ecf43a71c5d355610db9792bbf | [
"MIT"
] | 17 | 2018-09-18T04:12:03.000Z | 2018-09-21T06:27:45.000Z | lib/manager/request_manager.ex | carlogilmar/le_toille_learning_manager | 00c5679bed5fb9ecf43a71c5d355610db9792bbf | [
"MIT"
] | 1 | 2018-09-21T01:08:38.000Z | 2018-09-21T01:08:38.000Z | defmodule Etoile.RequestManager do
alias Etoile.Parser
@firebase_api "https://gameofchats-db1b4.firebaseio.com"
def post( uri, payload) do
encoded = payload |> Poison.encode!
{:ok, _} = HTTPoison.post "#{@firebase_api}#{uri}", encoded
end
def get( uri ) do
response = HTTPoison.get! "#{@firebase_api}#... | 22.923077 | 61 | 0.654362 |
281882a0ccc963914d4bd6d1b44834180fb97ef2 | 1,983 | ex | Elixir | lib/teslamate_web/live/import_live/index.ex | Ma233/teslamate | 0ea19c19452623941681ca54ecbdc8f2353566ed | [
"MIT"
] | 1 | 2021-10-09T07:28:27.000Z | 2021-10-09T07:28:27.000Z | lib/teslamate_web/live/import_live/index.ex | Ma233/teslamate | 0ea19c19452623941681ca54ecbdc8f2353566ed | [
"MIT"
] | 20 | 2021-12-01T11:05:21.000Z | 2022-03-01T11:08:34.000Z | lib/teslamate_web/live/import_live/index.ex | Ma233/teslamate | 0ea19c19452623941681ca54ecbdc8f2353566ed | [
"MIT"
] | 1 | 2021-07-11T08:11:47.000Z | 2021-07-11T08:11:47.000Z | defmodule TeslaMateWeb.ImportLive.Index do
use TeslaMateWeb, :live_view
defmodule Settings do
use Ecto.Schema
import Ecto.Changeset
schema("settings", do: field(:timezone, :string))
def changeset(attrs), do: cast(%__MODULE__{}, attrs, [:timezone])
def apply(changeset), do: apply_changes(chang... | 24.481481 | 95 | 0.630862 |
281884811f64b7ff6c5f827666ac4415709104ee | 1,087 | ex | Elixir | dei_app/lib/dei_app_web/live/page_live.ex | mbta/DEI-dashboard | 7446c1d5497b388f337df554ef1109b8b9b0f606 | [
"MIT"
] | 1 | 2020-09-18T19:41:07.000Z | 2020-09-18T19:41:07.000Z | dei_app/lib/dei_app_web/live/page_live.ex | mbta/DEI-dashboard | 7446c1d5497b388f337df554ef1109b8b9b0f606 | [
"MIT"
] | 4 | 2020-07-23T02:35:33.000Z | 2020-09-21T14:55:32.000Z | dei_app/lib/dei_app_web/live/page_live.ex | mbta/DEI-dashboard | 7446c1d5497b388f337df554ef1109b8b9b0f606 | [
"MIT"
] | null | null | null | defmodule DeiAppWeb.PageLive do
use DeiAppWeb, :live_view
@impl true
def mount(_params, _session, socket) do
{:ok, assign(socket, query: "", results: %{})}
end
@impl true
def handle_event("suggest", %{"q" => query}, socket) do
{:noreply, assign(socket, results: search(query), query: query)}
end
... | 27.175 | 84 | 0.600736 |
2818a96e7c7eff6dbd0e7411655638198f1106fb | 1,110 | exs | Elixir | test/collision/polygon/edge_test.exs | tpoulsen/collision | 6dc6635e9a8623af3d5b88d901903040dc5b046f | [
"BSD-2-Clause"
] | 17 | 2016-08-01T22:10:27.000Z | 2021-03-11T10:43:50.000Z | test/collision/polygon/edge_test.exs | smpoulsen/collision | 6dc6635e9a8623af3d5b88d901903040dc5b046f | [
"BSD-2-Clause"
] | 3 | 2016-08-02T02:15:58.000Z | 2016-08-18T19:29:14.000Z | test/collision/polygon/edge_test.exs | smpoulsen/collision | 6dc6635e9a8623af3d5b88d901903040dc5b046f | [
"BSD-2-Clause"
] | 3 | 2016-08-18T18:48:41.000Z | 2019-04-21T14:21:44.000Z | defmodule EdgeTest do
use ExUnit.Case
use ExCheck
alias Collision.Polygon.Edge
alias Collision.Polygon.Vertex
doctest Collision.Polygon.Edge
# Generator for edges
def edge do
domain(:edge,
fn(self, size) ->
{_, x1} = :triq_dom.pick(non_neg_integer, size)
{_, y1} = :triq_dom.pick... | 28.461538 | 76 | 0.556757 |
2818ae66339afe5596a04a2f783be4bdce2294d3 | 13,434 | ex | Elixir | lib/phoenix_live_view/html_algebra.ex | joshchernoff/phoenix_live_view | 34ea4d1bdffd67fcfc44adf076f7b47de7dbef71 | [
"MIT"
] | null | null | null | lib/phoenix_live_view/html_algebra.ex | joshchernoff/phoenix_live_view | 34ea4d1bdffd67fcfc44adf076f7b47de7dbef71 | [
"MIT"
] | null | null | null | lib/phoenix_live_view/html_algebra.ex | joshchernoff/phoenix_live_view | 34ea4d1bdffd67fcfc44adf076f7b47de7dbef71 | [
"MIT"
] | null | null | null | defmodule Phoenix.LiveView.HTMLAlgebra do
@moduledoc false
import Inspect.Algebra, except: [format: 2]
# TODO: Remove it after versions before Elixir 1.13 are no longer supported.
@compile {:no_warn_undefined, Code}
@languages ~w(style script)
# The formatter has two modes:
#
# * :normal
# * :pres... | 28.282105 | 100 | 0.59074 |
2818d0b4af74000be0a71fdc5f8d2298cbbb21ba | 16,107 | ex | Elixir | lib/codes/codes_v30.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_v30.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_v30.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | defmodule IcdCode.ICDCode.Codes_V30 do
alias IcdCode.ICDCode
def _V300XXA do
%ICDCode{full_code: "V300XXA",
category_code: "V30",
short_code: "0XXA",
full_name: "Driver of three-wheeled motor vehicle injured in collision with pedestrian or animal in nontraffic accident, initial enco... | 64.428 | 170 | 0.725958 |
2818d6bc1cb815e6de8ff05d0424f758d6a10c3c | 2,514 | ex | Elixir | clients/health_care/lib/google_api/health_care/v1beta1/model/export_annotations_request.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/health_care/lib/google_api/health_care/v1beta1/model/export_annotations_request.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/health_care/lib/google_api/health_care/v1beta1/model/export_annotations_request.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 41.9 | 275 | 0.767701 |
2818d9e43d36fd0d35b6e2b0a8feda231b4a90b5 | 2,331 | ex | Elixir | apps/core/lib/core/services/scaffolds.ex | michaeljguarino/forge | 50ee583ecb4aad5dee4ef08fce29a8eaed1a0824 | [
"Apache-2.0"
] | null | null | null | apps/core/lib/core/services/scaffolds.ex | michaeljguarino/forge | 50ee583ecb4aad5dee4ef08fce29a8eaed1a0824 | [
"Apache-2.0"
] | 2 | 2019-12-13T23:55:50.000Z | 2019-12-17T05:49:58.000Z | apps/core/lib/core/services/scaffolds.ex | michaeljguarino/chartmart | a34c949cc29d6a1ab91c04c5e4f797e6f0daabfc | [
"Apache-2.0"
] | null | null | null | defmodule Core.Services.Scaffolds do
import EEx, only: [eval_file: 2]
@providers ~w(aws gcp azure)
def generate(application, ctx) do
repo_scaffolds(application, ctx) ++
helm_scaffolds(application, ctx) ++
recipe_scaffolds(application, ctx) ++
terraform_scaffolds(application, ctx)
end
defp re... | 32.830986 | 103 | 0.62677 |
2818df136d6b726031356be5b8d5410e59d5458c | 19,999 | ex | Elixir | lib/entropy_string.ex | EntropyString/Elixir | fb90c6dddd8dd7026c4762d138bea7ce0c81fe8a | [
"MIT"
] | 23 | 2017-09-06T23:56:04.000Z | 2021-08-17T17:29:19.000Z | lib/entropy_string.ex | EntropyString/Elixir | fb90c6dddd8dd7026c4762d138bea7ce0c81fe8a | [
"MIT"
] | null | null | null | lib/entropy_string.ex | EntropyString/Elixir | fb90c6dddd8dd7026c4762d138bea7ce0c81fe8a | [
"MIT"
] | 4 | 2017-09-15T16:27:28.000Z | 2019-10-04T11:41:24.000Z | # MIT License
#
# Copyright (c) 2017-2018 Knoxen
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, ... | 32.152733 | 100 | 0.567078 |
2818e3f2ef9f463d4604f3f1d73164bbfbe7d699 | 235 | ex | Elixir | lib/binance/futures/position.ex | ihorkatkov/binance.ex | 33b014e3310ce3374b9b9f2ce3cd46314f22f446 | [
"MIT"
] | null | null | null | lib/binance/futures/position.ex | ihorkatkov/binance.ex | 33b014e3310ce3374b9b9f2ce3cd46314f22f446 | [
"MIT"
] | null | null | null | lib/binance/futures/position.ex | ihorkatkov/binance.ex | 33b014e3310ce3374b9b9f2ce3cd46314f22f446 | [
"MIT"
] | null | null | null | defmodule Binance.Futures.Position do
defstruct [
:entry_price,
:leverage,
:max_notional_value,
:liquidation_price,
:mark_price,
:position_amt,
:symbol,
:unRealized_profit
]
use ExConstructor
end
| 15.666667 | 37 | 0.680851 |
2818f9c5836571a43bc318ed421e8a3eaccf0ac2 | 1,419 | ex | Elixir | lib/cachex/actions/incr.ex | botwerk/cachex | d37996d3be35b0d8281e347d44c024ecf2735131 | [
"MIT"
] | 946 | 2017-06-26T00:36:58.000Z | 2022-03-29T19:52:31.000Z | lib/cachex/actions/incr.ex | botwerk/cachex | d37996d3be35b0d8281e347d44c024ecf2735131 | [
"MIT"
] | 152 | 2017-06-28T10:01:24.000Z | 2022-03-24T18:46:13.000Z | lib/cachex/actions/incr.ex | botwerk/cachex | d37996d3be35b0d8281e347d44c024ecf2735131 | [
"MIT"
] | 84 | 2017-06-30T05:30:31.000Z | 2022-03-01T20:23:16.000Z | defmodule Cachex.Actions.Incr do
@moduledoc false
# Command module to enable incrementing cache entries.
#
# This operates on an ETS level for the actual update calls, rather than using
# a transactional context. The result is a faster throughput with the same
# behaviour aspects (but we still lock the key ... | 30.191489 | 80 | 0.686399 |
281910b7ead4036cd813749f8c95b4dd84657e09 | 98 | exs | Elixir | test/eisenhower_matrix_web/views/page_view_test.exs | marc-bouvier/eisenhower_matrix | 7de26eec4964e45ceab7cef3d6b14e1519d70a8e | [
"MIT"
] | null | null | null | test/eisenhower_matrix_web/views/page_view_test.exs | marc-bouvier/eisenhower_matrix | 7de26eec4964e45ceab7cef3d6b14e1519d70a8e | [
"MIT"
] | null | null | null | test/eisenhower_matrix_web/views/page_view_test.exs | marc-bouvier/eisenhower_matrix | 7de26eec4964e45ceab7cef3d6b14e1519d70a8e | [
"MIT"
] | null | null | null | defmodule EisenhowerMatrixWeb.PageViewTest do
use EisenhowerMatrixWeb.ConnCase, async: true
end
| 24.5 | 47 | 0.857143 |
28197b2c815775aeb43755e60aebcf79bcc2838f | 1,862 | exs | Elixir | clients/content/mix.exs | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"Apache-2.0"
] | null | null | null | clients/content/mix.exs | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"Apache-2.0"
] | null | null | null | clients/content/mix.exs | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"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... | 27.791045 | 128 | 0.657895 |
281988b627e7a48d117072cce57f49a7a8a9915a | 75 | ex | Elixir | lib/quadquizaminos_web/views/page_view.ex | sFractal-Podii/quadquizaminos | 1693f2d1c6ffee33065dd2ba7d899ac4aa405762 | [
"MIT"
] | null | null | null | lib/quadquizaminos_web/views/page_view.ex | sFractal-Podii/quadquizaminos | 1693f2d1c6ffee33065dd2ba7d899ac4aa405762 | [
"MIT"
] | 1 | 2021-02-09T13:19:49.000Z | 2021-02-09T13:19:49.000Z | lib/quadquizaminos_web/views/page_view.ex | sFractal-Podii/quadquizaminos | 1693f2d1c6ffee33065dd2ba7d899ac4aa405762 | [
"MIT"
] | 2 | 2021-01-28T06:37:04.000Z | 2021-02-09T06:47:33.000Z | defmodule QuadquizaminosWeb.PageView do
use QuadquizaminosWeb, :view
end
| 18.75 | 39 | 0.84 |
2819ecfc890ab2697e56f8d176ecd91614e8f224 | 433 | exs | Elixir | test/this_weekend_web/views/error_view_test.exs | drews256/this_weekend | 6b20f6b591d2f43044c16a6e4fab6ad5822620c7 | [
"Apache-2.0"
] | null | null | null | test/this_weekend_web/views/error_view_test.exs | drews256/this_weekend | 6b20f6b591d2f43044c16a6e4fab6ad5822620c7 | [
"Apache-2.0"
] | 2 | 2021-03-10T17:57:38.000Z | 2022-03-26T16:51:58.000Z | test/this_weekend_web/views/error_view_test.exs | drews256/this_weekend | 6b20f6b591d2f43044c16a6e4fab6ad5822620c7 | [
"Apache-2.0"
] | null | null | null | defmodule ThisWeekendWeb.ErrorViewTest do
use ThisWeekendWeb.ConnCase, async: true
# Bring render/3 and render_to_string/3 for testing custom views
import Phoenix.View
test "renders 404.html" do
assert render_to_string(ThisWeekendWeb.ErrorView, "404.html", []) == "Not Found"
end
test "renders 500.htm... | 28.866667 | 96 | 0.743649 |
281a10c45ff8f3e69b7e92471aa4c962be59f575 | 4,460 | ex | Elixir | lib/retroflect_web/controllers/user_auth.ex | gaslight/retroflect | d98a52dbe4ef14dd50ef06970fba9c673e456647 | [
"MIT"
] | 3 | 2021-10-04T15:03:09.000Z | 2021-10-05T00:42:19.000Z | lib/retroflect_web/controllers/user_auth.ex | gaslight/retroflect | d98a52dbe4ef14dd50ef06970fba9c673e456647 | [
"MIT"
] | 29 | 2021-10-04T12:56:21.000Z | 2021-10-20T17:38:12.000Z | lib/retroflect_web/controllers/user_auth.ex | gaslight/retroflect | d98a52dbe4ef14dd50ef06970fba9c673e456647 | [
"MIT"
] | null | null | null | defmodule RetroflectWeb.UserAuth do
@moduledoc false
import Plug.Conn
import Phoenix.Controller
alias Retroflect.Accounts
alias RetroflectWeb.Router.Helpers, as: Routes
# Make the remember me cookie valid for 60 days.
# If you want bump or reduce this value, also change
# the token expiry itself in Us... | 29.342105 | 81 | 0.695964 |
281a13cebc269bf99781468d5820816234af8273 | 767 | exs | Elixir | test/commands/handle_command_test.exs | edwardzhou/commanded | f104cbf5ff3a37a6e9b637bc07ccde1d79c0725d | [
"MIT"
] | 1 | 2018-12-28T20:48:23.000Z | 2018-12-28T20:48:23.000Z | test/commands/handle_command_test.exs | edwardzhou/commanded | f104cbf5ff3a37a6e9b637bc07ccde1d79c0725d | [
"MIT"
] | 1 | 2018-12-05T18:17:08.000Z | 2018-12-05T18:17:08.000Z | test/commands/handle_command_test.exs | edwardzhou/commanded | f104cbf5ff3a37a6e9b637bc07ccde1d79c0725d | [
"MIT"
] | 1 | 2018-12-05T18:15:03.000Z | 2018-12-05T18:15:03.000Z | defmodule Commanded.Commands.HandleCommandTest do
use Commanded.StorageCase
doctest Commanded.Commands.Handler
alias Commanded.ExampleDomain.{BankAccount,OpenAccountHandler}
alias Commanded.ExampleDomain.BankAccount.Commands.OpenAccount
alias Commanded.ExampleDomain.BankAccount.Events.BankAccountOpened
te... | 36.52381 | 116 | 0.778357 |
281a26ad728058927e00c51934ee8eb10c2c3420 | 67 | ex | Elixir | Chapter02/apps/elixir_drip_web/lib/elixir_drip_web/views/page_view.ex | sthagen/Mastering-Elixir | 1b52ee79afe6b2ae80767a5e55c2be51df3c4c1d | [
"MIT"
] | 28 | 2018-08-09T05:05:29.000Z | 2022-03-14T06:59:07.000Z | Chapter02/apps/elixir_drip_web/lib/elixir_drip_web/views/page_view.ex | sthagen/Mastering-Elixir | 1b52ee79afe6b2ae80767a5e55c2be51df3c4c1d | [
"MIT"
] | 1 | 2019-02-11T09:11:33.000Z | 2019-05-06T06:40:19.000Z | Chapter02/apps/elixir_drip_web/lib/elixir_drip_web/views/page_view.ex | sthagen/Mastering-Elixir | 1b52ee79afe6b2ae80767a5e55c2be51df3c4c1d | [
"MIT"
] | 8 | 2018-08-09T14:53:02.000Z | 2020-12-14T19:31:21.000Z | defmodule ElixirDripWeb.PageView do
use ElixirDripWeb, :view
end
| 16.75 | 35 | 0.820896 |
281a3ae7392c887a4de60c3658533c95ae74b689 | 1,824 | exs | Elixir | clients/ad_mob/mix.exs | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/ad_mob/mix.exs | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/ad_mob/mix.exs | 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... | 26.823529 | 101 | 0.651864 |
281a54a2270492ae1566247e5b23386370d17264 | 152 | ex | Elixir | apps/irc/lib/irc/whois_handler.ex | friendshipismagic/Hekateros | 0d340b6818583e2e65b0395227c9bb91796e5f89 | [
"MIT"
] | 2 | 2019-03-22T12:29:37.000Z | 2021-01-08T17:25:32.000Z | apps/irc/lib/irc/whois_handler.ex | friendshipismagic/Hecateros | 0d340b6818583e2e65b0395227c9bb91796e5f89 | [
"MIT"
] | 8 | 2017-12-04T16:53:35.000Z | 2018-04-08T11:01:46.000Z | apps/irc/lib/irc/whois_handler.ex | friendshipismagic/Hekateros | 0d340b6818583e2e65b0395227c9bb91796e5f89 | [
"MIT"
] | null | null | null | defmodule IRC.WhoisHandler do
require Logger
use Agent
def start_link(_) do
Agent.start_link(fn -> Map.new end, name: __MODULE__)
end
end
| 15.2 | 57 | 0.717105 |
281a5db577cf3b7f8f93a989c4df508d070e9e71 | 52 | exs | Elixir | machine_translation/MorpHIN/Learned/Resources/TrainingInstances/11.exs | AdityaPrasadMishra/NLP--Project-Group-16 | fb62cc6a1db4a494058171f11c14a2be3933a9a1 | [
"MIT"
] | null | null | null | machine_translation/MorpHIN/Learned/Resources/TrainingInstances/11.exs | AdityaPrasadMishra/NLP--Project-Group-16 | fb62cc6a1db4a494058171f11c14a2be3933a9a1 | [
"MIT"
] | null | null | null | machine_translation/MorpHIN/Learned/Resources/TrainingInstances/11.exs | AdityaPrasadMishra/NLP--Project-Group-16 | fb62cc6a1db4a494058171f11c14a2be3933a9a1 | [
"MIT"
] | null | null | null | **EXAMPLE FILE**
SYM SYM noun cardinal adjective;
| 13 | 33 | 0.730769 |
281a71d52397d23b4d010aae092e6bb2a7ce356e | 51,656 | ex | Elixir | lib/elixir/lib/calendar/iso.ex | kenspirit/elixir | 06594f526500d88edc566a0ce7935fca3cf17064 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/calendar/iso.ex | kenspirit/elixir | 06594f526500d88edc566a0ce7935fca3cf17064 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/calendar/iso.ex | kenspirit/elixir | 06594f526500d88edc566a0ce7935fca3cf17064 | [
"Apache-2.0"
] | null | null | null | defmodule Calendar.ISO do
@moduledoc """
The default calendar implementation, a Gregorian calendar following ISO 8601.
This calendar implements a proleptic Gregorian calendar and
is therefore compatible with the calendar used in most countries
today. The proleptic means the Gregorian rules for leap years are... | 31.632578 | 106 | 0.643275 |
281a78f476032777fb3f5609439322644f5e2a8c | 5,940 | exs | Elixir | test/os/lua_test.exs | Pandinosaurus/farmbot_os | 5d11104faee52b087f1ed7d58c22681c065424e2 | [
"MIT"
] | null | null | null | test/os/lua_test.exs | Pandinosaurus/farmbot_os | 5d11104faee52b087f1ed7d58c22681c065424e2 | [
"MIT"
] | null | null | null | test/os/lua_test.exs | Pandinosaurus/farmbot_os | 5d11104faee52b087f1ed7d58c22681c065424e2 | [
"MIT"
] | null | null | null | defmodule FarmbotOS.LuaTest do
use ExUnit.Case
use Mimic
setup :verify_on_exit!
alias FarmbotOS.Firmware.Command
alias FarmbotOS.Lua
alias FarmbotOS.Lua.{
Firmware,
Info,
DataManipulation
}
test "job setters/getters" do
fns = Lua.builtins()
name = "foo"
args = [type: "bar", sta... | 34.137931 | 155 | 0.572559 |
281a883f5466eed937e6b409771fca1c0a2f8191 | 608 | exs | Elixir | fizz_buzz.exs | lebm/MyElixirTests | 4221012296c913179cdda278290263bfc1141454 | [
"Apache-2.0"
] | null | null | null | fizz_buzz.exs | lebm/MyElixirTests | 4221012296c913179cdda278290263bfc1141454 | [
"Apache-2.0"
] | null | null | null | fizz_buzz.exs | lebm/MyElixirTests | 4221012296c913179cdda278290263bfc1141454 | [
"Apache-2.0"
] | null | null | null | defmodule FizzBuzz do
# Definição de atributos do módulo
@fzbz "FizzBuzz"
@fz "Fizz"
@bz "Buzz"
# Exemplo (forçado) de uso de atributo
defp teste(0, 0, _), do: @fzbz
defp teste(0, _, _), do: @fz
defp teste(_, 0, _), do: @bz
defp teste(_, _, x), do: x
def of(n) do
te... | 19.612903 | 42 | 0.554276 |
281a9db6b2f0de2df6ee4af8c216bc0b20948f3a | 1,378 | ex | Elixir | test/support/data_case.ex | embik/ex_chat | 08d83fe2076a96f9dad647fe509daec301b4965a | [
"Apache-2.0"
] | 1 | 2017-12-28T12:49:19.000Z | 2017-12-28T12:49:19.000Z | test/support/data_case.ex | embik/ex_chat | 08d83fe2076a96f9dad647fe509daec301b4965a | [
"Apache-2.0"
] | null | null | null | test/support/data_case.ex | embik/ex_chat | 08d83fe2076a96f9dad647fe509daec301b4965a | [
"Apache-2.0"
] | null | null | null | defmodule ExChat.DataCase do
@moduledoc """
This module defines the setup for tests requiring
access to the application's data layer.
You may define functions here to be used as helpers in
your tests.
Finally, if the test case interacts with the database,
it cannot be async. For this reason, every test ... | 25.518519 | 77 | 0.67852 |
281abebeffed92bbf5a28a2810034975d6cf6d82 | 1,263 | ex | Elixir | lib/simple_phoenix_react/endpoint.ex | wsmoak/simple_phoenix_react | db18ef77b464f9845c80365609c1066add3be68d | [
"MIT"
] | 1 | 2016-09-17T05:08:06.000Z | 2016-09-17T05:08:06.000Z | lib/simple_phoenix_react/endpoint.ex | wsmoak/simple_phoenix_react | db18ef77b464f9845c80365609c1066add3be68d | [
"MIT"
] | null | null | null | lib/simple_phoenix_react/endpoint.ex | wsmoak/simple_phoenix_react | db18ef77b464f9845c80365609c1066add3be68d | [
"MIT"
] | null | null | null | defmodule SimplePhoenixReact.Endpoint do
use Phoenix.Endpoint, otp_app: :simple_phoenix_react
socket "/socket", SimplePhoenixReact.UserSocket
# Serve at "/" the static files from "priv/static" directory.
#
# You should set gzip to true if you are running phoenix.digest
# when deploying your static files i... | 29.372093 | 69 | 0.7308 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.