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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7a802d42fa8f38678b7bd31dcad2a43821942399 | 2,149 | ex | Elixir | clients/document_ai/lib/google_api/document_ai/v1beta3/model/google_cloud_documentai_v1beta3_list_processor_versions_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/document_ai/lib/google_api/document_ai/v1beta3/model/google_cloud_documentai_v1beta3_list_processor_versions_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/document_ai/lib/google_api/document_ai/v1beta3/model/google_cloud_documentai_v1beta3_list_processor_versions_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 33.061538 | 169 | 0.74081 |
7a804a4f3f581c708debf4edf5d4d9d1d041c214 | 723 | ex | Elixir | apps/fz_http/lib/fz_http_web/user_from_auth.ex | mdp/firezone | 53d8f0803a7ef005fdca3ae8c6fa9c3483ae5cbc | [
"Apache-2.0"
] | null | null | null | apps/fz_http/lib/fz_http_web/user_from_auth.ex | mdp/firezone | 53d8f0803a7ef005fdca3ae8c6fa9c3483ae5cbc | [
"Apache-2.0"
] | null | null | null | apps/fz_http/lib/fz_http_web/user_from_auth.ex | mdp/firezone | 53d8f0803a7ef005fdca3ae8c6fa9c3483ae5cbc | [
"Apache-2.0"
] | null | null | null | defmodule FzHttpWeb.UserFromAuth do
@moduledoc """
Authenticates users.
"""
alias FzHttp.Users
alias FzHttpWeb.Authentication
alias Ueberauth.Auth
def find_or_create(
%Auth{
provider: :identity,
info: %Auth.Info{email: email},
credentials: %Auth.Credentials{other: %... | 25.821429 | 87 | 0.652835 |
7a805ad6ab34fb706c91b623c1b2de3a75950aed | 76,089 | exs | Elixir | test/ecto/changeset_test.exs | ppraisethesun/ecto | 47ae9c8dcf8d6cdd5e67d18c0f56664b66d054f8 | [
"Apache-2.0"
] | null | null | null | test/ecto/changeset_test.exs | ppraisethesun/ecto | 47ae9c8dcf8d6cdd5e67d18c0f56664b66d054f8 | [
"Apache-2.0"
] | null | null | null | test/ecto/changeset_test.exs | ppraisethesun/ecto | 47ae9c8dcf8d6cdd5e67d18c0f56664b66d054f8 | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.ChangesetTest do
use ExUnit.Case, async: true
import Ecto.Changeset
require Ecto.Query
defmodule SocialSource do
use Ecto.Schema
@primary_key false
embedded_schema do
field :origin
field :url
end
def changeset(schema \\ %SocialSource{}, params) do
cast(sch... | 38.584686 | 167 | 0.634625 |
7a80c1147342ca91a5ede7b18f1a86b09994f7d2 | 2,242 | exs | Elixir | test/events_tools_web/controllers/tag_controller_test.exs | Apps-Team/conferencetools | ce2e16a3e4a521dc4682e736a209e6dd380c050d | [
"Apache-2.0"
] | null | null | null | test/events_tools_web/controllers/tag_controller_test.exs | Apps-Team/conferencetools | ce2e16a3e4a521dc4682e736a209e6dd380c050d | [
"Apache-2.0"
] | 6 | 2017-10-05T20:16:34.000Z | 2017-10-05T20:36:11.000Z | test/events_tools_web/controllers/tag_controller_test.exs | apps-team/events-tools | ce2e16a3e4a521dc4682e736a209e6dd380c050d | [
"Apache-2.0"
] | null | null | null | defmodule EventsToolsWeb.TagControllerTest do
use EventsToolsWeb.ConnCase
alias EventsTools.Tags
@create_attrs %{name: "some name"}
@update_attrs %{name: "some updated name"}
@invalid_attrs %{name: nil}
def fixture(:tag) do
{:ok, tag} = Tags.create_tag(@create_attrs)
tag
end
test "lists all ... | 32.028571 | 93 | 0.666369 |
7a80f5dd3b37d8a33a958f3a1e618a99169b8197 | 5,244 | exs | Elixir | test/models_test.exs | chazsconi/kazan | da42cef9686584ed7b46428780d099ce77dae3ea | [
"MIT"
] | null | null | null | test/models_test.exs | chazsconi/kazan | da42cef9686584ed7b46428780d099ce77dae3ea | [
"MIT"
] | null | null | null | test/models_test.exs | chazsconi/kazan | da42cef9686584ed7b46428780d099ce77dae3ea | [
"MIT"
] | null | null | null | defmodule KazanModelsTest do
use ExUnit.Case
alias Kazan.Models
alias Kazan.Models.Api.V1
alias Kazan.Models.Apis.Extensions.V1beta1
alias Kazan.Models.Apis.Rbac
test "that we have some models" do
# Not a particularly thorough test, but whatever:
%V1.AttachedVolume{
device_path: "test",
... | 25.090909 | 72 | 0.517925 |
7a81037296ed223d40b7e4f195b212bf3b9e8b81 | 12,662 | exs | Elixir | test/ecto/date_time_test.exs | mbuhot/ecto | e6c4c7df0af055ba4bae8737908b98ae85352d2f | [
"Apache-2.0"
] | null | null | null | test/ecto/date_time_test.exs | mbuhot/ecto | e6c4c7df0af055ba4bae8737908b98ae85352d2f | [
"Apache-2.0"
] | null | null | null | test/ecto/date_time_test.exs | mbuhot/ecto | e6c4c7df0af055ba4bae8737908b98ae85352d2f | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.DateTest do
use ExUnit.Case, async: true
@date %Ecto.Date{year: 2015, month: 12, day: 31}
@leap_date %Ecto.Date{year: 2000, month: 2, day: 29}
test "cast itself" do
assert Ecto.Date.cast(@date) == {:ok, @date}
end
test "cast strings" do
assert Ecto.Date.cast("2015-12-31") == {:ok, ... | 37.5727 | 107 | 0.582136 |
7a8103d498d6e6d340185eb5855b1703e94a8753 | 357 | exs | Elixir | priv/repo/migrations/20210730003328_create_verses.exs | wbotelhos/graphql-with-absinthe-on-phoenix | f831d4c78bbba821ef2dd6deee5e3640aff864a5 | [
"MIT"
] | 1 | 2021-08-03T20:30:49.000Z | 2021-08-03T20:30:49.000Z | priv/repo/migrations/20210730003328_create_verses.exs | wbotelhos/graphql-with-absinthe-on-phoenix | f831d4c78bbba821ef2dd6deee5e3640aff864a5 | [
"MIT"
] | null | null | null | priv/repo/migrations/20210730003328_create_verses.exs | wbotelhos/graphql-with-absinthe-on-phoenix | f831d4c78bbba821ef2dd6deee5e3640aff864a5 | [
"MIT"
] | null | null | null | defmodule GraphqlWithAbsintheOnPhoenix.Repo.Migrations.CreateVerses do
use Ecto.Migration
def change do
create table(:verses) do
add :chapter, :integer
add :number, :integer
add :body, :string
add :book_id, references(:books, on_delete: :nothing)
timestamps()
end
create ... | 21 | 70 | 0.67507 |
7a810dd4cf5a76dd57aa241d628d4182f0bd925e | 853 | exs | Elixir | mix.exs | surgeventures/ex_amp | 56b177e7ac017dff009de1972297ccf5c821330b | [
"MIT"
] | null | null | null | mix.exs | surgeventures/ex_amp | 56b177e7ac017dff009de1972297ccf5c821330b | [
"MIT"
] | null | null | null | mix.exs | surgeventures/ex_amp | 56b177e7ac017dff009de1972297ccf5c821330b | [
"MIT"
] | null | null | null | defmodule ExAmp.MixProject do
use Mix.Project
@github_url "https://github.com/surgeventures/ex-amp"
def project do
[
app: :ex_amp,
version: "0.1.0",
elixir: "~> 1.7",
start_permanent: Mix.env() == :prod,
deps: deps(),
name: "ExAmp",
description: "Prepare, release an... | 19.837209 | 83 | 0.50762 |
7a811801fc2f7267019ca018a3156ff5bd5646d7 | 412 | exs | Elixir | test/controllers/old_animal_api_controller_test.exs | marick/eecrit | 50b1ebeadc5cf21ea9f9df6add65e4d7037e2482 | [
"MIT"
] | 10 | 2016-07-15T15:57:33.000Z | 2018-06-09T00:40:46.000Z | test/controllers/old_animal_api_controller_test.exs | marick/eecrit | 50b1ebeadc5cf21ea9f9df6add65e4d7037e2482 | [
"MIT"
] | null | null | null | test/controllers/old_animal_api_controller_test.exs | marick/eecrit | 50b1ebeadc5cf21ea9f9df6add65e4d7037e2482 | [
"MIT"
] | 6 | 2016-07-15T15:57:41.000Z | 2018-03-22T16:38:00.000Z | defmodule Eecrit.OldAnimalApiControllerTest do
use Eecrit.ConnCase
# alias Eecrit.OldAnimal
# @valid_attrs %{}
# @invalid_attrs %{}
setup %{conn: conn} do
{:ok, conn: put_req_header(conn, "accept", "application/json")}
end
test "lists all entries on index", %{conn: conn} do
conn = get conn, old... | 22.888889 | 67 | 0.674757 |
7a8126467a989e0ce586665d07c127b033995fd1 | 67,085 | ex | Elixir | lib/elixir/lib/code/formatter.ex | mertonium/elixir | 74e666156906974082f6b4d34dfbe6988d6465c0 | [
"Apache-2.0"
] | 1 | 2018-10-02T13:55:29.000Z | 2018-10-02T13:55:29.000Z | lib/elixir/lib/code/formatter.ex | mertonium/elixir | 74e666156906974082f6b4d34dfbe6988d6465c0 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/code/formatter.ex | mertonium/elixir | 74e666156906974082f6b4d34dfbe6988d6465c0 | [
"Apache-2.0"
] | null | null | null | defmodule Code.Formatter do
@moduledoc false
import Inspect.Algebra, except: [format: 2, surround: 3, surround: 4]
@double_quote "\""
@double_heredoc "\"\"\""
@single_quote "'"
@single_heredoc "'''"
@newlines 2
@min_line 0
@max_line 9_999_999
@empty empty()
@ampersand_prec Code.Identifier.unary_o... | 30.548725 | 102 | 0.631304 |
7a812e2231e65668e6ccb34c2f49660ed9bd3232 | 7,651 | ex | Elixir | lib/cryptozaur/drivers/huobi_rest.ex | DenisGorbachev/crypto-cli | 94e5097ff24237fbc5fdd3fea371a5c9a1f727e4 | [
"MIT"
] | 5 | 2018-09-19T09:13:15.000Z | 2021-10-20T23:29:57.000Z | lib/cryptozaur/drivers/huobi_rest.ex | DenisGorbachev/crypto-cli | 94e5097ff24237fbc5fdd3fea371a5c9a1f727e4 | [
"MIT"
] | 6 | 2018-07-29T05:33:02.000Z | 2018-09-18T20:42:19.000Z | lib/cryptozaur/drivers/huobi_rest.ex | DenisGorbachev/crypto-cli | 94e5097ff24237fbc5fdd3fea371a5c9a1f727e4 | [
"MIT"
] | 3 | 2018-07-24T05:55:04.000Z | 2018-09-19T09:14:08.000Z | defmodule Cryptozaur.Drivers.HuobiRest do
use GenServer
require OK
import OK, only: [success: 1, failure: 1, ~>>: 2]
import Logger
import Cryptozaur.Utils
@timeout 600_000
@http_timeout 60000
# rate limits:
# - 100 req / 10 sec
# https://github.com/huobiapi/API_Docs_en/wiki/Request_Process
# ht... | 32.147059 | 187 | 0.641485 |
7a813863d6d05ed12048522c84285b67ecd94e6f | 2,580 | exs | Elixir | test/srp/server_test.exs | thiamsantos/spr | c1db6c338543ecb9ec4d855d05a125a490c1606b | [
"Apache-2.0"
] | 15 | 2018-11-03T18:39:21.000Z | 2022-02-21T22:17:50.000Z | test/srp/server_test.exs | thiamsantos/spr | c1db6c338543ecb9ec4d855d05a125a490c1606b | [
"Apache-2.0"
] | 7 | 2018-10-27T00:13:08.000Z | 2019-05-14T16:43:36.000Z | test/srp/server_test.exs | thiamsantos/spr | c1db6c338543ecb9ec4d855d05a125a490c1606b | [
"Apache-2.0"
] | 3 | 2019-05-14T16:24:04.000Z | 2019-07-06T21:47:40.000Z | defmodule SRP.ServerTest do
use ExUnit.Case, async: true
doctest SRP.Server
defmodule SRPServer do
use SRP.Server
end
defmodule SRPServerWithOptions do
use SRP.Server, prime_size: 8192, hash_algorithm: :sha512
end
describe "support srp client" do
test "should generate premaster key" do
... | 26.060606 | 81 | 0.594186 |
7a8153beae412da707f4ff7629213e2008a4c17b | 76 | exs | Elixir | live_view_studio/test/test_helper.exs | JJeancarlocc/pragstudio-liview-code | 6015d5a505f154678bdca139b70a38d08550889a | [
"Unlicense"
] | null | null | null | live_view_studio/test/test_helper.exs | JJeancarlocc/pragstudio-liview-code | 6015d5a505f154678bdca139b70a38d08550889a | [
"Unlicense"
] | null | null | null | live_view_studio/test/test_helper.exs | JJeancarlocc/pragstudio-liview-code | 6015d5a505f154678bdca139b70a38d08550889a | [
"Unlicense"
] | null | null | null | ExUnit.start()
Ecto.Adapters.SQL.Sandbox.mode(LiveViewStudio.Repo, :manual)
| 25.333333 | 60 | 0.802632 |
7a81626238a10bd88266cf1138369f4fd0b04d99 | 1,391 | ex | Elixir | clients/tool_results/lib/google_api/tool_results/v1beta3/model/stack_trace.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/tool_results/lib/google_api/tool_results/v1beta3/model/stack_trace.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/tool_results/lib/google_api/tool_results/v1beta3/model/stack_trace.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... | 29.595745 | 92 | 0.73688 |
7a816a18dd60eb0f43e63482e534c09b2940c8d9 | 2,888 | exs | Elixir | test/findmy_personal/members_test.exs | carlosviana/find_mypersonal | 6fadea6135b074a296c6f2a501a694b5222ec6db | [
"MIT"
] | null | null | null | test/findmy_personal/members_test.exs | carlosviana/find_mypersonal | 6fadea6135b074a296c6f2a501a694b5222ec6db | [
"MIT"
] | 6 | 2021-07-06T17:41:35.000Z | 2021-07-10T10:26:30.000Z | test/findmy_personal/members_test.exs | carlosviana/find_mypersonal | 6fadea6135b074a296c6f2a501a694b5222ec6db | [
"MIT"
] | null | null | null | defmodule FindmyPersonal.MembersTest do
use FindmyPersonal.DataCase
alias FindmyPersonal.Members
describe "members" do
alias FindmyPersonal.Members.Member
@valid_attrs %{
birth_date: ~D[2010-04-17],
blood: "some blood",
email: "some email",
height: "some height",
name: "so... | 32.449438 | 98 | 0.652701 |
7a816ba4cabed09b2b352457c6b62e88a05e2f5b | 1,078 | ex | Elixir | test/support/conn_case.ex | xelcer/phoenix_demo | 84dc516441dd715db7e24b1384c2fea3adffe0f7 | [
"MIT"
] | null | null | null | test/support/conn_case.ex | xelcer/phoenix_demo | 84dc516441dd715db7e24b1384c2fea3adffe0f7 | [
"MIT"
] | null | null | null | test/support/conn_case.ex | xelcer/phoenix_demo | 84dc516441dd715db7e24b1384c2fea3adffe0f7 | [
"MIT"
] | null | null | null | defmodule Demo.ConnCase do
@moduledoc """
This module defines the test case to be used by
tests that require setting up a connection.
Such tests rely on `Phoenix.ConnTest` and also
import other functionality to make it easier
to build and query models.
Finally, if the test case interacts with the databa... | 23.955556 | 66 | 0.699443 |
7a8178b46b7007079a8a9184b21063f1eceefef7 | 522 | ex | Elixir | elixir/message/lib/message/application.ex | honeycombio/example-greeting-service | 52365a5f2ae434d0b3a84b10889486184042cbc3 | [
"Apache-2.0"
] | 8 | 2020-12-29T17:44:16.000Z | 2021-11-18T22:18:42.000Z | elixir/message/lib/message/application.ex | honeycombio/example-greeting-service | 52365a5f2ae434d0b3a84b10889486184042cbc3 | [
"Apache-2.0"
] | 36 | 2021-04-08T14:30:02.000Z | 2022-03-30T22:06:44.000Z | elixir/message/lib/message/application.ex | honeycombio/example-greeting-service | 52365a5f2ae434d0b3a84b10889486184042cbc3 | [
"Apache-2.0"
] | 1 | 2021-04-05T10:52:23.000Z | 2021-04-05T10:52:23.000Z | defmodule Message.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
@impl true
def start(_type, _args) do
children = [
{Plug.Cowboy, scheme: :http, plug: Message, options: [port: 9000]}
]
# See htt... | 26.1 | 72 | 0.704981 |
7a818c1c80cdf3cc7473b8978312ff777d01d2e0 | 109 | ex | Elixir | lib/state_chart/runtime/raise.ex | johnnyt/ex_statechart | 54b4df032700917df578b0a4543338a96864d2e5 | [
"MIT"
] | null | null | null | lib/state_chart/runtime/raise.ex | johnnyt/ex_statechart | 54b4df032700917df578b0a4543338a96864d2e5 | [
"MIT"
] | null | null | null | lib/state_chart/runtime/raise.ex | johnnyt/ex_statechart | 54b4df032700917df578b0a4543338a96864d2e5 | [
"MIT"
] | 1 | 2020-11-11T15:57:52.000Z | 2020-11-11T15:57:52.000Z | defmodule StateChart.Runtime.Raise do
use StateChart.Definition do
field(:string, :event, 1)
end
end
| 18.166667 | 37 | 0.743119 |
7a818f55ce38ddd24083a7cf10b86be09e0c7346 | 598 | exs | Elixir | test/crc_test.exs | ericsalim/exemvi | 9d59d2201fc681e90e53376a4a375053642f2e45 | [
"Apache-2.0"
] | 3 | 2021-02-22T05:35:37.000Z | 2021-06-01T13:50:57.000Z | test/crc_test.exs | ericsalim/exemvi | 9d59d2201fc681e90e53376a4a375053642f2e45 | [
"Apache-2.0"
] | 1 | 2021-02-21T14:33:17.000Z | 2021-02-21T14:33:17.000Z | test/crc_test.exs | ericsalim/exemvi | 9d59d2201fc681e90e53376a4a375053642f2e45 | [
"Apache-2.0"
] | null | null | null | defmodule CRCTest do
use ExUnit.Case
test "calculation is successful 1" do
mpm_sample = "00020101021229300012D156000000000510A93FO3230Q31280012D15600000001030812345678520441115802CN5914BEST TRANSPORT6007BEIJING64200002ZH0104最佳运输0202北京540523.7253031565502016233030412340603***0708A60086670902ME91320016A011223344... | 37.375 | 263 | 0.812709 |
7a81ac1356bd9ae97456288672e5d7b78d267963 | 288 | exs | Elixir | priv/repo/migrations/20180628181701_remove_selfassignableroles_id.exs | CyberFlameGO/bolt | 225e6276983bec646e7f13519df066e8e1e770ed | [
"ISC"
] | 31 | 2018-12-06T23:12:33.000Z | 2022-03-29T18:34:25.000Z | priv/repo/migrations/20180628181701_remove_selfassignableroles_id.exs | CyberFlameGO/bolt | 225e6276983bec646e7f13519df066e8e1e770ed | [
"ISC"
] | 18 | 2021-06-14T19:03:26.000Z | 2022-03-15T17:46:22.000Z | priv/repo/migrations/20180628181701_remove_selfassignableroles_id.exs | CyberFlameGO/bolt | 225e6276983bec646e7f13519df066e8e1e770ed | [
"ISC"
] | 4 | 2018-11-07T18:52:28.000Z | 2022-03-16T00:14:38.000Z | defmodule Bolt.Repo.Migrations.RemoveSelfassignablerolesId do
use Ecto.Migration
def up do
alter table("selfassignableroles") do
remove(:id)
end
end
def down do
alter table("selfassignableroles") do
add(:id, :bigint, primary_key: true)
end
end
end
| 18 | 61 | 0.690972 |
7a81f95bf1e2d76149e2b243bac7c996b92ad69b | 4,157 | ex | Elixir | lib/Radpath/files.ex | lowks/Radpath | 512d10a8f27c887b47f378b078e5abc1f3b9ea0e | [
"MIT"
] | 20 | 2015-01-17T14:52:54.000Z | 2022-03-01T19:12:37.000Z | lib/Radpath/files.ex | lowks/Radpath | 512d10a8f27c887b47f378b078e5abc1f3b9ea0e | [
"MIT"
] | 25 | 2015-01-28T02:02:40.000Z | 2020-02-12T01:43:30.000Z | lib/Radpath/files.ex | lowks/Radpath | 512d10a8f27c887b47f378b078e5abc1f3b9ea0e | [
"MIT"
] | 7 | 2015-03-05T04:12:39.000Z | 2022-03-01T19:12:43.000Z | defmodule Radpath.Files do
defmacro __using__([]) do
quote do
@moduledoc """
Radpath handling files/directories manipulation.
"""
@doc """
Returns all of the files in the given path, and if ext is
given will filter by that extname.
## Arguments
- `path` Path of file to fil... | 25.819876 | 95 | 0.592254 |
7a821f442d9d45ba69ea49f908a5e9e22c75d0fe | 1,999 | exs | Elixir | config/dev.exs | rkalz/dragonhacks-backend | 377ed0383f403c720af30bc8ef4f3fdaf89b3e38 | [
"MIT"
] | 1 | 2019-04-03T01:48:59.000Z | 2019-04-03T01:48:59.000Z | config/dev.exs | rkalz/dragonhacks-backend | 377ed0383f403c720af30bc8ef4f3fdaf89b3e38 | [
"MIT"
] | null | null | null | config/dev.exs | rkalz/dragonhacks-backend | 377ed0383f403c720af30bc8ef4f3fdaf89b3e38 | [
"MIT"
] | 1 | 2019-03-31T21:21:47.000Z | 2019-03-31T21:21:47.000Z | 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 :dragonhacks, DragonhacksWeb.Endpoint,
http: [... | 33.881356 | 170 | 0.709855 |
7a8256ff02b0ecb1baaf436f4b1e86b7707af990 | 1,408 | ex | Elixir | lib/web_driver_client/json_wire_protocol_client/commands/start_session.ex | fimassuda/web_driver_client | 09d373c9a8a923c5e2860f107f84b16565e338f7 | [
"MIT"
] | 8 | 2019-11-24T18:33:12.000Z | 2020-12-09T10:20:09.000Z | lib/web_driver_client/json_wire_protocol_client/commands/start_session.ex | fimassuda/web_driver_client | 09d373c9a8a923c5e2860f107f84b16565e338f7 | [
"MIT"
] | 67 | 2019-12-20T16:33:30.000Z | 2021-09-14T03:50:10.000Z | lib/web_driver_client/json_wire_protocol_client/commands/start_session.ex | fimassuda/web_driver_client | 09d373c9a8a923c5e2860f107f84b16565e338f7 | [
"MIT"
] | 10 | 2020-06-19T16:15:03.000Z | 2021-09-13T17:56:25.000Z | defmodule WebDriverClient.JSONWireProtocolClient.Commands.StartSession do
@moduledoc false
alias WebDriverClient.Config
alias WebDriverClient.ConnectionError
alias WebDriverClient.HTTPResponse
alias WebDriverClient.JSONWireProtocolClient.ResponseParser
alias WebDriverClient.JSONWireProtocolClient.TeslaClie... | 39.111111 | 96 | 0.737216 |
7a8298622987271cb45cf7bcb4fd810114275c3e | 1,662 | ex | Elixir | lib/hello_release_web.ex | mattiaslundberg/phoenix-deploy-example | 4c1c3855ecbce145cb951d14287bcd3a9044e593 | [
"MIT"
] | null | null | null | lib/hello_release_web.ex | mattiaslundberg/phoenix-deploy-example | 4c1c3855ecbce145cb951d14287bcd3a9044e593 | [
"MIT"
] | null | null | null | lib/hello_release_web.ex | mattiaslundberg/phoenix-deploy-example | 4c1c3855ecbce145cb951d14287bcd3a9044e593 | [
"MIT"
] | null | null | null | defmodule HelloReleaseWeb 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 HelloReleaseWeb, :controller
use HelloReleaseWeb, :view
The definitions below will be executed for every view,... | 24.441176 | 69 | 0.697954 |
7a82c39bb417cc3659173d26d8065f914dd5901a | 768 | exs | Elixir | test/clean_mixer/arch_map/filter/pattern_test.exs | mugimaru73/clean_mixer | cd234a9b0c2823f1f9c2c2ba1cdab92a0cb08c3d | [
"Apache-2.0"
] | null | null | null | test/clean_mixer/arch_map/filter/pattern_test.exs | mugimaru73/clean_mixer | cd234a9b0c2823f1f9c2c2ba1cdab92a0cb08c3d | [
"Apache-2.0"
] | null | null | null | test/clean_mixer/arch_map/filter/pattern_test.exs | mugimaru73/clean_mixer | cd234a9b0c2823f1f9c2c2ba1cdab92a0cb08c3d | [
"Apache-2.0"
] | null | null | null | defmodule CleanMixer.ArchMap.Filter.PatternTest do
use ExUnit.Case
alias CleanMixer.ArchMap.Filter.Pattern
test "it matches exact patters" do
assert Pattern.new("exact-string") |> Pattern.match_str?("exact-string")
refute Pattern.new("exact-string") |> Pattern.match_str?("other-string")
end
test "i... | 40.421053 | 110 | 0.733073 |
7a82d795d3392a33286854c3c8059a6223bf50ec | 442 | ex | Elixir | test/support/module_types.ex | kianmeng/Domo | 1dcd2a0fb7d11b8c99db45b76aca95825db27d3b | [
"MIT"
] | 101 | 2020-06-11T23:51:50.000Z | 2022-03-30T16:29:18.000Z | test/support/module_types.ex | kianmeng/Domo | 1dcd2a0fb7d11b8c99db45b76aca95825db27d3b | [
"MIT"
] | 11 | 2020-10-11T11:50:24.000Z | 2022-02-12T08:54:50.000Z | test/support/module_types.ex | kianmeng/Domo | 1dcd2a0fb7d11b8c99db45b76aca95825db27d3b | [
"MIT"
] | 4 | 2020-07-02T08:54:22.000Z | 2021-12-26T09:59:15.000Z | defmodule ModuleTypes do
@moduledoc false
def types(bytecode) do
bytecode
|> Code.Typespec.fetch_types()
|> elem(1)
|> Enum.sort()
end
def specs(bytecode) do
bytecode
|> Code.Typespec.fetch_specs()
|> elem(1)
|> Enum.sort()
end
def specs_to_string(specs) do
specs
|... | 18.416667 | 91 | 0.622172 |
7a82e8c47614ecad8577a2da237c8c30d89df1a3 | 141 | ex | Elixir | core/src/main/java/site/ycsb/data_gen/Graph_gen/Graph_gen/examples/maggen/Makefile.ex | qiuhere/Bench | 80f15facb81120b754547586cf3a7e5f46ca1551 | [
"Apache-2.0"
] | 1,805 | 2015-01-06T20:01:35.000Z | 2022-03-29T16:12:51.000Z | examples/maggen/Makefile.ex | lizhaoqing/snap | 907c34aac6bcddc7c2f8efb64be76e87dd7e4ea5 | [
"BSD-3-Clause"
] | 168 | 2015-01-07T22:57:29.000Z | 2022-03-15T01:20:24.000Z | examples/maggen/Makefile.ex | lizhaoqing/snap | 907c34aac6bcddc7c2f8efb64be76e87dd7e4ea5 | [
"BSD-3-Clause"
] | 768 | 2015-01-09T02:28:45.000Z | 2022-03-30T00:53:46.000Z | #
# configuration variables for the example
## Main application file
MAIN = maggen
DEPH = $(EXSNAPADV)/mag.h
DEPCPP = $(EXSNAPADV)/mag.cpp
| 15.666667 | 41 | 0.723404 |
7a82f33effadc4706103c208b6226841892ef687 | 5,701 | exs | Elixir | test/models_test.exs | vickerysec/obmarg_kazan | 27e9ab923dd2a3b89e030de918f4d7c9da316248 | [
"MIT"
] | null | null | null | test/models_test.exs | vickerysec/obmarg_kazan | 27e9ab923dd2a3b89e030de918f4d7c9da316248 | [
"MIT"
] | null | null | null | test/models_test.exs | vickerysec/obmarg_kazan | 27e9ab923dd2a3b89e030de918f4d7c9da316248 | [
"MIT"
] | null | null | null | defmodule KazanModelsTest do
use ExUnit.Case
alias Kazan.Models
alias Kazan.Apis.Rbac
alias Kazan.Apis.Core
alias Kazan.Apis.Extensions
test "that we have some models" do
# Not a particularly thorough test, but whatever:
%Core.V1.AttachedVolume{
device_path: "test",
name: "test"
}
... | 26.393519 | 78 | 0.495878 |
7a830ac46c14c2745d77b5797a78f18244df857a | 363 | ex | Elixir | lib/videoke/accounts/user.ex | ElixirLabOrg/videoke | 85873be94f17167c505c6d1066e30e30b8acd148 | [
"MIT"
] | null | null | null | lib/videoke/accounts/user.ex | ElixirLabOrg/videoke | 85873be94f17167c505c6d1066e30e30b8acd148 | [
"MIT"
] | null | null | null | lib/videoke/accounts/user.ex | ElixirLabOrg/videoke | 85873be94f17167c505c6d1066e30e30b8acd148 | [
"MIT"
] | null | null | null | defmodule Videoke.Accounts.User do
use Ecto.Schema
import Ecto.Changeset
schema "users" do
field :name, :string
field :username, :string
timestamps()
end
def changeset(user, attrs) do
user
|> cast(attrs, [:name, :username])
|> validate_required([:name, :username])
|> validate_le... | 19.105263 | 50 | 0.652893 |
7a832481910eddb9d12ab08e0d9eb475e7d83e99 | 172 | ex | Elixir | lib/rustler_live_view_toy/engine/types/config.ex | supernintendo/rustler_live_view_toy | 4faeb662daae4238142d3f560ef22d5cd26bb3c6 | [
"Apache-2.0"
] | 1 | 2019-10-07T09:30:16.000Z | 2019-10-07T09:30:16.000Z | lib/rustler_live_view_toy/engine/types/config.ex | supernintendo/rustler_live_view_toy | 4faeb662daae4238142d3f560ef22d5cd26bb3c6 | [
"Apache-2.0"
] | 2 | 2021-03-09T19:17:39.000Z | 2021-05-10T16:30:30.000Z | lib/rustler_live_view_toy/engine/types/config.ex | supernintendo/rustler_live_view_toy | 4faeb662daae4238142d3f560ef22d5cd26bb3c6 | [
"Apache-2.0"
] | null | null | null | defmodule RustlerLiveViewToy.Engine.Config do
use TypedStruct
typedstruct do
field :master_key, String.t()
field :tcp_port, integer(), default: 6142
end
end
| 19.111111 | 45 | 0.738372 |
7a832e48068839a3a98e9f6bd16b71039e8d2148 | 809 | exs | Elixir | apps/fz_common/mix.exs | jasonboukheir/firezone | 79d610b94f67ae25c8ca26f391c0edf288f6aaa5 | [
"Apache-2.0"
] | null | null | null | apps/fz_common/mix.exs | jasonboukheir/firezone | 79d610b94f67ae25c8ca26f391c0edf288f6aaa5 | [
"Apache-2.0"
] | null | null | null | apps/fz_common/mix.exs | jasonboukheir/firezone | 79d610b94f67ae25c8ca26f391c0edf288f6aaa5 | [
"Apache-2.0"
] | null | null | null | defmodule FzCommon.MixProject do
use Mix.Project
def project do
[
app: :fz_common,
version: "0.2.0",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixir: "~> 1.11",
start_permanent: Mix.e... | 23.114286 | 88 | 0.561187 |
7a8331d6f73f0ed6746632a9c8765f5b8ce733b6 | 3,788 | ex | Elixir | farmbot_ext/lib/farmbot_ext/amqp/log_channel.ex | va2ron1/farmbot_os | c80a38058713adc2ad91a4802664bcfe8da9d96c | [
"MIT"
] | null | null | null | farmbot_ext/lib/farmbot_ext/amqp/log_channel.ex | va2ron1/farmbot_os | c80a38058713adc2ad91a4802664bcfe8da9d96c | [
"MIT"
] | null | null | null | farmbot_ext/lib/farmbot_ext/amqp/log_channel.ex | va2ron1/farmbot_os | c80a38058713adc2ad91a4802664bcfe8da9d96c | [
"MIT"
] | null | null | null | defmodule FarmbotExt.AMQP.LogChannel do
@moduledoc """
Handler for AMQP log channel
"""
use AMQP
use GenServer
require FarmbotCore.Logger
require FarmbotTelemetry
require Logger
alias FarmbotCore.{BotState, JSON}
alias FarmbotExt.AMQP.Support
@checkup_ms 100
@exchange "amq.topic"
defstruc... | 29.826772 | 126 | 0.639388 |
7a83456d52cfc77f996d9b7e95e626cbd2b2e092 | 754 | ex | Elixir | lib/usho_web/request_instrumentor.ex | agleb/usho | e5971569c67e53049c8ce3ccf24d52df7e185026 | [
"MIT"
] | null | null | null | lib/usho_web/request_instrumentor.ex | agleb/usho | e5971569c67e53049c8ce3ccf24d52df7e185026 | [
"MIT"
] | null | null | null | lib/usho_web/request_instrumentor.ex | agleb/usho | e5971569c67e53049c8ce3ccf24d52df7e185026 | [
"MIT"
] | null | null | null | defmodule RequestInstrumentor do
@behaviour Plug
@moduledoc """
A plug to collect the raw data for Alchemetrics
"""
def init(opts \\ []), do: opts
def call(conn, _opts), do: count_request(conn)
defp count_request(conn) do
start = System.monotonic_time()
Plug.Conn.register_before_send(conn, f... | 25.133333 | 94 | 0.676393 |
7a83757c57cd70e3ffabffcc47f024374641028e | 1,857 | exs | Elixir | clients/tag_manager/mix.exs | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/tag_manager/mix.exs | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/tag_manager/mix.exs | 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... | 27.716418 | 113 | 0.658051 |
7a838041d168b6b898a16d04be6993053a5eb256 | 460 | ex | Elixir | lib/models/config.ex | jakehafdahl/email-service | 696c1fce52e0d432ade513ce6ad36edcd76ec0cd | [
"MIT"
] | null | null | null | lib/models/config.ex | jakehafdahl/email-service | 696c1fce52e0d432ade513ce6ad36edcd76ec0cd | [
"MIT"
] | null | null | null | lib/models/config.ex | jakehafdahl/email-service | 696c1fce52e0d432ade513ce6ad36edcd76ec0cd | [
"MIT"
] | null | null | null | defmodule ProfessorStats.ScheduleConfig do
use Ecto.Model
import Ecto.Changeset
schema "configs" do
field :week, :integer
field :season_year, :integer
field :status, :string, default: "WAITING"
field :run_date, Ecto.DateTime
timestamps
end
@required_params ~w(week season_year status run_dat... | 21.904762 | 54 | 0.728261 |
7a8386a2472f92dff42202574c3ba41fc982e4a7 | 375 | ex | Elixir | macros/chapter_1/setters.ex | CrabOnTheBeach/metaprogramming_elixir | a828f38228a6a5f1bf9ae4742329ecb932791d56 | [
"MIT"
] | null | null | null | macros/chapter_1/setters.ex | CrabOnTheBeach/metaprogramming_elixir | a828f38228a6a5f1bf9ae4742329ecb932791d56 | [
"MIT"
] | null | null | null | macros/chapter_1/setters.ex | CrabOnTheBeach/metaprogramming_elixir | a828f38228a6a5f1bf9ae4742329ecb932791d56 | [
"MIT"
] | null | null | null | defmodule CleanSetter do
defmacro bind_name(string) do
quote do
name = unquote(string)
end
end
end
defmodule DirtySetter do
defmacro bind_name(string) do
quote do
var!(name) = unquote(string)
end
end
end
#in iex:
#name = "Chris"
#CleanSetter.bind_name("Max")
#
#name is still "Chris... | 14.423077 | 34 | 0.669333 |
7a8390c0a532e78aa69f7d9ba46b135bbecf4cf2 | 138 | exs | Elixir | chapter_06/modules_and_functions_4_and_5/my_math.exs | dliberalesso/programming_elixir | 267761f8cb885c2ff51a237b92123412729df2e2 | [
"MIT"
] | null | null | null | chapter_06/modules_and_functions_4_and_5/my_math.exs | dliberalesso/programming_elixir | 267761f8cb885c2ff51a237b92123412729df2e2 | [
"MIT"
] | null | null | null | chapter_06/modules_and_functions_4_and_5/my_math.exs | dliberalesso/programming_elixir | 267761f8cb885c2ff51a237b92123412729df2e2 | [
"MIT"
] | null | null | null | defmodule MyMath do
def sum(0), do: 0
def sum(n), do: n + sum(n-1)
def gcd(x, 0), do: x
def gcd(x, y), do: gcd(y, rem(x, y))
end
| 17.25 | 38 | 0.543478 |
7a839c52a04028e4bfeef680330619f0ec6db434 | 2,006 | exs | Elixir | mix.exs | tigertext/kafka_ex_tc | 1f03132d3635281483b323751a60efa3b87586ef | [
"MIT"
] | null | null | null | mix.exs | tigertext/kafka_ex_tc | 1f03132d3635281483b323751a60efa3b87586ef | [
"MIT"
] | null | null | null | mix.exs | tigertext/kafka_ex_tc | 1f03132d3635281483b323751a60efa3b87586ef | [
"MIT"
] | null | null | null | defmodule KafkaEx.Mixfile do
@moduledoc false
use Mix.Project
@source_url "https://github.com/kafkaex/kafka_ex"
@version "0.12.1"
def project do
[
app: :kafka_ex,
version: "0.12.1",
elixir: "~> 1.10.4",
dialyzer: [
plt_add_deps: :transitive,
flags: [
:er... | 24.463415 | 82 | 0.532403 |
7a83b80867c3ed0b24a79503727ab07fca948792 | 1,174 | ex | Elixir | lib/lifx/types/location.ex | kevsmith/lifx_protocol | eaeb02b4ef2896722c2549ce1f1fc253373980ac | [
"Apache-2.0"
] | 1 | 2017-09-06T08:01:45.000Z | 2017-09-06T08:01:45.000Z | lib/lifx/types/location.ex | kevsmith/lifx_protocol | eaeb02b4ef2896722c2549ce1f1fc253373980ac | [
"Apache-2.0"
] | null | null | null | lib/lifx/types/location.ex | kevsmith/lifx_protocol | eaeb02b4ef2896722c2549ce1f1fc253373980ac | [
"Apache-2.0"
] | null | null | null | defmodule Lifx.Types.GetLocation do
defstruct [:ignored]
end
defmodule Lifx.Types.StateLocation do
defstruct location: <<0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0>>,
label: "", updated_at: 0
end
defimpl Lifx.Decoder, for: [Lifx.Types.GetLocation,
Lifx.Types.StateLoca... | 26.681818 | 90 | 0.650767 |
7a83cb041b034428f28d13863bb4b16b92d7637d | 115 | ex | Elixir | lib/home_bot/energy_stream/watercooker/state.ex | marktermaat/home_bot | b6d0bd5e1e97b2b0c95e201618e27de4259378d3 | [
"MIT"
] | null | null | null | lib/home_bot/energy_stream/watercooker/state.ex | marktermaat/home_bot | b6d0bd5e1e97b2b0c95e201618e27de4259378d3 | [
"MIT"
] | null | null | null | lib/home_bot/energy_stream/watercooker/state.ex | marktermaat/home_bot | b6d0bd5e1e97b2b0c95e201618e27de4259378d3 | [
"MIT"
] | null | null | null | defmodule HomeBot.EnergyStream.Watercooker.State do
defstruct previous_usage: 0, active_since: nil, usage: 0
end
| 28.75 | 58 | 0.817391 |
7a83e80bd1282357335a550280022e53df7643bd | 760 | ex | Elixir | packages/api/lib/api_web/views/meow_view.ex | ErikSkare/Meower | ddc5c75004111aa64587994f27085bba1c5bd377 | [
"MIT"
] | 1 | 2022-02-10T20:08:10.000Z | 2022-02-10T20:08:10.000Z | packages/api/lib/api_web/views/meow_view.ex | ErikSkare/Meower | ddc5c75004111aa64587994f27085bba1c5bd377 | [
"MIT"
] | null | null | null | packages/api/lib/api_web/views/meow_view.ex | ErikSkare/Meower | ddc5c75004111aa64587994f27085bba1c5bd377 | [
"MIT"
] | null | null | null | defmodule ApiWeb.MeowView do
use ApiWeb, :view
alias ApiWeb.MeowView
alias ApiWeb.UserView
alias Api.Contents.Meow
def render("index.json", %{meows: meows, viewer: viewer}) do
render_many(meows, MeowView, "meow.json", viewer: viewer)
end
def render("show.json", %{meow: meow, viewer: viewer}) do
... | 28.148148 | 79 | 0.671053 |
7a842339d633ddeb80d81d91822a2e2b7db1d12d | 4,820 | exs | Elixir | test/plantar_web/controllers/user_settings_controller_test.exs | pantanal-labs/plantar | 8b119874fbddf50fe23d435462fb3238bb1d6e42 | [
"MIT"
] | null | null | null | test/plantar_web/controllers/user_settings_controller_test.exs | pantanal-labs/plantar | 8b119874fbddf50fe23d435462fb3238bb1d6e42 | [
"MIT"
] | 23 | 2020-07-29T21:03:00.000Z | 2021-02-01T18:20:35.000Z | test/plantar_web/controllers/user_settings_controller_test.exs | pantanal-labs/plantar | 8b119874fbddf50fe23d435462fb3238bb1d6e42 | [
"MIT"
] | null | null | null | defmodule PlantarWeb.UserSettingsControllerTest do
use PlantarWeb.ConnCase, async: true
alias Plantar.Accounts
import Plantar.AccountsFixtures
setup :register_and_log_in_user
describe "GET /users/settings" do
test "renders settings page", %{conn: conn} do
conn = get(conn, Routes.user_settings_pat... | 38.253968 | 96 | 0.658506 |
7a842847fcb6fc2e8d4ba85fc7ce4267f76c8243 | 1,476 | exs | Elixir | test/arcdown_test.exs | functionhaus/arcdown | 26c9de0d2fadc09e6b74ac2f7855088440845c2f | [
"Apache-2.0"
] | 7 | 2019-01-21T04:17:50.000Z | 2020-03-08T06:40:54.000Z | test/arcdown_test.exs | functionhaus/arcdown | 26c9de0d2fadc09e6b74ac2f7855088440845c2f | [
"Apache-2.0"
] | 3 | 2019-09-19T19:13:09.000Z | 2019-09-26T14:39:23.000Z | test/arcdown_test.exs | functionhaus/arcdown | 26c9de0d2fadc09e6b74ac2f7855088440845c2f | [
"Apache-2.0"
] | null | null | null | defmodule ArcdownTest do
use ExUnit.Case
doctest Arcdown
setup do
content = """
The Day the Earth Stood Still (a.k.a. Farewell to the Master and Journey to the
World) is a 1951 American black-and-white science fiction film from 20th Century
Fox, produced by Julian Blaustein and directed by Robert... | 32.086957 | 84 | 0.665989 |
7a845cf5de737ff0a176d10431707f84fccc4b2a | 2,262 | ex | Elixir | lib/serum/plugins/sitemap_generator.ex | skunkwerks/serum | 45039417a101bf89f3a86a4aa3d42ce41df2d676 | [
"MIT"
] | 302 | 2016-08-01T05:16:06.000Z | 2022-03-26T07:20:46.000Z | lib/serum/plugins/sitemap_generator.ex | skunkwerks/serum | 45039417a101bf89f3a86a4aa3d42ce41df2d676 | [
"MIT"
] | 206 | 2016-08-04T15:18:35.000Z | 2022-03-01T03:07:57.000Z | lib/serum/plugins/sitemap_generator.ex | skunkwerks/serum | 45039417a101bf89f3a86a4aa3d42ce41df2d676 | [
"MIT"
] | 35 | 2016-10-29T13:59:34.000Z | 2022-03-01T01:50:31.000Z | defmodule Serum.Plugins.SitemapGenerator do
@moduledoc """
A Serum plugin that create a sitemap so that the search engine can index posts.
## Using the Plugin
# serum.exs:
%{
server_root: "https://example.io",
plugins: [
{Serum.Plugins.SitemapGenerator, only: :prod}
... | 24.322581 | 81 | 0.632184 |
7a8466d2d2f89264b4113035c80377f0a489893a | 1,535 | exs | Elixir | mix.exs | dkuku/bmp280 | e7cb8fcef0043a354a9c2dde0946ab1d033c0b59 | [
"Apache-2.0"
] | null | null | null | mix.exs | dkuku/bmp280 | e7cb8fcef0043a354a9c2dde0946ab1d033c0b59 | [
"Apache-2.0"
] | null | null | null | mix.exs | dkuku/bmp280 | e7cb8fcef0043a354a9c2dde0946ab1d033c0b59 | [
"Apache-2.0"
] | null | null | null | defmodule BMP280.MixProject do
use Mix.Project
@version "0.2.8"
@source_url "https://github.com/elixir-sensors/bmp280"
def project do
[
app: :bmp280,
version: @version,
elixir: "~> 1.10",
start_permanent: Mix.env() == :prod,
deps: deps(),
dialyzer: dialyzer(),
doc... | 20.197368 | 81 | 0.534853 |
7a8468e3f83642242ef40115073c5911b99bb644 | 714 | exs | Elixir | test/crater_web/controllers/api/v1/user_controller_test.exs | blvdgroup/crater | 78d03de2eac73d90148df6c5d2d03e99b9b5ccb7 | [
"Apache-2.0"
] | 1 | 2018-03-13T08:15:50.000Z | 2018-03-13T08:15:50.000Z | test/crater_web/controllers/api/v1/user_controller_test.exs | blvdgroup/crater | 78d03de2eac73d90148df6c5d2d03e99b9b5ccb7 | [
"Apache-2.0"
] | 1 | 2018-03-17T15:45:26.000Z | 2018-03-17T15:45:26.000Z | test/crater_web/controllers/api/v1/user_controller_test.exs | blvdgroup/crater | 78d03de2eac73d90148df6c5d2d03e99b9b5ccb7 | [
"Apache-2.0"
] | 1 | 2017-08-30T16:13:09.000Z | 2017-08-30T16:13:09.000Z | defmodule CraterWeb.Api.V1.UserControllerTest do
use CraterWeb.ConnCase
alias Crater.Repo
alias Crater.Accounts.User
@valid_attrs %{username: "resir014", password: "s3cr3tKEY"}
@invalid_attrs %{username: "resir014", password: "12345"}
test "POST /api/users creates user and renders resource" do
conn =... | 31.043478 | 76 | 0.721289 |
7a84797fe5df5fd0cdc16ff401babdcf13e59137 | 3,110 | ex | Elixir | implementations/elixir/ockam/ockam_hub/lib/hub/service/pub_sub.ex | iakev/ockam | 24f4b29c5af609e7d173838ee115456325666188 | [
"Apache-2.0"
] | null | null | null | implementations/elixir/ockam/ockam_hub/lib/hub/service/pub_sub.ex | iakev/ockam | 24f4b29c5af609e7d173838ee115456325666188 | [
"Apache-2.0"
] | 23 | 2021-10-12T16:43:06.000Z | 2022-03-23T22:07:22.000Z | implementations/elixir/ockam/ockam_hub/lib/hub/service/pub_sub.ex | iakev/ockam | 24f4b29c5af609e7d173838ee115456325666188 | [
"Apache-2.0"
] | 1 | 2021-12-01T19:40:11.000Z | 2021-12-01T19:40:11.000Z | defmodule Ockam.Hub.Service.PubSub do
@moduledoc """
PubSub service
Subscribes workers (by return route) to a string topic
Each topic can have multiple subscrtiptions
Each subscription has a unique name and topic
Name and topic are parsed from the payload as a BARE `string` type
with the following form... | 26.581197 | 100 | 0.680064 |
7a847bb4b5d129b2d4a3a5e648e55e6b34648556 | 66 | ex | Elixir | lib/irc/message/error.ex | joe-maguire/irc | 28117ab38976d20d959bab031e954ce4dbdb4957 | [
"MIT"
] | 1 | 2018-04-04T23:27:07.000Z | 2018-04-04T23:27:07.000Z | lib/irc/message/error.ex | joe-maguire/irc | 28117ab38976d20d959bab031e954ce4dbdb4957 | [
"MIT"
] | null | null | null | lib/irc/message/error.ex | joe-maguire/irc | 28117ab38976d20d959bab031e954ce4dbdb4957 | [
"MIT"
] | null | null | null | defmodule InvalidIrcMessageError do
defexception [:message]
end
| 16.5 | 35 | 0.833333 |
7a8492585485efaf1c61a02e49b7632c922ad007 | 309 | ex | Elixir | lib/wallaby/driver/temporary_path.ex | carl-al/wallaby | a4c9811902370b15db17fc62d451035ee7464eea | [
"MIT"
] | 1 | 2019-01-30T12:08:17.000Z | 2019-01-30T12:08:17.000Z | lib/wallaby/driver/temporary_path.ex | carl-al/wallaby | a4c9811902370b15db17fc62d451035ee7464eea | [
"MIT"
] | 2 | 2019-04-10T08:23:27.000Z | 2021-01-25T16:37:23.000Z | lib/wallaby/driver/temporary_path.ex | carl-al/wallaby | a4c9811902370b15db17fc62d451035ee7464eea | [
"MIT"
] | 1 | 2019-01-29T16:03:55.000Z | 2019-01-29T16:03:55.000Z | defmodule Wallaby.Driver.TemporaryPath do
@moduledoc false
@spec generate(String.t) :: String.t
def generate(base_path \\ System.tmp_dir!()) do
dirname =
0x100000000
|> :rand.uniform()
|> Integer.to_string(36)
|> String.downcase
Path.join(base_path, dirname)
end
end
| 20.6 | 49 | 0.656958 |
7a8494fb3291ca7f4fff4698f0b1d611062fd911 | 403 | ex | Elixir | lib/rocketpay/accounts/deposit.ex | leoferreiralima/rocketpay | afc8e89d30e7cef6c9e8f1a3bc4007cffd0ece31 | [
"MIT"
] | null | null | null | lib/rocketpay/accounts/deposit.ex | leoferreiralima/rocketpay | afc8e89d30e7cef6c9e8f1a3bc4007cffd0ece31 | [
"MIT"
] | null | null | null | lib/rocketpay/accounts/deposit.ex | leoferreiralima/rocketpay | afc8e89d30e7cef6c9e8f1a3bc4007cffd0ece31 | [
"MIT"
] | null | null | null | defmodule Rocketpay.Accounts.Deposit do
alias Rocketpay.Repo
alias Rocketpay.Accounts.Operation
def call(params) do
params
|> Operation.call(:deposit)
|> run_transaction()
end
defp run_transaction(multi) do
case Repo.transaction(multi) do
{:error, _operation, reason, _changes} -> {:er... | 20.15 | 64 | 0.667494 |
7a84a0ec6a67b1a5bb6b544065b401d31cf7885e | 2,366 | exs | Elixir | test/groupher_server_web/mutation/cms/sink/radar_sink_test.exs | coderplanets/coderplanets_server | 3663e56340d6d050e974c91f7e499d8424fc25e9 | [
"Apache-2.0"
] | 240 | 2018-11-06T09:36:54.000Z | 2022-02-20T07:12:36.000Z | test/groupher_server_web/mutation/cms/sink/radar_sink_test.exs | coderplanets/coderplanets_server | 3663e56340d6d050e974c91f7e499d8424fc25e9 | [
"Apache-2.0"
] | 363 | 2018-07-11T03:38:14.000Z | 2021-12-14T01:42:40.000Z | test/groupher_server_web/mutation/cms/sink/radar_sink_test.exs | mydearxym/mastani_server | f24034a4a5449200165cf4a547964a0961793eab | [
"Apache-2.0"
] | 22 | 2019-01-27T11:47:56.000Z | 2021-02-28T13:17:52.000Z | defmodule GroupherServer.Test.Mutation.Sink.RadarSink do
@moduledoc false
use GroupherServer.TestTools
alias GroupherServer.CMS
alias CMS.Model.Radar
alias Helper.ORM
setup do
{:ok, user} = db_insert(:user)
{:ok, community} = db_insert(:community)
{:ok, radar} = CMS.create_article(community, ... | 30.333333 | 88 | 0.647084 |
7a84a5a7c6108affde510036ad0a8a030f9de847 | 635 | ex | Elixir | lib/storeHall/users/relation.ex | macypa/storeHall | 9fe810f763527cc87fa165138bdfb3cda92fa553 | [
"MIT"
] | null | null | null | lib/storeHall/users/relation.ex | macypa/storeHall | 9fe810f763527cc87fa165138bdfb3cda92fa553 | [
"MIT"
] | 4 | 2019-07-16T06:24:42.000Z | 2021-05-07T22:26:14.000Z | lib/storeHall/users/relation.ex | macypa/storeHall | 9fe810f763527cc87fa165138bdfb3cda92fa553 | [
"MIT"
] | 1 | 2018-11-23T21:13:31.000Z | 2018-11-23T21:13:31.000Z | defmodule StoreHall.Users.Relation do
use Ecto.Schema
import Ecto.Changeset
@derive {Jason.Encoder, only: [:id, :related_to_user, :type]}
schema "user_relations" do
belongs_to :related_to_user, StoreHall.Users.User, type: :string
belongs_to :user, StoreHall.Users.User, type: :string
field :type, :s... | 28.863636 | 68 | 0.716535 |
7a84a8c1d0435f343216296aa8d6aff7961f144a | 1,702 | ex | Elixir | lib/app/commands.ex | wilk/ranciobot | 8951bac59130341b9b96a48a0ed50e3b5c3d13ee | [
"MIT"
] | null | null | null | lib/app/commands.ex | wilk/ranciobot | 8951bac59130341b9b96a48a0ed50e3b5c3d13ee | [
"MIT"
] | null | null | null | lib/app/commands.ex | wilk/ranciobot | 8951bac59130341b9b96a48a0ed50e3b5c3d13ee | [
"MIT"
] | null | null | null | defmodule App.Commands do
use App.Router
use App.Commander
alias App.Commands.Admin
alias App.Commands.User
# general help
command "start", User, :start
command "help", User, :help
# menu
command "menu", User, :menu_command
callback_query_command "menu", User, :menu_callback
# user order
c... | 29.344828 | 71 | 0.73208 |
7a84d102ed442302419ad26b50f04dd4dfacac13 | 630 | ex | Elixir | lib/chat_api_web/controllers/fallback_controller.ex | rlanga/papercups | 358ca46c344908585cd0214a0de96e5676120c68 | [
"MIT"
] | 2 | 2020-09-21T07:27:13.000Z | 2021-12-20T13:23:56.000Z | lib/chat_api_web/controllers/fallback_controller.ex | rlanga/papercups | 358ca46c344908585cd0214a0de96e5676120c68 | [
"MIT"
] | null | null | null | lib/chat_api_web/controllers/fallback_controller.ex | rlanga/papercups | 358ca46c344908585cd0214a0de96e5676120c68 | [
"MIT"
] | 1 | 2021-08-29T14:10:18.000Z | 2021-08-29T14:10:18.000Z | defmodule ChatApiWeb.FallbackController do
@moduledoc """
Translates controller action results into valid `Plug.Conn` responses.
See `Phoenix.Controller.action_fallback/1` for more details.
"""
use ChatApiWeb, :controller
# This clause is an example of how to handle resources that cannot be found.
def c... | 26.25 | 78 | 0.692063 |
7a84d5f8fdd1201e861718f8048a194707ba108f | 70 | exs | Elixir | test/views/page_view_test.exs | itaym2/gittp | ca00e8b37e403cb8b66f89df86a3a777ae1736bd | [
"MIT"
] | 2 | 2017-07-02T17:46:51.000Z | 2017-07-13T12:11:04.000Z | test/views/page_view_test.exs | Soluto/gittp | ca00e8b37e403cb8b66f89df86a3a777ae1736bd | [
"MIT"
] | 13 | 2017-05-23T07:53:54.000Z | 2017-10-30T13:40:43.000Z | test/views/page_view_test.exs | itaym2/gittp | ca00e8b37e403cb8b66f89df86a3a777ae1736bd | [
"MIT"
] | 1 | 2017-07-11T15:10:16.000Z | 2017-07-11T15:10:16.000Z | defmodule Gittp.PageViewTest do
use Gittp.ConnCase, async: true
end
| 17.5 | 33 | 0.8 |
7a84e1d24b7224427d77219293d72ad9c3a712fb | 36,999 | ex | Elixir | lib/ash/engine/request.ex | MrFlorius/ash | 247abbb8333d252da5440a58ddf4f1b7f184342f | [
"MIT"
] | null | null | null | lib/ash/engine/request.ex | MrFlorius/ash | 247abbb8333d252da5440a58ddf4f1b7f184342f | [
"MIT"
] | null | null | null | lib/ash/engine/request.ex | MrFlorius/ash | 247abbb8333d252da5440a58ddf4f1b7f184342f | [
"MIT"
] | null | null | null | defmodule Ash.Engine.Request do
@moduledoc """
Represents an individual request to be processed by the engine.
See `new/1` for more information
"""
defstruct [
:id,
:async?,
:error?,
:resource,
:changeset,
:path,
:action_type,
:action,
:data,
:name,
:api,
:quer... | 29.934466 | 161 | 0.600097 |
7a84e2e2aff9a52888df4edc98b9d68a48e67467 | 2,203 | ex | Elixir | clients/service_consumer_management/lib/google_api/service_consumer_management/v1/model/jwt_location.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/service_consumer_management/lib/google_api/service_consumer_management/v1/model/jwt_location.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/service_consumer_management/lib/google_api/service_consumer_management/v1/model/jwt_location.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 36.716667 | 120 | 0.713572 |
7a855c3350648acf71397dfe51c84165090f3ab6 | 11,427 | ex | Elixir | clients/content/lib/google_api/content/v21/api/accounttax.ex | EVLedger/elixir-google-api | 61edef19a5e2c7c63848f7030c6d8d651e4593d4 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v21/api/accounttax.ex | EVLedger/elixir-google-api | 61edef19a5e2c7c63848f7030c6d8d651e4593d4 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v21/api/accounttax.ex | EVLedger/elixir-google-api | 61edef19a5e2c7c63848f7030c6d8d651e4593d4 | [
"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... | 43.781609 | 236 | 0.636212 |
7a85642849840ca3cd9607780bb51b2ee08d10d6 | 1,389 | ex | Elixir | lib/advent/sleigh/sleigh.ex | omsolem/AdventOfCode2018 | d0b8f3c9d12a0115ceef223eff1b79767deb9466 | [
"Unlicense"
] | 1 | 2018-12-04T19:55:07.000Z | 2018-12-04T19:55:07.000Z | lib/advent/sleigh/sleigh.ex | omsolem/AdventOfCode2018 | d0b8f3c9d12a0115ceef223eff1b79767deb9466 | [
"Unlicense"
] | null | null | null | lib/advent/sleigh/sleigh.ex | omsolem/AdventOfCode2018 | d0b8f3c9d12a0115ceef223eff1b79767deb9466 | [
"Unlicense"
] | null | null | null | defmodule Advent.Sleigh do
import NimbleParsec
def load_dependecies do
"../../../assets/input7.txt"
|> Path.expand(__DIR__)
|> File.read!()
|> String.split("\n")
|> Enum.map(fn line ->
{:ok, [start, next], "", %{}, _, _} = dependecy(line)
{start, next}
end)
|> Enum.sort_by(f... | 24.803571 | 85 | 0.595392 |
7a8585b0dae6d2dbb83d91790e1bc897bdc24aad | 1,728 | exs | Elixir | apps/collabex/test/in_memory_event_store_test.exs | mugimaru73/collabex | 69bac8058d6ee1a70620488e802d30a34eaebfb4 | [
"MIT"
] | null | null | null | apps/collabex/test/in_memory_event_store_test.exs | mugimaru73/collabex | 69bac8058d6ee1a70620488e802d30a34eaebfb4 | [
"MIT"
] | 2 | 2021-03-10T20:18:59.000Z | 2021-05-11T16:07:46.000Z | apps/collabex/test/in_memory_event_store_test.exs | mugimaru/collabex | 69bac8058d6ee1a70620488e802d30a34eaebfb4 | [
"MIT"
] | null | null | null | defmodule Collabex.InMemoryEventStoreTest do
use ExUnit.Case, async: true
alias Collabex.InMemoryEventStore
alias Collabex.Event
setup context do
registry_name = Map.get(context, :registry_name, __MODULE__.Registry)
start_supervised!({Registry, keys: :unique, name: registry_name})
{:ok, registry: ... | 29.288136 | 92 | 0.545718 |
7a859f7f08fffadab5b2f8e8287b8b1dac19d288 | 1,440 | ex | Elixir | apps/tai/lib/tai/commands/balance.ex | ihorkatkov/tai | 09f9f15d2c385efe762ae138a8570f1e3fd41f26 | [
"MIT"
] | null | null | null | apps/tai/lib/tai/commands/balance.ex | ihorkatkov/tai | 09f9f15d2c385efe762ae138a8570f1e3fd41f26 | [
"MIT"
] | null | null | null | apps/tai/lib/tai/commands/balance.ex | ihorkatkov/tai | 09f9f15d2c385efe762ae138a8570f1e3fd41f26 | [
"MIT"
] | null | null | null | defmodule Tai.Commands.Balance do
@moduledoc """
Display symbols on each exchange with a non-zero balance
"""
import Tai.Commands.Table, only: [render!: 2]
@header [
"Venue",
"Account",
"Asset",
"Free",
"Locked",
"Balance"
]
@spec balance :: no_return
def balance do
fetch_... | 22.857143 | 87 | 0.602778 |
7a85aea4a6240ed431baa350c908a8458f45236d | 3,049 | exs | Elixir | test/redex/command/lpop_test.exs | esmaeilpour/redex | c2c6e29e3dec0df265fdcd9f24cd2471c8615ee7 | [
"Apache-2.0"
] | 173 | 2019-03-15T15:05:11.000Z | 2022-01-10T08:21:48.000Z | test/redex/command/lpop_test.exs | esmaeilpour/redex | c2c6e29e3dec0df265fdcd9f24cd2471c8615ee7 | [
"Apache-2.0"
] | null | null | null | test/redex/command/lpop_test.exs | esmaeilpour/redex | c2c6e29e3dec0df265fdcd9f24cd2471c8615ee7 | [
"Apache-2.0"
] | 9 | 2019-07-28T01:20:43.000Z | 2021-08-18T03:41:44.000Z | defmodule Redex.Command.LpopTest do
use ExUnit.Case, async: true
use ExUnitProperties
import Mox
import Redex.DataGenerators
import Redex.Command.LPOP
setup :verify_on_exit!
property "LPOP a non existing or expired key" do
check all state = %{db: db} <- state(),
nodes <- nodes(state),... | 30.79798 | 94 | 0.573631 |
7a85b5b0fe94dfdc4edca794677ea1939e829a69 | 1,722 | exs | Elixir | mix.exs | Cogility/fusion_auth | bb765849d6e1d6bc105c2316ea5fe5dd792bd49e | [
"MIT"
] | 10 | 2020-11-13T08:33:22.000Z | 2021-08-09T17:37:09.000Z | mix.exs | Cogility/fusion_auth | bb765849d6e1d6bc105c2316ea5fe5dd792bd49e | [
"MIT"
] | 11 | 2021-01-06T21:30:14.000Z | 2021-09-08T09:04:51.000Z | mix.exs | Cogility/fusion_auth | bb765849d6e1d6bc105c2316ea5fe5dd792bd49e | [
"MIT"
] | null | null | null | defmodule FusionAuth.MixProject do
use Mix.Project
@version "0.1.0"
@url "https://github.com/leo-technologies-llc/fusion_auth"
@name "FusionAuth"
@description "Elixir SDK for #{@name}"
def project do
[
app: :fusion_auth,
version: @version,
elixir: "~> 1.8",
elixirc_paths: elixi... | 24.6 | 72 | 0.552265 |
7a85efd2e62074ed8bd394269ad85ec8a2f33e09 | 158 | exs | Elixir | crackingthecodinginterview/algorithms/05_connected_cell_in_a_grid.exs | nathanchere/HackerRank_Elixir | 607e4ae10d94edb20296c8979179648af4af3ca6 | [
"MIT"
] | 2 | 2016-09-20T11:56:33.000Z | 2016-10-20T20:11:04.000Z | crackingthecodinginterview/algorithms/05_connected_cell_in_a_grid.exs | nathanchere/HackerRank_Elixir | 607e4ae10d94edb20296c8979179648af4af3ca6 | [
"MIT"
] | null | null | null | crackingthecodinginterview/algorithms/05_connected_cell_in_a_grid.exs | nathanchere/HackerRank_Elixir | 607e4ae10d94edb20296c8979179648af4af3ca6 | [
"MIT"
] | null | null | null | # HackerRank "Cracking The Coding Interview" - Algorithms (DFS) - Connected Cell In A Grid
defmodule Solution do
def main() do
end
end
Solution.main()
| 15.8 | 90 | 0.727848 |
7a8602d10113f3f39482dd87b7de75ac85602678 | 4,205 | ex | Elixir | lib/guardian/plug/verify_header.ex | sparta-science/guardian | d625c7d2bf8d5d02338857748a08047f0b8521ac | [
"MIT"
] | 1 | 2019-11-11T21:48:20.000Z | 2019-11-11T21:48:20.000Z | lib/guardian/plug/verify_header.ex | sparta-science/guardian | d625c7d2bf8d5d02338857748a08047f0b8521ac | [
"MIT"
] | 2 | 2021-03-09T09:26:25.000Z | 2021-05-09T08:58:51.000Z | lib/guardian/plug/verify_header.ex | sparta-science/guardian | d625c7d2bf8d5d02338857748a08047f0b8521ac | [
"MIT"
] | null | null | null | if Code.ensure_loaded?(Plug) do
defmodule Guardian.Plug.VerifyHeader do
@moduledoc """
Looks for and validates a token found in the `Authorization` header.
In the case where:
a. The session is not loaded
b. A token is already found for `:key`
This plug will not do anything.
This, like... | 30.919118 | 122 | 0.632105 |
7a8613d4122fcd485b12e79e18e449ede26def1c | 1,799 | exs | Elixir | clients/tpu/mix.exs | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"Apache-2.0"
] | null | null | null | clients/tpu/mix.exs | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"Apache-2.0"
] | null | null | null | clients/tpu/mix.exs | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"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... | 26.850746 | 98 | 0.648138 |
7a863b25c2c40996882f481f1b6c1732465ca3f7 | 3,136 | exs | Elixir | test/lookup_cache_test.exs | elixir-geolix/geolix_adapter_mmdb2_caching | 935d2db3fa3199321b8eb74cad49a17ff13292bc | [
"Apache-2.0"
] | null | null | null | test/lookup_cache_test.exs | elixir-geolix/geolix_adapter_mmdb2_caching | 935d2db3fa3199321b8eb74cad49a17ff13292bc | [
"Apache-2.0"
] | null | null | null | test/lookup_cache_test.exs | elixir-geolix/geolix_adapter_mmdb2_caching | 935d2db3fa3199321b8eb74cad49a17ff13292bc | [
"Apache-2.0"
] | null | null | null | defmodule Geolix.Adapter.LookupCacheTest do
use ExUnit.Case
defmodule DummyCache do
alias Geolix.Adapter.LookupCache.CacheAdapter
@behaviour CacheAdapter
@impl CacheAdapter
def cache_workers(_, _), do: []
@impl CacheAdapter
def get({1, 1, 1, 1}, _, _, _), do: {:ok, nil}
def get({2, 2... | 24.310078 | 83 | 0.560906 |
7a864a519dd2e642279da55aac4a4ab9d8848dab | 4,491 | exs | Elixir | test/test_helper.exs | MyMedsAndMe/marco_polo | f51550fff1131728387e194b36092d607427b0d0 | [
"Apache-2.0"
] | 76 | 2015-08-03T21:47:05.000Z | 2020-07-15T08:00:01.000Z | test/test_helper.exs | MyMedsAndMe/marco_polo | f51550fff1131728387e194b36092d607427b0d0 | [
"Apache-2.0"
] | 33 | 2015-07-31T15:45:52.000Z | 2021-07-21T05:54:22.000Z | test/test_helper.exs | MyMedsAndMe/marco_polo | f51550fff1131728387e194b36092d607427b0d0 | [
"Apache-2.0"
] | 18 | 2015-08-06T05:04:18.000Z | 2021-07-19T03:26:44.000Z | # Ignore scripting tests by default as scripting must be enabled manually in the
# OrientDB server configuration. Same goes for Live Query.
excludes = [:scripting, :live_query, :ssl]
ExUnit.configure(exclude: (ExUnit.configuration[:exclude] || []) ++ excludes)
ExUnit.start()
unless :integration in ExUnit.configuratio... | 31.851064 | 104 | 0.675351 |
7a8656a1a2611eb8c3f733758e876cc24102fbdd | 724 | exs | Elixir | apps/cb_slack/mix.exs | CultivateHQ/cultivatarmobile | 09148467d8569138e9b692a7b726b7090b2af5d6 | [
"MIT"
] | 16 | 2016-09-14T16:57:33.000Z | 2017-11-11T16:31:14.000Z | apps/cb_slack/mix.exs | CultivateHQ/cultivatarmobile | 09148467d8569138e9b692a7b726b7090b2af5d6 | [
"MIT"
] | 5 | 2016-09-08T07:14:44.000Z | 2018-11-09T12:34:19.000Z | apps/cb_slack/mix.exs | CultivateHQ/cultivatarmobile | 09148467d8569138e9b692a7b726b7090b2af5d6 | [
"MIT"
] | null | null | null | defmodule CbSlack.Mixfile do
use Mix.Project
def project do
[app: :cb_slack,
version: "0.1.0",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixir: "~> 1.3",
build_embedded: Mix.env == :prod,
sta... | 23.354839 | 86 | 0.571823 |
7a86c052e7d6c7f20fb731b2b96694ca0c890bae | 222 | exs | Elixir | lib/functions_2/fizzbuzz.exs | mikan/elixir-practice | 624525605eb2324e0c55a4ddcb68388c0d2ecefc | [
"Apache-2.0"
] | null | null | null | lib/functions_2/fizzbuzz.exs | mikan/elixir-practice | 624525605eb2324e0c55a4ddcb68388c0d2ecefc | [
"Apache-2.0"
] | 1 | 2020-01-28T00:19:53.000Z | 2020-01-28T00:19:53.000Z | lib/functions_2/fizzbuzz.exs | mikan/elixir-practice | 624525605eb2324e0c55a4ddcb68388c0d2ecefc | [
"Apache-2.0"
] | null | null | null | fizzbuzz = fn
(0,0,_) -> "FizzBuzz"
(0,_,_) -> "Fizz"
(_,0,_) -> "Buzz"
(_,_,n) -> n
end
IO.puts(fizzbuzz.(0,0,1)) # FizzBuzz
IO.puts(fizzbuzz.(0,1,0)) # Fizz
IO.puts(fizzbuzz.(1,0,0)) # Buzz
IO.puts(fizzbuzz.(1,1,1)) # 1
| 20.181818 | 36 | 0.572072 |
7a86c9826cfecd68af80e8f7ba0b6662f5540e16 | 1,384 | exs | Elixir | implementations/elixir/ockam/ockam_hub/config/runtime.exs | jjscheel/ockam | 04088346c5c11c0f2969422288ffd95404d9b00a | [
"Apache-2.0"
] | null | null | null | implementations/elixir/ockam/ockam_hub/config/runtime.exs | jjscheel/ockam | 04088346c5c11c0f2969422288ffd95404d9b00a | [
"Apache-2.0"
] | null | null | null | implementations/elixir/ockam/ockam_hub/config/runtime.exs | jjscheel/ockam | 04088346c5c11c0f2969422288ffd95404d9b00a | [
"Apache-2.0"
] | null | null | null | import Config
influx_token =
with true <- File.exists?("/mnt/secrets/influx/token"),
{:ok, contents} <- File.read("/mnt/secrets/influx/token"),
client_secret <- String.trim(contents) do
client_secret
else
false ->
System.get_env("INFLUXDB_TOKEN")
{:error, :enoent} ->
System.g... | 27.68 | 73 | 0.65896 |
7a86e0948cc8fbe3c541acd1edbb8fb3cd56101b | 2,293 | exs | Elixir | mix.exs | bitpal/bitpal_demo | 989df08f60dadc5d4e340fef91890cf8bb3106ad | [
"BSD-3-Clause-Clear"
] | null | null | null | mix.exs | bitpal/bitpal_demo | 989df08f60dadc5d4e340fef91890cf8bb3106ad | [
"BSD-3-Clause-Clear"
] | 1 | 2021-06-04T13:53:01.000Z | 2021-06-04T13:53:01.000Z | mix.exs | bitpal/bitpal_demo | 989df08f60dadc5d4e340fef91890cf8bb3106ad | [
"BSD-3-Clause-Clear"
] | null | null | null | defmodule Demo.MixProject do
use Mix.Project
def project do
[
app: :demo,
version: "0.1.0",
elixir: "~> 1.7",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix] ++ Mix.compilers(),
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: deps()
... | 27.626506 | 84 | 0.528565 |
7a86ee79054ad3373f0cc49de5653497245b83e9 | 2,720 | ex | Elixir | clients/sheets/lib/google_api/sheets/v4/model/grid_data.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/sheets/lib/google_api/sheets/v4/model/grid_data.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/sheets/lib/google_api/sheets/v4/model/grid_data.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... | 46.101695 | 240 | 0.719118 |
7a870bd5ad27b0db7292ab72fd5f75050c5b92e6 | 486 | ex | Elixir | deps/absinthe/lib/absinthe/blueprint/input/enum.ex | JoakimEskils/elixir-absinthe | d81e24ec7c7b1164e6d152101dd50422f192d7e9 | [
"MIT"
] | 3 | 2017-06-22T16:33:58.000Z | 2021-07-07T15:21:09.000Z | lib/absinthe/blueprint/input/enum.ex | bruce/absinthe | 19b63d3aaa9fb75aad01ffd5e91d89e0b30d7f91 | [
"MIT"
] | null | null | null | lib/absinthe/blueprint/input/enum.ex | bruce/absinthe | 19b63d3aaa9fb75aad01ffd5e91d89e0b30d7f91 | [
"MIT"
] | null | null | null | defmodule Absinthe.Blueprint.Input.Enum do
@moduledoc false
alias Absinthe.{Blueprint, Phase}
@enforce_keys [:value, :source_location]
defstruct [
:value,
:source_location,
# Added by phases
flags: %{},
schema_node: nil,
errors: [],
]
@type t :: %__MODULE__{
value: String.t,
... | 18.692308 | 57 | 0.656379 |
7a8750a6509198f4c681ea5af72b3e4e92097409 | 1,552 | ex | Elixir | lib/ersatz/matchers/espec.ex | Apemb/ersatz | 8f4c57c56588efefd94655934f57bd0df34c84f7 | [
"Apache-2.0"
] | 1 | 2019-11-28T16:30:56.000Z | 2019-11-28T16:30:56.000Z | lib/ersatz/matchers/espec.ex | Apemb/ersatz | 8f4c57c56588efefd94655934f57bd0df34c84f7 | [
"Apache-2.0"
] | null | null | null | lib/ersatz/matchers/espec.ex | Apemb/ersatz | 8f4c57c56588efefd94655934f57bd0df34c84f7 | [
"Apache-2.0"
] | null | null | null | defmodule Ersatz.Matchers.ESpec do
@moduledoc """
Custom matchers to ease the use of espec.
"""
alias Ersatz.Matchers.ESpec.HaveBeenCalled
alias Ersatz.Matchers.ESpec.HaveBeenCalledWith
@doc """
Tests if the mock function was called.
It is possible to specify the number of calls to expect or just tha... | 33.73913 | 113 | 0.707474 |
7a8759cfab4dd7739cc910ecaf42074c7dae2af5 | 1,404 | exs | Elixir | Chapter11/vocial-demo-chapter-11/config/config.exs | PacktPublishing/Phoenix-Web-Development | a071392abe2a459be1896580446b006126c393bf | [
"MIT"
] | 10 | 2018-05-13T14:53:05.000Z | 2021-11-08T13:10:44.000Z | Chapter11/vocial-demo-chapter-11/config/config.exs | PacktPublishing/Phoenix-Web-Development | a071392abe2a459be1896580446b006126c393bf | [
"MIT"
] | null | null | null | Chapter11/vocial-demo-chapter-11/config/config.exs | PacktPublishing/Phoenix-Web-Development | a071392abe2a459be1896580446b006126c393bf | [
"MIT"
] | 2 | 2019-04-23T10:54:33.000Z | 2019-04-27T15:47:07.000Z | # 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.
use Mix.Config
# General application configuration
config :vocial,
ecto_repos: [Vocial.Repo]
# Co... | 34.243902 | 86 | 0.764245 |
7a8775fde367c7435ad158a3804d33465e3e4273 | 1,911 | ex | Elixir | ex_cubic_ingestion/test/support/ex_aws_data.ex | mbta/data_platform | 3fa66cb74134b2baa5234e908e147bf393c13926 | [
"MIT"
] | 1 | 2022-01-30T21:02:48.000Z | 2022-01-30T21:02:48.000Z | ex_cubic_ingestion/test/support/ex_aws_data.ex | mbta/data_platform | 3fa66cb74134b2baa5234e908e147bf393c13926 | [
"MIT"
] | 21 | 2022-01-25T16:35:50.000Z | 2022-03-31T19:42:52.000Z | ex_cubic_ingestion/test/support/ex_aws_data.ex | mbta/data_platform | 3fa66cb74134b2baa5234e908e147bf393c13926 | [
"MIT"
] | 1 | 2022-02-02T14:34:17.000Z | 2022-02-02T14:34:17.000Z | defmodule MockExAws.Data do
@moduledoc """
Mock data for use in test cases.
"""
@doc """
Mock S3 data, in the format returned by `ExAws.S3.load_objects_v2/2`.
"""
@spec load_objects(String.t()) :: [map()]
def load_objects(key_starts_with \\ "") do
incoming_prefix = Application.fetch_env!(:ex_cubic_... | 30.333333 | 93 | 0.612245 |
7a878c19e026198b8c57bdf73a12c5a0a96169ff | 2,468 | ex | Elixir | lib/compass_web/telemetry.ex | theclimbersclub/compass | e9c48c86e6844dd751053af5c3068ce898fd0f2a | [
"MIT"
] | 2 | 2019-10-12T13:12:15.000Z | 2021-03-07T10:21:53.000Z | lib/compass_web/telemetry.ex | theclimbersclub/compass | e9c48c86e6844dd751053af5c3068ce898fd0f2a | [
"MIT"
] | 14 | 2019-10-14T23:33:15.000Z | 2020-05-30T10:04:16.000Z | lib/compass_web/telemetry.ex | theclimbersclub/compass | e9c48c86e6844dd751053af5c3068ce898fd0f2a | [
"MIT"
] | 1 | 2020-12-12T12:31:01.000Z | 2020-12-12T12:31:01.000Z | defmodule CompassWeb.Telemetry do
@moduledoc """
Emit events at various stages of an application's lifecycle.
"""
use Supervisor
import Telemetry.Metrics
def start_link(arg) do
Supervisor.start_link(__MODULE__, arg, name: __MODULE__)
end
@impl true
@spec init(any) ::
{:ok, {%{intensit... | 31.240506 | 88 | 0.647083 |
7a8796049709890e9918f32207226d379d63d36e | 819 | ex | Elixir | lib/parseus/structs/error.ex | surgeventures/parseus | 3c26c41dff8bdfb9851e5ebea1be2a4fa4ea6bd2 | [
"MIT"
] | 2 | 2017-10-18T17:53:43.000Z | 2020-05-01T23:31:36.000Z | lib/parseus/structs/error.ex | surgeventures/parseus | 3c26c41dff8bdfb9851e5ebea1be2a4fa4ea6bd2 | [
"MIT"
] | null | null | null | lib/parseus/structs/error.ex | surgeventures/parseus | 3c26c41dff8bdfb9851e5ebea1be2a4fa4ea6bd2 | [
"MIT"
] | null | null | null | defmodule Parseus.Error do
@moduledoc """
Represents a failure of parsing or validation.
"""
defstruct reason: nil,
source: nil,
info: []
@doc false
def build(reason) when is_atom(reason) or is_binary(reason), do: build(reason: reason)
def build({reason, info}), do: build(reason:... | 25.59375 | 88 | 0.623932 |
7a87c7d4a97bf9758df913356222e6bfc8d03374 | 420 | ex | Elixir | web/views/error_view.ex | enixdark/audit_api | 3aa6e9169cd9e80f06d91e4104438398a012a86f | [
"MIT"
] | 1 | 2018-01-20T00:58:33.000Z | 2018-01-20T00:58:33.000Z | web/views/error_view.ex | enixdark/audit_api | 3aa6e9169cd9e80f06d91e4104438398a012a86f | [
"MIT"
] | null | null | null | web/views/error_view.ex | enixdark/audit_api | 3aa6e9169cd9e80f06d91e4104438398a012a86f | [
"MIT"
] | null | null | null | defmodule AuditApi.ErrorView do
use AuditApi.Web, :view
def render("404.json", _assigns) do
%{errors: %{detail: "Page not found"}}
end
def render("500.json", _assigns) do
%{errors: %{detail: "Server internal error"}}
end
# In case no render clause matches or no
# template is found, let's render... | 23.333333 | 49 | 0.683333 |
7a87f52ad5a31432ddf38ee0649bd666950d8eb0 | 1,524 | ex | Elixir | lib/rocketpay_web/endpoint.ex | VictorMenegazzo/rocketpay | 101073e2dabf7c332eddb6d5dee66c9cf3440a97 | [
"MIT"
] | 5 | 2021-02-23T01:25:33.000Z | 2021-02-24T20:01:16.000Z | lib/rocketpay_web/endpoint.ex | VictorMenegazzo/rocketpay | 101073e2dabf7c332eddb6d5dee66c9cf3440a97 | [
"MIT"
] | null | null | null | lib/rocketpay_web/endpoint.ex | VictorMenegazzo/rocketpay | 101073e2dabf7c332eddb6d5dee66c9cf3440a97 | [
"MIT"
] | 1 | 2021-03-03T19:16:23.000Z | 2021-03-03T19:16:23.000Z | defmodule RocketpayWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :rocketpay
# 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: "_rocke... | 28.754717 | 97 | 0.717192 |
7a883529d8abafc32cb6fa5ed37b09960c5d9f5d | 1,266 | ex | Elixir | lib/jumubase/foundation/contest_filter.ex | richeterre/jumubase-phoenix | 7584f890af117d496971b5284bf9de798e22266f | [
"MIT"
] | 2 | 2019-01-20T07:03:30.000Z | 2019-04-11T10:20:14.000Z | lib/jumubase/foundation/contest_filter.ex | richeterre/jumubase-phoenix | 7584f890af117d496971b5284bf9de798e22266f | [
"MIT"
] | 6 | 2018-09-20T05:52:14.000Z | 2019-04-23T19:27:39.000Z | lib/jumubase/foundation/contest_filter.ex | richeterre/jumubase-phoenix | 7584f890af117d496971b5284bf9de798e22266f | [
"MIT"
] | null | null | null | defmodule Jumubase.Foundation.ContestFilter do
use Ecto.Schema
alias Ecto.Changeset
alias Jumubase.Foundation.ContestFilter
@primary_key false
embedded_schema do
field :season, :integer, default: nil
field :round, :integer, default: nil
field :grouping, :string, default: nil
field :search_te... | 23.444444 | 67 | 0.671406 |
7a8860376d606fe055a7d2e608591ff0ce1ff6c8 | 147 | exs | Elixir | apps/panacea_cli/test/panacea_cli_test.exs | timjp87/panacea | 5edddfa12a8f18b040248b9b186479b9ec8aed51 | [
"MIT"
] | null | null | null | apps/panacea_cli/test/panacea_cli_test.exs | timjp87/panacea | 5edddfa12a8f18b040248b9b186479b9ec8aed51 | [
"MIT"
] | null | null | null | apps/panacea_cli/test/panacea_cli_test.exs | timjp87/panacea | 5edddfa12a8f18b040248b9b186479b9ec8aed51 | [
"MIT"
] | null | null | null | defmodule PanaceaCLITest do
use ExUnit.Case
doctest PanaceaCLI
test "greets the world" do
assert PanaceaCLI.hello() == :world
end
end
| 16.333333 | 39 | 0.727891 |
7a8890c49d366f9a41a6a47cc0d41b34c643c6e8 | 74 | ex | Elixir | lib/ar_weekly/mailer.ex | Domeee/ar-weekly | 1ffa4f129fa4a654673c8ee8b0bef7dd87271f92 | [
"MIT"
] | 3 | 2019-03-05T16:45:08.000Z | 2019-08-23T12:10:57.000Z | lib/ar_weekly/mailer.ex | Domeee/ar-weekly | 1ffa4f129fa4a654673c8ee8b0bef7dd87271f92 | [
"MIT"
] | 2 | 2021-03-08T23:53:02.000Z | 2021-05-08T00:07:08.000Z | lib/ar_weekly/mailer.ex | Domeee/ar-weekly | 1ffa4f129fa4a654673c8ee8b0bef7dd87271f92 | [
"MIT"
] | null | null | null | defmodule ArWeekly.Mailer do
use Bamboo.Mailer, otp_app: :ar_weekly
end
| 18.5 | 40 | 0.797297 |
7a88a32379773b9e6e45f807cb603cde78a5610b | 4,612 | ex | Elixir | aoc-2019/lib/aoc/day10/monitoring_station.ex | sbauer322/advent-of-code | f1174f84485197d51009c35e3797ba26e7e21462 | [
"MIT"
] | 1 | 2020-11-08T22:17:37.000Z | 2020-11-08T22:17:37.000Z | aoc-2019/lib/aoc/day10/monitoring_station.ex | sbauer322/advent-of-code | f1174f84485197d51009c35e3797ba26e7e21462 | [
"MIT"
] | null | null | null | aoc-2019/lib/aoc/day10/monitoring_station.ex | sbauer322/advent-of-code | f1174f84485197d51009c35e3797ba26e7e21462 | [
"MIT"
] | null | null | null | defmodule AOC.Day10.MonitoringStation do
@moduledoc false
@type point :: {integer, integer}
def read_puzzle_input(path) do
File.read!(path)
end
def part1(input) do
process_input(input)
|> find_best_station_location()
end
def part2(input, origin) do
result =
process_input(input)
... | 26.505747 | 93 | 0.620338 |
7a88a509bc0ccda984400cee2684f7fb1bd072b1 | 4,057 | exs | Elixir | test/processor_test.exs | PharosProduction/arc | e799fb9e2abdff7fec5dd3f0c5926c501a3576d4 | [
"Apache-2.0"
] | 1,213 | 2015-06-18T04:01:20.000Z | 2022-01-19T18:47:23.000Z | test/processor_test.exs | PharosProduction/arc | e799fb9e2abdff7fec5dd3f0c5926c501a3576d4 | [
"Apache-2.0"
] | 260 | 2015-06-18T22:34:58.000Z | 2022-01-06T17:43:29.000Z | test/processor_test.exs | PharosProduction/arc | e799fb9e2abdff7fec5dd3f0c5926c501a3576d4 | [
"Apache-2.0"
] | 270 | 2015-07-07T17:10:31.000Z | 2021-11-13T09:16:03.000Z | defmodule ArcTest.Processor do
use ExUnit.Case, async: false
@img "test/support/image.png"
@img2 "test/support/image two.png"
defmodule DummyDefinition do
use Arc.Actions.Store
use Arc.Definition.Storage
def validate({file, _}), do: String.ends_with?(file.file_name, ".png")
def transform(:orig... | 39.009615 | 135 | 0.686961 |
7a88e26e2acd20c0da98282473c43bb58858ddfa | 74 | exs | Elixir | test/test_helper.exs | roger120981/planet | a662006551d11427c08cf6cdbacd37d377bcd9c5 | [
"MIT"
] | 1 | 2019-04-01T19:14:16.000Z | 2019-04-01T19:14:16.000Z | test/test_helper.exs | roger120981/planet | a662006551d11427c08cf6cdbacd37d377bcd9c5 | [
"MIT"
] | null | null | null | test/test_helper.exs | roger120981/planet | a662006551d11427c08cf6cdbacd37d377bcd9c5 | [
"MIT"
] | 1 | 2019-03-24T01:50:48.000Z | 2019-03-24T01:50:48.000Z | ExUnit.start()
Ecto.Adapters.SQL.Sandbox.mode(Excommerce.Repo, :manual)
| 14.8 | 56 | 0.77027 |
7a88e38a7927b32717bb1ef3251b7db4f85cdb57 | 2,049 | exs | Elixir | elixir/elixir-mars-water/test/mars_water/util/max_heap_test.exs | marcinbiegun/exercises | 36ad942e8d40d6471136326a3f6d09285bbd90aa | [
"MIT"
] | 1 | 2018-12-11T14:09:14.000Z | 2018-12-11T14:09:14.000Z | elixir/elixir-mars-water/test/mars_water/util/max_heap_test.exs | marcinbiegun/exercises | 36ad942e8d40d6471136326a3f6d09285bbd90aa | [
"MIT"
] | null | null | null | elixir/elixir-mars-water/test/mars_water/util/max_heap_test.exs | marcinbiegun/exercises | 36ad942e8d40d6471136326a3f6d09285bbd90aa | [
"MIT"
] | null | null | null | defmodule MarsWater.Util.MinMaxHeapTest do
use ExUnit.Case
alias MarsWater.Util.MaxHeap
describe "MaxHeap" do
test "Rerurns elements from the greatest to the samllest" do
heap = MaxHeap.new()
|> MaxHeap.insert({100, "data"})
|> MaxHeap.insert({19, "data"})
|> MaxHeap.insert({36, "data... | 35.947368 | 64 | 0.573939 |
7a88f31736f5aa3fac06eaa17ae3da6e46403679 | 974 | ex | Elixir | test/support/api_case.ex | Boulevard/ExQuickBooks | 72560070ec647a3f6c81b6a6afd15da3d563370c | [
"0BSD"
] | 8 | 2017-03-06T21:48:56.000Z | 2021-06-24T16:36:43.000Z | test/support/api_case.ex | Boulevard/ExQuickBooks | 72560070ec647a3f6c81b6a6afd15da3d563370c | [
"0BSD"
] | 2 | 2017-03-14T20:28:06.000Z | 2017-09-21T09:02:19.000Z | test/support/api_case.ex | Boulevard/ExQuickBooks | 72560070ec647a3f6c81b6a6afd15da3d563370c | [
"0BSD"
] | 2 | 2019-04-18T21:05:14.000Z | 2021-06-24T16:38:33.000Z | defmodule ExQuickBooks.APICase do
defmacro __using__(_) do
quote do
import unquote(__MODULE__)
end
end
alias ExQuickBooks.Backend
alias HTTPoison.Response
def http_200_response do
%Response{
body: "",
headers: [],
status_code: 200
}
end
def http_400_response do
... | 18.730769 | 58 | 0.61499 |
7a88f73e21ada4de407fa22ff6326ec05abdf5ef | 2,844 | exs | Elixir | test/ja_serializer/json_api_spec/resource_object_test.exs | strzibny/ja_serializer | 9823ada739ec1f0db9f14bd29f62a701dbd3b094 | [
"Apache-2.0"
] | 322 | 2016-11-18T22:58:17.000Z | 2022-01-18T15:07:24.000Z | test/ja_serializer/json_api_spec/resource_object_test.exs | strzibny/ja_serializer | 9823ada739ec1f0db9f14bd29f62a701dbd3b094 | [
"Apache-2.0"
] | 150 | 2016-11-17T20:14:51.000Z | 2021-03-12T03:56:57.000Z | test/ja_serializer/json_api_spec/resource_object_test.exs | strzibny/ja_serializer | 9823ada739ec1f0db9f14bd29f62a701dbd3b094 | [
"Apache-2.0"
] | 104 | 2016-11-17T18:02:36.000Z | 2021-04-06T09:52:16.000Z | defmodule JaSerializer.JsonApiSpec.ResourceObjectTest do
use ExUnit.Case
@expected """
{
"jsonapi": {
"version": "1.0"
},
"meta": { "copyright": 2015 },
"data": {
"type": "articles",
"id": "1",
"attributes": {
"title": "Rails is Omakase"
},
"meta": {"se... | 20.759124 | 71 | 0.5109 |
7a8901823bd70c62ce956c01cababbf488898d43 | 2,892 | ex | Elixir | lib/core/bot_state/scheduler_usage_reporter.ex | bahanni/custom_rpi4 | ddefa85d30bacaae40151a63a9a0ebbf4ad30ed5 | [
"MIT"
] | null | null | null | lib/core/bot_state/scheduler_usage_reporter.ex | bahanni/custom_rpi4 | ddefa85d30bacaae40151a63a9a0ebbf4ad30ed5 | [
"MIT"
] | null | null | null | lib/core/bot_state/scheduler_usage_reporter.ex | bahanni/custom_rpi4 | ddefa85d30bacaae40151a63a9a0ebbf4ad30ed5 | [
"MIT"
] | null | null | null | defmodule FarmbotOS.BotState.SchedulerUsageReporter do
alias FarmbotOS.BotState
require Logger
use GenServer
@collect_duration 2_000
@report_interval 7_000
def start_link(args) do
GenServer.start_link(__MODULE__, args)
end
def init(_args) do
_ = :msacc.stop()
{:ok, load_ave} = File.open(... | 26.054054 | 140 | 0.605463 |
7a890ca7521a5478e1a1bffd8fadb806e4340d05 | 303 | exs | Elixir | priv/repo/migrations/20200624234144_add_name_to_people.exs | RatioPBC/epi-viaduct-nys | 99fb637785ea207aee5449fa01fa59dd18ec8bf2 | [
"MIT"
] | 2 | 2021-06-22T21:01:49.000Z | 2021-11-04T18:36:48.000Z | priv/repo/migrations/20200624234144_add_name_to_people.exs | RatioPBC/epi-viaduct-nys | 99fb637785ea207aee5449fa01fa59dd18ec8bf2 | [
"MIT"
] | null | null | null | priv/repo/migrations/20200624234144_add_name_to_people.exs | RatioPBC/epi-viaduct-nys | 99fb637785ea207aee5449fa01fa59dd18ec8bf2 | [
"MIT"
] | null | null | null | defmodule NYSETL.Repo.Migrations.AddNameToPeople do
use Ecto.Migration
def change do
alter table(:people) do
add :name_first, :text
add :name_last, :text
add :dob, :date
end
create index(:people, [:name_last, :name_first])
create index(:people, [:dob])
end
end
| 20.2 | 52 | 0.656766 |
7a892a61fd7e43653b5a45f18418367cc69df675 | 1,619 | ex | Elixir | clients/service_networking/lib/google_api/service_networking/v1/model/source_context.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/service_networking/lib/google_api/service_networking/v1/model/source_context.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/service_networking/lib/google_api/service_networking/v1/model/source_context.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 34.446809 | 203 | 0.74861 |
7a893324d56d026b08376154c2ea3a69cb7704e3 | 434 | ex | Elixir | web/models/dashboard.ex | crosscloudci/ci_status_repository | 335e8b89bbf59e6cf63e49541ce3ea6b60167e52 | [
"Apache-2.0"
] | 2 | 2019-03-05T16:29:10.000Z | 2020-01-17T14:11:48.000Z | web/models/dashboard.ex | crosscloudci/ci_status_repository | 335e8b89bbf59e6cf63e49541ce3ea6b60167e52 | [
"Apache-2.0"
] | 3 | 2019-03-18T20:26:48.000Z | 2020-06-25T14:31:13.000Z | web/models/dashboard.ex | crosscloudci/ci_status_repository | 335e8b89bbf59e6cf63e49541ce3ea6b60167e52 | [
"Apache-2.0"
] | 1 | 2018-06-16T15:32:25.000Z | 2018-06-16T15:32:25.000Z | defmodule CncfDashboardApi.Dashboard do
use CncfDashboardApi.Web, :model
schema "dashboard" do
field :last_check, Timex.Ecto.DateTime
field :gitlab_ci_yml, :string
timestamps()
end
@doc """
Builds a changeset based on the `struct` and `params`.
"""
def changeset(struct, params \\ %{}) do
... | 21.7 | 56 | 0.677419 |
7a894e8e188b387fc64536b163458277990b0eb2 | 1,779 | ex | Elixir | lib/my_app_web.ex | bigbassroller/ueberauth_example | 5e889abaf060b6a37add2eb8a3cf1938f394c4af | [
"MIT"
] | null | null | null | lib/my_app_web.ex | bigbassroller/ueberauth_example | 5e889abaf060b6a37add2eb8a3cf1938f394c4af | [
"MIT"
] | null | null | null | lib/my_app_web.ex | bigbassroller/ueberauth_example | 5e889abaf060b6a37add2eb8a3cf1938f394c4af | [
"MIT"
] | null | null | null | defmodule MyAppWeb 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 MyAppWeb, :controller
use MyAppWeb, :view
The definitions below will be executed for every view,
controller, etc, s... | 22.518987 | 76 | 0.68072 |
7a894fbc40780352a15e9ba91bf6563c021569d4 | 2,027 | ex | Elixir | clients/apigee/lib/google_api/apigee/v1/model/google_cloud_apigee_v1_access.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/apigee/lib/google_api/apigee/v1/model/google_cloud_apigee_v1_access.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/apigee/lib/google_api/apigee/v1/model/google_cloud_apigee_v1_access.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... | 38.245283 | 107 | 0.744943 |
7a897e4a03c1ae16d5bd3bec7a7f9dfed8d0ac1a | 2,246 | exs | Elixir | 18-gen_server.exs | lbiru/30-days-of-elixir | 8472b6bf4a2f0a12dc6aea930abde2d50867b460 | [
"MIT"
] | 3,040 | 2015-01-01T00:26:22.000Z | 2022-03-17T04:10:43.000Z | 18-gen_server.exs | tifazxy/30-days-of-elixir | 1d3e5cc1580ecbfdf9bd8eafed6ed68cb681404a | [
"MIT"
] | 29 | 2015-01-03T02:36:47.000Z | 2019-05-20T13:01:52.000Z | 18-gen_server.exs | tifazxy/30-days-of-elixir | 1d3e5cc1580ecbfdf9bd8eafed6ed68cb681404a | [
"MIT"
] | 520 | 2015-01-01T09:43:36.000Z | 2022-03-19T00:02:22.000Z | # I wanted to learn about the GenServer, so:
# 1. first wrote a function to return prime factors of a given number
# 2. then wrapped that in a "server" that handles both sync and async calls
defmodule PrimeFactors do
@moduledoc """
Calculate prime factors of any number given.
"""
@doc """
Given a number, re... | 20.605505 | 75 | 0.620214 |
7a89af7d6b9700c430d3e87cdeb83f2b80ebed89 | 1,204 | ex | Elixir | lib/qa_api_web/views/error_helpers.ex | tagonzalez/qa-api | 10d3ff2ee7fe21c4cca84683f93a3111f7c415e6 | [
"MIT"
] | null | null | null | lib/qa_api_web/views/error_helpers.ex | tagonzalez/qa-api | 10d3ff2ee7fe21c4cca84683f93a3111f7c415e6 | [
"MIT"
] | null | null | null | lib/qa_api_web/views/error_helpers.ex | tagonzalez/qa-api | 10d3ff2ee7fe21c4cca84683f93a3111f7c415e6 | [
"MIT"
] | null | null | null | defmodule QaApiWeb.ErrorHelpers do
@moduledoc """
Conveniences for translating and building error messages.
"""
@doc """
Translates an error message using gettext.
"""
def translate_error({msg, opts}) do
# When using gettext, we typically pass the strings we want
# to translate as a static argume... | 35.411765 | 74 | 0.669435 |
7a89b40b921080b9003f0402012ea3f89ffab558 | 872 | ex | Elixir | clients/run/lib/google_api/run/v1/metadata.ex | Contractbook/elixir-google-api | 342751041aaf8c2e7f76f9922cf24b9c5895802b | [
"Apache-2.0"
] | null | null | null | clients/run/lib/google_api/run/v1/metadata.ex | Contractbook/elixir-google-api | 342751041aaf8c2e7f76f9922cf24b9c5895802b | [
"Apache-2.0"
] | null | null | null | clients/run/lib/google_api/run/v1/metadata.ex | Contractbook/elixir-google-api | 342751041aaf8c2e7f76f9922cf24b9c5895802b | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 32.296296 | 74 | 0.755734 |
7a89be14090e102562e4ddf4403939968153d290 | 30,624 | ex | Elixir | clients/storage/lib/google_api/storage/v1/api/buckets.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/storage/lib/google_api/storage/v1/api/buckets.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/storage/lib/google_api/storage/v1/api/buckets.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 ... | 49.076923 | 193 | 0.637539 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.