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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e805caa1be21939906007c31cab59713df10746b | 491 | ex | Elixir | lib/wax_demo_web/views/error_view.ex | skunkwerks/wax_demo | e0c562ea168654d2475f70cba1ef29e74fc0dd24 | [
"Apache-2.0"
] | 5 | 2019-02-14T18:39:20.000Z | 2022-01-31T05:49:23.000Z | lib/wax_demo_web/views/error_view.ex | skunkwerks/wax_demo | e0c562ea168654d2475f70cba1ef29e74fc0dd24 | [
"Apache-2.0"
] | 18 | 2019-03-17T14:21:37.000Z | 2022-03-25T20:55:56.000Z | lib/wax_demo_web/views/error_view.ex | skunkwerks/wax_demo | e0c562ea168654d2475f70cba1ef29e74fc0dd24 | [
"Apache-2.0"
] | 4 | 2019-03-17T13:13:24.000Z | 2022-02-01T19:50:22.000Z | defmodule WaxDemoWeb.ErrorView do
use WaxDemoWeb, :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... | 28.882353 | 61 | 0.735234 |
e805cb71ec10fd57c6fb8a9a1a85fa1b58ad238a | 2,491 | ex | Elixir | apps/omg_watcher/lib/omg_watcher/web/router.ex | kendricktan/elixir-omg | 834c103fd5c4b9e063c1d32b9b4e5728abb64009 | [
"Apache-2.0"
] | null | null | null | apps/omg_watcher/lib/omg_watcher/web/router.ex | kendricktan/elixir-omg | 834c103fd5c4b9e063c1d32b9b4e5728abb64009 | [
"Apache-2.0"
] | null | null | null | apps/omg_watcher/lib/omg_watcher/web/router.ex | kendricktan/elixir-omg | 834c103fd5c4b9e063c1d32b9b4e5728abb64009 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 OmiseGO Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 37.179104 | 106 | 0.728222 |
e805cbc6e20c039959ff417670e64619db9dda85 | 1,897 | ex | Elixir | clients/content/lib/google_api/content/v2/model/products_list_response.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/content/lib/google_api/content/v2/model/products_list_response.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/products_list_response.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 ... | 35.792453 | 176 | 0.722193 |
e80625e29e466043fe5af743f64648d0d0b1269a | 924 | ex | Elixir | lib/tmp/worker.ex | preciz/tmp | d26ced0cbe0e1034f7cabd798fd8ec6a7abf347d | [
"MIT"
] | 10 | 2020-08-16T18:49:42.000Z | 2021-11-03T11:19:52.000Z | lib/tmp/worker.ex | preciz/tmp | d26ced0cbe0e1034f7cabd798fd8ec6a7abf347d | [
"MIT"
] | 6 | 2020-09-17T04:57:12.000Z | 2022-02-24T04:12:16.000Z | lib/tmp/worker.ex | preciz/tmp | d26ced0cbe0e1034f7cabd798fd8ec6a7abf347d | [
"MIT"
] | 1 | 2021-08-31T18:58:03.000Z | 2021-08-31T18:58:03.000Z | defmodule Tmp.Worker do
@moduledoc """
Executes the function given to `Tmp.dir/2` in a GenServer process
"""
use GenServer, restart: :temporary
defmodule State do
@enforce_keys [:path, :function]
defstruct [:path, :function]
end
@spec execute(Path.t(), function, timeout) :: term()
def execute... | 22 | 85 | 0.666667 |
e806494148e5a2e8240e401a165cc2cf70a639fe | 2,017 | exs | Elixir | clients/deployment_manager/mix.exs | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/deployment_manager/mix.exs | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/deployment_manager/mix.exs | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 30.104478 | 243 | 0.675756 |
e8065c38bc2dc002acf7119c528dd33f37e41c1e | 1,010 | exs | Elixir | apps/db/mix.exs | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 322 | 2018-02-28T07:38:44.000Z | 2020-05-27T23:09:55.000Z | apps/db/mix.exs | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 643 | 2018-02-28T12:05:20.000Z | 2020-05-22T08:34:38.000Z | apps/db/mix.exs | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 63 | 2018-02-28T10:57:06.000Z | 2020-05-27T23:10:38.000Z | defmodule DB.Mixfile do
use Mix.Project
def project do
[
app: :db,
version: "2.0.0-dev",
build_path: "../../_build",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixir: "~> 1.8",
elixirc_paths: elixirc_paths(Mix.env),
start_permanent: Mix.env == :prod,
... | 22.444444 | 56 | 0.580198 |
e8069151c82cbe690fb61dfb3d8ac1342ad43bf1 | 1,866 | ex | Elixir | lib/termato/sock_handler.ex | andyl/termato | ae8af988ef85b98232ddea45f196b7a71d1dc619 | [
"MIT"
] | null | null | null | lib/termato/sock_handler.ex | andyl/termato | ae8af988ef85b98232ddea45f196b7a71d1dc619 | [
"MIT"
] | null | null | null | lib/termato/sock_handler.ex | andyl/termato | ae8af988ef85b98232ddea45f196b7a71d1dc619 | [
"MIT"
] | null | null | null | defmodule Termato.SockHandler do
@behaviour :cowboy_websocket
# ----- Setup & Teardown Callbacks -----
def init(req, state) do
{:cowboy_websocket, req, state}
end
def websocket_init(state) do
IO.inspect self(), label: "WEBSOCKET INIT"
Process.sleep(250)
Termato.SockPidstore.add_client(... | 23.923077 | 82 | 0.610397 |
e806edcae8aa0478f65e63ed30dceccbeed85d03 | 238 | ex | Elixir | app/lib/noodl_web/live/guide/stream/stream.ex | nathanjohnson320/noodl | 2e449aab15b54fc5a1dc45ebf4b79e7b64b7c967 | [
"MIT"
] | 1 | 2021-01-20T20:00:50.000Z | 2021-01-20T20:00:50.000Z | app/lib/noodl_web/live/guide/stream/stream.ex | nathanjohnson320/noodl | 2e449aab15b54fc5a1dc45ebf4b79e7b64b7c967 | [
"MIT"
] | null | null | null | app/lib/noodl_web/live/guide/stream/stream.ex | nathanjohnson320/noodl | 2e449aab15b54fc5a1dc45ebf4b79e7b64b7c967 | [
"MIT"
] | null | null | null | defmodule NoodlWeb.Live.Guide.Stream do
@moduledoc ~S"""
LiveView for the guide stream page
"""
use NoodlWeb, :live_view
def mount(_params, session, socket) do
{:ok, socket |> Authentication.assign_user(session)}
end
end
| 21.636364 | 56 | 0.710084 |
e8071c3f371570d0200cf82502d2023e37ce5256 | 3,317 | ex | Elixir | lib/gat_core/connection_tcp.ex | SylwBar/gat_core | b37c12e1004e1ee11b3d515f51f02319d0ac3a93 | [
"MIT"
] | null | null | null | lib/gat_core/connection_tcp.ex | SylwBar/gat_core | b37c12e1004e1ee11b3d515f51f02319d0ac3a93 | [
"MIT"
] | null | null | null | lib/gat_core/connection_tcp.ex | SylwBar/gat_core | b37c12e1004e1ee11b3d515f51f02319d0ac3a93 | [
"MIT"
] | null | null | null | defmodule GATCore.ConnectionTCP do
# Server will send KA every 20 seconds
@server_ka_timer_msec 20_000
# Client should send any message ay least every 10 minutes
@client_ka_timer_msec 600_000
use GenServer
require Logger
# ----- ConnectionTCP API -----
def start(object_id, socket) do
GenServer.sta... | 31.590476 | 115 | 0.653301 |
e80736f06db98cfd53a890f139d608bd68e0eb25 | 2,527 | ex | Elixir | lib/mastery/boundary/proctor.ex | grekko/mastery | f80dfcb660f23187970442ea237e4128ce3ac262 | [
"MIT"
] | null | null | null | lib/mastery/boundary/proctor.ex | grekko/mastery | f80dfcb660f23187970442ea237e4128ce3ac262 | [
"MIT"
] | null | null | null | lib/mastery/boundary/proctor.ex | grekko/mastery | f80dfcb660f23187970442ea237e4128ce3ac262 | [
"MIT"
] | null | null | null | defmodule Mastery.Boundary.Proctor do
alias Mastery.Boundary.{QuizManager, QuizSession}
use GenServer
require Logger
def start_link(options \\ []) do
GenServer.start_link(__MODULE__, [], options)
end
def init(quizzes) do
{:ok, quizzes}
end
def schedule_quiz(proctor \\ __MODULE__, quiz, templa... | 25.785714 | 97 | 0.684211 |
e80738203a2162ebd17f280da629732e122d7b9a | 1,117 | exs | Elixir | mix.exs | bcardarella/elixir-fixtures | 2c49e0af3713bd912dc7bb639324da423d155299 | [
"MIT"
] | 139 | 2016-02-07T12:28:18.000Z | 2022-02-15T11:39:58.000Z | mix.exs | bcardarella/elixir-fixtures | 2c49e0af3713bd912dc7bb639324da423d155299 | [
"MIT"
] | 17 | 2016-05-16T18:59:26.000Z | 2020-09-11T16:53:53.000Z | mix.exs | bcardarella/elixir-fixtures | 2c49e0af3713bd912dc7bb639324da423d155299 | [
"MIT"
] | 10 | 2016-02-23T09:25:09.000Z | 2020-02-29T14:21:21.000Z | defmodule EctoFixtures.Mixfile do
use Mix.Project
def project do
[app: :ecto_fixtures,
version: "0.0.2",
elixir: "~> 1.2",
name: "Ecto Fixtures",
deps: deps(),
package: package(),
description: description()]
end
# Configuration for the OTP application
#
# Type `mix help c... | 21.901961 | 77 | 0.597135 |
e8073e993cca7939fce0d9a87231a7f915fa1cbb | 4,136 | ex | Elixir | clients/run/lib/google_api/run/v1/model/binding.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/run/lib/google_api/run/v1/model/binding.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/run/lib/google_api/run/v1/model/binding.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... | 78.037736 | 1,972 | 0.749275 |
e807418bf3fedf9d6999ae559ebf4284974098dd | 178 | exs | Elixir | priv/repo/migrations/20210311200419_add_eclrs_version_to_files.exs | RatioPBC/epi-viaduct-nys | 99fb637785ea207aee5449fa01fa59dd18ec8bf2 | [
"MIT"
] | 2 | 2021-06-22T21:01:49.000Z | 2021-11-04T18:36:48.000Z | priv/repo/migrations/20210311200419_add_eclrs_version_to_files.exs | RatioPBC/epi-viaduct-nys | 99fb637785ea207aee5449fa01fa59dd18ec8bf2 | [
"MIT"
] | null | null | null | priv/repo/migrations/20210311200419_add_eclrs_version_to_files.exs | RatioPBC/epi-viaduct-nys | 99fb637785ea207aee5449fa01fa59dd18ec8bf2 | [
"MIT"
] | null | null | null | defmodule NYSETL.Repo.Migrations.AddEclrsVersionToFiles do
use Ecto.Migration
def change do
alter table("files") do
add :eclrs_version, :integer
end
end
end
| 17.8 | 58 | 0.724719 |
e807734d7ea908ed936469dbce99271e4eb9b1f9 | 2,217 | exs | Elixir | test/choicest/comparisons/comparison_test.exs | Cadiac/choicest | e3799e3b80024754c6babb561c1b14f916f92373 | [
"MIT"
] | 1 | 2018-07-01T08:18:20.000Z | 2018-07-01T08:18:20.000Z | test/choicest/comparisons/comparison_test.exs | Cadiac/choicest | e3799e3b80024754c6babb561c1b14f916f92373 | [
"MIT"
] | null | null | null | test/choicest/comparisons/comparison_test.exs | Cadiac/choicest | e3799e3b80024754c6babb561c1b14f916f92373 | [
"MIT"
] | null | null | null | defmodule Choicest.ComparisonsTest do
use Choicest.DataCase
alias Choicest.Core
describe "comparisons" do
alias Choicest.Model.Image
alias Choicest.Model.Comparison
alias Choicest.Model.Collection
@valid_image_attrs %{description: "some description", original_filename: "some original_filename",... | 33.590909 | 173 | 0.706811 |
e80779a3dc2a9de18ca758e125b43c62b9a44ef2 | 31,765 | ex | Elixir | lib/elixir/lib/kernel/typespec.ex | cdfuller/elixir | 3bd3f88d57d7fff6cab7b171294b89fb08eedfe7 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/kernel/typespec.ex | cdfuller/elixir | 3bd3f88d57d7fff6cab7b171294b89fb08eedfe7 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/kernel/typespec.ex | cdfuller/elixir | 3bd3f88d57d7fff6cab7b171294b89fb08eedfe7 | [
"Apache-2.0"
] | null | null | null | defmodule Kernel.Typespec do
@moduledoc false
## Deprecated API moved to Code.Typespec
@doc false
@deprecated "Use Code.Typespec.spec_to_quoted/2 instead"
def spec_to_ast(name, spec) do
Code.Typespec.spec_to_quoted(name, spec)
end
@doc false
@deprecated "Use Code.Typespec.type_to_quoted/1 instead... | 32.883023 | 99 | 0.623328 |
e807aaaebf1d4e0a122401f76db7ff91607a48c8 | 1,184 | exs | Elixir | config/config.exs | pk4media/elixir_device | 54aa60ebc294fb9523ac836cc86705410afda6b5 | [
"MIT"
] | 1 | 2017-02-21T06:17:15.000Z | 2017-02-21T06:17:15.000Z | config/config.exs | pk4media/elixir_device | 54aa60ebc294fb9523ac836cc86705410afda6b5 | [
"MIT"
] | null | null | null | config/config.exs | pk4media/elixir_device | 54aa60ebc294fb9523ac836cc86705410afda6b5 | [
"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
config :device,
empty: :desktop
config :device,
unknown: :phone
# This configuration is loaded before any dependency and is restricted
# to this project. If another project depe... | 32.888889 | 73 | 0.747466 |
e807abf4fb66e8f63df4e12ddc259378928b6adb | 1,034 | ex | Elixir | lib/nostrum/struct/event/channel_pins_update.ex | mckethanor/nostrum | 13a3927c872c1540266e9f1ba4bcad4182baa9bf | [
"MIT"
] | null | null | null | lib/nostrum/struct/event/channel_pins_update.ex | mckethanor/nostrum | 13a3927c872c1540266e9f1ba4bcad4182baa9bf | [
"MIT"
] | null | null | null | lib/nostrum/struct/event/channel_pins_update.ex | mckethanor/nostrum | 13a3927c872c1540266e9f1ba4bcad4182baa9bf | [
"MIT"
] | 1 | 2021-09-13T20:59:42.000Z | 2021-09-13T20:59:42.000Z | defmodule Nostrum.Struct.Event.ChannelPinsUpdate do
@moduledoc "Represents an update to channel pins."
@moduledoc since: "0.5.0"
alias Nostrum.Struct.Channel
alias Nostrum.Struct.Guild
alias Nostrum.Util
defstruct [:guild_id, :channel_id, :last_pin_timestamp]
@typedoc "The ID of the guild, if the pin u... | 27.945946 | 78 | 0.681818 |
e807bd586893c5e670bfea51dbc0b878a6d99d95 | 373 | exs | Elixir | day06/el_a.exs | mason-bially/aoc-2021 | 866ffc7e85f690c2ad9195da2304bfb515819023 | [
"MIT"
] | null | null | null | day06/el_a.exs | mason-bially/aoc-2021 | 866ffc7e85f690c2ad9195da2304bfb515819023 | [
"MIT"
] | null | null | null | day06/el_a.exs | mason-bially/aoc-2021 | 866ffc7e85f690c2ad9195da2304bfb515819023 | [
"MIT"
] | null | null | null | Code.require_file("el.ex", __DIR__)
initial =
File.stream!("day06/input", [encoding: :utf8], 1)
|> Util.stream_comma_seperated
|> Enum.map(&String.trim/1)
|> Stream.map(&elem(Integer.parse(&1), 0))
|> Enum.reduce(%{}, &Util.counter/2)
Enum.reduce(1..80, initial, fn _, acc -> Day06.simulate(acc) end)
|> Enum... | 26.642857 | 65 | 0.632708 |
e807e4c7e8755ac60448e0809f6e41df953c7852 | 3,780 | exs | Elixir | test/ptr_web/controllers/cellar_controller_test.exs | francocatena/ptr | 4c8a960cdcb1c8523334fcc0cddba6b7fb3b3e60 | [
"MIT"
] | null | null | null | test/ptr_web/controllers/cellar_controller_test.exs | francocatena/ptr | 4c8a960cdcb1c8523334fcc0cddba6b7fb3b3e60 | [
"MIT"
] | 2 | 2021-03-09T01:59:47.000Z | 2022-02-10T17:08:54.000Z | test/ptr_web/controllers/cellar_controller_test.exs | francocatena/ptr | 4c8a960cdcb1c8523334fcc0cddba6b7fb3b3e60 | [
"MIT"
] | null | null | null | defmodule PtrWeb.CellarControllerTest do
use PtrWeb.ConnCase
use Ptr.Support.LoginHelper
import Ptr.Support.FixtureHelper
@create_attrs %{identifier: "some identifier", name: "some name"}
@update_attrs %{identifier: "some updated identifier", name: "some updated name"}
@invalid_attrs %{identifier: nil, na... | 30.24 | 89 | 0.643386 |
e807fbff73d951680d3dc792950aae2d68f4728c | 2,476 | ex | Elixir | clients/admin/lib/google_api/admin/datatransfer_v1/model/application.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/datatransfer_v1/model/application.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/datatransfer_v1/model/application.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 38.6875 | 291 | 0.712036 |
e8081aa8ce4bbe3013bb6790669270a4eeb67905 | 44,064 | ex | Elixir | lib/ecto/schema.ex | rbishop/ecto | a8a3215c9e2e35f7556f54c8d47d78a3670796d8 | [
"Apache-2.0"
] | null | null | null | lib/ecto/schema.ex | rbishop/ecto | a8a3215c9e2e35f7556f54c8d47d78a3670796d8 | [
"Apache-2.0"
] | null | null | null | lib/ecto/schema.ex | rbishop/ecto | a8a3215c9e2e35f7556f54c8d47d78a3670796d8 | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.Schema do
@moduledoc ~S"""
Defines a schema for a model.
A schema is a struct with associated metadata that is persisted to a
repository. Every schema model is also a struct, that means that you work
with models just like you would work with structs.
## Example
defmodule User do
... | 34.451916 | 105 | 0.66417 |
e8083053a3e0788836272abf229b522961923354 | 1,866 | exs | Elixir | clients/drive/mix.exs | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/drive/mix.exs | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/drive/mix.exs | 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... | 27.850746 | 150 | 0.65702 |
e80831afbba4ac7780c4fca7be6717411c25cdb7 | 24,326 | ex | Elixir | lib/elixir/lib/uri.ex | hurrycaner/elixir | c54daf97764c222a3ade6c84ac89bacb68abb0fb | [
"Apache-2.0"
] | 1 | 2021-05-05T02:11:24.000Z | 2021-05-05T02:11:24.000Z | lib/elixir/lib/uri.ex | hurrycaner/elixir | c54daf97764c222a3ade6c84ac89bacb68abb0fb | [
"Apache-2.0"
] | 6 | 2021-03-19T12:33:21.000Z | 2021-04-02T17:52:45.000Z | lib/elixir/lib/uri.ex | hurrycaner/elixir | c54daf97764c222a3ade6c84ac89bacb68abb0fb | [
"Apache-2.0"
] | null | null | null | defmodule URI do
@moduledoc """
Utilities for working with URIs.
This module provides functions for working with URIs (for example, parsing
URIs or encoding query strings). The functions in this module are implemented
according to [RFC 3986](https://tools.ietf.org/html/rfc3986).
URIs are structs behind th... | 30.521957 | 105 | 0.623859 |
e80847869325ab852cfec8ab10c93f1350921ab8 | 3,297 | exs | Elixir | apps/service_gather/test/gather_test.exs | NathanielScottStevens/hindsight | 0dda1a931cff85b62eb53d623cc59cdb970ec33a | [
"Apache-2.0"
] | null | null | null | apps/service_gather/test/gather_test.exs | NathanielScottStevens/hindsight | 0dda1a931cff85b62eb53d623cc59cdb970ec33a | [
"Apache-2.0"
] | null | null | null | apps/service_gather/test/gather_test.exs | NathanielScottStevens/hindsight | 0dda1a931cff85b62eb53d623cc59cdb970ec33a | [
"Apache-2.0"
] | null | null | null | defmodule GatherTest do
use Gather.Case
import Mox
import Events, only: [extract_start: 0, extract_end: 0]
import AssertAsync
require Temp.Env
@instance Gather.Application.instance()
@moduletag capture_log: true
alias Gather.Extraction
Temp.Env.modify([
%{
app: :service_gather,
key:... | 24.977273 | 82 | 0.590537 |
e80852516680e5ea206401481a1d42bede0350fe | 3,473 | exs | Elixir | task2/elixir/_success.exs | rolandolucio/kajooly-challenge-001 | 28bd00bb3bc2e610e4eadd7e62921322317bc94e | [
"MIT"
] | 1 | 2021-09-22T05:07:42.000Z | 2021-09-22T05:07:42.000Z | task2/elixir/_success.exs | rolandolucio/kajooly-challenge-001 | 28bd00bb3bc2e610e4eadd7e62921322317bc94e | [
"MIT"
] | null | null | null | task2/elixir/_success.exs | rolandolucio/kajooly-challenge-001 | 28bd00bb3bc2e610e4eadd7e62921322317bc94e | [
"MIT"
] | null | null | null | defmodule Solution do
@moduledoc """
Implementation Details
Aproach: Cahmpion vs Challenger
fixing from fail_3
failed to do it different goin back to the loop loop base
LOCAL ok ~100ms
LEETCODE EXAMPLE TEST CASESES: OK ~363ms
LEETCODE SUBMIT:
Success
Details
Runtime: 446 ms, faster than 100... | 29.184874 | 133 | 0.583933 |
e80866c29e5faa91409dd98f35a3e18fcbdf4b90 | 3,020 | ex | Elixir | lib/code_corps/stripe_service/stripe_connect_card.ex | fikape/code-corps-api | c21674b0b2a19fa26945c94268db8894420ca181 | [
"MIT"
] | 275 | 2015-06-23T00:20:51.000Z | 2021-08-19T16:17:37.000Z | lib/code_corps/stripe_service/stripe_connect_card.ex | fikape/code-corps-api | c21674b0b2a19fa26945c94268db8894420ca181 | [
"MIT"
] | 1,304 | 2015-06-26T02:11:54.000Z | 2019-12-12T21:08:00.000Z | lib/code_corps/stripe_service/stripe_connect_card.ex | fikape/code-corps-api | c21674b0b2a19fa26945c94268db8894420ca181 | [
"MIT"
] | 140 | 2016-01-01T18:19:47.000Z | 2020-11-22T06:24:47.000Z | defmodule CodeCorps.StripeService.StripeConnectCardService do
alias CodeCorps.{Repo, StripeConnectAccount, StripeConnectCard,
StripeConnectCustomer, StripePlatformCard, StripePlatformCustomer}
alias CodeCorps.StripeService.Adapters.StripeConnectCardAdapter
import CodeCorps.MapUtils, only: [rename: 3, keys_to_s... | 39.220779 | 197 | 0.738411 |
e808aaefa8e6637d866d7e50b4d4e9a99fd1bbcf | 8,870 | ex | Elixir | lib/mix/tasks/phx.gen.auth/injector.ex | udanieli/phoenix | 40b79c8d227eadb2af90f19b26c297a87f3b69aa | [
"MIT"
] | null | null | null | lib/mix/tasks/phx.gen.auth/injector.ex | udanieli/phoenix | 40b79c8d227eadb2af90f19b26c297a87f3b69aa | [
"MIT"
] | null | null | null | lib/mix/tasks/phx.gen.auth/injector.ex | udanieli/phoenix | 40b79c8d227eadb2af90f19b26c297a87f3b69aa | [
"MIT"
] | 1 | 2021-06-22T08:06:06.000Z | 2021-06-22T08:06:06.000Z | defmodule Mix.Tasks.Phx.Gen.Auth.Injector do
@moduledoc false
alias Mix.Phoenix.{Context, Schema}
alias Mix.Tasks.Phx.Gen.Auth.HashingLibrary
@type schema :: %Schema{}
@type context :: %Context{schema: schema}
@doc """
Injects a dependency into the contents of mix.exs
"""
@spec mix_dependency_injec... | 33.598485 | 145 | 0.663021 |
e808b69dd74bb76d338c33bb8fa9cd82bf51509a | 1,232 | ex | Elixir | lib/blanks.ex | flowerett/elixir-koans | 174f4610e846f59cc34b41a36b813f5d684fd510 | [
"MIT"
] | 44 | 2018-06-17T03:37:04.000Z | 2022-01-31T06:28:02.000Z | lib/blanks.ex | flowerett/elixir-koans | 174f4610e846f59cc34b41a36b813f5d684fd510 | [
"MIT"
] | 18 | 2018-04-01T10:25:20.000Z | 2021-06-24T09:38:06.000Z | lib/blanks.ex | flowerett/elixir-koans | 174f4610e846f59cc34b41a36b813f5d684fd510 | [
"MIT"
] | 18 | 2018-07-27T17:08:54.000Z | 2022-01-20T09:08:53.000Z | defmodule Blanks do
def replace(ast, replacements) do
replacements = List.wrap(replacements)
ast
|> Macro.prewalk(replacements, &pre/2)
|> elem(0)
end
defp pre({:assert_receive, _, args} = node, replacements) do
{args, replacements} = Macro.prewalk(args, replacements, &pre_pin/2)
{put_ele... | 24.64 | 78 | 0.62987 |
e808dc7a17153d2e8e5379d7bf8048841aa1e454 | 1,309 | exs | Elixir | test/yggdrasil/rabbitmq/connection/generator_test.exs | gmtprime/yggdrasil_rabbitmq | 56345469888ad91f35b2445dab96b7c19217943f | [
"MIT"
] | 3 | 2020-02-21T11:11:10.000Z | 2020-03-12T12:32:39.000Z | test/yggdrasil/rabbitmq/connection/generator_test.exs | gmtprime/yggdrasil_rabbitmq | 56345469888ad91f35b2445dab96b7c19217943f | [
"MIT"
] | null | null | null | test/yggdrasil/rabbitmq/connection/generator_test.exs | gmtprime/yggdrasil_rabbitmq | 56345469888ad91f35b2445dab96b7c19217943f | [
"MIT"
] | null | null | null | defmodule Yggdrasil.RabbitMQ.Connection.GeneratorTest do
use ExUnit.Case
alias AMQP.Channel
alias Yggdrasil.RabbitMQ.Client
alias Yggdrasil.RabbitMQ.Connection.Generator
setup do
client = %Client{pid: self(), tag: :publisher, namespace: __MODULE__}
{:ok, [client: client]}
end
describe "with_cha... | 29.75 | 78 | 0.682964 |
e808e76a9d45efc29d6e2fea2ef8160f34de1451 | 2,624 | ex | Elixir | apps/api_web/lib/date_helpers.ex | fjlanasa/api | c39bc393aea572bfb81754b2ea1adf9dda9ce24a | [
"MIT"
] | 62 | 2019-01-17T12:34:39.000Z | 2022-03-20T21:49:47.000Z | apps/api_web/lib/date_helpers.ex | fjlanasa/api | c39bc393aea572bfb81754b2ea1adf9dda9ce24a | [
"MIT"
] | 375 | 2019-02-13T15:30:50.000Z | 2022-03-30T18:50:41.000Z | apps/api_web/lib/date_helpers.ex | fjlanasa/api | c39bc393aea572bfb81754b2ea1adf9dda9ce24a | [
"MIT"
] | 14 | 2019-01-16T19:35:57.000Z | 2022-02-26T18:55:54.000Z | defmodule DateHelpers do
@moduledoc """
Helper functions for working with dates/times.
"""
# UNIX epoch in gregorian seconds (seconds since year 0)
@gregorian_offset :calendar.datetime_to_gregorian_seconds({{1970, 1, 1}, {0, 0, 0}})
@doc """
Adds a number of seconds to a Date.
The seconds are relative... | 36.957746 | 94 | 0.705412 |
e80914223777237d4a39bca8bf53a500b86aca5b | 2,105 | ex | Elixir | lib/boots_of_speed/server.ex | Baradoy/boots_of_speed | 6004da8fb43e15cb7443e0bd00fe70c936a41015 | [
"MIT"
] | 1 | 2019-04-18T05:10:21.000Z | 2019-04-18T05:10:21.000Z | lib/boots_of_speed/server.ex | Baradoy/boots_of_speed | 6004da8fb43e15cb7443e0bd00fe70c936a41015 | [
"MIT"
] | 3 | 2020-07-16T17:41:44.000Z | 2021-05-08T03:39:49.000Z | lib/boots_of_speed/server.ex | Baradoy/boots_of_speed | 6004da8fb43e15cb7443e0bd00fe70c936a41015 | [
"MIT"
] | null | null | null | defmodule BootsOfSpeed.Server do
@moduledoc """
Handles creating and retrieving game agents
"""
use GenServer
defmodule State do
@moduledoc """
Server state
"""
defstruct supervisor: nil, games: nil, game_state_supervisor: nil
end
def child_spec(arg) do
%{
id: __MODULE__,
... | 24.764706 | 87 | 0.653682 |
e80925c53f444f01d3e0b8d626c7b988e31b6bfa | 7,409 | ex | Elixir | test/support/v1/services/test_two_pool/test_two_worker_entity.ex | noizu/simple_pool | 59251a3391ff82152a31626072955b95f83c18ee | [
"MIT"
] | null | null | null | test/support/v1/services/test_two_pool/test_two_worker_entity.ex | noizu/simple_pool | 59251a3391ff82152a31626072955b95f83c18ee | [
"MIT"
] | null | null | null | test/support/v1/services/test_two_pool/test_two_worker_entity.ex | noizu/simple_pool | 59251a3391ff82152a31626072955b95f83c18ee | [
"MIT"
] | null | null | null | #-------------------------------------------------------------------------------
# Author: Keith Brings
# Copyright (C) 2018 Noizu Labs, Inc. All rights reserved.
#-------------------------------------------------------------------------------
defmodule Noizu.SimplePool.Support.TestTwoWorkerEntity do
@vsn 1.0
#--... | 33.224215 | 123 | 0.498448 |
e809313f50a5038fec73a2aee062ac931808821c | 245 | ex | Elixir | lib/leather_web/views/plaid_item_view.ex | nicksergeant/leather | 15b1c9403999737f7a6ee9a1c0349e047805bbe6 | [
"MIT"
] | 67 | 2016-10-24T04:11:40.000Z | 2021-11-25T16:46:51.000Z | lib/leather_web/views/plaid_item_view.ex | nicksergeant/leather | 15b1c9403999737f7a6ee9a1c0349e047805bbe6 | [
"MIT"
] | 6 | 2017-08-17T21:43:50.000Z | 2021-11-03T13:13:49.000Z | lib/leather_web/views/plaid_item_view.ex | nicksergeant/leather | 15b1c9403999737f7a6ee9a1c0349e047805bbe6 | [
"MIT"
] | 7 | 2017-08-13T01:43:37.000Z | 2022-01-11T04:38:27.000Z | defmodule LeatherWeb.PlaidItemView do
@moduledoc false
use LeatherWeb, :view
def render("plaid_item.json", %{plaid_item: plaid_item}) do
%{
id: plaid_item.id,
institution_name: plaid_item.institution_name
}
end
end
| 18.846154 | 61 | 0.702041 |
e8093cf69b95a5fbdb77eb84c5c2ee31ec4f1579 | 541 | ex | Elixir | lib/covid19_api_web/views/error_view.ex | HenningLanghorst/jhu_csse_covid19_api | 46861f31ce7154f74c377d37a31bd4283524894f | [
"MIT"
] | null | null | null | lib/covid19_api_web/views/error_view.ex | HenningLanghorst/jhu_csse_covid19_api | 46861f31ce7154f74c377d37a31bd4283524894f | [
"MIT"
] | null | null | null | lib/covid19_api_web/views/error_view.ex | HenningLanghorst/jhu_csse_covid19_api | 46861f31ce7154f74c377d37a31bd4283524894f | [
"MIT"
] | null | null | null | defmodule Covid19ApiWeb.ErrorView do
use Covid19ApiWeb, :view
# If you want to customize a particular status code
# for a certain format, you may uncomment below.
# def render("500.json", _assigns) do
# %{errors: %{detail: "Internal Server Error"}}
# end
# By default, Phoenix returns the status messag... | 31.823529 | 83 | 0.722736 |
e80944a7bb57ce33a2c28d7f67ba3e22202c0a17 | 2,944 | ex | Elixir | lib/database/patch.ex | m4ta1l/bors-ng | a4d04fd740e24d03833cd46a76f0f9e5be96f818 | [
"Apache-2.0"
] | 1 | 2020-09-05T11:41:59.000Z | 2020-09-05T11:41:59.000Z | lib/database/patch.ex | m4ta1l/bors-ng | a4d04fd740e24d03833cd46a76f0f9e5be96f818 | [
"Apache-2.0"
] | 15 | 2020-12-11T03:57:12.000Z | 2022-03-27T16:46:53.000Z | lib/database/patch.ex | m4ta1l/bors-ng | a4d04fd740e24d03833cd46a76f0f9e5be96f818 | [
"Apache-2.0"
] | 1 | 2020-04-01T13:34:19.000Z | 2020-04-01T13:34:19.000Z | defmodule BorsNG.Database.Patch do
@moduledoc """
Corresponds to a pull request in GitHub.
A closed patch may not be r+'ed,
nor can a patch associated with a completed batch be r+'ed again,
though a patch may be merged and r+'ed at the same time.
"""
use BorsNG.Database.Model
@type t :: %__MODULE__{}... | 24.949153 | 85 | 0.615829 |
e809566144f69eda25fb57027f042d4dd4cf67c0 | 867 | exs | Elixir | test/ecto/uuid_test.exs | timgestson/ecto | 1c1eb6d322db04cfa48a4fc81da1332e91adbc1f | [
"Apache-2.0"
] | null | null | null | test/ecto/uuid_test.exs | timgestson/ecto | 1c1eb6d322db04cfa48a4fc81da1332e91adbc1f | [
"Apache-2.0"
] | null | null | null | test/ecto/uuid_test.exs | timgestson/ecto | 1c1eb6d322db04cfa48a4fc81da1332e91adbc1f | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.UUIDTest do
use ExUnit.Case, async: true
@test_uuid "601D74E4-A8D3-4B6E-8365-EDDB4C893327"
@test_uuid_binary << 0x60, 0x1D, 0x74, 0xE4, 0xA8, 0xD3, 0x4B, 0x6E, 0x83, 0x65, 0xED, 0xDB, 0x4C, 0x89, 0x33, 0x27 >>
test "cast" do
assert Ecto.UUID.cast(@test_uuid) == {:ok, @test_uuid}
asser... | 32.111111 | 120 | 0.645905 |
e8096ae95799f197ecb9998e03de692267ff7f59 | 1,930 | ex | Elixir | clients/vision/lib/google_api/vision/v1/model/feature.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/vision/lib/google_api/vision/v1/model/feature.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/vision/lib/google_api/vision/v1/model/feature.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 36.415094 | 186 | 0.709845 |
e80977004162623edf66435c894acf3a42b69bce | 44,132 | ex | Elixir | lib/mongo.ex | Virtual-Repetitions/mongodb | eea06db138ae3b4824c7f208fda621075fbf28a7 | [
"Apache-2.0"
] | null | null | null | lib/mongo.ex | Virtual-Repetitions/mongodb | eea06db138ae3b4824c7f208fda621075fbf28a7 | [
"Apache-2.0"
] | 2 | 2021-07-10T18:53:51.000Z | 2021-08-06T15:36:58.000Z | lib/mongo.ex | Virtual-Repetitions/mongodb | eea06db138ae3b4824c7f208fda621075fbf28a7 | [
"Apache-2.0"
] | 3 | 2021-07-10T18:01:00.000Z | 2021-08-05T00:39:17.000Z | defmodule Mongo do
@moduledoc """
The main entry point for doing queries. All functions take a topology to
run the query on.
## Generic options
All operations take these options.
* `:timeout` - The maximum time that the caller is allowed the to hold the
connection’s state (ignored when using a ru... | 34.210853 | 156 | 0.633871 |
e8098318ef23b03e921986030ad8d3faec7eb78f | 1,063 | exs | Elixir | mix.exs | bajankristof/ex_raft | 09c3234355d2792922b17a71e3c32b3e57f0a277 | [
"Apache-2.0"
] | 1 | 2021-08-25T10:49:26.000Z | 2021-08-25T10:49:26.000Z | mix.exs | bajankristof/ex_raft | 09c3234355d2792922b17a71e3c32b3e57f0a277 | [
"Apache-2.0"
] | null | null | null | mix.exs | bajankristof/ex_raft | 09c3234355d2792922b17a71e3c32b3e57f0a277 | [
"Apache-2.0"
] | null | null | null | defmodule ExRaft.MixProject do
use Mix.Project
@version "0.2.1"
@source_url "https://github.com/bajankristof/ex_raft"
def project do
[
app: :ex_raft,
version: @version,
name: "ExRaft",
description: "An Elixir implementation of the raft consensus protocol.",
elixir: "~> 1.12",... | 21.693878 | 78 | 0.569144 |
e809888fc055a0971b5df982cb8d24de1871775c | 312 | exs | Elixir | config/config.exs | ohyecloudy/example-websocket-upbit | e5cf3e165b6cc6403f01064caf6a20ad9fd90053 | [
"MIT"
] | null | null | null | config/config.exs | ohyecloudy/example-websocket-upbit | e5cf3e165b6cc6403f01064caf6a20ad9fd90053 | [
"MIT"
] | null | null | null | config/config.exs | ohyecloudy/example-websocket-upbit | e5cf3e165b6cc6403f01064caf6a20ad9fd90053 | [
"MIT"
] | 1 | 2022-03-30T12:10:31.000Z | 2022-03-30T12:10:31.000Z | import Config
# https://github.com/deadtrickster/prometheus-httpd/blob/master/doc/prometheus_httpd.md
config :prometheus, :prometheus_http,
path: String.to_charlist("/metrics"),
format: :auto,
port: 8081
config :example_websocket_upbit,
tickers: ["KRW-BTC", "KRW-ETH", "KRW-SOL", "KRW-ADA", "KRW-XRP"]
| 28.363636 | 87 | 0.730769 |
e809ba03163e6e39a89cb16d7df40ae9bd5c1aaa | 88 | exs | Elixir | test/tasks/mfa_test.exs | thomas9911/elixir_git_hooks | 01bad3d745921c7d197dfff96e562ba35df5ae46 | [
"MIT"
] | 95 | 2018-05-01T10:37:39.000Z | 2022-03-29T06:51:17.000Z | test/tasks/mfa_test.exs | thomas9911/elixir_git_hooks | 01bad3d745921c7d197dfff96e562ba35df5ae46 | [
"MIT"
] | 84 | 2018-06-11T18:50:37.000Z | 2022-03-28T00:06:28.000Z | test/tasks/mfa_test.exs | thomas9911/elixir_git_hooks | 01bad3d745921c7d197dfff96e562ba35df5ae46 | [
"MIT"
] | 13 | 2019-05-06T09:20:13.000Z | 2022-02-25T20:53:18.000Z | defmodule GitHooks.Tasks.MFATest do
use ExUnit.Case
doctest GitHooks.Tasks.MFA
end
| 14.666667 | 35 | 0.795455 |
e80a0740012833ad6af73aa1810586862f8e1781 | 1,355 | exs | Elixir | mix.exs | revelrylabs/ecto_filters | e5c9718e3582c2ad38ef07a4e7155f746abbac83 | [
"MIT"
] | 10 | 2019-07-30T02:17:28.000Z | 2021-07-20T10:32:17.000Z | mix.exs | revelrylabs/ecto_filters | e5c9718e3582c2ad38ef07a4e7155f746abbac83 | [
"MIT"
] | null | null | null | mix.exs | revelrylabs/ecto_filters | e5c9718e3582c2ad38ef07a4e7155f746abbac83 | [
"MIT"
] | null | null | null | defmodule Ecto.Filters.MixProject do
use Mix.Project
def project do
[
app: :ecto_filters,
version: "0.3.0",
elixir: "~> 1.7",
start_permanent: Mix.env() == :prod,
deps: deps(),
package: package(),
description: description(),
name: "Ecto Filters",
source_url... | 25.566038 | 76 | 0.577122 |
e80a0c71bf2c3a5c2fcea65062a124dc56076478 | 2,430 | exs | Elixir | config/prod.exs | jeantsai/phoenix-admin | 3f954f0c452d385438b616f7e91bc5d66bcc1adc | [
"MIT"
] | null | null | null | config/prod.exs | jeantsai/phoenix-admin | 3f954f0c452d385438b616f7e91bc5d66bcc1adc | [
"MIT"
] | 1 | 2021-03-09T01:41:00.000Z | 2021-03-09T01:41:00.000Z | config/prod.exs | jeantsai/phoenix-admin | 3f954f0c452d385438b616f7e91bc5d66bcc1adc | [
"MIT"
] | 1 | 2019-04-17T17:06:14.000Z | 2019-04-17T17:06:14.000Z | use Mix.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,
# ... | 33.75 | 69 | 0.711111 |
e80a22e7a5edabf90a410de7373c3baa6f4375e2 | 900 | ex | Elixir | web/controllers/api/authentication_controller.ex | cedretaber/bibliotheca | 642ec9908d6d98f16e25b6a482c52e9cbaa21ad2 | [
"MIT"
] | null | null | null | web/controllers/api/authentication_controller.ex | cedretaber/bibliotheca | 642ec9908d6d98f16e25b6a482c52e9cbaa21ad2 | [
"MIT"
] | 22 | 2017-05-15T07:34:08.000Z | 2018-02-25T07:26:18.000Z | web/controllers/api/authentication_controller.ex | cedretaber/bibliotheca | 642ec9908d6d98f16e25b6a482c52e9cbaa21ad2 | [
"MIT"
] | null | null | null | defmodule Bibliotheca.Api.AuthenticationController do
use Bibliotheca.Web, :controller
alias Bibliotheca.Auth.HMAC
alias Bibliotheca.User
import Bibliotheca.Plugs.Authentication, only: [realm: 0, header: 0]
plug :scrub_params, "email" when action in [:login]
plug :scrub_params, "password" when action in ... | 27.272727 | 70 | 0.63 |
e80a241316b23b2ab6eaa901a460a1d4139eaea0 | 780 | exs | Elixir | test/channels/chat_channel_test.exs | outofboundstech/chatbot | a185ff7d6e7ae3f9d12a8b61baffe3d07e1ad069 | [
"FSFUL"
] | null | null | null | test/channels/chat_channel_test.exs | outofboundstech/chatbot | a185ff7d6e7ae3f9d12a8b61baffe3d07e1ad069 | [
"FSFUL"
] | 1 | 2016-05-17T04:53:02.000Z | 2016-05-17T04:53:02.000Z | test/channels/chat_channel_test.exs | outofboundstech/ChatBot | a185ff7d6e7ae3f9d12a8b61baffe3d07e1ad069 | [
"FSFUL"
] | null | null | null | defmodule ChatBot.ChatChannelTest do
use ChatBot.ChannelCase
alias ChatBot.ChatChannel
setup do
{:ok, _, socket} =
socket("user_id", %{some: :assign})
|> subscribe_and_join(ChatChannel, "chats:lobby")
{:ok, socket: socket}
end
test "ping replies with status ok", %{socket: socket} do
... | 26.896552 | 66 | 0.626923 |
e80a249d7fdeaa910c6f17e8fc43e22be8347e8f | 344 | ex | Elixir | lib/tune_web/views/track_view.ex | wojtekmach/tune | 8b38bc629eeafb35aae920ac59b986323de800eb | [
"MIT"
] | 206 | 2020-08-23T17:50:03.000Z | 2022-03-28T04:39:01.000Z | lib/tune_web/views/track_view.ex | wojtekmach/tune | 8b38bc629eeafb35aae920ac59b986323de800eb | [
"MIT"
] | 112 | 2020-08-21T08:26:38.000Z | 2022-03-31T06:11:06.000Z | lib/tune_web/views/track_view.ex | wojtekmach/tune | 8b38bc629eeafb35aae920ac59b986323de800eb | [
"MIT"
] | 15 | 2020-08-25T02:30:23.000Z | 2021-12-16T14:19:35.000Z | defmodule TuneWeb.TrackView do
@moduledoc false
use TuneWeb, :view
alias Tune.Spotify.Schema.{Player, Track}
alias Tune.Link
@spec playing?(Track.t(), Player.t()) :: boolean()
defp playing?(%Track{id: track_id}, %Player{status: :playing, item: %{id: track_id}}),
do: true
defp playing?(_track, _now_... | 24.571429 | 88 | 0.686047 |
e80a28ae8aadf8719bbbb357518bc8961aef7ec3 | 1,487 | ex | Elixir | lib/celery/compilers/farmware_compiler.ex | bahanni/custom_rpi4 | ddefa85d30bacaae40151a63a9a0ebbf4ad30ed5 | [
"MIT"
] | null | null | null | lib/celery/compilers/farmware_compiler.ex | bahanni/custom_rpi4 | ddefa85d30bacaae40151a63a9a0ebbf4ad30ed5 | [
"MIT"
] | null | null | null | lib/celery/compilers/farmware_compiler.ex | bahanni/custom_rpi4 | ddefa85d30bacaae40151a63a9a0ebbf4ad30ed5 | [
"MIT"
] | null | null | null | defmodule FarmbotOS.Celery.Compiler.Farmware do
alias FarmbotOS.Celery.Compiler
def take_photo(%{body: params}, cs_scope) do
execute_script(%{args: %{label: "take-photo"}, body: params}, cs_scope)
end
def execute_script(%{args: %{label: package}, body: params}, cs_scope) do
env =
Enum.map(params... | 33.044444 | 77 | 0.662408 |
e80a719f1eba278838713345b3e7fd52fe4a6e97 | 320 | ex | Elixir | mia_server/lib/mix/tasks/mia.server.ex | SteffenBauer/mia_elixir | 569388b1f9ddd09f8e21a4d9275c42a81d469857 | [
"MIT"
] | null | null | null | mia_server/lib/mix/tasks/mia.server.ex | SteffenBauer/mia_elixir | 569388b1f9ddd09f8e21a4d9275c42a81d469857 | [
"MIT"
] | null | null | null | mia_server/lib/mix/tasks/mia.server.ex | SteffenBauer/mia_elixir | 569388b1f9ddd09f8e21a4d9275c42a81d469857 | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.Mia.Server do
use Mix.Task
@shortdoc "Starts MIA server application"
def run(args) do
Mix.Task.run "run", run_args() ++ args
end
defp run_args do
if iex_running?(), do: [], else: ["--no-halt"]
end
defp iex_running? do
Code.ensure_loaded?(IEx) and IEx.started?
end
end
| 17.777778 | 50 | 0.65625 |
e80a9658e1a26705f3cce08b365a1ff7275c676a | 1,961 | ex | Elixir | clients/genomics/lib/google_api/genomics/v1/model/failed_event.ex | nuxlli/elixir-google-api | ecb8679ac7282b7dd314c3e20c250710ec6a7870 | [
"Apache-2.0"
] | null | null | null | clients/genomics/lib/google_api/genomics/v1/model/failed_event.ex | nuxlli/elixir-google-api | ecb8679ac7282b7dd314c3e20c250710ec6a7870 | [
"Apache-2.0"
] | null | null | null | clients/genomics/lib/google_api/genomics/v1/model/failed_event.ex | nuxlli/elixir-google-api | ecb8679ac7282b7dd314c3e20c250710ec6a7870 | [
"Apache-2.0"
] | 1 | 2020-11-10T16:58:27.000Z | 2020-11-10T16:58:27.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 37.711538 | 257 | 0.746558 |
e80aa7256daf3481dcaf4e9cdec0d6b5233e820f | 156 | ex | Elixir | lib/web/views/email_view.ex | suryatmodulus/accent | 6aaf34075c33f3d9d84d38237af4a39b594eb808 | [
"BSD-3-Clause"
] | 806 | 2018-04-07T20:40:33.000Z | 2022-03-30T01:39:57.000Z | lib/web/views/email_view.ex | suryatmodulus/accent | 6aaf34075c33f3d9d84d38237af4a39b594eb808 | [
"BSD-3-Clause"
] | 194 | 2018-04-07T13:49:37.000Z | 2022-03-30T19:58:45.000Z | lib/web/views/email_view.ex | doc-ai/accent | e337e16f3658cc0728364f952c0d9c13710ebb06 | [
"BSD-3-Clause"
] | 89 | 2018-04-09T13:55:49.000Z | 2022-03-24T07:09:31.000Z | defmodule Accent.EmailView do
use Phoenix.View, root: "lib/web/templates"
import Accent.EmailViewStyleHelper
import Accent.EmailViewConfigHelper
end
| 22.285714 | 45 | 0.814103 |
e80ab443f85cb752ddae637e71a42047bc626e6e | 2,093 | ex | Elixir | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_big_query_table.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_big_query_table.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_big_query_table.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 ... | 36.086207 | 132 | 0.720497 |
e80abb6fe96d91886ac60ebaa78ba4490f30fc73 | 1,329 | ex | Elixir | elixir/lib/homework_web/resolvers/merchants_resolver.ex | eititan/web-homework | d7f6fc170009ef07e709057b9f701bdf44c4ca5b | [
"MIT"
] | null | null | null | elixir/lib/homework_web/resolvers/merchants_resolver.ex | eititan/web-homework | d7f6fc170009ef07e709057b9f701bdf44c4ca5b | [
"MIT"
] | null | null | null | elixir/lib/homework_web/resolvers/merchants_resolver.ex | eititan/web-homework | d7f6fc170009ef07e709057b9f701bdf44c4ca5b | [
"MIT"
] | null | null | null | defmodule HomeworkWeb.Resolvers.MerchantsResolver do
alias Homework.Merchants
@doc """
Get a list of merchants
"""
def merchants(_root, args, _info) do
{:ok, Merchants.list_merchants(args)}
end
@doc """
Get a count of merchants
"""
def merchant_count(_root, _args, _info) do
{:ok, Merchants... | 21.786885 | 64 | 0.619263 |
e80afb183b33ebae9be6c67c08274a0481daee26 | 3,440 | exs | Elixir | test/docdog_web/controllers/auth_controller_test.exs | sobolevn/docdog-engine | 5f7ad60465063fac3d56574f2bf27a4a52d0a91e | [
"MIT"
] | null | null | null | test/docdog_web/controllers/auth_controller_test.exs | sobolevn/docdog-engine | 5f7ad60465063fac3d56574f2bf27a4a52d0a91e | [
"MIT"
] | null | null | null | test/docdog_web/controllers/auth_controller_test.exs | sobolevn/docdog-engine | 5f7ad60465063fac3d56574f2bf27a4a52d0a91e | [
"MIT"
] | null | null | null | defmodule DocdogWeb.AuthControllerTest do
use DocdogWeb.ConnCase
use Plug.Test
@create_attrs_from_github %Ueberauth.Auth{
info: %{
email: "petrov@example.com",
nickname: "petr_petrov",
name: "Petr Petroff",
first_name: "Petr",
last_name: "Petrov",
image: ""
}
}
@i... | 35.463918 | 119 | 0.671802 |
e80b02c8acb395497bd7324b9427741cb5aa700b | 111 | ex | Elixir | lib/webpay/list.ex | keichan34/webpay | 49c8f5df78016632d90e7cdbfc63f34d46c26b1c | [
"MIT"
] | 1 | 2016-05-15T14:09:18.000Z | 2016-05-15T14:09:18.000Z | lib/webpay/list.ex | keichan34/webpay | 49c8f5df78016632d90e7cdbfc63f34d46c26b1c | [
"MIT"
] | null | null | null | lib/webpay/list.ex | keichan34/webpay | 49c8f5df78016632d90e7cdbfc63f34d46c26b1c | [
"MIT"
] | null | null | null | defmodule Webpay.List do
defstruct [{:object, "list"}, :url, :count, :data]
@type t :: %Webpay.List{}
end
| 18.5 | 52 | 0.630631 |
e80b09ac2a250ff67c60987bd4e6aac39e0a5107 | 450 | ex | Elixir | lib/membrane/element/callback_context/prepare.ex | mkaput/membrane-core | f65ae3d847f2c10f3ab20d0c7aa75b0faa274ec7 | [
"Apache-2.0"
] | null | null | null | lib/membrane/element/callback_context/prepare.ex | mkaput/membrane-core | f65ae3d847f2c10f3ab20d0c7aa75b0faa274ec7 | [
"Apache-2.0"
] | null | null | null | lib/membrane/element/callback_context/prepare.ex | mkaput/membrane-core | f65ae3d847f2c10f3ab20d0c7aa75b0faa274ec7 | [
"Apache-2.0"
] | null | null | null | defmodule Membrane.Element.CallbackContext.Prepare do
@moduledoc """
Structure representing a context that is passed to the callback of the element
when it goes into `:prepared` state.
"""
@behaviour Membrane.Element.CallbackContext
@type t :: %__MODULE__{}
defstruct []
@impl true
defmacro from_sta... | 21.428571 | 80 | 0.688889 |
e80b4631a01ae211d45fdca0c3994aae1d021cca | 661 | exs | Elixir | test/accent/transformers/camel_case_test.exs | dconger/accent | f7a76f94f8fd13d96c63ddb3c6fd45b6d2f2aaf7 | [
"MIT"
] | null | null | null | test/accent/transformers/camel_case_test.exs | dconger/accent | f7a76f94f8fd13d96c63ddb3c6fd45b6d2f2aaf7 | [
"MIT"
] | null | null | null | test/accent/transformers/camel_case_test.exs | dconger/accent | f7a76f94f8fd13d96c63ddb3c6fd45b6d2f2aaf7 | [
"MIT"
] | null | null | null | defmodule Accent.Transformer.CamelCaseTest do
use ExUnit.Case
describe "call/2" do
test "converts snake_case to CamelCase" do
assert Accent.Transformer.CamelCase.call("hello_world") == "HelloWorld"
end
test "trims leading and trailing underscores from input" do
assert Accent.Transformer.Ca... | 30.045455 | 79 | 0.726172 |
e80b5d752e8a34266f2491dfc2bbcd0c4634c095 | 1,577 | ex | Elixir | clients/content/lib/google_api/content/v2/model/liasettings_set_pos_data_provider_response.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/content/lib/google_api/content/v2/model/liasettings_set_pos_data_provider_response.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/liasettings_set_pos_data_provider_response.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 33.553191 | 210 | 0.75967 |
e80bc96734d99d416c3c469eadcf8e867066cbbb | 289 | ex | Elixir | lib/api/repo.ex | PetrNikolas/blazeee | 0d97a39b53d19951ccd946b2c4949b054e1487cd | [
"MIT"
] | 17 | 2018-09-18T23:35:26.000Z | 2021-12-05T08:03:23.000Z | lib/api/repo.ex | PetrNikolas/blazeee | 0d97a39b53d19951ccd946b2c4949b054e1487cd | [
"MIT"
] | null | null | null | lib/api/repo.ex | PetrNikolas/blazeee | 0d97a39b53d19951ccd946b2c4949b054e1487cd | [
"MIT"
] | 2 | 2019-07-08T20:43:13.000Z | 2020-03-04T19:11:39.000Z | defmodule Api.Repo do
use Ecto.Repo, otp_app: :api, adapter: Ecto.Adapters.Postgres
@doc """
Dynamically loads the repository url from the
DATABASE_URL environment variable.
"""
def init(_, opts) do
{:ok, Keyword.put(opts, :url, System.get_env("DATABASE_URL"))}
end
end
| 24.083333 | 66 | 0.702422 |
e80bd992e564eac92ab809fa899c6617ddf1c686 | 2,846 | ex | Elixir | lib/flipay/accounts.ex | neofelisho/flipay | 71a03a3f4c859892536faf600b93ff35da82fb88 | [
"MIT"
] | null | null | null | lib/flipay/accounts.ex | neofelisho/flipay | 71a03a3f4c859892536faf600b93ff35da82fb88 | [
"MIT"
] | null | null | null | lib/flipay/accounts.ex | neofelisho/flipay | 71a03a3f4c859892536faf600b93ff35da82fb88 | [
"MIT"
] | null | null | null | defmodule Flipay.Accounts do
@moduledoc """
The Accounts context.
"""
import Ecto.Query, warn: false
import Comeonin.Bcrypt, only: [checkpw: 2, dummy_checkpw: 0]
alias Flipay.Repo
alias Flipay.Accounts.User
alias Flipay.Guardian
@doc """
Returns the list of users.
## Examples
iex> list_... | 19.360544 | 92 | 0.602249 |
e80c2e48aeab7caaf8d6c1a17521cb8f1a2670f9 | 225 | exs | Elixir | config/test.exs | plus-eg/protego | 61e1384a51fbf809f3588b45318cad4106e8116d | [
"MIT"
] | 11 | 2016-06-03T07:32:49.000Z | 2019-11-18T06:41:42.000Z | config/test.exs | plus-eg/protego | 61e1384a51fbf809f3588b45318cad4106e8116d | [
"MIT"
] | 1 | 2017-05-31T18:18:59.000Z | 2019-04-20T13:37:34.000Z | config/test.exs | plus-eg/protego | 61e1384a51fbf809f3588b45318cad4106e8116d | [
"MIT"
] | 2 | 2018-06-06T02:29:44.000Z | 2018-07-09T14:46:13.000Z | use Mix.Config
config :guardian, Guardian,
allowed_algos: ["HS512"],
verify_module: Guardian.JWT,
issuer: "Protego",
ttl: { 30, :days },
verify_issuer: true,
secret_key: "secret_key",
serializer: Protego.GuardianSerializer
| 20.454545 | 38 | 0.755556 |
e80c305e6766d082810cb6d40fc7ff9a638bca9c | 8,126 | exs | Elixir | test/command_runner/test_runner_test.exs | tlux/command_runner | d0a59aba7b1e1020aeeba498656036647bb76d92 | [
"MIT"
] | 1 | 2020-10-12T04:06:57.000Z | 2020-10-12T04:06:57.000Z | test/command_runner/test_runner_test.exs | tlux/command_runner | d0a59aba7b1e1020aeeba498656036647bb76d92 | [
"MIT"
] | null | null | null | test/command_runner/test_runner_test.exs | tlux/command_runner | d0a59aba7b1e1020aeeba498656036647bb76d92 | [
"MIT"
] | null | null | null | defmodule CommandRunner.CommandRunnerTest do
use ExUnit.Case
import CommandRunner.OSProcessHelper
import Liveness
alias CommandRunner.TestRunner
setup do
start_supervised!(TestRunner)
:ok
end
describe "stop/0" do
test "stop associated OS processes" do
task_supervisor = start_supervis... | 28.815603 | 82 | 0.610879 |
e80c33eaa65b13ac550b79ea99d0061b6f9be032 | 3,795 | ex | Elixir | test/support/test_schema.ex | xosdy/ecto_tablestore | bea08b70fcf7a12932e677b63882cfb936956b1a | [
"MIT"
] | null | null | null | test/support/test_schema.ex | xosdy/ecto_tablestore | bea08b70fcf7a12932e677b63882cfb936956b1a | [
"MIT"
] | null | null | null | test/support/test_schema.ex | xosdy/ecto_tablestore | bea08b70fcf7a12932e677b63882cfb936956b1a | [
"MIT"
] | null | null | null | defmodule EctoTablestore.TestSchema.Order do
use EctoTablestore.Schema
import Ecto.Changeset
tablestore_schema "ecto_ots_test_order" do
field(:id, :binary_id, primary_key: true, autogenerate: false)
field(:internal_id, :id, primary_key: true, autogenerate: true)
field(:name, :string)
field(:desc)... | 24.803922 | 79 | 0.705402 |
e80c9e7a85c525a168f6cc4141577fc742a40e16 | 6,726 | exs | Elixir | test/event/handle_event_test.exs | beorc/commanded | 1330585f2c7397e1d4dd5d4789fea85a43ab031b | [
"MIT"
] | null | null | null | test/event/handle_event_test.exs | beorc/commanded | 1330585f2c7397e1d4dd5d4789fea85a43ab031b | [
"MIT"
] | null | null | null | test/event/handle_event_test.exs | beorc/commanded | 1330585f2c7397e1d4dd5d4789fea85a43ab031b | [
"MIT"
] | null | null | null | defmodule Commanded.Event.HandleEventTest do
use Commanded.StorageCase
import Commanded.Enumerable, only: [pluck: 2]
import Commanded.Assertions.EventAssertions
alias Commanded.EventStore
alias Commanded.Event.{AppendingEventHandler, UninterestingEvent}
alias Commanded.Helpers.EventFactory
alias Command... | 31.876777 | 125 | 0.68317 |
e80cad72dc33b644aaabead628cfd6ff23a62456 | 181 | ex | Elixir | lib/contento_web/views/error_view.ex | reubenbrown13/contento | 979831bc9052f810409e969f4d11f15c0e40bb55 | [
"MIT"
] | 95 | 2017-10-03T19:21:57.000Z | 2021-02-15T12:37:37.000Z | lib/contento_web/views/error_view.ex | reubenbrown13/contento | 979831bc9052f810409e969f4d11f15c0e40bb55 | [
"MIT"
] | 20 | 2017-10-10T12:26:54.000Z | 2020-11-12T11:30:36.000Z | lib/contento_web/views/error_view.ex | reubenbrown13/contento | 979831bc9052f810409e969f4d11f15c0e40bb55 | [
"MIT"
] | 17 | 2017-10-04T07:59:40.000Z | 2022-02-09T20:10:09.000Z | defmodule ContentoWeb.ErrorView do
use ContentoWeb, :view
def template_not_found(template, _assigns) do
Phoenix.Controller.status_message_from_template(template)
end
end
| 22.625 | 61 | 0.812155 |
e80cee10d90aeebe438b06757203b746fbbe7a66 | 901 | ex | Elixir | Microsoft.Azure.Management.Network/lib/microsoft/azure/management/network/model/ddos_protection_plan_properties_format.ex | chgeuer/ex_microsoft_azure_management | 99cd9f7f2ff1fdbe69ca5bac55b6e2af91ba3603 | [
"Apache-2.0"
] | 4 | 2018-09-29T03:43:15.000Z | 2021-04-01T18:30:46.000Z | Microsoft.Azure.Management.Network/lib/microsoft/azure/management/network/model/ddos_protection_plan_properties_format.ex | chgeuer/ex_microsoft_azure_management | 99cd9f7f2ff1fdbe69ca5bac55b6e2af91ba3603 | [
"Apache-2.0"
] | null | null | null | Microsoft.Azure.Management.Network/lib/microsoft/azure/management/network/model/ddos_protection_plan_properties_format.ex | chgeuer/ex_microsoft_azure_management | 99cd9f7f2ff1fdbe69ca5bac55b6e2af91ba3603 | [
"Apache-2.0"
] | null | null | null | # NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
defmodule Microsoft.Azure.Management.Network.Model.DdosProtectionPlanPropertiesFormat do
@moduledoc """
DDoS protection plan properties.
"""
@deriv... | 28.15625 | 108 | 0.738069 |
e80d0bdfb256472f33088c2d005d4f7d2d54c415 | 884 | exs | Elixir | test/elixir/test/delayed_commits_test.exs | van-mronov/couchdb | 25838d078b1cf8ef5554f41c0b51d8628ca712ba | [
"Apache-2.0"
] | 1 | 2017-07-05T18:50:12.000Z | 2017-07-05T18:50:12.000Z | test/elixir/test/delayed_commits_test.exs | van-mronov/couchdb | 25838d078b1cf8ef5554f41c0b51d8628ca712ba | [
"Apache-2.0"
] | 1 | 2017-09-05T15:46:20.000Z | 2017-09-05T15:46:20.000Z | test/elixir/test/delayed_commits_test.exs | garrensmith/couchdb | 25838d078b1cf8ef5554f41c0b51d8628ca712ba | [
"Apache-2.0"
] | null | null | null | defmodule DelayedCommitsTest do
use CouchTestCase
@moduledoc """
Test CouchDB delayed commits
This is a port of the delayed_commits.js suite
Note that delayed_commits is deprecated in 2.0, so this is a minimal
test to show it still works. delayed_commits will be removed in 3.0.
"""
@tag config: [
... | 27.625 | 75 | 0.654977 |
e80d5c859448e4e99544d2347476321603e27685 | 3,764 | ex | Elixir | deps/absinthe/lib/absinthe/type/built_ins/scalars.ex | JoakimEskils/elixir-absinthe | d81e24ec7c7b1164e6d152101dd50422f192d7e9 | [
"MIT"
] | 3 | 2017-06-22T16:33:58.000Z | 2021-07-07T15:21:09.000Z | lib/absinthe/type/built_ins/scalars.ex | bruce/absinthe | 19b63d3aaa9fb75aad01ffd5e91d89e0b30d7f91 | [
"MIT"
] | null | null | null | lib/absinthe/type/built_ins/scalars.ex | bruce/absinthe | 19b63d3aaa9fb75aad01ffd5e91d89e0b30d7f91 | [
"MIT"
] | null | null | null | defmodule Absinthe.Type.BuiltIns.Scalars do
use Absinthe.Schema.Notation
@moduledoc false
scalar :integer, name: "Int" do
description """
The `Int` scalar type represents non-fractional signed whole numeric values.
Int can represent values between `-(2^53 - 1)` and `2^53 - 1` since it is
represe... | 28.732824 | 93 | 0.666312 |
e80d61c493669279afb271e9feadf85f6c0c210b | 212 | ex | Elixir | lib/twitter_feed/twitter_api/api.ex | SanketSapkal/elixir-twitter-scraper | 4e00fb2d30d000ac30f0a48c5a2d8e5a18c3b2e0 | [
"MIT"
] | 3 | 2018-07-13T07:13:21.000Z | 2020-11-10T05:14:50.000Z | lib/twitter_feed/twitter_api/api.ex | SanketSapkal/elixir-twitter-scraper | 4e00fb2d30d000ac30f0a48c5a2d8e5a18c3b2e0 | [
"MIT"
] | null | null | null | lib/twitter_feed/twitter_api/api.ex | SanketSapkal/elixir-twitter-scraper | 4e00fb2d30d000ac30f0a48c5a2d8e5a18c3b2e0 | [
"MIT"
] | 2 | 2019-05-22T17:11:51.000Z | 2020-01-07T19:33:59.000Z | defmodule TwitterFeed.TwitterApi.Api do
@moduledoc false
@callback get_home_page(handle :: String.t) :: String.t
@callback get_tweets(handle :: String.t, last_tweet_retrieved :: Integer.t) :: String.t
end
| 30.285714 | 89 | 0.75 |
e80d622f92a009998e850ecbb5595b8e870f226e | 536 | exs | Elixir | test/regressions/i061_void_elements_test.exs | aforward-oss/earmark | b44d4817aa2b4047b07f91d633ae83ed27c695ed | [
"Apache-2.0"
] | null | null | null | test/regressions/i061_void_elements_test.exs | aforward-oss/earmark | b44d4817aa2b4047b07f91d633ae83ed27c695ed | [
"Apache-2.0"
] | null | null | null | test/regressions/i061_void_elements_test.exs | aforward-oss/earmark | b44d4817aa2b4047b07f91d633ae83ed27c695ed | [
"Apache-2.0"
] | null | null | null | defmodule Regressions.I061VoidElementsTest do
use ExUnit.Case
import ExUnit.CaptureIO
@i61_void_elements ~s{<img src="whatever.png">\n**strong**}
test "Issue: https://github.com/pragdave/earmark/issues/61" do
result = Earmark.to_html @i61_void_elements
assert result == ~s[<img src=\"whatever.png\"><p><... | 31.529412 | 83 | 0.705224 |
e80d804452b2d72a8be3cb2727a3a5ac8a280f11 | 9,776 | exs | Elixir | test/mint/http2/frame_test.exs | appcues/xhttp | 488a6ba5fd418a52f697a8d5f377c629ea96af92 | [
"Apache-2.0"
] | null | null | null | test/mint/http2/frame_test.exs | appcues/xhttp | 488a6ba5fd418a52f697a8d5f377c629ea96af92 | [
"Apache-2.0"
] | null | null | null | test/mint/http2/frame_test.exs | appcues/xhttp | 488a6ba5fd418a52f697a8d5f377c629ea96af92 | [
"Apache-2.0"
] | null | null | null | defmodule Mint.HTTP2.FrameTest do
use ExUnit.Case, async: true
use ExUnitProperties
use Bitwise, skip_operators: true
import Mint.HTTP2.Frame, except: [decode_next: 1, encode_raw: 4]
alias Mint.HTTP2.{
Frame,
HPACK
}
test "set_flags/2" do
assert set_flags(:ping, [:ack]) == 0x01
assert ... | 31.74026 | 95 | 0.54286 |
e80d8c728162244d8d757dc4ef0644d168356e03 | 1,650 | ex | Elixir | clients/genomics/lib/google_api/genomics/v1/model/range.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/genomics/lib/google_api/genomics/v1/model/range.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/genomics/lib/google_api/genomics/v1/model/range.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... | 33 | 143 | 0.733333 |
e80e06d270216e76f8717340121d1b118134a1c6 | 512 | ex | Elixir | lib/militerm_web/controllers/session_controller.ex | jgsmith/militerm | c4252d0a93f5620b90750ac2b61baf282e9ef7eb | [
"Apache-2.0"
] | 6 | 2017-06-16T10:26:35.000Z | 2021-04-07T15:01:00.000Z | lib/militerm_web/controllers/session_controller.ex | jgsmith/militerm | c4252d0a93f5620b90750ac2b61baf282e9ef7eb | [
"Apache-2.0"
] | 2 | 2020-04-14T02:17:46.000Z | 2021-03-10T11:09:05.000Z | lib/militerm_web/controllers/session_controller.ex | jgsmith/militerm | c4252d0a93f5620b90750ac2b61baf282e9ef7eb | [
"Apache-2.0"
] | null | null | null | defmodule MilitermWeb.SessionController do
use MilitermWeb, :controller
alias Militerm.Accounts
def auth_session(conn, %{"session_id" => session_id} = _params) do
# let the session service know who logged in for this session
%{id: user_id} = current_user(conn)
case Militerm.Services.Session.authent... | 24.380952 | 79 | 0.650391 |
e80e1a0f5f210338bdc453401deff651e167d0b8 | 1,394 | ex | Elixir | plain-planner/elixir/test/support/data_case.ex | danielmarreirosdeoliveira/prototypes | 047a7d0cae84b31213c06b45304e41a18e0678cb | [
"Apache-2.0"
] | null | null | null | plain-planner/elixir/test/support/data_case.ex | danielmarreirosdeoliveira/prototypes | 047a7d0cae84b31213c06b45304e41a18e0678cb | [
"Apache-2.0"
] | 1 | 2020-05-10T13:37:43.000Z | 2020-05-10T13:37:43.000Z | plain-planner/elixir/test/support/data_case.ex | danielmarreirosdeoliveira/prototypes | 047a7d0cae84b31213c06b45304e41a18e0678cb | [
"Apache-2.0"
] | null | null | null | defmodule Plain.DataCase do
@moduledoc """
This module defines the setup for tests requiring
access to the application's data layer.
You may define functions here to be used as helpers in
your tests.
Finally, if the test case interacts with the database,
it cannot be async. For this reason, every test r... | 25.814815 | 77 | 0.677188 |
e80e38097fc27b1fe86bd9ea68b1ae6746da944a | 1,822 | exs | Elixir | mix.exs | velimir/ex_aws | 2c3b0ae8bb19fbcf65f0515298a0db56ee551dda | [
"MIT"
] | null | null | null | mix.exs | velimir/ex_aws | 2c3b0ae8bb19fbcf65f0515298a0db56ee551dda | [
"MIT"
] | null | null | null | mix.exs | velimir/ex_aws | 2c3b0ae8bb19fbcf65f0515298a0db56ee551dda | [
"MIT"
] | null | null | null | defmodule ExAws.Mixfile do
use Mix.Project
@source_url "https://github.com/ex-aws/ex_aws"
@version "2.2.0"
def project do
[
app: :ex_aws,
version: @version,
elixir: "~> 1.7",
elixirc_paths: elixirc_paths(Mix.env()),
description: "Generic AWS client",
name: "ExAws",
... | 24.293333 | 73 | 0.543908 |
e80e3a17fefcd2fde55afee4dbc497ea22558aec | 2,047 | ex | Elixir | clients/poly/lib/google_api/poly/v1/model/list_liked_assets_response.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/poly/lib/google_api/poly/v1/model/list_liked_assets_response.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/poly/lib/google_api/poly/v1/model/list_liked_assets_response.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 37.907407 | 240 | 0.737176 |
e80e4fe691b4b475e754af8acb6f527aaf0e0e94 | 2,052 | exs | Elixir | config/prod.exs | qhwa/bonfire | 4a368d6d5300539399dcaff167ac69e3165c2bff | [
"MIT"
] | 71 | 2020-03-09T02:09:30.000Z | 2022-03-09T06:10:23.000Z | config/prod.exs | qhwa/bonfire | 4a368d6d5300539399dcaff167ac69e3165c2bff | [
"MIT"
] | null | null | null | config/prod.exs | qhwa/bonfire | 4a368d6d5300539399dcaff167ac69e3165c2bff | [
"MIT"
] | 4 | 2020-04-03T02:28:05.000Z | 2021-11-24T20:07:25.000Z | use Mix.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,
# ... | 36 | 66 | 0.710526 |
e80e73d3d7910ab58c329a10c973492139cb41a9 | 1,583 | ex | Elixir | clients/custom_search/lib/google_api/custom_search/v1/model/context_facets.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/custom_search/lib/google_api/custom_search/v1/model/context_facets.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/custom_search/lib/google_api/custom_search/v1/model/context_facets.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 ... | 29.867925 | 77 | 0.7012 |
e80ea08ebc20945207d317fbe8bae5d2f2d13e7c | 1,637 | exs | Elixir | test/membrane/core/element/lifecycle_controller_test.exs | membraneframework/membrane-core | 096c2546869824c49ad1d7412ffe02d050164611 | [
"Apache-2.0"
] | 515 | 2018-06-18T11:09:44.000Z | 2020-07-31T07:54:35.000Z | test/membrane/core/element/lifecycle_controller_test.exs | membraneframework/membrane-core | 096c2546869824c49ad1d7412ffe02d050164611 | [
"Apache-2.0"
] | 120 | 2018-06-07T08:34:06.000Z | 2020-07-30T07:09:50.000Z | test/membrane/core/element/lifecycle_controller_test.exs | membraneframework/membrane-core | 096c2546869824c49ad1d7412ffe02d050164611 | [
"Apache-2.0"
] | 13 | 2018-07-27T11:58:15.000Z | 2020-05-06T15:19:55.000Z | defmodule Membrane.Core.Element.LifecycleControllerTest do
use ExUnit.Case
alias Membrane.Core.Element.{InputQueue, LifecycleController, State}
alias Membrane.Core.Message
require Membrane.Core.Message
defmodule DummyElement do
use Membrane.Filter
def_output_pad :output, caps: :any
end
setup d... | 25.578125 | 94 | 0.564447 |
e80eaf2b5b2a3a0561bb86031c12022e9976d36c | 837 | ex | Elixir | apps/hefty/lib/hefty/repo/binance/order.ex | Cinderella-Man/crypto-streamer | b1e990d375f7143c5149930be991249f0d9c3ee3 | [
"MIT"
] | 49 | 2019-10-28T22:27:28.000Z | 2021-10-11T06:40:29.000Z | apps/hefty/lib/hefty/repo/binance/order.ex | Cinderella-Man/crypto-streamer | b1e990d375f7143c5149930be991249f0d9c3ee3 | [
"MIT"
] | 9 | 2019-08-30T13:15:36.000Z | 2019-10-10T21:25:14.000Z | apps/hefty/lib/hefty/repo/binance/order.ex | Cinderella-Man/crypto-streamer | b1e990d375f7143c5149930be991249f0d9c3ee3 | [
"MIT"
] | 7 | 2019-10-31T06:19:26.000Z | 2021-09-30T04:20:58.000Z | defmodule Hefty.Repo.Binance.Order do
use Ecto.Schema
@primary_key {:id, :binary_id, autogenerate: true}
schema "orders" do
# belongs_to(:symbol, Hefty.Repo.Binance.Pair, foreign_key: :symbol_id, type: :binary_id)
field(:order_id, :integer)
field(:symbol, :string)
field(:client_order_id, :string... | 26.15625 | 93 | 0.677419 |
e80eb9eefa4775cddf36d1984aee364039c29fae | 3,527 | ex | Elixir | apps/exth_crypto/lib/cipher.ex | InoMurko/ethereum | 282ca2a23a897c5b9684ddf9abae2bf65691b039 | [
"MIT"
] | 22 | 2017-06-22T02:50:34.000Z | 2022-01-26T20:43:21.000Z | apps/exth_crypto/lib/cipher.ex | InoMurko/ethereum | 282ca2a23a897c5b9684ddf9abae2bf65691b039 | [
"MIT"
] | 9 | 2018-10-08T22:56:56.000Z | 2018-10-18T20:41:55.000Z | apps/exth_crypto/lib/cipher.ex | InoMurko/ethereum | 282ca2a23a897c5b9684ddf9abae2bf65691b039 | [
"MIT"
] | 5 | 2018-10-06T16:30:48.000Z | 2022-01-26T20:43:26.000Z | defmodule ExthCrypto.Cipher do
@moduledoc """
Module for symmetric encryption.
"""
@type mode :: :cbc | :ctr | :ecb
@type cipher :: {atom(), integer(), mode}
@type plaintext :: iodata()
@type ciphertext :: binary()
@type init_vector :: binary()
@type stream :: :crypto.stream_state()
@doc """
Enc... | 42.493976 | 197 | 0.721009 |
e80ee3600e8402d430611da1edf234e038756393 | 1,381 | exs | Elixir | test/gateway/jwt/jwt_plug_test.exs | mmacai/reactive-interaction-gateway | edb9262c65b10a8a5dc21ebf326cf73638e97d36 | [
"Apache-2.0"
] | 1 | 2019-11-06T13:35:35.000Z | 2019-11-06T13:35:35.000Z | test/gateway/jwt/jwt_plug_test.exs | mmacai/reactive-interaction-gateway | edb9262c65b10a8a5dc21ebf326cf73638e97d36 | [
"Apache-2.0"
] | null | null | null | test/gateway/jwt/jwt_plug_test.exs | mmacai/reactive-interaction-gateway | edb9262c65b10a8a5dc21ebf326cf73638e97d36 | [
"Apache-2.0"
] | null | null | null | defmodule Gateway.JwtPlugTest do
@moduledoc false
use ExUnit.Case, async: true
use GatewayWeb.ConnCase
test "should return 200 status for authorized /rg/sessions request" do
conn =
setup_conn(["getSessions"])
|> get("/rg/sessions")
assert response(conn, 200) =~ "[]"
end
test "should re... | 28.770833 | 84 | 0.644461 |
e80eecb8d42a2ca9a24f1e96a08d4dbafc8f657b | 74 | exs | Elixir | test/hexa_web/views/page_view_test.exs | libreearth/hexa | 81938c3a5abc710eb16055d73c43cbf60dbf487e | [
"MIT"
] | null | null | null | test/hexa_web/views/page_view_test.exs | libreearth/hexa | 81938c3a5abc710eb16055d73c43cbf60dbf487e | [
"MIT"
] | null | null | null | test/hexa_web/views/page_view_test.exs | libreearth/hexa | 81938c3a5abc710eb16055d73c43cbf60dbf487e | [
"MIT"
] | null | null | null | defmodule HexaWeb.PageViewTest do
use HexaWeb.ConnCase, async: true
end
| 18.5 | 35 | 0.810811 |
e80f059c235ac9617c9cdf05dd795776a37b3142 | 2,149 | ex | Elixir | lib/kvasir/client/consumer.ex | IanLuites/kvasir | fb8e577763bff0736c75d5edd227eaff570e64ea | [
"MIT"
] | 12 | 2019-11-28T10:58:51.000Z | 2022-02-08T18:15:12.000Z | lib/kvasir/client/consumer.ex | IanLuites/kvasir | fb8e577763bff0736c75d5edd227eaff570e64ea | [
"MIT"
] | null | null | null | lib/kvasir/client/consumer.ex | IanLuites/kvasir | fb8e577763bff0736c75d5edd227eaff570e64ea | [
"MIT"
] | null | null | null | defmodule Kvasir.Client.Consumer do
@moduledoc false
require Logger
def consume(config, topic, callback, opts) do
start_consume(config, topic, callback, opts)
end
def stream(config, topic, opts) do
Stream.resource(
fn ->
streamer = self()
start_consume(config, topic, &send(stre... | 25.891566 | 96 | 0.58027 |
e80f0902a4b36a65dc14916e09d42f3e3106650a | 1,590 | exs | Elixir | apps/engine/test/engine/callback_test.exs | omgnetwork/omg-childchain-v2 | 31cc9cf9e42718fc3b9bd6668f24a627cac80b4f | [
"Apache-2.0"
] | 4 | 2020-11-30T17:38:57.000Z | 2021-01-23T21:29:41.000Z | apps/engine/test/engine/callback_test.exs | omgnetwork/omg-childchain-v2 | 31cc9cf9e42718fc3b9bd6668f24a627cac80b4f | [
"Apache-2.0"
] | 24 | 2020-11-30T17:32:48.000Z | 2021-02-22T06:25:22.000Z | apps/engine/test/engine/callback_test.exs | omgnetwork/omg-childchain-v2 | 31cc9cf9e42718fc3b9bd6668f24a627cac80b4f | [
"Apache-2.0"
] | null | null | null | defmodule Engine.CallbackTest do
use Engine.DB.DataCase, async: true
alias Ecto.Multi
alias Engine.Callback
alias Engine.DB.ListenerState
describe "update_listener_height/3" do
test "it stores the listeners new height" do
events = [build(:deposit_event, height: 100)]
Multi.new()
|> Ca... | 28.392857 | 91 | 0.669811 |
e80f1259dd02b240d849a79710e92a6209ef3b1c | 1,880 | ex | Elixir | lib/brando/traits/villain.ex | brandocms/brando | 4198e0c0920031bd909969055064e4e2b7230d21 | [
"MIT"
] | 4 | 2020-10-30T08:40:38.000Z | 2022-01-07T22:21:37.000Z | lib/brando/traits/villain.ex | brandocms/brando | 4198e0c0920031bd909969055064e4e2b7230d21 | [
"MIT"
] | 1,162 | 2020-07-05T11:20:15.000Z | 2022-03-31T06:01:49.000Z | lib/brando/traits/villain.ex | brandocms/brando | 4198e0c0920031bd909969055064e4e2b7230d21 | [
"MIT"
] | null | null | null | defmodule Brando.Trait.Villain do
@moduledoc """
Villain parsing
"""
use Brando.Trait
alias Brando.Exception.ConfigError
alias Ecto.Changeset
alias Brando.Blueprint.Attributes
@type changeset :: Changeset.t()
@type config :: list()
@impl true
def trait_attributes(attributes, _assets, _relations)... | 26.111111 | 126 | 0.65 |
e80f17e31e9ddd86974f5ed6c592856ae1680ae6 | 783 | exs | Elixir | test/langue/json/formatter_test.exs | suryatmodulus/accent | 6aaf34075c33f3d9d84d38237af4a39b594eb808 | [
"BSD-3-Clause"
] | 806 | 2018-04-07T20:40:33.000Z | 2022-03-30T01:39:57.000Z | test/langue/json/formatter_test.exs | suryatmodulus/accent | 6aaf34075c33f3d9d84d38237af4a39b594eb808 | [
"BSD-3-Clause"
] | 194 | 2018-04-07T13:49:37.000Z | 2022-03-30T19:58:45.000Z | test/langue/json/formatter_test.exs | doc-ai/accent | e337e16f3658cc0728364f952c0d9c13710ebb06 | [
"BSD-3-Clause"
] | 89 | 2018-04-09T13:55:49.000Z | 2022-03-24T07:09:31.000Z | defmodule LangueTest.Formatter.Json do
use ExUnit.Case, async: true
Code.require_file("expectation_test.exs", __DIR__)
alias Langue.Formatter.Json
@tests [
Array,
Empty,
NilValue,
EmptyValue,
BooleanValue,
IntegerValue,
FloatValue,
Simple,
Nested,
Complexe,
Placeho... | 24.46875 | 111 | 0.713921 |
e80f34d7a6f165854ee2505a7877fcbe7ca04dc2 | 632 | ex | Elixir | lib/kaffe/partition_selector.ex | jgaviria/kaffe | f7d54086bb7062c62cb012a1f73359843a0a625b | [
"MIT"
] | 130 | 2017-03-31T14:44:34.000Z | 2022-02-14T21:16:40.000Z | lib/kaffe/partition_selector.ex | jgaviria/kaffe | f7d54086bb7062c62cb012a1f73359843a0a625b | [
"MIT"
] | 87 | 2017-04-04T19:47:05.000Z | 2022-03-21T05:27:09.000Z | lib/kaffe/partition_selector.ex | jgaviria/kaffe | f7d54086bb7062c62cb012a1f73359843a0a625b | [
"MIT"
] | 56 | 2017-06-24T13:24:27.000Z | 2022-03-14T12:10:01.000Z | defmodule Kaffe.PartitionSelector do
@doc """
Cycle current from 0 to total-1.
## Examples
iex> Kaffe.PartitionSelector.round_robin(nil, 3)
0
iex> Kaffe.PartitionSelector.round_robin(0, 3)
1
iex> Kaffe.PartitionSelector.round_robin(1, 3)
2
iex> Kaffe.PartitionSelector.round_robin(2, 3)
0
""... | 16.631579 | 50 | 0.639241 |
e80f5b3b8011c7a04e7b93f3ca8fc99b4965ab6f | 2,501 | exs | Elixir | test/phoenix/config_test.exs | benjamintanweihao/phoenix | eb4ef03852f447d67cd61355753147c39b520e1f | [
"MIT"
] | null | null | null | test/phoenix/config_test.exs | benjamintanweihao/phoenix | eb4ef03852f447d67cd61355753147c39b520e1f | [
"MIT"
] | null | null | null | test/phoenix/config_test.exs | benjamintanweihao/phoenix | eb4ef03852f447d67cd61355753147c39b520e1f | [
"MIT"
] | null | null | null | defmodule Phoenix.ConfigTest do
use ExUnit.Case, async: true
import Phoenix.Config
setup meta do
config = [parsers: false, custom: true, otp_app: :phoenix_config]
Application.put_env(:config_app, meta.test, config)
:ok
end
@defaults [static: [at: "/"]]
test "reads configuration from env", met... | 36.246377 | 69 | 0.626549 |
e80f5f0cdfa1881e1ebe862492d969a520abc640 | 1,359 | ex | Elixir | lib/blue_jet/app/goods.ex | freshcom/freshcom-api | 4f2083277943cf4e4e8fd4c4d443c7309f285ad7 | [
"BSD-3-Clause"
] | 44 | 2018-05-09T01:08:57.000Z | 2021-01-19T07:25:26.000Z | lib/blue_jet/app/goods.ex | freshcom/freshcom-api | 4f2083277943cf4e4e8fd4c4d443c7309f285ad7 | [
"BSD-3-Clause"
] | 36 | 2018-05-08T23:59:54.000Z | 2018-09-28T13:50:30.000Z | lib/blue_jet/app/goods.ex | freshcom/freshcom-api | 4f2083277943cf4e4e8fd4c4d443c7309f285ad7 | [
"BSD-3-Clause"
] | 9 | 2018-05-09T14:09:19.000Z | 2021-03-21T21:04:04.000Z | defmodule BlueJet.Goods do
use BlueJet, :context
alias BlueJet.Goods.{Policy, Service}
def list_stockable(req), do: default(req, :list, :stockable, Policy, Service)
def create_stockable(req), do: default(req, :create, :stockable, Policy, Service)
def get_stockable(req), do: default(req, :get, :stockable, Po... | 56.625 | 87 | 0.738043 |
e80f6ff858e4889c4b0b9916becff925002a329a | 404 | ex | Elixir | apps/esperanto/lib/trybe/esperanto/parsers/bold.ex | betrybe/esperanto | 65e40c28914397ef77f5d2c4c29001330beba19f | [
"Apache-2.0"
] | 6 | 2021-07-19T20:00:22.000Z | 2021-11-03T03:27:40.000Z | apps/esperanto/lib/trybe/esperanto/parsers/bold.ex | betrybe/esperanto | 65e40c28914397ef77f5d2c4c29001330beba19f | [
"Apache-2.0"
] | null | null | null | apps/esperanto/lib/trybe/esperanto/parsers/bold.ex | betrybe/esperanto | 65e40c28914397ef77f5d2c4c29001330beba19f | [
"Apache-2.0"
] | null | null | null | defmodule Esperanto.Parsers.Bold do
@moduledoc """
Create a choice tag with all content between ( ) and \n
"""
defmodule BoldBarrier do
@moduledoc """
Bold delimited by `**`
"""
use Esperanto.Barriers.RegexBarrier, delimiter: ~r/^\*\*/
end
use Esperanto.Parsers.Generics.EnclosingTag,
s... | 22.444444 | 61 | 0.660891 |
e80f77b1037fb0abd2bfd9543575174fccaefa64 | 1,019 | ex | Elixir | lib/membrane/buffer/metric/byte_size.ex | eboskma/membrane_core | e216994fe1ba99c5d228a4b0959faa5fabb13b1c | [
"Apache-2.0"
] | null | null | null | lib/membrane/buffer/metric/byte_size.ex | eboskma/membrane_core | e216994fe1ba99c5d228a4b0959faa5fabb13b1c | [
"Apache-2.0"
] | null | null | null | lib/membrane/buffer/metric/byte_size.ex | eboskma/membrane_core | e216994fe1ba99c5d228a4b0959faa5fabb13b1c | [
"Apache-2.0"
] | null | null | null | defmodule Membrane.Buffer.Metric.ByteSize do
@moduledoc """
Implementation of `Membrane.Buffer.Metric` for the `:bytes` unit
"""
@behaviour Membrane.Buffer.Metric
alias Membrane.{Buffer, Payload}
@impl true
def input_buf_preferred_size, do: 65_536
@impl true
def buffers_size(buffers),
do: buff... | 29.114286 | 91 | 0.655545 |
e80f877bf935a02d57a3885b8b4dfb7c206d6420 | 2,402 | ex | Elixir | lib/faker/date.ex | secoint/faker | 36d0a1a38fd4dc5a53e732e16223e64eb54ff305 | [
"MIT"
] | 1 | 2019-02-11T20:46:52.000Z | 2019-02-11T20:46:52.000Z | lib/faker/date.ex | echenim/faker | 15172b7d9c2b7711173a5faf3e45bfc4e45d6a97 | [
"MIT"
] | 40 | 2019-10-26T09:24:17.000Z | 2021-08-03T04:29:01.000Z | lib/faker/date.ex | echenim/faker | 15172b7d9c2b7711173a5faf3e45bfc4e45d6a97 | [
"MIT"
] | null | null | null | defmodule Faker.Date do
import Faker.Util, only: [pick: 1]
@moduledoc """
Functions for generating dates
"""
@doc """
Returns a random date of birth for a person with an age specified by a number or range
"""
@spec date_of_birth(integer | Range.t()) :: Date.t()
def date_of_birth(age_or_range \\ 18..... | 26.988764 | 93 | 0.64363 |
e80f956cbc3a6b5c4a4b3f418e7724c6099ba15e | 947 | ex | Elixir | lib/phoenix_toggl/application.ex | arashm/phoenix-toggl | 3a7b8470c48efdbe84bd9dc29403aea851e90986 | [
"MIT"
] | null | null | null | lib/phoenix_toggl/application.ex | arashm/phoenix-toggl | 3a7b8470c48efdbe84bd9dc29403aea851e90986 | [
"MIT"
] | null | null | null | lib/phoenix_toggl/application.ex | arashm/phoenix-toggl | 3a7b8470c48efdbe84bd9dc29403aea851e90986 | [
"MIT"
] | 1 | 2020-02-14T20:31:58.000Z | 2020-02-14T20:31:58.000Z | defmodule PhoenixToggl.Application 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... | 36.423077 | 90 | 0.721225 |
e80fc8e726c6730e2dcb9d8cbcd2d7df3bfceb6a | 1,847 | exs | Elixir | mix.exs | rxndxm/arangox_ecto | 78ee4cbdff38efdacc0e29049caa799c85bd08e0 | [
"Apache-2.0"
] | null | null | null | mix.exs | rxndxm/arangox_ecto | 78ee4cbdff38efdacc0e29049caa799c85bd08e0 | [
"Apache-2.0"
] | null | null | null | mix.exs | rxndxm/arangox_ecto | 78ee4cbdff38efdacc0e29049caa799c85bd08e0 | [
"Apache-2.0"
] | null | null | null | defmodule ArangoXEcto.MixProject do
use Mix.Project
@version "1.0.0"
@source_url "https://github.com/TomGrozev/arangox_ecto"
def project do
[
app: :arangox_ecto,
version: @version,
elixir: "~> 1.10",
start_permanent: Mix.env() == :prod,
deps: deps(),
# Hex
descrip... | 23.379747 | 93 | 0.538711 |
e80ff1042f56aa6d658e1db31756f638267c3970 | 13,292 | exs | Elixir | test/absinthe/schema/notation_test.exs | hauptbenutzer/absinthe | f1d76e5c249ca337187971b0c96b1870f53716ed | [
"MIT"
] | null | null | null | test/absinthe/schema/notation_test.exs | hauptbenutzer/absinthe | f1d76e5c249ca337187971b0c96b1870f53716ed | [
"MIT"
] | null | null | null | test/absinthe/schema/notation_test.exs | hauptbenutzer/absinthe | f1d76e5c249ca337187971b0c96b1870f53716ed | [
"MIT"
] | 1 | 2018-11-16T02:34:40.000Z | 2018-11-16T02:34:40.000Z | defmodule Absinthe.Schema.NotationTest do
use Absinthe.Case, async: true
@moduletag :pending_schema
describe "arg" do
test "can be under field as an attribute" do
assert_no_notation_error("ArgFieldValid", """
object :foo do
field :picture, :string do
arg :size, :integer
... | 22.760274 | 105 | 0.557102 |
e8100300c4c882cc57210518a0439cac787711cd | 1,232 | ex | Elixir | apps/neoscan_node/lib/neoscan_node.ex | vincentgeneste/neo-scan | 4a654575331eeb3eb12d4fd61696a7bd6dbca3ce | [
"MIT"
] | 75 | 2017-07-23T02:45:32.000Z | 2021-12-13T11:04:17.000Z | apps/neoscan_node/lib/neoscan_node.ex | vincentgeneste/neo-scan | 4a654575331eeb3eb12d4fd61696a7bd6dbca3ce | [
"MIT"
] | 252 | 2017-07-13T19:36:00.000Z | 2021-07-28T18:40:00.000Z | apps/neoscan_node/lib/neoscan_node.ex | vincentgeneste/neo-scan | 4a654575331eeb3eb12d4fd61696a7bd6dbca3ce | [
"MIT"
] | 87 | 2017-07-23T02:45:34.000Z | 2022-03-02T14:54:27.000Z | defmodule NeoscanNode do
@moduledoc false
alias NeoscanNode.NodeChecker
alias NeoscanNode.Utils
@timeout 60_000
def get_last_block_index, do: NodeChecker.get_last_block_index()
def get_live_nodes, do: NodeChecker.get_live_nodes()
def get_block_with_transfers(index) do
node_url = NodeChecker.get_ra... | 28 | 90 | 0.742695 |
e810083820cdf9a7ef98784ef2fe8a44872861f0 | 308 | ex | Elixir | lib/fireball_web/schema/types.ex | Catharz/fireball | bb9f123c0d2d71b16eda01d3838565e6e762de20 | [
"MIT"
] | null | null | null | lib/fireball_web/schema/types.ex | Catharz/fireball | bb9f123c0d2d71b16eda01d3838565e6e762de20 | [
"MIT"
] | null | null | null | lib/fireball_web/schema/types.ex | Catharz/fireball | bb9f123c0d2d71b16eda01d3838565e6e762de20 | [
"MIT"
] | null | null | null | defmodule FireballWeb.Schema.Types do
use Absinthe.Schema.Notation
use Timex
@desc "A time scalar for parsing & serializing dates."
scalar :iso_extended, description: "{ISO:Extended}" do
parse &Timex.format(&1.value, "{ISO:Extended}")
serialize &Timex.parse!(&1, "{ISO:Extended}")
end
end
| 28 | 56 | 0.711039 |
e81012e28dcdd4241d56e7d908fc1050ec2a452e | 1,096 | ex | Elixir | lib/crit/application.ex | jesseshieh/crit19 | 0bba407fea09afed72cbb90ca579ba34c537edef | [
"MIT"
] | null | null | null | lib/crit/application.ex | jesseshieh/crit19 | 0bba407fea09afed72cbb90ca579ba34c537edef | [
"MIT"
] | null | null | null | lib/crit/application.ex | jesseshieh/crit19 | 0bba407fea09afed72cbb90ca579ba34c537edef | [
"MIT"
] | null | null | null | defmodule Crit.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
# List all child processes to be supervised
children = [
# Start the Ecto repository
Crit.Repo,
# S... | 29.621622 | 63 | 0.687956 |
e81020b722f06c10e86bafcf53dc55bdbf837fda | 20,581 | ex | Elixir | lib/surface/api.ex | inspired-consulting/surface | 3a6a3a454704a9aaf83cd23a6393cbd09bdca8bd | [
"MIT"
] | null | null | null | lib/surface/api.ex | inspired-consulting/surface | 3a6a3a454704a9aaf83cd23a6393cbd09bdca8bd | [
"MIT"
] | null | null | null | lib/surface/api.ex | inspired-consulting/surface | 3a6a3a454704a9aaf83cd23a6393cbd09bdca8bd | [
"MIT"
] | null | null | null | defmodule Surface.API do
@moduledoc false
alias Surface.IOHelper
@types [
:any,
:css_class,
:list,
:event,
:boolean,
:string,
:time,
:date,
:datetime,
:naive_datetime,
:number,
:integer,
:decimal,
:map,
:fun,
:atom,
:module,
:changeset,
... | 27.009186 | 140 | 0.613916 |
e810397d61a071549555159843b483d7dcf6f0a6 | 1,382 | ex | Elixir | apps/admin_api/lib/admin_api/v1/auth/provider_auth.ex | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | 1 | 2018-12-07T06:21:21.000Z | 2018-12-07T06:21:21.000Z | apps/admin_api/lib/admin_api/v1/auth/provider_auth.ex | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | null | null | null | apps/admin_api/lib/admin_api/v1/auth/provider_auth.ex | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | null | null | null | defmodule AdminAPI.V1.ProviderAuth do
@moduledoc """
This module takes care of authenticating a provider for websocket connections.
"""
alias EWalletDB.Key
def authenticate(auth) do
auth
|> parse_header()
|> authenticate_access()
end
defp parse_header(auth) do
with header when not is_nil... | 27.64 | 80 | 0.623734 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.