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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
622fa7b43fa1148091962c6fc0b5b0478e53caaa | 2,437 | ex | Elixir | lib/read_doc/doc_extractor.ex | RobertDober/read_doc | 60aa55d2c9c4dcbfca28ef15a9584c0c1842bd3b | [
"Apache-2.0"
] | 1 | 2018-05-17T16:40:12.000Z | 2018-05-17T16:40:12.000Z | lib/read_doc/doc_extractor.ex | RobertDober/read_doc | 60aa55d2c9c4dcbfca28ef15a9584c0c1842bd3b | [
"Apache-2.0"
] | null | null | null | lib/read_doc/doc_extractor.ex | RobertDober/read_doc | 60aa55d2c9c4dcbfca28ef15a9584c0c1842bd3b | [
"Apache-2.0"
] | null | null | null | defmodule ReadDoc.DocExtractor do
use ReadDoc.Types
@upperCase ~r{\A[[:upper:]]}u
@doc """
Extracts the moduledoc or doc of a function from a module
"""
@spec extract_doc(String.t()) :: string?
def extract_doc(module_or_function_name) do
module_or_function_name
|> extract_untrimmed_doc()
|> ... | 28.011494 | 98 | 0.675421 |
622fc0cb48410927d3a1726617fd875b692b4e60 | 2,125 | exs | Elixir | config/dev.exs | oskarkook/word_battle | 0811b1adca2ccdbd23b769f163e25b33fe3dc2d6 | [
"MIT"
] | null | null | null | config/dev.exs | oskarkook/word_battle | 0811b1adca2ccdbd23b769f163e25b33fe3dc2d6 | [
"MIT"
] | null | null | null | config/dev.exs | oskarkook/word_battle | 0811b1adca2ccdbd23b769f163e25b33fe3dc2d6 | [
"MIT"
] | null | null | null | import 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 esbuild to bundle .js and .css sources.
config :word_battle, WordBattleWeb.Endpoint,
# Binding to l... | 32.692308 | 86 | 0.705882 |
622fce487484953ab7b830b342dee08faa18b4f8 | 1,844 | ex | Elixir | test/support/model_case.ex | cpjolicoeur/pivotal-swimlanes | ebe6b2b48516e6bd8dec557cda2b890f820974be | [
"CC0-1.0"
] | 6 | 2015-10-27T01:46:27.000Z | 2021-04-08T18:28:44.000Z | test/support/model_case.ex | cpjolicoeur/pivotal-swimlanes | ebe6b2b48516e6bd8dec557cda2b890f820974be | [
"CC0-1.0"
] | 66 | 2015-10-23T20:21:12.000Z | 2018-04-18T15:25:57.000Z | test/support/model_case.ex | cpjolicoeur/pivotal-swimlanes | ebe6b2b48516e6bd8dec557cda2b890f820974be | [
"CC0-1.0"
] | null | null | null | defmodule PivotalSwimlanes.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 as... | 27.939394 | 87 | 0.694143 |
622fdc9a5b4968e4ddb163ed57ebcfb8da176045 | 11,203 | exs | Elixir | lib/elixir/test/elixir/protocol_test.exs | evalphobia/elixir | a07a2362e5827b09d8b27be2c1ad2980d25b9768 | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/protocol_test.exs | evalphobia/elixir | a07a2362e5827b09d8b27be2c1ad2980d25b9768 | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/protocol_test.exs | evalphobia/elixir | a07a2362e5827b09d8b27be2c1ad2980d25b9768 | [
"Apache-2.0"
] | null | null | null | Code.require_file "test_helper.exs", __DIR__
defmodule ProtocolTest do
use ExUnit.Case, async: true
doctest Protocol
{_, _, sample_binary, _} =
defprotocol Sample do
@type t :: any
@doc "Ok"
@spec ok(t) :: boolean
def ok(term)
end
@sample_binary sample_binary
{_, _, with_a... | 27.661728 | 105 | 0.658306 |
622ff81e1ead9e0251e1b0be0d7db9cc1becbfb0 | 197 | exs | Elixir | priv/repo/migrations/20170618000952_create_tags_tag.exs | Apps-Team/conferencetools | ce2e16a3e4a521dc4682e736a209e6dd380c050d | [
"Apache-2.0"
] | null | null | null | priv/repo/migrations/20170618000952_create_tags_tag.exs | Apps-Team/conferencetools | ce2e16a3e4a521dc4682e736a209e6dd380c050d | [
"Apache-2.0"
] | 6 | 2017-10-05T20:16:34.000Z | 2017-10-05T20:36:11.000Z | priv/repo/migrations/20170618000952_create_tags_tag.exs | apps-team/events-tools | ce2e16a3e4a521dc4682e736a209e6dd380c050d | [
"Apache-2.0"
] | null | null | null | defmodule EventsTools.Repo.Migrations.CreateEventsTools.Tags.Tag do
use Ecto.Migration
def change do
create table(:tags) do
add :name, :string
timestamps()
end
end
end
| 15.153846 | 67 | 0.690355 |
6230038cce4a46980ec7c2c85b1dd392a7285694 | 3,329 | ex | Elixir | clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/device.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/device.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/device.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... | 46.887324 | 194 | 0.73055 |
62301990bababe943836baa6631b9271f5943a0a | 4,818 | ex | Elixir | lib/level/resolvers/post_connection.ex | mindriot101/level | 0a2cbae151869c2d9b79b3bfb388f5d00739ae12 | [
"Apache-2.0"
] | 928 | 2018-04-03T16:18:11.000Z | 2019-09-09T17:59:55.000Z | lib/level/resolvers/post_connection.ex | mindriot101/level | 0a2cbae151869c2d9b79b3bfb388f5d00739ae12 | [
"Apache-2.0"
] | 74 | 2018-04-03T00:46:50.000Z | 2019-03-10T18:57:27.000Z | lib/level/resolvers/post_connection.ex | mindriot101/level | 0a2cbae151869c2d9b79b3bfb388f5d00739ae12 | [
"Apache-2.0"
] | 89 | 2018-04-03T17:33:20.000Z | 2019-08-19T03:40:20.000Z | defmodule Level.Resolvers.PostConnection do
@moduledoc """
A paginated connection for fetching a user's mentioned posts.
"""
import Ecto.Query, warn: false
alias Level.Pagination
alias Level.Pagination.Args
alias Level.Posts
alias Level.Schemas.Group
alias Level.Schemas.Space
defstruct first: nil... | 29.024096 | 89 | 0.643836 |
62301e299cffc89d13cc5a0c27be42e1ac5ec2b5 | 26,889 | ex | Elixir | clients/analytics_data/lib/google_api/analytics_data/v1beta/api/properties.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/analytics_data/lib/google_api/analytics_data/v1beta/api/properties.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/analytics_data/lib/google_api/analytics_data/v1beta/api/properties.ex | dazuma/elixir-google-api | 6a9897168008efe07a6081d2326735fe332e522c | [
"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... | 51.02277 | 578 | 0.647402 |
623024790edda974931b749065135959e312174c | 371 | exs | Elixir | benchmark/R10_000.KN.U0.F0.exs | kianmeng/csv_schema | c1e45e5139faeb033f8b3106dacfe288aec24b5c | [
"MIT"
] | 12 | 2019-01-15T13:07:09.000Z | 2022-01-22T08:15:46.000Z | benchmark/R10_000.KN.U0.F0.exs | kianmeng/csv_schema | c1e45e5139faeb033f8b3106dacfe288aec24b5c | [
"MIT"
] | 5 | 2019-01-17T11:46:00.000Z | 2021-12-21T09:42:14.000Z | benchmark/R10_000.KN.U0.F0.exs | kianmeng/csv_schema | c1e45e5139faeb033f8b3106dacfe288aec24b5c | [
"MIT"
] | 1 | 2019-09-25T09:58:07.000Z | 2019-09-25T09:58:07.000Z | defmodule R10_000.KN.U0.F0 do
@moduledoc false
use Csv.Schema
schema path: "data/dataset_10_000.csv" do
field :first_name, "first_name"
field :last_name, "last_name"
field :email, "email"
field :gender, "gender"
field :ip_address, "ip_address"
field :date_of_birth, "date_of_birth"
end
... | 23.1875 | 46 | 0.684636 |
62305b5b800c54d0083ff74b7d4476de35743998 | 1,010 | ex | Elixir | web/controllers/bookmark_controller.ex | underhilllabs/phx-bookmarks | 6c761ef0f602dbde267c337906a17f098f6bbe50 | [
"MIT"
] | null | null | null | web/controllers/bookmark_controller.ex | underhilllabs/phx-bookmarks | 6c761ef0f602dbde267c337906a17f098f6bbe50 | [
"MIT"
] | 2 | 2015-07-03T18:50:46.000Z | 2015-07-03T18:52:14.000Z | web/controllers/bookmark_controller.ex | underhilllabs/phx-bookmarks | 6c761ef0f602dbde267c337906a17f098f6bbe50 | [
"MIT"
] | null | null | null | defmodule PhxBkmark.BookmarkController do
use PhxBkmark.Web, :controller
import Ecto.Query, only: [from: 2]
@per_page 20
plug :action
def index(conn, params) do
page = Map.get(params, "page", "1") |> String.to_integer
last_page = bookmark_count_query |> Repo.get
bookmarks = bookmark_query ... | 24.047619 | 102 | 0.662376 |
623067ff2777265443e391d1807e22edd7ef8a6f | 956 | exs | Elixir | config/config.exs | xorvo/elixir_blog | 67123c05eb4cacfa482604ce62c4f5a7e9bc1690 | [
"MIT"
] | null | null | null | config/config.exs | xorvo/elixir_blog | 67123c05eb4cacfa482604ce62c4f5a7e9bc1690 | [
"MIT"
] | null | null | null | config/config.exs | xorvo/elixir_blog | 67123c05eb4cacfa482604ce62c4f5a7e9bc1690 | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
use Mix.Config
# General application configuration
config :elixir_blog,
ecto_repos: [ElixirBlog.Re... | 34.142857 | 86 | 0.767782 |
6230817d9ea9f3c1950f390bd3fa1b76faf07e72 | 12,304 | exs | Elixir | test/teslamate_web/live/charge_cost_live_test.exs | Ma233/teslamate | 0ea19c19452623941681ca54ecbdc8f2353566ed | [
"MIT"
] | 1 | 2021-10-09T07:28:27.000Z | 2021-10-09T07:28:27.000Z | test/teslamate_web/live/charge_cost_live_test.exs | Ma233/teslamate | 0ea19c19452623941681ca54ecbdc8f2353566ed | [
"MIT"
] | null | null | null | test/teslamate_web/live/charge_cost_live_test.exs | Ma233/teslamate | 0ea19c19452623941681ca54ecbdc8f2353566ed | [
"MIT"
] | 1 | 2021-07-11T08:11:47.000Z | 2021-07-11T08:11:47.000Z | defmodule TeslaMateWeb.ChargeLive.CostTest do
use TeslaMateWeb.ConnCase, async: false
use TeslaMate.VehicleCase, async: false
alias TeslaMate.Log.ChargingProcess
alias TeslaMate.{Log, Locations, Repo}
import TestHelper, only: [decimal: 1]
describe "metadata" do
test "hides the date if the charge has ... | 32.378947 | 139 | 0.527146 |
6230ba5ed5d354743fc8bd60d7b55907c533231e | 1,159 | exs | Elixir | ex/apps/corals/test/examples/game_of_life/corals/in_rules.exs | limadelic/corals | be1730551ce7420f12b3b689c79ebd7571892d53 | [
"MIT"
] | null | null | null | ex/apps/corals/test/examples/game_of_life/corals/in_rules.exs | limadelic/corals | be1730551ce7420f12b3b689c79ebd7571892d53 | [
"MIT"
] | null | null | null | ex/apps/corals/test/examples/game_of_life/corals/in_rules.exs | limadelic/corals | be1730551ce7420f12b3b689c79ebd7571892d53 | [
"MIT"
] | null | null | null | defmodule GoL.In do
import Corals
import Enum, only: [map: 2, find: 2]
import List, only: [flatten: 1]
import String, only: [pad_trailing: 2]
define __MODULE__, %{
require: [GoL.Glyphs],
rules: [
[
when: is?(%{cells: glyph} when is_atom glyph),
cells: fn %{cells: glyph, _glyphs... | 33.114286 | 99 | 0.520276 |
6230f4c33ec9f171229c7bd494f65d7d860602ef | 5,142 | ex | Elixir | lib/message.ex | wasnotrice/clover | d0e37938bea3ddb8b5ff9d32b8b6d76d461ad64b | [
"Apache-2.0"
] | 2 | 2018-10-17T17:12:33.000Z | 2021-02-09T03:23:58.000Z | lib/message.ex | wasnotrice/clover | d0e37938bea3ddb8b5ff9d32b8b6d76d461ad64b | [
"Apache-2.0"
] | 8 | 2018-10-15T19:17:17.000Z | 2018-10-23T20:07:07.000Z | lib/message.ex | wasnotrice/clover | d0e37938bea3ddb8b5ff9d32b8b6d76d461ad64b | [
"Apache-2.0"
] | null | null | null | defmodule Clover.Message do
@moduledoc """
A Clover message
"""
alias Clover.{
User
}
@type action :: :say | :typing
@type mention :: {start :: non_neg_integer, length :: non_neg_integer}
@type mentions :: %{required(String.t()) => mention}
@type mention_format :: nil | Regex.t() | [Regex.t()]
... | 23.916279 | 87 | 0.586348 |
6230fc048581e7ec7349001370fe2aa735ab641d | 193 | ex | Elixir | lib/phone/eg.ex | net/phone | 18e1356d2f8d32fe3f95638c3c44bceab0164fb2 | [
"Apache-2.0"
] | null | null | null | lib/phone/eg.ex | net/phone | 18e1356d2f8d32fe3f95638c3c44bceab0164fb2 | [
"Apache-2.0"
] | null | null | null | lib/phone/eg.ex | net/phone | 18e1356d2f8d32fe3f95638c3c44bceab0164fb2 | [
"Apache-2.0"
] | null | null | null | defmodule Phone.EG do
@moduledoc false
use Helper.Country
def regex, do: ~r/^(20)()(.+)/
def country, do: "Egypt"
def a2, do: "EG"
def a3, do: "EGY"
matcher :regex, ["20"]
end
| 14.846154 | 32 | 0.590674 |
623136e64ac8b24e78eb47f06c76692c5ccd2ba0 | 2,901 | exs | Elixir | test/acceptance/html/html_test.exs | manuel-rubio/earmark | d747d73d31e8b8fa39389b01fc67cc53d946b707 | [
"Apache-1.1"
] | 734 | 2015-01-05T19:08:00.000Z | 2022-03-28T14:04:21.000Z | test/acceptance/html/html_test.exs | manuel-rubio/earmark | d747d73d31e8b8fa39389b01fc67cc53d946b707 | [
"Apache-1.1"
] | 343 | 2015-01-01T04:56:57.000Z | 2022-02-15T11:00:57.000Z | test/acceptance/html/html_test.exs | manuel-rubio/earmark | d747d73d31e8b8fa39389b01fc67cc53d946b707 | [
"Apache-1.1"
] | 169 | 2015-02-26T15:18:05.000Z | 2022-03-18T08:00:42.000Z | defmodule Acceptance.Html.HtmlBlocksTest do
use Support.AcceptanceTestCase
describe "HTML blocks" do
test "tables are just tables again (or was that mountains?)" do
markdown = "<table>\n <tr>\n <td>\n hi\n </td>\n </tr>\n</table>\n\nokay.\n"
html = "<table>\n <tr> <td>... | 31.879121 | 132 | 0.56808 |
62315a55f3df5dc2e90e3590e3d02d2417b5e26a | 4,126 | exs | Elixir | integration_test/myxql/storage_test.exs | hauleth/ecto_sql | 1d7f4b73bfa04e02a26bba8b3ea79a457850af0f | [
"Apache-2.0"
] | 4 | 2019-06-26T22:43:55.000Z | 2020-01-19T17:37:07.000Z | integration_test/myxql/storage_test.exs | hauleth/ecto_sql | 1d7f4b73bfa04e02a26bba8b3ea79a457850af0f | [
"Apache-2.0"
] | 3 | 2019-07-15T06:54:40.000Z | 2020-02-09T16:36:44.000Z | integration_test/myxql/storage_test.exs | hauleth/ecto_sql | 1d7f4b73bfa04e02a26bba8b3ea79a457850af0f | [
"Apache-2.0"
] | 15 | 2019-01-15T18:17:44.000Z | 2020-01-12T03:52:35.000Z | Code.require_file("../support/file_helpers.exs", __DIR__)
defmodule Ecto.Integration.StorageTest do
use ExUnit.Case
@moduletag :capture_log
@base_migration 5_000_000
import Support.FileHelpers
alias Ecto.Integration.{PoolRepo, TestRepo}
def params do
# Pass log false to ensure we can still create/dr... | 28.260274 | 97 | 0.664324 |
62315b5d2cd4a6f362047273350fe469e1c9f6e1 | 621 | ex | Elixir | lib/flasked/config.ex | asaaki/flasked | a6296313db8e455a0d9ca31f9e80a3d21b64aa80 | [
"MIT"
] | 47 | 2015-12-26T02:37:17.000Z | 2020-01-13T22:49:11.000Z | lib/flasked/config.ex | asaaki/flasked | a6296313db8e455a0d9ca31f9e80a3d21b64aa80 | [
"MIT"
] | 3 | 2016-02-29T13:31:07.000Z | 2019-05-06T17:51:13.000Z | lib/flasked/config.ex | asaaki/flasked | a6296313db8e455a0d9ca31f9e80a3d21b64aa80 | [
"MIT"
] | 4 | 2016-02-26T23:45:22.000Z | 2017-02-06T23:06:17.000Z | defmodule Flasked.Config do
@moduledoc false
def check do
unless keys_present? do
raise(ArgumentError, message: ":otp_app and :map_file or :map_data are required in :flasked configuration")
end
end
defp keys_present? do
flasked_env = Application.get_all_env(:flasked)
Dict.has_key?(flaske... | 31.05 | 113 | 0.723027 |
6231623c36eb7ada82e8119df46da87ec39c5723 | 82 | exs | Elixir | apps/blockchain/.formatter.exs | 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/blockchain/.formatter.exs | 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/blockchain/.formatter.exs | 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 | [
inputs: ["{mix,.formatter}.exs", "{config,lib,test,scripts}/**/*.{ex,exs}"]
]
| 20.5 | 77 | 0.560976 |
6231a3df8d8c85dba2d41e1980d99a99220be8ad | 404 | exs | Elixir | test/game/message_test.exs | stevegrossi/ex_venture | e02d5a63fdb882d92cfb4af3e15f7b48ad7054aa | [
"MIT"
] | 2 | 2019-05-14T11:36:44.000Z | 2020-07-01T08:54:04.000Z | test/game/message_test.exs | nickwalton/ex_venture | d8ff1b0181db03f9ddcb7610ae7ab533feecbfbb | [
"MIT"
] | null | null | null | test/game/message_test.exs | nickwalton/ex_venture | d8ff1b0181db03f9ddcb7610ae7ab533feecbfbb | [
"MIT"
] | 1 | 2021-01-29T14:12:40.000Z | 2021-01-29T14:12:40.000Z | defmodule Game.MessageTest do
use ExUnit.Case
alias Game.Message
describe "simple message formatting" do
test "capitalizes the first character" do
assert Message.format("hi.") == "Hi."
assert Message.format("Hi.") == "Hi."
end
test "adds punctuation if required" do
assert Message.... | 22.444444 | 45 | 0.636139 |
6231c9d3c692d31b8d5d70c718984075b10d13b8 | 1,457 | ex | Elixir | lib/calculator.ex | dsantosmerino/odometex | 38b23d75ba0cc8a7de834d0a4f0a24cc26611b06 | [
"MIT"
] | 4 | 2018-05-12T15:07:03.000Z | 2018-05-17T17:09:06.000Z | lib/calculator.ex | dsantosmerino/odometex | 38b23d75ba0cc8a7de834d0a4f0a24cc26611b06 | [
"MIT"
] | 2 | 2018-05-14T13:52:35.000Z | 2018-10-30T21:20:25.000Z | lib/calculator.ex | dsantosmerino/odometex | 38b23d75ba0cc8a7de834d0a4f0a24cc26611b06 | [
"MIT"
] | null | null | null | defmodule Odometex.Calculator do
@moduledoc """
Provides different distances methods with a range of ordering options.
"""
alias Odometex.Result
@distances "#{__DIR__}/../config/distances.json"
|> File.read!
|> Poison.decode!(as: [%Result{}])
@doc """
Returns a list of results taking first ... | 24.283333 | 75 | 0.639671 |
6231e14beb117aff06316d35e4f84619099f930c | 503 | ex | Elixir | peep_blog_api/web/models/post.ex | ultimatemonty/embloginator | b1b25374d56899e054e6df73a3841d388d095d83 | [
"MIT"
] | null | null | null | peep_blog_api/web/models/post.ex | ultimatemonty/embloginator | b1b25374d56899e054e6df73a3841d388d095d83 | [
"MIT"
] | null | null | null | peep_blog_api/web/models/post.ex | ultimatemonty/embloginator | b1b25374d56899e054e6df73a3841d388d095d83 | [
"MIT"
] | null | null | null | defmodule PeepBlogApi.Post do
use PeepBlogApi.Web, :model
schema "posts" do
field :title, :string
field :body, :string
timestamps
end
@required_fields ~w(title body)
@optional_fields ~w()
@doc """
Creates a changeset based on the `model` and `params`.
If no params are provided, an inval... | 20.12 | 61 | 0.685885 |
6232005a576099ddfc9d0ccafc6dc1eaad2c7dc1 | 1,073 | ex | Elixir | lib/find_my_personal/application.ex | romenigld/find_my_personal | d3545d29cdf80c6e2a90b0bb784579bbd488120c | [
"MIT"
] | null | null | null | lib/find_my_personal/application.ex | romenigld/find_my_personal | d3545d29cdf80c6e2a90b0bb784579bbd488120c | [
"MIT"
] | 11 | 2022-01-12T02:39:42.000Z | 2022-02-09T02:17:04.000Z | lib/find_my_personal/application.ex | gissandrogama/find_my_personal | 12f23b37e967949af9f3e511cf1ce684452d8f66 | [
"MIT"
] | null | null | null | defmodule FindMyPersonal.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
children = [
# Start the Ecto repository
FindMyPersonal.Repo,
# Start the Telemetry supervisor... | 30.657143 | 72 | 0.719478 |
6232038abc1f7e8fd8a2f9d41e02e5aeb68e51e1 | 1,418 | ex | Elixir | examples/phoenix_basic_example/test/support/data_case.ex | Ninigi/ecto_dripper | ca472e90aafd3313b91a268f81e6aa936c59e021 | [
"MIT"
] | 1 | 2018-06-28T11:15:14.000Z | 2018-06-28T11:15:14.000Z | examples/phoenix_basic_example/test/support/data_case.ex | Ninigi/ecto_dripper | ca472e90aafd3313b91a268f81e6aa936c59e021 | [
"MIT"
] | null | null | null | examples/phoenix_basic_example/test/support/data_case.ex | Ninigi/ecto_dripper | ca472e90aafd3313b91a268f81e6aa936c59e021 | [
"MIT"
] | null | null | null | defmodule DripperExample.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, eve... | 26.259259 | 77 | 0.687588 |
62321f1334982378541dc5c24fd123df192abec0 | 285 | ex | Elixir | apps/bytepack_web/lib/bytepack_web/views/package_helpers.ex | dashbitco/bytepack_archive | 79f8e62149d020f2afcc501592ed399f7ce7a60b | [
"Unlicense"
] | 313 | 2020-12-03T17:26:24.000Z | 2022-03-18T09:05:14.000Z | apps/bytepack_web/lib/bytepack_web/views/package_helpers.ex | dashbitco/bytepack_archive | 79f8e62149d020f2afcc501592ed399f7ce7a60b | [
"Unlicense"
] | null | null | null | apps/bytepack_web/lib/bytepack_web/views/package_helpers.ex | dashbitco/bytepack_archive | 79f8e62149d020f2afcc501592ed399f7ce7a60b | [
"Unlicense"
] | 57 | 2020-12-03T17:41:53.000Z | 2022-03-17T17:28:16.000Z | defmodule BytepackWeb.PackageHelpers do
use Phoenix.HTML
alias BytepackWeb.Router.Helpers, as: Routes
def package_icon(socket, type) when type in ~w(hex npm) do
~E"""
<img src="<%= Routes.static_path(socket, "/images/packages/#{type}_icon.svg") %>" />
"""
end
end
| 25.909091 | 88 | 0.677193 |
6232226276ad8af73744adab21f0942d4aece3e0 | 788 | ex | Elixir | web/views/error_view.ex | nihonjinrxs/peep-stack-tutorial-app | 8c10b2b589d645ba5a3e31f86754828579e139c9 | [
"MIT"
] | null | null | null | web/views/error_view.ex | nihonjinrxs/peep-stack-tutorial-app | 8c10b2b589d645ba5a3e31f86754828579e139c9 | [
"MIT"
] | null | null | null | web/views/error_view.ex | nihonjinrxs/peep-stack-tutorial-app | 8c10b2b589d645ba5a3e31f86754828579e139c9 | [
"MIT"
] | null | null | null | defmodule Peepchat.ErrorView do
use Peepchat.Web, :view
use JaSerializer.PhoenixView
def render("401.json", _assigns) do
%{title: "Unauthorized", code: 401}
|> JaSerializer.ErrorSerializer.format
end
def render("403.json", _assigns) do
%{title: "Forbidden", code: 403}
|> JaSerializer.ErrorSe... | 25.419355 | 48 | 0.695431 |
62322bd034d2d5407bf753f1c30ccb91c8d9d5be | 2,075 | ex | Elixir | lib/mappers_web/telemetry.ex | evandiewald/mappers | 7359cfb39a4d9d26c42f5917ee04a7e41d3291bc | [
"Apache-2.0"
] | 32 | 2021-04-22T01:55:31.000Z | 2022-02-25T13:17:21.000Z | lib/mappers_web/telemetry.ex | evandiewald/mappers | 7359cfb39a4d9d26c42f5917ee04a7e41d3291bc | [
"Apache-2.0"
] | 58 | 2021-06-04T18:42:59.000Z | 2022-03-31T07:17:01.000Z | lib/mappers_web/telemetry.ex | evandiewald/mappers | 7359cfb39a4d9d26c42f5917ee04a7e41d3291bc | [
"Apache-2.0"
] | 13 | 2021-04-10T06:09:15.000Z | 2022-03-23T13:07:37.000Z | defmodule MappersWeb.Telemetry do
use Supervisor
import Telemetry.Metrics
def start_link(arg) do
Supervisor.start_link(__MODULE__, arg, name: __MODULE__)
end
@impl true
def init(_arg) do
children = [
# Telemetry poller will execute the given period measurements
# every 10_000ms. Learn ... | 32.421875 | 86 | 0.65494 |
62324b996e714720847e84547bf0f25ffb45093b | 211 | exs | Elixir | priv/repo/migrations/20201203090834_create_supply_chain.exs | BailianBlockchain/Bailian_Supply_Chain | 8341e974b133c86f48488cb52ec4b3b281a99eb5 | [
"MIT"
] | 5 | 2020-12-10T07:24:18.000Z | 2021-12-15T08:26:05.000Z | priv/repo/migrations/20201203090834_create_supply_chain.exs | BailianBlockchain/Bailian_Supply_Chain | 8341e974b133c86f48488cb52ec4b3b281a99eb5 | [
"MIT"
] | null | null | null | priv/repo/migrations/20201203090834_create_supply_chain.exs | BailianBlockchain/Bailian_Supply_Chain | 8341e974b133c86f48488cb52ec4b3b281a99eb5 | [
"MIT"
] | 2 | 2020-12-12T17:06:13.000Z | 2021-04-09T02:12:31.000Z | defmodule SupplyChain.Repo.Migrations.CreateChain do
use Ecto.Migration
def change do
create table(:chain) do
add :title, :string
add :abstract, :string
timestamps()
end
end
end
| 17.583333 | 52 | 0.672986 |
62324bc1fa3d81e33903887f426ac97700e9f077 | 12,914 | exs | Elixir | test/protox/encode_test.exs | sdrew/protox | c28d02f1626b5cd39bad7de2b415d20ebbdf76ee | [
"MIT"
] | null | null | null | test/protox/encode_test.exs | sdrew/protox | c28d02f1626b5cd39bad7de2b415d20ebbdf76ee | [
"MIT"
] | null | null | null | test/protox/encode_test.exs | sdrew/protox | c28d02f1626b5cd39bad7de2b415d20ebbdf76ee | [
"MIT"
] | null | null | null | defmodule Protox.EncodeTest do
use ExUnit.Case
Code.require_file("test/messages.exs")
test "Empty" do
assert %Sub{} |> Protox.Encode.encode!() |> :binary.list_to_bin() == <<>>
end
test "Empty, with non throwing encode/1" do
assert {:ok, []} == Protox.Encode.encode(%Sub{})
end
test "Empty, unkn... | 33.455959 | 101 | 0.509757 |
6232661abca3b5f2c9a6c7e5ed5e8fe49c2676bf | 863 | ex | Elixir | Rocketpay/lib/rocketpay_web/views/accounts_view.ex | Daniel-Vinicius/Rocketpay | 2f5dc18e9313a85196f4871bf052b3e10469192c | [
"MIT"
] | 3 | 2021-02-22T20:12:57.000Z | 2021-11-08T08:56:17.000Z | Rocketpay/lib/rocketpay_web/views/accounts_view.ex | Daniel-Vinicius/Rocketpay | 2f5dc18e9313a85196f4871bf052b3e10469192c | [
"MIT"
] | null | null | null | Rocketpay/lib/rocketpay_web/views/accounts_view.ex | Daniel-Vinicius/Rocketpay | 2f5dc18e9313a85196f4871bf052b3e10469192c | [
"MIT"
] | 2 | 2021-03-04T12:07:52.000Z | 2021-06-04T12:36:49.000Z | defmodule RocketpayWeb.AccountsView do
alias Rocketpay.Account
alias Rocketpay.Accounts.Transactions.Response, as: TransactionResponse
def render("update.json", %{
account: %Account{
id: account_id,
balance: balance
}
}) do
%{
message: "Balance changed sucessfu... | 22.710526 | 93 | 0.579374 |
62326709e893ba239fd6331aebef47a57e2619d5 | 196 | ex | Elixir | lib/phone/la.ex | net/phone | 18e1356d2f8d32fe3f95638c3c44bceab0164fb2 | [
"Apache-2.0"
] | null | null | null | lib/phone/la.ex | net/phone | 18e1356d2f8d32fe3f95638c3c44bceab0164fb2 | [
"Apache-2.0"
] | null | null | null | lib/phone/la.ex | net/phone | 18e1356d2f8d32fe3f95638c3c44bceab0164fb2 | [
"Apache-2.0"
] | null | null | null | defmodule Phone.LA do
@moduledoc false
use Helper.Country
def regex, do: ~r/^(856)(..)(.+)/
def country, do: "Laos"
def a2, do: "LA"
def a3, do: "LAO"
matcher :regex, ["856"]
end
| 15.076923 | 35 | 0.586735 |
62327051fc6cfd398d3c00a56649bc37e1a867b3 | 12,700 | ex | Elixir | lib/aws/generated/managed_blockchain.ex | smanolloff/aws-elixir | c7cb6577802f5010be7e7b6ccb2c0f3c8c73ea84 | [
"Apache-2.0"
] | null | null | null | lib/aws/generated/managed_blockchain.ex | smanolloff/aws-elixir | c7cb6577802f5010be7e7b6ccb2c0f3c8c73ea84 | [
"Apache-2.0"
] | null | null | null | lib/aws/generated/managed_blockchain.ex | smanolloff/aws-elixir | c7cb6577802f5010be7e7b6ccb2c0f3c8c73ea84 | [
"Apache-2.0"
] | null | null | null | # WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
# See https://github.com/aws-beam/aws-codegen for more details.
defmodule AWS.ManagedBlockchain do
@moduledoc """
Amazon Managed Blockchain is a fully managed service for creating and managing
blockchain networks using open source frameworks.
Blockchain allows yo... | 31.909548 | 140 | 0.651417 |
623287d73f13c4ee822c6c9cbd769c97c43e419d | 379 | exs | Elixir | priv/repo/migrations/20171022054947_create_board_card.exs | yrahulkr/phoenix-trello | c1e39be5a43eb6546c00a234816b3dac31b1ac61 | [
"MIT"
] | null | null | null | priv/repo/migrations/20171022054947_create_board_card.exs | yrahulkr/phoenix-trello | c1e39be5a43eb6546c00a234816b3dac31b1ac61 | [
"MIT"
] | null | null | null | priv/repo/migrations/20171022054947_create_board_card.exs | yrahulkr/phoenix-trello | c1e39be5a43eb6546c00a234816b3dac31b1ac61 | [
"MIT"
] | null | null | null | defmodule PhoenixTrello.Repo.Migrations.CreateBoardCard do
use Ecto.Migration
def change do
create table(:board_cards) do
add :board_id, references(:boards, on_delete: :nothing)
add :card_id, references(:cards, on_delete: :nothing)
timestamps()
end
create index(:board_cards, [:board_... | 23.6875 | 61 | 0.701847 |
6232dd319762a961bbcfc654e873ae8fb935605f | 3,008 | ex | Elixir | lib/trento_web/openapi/schema/runner.ex | trento-project/web | 3260b30c781bffbbb0e5205cd650966c4026b9ac | [
"Apache-2.0"
] | 1 | 2022-03-22T16:59:34.000Z | 2022-03-22T16:59:34.000Z | lib/trento_web/openapi/schema/runner.ex | trento-project/web | 3260b30c781bffbbb0e5205cd650966c4026b9ac | [
"Apache-2.0"
] | 24 | 2022-03-22T16:45:25.000Z | 2022-03-31T13:00:02.000Z | lib/trento_web/openapi/schema/runner.ex | trento-project/web | 3260b30c781bffbbb0e5205cd650966c4026b9ac | [
"Apache-2.0"
] | 1 | 2022-03-30T14:16:16.000Z | 2022-03-30T14:16:16.000Z | defmodule TrentoWeb.OpenApi.Schema.Runner do
@moduledoc false
require OpenApiSpex
alias OpenApiSpex.Schema
defmodule ResourceIdentifier do
@moduledoc false
OpenApiSpex.schema(%{
type: :string,
format: :uuid
})
end
defmodule ExecutionStarted do
@moduledoc false
OpenApiSpe... | 26.156522 | 110 | 0.512633 |
6232e0e3ed29f7653a717c1bc1d38b97838e2ebe | 10,339 | ex | Elixir | data/auto_generated/video/53560576c0cb20e93694fc91dc4243d4.ex | breunigs/veloroute | ac3b1eeb2ef2369c27186a138f6ffd8284652dab | [
"0BSD"
] | 12 | 2018-06-15T10:18:43.000Z | 2022-01-24T12:50:54.000Z | data/auto_generated/video/53560576c0cb20e93694fc91dc4243d4.ex | breunigs/veloroute | ac3b1eeb2ef2369c27186a138f6ffd8284652dab | [
"0BSD"
] | 15 | 2018-06-21T18:04:12.000Z | 2021-10-16T12:54:39.000Z | data/auto_generated/video/53560576c0cb20e93694fc91dc4243d4.ex | breunigs/veloroute | ac3b1eeb2ef2369c27186a138f6ffd8284652dab | [
"0BSD"
] | 2 | 2020-03-09T19:21:36.000Z | 2022-01-16T03:29:51.000Z | defmodule(Data.AutoGenerated.Video.Rendered_53560576c0cb20e93694fc91dc4243d4) do
@moduledoc "#{"Thadenstraße (Veloroute 1): Umleitung Baustelle Thadenstraße"}
AUTOGENERATED. To update this file, run mix velo.videos.generate.
See Video.Rendered for functionality.
"
@behaviour Video.Rendered
@impl Video.Re... | 65.025157 | 94 | 0.695619 |
6232e2973caa8b1896d389a2418ac9435f918d7b | 1,129 | ex | Elixir | phoenix/test/support/channel_case.ex | jrpotter/flake-templates | 82799f9fe3ee9d2cfc28550aef74e759a5d5534d | [
"Apache-2.0"
] | null | null | null | phoenix/test/support/channel_case.ex | jrpotter/flake-templates | 82799f9fe3ee9d2cfc28550aef74e759a5d5534d | [
"Apache-2.0"
] | null | null | null | phoenix/test/support/channel_case.ex | jrpotter/flake-templates | 82799f9fe3ee9d2cfc28550aef74e759a5d5534d | [
"Apache-2.0"
] | null | null | null | defmodule HelloWorldWeb.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 interact... | 27.536585 | 72 | 0.731621 |
6232f6c3f78a7d807d1341fcf6ffd2c4a000d170 | 1,856 | ex | Elixir | test/support/model_case.ex | harmon25/phoenix_boiler | dfd80a01753ede234808595b0846802c2c7b9761 | [
"MIT"
] | null | null | null | test/support/model_case.ex | harmon25/phoenix_boiler | dfd80a01753ede234808595b0846802c2c7b9761 | [
"MIT"
] | null | null | null | test/support/model_case.ex | harmon25/phoenix_boiler | dfd80a01753ede234808595b0846802c2c7b9761 | [
"MIT"
] | null | null | null | defmodule PhoenixReactBoiler.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 ... | 28.121212 | 89 | 0.696121 |
62331a563330ca578508abbe404f1663dd483c35 | 99 | ex | Elixir | lib/rube/keep3r/events/remove_job.ex | icecube11/rube | 5d813c5b9f7b984786ac7db6fd2eca0939bf5468 | [
"MIT"
] | 22 | 2021-06-23T06:25:41.000Z | 2022-02-16T19:08:33.000Z | lib/rube/keep3r/events/remove_job.ex | icecube11/rube | 5d813c5b9f7b984786ac7db6fd2eca0939bf5468 | [
"MIT"
] | 16 | 2021-06-21T17:02:13.000Z | 2022-03-21T15:04:14.000Z | lib/rube/keep3r/events/remove_job.ex | icecube11/rube | 5d813c5b9f7b984786ac7db6fd2eca0939bf5468 | [
"MIT"
] | 2 | 2021-06-23T13:40:52.000Z | 2021-09-17T07:25:34.000Z | defmodule Rube.Keep3r.Events.RemoveJob do
defstruct ~w[job liquidity provider block credit]a
end
| 24.75 | 52 | 0.818182 |
623325ac02e8db4042624ea0789449c073bb8ecf | 4,571 | ex | Elixir | lib/tackle/consumer.ex | renderedtext/ex-tackle | 403623f9be6919998fea6871f34aa07ff2655c49 | [
"MIT"
] | 49 | 2016-07-30T13:45:12.000Z | 2021-08-08T13:45:05.000Z | lib/tackle/consumer.ex | renderedtext/ex-tackle | 403623f9be6919998fea6871f34aa07ff2655c49 | [
"MIT"
] | 20 | 2016-08-05T11:54:35.000Z | 2021-06-02T19:43:06.000Z | lib/tackle/consumer.ex | renderedtext/ex-tackle | 403623f9be6919998fea6871f34aa07ff2655c49 | [
"MIT"
] | 14 | 2016-08-05T09:39:51.000Z | 2021-11-29T14:22:28.000Z | defmodule Tackle.Consumer do
defmodule Behaviour do
@callback handle_message(String.t()) :: any
end
# Sequential message handling by default
@prefetch_count 1
defmacro __using__(options) do
url = options[:url]
exchange = options[:exchange]
routing_key = options[:routing_key]
service = o... | 28.391304 | 98 | 0.608838 |
62333a20c2d1b9d623256728287fc14a88598e6b | 205 | exs | Elixir | elixir/camp/word_count.exs | gilmoreg/learn | 0c4f34387f0d2235ecd88ac62fb86a51f87eb5c2 | [
"MIT"
] | null | null | null | elixir/camp/word_count.exs | gilmoreg/learn | 0c4f34387f0d2235ecd88ac62fb86a51f87eb5c2 | [
"MIT"
] | null | null | null | elixir/camp/word_count.exs | gilmoreg/learn | 0c4f34387f0d2235ecd88ac62fb86a51f87eb5c2 | [
"MIT"
] | null | null | null | filename = IO.gets("File to count the words from: ") |> String.trim
words =
File.read!(filename)
|> String.split(~r{(\\n|[^\w'])+})
|> Enum.filter(fn w -> w != "" end)
words |> Enum.count |> IO.puts
| 29.285714 | 67 | 0.580488 |
62336d0895f3eaf3e5f25d5b6fe3c5972b0cabe7 | 378 | ex | Elixir | lib/hl7/2.3/segments/pra.ex | calvinb/elixir-hl7 | 5e953fa11f9184857c0ec4dda8662889f35a6bec | [
"Apache-2.0"
] | null | null | null | lib/hl7/2.3/segments/pra.ex | calvinb/elixir-hl7 | 5e953fa11f9184857c0ec4dda8662889f35a6bec | [
"Apache-2.0"
] | null | null | null | lib/hl7/2.3/segments/pra.ex | calvinb/elixir-hl7 | 5e953fa11f9184857c0ec4dda8662889f35a6bec | [
"Apache-2.0"
] | null | null | null | defmodule HL7.V2_3.Segments.PRA do
@moduledoc false
require Logger
alias HL7.V2_3.{DataTypes}
use HL7.Segment,
fields: [
segment: nil,
pra_primary_key_value: nil,
practioner_group: DataTypes.Ce,
practioner_category: nil,
provider_billing: nil,
specialty: nil,
prac... | 19.894737 | 37 | 0.666667 |
62337ce41ba2d3569e2c05a36bcb7d3de5ee2e2d | 1,868 | ex | Elixir | clients/big_query/lib/google_api/big_query/v2/model/model_reference.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/big_query/lib/google_api/big_query/v2/model/model_reference.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/big_query/lib/google_api/big_query/v2/model/model_reference.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 33.963636 | 114 | 0.702355 |
623384f998c990823a356a8a9fdd3365fa8d602b | 10,951 | ex | Elixir | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/database_instance.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/database_instance.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/database_instance.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... | 70.198718 | 375 | 0.703863 |
6233a081c7e8b5af1ee7a791815897fb24aac899 | 3,817 | ex | Elixir | clients/service_broker/lib/google_api/service_broker/v1/model/google_iam_v1__policy.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/service_broker/lib/google_api/service_broker/v1/model/google_iam_v1__policy.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/service_broker/lib/google_api/service_broker/v1/model/google_iam_v1__policy.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 35.672897 | 154 | 0.673304 |
6233aa2a1dcd5bafb37fb3826d6760af1273b110 | 2,146 | ex | Elixir | lib/plugfilterclaims.ex | exit9/jwt-google-tokens | 8e2d97fde486dc43687d92e91b6951515fef133b | [
"Apache-2.0"
] | null | null | null | lib/plugfilterclaims.ex | exit9/jwt-google-tokens | 8e2d97fde486dc43687d92e91b6951515fef133b | [
"Apache-2.0"
] | null | null | null | lib/plugfilterclaims.ex | exit9/jwt-google-tokens | 8e2d97fde486dc43687d92e91b6951515fef133b | [
"Apache-2.0"
] | 1 | 2019-11-23T12:09:14.000Z | 2019-11-23T12:09:14.000Z | defmodule Jwt.Plugs.FilterClaims do
import Plug.Conn
require Logger
def init(opts), do: opts
def call(conn, []), do: send_401(conn)
def call(conn, opts) do
filter_claims(conn.assigns[:jwtclaims], conn, opts)
end
defp filter_claims([], conn, _), do: send_401(conn)
defp filter... | 30.657143 | 125 | 0.643057 |
6233d2e54c39281511cd69f95601566d31183292 | 1,481 | exs | Elixir | test/sci/polynomial_test.exs | livinginthepast/elixir_sci | 1cb0add7faf46ba8b30dd1a291708f1e0d138ea9 | [
"MIT"
] | 1 | 2017-11-20T23:59:28.000Z | 2017-11-20T23:59:28.000Z | test/sci/polynomial_test.exs | livinginthepast/elixir_sci | 1cb0add7faf46ba8b30dd1a291708f1e0d138ea9 | [
"MIT"
] | null | null | null | test/sci/polynomial_test.exs | livinginthepast/elixir_sci | 1cb0add7faf46ba8b30dd1a291708f1e0d138ea9 | [
"MIT"
] | null | null | null | defmodule Sci.PolynomialTest do
use Sci.TestCase, async: true
doctest Sci.Polynomial
describe "poly/1" do
import Sci.Polynomial, only: [poly: 1]
test "is 1 for an empty set" do
assert [1] == poly([])
end
test "for a list, finds the coefficients of the polynomial whose roots are the elemen... | 24.683333 | 107 | 0.566509 |
6233db639a43d8c735bf6edc0190ca24717a412b | 1,002 | ex | Elixir | apps/blog/web/models/user.ex | richeterre/phoenix-example | cd01a3401387c63dc11e64ca89e500e8eabd5fb0 | [
"MIT"
] | null | null | null | apps/blog/web/models/user.ex | richeterre/phoenix-example | cd01a3401387c63dc11e64ca89e500e8eabd5fb0 | [
"MIT"
] | null | null | null | apps/blog/web/models/user.ex | richeterre/phoenix-example | cd01a3401387c63dc11e64ca89e500e8eabd5fb0 | [
"MIT"
] | null | null | null | defmodule Blog.User do
use Blog.Web, :model
schema "users" do
field :name, :string
field :username, :string
field :password, :string, virtual: true
field :password_hash, :string
has_many :posts, Blog.Post, foreign_key: :author_id
has_many :comments, Blog.Comment, foreign_key: :author_id
... | 25.05 | 79 | 0.661677 |
62340475eca675134888bc4330c145d591765c1e | 459 | ex | Elixir | lib/elixir_leaderboard/application.ex | payomdousti/elixir_leaderboard | af41620bb6cc44c05a121586c26b81ca04a4b598 | [
"Apache-2.0"
] | 2 | 2019-03-02T00:38:03.000Z | 2020-05-22T01:53:23.000Z | lib/elixir_leaderboard/application.ex | payomdousti/elixir_leaderboard | af41620bb6cc44c05a121586c26b81ca04a4b598 | [
"Apache-2.0"
] | null | null | null | lib/elixir_leaderboard/application.ex | payomdousti/elixir_leaderboard | af41620bb6cc44c05a121586c26b81ca04a4b598 | [
"Apache-2.0"
] | 1 | 2019-02-28T00:08:52.000Z | 2019-02-28T00:08:52.000Z | defmodule ElixirLeaderboard.Application do
use Application
require Logger
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
def start(_type, _args) do
import Supervisor.Spec
children = [
{Redix, {System.get_env("REDIS_LEADERBOARD"), [name: :redix]}}
... | 24.157895 | 71 | 0.716776 |
62340e538a1a6ec4d1acd1ca59ab4025512c74ea | 1,971 | ex | Elixir | apps/glayu/lib/glayu/cli/build.ex | pmartinezalvarez/glayu | 8dc30eea4d04c38f5c7999b593c066828423a3dc | [
"MIT"
] | 51 | 2017-05-21T07:27:34.000Z | 2017-11-30T04:34:17.000Z | apps/glayu/lib/glayu/cli/build.ex | doc22940/glayu | 8dc30eea4d04c38f5c7999b593c066828423a3dc | [
"MIT"
] | 17 | 2017-06-14T18:40:44.000Z | 2017-08-20T16:14:58.000Z | apps/glayu/lib/glayu/cli/build.ex | doc22940/glayu | 8dc30eea4d04c38f5c7999b593c066828423a3dc | [
"MIT"
] | 5 | 2017-06-04T19:55:56.000Z | 2017-07-29T16:18:58.000Z | defmodule Glayu.CLI.Build do
@behaviour Glayu.CLI.Command
alias Glayu.Tasks.Build
def options do
[
categories: :boolean,
home: :boolean,
pages: :boolean
]
end
def aliases do
[
c: :categories,
h: :home,
p: :pages
]
end
def help do
IO.ANSI.format(... | 28.565217 | 176 | 0.565703 |
6234102a931e6697dab421224b8382ede7aa4fe2 | 1,125 | exs | Elixir | config/config.exs | moomerman/elixir-mailbox | 7f67324ad81e30e9b11854b08d097c89653bccba | [
"MIT"
] | null | null | null | config/config.exs | moomerman/elixir-mailbox | 7f67324ad81e30e9b11854b08d097c89653bccba | [
"MIT"
] | null | null | null | config/config.exs | moomerman/elixir-mailbox | 7f67324ad81e30e9b11854b08d097c89653bccba | [
"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 |
62342884e8db6bf5f11d1a991a33156a74b32839 | 4,410 | ex | Elixir | dpp/lib/ddp/task_manager.ex | XiaoxiaoZ/Distributed-path-planner | a7467e08e60248793dc55624497fd91bdb45ca14 | [
"MIT"
] | null | null | null | dpp/lib/ddp/task_manager.ex | XiaoxiaoZ/Distributed-path-planner | a7467e08e60248793dc55624497fd91bdb45ca14 | [
"MIT"
] | 6 | 2021-12-12T13:23:17.000Z | 2021-12-17T12:03:46.000Z | dpp/lib/ddp/task_manager.ex | XiaoxiaoZ/Distributed-path-planner | a7467e08e60248793dc55624497fd91bdb45ca14 | [
"MIT"
] | null | null | null | defmodule TaskManager do
@moduledoc """
Task manager server that can distribute tasks to servers.
# TODO1: Need to make it so that the import is the LIST format, funtion to distribute
"""
use GenServer
def start_link(collision_data) do
GenServer.start_link(__MODULE__, collision_... | 33.157895 | 274 | 0.636961 |
6234703a2a8b1e180110b098bf419f4fa388c577 | 1,403 | ex | Elixir | test/support/conn_case.ex | Bleachr/blue_bird | 5ea1d1f047ce379bc73b6d7892fdd44392b09569 | [
"MIT"
] | 52 | 2017-05-29T11:18:43.000Z | 2021-09-17T07:55:14.000Z | test/support/conn_case.ex | Bleachr/blue_bird | 5ea1d1f047ce379bc73b6d7892fdd44392b09569 | [
"MIT"
] | 50 | 2017-05-30T13:21:00.000Z | 2019-12-24T00:17:02.000Z | test/support/conn_case.ex | Bleachr/blue_bird | 5ea1d1f047ce379bc73b6d7892fdd44392b09569 | [
"MIT"
] | 13 | 2017-07-06T20:52:08.000Z | 2020-04-27T06:28:34.000Z | defmodule BlueBird.Test.Support.ConnCase do
@moduledoc """
This module defines the test case to be used by
tests that require setting up a connection.
"""
use ExUnit.CaseTemplate
alias BlueBird.Writer.Blueprint
alias BlueBird.Writer.Swagger
using do
quote do
use Phoenix.ConnTest
impor... | 25.509091 | 78 | 0.686386 |
62348bace66befa862c697f8ea43ce978b27a33b | 1,279 | ex | Elixir | test/support/auth_case.ex | runhyve/webapp | 434b074f98c1ebac657b56062c1c1a54e683dea1 | [
"BSD-2-Clause"
] | 12 | 2019-07-02T14:30:06.000Z | 2022-03-12T08:22:18.000Z | test/support/auth_case.ex | runhyve/webapp | 434b074f98c1ebac657b56062c1c1a54e683dea1 | [
"BSD-2-Clause"
] | 9 | 2020-03-16T20:10:50.000Z | 2021-06-17T17:45:44.000Z | test/support/auth_case.ex | runhyve/webapp | 434b074f98c1ebac657b56062c1c1a54e683dea1 | [
"BSD-2-Clause"
] | null | null | null | defmodule WebappWeb.AuthCase do
use Phoenix.ConnTest
import Ecto.Changeset
alias Webapp.{Accounts, Repo, Sessions}
alias WebappWeb.Auth.Token
def add_user(email) do
name =
email
|> String.split("@")
|> hd()
user = %{
user_name: name,
user_email: email,
user_pass... | 20.301587 | 75 | 0.608288 |
6234ae755877853f12e41539dcd400e8e3f0c4a5 | 1,817 | exs | Elixir | test/ecto_ip_range/util/range_test.exs | olafura/ecto_ip_range | 44c06ca26aafc942a8173941a907c138ae2213bc | [
"Apache-2.0"
] | 3 | 2019-11-14T00:10:40.000Z | 2022-01-20T18:12:44.000Z | test/ecto_ip_range/util/range_test.exs | olafura/ecto_ip_range | 44c06ca26aafc942a8173941a907c138ae2213bc | [
"Apache-2.0"
] | 1 | 2022-01-10T19:27:05.000Z | 2022-01-23T12:31:41.000Z | test/ecto_ip_range/util/range_test.exs | olafura/ecto_ip_range | 44c06ca26aafc942a8173941a907c138ae2213bc | [
"Apache-2.0"
] | 2 | 2020-11-23T07:51:22.000Z | 2022-01-09T22:15:20.000Z | defmodule EctoIPRange.Util.RangeTest do
use ExUnit.Case, async: true
doctest EctoIPRange.Util.Range, import: true
alias EctoIPRange.Util.Range
test "parse_ipv4" do
[
{"32", {0, 0, 0, 0}},
{"28", {0, 0, 0, 15}},
{"24", {0, 0, 0, 255}},
{"20", {0, 0, 15, 255}},
{"16", {0, 0, 2... | 36.34 | 87 | 0.499174 |
6234b98b8c4f6ce941c81b40cd147d598e3e7529 | 23,893 | exs | Elixir | priv/repo/seeds.exs | vinicius-molina/FaTex | bbc05acef7a9697efe9ec0fe64511bce9f26a9b3 | [
"Apache-2.0"
] | 3 | 2019-12-08T19:42:39.000Z | 2020-03-17T13:02:56.000Z | priv/repo/seeds.exs | vinicius-molina/FaTex | bbc05acef7a9697efe9ec0fe64511bce9f26a9b3 | [
"Apache-2.0"
] | 1 | 2021-03-09T19:49:41.000Z | 2021-03-09T19:49:41.000Z | priv/repo/seeds.exs | vinicius-molina/FaTex | bbc05acef7a9697efe9ec0fe64511bce9f26a9b3 | [
"Apache-2.0"
] | 1 | 2019-12-08T19:42:42.000Z | 2019-12-08T19:42:42.000Z | # 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:
#
# Fatex.Repo.insert!(%Fatex.SomeSchema{})
#
# We recommend using the bang functions (`insert!`, `update!`
# and so on) as they will fai... | 38.787338 | 718 | 0.694555 |
6234e594e9097380aa0705acdd233e5e0a7a35c0 | 2,076 | ex | Elixir | clients/content/lib/google_api/content/v21/model/orderreports_list_disbursements_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v21/model/orderreports_list_disbursements_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v21/model/orderreports_list_disbursements_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 39.169811 | 210 | 0.746146 |
62351e671cce2d104fec43ac597d7fbce02813a6 | 11,035 | ex | Elixir | lib/cforum/messages/message.ex | Rolf-B/cforum_ex | 2dcdfc76f0788824a5aa173c249a7051c61af0c4 | [
"MIT"
] | null | null | null | lib/cforum/messages/message.ex | Rolf-B/cforum_ex | 2dcdfc76f0788824a5aa173c249a7051c61af0c4 | [
"MIT"
] | 103 | 2021-10-13T04:24:01.000Z | 2022-03-31T04:26:23.000Z | lib/cforum/messages/message.ex | Rolf-B/cforum_ex | 2dcdfc76f0788824a5aa173c249a7051c61af0c4 | [
"MIT"
] | null | null | null | defmodule Cforum.Messages.Message do
use CforumWeb, :model
use Waffle.Ecto.Schema
import Ecto.Query, warn: false
alias Cforum.Helpers
alias Cforum.Tags.Tag
alias Cforum.Tags
alias Cforum.MessagesTags.MessageTag
alias Cforum.ConfigManager
@primary_key {:message_id, :id, autogenerate: true}
@derive... | 34.701258 | 116 | 0.68473 |
623525c14772e9c89dc61ac3dd43a5202216ddd8 | 1,221 | ex | Elixir | clients/service_consumer_management/lib/google_api/service_consumer_management/v1/connection.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/service_consumer_management/lib/google_api/service_consumer_management/v1/connection.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/service_consumer_management/lib/google_api/service_consumer_management/v1/connection.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... | 38.15625 | 77 | 0.760852 |
62353915c9990816bdd603785d0b6cbb3d730005 | 2,324 | exs | Elixir | test/controllers/post_controller_test.exs | avinoth/spaces | 00bec5adf4568fef73b49e57808033295a837931 | [
"MIT"
] | 1 | 2016-09-13T10:40:53.000Z | 2016-09-13T10:40:53.000Z | test/controllers/post_controller_test.exs | avinoth/spaces | 00bec5adf4568fef73b49e57808033295a837931 | [
"MIT"
] | null | null | null | test/controllers/post_controller_test.exs | avinoth/spaces | 00bec5adf4568fef73b49e57808033295a837931 | [
"MIT"
] | null | null | null | defmodule Spaces.PostControllerTest do
use Spaces.ConnCase
alias Spaces.Post
@valid_attrs %{content: "some content", title: "some content"}
@invalid_attrs %{}
test "lists all entries on index", %{conn: conn} do
conn = get conn, post_path(conn, :index)
assert html_response(conn, 200) =~ "Listing post... | 34.686567 | 98 | 0.67599 |
6235410afe62f4f7fd9150e11ed4afd8e56e4339 | 1,970 | exs | Elixir | test/game_io_test.exs | tpetersen0308/tic_tac_toe | db7dbf77eadc6a9a98f10f3a4c0f27deae5d559f | [
"MIT"
] | null | null | null | test/game_io_test.exs | tpetersen0308/tic_tac_toe | db7dbf77eadc6a9a98f10f3a4c0f27deae5d559f | [
"MIT"
] | null | null | null | test/game_io_test.exs | tpetersen0308/tic_tac_toe | db7dbf77eadc6a9a98f10f3a4c0f27deae5d559f | [
"MIT"
] | null | null | null | defmodule TicTacToe.GameIOTest do
use ExUnit.Case
doctest TicTacToe.GameIO
import ExUnit.CaptureIO
import TicTacToe.GameIO
describe "print_board" do
test "it can print the board" do
board = %{ 1 => "X", 2 => "O", 3 => "X", 4 => "O", 5 => "X", 6 => "O", 7 => "O", 8 => "X", 9 => "O"}
expected_... | 35.178571 | 182 | 0.516751 |
62355653a24f0a6012592b8294699622fc03e5e2 | 3,263 | exs | Elixir | clients/test_client/test/decode_test.exs | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/test_client/test/decode_test.exs | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/test_client/test/decode_test.exs | 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 writing, ... | 29.133929 | 95 | 0.641434 |
62356d3f0924d0af6f8e41018fb8eba99109fb3a | 473 | exs | Elixir | priv/repo/migrations/20180630050542_create_publish_throttle.exs | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | 1 | 2019-05-07T15:03:54.000Z | 2019-05-07T15:03:54.000Z | priv/repo/migrations/20180630050542_create_publish_throttle.exs | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | null | null | null | priv/repo/migrations/20180630050542_create_publish_throttle.exs | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | null | null | null | defmodule MastaniServer.Repo.Migrations.CreatePublishThrottle do
use Ecto.Migration
def change do
create table(:publish_throttles) do
add(:user_id, references(:users, on_delete: :delete_all, null: false))
add(:publish_hour, :utc_datetime)
add(:publish_date, :date)
add(:hour_count, :inte... | 26.277778 | 76 | 0.699789 |
62358ab59bff29d495122473e12eb01c80f8d7d4 | 712 | ex | Elixir | apps/demo_web/lib/demo_web_web/gettext.ex | kimlindholm/gigalixir_umbrella_demo | 369cd029687bb05273d881082afe72e9ac3bc0c1 | [
"MIT"
] | 2 | 2019-05-26T12:57:38.000Z | 2020-01-22T20:28:32.000Z | apps/demo_web/lib/demo_web_web/gettext.ex | kimlindholm/gigalixir_umbrella_demo | 369cd029687bb05273d881082afe72e9ac3bc0c1 | [
"MIT"
] | null | null | null | apps/demo_web/lib/demo_web_web/gettext.ex | kimlindholm/gigalixir_umbrella_demo | 369cd029687bb05273d881082afe72e9ac3bc0c1 | [
"MIT"
] | null | null | null | defmodule DemoWebWeb.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 DemoWebWeb.Gettext
# Simple translation
gettext("Here is t... | 28.48 | 72 | 0.678371 |
62358c651917725448366099a16ba20cc39d6d8c | 2,571 | ex | Elixir | lib/teslamate/locations.ex | normalfaults/teslamate | 9c61150bd5614728447e21789ab6edc5169b631e | [
"MIT"
] | 1 | 2020-05-17T05:05:22.000Z | 2020-05-17T05:05:22.000Z | lib/teslamate/locations.ex | normalfaults/teslamate | 9c61150bd5614728447e21789ab6edc5169b631e | [
"MIT"
] | null | null | null | lib/teslamate/locations.ex | normalfaults/teslamate | 9c61150bd5614728447e21789ab6edc5169b631e | [
"MIT"
] | null | null | null | defmodule TeslaMate.Locations do
@moduledoc """
The Locations context.
"""
import Ecto.Query, warn: false
alias TeslaMate.Repo
alias TeslaMate.Locations.{Address, Geocoder, GeoFence}
## Address
def create_address(attrs \\ %{}) do
%Address{}
|> Address.changeset(attrs)
|> Repo.insert()
... | 24.254717 | 100 | 0.61727 |
6235940c7547e5f686e19ae4abd02ff57761e7e7 | 2,319 | ex | Elixir | web/api/schema/account/user.ex | ZURASTA/bonbon | 231888326535a11aa7e7c4ed93e0a0ba01411d95 | [
"BSD-2-Clause"
] | 1 | 2017-06-15T11:20:27.000Z | 2017-06-15T11:20:27.000Z | web/api/schema/account/user.ex | ScrimpyCat/bonbon | 231888326535a11aa7e7c4ed93e0a0ba01411d95 | [
"BSD-2-Clause"
] | null | null | null | web/api/schema/account/user.ex | ScrimpyCat/bonbon | 231888326535a11aa7e7c4ed93e0a0ba01411d95 | [
"BSD-2-Clause"
] | 2 | 2017-07-25T10:16:19.000Z | 2017-08-02T06:54:22.000Z | defmodule Bonbon.API.Schema.Account.User do
use Absinthe.Schema
@moduledoc false
@desc "A user account"
object :user do
field :id, :id, description: "The id of the user"
field :name, :string, description: "The name of the user"
field :email, :string, description: "The email of t... | 42.944444 | 169 | 0.569642 |
6235a3c063f4487e10affc3d97ae465e64ae33d6 | 563 | ex | Elixir | lib/shorten_web/controllers/fallback_controller.ex | albydarned/shorten | af4f870dbb0f9c3b0699712cc27370e83ed3a730 | [
"MIT"
] | 3 | 2018-09-14T16:16:11.000Z | 2019-07-12T22:25:50.000Z | lib/shorten_web/controllers/fallback_controller.ex | albydarned/shorten | af4f870dbb0f9c3b0699712cc27370e83ed3a730 | [
"MIT"
] | null | null | null | lib/shorten_web/controllers/fallback_controller.ex | albydarned/shorten | af4f870dbb0f9c3b0699712cc27370e83ed3a730 | [
"MIT"
] | 1 | 2019-07-12T22:25:53.000Z | 2019-07-12T22:25:53.000Z | defmodule ShortenWeb.FallbackController do
@moduledoc """
Translates controller action results into valid `Plug.Conn` responses.
See `Phoenix.Controller.action_fallback/1` for more details.
"""
use ShortenWeb, :controller
def call(conn, {:error, %Ecto.Changeset{} = changeset}) do
conn
|> put_statu... | 26.809524 | 75 | 0.705151 |
6235a72c40bc6520defdff067c8588a975a0d2ed | 916 | ex | Elixir | clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/metadata.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/metadata.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/metadata.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 33.925926 | 74 | 0.767467 |
6235a73d81dceadb2cb254a8867da024d4f52762 | 2,974 | ex | Elixir | clients/you_tube/lib/google_api/you_tube/v3/model/super_chat_event_list_response.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/you_tube/lib/google_api/you_tube/v3/model/super_chat_event_list_response.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/you_tube/lib/google_api/you_tube/v3/model/super_chat_event_list_response.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 43.735294 | 188 | 0.704438 |
6235e31cfde580317cb54d63149cf5f0e95a0354 | 612 | ex | Elixir | lib/blanket/heir/supervisor.ex | niahoo/blanket | f2024ef3016db15389414ab7ba79e1f3a27444fb | [
"MIT"
] | 6 | 2015-09-04T08:25:39.000Z | 2019-03-01T15:46:00.000Z | lib/blanket/heir/supervisor.ex | niahoo/blanket | f2024ef3016db15389414ab7ba79e1f3a27444fb | [
"MIT"
] | null | null | null | lib/blanket/heir/supervisor.ex | niahoo/blanket | f2024ef3016db15389414ab7ba79e1f3a27444fb | [
"MIT"
] | null | null | null | defmodule Blanket.Heir.Supervisor do
@moduledoc """
The supervisor for the `:blanket` application.
It's a simple_one_for_one/temporary : the children are never restared. Table
owner processes must claim a new heir when they receive the 'DOWN' message for
their heir. (If they ask so).
"""
use Supervisor
... | 23.538462 | 80 | 0.699346 |
62361797197e932c1dbc0fa242ffc86eaee2a5e3 | 1,140 | ex | Elixir | lib/elm/ecto/package.ex | HenkPoley/ellie | 045212b56142341fc95b79659c3ca218b0d5d282 | [
"BSD-3-Clause"
] | 377 | 2018-04-05T03:36:00.000Z | 2022-03-30T19:12:44.000Z | lib/elm/ecto/package.ex | HenkPoley/ellie | 045212b56142341fc95b79659c3ca218b0d5d282 | [
"BSD-3-Clause"
] | 91 | 2018-05-24T21:56:06.000Z | 2022-02-26T03:54:04.000Z | lib/elm/ecto/package.ex | HenkPoley/ellie | 045212b56142341fc95b79659c3ca218b0d5d282 | [
"BSD-3-Clause"
] | 34 | 2018-05-29T03:54:35.000Z | 2022-01-13T07:12:46.000Z | defmodule Elm.Ecto.Package do
alias Elm.Package
@behaviour Ecto.Type
def up do
Ecto.Migration.execute("""
do $$ begin
if not exists (select 1 from pg_type where typname = 'elm_package') then
create type elm_package as (
name elm_name,
version elm_version
... | 22.8 | 80 | 0.591228 |
62368907d2c11e77a36d43fcc96359f5d02aa5ba | 706 | ex | Elixir | web/gettext.ex | Skipper1992/proa_user | f28f007e19745b7095feaba71f3172e06af6d301 | [
"BSD-3-Clause"
] | null | null | null | web/gettext.ex | Skipper1992/proa_user | f28f007e19745b7095feaba71f3172e06af6d301 | [
"BSD-3-Clause"
] | null | null | null | web/gettext.ex | Skipper1992/proa_user | f28f007e19745b7095feaba71f3172e06af6d301 | [
"BSD-3-Clause"
] | null | null | null | defmodule ProaUser.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 ProaUser.Gettext
# Simple translation
gettext "Here is the s... | 28.24 | 72 | 0.679887 |
6236d0ddcccaa7a778a4de7285266f9be82eaf6c | 238 | exs | Elixir | priv/repo/migrations/20210307132505_add_referrer_id_to_account_opening_requests.exs | andsleonardo/magnemite | 2a06c1520defeb193d718313ad3fc6a50349bc8d | [
"MIT"
] | null | null | null | priv/repo/migrations/20210307132505_add_referrer_id_to_account_opening_requests.exs | andsleonardo/magnemite | 2a06c1520defeb193d718313ad3fc6a50349bc8d | [
"MIT"
] | null | null | null | priv/repo/migrations/20210307132505_add_referrer_id_to_account_opening_requests.exs | andsleonardo/magnemite | 2a06c1520defeb193d718313ad3fc6a50349bc8d | [
"MIT"
] | null | null | null | defmodule Magnemite.Repo.Migrations.AddReferrerIdToAccountOpeningRequests do
use Ecto.Migration
def change do
alter table(:account_opening_requests) do
add :referrer_id, references(:profiles, type: :uuid)
end
end
end
| 23.8 | 76 | 0.768908 |
6236d3d05d7a818f0bb7e78cc78a3bf4f1d88938 | 2,182 | ex | Elixir | lib/sanbase/signals/history/daily_active_addresses_history.ex | sitedata/sanbase2 | 8da5e44a343288fbc41b68668c6c80ae8547d557 | [
"MIT"
] | null | null | null | lib/sanbase/signals/history/daily_active_addresses_history.ex | sitedata/sanbase2 | 8da5e44a343288fbc41b68668c6c80ae8547d557 | [
"MIT"
] | 1 | 2021-07-24T16:26:03.000Z | 2021-07-24T16:26:03.000Z | lib/sanbase/signals/history/daily_active_addresses_history.ex | sitedata/sanbase2 | 8da5e44a343288fbc41b68668c6c80ae8547d557 | [
"MIT"
] | null | null | null | defmodule Sanbase.Signal.History.DailyActiveAddressesHistory do
@moduledoc """
Implementation of historical_trigger_points for daily active addresses.
Currently it is bucketed in `1 day` intervals and goes 90 days back.
"""
alias __MODULE__
alias Sanbase.Signal.Trigger.DailyActiveAddressesSettings
@type... | 31.623188 | 90 | 0.660862 |
62374321c6c94780b9beff0d287581023d703988 | 142 | ex | Elixir | lib/fireball/models/object.ex | Catharz/fireball | bb9f123c0d2d71b16eda01d3838565e6e762de20 | [
"MIT"
] | null | null | null | lib/fireball/models/object.ex | Catharz/fireball | bb9f123c0d2d71b16eda01d3838565e6e762de20 | [
"MIT"
] | null | null | null | lib/fireball/models/object.ex | Catharz/fireball | bb9f123c0d2d71b16eda01d3838565e6e762de20 | [
"MIT"
] | null | null | null | defmodule Object do
defstruct [
:height,
:id,
:name,
:rotation,
:type,
:visible,
:width,
:x,
:y
]
end
| 10.142857 | 19 | 0.471831 |
62374d5d87680b63ee1c97a965de413199bec232 | 552 | ex | Elixir | temporary_experiments/chain.ex | CraigTreptow/elixir-for-programmers | b2a96f12b1dd8621d337e7d15c504f12b079cd3e | [
"MIT"
] | 1 | 2018-10-17T15:13:34.000Z | 2018-10-17T15:13:34.000Z | temporary_experiments/chain.ex | CraigTreptow/elixir-for-programmers | b2a96f12b1dd8621d337e7d15c504f12b079cd3e | [
"MIT"
] | null | null | null | temporary_experiments/chain.ex | CraigTreptow/elixir-for-programmers | b2a96f12b1dd8621d337e7d15c504f12b079cd3e | [
"MIT"
] | null | null | null | defmodule Chain do
defstruct(
next_node: nil,
count: 4
)
def start_link(next_node) do
spawn_link(Chain, :message_loop, [ %Chain{ next_node: next_node } ])
|> Process.register(:chainer)
end
def message_loop(%{ count: 0 }) do
IO.puts "done"
end
def message_loop(state) do
rece... | 19.714286 | 75 | 0.594203 |
62375632dad828ce3fc338898e31235e6751627f | 218 | exs | Elixir | apps/wdpa_models/priv/repo/migrations/20160507114519_create_country.exs | lucidstack/wdpa-tracker | da9a10d08bf5b23aff696aee33f5d6ad1089079d | [
"MIT"
] | 4 | 2016-05-08T10:17:19.000Z | 2019-06-10T15:23:20.000Z | apps/wdpa_models/priv/repo/migrations/20160507114519_create_country.exs | lucidstack/wdpa-tracker | da9a10d08bf5b23aff696aee33f5d6ad1089079d | [
"MIT"
] | null | null | null | apps/wdpa_models/priv/repo/migrations/20160507114519_create_country.exs | lucidstack/wdpa-tracker | da9a10d08bf5b23aff696aee33f5d6ad1089079d | [
"MIT"
] | null | null | null | defmodule WdpaModels.Repo.Migrations.CreateCountry do
use Ecto.Migration
def change do
create table(:countries) do
add :name, :text
add :iso3, :string, size: 3
timestamps
end
end
end
| 15.571429 | 53 | 0.665138 |
6237f0f49b38ef1f93bd750fc875e1585326dded | 3,061 | ex | Elixir | lib/edgedb/protocol/type_descriptor.ex | nsidnev/edgedb-elixir | bade2b9daba2e83bfaa5915b2addb74f41610968 | [
"MIT"
] | 30 | 2021-05-19T08:54:44.000Z | 2022-03-11T22:52:25.000Z | lib/edgedb/protocol/type_descriptor.ex | nsidnev/edgedb-elixir | bade2b9daba2e83bfaa5915b2addb74f41610968 | [
"MIT"
] | 3 | 2021-11-17T21:26:01.000Z | 2022-03-12T09:49:25.000Z | lib/edgedb/protocol/type_descriptor.ex | nsidnev/edgedb-elixir | bade2b9daba2e83bfaa5915b2addb74f41610968 | [
"MIT"
] | 3 | 2021-08-29T14:55:41.000Z | 2022-03-12T01:30:35.000Z | defmodule EdgeDB.Protocol.TypeDescriptor do
alias EdgeDB.Protocol.{
Codec,
Codecs,
Datatypes
}
@callback parse_description(
codecs :: list(Codec.t()),
type_id :: Datatypes.UUID.t(),
data :: bitstring()
) :: {term(), bitstring()}
@callback consum... | 25.940678 | 93 | 0.611565 |
623810f8d2035d8700607364e62d527ca25b3af7 | 1,528 | ex | Elixir | lib/adjacent_tile_locations.ex | lottetreg/minesweeper | 72f85eb86b792346263ab4997a83c88873e0a04b | [
"MIT"
] | null | null | null | lib/adjacent_tile_locations.ex | lottetreg/minesweeper | 72f85eb86b792346263ab4997a83c88873e0a04b | [
"MIT"
] | 8 | 2019-05-20T20:53:46.000Z | 2019-06-27T13:50:24.000Z | lib/adjacent_tile_locations.ex | lottetreg/minesweeper | 72f85eb86b792346263ab4997a83c88873e0a04b | [
"MIT"
] | null | null | null | defmodule AdjacentTileLocations do
def cardinal_tile_locations(board, location) do
[
north_tile_location(location),
south_tile_location(location),
east_tile_location(location),
west_tile_location(location)
]
|> remove_out_of_bounds_locations(board)
end
def ordinal_tile_locatio... | 25.466667 | 63 | 0.722513 |
62381d4506d956e2a99038ed092e67e4a7a94037 | 1,210 | exs | Elixir | test/lib_clean_test.exs | walkr/lib_cleanex | c90cff7f1a080f61594b428844548eebfd70f69e | [
"MIT"
] | null | null | null | test/lib_clean_test.exs | walkr/lib_cleanex | c90cff7f1a080f61594b428844548eebfd70f69e | [
"MIT"
] | null | null | null | test/lib_clean_test.exs | walkr/lib_cleanex | c90cff7f1a080f61594b428844548eebfd70f69e | [
"MIT"
] | null | null | null | defmodule CleanexTest do
use ExUnit.Case
doctest Cleanex
test "clean string" do
candidates = [
" hello world ",
"hello world\0",
" hello \0 \0 world "
]
expect = "hello world"
for c <- candidates do
assert expect == Cleanex.clean(c)
end
end
test "clea... | 23.269231 | 83 | 0.542975 |
623843f40eac9a711e335921a41ddd20b91e1e7a | 697 | exs | Elixir | test/controllers/card_controller_test.exs | coshx/phoenix_tutorial | 5c9859e537ea8383f35fa05d97df453decc333d8 | [
"MIT"
] | 2 | 2016-10-07T07:18:59.000Z | 2019-01-12T20:51:09.000Z | test/controllers/card_controller_test.exs | coshx/phoenix_tutorial | 5c9859e537ea8383f35fa05d97df453decc333d8 | [
"MIT"
] | null | null | null | test/controllers/card_controller_test.exs | coshx/phoenix_tutorial | 5c9859e537ea8383f35fa05d97df453decc333d8 | [
"MIT"
] | null | null | null | defmodule PhxOembed.CardControllerTest do
use PhxOembed.ConnCase
alias PhxOembed.Card
@valid_attrs %{}
@invalid_attrs %{}
setup %{conn: conn} do
{:ok, conn: put_req_header(conn, "accept", "application/json")}
end
test "shows chosen resource", %{conn: conn} do
url = "http://example.com/cats"
... | 26.807692 | 67 | 0.662841 |
62384512dd1ca453ec982cc8ae66aa3e99175b2e | 326 | ex | Elixir | lib/rondo/action/handler.ex | exstruct/rondo | 8ec1a8754d594086065020bc45a801620fdda79d | [
"MIT"
] | 1 | 2016-08-09T21:45:21.000Z | 2016-08-09T21:45:21.000Z | lib/rondo/action/handler.ex | exstruct/rondo | 8ec1a8754d594086065020bc45a801620fdda79d | [
"MIT"
] | null | null | null | lib/rondo/action/handler.ex | exstruct/rondo | 8ec1a8754d594086065020bc45a801620fdda79d | [
"MIT"
] | null | null | null | defprotocol Rondo.Action.Handler do
def affordance(handler, props)
def action(handler, props, state, data)
end
defimpl Rondo.Action.Handler, for: Atom do
def affordance(handler, props) do
handler.affordance(props)
end
def action(handler, props, state, data) do
handler.action(props, state, data)
en... | 21.733333 | 44 | 0.736196 |
62384ccc3bb0e7d4d0fe41e7b521e1df55d359f2 | 1,546 | ex | Elixir | lib/covid_19_web/views/error_helpers.ex | clarkware/live_view_covid_19 | dfe6ec0cb0ecf91ef30a58b549acc82d4614916a | [
"MIT"
] | 4 | 2020-03-20T13:37:51.000Z | 2020-03-27T23:53:55.000Z | lib/covid_19_web/views/error_helpers.ex | clarkware/live_view_covid_19 | dfe6ec0cb0ecf91ef30a58b549acc82d4614916a | [
"MIT"
] | 2 | 2021-03-10T11:22:03.000Z | 2021-05-11T07:08:43.000Z | lib/covid_19_web/views/error_helpers.ex | clarkware/live_view_covid_19 | dfe6ec0cb0ecf91ef30a58b549acc82d4614916a | [
"MIT"
] | null | null | null | defmodule Covid19Web.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.208333 | 76 | 0.662354 |
62384fe9139ac5e4b1cdc10034411ec741b0f09f | 1,164 | exs | Elixir | apps/admin_api/test/admin_api/v1/views/account_membership_view_test.exs | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | null | null | null | apps/admin_api/test/admin_api/v1/views/account_membership_view_test.exs | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | null | null | null | apps/admin_api/test/admin_api/v1/views/account_membership_view_test.exs | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | null | null | null | defmodule AdminAPI.V1.AccountMembershipViewTest do
use AdminAPI.ViewCase, :v1
alias EWalletDB.Repo
alias AdminAPI.V1.{MembershipSerializer, AccountMembershipView}
describe "AccountMembershipView.render/2" do
test "renders memberships.json with users response" do
membership1 = :membership |> insert() ... | 30.631579 | 93 | 0.602234 |
623872d8f46ab890f4137250aadb1c8af7a2a1ee | 595 | exs | Elixir | mix.exs | ElixirCrypto/math | 3b6f50c20bb4b5f362ed3f10721423b68e1d9266 | [
"MIT"
] | null | null | null | mix.exs | ElixirCrypto/math | 3b6f50c20bb4b5f362ed3f10721423b68e1d9266 | [
"MIT"
] | null | null | null | mix.exs | ElixirCrypto/math | 3b6f50c20bb4b5f362ed3f10721423b68e1d9266 | [
"MIT"
] | null | null | null | defmodule Math.MixProject do
use Mix.Project
def project do
[
app: :math,
version: "0.1.0",
elixir: "~> 1.8",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applicati... | 19.833333 | 87 | 0.561345 |
6238854590ce05367c0becdb6db502c3d0ece147 | 2,110 | exs | Elixir | mix.exs | instinctscience/versioned | 2352464c5c148d85f04fa31c02ab58001a1531f1 | [
"MIT"
] | 4 | 2021-09-25T20:11:59.000Z | 2022-03-07T20:57:44.000Z | mix.exs | instinctscience/versioned | 2352464c5c148d85f04fa31c02ab58001a1531f1 | [
"MIT"
] | 2 | 2021-09-22T19:29:26.000Z | 2021-10-04T17:31:17.000Z | mix.exs | instinctscience/versioned | 2352464c5c148d85f04fa31c02ab58001a1531f1 | [
"MIT"
] | 3 | 2021-08-08T10:37:25.000Z | 2022-03-07T20:57:32.000Z | defmodule Versioned.MixProject do
use Mix.Project
@source_url "https://github.com/instinctscience/versioned"
@version "0.3.2"
def project do
[
app: :versioned,
name: "Versioned",
version: @version,
elixir: "~> 1.7",
elixirc_paths: elixirc_paths(Mix.env()),
start_permane... | 23.977273 | 76 | 0.538389 |
6238885792eeac115c0846e8a27617a6acc659e9 | 2,268 | ex | Elixir | lib/sanbase/social_data/sentiment.ex | santiment/sanbase2 | 9ef6e2dd1e377744a6d2bba570ea6bd477a1db31 | [
"MIT"
] | 81 | 2017-11-20T01:20:22.000Z | 2022-03-05T12:04:25.000Z | lib/sanbase/social_data/sentiment.ex | rmoorman/sanbase2 | 226784ab43a24219e7332c49156b198d09a6dd85 | [
"MIT"
] | 359 | 2017-10-15T14:40:53.000Z | 2022-01-25T13:34:20.000Z | lib/sanbase/social_data/sentiment.ex | rmoorman/sanbase2 | 226784ab43a24219e7332c49156b198d09a6dd85 | [
"MIT"
] | 16 | 2017-11-19T13:57:40.000Z | 2022-02-07T08:13:02.000Z | defmodule Sanbase.SocialData.Sentiment do
import Sanbase.Utils.ErrorHandling
require Logger
require Sanbase.Utils.Config, as: Config
alias Sanbase.SocialData.SocialHelper
require Mockery.Macro
defp http_client, do: Mockery.Macro.mockable(HTTPoison)
@recv_timeout 25_000
def sentiment(selector, from,... | 29.842105 | 107 | 0.63448 |
62389e886eed6a792472b82de6d3665b4c793910 | 2,378 | ex | Elixir | lib/codes/codes_o87.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_o87.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_o87.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | defmodule IcdCode.ICDCode.Codes_O87 do
alias IcdCode.ICDCode
def _O870 do
%ICDCode{full_code: "O870",
category_code: "O87",
short_code: "0",
full_name: "Superficial thrombophlebitis in the puerperium",
short_name: "Superficial thrombophlebitis in the puerperium",
... | 33.971429 | 78 | 0.633726 |
6238f511b626a105352ac7b629351fbbf437c951 | 171 | exs | Elixir | test/test_helper.exs | openrowing/raceman2 | eee2d51c50bddf63b9c5b9b351424d4c056fa27d | [
"Apache-2.0"
] | null | null | null | test/test_helper.exs | openrowing/raceman2 | eee2d51c50bddf63b9c5b9b351424d4c056fa27d | [
"Apache-2.0"
] | null | null | null | test/test_helper.exs | openrowing/raceman2 | eee2d51c50bddf63b9c5b9b351424d4c056fa27d | [
"Apache-2.0"
] | null | null | null | ExUnit.start
Mix.Task.run "ecto.create", ~w(-r Web.Repo --quiet)
Mix.Task.run "ecto.migrate", ~w(-r Web.Repo --quiet)
Ecto.Adapters.SQL.begin_test_transaction(Web.Repo)
| 24.428571 | 52 | 0.725146 |
6238fd0ce8d3c93c7f10a7e8ceaadcc41b749acd | 2,603 | exs | Elixir | test/controllers/company_controller_test.exs | sysdia-solutions/basic_books | 251dae71d1dc3d5516464e38e0efede1af9949fe | [
"MIT"
] | 1 | 2016-02-04T17:16:54.000Z | 2016-02-04T17:16:54.000Z | test/controllers/company_controller_test.exs | sysdia-solutions/basic_books | 251dae71d1dc3d5516464e38e0efede1af9949fe | [
"MIT"
] | null | null | null | test/controllers/company_controller_test.exs | sysdia-solutions/basic_books | 251dae71d1dc3d5516464e38e0efede1af9949fe | [
"MIT"
] | null | null | null | defmodule BasicBooks.CompanyControllerTest do
use BasicBooks.ConnCase
alias BasicBooks.Company
@valid_attrs %{address: "some content", company_number: 42, name: "some content", country: "some content", is_customer: true, is_supplier: true, post_code: "some content", town: "some content"}
@invalid_attrs %{}
... | 38.850746 | 195 | 0.698041 |
623916d84f8e5859e652eccfc7b011cc64e44633 | 4,288 | ex | Elixir | test/support/test_fixture_helpers.ex | sbacarob/papercups | 1a04e9d3a2833b379a3aaaabaae960247c081542 | [
"MIT"
] | null | null | null | test/support/test_fixture_helpers.ex | sbacarob/papercups | 1a04e9d3a2833b379a3aaaabaae960247c081542 | [
"MIT"
] | null | null | null | test/support/test_fixture_helpers.ex | sbacarob/papercups | 1a04e9d3a2833b379a3aaaabaae960247c081542 | [
"MIT"
] | null | null | null | defmodule ChatApi.TestFixtureHelpers do
@moduledoc false
alias ChatApi.{
Repo,
Accounts,
Users,
Customers,
Conversations,
SlackConversationThreads,
EventSubscriptions,
Messages,
SlackAuthorizations,
WidgetSettings,
UserInvitations
}
@password "supersecret123"
def ... | 26.306748 | 81 | 0.614506 |
62394f65ee72b59b9aa4fa1aedcc7ca04e94461a | 725 | exs | Elixir | test/credo/service/source_file_without_strings_and_sigils_test.exs | sevenseacat/credo | 48837401040d9c2340b5fb9c7d786d31f89f6426 | [
"MIT"
] | null | null | null | test/credo/service/source_file_without_strings_and_sigils_test.exs | sevenseacat/credo | 48837401040d9c2340b5fb9c7d786d31f89f6426 | [
"MIT"
] | null | null | null | test/credo/service/source_file_without_strings_and_sigils_test.exs | sevenseacat/credo | 48837401040d9c2340b5fb9c7d786d31f89f6426 | [
"MIT"
] | null | null | null | defmodule Credo.Service.SourceFileWithoutStringAndSigilsTest do
use Credo.TestHelper
alias Credo.Service.SourceFileWithoutStringAndSigils
test "it should NOT report expected code" do
expected = """
defmodule CredoSampleModule do
def some_function(parameter1, parameter2) do
parameter1 + " ... | 25.892857 | 90 | 0.74069 |
62395c2cd47c20a644e3cf04fb4a52a49313756d | 1,776 | exs | Elixir | mix.exs | thomas9911/fusion_jwt_authentication | 63502d512074a3d906ecb0cb2adb8ac27223e8a8 | [
"MIT"
] | null | null | null | mix.exs | thomas9911/fusion_jwt_authentication | 63502d512074a3d906ecb0cb2adb8ac27223e8a8 | [
"MIT"
] | null | null | null | mix.exs | thomas9911/fusion_jwt_authentication | 63502d512074a3d906ecb0cb2adb8ac27223e8a8 | [
"MIT"
] | null | null | null | defmodule FusionJWTAuthentication.MixProject do
use Mix.Project
def project do
[
app: :fusion_jwt_authentication,
version: "0.5.0",
elixir: "~> 1.9",
description: description(),
elixirc_paths: elixirc_paths(Mix.env()),
elixirc_options: [warnings_as_errors: true],
packa... | 25.014085 | 81 | 0.570946 |
623978c800e6e743a1ffc18e0e3f5c6248ee8aee | 533 | exs | Elixir | config/test.exs | HandOfGod94/my_phoenix_api_template | 448db20ba47872f37097754aec454aed440246b8 | [
"MIT"
] | null | null | null | config/test.exs | HandOfGod94/my_phoenix_api_template | 448db20ba47872f37097754aec454aed440246b8 | [
"MIT"
] | null | null | null | config/test.exs | HandOfGod94/my_phoenix_api_template | 448db20ba47872f37097754aec454aed440246b8 | [
"MIT"
] | null | null | null | use Mix.Config
# Configure your database
config :my_phoenix_api_template, MyPhoenixApiTemplate.Repo,
username: "postgres",
password: "postgres",
database: "my_phoenix_api_template_test",
hostname: "localhost",
pool: Ecto.Adapters.SQL.Sandbox
# We don't run a server during test. If one is required,
# you can... | 28.052632 | 66 | 0.769231 |
62399ed13e1bcfcfa1970c9691d4d7edefe20db2 | 519 | exs | Elixir | test/jwt/claim/iss_test.exs | tzumby/elixir-jwt | 1e44bef4d1f706062050fedad79bdd9b3b4d81a5 | [
"MIT"
] | 13 | 2017-05-15T13:37:11.000Z | 2021-07-29T23:06:23.000Z | test/jwt/claim/iss_test.exs | tzumby/elixir-jwt | 1e44bef4d1f706062050fedad79bdd9b3b4d81a5 | [
"MIT"
] | 7 | 2019-01-26T12:42:24.000Z | 2021-03-16T23:01:00.000Z | test/jwt/claim/iss_test.exs | tzumby/elixir-jwt | 1e44bef4d1f706062050fedad79bdd9b3b4d81a5 | [
"MIT"
] | 3 | 2019-07-26T06:03:48.000Z | 2020-01-14T20:42:55.000Z | defmodule JWT.Claim.IssTest do
use ExUnit.Case
alias JWT.Claim.Iss
doctest Iss
@issuer "issuer"
test "reject?/2 w :iss claim match" do
refute Iss.reject?(@issuer, %{iss: @issuer})
end
test "reject?/2 w/o :iss claim match" do
assert Iss.reject?(@issuer, %{iss: "not issuer"})
end
test "rej... | 19.961538 | 53 | 0.635838 |
6239abce729dd85362d2ce0ae70c21095491ed0e | 109 | exs | Elixir | .formatter.exs | Pavinati/astarte_core | dd37ddd2b1bdcef0b1474be9c81d9a0efa4cda81 | [
"Apache-2.0"
] | 16 | 2018-02-02T14:07:10.000Z | 2021-02-03T13:57:30.000Z | .formatter.exs | Pavinati/astarte_core | dd37ddd2b1bdcef0b1474be9c81d9a0efa4cda81 | [
"Apache-2.0"
] | 62 | 2019-03-14T15:52:12.000Z | 2022-03-22T10:34:56.000Z | .formatter.exs | Pavinati/astarte_core | dd37ddd2b1bdcef0b1474be9c81d9a0efa4cda81 | [
"Apache-2.0"
] | 9 | 2018-02-02T09:55:06.000Z | 2021-03-04T15:15:08.000Z | [
import_deps: [:ecto],
inputs: [
"lib/**/*.{ex,exs}",
"test/**/*.{ex,exs}",
"mix.exs"
]
]
| 12.111111 | 25 | 0.40367 |
623a427c3380a1e5a863f5e63d86429b6d2cad55 | 4,800 | exs | Elixir | lib/mix/test/mix/tasks/deps.tree_test.exs | DmitryKakurin/elixir | a5df6a5a830d4cff8b7c8da54342b66cab999e0f | [
"Apache-2.0"
] | 2 | 2018-11-15T06:38:14.000Z | 2018-11-17T18:03:14.000Z | lib/mix/test/mix/tasks/deps.tree_test.exs | DmitryKakurin/elixir | a5df6a5a830d4cff8b7c8da54342b66cab999e0f | [
"Apache-2.0"
] | 1 | 2015-06-09T15:52:43.000Z | 2015-06-09T15:52:43.000Z | lib/mix/test/mix/tasks/deps.tree_test.exs | DmitryKakurin/elixir | a5df6a5a830d4cff8b7c8da54342b66cab999e0f | [
"Apache-2.0"
] | 1 | 2018-01-09T20:10:59.000Z | 2018-01-09T20:10:59.000Z | Code.require_file("../../test_helper.exs", __DIR__)
defmodule Mix.Tasks.Deps.TreeTest do
use MixTest.Case
defmodule ConvergedDepsApp do
def project do
[
app: :sample,
version: "0.1.0",
deps: [
{:deps_on_git_repo, "0.2.0", git: fixture_path("deps_on_git_repo")},
... | 33.802817 | 93 | 0.5775 |
623a4f1429261e036567bd2f7e1dbd0bb829a234 | 77 | ex | Elixir | lib/retrospectivex/contents/ecto_enums.ex | dreamingechoes/retrospectivex | cad0df6cfde5376121d841f4a8b36861b6ec5d45 | [
"MIT"
] | 5 | 2018-06-27T17:51:51.000Z | 2020-10-05T09:59:04.000Z | lib/retrospectivex/contents/ecto_enums.ex | dreamingechoes/retrospectivex | cad0df6cfde5376121d841f4a8b36861b6ec5d45 | [
"MIT"
] | 1 | 2018-10-08T11:33:12.000Z | 2018-10-08T11:33:12.000Z | lib/retrospectivex/contents/ecto_enums.ex | dreamingechoes/retrospectivex | cad0df6cfde5376121d841f4a8b36861b6ec5d45 | [
"MIT"
] | 2 | 2018-10-08T11:31:55.000Z | 2020-10-05T09:59:05.000Z | import EctoEnum
defenum(PageStateEnum, draft: 0, published: 1, archived: 2)
| 19.25 | 59 | 0.766234 |
623a6c3a602ff88bf579a066f9693c3d9a349f27 | 512 | exs | Elixir | config/test.exs | Shenrak/GORProject-API | 1b3355ae5955d78b5a2f02177f20a599f0680604 | [
"MIT"
] | 2 | 2018-09-03T05:42:54.000Z | 2018-09-18T05:48:17.000Z | config/test.exs | Shenrak/GORProject-API | 1b3355ae5955d78b5a2f02177f20a599f0680604 | [
"MIT"
] | 2 | 2018-09-17T16:06:06.000Z | 2018-09-24T18:06:19.000Z | config/test.exs | Shenrak/GORProject-API | 1b3355ae5955d78b5a2f02177f20a599f0680604 | [
"MIT"
] | 1 | 2018-09-17T14:57:20.000Z | 2018-09-17T14:57:20.000Z | use Mix.Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :gor_project, GORprojectWeb.Endpoint,
http: [port: 4001],
server: false
# Print only warnings and errors during test
config :logger, level: :warn
# Configure your database
config :gor_project,... | 25.6 | 56 | 0.744141 |
623a8b13fd40936ea4020506034c515fda0b7ba8 | 2,384 | ex | Elixir | lib/new_relic/distributed_trace/w3c_trace_context/trace_parent.ex | binaryseed/elixir_agent | 25f1242c10516618d9ea3a9b18712e5bc41efad6 | [
"Apache-2.0"
] | null | null | null | lib/new_relic/distributed_trace/w3c_trace_context/trace_parent.ex | binaryseed/elixir_agent | 25f1242c10516618d9ea3a9b18712e5bc41efad6 | [
"Apache-2.0"
] | null | null | null | lib/new_relic/distributed_trace/w3c_trace_context/trace_parent.ex | binaryseed/elixir_agent | 25f1242c10516618d9ea3a9b18712e5bc41efad6 | [
"Apache-2.0"
] | null | null | null | defmodule NewRelic.DistributedTrace.W3CTraceContext.TraceParent do
@moduledoc false
# https://w3c.github.io/trace-context/#traceparent-header
defstruct version: "00",
trace_id: nil,
parent_id: nil,
flags: nil
@version 2
@trace_id 32
@parent_id 16
@flags 2
def deco... | 24.57732 | 95 | 0.57047 |
623aedc61614c6a6bced41fbc9d8baf49fd9c359 | 508 | ex | Elixir | exactlymatch.ex | innaky/misc | b13b7626b098ab41253b1def7251582fb041dc7e | [
"MIT"
] | 1 | 2020-07-29T13:55:30.000Z | 2020-07-29T13:55:30.000Z | exactlymatch.ex | innaky/misc | b13b7626b098ab41253b1def7251582fb041dc7e | [
"MIT"
] | 2 | 2019-04-08T16:53:39.000Z | 2019-04-21T19:09:26.000Z | exactlymatch.ex | innaky/misc | b13b7626b098ab41253b1def7251582fb041dc7e | [
"MIT"
] | null | null | null | defmodule Exactlymatch do
@moduledoc """
Check if a string is equal to another
"""
@doc """
Simple predicate x is exactly equal to y?. Return true or false.
"""
@spec exactlyEquals?(String.t(), String.t()) :: boolean()
def exactlyEquals?(x, y) when is_binary(x) and is_binary(y) do
sort_string(x) == sor... | 21.166667 | 64 | 0.641732 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.