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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
289e7eefcf918132f55fb6bd5c6dc2ffc0f03d53 | 1,606 | ex | Elixir | test/support/data_case.ex | Hou-Rui/cadet | f9036d76005bf3b267b632dce176067ae1a19f71 | [
"Apache-2.0"
] | null | null | null | test/support/data_case.ex | Hou-Rui/cadet | f9036d76005bf3b267b632dce176067ae1a19f71 | [
"Apache-2.0"
] | 2 | 2020-04-22T09:06:38.000Z | 2020-04-22T09:15:33.000Z | test/support/data_case.ex | Hou-Rui/cadet | f9036d76005bf3b267b632dce176067ae1a19f71 | [
"Apache-2.0"
] | 1 | 2020-06-01T03:26:02.000Z | 2020-06-01T03:26:02.000Z | defmodule Cadet.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 r... | 26.766667 | 87 | 0.680573 |
289ec83e04315390116d61e9fc6b9b185b0834ed | 611 | ex | Elixir | lib/ash/error/query/not_found.ex | kingshalaby1/ash | 1e23199bec1729d66d3fc64de18856525f638549 | [
"MIT"
] | null | null | null | lib/ash/error/query/not_found.ex | kingshalaby1/ash | 1e23199bec1729d66d3fc64de18856525f638549 | [
"MIT"
] | null | null | null | lib/ash/error/query/not_found.ex | kingshalaby1/ash | 1e23199bec1729d66d3fc64de18856525f638549 | [
"MIT"
] | null | null | null | defmodule Ash.Error.Query.NotFound do
@moduledoc "Used when an entity that not exist is referenced"
use Ash.Error
def_ash_error([:primary_key, :resource], class: :invalid)
defimpl Ash.ErrorKind do
def id(_), do: Ecto.UUID.generate()
def code(_), do: "not_found"
def class(_), do: :invalid
de... | 22.62963 | 63 | 0.630115 |
289edcdb6ec91a2801dd14d7d6009004c561be1f | 457 | ex | Elixir | lib/radiator/media/attachment.ex | optikfluffel/radiator | b1a1b966296fa6bf123e3a2455009ff52099ace6 | [
"MIT"
] | 1 | 2021-03-02T16:59:40.000Z | 2021-03-02T16:59:40.000Z | lib/radiator/media/attachment.ex | optikfluffel/radiator | b1a1b966296fa6bf123e3a2455009ff52099ace6 | [
"MIT"
] | null | null | null | lib/radiator/media/attachment.ex | optikfluffel/radiator | b1a1b966296fa6bf123e3a2455009ff52099ace6 | [
"MIT"
] | null | null | null | defmodule Radiator.Media.Attachment do
use Ecto.Schema
import Ecto.Changeset
alias Radiator.Media.AudioFile
@primary_key false
schema "abstract table: attachment" do
belongs_to :audio, AudioFile, primary_key: true
field :subject_id, :integer, primary_key: true
timestamps()
end
def change... | 19.869565 | 58 | 0.724289 |
289ee1c2e14db739ca2c8ae1d733f3bd7b78c139 | 828 | ex | Elixir | lib/squadster/mailer.ex | Squadster/squadster-api | cf04af79317148d7a08c649d5b5d0197722acb7a | [
"MIT"
] | null | null | null | lib/squadster/mailer.ex | Squadster/squadster-api | cf04af79317148d7a08c649d5b5d0197722acb7a | [
"MIT"
] | null | null | null | lib/squadster/mailer.ex | Squadster/squadster-api | cf04af79317148d7a08c649d5b5d0197722acb7a | [
"MIT"
] | null | null | null | defmodule Squadster.Mailer do
@from_email Application.fetch_env!(:squadster, Squadster.Mailer)[:default_from_email]
@test_config domain: Application.fetch_env!(:squadster, Squadster.Mailer)[:mailgun_domain],
key: Application.fetch_env!(:squadster, Squadster.Mailer)[:mailgun_key],
mode... | 37.636364 | 93 | 0.654589 |
289f0879faf570b20e12027e75d4d9bb1d2e6a0c | 488 | ex | Elixir | web/models/event.ex | blacksph3re/alastair3 | d6064e322b8ef5c6eb8da59a080852179a71b9d5 | [
"Apache-2.0"
] | null | null | null | web/models/event.ex | blacksph3re/alastair3 | d6064e322b8ef5c6eb8da59a080852179a71b9d5 | [
"Apache-2.0"
] | null | null | null | web/models/event.ex | blacksph3re/alastair3 | d6064e322b8ef5c6eb8da59a080852179a71b9d5 | [
"Apache-2.0"
] | null | null | null | defmodule Alastair.Event do
use Alastair.Web, :model
@primary_key {:id, :string, []}
@derive {Phoenix.Param, key: :id}
schema "events" do
belongs_to :shop, Alastair.Shop, on_replace: :nilify
has_many :meals, Alastair.Meal
end
@doc """
Builds a changeset based on the `struct` and `params`.
"""... | 22.181818 | 56 | 0.647541 |
289f37c6a46f439575669717ae934f88ad05491f | 583 | exs | Elixir | test/views/error_view_test.exs | danielberkompas/phoenix_ecto_encryption_sample | 1fd0f337eb214cb6a5b7348a70ad27e50968d851 | [
"MIT"
] | 4 | 2015-08-11T04:01:14.000Z | 2019-09-17T04:47:02.000Z | test/views/error_view_test.exs | danielberkompas/phoenix_ecto_encryption_sample | 1fd0f337eb214cb6a5b7348a70ad27e50968d851 | [
"MIT"
] | null | null | null | test/views/error_view_test.exs | danielberkompas/phoenix_ecto_encryption_sample | 1fd0f337eb214cb6a5b7348a70ad27e50968d851 | [
"MIT"
] | null | null | null | defmodule Encryption.ErrorViewTest do
use Encryption.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(Encryption.ErrorView, "404.html", []) ==
"Page not found"
end
test "render 500.... | 26.5 | 68 | 0.684391 |
289f4a1c820b0c4ee24a2e21cb2c3800446a2622 | 75 | ex | Elixir | lib/pixie/transports/long_polling.ex | rdalin82/pixie | add50e2bd7fbd807c7b82cd10a2123828be4c58f | [
"MIT"
] | null | null | null | lib/pixie/transports/long_polling.ex | rdalin82/pixie | add50e2bd7fbd807c7b82cd10a2123828be4c58f | [
"MIT"
] | null | null | null | lib/pixie/transports/long_polling.ex | rdalin82/pixie | add50e2bd7fbd807c7b82cd10a2123828be4c58f | [
"MIT"
] | null | null | null | defmodule Pixie.Transport.LongPolling do
use Pixie.Transport.Default
end
| 18.75 | 40 | 0.84 |
289f4ec0dc87c0d55cafd02a4760f8dfad1d3170 | 86 | exs | Elixir | test/ex_aws_code_pipeline_test.exs | fmcgeough/ex_aws_code_pipeline | b15936beb630e56fee26cccb486b7ec3dfa058b4 | [
"MIT"
] | 1 | 2020-01-12T03:31:03.000Z | 2020-01-12T03:31:03.000Z | test/ex_aws_code_pipeline_test.exs | fmcgeough/ex_aws_code_pipeline | b15936beb630e56fee26cccb486b7ec3dfa058b4 | [
"MIT"
] | null | null | null | test/ex_aws_code_pipeline_test.exs | fmcgeough/ex_aws_code_pipeline | b15936beb630e56fee26cccb486b7ec3dfa058b4 | [
"MIT"
] | null | null | null | defmodule ExAwsCodePipelineTest do
use ExUnit.Case
doctest ExAws.CodePipeline
end
| 17.2 | 34 | 0.837209 |
289f4f08823cb7f4d95f7ba45c93cd4f2a4d7053 | 987 | ex | Elixir | learn/LittleBook/pooly/lib/pooly/server.ex | idfumg/ElixirSynopsis | 74c668d84300812dd41eb18772aecfb89bc7628b | [
"MIT"
] | null | null | null | learn/LittleBook/pooly/lib/pooly/server.ex | idfumg/ElixirSynopsis | 74c668d84300812dd41eb18772aecfb89bc7628b | [
"MIT"
] | null | null | null | learn/LittleBook/pooly/lib/pooly/server.ex | idfumg/ElixirSynopsis | 74c668d84300812dd41eb18772aecfb89bc7628b | [
"MIT"
] | null | null | null | defmodule Pooly.Server do
use GenServer
import Supervisor.Spec
# api
def start_link(pools_config) do
GenServer.start_link(__MODULE__, pools_config, name: __MODULE__)
end
def checkout(pool_name) do
GenServer.call(:"#{pool_name}Server", :checkout)
end
def checkin(pool_name, worker_pid) do
... | 24.675 | 98 | 0.708207 |
289f7a01d10264840e82662ab2ce06563ac1fc25 | 2,716 | exs | Elixir | mix.exs | marcelotto/rdf-ex | 12adce69eb2dbff027cbc83aaaf912067aea1b02 | [
"MIT"
] | 53 | 2017-06-25T22:20:44.000Z | 2020-04-27T17:27:51.000Z | mix.exs | marcelotto/rdf-ex | 12adce69eb2dbff027cbc83aaaf912067aea1b02 | [
"MIT"
] | 7 | 2017-06-25T00:29:11.000Z | 2020-03-11T00:23:47.000Z | mix.exs | marcelotto/rdf-ex | 12adce69eb2dbff027cbc83aaaf912067aea1b02 | [
"MIT"
] | 2 | 2018-01-19T15:48:27.000Z | 2020-03-01T00:29:35.000Z | defmodule RDF.Mixfile do
use Mix.Project
@repo_url "https://github.com/rdf-elixir/rdf-ex"
@version File.read!("VERSION") |> String.trim()
def project do
[
app: :rdf,
version: @version,
elixir: "~> 1.10",
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod... | 23.824561 | 82 | 0.560383 |
289f87cf11674d45cb72686d4bec0321fc2d0fb8 | 3,338 | ex | Elixir | clients/cloud_shell/lib/google_api/cloud_shell/v1/model/operation.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/cloud_shell/lib/google_api/cloud_shell/v1/model/operation.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/cloud_shell/lib/google_api/cloud_shell/v1/model/operation.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 55.633333 | 661 | 0.727382 |
289fa97acf8255eb8accbf43cc52a25b1af3a3d1 | 3,356 | ex | Elixir | clients/remote_build_execution/lib/google_api/remote_build_execution/v2/model/build_bazel_remote_execution_v2_cache_capabilities.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/remote_build_execution/lib/google_api/remote_build_execution/v2/model/build_bazel_remote_execution_v2_cache_capabilities.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/remote_build_execution/lib/google_api/remote_build_execution/v2/model/build_bazel_remote_execution_v2_cache_capabilities.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... | 43.584416 | 216 | 0.760131 |
289fc0239ec96c0275f2cb3a3669821f21697448 | 61 | ex | Elixir | app/lib/rocdev_web/views/layout_view.ex | kylemacey/rocdev | a70e80b9b853803bc9771b7f0ff712b6da27af8f | [
"MIT"
] | 14 | 2017-10-10T19:11:21.000Z | 2019-04-20T20:11:01.000Z | app/lib/rocdev_web/views/layout_view.ex | kylemacey/rocdev | a70e80b9b853803bc9771b7f0ff712b6da27af8f | [
"MIT"
] | 41 | 2017-10-08T03:07:20.000Z | 2018-10-15T12:47:34.000Z | app/lib/rocdev_web/views/layout_view.ex | kylemacey/rocdev | a70e80b9b853803bc9771b7f0ff712b6da27af8f | [
"MIT"
] | 7 | 2017-10-18T10:44:04.000Z | 2019-04-15T20:44:49.000Z | defmodule RocdevWeb.LayoutView do
use RocdevWeb, :view
end
| 15.25 | 33 | 0.803279 |
289feaa32bb720ad165d28332dc41d6717c8fac2 | 61 | ex | Elixir | project/gamenect/web/views/user_view.ex | daemonfire300/learning_phoenix | 0ab0cb1feacda4ec5c0ab0a5324835a150db22ab | [
"MIT"
] | null | null | null | project/gamenect/web/views/user_view.ex | daemonfire300/learning_phoenix | 0ab0cb1feacda4ec5c0ab0a5324835a150db22ab | [
"MIT"
] | null | null | null | project/gamenect/web/views/user_view.ex | daemonfire300/learning_phoenix | 0ab0cb1feacda4ec5c0ab0a5324835a150db22ab | [
"MIT"
] | null | null | null | defmodule Gamenect.UserView do
use Gamenect.Web, :view
end
| 15.25 | 30 | 0.786885 |
28a01afc2a1dcb5f95144a62ed81c93d749f93a3 | 482 | exs | Elixir | test/bus_car/property_test.exs | elbow-jason/bus_car | cd70b9f6b8dd404eb518f642491e0a4430e2d9f9 | [
"MIT"
] | 18 | 2016-09-25T21:36:39.000Z | 2021-02-17T15:09:52.000Z | test/bus_car/property_test.exs | elbow-jason/bus_car | cd70b9f6b8dd404eb518f642491e0a4430e2d9f9 | [
"MIT"
] | 7 | 2016-12-08T05:01:23.000Z | 2018-04-05T08:55:11.000Z | test/bus_car/property_test.exs | elbow-jason/bus_car | cd70b9f6b8dd404eb518f642491e0a4430e2d9f9 | [
"MIT"
] | 1 | 2020-04-24T02:10:15.000Z | 2020-04-24T02:10:15.000Z | defmodule BusCarPropertyTest do
use ExUnit.Case
doctest BusCar.Property
alias BusCar.Property
test "new returns a %Property{} struct" do
assert Property.new(:beef, :cake) == %Property{
name: :beef,
type: :cake,
options: [],
}
end
test "new returns a %Property{} struct with opti... | 22.952381 | 68 | 0.618257 |
28a02257bd1e9d3106b7cf3e0dd0183855ad70e6 | 498 | exs | Elixir | priv/repo/migrations/20160530111051_optimize_downloads_view_indicies.exs | findmypast/hexfmp | 38a50f5e1057833fd98748faac230bf4b9cc26a3 | [
"Apache-2.0"
] | null | null | null | priv/repo/migrations/20160530111051_optimize_downloads_view_indicies.exs | findmypast/hexfmp | 38a50f5e1057833fd98748faac230bf4b9cc26a3 | [
"Apache-2.0"
] | null | null | null | priv/repo/migrations/20160530111051_optimize_downloads_view_indicies.exs | findmypast/hexfmp | 38a50f5e1057833fd98748faac230bf4b9cc26a3 | [
"Apache-2.0"
] | null | null | null | defmodule Hexpm.Repo.Migrations.OptimizeDownloadsViewIndicies do
use Ecto.Migration
def up do
execute "DROP INDEX package_downloads_view_downloads_idx"
execute "CREATE INDEX ON package_downloads (view)"
execute "CREATE INDEX ON package_downloads (downloads DESC NULLS LAST)"
end
def down do
exe... | 31.125 | 75 | 0.785141 |
28a02fdd3bbbade3d230eae25f6777bd9c765f1f | 9,108 | ex | Elixir | lib/cadet_web/controllers/grading_controller.ex | seanlowjk/cadet | 52b55cc0f777cb0d55a78fe1693f762085ab36c2 | [
"Apache-2.0"
] | null | null | null | lib/cadet_web/controllers/grading_controller.ex | seanlowjk/cadet | 52b55cc0f777cb0d55a78fe1693f762085ab36c2 | [
"Apache-2.0"
] | null | null | null | lib/cadet_web/controllers/grading_controller.ex | seanlowjk/cadet | 52b55cc0f777cb0d55a78fe1693f762085ab36c2 | [
"Apache-2.0"
] | null | null | null | defmodule CadetWeb.GradingController do
use CadetWeb, :controller
use PhoenixSwagger
alias Cadet.Assessments
def index(conn, %{"group" => group}) when group in ["true", "false"] do
user = conn.assigns[:current_user]
group = String.to_atom(group)
case Assessments.all_submissions_by_grader_for_ind... | 27.768293 | 142 | 0.571256 |
28a07471871ecb331eb0285e043ac52abddd51e9 | 188 | ex | Elixir | test/support/phoenix/mailer_mock.ex | patrickbiermann/pow | ebc2ac7d6e15961dac4be38091ff75dae0d26554 | [
"MIT"
] | 4 | 2018-05-07T16:37:15.000Z | 2018-07-14T00:44:12.000Z | test/support/phoenix/mailer_mock.ex | patrickbiermann/pow | ebc2ac7d6e15961dac4be38091ff75dae0d26554 | [
"MIT"
] | null | null | null | test/support/phoenix/mailer_mock.ex | patrickbiermann/pow | ebc2ac7d6e15961dac4be38091ff75dae0d26554 | [
"MIT"
] | 1 | 2020-07-13T01:11:17.000Z | 2020-07-13T01:11:17.000Z | defmodule Pow.Test.Phoenix.MailerMock do
@moduledoc false
use Pow.Phoenix.Mailer
def cast(email), do: email
def process(email) do
send(self(), {:mail_mock, email})
end
end
| 17.090909 | 40 | 0.702128 |
28a095d8ffaa0cc219495e79dfe8f8417353cd76 | 84 | exs | Elixir | instrumentation/opentelemetry_redix/config/test.exs | RudolfMan/opentelemetry-erlang-contrib | 44fd2a6871742380dd6adc112f9776cda501ff1f | [
"Apache-2.0"
] | 24 | 2021-05-07T18:37:11.000Z | 2022-03-13T06:21:00.000Z | instrumentation/opentelemetry_redix/config/test.exs | RudolfMan/opentelemetry-erlang-contrib | 44fd2a6871742380dd6adc112f9776cda501ff1f | [
"Apache-2.0"
] | 42 | 2021-05-10T20:19:22.000Z | 2022-03-31T17:48:13.000Z | instrumentation/opentelemetry_redix/config/test.exs | RudolfMan/opentelemetry-erlang-contrib | 44fd2a6871742380dd6adc112f9776cda501ff1f | [
"Apache-2.0"
] | 19 | 2021-08-30T01:33:54.000Z | 2022-03-20T22:01:15.000Z | import Config
config :opentelemetry,
processors: [{:otel_simple_processor, %{}}]
| 16.8 | 45 | 0.738095 |
28a0be678ae8ca35c109b635e9f497a195ff21f7 | 287 | exs | Elixir | farmbot_core/priv/asset/migrations/20200907153510_param_movement_spd_z2.exs | adamswsk/farmbot_os | d177d3b74888c1e7bcbf8f8595818708ee97f73b | [
"MIT"
] | 1 | 2021-08-23T13:36:14.000Z | 2021-08-23T13:36:14.000Z | farmbot_core/priv/asset/migrations/20200907153510_param_movement_spd_z2.exs | adamswsk/farmbot_os | d177d3b74888c1e7bcbf8f8595818708ee97f73b | [
"MIT"
] | null | null | null | farmbot_core/priv/asset/migrations/20200907153510_param_movement_spd_z2.exs | adamswsk/farmbot_os | d177d3b74888c1e7bcbf8f8595818708ee97f73b | [
"MIT"
] | null | null | null | defmodule FarmbotCore.Asset.Repo.Migrations.ParamMovementSpdZ2 do
use Ecto.Migration
def change do
alter table("firmware_configs") do
add(:movement_max_spd_z2, :float)
add(:movement_min_spd_z2, :float)
add(:movement_steps_acc_dec_z2, :float)
end
end
end
| 23.916667 | 65 | 0.731707 |
28a0cd91db110c62e51bfbfaffb8576799459348 | 2,253 | exs | Elixir | config/prod.exs | Gronex/wishlist_manager | be240ebc85a737f31bd64bc913a2c3716827fd26 | [
"MIT"
] | null | null | null | config/prod.exs | Gronex/wishlist_manager | be240ebc85a737f31bd64bc913a2c3716827fd26 | [
"MIT"
] | 7 | 2015-12-30T19:43:10.000Z | 2016-01-04T14:38:38.000Z | config/prod.exs | Gronex/wishlist_manager | be240ebc85a737f31bd64bc913a2c3716827fd26 | [
"MIT"
] | null | null | null | use Mix.Config
# For production, we configure the host to read the PORT
# from the system environment. Therefore, you will need
# to set PORT=80 before running your server.
#
# You should also configure the url host to something
# meaningful, we use this information when generating URLs.
#
# Finally, we also include t... | 34.136364 | 70 | 0.723036 |
28a0f198bd83105f68e21dfbfc60c9ea418fa054 | 2,436 | ex | Elixir | lib/botmodules/logger.ex | cantsin/katakuri | f92c733b86ff8ca6f02a444ca773c25be9585d73 | [
"Apache-2.0"
] | 2 | 2015-04-11T04:30:34.000Z | 2015-04-18T19:12:25.000Z | lib/botmodules/logger.ex | cantsin/katakuri | f92c733b86ff8ca6f02a444ca773c25be9585d73 | [
"Apache-2.0"
] | null | null | null | lib/botmodules/logger.ex | cantsin/katakuri | f92c733b86ff8ca6f02a444ca773c25be9585d73 | [
"Apache-2.0"
] | null | null | null | defmodule BotLogger do
@behaviour BotModule
@moduledoc "Log all messages."
require Logger
def doc, do: @moduledoc
def start() do
LoggerDB.create
end
def process_message(message) do
LoggerDB.write_message(message.raw)
line = format_message(message.raw, message.ts, message.user, message.text... | 26.478261 | 100 | 0.626026 |
28a1288ab416dcbbb7da7cec4f9fc38903cf0b2b | 265 | ex | Elixir | user_api/lib/user_api/repo.ex | uttamk/sip-of-elixr-talk | 08b4f2fddea5c3c60ecb7f646071c2ce0a46dc59 | [
"MIT"
] | null | null | null | user_api/lib/user_api/repo.ex | uttamk/sip-of-elixr-talk | 08b4f2fddea5c3c60ecb7f646071c2ce0a46dc59 | [
"MIT"
] | null | null | null | user_api/lib/user_api/repo.ex | uttamk/sip-of-elixr-talk | 08b4f2fddea5c3c60ecb7f646071c2ce0a46dc59 | [
"MIT"
] | null | null | null | defmodule UserApi.Repo do
use Ecto.Repo, otp_app: :user_api
@doc """
Dynamically loads the repository url from the
DATABASE_URL environment variable.
"""
def init(_, opts) do
{:ok, Keyword.put(opts, :url, System.get_env("DATABASE_URL"))}
end
end
| 22.083333 | 66 | 0.698113 |
28a15f4985937036eb9cf9b860a944df2554e7a0 | 1,174 | exs | Elixir | mix.exs | arjan/pixels | 8d61c6dec8d59b7e7055460bf115859881bad6ad | [
"MIT"
] | 12 | 2019-08-22T13:11:43.000Z | 2021-11-04T18:13:36.000Z | mix.exs | arjan/pixels | 8d61c6dec8d59b7e7055460bf115859881bad6ad | [
"MIT"
] | null | null | null | mix.exs | arjan/pixels | 8d61c6dec8d59b7e7055460bf115859881bad6ad | [
"MIT"
] | null | null | null | defmodule Pixels.MixProject do
use Mix.Project
def project do
[
app: :pixels,
compilers: [:elixir_make] ++ Mix.compilers(),
version: File.read!("VERSION"),
elixir: "~> 1.7",
elixirc_options: [warnings_as_errors: true],
description: description(),
package: package(),
... | 24.458333 | 93 | 0.588586 |
28a161b9a2968ebb0df2c63abe6162cbe72e394a | 1,392 | exs | Elixir | config/dev.exs | brandnewio/brandnew-mail-tracker | 0f991c82bd95be6a8efaee949b459b77a1e7245d | [
"MIT"
] | null | null | null | config/dev.exs | brandnewio/brandnew-mail-tracker | 0f991c82bd95be6a8efaee949b459b77a1e7245d | [
"MIT"
] | null | null | null | config/dev.exs | brandnewio/brandnew-mail-tracker | 0f991c82bd95be6a8efaee949b459b77a1e7245d | [
"MIT"
] | null | null | null | use Mix.Config
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with brunch.io to recompile .js and .css sources.
config :brandnew_mail_tracker, BrandnewMailTracker.Endp... | 31.636364 | 73 | 0.71408 |
28a17f1912874df32c905d50bed0110815a70af7 | 2,813 | exs | Elixir | mix.exs | beorc/commanded | 1330585f2c7397e1d4dd5d4789fea85a43ab031b | [
"MIT"
] | null | null | null | mix.exs | beorc/commanded | 1330585f2c7397e1d4dd5d4789fea85a43ab031b | [
"MIT"
] | null | null | null | mix.exs | beorc/commanded | 1330585f2c7397e1d4dd5d4789fea85a43ab031b | [
"MIT"
] | null | null | null | defmodule Commanded.Mixfile do
use Mix.Project
@version "0.18.1"
def project do
[
app: :commanded,
version: @version,
elixir: "~> 1.6",
elixirc_paths: elixirc_paths(Mix.env()),
deps: deps(),
description: description(),
docs: docs(),
package: package(),
b... | 23.247934 | 86 | 0.542481 |
28a18be8809efac0519d5931bd1b735904337dfc | 2,807 | ex | Elixir | clients/redis/lib/google_api/redis/v1beta1/model/google_cloud_common_operation_metadata.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/redis/lib/google_api/redis/v1beta1/model/google_cloud_common_operation_metadata.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/redis/lib/google_api/redis/v1beta1/model/google_cloud_common_operation_metadata.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... | 41.279412 | 134 | 0.701104 |
28a19b61fb1ea88907c4a386d82af107c8954aaf | 1,228 | exs | Elixir | mix.exs | mspanc/openstax_tempauth | d0e1648c39d708776f334c401f109af5e3cd4fe4 | [
"MIT"
] | null | null | null | mix.exs | mspanc/openstax_tempauth | d0e1648c39d708776f334c401f109af5e3cd4fe4 | [
"MIT"
] | null | null | null | mix.exs | mspanc/openstax_tempauth | d0e1648c39d708776f334c401f109af5e3cd4fe4 | [
"MIT"
] | null | null | null | defmodule OpenStax.TempAuth.Mixfile do
use Mix.Project
def project do
[app: :openstax_tempauth,
version: "0.1.0",
elixir: "~> 1.3",
elixirc_paths: elixirc_paths(Mix.env),
description: "OpenStack TempAuth client",
maintainers: ["Marcin Lewandowski"],
licenses: ["MIT"],
name: "... | 24.56 | 69 | 0.581433 |
28a1b9c4d247e55bedd1c99303c162f60a9ceca8 | 1,316 | exs | Elixir | apps/ewallet_api/test/ewallet_api/v1/channels/address_channel_test.exs | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | 1 | 2018-12-07T06:21:21.000Z | 2018-12-07T06:21:21.000Z | apps/ewallet_api/test/ewallet_api/v1/channels/address_channel_test.exs | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | null | null | null | apps/ewallet_api/test/ewallet_api/v1/channels/address_channel_test.exs | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | null | null | null | # credo:disable-for-this-file
defmodule EWalletAPI.V1.WalletChannelTest do
use EWalletAPI.ChannelCase, async: false
alias EWalletAPI.V1.WalletChannel
describe "join/3 as client" do
test "joins the channel with authenticated user and owned address" do
user = insert(:user)
wallet = insert(:wallet, ... | 28.608696 | 73 | 0.6269 |
28a1c2564fc16b7b86503d123c704a525c96d985 | 8,097 | ex | Elixir | lib/oban/config.ex | Lgdev07/oban | ed1d7aa1f15ee06a96da1f4e9cd3074c5805e447 | [
"Apache-2.0"
] | 2,219 | 2019-04-10T01:50:19.000Z | 2022-03-30T11:20:01.000Z | lib/oban/config.ex | Lgdev07/oban | ed1d7aa1f15ee06a96da1f4e9cd3074c5805e447 | [
"Apache-2.0"
] | 532 | 2019-05-16T00:22:28.000Z | 2022-03-31T19:04:02.000Z | lib/oban/config.ex | Lgdev07/oban | ed1d7aa1f15ee06a96da1f4e9cd3074c5805e447 | [
"Apache-2.0"
] | 230 | 2019-05-15T14:15:18.000Z | 2022-03-23T22:59:43.000Z | defmodule Oban.Config do
@moduledoc """
The Config struct validates and encapsulates Oban instance state.
Options passed to `Oban.start_link/1` are validated and stored in a config struct. Internal
modules and plugins are always passed the config with a `:conf` key.
"""
@type t :: %__MODULE__{
c... | 30.43985 | 116 | 0.622453 |
28a1db065fbc5d29bc645b1f8ab6a225eeee805b | 762 | ex | Elixir | lib/makeup/styles/html/pygments/vs.ex | kipcole9/makeup | dff1bd2e3d6b2938138ebaea5771821bf7c4e45a | [
"BSD-2-Clause"
] | 13 | 2018-09-19T21:03:29.000Z | 2022-01-27T04:06:32.000Z | deps/makeup/lib/makeup/styles/html/pygments/vs.ex | mwindholtz/limbo | 84da57c72ddb2f1dd78bf2992410268c5ad1b2d4 | [
"Apache-2.0"
] | 1 | 2020-05-26T04:16:57.000Z | 2020-05-26T04:16:57.000Z | deps/makeup/lib/makeup/styles/html/pygments/vs.ex | mwindholtz/limbo | 84da57c72ddb2f1dd78bf2992410268c5ad1b2d4 | [
"Apache-2.0"
] | 3 | 2020-05-21T04:32:08.000Z | 2021-07-28T05:14:01.000Z |
defmodule Makeup.Styles.HTML.VisualStudioStyle do
@moduledoc false
@styles %{
:error => "border:#FF0000",
:keyword => "#0000ff",
:keyword_type => "#2b91af",
:name_class => "#2b91af",
:string => "#a31515",
:operator_word => "#0000ff",
:comment => "#008000",
:comment_preproc => "#000... | 22.411765 | 49 | 0.606299 |
28a1ddf4afb41e2ef9b1792b0fabf280d3ab1df5 | 1,557 | exs | Elixir | mix.exs | parndt/git_ecto_sandbox | 11855a7fc5cdf63594c8fdf2a5baa704d8badb0a | [
"MIT"
] | null | null | null | mix.exs | parndt/git_ecto_sandbox | 11855a7fc5cdf63594c8fdf2a5baa704d8badb0a | [
"MIT"
] | null | null | null | mix.exs | parndt/git_ecto_sandbox | 11855a7fc5cdf63594c8fdf2a5baa704d8badb0a | [
"MIT"
] | null | null | null | defmodule GitEctoSandbox.Mixfile do
use Mix.Project
def project do
[app: :git_ecto_sandbox,
version: "0.0.1",
elixir: "~> 1.0",
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix, :gettext] ++ Mix.compilers,
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :p... | 29.377358 | 78 | 0.614001 |
28a1f514765ea5629c9801e930ea620bb2844836 | 1,035 | ex | Elixir | lib/surface_boostrap4/container/col.ex | tschmidleithner/surface_bootstrap4 | 1968905a01d451639b52f58ab0e397aba1f938e6 | [
"MIT"
] | 10 | 2020-06-14T01:40:19.000Z | 2020-11-17T05:39:37.000Z | lib/surface_boostrap4/container/col.ex | tschmidleithner/surface_bootstrap4 | 1968905a01d451639b52f58ab0e397aba1f938e6 | [
"MIT"
] | null | null | null | lib/surface_boostrap4/container/col.ex | tschmidleithner/surface_bootstrap4 | 1968905a01d451639b52f58ab0e397aba1f938e6 | [
"MIT"
] | 1 | 2020-06-14T01:40:22.000Z | 2020-06-14T01:40:22.000Z | defmodule SurfaceBootstrap4.Container.Col do
@moduledoc """
Bootstrap4 col for the containers row component.
"""
use Surface.Component
@doc "The size of column"
prop size, :integer
@doc "Responsive behaviour for xs of the column"
prop xs, :integer
@doc "Responsive behaviour for sm of the column"
... | 19.528302 | 50 | 0.581643 |
28a1fe5dc461c31891353aa0bfa12402c196d393 | 3,937 | exs | Elixir | test/run_workflows/parallel_steps_with_notification_test.exs | nipierre/ex_step_flow | 4345ee57bd4e5eb79138df68d10579ba1b9ec6a1 | [
"MIT"
] | null | null | null | test/run_workflows/parallel_steps_with_notification_test.exs | nipierre/ex_step_flow | 4345ee57bd4e5eb79138df68d10579ba1b9ec6a1 | [
"MIT"
] | null | null | null | test/run_workflows/parallel_steps_with_notification_test.exs | nipierre/ex_step_flow | 4345ee57bd4e5eb79138df68d10579ba1b9ec6a1 | [
"MIT"
] | null | null | null | defmodule StepFlow.RunWorkflows.ParallelStepsWithNotificationTest do
use ExUnit.Case
use Plug.Test
alias Ecto.Adapters.SQL.Sandbox
alias StepFlow.Step
doctest StepFlow
setup do
# Explicitly get a connection before each test
:ok = Sandbox.checkout(StepFlow.Repo)
{_conn, channel} = StepFlow.Hel... | 26.601351 | 108 | 0.549403 |
28a208d577d660b5a687a46a896226536e54fb7b | 123 | exs | Elixir | ListsAndRecursion1.exs | itsjustsoda/programming-elixir-solutions | cbad3edcf6bb52cce0d26a6252d3e30fe9bec28f | [
"Unlicense"
] | null | null | null | ListsAndRecursion1.exs | itsjustsoda/programming-elixir-solutions | cbad3edcf6bb52cce0d26a6252d3e30fe9bec28f | [
"Unlicense"
] | null | null | null | ListsAndRecursion1.exs | itsjustsoda/programming-elixir-solutions | cbad3edcf6bb52cce0d26a6252d3e30fe9bec28f | [
"Unlicense"
] | null | null | null | defmodule MapSum do
def mapsum([], _), do: 0
def mapsum([head | tail], func), do: mapsum(tail, func) + func.(head)
end
| 24.6 | 71 | 0.634146 |
28a20e48a4d4d7906ff64212670994f52918638e | 435 | ex | Elixir | lib/roger/partition/global/state_persister/stub.ex | jnylen/roger | 074338eceae4783221088e8b235a635452708ef1 | [
"MIT"
] | null | null | null | lib/roger/partition/global/state_persister/stub.ex | jnylen/roger | 074338eceae4783221088e8b235a635452708ef1 | [
"MIT"
] | null | null | null | lib/roger/partition/global/state_persister/stub.ex | jnylen/roger | 074338eceae4783221088e8b235a635452708ef1 | [
"MIT"
] | null | null | null | defmodule Roger.Partition.Global.StatePersister.Stub do
@moduledoc """
Stub module for `Roger.Partition.Global` state persistence.
This is the default implementation, which **does not** persist any
global partition state.
"""
alias Roger.Partition.Global.StatePersister
@behaviour StatePersister
def... | 19.772727 | 68 | 0.71954 |
28a211ef6b1f55e3c8c15aa35f77c3d43fc4e2ac | 709 | ex | Elixir | apps/sample_web/lib/sample_web/gettext.ex | ODYLIGHT/sample_umbrella | 8b4ef00c732e24ccec6d98555d7542dff10a73f9 | [
"MIT"
] | 1 | 2020-02-20T11:27:02.000Z | 2020-02-20T11:27:02.000Z | apps/sample_web/lib/sample_web/gettext.ex | ODYLIGHT/sample_umbrella | 8b4ef00c732e24ccec6d98555d7542dff10a73f9 | [
"MIT"
] | 1 | 2020-04-30T00:58:40.000Z | 2020-04-30T00:58:40.000Z | apps/sample_web/lib/sample_web/gettext.ex | ODYLIGHT/sample_umbrella | 8b4ef00c732e24ccec6d98555d7542dff10a73f9 | [
"MIT"
] | null | null | null | defmodule SampleWeb.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 SampleWeb.Gettext
# Simple translation
gettext "Here is the... | 28.36 | 72 | 0.681241 |
28a2304f2fa46271417a70f037ebc11c4ed62521 | 23,425 | exs | Elixir | test/fun_with_flags/store/persistent/ecto_test.exs | elpikel/fun_with_flags | 1c409e8872eb7e370f827a0d471082aeff09cf33 | [
"MIT"
] | 736 | 2017-02-16T12:55:57.000Z | 2022-03-31T19:50:43.000Z | test/fun_with_flags/store/persistent/ecto_test.exs | elpikel/fun_with_flags | 1c409e8872eb7e370f827a0d471082aeff09cf33 | [
"MIT"
] | 86 | 2017-04-02T16:42:33.000Z | 2022-03-25T01:07:13.000Z | test/fun_with_flags/store/persistent/ecto_test.exs | elpikel/fun_with_flags | 1c409e8872eb7e370f827a0d471082aeff09cf33 | [
"MIT"
] | 63 | 2017-04-28T23:38:15.000Z | 2022-03-28T12:49:02.000Z | defmodule FunWithFlags.Store.Persistent.EctoTest do
use FunWithFlags.TestCase, async: false
import FunWithFlags.TestUtils
alias FunWithFlags.Store.Persistent.Ecto, as: PersiEcto
alias FunWithFlags.{Flag, Gate}
@moduletag :ecto_persistence
describe "put(flag_name, %Gate{}), for boolean, actor and group g... | 45.048077 | 181 | 0.649648 |
28a2369064f5e5d92e4296c139bb34a8d6303047 | 2,969 | ex | Elixir | lib/codes/codes_i49.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_i49.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_i49.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | defmodule IcdCode.ICDCode.Codes_I49 do
alias IcdCode.ICDCode
def _I4901 do
%ICDCode{full_code: "I4901",
category_code: "I49",
short_code: "01",
full_name: "Ventricular fibrillation",
short_name: "Ventricular fibrillation",
category_name: "Ventricular fibrillation... | 30.608247 | 63 | 0.611654 |
28a243233e512b477f252dc964b80c840dcee862 | 3,111 | ex | Elixir | clients/fusion_tables/lib/google_api/fusion_tables/v2/model/polygon_style.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/fusion_tables/lib/google_api/fusion_tables/v2/model/polygon_style.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/fusion_tables/lib/google_api/fusion_tables/v2/model/polygon_style.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 45.086957 | 171 | 0.734812 |
28a24f84f1826f7e477ea48998b8d4ea3f2d80a0 | 17,289 | ex | Elixir | lib/logger/lib/logger.ex | nurugger07/elixir | c859e49199bb24190656e6d3acb6cf35fe70e8bb | [
"Apache-2.0"
] | 1 | 2019-06-11T20:22:20.000Z | 2019-06-11T20:22:20.000Z | lib/logger/lib/logger.ex | nurugger07/elixir | c859e49199bb24190656e6d3acb6cf35fe70e8bb | [
"Apache-2.0"
] | null | null | null | lib/logger/lib/logger.ex | nurugger07/elixir | c859e49199bb24190656e6d3acb6cf35fe70e8bb | [
"Apache-2.0"
] | null | null | null | defmodule Logger do
@moduledoc ~S"""
A logger for Elixir applications.
It includes many features:
* Provides debug, info, warn and error levels.
* Supports multiple backends which are automatically
supervised when plugged into Logger.
* Formats and truncates messages on the client
to a... | 31.039497 | 117 | 0.685927 |
28a25ade37012d7c6f36770367b254a325ccefe5 | 215 | ex | Elixir | punctuationNumbersSubstitute.ex | while0pass/rus11 | 9921d0c88ca78e75844e9ad09c397be307f7f48f | [
"CC0-1.0"
] | 3 | 2017-09-24T10:43:00.000Z | 2018-02-22T01:03:41.000Z | punctuationNumbersSubstitute.ex | while0pass/rus11 | 9921d0c88ca78e75844e9ad09c397be307f7f48f | [
"CC0-1.0"
] | null | null | null | punctuationNumbersSubstitute.ex | while0pass/rus11 | 9921d0c88ca78e75844e9ad09c397be307f7f48f | [
"CC0-1.0"
] | null | null | null | s/\([^']\)\,/\1\|/ge
s/\s*11\]/…/&
s/\s*11/… /&
s/\[0\|0\]//&
s/\s*0\s*/ /&
s/\s*1\s*/, /&
s/\s*2\s*/; /&
s/\s*3\s*/: /&
s/\s*4\s*/ — /&
s/\s*5\s*/\-/&
s/\s*6\s*/? /&
s/\s*7\s*/! /&
s/\s*8\s*/. /&
s/\[\s*\|\s*\]//&
| 14.333333 | 20 | 0.251163 |
28a2993e85d51e786e2c27e014b9e696e43035d2 | 636 | ex | Elixir | Microsoft.Azure.Management.Network/lib/microsoft/azure/management/network/model/virtual_network_connection_gateway_reference.ex | chgeuer/ex_microsoft_azure_management | 99cd9f7f2ff1fdbe69ca5bac55b6e2af91ba3603 | [
"Apache-2.0"
] | 4 | 2018-09-29T03:43:15.000Z | 2021-04-01T18:30:46.000Z | Microsoft.Azure.Management.Network/lib/microsoft/azure/management/network/model/virtual_network_connection_gateway_reference.ex | chgeuer/ex_microsoft_azure_management | 99cd9f7f2ff1fdbe69ca5bac55b6e2af91ba3603 | [
"Apache-2.0"
] | null | null | null | Microsoft.Azure.Management.Network/lib/microsoft/azure/management/network/model/virtual_network_connection_gateway_reference.ex | chgeuer/ex_microsoft_azure_management | 99cd9f7f2ff1fdbe69ca5bac55b6e2af91ba3603 | [
"Apache-2.0"
] | null | null | null | # NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
defmodule Microsoft.Azure.Management.Network.Model.VirtualNetworkConnectionGatewayReference do
@moduledoc """
A reference to VirtualNetworkGateway or Lo... | 24.461538 | 113 | 0.75 |
28a2b43465d4fdfe3cc7ee55b199224cc15300f3 | 3,150 | exs | Elixir | test/hexpm/web/plugs/plug_attack_test.exs | findmypast/hexfmp | 38a50f5e1057833fd98748faac230bf4b9cc26a3 | [
"Apache-2.0"
] | null | null | null | test/hexpm/web/plugs/plug_attack_test.exs | findmypast/hexfmp | 38a50f5e1057833fd98748faac230bf4b9cc26a3 | [
"Apache-2.0"
] | null | null | null | test/hexpm/web/plugs/plug_attack_test.exs | findmypast/hexfmp | 38a50f5e1057833fd98748faac230bf4b9cc26a3 | [
"Apache-2.0"
] | null | null | null | defmodule Hexpm.Web.Plugs.AttackTest do
use ExUnit.Case, async: true
use Plug.Test
defmodule Hello do
# need to use Phoenix.Controller because RateLimit.Plug uses ErrorView
# which in turn requres `plug :accepts`
use Phoenix.Controller
plug :accepts, ~w(json)
plug Hexpm.Web.Plugs.Attack
... | 29.716981 | 109 | 0.628254 |
28a2f42ef77871ddfded03d254cde9af76360261 | 10,305 | ex | Elixir | lib/hexpm/repository/package.ex | hubertpompecki/hexpm | 5cd4208b07a70bf2e1490930bf5d577978793b50 | [
"Apache-2.0"
] | null | null | null | lib/hexpm/repository/package.ex | hubertpompecki/hexpm | 5cd4208b07a70bf2e1490930bf5d577978793b50 | [
"Apache-2.0"
] | null | null | null | lib/hexpm/repository/package.ex | hubertpompecki/hexpm | 5cd4208b07a70bf2e1490930bf5d577978793b50 | [
"Apache-2.0"
] | null | null | null | defmodule Hexpm.Repository.Package do
use Hexpm.Web, :schema
import Ecto.Query, only: [from: 2, where: 3]
@derive {Hexpm.Web.Stale, assocs: [:releases, :owners, :downloads]}
@derive {Phoenix.Param, key: :name}
schema "packages" do
field :name, :string
field :docs_updated_at, :naive_datetime
fiel... | 25.89196 | 113 | 0.617952 |
28a2f79c46229e56b4a84f0088d7fc0f31bf8811 | 190 | ex | Elixir | elixir/plug/lib/plug.ex | rizalgowandy/web-frameworks | 4e47cdb672d06ea63e351e5567345ec2654d8d7f | [
"MIT"
] | 3 | 2020-08-31T20:38:34.000Z | 2021-04-09T16:38:16.000Z | elixir/plug/lib/plug.ex | armando170A/web-fraworks | 7efa26caa29edb93cc475e5b5b5942a815090f75 | [
"MIT"
] | 443 | 2019-10-17T20:33:38.000Z | 2021-08-03T03:20:46.000Z | elixir/plug/lib/plug.ex | armando170A/web-fraworks | 7efa26caa29edb93cc475e5b5b5942a815090f75 | [
"MIT"
] | 2 | 2020-11-30T11:52:43.000Z | 2021-03-22T07:05:29.000Z | defmodule MyPlug do
@moduledoc """
Documentation for Plug.
"""
@doc """
Hello world.
## Examples
iex> Plug.hello
:world
"""
def hello do
:world
end
end
| 10 | 25 | 0.552632 |
28a2faaea07a630c40f708f5e2b21cacf7b56d66 | 1,553 | ex | Elixir | clients/spanner/lib/google_api/spanner/v1/model/partition.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/spanner/lib/google_api/spanner/v1/model/partition.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/spanner/lib/google_api/spanner/v1/model/partition.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 33.042553 | 225 | 0.746297 |
28a312ca875ed143c83ede9efb001300fd188bad | 3,712 | exs | Elixir | test/mixer_bin/audio_mixer_bin_test.exs | membraneframework/membrane_audio_mix_plugin | 4edcac7f5a0e7b015161a311eafd13016cd107cc | [
"Apache-2.0"
] | null | null | null | test/mixer_bin/audio_mixer_bin_test.exs | membraneframework/membrane_audio_mix_plugin | 4edcac7f5a0e7b015161a311eafd13016cd107cc | [
"Apache-2.0"
] | 1 | 2021-12-07T12:04:15.000Z | 2021-12-07T12:04:15.000Z | test/mixer_bin/audio_mixer_bin_test.exs | membraneframework/membrane_audio_mixer_plugin | 4edcac7f5a0e7b015161a311eafd13016cd107cc | [
"Apache-2.0"
] | null | null | null | defmodule Membrane.AudioMixerBinTest do
@moduledoc false
use ExUnit.Case
use Membrane.Pipeline
import Membrane.Testing.Assertions
alias Membrane.Caps.Audio.Raw
alias Membrane.Testing.Pipeline
@input_path_1 Path.expand("../fixtures/mixer_bin/input-1.raw", __DIR__)
@input_path_2 Path.expand("../fixtur... | 26.898551 | 82 | 0.609106 |
28a33583e782f4184380b4d918369b372dd001d9 | 3,316 | ex | Elixir | lib/assent/http_adapter/httpc.ex | lmeier/assent | 3f5a5d340eb1833cd9d6ada9d7e3056b7e3d4f41 | [
"MIT"
] | 160 | 2019-09-25T01:07:16.000Z | 2022-03-08T00:45:16.000Z | lib/assent/http_adapter/httpc.ex | lmeier/assent | 3f5a5d340eb1833cd9d6ada9d7e3056b7e3d4f41 | [
"MIT"
] | 47 | 2019-09-25T00:38:44.000Z | 2022-03-21T17:35:43.000Z | lib/assent/http_adapter/httpc.ex | lmeier/assent | 3f5a5d340eb1833cd9d6ada9d7e3056b7e3d4f41 | [
"MIT"
] | 30 | 2019-10-04T15:58:06.000Z | 2021-12-10T16:43:52.000Z | defmodule Assent.HTTPAdapter.Httpc do
@moduledoc """
HTTP adapter module for making http requests with httpc.
SSL support will automatically be enabled if the `:certifi` and
`:ssl_verify_fun` libraries exists in your project. You can also override
the httpc options by updating the configuration to
`http_ad... | 28.834783 | 107 | 0.668878 |
28a36b6dfc80abafdda821c167e046605c3f9ae3 | 496 | ex | Elixir | lib/deneb/encoding.ex | tyrchen/deneb | 97759b57700816471feabf3fb97676d5e28e2261 | [
"MIT"
] | 4 | 2021-03-07T01:11:30.000Z | 2021-09-03T06:40:48.000Z | lib/deneb/encoding.ex | tyrchen/deneb | 97759b57700816471feabf3fb97676d5e28e2261 | [
"MIT"
] | null | null | null | lib/deneb/encoding.ex | tyrchen/deneb | 97759b57700816471feabf3fb97676d5e28e2261 | [
"MIT"
] | 1 | 2021-05-04T12:06:39.000Z | 2021-05-04T12:06:39.000Z | defmodule Deneb.Encoding do
@moduledoc """
Vega-lite encoding
"""
use TypedStruct
alias Deneb.{Encoding, Utils}
typedstruct do
@typedoc "encoding properties"
field :raw, String.t() | map() | nil, default: nil
end
def new(raw) when is_binary(raw) or is_map(raw) do
%Encoding {
raw: ra... | 20.666667 | 88 | 0.671371 |
28a3751146ad49ed47921cd6daa0412a4a050af0 | 1,234 | ex | Elixir | apps/bus_detective/lib/bus_detective/gtfs/stop_time.ex | bus-detective/bus_detective_ng | ef54684d4f640384bd20a4d5550ff51ab440190b | [
"MIT"
] | 8 | 2018-07-06T14:44:10.000Z | 2021-08-19T17:24:25.000Z | apps/bus_detective/lib/bus_detective/gtfs/stop_time.ex | bus-detective/bus_detective_ng | ef54684d4f640384bd20a4d5550ff51ab440190b | [
"MIT"
] | 12 | 2018-07-15T18:43:04.000Z | 2022-02-10T16:07:47.000Z | apps/bus_detective/lib/bus_detective/gtfs/stop_time.ex | bus-detective/bus_detective_ng | ef54684d4f640384bd20a4d5550ff51ab440190b | [
"MIT"
] | 1 | 2018-07-13T17:30:20.000Z | 2018-07-13T17:30:20.000Z | defmodule BusDetective.GTFS.StopTime do
@moduledoc false
use Ecto.Schema
import Ecto.Changeset
alias BusDetective.GTFS.{Feed, Interval, ProjectedStopTime, Stop, Trip}
schema "stop_times" do
belongs_to(:feed, Feed)
belongs_to(:stop, Stop)
belongs_to(:trip, Trip)
field(:arrival_time, Interva... | 22.851852 | 78 | 0.666937 |
28a388404f9ab8efa59fe3227a4f61f60050105b | 1,182 | exs | Elixir | mix.exs | sontt9/binance.ex | 1b03de3ba6baa4ca2e3e70fe06ccb08c1e69db67 | [
"MIT"
] | null | null | null | mix.exs | sontt9/binance.ex | 1b03de3ba6baa4ca2e3e70fe06ccb08c1e69db67 | [
"MIT"
] | null | null | null | mix.exs | sontt9/binance.ex | 1b03de3ba6baa4ca2e3e70fe06ccb08c1e69db67 | [
"MIT"
] | null | null | null | defmodule Binance.MixProject do
use Mix.Project
def project do
[
app: :binance,
version: "0.9.0",
elixir: "~> 1.7",
start_permanent: Mix.env() == :prod,
description: description(),
package: package(),
deps: deps()
]
end
# Run "mix help compile.app" to learn ab... | 22.301887 | 65 | 0.543993 |
28a38a40e412e985c8d17ccb6d55e4dc97dea202 | 1,292 | ex | Elixir | lib/testing/nonces.ex | ahd-elang/braintree-elixir | c18d37eaff2df8a6d62cc05677b8a03c1d23ad90 | [
"MIT"
] | 108 | 2016-02-03T12:45:03.000Z | 2022-02-19T16:56:36.000Z | lib/testing/nonces.ex | ahd-elang/braintree-elixir | c18d37eaff2df8a6d62cc05677b8a03c1d23ad90 | [
"MIT"
] | 77 | 2016-02-12T15:52:53.000Z | 2022-02-21T14:38:08.000Z | lib/testing/nonces.ex | ahd-elang/braintree-elixir | c18d37eaff2df8a6d62cc05677b8a03c1d23ad90 | [
"MIT"
] | 64 | 2016-04-04T07:07:24.000Z | 2022-03-24T05:42:05.000Z | defmodule Braintree.Testing.Nonces do
@moduledoc """
A collection of static payment nonces provided to simplify testing server
side code.
Nonces are preferred over credit card numbers when testing payment methods.
Only a subset of nonces are defined here, for the full list see the sandbox
documentation abo... | 21.533333 | 102 | 0.740712 |
28a3b92feb34fa3c85e5f6dbdd593e38bd2509b7 | 1,086 | ex | Elixir | apps/admin_api/lib/admin_api/v1/views/activity_log_view.ex | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | apps/admin_api/lib/admin_api/v1/views/activity_log_view.ex | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | apps/admin_api/lib/admin_api/v1/views/activity_log_view.ex | 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... | 35.032258 | 74 | 0.758748 |
28a3c4c78fa5be24558604fca921c3e90fd61781 | 1,149 | exs | Elixir | config/config.exs | kaylenmistry/typed_ecto_schema | 0b6904787a01e382598e9de6bac3d741e2a2b957 | [
"Apache-2.0"
] | 102 | 2019-07-18T19:46:38.000Z | 2022-03-31T18:09:28.000Z | config/config.exs | kaylenmistry/typed_ecto_schema | 0b6904787a01e382598e9de6bac3d741e2a2b957 | [
"Apache-2.0"
] | 19 | 2020-06-04T18:06:08.000Z | 2022-03-31T15:58:01.000Z | config/config.exs | kaylenmistry/typed_ecto_schema | 0b6904787a01e382598e9de6bac3d741e2a2b957 | [
"Apache-2.0"
] | 9 | 2019-07-23T18:12:09.000Z | 2022-03-03T16:24:28.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 paren... | 37.064516 | 73 | 0.75544 |
28a3c9fc830a5b3d3e27dbe6bf58d711da15a678 | 3,186 | ex | Elixir | clients/firebase/lib/google_api/firebase/v1beta1/model/operation.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/firebase/lib/google_api/firebase/v1beta1/model/operation.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/firebase/lib/google_api/firebase/v1beta1/model/operation.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 54 | 543 | 0.722536 |
28a3d6e006fc7755d33de420a5efc51dea596da7 | 1,378 | ex | Elixir | lib/sanbase_web/graphql/schema/types/timeline_event_types.ex | sitedata/sanbase2 | 8da5e44a343288fbc41b68668c6c80ae8547d557 | [
"MIT"
] | null | null | null | lib/sanbase_web/graphql/schema/types/timeline_event_types.ex | sitedata/sanbase2 | 8da5e44a343288fbc41b68668c6c80ae8547d557 | [
"MIT"
] | 1 | 2021-07-24T16:26:03.000Z | 2021-07-24T16:26:03.000Z | lib/sanbase_web/graphql/schema/types/timeline_event_types.ex | sitedata/sanbase2 | 8da5e44a343288fbc41b68668c6c80ae8547d557 | [
"MIT"
] | null | null | null | defmodule SanbaseWeb.Graphql.TimelineEventTypes do
use Absinthe.Schema.Notation
alias SanbaseWeb.Graphql.Resolvers.TimelineEventResolver
enum :order_by_enum do
value(:datetime)
value(:votes)
value(:comments)
value(:author)
end
enum :tag_enum do
value(:by_me)
value(:by_sanfam)
va... | 24.175439 | 64 | 0.687954 |
28a40d279e997095554a12f526bfc542492e6af1 | 1,609 | exs | Elixir | installer/templates/phx_single/config/config.exs | seasharps/phoenix | 95b9383c6a08be4ab1a0c8a7bbf6b6911d888ca1 | [
"MIT"
] | null | null | null | installer/templates/phx_single/config/config.exs | seasharps/phoenix | 95b9383c6a08be4ab1a0c8a7bbf6b6911d888ca1 | [
"MIT"
] | null | null | null | installer/templates/phx_single/config/config.exs | seasharps/phoenix | 95b9383c6a08be4ab1a0c8a7bbf6b6911d888ca1 | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
# General application configuration
import Config<%= if @namespaced? || @ecto || @generators do %>
conf... | 39.243902 | 123 | 0.687383 |
28a4387ebbf41d29fcfe414c19b54d16039a8d08 | 3,237 | ex | Elixir | apps/imposc/lib/core/actions/action_map.ex | FelixDux/impact-oscillator | 4b93975a8f87129777f4e4fe5c2da77fbea41ecf | [
"MIT"
] | null | null | null | apps/imposc/lib/core/actions/action_map.ex | FelixDux/impact-oscillator | 4b93975a8f87129777f4e4fe5c2da77fbea41ecf | [
"MIT"
] | null | null | null | apps/imposc/lib/core/actions/action_map.ex | FelixDux/impact-oscillator | 4b93975a8f87129777f4e4fe5c2da77fbea41ecf | [
"MIT"
] | null | null | null | defmodule ActionMap do
@moduledoc """
Maps action names to names of modules which implement the `:Action` behaviour
"""
@actions %{
"multiplot" => "MultiplotAction",
"scatter" => "ScatterAction",
"ellipse" => "EllipseAction",
"timeseries" => "TimeSeriesAction"
}
@doc """
Lists the availa... | 30.537736 | 95 | 0.590053 |
28a43ffdb8bad0957a505cd75e6d502e11e2755f | 4,554 | ex | Elixir | lib/aws/generated/savingsplans.ex | kw7oe/aws-elixir | 4ba60502dde270c83143822c9964018c7770bad7 | [
"Apache-2.0"
] | 341 | 2018-04-04T19:06:19.000Z | 2022-03-25T21:34:23.000Z | lib/aws/generated/savingsplans.ex | kw7oe/aws-elixir | 4ba60502dde270c83143822c9964018c7770bad7 | [
"Apache-2.0"
] | 82 | 2018-04-04T17:32:33.000Z | 2022-03-24T15:12:04.000Z | lib/aws/generated/savingsplans.ex | kw7oe/aws-elixir | 4ba60502dde270c83143822c9964018c7770bad7 | [
"Apache-2.0"
] | 76 | 2018-04-10T20:19:44.000Z | 2022-03-15T13:49:19.000Z | # WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
# See https://github.com/aws-beam/aws-codegen for more details.
defmodule AWS.Savingsplans do
@moduledoc """
Savings Plans are a pricing model that offer significant savings on AWS usage
(for example, on Amazon EC2 instances).
You commit to a consistent amount of u... | 20.513514 | 93 | 0.596618 |
28a47d799b1a49ec3c80805d5b8ad22f9e47ccc4 | 1,468 | ex | Elixir | lib/secret_santa_web/router.ex | mariaclrd/secret_santa | 18e3ea38647370b45cca2df150b5a839842608f1 | [
"MIT"
] | null | null | null | lib/secret_santa_web/router.ex | mariaclrd/secret_santa | 18e3ea38647370b45cca2df150b5a839842608f1 | [
"MIT"
] | null | null | null | lib/secret_santa_web/router.ex | mariaclrd/secret_santa | 18e3ea38647370b45cca2df150b5a839842608f1 | [
"MIT"
] | null | null | null | defmodule SecretSantaWeb.Router do
use SecretSantaWeb, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_live_flash
plug :put_root_layout, {SecretSantaWeb.LayoutView, :root}
plug :protect_from_forgery
plug :put_secure_browser_headers
end
pipeline :api... | 26.214286 | 70 | 0.701635 |
28a4b164fbd62afcb97860eb3b2a77cd6991e497 | 179 | ex | Elixir | lib/hl7/2.3.1/datatypes/cq.ex | calvinb/elixir-hl7 | 5e953fa11f9184857c0ec4dda8662889f35a6bec | [
"Apache-2.0"
] | null | null | null | lib/hl7/2.3.1/datatypes/cq.ex | calvinb/elixir-hl7 | 5e953fa11f9184857c0ec4dda8662889f35a6bec | [
"Apache-2.0"
] | null | null | null | lib/hl7/2.3.1/datatypes/cq.ex | calvinb/elixir-hl7 | 5e953fa11f9184857c0ec4dda8662889f35a6bec | [
"Apache-2.0"
] | null | null | null | defmodule HL7.V2_3_1.DataTypes.Cq do
@moduledoc false
alias HL7.V2_3_1.{DataTypes}
use HL7.DataType,
fields: [
quantity: nil,
units: DataTypes.Ce
]
end
| 16.272727 | 36 | 0.659218 |
28a4b70cfbab751f2acaa7404608b2da72888d22 | 570 | exs | Elixir | priv/repo/migrations/20170214150520_create_user_credit.exs | neilfulwiler/open_pantry | 4b705f2282c7b2365a784503c9f1bdd34c741798 | [
"MIT"
] | 41 | 2017-10-04T00:33:46.000Z | 2021-04-09T01:33:34.000Z | priv/repo/migrations/20170214150520_create_user_credit.exs | openpantry/open_pantry | 27d898a65dd6f44b325f48d41bc448bb486d9c6f | [
"MIT"
] | 74 | 2017-09-20T03:36:17.000Z | 2018-11-20T20:46:16.000Z | priv/repo/migrations/20170214150520_create_user_credit.exs | neilfulwiler/open_pantry | 4b705f2282c7b2365a784503c9f1bdd34c741798 | [
"MIT"
] | 12 | 2017-10-04T10:02:49.000Z | 2021-12-28T22:57:20.000Z | defmodule OpenPantry.Repo.Migrations.CreateUserCredit do
use Ecto.Migration
def up do
create table(:user_credits) do
add :balance, :integer
add :user_id, references(:users, on_delete: :nothing)
add :credit_type_id, references(:credit_types, on_delete: :nothing)
timestamps()
end
... | 22.8 | 74 | 0.673684 |
28a4bb90047323f80deb3bd4e3d7a7a247f0e83c | 125 | ex | Elixir | lib/soccer_table/standings/standings.ex | thomasbrus/phoenix-live-view-soccer-table | 60bff384a71fb9c08eb22600409e71fe25e54712 | [
"MIT"
] | 1 | 2020-05-09T02:09:21.000Z | 2020-05-09T02:09:21.000Z | lib/soccer_table/standings/standings.ex | thomasbrus/phoenix-live-view-soccer-table | 60bff384a71fb9c08eb22600409e71fe25e54712 | [
"MIT"
] | null | null | null | lib/soccer_table/standings/standings.ex | thomasbrus/phoenix-live-view-soccer-table | 60bff384a71fb9c08eb22600409e71fe25e54712 | [
"MIT"
] | 1 | 2020-07-07T21:38:33.000Z | 2020-07-07T21:38:33.000Z | defmodule SoccerTable.Standings do
alias SoccerTable.Gracenote
defdelegate list(), to: Gracenote, as: :get_standings
end
| 25 | 55 | 0.8 |
28a4d9ed2264c87aef6fdab6bdc8fca74431c27f | 934 | exs | Elixir | mix.exs | netronixgroup/phoenix_pubsub_nats | 6aec86fcc603f77c2fae3c0e9f1a543f6a5f375d | [
"MIT"
] | null | null | null | mix.exs | netronixgroup/phoenix_pubsub_nats | 6aec86fcc603f77c2fae3c0e9f1a543f6a5f375d | [
"MIT"
] | null | null | null | mix.exs | netronixgroup/phoenix_pubsub_nats | 6aec86fcc603f77c2fae3c0e9f1a543f6a5f375d | [
"MIT"
] | null | null | null | defmodule Phoenix.PubSub.Nats.Mixfile do
use Mix.Project
def project do
[app: :phoenix_pubsub_nats,
version: "0.0.1",
elixir: "~> 1.7",
description: description(),
package: package(),
source_url: "https://github.com/mtokioka/phoenix_pubsub_nats",
deps: deps(),
docs: [readme: ... | 23.35 | 77 | 0.592077 |
28a4ebbdf2d3183909353d8dd0af4b6359bff0e9 | 9,186 | exs | Elixir | lib/ex_unit/test/ex_unit/assertions_test.exs | guilleiguaran/elixir | 952052869ff7af0e293d2a7160b1aebc68fc46be | [
"Apache-2.0"
] | 1 | 2017-09-09T20:59:04.000Z | 2017-09-09T20:59:04.000Z | lib/ex_unit/test/ex_unit/assertions_test.exs | guilleiguaran/elixir | 952052869ff7af0e293d2a7160b1aebc68fc46be | [
"Apache-2.0"
] | null | null | null | lib/ex_unit/test/ex_unit/assertions_test.exs | guilleiguaran/elixir | 952052869ff7af0e293d2a7160b1aebc68fc46be | [
"Apache-2.0"
] | null | null | null | Code.require_file "../test_helper.exs", __DIR__
defmodule ExUnit.AssertionsTest.Value do
def tuple, do: { 2, 1 }
def happy?, do: false
def sad?, do: true
end
alias ExUnit.AssertionsTest.Value
defmodule ExUnit.AssertionsTest do
use ExUnit.Case, async: true
test "assert with true value" do
true = assert... | 26.022663 | 137 | 0.644786 |
28a50b3bbe20f3822ae51d9acdec4a2fdd4c5305 | 5,568 | ex | Elixir | lib/event_store/storage/appender.ex | scudelletti/eventstore | 9f795d45f1a8ca4c72d0614df24586dcb2ecfa12 | [
"MIT"
] | null | null | null | lib/event_store/storage/appender.ex | scudelletti/eventstore | 9f795d45f1a8ca4c72d0614df24586dcb2ecfa12 | [
"MIT"
] | null | null | null | lib/event_store/storage/appender.ex | scudelletti/eventstore | 9f795d45f1a8ca4c72d0614df24586dcb2ecfa12 | [
"MIT"
] | null | null | null | defmodule EventStore.Storage.Appender do
@moduledoc false
require Logger
alias EventStore.RecordedEvent
alias EventStore.Sql.Statements
@all_stream_id 0
@doc """
Append the given list of events to storage.
Events are inserted atomically in batches of 1,000 within a single
transaction. This is due... | 27.029126 | 98 | 0.608118 |
28a50d990425cf085ddef15346d87e31c12713bb | 811 | exs | Elixir | bundlex.exs | membraneframework/shmex | 0850ae2b561336a42c76458489e8c21596cdd807 | [
"Apache-2.0"
] | 5 | 2019-04-23T03:58:33.000Z | 2020-04-10T06:08:07.000Z | bundlex.exs | membraneframework/shmex | 0850ae2b561336a42c76458489e8c21596cdd807 | [
"Apache-2.0"
] | 3 | 2020-03-02T17:16:45.000Z | 2021-05-25T10:52:46.000Z | bundlex.exs | membraneframework/shmex | 0850ae2b561336a42c76458489e8c21596cdd807 | [
"Apache-2.0"
] | null | null | null | defmodule Shmex.BundlexProject do
use Bundlex.Project
def project do
[
natives: natives(),
libs: libs()
]
end
defp natives() do
[
shmex: [
interface: :nif,
deps: [shmex: :shmex, bunch_native: :bunch],
sources: ["shmex.c"]
]
]
end
defp libs()... | 18.860465 | 68 | 0.480888 |
28a50dc13b5fea987a7d66198fdcd238d39ea735 | 220 | ex | Elixir | lib/towel.ex | carmaproject/towel | 471953af77efa675beaa5055e24e7ae645d565c8 | [
"MIT"
] | 85 | 2015-07-27T16:59:41.000Z | 2021-12-22T08:20:23.000Z | lib/towel.ex | carmaproject/towel | 471953af77efa675beaa5055e24e7ae645d565c8 | [
"MIT"
] | 3 | 2018-05-11T20:49:22.000Z | 2020-11-02T20:46:33.000Z | lib/towel.ex | carmaproject/towel | 471953af77efa675beaa5055e24e7ae645d565c8 | [
"MIT"
] | 9 | 2015-08-20T19:30:34.000Z | 2021-11-07T13:44:56.000Z | defmodule Towel do
defmacro __using__(_opts) do
quote do
import Monad
import Functor
import Result, except: [wrap: 1, unwrap: 1]
import Maybe, except: [wrap: 1, unwrap: 1]
end
end
end
| 20 | 49 | 0.631818 |
28a51926b0c91b1ddbc4a74279eab998de5d9feb | 909 | exs | Elixir | priv/repo/seeds.exs | fstromback/bitpal | 2c50e6700d7383b4f025b3734ba37257c69ce47e | [
"BSD-3-Clause-Clear"
] | null | null | null | priv/repo/seeds.exs | fstromback/bitpal | 2c50e6700d7383b4f025b3734ba37257c69ce47e | [
"BSD-3-Clause-Clear"
] | null | null | null | priv/repo/seeds.exs | fstromback/bitpal | 2c50e6700d7383b4f025b3734ba37257c69ce47e | [
"BSD-3-Clause-Clear"
] | 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:
#
# BitPal.Repo.insert!(%BitPal.SomeSchema{})
#
# We recommend using the bang functions (`insert!`, `update!`
# and so on) as they will f... | 26.735294 | 61 | 0.708471 |
28a51f8c641bf615c2c994741a793c353a4b8097 | 376 | ex | Elixir | gallows/lib/gallows_web/views/error_view.ex | wronfim/hangman_game | c4dc4b9f122e773fe87ac4dc88206b792c1b239e | [
"MIT"
] | null | null | null | gallows/lib/gallows_web/views/error_view.ex | wronfim/hangman_game | c4dc4b9f122e773fe87ac4dc88206b792c1b239e | [
"MIT"
] | null | null | null | gallows/lib/gallows_web/views/error_view.ex | wronfim/hangman_game | c4dc4b9f122e773fe87ac4dc88206b792c1b239e | [
"MIT"
] | null | null | null | defmodule GallowsWeb.ErrorView do
use GallowsWeb, :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(_templat... | 20.888889 | 47 | 0.702128 |
28a5368e07a6f4c5bf82c990381cc5d732dde210 | 4,467 | ex | Elixir | lib/todo.ex | TecnoSigma/elixir-todo | 9621028f79c9415ee2be15c9d0b635736b873d38 | [
"MIT"
] | null | null | null | lib/todo.ex | TecnoSigma/elixir-todo | 9621028f79c9415ee2be15c9d0b635736b873d38 | [
"MIT"
] | null | null | null | lib/todo.ex | TecnoSigma/elixir-todo | 9621028f79c9415ee2be15c9d0b635736b873d38 | [
"MIT"
] | null | null | null | defmodule TODO do
@moduledoc File.read!(__DIR__ <> "/../README.md")
def config_default(:persist), do: false
def config_default(:print), do: :overdue
def config(key) do
case Application.get_env(:todo, key) do
nil -> config_default(key)
x -> x
end
end
def validate_print_conf(nil), do: :... | 27.072727 | 87 | 0.630848 |
28a56ae8fbbfbe8c54e1ef54d55f57887d6bb641 | 515 | ex | Elixir | lib/absinthe/blueprint/input/boolean.ex | maartenvanvliet/absinthe | ebe820717200f53756e225b3dffbfefe924a94d3 | [
"MIT"
] | null | null | null | lib/absinthe/blueprint/input/boolean.ex | maartenvanvliet/absinthe | ebe820717200f53756e225b3dffbfefe924a94d3 | [
"MIT"
] | 2 | 2018-08-02T13:35:38.000Z | 2018-08-02T13:36:42.000Z | lib/absinthe/blueprint/input/boolean.ex | jlgeering/absinthe | a3dbc29640d613928398626ad75a8f03203a1720 | [
"MIT"
] | null | null | null | defmodule Absinthe.Blueprint.Input.Boolean do
@moduledoc false
alias Absinthe.{Blueprint, Phase}
@enforce_keys [:value]
defstruct [
:value,
:source_location,
# Added by phases
flags: %{},
schema_node: nil,
errors: []
]
@type t :: %__MODULE__{
value: true | false,
... | 21.458333 | 65 | 0.6 |
28a57591a32bde98fb618b7c3c9cd4b373bfd5f0 | 483 | ex | Elixir | phoenix/pfu/lib/pfu_web/views/error_view.ex | cenezaraujo/unifor_prog_funcional | 08b5d75c535b10b7dca8ac26efc1dba14fe2a4f1 | [
"Apache-2.0"
] | null | null | null | phoenix/pfu/lib/pfu_web/views/error_view.ex | cenezaraujo/unifor_prog_funcional | 08b5d75c535b10b7dca8ac26efc1dba14fe2a4f1 | [
"Apache-2.0"
] | null | null | null | phoenix/pfu/lib/pfu_web/views/error_view.ex | cenezaraujo/unifor_prog_funcional | 08b5d75c535b10b7dca8ac26efc1dba14fe2a4f1 | [
"Apache-2.0"
] | null | null | null | defmodule PfuWeb.ErrorView do
use PfuWeb, :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 template name. For ex... | 28.411765 | 61 | 0.730849 |
28a578319a84bad19c3b979b248494a44ed717ce | 538 | ex | Elixir | lib/paris_traffic_analysis/sensor_locations_reader.ex | maximilientyc/paris-traffic-analysis | 99372941c27cfe1e81f2f804d26267933babc82e | [
"Apache-2.0"
] | null | null | null | lib/paris_traffic_analysis/sensor_locations_reader.ex | maximilientyc/paris-traffic-analysis | 99372941c27cfe1e81f2f804d26267933babc82e | [
"Apache-2.0"
] | null | null | null | lib/paris_traffic_analysis/sensor_locations_reader.ex | maximilientyc/paris-traffic-analysis | 99372941c27cfe1e81f2f804d26267933babc82e | [
"Apache-2.0"
] | null | null | null | defmodule ParisTrafficAnalysis.SensorLocationReader do
@csv_file_path Path.join(:code.priv_dir(:paris_traffic_analysis), "referentiel-comptages-routiers.csv")
def read do
read_as_map fn([a, b, c, d, e , f]) ->
%{
object_id: a,
id_arc: b,
id_arc_tra: c,
shape_len: d,
... | 21.52 | 105 | 0.596654 |
28a5a59350a39485709486e0b0bf94e2e39d8a40 | 1,215 | exs | Elixir | mix.exs | stoft/ueberauth_slack | 525594c870f959aba67acc759d5c1a588ee75e9e | [
"MIT"
] | null | null | null | mix.exs | stoft/ueberauth_slack | 525594c870f959aba67acc759d5c1a588ee75e9e | [
"MIT"
] | null | null | null | mix.exs | stoft/ueberauth_slack | 525594c870f959aba67acc759d5c1a588ee75e9e | [
"MIT"
] | null | null | null | defmodule UeberauthSlack.Mixfile do
use Mix.Project
@version "0.5.0"
def project do
[app: :ueberauth_slack,
version: @version,
name: "Ueberauth Slack",
package: package(),
elixir: "~> 1.3",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
source_url: "h... | 23.365385 | 70 | 0.587654 |
28a5a6f4619566fb0bf4722c9f6c2bb1ba6d4bf8 | 1,868 | ex | Elixir | lib/dingo_web.ex | madclaws/Dingo | f277671b7e0a33c6b9a181f1444175f1171e9ce6 | [
"MIT"
] | null | null | null | lib/dingo_web.ex | madclaws/Dingo | f277671b7e0a33c6b9a181f1444175f1171e9ce6 | [
"MIT"
] | null | null | null | lib/dingo_web.ex | madclaws/Dingo | f277671b7e0a33c6b9a181f1444175f1171e9ce6 | [
"MIT"
] | null | null | null | defmodule DingoWeb 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 DingoWeb, :controller
use DingoWeb, :view
The definitions below will be executed for every view,
controller, etc, s... | 22.780488 | 76 | 0.681478 |
28a5b83c92c841c976115feb7fbbe915e74d8c6c | 2,344 | ex | Elixir | clients/cloud_functions/lib/google_api/cloud_functions/v1/model/status.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/cloud_functions/lib/google_api/cloud_functions/v1/model/status.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/cloud_functions/lib/google_api/cloud_functions/v1/model/status.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 44.226415 | 427 | 0.721416 |
28a5ce77b0386e7781c816ade51bb1cc2860adda | 2,418 | ex | Elixir | clients/games/lib/google_api/games/v1/model/event_update_response.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/games/lib/google_api/games/v1/model/event_update_response.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/games/lib/google_api/games/v1/model/event_update_response.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 43.178571 | 167 | 0.733251 |
28a6002f7e343d26e22f94f160898ca17ad85466 | 94 | exs | Elixir | alcarin_api/.formatter.exs | alcarin-org/alcarin-elixir | a04d4e043790a7773745e0fba7098e1c06362896 | [
"MIT"
] | null | null | null | alcarin_api/.formatter.exs | alcarin-org/alcarin-elixir | a04d4e043790a7773745e0fba7098e1c06362896 | [
"MIT"
] | 3 | 2018-05-26T10:36:22.000Z | 2018-05-26T13:48:36.000Z | alcarin_api/.formatter.exs | alcarin-org/alcarin-elixir | a04d4e043790a7773745e0fba7098e1c06362896 | [
"MIT"
] | null | null | null | [
inputs: ["mix.exs", "{config}/**/*.{ex,exs}", "apps/*/{lib,test,config}/**/*.{ex,exs}"]
]
| 23.5 | 89 | 0.478723 |
28a61bc0d0c89ab8986535ccfca51908942d12e2 | 76 | ex | Elixir | Elixir/HelloWorld.ex | rish246/HelloWorld | ce4075fddbebfa36fbae181b82ddb43d994ffe3d | [
"MIT"
] | 48 | 2021-01-16T19:50:43.000Z | 2021-11-27T10:40:39.000Z | Elixir/HelloWorld.ex | rish246/HelloWorld | ce4075fddbebfa36fbae181b82ddb43d994ffe3d | [
"MIT"
] | 33 | 2021-03-02T23:28:41.000Z | 2022-02-19T11:02:11.000Z | Elixir/HelloWorld.ex | rish246/HelloWorld | ce4075fddbebfa36fbae181b82ddb43d994ffe3d | [
"MIT"
] | 31 | 2021-01-17T07:27:10.000Z | 2022-02-18T20:36:53.000Z | defmodule Hello do
def main do
IO.puts "Hello, World!"
end
end
| 12.666667 | 28 | 0.618421 |
28a64c55472c0da839707e19d86ff85e544a06a9 | 609 | ex | Elixir | apps/core/lib/core/schema/test_step.ex | michaeljguarino/forge | 50ee583ecb4aad5dee4ef08fce29a8eaed1a0824 | [
"Apache-2.0"
] | null | null | null | apps/core/lib/core/schema/test_step.ex | michaeljguarino/forge | 50ee583ecb4aad5dee4ef08fce29a8eaed1a0824 | [
"Apache-2.0"
] | 2 | 2019-12-13T23:55:50.000Z | 2019-12-17T05:49:58.000Z | apps/core/lib/core/schema/test_step.ex | michaeljguarino/chartmart | a34c949cc29d6a1ab91c04c5e4f797e6f0daabfc | [
"Apache-2.0"
] | null | null | null | defmodule Core.Schema.TestStep do
use Piazza.Ecto.Schema
use Arc.Ecto.Schema
alias Core.Schema.Test
schema "test_steps" do
field :name, :string
field :description, :string
field :status, Test.Status
field :logs, Core.Storage.Type
belongs_to :test, Test
timestamps()
... | 22.555556 | 58 | 0.65353 |
28a6634380748f028ca46ea4a7e6432118d38f9c | 1,872 | ex | Elixir | apps/opentelemetry_api/lib/open_telemetry/meter.ex | robashton/opentelemetry-erlang | b473a3d46727ea5a9463b410d9c50bfad314d64f | [
"Apache-2.0"
] | null | null | null | apps/opentelemetry_api/lib/open_telemetry/meter.ex | robashton/opentelemetry-erlang | b473a3d46727ea5a9463b410d9c50bfad314d64f | [
"Apache-2.0"
] | null | null | null | apps/opentelemetry_api/lib/open_telemetry/meter.ex | robashton/opentelemetry-erlang | b473a3d46727ea5a9463b410d9c50bfad314d64f | [
"Apache-2.0"
] | null | null | null | defmodule OpenTelemetry.Meter do
@moduledoc """
require OpenTelemetry.ValueRecorder
require OpenTelemetry.Counter
require OpenTelemetry.Meter
OpenTelemetry.register_application_meter(Your.Application)
OpenTelemetry.Meter.new_instruments([OpenTelemetry.ValueRecorder.instrument("some.la... | 26.366197 | 98 | 0.674679 |
28a6688627c3b6af249485fab3e9fc50d798b20c | 2,929 | ex | Elixir | lib/geometry/capsule.ex | crertel/elixir_rigid_physics | 059f121d5504b7b8fed22aa907503d9e9fd8ac1d | [
"Apache-2.0"
] | 6 | 2019-05-23T19:57:26.000Z | 2021-06-14T16:52:53.000Z | lib/geometry/capsule.ex | crertel/elixir_rigid_physics | 059f121d5504b7b8fed22aa907503d9e9fd8ac1d | [
"Apache-2.0"
] | 10 | 2019-06-21T22:09:39.000Z | 2019-07-10T04:16:12.000Z | lib/geometry/capsule.ex | crertel/elixir_rigid_physics | 059f121d5504b7b8fed22aa907503d9e9fd8ac1d | [
"Apache-2.0"
] | 1 | 2021-01-09T01:58:55.000Z | 2021-01-09T01:58:55.000Z | defmodule ElixirRigidPhysics.Geometry.Capsule do
@moduledoc """
Capsule geometry module.
[Capsules](https://en.wikipedia.org/wiki/Capsule_(geometry)) are cylinders capped with hemispheres, with two dimensions:
* `axial_length` -- the length of the cylinder (not including hemispheres)
* `cap_radius` -- the r... | 33.284091 | 125 | 0.67395 |
28a67708eb06d2d633d7ad3afbb0a5cbbdbde0ef | 1,142 | ex | Elixir | webrtc/videoroom_advanced/lib/videoroom_web/peer_channel.ex | geometerio/membrane_demo | 9a3255199af66353716e935b1efd0ba04dec242f | [
"Apache-2.0"
] | 84 | 2020-08-01T14:57:29.000Z | 2022-03-27T13:28:23.000Z | webrtc/videoroom_advanced/lib/videoroom_web/peer_channel.ex | geometerio/membrane_demo | 9a3255199af66353716e935b1efd0ba04dec242f | [
"Apache-2.0"
] | 75 | 2020-08-24T08:01:53.000Z | 2022-03-17T10:41:22.000Z | webrtc/videoroom_advanced/lib/videoroom_web/peer_channel.ex | geometerio/membrane_demo | 9a3255199af66353716e935b1efd0ba04dec242f | [
"Apache-2.0"
] | 17 | 2020-09-15T21:04:23.000Z | 2022-03-31T07:43:48.000Z | defmodule VideoRoomWeb.PeerChannel do
use Phoenix.Channel
require Logger
@impl true
def join("room:" <> room_id, _params, socket) do
case :global.whereis_name(room_id) do
:undefined -> Videoroom.Room.start(name: {:global, room_id})
pid -> {:ok, pid}
end
|> case do
{:ok, room} ->
... | 25.377778 | 95 | 0.603327 |
28a678a11c95eeac97d6849419e16b8692cfdf6b | 1,125 | exs | Elixir | config/config.exs | madawei2699/git2pdf | e8d471c7694e559ffd8de610ebc7a659cfb6763c | [
"MIT"
] | 3 | 2019-01-21T12:20:25.000Z | 2019-01-24T09:17:29.000Z | config/config.exs | bmpi-dev/git2pdf | e8d471c7694e559ffd8de610ebc7a659cfb6763c | [
"MIT"
] | null | null | null | config/config.exs | bmpi-dev/git2pdf | e8d471c7694e559ffd8de610ebc7a659cfb6763c | [
"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.290323 | 73 | 0.750222 |
28a6830887d341e2d2b4ffe1dceb04dc0e40e0eb | 333 | ex | Elixir | lib/xgps/driver/generic.ex | gmcintire/xgps | 56cf4c83dfc05aa22b1d7b7d1d2456cf5acfa7a2 | [
"MIT"
] | null | null | null | lib/xgps/driver/generic.ex | gmcintire/xgps | 56cf4c83dfc05aa22b1d7b7d1d2456cf5acfa7a2 | [
"MIT"
] | null | null | null | lib/xgps/driver/generic.ex | gmcintire/xgps | 56cf4c83dfc05aa22b1d7b7d1d2456cf5acfa7a2 | [
"MIT"
] | null | null | null | defmodule XGPS.Driver.Generic do
@moduledoc """
Generic driver for XGPS
"""
alias Circuits.UART
def init(%{pid: pid, port_name: port_name} = state) do
:ok = UART.configure(pid, framing: {UART.Framing.Line, separator: "\r\n"})
:ok = UART.open(pid, port_name, speed: 9600, active: true)
{:ok, stat... | 22.2 | 78 | 0.651652 |
28a68e1b6973d7f5cd010d7fbc0e626bda677514 | 1,524 | ex | Elixir | high-school-sweetheart/lib/high_school_sweetheart.ex | quatauta/exercism-elixir | 3635610f25111f2afd3bb748e86f9b478ec239b0 | [
"MIT"
] | 1 | 2022-01-23T20:34:09.000Z | 2022-01-23T20:34:09.000Z | high-school-sweetheart/lib/high_school_sweetheart.ex | quatauta/exercism-elixir | 3635610f25111f2afd3bb748e86f9b478ec239b0 | [
"MIT"
] | null | null | null | high-school-sweetheart/lib/high_school_sweetheart.ex | quatauta/exercism-elixir | 3635610f25111f2afd3bb748e86f9b478ec239b0 | [
"MIT"
] | null | null | null | defmodule HighSchoolSweetheart do
@moduledoc false
@spec first_letter(String.t()) :: String.grapheme() | nil
def first_letter(name) do
name |> String.trim() |> String.first()
end
@spec initial(String.t()) :: String.t()
def initial(name) do
initial = name |> first_letter |> String.upcase()
"#{i... | 24.983607 | 59 | 0.284121 |
28a697b5d82b8702f0ac534fb21604f8a882baf9 | 4,201 | exs | Elixir | test/ex_json_schema/schema_test.exs | edenlabllc/nex_json_schema | f7445a1da1f470b2876e9ee28965e675c54e74c2 | [
"MIT"
] | 3 | 2016-10-25T12:10:00.000Z | 2020-11-06T21:33:23.000Z | test/ex_json_schema/schema_test.exs | edenlabllc/nex_json_schema | f7445a1da1f470b2876e9ee28965e675c54e74c2 | [
"MIT"
] | 12 | 2017-05-31T17:23:16.000Z | 2020-10-21T00:58:45.000Z | test/ex_json_schema/schema_test.exs | edenlabllc/nex_json_schema | f7445a1da1f470b2876e9ee28965e675c54e74c2 | [
"MIT"
] | 4 | 2018-06-18T23:37:53.000Z | 2020-07-08T13:03:20.000Z | defmodule NExJsonSchema.SchemaTest do
use ExUnit.Case, async: true
import NExJsonSchema.Schema, only: [resolve: 1, get_ref_schema: 2]
test "fails when trying to resolve something that is not a schema" do
assert_raise FunctionClauseError, fn -> resolve("foo") end
end
test "only resolves draft 4 schemata... | 37.508929 | 142 | 0.649845 |
28a69f7f703c813ffb7728076677fd3659429fce | 2,931 | ex | Elixir | apps/potterhat_utils/test/support/telemetry_test_helper.ex | omisego/potterhat | 47635e5d061c76900bd0e42a19e5dfc2ae8c0253 | [
"Apache-2.0"
] | 6 | 2019-03-28T14:47:41.000Z | 2019-06-25T02:38:06.000Z | apps/potterhat_utils/test/support/telemetry_test_helper.ex | omisego/potterhat | 47635e5d061c76900bd0e42a19e5dfc2ae8c0253 | [
"Apache-2.0"
] | 30 | 2019-05-22T10:08:09.000Z | 2019-08-02T06:37:56.000Z | apps/potterhat_utils/test/support/telemetry_test_helper.ex | omisego/potterhat | 47635e5d061c76900bd0e42a19e5dfc2ae8c0253 | [
"Apache-2.0"
] | null | null | null | # 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... | 28.456311 | 98 | 0.675879 |
28a6c3cfe6b210cea397da07e407f7786b4006cc | 3,543 | ex | Elixir | lib/mix/lib/mix/tasks/local.rebar.ex | xtian/elixir | c680eb1a3992309c272e8f808e15990ea5318d6e | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/tasks/local.rebar.ex | xtian/elixir | c680eb1a3992309c272e8f808e15990ea5318d6e | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/tasks/local.rebar.ex | xtian/elixir | c680eb1a3992309c272e8f808e15990ea5318d6e | [
"Apache-2.0"
] | null | null | null | defmodule Mix.Tasks.Local.Rebar do
use Mix.Task
@rebar2_list_url "/installs/rebar-1.x.csv"
@rebar2_escript_url "/installs/[ELIXIR_VERSION]/rebar-[REBAR_VERSION]"
@rebar3_list_url "/installs/rebar3-1.x.csv"
@rebar3_escript_url "/installs/[ELIXIR_VERSION]/rebar3-[REBAR_VERSION]"
@shortdoc "Instal... | 32.805556 | 85 | 0.651708 |
28a6ceb8f62313ac09918805337acdc91c8b94bb | 2,261 | ex | Elixir | lib/phoenix/live_dashboard/components/usage_card_component.ex | uumo/phoenix_live_dashboard | cd07929341d9dca0f85b58c624c62d63cf7c2f07 | [
"MIT"
] | null | null | null | lib/phoenix/live_dashboard/components/usage_card_component.ex | uumo/phoenix_live_dashboard | cd07929341d9dca0f85b58c624c62d63cf7c2f07 | [
"MIT"
] | null | null | null | lib/phoenix/live_dashboard/components/usage_card_component.ex | uumo/phoenix_live_dashboard | cd07929341d9dca0f85b58c624c62d63cf7c2f07 | [
"MIT"
] | null | null | null | defmodule Phoenix.LiveDashboard.UsageCardComponent do
use Phoenix.LiveDashboard.Web, :live_component
@csp_nonces %{img: nil, script: nil, style: nil}
@impl true
def mount(socket) do
{:ok, socket}
end
def normalize_params(params) do
params
|> validate_required([:usages, :dom_id])
|> valida... | 25.693182 | 189 | 0.528085 |
28a6e2e419db496d24127c0f843abb87eb1d14a7 | 725 | ex | Elixir | backend/lib/backend_web/views/error_view.ex | Szetty/seven_wonders | 77f6f4ff015a8fc481c7edfc87e3cd77b61bc79b | [
"MIT"
] | 1 | 2020-05-28T15:51:47.000Z | 2020-05-28T15:51:47.000Z | backend/lib/backend_web/views/error_view.ex | Szetty/seven_wonders | 77f6f4ff015a8fc481c7edfc87e3cd77b61bc79b | [
"MIT"
] | 35 | 2020-05-23T17:33:56.000Z | 2022-02-14T00:53:06.000Z | backend/lib/backend_web/views/error_view.ex | Szetty/seven_wonders | 77f6f4ff015a8fc481c7edfc87e3cd77b61bc79b | [
"MIT"
] | null | null | null | defmodule BackendWeb.ErrorView do
use BackendWeb, :view
# If you want to customize a particular status code
# for a certain format, you may uncomment below.
# def render("500.json", _assigns) do
# %{errors: %{detail: "Internal Server Error"}}
# end
# By default, Phoenix returns the status message from... | 29 | 83 | 0.681379 |
28a7327e2726f975910b19149c04cfd420df4ba8 | 2,987 | ex | Elixir | lib/nostrum/cache/channel_cache.ex | phereford/nostrum | 3d273671f51d839eedac4d6e52ba9cf70720ac01 | [
"MIT"
] | 1 | 2020-12-08T23:47:17.000Z | 2020-12-08T23:47:17.000Z | lib/nostrum/cache/channel_cache.ex | phereford/nostrum | 3d273671f51d839eedac4d6e52ba9cf70720ac01 | [
"MIT"
] | null | null | null | lib/nostrum/cache/channel_cache.ex | phereford/nostrum | 3d273671f51d839eedac4d6e52ba9cf70720ac01 | [
"MIT"
] | 1 | 2020-09-03T13:55:55.000Z | 2020-09-03T13:55:55.000Z | defmodule Nostrum.Cache.ChannelCache do
@moduledoc """
Cache for channels.
The ETS table name associated with the Channel Cache is `:channels`. Besides the
methods provided below you can call any other ETS methods on the table.
## Example
```elixir
info = :ets.info(:channels)
[..., heir: :none, name: ... | 25.529915 | 93 | 0.611985 |
28a76802af58e36d2383f26110ae4203a419e967 | 11,188 | ex | Elixir | lib/ex_doc/formatter/html/autolink.ex | sunaku/ex_doc | 85f445b0b700a67170cd0b1bf4450da42fb251b0 | [
"Apache-2.0"
] | null | null | null | lib/ex_doc/formatter/html/autolink.ex | sunaku/ex_doc | 85f445b0b700a67170cd0b1bf4450da42fb251b0 | [
"Apache-2.0"
] | null | null | null | lib/ex_doc/formatter/html/autolink.ex | sunaku/ex_doc | 85f445b0b700a67170cd0b1bf4450da42fb251b0 | [
"Apache-2.0"
] | null | null | null | defmodule ExDoc.Formatter.HTML.Autolink do
import ExDoc.Formatter.HTML.Templates, only: [h: 1, enc_h: 1]
@moduledoc """
Conveniences for autolinking locals, types and more.
"""
@elixir_docs "http://elixir-lang.org/docs/stable/"
@erlang_docs "http://www.erlang.org/doc/man/"
@doc """
Receives a list of ... | 31.426966 | 112 | 0.604129 |
28a794090394bc2c63b66d805548c486c0d1ef7a | 3,707 | ex | Elixir | apps/avro/lib/avro/translator.ex | kennyatpillar/hindsight | e90e2150a14218e5d6fdf5874f57eb055fd2dd07 | [
"Apache-2.0"
] | null | null | null | apps/avro/lib/avro/translator.ex | kennyatpillar/hindsight | e90e2150a14218e5d6fdf5874f57eb055fd2dd07 | [
"Apache-2.0"
] | null | null | null | apps/avro/lib/avro/translator.ex | kennyatpillar/hindsight | e90e2150a14218e5d6fdf5874f57eb055fd2dd07 | [
"Apache-2.0"
] | null | null | null | defprotocol Avro.Translator do
@spec type(t) :: :avro.avro_type()
def type(t)
@spec field(t) :: :avro.record_field()
def field(t)
@spec value(t, value :: term) :: {:ok, term} | {:error, term}
def value(t, value)
end
defmodule Avro.Translator.Default do
defmacro __using__(_opts) do
quote do
de... | 23.611465 | 82 | 0.677907 |
28a79dda441c3f74fa7c0745cf804a4e3dff27f7 | 24,239 | ex | Elixir | lib/mix/lib/mix/tasks/test.ex | QuentinDanjou/elixir | 09d59d4d19cb11b96bdc5786c70f6a0ca48050c8 | [
"Apache-2.0"
] | 1 | 2015-11-24T23:39:25.000Z | 2015-11-24T23:39:25.000Z | lib/mix/lib/mix/tasks/test.ex | QuentinDanjou/elixir | 09d59d4d19cb11b96bdc5786c70f6a0ca48050c8 | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/tasks/test.ex | QuentinDanjou/elixir | 09d59d4d19cb11b96bdc5786c70f6a0ca48050c8 | [
"Apache-2.0"
] | null | null | null | defmodule Mix.Tasks.Test do
defmodule Cover do
@default_threshold 90
@moduledoc false
def start(compile_path, opts) do
Mix.shell().info("Cover compiling modules ...")
_ = :cover.stop()
_ = :cover.start()
case :cover.compile_beam_directory(compile_path |> to_charlist) do
... | 32.933424 | 104 | 0.655431 |
28a7b4bb982bc461b9d33f1c2a02d3af5f5c605d | 1,648 | exs | Elixir | test/credo/check/warning/io_inspect_test.exs | jc00ke/credo | bd0be751888dea402af6b16cbb675b53eaa49c83 | [
"MIT"
] | null | null | null | test/credo/check/warning/io_inspect_test.exs | jc00ke/credo | bd0be751888dea402af6b16cbb675b53eaa49c83 | [
"MIT"
] | null | null | null | test/credo/check/warning/io_inspect_test.exs | jc00ke/credo | bd0be751888dea402af6b16cbb675b53eaa49c83 | [
"MIT"
] | null | null | null | defmodule Credo.Check.Warning.IoInspectTest do
use Credo.Test.Case
@described_check Credo.Check.Warning.IoInspect
#
# cases NOT raising issues
#
test "it should NOT report expected code" do
"""
defmodule CredoSampleModule do
def some_function(parameter1, parameter2) do
parameter1 + ... | 20.6 | 50 | 0.628641 |
28a7d9c14ab8fca324d3dfa9613b1f8597ae45b1 | 588 | exs | Elixir | test/views/error_view_test.exs | selfup/hyper_potion | 6e4f3f393e4fd8d7ddf7e0dcbf8021e7dad18823 | [
"MIT"
] | null | null | null | test/views/error_view_test.exs | selfup/hyper_potion | 6e4f3f393e4fd8d7ddf7e0dcbf8021e7dad18823 | [
"MIT"
] | null | null | null | test/views/error_view_test.exs | selfup/hyper_potion | 6e4f3f393e4fd8d7ddf7e0dcbf8021e7dad18823 | [
"MIT"
] | null | null | null | defmodule HyperPotion.ErrorViewTest do
use HyperPotion.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(HyperPotion.ErrorView, "404.html", []) ==
"Page not found"
end
test "render 5... | 26.727273 | 69 | 0.687075 |
28a7fa99fbf1b84a177ee8c1becafe47693de50e | 352 | ex | Elixir | elixir/elixir-otp-primes/lib/primes/slow_calc.ex | marcinbiegun/exercises | 36ad942e8d40d6471136326a3f6d09285bbd90aa | [
"MIT"
] | 1 | 2018-12-11T14:09:14.000Z | 2018-12-11T14:09:14.000Z | elixir/elixir-otp-primes/lib/primes/slow_calc.ex | marcinbiegun/exercises | 36ad942e8d40d6471136326a3f6d09285bbd90aa | [
"MIT"
] | null | null | null | elixir/elixir-otp-primes/lib/primes/slow_calc.ex | marcinbiegun/exercises | 36ad942e8d40d6471136326a3f6d09285bbd90aa | [
"MIT"
] | null | null | null | defmodule Primes.SlowCalc do
alias Primes.Util
def is_prime?(number) when number in [0, 1], do: false
def is_prime?(number) when number == 2, do: true
def is_prime?(number) when number >= 3 do
:timer.sleep(5000)
# What is wrong here? missing NOT condition
2..number-1 |> Enum.any?(& Util.is_whole_... | 25.142857 | 66 | 0.673295 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.