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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ff773a5c4c8dfff47670cedf619ee93acae7df54 | 2,804 | exs | Elixir | test/css_test.exs | nathanjohnson320/elixir-css | 5381cdb16ed6615bef6bfd905b978e3bc713be0e | [
"MIT"
] | null | null | null | test/css_test.exs | nathanjohnson320/elixir-css | 5381cdb16ed6615bef6bfd905b978e3bc713be0e | [
"MIT"
] | null | null | null | test/css_test.exs | nathanjohnson320/elixir-css | 5381cdb16ed6615bef6bfd905b978e3bc713be0e | [
"MIT"
] | null | null | null | defmodule CssTest do
use ExUnit.Case
import Css
doctest Css
test "hover" do
styles = [
display_flex(),
hover [background_color %CssColors.RGB{red: 32, green: 15, blue: 19}]
]
{class, output} = styled(styles)
assert class == "aoGhYVFwgcTVVW"
assert output == "<style>... | 25.724771 | 167 | 0.629458 |
ff777ad2693d4c3965d6e7f27eb5946beb0e8400 | 57 | ex | Elixir | lib/kalbu_web/views/page_view.ex | KalvadTech/kalbu | a814aad1c276b44bc3366b758118795fb590d2df | [
"BSD-3-Clause"
] | null | null | null | lib/kalbu_web/views/page_view.ex | KalvadTech/kalbu | a814aad1c276b44bc3366b758118795fb590d2df | [
"BSD-3-Clause"
] | null | null | null | lib/kalbu_web/views/page_view.ex | KalvadTech/kalbu | a814aad1c276b44bc3366b758118795fb590d2df | [
"BSD-3-Clause"
] | null | null | null | defmodule KalbuWeb.PageView do
use KalbuWeb, :view
end
| 14.25 | 30 | 0.789474 |
ff77a78d0da9e46ec9cc5233c1572adb5c2c30a6 | 4,203 | ex | Elixir | clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/binding.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | 1 | 2021-10-01T09:20:41.000Z | 2021-10-01T09:20:41.000Z | clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/binding.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/binding.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"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... | 79.301887 | 1,972 | 0.75113 |
ff77c1d29aa70b77c786f5cdbbdf2724d6a5404f | 2,631 | exs | Elixir | lib/day13/brick_breaker2.exs | anamba/adventofcode2019 | a5de43ddce8b40f67c3017f349d8563c73c94e20 | [
"MIT"
] | null | null | null | lib/day13/brick_breaker2.exs | anamba/adventofcode2019 | a5de43ddce8b40f67c3017f349d8563c73c94e20 | [
"MIT"
] | null | null | null | lib/day13/brick_breaker2.exs | anamba/adventofcode2019 | a5de43ddce8b40f67c3017f349d8563c73c94e20 | [
"MIT"
] | null | null | null | # to run:
# elixir -r lib/day11/intcode_interpreter.ex lib/day13/brick_breaker2.exs
defmodule Day13.BrickBreaker2 do
def part2 do
pid = read_program() |> start_program
clear_screen()
{_vram, score} = iterate(pid)
score
end
def read_program do
"inputs/day13a.txt"
|> File.stream!()
|>... | 24.137615 | 96 | 0.477765 |
ff77e04b81c04a5ec75162ce940ae3d84f95466d | 574 | exs | Elixir | examples/udp_example/mix.exs | shun159/brahman | dfa04d757c4e4422b00bdc97a694d2d6637708f9 | [
"Beerware"
] | null | null | null | examples/udp_example/mix.exs | shun159/brahman | dfa04d757c4e4422b00bdc97a694d2d6637708f9 | [
"Beerware"
] | null | null | null | examples/udp_example/mix.exs | shun159/brahman | dfa04d757c4e4422b00bdc97a694d2d6637708f9 | [
"Beerware"
] | null | null | null | defmodule UdpExample.MixProject do
use Mix.Project
def project do
[
app: :udp_example,
version: "0.1.0",
elixir: "~> 1.7",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
def application do
[
extra_applications: [:logger, :brahman],
mod: {UdpExampl... | 19.793103 | 63 | 0.554007 |
ff7842201668d69bbd79a7ad80d18433990aa8d6 | 1,423 | exs | Elixir | test/bsv_p2p/util/services_test.exs | slashrsm/bsv_p2p | 59e8971c0f107e71ba38a295f07a0a30699e0ed5 | [
"MIT"
] | 1 | 2021-12-07T13:28:54.000Z | 2021-12-07T13:28:54.000Z | test/bsv_p2p/util/services_test.exs | slashrsm/bsv_p2p | 59e8971c0f107e71ba38a295f07a0a30699e0ed5 | [
"MIT"
] | null | null | null | test/bsv_p2p/util/services_test.exs | slashrsm/bsv_p2p | 59e8971c0f107e71ba38a295f07a0a30699e0ed5 | [
"MIT"
] | null | null | null | defmodule BsvP2p.Util.ServicesTest do
use ExUnit.Case
alias BsvP2p.Util.Services
test "BsvP2p.Util.Services.get_payload/1" do
assert <<1, 0, 0, 0, 0, 0, 0, 0>> == Services.get_payload([:node_network])
assert <<2, 0, 0, 0, 0, 0, 0, 0>> == Services.get_payload([:node_getutxo])
assert <<4, 0, 0, 0, 0, 0... | 38.459459 | 87 | 0.583978 |
ff786155d6a05365894ffc16602328321e19112f | 8,554 | ex | Elixir | deps/earmark/lib/earmark/html_renderer.ex | lgandersen/jocker_dist | b5e676f8d9e60bbc8bc7a82ccd1e05389f2cd5b5 | [
"BSD-2-Clause"
] | null | null | null | deps/earmark/lib/earmark/html_renderer.ex | lgandersen/jocker_dist | b5e676f8d9e60bbc8bc7a82ccd1e05389f2cd5b5 | [
"BSD-2-Clause"
] | null | null | null | deps/earmark/lib/earmark/html_renderer.ex | lgandersen/jocker_dist | b5e676f8d9e60bbc8bc7a82ccd1e05389f2cd5b5 | [
"BSD-2-Clause"
] | null | null | null | defmodule Earmark.HtmlRenderer do
@moduledoc false
alias Earmark.Block
alias Earmark.Context
alias Earmark.Options
import Earmark.Inline, only: [convert: 3]
import Earmark.Helpers, only: [escape: 2]
import Earmark.Helpers.HtmlHelpers
import Earmark.Message, only: [add_messages_from: 2, get_messages: 1,... | 29.804878 | 104 | 0.576572 |
ff7882ee7bd2c250064060fbfacc18afc798fac2 | 421 | ex | Elixir | lib/hlcid/application.ex | davydog187/hlcid | 1e7060676df22568e6b7dbe08be1716e25e8d58c | [
"MIT"
] | 10 | 2019-08-25T16:07:40.000Z | 2021-07-13T19:08:48.000Z | lib/hlcid/application.ex | davydog187/hlcid | 1e7060676df22568e6b7dbe08be1716e25e8d58c | [
"MIT"
] | 6 | 2021-11-22T10:23:01.000Z | 2022-03-23T11:07:00.000Z | lib/hlcid/application.ex | elixir-toniq/hlcid | 3761b7641feb419e4c4ede4adeb946645ecbb23b | [
"MIT"
] | 2 | 2020-09-10T22:57:59.000Z | 2021-05-19T21:34:15.000Z | defmodule HLCID.Application do
@moduledoc false
use Application
def start(_type, _args) do
node_id = gen_node_id()
children = [
{HLClock, name: HLCID.Clock, node_id: node_id}
]
opts = [strategy: :one_for_one, name: HLCID.Supervisor]
Supervisor.start_link(children, opts)
end
defp... | 18.304348 | 59 | 0.669834 |
ff78a19099b7a2abb1627c09277bbbdc8f51e619 | 11,064 | exs | Elixir | test/taglet_test.exs | GoCorus/taglet | eddc781f1ddff16e43ddbc97d94fe8976a135923 | [
"Apache-2.0"
] | null | null | null | test/taglet_test.exs | GoCorus/taglet | eddc781f1ddff16e43ddbc97d94fe8976a135923 | [
"Apache-2.0"
] | null | null | null | test/taglet_test.exs | GoCorus/taglet | eddc781f1ddff16e43ddbc97d94fe8976a135923 | [
"Apache-2.0"
] | null | null | null | defmodule TagletTest do
alias Ecto.Adapters.SQL
alias TagletPost, as: Post
alias Taglet.{Tagging, Tag}
import Ecto.Query
import Ecto.Query
import Mix.Ecto, only: [build_repo_priv: 1]
use ExUnit.Case
@repo Taglet.RepoClient.repo()
@tenant_id "example_tenant"
doctest Taglet
setup do
# Regul... | 33.93865 | 117 | 0.652205 |
ff78d14cff479b7f5cadef29ee9328216349b337 | 12,545 | ex | Elixir | lib/radiator/directory/editor/manager.ex | bhtabor/radiator | 39c137a18d36d6f418f9d1ffb7aa2c99011d66cf | [
"MIT"
] | 92 | 2019-01-03T11:46:23.000Z | 2022-02-19T21:28:44.000Z | lib/radiator/directory/editor/manager.ex | bhtabor/radiator | 39c137a18d36d6f418f9d1ffb7aa2c99011d66cf | [
"MIT"
] | 350 | 2019-04-11T07:55:51.000Z | 2021-08-03T11:19:05.000Z | lib/radiator/directory/editor/manager.ex | bhtabor/radiator | 39c137a18d36d6f418f9d1ffb7aa2c99011d66cf | [
"MIT"
] | 10 | 2019-04-18T12:47:27.000Z | 2022-01-25T20:49:15.000Z | defmodule Radiator.Directory.Editor.Manager do
@moduledoc """
Manipulation of data with the assumption that the user has
the :manage permission to the entity.
"""
import Ecto.Query, warn: false
alias Ecto.Multi
alias Radiator.Repo
alias Radiator.Support
alias Radiator.Media.AudioFile
alias Radiat... | 25.919421 | 112 | 0.637465 |
ff7913598e6904d5357bb618eb480788c9023099 | 33,844 | exs | Elixir | test/phoenix_live_view/html_engine_test.exs | nickolaich/phoenix_live_view | 2e9db09b11d42fabfd5a388980ff2b15d11da527 | [
"MIT"
] | null | null | null | test/phoenix_live_view/html_engine_test.exs | nickolaich/phoenix_live_view | 2e9db09b11d42fabfd5a388980ff2b15d11da527 | [
"MIT"
] | null | null | null | test/phoenix_live_view/html_engine_test.exs | nickolaich/phoenix_live_view | 2e9db09b11d42fabfd5a388980ff2b15d11da527 | [
"MIT"
] | null | null | null | defmodule Phoenix.LiveView.HTMLEngineTest do
use ExUnit.Case, async: true
import Phoenix.LiveView.Helpers,
only: [sigil_H: 2, render_slot: 1, render_slot: 2]
alias Phoenix.LiveView.HTMLEngine
alias Phoenix.LiveView.HTMLTokenizer.ParseError
defp eval(string, assigns \\ %{}, opts \\ []) do
opts =
... | 28.016556 | 120 | 0.53262 |
ff7913b2c3c32a7872c8fa5ad223bb0df96a0ba0 | 205 | exs | Elixir | elixir/phoenix_socket/test/controllers/page_controller_test.exs | BStudent/SPANC-websocket-shootout | 44353f1b9bf87ba7017b2788d876e732b410b4c4 | [
"MIT"
] | 421 | 2016-09-01T14:16:04.000Z | 2022-03-11T14:22:29.000Z | elixir/phoenix_socket/test/controllers/page_controller_test.exs | BStudent/SPANC-websocket-shootout | 44353f1b9bf87ba7017b2788d876e732b410b4c4 | [
"MIT"
] | 48 | 2016-09-01T23:10:37.000Z | 2020-10-28T14:34:47.000Z | elixir/phoenix_socket/test/controllers/page_controller_test.exs | thewillhuang/websocket-shootout | d9046f341dc2a1ed54be5e734a546b392db09b05 | [
"MIT"
] | 84 | 2016-09-01T14:37:39.000Z | 2021-11-10T16:46:13.000Z | defmodule PhoenixSocket.PageControllerTest do
use PhoenixSocket.ConnCase
test "GET /", %{conn: conn} do
conn = get conn, "/"
assert html_response(conn, 200) =~ "Welcome to Phoenix!"
end
end
| 22.777778 | 60 | 0.692683 |
ff7927462cd21819a4c2dbdc3b19250af9d423aa | 1,496 | ex | Elixir | clients/sheets/lib/google_api/sheets/v4/model/add_chart_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/sheets/lib/google_api/sheets/v4/model/add_chart_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/sheets/lib/google_api/sheets/v4/model/add_chart_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 31.829787 | 110 | 0.740642 |
ff795e413f393943aa07d67e60b88594f41113d7 | 267 | exs | Elixir | priv/repo/migrations/20201204003445_add_interview_discontinue_columns_to_exposures.exs | geometricservices/epi-viewpoin | ecb5316ea0f3f7299d5ff63e2de588539005ac1c | [
"Apache-2.0"
] | 5 | 2021-02-25T18:43:09.000Z | 2021-02-27T06:00:35.000Z | priv/repo/migrations/20201204003445_add_interview_discontinue_columns_to_exposures.exs | geometricservices/epi-viewpoint | ecb5316ea0f3f7299d5ff63e2de588539005ac1c | [
"Apache-2.0"
] | 3 | 2021-12-13T17:52:47.000Z | 2021-12-17T01:35:31.000Z | priv/repo/migrations/20201204003445_add_interview_discontinue_columns_to_exposures.exs | geometricservices/epi-viewpoint | ecb5316ea0f3f7299d5ff63e2de588539005ac1c | [
"Apache-2.0"
] | 1 | 2022-01-27T23:26:38.000Z | 2022-01-27T23:26:38.000Z | defmodule Epicenter.Repo.Migrations.AddInterviewDiscontinueColumnsToExposures do
use Ecto.Migration
def change do
alter table(:exposures) do
add :interview_discontinued_at, :utc_datetime
add :interview_discontinue_reason, :text
end
end
end
| 24.272727 | 80 | 0.775281 |
ff7967aa7aa11e4ab6fc9bd99e32fa894f825e69 | 406 | ex | Elixir | webrtc/auth/lib/auth/user_manager/guardian.ex | membraneframework/videoroom_advanced | d5bfbcec7558bb7ddd4f74742c0d842e5d759b21 | [
"Apache-2.0"
] | 84 | 2020-08-01T14:57:29.000Z | 2022-03-27T13:28:23.000Z | webrtc/auth/lib/auth/user_manager/guardian.ex | membraneframework/videoroom_advanced | d5bfbcec7558bb7ddd4f74742c0d842e5d759b21 | [
"Apache-2.0"
] | 75 | 2020-08-24T08:01:53.000Z | 2022-03-17T10:41:22.000Z | webrtc/auth/lib/auth/user_manager/guardian.ex | membraneframework/videoroom_advanced | d5bfbcec7558bb7ddd4f74742c0d842e5d759b21 | [
"Apache-2.0"
] | 17 | 2020-09-15T21:04:23.000Z | 2022-03-31T07:43:48.000Z | defmodule Example.Auth.UserManager.Guardian do
@moduledoc false
use Guardian, otp_app: :example_auth
alias Example.Auth.UserManager
def subject_for_token(user, _claims) do
{:ok, to_string(user.id)}
end
def resource_from_claims(%{"sub" => id}) do
case UserManager.get_user(id) do
nil ->
... | 19.333333 | 46 | 0.657635 |
ff7988e1c9330956a63a23308e96b97b937f8d21 | 4,499 | ex | Elixir | lib/peluquero/utils.ex | facundokantox/peluquero | 16e54ad00016858b925313fa20eb38310b18718f | [
"MIT"
] | 12 | 2017-06-22T16:41:17.000Z | 2022-01-08T09:52:40.000Z | lib/peluquero/utils.ex | facundokantox/peluquero | 16e54ad00016858b925313fa20eb38310b18718f | [
"MIT"
] | 4 | 2017-11-24T05:03:31.000Z | 2020-11-03T11:41:12.000Z | lib/peluquero/utils.ex | facundokantox/peluquero | 16e54ad00016858b925313fa20eb38310b18718f | [
"MIT"
] | 1 | 2020-11-02T17:26:14.000Z | 2020-11-02T17:26:14.000Z | defmodule Peluquero.Utils do
@moduledoc "Plain utilities for the project"
require Logger
@joiner "/"
@max_match 20
@doc ~S"""
Quick check for the consul key.
## Examples
iex> Peluquero.Utils.consul_key_type("a/b/c/")
{:nested, :bag, "a"}
iex> Peluquero.Utils.consul_key_type... | 31.683099 | 91 | 0.533452 |
ff79924a8b43cfb7a60e6f1c4e956bb4c5423800 | 671 | exs | Elixir | config/test.exs | evanbattaglia/livewords | c1324cde64e6d7873942e24a473feb16482c9fbb | [
"MIT"
] | null | null | null | config/test.exs | evanbattaglia/livewords | c1324cde64e6d7873942e24a473feb16482c9fbb | [
"MIT"
] | null | null | null | config/test.exs | evanbattaglia/livewords | c1324cde64e6d7873942e24a473feb16482c9fbb | [
"MIT"
] | null | null | null | use Mix.Config
# Configure your database
#
# The MIX_TEST_PARTITION environment variable can be used
# to provide built-in test partitioning in CI environment.
# Run `mix help test` for more information.
config :livewords, Livewords.Repo,
username: "postgres",
password: "postgres",
database: "livewords_test#{Sys... | 29.173913 | 68 | 0.752608 |
ff79a8a0480bdac1a6d49eba5855ca7b28e83d97 | 2,810 | ex | Elixir | web/views/admin/checkout_view.ex | harry-gao/ex-cart | 573e7f977bb3b710d11618dd215d4ddd8f819fb3 | [
"Apache-2.0"
] | 356 | 2016-03-16T12:37:28.000Z | 2021-12-18T03:22:39.000Z | web/views/admin/checkout_view.ex | harry-gao/ex-cart | 573e7f977bb3b710d11618dd215d4ddd8f819fb3 | [
"Apache-2.0"
] | 30 | 2016-03-16T09:19:10.000Z | 2021-01-12T08:10:52.000Z | web/views/admin/checkout_view.ex | harry-gao/ex-cart | 573e7f977bb3b710d11618dd215d4ddd8f819fb3 | [
"Apache-2.0"
] | 72 | 2016-03-16T13:32:14.000Z | 2021-03-23T11:27:43.000Z | defmodule Nectar.Admin.CheckoutView do
use Nectar.Web, :view
alias Nectar.Repo
alias Nectar.CheckoutManager
import Ecto.Query
def country_names_and_ids do
[{"--Select Country--", ""} | Repo.all(from c in Nectar.Country, select: {c.name, c.id})]
end
def state_names_and_ids do
[{"--Select State--... | 29.578947 | 114 | 0.695374 |
ff79d5b8afae75afd4fbb0291476da948fa4efee | 66 | exs | Elixir | learning/programming_elixir/appendix_2/simple/test/simple_test.exs | Mdlkxzmcp/various_elixir | c87527b7118a0c74a042073c04d2228025888ddf | [
"MIT"
] | 2 | 2020-01-20T20:15:20.000Z | 2020-02-27T11:08:42.000Z | learning/programming_elixir/appendix_2/simple/test/simple_test.exs | Mdlkxzmcp/various_elixir | c87527b7118a0c74a042073c04d2228025888ddf | [
"MIT"
] | null | null | null | learning/programming_elixir/appendix_2/simple/test/simple_test.exs | Mdlkxzmcp/various_elixir | c87527b7118a0c74a042073c04d2228025888ddf | [
"MIT"
] | null | null | null | defmodule SimpleTest do
use ExUnit.Case
doctest Simple
end
| 11 | 23 | 0.757576 |
ff7a3415510bb1b717fe59e3b5cdd0358151ea65 | 510 | ex | Elixir | lib/segment/http.ex | joshsmith/segment_elixir | 0cf5548b805cdfcaf547b9d213173388a7ea2005 | [
"MIT"
] | 2 | 2019-05-10T13:20:39.000Z | 2019-05-10T15:08:21.000Z | lib/segment/http.ex | joshsmith/segment_elixir | 0cf5548b805cdfcaf547b9d213173388a7ea2005 | [
"MIT"
] | 7 | 2019-05-10T15:28:18.000Z | 2019-06-13T16:44:59.000Z | lib/segment/http.ex | joshsmith/segment_elixir | 0cf5548b805cdfcaf547b9d213173388a7ea2005 | [
"MIT"
] | 1 | 2019-05-24T18:41:57.000Z | 2019-05-24T18:41:57.000Z | defmodule Segment.Http do
use HTTPoison.Base
@base_url "https://api.segment.io/v1/"
def process_url(url) do
@base_url <> url
end
def process_request_options(options) do
Keyword.merge(options, [hackney: [basic_auth: {write_key(), ""}]])
end
def process_request_headers(headers) do
headers
... | 21.25 | 70 | 0.686275 |
ff7a49460d473fd408b9cf6a08b1e491ec652984 | 907 | ex | Elixir | lib/metrics/adapter/memory.ex | cloud8421/gig | a2bc5d004ae8b11a92e971c043de3e544fcfbfcf | [
"MIT"
] | null | null | null | lib/metrics/adapter/memory.ex | cloud8421/gig | a2bc5d004ae8b11a92e971c043de3e544fcfbfcf | [
"MIT"
] | null | null | null | lib/metrics/adapter/memory.ex | cloud8421/gig | a2bc5d004ae8b11a92e971c043de3e544fcfbfcf | [
"MIT"
] | null | null | null | defmodule Metrics.Adapter.Memory do
@moduledoc false
@behaviour Metrics.Adapter
def state do
Agent.get(__MODULE__, fn(s) -> s end)
end
def start_link(state) do
Agent.start_link(fn() -> state end, name: __MODULE__)
end
def child_spec(state) do
%{id: __MODULE__,
start: {__MODULE__, :st... | 20.155556 | 57 | 0.546858 |
ff7a8545140f47c078ff79e46f3711d1ecbe275b | 2,091 | ex | Elixir | clients/sql_admin/lib/google_api/sql_admin/v1/model/generate_ephemeral_cert_request.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/sql_admin/lib/google_api/sql_admin/v1/model/generate_ephemeral_cert_request.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/sql_admin/lib/google_api/sql_admin/v1/model/generate_ephemeral_cert_request.ex | dazuma/elixir-google-api | 6a9897168008efe07a6081d2326735fe332e522c | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 37.339286 | 138 | 0.717838 |
ff7aaa5649e3b948512457ca48781a05eb01f2d8 | 1,722 | exs | Elixir | test/bow/exec_test.exs | kianmeng/bow | d0b2ad564b0ccd06eb7d4582b94177877559d4af | [
"MIT"
] | 25 | 2017-10-06T14:22:13.000Z | 2022-01-14T20:59:59.000Z | test/bow/exec_test.exs | kianmeng/bow | d0b2ad564b0ccd06eb7d4582b94177877559d4af | [
"MIT"
] | 9 | 2017-10-30T06:02:22.000Z | 2022-01-03T13:57:57.000Z | test/bow/exec_test.exs | kianmeng/bow | d0b2ad564b0ccd06eb7d4582b94177877559d4af | [
"MIT"
] | 4 | 2018-03-29T12:59:10.000Z | 2021-09-19T09:10:01.000Z | defmodule Bow.ExecTest do
use ExUnit.Case
@file_cat "test/files/cat.jpg"
import Bow.Exec, only: [exec: 3, exec: 4]
setup do
source = Bow.new(path: @file_cat)
target = Bow.set(source, :name, "thumb_#{source.name}")
{:ok, source: source, target: target}
end
test "successful command", %{source... | 30.210526 | 98 | 0.629501 |
ff7ac35c0ea3b97f60c32bd7ae9c588a9d5f414e | 1,619 | exs | Elixir | test/farside_test.exs | TrueMysterious/farside | 3c0d560007d29605875fe0d754a84aea042b1164 | [
"MIT"
] | null | null | null | test/farside_test.exs | TrueMysterious/farside | 3c0d560007d29605875fe0d754a84aea042b1164 | [
"MIT"
] | null | null | null | test/farside_test.exs | TrueMysterious/farside | 3c0d560007d29605875fe0d754a84aea042b1164 | [
"MIT"
] | null | null | null | defmodule FarsideTest do
@services_json Application.fetch_env!(:farside, :services_json)
use ExUnit.Case
use Plug.Test
alias Farside.Router
@opts Router.init([])
def test_conn(path) do
:timer.sleep(1000)
:get
|> conn(path, "")
|> Router.call(@opts)
end
test "throttle" do
:get
... | 21.302632 | 65 | 0.592341 |
ff7ac62abdd65ccc7a83be84e0002e3e4c5c5d1c | 1,513 | ex | Elixir | elixir/lib/astrum/domains/auth/auth.ex | explore-astrum/astrum | 868fa6d28e1c44d0a99a72edc7f6b5b7d818da07 | [
"MIT"
] | 2 | 2019-01-21T17:49:19.000Z | 2019-06-20T03:01:06.000Z | elixir/lib/astrum/domains/auth/auth.ex | explore-astrum/astrum | 868fa6d28e1c44d0a99a72edc7f6b5b7d818da07 | [
"MIT"
] | 1 | 2022-01-27T16:05:47.000Z | 2022-01-27T16:05:47.000Z | elixir/lib/astrum/domains/auth/auth.ex | explore-astrum/astrum | 868fa6d28e1c44d0a99a72edc7f6b5b7d818da07 | [
"MIT"
] | null | null | null | defmodule Astrum.Auth do
use Kora.Interceptor
def validate(data, user, path, history) when is_map(data) do
data
|> Enum.flat_map(fn {key, value} ->
next_path = path ++ [key]
case validate_merge(next_path, value, user) do
res = {:error, _err} ->
[res]
nil ->
... | 22.58209 | 83 | 0.555188 |
ff7ac78591cf807a49d2061f14abb9d6f37a21bb | 2,072 | exs | Elixir | example/config/dev.exs | JohnKacz/phoenix_datatables | 747b184972614d87aeb0cd644593951703d718db | [
"MIT"
] | null | null | null | example/config/dev.exs | JohnKacz/phoenix_datatables | 747b184972614d87aeb0cd644593951703d718db | [
"MIT"
] | null | null | null | example/config/dev.exs | JohnKacz/phoenix_datatables | 747b184972614d87aeb0cd644593951703d718db | [
"MIT"
] | null | null | null | use Mix.Config
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with brunch.io to recompile .js and .css sources.
config :phoenix_datatables_example, PhoenixDatatablesEx... | 36.350877 | 170 | 0.726834 |
ff7aca5abd4c5337be7d8c01a089d16d6c0ce48c | 67 | exs | Elixir | test/test_helper.exs | abotkit/teddy | 72f1c7015a278d4fd1b2c90daeaeb49d0d8ef142 | [
"MIT"
] | 1 | 2022-02-03T19:41:52.000Z | 2022-02-03T19:41:52.000Z | test/test_helper.exs | abotkit/teddy | 72f1c7015a278d4fd1b2c90daeaeb49d0d8ef142 | [
"MIT"
] | null | null | null | test/test_helper.exs | abotkit/teddy | 72f1c7015a278d4fd1b2c90daeaeb49d0d8ef142 | [
"MIT"
] | null | null | null | ExUnit.start()
Ecto.Adapters.SQL.Sandbox.mode(Teddy.Repo, :manual)
| 22.333333 | 51 | 0.776119 |
ff7ae3d258fdaad347015e0a8af560e9df1b4093 | 1,080 | exs | Elixir | test/four_lucha/platform_test.exs | Thomas-Jean/four_lucha | 591627059c02edc3315b5cac2c35eacb821108ff | [
"Apache-2.0"
] | 1 | 2021-02-21T19:15:27.000Z | 2021-02-21T19:15:27.000Z | test/four_lucha/platform_test.exs | Thomas-Jean/four_lucha | 591627059c02edc3315b5cac2c35eacb821108ff | [
"Apache-2.0"
] | null | null | null | test/four_lucha/platform_test.exs | Thomas-Jean/four_lucha | 591627059c02edc3315b5cac2c35eacb821108ff | [
"Apache-2.0"
] | null | null | null | defmodule FourLucha.PlatformTest do
use ExUnit.Case, async: true
use ExVCR.Mock, adapter: ExVCR.Adapter.Hackney, options: [clear_mock: true]
ExVCR.Config.filter_url_params(true)
setup_all do
HTTPoison.start()
end
setup do
{status, _cleared} = Cachex.clear(:gb_cache)
status
end
test "resp... | 28.421053 | 89 | 0.685185 |
ff7b3be64a29674f8a2902aa82aa756cb279bb8c | 6,057 | ex | Elixir | lib/couch_gears/database.ex | Zatvobor/couch_gears | 5ebfdec4d79fb3734d7d2cb36e495b6e408eac21 | [
"Apache-2.0"
] | 1 | 2015-09-29T03:07:04.000Z | 2015-09-29T03:07:04.000Z | lib/couch_gears/database.ex | Zatvobor/couch_gears | 5ebfdec4d79fb3734d7d2cb36e495b6e408eac21 | [
"Apache-2.0"
] | null | null | null | lib/couch_gears/database.ex | Zatvobor/couch_gears | 5ebfdec4d79fb3734d7d2cb36e495b6e408eac21 | [
"Apache-2.0"
] | null | null | null | defmodule CouchGears.Database do
@moduledoc """
This module provides CRUD functions for managing either databases or documents.
The main important thing is a `database` module designed to be a 'instance' for certain DB (see examples below).
## Examples:
db = CouchGears.Database.open("db")
db.find(... | 26.92 | 114 | 0.641076 |
ff7b9b7dab58f48878f7333d3a3b24e448c2a4e9 | 243 | ex | Elixir | lib/tnd/dice/dice_roll_result.ex | tndrpg/tnd | a9a348ed7ce2f3d8f55046559f9551e2607f3236 | [
"0BSD"
] | null | null | null | lib/tnd/dice/dice_roll_result.ex | tndrpg/tnd | a9a348ed7ce2f3d8f55046559f9551e2607f3236 | [
"0BSD"
] | 1 | 2021-05-11T14:31:58.000Z | 2021-05-11T14:31:58.000Z | lib/tnd/dice/dice_roll_result.ex | tndrpg/tnd | a9a348ed7ce2f3d8f55046559f9551e2607f3236 | [
"0BSD"
] | null | null | null | defmodule Tnd.Dice.DiceRollResult do
alias Tnd.Dice.DicePool
defstruct pool: %DicePool{},
success: 0,
advantage: 0,
triumph: 0,
failure: 0,
threat: 0,
despair: 0
end
| 20.25 | 36 | 0.514403 |
ff7b9d338ac8468beab4d2eb0220163607772b12 | 1,353 | exs | Elixir | test/let/let_ok_and_let_error_test.exs | bblaszkow06/espec | 4d9819ca5c68c6eb70276c7d9c9630ded01ba778 | [
"Apache-2.0"
] | null | null | null | test/let/let_ok_and_let_error_test.exs | bblaszkow06/espec | 4d9819ca5c68c6eb70276c7d9c9630ded01ba778 | [
"Apache-2.0"
] | null | null | null | test/let/let_ok_and_let_error_test.exs | bblaszkow06/espec | 4d9819ca5c68c6eb70276c7d9c9630ded01ba778 | [
"Apache-2.0"
] | null | null | null | defmodule LetOkAndLetErrorTest do
use ExUnit.Case, async: true
defmodule SomeSpec do
use ESpec
def ok_fun, do: {:ok, 10}
def error_fun, do: {:error, 20}
context "let_ok and let_ok!" do
let_ok :ok_result, do: ok_fun()
let_ok! :ok_result!, do: ok_fun()
it do: expect(ok_result()).... | 24.6 | 52 | 0.637103 |
ff7ba638b2c7f482fa32a63b4038d3048ce0c8a4 | 1,069 | ex | Elixir | clients/elixir/generated/lib/cloud_manager_api/model/repository__links.ex | shinesolutions/cloudmanager-api-clients | d73a25878f6cc57af954362ba8dccc90d54e6131 | [
"Apache-2.0"
] | 3 | 2020-06-23T05:31:52.000Z | 2020-11-26T05:34:57.000Z | clients/elixir/generated/lib/cloud_manager_api/model/repository__links.ex | shinesolutions/cloudmanager-api-clients | d73a25878f6cc57af954362ba8dccc90d54e6131 | [
"Apache-2.0"
] | 2 | 2021-01-21T01:19:54.000Z | 2021-12-09T22:30:22.000Z | clients/elixir/generated/lib/cloud_manager_api/model/repository__links.ex | shinesolutions/cloudmanager-api-clients | d73a25878f6cc57af954362ba8dccc90d54e6131 | [
"Apache-2.0"
] | 1 | 2020-11-18T11:48:13.000Z | 2020-11-18T11:48:13.000Z | # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://openapi-generator.tech
# Do not edit the class manually.
defmodule CloudManagerAPI.Model.RepositoryLinks do
@moduledoc """
"""
@derive [Poison.Encoder]
defstruct [
:"http://ns.adobe.com/adobecloud/rel/... | 31.441176 | 115 | 0.702526 |
ff7be3bd913249171adb1dc0090af2e9451627e2 | 3,262 | exs | Elixir | config/runtime.exs | TiagoDanin/Aquamarine-Monitor | 432e50f0bddc6c04689a65e1dd25843f0efe2cce | [
"MIT"
] | 1 | 2022-01-25T22:07:43.000Z | 2022-01-25T22:07:43.000Z | config/runtime.exs | TiagoDanin/Aquamarine-Monitor | 432e50f0bddc6c04689a65e1dd25843f0efe2cce | [
"MIT"
] | null | null | null | config/runtime.exs | TiagoDanin/Aquamarine-Monitor | 432e50f0bddc6c04689a65e1dd25843f0efe2cce | [
"MIT"
] | null | null | null | import Config
# config/runtime.exs is executed for all environments, including
# during releases. It is executed after compilation and before the
# system starts, so it is typically used to load production configuration
# and secrets from environment variables or elsewhere. Do not define
# any compile-time configurati... | 37.930233 | 82 | 0.70141 |
ff7bf9e9e79e2fbdda643d2654735c33b707d0fe | 399 | exs | Elixir | test/pummpcomm/history/delete_other_device_id_test.exs | infinity-aps/pummpcomm | 7380585ecd110ab1c19d2aea3880e51e3f433050 | [
"MIT"
] | 15 | 2017-08-31T00:58:47.000Z | 2020-01-12T03:53:13.000Z | test/pummpcomm/history/delete_other_device_id_test.exs | vladhj38/pummpcomm | 7380585ecd110ab1c19d2aea3880e51e3f433050 | [
"MIT"
] | 1 | 2017-09-15T02:09:31.000Z | 2017-09-15T02:09:31.000Z | test/pummpcomm/history/delete_other_device_id_test.exs | vladhj38/pummpcomm | 7380585ecd110ab1c19d2aea3880e51e3f433050 | [
"MIT"
] | 3 | 2017-09-10T17:24:59.000Z | 2019-09-10T19:41:49.000Z | defmodule Pummpcomm.History.DeleteOtherDeviceIDTest do
use ExUnit.Case
test "Delete Other Device ID" do
{:ok, history_page} = Base.decode16("820100400081080000000000")
decoded_events = Pummpcomm.History.decode_records(history_page, %{})
assert {:delete_other_device_id, %{timestamp: ~N[2008-01-01 00:00... | 33.25 | 97 | 0.721805 |
ff7c17b1241dcbe84b4faaebb8c31a4e8ff1a010 | 75 | ex | Elixir | lib/events_tools_web/views/user_view.ex | community-tools/community-tools | 40b0e6cc9234b44593d2ab60bb2303d7224deb30 | [
"Apache-2.0"
] | 2 | 2017-10-06T01:14:35.000Z | 2017-11-18T16:44:44.000Z | lib/events_tools_web/views/user_view.ex | community-tools/community-tools | 40b0e6cc9234b44593d2ab60bb2303d7224deb30 | [
"Apache-2.0"
] | 6 | 2017-10-06T00:04:59.000Z | 2017-10-06T00:09:27.000Z | lib/events_tools_web/views/user_view.ex | apps-team/community-tools | 40b0e6cc9234b44593d2ab60bb2303d7224deb30 | [
"Apache-2.0"
] | 1 | 2017-10-06T01:17:35.000Z | 2017-10-06T01:17:35.000Z | defmodule CommunityToolsWeb.UserView do
use CommunityToolsWeb, :view
end
| 18.75 | 39 | 0.84 |
ff7c237cb4bd742f9fd42da3d877bb4e5bb1b142 | 370 | ex | Elixir | lib/cforum/messages/tag_auditing_protocol.ex | campingrider/cforum_ex | cf27684c47d6dc26c9c37a946f1c729a79d27c70 | [
"MIT"
] | null | null | null | lib/cforum/messages/tag_auditing_protocol.ex | campingrider/cforum_ex | cf27684c47d6dc26c9c37a946f1c729a79d27c70 | [
"MIT"
] | null | null | null | lib/cforum/messages/tag_auditing_protocol.ex | campingrider/cforum_ex | cf27684c47d6dc26c9c37a946f1c729a79d27c70 | [
"MIT"
] | null | null | null | defimpl Cforum.System.AuditingProtocol, for: Cforum.Messages.Tag do
def audit_json(tag) do
tag_synonyms = Cforum.Messages.Tags.list_tag_synonyms(tag)
synonyms = Enum.map(tag_synonyms, &Cforum.System.AuditingProtocol.audit_json(&1))
tag
|> Map.from_struct()
|> Map.drop([:forum, :messages, :__meta_... | 30.833333 | 85 | 0.713514 |
ff7c46e6afe0682f7a3e30877a536a6dd217c68a | 28,308 | ex | Elixir | lib/elixir/lib/code/fragment.ex | tnascimento/elixir | 9a4d10e702f33d2fa47718cde05375b506b4a3d6 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/code/fragment.ex | tnascimento/elixir | 9a4d10e702f33d2fa47718cde05375b506b4a3d6 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/code/fragment.ex | tnascimento/elixir | 9a4d10e702f33d2fa47718cde05375b506b4a3d6 | [
"Apache-2.0"
] | null | null | null | defmodule Code.Fragment do
@moduledoc """
This module provides conveniences for analyzing fragments of
textual code and extract available information whenever possible.
Most of the functions in this module provide a best-effort
and may not be accurate under all circumstances. Read each
documentation for mo... | 34.024038 | 96 | 0.600042 |
ff7c5ba4d9c4e2d8f6ff34f7619d6786ff636f31 | 867 | ex | Elixir | web/workflows/move_back_to_cart_state.ex | harry-gao/ex-cart | 573e7f977bb3b710d11618dd215d4ddd8f819fb3 | [
"Apache-2.0"
] | 356 | 2016-03-16T12:37:28.000Z | 2021-12-18T03:22:39.000Z | web/workflows/move_back_to_cart_state.ex | harry-gao/ex-cart | 573e7f977bb3b710d11618dd215d4ddd8f819fb3 | [
"Apache-2.0"
] | 30 | 2016-03-16T09:19:10.000Z | 2021-01-12T08:10:52.000Z | web/workflows/move_back_to_cart_state.ex | harry-gao/ex-cart | 573e7f977bb3b710d11618dd215d4ddd8f819fb3 | [
"Apache-2.0"
] | 72 | 2016-03-16T13:32:14.000Z | 2021-03-23T11:27:43.000Z | defmodule Nectar.Workflow.MoveBackToCartState do
alias Ecto.Multi
def run(repo, order), do: repo.transaction(steps(order))
def steps(order) do
Multi.new()
|> Multi.delete_all(:delete_payment, Nectar.Query.Payment.for_order(order))
|> Multi.delete_all(:delete_tax_adjustments, Nectar.Query.Adjustment... | 45.631579 | 116 | 0.7797 |
ff7c634ce438a88d770b97748c5652195d61e524 | 848 | ex | Elixir | apps/snitch_core/lib/core/data/model/state.ex | gridgentoo/avia | 139b68f4b3ccd830c4db296d81132680e253b731 | [
"MIT"
] | null | null | null | apps/snitch_core/lib/core/data/model/state.ex | gridgentoo/avia | 139b68f4b3ccd830c4db296d81132680e253b731 | [
"MIT"
] | null | null | null | apps/snitch_core/lib/core/data/model/state.ex | gridgentoo/avia | 139b68f4b3ccd830c4db296d81132680e253b731 | [
"MIT"
] | null | null | null | defmodule Snitch.Data.Model.State do
@moduledoc """
State CRUD and helpers
"""
use Snitch.Data.Model
alias Snitch.Data.Schema.State
@spec get(map | non_neg_integer) :: State.t() | nil
def get(query_fields_or_primary_key) do
QH.get(State, query_fields_or_primary_key, Repo)
end
@spec get_all() :... | 22.918919 | 72 | 0.633255 |
ff7c662fcb04587d4ebbcbbb7c9f4ac5eb8f62f0 | 448 | ex | Elixir | lib/cayenne/lpp/type/temperature.ex | janpieper/cayenne_lpp | 432003d00553cc05a4faa80dddaa2429e2cf5b6b | [
"MIT"
] | 1 | 2020-08-24T08:14:09.000Z | 2020-08-24T08:14:09.000Z | lib/cayenne/lpp/type/temperature.ex | janpieper/cayenne_lpp | 432003d00553cc05a4faa80dddaa2429e2cf5b6b | [
"MIT"
] | null | null | null | lib/cayenne/lpp/type/temperature.ex | janpieper/cayenne_lpp | 432003d00553cc05a4faa80dddaa2429e2cf5b6b | [
"MIT"
] | null | null | null | defmodule Cayenne.LPP.Type.Temperature do
@moduledoc """
Cayenne LPP type for temperature
### Example
```elixir
alias Cayenne.LPP.{Buffer, Encoder}
alias Cayenne.LPP.Type.Temperature
buffer =
28.3
|> Temperature.new()
|> Encoder.encode(temperature)
Buffer.to_string(buffer) # "67011B"
B... | 16.592593 | 41 | 0.642857 |
ff7ca46ab3b526c63502c430a0a905e078bcf25f | 101 | ex | Elixir | test/examples/contract_supertype.ex | staring-frog/dialyxir | b78735f75b325238b7db20d9eed22f018cca5f26 | [
"Apache-2.0"
] | 1,455 | 2015-01-03T02:53:19.000Z | 2022-03-12T00:31:25.000Z | test/examples/contract_supertype.ex | staring-frog/dialyxir | b78735f75b325238b7db20d9eed22f018cca5f26 | [
"Apache-2.0"
] | 330 | 2015-05-14T13:53:13.000Z | 2022-03-29T17:12:23.000Z | test/examples/contract_supertype.ex | staring-frog/dialyxir | b78735f75b325238b7db20d9eed22f018cca5f26 | [
"Apache-2.0"
] | 146 | 2015-02-03T18:19:43.000Z | 2022-03-07T10:05:20.000Z | defmodule Dialyxir.Examples.ContractSuperType do
@spec ok() :: any
def ok() do
:ok
end
end
| 14.428571 | 48 | 0.673267 |
ff7cb92788f1c05d3fb38c280d4cf1ccb5df306a | 1,651 | ex | Elixir | lib/mix/tasks/routes.ex | davidenko87/maru | 62b6ca0e42dd550683af8743f50e67048c4027d0 | [
"BSD-3-Clause"
] | 819 | 2016-11-25T07:12:04.000Z | 2022-03-16T06:59:36.000Z | lib/mix/tasks/routes.ex | davidenko87/maru | 62b6ca0e42dd550683af8743f50e67048c4027d0 | [
"BSD-3-Clause"
] | 71 | 2016-11-24T20:19:09.000Z | 2021-06-09T10:12:23.000Z | lib/mix/tasks/routes.ex | davidenko87/maru | 62b6ca0e42dd550683af8743f50e67048c4027d0 | [
"BSD-3-Clause"
] | 56 | 2015-01-10T23:34:12.000Z | 2016-11-17T00:13:56.000Z | defmodule Mix.Tasks.Maru.Routes do
@moduledoc """
Print routes for a `Maru.Router` module.
$ mix maru.routes
$ mix maru.routes MyApp.API
"""
use Mix.Task
def run(args) do
unless System.get_env("MIX_ENV") do
Mix.env(:dev)
end
Mix.Task.run("compile", args)
cond do
mo... | 22.013333 | 74 | 0.601454 |
ff7ce5240cf57e9ed9c2f197ce3741abfaba37ae | 990 | ex | Elixir | lib/mix/tasks/compile.phoenix.ex | bhicks/phoenix | 2c43d798c184f6085cd2765d6cb2b463c87edac7 | [
"MIT"
] | null | null | null | lib/mix/tasks/compile.phoenix.ex | bhicks/phoenix | 2c43d798c184f6085cd2765d6cb2b463c87edac7 | [
"MIT"
] | 1 | 2021-11-17T12:10:06.000Z | 2021-11-24T12:53:45.000Z | lib/mix/tasks/compile.phoenix.ex | bhicks/phoenix | 2c43d798c184f6085cd2765d6cb2b463c87edac7 | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.Compile.Phoenix do
use Mix.Task
@recursive true
@moduledoc """
Compiles Phoenix source files that support code reloading.
"""
@doc false
def run(_args) do
{:ok, _} = Application.ensure_all_started(:phoenix)
case touch() do
[] -> {:noop, []}
_ -> {:ok, []}
en... | 22.5 | 70 | 0.653535 |
ff7cfb5c928334efb3bd53dd16c9d5a2750bc039 | 1,985 | exs | Elixir | src/033/problem033.exs | fredericojordan/project-euler | 75c3f519d5a6ad610362b6904f8fa4d1cde05448 | [
"MIT"
] | 9 | 2018-05-06T04:43:08.000Z | 2020-12-01T20:51:34.000Z | src/033/problem033.exs | fredericojordan/project-euler | 75c3f519d5a6ad610362b6904f8fa4d1cde05448 | [
"MIT"
] | null | null | null | src/033/problem033.exs | fredericojordan/project-euler | 75c3f519d5a6ad610362b6904f8fa4d1cde05448 | [
"MIT"
] | null | null | null | #!/usr/bin/env elixir
defmodule Problem033 do
@moduledoc """
The fraction 49/98 is a curious fraction, as an inexperienced mathematician in attempting to simplify it may incorrectly believe that 49/98 = 4/8, which is correct, is obtained by cancelling the 9s.
We shall consider fractions like, 30/50 = 3/5, t... | 37.45283 | 201 | 0.653904 |
ff7d06336fd2f9bc161db5434e52d7d8cc72656c | 9,411 | ex | Elixir | lib/bamboo/phoenix.ex | ymtszw/bamboo | 8c5780319c5e2c936d04a2e1d9594be20a525c9b | [
"MIT"
] | null | null | null | lib/bamboo/phoenix.ex | ymtszw/bamboo | 8c5780319c5e2c936d04a2e1d9594be20a525c9b | [
"MIT"
] | 1 | 2021-02-23T18:44:13.000Z | 2021-02-23T18:44:13.000Z | lib/bamboo/phoenix.ex | ymtszw/bamboo | 8c5780319c5e2c936d04a2e1d9594be20a525c9b | [
"MIT"
] | null | null | null | defmodule Bamboo.Phoenix do
@moduledoc """
Render emails with Phoenix templates and layouts.
This module allows rendering emails with Phoenix layouts and views. Pass an
atom (e.g. `:welcome_email`) as the template name to render both HTML and
plain text emails. Use a string if you only want to render one typ... | 28.604863 | 92 | 0.643927 |
ff7d07ef72f6e73320e46a6acd331b336679e2eb | 2,100 | exs | Elixir | implements/wordy/wordy_test.exs | MickeyOoh/Exercises | 3b34e7fdab4a09e0269d20c68531b4fb75bb7f16 | [
"MIT"
] | null | null | null | implements/wordy/wordy_test.exs | MickeyOoh/Exercises | 3b34e7fdab4a09e0269d20c68531b4fb75bb7f16 | [
"MIT"
] | 1 | 2018-06-19T18:59:41.000Z | 2018-06-19T18:59:41.000Z | implements/wordy/wordy_test.exs | MickeyOoh/Exercises | 3b34e7fdab4a09e0269d20c68531b4fb75bb7f16 | [
"MIT"
] | null | null | null | #if !System.get_env("EXERCISM_TEST_EXAMPLES") do
Code.load_file("wordy.exs", __DIR__)
#end
ExUnit.start()
#ExUnit.configure(exclude: :pending, trace: true)
defmodule WordyTest do
use ExUnit.Case
test "addition" do
assert Wordy.answer("What is 1 plus 1?") == 2
end
@tag :pending
test "more addition"... | 22.340426 | 77 | 0.656667 |
ff7d11ec0dcf1aed626bf3e621b99c8b16cecb92 | 2,030 | ex | Elixir | lib/elixirdo/base/undetermined.ex | slepher/elixirdo | 9417f275f1c908f9144e93325e6c52717896058f | [
"Xnet",
"X11"
] | null | null | null | lib/elixirdo/base/undetermined.ex | slepher/elixirdo | 9417f275f1c908f9144e93325e6c52717896058f | [
"Xnet",
"X11"
] | 5 | 2018-07-20T12:36:25.000Z | 2018-08-01T04:55:46.000Z | lib/elixirdo/base/undetermined.ex | slepher/elixirdo | 9417f275f1c908f9144e93325e6c52717896058f | [
"Xnet",
"X11"
] | null | null | null | defmodule Elixirdo.Base.Undetermined do
alias Elixirdo.Base.Undetermined
alias Elixirdo.Base.Generated
defstruct [:required_typeclass, :typeclass, :inner_function]
def new(f, required_typeclass) do
new(f, required_typeclass, required_typeclass)
end
def new(f, required_typeclass, typeclass) do
cas... | 23.068182 | 102 | 0.657143 |
ff7d1b7365733f50d8cb80c159e2698db8e04204 | 478 | exs | Elixir | bench/breaker_timeout_request_bench.exs | awochna/breaker | 84a7855939b1350376bac555fb1ee1475a842e9a | [
"MIT"
] | 33 | 2017-01-26T23:37:00.000Z | 2021-05-17T16:39:35.000Z | bench/breaker_timeout_request_bench.exs | awochna/breaker | 84a7855939b1350376bac555fb1ee1475a842e9a | [
"MIT"
] | 9 | 2017-02-14T22:12:02.000Z | 2019-08-06T20:46:41.000Z | bench/breaker_timeout_request_bench.exs | awochna/breaker | 84a7855939b1350376bac555fb1ee1475a842e9a | [
"MIT"
] | 4 | 2018-01-23T02:36:14.000Z | 2019-08-06T15:42:01.000Z | defmodule BreakerTimeoutRequestBench do
use Benchfella
setup_all do
HTTPotion.start
Breaker.start_link([url: "http://localhost:8080/", timeout: 500])
end
bench "get request with breaker", [breaker: bench_context] do
task = Breaker.get(breaker, "/delay/1")
Breaker.error?(Task.await(task))
end... | 25.157895 | 75 | 0.707113 |
ff7d525e6df07c1c747366301b462a0e21ed93d1 | 2,378 | ex | Elixir | lib/mix/tasks/ecto.migrate.ex | cnsa/ecto | a6e0eaaa5da1032fad571308c338eca1b5f77738 | [
"Apache-2.0"
] | null | null | null | lib/mix/tasks/ecto.migrate.ex | cnsa/ecto | a6e0eaaa5da1032fad571308c338eca1b5f77738 | [
"Apache-2.0"
] | null | null | null | lib/mix/tasks/ecto.migrate.ex | cnsa/ecto | a6e0eaaa5da1032fad571308c338eca1b5f77738 | [
"Apache-2.0"
] | null | null | null | defmodule Mix.Tasks.Ecto.Migrate do
use Mix.Task
import Mix.Ecto
@shortdoc "Runs the repository migrations"
@recursive true
@moduledoc """
Runs the pending migrations for the given repository.
The repository must be set under `:ecto_repos` in the
current app configuration or given via the `-r` option... | 29.725 | 98 | 0.653911 |
ff7d6d56a5fcc4ec3fca20507eb79a7016618553 | 18,318 | ex | Elixir | clients/dfa_reporting/lib/google_api/dfa_reporting/v35/api/creatives.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/dfa_reporting/lib/google_api/dfa_reporting/v35/api/creatives.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/dfa_reporting/lib/google_api/dfa_reporting/v35/api/creatives.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... | 47.703125 | 480 | 0.620428 |
ff7d8c808b9c8aee5582f7cd0c09857f803741df | 3,376 | ex | Elixir | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/user_role.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/user_role.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/user_role.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... | 49.647059 | 371 | 0.705865 |
ff7d9e79c17e0e4d1c8df0b6a90fa54feab26001 | 14,645 | ex | Elixir | lib/plug/ssl.ex | adrianomitre/plug | 9bf2f611f766e59adf4f238ea679e13d6ff6da75 | [
"Apache-2.0"
] | null | null | null | lib/plug/ssl.ex | adrianomitre/plug | 9bf2f611f766e59adf4f238ea679e13d6ff6da75 | [
"Apache-2.0"
] | null | null | null | lib/plug/ssl.ex | adrianomitre/plug | 9bf2f611f766e59adf4f238ea679e13d6ff6da75 | [
"Apache-2.0"
] | null | null | null | defmodule Plug.SSL do
@moduledoc """
A plug to force SSL connections and enable HSTS.
If the scheme of a request is `https`, it'll add a `strict-transport-security`
header to enable HTTP Strict Transport Security by default.
Otherwise, the request will be redirected to a corresponding location
with the `h... | 32.616927 | 103 | 0.679344 |
ff7db472f350511a08a48242f04931121d16e11f | 619 | exs | Elixir | priv/repo/seeds.exs | cabol/rps | 813028c4b7bb18f8c7cbcf4422249a81ccb9f059 | [
"MIT"
] | 3 | 2018-05-28T15:10:11.000Z | 2020-08-02T21:14:25.000Z | priv/repo/seeds.exs | cabol/rps | 813028c4b7bb18f8c7cbcf4422249a81ccb9f059 | [
"MIT"
] | null | null | null | priv/repo/seeds.exs | cabol/rps | 813028c4b7bb18f8c7cbcf4422249a81ccb9f059 | [
"MIT"
] | null | null | null | # Script for populating the database. You can run it as:
#
# mix run priv/repo/seeds.exs
#
# Inside the script, you can read and write to any of your
# repositories directly:
#
# Rps.Repo.insert!(%Rps.SomeSchema{})
#
# We recommend using the bang functions (`insert!`, `update!`
# and so on) as they will fail if... | 18.205882 | 61 | 0.642973 |
ff7dbd433b93be01274cfc62baeb1c0d3ed686c8 | 1,739 | ex | Elixir | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/platform_type.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/platform_type.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/platform_type.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... | 32.811321 | 148 | 0.706728 |
ff7dc1aca5dc7d0bdb8a700e65362cd93a2f544d | 5,196 | ex | Elixir | phoenix/lib/mehr_schulferien/collect_data.ex | komlanvi/www.mehr-schulferien.de | fe74772f2cc8ce430e04adf6e66023971456ce57 | [
"MIT"
] | null | null | null | phoenix/lib/mehr_schulferien/collect_data.ex | komlanvi/www.mehr-schulferien.de | fe74772f2cc8ce430e04adf6e66023971456ce57 | [
"MIT"
] | null | null | null | phoenix/lib/mehr_schulferien/collect_data.ex | komlanvi/www.mehr-schulferien.de | fe74772f2cc8ce430e04adf6e66023971456ce57 | [
"MIT"
] | null | null | null | defmodule MehrSchulferien.CollectData do
alias MehrSchulferien.Timetables
alias MehrSchulferien.Locations
alias MehrSchulferien.Repo
alias MehrSchulferien.Timetables.Day
alias MehrSchulferien.Timetables.Slot
alias MehrSchulferien.Timetables.Period
alias MehrSchulferien.Locations.Country
alias MehrSchulf... | 44.033898 | 190 | 0.632794 |
ff7df1ab4cc895e31e94d13e713619f5a49e8e49 | 326 | ex | Elixir | lib/pkg_core/logger.ex | jnylen/pkg_core | a8575c5202615f671b450b9aad17f0b70ed88d09 | [
"MIT"
] | null | null | null | lib/pkg_core/logger.ex | jnylen/pkg_core | a8575c5202615f671b450b9aad17f0b70ed88d09 | [
"MIT"
] | 10 | 2020-07-18T10:39:03.000Z | 2022-03-24T04:03:27.000Z | lib/pkg_core/logger.ex | jnylen/pkg_core | a8575c5202615f671b450b9aad17f0b70ed88d09 | [
"MIT"
] | null | null | null | defmodule PkgCore.Logger do
@doc """
`debug/1` outputs in a shell a green text with the following string.
"""
def debug(_, string), do: Mix.shell().info([:green, "* ", :reset, string])
@doc """
`error/1` raises an error in case of an error.
"""
def error(app, string), do: Mix.raise("[#{app}] #{string}"... | 27.166667 | 76 | 0.616564 |
ff7df4bac9677fc9e57aa0da4a600dd52056f0be | 972 | ex | Elixir | lib/opencov.ex | ramkrishna70/opencov | 7a3415f8eebb797ad1f7b6c832daa4f04d70af8d | [
"MIT"
] | null | null | null | lib/opencov.ex | ramkrishna70/opencov | 7a3415f8eebb797ad1f7b6c832daa4f04d70af8d | [
"MIT"
] | null | null | null | lib/opencov.ex | ramkrishna70/opencov | 7a3415f8eebb797ad1f7b6c832daa4f04d70af8d | [
"MIT"
] | null | null | null | defmodule Opencov 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, warn: false
children = [
# Start the endpoint when the application starts
supervisor(Opencov.E... | 31.354839 | 71 | 0.709877 |
ff7e09ddbc2fdc1e74468587b445a4279347cf18 | 259 | ex | Elixir | lib/rfxi_web/channels/rfx_channel.ex | andyl/rfxi | 9007c75693d643555c45a20e9634dd4b3867deba | [
"MIT"
] | 1 | 2021-08-10T14:46:10.000Z | 2021-08-10T14:46:10.000Z | lib/rfxi_web/channels/rfx_channel.ex | andyl/rfxi | 9007c75693d643555c45a20e9634dd4b3867deba | [
"MIT"
] | 2 | 2021-06-22T14:12:37.000Z | 2021-06-28T05:06:23.000Z | lib/rfxi_web/channels/rfx_channel.ex | andyl/rfxi | 9007c75693d643555c45a20e9634dd4b3867deba | [
"MIT"
] | null | null | null | defmodule RfxiWeb.RfxChannel do
use Phoenix.Channel
def join(_topic, _payload, socket) do
{:ok, socket}
end
def handle_in("rfx", payload, socket) do
IO.inspect payload, label: "PAYLOAD"
{:reply, {:ok, %{echo: "PONG"}}, socket}
end
end
| 19.923077 | 44 | 0.656371 |
ff7e22d6324ec387dc43775f46d7b7bb36bea4d5 | 926 | ex | Elixir | safe-indexer-ex/lib/rpc_client/rpc_client.ex | gnosis/simple-indexer | 573484c0b9253d97883a51fe430519d718345b10 | [
"MIT"
] | 1 | 2022-01-30T02:15:03.000Z | 2022-01-30T02:15:03.000Z | safe-indexer-ex/lib/rpc_client/rpc_client.ex | gnosis/safe-indexer | 573484c0b9253d97883a51fe430519d718345b10 | [
"MIT"
] | 4 | 2021-08-31T10:02:21.000Z | 2021-12-03T15:05:53.000Z | safe-indexer-ex/lib/rpc_client/rpc_client.ex | gnosis/simple-tracer | 573484c0b9253d97883a51fe430519d718345b10 | [
"MIT"
] | 2 | 2021-12-19T01:56:44.000Z | 2022-03-28T15:12:37.000Z | defmodule RpcClient do
use Tesla
plug Tesla.Middleware.BaseUrl, System.get_env("RPC_NODE_URL")
plug Tesla.Middleware.JSON
@topics %{
IncomingEth: "0x3d0ce9bfc3ed7d6862dbb28b2dea94561fe714a1b4d019aa8af39730d1ad7c3d",
ExecutionSuccess: "0x442e715f626346e8c54381002da614f62bee8d27386535b25... | 38.583333 | 101 | 0.709503 |
ff7e485b41631d218506daf4c6f60297ab435cf3 | 642 | ex | Elixir | lib/exrush/csv.ex | xaviRodri/exrush | 43dfa9e1364c87d77b16739c03215d3ba2abb5bc | [
"MIT"
] | null | null | null | lib/exrush/csv.ex | xaviRodri/exrush | 43dfa9e1364c87d77b16739c03215d3ba2abb5bc | [
"MIT"
] | null | null | null | lib/exrush/csv.ex | xaviRodri/exrush | 43dfa9e1364c87d77b16739c03215d3ba2abb5bc | [
"MIT"
] | null | null | null | defmodule Exrush.Csv do
@moduledoc """
This module is in charge of all operations related to
CSV files management.
"""
@csv_path "priv/csv/"
@doc """
Writes a list of rushing data into a CSV file.
"""
@spec write(list()) :: binary()
def write(data_list) do
file_name = Enum.join([@csv_path, Dat... | 23.777778 | 91 | 0.647975 |
ff7e4f9553725c84ef28f7436fb18904e7cea125 | 60 | exs | Elixir | lib/mix/test/fixtures/escripttest/config/config.exs | mk/elixir | 2b2c66ecf7b1cc2167cae9cc3e88f950994223f1 | [
"Apache-2.0"
] | 4 | 2015-12-22T02:46:39.000Z | 2016-04-26T06:11:09.000Z | lib/mix/test/fixtures/escripttest/config/config.exs | mk/elixir | 2b2c66ecf7b1cc2167cae9cc3e88f950994223f1 | [
"Apache-2.0"
] | null | null | null | lib/mix/test/fixtures/escripttest/config/config.exs | mk/elixir | 2b2c66ecf7b1cc2167cae9cc3e88f950994223f1 | [
"Apache-2.0"
] | null | null | null | use Mix.Config
config :escripttest, erlval: "Erlang value"
| 15 | 43 | 0.766667 |
ff7e62acd1c27b47f9949c095430a60d45fad7c4 | 1,637 | exs | Elixir | elixir/roman-numerals/roman_numerals_test.exs | codebay/exercism | f6ed549d473892f2c21f44a8f171480494eb59ad | [
"Apache-2.0"
] | null | null | null | elixir/roman-numerals/roman_numerals_test.exs | codebay/exercism | f6ed549d473892f2c21f44a8f171480494eb59ad | [
"Apache-2.0"
] | null | null | null | elixir/roman-numerals/roman_numerals_test.exs | codebay/exercism | f6ed549d473892f2c21f44a8f171480494eb59ad | [
"Apache-2.0"
] | null | null | null | if !System.get_env("EXERCISM_TEST_EXAMPLES") do
Code.load_file("roman.exs", __DIR__)
end
ExUnit.start()
ExUnit.configure(exclude: :pending, trace: true)
defmodule RomanTest do
use ExUnit.Case
# @tag :pending
test "1" do
assert Roman.numerals(1) == "I"
end
# @tag :pending
test "2" do
assert Rom... | 16.207921 | 48 | 0.597434 |
ff7e70e4c9f8cfca7b972013f5bb9508bc6e30c1 | 445 | ex | Elixir | lib/geolix/adapter/mmdb2/result/anonymous_ip.ex | coladarci/geolix | 0a0508db410732fa8a24cbcd28e44f89b1b30afa | [
"Apache-2.0"
] | null | null | null | lib/geolix/adapter/mmdb2/result/anonymous_ip.ex | coladarci/geolix | 0a0508db410732fa8a24cbcd28e44f89b1b30afa | [
"Apache-2.0"
] | null | null | null | lib/geolix/adapter/mmdb2/result/anonymous_ip.ex | coladarci/geolix | 0a0508db410732fa8a24cbcd28e44f89b1b30afa | [
"Apache-2.0"
] | null | null | null | defmodule Geolix.Adapter.MMDB2.Result.AnonymousIP do
@moduledoc """
Result for `GeoIP2 Anonymous IP` databases.
"""
alias Geolix.Adapter.MMDB2.Model
defstruct ip_address: nil,
is_anonymous: false,
is_anonymous_vpn: false,
is_hosting_provider: false,
is_public_... | 23.421053 | 52 | 0.660674 |
ff7ee83ebb8862ea6d64d6400f9cd540103f84e3 | 24,666 | ex | Elixir | lib/codes/codes_s58.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_s58.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_s58.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | defmodule IcdCode.ICDCode.Codes_S58 do
alias IcdCode.ICDCode
def _S58011A do
%ICDCode{full_code: "S58011A",
category_code: "S58",
short_code: "011A",
full_name: "Complete traumatic amputation at elbow level, right arm, initial encounter",
short_name: "Complete traumatic am... | 50.032454 | 128 | 0.68641 |
ff7eef24060a25e345fa4848821718396b200c46 | 2,233 | ex | Elixir | lib/hexpm/repository/owners.ex | lau/hexpm | beee80f5358a356530debfea35ee65c3a0aa9b25 | [
"Apache-2.0"
] | null | null | null | lib/hexpm/repository/owners.ex | lau/hexpm | beee80f5358a356530debfea35ee65c3a0aa9b25 | [
"Apache-2.0"
] | null | null | null | lib/hexpm/repository/owners.ex | lau/hexpm | beee80f5358a356530debfea35ee65c3a0aa9b25 | [
"Apache-2.0"
] | null | null | null | defmodule Hexpm.Repository.Owners do
use Hexpm.Web, :context
def all(package, preload \\ []) do
assoc(package, :package_owners)
|> Repo.all()
|> Repo.preload(preload)
end
def get(package, user) do
if owner = Repo.get_by(PackageOwner, package_id: package.id, user_id: user.id) do
%{owner |... | 27.9125 | 85 | 0.592029 |
ff7efc1ef2cde7db55e96ef639967d448d66885f | 1,988 | ex | Elixir | clients/iam/lib/google_api/iam/v1/model/set_iam_policy_request.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/iam/lib/google_api/iam/v1/model/set_iam_policy_request.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/iam/lib/google_api/iam/v1/model/set_iam_policy_request.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 39.76 | 303 | 0.7334 |
ff7f418195c1daf8489b66654e347f5f90c2cb63 | 5,232 | exs | Elixir | test/nostrum/struct/guild/member_test.exs | jos-b/nostrum | baf5c9de9f17c3bd99c5c06a454e03cc448aad1c | [
"MIT"
] | 2 | 2020-03-03T02:51:57.000Z | 2021-01-18T02:24:42.000Z | test/nostrum/struct/guild/member_test.exs | jos-b/nostrum | baf5c9de9f17c3bd99c5c06a454e03cc448aad1c | [
"MIT"
] | null | null | null | test/nostrum/struct/guild/member_test.exs | jos-b/nostrum | baf5c9de9f17c3bd99c5c06a454e03cc448aad1c | [
"MIT"
] | 1 | 2020-09-03T13:55:55.000Z | 2020-09-03T13:55:55.000Z | defmodule Nostrum.Struct.MemberTest do
use ExUnit.Case, async: true
alias Nostrum.Permission
alias Nostrum.Struct.{Channel, Guild, User, Overwrite}
alias Nostrum.Struct.Guild.{Member, Role}
doctest Member
describe "mention/1" do
test "matches `Nostrum.Struct.User.mention/1`" do
member = %Member... | 30.418605 | 104 | 0.629014 |
ff7f7687234c4e3b813d73a56cf660e630ab71cb | 4,799 | ex | Elixir | lib/glue/feed/api_wrappers/tmdb_api_wrapper.ex | seanbreckenridge/glue | 60cbe6478be27572de6c6d5276a806b5940ffcbc | [
"Apache-2.0"
] | 5 | 2020-07-04T12:18:58.000Z | 2022-01-13T22:35:40.000Z | lib/glue/feed/api_wrappers/tmdb_api_wrapper.ex | seanbreckenridge/glue | 60cbe6478be27572de6c6d5276a806b5940ffcbc | [
"Apache-2.0"
] | 37 | 2020-07-20T23:35:56.000Z | 2022-03-19T02:13:16.000Z | lib/glue/feed/api_wrappers/tmdb_api_wrapper.ex | seanbreckenridge/glue | 60cbe6478be27572de6c6d5276a806b5940ffcbc | [
"Apache-2.0"
] | null | null | null | defmodule Glue.TMDB_API do
require Logger
use Tesla, only: [:get]
@api_key Application.get_env(:glue, :tmdb_api_key)
plug(Tesla.Middleware.JSON)
plug(Tesla.Middleware.BaseUrl, "https://api.themoviedb.org/3")
plug Tesla.Middleware.Retry,
delay: 2_000,
max_retries: 3,
max_delay: 4_000,
sh... | 26.224044 | 105 | 0.542405 |
ff7f9bb0dbb70d7f4598cc0eb8dc072b4d134139 | 811 | ex | Elixir | lib/game/actions/heal.ex | kevinmartiniano/ex_mon | d86f090046a86e00794d7e974d468d0fb3121aa8 | [
"Apache-2.0"
] | null | null | null | lib/game/actions/heal.ex | kevinmartiniano/ex_mon | d86f090046a86e00794d7e974d468d0fb3121aa8 | [
"Apache-2.0"
] | null | null | null | lib/game/actions/heal.ex | kevinmartiniano/ex_mon | d86f090046a86e00794d7e974d468d0fb3121aa8 | [
"Apache-2.0"
] | null | null | null | defmodule ExMon.Game.Actions.Heal do
alias ExMon.Game
alias ExMon.Game.Status
@heal_power 18..25
def heal_life(player) do
player
|> Game.fetch_player()
|> Map.get(:life)
|> calculate_total_life()
|> set_life(player)
end
defp calculate_total_life(life), do: Enum.random(@heal_power) + ... | 22.527778 | 82 | 0.681874 |
ff7f9e10587d32ebddef4e931d69d0e3f860f9b9 | 83 | ex | Elixir | lib/ucx_ucc_web/views/coherence/password_view.ex | josephkabraham/ucx_ucc | 0dbd9e3eb5940336b4870cff033482ceba5f6ee7 | [
"MIT"
] | null | null | null | lib/ucx_ucc_web/views/coherence/password_view.ex | josephkabraham/ucx_ucc | 0dbd9e3eb5940336b4870cff033482ceba5f6ee7 | [
"MIT"
] | null | null | null | lib/ucx_ucc_web/views/coherence/password_view.ex | josephkabraham/ucx_ucc | 0dbd9e3eb5940336b4870cff033482ceba5f6ee7 | [
"MIT"
] | null | null | null | defmodule UcxUccWeb.Coherence.PasswordView do
use UcxUccWeb.Coherence, :view
end
| 20.75 | 45 | 0.831325 |
ff7fd032ed57e1a454d0d41cf92e53b33fb45802 | 2,811 | ex | Elixir | apps/ewallet_api/lib/ewallet_api/v1/router.ex | Macavirus/ewallet | ce62177b8bd3f7e72156930d384a1c4c047a3b5b | [
"Apache-2.0"
] | null | null | null | apps/ewallet_api/lib/ewallet_api/v1/router.ex | Macavirus/ewallet | ce62177b8bd3f7e72156930d384a1c4c047a3b5b | [
"Apache-2.0"
] | null | null | null | apps/ewallet_api/lib/ewallet_api/v1/router.ex | Macavirus/ewallet | ce62177b8bd3f7e72156930d384a1c4c047a3b5b | [
"Apache-2.0"
] | null | null | null | # 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 ... | 32.686047 | 98 | 0.737816 |
ff8002abe48bc1b474bac14dfddb2ce82542ddc6 | 4,053 | exs | Elixir | test/support/repo.exs | aleDsz/ecto-polymorphic | 4e29780602fc0028bfb42a4e56efd48b205b7861 | [
"MIT"
] | 1 | 2020-10-02T00:26:38.000Z | 2020-10-02T00:26:38.000Z | test/support/repo.exs | aleDsz/ecto-polymorphic | 4e29780602fc0028bfb42a4e56efd48b205b7861 | [
"MIT"
] | null | null | null | test/support/repo.exs | aleDsz/ecto-polymorphic | 4e29780602fc0028bfb42a4e56efd48b205b7861 | [
"MIT"
] | null | null | null | defmodule EctoPolymorphic.Support.Adapter do
@behaviour Ecto.Adapter
@behaviour Ecto.Adapter.Queryable
@behaviour Ecto.Adapter.Schema
@behaviour Ecto.Adapter.Transaction
defmacro __before_compile__(_opts), do: :ok
def ensure_all_started(_, _) do
{:ok, []}
end
def init(opts) do
:ecto = opts[:o... | 27.201342 | 95 | 0.642734 |
ff8018ce7755c4000c151113fa5cf2142ed33984 | 1,523 | ex | Elixir | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/metric.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/metric.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/metric.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... | 30.46 | 117 | 0.71241 |
ff80391f7c185b43e23e2aaf188d9925510a25e9 | 4,145 | ex | Elixir | clients/dialogflow/lib/google_api/dialogflow/v3/model/google_cloud_dialogflow_cx_v3_input_audio_config.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/dialogflow/lib/google_api/dialogflow/v3/model/google_cloud_dialogflow_cx_v3_input_audio_config.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/dialogflow/lib/google_api/dialogflow/v3/model/google_cloud_dialogflow_cx_v3_input_audio_config.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... | 61.865672 | 635 | 0.738239 |
ff80431ebfad71e158e263f218bcb5267472ce94 | 2,374 | exs | Elixir | {{cookiecutter.project_underscored}}/config/dev.exs | ijcd/cookiecutter-screaming-phoenix | f34ca6704f8f8b0581e91b4f6e3e75239fb79cb1 | [
"Apache-2.0"
] | null | null | null | {{cookiecutter.project_underscored}}/config/dev.exs | ijcd/cookiecutter-screaming-phoenix | f34ca6704f8f8b0581e91b4f6e3e75239fb79cb1 | [
"Apache-2.0"
] | null | null | null | {{cookiecutter.project_underscored}}/config/dev.exs | ijcd/cookiecutter-screaming-phoenix | f34ca6704f8f8b0581e91b4f6e3e75239fb79cb1 | [
"Apache-2.0"
] | null | null | null | use Mix.Config
# General application configuration
config :{{cookiecutter.project_underscored}},
include_debug_routes: :true
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we u... | 34.405797 | 170 | 0.7123 |
ff806204d7c8603ce19ca3681572efe48ea8b055 | 1,541 | ex | Elixir | lib/dingo_web/endpoint.ex | madclaws/Dingo | f277671b7e0a33c6b9a181f1444175f1171e9ce6 | [
"MIT"
] | null | null | null | lib/dingo_web/endpoint.ex | madclaws/Dingo | f277671b7e0a33c6b9a181f1444175f1171e9ce6 | [
"MIT"
] | null | null | null | lib/dingo_web/endpoint.ex | madclaws/Dingo | f277671b7e0a33c6b9a181f1444175f1171e9ce6 | [
"MIT"
] | null | null | null | defmodule DingoWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :dingo
# The session will be stored in the cookie and signed,
# this means its contents can be read but not tampered with.
# Set :encryption_salt if you would also like to encrypt it.
@session_options [
store: :cookie,
key: "_dingo_key",
... | 28.537037 | 97 | 0.713822 |
ff806c0c863483132b275a3008c389cbc58d1879 | 2,500 | ex | Elixir | lib/codes/codes_d64.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_d64.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_d64.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | defmodule IcdCode.ICDCode.Codes_D64 do
alias IcdCode.ICDCode
def _D640 do
%ICDCode{full_code: "D640",
category_code: "D64",
short_code: "0",
full_name: "Hereditary sideroblastic anemia",
short_name: "Hereditary sideroblastic anemia",
category_name: "Hereditary si... | 31.64557 | 81 | 0.618 |
ff80719c5e8fe234176dbdd9e2e9a81394bc1fb0 | 1,001 | ex | Elixir | lib/hasher/application.ex | enlego/hasher | 43b528059119971ffbca6538ffb6713fb78e077f | [
"MIT"
] | null | null | null | lib/hasher/application.ex | enlego/hasher | 43b528059119971ffbca6538ffb6713fb78e077f | [
"MIT"
] | null | null | null | lib/hasher/application.ex | enlego/hasher | 43b528059119971ffbca6538ffb6713fb78e077f | [
"MIT"
] | null | null | null | defmodule Hasher.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
children = [
# Start the Ecto repository
Hasher.Repo,
# Start the Telemetry supervisor
HasherWeb... | 28.6 | 64 | 0.699301 |
ff80828aeae100a42f843738855e5a4d42cbed2d | 2,049 | ex | Elixir | lib/sbom_poc/mqtt.ex | TraceyOnim/SbomPoc-sFractal | bac895a7eda61c47c00b8bbe682a6fda4dd7255c | [
"MIT"
] | 2 | 2020-10-04T12:41:58.000Z | 2021-03-11T20:51:26.000Z | lib/sbom_poc/mqtt.ex | TraceyOnim/SbomPoc-sFractal | bac895a7eda61c47c00b8bbe682a6fda4dd7255c | [
"MIT"
] | 113 | 2020-07-25T02:29:33.000Z | 2022-03-01T01:07:23.000Z | lib/sbom_poc/mqtt.ex | TraceyOnim/SbomPoc-sFractal | bac895a7eda61c47c00b8bbe682a6fda4dd7255c | [
"MIT"
] | 5 | 2020-07-10T09:57:58.000Z | 2021-03-11T20:51:29.000Z | defmodule SbomPoc.Mqtt do
@moduledoc """
`Mqtt` is main module for handling mqtt
mqtt.start initializes the system
and starts the Tortoise mqtt client using mqtt.handler
"""
require Logger
@doc """
Start initializes system variables
and starts supervisor of mqtt client
"""
def start do
cl... | 24.105882 | 71 | 0.598341 |
ff808fde32409c7646281f6c4ed148cc51985c49 | 305 | ex | Elixir | lib/idService_web/auth_pipeline.ex | dougalcorn/id-server | a699cdc05a484faf498846d7d428921dfaecb978 | [
"MIT"
] | null | null | null | lib/idService_web/auth_pipeline.ex | dougalcorn/id-server | a699cdc05a484faf498846d7d428921dfaecb978 | [
"MIT"
] | null | null | null | lib/idService_web/auth_pipeline.ex | dougalcorn/id-server | a699cdc05a484faf498846d7d428921dfaecb978 | [
"MIT"
] | null | null | null | defmodule IdService.Guardian.AuthPipeline do
use Guardian.Plug.Pipeline, otp_app: :idService,
module: IdService.Guardian,
error_handler: IdService.AuthErrorHandler
plug Guardian.Plug.VerifyHeader, realm: "Bearer"
plug Guardian.Plug.EnsureAuthenticated
plug Guardian.Plug.LoadResource
end
| 30.5 | 50 | 0.803279 |
ff80d84a00f35f294bbcd93a9230c92d2bf9b7bb | 886 | exs | Elixir | test/splitwise/oauth2/client_test.exs | nathanbegbie/ex_splitwise | 6de8b9f59db9834b342b86dfcd5c41354f349e5d | [
"MIT"
] | 3 | 2019-09-29T04:15:29.000Z | 2021-04-02T14:52:04.000Z | test/splitwise/oauth2/client_test.exs | nathanbegbie/ex_splitwise | 6de8b9f59db9834b342b86dfcd5c41354f349e5d | [
"MIT"
] | null | null | null | test/splitwise/oauth2/client_test.exs | nathanbegbie/ex_splitwise | 6de8b9f59db9834b342b86dfcd5c41354f349e5d | [
"MIT"
] | 1 | 2022-02-22T15:32:16.000Z | 2022-02-22T15:32:16.000Z | defmodule Splitwise.OAuth2.ClientTest do
use ExUnit.Case, async: true
import Mox
setup :verify_on_exit!
describe "authorize_url!/0" do
test "it calls the authorize_url! from the OAuth client" do
result = "authorize url"
ExSplitwise.OAuth2Mock
|> expect(:authorize_url!, fn _client -> res... | 28.580645 | 113 | 0.6614 |
ff80e346aa63f96210d4193f71d8b9450845164a | 1,185 | exs | Elixir | config/config.exs | wbotelhos/i18n-with-phoenix | 6a7dd5a4454e9ea1d83d9a42938180cb019936bf | [
"MIT"
] | null | null | null | config/config.exs | wbotelhos/i18n-with-phoenix | 6a7dd5a4454e9ea1d83d9a42938180cb019936bf | [
"MIT"
] | null | null | null | config/config.exs | wbotelhos/i18n-with-phoenix | 6a7dd5a4454e9ea1d83d9a42938180cb019936bf | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
# General application configuration
use Mix.Config
config :i18n_with_phoenix,
ecto_repos: [I18nWi... | 34.852941 | 98 | 0.781435 |
ff80fb7dd0c2a1f17980c78cc7f52e76cfcd9b61 | 1,214 | exs | Elixir | test/mix/tasks/absinthe.schema.sdl_test.exs | TheRealReal/absinthe | 6eae5bc36283e58f42d032b8afd90de3ad64f97b | [
"MIT"
] | 1 | 2019-10-10T02:57:52.000Z | 2019-10-10T02:57:52.000Z | test/mix/tasks/absinthe.schema.sdl_test.exs | TheRealReal/absinthe | 6eae5bc36283e58f42d032b8afd90de3ad64f97b | [
"MIT"
] | 1 | 2019-09-23T21:26:01.000Z | 2019-09-23T21:26:01.000Z | test/mix/tasks/absinthe.schema.sdl_test.exs | TheRealReal/absinthe | 6eae5bc36283e58f42d032b8afd90de3ad64f97b | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.Absinthe.Schema.SdlTest do
use Absinthe.Case, async: true
alias Mix.Tasks.Absinthe.Schema.Sdl, as: Task
defmodule TestSchema do
use Absinthe.Schema
"""
schema {
query: Query
}
type Query {
helloWorld(name: String!): String
}
"""
|> import_sdl
e... | 21.678571 | 61 | 0.632619 |
ff811386227e79bcf00e53b45761655e61ce4654 | 122 | exs | Elixir | lib/mix/test/fixtures/deps_status/deps/invalidapp/mix.exs | mk/elixir | 2b2c66ecf7b1cc2167cae9cc3e88f950994223f1 | [
"Apache-2.0"
] | 4 | 2015-12-22T02:46:39.000Z | 2016-04-26T06:11:09.000Z | lib/mix/test/fixtures/deps_status/deps/invalidapp/mix.exs | mk/elixir | 2b2c66ecf7b1cc2167cae9cc3e88f950994223f1 | [
"Apache-2.0"
] | null | null | null | lib/mix/test/fixtures/deps_status/deps/invalidapp/mix.exs | mk/elixir | 2b2c66ecf7b1cc2167cae9cc3e88f950994223f1 | [
"Apache-2.0"
] | 1 | 2017-07-25T21:46:48.000Z | 2017-07-25T21:46:48.000Z | defmodule InvalidApp.Mixfile do
use Mix.Project
def project do
[app: :invalidapp,
version: "1.0"]
end
end
| 13.555556 | 31 | 0.663934 |
ff81211aaf3238674576e8c13c8d01fd415ed3ab | 363 | exs | Elixir | priv/repo/migrations/20170609220534_create_blogs_post.exs | myobie/post_register | 924a832d7fa1693d655c34b0295affa8b3275f26 | [
"MIT"
] | null | null | null | priv/repo/migrations/20170609220534_create_blogs_post.exs | myobie/post_register | 924a832d7fa1693d655c34b0295affa8b3275f26 | [
"MIT"
] | null | null | null | priv/repo/migrations/20170609220534_create_blogs_post.exs | myobie/post_register | 924a832d7fa1693d655c34b0295affa8b3275f26 | [
"MIT"
] | null | null | null | defmodule PostRegister.Repo.Migrations.CreatePostRegister.Blogs.Post do
use Ecto.Migration
def change do
create table(:posts) do
add :log_id, references(:logs, on_delete: :delete_all)
add :subject, :string, size: 999, null: false
add :from, :string, null: false
add :html, :text, null: f... | 24.2 | 71 | 0.672176 |
ff8140837e5476ad65b3f2e7a269cbf17a6d55df | 197 | exs | Elixir | priv/repo/migrations/20190216140810_make_albums_apple_photos_id_optional.exs | allen-garvey/photog-phoenix | 69cbcffbba905e623fe9c9c236e3be27b678ec75 | [
"MIT"
] | 4 | 2019-10-04T16:11:15.000Z | 2021-08-18T21:00:13.000Z | apps/photog/priv/repo/migrations/20190216140810_make_albums_apple_photos_id_optional.exs | allen-garvey/phoenix-umbrella | 1d444bbd62a5e7b5f51d317ce2be71ee994125d5 | [
"MIT"
] | 5 | 2020-03-16T23:52:25.000Z | 2021-09-03T16:52:17.000Z | apps/photog/priv/repo/migrations/20190216140810_make_albums_apple_photos_id_optional.exs | allen-garvey/phoenix-umbrella | 1d444bbd62a5e7b5f51d317ce2be71ee994125d5 | [
"MIT"
] | null | null | null | defmodule Photog.Repo.Migrations.MakeAlbumsApplePhotosIdOptional do
use Ecto.Migration
def change do
alter table(:albums) do
modify :apple_photos_id, :integer, null: true
end
end
end
| 19.7 | 67 | 0.771574 |
ff8147bab693d08d0afefcccdb03d29ca7c01b99 | 3,931 | exs | Elixir | test/controllers/session_controller_test.exs | dipth/coherence | 64ad450c5d8d020172875c4bf52f2bbdaa6e59de | [
"MIT"
] | null | null | null | test/controllers/session_controller_test.exs | dipth/coherence | 64ad450c5d8d020172875c4bf52f2bbdaa6e59de | [
"MIT"
] | null | null | null | test/controllers/session_controller_test.exs | dipth/coherence | 64ad450c5d8d020172875c4bf52f2bbdaa6e59de | [
"MIT"
] | null | null | null | defmodule CoherenceTest.SessionController do
use TestCoherence.ConnCase
import TestCoherenceWeb.Router.Helpers
alias Coherence.Controller
alias TestCoherence.Coherence.Trackable
import Ecto.Query
alias TestCoherence.User
def setup_trackable_table %{conn: conn} do
Application.put_env :coherence, :opts... | 45.709302 | 146 | 0.644874 |
ff817667c2c00888ac510e8c8b247cfa0c2fae14 | 4,568 | ex | Elixir | lib/commands/outfit.ex | Bentheburrito/caibot | 301720992d668b02f308343c60f53ae050b5481b | [
"MIT"
] | 2 | 2020-07-23T07:41:25.000Z | 2020-08-10T22:03:25.000Z | lib/commands/outfit.ex | Bentheburrito/caibot | 301720992d668b02f308343c60f53ae050b5481b | [
"MIT"
] | null | null | null | lib/commands/outfit.ex | Bentheburrito/caibot | 301720992d668b02f308343c60f53ae050b5481b | [
"MIT"
] | null | null | null | defmodule CAIBot.Commands.PlanetSide.Outfit do
@behaviour Nosedrum.Command
require Logger
alias Nostrum.Api
alias Nostrum.Struct.Embed
alias PS2.API.{Query, Join, QueryResult}
# import Predicates, only: [ps2_outfit_name?: 1]
import PS2.API.QueryBuilder
import Utils, only: [safe_div: 2]
@impl true
... | 30.453333 | 133 | 0.586252 |
ff817ccff00425727631af07d37b5610a7564d0d | 1,721 | ex | Elixir | apps/banking_account_manager_web/lib/banking_account_manager_web.ex | danielscosta/banking_account_manager | 8acec8f4fa774c85401e67b4aa39c97a0ca9d149 | [
"MIT"
] | null | null | null | apps/banking_account_manager_web/lib/banking_account_manager_web.ex | danielscosta/banking_account_manager | 8acec8f4fa774c85401e67b4aa39c97a0ca9d149 | [
"MIT"
] | null | null | null | apps/banking_account_manager_web/lib/banking_account_manager_web.ex | danielscosta/banking_account_manager | 8acec8f4fa774c85401e67b4aa39c97a0ca9d149 | [
"MIT"
] | null | null | null | defmodule BankingAccountManagerWeb 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 BankingAccountManagerWeb, :controller
use BankingAccountManagerWeb, :view
The definitions below will ... | 26.075758 | 83 | 0.722836 |
ff818c43d49f75dbdd65f85f464eb6a57ce3139d | 7,332 | exs | Elixir | .credo.exs | bitpal/bitpal_demo | 989df08f60dadc5d4e340fef91890cf8bb3106ad | [
"BSD-3-Clause-Clear"
] | null | null | null | .credo.exs | bitpal/bitpal_demo | 989df08f60dadc5d4e340fef91890cf8bb3106ad | [
"BSD-3-Clause-Clear"
] | 1 | 2021-06-04T13:53:01.000Z | 2021-06-04T13:53:01.000Z | .credo.exs | bitpal/bitpal_demo | 989df08f60dadc5d4e340fef91890cf8bb3106ad | [
"BSD-3-Clause-Clear"
] | 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 ... | 38.589474 | 97 | 0.60952 |
ff81afffa398fe07b1ed868fadc6ef528555b744 | 1,373 | ex | Elixir | lib/influxql/quote.ex | jeffweiss/influxql | 3ada4c123c6751a6cdebf27729c0eb6d6e7f06bf | [
"Apache-2.0"
] | null | null | null | lib/influxql/quote.ex | jeffweiss/influxql | 3ada4c123c6751a6cdebf27729c0eb6d6e7f06bf | [
"Apache-2.0"
] | null | null | null | lib/influxql/quote.ex | jeffweiss/influxql | 3ada4c123c6751a6cdebf27729c0eb6d6e7f06bf | [
"Apache-2.0"
] | null | null | null | defmodule InfluxQL.Quote do
@moduledoc """
InfluxQL element quoting module.
"""
@doc """
Quotes an identifier for use in a query.
## Examples
iex> identifier(:from_atom)
"from_atom"
iex> identifier("unquoted")
"unquoted"
iex> identifier("unquoted_100")
"unquoted_100"... | 21.453125 | 86 | 0.590677 |
ff81bff114e0dbfa3371b2a0e4d56acf0cee86fc | 579 | ex | Elixir | lib/accent/schemas/version.ex | leonardocouy/accent | 29fb324395ff998cc5cdc6947c60070ffabe647c | [
"BSD-3-Clause"
] | null | null | null | lib/accent/schemas/version.ex | leonardocouy/accent | 29fb324395ff998cc5cdc6947c60070ffabe647c | [
"BSD-3-Clause"
] | null | null | null | lib/accent/schemas/version.ex | leonardocouy/accent | 29fb324395ff998cc5cdc6947c60070ffabe647c | [
"BSD-3-Clause"
] | null | null | null | defmodule Accent.Version do
use Accent.Schema
schema "versions" do
field(:name, :string)
field(:tag, :string)
belongs_to(:user, Accent.User)
belongs_to(:project, Accent.Project)
has_many(:translations, Accent.Translation)
has_many(:operations, Accent.Operation)
timestamps()
end
... | 22.269231 | 68 | 0.701209 |
ff81dad0b793e2f3e659010af20e2e0e52219d74 | 834 | ex | Elixir | test/support/integration_case.ex | onekilo79/tilex | c1b2dbea911a22d21420f52533e96bd63ce8f4ff | [
"MIT"
] | null | null | null | test/support/integration_case.ex | onekilo79/tilex | c1b2dbea911a22d21420f52533e96bd63ce8f4ff | [
"MIT"
] | null | null | null | test/support/integration_case.ex | onekilo79/tilex | c1b2dbea911a22d21420f52533e96bd63ce8f4ff | [
"MIT"
] | null | null | null | defmodule Tilex.IntegrationCase do
use ExUnit.CaseTemplate
using do
quote do
use Wallaby.DSL
alias Wallaby.Query
alias Wallaby.Element
alias Tilex.{Endpoint, Channel, Factory, Post, Repo}
import Ecto
import Ecto.Changeset
import Ecto.Query
import TilexWeb.Rout... | 21.947368 | 72 | 0.66307 |
ff81f67f428362faaede6c53a71d30ff7ed22c80 | 3,139 | exs | Elixir | test/process_managers/process_manager_instance_test.exs | SimpleBet/commanded | dc89737bd22daf4f6c5b3333b5d8d8de47fea5b8 | [
"MIT"
] | 1 | 2020-03-09T11:50:38.000Z | 2020-03-09T11:50:38.000Z | test/process_managers/process_manager_instance_test.exs | perzanko/commanded | fd18ee3981cd237cbb874d1ccd8155e98d35d178 | [
"MIT"
] | null | null | null | test/process_managers/process_manager_instance_test.exs | perzanko/commanded | fd18ee3981cd237cbb874d1ccd8155e98d35d178 | [
"MIT"
] | null | null | null | defmodule Commanded.ProcessManagers.ProcessManagerInstanceTest do
use Commanded.StorageCase
alias Commanded.ExampleDomain.BankAccount.Commands.OpenAccount
alias Commanded.ExampleDomain.BankApp
alias Commanded.ExampleDomain.BankRouter
alias Commanded.ExampleDomain.MoneyTransfer.Events.MoneyTransferRequested
... | 31.39 | 92 | 0.727939 |
ff820dcfc188ea1a0c7b2962094a67748e7c785c | 515 | ex | Elixir | lib/admint_web/live/navigation_live.ex | tiberiuc/admint | 6d1bd5462f49053c7c3999c35cc301c7b8f08a70 | [
"MIT"
] | null | null | null | lib/admint_web/live/navigation_live.ex | tiberiuc/admint | 6d1bd5462f49053c7c3999c35cc301c7b8f08a70 | [
"MIT"
] | null | null | null | lib/admint_web/live/navigation_live.ex | tiberiuc/admint | 6d1bd5462f49053c7c3999c35cc301c7b8f08a70 | [
"MIT"
] | null | null | null | defmodule Admint.Web.NavigationLive do
use Admint.Web, :live_component
import Admint.Definition.Helpers
@impl true
def update(assigns, socket) do
admint = assigns.admint
module = get_module(admint)
navigation = get_navigation(module)
pages = get_pages(module)
categories = get_categories(mod... | 20.6 | 39 | 0.652427 |
ff823e0029a7a359b78418900cb243f022fa877f | 539 | ex | Elixir | apps/core/lib/core/schema/impersonation_policy.ex | michaeljguarino/forge | 50ee583ecb4aad5dee4ef08fce29a8eaed1a0824 | [
"Apache-2.0"
] | 59 | 2021-09-16T19:29:39.000Z | 2022-03-31T20:44:24.000Z | apps/core/lib/core/schema/impersonation_policy.ex | svilenkov/plural | ac6c6cc15ac4b66a3b5e32ed4a7bee4d46d1f026 | [
"Apache-2.0"
] | 111 | 2021-08-15T09:56:37.000Z | 2022-03-31T23:59:32.000Z | apps/core/lib/core/schema/impersonation_policy.ex | svilenkov/plural | ac6c6cc15ac4b66a3b5e32ed4a7bee4d46d1f026 | [
"Apache-2.0"
] | 4 | 2021-12-13T09:43:01.000Z | 2022-03-29T18:08:44.000Z | defmodule Core.Schema.ImpersonationPolicy do
use Piazza.Ecto.Schema
alias Core.Schema.{User, ImpersonationPolicyBinding}
schema "impersonation_policies" do
belongs_to :user, User
has_many :bindings, ImpersonationPolicyBinding,
on_replace: :delete,
foreign_key: :policy_id
timestamps()
... | 21.56 | 54 | 0.699443 |
ff82441868264d4c3aee6366fea0d23fa37ff892 | 1,649 | exs | Elixir | apps/ewallet_db/priv/repo/migrations/20180405195847_rename_relation_id_to_relation_uuid.exs | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | 1 | 2018-12-07T06:21:21.000Z | 2018-12-07T06:21:21.000Z | apps/ewallet_db/priv/repo/migrations/20180405195847_rename_relation_id_to_relation_uuid.exs | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | null | null | null | apps/ewallet_db/priv/repo/migrations/20180405195847_rename_relation_id_to_relation_uuid.exs | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | null | null | null | defmodule EWalletDB.Repo.Migrations.RenameRelationIdToRelationUuid do
use Ecto.Migration
@tables [
account: [
parent_id: :parent_uuid
],
api_key: [
account_id: :account_uuid
],
auth_token: [
user_id: :user_uuid
],
balance: [
user_id: :user_uuid,
minted_toke... | 21.697368 | 69 | 0.600364 |
ff825ae1da39b538fc642e51e813cd3e392785a6 | 185 | exs | Elixir | priv/repo/migrations/20200627062001_add_description_to_product.exs | abmBispo/elixir-ecommerce | 0507f7621d68ba8f0f65409a1a503683b7c0d37b | [
"MIT"
] | 4 | 2020-05-29T03:33:02.000Z | 2021-08-21T23:01:48.000Z | priv/repo/migrations/20200627062001_add_description_to_product.exs | abmBispo/elixir-ecommerce | 0507f7621d68ba8f0f65409a1a503683b7c0d37b | [
"MIT"
] | 2 | 2020-07-29T01:50:46.000Z | 2021-08-31T20:10:47.000Z | priv/repo/migrations/20200627062001_add_description_to_product.exs | abmBispo/elixir-ecommerce | 0507f7621d68ba8f0f65409a1a503683b7c0d37b | [
"MIT"
] | 1 | 2022-03-21T18:13:21.000Z | 2022-03-21T18:13:21.000Z | defmodule ElixirEcommerce.Repo.Migrations.AddDescriptionToProduct do
use Ecto.Migration
def change do
alter table(:products) do
add :description, :text
end
end
end
| 18.5 | 68 | 0.740541 |
ff827bc22e4406092284c6ffd4474296e49c98fb | 5,759 | ex | Elixir | lib/petal_components/pagination.ex | cohawk/petal_components | 2741c4de66fa8dfa2896fe1e6e02f1d1653422cd | [
"MIT"
] | null | null | null | lib/petal_components/pagination.ex | cohawk/petal_components | 2741c4de66fa8dfa2896fe1e6e02f1d1653422cd | [
"MIT"
] | null | null | null | lib/petal_components/pagination.ex | cohawk/petal_components | 2741c4de66fa8dfa2896fe1e6e02f1d1653422cd | [
"MIT"
] | null | null | null | defmodule PetalComponents.Pagination do
use Phoenix.Component
alias PetalComponents.Heroicons
import PetalComponents.Link
# prop path, :string
# prop class, :string
# prop sibling_count, :integer
# prop boundary_count, :integer
# prop link_type, :string, options: ["a", "live_patch", "live_redirect"]
... | 40.843972 | 315 | 0.612259 |
ff8289e11d74f17c964644888c72da544f40fed9 | 136 | ex | Elixir | lib/pgsub_web/controllers/page_controller.ex | bredikhin/phoenix-postgresql-notify-listen-example | 1b6be1963a9da90e166f7b345850fbfd95d17498 | [
"MIT"
] | 18 | 2017-07-27T10:13:46.000Z | 2021-09-03T22:28:28.000Z | lib/pgsub_web/controllers/page_controller.ex | bredikhin/phoenix-postgresql-notify-listen-example | 1b6be1963a9da90e166f7b345850fbfd95d17498 | [
"MIT"
] | 1 | 2021-04-27T10:15:22.000Z | 2021-04-27T10:15:22.000Z | lib/pgsub_web/controllers/page_controller.ex | bredikhin/phoenix-postgresql-notify-listen-example | 1b6be1963a9da90e166f7b345850fbfd95d17498 | [
"MIT"
] | 3 | 2020-08-30T09:05:35.000Z | 2022-01-24T09:06:15.000Z | defmodule PgsubWeb.PageController do
use PgsubWeb, :controller
def index(conn, _params) do
render conn, "index.html"
end
end
| 17 | 36 | 0.735294 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.