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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b23092c6fea9c1105290341ae60deb02742d873a | 1,114 | exs | Elixir | test/absinthe/integration/execution/input_types/null/variable_to_variable_type_non_null_T_test.exs | TheRealReal/absinthe | 6eae5bc36283e58f42d032b8afd90de3ad64f97b | [
"MIT"
] | 4,101 | 2016-03-02T03:49:20.000Z | 2022-03-31T05:46:01.000Z | test/absinthe/integration/execution/input_types/null/variable_to_variable_type_non_null_T_test.exs | TheRealReal/absinthe | 6eae5bc36283e58f42d032b8afd90de3ad64f97b | [
"MIT"
] | 889 | 2016-03-02T16:06:59.000Z | 2022-03-31T20:24:12.000Z | test/absinthe/integration/execution/input_types/null/variable_to_variable_type_non_null_T_test.exs | TheRealReal/absinthe | 6eae5bc36283e58f42d032b8afd90de3ad64f97b | [
"MIT"
] | 564 | 2016-03-02T07:49:59.000Z | 2022-03-06T14:40:59.000Z | defmodule Elixir.Absinthe.Integration.Execution.InputTypes.Null.VariableToVariableTypeNonNull_TTest do
use Absinthe.Case, async: true
@query """
query ($mult: Int!) {
times(base: 4, multiplier: $mult)
}
"""
test "scenario #1" do
assert {:ok,
%{
errors: [
%... | 28.564103 | 102 | 0.492819 |
b230b08cf23c8624fd9acad19410b6386d7f5ef3 | 300 | ex | Elixir | lib/open_hours/common.ex | hopsor/open_hours | 19b8736e4d8401c0eb2e4270e27bf0b1e30b3133 | [
"MIT"
] | 37 | 2019-07-08T17:31:26.000Z | 2022-01-15T04:49:05.000Z | lib/open_hours/common.ex | hopsor/open_hours | 19b8736e4d8401c0eb2e4270e27bf0b1e30b3133 | [
"MIT"
] | 1 | 2019-07-11T10:03:43.000Z | 2019-07-16T18:50:46.000Z | lib/open_hours/common.ex | hopsor/open_hours | 19b8736e4d8401c0eb2e4270e27bf0b1e30b3133 | [
"MIT"
] | 1 | 2020-02-05T09:17:38.000Z | 2020-02-05T09:17:38.000Z | defmodule OpenHours.Common do
def weekday(at) do
at
|> Date.day_of_week()
|> day_index_to_atom()
end
def day_index_to_atom(index) do
case index do
1 -> :mon
2 -> :tue
3 -> :wed
4 -> :thu
5 -> :fri
6 -> :sat
7 -> :sun
end
end
end
| 15 | 33 | 0.506667 |
b230cc8995fba4be54c11ab2ce87ce954f33f153 | 790 | ex | Elixir | lib/plumbapius/coverage/coverage_tracker.ex | Amuhar/plumbapius | a9066512f520f2ad97e677b04d70cc62695f2def | [
"Apache-2.0"
] | 10 | 2020-08-25T07:52:23.000Z | 2020-12-06T12:44:44.000Z | lib/plumbapius/coverage/coverage_tracker.ex | Amuhar/plumbapius | a9066512f520f2ad97e677b04d70cc62695f2def | [
"Apache-2.0"
] | 3 | 2020-10-13T11:49:32.000Z | 2021-05-28T08:34:41.000Z | lib/plumbapius/coverage/coverage_tracker.ex | Amuhar/plumbapius | a9066512f520f2ad97e677b04d70cc62695f2def | [
"Apache-2.0"
] | 2 | 2020-09-03T14:29:00.000Z | 2021-05-26T11:07:37.000Z | defmodule Plumbapius.Coverage.CoverageTracker do
alias Plumbapius.Request
alias Plumbapius.Response
@type t :: module()
@type interaction :: {Request.Schema.t(), Response.Schema.t()}
defmodule CoveredCase do
alias Plumbapius.Coverage.CoverageTracker
defstruct interaction: nil,
req_bod... | 27.241379 | 85 | 0.643038 |
b230d0fdeea5c0210baba3261e93cab56fdb8579 | 3,017 | ex | Elixir | lib/oli_web/controllers/api/payment_controller.ex | chrislawson/oli-torus | 94165b211ab74fac3e7c8a14110a394fa9a6f320 | [
"MIT"
] | 45 | 2020-04-17T15:40:27.000Z | 2022-03-25T00:13:30.000Z | lib/oli_web/controllers/api/payment_controller.ex | chrislawson/oli-torus | 94165b211ab74fac3e7c8a14110a394fa9a6f320 | [
"MIT"
] | 944 | 2020-02-13T02:37:01.000Z | 2022-03-31T17:50:07.000Z | lib/oli_web/controllers/api/payment_controller.ex | chrislawson/oli-torus | 94165b211ab74fac3e7c8a14110a394fa9a6f320 | [
"MIT"
] | 23 | 2020-07-28T03:36:13.000Z | 2022-03-17T14:29:02.000Z | defmodule OliWeb.Api.PaymentController do
@moduledoc """
Endpoint for payment code bulk request.
"""
alias OpenApiSpex.Schema
alias Oli.Delivery.Paywall
alias Oli.Delivery.Paywall.Payment
import OliWeb.Api.Helpers
use OliWeb, :controller
use OpenApiSpex.Controller
@moduledoc tags: ["Paywall Inte... | 27.427273 | 86 | 0.605237 |
b230e6c0bd165761af230a85ba51efef614e4ec0 | 526 | ex | Elixir | lib/cldr/format/datetime_timezone.ex | fertapric/cldr_dates_times | d1eff81c7a6e4d84484646465650d26d5dfc51db | [
"Apache-2.0"
] | 36 | 2019-07-26T18:08:04.000Z | 2022-03-08T00:37:49.000Z | lib/cldr/format/datetime_timezone.ex | fertapric/cldr_dates_times | d1eff81c7a6e4d84484646465650d26d5dfc51db | [
"Apache-2.0"
] | 20 | 2019-06-12T07:44:57.000Z | 2022-03-02T15:31:52.000Z | lib/cldr/format/datetime_timezone.ex | fertapric/cldr_dates_times | d1eff81c7a6e4d84484646465650d26d5dfc51db | [
"Apache-2.0"
] | 4 | 2020-05-29T08:42:08.000Z | 2022-03-01T15:40:24.000Z | defmodule Cldr.DateTime.Timezone do
@doc """
Converts the time zone offset of a `Time` or `DateTime` into
seconds.
"""
def time_from_zone_offset(%{utc_offset: utc_offset, std_offset: std_offset}) do
offset = utc_offset + std_offset
hours = div(offset, 3600)
minutes = div(offset - hours * 3600, 60... | 27.684211 | 81 | 0.690114 |
b23121e0708330fb95b03a2e8bbde214e05a57a9 | 7,246 | exs | Elixir | test/snooper_test.exs | ericentin/snooper | 1713e97db35ab0b11e7df8c2231c5d4d5c1a651d | [
"Apache-2.0"
] | null | null | null | test/snooper_test.exs | ericentin/snooper | 1713e97db35ab0b11e7df8c2231c5d4d5c1a651d | [
"Apache-2.0"
] | null | null | null | test/snooper_test.exs | ericentin/snooper | 1713e97db35ab0b11e7df8c2231c5d4d5c1a651d | [
"Apache-2.0"
] | null | null | null | defmodule SnooperTest do
use ExUnit.Case
doctest Snooper
import Snooper
import ExUnit.CaptureIO
defmodule SnooperTestModule2 do
snoop def a_pointless_but_long_function(my_other_string) do
some_string = "Hello World"
some_other_string = "Hello Joe"
a_long_string =
[some_string,... | 39.813187 | 216 | 0.528153 |
b231380b5b8c19104482847dfb89b89c7f3c331c | 1,433 | ex | Elixir | implementations/elixir/ockam/ockam_hub_node/lib/hub_node/metrics/telemetry_poller.ex | Mimozar/ockam | 5a6f99a4e0c669c36dfa1569d1c366fb83845917 | [
"Apache-2.0"
] | null | null | null | implementations/elixir/ockam/ockam_hub_node/lib/hub_node/metrics/telemetry_poller.ex | Mimozar/ockam | 5a6f99a4e0c669c36dfa1569d1c366fb83845917 | [
"Apache-2.0"
] | null | null | null | implementations/elixir/ockam/ockam_hub_node/lib/hub_node/metrics/telemetry_poller.ex | Mimozar/ockam | 5a6f99a4e0c669c36dfa1569d1c366fb83845917 | [
"Apache-2.0"
] | null | null | null | defmodule Ockam.HubNode.Metrics.TelemetryPoller do
@moduledoc """
Telemetry poller callbacks to collect information about workers and transports
"""
## TODO: maybe move this to `ockam` app?
alias Ockam.Telemetry
def dispatch_worker_count() do
Enum.map(workers_by_type(), fn {type, workers} ->
ty... | 25.140351 | 95 | 0.628751 |
b2319a0ee07ca4d65d4eb0886384559095380b06 | 1,731 | ex | Elixir | lib/jukee/tracks/tracks.ex | samuelbriole/Jukee | 1f0dd7616d63d742fac17daabaf50b406d9dbede | [
"MIT"
] | 3 | 2018-05-17T17:43:06.000Z | 2018-06-09T02:12:25.000Z | lib/jukee/tracks/tracks.ex | samuelbriole/Jukee | 1f0dd7616d63d742fac17daabaf50b406d9dbede | [
"MIT"
] | 2 | 2018-06-04T15:51:36.000Z | 2018-06-20T11:31:23.000Z | lib/jukee/tracks/tracks.ex | samuelbriole/jukee | 1f0dd7616d63d742fac17daabaf50b406d9dbede | [
"MIT"
] | null | null | null | defmodule Jukee.Tracks do
@moduledoc """
The Tracks context.
"""
import Ecto.Query, warn: false
alias Jukee.Repo
alias Jukee.Tracks.Track
@doc """
Returns the list of tracks.
## Examples
iex> list_tracks()
[%Track{}, ...]
"""
def list_tracks do
Repo.all(Track)
end
@doc "... | 16.805825 | 93 | 0.590988 |
b231ad530fc35de95f14b896ebc4a4d88833bde7 | 5,232 | ex | Elixir | lib/shippex/package.ex | whitepaperclip/shippex | f7983cac65da495bd7b335e2dfffe2d959269d70 | [
"MIT"
] | 11 | 2017-01-16T10:53:56.000Z | 2021-06-05T14:51:17.000Z | lib/shippex/package.ex | whitepaperclip/shippex | f7983cac65da495bd7b335e2dfffe2d959269d70 | [
"MIT"
] | 4 | 2017-06-17T16:03:56.000Z | 2020-12-31T18:04:21.000Z | lib/shippex/package.ex | whitepaperclip/shippex | f7983cac65da495bd7b335e2dfffe2d959269d70 | [
"MIT"
] | 5 | 2018-01-30T21:57:56.000Z | 2021-01-31T02:09:29.000Z | defmodule Shippex.Package do
@moduledoc """
Defines the struct for storing a `Package`, which is then passed along with
an origin and destination address for shipping estimates. A `description` is
optional, as it may or may not be used with various carriers.
For USPS, a package has a `container` string which... | 30.242775 | 100 | 0.563073 |
b231bcb6c5f5bb7660c19771a486137a8852da1f | 1,145 | ex | Elixir | lib/codes/codes_a43.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_a43.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_a43.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | defmodule IcdCode.ICDCode.Codes_A43 do
alias IcdCode.ICDCode
def _A430 do
%ICDCode{full_code: "A430",
category_code: "A43",
short_code: "0",
full_name: "Pulmonary nocardiosis",
short_name: "Pulmonary nocardiosis",
category_name: "Pulmonary nocardiosis"
... | 26.627907 | 53 | 0.593013 |
b231e97e3075c6b2df1b0e428b769632e689b17d | 18,347 | exs | Elixir | test/phoenix/router/helpers_test.exs | manukall/phoenix | 5ce19ebb63b1b31e37da5fe6465edb6c4850772e | [
"MIT"
] | 1 | 2019-06-11T20:22:21.000Z | 2019-06-11T20:22:21.000Z | test/phoenix/router/helpers_test.exs | DavidAlphaFox/phoenix | 560131ab3b48c6b6cf864a3d20b7667e40990237 | [
"MIT"
] | null | null | null | test/phoenix/router/helpers_test.exs | DavidAlphaFox/phoenix | 560131ab3b48c6b6cf864a3d20b7667e40990237 | [
"MIT"
] | null | null | null | defmodule Phoenix.Router.HelpersTest do
use ExUnit.Case, async: true
use RouterHelper
alias Phoenix.Router.Helpers
## Unit tests
test "defhelper with :identifiers" do
route = build(:match, :get, "/foo/:bar", nil, Hello, :world, "hello_world")
assert extract_defhelper(route, 0) == String.strip """
... | 42.568445 | 129 | 0.659835 |
b2321a8464dbd0c5cacc2fd7bc90aeb35e2595be | 176 | ex | Elixir | lib/hologram/compiler/call_graph_builder/binary_type.ex | gregjohnsonsaltaire/hologram | aa8e9ea0d599def864c263cc37cc8ee31f02ac4a | [
"MIT"
] | 40 | 2022-01-19T20:27:36.000Z | 2022-03-31T18:17:41.000Z | lib/hologram/compiler/call_graph_builder/binary_type.ex | gregjohnsonsaltaire/hologram | aa8e9ea0d599def864c263cc37cc8ee31f02ac4a | [
"MIT"
] | 42 | 2022-02-03T22:52:43.000Z | 2022-03-26T20:57:32.000Z | lib/hologram/compiler/call_graph_builder/binary_type.ex | gregjohnsonsaltaire/hologram | aa8e9ea0d599def864c263cc37cc8ee31f02ac4a | [
"MIT"
] | 3 | 2022-02-10T04:00:37.000Z | 2022-03-08T22:07:45.000Z | # TODO: test
alias Hologram.Compiler.CallGraphBuilder
alias Hologram.Compiler.IR.BinaryType
defimpl CallGraphBuilder, for: BinaryType do
def build(_, _, _, _), do: nil
end
| 19.555556 | 44 | 0.772727 |
b23228849f10b3c727db25f13ec7f3d2c2ab7cb6 | 1,694 | exs | Elixir | onboarding/service/config/dev.exs | FoxComm/highlander | 1aaf8f9e5353b94c34d574c2a92206a1c363b5be | [
"MIT"
] | 10 | 2018-04-12T22:29:52.000Z | 2021-10-18T17:07:45.000Z | onboarding/service/config/dev.exs | FoxComm/highlander | 1aaf8f9e5353b94c34d574c2a92206a1c363b5be | [
"MIT"
] | null | null | null | onboarding/service/config/dev.exs | FoxComm/highlander | 1aaf8f9e5353b94c34d574c2a92206a1c363b5be | [
"MIT"
] | 1 | 2018-07-06T18:42:05.000Z | 2018-07-06T18:42:05.000Z | use Mix.Config
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with brunch.io to recompile .js and .css sources.
config :onboarding_service, OnboardingService.Endpoint,... | 32.576923 | 68 | 0.746163 |
b232a41667af78a5a1e68ce47703d23759f7ef61 | 80 | exs | Elixir | config/dialyzer_ignore.exs | icexuick/teiserver | 22f2e255e7e21f977e6b262acf439803626a506c | [
"MIT"
] | 6 | 2021-02-08T10:42:53.000Z | 2021-04-25T12:12:03.000Z | config/dialyzer_ignore.exs | icexuick/teiserver | 22f2e255e7e21f977e6b262acf439803626a506c | [
"MIT"
] | 14 | 2021-08-01T02:36:14.000Z | 2022-01-30T21:15:03.000Z | config/dialyzer_ignore.exs | icexuick/teiserver | 22f2e255e7e21f977e6b262acf439803626a506c | [
"MIT"
] | 7 | 2021-05-13T12:55:28.000Z | 2022-01-14T06:39:06.000Z | [
~r/The function call [a-z_]+ will not succeed/,
~r/has no local return/
]
| 16 | 49 | 0.625 |
b232d1085dcad7336b9351beb40a5fc173a6ef02 | 1,498 | ex | Elixir | 2021/13/13b.ex | cybrox/adventofcode | 974b1265f84e7769385adcc4883ea4bec3dd0482 | [
"MIT"
] | null | null | null | 2021/13/13b.ex | cybrox/adventofcode | 974b1265f84e7769385adcc4883ea4bec3dd0482 | [
"MIT"
] | null | null | null | 2021/13/13b.ex | cybrox/adventofcode | 974b1265f84e7769385adcc4883ea4bec3dd0482 | [
"MIT"
] | null | null | null | [input_points, input_rules] =
"./13.input.txt"
|> File.read!()
|> String.trim()
|> String.split("\n\n", trim: true)
points =
input_points
|> String.split("\n")
|> Enum.map(fn line ->
[x, y] = String.split(line, ",")
{String.to_integer(x), String.to_integer(y)}
end)
rules =
input_rules
|> S... | 28.264151 | 74 | 0.593458 |
b232eb275360680a34edc1eeb8f772ed8556bc75 | 458 | exs | Elixir | test/mojito/pool/manager_test.exs | amberbit/mojito | e4d1aefae722991f5b92f4df9fa8aa693777a674 | [
"MIT"
] | null | null | null | test/mojito/pool/manager_test.exs | amberbit/mojito | e4d1aefae722991f5b92f4df9fa8aa693777a674 | [
"MIT"
] | null | null | null | test/mojito/pool/manager_test.exs | amberbit/mojito | e4d1aefae722991f5b92f4df9fa8aa693777a674 | [
"MIT"
] | null | null | null | defmodule Mojito.Pool.ManagerTest do
use ExSpec, async: true
context "calls" do
it "implements get_pools" do
assert(
[] =
GenServer.call(Mojito.Pool.Manager, {:get_pools, {"example.com", 80}})
)
end
it "implements get_pool_states" do
assert(
[] =
G... | 19.913043 | 80 | 0.541485 |
b23344e59a278c20b54a4b9f2c6bc21a1bd51fe0 | 1,527 | ex | Elixir | lib/docusign/model/workspace_user.ex | gaslight/docusign_elixir | d9d88d53dd85d32a39d537bade9db28d779414e6 | [
"MIT"
] | 4 | 2020-12-21T12:50:13.000Z | 2022-01-12T16:50:43.000Z | lib/docusign/model/workspace_user.ex | gaslight/docusign_elixir | d9d88d53dd85d32a39d537bade9db28d779414e6 | [
"MIT"
] | 12 | 2018-09-18T15:26:34.000Z | 2019-09-28T15:29:39.000Z | lib/docusign/model/workspace_user.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.WorkspaceUser do
@moduledoc """
A workspaceUser representing the user. This property is only returned in response to user speci... | 26.327586 | 111 | 0.605763 |
b23350453ed9d4f49aabca37eead1fa2663ffdf6 | 3,339 | ex | Elixir | lib/exsolr/more_like_this.ex | heyorbit/exsolr | 88ebd29e17709ea3878cb78d0f228f745877fc29 | [
"MIT"
] | null | null | null | lib/exsolr/more_like_this.ex | heyorbit/exsolr | 88ebd29e17709ea3878cb78d0f228f745877fc29 | [
"MIT"
] | null | null | null | lib/exsolr/more_like_this.ex | heyorbit/exsolr | 88ebd29e17709ea3878cb78d0f228f745877fc29 | [
"MIT"
] | null | null | null | defmodule Exsolr.MoreLikeThis do
@moduledoc """
Provides search functions to Solr
"""
require Logger
alias Exsolr.Config
alias Exsolr.HttpResponse
def more_like_this do
more_like_this(default_parameters())
end
@doc """
Receives the query params, converts them to an url, queries Solr and buil... | 24.372263 | 99 | 0.631626 |
b2335bd81253d8d43ec815e313cc9568f957f0e6 | 3,074 | ex | Elixir | lib/bubble_match/unidekode.ex | botsquad/bubble-expr | 93efb4376302426fa7d81b2ca8de67662a50599f | [
"MIT"
] | 20 | 2020-05-20T14:27:56.000Z | 2022-01-15T18:43:34.000Z | lib/bubble_match/unidekode.ex | botsquad/bubble-match | c90325fb7ffdcd0b96ae0fd8f8aa0b3ebbe3ea0e | [
"MIT"
] | 3 | 2020-05-22T18:50:34.000Z | 2020-06-23T14:58:04.000Z | lib/bubble_match/unidekode.ex | botsquad/bubble-expr | 93efb4376302426fa7d81b2ca8de67662a50599f | [
"MIT"
] | 1 | 2021-05-19T09:06:54.000Z | 2021-05-19T09:06:54.000Z | defmodule BubbleMatch.Unidekode do
@moduledoc """
Documentation for Unidekode.
"""
@doc """
Transliterate Unicode characters to US-ASCII.
## Examples
iex> BubbleMatch.Unidekode.to_ascii("código")
"codigo"
iex> BubbleMatch.Unidekode.to_ascii("código😀")
"codigo"
iex> Bubble... | 26.273504 | 122 | 0.517567 |
b2336968b0f8d468c106d7b8a7b7df6ba15f1c27 | 3,220 | ex | Elixir | clients/language/lib/google_api/language/v1/model/annotate_text_response.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | null | null | null | clients/language/lib/google_api/language/v1/model/annotate_text_response.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | null | null | null | clients/language/lib/google_api/language/v1/model/annotate_text_response.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... | 51.111111 | 240 | 0.754037 |
b2338c16d10cea04cfdf036df8623433718b351f | 578 | exs | Elixir | dictionary/mix.exs | johncoleman83/elixir-for-programmers | 062d0a761e59b30909377694151655c946f48bb4 | [
"MIT"
] | null | null | null | dictionary/mix.exs | johncoleman83/elixir-for-programmers | 062d0a761e59b30909377694151655c946f48bb4 | [
"MIT"
] | null | null | null | dictionary/mix.exs | johncoleman83/elixir-for-programmers | 062d0a761e59b30909377694151655c946f48bb4 | [
"MIT"
] | null | null | null | defmodule Dictionary.MixProject do
use Mix.Project
def project do
[
app: :dictionary,
version: "0.1.1",
elixir: "~> 1.6",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
ext... | 19.931034 | 88 | 0.579585 |
b233d3de6605ecdb1f5b203728826e5aadff4907 | 537 | ex | Elixir | config/dispatcher.ex | erikap/apiai-smart-home-demo | 88a10329f78f438949cb8907a78bc8190395a141 | [
"MIT"
] | 1 | 2017-07-21T20:16:54.000Z | 2017-07-21T20:16:54.000Z | config/dispatcher.ex | erikap/apiai-smart-home-demo | 88a10329f78f438949cb8907a78bc8190395a141 | [
"MIT"
] | null | null | null | config/dispatcher.ex | erikap/apiai-smart-home-demo | 88a10329f78f438949cb8907a78bc8190395a141 | [
"MIT"
] | null | null | null | defmodule Dispatcher do
use Plug.Router
def start(_argv) do
port = 80
IO.puts "Starting Plug with Cowboy on port #{port}"
Plug.Adapters.Cowboy.http __MODULE__, [], port: port
:timer.sleep(:infinity)
end
plug Plug.Logger
plug :match
plug :dispatch
match "/api/thermostats/*path" do
Pr... | 19.178571 | 60 | 0.659218 |
b233df61af8a74e4067d2c12a1e07d41ebf0ea3a | 1,351 | exs | Elixir | test/ezpdf/processor_test.exs | samullen/ezpdf | 1b0699e340a31a20f7b867e462d782c5f3c254d8 | [
"Unlicense"
] | null | null | null | test/ezpdf/processor_test.exs | samullen/ezpdf | 1b0699e340a31a20f7b867e462d782c5f3c254d8 | [
"Unlicense"
] | null | null | null | test/ezpdf/processor_test.exs | samullen/ezpdf | 1b0699e340a31a20f7b867e462d782c5f3c254d8 | [
"Unlicense"
] | null | null | null | defmodule ProcessorTest do
use ExUnit.Case
import ExUnit.CaptureIO
import EZPDF.Processor, only: [
process_markdown: 1,
process_pdf: 1,
output_pdf: 1
]
describe "process_markdown/1" do
test "it takes STDIN if no input file is provided" do
assert process_markdown(["./test/fixtures/files... | 28.744681 | 107 | 0.61436 |
b233e3f03751447569a0aaa5b801a7645fd94cc5 | 739 | ex | Elixir | lib/erlnote_web/router.ex | alchexmist/erlnote | e1f164e63616316e1d3869ebfae5ed2ae96c3ccd | [
"Apache-2.0"
] | null | null | null | lib/erlnote_web/router.ex | alchexmist/erlnote | e1f164e63616316e1d3869ebfae5ed2ae96c3ccd | [
"Apache-2.0"
] | 1 | 2019-11-02T13:46:12.000Z | 2019-11-02T13:46:12.000Z | lib/erlnote_web/router.ex | alchexmist/erlnote | e1f164e63616316e1d3869ebfae5ed2ae96c3ccd | [
"Apache-2.0"
] | null | null | null | defmodule ErlnoteWeb.Router do
use ErlnoteWeb, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
end
pipeline :api do
plug :accepts, ["json"]
plug ErlnoteWeb.Context
end
scope ... | 21.114286 | 105 | 0.679296 |
b233ff0c78df3881fcb4e8268c9f2d52534be20e | 1,284 | exs | Elixir | mix.exs | hassox/config_values | 66bb5470984cc13f149a57b5a7cb5956043c13eb | [
"MIT"
] | 4 | 2016-03-20T22:08:49.000Z | 2016-12-17T21:03:38.000Z | mix.exs | hassox/config_values | 66bb5470984cc13f149a57b5a7cb5956043c13eb | [
"MIT"
] | null | null | null | mix.exs | hassox/config_values | 66bb5470984cc13f149a57b5a7cb5956043c13eb | [
"MIT"
] | 1 | 2016-12-17T21:05:42.000Z | 2016-12-17T21:05:42.000Z | defmodule ConfigValues.Mixfile do
use Mix.Project
@version "1.0.0"
@maintainers [
"Daniel Neighman",
]
@url "https://github.com/hassox/config_values"
def project do
[app: :config_values,
version: @version,
elixir: "~> 1.2",
description: "Interpolated configuration values",
sour... | 20.709677 | 77 | 0.577882 |
b234049a63c23fbeffb92ac71306807b5aa9552f | 15,563 | ex | Elixir | lib/oauth2/client.ex | nakatamixi/oauth2 | f2035911792db95fbc737a7fd8e6890a93a7d2d5 | [
"MIT"
] | null | null | null | lib/oauth2/client.ex | nakatamixi/oauth2 | f2035911792db95fbc737a7fd8e6890a93a7d2d5 | [
"MIT"
] | 2 | 2018-09-07T04:52:56.000Z | 2018-09-07T04:53:07.000Z | lib/oauth2/client.ex | nakatamixi/oauth2 | f2035911792db95fbc737a7fd8e6890a93a7d2d5 | [
"MIT"
] | null | null | null | defmodule OAuth2.Client do
@moduledoc ~S"""
This module defines the `OAuth2.Client` struct and is responsible for building
and establishing a request for an access token.
### Notes
* If a full url is given (e.g. "http://www.example.com/api/resource") then it
will use that otherwise you can specify an endp... | 36.791962 | 115 | 0.631691 |
b2340ac9e6eb0ec7a656b6322718f68376392a5e | 1,072 | exs | Elixir | test/grizzly/packet/header_extension/binary_parser_test.exs | pragdave/grizzly | bcd7b46ab2cff1797dac04bc3cd12a36209dd579 | [
"Apache-2.0"
] | null | null | null | test/grizzly/packet/header_extension/binary_parser_test.exs | pragdave/grizzly | bcd7b46ab2cff1797dac04bc3cd12a36209dd579 | [
"Apache-2.0"
] | null | null | null | test/grizzly/packet/header_extension/binary_parser_test.exs | pragdave/grizzly | bcd7b46ab2cff1797dac04bc3cd12a36209dd579 | [
"Apache-2.0"
] | null | null | null | defmodule Grizzly.Packet.HeaderExtension.BinaryParser.Test do
use ExUnit.Case, async: true
alias Grizzly.Packet.HeaderExtension.BinaryParser
test "create with a binary" do
binary_parser = BinaryParser.from_binary(<<0x02, 0x03>>)
assert <<0x02, 0x03>> == BinaryParser.to_binary(binary_parser)
end
te... | 26.146341 | 66 | 0.647388 |
b23412ee599577385e75102c80958b704e60956c | 846 | ex | Elixir | day04/puzzle2.ex | mikehelmick/AdventOfCode2019 | 9981b85b25eb9f04351ce5657ff07fd067ce1231 | [
"Apache-2.0"
] | null | null | null | day04/puzzle2.ex | mikehelmick/AdventOfCode2019 | 9981b85b25eb9f04351ce5657ff07fd067ce1231 | [
"Apache-2.0"
] | null | null | null | day04/puzzle2.ex | mikehelmick/AdventOfCode2019 | 9981b85b25eb9f04351ce5657ff07fd067ce1231 | [
"Apache-2.0"
] | null | null | null | defmodule Puzzle do
def ascending([a,b,c,d,e,f]) when b >= a and c >= b and d >= c and e >= d and f >= e, do: true
def ascending(_), do: false
def short_pair([a,a,b,_,_,_]) when a != b, do: true
def short_pair([a,b,b,c,_,_]) when a != b and b != c, do: true
def short_pair([_,a,b,b,c,_]) when a != b and b !=... | 32.538462 | 96 | 0.580378 |
b2341ca4200cb25de975961c713e06cea3d5672c | 1,543 | ex | Elixir | lib/advent_of_code/day_02.ex | MarcusCemes/advent-of-code-2021 | 703aff2701be89031631342a094ae6976e7d3c1b | [
"MIT"
] | 1 | 2021-12-19T04:13:00.000Z | 2021-12-19T04:13:00.000Z | lib/advent_of_code/day_02.ex | MarcusCemes/advent-of-code-2021 | 703aff2701be89031631342a094ae6976e7d3c1b | [
"MIT"
] | null | null | null | lib/advent_of_code/day_02.ex | MarcusCemes/advent-of-code-2021 | 703aff2701be89031631342a094ae6976e7d3c1b | [
"MIT"
] | 1 | 2021-12-15T19:15:20.000Z | 2021-12-15T19:15:20.000Z | defmodule AdventOfCode.Day02 do
import AdventOfCode.Utils
@type simple_state :: {integer(), integer()}
@type advanced_state :: {integer(), integer(), integer()}
@spec part1([binary()]) :: integer()
def part1(args) do
parse_args(args)
|> Enum.reduce({0, 0}, &simple_reducer/2)
|> Kernel.then(fn {a... | 32.145833 | 87 | 0.63059 |
b234535ef4c665e82a1b0dcae64532b728293d43 | 1,682 | ex | Elixir | lib/google_apis/api_config.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | null | null | null | lib/google_apis/api_config.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | null | null | null | lib/google_apis/api_config.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | 1 | 2018-07-28T20:50:50.000Z | 2018-07-28T20:50:50.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 27.129032 | 83 | 0.692033 |
b23457fbc7117b45c1225ef1bac11a3262fe79f2 | 3,448 | ex | Elixir | lib/vapor/configuration.ex | cheerfulstoic/vapor | 326a9e8fe0bba706b9726e136b4a51726f9d99f7 | [
"Apache-2.0"
] | null | null | null | lib/vapor/configuration.ex | cheerfulstoic/vapor | 326a9e8fe0bba706b9726e136b4a51726f9d99f7 | [
"Apache-2.0"
] | null | null | null | lib/vapor/configuration.ex | cheerfulstoic/vapor | 326a9e8fe0bba706b9726e136b4a51726f9d99f7 | [
"Apache-2.0"
] | null | null | null | defmodule Vapor.Configuration do
@moduledoc false
# Manages a layered set of configuration values.
# Not meant to be consumed by the end user
import Norm
defstruct [
layers: %{overrides: %{}},
translations: []
]
def s do
schema(%__MODULE__{
layers: map_of(one_of([spec(is_atom()), spec(... | 29.724138 | 84 | 0.649072 |
b234a9a314d6f401407c63401a159f1884e3e51c | 965 | exs | Elixir | test/acceptance/w3c-test-suites/construct_test.exs | pukkamustard/sparql-ex | 4f8907ddbd15215c9b6c40edac19362c92e34d91 | [
"MIT"
] | 23 | 2018-09-25T21:09:35.000Z | 2020-05-14T16:28:22.000Z | test/acceptance/w3c-test-suites/construct_test.exs | pukkamustard/sparql-ex | 4f8907ddbd15215c9b6c40edac19362c92e34d91 | [
"MIT"
] | 2 | 2018-06-01T20:47:48.000Z | 2019-03-05T23:20:34.000Z | test/acceptance/w3c-test-suites/construct_test.exs | pukkamustard/sparql-ex | 4f8907ddbd15215c9b6c40edac19362c92e34d91 | [
"MIT"
] | 2 | 2019-12-13T19:20:54.000Z | 2019-12-20T08:23:21.000Z | defmodule SPARQL.W3C.TestSuite.ConstructTest do
@moduledoc """
The W3C SPARQL 1.0 cast test cases for CONSTRUCT.
<https://www.w3.org/2001/sw/DataAccess/tests/data-r2/construct/>
"""
use SPARQL.W3C.TestSuite.Case, async: false
@test_suite {"1.0", "construct"}
@manifest_graph TestSuite.manifest_graph(@te... | 35.740741 | 132 | 0.684974 |
b234de4ed2881a7bed87728abd08dffaddfb22c4 | 7,037 | exs | Elixir | test/phoenix_live_view/test/dom_test.exs | feliperenan/phoenix_live_view | af65bb51fe12ea88e7c66808d2b1118e1c491ddd | [
"MIT"
] | 4,659 | 2019-03-14T20:22:43.000Z | 2022-03-31T20:13:30.000Z | test/phoenix_live_view/test/dom_test.exs | feliperenan/phoenix_live_view | af65bb51fe12ea88e7c66808d2b1118e1c491ddd | [
"MIT"
] | 1,745 | 2019-03-14T22:04:38.000Z | 2022-03-31T17:26:25.000Z | test/phoenix_live_view/test/dom_test.exs | feliperenan/phoenix_live_view | af65bb51fe12ea88e7c66808d2b1118e1c491ddd | [
"MIT"
] | 744 | 2019-03-14T20:48:05.000Z | 2022-03-25T14:35:04.000Z | defmodule Phoenix.LiveViewTest.DOMTest do
use ExUnit.Case, async: true
alias Phoenix.LiveViewTest.DOM
describe "find_live_views" do
# >= 4432 characters
@too_big_session Enum.map(1..4432, fn _ -> "t" end) |> Enum.join()
test "finds views given html" do
assert DOM.find_live_views(
... | 29.443515 | 97 | 0.461845 |
b234e67afa09ccf5caa765f1e09941e49e7fb198 | 387 | exs | Elixir | test/elixir_google_scraper_web/features/password_reset/view_password_reset_page_test.exs | junan/elixir_google_scraper | d032f3a9d5a30e354f1e6d607434670334936630 | [
"MIT"
] | null | null | null | test/elixir_google_scraper_web/features/password_reset/view_password_reset_page_test.exs | junan/elixir_google_scraper | d032f3a9d5a30e354f1e6d607434670334936630 | [
"MIT"
] | 25 | 2021-05-21T02:23:37.000Z | 2021-07-09T09:22:32.000Z | test/elixir_google_scraper_web/features/password_reset/view_password_reset_page_test.exs | junan/elixir_google_scraper | d032f3a9d5a30e354f1e6d607434670334936630 | [
"MIT"
] | null | null | null | defmodule ElixirGoogleScraperWeb.PasswordReset.ViewPasswordResetPageTest do
use ElixirGoogleScraperWeb.FeatureCase, async: true
@path Routes.user_settings_path(ElixirGoogleScraperWeb.Endpoint, :edit)
feature "views password reset page", %{session: session} do
session
|> login_with_user
|> visit(@pat... | 29.769231 | 75 | 0.767442 |
b2351fd69751cb593fcf7b9b8b669fe2c4a94119 | 193 | ex | Elixir | lib/ppc/subscription/payer_name.ex | somatoko/ppc | 464379c3e56132519a7fc53717071c07d06aca85 | [
"Apache-2.0"
] | null | null | null | lib/ppc/subscription/payer_name.ex | somatoko/ppc | 464379c3e56132519a7fc53717071c07d06aca85 | [
"Apache-2.0"
] | null | null | null | lib/ppc/subscription/payer_name.ex | somatoko/ppc | 464379c3e56132519a7fc53717071c07d06aca85 | [
"Apache-2.0"
] | null | null | null | defmodule Ppc.Subscription.PayerName do
defstruct [
:given_name,
:surname
]
@type t :: %__MODULE__{
given_name: String.t(),
surname: String.t()
}
end
| 16.083333 | 39 | 0.569948 |
b2353b0cfcc57fde97d10a91a4275619a1382a04 | 1,216 | exs | Elixir | test/generate_dockerfile_src_test.exs | kayodeosagbemi/elixir-runtime | 1746adf362444e3e0cc2daa5e461be24f1cb624a | [
"Apache-2.0"
] | 170 | 2017-08-25T06:40:14.000Z | 2022-01-10T22:18:51.000Z | test/generate_dockerfile_src_test.exs | kayodeosagbemi/elixir-runtime | 1746adf362444e3e0cc2daa5e461be24f1cb624a | [
"Apache-2.0"
] | 27 | 2017-09-07T05:57:37.000Z | 2022-03-22T13:40:47.000Z | test/generate_dockerfile_src_test.exs | kayodeosagbemi/elixir-runtime | 1746adf362444e3e0cc2daa5e461be24f1cb624a | [
"Apache-2.0"
] | 16 | 2017-11-14T01:45:00.000Z | 2021-10-09T03:26:39.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 38 | 74 | 0.70477 |
b23598d60bc20a0fc4b49866484445271bece13c | 42 | exs | Elixir | bubblit/test/bubblit_web/views/page_view_test.exs | pula39/BubbLit | 12f5bc010ab67fc13797f786d1cd0f10e23bf327 | [
"MIT"
] | null | null | null | bubblit/test/bubblit_web/views/page_view_test.exs | pula39/BubbLit | 12f5bc010ab67fc13797f786d1cd0f10e23bf327 | [
"MIT"
] | 84 | 2020-04-03T08:06:06.000Z | 2022-02-13T12:45:15.000Z | bubblit/test/bubblit_web/views/page_view_test.exs | pula39/BubbLit | 12f5bc010ab67fc13797f786d1cd0f10e23bf327 | [
"MIT"
] | 1 | 2020-09-25T12:59:02.000Z | 2020-09-25T12:59:02.000Z | defmodule BubblitWeb.PageViewTest do
end
| 10.5 | 36 | 0.857143 |
b2359f619491acad48f501f6f553dd9b44fba3a7 | 8,998 | ex | Elixir | clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_v2beta1_intent.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_v2beta1_intent.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_v2beta1_intent.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 62.055172 | 708 | 0.736275 |
b235a886839dacbd67d3570b2d8e4b6ba019658e | 1,816 | ex | Elixir | apps/legion/lib/messaging/templatization/templatization.ex | i386-64/legion | 41ae99af9be962d7fb38726ddf4bb0456edb5ca4 | [
"Apache-2.0"
] | 1 | 2021-01-04T11:06:12.000Z | 2021-01-04T11:06:12.000Z | apps/legion/lib/messaging/templatization/templatization.ex | i386-64/legion | 41ae99af9be962d7fb38726ddf4bb0456edb5ca4 | [
"Apache-2.0"
] | 3 | 2021-01-30T06:40:37.000Z | 2021-01-30T06:41:08.000Z | apps/legion/lib/messaging/templatization/templatization.ex | i386-64/legion | 41ae99af9be962d7fb38726ddf4bb0456edb5ca4 | [
"Apache-2.0"
] | null | null | null | defmodule Legion.Messaging.Templatization do
@moduledoc """
Functions for templatization of parametric messages.
A message can be parametrized using a supported templating language (i.e. *Liquid*).
Parameterized messages can be sent to multiple platform users, with variadic subjects and bodies.
Recipients of... | 37.833333 | 124 | 0.68337 |
b235ac906b2c73e7de486bd344578eb9479d5e4b | 556 | ex | Elixir | apps/dockup_ui/web/views/changeset_view.ex | rudydydy/dockup | 0d05d1ef65cc5523800bd852178361521cd3e7d8 | [
"MIT"
] | 1 | 2019-08-20T07:45:10.000Z | 2019-08-20T07:45:10.000Z | apps/dockup_ui/web/views/changeset_view.ex | rudydydy/dockup | 0d05d1ef65cc5523800bd852178361521cd3e7d8 | [
"MIT"
] | null | null | null | apps/dockup_ui/web/views/changeset_view.ex | rudydydy/dockup | 0d05d1ef65cc5523800bd852178361521cd3e7d8 | [
"MIT"
] | 2 | 2019-03-08T10:51:34.000Z | 2019-08-20T07:45:13.000Z | defmodule DockupUi.ChangesetView do
use DockupUi.Web, :view
@doc """
Traverses and translates changeset errors.
See `Ecto.Changeset.traverse_errors/2` and
`DockupUi.ErrorHelpers.translate_error/1` for more details.
"""
def translate_errors(changeset) do
Ecto.Changeset.traverse_errors(changeset, &tra... | 27.8 | 65 | 0.735612 |
b235c0df6f4c230be061eb3bc3186c12edc96cf7 | 718 | ex | Elixir | ears/lib/sensor/mock_hardware.ex | mashbytes/sentry | d4b13419694d0e30199af6ff0f8a2b68ef54fefa | [
"MIT"
] | null | null | null | ears/lib/sensor/mock_hardware.ex | mashbytes/sentry | d4b13419694d0e30199af6ff0f8a2b68ef54fefa | [
"MIT"
] | 2 | 2021-03-09T20:59:23.000Z | 2021-05-10T18:01:00.000Z | ears/lib/sensor/mock_hardware.ex | mashbytes/sentry | d4b13419694d0e30199af6ff0f8a2b68ef54fefa | [
"MIT"
] | null | null | null | defmodule Ears.Sensor.MockHardware do
use GenServer
require Logger
@pin 5
@high_signal 1
@name __MODULE__
def start_link(_) do
GenServer.start_link(@name, nil, name: @name)
end
def init(_) do
{:ok, pid} = Circuits.GPIO.open(@pin, :output)
schedule_signal()
{:ok, pid}
end
defp s... | 19.944444 | 68 | 0.651811 |
b235c3b1ec05aa6a61ce69c493a54a3eeb54a380 | 166,143 | ex | Elixir | lib/elixir/lib/kernel.ex | rauann/elixir | 5ef2f58e1a9d60ca9bc7b37813ed7da83123d79c | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/kernel.ex | rauann/elixir | 5ef2f58e1a9d60ca9bc7b37813ed7da83123d79c | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/kernel.ex | rauann/elixir | 5ef2f58e1a9d60ca9bc7b37813ed7da83123d79c | [
"Apache-2.0"
] | null | null | null | # Use elixir_bootstrap module to be able to bootstrap Kernel.
# The bootstrap module provides simpler implementations of the
# functions removed, simple enough to bootstrap.
import Kernel,
except: [@: 1, defmodule: 2, def: 1, def: 2, defp: 2, defmacro: 1, defmacro: 2, defmacrop: 2]
import :elixir_bootstrap
defmodul... | 27.072348 | 116 | 0.633111 |
b235f1c977b2629c4623a30bc9b72db879771e45 | 123 | ex | Elixir | debian/menu.ex | tarkhov/nginx-aliases | 3d562554d1da1da6d8e77ffd71a97d6825dce00f | [
"MIT"
] | null | null | null | debian/menu.ex | tarkhov/nginx-aliases | 3d562554d1da1da6d8e77ffd71a97d6825dce00f | [
"MIT"
] | 14 | 2020-02-10T10:18:55.000Z | 2021-11-01T15:29:34.000Z | debian/menu.ex | tarkhov/nxsite | 3d562554d1da1da6d8e77ffd71a97d6825dce00f | [
"MIT"
] | null | null | null | ?package(nxsite):needs="X11|text|vc|wm" section="Applications/see-menu-manual"\
title="nxsite" command="/usr/bin/nxsite"
| 41 | 79 | 0.739837 |
b235f26c5311936dad67009c6c50d33a2c9d45a4 | 1,371 | exs | Elixir | apps/discovery_api/test/unit/discovery_api_web/utilities/hmac_token_test.exs | msomji/smartcitiesdata | fc96abc1ef1306f7af6bd42bbcb4ed041a6d922c | [
"Apache-2.0"
] | 1 | 2021-04-05T19:17:18.000Z | 2021-04-05T19:17:18.000Z | apps/discovery_api/test/unit/discovery_api_web/utilities/hmac_token_test.exs | msomji/smartcitiesdata | fc96abc1ef1306f7af6bd42bbcb4ed041a6d922c | [
"Apache-2.0"
] | 11 | 2020-01-07T15:43:42.000Z | 2020-12-22T15:23:25.000Z | apps/discovery_api/test/unit/discovery_api_web/utilities/hmac_token_test.exs | SmartColumbusOS/smartcitiesdata | c8553d34631c822b034945eebf396994bf1001ff | [
"Apache-2.0"
] | null | null | null | defmodule DiscoveryApiWeb.Utilities.HmacTokenTest do
use ExUnit.Case
use Placebo
alias DiscoveryApiWeb.Utilities.HmacToken
@dataset_id "54e0ed3b-1acb-4220-9e9d-2fe542e51f16"
@expiration_timestamp_dec_31_2050 2_556_118_800
@expected_hmac_token "23817C59EDADF275664961DC4E5112D371D457D8CBDEB95DCB73BF0FCAFF3B4... | 40.323529 | 119 | 0.776076 |
b235f2c448753a4dbe15842b024cee66ce5db637 | 2,134 | ex | Elixir | lib/tiny_color/conversions/rgb.ex | lnr0626/tiny_color | 5fe53063832414dfa62632217d834b4a5815136f | [
"MIT"
] | null | null | null | lib/tiny_color/conversions/rgb.ex | lnr0626/tiny_color | 5fe53063832414dfa62632217d834b4a5815136f | [
"MIT"
] | null | null | null | lib/tiny_color/conversions/rgb.ex | lnr0626/tiny_color | 5fe53063832414dfa62632217d834b4a5815136f | [
"MIT"
] | null | null | null | defimpl TinyColor.Conversions, for: TinyColor.RGB do
def to_rgb(struct), do: struct
def to_hsl(color) do
{r, g, b, a} = TinyColor.RGB.percentages(color)
max = Enum.max([r, g, b])
min = Enum.min([r, g, b])
l = (max + min) / 2
if max == min do
TinyColor.HSL.new(0, 0, {l, :percent}, a)
... | 22.229167 | 83 | 0.447048 |
b23605ccfdd82a498ad793ef9be5111f8fdc2560 | 224 | ex | Elixir | programming/elixir/gm.ex | NomikOS/learning | 268f94605214f6861ef476ca7573e68c068ccbe5 | [
"Unlicense"
] | null | null | null | programming/elixir/gm.ex | NomikOS/learning | 268f94605214f6861ef476ca7573e68c068ccbe5 | [
"Unlicense"
] | null | null | null | programming/elixir/gm.ex | NomikOS/learning | 268f94605214f6861ef476ca7573e68c068ccbe5 | [
"Unlicense"
] | null | null | null | defmodule Gm do
def print(option) do
option
|> g
|> IO.puts()
end
defp g(opt) do
cond do
opt == 1 -> "Hello"
opt == 2 -> "Hello, World"
true -> "Hello planet Earth"
end
end
end
| 14 | 34 | 0.504464 |
b2363708f63e40633fb8b9e69f540f7e31a64e2f | 2,270 | ex | Elixir | lib/code_corps/messages/conversation_query.ex | fikape/code-corps-api | c21674b0b2a19fa26945c94268db8894420ca181 | [
"MIT"
] | 275 | 2015-06-23T00:20:51.000Z | 2021-08-19T16:17:37.000Z | lib/code_corps/messages/conversation_query.ex | fikape/code-corps-api | c21674b0b2a19fa26945c94268db8894420ca181 | [
"MIT"
] | 1,304 | 2015-06-26T02:11:54.000Z | 2019-12-12T21:08:00.000Z | lib/code_corps/messages/conversation_query.ex | fikape/code-corps-api | c21674b0b2a19fa26945c94268db8894420ca181 | [
"MIT"
] | 140 | 2016-01-01T18:19:47.000Z | 2020-11-22T06:24:47.000Z | defmodule CodeCorps.Messages.ConversationQuery do
@moduledoc ~S"""
Holds helpers to query `CodeCorps.Conversation` records using a map of params.
"""
import Ecto.Query
alias CodeCorps.{Conversation, ConversationPart, Message, Repo}
alias Ecto.Queryable
@doc ~S"""
Narrows down a `CodeCorps.Conversatio... | 33.382353 | 80 | 0.668722 |
b2364f3d53ac458c9a5190e424a9f5843dbc47b7 | 1,402 | ex | Elixir | lib/web_driver_client/w3c_wire_protocol_client/commands/navigate_to.ex | fimassuda/web_driver_client | 09d373c9a8a923c5e2860f107f84b16565e338f7 | [
"MIT"
] | 8 | 2019-11-24T18:33:12.000Z | 2020-12-09T10:20:09.000Z | lib/web_driver_client/w3c_wire_protocol_client/commands/navigate_to.ex | fimassuda/web_driver_client | 09d373c9a8a923c5e2860f107f84b16565e338f7 | [
"MIT"
] | 67 | 2019-12-20T16:33:30.000Z | 2021-09-14T03:50:10.000Z | lib/web_driver_client/w3c_wire_protocol_client/commands/navigate_to.ex | fimassuda/web_driver_client | 09d373c9a8a923c5e2860f107f84b16565e338f7 | [
"MIT"
] | 10 | 2020-06-19T16:15:03.000Z | 2021-09-13T17:56:25.000Z | defmodule WebDriverClient.W3CWireProtocolClient.Commands.NavigateTo do
@moduledoc false
import WebDriverClient.W3CWireProtocolClient.Guards
alias WebDriverClient.Config
alias WebDriverClient.ConnectionError
alias WebDriverClient.HTTPResponse
alias WebDriverClient.Session
alias WebDriverClient.W3CWirePro... | 35.05 | 89 | 0.728959 |
b2366fb293dc109cd8a29102ef7ea3579746d429 | 1,143 | ex | Elixir | lib/trifolium/navigation.ex | daskycodes/trifolium | 322f01f89948c51d974e64b049ca2ce2d0f8b45f | [
"MIT"
] | 1 | 2021-04-19T15:09:35.000Z | 2021-04-19T15:09:35.000Z | lib/trifolium/navigation.ex | daskycodes/trifolium | 322f01f89948c51d974e64b049ca2ce2d0f8b45f | [
"MIT"
] | 1 | 2021-04-19T18:08:05.000Z | 2021-04-19T18:08:05.000Z | lib/trifolium/navigation.ex | daskycodes/trifolium | 322f01f89948c51d974e64b049ca2ce2d0f8b45f | [
"MIT"
] | 2 | 2021-04-19T15:09:39.000Z | 2021-04-28T14:05:21.000Z | defmodule Trifolium.Navigation do
alias Trifolium.Config
alias Trifolium.API
@http_client Config.http_client()
@doc """
Given a API returned value, access the `first` result page, according to the
`links` entry in the API return value.
"""
@spec first(map) :: API.response()
def first(%{"links" =... | 31.75 | 83 | 0.634296 |
b2367946a0911838968e50416bdb042a7dd3ae3b | 3,239 | ex | Elixir | lib/cultulator/expedition/table.ex | wisq/cultulator | d417e7c822c0d3d584fd6e26c6d4f1184d9285e0 | [
"MIT"
] | null | null | null | lib/cultulator/expedition/table.ex | wisq/cultulator | d417e7c822c0d3d584fd6e26c6d4f1184d9285e0 | [
"MIT"
] | null | null | null | lib/cultulator/expedition/table.ex | wisq/cultulator | d417e7c822c0d3d584fd6e26c6d4f1184d9285e0 | [
"MIT"
] | null | null | null | defmodule Cultulator.Expedition.Table do
use Eml.HTML
alias Cultulator.Expedition.{Solver, Combiner}
# alias Cultulator.Expedition.Solver.Combo
alias Cultulator.Expedition.Combiner.Choice
def generate(vaults) do
table do
header_row()
vaults
|> Enum.sort_by(&vault_sort_key/1)
|> ... | 23.471014 | 80 | 0.58444 |
b236921fa47bea959d819176743e827b46e5cdf6 | 2,621 | ex | Elixir | clients/pub_sub/lib/google_api/pub_sub/v1/model/seek_request.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/pub_sub/lib/google_api/pub_sub/v1/model/seek_request.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/pub_sub/lib/google_api/pub_sub/v1/model/seek_request.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 51.392157 | 753 | 0.752766 |
b236a0ba612d868cf167a5f00e9858d320764571 | 3,951 | ex | Elixir | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1p1beta1__object_tracking_annotation.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_v1p1beta1__object_tracking_annotation.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_v1p1beta1__object_tracking_annotation.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 44.393258 | 391 | 0.741078 |
b236b8d524b1f24caf79ba53665ed6209ec7ba16 | 716 | ex | Elixir | lib/bitcoin/const.ex | rosettacash/book | 2937c90e2c3595984e6f5eee91eb454f03b82ef0 | [
"Apache-2.0"
] | 2 | 2019-08-12T04:53:57.000Z | 2019-09-03T03:47:33.000Z | lib/bitcoin/const.ex | rosettacash/book | 2937c90e2c3595984e6f5eee91eb454f03b82ef0 | [
"Apache-2.0"
] | null | null | null | lib/bitcoin/const.ex | rosettacash/book | 2937c90e2c3595984e6f5eee91eb454f03b82ef0 | [
"Apache-2.0"
] | null | null | null | defmodule Bitcoin.Const do
defmacro __using__(_opts) do
quote do
# Configurable network name e.g. bitcoin, testnet
@network Application.get_env(:bitcoin, :network) || :bitcoin
# Common chain params
# Number of base units in one coin
@coin 100_000_000
# Halving frequency (in ... | 24.689655 | 66 | 0.664804 |
b236e192bdf2c07ff9d09bd03d8fd4412e8a2c8a | 78 | exs | Elixir | nolive/hiyoko/test/hiyoko_web/views/page_view_test.exs | rykawamu/phoenix_liveview_practice_02 | 7384b0cab78dbeefe6d57a41744f791919f1467a | [
"MIT"
] | null | null | null | nolive/hiyoko/test/hiyoko_web/views/page_view_test.exs | rykawamu/phoenix_liveview_practice_02 | 7384b0cab78dbeefe6d57a41744f791919f1467a | [
"MIT"
] | 1 | 2019-09-11T14:22:29.000Z | 2019-09-11T14:22:29.000Z | hiyoko/test/hiyoko_web/views/page_view_test.exs | rykawamu/phoenix_liveview_practice_01 | e30ab2304473a995a3b36335ceb212a9bbed012f | [
"MIT"
] | null | null | null | defmodule HiyokoWeb.PageViewTest do
use HiyokoWeb.ConnCase, async: true
end
| 19.5 | 37 | 0.820513 |
b236fe1b7cc6fd6dd87e632f2cd2972174e5d322 | 3,783 | ex | Elixir | lib/guilda_web/simple_s3_upload.ex | guildatech/GuildaEx | 4df60d5b85b578c019c71bcb17b907b6cd811037 | [
"MIT"
] | 10 | 2020-09-05T20:25:05.000Z | 2022-01-28T14:02:36.000Z | lib/guilda_web/simple_s3_upload.ex | guildatech/GuildaEx | 4df60d5b85b578c019c71bcb17b907b6cd811037 | [
"MIT"
] | 11 | 2020-09-07T01:09:55.000Z | 2022-02-06T00:58:48.000Z | lib/guilda_web/simple_s3_upload.ex | guildatech/GuildaEx | 4df60d5b85b578c019c71bcb17b907b6cd811037 | [
"MIT"
] | 3 | 2020-10-03T01:53:08.000Z | 2022-01-28T14:03:09.000Z | defmodule GuildaWeb.SimpleS3Upload do
@moduledoc """
Dependency-free S3 Form Upload using HTTP POST sigv4
https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-post-example.html
"""
@doc """
Signs a form upload.
The configuration is a map which must contain the following keys:
* `:region` - The AWS r... | 32.059322 | 93 | 0.612477 |
b23702c69b06673a5517fa49ba6e95f3d2c41582 | 120 | exs | Elixir | test/exfmt/context_test.exs | securingsincity/exfmt | 4fbd403abfc71df92ee67037804d6310bb45b272 | [
"Apache-2.0"
] | 510 | 2017-05-06T02:01:13.000Z | 2021-11-15T09:47:41.000Z | test/exfmt/context_test.exs | Jason-Cooke/exfmt | 3a5d0808e77858520d52bb25752bc00cc0605c4d | [
"Apache-2.0"
] | 75 | 2017-05-31T20:14:40.000Z | 2019-07-22T12:54:20.000Z | test/exfmt/context_test.exs | Jason-Cooke/exfmt | 3a5d0808e77858520d52bb25752bc00cc0605c4d | [
"Apache-2.0"
] | 25 | 2017-05-31T02:17:25.000Z | 2019-07-20T10:02:21.000Z | defmodule Exfmt.ContextTest do
use ExUnit.Case, async: true
alias Exfmt.Context
doctest Context, import: true
end
| 20 | 31 | 0.775 |
b23717ef65b2ac62b958964b5a398d0eab6ef2ec | 622 | ex | Elixir | lib/litelist/posts/search.ex | saycel/Litelist | 2a1f67385523e5388c431c307b4052a6f8778818 | [
"MIT"
] | 1 | 2021-01-13T15:46:49.000Z | 2021-01-13T15:46:49.000Z | lib/litelist/posts/search.ex | saycel/Litelist | 2a1f67385523e5388c431c307b4052a6f8778818 | [
"MIT"
] | 1 | 2021-01-13T16:42:24.000Z | 2021-01-13T16:42:24.000Z | lib/litelist/posts/search.ex | saycel/Litelist | 2a1f67385523e5388c431c307b4052a6f8778818 | [
"MIT"
] | null | null | null | defmodule Litelist.Posts.Search do
@moduledoc """
Implementation of the full-text user search for posts
"""
import Ecto.Query
@spec run(Ecto.Query.t(), any()) :: Ecto.Query.t()
def run(query, search_term) do
where(
query,
fragment(
"to_tsvector('englis... | 24.88 | 131 | 0.530547 |
b2372db8866fe4fc5c90b073e8bf49db2a1a7214 | 1,144 | exs | Elixir | test/ua_inspector/short_code_map/init_test.exs | Route-Now/ua_inspector | 4e6ced73fc40b6e9947e0a1b0612d5517f343293 | [
"Apache-2.0"
] | 44 | 2019-03-17T10:44:04.000Z | 2022-01-30T10:09:28.000Z | test/ua_inspector/short_code_map/init_test.exs | Route-Now/ua_inspector | 4e6ced73fc40b6e9947e0a1b0612d5517f343293 | [
"Apache-2.0"
] | 12 | 2019-06-06T15:26:26.000Z | 2022-03-09T17:21:21.000Z | test/ua_inspector/short_code_map/init_test.exs | Route-Now/ua_inspector | 4e6ced73fc40b6e9947e0a1b0612d5517f343293 | [
"Apache-2.0"
] | 8 | 2020-04-21T07:49:37.000Z | 2021-12-07T00:18:33.000Z | defmodule UAInspector.ShortCodeMap.InitTest do
use ExUnit.Case, async: false
import ExUnit.CaptureLog
alias UAInspector.ShortCodeMap
@pathname "something_that_does_not_exist"
setup do
app_path = Application.get_env(:ua_inspector, :database_path)
startup = Application.get_env(:ua_inspector, :startu... | 26.604651 | 73 | 0.69493 |
b23743bb02d8db9f0b89e8dc2172c7fbf3ff93b6 | 7,631 | ex | Elixir | lib/ex_admin/themes/admin_lte2/filter.ex | devonestes/ex_admin | e135ae7c28de78fc87baf519ff8a32da12e8bf66 | [
"MIT"
] | null | null | null | lib/ex_admin/themes/admin_lte2/filter.ex | devonestes/ex_admin | e135ae7c28de78fc87baf519ff8a32da12e8bf66 | [
"MIT"
] | 1 | 2019-03-02T09:07:47.000Z | 2019-03-02T09:07:47.000Z | lib/ex_admin/themes/admin_lte2/filter.ex | devonestes/ex_admin | e135ae7c28de78fc87baf519ff8a32da12e8bf66 | [
"MIT"
] | 1 | 2018-12-20T15:01:39.000Z | 2018-12-20T15:01:39.000Z | Code.ensure_compiled(ExAdmin.Utils)
defmodule ExAdmin.Theme.AdminLte2.Filter do
@moduledoc false
require Logger
require Ecto.Query
import ExAdmin.Utils
import ExAdmin.Gettext
import ExAdmin.Filter
use Xain
def theme_filter_view(conn, defn, q, order, scope) do
markup safe: true do
div ".box.b... | 28.055147 | 106 | 0.497707 |
b237445f362f9ad5e9df748a233abb85f0e2dfd5 | 1,111 | exs | Elixir | config/config.exs | cowile/scribe | 75334daf0f1fd24ba92bceef67b4cb6e1e2c4f37 | [
"MIT"
] | 253 | 2016-08-13T21:47:42.000Z | 2022-01-18T06:53:28.000Z | config/config.exs | cowile/scribe | 75334daf0f1fd24ba92bceef67b4cb6e1e2c4f37 | [
"MIT"
] | 15 | 2017-02-18T18:00:15.000Z | 2022-01-30T15:48:08.000Z | config/config.exs | cowile/scribe | 75334daf0f1fd24ba92bceef67b4cb6e1e2c4f37 | [
"MIT"
] | 11 | 2016-12-23T08:21:36.000Z | 2021-12-31T21:03:26.000Z | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the paren... | 35.83871 | 73 | 0.753375 |
b2375bca77393fb98a86af56ce55dcc553e8a2f6 | 180 | ex | Elixir | lib/kandesk_web/live/component/task.ex | petermm/kandesk | 6d940efcd1023b4667904b5a7a3a517be013702c | [
"MIT"
] | 158 | 2020-09-01T13:21:59.000Z | 2022-03-31T12:41:03.000Z | lib/kandesk_web/live/component/task.ex | petermm/kandesk | 6d940efcd1023b4667904b5a7a3a517be013702c | [
"MIT"
] | 8 | 2020-09-01T21:09:05.000Z | 2022-01-20T21:46:18.000Z | lib/kandesk_web/live/component/task.ex | petermm/kandesk | 6d940efcd1023b4667904b5a7a3a517be013702c | [
"MIT"
] | 18 | 2020-09-01T13:23:45.000Z | 2022-02-15T09:47:39.000Z | defmodule KandeskWeb.Component.Task do
use Phoenix.LiveComponent
def render(assigns) do
Phoenix.View.render(KandeskWeb.LiveView, "component_task.html", assigns)
end
end
| 22.5 | 76 | 0.783333 |
b237691c5cfc5d86010b575aefd73be5914f07ae | 542 | ex | Elixir | pangram/lib/pangram.ex | tarcisiooliveira/Exercise-form-Exercism-in-Elixir | 2c9f14c264345d8aae09c701dc56128072b7f3c1 | [
"MIT"
] | null | null | null | pangram/lib/pangram.ex | tarcisiooliveira/Exercise-form-Exercism-in-Elixir | 2c9f14c264345d8aae09c701dc56128072b7f3c1 | [
"MIT"
] | null | null | null | pangram/lib/pangram.ex | tarcisiooliveira/Exercise-form-Exercism-in-Elixir | 2c9f14c264345d8aae09c701dc56128072b7f3c1 | [
"MIT"
] | null | null | null | defmodule Pangram do
@alphabet ?a..?z
@doc """
Determines if a word or sentence is a pangram.
A pangram is a sentence using every letter of the alphabet at least once.
Returns a boolean.
## Examples
iex> Pangram.pangram?("the quick brown fox jumps over the lazy dog")
true
"""
@spec p... | 20.074074 | 75 | 0.643911 |
b23769256b1415362146e4b08194cbbb309a56db | 702 | ex | Elixir | web/gettext.ex | DNNX/badging | 861c0d0e376c212bf27e59710fb21d00f734c715 | [
"MIT"
] | 4 | 2016-11-07T09:47:09.000Z | 2020-10-19T20:39:03.000Z | web/gettext.ex | DNNX/badging | 861c0d0e376c212bf27e59710fb21d00f734c715 | [
"MIT"
] | 7 | 2016-11-07T13:02:36.000Z | 2016-11-23T17:37:07.000Z | web/gettext.ex | DNNX/badging | 861c0d0e376c212bf27e59710fb21d00f734c715 | [
"MIT"
] | 3 | 2016-11-07T09:51:36.000Z | 2019-06-18T12:26:38.000Z | defmodule Badging.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 Badging.Gettext
# Simple translation
gettext "Here is the str... | 28.08 | 72 | 0.678063 |
b237723de53c47535b7d401f2f4da708703bd15c | 55 | ex | Elixir | lib/phat_web/views/page_view.ex | tajchumber/live-view-chat | d98d445b145a197eadc4381e264f3d1918f0b90f | [
"Apache-2.0"
] | 50 | 2019-05-23T11:59:30.000Z | 2022-03-11T04:12:36.000Z | lib/phat_web/views/page_view.ex | tajchumber/live-view-chat | d98d445b145a197eadc4381e264f3d1918f0b90f | [
"Apache-2.0"
] | 6 | 2019-05-18T09:53:46.000Z | 2021-01-27T11:26:15.000Z | lib/phat_web/views/page_view.ex | tajchumber/live-view-chat | d98d445b145a197eadc4381e264f3d1918f0b90f | [
"Apache-2.0"
] | 18 | 2019-05-18T08:13:51.000Z | 2021-11-23T13:57:33.000Z | defmodule PhatWeb.PageView do
use PhatWeb, :view
end
| 13.75 | 29 | 0.781818 |
b237a1d72455841808971bba4926775d877f6b2d | 3,471 | ex | Elixir | clients/tag_manager/lib/google_api/tag_manager/v2/model/variable.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/tag_manager/lib/google_api/tag_manager/v2/model/variable.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/tag_manager/lib/google_api/tag_manager/v2/model/variable.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | 1 | 2018-07-28T20:50:50.000Z | 2018-07-28T20:50:50.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 44.5 | 281 | 0.732066 |
b237eb9aba30cdcc6d4d438a1bb8b1b197a0678e | 985 | exs | Elixir | ws_peer/mix.exs | pastleo/bazaar | 422aefb7a4b6de720812689c57fc1d64a4204678 | [
"MIT"
] | 8 | 2019-05-09T05:30:17.000Z | 2020-12-27T12:17:55.000Z | ws_peer/mix.exs | pastleo/bazaar | 422aefb7a4b6de720812689c57fc1d64a4204678 | [
"MIT"
] | 11 | 2019-05-05T15:48:26.000Z | 2019-06-09T01:44:22.000Z | ws_peer/mix.exs | pastleo/bazaar | 422aefb7a4b6de720812689c57fc1d64a4204678 | [
"MIT"
] | null | null | null | defmodule WsPeer.MixProject do
use Mix.Project
def project do
[
app: :ws_peer,
version: "0.1.0",
elixir: "~> 1.5",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
start_permanent: Mix.env() == :prod,
deps: deps()
]
end... | 22.906977 | 57 | 0.581726 |
b2382e0c5c1ba639610aed622052f9fd9d5416db | 1,038 | exs | Elixir | test/mix/tasks/check_test.exs | basmoura/cpf | a3c37daa7598358b7e15a5ce4b342ed551df79d3 | [
"MIT"
] | 34 | 2019-04-14T22:57:21.000Z | 2022-01-06T01:26:25.000Z | test/mix/tasks/check_test.exs | basmoura/cpf | a3c37daa7598358b7e15a5ce4b342ed551df79d3 | [
"MIT"
] | 4 | 2019-06-09T15:48:53.000Z | 2022-01-29T13:13:57.000Z | test/mix/tasks/check_test.exs | basmoura/cpf | a3c37daa7598358b7e15a5ce4b342ed551df79d3 | [
"MIT"
] | 10 | 2019-04-16T04:26:56.000Z | 2020-10-08T18:00:47.000Z | defmodule Mix.Tasks.Cpf.CheckTest do
use CPF.MixCase, async: false
describe "run/1" do
import Mix.Tasks.Cpf.Check, only: [run: 1]
test "returns valid when all CPFs are valid" do
run(Enum.take(cpfs(), 10))
assert_received {:mix_shell, :info, ["valid"]}
end
test "returns invalid when o... | 25.95 | 74 | 0.598266 |
b23830fe93c1fcb32c454f4e70d84accf4b87281 | 1,731 | exs | Elixir | config/config.exs | campingrider/cforum_ex | cf27684c47d6dc26c9c37a946f1c729a79d27c70 | [
"MIT"
] | null | null | null | config/config.exs | campingrider/cforum_ex | cf27684c47d6dc26c9c37a946f1c729a79d27c70 | [
"MIT"
] | null | null | null | config/config.exs | campingrider/cforum_ex | cf27684c47d6dc26c9c37a946f1c729a79d27c70 | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
use Mix.Config
# General application configuration
config :cforum, ecto_repos: [Cforum.Repo]
# Conf... | 36.829787 | 86 | 0.725592 |
b238386c1c0faa46ade36d659c894b148bba34a2 | 351 | ex | Elixir | lib/sir_alex_web/plugs/require_login.ex | dnsbty/sir_alex | ab569dc7692826411877728444eaa00ec05767c2 | [
"MIT"
] | 3 | 2019-05-19T05:27:37.000Z | 2020-04-21T06:23:08.000Z | lib/sir_alex_web/plugs/require_login.ex | dnsbty/sir_alex | ab569dc7692826411877728444eaa00ec05767c2 | [
"MIT"
] | 3 | 2017-10-28T20:52:07.000Z | 2017-11-24T08:15:27.000Z | lib/sir_alex_web/plugs/require_login.ex | dnsbty/sir_alex | ab569dc7692826411877728444eaa00ec05767c2 | [
"MIT"
] | 1 | 2020-04-15T16:31:28.000Z | 2020-04-15T16:31:28.000Z | defmodule SirAlexWeb.Plugs.RequireLogin do
use SirAlexWeb, :controller
def require_login(conn, _opts) do
case conn.assigns[:is_logged_in] do
true -> conn
_ ->
conn
|> put_flash(:info, "You need to log in before you can do that")
|> redirect(to: auth_path(conn, :login))
... | 23.4 | 72 | 0.615385 |
b2384ba44cb42a2b433468456c59061c08ef5334 | 1,583 | exs | Elixir | test/changelog/policies/podcast_test.exs | PsOverflow/changelog.com | 53f4ecfc39b021c6b8cfcc0fa11f29aff8038a7f | [
"MIT"
] | 1 | 2021-03-14T21:12:49.000Z | 2021-03-14T21:12:49.000Z | test/changelog/policies/podcast_test.exs | type1fool/changelog.com | fbec3528cc3f5adfdc75b008bb92b17efc4f248f | [
"MIT"
] | null | null | null | test/changelog/policies/podcast_test.exs | type1fool/changelog.com | fbec3528cc3f5adfdc75b008bb92b17efc4f248f | [
"MIT"
] | 1 | 2018-10-03T20:55:52.000Z | 2018-10-03T20:55:52.000Z | defmodule Changelog.Policies.PodcastTest do
use Changelog.PolicyCase
alias Changelog.Policies
test "only admins can new/create" do
for policy <- [:new, :create] do
refute apply(Policies.Podcast, policy, [@guest])
refute apply(Policies.Podcast, policy, [@user])
refute apply(Policies.Podcast... | 35.977273 | 72 | 0.670246 |
b238507bcfaca9b916b1278c70bee50bfb3650f6 | 545 | ex | Elixir | lib/punting_server_web/router.ex | codingmelee/punting_server | 81c5423b556951beb7412bea5b3610b9e37ba9aa | [
"Apache-2.0"
] | null | null | null | lib/punting_server_web/router.ex | codingmelee/punting_server | 81c5423b556951beb7412bea5b3610b9e37ba9aa | [
"Apache-2.0"
] | null | null | null | lib/punting_server_web/router.ex | codingmelee/punting_server | 81c5423b556951beb7412bea5b3610b9e37ba9aa | [
"Apache-2.0"
] | null | null | null | defmodule PuntingServerWeb.Router do
use PuntingServerWeb, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
end
pipeline :api do
plug :accepts, ["json"]
end
scope "/", PuntingServ... | 20.185185 | 57 | 0.693578 |
b23886267e51b28aff33a8a57db78a3b7b9c2981 | 20,635 | ex | Elixir | lib/elixir/lib/io/ansi/docs.ex | andrewtimberlake/elixir | a1c4ffc897f9407fe7e739e20e697805fbbff810 | [
"Apache-2.0"
] | 1 | 2019-10-11T01:36:26.000Z | 2019-10-11T01:36:26.000Z | lib/elixir/lib/io/ansi/docs.ex | andrewtimberlake/elixir | a1c4ffc897f9407fe7e739e20e697805fbbff810 | [
"Apache-2.0"
] | 1 | 2015-06-09T15:52:43.000Z | 2015-06-09T15:52:43.000Z | lib/elixir/lib/io/ansi/docs.ex | andrewtimberlake/elixir | a1c4ffc897f9407fe7e739e20e697805fbbff810 | [
"Apache-2.0"
] | null | null | null | defmodule IO.ANSI.Docs do
@moduledoc false
@bullets [?*, ?-, ?+]
@spaces [" ", "\n", "\t"]
@doc """
The default options used by this module.
The supported keys are:
* `:enabled` - toggles coloring on and off (true)
* `:doc_bold` - bold text (bright)
* `:doc_code` ... | 31.030075 | 98 | 0.628108 |
b23891ee4a3431a1d4bbadd2f313c1586a002019 | 7,603 | ex | Elixir | clients/games/lib/google_api/games/v1/api/events.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/games/lib/google_api/games/v1/api/events.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/games/lib/google_api/games/v1/api/events.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 43.198864 | 224 | 0.692621 |
b238971f5066181db0d522e367eb2a085e791342 | 1,951 | exs | Elixir | Chapter11/vocial-demo-chapter-11/config/dev.exs | PacktPublishing/Phoenix-Web-Development | a071392abe2a459be1896580446b006126c393bf | [
"MIT"
] | 10 | 2018-05-13T14:53:05.000Z | 2021-11-08T13:10:44.000Z | Chapter11/vocial-demo-chapter-11/config/dev.exs | PacktPublishing/Phoenix-Web-Development | a071392abe2a459be1896580446b006126c393bf | [
"MIT"
] | null | null | null | Chapter11/vocial-demo-chapter-11/config/dev.exs | PacktPublishing/Phoenix-Web-Development | a071392abe2a459be1896580446b006126c393bf | [
"MIT"
] | 2 | 2019-04-23T10:54:33.000Z | 2019-04-27T15:47:07.000Z | use Mix.Config
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with brunch.io to recompile .js and .css sources.
config :vocial, VocialWeb.Endpoint,
http: [port: 4000... | 32.516667 | 170 | 0.703229 |
b238a705ae36bfd0d84177df8318b289166c6d02 | 1,126 | ex | Elixir | lib/taskasync_web/controllers/auth.ex | shawnonthenet/taskasync.com | 7ebd8ec1afc9fa5fa8708568b4ce9cf75968ae41 | [
"MIT"
] | null | null | null | lib/taskasync_web/controllers/auth.ex | shawnonthenet/taskasync.com | 7ebd8ec1afc9fa5fa8708568b4ce9cf75968ae41 | [
"MIT"
] | null | null | null | lib/taskasync_web/controllers/auth.ex | shawnonthenet/taskasync.com | 7ebd8ec1afc9fa5fa8708568b4ce9cf75968ae41 | [
"MIT"
] | null | null | null | defmodule TaskasyncWeb.Auth do
import Plug.Conn
def init(opts), do: opts
def call(conn, _opts) do
user_id = get_session(conn, :user_id)
user = user_id && Taskasync.Auth.get_user(user_id)
assign(conn, :current_user, user)
end
def login(conn, user) do
conn
|> assign(:current_user, user)
... | 25.022222 | 76 | 0.661634 |
b238c69dde4dd3bcf33f35d07f6861c163caeeb8 | 2,117 | ex | Elixir | clients/big_query/lib/google_api/big_query/v2/model/project_list.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/big_query/lib/google_api/big_query/v2/model/project_list.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/big_query/lib/google_api/big_query/v2/model/project_list.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 35.881356 | 153 | 0.696268 |
b238da476d7bcb045aefd01b35e6a04481edba99 | 49 | ex | Elixir | testData/org/elixir_lang/parser_definition/matched_relational_operation_parsing_test_case/Atom.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 1,668 | 2015-01-03T05:54:27.000Z | 2022-03-25T08:01:20.000Z | testData/org/elixir_lang/parser_definition/matched_relational_operation_parsing_test_case/Atom.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 2,018 | 2015-01-01T22:43:39.000Z | 2022-03-31T20:13:08.000Z | testData/org/elixir_lang/parser_definition/matched_relational_operation_parsing_test_case/Atom.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 145 | 2015-01-15T11:37:16.000Z | 2021-12-22T05:51:02.000Z | :one < :two
:one > :two
:one <= :two
:one >= :two | 12.25 | 12 | 0.489796 |
b2393e686614817dbf5d9aa551d6413587898693 | 17,547 | ex | Elixir | lib/mix/lib/mix/tasks/format.ex | britto/elixir | 1f6e7093cff4b68dada60b924399bc8404d39a7e | [
"Apache-2.0"
] | 2 | 2020-06-02T18:00:28.000Z | 2021-12-10T03:21:42.000Z | lib/mix/lib/mix/tasks/format.ex | britto/elixir | 1f6e7093cff4b68dada60b924399bc8404d39a7e | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/tasks/format.ex | britto/elixir | 1f6e7093cff4b68dada60b924399bc8404d39a7e | [
"Apache-2.0"
] | 1 | 2018-01-09T20:10:59.000Z | 2018-01-09T20:10:59.000Z | defmodule Mix.Tasks.Format do
use Mix.Task
@shortdoc "Formats the given files/patterns"
@moduledoc """
Formats the given files and patterns.
mix format mix.exs "lib/**/*.{ex,exs}" "test/**/*.{ex,exs}"
If any of the files is `-`, then the output is read from stdin
and written to stdout.
## Forma... | 34.541339 | 110 | 0.674987 |
b239786ce5a2c7bd0a8ebb13193e744b67959db2 | 869 | ex | Elixir | installer/templates/phx_umbrella/apps/app_name_web/lib/app_name/application.ex | bhicks/phoenix | 2c43d798c184f6085cd2765d6cb2b463c87edac7 | [
"MIT"
] | null | null | null | installer/templates/phx_umbrella/apps/app_name_web/lib/app_name/application.ex | bhicks/phoenix | 2c43d798c184f6085cd2765d6cb2b463c87edac7 | [
"MIT"
] | 1 | 2020-11-08T08:30:10.000Z | 2020-11-08T08:30:10.000Z | installer/templates/phx_umbrella/apps/app_name_web/lib/app_name/application.ex | bhicks/phoenix | 2c43d798c184f6085cd2765d6cb2b463c87edac7 | [
"MIT"
] | null | null | null | defmodule <%= web_namespace %>.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
children = [
# Start the Endpoint (http/https)
<%= endpoint_module %>
# Start a worker b... | 29.965517 | 78 | 0.688147 |
b23997b9070e179e2031458bd5c0bcccf7c152e3 | 136 | ex | Elixir | lib/nerves/neopixel/channel.ex | acrogenesis-lab/nerves_neopixel | 39cae480a053e9f4a9f3b30f00292433bf1872eb | [
"MIT"
] | null | null | null | lib/nerves/neopixel/channel.ex | acrogenesis-lab/nerves_neopixel | 39cae480a053e9f4a9f3b30f00292433bf1872eb | [
"MIT"
] | null | null | null | lib/nerves/neopixel/channel.ex | acrogenesis-lab/nerves_neopixel | 39cae480a053e9f4a9f3b30f00292433bf1872eb | [
"MIT"
] | null | null | null | defmodule Nerves.Neopixel.Channel do
defstruct [
pin: 0, count: 0, brightness: 0,
data: [], invert: false, type: :ws2811]
end
| 22.666667 | 43 | 0.661765 |
b239dc09fdff61ea48983988d4d57644c7333c6f | 2,892 | ex | Elixir | apps/heroes_server/lib/game/board.ex | miquecg/heroes-board-game | 2e8745c7577060a7fc80ad1e4c38c2c507a8c488 | [
"MIT"
] | 2 | 2020-04-09T06:42:15.000Z | 2022-03-03T15:52:38.000Z | apps/heroes_server/lib/game/board.ex | miquecg/heroes-board-game | 2e8745c7577060a7fc80ad1e4c38c2c507a8c488 | [
"MIT"
] | 5 | 2020-04-28T16:05:46.000Z | 2021-01-03T14:08:19.000Z | apps/heroes_server/lib/game/board.ex | miquecg/heroes-board-game | 2e8745c7577060a7fc80ad1e4c38c2c507a8c488 | [
"MIT"
] | null | null | null | defmodule Game.Board do
@moduledoc """
Board struct definition and utility functions to work with them.
"""
alias __MODULE__
alias GameError.BadSize
@typedoc """
Walkable board cell
"""
@type tile :: {non_neg_integer(), non_neg_integer()}
@typedoc """
Cell where heroes cannot walk in.
"""
@... | 22.418605 | 72 | 0.581259 |
b239f49173f6c310e0ac74ba4cc85581735abbd3 | 4,405 | ex | Elixir | clients/vision/lib/google_api/vision/v1/model/google_cloud_vision_v1p3beta1_web_detection.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/vision/lib/google_api/vision/v1/model/google_cloud_vision_v1p3beta1_web_detection.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/vision/lib/google_api/vision/v1/model/google_cloud_vision_v1p3beta1_web_detection.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 45.412371 | 330 | 0.745516 |
b23a2533eafad488fb5f340f8b55af5d0bc00ee6 | 1,022 | ex | Elixir | example/lib/example/application.ex | tino415/u2f_ex | d95f52335dc85140b2b1b3d7975d29c6d71868ea | [
"BSD-3-Clause"
] | 13 | 2018-10-15T10:39:24.000Z | 2019-01-15T06:42:24.000Z | example/lib/example/application.ex | tino415/u2f_ex | d95f52335dc85140b2b1b3d7975d29c6d71868ea | [
"BSD-3-Clause"
] | 19 | 2018-08-10T04:33:46.000Z | 2018-12-02T04:55:48.000Z | example/lib/example/application.ex | tino415/u2f_ex | d95f52335dc85140b2b1b3d7975d29c6d71868ea | [
"BSD-3-Clause"
] | 4 | 2019-07-06T04:38:31.000Z | 2021-02-01T10:45:57.000Z | defmodule Example.Application do
use Application
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
def start(_type, _args) do
import Supervisor.Spec
# Define workers and child supervisors to be supervised
children = [
# Start the Ecto repository
... | 31.9375 | 85 | 0.714286 |
b23a9db5873dbd19c52e5088abcbea727474ff08 | 2,111 | exs | Elixir | integration_test/pg/worker_test.exs | liveforeverx/ecto | 42a812b765762f62cc260a994897a95492ffae28 | [
"Apache-2.0"
] | null | null | null | integration_test/pg/worker_test.exs | liveforeverx/ecto | 42a812b765762f62cc260a994897a95492ffae28 | [
"Apache-2.0"
] | null | null | null | integration_test/pg/worker_test.exs | liveforeverx/ecto | 42a812b765762f62cc260a994897a95492ffae28 | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.Integration.WorkerTest do
use ExUnit.Case
alias Ecto.Adapters.Postgres.Worker
test "worker starts without an active connection" do
{ :ok, worker } = Worker.start_link(worker_opts(database: "gary"))
assert Process.alive?(worker)
refute :sys.get_state(worker).conn
end
test "worker... | 32.476923 | 103 | 0.667456 |
b23acb17d2896ef7d3ed2c3663333ad39ae01b05 | 12,273 | ex | Elixir | clients/speech/lib/google_api/speech/v1/api/operations.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/speech/lib/google_api/speech/v1/api/operations.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/speech/lib/google_api/speech/v1/api/operations.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | 1 | 2018-07-28T20:50:50.000Z | 2018-07-28T20:50:50.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 47.941406 | 669 | 0.670496 |
b23aead9b78060517ec6a74da5fce96993479ae6 | 989 | ex | Elixir | lib/level/web_push/subscription.ex | mindriot101/level | 0a2cbae151869c2d9b79b3bfb388f5d00739ae12 | [
"Apache-2.0"
] | 928 | 2018-04-03T16:18:11.000Z | 2019-09-09T17:59:55.000Z | lib/level/web_push/subscription.ex | mindriot101/level | 0a2cbae151869c2d9b79b3bfb388f5d00739ae12 | [
"Apache-2.0"
] | 74 | 2018-04-03T00:46:50.000Z | 2019-03-10T18:57:27.000Z | lib/level/web_push/subscription.ex | mindriot101/level | 0a2cbae151869c2d9b79b3bfb388f5d00739ae12 | [
"Apache-2.0"
] | 89 | 2018-04-03T17:33:20.000Z | 2019-08-19T03:40:20.000Z | defmodule Level.WebPush.Subscription do
@moduledoc """
Represents a web push subscription.
"""
@enforce_keys [:endpoint, :keys]
defstruct [:endpoint, :keys]
@type t :: %__MODULE__{
endpoint: String.t(),
keys: %{
auth: String.t(),
p256dh: String.t()
}
... | 22.477273 | 90 | 0.577351 |
b23af3aa734a97d14696f395c4d291e74087b767 | 363 | exs | Elixir | priv/repo/migrations/20180324120432_create_invoice_payment_log.exs | gpad/les | 2317b8055ab24aa857a6cda06f6e529c992c668c | [
"Apache-2.0"
] | 11 | 2018-04-06T14:02:15.000Z | 2020-12-09T10:44:03.000Z | priv/repo/migrations/20180324120432_create_invoice_payment_log.exs | gpad/les | 2317b8055ab24aa857a6cda06f6e529c992c668c | [
"Apache-2.0"
] | 1 | 2018-11-18T02:35:23.000Z | 2018-11-18T02:35:23.000Z | priv/repo/migrations/20180324120432_create_invoice_payment_log.exs | gpad/les | 2317b8055ab24aa857a6cda06f6e529c992c668c | [
"Apache-2.0"
] | null | null | null | defmodule Les.Repo.Migrations.CreateInvoicePaymentLog do
use Ecto.Migration
def change do
create table(:invoice_payment_log) do
add :result, :integer
add :result_message, :string
add :invoice_id, references(:invoices, on_delete: :delete_all)
timestamps()
end
create index(:inv... | 21.352941 | 68 | 0.710744 |
b23afc238c2e7ba5b8999c30557fb4e2c8e8774b | 1,546 | ex | Elixir | clients/custom_search/lib/google_api/custom_search/v1/model/context.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/custom_search/lib/google_api/custom_search/v1/model/context.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/custom_search/lib/google_api/custom_search/v1/model/context.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 ... | 30.92 | 107 | 0.716688 |
b23b04976d85c3a0b792c95441425d6554f72d6a | 1,186 | ex | Elixir | lib/quadquizaminos_web/live/page_live.ex | sFractal-Podii/quadquizaminos | 1693f2d1c6ffee33065dd2ba7d899ac4aa405762 | [
"MIT"
] | null | null | null | lib/quadquizaminos_web/live/page_live.ex | sFractal-Podii/quadquizaminos | 1693f2d1c6ffee33065dd2ba7d899ac4aa405762 | [
"MIT"
] | null | null | null | lib/quadquizaminos_web/live/page_live.ex | sFractal-Podii/quadquizaminos | 1693f2d1c6ffee33065dd2ba7d899ac4aa405762 | [
"MIT"
] | null | null | null | defmodule QuadquizaminosWeb.PageLive do
use Phoenix.LiveView
use Phoenix.HTML
alias Quadquizaminos.UserFromAuth
alias QuadquizaminosWeb.Router.Helpers, as: Routes
def mount(_param, session, socket) do
user_id = Map.get(session, "user_id")
{:ok, socket |> assign(current_user: current_user(user_id))}
... | 25.782609 | 127 | 0.606239 |
b23b2da926e628e47b51f1df72abcddbe9fafad8 | 6,405 | ex | Elixir | lib/tarams.ex | timetask/tarams | 7d682c1541b549fc58b9befe3060d7d65dda2501 | [
"MIT"
] | null | null | null | lib/tarams.ex | timetask/tarams | 7d682c1541b549fc58b9befe3060d7d65dda2501 | [
"MIT"
] | null | null | null | lib/tarams.ex | timetask/tarams | 7d682c1541b549fc58b9befe3060d7d65dda2501 | [
"MIT"
] | null | null | null | defmodule Tarams do
@moduledoc """
Params provide some helpers method to work with parameters
"""
@doc """
A plug which do srubbing params
**Use in Router**
defmodule MyApp.Router do
...
plug Tarams.plug_scrub
...
end
**Use in controller**
plug Tarams.plug_sc... | 24.169811 | 128 | 0.558626 |
b23b32f79b4a91d28b6c6b4832f8afa9d22e8595 | 831 | ex | Elixir | lib/metrics/statistics_instrumenter.ex | sb8244/grapevine | effaaa01294d30114090c20f9cc40b8665d834f2 | [
"MIT"
] | 107 | 2018-10-05T18:20:32.000Z | 2022-02-28T04:02:50.000Z | lib/metrics/statistics_instrumenter.ex | sb8244/grapevine | effaaa01294d30114090c20f9cc40b8665d834f2 | [
"MIT"
] | 33 | 2018-10-05T14:11:18.000Z | 2022-02-10T22:19:18.000Z | lib/metrics/statistics_instrumenter.ex | sb8244/grapevine | effaaa01294d30114090c20f9cc40b8665d834f2 | [
"MIT"
] | 18 | 2019-02-03T03:08:20.000Z | 2021-12-28T04:29:36.000Z | defmodule Metrics.StatisticsInstrumenter do
@moduledoc """
Instrumentation for statistic recording
"""
use Prometheus.Metric
require Logger
@doc false
def setup() do
events = [
{:players, :record}
]
Enum.each(events, fn {noun, event} ->
Counter.declare(
name: String.to_... | 23.742857 | 95 | 0.658243 |
b23b4aa1063a59bec24f47822c6657f673a3f530 | 9,085 | ex | Elixir | lib/chat_api/users.ex | flmel/papercups | 447fc585efc17c373652d47c475f068334bc73e4 | [
"MIT"
] | null | null | null | lib/chat_api/users.ex | flmel/papercups | 447fc585efc17c373652d47c475f068334bc73e4 | [
"MIT"
] | null | null | null | lib/chat_api/users.ex | flmel/papercups | 447fc585efc17c373652d47c475f068334bc73e4 | [
"MIT"
] | null | null | null | defmodule ChatApi.Users do
@moduledoc """
The Users context.
"""
import Ecto.Query, warn: false
alias ChatApi.Repo
alias ChatApi.Users.{User, UserProfile, UserSettings}
@spec find_user_by_email(binary()) :: User.t() | nil
def find_user_by_email(email) do
User |> where(email: ^email) |> Repo.one()... | 26.106322 | 98 | 0.639956 |
b23b854534303c9078a4576a9a03231756071e2e | 11,633 | ex | Elixir | testData/org/elixir_lang/beam/decompiler/idna.ex | osbre/intellij-elixir | 36ced8c5e4f4cc873b6e21b5c011d42783b54817 | [
"Apache-2.0"
] | null | null | null | testData/org/elixir_lang/beam/decompiler/idna.ex | osbre/intellij-elixir | 36ced8c5e4f4cc873b6e21b5c011d42783b54817 | [
"Apache-2.0"
] | null | null | null | testData/org/elixir_lang/beam/decompiler/idna.ex | osbre/intellij-elixir | 36ced8c5e4f4cc873b6e21b5c011d42783b54817 | [
"Apache-2.0"
] | null | null | null | # Source code recreated from a .beam file by IntelliJ Elixir
defmodule :idna do
# Private Types
@typep idna_flags :: [({:uts46, boolean()} | {:std3_rules, boolean()} | {:transitional, boolean()})]
# Functions
def alabel(label0) do
label = case :lists.all(fn c ->
:idna_ucs.is_ascii(c)
end, la... | 30.294271 | 183 | 0.607582 |
b23b8c52954a7eefd71a35cfdd1becfb664f5617 | 648 | exs | Elixir | test/settlement_batch_summary_test.exs | goravbhootra/braintree-elixir | 53c10216125c13c05a19edf1dc1c98a818c46e09 | [
"MIT"
] | null | null | null | test/settlement_batch_summary_test.exs | goravbhootra/braintree-elixir | 53c10216125c13c05a19edf1dc1c98a818c46e09 | [
"MIT"
] | null | null | null | test/settlement_batch_summary_test.exs | goravbhootra/braintree-elixir | 53c10216125c13c05a19edf1dc1c98a818c46e09 | [
"MIT"
] | null | null | null | defmodule Braintree.SettlementBatchSummaryTest do
use ExUnit.Case, async: true
alias Braintree.SettlementBatchSummary, as: Summary
describe "new/1" do
test "creates a struct with record structs" do
records = [%{"card_type" => "MasterCard",
"kind" => "sale",
"count... | 27 | 53 | 0.594136 |
b23bb5c423c4d4512a0dbb3f72fe4b1f5f2ac7f4 | 1,898 | ex | Elixir | clients/cloud_identity/lib/google_api/cloud_identity/v1/model/google_apps_cloudidentity_devices_v1_cancel_wipe_device_response.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/cloud_identity/lib/google_api/cloud_identity/v1/model/google_apps_cloudidentity_devices_v1_cancel_wipe_device_response.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/cloud_identity/lib/google_api/cloud_identity/v1/model/google_apps_cloudidentity_devices_v1_cancel_wipe_device_response.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 36.5 | 224 | 0.776607 |
b23bbe8e30ba02d0ba1a5ee3b004a4478f9e2374 | 872 | exs | Elixir | test/lib/openflow/ofp_instruction_test.exs | shun159/tres | 1e3e7f78ba1aa4f184d4be70300e5f4703d50a2f | [
"Beerware"
] | 5 | 2019-05-25T02:25:13.000Z | 2020-10-06T17:00:03.000Z | test/lib/openflow/ofp_instruction_test.exs | shun159/tres | 1e3e7f78ba1aa4f184d4be70300e5f4703d50a2f | [
"Beerware"
] | 5 | 2018-03-29T14:42:10.000Z | 2019-11-19T07:03:09.000Z | test/lib/openflow/ofp_instruction_test.exs | shun159/tres | 1e3e7f78ba1aa4f184d4be70300e5f4703d50a2f | [
"Beerware"
] | 1 | 2019-03-30T20:48:27.000Z | 2019-03-30T20:48:27.000Z | defmodule OfpInstructionTest do
use ExUnit.Case
doctest Openflow
alias Openflow.Instruction.{
ApplyActions,
WriteActions,
ClearActions,
GotoTable,
WriteMetadata,
Meter,
Experimenter
}
describe "Openflow.Instruction" do
test "with all instructions parse and generate" do
... | 24.222222 | 68 | 0.647936 |
b23bcac0845790f44a3ef8455b4d6616b9d09343 | 801 | ex | Elixir | firmware/lib/firmware/application.ex | wemakerspace/nerves_thermal_camera | 1483a4a41ea89567e96fd1250f718058553fbe09 | [
"MIT"
] | 25 | 2018-11-03T19:36:12.000Z | 2021-11-17T13:09:06.000Z | firmware/lib/firmware/application.ex | wemakerspace/nerves_thermal_camera | 1483a4a41ea89567e96fd1250f718058553fbe09 | [
"MIT"
] | 4 | 2019-01-16T14:06:47.000Z | 2021-09-01T18:59:02.000Z | firmware/lib/firmware/application.ex | wemakerspace/nerves_thermal_camera | 1483a4a41ea89567e96fd1250f718058553fbe09 | [
"MIT"
] | 8 | 2018-12-25T23:00:51.000Z | 2020-12-22T15:10:21.000Z | defmodule Firmware.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
@target Mix.Project.config()[:target]
use Application
def start(_type, _args) do
# See https://hexdocs.pm/elixir/Supervisor.html
# for other strategies an... | 25.03125 | 67 | 0.689139 |
b23be479cb19474c62af57b1828fe93505de345a | 71,574 | ex | Elixir | clients/compute/lib/google_api/compute/v1/api/instance_group_managers.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/api/instance_group_managers.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/api/instance_group_managers.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 54.67838 | 570 | 0.663509 |
b23bef646029eb3310973f436496c0a294d30340 | 2,134 | exs | Elixir | test/scenic/primitive/style_test.exs | mikeover/scenic | 4b61c4996ed2d06b8cdf94f88c8a0522160e10b5 | [
"Apache-2.0"
] | null | null | null | test/scenic/primitive/style_test.exs | mikeover/scenic | 4b61c4996ed2d06b8cdf94f88c8a0522160e10b5 | [
"Apache-2.0"
] | null | null | null | test/scenic/primitive/style_test.exs | mikeover/scenic | 4b61c4996ed2d06b8cdf94f88c8a0522160e10b5 | [
"Apache-2.0"
] | null | null | null | #
# Created by Boyd Multerer on 5/7/17.
# Copyright © 2017 Kry10 Industries. All rights reserved.
#
defmodule Scenic.Primitive.StyleTest do
use ExUnit.Case, async: true
doctest Scenic
alias Scenic.Primitive.Style
@styles %{
fill: :red,
fruit: :bananas,
hidden: false
}
# ===================... | 29.638889 | 82 | 0.548266 |
b23bfdac620bd56c2711665d5c8fe85bfd938ab2 | 857 | exs | Elixir | Microsoft.Azure.Management.Storage/mix.exs | chgeuer/ex_microsoft_azure_management | 99cd9f7f2ff1fdbe69ca5bac55b6e2af91ba3603 | [
"Apache-2.0"
] | 4 | 2018-09-29T03:43:15.000Z | 2021-04-01T18:30:46.000Z | Microsoft.Azure.Management.Storage/mix.exs | chgeuer/ex_microsoft_azure_management | 99cd9f7f2ff1fdbe69ca5bac55b6e2af91ba3603 | [
"Apache-2.0"
] | null | null | null | Microsoft.Azure.Management.Storage/mix.exs | chgeuer/ex_microsoft_azure_management | 99cd9f7f2ff1fdbe69ca5bac55b6e2af91ba3603 | [
"Apache-2.0"
] | null | null | null | defmodule Microsoft.Azure.Management.Storage.Mixfile do
use Mix.Project
def project do
[app: :ex_microsoft_azure_management_storage,
version: "0.1.0",
elixir: "~> 1.4",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps()]
end
# Configuration for the O... | 23.162162 | 79 | 0.621937 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.