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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7970f648146d734e4bc2243bd5d46cb29f40f57a | 472 | ex | Elixir | containers/chat/lib/chat_web/router.ex | shiftyp/awayteam | 297e21305a109af3aee9ac3dc5820f8220c1b380 | [
"MIT"
] | null | null | null | containers/chat/lib/chat_web/router.ex | shiftyp/awayteam | 297e21305a109af3aee9ac3dc5820f8220c1b380 | [
"MIT"
] | 6 | 2021-03-09T19:50:06.000Z | 2022-02-26T18:41:08.000Z | containers/chat/lib/chat_web/router.ex | shiftyp/awayteam | 297e21305a109af3aee9ac3dc5820f8220c1b380 | [
"MIT"
] | null | null | null | defmodule ChatWeb.Router do
use ChatWeb, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
end
pipeline :api do
plug :accepts, ["json"]
end
scope "/", ChatWeb do
pipe_through :... | 18.88 | 57 | 0.677966 |
797100faf5366920a1fc53957fdcc0f62105a024 | 1,014 | ex | Elixir | lib/future_made_concerts/spotify/schema/track.ex | Future-Made/concerts-for-impact | 5532cd1be5252fa0ccb0b956f0961be8701e0e04 | [
"MIT"
] | null | null | null | lib/future_made_concerts/spotify/schema/track.ex | Future-Made/concerts-for-impact | 5532cd1be5252fa0ccb0b956f0961be8701e0e04 | [
"MIT"
] | null | null | null | lib/future_made_concerts/spotify/schema/track.ex | Future-Made/concerts-for-impact | 5532cd1be5252fa0ccb0b956f0961be8701e0e04 | [
"MIT"
] | null | null | null | defmodule FutureMadeConcerts.Spotify.Schema.Track do
@moduledoc """
Represents an album track.
"""
alias FutureMadeConcerts.{Duration, Spotify.Schema}
alias Schema.{Album, Artist}
@enforce_keys [
:id,
:uri,
:name,
:spotify_url,
:duration_ms,
:track_number,
:disc_number,
:ar... | 19.132075 | 53 | 0.556213 |
7971047bfc04f94175de7f437ba120347f608230 | 384 | ex | Elixir | web/views/session_view.ex | kensupermen/trello | 00eba2165ac32663319679271dcc56ac6cfe4cad | [
"MIT"
] | null | null | null | web/views/session_view.ex | kensupermen/trello | 00eba2165ac32663319679271dcc56ac6cfe4cad | [
"MIT"
] | 3 | 2018-10-03T16:59:21.000Z | 2018-10-06T09:53:51.000Z | web/views/session_view.ex | kensupermen/trello | 00eba2165ac32663319679271dcc56ac6cfe4cad | [
"MIT"
] | 1 | 2018-10-03T17:06:47.000Z | 2018-10-03T17:06:47.000Z | defmodule Trello.SessionView do
use Trello.Web, :view
def render("show.json", %{jwt: jwt, user: user}) do
%{
jwt: jwt,
user: user
}
end
def render("error.json", _) do
%{error: "Invalid email or password"}
end
def render("delete.json", _) do
%{ok: true}
end
def render("for... | 16.695652 | 53 | 0.588542 |
79711e87c1e7520003bf04ebe5a2332c8f3c4053 | 1,821 | ex | Elixir | clients/display_video/lib/google_api/display_video/v1/model/custom_list.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/display_video/lib/google_api/display_video/v1/model/custom_list.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/display_video/lib/google_api/display_video/v1/model/custom_list.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.358491 | 132 | 0.712246 |
797154c4fcfbb0ea248159ed2844ff0585f64c9e | 562 | ex | Elixir | lib/copadelrey_api_web/model/game.ex | trestini/copadelrey-api | d042ae5535c2a8860cb34e59078b2af15aec4c09 | [
"Apache-2.0"
] | null | null | null | lib/copadelrey_api_web/model/game.ex | trestini/copadelrey-api | d042ae5535c2a8860cb34e59078b2af15aec4c09 | [
"Apache-2.0"
] | 2 | 2021-03-09T18:24:01.000Z | 2021-05-10T15:20:30.000Z | lib/copadelrey_api_web/model/game.ex | trestini/copadelrey-api | d042ae5535c2a8860cb34e59078b2af15aec4c09 | [
"Apache-2.0"
] | null | null | null | defmodule CupWeb.Game do
@derive Jason.Encoder
defstruct [:id, :date, :stage, :players, :balls_remaining, :rule, :ended, :winner_team, :teams]
@spec from_schema(Cup.Game.t) :: CupWeb.Game.t
def from_schema(game) do
%CupWeb.Game{
id: game.id,
date: game.inserted_at,
stage: game.stage |> Cu... | 29.578947 | 97 | 0.66548 |
7971681d27b631ff5af800567a58cc6f17e9ff7c | 2,273 | ex | Elixir | lib/ethereumex/config.ex | InoMurko/ethereumex | f8e18f8aa2d2f1719a67c69f11486621416ac324 | [
"MIT"
] | null | null | null | lib/ethereumex/config.ex | InoMurko/ethereumex | f8e18f8aa2d2f1719a67c69f11486621416ac324 | [
"MIT"
] | null | null | null | lib/ethereumex/config.ex | InoMurko/ethereumex | f8e18f8aa2d2f1719a67c69f11486621416ac324 | [
"MIT"
] | null | null | null | defmodule Ethereumex.Config do
@moduledoc false
alias Ethereumex.IpcServer
def setup_children do
setup_children(client_type())
end
defp setup_children(:ipc) do
path = Enum.join([System.user_home!(), ipc_path()])
[
:poolboy.child_spec(:worker, poolboy_config(),
path: path,
... | 24.978022 | 96 | 0.632644 |
797168dbfd1b3bfbcce6bbeb51d404d2ed12425c | 1,514 | exs | Elixir | mix.exs | filipecabaco/Ace | e5497f182c103f62ba42d8bccf429e016d4efe73 | [
"MIT"
] | null | null | null | mix.exs | filipecabaco/Ace | e5497f182c103f62ba42d8bccf429e016d4efe73 | [
"MIT"
] | null | null | null | mix.exs | filipecabaco/Ace | e5497f182c103f62ba42d8bccf429e016d4efe73 | [
"MIT"
] | null | null | null | defmodule Ace.Mixfile do
use Mix.Project
def project do
[
app: :ace,
version: "0.19.0",
elixir: "~> 1.9",
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
deps: deps(),
elixirc_options: [
# Will be done when switching to ssl handshake
... | 22.939394 | 65 | 0.519155 |
79717b7abcbf571f50f2a189c4a79d714aaf7926 | 750 | exs | Elixir | apps/firestorm_data/test/firestorm_data/schema/follow_test.exs | CircleCI-Public/firestorm | 9ca2c46a2b2377370347ad94d6003eeb77be38d6 | [
"MIT"
] | 10 | 2017-06-28T08:06:52.000Z | 2022-03-19T17:49:21.000Z | apps/firestorm_data/test/firestorm_data/schema/follow_test.exs | CircleCI-Public/firestorm | 9ca2c46a2b2377370347ad94d6003eeb77be38d6 | [
"MIT"
] | null | null | null | apps/firestorm_data/test/firestorm_data/schema/follow_test.exs | CircleCI-Public/firestorm | 9ca2c46a2b2377370347ad94d6003eeb77be38d6 | [
"MIT"
] | 2 | 2017-10-21T12:01:02.000Z | 2021-01-29T10:26:22.000Z | defmodule FirestormData.Schema.FollowTest do
alias FirestormData.{Follow, Repo}
use ExUnit.Case
@valid_attributes %{
user_id: 1,
assoc_id: 2
}
setup do
:ok = Ecto.Adapters.SQL.Sandbox.checkout(Repo)
end
test "it requires an user_id" do
changeset =
%Follow{}
|> Follow.chang... | 23.4375 | 85 | 0.666667 |
7971add3c3e2113f76dc5974be2a04c61c7285ef | 2,801 | ex | Elixir | lib/mix/tasks/cotton.lint.ex | ne-sachirou/inner_cotton | f98880cca4bfe5557e9ea6287ed1b3acf5090465 | [
"Unlicense"
] | 24 | 2018-03-21T07:17:21.000Z | 2021-03-29T13:49:56.000Z | lib/mix/tasks/cotton.lint.ex | ne-sachirou/inner_cotton | f98880cca4bfe5557e9ea6287ed1b3acf5090465 | [
"Unlicense"
] | 107 | 2017-11-01T04:55:45.000Z | 2022-03-24T01:17:09.000Z | lib/mix/tasks/cotton.lint.ex | ne-sachirou/inner_cotton | f98880cca4bfe5557e9ea6287ed1b3acf5090465 | [
"Unlicense"
] | null | null | null | defmodule Mix.Tasks.Cotton.Lint do
@moduledoc """
Lint by Credo & check types by Dialyzer. Run following checks.
```
mix format --check-formatted
mix credo --strict
mix dialyzer
mix inch --pedantic
```
Option:
* `--fix`: Auto correct errors if available.
"""
use Mix.Task
@shortdoc "Lint b... | 26.17757 | 96 | 0.615851 |
7971c797058f69abf3fe1b1719f50541f55af5cf | 2,551 | ex | Elixir | lib/mix/tasks/ecto.gen.repo.ex | jccf091/ecto | 42d47a6da0711f842e1a0e6724a89b318b9b2144 | [
"Apache-2.0"
] | 1 | 2017-11-27T06:00:32.000Z | 2017-11-27T06:00:32.000Z | lib/mix/tasks/ecto.gen.repo.ex | jccf091/ecto | 42d47a6da0711f842e1a0e6724a89b318b9b2144 | [
"Apache-2.0"
] | null | null | null | lib/mix/tasks/ecto.gen.repo.ex | jccf091/ecto | 42d47a6da0711f842e1a0e6724a89b318b9b2144 | [
"Apache-2.0"
] | null | null | null | defmodule Mix.Tasks.Ecto.Gen.Repo do
use Mix.Task
import Mix.Ecto
import Mix.Generator
@shortdoc "Generates a new repository"
@moduledoc """
Generates a new repository.
The repository will be placed in the `lib` directory.
## Examples
mix ecto.gen.repo -r Custom.Repo
This generator will a... | 25.257426 | 91 | 0.619757 |
7971c7e140bb06a4449b336b8a8a29b59fb7b81f | 1,099 | ex | Elixir | lib/Bank.ex | mithereal/ex_softbank | 8e64143e0056861c84ed71001929bbb5a10a55bf | [
"MIT"
] | 1 | 2020-01-26T23:28:44.000Z | 2020-01-26T23:28:44.000Z | lib/Bank.ex | mithereal/ex_softbank | 8e64143e0056861c84ed71001929bbb5a10a55bf | [
"MIT"
] | 1 | 2018-12-02T05:35:28.000Z | 2019-03-14T22:42:30.000Z | lib/Bank.ex | mithereal/elixir-softbank | 2e63b72c4f25d651f4aee654ee41c25ac938fda3 | [
"MIT"
] | null | null | null | defmodule SoftBank do
@moduledoc """
The Main Interface for the Application
"""
alias SoftBank.Accountant.Supervisor, as: SUPERVISOR
alias SoftBank.Accountant, as: ACCOUNTANT
defdelegate transfer(amount, from_account_struct, to_account_struct), to: ACCOUNTANT
defdelegate withdrawl(amount, from_account_... | 24.422222 | 118 | 0.745223 |
7971edb38487fea010aec978810f2512829faee4 | 1,915 | ex | Elixir | lib/hexpm_web/controllers/login_controller.ex | thiamsantos/hexpm | 790bae9e761fe9b2dd6901618054ad533ef24599 | [
"Apache-2.0"
] | null | null | null | lib/hexpm_web/controllers/login_controller.ex | thiamsantos/hexpm | 790bae9e761fe9b2dd6901618054ad533ef24599 | [
"Apache-2.0"
] | null | null | null | lib/hexpm_web/controllers/login_controller.ex | thiamsantos/hexpm | 790bae9e761fe9b2dd6901618054ad533ef24599 | [
"Apache-2.0"
] | null | null | null | defmodule HexpmWeb.LoginController do
use HexpmWeb, :controller
plug :nillify_params, ["return"]
def show(conn, _params) do
if logged_in?(conn) do
redirect_return(conn, conn.assigns.current_user)
else
render_show(conn)
end
end
def create(conn, %{"username" => username, "password" =>... | 25.878378 | 85 | 0.61201 |
7971f8ed1b90b1ed1d931270191338b595994199 | 444 | exs | Elixir | test/quantum_storage_mnesia/mnesia/helper_test.exs | sezaru/quantum_storage_mnesia | 3e6707d1f9d82c7069fc84f894041b4936b92eaf | [
"MIT"
] | 2 | 2020-08-04T15:37:31.000Z | 2021-02-16T11:07:12.000Z | test/quantum_storage_mnesia/mnesia/helper_test.exs | sezaru/quantum_storage_mnesia | 3e6707d1f9d82c7069fc84f894041b4936b92eaf | [
"MIT"
] | null | null | null | test/quantum_storage_mnesia/mnesia/helper_test.exs | sezaru/quantum_storage_mnesia | 3e6707d1f9d82c7069fc84f894041b4936b92eaf | [
"MIT"
] | 1 | 2021-08-06T05:09:44.000Z | 2021-08-06T05:09:44.000Z | defmodule Test.QuantumStorageMnesia.Mnesia.HelperTest do
@moduledoc false
alias QuantumStorageMnesia.Mnesia
alias Memento.Transaction
use ExUnit.Case
setup [:setup_mnesia]
describe "transaction/2" do
test "returns `error_default` when transaction fails" do
assert :failed = Mnesia.Helper.trans... | 22.2 | 95 | 0.743243 |
797240e405eecb969e938bca6f5ad43dc8cca9a0 | 6,045 | ex | Elixir | lib/request_cache/plug.ex | MikaAK/request_cache_plug | de5c413b686e4dc71cf2bb7c8784353a404acf32 | [
"MIT"
] | 3 | 2022-03-27T22:42:09.000Z | 2022-03-28T17:50:37.000Z | lib/request_cache/plug.ex | MikaAK/request_cache_plug | de5c413b686e4dc71cf2bb7c8784353a404acf32 | [
"MIT"
] | null | null | null | lib/request_cache/plug.ex | MikaAK/request_cache_plug | de5c413b686e4dc71cf2bb7c8784353a404acf32 | [
"MIT"
] | 1 | 2022-03-28T17:48:58.000Z | 2022-03-28T17:48:58.000Z | defmodule RequestCache.Plug do
require Logger
alias RequestCache.{Util, Metrics}
@moduledoc """
This plug allows you to cache GraphQL requests based off their query name and
variables. This should be placed right after telemetry and before parsers so that it can
stop any processing of the requests and imm... | 30.225 | 137 | 0.697601 |
79724fbf050c370fe5ddcccad39f453d5dee1310 | 7,071 | exs | Elixir | .credo.exs | paulswartz/draft | fc0653d75b39e861c4705545cfb86ad7cd0e2cd2 | [
"MIT"
] | null | null | null | .credo.exs | paulswartz/draft | fc0653d75b39e861c4705545cfb86ad7cd0e2cd2 | [
"MIT"
] | null | null | null | .credo.exs | paulswartz/draft | fc0653d75b39e861c4705545cfb86ad7cd0e2cd2 | [
"MIT"
] | null | null | null | # This file contains the configuration for Credo and you are probably reading
# this after creating it with `mix credo.gen.config`.
#
# If you find anything wrong or unclear in this file, please report an
# issue on GitHub: https://github.com/rrrene/credo/issues
#
%{
#
# You can have as many configs as you like in ... | 37.812834 | 97 | 0.601188 |
79726b48da5d60f996a555bccb1097f6d9fd90e7 | 2,368 | ex | Elixir | lib/credo/check/readability/predicate_function_names.ex | jlgeering/credo | b952190ed758c262aa0d9bbee01227f9b1f0c63b | [
"MIT"
] | null | null | null | lib/credo/check/readability/predicate_function_names.ex | jlgeering/credo | b952190ed758c262aa0d9bbee01227f9b1f0c63b | [
"MIT"
] | null | null | null | lib/credo/check/readability/predicate_function_names.ex | jlgeering/credo | b952190ed758c262aa0d9bbee01227f9b1f0c63b | [
"MIT"
] | null | null | null | defmodule Credo.Check.Readability.PredicateFunctionNames do
@moduledoc """
Predicate functions/macros should be named accordingly:
* For functions, they should end in a question mark.
# preferred
defp user?(cookie) do
end
defp has_attachment?(mail) do
end
# NOT preferred
... | 23.919192 | 98 | 0.631334 |
79726ee3c96b7bde1d51572a084faf0bbef9101d | 341 | ex | Elixir | lib/supabase_surface/components/icons/icon_zap_off.ex | treebee/supabase-surface | 5a184ca92323c085dd81e2fc8aa8c10367f2382e | [
"Apache-2.0"
] | 5 | 2021-06-08T08:02:43.000Z | 2022-02-09T23:13:46.000Z | lib/supabase_surface/components/icons/icon_zap_off.ex | treebee/supabase-surface | 5a184ca92323c085dd81e2fc8aa8c10367f2382e | [
"Apache-2.0"
] | null | null | null | lib/supabase_surface/components/icons/icon_zap_off.ex | treebee/supabase-surface | 5a184ca92323c085dd81e2fc8aa8c10367f2382e | [
"Apache-2.0"
] | 1 | 2021-07-14T05:20:31.000Z | 2021-07-14T05:20:31.000Z | defmodule SupabaseSurface.Components.Icons.IconZapOff do
use SupabaseSurface.Components.Icon
@impl true
def render(assigns) do
icon_size = IconContainer.get_size(assigns.size)
~F"""
<IconContainer assigns={assigns}>
{Feathericons.zap_off(width: icon_size, height: icon_size)}
</IconContaine... | 22.733333 | 65 | 0.718475 |
7972bcffb76ab4ad0fea46ad74589d799c1cf4db | 33,082 | ex | Elixir | lib/dataloader/ecto.ex | gosseti/dataloader | 19ca17dede4c86bbc757466a6383c82f3bccb688 | [
"MIT"
] | null | null | null | lib/dataloader/ecto.ex | gosseti/dataloader | 19ca17dede4c86bbc757466a6383c82f3bccb688 | [
"MIT"
] | null | null | null | lib/dataloader/ecto.ex | gosseti/dataloader | 19ca17dede4c86bbc757466a6383c82f3bccb688 | [
"MIT"
] | null | null | null | if Code.ensure_loaded?(Ecto) do
defmodule Dataloader.Ecto do
@moduledoc """
Ecto source for Dataloader
This defines a schema and an implementation of the `Dataloader.Source` protocol
for handling Ecto related batching.
A simple Ecto source only needs to know about your application's Repo.
#... | 31.092105 | 97 | 0.56901 |
7972d7a9b78b825fe316d5b7b553ef2513c50e58 | 1,081 | ex | Elixir | lib/credo/check/warning/unused_string_operation.ex | codeclimate-community/credo | b960a25d604b4499a2577321f9d61b39dc4b0437 | [
"MIT"
] | null | null | null | lib/credo/check/warning/unused_string_operation.ex | codeclimate-community/credo | b960a25d604b4499a2577321f9d61b39dc4b0437 | [
"MIT"
] | null | null | null | lib/credo/check/warning/unused_string_operation.ex | codeclimate-community/credo | b960a25d604b4499a2577321f9d61b39dc4b0437 | [
"MIT"
] | 1 | 2020-09-25T11:48:49.000Z | 2020-09-25T11:48:49.000Z | defmodule Credo.Check.Warning.UnusedStringOperation do
@moduledoc false
@checkdoc """
The result of a call to the String module's functions has to be used.
While this is correct ...
def salutation(username) do
username = String.downcase(username)
"Hi #\{username}"
end
... we f... | 23.5 | 79 | 0.682701 |
7972e67f3e18f22ec08288a0816c7818acedd169 | 3,656 | exs | Elixir | test/ecto/validator_test.exs | yrashk/ecto | 1462d5ad4cbb7bf74c292ec405852bc196808daf | [
"Apache-2.0"
] | 1 | 2016-08-15T21:23:28.000Z | 2016-08-15T21:23:28.000Z | test/ecto/validator_test.exs | yrashk/ecto | 1462d5ad4cbb7bf74c292ec405852bc196808daf | [
"Apache-2.0"
] | null | null | null | test/ecto/validator_test.exs | yrashk/ecto | 1462d5ad4cbb7bf74c292ec405852bc196808daf | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.ValidatorTest do
use ExUnit.Case, async: true
require Ecto.Validator, as: V
defmodule User do
defstruct name: "jose", age: 27
end
test "struct with no predicate" do
assert V.struct(%User{}, []) == nil
end
test "struct dispatches to a module predicate" do
assert V.struct(%Use... | 34.490566 | 117 | 0.607221 |
7972e8647efe5e5c605ff477968b5d4114e7fd75 | 1,687 | exs | Elixir | test/tackle/multiconsumer_test.exs | renderedtext/ex-tackle | 403623f9be6919998fea6871f34aa07ff2655c49 | [
"MIT"
] | 49 | 2016-07-30T13:45:12.000Z | 2021-08-08T13:45:05.000Z | test/tackle/multiconsumer_test.exs | renderedtext/ex-tackle | 403623f9be6919998fea6871f34aa07ff2655c49 | [
"MIT"
] | 20 | 2016-08-05T11:54:35.000Z | 2021-06-02T19:43:06.000Z | test/tackle/multiconsumer_test.exs | renderedtext/ex-tackle | 403623f9be6919998fea6871f34aa07ff2655c49 | [
"MIT"
] | 14 | 2016-08-05T09:39:51.000Z | 2021-11-29T14:22:28.000Z | defmodule Tackle.MulticonsumerTest do
use ExUnit.Case, async: false
defmodule MulticonsumerExample do
use Tackle.Multiconsumer,
url: "amqp://localhost",
service: "example_service",
routes: [
{"exchange-1", "key1", :handler}
]
def handler(_message) do
IO.puts("Handled!... | 25.560606 | 98 | 0.65738 |
7972eb1cca73ad361a257d9fd3255b9c9afcd5a8 | 369 | exs | Elixir | .formatter.exs | eahanson/schema_assertions | 35760374e2c1e837c5ea6fc0bde4baea53677c83 | [
"Apache-2.0"
] | null | null | null | .formatter.exs | eahanson/schema_assertions | 35760374e2c1e837c5ea6fc0bde4baea53677c83 | [
"Apache-2.0"
] | null | null | null | .formatter.exs | eahanson/schema_assertions | 35760374e2c1e837c5ea6fc0bde4baea53677c83 | [
"Apache-2.0"
] | null | null | null | # Used by "mix format"
[
import_deps: [:ecto],
inputs: ["{mix,.formatter,.credo}.exs", "{config,lib,test}/**/*.{ex,exs}"],
line_length: 120,
subdirectories: ["priv/*/migrations"],
export: [
locals_without_parens: [
assert_changeset_fields: :*,
assert_changeset_invalid: :*,
assert_changes... | 23.0625 | 77 | 0.612466 |
7972effa20594a1d0b6ea00f4b2a975635a905e7 | 201 | exs | Elixir | arc_playground/test/test_helper.exs | enilsen16/elixir | b4d1d45858a25e4beb39e07de8685f3d93d6a520 | [
"MIT"
] | null | null | null | arc_playground/test/test_helper.exs | enilsen16/elixir | b4d1d45858a25e4beb39e07de8685f3d93d6a520 | [
"MIT"
] | null | null | null | arc_playground/test/test_helper.exs | enilsen16/elixir | b4d1d45858a25e4beb39e07de8685f3d93d6a520 | [
"MIT"
] | null | null | null | ExUnit.start
Mix.Task.run "ecto.create", ~w(-r ArcPlayground.Repo --quiet)
Mix.Task.run "ecto.migrate", ~w(-r ArcPlayground.Repo --quiet)
Ecto.Adapters.SQL.begin_test_transaction(ArcPlayground.Repo)
| 28.714286 | 62 | 0.766169 |
797312daadc222644d1d3e4f93231da44524a424 | 577 | ex | Elixir | elixir/lib/elixir_example/application.ex | kintoproj/kinto-examples | 8903127efab78424da936ff1516d3872dd997aaa | [
"Apache-2.0"
] | null | null | null | elixir/lib/elixir_example/application.ex | kintoproj/kinto-examples | 8903127efab78424da936ff1516d3872dd997aaa | [
"Apache-2.0"
] | null | null | null | elixir/lib/elixir_example/application.ex | kintoproj/kinto-examples | 8903127efab78424da936ff1516d3872dd997aaa | [
"Apache-2.0"
] | 1 | 2021-08-02T17:57:11.000Z | 2021-08-02T17:57:11.000Z | defmodule ElixirExample.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 = [
Plug.Cowboy.child_spec(
scheme: :http,
plug: ElixirExample.Endpoint,
o... | 25.086957 | 67 | 0.686308 |
79731425c7a99d85fecbce3057743a53324cef29 | 528 | ex | Elixir | lib/ipc/server.ex | pshah123/elixir-simple | 0b9d488769f9ef6924c8ae3753d0880d05f70015 | [
"MIT"
] | null | null | null | lib/ipc/server.ex | pshah123/elixir-simple | 0b9d488769f9ef6924c8ae3753d0880d05f70015 | [
"MIT"
] | null | null | null | lib/ipc/server.ex | pshah123/elixir-simple | 0b9d488769f9ef6924c8ae3753d0880d05f70015 | [
"MIT"
] | null | null | null | defmodule IPCServer do
def run n \\ 2 do
peers = 1..n |> Enum.map(fn _ -> spawn Peer, :init, [ self() ] end)
peers = MapSet.new(peers)
peers |> Enum.map(&(send &1, {:BIND, peers}))
loop peers
end
def loop peers do
receive do
{:FIN, peer} ->
IO.puts("#{inspect peer} terminated.")... | 22.956522 | 71 | 0.534091 |
7973154c499a8a1c4831c3a5156d4ac9f0964b55 | 93 | exs | Elixir | test/day21_test.exs | anamba/adventofcode2020 | 2a749140d5393f7c69c630102daae977be30afcc | [
"MIT"
] | null | null | null | test/day21_test.exs | anamba/adventofcode2020 | 2a749140d5393f7c69c630102daae977be30afcc | [
"MIT"
] | null | null | null | test/day21_test.exs | anamba/adventofcode2020 | 2a749140d5393f7c69c630102daae977be30afcc | [
"MIT"
] | null | null | null | defmodule Day21Test do
use ExUnit.Case
# doctest Day21.Part1
# doctest Day21.Part2
end
| 15.5 | 23 | 0.752688 |
797320015ba575466d8038eb67017cbef95a2b4b | 8,610 | ex | Elixir | lib/textwrap.ex | foxbenjaminfox/ex_textwrap | 2e23b7fb63447de99edf03f745a003c45c0ffb76 | [
"Apache-2.0"
] | null | null | null | lib/textwrap.ex | foxbenjaminfox/ex_textwrap | 2e23b7fb63447de99edf03f745a003c45c0ffb76 | [
"Apache-2.0"
] | null | null | null | lib/textwrap.ex | foxbenjaminfox/ex_textwrap | 2e23b7fb63447de99edf03f745a003c45c0ffb76 | [
"Apache-2.0"
] | null | null | null | defmodule Textwrap do
@moduledoc """
`Textwrap` provides a set of functions for wrapping, indenting, and dedenting text. It wraps the Rust [`textwrap`](https://lib.rs/textwrap) crate.
## Wrapping
Use `wrap/2` to turn a `String` into a list of `String`s each no more
than `width` characters long.
iex> ... | 35.432099 | 232 | 0.646574 |
797333ed3ce2271026d7bd1ae3e676e58b354a56 | 1,332 | ex | Elixir | lib/livebook_web/live/hooks/user_hook.ex | aleDsz/livebook | 3ad817ac69b8459b684ff8d00c879ae7787b6dcc | [
"Apache-2.0"
] | null | null | null | lib/livebook_web/live/hooks/user_hook.ex | aleDsz/livebook | 3ad817ac69b8459b684ff8d00c879ae7787b6dcc | [
"Apache-2.0"
] | null | null | null | lib/livebook_web/live/hooks/user_hook.ex | aleDsz/livebook | 3ad817ac69b8459b684ff8d00c879ae7787b6dcc | [
"Apache-2.0"
] | null | null | null | defmodule LivebookWeb.UserHook do
import Phoenix.LiveView
alias Livebook.Users.User
def on_mount(:default, _params, %{"current_user_id" => current_user_id} = session, socket) do
if connected?(socket) do
Livebook.Users.subscribe(current_user_id)
end
socket =
socket
|> assign_new(:c... | 28.956522 | 95 | 0.662162 |
7973b4da64f48bb77cb0dc31d9fcbbcb4adfde13 | 1,606 | ex | Elixir | lib/hello_web.ex | youknowcast/aiit_sp_challenge4 | a5811675b77f4c496c9456a74e986ba1cfd8ef2f | [
"MIT"
] | 5 | 2015-09-11T15:02:54.000Z | 2020-10-14T05:16:18.000Z | lib/hello_web.ex | youknowcast/aiit_sp_challenge4 | a5811675b77f4c496c9456a74e986ba1cfd8ef2f | [
"MIT"
] | 21 | 2019-12-28T11:18:09.000Z | 2022-01-02T10:32:36.000Z | lib/hello_web.ex | youknowcast/aiit_sp_challenge4 | a5811675b77f4c496c9456a74e986ba1cfd8ef2f | [
"MIT"
] | 2 | 2016-11-07T23:16:56.000Z | 2020-10-14T05:16:49.000Z | defmodule HelloWeb do
@moduledoc """
The entrypoint for defining your web interface, such
as controllers, views, channels and so on.
This can be used in your application as:
use HelloWeb, :controller
use HelloWeb, :view
The definitions below will be executed for every view,
controller, etc, s... | 22.942857 | 83 | 0.684309 |
7973e84d7d345677bd847a0ec8212745075c5403 | 1,317 | ex | Elixir | clients/api_keys/lib/google_api/api_keys/v2/connection.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/connection.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/connection.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... | 36.583333 | 114 | 0.736522 |
79741a58b48635746381a852bf43cc9204905f3f | 3,471 | ex | Elixir | lib/twemoji.ex | Ovyerus/twemoji-elixir | 0f2359e1110173126d844c0c79add56f044d16f6 | [
"MIT"
] | 6 | 2021-02-27T07:23:41.000Z | 2021-04-08T07:37:50.000Z | lib/twemoji.ex | Ovyerus/twemoji-elixir | 0f2359e1110173126d844c0c79add56f044d16f6 | [
"MIT"
] | 1 | 2021-02-27T07:30:55.000Z | 2021-02-27T07:30:55.000Z | lib/twemoji.ex | Ovyerus/twemoji-elixir | 0f2359e1110173126d844c0c79add56f044d16f6 | [
"MIT"
] | 1 | 2021-02-27T07:28:59.000Z | 2021-02-27T07:28:59.000Z | defmodule Twemoji do
@moduledoc """
Documentation for `Twemoji`.
"""
@twemoji_cdn "https://twemoji.maxcdn.com/2/72x72/"
@type floki_node ::
String.t() | {String.t(), [] | [{String.t(), String.t()}], [] | [floki_node()]}
@type earmark_node ::
String.t() | {String.t(), [] | [{String.t(),... | 25.902985 | 96 | 0.52204 |
797427bbccc38ab627868156d49f137d4712ec53 | 24,396 | exs | Elixir | test/phoenix/controller/controller_test.exs | jesseshieh/phoenix | 1776e9df0a71de67374ed488b3f00ccb434045b3 | [
"MIT"
] | 1 | 2020-04-14T09:49:46.000Z | 2020-04-14T09:49:46.000Z | test/phoenix/controller/controller_test.exs | jesseshieh/phoenix | 1776e9df0a71de67374ed488b3f00ccb434045b3 | [
"MIT"
] | 1 | 2020-05-26T19:38:18.000Z | 2020-05-26T19:38:18.000Z | test/phoenix/controller/controller_test.exs | jesseshieh/phoenix | 1776e9df0a71de67374ed488b3f00ccb434045b3 | [
"MIT"
] | null | null | null | defmodule Phoenix.Controller.ControllerTest do
use ExUnit.Case, async: true
use RouterHelper
import Phoenix.Controller
alias Plug.Conn
setup do
Logger.disable(self())
:ok
end
defp get_resp_content_type(conn) do
[header] = get_resp_header(conn, "content-type")
header |> String.split(";"... | 35.510917 | 115 | 0.619241 |
79743f8cec7ea342f51c13cdf2a1f692bd9ed51e | 1,518 | ex | Elixir | server/lib/adapters/changes.ex | sthagen/phoenix-postgres-realtime | 0f0cad033b24c090b5014f38f4eca9333b965694 | [
"Apache-2.0"
] | 1 | 2020-06-03T10:49:40.000Z | 2020-06-03T10:49:40.000Z | server/lib/adapters/changes.ex | bojanskr/realtime | c0deb95a41e1293192582c16b966ff0beead1b89 | [
"Apache-2.0"
] | null | null | null | server/lib/adapters/changes.ex | bojanskr/realtime | c0deb95a41e1293192582c16b966ff0beead1b89 | [
"Apache-2.0"
] | null | null | null | # This file draws heavily from https://github.com/cainophile/cainophile
# License: https://github.com/cainophile/cainophile/blob/master/LICENSE
require Protocol
defmodule Realtime.Adapters.Changes do
defmodule(Transaction, do: defstruct([:changes, :commit_timestamp]))
defmodule NewRecord do
@derive {Jason.En... | 24.885246 | 91 | 0.676548 |
79744eb022ec5e069f46198e1475cc48a11d8a88 | 1,888 | ex | Elixir | lib/phoenix_starter/release_tasks.ex | newaperio/phoenix_starter | 02f2f5550a94b940bb4e9c61042b032f54af8b72 | [
"MIT"
] | 3 | 2021-03-19T10:39:02.000Z | 2021-07-25T19:54:09.000Z | lib/phoenix_starter/release_tasks.ex | newaperio/phoenix_starter | 02f2f5550a94b940bb4e9c61042b032f54af8b72 | [
"MIT"
] | 204 | 2020-11-27T06:00:31.000Z | 2022-03-25T08:08:16.000Z | lib/phoenix_starter/release_tasks.ex | newaperio/phoenix_starter | 02f2f5550a94b940bb4e9c61042b032f54af8b72 | [
"MIT"
] | null | null | null | defmodule PhoenixStarter.ReleaseTasks do
@moduledoc """
Server tasks to be run inside the production release container.
"""
@app :phoenix_starter
require Logger
@spec migrate :: [any]
def migrate do
load_app()
for repo <- repos() do
{:ok, _, _} = Ecto.Migrator.with_repo(repo, &Ecto.Migrat... | 22.746988 | 89 | 0.592691 |
7974969c89110c7202688867607d244a8673b2ab | 132,149 | ex | Elixir | lib/nostrum/api.ex | brettkolodny/nostrum | 3e26af6c106558bfe3fd48dcf3064fbc361605b5 | [
"MIT"
] | null | null | null | lib/nostrum/api.ex | brettkolodny/nostrum | 3e26af6c106558bfe3fd48dcf3064fbc361605b5 | [
"MIT"
] | null | null | null | lib/nostrum/api.ex | brettkolodny/nostrum | 3e26af6c106558bfe3fd48dcf3064fbc361605b5 | [
"MIT"
] | null | null | null | defmodule Nostrum.Api do
@moduledoc ~S"""
Interface for Discord's rest API.
By default all methods in this module are ran synchronously. If you wish to
have async rest operations I recommend you execute these functions inside of a
task.
**Examples**
```Elixir
# Async Task
t = Task.async fn ->
No... | 33.858314 | 307 | 0.682676 |
797563b8a4048052fbc6d1db9d62f8df7f03ab8e | 869 | ex | Elixir | lib/order_api/buyer.ex | gissandrogama/delivery_order | 8642453b03f590fe828225fc13aa58a5f79b2117 | [
"MIT"
] | null | null | null | lib/order_api/buyer.ex | gissandrogama/delivery_order | 8642453b03f590fe828225fc13aa58a5f79b2117 | [
"MIT"
] | 6 | 2021-01-22T15:23:04.000Z | 2021-01-28T07:56:01.000Z | lib/order_api/buyer.ex | gissandrogama/delivery_order | 8642453b03f590fe828225fc13aa58a5f79b2117 | [
"MIT"
] | null | null | null | defmodule OrderApi.Buyer do
@moduledoc """
table bank schema buyers
"""
use Ecto.Schema
import Ecto.Changeset
alias OrderApi.{BillingInfos, Order, Phone}
schema "buyers" do
field :email, :string
field :external_code, :integer
field :first_name, :string
field :last_name, :string
field... | 26.333333 | 86 | 0.686997 |
79756ba80249b18dd159669b1d53af717ed0c802 | 592 | exs | Elixir | test/bus_kiosk_web/live/kiosk_live_test.exs | mitchellhenke/bus_kiosk | 9814b0b10190bb06c823b00315616391100c5bfa | [
"BSD-3-Clause"
] | 2 | 2020-02-21T15:40:27.000Z | 2020-12-06T21:50:39.000Z | test/bus_kiosk_web/live/kiosk_live_test.exs | mitchellhenke/bus_kiosk | 9814b0b10190bb06c823b00315616391100c5bfa | [
"BSD-3-Clause"
] | 3 | 2020-02-19T17:06:24.000Z | 2020-04-20T14:33:07.000Z | test/bus_kiosk_web/live/kiosk_live_test.exs | mitchellhenke/bus_kiosk | 9814b0b10190bb06c823b00315616391100c5bfa | [
"BSD-3-Clause"
] | null | null | null | defmodule BusKioskWeb.KioskLiveTest do
use BusKioskWeb.ConnCase
import Phoenix.LiveViewTest
@endpoint BusKioskWeb.Endpoint
test "GET /live with no parameters shows error", %{conn: conn} do
conn = get(conn, "/live")
assert html_response(conn, 200) =~ "Oops"
{:ok, _view, _html} = live(conn)
end
... | 28.190476 | 71 | 0.675676 |
7975722527c1948c724ba8dd359b92b5d69afef5 | 9,137 | exs | Elixir | test/queuetopia/queue/job_test.exs | annatel/queuetopia | dd4be7390382c203821ab88388f0c31ba5538edf | [
"MIT"
] | 7 | 2020-08-06T21:58:13.000Z | 2021-08-07T18:32:44.000Z | test/queuetopia/queue/job_test.exs | annatel/queuetopia | dd4be7390382c203821ab88388f0c31ba5538edf | [
"MIT"
] | 2 | 2020-10-22T11:53:45.000Z | 2021-06-22T05:45:27.000Z | test/queuetopia/queue/job_test.exs | annatel/queuetopia | dd4be7390382c203821ab88388f0c31ba5538edf | [
"MIT"
] | 2 | 2020-11-04T00:23:43.000Z | 2021-04-30T07:25:01.000Z | defmodule Queuetopia.Queue.JobTest do
use Queuetopia.DataCase
alias Queuetopia.Queue.Job
describe "create_changeset/2" do
test "only permitted_keys are casted" do
params =
Factory.params_for(:job,
timeout: 100,
max_backoff: 100,
max_attempts: 1
)
ch... | 32.400709 | 104 | 0.618365 |
7975c9ca21d4d45f599633c2b3a8055349df91bb | 425 | ex | Elixir | test/support/mock_storage.ex | capsule-ex/capsule | 2ffcdf5f0c4f7596af392aad56f2da6913eda9bf | [
"Apache-2.0"
] | null | null | null | test/support/mock_storage.ex | capsule-ex/capsule | 2ffcdf5f0c4f7596af392aad56f2da6913eda9bf | [
"Apache-2.0"
] | null | null | null | test/support/mock_storage.ex | capsule-ex/capsule | 2ffcdf5f0c4f7596af392aad56f2da6913eda9bf | [
"Apache-2.0"
] | null | null | null | defmodule Capsule.Storages.Mock do
alias Capsule.{Storage, Encapsulation}
@behaviour Storage
@impl Storage
def put(_upload, opts \\ []) do
encapsulation = %Encapsulation{id: opts[:id], storage: __MODULE__}
{:ok, encapsulation}
end
@impl Storage
def delete(%Encapsulation{}, _opts \\ []), do: {:... | 22.368421 | 74 | 0.661176 |
7975e0c451ce304894f8032f4b817337ea47e078 | 609 | exs | Elixir | test/cybersource_sdk_test.exs | CrazyEggInc/cybersource-sdk-1 | 14251e681752a055e941d01186b23acddbddcdb0 | [
"MIT"
] | null | null | null | test/cybersource_sdk_test.exs | CrazyEggInc/cybersource-sdk-1 | 14251e681752a055e941d01186b23acddbddcdb0 | [
"MIT"
] | null | null | null | test/cybersource_sdk_test.exs | CrazyEggInc/cybersource-sdk-1 | 14251e681752a055e941d01186b23acddbddcdb0 | [
"MIT"
] | 1 | 2020-02-24T14:54:00.000Z | 2020-02-24T14:54:00.000Z | defmodule CyberSourceSDKTest do
use ExUnit.Case, async: true
doctest CyberSourceSDK
doctest CyberSourceSDK.Helper
test "Test bill_to generated parameters" do
expected_parameters = [
first_name: "John",
last_name: "Doe",
street1: "Maryland Street",
street2: "34",
city: "New York",
... | 25.375 | 131 | 0.651888 |
7975ecd01ab8a7442d0c52f41e19dacfd9a34927 | 1,123 | ex | Elixir | lib/livebook_web/live/settings_live/remove_file_system_component.ex | kianmeng/livebook | 8fe8d27d3d46b64d22126d1b97157330b87e611c | [
"Apache-2.0"
] | null | null | null | lib/livebook_web/live/settings_live/remove_file_system_component.ex | kianmeng/livebook | 8fe8d27d3d46b64d22126d1b97157330b87e611c | [
"Apache-2.0"
] | null | null | null | lib/livebook_web/live/settings_live/remove_file_system_component.ex | kianmeng/livebook | 8fe8d27d3d46b64d22126d1b97157330b87e611c | [
"Apache-2.0"
] | 1 | 2021-12-18T03:42:04.000Z | 2021-12-18T03:42:04.000Z | defmodule LivebookWeb.SettingsLive.RemoveFileSystemComponent do
use LivebookWeb, :live_component
@impl true
def render(assigns) do
~H"""
<div class="p-6 pb-4 flex flex-col space-y-8">
<h3 class="text-2xl font-semibold text-gray-800">
Detach file system
</h3>
<p class="text-gray-... | 33.029412 | 88 | 0.64114 |
7975f8cfe534255061872f7405fa33c78b78406c | 1,152 | exs | Elixir | rel/config.exs | dariodf/GuitarBotex | a8e4d9244dca7e90fedbb0db9c7376a156d220db | [
"MIT"
] | 1 | 2018-07-26T00:59:45.000Z | 2018-07-26T00:59:45.000Z | rel/config.exs | dariodf/GuitarBotex | a8e4d9244dca7e90fedbb0db9c7376a156d220db | [
"MIT"
] | null | null | null | rel/config.exs | dariodf/GuitarBotex | a8e4d9244dca7e90fedbb0db9c7376a156d220db | [
"MIT"
] | null | null | null | use Mix.Releases.Config,
# This sets the default release built by `mix release`
default_release: :default,
# This sets the default environment used by `mix release`
default_environment: :dev
# For a full list of config options for both releases
# and environments, visit https://hexdocs.pm/distillery/co... | 31.135135 | 81 | 0.75434 |
797603335287bb697b87233de2681dd2341c16a0 | 212 | ex | Elixir | lib/blog_api/accounts/encryption.ex | vbrazo/blog_api | 8a3e15c666beef8f33b6d323627f92379267ecd9 | [
"MIT"
] | null | null | null | lib/blog_api/accounts/encryption.ex | vbrazo/blog_api | 8a3e15c666beef8f33b6d323627f92379267ecd9 | [
"MIT"
] | null | null | null | lib/blog_api/accounts/encryption.ex | vbrazo/blog_api | 8a3e15c666beef8f33b6d323627f92379267ecd9 | [
"MIT"
] | null | null | null | defmodule BlogApi.Accounts.Encryption do
alias Comeonin.Bcrypt
def password_hashing(password), do: Bcrypt.hashpwsalt(password)
def validate_password(password, hash), do: Bcrypt.checkpw(password, hash)
end
| 30.285714 | 75 | 0.801887 |
797606f96cd13df0af7bb554a641c6f32f2c9ccb | 2,462 | ex | Elixir | test/process_managers/support/error/error_aggregate.ex | mquickform/commanded | 260b1ec28c2fb3c1fcbb61b8c4abacabd7dc7ed2 | [
"MIT"
] | null | null | null | test/process_managers/support/error/error_aggregate.ex | mquickform/commanded | 260b1ec28c2fb3c1fcbb61b8c4abacabd7dc7ed2 | [
"MIT"
] | 1 | 2018-12-05T18:17:08.000Z | 2018-12-05T18:17:08.000Z | test/process_managers/support/error/error_aggregate.ex | mquickform/commanded | 260b1ec28c2fb3c1fcbb61b8c4abacabd7dc7ed2 | [
"MIT"
] | 1 | 2018-12-05T18:15:03.000Z | 2018-12-05T18:15:03.000Z | defmodule Commanded.ProcessManagers.ErrorAggregate do
@moduledoc false
defstruct [:process_uuid]
defmodule Commands do
defmodule(StartProcess, do: defstruct([:process_uuid, :strategy, :delay, :reply_to]))
defmodule(RaiseError, do: defstruct([:process_uuid, :message, :reply_to]))
defmodule(RaiseExcept... | 39.079365 | 99 | 0.736799 |
797617f0a9f5aceb66a59853e87685fa4ef710a6 | 3,222 | ex | Elixir | apps/ello_core/lib/ello_core/network/user/settings.ex | ello/apex | 4acb096b3ce172ff4ef9a51e5d068d533007b920 | [
"MIT"
] | 16 | 2017-06-21T21:31:20.000Z | 2021-05-09T03:23:26.000Z | apps/ello_core/lib/ello_core/network/user/settings.ex | ello/apex | 4acb096b3ce172ff4ef9a51e5d068d533007b920 | [
"MIT"
] | 25 | 2017-06-07T12:18:28.000Z | 2018-06-08T13:27:43.000Z | apps/ello_core/lib/ello_core/network/user/settings.ex | ello/apex | 4acb096b3ce172ff4ef9a51e5d068d533007b920 | [
"MIT"
] | 3 | 2018-06-14T15:34:07.000Z | 2022-02-28T21:06:13.000Z | defmodule Ello.Core.Network.User.Settings do
use Ecto.Schema
# A required field for all embedded documents, shouldn't be an interop issue
@primary_key {:id, :binary_id, autogenerate: true}
schema "" do
field :is_public, :boolean, default: true
field :is_hireable, :boolean, default: false
field :is_... | 46.028571 | 91 | 0.767846 |
79761b6c724018d6f0fc4f0d56cf0058a4609555 | 3,422 | ex | Elixir | clients/file/lib/google_api/file/v1/model/network_config.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/file/lib/google_api/file/v1/model/network_config.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/file/lib/google_api/file/v1/model/network_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... | 58 | 1,035 | 0.728521 |
79762a9f77be187941bc78cd2762d130a08ed1cd | 7,793 | ex | Elixir | lib/rbmq/connection/helper.ex | Lean5/rbmq | c6e746c212e103fc4ada53969e88fc1f32a357a6 | [
"MIT"
] | null | null | null | lib/rbmq/connection/helper.ex | Lean5/rbmq | c6e746c212e103fc4ada53969e88fc1f32a357a6 | [
"MIT"
] | 1 | 2019-02-13T14:26:22.000Z | 2019-02-13T14:26:22.000Z | lib/rbmq/connection/helper.ex | Lean5/rbmq | c6e746c212e103fc4ada53969e88fc1f32a357a6 | [
"MIT"
] | null | null | null | defmodule RBMQ.Connection.Helper do
@moduledoc """
Helper functions to manage connections with AMQP.
This module produces verbose debug logs.
"""
use AMQP
require Logger
# Default settings for AMQP connection.
@defaults [
host: {:system, "AMQP_HOST", "localhost"},
port: {:system, :integer, "AM... | 33.446352 | 123 | 0.634672 |
79762d5ec7974c28570776363c97a18e339ee7f9 | 3,996 | exs | Elixir | test/toy_robot/runner_test.exs | lowski/toy-robot | 107e5c68c1ba0813be9efb3949f6fde348aaa05b | [
"MIT"
] | null | null | null | test/toy_robot/runner_test.exs | lowski/toy-robot | 107e5c68c1ba0813be9efb3949f6fde348aaa05b | [
"MIT"
] | null | null | null | test/toy_robot/runner_test.exs | lowski/toy-robot | 107e5c68c1ba0813be9efb3949f6fde348aaa05b | [
"MIT"
] | null | null | null | defmodule ToyRobot.RunnerTest do
use ExUnit.Case, async: true
alias ToyRobot.{Runner, Simulation}
import ExUnit.CaptureIO
doctest ToyRobot.Runner
test "it handles a valid place command" do
%Simulation{robot: robot} = Runner.run([{:place, %{east: 1, north: 2, facing: :north}}])
assert robot.east ==... | 24.072289 | 92 | 0.579329 |
79765979d93c144de75acc6ca6107d525a59c91a | 3,869 | ex | Elixir | clients/text_to_speech/lib/google_api/text_to_speech/v1/model/audio_config.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/text_to_speech/lib/google_api/text_to_speech/v1/model/audio_config.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/text_to_speech/lib/google_api/text_to_speech/v1/model/audio_config.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... | 62.403226 | 618 | 0.726544 |
797689e9da0f1455e11f2420b870f7f5b077e247 | 485 | ex | Elixir | echo/lib/echo_web/views/error_view.ex | lamboap/liveview_sept_2021 | 495731c20484a0e63e5fb768956b98d57b44be8f | [
"MIT"
] | 1 | 2021-09-14T01:52:42.000Z | 2021-09-14T01:52:42.000Z | echo/lib/echo_web/views/error_view.ex | lamboap/liveview_sept_2021 | 495731c20484a0e63e5fb768956b98d57b44be8f | [
"MIT"
] | 1 | 2021-09-17T11:30:04.000Z | 2021-09-17T11:30:04.000Z | echo/lib/echo_web/views/error_view.ex | lamboap/liveview_sept_2021 | 495731c20484a0e63e5fb768956b98d57b44be8f | [
"MIT"
] | 4 | 2021-09-14T00:04:39.000Z | 2021-09-15T15:14:52.000Z | defmodule EchoWeb.ErrorView do
use EchoWeb, :view
# If you want to customize a particular status code
# for a certain format, you may uncomment below.
# def render("500.html", _assigns) do
# "Internal Server Error"
# end
# By default, Phoenix returns the status message from
# the template name. For ... | 28.529412 | 61 | 0.731959 |
7976b5e4280e185ba5ae099f7f47e267d3debca4 | 2,493 | exs | Elixir | apps/ewallet_db/priv/repo/migrations/20180613034653_add_cross_token_support_to_transfers.exs | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 322 | 2018-02-28T07:38:44.000Z | 2020-05-27T23:09:55.000Z | apps/ewallet_db/priv/repo/migrations/20180613034653_add_cross_token_support_to_transfers.exs | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 643 | 2018-02-28T12:05:20.000Z | 2020-05-22T08:34:38.000Z | apps/ewallet_db/priv/repo/migrations/20180613034653_add_cross_token_support_to_transfers.exs | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 63 | 2018-02-28T10:57:06.000Z | 2020-05-27T23:10:38.000Z | # Copyright 2018-2019 OmiseGO Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 31.961538 | 94 | 0.618532 |
7976ba10352f1456193966eaffa08dd9c5f4df99 | 809 | ex | Elixir | lib/distcount/counters/counter_log.ex | cabol/distcount | b0b42f66dcc130ec6e349ab8b915cfb6f5b77c7b | [
"MIT"
] | null | null | null | lib/distcount/counters/counter_log.ex | cabol/distcount | b0b42f66dcc130ec6e349ab8b915cfb6f5b77c7b | [
"MIT"
] | null | null | null | lib/distcount/counters/counter_log.ex | cabol/distcount | b0b42f66dcc130ec6e349ab8b915cfb6f5b77c7b | [
"MIT"
] | null | null | null | defmodule Distcount.Counters.CounterLog do
@moduledoc """
CounterLog schema.
"""
use Ecto.Schema
import Ecto.Changeset
@typedoc "Counter's type"
@type t :: %__MODULE__{
key: binary | nil,
value: integer | nil
}
schema "counters_log" do
field :key, :string
field :v... | 18.813953 | 64 | 0.605686 |
7976c224d75947d01f2e442ac2cef4571f965122 | 88 | exs | Elixir | apps/evm/test/evm/sub_state_test.exs | atoulme/ethereum | cebb0756c7292ac266236636d2ab5705cb40a52e | [
"MIT"
] | 105 | 2017-08-02T07:55:17.000Z | 2021-12-23T21:49:57.000Z | apps/evm/test/evm/sub_state_test.exs | atoulme/ethereum | cebb0756c7292ac266236636d2ab5705cb40a52e | [
"MIT"
] | 19 | 2017-08-21T22:28:39.000Z | 2018-05-01T13:33:12.000Z | apps/evm/test/evm/sub_state_test.exs | atoulme/ethereum | cebb0756c7292ac266236636d2ab5705cb40a52e | [
"MIT"
] | 17 | 2017-08-10T15:50:47.000Z | 2021-11-19T04:29:59.000Z | defmodule EVM.SubStateTest do
use ExUnit.Case, async: true
doctest EVM.SubState
end
| 17.6 | 30 | 0.784091 |
797706a71a2627a17bf3e443f43599253d87bfe3 | 41 | ex | Elixir | lib/elixir/lib/tuple.ex | Nicd/elixir | e62ef92a4be1b562033d35b2d822cc9d6c661077 | [
"Apache-2.0"
] | 4 | 2016-04-05T05:51:36.000Z | 2019-10-31T06:46:35.000Z | lib/elixir/lib/tuple.ex | Nicd/elixir | e62ef92a4be1b562033d35b2d822cc9d6c661077 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/tuple.ex | Nicd/elixir | e62ef92a4be1b562033d35b2d822cc9d6c661077 | [
"Apache-2.0"
] | 5 | 2015-02-01T06:01:19.000Z | 2019-08-29T09:02:35.000Z | defmodule Tuple do
@moduledoc false
end | 13.666667 | 18 | 0.804878 |
79772e58fd1dc62938106a9883c69467b6a481f6 | 8,723 | ex | Elixir | lib/gym_client/api.ex | arpieb/annex_rl_demo | 8115ac5ec21a22d1caf041c561af3330a0350fea | [
"Unlicense"
] | 1 | 2020-02-10T02:50:34.000Z | 2020-02-10T02:50:34.000Z | lib/gym_client/api.ex | arpieb/annex_rl_demo | 8115ac5ec21a22d1caf041c561af3330a0350fea | [
"Unlicense"
] | null | null | null | lib/gym_client/api.ex | arpieb/annex_rl_demo | 8115ac5ec21a22d1caf041c561af3330a0350fea | [
"Unlicense"
] | null | null | null | defmodule GymClient.Api do
@moduledoc ~S"""
Lotsa code shamelessly copied from:
https://medium.com/@a4word/oh-the-api-clients-youll-build-in-elixir-f9140e2acfb6
"""
@default_service_url "http://127.0.0.1:5000"
@doc"""
Send a GET request to the API
## Examples
iex> Myclient.Api.get("http://loca... | 28.048232 | 134 | 0.594062 |
79778fbf8a2437d6cd9e4485514f8a8662027a05 | 1,530 | ex | Elixir | lib/termDirectory_web/controllers/module_controller.ex | nliechti/termDirectory | 267b3025c14e26575c7a9483692e94a7bf29e5fe | [
"MIT"
] | 1 | 2019-03-15T15:40:24.000Z | 2019-03-15T15:40:24.000Z | lib/termDirectory_web/controllers/module_controller.ex | nliechti/termDirectory | 267b3025c14e26575c7a9483692e94a7bf29e5fe | [
"MIT"
] | null | null | null | lib/termDirectory_web/controllers/module_controller.ex | nliechti/termDirectory | 267b3025c14e26575c7a9483692e94a7bf29e5fe | [
"MIT"
] | null | null | null | defmodule TermDirectoryWeb.ModuleController do
use TermDirectoryWeb, :controller
alias TermDirectory.Modules
alias TermDirectory.Modules.Module
action_fallback TermDirectoryWeb.FallbackController
@doc """
This catches the search url param and performs a search for
the given search string in the dat... | 28.867925 | 85 | 0.681699 |
797790737ac81f45abed61b7a57fe0bf68287eb7 | 3,881 | ex | Elixir | lib/aoc/day_14.ex | CraigCottingham/advent-of-code-2019 | 76a1545e4cca14fe1e9e0de475de253170da1645 | [
"Apache-2.0"
] | null | null | null | lib/aoc/day_14.ex | CraigCottingham/advent-of-code-2019 | 76a1545e4cca14fe1e9e0de475de253170da1645 | [
"Apache-2.0"
] | null | null | null | lib/aoc/day_14.ex | CraigCottingham/advent-of-code-2019 | 76a1545e4cca14fe1e9e0de475de253170da1645 | [
"Apache-2.0"
] | null | null | null | defmodule AoC.Day14 do
@moduledoc false
def part_1 do
## disabled for now, as it takes a long time to run
_all_reactions =
"data/day14-input.txt"
|> File.stream!()
|> Enum.map(&String.trim/1)
|> parse_input_data()
# stockpile = run_reaction([find_reaction(all_reactions, "FUEL")... | 30.801587 | 96 | 0.639011 |
7977ef12032ab99f6501397610d68c78360ebe67 | 1,735 | ex | Elixir | lib/oli_web/live/common/listing.ex | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | 1 | 2022-03-17T20:35:47.000Z | 2022-03-17T20:35:47.000Z | lib/oli_web/live/common/listing.ex | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | 9 | 2021-11-02T16:52:09.000Z | 2022-03-25T15:14:01.000Z | lib/oli_web/live/common/listing.ex | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | null | null | null | defmodule OliWeb.Common.Listing do
use Surface.Component
alias OliWeb.Common.SortableTable.Table
alias OliWeb.Common.{CardListing, Paging}
prop total_count, :integer, required: true
prop filter, :string, required: true
prop limit, :integer, required: true
prop offset, :integer, required: true
prop tabl... | 32.735849 | 120 | 0.628818 |
79783252f9d1d75a23cdc1bd0c8b6dd7f831c537 | 5,755 | ex | Elixir | server/lib/prepply/employees.ex | jeepers3327/prepply | 64b6be3b832fddf429faa31f5f7c1b93b842f821 | [
"MIT"
] | 2 | 2021-03-04T15:21:14.000Z | 2021-03-21T13:43:07.000Z | server/lib/prepply/employees.ex | jeepers3327/prepply | 64b6be3b832fddf429faa31f5f7c1b93b842f821 | [
"MIT"
] | null | null | null | server/lib/prepply/employees.ex | jeepers3327/prepply | 64b6be3b832fddf429faa31f5f7c1b93b842f821 | [
"MIT"
] | null | null | null | defmodule Prepply.Employees do
@moduledoc """
The Employees context.
"""
import Ecto.Query, warn: false
alias Prepply.Repo
alias Ecto.Multi
alias Prepply.Employees.{EmployeeProfile, EmployeeChecklist}
alias Prepply.Onboarding.Checklist
alias Prepply.Accounts.User
@doc """
Returns the list of em... | 23.299595 | 93 | 0.677672 |
797835d75676fa08a3674a5b3c948dd8bd37a48d | 1,098 | exs | Elixir | mix.exs | fast-radius/ex_dimensions | fe2c548d363cdce2dad9152e6ebc19fb0166efa3 | [
"BSD-3-Clause"
] | 5 | 2019-11-23T23:51:47.000Z | 2021-12-08T20:48:01.000Z | mix.exs | fast-radius/ex_dimensions | fe2c548d363cdce2dad9152e6ebc19fb0166efa3 | [
"BSD-3-Clause"
] | 2 | 2020-03-03T18:53:33.000Z | 2021-11-16T17:54:24.000Z | mix.exs | fast-radius/ex_dimensions | fe2c548d363cdce2dad9152e6ebc19fb0166efa3 | [
"BSD-3-Clause"
] | null | null | null | defmodule Units.MixProject do
use Mix.Project
def project do
[
app: :ex_dimensions,
version: "0.2.2",
elixir: "~> 1.9",
start_permanent: Mix.env() == :prod,
deps: deps(),
name: "ExDimensions",
docs: [main: "ExDimensions"],
package: package(),
description: "... | 23.361702 | 75 | 0.553734 |
79784f88c07a815e45753b762ff9183e4696a4ee | 233 | exs | Elixir | config/prod.exs | decursus/neko-achievements | 306d32f9d0caf508e4fb531ae3254d8a4ef6d222 | [
"MIT"
] | 21 | 2017-05-11T19:19:22.000Z | 2021-06-15T23:43:18.000Z | config/prod.exs | decursus/neko-achievements | 306d32f9d0caf508e4fb531ae3254d8a4ef6d222 | [
"MIT"
] | 41 | 2017-11-20T18:43:31.000Z | 2021-12-09T18:17:25.000Z | config/prod.exs | decursus/neko-achievements | 306d32f9d0caf508e4fb531ae3254d8a4ef6d222 | [
"MIT"
] | 97 | 2017-10-11T15:38:11.000Z | 2022-01-21T09:56:01.000Z | use Mix.Config
config :neko, :cowboy, listen_address: {127, 0, 0, 1}
config :neko, :cowboy, listen_port: 4000
# Do not include time - it's printed by systemd journal
config :logger, :console, format: "$metadata[$level] $message\n"
| 29.125 | 64 | 0.716738 |
7978565332fb4ab6e6b12933de6e35d6a23aaa2d | 2,476 | ex | Elixir | core/sup_tree_core/startup_manager.ex | IvanPereyra-23/PaaS | 0179c7b57645473308b0a295a70b6284ed220fbf | [
"Apache-2.0"
] | 1 | 2020-08-27T18:43:11.000Z | 2020-08-27T18:43:11.000Z | core/sup_tree_core/startup_manager.ex | IvanPereyra-23/PaaS | 0179c7b57645473308b0a295a70b6284ed220fbf | [
"Apache-2.0"
] | null | null | null | core/sup_tree_core/startup_manager.ex | IvanPereyra-23/PaaS | 0179c7b57645473308b0a295a70b6284ed220fbf | [
"Apache-2.0"
] | 1 | 2020-08-27T18:43:21.000Z | 2020-08-27T18:43:21.000Z | # Copyright(c) 2015-2020 ACCESS CO., LTD. All rights reserved.
use Croma
defmodule AntikytheraCore.StartupManager do
@moduledoc """
Manages progress of startup procedure of antikythera.
Most of initialization steps are done within `AntikytheraCore.start/2`.
However, the following step is not done in `Antikyt... | 30.95 | 106 | 0.742326 |
7978596a2a819dc731b89d59c9aa7ccc41446be7 | 463 | ex | Elixir | lib/reaper/partitioners/path_partitioner.ex | bbalser/reaper | 7a2e8808c877b33ffa63a745179118f938460989 | [
"Apache-2.0"
] | 26 | 2019-09-20T23:54:45.000Z | 2020-08-20T14:23:32.000Z | lib/reaper/partitioners/path_partitioner.ex | bbalser/reaper | 7a2e8808c877b33ffa63a745179118f938460989 | [
"Apache-2.0"
] | 757 | 2019-08-15T18:15:07.000Z | 2020-09-18T20:55:31.000Z | lib/reaper/partitioners/path_partitioner.ex | bbalser/reaper | 7a2e8808c877b33ffa63a745179118f938460989 | [
"Apache-2.0"
] | 9 | 2019-11-12T16:43:46.000Z | 2020-03-25T16:23:16.000Z | defmodule Reaper.Partitioners.PathPartitioner do
@moduledoc false
@behaviour Reaper.Partitioner
def partition(payload, path) do
filter =
path
|> String.split(".")
|> Enum.map(&format_key(payload, &1))
|> Enum.map(&Access.key/1)
payload
|> get_in(filter)
|> to_string()
e... | 20.130435 | 53 | 0.658747 |
7978cec3c7c09128a338af137a68bf23bae2151d | 381 | exs | Elixir | weather/test/cli_test.exs | benjohns1/elixer-app | 6e866ec084c5e75442c0b70f66e35f61b5b74d34 | [
"MIT"
] | null | null | null | weather/test/cli_test.exs | benjohns1/elixer-app | 6e866ec084c5e75442c0b70f66e35f61b5b74d34 | [
"MIT"
] | null | null | null | weather/test/cli_test.exs | benjohns1/elixer-app | 6e866ec084c5e75442c0b70f66e35f61b5b74d34 | [
"MIT"
] | null | null | null | defmodule WeatherTest do
use ExUnit.Case
import Weather.CLI, only: [
parse_args: 1
]
test ":help returned by option parsing with -h and --help options" do
assert parse_args(["-h", "anything"]) == :help
assert parse_args(["--help", "anything"]) == :help
end
test "return correct values" do
a... | 23.8125 | 71 | 0.643045 |
7978f1c80e1eaa487629d810e0079ccd3e996a8f | 1,576 | ex | Elixir | clients/tag_manager/lib/google_api/tag_manager/v2/model/list_tags_response.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/tag_manager/lib/google_api/tag_manager/v2/model/list_tags_response.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/tag_manager/lib/google_api/tag_manager/v2/model/list_tags_response.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... | 31.52 | 106 | 0.747462 |
79790932b05473ac7f08f2a4393e0b6d1b726484 | 9,062 | exs | Elixir | test/p_handler_test.exs | idabmat/httparrot | 1bc15bf4c7330341b36f7dc7d933285cda7bbf67 | [
"MIT"
] | null | null | null | test/p_handler_test.exs | idabmat/httparrot | 1bc15bf4c7330341b36f7dc7d933285cda7bbf67 | [
"MIT"
] | null | null | null | test/p_handler_test.exs | idabmat/httparrot | 1bc15bf4c7330341b36f7dc7d933285cda7bbf67 | [
"MIT"
] | null | null | null | defmodule HTTParrot.PHandlerTest do
use ExUnit.Case
import :meck
import HTTParrot.PHandler
setup do
new HTTParrot.GeneralRequestInfo
new JSX
new :cowboy_req
on_exit fn -> unload() end
:ok
end
Enum.each [{"/post", "POST"},
{"/patch", "PATCH"},
{"/put", "PUT"}],... | 38.726496 | 175 | 0.595454 |
79791477ea9b839e6104ef679537059718ded6c8 | 205 | ex | Elixir | lib/hl7/2.2/datatypes/ck_pat_id.ex | calvinb/elixir-hl7 | 5e953fa11f9184857c0ec4dda8662889f35a6bec | [
"Apache-2.0"
] | null | null | null | lib/hl7/2.2/datatypes/ck_pat_id.ex | calvinb/elixir-hl7 | 5e953fa11f9184857c0ec4dda8662889f35a6bec | [
"Apache-2.0"
] | null | null | null | lib/hl7/2.2/datatypes/ck_pat_id.ex | calvinb/elixir-hl7 | 5e953fa11f9184857c0ec4dda8662889f35a6bec | [
"Apache-2.0"
] | null | null | null | defmodule HL7.V2_2.DataTypes.Ckpatid do
@moduledoc false
use HL7.DataType,
fields: [
patient_id: nil,
check_digit: nil,
check_digit_scheme: nil,
facility_id: nil
]
end
| 17.083333 | 39 | 0.64878 |
7979197c56c157d92e7a0ff9a5ae9289a36dc2c4 | 69 | exs | Elixir | test/navigator_test.exs | fremantle-industries/navigator | 55131096fce1d89f025dbcce7ee2669917b45d94 | [
"MIT"
] | 14 | 2021-04-14T15:37:21.000Z | 2021-07-22T11:45:54.000Z | test/navigator_test.exs | fremantle-industries/navigator | 55131096fce1d89f025dbcce7ee2669917b45d94 | [
"MIT"
] | null | null | null | test/navigator_test.exs | fremantle-industries/navigator | 55131096fce1d89f025dbcce7ee2669917b45d94 | [
"MIT"
] | 1 | 2021-05-13T16:49:51.000Z | 2021-05-13T16:49:51.000Z | defmodule NavigatorTest do
use ExUnit.Case
doctest Navigator
end
| 13.8 | 26 | 0.811594 |
79796781fb5376ce47a58e5f0deb4c3c23597095 | 1,694 | ex | Elixir | lib/auto_api/capabilities/windscreen_capability.ex | nonninz/auto-api-elixir | 53e11542043285e94bbb5a0a3b8ffff0b1b47167 | [
"MIT"
] | null | null | null | lib/auto_api/capabilities/windscreen_capability.ex | nonninz/auto-api-elixir | 53e11542043285e94bbb5a0a3b8ffff0b1b47167 | [
"MIT"
] | null | null | null | lib/auto_api/capabilities/windscreen_capability.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.644444 | 79 | 0.744982 |
79799cca3f4e41ab4abee2fb98e5b96ad32010c1 | 2,113 | ex | Elixir | clients/api_keys/lib/google_api/api_keys/v2/model/v2_api_target.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_api_target.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_api_target.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... | 42.26 | 355 | 0.733554 |
7979cffb75db5bb988f6292d6ad9417bc40c4f08 | 1,135 | ex | Elixir | utilities/lib/persistence/persistence.ex | w0rd-driven/livebook_notebooks | 4d164f8d568291412ac64ed7dd472e987a1be0c9 | [
"MIT"
] | 1 | 2022-02-25T10:32:41.000Z | 2022-02-25T10:32:41.000Z | utilities/lib/persistence/persistence.ex | w0rd-driven/livebook_notebooks | 4d164f8d568291412ac64ed7dd472e987a1be0c9 | [
"MIT"
] | null | null | null | utilities/lib/persistence/persistence.ex | w0rd-driven/livebook_notebooks | 4d164f8d568291412ac64ed7dd472e987a1be0c9 | [
"MIT"
] | null | null | null | defmodule Utilities.Persistence do
@base_directory Path.join([".", "data", "jobs"])
def get_path(url, extension \\ "html") do
parts = URI.parse(url)
hash = :crypto.hash(:sha, url) |> Base.encode16(case: :lower)
{parts.host, "#{hash}.#{extension}"}
end
def save(url, contents, extension \\ "html") d... | 29.102564 | 65 | 0.663436 |
797a17f845e807b181377a5f36ccbf11e016fabd | 950 | ex | Elixir | 5-1/geom.ex | lucianferoiu/Etudes-Elixir | 16eb4bd3109b64a8012e827c2f2713ca0b307364 | [
"MIT"
] | null | null | null | 5-1/geom.ex | lucianferoiu/Etudes-Elixir | 16eb4bd3109b64a8012e827c2f2713ca0b307364 | [
"MIT"
] | null | null | null | 5-1/geom.ex | lucianferoiu/Etudes-Elixir | 16eb4bd3109b64a8012e827c2f2713ca0b307364 | [
"MIT"
] | null | null | null | defmodule Geom do
def area(shape,p1,p2) when p1>=0 and p2>=0 do
_area(shape,p1,p2)
end
def area(_,_,_), do: 0
def main do
prompt_user
end
def prompt_user do
shape = prompt_shape |> shape_to_atom
IO.puts "Shape is #{shape}"
if shape != :quit do
p1 = prompt_number(1) |> String.to_integer
p2 = prom... | 20.212766 | 67 | 0.631579 |
797a8b10ee2b9dd5a5f3cbdd5507d7b91275d6ff | 2,373 | ex | Elixir | lib/ueberauth/strategy/apple/oauth.ex | cloverfoodlab/ueberauth_apple | b2fdd37b2a531b727fdb27db4104e72bf0125c80 | [
"MIT"
] | null | null | null | lib/ueberauth/strategy/apple/oauth.ex | cloverfoodlab/ueberauth_apple | b2fdd37b2a531b727fdb27db4104e72bf0125c80 | [
"MIT"
] | null | null | null | lib/ueberauth/strategy/apple/oauth.ex | cloverfoodlab/ueberauth_apple | b2fdd37b2a531b727fdb27db4104e72bf0125c80 | [
"MIT"
] | null | null | null | defmodule Ueberauth.Strategy.Apple.OAuth do
@moduledoc """
OAuth2 for Apple.
Add `client_id` and `client_secret` to your configuration:
config :ueberauth, Ueberauth.Strategy.Apple.OAuth,
client_id: System.get_env("APPLE_CLIENT_ID"),
client_secreat: System.get_env("APPLE_CLIENT_SECRET")
"""
use OAu... | 27.917647 | 94 | 0.650232 |
797a9b27de7382e2bbe6dac1819304e501b58617 | 863 | exs | Elixir | priv/sandbox/migrations/00000000000000_add_yourbot_project_table.exs | ConnorRigby/yourbot | eea40e63b0f93963ed14b7efab9ecbe898ab11dd | [
"Apache-2.0"
] | 3 | 2021-11-08T15:19:19.000Z | 2021-11-11T03:18:35.000Z | priv/sandbox/migrations/00000000000000_add_yourbot_project_table.exs | ConnorRigby/yourbot | eea40e63b0f93963ed14b7efab9ecbe898ab11dd | [
"Apache-2.0"
] | null | null | null | priv/sandbox/migrations/00000000000000_add_yourbot_project_table.exs | ConnorRigby/yourbot | eea40e63b0f93963ed14b7efab9ecbe898ab11dd | [
"Apache-2.0"
] | null | null | null | defmodule YourBot.Bots.Project.Repo.Migrations.AddYourbotProjectTable do
use Ecto.Migration
def change do
create table(:yourbot_project, primary_key: false) do
add :id, :tinyint, null: false, default: 0, primary_key: true
add :version, :integer, default: 0
timestamps()
end
execute ""... | 26.151515 | 95 | 0.651217 |
797a9d47e2715679b91998f5d3da7901865366d5 | 2,025 | ex | Elixir | apps/testing/lib/assert_async.ex | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | 26 | 2019-09-20T23:54:45.000Z | 2020-08-20T14:23:32.000Z | apps/testing/lib/assert_async.ex | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | 757 | 2019-08-15T18:15:07.000Z | 2020-09-18T20:55:31.000Z | apps/testing/lib/assert_async.ex | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | 10 | 2020-02-13T21:24:09.000Z | 2020-05-21T18:39:35.000Z | defmodule AssertAsync do
@moduledoc """
Helper macro for making assertions on async actions. This is particularly
useful for testing GenServers and other processes that may be synchronously
processing messages. The macro will retry an assertion until it passes
or times out.
## Example
defmodule Foo do... | 24.107143 | 93 | 0.619259 |
797af6c1f74d1314c45894186842f33b4acf730e | 2,764 | exs | Elixir | test/phoenix_pubsub_redis_z_test.exs | cctiger36/phoenix_pubsub_redis_z | 27ed1a60fcbcec4bced37e7b45493c16f8fa816d | [
"MIT"
] | 5 | 2018-05-27T15:45:16.000Z | 2019-02-12T12:56:31.000Z | test/phoenix_pubsub_redis_z_test.exs | cctiger36/phoenix_pubsub_redis_z | 27ed1a60fcbcec4bced37e7b45493c16f8fa816d | [
"MIT"
] | 45 | 2018-09-11T00:29:09.000Z | 2022-03-23T21:39:38.000Z | test/phoenix_pubsub_redis_z_test.exs | cctiger36/phoenix_pubsub_redis_z | 27ed1a60fcbcec4bced37e7b45493c16f8fa816d | [
"MIT"
] | 1 | 2018-05-23T11:54:55.000Z | 2018-05-23T11:54:55.000Z | defmodule PhoenixPubsubRedisZTest do
alias Phoenix.PubSub
alias Phoenix.PubSub.RedisZ
alias Phoenix.PubSub.RedisZ.Local
use ExUnit.Case, async: true
def spawn_pid do
spawn(fn -> :timer.sleep(:infinity) end)
end
setup_all do
pubsub_server = TestApp.PubSub
{:ok, _} =
RedisZ.start_link(... | 34.123457 | 99 | 0.678003 |
797affef3c771a6a778c03aeb8e16af110955695 | 35,035 | ex | Elixir | clients/ad_sense_host/lib/google_api/ad_sense_host/v41/api/accounts.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/ad_sense_host/lib/google_api/ad_sense_host/v41/api/accounts.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/ad_sense_host/lib/google_api/ad_sense_host/v41/api/accounts.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... | 42.363966 | 246 | 0.617097 |
797b0ce6df7bdae2c7adadbbd0d7a49558ded57b | 8,737 | exs | Elixir | test/tag_cloud/compiler/ast_style_test.exs | RobertDober/tag_cloud | e3f1fca47b32691c54870d6f8b66a7f66bbd53d6 | [
"Apache-2.0"
] | null | null | null | test/tag_cloud/compiler/ast_style_test.exs | RobertDober/tag_cloud | e3f1fca47b32691c54870d6f8b66a7f66bbd53d6 | [
"Apache-2.0"
] | 3 | 2021-10-03T16:48:49.000Z | 2022-02-06T10:26:36.000Z | test/tag_cloud/compiler/ast_style_test.exs | RobertDober/tag_cloud | e3f1fca47b32691c54870d6f8b66a7f66bbd53d6 | [
"Apache-2.0"
] | null | null | null | defmodule Test.TagCloud.Compiler.AstStyleTest do
use ExUnit.Case
import TagCloud.Compiler, only: [ast_style: 1]
describe "colors: gamma corrected gray scales" do
test "0" do
result = ast_style("0 12 100")
expected = {"style", "color: #ffffff; font-size: 12pt; font-weight: 100;"}
assert re... | 23.298667 | 101 | 0.5384 |
797b1aaea21e9b315ba7ef3f845b293d6c7405ba | 238 | exs | Elixir | priv/repo/migrations/20181230071929_create_id_suffixes_on_assoc_fields_on_transfers.exs | o-marchi/o-bank-api | fd4595a6fbffb89a0ca4c2dd9aa8b4f92e700aa4 | [
"MIT"
] | null | null | null | priv/repo/migrations/20181230071929_create_id_suffixes_on_assoc_fields_on_transfers.exs | o-marchi/o-bank-api | fd4595a6fbffb89a0ca4c2dd9aa8b4f92e700aa4 | [
"MIT"
] | null | null | null | priv/repo/migrations/20181230071929_create_id_suffixes_on_assoc_fields_on_transfers.exs | o-marchi/o-bank-api | fd4595a6fbffb89a0ca4c2dd9aa8b4f92e700aa4 | [
"MIT"
] | null | null | null | defmodule Obank.Repo.Migrations.CreateIdSuffixesOnAssocFieldsOnTransfers do
use Ecto.Migration
def change do
alter table(:transfers) do
add :to_id, references(:users)
add :from_id, references(:users)
end
end
end
| 21.636364 | 75 | 0.735294 |
797b2bb5a98b1a3b36bac48237f2e54644d0ac79 | 12,710 | ex | Elixir | clients/storage_transfer/lib/google_api/storage_transfer/v1/api/transfer_jobs.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/storage_transfer/lib/google_api/storage_transfer/v1/api/transfer_jobs.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/storage_transfer/lib/google_api/storage_transfer/v1/api/transfer_jobs.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 ... | 47.249071 | 196 | 0.631314 |
797b2bed75b1b31eacf55c367146fa8eee8bd0eb | 1,395 | exs | Elixir | phone-number/phone_number_test.exs | ravanscafi/exercism-elixir | 0f5c8c923166a0a795c323c7e2d6ccc9da572fcf | [
"MIT"
] | null | null | null | phone-number/phone_number_test.exs | ravanscafi/exercism-elixir | 0f5c8c923166a0a795c323c7e2d6ccc9da572fcf | [
"MIT"
] | null | null | null | phone-number/phone_number_test.exs | ravanscafi/exercism-elixir | 0f5c8c923166a0a795c323c7e2d6ccc9da572fcf | [
"MIT"
] | null | null | null | if !System.get_env("EXERCISM_TEST_EXAMPLES") do
Code.load_file("phone_number.exs", __DIR__)
end
ExUnit.start()
ExUnit.configure(exclude: :pending, trace: true)
defmodule PhoneTest do
use ExUnit.Case
test "cleans number" do
assert Phone.number("(123) 456-7890") == "1234567890"
end
# @tag :pending
tes... | 23.25 | 69 | 0.675269 |
797b3b615e5c19a9d3ffe5bccf97d203cb941fd1 | 233 | exs | Elixir | priv/repo/migrations/20180806212804_create_todos.exs | sneako/distillery-aws-example | 75cd687791701aee17a19e48978a06495b102037 | [
"Apache-2.0"
] | null | null | null | priv/repo/migrations/20180806212804_create_todos.exs | sneako/distillery-aws-example | 75cd687791701aee17a19e48978a06495b102037 | [
"Apache-2.0"
] | null | null | null | priv/repo/migrations/20180806212804_create_todos.exs | sneako/distillery-aws-example | 75cd687791701aee17a19e48978a06495b102037 | [
"Apache-2.0"
] | null | null | null | defmodule Example.Repo.Migrations.CreateTodos do
use Ecto.Migration
def change do
create table(:todos) do
add(:title, :string)
add(:completed, :boolean)
timestamps(type: :naive_datetime)
end
end
end
| 17.923077 | 48 | 0.678112 |
797b6b9ca0ed1c7ddc02b8d7880b2a2269e07078 | 1,761 | ex | Elixir | lib/militerm/systems/aliases.ex | jgsmith/militerm | c4252d0a93f5620b90750ac2b61baf282e9ef7eb | [
"Apache-2.0"
] | 6 | 2017-06-16T10:26:35.000Z | 2021-04-07T15:01:00.000Z | lib/militerm/systems/aliases.ex | jgsmith/militerm | c4252d0a93f5620b90750ac2b61baf282e9ef7eb | [
"Apache-2.0"
] | 2 | 2020-04-14T02:17:46.000Z | 2021-03-10T11:09:05.000Z | lib/militerm/systems/aliases.ex | jgsmith/militerm | c4252d0a93f5620b90750ac2b61baf282e9ef7eb | [
"Apache-2.0"
] | null | null | null | defmodule Militerm.Systems.Aliases do
use Militerm.ECS.System
alias Militerm.Systems.Entity
defcommand alias_(arg),
for: %{"this" => {:thing, entity_id} = this},
as: "alias" do
case String.split(arg, ~r{\s+}, parts: 2, trim: true) do
[word, definition] ->
Militerm.Components.Aliases.se... | 28.403226 | 78 | 0.59682 |
797b9b57d72d7dfcb9f50eb52590f389dc767f47 | 152,829 | ex | Elixir | lib/elixir/lib/kernel.ex | goalves/elixir | 75726d5611413ee45cb5235b1698944b72efa244 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/kernel.ex | goalves/elixir | 75726d5611413ee45cb5235b1698944b72efa244 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/kernel.ex | goalves/elixir | 75726d5611413ee45cb5235b1698944b72efa244 | [
"Apache-2.0"
] | null | null | null | # Use elixir_bootstrap module to be able to bootstrap Kernel.
# The bootstrap module provides simpler implementations of the
# functions removed, simple enough to bootstrap.
import Kernel,
except: [@: 1, defmodule: 2, def: 1, def: 2, defp: 2, defmacro: 1, defmacro: 2, defmacrop: 2]
import :elixir_bootstrap
defmodul... | 26.812105 | 116 | 0.6338 |
797bc0d43218d2cc3e9e891cfa894762922efd0e | 71 | exs | Elixir | test/test_helper.exs | Swuber/Epik-Club | 0e56e602f0934e0e6225c7456bcb37f5b852be2d | [
"Apache-2.0"
] | 2 | 2017-04-23T17:31:55.000Z | 2017-07-22T12:54:24.000Z | test/test_helper.exs | Swuber/Epik-Club | 0e56e602f0934e0e6225c7456bcb37f5b852be2d | [
"Apache-2.0"
] | 7 | 2017-04-11T18:42:57.000Z | 2017-04-16T22:54:11.000Z | test/test_helper.exs | MichaelDimmitt/unf-swuber | 7c205c6e80bcc3ef4ee55490ad497061253bcc61 | [
"Apache-2.0"
] | 3 | 2017-08-10T22:54:28.000Z | 2018-10-18T22:32:55.000Z | ExUnit.start
Ecto.Adapters.SQL.Sandbox.mode(UnfSwuber.Repo, :manual)
| 14.2 | 55 | 0.788732 |
797bc8397974ca48846ba3c0d69ffd7f9bd9c422 | 2,421 | ex | Elixir | lib/livebook_web/live/session_live/export_live_markdown_component.ex | mgibowski/livebook | bfb9dc371e386597219a398a180d69c0bfa2f384 | [
"Apache-2.0"
] | 1,846 | 2021-04-13T14:46:36.000Z | 2021-07-14T20:37:40.000Z | lib/livebook_web/live/session_live/export_live_markdown_component.ex | mgibowski/livebook | bfb9dc371e386597219a398a180d69c0bfa2f384 | [
"Apache-2.0"
] | 411 | 2021-07-15T07:41:54.000Z | 2022-03-31T21:34:22.000Z | lib/livebook_web/live/session_live/export_live_markdown_component.ex | mgibowski/livebook | bfb9dc371e386597219a398a180d69c0bfa2f384 | [
"Apache-2.0"
] | 130 | 2021-04-13T15:43:55.000Z | 2021-07-12T16:57:46.000Z | defmodule LivebookWeb.SessionLive.ExportLiveMarkdownComponent do
use LivebookWeb, :live_component
@impl true
def update(assigns, socket) do
socket = assign(socket, assigns)
{:ok,
socket
|> assign_new(:include_outputs, fn -> socket.assigns.notebook.persist_outputs end)
|> assign_source()}
... | 32.716216 | 128 | 0.586948 |
797c73a8b13842381aae447bd06bf6f33fb0531b | 436 | exs | Elixir | test/well_test.exs | lupinthe14th/codewars | 5c71a1be6dd5c42a6217d70e5cfcd43c6c016ac7 | [
"MIT"
] | null | null | null | test/well_test.exs | lupinthe14th/codewars | 5c71a1be6dd5c42a6217d70e5cfcd43c6c016ac7 | [
"MIT"
] | 70 | 2020-01-07T01:21:38.000Z | 2021-06-18T02:57:39.000Z | test/well_test.exs | lupinthe14th/codewars | 5c71a1be6dd5c42a6217d70e5cfcd43c6c016ac7 | [
"MIT"
] | null | null | null | defmodule TestWell do
use ExUnit.Case
defp testing(x, exp) do
act = Well.well(x)
assert act == exp, "Given list #{inspect(x)}, expected #{exp}, got #{act}"
end
test "basic tests" do
testing(["bad", "bad", "bad"], "Fail!")
testing(["good", "bad", "bad", "bad", "bad"], "Publish!")
testing(
... | 22.947368 | 78 | 0.53211 |
797c7580b3ce48afd4d7084ae108f87146a4e139 | 378 | ex | Elixir | plugins/one_pages/lib/one_pages_web/views/error_view.ex | smpallen99/ucx_ucc | 47225f205a6ac4aacdb9bb4f7512dcf4092576ad | [
"MIT"
] | 11 | 2017-05-15T18:35:05.000Z | 2018-02-05T18:27:40.000Z | plugins/one_pages/lib/one_pages_web/views/error_view.ex | anndream/infinity_one | 47225f205a6ac4aacdb9bb4f7512dcf4092576ad | [
"MIT"
] | 15 | 2017-11-27T10:38:05.000Z | 2018-02-09T20:42:08.000Z | plugins/one_pages/lib/one_pages_web/views/error_view.ex | anndream/infinity_one | 47225f205a6ac4aacdb9bb4f7512dcf4092576ad | [
"MIT"
] | 4 | 2017-09-13T11:34:16.000Z | 2018-02-26T13:37:06.000Z | defmodule OnePagesWeb.ErrorView do
use OnePagesWeb, :view
def render("404.html", _assigns) do
"Page not found"
end
def render("500.html", _assigns) do
"Internal server error"
end
# In case no render clause matches or no
# template is found, let's render it as 500
def template_not_found(_templ... | 21 | 47 | 0.703704 |
797c7a354effacad4162bb8177468a1f07e066bf | 212 | ex | Elixir | lib/hexpm/web/views/docs_view.ex | hubertpompecki/hexpm | 5cd4208b07a70bf2e1490930bf5d577978793b50 | [
"Apache-2.0"
] | null | null | null | lib/hexpm/web/views/docs_view.ex | hubertpompecki/hexpm | 5cd4208b07a70bf2e1490930bf5d577978793b50 | [
"Apache-2.0"
] | null | null | null | lib/hexpm/web/views/docs_view.ex | hubertpompecki/hexpm | 5cd4208b07a70bf2e1490930bf5d577978793b50 | [
"Apache-2.0"
] | null | null | null | defmodule Hexpm.Web.DocsView do
use Hexpm.Web, :view
alias Hexpm.Web.DocsView
def selected_docs(conn, view) do
if conn.assigns.view_name == view do
"selected"
else
""
end
end
end
| 16.307692 | 40 | 0.650943 |
797c7b52507c5d040c39140116ff5495c76b78e4 | 30,629 | ex | Elixir | clients/alert_center/lib/google_api/alert_center/v1beta1/api/alerts.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/alert_center/lib/google_api/alert_center/v1beta1/api/alerts.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/alert_center/lib/google_api/alert_center/v1beta1/api/alerts.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... | 51.304858 | 363 | 0.637305 |
797c8fe9c418bb91cb0c59d3c1880502de9e15b4 | 812 | ex | Elixir | lib/ex_polygon/rest/crypto/exchanges.ex | aai/ex_polygon | 3bd6d8d0f1fbe4cd3fa939751c5ff00813eeeba3 | [
"MIT"
] | null | null | null | lib/ex_polygon/rest/crypto/exchanges.ex | aai/ex_polygon | 3bd6d8d0f1fbe4cd3fa939751c5ff00813eeeba3 | [
"MIT"
] | null | null | null | lib/ex_polygon/rest/crypto/exchanges.ex | aai/ex_polygon | 3bd6d8d0f1fbe4cd3fa939751c5ff00813eeeba3 | [
"MIT"
] | null | null | null | defmodule ExPolygon.Rest.Crypto.Exchanges do
@moduledoc """
Returns a call to "Crypto Exchanges" Polygon.io
"""
@type crypto :: ExPolygon.CryptoExchange.t()
@type api_key :: ExPolygon.Rest.HTTPClient.api_key()
@type shared_error_reasons :: ExPolygon.Rest.HTTPClient.shared_error_reasons()
@path "/v1/meta... | 27.066667 | 91 | 0.666256 |
797c9d13226242cba99285b9f0c459c022108b04 | 702 | ex | Elixir | lib/cadet_web/gettext.ex | Hou-Rui/cadet | f9036d76005bf3b267b632dce176067ae1a19f71 | [
"Apache-2.0"
] | 27 | 2018-01-20T05:56:24.000Z | 2021-05-24T03:21:55.000Z | lib/cadet_web/gettext.ex | Hou-Rui/cadet | f9036d76005bf3b267b632dce176067ae1a19f71 | [
"Apache-2.0"
] | 731 | 2018-04-16T13:25:49.000Z | 2021-06-22T07:16:12.000Z | lib/cadet_web/gettext.ex | Hou-Rui/cadet | f9036d76005bf3b267b632dce176067ae1a19f71 | [
"Apache-2.0"
] | 43 | 2018-01-20T06:35:46.000Z | 2021-05-05T03:22:35.000Z | defmodule CadetWeb.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 CadetWeb.Gettext
# Simple translation
gettext "Here is the s... | 28.08 | 72 | 0.678063 |
797cbb3500d165352d7e8e3e892ca507a9f6603e | 185 | ex | Elixir | lib/http_behaviour.ex | karlosmid/exkeycdn | 4f8a756b2ea7b5bcb2d2821509250004ed8850ea | [
"MIT"
] | null | null | null | lib/http_behaviour.ex | karlosmid/exkeycdn | 4f8a756b2ea7b5bcb2d2821509250004ed8850ea | [
"MIT"
] | null | null | null | lib/http_behaviour.ex | karlosmid/exkeycdn | 4f8a756b2ea7b5bcb2d2821509250004ed8850ea | [
"MIT"
] | null | null | null | defmodule ExKeyCDN.HTTPBehaviour do
@moduledoc """
HTTP Behaviour
"""
@doc """
Sends http request
"""
@callback request(atom, binary, binary | map) :: HTTP.response()
end
| 18.5 | 66 | 0.659459 |
797cc416720483a2d4623b30be146d2a6842c299 | 514 | exs | Elixir | test/arfficionado_test.exs | patrick7777776/arfficionado | 8684a918f2f6c89023bd484965d0e19fa82a57ff | [
"Apache-2.0"
] | null | null | null | test/arfficionado_test.exs | patrick7777776/arfficionado | 8684a918f2f6c89023bd484965d0e19fa82a57ff | [
"Apache-2.0"
] | null | null | null | test/arfficionado_test.exs | patrick7777776/arfficionado | 8684a918f2f6c89023bd484965d0e19fa82a57ff | [
"Apache-2.0"
] | null | null | null | defmodule ArfficionadoTest do
use ExUnit.Case
import Arfficionado, only: [read: 2]
doctest Arfficionado
test "a fine short arff file" do
assert read(~s"""
@relation foo
@attribute a1 integer
@attribute a2 integer
@data
1,2
3,4, {5}
... | 19.769231 | 52 | 0.533074 |
797ccd57d605b8c5392fdcc13ba89fa1c0e285dd | 1,175 | exs | Elixir | instrumentation/opentelemetry_phoenix/config/config.exs | RudolfMan/opentelemetry-erlang-contrib | 44fd2a6871742380dd6adc112f9776cda501ff1f | [
"Apache-2.0"
] | 24 | 2021-05-07T18:37:11.000Z | 2022-03-13T06:21:00.000Z | instrumentation/opentelemetry_phoenix/config/config.exs | RudolfMan/opentelemetry-erlang-contrib | 44fd2a6871742380dd6adc112f9776cda501ff1f | [
"Apache-2.0"
] | 42 | 2021-05-10T20:19:22.000Z | 2022-03-31T17:48:13.000Z | instrumentation/opentelemetry_phoenix/config/config.exs | RudolfMan/opentelemetry-erlang-contrib | 44fd2a6871742380dd6adc112f9776cda501ff1f | [
"Apache-2.0"
] | 19 | 2021-08-30T01:33:54.000Z | 2022-03-20T22:01:15.000Z | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
import 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 parent... | 33.571429 | 73 | 0.754894 |
797cf43f36a355257de8b998754ac77811877d6f | 242 | exs | Elixir | priv/repo/migrations/20180210120511_create_topics.exs | a-sac/HighTopics | e99b2cc517d5b552bc7f44aae9774357c8bb427b | [
"MIT"
] | null | null | null | priv/repo/migrations/20180210120511_create_topics.exs | a-sac/HighTopics | e99b2cc517d5b552bc7f44aae9774357c8bb427b | [
"MIT"
] | null | null | null | priv/repo/migrations/20180210120511_create_topics.exs | a-sac/HighTopics | e99b2cc517d5b552bc7f44aae9774357c8bb427b | [
"MIT"
] | null | null | null | defmodule Hightopics.Repo.Migrations.CreateTopics do
use Ecto.Migration
def change do
create table(:topics) do
add :name, :string
add :description, :text
add :rating, :integer
timestamps()
end
end
end
| 16.133333 | 52 | 0.657025 |
797cfeaee70120596b19cb6d9411d69216cfc464 | 683 | exs | Elixir | apps/thumbnail_server/mix.exs | salmanebah/gen_thumbnail | 58e8e0ce8661b18725704c04cf2f33d7edd6e51e | [
"MIT"
] | 1 | 2019-06-06T12:03:37.000Z | 2019-06-06T12:03:37.000Z | apps/thumbnail_server/mix.exs | salmanebah/gen_thumbnail | 58e8e0ce8661b18725704c04cf2f33d7edd6e51e | [
"MIT"
] | null | null | null | apps/thumbnail_server/mix.exs | salmanebah/gen_thumbnail | 58e8e0ce8661b18725704c04cf2f33d7edd6e51e | [
"MIT"
] | null | null | null | defmodule ThumbnailServer.MixProject do
use Mix.Project
def project do
[
app: :thumbnail_server,
version: "0.1.0",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixir: "~> 1.8",
start_per... | 20.69697 | 59 | 0.566618 |
797d11a463362a0b501039ae9b0c42897ffed59d | 3,009 | ex | Elixir | apps/engine/lib/engine/ethereum/event/coordinator.ex | omgnetwork/omg-childchain-v2 | 31cc9cf9e42718fc3b9bd6668f24a627cac80b4f | [
"Apache-2.0"
] | 4 | 2020-11-30T17:38:57.000Z | 2021-01-23T21:29:41.000Z | apps/engine/lib/engine/ethereum/event/coordinator.ex | omgnetwork/omg-childchain-v2 | 31cc9cf9e42718fc3b9bd6668f24a627cac80b4f | [
"Apache-2.0"
] | 24 | 2020-11-30T17:32:48.000Z | 2021-02-22T06:25:22.000Z | apps/engine/lib/engine/ethereum/event/coordinator.ex | omgnetwork/omg-childchain-v2 | 31cc9cf9e42718fc3b9bd6668f24a627cac80b4f | [
"Apache-2.0"
] | null | null | null | defmodule Engine.Ethereum.Event.Coordinator do
@moduledoc """
Synchronizes services on root chain height, see `Coordinator.Core`
"""
use GenServer
alias Engine.Ethereum.Event.Coordinator.Core
alias Engine.Ethereum.Event.Coordinator.SyncGuide
alias Engine.Ethereum.Height
require Logger
# use Spandex... | 34.193182 | 96 | 0.717182 |
797d19b2ae507d1cd6545b19e46ce62d621aedfe | 609 | exs | Elixir | priv/repo/migrations/20190327104558_migrate_repeating_trigger_embedded_field.exs | sitedata/sanbase2 | 8da5e44a343288fbc41b68668c6c80ae8547d557 | [
"MIT"
] | 81 | 2017-11-20T01:20:22.000Z | 2022-03-05T12:04:25.000Z | priv/repo/migrations/20190327104558_migrate_repeating_trigger_embedded_field.exs | rmoorman/sanbase2 | 226784ab43a24219e7332c49156b198d09a6dd85 | [
"MIT"
] | 359 | 2017-10-15T14:40:53.000Z | 2022-01-25T13:34:20.000Z | priv/repo/migrations/20190327104558_migrate_repeating_trigger_embedded_field.exs | sitedata/sanbase2 | 8da5e44a343288fbc41b68668c6c80ae8547d557 | [
"MIT"
] | 16 | 2017-11-19T13:57:40.000Z | 2022-02-07T08:13:02.000Z | defmodule Sanbase.Repo.Migrations.MigrateRepeatingTriggerEmbeddedField do
use Ecto.Migration
def up do
Application.ensure_all_started(:timex)
execute("""
UPDATE user_triggers
SET trigger = trigger - 'repeating' || jsonb_build_object('is_repeating', trigger->'repeating')
WHERE trigger ? '... | 25.375 | 104 | 0.691297 |
797d1a8c8628a1b2a9e34b4a2c0a852fe75a6e7a | 12,856 | exs | Elixir | test/streams/single_stream_test.exs | LeartS/eventstore | f0431bfefcaa1a6fa8251eb6dd0ae8def1d82961 | [
"MIT"
] | null | null | null | test/streams/single_stream_test.exs | LeartS/eventstore | f0431bfefcaa1a6fa8251eb6dd0ae8def1d82961 | [
"MIT"
] | null | null | null | test/streams/single_stream_test.exs | LeartS/eventstore | f0431bfefcaa1a6fa8251eb6dd0ae8def1d82961 | [
"MIT"
] | null | null | null | defmodule EventStore.Streams.SingleStreamTest do
use EventStore.StorageCase
alias EventStore.EventData
alias EventStore.EventFactory
alias EventStore.Streams.Stream
alias TestEventStore, as: EventStore
@subscription_name "test_subscription"
describe "append events to stream" do
setup [:append_event... | 29.020316 | 101 | 0.631145 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.