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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
035ad7c8cb1092e4cd5639961477af0bc71729f2 | 6,570 | ex | Elixir | samples/client/petstore/elixir/lib/swagger_petstore/api/pet.ex | derBiggi/swagger-codegen | 99dad052ec506796f3ed13b19364cf827ff0f256 | [
"Apache-2.0"
] | 14,570 | 2015-01-01T21:46:46.000Z | 2022-03-31T22:28:15.000Z | samples/client/petstore/elixir/lib/swagger_petstore/api/pet.ex | derBiggi/swagger-codegen | 99dad052ec506796f3ed13b19364cf827ff0f256 | [
"Apache-2.0"
] | 9,058 | 2015-01-08T15:49:17.000Z | 2022-03-31T13:10:01.000Z | samples/client/petstore/elixir/lib/swagger_petstore/api/pet.ex | LaudateCorpus1/swagger-codegen | e4f322ce197f1d6a0643de80f9a20bb521480426 | [
"Apache-2.0"
] | 6,907 | 2015-01-02T05:29:47.000Z | 2022-03-31T00:55:45.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 SwaggerPetstore.Api.Pet do
@moduledoc """
API calls for all endpoints tagged `Pet`.
"""
alias SwaggerPetstore.Connection
import Swagger... | 27.721519 | 140 | 0.630746 |
035adaae3feaa427e125e3e31b93a1e8eef99249 | 455 | ex | Elixir | lib/booking/permission.ex | mattiaslundberg/booking | 469d1469f306b2ab62ce1ee971a825101af6fc7e | [
"MIT"
] | null | null | null | lib/booking/permission.ex | mattiaslundberg/booking | 469d1469f306b2ab62ce1ee971a825101af6fc7e | [
"MIT"
] | 2 | 2021-03-10T16:49:07.000Z | 2021-05-11T12:50:22.000Z | lib/booking/permission.ex | mattiaslundberg/booking | 469d1469f306b2ab62ce1ee971a825101af6fc7e | [
"MIT"
] | null | null | null | defmodule Booking.Permission do
use Ecto.Schema
import Ecto.Changeset
@moduledoc """
Relation to assign user permission to a location
"""
schema "permissions" do
belongs_to :location, Booking.Location
belongs_to :user, Booking.Location
timestamps()
end
@doc false
def changeset(permissi... | 19.782609 | 50 | 0.701099 |
035b110e36ca2556edd417a26d2dd96b34ed17a5 | 389 | exs | Elixir | elixir-intro/kode/eksempler/gjenta1.exs | kentdahl/nektar-nuby | 03f6624c8bf8de41dd63a0adda5456639b256bc5 | [
"MIT"
] | null | null | null | elixir-intro/kode/eksempler/gjenta1.exs | kentdahl/nektar-nuby | 03f6624c8bf8de41dd63a0adda5456639b256bc5 | [
"MIT"
] | null | null | null | elixir-intro/kode/eksempler/gjenta1.exs | kentdahl/nektar-nuby | 03f6624c8bf8de41dd63a0adda5456639b256bc5 | [
"MIT"
] | null | null | null | # Løkker implementeres ved rekursjon!
defmodule Gjenta do
def loop do
IO.write "En gutt og ei jente satt i ett tre. \n"
IO.write "Så falt gutten ned. \n"
svar = IO.gets("Hvem satt igjen? :> ") |> String.strip |> String.downcase
if svar == "jenten" do
IO.puts "Er du en luring? Eller Bergenser?"
... | 24.3125 | 77 | 0.637532 |
035b45a764b78a5c433e7d6ec187b0ba3c6b07f2 | 5,299 | exs | Elixir | test/elaxto/query_test.exs | secretworry/elaxto | d4e66dc554f7dfe7786d9caf2dc3def5d231d37f | [
"Apache-2.0"
] | 2 | 2016-12-13T05:51:13.000Z | 2017-02-18T18:29:09.000Z | test/elaxto/query_test.exs | secretworry/elaxto | d4e66dc554f7dfe7786d9caf2dc3def5d231d37f | [
"Apache-2.0"
] | null | null | null | test/elaxto/query_test.exs | secretworry/elaxto | d4e66dc554f7dfe7786d9caf2dc3def5d231d37f | [
"Apache-2.0"
] | null | null | null | defmodule Elaxto.QueryTest do
use ExUnit.Case
import Elaxto.Query
describe "query/1" do
test "bool query" do
assert query(
bool(
must: term(user: "kimchy"),
filter: term(tag: "tech"),
must_not: range(age: [from: 10, to: 20]),
should: [term(tag: "wow"), te... | 23.139738 | 130 | 0.351387 |
035b5ee6cb5ee7a7e2c545ceb618fa1d9cfe852c | 1,815 | ex | Elixir | clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_cx_v3beta1_test_config.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_cx_v3beta1_test_config.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_cx_v3beta1_test_config.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... | 34.903846 | 154 | 0.739394 |
035ba650eadb4f0b45162f2290c7ea60b1699f4a | 555 | ex | Elixir | services/fc_identity/lib/fc_identity/events/app_added.ex | fleadope/freshcom | 8d5944befaa6eea8d31e5f5995939be2a1a44262 | [
"BSD-3-Clause"
] | 46 | 2018-10-13T23:18:13.000Z | 2021-08-07T07:46:51.000Z | services/fc_identity/lib/fc_identity/events/app_added.ex | fleadope/freshcom | 8d5944befaa6eea8d31e5f5995939be2a1a44262 | [
"BSD-3-Clause"
] | 25 | 2018-10-14T00:56:07.000Z | 2019-12-23T19:41:02.000Z | services/fc_identity/lib/fc_identity/events/app_added.ex | fleadope/freshcom | 8d5944befaa6eea8d31e5f5995939be2a1a44262 | [
"BSD-3-Clause"
] | 5 | 2018-12-16T04:39:51.000Z | 2020-10-01T12:17:03.000Z | defmodule FCIdentity.AppAdded do
use TypedStruct
@derive Jason.Encoder
@version 1
typedstruct do
field :__version__, integer(), default: @version
field :request_id, String.t()
field :requester_id, String.t()
field :requester_type, String.t()
field :requester_role, String.t()
field :cl... | 23.125 | 52 | 0.666667 |
035bc00deb192ee7286e0005ca19d731fe225d33 | 867 | exs | Elixir | test/grizzly/zwave/commands/multi_channel_aggregated_members_get_test.exs | jellybob/grizzly | 290bee04cb16acbb9dc996925f5c501697b7ac94 | [
"Apache-2.0"
] | 76 | 2019-09-04T16:56:58.000Z | 2022-03-29T06:54:36.000Z | test/grizzly/zwave/commands/multi_channel_aggregated_members_get_test.exs | jellybob/grizzly | 290bee04cb16acbb9dc996925f5c501697b7ac94 | [
"Apache-2.0"
] | 124 | 2019-09-05T14:01:24.000Z | 2022-02-28T22:58:14.000Z | test/grizzly/zwave/commands/multi_channel_aggregated_members_get_test.exs | jellybob/grizzly | 290bee04cb16acbb9dc996925f5c501697b7ac94 | [
"Apache-2.0"
] | 10 | 2019-10-23T19:25:45.000Z | 2021-11-17T13:21:20.000Z | defmodule Grizzly.ZWave.Commands.MultiChannelAggregatedMembersGetTest do
use ExUnit.Case, async: true
alias Grizzly.ZWave.Commands.MultiChannelAggregatedMembersGet
test "creates the command and validates params" do
params = [aggregated_end_point: 1]
{:ok, _command} = MultiChannelAggregatedMembersGet.new... | 36.125 | 85 | 0.756632 |
035c074998ca891742a5a2d4cf4848953480b0b0 | 760 | ex | Elixir | lib/omise/bank_account.ex | keeratita/omise-elixir | 2c89fe9ca60a8c2a8f5e523e7f7a6d51a68c0ed6 | [
"MIT"
] | 12 | 2016-09-10T16:17:32.000Z | 2020-06-04T01:35:54.000Z | lib/omise/bank_account.ex | keeratita/omise-elixir | 2c89fe9ca60a8c2a8f5e523e7f7a6d51a68c0ed6 | [
"MIT"
] | 8 | 2016-09-19T05:36:27.000Z | 2020-09-14T08:46:06.000Z | lib/omise/bank_account.ex | keeratita/omise-elixir | 2c89fe9ca60a8c2a8f5e523e7f7a6d51a68c0ed6 | [
"MIT"
] | 10 | 2016-07-19T05:03:01.000Z | 2021-02-08T03:20:54.000Z | defmodule Omise.BankAccount do
@moduledoc ~S"""
Omise Bank Account Struct.
<https://www.omise.co/bank-account-api>
"""
defstruct object: "bank_account",
brand: nil,
bank_code: nil,
branch_code: nil,
account_type: nil,
last_digits: nil,
... | 23.75 | 41 | 0.497368 |
035c4ce8751bf874a5723b6b187e95173a28a861 | 2,380 | ex | Elixir | deps/ecto/lib/ecto/query/builder/dynamic.ex | rpillar/Top5_Elixir | 9c450d2e9b291108ff1465dc066dfe442dbca822 | [
"MIT"
] | null | null | null | deps/ecto/lib/ecto/query/builder/dynamic.ex | rpillar/Top5_Elixir | 9c450d2e9b291108ff1465dc066dfe442dbca822 | [
"MIT"
] | null | null | null | deps/ecto/lib/ecto/query/builder/dynamic.ex | rpillar/Top5_Elixir | 9c450d2e9b291108ff1465dc066dfe442dbca822 | [
"MIT"
] | null | null | null | import Kernel, except: [apply: 2]
defmodule Ecto.Query.Builder.Dynamic do
@moduledoc false
alias Ecto.Query.Builder
@doc """
Builds a dynamic expression.
"""
@spec build([Macro.t], Macro.t, Macro.Env.t) :: Macro.t
def build(binding, expr, env) do
{query, vars} = Builder.escape_binding(q... | 36.060606 | 95 | 0.578992 |
035c633409fcb27d9de111badd8494d7eaa5f513 | 1,357 | exs | Elixir | mix.exs | linjunpop/geetest | 91f21e01958e68d6d423c426ccf5c88d1f29342f | [
"MIT"
] | null | null | null | mix.exs | linjunpop/geetest | 91f21e01958e68d6d423c426ccf5c88d1f29342f | [
"MIT"
] | null | null | null | mix.exs | linjunpop/geetest | 91f21e01958e68d6d423c426ccf5c88d1f29342f | [
"MIT"
] | null | null | null | defmodule Geetest.Mixfile do
use Mix.Project
def project do
[app: :geetest,
version: "0.0.1",
name: "Geetest",
description: description,
source_url: "https://github.com/linjunpop/geetest",
homepage_url: "https://github.com/linjunpop/geetest",
elixir: "~> 1.2",
build_embedded:... | 21.887097 | 77 | 0.568165 |
035c8ebee5d7c03ce180f8831466f5157794ff7c | 3,010 | exs | Elixir | day_21/solution.exs | polarfoxgirl/advent-of-code-2020 | 549794d5aefca5d413b97a29244b228b470383bb | [
"Unlicense"
] | null | null | null | day_21/solution.exs | polarfoxgirl/advent-of-code-2020 | 549794d5aefca5d413b97a29244b228b470383bb | [
"Unlicense"
] | null | null | null | day_21/solution.exs | polarfoxgirl/advent-of-code-2020 | 549794d5aefca5d413b97a29244b228b470383bb | [
"Unlicense"
] | null | null | null | {:ok, input} = File.read("input")
defmodule AllergenAssessment do
def parse_line(line) do
regex = ~r/(.*) \(contains ([^\)]+)\)/
[ingredient_str, allergen_str] = Regex.run(regex, line, capture: :all_but_first)
ingredients = String.split(ingredient_str) |> MapSet.new()
allergens = String.split(allerge... | 33.820225 | 119 | 0.670432 |
035c9d8a143ac6caa56f189d9dc3087f5b648a6a | 1,217 | exs | Elixir | 13_organizing_a_project/issues/config/config.exs | gshaw/elixir | 8d2ff9b883242696008b35a715b2f13a8291772d | [
"MIT"
] | 1 | 2016-10-19T20:44:37.000Z | 2016-10-19T20:44:37.000Z | 13_organizing_a_project/issues/config/config.exs | gshaw/elixir | 8d2ff9b883242696008b35a715b2f13a8291772d | [
"MIT"
] | null | null | null | 13_organizing_a_project/issues/config/config.exs | gshaw/elixir | 8d2ff9b883242696008b35a715b2f13a8291772d | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the paren... | 35.794118 | 73 | 0.752671 |
035ca520e47a3fa3ece38d93ed6aab24e268dc83 | 641 | ex | Elixir | lib/exchema/types/optional.ex | bamorim/exchema | 4e11136fae6092e0e64870b455fd6a68cf36603c | [
"Apache-2.0"
] | 21 | 2018-01-06T22:33:20.000Z | 2020-02-07T18:49:22.000Z | lib/exchema/types/optional.ex | bamorim/exchema | 4e11136fae6092e0e64870b455fd6a68cf36603c | [
"Apache-2.0"
] | 5 | 2018-02-15T16:39:14.000Z | 2018-11-30T21:06:08.000Z | lib/exchema/types/optional.ex | bamorim/exchema | 4e11136fae6092e0e64870b455fd6a68cf36603c | [
"Apache-2.0"
] | 4 | 2018-05-21T21:26:27.000Z | 2019-04-17T16:45:14.000Z | defmodule Exchema.Types.Optional do
@moduledoc """
Represents a value which can be nil
You can specify the type when it is not nil, so if you want an
integer that can be nil you can represent it with
`{Exchema.Types.Optional, Exchema.Types.Integer}`
With that, either `nil` and `1` are valid values, howeve... | 22.103448 | 64 | 0.624025 |
035d9085154607f76d7635dcdfbf352de52e8c22 | 1,060 | ex | Elixir | test/support/conn_case.ex | tfwright/phoenix_live_vue_test | f560401c28fdf0132c33e4943a80357110d16160 | [
"MIT"
] | null | null | null | test/support/conn_case.ex | tfwright/phoenix_live_vue_test | f560401c28fdf0132c33e4943a80357110d16160 | [
"MIT"
] | 1 | 2021-05-11T13:17:32.000Z | 2021-05-11T13:17:32.000Z | test/support/conn_case.ex | tfwright/phoenix_live_vue_test | f560401c28fdf0132c33e4943a80357110d16160 | [
"MIT"
] | null | null | null | defmodule PhoenixLiveVueTestWeb.ConnCase do
@moduledoc """
This module defines the test case to be used by
tests that require setting up a connection.
Such tests rely on `Phoenix.ConnTest` and also
import other functionality to make it easier
to build common data structures and query the data layer.
Fin... | 30.285714 | 72 | 0.748113 |
035da60edabfe471b341ead23ac7ce80040e783e | 143 | ex | Elixir | lib/bootstrap_ex.ex | MortadaAK/bootstrap_ex | ee62af4e43978e801bd7f4bbea7e6e0e3e80c9d6 | [
"MIT"
] | null | null | null | lib/bootstrap_ex.ex | MortadaAK/bootstrap_ex | ee62af4e43978e801bd7f4bbea7e6e0e3e80c9d6 | [
"MIT"
] | null | null | null | lib/bootstrap_ex.ex | MortadaAK/bootstrap_ex | ee62af4e43978e801bd7f4bbea7e6e0e3e80c9d6 | [
"MIT"
] | null | null | null | defmodule BootstrapEx do
require BootstrapEx.Helper
require BootstrapEx.Alert
require BootstrapEx.Badge
require BootstrapEx.Breadcrumb
end
| 20.428571 | 31 | 0.86014 |
035dadb9acad2d38627fa03044de1cda410dc9ce | 3,811 | exs | Elixir | apps/mcam_server_web/test/mcam_server_web/live/unregistered_cameras_live_test.exs | paulanthonywilson/mcam | df9c5aaae00b568749dff22613636f5cb92f905a | [
"MIT"
] | null | null | null | apps/mcam_server_web/test/mcam_server_web/live/unregistered_cameras_live_test.exs | paulanthonywilson/mcam | df9c5aaae00b568749dff22613636f5cb92f905a | [
"MIT"
] | 8 | 2020-11-16T09:59:12.000Z | 2020-11-16T10:13:07.000Z | apps/mcam_server_web/test/mcam_server_web/live/unregistered_cameras_live_test.exs | paulanthonywilson/mcam | df9c5aaae00b568749dff22613636f5cb92f905a | [
"MIT"
] | null | null | null | defmodule McamServerWeb.UnregisteredCamerasLiveTest do
use McamServerWeb.ConnCase, async: true
import McamServer.AccountsFixtures
import Phoenix.ConnTest
import Phoenix.LiveViewTest
alias McamServer.UnregisteredCameras
import Common, only: [wait_until_equals: 2]
import McamServer.UnregisteredCamerasSu... | 34.333333 | 94 | 0.688533 |
035dbeff2c3e5ccd2110f1992dd38f00f0cc1b51 | 283 | ex | Elixir | lib/langue/formatter/xliff_1_2/xliff_1_2.ex | isshindev/accent | ae4c13139b0a0dfd64ff536b94c940a4e2862150 | [
"BSD-3-Clause"
] | 806 | 2018-04-07T20:40:33.000Z | 2022-03-30T01:39:57.000Z | lib/langue/formatter/xliff_1_2/xliff_1_2.ex | isshindev/accent | ae4c13139b0a0dfd64ff536b94c940a4e2862150 | [
"BSD-3-Clause"
] | 194 | 2018-04-07T13:49:37.000Z | 2022-03-30T19:58:45.000Z | lib/langue/formatter/xliff_1_2/xliff_1_2.ex | doc-ai/accent | e337e16f3658cc0728364f952c0d9c13710ebb06 | [
"BSD-3-Clause"
] | 89 | 2018-04-09T13:55:49.000Z | 2022-03-24T07:09:31.000Z | defmodule Langue.Formatter.XLIFF12 do
@behaviour Langue.Formatter
alias Langue.Formatter.XLIFF12.{Parser, Serializer}
def name, do: "xliff_1_2"
def placeholder_regex, do: :not_supported
defdelegate parse(map), to: Parser
defdelegate serialize(map), to: Serializer
end
| 23.583333 | 53 | 0.770318 |
035dc6a7b57af0cff5504bf808398fbfd5014d6b | 1,001 | ex | Elixir | test/support/data_case.ex | topherhunt/reassembling-the-line | c6823b3394ee98d9b0149fa3d09448928ac5c0db | [
"MIT"
] | 1 | 2019-04-27T15:39:20.000Z | 2019-04-27T15:39:20.000Z | test/support/data_case.ex | topherhunt/reassembling-the-line | c6823b3394ee98d9b0149fa3d09448928ac5c0db | [
"MIT"
] | 11 | 2020-07-16T11:40:53.000Z | 2021-08-16T07:03:33.000Z | test/support/data_case.ex | topherhunt/reassembling-the-line | c6823b3394ee98d9b0149fa3d09448928ac5c0db | [
"MIT"
] | null | null | null | defmodule RTL.DataCase do
@moduledoc """
This module defines the test case to be used by
model tests.
You may define functions here to be used as helpers in
your model tests. See `errors_on/2`'s definition as reference.
Finally, if the test case interacts with the database,
it cannot be async. For this ... | 23.833333 | 65 | 0.692308 |
035dd3cb894219998530f3a23313d62f5664ee1b | 4,153 | ex | Elixir | lib/ssh_client_key_api.ex | sequin-io/ssh_client_key_api | 59b9fd80c0ee44e0db86a224f0006c19b1159531 | [
"MIT"
] | null | null | null | lib/ssh_client_key_api.ex | sequin-io/ssh_client_key_api | 59b9fd80c0ee44e0db86a224f0006c19b1159531 | [
"MIT"
] | null | null | null | lib/ssh_client_key_api.ex | sequin-io/ssh_client_key_api | 59b9fd80c0ee44e0db86a224f0006c19b1159531 | [
"MIT"
] | null | null | null | defmodule SSHClientKeyAPI do
@external_resource "README.md"
@moduledoc "README.md"
|> File.read!()
|> String.split("<!-- MDOC !-->")
|> Enum.fetch!(1)
alias SSHClientKeyAPI.KeyError
@behaviour :ssh_client_key_api
@key_algorithms :ssh.default_algorithms()[:public_key]
... | 27.503311 | 95 | 0.650373 |
035dda38eeadba57f684ca37d671b0de9e6558fe | 179 | exs | Elixir | priv/repo/migrations/20160412184358_create_post.exs | judas-christ/final-forum | c42f0f1a2913eb2373353779ced9b4566183422b | [
"MIT"
] | null | null | null | priv/repo/migrations/20160412184358_create_post.exs | judas-christ/final-forum | c42f0f1a2913eb2373353779ced9b4566183422b | [
"MIT"
] | null | null | null | priv/repo/migrations/20160412184358_create_post.exs | judas-christ/final-forum | c42f0f1a2913eb2373353779ced9b4566183422b | [
"MIT"
] | null | null | null | defmodule FinalForum.Repo.Migrations.CreatePost do
use Ecto.Migration
def change do
create table(:posts) do
add :body, :string
timestamps
end
end
end
| 13.769231 | 50 | 0.681564 |
035de2083a0074e6d0b37ba8df35c512c2d8024c | 1,208 | ex | Elixir | lib/ex_raja_ongkir/request.ex | giraphme/ex_raja_ongkir | 6c7e7a811879d0adfd7eb574d0bbc665f1b7084d | [
"MIT"
] | null | null | null | lib/ex_raja_ongkir/request.ex | giraphme/ex_raja_ongkir | 6c7e7a811879d0adfd7eb574d0bbc665f1b7084d | [
"MIT"
] | 1 | 2018-04-24T08:27:20.000Z | 2018-04-24T08:27:20.000Z | lib/ex_raja_ongkir/request.ex | giraphme/ex_raja_ongkir | 6c7e7a811879d0adfd7eb574d0bbc665f1b7084d | [
"MIT"
] | null | null | null | defmodule ExRajaOngkir.Request do
use HTTPotion.Base
def process_url(url) do
ExRajaOngkir.base_url() <> url
end
def process_request_headers(headers) do
headers
|> Keyword.put(:key, ExRajaOngkir.api_key())
end
def process_response_body(body) do
body |> Jason.decode!()
end
def cast_to(... | 21.963636 | 95 | 0.593543 |
035df157cd15828f90f097e07d84b9fae3ec1341 | 2,397 | ex | Elixir | lib/ticketo_web/resolvers/session_resolver.ex | alejandronanez/phoenix-absinthe-auth-template | e4e72f52247cb4c880ddc058beaa7b5eecb68980 | [
"MIT"
] | 8 | 2020-06-25T03:15:06.000Z | 2021-12-10T10:52:26.000Z | lib/ticketo_web/resolvers/session_resolver.ex | alejandronanez/phoenix-absinthe-auth-template | e4e72f52247cb4c880ddc058beaa7b5eecb68980 | [
"MIT"
] | null | null | null | lib/ticketo_web/resolvers/session_resolver.ex | alejandronanez/phoenix-absinthe-auth-template | e4e72f52247cb4c880ddc058beaa7b5eecb68980 | [
"MIT"
] | null | null | null | defmodule TicketoWeb.Resolvers.SessionResolver do
@auth_error "Something went wrong"
@logged_out_map %{message: "Logged out"}
@moduledoc """
Session Resolver. Takes care of:
- Login users
Should take care of:
- Refresh tokens
- Register users
"""
alias Ticketo.Accounts
alias Ticketo.Tokens.Tokens... | 27.238636 | 96 | 0.631623 |
035e2c6c81a72fbeba67ea475c30d355ab5be187 | 2,152 | ex | Elixir | clients/app_engine/lib/google_api/app_engine/v1/deserializer.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/app_engine/lib/google_api/app_engine/v1/deserializer.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/app_engine/lib/google_api/app_engine/v1/deserializer.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... | 35.866667 | 139 | 0.688197 |
035e38bd8a1eb0e0170dc3f7ef92bdd2bef6a905 | 1,946 | ex | Elixir | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1beta2__explicit_content_frame.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1beta2__explicit_content_frame.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1beta2__explicit_content_frame.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 33.551724 | 133 | 0.749229 |
035e7348392ac62bab37ed0c3db48359424ee52f | 4,515 | ex | Elixir | lib/grapple/hook.ex | bka9/grapple | 0506220256e8d7e99943648aef9300d36e045d2d | [
"MIT"
] | null | null | null | lib/grapple/hook.ex | bka9/grapple | 0506220256e8d7e99943648aef9300d36e045d2d | [
"MIT"
] | null | null | null | lib/grapple/hook.ex | bka9/grapple | 0506220256e8d7e99943648aef9300d36e045d2d | [
"MIT"
] | null | null | null | defmodule Grapple.Hook do
@moduledoc false
use GenServer
@http Application.get_env(:grapple, :http, HTTPoison)
@enforce_keys [:url]
defstruct [
:url,
:api_key,
:owner,
:life,
:ref,
:interval,
method: "GET",
body: %{},
headers: [],
options: [],
query: %{}
]
# ... | 26.098266 | 106 | 0.647176 |
035ec6b16f4a4eae60ef2998c183fc01306bdcdc | 485 | ex | Elixir | lib/app_web/views/image_view.ex | ThanhUong/Chronos | 5e1b0823c585b784f5c51212513d518cab53a571 | [
"MIT"
] | null | null | null | lib/app_web/views/image_view.ex | ThanhUong/Chronos | 5e1b0823c585b784f5c51212513d518cab53a571 | [
"MIT"
] | null | null | null | lib/app_web/views/image_view.ex | ThanhUong/Chronos | 5e1b0823c585b784f5c51212513d518cab53a571 | [
"MIT"
] | null | null | null | defmodule AppWeb.ImageView do
use AppWeb, :view
alias AppWeb.ImageView
alias App.FileImage
def render("index.json", %{images: images}) do
%{data: render_many(images, ImageView, "image.json")}
end
def render("show.json", %{image: image}) do
%{data: render_one(image, ImageView, "image.json")}
end
... | 22.045455 | 57 | 0.645361 |
035ecda48abfe6d7f141c4c070f043778b9e4cc3 | 1,832 | ex | Elixir | lib/ex_bank_id/auth.ex | anfly0/exBankID | 8e62f4250b533543a6b4b423b0c2fb3ec262dc7b | [
"MIT"
] | 15 | 2020-08-05T11:20:03.000Z | 2021-09-22T15:20:41.000Z | lib/ex_bank_id/auth.ex | anfly0/exBankID | 8e62f4250b533543a6b4b423b0c2fb3ec262dc7b | [
"MIT"
] | 9 | 2020-08-10T14:42:27.000Z | 2021-06-14T14:45:05.000Z | lib/ex_bank_id/auth.ex | anfly0/exBankID | 8e62f4250b533543a6b4b423b0c2fb3ec262dc7b | [
"MIT"
] | 2 | 2020-08-10T13:42:15.000Z | 2020-10-03T04:10:06.000Z | defmodule ExBankID.Auth do
def options() do
[
url: [
type: :string,
default:
Application.get_env(:ex_bank_id, :url, "https://appapi2.test.bankid.com/rp/v5.1/")
],
cert_file: [
type: :string,
default:
Application.get_env(:ex_bank_id, :cert_file,... | 38.166667 | 231 | 0.63155 |
035f3f647ce5ca6fc085ab0bb39a396ab20fd7ad | 717 | ex | Elixir | apps/dead_letter/lib/dead_letter.ex | PillarTechnology/smartcitiesdata | 9420a26820e38267513cd1bfa82c7f5583222bb1 | [
"Apache-2.0"
] | null | null | null | apps/dead_letter/lib/dead_letter.ex | PillarTechnology/smartcitiesdata | 9420a26820e38267513cd1bfa82c7f5583222bb1 | [
"Apache-2.0"
] | null | null | null | apps/dead_letter/lib/dead_letter.ex | PillarTechnology/smartcitiesdata | 9420a26820e38267513cd1bfa82c7f5583222bb1 | [
"Apache-2.0"
] | null | null | null | defmodule DeadLetter do
@moduledoc """
Provides functions and processes for sanitizing
messages that are unable to be processed by a standard
data processing pipeline and sending them to a configurable
dead letter message queue service.
"""
defdelegate start_link(opts), to: DeadLetter.Supervisor
defde... | 37.736842 | 149 | 0.737796 |
035f53ae0d32bb586787b0629a5eb909d8c4283f | 3,054 | ex | Elixir | lib/ex_unit/lib/ex_unit/capture_server.ex | chulkilee/elixir | 699231dcad52916a76f38856cbd7cf7c7bdadc51 | [
"Apache-2.0"
] | 2 | 2018-11-15T06:38:14.000Z | 2018-11-17T18:03:14.000Z | lib/ex_unit/lib/ex_unit/capture_server.ex | chulkilee/elixir | 699231dcad52916a76f38856cbd7cf7c7bdadc51 | [
"Apache-2.0"
] | 1 | 2018-09-10T23:36:45.000Z | 2018-09-10T23:36:45.000Z | lib/ex_unit/lib/ex_unit/capture_server.ex | chulkilee/elixir | 699231dcad52916a76f38856cbd7cf7c7bdadc51 | [
"Apache-2.0"
] | 8 | 2018-02-20T18:30:53.000Z | 2019-06-18T14:23:31.000Z | defmodule ExUnit.CaptureServer do
@moduledoc false
@timeout 30000
@name __MODULE__
use GenServer
def start_link(_opts) do
GenServer.start_link(__MODULE__, :ok, name: @name)
end
def device_capture_on(device, pid) do
GenServer.call(@name, {:device_capture_on, device, pid}, @timeout)
end
def ... | 24.432 | 71 | 0.617551 |
035f57d4fd51cf4010a834db255b8d0c7dcea694 | 1,006 | ex | Elixir | lib/sequence/sequence_manager.ex | FarmBot-Labs/laughing-octo-telegram | 9d3d161362b17da82378c51a815f4c46e0a7a09d | [
"MIT"
] | 2 | 2016-09-18T03:06:37.000Z | 2016-12-26T23:55:40.000Z | lib/sequence/sequence_manager.ex | FarmBot-Labs/laughing-octo-telegram | 9d3d161362b17da82378c51a815f4c46e0a7a09d | [
"MIT"
] | 3 | 2016-09-30T08:38:15.000Z | 2016-10-01T19:26:10.000Z | lib/sequence/sequence_manager.ex | FarmBot-Labs/laughing-octo-telegram | 9d3d161362b17da82378c51a815f4c46e0a7a09d | [
"MIT"
] | 5 | 2016-09-30T17:13:42.000Z | 2021-01-06T17:58:15.000Z | alias Experimental.{GenStage}
defmodule SequenceManager do
use GenStage
def start_link() do
GenStage.start_link(__MODULE__, :ok, name: __MODULE__)
end
def sync_notify(event, timeout \\ 5000) do
GenStage.call(__MODULE__, {:notify, event}, timeout)
end
def init(:ok) do
{:producer, {:queue.new, 0... | 28.742857 | 74 | 0.66998 |
035f7b1f7deaf062ca3a5c9b14b8e8bd7a27bb49 | 157 | ex | Elixir | test/support/time_helper.ex | RobertDober/lab42_f | 2bf3aa3a82db337192d0e0fca3bf5cf7d153f8c3 | [
"Apache-2.0"
] | null | null | null | test/support/time_helper.ex | RobertDober/lab42_f | 2bf3aa3a82db337192d0e0fca3bf5cf7d153f8c3 | [
"Apache-2.0"
] | null | null | null | test/support/time_helper.ex | RobertDober/lab42_f | 2bf3aa3a82db337192d0e0fca3bf5cf7d153f8c3 | [
"Apache-2.0"
] | null | null | null | defmodule Test.Support.TimeHelper do
def ntime(y, m, d, h \\ 0, mi \\ 0, s \\ 0, ms \\ {0, 0}) do
NaiveDateTime.new!(y, m, d, h, mi, s, ms)
end
end
| 22.428571 | 62 | 0.55414 |
035f7d624a757dcca98880c0b813ecc91dbb44bd | 2,680 | ex | Elixir | clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_search_related_account_group_memberships_request.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_search_related_account_group_memberships_request.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_search_related_account_group_memberships_request.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... | 44.666667 | 337 | 0.762313 |
035f94fd6d59e3dbeeaac9c27e26b72fee0ad027 | 4,842 | ex | Elixir | clients/page_speed_online/lib/google_api/page_speed_online/v5/model/renderer_formatted_strings.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/page_speed_online/lib/google_api/page_speed_online/v5/model/renderer_formatted_strings.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/page_speed_online/lib/google_api/page_speed_online/v5/model/renderer_formatted_strings.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... | 50.4375 | 151 | 0.706939 |
035f9d400bbac280cf6cd29799b6879da541e0f4 | 2,039 | ex | Elixir | apps/world/lib/world/zone_controller.ex | smartlogic/elixir-node-balancing | ddf1ae7ff71f93b7decafa679b2fa4b5fb1937c4 | [
"MIT"
] | 1 | 2017-12-01T23:09:10.000Z | 2017-12-01T23:09:10.000Z | apps/world/lib/world/zone_controller.ex | smartlogic/elixir-node-balancing | ddf1ae7ff71f93b7decafa679b2fa4b5fb1937c4 | [
"MIT"
] | null | null | null | apps/world/lib/world/zone_controller.ex | smartlogic/elixir-node-balancing | ddf1ae7ff71f93b7decafa679b2fa4b5fb1937c4 | [
"MIT"
] | null | null | null | defmodule World.ZoneController do
@moduledoc """
GenServer that connects with other zone controllers to spawn zones
"""
use GenServer
require Logger
alias World.Zone
def start_link(_) do
GenServer.start_link(__MODULE__, nil, name: __MODULE__)
end
def start_zone(pid, zone) do
GenServer.call... | 23.709302 | 68 | 0.635115 |
035fb88de7ccc1262911cd1461458374d98909c0 | 238 | ex | Elixir | packages/engine_umbrella/apps/message_generator/lib/osrm.ex | PredictiveMovement/predictivemovement | f5e62d4aed4d2068026aecf3f7f8b6749a0b0563 | [
"MIT"
] | 2 | 2021-12-09T16:06:51.000Z | 2021-12-09T16:06:55.000Z | packages/engine_umbrella/apps/message_generator/lib/osrm.ex | PredictiveMovement/predictivemovement | f5e62d4aed4d2068026aecf3f7f8b6749a0b0563 | [
"MIT"
] | 18 | 2021-09-20T08:04:41.000Z | 2021-11-08T14:58:47.000Z | packages/engine_umbrella/apps/message_generator/lib/osrm.ex | PredictiveMovement/predictivemovement | f5e62d4aed4d2068026aecf3f7f8b6749a0b0563 | [
"MIT"
] | null | null | null | defmodule MessageGenerator.Osrm do
@osrmBase "https://osrm.iteamdev.io/"
def nearest(%{lon: lon, lat: lat}) do
HTTPoison.get!("#{@osrmBase}nearest/v1/driving/#{lon},#{lat}")
|> Map.get(:body)
|> Jason.decode!()
end
end
| 23.8 | 66 | 0.634454 |
035fbf419c44e3a31281df40de3946abc95bbac3 | 3,807 | ex | Elixir | lib/mix/lib/mix/tasks/run.ex | xtian/elixir | c680eb1a3992309c272e8f808e15990ea5318d6e | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/tasks/run.ex | xtian/elixir | c680eb1a3992309c272e8f808e15990ea5318d6e | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/tasks/run.ex | xtian/elixir | c680eb1a3992309c272e8f808e15990ea5318d6e | [
"Apache-2.0"
] | null | null | null | defmodule Mix.Tasks.Run do
use Mix.Task
@shortdoc "Runs the given file or expression"
@moduledoc """
Runs the given file or expression in the context of the application.
You can use this task to execute a particular file or command:
mix run -e Hello.world
mix run my_script.exs
This task pro... | 29.742188 | 98 | 0.620436 |
035fca3c9623ba05a22fe0c6a678ca336b3c5464 | 75 | exs | Elixir | test/notifications/email_test.exs | troelsim/matchalert | 9379796b3046e0ce28674432568f9cb5b01aab6f | [
"Apache-2.0"
] | null | null | null | test/notifications/email_test.exs | troelsim/matchalert | 9379796b3046e0ce28674432568f9cb5b01aab6f | [
"Apache-2.0"
] | null | null | null | test/notifications/email_test.exs | troelsim/matchalert | 9379796b3046e0ce28674432568f9cb5b01aab6f | [
"Apache-2.0"
] | null | null | null | defmodule EmailTest do
use ExUnit.Case
doctest Notifications.Email
end
| 15 | 29 | 0.813333 |
035fcc82cb17a8fecede3f7ec31576a697c34c92 | 2,285 | exs | Elixir | services/fc_identity/mix.exs | dclausen/freshcom | 7e1d6397c8ab222cfd03830232cee0718f050490 | [
"BSD-3-Clause"
] | null | null | null | services/fc_identity/mix.exs | dclausen/freshcom | 7e1d6397c8ab222cfd03830232cee0718f050490 | [
"BSD-3-Clause"
] | null | null | null | services/fc_identity/mix.exs | dclausen/freshcom | 7e1d6397c8ab222cfd03830232cee0718f050490 | [
"BSD-3-Clause"
] | null | null | null | defmodule FCIdentity.MixProject do
use Mix.Project
def project do
[
app: :fc_identity,
name: "Freshcom Identity",
version: "0.1.0",
elixir: "~> 1.7",
elixirc_paths: elixirc_paths(Mix.env),
start_permanent: Mix.env() == :prod,
deps: deps(),
docs: docs()
]
en... | 24.569892 | 69 | 0.597812 |
036010c66bcc0dac462dc8448cdd577e7e40f2b9 | 433 | ex | Elixir | lib/applicator.ex | krisztian-adam-liqid/ev | a4733d531967f0f4d4066f4e33b58a7414702a15 | [
"MIT"
] | 2 | 2021-12-29T15:37:34.000Z | 2022-01-12T23:52:47.000Z | lib/applicator.ex | krisztian-adam-liqid/ev | a4733d531967f0f4d4066f4e33b58a7414702a15 | [
"MIT"
] | null | null | null | lib/applicator.ex | krisztian-adam-liqid/ev | a4733d531967f0f4d4066f4e33b58a7414702a15 | [
"MIT"
] | 1 | 2022-01-31T11:07:57.000Z | 2022-01-31T11:07:57.000Z | defmodule EV.Applicator do
@moduledoc """
Defines a behaviour for applicators.
Applicators process events when applied. They should call the given handler.
May also persist a given event to a database.
"""
@callback call(
changeset :: Ecto.Changeset.t(),
handler :: (EV.Event.t(... | 28.866667 | 78 | 0.579677 |
03601ba21654775b194d137d84677e6f11203ab3 | 781 | exs | Elixir | test/janus_test.exs | naramore/janus | 90f7324c5ed667b803472dc89ee8e84d82c1d6d2 | [
"MIT"
] | null | null | null | test/janus_test.exs | naramore/janus | 90f7324c5ed667b803472dc89ee8e84d82c1d6d2 | [
"MIT"
] | null | null | null | test/janus_test.exs | naramore/janus | 90f7324c5ed667b803472dc89ee8e84d82c1d6d2 | [
"MIT"
] | null | null | null | defmodule JanusTest do
use ExUnit.Case
use ExUnitProperties
doctest Janus
end
defmodule Janus.GraphTest do
use ExUnit.Case
use ExUnitProperties
doctest Janus.Graph
end
defmodule Janus.PlanTest do
use ExUnit.Case
use ExUnitProperties
doctest Janus.Plan
end
defmodule Janus.PlannerTest do
use ExUnit... | 16.270833 | 32 | 0.798976 |
03601bc331dda5930e6d011cf518108afbe5eb5f | 3,313 | ex | Elixir | lib/abbr/mnesia/sync.ex | elvanja/abbr | b09954df2f68f71c03f308b01927f032bf692ac4 | [
"MIT"
] | 14 | 2020-03-25T22:10:42.000Z | 2021-02-04T01:31:40.000Z | lib/abbr/mnesia/sync.ex | elvanja/abbr | b09954df2f68f71c03f308b01927f032bf692ac4 | [
"MIT"
] | null | null | null | lib/abbr/mnesia/sync.ex | elvanja/abbr | b09954df2f68f71c03f308b01927f032bf692ac4 | [
"MIT"
] | null | null | null | defmodule Abbr.Mnesia.Sync do
@moduledoc """
Ensures cache stays in sync across cluster.
Flow:
- monitors the `:inconsistent_database` mnesia system event
- and merges local cache with (potentially) out of sync node
"""
alias Abbr.Cache
alias Abbr.Mnesia.Local
alias Abbr.Mnesia.Url
alias Memento.S... | 28.076271 | 106 | 0.667371 |
036057a47328c09aa1e616669f2ee5312800f410 | 12,957 | ex | Elixir | apps/evm/lib/evm/operation.ex | InoMurko/ethereum | 282ca2a23a897c5b9684ddf9abae2bf65691b039 | [
"MIT"
] | 22 | 2017-06-22T02:50:34.000Z | 2022-01-26T20:43:21.000Z | apps/evm/lib/evm/operation.ex | InoMurko/ethereum | 282ca2a23a897c5b9684ddf9abae2bf65691b039 | [
"MIT"
] | 9 | 2018-10-08T22:56:56.000Z | 2018-10-18T20:41:55.000Z | apps/evm/lib/evm/operation.ex | InoMurko/ethereum | 282ca2a23a897c5b9684ddf9abae2bf65691b039 | [
"MIT"
] | 5 | 2018-10-06T16:30:48.000Z | 2022-01-26T20:43:26.000Z | defmodule EVM.Operation do
@moduledoc """
Code to handle encoding and decoding
operations from opcodes.
"""
alias MathHelper
alias EVM.Helpers
alias EVM.ExecEnv
alias EVM.MachineState
alias EVM.Stack
alias EVM.SubState
alias EVM.Operation.Metadata.StopAndArithmetic, as: StopAndArithmeticMetadata
... | 34.830645 | 191 | 0.672146 |
036057ebea4b6c5d7a3793af354c3d9ae060e70c | 449 | ex | Elixir | lib/yatzy/scoring/four_of_a_kind.ex | idabmat/yatzy | fb1cc1f13670a19f3541a3b1df15e9897ffcfae3 | [
"MIT"
] | 3 | 2020-04-23T14:38:39.000Z | 2020-05-03T17:20:32.000Z | lib/yatzy/scoring/four_of_a_kind.ex | idabmat/yatzy | fb1cc1f13670a19f3541a3b1df15e9897ffcfae3 | [
"MIT"
] | null | null | null | lib/yatzy/scoring/four_of_a_kind.ex | idabmat/yatzy | fb1cc1f13670a19f3541a3b1df15e9897ffcfae3 | [
"MIT"
] | null | null | null | defmodule Yatzy.Scoring.FourOfAKind do
@moduledoc """
Four of a Kind: Four dice with the same number. Score: Sum of those four dice.
"""
alias Yatzy.Roll
defstruct roll: %Roll{},
name: "Four of a Kind",
description: "Four dice with the same number.",
score: "Sum of those ... | 26.411765 | 80 | 0.641425 |
0360645e5fc17ec368697bccbab8e7d4739b884e | 338 | ex | Elixir | lib/aql/filter.ex | elbow-jason/durango | a31b5636789ef275f19963343eda03d10ebc3ca0 | [
"MIT"
] | 7 | 2018-03-04T14:33:46.000Z | 2020-10-26T17:32:23.000Z | lib/aql/filter.ex | elbow-jason/durango | a31b5636789ef275f19963343eda03d10ebc3ca0 | [
"MIT"
] | 5 | 2018-08-01T07:29:02.000Z | 2018-12-31T12:59:16.000Z | lib/aql/filter.ex | elbow-jason/durango | a31b5636789ef275f19963343eda03d10ebc3ca0 | [
"MIT"
] | null | null | null | defmodule Durango.AQL.Filter do
defmacro inject_parser() do
quote do
alias Durango.Query
alias Durango.Dsl
def parse_query(%Query{} = q, [{:filter, expr} | rest ]) do
q
|> Query.append_tokens("FILTER")
|> Dsl.parse_expr(expr)
|> Dsl.parse_query(rest)
end
... | 18.777778 | 65 | 0.58284 |
03606d025c99090108d85ae93bae8437e4037e5d | 2,527 | ex | Elixir | clients/data_catalog/lib/google_api/data_catalog/v1beta1/model/google_cloud_datacatalog_v1beta1_search_catalog_response.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/data_catalog/lib/google_api/data_catalog/v1beta1/model/google_cloud_datacatalog_v1beta1_search_catalog_response.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/data_catalog/lib/google_api/data_catalog/v1beta1/model/google_cloud_datacatalog_v1beta1_search_catalog_response.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... | 36.1 | 156 | 0.738029 |
03607177314d5f237386bd2bfa7b8d0bc68d4c35 | 17,125 | ex | Elixir | lib/commanded/aggregates/aggregate.ex | ThisisGurwinder/commanded | ad7784ce3125022e188ea795771710c4e5e38e71 | [
"MIT"
] | null | null | null | lib/commanded/aggregates/aggregate.ex | ThisisGurwinder/commanded | ad7784ce3125022e188ea795771710c4e5e38e71 | [
"MIT"
] | null | null | null | lib/commanded/aggregates/aggregate.ex | ThisisGurwinder/commanded | ad7784ce3125022e188ea795771710c4e5e38e71 | [
"MIT"
] | null | null | null | defmodule Commanded.Aggregates.Aggregate do
@moduledoc """
Aggregate is a `GenServer` process used to provide access to an
instance of an event sourced aggregate.
It allows execution of commands against an aggregate instance, and handles
persistence of created events to the configured event store. Concurrent... | 32.18985 | 145 | 0.689635 |
03608cce4e581e8a63f0069817dbde95275c5b4f | 644 | ex | Elixir | lib/rasa_sdk/model/response_rejected.ex | r26D/rasa-sdk-elixir | 65da9444add5da2e2c0989c36bcbdf902733c709 | [
"Apache-2.0"
] | 2 | 2020-09-24T09:58:52.000Z | 2021-02-08T12:35:55.000Z | lib/rasa_sdk/model/response_rejected.ex | r26D/rasa-sdk-elixir | 65da9444add5da2e2c0989c36bcbdf902733c709 | [
"Apache-2.0"
] | null | null | null | lib/rasa_sdk/model/response_rejected.ex | r26D/rasa-sdk-elixir | 65da9444add5da2e2c0989c36bcbdf902733c709 | [
"Apache-2.0"
] | null | null | null | # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://openapi-generator.tech
# Do not edit the class manually.
defmodule RasaSDK.Model.ResponseRejected do
@moduledoc """
Action execution was rejected. This is the same as returning an `ActionExecutionRejected... | 23.851852 | 108 | 0.684783 |
0360a057f16c74e6b80007b425ca0c5c2049e42d | 583 | exs | Elixir | config/test.exs | rmartinsc/livrodealemao | 337e2b7f5bd6de6b84d6ec44a37a839bee71319e | [
"MIT"
] | null | null | null | config/test.exs | rmartinsc/livrodealemao | 337e2b7f5bd6de6b84d6ec44a37a839bee71319e | [
"MIT"
] | null | null | null | config/test.exs | rmartinsc/livrodealemao | 337e2b7f5bd6de6b84d6ec44a37a839bee71319e | [
"MIT"
] | null | null | null | use Mix.Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :livrodealemao, LivrodealemaoWeb.Endpoint,
http: [port: 4002],
server: false
# Print only warnings and errors during test
config :logger, level: :warn
# Configure your database
config :livrode... | 30.684211 | 57 | 0.74271 |
0360b6026568aef4881eb6fd56057f1dc3d8fba3 | 944 | ex | Elixir | lib/straw_hat_map/locations/location_entity.ex | straw-hat-team/straw_hat_map | df71340122852577b9df2ed2afcbcc4be879aba1 | [
"MIT"
] | 4 | 2018-03-07T04:12:36.000Z | 2018-03-08T16:13:14.000Z | lib/straw_hat_map/locations/location_entity.ex | straw-hat-labs/straw_hat_map | df71340122852577b9df2ed2afcbcc4be879aba1 | [
"MIT"
] | 61 | 2018-03-07T04:50:42.000Z | 2019-11-01T10:24:03.000Z | lib/straw_hat_map/locations/location_entity.ex | straw-hat-team/straw_hat_map | df71340122852577b9df2ed2afcbcc4be879aba1 | [
"MIT"
] | 2 | 2018-03-22T19:44:45.000Z | 2019-08-02T03:45:47.000Z | defmodule StrawHat.Map.Location do
@moduledoc """
A location entity.
"""
use StrawHat.Map.EctoSchema
alias StrawHat.Map.Address
@typedoc """
- `location`: a GeoJSON point using `Geo.Point.t/0`.
"""
@type t :: %__MODULE__{
id: String.t(),
location: Geo.Point.t(),
inserte... | 23.02439 | 58 | 0.615466 |
0360b8bb638644f68679e2de6dc45ab4dd368729 | 867 | ex | Elixir | test/example/elixir/apps/subscribe/lib/subscribe.ex | davedoesdev/centro | 1b1f693904dcb1ce955dced8fec03fd4c3a542f5 | [
"MIT"
] | 2 | 2017-12-05T13:06:22.000Z | 2019-12-29T11:48:04.000Z | test/example/elixir/apps/subscribe/lib/subscribe.ex | davedoesdev/centro | 1b1f693904dcb1ce955dced8fec03fd4c3a542f5 | [
"MIT"
] | 10 | 2019-11-02T09:55:14.000Z | 2022-02-26T02:07:44.000Z | test/example/elixir/apps/subscribe/lib/subscribe.ex | davedoesdev/centro | 1b1f693904dcb1ce955dced8fec03fd4c3a542f5 | [
"MIT"
] | null | null | null | defmodule Subscribe do
def main(topics) do
{:ok, _} = EventsourceEx.new(
"http://localhost:8802/centro/v2/subscribe?" <>
URI.encode_query([{"authz_token", System.get_env("CENTRO_TOKEN")} |
(for topic <- topics, do: {"topic", topic})]),
headers: [],
stream_to: self()... | 29.896552 | 74 | 0.584775 |
0360eb2aa14dc2ba8247c3a6508cac43c95b2b1f | 4,935 | exs | Elixir | test/attribute_repository_mnesia_test/write_test.exs | tanguilp/attribute_repository_mnesia | 9e8d6284716bbbe8d24b6f551cd295fbaf5d7674 | [
"Apache-2.0"
] | 1 | 2022-01-27T11:48:58.000Z | 2022-01-27T11:48:58.000Z | test/attribute_repository_mnesia_test/write_test.exs | tanguilp/attribute_repository_mnesia | 9e8d6284716bbbe8d24b6f551cd295fbaf5d7674 | [
"Apache-2.0"
] | null | null | null | test/attribute_repository_mnesia_test/write_test.exs | tanguilp/attribute_repository_mnesia | 9e8d6284716bbbe8d24b6f551cd295fbaf5d7674 | [
"Apache-2.0"
] | null | null | null | defmodule AttributeRepositoryMnesiaTest.Write do
use ExUnit.Case
@init_opts [instance: :test]
@run_opts [instance: :test]
setup_all do
AttributeRepositoryMnesia.install(@run_opts, @init_opts)
AttributeRepositoryMnesia.start(@init_opts)
end
setup do
AttributeRepositoryMnesia.delete("test_writ... | 24.798995 | 83 | 0.599189 |
03610ea65e8214e7cf6113da11cfc8820d9211d5 | 852 | exs | Elixir | mix.exs | sldab/mix_apidoc | cd73a9bba630de2fcbd9ce8e980a8f95494edc84 | [
"MIT"
] | 8 | 2015-12-18T20:31:09.000Z | 2019-01-07T20:20:41.000Z | mix.exs | techgaun/mix_apidoc | cd73a9bba630de2fcbd9ce8e980a8f95494edc84 | [
"MIT"
] | 6 | 2016-05-12T09:12:17.000Z | 2018-03-22T20:32:23.000Z | mix.exs | sldab/mix_apidoc | cd73a9bba630de2fcbd9ce8e980a8f95494edc84 | [
"MIT"
] | 3 | 2016-02-02T06:53:29.000Z | 2019-01-09T16:53:23.000Z | defmodule MixApidoc.Mixfile do
use Mix.Project
def project do
[app: :mix_apidoc,
version: "0.5.2",
description: "A mix task that triggers apidoc to create documentation " <>
"for RESTful web APIs from inline code annotations.",
package: package(),
elixir: "~> 1.0",
bu... | 24.342857 | 79 | 0.56338 |
03611619e3b4b14834df6c55aaf93c051f99e640 | 4,489 | exs | Elixir | apps/tai/test/tai/venue_adapters/okex/product_test.exs | chrism2671/tai-1 | 847827bd23908adfad4a82c83d5295bdbc022796 | [
"MIT"
] | null | null | null | apps/tai/test/tai/venue_adapters/okex/product_test.exs | chrism2671/tai-1 | 847827bd23908adfad4a82c83d5295bdbc022796 | [
"MIT"
] | null | null | null | apps/tai/test/tai/venue_adapters/okex/product_test.exs | chrism2671/tai-1 | 847827bd23908adfad4a82c83d5295bdbc022796 | [
"MIT"
] | 1 | 2020-05-03T23:32:11.000Z | 2020-05-03T23:32:11.000Z | defmodule Tai.VenuesAdapters.OkEx.ProductTest do
use ExUnit.Case, async: false
setup do
on_exit(fn ->
:ok = Application.stop(:tzdata)
end)
{:ok, _} = Application.ensure_all_started(:tzdata)
:ok
end
describe ".build/2" do
test "returns a product struct from a venue futures instrument... | 33.251852 | 74 | 0.634217 |
0361845aad193153cd376f56b9859f48a2461ae8 | 1,164 | ex | Elixir | apps/omg_watcher_rpc/lib/web/endpoint.ex | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | null | null | null | apps/omg_watcher_rpc/lib/web/endpoint.ex | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | null | null | null | apps/omg_watcher_rpc/lib/web/endpoint.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 ... | 27.714286 | 86 | 0.742268 |
0361b841c725833d29e406644a8ccde535abb695 | 3,287 | ex | Elixir | lib/changelog_web/meta/image.ex | type1fool/changelog.com | fbec3528cc3f5adfdc75b008bb92b17efc4f248f | [
"MIT"
] | 1 | 2020-05-20T16:58:17.000Z | 2020-05-20T16:58:17.000Z | lib/changelog_web/meta/image.ex | type1fool/changelog.com | fbec3528cc3f5adfdc75b008bb92b17efc4f248f | [
"MIT"
] | null | null | null | lib/changelog_web/meta/image.ex | type1fool/changelog.com | fbec3528cc3f5adfdc75b008bb92b17efc4f248f | [
"MIT"
] | null | null | null | defmodule ChangelogWeb.Meta.Image do
alias ChangelogWeb.Router.Helpers, as: Routes
alias ChangelogWeb.{Endpoint, NewsItemView, NewsSourceView, PageView,
PersonView, PodcastView, PostView, TopicView}
def fb_image(assigns), do: assigns |> get_fb()
def fb_image_width(assigns), do: assigns ... | 47.637681 | 133 | 0.722239 |
0361dc5f2cc13837cc89a0333d26a3ad0299b8c1 | 1,473 | ex | Elixir | clients/dns/lib/google_api/dns/v1/connection.ex | jechol/elixir-google-api | 0290b683dfc6491ca2ef755a80bc329378738d03 | [
"Apache-2.0"
] | null | null | null | clients/dns/lib/google_api/dns/v1/connection.ex | jechol/elixir-google-api | 0290b683dfc6491ca2ef755a80bc329378738d03 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/dns/lib/google_api/dns/v1/connection.ex | jechol/elixir-google-api | 0290b683dfc6491ca2ef755a80bc329378738d03 | [
"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.071429 | 74 | 0.726409 |
0361dcba991cbace3b98a4ee50966e81ae46cb80 | 1,755 | ex | Elixir | clients/firestore/lib/google_api/firestore/v1/model/precondition.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/firestore/lib/google_api/firestore/v1/model/precondition.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/firestore/lib/google_api/firestore/v1/model/precondition.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.1 | 182 | 0.724786 |
0361edbe8e43769f225c038cb8cf22ad3690148b | 39,087 | ex | Elixir | lib/client.ex | ElinksFr/alchemy | 4c64e5c619977a62a5674dbd2b1ef29f76f6f44e | [
"MIT"
] | null | null | null | lib/client.ex | ElinksFr/alchemy | 4c64e5c619977a62a5674dbd2b1ef29f76f6f44e | [
"MIT"
] | null | null | null | lib/client.ex | ElinksFr/alchemy | 4c64e5c619977a62a5674dbd2b1ef29f76f6f44e | [
"MIT"
] | null | null | null | defmodule Alchemy.Client do
@moduledoc """
Represents a Client connection to the Discord API. This is the main public
interface for the REST API.
As you might have seen in other examples, this module is the main entry
point for `Alchemy`. `start/2` will start up the necessary modules and caches
necessary t... | 28.282923 | 91 | 0.646762 |
036206af6bdea651df836d9d2d07b75b19ba1958 | 460 | ex | Elixir | lib/errors/cast_error.ex | ZennerIoT/casconf | 949ecef6bc52f381a952c16b17fd876f3ba51975 | [
"MIT"
] | 2 | 2019-03-27T12:02:05.000Z | 2019-05-22T03:08:57.000Z | lib/errors/cast_error.ex | ZennerIoT/casconf | 949ecef6bc52f381a952c16b17fd876f3ba51975 | [
"MIT"
] | null | null | null | lib/errors/cast_error.ex | ZennerIoT/casconf | 949ecef6bc52f381a952c16b17fd876f3ba51975 | [
"MIT"
] | null | null | null | defmodule Casconf.CastError do
defexception [
loader: nil,
loader_opts: nil,
value: nil,
type: nil
]
def exception(value) do
struct(__MODULE__, Keyword.take(value, ~w[loader loader_opts value type]a))
end
def message(%__MODULE__{} = error) do
load_description = error.loader.describe_... | 25.555556 | 105 | 0.702174 |
0362325ed30a576b3cb63e9687ec792e279074c6 | 1,973 | ex | Elixir | clients/reseller/lib/google_api/reseller/v1/model/subscription_plan_commitment_interval.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/reseller/lib/google_api/reseller/v1/model/subscription_plan_commitment_interval.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/reseller/lib/google_api/reseller/v1/model/subscription_plan_commitment_interval.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... | 39.46 | 212 | 0.749113 |
0362494b279b0759b438fc37295414ecc3bb155d | 12,693 | exs | Elixir | test/unit/hologram/compiler/transformer_test.exs | gregjohnsonsaltaire/hologram | aa8e9ea0d599def864c263cc37cc8ee31f02ac4a | [
"MIT"
] | 40 | 2022-01-19T20:27:36.000Z | 2022-03-31T18:17:41.000Z | test/unit/hologram/compiler/transformer_test.exs | gregjohnsonsaltaire/hologram | aa8e9ea0d599def864c263cc37cc8ee31f02ac4a | [
"MIT"
] | 42 | 2022-02-03T22:52:43.000Z | 2022-03-26T20:57:32.000Z | test/unit/hologram/compiler/transformer_test.exs | gregjohnsonsaltaire/hologram | aa8e9ea0d599def864c263cc37cc8ee31f02ac4a | [
"MIT"
] | 3 | 2022-02-10T04:00:37.000Z | 2022-03-08T22:07:45.000Z | defmodule Hologram.Compiler.TransformerTest do
use Hologram.Test.UnitCase, async: true
alias Hologram.Compiler.{Context, Transformer}
alias Hologram.Compiler.IR.{
AccessOperator,
AdditionOperator,
AliasDirective,
AnonymousFunctionCall,
AnonymousFunctionType,
AtomType,
BinaryType,
... | 22.952984 | 100 | 0.595368 |
03625a9c50293fbfdfd983fe90a8d2db9bf349d9 | 1,847 | exs | Elixir | mix.exs | walkr/rox | c2ac16299728fa59a9d0871b8b4634f09e113bc8 | [
"MIT"
] | 2 | 2018-10-23T21:33:42.000Z | 2019-03-30T00:22:19.000Z | mix.exs | walkr/rox | c2ac16299728fa59a9d0871b8b4634f09e113bc8 | [
"MIT"
] | null | null | null | mix.exs | walkr/rox | c2ac16299728fa59a9d0871b8b4634f09e113bc8 | [
"MIT"
] | 1 | 2018-10-23T01:44:48.000Z | 2018-10-23T01:44:48.000Z | defmodule Rox.Mixfile do
use Mix.Project
def project do
[
app: :rox,
version: "2.3.0",
elixir: "~> 1.4",
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
compilers: [:rustler] ++ Mix.compilers(),
rustler_crates: rustler_crates(),
package: ... | 20.988636 | 86 | 0.536546 |
03626e7b39bfdf2337c92186da6c9bf24559377b | 3,456 | exs | Elixir | samples/elixir/animals.exs | MateoCerquetella/dark-plus-syntax | c5afd61a0b7a0081b6e4c070a49cde71abfd3dce | [
"MIT"
] | 44 | 2018-06-17T03:37:04.000Z | 2022-01-31T06:28:02.000Z | samples/elixir/animals.exs | MateoCerquetella/dark-plus-syntax | c5afd61a0b7a0081b6e4c070a49cde71abfd3dce | [
"MIT"
] | 18 | 2018-04-01T10:25:20.000Z | 2021-06-24T09:38:06.000Z | samples/elixir/animals.exs | MateoCerquetella/dark-plus-syntax | c5afd61a0b7a0081b6e4c070a49cde71abfd3dce | [
"MIT"
] | 18 | 2018-07-27T17:08:54.000Z | 2022-01-20T09:08:53.000Z | defmodule Animals do
@moduledoc """
Red fish,
Blue fish,
```
def fish do
:fish
end
```
"""
@doc """
> Returns a list of zoo animals.
## Examples
iex> Animals.create_zoo
["lion", "tiger", "gorilla", "elephant", "monkey", "giraffe"]
"""
def create_zoo() do
["lion", "tiger... | 23.834483 | 84 | 0.639178 |
03627225cfae7940068121ae4bd1ccd83c033ff6 | 1,115 | exs | Elixir | config/config.exs | robot-overlord/up_run | 5656b9e584d9ce839372c6a6a367f2181ff8c09c | [
"MIT"
] | 3 | 2017-05-24T21:06:48.000Z | 2019-03-25T19:15:06.000Z | config/config.exs | robot-overlord/up_run | 5656b9e584d9ce839372c6a6a367f2181ff8c09c | [
"MIT"
] | null | null | null | config/config.exs | robot-overlord/up_run | 5656b9e584d9ce839372c6a6a367f2181ff8c09c | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the paren... | 35.967742 | 73 | 0.750673 |
03628a4153711a4a8482ac30e2e28f167df456cd | 1,307 | exs | Elixir | test/service_test.exs | icanmakeitbetter/decipher_api | 3e2152f8fd87f4a92489d08e0bd4f53d18e3c0d2 | [
"MIT"
] | null | null | null | test/service_test.exs | icanmakeitbetter/decipher_api | 3e2152f8fd87f4a92489d08e0bd4f53d18e3c0d2 | [
"MIT"
] | null | null | null | test/service_test.exs | icanmakeitbetter/decipher_api | 3e2152f8fd87f4a92489d08e0bd4f53d18e3c0d2 | [
"MIT"
] | null | null | null | defmodule DecipherAPITest.ServiceTest do
alias DecipherAPI.Service
alias DecipherAPITest.Support.FakeData
use ExUnit.Case, async: true
defp assert_error(response) do
assert Service.parse_response(response) |> elem(0) == :error
end
test "that 400 error returns an :error atom" do
FakeData.response_... | 23.339286 | 64 | 0.7215 |
036297687173f24575d59c2fadc7da04313f0dc6 | 868 | ex | Elixir | Microsoft.Azure.Management.Network/lib/microsoft/azure/management/network/model/packet_capture_query_status_result.ex | 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.Network/lib/microsoft/azure/management/network/model/packet_capture_query_status_result.ex | chgeuer/ex_microsoft_azure_management | 99cd9f7f2ff1fdbe69ca5bac55b6e2af91ba3603 | [
"Apache-2.0"
] | null | null | null | Microsoft.Azure.Management.Network/lib/microsoft/azure/management/network/model/packet_capture_query_status_result.ex | chgeuer/ex_microsoft_azure_management | 99cd9f7f2ff1fdbe69ca5bac55b6e2af91ba3603 | [
"Apache-2.0"
] | null | null | null | # 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 Microsoft.Azure.Management.Network.Model.PacketCaptureQueryStatusResult do
@moduledoc """
Status of packet capture session.
"""
@derive [... | 24.111111 | 103 | 0.684332 |
0362b2bccc2f9f7ad01d1eda2122134dc5999c5e | 2,050 | ex | Elixir | test/support/test_suite.ex | pukkamustard/rdf-ex | c459d8e7fa548fdfad82643338b68decf380a296 | [
"MIT"
] | null | null | null | test/support/test_suite.ex | pukkamustard/rdf-ex | c459d8e7fa548fdfad82643338b68decf380a296 | [
"MIT"
] | null | null | null | test/support/test_suite.ex | pukkamustard/rdf-ex | c459d8e7fa548fdfad82643338b68decf380a296 | [
"MIT"
] | null | null | null | defmodule RDF.TestSuite do
defmodule NS do
use RDF.Vocabulary.Namespace
defvocab MF,
base_iri: "http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#",
terms: [], strict: false
defvocab RDFT,
base_iri: "http://www.w3.org/ns/rdftest#",
terms: ~w[
TestTurtleEval
... | 28.082192 | 85 | 0.686341 |
0362e211b5a689a035820dbb5a6313e5de355e6a | 1,796 | ex | Elixir | clients/vault/lib/google_api/vault/v1/model/add_held_accounts_request.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/vault/lib/google_api/vault/v1/model/add_held_accounts_request.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/vault/lib/google_api/vault/v1/model/add_held_accounts_request.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 34.538462 | 137 | 0.722717 |
03630fa0b93b80599bed9502db36fc6d07ff4daa | 346 | ex | Elixir | lib/nebulex_redis_adapter/client_cluster/keyslot.ex | bjyoungblood/nebulex_redis_adapter | 8ecf19f91d1d332c39e3507831fbfabc800fcf2b | [
"MIT"
] | 20 | 2018-09-02T15:14:44.000Z | 2021-12-10T16:40:56.000Z | lib/nebulex_redis_adapter/client_cluster/keyslot.ex | bjyoungblood/nebulex_redis_adapter | 8ecf19f91d1d332c39e3507831fbfabc800fcf2b | [
"MIT"
] | 23 | 2018-10-26T19:49:11.000Z | 2022-03-23T22:37:25.000Z | lib/nebulex_redis_adapter/client_cluster/keyslot.ex | bjyoungblood/nebulex_redis_adapter | 8ecf19f91d1d332c39e3507831fbfabc800fcf2b | [
"MIT"
] | 17 | 2018-11-06T00:19:03.000Z | 2021-11-19T09:46:06.000Z | defmodule NebulexRedisAdapter.ClientCluster.Keyslot do
@moduledoc """
Default Keyslot implementation when `:jchash` module is loaded.
"""
use Nebulex.Adapter.Keyslot
if Code.ensure_loaded?(:jchash) do
@impl true
def hash_slot(key, range) do
key
|> :erlang.phash2()
|> :jchash.compute... | 21.625 | 65 | 0.676301 |
036312fd8455d2f5fa27990c070132573f590b54 | 16,304 | ex | Elixir | lib/plug/router.ex | codeadict/plug | c5e5cc04fe890054b0a03fbb9baeb2fcc49679a6 | [
"Apache-2.0"
] | null | null | null | lib/plug/router.ex | codeadict/plug | c5e5cc04fe890054b0a03fbb9baeb2fcc49679a6 | [
"Apache-2.0"
] | null | null | null | lib/plug/router.ex | codeadict/plug | c5e5cc04fe890054b0a03fbb9baeb2fcc49679a6 | [
"Apache-2.0"
] | null | null | null | defmodule Plug.Router do
@moduledoc ~S"""
A DSL to define a routing algorithm that works with Plug.
It provides a set of macros to generate routes. For example:
defmodule AppRouter do
use Plug.Router
plug :match
plug :dispatch
get "/hello" do
send_resp(conn, 200... | 30.937381 | 92 | 0.652969 |
0363490e1f5d6d837e19eaf5ef1f1b41af58bcfb | 5,639 | ex | Elixir | clients/drive/lib/google_api/drive/v3/model/drive_capabilities.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/drive/lib/google_api/drive/v3/model/drive_capabilities.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/drive/lib/google_api/drive/v3/model/drive_capabilities.ex | 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... | 55.831683 | 226 | 0.700479 |
03634d9803c51f423324ebfd9db0e438c3d1b5f2 | 882 | exs | Elixir | priv/repo/migrations/20180523013618_create_cms_jobs.exs | coderplanets/coderplanets_server | 3663e56340d6d050e974c91f7e499d8424fc25e9 | [
"Apache-2.0"
] | 240 | 2018-11-06T09:36:54.000Z | 2022-02-20T07:12:36.000Z | priv/repo/migrations/20180523013618_create_cms_jobs.exs | coderplanets/coderplanets_server | 3663e56340d6d050e974c91f7e499d8424fc25e9 | [
"Apache-2.0"
] | 363 | 2018-07-11T03:38:14.000Z | 2021-12-14T01:42:40.000Z | priv/repo/migrations/20180523013618_create_cms_jobs.exs | mydearxym/mastani_server | f24034a4a5449200165cf4a547964a0961793eab | [
"Apache-2.0"
] | 22 | 2019-01-27T11:47:56.000Z | 2021-02-28T13:17:52.000Z | defmodule GroupherServer.Repo.Migrations.CreateCmsJobs do
use Ecto.Migration
def change do
create table(:cms_jobs) do
add(:title, :string)
add(:company, :string)
add(:bonus, :string)
add(:company_logo, :string)
add(:location, :string)
add(:desc, :text)
add(:body, :text... | 28.451613 | 84 | 0.629252 |
0363b99f7369e0e4726d9252757d52d051b97d51 | 1,934 | ex | Elixir | lib/teslamate_web/plugs/locale_plug.ex | DP19/teslamate | 7218286f39d2689566dd7188264ebdb7aea62663 | [
"MIT"
] | null | null | null | lib/teslamate_web/plugs/locale_plug.ex | DP19/teslamate | 7218286f39d2689566dd7188264ebdb7aea62663 | [
"MIT"
] | null | null | null | lib/teslamate_web/plugs/locale_plug.ex | DP19/teslamate | 7218286f39d2689566dd7188264ebdb7aea62663 | [
"MIT"
] | null | null | null | defmodule TeslaMateWeb.LocalePlug do
import Plug.Conn
@max_age 365 * 24 * 60 * 60
def init(opts) do
[backend: Keyword.fetch!(opts, :backend)]
end
def call(conn, backend: backend) do
case fetch_locale(conn, backend) do
nil ->
conn
|> put_session(:locale, Gettext.get_locale(back... | 26.493151 | 90 | 0.676836 |
0363baa632e85a3a6dc3cde7e6f44e27a98a8008 | 317 | ex | Elixir | apps/rtc/lib/rtc/upgrade_buffer.ex | michaeljguarino/forge | 50ee583ecb4aad5dee4ef08fce29a8eaed1a0824 | [
"Apache-2.0"
] | 59 | 2021-09-16T19:29:39.000Z | 2022-03-31T20:44:24.000Z | apps/rtc/lib/rtc/upgrade_buffer.ex | svilenkov/plural | ac6c6cc15ac4b66a3b5e32ed4a7bee4d46d1f026 | [
"Apache-2.0"
] | 111 | 2021-08-15T09:56:37.000Z | 2022-03-31T23:59:32.000Z | apps/rtc/lib/rtc/upgrade_buffer.ex | svilenkov/plural | ac6c6cc15ac4b66a3b5e32ed4a7bee4d46d1f026 | [
"Apache-2.0"
] | 4 | 2021-12-13T09:43:01.000Z | 2022-03-29T18:08:44.000Z | defmodule Rtc.UpgradeBuffer do
defstruct [:last]
def new(), do: %__MODULE__{last: nil}
def append(%__MODULE__{last: nil} = buf, %{id: id}), do: %{buf | last: id}
def append(%__MODULE__{last: last} = buf, %{id: id}) when id > last,
do: %{buf | last: id}
def append(%__MODULE__{} = buf, _), do: buf
end
| 28.818182 | 76 | 0.615142 |
0363d8288f2ec4414962ad8fc2c4007e2c410cc2 | 788 | ex | Elixir | lib/gatehouse_web/auth/current_session.ex | trutvo/gatehouse | 027d4dd35703d84e15b9b2297347350b9a8f5a6b | [
"Apache-2.0"
] | 1 | 2019-07-21T03:48:31.000Z | 2019-07-21T03:48:31.000Z | lib/gatehouse_web/auth/current_session.ex | trutvo/gatehouse | 027d4dd35703d84e15b9b2297347350b9a8f5a6b | [
"Apache-2.0"
] | 1 | 2021-03-07T17:54:41.000Z | 2021-03-07T17:54:41.000Z | lib/gatehouse_web/auth/current_session.ex | trutvo/gatehouse | 027d4dd35703d84e15b9b2297347350b9a8f5a6b | [
"Apache-2.0"
] | 2 | 2019-06-14T06:25:25.000Z | 2019-07-21T03:48:33.000Z | defmodule Gatehouse.CurrentSession do
import Plug.Conn
import Guardian.Plug
def init(opts), do: opts
def call(conn, _opts) do
principal = current_resource(conn)
{:ok, token, _claims} = Gatehouse.Guardian.encode_and_sign(principal)
conn |> assign(:session, %{ principal: principal, token: token })
... | 24.625 | 73 | 0.706853 |
0363dd3d71d14942535ae226ca132099a119e068 | 1,931 | ex | Elixir | lib/manager.ex | easink/heos_ex | 7a897d253548528e7ab2dcadfdcb6c1cbb27179f | [
"Apache-2.0"
] | null | null | null | lib/manager.ex | easink/heos_ex | 7a897d253548528e7ab2dcadfdcb6c1cbb27179f | [
"Apache-2.0"
] | null | null | null | lib/manager.ex | easink/heos_ex | 7a897d253548528e7ab2dcadfdcb6c1cbb27179f | [
"Apache-2.0"
] | null | null | null | defmodule Heos.Manager do
@moduledoc """
Heos Manages handle connection to main device.
"""
# @compile if Mix.env() == :test, do: :export_all
# require Logger
# alias Heos.Connection
# @port 1255
# def start_link(args) do
# GenServer.start_link(__MODULE__, args, name: __MODULE__)
# end
# @i... | 23.26506 | 79 | 0.499223 |
0364144cabe8162b3e3c01edd735e8e03e503b7b | 1,546 | ex | Elixir | clients/gke_hub/lib/google_api/gke_hub/v1/model/policy_controller_template_library_config.ex | mopp/elixir-google-api | d496227d17600bccbdf8f6be9ad1b7e7219d7ec6 | [
"Apache-2.0"
] | null | null | null | clients/gke_hub/lib/google_api/gke_hub/v1/model/policy_controller_template_library_config.ex | mopp/elixir-google-api | d496227d17600bccbdf8f6be9ad1b7e7219d7ec6 | [
"Apache-2.0"
] | null | null | null | clients/gke_hub/lib/google_api/gke_hub/v1/model/policy_controller_template_library_config.ex | mopp/elixir-google-api | d496227d17600bccbdf8f6be9ad1b7e7219d7ec6 | [
"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... | 32.893617 | 124 | 0.753558 |
03643682134d657c2f4e98b17c2a0894f6bb411f | 10,367 | exs | Elixir | test/support/keys_fixture.exs | ybod/joken | 4e7d34f4020ee1346f4c437e0c555589e1173132 | [
"Apache-2.0"
] | null | null | null | test/support/keys_fixture.exs | ybod/joken | 4e7d34f4020ee1346f4c437e0c555589e1173132 | [
"Apache-2.0"
] | null | null | null | test/support/keys_fixture.exs | ybod/joken | 4e7d34f4020ee1346f4c437e0c555589e1173132 | [
"Apache-2.0"
] | null | null | null | defmodule Joken.Fixtures do
import Joken
def payload do
%{ name: "John Doe" }
end
def token_config do
payload
|> token
|> with_validation("name", &(&1 == "John Doe"))
end
# key taken from Appendix A.2.3 of JWE (Json Web Encryption) RFC
# http://tools.ietf.org/html/rfc7516#appendix-A.2.3... | 66.031847 | 412 | 0.864956 |
036441046fed3091e2aa81f9aa59caad893cc5c4 | 69 | ex | Elixir | lib/ymn_link_web_web/views/layout_view.ex | t-yamanashi/ymn_link_web | d883a14a10235230c6dbc935860de995004493b7 | [
"Apache-2.0"
] | null | null | null | lib/ymn_link_web_web/views/layout_view.ex | t-yamanashi/ymn_link_web | d883a14a10235230c6dbc935860de995004493b7 | [
"Apache-2.0"
] | null | null | null | lib/ymn_link_web_web/views/layout_view.ex | t-yamanashi/ymn_link_web | d883a14a10235230c6dbc935860de995004493b7 | [
"Apache-2.0"
] | null | null | null | defmodule YmnLinkWebWeb.LayoutView do
use YmnLinkWebWeb, :view
end
| 17.25 | 37 | 0.826087 |
0364467852ccdb1b06def5dfe4d4fc8999e5870d | 730 | ex | Elixir | lib/ex_pool/state/config.ex | jcabotc/ex_pool | ec5acab0e16aa7b7d5c58abba8aa1ebcf8c5c6e4 | [
"Apache-2.0"
] | 6 | 2015-11-29T10:43:02.000Z | 2016-04-07T17:32:17.000Z | lib/ex_pool/state/config.ex | jcabotc/ex_pool | ec5acab0e16aa7b7d5c58abba8aa1ebcf8c5c6e4 | [
"Apache-2.0"
] | null | null | null | lib/ex_pool/state/config.ex | jcabotc/ex_pool | ec5acab0e16aa7b7d5c58abba8aa1ebcf8c5c6e4 | [
"Apache-2.0"
] | null | null | null | defmodule ExPool.State.Config do
@moduledoc """
The configuration of the pool.
This module defines a `ExPool.State.Config` struct that keeps the
configuration given by the user.
## Fields
* `size` - number of workers of the pool
"""
@type size :: non_neg_integer
@type t :: %__MODULE__{
siz... | 17.804878 | 70 | 0.657534 |
03646b0d8df5b5373eb861ab74da3109d4aed76c | 27,048 | exs | Elixir | lib/mix/test/mix/tasks/compile.elixir_test.exs | felipelincoln/elixir | 6724c1d1819f2926dac561980b4beab281bbd3c2 | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/tasks/compile.elixir_test.exs | felipelincoln/elixir | 6724c1d1819f2926dac561980b4beab281bbd3c2 | [
"Apache-2.0"
] | 1 | 2021-07-01T17:58:37.000Z | 2021-07-01T19:05:37.000Z | lib/mix/test/mix/tasks/compile.elixir_test.exs | felipelincoln/elixir | 6724c1d1819f2926dac561980b4beab281bbd3c2 | [
"Apache-2.0"
] | null | null | null | Code.require_file("../../test_helper.exs", __DIR__)
defmodule Mix.Tasks.Compile.ElixirTest do
import ExUnit.CaptureIO
alias Mix.Task.Compiler.Diagnostic
use MixTest.Case
setup do
Mix.Project.push(MixTest.Case.Sample)
:ok
end
def trace(event, _e) do
send(__MODULE__, event)
:ok
end
@el... | 30.947368 | 144 | 0.584516 |
03647c1e60f2e2dae6a213e871bfeb443828fef7 | 2,062 | ex | Elixir | clients/display_video/lib/google_api/display_video/v1/model/advertiser_ad_server_config.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/display_video/lib/google_api/display_video/v1/model/advertiser_ad_server_config.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/display_video/lib/google_api/display_video/v1/model/advertiser_ad_server_config.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... | 41.24 | 208 | 0.762852 |
036483788ef40b0342e102b82c7b2261ba768b43 | 920 | ex | Elixir | lib/elasticsearch.ex | kentork/kensakukun | 188e1d931fa525ccf0ace9f13fccbefc19406eea | [
"MIT"
] | null | null | null | lib/elasticsearch.ex | kentork/kensakukun | 188e1d931fa525ccf0ace9f13fccbefc19406eea | [
"MIT"
] | null | null | null | lib/elasticsearch.ex | kentork/kensakukun | 188e1d931fa525ccf0ace9f13fccbefc19406eea | [
"MIT"
] | null | null | null | defmodule Kensakukun.Elasticsearch do
def get_indices() do
host = Application.fetch_env!(:kensakukun, :es_host)
port = Application.fetch_env!(:kensakukun, :es_port)
HTTPotion.get("http://" <> host <> ":" <> port <> "/_cat/indices?format=json")
|> Map.get(:body)
|> Poison.decode!()
end
def se... | 31.724138 | 95 | 0.572826 |
036489845a47001efa2c437599b9b71aef7ee3e9 | 161 | ex | Elixir | examples/Authentication_lookup.ex | ipfinder-io/ip-finder-elixir | 281402fc91f90291a46e0fc4e93620a4390e5c17 | [
"Apache-2.0"
] | null | null | null | examples/Authentication_lookup.ex | ipfinder-io/ip-finder-elixir | 281402fc91f90291a46e0fc4e93620a4390e5c17 | [
"Apache-2.0"
] | 1 | 2019-08-29T23:23:08.000Z | 2019-08-29T23:23:08.000Z | examples/Authentication_lookup.ex | ipfinder-io/ip-finder-elixir | 281402fc91f90291a46e0fc4e93620a4390e5c17 | [
"Apache-2.0"
] | 2 | 2019-08-29T23:19:07.000Z | 2022-02-02T03:00:16.000Z | defmodule AuthenticationLookup do
use Ipfinder
def auth do
conf = Ipfinder.new("YOUR_TOKEN_GOES_HERE")
{:ok, auth} = Ipfinder.authentication(conf)
end
end | 23 | 45 | 0.770186 |
0364df4cc6bfea5aa80bd8c274f45463333b51af | 884 | exs | Elixir | test/conditioners/function_call_test.exs | bcardarella/elixir-fixtures | 2c49e0af3713bd912dc7bb639324da423d155299 | [
"MIT"
] | 139 | 2016-02-07T12:28:18.000Z | 2022-02-15T11:39:58.000Z | test/conditioners/function_call_test.exs | bcardarella/elixir-fixtures | 2c49e0af3713bd912dc7bb639324da423d155299 | [
"MIT"
] | 17 | 2016-05-16T18:59:26.000Z | 2020-09-11T16:53:53.000Z | test/conditioners/function_call_test.exs | bcardarella/elixir-fixtures | 2c49e0af3713bd912dc7bb639324da423d155299 | [
"MIT"
] | 10 | 2016-02-23T09:25:09.000Z | 2020-02-29T14:21:21.000Z | defmodule EctoFixtures.Conditioners.FunctionCallTest do
use ExUnit.Case
test "can evaluate functions to generate values" do
source = "test/fixtures/function_call.exs"
data = EctoFixtures.read(source)
|> EctoFixtures.parse
|> EctoFixtures.condition
source = String.to_atom(source)
assert da... | 31.571429 | 104 | 0.673077 |
0364e18c64e99870c11e867df78663713b6bf177 | 79 | ex | Elixir | lib/dapp_demo.ex | arpnetwork/dapp_demo | ff87809625ae6053378ddffd63e27c6225d93370 | [
"Apache-2.0"
] | null | null | null | lib/dapp_demo.ex | arpnetwork/dapp_demo | ff87809625ae6053378ddffd63e27c6225d93370 | [
"Apache-2.0"
] | null | null | null | lib/dapp_demo.ex | arpnetwork/dapp_demo | ff87809625ae6053378ddffd63e27c6225d93370 | [
"Apache-2.0"
] | null | null | null | defmodule DappDemo do
@moduledoc """
Documentation for DappDemo.
"""
end
| 13.166667 | 29 | 0.696203 |
0364f3a72dcc04ddaf12c1788a883652a6ef402e | 681 | ex | Elixir | lib/workbench_web/auth_error_handler.ex | GunnarPDX/workbench | 11bcd762fd1b3bbfa5fefa1aac55c89cd7b2a7c7 | [
"MIT"
] | null | null | null | lib/workbench_web/auth_error_handler.ex | GunnarPDX/workbench | 11bcd762fd1b3bbfa5fefa1aac55c89cd7b2a7c7 | [
"MIT"
] | null | null | null | lib/workbench_web/auth_error_handler.ex | GunnarPDX/workbench | 11bcd762fd1b3bbfa5fefa1aac55c89cd7b2a7c7 | [
"MIT"
] | null | null | null | defmodule WorkbenchWeb.AuthErrorHandler do
import Plug.Conn
@behaviour Guardian.Plug.ErrorHandler
@impl Guardian.Plug.ErrorHandler
def auth_error(conn, {:no_resource_found, :resource_not_found}, _opts) do
conn |> Phoenix.Controller.redirect(to: "/auth/google")
end
def auth_error(conn, {:already_authe... | 28.375 | 75 | 0.71953 |
0364fd5709182604a8ed51bad03991550addef36 | 248 | exs | Elixir | priv/repo/migrations/20190809095307_create_todos.exs | westrik/todo-ex | 6ab0c61b91d3e76239e77e988e51aa0b06f30408 | [
"MIT"
] | 1 | 2020-11-12T08:26:51.000Z | 2020-11-12T08:26:51.000Z | priv/repo/migrations/20190809095307_create_todos.exs | westrik/todo-ex | 6ab0c61b91d3e76239e77e988e51aa0b06f30408 | [
"MIT"
] | null | null | null | priv/repo/migrations/20190809095307_create_todos.exs | westrik/todo-ex | 6ab0c61b91d3e76239e77e988e51aa0b06f30408 | [
"MIT"
] | null | null | null | defmodule TodoApi.Repo.Migrations.CreateTodos do
use Ecto.Migration
def change do
create table(:todos) do
add :description, :string
add :is_complete, :boolean, default: false, null: false
timestamps()
end
end
end
| 17.714286 | 61 | 0.681452 |
03653042ed479783a2b8047713dceac061082db3 | 2,236 | ex | Elixir | clients/content/lib/google_api/content/v2/model/transit_table.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/transit_table.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/transit_table.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... | 41.407407 | 316 | 0.729875 |
03653d01a444424d43c17856775dbead5765a489 | 13,632 | exs | Elixir | test/ex_doc/autolink_test.exs | vgsantoniazzi/ex_doc | 0f6f24b300d5486e6aaef3c13fbfab2f74cd4c5c | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | test/ex_doc/autolink_test.exs | vgsantoniazzi/ex_doc | 0f6f24b300d5486e6aaef3c13fbfab2f74cd4c5c | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | test/ex_doc/autolink_test.exs | vgsantoniazzi/ex_doc | 0f6f24b300d5486e6aaef3c13fbfab2f74cd4c5c | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | defmodule ExDoc.AutolinkTest do
use ExUnit.Case, async: true
doctest ExDoc.Autolink
import ExUnit.CaptureIO
defp sigil_m(text, []) do
[{:p, _, [ast]}] = ExDoc.Markdown.to_ast(text, [])
ast
end
setup do
ExDoc.Refs.clear()
:ok
end
describe "doc/3" do
test "elixir stdlib module" do
... | 33.330073 | 132 | 0.558172 |
0365670ef76fae01b27b5507adc42a3baf883ae1 | 1,761 | ex | Elixir | clients/api_keys/lib/google_api/api_keys/v2/model/v2_clone_key_request.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/api_keys/lib/google_api/api_keys/v2/model/v2_clone_key_request.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/api_keys/lib/google_api/api_keys/v2/model/v2_clone_key_request.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... | 37.468085 | 447 | 0.735378 |
036588f27bfea502b6aeded29387717e228116e6 | 423 | exs | Elixir | 03/part1.exs | seantanly/elixir-advent_of_code | 1e39ac46bc01f5c8cffd2d2f79f9af0b71767291 | [
"MIT"
] | 3 | 2016-01-18T01:14:45.000Z | 2017-05-11T09:14:49.000Z | 03/part1.exs | seantanly/elixir-advent_of_code | 1e39ac46bc01f5c8cffd2d2f79f9af0b71767291 | [
"MIT"
] | null | null | null | 03/part1.exs | seantanly/elixir-advent_of_code | 1e39ac46bc01f5c8cffd2d2f79f9af0b71767291 | [
"MIT"
] | null | null | null | result = Path.join(__DIR__, "input.txt")
|> File.read!
|> String.split("", trim: true)
|> Enum.reduce({0, 0, Set.put(MapSet.new, {0,0})}, fn instr, {x, y, set} ->
{x, y} = case instr do
"^" -> {x, y - 1}
"v" -> {x, y + 1}
">" -> {x + 1, y}
"<" -> {x - 1, y}
_ -> raise "Unknown instr: #{inspect ins... | 22.263158 | 75 | 0.486998 |
0365d6eb2a9c3f1ee00642d034272254eb7a0776 | 68 | ex | Elixir | lib/yourbot_web/views/user_session_view.ex | ConnorRigby/yourbot | eea40e63b0f93963ed14b7efab9ecbe898ab11dd | [
"Apache-2.0"
] | 3 | 2021-11-08T15:19:19.000Z | 2021-11-11T03:18:35.000Z | lib/yourbot_web/views/user_session_view.ex | ConnorRigby/yourbot | eea40e63b0f93963ed14b7efab9ecbe898ab11dd | [
"Apache-2.0"
] | null | null | null | lib/yourbot_web/views/user_session_view.ex | ConnorRigby/yourbot | eea40e63b0f93963ed14b7efab9ecbe898ab11dd | [
"Apache-2.0"
] | null | null | null | defmodule YourBotWeb.UserSessionView do
use YourBotWeb, :view
end
| 17 | 39 | 0.823529 |
0365fb2ac6720f28d6f2ff5232deaff3d4142caa | 734 | ex | Elixir | lib/pushover/model/message_response.ex | RMATech/pushover | eb4bc2eaf5f247dd8fa2902886a0de028f6b56c2 | [
"MIT"
] | 2 | 2021-02-06T14:41:02.000Z | 2021-04-13T06:17:09.000Z | lib/pushover/model/message_response.ex | RMATech/pushover | eb4bc2eaf5f247dd8fa2902886a0de028f6b56c2 | [
"MIT"
] | null | null | null | lib/pushover/model/message_response.ex | RMATech/pushover | eb4bc2eaf5f247dd8fa2902886a0de028f6b56c2 | [
"MIT"
] | 1 | 2021-06-23T15:33:55.000Z | 2021-06-23T15:33:55.000Z | defmodule Pushover.Model.MessageResponse do
@moduledoc """
A message response.
## Attributes
* `request` (*type:* `String.t`) - request id, e.g. "d2543c10-e59c-41f6-913c-0d4fcfc6d3ec"
* `status` (*type:* `Integer.t`) - 1 for success
"""
use GoogleApi.Gax.ModelBase
@type t :: %__MODULE__{
:r... | 22.242424 | 94 | 0.689373 |
0366044453400a2c68e58d76059563e95afed321 | 3,295 | exs | Elixir | test/type/ci_string_test.exs | MrFlorius/ash | 247abbb8333d252da5440a58ddf4f1b7f184342f | [
"MIT"
] | null | null | null | test/type/ci_string_test.exs | MrFlorius/ash | 247abbb8333d252da5440a58ddf4f1b7f184342f | [
"MIT"
] | null | null | null | test/type/ci_string_test.exs | MrFlorius/ash | 247abbb8333d252da5440a58ddf4f1b7f184342f | [
"MIT"
] | null | null | null | defmodule Ash.Test.Type.CiString do
@moduledoc false
use ExUnit.Case, async: true
import Ash.Changeset
require Ash.Query
defmodule Post do
@moduledoc false
use Ash.Resource, data_layer: Ash.DataLayer.Ets
ets do
private?(true)
end
attributes do
uuid_primary_key :id
# ... | 25.152672 | 96 | 0.583915 |
036607cdc361438736316ee16f8faa927201abb8 | 1,305 | exs | Elixir | apps/rig_kafka/mix.exs | vanillebear/reactive-interaction-gateway | 5eb2afa00b8e74bddfd712ba282a3768e8ede239 | [
"Apache-2.0"
] | null | null | null | apps/rig_kafka/mix.exs | vanillebear/reactive-interaction-gateway | 5eb2afa00b8e74bddfd712ba282a3768e8ede239 | [
"Apache-2.0"
] | 132 | 2018-11-26T14:00:54.000Z | 2022-03-11T04:17:54.000Z | apps/rig_kafka/mix.exs | vanillebear/reactive-interaction-gateway | 5eb2afa00b8e74bddfd712ba282a3768e8ede239 | [
"Apache-2.0"
] | null | null | null | defmodule RigKafka.MixProject do
@moduledoc false
use Mix.Project
def project do
%{rig: rig_version, elixir: elixir_version} = versions()
[
app: :rig_kafka,
version: rig_version,
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
... | 24.166667 | 60 | 0.562452 |
03660d9e651c2d46bc2000ccdaf86841cd77dd73 | 1,823 | ex | Elixir | elixir/lib/homework_web/schemas/transactions_schema.ex | Bryrow/web-homework | d142134a4d2f13cee1178724786909b0dddaa496 | [
"MIT"
] | null | null | null | elixir/lib/homework_web/schemas/transactions_schema.ex | Bryrow/web-homework | d142134a4d2f13cee1178724786909b0dddaa496 | [
"MIT"
] | null | null | null | elixir/lib/homework_web/schemas/transactions_schema.ex | Bryrow/web-homework | d142134a4d2f13cee1178724786909b0dddaa496 | [
"MIT"
] | null | null | null | defmodule HomeworkWeb.Schemas.TransactionsSchema do
@moduledoc """
Defines the graphql schema for transactions.
"""
use Absinthe.Schema.Notation
alias HomeworkWeb.Resolvers.TransactionsResolver
object :transaction do
field(:id, non_null(:id))
field(:user_id, :id)
@desc "amount is in cents"
... | 27.621212 | 57 | 0.671969 |
03661d435d86008da9ea3fee243f2e69a1b6faef | 5,093 | ex | Elixir | lib/redlock.ex | kalymero/redlock | 8b6e57f4f1b9da286614948c673a0294b7d074bf | [
"MIT"
] | null | null | null | lib/redlock.ex | kalymero/redlock | 8b6e57f4f1b9da286614948c673a0294b7d074bf | [
"MIT"
] | null | null | null | lib/redlock.ex | kalymero/redlock | 8b6e57f4f1b9da286614948c673a0294b7d074bf | [
"MIT"
] | null | null | null | defmodule Redlock do
@moduledoc ~S"""
This library is an implementation of Redlock (Redis destributed lock)
[Redlock](https://redis.io/topics/distlock)
## Usage
resource = "example_key:#{user_id}"
lock_exp_sec = 10
case Redlock.lock(resource, lock_exp_sec) do
{:ok, mutex} ->
... | 29.439306 | 137 | 0.606911 |
03662a620fef7086648acc721201d3556d18fa63 | 20,900 | ex | Elixir | lib/swoosh/email.ex | Deepwalker/swoosh | 5970e1a20e5d787347ce825f4803e972ddc30095 | [
"MIT"
] | 1 | 2020-01-19T04:55:09.000Z | 2020-01-19T04:55:09.000Z | lib/swoosh/email.ex | Deepwalker/swoosh | 5970e1a20e5d787347ce825f4803e972ddc30095 | [
"MIT"
] | null | null | null | lib/swoosh/email.ex | Deepwalker/swoosh | 5970e1a20e5d787347ce825f4803e972ddc30095 | [
"MIT"
] | 1 | 2019-11-05T19:06:55.000Z | 2019-11-05T19:06:55.000Z | defmodule Swoosh.Email do
@moduledoc """
Defines an Email.
This module defines a `Swoosh.Email` struct and the main functions for composing an email. As it is the contract for
the public APIs of Swoosh it is a good idea to make use of these functions rather than build the struct yourself.
## Email fields
... | 37.931034 | 175 | 0.61756 |
0366323edeccd9478636ba15fe18b71f4164f6d1 | 16,968 | ex | Elixir | lib/ecto/date_time.ex | tokafish/ecto | 45d23da6faf660303484d0c993930af674685631 | [
"Apache-2.0"
] | null | null | null | lib/ecto/date_time.ex | tokafish/ecto | 45d23da6faf660303484d0c993930af674685631 | [
"Apache-2.0"
] | null | null | null | lib/ecto/date_time.ex | tokafish/ecto | 45d23da6faf660303484d0c993930af674685631 | [
"Apache-2.0"
] | null | null | null | import Kernel, except: [to_string: 1]
defmodule Ecto.DateTime.Utils do
@moduledoc false
@doc "Pads with zero"
def zero_pad(val, count) do
num = Integer.to_string(val)
pad_length = max(count - byte_size(num), 0)
:binary.copy("0", pad_length) <> num
end
@doc "Converts to integer if possible"
de... | 28.469799 | 114 | 0.590229 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.