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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1c0a58e39a687afdb256a54c1fee7ddff0b91d40 | 1,527 | ex | Elixir | frameworks/Elixir/phoenix/web/controllers/page_controller.ex | xitrum-framework/FrameworkBenchmarks | 180d44e1064abc6fe8c703b05e065c0564e6ee05 | [
"BSD-3-Clause"
] | 1 | 2016-05-26T09:37:14.000Z | 2016-05-26T09:37:14.000Z | frameworks/Elixir/phoenix/web/controllers/page_controller.ex | xitrum-framework/FrameworkBenchmarks | 180d44e1064abc6fe8c703b05e065c0564e6ee05 | [
"BSD-3-Clause"
] | null | null | null | frameworks/Elixir/phoenix/web/controllers/page_controller.ex | xitrum-framework/FrameworkBenchmarks | 180d44e1064abc6fe8c703b05e065c0564e6ee05 | [
"BSD-3-Clause"
] | 1 | 2019-05-17T18:29:04.000Z | 2019-05-17T18:29:04.000Z | defmodule Hello.PageController do
use Hello.Web, :controller
alias Hello.World
alias Hello.Fortune
def index(conn, _params) do
json conn, %{"TE Benchmarks\n" => "Started"}
end
# avoid namespace collision
def _json(conn, _params) do
json conn, %{message: "Hello, world!"}
end
def db(conn, _pa... | 26.327586 | 129 | 0.59725 |
1c0a5bea1553127ff54509ce64568e0365dbab06 | 842 | ex | Elixir | lib/trace.ex | chaodhib/spandex | 58674c5440c7800658a52d199532a620406dcdd2 | [
"MIT"
] | null | null | null | lib/trace.ex | chaodhib/spandex | 58674c5440c7800658a52d199532a620406dcdd2 | [
"MIT"
] | 1 | 2018-10-04T13:29:32.000Z | 2018-10-04T13:29:32.000Z | lib/trace.ex | chaodhib/spandex | 58674c5440c7800658a52d199532a620406dcdd2 | [
"MIT"
] | 1 | 2019-08-08T16:40:10.000Z | 2019-08-08T16:40:10.000Z | defmodule Spandex.Trace do
@moduledoc """
A representation of an ongoing trace.
* `baggage`: Key-value metadata about the overall trace (propagated across distributed service)
* `id`: The trace ID, which consistently refers to this trace across distributed services
* `priority`: The trace sampling priority f... | 32.384615 | 99 | 0.622328 |
1c0a72bb2183a3b503400b495631e9df1d2d502f | 1,445 | exs | Elixir | mix.exs | rhumbertgz/elixir_qlib | dcebca8dac8a2070ba098b209b6754daf1f49235 | [
"Apache-2.0"
] | 3 | 2016-10-05T21:34:47.000Z | 2021-04-21T15:02:47.000Z | mix.exs | rhumbertgz/elixir_qlib | dcebca8dac8a2070ba098b209b6754daf1f49235 | [
"Apache-2.0"
] | null | null | null | mix.exs | rhumbertgz/elixir_qlib | dcebca8dac8a2070ba098b209b6754daf1f49235 | [
"Apache-2.0"
] | null | null | null | defmodule ElixirQlib.Mixfile do
use Mix.Project
@version "0.1.1"
def project do
[app: :elixir_qlib,
version: @version,
elixir: "~> 1.3",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps(),
# Hex
description: description(),
package: packa... | 24.083333 | 82 | 0.605536 |
1c0a866e9ecd820e2885784863936b651cefc645 | 270 | ex | Elixir | web/models/jam_stat.ex | jeffcole/loops | 8d1f8345140182905dfc1967af135205b82f2cdc | [
"MIT"
] | null | null | null | web/models/jam_stat.ex | jeffcole/loops | 8d1f8345140182905dfc1967af135205b82f2cdc | [
"MIT"
] | null | null | null | web/models/jam_stat.ex | jeffcole/loops | 8d1f8345140182905dfc1967af135205b82f2cdc | [
"MIT"
] | null | null | null | defmodule LoopsWithFriends.JamStat do
@moduledoc """
Jam statistics for a given point in time.
"""
use LoopsWithFriends.Web, :model
schema "jam_stats" do
belongs_to :app_stat, AppStat
field :jam_id, :string
field :user_count, :integer
end
end
| 18 | 43 | 0.703704 |
1c0ab2b767aa67efbd773d2f53275e06d2f7843c | 11,462 | ex | Elixir | lib/web/user.ex | NatTuck/ex_venture | 7a74d33025a580f1e3e93d3755f22258eb3e9127 | [
"MIT"
] | null | null | null | lib/web/user.ex | NatTuck/ex_venture | 7a74d33025a580f1e3e93d3755f22258eb3e9127 | [
"MIT"
] | null | null | null | lib/web/user.ex | NatTuck/ex_venture | 7a74d33025a580f1e3e93d3755f22258eb3e9127 | [
"MIT"
] | null | null | null | defmodule Web.User do
@moduledoc """
Bounded context for the Phoenix app talking to the data layer
"""
import Ecto.Query
require Logger
alias Data.Repo
alias Data.User
alias Data.User.OneTimePassword
alias ExVenture.Mailer
alias Game.Account
alias Game.Config
alias Game.Emails
alias Game.Se... | 22.96994 | 118 | 0.601204 |
1c0af60a422704d55189149da78a9902b751b912 | 14,129 | exs | Elixir | test/thrift/generator/service_test.exs | dnlserrano/elixir-thrift | 568de9f7bdfa43279c819cb50e16c33b4dc09146 | [
"Apache-2.0"
] | 1 | 2020-06-11T03:52:25.000Z | 2020-06-11T03:52:25.000Z | test/thrift/generator/service_test.exs | dnlserrano/elixir-thrift | 568de9f7bdfa43279c819cb50e16c33b4dc09146 | [
"Apache-2.0"
] | 77 | 2018-08-29T00:36:42.000Z | 2021-08-02T13:14:35.000Z | test/thrift/generator/service_test.exs | CultivateHQ/elixir-thrift | d285ddc0f134afc6f7d8c5d0b504a8d27157da9a | [
"Apache-2.0"
] | 1 | 2021-02-04T15:58:30.000Z | 2021-02-04T15:58:30.000Z | defmodule Thrift.Generator.ServiceTest do
use ThriftTestCase
@thrift_file name: "simple_service.thrift",
contents: """
namespace elixir Services.Simple
struct User {
1: optional i64 id,
2: optional string username
}
... | 32.111364 | 101 | 0.661476 |
1c0afcb8ec6aab261cd45e03481beca8c4a0444b | 85 | exs | Elixir | config/dev.exs | still-ex/still | 2597587550eeb9bc46ee7cf4e1c30a1af7776d7d | [
"0BSD"
] | 202 | 2021-01-13T15:45:17.000Z | 2022-03-22T01:26:27.000Z | config/dev.exs | still-ex/still | 2597587550eeb9bc46ee7cf4e1c30a1af7776d7d | [
"0BSD"
] | 55 | 2021-01-26T14:11:34.000Z | 2022-03-22T22:34:37.000Z | config/dev.exs | subvisual/still | 2597587550eeb9bc46ee7cf4e1c30a1af7776d7d | [
"0BSD"
] | 10 | 2021-02-04T21:14:41.000Z | 2022-03-20T10:12:59.000Z | import Config
config :still,
dev_layout: true,
ignore_files: [],
watchers: []
| 12.142857 | 19 | 0.670588 |
1c0b1f2fb23d756b5c256775af062fa34d1a519f | 3,935 | ex | Elixir | apps/omg_watcher/lib/db/eth_event.ex | hoardexchange/elixir-omg | 423528699d467f1cc0d02c596290ab907af38c2c | [
"Apache-2.0"
] | null | null | null | apps/omg_watcher/lib/db/eth_event.ex | hoardexchange/elixir-omg | 423528699d467f1cc0d02c596290ab907af38c2c | [
"Apache-2.0"
] | null | null | null | apps/omg_watcher/lib/db/eth_event.ex | hoardexchange/elixir-omg | 423528699d467f1cc0d02c596290ab907af38c2c | [
"Apache-2.0"
] | 2 | 2020-06-07T11:14:54.000Z | 2020-08-02T07:36:32.000Z | # 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... | 33.632479 | 108 | 0.6554 |
1c0b5df60a87bbb9b5b02ac221ce0c3138a8d016 | 6,293 | ex | Elixir | backend/lib/aptamer/jobs/python_script_job.ex | ui-icts/aptamer-web | a28502c22a4e55ab1fbae8bbeaa6b11c9a477c06 | [
"MIT"
] | null | null | null | backend/lib/aptamer/jobs/python_script_job.ex | ui-icts/aptamer-web | a28502c22a4e55ab1fbae8bbeaa6b11c9a477c06 | [
"MIT"
] | 7 | 2019-02-08T18:28:49.000Z | 2022-02-12T06:44:59.000Z | backend/lib/aptamer/jobs/python_script_job.ex | ui-icts/aptamer-web | a28502c22a4e55ab1fbae8bbeaa6b11c9a477c06 | [
"MIT"
] | null | null | null | defmodule Aptamer.Jobs.PythonScriptJob do
require Logger
alias Aptamer.Repo
defstruct script_name: nil,
args: [],
working_dir: nil,
output: [],
exit_code: nil,
listener: nil,
current_user_id: nil,
job_id: nil,
# The ... | 26.330544 | 100 | 0.607341 |
1c0b870aa27d5db6533285e1c3a926944d4778a8 | 1,013 | exs | Elixir | apps/core/test/test_helper.exs | michaeljguarino/forge | 50ee583ecb4aad5dee4ef08fce29a8eaed1a0824 | [
"Apache-2.0"
] | null | null | null | apps/core/test/test_helper.exs | michaeljguarino/forge | 50ee583ecb4aad5dee4ef08fce29a8eaed1a0824 | [
"Apache-2.0"
] | 2 | 2019-12-13T23:55:50.000Z | 2019-12-17T05:49:58.000Z | apps/core/test/test_helper.exs | michaeljguarino/chartmart | a34c949cc29d6a1ab91c04c5e4f797e6f0daabfc | [
"Apache-2.0"
] | null | null | null | ExUnit.start()
Ecto.Adapters.SQL.Sandbox.mode(Core.Repo, :manual)
Mimic.copy(Mojito)
Mimic.copy(HTTPoison)
Mimic.copy(Stripe.Connect.OAuth)
Mimic.copy(Stripe.Customer)
Mimic.copy(Stripe.Plan)
Mimic.copy(Stripe.Token)
Mimic.copy(Stripe.Subscription)
Mimic.copy(Stripe.SubscriptionItem)
Mimic.copy(Stripe.SubscriptionItem.... | 33.766667 | 60 | 0.824284 |
1c0b9d9bc04bdc1606815943e7edc06b758977c5 | 4,266 | ex | Elixir | lib/kino/data_table.ex | livebook-dev/kino | 48e76a351869164cbef307e57fb81cde27a12f28 | [
"Apache-2.0"
] | 84 | 2021-07-17T09:19:45.000Z | 2022-03-21T20:43:21.000Z | lib/kino/data_table.ex | livebook-dev/kino | 48e76a351869164cbef307e57fb81cde27a12f28 | [
"Apache-2.0"
] | 48 | 2021-07-21T11:59:20.000Z | 2022-03-31T16:34:16.000Z | lib/kino/data_table.ex | livebook-dev/kino | 48e76a351869164cbef307e57fb81cde27a12f28 | [
"Apache-2.0"
] | 11 | 2021-09-05T16:30:23.000Z | 2022-02-19T02:06:48.000Z | defmodule Kino.DataTable do
@moduledoc """
A widget for interactively viewing enumerable data.
The data must be an enumerable of records, where each
record is either map, struct, keyword list or tuple.
## Examples
data = [
%{id: 1, name: "Elixir", website: "https://elixir-lang.org"},
... | 25.854545 | 106 | 0.632443 |
1c0ba3cec061321a3a270d33cd787e470657aa47 | 1,283 | ex | Elixir | metex/lib/worker.ex | mrmarbury/TheLittleElixirAndOTPGuideBook | 5aa46cdaee896ab5ecd87d3cf86bd7f9140fcda8 | [
"Apache-2.0"
] | null | null | null | metex/lib/worker.ex | mrmarbury/TheLittleElixirAndOTPGuideBook | 5aa46cdaee896ab5ecd87d3cf86bd7f9140fcda8 | [
"Apache-2.0"
] | null | null | null | metex/lib/worker.ex | mrmarbury/TheLittleElixirAndOTPGuideBook | 5aa46cdaee896ab5ecd87d3cf86bd7f9140fcda8 | [
"Apache-2.0"
] | null | null | null | defmodule Metex.Worker do
def loop do
receive do
{sender_pid, location} -> send(sender_pid, {:ok, temperature_of(location)})
_ -> IO.puts("Don't know how to process this message")
end
loop()
end
def temperature_of(location) do
result = location |> url_for |> HTTPoison.get() |> parse_... | 25.66 | 94 | 0.636789 |
1c0bb83a9caf122a7904dd12eba44d28e09068c8 | 1,649 | ex | Elixir | apps/asf_web/lib/asf_web/views/error_helpers.ex | LazarRistic/asf | 2c557f06839a129b35174142c91f60696be2fa89 | [
"MIT"
] | null | null | null | apps/asf_web/lib/asf_web/views/error_helpers.ex | LazarRistic/asf | 2c557f06839a129b35174142c91f60696be2fa89 | [
"MIT"
] | null | null | null | apps/asf_web/lib/asf_web/views/error_helpers.ex | LazarRistic/asf | 2c557f06839a129b35174142c91f60696be2fa89 | [
"MIT"
] | null | null | null | defmodule AsfWeb.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 ->
content_tag(:spa... | 33.653061 | 131 | 0.667071 |
1c0bbd48d1cf9d29cdb87e5a07d044204f8ef715 | 429 | ex | Elixir | priv/catalogue/button/playground.ex | joerichsen/surface_bootstrap | 14a8b57126ead9a6593d628b9962e167fc01030d | [
"MIT"
] | null | null | null | priv/catalogue/button/playground.ex | joerichsen/surface_bootstrap | 14a8b57126ead9a6593d628b9962e167fc01030d | [
"MIT"
] | null | null | null | priv/catalogue/button/playground.ex | joerichsen/surface_bootstrap | 14a8b57126ead9a6593d628b9962e167fc01030d | [
"MIT"
] | null | null | null | defmodule SurfaceBootstrap.Catalogue.Button.Playground do
use Surface.Catalogue.Playground,
subject: SurfaceBootstrap.Button,
catalogue: SurfaceBootstrap.Catalogue,
height: "110px",
container: {:div, class: "buttons is-centered"}
data props, :map,
default: %{
label: "My Button",
col... | 21.45 | 57 | 0.638695 |
1c0bd33fca832be83ba383894ce89a4b36ae9e8b | 632 | exs | Elixir | mix.exs | Contraktor-Legal-Tech/ex-block-cypher | dc08d6c4a4fbb066f978579e87cbeb25faae9f25 | [
"MIT"
] | null | null | null | mix.exs | Contraktor-Legal-Tech/ex-block-cypher | dc08d6c4a4fbb066f978579e87cbeb25faae9f25 | [
"MIT"
] | null | null | null | mix.exs | Contraktor-Legal-Tech/ex-block-cypher | dc08d6c4a4fbb066f978579e87cbeb25faae9f25 | [
"MIT"
] | null | null | null | defmodule ExBlockCypher.Mixfile do
use Mix.Project
def project do
[
app: :ex_block_cypher,
version: "0.1.0",
elixir: "~> 1.5",
start_permanent: Mix.env == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
... | 19.75 | 59 | 0.533228 |
1c0bd8b44bd050e41876c67410c8cf30c060dcb4 | 528 | ex | Elixir | lib/sptfy/object/play_history.ex | Joe-noh/sptfy | ce94ec2ec61529ab6fe708248a2360f95ec388ea | [
"MIT"
] | 5 | 2020-12-14T15:46:26.000Z | 2021-03-20T22:32:58.000Z | lib/sptfy/object/play_history.ex | Joe-noh/sptfy | ce94ec2ec61529ab6fe708248a2360f95ec388ea | [
"MIT"
] | 9 | 2020-12-25T14:36:11.000Z | 2021-01-25T14:03:18.000Z | lib/sptfy/object/play_history.ex | Joe-noh/sptfy | ce94ec2ec61529ab6fe708248a2360f95ec388ea | [
"MIT"
] | null | null | null | defmodule Sptfy.Object.PlayHistory do
@moduledoc """
Module for recently played history struct.
"""
use Sptfy.Object
alias Sptfy.Object.{Context, SimplifiedTrack}
defstruct ~w[
context
played_at
track
]a
def new(fields) do
fields =
fields
|> Helpers.atomize_keys()
|... | 19.555556 | 64 | 0.653409 |
1c0c1c6d52c8916a009142481fbe795cb75a52d3 | 1,708 | ex | Elixir | lib/central/logging/schemas/aggregate_view_log.ex | icexuick/teiserver | 22f2e255e7e21f977e6b262acf439803626a506c | [
"MIT"
] | 6 | 2021-02-08T10:42:53.000Z | 2021-04-25T12:12:03.000Z | lib/central/logging/schemas/aggregate_view_log.ex | icexuick/teiserver | 22f2e255e7e21f977e6b262acf439803626a506c | [
"MIT"
] | null | null | null | lib/central/logging/schemas/aggregate_view_log.ex | icexuick/teiserver | 22f2e255e7e21f977e6b262acf439803626a506c | [
"MIT"
] | 2 | 2021-02-23T22:34:00.000Z | 2021-04-08T13:31:36.000Z | defmodule Central.Logging.AggregateViewLog do
use CentralWeb, :schema
@primary_key false
schema "aggregate_view_logs" do
field :date, :date, primary_key: true
field :total_views, :integer
field :total_uniques, :integer
field :average_load_time, :integer
field :guest_view_count, :integer
... | 25.117647 | 79 | 0.667447 |
1c0c3c85dca2e7a407ec343f1c36395f98f83d83 | 35 | exs | Elixir | 00-learn/02-pattern-matching/main.exs | CrispenGari/elixir-startup | 13ef0f693053fc4a1ae740627e0ce3fca7aab375 | [
"Apache-2.0"
] | null | null | null | 00-learn/02-pattern-matching/main.exs | CrispenGari/elixir-startup | 13ef0f693053fc4a1ae740627e0ce3fca7aab375 | [
"Apache-2.0"
] | null | null | null | 00-learn/02-pattern-matching/main.exs | CrispenGari/elixir-startup | 13ef0f693053fc4a1ae740627e0ce3fca7aab375 | [
"Apache-2.0"
] | null | null | null |
{a, b, c} = {:hello, "world", 42}
| 11.666667 | 33 | 0.428571 |
1c0c5f3a79c19196bec5a530eb7f0cab7ac04441 | 214 | ex | Elixir | lib/grizzly/zwave/command_classes/alarm.ex | jellybob/grizzly | 290bee04cb16acbb9dc996925f5c501697b7ac94 | [
"Apache-2.0"
] | 76 | 2019-09-04T16:56:58.000Z | 2022-03-29T06:54:36.000Z | lib/grizzly/zwave/command_classes/alarm.ex | jellybob/grizzly | 290bee04cb16acbb9dc996925f5c501697b7ac94 | [
"Apache-2.0"
] | 124 | 2019-09-05T14:01:24.000Z | 2022-02-28T22:58:14.000Z | lib/grizzly/zwave/command_classes/alarm.ex | jellybob/grizzly | 290bee04cb16acbb9dc996925f5c501697b7ac94 | [
"Apache-2.0"
] | 10 | 2019-10-23T19:25:45.000Z | 2021-11-17T13:21:20.000Z | defmodule Grizzly.ZWave.CommandClasses.Alarm do
@moduledoc """
Alarm Command Class
"""
@behaviour Grizzly.ZWave.CommandClass
@impl true
def byte(), do: 0x71
@impl true
def name(), do: :alarm
end
| 15.285714 | 47 | 0.686916 |
1c0c8e583c9950821305934ecdf6fbfa892c70f0 | 133 | ex | Elixir | etc/source.ex | jan-sti/gim | 1b8be6c2163577f375825170cc9b01674e59b646 | [
"ECL-2.0",
"Apache-2.0"
] | 4 | 2020-01-21T09:15:24.000Z | 2021-02-04T21:21:56.000Z | etc/source.ex | jan-sti/gim | 1b8be6c2163577f375825170cc9b01674e59b646 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2020-04-06T05:20:09.000Z | 2020-06-09T09:56:20.000Z | etc/source.ex | jan-sti/gim | 1b8be6c2163577f375825170cc9b01674e59b646 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-04-22T08:44:35.000Z | 2020-04-22T08:44:35.000Z | defmodule Source do
use Gim.Schema
schema do
property(:prop)
has_edge(:target, Target, reflect: :target_edge)
end
end
| 14.777778 | 52 | 0.699248 |
1c0cc29ce31fec0072984c5f60f93cfc12ed1a55 | 2,424 | ex | Elixir | lib/mimic/dsl.ex | fartek/mimic | 38d678b6f018df0c267f73a912bd94dcc6c57cf4 | [
"Apache-2.0"
] | null | null | null | lib/mimic/dsl.ex | fartek/mimic | 38d678b6f018df0c267f73a912bd94dcc6c57cf4 | [
"Apache-2.0"
] | null | null | null | lib/mimic/dsl.ex | fartek/mimic | 38d678b6f018df0c267f73a912bd94dcc6c57cf4 | [
"Apache-2.0"
] | null | null | null | defmodule Mimic.DSL do
@moduledoc """
stubs and expectations can be expressed in a more natural way
```elixir
use Mimic.DSL
```
```elixir
test "basic example" do
stub Calculator.add(_x, _y), do: :stub
expect Calculator.add(x, y), do: x + y
expect Calculator.mult(x, y), do: x * y
assert ... | 21.642857 | 94 | 0.587046 |
1c0ccc67e5551f03a82dcfb0628869c53a4adf60 | 648 | exs | Elixir | config/test.exs | mdwaud/nerves_hub_link_http | 3fbf93be3607d175688c03b73497d32dd8724a54 | [
"Apache-2.0"
] | 8 | 2020-02-29T17:47:41.000Z | 2021-06-22T17:58:25.000Z | config/test.exs | mdwaud/nerves_hub_link_http | 3fbf93be3607d175688c03b73497d32dd8724a54 | [
"Apache-2.0"
] | 5 | 2020-01-15T23:23:53.000Z | 2020-10-04T02:31:56.000Z | config/test.exs | mdwaud/nerves_hub_link_http | 3fbf93be3607d175688c03b73497d32dd8724a54 | [
"Apache-2.0"
] | 5 | 2020-02-27T17:53:36.000Z | 2020-10-05T07:54:34.000Z | use Mix.Config
config :nerves_hub_cli,
home_dir: Path.expand("nerves-hub"),
ca_certs: Path.expand("../test/fixtures/ca_certs", __DIR__)
# Shared Configuration.
config :nerves_hub_link_http,
ca_certs: Path.expand("../test/fixtures/ca_certs", __DIR__),
client: NervesHubLinkHTTP.ClientMock,
# Device HTTP conne... | 24.923077 | 62 | 0.742284 |
1c0cdaa318c754545843d10659fe2a38c8bfe515 | 964 | ex | Elixir | lib/stellar/network/order_books.ex | turbo-play/elixir-stellar-sdk | ed0711d69493ed2723a1197120667a7fa2c97f9f | [
"MIT"
] | 1 | 2019-12-19T14:12:20.000Z | 2019-12-19T14:12:20.000Z | lib/stellar/network/order_books.ex | turbo-play/elixir-stellar-sdk | ed0711d69493ed2723a1197120667a7fa2c97f9f | [
"MIT"
] | null | null | null | lib/stellar/network/order_books.ex | turbo-play/elixir-stellar-sdk | ed0711d69493ed2723a1197120667a7fa2c97f9f | [
"MIT"
] | 4 | 2019-10-09T20:58:35.000Z | 2021-12-06T23:00:46.000Z | defmodule Stellar.Network.OrderBooks do
@moduledoc """
Functions for interacting with OrderBooks
"""
alias Stellar.Network.Base
@doc """
Returns order book details
optional `params` can take any of the following.:
* `selling_asset_code`: Code of the Asset being sold.
* `selling_asset_issuer`: Acco... | 29.212121 | 95 | 0.709544 |
1c0d23d754bf6e38d7221f640e071d9d8d5305ff | 975 | ex | Elixir | domotic_ui/lib/domotic_web/router.ex | gcauchon/domotic-pi | af61102fb946670b3e5ec93def6a5c053d894e79 | [
"MIT"
] | 1 | 2020-06-11T17:53:20.000Z | 2020-06-11T17:53:20.000Z | domotic_ui/lib/domotic_web/router.ex | gcauchon/domotic-pi | af61102fb946670b3e5ec93def6a5c053d894e79 | [
"MIT"
] | 9 | 2020-12-15T21:19:59.000Z | 2021-11-23T13:23:11.000Z | domotic_ui/lib/domotic_web/router.ex | gcauchon/domotic-pi | af61102fb946670b3e5ec93def6a5c053d894e79 | [
"MIT"
] | 1 | 2021-03-10T15:31:01.000Z | 2021-03-10T15:31:01.000Z | defmodule DomoticWeb.Router do
use DomoticWeb, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_live_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
plug :put_root_layout, {DomoticWeb.LayoutView, :app}
end
scope "/", DomoticWeb d... | 25 | 70 | 0.712821 |
1c0d4167328c02a910d3a0cfec60665216065d28 | 921 | exs | Elixir | languages/elixir/exercises/concept/lasagna/test/lasagna_test.exs | AlexLeSang/v3 | 3d35961a961b5a2129b1d42f1d118972d9665357 | [
"MIT"
] | 200 | 2019-12-12T13:50:59.000Z | 2022-02-20T22:38:42.000Z | languages/elixir/exercises/concept/lasagna/test/lasagna_test.exs | AlexLeSang/v3 | 3d35961a961b5a2129b1d42f1d118972d9665357 | [
"MIT"
] | 1,938 | 2019-12-12T08:07:10.000Z | 2021-01-29T12:56:13.000Z | languages/elixir/exercises/concept/lasagna/test/lasagna_test.exs | AlexLeSang/v3 | 3d35961a961b5a2129b1d42f1d118972d9665357 | [
"MIT"
] | 239 | 2019-12-12T14:09:08.000Z | 2022-03-18T00:04:07.000Z | defmodule LasagnaTest do
use ExUnit.Case
doctest Lasagna
# @tag :pending
test "expected minutes in oven" do
assert Lasagna.expected_minutes_in_oven() === 40
end
@tag :pending
test "remaining minutes in oven" do
assert Lasagna.remaining_minutes_in_oven(25) === 15
end
@tag :pending
test "pr... | 23.025 | 59 | 0.70684 |
1c0d4345a628ce1b288c1e0a8a1896addf24375b | 880 | ex | Elixir | clients/ad_sense/lib/google_api/ad_sense/v2/metadata.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/ad_sense/lib/google_api/ad_sense/v2/metadata.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/ad_sense/lib/google_api/ad_sense/v2/metadata.ex | dazuma/elixir-google-api | 6a9897168008efe07a6081d2326735fe332e522c | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 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.592593 | 74 | 0.757955 |
1c0dccf3256988223601d1ad710e44870b30beae | 370 | ex | Elixir | lib/elixir_rest_api_web/views/photo_view.ex | NtwaliHeritier/elixir_rest_api | 9bfe2c6aee75ef27942d1ce4d48ff59b28f10683 | [
"MIT"
] | null | null | null | lib/elixir_rest_api_web/views/photo_view.ex | NtwaliHeritier/elixir_rest_api | 9bfe2c6aee75ef27942d1ce4d48ff59b28f10683 | [
"MIT"
] | null | null | null | lib/elixir_rest_api_web/views/photo_view.ex | NtwaliHeritier/elixir_rest_api | 9bfe2c6aee75ef27942d1ce4d48ff59b28f10683 | [
"MIT"
] | null | null | null | defmodule ElixirRestApiWeb.PhotoView do
use ElixirRestApiWeb, :view
alias __MODULE__
def render("show.json", %{photos: photos}) do
render_many(photos, PhotoView, "photo.json")
end
def render("photo.json", %{photo: photo}) do
%{
title: photo["title"],
thumbna... | 24.666667 | 52 | 0.602703 |
1c0ddeb4b607fc6aa838f2d28b327b2e0eaa9f9d | 2,438 | exs | Elixir | config/prod.exs | empex2019liveview/namedb | fd01151dd293f9740204435fed524bc364f81069 | [
"MIT"
] | null | null | null | config/prod.exs | empex2019liveview/namedb | fd01151dd293f9740204435fed524bc364f81069 | [
"MIT"
] | null | null | null | config/prod.exs | empex2019liveview/namedb | fd01151dd293f9740204435fed524bc364f81069 | [
"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,
# ... | 33.861111 | 69 | 0.712059 |
1c0de20fd725d670cc2d9688cc8450570b7aada4 | 1,081 | exs | Elixir | test/msgpax/plug_parser_test.exs | qcam/msgpax | c846848e69973dc058e45a8b06bd12c953fd5a46 | [
"0BSD"
] | null | null | null | test/msgpax/plug_parser_test.exs | qcam/msgpax | c846848e69973dc058e45a8b06bd12c953fd5a46 | [
"0BSD"
] | null | null | null | test/msgpax/plug_parser_test.exs | qcam/msgpax | c846848e69973dc058e45a8b06bd12c953fd5a46 | [
"0BSD"
] | null | null | null | defmodule Msgpax.PlugParserTest do
use ExUnit.Case
use Plug.Test
test "body with a MessagePack-encoded map" do
conn = conn(:post, "/", Msgpax.pack!(%{hello: "world"}) |> IO.iodata_to_binary())
assert {:ok, %{"hello" => "world"}, _conn} =
Msgpax.PlugParser.parse(conn, "application", "msgpack... | 33.78125 | 88 | 0.625347 |
1c0de490a88bee25fbd868014efd899699f9550a | 1,408 | ex | Elixir | lib/hammox/utils.ex | camilleryr/hammox | 9f11ffb11bc3c2689c13feca123b6aef2dc66d76 | [
"Apache-2.0"
] | 430 | 2019-09-26T05:01:13.000Z | 2022-03-30T05:21:11.000Z | lib/hammox/utils.ex | wojtekmach/hammox | c7ea8e598a753a69384a9a08f71a51ff03d4751b | [
"Apache-2.0"
] | 48 | 2019-09-20T16:11:51.000Z | 2022-03-23T20:33:16.000Z | lib/hammox/utils.ex | wojtekmach/hammox | c7ea8e598a753a69384a9a08f71a51ff03d4751b | [
"Apache-2.0"
] | 18 | 2019-10-02T19:59:33.000Z | 2021-12-07T07:49:16.000Z | defmodule Hammox.Utils do
@moduledoc false
def module_to_string(module_name) do
module_name
|> Atom.to_string()
|> String.split(".")
|> Enum.drop(1)
|> Enum.join(".")
end
def replace_user_types(type, module_name) do
type_map(type, fn
{:user_type, _, name, args} ->
{:remot... | 26.074074 | 96 | 0.600852 |
1c0dffe6f7f06609c4012828b39bfdb60ce19ddb | 17,304 | ex | Elixir | clients/logging/lib/google_api/logging/v2/api/v2.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/logging/lib/google_api/logging/v2/api/v2.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/logging/lib/google_api/logging/v2/api/v2.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... | 58.459459 | 670 | 0.659847 |
1c0e13a0299efc209e0a62ec2172ecdcd94cfe68 | 2,165 | exs | Elixir | test/credo/priority_test.exs | sevenseacat/credo | 48837401040d9c2340b5fb9c7d786d31f89f6426 | [
"MIT"
] | null | null | null | test/credo/priority_test.exs | sevenseacat/credo | 48837401040d9c2340b5fb9c7d786d31f89f6426 | [
"MIT"
] | null | null | null | test/credo/priority_test.exs | sevenseacat/credo | 48837401040d9c2340b5fb9c7d786d31f89f6426 | [
"MIT"
] | null | null | null | defmodule Credo.PriorityTest do
use Credo.TestHelper
alias Credo.Priority
test "it should NOT report expected code 2" do
source_file = """
defmodule Credo.Sample.Module do
def some_function(p1, p2, p3, p4, p5) do
some_value = parameter1 + parameter2
end
end
""" |> to_source_file
expected = %{
... | 27.405063 | 110 | 0.631409 |
1c0e2874cf99dd5610ab56ee687ade9a0d369550 | 1,515 | ex | Elixir | web/controllers/talk_controller.ex | pbrudnick/pyconar-talks | f0b2fdff9cae7bd7558cb4fdc5e0048403bbde7e | [
"MIT"
] | null | null | null | web/controllers/talk_controller.ex | pbrudnick/pyconar-talks | f0b2fdff9cae7bd7558cb4fdc5e0048403bbde7e | [
"MIT"
] | null | null | null | web/controllers/talk_controller.ex | pbrudnick/pyconar-talks | f0b2fdff9cae7bd7558cb4fdc5e0048403bbde7e | [
"MIT"
] | null | null | null | defmodule PyconarTalks.TalkController do
use PyconarTalks.Web, :controller
alias PyconarTalks.Talk
def index(conn, _params) do
talks = Repo.all(Talk)
render(conn, "index.json", talks: talks)
end
def create(conn, %{"talk" => talk_params}) do
changeset = Talk.changeset(%Talk{}, talk_params)
... | 27.053571 | 81 | 0.613201 |
1c0e4d93e6cebe9aa355a24708060bdfcdcefa6f | 403 | exs | Elixir | backend/test/aptamer/auth/user_test.exs | ui-icts/aptamer-web | a28502c22a4e55ab1fbae8bbeaa6b11c9a477c06 | [
"MIT"
] | null | null | null | backend/test/aptamer/auth/user_test.exs | ui-icts/aptamer-web | a28502c22a4e55ab1fbae8bbeaa6b11c9a477c06 | [
"MIT"
] | 7 | 2019-02-08T18:28:49.000Z | 2022-02-12T06:44:59.000Z | backend/test/aptamer/auth/user_test.exs | ui-icts/aptamer-web | a28502c22a4e55ab1fbae8bbeaa6b11c9a477c06 | [
"MIT"
] | null | null | null | defmodule Aptamer.Auth.UserTest do
use Aptamer.DataCase
import Aptamer.Factory
alias Aptamer.Auth.User
test "create from registration" do
registration = build(:registration)
changeset = User.register(registration)
assert changeset.valid?
user = Ecto.Changeset.apply_changes(changeset)
as... | 22.388889 | 78 | 0.759305 |
1c0e53ca661e824c8730b33cf6d782dc5fd6d3cb | 430 | ex | Elixir | lib/shopify_api/rest/shop.ex | ProtoJazz/elixir-shopifyapi | 759e20baff5afdff235386193bc42b2ecd343f5d | [
"Apache-2.0"
] | 18 | 2019-06-07T13:36:39.000Z | 2021-08-03T21:06:36.000Z | lib/shopify_api/rest/shop.ex | ProtoJazz/elixir-shopifyapi | 759e20baff5afdff235386193bc42b2ecd343f5d | [
"Apache-2.0"
] | 158 | 2018-08-30T22:09:00.000Z | 2021-09-22T01:18:59.000Z | lib/shopify_api/rest/shop.ex | ProtoJazz/elixir-shopifyapi | 759e20baff5afdff235386193bc42b2ecd343f5d | [
"Apache-2.0"
] | 4 | 2020-09-05T00:48:46.000Z | 2020-09-30T15:53:50.000Z | defmodule ShopifyAPI.REST.Shop do
@moduledoc """
ShopifyAPI REST API Shop resource
"""
alias ShopifyAPI.AuthToken
alias ShopifyAPI.REST
@doc """
Get a shop's configuration.
## Example
iex> ShopifyAPI.REST.Shop.get(auth)
{:ok, %{} = shop}
"""
def get(%AuthToken{} = auth, params \\ [],... | 21.5 | 88 | 0.630233 |
1c0e62c6c870967307742faabb4087604e7a5192 | 59 | ex | Elixir | lib/sutur_web/views/layout_view.ex | ab-zu/sutur | f314ed29b344fbe0139bd87ac01caf577b1d592e | [
"MIT"
] | 1 | 2021-11-16T02:18:31.000Z | 2021-11-16T02:18:31.000Z | lib/sutur_web/views/layout_view.ex | ab-zu/sutur | f314ed29b344fbe0139bd87ac01caf577b1d592e | [
"MIT"
] | null | null | null | lib/sutur_web/views/layout_view.ex | ab-zu/sutur | f314ed29b344fbe0139bd87ac01caf577b1d592e | [
"MIT"
] | null | null | null | defmodule SuturWeb.LayoutView do
use SuturWeb, :view
end
| 14.75 | 32 | 0.79661 |
1c0e82690367604b7f6b1ea9d3376eb7f220256b | 1,478 | exs | Elixir | test/graphql/response_test.exs | TheRealReal/graphql_client | 18b5b93f06a5cac218f8727eb0f7863081b7becf | [
"Apache-2.0"
] | 9 | 2022-03-11T21:14:13.000Z | 2022-03-31T14:13:38.000Z | test/graphql/response_test.exs | TheRealReal/graphql_client | 18b5b93f06a5cac218f8727eb0f7863081b7becf | [
"Apache-2.0"
] | null | null | null | test/graphql/response_test.exs | TheRealReal/graphql_client | 18b5b93f06a5cac218f8727eb0f7863081b7becf | [
"Apache-2.0"
] | null | null | null | defmodule GraphQL.ResponseTest do
use ExUnit.Case, async: true
alias GraphQL.Response
doctest Response, import: true
describe "success/1" do
test "creates a new Response struct marked as success" do
expected = %Response{
success?: true,
data: %{
field: %{
name:... | 22.059701 | 95 | 0.523681 |
1c0e9ce3d7bd09dd207dc83808a19bd8accaceaa | 1,369 | exs | Elixir | apps/astarte_housekeeping_api/config/dev.exs | Annopaolo/astarte | f8190e8bf044759a9b84bdeb5786a55b6f793a4f | [
"Apache-2.0"
] | 191 | 2018-03-30T13:23:08.000Z | 2022-03-02T12:05:32.000Z | apps/astarte_housekeeping_api/config/dev.exs | Annopaolo/astarte | f8190e8bf044759a9b84bdeb5786a55b6f793a4f | [
"Apache-2.0"
] | 402 | 2018-03-30T13:37:00.000Z | 2022-03-31T16:47:10.000Z | apps/astarte_housekeeping_api/config/dev.exs | Annopaolo/astarte | f8190e8bf044759a9b84bdeb5786a55b6f793a4f | [
"Apache-2.0"
] | 24 | 2018-03-30T13:29:48.000Z | 2022-02-28T11:10:26.000Z | use Mix.Config
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with brunch.io to recompile .js and .css sources.
config :astarte_housekeeping_api, Astarte.Housekeeping.... | 34.225 | 170 | 0.742878 |
1c0ea655f7f79f471326f14057813cbc512d94fa | 6,959 | ex | Elixir | lib/clickhouse_ecto/migration.ex | julienmarie/clickhouse_ecto | 48b556bd93884df3b180a974801d7c09f43ade36 | [
"Apache-2.0"
] | 1 | 2020-08-14T18:47:31.000Z | 2020-08-14T18:47:31.000Z | lib/clickhouse_ecto/migration.ex | julienmarie/clickhouse_ecto | 48b556bd93884df3b180a974801d7c09f43ade36 | [
"Apache-2.0"
] | null | null | null | lib/clickhouse_ecto/migration.ex | julienmarie/clickhouse_ecto | 48b556bd93884df3b180a974801d7c09f43ade36 | [
"Apache-2.0"
] | 2 | 2020-02-25T02:59:10.000Z | 2020-09-17T20:43:24.000Z | defmodule ClickhouseEcto.Migration do
require IEx
alias Ecto.Migration.Table
alias Ecto.Migration.Reference
import ClickhouseEcto.Helpers
@drops [:drop, :drop_if_exists]
@doc """
Receives a DDL command and returns a query that executes it.
"""
@spec execute_ddl(command :: Ecto.Adapter.Migration.com... | 27.397638 | 94 | 0.614312 |
1c0ec2e3660a8a81e2724a6c8ec3c1a933708e13 | 682 | ex | Elixir | lib/otto_api/threat.ex | DEVCONSec/otto-api-client-elixir | b74da14fbb7c4e33f0fe15e583630b6efa634d47 | [
"MIT"
] | null | null | null | lib/otto_api/threat.ex | DEVCONSec/otto-api-client-elixir | b74da14fbb7c4e33f0fe15e583630b6efa634d47 | [
"MIT"
] | 1 | 2020-11-11T15:16:51.000Z | 2020-11-11T20:53:34.000Z | lib/otto_api/threat.ex | DEVCONSec/otto-api-client-elixir | b74da14fbb7c4e33f0fe15e583630b6efa634d47 | [
"MIT"
] | null | null | null | defmodule OttoApi.Threat do
@enforce_keys [:name, :description, :severity]
defstruct @enforce_keys ++ [:id]
alias OttoApi.Client
@spec all(client :: %Client{}) ::
{:ok,
list(%__MODULE__{id: binary, name: string, description: string, severity: integer})}
def all(client) do
{:ok,
... | 24.357143 | 95 | 0.582111 |
1c0f3a095f979617d85a4c536478c804f7027dd2 | 1,238 | ex | Elixir | lib/twinkly_maha_web/router.ex | TraceyOnim/TwinklyMaHa | cb9d907d8807e00f1e6e44085fd6f39ae32370b6 | [
"MIT"
] | null | null | null | lib/twinkly_maha_web/router.ex | TraceyOnim/TwinklyMaHa | cb9d907d8807e00f1e6e44085fd6f39ae32370b6 | [
"MIT"
] | null | null | null | lib/twinkly_maha_web/router.ex | TraceyOnim/TwinklyMaHa | cb9d907d8807e00f1e6e44085fd6f39ae32370b6 | [
"MIT"
] | null | null | null | defmodule TwinklyMahaWeb.Router do
use TwinklyMahaWeb, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_live_flash
plug :put_root_layout, {TwinklyMahaWeb.LayoutView, :root}
plug :protect_from_forgery
plug :put_secure_browser_headers
end
pipeline :api... | 26.913043 | 70 | 0.703554 |
1c0f48e035a17cc70e49f74fde0f715431fa8a05 | 449 | ex | Elixir | lib/addict/interactors/inject_hash.ex | mainframe2/addict | aa70768f20939bf1f4d36a680240cb32f36e2a79 | [
"MIT"
] | null | null | null | lib/addict/interactors/inject_hash.ex | mainframe2/addict | aa70768f20939bf1f4d36a680240cb32f36e2a79 | [
"MIT"
] | null | null | null | lib/addict/interactors/inject_hash.ex | mainframe2/addict | aa70768f20939bf1f4d36a680240cb32f36e2a79 | [
"MIT"
] | null | null | null | defmodule Addict.Interactors.InjectHash do
@moduledoc """
Adds `"encrypted_password"` and drops `"password"` from provided hash.
Returns the new hash with `"encrypted_password"` and without `"password"`.
"""
alias Addict.Interactors.GenerateEncryptedPassword
def call(user_params) do
user_params
|... | 28.0625 | 93 | 0.732739 |
1c0f62e7e3cd07df883642c4de99423b968bcfdc | 2,037 | ex | Elixir | clients/jobs/lib/google_api/jobs/v2/model/response_metadata.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/jobs/lib/google_api/jobs/v2/model/response_metadata.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/jobs/lib/google_api/jobs/v2/model/response_metadata.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 ... | 33.95 | 137 | 0.714286 |
1c0f647fd1d199e403aa283328daebea2c678361 | 1,560 | ex | Elixir | lib/vapor/providers/dotenv.ex | cheerfulstoic/vapor | 326a9e8fe0bba706b9726e136b4a51726f9d99f7 | [
"Apache-2.0"
] | null | null | null | lib/vapor/providers/dotenv.ex | cheerfulstoic/vapor | 326a9e8fe0bba706b9726e136b4a51726f9d99f7 | [
"Apache-2.0"
] | null | null | null | lib/vapor/providers/dotenv.ex | cheerfulstoic/vapor | 326a9e8fe0bba706b9726e136b4a51726f9d99f7 | [
"Apache-2.0"
] | null | null | null | defmodule Vapor.Provider.Dotenv do
@moduledoc """
The dotenv config provider will look for a `.env` file and load all of
the values for that file. The values can be written like so:
```
DATABASE_URL=https://localhost:9432
PORT=4000
REDIS_HOST=1234
```
If the file can't be found then this provider wi... | 26.440678 | 80 | 0.596795 |
1c0f7396a6cbd884c5e2db12504eaab621d1e519 | 368 | ex | Elixir | algorithms/medium/validate_ip_address.ex | stackcats/leetcode | 8d50cd92ced2ca991ea9f1e5311f5fda5707d81d | [
"MIT"
] | 1 | 2021-05-30T05:06:06.000Z | 2021-05-30T05:06:06.000Z | algorithms/medium/validate_ip_address.ex | stackcats/leetcode | 8d50cd92ced2ca991ea9f1e5311f5fda5707d81d | [
"MIT"
] | null | null | null | algorithms/medium/validate_ip_address.ex | stackcats/leetcode | 8d50cd92ced2ca991ea9f1e5311f5fda5707d81d | [
"MIT"
] | null | null | null | defmodule Solution do
@spec valid_ip_address(ip :: String.t) :: String.t
def valid_ip_address(ip) do
cond do
Regex.match?(~r/^((25[0-5]|2[0-4][0-9]|1[0-9]{2}|1[0-9]|[0-9]).){3}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|1[0-9]|[0-9])$/, ip) -> "IPv4"
Regex.match?(~r/^([0-9a-f]{1,4}:){7}[0-9a-f]{1,4}$/i, ip) -> "... | 33.454545 | 134 | 0.513587 |
1c0f8d40b58803ea8df1598f6b9ca3d1e2b59518 | 1,325 | ex | Elixir | clients/drive_activity/lib/google_api/drive_activity/v2/model/anonymous_user.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/drive_activity/lib/google_api/drive_activity/v2/model/anonymous_user.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/drive_activity/lib/google_api/drive_activity/v2/model/anonymous_user.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 30.813953 | 78 | 0.766038 |
1c0f90d05794a6a43a01f8ca534f47cf6e1b4c0b | 1,879 | exs | Elixir | mix.exs | Raulkumar/bamboo | 0fcff1bf61e595eb821bc691ed9370b6a092afbf | [
"MIT"
] | null | null | null | mix.exs | Raulkumar/bamboo | 0fcff1bf61e595eb821bc691ed9370b6a092afbf | [
"MIT"
] | null | null | null | mix.exs | Raulkumar/bamboo | 0fcff1bf61e595eb821bc691ed9370b6a092afbf | [
"MIT"
] | null | null | null | defmodule Bamboo.Mixfile do
use Mix.Project
@project_url "https://github.com/thoughtbot/bamboo"
def project do
[
app: :bamboo,
version: "1.5.0",
elixir: "~> 1.2",
source_url: @project_url,
homepage_url: @project_url,
compilers: compilers(Mix.env()),
test_coverage: [... | 27.632353 | 95 | 0.569984 |
1c0f9e4a3bf4369f2067527793250cff221a7c26 | 183 | ex | Elixir | lib/grapevine/client/broadcast.ex | shanesveller/grapevine | fe74ade1adff88dfe4c1ab55fee3902dbb4664fe | [
"MIT"
] | null | null | null | lib/grapevine/client/broadcast.ex | shanesveller/grapevine | fe74ade1adff88dfe4c1ab55fee3902dbb4664fe | [
"MIT"
] | null | null | null | lib/grapevine/client/broadcast.ex | shanesveller/grapevine | fe74ade1adff88dfe4c1ab55fee3902dbb4664fe | [
"MIT"
] | null | null | null | defmodule Grapevine.Client.Broadcast do
@moduledoc """
Struct for messages being broadcast on a channel
"""
@derive Jason.Encoder
defstruct [:channel, :name, :message]
end
| 20.333333 | 50 | 0.726776 |
1c0fbcff0d70b4a5a03e8654c94a28547956731f | 2,228 | ex | Elixir | lib/wechat/work/oa/schedule.ex | feng19/wechat | 431c22818c60cd01fc5c676aa060feb303d0c444 | [
"Apache-2.0"
] | 7 | 2021-01-22T04:07:29.000Z | 2021-12-14T14:01:30.000Z | lib/wechat/work/oa/schedule.ex | feng19/wechat | 431c22818c60cd01fc5c676aa060feb303d0c444 | [
"Apache-2.0"
] | 1 | 2021-03-17T15:44:26.000Z | 2021-03-17T15:44:26.000Z | lib/wechat/work/oa/schedule.ex | feng19/wechat | 431c22818c60cd01fc5c676aa060feb303d0c444 | [
"Apache-2.0"
] | 2 | 2021-03-17T14:35:56.000Z | 2021-08-10T07:44:10.000Z | defmodule WeChat.Work.OA.Schedule do
@moduledoc "日程"
import Jason.Helpers
import WeChat.Utils, only: [work_doc_link_prefix: 0]
alias WeChat.Work
alias WeChat.Work.OA.Calendar
@doc_link "#{work_doc_link_prefix()}/90135/93648"
@typedoc "日程ID"
@type schedule_id :: String.t()
@type schedule_id_list :: [... | 28.935065 | 89 | 0.643178 |
1c0fe32b84f42f50604c62e1ab57affcb22a4d8b | 232 | exs | Elixir | priv/repo/migrations/20170612223827_create_users_user.exs | Apps-Team/conferencetools | ce2e16a3e4a521dc4682e736a209e6dd380c050d | [
"Apache-2.0"
] | null | null | null | priv/repo/migrations/20170612223827_create_users_user.exs | Apps-Team/conferencetools | ce2e16a3e4a521dc4682e736a209e6dd380c050d | [
"Apache-2.0"
] | 6 | 2017-10-05T20:16:34.000Z | 2017-10-05T20:36:11.000Z | priv/repo/migrations/20170612223827_create_users_user.exs | apps-team/events-tools | ce2e16a3e4a521dc4682e736a209e6dd380c050d | [
"Apache-2.0"
] | null | null | null | defmodule EventsTools.Repo.Migrations.CreateEventsTools.Accounts.User do
use Ecto.Migration
def change do
create table(:users) do
add :email, :string
add :password, :string
timestamps()
end
end
end
| 17.846154 | 72 | 0.689655 |
1c0fee83b8634491c07c236407d8316d0a8b7c8d | 250 | ex | Elixir | jobsPortalService/lib/models/posting.ex | andraspatka/jobportal-ms | 006c8ca212f88566113c4b5c00dfe1d4e421c034 | [
"MIT"
] | 1 | 2021-05-25T18:24:27.000Z | 2021-05-25T18:24:27.000Z | jobsPortalService/lib/models/posting.ex | andraspatka/jobportal-ms | 006c8ca212f88566113c4b5c00dfe1d4e421c034 | [
"MIT"
] | 1 | 2021-05-23T09:50:10.000Z | 2021-05-23T09:50:10.000Z | jobsPortalService/lib/models/posting.ex | andraspatka/jobportal-ms | 006c8ca212f88566113c4b5c00dfe1d4e421c034 | [
"MIT"
] | null | null | null | defmodule Models.Postings do
defstruct id: nil,
postedById: nil,
postedAt: nil,
deadline: nil,
numberOfViews: nil,
name: nil,
description: nil,
categoryId: nil,
requirements: nil
end | 22.727273 | 28 | 0.568 |
1c100b834cfd03324107fca55d9696d769e10b84 | 2,423 | ex | Elixir | clients/content/lib/google_api/content/v2/model/productstatuses_custom_batch_request_entry.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/productstatuses_custom_batch_request_entry.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/productstatuses_custom_batch_request_entry.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... | 37.276923 | 184 | 0.698308 |
1c10112561efa5379f80d72ac9c582e79497a00c | 572 | ex | Elixir | lib/ash/resource/actions/destroy.ex | elbow-jason/ash | eb63bc9d4d24187ad07d9892088b4e55ad6258e4 | [
"MIT"
] | 1 | 2021-12-27T09:43:29.000Z | 2021-12-27T09:43:29.000Z | lib/ash/resource/actions/destroy.ex | elbow-jason/ash | eb63bc9d4d24187ad07d9892088b4e55ad6258e4 | [
"MIT"
] | null | null | null | lib/ash/resource/actions/destroy.ex | elbow-jason/ash | eb63bc9d4d24187ad07d9892088b4e55ad6258e4 | [
"MIT"
] | null | null | null | defmodule Ash.Resource.Actions.Destroy do
@moduledoc "Represents a destroy action on a resource."
defstruct [:name, :primary?, type: :destroy]
@type t :: %__MODULE__{
type: :destroy,
name: atom,
primary?: boolean
}
@opt_schema [
name: [
type: :atom,
doc: ... | 21.185185 | 97 | 0.592657 |
1c101f407ab1ae8f10a38838c84cdc1424bc4e0a | 197 | exs | Elixir | geolocate/test/controllers/page_controller_test.exs | gregoryterlecki/geolocateproject | c283b9f589fbd8046b82a1a027fd5a56f250a8f6 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | geolocate/test/controllers/page_controller_test.exs | gregoryterlecki/geolocateproject | c283b9f589fbd8046b82a1a027fd5a56f250a8f6 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | geolocate/test/controllers/page_controller_test.exs | gregoryterlecki/geolocateproject | c283b9f589fbd8046b82a1a027fd5a56f250a8f6 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | defmodule Geolocate.PageControllerTest do
use Geolocate.ConnCase
test "GET /", %{conn: conn} do
conn = get conn, "/"
assert html_response(conn, 200) =~ "Welcome to Phoenix!"
end
end
| 21.888889 | 60 | 0.680203 |
1c1020ea70a2d4efeb5f6a5dc699e2d1b024116c | 1,377 | ex | Elixir | lib/spaceex_web/router.ex | LuizFerK/SpaceEx | ca1a4bd4881692860879b6f2c5d55bc521332c39 | [
"MIT"
] | 1 | 2021-12-13T15:50:00.000Z | 2021-12-13T15:50:00.000Z | lib/spaceex_web/router.ex | LuizFerK/SpaceEx | ca1a4bd4881692860879b6f2c5d55bc521332c39 | [
"MIT"
] | null | null | null | lib/spaceex_web/router.ex | LuizFerK/SpaceEx | ca1a4bd4881692860879b6f2c5d55bc521332c39 | [
"MIT"
] | 2 | 2022-01-09T18:12:17.000Z | 2022-01-23T22:12:51.000Z | defmodule SpaceexWeb.Router do
use SpaceexWeb, :router
alias SpaceexWeb.Plugs.IDChecker
pipeline :api do
plug :accepts, ["json"]
plug IDChecker
end
# coveralls-ignore-start
pipeline :docs do
plug OpenApiSpex.Plug.PutApiSpec, module: SpaceexWeb.ApiSpec
end
# coveralls-ignore-stop
scope... | 25.981132 | 70 | 0.703704 |
1c1039b2394e2a6eb74118ad755395aace59ae55 | 4,453 | ex | Elixir | lib/helpers.ex | elpulgardelpanda/syscrap | 03e5dee924df8cd69db4eddb1e557168ea0ee04f | [
"MIT"
] | null | null | null | lib/helpers.ex | elpulgardelpanda/syscrap | 03e5dee924df8cd69db4eddb1e557168ea0ee04f | [
"MIT"
] | null | null | null | lib/helpers.ex | elpulgardelpanda/syscrap | 03e5dee924df8cd69db4eddb1e557168ea0ee04f | [
"MIT"
] | null | null | null | alias Keyword, as: K
defmodule Syscrap.Helpers do
@moduledoc """
require SSHEx.Helpers, as: H # the cool way
"""
@doc """
Convenience to get environment bits. Avoid all that repetitive
`Application.get_env( :myapp, :blah, :blah)` noise.
"""
def env(key, default \\ nil), do: env(:syscrap, key, d... | 28.729032 | 93 | 0.573995 |
1c108fd2ffdbb6a40cb59ece7cd48c4483cd47ba | 342 | exs | Elixir | priv/repo/seeds.exs | billstclair/readerl | bd81d17109a1fb207d98f1ba1c498f66b195d1ba | [
"BSD-3-Clause"
] | 3 | 2015-10-31T02:33:29.000Z | 2016-07-19T06:25:03.000Z | priv/repo/seeds.exs | billstclair/readerl | bd81d17109a1fb207d98f1ba1c498f66b195d1ba | [
"BSD-3-Clause"
] | null | null | null | priv/repo/seeds.exs | billstclair/readerl | bd81d17109a1fb207d98f1ba1c498f66b195d1ba | [
"BSD-3-Clause"
] | 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:
#
# Readerl.Repo.insert!(%SomeModel{})
#
# We recommend using the bang functions (`insert!`, `update!`
# and so on) as they will fail if ... | 28.5 | 61 | 0.701754 |
1c109c87985cee6941c21dc163c12b49f92c89e3 | 878 | ex | Elixir | clients/apigee/lib/google_api/apigee/v1/metadata.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/apigee/lib/google_api/apigee/v1/metadata.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/apigee/lib/google_api/apigee/v1/metadata.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 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.518519 | 74 | 0.757403 |
1c10c5195c3ebfcd5e57abf832e67a18d77cee0f | 2,180 | exs | Elixir | test/game/npc/actions/commands_skill_test.exs | nomicflux/ex_venture | 3e87dc8802c24067256d99856198c814d0bae4d6 | [
"MIT"
] | null | null | null | test/game/npc/actions/commands_skill_test.exs | nomicflux/ex_venture | 3e87dc8802c24067256d99856198c814d0bae4d6 | [
"MIT"
] | null | null | null | test/game/npc/actions/commands_skill_test.exs | nomicflux/ex_venture | 3e87dc8802c24067256d99856198c814d0bae4d6 | [
"MIT"
] | null | null | null | defmodule Game.NPC.Actions.CommandsSkillTest do
use ExVenture.NPCCase
alias Data.Events.Actions
alias Game.Character
alias Game.NPC.Actions.CommandsSkill
alias Game.NPC.State
alias Game.Session.Registry
doctest CommandsSkill
setup [:basic_setup]
describe "using skills" do
test "uses the skill"... | 25.952381 | 90 | 0.626606 |
1c10d9f713ba6da2fd5cd90a110dfc52ceea2bfc | 207 | ex | Elixir | plugins/one_backup_restore/lib/one_backup_restore_web/controllers/upload_controller.ex | smpallen99/ucx_ucc | 47225f205a6ac4aacdb9bb4f7512dcf4092576ad | [
"MIT"
] | 11 | 2017-05-15T18:35:05.000Z | 2018-02-05T18:27:40.000Z | plugins/one_backup_restore/lib/one_backup_restore_web/controllers/upload_controller.ex | anndream/infinity_one | 47225f205a6ac4aacdb9bb4f7512dcf4092576ad | [
"MIT"
] | 15 | 2017-11-27T10:38:05.000Z | 2018-02-09T20:42:08.000Z | plugins/one_backup_restore/lib/one_backup_restore_web/controllers/upload_controller.ex | anndream/infinity_one | 47225f205a6ac4aacdb9bb4f7512dcf4092576ad | [
"MIT"
] | 4 | 2017-09-13T11:34:16.000Z | 2018-02-26T13:37:06.000Z | defmodule OneBackupRestoreWeb.UploadController do
use OneBackupRestoreWeb, :controller
require Logger
def create(conn, params) do
Logger.warn "params: #{inspect params}"
halt conn
end
end
| 17.25 | 49 | 0.748792 |
1c10dd8530e5af979f935ed848b51f086c4c87f5 | 503 | ex | Elixir | socket_gallows/lib/socket_gallows_web/views/error_view.ex | jeethridge/elixir-hangman | ff1202fd1f54cad887180c900670306a20fe4339 | [
"Unlicense"
] | null | null | null | socket_gallows/lib/socket_gallows_web/views/error_view.ex | jeethridge/elixir-hangman | ff1202fd1f54cad887180c900670306a20fe4339 | [
"Unlicense"
] | null | null | null | socket_gallows/lib/socket_gallows_web/views/error_view.ex | jeethridge/elixir-hangman | ff1202fd1f54cad887180c900670306a20fe4339 | [
"Unlicense"
] | null | null | null | defmodule SocketGallowsWeb.ErrorView do
use SocketGallowsWeb, :view
# If you want to customize a particular status code
# for a certain format, you may uncomment below.
# def render("500.html", _assigns) do
# "Internal Server Error"
# end
# By default, Phoenix returns the status message from
# the t... | 29.588235 | 61 | 0.741551 |
1c10f094353504e6bf235d47116f12b036c9d41c | 69 | ex | Elixir | lib/scentenced_web/views/layout_view.ex | cNille/scentenced | ca6cc97bec1122047be928bb62b5ab0021cb88e8 | [
"MIT"
] | null | null | null | lib/scentenced_web/views/layout_view.ex | cNille/scentenced | ca6cc97bec1122047be928bb62b5ab0021cb88e8 | [
"MIT"
] | 1 | 2020-07-17T08:20:59.000Z | 2020-07-17T08:20:59.000Z | lib/scentenced_web/views/layout_view.ex | cNille/scentenced | ca6cc97bec1122047be928bb62b5ab0021cb88e8 | [
"MIT"
] | null | null | null | defmodule ScentencedWeb.LayoutView do
use ScentencedWeb, :view
end
| 17.25 | 37 | 0.826087 |
1c113b648e4b65c40cfe8c197d2fb7a098def74d | 2,532 | exs | Elixir | test/support/mock.exs | raw1z/ex_neo4j | afb778f56ff65c63ceb848b8debe9c3e8b3a375e | [
"MIT"
] | 2 | 2015-07-28T16:12:56.000Z | 2015-10-09T21:21:16.000Z | test/support/mock.exs | raw1z/ex_neo4j | afb778f56ff65c63ceb848b8debe9c3e8b3a375e | [
"MIT"
] | 1 | 2015-11-01T16:14:34.000Z | 2015-11-02T10:35:48.000Z | test/support/mock.exs | raw1z/ex_neo4j | afb778f56ff65c63ceb848b8debe9c3e8b3a375e | [
"MIT"
] | null | null | null | defmodule Mock do
def init_mocks do
mock_module Timex.Date
:meck.expect(Timex.Date, :now, fn ->
%Timex.DateTime{calendar: :gregorian, day: 14, hour: 2, minute: 55, month: 10,
ms: 0, second: 3,
timezone: %Timex.TimezoneInfo{abbreviation: "UTC", from: :min,
full_name: "UTC", offset_s... | 32.461538 | 86 | 0.657188 |
1c113e7ba93e667855f13ec34d8d26f40bc6759b | 1,945 | exs | Elixir | ui/config/prod.exs | sparrell/BlinkyHaHa | fc634d09d2427d39263f08c4c1841ccfcdbd0842 | [
"MIT"
] | 1 | 2021-06-05T18:04:05.000Z | 2021-06-05T18:04:05.000Z | ui/config/prod.exs | sparrell/BlinkyHaHa | fc634d09d2427d39263f08c4c1841ccfcdbd0842 | [
"MIT"
] | 3 | 2020-06-29T19:05:32.000Z | 2020-07-01T20:52:23.000Z | ui/config/prod.exs | sparrell/BlinkyHaHa | fc634d09d2427d39263f08c4c1841ccfcdbd0842 | [
"MIT"
] | null | null | null | import 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,
# w... | 34.732143 | 66 | 0.709512 |
1c114b5a74f9871b47e00643f404a291977a47f4 | 3,180 | ex | Elixir | clients/connectors/lib/google_api/connectors/v1/model/provider.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/connectors/lib/google_api/connectors/v1/model/provider.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/connectors/lib/google_api/connectors/v1/model/provider.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... | 42.972973 | 232 | 0.677358 |
1c11b3f797c4c2eed96e21ce80a485322ecdb2a6 | 902 | ex | Elixir | apps/ewallet/lib/ewallet/policies/role_policy.ex | amadeobrands/ewallet | 505b7822721940a7b892a9b35c225e80cc8ac0b4 | [
"Apache-2.0"
] | 1 | 2018-12-07T06:21:21.000Z | 2018-12-07T06:21:21.000Z | apps/ewallet/lib/ewallet/policies/role_policy.ex | amadeobrands/ewallet | 505b7822721940a7b892a9b35c225e80cc8ac0b4 | [
"Apache-2.0"
] | null | null | null | apps/ewallet/lib/ewallet/policies/role_policy.ex | amadeobrands/ewallet | 505b7822721940a7b892a9b35c225e80cc8ac0b4 | [
"Apache-2.0"
] | null | null | null | defmodule EWallet.RolePolicy do
@moduledoc """
The authorization policy for roles.
"""
@behaviour Bodyguard.Policy
alias EWalletDB.{Account, User}
# Any authenticated key or admin user can retrieve the list of roles
def authorize(:all, %{key: _}, _role_id), do: true
def authorize(:all, %{admin_user: _}... | 32.214286 | 78 | 0.706208 |
1c11b692905feb3fb3c0a1e4f5ccdc2ed8f7c25b | 1,424 | exs | Elixir | spec/assertions/binary/have_byte_size_spec.exs | bblaszkow06/espec | 4d9819ca5c68c6eb70276c7d9c9630ded01ba778 | [
"Apache-2.0"
] | null | null | null | spec/assertions/binary/have_byte_size_spec.exs | bblaszkow06/espec | 4d9819ca5c68c6eb70276c7d9c9630ded01ba778 | [
"Apache-2.0"
] | null | null | null | spec/assertions/binary/have_byte_size_spec.exs | bblaszkow06/espec | 4d9819ca5c68c6eb70276c7d9c9630ded01ba778 | [
"Apache-2.0"
] | null | null | null | defmodule ESpec.Assertions.Binary.HaveByteSizeSpec do
use ESpec, async: true
let :byte_count, do: byte_size(binary())
let :binary, do: <<116, 188, 252, 155, 9>>
context "Success" do
it "checks success with `to`" do
message = expect(binary()).to(have_byte_size(byte_count()))
expect(message) |> ... | 29.061224 | 101 | 0.567416 |
1c11bbde75288f0beaa2b504c0a2c1d708739441 | 366 | ex | Elixir | lib/ex_algo/queue/impls/enumerable.ex | code-shoily/ex_algo | 7837c222fd2844a151b6b92038f94ea088bec0a2 | [
"MIT"
] | 21 | 2021-11-21T08:07:38.000Z | 2022-03-13T06:19:35.000Z | lib/ex_algo/queue/impls/enumerable.ex | code-shoily/ex_algo | 7837c222fd2844a151b6b92038f94ea088bec0a2 | [
"MIT"
] | 3 | 2021-11-26T22:54:09.000Z | 2022-03-06T21:16:12.000Z | lib/ex_algo/queue/impls/enumerable.ex | code-shoily/ex_algo | 7837c222fd2844a151b6b92038f94ea088bec0a2 | [
"MIT"
] | null | null | null | alias ExAlgo.Queue
defimpl Enumerable, for: Queue do
def count(queue), do: {:ok, queue |> Queue.to_list() |> Enum.count()}
def member?(queue, item) do
{:ok, queue |> Queue.to_list() |> Enum.member?(item)}
end
def reduce(queue, acc, fun) do
Enumerable.List.reduce(Queue.to_list(queue), acc, fun)
end
... | 22.875 | 71 | 0.653005 |
1c11c53602d891c72591ef976b0669b764d69776 | 119 | ex | Elixir | lib/pennystock_api/repo.ex | TheAlexPorter/pennystock-api | e42d8a8d25a31f1723c5f28a344a4ee7ff7e30e9 | [
"MIT"
] | null | null | null | lib/pennystock_api/repo.ex | TheAlexPorter/pennystock-api | e42d8a8d25a31f1723c5f28a344a4ee7ff7e30e9 | [
"MIT"
] | null | null | null | lib/pennystock_api/repo.ex | TheAlexPorter/pennystock-api | e42d8a8d25a31f1723c5f28a344a4ee7ff7e30e9 | [
"MIT"
] | null | null | null | defmodule PennystockApi.Repo do
use Ecto.Repo,
otp_app: :pennystock_api,
adapter: Ecto.Adapters.Postgres
end
| 19.833333 | 35 | 0.756303 |
1c11d93b8f314f567ae9a666bb6b1aba7b4b2821 | 1,196 | ex | Elixir | test/support/conn_case.ex | lnxbil/asciinema-server | 7fd64e52927b5d4afc53a2da3243cff91c9c37c3 | [
"Apache-2.0"
] | 1 | 2021-07-07T12:36:10.000Z | 2021-07-07T12:36:10.000Z | test/support/conn_case.ex | lnxbil/asciinema-server | 7fd64e52927b5d4afc53a2da3243cff91c9c37c3 | [
"Apache-2.0"
] | null | null | null | test/support/conn_case.ex | lnxbil/asciinema-server | 7fd64e52927b5d4afc53a2da3243cff91c9c37c3 | [
"Apache-2.0"
] | null | null | null | defmodule AsciinemaWeb.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 and query models.
Finally, if the test case interacts with th... | 25.446809 | 71 | 0.712375 |
1c11fab1cb0e4443ca1e1d83d10ca6fd7c49ebd5 | 268 | exs | Elixir | scripts/benchmark_grids.exs | kbsymanz/maze_generator | f9519b83b53d4e74d51aece6644028f1e577b145 | [
"MIT"
] | 3 | 2021-07-07T03:45:24.000Z | 2021-07-12T13:12:05.000Z | scripts/benchmark_grids.exs | kbsymanz/maze_generator | f9519b83b53d4e74d51aece6644028f1e577b145 | [
"MIT"
] | null | null | null | scripts/benchmark_grids.exs | kbsymanz/maze_generator | f9519b83b53d4e74d51aece6644028f1e577b145 | [
"MIT"
] | null | null | null | alias MazeGenerator, as: Mg
Benchee.run(%{
grid_recursive_10_10: fn -> Mg.new(10, 10, :recursive_backtracker) end,
grid_recursive_20_20: fn -> Mg.new(20, 20, :recursive_backtracker) end,
grid_recursive_40_40: fn -> Mg.new(40, 40, :recursive_backtracker) end
})
| 33.5 | 73 | 0.735075 |
1c11ff8a9cd129715df12f01fed238012accac8c | 9,552 | ex | Elixir | lib/chart/scale/continuous_linear_scale.ex | zdenal/contex | 6dfa0507ffd79573e5308a83bc6c9d025b6c23ad | [
"MIT"
] | 455 | 2020-01-15T22:21:40.000Z | 2022-03-29T23:20:45.000Z | lib/chart/scale/continuous_linear_scale.ex | zdenal/contex | 6dfa0507ffd79573e5308a83bc6c9d025b6c23ad | [
"MIT"
] | 48 | 2020-02-10T06:19:17.000Z | 2022-03-29T03:02:52.000Z | lib/chart/scale/continuous_linear_scale.ex | zdenal/contex | 6dfa0507ffd79573e5308a83bc6c9d025b6c23ad | [
"MIT"
] | 30 | 2020-01-15T22:21:35.000Z | 2022-03-10T18:11:51.000Z | defmodule Contex.ContinuousLinearScale do
@moduledoc """
A linear scale to map continuous numberic data to a plotting coordinate system.
Implements the general aspects of scale setup and use defined in the `Contex.Scale` protocol
The `ContinuousLinearScale` is responsible for mapping to and from values in the... | 31.946488 | 109 | 0.682789 |
1c120bfc78600c0ced955e1345285c2e7b5251a5 | 1,121 | exs | Elixir | restserver_genserver/config/config.exs | arquitecturas-concurrentes/iasc-otp-elixir-2019c2 | c8c6c88db978785f439596e0b5f582473b54a35f | [
"BSD-3-Clause"
] | null | null | null | restserver_genserver/config/config.exs | arquitecturas-concurrentes/iasc-otp-elixir-2019c2 | c8c6c88db978785f439596e0b5f582473b54a35f | [
"BSD-3-Clause"
] | null | null | null | restserver_genserver/config/config.exs | arquitecturas-concurrentes/iasc-otp-elixir-2019c2 | c8c6c88db978785f439596e0b5f582473b54a35f | [
"BSD-3-Clause"
] | 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.16129 | 73 | 0.752007 |
1c120d3f20552151ee7a613f28051ad0a3fd80b7 | 4,164 | ex | Elixir | deps/phoenix_html/lib/phoenix_html/form_data.ex | rchervin/phoenixportfolio | a5a6a60168d7261647a10a8dbd395b440db8a4f9 | [
"MIT"
] | 2 | 2017-06-08T23:28:13.000Z | 2017-06-08T23:28:16.000Z | deps/phoenix_html/lib/phoenix_html/form_data.ex | rchervin/phoenixportfolio | a5a6a60168d7261647a10a8dbd395b440db8a4f9 | [
"MIT"
] | null | null | null | deps/phoenix_html/lib/phoenix_html/form_data.ex | rchervin/phoenixportfolio | a5a6a60168d7261647a10a8dbd395b440db8a4f9 | [
"MIT"
] | null | null | null | defprotocol Phoenix.HTML.FormData do
@moduledoc """
Converts a data structure into a `Phoenix.HTML.Form` struct.
"""
@doc """
Converts a data structure into a `Phoenix.HTML.Form` struct.
The options are the same options given to `form_for/4`. It
can be used by implementations to configure their behaviou... | 29.742857 | 84 | 0.597022 |
1c1216277b2450a62d719b5df9a7c4b69a2e6b1a | 3,396 | exs | Elixir | test/phoenix/endpoint/supervisor_test.exs | faheempatel/phoenix | a83318f2a2284b7ab29b0b86cdd9d2e1f4d0a7c9 | [
"MIT"
] | 18,092 | 2015-01-01T01:51:04.000Z | 2022-03-31T19:37:14.000Z | test/phoenix/endpoint/supervisor_test.exs | faheempatel/phoenix | a83318f2a2284b7ab29b0b86cdd9d2e1f4d0a7c9 | [
"MIT"
] | 3,905 | 2015-01-01T00:22:47.000Z | 2022-03-31T17:06:21.000Z | test/phoenix/endpoint/supervisor_test.exs | faheempatel/phoenix | a83318f2a2284b7ab29b0b86cdd9d2e1f4d0a7c9 | [
"MIT"
] | 3,205 | 2015-01-03T10:58:22.000Z | 2022-03-30T14:55:57.000Z | defmodule Phoenix.Endpoint.SupervisorTest do
use ExUnit.Case, async: true
alias Phoenix.Endpoint.Supervisor
setup do
Application.put_env(:phoenix, SupervisorApp.Endpoint, custom: true)
System.put_env("PHOENIX_PORT", "8080")
System.put_env("PHOENIX_HOST", "example.org")
:ok
end
test "loads ro... | 35.375 | 102 | 0.682568 |
1c123c82b90231f2f3ff9cf46a4329e6a3c184cb | 83 | ex | Elixir | integration_test/wallaby_example_app/lib/wallaby_example_app_web/views/layout_view.ex | elitau/tix | 2aa5fe4d91e7962ebcdc9b668aacf65e09ff9bb8 | [
"MIT"
] | 1 | 2021-08-16T18:52:45.000Z | 2021-08-16T18:52:45.000Z | integration_test/wallaby_example_app/lib/wallaby_example_app_web/views/layout_view.ex | elitau/tix | 2aa5fe4d91e7962ebcdc9b668aacf65e09ff9bb8 | [
"MIT"
] | 16 | 2021-03-09T19:39:31.000Z | 2022-03-15T15:20:24.000Z | integration_test/wallaby_example_app/lib/wallaby_example_app_web/views/layout_view.ex | elitau/tix | 2aa5fe4d91e7962ebcdc9b668aacf65e09ff9bb8 | [
"MIT"
] | null | null | null | defmodule WallabyExampleAppWeb.LayoutView do
use WallabyExampleAppWeb, :view
end
| 20.75 | 44 | 0.855422 |
1c126bbc398455aed6b0e1564a6bb5308f3cd4b3 | 295 | exs | Elixir | test/mix/tasks/terminator_test.exs | adrianplavka/terminator | 794a58f6f05085159e85da7468a091e07d49a98b | [
"MIT"
] | 54 | 2019-01-05T02:07:22.000Z | 2022-02-14T22:14:45.000Z | test/mix/tasks/terminator_test.exs | adrianplavka/terminator | 794a58f6f05085159e85da7468a091e07d49a98b | [
"MIT"
] | 3 | 2019-07-02T11:23:50.000Z | 2021-12-16T13:07:55.000Z | test/mix/tasks/terminator_test.exs | adrianplavka/terminator | 794a58f6f05085159e85da7468a091e07d49a98b | [
"MIT"
] | 10 | 2019-02-15T00:24:31.000Z | 2022-03-26T11:03:04.000Z | defmodule Mix.Tasks.TerminatorTest do
use ExUnit.Case
test "provide a list of available terminator mix tasks" do
Mix.Tasks.Terminator.run([])
assert_received {:mix_shell, :info, ["Terminator v" <> _]}
assert_received {:mix_shell, :info, ["mix terminator.setup" <> _]}
end
end
| 29.5 | 70 | 0.701695 |
1c126be62a0ea4ea1bd17479778536c93d6de4af | 1,186 | ex | Elixir | lib/hunter/report.ex | 4DA/hunter | 0264d40bc8d3a23f81b7976b636c0726934dac60 | [
"Apache-2.0"
] | 38 | 2017-04-09T16:43:58.000Z | 2021-10-30T00:47:41.000Z | lib/hunter/report.ex | 4DA/hunter | 0264d40bc8d3a23f81b7976b636c0726934dac60 | [
"Apache-2.0"
] | 51 | 2017-04-14T13:02:42.000Z | 2022-02-28T11:16:44.000Z | lib/hunter/report.ex | 4DA/hunter | 0264d40bc8d3a23f81b7976b636c0726934dac60 | [
"Apache-2.0"
] | 8 | 2017-04-14T12:45:18.000Z | 2020-09-04T23:08:30.000Z | defmodule Hunter.Report do
@moduledoc """
Report entity
This module defines a `Hunter.Report` struct and the main functions
for working with Reports.
## Fields
* `id` - id of the report
* `action_taken` - action taken in response to the report
"""
alias Hunter.Config
@type t :: %__MODULE__{... | 21.962963 | 84 | 0.647555 |
1c1292180e9a955d2498dea0bd9752ee08615591 | 178 | ex | Elixir | web/router.ex | cdale77/bart_scrape | 8696b303f1111a29cfdbea80f15823da3ea5747d | [
"MIT"
] | null | null | null | web/router.ex | cdale77/bart_scrape | 8696b303f1111a29cfdbea80f15823da3ea5747d | [
"MIT"
] | null | null | null | web/router.ex | cdale77/bart_scrape | 8696b303f1111a29cfdbea80f15823da3ea5747d | [
"MIT"
] | null | null | null | defmodule BartScrape.Router do
use BartScrape.Web, :router
pipeline :api do
plug :accepts, ["json"]
end
scope "/api", BartScrape do
pipe_through :api
end
end
| 14.833333 | 30 | 0.679775 |
1c12c0dfb4191bc30df1018804301397f3939fdd | 2,637 | exs | Elixir | test/mix/tasks/phoenix/pow.phoenix.gen.templates_test.exs | abartier/pow | 58a3d082da093e2dc7f07825a950ee133204813f | [
"Unlicense",
"MIT"
] | null | null | null | test/mix/tasks/phoenix/pow.phoenix.gen.templates_test.exs | abartier/pow | 58a3d082da093e2dc7f07825a950ee133204813f | [
"Unlicense",
"MIT"
] | null | null | null | test/mix/tasks/phoenix/pow.phoenix.gen.templates_test.exs | abartier/pow | 58a3d082da093e2dc7f07825a950ee133204813f | [
"Unlicense",
"MIT"
] | null | null | null | defmodule Mix.Tasks.Pow.Phoenix.Gen.TemplatesTest do
use Pow.Test.Mix.TestCase
alias Mix.Tasks.Pow.Phoenix.Gen.Templates
@tmp_path Path.join(["tmp", inspect(Templates)])
@expected_template_files %{
"registration" => ["edit.html.eex", "new.html.eex"],
"session" => ["new.html.eex"]
}
@expected_view... | 32.158537 | 86 | 0.622677 |
1c12ccace9080ab0acd87d6e98e1246f1bee4fef | 1,924 | exs | Elixir | test/request_test.exs | pfitz/bahn_ex | 4948e9107a37d4ee3027226578b958059a88524c | [
"MIT"
] | null | null | null | test/request_test.exs | pfitz/bahn_ex | 4948e9107a37d4ee3027226578b958059a88524c | [
"MIT"
] | null | null | null | test/request_test.exs | pfitz/bahn_ex | 4948e9107a37d4ee3027226578b958059a88524c | [
"MIT"
] | null | null | null | defmodule BahnEx.RequestTest do
use ExUnit.Case, async: false
import Mock
alias BahnEx.{Config, Request}
@header %{"Authorization" => "Bearer #{Config.get_api_key()}", "Accept" => "Application/json; Charset=utf-8"}
test "location request is getting called with the right url" do
with_mock HTTPoison, [g... | 38.48 | 111 | 0.599272 |
1c12e54232fa6a4841e2fe056c926f2e373def00 | 3,888 | exs | Elixir | test/acceptances/elastic_search_test.exs | falood/tirexs | 9c63532cf2f50f77fb437f617d433741771d3619 | [
"Apache-2.0"
] | null | null | null | test/acceptances/elastic_search_test.exs | falood/tirexs | 9c63532cf2f50f77fb437f617d433741771d3619 | [
"Apache-2.0"
] | null | null | null | test/acceptances/elastic_search_test.exs | falood/tirexs | 9c63532cf2f50f77fb437f617d433741771d3619 | [
"Apache-2.0"
] | null | null | null | Code.require_file "../../test_helper.exs", __ENV__.file
defmodule Acceptances.ElasticSearchTest do
use ExUnit.Case
import Tirexs.Mapping, only: :macros
import Tirexs.Bulk
import Tirexs.ElasticSearch
require Tirexs.ElasticSearch
require Tirexs.Query
import Tirexs.Search
test :get_elastic_search_serve... | 27.771429 | 80 | 0.601852 |
1c1312c5266b484f5abf63500cd224f27dd60129 | 5,937 | exs | Elixir | server/test/realtime/subscription_manager_test.exs | Omneedia/realtime | 90a72170aa1502e211c9f5cbf638c60add6faaf6 | [
"Apache-2.0"
] | null | null | null | server/test/realtime/subscription_manager_test.exs | Omneedia/realtime | 90a72170aa1502e211c9f5cbf638c60add6faaf6 | [
"Apache-2.0"
] | null | null | null | server/test/realtime/subscription_manager_test.exs | Omneedia/realtime | 90a72170aa1502e211c9f5cbf638c60add6faaf6 | [
"Apache-2.0"
] | null | null | null | defmodule Realtime.SubscriptionManagerTest do
use ExUnit.Case
import Mock
alias Realtime.SubscriptionManager
@user_id "bbb51e4e-f371-4463-bf0a-af8f56dc9a71"
@user_email "user@test.com"
setup_all do
start_supervised(Realtime.RLS.Repo)
:ok
end
test "track_topic_subscriber/1" do
mess = {
... | 25.590517 | 85 | 0.580765 |
1c13402b7a4212f8c02cc4faa3a7521ad430e085 | 73 | ex | Elixir | lib/yourbot_web/views/user_registration_view.ex | ConnorRigby/yourbot | eea40e63b0f93963ed14b7efab9ecbe898ab11dd | [
"Apache-2.0"
] | 3 | 2021-11-08T15:19:19.000Z | 2021-11-11T03:18:35.000Z | lib/yourbot_web/views/user_registration_view.ex | ConnorRigby/yourbot | eea40e63b0f93963ed14b7efab9ecbe898ab11dd | [
"Apache-2.0"
] | null | null | null | lib/yourbot_web/views/user_registration_view.ex | ConnorRigby/yourbot | eea40e63b0f93963ed14b7efab9ecbe898ab11dd | [
"Apache-2.0"
] | null | null | null | defmodule YourBotWeb.UserRegistrationView do
use YourBotWeb, :view
end
| 18.25 | 44 | 0.835616 |
1c136316c068536697854c2470a8e23291386ec2 | 576 | exs | Elixir | test/controllers/post_controller_test.exs | synion/tilex | ea29646830efaa89fc47fad347f6e495ff7ce48b | [
"MIT"
] | 1 | 2019-05-28T20:43:28.000Z | 2019-05-28T20:43:28.000Z | test/controllers/post_controller_test.exs | synion/tilex | ea29646830efaa89fc47fad347f6e495ff7ce48b | [
"MIT"
] | 1 | 2019-02-11T23:14:15.000Z | 2019-02-11T23:14:15.000Z | test/controllers/post_controller_test.exs | synion/tilex | ea29646830efaa89fc47fad347f6e495ff7ce48b | [
"MIT"
] | 1 | 2019-12-02T08:59:45.000Z | 2019-12-02T08:59:45.000Z | defmodule Tilex.PostControllerTest do
use TilexWeb.ConnCase
test "lists all entries on index", %{conn: conn} do
conn = get(conn, post_path(conn, :index))
assert html_response(conn, 200) =~ "Today I Learned"
end
test "redirects to root when non-developer visits posts/new path", %{conn: conn} do
con... | 30.315789 | 85 | 0.692708 |
1c136f37fe522617fc1756af20a148f2b4e63a16 | 2,839 | ex | Elixir | lib/ash/resource/validation/present.ex | kyle5794/ash | 82023da84400366d07001593673d1aaa2a418803 | [
"MIT"
] | null | null | null | lib/ash/resource/validation/present.ex | kyle5794/ash | 82023da84400366d07001593673d1aaa2a418803 | [
"MIT"
] | null | null | null | lib/ash/resource/validation/present.ex | kyle5794/ash | 82023da84400366d07001593673d1aaa2a418803 | [
"MIT"
] | null | null | null | defmodule Ash.Resource.Validation.Present do
@moduledoc false
alias Ash.Error.Changes.{InvalidAttribute, InvalidChanges}
@behaviour Ash.Resource.Validation
@opt_schema [
at_least: [
type: :non_neg_integer,
doc: "At least this many must be present. Defaults to the number of attributes provided"... | 25.809091 | 94 | 0.595632 |
1c13aee94a154b7b4620283c2d51ce76420268a3 | 1,266 | exs | Elixir | payment_api/config/prod.secret.exs | dennisurtubia/elixir-phoenix | 964c6f708e9491e31aafb927a303eec647c03062 | [
"MIT"
] | null | null | null | payment_api/config/prod.secret.exs | dennisurtubia/elixir-phoenix | 964c6f708e9491e31aafb927a303eec647c03062 | [
"MIT"
] | null | null | null | payment_api/config/prod.secret.exs | dennisurtubia/elixir-phoenix | 964c6f708e9491e31aafb927a303eec647c03062 | [
"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.
use Mix.Config
database_url =
System.get_env("DATABASE_URL") ||
raise """
envi... | 30.142857 | 67 | 0.723539 |
1c13c8d0ceea53cbaa6af258d933993728df96fd | 880 | ex | Elixir | clients/logging/lib/google_api/logging/v2/metadata.ex | richiboi1977/elixir-google-api | c495bb3548090eb7a63d12f6fb145ec48aecdc0b | [
"Apache-2.0"
] | 1 | 2021-10-01T09:20:41.000Z | 2021-10-01T09:20:41.000Z | clients/logging/lib/google_api/logging/v2/metadata.ex | richiboi1977/elixir-google-api | c495bb3548090eb7a63d12f6fb145ec48aecdc0b | [
"Apache-2.0"
] | null | null | null | clients/logging/lib/google_api/logging/v2/metadata.ex | richiboi1977/elixir-google-api | c495bb3548090eb7a63d12f6fb145ec48aecdc0b | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 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.592593 | 74 | 0.757955 |
1c13e6a076159906db8bc291a4f740503bea063a | 2,462 | ex | Elixir | clients/content/lib/google_api/content/v2/model/unit_invoice.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/content/lib/google_api/content/v2/model/unit_invoice.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/unit_invoice.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 ... | 40.360656 | 172 | 0.728676 |
1c14031b8c366d5e1d2930749a1189896f088335 | 1,589 | ex | Elixir | apps/web_api/lib/web_api_web.ex | vapordao/staxx | 5110167573e67a91c0865c3265896642ebe4012e | [
"Apache-2.0"
] | null | null | null | apps/web_api/lib/web_api_web.ex | vapordao/staxx | 5110167573e67a91c0865c3265896642ebe4012e | [
"Apache-2.0"
] | null | null | null | apps/web_api/lib/web_api_web.ex | vapordao/staxx | 5110167573e67a91c0865c3265896642ebe4012e | [
"Apache-2.0"
] | null | null | null | defmodule Staxx.WebApiWeb do
@moduledoc """
The entrypoint for defining your web interface, such
as controllers, views, channels and so on.
This can be used in your application as:
use WebApiWeb, :controller
use WebApiWeb, :view
The definitions below will be executed for every view,
controlle... | 23.716418 | 83 | 0.694147 |
1c1421d9aeef0d34e18f7bc3756be2b0cf879098 | 1,054 | ex | Elixir | test/support/conn_case.ex | erwald/hangman | 38c8b6cc45bb3bf9f44d6fe5d33714b40dd78d26 | [
"MIT"
] | 1 | 2016-06-28T10:48:46.000Z | 2016-06-28T10:48:46.000Z | test/support/conn_case.ex | erwald/hangman | 38c8b6cc45bb3bf9f44d6fe5d33714b40dd78d26 | [
"MIT"
] | null | null | null | test/support/conn_case.ex | erwald/hangman | 38c8b6cc45bb3bf9f44d6fe5d33714b40dd78d26 | [
"MIT"
] | null | null | null | defmodule Hangman.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
imports other functionality to make it easier
to build and query models.
Finally, if the test case interacts with the da... | 24.511628 | 66 | 0.703036 |
1c1443612c7e776b28743512dd7de5c4d5b3529e | 1,896 | ex | Elixir | lib/upvest/clientele/wallet.ex | upvestco/upvest-elixir | 4c04e6428e5795b7be88af8e516e604d4ff7009a | [
"MIT"
] | null | null | null | lib/upvest/clientele/wallet.ex | upvestco/upvest-elixir | 4c04e6428e5795b7be88af8e516e604d4ff7009a | [
"MIT"
] | 6 | 2019-09-09T00:47:30.000Z | 2019-10-23T14:45:13.000Z | lib/upvest/clientele/wallet.ex | upvestco/upvest-elixir | 4c04e6428e5795b7be88af8e516e604d4ff7009a | [
"MIT"
] | 1 | 2019-09-16T13:08:06.000Z | 2019-09-16T13:08:06.000Z | defmodule Upvest.Clientele.Wallet do
@moduledoc """
Handles operations related to Wallet
You can:
- Retrieve wallet
- List all wallets
- List specific number of wallets
For more details see `https://doc.upvest.co/reference#kms_wallet_list`
"""
use Upvest.API, [:all, :retrieve, :list]
alias Upvest.... | 29.169231 | 99 | 0.67616 |
1c144dd0375ce8b50dbe34fbc585caa3b472755e | 14,476 | ex | Elixir | samples/Elixir/regex.ex | davidhq/linguist | 59c94ff0bf027e09f59ad312428aaa3ed3624ff7 | [
"MIT"
] | 1 | 2019-10-24T03:37:34.000Z | 2019-10-24T03:37:34.000Z | samples/Elixir/regex.ex | davidhq/linguist | 59c94ff0bf027e09f59ad312428aaa3ed3624ff7 | [
"MIT"
] | 4 | 2021-12-12T01:26:16.000Z | 2021-12-15T14:07:11.000Z | samples/Elixir/regex.ex | davidhq/linguist | 59c94ff0bf027e09f59ad312428aaa3ed3624ff7 | [
"MIT"
] | null | null | null | defmodule Regex do
@moduledoc ~S"""
Provides regular expressions for Elixir.
"""
defstruct re_pattern: nil, source: "", opts: "", re_version: ""
@type t :: %__MODULE__{re_pattern: term, source: binary, opts: binary}
defmodule CompileError do
defexception message: "regex could not be compiled"
end
... | 28.952 | 98 | 0.622962 |
1c1452b310b5eb046fdbe9de7313db192a00ed3b | 172 | ex | Elixir | lib/alumni_book_web/views/link_view.ex | avval-alumni/alumni_book | 17b27da849919312a332aaa3b39ce5c65032f2b4 | [
"MIT"
] | null | null | null | lib/alumni_book_web/views/link_view.ex | avval-alumni/alumni_book | 17b27da849919312a332aaa3b39ce5c65032f2b4 | [
"MIT"
] | null | null | null | lib/alumni_book_web/views/link_view.ex | avval-alumni/alumni_book | 17b27da849919312a332aaa3b39ce5c65032f2b4 | [
"MIT"
] | null | null | null | defmodule AlumniBook.LinkView do
@moduledoc false
use AlumniBookWeb, :view
end
defmodule AlumniBookWeb.LinkView do
@moduledoc false
use AlumniBookWeb, :view
end
| 14.333333 | 35 | 0.784884 |
1c146b21e05c7fd7109b767fa3a45bc3ab017dd2 | 2,679 | ex | Elixir | lib/egghead_scrapper.ex | kerlak/egghead_dl | 385aa9cfcfe6138f16a6d7c017f0f5bc06e12a3a | [
"MIT"
] | 7 | 2019-05-28T13:51:15.000Z | 2019-08-30T13:33:24.000Z | lib/egghead_scrapper.ex | LordOkami/egghead_dl | 385aa9cfcfe6138f16a6d7c017f0f5bc06e12a3a | [
"MIT"
] | null | null | null | lib/egghead_scrapper.ex | LordOkami/egghead_dl | 385aa9cfcfe6138f16a6d7c017f0f5bc06e12a3a | [
"MIT"
] | 1 | 2021-08-09T09:22:02.000Z | 2021-08-09T09:22:02.000Z | import Algolia
defmodule EggheadScrapper do
def output_basepath() do
"output/"
end
def output_extension() do
".mp4"
end
def get_courses(search_filter) do
search_options = [
attributesToRetrieve: ["title","url"],
# hitsPerPage: 15,
hitsP... | 31.151163 | 148 | 0.533035 |
1c146b4f69043e358e479abf4e41cd819d6da91c | 1,402 | ex | Elixir | clients/iam/lib/google_api/iam/v1/model/undelete_role_request.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/iam/lib/google_api/iam/v1/model/undelete_role_request.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/iam/lib/google_api/iam/v1/model/undelete_role_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... | 29.829787 | 101 | 0.733238 |
1c147a158af1988f6165c0da99293855f9404e35 | 2,239 | exs | Elixir | test/conduit_web/controllers/favorite_article_controller_test.exs | rudyyazdi/conduit | 8defa60962482fb81f5093ea5d58b71a160db3c4 | [
"MIT"
] | null | null | null | test/conduit_web/controllers/favorite_article_controller_test.exs | rudyyazdi/conduit | 8defa60962482fb81f5093ea5d58b71a160db3c4 | [
"MIT"
] | 2 | 2022-01-15T02:09:30.000Z | 2022-01-22T10:18:43.000Z | test/conduit_web/controllers/favorite_article_controller_test.exs | rudyyazdi/conduit | 8defa60962482fb81f5093ea5d58b71a160db3c4 | [
"MIT"
] | null | null | null | defmodule ConduitWeb.FavoriteArticleControllerTest do
use ConduitWeb.ConnCase
setup %{conn: conn} do
{:ok, conn: put_req_header(conn, "accept", "application/json")}
end
describe "favorite article" do
setup [
:create_author,
:publish_article,
:register_user,
]
@tag :web
t... | 28.705128 | 116 | 0.555605 |
1c148dc68873bbe8d8100e0366d6460b46ac2206 | 12,684 | ex | Elixir | lib/nostrum/cache/guild_cache.ex | chakrit/nostrum | f0ce383d06bb3bb1786ff0464c95cbd757d38f1f | [
"MIT"
] | null | null | null | lib/nostrum/cache/guild_cache.ex | chakrit/nostrum | f0ce383d06bb3bb1786ff0464c95cbd757d38f1f | [
"MIT"
] | null | null | null | lib/nostrum/cache/guild_cache.ex | chakrit/nostrum | f0ce383d06bb3bb1786ff0464c95cbd757d38f1f | [
"MIT"
] | null | null | null | defmodule Nostrum.Cache.GuildCache do
@table_name :nostrum_guilds
@moduledoc """
Functions for retrieving guild states.
The ETS table name associated with the Guild Cache is `#{@table_name}`.
Besides the methods provided here, you can call any other ETS methods
on the table.
"""
alias Nostrum.Cache.Ma... | 32.523077 | 97 | 0.65082 |
1c149f21a8acc6fec435c041c1a5366399907a04 | 1,228 | exs | Elixir | apps/kv_server/test/kv_server_test.exs | tegon/kv.ex | 2de981b51f5ca7ef32a67743eb4344460677cbe6 | [
"MIT"
] | null | null | null | apps/kv_server/test/kv_server_test.exs | tegon/kv.ex | 2de981b51f5ca7ef32a67743eb4344460677cbe6 | [
"MIT"
] | null | null | null | apps/kv_server/test/kv_server_test.exs | tegon/kv.ex | 2de981b51f5ca7ef32a67743eb4344460677cbe6 | [
"MIT"
] | null | null | null | defmodule KVServerTest do
use ExUnit.Case
@moduletag :capture_log
setup do
Application.stop(:kv)
:ok = Application.start(:kv)
end
setup do
opts = [:binary, packet: :line, active: false]
{:ok, socket} = :gen_tcp.connect('localhost', Application.fetch_env!(:kv_server, :port), opts)
{:ok... | 28.55814 | 98 | 0.64658 |
1c14bd667bf555176c394343f446c1021f112fe5 | 54,195 | ex | Elixir | lib/scenic/scene.ex | nyaray/scenic | a4e495262b74ff34857bfb5ec237e07d82f4871f | [
"Apache-2.0"
] | 1 | 2020-09-20T14:07:49.000Z | 2020-09-20T14:07:49.000Z | lib/scenic/scene.ex | yvc74/scenic | 7a1bca453c4d96b64f2593ccaf2ea0e0b88fcc75 | [
"Apache-2.0"
] | null | null | null | lib/scenic/scene.ex | yvc74/scenic | 7a1bca453c4d96b64f2593ccaf2ea0e0b88fcc75 | [
"Apache-2.0"
] | null | null | null | #
# Created by Boyd Multerer on 2018-04-07.
# Copyright © 2018 Kry10 Industries. All rights reserved.
#
# Taking the learnings from several previous versions.
defmodule Scenic.Scene do
alias Scenic.Graph
alias Scenic.Scene
alias Scenic.ViewPort
alias Scenic.ViewPort.Context
alias Scenic.Primitive
alias S... | 36.348089 | 101 | 0.613138 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.