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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9130091540095a5919e2e558fb8859409db8a368 | 917 | exs | Elixir | test/phx_i18n_example_web/integration/language_menu/opening_test.exs | paulfioravanti/phx_liveview_i18n_example | a1813758f4f9ff8d2250c8776cb045a700c69077 | [
"MIT"
] | 9 | 2020-01-18T23:27:36.000Z | 2021-12-22T04:56:14.000Z | test/phx_i18n_example_web/integration/language_menu/opening_test.exs | paulfioravanti/phx_liveview_i18n_example | a1813758f4f9ff8d2250c8776cb045a700c69077 | [
"MIT"
] | 6 | 2020-03-29T10:53:33.000Z | 2021-05-22T12:22:54.000Z | test/phx_i18n_example_web/integration/language_menu/opening_test.exs | paulfioravanti/phx_i18n_example | a1813758f4f9ff8d2250c8776cb045a700c69077 | [
"MIT"
] | null | null | null | defmodule PhxI18nExampleWeb.LanguageMenu.OpeningTest do
use PhxI18nExampleWeb.ConnCase
import Phoenix.ConnTest
import Phoenix.LiveViewTest
require Translations
setup %{conn: conn} do
{:ok, view, _html} = live(conn, "/")
{:ok, [view: view]}
end
describe "default state" do
setup %{view: view} ... | 19.104167 | 57 | 0.557252 |
91301ee798e8bf1bcde9b72a9917f27479c2f809 | 7,395 | ex | Elixir | lib/ink.ex | blueshift-labs/ink | 4967ae9c6b6196e97cab1b9a840b882a6b3c1b88 | [
"MIT"
] | null | null | null | lib/ink.ex | blueshift-labs/ink | 4967ae9c6b6196e97cab1b9a840b882a6b3c1b88 | [
"MIT"
] | null | null | null | lib/ink.ex | blueshift-labs/ink | 4967ae9c6b6196e97cab1b9a840b882a6b3c1b88 | [
"MIT"
] | null | null | null | defmodule Ink do
@moduledoc """
A backend for the Elixir `Logger` that logs JSON and filters your secrets.
## Usage
To use `Ink` for your logging, just configure it as a backend:
config :logger, backends: [Ink]
# optional additional configuration
config :logger, Ink,
name: "your ap... | 28.442308 | 98 | 0.669642 |
91302e4d78e6b223863f3d1ebd807efd89f83d8b | 1,111 | ex | Elixir | recallr/test/support/channel_case.ex | myfoundea/liveview_march_2021 | 8aef6225271bbc8e9985746505d74dc850f295fb | [
"MIT"
] | null | null | null | recallr/test/support/channel_case.ex | myfoundea/liveview_march_2021 | 8aef6225271bbc8e9985746505d74dc850f295fb | [
"MIT"
] | 1 | 2021-03-24T14:49:29.000Z | 2021-03-24T14:49:29.000Z | recallr/test/support/channel_case.ex | myfoundea/liveview_march_2021 | 8aef6225271bbc8e9985746505d74dc850f295fb | [
"MIT"
] | 5 | 2021-03-21T19:45:38.000Z | 2021-03-24T14:53:07.000Z | defmodule RecallrWeb.ChannelCase do
@moduledoc """
This module defines the test case to be used by
channel tests.
Such tests rely on `Phoenix.ChannelTest` and also
import other functionality to make it easier
to build common data structures and query the data layer.
Finally, if the test case interacts w... | 27.097561 | 69 | 0.727273 |
91304cecfa66b36c69ec840061eac91ce2d3d23b | 2,019 | ex | Elixir | lib/credo/check/consistency/unused_variable_names/collector.ex | codeclimate-community/credo | b960a25d604b4499a2577321f9d61b39dc4b0437 | [
"MIT"
] | 4,590 | 2015-09-28T06:01:43.000Z | 2022-03-29T08:48:57.000Z | lib/credo/check/consistency/unused_variable_names/collector.ex | codeclimate-community/credo | b960a25d604b4499a2577321f9d61b39dc4b0437 | [
"MIT"
] | 890 | 2015-11-16T21:07:07.000Z | 2022-03-29T08:52:07.000Z | lib/credo/check/consistency/unused_variable_names/collector.ex | codeclimate-community/credo | b960a25d604b4499a2577321f9d61b39dc4b0437 | [
"MIT"
] | 479 | 2015-11-17T19:42:40.000Z | 2022-03-29T00:09:21.000Z | defmodule Credo.Check.Consistency.UnusedVariableNames.Collector do
@moduledoc false
use Credo.Check.Consistency.Collector
alias Credo.Code
def collect_matches(source_file, _params) do
unused_variable_recorder = &record_unused_variable/2
Code.prewalk(source_file, &traverse(unused_variable_recorder, &... | 30.590909 | 93 | 0.662209 |
91305ceaeed7158ead5f0cd127954ddc4d4f6a41 | 1,865 | ex | Elixir | clients/datastore/lib/google_api/datastore/v1/model/lat_lng.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/datastore/lib/google_api/datastore/v1/model/lat_lng.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/datastore/lib/google_api/datastore/v1/model/lat_lng.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... | 34.537037 | 125 | 0.719035 |
9130a8d072bb5e49115363aa1bbb0b44987f42ec | 501 | ex | Elixir | lib/escala/cms/resolver/option_choice_resolver.ex | vahidabdi/escala_api | 84a4a3ef832180f12c6197683933d8cd0ab35ef4 | [
"MIT"
] | null | null | null | lib/escala/cms/resolver/option_choice_resolver.ex | vahidabdi/escala_api | 84a4a3ef832180f12c6197683933d8cd0ab35ef4 | [
"MIT"
] | null | null | null | lib/escala/cms/resolver/option_choice_resolver.ex | vahidabdi/escala_api | 84a4a3ef832180f12c6197683933d8cd0ab35ef4 | [
"MIT"
] | null | null | null | defmodule Escala.CMS.OptionChoiceResolver do
alias Escala.CMS
def find(%{id: id}, %{context: %{current_user: %{id: _id}}}) do
case CMS.get_option_choice(id) do
nil -> {:error, "یافت نشد"}
o -> {:ok, o}
end
end
def find(_, _) do
{:error, "مجوز ندارید"}
end
def create(%{input: args}... | 22.772727 | 72 | 0.572854 |
9130b3aa44ac5db9d3d1a11a5270a31a31eaec63 | 3,094 | ex | Elixir | apps/omg_jsonrpc/lib/client.ex | Pongch/elixir-omg | 8a33c246898b49cba62b847e0989d9b6c89f5106 | [
"Apache-2.0"
] | null | null | null | apps/omg_jsonrpc/lib/client.ex | Pongch/elixir-omg | 8a33c246898b49cba62b847e0989d9b6c89f5106 | [
"Apache-2.0"
] | null | null | null | apps/omg_jsonrpc/lib/client.ex | Pongch/elixir-omg | 8a33c246898b49cba62b847e0989d9b6c89f5106 | [
"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.976744 | 102 | 0.658048 |
9130b5472f2424331284acc6d44e5acf51f3d677 | 2,710 | exs | Elixir | test/controllers/character_controller_test.exs | Thrashmandicoot/my-first-phoenix-app | 7cdfe34a1d874cbce8dba17e9824a5c91e3b47da | [
"MIT"
] | 1 | 2015-08-24T06:01:51.000Z | 2015-08-24T06:01:51.000Z | test/controllers/character_controller_test.exs | Thrashmandicoot/my-first-phoenix-app | 7cdfe34a1d874cbce8dba17e9824a5c91e3b47da | [
"MIT"
] | null | null | null | test/controllers/character_controller_test.exs | Thrashmandicoot/my-first-phoenix-app | 7cdfe34a1d874cbce8dba17e9824a5c91e3b47da | [
"MIT"
] | null | null | null | defmodule Battletracker.CharacterControllerTest do
use Battletracker.ConnCase
alias Battletracker.Character
@valid_attrs %{alive: true, armor_class: 42, current_hp: 42, initiative: 42, job: "some content", name: "some content", total_hp: 42}
@invalid_attrs %{}
setup do
conn = conn()
{:ok, conn: conn... | 37.638889 | 135 | 0.703321 |
9130c5ea2f031e6d07ae5871f7b853a6e7575327 | 263 | ex | Elixir | lib/glasnost_web/channels/steem_channel.ex | cyberpunk-ventures/glasnost | d6853a191ac2094dbe160953094a6d0c7e6c0778 | [
"MIT"
] | 26 | 2017-03-04T20:07:09.000Z | 2018-08-15T10:16:06.000Z | lib/glasnost_web/channels/steem_channel.ex | cyberpunk-ventures/glasnost | d6853a191ac2094dbe160953094a6d0c7e6c0778 | [
"MIT"
] | 18 | 2017-03-18T13:59:31.000Z | 2018-09-06T10:08:33.000Z | lib/glasnost_web/channels/steem_channel.ex | metachaos-systems/glasnost | d6853a191ac2094dbe160953094a6d0c7e6c0778 | [
"MIT"
] | 9 | 2017-03-16T19:02:04.000Z | 2018-06-02T23:44:52.000Z | defmodule GlasnostWeb.SteemEventsChannel do
use Phoenix.Channel
def join("channel:steem_events", _message, socket) do
{:ok, socket}
end
def join("channel:" <> _private_room_id, _params, _socket) do
{:error, %{reason: "unauthorized"}}
end
end
| 20.230769 | 63 | 0.703422 |
9130cf558384a3937d1b5870d74a78af7a08a6e9 | 638 | exs | Elixir | examples/feature_showcase/mix.exs | fiqus/prexent | e5c24fe1802d7d912dfc3f318e1602b7907930c2 | [
"MIT"
] | 33 | 2019-11-05T15:26:40.000Z | 2022-02-05T16:27:01.000Z | examples/feature_showcase/mix.exs | fiqus/prexent | e5c24fe1802d7d912dfc3f318e1602b7907930c2 | [
"MIT"
] | 8 | 2019-11-05T18:46:04.000Z | 2021-05-11T13:18:08.000Z | examples/feature_showcase/mix.exs | fiqus/prexent | e5c24fe1802d7d912dfc3f318e1602b7907930c2 | [
"MIT"
] | 1 | 2020-05-06T11:38:11.000Z | 2020-05-06T11:38:11.000Z | defmodule FeatureShowcase.MixProject do
use Mix.Project
def project do
[
app: :feature_showcase,
version: "0.1.0",
elixir: "~> 1.5",
start_permanent: Mix.env() == :prod,
deps: deps(),
preferred_cli_env: [prexent: :prod],
config_path: config_path()
]
end
def ap... | 17.243243 | 53 | 0.589342 |
9130d0a557a0bb7089feeff15b4d2b7f6f84c4ef | 1,592 | exs | Elixir | apps/esperanto/test/esperanto/parsers/inline_fenced_code_test.exs | betrybe/esperanto | 65e40c28914397ef77f5d2c4c29001330beba19f | [
"Apache-2.0"
] | 6 | 2021-07-19T20:00:22.000Z | 2021-11-03T03:27:40.000Z | apps/esperanto/test/esperanto/parsers/inline_fenced_code_test.exs | betrybe/esperanto | 65e40c28914397ef77f5d2c4c29001330beba19f | [
"Apache-2.0"
] | null | null | null | apps/esperanto/test/esperanto/parsers/inline_fenced_code_test.exs | betrybe/esperanto | 65e40c28914397ef77f5d2c4c29001330beba19f | [
"Apache-2.0"
] | null | null | null | defmodule Esperanto.Parsers.InlineFencedCodeParseTest do
alias Esperanto.Parsers.InlineFencedCode
alias Esperanto.Parsers.TopLevel
alias Esperanto.Walker
use ExUnit.Case
describe "should_parse/4" do
test "when input matches the regex, Then should_parse has to return true" do
tree = NaryTree.new(Na... | 30.615385 | 99 | 0.60804 |
91313b3fbb84094571040ba2bce45e394848748d | 386 | ex | Elixir | web/views/error_view.ex | deerob4/unit-converter | 288ad35d0e97f0453e893ced717faccbe9710a7b | [
"MIT"
] | null | null | null | web/views/error_view.ex | deerob4/unit-converter | 288ad35d0e97f0453e893ced717faccbe9710a7b | [
"MIT"
] | null | null | null | web/views/error_view.ex | deerob4/unit-converter | 288ad35d0e97f0453e893ced717faccbe9710a7b | [
"MIT"
] | null | null | null | defmodule UnitConverter.ErrorView do
use UnitConverter.Web, :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_foun... | 21.444444 | 47 | 0.707254 |
9131e4f72af489164e125d910e4da3db84a49f17 | 1,117 | exs | Elixir | config/config.exs | palerdot/slog | 544d0cc6e3a4c02951b291eff990d2daf5ce03fd | [
"MIT"
] | 1 | 2018-07-07T15:49:18.000Z | 2018-07-07T15:49:18.000Z | config/config.exs | palerdot/slog | 544d0cc6e3a4c02951b291eff990d2daf5ce03fd | [
"MIT"
] | null | null | null | config/config.exs | palerdot/slog | 544d0cc6e3a4c02951b291eff990d2daf5ce03fd | [
"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.032258 | 73 | 0.750224 |
9131ed3cb56d14d341021d0dde3184c21164bc73 | 4,366 | ex | Elixir | day21/lib/day21.ex | bjorng/advent-of-code-2016 | fb3e40ae2fd52d761f6c0bf55e7634277917ba25 | [
"Apache-2.0"
] | 1 | 2021-05-12T11:30:15.000Z | 2021-05-12T11:30:15.000Z | day21/lib/day21.ex | bjorng/advent-of-code-2016 | fb3e40ae2fd52d761f6c0bf55e7634277917ba25 | [
"Apache-2.0"
] | null | null | null | day21/lib/day21.ex | bjorng/advent-of-code-2016 | fb3e40ae2fd52d761f6c0bf55e7634277917ba25 | [
"Apache-2.0"
] | null | null | null | defmodule Day21 do
def part1(rules, string) do
Parser.parse(rules)
|> Enum.reduce(string, &execute/2)
end
def part2(rules, string) do
Parser.parse(rules)
|> Enum.reverse
|> Enum.map(&reverse_command/1)
|> Enum.reduce(string, &execute/2)
end
defp execute(command, string) do
case c... | 27.632911 | 74 | 0.60055 |
91321eb4859811b89f0c9c053094a961f81de191 | 2,272 | ex | Elixir | lib/sacastats_web/controllers/character_controller.ex | Bentheburrito/sacastats | 4ffcc165b67f03830f4fbf3516ab7ca7a90b0950 | [
"MIT"
] | null | null | null | lib/sacastats_web/controllers/character_controller.ex | Bentheburrito/sacastats | 4ffcc165b67f03830f4fbf3516ab7ca7a90b0950 | [
"MIT"
] | 38 | 2021-07-09T06:13:30.000Z | 2022-03-30T20:22:43.000Z | lib/sacastats_web/controllers/character_controller.ex | Bentheburrito/sacastats | 4ffcc165b67f03830f4fbf3516ab7ca7a90b0950 | [
"MIT"
] | null | null | null | require Logger
defmodule SacaStatsWeb.CharacterController do
use SacaStatsWeb, :controller
alias SacaStatsWeb.CharacterView
def character(conn, %{"character_name" => name, "stat_type" => "lookup"}) do
redirect(conn, to: Routes.character_path(conn, :character, name, "general"))
end
def character(conn, %... | 32.927536 | 94 | 0.637764 |
91322d6155b4e6c999baee7a22642bb4441000cb | 16,653 | exs | Elixir | test/ecto/repo/many_to_many_test.exs | jccf091/ecto | 42d47a6da0711f842e1a0e6724a89b318b9b2144 | [
"Apache-2.0"
] | null | null | null | test/ecto/repo/many_to_many_test.exs | jccf091/ecto | 42d47a6da0711f842e1a0e6724a89b318b9b2144 | [
"Apache-2.0"
] | null | null | null | test/ecto/repo/many_to_many_test.exs | jccf091/ecto | 42d47a6da0711f842e1a0e6724a89b318b9b2144 | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.Repo.ManyToManyTest do
use ExUnit.Case, async: true
import Ecto, only: [put_meta: 2]
require Ecto.TestRepo, as: TestRepo
defmodule SubAssoc do
use Ecto.Schema
schema "sub_assoc" do
field :y, :string
belongs_to :my_assoc, MyAssoc
end
end
defmodule MyAssoc do
use... | 31.780534 | 108 | 0.661022 |
913246e8eb362d55389df14a83687568788fc0df | 2,657 | ex | Elixir | lib/commanded/event.ex | ouven/commanded_messaging | b5870624eeedeb77b4f9eefece3e57202ebd629d | [
"MIT"
] | null | null | null | lib/commanded/event.ex | ouven/commanded_messaging | b5870624eeedeb77b4f9eefece3e57202ebd629d | [
"MIT"
] | null | null | null | lib/commanded/event.ex | ouven/commanded_messaging | b5870624eeedeb77b4f9eefece3e57202ebd629d | [
"MIT"
] | null | null | null | defmodule Commanded.Event do
@moduledoc ~S"""
Creates a domain event structure.
## Options
* `from` - A struct to adapt the keys from.
* `with` - A list of keys to add to the event.
* `drop` - A list of keys to drop from the keys adapted from a struct.
* `version` - An optional ... | 29.853933 | 103 | 0.561536 |
91325f651a8d3ab36d1a45ff50c4889697f5ca38 | 8,769 | exs | Elixir | test/ja_serializer/builder/relationship_test.exs | AgilionApps/json_api_serializers | aa602d9a1f15017cb6a72008dcc50508eb9ed38e | [
"Apache-2.0"
] | 322 | 2016-11-18T22:58:17.000Z | 2022-01-18T15:07:24.000Z | test/ja_serializer/builder/relationship_test.exs | AgilionApps/json_api_serializers | aa602d9a1f15017cb6a72008dcc50508eb9ed38e | [
"Apache-2.0"
] | 150 | 2016-11-17T20:14:51.000Z | 2021-03-12T03:56:57.000Z | test/ja_serializer/builder/relationship_test.exs | AgilionApps/json_api_serializers | aa602d9a1f15017cb6a72008dcc50508eb9ed38e | [
"Apache-2.0"
] | 104 | 2016-11-17T18:02:36.000Z | 2021-04-06T09:52:16.000Z | defmodule JaSerializer.Builder.RelationshipTest do
use ExUnit.Case
alias JaSerializer.Builder.Relationship
alias JaSerializer.Relationship.HasMany
alias JaSerializer.Builder.RelationshipTest.CommentSerializer
defmodule ArticleSerializer do
use JaSerializer
def type, do: "articles"
attributes([:t... | 28.940594 | 151 | 0.634736 |
9132a51037f70c20fe0e6f01f0ec631b24ebe5df | 8,150 | ex | Elixir | lib/ex_unit/lib/ex_unit/case.ex | gabrielelana/elixir | 7e78113f925d438568b7efa8eaded5ae43dce4b1 | [
"Apache-2.0"
] | null | null | null | lib/ex_unit/lib/ex_unit/case.ex | gabrielelana/elixir | 7e78113f925d438568b7efa8eaded5ae43dce4b1 | [
"Apache-2.0"
] | null | null | null | lib/ex_unit/lib/ex_unit/case.ex | gabrielelana/elixir | 7e78113f925d438568b7efa8eaded5ae43dce4b1 | [
"Apache-2.0"
] | null | null | null | defmodule ExUnit.Case do
@moduledoc """
Sets up an ExUnit test case.
This module must be used in other modules as a way to configure
and prepare them for testing.
When used, it accepts the following options:
* :async - configure Elixir to run that specific test case in parallel with
others. Must ... | 28.596491 | 91 | 0.655706 |
9132aaf401565421bfdb2c3f468c3285543ee1d1 | 1,907 | exs | Elixir | clients/life_sciences/mix.exs | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/life_sciences/mix.exs | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/life_sciences/mix.exs | 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... | 28.462687 | 159 | 0.662297 |
9132b7c9afa25f6e567dbaf12e716663e62ef090 | 453 | ex | Elixir | servers/elixir/web/models/measure.ex | fablabjoinville/workshop-iot | 8aad0525765b11eaacbf4f93368f1858f2f7b4da | [
"MIT"
] | 2 | 2018-03-20T11:30:43.000Z | 2019-03-22T13:05:00.000Z | servers/elixir/web/models/measure.ex | fablabjoinville/iot | 8aad0525765b11eaacbf4f93368f1858f2f7b4da | [
"MIT"
] | null | null | null | servers/elixir/web/models/measure.ex | fablabjoinville/iot | 8aad0525765b11eaacbf4f93368f1858f2f7b4da | [
"MIT"
] | null | null | null | defmodule IotServer.Measure do
use IotServer.Web, :model
@types ["humidity", "temperature"]
schema "measures" do
field :value, :float
field :type, :string
timestamps()
end
@doc """
Builds a changeset based on the `struct` and `params`.
"""
def changeset(struct, params \\ %{}) do
stru... | 19.695652 | 56 | 0.626932 |
9132db641e88d89e98e46fd6bb5af3531db3e1c4 | 3,587 | exs | Elixir | test/plug/telemetry_test.exs | rinpatch/plug | 2b7dd9af47aacdc1bd2962a950215fbbfdcb6d5b | [
"Apache-2.0"
] | null | null | null | test/plug/telemetry_test.exs | rinpatch/plug | 2b7dd9af47aacdc1bd2962a950215fbbfdcb6d5b | [
"Apache-2.0"
] | null | null | null | test/plug/telemetry_test.exs | rinpatch/plug | 2b7dd9af47aacdc1bd2962a950215fbbfdcb6d5b | [
"Apache-2.0"
] | null | null | null | Application.ensure_all_started(:telemetry)
defmodule Plug.TelemetryTest do
use ExUnit.Case, async: true
use Plug.Test
defmodule MyPlug do
use Plug.Builder
plug Plug.Telemetry, event_prefix: [:pipeline], extra_options: :hello
plug :send_resp, 200
defp send_resp(conn, status) do
Plug.Conn.... | 27.806202 | 97 | 0.668804 |
913323fb0fafd88b65466a88ab7082f8a3c655ca | 602 | ex | Elixir | lib/ash/error/query/unsupported_predicate.ex | elbow-jason/ash | eb63bc9d4d24187ad07d9892088b4e55ad6258e4 | [
"MIT"
] | null | null | null | lib/ash/error/query/unsupported_predicate.ex | elbow-jason/ash | eb63bc9d4d24187ad07d9892088b4e55ad6258e4 | [
"MIT"
] | null | null | null | lib/ash/error/query/unsupported_predicate.ex | elbow-jason/ash | eb63bc9d4d24187ad07d9892088b4e55ad6258e4 | [
"MIT"
] | null | null | null | defmodule Ash.Error.Query.UnsupportedPredicate do
@moduledoc "Used when the datalayer does not support a provided predicate"
use Ash.Error
def_ash_error([:resource, :predicate, :type], class: :invalid)
defimpl Ash.ErrorKind do
def id(_), do: Ecto.UUID.generate()
def code(_), do: "unsupported_predicat... | 26.173913 | 88 | 0.679402 |
9133376b7410f851af14926e60abd294f75c29db | 730 | exs | Elixir | _build/default/lib/proper/mix.exs | indrasat/art-cycling | 69aa02d4491a7751a660354c7f41f10026c41560 | [
"Apache-2.0"
] | null | null | null | _build/default/lib/proper/mix.exs | indrasat/art-cycling | 69aa02d4491a7751a660354c7f41f10026c41560 | [
"Apache-2.0"
] | null | null | null | _build/default/lib/proper/mix.exs | indrasat/art-cycling | 69aa02d4491a7751a660354c7f41f10026c41560 | [
"Apache-2.0"
] | null | null | null | defmodule Proper.Mixfile do
use Mix.Project
def project do
[app: :proper,
version: "1.2.0",
description: description(),
package: package(),
deps: deps()]
end
defp deps do
[
{:ex_doc, "~> 0.14", only: :dev},
]
end
defp description do
"""
QuickCheck-inspired pr... | 23.548387 | 159 | 0.641096 |
91333a9fd9c17d55addf4e643df54623a88bdf49 | 2,235 | exs | Elixir | test/scrivener/html/seo_test.exs | miseas/scrivener_html | 681326591ee5299ff02821fa1742086be31cdd65 | [
"MIT"
] | null | null | null | test/scrivener/html/seo_test.exs | miseas/scrivener_html | 681326591ee5299ff02821fa1742086be31cdd65 | [
"MIT"
] | null | null | null | test/scrivener/html/seo_test.exs | miseas/scrivener_html | 681326591ee5299ff02821fa1742086be31cdd65 | [
"MIT"
] | 1 | 2021-09-10T08:51:49.000Z | 2021-09-10T08:51:49.000Z | defmodule Scrivener.HTML.SEOTest do
use ExUnit.Case
import Scrivener.HTML.SEO
alias Scrivener.Page
doctest Scrivener.HTML.SEO
describe "#rel" do
test "on the first page - page 2" do
assert rel(%Page{total_pages: 10, page_number: 1}, 2) == "next"
end
test "on the first page - page 5" do
... | 29.025974 | 91 | 0.451007 |
91335e250dd92f9e0c4433a08ac082907f86392a | 1,159 | ex | Elixir | clients/iam/lib/google_api/iam/v1/model/role.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/iam/lib/google_api/iam/v1/model/role.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/iam/lib/google_api/iam/v1/model/role.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | 1 | 2018-07-28T20:50:50.000Z | 2018-07-28T20:50:50.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 26.953488 | 77 | 0.71786 |
9133b3528675ddfc908f61de8aeb6ec19a242ae4 | 1,678 | exs | Elixir | mix.exs | frankdugan3/git_ops | 5cf91452cd6f6214f5aa1a0c232902b4f6c3c31c | [
"MIT"
] | 1 | 2021-05-06T20:22:20.000Z | 2021-05-06T20:22:20.000Z | mix.exs | frankdugan3/git_ops | 5cf91452cd6f6214f5aa1a0c232902b4f6c3c31c | [
"MIT"
] | null | null | null | mix.exs | frankdugan3/git_ops | 5cf91452cd6f6214f5aa1a0c232902b4f6c3c31c | [
"MIT"
] | null | null | null | defmodule GitOps.MixProject do
use Mix.Project
@source_url "https://github.com/zachdaniel/git_ops"
@version "2.4.2"
def project do
[
app: :git_ops,
version: @version,
elixir: "~> 1.6",
description: description(),
package: package(),
start_permanent: Mix.env() == :prod,
... | 21.512821 | 90 | 0.534565 |
9133d7410df978913172c77676643b4b6d66e347 | 1,517 | ex | Elixir | lib/types/date.ex | aforward-oss/timex_ecto | 40c7f0863b9bffab9ce81129b45eec694f66382e | [
"MIT"
] | null | null | null | lib/types/date.ex | aforward-oss/timex_ecto | 40c7f0863b9bffab9ce81129b45eec694f66382e | [
"MIT"
] | null | null | null | lib/types/date.ex | aforward-oss/timex_ecto | 40c7f0863b9bffab9ce81129b45eec694f66382e | [
"MIT"
] | null | null | null | defmodule Timex.Ecto.Date do
@moduledoc """
Support for using Timex with :date fields
"""
use Timex
@behaviour Ecto.Type
def type, do: :date
@doc """
We can let Ecto handle blank input
"""
defdelegate blank?(value), to: Ecto.Type
@doc """
Handle casting to Timex.Ecto.Date
"""
def cast(%D... | 25.283333 | 102 | 0.570864 |
9134149665941e67fd1b73ada824cc0c381d72b6 | 1,801 | ex | Elixir | lib/wise_homex/models/statement_config.ex | wise-home/wise_homex | 851f13191ed67acb1003888c12f4e6b71800d31b | [
"MIT"
] | 2 | 2019-03-14T09:09:14.000Z | 2020-11-25T06:44:46.000Z | lib/wise_homex/models/statement_config.ex | wise-home/wise_homex | 851f13191ed67acb1003888c12f4e6b71800d31b | [
"MIT"
] | 139 | 2019-03-14T06:58:55.000Z | 2022-03-29T12:28:09.000Z | lib/wise_homex/models/statement_config.ex | wise-home/wise_homex | 851f13191ed67acb1003888c12f4e6b71800d31b | [
"MIT"
] | 7 | 2021-04-09T13:55:45.000Z | 2021-04-16T15:49:36.000Z | defmodule WiseHomex.StatementConfig do
@moduledoc """
Model for a StatementConfig
"""
alias WiseHomex.DecimalType
alias WiseHomex.QuantityType
use WiseHomex.BaseModel
embedded_schema do
belongs_to :heat_transmission_key, WiseHomex.SettlementKey, type: :binary_id
belongs_to :hot_water_transmissi... | 30.525424 | 85 | 0.737923 |
91341b1eb87e49a7f0068a7509191a15052c7019 | 27,882 | exs | Elixir | test/unit/ecto_paging_test.exs | timbuckley/ecto_paging | 1d0dc9e2b5158e3948d03951f08f62e4a511b6ad | [
"MIT"
] | 13 | 2016-11-25T14:59:28.000Z | 2020-01-16T23:23:25.000Z | test/unit/ecto_paging_test.exs | timbuckley/ecto_paging | 1d0dc9e2b5158e3948d03951f08f62e4a511b6ad | [
"MIT"
] | 22 | 2016-11-17T09:51:12.000Z | 2020-03-03T15:32:04.000Z | test/unit/ecto_paging_test.exs | timbuckley/ecto_paging | 1d0dc9e2b5158e3948d03951f08f62e4a511b6ad | [
"MIT"
] | 7 | 2016-11-17T14:10:26.000Z | 2020-03-03T15:27:35.000Z | defmodule Ecto.PagingTest do
use Ecto.Paging.ModelCase, async: false
alias Ecto.Paging
doctest Ecto.Paging
test "works on empty list" do
res = get_query()
|> Ecto.Paging.TestRepo.paginate(%Ecto.Paging{limit: 50})
|> Ecto.Paging.TestRepo.all
assert res == []
end
test "works with corrupted ... | 30.50547 | 104 | 0.619181 |
91341f707dcd04773dbbc0d7b9b011d99f4403c0 | 293 | exs | Elixir | elixir/elixir-sips/samples/apex_playground/mix.exs | afronski/playground-erlang | 6ac4b58b2fd717260c22a33284547d44a9b5038e | [
"MIT"
] | 2 | 2015-12-09T02:16:51.000Z | 2021-07-26T22:53:43.000Z | elixir/elixir-sips/samples/apex_playground/mix.exs | afronski/playground-erlang | 6ac4b58b2fd717260c22a33284547d44a9b5038e | [
"MIT"
] | null | null | null | elixir/elixir-sips/samples/apex_playground/mix.exs | afronski/playground-erlang | 6ac4b58b2fd717260c22a33284547d44a9b5038e | [
"MIT"
] | 1 | 2016-05-08T18:40:31.000Z | 2016-05-08T18:40:31.000Z | defmodule ApexPlayground.Mixfile do
use Mix.Project
def project do
[app: :apex_playground,
version: "0.0.1",
elixir: "~> 1.0",
deps: deps]
end
def application do
[applications: [:logger]]
end
defp deps do
[
{:apex, "~> 0.3.2"}
]
end
end
| 13.952381 | 35 | 0.559727 |
91341fe1813f17a912657ee6cc2724eaae3bbbf7 | 417 | ex | Elixir | lib/afterglow/teams/user_team.ex | sahilpaudel/AfterGlow | 0859ec14b47c8c5704cc8e5cba86d39aa258fff5 | [
"MIT"
] | null | null | null | lib/afterglow/teams/user_team.ex | sahilpaudel/AfterGlow | 0859ec14b47c8c5704cc8e5cba86d39aa258fff5 | [
"MIT"
] | null | null | null | lib/afterglow/teams/user_team.ex | sahilpaudel/AfterGlow | 0859ec14b47c8c5704cc8e5cba86d39aa258fff5 | [
"MIT"
] | null | null | null | defmodule AfterGlow.Teams.UserTeam do
use Ecto.Schema
import Ecto.Changeset
alias AfterGlow.Teams.Team
alias AfterGlow.User
schema("user_teams") do
belongs_to(:team, Team)
belongs_to(:user, User)
timestamps()
end
def changeset(%__MODULE__{} = struct, attrs) when is_map(attrs) do
struct
... | 21.947368 | 68 | 0.693046 |
913421931116f2a1a01b79038487ed223efe69f3 | 2,717 | ex | Elixir | apps/faqcheck_web/lib/faqcheck_web/helpers/form_helpers.ex | csboling/faqcheck | bc182c365d466c8dcacc6b1a5fe9186a2c912cd4 | [
"CC0-1.0"
] | null | null | null | apps/faqcheck_web/lib/faqcheck_web/helpers/form_helpers.ex | csboling/faqcheck | bc182c365d466c8dcacc6b1a5fe9186a2c912cd4 | [
"CC0-1.0"
] | 20 | 2021-09-08T04:07:31.000Z | 2022-03-10T21:52:24.000Z | apps/faqcheck_web/lib/faqcheck_web/helpers/form_helpers.ex | csboling/faqcheck | bc182c365d466c8dcacc6b1a5fe9186a2c912cd4 | [
"CC0-1.0"
] | null | null | null | defmodule FaqcheckWeb.FormHelpers do
use Phoenix.HTML
import FaqcheckWeb.Gettext
import FaqcheckWeb.Timezones
alias Faqcheck.Referrals.OperatingHours
alias Faqcheck.Referrals.OperatingHours.Weekday
def hour_select(form, field, from \\ 6, to \\ 20, minute_step \\ 15) do
select form, field,
option... | 31.229885 | 73 | 0.66544 |
9134264756682a10e0cfe4d06b7492202582b460 | 6,382 | ex | Elixir | clients/big_query_connection/lib/google_api/big_query_connection/v1beta1/model/policy.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/big_query_connection/lib/google_api/big_query_connection/v1beta1/model/policy.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/big_query_connection/lib/google_api/big_query_connection/v1beta1/model/policy.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... | 42.264901 | 177 | 0.682075 |
91343be6bcff59e67ca7d3f70bfb3498ea02c3a5 | 57 | ex | Elixir | lib/chat_web/views/room_view.ex | Zesky665/GradProject | dad0152de7be505338b1ddbbfcfa82fafe613b68 | [
"Unlicense"
] | null | null | null | lib/chat_web/views/room_view.ex | Zesky665/GradProject | dad0152de7be505338b1ddbbfcfa82fafe613b68 | [
"Unlicense"
] | null | null | null | lib/chat_web/views/room_view.ex | Zesky665/GradProject | dad0152de7be505338b1ddbbfcfa82fafe613b68 | [
"Unlicense"
] | null | null | null | defmodule ChatWeb.RoomView do
use ChatWeb, :view
end
| 9.5 | 29 | 0.754386 |
9134ac83b4fb54817069b2e457937045757dd3cb | 5,033 | ex | Elixir | clients/recommendation_engine/lib/google_api/recommendation_engine/v1beta1/model/google_cloud_recommendationengine_v1beta1_user_event.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/recommendation_engine/lib/google_api/recommendation_engine/v1beta1/model/google_cloud_recommendationengine_v1beta1_user_event.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/recommendation_engine/lib/google_api/recommendation_engine/v1beta1/model/google_cloud_recommendationengine_v1beta1_user_event.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 57.850575 | 883 | 0.748261 |
9134ba93f3726b58d68ab8b76049703ab4c16b23 | 3,309 | ex | Elixir | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/api/browsers.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/api/browsers.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/api/browsers.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.886076 | 187 | 0.670898 |
9134ea1a533686587524ea0dadc3f4d7e8848187 | 2,636 | exs | Elixir | 2021/day21.exs | princemaple/aoc | 325dd12c8b5b827458214846f184e07a6cfbdf34 | [
"MIT"
] | 1 | 2021-12-13T00:31:09.000Z | 2021-12-13T00:31:09.000Z | 2021/day21.exs | princemaple/aoc | 325dd12c8b5b827458214846f184e07a6cfbdf34 | [
"MIT"
] | null | null | null | 2021/day21.exs | princemaple/aoc | 325dd12c8b5b827458214846f184e07a6cfbdf34 | [
"MIT"
] | null | null | null | # Title: Day21
# ── Untitled ──
[p1start, p2start] =
"input"
|> IO.getn(1_000_000)
|> String.trim()
|> String.split(["\r\n", "\n"], trim: true)
|> Enum.map(&(&1 |> String.split(": ") |> List.last() |> String.to_integer()))
defmodule D21 do
def play(pos, inc) do
sum = pos + rem(inc, 10)
... | 27.175258 | 81 | 0.43437 |
9135113c9070839af1539b2ebe379dba60cb88ec | 191 | exs | Elixir | back/test/api_web/controllers/page_controller_test.exs | HugoLefebvre/Epitech_TM_MP03 | 0ed161c956f7a10aec245fe2e17eb5a9b55f6075 | [
"MIT"
] | null | null | null | back/test/api_web/controllers/page_controller_test.exs | HugoLefebvre/Epitech_TM_MP03 | 0ed161c956f7a10aec245fe2e17eb5a9b55f6075 | [
"MIT"
] | null | null | null | back/test/api_web/controllers/page_controller_test.exs | HugoLefebvre/Epitech_TM_MP03 | 0ed161c956f7a10aec245fe2e17eb5a9b55f6075 | [
"MIT"
] | null | null | null | defmodule ApiWeb.PageControllerTest do
use ApiWeb.ConnCase
test "GET /", %{conn: conn} do
conn = get conn, "/"
assert html_response(conn, 200) =~ "Welcome to Phoenix!"
end
end
| 21.222222 | 60 | 0.670157 |
91352d7a0b80ed89c07b809b662a095d5803fbfd | 72 | ex | Elixir | lib/mango_web/views/admin/ware_house_item_view.ex | nittin-shankar/mango | 3d988a494f57b26bddaad9a25e63eb4e7f6f9c12 | [
"MIT"
] | 121 | 2017-06-24T10:33:38.000Z | 2022-03-17T16:02:16.000Z | lib/mango_web/views/admin/ware_house_item_view.ex | nittin-shankar/mango | 3d988a494f57b26bddaad9a25e63eb4e7f6f9c12 | [
"MIT"
] | 6 | 2017-06-24T22:48:21.000Z | 2018-03-17T01:20:32.000Z | lib/mango_web/views/admin/ware_house_item_view.ex | nittin-shankar/mango | 3d988a494f57b26bddaad9a25e63eb4e7f6f9c12 | [
"MIT"
] | 29 | 2017-07-03T04:09:15.000Z | 2022-03-02T15:45:49.000Z | defmodule MangoWeb.Admin.WarehouseItemView do
use MangoWeb, :view
end
| 18 | 45 | 0.819444 |
913533c849872d9fd568c582fae6b59eb8927b7a | 1,995 | ex | Elixir | lib/adapters/csv.ex | fiodorbaczynski/trivial_csv | 5d80a260f385bf2cbbd296a5ca359c9865510317 | [
"Apache-2.0"
] | 20 | 2019-08-02T08:25:51.000Z | 2021-05-18T21:28:47.000Z | lib/adapters/csv.ex | fiodorbaczynski/trivial_csv | 5d80a260f385bf2cbbd296a5ca359c9865510317 | [
"Apache-2.0"
] | null | null | null | lib/adapters/csv.ex | fiodorbaczynski/trivial_csv | 5d80a260f385bf2cbbd296a5ca359c9865510317 | [
"Apache-2.0"
] | null | null | null | defmodule DataQuacker.Adapters.CSV do
@moduledoc ~S"""
This is a CSV adapter which can parse CSV files
from the local filesystem or fetched over http.
It is the default used if no adapter is specified.
## Example source
- Local file path: `"path/to/csv/file.csv"`
- Remote file url: `"https://remote_fil... | 29.776119 | 202 | 0.680201 |
913581d656fd413b34fad49f19635e4aff83be58 | 1,942 | ex | Elixir | test/support/data_case.ex | generalui/elixir_pairing | 67919e37b53e72bbd11e4785c9caa94fb3ac3303 | [
"MIT"
] | null | null | null | test/support/data_case.ex | generalui/elixir_pairing | 67919e37b53e72bbd11e4785c9caa94fb3ac3303 | [
"MIT"
] | null | null | null | test/support/data_case.ex | generalui/elixir_pairing | 67919e37b53e72bbd11e4785c9caa94fb3ac3303 | [
"MIT"
] | null | null | null | defmodule EPS.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,
we enable the SQL sandbox, so changes done to the d... | 27.742857 | 77 | 0.669413 |
91358a3279d1953177efce95f6f56d09af7fb187 | 12,915 | ex | Elixir | host_core/lib/host_core/actors/actor_module.ex | wasmCloud/wasmcloud-otp | 1c3bfdfe26b110096c8567a9825a4dc351a27683 | [
"Apache-2.0"
] | 84 | 2021-06-09T16:30:27.000Z | 2022-03-27T23:41:25.000Z | host_core/lib/host_core/actors/actor_module.ex | wasmCloud/wasmcloud-otp | 1c3bfdfe26b110096c8567a9825a4dc351a27683 | [
"Apache-2.0"
] | 239 | 2021-06-07T14:00:09.000Z | 2022-03-30T17:06:05.000Z | host_core/lib/host_core/actors/actor_module.ex | wasmCloud/wasmcloud-otp | 1c3bfdfe26b110096c8567a9825a4dc351a27683 | [
"Apache-2.0"
] | 20 | 2021-06-10T01:10:35.000Z | 2022-03-17T15:59:57.000Z | defmodule HostCore.Actors.ActorModule do
@moduledoc false
# Do not automatically restart this process
use GenServer, restart: :transient
alias HostCore.CloudEvent
@op_health_check "Actor.HealthRequest"
@thirty_seconds 30_000
require Logger
alias HostCore.WebAssembly.Imports
defmodule State do
@... | 26.628866 | 101 | 0.623151 |
913594a11496c228124e8a6825ca0508d5dddca5 | 1,674 | ex | Elixir | lib/purple_web/controllers/user_reset_password_controller.ex | knoebber/petaller | 3532db5a3688459127d2427af42e32ca0f494d44 | [
"MIT"
] | null | null | null | lib/purple_web/controllers/user_reset_password_controller.ex | knoebber/petaller | 3532db5a3688459127d2427af42e32ca0f494d44 | [
"MIT"
] | null | null | null | lib/purple_web/controllers/user_reset_password_controller.ex | knoebber/petaller | 3532db5a3688459127d2427af42e32ca0f494d44 | [
"MIT"
] | null | null | null | defmodule PurpleWeb.UserResetPasswordController do
use PurpleWeb, :controller
alias Purple.Accounts
plug :get_user_by_reset_password_token when action in [:edit, :update]
def new(conn, _params) do
render(conn, "new.html")
end
def create(conn, %{"user" => %{"email" => email}}) do
if user = Accoun... | 28.372881 | 101 | 0.655914 |
9135a83966db2bbdd7f6afe00417114968cab1b9 | 723 | exs | Elixir | extensions/raxx_view/test/raxx/view/layout_test.exs | lasseebert/raxx | e614d214e3ba0ed7db8f7fc6e709a554560e81e1 | [
"Apache-2.0"
] | null | null | null | extensions/raxx_view/test/raxx/view/layout_test.exs | lasseebert/raxx | e614d214e3ba0ed7db8f7fc6e709a554560e81e1 | [
"Apache-2.0"
] | null | null | null | extensions/raxx_view/test/raxx/view/layout_test.exs | lasseebert/raxx | e614d214e3ba0ed7db8f7fc6e709a554560e81e1 | [
"Apache-2.0"
] | null | null | null | defmodule Raxx.View.LayoutTest do
use ExUnit.Case
defmodule Helpers do
def helper_function() do
"helper_function"
end
end
defmodule DefaultLayout do
use Raxx.View.Layout, imports: [__MODULE__, Helpers]
def layout_function() do
"layout_function"
end
end
defmodule DefaultLa... | 21.264706 | 56 | 0.656985 |
9136121def22349367ce5ad69711fcd4ed495a2b | 1,416 | exs | Elixir | test/game/format_test.exs | NatTuck/ex_venture | 7a74d33025a580f1e3e93d3755f22258eb3e9127 | [
"MIT"
] | null | null | null | test/game/format_test.exs | NatTuck/ex_venture | 7a74d33025a580f1e3e93d3755f22258eb3e9127 | [
"MIT"
] | null | null | null | test/game/format_test.exs | NatTuck/ex_venture | 7a74d33025a580f1e3e93d3755f22258eb3e9127 | [
"MIT"
] | null | null | null | defmodule Game.FormatTest do
use ExUnit.Case
doctest Game.Format
alias Game.Format
describe "line wrapping" do
test "single line" do
assert Format.wrap("one line") == "one line"
end
test "wraps at 80 chars" do
assert Format.wrap("this line will be split up into two lines because it is... | 39.333333 | 145 | 0.677966 |
9136138a6eacf7fb862b1c1f0f83189687c8f656 | 670 | exs | Elixir | test/validation/rules/credit_card/amex_test.exs | adolfont/validation | 6288f5a5745f645c90b6f6241e14f0088c218f5b | [
"MIT"
] | null | null | null | test/validation/rules/credit_card/amex_test.exs | adolfont/validation | 6288f5a5745f645c90b6f6241e14f0088c218f5b | [
"MIT"
] | null | null | null | test/validation/rules/credit_card/amex_test.exs | adolfont/validation | 6288f5a5745f645c90b6f6241e14f0088c218f5b | [
"MIT"
] | null | null | null | defmodule Validation.Rules.CreditCard.AmexTest do
use ExUnit.Case
alias Validation.Rules.CreditCard.Amex, as: V
doctest Validation
test "valid credit card - amex" do
assert V.validate?("340-3161-9380-9364")
end
test "invalid credit card - amex" do
# discover
refute V.validate?("601100099013942... | 24.814815 | 49 | 0.673134 |
913615bc000b775bee4f039f7192d513890c6ee2 | 2,056 | exs | Elixir | elixir-match/app/test/match_web/authenticator_test.exs | jim80net/elixir_tutorial_projects | db19901a9305b297faa90642bebcc08455621b52 | [
"Unlicense"
] | null | null | null | elixir-match/app/test/match_web/authenticator_test.exs | jim80net/elixir_tutorial_projects | db19901a9305b297faa90642bebcc08455621b52 | [
"Unlicense"
] | null | null | null | elixir-match/app/test/match_web/authenticator_test.exs | jim80net/elixir_tutorial_projects | db19901a9305b297faa90642bebcc08455621b52 | [
"Unlicense"
] | null | null | null | defmodule MatchWeb.AuthenticatorTest do
use MatchWeb.ConnCase, async: false
test "login will authenticate the user and redirect unauthenticated requests", %{conn: conn} do
name = "toran"
password = "abcd1234"
login = %{username: name, password: password}
data = %{username: name, invite: "elixir2019... | 47.813953 | 99 | 0.688716 |
913680b27cf36f177b62a9d26645180284f9198e | 33,314 | ex | Elixir | lib/wallaby/browser.ex | TheFirstAvenger/wallaby | f615b7d74b75629a9a0c2c95bd7fe5817fa2c310 | [
"MIT"
] | 1 | 2020-05-15T20:41:00.000Z | 2020-05-15T20:41:00.000Z | lib/wallaby/browser.ex | TheFirstAvenger/wallaby | f615b7d74b75629a9a0c2c95bd7fe5817fa2c310 | [
"MIT"
] | null | null | null | lib/wallaby/browser.ex | TheFirstAvenger/wallaby | f615b7d74b75629a9a0c2c95bd7fe5817fa2c310 | [
"MIT"
] | null | null | null | defmodule Wallaby.Browser do
@moduledoc """
The Browser module is the entrypoint for interacting with a real browser.
By default, action only work with elements that are visible to a real user.
## Actions
Actions are used to interact with form elements. All actions work with the
query interface:
```ht... | 26.715317 | 207 | 0.644354 |
91368d0f77ba50c0d938e7912541a3dd8acc8504 | 235 | exs | Elixir | apps/data/priv/repo/migrations/20190206221158_add_enable_anonymous_web_client_to_games.exs | sb8244/grapevine | effaaa01294d30114090c20f9cc40b8665d834f2 | [
"MIT"
] | 107 | 2018-10-05T18:20:32.000Z | 2022-02-28T04:02:50.000Z | apps/data/priv/repo/migrations/20190206221158_add_enable_anonymous_web_client_to_games.exs | sb8244/grapevine | effaaa01294d30114090c20f9cc40b8665d834f2 | [
"MIT"
] | 33 | 2018-10-05T14:11:18.000Z | 2022-02-10T22:19:18.000Z | apps/data/priv/repo/migrations/20190206221158_add_enable_anonymous_web_client_to_games.exs | sb8244/grapevine | effaaa01294d30114090c20f9cc40b8665d834f2 | [
"MIT"
] | 18 | 2019-02-03T03:08:20.000Z | 2021-12-28T04:29:36.000Z | defmodule GrapevineData.Repo.Migrations.AddEnableAnonymousWebClientToGames do
use Ecto.Migration
def change do
alter table(:games) do
add(:allow_anonymous_client, :boolean, default: false, null: false)
end
end
end
| 23.5 | 77 | 0.757447 |
9136a3d9d5e52e1ddd29260ed5a65b909fe224b2 | 10,479 | exs | Elixir | exercises/custom-set/custom_set_test.exs | pashutk/elixir | 35938cf20bca2c40b0ec0bd1ce2227863a2cd318 | [
"MIT"
] | null | null | null | exercises/custom-set/custom_set_test.exs | pashutk/elixir | 35938cf20bca2c40b0ec0bd1ce2227863a2cd318 | [
"MIT"
] | 1 | 2019-06-13T09:31:54.000Z | 2019-06-13T09:31:54.000Z | exercises/custom-set/custom_set_test.exs | pashutk/elixir | 35938cf20bca2c40b0ec0bd1ce2227863a2cd318 | [
"MIT"
] | 1 | 2019-06-13T04:29:09.000Z | 2019-06-13T04:29:09.000Z | if !System.get_env("EXERCISM_TEST_EXAMPLES") do
Code.load_file("custom_set.exs", __DIR__)
end
ExUnit.start()
ExUnit.configure(exclude: :pending, trace: true)
defmodule CustomSetTest do
use ExUnit.Case
describe "new" do
# @tag :pending
test "returns a CustomSet struct" do
assert CustomSet.new([]) ... | 32.243077 | 98 | 0.652734 |
9136e3ee5e6645d4f9cb4d0daec158e072dbdd56 | 107 | exs | Elixir | exercises/01-elixir/02-data-types/02-tuples/01-creation/solution.exs | DennisWinnepenninckx/distributed-applications | 06743e4e2a09dc52ff52be831e486bb073916173 | [
"BSD-3-Clause"
] | 1 | 2021-09-22T09:52:11.000Z | 2021-09-22T09:52:11.000Z | exercises/01-elixir/02-data-types/02-tuples/01-creation/solution.exs | DennisWinnepenninckx/distributed-applications | 06743e4e2a09dc52ff52be831e486bb073916173 | [
"BSD-3-Clause"
] | 22 | 2019-06-19T18:58:13.000Z | 2020-03-16T14:43:06.000Z | exercises/01-elixir/02-data-types/02-tuples/01-creation/solution.exs | DennisWinnepenninckx/distributed-applications | 06743e4e2a09dc52ff52be831e486bb073916173 | [
"BSD-3-Clause"
] | 32 | 2019-09-19T03:25:11.000Z | 2020-10-06T15:01:47.000Z | defmodule Math do
def quotrem(x, y) when is_number(x) and is_number(y), do: { div(x, y), rem(x, y) }
end
| 26.75 | 84 | 0.64486 |
9137100af783d72f249cf8b777653e5e8504b0d6 | 47 | exs | Elixir | test/phoenix_test.exs | brightroll/phoenix | b93022086322bcc1d797214a28e0c9710f537c22 | [
"MIT"
] | null | null | null | test/phoenix_test.exs | brightroll/phoenix | b93022086322bcc1d797214a28e0c9710f537c22 | [
"MIT"
] | null | null | null | test/phoenix_test.exs | brightroll/phoenix | b93022086322bcc1d797214a28e0c9710f537c22 | [
"MIT"
] | null | null | null | defmodule PhoenixTest do
use ExUnit.Case
end
| 11.75 | 24 | 0.808511 |
91374b5b35b8bb604472c66ef0db9439ff7b496a | 7,356 | ex | Elixir | lib/bulmalab_web/live/table_resize_components_live.ex | easink/bulmalab | eddd13d4717388fdccaeb97efaa2ac7ce723030a | [
"Apache-2.0"
] | null | null | null | lib/bulmalab_web/live/table_resize_components_live.ex | easink/bulmalab | eddd13d4717388fdccaeb97efaa2ac7ce723030a | [
"Apache-2.0"
] | null | null | null | lib/bulmalab_web/live/table_resize_components_live.ex | easink/bulmalab | eddd13d4717388fdccaeb97efaa2ac7ce723030a | [
"Apache-2.0"
] | null | null | null | defmodule BulmalabWeb.TableResizeComponentsLiveComponent do
use Phoenix.LiveComponent
use Phoenix.HTML
@arrow_down <<" ", 0x25BE::utf8>>
@arrow_up <<" ", 0x25B4::utf8>>
defmodule TableRowComponent do
use Phoenix.LiveComponent
# <tr phx-click="select"
# phx-value-row-id="<%= @id %>"
# ... | 26.749091 | 174 | 0.583741 |
913753024df04adfb7fdc76e33fb247551ba4bab | 2,379 | ex | Elixir | lib/messenger_bot/client/middlewares/bearer_auth.ex | mustafaturan/messenger_bot | c6c634ace2b2df02acf4a06c9b24790893d88d60 | [
"Unlicense"
] | 16 | 2018-04-19T23:50:47.000Z | 2020-07-18T08:28:07.000Z | lib/messenger_bot/client/middlewares/bearer_auth.ex | mustafaturan/messenger_bot | c6c634ace2b2df02acf4a06c9b24790893d88d60 | [
"Unlicense"
] | 62 | 2018-11-05T08:21:23.000Z | 2021-08-02T13:15:16.000Z | lib/messenger_bot/client/middlewares/bearer_auth.ex | mustafaturan/messenger_bot | c6c634ace2b2df02acf4a06c9b24790893d88d60 | [
"Unlicense"
] | 4 | 2019-04-25T13:30:45.000Z | 2020-07-12T15:39:23.000Z | defmodule MessengerBot.Client.Middleware.BearerAuth do
@moduledoc false
############################################################################
# Tesla Middleware implementation for Bearer Auth Headers #
# Middleware doesn't block the call when auth token not found for page ref,#
# it
... | 27.988235 | 93 | 0.639765 |
913753dd21f7acf1823ddc28c6555617c3c02145 | 4,869 | ex | Elixir | clients/document_ai/lib/google_api/document_ai/v1beta3/model/google_cloud_documentai_v1beta1_document_page_form_field.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/document_ai/lib/google_api/document_ai/v1beta3/model/google_cloud_documentai_v1beta1_document_page_form_field.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/document_ai/lib/google_api/document_ai/v1beta3/model/google_cloud_documentai_v1beta1_document_page_form_field.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... | 45.504673 | 243 | 0.733826 |
913799708b4c58a7535f090e4609b0066185d14f | 136 | exs | Elixir | test/nfl_player_searchex_test.exs | krmannix/nfl-player-searchex | 2644f5927adda27d5a394a397baedab3d0db785a | [
"MIT"
] | 5 | 2017-07-05T13:36:25.000Z | 2021-08-06T05:21:01.000Z | test/nfl_player_searchex_test.exs | krmannix/nfl_player_searchex | 2644f5927adda27d5a394a397baedab3d0db785a | [
"MIT"
] | null | null | null | test/nfl_player_searchex_test.exs | krmannix/nfl_player_searchex | 2644f5927adda27d5a394a397baedab3d0db785a | [
"MIT"
] | null | null | null | defmodule NFLPlayerSearchexTest do
use ExUnit.Case
doctest NFLPlayerSearchex
test "the truth" do
assert 1 + 1 == 2
end
end
| 15.111111 | 34 | 0.720588 |
9137b2823d53989597ba645f3467add60c0e150c | 13,937 | ex | Elixir | clients/custom_search/lib/google_api/custom_search/v1/api/cse.ex | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"Apache-2.0"
] | null | null | null | clients/custom_search/lib/google_api/custom_search/v1/api/cse.ex | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"Apache-2.0"
] | null | null | null | clients/custom_search/lib/google_api/custom_search/v1/api/cse.ex | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"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... | 56.197581 | 203 | 0.629475 |
9137bbf231d03c7d30bccbd107b0e1edbd51153c | 1,764 | exs | Elixir | test/type/remote/subtype_test.exs | ityonemo/mavis | 6f71c1ff9e12626c1ac5fcd1276c9adb433bfb99 | [
"MIT"
] | 97 | 2020-09-22T01:52:19.000Z | 2022-03-21T17:50:13.000Z | test/type/remote/subtype_test.exs | ityonemo/mavis | 6f71c1ff9e12626c1ac5fcd1276c9adb433bfb99 | [
"MIT"
] | 106 | 2020-09-22T18:55:28.000Z | 2021-11-30T01:51:04.000Z | test/type/remote/subtype_test.exs | ityonemo/mavis | 6f71c1ff9e12626c1ac5fcd1276c9adb433bfb99 | [
"MIT"
] | 3 | 2020-10-27T22:36:56.000Z | 2022-01-25T21:00:24.000Z | defmodule TypeTest.Remote.SubtypeTest do
use ExUnit.Case, async: true
@moduletag :subtype
import Type, only: :macros
use Type.Operators
alias Type.Bitstring
describe "the elixir String.t" do
test "is a subtype of itself and any" do
assert remote(String.t()) in remote(String.t())
assert ... | 28.451613 | 66 | 0.637755 |
9137f26931b90b44bc2b32b93be6a7f339261abc | 2,836 | exs | Elixir | test/indeterminate_test.exs | kelvinst/progress_bar | f1deb260b3e19cb56e70908e2220b241bb5c9800 | [
"MIT"
] | 5 | 2017-09-04T19:43:28.000Z | 2021-06-30T05:28:13.000Z | test/indeterminate_test.exs | kelvinst/progress_bar | f1deb260b3e19cb56e70908e2220b241bb5c9800 | [
"MIT"
] | null | null | null | test/indeterminate_test.exs | kelvinst/progress_bar | f1deb260b3e19cb56e70908e2220b241bb5c9800 | [
"MIT"
] | 1 | 2018-05-29T17:46:19.000Z | 2018-05-29T17:46:19.000Z | defmodule IndeterminateTest do
use ExUnit.Case
import ExUnit.CaptureIO
alias ProgressBar.Utils
# Assume a wide-enough terminal to fit a 100 column bar.
# This needs to be explicit or tests fail when run in a narrow terminal.
@width 200
test "renders an animated bar" do
io = capture_io fn ->
Pr... | 27.269231 | 111 | 0.5 |
913821c0e902c48c4f5c034217336a36a57e4a33 | 696 | ex | Elixir | web/gettext.ex | bagilevi/uptom | 50894abb8f7bd052e12c37155b5c33450abcc9bd | [
"MIT"
] | 6 | 2017-05-12T04:20:09.000Z | 2020-11-07T02:00:56.000Z | web/gettext.ex | bagilevi/uptom | 50894abb8f7bd052e12c37155b5c33450abcc9bd | [
"MIT"
] | null | null | null | web/gettext.ex | bagilevi/uptom | 50894abb8f7bd052e12c37155b5c33450abcc9bd | [
"MIT"
] | 2 | 2020-05-18T08:06:22.000Z | 2020-12-19T14:24:40.000Z | defmodule Uptom.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 Uptom.Gettext
# Simple translation
gettext "Here is the string ... | 27.84 | 72 | 0.675287 |
91382608680a72e0106d24535b30ae6efd6f5fbf | 481 | exs | Elixir | apps/blunt_toolkit/test/mix/tasks/blunt/inspect.aggregate_test.exs | blunt-elixir/blunt | a88b88984022db7ba2110204248fdb541121e3a0 | [
"MIT"
] | 1 | 2022-03-07T11:54:47.000Z | 2022-03-07T11:54:47.000Z | apps/blunt_toolkit/test/mix/tasks/blunt/inspect.aggregate_test.exs | elixir-cqrs/cqrs_tools | afbf82da522a10d2413547a46f316ed3aadebba5 | [
"MIT"
] | null | null | null | apps/blunt_toolkit/test/mix/tasks/blunt/inspect.aggregate_test.exs | elixir-cqrs/cqrs_tools | afbf82da522a10d2413547a46f316ed3aadebba5 | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.Blunt.Inspect.AggregateTest do
use EventStoreCase, async: false
use Blunt.Testing.Factories
use AppendToStreamStrategy
@person_id "25d85f07-26ab-4434-851b-d11da9ec942e"
factory PersonCreated
factory PersonUpdated
test "populate some events" do
data = %{id: @person_id}
opts ... | 24.05 | 58 | 0.746362 |
9138343bba6a064faeaf668f3384de98ae48a71b | 346 | exs | Elixir | priv/repo/migrations/20190205232359_add_pow_email_confirmation_to_users.exs | rayrrr/fameliphotos | cc928abdc6d761d76113067432e9d6d0fcb2507b | [
"MIT"
] | 6 | 2019-10-08T01:30:08.000Z | 2020-10-01T04:49:33.000Z | priv/repo/migrations/20190205232359_add_pow_email_confirmation_to_users.exs | rayrrr/fameliphotos | cc928abdc6d761d76113067432e9d6d0fcb2507b | [
"MIT"
] | null | null | null | priv/repo/migrations/20190205232359_add_pow_email_confirmation_to_users.exs | rayrrr/fameliphotos | cc928abdc6d761d76113067432e9d6d0fcb2507b | [
"MIT"
] | 1 | 2019-11-08T22:58:31.000Z | 2019-11-08T22:58:31.000Z | defmodule PhotoGallery.Repo.Migrations.AddPowEmailConfirmationToUsers do
use Ecto.Migration
def change do
alter table(:users) do
add :email_confirmation_token, :string
add :email_confirmed_at, :utc_datetime
add :unconfirmed_email, :string
end
create unique_index(:users, [:email_confi... | 24.714286 | 72 | 0.748555 |
913872fc4e7d79567c7efde6dbb3b8717c24e301 | 529 | exs | Elixir | test/models/admin_user_test.exs | mcousillas6/BioMonitor | 312a903fe19751b6896aca9346340ea502397350 | [
"MIT"
] | null | null | null | test/models/admin_user_test.exs | mcousillas6/BioMonitor | 312a903fe19751b6896aca9346340ea502397350 | [
"MIT"
] | null | null | null | test/models/admin_user_test.exs | mcousillas6/BioMonitor | 312a903fe19751b6896aca9346340ea502397350 | [
"MIT"
] | null | null | null | defmodule BioMonitor.AdminUserTest do
use BioMonitor.ModelCase
alias BioMonitor.AdminUser
@valid_attrs %{
email: "admin@admin.com",
password: "asdasdasd",
password_confirmation: "asdasdasd"
}
@invalid_attrs %{}
test "changeset with valid attributes" do
changeset = AdminUser.changeset(%Adm... | 23 | 65 | 0.725898 |
9138738994f102d59baba9e190f26749f1d8d775 | 1,395 | exs | Elixir | mix.exs | bytecrow/slowpoke_waffle | efbcb84b11a9ac75a6bb90f2261cae0aa650bcc0 | [
"MIT"
] | 1 | 2021-01-21T09:41:23.000Z | 2021-01-21T09:41:23.000Z | mix.exs | bytecrow/slowpoke_waffle | efbcb84b11a9ac75a6bb90f2261cae0aa650bcc0 | [
"MIT"
] | null | null | null | mix.exs | bytecrow/slowpoke_waffle | efbcb84b11a9ac75a6bb90f2261cae0aa650bcc0 | [
"MIT"
] | 1 | 2020-12-27T00:56:59.000Z | 2020-12-27T00:56:59.000Z | defmodule SlowpokeWaffle.MixProject do
use Mix.Project
@version "0.3.0"
def project do
[
app: :slowpoke_waffle,
version: @version,
elixir: "~> 1.6",
elixirc_paths: elixirc_path(Mix.env()),
start_permanent: Mix.env() == :prod,
deps: deps(),
# Docs
name: "Slowp... | 20.514706 | 74 | 0.548387 |
91388bc879fe13c4db6ef388adfd89a4ea63372d | 388 | ex | Elixir | lib/tilex_web/controllers/feed_controller.ex | SeriousM/tilex | 4cfc2bd64cfa29503714b90e145db25e0f0a21b2 | [
"MIT"
] | null | null | null | lib/tilex_web/controllers/feed_controller.ex | SeriousM/tilex | 4cfc2bd64cfa29503714b90e145db25e0f0a21b2 | [
"MIT"
] | null | null | null | lib/tilex_web/controllers/feed_controller.ex | SeriousM/tilex | 4cfc2bd64cfa29503714b90e145db25e0f0a21b2 | [
"MIT"
] | null | null | null | defmodule TilexWeb.FeedController do
use TilexWeb, :controller
def index(conn, _params) do
posts =
Repo.all(
from(
p in Tilex.Post,
order_by: [desc: p.inserted_at],
preload: [:developer],
limit: 25
)
)
conn
|> put_resp_content_type("a... | 19.4 | 47 | 0.564433 |
913891e8ef58ce89daa7c6c1ba365cb8ada0b811 | 1,808 | ex | Elixir | test/support/model_case.ex | snocorp/meansweepx | 585cb25ad22dd2231ab01edd840b0613d6abef77 | [
"MIT"
] | null | null | null | test/support/model_case.ex | snocorp/meansweepx | 585cb25ad22dd2231ab01edd840b0613d6abef77 | [
"MIT"
] | null | null | null | test/support/model_case.ex | snocorp/meansweepx | 585cb25ad22dd2231ab01edd840b0613d6abef77 | [
"MIT"
] | null | null | null | defmodule Meansweepx.ModelCase do
@moduledoc """
This module defines the test case to be used by
model tests.
You may define functions here to be used as helpers in
your model tests. See `errors_on/2`'s definition as reference.
Finally, if the test case interacts with the database,
it cannot be async. F... | 27.393939 | 84 | 0.688053 |
9138994572e985ca2097bd719eb4d7cd9584129a | 932 | ex | Elixir | apps/evm/lib/evm/builtin/sha256.ex | wolflee/mana | db66dac85addfaad98d40da5bd4082b3a0198bb1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 152 | 2018-10-27T04:52:03.000Z | 2022-03-26T10:34:00.000Z | apps/evm/lib/evm/builtin/sha256.ex | wolflee/mana | db66dac85addfaad98d40da5bd4082b3a0198bb1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 270 | 2018-04-14T07:34:57.000Z | 2018-10-25T18:10:45.000Z | apps/evm/lib/evm/builtin/sha256.ex | wolflee/mana | db66dac85addfaad98d40da5bd4082b3a0198bb1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 25 | 2018-10-27T12:15:13.000Z | 2022-01-25T20:31:14.000Z | defmodule EVM.Builtin.Sha256 do
@g_sha256 60
@g_256_byte 12
@doc """
Runs SHA256 hashing
## Examples
iex> EVM.Builtin.Sha256.exec(3000, %EVM.ExecEnv{data: <<1, 2, 3>>})
{2928, %EVM.SubState{}, %EVM.ExecEnv{data: <<1, 2, 3>>}, <<3, 144, 88, 198,
242, 192, 203, 73, 44, 83, 59, 10, 77, 20... | 32.137931 | 86 | 0.595494 |
9138a0a77b33be52493ab2a2e21889f165abf331 | 2,292 | exs | Elixir | apps/service_acquire/test/service_acquire/query/where/and_test.exs | rucker/hindsight | 876a5d344c5d8eebbea37684ee07e0a91e4430f0 | [
"Apache-2.0"
] | 12 | 2020-01-27T19:43:02.000Z | 2021-07-28T19:46:29.000Z | apps/service_acquire/test/service_acquire/query/where/and_test.exs | rucker/hindsight | 876a5d344c5d8eebbea37684ee07e0a91e4430f0 | [
"Apache-2.0"
] | 81 | 2020-01-28T18:07:23.000Z | 2021-11-22T02:12:13.000Z | apps/service_acquire/test/service_acquire/query/where/and_test.exs | rucker/hindsight | 876a5d344c5d8eebbea37684ee07e0a91e4430f0 | [
"Apache-2.0"
] | 10 | 2020-02-13T21:24:09.000Z | 2020-05-21T18:39:35.000Z | defmodule Acquire.Query.Where.AndTest do
use ExUnit.Case
import Checkov
alias Acquire.Query.Where.{And, Function, Parameter, Or, Functions}
alias Acquire.Queryable
describe "new/1" do
data_test "validates against bad input" do
input = put_in(%{}, [field], value)
assert {:error, [%{path: [^fi... | 34.727273 | 101 | 0.580716 |
9138bce4112b5a071f74d3075417398dba4c16ff | 10,846 | ex | Elixir | clients/script/lib/google_api/script/v1/api/processes.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/script/lib/google_api/script/v1/api/processes.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/script/lib/google_api/script/v1/api/processes.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... | 59.593407 | 199 | 0.669095 |
9138bfc982b1125ddef6fb0c77a3bdd390db1efa | 218 | exs | Elixir | priv/repo/migrations/20171028022645_enable_postgis.exs | OSM-Browser/points-api | 7022d4e61318fc8da507809302a57bf38223207a | [
"MIT"
] | 2 | 2018-01-18T20:38:08.000Z | 2020-01-19T17:44:20.000Z | priv/repo/migrations/20171028022645_enable_postgis.exs | OSM-Browser/points-api | 7022d4e61318fc8da507809302a57bf38223207a | [
"MIT"
] | 85 | 2018-02-26T05:30:01.000Z | 2021-07-26T06:22:02.000Z | priv/repo/migrations/20171028022645_enable_postgis.exs | OSM-Browser/points-api | 7022d4e61318fc8da507809302a57bf38223207a | [
"MIT"
] | 1 | 2018-10-07T06:57:34.000Z | 2018-10-07T06:57:34.000Z | defmodule OsmPoints.Repo.Migrations.EnablePostgis do
use Ecto.Migration
def up do
execute "CREATE EXTENSION IF NOT EXISTS postgis"
end
def down do
execute "DROP EXTENSION IF EXISTS postgis"
end
end
| 18.166667 | 52 | 0.747706 |
9138c1d2c5b426cdd69f0e356c3f3e54cb070506 | 565 | ex | Elixir | web/channels/user_socket.ex | Redorb/SpeakEasy | ef9176ae9d9c9064abd3a287852ba897238e3516 | [
"MIT"
] | null | null | null | web/channels/user_socket.ex | Redorb/SpeakEasy | ef9176ae9d9c9064abd3a287852ba897238e3516 | [
"MIT"
] | null | null | null | web/channels/user_socket.ex | Redorb/SpeakEasy | ef9176ae9d9c9064abd3a287852ba897238e3516 | [
"MIT"
] | null | null | null | defmodule Speakeasy.UserSocket do
use Phoenix.Socket
## Channels
channel "users:lobby", Speakeasy.UsersChannel
channel "call:*", Speakeasy.CallChannel
## Transports
transport :websocket, Phoenix.Transports.WebSocket, timeout: 45_000
def connect(%{"token" => token}, socket) do
case Phoenix.Token.ver... | 26.904762 | 80 | 0.670796 |
9138c60f66a720442930fba6efc74b88c624906e | 7,569 | ex | Elixir | lib/elixir/lib/kernel/utils.ex | mertonium/elixir | 74e666156906974082f6b4d34dfbe6988d6465c0 | [
"Apache-2.0"
] | 1 | 2018-10-02T13:55:29.000Z | 2018-10-02T13:55:29.000Z | lib/elixir/lib/kernel/utils.ex | mertonium/elixir | 74e666156906974082f6b4d34dfbe6988d6465c0 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/kernel/utils.ex | mertonium/elixir | 74e666156906974082f6b4d34dfbe6988d6465c0 | [
"Apache-2.0"
] | null | null | null | import Kernel, except: [destructure: 2, defdelegate: 2, defstruct: 2]
defmodule Kernel.Utils do
@moduledoc false
@doc """
Callback for destructure.
"""
def destructure(list, count)
when is_list(list) and is_integer(count) and count >= 0,
do: destructure_list(list, count)
def destructure(nil, ... | 28.137546 | 98 | 0.635487 |
9138c9d4f309af50d502970eace1b34487b50ffe | 2,698 | exs | Elixir | config/prod.exs | Adsidera/adoptoposs | e06da0855fe8f06f4774f89a977201fb78d9dafb | [
"MIT"
] | 120 | 2020-03-30T13:58:40.000Z | 2022-03-30T10:17:50.000Z | config/prod.exs | tsrandrei/adoptoposs | a18fb4b8062aa057e0578dc6e7b7bceef2b8a02e | [
"MIT"
] | 34 | 2020-04-01T23:11:59.000Z | 2022-03-13T08:14:37.000Z | config/prod.exs | tsrandrei/adoptoposs | a18fb4b8062aa057e0578dc6e7b7bceef2b8a02e | [
"MIT"
] | 16 | 2020-04-24T17:14:23.000Z | 2022-03-27T22:32:48.000Z | 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,
# ... | 34.151899 | 82 | 0.712009 |
9138d55435e74fc167c0c7fa2ea9f0ff41ac7441 | 24,010 | exs | Elixir | test/icon/schema/dumper_test.exs | alexdesousa/icon | 2b363582b129bc0485a39e9845d2a18eabd2f6d6 | [
"MIT"
] | 4 | 2022-01-27T09:10:05.000Z | 2022-03-09T04:38:13.000Z | test/icon/schema/dumper_test.exs | alexdesousa/icon | 2b363582b129bc0485a39e9845d2a18eabd2f6d6 | [
"MIT"
] | null | null | null | test/icon/schema/dumper_test.exs | alexdesousa/icon | 2b363582b129bc0485a39e9845d2a18eabd2f6d6 | [
"MIT"
] | null | null | null | defmodule Icon.Schema.DumperTest do
use ExUnit.Case, async: true
import Icon.Schema, only: [list: 1, any: 2, enum: 1]
alias Icon.Schema
alias Icon.Schema.Error
alias Icon.Schema.Types.EventLog
describe "Icon.Schema.dump/1" do
test "parameters can be a keyword list" do
assert %Schema{
... | 27.693195 | 98 | 0.439858 |
9138f97dc0de82676554cda15145e8b43f43ddb8 | 583 | ex | Elixir | lib/ex_interval.ex | filipevarjao/ex_interval | 804e2f1003b26e116b835a4a4d483028334643b3 | [
"MIT"
] | 11 | 2020-06-04T19:05:57.000Z | 2022-01-17T20:10:20.000Z | lib/ex_interval.ex | filipevarjao/ex_interval | 804e2f1003b26e116b835a4a4d483028334643b3 | [
"MIT"
] | 1 | 2020-06-26T15:27:55.000Z | 2020-06-26T15:27:55.000Z | lib/ex_interval.ex | filipevarjao/ex_interval | 804e2f1003b26e116b835a4a4d483028334643b3 | [
"MIT"
] | 1 | 2020-06-04T16:34:31.000Z | 2020-06-04T16:34:31.000Z | defmodule ExInterval do
@moduledoc """
Using intervals for the representation of real numbers, it is possible to
control the error propagation of rounding or truncation, between others, in
numerical computational procedures.
[1] Moore, R. E., Interval Analysis. Prentice-Hall, Englewood Cliffs, New
Je... | 38.866667 | 77 | 0.723842 |
91397e1e7c0c9a71cf898a461fe053d334a93996 | 1,547 | ex | Elixir | lib/bonfire_web/views/error_helpers.ex | qhwa/bonfire | 4a368d6d5300539399dcaff167ac69e3165c2bff | [
"MIT"
] | 71 | 2020-03-09T02:09:30.000Z | 2022-03-09T06:10:23.000Z | lib/bonfire_web/views/error_helpers.ex | qhwa/bonfire | 4a368d6d5300539399dcaff167ac69e3165c2bff | [
"MIT"
] | null | null | null | lib/bonfire_web/views/error_helpers.ex | qhwa/bonfire | 4a368d6d5300539399dcaff167ac69e3165c2bff | [
"MIT"
] | 4 | 2020-04-03T02:28:05.000Z | 2021-11-24T20:07:25.000Z | defmodule BonfireWeb.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(... | 32.229167 | 76 | 0.661926 |
91398e8211f4bf0bf12bf5e5023e530cbf103ab7 | 1,497 | exs | Elixir | test/integration/strategies/dirty_nif_test.exs | jeremyowensboggs/zigler | d1ec07ae66db5c007ff7cfc8a820fb21c661bcea | [
"MIT"
] | 349 | 2019-10-02T07:21:17.000Z | 2022-03-21T17:50:06.000Z | test/integration/strategies/dirty_nif_test.exs | jeremyowensboggs/zigler | d1ec07ae66db5c007ff7cfc8a820fb21c661bcea | [
"MIT"
] | 223 | 2019-10-05T05:36:08.000Z | 2022-03-31T23:12:02.000Z | test/integration/strategies/dirty_nif_test.exs | jeremyowensboggs/zigler | d1ec07ae66db5c007ff7cfc8a820fb21c661bcea | [
"MIT"
] | 20 | 2019-10-08T16:29:39.000Z | 2022-03-31T15:07:20.000Z | defmodule ZiglerTest.Integration.Strategies.DirtyNifTest do
use ExUnit.Case, async: true
use Zig
~Z"""
/// nif: dirty_cpu_forty_seven/0 dirty_cpu
fn dirty_cpu_forty_seven() i32 {
// sleep for 2 seconds
std.time.sleep(2000000000);
return 47;
}
"""
test "dirty_cpu nifs can sleep for a whil... | 23.030769 | 59 | 0.674015 |
9139995f38e85ed0d1140f11bd88a72623c5a917 | 3,328 | ex | Elixir | clients/service_management/lib/google_api/service_management/v1/model/quota.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/service_management/lib/google_api/service_management/v1/model/quota.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/service_management/lib/google_api/service_management/v1/model/quota.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... | 66.56 | 1,415 | 0.772236 |
91399c9dda8b31fc206b9d00e879cbb64ff1080c | 6,961 | ex | Elixir | apps/ello_v2/web/views/post_view.ex | ello/apex | 4acb096b3ce172ff4ef9a51e5d068d533007b920 | [
"MIT"
] | 16 | 2017-06-21T21:31:20.000Z | 2021-05-09T03:23:26.000Z | apps/ello_v2/web/views/post_view.ex | ello/apex | 4acb096b3ce172ff4ef9a51e5d068d533007b920 | [
"MIT"
] | 25 | 2017-06-07T12:18:28.000Z | 2018-06-08T13:27:43.000Z | apps/ello_v2/web/views/post_view.ex | ello/apex | 4acb096b3ce172ff4ef9a51e5d068d533007b920 | [
"MIT"
] | 3 | 2018-06-14T15:34:07.000Z | 2022-02-28T21:06:13.000Z | defmodule Ello.V2.PostView do
use Ello.V2.Web, :view
use Ello.V2.JSONAPI
alias Ello.V2.{
CategoryView,
UserView,
AssetView,
PostMetaAttributesView,
}
alias Ello.Core.Network.{User}
alias Ello.Core.Content.{Post, Love, Watch}
def stale_checks(_, %{data: posts}) do
[etag: etag(posts)]
... | 32.376744 | 121 | 0.644735 |
9139da80af8e2b98d544e1b0cb1935b1b9d2314e | 583 | exs | Elixir | test/views/error_view_test.exs | utkr98jais/phoenix-battleship | 53b43d44a69c5acb4b452b793cce64980a0302df | [
"MIT"
] | 569 | 2016-04-21T09:25:49.000Z | 2022-03-13T22:56:18.000Z | test/views/error_view_test.exs | utkr98jais/phoenix-battleship | 53b43d44a69c5acb4b452b793cce64980a0302df | [
"MIT"
] | 10 | 2016-04-22T05:33:43.000Z | 2018-04-19T21:51:27.000Z | test/views/error_view_test.exs | utkr98jais/phoenix-battleship | 53b43d44a69c5acb4b452b793cce64980a0302df | [
"MIT"
] | 80 | 2016-04-21T18:53:25.000Z | 2020-12-01T13:32:17.000Z | defmodule Battleship.ErrorViewTest do
use Battleship.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(Battleship.ErrorView, "404.html", []) ==
"Page not found"
end
test "render 500.... | 26.5 | 68 | 0.684391 |
913a488b784467c74e9875eec4e285878fec32ac | 1,179 | ex | Elixir | templates/new/lib/app_name/application.ex | erauer/nerves_bootstrap | 626c86fa284efa7302c07a7c8208ff5ad0cef318 | [
"Apache-2.0"
] | null | null | null | templates/new/lib/app_name/application.ex | erauer/nerves_bootstrap | 626c86fa284efa7302c07a7c8208ff5ad0cef318 | [
"Apache-2.0"
] | null | null | null | templates/new/lib/app_name/application.ex | erauer/nerves_bootstrap | 626c86fa284efa7302c07a7c8208ff5ad0cef318 | [
"Apache-2.0"
] | null | null | null | defmodule <%= app_module %>.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
# See https://hexdocs.pm/elixir/Supervisor.html
# for other strategies and supported options
opts = [... | 27.418605 | 78 | 0.634436 |
913a57360e394dd51ac05024b3781fe6e7c5dff7 | 235 | ex | Elixir | presentation/snippets/browser-sync/gulp.ex | mabrasil/slides-nug_ce-2015 | dedd5c2ca1bbc109b5895ae136eac72a399c2ebd | [
"MIT"
] | null | null | null | presentation/snippets/browser-sync/gulp.ex | mabrasil/slides-nug_ce-2015 | dedd5c2ca1bbc109b5895ae136eac72a399c2ebd | [
"MIT"
] | null | null | null | presentation/snippets/browser-sync/gulp.ex | mabrasil/slides-nug_ce-2015 | dedd5c2ca1bbc109b5895ae136eac72a399c2ebd | [
"MIT"
] | null | null | null | 'use strict';
var gulp = require('gulp')
,browserSync = require('browser-sync');
module.exports = gulp.task('browser-sync', function () {
browserSync.init(files, {
server: {
baseDir: 'src/*'
}
});
});
| 15.666667 | 56 | 0.561702 |
913a5a7c325119040fb058a54762366e974dd521 | 430 | exs | Elixir | ex/apps/reef/test/reef/views/error_view_test.exs | limadelic/corals | be1730551ce7420f12b3b689c79ebd7571892d53 | [
"MIT"
] | null | null | null | ex/apps/reef/test/reef/views/error_view_test.exs | limadelic/corals | be1730551ce7420f12b3b689c79ebd7571892d53 | [
"MIT"
] | null | null | null | ex/apps/reef/test/reef/views/error_view_test.exs | limadelic/corals | be1730551ce7420f12b3b689c79ebd7571892d53 | [
"MIT"
] | null | null | null | defmodule Reef.ErrorViewTest do
use Reef.ConnCase, async: true
# Bring render/3 and render_to_string/3 for testing custom views
import Phoenix.View
test "renders 404.json" do
assert render(Reef.ErrorView, "404.json", []) == %{errors: %{detail: "Not Found"}}
end
test "renders 500.json" do
assert r... | 26.875 | 86 | 0.665116 |
913a6a23b762f6338e1c3b09b0ed6403e8fc3418 | 1,614 | exs | Elixir | mix.exs | groksrc/tablex | ff23bd9df9ad98f4670fa2ef523c27e532158ab5 | [
"MIT"
] | null | null | null | mix.exs | groksrc/tablex | ff23bd9df9ad98f4670fa2ef523c27e532158ab5 | [
"MIT"
] | null | null | null | mix.exs | groksrc/tablex | ff23bd9df9ad98f4670fa2ef523c27e532158ab5 | [
"MIT"
] | null | null | null | defmodule Tablex.Mixfile do
use Mix.Project
def project do
[
app: :tablex,
version: "0.0.1",
elixir: "~> 1.4",
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix, :gettext] ++ Mix.compilers,
start_permanent: Mix.env == :prod,
aliases: aliases(),
deps: de... | 26.032258 | 79 | 0.577447 |
913a90414146ebf1958a886760e4441ffa592971 | 2,692 | exs | Elixir | test/veritaserum_test.exs | chingan-tsc/veritaserum | 724d4c49e188f284c9acc90ea9743bfaac6a8b55 | [
"Apache-2.0"
] | 1 | 2019-04-24T09:28:14.000Z | 2019-04-24T09:28:14.000Z | test/veritaserum_test.exs | chingan-tsc/veritaserum | 724d4c49e188f284c9acc90ea9743bfaac6a8b55 | [
"Apache-2.0"
] | null | null | null | test/veritaserum_test.exs | chingan-tsc/veritaserum | 724d4c49e188f284c9acc90ea9743bfaac6a8b55 | [
"Apache-2.0"
] | null | null | null | defmodule VeritaserumTest do
use ExUnit.Case
doctest Veritaserum
import Veritaserum
describe "when given a list" do
@list ["I love Veritaserum", "I hate nothing"]
test "calculates sentimental value for each" do
assert analyze(@list) == [3, -3]
end
end
describe "when text has relevant ... | 22.621849 | 69 | 0.629272 |
913aace214798b3b7ec47ee3f2f2bd4350835bf8 | 2,128 | ex | Elixir | lib/pairs_one/theme.ex | mxgrn/pairs.one | 25d4ee801323eb0bba1166ee59aaab9982d67a27 | [
"MIT"
] | 143 | 2016-09-23T15:05:36.000Z | 2022-03-03T03:38:42.000Z | lib/pairs_one/theme.ex | mxgrn/pairs.one | 25d4ee801323eb0bba1166ee59aaab9982d67a27 | [
"MIT"
] | 16 | 2016-09-29T06:33:42.000Z | 2021-06-17T18:16:07.000Z | lib/pairs_one/theme.ex | mxgrn/pairs.one | 25d4ee801323eb0bba1166ee59aaab9982d67a27 | [
"MIT"
] | 20 | 2016-09-27T16:25:46.000Z | 2021-06-21T02:03:48.000Z | defmodule PairsOne.Theme do
@moduledoc """
Game themes-related data and operations
"""
@themes [
eighties: %{
title: "Eighties",
cards: 40,
difficulty: 0,
new: false
},
animals: %{
title: "Animals",
cards: 50,
difficulty: 0,
new: false
},
fair... | 16.755906 | 80 | 0.486372 |
913ab570647c11b63d1c9e1f50dbb0de0e2d2136 | 1,459 | ex | Elixir | lib/crawler/linker/path_offliner.ex | Gauthamiv/crawler | 394b09d4e8f4c15abefc6295c1b3e72fb82d5416 | [
"MIT"
] | 1 | 2018-08-15T13:26:19.000Z | 2018-08-15T13:26:19.000Z | lib/crawler/linker/path_offliner.ex | rhnonose/crawler | e0ba256cb4f81e6edfa405febcbc5741ac007f27 | [
"MIT"
] | null | null | null | lib/crawler/linker/path_offliner.ex | rhnonose/crawler | e0ba256cb4f81e6edfa405febcbc5741ac007f27 | [
"MIT"
] | null | null | null | defmodule Crawler.Linker.PathOffliner do
@moduledoc """
Transforms a link to be storeable and linkable offline.
"""
alias Crawler.Linker.PathFinder
@doc """
Transforms a given link so that it can be stored and linked to by other pages.
When a page does not have a file extension (e.g. html) it is treate... | 24.316667 | 80 | 0.65867 |
913affea4ae2a6b5785581229cf6bc08edab831f | 123 | ex | Elixir | lib/commerce_billing/address.ex | bcentinaro/commerce_billing | 8e227b16a38721c8441e0bd74d89ef17befda95c | [
"MIT"
] | 178 | 2015-06-01T19:53:18.000Z | 2022-03-29T00:52:38.000Z | lib/commerce_billing/address.ex | bcentinaro/commerce_billing | 8e227b16a38721c8441e0bd74d89ef17befda95c | [
"MIT"
] | 12 | 2015-05-13T20:33:28.000Z | 2017-02-18T16:17:23.000Z | lib/commerce_billing/address.ex | bcentinaro/commerce_billing | 8e227b16a38721c8441e0bd74d89ef17befda95c | [
"MIT"
] | 38 | 2015-05-12T16:05:52.000Z | 2021-07-23T18:05:24.000Z | defmodule Commerce.Billing.Address do
defstruct [:street1, :street2, :city, :region, :country, :postal_code, :phone]
end
| 30.75 | 80 | 0.747967 |
913b1692de9b50951f1acab4310025fe172e229d | 69 | ex | Elixir | lib/groups_chat_web/views/layout_view.ex | tyde81/groups-chat | 15cf9aca8339bc2c9813540c33ab85ced9fbc25b | [
"MIT"
] | null | null | null | lib/groups_chat_web/views/layout_view.ex | tyde81/groups-chat | 15cf9aca8339bc2c9813540c33ab85ced9fbc25b | [
"MIT"
] | null | null | null | lib/groups_chat_web/views/layout_view.ex | tyde81/groups-chat | 15cf9aca8339bc2c9813540c33ab85ced9fbc25b | [
"MIT"
] | null | null | null | defmodule GroupsChatWeb.LayoutView do
use GroupsChatWeb, :view
end
| 17.25 | 37 | 0.826087 |
913b1ef4cdeb05bb090b7e7227a49ef720e8a9cf | 217 | ex | Elixir | lib/bike_brigade/riders/riders_tag.ex | bikebrigade/dispatch | eb622fe4f6dab7c917d678d3d7a322a01f97da44 | [
"Apache-2.0"
] | 28 | 2021-10-11T01:53:53.000Z | 2022-03-24T17:45:55.000Z | lib/bike_brigade/riders/riders_tag.ex | bikebrigade/dispatch | eb622fe4f6dab7c917d678d3d7a322a01f97da44 | [
"Apache-2.0"
] | 20 | 2021-10-21T08:12:31.000Z | 2022-03-31T13:35:53.000Z | lib/bike_brigade/riders/riders_tag.ex | bikebrigade/dispatch | eb622fe4f6dab7c917d678d3d7a322a01f97da44 | [
"Apache-2.0"
] | null | null | null | defmodule BikeBrigade.Riders.RidersTag do
use BikeBrigade.Schema
alias BikeBrigade.Riders.{Rider, Tag}
schema "riders_tags" do
belongs_to :rider, Rider
belongs_to :tag, Tag
timestamps()
end
end
| 16.692308 | 41 | 0.728111 |
913b869bfbb7ebcd9879d2a9dae609b18e08b1a9 | 1,431 | ex | Elixir | apps/omg_db/lib/omg_db/models/payment_exit_info.ex | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | 1 | 2020-10-06T03:07:47.000Z | 2020-10-06T03:07:47.000Z | apps/omg_db/lib/omg_db/models/payment_exit_info.ex | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | 9 | 2020-09-16T15:31:17.000Z | 2021-03-17T07:12:35.000Z | apps/omg_db/lib/omg_db/models/payment_exit_info.ex | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | 1 | 2020-09-30T17:17:27.000Z | 2020-09-30T17:17:27.000Z | # Copyright 2019-2020 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 ... | 31.8 | 82 | 0.739343 |
913bb4aaa341a3722e048724b2b5fe96e29e3bd6 | 260 | exs | Elixir | config/test.exs | JuliaMathias/name | 0323ffa940b456cc18532e5d906aa2e301216dc4 | [
"MIT"
] | 1 | 2021-08-13T14:18:10.000Z | 2021-08-13T14:18:10.000Z | config/test.exs | JuliaMathias/name | 0323ffa940b456cc18532e5d906aa2e301216dc4 | [
"MIT"
] | 8 | 2021-08-12T23:46:04.000Z | 2021-08-18T19:08:12.000Z | config/test.exs | JuliaMathias/name | 0323ffa940b456cc18532e5d906aa2e301216dc4 | [
"MIT"
] | 1 | 2021-08-15T02:07:19.000Z | 2021-08-15T02:07:19.000Z | use Mix.Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :name, NameWeb.Endpoint,
http: [port: 4002],
server: false
# Print only warnings and errors during test
config :logger, level: :warn
| 23.636364 | 56 | 0.730769 |
913bbb04303e32cb6ed5f6aed79390a816063a47 | 55 | ex | Elixir | lib/hb/repo.ex | lexa62/hb | c6b2169ad3e5af546da3f7ad0d499f5d5d29d044 | [
"MIT"
] | null | null | null | lib/hb/repo.ex | lexa62/hb | c6b2169ad3e5af546da3f7ad0d499f5d5d29d044 | [
"MIT"
] | null | null | null | lib/hb/repo.ex | lexa62/hb | c6b2169ad3e5af546da3f7ad0d499f5d5d29d044 | [
"MIT"
] | null | null | null | defmodule Hb.Repo do
use Ecto.Repo, otp_app: :hb
end
| 13.75 | 29 | 0.727273 |
913bc4d9cd343145be12bb8f99c7f354347eef8b | 5,021 | ex | Elixir | lib/logger/lib/logger/error_handler.ex | ludios/elixir | 1a4018adb9863c1265b306028a6b5d1146479266 | [
"Apache-2.0"
] | null | null | null | lib/logger/lib/logger/error_handler.ex | ludios/elixir | 1a4018adb9863c1265b306028a6b5d1146479266 | [
"Apache-2.0"
] | null | null | null | lib/logger/lib/logger/error_handler.ex | ludios/elixir | 1a4018adb9863c1265b306028a6b5d1146479266 | [
"Apache-2.0"
] | null | null | null | defmodule Logger.ErrorHandler do
@moduledoc false
@behaviour :gen_event
# TODO: Remove this module when we require Erlang/OTP 21+.
def init({otp?, sasl?, threshold}) do
# We store the Logger PID in the state because when we are shutting
# down the Logger application, the Logger process may be terminat... | 31.980892 | 100 | 0.653655 |
913bcfda940cfd7eb4da33d231aaa87519b81665 | 2,883 | exs | Elixir | test/test_helper.exs | nicklayb/php_assoc_map | 9bf8c8c1e0134552d061365d11490306b28c69ae | [
"MIT"
] | 2 | 2019-01-09T14:50:42.000Z | 2020-10-21T02:33:22.000Z | test/test_helper.exs | nicklayb/php_assoc_map | 9bf8c8c1e0134552d061365d11490306b28c69ae | [
"MIT"
] | 1 | 2018-05-29T03:31:43.000Z | 2018-05-29T03:31:43.000Z | test/test_helper.exs | nicklayb/php_assoc_map | 9bf8c8c1e0134552d061365d11490306b28c69ae | [
"MIT"
] | null | null | null | ExUnit.start()
defmodule Mock do
def tabbed_source do
"[\n\t'lvl_1_1'=>[\n\t\t'lvl_2_1'=>1,\n\t\t'lvl_2_2'=>'Single, [quoted\\'] string',\n\t\t'lvl_2_3'=>'Double quoted string'\n\t\t],\n\t'lvl_1_2'=>false,\n\t'lvl_1_3'=>[\n\t\t'lvl_2_1'=>true,\n\t\t'lvl_2_2'=>54.12\n\t\t]\n\t]"
end
def spaced_source do
... | 40.041667 | 327 | 0.565383 |
913be2833decfe98508d1d507694eb920fef95ea | 20,899 | ex | Elixir | clients/content/lib/google_api/content/v2/model/product.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/content/lib/google_api/content/v2/model/product.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/content/lib/google_api/content/v2/model/product.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... | 74.109929 | 473 | 0.663237 |
913bfbf75313526dd01ead978bf873d5a15b4976 | 3,924 | exs | Elixir | test/ja_serializer/param_parser_test.exs | gamesrol/ja_serializer | c48d8fb0fb742bd96c30acd40e24f7395f25af2c | [
"Apache-2.0"
] | null | null | null | test/ja_serializer/param_parser_test.exs | gamesrol/ja_serializer | c48d8fb0fb742bd96c30acd40e24f7395f25af2c | [
"Apache-2.0"
] | null | null | null | test/ja_serializer/param_parser_test.exs | gamesrol/ja_serializer | c48d8fb0fb742bd96c30acd40e24f7395f25af2c | [
"Apache-2.0"
] | null | null | null | defmodule JaSerializer.ParamParserTest do
use ExUnit.Case
import JaSerializer.ParamParser, only: [parse: 1]
setup do
on_exit fn ->
Application.delete_env(:ja_serializer, :key_format)
end
:ok
end
test "attribute and relationship keys are converted" do
params = %{
"data" => %{
... | 25.986755 | 88 | 0.439348 |
913c1b68647d21690a3051ca3afbc206813d6f60 | 3,038 | exs | Elixir | kousa/test/broth/user/admin_update_test.exs | LeonardSSH/dogehouse | 584055ad407bc37fa35cdf36ebb271622e29d436 | [
"MIT"
] | 8 | 2021-06-30T07:02:52.000Z | 2021-08-30T18:58:38.000Z | kousa/test/broth/user/admin_update_test.exs | LeonardSSH/dogehouse | 584055ad407bc37fa35cdf36ebb271622e29d436 | [
"MIT"
] | 12 | 2021-07-06T12:51:13.000Z | 2022-03-16T12:38:18.000Z | kousa/test/broth/user/admin_update_test.exs | LeonardSSH/dogehouse | 584055ad407bc37fa35cdf36ebb271622e29d436 | [
"MIT"
] | 4 | 2021-07-15T20:33:50.000Z | 2022-03-27T12:46:47.000Z | defmodule BrothTest.User.AdminUpdateTest do
use ExUnit.Case, async: true
use KousaTest.Support.EctoSandbox
alias Beef.Schemas.User
alias Beef.Users
alias BrothTest.WsClient
alias BrothTest.WsClientFactory
alias KousaTest.Support.Factory
require WsClient
@ben_github_id Application.compile_env!(:kous... | 27.87156 | 96 | 0.590849 |
913c4ab5b0517b1b8164e3721a13376823fbaacf | 124 | exs | Elixir | example/config/rpi3.exs | pragdave/grizzly | bcd7b46ab2cff1797dac04bc3cd12a36209dd579 | [
"Apache-2.0"
] | null | null | null | example/config/rpi3.exs | pragdave/grizzly | bcd7b46ab2cff1797dac04bc3cd12a36209dd579 | [
"Apache-2.0"
] | null | null | null | example/config/rpi3.exs | pragdave/grizzly | bcd7b46ab2cff1797dac04bc3cd12a36209dd579 | [
"Apache-2.0"
] | null | null | null | use Mix.Config
config :grizzly,
serial_port: "/dev/ttyACM0",
pidof_bin: "/srv/erlang/lib/busybox-0.1.3/priv/bin/pidof"
| 20.666667 | 59 | 0.717742 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.