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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9e38794edb26954874096a38181251e63b0ebe58 | 8,134 | ex | Elixir | lib/elixir/lib/code/identifier.ex | kenichi/elixir | 8c27da88c70623cbe516d5310c885943395a82a2 | [
"Apache-2.0"
] | 2 | 2018-11-15T06:38:14.000Z | 2018-11-17T18:03:14.000Z | lib/elixir/lib/code/identifier.ex | kenichi/elixir | 8c27da88c70623cbe516d5310c885943395a82a2 | [
"Apache-2.0"
] | 1 | 2018-09-10T23:36:45.000Z | 2018-09-10T23:36:45.000Z | lib/elixir/lib/code/identifier.ex | kenichi/elixir | 8c27da88c70623cbe516d5310c885943395a82a2 | [
"Apache-2.0"
] | 1 | 2018-09-10T23:32:56.000Z | 2018-09-10T23:32:56.000Z | defmodule Code.Identifier do
@moduledoc false
@doc """
Checks if the given identifier is an unary op.
## Examples
iex> Code.Identifier.unary_op(:+)
{:non_associative, 300}
"""
@spec unary_op(atom) :: {:non_associative, precedence :: pos_integer} | :error
def unary_op(op) do
cond do
... | 28.843972 | 94 | 0.559012 |
9e387a183b175d765805cb069eb283342aad7322 | 2,773 | exs | Elixir | mix.exs | ZPVIP/mipha | a7df054f72eec7de88b60d94c501488375bdff6a | [
"MIT"
] | 1 | 2019-06-11T20:20:26.000Z | 2019-06-11T20:20:26.000Z | mix.exs | ZPVIP/mipha | a7df054f72eec7de88b60d94c501488375bdff6a | [
"MIT"
] | null | null | null | mix.exs | ZPVIP/mipha | a7df054f72eec7de88b60d94c501488375bdff6a | [
"MIT"
] | null | null | null | defmodule Mipha.Mixfile do
use Mix.Project
def project do
[
app: :mipha,
version: "0.0.1",
elixir: "~> 1.4",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps... | 28.885417 | 79 | 0.524702 |
9e38b63ab0316e469f4e5481862b678dc532bd53 | 3,501 | ex | Elixir | lib/oban/plugins/stager.ex | polvalente/oban | 7267f8f37f8257b735d498d81cc1e43147cefc49 | [
"Apache-2.0"
] | null | null | null | lib/oban/plugins/stager.ex | polvalente/oban | 7267f8f37f8257b735d498d81cc1e43147cefc49 | [
"Apache-2.0"
] | null | null | null | lib/oban/plugins/stager.ex | polvalente/oban | 7267f8f37f8257b735d498d81cc1e43147cefc49 | [
"Apache-2.0"
] | null | null | null | defmodule Oban.Plugins.Stager do
@moduledoc """
Transition jobs to the `available` state when they reach their scheduled time.
This module is necessary for the execution of scheduled and retryable jobs.
## Options
* `:interval` - the number of milliseconds between database updates. This is directly tied to... | 24.65493 | 102 | 0.627249 |
9e38c21ecf47ae46e608b13fdf54b221dc91c07d | 1,446 | ex | Elixir | lib/ex_locale.ex | dinarly/ex_locale | 29597e1f2b24623e1c9c64352f0a992784ffc77f | [
"MIT"
] | null | null | null | lib/ex_locale.ex | dinarly/ex_locale | 29597e1f2b24623e1c9c64352f0a992784ffc77f | [
"MIT"
] | null | null | null | lib/ex_locale.ex | dinarly/ex_locale | 29597e1f2b24623e1c9c64352f0a992784ffc77f | [
"MIT"
] | null | null | null | defmodule ExLocale do
@moduledoc """
Documentation for ExLocale.
"""
alias ExLocale.Locale
alias NimbleCSV.RFC4180, as: CSV
def list_locales do
[
%Locale{
id: :en_GB,
name: "English (United Kingdom)",
translations: %{
"fr_FR" => %{name: "anglais (Royaume-Uni)"},... | 19.540541 | 60 | 0.514523 |
9e38c4b5d6d9183f287e0629ea553cf899742d6e | 2,823 | ex | Elixir | apps/itest/lib/transactions/currency.ex | omgnetwork/specs | 4028b2b9a6a4d5f0057b6ac9e3298c66e32a9deb | [
"Apache-2.0"
] | 4 | 2020-10-31T15:16:16.000Z | 2021-02-06T22:44:19.000Z | apps/itest/lib/transactions/currency.ex | omgnetwork/specs | 4028b2b9a6a4d5f0057b6ac9e3298c66e32a9deb | [
"Apache-2.0"
] | 4 | 2020-11-02T17:12:09.000Z | 2021-02-10T20:35:19.000Z | apps/itest/lib/transactions/currency.ex | omgnetwork/specs | 4028b2b9a6a4d5f0057b6ac9e3298c66e32a9deb | [
"Apache-2.0"
] | null | null | null | # Copyright 2019-2020 OmiseGO Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 27.144231 | 85 | 0.686149 |
9e38c8c9426cf8aee1385fb2fdf18883610e41c9 | 29,284 | exs | Elixir | lib/elixir/test/elixir/task_test.exs | spencerdcarlson/elixir | 23d75ecdf58df80969e12f4420282238e19219a1 | [
"Apache-2.0"
] | 2 | 2020-06-02T18:00:28.000Z | 2021-12-10T03:21:42.000Z | lib/elixir/test/elixir/task_test.exs | spencerdcarlson/elixir | 23d75ecdf58df80969e12f4420282238e19219a1 | [
"Apache-2.0"
] | 1 | 2020-09-14T16:23:33.000Z | 2021-03-25T17:38:59.000Z | lib/elixir/test/elixir/task_test.exs | spencerdcarlson/elixir | 23d75ecdf58df80969e12f4420282238e19219a1 | [
"Apache-2.0"
] | 1 | 2020-11-25T02:22:55.000Z | 2020-11-25T02:22:55.000Z | Code.require_file("test_helper.exs", __DIR__)
defmodule TaskTest do
use ExUnit.Case
doctest Task
@moduletag :capture_log
def wait_and_send(caller, atom) do
send(caller, :ready)
receive do: (true -> true)
send(caller, atom)
end
defp create_task_in_other_process do
caller = self()
spawn... | 32.215622 | 100 | 0.582298 |
9e38dd61f06ed97503299963f3095ae80c9c28d3 | 1,371 | ex | Elixir | lib/slack/rtm.ex | motionless/Elixir-Slack | 7a2e8fc889fd60fdb26e0c6c6cb3ec3d7704597e | [
"MIT"
] | null | null | null | lib/slack/rtm.ex | motionless/Elixir-Slack | 7a2e8fc889fd60fdb26e0c6c6cb3ec3d7704597e | [
"MIT"
] | null | null | null | lib/slack/rtm.ex | motionless/Elixir-Slack | 7a2e8fc889fd60fdb26e0c6c6cb3ec3d7704597e | [
"MIT"
] | null | null | null | defmodule Slack.JsonDecodeError do
@moduledoc false
defexception [:reason, :string]
def message(%Slack.JsonDecodeError{reason: reason, string: string}) do
"Poison could not decode string for reason: `:#{reason}`, string given:\n#{string}"
end
end
defmodule Slack.Rtm do
@moduledoc false
def start(tok... | 28.5625 | 110 | 0.646244 |
9e390c130ad427d7248efbb115bf36d396b50715 | 18,233 | ex | Elixir | lib/phoenix/channel.ex | jshahs/magiclogo | 5b18cb4efff04c3547d167bab194d2806ec20d8a | [
"MIT"
] | null | null | null | lib/phoenix/channel.ex | jshahs/magiclogo | 5b18cb4efff04c3547d167bab194d2806ec20d8a | [
"MIT"
] | null | null | null | lib/phoenix/channel.ex | jshahs/magiclogo | 5b18cb4efff04c3547d167bab194d2806ec20d8a | [
"MIT"
] | null | null | null | defmodule Phoenix.Channel do
@moduledoc ~S"""
Defines a Phoenix Channel.
Channels provide a means for bidirectional communication from clients that
integrate with the `Phoenix.PubSub` layer for soft-realtime functionality.
## Topics & Callbacks
Every time you join a channel, you need to choose which part... | 35.335271 | 112 | 0.669665 |
9e392555b368c72b7ee07102438391bb3f512962 | 6,629 | ex | Elixir | lib/chart/pie_chart.ex | shadowRR/contex | 86730b38a8ec06726e9233ef1f58661ca85cb704 | [
"MIT"
] | 455 | 2020-01-15T22:21:40.000Z | 2022-03-29T23:20:45.000Z | lib/chart/pie_chart.ex | shadowRR/contex | 86730b38a8ec06726e9233ef1f58661ca85cb704 | [
"MIT"
] | 48 | 2020-02-10T06:19:17.000Z | 2022-03-29T03:02:52.000Z | lib/chart/pie_chart.ex | shadowRR/contex | 86730b38a8ec06726e9233ef1f58661ca85cb704 | [
"MIT"
] | 30 | 2020-01-15T22:21:35.000Z | 2022-03-10T18:11:51.000Z | defmodule Contex.PieChart do
@moduledoc """
A Pie Chart that displays data in a circular graph.
The pieces of the graph are proportional to the fraction of the whole in each category.
Each slice of the pie is relative to the size of that category in the group as a whole.
The entire “pie” represents 100 perce... | 29.331858 | 122 | 0.627696 |
9e39583e056fc74228371f714f90f24b70f943c7 | 1,864 | exs | Elixir | test/processlru_test.exs | diodechain/diode_server | 1692788bd92cc17654965878abd059d13b5e236c | [
"Apache-2.0"
] | 8 | 2021-03-12T15:35:09.000Z | 2022-03-06T06:37:49.000Z | test/processlru_test.exs | diodechain/diode_server_ex | 5cf47e5253a0caafd335d0af4dba711d4dcad42d | [
"Apache-2.0"
] | 15 | 2019-09-06T07:58:01.000Z | 2021-03-06T17:04:46.000Z | test/processlru_test.exs | diodechain/diode_server | 1692788bd92cc17654965878abd059d13b5e236c | [
"Apache-2.0"
] | 5 | 2021-10-01T12:52:28.000Z | 2022-02-02T19:29:56.000Z | # Diode Server
# Copyright 2021 Diode
# Licensed under the Diode License, Version 1.1
defmodule ProcessLruTest do
use ExUnit.Case
test "base" do
lru = ProcessLru.new(10)
assert ProcessLru.size(lru) == 0
ProcessLru.put(lru, "key", "value")
assert ProcessLru.size(lru) == 1
assert ProcessLru.get... | 28.676923 | 69 | 0.623391 |
9e3967a94ee2aeb84e913300e7d59aaa7502502d | 1,902 | ex | Elixir | clients/health_care/lib/google_api/health_care/v1/model/list_consent_revisions_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/health_care/lib/google_api/health_care/v1/model/list_consent_revisions_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/health_care/lib/google_api/health_care/v1/model/list_consent_revisions_response.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... | 38.04 | 245 | 0.743954 |
9e399df294232f371bcbba4cd8f65111f58e35ed | 199 | ex | Elixir | lib/weather.ex | jessie-morris/elixir-weather | 1f54cc08dca4be7d5943d278d45eee336f4706ff | [
"MIT"
] | null | null | null | lib/weather.ex | jessie-morris/elixir-weather | 1f54cc08dca4be7d5943d278d45eee336f4706ff | [
"MIT"
] | 7 | 2020-09-05T02:06:15.000Z | 2022-02-26T12:10:05.000Z | current/server/lib/weather.ex | aosteraas/weather | 56bbf9e3dfa811860be2dd2b6cc801574983ef7e | [
"CC-BY-3.0"
] | null | null | null | defmodule Weather do
@moduledoc """
Documentation for Weather.
"""
@doc """
Hello world.
## Examples
iex> Weather.hello()
:world
"""
def hello do
:world
end
end
| 10.473684 | 28 | 0.562814 |
9e39a940b17517ee2e45f70a499a3deb43d9fd9e | 2,726 | exs | Elixir | mix.exs | carlosviana/blog | 1dcf58c3ca40bc3a7105d75de6f51954eb44bca8 | [
"MIT"
] | null | null | null | mix.exs | carlosviana/blog | 1dcf58c3ca40bc3a7105d75de6f51954eb44bca8 | [
"MIT"
] | 3 | 2021-06-20T14:51:14.000Z | 2021-06-25T00:56:11.000Z | mix.exs | carlosviana/blog | 1dcf58c3ca40bc3a7105d75de6f51954eb44bca8 | [
"MIT"
] | null | null | null | defmodule Blog.MixProject do
use Mix.Project
@github_url "https://github.com/carlosviana/blog"
def project do
[
app: :blog,
version: "0.1.0",
elixir: "~> 1.11",
descrition: "Aprende phoenix com um projeto de Blog",
source_url: @github_url,
homepage_url: @github_url,
... | 28.694737 | 84 | 0.561996 |
9e3a4f53fa6b23b5629e9481e5164d5229268c4f | 82 | exs | Elixir | test/dnsierge_web/views/page_view_test.exs | jcamenisch/dnsierge | cfc1654ce0b2c34c8952845aa0df6113ff3bb406 | [
"MIT"
] | null | null | null | test/dnsierge_web/views/page_view_test.exs | jcamenisch/dnsierge | cfc1654ce0b2c34c8952845aa0df6113ff3bb406 | [
"MIT"
] | null | null | null | test/dnsierge_web/views/page_view_test.exs | jcamenisch/dnsierge | cfc1654ce0b2c34c8952845aa0df6113ff3bb406 | [
"MIT"
] | null | null | null | defmodule DnsiergeWeb.PageViewTest do
use DnsiergeWeb.ConnCase, async: true
end
| 20.5 | 39 | 0.829268 |
9e3a562a0a91480df2946215403d8daa89cfa297 | 589 | ex | Elixir | lib/events_api_web/views/changeset_view.ex | gissandrogama/events | 1b21b151a336ae5eef8bf1d68f2a792194f21be3 | [
"MIT"
] | null | null | null | lib/events_api_web/views/changeset_view.ex | gissandrogama/events | 1b21b151a336ae5eef8bf1d68f2a792194f21be3 | [
"MIT"
] | 4 | 2021-02-10T22:04:56.000Z | 2021-02-12T22:01:42.000Z | lib/events_api_web/views/changeset_view.ex | gissandrogama/events | 1b21b151a336ae5eef8bf1d68f2a792194f21be3 | [
"MIT"
] | 1 | 2021-03-22T13:48:48.000Z | 2021-03-22T13:48:48.000Z | defmodule EventsApiWeb.ChangesetView do
use EventsApiWeb, :view
@doc """
Está função percorre e traduz os erros do changeset.
Veja `Ecto.Changeset.traverse_errors/2` e
`EventsApiWeb.ErrorHelpers.translate_error/1` para mais detalhes.
"""
def translate_errors(changeset) do
Ecto.Changeset.traverse_err... | 29.45 | 67 | 0.745331 |
9e3a587488b92e437b162171e281c34c80dd6eac | 110 | ex | Elixir | lib/movement/migration.ex | samuelnygaard/accent | db753badab1d885397b48a42ac3fb43024345467 | [
"BSD-3-Clause"
] | 1 | 2020-07-01T16:08:34.000Z | 2020-07-01T16:08:34.000Z | lib/movement/migration.ex | samuelnygaard/accent | db753badab1d885397b48a42ac3fb43024345467 | [
"BSD-3-Clause"
] | 6 | 2021-03-11T07:37:48.000Z | 2022-02-13T21:10:33.000Z | lib/movement/migration.ex | doc-ai/accent | e337e16f3658cc0728364f952c0d9c13710ebb06 | [
"BSD-3-Clause"
] | 1 | 2020-05-29T21:47:35.000Z | 2020-05-29T21:47:35.000Z | defmodule Movement.Migration do
@type t :: {:ok, map} | {:error, map}
@callback call(atom, map) :: t
end
| 18.333333 | 39 | 0.627273 |
9e3a68672946ac01d9ec4acb7300c079729f5a48 | 591 | ex | Elixir | lib/oracleex/result.ex | MikeAlbertFleetSolutions/oracleex | 71c096af28531d3e8f52a7ba6eebfa369f0759fa | [
"Apache-2.0"
] | 1 | 2020-02-28T15:13:32.000Z | 2020-02-28T15:13:32.000Z | lib/oracleex/result.ex | MikeAlbertFleetSolutions/oracleex | 71c096af28531d3e8f52a7ba6eebfa369f0759fa | [
"Apache-2.0"
] | null | null | null | lib/oracleex/result.ex | MikeAlbertFleetSolutions/oracleex | 71c096af28531d3e8f52a7ba6eebfa369f0759fa | [
"Apache-2.0"
] | null | null | null | defmodule Oracleex.Result do
@moduledoc """
Result struct returned from any successful query. Its fields are:
* `columns` - The names of each column in the result set;
* `rows` - The result set. A list of tuples, each tuple corresponding to a
row, each element in the tuple corresponds to a c... | 34.764706 | 78 | 0.65313 |
9e3a85cfd995c9944ec881f2a94596d5ef53f888 | 1,229 | ex | Elixir | lib/ex_jenga/send_money_queries/transaction_status.ex | beamkenya/ex_jenga | 03a936a04d99614043d120d0e3ee787f1b8a5b8d | [
"AML",
"MIT"
] | 1 | 2021-09-14T09:50:22.000Z | 2021-09-14T09:50:22.000Z | lib/ex_jenga/send_money_queries/transaction_status.ex | beamkenya/ex_jenga | 03a936a04d99614043d120d0e3ee787f1b8a5b8d | [
"AML",
"MIT"
] | 15 | 2021-04-23T11:28:49.000Z | 2021-06-23T04:42:35.000Z | lib/ex_jenga/send_money_queries/transaction_status.ex | beamkenya/ex_jenga | 03a936a04d99614043d120d0e3ee787f1b8a5b8d | [
"AML",
"MIT"
] | null | null | null | defmodule ExJenga.SendMoneyQueries.TransactionStatus do
@moduledoc """
Use this API to check the status of a B2C transaction
"""
import ExJenga.JengaBase
@doc """
Check the status of a B2C transaction
## Parameters
attrs: - a map containing:
- `requestId` - a string
- `destination` - a map conta... | 25.081633 | 162 | 0.597234 |
9e3ab060d19be7d21eaf843a16ed7ea4bd5e39d8 | 384 | ex | Elixir | web/models/role.ex | melbystyle/jw_ministry_api | 2065d628a84e829b805c71b7e73fb0bee3d0dd44 | [
"Apache-2.0"
] | 1 | 2017-06-19T18:18:11.000Z | 2017-06-19T18:18:11.000Z | web/models/role.ex | melbystyle/jw_ministry_api | 2065d628a84e829b805c71b7e73fb0bee3d0dd44 | [
"Apache-2.0"
] | null | null | null | web/models/role.ex | melbystyle/jw_ministry_api | 2065d628a84e829b805c71b7e73fb0bee3d0dd44 | [
"Apache-2.0"
] | null | null | null | defmodule JwMinistryApi.Role do
use JwMinistryApi.Web, :model
schema "roles" do
field :name, :string
has_many :publisher, JwMinistryApi.Publisher
timestamps()
end
@doc """
Builds a changeset based on the `struct` and `params`.
"""
def changeset(struct, params \\ %{}) do
struct
|> ca... | 19.2 | 56 | 0.648438 |
9e3b09f64a010c18037a243e39c0b9fb72a285ce | 1,153 | exs | Elixir | test/snappy_test.exs | cocoa-xu/snappy_elixir | 2d67b18a4009b68edf2c301094f2083b1bde0731 | [
"Apache-2.0"
] | null | null | null | test/snappy_test.exs | cocoa-xu/snappy_elixir | 2d67b18a4009b68edf2c301094f2083b1bde0731 | [
"Apache-2.0"
] | null | null | null | test/snappy_test.exs | cocoa-xu/snappy_elixir | 2d67b18a4009b68edf2c301094f2083b1bde0731 | [
"Apache-2.0"
] | null | null | null | defmodule SnappyTest do
use ExUnit.Case, async: true
doctest Snappy
test "compress" do
assert {:ok, <<20, 0, 97, 74, 1, 0>>} = Snappy.compress("aaaaaaaaaaaaaaaaaaaa")
end
test "uncompress" do
assert {:ok, "aaaaaaaaaaaaaaaaaaaa"} = Snappy.uncompress(<<20, 0, 97, 74, 1, 0>>)
assert {:error, "snapp... | 34.939394 | 94 | 0.692975 |
9e3b13c38ccfa65ba211dd8909029d9df06c2bbe | 1,274 | ex | Elixir | lib/ash/resource/validation/confirm.ex | axelson/ash | 5992fc00f7bdc0ba0ebdb476a5191245145ef7c8 | [
"MIT"
] | null | null | null | lib/ash/resource/validation/confirm.ex | axelson/ash | 5992fc00f7bdc0ba0ebdb476a5191245145ef7c8 | [
"MIT"
] | null | null | null | lib/ash/resource/validation/confirm.ex | axelson/ash | 5992fc00f7bdc0ba0ebdb476a5191245145ef7c8 | [
"MIT"
] | null | null | null | defmodule Ash.Resource.Validation.Confirm do
@moduledoc false
use Ash.Resource.Validation
alias Ash.Changeset
alias Ash.Error.Changes.InvalidAttribute
def init(opts) do
case opts[:field] do
nil ->
{:error, "Field is required"}
field when is_atom(field) ->
case opts[:confirmat... | 26 | 88 | 0.620879 |
9e3b391ef4631bc67e6750238045882ec4e4e545 | 6,109 | ex | Elixir | lib/quantity/math.ex | wise-home/quantity | 62cae5d049d6909a47b37a2b9df2a93ef61461a0 | [
"MIT"
] | 8 | 2020-01-17T08:00:51.000Z | 2022-03-07T10:30:01.000Z | lib/quantity/math.ex | wise-home/quantity | 62cae5d049d6909a47b37a2b9df2a93ef61461a0 | [
"MIT"
] | 15 | 2020-01-17T10:35:06.000Z | 2021-11-19T07:40:18.000Z | lib/quantity/math.ex | wise-home/quantity | 62cae5d049d6909a47b37a2b9df2a93ef61461a0 | [
"MIT"
] | null | null | null | defmodule Quantity.Math do
@moduledoc """
Functions for doing math with Quantities
"""
import Kernel, except: [div: 2]
@doc """
Add two Quantities, keeping the unit
iex> add(~Q[1.34 MWh], ~Q[3.49 MWh])
{:ok, ~Q[4.83 MWh]}
iex> add(~Q[1.234567 days], ~Q[3.5 days])
{:ok, ~Q[4.734567 days]}
iex>... | 24.833333 | 102 | 0.586348 |
9e3b4c32f74ce8a8a0e10a5cb2b313e1ca7c4baf | 2,672 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/ssl_certificate_list.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/ssl_certificate_list.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/ssl_certificate_list.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"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... | 42.412698 | 381 | 0.734656 |
9e3b5e04b486c9f20f306046e3aeecd09c73f15e | 1,823 | exs | Elixir | clients/analytics_admin/mix.exs | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/analytics_admin/mix.exs | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/analytics_admin/mix.exs | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"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... | 27.208955 | 106 | 0.655513 |
9e3b64403321dba77c99b42f97025b757819b769 | 2,998 | ex | Elixir | lib/exhoedown.ex | nipinium/exhoedown | 707205bcdc446282915492f55bf73a61be7df0a2 | [
"Unlicense"
] | null | null | null | lib/exhoedown.ex | nipinium/exhoedown | 707205bcdc446282915492f55bf73a61be7df0a2 | [
"Unlicense"
] | null | null | null | lib/exhoedown.ex | nipinium/exhoedown | 707205bcdc446282915492f55bf73a61be7df0a2 | [
"Unlicense"
] | null | null | null | defmodule ExHoedown do
@moduledoc """
Markdown to HTML conversion.
"""
@on_load { :init, 0 }
@app Mix.Project.config[:app]
def init do
path = :filename.join(:code.priv_dir(unquote(@app)), 'exhoedown')
:ok = :erlang.load_nif(path, 0)
end
@doc ~S"""
Converts a Markdown document to HTML:
... | 32.236559 | 116 | 0.610407 |
9e3b65eeedfb164778e6d6c515abe04b08c5bea9 | 11,174 | ex | Elixir | clients/sql_admin/lib/google_api/sql_admin/v1beta4/api/projects.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/sql_admin/lib/google_api/sql_admin/v1beta4/api/projects.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/sql_admin/lib/google_api/sql_admin/v1beta4/api/projects.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 41.69403 | 196 | 0.617147 |
9e3b7baffce95f2913bfce07fa8cd75c5374d1b2 | 2,361 | exs | Elixir | config/prod.exs | feihong/elixir-quickstart | bbdb839c3db4f1470b4172b7036dc6d9ed9c6251 | [
"Apache-2.0"
] | null | null | null | config/prod.exs | feihong/elixir-quickstart | bbdb839c3db4f1470b4172b7036dc6d9ed9c6251 | [
"Apache-2.0"
] | null | null | null | config/prod.exs | feihong/elixir-quickstart | bbdb839c3db4f1470b4172b7036dc6d9ed9c6251 | [
"Apache-2.0"
] | null | null | null | use Mix.Config
# For production, we often load configuration from external
# sources, such as your system environment. For this reason,
# you won't find the :http configuration below, but set inside
# QuickstartWeb.Endpoint.init/2 when load_from_system_env is
# true. Any dynamic configuration should be done there.
#
#... | 34.720588 | 116 | 0.718763 |
9e3b8ceb329a1c8c68a86140c90e4820eae82e2b | 1,060 | ex | Elixir | lib/soundcloud/utils.ex | adolfosilva/soundcloud | 2b1671be3e8cffa8a2d4ec89f87a4b295028fba0 | [
"MIT"
] | null | null | null | lib/soundcloud/utils.ex | adolfosilva/soundcloud | 2b1671be3e8cffa8a2d4ec89f87a4b295028fba0 | [
"MIT"
] | null | null | null | lib/soundcloud/utils.ex | adolfosilva/soundcloud | 2b1671be3e8cffa8a2d4ec89f87a4b295028fba0 | [
"MIT"
] | null | null | null | defmodule Soundcloud.Utils do
@moduledoc """
Utilities module.
Collection of useful functions.
"""
@doc """
Flattens a list of maps to a single map.
## Examples
iex> Soundcloud.Utils.list_of_maps_to_map([%{"a" => 5}, %{"b" => 10}])
%{"a" => 5, "b" => 10}
"""
@spec list_of_maps_to_map(... | 25.238095 | 92 | 0.606604 |
9e3bb5dc475817dfc113c5b889e3785992a8efbd | 576 | ex | Elixir | lib/alcsmg/queue/worker/root_supervisor.ex | velimir0xff/alcsmg | 7f8845b4e4698009a44769fc593a551c5f9387ee | [
"MIT"
] | null | null | null | lib/alcsmg/queue/worker/root_supervisor.ex | velimir0xff/alcsmg | 7f8845b4e4698009a44769fc593a551c5f9387ee | [
"MIT"
] | null | null | null | lib/alcsmg/queue/worker/root_supervisor.ex | velimir0xff/alcsmg | 7f8845b4e4698009a44769fc593a551c5f9387ee | [
"MIT"
] | null | null | null | defmodule Alcsmg.Queue.Worker.RootSupervisor do
use Supervisor
@init_worker_number 10
def start_link do
Supervisor.start_link(__MODULE__, [], name: __MODULE__)
end
def init(_args) do
children = [
supervisor(Alcsmg.Queue.Worker.Supervisor, []),
worker(Alcsmg.Queue.Worker.Manager, [%{init_n... | 25.043478 | 79 | 0.722222 |
9e3be9c8ba04f243396629b80ca4455abcea74c6 | 200 | exs | Elixir | test/fatex_web/controllers/page_controller_test.exs | vinicius-molina/FaTex | bbc05acef7a9697efe9ec0fe64511bce9f26a9b3 | [
"Apache-2.0"
] | 3 | 2019-12-08T19:42:39.000Z | 2020-03-17T13:02:56.000Z | test/fatex_web/controllers/page_controller_test.exs | vinicius-molina/FaTex | bbc05acef7a9697efe9ec0fe64511bce9f26a9b3 | [
"Apache-2.0"
] | 1 | 2021-03-09T19:49:41.000Z | 2021-03-09T19:49:41.000Z | test/fatex_web/controllers/page_controller_test.exs | vinicius-molina/FaTex | bbc05acef7a9697efe9ec0fe64511bce9f26a9b3 | [
"Apache-2.0"
] | 1 | 2019-12-08T19:42:42.000Z | 2019-12-08T19:42:42.000Z | defmodule FatexWeb.PageControllerTest do
use FatexWeb.ConnCase
#test "GET /", %{conn: conn} do
# conn = get(conn, "/")
# assert html_response(conn, 200) =~ "Welcome to Phoenix!"
#end
end
| 22.222222 | 61 | 0.66 |
9e3c0473fdef2e1e4565f912e7edfa6986df600e | 1,553 | ex | Elixir | lib/history/funding_rates/funding_rate_history_job.ex | fremantle-industries/history | a8a33744279ff4ca62620785f9a2e9c0c99e4de7 | [
"MIT"
] | 20 | 2021-08-06T01:09:48.000Z | 2022-03-28T18:44:56.000Z | lib/history/funding_rates/funding_rate_history_job.ex | fremantle-industries/history | a8a33744279ff4ca62620785f9a2e9c0c99e4de7 | [
"MIT"
] | 13 | 2021-08-21T21:17:02.000Z | 2022-03-27T06:33:51.000Z | lib/history/funding_rates/funding_rate_history_job.ex | fremantle-industries/history | a8a33744279ff4ca62620785f9a2e9c0c99e4de7 | [
"MIT"
] | 2 | 2021-09-23T11:31:59.000Z | 2022-01-09T16:19:35.000Z | defmodule History.FundingRates.FundingRateHistoryJob do
use Ecto.Schema
import Ecto.Changeset
alias History.FundingRates
@type t :: %__MODULE__{}
@type id :: integer
defmodule Product do
use Ecto.Schema
import Ecto.Changeset
@derive {Jason.Encoder, only: [:venue, :symbol]}
@primary_key fa... | 23.530303 | 90 | 0.663876 |
9e3c40275df1fc362c58428c4faaa94ef5c759c6 | 929 | ex | Elixir | test/support/channel_case.ex | MatthieuSegret/yummy-phoenix | 85b490075e3a0395b4e7cfa9f06936659e9d12b5 | [
"MIT"
] | 5 | 2017-08-27T19:45:43.000Z | 2019-06-28T08:12:25.000Z | test/support/channel_case.ex | MatthieuSegret/yummy-phoenix | 85b490075e3a0395b4e7cfa9f06936659e9d12b5 | [
"MIT"
] | null | null | null | test/support/channel_case.ex | MatthieuSegret/yummy-phoenix | 85b490075e3a0395b4e7cfa9f06936659e9d12b5 | [
"MIT"
] | null | null | null | defmodule YummyWeb.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 datastructures and query the data layer.
Finally, if the test case interacts with... | 24.447368 | 67 | 0.713671 |
9e3c4e4abb64614b5dcdd6f218578d02f513bcd0 | 609 | exs | Elixir | _templates/elixir/puzzle_test.exs | ardhena/advent-of-code-2018 | 573f44c02f4308febdba2d09eda013a3cb205387 | [
"MIT"
] | null | null | null | _templates/elixir/puzzle_test.exs | ardhena/advent-of-code-2018 | 573f44c02f4308febdba2d09eda013a3cb205387 | [
"MIT"
] | null | null | null | _templates/elixir/puzzle_test.exs | ardhena/advent-of-code-2018 | 573f44c02f4308febdba2d09eda013a3cb205387 | [
"MIT"
] | null | null | null | Code.load_file("puzzle.exs", __DIR__)
ExUnit.start()
defmodule PuzzleTest do
use ExUnit.Case
describe "part one" do
test "calculates ... from input" do
# assert Puzzle.calc_part_1(input) == result
end
test "calculates ... from input file" do
# assert Puzzle.load_input() |> Puzzle.calc_pa... | 21.75 | 68 | 0.648604 |
9e3c9f88fd82d24c4b4fdbfd8289004cbd111eeb | 1,094 | ex | Elixir | tests/server/lib/server_web/channels/user_socket.ex | Webtrekk/Webtrekk-Smart-Pixel | 8ac5e5132d600ccd486573f88be84908b614530b | [
"MIT"
] | 6 | 2019-05-10T00:01:17.000Z | 2022-03-03T12:52:51.000Z | tests/server/lib/server_web/channels/user_socket.ex | Webtrekk/Webtrekk-Smart-Pixel | 8ac5e5132d600ccd486573f88be84908b614530b | [
"MIT"
] | 4 | 2020-01-20T13:19:30.000Z | 2021-10-15T07:46:59.000Z | tests/server/lib/server_web/channels/user_socket.ex | Webtrekk/Webtrekk-Smart-Pixel | 8ac5e5132d600ccd486573f88be84908b614530b | [
"MIT"
] | 2 | 2020-05-02T15:59:43.000Z | 2020-10-21T09:00:38.000Z | defmodule ServerWeb.UserSocket do
use Phoenix.Socket
## Channels
channel "requests:*", ServerWeb.RequestsChannel
# Socket params are passed from the client and can
# be used to verify and authenticate a user. After
# verification, you can put default assigns into
# the socket that will be set for all ch... | 30.388889 | 83 | 0.697441 |
9e3ca0b25db296249c3da99fd381b5cb3232ae92 | 401 | ex | Elixir | takso-hw5 2/web/models/allocation.ex | alpdenizz/ElixirPlayground | 58b5a16c489058e0067e4811042d96fe6a5f8d59 | [
"MIT"
] | null | null | null | takso-hw5 2/web/models/allocation.ex | alpdenizz/ElixirPlayground | 58b5a16c489058e0067e4811042d96fe6a5f8d59 | [
"MIT"
] | null | null | null | takso-hw5 2/web/models/allocation.ex | alpdenizz/ElixirPlayground | 58b5a16c489058e0067e4811042d96fe6a5f8d59 | [
"MIT"
] | null | null | null | defmodule Takso.Allocation do
use Takso.Web, :model
schema "allocations" do
field :status, :string
belongs_to :taxi, Takso.Taxi, foreign_key: :taxi_id
belongs_to :booking, Takso.Booking, foreign_key: :booking_id
timestamps()
end
def changeset(struct, params \\ %{}) do
struct
... | 22.277778 | 65 | 0.645885 |
9e3cbe7b91796e93a7559fc29e70fc4d05870a48 | 945 | exs | Elixir | code/odds/simple_csv.exs | alvarocamillont/introdu-o_elixir | 1d72d4f4b01d9312c4b066ce3c0fe8d9bfaaade1 | [
"MIT"
] | null | null | null | code/odds/simple_csv.exs | alvarocamillont/introdu-o_elixir | 1d72d4f4b01d9312c4b066ce3c0fe8d9bfaaade1 | [
"MIT"
] | 1 | 2021-03-09T16:27:25.000Z | 2021-03-09T16:27:25.000Z | programming-elixir-book/code/odds/simple_csv.exs | jordanhubbard/elixir-projects | dee341d672e83a45a17a4a85abd54a480f95c506 | [
"BSD-2-Clause"
] | null | null | null | #---
# Excerpted from "Programming Elixir ≥ 1.6",
# published by The Pragmatic Bookshelf.
# Copyrights apply to this code. It may not be used to create training material,
# courses, books, articles, and the like. Contact us if you are in doubt.
# We make no guarantees that this code is fit for any purpose.
# Visit http... | 19.285714 | 85 | 0.628571 |
9e3d238bc8dbe533f5378c3f736ad72650ce8e5a | 563 | exs | Elixir | apps/tai/test/tai/new_orders/search_transitions_count_test.exs | yurikoval/tai | 94254b45d22fa0307b01577ff7c629c7280c0295 | [
"MIT"
] | null | null | null | apps/tai/test/tai/new_orders/search_transitions_count_test.exs | yurikoval/tai | 94254b45d22fa0307b01577ff7c629c7280c0295 | [
"MIT"
] | 78 | 2020-10-12T06:21:43.000Z | 2022-03-28T09:02:00.000Z | apps/tai/test/tai/new_orders/search_transitions_count_test.exs | yurikoval/tai | 94254b45d22fa0307b01577ff7c629c7280c0295 | [
"MIT"
] | null | null | null | defmodule Tai.NewOrders.SearchTransitionsCountTest do
use Tai.TestSupport.DataCase, async: false
test "returns the count of order transitions matching the search query" do
{:ok, order} = create_order()
{:ok, _order_transition_1} = create_order_transition(order.client_id, %{}, :cancel)
{:ok, _order_tran... | 43.307692 | 87 | 0.749556 |
9e3d41fe2617023d27b632f2f52f22fccccf7887 | 7,540 | ex | Elixir | apps/omg/lib/omg/state.ex | PinkDiamond1/elixir-omg | 70dfd24a0a1ddf5d1d9d71aab61ea25300f889f7 | [
"Apache-2.0"
] | 1 | 2020-05-01T12:30:09.000Z | 2020-05-01T12:30:09.000Z | apps/omg/lib/omg/state.ex | PinkDiamond1/elixir-omg | 70dfd24a0a1ddf5d1d9d71aab61ea25300f889f7 | [
"Apache-2.0"
] | null | null | null | apps/omg/lib/omg/state.ex | PinkDiamond1/elixir-omg | 70dfd24a0a1ddf5d1d9d71aab61ea25300f889f7 | [
"Apache-2.0"
] | 1 | 2021-12-04T00:37:46.000Z | 2021-12-04T00:37:46.000Z | # Copyright 2019 OmiseGO Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 33.215859 | 120 | 0.688196 |
9e3d44fc9a3d890af632244e53941bde81cfc10a | 4,071 | exs | Elixir | test/downstream_test.exs | regularfellow/downstream | 436de5d57eabc58e60e1bf43c3dab78170dbe8e3 | [
"MIT"
] | 21 | 2018-03-23T03:40:38.000Z | 2022-01-31T01:51:30.000Z | test/downstream_test.exs | regularfellow/downstream | 436de5d57eabc58e60e1bf43c3dab78170dbe8e3 | [
"MIT"
] | 3 | 2021-05-06T18:52:57.000Z | 2021-12-23T13:07:24.000Z | test/downstream_test.exs | regularfellow/downstream | 436de5d57eabc58e60e1bf43c3dab78170dbe8e3 | [
"MIT"
] | 6 | 2020-02-27T00:16:22.000Z | 2021-12-22T19:39:37.000Z | defmodule DownstreamTest do
use ExUnit.Case
import Mimic
doctest Downstream
alias Downstream.{Download, Error, Response}
@success_url "https://httpstat.us/200"
@error_url "https://httpstat.us/403"
describe "get/3" do
setup :verify_on_exit!
setup :set_mimic_global
setup _context do
{:... | 25.603774 | 83 | 0.638909 |
9e3d5ad496c7ea6878d3b1b688a05a738033a551 | 5,944 | ex | Elixir | apps/omg_watcher/test/support/exit_processor/test_helper.ex | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | null | null | null | apps/omg_watcher/test/support/exit_processor/test_helper.ex | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | null | null | null | apps/omg_watcher/test/support/exit_processor/test_helper.ex | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019-2020 OmiseGO Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 32.304348 | 104 | 0.684556 |
9e3d5fe85e0bdcedfde7b5900374aed3325b7a5b | 43 | exs | Elixir | v02/ch12/pm1.edit3.exs | oiax/elixir-primer | c8b89a29f108cc335b8e1341b7a1e90ec12adc66 | [
"MIT"
] | null | null | null | v02/ch12/pm1.edit3.exs | oiax/elixir-primer | c8b89a29f108cc335b8e1341b7a1e90ec12adc66 | [
"MIT"
] | null | null | null | v02/ch12/pm1.edit3.exs | oiax/elixir-primer | c8b89a29f108cc335b8e1341b7a1e90ec12adc66 | [
"MIT"
] | null | null | null | x = {:a, 3, 4}
x = {:a, y, 4}
IO.inspect y
| 10.75 | 14 | 0.418605 |
9e3d7a4b46272276065d90fb446b6237cac49aac | 1,178 | ex | Elixir | lib/chat_api/companies.ex | guanghuizeng/papercups | 0d7ca893edddea0d23f0772ccc5694edd407fc63 | [
"MIT"
] | 1 | 2021-01-18T09:57:23.000Z | 2021-01-18T09:57:23.000Z | lib/chat_api/companies.ex | psolvy/papercups | 723711f00b34afc2ae91b9157d81a80bf1d94009 | [
"MIT"
] | null | null | null | lib/chat_api/companies.ex | psolvy/papercups | 723711f00b34afc2ae91b9157d81a80bf1d94009 | [
"MIT"
] | null | null | null | defmodule ChatApi.Companies do
@moduledoc """
The Companies context.
"""
import Ecto.Query, warn: false
alias ChatApi.Repo
alias ChatApi.Companies.Company
@spec list_companies(binary()) :: [Company.t()]
def list_companies(account_id) do
Company |> where(account_id: ^account_id) |> Repo.all()
en... | 27.395349 | 95 | 0.648557 |
9e3db3971b8f40a6f8294f2eb259b5d82efad59b | 385 | ex | Elixir | elixir/lib/homework_web/schemas/types.ex | Arthurb101/web-homework | d3f768a71c7d9e13e456028c491ced8e71e6cda4 | [
"MIT"
] | 1 | 2021-01-24T06:15:39.000Z | 2021-01-24T06:15:39.000Z | elixir/lib/homework_web/schemas/types.ex | Arthurb101/web-homework | d3f768a71c7d9e13e456028c491ced8e71e6cda4 | [
"MIT"
] | null | null | null | elixir/lib/homework_web/schemas/types.ex | Arthurb101/web-homework | d3f768a71c7d9e13e456028c491ced8e71e6cda4 | [
"MIT"
] | null | null | null | defmodule HomeworkWeb.Schemas.Types do
@moduledoc """
Defines the types for the Schema to use.
"""
use Absinthe.Schema.Notation
import_types(Absinthe.Type.Custom)
import_types(HomeworkWeb.Schemas.CompaniesSchema)
import_types(HomeworkWeb.Schemas.MerchantsSchema)
import_types(HomeworkWeb.Schemas.Transac... | 29.615385 | 54 | 0.81039 |
9e3dfeb674758db61e7b8b686f87be6e3f183bc4 | 296 | ex | Elixir | apps/rtc/lib/rtc.ex | michaeljguarino/forge | 50ee583ecb4aad5dee4ef08fce29a8eaed1a0824 | [
"Apache-2.0"
] | null | null | null | apps/rtc/lib/rtc.ex | michaeljguarino/forge | 50ee583ecb4aad5dee4ef08fce29a8eaed1a0824 | [
"Apache-2.0"
] | 2 | 2019-12-13T23:55:50.000Z | 2019-12-17T05:49:58.000Z | apps/rtc/lib/rtc.ex | michaeljguarino/chartmart | a34c949cc29d6a1ab91c04c5e4f797e6f0daabfc | [
"Apache-2.0"
] | null | null | null | defmodule Rtc do
@moduledoc """
Rtc keeps the contexts that define your domain
and business logic.
Contexts are also responsible for managing your data, regardless
if it comes from the database, an external API or others.
"""
def conf(key), do: Application.get_env(:rtc, key)
end
| 24.666667 | 66 | 0.733108 |
9e3e1cb8211c2b95aae0a33160dc1414573bd0bc | 1,211 | ex | Elixir | lang/elixir/learning-fp-with-elixir/exercises/lib/chapter2/fourth.ex | Tyyagoo/studies | f8fcc3a539cfb6d04a149174c88bf2208e220b96 | [
"Unlicense"
] | null | null | null | lang/elixir/learning-fp-with-elixir/exercises/lib/chapter2/fourth.ex | Tyyagoo/studies | f8fcc3a539cfb6d04a149174c88bf2208e220b96 | [
"Unlicense"
] | null | null | null | lang/elixir/learning-fp-with-elixir/exercises/lib/chapter2/fourth.ex | Tyyagoo/studies | f8fcc3a539cfb6d04a149174c88bf2208e220b96 | [
"Unlicense"
] | null | null | null | defmodule Exercises.Chapter2.Fourth do
@moduledoc """
Create a module called MatchstickFactory and a function called boxes/1.
The factory has three types of boxes: the big ones hold fifty matchsticks,
the medium ones hold twenty, and the small ones hold five.
The boxes can’t have fewer matchstick that they ca... | 30.275 | 79 | 0.701073 |
9e3e370dca3edcc9537b7f33dad9824482ef0e5d | 2,157 | ex | Elixir | clients/dfa_reporting/lib/google_api/dfa_reporting/v35/model/creative_asset_selection.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/dfa_reporting/lib/google_api/dfa_reporting/v35/model/creative_asset_selection.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/dfa_reporting/lib/google_api/dfa_reporting/v35/model/creative_asset_selection.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... | 43.14 | 305 | 0.747334 |
9e3e900210e4e041b1a61c61e6a176b82da6baed | 335 | exs | Elixir | apps/bus_detective_web/config/test.exs | bus-detective/bus_detective_ng | ef54684d4f640384bd20a4d5550ff51ab440190b | [
"MIT"
] | 8 | 2018-07-06T14:44:10.000Z | 2021-08-19T17:24:25.000Z | apps/bus_detective_web/config/test.exs | bus-detective/bus_detective_ng | ef54684d4f640384bd20a4d5550ff51ab440190b | [
"MIT"
] | 12 | 2018-07-15T18:43:04.000Z | 2022-02-10T16:07:47.000Z | apps/bus_detective_web/config/test.exs | bus-detective/bus_detective_ng | ef54684d4f640384bd20a4d5550ff51ab440190b | [
"MIT"
] | 1 | 2018-07-13T17:30:20.000Z | 2018-07-13T17:30: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 :bus_detective_web, BusDetectiveWeb.Endpoint,
http: [port: 4001],
server: true
config :bus_detective, :sql_sandbox, true
config :wallaby,
driver: Wallaby.Experimental.Chrome,
screenshot_on... | 23.928571 | 56 | 0.764179 |
9e3eab1e875bdf31be26dd3dfce9655b533aa6cb | 5,388 | exs | Elixir | test/rex_test.exs | vic/rex | 04f41e7ae7be0f8325e641ba72504acf68781f6a | [
"Apache-2.0"
] | 7 | 2016-10-10T08:56:16.000Z | 2020-05-19T20:11:42.000Z | test/rex_test.exs | vic/rex | 04f41e7ae7be0f8325e641ba72504acf68781f6a | [
"Apache-2.0"
] | 1 | 2016-10-09T15:57:25.000Z | 2016-10-09T15:57:45.000Z | test/rex_test.exs | vic/rex | 04f41e7ae7be0f8325e641ba72504acf68781f6a | [
"Apache-2.0"
] | null | null | null | defmodule Rex.Examples do
use Rex
drex double(a) (a * 2)
drex double_swap double swap double
drex mult Kernel.*/2
drex triple 3 ~> mult
drex puts IO.puts/1 ~> drop
drex sum 0 ~> (&Kernel.+/2) ~> List.foldr/3
drex sumr List.foldr/3 <~ (&Kernel.+/2) <~ 0... | 26.80597 | 105 | 0.58853 |
9e3edb156cfebbcf78863776af989f2f8cfb2e35 | 1,676 | ex | Elixir | test/support/apps/example/lib/example_web/endpoint.ex | mitchellhenke/torch | 2d0ab68f4e2d7f3bc37fbf7edbd1298b29b36e71 | [
"MIT"
] | 528 | 2019-09-13T15:10:36.000Z | 2022-03-31T10:28:27.000Z | test/support/apps/example/lib/example_web/endpoint.ex | mitchellhenke/torch | 2d0ab68f4e2d7f3bc37fbf7edbd1298b29b36e71 | [
"MIT"
] | 133 | 2019-09-13T17:46:59.000Z | 2022-03-01T13:37:10.000Z | test/support/apps/example/lib/example_web/endpoint.ex | mitchellhenke/torch | 2d0ab68f4e2d7f3bc37fbf7edbd1298b29b36e71 | [
"MIT"
] | 38 | 2019-10-29T20:37:13.000Z | 2022-03-03T05:19:33.000Z | defmodule ExampleWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :example
socket("/socket", ExampleWeb.UserSocket)
# Serve at "/" the static files from "priv/static" directory.
#
# You should set gzip to true if you are running phoenix.digest
# when deploying your static files in production.
plug Plug.St... | 27.933333 | 95 | 0.703461 |
9e3edd8f760e9a92a0047928c30a138c41b4107c | 3,599 | ex | Elixir | lib/stripy.ex | moomerman/stripy | 06ae411412d14fe48edcbaaf29774c59228d51e6 | [
"MIT"
] | null | null | null | lib/stripy.ex | moomerman/stripy | 06ae411412d14fe48edcbaaf29774c59228d51e6 | [
"MIT"
] | null | null | null | lib/stripy.ex | moomerman/stripy | 06ae411412d14fe48edcbaaf29774c59228d51e6 | [
"MIT"
] | null | null | null | defmodule Stripy do
@moduledoc """
Stripy is a micro wrapper intended to be
used for sending requests to Stripe's REST API. It is
made for developers who prefer to work directly with the
official API and provide their own abstractions on top
if such are needed.
Stripy takes care of setting headers, encod... | 34.605769 | 119 | 0.648236 |
9e3efd063dbfa1f2736d2e8688aa90a170ecb15b | 2,206 | exs | Elixir | mix.exs | jeanparpaillon/ex_cast | fd67d0dcf9ac3794c5fbf1070a7be33925361c2b | [
"Apache-2.0"
] | null | null | null | mix.exs | jeanparpaillon/ex_cast | fd67d0dcf9ac3794c5fbf1070a7be33925361c2b | [
"Apache-2.0"
] | null | null | null | mix.exs | jeanparpaillon/ex_cast | fd67d0dcf9ac3794c5fbf1070a7be33925361c2b | [
"Apache-2.0"
] | null | null | null | defmodule ExCast.MixProject do
use Mix.Project
def project do
[
app: :cast,
version: "0.1.0",
elixir: "~> 1.9",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
aliases: aliases(Mix.env()),
deps: deps(),
description: description(),
... | 22.282828 | 146 | 0.56437 |
9e3f10c93388d650e03fb77f66eb36e2521a0ec8 | 983 | exs | Elixir | apps/core/priv/repo/migrations/20210509211102_add_service_accounts.exs | michaeljguarino/forge | 50ee583ecb4aad5dee4ef08fce29a8eaed1a0824 | [
"Apache-2.0"
] | 59 | 2021-09-16T19:29:39.000Z | 2022-03-31T20:44:24.000Z | apps/core/priv/repo/migrations/20210509211102_add_service_accounts.exs | svilenkov/plural | ac6c6cc15ac4b66a3b5e32ed4a7bee4d46d1f026 | [
"Apache-2.0"
] | 111 | 2021-08-15T09:56:37.000Z | 2022-03-31T23:59:32.000Z | apps/core/priv/repo/migrations/20210509211102_add_service_accounts.exs | svilenkov/plural | ac6c6cc15ac4b66a3b5e32ed4a7bee4d46d1f026 | [
"Apache-2.0"
] | 4 | 2021-12-13T09:43:01.000Z | 2022-03-29T18:08:44.000Z | defmodule Core.Repo.Migrations.AddServiceAccounts do
use Ecto.Migration
def change do
alter table(:users) do
add :service_account, :boolean, default: false
end
create table(:impersonation_policies, primary_key: false) do
add :id, :uuid, primary_key: true
add :user_id, references... | 31.709677 | 94 | 0.70295 |
9e3f1edd17f4b5468a4a7088c27f4d4333333f47 | 11,105 | ex | Elixir | lib/mechanize/page.ex | paultannenbaum/mechanize | 97fd54c0421689026c01b9bf38206fa74e8f7e1a | [
"MIT"
] | 25 | 2020-06-26T02:21:35.000Z | 2022-03-05T18:51:46.000Z | lib/mechanize/page.ex | paultannenbaum/mechanize | 97fd54c0421689026c01b9bf38206fa74e8f7e1a | [
"MIT"
] | 29 | 2019-07-02T21:50:06.000Z | 2020-05-28T18:34:01.000Z | lib/mechanize/page.ex | paultannenbaum/mechanize | 97fd54c0421689026c01b9bf38206fa74e8f7e1a | [
"MIT"
] | 4 | 2020-06-24T02:11:47.000Z | 2022-03-06T00:50:59.000Z | defmodule Mechanize.Page do
@moduledoc """
The HTML Page.
This module defines `Mechanize.Page` and the main functions for working with Pages.
The Page is created as a result of a successful HTTP request.
```
alias Mechanize.{Browser, Page}
browser = Browser.new()
page = Browser.get!(browser, "https:/... | 29.534574 | 99 | 0.662044 |
9e3f84fac2f0fafaff121f40611b40595dc6180e | 2,105 | exs | Elixir | installer/templates/new/mix.exs | angwoontiong/phoenix-ui | 03227b13f3c780b5626d56207bfa99c8a06525d8 | [
"MIT"
] | null | null | null | installer/templates/new/mix.exs | angwoontiong/phoenix-ui | 03227b13f3c780b5626d56207bfa99c8a06525d8 | [
"MIT"
] | null | null | null | installer/templates/new/mix.exs | angwoontiong/phoenix-ui | 03227b13f3c780b5626d56207bfa99c8a06525d8 | [
"MIT"
] | null | null | null | defmodule <%= application_module %>.Mixfile do
use Mix.Project
def project do
[app: :<%= application_name %>,
version: "0.0.1",<%= if in_umbrella do %>
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",<% end %>
... | 35.083333 | 115 | 0.588599 |
9e3fe88772dcbf92cdbdea3907108cb37a4fa78a | 2,122 | exs | Elixir | mix.exs | fireproofsocks/pockets | b0e7ebd8836e22f7354f083dea9e52d6b4ce365a | [
"Apache-2.0"
] | 4 | 2020-09-29T17:54:47.000Z | 2022-03-01T19:26:07.000Z | mix.exs | fireproofsocks/pockets | b0e7ebd8836e22f7354f083dea9e52d6b4ce365a | [
"Apache-2.0"
] | 3 | 2020-11-20T20:54:39.000Z | 2021-10-09T00:39:57.000Z | mix.exs | fireproofsocks/pockets | b0e7ebd8836e22f7354f083dea9e52d6b4ce365a | [
"Apache-2.0"
] | 1 | 2020-11-04T14:09:30.000Z | 2020-11-04T14:09:30.000Z | defmodule Pockets.MixProject do
use Mix.Project
@source_url "https://github.com/fireproofsocks/pockets"
@version "1.2.0"
def project do
[
app: :pockets,
name: "Pockets",
description: description(),
version: @version,
elixir: "~> 1.10",
start_permanent: Mix.env() == :pro... | 23.842697 | 79 | 0.555137 |
9e3fffcdbbede8a487bd26d9c68e2d7406ffcb46 | 1,141 | exs | Elixir | clients/plus_domains/config/config.exs | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/plus_domains/config/config.exs | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/plus_domains/config/config.exs | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 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.806452 | 73 | 0.754601 |
9e401b19de9429177b9cacf212ea53693612d218 | 2,819 | ex | Elixir | lib/credo/cli/task/prepare_checks_to_run.ex | andyl/credo | 4743c3e378a77177f79b5a822f38566ebcf85116 | [
"MIT"
] | null | null | null | lib/credo/cli/task/prepare_checks_to_run.ex | andyl/credo | 4743c3e378a77177f79b5a822f38566ebcf85116 | [
"MIT"
] | null | null | null | lib/credo/cli/task/prepare_checks_to_run.ex | andyl/credo | 4743c3e378a77177f79b5a822f38566ebcf85116 | [
"MIT"
] | null | null | null | defmodule Credo.CLI.Task.PrepareChecksToRun do
@moduledoc false
use Credo.Execution.Task
def call(exec, _opts \\ []) do
source_files = Execution.get_source_files(exec)
exec
|> set_config_comments(source_files)
|> enable_disabled_checks_if_applicable()
|> exclude_low_priority_checks(exec.min... | 27.637255 | 95 | 0.675772 |
9e4042ec2a9b3c1ba4b72ae69e21d7879f6d3ba2 | 369 | exs | Elixir | ch8/defstruct1.exs | rafanoronha/prog_elixir_1_6 | 5ae2137da4ffdb6de1c9b164812ed6e43c0922d3 | [
"MIT"
] | null | null | null | ch8/defstruct1.exs | rafanoronha/prog_elixir_1_6 | 5ae2137da4ffdb6de1c9b164812ed6e43c0922d3 | [
"MIT"
] | null | null | null | ch8/defstruct1.exs | rafanoronha/prog_elixir_1_6 | 5ae2137da4ffdb6de1c9b164812ed6e43c0922d3 | [
"MIT"
] | null | null | null | defmodule Attendee do
defstruct name: "", paid: false, over_18: true
def may_attend_after_party(attendee = %Attendee{}) do
attendee.paid && attendee.over_18
end
def print_vip_badge(%Attendee{name: name}) when name != "" do
IO.puts "Very cheap badge for #{name}"
end
def print_vip_badge(%Attendee{}... | 24.6 | 63 | 0.696477 |
9e404679bdd27bdddcc282713ce77e027aaaf4b8 | 2,113 | exs | Elixir | test/ada/workflow_test.exs | cloud8421/ada | 384f5e5e85e95c4d5883298259e781cc0a54bd07 | [
"MIT"
] | 7 | 2019-05-11T12:14:48.000Z | 2021-04-02T18:42:51.000Z | test/ada/workflow_test.exs | cloud8421/ada | 384f5e5e85e95c4d5883298259e781cc0a54bd07 | [
"MIT"
] | 3 | 2019-05-11T08:01:47.000Z | 2019-05-14T12:06:50.000Z | test/ada/workflow_test.exs | cloud8421/ada | 384f5e5e85e95c4d5883298259e781cc0a54bd07 | [
"MIT"
] | 1 | 2021-01-06T14:57:32.000Z | 2021-01-06T14:57:32.000Z | defmodule Ada.Schema.WorkflowTest do
use ExUnit.Case, async: true
alias Ada.{TestWorkflow, Workflow}
defmodule TestEmailAdapter do
@behaviour Ada.Email.Adapter
def send_email(%Ada.Email{} = email), do: {:ok, {:email_delivered, email}}
end
describe "run/4" do
test "validates params" do
as... | 34.080645 | 101 | 0.640795 |
9e4052a2c6ea02dc360f7c7448b1154b60dbc090 | 731 | ex | Elixir | lib/xml_parser/xml_node_finder.ex | paggi-com/lib-quinn | debbeff809e31f15156486e51226175f355223a9 | [
"Apache-2.0"
] | null | null | null | lib/xml_parser/xml_node_finder.ex | paggi-com/lib-quinn | debbeff809e31f15156486e51226175f355223a9 | [
"Apache-2.0"
] | null | null | null | lib/xml_parser/xml_node_finder.ex | paggi-com/lib-quinn | debbeff809e31f15156486e51226175f355223a9 | [
"Apache-2.0"
] | null | null | null | defmodule Quinn.XmlNodeFinder do
def find([], _), do: []
def find(nil, _), do: []
def find([value], _) when is_binary(value), do: []
def find([value | _], _) when is_binary(value), do: []
def find(%{} = node, node_names) do
find([node], node_names)
end
def find([%{name: name} = head | tail], node_na... | 26.107143 | 101 | 0.630643 |
9e40535635ec8aed5228790abe54b9bbb65a2a9c | 437 | exs | Elixir | robotica_face/test/robotica_face_web/views/error_view_test.exs | brianmay/robotica-elixir | 8656510e54b7e32a547e3a54bf946f0e327911c9 | [
"RSA-MD"
] | 1 | 2019-04-23T09:16:44.000Z | 2019-04-23T09:16:44.000Z | robotica_face/test/robotica_face_web/views/error_view_test.exs | brianmay/robotica-elixir | 8656510e54b7e32a547e3a54bf946f0e327911c9 | [
"RSA-MD"
] | 107 | 2019-05-26T08:03:26.000Z | 2022-02-03T19:13:56.000Z | robotica_face/test/robotica_face_web/views/error_view_test.exs | brianmay/robotica-elixir | 8656510e54b7e32a547e3a54bf946f0e327911c9 | [
"RSA-MD"
] | 1 | 2019-08-10T20:44:24.000Z | 2019-08-10T20:44:24.000Z | defmodule RoboticaFaceWeb.ErrorViewTest do
use RoboticaFaceWeb.ConnCase, async: true
# Bring render/3 and render_to_string/3 for testing custom views
import Phoenix.View
test "renders 404.html" do
assert render_to_string(RoboticaFaceWeb.ErrorView, "404.html", []) == "Not Found"
end
test "renders 500.... | 29.133333 | 97 | 0.745995 |
9e4077f3b4fa0de14761c7ac8f5942ceeb24c623 | 1,607 | ex | Elixir | clients/composer/lib/google_api/composer/v1beta1/model/encryption_config.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/composer/lib/google_api/composer/v1beta1/model/encryption_config.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/composer/lib/google_api/composer/v1beta1/model/encryption_config.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 34.191489 | 222 | 0.750467 |
9e40e8761c8b47929636dcdb9c8d41fffec25cc3 | 904 | ex | Elixir | lib/noa_web/plugs/provider_loader.ex | handnot2/noa | c071798e2baf4649466ba37190070c3192c7c2c2 | [
"MIT"
] | 9 | 2017-08-16T14:55:48.000Z | 2019-03-06T15:06:49.000Z | lib/noa_web/plugs/provider_loader.ex | handnot2/noa | c071798e2baf4649466ba37190070c3192c7c2c2 | [
"MIT"
] | null | null | null | lib/noa_web/plugs/provider_loader.ex | handnot2/noa | c071798e2baf4649466ba37190070c3192c7c2c2 | [
"MIT"
] | 1 | 2022-03-17T18:32:59.000Z | 2022-03-17T18:32:59.000Z | defmodule NoaWeb.Plugs.ProviderLoader do
@moduledoc false
import Plug.Conn
require Logger
alias Noa.Actors.{Provider, Providers}
def init(opts), do: opts
def call(conn, _opts) do
%{"provider_id" => provider_id} = conn.path_params
case Providers.lookup(provider_id) do
%Provider{} = provider ... | 27.393939 | 101 | 0.627212 |
9e41078d53f357996c75cdbe4edd4d066e240f19 | 492 | exs | Elixir | text_client/mix.exs | jakoubek/hangman-elixir | 2917755bda4dca2bafb20f0ef5caad579e3e99dd | [
"MIT"
] | null | null | null | text_client/mix.exs | jakoubek/hangman-elixir | 2917755bda4dca2bafb20f0ef5caad579e3e99dd | [
"MIT"
] | null | null | null | text_client/mix.exs | jakoubek/hangman-elixir | 2917755bda4dca2bafb20f0ef5caad579e3e99dd | [
"MIT"
] | null | null | null | defmodule TextClient.MixProject do
use Mix.Project
def project do
[
app: :text_client,
version: "0.1.0",
elixir: "~> 1.13",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
e... | 17.571429 | 59 | 0.577236 |
9e410d1473a908cedcd97beaabddf96526af946a | 2,281 | ex | Elixir | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/demote_master_configuration.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | 1 | 2021-10-01T09:20:41.000Z | 2021-10-01T09:20:41.000Z | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/demote_master_configuration.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/demote_master_configuration.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 42.240741 | 517 | 0.7637 |
9e412de2f3675aff38dfe308aa8414148bbc2951 | 640 | ex | Elixir | lib/exdns/config.ex | jeanparpaillon/exdns | 53b7fc780399eda96d42052e11e03d5eb0dcd789 | [
"MIT"
] | 16 | 2016-05-26T10:11:57.000Z | 2021-01-08T15:09:19.000Z | lib/exdns/config.ex | jeanparpaillon/exdns | 53b7fc780399eda96d42052e11e03d5eb0dcd789 | [
"MIT"
] | 9 | 2016-08-11T00:48:27.000Z | 2020-09-16T22:10:07.000Z | lib/exdns/config.ex | jeanparpaillon/exdns | 53b7fc780399eda96d42052e11e03d5eb0dcd789 | [
"MIT"
] | 11 | 2016-08-10T08:13:36.000Z | 2021-04-03T10:20:11.000Z | defmodule Exdns.Config do
@moduledoc """
Configuration details for exdns.
"""
def catch_exceptions?, do: Application.get_env(:exdns, :catch_exceptions, true)
def use_root_hints?, do: Application.get_env(:exdns, :use_root_hints, false)
def zone_file, do: Application.get_env(:exdns, :zone_file, "zones.json... | 30.47619 | 92 | 0.745313 |
9e412ea8efe5dd594e44e357ff2e77a7f454fbb9 | 535 | ex | Elixir | lib/decompilerl/cli.ex | aerosol/decompilerl | aa4b3e8e9fc3542ce6baf058dd2cfdb413b4bb81 | [
"WTFPL"
] | 27 | 2016-05-07T21:29:25.000Z | 2022-02-03T08:38:39.000Z | lib/decompilerl/cli.ex | aerosol/decompilerl | aa4b3e8e9fc3542ce6baf058dd2cfdb413b4bb81 | [
"WTFPL"
] | 2 | 2017-05-18T23:17:02.000Z | 2018-01-24T22:55:00.000Z | lib/decompilerl/cli.ex | aerosol/decompilerl | aa4b3e8e9fc3542ce6baf058dd2cfdb413b4bb81 | [
"WTFPL"
] | 4 | 2017-05-18T22:05:59.000Z | 2021-03-23T18:57:29.000Z | defmodule Decompilerl.CLI do
@switches [
help: :boolean,
output: :string,
skip_info: :boolean
]
@aliases [
h: :help,
o: :output
]
def main(args) do
{opts, argv} = OptionParser.parse!(args, switches: @switches, aliases: @aliases)
case argv do
[file] ->
Decompilerl.d... | 17.258065 | 85 | 0.549533 |
9e413301c1b95ddd3dbd3e3f764a20fcf10898c4 | 799 | ex | Elixir | lib/eb/user/loader/producer.ex | peterkrenn/ecto-genstage-batcher-example | b9f935c5db3ee6127fef518d2197d020a36840f5 | [
"Apache-2.0"
] | 1 | 2018-11-27T09:31:06.000Z | 2018-11-27T09:31:06.000Z | lib/eb/user/loader/producer.ex | peterkrenn/ecto-genstage-batcher-example | b9f935c5db3ee6127fef518d2197d020a36840f5 | [
"Apache-2.0"
] | null | null | null | lib/eb/user/loader/producer.ex | peterkrenn/ecto-genstage-batcher-example | b9f935c5db3ee6127fef518d2197d020a36840f5 | [
"Apache-2.0"
] | null | null | null | defmodule EB.User.Loader.Producer do
use GenStage
def start_link([]) do
GenStage.start_link(__MODULE__, :ok, name: __MODULE__)
end
def init(:ok) do
{:producer, {:queue.new, 0}}
end
def handle_cast({:load, id, from}, {queue, demand}) do
dispatch_jobs(:queue.in({id, from}, queue), demand, [])
... | 24.96875 | 59 | 0.635795 |
9e415153848653da99dd3a36e5811bcae4e24f4a | 962 | ex | Elixir | lib/exq/adapters/queue/redis.ex | onpointvn/exq | ee4db22624fb8a00ddc01c35a135e24de31b5a66 | [
"Apache-2.0"
] | 1,406 | 2015-01-16T03:00:32.000Z | 2022-03-28T11:38:22.000Z | lib/exq/adapters/queue/redis.ex | onpointvn/exq | ee4db22624fb8a00ddc01c35a135e24de31b5a66 | [
"Apache-2.0"
] | 372 | 2015-01-08T05:15:11.000Z | 2022-03-18T18:05:34.000Z | lib/exq/adapters/queue/redis.ex | onpointvn/exq | ee4db22624fb8a00ddc01c35a135e24de31b5a66 | [
"Apache-2.0"
] | 217 | 2015-02-01T20:21:36.000Z | 2022-01-28T16:19:55.000Z | defmodule Exq.Adapters.Queue.Redis do
@moduledoc """
Redis based Asynchronous queue.
Enqueue the job by using the GenServer API. Default queue. Designed to be used in production.
"""
alias Exq.Support.Config
alias Exq.Redis.JobQueue
@behaviour Exq.Adapters.Queue
def enqueue(pid, queue, worker, args, ... | 35.62963 | 95 | 0.72869 |
9e41a992eb7a91c73f554fee5c344d95b4c6c9fc | 2,434 | exs | Elixir | test/shared/cache_test.exs | Atlas42/nebulex_redis_adapter | 7f56aadb2fc41ca9fe54833a3d8402bc23261139 | [
"MIT"
] | null | null | null | test/shared/cache_test.exs | Atlas42/nebulex_redis_adapter | 7f56aadb2fc41ca9fe54833a3d8402bc23261139 | [
"MIT"
] | null | null | null | test/shared/cache_test.exs | Atlas42/nebulex_redis_adapter | 7f56aadb2fc41ca9fe54833a3d8402bc23261139 | [
"MIT"
] | null | null | null | defmodule NebulexRedisAdapter.CacheTest do
@moduledoc """
Shared Tests
"""
defmacro __using__(opts) do
quote bind_quoted: [opts: opts] do
@cache Keyword.fetch!(opts, :cache)
use Nebulex.Cache.ObjectTest, cache: @cache
use Nebulex.Cache.TransactionTest, cache: @cache
test "all" do
... | 29.682927 | 92 | 0.518899 |
9e41aa647479529e569c4a224d6f0978af7d3051 | 92 | exs | Elixir | test/shiritorishi_web/views/layout_view_test.exs | Foo-x/Shiritorishi | ee9b58f74c51941f958c986578c95c26a9920816 | [
"Apache-2.0"
] | null | null | null | test/shiritorishi_web/views/layout_view_test.exs | Foo-x/Shiritorishi | ee9b58f74c51941f958c986578c95c26a9920816 | [
"Apache-2.0"
] | null | null | null | test/shiritorishi_web/views/layout_view_test.exs | Foo-x/Shiritorishi | ee9b58f74c51941f958c986578c95c26a9920816 | [
"Apache-2.0"
] | null | null | null | defmodule ShiritorishiWeb.LayoutViewTest do
use ShiritorishiWeb.ConnCase, async: true
end
| 23 | 43 | 0.847826 |
9e41dd56da807c66b4794e5c076f19dfe5adffdd | 154 | ex | Elixir | apps/xee/lib/xee/repo.ex | xeejp/xee | 669e5a8030948e6d37ee0d33d3b37b4abdc34001 | [
"MIT"
] | 11 | 2015-12-24T07:51:45.000Z | 2019-03-05T12:29:31.000Z | apps/xee/lib/xee/repo.ex | xeejp/xee | 669e5a8030948e6d37ee0d33d3b37b4abdc34001 | [
"MIT"
] | 62 | 2015-12-25T02:58:20.000Z | 2020-03-04T06:52:11.000Z | apps/xee/lib/xee/repo.ex | xeejp/xee | 669e5a8030948e6d37ee0d33d3b37b4abdc34001 | [
"MIT"
] | 1 | 2016-07-19T03:28:08.000Z | 2016-07-19T03:28:08.000Z | defmodule Xee.Repo do
use Ecto.Repo, otp_app: :xee
def init(_, opts) do
{:ok, Keyword.put(opts, :url, System.get_env("DATABASE_URL"))}
end
end
| 19.25 | 66 | 0.668831 |
9e41ef36114a84b75640a06fa2d1b0788203a2b4 | 3,758 | ex | Elixir | lib/koans/15_processes.ex | addupe/elixir-koans | 7dad0666201e36916fa7aedd20b5f2ee6cf94fb1 | [
"MIT"
] | null | null | null | lib/koans/15_processes.ex | addupe/elixir-koans | 7dad0666201e36916fa7aedd20b5f2ee6cf94fb1 | [
"MIT"
] | null | null | null | lib/koans/15_processes.ex | addupe/elixir-koans | 7dad0666201e36916fa7aedd20b5f2ee6cf94fb1 | [
"MIT"
] | null | null | null | defmodule Processes do
use Koans
@intro "Processes"
koan "You are a process" do
assert Process.alive?(self()) == true
end
koan "You can ask a process to introduce itself" do
information = Process.info(self())
assert information[:status] == :running
end
koan "Processes are referenced by th... | 21.231638 | 93 | 0.621607 |
9e42108bf5ce4c0e7100f9aab14a9eedeb5635cd | 593 | exs | Elixir | apps/arbitrage/mix.exs | joaop21/hermes | 2e274221ef8365edec847307231c134921db0270 | [
"Apache-2.0"
] | null | null | null | apps/arbitrage/mix.exs | joaop21/hermes | 2e274221ef8365edec847307231c134921db0270 | [
"Apache-2.0"
] | null | null | null | apps/arbitrage/mix.exs | joaop21/hermes | 2e274221ef8365edec847307231c134921db0270 | [
"Apache-2.0"
] | null | null | null | defmodule Arbitrage.MixProject do
use Mix.Project
def project do
[
app: :arbitrage,
version: "0.1.0",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixir: "~> 1.12",
start_permanent: Mix.... | 18.53125 | 45 | 0.527825 |
9e4229cd43fd9f5bf99bcba5b4b0da2f5104301d | 1,612 | ex | Elixir | lib/super_issuer_web/controllers/credential_controller.ex | WeLightProject/WeLight-Portal | 6e701469423e3a62affdc415c4e8c186d603d324 | [
"MIT"
] | 2 | 2021-02-12T09:21:56.000Z | 2021-02-22T08:52:20.000Z | lib/super_issuer_web/controllers/credential_controller.ex | WeLightProject/WeLight-Portal | 6e701469423e3a62affdc415c4e8c186d603d324 | [
"MIT"
] | 4 | 2021-02-22T08:53:43.000Z | 2021-06-09T09:24:46.000Z | lib/super_issuer_web/controllers/credential_controller.ex | WeLightProject/WeLight-Portal | 6e701469423e3a62affdc415c4e8c186d603d324 | [
"MIT"
] | null | null | null | defmodule SuperIssuerWeb.CredentialController do
use SuperIssuerWeb, :controller
@explorer_prefix "https://weimang.cyberemd.com/explorer/#/transaction/transactionDetail?pkHash="
def index(conn, params) do
credential =
%{cptId: cptId}=
conn
|> get_session(:credential)
|> StructTranslater... | 24.424242 | 98 | 0.623449 |
9e4268fc006afc07e7567078476e04d3bea91340 | 8,041 | ex | Elixir | lib/ex_aws/auth.ex | andrewhr/ex_aws | 47fcd13b2767aecddd2471388263539f3d9a6851 | [
"MIT"
] | 643 | 2017-10-17T12:55:11.000Z | 2022-03-24T15:23:37.000Z | lib/ex_aws/auth.ex | andrewhr/ex_aws | 47fcd13b2767aecddd2471388263539f3d9a6851 | [
"MIT"
] | 338 | 2017-10-17T11:12:21.000Z | 2022-03-20T09:48:23.000Z | lib/ex_aws/auth.ex | hixio-mh/ex_aws | 26e0a7896e8f2c4bda1735ac7814f01179eb0811 | [
"MIT"
] | 319 | 2017-10-17T17:39:44.000Z | 2022-03-29T13:35:34.000Z | defmodule ExAws.Auth do
import ExAws.Auth.Utils
alias ExAws.Auth.Credentials
alias ExAws.Auth.Signatures
alias ExAws.Request.Url
@moduledoc false
@unsignable_headers ["x-amzn-trace-id"]
@unsignable_headers_multi_case ["x-amzn-trace-id", "X-Amzn-Trace-Id"]
def validate_config(config) do
with :ok ... | 26.625828 | 98 | 0.612113 |
9e428fe49226ae7f50addd2332a478996e342de8 | 2,498 | ex | Elixir | clients/content/lib/google_api/content/v2/model/orders_reject_return_line_item_request.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/orders_reject_return_line_item_request.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/orders_reject_return_line_item_request.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... | 36.202899 | 185 | 0.688151 |
9e429b37d8a05af11b3969e420cd71f72336adbc | 822 | ex | Elixir | lib/models/key_metadata.ex | tino415/u2f_ex | d95f52335dc85140b2b1b3d7975d29c6d71868ea | [
"BSD-3-Clause"
] | 13 | 2018-10-15T10:39:24.000Z | 2019-01-15T06:42:24.000Z | lib/models/key_metadata.ex | tino415/u2f_ex | d95f52335dc85140b2b1b3d7975d29c6d71868ea | [
"BSD-3-Clause"
] | 19 | 2018-08-10T04:33:46.000Z | 2018-12-02T04:55:48.000Z | lib/models/key_metadata.ex | tino415/u2f_ex | d95f52335dc85140b2b1b3d7975d29c6d71868ea | [
"BSD-3-Clause"
] | 4 | 2019-07-06T04:38:31.000Z | 2021-02-01T10:45:57.000Z | defmodule U2FEx.KeyMetadata do
@moduledoc """
This represents the key metadata your application is expected to store. These values are B64 encoded and safe to store as-is.
"""
@type t :: %__MODULE__{
public_key: String.t(),
key_handle: String.t(),
app_id: String.t(),
ver... | 25.6875 | 127 | 0.596107 |
9e42a5f2fef82ae855829c9d7c43db1ed50a2e9f | 411 | ex | Elixir | lib/sahara/randomizers/faker.ex | ojizero/sahara | ee886ed1e3434cb1193770037e3c029773f0b192 | [
"MIT"
] | null | null | null | lib/sahara/randomizers/faker.ex | ojizero/sahara | ee886ed1e3434cb1193770037e3c029773f0b192 | [
"MIT"
] | null | null | null | lib/sahara/randomizers/faker.ex | ojizero/sahara | ee886ed1e3434cb1193770037e3c029773f0b192 | [
"MIT"
] | null | null | null | defmodule Sahara.Randomizers.Faker do
@behaviour Faker.Random
@impl Faker.Random
def random_between(left, right) do
Random.randint(left, right)
end
@impl Faker.Random
def random_bytes(total) do
1..total
|> Enum.map(fn _ -> Sahara.Randomizer.random_alphanum() end)
|> :erlang.iolist_to_binar... | 19.571429 | 64 | 0.70073 |
9e42bb48a494db36abdbbe097c2c22338d2265b3 | 92 | exs | Elixir | examples/bloggy/.formatter.exs | wojtekmach/resourceful | 8425140aa1e89dfababcb2faa7bc4e2f59722661 | [
"Apache-2.0"
] | 1 | 2020-01-06T00:38:43.000Z | 2020-01-06T00:38:43.000Z | examples/bloggy/.formatter.exs | wojtekmach/resourceful | 8425140aa1e89dfababcb2faa7bc4e2f59722661 | [
"Apache-2.0"
] | null | null | null | examples/bloggy/.formatter.exs | wojtekmach/resourceful | 8425140aa1e89dfababcb2faa7bc4e2f59722661 | [
"Apache-2.0"
] | null | null | null | [
inputs: ["mix.exs", "{config,lib,test}/**/*.{ex,exs}"],
import_deps: [:resourceful]
]
| 18.4 | 57 | 0.565217 |
9e42d43dc063da0d65149fdc215b2c56820395c6 | 384 | exs | Elixir | clients/mirror/test/test_helper.exs | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/mirror/test/test_helper.exs | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/mirror/test/test_helper.exs | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | ExUnit.start()
defmodule GoogleApi.Mirror.V1.TestHelper do
defmacro __using__(opts) do
quote do
use ExUnit.Case, unquote(opts)
import GoogleApi.Mirror.V1.TestHelper
end
end
def for_scope(scopes) when is_list(scopes), do: for_scope(Enum.join(scopes, " "))
def for_scope(scope) do
{:ok, ... | 20.210526 | 83 | 0.695313 |
9e42d75036356aa4e170642ebe6c2461e172bfa2 | 355 | exs | Elixir | config/test.exs | suranyami/eliximote | 62d01bd6419de8289c77a32b3341605e27c1364a | [
"MIT"
] | 2 | 2017-02-20T19:20:16.000Z | 2017-03-31T09:06:34.000Z | config/test.exs | suranyami/eliximote | 62d01bd6419de8289c77a32b3341605e27c1364a | [
"MIT"
] | null | null | null | config/test.exs | suranyami/eliximote | 62d01bd6419de8289c77a32b3341605e27c1364a | [
"MIT"
] | null | null | null | use Mix.Config
config :phoenix, Eliximote.Router,
port: System.get_env("PORT") || 4001,
ssl: false,
code_reload: false,
cookies: true,
consider_all_requests_local: true,
session_key: "_eliximote_key",
session_secret: "O@0V3K(DI417J3!V+ZZM2ONZ*E19C125+5V13(Q$B51=FJKXG%UYZ)FBE%HWZM9O1(V3GTQSGIL"
config :p... | 22.1875 | 95 | 0.735211 |
9e42e898a70fe67f1a9e12c1601a0e61f09c3319 | 3,899 | ex | Elixir | lib/sanbase/metric/behaviour.ex | sitedata/sanbase2 | 8da5e44a343288fbc41b68668c6c80ae8547d557 | [
"MIT"
] | null | null | null | lib/sanbase/metric/behaviour.ex | sitedata/sanbase2 | 8da5e44a343288fbc41b68668c6c80ae8547d557 | [
"MIT"
] | 1 | 2021-07-24T16:26:03.000Z | 2021-07-24T16:26:03.000Z | lib/sanbase/metric/behaviour.ex | sitedata/sanbase2 | 8da5e44a343288fbc41b68668c6c80ae8547d557 | [
"MIT"
] | null | null | null | defmodule Sanbase.Metric.Behaviour do
@moduledoc ~s"""
Behaviour describing a metric fetcher
"""
@type slug :: String.t()
@type metric :: String.t()
@type interval :: String.t()
@type options :: Keyword.t()
@type available_data_types :: :timeseries | :histogram
@type direction :: :asc | :desc
@type... | 31.699187 | 89 | 0.564504 |
9e42ee29ca6f37a01a7d10d8e623bb65c1eba650 | 9,934 | ex | Elixir | lib/elixir/lib/module/locals_tracker.ex | elkinsd/elixir | 810965e193cb57b82363e7c0c97b719743b7964f | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/module/locals_tracker.ex | elkinsd/elixir | 810965e193cb57b82363e7c0c97b719743b7964f | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/module/locals_tracker.ex | elkinsd/elixir | 810965e193cb57b82363e7c0c97b719743b7964f | [
"Apache-2.0"
] | null | null | null | # This is an Elixir module responsible for tracking
# calls in order to extract Elixir modules' behaviour
# during compilation time.
#
# ## Implementation
#
# The implementation uses the digraph module to track
# all dependencies. The graph starts with one main vertex:
#
# * `:local` - points to local functions
#
# We ... | 27.518006 | 99 | 0.648983 |
9e42f196f80fad3f6940c1f0ade1a55e35278231 | 14,388 | ex | Elixir | deps/plug/lib/plug/static.ex | matin360/TaksoWebApp | 4dd8fef625ecc2364fe1d6e18e73c96c59d15349 | [
"MIT"
] | 1 | 2019-11-11T21:48:20.000Z | 2019-11-11T21:48:20.000Z | deps/plug/lib/plug/static.ex | matin360/TaksoWebApp | 4dd8fef625ecc2364fe1d6e18e73c96c59d15349 | [
"MIT"
] | 4 | 2021-03-04T13:00:52.000Z | 2021-03-12T12:42:09.000Z | deps/plug/lib/plug/static.ex | adrianomota/blog | ef3b2d2ed54f038368ead8234d76c18983caa75b | [
"MIT"
] | null | null | null | defmodule Plug.Static do
@moduledoc """
A plug for serving static assets.
It requires two options:
* `:at` - the request path to reach for static assets.
It must be a string.
* `:from` - the file system path to read static assets from.
It can be either: a string containing a file system pat... | 33.774648 | 112 | 0.650959 |
9e434f4352e058c06a64c37d8c623211fa1dacff | 6,964 | exs | Elixir | integration_test/cases/client_test.exs | lukebakken/db_connection | aa53f2d9c78aa6b5f6a9c0615459e97ec89f0c32 | [
"Apache-2.0"
] | 227 | 2016-06-16T13:56:02.000Z | 2022-03-09T23:03:58.000Z | integration_test/cases/client_test.exs | lukebakken/db_connection | aa53f2d9c78aa6b5f6a9c0615459e97ec89f0c32 | [
"Apache-2.0"
] | 198 | 2016-06-20T08:08:15.000Z | 2022-03-06T17:54:37.000Z | integration_test/cases/client_test.exs | lukebakken/db_connection | aa53f2d9c78aa6b5f6a9c0615459e97ec89f0c32 | [
"Apache-2.0"
] | 110 | 2016-06-20T03:50:39.000Z | 2022-03-03T20:53:01.000Z | defmodule ClientTest do
use ExUnit.Case, async: true
alias TestPool, as: P
alias TestAgent, as: A
alias TestQuery, as: Q
alias TestResult, as: R
test "reconnect when client exits" do
stack = [
{:ok, :state},
{:idle, :state},
:ok,
fn(opts) ->
send(opts[:parent], :reconne... | 25.602941 | 121 | 0.524986 |
9e434fc2df85514a7161cf8d81249a32c7385e8c | 2,011 | ex | Elixir | lib/sitemapper/index_generator.ex | kotsius/sitemapper | 67807a9c4d609a86feb7fd890f5ff48c7bb08223 | [
"MIT"
] | 23 | 2019-10-17T22:13:21.000Z | 2021-06-26T05:25:22.000Z | lib/sitemapper/index_generator.ex | kotsius/sitemapper | 67807a9c4d609a86feb7fd890f5ff48c7bb08223 | [
"MIT"
] | 5 | 2020-07-17T15:20:18.000Z | 2021-06-27T10:20:56.000Z | lib/sitemapper/index_generator.ex | kotsius/sitemapper | 67807a9c4d609a86feb7fd890f5ff48c7bb08223 | [
"MIT"
] | 6 | 2019-11-25T15:02:12.000Z | 2021-06-26T05:06:59.000Z | defmodule Sitemapper.IndexGenerator do
alias Sitemapper.{Encoder, File, SitemapReference}
@max_length 52_428_800
@max_count 50_000
@dec "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
@index_start "<sitemapindex xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.sitemaps.or... | 28.728571 | 266 | 0.641472 |
9e43534cdcbc0018fa844b0557479fe3af8b27cc | 371 | ex | Elixir | lib/nudge_api/matches/match.ex | feelja-tech/feelja-api | 03ce15430460cf2dac24a7740242c7e5ac5c5804 | [
"MIT"
] | null | null | null | lib/nudge_api/matches/match.ex | feelja-tech/feelja-api | 03ce15430460cf2dac24a7740242c7e5ac5c5804 | [
"MIT"
] | null | null | null | lib/nudge_api/matches/match.ex | feelja-tech/feelja-api | 03ce15430460cf2dac24a7740242c7e5ac5c5804 | [
"MIT"
] | null | null | null | defmodule NudgeApi.Matches.Match do
use Ecto.Schema
import Ecto.Changeset
schema "matches" do
field :finalized_at, :utc_datetime
has_many :user_matches, NudgeApi.Matches.UserMatch
timestamps(type: :utc_datetime)
end
@doc false
def changeset(match, attrs) do
match
|> cast(attrs, [:fin... | 18.55 | 54 | 0.703504 |
9e4354bdff351a8c0cf22f8bc1f48440460365d8 | 1,112 | ex | Elixir | lib/options_tracker_web/channels/user_socket.ex | mgwidmann/options_tracker | 5520f88a9a5873842a63a23d4bcc5da82a51feba | [
"MIT"
] | 12 | 2020-06-25T17:25:15.000Z | 2021-09-30T20:13:33.000Z | lib/options_tracker_web/channels/user_socket.ex | mgwidmann/options_tracker | 5520f88a9a5873842a63a23d4bcc5da82a51feba | [
"MIT"
] | 5 | 2020-08-05T03:12:31.000Z | 2021-07-15T04:59:03.000Z | lib/options_tracker_web/channels/user_socket.ex | mgwidmann/options_tracker | 5520f88a9a5873842a63a23d4bcc5da82a51feba | [
"MIT"
] | 2 | 2021-07-03T17:20:15.000Z | 2021-09-01T15:38:58.000Z | defmodule OptionsTrackerWeb.UserSocket do
use Phoenix.Socket
## Channels
# channel "room:*", OptionsTrackerWeb.RoomChannel
# Socket params are passed from the client and can
# be used to verify and authenticate a user. After
# verification, you can put default assigns into
# the socket that will be set ... | 30.888889 | 89 | 0.70054 |
9e43ace3d2c6cc5a31778d0fab3137bfa7a1d118 | 393 | ex | Elixir | lib/api/auth/errors.ex | ARKultur/naboo | ab26c2e82cdc485e23d428fbb1d4798f1fb1388b | [
"MIT"
] | 16 | 2021-12-14T12:25:59.000Z | 2021-12-16T21:56:27.000Z | lib/api/auth/errors.ex | ARKultur/naboo | ab26c2e82cdc485e23d428fbb1d4798f1fb1388b | [
"MIT"
] | 19 | 2021-12-06T08:35:30.000Z | 2022-03-23T18:20:46.000Z | lib/api/auth/errors.ex | ARKultur/naboo | ab26c2e82cdc485e23d428fbb1d4798f1fb1388b | [
"MIT"
] | null | null | null | defmodule NabooAPI.Auth.Errors do
@behaviour Guardian.Plug.ErrorHandler
import Plug.Conn
@impl Guardian.Plug.ErrorHandler
def auth_error(conn, {_type, _reason}, _opts) do
# Yes, this is ugly. No, I do not care. It works. Fuck you.
conn
|> put_resp_content_type("application/json")
|> send_resp... | 24.5625 | 64 | 0.679389 |
9e440ae08fe911ef918cda9a0d9d26cc720efff9 | 1,619 | ex | Elixir | apps/admin_panel/lib/admin_panel/controllers/page_controller.ex | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | 1 | 2018-12-07T06:21:21.000Z | 2018-12-07T06:21:21.000Z | apps/admin_panel/lib/admin_panel/controllers/page_controller.ex | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | null | null | null | apps/admin_panel/lib/admin_panel/controllers/page_controller.ex | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | null | null | null | defmodule AdminPanel.PageController do
use AdminPanel, :controller
import Ecto.Query
import EWalletDB.SoftDelete
alias EWalletDB.{APIKey, Repo}
alias Plug.Conn
@not_found_message """
The assets are not available. If you think this is incorrect,
please make sure that the front-end assets have been built... | 23.808824 | 83 | 0.649784 |
9e442f3dbd1732b462ebf2a1c89e82316421bf7f | 2,218 | ex | Elixir | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1p3beta1__annotate_video_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1p3beta1__annotate_video_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1p3beta1__annotate_video_response.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... | 35.774194 | 234 | 0.761497 |
9e443336fb83a2f92ebbaf142a0c9506cad485a6 | 8,585 | ex | Elixir | lib/mix/lib/mix/tasks/compile.erlang.ex | guilleiguaran/elixir | 952052869ff7af0e293d2a7160b1aebc68fc46be | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/tasks/compile.erlang.ex | guilleiguaran/elixir | 952052869ff7af0e293d2a7160b1aebc68fc46be | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/tasks/compile.erlang.ex | guilleiguaran/elixir | 952052869ff7af0e293d2a7160b1aebc68fc46be | [
"Apache-2.0"
] | null | null | null | defmodule Mix.Tasks.Compile.Erlang do
alias :epp, as: Epp
alias :digraph, as: Graph
alias :digraph_utils, as: GraphUtils
use Mix.Task
@hidden true
@shortdoc "Compile Erlang source files"
@recursive true
@manifest ".compile.erlang"
@moduledoc """
A task to compile Erlang source files.
When this... | 29.603448 | 89 | 0.64205 |
9e443fdc6259fb65c1de468b91992c8e13a9d254 | 1,246 | exs | Elixir | test/grizzly/zwave/commands/switch_multilevel_set_test.exs | jellybob/grizzly | 290bee04cb16acbb9dc996925f5c501697b7ac94 | [
"Apache-2.0"
] | null | null | null | test/grizzly/zwave/commands/switch_multilevel_set_test.exs | jellybob/grizzly | 290bee04cb16acbb9dc996925f5c501697b7ac94 | [
"Apache-2.0"
] | null | null | null | test/grizzly/zwave/commands/switch_multilevel_set_test.exs | jellybob/grizzly | 290bee04cb16acbb9dc996925f5c501697b7ac94 | [
"Apache-2.0"
] | null | null | null | defmodule Grizzly.ZWave.Commands.SwitchMultilevelSetTest do
use ExUnit.Case, async: true
alias Grizzly.ZWave.Commands.SwitchMultilevelSet
test "creates the command and validates params" do
params = [target_value: :off]
{:ok, _command} = SwitchMultilevelSet.new(params)
end
test "encodes v1 params co... | 32.789474 | 72 | 0.723917 |
9e44c564fa4f93f5ea5fe87078a335ee23421f69 | 17,954 | ex | Elixir | lib/mix/lib/mix.ex | skunkwerks/elixir | b498c3790e570e341f24ae8e7b73b0d45eae9279 | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix.ex | skunkwerks/elixir | b498c3790e570e341f24ae8e7b73b0d45eae9279 | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix.ex | skunkwerks/elixir | b498c3790e570e341f24ae8e7b73b0d45eae9279 | [
"Apache-2.0"
] | null | null | null | defmodule Mix do
@moduledoc ~S"""
Mix is a build tool that provides tasks for creating, compiling,
and testing Elixir projects, managing its dependencies, and more.
## Mix.Project
The foundation of Mix is a project. A project can be defined by using
`Mix.Project` in a module, usually placed in a file name... | 30.225589 | 148 | 0.665367 |
9e44ed0e6f5d582913903b750652bfece2aafbbb | 1,760 | ex | Elixir | lib/movement/mappers/operation.ex | charlesdemers/accent | eeea52feb30d16ada5023c05fef37c08c267eff0 | [
"BSD-3-Clause"
] | null | null | null | lib/movement/mappers/operation.ex | charlesdemers/accent | eeea52feb30d16ada5023c05fef37c08c267eff0 | [
"BSD-3-Clause"
] | null | null | null | lib/movement/mappers/operation.ex | charlesdemers/accent | eeea52feb30d16ada5023c05fef37c08c267eff0 | [
"BSD-3-Clause"
] | null | null | null | defmodule Movement.Mappers.Operation do
alias Accent.PreviousTranslation
@spec map(binary, map, map) :: Movement.Operation.t()
def map(action = "new", current_translation, suggested_translation) do
%Movement.Operation{
action: action,
text: suggested_translation.text,
key: suggested_transla... | 48.888889 | 100 | 0.769886 |
9e45160175c74225580e6a97e80863afb7df5fc9 | 1,026 | ex | Elixir | lib/exhort/sat/vars.ex | josejimenezjr0/exhort | 07c9b735d82a96d6437554f51229c38cf287b39f | [
"Apache-2.0"
] | null | null | null | lib/exhort/sat/vars.ex | josejimenezjr0/exhort | 07c9b735d82a96d6437554f51229c38cf287b39f | [
"Apache-2.0"
] | null | null | null | lib/exhort/sat/vars.ex | josejimenezjr0/exhort | 07c9b735d82a96d6437554f51229c38cf287b39f | [
"Apache-2.0"
] | null | null | null | defmodule Exhort.SAT.Vars do
@moduledoc """
Hold the defined varaibles and raise an error if an undefined variable is
referenced.
"""
alias __MODULE__
@type t :: %__MODULE__{}
defstruct list: [], map: %{}
@doc """
Add a variable, using the name in the struct for lookup.
Variables are kept in ord... | 25.02439 | 77 | 0.606238 |
9e451c8769f14b5a1e1de9699567145b79bf9ad6 | 1,818 | ex | Elixir | lib/forecastr/renderer/colours.ex | densefog/forecastr | 5b95b52ecd6a1324cac5e8616f693e929135a331 | [
"Apache-2.0"
] | 11 | 2018-03-26T07:09:17.000Z | 2020-01-12T21:52:03.000Z | lib/forecastr/renderer/colours.ex | densefog/forecastr | 5b95b52ecd6a1324cac5e8616f693e929135a331 | [
"Apache-2.0"
] | 3 | 2018-03-27T09:10:54.000Z | 2018-04-10T19:08:03.000Z | lib/forecastr/renderer/colours.ex | densefog/forecastr | 5b95b52ecd6a1324cac5e8616f693e929135a331 | [
"Apache-2.0"
] | 7 | 2018-03-26T07:09:20.000Z | 2021-03-06T14:43:44.000Z | defmodule Forecastr.Renderer.Colours do
@moduledoc """
Return the right colour sequence given an output_type such as (:ascii, :ansi, :png)
"""
alias IO.ANSI
def bright_yellow(:ascii), do: ""
def bright_yellow(:ansi) do
[ANSI.bright(), ANSI.yellow()]
end
def bright_yellow(:png) do
[~S(<span f... | 15.672414 | 85 | 0.582508 |
9e451ebaa9ab949b68011da388c75699376beeaa | 72,302 | ex | Elixir | lib/elixir/lib/enum.ex | gsphanikumar/elixir | 6ca225da4e016200a462888348ff1c3feb625b78 | [
"Apache-2.0"
] | 4 | 2015-12-22T02:46:39.000Z | 2016-04-26T06:11:09.000Z | lib/elixir/lib/enum.ex | alco/elixir | 4407170349aa12c58664cab2122374167e827f5e | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/enum.ex | alco/elixir | 4407170349aa12c58664cab2122374167e827f5e | [
"Apache-2.0"
] | null | null | null | defprotocol Enumerable do
@moduledoc """
Enumerable protocol used by `Enum` and `Stream` modules.
When you invoke a function in the `Enum` module, the first argument
is usually a collection that must implement this protocol.
For example, the expression:
Enum.map([1, 2, 3], &(&1 * 2))
invokes `Enume... | 25.730249 | 111 | 0.602971 |
9e4537e1193968c0455d2409aeafc3a554460e36 | 1,942 | exs | Elixir | rel/config.exs | thomasvolk/lighthouse | 566f4029a1ef1e5863e45b7f9b1b7afa914980ec | [
"Apache-2.0"
] | null | null | null | rel/config.exs | thomasvolk/lighthouse | 566f4029a1ef1e5863e45b7f9b1b7afa914980ec | [
"Apache-2.0"
] | null | null | null | rel/config.exs | thomasvolk/lighthouse | 566f4029a1ef1e5863e45b7f9b1b7afa914980ec | [
"Apache-2.0"
] | null | null | null | # Import all plugins from `rel/plugins`
# They can then be used by adding `plugin MyPlugin` to
# either an environment, or release definition, where
# `MyPlugin` is the name of the plugin module.
Path.join(["rel", "plugins", "*.exs"])
|> Path.wildcard()
|> Enum.map(&Code.eval_file(&1))
use Mix.Releases.Config,
# T... | 32.366667 | 81 | 0.731205 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.