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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1a93acd57f7de4e07e4c526f2ed3110c298a2f7f | 587 | exs | Elixir | languages/elixir/exercises/concept/high-school-sweetheart/mix.exs | AlexLeSang/v3 | 3d35961a961b5a2129b1d42f1d118972d9665357 | [
"MIT"
] | 3 | 2020-07-25T06:24:00.000Z | 2020-09-14T17:39:11.000Z | languages/elixir/exercises/concept/high-school-sweetheart/mix.exs | AlexLeSang/v3 | 3d35961a961b5a2129b1d42f1d118972d9665357 | [
"MIT"
] | 1 | 2020-01-26T20:08:06.000Z | 2020-01-26T20:08:06.000Z | languages/elixir/exercises/concept/high-school-sweetheart/mix.exs | AlexLeSang/v3 | 3d35961a961b5a2129b1d42f1d118972d9665357 | [
"MIT"
] | null | null | null | defmodule HighSchoolSweetheart.MixProject do
use Mix.Project
def project do
[
app: :strings,
version: "0.1.0",
# elixir: "~> 1.10",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[... | 20.241379 | 87 | 0.584327 |
1a93c5533572f9ffa63e4ef323437700e3705579 | 2,551 | ex | Elixir | lib/release/seeder.ex | handnot2/noa | c071798e2baf4649466ba37190070c3192c7c2c2 | [
"MIT"
] | 9 | 2017-08-16T14:55:48.000Z | 2019-03-06T15:06:49.000Z | lib/release/seeder.ex | handnot2/noa | c071798e2baf4649466ba37190070c3192c7c2c2 | [
"MIT"
] | null | null | null | lib/release/seeder.ex | handnot2/noa | c071798e2baf4649466ba37190070c3192c7c2c2 | [
"MIT"
] | 1 | 2022-03-17T18:32:59.000Z | 2022-03-17T18:32:59.000Z | defmodule NoaRelease.Seeder do
alias Noa.Actors.{Clients, Resources, Providers}
def seed(data_file) do
IO.inspect(data_file, label: "Seeding from")
ctxt = load_data_desc(data_file)
|> create_providers()
|> create_resources()
|> create_clients()
%{
providers: ctxt[:providers],
... | 30.011765 | 79 | 0.556252 |
1a93c69ded5a6ecf43ed25dfeeebfb7e154c84d3 | 1,659 | exs | Elixir | lv_sample/config/config.exs | tetsuya-ishida/LiveView | 2a8290b3e0a4c735390b7d3d17ced36638406f54 | [
"Apache-2.0"
] | null | null | null | lv_sample/config/config.exs | tetsuya-ishida/LiveView | 2a8290b3e0a4c735390b7d3d17ced36638406f54 | [
"Apache-2.0"
] | null | null | null | lv_sample/config/config.exs | tetsuya-ishida/LiveView | 2a8290b3e0a4c735390b7d3d17ced36638406f54 | [
"Apache-2.0"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
# General application configuration
import Config
# Configures the endpoint
config :lv_sample, LvSample... | 33.18 | 117 | 0.734177 |
1a93fd9bc98ea19a488353ac83c81855da901ddf | 119 | ex | Elixir | test/support/test_http.ex | philosodad/near_earth | fe8de1a41d4672454d2e709ea9d911c352d18d8e | [
"MIT"
] | 1 | 2016-11-24T08:53:51.000Z | 2016-11-24T08:53:51.000Z | test/support/test_http.ex | philosodad/near_earth | fe8de1a41d4672454d2e709ea9d911c352d18d8e | [
"MIT"
] | null | null | null | test/support/test_http.ex | philosodad/near_earth | fe8de1a41d4672454d2e709ea9d911c352d18d8e | [
"MIT"
] | null | null | null | defmodule NearEarth.TestHttp do
use HTTPoison.Base
def get(route) do
Stash.get(:near_earth, route)
end
end
| 13.222222 | 33 | 0.722689 |
1a9440576551a7ad2a76dd03a841008d73b3f85c | 1,337 | ex | Elixir | lib/scrawler.ex | av-ast/scrawler | 4fe7e59dd35aad977fa0d73b400461bcccfe727e | [
"MIT"
] | null | null | null | lib/scrawler.ex | av-ast/scrawler | 4fe7e59dd35aad977fa0d73b400461bcccfe727e | [
"MIT"
] | null | null | null | lib/scrawler.ex | av-ast/scrawler | 4fe7e59dd35aad977fa0d73b400461bcccfe727e | [
"MIT"
] | null | null | null | defmodule Scrawler do
use Application
# See http://elixir-lang.org/docs/stable/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... | 29.065217 | 86 | 0.685864 |
1a94479f02cce2a0a75c88be7710abbddc4a0fe2 | 798 | ex | Elixir | scrabble-score/lib/scrabble.ex | quatauta/exercism-elixir | 3635610f25111f2afd3bb748e86f9b478ec239b0 | [
"MIT"
] | 1 | 2022-01-23T20:34:09.000Z | 2022-01-23T20:34:09.000Z | scrabble-score/lib/scrabble.ex | quatauta/exercism-elixir | 3635610f25111f2afd3bb748e86f9b478ec239b0 | [
"MIT"
] | null | null | null | scrabble-score/lib/scrabble.ex | quatauta/exercism-elixir | 3635610f25111f2afd3bb748e86f9b478ec239b0 | [
"MIT"
] | null | null | null | defmodule Scrabble do
@moduledoc false
@doc """
Calculate the scrabble score for the word.
"""
@spec score(String.t()) :: non_neg_integer
def score(word) do
word |> String.upcase() |> String.graphemes() |> Enum.reduce(0, &(letter_score(&1) + &2))
end
defp letter_score(letter) when letter in ["A", ... | 34.695652 | 94 | 0.606516 |
1a945b7368ac06377854321c930133703a41847b | 146 | ex | Elixir | lib/types/parameter_info_struct.ex | smiyabe/cwmp_ex | 9db322497aa3208b5985ccf496ada5286cde3925 | [
"Artistic-2.0"
] | 3 | 2017-11-29T05:07:35.000Z | 2019-12-18T17:16:41.000Z | lib/types/parameter_info_struct.ex | smiyabe/cwmp_ex | 9db322497aa3208b5985ccf496ada5286cde3925 | [
"Artistic-2.0"
] | 1 | 2021-12-02T19:35:28.000Z | 2022-03-29T09:40:52.000Z | lib/types/parameter_info_struct.ex | smiyabe/cwmp_ex | 9db322497aa3208b5985ccf496ada5286cde3925 | [
"Artistic-2.0"
] | 2 | 2017-11-29T05:07:30.000Z | 2020-11-10T07:10:42.000Z | defmodule CWMP.Protocol.Messages.ParameterInfoStruct do
@derive [Poison.Encoder]
defstruct name: nil,
writable: nil
end
| 24.333333 | 55 | 0.678082 |
1a945c0a7a72061f7fba2a7df595070e396bd84a | 5,910 | ex | Elixir | lib/phoenix/router/route.ex | gjaldon/phoenix | a85a13d8bfbd7d768bb86d38da427875df3fb703 | [
"MIT"
] | 1 | 2015-05-19T11:04:16.000Z | 2015-05-19T11:04:16.000Z | lib/phoenix/router/route.ex | gjaldon/phoenix | a85a13d8bfbd7d768bb86d38da427875df3fb703 | [
"MIT"
] | null | null | null | lib/phoenix/router/route.ex | gjaldon/phoenix | a85a13d8bfbd7d768bb86d38da427875df3fb703 | [
"MIT"
] | null | null | null | defmodule Phoenix.Router.Route do
# This module defines the Route struct that is used
# throughout Phoenix's router. This struct is private
# as it contains internal routing information.
@moduledoc false
alias Phoenix.Router.Route
@doc """
The `Phoenix.Router.Route` struct. It stores:
* :verb - the... | 32.119565 | 127 | 0.638748 |
1a946a1f04cf6f1294a2ffe5403318f38c4f8bd0 | 705 | ex | Elixir | lib/portalcs_web/views/coherence/unlock_view.ex | pedromcorreia/portal-construindo-sabere | 116402e21d9c1e7b02be2966460c90dcea7d09cd | [
"MIT"
] | null | null | null | lib/portalcs_web/views/coherence/unlock_view.ex | pedromcorreia/portal-construindo-sabere | 116402e21d9c1e7b02be2966460c90dcea7d09cd | [
"MIT"
] | null | null | null | lib/portalcs_web/views/coherence/unlock_view.ex | pedromcorreia/portal-construindo-sabere | 116402e21d9c1e7b02be2966460c90dcea7d09cd | [
"MIT"
] | null | null | null | defmodule PortalcsWeb.Coherence.UnlockView do
use PortalcsWeb.Coherence, :view
def render("unlock.json", %{info: info}) do
%{
info: info
}
end
def render("unlock.json", %{user: user}) do
%{
user: %{
id: user.id,
name: user.name,
email: user.email
}
}
... | 20.142857 | 64 | 0.571631 |
1a9487bcc70dc93333c8b43afa19a3deaf7e19f8 | 1,672 | exs | Elixir | test/ok_test.exs | myrrlyn/OK | 822c152607b25a27c87f0ab6b306d3d3f9beb1a1 | [
"Apache-2.0"
] | null | null | null | test/ok_test.exs | myrrlyn/OK | 822c152607b25a27c87f0ab6b306d3d3f9beb1a1 | [
"Apache-2.0"
] | null | null | null | test/ok_test.exs | myrrlyn/OK | 822c152607b25a27c87f0ab6b306d3d3f9beb1a1 | [
"Apache-2.0"
] | null | null | null | defmodule OKTest do
use ExUnit.Case
import OK, only: [~>>: 2, ~>: 2, <~: 2, <<~: 2, <~>: 2, <|>: 2, success: 1, failure: 1]
doctest OK
test "matching on a success case" do
success(value) = {:ok, :value}
assert :value == value
end
test "matching on a failure case" do
failure(reason) = {:error, ... | 21.435897 | 89 | 0.616627 |
1a94963b5f0c6ee9070e9b68cb56695415231668 | 2,510 | ex | Elixir | lib/samly_howto_web/controllers/page_controller.ex | handnot2/samly_howto | 6ae346bf184b802f89ee116afb3dfc64ebe7e769 | [
"MIT"
] | 10 | 2018-07-25T12:32:32.000Z | 2022-01-31T17:36:01.000Z | lib/samly_howto_web/controllers/page_controller.ex | handnot2/samly_howto | 6ae346bf184b802f89ee116afb3dfc64ebe7e769 | [
"MIT"
] | null | null | null | lib/samly_howto_web/controllers/page_controller.ex | handnot2/samly_howto | 6ae346bf184b802f89ee116afb3dfc64ebe7e769 | [
"MIT"
] | 4 | 2017-10-25T23:35:59.000Z | 2022-03-17T18:29:41.000Z | defmodule SamlyHowtoWeb.PageController do
use SamlyHowtoWeb, :controller
alias Samly.Assertion
def index(conn, params) do
assertion = Samly.get_active_assertion(conn)
opts = Application.get_env(:samly, Samly.Provider, [])
idp_in_uri_type = Keyword.get(opts, :idp_id_from, :path_segment)
idp_id ... | 33.918919 | 93 | 0.703984 |
1a94a53ff6025502b9178083c2ca907053b47a87 | 8,440 | ex | Elixir | lib/pow_assent/phoenix/controllers/authorization_controller.ex | dclausen/pow_assent | 63dfe3bd55e6b0a6e30bc95daefb9074f7f73691 | [
"MIT"
] | null | null | null | lib/pow_assent/phoenix/controllers/authorization_controller.ex | dclausen/pow_assent | 63dfe3bd55e6b0a6e30bc95daefb9074f7f73691 | [
"MIT"
] | null | null | null | lib/pow_assent/phoenix/controllers/authorization_controller.ex | dclausen/pow_assent | 63dfe3bd55e6b0a6e30bc95daefb9074f7f73691 | [
"MIT"
] | null | null | null | defmodule PowAssent.Phoenix.AuthorizationController do
@moduledoc false
use Pow.Extension.Phoenix.Controller.Base
alias Plug.Conn
alias PowAssent.{Phoenix.AuthorizationController, Phoenix.RegistrationController, Plug}
alias Pow.Extension.Config, as: ExtensionConfig
alias Pow.Plug, as: PowPlug
alias PowEm... | 40.382775 | 150 | 0.705806 |
1a94e1e55809d235d0a0e449d160858e6bdd3e4e | 469 | ex | Elixir | lib/ash/error/invalid/impossible_path.ex | elbow-jason/ash | eb63bc9d4d24187ad07d9892088b4e55ad6258e4 | [
"MIT"
] | 1 | 2021-12-27T09:43:29.000Z | 2021-12-27T09:43:29.000Z | lib/ash/error/invalid/impossible_path.ex | elbow-jason/ash | eb63bc9d4d24187ad07d9892088b4e55ad6258e4 | [
"MIT"
] | null | null | null | lib/ash/error/invalid/impossible_path.ex | elbow-jason/ash | eb63bc9d4d24187ad07d9892088b4e55ad6258e4 | [
"MIT"
] | null | null | null | defmodule Ash.Error.Invalid.ImpossiblePath do
@moduledoc "Used when a request expresses a dependency on another request that doesn't exist"
use Ash.Error
def_ash_error([:impossible_path], class: :invalid)
defimpl Ash.ErrorKind do
def id(_), do: Ecto.UUID.generate()
def code(_), do: "impossible_path"
... | 27.588235 | 95 | 0.727079 |
1a94f5031b31ed63a74ce62ac513f478ebf171ea | 503 | ex | Elixir | lib/nodejs.ex | matoakley/elixir-nodejs | 825e1b9af7fbe149707f8d609cf1999a532c6cd3 | [
"MIT"
] | null | null | null | lib/nodejs.ex | matoakley/elixir-nodejs | 825e1b9af7fbe149707f8d609cf1999a532c6cd3 | [
"MIT"
] | null | null | null | lib/nodejs.ex | matoakley/elixir-nodejs | 825e1b9af7fbe149707f8d609cf1999a532c6cd3 | [
"MIT"
] | null | null | null | defmodule NodeJS do
def start_link(opts \\ []), do: NodeJS.Supervisor.start_link(opts)
def stop(), do: NodeJS.Supervisor.stop()
def call(module, args \\ [], opts \\ []), do: NodeJS.Supervisor.call(module, args, opts)
def call!(module, args \\ [], opts \\ []), do: NodeJS.Supervisor.call!(module, args, opts)
de... | 31.4375 | 92 | 0.620278 |
1a94fdaee2308efd4fd9bbf7a37203d1af022ab2 | 2,432 | ex | Elixir | lib/cms/v3/meta/article_type/base.ex | noizu-labs/KitchenSinkAdvanced | 6d91b5dd4f59cd9838f87a64605a0ef87f4301c8 | [
"MIT"
] | null | null | null | lib/cms/v3/meta/article_type/base.ex | noizu-labs/KitchenSinkAdvanced | 6d91b5dd4f59cd9838f87a64605a0ef87f4301c8 | [
"MIT"
] | null | null | null | lib/cms/v3/meta/article_type/base.ex | noizu-labs/KitchenSinkAdvanced | 6d91b5dd4f59cd9838f87a64605a0ef87f4301c8 | [
"MIT"
] | null | null | null | defmodule Noizu.V3.CMS.Meta.ArticleType.Base do
defmacro __using__(_options \\ nil) do
nil
end
defmacro __before_compile__(_) do
quote do
@file unquote(__ENV__.file) <> ":#{unquote(__ENV__.line)}" <> "(via #{__ENV__.file}:#{__ENV__.line})"
@__nzdo__article_cms_manager Module.concat([@__nzd... | 35.764706 | 107 | 0.631579 |
1a9501a8125e7039c6485a7e038ec86c74634baf | 71 | exs | Elixir | test/test_helper.exs | Foxlabsdevelopers/cv_creator | c77d52cdc67180ed369a3dbd298ca2dea5131c60 | [
"MIT"
] | null | null | null | test/test_helper.exs | Foxlabsdevelopers/cv_creator | c77d52cdc67180ed369a3dbd298ca2dea5131c60 | [
"MIT"
] | 2 | 2021-05-24T21:41:25.000Z | 2021-05-25T16:02:09.000Z | test/test_helper.exs | Foxlabsdevelopers/cv_creator | c77d52cdc67180ed369a3dbd298ca2dea5131c60 | [
"MIT"
] | null | null | null | ExUnit.start()
Ecto.Adapters.SQL.Sandbox.mode(CvCreator.Repo, :manual)
| 23.666667 | 55 | 0.788732 |
1a950311f2b6751611e3f320deb68bc2e820e1b2 | 1,142 | ex | Elixir | lib/aoc_common/counted_set.ex | rob-brown/AdventOfCode2021 | 3d29b55ac1300c34c06c8e9ea2ccfc4c7da7de19 | [
"MIT"
] | 2 | 2021-12-02T01:48:23.000Z | 2021-12-11T22:55:10.000Z | lib/aoc_common/counted_set.ex | rob-brown/AdventOfCode2021 | 3d29b55ac1300c34c06c8e9ea2ccfc4c7da7de19 | [
"MIT"
] | null | null | null | lib/aoc_common/counted_set.ex | rob-brown/AdventOfCode2021 | 3d29b55ac1300c34c06c8e9ea2ccfc4c7da7de19 | [
"MIT"
] | null | null | null | defmodule AocCommon.CountedSet do
defstruct [:internal_map]
def new() do
%__MODULE__{internal_map: %{}}
end
def new(enumerable) do
for x <- enumerable, into: new() do
x
end
end
def put(set, key) do
put_many(set, key, 1)
end
def put_many(%__MODULE__{internal_map: map}, key, n) d... | 18.419355 | 60 | 0.618214 |
1a9510eb14d70ef843c947c2256523cdc0d0a067 | 2,904 | ex | Elixir | lib/tentacat/organizations/hooks.ex | hi-rustin/tentacat | be0b4a671f90faab2598b6d58a691d506f46cfb5 | [
"MIT"
] | 432 | 2015-01-19T20:38:35.000Z | 2022-01-11T14:32:28.000Z | lib/tentacat/organizations/hooks.ex | hi-rustin/tentacat | be0b4a671f90faab2598b6d58a691d506f46cfb5 | [
"MIT"
] | 183 | 2015-01-19T08:55:29.000Z | 2022-03-01T20:26:03.000Z | lib/tentacat/organizations/hooks.ex | hi-rustin/tentacat | be0b4a671f90faab2598b6d58a691d506f46cfb5 | [
"MIT"
] | 189 | 2015-01-04T14:56:59.000Z | 2021-12-14T20:48:18.000Z | defmodule Tentacat.Organizations.Hooks do
import Tentacat
alias Tentacat.Client
@doc """
List hooks of an organization.
The response will differ if the authenticated user is also owner of the
organization
## Example
Tentacat.Organizations.Hooks.list "github"
Tentacat.Organizations.Hooks.li... | 27.140187 | 81 | 0.665978 |
1a95230a8a31c326070e7c0c3797336d879dcb61 | 794 | ex | Elixir | lib/discovery_api_web/utilities/ecto_access_utils.ex | folkengine/discovery_api | 0bb7a0aff4603a4f7532cc65ca8c8dbb37a57217 | [
"Apache-2.0"
] | null | null | null | lib/discovery_api_web/utilities/ecto_access_utils.ex | folkengine/discovery_api | 0bb7a0aff4603a4f7532cc65ca8c8dbb37a57217 | [
"Apache-2.0"
] | null | null | null | lib/discovery_api_web/utilities/ecto_access_utils.ex | folkengine/discovery_api | 0bb7a0aff4603a4f7532cc65ca8c8dbb37a57217 | [
"Apache-2.0"
] | null | null | null | defmodule DiscoveryApiWeb.Utilities.EctoAccessUtils do
@moduledoc """
This module is the implementation of the DiscoveryApiWeb.Utilities.AccessUtils behavior for auth rules stored in Ecto
"""
@behaviour DiscoveryApiWeb.Utilities.AccessUtils
alias DiscoveryApi.Data.Model
alias DiscoveryApi.Schemas.Users
d... | 34.521739 | 119 | 0.7267 |
1a9523bcd939f341b6f17280353c7bf6f64ec34f | 253 | ex | Elixir | imdb_data/lib/imdb_data.ex | defndaines/eiga | 89adc25dd6c7a5be86d6dc6be9dffc62ad05bdd8 | [
"Apache-2.0"
] | null | null | null | imdb_data/lib/imdb_data.ex | defndaines/eiga | 89adc25dd6c7a5be86d6dc6be9dffc62ad05bdd8 | [
"Apache-2.0"
] | 2 | 2016-03-10T03:04:11.000Z | 2017-02-11T17:43:44.000Z | imdb_data/lib/imdb_data.ex | defndaines/eiga | 89adc25dd6c7a5be86d6dc6be9dffc62ad05bdd8 | [
"Apache-2.0"
] | null | null | null | defmodule IMDbData do
@moduledoc """
IMDbData keeps the contexts that define your domain
and business logic.
Contexts are also responsible for managing your data, regardless
if it comes from the database, an external API or others.
"""
end
| 25.3 | 66 | 0.754941 |
1a954b034863916dde5ce59188575947f098164c | 291 | exs | Elixir | .formatter.exs | zhongwencool/maxwell | 0b04ec5d1aafedbeb00a4ec3e683c9b2216b7349 | [
"MIT"
] | 130 | 2016-03-24T02:48:26.000Z | 2021-04-10T19:29:06.000Z | .formatter.exs | zhongwencool/maxwell | 0b04ec5d1aafedbeb00a4ec3e683c9b2216b7349 | [
"MIT"
] | 78 | 2016-06-28T06:33:01.000Z | 2021-12-15T01:37:54.000Z | .formatter.exs | zhongwencool/maxwell | 0b04ec5d1aafedbeb00a4ec3e683c9b2216b7349 | [
"MIT"
] | 24 | 2016-04-09T16:44:19.000Z | 2020-12-01T10:57:22.000Z | [
inputs: [
".formatter.exs",
"mix.exs",
"{config,lib,test}/**/*.{ex,exs}"
],
locals_without_parens: [
adapter: 1,
middleware: 1,
middleware: 2
],
export: [
locals_without_parens: [
adapter: 1,
middleware: 1,
middleware: 2
]
]
]
| 14.55 | 37 | 0.515464 |
1a9576f26b5c172cb6f6a173fe65a3bd8948a740 | 1,973 | ex | Elixir | test/support/test_registry.ex | exshome/exshome | ef6b7a89f11dcd2016856dd49517b74aeebb6513 | [
"MIT"
] | 2 | 2021-12-21T16:32:56.000Z | 2022-02-22T17:06:39.000Z | test/support/test_registry.ex | exshome/exshome | ef6b7a89f11dcd2016856dd49517b74aeebb6513 | [
"MIT"
] | null | null | null | test/support/test_registry.ex | exshome/exshome | ef6b7a89f11dcd2016856dd49517b74aeebb6513 | [
"MIT"
] | null | null | null | defmodule ExshomeTest.TestRegistry do
@moduledoc """
Registry for async tests.
"""
@spec child_spec(opts :: any()) :: Supervisor.child_spec()
def child_spec(_opts) do
Registry.child_spec(keys: :unique, name: __MODULE__)
end
@spec started?() :: boolean()
def started?, do: !!Process.whereis(__MODULE... | 23.771084 | 74 | 0.60669 |
1a9582f613474a17ddc735ea5c3451b3597d5107 | 652 | exs | Elixir | test/lib/aes_test.exs | danielberkompas/phoenix_ecto_encryption_sample | 1fd0f337eb214cb6a5b7348a70ad27e50968d851 | [
"MIT"
] | 4 | 2015-08-11T04:01:14.000Z | 2019-09-17T04:47:02.000Z | test/lib/aes_test.exs | danielberkompas/phoenix_ecto_encryption_sample | 1fd0f337eb214cb6a5b7348a70ad27e50968d851 | [
"MIT"
] | null | null | null | test/lib/aes_test.exs | danielberkompas/phoenix_ecto_encryption_sample | 1fd0f337eb214cb6a5b7348a70ad27e50968d851 | [
"MIT"
] | null | null | null | defmodule Encryption.AESTest do
use ExUnit.Case
alias Encryption.AES
doctest Encryption.AES
test ".encrypt can encrypt a value" do
assert AES.encrypt("hello") != "hello"
end
test ".encrypt includes the random IV in the value" do
<<iv::binary-16, ciphertext::binary>> = AES.encrypt("hello")
as... | 24.148148 | 64 | 0.679448 |
1a95973ebbc3555076097076511c94cde57bcfc9 | 724 | ex | Elixir | apps/prometheus_web/lib/prometheus_web/gettext.ex | thluiz/prometheus | 0936e0b1e066ed35917221628d060adf8d7aed29 | [
"MIT"
] | null | null | null | apps/prometheus_web/lib/prometheus_web/gettext.ex | thluiz/prometheus | 0936e0b1e066ed35917221628d060adf8d7aed29 | [
"MIT"
] | null | null | null | apps/prometheus_web/lib/prometheus_web/gettext.ex | thluiz/prometheus | 0936e0b1e066ed35917221628d060adf8d7aed29 | [
"MIT"
] | 1 | 2020-11-04T06:04:51.000Z | 2020-11-04T06:04:51.000Z | defmodule PrometheusWeb.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 PrometheusWeb.Gettext
# Simple translation
gettext("Her... | 28.96 | 72 | 0.683702 |
1a95b47c3a9344f3c130e615b96f1626f1f3b091 | 774 | ex | Elixir | lib/smwc_web/controllers/user_session_controller.ex | druu/smwcbot | 0c9e3530c470028c767b6a77be8a939481756438 | [
"MIT"
] | 2 | 2022-03-09T18:04:42.000Z | 2022-03-11T22:24:25.000Z | lib/smwc_web/controllers/user_session_controller.ex | druu/smwcbot | 0c9e3530c470028c767b6a77be8a939481756438 | [
"MIT"
] | null | null | null | lib/smwc_web/controllers/user_session_controller.ex | druu/smwcbot | 0c9e3530c470028c767b6a77be8a939481756438 | [
"MIT"
] | 2 | 2022-02-27T22:00:17.000Z | 2022-02-28T02:20:21.000Z | defmodule SMWCWeb.UserSessionController do
use SMWCWeb, :controller
alias SMWC.Accounts
alias SMWCWeb.UserAuth
def new(conn, _params) do
render(conn, "new.html", error_message: nil)
end
def create(conn, %{"user" => user_params}) do
%{"email" => email, "password" => password} = user_params
if... | 27.642857 | 101 | 0.697674 |
1a95f02cae0c1f64960b0807efb7007a13639ebc | 74 | exs | Elixir | test/views/page_view_test.exs | ClubNix/familix | acedc6487e0b462ad5747fc3eb0acd6441a4b91c | [
"MIT"
] | 1 | 2017-03-02T08:45:43.000Z | 2017-03-02T08:45:43.000Z | test/views/page_view_test.exs | minijackson/familix | acedc6487e0b462ad5747fc3eb0acd6441a4b91c | [
"MIT"
] | null | null | null | test/views/page_view_test.exs | minijackson/familix | acedc6487e0b462ad5747fc3eb0acd6441a4b91c | [
"MIT"
] | null | null | null | defmodule Familix.PageViewTest do
use Familix.ConnCase, async: true
end
| 18.5 | 35 | 0.810811 |
1a961945bd215e5622ca2f769932f38bcccb26be | 654 | exs | Elixir | test/dotzip/extra_field/unix_test.exs | niamtokik/dotzip | 93b1dc7c381b87ea4e423b239b9c954583c6faa3 | [
"0BSD"
] | 5 | 2021-06-09T07:19:14.000Z | 2022-01-03T09:05:34.000Z | test/dotzip/extra_field/unix_test.exs | niamtokik/dotzip | 93b1dc7c381b87ea4e423b239b9c954583c6faa3 | [
"0BSD"
] | null | null | null | test/dotzip/extra_field/unix_test.exs | niamtokik/dotzip | 93b1dc7c381b87ea4e423b239b9c954583c6faa3 | [
"0BSD"
] | null | null | null | defmodule Dotzip.ExtraField.UnixTest do
use ExUnit.Case, async: true
test "decode an empty Unix field" do
struct = %{atime: 0, gid: 0, mtime: 0, uid: 0, tsize: 12}
{:ok, struct, data} = Dotzip.ExtraField.Unix.encode(struct)
{:ok, decoded_struct, decoded_data} = Dotzip.ExtraField.Unix.decode(data)
a... | 36.333333 | 79 | 0.669725 |
1a9640ce2471e2493ba87c6ac8f1c9c8a7d187ca | 188 | exs | Elixir | mm/default_params.exs | diningyo/programming-elixir | bc61ee99a56e462129263c6b372eaf1faa9bb3fb | [
"MIT"
] | null | null | null | mm/default_params.exs | diningyo/programming-elixir | bc61ee99a56e462129263c6b372eaf1faa9bb3fb | [
"MIT"
] | null | null | null | mm/default_params.exs | diningyo/programming-elixir | bc61ee99a56e462129263c6b372eaf1faa9bb3fb | [
"MIT"
] | null | null | null | defmodule Example do
def func(p1, p2 \\ 2, p3 \\ 3, p4) do
IO.inspect [p1, p2, p3, p4]
end
end
Example.func("a", "b")
Example.func("a", "b", "c")
Example.func("a", "b", "c", "d")
| 18.8 | 39 | 0.542553 |
1a9662d9f5a5a137e825e0dc8a02d5d4ae6462e6 | 312 | ex | Elixir | lib/console/plural/external_token.ex | pluralsh/console | 38a446ce1bc2f7bc3e904fcacb102d3d57835ada | [
"Apache-2.0"
] | 6 | 2021-11-17T21:10:49.000Z | 2022-02-16T19:45:28.000Z | lib/console/plural/external_token.ex | pluralsh/console | 38a446ce1bc2f7bc3e904fcacb102d3d57835ada | [
"Apache-2.0"
] | 18 | 2021-11-25T04:31:06.000Z | 2022-03-27T04:54:00.000Z | lib/console/plural/external_token.ex | pluralsh/console | 38a446ce1bc2f7bc3e904fcacb102d3d57835ada | [
"Apache-2.0"
] | null | null | null | defmodule Console.Plural.ExternalToken do
use Console.Plural.Base
defmodule Query, do: defstruct [:externalToken]
def fetch() do
external_token_mutation()
|> Client.run(%{}, %Query{})
|> case do
{:ok, %Query{externalToken: token}} -> {:ok, token}
error -> error
end
end
end
| 20.8 | 57 | 0.637821 |
1a96c2031713e6967a5ddf1d6aed950e5ab21ef2 | 243 | ex | Elixir | lib/hl7/2.4/segments/rdf.ex | calvinb/elixir-hl7 | 5e953fa11f9184857c0ec4dda8662889f35a6bec | [
"Apache-2.0"
] | null | null | null | lib/hl7/2.4/segments/rdf.ex | calvinb/elixir-hl7 | 5e953fa11f9184857c0ec4dda8662889f35a6bec | [
"Apache-2.0"
] | null | null | null | lib/hl7/2.4/segments/rdf.ex | calvinb/elixir-hl7 | 5e953fa11f9184857c0ec4dda8662889f35a6bec | [
"Apache-2.0"
] | null | null | null | defmodule HL7.V2_4.Segments.RDF do
@moduledoc false
require Logger
alias HL7.V2_4.{DataTypes}
use HL7.Segment,
fields: [
segment: nil,
number_of_columns_per_row: nil,
column_description: DataTypes.Rcd
]
end
| 17.357143 | 39 | 0.687243 |
1a96e1ce3cee6cf85a28516c114895b462bd06fd | 1,928 | exs | Elixir | test/test_helper.exs | kieraneglin/fun_with_flags | 10ef8e9cde5cc6518e981d2f5deff380141a99be | [
"MIT"
] | null | null | null | test/test_helper.exs | kieraneglin/fun_with_flags | 10ef8e9cde5cc6518e981d2f5deff380141a99be | [
"MIT"
] | null | null | null | test/test_helper.exs | kieraneglin/fun_with_flags | 10ef8e9cde5cc6518e981d2f5deff380141a99be | [
"MIT"
] | null | null | null | # If we are not using Ecto and we're not using Phoenix.PubSub, then
# we need a Redis instance for either persistence or PubSub.
does_anything_need_redis = !(
FunWithFlags.Config.persist_in_ecto? && FunWithFlags.Config.phoenix_pubsub?
)
if FunWithFlags.Config.phoenix_pubsub? do
# Start a Phoenix.PubSub process fo... | 45.904762 | 140 | 0.68361 |
1a97001822403c4aa9e2d60b0fed49afbe5a422d | 2,742 | ex | Elixir | clients/cloud_asset/lib/google_api/cloud_asset/v1/model/google_identity_accesscontextmanager_v1_ingress_from.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/cloud_asset/lib/google_api/cloud_asset/v1/model/google_identity_accesscontextmanager_v1_ingress_from.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/cloud_asset/lib/google_api/cloud_asset/v1/model/google_identity_accesscontextmanager_v1_ingress_from.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.545455 | 257 | 0.7407 |
1a97225824b0fb0ac277b0b982f76173acafa068 | 1,626 | ex | Elixir | clients/gmail/lib/google_api/gmail/v1/model/list_delegates_response.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/gmail/lib/google_api/gmail/v1/model/list_delegates_response.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/gmail/lib/google_api/gmail/v1/model/list_delegates_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... | 34.595745 | 217 | 0.744772 |
1a972cea52a072dcd59d9a6662812b4575574aea | 892 | ex | Elixir | clients/data_pipelines/lib/google_api/data_pipelines/v1/metadata.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/data_pipelines/lib/google_api/data_pipelines/v1/metadata.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/data_pipelines/lib/google_api/data_pipelines/v1/metadata.ex | dazuma/elixir-google-api | 6a9897168008efe07a6081d2326735fe332e522c | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 33.037037 | 74 | 0.761211 |
1a972d66f0f31a4e75457718423cc5be32aef973 | 1,085 | ex | Elixir | lib/hexdocs.ex | hexpm/hexdocs | 808d0b06bbd1a36c639231225ed78cec8c182cae | [
"Apache-2.0"
] | 29 | 2016-10-13T07:32:04.000Z | 2022-03-25T05:59:14.000Z | lib/hexdocs.ex | hexpm/hexdocs | 808d0b06bbd1a36c639231225ed78cec8c182cae | [
"Apache-2.0"
] | 21 | 2016-02-24T03:59:35.000Z | 2021-07-30T08:44:39.000Z | lib/hexdocs.ex | hexpm/hexdocs | 808d0b06bbd1a36c639231225ed78cec8c182cae | [
"Apache-2.0"
] | 12 | 2016-02-28T19:57:36.000Z | 2022-03-18T07:47:39.000Z | defmodule Hexdocs do
@key_regex ~r"docs/(.*)-(.*).tar.gz$"
def process_object(key) do
key
|> build_message()
|> send_message()
end
def process_all_objects() do
batched_send(Hexdocs.Store.list(:repo_bucket, "docs/"))
batched_send(Hexdocs.Store.list(:repo_bucket, "repos/"))
end
defp bui... | 24.659091 | 98 | 0.63318 |
1a97411f3bec2aee9b77344d3b92dda53cf52fe4 | 407 | exs | Elixir | src/003/p003.exs | Ernulphus/polyglot-euler | a5b59b08e6844f0c278bff5ab798acefa95749f3 | [
"MIT"
] | 67 | 2017-12-05T20:44:33.000Z | 2022-03-04T08:13:16.000Z | src/003/p003.exs | Ernulphus/polyglot-euler | a5b59b08e6844f0c278bff5ab798acefa95749f3 | [
"MIT"
] | 49 | 2018-03-26T14:20:26.000Z | 2021-08-17T09:08:55.000Z | src/003/p003.exs | Ernulphus/polyglot-euler | a5b59b08e6844f0c278bff5ab798acefa95749f3 | [
"MIT"
] | 17 | 2018-03-25T23:40:47.000Z | 2022-03-04T08:13:44.000Z | defmodule Problem003 do
defp prime?(x) when x in [2, 3, 7, 11, 13, 17], do: true
defp prime?(x) do
Enum.all?((2..round(:math.sqrt(x))), fn(n) -> rem(x, n) != 0 end)
end
defp factors(n) do
1..round(:math.sqrt(n))
|> Enum.filter(fn(x) -> rem(n, x) == 0 end)
end
def solve do
factors(600851475... | 20.35 | 69 | 0.577396 |
1a97518e68aa207fa7238c4bf18658ff18f2b778 | 1,552 | ex | Elixir | examples/phoenix_sample/lib/phoenix_sample/application.ex | dazzlerocks/absinthe_apollo_sockets | 675be982a28760fac1f61e8a4b6223c28298392e | [
"MIT"
] | 19 | 2018-09-24T19:55:31.000Z | 2021-12-12T20:46:17.000Z | examples/phoenix_sample/lib/phoenix_sample/application.ex | dazzlerocks/absinthe_apollo_sockets | 675be982a28760fac1f61e8a4b6223c28298392e | [
"MIT"
] | 8 | 2018-10-17T13:48:15.000Z | 2021-11-04T05:09:55.000Z | examples/phoenix_sample/lib/phoenix_sample/application.ex | dazzlerocks/absinthe_apollo_sockets | 675be982a28760fac1f61e8a4b6223c28298392e | [
"MIT"
] | 6 | 2018-10-11T13:59:25.000Z | 2022-02-14T14:04:19.000Z | defmodule PhoenixSample.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 = [
# This is the supervisor that provides a set of counters in the schema
{PhoenixSample.Co... | 33.73913 | 88 | 0.728093 |
1a9764b555b83cbcfd7ec637f9e5efce928209af | 1,929 | ex | Elixir | clients/admin/lib/google_api/admin/directory_v1/model/user_keyword.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/admin/lib/google_api/admin/directory_v1/model/user_keyword.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/admin/lib/google_api/admin/directory_v1/model/user_keyword.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... | 36.396226 | 358 | 0.715397 |
1a97767d922e68a434a5c71c3a6ed39191149ec2 | 63 | ex | Elixir | lib/wong_bejo_web/views/post_view.ex | fossabot/web.bejoistic | edd672a8f125180397b89e1f5ee469b1f2344e7f | [
"MIT"
] | null | null | null | lib/wong_bejo_web/views/post_view.ex | fossabot/web.bejoistic | edd672a8f125180397b89e1f5ee469b1f2344e7f | [
"MIT"
] | null | null | null | lib/wong_bejo_web/views/post_view.ex | fossabot/web.bejoistic | edd672a8f125180397b89e1f5ee469b1f2344e7f | [
"MIT"
] | null | null | null | defmodule WongBejoWeb.PostView do
use WongBejoWeb, :view
end
| 15.75 | 33 | 0.809524 |
1a9787139eec9e35b68ea43f5bda047af26fb474 | 13,413 | ex | Elixir | lib/aws/generated/athena.ex | qyon-brazil/aws-elixir | f7f21bebffc6776f95ffe9ef563cf368773438af | [
"Apache-2.0"
] | null | null | null | lib/aws/generated/athena.ex | qyon-brazil/aws-elixir | f7f21bebffc6776f95ffe9ef563cf368773438af | [
"Apache-2.0"
] | null | null | null | lib/aws/generated/athena.ex | qyon-brazil/aws-elixir | f7f21bebffc6776f95ffe9ef563cf368773438af | [
"Apache-2.0"
] | 1 | 2020-10-28T08:56:54.000Z | 2020-10-28T08:56:54.000Z | # WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
# See https://github.com/aws-beam/aws-codegen for more details.
defmodule AWS.Athena do
@moduledoc """
Amazon Athena is an interactive query service that lets you use standard SQL to
analyze data directly in Amazon S3.
You can point Athena at your data in Amazon S3... | 40.038806 | 157 | 0.72221 |
1a979176cf0fbc3924e4fb54480361316c34a601 | 11,911 | ex | Elixir | lib/assent/strategies/oauth2.ex | Nayshins/assent | 0e98827a1783701a99d765c7cde8bc40a2b9c10d | [
"MIT"
] | null | null | null | lib/assent/strategies/oauth2.ex | Nayshins/assent | 0e98827a1783701a99d765c7cde8bc40a2b9c10d | [
"MIT"
] | null | null | null | lib/assent/strategies/oauth2.ex | Nayshins/assent | 0e98827a1783701a99d765c7cde8bc40a2b9c10d | [
"MIT"
] | null | null | null | defmodule Assent.Strategy.OAuth2 do
@moduledoc """
OAuth 2.0 strategy.
This strategy only supports the Authorization Code flow per
[RFC 6749](https://tools.ietf.org/html/rfc6749#section-1.3.1).
`authorize_url/1` returns a map with a `:url` and `:session_params` key. The
`:session_params` should be stored ... | 37.574132 | 128 | 0.649316 |
1a97e030b513262f7436452657068e2520b4a5f8 | 3,921 | ex | Elixir | lib/zen_ex/core/models/ticket.ex | TheRealReal/zen_ex | cea46f398ceba6b46ee128635eb0e4f351f29086 | [
"CC0-1.0"
] | null | null | null | lib/zen_ex/core/models/ticket.ex | TheRealReal/zen_ex | cea46f398ceba6b46ee128635eb0e4f351f29086 | [
"CC0-1.0"
] | null | null | null | lib/zen_ex/core/models/ticket.ex | TheRealReal/zen_ex | cea46f398ceba6b46ee128635eb0e4f351f29086 | [
"CC0-1.0"
] | null | null | null | defmodule ZenEx.Model.Ticket do
alias ZenEx.HTTPClient
alias ZenEx.Query
alias ZenEx.Entity.{Ticket, JobStatus}
@moduledoc """
Provides functions to operate Zendesk Ticket.
"""
@doc """
List tickets.
## Examples
iex> ZenEx.Model.Ticket.list
%ZenEx.Collection{}
"""
@spec list :: %Z... | 27.808511 | 158 | 0.648049 |
1a97fb01a36c2616fad4cd68c55e6fd07da04784 | 729 | ex | Elixir | test/support/channel_case.ex | ssuprunenko/phoenix-vue-2-example | 78498514927ed507ef911877f9fea8ef88541193 | [
"MIT"
] | 67 | 2016-10-01T03:17:18.000Z | 2021-01-17T15:04:27.000Z | test/support/channel_case.ex | marvelperseus/phoenix-vue-2-example | 78498514927ed507ef911877f9fea8ef88541193 | [
"MIT"
] | 1 | 2017-01-03T11:30:20.000Z | 2017-01-03T11:30:20.000Z | test/support/channel_case.ex | marvelperseus/phoenix-vue-2-example | 78498514927ed507ef911877f9fea8ef88541193 | [
"MIT"
] | 10 | 2016-10-15T15:36:46.000Z | 2019-07-29T01:58:03.000Z | defmodule Web.ChannelCase do
@moduledoc """
This module defines the test case to be used by
channel tests.
Such tests rely on `Phoenix.ChannelTest` and also
import other functionality to make it easier
to build and query models.
Finally, if the test case interacts with the database,
it cannot be async... | 21.441176 | 56 | 0.714678 |
1a98c5631c1094999903779314c14e8b5881876c | 2,367 | ex | Elixir | lib/auto_api/states/vehicle_status_state.ex | nonninz/auto-api-elixir | 53e11542043285e94bbb5a0a3b8ffff0b1b47167 | [
"MIT"
] | null | null | null | lib/auto_api/states/vehicle_status_state.ex | nonninz/auto-api-elixir | 53e11542043285e94bbb5a0a3b8ffff0b1b47167 | [
"MIT"
] | null | null | null | lib/auto_api/states/vehicle_status_state.ex | nonninz/auto-api-elixir | 53e11542043285e94bbb5a0a3b8ffff0b1b47167 | [
"MIT"
] | null | null | null | # AutoAPI
# The MIT License
#
# Copyright (c) 2018- High-Mobility GmbH (https://high-mobility.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without lim... | 37.571429 | 100 | 0.719476 |
1a98cc9e84ea315311171fd78c4af15456d9b1c0 | 1,935 | ex | Elixir | lib/remit/comments.ex | calleluks/ex-remit | 893dbc42c9ace6db6ee044f82371075198089fdc | [
"MIT"
] | 17 | 2020-06-28T19:01:49.000Z | 2021-11-24T23:55:09.000Z | lib/remit/comments.ex | calleluks/ex-remit | 893dbc42c9ace6db6ee044f82371075198089fdc | [
"MIT"
] | 29 | 2020-06-27T17:44:38.000Z | 2022-01-17T10:00:12.000Z | lib/remit/comments.ex | calleluks/ex-remit | 893dbc42c9ace6db6ee044f82371075198089fdc | [
"MIT"
] | 2 | 2021-03-01T09:51:56.000Z | 2021-03-04T21:27:56.000Z | defmodule Remit.Comments do
alias Remit.{Repo, Comment, CommentNotification}
import Ecto.Query
def list_notifications(opts) when is_list(opts) do
do_list_notifications(Enum.into(opts, %{}))
end
def list_other_comments_in_the_same_thread(comment) do
comment |> Comment.other_comments_in_the_same_threa... | 28.455882 | 128 | 0.65478 |
1a98fb6b3e18edddf3de6bec107d60d5dbbf592a | 799 | exs | Elixir | test/lfsr_test.exs | pma/lfsr | 971515a17af536a056fcf4e6e488b647e50b1918 | [
"MIT"
] | 7 | 2015-03-26T21:32:26.000Z | 2021-10-20T18:36:41.000Z | test/lfsr_test.exs | pma/lfsr | 971515a17af536a056fcf4e6e488b647e50b1918 | [
"MIT"
] | null | null | null | test/lfsr_test.exs | pma/lfsr | 971515a17af536a056fcf4e6e488b647e50b1918 | [
"MIT"
] | null | null | null | defmodule LFSRTest do
use ExUnit.Case
doctest LFSR
test "maximum length sequence is generated" do
sequence = LFSR.new(1, 4)
|> Stream.iterate(&LFSR.next/1)
|> Stream.map(&LFSR.state/1)
|> Enum.take(15)
|> Enum.sort
assert sequence == Enum.map(1..15, &(&1))
end
test "mask is correctl... | 24.212121 | 108 | 0.647059 |
1a9927ed5b3883ebdd01357bfbaaa9ef311ee3fc | 1,473 | exs | Elixir | mix.exs | van-mronov/paginator | 538f3a3fc021d9337fcc8914c969ed983970ebb9 | [
"MIT"
] | null | null | null | mix.exs | van-mronov/paginator | 538f3a3fc021d9337fcc8914c969ed983970ebb9 | [
"MIT"
] | null | null | null | mix.exs | van-mronov/paginator | 538f3a3fc021d9337fcc8914c969ed983970ebb9 | [
"MIT"
] | null | null | null | defmodule Paginator.Mixfile do
use Mix.Project
@version "0.5.0"
def project do
[
app: :paginator,
version: @version,
elixir: "~> 1.4",
elixirc_paths: elixirc_paths(Mix.env()),
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
deps: deps(),
... | 22.661538 | 67 | 0.553293 |
1a9936e9d55f3d2ebd0e94d2bdfff42664eecc8f | 1,983 | ex | Elixir | priv/templates/brando.install/lib/application_name_web/controllers/page_controller.ex | brandocms/brando | 4198e0c0920031bd909969055064e4e2b7230d21 | [
"MIT"
] | 4 | 2020-10-30T08:40:38.000Z | 2022-01-07T22:21:37.000Z | priv/templates/brando.install/lib/application_name_web/controllers/page_controller.ex | brandocms/brando | 4198e0c0920031bd909969055064e4e2b7230d21 | [
"MIT"
] | 1,162 | 2020-07-05T11:20:15.000Z | 2022-03-31T06:01:49.000Z | priv/templates/brando.install/lib/application_name_web/controllers/page_controller.ex | brandocms/brando | 4198e0c0920031bd909969055064e4e2b7230d21 | [
"MIT"
] | null | null | null | defmodule <%= application_module %>Web.PageController do
use <%= application_module %>Web, :controller
alias Brando.I18n
alias Brando.Pages
alias BrandoWeb.FallbackController
@type conn :: Plug.Conn.t()
@type page_not_found :: {:error, {:page, :not_found}}
action_fallback FallbackController
@doc fals... | 26.092105 | 65 | 0.616742 |
1a99656e4b7aaaafd94669ffbefc0523dddcf9f6 | 583 | exs | Elixir | mix.exs | livinginthepast/ex_aws_connect | ece2abb1e221ea1c7250af663a960b2945895b2c | [
"MIT",
"Unlicense"
] | 1 | 2020-05-01T13:42:48.000Z | 2020-05-01T13:42:48.000Z | mix.exs | livinginthepast/ex_aws_connect | ece2abb1e221ea1c7250af663a960b2945895b2c | [
"MIT",
"Unlicense"
] | null | null | null | mix.exs | livinginthepast/ex_aws_connect | ece2abb1e221ea1c7250af663a960b2945895b2c | [
"MIT",
"Unlicense"
] | null | null | null | defmodule ExAwsConnect.MixProject do
use Mix.Project
def project do
[
app: :ex_aws_connect,
version: "0.1.0",
elixir: "~> 1.10",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
... | 19.433333 | 59 | 0.54717 |
1a996f19053405abff6073a67535214d2e97facb | 47 | ex | Elixir | web/views/page_view.ex | chrissphinx/exchess | 95b471947bc5406d2acdcfa599faff9f9a10f392 | [
"MIT"
] | 1 | 2015-01-06T15:55:39.000Z | 2015-01-06T15:55:39.000Z | web/views/page_view.ex | chrissphinx/exchess | 95b471947bc5406d2acdcfa599faff9f9a10f392 | [
"MIT"
] | null | null | null | web/views/page_view.ex | chrissphinx/exchess | 95b471947bc5406d2acdcfa599faff9f9a10f392 | [
"MIT"
] | null | null | null | defmodule Chat.PageView do
use Chat.View
end
| 11.75 | 26 | 0.787234 |
1a9971b67bfcabd548e8af9de68ade62489259c7 | 1,607 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/instance_groups_add_instances_request.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/compute/lib/google_api/compute/v1/model/instance_groups_add_instances_request.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/compute/lib/google_api/compute/v1/model/instance_groups_add_instances_request.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.191489 | 154 | 0.7542 |
1a997f46bbec460941b20948b3905bf34a0a6ebc | 1,581 | exs | Elixir | src/server/test/game/game_test.exs | pedromykul/csb-wonhu1 | 5fe81fbc99d2b9859fbdb3c87c23e788264c0b9c | [
"MIT"
] | null | null | null | src/server/test/game/game_test.exs | pedromykul/csb-wonhu1 | 5fe81fbc99d2b9859fbdb3c87c23e788264c0b9c | [
"MIT"
] | null | null | null | src/server/test/game/game_test.exs | pedromykul/csb-wonhu1 | 5fe81fbc99d2b9859fbdb3c87c23e788264c0b9c | [
"MIT"
] | null | null | null | defmodule GameTest do
use ExUnit.Case
alias Game.{
Player,
Dice,
Settings
}
test "start/2" do
assert %Game{
players: %{
1 => %Player{
dices: %{
1 => %Dice{},
2 => %Dice{},
3 => %Dice{},
... | 25.918033 | 74 | 0.27704 |
1a99b3ad4057ff5384a04daef703da70f93ac353 | 1,585 | ex | Elixir | clients/tool_results/lib/google_api/tool_results/v1beta3/model/ios_app_crashed.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/tool_results/lib/google_api/tool_results/v1beta3/model/ios_app_crashed.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/tool_results/lib/google_api/tool_results/v1beta3/model/ios_app_crashed.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... | 33.020833 | 137 | 0.748896 |
1a99cf5c81b094d6a85fe1ddd21b9685e86e6cbe | 1,087 | ex | Elixir | lib/futaba_web/live/page_live.ex | sean-clayton/futaba | b7cdcb0ce4192f52a631f581ddee5a4f1c8fcd4a | [
"Unlicense"
] | null | null | null | lib/futaba_web/live/page_live.ex | sean-clayton/futaba | b7cdcb0ce4192f52a631f581ddee5a4f1c8fcd4a | [
"Unlicense"
] | null | null | null | lib/futaba_web/live/page_live.ex | sean-clayton/futaba | b7cdcb0ce4192f52a631f581ddee5a4f1c8fcd4a | [
"Unlicense"
] | null | null | null | defmodule FutabaWeb.PageLive do
use FutabaWeb, :live_view
@impl true
def mount(_params, _session, socket) do
{:ok, assign(socket, query: "", results: %{})}
end
@impl true
def handle_event("suggest", %{"q" => query}, socket) do
{:noreply, assign(socket, results: search(query), query: query)}
end
... | 27.175 | 84 | 0.600736 |
1a9a22fc1a0fd05e486ddbcf17188f0e4ab504b2 | 1,936 | ex | Elixir | lib/new_relixir/polling.ex | nikhilbelchada/new-relixir | 6595b7ef713617e4c69ff414371c01c0e168a706 | [
"MIT"
] | 192 | 2016-03-18T23:58:14.000Z | 2022-02-04T13:41:32.000Z | lib/new_relixir/polling.ex | nikhilbelchada/new-relixir | 6595b7ef713617e4c69ff414371c01c0e168a706 | [
"MIT"
] | 53 | 2016-05-06T17:57:06.000Z | 2019-01-25T21:11:52.000Z | lib/new_relixir/polling.ex | nikhilbelchada/new-relixir | 6595b7ef713617e4c69ff414371c01c0e168a706 | [
"MIT"
] | 55 | 2016-04-29T09:45:36.000Z | 2020-05-27T23:35:04.000Z | defmodule NewRelixir.Polling do
use GenServer
require Logger
@polling_interval Application.get_env(:new_relixir, :polling_interval) || 30_000
## API
def start_link(pull_fun, error_cb \\ &default_error_cb/2) do
GenServer.start_link(__MODULE__, %{pull_fun: pull_fun, error_cb: error_cb})
end
## Callb... | 25.473684 | 88 | 0.635331 |
1a9a267879b5171bdb3c6ddbbb5a94f33dba3e27 | 588 | exs | Elixir | test/portalcs_web/views/error_view_test.exs | pedromcorreia/portal-construindo-sabere | 116402e21d9c1e7b02be2966460c90dcea7d09cd | [
"MIT"
] | null | null | null | test/portalcs_web/views/error_view_test.exs | pedromcorreia/portal-construindo-sabere | 116402e21d9c1e7b02be2966460c90dcea7d09cd | [
"MIT"
] | null | null | null | test/portalcs_web/views/error_view_test.exs | pedromcorreia/portal-construindo-sabere | 116402e21d9c1e7b02be2966460c90dcea7d09cd | [
"MIT"
] | null | null | null | defmodule PortalcsWeb.ErrorViewTest do
use PortalcsWeb.ConnCase, async: true
# Bring render/3 and render_to_string/3 for testing custom views
import Phoenix.View
test "renders 404.html" do
assert render_to_string(PortalcsWeb.ErrorView, "404.html", []) ==
"Page not found"
end
test "render 5... | 26.727273 | 69 | 0.687075 |
1a9a4a30afac313bbe29e49f61cd723da58ea0b7 | 450 | exs | Elixir | test/trimmr_web/views/error_view_test.exs | isakal/trimmr.ex | 72b94b399cc0d700f40a1fd2bc7528ae4cd4a81d | [
"MIT"
] | null | null | null | test/trimmr_web/views/error_view_test.exs | isakal/trimmr.ex | 72b94b399cc0d700f40a1fd2bc7528ae4cd4a81d | [
"MIT"
] | null | null | null | test/trimmr_web/views/error_view_test.exs | isakal/trimmr.ex | 72b94b399cc0d700f40a1fd2bc7528ae4cd4a81d | [
"MIT"
] | null | null | null | defmodule TrimmrWeb.ErrorViewTest do
use TrimmrWeb.ConnCase, async: true
# Bring render/3 and render_to_string/3 for testing custom views
import Phoenix.View
test "renders 404.json" do
assert render(TrimmrWeb.ErrorView, "404.json", []) == %{errors: %{detail: "Not Found"}}
end
test "renders 500.json" ... | 28.125 | 91 | 0.68 |
1a9a589d025d35bcd4162134f74d639c01868c35 | 1,771 | ex | Elixir | lib/elixir/lib/io/stream.ex | jbcrail/elixir | f30ef15d9d028a6d0f74d10c2bb320d5f8501bdb | [
"Apache-2.0"
] | 1 | 2015-02-23T00:01:48.000Z | 2015-02-23T00:01:48.000Z | lib/elixir/lib/io/stream.ex | jbcrail/elixir | f30ef15d9d028a6d0f74d10c2bb320d5f8501bdb | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/io/stream.ex | jbcrail/elixir | f30ef15d9d028a6d0f74d10c2bb320d5f8501bdb | [
"Apache-2.0"
] | null | null | null | defmodule IO.StreamError do
defexception [:reason, :message]
def exception(opts) do
reason = opts[:reason]
formatted = IO.iodata_to_binary(:file.format_error(reason))
%IO.StreamError{message: "error during streaming: #{formatted}", reason: reason}
end
end
defmodule IO.Stream do
@moduledoc """
... | 24.597222 | 86 | 0.612648 |
1a9a8f88f320a9095480d747d755f9d14b0f0d5a | 213 | ex | Elixir | lib/featex_web/live/home_live.ex | pelgero/featex | ef0bd9efa07f87b58f3df68e355a5fa6d367b04f | [
"Apache-2.0"
] | null | null | null | lib/featex_web/live/home_live.ex | pelgero/featex | ef0bd9efa07f87b58f3df68e355a5fa6d367b04f | [
"Apache-2.0"
] | 1 | 2021-05-11T19:13:08.000Z | 2021-05-11T19:13:08.000Z | lib/featex_web/live/home_live.ex | pelgero/featex | ef0bd9efa07f87b58f3df68e355a5fa6d367b04f | [
"Apache-2.0"
] | null | null | null | defmodule FeatexWeb.HomeLive do
use FeatexWeb, :live_view
@impl true
def mount(_params, _session, socket) do
{:ok, redirect(socket, to: Routes.live_path(socket, FeatexWeb.ListFeaturesLive))}
end
end
| 21.3 | 85 | 0.741784 |
1a9af28a0bd6f2eb334248f661bffce36d222f12 | 1,053 | ex | Elixir | test/support/conn_case.ex | AgileVentures/Paironauts | cc151885cede272c22b008d2f5e550c89391264c | [
"MIT"
] | 7 | 2017-11-18T15:36:58.000Z | 2020-04-22T10:51:15.000Z | test/support/conn_case.ex | AgileVentures/Paironauts | cc151885cede272c22b008d2f5e550c89391264c | [
"MIT"
] | 33 | 2017-12-08T11:21:09.000Z | 2020-02-19T04:24:35.000Z | test/support/conn_case.ex | AgileVentures/Paironauts | cc151885cede272c22b008d2f5e550c89391264c | [
"MIT"
] | 5 | 2017-11-15T18:51:59.000Z | 2018-12-13T06:01:23.000Z | defmodule PaironautsWeb.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 datastructures and query the data layer.
Finally, if ... | 27 | 72 | 0.723647 |
1a9b064b598ad7042d0f30646f05a11afd4463df | 1,966 | ex | Elixir | clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/list_occurrences_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/list_occurrences_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/list_occurrences_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 39.32 | 209 | 0.754323 |
1a9b720f57012284bac4cc0e75cfda0ea007e9f3 | 4,778 | ex | Elixir | lib/credo/check/readability/large_numbers.ex | codeclimate-community/credo | b960a25d604b4499a2577321f9d61b39dc4b0437 | [
"MIT"
] | null | null | null | lib/credo/check/readability/large_numbers.ex | codeclimate-community/credo | b960a25d604b4499a2577321f9d61b39dc4b0437 | [
"MIT"
] | null | null | null | lib/credo/check/readability/large_numbers.ex | codeclimate-community/credo | b960a25d604b4499a2577321f9d61b39dc4b0437 | [
"MIT"
] | null | null | null | defmodule Credo.Check.Readability.LargeNumbers do
@moduledoc false
@checkdoc """
Numbers can contain underscores for readability purposes.
These do not affect the value of the number, but can help read large numbers
more easily.
141592654 # how large is this number?
141_592_654 # ah, it's in th... | 25.147368 | 96 | 0.626413 |
1a9b77c63c06ea90e411d4ea4b3a837bfce34804 | 106 | exs | Elixir | test/telnet/new_environ_test.exs | oestrich/telnet-elixir | 9a1e431d9d67914d83a051a9bb93183b21f34a53 | [
"MIT"
] | 3 | 2019-04-16T22:17:33.000Z | 2019-09-14T06:18:04.000Z | test/telnet/new_environ_test.exs | oestrich/telnet-elixir | 9a1e431d9d67914d83a051a9bb93183b21f34a53 | [
"MIT"
] | null | null | null | test/telnet/new_environ_test.exs | oestrich/telnet-elixir | 9a1e431d9d67914d83a051a9bb93183b21f34a53 | [
"MIT"
] | null | null | null | defmodule Telnet.NewEnvironTest do
use ExUnit.Case
alias Telnet.NewEnviron
doctest NewEnviron
end
| 13.25 | 34 | 0.801887 |
1a9b97405fca24bc110e0dc1048570bec5c96ff1 | 63 | ex | Elixir | lib/militerm_web/views/game_view.ex | jgsmith/militerm | c4252d0a93f5620b90750ac2b61baf282e9ef7eb | [
"Apache-2.0"
] | 6 | 2017-06-16T10:26:35.000Z | 2021-04-07T15:01:00.000Z | lib/militerm_web/views/game_view.ex | jgsmith/militerm | c4252d0a93f5620b90750ac2b61baf282e9ef7eb | [
"Apache-2.0"
] | 2 | 2020-04-14T02:17:46.000Z | 2021-03-10T11:09:05.000Z | lib/militerm_web/views/game_view.ex | jgsmith/militerm | c4252d0a93f5620b90750ac2b61baf282e9ef7eb | [
"Apache-2.0"
] | null | null | null | defmodule MilitermWeb.GameView do
use MilitermWeb, :view
end
| 15.75 | 33 | 0.809524 |
1a9beec5d113d3922852df3eb5491b06bd1d33e9 | 1,873 | exs | Elixir | weather_tracker/config/prod.exs | NickMcG/WeatherStation | 83ff0ad75467c10eead409c4fc3a437643b9a994 | [
"MIT"
] | null | null | null | weather_tracker/config/prod.exs | NickMcG/WeatherStation | 83ff0ad75467c10eead409c4fc3a437643b9a994 | [
"MIT"
] | null | null | null | weather_tracker/config/prod.exs | NickMcG/WeatherStation | 83ff0ad75467c10eead409c4fc3a437643b9a994 | [
"MIT"
] | null | null | null | import Config
# For production, don't forget to configure the url host
# to something meaningful, Phoenix uses this information
# when generating URLs.
#
# Note we also include the path to a cache manifest
# containing the digested version of static files. This
# manifest is generated by the `mix phx.digest` task,
# w... | 36.019231 | 66 | 0.711159 |
1a9c4e32de47d4bbc9259c44c347dcc3b05bd8c6 | 2,173 | ex | Elixir | clients/you_tube/lib/google_api/you_tube/v3/model/caption_list_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/you_tube/lib/google_api/you_tube/v3/model/caption_list_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/you_tube/lib/google_api/you_tube/v3/model/caption_list_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 36.830508 | 174 | 0.700414 |
1a9c5491ff69514a0d66f40988043aea6d272e93 | 198 | ex | Elixir | lib/flix_web/graphql/resolvers/genre_resolver.ex | conradwt/flix-elixir | e4d6bf6fd79be12fbed6fb6250f78e929247c1a4 | [
"MIT"
] | 3 | 2021-03-21T23:52:16.000Z | 2021-06-02T03:47:00.000Z | lib/flix_web/graphql/resolvers/genre_resolver.ex | conradwt/flix-elixir | e4d6bf6fd79be12fbed6fb6250f78e929247c1a4 | [
"MIT"
] | 44 | 2021-04-09T04:04:13.000Z | 2022-03-29T06:29:37.000Z | lib/flix_web/graphql/resolvers/genre_resolver.ex | conradwt/flix-elixir | e4d6bf6fd79be12fbed6fb6250f78e929247c1a4 | [
"MIT"
] | null | null | null | defmodule FlixWeb.Graphql.Resolvers.GenreResolver do
alias Flix.Catalogs
def list_genres(%Flix.Catalogs.Movie{} = movie, _args, _resolution) do
{:ok, Catalogs.list_genres(movie)}
end
end
| 24.75 | 72 | 0.757576 |
1a9c68e710ccedd562386246ba2f12a55993226f | 1,725 | ex | Elixir | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v2beta1/model/add_deal_association_request.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v2beta1/model/add_deal_association_request.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v2beta1/model/add_deal_association_request.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... | 36.702128 | 185 | 0.770435 |
1a9c75845c16d88751b9ba56e46d094b2dbb5917 | 878 | ex | Elixir | lib/ex_aws/request/hackney.ex | sivsushruth/ex_aws | 45a6fa6b6ed539066d1a5be0b04ef43d8305c4d0 | [
"MIT"
] | null | null | null | lib/ex_aws/request/hackney.ex | sivsushruth/ex_aws | 45a6fa6b6ed539066d1a5be0b04ef43d8305c4d0 | [
"MIT"
] | null | null | null | lib/ex_aws/request/hackney.ex | sivsushruth/ex_aws | 45a6fa6b6ed539066d1a5be0b04ef43d8305c4d0 | [
"MIT"
] | null | null | null | defmodule ExAws.Request.Hackney do
@behaviour ExAws.Request.HttpClient
@moduledoc """
Configuration for `:hackney`.
Options can be set for `:hackney` with the following config:
config :ex_aws, :hackney_opts,
recv_timeout: 30_000
The default config handles setting the above.
"""
@default... | 26.606061 | 73 | 0.635535 |
1a9c963f9384b1a11ac6078566b1ad23a0eea8c5 | 2,190 | exs | Elixir | test/appsignal/diagnose/report_test.exs | MeterSoft/appsignal-elixir | 52e3505b9dc90bce0795c4753a758d40bdf41463 | [
"MIT"
] | 234 | 2016-08-18T20:43:15.000Z | 2022-02-27T11:31:48.000Z | test/appsignal/diagnose/report_test.exs | MeterSoft/appsignal-elixir | 52e3505b9dc90bce0795c4753a758d40bdf41463 | [
"MIT"
] | 563 | 2016-07-25T17:45:14.000Z | 2022-03-21T11:39:29.000Z | test/appsignal/diagnose/report_test.exs | MeterSoft/appsignal-elixir | 52e3505b9dc90bce0795c4753a758d40bdf41463 | [
"MIT"
] | 86 | 2016-09-13T22:53:46.000Z | 2022-02-16T11:03:51.000Z | defmodule Mix.Tasks.Appsignal.Diagnose.ReportTest do
use ExUnit.Case
import AppsignalTest.Utils
defp send do
Appsignal.Diagnose.Report.send(
Application.get_env(:appsignal, :config, %{}),
%{}
)
end
setup do
diagnose_bypass = Bypass.open()
setup_with_config(%{
api_key: "foo... | 26.071429 | 81 | 0.632877 |
1a9cae4ff1983b73005ebde23ed3d4916bf4ee86 | 165 | ex | Elixir | lib/elixir_google_scraper_web/views/v1/error_view.ex | junan/elixir_google_scraper | d032f3a9d5a30e354f1e6d607434670334936630 | [
"MIT"
] | null | null | null | lib/elixir_google_scraper_web/views/v1/error_view.ex | junan/elixir_google_scraper | d032f3a9d5a30e354f1e6d607434670334936630 | [
"MIT"
] | 25 | 2021-05-21T02:23:37.000Z | 2021-07-09T09:22:32.000Z | lib/elixir_google_scraper_web/views/v1/error_view.ex | junan/elixir_google_scraper | d032f3a9d5a30e354f1e6d607434670334936630 | [
"MIT"
] | null | null | null | defmodule ElixirGoogleScraperWeb.V1.ErrorView do
use JSONAPI.View, type: "error"
def render("error.json", %{errors: detail}) do
%{errors: detail}
end
end
| 20.625 | 48 | 0.709091 |
1a9cf4d4e64e5549b4cbcd739366afc25334a5a4 | 320 | ex | Elixir | web/controllers/sessions_controller.ex | keichan34/hello_link | 0b5de0653f667b205e76b7a360650c05138b4d63 | [
"MIT"
] | 1 | 2015-12-31T00:36:09.000Z | 2015-12-31T00:36:09.000Z | web/controllers/sessions_controller.ex | keichan34/hello_link | 0b5de0653f667b205e76b7a360650c05138b4d63 | [
"MIT"
] | 3 | 2016-01-01T04:11:40.000Z | 2016-01-01T04:12:37.000Z | web/controllers/sessions_controller.ex | keichan34/hello_link | 0b5de0653f667b205e76b7a360650c05138b4d63 | [
"MIT"
] | null | null | null | defmodule HelloLink.SessionsController do
use HelloLink.Web, :controller
def destroy(conn, _params) do
conn
|> assign(:user, nil)
|> put_session(:user_id, nil)
|> put_flash(:info, "You have been logged out. Click one of the \"Authorize\" buttons to log back in.")
|> redirect(to: "/")
end
end
| 26.666667 | 107 | 0.665625 |
1a9d04f2b099145a99a36a4ac62345b467260203 | 23,876 | ex | Elixir | lib/error.ex | ianrumford/harnais_error | f3151d7f15200a357fb8da1f16bcb4719fb2e839 | [
"MIT"
] | null | null | null | lib/error.ex | ianrumford/harnais_error | f3151d7f15200a357fb8da1f16bcb4719fb2e839 | [
"MIT"
] | null | null | null | lib/error.ex | ianrumford/harnais_error | f3151d7f15200a357fb8da1f16bcb4719fb2e839 | [
"MIT"
] | null | null | null | defmodule Harnais.Error do
@moduledoc ~S"""
The Exception for the Harnais Package Family.
Many of the functions in the Harnais packages return
either `{:ok, any}` or `{error, error}` where `error` will be an
`Exception`.
Many of the errors will be instances of `Harnais.Error` `struct`.
## Exporting the... | 28.731649 | 113 | 0.597252 |
1a9d18bfb5e8309e1daba0837a80603ca450f649 | 2,844 | exs | Elixir | test/trifolium/endpoints/kinkdoms_test.exs | daskycodes/trifolium | 322f01f89948c51d974e64b049ca2ce2d0f8b45f | [
"MIT"
] | 1 | 2021-04-19T15:09:35.000Z | 2021-04-19T15:09:35.000Z | test/trifolium/endpoints/kinkdoms_test.exs | daskycodes/trifolium | 322f01f89948c51d974e64b049ca2ce2d0f8b45f | [
"MIT"
] | 1 | 2021-04-19T18:08:05.000Z | 2021-04-19T18:08:05.000Z | test/trifolium/endpoints/kinkdoms_test.exs | daskycodes/trifolium | 322f01f89948c51d974e64b049ca2ce2d0f8b45f | [
"MIT"
] | 2 | 2021-04-19T15:09:39.000Z | 2021-04-28T14:05:21.000Z | defmodule Trifolium.KingdomsTest do
use ExUnit.Case, async: true
import Mox
alias Trifolium.Kingdoms
alias Trifolium.Config
@http_client Trifolium.HTTPClientMock
@token Config.token()
describe "all" do
@path "https://trefle.io/api/v1/kingdoms/"
@success_resp %{
"data" => [
%{
... | 24.730435 | 94 | 0.494023 |
1a9d6078c3510dfeb1fa392af2972659784706ad | 3,123 | ex | Elixir | test/support/riak_cluster.ex | antoinereyt/riak_core_elixir | 7637d75e4a4a6f2fd3e60550db06606279a2fd5c | [
"Apache-2.0"
] | null | null | null | test/support/riak_cluster.ex | antoinereyt/riak_core_elixir | 7637d75e4a4a6f2fd3e60550db06606279a2fd5c | [
"Apache-2.0"
] | null | null | null | test/support/riak_cluster.ex | antoinereyt/riak_core_elixir | 7637d75e4a4a6f2fd3e60550db06606279a2fd5c | [
"Apache-2.0"
] | null | null | null | defmodule NoSlides.RiakCluster do
@moduledoc false
## derived from Phoenix.PubSub.Cluster and Riak_core example at https://github.com/lambdaclass/riak_core_tutorial
def start_test_nodes() do
start_master()
nodes = Application.get_env(:no_slides, :nodes, [])
# start nodes serially:
#for {node, we... | 32.195876 | 118 | 0.669228 |
1a9d7b4a65814b0b1dcac41e222bc5a7f3c8bf76 | 65 | ex | Elixir | lib/lib_ten_web/views/admin/user_view.ex | 10clouds/10Books | 622360ea190421e07d4b207700867be105894218 | [
"MIT"
] | 11 | 2018-08-29T15:59:09.000Z | 2021-08-25T16:35:13.000Z | lib/lib_ten_web/views/admin/user_view.ex | fram74/10Books | 9e4e280032c7f7b9625c831efa9850d999327e53 | [
"MIT"
] | 16 | 2018-08-29T15:43:52.000Z | 2021-05-09T00:53:56.000Z | lib/lib_ten_web/views/admin/user_view.ex | fram74/10Books | 9e4e280032c7f7b9625c831efa9850d999327e53 | [
"MIT"
] | 3 | 2019-05-29T14:22:59.000Z | 2020-06-06T12:30:54.000Z | defmodule LibTenWeb.Admin.UserView do
use LibTenWeb, :view
end
| 16.25 | 37 | 0.8 |
1a9d7be1bb2661d8ba9390c7118cd16f9091e4d5 | 20,905 | ex | Elixir | lib/encode.ex | wojtekmach/jason | d82693f7efa88f00a92df09903f5852458a4fd5d | [
"Apache-2.0"
] | 1 | 2019-11-11T21:48:20.000Z | 2019-11-11T21:48:20.000Z | lib/encode.ex | wojtekmach/jason | d82693f7efa88f00a92df09903f5852458a4fd5d | [
"Apache-2.0"
] | 4 | 2021-03-04T13:00:52.000Z | 2021-03-12T12:42:09.000Z | deps/jason/lib/encode.ex | adrianomota/blog | ef3b2d2ed54f038368ead8234d76c18983caa75b | [
"MIT"
] | 1 | 2021-08-04T09:34:46.000Z | 2021-08-04T09:34:46.000Z | defmodule Jason.EncodeError do
defexception [:message]
@type t :: %__MODULE__{message: String.t}
def new({:duplicate_key, key}) do
%__MODULE__{message: "duplicate key: #{key}"}
end
def new({:invalid_byte, byte, original}) do
%__MODULE__{message: "invalid byte #{inspect byte, base: :hex} in #{inspect... | 32.92126 | 98 | 0.63535 |
1a9ddaceea76b7a2c807ce11fe47de17494b2dcf | 178 | exs | Elixir | test/controllers/page_controller_test.exs | Gimi/coders | 28e20558ac26709c62b8463dae963e4e41a759b2 | [
"MIT"
] | null | null | null | test/controllers/page_controller_test.exs | Gimi/coders | 28e20558ac26709c62b8463dae963e4e41a759b2 | [
"MIT"
] | null | null | null | test/controllers/page_controller_test.exs | Gimi/coders | 28e20558ac26709c62b8463dae963e4e41a759b2 | [
"MIT"
] | null | null | null | defmodule Coders.PageControllerTest do
use Coders.ConnCase
test "GET /" do
conn = get conn(), "/"
assert html_response(conn, 200) =~ "Welcome to Phoenix!"
end
end
| 19.777778 | 60 | 0.674157 |
1a9e08fc50dd9546687867af41c6d774ff582277 | 2,347 | ex | Elixir | implementations/elixir/ockam/ockam/lib/ockam/workers/pub_sub_subscriber.ex | 0x00A5/ockam | 9710804e20606e70057d65c70d1af7236194aeeb | [
"Apache-2.0"
] | null | null | null | implementations/elixir/ockam/ockam/lib/ockam/workers/pub_sub_subscriber.ex | 0x00A5/ockam | 9710804e20606e70057d65c70d1af7236194aeeb | [
"Apache-2.0"
] | null | null | null | implementations/elixir/ockam/ockam/lib/ockam/workers/pub_sub_subscriber.ex | 0x00A5/ockam | 9710804e20606e70057d65c70d1af7236194aeeb | [
"Apache-2.0"
] | null | null | null | defmodule Ockam.Workers.PubSubSubscriber do
@moduledoc """
Worker to maintain Ockam.Services pub_sub service subscription
Refreshes subscription to pub_sup service every interval milliseconds
Can be used to maintain resilient subscription to a topic
even if the connection or pub_sub service restarts
Opti... | 25.236559 | 85 | 0.6536 |
1a9e245291cdcfbd29090d60cfe90a48baf9df9b | 1,220 | ex | Elixir | apps/gapi_web/test/support/conn_case.ex | rolandolucio/gapi_umbrella | b1e690804d7d2a79d3ece7ca12edf65197ca7145 | [
"MIT"
] | null | null | null | apps/gapi_web/test/support/conn_case.ex | rolandolucio/gapi_umbrella | b1e690804d7d2a79d3ece7ca12edf65197ca7145 | [
"MIT"
] | null | null | null | apps/gapi_web/test/support/conn_case.ex | rolandolucio/gapi_umbrella | b1e690804d7d2a79d3ece7ca12edf65197ca7145 | [
"MIT"
] | null | null | null | defmodule GapiWeb.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.
Finally, if the t... | 27.727273 | 66 | 0.719672 |
1a9e29c81e775b2aa8ec6234bbb6754fac87bec6 | 2,784 | ex | Elixir | lib/whatChat_web/channels/utils/presences/conversation_presence.ex | Perfect-SoftwareEngineer/vue-elegant-chat | 4656bea123a6454584a163260899f0b4e59e073a | [
"MIT",
"BSD-3-Clause"
] | 52 | 2019-02-01T16:34:34.000Z | 2022-03-24T12:02:47.000Z | lib/whatChat_web/channels/utils/presences/conversation_presence.ex | mbuala/WhatChat | 44851a8b3afe0a8825b5e53e327c2f777065a60c | [
"MIT"
] | 30 | 2019-07-19T00:56:47.000Z | 2022-03-26T01:41:41.000Z | lib/whatChat_web/channels/utils/presences/conversation_presence.ex | mbuala/WhatChat | 44851a8b3afe0a8825b5e53e327c2f777065a60c | [
"MIT"
] | 23 | 2019-02-02T10:32:09.000Z | 2022-01-24T02:00:29.000Z | defmodule WhatChatWeb.ConversationPresence do
@moduledoc """
Provides presence tracking to channels and processes.
See the [`Phoenix.Presence`](http://hexdocs.pm/phoenix/Phoenix.Presence.html)
docs for more details.
## Usage
Presences can be tracked in your channel after joining:
defmodule WhatCha... | 37.621622 | 79 | 0.67421 |
1a9e47e140ceb6dc4b59a871a62056e9e3730e95 | 2,211 | ex | Elixir | lib/ex_doc/markdown.ex | mayel/ex_doc | 6e5ecfa7d6248fd8038caf4e9f4ac02eb13d0d0f | [
"Apache-2.0",
"CC-BY-4.0"
] | 1,206 | 2015-01-02T02:05:12.000Z | 2022-03-29T17:18:10.000Z | lib/ex_doc/markdown.ex | mayel/ex_doc | 6e5ecfa7d6248fd8038caf4e9f4ac02eb13d0d0f | [
"Apache-2.0",
"CC-BY-4.0"
] | 1,266 | 2015-01-03T03:26:04.000Z | 2022-03-31T09:43:53.000Z | lib/ex_doc/markdown.ex | LaudateCorpus1/ex_doc | 0612bac649cbb44ef09c20dedcf7e588a150606c | [
"Apache-2.0",
"CC-BY-4.0"
] | 300 | 2015-01-03T04:07:24.000Z | 2022-03-29T08:10:56.000Z | defmodule ExDoc.Markdown do
@moduledoc """
Adapter behaviour and conveniences for converting Markdown to HTML.
ExDoc is compatible with any markdown processor that implements the
functions defined in this module. The markdown processor can be changed
via the `:markdown_processor` option in your `mix.exs`.
... | 26.963415 | 79 | 0.697874 |
1a9e88bbfa56d14fa49379fe7fe2303be87bcdb2 | 89 | exs | Elixir | test/wavex/chunks/riff_test.exs | basdirks/wavex | b465c374d4b8a1668187d6c056b1d299fe3a9ffe | [
"Apache-2.0"
] | null | null | null | test/wavex/chunks/riff_test.exs | basdirks/wavex | b465c374d4b8a1668187d6c056b1d299fe3a9ffe | [
"Apache-2.0"
] | null | null | null | test/wavex/chunks/riff_test.exs | basdirks/wavex | b465c374d4b8a1668187d6c056b1d299fe3a9ffe | [
"Apache-2.0"
] | null | null | null | defmodule Wavex.Chunk.RIFFTest do
@moduledoc false
use ExUnit.Case, async: true
end
| 14.833333 | 33 | 0.764045 |
1a9e8a3abda9fa13b96f93c36cb6aeb9dca155a8 | 572 | exs | Elixir | example/mix.exs | guthb/fp | 2a754adfcf2eb60e80016a23de81fad83993bafe | [
"MIT"
] | null | null | null | example/mix.exs | guthb/fp | 2a754adfcf2eb60e80016a23de81fad83993bafe | [
"MIT"
] | null | null | null | example/mix.exs | guthb/fp | 2a754adfcf2eb60e80016a23de81fad83993bafe | [
"MIT"
] | null | null | null | defmodule Example.MixProject do
use Mix.Project
def project do
[
app: :example,
version: "0.1.0",
elixir: "~> 1.11",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_ap... | 19.724138 | 87 | 0.576923 |
1a9e8c8d33bda5025ceedb07617b8c7a279831f3 | 1,787 | ex | Elixir | lib/mix/tasks/amp.ownership.ex | surgeventures/ex_amp | 56b177e7ac017dff009de1972297ccf5c821330b | [
"MIT"
] | null | null | null | lib/mix/tasks/amp.ownership.ex | surgeventures/ex_amp | 56b177e7ac017dff009de1972297ccf5c821330b | [
"MIT"
] | null | null | null | lib/mix/tasks/amp.ownership.ex | surgeventures/ex_amp | 56b177e7ac017dff009de1972297ccf5c821330b | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.Amp.Ownership do
@moduledoc """
Manages package ownership on Hex as a code.
When the organization active with Elixir open source releases on Hex grows with more maintainers and growing number of packages, it may become a time consuming and error prone task to manage the
package ownership. T... | 31.350877 | 197 | 0.717963 |
1a9ea3eb0f6cef02ef2336c01e73310b80f15d38 | 811 | ex | Elixir | lib/pummpcomm/session/exchange/read_time.ex | infinity-aps/pummpcomm | 7380585ecd110ab1c19d2aea3880e51e3f433050 | [
"MIT"
] | 15 | 2017-08-31T00:58:47.000Z | 2020-01-12T03:53:13.000Z | lib/pummpcomm/session/exchange/read_time.ex | vladhj38/pummpcomm | 7380585ecd110ab1c19d2aea3880e51e3f433050 | [
"MIT"
] | 1 | 2017-09-15T02:09:31.000Z | 2017-09-15T02:09:31.000Z | lib/pummpcomm/session/exchange/read_time.ex | vladhj38/pummpcomm | 7380585ecd110ab1c19d2aea3880e51e3f433050 | [
"MIT"
] | 3 | 2017-09-10T17:24:59.000Z | 2019-09-10T19:41:49.000Z | defmodule Pummpcomm.Session.Exchange.ReadTime do
@moduledoc """
Reads pump's current time
"""
alias Pummpcomm.Session.{Command, Response}
alias Pummpcomm.DateDecoder
# Constants
@opcode 0x70
# Functions
@doc """
Decodes `Pummpcomm.Session.Response.t` to `NaiveDateTime.t` for the pump's current ... | 26.16129 | 94 | 0.697904 |
1a9ef269ccd7e4d5f9a051e110ad7f0b5f041be3 | 558 | ex | Elixir | lib/logger.ex | polyglot-concurrency/libcluster | 1a0640f2b39adc430a121add01ab2ae0a4ee35b2 | [
"MIT"
] | 1,571 | 2016-09-30T20:38:30.000Z | 2022-03-31T15:06:38.000Z | lib/logger.ex | polyglot-concurrency/libcluster | 1a0640f2b39adc430a121add01ab2ae0a4ee35b2 | [
"MIT"
] | 140 | 2016-10-11T10:03:06.000Z | 2022-03-18T21:06:32.000Z | lib/logger.ex | polyglot-concurrency/libcluster | 1a0640f2b39adc430a121add01ab2ae0a4ee35b2 | [
"MIT"
] | 167 | 2016-10-24T09:47:16.000Z | 2022-03-15T11:59:50.000Z | defmodule Cluster.Logger do
@moduledoc false
require Logger
def debug(t, msg) do
case Application.get_env(:libcluster, :debug, false) do
dbg when dbg in [nil, false, "false"] ->
:ok
_ ->
Logger.debug(log_message(t, msg))
end
end
def info(t, msg), do: Logger.info(log_mess... | 23.25 | 59 | 0.629032 |
1a9ef713a2a3ba8f21962724b33131a7ed60a630 | 1,626 | exs | Elixir | config/config.exs | Potrimpo/Multinode-MlDHT | 21860e68443f9e3d05225eb41e31cd4413361891 | [
"MIT"
] | null | null | null | config/config.exs | Potrimpo/Multinode-MlDHT | 21860e68443f9e3d05225eb41e31cd4413361891 | [
"MIT"
] | null | null | null | config/config.exs | Potrimpo/Multinode-MlDHT | 21860e68443f9e3d05225eb41e31cd4413361891 | [
"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... | 39.658537 | 73 | 0.755228 |
1a9f52c68a1cf5c20903397f000989b1fdd20256 | 290 | ex | Elixir | lib/world/world_clock.ex | doawoo/elixir_rpg | 4dcd0eb717bd1d654b3e6a06be31aba4c3254fb3 | [
"MIT"
] | 23 | 2021-10-24T00:21:13.000Z | 2022-03-13T12:33:38.000Z | lib/world/world_clock.ex | doawoo/elixir_rpg | 4dcd0eb717bd1d654b3e6a06be31aba4c3254fb3 | [
"MIT"
] | null | null | null | lib/world/world_clock.ex | doawoo/elixir_rpg | 4dcd0eb717bd1d654b3e6a06be31aba4c3254fb3 | [
"MIT"
] | 3 | 2021-11-04T02:42:25.000Z | 2022-02-02T14:22:52.000Z | defmodule ElixirRPG.World.Clock do
def start_tick(target_ticks_per_sec, target_pid)
when is_pid(target_pid) and is_integer(target_ticks_per_sec) do
ms = trunc(1000 / target_ticks_per_sec)
{:ok, timer_ref} = :timer.send_interval(ms, target_pid, :tick)
timer_ref
end
end | 36.25 | 69 | 0.755172 |
1a9f56be551aa2e48ef179ecafa0863825c2c862 | 1,895 | exs | Elixir | clients/ad_sense/mix.exs | mopp/elixir-google-api | d496227d17600bccbdf8f6be9ad1b7e7219d7ec6 | [
"Apache-2.0"
] | null | null | null | clients/ad_sense/mix.exs | mopp/elixir-google-api | d496227d17600bccbdf8f6be9ad1b7e7219d7ec6 | [
"Apache-2.0"
] | null | null | null | clients/ad_sense/mix.exs | 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... | 28.283582 | 155 | 0.662269 |
1a9f5bf104d11317b423f9c3a09081256a31f733 | 286 | exs | Elixir | priv/repo/migrations/20210107134653_add_user_table.exs | dcdourado/hello_finance | ff7d3b67c0c39c3c60675d018b49f5c7e304610b | [
"MIT"
] | null | null | null | priv/repo/migrations/20210107134653_add_user_table.exs | dcdourado/hello_finance | ff7d3b67c0c39c3c60675d018b49f5c7e304610b | [
"MIT"
] | null | null | null | priv/repo/migrations/20210107134653_add_user_table.exs | dcdourado/hello_finance | ff7d3b67c0c39c3c60675d018b49f5c7e304610b | [
"MIT"
] | null | null | null | defmodule HelloFinance.Repo.Migrations.AddUserTable do
use Ecto.Migration
def change do
create table(:users) do
add :name, :string
add :email, :string
add :password_hash, :string
timestamps()
end
create unique_index(:users, [:email])
end
end
| 19.066667 | 54 | 0.664336 |
1a9f9bc34c692db527321446c3d2e2805738a69e | 6,844 | ex | Elixir | lib/mix/lib/mix/project_stack.ex | kassio/elixir | 78551c11c9c97bb608e4097d2e0c36458b11f535 | [
"Apache-2.0"
] | 1 | 2019-10-11T01:36:26.000Z | 2019-10-11T01:36:26.000Z | lib/mix/lib/mix/project_stack.ex | hiro-riveros/elixir | c6da1cfaa83e420726be25617440fc09f118de52 | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/project_stack.ex | hiro-riveros/elixir | c6da1cfaa83e420726be25617440fc09f118de52 | [
"Apache-2.0"
] | null | null | null | defmodule Mix.ProjectStack do
@moduledoc false
use Agent
@name __MODULE__
@timeout 30000
@typep file :: binary
@typep config :: keyword
@typep project :: %{name: module, config: config, file: file}
@spec start_link(keyword) :: {:ok, pid}
def start_link(_opts) do
Agent.start_link(&initial_state/... | 22.737542 | 82 | 0.539451 |
1a9fbec82e5fe538ae8371a7529c51e31844b642 | 1,088 | exs | Elixir | mix.exs | compost-connect/geocoder | ff08e3c5e0b7194b98a074e12388842b185c1c56 | [
"MIT"
] | null | null | null | mix.exs | compost-connect/geocoder | ff08e3c5e0b7194b98a074e12388842b185c1c56 | [
"MIT"
] | null | null | null | mix.exs | compost-connect/geocoder | ff08e3c5e0b7194b98a074e12388842b185c1c56 | [
"MIT"
] | null | null | null | defmodule Geocoder.Mixfile do
use Mix.Project
def project do
[app: :geocoder,
description: "A simple, efficient geocoder/reverse geocoder with a built-in cache.",
version: "0.7.0",
elixir: "~> 1.2",
package: package(),
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == ... | 27.897436 | 122 | 0.57261 |
1a9fd213cf10442cbf9bc1027ea17ee3ec16fe04 | 1,792 | ex | Elixir | clients/cloud_channel/lib/google_api/cloud_channel/v1/model/google_cloud_channel_v1_constraints.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/cloud_channel/lib/google_api/cloud_channel/v1/model/google_cloud_channel_v1_constraints.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/cloud_channel/lib/google_api/cloud_channel/v1/model/google_cloud_channel_v1_constraints.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... | 35.84 | 203 | 0.768973 |
1aa003d712bd4c72fa3ee41acdd7576594c73155 | 33,261 | ex | Elixir | apps/routes/lib/mock_repo_api.ex | noisecapella/dotcom | d5ef869412102d2230fac3dcc216f01a29726227 | [
"MIT"
] | 42 | 2019-05-29T16:05:30.000Z | 2021-08-09T16:03:37.000Z | apps/routes/lib/mock_repo_api.ex | noisecapella/dotcom | d5ef869412102d2230fac3dcc216f01a29726227 | [
"MIT"
] | 872 | 2019-05-29T17:55:50.000Z | 2022-03-30T09:28:43.000Z | apps/routes/lib/mock_repo_api.ex | noisecapella/dotcom | d5ef869412102d2230fac3dcc216f01a29726227 | [
"MIT"
] | 12 | 2019-07-01T18:33:21.000Z | 2022-03-10T02:13:57.000Z | defmodule Routes.MockRepoApi do
@moduledoc """
A mock Routes Repo client for testing purposes.
In some cases we are returning just a subset of what the actual API would return, given that this file is for testing purposes
"""
@behaviour Routes.RepoApi
@impl Routes.RepoApi
def all() do
[
get("R... | 26.189764 | 1,316 | 0.483239 |
1aa0226febdca5c0634f4978b1e29e653faf6b8d | 1,149 | exs | Elixir | priv/templates/brando.upgrade/migrations/brando_53_convert_fragments_data_to_jsonb_rerun_module_renaming.exs | brandocms/brando | 4198e0c0920031bd909969055064e4e2b7230d21 | [
"MIT"
] | 4 | 2020-10-30T08:40:38.000Z | 2022-01-07T22:21:37.000Z | priv/templates/brando.upgrade/migrations/brando_53_convert_fragments_data_to_jsonb_rerun_module_renaming.exs | brandocms/brando | 4198e0c0920031bd909969055064e4e2b7230d21 | [
"MIT"
] | 1,162 | 2020-07-05T11:20:15.000Z | 2022-03-31T06:01:49.000Z | priv/templates/brando.upgrade/migrations/brando_53_convert_fragments_data_to_jsonb_rerun_module_renaming.exs | brandocms/brando | 4198e0c0920031bd909969055064e4e2b7230d21 | [
"MIT"
] | null | null | null | defmodule Brando.Migrations.FragmentsDataJSONBRenameTemplatesToModules do
use Ecto.Migration
import Ecto.Query
def change do
execute """
ALTER TABLE pages_fragments
ALTER COLUMN data
SET DATA TYPE jsonb
USING data::jsonb;
"""
flush()
villain_schemas = Enum.reject(Brando.Vi... | 31.054054 | 140 | 0.561358 |
1aa086549c5f1ec8fd416921ff08a6fc8c978259 | 3,483 | ex | Elixir | clients/data_fusion/lib/google_api/data_fusion/v1beta1/model/audit_config.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/data_fusion/lib/google_api/data_fusion/v1beta1/model/audit_config.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/data_fusion/lib/google_api/data_fusion/v1beta1/model/audit_config.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... | 34.147059 | 171 | 0.642262 |
1aa0a029dfbe1d329ffc56b903be9871bdd9081b | 1,702 | ex | Elixir | lib/mix/tasks/triplex.mysql.install.ex | kianmeng/triplex | 6e4e2b45842b99ecca49a6dd867418d8942f200c | [
"MIT"
] | 344 | 2017-07-03T11:30:26.000Z | 2022-03-30T19:11:41.000Z | lib/mix/tasks/triplex.mysql.install.ex | kianmeng/triplex | 6e4e2b45842b99ecca49a6dd867418d8942f200c | [
"MIT"
] | 56 | 2017-06-29T01:55:35.000Z | 2022-03-15T22:09:47.000Z | lib/mix/tasks/triplex.mysql.install.ex | kianmeng/triplex | 6e4e2b45842b99ecca49a6dd867418d8942f200c | [
"MIT"
] | 45 | 2017-08-15T18:59:41.000Z | 2022-03-17T17:00:50.000Z | defmodule Mix.Tasks.Triplex.Mysql.Install do
@moduledoc """
Generates a migration to create the tenant table
in the default database (MySQL only).
"""
use Mix.Task
require Mix.Generator
alias Ecto.Adapters.MyXQL
alias Ecto.Migrator
alias Mix.Ecto
alias Mix.Generator
alias Mix.Project
@migrat... | 25.029412 | 89 | 0.641598 |
1aa0a038684d19742b6fc3d64e5c4d23b59a5ae8 | 376 | ex | Elixir | web/views/error_view.ex | wojtekmach/mr-rebase | d7265a1a672de6c6c68b1f7a884ead13aed9428f | [
"MIT"
] | 2 | 2016-01-03T08:36:55.000Z | 2016-01-03T21:00:52.000Z | web/views/error_view.ex | wojtekmach/mr-rebase | d7265a1a672de6c6c68b1f7a884ead13aed9428f | [
"MIT"
] | null | null | null | web/views/error_view.ex | wojtekmach/mr-rebase | d7265a1a672de6c6c68b1f7a884ead13aed9428f | [
"MIT"
] | null | null | null | defmodule MrRebase.ErrorView do
use MrRebase.Web, :view
def render("404.html", _assigns) do
"Page not found"
end
def render("500.html", _assigns) do
"Server internal error"
end
# In case no render clause matches or no
# template is found, let's render it as 500
def template_not_found(_templat... | 20.888889 | 47 | 0.699468 |
1aa0a2b391bbbd4457b1f51bc5f28ffccf4ecb71 | 4,578 | ex | Elixir | apps/gitgud_web/lib/gitgud_web/views/helpers/markdown.ex | rogervezaro/gitgud | 6656f8c2df16817a6c5325fb4c18b03f9d3f7140 | [
"MIT"
] | null | null | null | apps/gitgud_web/lib/gitgud_web/views/helpers/markdown.ex | rogervezaro/gitgud | 6656f8c2df16817a6c5325fb4c18b03f9d3f7140 | [
"MIT"
] | null | null | null | apps/gitgud_web/lib/gitgud_web/views/helpers/markdown.ex | rogervezaro/gitgud | 6656f8c2df16817a6c5325fb4c18b03f9d3f7140 | [
"MIT"
] | null | null | null | defmodule GitGud.Web.Markdown do
@moduledoc """
Conveniences for rendering Markdown.
"""
alias GitGud.UserQuery
alias GitGud.IssueQuery
alias GitGud.Web.Router.Helpers, as: Routes
alias GitRekt.GitAgent
import Phoenix.HTML, only: [raw: 1]
@doc """
Renders a Markdown formatted `content` to HTML.... | 33.661765 | 170 | 0.580384 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.