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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e87fd72847d634d411996ce70d3db10064c22edd | 927 | ex | Elixir | lib/corex/color.ex | eahanson/corex | 550020c5cbfc7dc828bc74e1edf0223c1cbffef1 | [
"MIT"
] | null | null | null | lib/corex/color.ex | eahanson/corex | 550020c5cbfc7dc828bc74e1edf0223c1cbffef1 | [
"MIT"
] | null | null | null | lib/corex/color.ex | eahanson/corex | 550020c5cbfc7dc828bc74e1edf0223c1cbffef1 | [
"MIT"
] | null | null | null | defmodule Corex.Color do
@colors %{
black: 0,
blue: 4,
cyan: 6,
green: 2,
magenta: 5,
red: 1,
white: 7,
yellow: 3,
}
def cinspect(value, color) do
value |> inspect |> colorize(color)
end
def colorize(l) when is_list(l) do
l |> Enum.map(fn {s, color} -> colorize(s, col... | 17.826923 | 71 | 0.552319 |
e87fd7374789cd37a5870c8ca834a11cf548db2b | 277 | ex | Elixir | lib/hello_web/views/page_view.ex | youknowcast/aiit_sp_challenge4 | a5811675b77f4c496c9456a74e986ba1cfd8ef2f | [
"MIT"
] | null | null | null | lib/hello_web/views/page_view.ex | youknowcast/aiit_sp_challenge4 | a5811675b77f4c496c9456a74e986ba1cfd8ef2f | [
"MIT"
] | null | null | null | lib/hello_web/views/page_view.ex | youknowcast/aiit_sp_challenge4 | a5811675b77f4c496c9456a74e986ba1cfd8ef2f | [
"MIT"
] | null | null | null | defmodule HelloWeb.PageView do
use HelloWeb, :view
def tweets(conn) do
case conn.assigns[:tweets] do
nil -> []
tweets -> tweets
end
end
def qiitas(conn) do
case conn.assigns[:qiitas] do
nil -> []
qiitas -> qiitas
end
end
end
| 15.388889 | 33 | 0.588448 |
e87fdb714741c00de01d3e0d9a93c408cfe5182c | 61 | ex | Elixir | test/support/mocks.ex | graffic/wanon-elixir | 65fcde17cbbeb1af3fda5f6423dba112dfa3b9a9 | [
"MIT"
] | 1 | 2018-11-28T07:44:28.000Z | 2018-11-28T07:44:28.000Z | test/support/mocks.ex | graffic/wanon-elixir | 65fcde17cbbeb1af3fda5f6423dba112dfa3b9a9 | [
"MIT"
] | 1 | 2018-10-24T20:59:09.000Z | 2018-10-24T20:59:09.000Z | test/support/mocks.ex | graffic/wanon-elixir | 65fcde17cbbeb1af3fda5f6423dba112dfa3b9a9 | [
"MIT"
] | null | null | null | Mox.defmock(Wanon.Telegram.Mock, for: Wanon.Telegram.Client)
| 30.5 | 60 | 0.803279 |
e88039d77b456946c8485134625ce8ee32d63dbf | 225 | ex | Elixir | lib/phenotype/phenotype.ex | BradLyman/nergle | 7de7a8ea73b3f5aa038409d0eb0c29cbd06a8876 | [
"MIT"
] | null | null | null | lib/phenotype/phenotype.ex | BradLyman/nergle | 7de7a8ea73b3f5aa038409d0eb0c29cbd06a8876 | [
"MIT"
] | null | null | null | lib/phenotype/phenotype.ex | BradLyman/nergle | 7de7a8ea73b3f5aa038409d0eb0c29cbd06a8876 | [
"MIT"
] | null | null | null | defmodule Phenotype do
@moduledoc """
"""
defmodule Id do
@enforce [:id, :pid]
defstruct [:id, :pid]
end
defmodule Message do
def sync(process) do
GenServer.cast process, :sync
end
end
end
| 14.0625 | 35 | 0.613333 |
e88044c4c6e34878472e1878746a7d78bdac9134 | 1,130 | ex | Elixir | lib/koans/07_keyword_lists.ex | eugenioLopezRamos/elixir-koans-solutions | ac183528275c1b271e66c4cd3a644784b6965335 | [
"MIT"
] | 1 | 2020-02-19T12:30:13.000Z | 2020-02-19T12:30:13.000Z | lib/koans/07_keyword_lists.ex | eugenioLopezRamos/elixir-koans-solutions | ac183528275c1b271e66c4cd3a644784b6965335 | [
"MIT"
] | null | null | null | lib/koans/07_keyword_lists.ex | eugenioLopezRamos/elixir-koans-solutions | ac183528275c1b271e66c4cd3a644784b6965335 | [
"MIT"
] | null | null | null | defmodule KeywordLists do
use Koans
@intro "KeywordLists"
koan "Like maps, keyword lists are key-value pairs" do
kw_list = [foo: "bar"]
assert kw_list[:foo] == "bar"
end
koan "Keys may be repeated, but only the first is accessed" do
kw_list = [foo: "bar", foo: "baz"]
assert kw_list[:foo] ... | 23.541667 | 81 | 0.626549 |
e880558097487ed64a0906e585235255cb6547aa | 367 | ex | Elixir | lib/codewar_web/helpers/time_helpers.ex | nimblehq/codewar-web | 5038bc09d4fc42f6be0737857a4c053ff42463f1 | [
"MIT"
] | 2 | 2021-06-29T02:22:28.000Z | 2022-02-15T06:32:15.000Z | lib/codewar_web/helpers/time_helpers.ex | nimblehq/codewar-web | 5038bc09d4fc42f6be0737857a4c053ff42463f1 | [
"MIT"
] | 14 | 2021-05-06T04:27:19.000Z | 2021-08-24T11:15:33.000Z | lib/codewar_web/helpers/time_helpers.ex | nimblehq/codewar-web | 5038bc09d4fc42f6be0737857a4c053ff42463f1 | [
"MIT"
] | 1 | 2021-08-20T07:50:19.000Z | 2021-08-20T07:50:19.000Z | defmodule CodewarWeb.TimeHelpers do
@moduledoc """
Conveniences for displaying time.
"""
def humanize_time_in_seconds(seconds, format \\ "%M:%S")
def humanize_time_in_seconds(seconds, format) when is_integer(seconds) do
~T[00:00:00] |> Time.add(seconds) |> Calendar.strftime(format)
end
def humanize... | 26.214286 | 75 | 0.73297 |
e88081ac3af8b8dfef61596712d2eccfb3d85890 | 26 | ex | Elixir | lib/polyglot.ex | lubien/polyglot | 88d24ad0e88c42a72489a9c42c1361812a81cbbd | [
"MIT"
] | 2 | 2016-10-26T04:47:17.000Z | 2016-10-28T06:13:33.000Z | lib/polyglot.ex | lubien/polyglot | 88d24ad0e88c42a72489a9c42c1361812a81cbbd | [
"MIT"
] | 3 | 2016-10-26T04:10:51.000Z | 2016-11-10T11:41:04.000Z | lib/polyglot.ex | lubien/polyglot | 88d24ad0e88c42a72489a9c42c1361812a81cbbd | [
"MIT"
] | null | null | null | defmodule Polyglot do
end
| 8.666667 | 21 | 0.846154 |
e880866e413f74342b4b42e491ce54552f01cbc2 | 904 | ex | Elixir | lib/spender_web/resolvers/wish_list.ex | LittleKidogo/Budgetinization | eae6dd62208ec7fb43c8c212f40611f8635205d5 | [
"MIT"
] | 2 | 2018-02-27T06:29:59.000Z | 2018-06-09T16:53:49.000Z | lib/spender_web/resolvers/wish_list.ex | LittleKidogo/Budgetinization | eae6dd62208ec7fb43c8c212f40611f8635205d5 | [
"MIT"
] | 94 | 2018-02-22T06:03:19.000Z | 2018-06-28T14:30:31.000Z | lib/spender_web/resolvers/wish_list.ex | LittleKidogo/Budgetinization | eae6dd62208ec7fb43c8c212f40611f8635205d5 | [
"MIT"
] | 1 | 2020-03-04T19:41:06.000Z | 2020-03-04T19:41:06.000Z | defmodule SpenderWeb.Resolvers.WishList do
alias Spender.{WishList, MoneyLogs}
def get_items(_,%{input: params},_) do
with {:ok, moneylog} <- MoneyLogs.get_moneylog(params.moneylog_id),
{:ok, items} <- WishList.list_items(moneylog) do
{:ok, items}
end
end
def create_item(_,%{input: par... | 28.25 | 71 | 0.639381 |
e880925ac851204a53148c7dfd5e7002a23788a3 | 1,317 | ex | Elixir | lib/mix/tasks/guardian_db.gen.migration.ex | tarzan/guardian_db | 423eb517c0bc556add9c5493119d2818eb02eb5b | [
"MIT"
] | null | null | null | lib/mix/tasks/guardian_db.gen.migration.ex | tarzan/guardian_db | 423eb517c0bc556add9c5493119d2818eb02eb5b | [
"MIT"
] | null | null | null | lib/mix/tasks/guardian_db.gen.migration.ex | tarzan/guardian_db | 423eb517c0bc556add9c5493119d2818eb02eb5b | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.Guardian.Db.Gen.Migration do
@shortdoc "Generates Guardian.DB's migration"
@moduledoc """
Generates the required GuardianDb's database migration
"""
use Mix.Task
import Mix.Ecto
import Mix.Generator
alias Guardian.DB.Token
alias Ecto.Migrator
@doc false
def run(args) do
... | 24.849057 | 68 | 0.607441 |
e8809980fcecbffe033937926668674b4d91df52 | 2,293 | exs | Elixir | scripts/archive_s3_logs.exs | findmypast/hexfmp | 38a50f5e1057833fd98748faac230bf4b9cc26a3 | [
"Apache-2.0"
] | null | null | null | scripts/archive_s3_logs.exs | findmypast/hexfmp | 38a50f5e1057833fd98748faac230bf4b9cc26a3 | [
"Apache-2.0"
] | null | null | null | scripts/archive_s3_logs.exs | findmypast/hexfmp | 38a50f5e1057833fd98748faac230bf4b9cc26a3 | [
"Apache-2.0"
] | null | null | null | [action, dir, date] = System.argv
file_chunk_factor = 5 * 1024 * 1024
buckets =
case dir do
"docs" ->
[{"logs.hex.pm", "us-east-1"}]
"hex" ->
[{"logs.hex.pm", "us-east-1"},
{"logs-eu.hex.pm", "eu-west-1"},
{"logs-asia.hex.pm", "ap-southeast-1"}]
"fastly_hex" ->
[{... | 29.397436 | 107 | 0.578718 |
e880bdca0fc60fd06bda14718bc30bbc50b3cdba | 743 | exs | Elixir | mix.exs | hexedpackets/elixir-riemann | 4cdea1c353c98882391120642d0c86cd608c8306 | [
"Apache-2.0"
] | 1 | 2017-02-21T20:46:14.000Z | 2017-02-21T20:46:14.000Z | mix.exs | hexedpackets/elixir-riemann | 4cdea1c353c98882391120642d0c86cd608c8306 | [
"Apache-2.0"
] | null | null | null | mix.exs | hexedpackets/elixir-riemann | 4cdea1c353c98882391120642d0c86cd608c8306 | [
"Apache-2.0"
] | null | null | null | defmodule Riemann.Mixfile do
use Mix.Project
@version File.read!("VERSION") |> String.strip
def project do
[app: :riemann,
version: @version,
elixir: "~> 1.4",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps(),
package: package()]
end
def ap... | 21.228571 | 73 | 0.574697 |
e880eb1d3ce37fedeb8d41bc996157a529fc6964 | 732 | ex | Elixir | lib/ecto_mnesia/record.ex | szTheory/ecto_mnesia | 9d1fd3b2845ac3c2c12c669d68198dff9e82a322 | [
"MIT"
] | 245 | 2016-10-22T14:43:36.000Z | 2022-02-28T03:46:27.000Z | lib/ecto_mnesia/record.ex | KushanChamindu/ecto_mnesia | bc0fb46d210eb1be63bcc8f0383212f0633b8c52 | [
"MIT"
] | 80 | 2016-10-22T16:09:19.000Z | 2021-03-03T10:45:01.000Z | lib/ecto_mnesia/record.ex | KushanChamindu/ecto_mnesia | bc0fb46d210eb1be63bcc8f0383212f0633b8c52 | [
"MIT"
] | 53 | 2016-12-03T14:23:05.000Z | 2021-07-01T01:55:22.000Z | defmodule EctoMnesia.Record do
@moduledoc """
This module provides set of helpers for conversions between Mnesia records and Ecto Schemas.
"""
alias EctoMnesia.Record.Context
@doc """
Convert Ecto Schema struct to tuple that can be inserted to Mnesia.
"""
def new(schema, table, params) do
table
... | 28.153846 | 98 | 0.684426 |
e880eff4aa56c9808d7382cf53556b99bb41ac1d | 1,306 | ex | Elixir | lib/ecto/riak/connection.ex | drewkerrigan/ecto_riak | 5e5e07864adc475d89d46c2469c23ad81201fa1d | [
"Apache-2.0"
] | 3 | 2016-07-28T14:26:38.000Z | 2017-10-24T14:14:37.000Z | lib/ecto/riak/connection.ex | drewkerrigan/ecto_riak | 5e5e07864adc475d89d46c2469c23ad81201fa1d | [
"Apache-2.0"
] | null | null | null | lib/ecto/riak/connection.ex | drewkerrigan/ecto_riak | 5e5e07864adc475d89d46c2469c23ad81201fa1d | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.Riak.Connection do
def child_spec(options) do
# All connections handled through pooler
pool = Keyword.get(options, :pool, nil)
create_pools(pool, options, 1)
Supervisor.Spec.worker(Task, [fn -> :timer.sleep(:infinity) end])
end
defp create_pools([], _, _) do
:ok
end
defp c... | 29.022222 | 69 | 0.673047 |
e88101952514cfc633d806e9855a9e7892052478 | 54,659 | exs | Elixir | test/ecto/adapters/myxql_test.exs | aptinio/ecto_sql | f13a0e8383428154a61a7a93d43dcb4b6f6a6fad | [
"Apache-2.0"
] | null | null | null | test/ecto/adapters/myxql_test.exs | aptinio/ecto_sql | f13a0e8383428154a61a7a93d43dcb4b6f6a6fad | [
"Apache-2.0"
] | null | null | null | test/ecto/adapters/myxql_test.exs | aptinio/ecto_sql | f13a0e8383428154a61a7a93d43dcb4b6f6a6fad | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.Adapters.MyXQLTest do
use ExUnit.Case, async: true
import Ecto.Query
alias Ecto.Queryable
alias Ecto.Adapters.MyXQL.Connection, as: SQL
alias Ecto.Migration.Reference
defmodule Schema do
use Ecto.Schema
schema "schema" do
field :x, :integer
field :y, :integer
fie... | 41.220965 | 172 | 0.569568 |
e8812254958b2dbcb09b12e4dc1837ece58bda5b | 1,351 | exs | Elixir | apps/service_gather/mix.exs | kennyatpillar/hindsight | e90e2150a14218e5d6fdf5874f57eb055fd2dd07 | [
"Apache-2.0"
] | null | null | null | apps/service_gather/mix.exs | kennyatpillar/hindsight | e90e2150a14218e5d6fdf5874f57eb055fd2dd07 | [
"Apache-2.0"
] | null | null | null | apps/service_gather/mix.exs | kennyatpillar/hindsight | e90e2150a14218e5d6fdf5874f57eb055fd2dd07 | [
"Apache-2.0"
] | null | null | null | defmodule Gather.MixProject do
use Mix.Project
def project do
[
app: :service_gather,
version: "0.1.0",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixir: "~> 1.9",
start_permanent: Mix... | 25.980769 | 56 | 0.565507 |
e8812868f1539cbb8c1e9f9715ed9f5c885fecc5 | 1,123 | exs | Elixir | welcome/config/config.exs | crsanti/codewars-elixir | 7e7d9bceea5db8b965ecc1e17be52bc2aeafa4f0 | [
"MIT"
] | 2 | 2021-08-18T11:31:31.000Z | 2021-08-24T00:25:08.000Z | welcome/config/config.exs | crsanti/codewars-elixir | 7e7d9bceea5db8b965ecc1e17be52bc2aeafa4f0 | [
"MIT"
] | null | null | null | welcome/config/config.exs | crsanti/codewars-elixir | 7e7d9bceea5db8b965ecc1e17be52bc2aeafa4f0 | [
"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.225806 | 73 | 0.751558 |
e8812ef29cb73a07477f5a03ca946d68a1d14090 | 233 | ex | Elixir | lib/ex_paidy/environment.ex | yuki-toida/ex_paidy | 6f8244462dc0a5ebee4febff86ca496be88705d3 | [
"MIT"
] | null | null | null | lib/ex_paidy/environment.ex | yuki-toida/ex_paidy | 6f8244462dc0a5ebee4febff86ca496be88705d3 | [
"MIT"
] | null | null | null | lib/ex_paidy/environment.ex | yuki-toida/ex_paidy | 6f8244462dc0a5ebee4febff86ca496be88705d3 | [
"MIT"
] | null | null | null | defmodule ExPaidy.Environment do
def secret_key do
Application.get_env(:ex_paidy, :secret_key, System.get_env("PAIDY_SECRET_KEY"))
end
def version do
Application.get_env(:ex_paidy, :version, "2016-07-01")
end
end | 21.181818 | 83 | 0.733906 |
e8812f8dcc7fc02909c8acad35ef16e622ba064b | 1,704 | ex | Elixir | lib/code_corps_web/controllers/role_skill_controller.ex | fikape/code-corps-api | c21674b0b2a19fa26945c94268db8894420ca181 | [
"MIT"
] | 275 | 2015-06-23T00:20:51.000Z | 2021-08-19T16:17:37.000Z | lib/code_corps_web/controllers/role_skill_controller.ex | fikape/code-corps-api | c21674b0b2a19fa26945c94268db8894420ca181 | [
"MIT"
] | 1,304 | 2015-06-26T02:11:54.000Z | 2019-12-12T21:08:00.000Z | lib/code_corps_web/controllers/role_skill_controller.ex | fikape/code-corps-api | c21674b0b2a19fa26945c94268db8894420ca181 | [
"MIT"
] | 140 | 2016-01-01T18:19:47.000Z | 2020-11-22T06:24:47.000Z | defmodule CodeCorpsWeb.RoleSkillController do
@moduledoc false
use CodeCorpsWeb, :controller
alias CodeCorps.{RoleSkill, User, Helpers.Query}
action_fallback CodeCorpsWeb.FallbackController
plug CodeCorpsWeb.Plug.DataToAttributes
plug CodeCorpsWeb.Plug.IdsToIntegers
@spec index(Conn.t, map) :: Conn.t
... | 37.043478 | 107 | 0.653756 |
e8814b8a4df8514f8b34ce10f3b93bdf213db2cb | 966 | exs | Elixir | apps/chex/priv/repo/migrations/20180225080024_create_slack_users.exs | chrisfishwood/chex | 04d3446f3d25c8c3c0badd282b50abccc59cc41d | [
"MIT"
] | null | null | null | apps/chex/priv/repo/migrations/20180225080024_create_slack_users.exs | chrisfishwood/chex | 04d3446f3d25c8c3c0badd282b50abccc59cc41d | [
"MIT"
] | null | null | null | apps/chex/priv/repo/migrations/20180225080024_create_slack_users.exs | chrisfishwood/chex | 04d3446f3d25c8c3c0badd282b50abccc59cc41d | [
"MIT"
] | null | null | null | defmodule Chex.Repo.Migrations.CreateSlackUsers do
use Ecto.Migration
def change do
create table(:slack_users) do
add :color, :string
add :deleted, :boolean, default: false, null: false
add :has_2fa, :boolean, default: false, null: false
add :slack_id, :string
add :is_admin, :bool... | 32.2 | 69 | 0.653209 |
e881542490ce9ee6ef5357fa2974f682ea8a42ee | 494 | exs | Elixir | mix.exs | drobban/bottle | 57a502e765a65d635f48ec6d6cbfae1e87dfea75 | [
"Unlicense"
] | null | null | null | mix.exs | drobban/bottle | 57a502e765a65d635f48ec6d6cbfae1e87dfea75 | [
"Unlicense"
] | null | null | null | mix.exs | drobban/bottle | 57a502e765a65d635f48ec6d6cbfae1e87dfea75 | [
"Unlicense"
] | null | null | null | defmodule Bottle.MixProject do
use Mix.Project
def project do
[
apps_path: "apps",
version: "0.1.0",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Dependencies listed here are available only for this
# project and cannot be accessed from applications inside
# th... | 20.583333 | 67 | 0.61336 |
e8815486cc5485b035d0e1ffc80e68618882c60d | 217 | ex | Elixir | apps/tools_2/lib/sentences_api/web/helpers.ex | WhiteRookPL/elixir-fire-brigade-workshop | 1c6183339fc623842a09f4d10be75bcecf2c37e7 | [
"MIT"
] | 14 | 2017-08-09T14:21:47.000Z | 2022-03-11T04:10:49.000Z | apps/tools_2/lib/sentences_api/web/helpers.ex | nicholasjhenry/elixir-fire-brigade-workshop | 1c6183339fc623842a09f4d10be75bcecf2c37e7 | [
"MIT"
] | null | null | null | apps/tools_2/lib/sentences_api/web/helpers.ex | nicholasjhenry/elixir-fire-brigade-workshop | 1c6183339fc623842a09f4d10be75bcecf2c37e7 | [
"MIT"
] | 15 | 2017-09-05T15:43:53.000Z | 2020-04-13T16:20:18.000Z | defmodule SentencesAPI.Web.Helpers do
def get_random_from(list) do
:rand.seed(:exs1024, :os.timestamp())
{:ok, element} = Enum.fetch(list, Kernel.trunc(:rand.uniform() * length(list)))
element
end
end | 27.125 | 83 | 0.691244 |
e88161f0e5a748d6881700ca1040f0d866a3bb4c | 464 | exs | Elixir | b1/config/test.exs | lajeryl/hangman | ad90b6114ac98414b4bddf69bf88b1601b5b1799 | [
"MIT"
] | 1 | 2022-02-22T04:56:25.000Z | 2022-02-22T04:56:25.000Z | b1/config/test.exs | lajeryl/hangman | ad90b6114ac98414b4bddf69bf88b1601b5b1799 | [
"MIT"
] | null | null | null | b1/config/test.exs | lajeryl/hangman | ad90b6114ac98414b4bddf69bf88b1601b5b1799 | [
"MIT"
] | null | null | null | import Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :b1, B1Web.Endpoint,
http: [ip: {127, 0, 0, 1}, port: 4002],
secret_key_base: "QJi0N+wDzkXlvd7bLYpMzK7/Z5X4FkukY9REPrGV8bHXvE+utwlLBPhUoK58D4Cz",
server: false
# Print only warnings and errors... | 30.933333 | 86 | 0.758621 |
e8817b3d31274d8cc5dbdf5bfacdfce0f95f9479 | 714 | ex | Elixir | lib/telepath_web/gettext.ex | jdangerx/telepath | 75314db05dd97ea86b5a828ab673fed33ecad5e1 | [
"MIT"
] | null | null | null | lib/telepath_web/gettext.ex | jdangerx/telepath | 75314db05dd97ea86b5a828ab673fed33ecad5e1 | [
"MIT"
] | null | null | null | lib/telepath_web/gettext.ex | jdangerx/telepath | 75314db05dd97ea86b5a828ab673fed33ecad5e1 | [
"MIT"
] | null | null | null | defmodule TelepathWeb.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 TelepathWeb.Gettext
# Simple translation
gettext("Here is... | 28.56 | 72 | 0.679272 |
e881c4b3a7375aa66f2b892f9c739fa522fda7f6 | 2,339 | ex | Elixir | lib/slackerton/wikipedia/api.ex | matthewoden/slackerton | 0604122884cf08087432f2e32d80eca42a878c37 | [
"MIT"
] | 1 | 2022-02-19T17:49:37.000Z | 2022-02-19T17:49:37.000Z | lib/slackerton/wikipedia/api.ex | matthewoden/slackerton | 0604122884cf08087432f2e32d80eca42a878c37 | [
"MIT"
] | 4 | 2018-07-14T16:30:17.000Z | 2022-02-10T16:23:23.000Z | lib/slackerton/wikipedia/api.ex | matthewoden/slackerton | 0604122884cf08087432f2e32d80eca42a878c37 | [
"MIT"
] | null | null | null | defmodule Slackerton.Wikipedia.Api do
@moduledoc """
REST API for Wikipedia
They weird redirects (or HTTPoison doesn't handle it correctly, either way),
so we have to redirects and formatting manually.
"""
require Logger
alias HttpBuilder, as: Http
@base_url "https://en.wikipedia.org/api/rest_v1"
@... | 32.486111 | 125 | 0.648995 |
e881d6267c9643a2cc98b5147e25083bdb8e5b03 | 1,396 | ex | Elixir | lib/ua_inspector/database/devices.ex | elixir-twister/ua_inspector | 70642c66c9562d6879fd462e2f9993edb8ab4ce1 | [
"Apache-2.0"
] | null | null | null | lib/ua_inspector/database/devices.ex | elixir-twister/ua_inspector | 70642c66c9562d6879fd462e2f9993edb8ab4ce1 | [
"Apache-2.0"
] | null | null | null | lib/ua_inspector/database/devices.ex | elixir-twister/ua_inspector | 70642c66c9562d6879fd462e2f9993edb8ab4ce1 | [
"Apache-2.0"
] | 1 | 2020-01-30T18:55:12.000Z | 2020-01-30T18:55:12.000Z | defmodule UAInspector.Database.Devices do
@moduledoc """
UAInspector device information database.
"""
use UAInspector.Database, [
sources: [
# files ordered according to
# https://github.com/piwik/device-detector/blob/master/DeviceDetector.php
# to prevent false detections
{ "hbbtv"... | 23.266667 | 79 | 0.549427 |
e881f1c82b98b00f5c02702060890ea15d3ef39c | 1,670 | ex | Elixir | clients/analytics/lib/google_api/analytics/v3/model/account_child_link.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/analytics/lib/google_api/analytics/v3/model/account_child_link.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/analytics/lib/google_api/analytics/v3/model/account_child_link.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.4 | 137 | 0.724551 |
e882226afea58d4a5fb84fed86a0019dc3bdc125 | 1,347 | ex | Elixir | apps/twitter/lib/twitter/collector.ex | glv/revista | 00ecb0780c62a5525155a773b959b169e0e0500d | [
"MIT"
] | 17 | 2019-01-31T18:33:09.000Z | 2022-01-18T12:38:49.000Z | apps/twitter/lib/twitter/collector.ex | glv/revista | 00ecb0780c62a5525155a773b959b169e0e0500d | [
"MIT"
] | null | null | null | apps/twitter/lib/twitter/collector.ex | glv/revista | 00ecb0780c62a5525155a773b959b169e0e0500d | [
"MIT"
] | 4 | 2018-11-10T01:56:17.000Z | 2020-06-09T21:10:41.000Z | defmodule Twitter.Collector do
@moduledoc """
Maintains a list of %Twitter.Tweets{} that have been
retrieved from the Twitter web API, and refreshes the list
on a set interval.
"""
use GenServer
alias Twitter.Endpoint
@name Collector
@client Application.get_env(:twitter, :client)
@refresh_time 1_... | 19.521739 | 72 | 0.64588 |
e8826a151629c6963c94e801118d26e4e00dadcf | 707 | ex | Elixir | lib/docusign/model/template_documents.ex | gaslight/docusign_elixir | d9d88d53dd85d32a39d537bade9db28d779414e6 | [
"MIT"
] | 4 | 2020-12-21T12:50:13.000Z | 2022-01-12T16:50:43.000Z | lib/docusign/model/template_documents.ex | gaslight/docusign_elixir | d9d88d53dd85d32a39d537bade9db28d779414e6 | [
"MIT"
] | 12 | 2018-09-18T15:26:34.000Z | 2019-09-28T15:29:39.000Z | lib/docusign/model/template_documents.ex | gaslight/docusign_elixir | d9d88d53dd85d32a39d537bade9db28d779414e6 | [
"MIT"
] | 15 | 2020-04-29T21:50:16.000Z | 2022-02-11T18:01:51.000Z | # NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
defmodule DocuSign.Model.TemplateDocuments do
@moduledoc """
Template documents
"""
@derive [Poison.Encoder]
defstruct [
:templateDocuments,
... | 23.566667 | 87 | 0.705799 |
e882741765dcf53b70ffdfd3cb265dd979dd5560 | 1,735 | ex | Elixir | lib/chess/store/user.ex | danbee/chess | c766ecb63ed15cd4a5c7ce4b503641d0222fb69d | [
"MIT"
] | 30 | 2018-06-16T00:41:59.000Z | 2021-03-05T08:39:02.000Z | lib/chess/store/user.ex | danbee/chess | c766ecb63ed15cd4a5c7ce4b503641d0222fb69d | [
"MIT"
] | 221 | 2018-01-15T20:33:13.000Z | 2022-02-16T00:53:35.000Z | lib/chess/store/user.ex | danbee/chess | c766ecb63ed15cd4a5c7ce4b503641d0222fb69d | [
"MIT"
] | 5 | 2018-02-20T17:25:19.000Z | 2018-12-29T00:09:30.000Z | defmodule Chess.Store.User do
@moduledoc false
use Ecto.Schema
import Ecto.Changeset
import Ecto.Query
alias Comeonin.Argon2
schema "users" do
field :name, :string
field :email, :string
field :password, :string, virtual: true
field :password_hash, :string
has_many :games, Chess.Stor... | 21.419753 | 76 | 0.662824 |
e882bca7caab53ea06c9d771cc422bcaeb132b84 | 7,233 | ex | Elixir | lib/cldr/calendar/config.ex | kianmeng/cldr_calendars | af1ffe1b40100792e8e643ce09cc7db7224060b6 | [
"Apache-2.0"
] | 6 | 2019-08-29T12:31:03.000Z | 2021-08-28T23:15:39.000Z | lib/cldr/calendar/config.ex | kianmeng/cldr_calendars | af1ffe1b40100792e8e643ce09cc7db7224060b6 | [
"Apache-2.0"
] | 8 | 2019-11-08T09:13:00.000Z | 2021-12-26T05:34:28.000Z | lib/cldr/calendar/config.ex | kianmeng/cldr_calendars | af1ffe1b40100792e8e643ce09cc7db7224060b6 | [
"Apache-2.0"
] | 2 | 2020-05-08T12:19:01.000Z | 2022-03-03T14:53:06.000Z | defmodule Cldr.Calendar.Config do
@moduledoc """
Defines the configuration for a calendar.
See `Cldr.Calendar.new/3` for usage details.
"""
defstruct calendar: nil,
# A default backend for this
# calendar
cldr_backend: nil,
# Each quarter has three
... | 29.765432 | 92 | 0.624361 |
e882d3fc8ce856b8c9b2b51c6b4d1a9a33cef496 | 3,184 | exs | Elixir | phoenix/test/mehr_schulferien_web/controllers/period_controller_test.exs | komlanvi/www.mehr-schulferien.de | fe74772f2cc8ce430e04adf6e66023971456ce57 | [
"MIT"
] | null | null | null | phoenix/test/mehr_schulferien_web/controllers/period_controller_test.exs | komlanvi/www.mehr-schulferien.de | fe74772f2cc8ce430e04adf6e66023971456ce57 | [
"MIT"
] | null | null | null | phoenix/test/mehr_schulferien_web/controllers/period_controller_test.exs | komlanvi/www.mehr-schulferien.de | fe74772f2cc8ce430e04adf6e66023971456ce57 | [
"MIT"
] | null | null | null | defmodule MehrSchulferienWeb.PeriodControllerTest do
use MehrSchulferienWeb.ConnCase
alias MehrSchulferien.Timetables
@create_attrs %{ends_on: ~D[2010-04-17], for_anybody: true, for_students: true, is_a_religion: true, name: "some name", needs_exeat: true, slug: "some slug", source: "some source", starts_on: ~D... | 35.775281 | 237 | 0.674623 |
e882e7af16cdc9dfebd400ed158107cf242cbbbe | 9,355 | ex | Elixir | lib/slime/parser/transform.ex | A-World-For-Us/slime | 0e909776f9022406dd042b20673241dd03224ec9 | [
"MIT"
] | 312 | 2015-12-28T05:25:47.000Z | 2022-02-16T05:18:16.000Z | lib/slime/parser/transform.ex | A-World-For-Us/slime | 0e909776f9022406dd042b20673241dd03224ec9 | [
"MIT"
] | 105 | 2015-12-27T21:20:58.000Z | 2022-02-24T05:23:38.000Z | lib/slime/parser/transform.ex | A-World-For-Us/slime | 0e909776f9022406dd042b20673241dd03224ec9 | [
"MIT"
] | 45 | 2016-01-12T04:02:01.000Z | 2021-09-14T16:19:18.000Z | defmodule Slime.Parser.Transform do
@moduledoc """
PEG parser callbacks module.
Define transformations from parsed iolist to ast.
See https://github.com/seancribbs/neotoma/wiki#working-with-the-ast
"""
import Slime.Parser.Preprocessor, only: [indent_size: 1]
alias Slime.Parser.{AttributesKeyword, Embedd... | 28.177711 | 110 | 0.624158 |
e882f2a2bd958716496817f1e501cc80e465ec50 | 3,720 | ex | Elixir | lib/command-group-emote.ex | rob05c/exedra | 550091d95739959f2587f1245c105f2561caf1ab | [
"MIT"
] | 1 | 2020-11-20T01:58:11.000Z | 2020-11-20T01:58:11.000Z | lib/command-group-emote.ex | rob05c/exedra | 550091d95739959f2587f1245c105f2561caf1ab | [
"MIT"
] | null | null | null | lib/command-group-emote.ex | rob05c/exedra | 550091d95739959f2587f1245c105f2561caf1ab | [
"MIT"
] | null | null | null | defmodule Exedra.CommandGroup.Emote do
alias Exedra.CommandGroup, as: CommandGroup
alias Exedra.WorldManager, as: WorldManager
require Logger
@behaviour CommandGroup
@impl CommandGroup
def exec(["greet" | args], player_name), do: emote(player_name, :greet, args)
def exec(_, _), do: :unhandled
d... | 35.09434 | 111 | 0.687097 |
e882f86da604e3abcc1d364878e9b27600d8147c | 2,716 | ex | Elixir | lib/uiar/group/extract.ex | s-capybara/uiar | 5a5d71b87506d5ac1e9923bc5d23cf4f96070e76 | [
"MIT"
] | 7 | 2019-12-16T02:43:06.000Z | 2022-02-08T21:49:54.000Z | lib/uiar/group/extract.ex | s-capybara/uiar | 5a5d71b87506d5ac1e9923bc5d23cf4f96070e76 | [
"MIT"
] | null | null | null | lib/uiar/group/extract.ex | s-capybara/uiar | 5a5d71b87506d5ac1e9923bc5d23cf4f96070e76 | [
"MIT"
] | 1 | 2020-02-24T17:10:22.000Z | 2020-02-24T17:10:22.000Z | defmodule Uiar.Group.Extract do
@moduledoc false
alias Uiar.{Group, Helper}
require Uiar.Helper
@doc false
@spec eval([String.t()], [Helper.block()]) ::
{Group.uiar_source_lines(), Group.line_number_source_map()}
def eval(source_lines, blocks) do
uiar_source_lines = %{}
line_number_sour... | 31.218391 | 96 | 0.696613 |
e88301755535adf52a03cd251b8c5068991b0949 | 982 | ex | Elixir | lib/jmdict/entry/sense/source.ex | bchase/jmdict-elixir | 29fa95ef85d20e344ee62343df94754bd209a3f2 | [
"MIT"
] | null | null | null | lib/jmdict/entry/sense/source.ex | bchase/jmdict-elixir | 29fa95ef85d20e344ee62343df94754bd209a3f2 | [
"MIT"
] | null | null | null | lib/jmdict/entry/sense/source.ex | bchase/jmdict-elixir | 29fa95ef85d20e344ee62343df94754bd209a3f2 | [
"MIT"
] | null | null | null | defmodule JMDict.Entry.Sense.Source do
import SweetXml
defstruct \
word: "",
lang: "eng",
type: "full",
wasei: false
def parse([]), do: []
def parse(lsources) do
Enum.map(lsources, fn lsource ->
struct __MODULE__, %{
word: xpath(lsource, ~x"//lsource/text()"s),
la... | 22.837209 | 61 | 0.607943 |
e883075bbcf6ac139f87c1b0ef65b02f7c3cf0ab | 1,070 | exs | Elixir | apps/google_maps/test/google_maps/map_data/path_test.exs | noisecapella/dotcom | d5ef869412102d2230fac3dcc216f01a29726227 | [
"MIT"
] | 42 | 2019-05-29T16:05:30.000Z | 2021-08-09T16:03:37.000Z | apps/google_maps/test/google_maps/map_data/path_test.exs | noisecapella/dotcom | d5ef869412102d2230fac3dcc216f01a29726227 | [
"MIT"
] | 872 | 2019-05-29T17:55:50.000Z | 2022-03-30T09:28:43.000Z | apps/google_maps/test/google_maps/map_data/path_test.exs | noisecapella/dotcom | d5ef869412102d2230fac3dcc216f01a29726227 | [
"MIT"
] | 12 | 2019-07-01T18:33:21.000Z | 2022-03-10T02:13:57.000Z | defmodule GoogleMaps.MapData.PathTest do
use ExUnit.Case
import GoogleMaps.MapData.Path
alias GoogleMaps.MapData.Path
@path %Path{
weight: 4,
color: "fff",
polyline: "Polyline"
}
describe "new/1" do
test "creates path with given polyline and default params" do
path = new("polyline")
... | 24.318182 | 69 | 0.639252 |
e88317d4b46218d419173986dca1bb0d9042a14f | 2,357 | ex | Elixir | lib/oli_web/telemetry.ex | chrislawson/oli-torus | 94165b211ab74fac3e7c8a14110a394fa9a6f320 | [
"MIT"
] | 45 | 2020-04-17T15:40:27.000Z | 2022-03-25T00:13:30.000Z | lib/oli_web/telemetry.ex | chrislawson/oli-torus | 94165b211ab74fac3e7c8a14110a394fa9a6f320 | [
"MIT"
] | 944 | 2020-02-13T02:37:01.000Z | 2022-03-31T17:50:07.000Z | lib/oli_web/telemetry.ex | chrislawson/oli-torus | 94165b211ab74fac3e7c8a14110a394fa9a6f320 | [
"MIT"
] | 23 | 2020-07-28T03:36:13.000Z | 2022-03-17T14:29:02.000Z | defmodule OliWeb.Telemetry do
use Supervisor
import Telemetry.Metrics
def start_link(arg) do
Supervisor.start_link(__MODULE__, arg, name: __MODULE__)
end
def init(_arg) do
children = [
{TelemetryMetricsPrometheus, [metrics: metrics()]},
{:telemetry_poller, measurements: periodic_measurem... | 32.736111 | 80 | 0.641918 |
e88326c389e8b940852e4233147388f6e1e19bd7 | 731 | ex | Elixir | lib/beagle.ex | mrblueblue/beagle | 973e3a53a5bc16e3d70e1ea8706ce67e4f38e51b | [
"MIT"
] | null | null | null | lib/beagle.ex | mrblueblue/beagle | 973e3a53a5bc16e3d70e1ea8706ce67e4f38e51b | [
"MIT"
] | null | null | null | lib/beagle.ex | mrblueblue/beagle | 973e3a53a5bc16e3d70e1ea8706ce67e4f38e51b | [
"MIT"
] | null | null | null | defmodule Beagle.Helpers do
use Hound.Helpers
@retry_time 500
@retries 12
def wait_until_not_visible(element, retries \\ @retries) do
if retries == 0 do
{:error, "too many retries"}
else
case Hound.Helpers.Page.search_element(:css, element, 0) do
{:error, _} ->
{:ok, "Elem... | 25.206897 | 75 | 0.653899 |
e883380251f2342422ae36b93426a6c34763804b | 575 | exs | Elixir | exercises/practice/knapsack/mix.exs | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 343 | 2017-06-22T16:28:28.000Z | 2022-03-25T21:33:32.000Z | exercises/practice/knapsack/mix.exs | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 583 | 2017-06-19T10:48:40.000Z | 2022-03-28T21:43:12.000Z | exercises/practice/knapsack/mix.exs | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 228 | 2017-07-05T07:09:32.000Z | 2022-03-27T08:59:08.000Z | defmodule Knapsack.MixProject do
use Mix.Project
def project do
[
app: :knapsack,
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... | 19.827586 | 87 | 0.575652 |
e883a36291973317d1095afe950db59f0b455be5 | 790 | exs | Elixir | test/recase_test/constant_case_test.exs | ndreynolds/recase | 1fee467fe1c6bec0642364c493406454522d3489 | [
"MIT"
] | null | null | null | test/recase_test/constant_case_test.exs | ndreynolds/recase | 1fee467fe1c6bec0642364c493406454522d3489 | [
"MIT"
] | null | null | null | test/recase_test/constant_case_test.exs | ndreynolds/recase | 1fee467fe1c6bec0642364c493406454522d3489 | [
"MIT"
] | null | null | null | defmodule Recase.ConstantCaseTest do
use ExUnit.Case
import Recase.ConstantCase
doctest Recase.ConstantCase
test "should constant case usual text" do
expected = "CONSTANT_CASE"
assert convert("constant case") == expected
assert convert("constantCase") == expected
assert convert("constant-Case... | 27.241379 | 51 | 0.691139 |
e883c5d0f270e77850879977a99399ad0252f62d | 773 | ex | Elixir | lib/excommerce/catalog/category.ex | roger120981/planet | a662006551d11427c08cf6cdbacd37d377bcd9c5 | [
"MIT"
] | 1 | 2019-04-01T19:14:16.000Z | 2019-04-01T19:14:16.000Z | lib/excommerce/catalog/category.ex | roger120981/planet | a662006551d11427c08cf6cdbacd37d377bcd9c5 | [
"MIT"
] | null | null | null | lib/excommerce/catalog/category.ex | roger120981/planet | a662006551d11427c08cf6cdbacd37d377bcd9c5 | [
"MIT"
] | 1 | 2019-03-24T01:50:48.000Z | 2019-03-24T01:50:48.000Z | defmodule Excommerce.Catalog.Category do
use Ecto.Schema
import Ecto.Changeset
alias Excommerce.Catalog.{Category, ProductCategory}
schema "categories" do
field :name, :string
field :icon, :string
belongs_to :parent, Category
has_many :children, Category, foreign_key: :parent_id
has_ma... | 23.424242 | 64 | 0.694696 |
e883cb67bb63a3974f5f782f821590c2833d294d | 4,929 | exs | Elixir | integration/mssql/sql/subquery.exs | nikneroz/mssql_ecto | d010b6c9c9041756353fc8184fa7e6368103cfac | [
"Apache-2.0"
] | null | null | null | integration/mssql/sql/subquery.exs | nikneroz/mssql_ecto | d010b6c9c9041756353fc8184fa7e6368103cfac | [
"Apache-2.0"
] | null | null | null | integration/mssql/sql/subquery.exs | nikneroz/mssql_ecto | d010b6c9c9041756353fc8184fa7e6368103cfac | [
"Apache-2.0"
] | null | null | null | Code.require_file("../support/types.exs", __DIR__)
defmodule Ecto.Integration.SubQueryTest do
use Ecto.Integration.Case, async: true
alias Ecto.Integration.TestRepo
import Ecto.Query
alias Ecto.Integration.Post
alias Ecto.Integration.Comment
test "from: subqueries with select source" do
TestRepo.inse... | 31.8 | 83 | 0.58592 |
e883f945eef34607ee4bf9c061c04159d329bea3 | 1,175 | ex | Elixir | lib/ticketo/accounts/user.ex | alejandronanez/phoenix-absinthe-auth-template | e4e72f52247cb4c880ddc058beaa7b5eecb68980 | [
"MIT"
] | 8 | 2020-06-25T03:15:06.000Z | 2021-12-10T10:52:26.000Z | lib/ticketo/accounts/user.ex | alejandronanez/phoenix-absinthe-auth-template | e4e72f52247cb4c880ddc058beaa7b5eecb68980 | [
"MIT"
] | null | null | null | lib/ticketo/accounts/user.ex | alejandronanez/phoenix-absinthe-auth-template | e4e72f52247cb4c880ddc058beaa7b5eecb68980 | [
"MIT"
] | null | null | null | defmodule Ticketo.Accounts.User do
@moduledoc false
use Ecto.Schema
import Ecto.Changeset
schema "users" do
field :email, :string
field :password_hash, :string
field :password, :string, virtual: true
field :refresh_token, :string
timestamps()
end
@doc false
def changeset(user, attrs... | 22.169811 | 77 | 0.679149 |
e883fe3e9c89e4cf6be93ae8bf92e58754c01109 | 9,073 | ex | Elixir | lib/bootleg/ssh.ex | parthi82/bootleg | 1b8d05bfded54b5ed6845661de516055edd8c498 | [
"MIT"
] | null | null | null | lib/bootleg/ssh.ex | parthi82/bootleg | 1b8d05bfded54b5ed6845661de516055edd8c498 | [
"MIT"
] | null | null | null | lib/bootleg/ssh.ex | parthi82/bootleg | 1b8d05bfded54b5ed6845661de516055edd8c498 | [
"MIT"
] | null | null | null | defmodule Bootleg.SSH do
@moduledoc "Provides SSH related tools for use in `Bootleg.Strategies`."
alias SSHKit.Context
alias SSHKit.Host, as: SSHKitHost
alias SSHKit.SSH, as: SSHKitSSH
alias Bootleg.{Config, Host, Role, UI}
def init(%Role{} = role, options, filter) do
role_options = Keyword.merge(role... | 26.071839 | 92 | 0.631103 |
e8846075c4cb99b0f299ac6c6d4e651783c01192 | 3,294 | ex | Elixir | lib/survey_api/surveys/surveys.ex | kamidev/survey_ap | 483314842cf2e8279e1224e83b57d61a5da143ad | [
"MIT"
] | 6 | 2020-02-04T16:18:30.000Z | 2020-10-31T06:00:03.000Z | lib/survey_api/surveys/surveys.ex | kamidev/survey_ap | 483314842cf2e8279e1224e83b57d61a5da143ad | [
"MIT"
] | 114 | 2019-11-14T03:48:17.000Z | 2022-03-17T12:38:14.000Z | lib/survey_api/surveys/surveys.ex | kamidev/survey_ap | 483314842cf2e8279e1224e83b57d61a5da143ad | [
"MIT"
] | 1 | 2021-07-08T01:48:56.000Z | 2021-07-08T01:48:56.000Z | defmodule SurveyAPI.Surveys do
@moduledoc """
The Surveys context.
"""
import Ecto.Query, warn: false
alias SurveyAPI.Repo
alias SurveyAPI.Surveys.User
@doc """
Returns the list of users.
## Examples
iex> list_users()
[%User{}, ...]
"""
def list_users do
Repo.all(User)
end
... | 16.38806 | 61 | 0.57377 |
e8847b1cfcfdd53c96dba4894d6218344b728449 | 2,035 | ex | Elixir | lib/log_analyzer/db_config.ex | ColdOrange/log_analyzer | a48566addc154d1bc2a0434b78b36562ac15f130 | [
"MIT"
] | null | null | null | lib/log_analyzer/db_config.ex | ColdOrange/log_analyzer | a48566addc154d1bc2a0434b78b36562ac15f130 | [
"MIT"
] | null | null | null | lib/log_analyzer/db_config.ex | ColdOrange/log_analyzer | a48566addc154d1bc2a0434b78b36562ac15f130 | [
"MIT"
] | null | null | null | defmodule LogAnalyzer.DBConfig do
require Logger
use Agent
alias LogAnalyzer.Repo.{Migrator, Supervisor}
@project_path File.cwd!()
@db_config_file Path.join(~w(#{@project_path} priv config db_config.json))
@derive [Poison.Encoder]
defstruct initialized: false,
driver: nil,
userna... | 24.22619 | 76 | 0.581327 |
e88492dd0c989a0a1b74ba94c147ff71d9ff75ed | 1,093 | ex | Elixir | lib/queries/index_cache_hit.ex | jaimeiniesta/ecto_psql_extras | 76c19373e170001e20a0a3a8ab3294fb7dc77175 | [
"MIT"
] | null | null | null | lib/queries/index_cache_hit.ex | jaimeiniesta/ecto_psql_extras | 76c19373e170001e20a0a3a8ab3294fb7dc77175 | [
"MIT"
] | null | null | null | lib/queries/index_cache_hit.ex | jaimeiniesta/ecto_psql_extras | 76c19373e170001e20a0a3a8ab3294fb7dc77175 | [
"MIT"
] | null | null | null | defmodule EctoPSQLExtras.IndexCacheHit do
@behaviour EctoPSQLExtras
def info do
%{
title: "Calculates your cache hit rate for reading indexes",
index: 3,
order_by: [ratio: :desc],
columns: [
%{name: :schema, type: :string},
%{name: :name, type: :string},
%{name: ... | 27.325 | 78 | 0.613907 |
e884b7390ffdbc3be11a52b09feb3fecdea549c7 | 1,290 | exs | Elixir | config/config.exs | neojin/nomad-elixir | 95d169adcfe42549a4f7d8e939c7a47e211fbb04 | [
"ECL-2.0",
"Apache-2.0"
] | 5 | 2017-12-08T17:56:01.000Z | 2022-01-04T00:26:43.000Z | config/config.exs | neojin/nomad-elixir | 95d169adcfe42549a4f7d8e939c7a47e211fbb04 | [
"ECL-2.0",
"Apache-2.0"
] | 6 | 2017-11-24T18:10:47.000Z | 2017-11-26T17:58:11.000Z | config/config.exs | neojin/nomad-elixir | 95d169adcfe42549a4f7d8e939c7a47e211fbb04 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-07-20T15:27:13.000Z | 2021-07-20T15:27:13.000Z | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
config :nomex, nomad_host: System.get_env("NOMAD_HOST") || "http://127.0.0.1:4646"
config :nomex, nomad_version: "v1"
config :nomex, nomad_token: System.get_env("NOMAD_TOKEN")
# Thi... | 36.857143 | 82 | 0.748062 |
e884bc7670ed7f62e8036d322aed5026d5804b9c | 109 | ex | Elixir | lib/excommerce/queries/zone_member.ex | roger120981/planet | a662006551d11427c08cf6cdbacd37d377bcd9c5 | [
"MIT"
] | 1 | 2019-04-01T19:14:16.000Z | 2019-04-01T19:14:16.000Z | lib/excommerce/queries/zone_member.ex | roger120981/planet | a662006551d11427c08cf6cdbacd37d377bcd9c5 | [
"MIT"
] | null | null | null | lib/excommerce/queries/zone_member.ex | roger120981/planet | a662006551d11427c08cf6cdbacd37d377bcd9c5 | [
"MIT"
] | 1 | 2019-03-24T01:50:48.000Z | 2019-03-24T01:50:48.000Z | defmodule Excommerce.Query.ZoneMember do
use Excommerce.Query, schema: Excommerce.Addresses.ZoneMember
end
| 27.25 | 63 | 0.844037 |
e884ff578969064dabea38c2ec72a22db7efd71c | 1,134 | exs | Elixir | test/wanon/cache/cache_clean_test.exs | graffic/wanon-elixir | 65fcde17cbbeb1af3fda5f6423dba112dfa3b9a9 | [
"MIT"
] | 1 | 2018-11-28T07:44:28.000Z | 2018-11-28T07:44:28.000Z | test/wanon/cache/cache_clean_test.exs | graffic/wanon-elixir | 65fcde17cbbeb1af3fda5f6423dba112dfa3b9a9 | [
"MIT"
] | 1 | 2018-10-24T20:59:09.000Z | 2018-10-24T20:59:09.000Z | test/wanon/cache/cache_clean_test.exs | graffic/wanon-elixir | 65fcde17cbbeb1af3fda5f6423dba112dfa3b9a9 | [
"MIT"
] | null | null | null | defmodule CacheCleanTest do
use ExUnit.Case
import Ecto.Query
alias Wanon.Cache.Clean
alias Wanon.Cache.CacheEntry
setup do
:ok = Ecto.Adapters.SQL.Sandbox.checkout(Wanon.Repo)
end
test "Deletes old cache entries" do
# Add some entries
now = DateTime.to_unix(DateTime.utc_now())
%CacheEn... | 22.235294 | 73 | 0.62522 |
e88505d2de6db6120516e0b387bf06fd362b64e6 | 78 | exs | Elixir | test/test_helper.exs | brandaoplaster/personal_training | 6b30501d1e96f500eace4ba241af8bbd40e7287a | [
"MIT"
] | null | null | null | test/test_helper.exs | brandaoplaster/personal_training | 6b30501d1e96f500eace4ba241af8bbd40e7287a | [
"MIT"
] | 3 | 2022-03-06T17:39:09.000Z | 2022-03-06T19:24:53.000Z | test/test_helper.exs | brandaoplaster/personal_training | 6b30501d1e96f500eace4ba241af8bbd40e7287a | [
"MIT"
] | null | null | null | ExUnit.start()
Ecto.Adapters.SQL.Sandbox.mode(PersonalTraining.Repo, :manual)
| 26 | 62 | 0.807692 |
e8857262855304a33ed52fcef8c38f954a48f206 | 1,724 | ex | Elixir | lib/brando_admin/components/form/input/code.ex | brandocms/brando | 4198e0c0920031bd909969055064e4e2b7230d21 | [
"MIT"
] | 4 | 2020-10-30T08:40:38.000Z | 2022-01-07T22:21:37.000Z | lib/brando_admin/components/form/input/code.ex | brandocms/brando | 4198e0c0920031bd909969055064e4e2b7230d21 | [
"MIT"
] | 1,162 | 2020-07-05T11:20:15.000Z | 2022-03-31T06:01:49.000Z | lib/brando_admin/components/form/input/code.ex | brandocms/brando | 4198e0c0920031bd909969055064e4e2b7230d21 | [
"MIT"
] | null | null | null | defmodule BrandoAdmin.Components.Form.Input.Code do
use Surface.LiveComponent
use Phoenix.HTML
alias BrandoAdmin.Components.Form.FieldBase
prop form, :form
prop field, :any
prop blueprint, :any
prop input, :any
prop label, :string
prop value, :any
prop placeholder, :string
prop instructions, :str... | 22.38961 | 66 | 0.544084 |
e8858860ce1fdfa03a1d5cd3e84505f5b6734670 | 16,905 | ex | Elixir | lib/discord_ex/rest_client/resources/guild.ex | LuaiKam/discord_ex | 4fdbc1e8035c646fff5fef94d709c2465238b04f | [
"MIT"
] | 62 | 2016-07-22T22:01:50.000Z | 2021-12-27T22:00:03.000Z | lib/discord_ex/rest_client/resources/guild.ex | LuaiKam/discord_ex | 4fdbc1e8035c646fff5fef94d709c2465238b04f | [
"MIT"
] | 32 | 2016-08-05T03:46:04.000Z | 2018-04-12T17:36:36.000Z | lib/discord_ex/rest_client/resources/guild.ex | LuaiKam/discord_ex | 4fdbc1e8035c646fff5fef94d709c2465238b04f | [
"MIT"
] | 26 | 2016-08-06T01:32:15.000Z | 2018-09-12T20:51:34.000Z | defmodule DiscordEx.RestClient.Resources.Guild do
@moduledoc """
Convience helper for guild resource
"""
@doc """
Get guild object
## Parameters
- conn: User connection for REST holding auth info
- guild_id: Guild id
## Examples
Guild.get(conn, 9999999923792)
"""
@spec get(pid, Stri... | 26.25 | 130 | 0.674889 |
e8858b57d8ac9448485e99991cf8324882787ab5 | 2,898 | exs | Elixir | mix.exs | deep-spaced/ex_venture | 45848abe509620d6d2643b2a780dab01c1ac523b | [
"MIT"
] | null | null | null | mix.exs | deep-spaced/ex_venture | 45848abe509620d6d2643b2a780dab01c1ac523b | [
"MIT"
] | null | null | null | mix.exs | deep-spaced/ex_venture | 45848abe509620d6d2643b2a780dab01c1ac523b | [
"MIT"
] | null | null | null | defmodule ExVenture.Mixfile do
use Mix.Project
def project do
[
app: :ex_venture,
version: "0.25.0",
elixir: "~> 1.7.2",
elixirc_paths: elixirc_paths(Mix.env()),
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
compilers: [:phoenix, :gettext] ++... | 30.505263 | 98 | 0.532091 |
e885919a0bb381f2630eb50f2a7400942b878ded | 860 | ex | Elixir | guides/key_value_store/lib/kv/bucket.ex | shivam-tripathi/learningElixir | 195af962dcd239230afd7732b88e577f26fc1eff | [
"MIT"
] | null | null | null | guides/key_value_store/lib/kv/bucket.ex | shivam-tripathi/learningElixir | 195af962dcd239230afd7732b88e577f26fc1eff | [
"MIT"
] | null | null | null | guides/key_value_store/lib/kv/bucket.ex | shivam-tripathi/learningElixir | 195af962dcd239230afd7732b88e577f26fc1eff | [
"MIT"
] | null | null | null | defmodule KV.Bucket do
use Agent
def start_link(opts) do
Agent.start_link(fn -> %{} end, opts)
end
def get(bucket, key) do
Agent.get(bucket, &Map.get(&1, key))
end
def put(bucket, key, value) do
Agent.update(bucket, &Map.put(&1, key, value))
end
def del(bucket, key) do
Agent.get_and_... | 28.666667 | 93 | 0.688372 |
e885a2bcaa56d023410c4d06d0eff61fc5f320d9 | 6,210 | ex | Elixir | lib/phoenix_live_view/router.ex | smeade/phoenix_live_view | c981846c1e350bc689c28b4cbdaeffe1e30240b2 | [
"MIT"
] | 1 | 2020-07-26T12:20:43.000Z | 2020-07-26T12:20:43.000Z | lib/phoenix_live_view/router.ex | smeade/phoenix_live_view | c981846c1e350bc689c28b4cbdaeffe1e30240b2 | [
"MIT"
] | null | null | null | lib/phoenix_live_view/router.ex | smeade/phoenix_live_view | c981846c1e350bc689c28b4cbdaeffe1e30240b2 | [
"MIT"
] | null | null | null | defmodule Phoenix.LiveView.Router do
@moduledoc """
Provides LiveView routing for Phoenix routers.
"""
@cookie_key "__phoenix_flash__"
@doc """
Defines a LiveView route.
A LiveView can be routed to by using the `live` macro with a path and
the name of the LiveView:
live "/thermostat", Thermost... | 33.031915 | 99 | 0.664573 |
e885a3bb856f5313e10b85505709f2a7cb8e18bd | 2,799 | ex | Elixir | clients/container/lib/google_api/container/v1/model/recurring_time_window.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/container/lib/google_api/container/v1/model/recurring_time_window.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/container/lib/google_api/container/v1/model/recurring_time_window.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... | 55.98 | 1,187 | 0.745623 |
e885d94ec5ad41d458faa1247bc2bf453462df76 | 392 | exs | Elixir | priv/repo/migrations/20210419101831_create_keywords.exs | byhbt/kwtool | 8958a160066e3e4c61806202af2563541f2261e3 | [
"MIT"
] | 5 | 2021-12-14T08:18:24.000Z | 2022-03-29T10:02:48.000Z | priv/repo/migrations/20210419101831_create_keywords.exs | byhbt/kwtool | 8958a160066e3e4c61806202af2563541f2261e3 | [
"MIT"
] | 32 | 2021-03-21T16:32:18.000Z | 2022-03-23T08:00:37.000Z | priv/repo/migrations/20210419101831_create_keywords.exs | byhbt/kwtool | 8958a160066e3e4c61806202af2563541f2261e3 | [
"MIT"
] | 1 | 2021-06-03T17:22:16.000Z | 2021-06-03T17:22:16.000Z | defmodule Kwtool.Repo.Migrations.CreateKeywords do
use Ecto.Migration
def change do
create table(:keywords) do
add :phrase, :string, null: false
add :raw_result, :text
add :status, :string, null: false, default: "imported"
add :user_id, references(:users, on_delete: :delete_all)
... | 23.058824 | 62 | 0.668367 |
e885e6e4c9e71582a370d4958f470d4298baced3 | 2,055 | ex | Elixir | clients/slides/lib/google_api/slides/v1/model/recolor.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/slides/lib/google_api/slides/v1/model/recolor.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/slides/lib/google_api/slides/v1/model/recolor.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 ... | 34.830508 | 170 | 0.719221 |
e885fe67ac74b22bb5d5b2b7f7c1156a634f3976 | 393 | ex | Elixir | lib/juvet/middleware/action_runner.ex | juvet/juvet | 5590ff7b1e5f411195d0becfe8b5740deb977cc5 | [
"MIT"
] | 19 | 2018-07-14T16:54:11.000Z | 2022-03-01T09:02:19.000Z | lib/juvet/middleware/action_runner.ex | juvet/juvet | 5590ff7b1e5f411195d0becfe8b5740deb977cc5 | [
"MIT"
] | 31 | 2018-06-29T15:30:40.000Z | 2022-02-26T01:07:12.000Z | lib/juvet/middleware/action_runner.ex | juvet/juvet | 5590ff7b1e5f411195d0becfe8b5740deb977cc5 | [
"MIT"
] | null | null | null | defmodule Juvet.Middleware.ActionRunner do
def call(%{action: action} = context) do
m = elem(action, 0)
f = elem(action, 1)
try do
apply(m, f, [context])
rescue
UndefinedFunctionError -> {:error, "`#{m}.#{f}/1` is not defined"}
else
_ ->
{:ok, context}
end
end
d... | 21.833333 | 72 | 0.577608 |
e88651987abeb430e2d266821a3d38e9e29d816b | 1,263 | ex | Elixir | lib/couch_normalizer/scenario.ex | Zatvobor/couch_normalizer | 1bbde7b7235220c7e2aed9924e3781f423175afd | [
"Apache-2.0"
] | 1 | 2015-02-23T14:25:10.000Z | 2015-02-23T14:25:10.000Z | lib/couch_normalizer/scenario.ex | Zatvobor/couch_normalizer | 1bbde7b7235220c7e2aed9924e3781f423175afd | [
"Apache-2.0"
] | 2 | 2015-03-05T17:02:38.000Z | 2015-03-30T10:33:29.000Z | lib/couch_normalizer/scenario.ex | Zatvobor/couch_normalizer | 1bbde7b7235220c7e2aed9924e3781f423175afd | [
"Apache-2.0"
] | null | null | null | defmodule CouchNormalizer.Scenario do
@moduledoc """
This module specifies the Normalization DSL and brings
manipulation functions to your scenario.
Check for more information:
* `CouchNormalizer.Scenario.DocMethods`
* `CouchNormalizer.Scenario.CachedMethods`
* `CouchNormalizer.Scenario.FieldMethods`
... | 25.26 | 72 | 0.721298 |
e88668c0e63cf3c8c1ed19ec34c7f33affc54f6b | 3,478 | ex | Elixir | lib/still/compiler/pass_through_copy.ex | michaeldelago/still | 2c4593779a3c4f987d718fd27ee8a76c79cfd5d8 | [
"0BSD"
] | 202 | 2021-01-13T15:45:17.000Z | 2022-03-22T01:26:27.000Z | lib/still/compiler/pass_through_copy.ex | michaeldelago/still | 2c4593779a3c4f987d718fd27ee8a76c79cfd5d8 | [
"0BSD"
] | 55 | 2021-01-26T14:11:34.000Z | 2022-03-22T22:34:37.000Z | lib/still/compiler/pass_through_copy.ex | michaeldelago/still | 2c4593779a3c4f987d718fd27ee8a76c79cfd5d8 | [
"0BSD"
] | 10 | 2021-02-04T21:14:41.000Z | 2022-03-20T10:12:59.000Z | defmodule Still.Compiler.PassThroughCopy do
@moduledoc """
Copies a file from the input path to the output directory without changing it.
## Matching parameters
You can configure matching parameters by setting
config :still,
pass_through_copy: ["img/logo.png"]
In the example above, the file ... | 28.983333 | 87 | 0.690052 |
e88676702a1e7a9a84b3f94c28ee27c2c225a004 | 1,284 | ex | Elixir | lib/vim_snake_web/endpoint.ex | theanht1/vim_snake | a7650acf579721917a27d2f6c65f3e0d03e2d893 | [
"MIT"
] | 19 | 2020-01-15T05:34:44.000Z | 2022-03-01T14:11:00.000Z | lib/vim_snake_web/endpoint.ex | theanht1/vim_snake | a7650acf579721917a27d2f6c65f3e0d03e2d893 | [
"MIT"
] | 2 | 2021-09-14T03:06:58.000Z | 2022-02-12T04:31:34.000Z | lib/vim_snake_web/endpoint.ex | theanht1/vim_snake | a7650acf579721917a27d2f6c65f3e0d03e2d893 | [
"MIT"
] | null | null | null | defmodule VimSnakeWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :vim_snake
socket "/socket", VimSnakeWeb.UserSocket,
websocket: [timeout: 45_000],
longpoll: false
# Serve at "/" the static files from "priv/static" directory.
#
# You should set gzip to true if you are running phx.digest
# when dep... | 27.319149 | 69 | 0.71028 |
e8867678b77cb2f7f73df1dfbb5ab816d32bb093 | 6,912 | ex | Elixir | apps/bytepack_web/lib/bytepack_web/router.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/router.ex | dashbitco/bytepack_archive | 79f8e62149d020f2afcc501592ed399f7ce7a60b | [
"Unlicense"
] | null | null | null | apps/bytepack_web/lib/bytepack_web/router.ex | dashbitco/bytepack_archive | 79f8e62149d020f2afcc501592ed399f7ce7a60b | [
"Unlicense"
] | 57 | 2020-12-03T17:41:53.000Z | 2022-03-17T17:28:16.000Z | defmodule BytepackWeb.Router do
use BytepackWeb, :router
import Phoenix.LiveView.Router
import Phoenix.LiveDashboard.Router
import Phoenix.LiveView.Router
import BytepackWeb.UserAuth
import BytepackWeb.RequestContext
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetc... | 35.265306 | 97 | 0.716435 |
e88676fdd7e66c98e13d48551566c66b4dca5e8e | 2,500 | exs | Elixir | test/vex_test.exs | jtmoulia/vex | 78161e174777cb2d0d808326afe619fb893da8d1 | [
"MIT"
] | null | null | null | test/vex_test.exs | jtmoulia/vex | 78161e174777cb2d0d808326afe619fb893da8d1 | [
"MIT"
] | null | null | null | test/vex_test.exs | jtmoulia/vex | 78161e174777cb2d0d808326afe619fb893da8d1 | [
"MIT"
] | null | null | null | # Complex combinations of validations
# For validation-specific tests see test/validations/**/*_test.exs
defmodule VexTest do
use ExUnit.Case
test "invalid validation name error is raised" do
assert_raise Vex.InvalidValidatorError, fn ->
Vex.valid?([name: "Foo"], name: [foobar: true])
end
end
t... | 40.322581 | 106 | 0.6612 |
e886bca84d92bca1691c528b2477367e15b5b92e | 737 | ex | Elixir | lib/model.ex | aforward-oss/timex_ecto | 40c7f0863b9bffab9ce81129b45eec694f66382e | [
"MIT"
] | null | null | null | lib/model.ex | aforward-oss/timex_ecto | 40c7f0863b9bffab9ce81129b45eec694f66382e | [
"MIT"
] | null | null | null | lib/model.ex | aforward-oss/timex_ecto | 40c7f0863b9bffab9ce81129b45eec694f66382e | [
"MIT"
] | null | null | null | defmodule Timex.Ecto.Timestamps do
@moduledoc """
Provides a simple way to use Timex with Ecto timestamps.
# Example
```
defmodule User do
use Ecto.Model
use Timex.Ecto.Timestamps
schema "user" do
field :name, :string
timestamps
end
```
For potentially easier use with Phoen... | 18.897436 | 77 | 0.672999 |
e886bf08807c5527813996a2b4e38609b76693de | 2,392 | ex | Elixir | clients/app_engine/lib/google_api/app_engine/v1/model/domain_mapping.ex | nuxlli/elixir-google-api | ecb8679ac7282b7dd314c3e20c250710ec6a7870 | [
"Apache-2.0"
] | null | null | null | clients/app_engine/lib/google_api/app_engine/v1/model/domain_mapping.ex | nuxlli/elixir-google-api | ecb8679ac7282b7dd314c3e20c250710ec6a7870 | [
"Apache-2.0"
] | null | null | null | clients/app_engine/lib/google_api/app_engine/v1/model/domain_mapping.ex | nuxlli/elixir-google-api | ecb8679ac7282b7dd314c3e20c250710ec6a7870 | [
"Apache-2.0"
] | 1 | 2020-11-10T16:58:27.000Z | 2020-11-10T16:58:27.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... | 41.964912 | 260 | 0.743729 |
e886de837e5a36212b139e9cc102388182786e25 | 2,861 | exs | Elixir | test/test_helper.exs | kianmeng/shippex | 0e4e562bdf1070c3fd39c9fa21bddaf51c9ea718 | [
"MIT"
] | null | null | null | test/test_helper.exs | kianmeng/shippex | 0e4e562bdf1070c3fd39c9fa21bddaf51c9ea718 | [
"MIT"
] | null | null | null | test/test_helper.exs | kianmeng/shippex | 0e4e562bdf1070c3fd39c9fa21bddaf51c9ea718 | [
"MIT"
] | null | null | null | ExUnit.start()
ExUnit.configure(exclude: [skip: true])
defmodule Helper do
def valid_shipment(opts \\ []) do
to = Keyword.get(opts, :to, "US")
insurance = Keyword.get(opts, :insurance)
Shippex.Shipment.new!(origin(), destination(to), package(insurance))
end
def origin() do
Shippex.Address.new!(%... | 23.644628 | 82 | 0.556449 |
e886de95d25f4607b4a3b80d004502bbc71b72fb | 12,587 | exs | Elixir | test/ex_phone_number/metadata_test.exs | msharp/ex_phone_number | ae8d4fb8d78b119b64fb926d4047ddf133d9998b | [
"MIT"
] | 179 | 2016-05-18T17:51:14.000Z | 2022-03-17T17:01:53.000Z | test/ex_phone_number/metadata_test.exs | msharp/ex_phone_number | ae8d4fb8d78b119b64fb926d4047ddf133d9998b | [
"MIT"
] | 45 | 2016-05-18T15:46:39.000Z | 2022-03-04T12:48:54.000Z | test/ex_phone_number/metadata_test.exs | msharp/ex_phone_number | ae8d4fb8d78b119b64fb926d4047ddf133d9998b | [
"MIT"
] | 52 | 2016-06-06T05:21:00.000Z | 2022-01-07T22:38:22.000Z | defmodule ExPhoneNumber.MetadataTest do
use ExUnit.Case, async: true
doctest ExPhoneNumber.Metadata
import ExPhoneNumber.Metadata
alias ExPhoneNumber.Constants.PhoneNumberTypes
alias ExPhoneNumber.Constants.Values
alias ExPhoneNumber.Metadata.PhoneMetadata
alias ExPhoneNumber.{PhoneNumberFixture, Regio... | 44.01049 | 120 | 0.735282 |
e8870784efcf6b7d16ccc1e2971eb0df48b78cf3 | 1,823 | ex | Elixir | lib/web/controllers/api/submission_document_controller.ex | smartlogic/Challenge_gov | b4203d1fcfb742dd17ecfadb9e9c56ad836d4254 | [
"CC0-1.0"
] | 9 | 2020-02-26T20:24:38.000Z | 2022-03-22T21:14:52.000Z | lib/web/controllers/api/submission_document_controller.ex | smartlogic/Challenge_gov | b4203d1fcfb742dd17ecfadb9e9c56ad836d4254 | [
"CC0-1.0"
] | 15 | 2020-04-22T19:33:24.000Z | 2022-03-26T15:11:17.000Z | lib/web/controllers/api/submission_document_controller.ex | smartlogic/Challenge_gov | b4203d1fcfb742dd17ecfadb9e9c56ad836d4254 | [
"CC0-1.0"
] | 4 | 2020-04-27T22:58:57.000Z | 2022-01-14T13:42:09.000Z | defmodule Web.Api.SubmissionDocumentController do
use Web, :controller
alias ChallengeGov.SubmissionDocuments
alias Web.ErrorView
alias ChallengeGov.Accounts
alias ChallengeGov.Submissions
def create(conn, %{"document" => _params, "solver_email" => ""}) do
{:error, changeset} =
Submissions.new()... | 29.403226 | 78 | 0.616018 |
e88748aaad648994cc44df1479d4b13ba61d530b | 15,395 | exs | Elixir | lib/elixir/test/elixir/option_parser_test.exs | eproxus/elixir | 1c3a3bde539bc96c80d917fbcf3c9dc9e123860b | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/option_parser_test.exs | eproxus/elixir | 1c3a3bde539bc96c80d917fbcf3c9dc9e123860b | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/option_parser_test.exs | eproxus/elixir | 1c3a3bde539bc96c80d917fbcf3c9dc9e123860b | [
"Apache-2.0"
] | null | null | null | Code.require_file "test_helper.exs", __DIR__
defmodule OptionParserTest do
use ExUnit.Case, async: true
doctest OptionParser
test "parses boolean option" do
assert OptionParser.parse(["--docs"]) == {[docs: true], [], []}
end
test "parses alias boolean option as the alias key" do
assert OptionParse... | 39.780362 | 115 | 0.528288 |
e887557d4cf319e130f6a00e542c4583600e8ff0 | 793 | exs | Elixir | test/json_schema_test_suite/draft7/exclusive_minimum_test.exs | kianmeng/xema | a990d64fb4bcd708249514daa55426ee003da25d | [
"MIT"
] | 49 | 2018-06-05T09:42:19.000Z | 2022-02-15T12:50:51.000Z | test/json_schema_test_suite/draft7/exclusive_minimum_test.exs | kianmeng/xema | a990d64fb4bcd708249514daa55426ee003da25d | [
"MIT"
] | 152 | 2017-06-11T13:43:06.000Z | 2022-01-09T17:13:45.000Z | test/json_schema_test_suite/draft7/exclusive_minimum_test.exs | kianmeng/xema | a990d64fb4bcd708249514daa55426ee003da25d | [
"MIT"
] | 6 | 2019-05-31T05:41:47.000Z | 2021-12-14T08:09:36.000Z | defmodule JsonSchemaTestSuite.Draft7.ExclusiveMinimumTest do
use ExUnit.Case
import Xema, only: [valid?: 2]
describe ~s|exclusiveMinimum validation| do
setup do
%{
schema:
Xema.from_json_schema(
%{"exclusiveMinimum" => 1.1},
draft: "draft7",
atom: ... | 22.657143 | 72 | 0.595208 |
e8878656a8241f187120f4f4f48bf5916c5535e7 | 7,192 | ex | Elixir | lib/plug/test.ex | tomciopp/plug | af7fba19e8bce208129d858b924c7a49b93beef1 | [
"Apache-2.0"
] | null | null | null | lib/plug/test.ex | tomciopp/plug | af7fba19e8bce208129d858b924c7a49b93beef1 | [
"Apache-2.0"
] | null | null | null | lib/plug/test.ex | tomciopp/plug | af7fba19e8bce208129d858b924c7a49b93beef1 | [
"Apache-2.0"
] | null | null | null | defmodule Plug.Test do
@moduledoc """
Conveniences for testing plugs.
This module can be used in your test cases, like this:
use ExUnit.Case, async: true
use Plug.Test
Using this module will:
* import all the functions from this module
* import all the functions from the `Plug.Conn` modu... | 31 | 96 | 0.664488 |
e8879f1fda68f2c38c99d490d1a3d6eb9d52ef46 | 1,248 | ex | Elixir | oeml-sdk/elixir/lib/oeml_restapi/model/order_execution_report_all_of.ex | Martin-Molinero/coinapi-sdk | 8633f61e0809e7ee4032100fe08454e8c4ad5e0c | [
"MIT"
] | 357 | 2017-05-29T15:09:19.000Z | 2022-03-30T15:34:10.000Z | oeml-sdk/elixir/lib/oeml_restapi/model/order_execution_report_all_of.ex | Martin-Molinero/coinapi-sdk | 8633f61e0809e7ee4032100fe08454e8c4ad5e0c | [
"MIT"
] | 68 | 2017-12-15T15:39:14.000Z | 2022-02-11T11:28:17.000Z | oeml-sdk/elixir/lib/oeml_restapi/model/order_execution_report_all_of.ex | Martin-Molinero/coinapi-sdk | 8633f61e0809e7ee4032100fe08454e8c4ad5e0c | [
"MIT"
] | 199 | 2017-06-01T07:51:14.000Z | 2022-03-25T11:52:28.000Z | # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://openapi-generator.tech
# Do not edit the class manually.
defmodule OEML-RESTAPI.Model.OrderExecutionReportAllOf do
@moduledoc """
The order execution report message.
"""
@derive [Poison.Encoder]
defstruct [... | 27.733333 | 91 | 0.663462 |
e887bfd0dc994579940ff56b9277f7b9ca33e621 | 15,553 | ex | Elixir | kousa/lib/kousa/room.ex | JammSpread/dogehouse | 3e59d04fefe852dfa57f5d30ee0a74171d866b9a | [
"MIT"
] | null | null | null | kousa/lib/kousa/room.ex | JammSpread/dogehouse | 3e59d04fefe852dfa57f5d30ee0a74171d866b9a | [
"MIT"
] | null | null | null | kousa/lib/kousa/room.ex | JammSpread/dogehouse | 3e59d04fefe852dfa57f5d30ee0a74171d866b9a | [
"MIT"
] | null | null | null | defmodule Kousa.Room do
alias Kousa.Utils.VoiceServerUtils
alias Beef.Users
alias Beef.Follows
alias Beef.Rooms
# note the following 2 module aliases are on the chopping block!
alias Beef.RoomPermissions
alias Beef.RoomBlocks
alias Onion.PubSub
alias Onion.UserSession
alias Broth.SocketHandler
de... | 27.430335 | 96 | 0.573266 |
e887d2205e021fbdb0c857d004e69ba8beafd2b7 | 1,203 | ex | Elixir | server/lib/blogsley/accounts/user.ex | blogsley/blogsley-absinthe | 7266f80a0638f8c30c37b37296ba5d78dcf8fb8b | [
"MIT"
] | 3 | 2020-01-23T06:37:18.000Z | 2020-12-05T08:31:00.000Z | server/lib/blogsley/accounts/user.ex | blogsley/blogsley-absinthe | 7266f80a0638f8c30c37b37296ba5d78dcf8fb8b | [
"MIT"
] | 16 | 2020-04-04T05:13:52.000Z | 2022-03-31T11:19:20.000Z | server/lib/blogsley/accounts/user.ex | blogsley/blogsley | 7266f80a0638f8c30c37b37296ba5d78dcf8fb8b | [
"MIT"
] | null | null | null | defmodule Blogsley.Accounts.User do
use Ecto.Schema
import Ecto.Changeset
alias Blogsley.Accounts.User
schema "users" do
field :email, :string
field :password, :string, virtual: true
field :password_hash, :string
field :username, :string
field :first_name, :string
field :last_name, :st... | 22.277778 | 73 | 0.65586 |
e887e63ff2dc4a80d3b201d516dce26fd51baeab | 959 | ex | Elixir | lib/dayron/loggers/basic_logger.ex | inaka/Dayron | d6773dacdc681766bfcb41dd792c102ab7217b1c | [
"Apache-2.0"
] | 169 | 2016-05-05T17:21:45.000Z | 2022-01-31T20:23:07.000Z | lib/dayron/loggers/basic_logger.ex | inaka/Dayron | d6773dacdc681766bfcb41dd792c102ab7217b1c | [
"Apache-2.0"
] | 51 | 2016-04-22T20:46:37.000Z | 2022-02-22T00:15:40.000Z | lib/dayron/loggers/basic_logger.ex | inaka/RestRepo | d6773dacdc681766bfcb41dd792c102ab7217b1c | [
"Apache-2.0"
] | 26 | 2016-05-21T09:52:26.000Z | 2022-02-11T18:07:14.000Z | defmodule Dayron.BasicLogger do
@moduledoc """
Helper module wrapping Logger calls to register request/response events
"""
require Logger
alias Dayron.Response
alias Dayron.ClientError
@doc """
Logs a debug message for response codes between 200-499.
"""
def log(request, %Response{status_code: code... | 27.4 | 78 | 0.701773 |
e887f13ec40227974292914f308e563fd3fc7124 | 8,942 | ex | Elixir | kousa/lib/broth/translator/v0_1_0.ex | asgarovf/dogehouse | 12b81d2008562373591fb55ab8179a3fa8a5db18 | [
"MIT"
] | 1 | 2021-05-18T15:21:25.000Z | 2021-05-18T15:21:25.000Z | kousa/lib/broth/translator/v0_1_0.ex | asgarovf/dogehouse | 12b81d2008562373591fb55ab8179a3fa8a5db18 | [
"MIT"
] | null | null | null | kousa/lib/broth/translator/v0_1_0.ex | asgarovf/dogehouse | 12b81d2008562373591fb55ab8179a3fa8a5db18 | [
"MIT"
] | null | null | null | defmodule Broth.Translator.V0_1_0 do
@moduledoc """
Version 0.1.0 -> 0.2.0 translation
"""
import Kousa.Utils.Version, only: [sigil_v: 2]
############################################################################
## INBOUND MESSAGES
@operator_translations %{
"send_room_chat_msg" => "chat:send_msg... | 31.597173 | 92 | 0.64471 |
e888462a0cb2de740485d5e55237cccf19fe5fa7 | 1,991 | ex | Elixir | apps/site/lib/site_web/views/cms_view.ex | noisecapella/dotcom | d5ef869412102d2230fac3dcc216f01a29726227 | [
"MIT"
] | 42 | 2019-05-29T16:05:30.000Z | 2021-08-09T16:03:37.000Z | apps/site/lib/site_web/views/cms_view.ex | noisecapella/dotcom | d5ef869412102d2230fac3dcc216f01a29726227 | [
"MIT"
] | 872 | 2019-05-29T17:55:50.000Z | 2022-03-30T09:28:43.000Z | apps/site/lib/site_web/views/cms_view.ex | noisecapella/dotcom | d5ef869412102d2230fac3dcc216f01a29726227 | [
"MIT"
] | 12 | 2019-07-01T18:33:21.000Z | 2022-03-10T02:13:57.000Z | defmodule SiteWeb.CMSView do
@moduledoc """
Handles rendering of partial content from the CMS.
"""
use SiteWeb, :view
import SiteWeb.TimeHelpers
import SiteWeb.CMS.PageView, only: [render_page: 2]
import SiteWeb.CMS.ParagraphView, only: [render_paragraph: 2]
alias CMS.Field.File
alias CMS.Partial.Pa... | 26.905405 | 100 | 0.690105 |
e888646c5b8d94729a296a6d3cca30c4c26e7fcd | 3,243 | ex | Elixir | clients/you_tube/lib/google_api/you_tube/v3/model/playlist_snippet.ex | jamesvl/elixir-google-api | 6c87fb31d996f08fb42ce6066317e9d652a87acc | [
"Apache-2.0"
] | null | null | null | clients/you_tube/lib/google_api/you_tube/v3/model/playlist_snippet.ex | jamesvl/elixir-google-api | 6c87fb31d996f08fb42ce6066317e9d652a87acc | [
"Apache-2.0"
] | null | null | null | clients/you_tube/lib/google_api/you_tube/v3/model/playlist_snippet.ex | jamesvl/elixir-google-api | 6c87fb31d996f08fb42ce6066317e9d652a87acc | [
"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.676056 | 304 | 0.701203 |
e88867b5f86f524b9d1ec21883f809a5e075f08e | 2,519 | ex | Elixir | clients/fonts/lib/google_api/fonts/v1/model/webfont.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/fonts/lib/google_api/fonts/v1/model/webfont.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/fonts/lib/google_api/fonts/v1/model/webfont.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... | 37.044118 | 157 | 0.659786 |
e888945e9d641a8ad2900c43ff5b3b750e6da2fa | 2,375 | ex | Elixir | clients/cloud_run/lib/google_api/cloud_run/v1alpha1/model/list_services_response.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/cloud_run/lib/google_api/cloud_run/v1alpha1/model/list_services_response.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/cloud_run/lib/google_api/cloud_run/v1alpha1/model/list_services_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 ... | 40.254237 | 137 | 0.712421 |
e888c18c9f4dc432f0ff39779110bbdc3a0d5d43 | 268 | ex | Elixir | lib/ex_clubhouse/ops/workflow.ex | pootsbook/exclubhouse | 3b93cded0124e4e5df489db4f9262a560595bb8e | [
"MIT"
] | 4 | 2020-03-17T00:42:10.000Z | 2021-04-11T16:39:52.000Z | lib/ex_clubhouse/ops/workflow.ex | pootsbook/exclubhouse | 3b93cded0124e4e5df489db4f9262a560595bb8e | [
"MIT"
] | 7 | 2020-03-21T20:22:13.000Z | 2021-12-30T16:32:07.000Z | lib/ex_clubhouse/ops/workflow.ex | pootsbook/exclubhouse | 3b93cded0124e4e5df489db4f9262a560595bb8e | [
"MIT"
] | 4 | 2020-03-25T18:34:49.000Z | 2021-09-13T16:44:00.000Z | defmodule ExClubhouse.Ops.Workflow do
@moduledoc """
Workflow ops
"""
alias ExClubhouse.Operation
@spec list :: ExClubhouse.Operation.t()
def list do
%Operation{
id: :workflow_list,
method: :get,
path: "workflows"
}
end
end
| 15.764706 | 41 | 0.626866 |
e888c40e4465b987ae57b10a871338068203cfb2 | 1,637 | ex | Elixir | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_record_condition.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_record_condition.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_record_condition.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... | 34.829787 | 121 | 0.761759 |
e888e722a5afa2ed29e4f2ec049b73df13f81588 | 695 | ex | Elixir | lib/selectable/default.ex | coingaming/selectable | e22a1604f5129b180e652cfa2c2a0ddfa0261236 | [
"MIT"
] | null | null | null | lib/selectable/default.ex | coingaming/selectable | e22a1604f5129b180e652cfa2c2a0ddfa0261236 | [
"MIT"
] | null | null | null | lib/selectable/default.ex | coingaming/selectable | e22a1604f5129b180e652cfa2c2a0ddfa0261236 | [
"MIT"
] | null | null | null | defmodule Selectable.Default do
defmacro __using__(options: type, key: key) do
id_val = {:id, [], Elixir}
key_val = {:key, [], Elixir}
pattern = {
:%,
[],
[
type,
{
:%{},
[],
[
{:id, id_val},
{key, key_val}
... | 17.375 | 48 | 0.446043 |
e8891bf69aa8f08700436ae261ea276ab12cc186 | 2,715 | ex | Elixir | lib/util/unread_article_fetch.ex | svistoi/ttrss-broadway | a606a7cd64356cb25480f87b3dd8cb51b4e1c7fa | [
"MIT"
] | null | null | null | lib/util/unread_article_fetch.ex | svistoi/ttrss-broadway | a606a7cd64356cb25480f87b3dd8cb51b4e1c7fa | [
"MIT"
] | null | null | null | lib/util/unread_article_fetch.ex | svistoi/ttrss-broadway | a606a7cd64356cb25480f87b3dd8cb51b4e1c7fa | [
"MIT"
] | null | null | null | defmodule Util.UnreadArticleFetch do
@moduledoc """
A periodic tasks to get articles from tt-rss and add them to the Broadway
Pipeline
"""
require Logger
alias TTRSS.Account
alias Broadway.ArticleMessage
def child_spec(init_args) do
Supervisor.child_spec({__MODULE__.Sup, init_args}, id: __MODULE__)... | 27.15 | 116 | 0.66151 |
e8895af422ffd4051ae1522d669412572a89c659 | 1,623 | ex | Elixir | web/models/stop_time.ex | tjefferson08/frizzle-server | 8db3f31e4dae6583603fd2006415129f623827ba | [
"MIT"
] | null | null | null | web/models/stop_time.ex | tjefferson08/frizzle-server | 8db3f31e4dae6583603fd2006415129f623827ba | [
"MIT"
] | null | null | null | web/models/stop_time.ex | tjefferson08/frizzle-server | 8db3f31e4dae6583603fd2006415129f623827ba | [
"MIT"
] | null | null | null | defmodule Frizzle.StopTime do
use Frizzle.Web, :model
schema "stop_times" do
field :arrival_time, :string
field :departure_time, :string
field :stop_sequence, :integer
belongs_to :stop, Frizzle.Stop
belongs_to :trip, Frizzle.Trip
end
@doc """
Builds a changeset based on the `struct` ... | 27.508475 | 94 | 0.605052 |
e889859101395ce58f1e29585372a00633eccaf4 | 1,022 | ex | Elixir | lib/top5_2_web/controllers/register_controller.ex | rpillar/Top5_Elixir2 | 9f3a9a0315c5dc53cb53aab93deadccdb697a868 | [
"MIT"
] | 1 | 2019-11-11T21:48:20.000Z | 2019-11-11T21:48:20.000Z | lib/top5_2_web/controllers/register_controller.ex | rpillar/Top5_Elixir2 | 9f3a9a0315c5dc53cb53aab93deadccdb697a868 | [
"MIT"
] | 2 | 2021-03-09T09:26:25.000Z | 2021-05-09T08:58:51.000Z | lib/top5_2_web/controllers/register_controller.ex | rpillar/Top5_Elixir2 | 9f3a9a0315c5dc53cb53aab93deadccdb697a868 | [
"MIT"
] | null | null | null | defmodule Top52Web.RegisterController do
use Top52Web, :controller
alias Top52.Accounts
alias Top52.Accounts.User
alias Top52Web.Router.Helpers
def index(conn, params) do
changeset = User.changeset(%User{}, params)
conn
|> put_flash(:info, "Enter all details to sign-up for this service... | 31.9375 | 92 | 0.611546 |
e889b076158511ce3ab2af745dee1a1420d6efc8 | 2,831 | ex | Elixir | lib/ot.ex | sumup-oss/ot | 07e8211e59c0b91c015f36f4166becf799bd6184 | [
"Apache-2.0"
] | 1 | 2021-09-20T07:23:38.000Z | 2021-09-20T07:23:38.000Z | lib/ot.ex | sumup-oss/ot | 07e8211e59c0b91c015f36f4166becf799bd6184 | [
"Apache-2.0"
] | null | null | null | lib/ot.ex | sumup-oss/ot | 07e8211e59c0b91c015f36f4166becf799bd6184 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2021, SumUp 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 writing, software... | 32.918605 | 112 | 0.711763 |
e889b123990dd00f80ab07631fb63a6606f23968 | 1,890 | exs | Elixir | test/absinthe/type/union_test.exs | TheRealReal/absinthe | 6eae5bc36283e58f42d032b8afd90de3ad64f97b | [
"MIT"
] | 2 | 2021-04-22T23:45:04.000Z | 2021-05-07T01:01:15.000Z | test/absinthe/type/union_test.exs | TheRealReal/absinthe | 6eae5bc36283e58f42d032b8afd90de3ad64f97b | [
"MIT"
] | 1 | 2020-04-07T23:46:38.000Z | 2020-04-07T23:46:38.000Z | test/absinthe/type/union_test.exs | TheRealReal/absinthe | 6eae5bc36283e58f42d032b8afd90de3ad64f97b | [
"MIT"
] | 1 | 2018-11-16T02:34:40.000Z | 2018-11-16T02:34:40.000Z | defmodule Absinthe.Type.UnionTest do
use Absinthe.Case, async: true
alias Absinthe.Type
defmodule TestSchema do
use Absinthe.Schema
query do
# Query type must exist
end
object :person do
description "A person"
field :name, :string
field :age, :integer
end
obje... | 21.976744 | 89 | 0.592593 |
e889e9798fa97ce6c0698a0e8fca841585db933d | 3,742 | ex | Elixir | clients/machine_learning/lib/google_api/machine_learning/v1/model/google_cloud_ml_v1__auto_scaling.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/machine_learning/lib/google_api/machine_learning/v1/model/google_cloud_ml_v1__auto_scaling.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/machine_learning/lib/google_api/machine_learning/v1/model/google_cloud_ml_v1__auto_scaling.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"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.603774 | 1,721 | 0.758685 |
e889ec6b351acd3a979e5f578051b6be4b691eda | 1,784 | ex | Elixir | clients/sheets/lib/google_api/sheets/v4/model/histogram_series.ex | nuxlli/elixir-google-api | ecb8679ac7282b7dd314c3e20c250710ec6a7870 | [
"Apache-2.0"
] | null | null | null | clients/sheets/lib/google_api/sheets/v4/model/histogram_series.ex | nuxlli/elixir-google-api | ecb8679ac7282b7dd314c3e20c250710ec6a7870 | [
"Apache-2.0"
] | null | null | null | clients/sheets/lib/google_api/sheets/v4/model/histogram_series.ex | nuxlli/elixir-google-api | ecb8679ac7282b7dd314c3e20c250710ec6a7870 | [
"Apache-2.0"
] | 1 | 2020-11-10T16:58:27.000Z | 2020-11-10T16:58:27.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... | 34.980392 | 131 | 0.741592 |
e88a1c64d11c3cdec09afe419197782ef049f85a | 1,287 | ex | Elixir | elixir/roman-numerals/lib/roman_numerals.ex | leandrotk/exercism | 1da124f89a109c4e2b5c8e5d603ff15fd1f04c2c | [
"MIT"
] | null | null | null | elixir/roman-numerals/lib/roman_numerals.ex | leandrotk/exercism | 1da124f89a109c4e2b5c8e5d603ff15fd1f04c2c | [
"MIT"
] | null | null | null | elixir/roman-numerals/lib/roman_numerals.ex | leandrotk/exercism | 1da124f89a109c4e2b5c8e5d603ff15fd1f04c2c | [
"MIT"
] | null | null | null | defmodule RomanNumerals do
@digit_to_roman %{
"0" => "",
"1" => "I",
"2" => "II",
"3" => "III",
"4" => "IV",
"5" => "V",
"6" => "VI",
"7" => "VII",
"8" => "VIII",
"9" => "IX"
}
@dozens_to_roman %{
"0" => "",
"1" => "X",
"2" => "XX",
"3" => "XXX",
"4" =>... | 17.16 | 59 | 0.407148 |
e88a377272ff3599f23ee3000d6b600acbd7b637 | 3,829 | exs | Elixir | test/clickhousex/codec/binary_test.exs | moldmn/clickhousex | b39016714e346490ff8e9c4432006827612fba11 | [
"Apache-2.0"
] | 43 | 2018-04-02T07:00:44.000Z | 2020-08-14T18:47:26.000Z | test/clickhousex/codec/binary_test.exs | moldmn/clickhousex | b39016714e346490ff8e9c4432006827612fba11 | [
"Apache-2.0"
] | 21 | 2020-09-07T08:19:59.000Z | 2021-08-25T03:46:38.000Z | test/clickhousex/codec/binary_test.exs | moldmn/clickhousex | b39016714e346490ff8e9c4432006827612fba11 | [
"Apache-2.0"
] | 22 | 2018-08-08T07:45:44.000Z | 2020-09-01T07:58:54.000Z | defmodule Clickhousex.Codec.BinaryTest do
use ExUnit.Case
import Clickhousex.Codec.Binary
test "resuming" do
start = <<1, 0, 0>>
assert {:resume, resumer} = decode(start, :i32)
assert {:ok, 1, <<>>} = resumer.(<<0>>)
end
test "resuming a varint" do
expected = decode(<<129, 0>>, :varint)
... | 33.587719 | 81 | 0.601724 |
e88a5bf676e7ccdd9122e1ccf7c367a79690c806 | 1,401 | exs | Elixir | apps/nightcrawler/test/nightcrawler/marvel/marvel_test.exs | ZucchiniZe/nightcrawler_elixir | be82b0e7c25f55c7d2c2d3aa2860371cb68aeeb6 | [
"MIT"
] | null | null | null | apps/nightcrawler/test/nightcrawler/marvel/marvel_test.exs | ZucchiniZe/nightcrawler_elixir | be82b0e7c25f55c7d2c2d3aa2860371cb68aeeb6 | [
"MIT"
] | null | null | null | apps/nightcrawler/test/nightcrawler/marvel/marvel_test.exs | ZucchiniZe/nightcrawler_elixir | be82b0e7c25f55c7d2c2d3aa2860371cb68aeeb6 | [
"MIT"
] | null | null | null | defmodule Nightcrawler.MarvelTest do
@moduledoc false
use Nightcrawler.DataCase
alias Nightcrawler.Marvel.Series
test "test parse_rating" do
# all the available ratings from the marvel api
ratings = [
"RATED T+",
"ALL AGES",
"MARVEL PSR",
"RATED A",
"Rated T+",
"PAR... | 20.910448 | 51 | 0.498929 |
e88a606f7e7bfe3362115913fcd844ef67c8cb08 | 647 | ex | Elixir | lib/queries/extensions.ex | blockfi/ecto_psql_extras | 27602dfb9d508b8ad3a904b1962d8a837128b0c7 | [
"MIT"
] | 278 | 2020-08-04T12:38:29.000Z | 2022-03-25T15:14:28.000Z | lib/queries/extensions.ex | blockfi/ecto_psql_extras | 27602dfb9d508b8ad3a904b1962d8a837128b0c7 | [
"MIT"
] | 21 | 2020-09-27T14:38:21.000Z | 2021-11-08T22:44:46.000Z | lib/queries/extensions.ex | blockfi/ecto_psql_extras | 27602dfb9d508b8ad3a904b1962d8a837128b0c7 | [
"MIT"
] | 15 | 2020-09-28T18:08:25.000Z | 2022-03-22T11:26:21.000Z | defmodule EctoPSQLExtras.Extensions do
@behaviour EctoPSQLExtras
def info do
%{
title: "Available and installed extensions",
order_by: [installed_version: :asc],
columns: [
%{name: :name, type: :string},
%{name: :default_version, type: :string},
%{name: :installed_vers... | 23.962963 | 62 | 0.630603 |
e88a6812e5d9ab63ccc8f262de5d5cae3667ba7d | 1,269 | ex | Elixir | web/views/error_helpers.ex | jeffcole/loops | 8d1f8345140182905dfc1967af135205b82f2cdc | [
"MIT"
] | null | null | null | web/views/error_helpers.ex | jeffcole/loops | 8d1f8345140182905dfc1967af135205b82f2cdc | [
"MIT"
] | null | null | null | web/views/error_helpers.ex | jeffcole/loops | 8d1f8345140182905dfc1967af135205b82f2cdc | [
"MIT"
] | null | null | null | defmodule LoopsWithFriends.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
if error = form.errors[field] do
content_tag :span, translate_error... | 29.511628 | 69 | 0.665879 |
e88a9fede9763291a7de06a608a826b34f97594a | 1,641 | ex | Elixir | lib/automata/reasoning/cognitive/sensory/sensory.ex | upstarter/automata | c97badb2ea4ff7fef3bb35fe3311ae80d26f576a | [
"Apache-2.0"
] | 150 | 2020-02-04T15:10:52.000Z | 2022-02-19T15:33:17.000Z | lib/automata/reasoning/cognitive/sensory/sensory.ex | upstarter/automata | c97badb2ea4ff7fef3bb35fe3311ae80d26f576a | [
"Apache-2.0"
] | 31 | 2020-02-09T01:37:23.000Z | 2020-05-21T01:50:14.000Z | lib/automata/reasoning/cognitive/sensory/sensory.ex | upstarter/automata | c97badb2ea4ff7fef3bb35fe3311ae80d26f576a | [
"Apache-2.0"
] | 8 | 2020-02-06T04:42:20.000Z | 2022-01-21T00:21:20.000Z | defmodule Automata.Sensory do
@moduledoc """
The World-Agent Division
The Sensory System marks the single entry point into an agent from the
World. All sensory input from the world must pass through the Sensory System
before it can be processed by the rest of the agent's mind.
The primary job of ... | 42.076923 | 80 | 0.74284 |
e88afc22827ff71739095ee1f9a8ebf9d056fcdf | 8,247 | ex | Elixir | lib/tesla/middleware/logger.ex | oo6/tesla | 3937277fafe5962a9366057310fa53eee06afdc0 | [
"MIT"
] | null | null | null | lib/tesla/middleware/logger.ex | oo6/tesla | 3937277fafe5962a9366057310fa53eee06afdc0 | [
"MIT"
] | null | null | null | lib/tesla/middleware/logger.ex | oo6/tesla | 3937277fafe5962a9366057310fa53eee06afdc0 | [
"MIT"
] | null | null | null | defmodule Tesla.Middleware.Logger.Formatter do
@moduledoc false
# Heavily based on Elixir's Logger.Formatter
# https://github.com/elixir-lang/elixir/blob/v1.6.4/lib/logger/lib/logger/formatter.ex
@default_format "$method $url -> $status ($time ms)"
@keys ~w(method url status time query)
@type format :: [... | 26.180952 | 105 | 0.63805 |
e88b01d5dcb893df6530c45ede863903e76de786 | 15,738 | ex | Elixir | apps/ewallet/lib/ewallet/web/v1/error_handler.ex | saturnial/ewallet | a0a6a7604fca0891d495b3aebaead37fe02aae2c | [
"Apache-2.0"
] | null | null | null | apps/ewallet/lib/ewallet/web/v1/error_handler.ex | saturnial/ewallet | a0a6a7604fca0891d495b3aebaead37fe02aae2c | [
"Apache-2.0"
] | null | null | null | apps/ewallet/lib/ewallet/web/v1/error_handler.ex | saturnial/ewallet | a0a6a7604fca0891d495b3aebaead37fe02aae2c | [
"Apache-2.0"
] | null | null | null | defmodule EWallet.Web.V1.ErrorHandler do
@moduledoc """
Handles API errors by mapping the error to its response code and description.
"""
import Ecto.Changeset, only: [traverse_errors: 2]
alias Ecto.Changeset
alias EWallet.Web.V1.ErrorSerializer
alias EWallet.AmountFormatter
alias EWalletDB.Token
@er... | 34.513158 | 145 | 0.676134 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.