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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2d883615a23f208ce86de478d13196f276c024de | 2,492 | ex | Elixir | 04/elixir/lib/december_four.ex | bombsimon/advent-of-code-2019 | 3b874ebbcd5e9e83fd5685d3435987e9ba882ca9 | [
"WTFPL"
] | null | null | null | 04/elixir/lib/december_four.ex | bombsimon/advent-of-code-2019 | 3b874ebbcd5e9e83fd5685d3435987e9ba882ca9 | [
"WTFPL"
] | 2 | 2021-09-02T04:38:50.000Z | 2022-02-13T03:28:57.000Z | 04/elixir/lib/december_four.ex | bombsimon/advent-of-code-2019 | 3b874ebbcd5e9e83fd5685d3435987e9ba882ca9 | [
"WTFPL"
] | null | null | null | defmodule DecemberFour do
@moduledoc """
Fourth Advent of Code task.
"""
@start 246_515
@stop 739_105
@doc """
Part one of day 4.
"""
def part_one do
list_to_duples_and_triples()
|> Enum.filter(fn a -> Enum.at(a[:result], 0) end)
|> Kernel.length()
end
@doc """
Part two of day 4.
... | 22.25 | 81 | 0.569823 |
2d88411fd12b51bb27cbecdf26e5e241b42a3458 | 474 | exs | Elixir | src/token_service/test/token_service_web/views/error_view_test.exs | wbpascal/statuswebsite | 7a81e530a9176c53abeab0582cb710113101b716 | [
"MIT"
] | 1 | 2021-04-18T20:21:03.000Z | 2021-04-18T20:21:03.000Z | src/token_service/test/token_service_web/views/error_view_test.exs | wbpascal/statuswebsite | 7a81e530a9176c53abeab0582cb710113101b716 | [
"MIT"
] | null | null | null | src/token_service/test/token_service_web/views/error_view_test.exs | wbpascal/statuswebsite | 7a81e530a9176c53abeab0582cb710113101b716 | [
"MIT"
] | 1 | 2021-04-18T20:21:08.000Z | 2021-04-18T20:21:08.000Z | defmodule TokenServiceWeb.ErrorViewTest do
use TokenServiceWeb.ConnCase, async: true
# Bring render/3 and render_to_string/3 for testing custom views
import Phoenix.View
test "renders 404.json" do
assert render(TokenServiceWeb.ErrorView, "404.json", []) == %{errors: %{detail: "Not Found"}}
end
test "... | 29.625 | 97 | 0.696203 |
2d88b85937b77ac9b372294fb41db23bb0d9d519 | 870 | exs | Elixir | mix.exs | amclain/uniden-scanner-controller | 773a1fa4369268c18e677872da2cc1e97f1f1f7a | [
"MIT"
] | 2 | 2017-10-10T20:41:53.000Z | 2019-08-06T16:55:43.000Z | mix.exs | amclain/uniden-scanner-controller | 773a1fa4369268c18e677872da2cc1e97f1f1f7a | [
"MIT"
] | null | null | null | mix.exs | amclain/uniden-scanner-controller | 773a1fa4369268c18e677872da2cc1e97f1f1f7a | [
"MIT"
] | 1 | 2021-06-09T17:15:02.000Z | 2021-06-09T17:15:02.000Z | defmodule UnidenScannerController.Mixfile do
use Mix.Project
def project do
[
app: :uniden_scanner_controller,
version: "0.1.0",
deps: deps
]
end
# Configuration for the OTP application
#
# Type `mix help compile.app` for more information
def application do
[applications: [... | 23.513514 | 77 | 0.618391 |
2d88d0513d90f20aa0c4c64f0b85f17b39a53401 | 141 | exs | Elixir | test/buckaro_test.exs | IanLuites/buckaro | 41e60343f4cf11c3402bcf4ce843ece879f79959 | [
"MIT"
] | 1 | 2020-03-25T12:14:55.000Z | 2020-03-25T12:14:55.000Z | test/buckaro_test.exs | IanLuites/buckaro | 41e60343f4cf11c3402bcf4ce843ece879f79959 | [
"MIT"
] | 1 | 2018-10-24T22:35:13.000Z | 2018-10-24T22:35:13.000Z | test/buckaro_test.exs | IanLuites/buckaro | 41e60343f4cf11c3402bcf4ce843ece879f79959 | [
"MIT"
] | null | null | null | defmodule BuckarooTest do
use ExUnit.Case
doctest Buckaroo
test "greets the world" do
assert Buckaroo.hello() == :world
end
end
| 15.666667 | 37 | 0.716312 |
2d89019e077850bdfe41d80d1f05d1a34fd7d4a4 | 2,188 | exs | Elixir | config/prod.exs | harmon25/Reactpxbp | 7b895eb507d23c005229a2dee1ed078cc8291230 | [
"MIT"
] | null | null | null | config/prod.exs | harmon25/Reactpxbp | 7b895eb507d23c005229a2dee1ed078cc8291230 | [
"MIT"
] | null | null | null | config/prod.exs | harmon25/Reactpxbp | 7b895eb507d23c005229a2dee1ed078cc8291230 | [
"MIT"
] | null | null | null | use Mix.Config
# For production, we configure the host to read the PORT
# from the system environment. Therefore, you will need
# to set PORT=80 before running your server.
#
# You should also configure the url host to something
# meaningful, we use this information when generating URLs.
#
# Finally, we also include t... | 33.151515 | 67 | 0.714808 |
2d890cf048d2752068f1227dd415d8677b85b800 | 2,143 | exs | Elixir | exercises/rail-fence-cipher/rail_fence_cipher_test.exs | jerith/elixir | 9a3f2a2fbee26a7b6a6b3ad74a9e6d1ff2495ed4 | [
"Apache-2.0"
] | null | null | null | exercises/rail-fence-cipher/rail_fence_cipher_test.exs | jerith/elixir | 9a3f2a2fbee26a7b6a6b3ad74a9e6d1ff2495ed4 | [
"Apache-2.0"
] | null | null | null | exercises/rail-fence-cipher/rail_fence_cipher_test.exs | jerith/elixir | 9a3f2a2fbee26a7b6a6b3ad74a9e6d1ff2495ed4 | [
"Apache-2.0"
] | 1 | 2018-07-19T23:43:56.000Z | 2018-07-19T23:43:56.000Z | if !System.get_env("EXERCISM_TEST_EXAMPLES") do
Code.load_file("rail_fence_cipher.exs", __DIR__)
end
ExUnit.start()
ExUnit.configure(exclude: :pending, trace: true)
defmodule RailFenceCipherTest do
use ExUnit.Case
# @tag :pending
test "encode with ending at the first rail" do
assert RailFenceCipher.encod... | 26.7875 | 93 | 0.701353 |
2d8910b70378e9e4d69bc5b409ae4f6ba0e9fcfa | 173 | exs | Elixir | config/test.exs | TheEndIsNear/ironman | 769e6777e93759810b168e7b6819ef7cb9ab5f80 | [
"MIT"
] | 39 | 2019-02-19T21:59:35.000Z | 2021-03-31T21:43:58.000Z | config/test.exs | TheEndIsNear/ironman | 769e6777e93759810b168e7b6819ef7cb9ab5f80 | [
"MIT"
] | 17 | 2019-03-13T15:02:52.000Z | 2020-11-09T20:33:44.000Z | config/test.exs | TheEndIsNear/ironman | 769e6777e93759810b168e7b6819ef7cb9ab5f80 | [
"MIT"
] | 5 | 2020-01-30T13:51:15.000Z | 2020-10-25T18:27:59.000Z | use Mix.Config
config :ironman,
hex_repo: "https://hex.pm",
http_client: Ironman.MockHttpClient,
io: Ironman.MockIO,
cmd: Ironman.MockCmd,
file: Ironman.MockFile
| 19.222222 | 38 | 0.728324 |
2d8916f6b997cb01ac82ff3309e505252d9f4c30 | 1,363 | ex | Elixir | src/test/support/data_case.ex | leonardolpeixoto/meetapp_server | 6f0ac03e2b13aee71db22ac98881ea50c7f5fb63 | [
"MIT"
] | null | null | null | src/test/support/data_case.ex | leonardolpeixoto/meetapp_server | 6f0ac03e2b13aee71db22ac98881ea50c7f5fb63 | [
"MIT"
] | null | null | null | src/test/support/data_case.ex | leonardolpeixoto/meetapp_server | 6f0ac03e2b13aee71db22ac98881ea50c7f5fb63 | [
"MIT"
] | null | null | null | defmodule Src.DataCase do
@moduledoc """
This module defines the setup for tests requiring
access to the application's data layer.
You may define functions here to be used as helpers in
your tests.
Finally, if the test case interacts with the database,
it cannot be async. For this reason, every test run... | 25.240741 | 77 | 0.674982 |
2d893698650145654368885a47de3eab53297208 | 608 | ex | Elixir | lib/wabanex/user.ex | GabrielBeltrame/wabanex | 1b75c690880eb8f474637e0db788e5576c6818fc | [
"MIT"
] | null | null | null | lib/wabanex/user.ex | GabrielBeltrame/wabanex | 1b75c690880eb8f474637e0db788e5576c6818fc | [
"MIT"
] | null | null | null | lib/wabanex/user.ex | GabrielBeltrame/wabanex | 1b75c690880eb8f474637e0db788e5576c6818fc | [
"MIT"
] | null | null | null | defmodule Wabanex.User do
use Ecto.Schema
import Ecto.Changeset
@fields [:email, :password, :name]
schema "users" do
field :email, :string
field :name, :string
field :password, :string
timestamps()
end
def changeset(params) do
%__MODULE__{} #mesma coisa do que escrever %Wabanex.User{... | 24.32 | 88 | 0.662829 |
2d893864fe93afce8dfc2e74a00f8900c906ce54 | 2,794 | ex | Elixir | lib/policr_mini/businesses/chat_business.ex | uxh/policr-mini | bad33834a9bd6405afb241b74000cec2cb78ef21 | [
"MIT"
] | 487 | 2020-06-08T03:04:21.000Z | 2022-03-31T14:51:36.000Z | lib/policr_mini/businesses/chat_business.ex | uxh/policr-mini | bad33834a9bd6405afb241b74000cec2cb78ef21 | [
"MIT"
] | 141 | 2020-06-11T01:03:29.000Z | 2022-03-30T20:23:32.000Z | lib/policr_mini/businesses/chat_business.ex | uxh/policr-mini | bad33834a9bd6405afb241b74000cec2cb78ef21 | [
"MIT"
] | 61 | 2020-06-10T05:25:03.000Z | 2022-03-23T15:54:26.000Z | defmodule PolicrMini.ChatBusiness do
@moduledoc """
群组的业务功能实现。
"""
use PolicrMini, business: PolicrMini.Instances.Chat
import Ecto.Query, only: [from: 2]
alias PolicrMini.Schema.Permission
# TODO:添加测试。
@doc """
通过用户查询群组列表。
将返回指定用户下具有可读权限的群组列表,并按照添加时间排序。
"""
@spec find_list_by_user(integer) ... | 25.4 | 91 | 0.6267 |
2d8947bc81d4b719960040acc462c6a351c0f9f5 | 17,858 | ex | Elixir | lib/ex_unit/lib/ex_unit/doc_test.ex | guilleiguaran/elixir | 952052869ff7af0e293d2a7160b1aebc68fc46be | [
"Apache-2.0"
] | null | null | null | lib/ex_unit/lib/ex_unit/doc_test.ex | guilleiguaran/elixir | 952052869ff7af0e293d2a7160b1aebc68fc46be | [
"Apache-2.0"
] | null | null | null | lib/ex_unit/lib/ex_unit/doc_test.ex | guilleiguaran/elixir | 952052869ff7af0e293d2a7160b1aebc68fc46be | [
"Apache-2.0"
] | null | null | null | defmodule ExUnit.DocTest do
@moduledoc """
ExUnit.DocTest implements functionality similar to [Python's
doctest](http://docs.python.org/2/library/doctest.html).
In a nutshell, it allows us to generate tests from the code
examples existing in a module/function/macro's documentation.
In order to do that, one... | 33.255121 | 171 | 0.637753 |
2d894ff51a739a6e9662417c41290f1a9e65521b | 158 | exs | Elixir | priv/repo/migrations/20180606185126_add_avatar_to_users.exs | kenforthewin/mentat | 417ce989e13f2f08990b872027ce8dcb3a1e6e99 | [
"MIT"
] | 88 | 2018-06-17T17:36:56.000Z | 2021-11-20T20:29:27.000Z | priv/repo/migrations/20180606185126_add_avatar_to_users.exs | kenforthewin/scalar | 417ce989e13f2f08990b872027ce8dcb3a1e6e99 | [
"MIT"
] | 47 | 2018-05-12T00:12:37.000Z | 2018-06-16T19:52:52.000Z | priv/repo/migrations/20180606185126_add_avatar_to_users.exs | kenforthewin/scalar | 417ce989e13f2f08990b872027ce8dcb3a1e6e99 | [
"MIT"
] | 6 | 2018-06-17T17:37:11.000Z | 2020-04-12T04:05:49.000Z | defmodule App.Repo.Migrations.AddAvatarToUsers do
use Ecto.Migration
def change do
alter table(:users) do
add :avatar, :text
end
end
end
| 15.8 | 49 | 0.696203 |
2d895f85f0c41a4b9eeb0b20ac9b24f888964c35 | 2,304 | exs | Elixir | test/seren_web/controllers/genre_controller_test.exs | allen-garvey/seren | f61cb7edcd7d3f927d2929db14b2a4a1578a3925 | [
"MIT"
] | 4 | 2019-10-04T16:11:15.000Z | 2021-08-18T21:00:13.000Z | apps/seren/test/seren_web/controllers/genre_controller_test.exs | allen-garvey/phoenix-umbrella | 1d444bbd62a5e7b5f51d317ce2be71ee994125d5 | [
"MIT"
] | 5 | 2020-03-16T23:52:25.000Z | 2021-09-03T16:52:17.000Z | test/seren_web/controllers/genre_controller_test.exs | allen-garvey/seren | f61cb7edcd7d3f927d2929db14b2a4a1578a3925 | [
"MIT"
] | null | null | null | defmodule SerenWeb.GenreControllerTest do
use SerenWeb.ConnCase
alias Seren.Player
alias Seren.Player.Genre
@create_attrs %{name: "some name"}
@update_attrs %{name: "some updated name"}
@invalid_attrs %{name: nil}
def fixture(:genre) do
{:ok, genre} = Player.create_genre(@create_attrs)
genre
... | 28.8 | 92 | 0.621962 |
2d89800a034c98a87cb80a0b97cd83f7eaa8028b | 3,402 | ex | Elixir | clients/vision/lib/google_api/vision/v1/model/web_detection.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/vision/lib/google_api/vision/v1/model/web_detection.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/vision/lib/google_api/vision/v1/model/web_detection.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... | 54.870968 | 292 | 0.733686 |
2d89839b2305a239e85328f5feece0608a4b775f | 716 | ex | Elixir | test/support/cassette_mock.ex | locaweb/cassette-plug | 31465e6e0e558f271649bda99e4d4d8e66179e69 | [
"MIT"
] | 1 | 2019-06-05T22:40:30.000Z | 2019-06-05T22:40:30.000Z | test/support/cassette_mock.ex | locaweb/cassette-plug | 31465e6e0e558f271649bda99e4d4d8e66179e69 | [
"MIT"
] | 9 | 2017-10-17T17:29:47.000Z | 2021-09-30T15:03:09.000Z | test/support/cassette_mock.ex | locaweb/cassette-plug | 31465e6e0e558f271649bda99e4d4d8e66179e69 | [
"MIT"
] | 4 | 2016-10-05T04:00:16.000Z | 2021-10-02T03:18:03.000Z | defmodule CassetteMock do
@moduledoc """
Test helper module with Cassette-related utility functions
"""
alias Cassette.Config
alias Cassette.User
@valid_ticket "ST-a-valid-ticket"
@invalid_ticket "ST-an-invalid-ticket"
def config do
%{
Config.default()
| service: "example.org",
... | 19.351351 | 60 | 0.666201 |
2d89f8b6efb0f3beae5befc8f2f15dee26a1c91d | 1,302 | ex | Elixir | lib/majudge_web/endpoint.ex | coltonw/majudge | 4f81a66abe6a2e82f42131982e7a9b26951b9124 | [
"MIT"
] | null | null | null | lib/majudge_web/endpoint.ex | coltonw/majudge | 4f81a66abe6a2e82f42131982e7a9b26951b9124 | [
"MIT"
] | 1 | 2021-05-10T04:23:56.000Z | 2021-05-10T04:23:56.000Z | lib/majudge_web/endpoint.ex | coltonw/majudge | 4f81a66abe6a2e82f42131982e7a9b26951b9124 | [
"MIT"
] | null | null | null | defmodule MajudgeWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :majudge
socket "/socket", MajudgeWeb.UserSocket,
websocket: true,
longpoll: false
# Serve at "/" the static files from "priv/static" directory.
#
# You should set gzip to true if you are running phx.digest
# when deploying your stati... | 27.702128 | 69 | 0.710445 |
2d89fa8d7b4656c4e81a433dd65ebcbd5b51c4e9 | 252 | exs | Elixir | config/dev.exs | keichan34/webpay | 49c8f5df78016632d90e7cdbfc63f34d46c26b1c | [
"MIT"
] | 1 | 2016-05-15T14:09:18.000Z | 2016-05-15T14:09:18.000Z | config/dev.exs | keichan34/webpay | 49c8f5df78016632d90e7cdbfc63f34d46c26b1c | [
"MIT"
] | null | null | null | config/dev.exs | keichan34/webpay | 49c8f5df78016632d90e7cdbfc63f34d46c26b1c | [
"MIT"
] | null | null | null | use Mix.Config
config :webpay, :adapter, Webpay.Adapter.HTTPoison
# config :webpay, :credentials,
# secret_key: "test_secret_XXX",
# public_key: "test_public_XXX"
if File.exists?("./config/dev.secret.exs") do
import_config "dev.secret.exs"
end
| 22.909091 | 50 | 0.738095 |
2d89ff032ba45af5d2b8357162a195e5ef8e31de | 5,868 | exs | Elixir | lib/logger/test/logger/handler_test.exs | spencerdcarlson/elixir | 23d75ecdf58df80969e12f4420282238e19219a1 | [
"Apache-2.0"
] | 243 | 2020-02-03T03:48:51.000Z | 2021-11-08T12:56:25.000Z | lib/logger/test/logger/handler_test.exs | spencerdcarlson/elixir | 23d75ecdf58df80969e12f4420282238e19219a1 | [
"Apache-2.0"
] | 6 | 2021-03-19T12:33:21.000Z | 2021-04-02T17:52:45.000Z | lib/logger/test/logger/handler_test.exs | spencerdcarlson/elixir | 23d75ecdf58df80969e12f4420282238e19219a1 | [
"Apache-2.0"
] | 1 | 2020-11-25T02:22:55.000Z | 2020-11-25T02:22:55.000Z | defmodule Logger.HandlerTest do
use Logger.Case
@moduletag :logger
defmodule CustomTranslator do
def t(:debug, :info, :format, {'hello: ~p', [:ok]}) do
:skip
end
def t(:debug, :info, :format, {'world: ~p', [:ok]}) do
{:ok, "rewritten"}
end
def t(:debug, :info, :report, {:logger,... | 32.241758 | 92 | 0.612815 |
2d8a13360082d878cc44ad9b778ecbc97ff17597 | 244 | ex | Elixir | lib/neural_network/connection.ex | Markonis/BrainElixir | 7f1d193827b7ca8113424e7debedd920f75a0a10 | [
"MIT"
] | null | null | null | lib/neural_network/connection.ex | Markonis/BrainElixir | 7f1d193827b7ca8113424e7debedd920f75a0a10 | [
"MIT"
] | null | null | null | lib/neural_network/connection.ex | Markonis/BrainElixir | 7f1d193827b7ca8113424e7debedd920f75a0a10 | [
"MIT"
] | null | null | null | defmodule NeuralNetwork.Connection do
defstruct weight: 0, value: 0, index: 0
alias NeuralNetwork.Connection
def from_map(map) do
%Connection{
weight: Map.get(map, "weight"),
index: Map.get(map, "index")
}
end
end
| 18.769231 | 41 | 0.663934 |
2d8a23944e57fb869663225334109c284e842319 | 1,065 | exs | Elixir | mix.exs | marc-bouvier/eisenhower_matrix | 7de26eec4964e45ceab7cef3d6b14e1519d70a8e | [
"MIT"
] | null | null | null | mix.exs | marc-bouvier/eisenhower_matrix | 7de26eec4964e45ceab7cef3d6b14e1519d70a8e | [
"MIT"
] | null | null | null | mix.exs | marc-bouvier/eisenhower_matrix | 7de26eec4964e45ceab7cef3d6b14e1519d70a8e | [
"MIT"
] | null | null | null | defmodule EisenhowerMatrix.Mixfile do
use Mix.Project
def project do
[
app: :eisenhower_matrix,
version: "0.0.1",
elixir: "~> 1.4",
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix, :gettext] ++ Mix.compilers,
start_permanent: Mix.env == :prod,
deps: deps()
... | 24.204545 | 56 | 0.592488 |
2d8a2b6451e09dc5e8a5bf5a4bdcafa069d39e2d | 7,310 | exs | Elixir | test/server_sent_event_stage_test.exs | mbta/server_sent_event_stage | 99655384377811bb6047b0ad8a4bcbb6687de0dd | [
"MIT"
] | 3 | 2021-05-26T00:40:15.000Z | 2022-01-06T20:01:35.000Z | test/server_sent_event_stage_test.exs | mbta/server_sent_event_stage | 99655384377811bb6047b0ad8a4bcbb6687de0dd | [
"MIT"
] | 11 | 2018-08-11T18:37:34.000Z | 2022-03-25T13:41:44.000Z | test/server_sent_event_stage_test.exs | mbta/server_sent_event_stage | 99655384377811bb6047b0ad8a4bcbb6687de0dd | [
"MIT"
] | 3 | 2018-08-11T18:29:17.000Z | 2019-05-17T16:55:41.000Z | defmodule ServerSentEventStageTest do
use ExUnit.Case
import ServerSentEventStage
alias ServerSentEventStage.Event
import ExUnit.CaptureLog
@moduletag :capture_log
@assert_receive_timeout 500
describe "start_link/1" do
test "returns a pid when a URL is provided" do
assert {:ok, pid} = start_l... | 31.239316 | 94 | 0.617647 |
2d8a2e158563d38fadad1421add031d81f910dcc | 1,133 | exs | Elixir | config/config.exs | davvidbaker/ueberauth_fitbit | a6013b6e41648a0e702aeed0010cb82bb0d5a653 | [
"MIT"
] | 6 | 2016-12-28T04:11:55.000Z | 2020-12-18T19:29:51.000Z | config/config.exs | davvidbaker/ueberauth_fitbit | a6013b6e41648a0e702aeed0010cb82bb0d5a653 | [
"MIT"
] | 5 | 2016-02-03T05:01:42.000Z | 2019-03-21T17:56:49.000Z | config/config.exs | davvidbaker/ueberauth_fitbit | a6013b6e41648a0e702aeed0010cb82bb0d5a653 | [
"MIT"
] | 4 | 2017-01-14T23:19:42.000Z | 2018-07-01T19:43:04.000Z | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the paren... | 36.548387 | 73 | 0.754634 |
2d8a33f1d9b840e93f0766299a10072062f4caa6 | 325 | exs | Elixir | config/test.exs | corybuecker/exlytics | b6bffc682954755d0f2e56c2562bf5654d129e67 | [
"Apache-2.0"
] | null | null | null | config/test.exs | corybuecker/exlytics | b6bffc682954755d0f2e56c2562bf5654d129e67 | [
"Apache-2.0"
] | 27 | 2020-06-11T08:58:48.000Z | 2022-02-28T23:31:13.000Z | config/test.exs | corybuecker/exlytics | b6bffc682954755d0f2e56c2562bf5654d129e67 | [
"Apache-2.0"
] | null | null | null | import Config
config :exlytics, host: "localhost", port: "4000"
config :exlytics, Exlytics.Data.Repo,
url: System.get_env("DATABASE_CONNECTION_URL", "ecto://postgres@localhost:5432/exlytics_test"),
migration_default_prefix: "exlytics",
show_sensitive_data_on_connection_error: true,
pool: Ecto.Adapters.SQL.San... | 32.5 | 97 | 0.784615 |
2d8a806fefd684afe29dfe8dde2c25ca52eddd47 | 34 | ex | Elixir | test/sample_apps/minimal_phoenix14/lib/minimal_phoenix14.ex | kayodeosagbemi/elixir-runtime | 1746adf362444e3e0cc2daa5e461be24f1cb624a | [
"Apache-2.0"
] | 170 | 2017-08-25T06:40:14.000Z | 2022-01-10T22:18:51.000Z | test/sample_apps/minimal_phoenix14/lib/minimal_phoenix14.ex | kayodeosagbemi/elixir-runtime | 1746adf362444e3e0cc2daa5e461be24f1cb624a | [
"Apache-2.0"
] | 27 | 2017-09-07T05:57:37.000Z | 2022-03-22T13:40:47.000Z | test/sample_apps/minimal_phoenix14/lib/minimal_phoenix14.ex | kayodeosagbemi/elixir-runtime | 1746adf362444e3e0cc2daa5e461be24f1cb624a | [
"Apache-2.0"
] | 16 | 2017-11-14T01:45:00.000Z | 2021-10-09T03:26:39.000Z | defmodule MinimalPhoenix14 do
end
| 11.333333 | 29 | 0.882353 |
2d8a883caaab898c483d74fa82e70e1a8d173838 | 286 | exs | Elixir | config/test.exs | arjit95/elixir-chat | e4db9d37713edb8398017c8629b8064541c5a110 | [
"MIT"
] | null | null | null | config/test.exs | arjit95/elixir-chat | e4db9d37713edb8398017c8629b8064541c5a110 | [
"MIT"
] | null | null | null | config/test.exs | arjit95/elixir-chat | e4db9d37713edb8398017c8629b8064541c5a110 | [
"MIT"
] | null | null | null | import Config
config :chat, Chat.Repo,
db_url: "ecto://root:root@127.0.0.1:6603/chat",
adapter: Ecto.Adapters.MyXQL,
pool_size: 2
config :chat,
port: "4002",
load_from_system_env: true,
env: :dev
config :joken,
default_signer: "secret"
config :logger,
level: "warn"
| 15.888889 | 49 | 0.685315 |
2d8aabbc0ce78f88742ccfe44eb4bfb23c9f51c3 | 353 | exs | Elixir | priv/repo/seeds.exs | Galanda/ectoproj | 9dadeb27cc7b54034ab19363bc569d0fc4be671b | [
"MIT"
] | null | null | null | priv/repo/seeds.exs | Galanda/ectoproj | 9dadeb27cc7b54034ab19363bc569d0fc4be671b | [
"MIT"
] | null | null | null | priv/repo/seeds.exs | Galanda/ectoproj | 9dadeb27cc7b54034ab19363bc569d0fc4be671b | [
"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:
#
# Ectoproj.Repo.insert!(%Ectoproj.SomeSchema{})
#
# We recommend using the bang functions (`insert!`, `update!`
# and so on) as they wi... | 29.416667 | 61 | 0.708215 |
2d8ab52cc7b0c0d9f716f35a0deb2d0793c6b753 | 1,816 | ex | Elixir | platform/target/network/utils.ex | FarmBot/farmbot_os | 5ebdca3afd672eb6b0af5c71cfca02488b32569a | [
"MIT"
] | 843 | 2016-10-05T23:46:05.000Z | 2022-03-14T04:31:55.000Z | platform/target/network/utils.ex | FarmBot/farmbot_os | 5ebdca3afd672eb6b0af5c71cfca02488b32569a | [
"MIT"
] | 455 | 2016-10-15T08:49:16.000Z | 2022-03-15T12:23:04.000Z | platform/target/network/utils.ex | FarmBot/farmbot_os | 5ebdca3afd672eb6b0af5c71cfca02488b32569a | [
"MIT"
] | 261 | 2016-10-10T04:37:06.000Z | 2022-03-13T21:07:38.000Z | defmodule FarmbotOS.Platform.Target.Network.Utils do
@moduledoc "common network related utilities"
import FarmbotCore.Config, only: [get_config_value: 3]
def build_hostap_ssid do
{:ok, hostname} = :inet.gethostname()
if String.starts_with?(to_string(hostname), "farmbot-") do
to_string('farmbot-' +... | 25.942857 | 75 | 0.647577 |
2d8ad9f84ddc5245af08cea7d5dcdaffba9df63c | 3,399 | ex | Elixir | lib/koans/13_functions.ex | spaceporn/elixir-koans | 2e7c472cd630b843a29ce6c2b3be0ece91fa5668 | [
"MIT"
] | null | null | null | lib/koans/13_functions.ex | spaceporn/elixir-koans | 2e7c472cd630b843a29ce6c2b3be0ece91fa5668 | [
"MIT"
] | null | null | null | lib/koans/13_functions.ex | spaceporn/elixir-koans | 2e7c472cd630b843a29ce6c2b3be0ece91fa5668 | [
"MIT"
] | null | null | null | defmodule Functions do
use Koans
@intro "Functions"
def greet(name) do
"Hello, #{name}!"
end
koan "Functions map arguments to outputs" do
assert greet("World") == "Hello, World!"
end
def multiply(a, b), do: a * b
koan "Single line functions are cool, but mind the comma and the colon!" do
... | 29.815789 | 104 | 0.640777 |
2d8b19b925da8a5ff4250150df5b1c025af255ce | 6,468 | exs | Elixir | .credo.exs | alesshh/acme-bank | 0f885dc12614cba4c8f3a46c04b714f3ada8bb9b | [
"MIT"
] | null | null | null | .credo.exs | alesshh/acme-bank | 0f885dc12614cba4c8f3a46c04b714f3ada8bb9b | [
"MIT"
] | null | null | null | .credo.exs | alesshh/acme-bank | 0f885dc12614cba4c8f3a46c04b714f3ada8bb9b | [
"MIT"
] | null | null | null | # This file contains the configuration for Credo and you are probably reading
# this after creating it with `mix credo.gen.config`.
#
# If you find anything wrong or unclear in this file, please report an
# issue on GitHub: https://github.com/rrrene/credo/issues
#
%{
#
# You can have as many configs as you like in ... | 39.2 | 88 | 0.617811 |
2d8b1a91dd75ed48d0dfa1d097aead053e2a8ac7 | 790 | ex | Elixir | lib/vintage_net/interface/lan_connectivity_checker.ex | nerves-networking/vintage_net | 8d4251a0ec995babf8f4d7aa7cc1d74b70646c72 | [
"Apache-2.0"
] | 85 | 2019-05-09T14:54:38.000Z | 2022-02-08T16:52:04.000Z | lib/vintage_net/interface/lan_connectivity_checker.ex | fhunleth/vintage_net | 215495533cb642eeb172daba08208a454f19b36f | [
"Apache-2.0"
] | 132 | 2019-05-09T15:57:59.000Z | 2022-02-28T16:31:22.000Z | lib/vintage_net/interface/lan_connectivity_checker.ex | fhunleth/vintage_net | 215495533cb642eeb172daba08208a454f19b36f | [
"Apache-2.0"
] | 14 | 2019-07-08T19:18:23.000Z | 2022-02-08T16:52:05.000Z | defmodule VintageNet.Interface.LANConnectivityChecker do
@moduledoc false
require Logger
@spec child_spec(keyword()) :: Supervisor.child_spec()
def child_spec(opts) do
warn()
%{
id: VintageNet.Connectivity.LANChecker,
start: {VintageNet.Connectivity.LANChecker, :start_link, [opts]},
... | 24.6875 | 93 | 0.708861 |
2d8b3a482af26ccc1c7c23f5ea560e81ed2d125d | 2,076 | ex | Elixir | clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/fingerprint.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/fingerprint.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/fingerprint.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.169811 | 278 | 0.7158 |
2d8b3be571c641369ae9a0f99ce017535500dcc2 | 424 | exs | Elixir | adv_2020/test/day_17_test.exs | SamuelSarle/advent | 31025f7b081826cb51b37a2d8b8d263413b71086 | [
"Unlicense"
] | null | null | null | adv_2020/test/day_17_test.exs | SamuelSarle/advent | 31025f7b081826cb51b37a2d8b8d263413b71086 | [
"Unlicense"
] | null | null | null | adv_2020/test/day_17_test.exs | SamuelSarle/advent | 31025f7b081826cb51b37a2d8b8d263413b71086 | [
"Unlicense"
] | null | null | null | defmodule DaySeventeenTest do
use ExUnit.Case
import DaySeventeen
test "returns correct answer" do
input = """
.#.
..#
###
"""
assert format_input(input) |> step(1) |> count_active() == 11
assert solve(input) == 112
end
test "counting active returns correct result" do
input... | 15.703704 | 65 | 0.566038 |
2d8b4ea964467583317edda4a2a59b4e59913cd9 | 497 | ex | Elixir | server/lib/buff_server/authentication/token.ex | BlueHotDog/buff | 0403f68867e950945a47cce2d7442974d12583b2 | [
"MIT"
] | 1 | 2020-03-18T17:29:32.000Z | 2020-03-18T17:29:32.000Z | server/lib/buff_server/authentication/token.ex | BlueHotDog/buff | 0403f68867e950945a47cce2d7442974d12583b2 | [
"MIT"
] | 26 | 2019-06-09T18:35:45.000Z | 2020-07-30T17:05:58.000Z | server/lib/buff_server/authentication/token.ex | BlueHotDog/buff | 0403f68867e950945a47cce2d7442974d12583b2 | [
"MIT"
] | null | null | null | defmodule BuffServer.Authentication.Token do
@moduledoc """
Implementing custom JWT token using Joken.
"""
use Joken.Config
@hostname Application.get_env(:buff_server, BuffServerWeb.Endpoint) |> get_in([:url, :host])
# 7 days
@expiration 60 * 60 * 24 * 7
@impl true
def token_config do
default_cl... | 27.611111 | 94 | 0.663984 |
2d8b74ac7fa6fb559be72049bc23f495ae72a75d | 576 | exs | Elixir | test/test_helper.exs | shovelend/honeydew | 8575beaae480154bdfa5dae2f6a8814e1a563d80 | [
"MIT"
] | null | null | null | test/test_helper.exs | shovelend/honeydew | 8575beaae480154bdfa5dae2f6a8814e1a563d80 | [
"MIT"
] | null | null | null | test/test_helper.exs | shovelend/honeydew | 8575beaae480154bdfa5dae2f6a8814e1a563d80 | [
"MIT"
] | 1 | 2019-12-06T12:05:18.000Z | 2019-12-06T12:05:18.000Z | defmodule Sender do
use Honeydew
def init(state) do
{:ok, state}
end
def send_hi(state) do
send(state, :hi)
end
def send_msg(to, msg, _state) do
send(to, msg)
end
def send_state(to, state) do
send(to, state)
end
def state(state) do
state
end
def one_argument(a, _state) ... | 12 | 37 | 0.642361 |
2d8b7a318ebcad060a68ac8f90c1180877639483 | 1,667 | ex | Elixir | lib/find_my_personal_web/endpoint.ex | adrianomota/find_my_personal | 6175a64f501407bb047b23cfcc76a981a7957148 | [
"MIT"
] | null | null | null | lib/find_my_personal_web/endpoint.ex | adrianomota/find_my_personal | 6175a64f501407bb047b23cfcc76a981a7957148 | [
"MIT"
] | null | null | null | lib/find_my_personal_web/endpoint.ex | adrianomota/find_my_personal | 6175a64f501407bb047b23cfcc76a981a7957148 | [
"MIT"
] | null | null | null | defmodule FindMyPersonalWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :find_my_personal
# 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,
... | 30.309091 | 97 | 0.728254 |
2d8b81cd485531b68e7de3b3242548836f860b65 | 2,924 | exs | Elixir | test/enum_transform_composite1_test.exs | ianrumford/plymio_enum | 019165e369508eadcb723579e02a86670d894bb4 | [
"MIT"
] | null | null | null | test/enum_transform_composite1_test.exs | ianrumford/plymio_enum | 019165e369508eadcb723579e02a86670d894bb4 | [
"MIT"
] | null | null | null | test/enum_transform_composite1_test.exs | ianrumford/plymio_enum | 019165e369508eadcb723579e02a86670d894bb4 | [
"MIT"
] | null | null | null | defmodule PlymioEnumTransformComposite1Test1 do
use PlymioEnumHelpersTest
test "enum_transform: composite 1" do
transform_fun = helper_assert_transform_build(
filter: fn x -> x end,
group_by: [fn {k,_v} -> k end, fn k -> k |> to_string end],
map: fn {_k, v} -> v end,
)
# apply ... | 23.206349 | 75 | 0.556088 |
2d8babd003f8c20ccafcac10d5f9804f2ff6404f | 602 | ex | Elixir | lib/nerves_network/types.ex | wasnotrice/nerves_network | e43da8c147c77ab6552015ee956579a3de6630ee | [
"Apache-2.0"
] | 1 | 2020-04-25T11:48:00.000Z | 2020-04-25T11:48:00.000Z | lib/nerves_network/types.ex | mattneel/nerves_network | 192a6f7c0cc59696ad82c95c2ac6c1e979994d21 | [
"Apache-2.0"
] | null | null | null | lib/nerves_network/types.ex | mattneel/nerves_network | 192a6f7c0cc59696ad82c95c2ac6c1e979994d21 | [
"Apache-2.0"
] | null | null | null | defmodule Nerves.Network.Types do
@moduledoc "Types for interacting with Network."
@typedoc "Ipaddress string."
@type ip_address :: String.t()
@typedoc "Interface name string."
@type ifname :: String.t()
# Please move this innto Nerves.NetworkInterface.
@typedoc "Event from Nerves.NetworkInterface"
@... | 31.684211 | 86 | 0.702658 |
2d8bf4c193e6eb4e99151296b4113352cb4d78a8 | 623 | exs | Elixir | rel/plugins/cookie.exs | wisq/ddco2 | c4e2438e5134ebcd685d67f6ab885b18a39da1b1 | [
"Apache-2.0"
] | 15 | 2017-09-18T12:02:12.000Z | 2022-02-15T00:35:00.000Z | rel/plugins/cookie.exs | wisq/ddco2 | c4e2438e5134ebcd685d67f6ab885b18a39da1b1 | [
"Apache-2.0"
] | null | null | null | rel/plugins/cookie.exs | wisq/ddco2 | c4e2438e5134ebcd685d67f6ab885b18a39da1b1 | [
"Apache-2.0"
] | 2 | 2017-09-21T20:17:49.000Z | 2020-04-12T12:21:42.000Z | # Kinda ugly, but this is the best way I can provide a
# reasonable configuration example without either exposing
# my cookies, and/or having everyone use the same ones.
defmodule Cookie do
def get(env) do
file = ".cookie.#{env}"
get_or_create(File.exists?(file), file)
end
defp get_or_create(true, file)... | 23.961538 | 58 | 0.672552 |
2d8bf88fa7ff4b8c9eb4081879de4013aabb04c7 | 687 | exs | Elixir | apps/snitch_core/priv/repo/migrations/20181214092546_add_promotions_table.exs | VeryBigThings/avia | 7ce5d5b244ae0dfddc30c09c17efe27f1718a4c9 | [
"MIT"
] | 1 | 2021-04-08T22:29:19.000Z | 2021-04-08T22:29:19.000Z | apps/snitch_core/priv/repo/migrations/20181214092546_add_promotions_table.exs | VeryBigThings/avia | 7ce5d5b244ae0dfddc30c09c17efe27f1718a4c9 | [
"MIT"
] | null | null | null | apps/snitch_core/priv/repo/migrations/20181214092546_add_promotions_table.exs | VeryBigThings/avia | 7ce5d5b244ae0dfddc30c09c17efe27f1718a4c9 | [
"MIT"
] | null | null | null | defmodule Snitch.Repo.Migrations.AddPromotionsTable do
use Ecto.Migration
def change do
create table("snitch_promotions") do
add(:code, :string)
add(:name, :string)
add(:description, :string)
add(:starts_at, :utc_datetime_usec)
add(:expires_at, :utc_datetime_usec)
add(:usage... | 28.625 | 67 | 0.671033 |
2d8c052173c1d67f03d454e10725a3ce296f734f | 280 | ex | Elixir | elixir/lib/junks/repo.ex | crappygraphix/junks | a56b5b86e1a5cbcf0a71fc44d6292d6bcd525b76 | [
"Apache-2.0"
] | 1 | 2019-04-29T17:46:44.000Z | 2019-04-29T17:46:44.000Z | elixir/lib/junks/repo.ex | crappygraphix/junks | a56b5b86e1a5cbcf0a71fc44d6292d6bcd525b76 | [
"Apache-2.0"
] | null | null | null | elixir/lib/junks/repo.ex | crappygraphix/junks | a56b5b86e1a5cbcf0a71fc44d6292d6bcd525b76 | [
"Apache-2.0"
] | null | null | null | defmodule Junks.Repo do
@moduledoc false
use Ecto.Repo, otp_app: :junks
@doc """
Dynamically loads the repository url from the
DATABASE_URL environment variable.
"""
def init(_, opts) do
{:ok, Keyword.put(opts, :url, System.get_env("DATABASE_URL"))}
end
end
| 20 | 66 | 0.692857 |
2d8c26368e2ebaac18c419f9f2fff128cb1fb7be | 580 | exs | Elixir | test/edgelixir_test.exs | nlap/edgelixir | e2fe38859b856e9906fae865a22700df2e439601 | [
"Apache-2.0"
] | 23 | 2016-09-01T19:52:38.000Z | 2017-10-22T11:40:33.000Z | test/edgelixir_test.exs | nlap/edgelixir | e2fe38859b856e9906fae865a22700df2e439601 | [
"Apache-2.0"
] | 1 | 2017-01-03T18:25:35.000Z | 2017-01-03T18:25:35.000Z | test/edgelixir_test.exs | nlap/edgelixir | e2fe38859b856e9906fae865a22700df2e439601 | [
"Apache-2.0"
] | 3 | 2016-10-01T10:31:57.000Z | 2019-02-13T04:49:01.000Z | defmodule EdgelixirTest do
use ExUnit.Case
doctest Edgelixir
test "default behavior options" do
assert {%Edgelixir.GraphSources.File{path: "a"}, %Edgelixir.GraphOutputs.Stdout{}} = Edgelixir.parse_config(graph_input: %Edgelixir.GraphSources.File{path: "a"})
end
test "custom behavior options" do
as... | 26.363636 | 165 | 0.713793 |
2d8c38cf135aa24b8462fc82da39fdc0f907d0c4 | 169 | ex | Elixir | learning/budget/lib/mix/tasks/list_transactions.ex | Mdlkxzmcp/various_elixir | c87527b7118a0c74a042073c04d2228025888ddf | [
"MIT"
] | 2 | 2020-01-20T20:15:20.000Z | 2020-02-27T11:08:42.000Z | learning/budget/lib/mix/tasks/list_transactions.ex | Mdlkxzmcp/various_elixir | c87527b7118a0c74a042073c04d2228025888ddf | [
"MIT"
] | null | null | null | learning/budget/lib/mix/tasks/list_transactions.ex | Mdlkxzmcp/various_elixir | c87527b7118a0c74a042073c04d2228025888ddf | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.ListTransactions do
use Mix.Task
@shortdoc "List transactions from CSV file"
def run(_) do
Budget.list_transactions
end
end
| 18.777778 | 47 | 0.698225 |
2d8c430396056b80650986a2fd024817ecf3eb67 | 356 | exs | Elixir | example_app/priv/repo/seeds.exs | moxley/addict | 9271c60d9a862edcefc31e8a764b3eb5a5905171 | [
"MIT"
] | 750 | 2015-01-18T23:00:36.000Z | 2021-03-24T22:11:09.000Z | example_app/priv/repo/seeds.exs | moxley/addict | 9271c60d9a862edcefc31e8a764b3eb5a5905171 | [
"MIT"
] | 130 | 2015-01-19T12:39:42.000Z | 2021-09-28T22:40:52.000Z | example_app/priv/repo/seeds.exs | moxley/addict | 9271c60d9a862edcefc31e8a764b3eb5a5905171 | [
"MIT"
] | 151 | 2015-01-19T09:24:44.000Z | 2020-09-21T13:52:46.000Z | # 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:
#
# ExampleApp.Repo.insert!(%ExampleApp.SomeModel{})
#
# We recommend using the bang functions (`insert!`, `update!`
# and so on) as they... | 29.666667 | 61 | 0.710674 |
2d8c5bf1d052eee09e0a905905f9b046e3d501d4 | 9,019 | ex | Elixir | lib/broadway_cloud_pub_sub/producer.ex | skbolton/broadway_cloud_pub_sub | 3f5d77f12727d7506c25079f3e7f8f2a6a18b675 | [
"Apache-2.0"
] | null | null | null | lib/broadway_cloud_pub_sub/producer.ex | skbolton/broadway_cloud_pub_sub | 3f5d77f12727d7506c25079f3e7f8f2a6a18b675 | [
"Apache-2.0"
] | null | null | null | lib/broadway_cloud_pub_sub/producer.ex | skbolton/broadway_cloud_pub_sub | 3f5d77f12727d7506c25079f3e7f8f2a6a18b675 | [
"Apache-2.0"
] | 1 | 2021-07-19T15:18:51.000Z | 2021-07-19T15:18:51.000Z | defmodule BroadwayCloudPubSub.Producer do
@moduledoc """
A GenStage producer that continuously receives messages from a Google Cloud Pub/Sub
topic and acknowledges them after being successfully processed.
By default this producer uses `BroadwayCloudPubSub.GoogleApiClient` to talk to Cloud
Pub/Sub, but you ca... | 37.736402 | 107 | 0.708061 |
2d8c757471b7bf46afeafcac5e25fb48c20b3d02 | 3,507 | ex | Elixir | lib/multicast_handler.ex | dbeck/chatter_ex | fa6380f67f0a2a64fa98aacf882867aad98ee467 | [
"MIT"
] | 31 | 2016-03-01T16:59:37.000Z | 2019-04-15T17:18:27.000Z | lib/multicast_handler.ex | dbeck/chatter_ex | fa6380f67f0a2a64fa98aacf882867aad98ee467 | [
"MIT"
] | null | null | null | lib/multicast_handler.ex | dbeck/chatter_ex | fa6380f67f0a2a64fa98aacf882867aad98ee467 | [
"MIT"
] | null | null | null | defmodule Chatter.MulticastHandler do
use ExActor.GenServer
require Chatter.Gossip
require Chatter.BroadcastID
require Chatter.NetID
require Logger
alias Chatter.Gossip
alias Chatter.PeerDB
alias Chatter.NetID
alias Chatter.Serializer
alias Chatter.SerializerDB
alias Chatter.BroadcastID
alias C... | 27.614173 | 94 | 0.603935 |
2d8c9e1fea9cbf70abe7567395b0513ef2f5a155 | 401 | exs | Elixir | StringsAndBinaries/2.exs | RckMrkr/Programming-Elixir | 0aa6d8e3233d4631db54e4103a206bff126cb953 | [
"MIT"
] | null | null | null | StringsAndBinaries/2.exs | RckMrkr/Programming-Elixir | 0aa6d8e3233d4631db54e4103a206bff126cb953 | [
"MIT"
] | null | null | null | StringsAndBinaries/2.exs | RckMrkr/Programming-Elixir | 0aa6d8e3233d4631db54e4103a206bff126cb953 | [
"MIT"
] | null | null | null | defmodule MyStrings do
defp sortString(word), do: word |> String.codepoints |> Enum.sort
def detectAnagram1(word1, word2), do: sortString(word1) == sortString(word2)
defp _detectAnagram2(word1, word2), do: word1 -- word2 == word2 -- word1
def detectAnagram2(word1, word2) do
_detectAnagram2(String.codepoints(wo... | 33.416667 | 77 | 0.743142 |
2d8cc9bca8d581c79cda4d194559d0862e49d112 | 177 | ex | Elixir | markdown/lib/markdown.ex | wkulikowski/homework | 4def3bb3c7479953e859b84216b0848dba9c147c | [
"Apache-2.0"
] | 69 | 2018-04-29T20:46:33.000Z | 2022-03-11T04:12:40.000Z | markdown/lib/markdown.ex | wkulikowski/homework | 4def3bb3c7479953e859b84216b0848dba9c147c | [
"Apache-2.0"
] | 5 | 2018-04-30T05:35:58.000Z | 2020-08-24T19:13:36.000Z | markdown/lib/markdown.ex | wkulikowski/homework | 4def3bb3c7479953e859b84216b0848dba9c147c | [
"Apache-2.0"
] | 18 | 2018-05-03T02:46:16.000Z | 2021-05-01T17:46:55.000Z | defmodule Markdown do
@moduledoc """
A simple Markdown parser.
"""
@doc """
Parse a string of Markdown into HTML
"""
def parse(markdown, opts \\ []) do
end
end
| 14.75 | 38 | 0.621469 |
2d8cdf609095d9c61c1aa4eae9f8c938bd097718 | 13,493 | exs | Elixir | test/myxql/protocol/values_test.exs | ludwikbukowski/myxql | 51a770a6bf32c0ea0c69307117cfd6e4738d09f6 | [
"Apache-2.0"
] | null | null | null | test/myxql/protocol/values_test.exs | ludwikbukowski/myxql | 51a770a6bf32c0ea0c69307117cfd6e4738d09f6 | [
"Apache-2.0"
] | null | null | null | test/myxql/protocol/values_test.exs | ludwikbukowski/myxql | 51a770a6bf32c0ea0c69307117cfd6e4738d09f6 | [
"Apache-2.0"
] | null | null | null | defmodule MyXQL.Protocol.ValueTest do
use ExUnit.Case, async: true
use Bitwise
@default_sql_mode "STRICT_TRANS_TABLES"
unless macro_exported?(Kernel, :sigil_U, 2) do
defmacrop sigil_U({:<<>>, _, [string]}, _) do
Macro.escape(DateTime.from_naive!(NaiveDateTime.from_iso8601!(string), "Etc/UTC"))
e... | 31.748235 | 104 | 0.601942 |
2d8ce41d8e5132a43752c8a299ba0f50c48f3956 | 2,353 | exs | Elixir | elixir/test/homework/merchants_test.exs | Koyamot/Divvy-EngineerExercise | de2f2c0d1ad461b2bbb937fa1483c18d4ececc6a | [
"MIT"
] | 1 | 2021-01-24T06:15:39.000Z | 2021-01-24T06:15:39.000Z | elixir/test/homework/merchants_test.exs | Koyamot/Divvy-EngineerExercise | de2f2c0d1ad461b2bbb937fa1483c18d4ececc6a | [
"MIT"
] | 8 | 2022-01-17T20:50:29.000Z | 2022-01-17T20:54:41.000Z | elixir/test/homework/merchants_test.exs | Koyamot/Divvy-EngineerExercise | de2f2c0d1ad461b2bbb937fa1483c18d4ececc6a | [
"MIT"
] | 2 | 2021-03-16T22:27:37.000Z | 2021-10-16T08:38:35.000Z | defmodule Homework.MerchantsTest do
use Homework.DataCase
alias Homework.Merchants
describe "merchants" do
alias Homework.Merchants.Merchant
@valid_attrs %{description: "some description", name: "some name"}
@update_attrs %{
description: "some updated description",
name: "some updated n... | 33.614286 | 95 | 0.691883 |
2d8d045e92592e3cfe6354b2881b2ca505de2e3d | 1,036 | exs | Elixir | mix.exs | philosodad/near_earth | fe8de1a41d4672454d2e709ea9d911c352d18d8e | [
"MIT"
] | 1 | 2016-11-24T08:53:51.000Z | 2016-11-24T08:53:51.000Z | mix.exs | philosodad/near_earth | fe8de1a41d4672454d2e709ea9d911c352d18d8e | [
"MIT"
] | null | null | null | mix.exs | philosodad/near_earth | fe8de1a41d4672454d2e709ea9d911c352d18d8e | [
"MIT"
] | null | null | null | defmodule NearEarth.Mixfile do
use Mix.Project
def project do
[app: :near_earth,
version: "0.0.1",
elixir: "~> 1.4",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
elixirc_paths: elixirc_paths(Mix.env),
deps: deps()]
end
# Configuration for the OTP appli... | 21.583333 | 77 | 0.573359 |
2d8d0865e6f36ef64cb95e237382c81305d111f6 | 5,001 | ex | Elixir | apps/omg_watcher/test/support/exit_processor/case.ex | omisego/elixir-omg | 2c68973d8f29033d137f63a6e060f12e2a7dcd59 | [
"Apache-2.0"
] | 177 | 2018-08-24T03:51:02.000Z | 2020-05-30T13:29:25.000Z | apps/omg_watcher/test/support/exit_processor/case.ex | omisego/elixir-omg | 2c68973d8f29033d137f63a6e060f12e2a7dcd59 | [
"Apache-2.0"
] | 1,042 | 2018-08-25T00:52:39.000Z | 2020-06-01T05:15:17.000Z | apps/omg_watcher/test/support/exit_processor/case.ex | omisego/elixir-omg | 2c68973d8f29033d137f63a6e060f12e2a7dcd59 | [
"Apache-2.0"
] | 47 | 2018-08-24T12:06:33.000Z | 2020-04-28T11:49:25.000Z | # Copyright 2019-2020 OMG Network 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... | 34.020408 | 117 | 0.677864 |
2d8d1885c11d173f6290ac0d95086782a4891863 | 4,526 | ex | Elixir | lib/blockchain_api/query/account.ex | pakorn186c/blockchain-api | 3c9fbc892e645f9bb144414f3da36749603f37bc | [
"Apache-2.0"
] | 17 | 2019-11-03T03:02:41.000Z | 2022-01-13T17:03:32.000Z | lib/blockchain_api/query/account.ex | AddressXception/blockchain-api | eea98fa78af2887cc84762f84532c602c3b8b666 | [
"Apache-2.0"
] | 5 | 2019-11-07T23:26:53.000Z | 2020-11-24T21:45:35.000Z | lib/blockchain_api/query/account.ex | AddressXception/blockchain-api | eea98fa78af2887cc84762f84532c602c3b8b666 | [
"Apache-2.0"
] | 11 | 2019-12-04T07:03:16.000Z | 2022-01-13T17:03:50.000Z | defmodule BlockchainAPI.Query.Account do
@moduledoc false
import Ecto.Query, warn: false
alias BlockchainAPI.{
Repo,
Util,
Schema.Account,
Schema.PendingPayment,
Schema.PendingGateway,
Schema.PendingLocation
}
def create(attrs \\ %{}) do
%Account{}
|> Account.changeset(attrs)... | 24.333333 | 79 | 0.602077 |
2d8d2b82194487bc05afbbb7b2eda13ea6b3b939 | 144 | exs | Elixir | parser_sdk/test/parser_sdk_test.exs | flixbi/element-parsers | b92ef1cff139130acbac4f40d0d48568a3de6590 | [
"MIT"
] | 1 | 2021-11-10T18:06:59.000Z | 2021-11-10T18:06:59.000Z | parser_sdk/test/parser_sdk_test.exs | SeppPenner/element-parsers | 8a2594e0f15ca7177f6782d0441f25e3e55b8416 | [
"MIT"
] | null | null | null | parser_sdk/test/parser_sdk_test.exs | SeppPenner/element-parsers | 8a2594e0f15ca7177f6782d0441f25e3e55b8416 | [
"MIT"
] | null | null | null | defmodule ParserSdkTest do
use ExUnit.Case
doctest ParserSdk
test "greets the world" do
assert ParserSdk.hello() == :world
end
end
| 16 | 38 | 0.722222 |
2d8d415f416205fbac523adf98e69fd8a4340a42 | 2,459 | ex | Elixir | clients/android_publisher/lib/google_api/android_publisher/v3/model/subscription_price_change.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/android_publisher/lib/google_api/android_publisher/v3/model/subscription_price_change.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/android_publisher/lib/google_api/android_publisher/v3/model/subscription_price_change.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... | 49.18 | 544 | 0.758438 |
2d8d477521ca1386207e49680801c283cac163fd | 5,745 | ex | Elixir | lib/plug_attack.ex | Fudoshiki/plug_attack | b3af6c1cd477872c5886d97c699a37fb7e638c63 | [
"Apache-2.0"
] | 323 | 2016-11-13T01:06:52.000Z | 2022-03-11T13:04:11.000Z | lib/plug_attack.ex | Fudoshiki/plug_attack | b3af6c1cd477872c5886d97c699a37fb7e638c63 | [
"Apache-2.0"
] | 21 | 2016-11-16T22:12:13.000Z | 2021-11-26T11:14:53.000Z | lib/plug_attack.ex | michalmuskala/plug_attack | b3af6c1cd477872c5886d97c699a37fb7e638c63 | [
"Apache-2.0"
] | 22 | 2016-11-13T15:34:41.000Z | 2022-03-29T10:14:17.000Z | defmodule PlugAttack do
@moduledoc ~S"""
A plug building toolkit for blocking and throttling abusive requests.
PlugAttack is a set of macros that can be used to build a plug to protect
your web app from bad clients. It allows safelisting, blocklisting and
throttling based on arbitrary properties of the reque... | 28.725 | 81 | 0.631506 |
2d8d75d3d1c9bc7dcbfa432d5ac9c013cbbb6a5a | 134 | ex | Elixir | test/support/function_try.ex | olafura/beam_to_ex_ast | 5451d189105c3a4b52aedbf4fbc4f0beca3b9b80 | [
"Apache-2.0"
] | 16 | 2016-02-12T15:15:58.000Z | 2021-08-24T21:48:34.000Z | test/support/function_try.ex | olafura/beam_to_ex_ast | 5451d189105c3a4b52aedbf4fbc4f0beca3b9b80 | [
"Apache-2.0"
] | 1 | 2016-02-17T04:58:38.000Z | 2016-02-17T04:58:38.000Z | test/support/function_try.ex | olafura/beam_to_ex_ast | 5451d189105c3a4b52aedbf4fbc4f0beca3b9b80 | [
"Apache-2.0"
] | 2 | 2016-02-17T03:21:23.000Z | 2016-03-08T09:23:27.000Z | defmodule TestFunctionTry do
def hello() do
try do
raise "oops"
rescue
e in RuntimeError -> e
end
end
end
| 13.4 | 28 | 0.604478 |
2d8d8e986bfaf6e2a9d1fd3b2bb58ecdb7f009a4 | 418 | ex | Elixir | lib/miotwo_web/views/error_view.ex | jakswa/miotwo | b8455c0e019c952891f108dc5cd5ad134c57cbfc | [
"MIT"
] | 2 | 2018-08-24T18:09:34.000Z | 2020-07-20T01:42:37.000Z | lib/miotwo_web/views/error_view.ex | jakswa/miotwo | b8455c0e019c952891f108dc5cd5ad134c57cbfc | [
"MIT"
] | null | null | null | lib/miotwo_web/views/error_view.ex | jakswa/miotwo | b8455c0e019c952891f108dc5cd5ad134c57cbfc | [
"MIT"
] | 1 | 2018-05-16T22:57:57.000Z | 2018-05-16T22:57:57.000Z | defmodule MiotwoWeb.ErrorView do
use MiotwoWeb, :view
def render("404.json", _assigns) do
%{errors: %{detail: "Page not found"}}
end
def render("500.json", _assigns) do
%{errors: %{detail: "Internal server error"}}
end
# In case no render clause matches or no
# template is found, let's render i... | 23.222222 | 49 | 0.684211 |
2d8d984fecc3c68bd9cffc97faaeee02b16573c1 | 1,029 | ex | Elixir | lib/lint/rules/trailing_exclamation.ex | paulelliott/accent | fabd0d2768088adf780317c6e44fcabcccadba11 | [
"BSD-3-Clause"
] | null | null | null | lib/lint/rules/trailing_exclamation.ex | paulelliott/accent | fabd0d2768088adf780317c6e44fcabcccadba11 | [
"BSD-3-Clause"
] | null | null | null | lib/lint/rules/trailing_exclamation.ex | paulelliott/accent | fabd0d2768088adf780317c6e44fcabcccadba11 | [
"BSD-3-Clause"
] | null | null | null | defmodule Accent.Lint.Rules.TrailingExclamation do
@moduledoc """
Checks that exclamations are replicated between both source and translation.
"""
@behaviour Accent.Lint.Rule
@regex ~r/.+!$/
alias Accent.Lint.Message
def lint(value = %{entry: %{is_master: true}}, _), do: value
def lint(value, _) do... | 27.810811 | 79 | 0.658892 |
2d8de5bc22ac49a26973cd1bdab2cfd574d545f5 | 368 | ex | Elixir | lib/elixero/core_api/models/online_invoices/online_invoice.ex | philals/elixero | fd75fe4a6f0a93b1d2ff94adbb307d20f014d458 | [
"MIT"
] | 84 | 2016-11-09T01:15:17.000Z | 2022-01-06T02:55:35.000Z | lib/elixero/core_api/models/online_invoices/online_invoice.ex | philals/elixero | fd75fe4a6f0a93b1d2ff94adbb307d20f014d458 | [
"MIT"
] | 14 | 2017-03-10T04:16:07.000Z | 2021-11-10T16:39:19.000Z | lib/elixero/core_api/models/online_invoices/online_invoice.ex | philals/elixero | fd75fe4a6f0a93b1d2ff94adbb307d20f014d458 | [
"MIT"
] | 18 | 2017-03-11T21:12:15.000Z | 2022-02-22T20:07:10.000Z | defmodule EliXero.CoreApi.Models.OnlineInvoices.OnlineInvoice do
use Ecto.Schema
import Ecto.Changeset
@derive {Poison.Encoder, except: [:__meta__, :id]}
schema "onlineinvoices" do
field :OnlineInvoiceUrl, :string
end
def changeset(struct, data) do
struct
... | 24.533333 | 65 | 0.644022 |
2d8decb72dbc4b338cdd47748cc22157261c41bb | 1,153 | ex | Elixir | lib/base16.ex | diodechain/diode_server | 1692788bd92cc17654965878abd059d13b5e236c | [
"Apache-2.0"
] | 8 | 2021-03-12T15:35:09.000Z | 2022-03-06T06:37:49.000Z | lib/base16.ex | diodechain/diode_server_ex | 5cf47e5253a0caafd335d0af4dba711d4dcad42d | [
"Apache-2.0"
] | 15 | 2019-09-06T07:58:01.000Z | 2021-03-06T17:04:46.000Z | lib/base16.ex | diodechain/diode_server | 1692788bd92cc17654965878abd059d13b5e236c | [
"Apache-2.0"
] | 5 | 2021-10-01T12:52:28.000Z | 2022-02-02T19:29:56.000Z | # Diode Server
# Copyright 2021 Diode
# Licensed under the Diode License, Version 1.1
defmodule Base16 do
@spec encode(binary() | non_neg_integer(), any()) :: <<_::16, _::_*8>>
def encode(int, bigX \\ true)
def encode(int, true) when is_integer(int) do
"0X#{Base.encode16(:binary.encode_unsigned(int), case: :... | 22.607843 | 72 | 0.624458 |
2d8e2c551d8c623a8bc05330c4f5596006f34bc8 | 8,882 | exs | Elixir | test/adapters/mongodb_test.exs | securingsincity/molasses | a9758184c026fa69038a204c113934506929e9e7 | [
"MIT"
] | 76 | 2016-12-06T17:56:26.000Z | 2022-01-11T21:17:56.000Z | test/adapters/mongodb_test.exs | securingsincity/molasses | a9758184c026fa69038a204c113934506929e9e7 | [
"MIT"
] | 13 | 2017-01-05T10:22:51.000Z | 2017-02-05T03:05:25.000Z | test/adapters/mongodb_test.exs | securingsincity/molasses | a9758184c026fa69038a204c113934506929e9e7 | [
"MIT"
] | 4 | 2017-01-05T10:10:17.000Z | 2021-05-31T05:22:11.000Z | defmodule Molasses.StorageAdapter.MongoTest do
use ExUnit.Case
alias Molasses.StorageAdapter.MongoDB
setup do
Application.put_env(:molasses,:adapter, "mongo")
Application.put_env(:molasses,:host, "127.0.0.1")
Application.put_env(:molasses,:port, 27017)
Application.put_env(:molasses,:password, "")
... | 35.106719 | 115 | 0.64186 |
2d8e44ff1ef0c844b0cfa01b6c56b7b91cbdea05 | 1,898 | exs | Elixir | test/auto_api/states/multi_command_state_test.exs | highmobility/hm-auto-api-elixir | 026c3f50871c56877a4acd5f39a8887118a87bb5 | [
"MIT"
] | 4 | 2018-01-19T16:11:10.000Z | 2019-12-13T16:35:10.000Z | test/auto_api/states/multi_command_state_test.exs | highmobility/auto-api-elixir | 026c3f50871c56877a4acd5f39a8887118a87bb5 | [
"MIT"
] | 5 | 2020-07-16T07:20:21.000Z | 2021-09-22T10:18:04.000Z | test/auto_api/states/multi_command_state_test.exs | highmobility/hm-auto-api-elixir | 026c3f50871c56877a4acd5f39a8887118a87bb5 | [
"MIT"
] | 1 | 2021-02-17T18:36:13.000Z | 2021-02-17T18:36:13.000Z | # AutoAPI
# The MIT License
#
# Copyright (c) 2018- High-Mobility GmbH (https://high-mobility.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without lim... | 41.26087 | 86 | 0.760274 |
2d8e46173cf02b8a1e15bdcd41645cccd7cc338e | 195 | ex | Elixir | test/support/test_acknowledger.ex | bbalser/etl | 24791047ca0ce8066ec73c4196e54e954b1a1471 | [
"Apache-2.0"
] | 1 | 2020-06-15T22:41:37.000Z | 2020-06-15T22:41:37.000Z | test/support/test_acknowledger.ex | inhindsight/etl | 24791047ca0ce8066ec73c4196e54e954b1a1471 | [
"Apache-2.0"
] | 1 | 2020-09-11T12:24:12.000Z | 2020-09-12T11:14:27.000Z | test/support/test_acknowledger.ex | bbalser/etl | 24791047ca0ce8066ec73c4196e54e954b1a1471 | [
"Apache-2.0"
] | null | null | null | defmodule Etl.TestAcknowledger do
@behaviour Etl.Acknowledger
def ack(ref_pid, success, fail) do
send(ref_pid, {:ack, %{success: length(success), fail: length(fail)}})
:ok
end
end
| 21.666667 | 74 | 0.697436 |
2d8e59a86efbd82b53182d9eaad798745c412a4d | 1,911 | ex | Elixir | lib/riverside/local_delivery.ex | LukasDoesDev/riverside | c2866be6c152e38cc142becf3e9c8c042c80ed57 | [
"MIT"
] | 63 | 2018-05-02T16:47:44.000Z | 2022-03-07T09:48:58.000Z | lib/riverside/local_delivery.ex | LukasDoesDev/riverside | c2866be6c152e38cc142becf3e9c8c042c80ed57 | [
"MIT"
] | 20 | 2017-09-24T00:42:12.000Z | 2021-12-11T12:00:13.000Z | lib/riverside/local_delivery.ex | LukasDoesDev/riverside | c2866be6c152e38cc142becf3e9c8c042c80ed57 | [
"MIT"
] | 9 | 2019-02-18T10:09:30.000Z | 2021-12-09T21:11:02.000Z | defmodule Riverside.LocalDelivery do
alias Riverside.Codec
alias Riverside.Session
defmodule Topic do
def channel(channel_id) do
"__channel__:#{channel_id}"
end
def user(user_id) do
"__user__:#{user_id}"
end
def session(user_id, session_id) do
"__session__:#{user_id}/#{ses... | 23.8875 | 72 | 0.672423 |
2d8e5d1f1acdc9b62bdd6906da31591d42367fa8 | 2,956 | ex | Elixir | clients/health_care/lib/google_api/health_care/v1/model/http_body.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/health_care/lib/google_api/health_care/v1/model/http_body.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/health_care/lib/google_api/health_care/v1/model/http_body.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... | 55.773585 | 1,171 | 0.743572 |
2d8e9067a0e1313e1b74e7157aae330532721506 | 460 | exs | Elixir | section_7/ListAndRecursion-4.exs | blueberrystream/elixir-playground | a42ab868eca312daf7b2775d36f76d36d1cfa135 | [
"MIT"
] | null | null | null | section_7/ListAndRecursion-4.exs | blueberrystream/elixir-playground | a42ab868eca312daf7b2775d36f76d36d1cfa135 | [
"MIT"
] | null | null | null | section_7/ListAndRecursion-4.exs | blueberrystream/elixir-playground | a42ab868eca312daf7b2775d36f76d36d1cfa135 | [
"MIT"
] | null | null | null | defmodule MyList do
def span(from, to), do: _span(from, to, [])
defp _span(from, to, list) when from == to, do: list ++ [to]
defp _span(from, to, list) when from < to, do: list ++ [from] ++ _span(from + 1, to, list)
defp _span(from, to, list) when from > to, do: list ++ [from] ++ _span(from - 1, to, list)
end
... | 28.75 | 92 | 0.558696 |
2d8e9adae5a7e1dd025897a0c08cf67291754581 | 1,672 | exs | Elixir | test/day7_test.exs | ntwyman/aoc_2019 | 444dfd58ce9272d79a511785d24d5ba8443a2dfa | [
"MIT"
] | null | null | null | test/day7_test.exs | ntwyman/aoc_2019 | 444dfd58ce9272d79a511785d24d5ba8443a2dfa | [
"MIT"
] | null | null | null | test/day7_test.exs | ntwyman/aoc_2019 | 444dfd58ce9272d79a511785d24d5ba8443a2dfa | [
"MIT"
] | null | null | null | defmodule Day7Test do
use ExUnit.Case
doctest Day7
@example_1 [3, 15, 3, 16, 1002, 16, 10, 16, 1, 16, 15, 15, 4, 15, 99, 0, 0]
@example_2 [
3,
23,
3,
24,
1002,
24,
10,
24,
1002,
23,
-1,
23,
101,
5,
23,
23,
1,
24,
23,
23,
4,
... | 12.385185 | 84 | 0.413876 |
2d8e9b6c659f7fd574dfa2f6a8d287e98b164b40 | 514 | ex | Elixir | lib/farmbot/asset/device.ex | pdgonzalez872/farmbot_os | a444248f05ee8f4fe57f6a4865b942131960f76c | [
"MIT"
] | 2 | 2018-08-01T23:07:52.000Z | 2018-10-17T12:49:21.000Z | lib/farmbot/asset/device.ex | pdgonzalez872/farmbot_os | a444248f05ee8f4fe57f6a4865b942131960f76c | [
"MIT"
] | null | null | null | lib/farmbot/asset/device.ex | pdgonzalez872/farmbot_os | a444248f05ee8f4fe57f6a4865b942131960f76c | [
"MIT"
] | 1 | 2017-07-22T21:51:14.000Z | 2017-07-22T21:51:14.000Z | defmodule Farmbot.Asset.Device do
@moduledoc """
The current device. Should only ever be _one_ of these. If not there is a huge
problem probably higher up the stack.
"""
use Ecto.Schema
import Ecto.Changeset
schema "devices" do
field(:name, :string)
field(:timezone, :string)
end
@required_f... | 21.416667 | 80 | 0.678988 |
2d8ea495d7cc2b40bd681ec0ee11ce2af972826a | 2,949 | ex | Elixir | apps/tai/lib/tai/venue_adapters/huobi/product.ex | ccamateur/tai | 41c4b3e09dafc77987fa3f6b300c15461d981e16 | [
"MIT"
] | 276 | 2018-01-16T06:36:06.000Z | 2021-03-20T21:48:01.000Z | apps/tai/lib/tai/venue_adapters/huobi/product.ex | ccamateur/tai | 41c4b3e09dafc77987fa3f6b300c15461d981e16 | [
"MIT"
] | 78 | 2020-10-12T06:21:43.000Z | 2022-03-28T09:02:00.000Z | apps/tai/lib/tai/venue_adapters/huobi/product.ex | yurikoval/tai | 94254b45d22fa0307b01577ff7c629c7280c0295 | [
"MIT"
] | 43 | 2018-06-09T09:54:51.000Z | 2021-03-07T07:35:17.000Z | defmodule Tai.VenueAdapters.Huobi.Product do
alias ExHuobi.Futures
@date_format "{YYYY}{0M}{0D}"
@date_time_format "#{@date_format} {h24}:{m}"
@settlement_time "16:00"
@zone "Etc/UTC"
def build(%Futures.Contract{} = contract, venue_id) do
listing = contract.create_date |> Timex.parse!(@date_format) |>... | 30.402062 | 95 | 0.664293 |
2d8eb9da4416b8d04ed425539f91ee147447f79a | 118 | exs | Elixir | nashelixir+elixir/apps/cqrs_bank/test/cqrs_bank_test.exs | NashFP/cqrs-bank | 6071db4a0c5ec681554aea8bebe783310c5d1525 | [
"MIT"
] | 7 | 2017-05-17T00:36:50.000Z | 2021-11-02T03:02:03.000Z | nashelixir+elixir/apps/cqrs_bank/test/cqrs_bank_test.exs | NashFP/cqrs-bank | 6071db4a0c5ec681554aea8bebe783310c5d1525 | [
"MIT"
] | 3 | 2017-05-17T00:31:28.000Z | 2017-05-18T04:50:37.000Z | nashelixir+elixir/apps/cqrs_bank/test/cqrs_bank_test.exs | NashFP/cqrs-bank | 6071db4a0c5ec681554aea8bebe783310c5d1525 | [
"MIT"
] | 5 | 2017-05-16T23:13:19.000Z | 2021-12-02T06:45:25.000Z | defmodule CqrsBankTest do
use ExUnit.Case
doctest CqrsBank
test "the truth" do
assert 1 + 1 == 2
end
end
| 13.111111 | 25 | 0.677966 |
2d8ec9061e646f1c845dd20e21df324fa971d74d | 4,797 | exs | Elixir | farmbot_os/mix.exs | kant/farmbot_os | f497cc1fde3960dc5507e4da89e85411a8f776f3 | [
"MIT"
] | null | null | null | farmbot_os/mix.exs | kant/farmbot_os | f497cc1fde3960dc5507e4da89e85411a8f776f3 | [
"MIT"
] | null | null | null | farmbot_os/mix.exs | kant/farmbot_os | f497cc1fde3960dc5507e4da89e85411a8f776f3 | [
"MIT"
] | null | null | null | defmodule FarmbotOS.MixProject do
use Mix.Project
@all_targets [:rpi3, :rpi]
@version Path.join([__DIR__, "..", "VERSION"])
|> File.read!()
|> String.trim()
@branch System.cmd("git", ~w"rev-parse --abbrev-ref HEAD")
|> elem(0)
|> String.trim()
@commit System.cmd("git... | 31.98 | 80 | 0.57932 |
2d8f16ddbcbc3c6c6d8b4e15163f623f5defff61 | 101,880 | ex | Elixir | lib/aws/generated/waf.ex | smanolloff/aws-elixir | c7cb6577802f5010be7e7b6ccb2c0f3c8c73ea84 | [
"Apache-2.0"
] | null | null | null | lib/aws/generated/waf.ex | smanolloff/aws-elixir | c7cb6577802f5010be7e7b6ccb2c0f3c8c73ea84 | [
"Apache-2.0"
] | null | null | null | lib/aws/generated/waf.ex | smanolloff/aws-elixir | c7cb6577802f5010be7e7b6ccb2c0f3c8c73ea84 | [
"Apache-2.0"
] | null | null | null | # WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
# See https://github.com/aws-beam/aws-codegen for more details.
defmodule AWS.WAF do
@moduledoc """
This is **AWS WAF Classic** documentation.
For more information, see [AWS WAF Classic](https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html)
... | 42.45 | 149 | 0.736671 |
2d8f1d92f5033fbff8dbf78eaf29d379f73a546e | 2,345 | ex | Elixir | demo/mightyeagle.ex | xecronix/MightyEagle | 3f93838a3a4cd89d5d35d28b548307cc3a913c05 | [
"Unlicense"
] | null | null | null | demo/mightyeagle.ex | xecronix/MightyEagle | 3f93838a3a4cd89d5d35d28b548307cc3a913c05 | [
"Unlicense"
] | null | null | null | demo/mightyeagle.ex | xecronix/MightyEagle | 3f93838a3a4cd89d5d35d28b548307cc3a913c05 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env eui
include mightyeagle/mightyeagle.e
include std/filesys.e
include std/map.e
include fakedb.e
with trace
-- We'll use this callback when in the orders context
function order_cb(mighty_eagle_t me, sequence tag, sequence template, map:map context)
sequence retval = ""
sequence record = {}
sequence n... | 23.686869 | 89 | 0.657996 |
2d8f1ef4bac21eeca04d49f5bfe589b818effc0c | 1,579 | exs | Elixir | test/test_helper.exs | Mathison-Inc/cabbage | c8b623e32b944b0f71ce357078abc00a2f29eb90 | [
"MIT"
] | null | null | null | test/test_helper.exs | Mathison-Inc/cabbage | c8b623e32b944b0f71ce357078abc00a2f29eb90 | [
"MIT"
] | 1 | 2021-07-26T23:32:53.000Z | 2021-07-26T23:32:53.000Z | test/test_helper.exs | Mathison-Inc/pickle | c8b623e32b944b0f71ce357078abc00a2f29eb90 | [
"MIT"
] | null | null | null | Logger.configure_backend(:console, colors: [enabled: false])
ExUnit.start(trace: "--trace" in System.argv())
# Beam files compiled on demand
path = Path.expand("../tmp/beams", __DIR__)
File.rm_rf!(path)
File.mkdir_p!(path)
Code.prepend_path(path)
defmodule PickleTestHelper do
import ExUnit.CaptureIO
def run(filt... | 28.196429 | 116 | 0.685244 |
2d8f373eb59d23905be74a7cb52c4e5dded5bcf8 | 214 | ex | Elixir | src/auth_service/lib/auth_service_web/controllers/health_controller.ex | wbpascal/statuswebsite | 7a81e530a9176c53abeab0582cb710113101b716 | [
"MIT"
] | 1 | 2021-04-18T20:21:03.000Z | 2021-04-18T20:21:03.000Z | src/auth_service/lib/auth_service_web/controllers/health_controller.ex | wbpascal/statuswebsite | 7a81e530a9176c53abeab0582cb710113101b716 | [
"MIT"
] | null | null | null | src/auth_service/lib/auth_service_web/controllers/health_controller.ex | wbpascal/statuswebsite | 7a81e530a9176c53abeab0582cb710113101b716 | [
"MIT"
] | 1 | 2021-04-18T20:21:08.000Z | 2021-04-18T20:21:08.000Z | defmodule AuthServiceWeb.HealthController do
use AuthServiceWeb, :controller
require Logger
def alive(conn, _params) do
Logger.debug("Received alive request")
conn |> send_resp(200, "OK")
end
end
| 19.454545 | 44 | 0.733645 |
2d8f3a382cbbfa6fc265e84c78a8597a1b3155d9 | 71 | ex | Elixir | web/views/page_view.ex | dmitrinesterenko/sample_phoenix_ecs | d6b94f35680163302e372cf30c70d3e409b0c9b1 | [
"MIT"
] | null | null | null | web/views/page_view.ex | dmitrinesterenko/sample_phoenix_ecs | d6b94f35680163302e372cf30c70d3e409b0c9b1 | [
"MIT"
] | null | null | null | web/views/page_view.ex | dmitrinesterenko/sample_phoenix_ecs | d6b94f35680163302e372cf30c70d3e409b0c9b1 | [
"MIT"
] | null | null | null | defmodule SamplePhoenix.PageView do
use SamplePhoenix.Web, :view
end
| 17.75 | 35 | 0.816901 |
2d8f3e0b9490b1c5eb6f956881a9034883164e80 | 1,917 | exs | Elixir | mix.exs | hawjefferson/ueberauth_example-master | d5e2930a72e2035223be30592cede3e499e87845 | [
"Apache-2.0"
] | null | null | null | mix.exs | hawjefferson/ueberauth_example-master | d5e2930a72e2035223be30592cede3e499e87845 | [
"Apache-2.0"
] | null | null | null | mix.exs | hawjefferson/ueberauth_example-master | d5e2930a72e2035223be30592cede3e499e87845 | [
"Apache-2.0"
] | null | null | null | defmodule UeberauthExample.MixProject do
use Mix.Project
def project do
[
app: :ueberauth_example,
version: "0.0.1",
elixir: "~> 1.11",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix] ++ Mix.compilers(),
start_permanent: Mix.env() == :prod,
aliases: alia... | 27.782609 | 84 | 0.577465 |
2d8f481af1742b7ca081aa04f7e712c0f7d454da | 1,805 | exs | Elixir | test/integration/inserting_test.exs | superhawk610/oban | 9e87ca0e45451efee05db1d430739d348c67acdb | [
"Apache-2.0"
] | null | null | null | test/integration/inserting_test.exs | superhawk610/oban | 9e87ca0e45451efee05db1d430739d348c67acdb | [
"Apache-2.0"
] | null | null | null | test/integration/inserting_test.exs | superhawk610/oban | 9e87ca0e45451efee05db1d430739d348c67acdb | [
"Apache-2.0"
] | null | null | null | defmodule Oban.Integration.InsertingTest do
use Oban.Case, async: true
alias Ecto.Multi
test "inserting multiple jobs within a multi using insert/3" do
start_supervised_oban!(queues: false)
assert {:ok, results} =
Multi.new()
|> Oban.insert(:job_1, Worker.new(%{ref: 1}))
... | 25.785714 | 77 | 0.596676 |
2d8f77311898dea14e34b5b85671dee4ebba9e53 | 219 | ex | Elixir | web/GET.ex | bbassett/encodebot | a2f60b4a032b1573e7d905a4910d3c09fdc07dc0 | [
"MIT"
] | null | null | null | web/GET.ex | bbassett/encodebot | a2f60b4a032b1573e7d905a4910d3c09fdc07dc0 | [
"MIT"
] | null | null | null | web/GET.ex | bbassett/encodebot | a2f60b4a032b1573e7d905a4910d3c09fdc07dc0 | [
"MIT"
] | null | null | null | defmodule Encodebot.Resource.GET do
use Mazurka.Resource
mediatype Hyper do
action do
%{
"encode" => link_to("POST /encode"),
"decode" => link_to("POST /decode")
}
end
end
end
| 16.846154 | 44 | 0.584475 |
2d8fada875a86e9a7df4252d785c947b75fb8ce7 | 812 | ex | Elixir | lib/cgrates_web_jsonapi_web/controllers/tp_bulk_insert_controller.ex | max-konin/cgrates_web_jsonapi | e82690e343d790b0f77dea6699483fcb6fd8a162 | [
"MIT"
] | 2 | 2018-10-03T07:41:32.000Z | 2021-03-21T11:27:27.000Z | lib/cgrates_web_jsonapi_web/controllers/tp_bulk_insert_controller.ex | max-konin/cgrates_web_jsonapi | e82690e343d790b0f77dea6699483fcb6fd8a162 | [
"MIT"
] | 1 | 2018-10-31T04:55:59.000Z | 2018-10-31T04:55:59.000Z | lib/cgrates_web_jsonapi_web/controllers/tp_bulk_insert_controller.ex | max-konin/cgrates_web_jsonapi | e82690e343d790b0f77dea6699483fcb6fd8a162 | [
"MIT"
] | 5 | 2018-09-27T11:30:44.000Z | 2021-01-16T08:28:58.000Z | defmodule CgratesWebJsonapiWeb.TpBulkInsertController do
use CgratesWebJsonapiWeb, :controller
alias CgratesWebJsonapi.Repo
def create(conn, params = %{"type" => type, "data" => data}) do
model_name = type |> String.replace("-", "_") |> Macro.camelize()
model = String.to_atom("Elixir.CgratesWebJsonapi.Ta... | 32.48 | 87 | 0.657635 |
2d9005b83b0a8ea84e906238d2b789dc286a3bde | 500 | ex | Elixir | lib/schemas/event.ex | Yamilquery/kaufmann_ex | 5158ae8f524f8780647766ff35db88ebd761da29 | [
"MIT"
] | null | null | null | lib/schemas/event.ex | Yamilquery/kaufmann_ex | 5158ae8f524f8780647766ff35db88ebd761da29 | [
"MIT"
] | null | null | null | lib/schemas/event.ex | Yamilquery/kaufmann_ex | 5158ae8f524f8780647766ff35db88ebd761da29 | [
"MIT"
] | null | null | null | defmodule KaufmannEx.Schemas.Event do
@type t :: %KaufmannEx.Schemas.Event{
name: atom,
meta: map,
payload: term
}
@moduledoc false
defstruct [:name, :meta, :payload]
end
defmodule KaufmannEx.Schemas.ErrorEvent do
@type t :: %KaufmannEx.Schemas.ErrorEvent{
name: ... | 22.727273 | 56 | 0.596 |
2d901884c631b796af6bd0adce7e80ff40d26cc2 | 1,916 | ex | Elixir | examples/simple_router/lib/simple_router/mac_address.ex | shun159/tres | 1e3e7f78ba1aa4f184d4be70300e5f4703d50a2f | [
"Beerware"
] | 5 | 2019-05-25T02:25:13.000Z | 2020-10-06T17:00:03.000Z | examples/simple_router/lib/simple_router/mac_address.ex | shun159/tres | 1e3e7f78ba1aa4f184d4be70300e5f4703d50a2f | [
"Beerware"
] | 5 | 2018-03-29T14:42:10.000Z | 2019-11-19T07:03:09.000Z | examples/simple_router/lib/simple_router/mac_address.ex | shun159/tres | 1e3e7f78ba1aa4f184d4be70300e5f4703d50a2f | [
"Beerware"
] | 1 | 2019-03-30T20:48:27.000Z | 2019-03-30T20:48:27.000Z | defmodule SimpleRouter.MacAddress do
@moduledoc """
MAC Address Utils
"""
use Bitwise
@mac_addr_pattern ~r/^(?:[0-9a-fA-F][0-9a-fA-F]){6}$/
@spec bin_to_str(<<_::48>>) :: String.t()
def bin_to_str(<<_::6-bytes>> = mac) do
mac
|> :erlang.binary_to_list()
|> Enum.reduce("", &to_hex/2)
|> ... | 21.772727 | 95 | 0.591336 |
2d905ce153a65f5fdd23d481ad51511996c1e4bc | 3,743 | exs | Elixir | test/controllers/room_controller_test.exs | ultimatemonty/peepchat-api | c6359319d0380c71541e0813131866020555a471 | [
"MIT"
] | 1 | 2020-12-23T18:28:54.000Z | 2020-12-23T18:28:54.000Z | test/controllers/room_controller_test.exs | AbdullahDahmash/peep-stack-api-tutorial | 3e6d98be33fbee0ae79022e6a74940e0ea70cc96 | [
"MIT"
] | null | null | null | test/controllers/room_controller_test.exs | AbdullahDahmash/peep-stack-api-tutorial | 3e6d98be33fbee0ae79022e6a74940e0ea70cc96 | [
"MIT"
] | null | null | null | defmodule Peepchat.RoomControllerTest do
use Peepchat.ConnCase
alias Peepchat.Room
@valid_attrs %{name: "some content"}
@invalid_attrs %{}
defp create_test_rooms(user) do
# Create three rooms owned by the logged in user
Enum.each ["first room", "second room", "third room"], fn name ->
Repo.ins... | 35.990385 | 118 | 0.639594 |
2d906f2fee9d17190acbe6906b8f908400c282a6 | 2,357 | ex | Elixir | clients/data_labeling/lib/google_api/data_labeling/v1beta1/model/google_cloud_datalabeling_v1beta1_video_classification_annotation.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/data_labeling/lib/google_api/data_labeling/v1beta1/model/google_cloud_datalabeling_v1beta1_video_classification_annotation.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/data_labeling/lib/google_api/data_labeling/v1beta1/model/google_cloud_datalabeling_v1beta1_video_classification_annotation.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"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.828125 | 195 | 0.772168 |
2d908ab30e1f19452e03acc8af019d62d87b995d | 54,295 | ex | Elixir | lib/aws/generated/config.ex | justinludwig/aws-elixir | c66dfebecec62587dada50602c31c76d307d812c | [
"Apache-2.0"
] | null | null | null | lib/aws/generated/config.ex | justinludwig/aws-elixir | c66dfebecec62587dada50602c31c76d307d812c | [
"Apache-2.0"
] | null | null | null | lib/aws/generated/config.ex | justinludwig/aws-elixir | c66dfebecec62587dada50602c31c76d307d812c | [
"Apache-2.0"
] | null | null | null | # WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
# See https://github.com/aws-beam/aws-codegen for more details.
defmodule AWS.Config do
@moduledoc """
AWS Config
AWS Config provides a way to keep track of the configurations of all the AWS
resources associated with your AWS account.
You can use AWS Config to g... | 40.884789 | 205 | 0.752095 |
2d909d53cff3aea39b203e354ab4286a91163b9a | 3,788 | exs | Elixir | Elixir/test/life_test.exs | houtanf/Conways-Game-of-Life | 856c9adc251a135d959c61962965ee8c72eac4e3 | [
"Apache-2.0"
] | null | null | null | Elixir/test/life_test.exs | houtanf/Conways-Game-of-Life | 856c9adc251a135d959c61962965ee8c72eac4e3 | [
"Apache-2.0"
] | null | null | null | Elixir/test/life_test.exs | houtanf/Conways-Game-of-Life | 856c9adc251a135d959c61962965ee8c72eac4e3 | [
"Apache-2.0"
] | null | null | null | defmodule LifeTest do
use ExUnit.Case
doctest Life
test "Canary" do
assert True
end
test "cell with 0 neighbours (dies)" do
refute Life.is_alive?(true, 0)
end
test "live cell with 1 neighbour (dies)" do
refute Life.is_alive?(true, 1)
end
test "live cell with 2 neighbours (lives)" do
... | 25.594595 | 77 | 0.599261 |
2d90cfcc8a0518cfbb0ba5b472f934c10fb5b135 | 181 | exs | Elixir | apps/web/test/web/controllers/page_controller_test.exs | elixirschool/extracurricular | eb8b725fa49ca91b1c6b7e610a8522bc81a80de1 | [
"MIT"
] | 48 | 2017-08-21T02:08:16.000Z | 2022-01-05T14:02:56.000Z | apps/web/test/web/controllers/page_controller_test.exs | elixirschool/extracurricular | eb8b725fa49ca91b1c6b7e610a8522bc81a80de1 | [
"MIT"
] | 68 | 2017-08-21T02:17:32.000Z | 2017-11-09T15:56:27.000Z | apps/web/test/web/controllers/page_controller_test.exs | elixirschool/extracurricular | eb8b725fa49ca91b1c6b7e610a8522bc81a80de1 | [
"MIT"
] | 26 | 2017-08-21T04:28:22.000Z | 2018-12-09T14:20:29.000Z | defmodule Web.PageControllerTest do
use Web.ConnCase
test "GET /", %{conn: conn} do
conn = get conn, "/"
assert html_response(conn, 200) =~ "Extracurricular"
end
end
| 20.111111 | 56 | 0.668508 |
2d90d19762b4546768b157b2b1d2c5fc0a22512e | 1,999 | exs | Elixir | learning/redfour/physics/test/planet_test.exs | Mdlkxzmcp/various_elixir | c87527b7118a0c74a042073c04d2228025888ddf | [
"MIT"
] | 2 | 2020-01-20T20:15:20.000Z | 2020-02-27T11:08:42.000Z | learning/redfour/physics/test/planet_test.exs | Mdlkxzmcp/various_elixir | c87527b7118a0c74a042073c04d2228025888ddf | [
"MIT"
] | null | null | null | learning/redfour/physics/test/planet_test.exs | Mdlkxzmcp/various_elixir | c87527b7118a0c74a042073c04d2228025888ddf | [
"MIT"
] | null | null | null | defmodule PlanetTest do
use ExUnit.Case
setup do
planets = [
%{name: "Mercury", type: :rocky, ev: 4.3},
%{name: "Venus", type: :rocky, ev: 10.4},
%{name: "Earth", type: :rocky, ev: 11.2},
%{name: "Mars", type: :rocky, ev: 5.0},
%{name: "Jupiter", type: :gaseous, ev: 59.5},
%... | 28.557143 | 95 | 0.552776 |
2d910c976e8e16e8452d8daacd8bf60ea156bdee | 966 | ex | Elixir | debian/postinst.ex | mingw-deb/expat | 68e62c7738c0b65e06c3094fe1bcdf63639c8c25 | [
"MIT"
] | null | null | null | debian/postinst.ex | mingw-deb/expat | 68e62c7738c0b65e06c3094fe1bcdf63639c8c25 | [
"MIT"
] | null | null | null | debian/postinst.ex | mingw-deb/expat | 68e62c7738c0b65e06c3094fe1bcdf63639c8c25 | [
"MIT"
] | null | null | null | #!/bin/sh
# postinst script for mingw-w64-expat
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <packa... | 24.15 | 71 | 0.640787 |
2d912336bcf9cb2565aef562fe8a86fcbb037371 | 37,406 | ex | Elixir | lib/elixir/lib/supervisor.ex | jfornoff/elixir | 4ed5e8e66973ae7b0e52ead00f65117ab0d600e0 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/supervisor.ex | jfornoff/elixir | 4ed5e8e66973ae7b0e52ead00f65117ab0d600e0 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/supervisor.ex | jfornoff/elixir | 4ed5e8e66973ae7b0e52ead00f65117ab0d600e0 | [
"Apache-2.0"
] | null | null | null | defmodule Supervisor do
@moduledoc ~S"""
A behaviour module for implementing supervisors.
A supervisor is a process which supervises other processes, which we
refer to as *child processes*. Supervisors are used to build a hierarchical
process structure called a *supervision tree*. Supervision trees provide
... | 37.745711 | 98 | 0.696118 |
2d913c747bfa32b58425e2142da7d0c1d9c8879f | 2,362 | ex | Elixir | clients/dataproc/lib/google_api/dataproc/v1/model/job_scheduling.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/dataproc/lib/google_api/dataproc/v1/model/job_scheduling.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/dataproc/lib/google_api/dataproc/v1/model/job_scheduling.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"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.24 | 538 | 0.758256 |
2d91511f52a6bcfc8432d54a79de4d332138107e | 519 | exs | Elixir | config/test.exs | norikakip/exfile_sample | 1da5e24ef39d8bac50c44823eaed75dfb6e2dcb6 | [
"MIT"
] | 1 | 2016-01-23T04:11:44.000Z | 2016-01-23T04:11:44.000Z | config/test.exs | norikakip/exfile_sample | 1da5e24ef39d8bac50c44823eaed75dfb6e2dcb6 | [
"MIT"
] | null | null | null | config/test.exs | norikakip/exfile_sample | 1da5e24ef39d8bac50c44823eaed75dfb6e2dcb6 | [
"MIT"
] | null | null | null | use Mix.Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :exfile_sample, ExfileSample.Endpoint,
http: [port: 4001],
server: false
# Print only warnings and errors during test
config :logger, level: :warn
# Configure your database
config :exfile_samp... | 25.95 | 56 | 0.747592 |
2d917ce78369992388bd41e330945e1375562bbd | 2,472 | exs | Elixir | apps/nerves_hub_www/test/nerves_hub_www_web/live/deployment_live_show_test.exs | acrogenesis/nerves_hub_web | 27f651dd64b40a034254b50805884f4efd679957 | [
"Apache-2.0"
] | null | null | null | apps/nerves_hub_www/test/nerves_hub_www_web/live/deployment_live_show_test.exs | acrogenesis/nerves_hub_web | 27f651dd64b40a034254b50805884f4efd679957 | [
"Apache-2.0"
] | null | null | null | apps/nerves_hub_www/test/nerves_hub_www_web/live/deployment_live_show_test.exs | acrogenesis/nerves_hub_web | 27f651dd64b40a034254b50805884f4efd679957 | [
"Apache-2.0"
] | null | null | null | defmodule NervesHubWWWWeb.DeploymentLiveShowTest do
use NervesHubWWWWeb.ConnCase.Browser, async: false
alias NervesHubWebCore.{AuditLogs, Repo}
alias NervesHubWWWWeb.Endpoint
test "redirects on mount with unrecognized session structure", %{fixture: fixture, conn: conn} do
home_path = Routes.home_path(Endp... | 32.526316 | 99 | 0.673139 |
2d9186815882772c75c07633789f51c0a128cbd8 | 2,214 | ex | Elixir | lib/poison.ex | CleverBytes/poison | eb48f76c2d3172c908035311c79ce21ac6fa16af | [
"CC0-1.0"
] | 4 | 2017-10-01T18:00:25.000Z | 2022-02-23T18:26:53.000Z | lib/poison.ex | CleverBytes/poison | eb48f76c2d3172c908035311c79ce21ac6fa16af | [
"CC0-1.0"
] | 107 | 2016-08-03T18:16:51.000Z | 2021-07-23T08:42:51.000Z | lib/poison.ex | CleverBytes/poison | eb48f76c2d3172c908035311c79ce21ac6fa16af | [
"CC0-1.0"
] | 10 | 2017-10-31T16:16:05.000Z | 2022-02-16T10:31:04.000Z | defmodule Poison do
alias Poison.Encoder
alias Poison.Decode
alias Poison.Parser
@doc """
Encode a value to JSON.
iex> Poison.encode([1, 2, 3])
{:ok, "[1,2,3]"}
"""
@spec encode(Encoder.t, Keyword.t) :: {:ok, iodata} | {:ok, String.t}
| {:error, {:invalid, any}}
def encode(value, optio... | 25.744186 | 73 | 0.582204 |
2d91bddf80da6391650f433929ad80e7279d147a | 859 | exs | Elixir | test/grizzly/zwave/commands/clock_report_test.exs | smartrent/grizzly | 65a397ea7bfedb5518fe63a3f058a0b6af473e39 | [
"Apache-2.0"
] | 76 | 2019-09-04T16:56:58.000Z | 2022-03-29T06:54:36.000Z | test/grizzly/zwave/commands/clock_report_test.exs | smartrent/grizzly | 65a397ea7bfedb5518fe63a3f058a0b6af473e39 | [
"Apache-2.0"
] | 124 | 2019-09-05T14:01:24.000Z | 2022-02-28T22:58:14.000Z | test/grizzly/zwave/commands/clock_report_test.exs | smartrent/grizzly | 65a397ea7bfedb5518fe63a3f058a0b6af473e39 | [
"Apache-2.0"
] | 10 | 2019-10-23T19:25:45.000Z | 2021-11-17T13:21:20.000Z | defmodule Grizzly.ZWave.Commands.ClockReportTest do
use ExUnit.Case, async: true
alias Grizzly.ZWave.Commands.ClockReport
test "creates the command and validates params" do
params = [weekday: :monday, hour: 12, minute: 30]
{:ok, _command} = ClockReport.new(params)
end
test "encodes params correctly... | 31.814815 | 64 | 0.689173 |
2d91e0241def89da7a38d12ded6c47115bc5fe0f | 2,492 | exs | Elixir | test/binary_test.exs | ArKeD17/tds | cc81d97d6676bbb7f571661e0bf78e4a80390d60 | [
"Apache-2.0"
] | null | null | null | test/binary_test.exs | ArKeD17/tds | cc81d97d6676bbb7f571661e0bf78e4a80390d60 | [
"Apache-2.0"
] | null | null | null | test/binary_test.exs | ArKeD17/tds | cc81d97d6676bbb7f571661e0bf78e4a80390d60 | [
"Apache-2.0"
] | null | null | null | defmodule BinaryTest do
import Tds.TestHelper
require Logger
use ExUnit.Case, async: true
alias Tds.Parameter
@tag timeout: 50000
setup do
opts = Application.fetch_env!(:mssql, :opts)
{:ok, pid} = Tds.start_link(opts)
{:ok, [pid: pid]}
end
test "Implicit Conversion of binary to datatypes... | 35.098592 | 203 | 0.581461 |
2d91f22e9aa0d4c8e767a91cd82cd3c5223fbcfa | 531 | ex | Elixir | lib/radiator/media/podcast_image.ex | optikfluffel/radiator | b1a1b966296fa6bf123e3a2455009ff52099ace6 | [
"MIT"
] | 1 | 2021-03-02T16:59:40.000Z | 2021-03-02T16:59:40.000Z | lib/radiator/media/podcast_image.ex | optikfluffel/radiator | b1a1b966296fa6bf123e3a2455009ff52099ace6 | [
"MIT"
] | null | null | null | lib/radiator/media/podcast_image.ex | optikfluffel/radiator | b1a1b966296fa6bf123e3a2455009ff52099ace6 | [
"MIT"
] | null | null | null | defmodule Radiator.Media.PodcastImage do
use Arc.Definition
use Arc.Ecto.Definition
@versions [:original, :thumbnail]
def filename(version, {_file, _podcast}) do
"cover_#{version}"
end
def storage_dir(_version, {_file, podcast}) do
"podcast/#{podcast.id}"
end
def s3_object_headers(_version, ... | 23.086957 | 87 | 0.706215 |
2d91f92bcc439981b1db852fc86dc99a48cee4e7 | 1,125 | ex | Elixir | test/support/conn_case.ex | styx/co2_offset | ac4b2bce8142e2d33ea089322c8dade34839448b | [
"Apache-2.0"
] | 15 | 2018-12-26T10:31:16.000Z | 2020-12-01T09:27:01.000Z | test/support/conn_case.ex | styx/co2_offset | ac4b2bce8142e2d33ea089322c8dade34839448b | [
"Apache-2.0"
] | 267 | 2018-12-26T07:46:17.000Z | 2020-04-04T17:05:47.000Z | test/support/conn_case.ex | styx/co2_offset | ac4b2bce8142e2d33ea089322c8dade34839448b | [
"Apache-2.0"
] | 1 | 2019-07-12T13:53:25.000Z | 2019-07-12T13:53:25.000Z | defmodule Co2OffsetWeb.ConnCase do
@moduledoc """
This module defines the test case to be used by
tests that require setting up a connection.
Such tests rely on `Phoenix.ConnTest` and also
import other functionality to make it easier
to build common data structures and query the data layer.
Finally, if ... | 25.568182 | 59 | 0.717333 |
2d920cb5f02a3f74dda35a318255cc646fb880b6 | 3,191 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/accelerator_type.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/accelerator_type.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/accelerator_type.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | 1 | 2020-11-10T16:58:27.000Z | 2020-11-10T16:58:27.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 44.319444 | 247 | 0.716703 |
2d9214044828bfc313a96459d6947b8b69ef2f02 | 1,987 | exs | Elixir | backend/config/prod.exs | diderikk/SimpleChatApp | 2ee9b4109114aa08611f4776a58e6dc5f25135cc | [
"MIT"
] | null | null | null | backend/config/prod.exs | diderikk/SimpleChatApp | 2ee9b4109114aa08611f4776a58e6dc5f25135cc | [
"MIT"
] | null | null | null | backend/config/prod.exs | diderikk/SimpleChatApp | 2ee9b4109114aa08611f4776a58e6dc5f25135cc | [
"MIT"
] | null | null | null | import Config
# For production, don't forget to configure the url host
# to something meaningful, Phoenix uses this information
# when generating URLs.
#
# Note we also include the path to a cache manifest
# containing the digested version of static files. This
# manifest is generated by the `mix phx.digest` task,
# w... | 35.482143 | 85 | 0.707599 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.