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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1cc210f63a7b34ac0016a5d41aef20cfb04c3d76 | 5,502 | ex | Elixir | lib/typelixir/pattern_builder.ex | Typelixir/typelixir | 1f13d5a75eb337e67eb3881fb2844462237fd338 | [
"MIT"
] | 25 | 2020-08-31T13:25:03.000Z | 2022-01-19T20:14:20.000Z | lib/typelixir/pattern_builder.ex | Typelixir/typelixir | 1f13d5a75eb337e67eb3881fb2844462237fd338 | [
"MIT"
] | null | null | null | lib/typelixir/pattern_builder.ex | Typelixir/typelixir | 1f13d5a75eb337e67eb3881fb2844462237fd338 | [
"MIT"
] | 2 | 2021-06-23T21:33:07.000Z | 2021-08-31T14:18:35.000Z | defmodule Typelixir.PatternBuilder do
alias Typelixir.{TypeComparator}
# ---------------------------------------------------------------------------------------------------
# type -> returns the type of types defined on @spec
# -> returns the type of any pattern
def type({:list, _, [type]}, env), do: ... | 36.68 | 163 | 0.577608 |
1cc21bd25c023ac3d684348be6d2dd964678fb30 | 1,727 | ex | Elixir | clients/api_gateway/lib/google_api/api_gateway/v1/model/apigateway_test_iam_permissions_request.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/api_gateway/lib/google_api/api_gateway/v1/model/apigateway_test_iam_permissions_request.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/api_gateway/lib/google_api/api_gateway/v1/model/apigateway_test_iam_permissions_request.ex | dazuma/elixir-google-api | 6a9897168008efe07a6081d2326735fe332e522c | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 36.744681 | 288 | 0.751013 |
1cc27a4f228ce39f4ebd47d53f60936de93c3f07 | 27,054 | exs | Elixir | lib/elixir/test/elixir/enum_test.exs | QuinnWilton/elixir | e42e3e55ca1561fe56b58d6f51c7b0faae6a7a1e | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/enum_test.exs | QuinnWilton/elixir | e42e3e55ca1561fe56b58d6f51c7b0faae6a7a1e | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/enum_test.exs | QuinnWilton/elixir | e42e3e55ca1561fe56b58d6f51c7b0faae6a7a1e | [
"Apache-2.0"
] | null | null | null | Code.require_file "test_helper.exs", __DIR__
defmodule EnumTest.List do
use ExUnit.Case, async: true
test :empty? do
assert Enum.empty?([])
refute Enum.empty?([1, 2, 3])
refute Enum.empty?(1..3)
end
test :member? do
assert Enum.member?([1, 2, 3], 2)
refute Enum.member?([], 0)
refute E... | 31.025229 | 114 | 0.499335 |
1cc2bafba9b2b47f94bdb5db7497e383f0cb36d5 | 36,609 | exs | Elixir | lib/elixir/test/elixir/enum_test.exs | pap/elixir | c803afe90c766663823c74397fb23ed40ec52c5b | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/enum_test.exs | pap/elixir | c803afe90c766663823c74397fb23ed40ec52c5b | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/enum_test.exs | pap/elixir | c803afe90c766663823c74397fb23ed40ec52c5b | [
"Apache-2.0"
] | null | null | null | Code.require_file "test_helper.exs", __DIR__
defmodule EnumTest.List do
use ExUnit.Case, async: true
test "empty?" do
assert Enum.empty?([])
refute Enum.empty?([1, 2, 3])
refute Enum.empty?(1..3)
end
test "member?" do
assert Enum.member?([1, 2, 3], 2)
refute Enum.member?([], 0)
refute... | 31.668685 | 114 | 0.50982 |
1cc2c6e118a8b367d60e167e7a0c924c10f921ee | 53 | exs | Elixir | .formatter.exs | adamswsk/farmbot_os | d177d3b74888c1e7bcbf8f8595818708ee97f73b | [
"MIT"
] | 1 | 2021-08-23T13:36:14.000Z | 2021-08-23T13:36:14.000Z | .formatter.exs | adamswsk/farmbot_os | d177d3b74888c1e7bcbf8f8595818708ee97f73b | [
"MIT"
] | null | null | null | .formatter.exs | adamswsk/farmbot_os | d177d3b74888c1e7bcbf8f8595818708ee97f73b | [
"MIT"
] | null | null | null | [
inputs: ["*.{ex,exs}", "{test}/**/*.{ex,exs}"]
]
| 13.25 | 48 | 0.377358 |
1cc2c98381ce618c6ade2a81d8e4c42b919d05c7 | 271 | ex | Elixir | notes.ex | ghitchens/stopwatch | c0570d984b926b68d7a3d24a98b390e23b19ccbf | [
"MIT"
] | 1 | 2017-05-01T21:00:39.000Z | 2017-05-01T21:00:39.000Z | notes.ex | ghitchens/stopwatch | c0570d984b926b68d7a3d24a98b390e23b19ccbf | [
"MIT"
] | null | null | null | notes.ex | ghitchens/stopwatch | c0570d984b926b68d7a3d24a98b390e23b19ccbf | [
"MIT"
] | null | null | null | # subscriber api
subscribe()
handle_notification(...)
# source API (not including state)
register_source(registry, source, initial_event_data) # sends registration info
deregister_source(registry, source, final_notification_data)
inform(notification_data)
| 22.583333 | 82 | 0.782288 |
1cc2ed4351121b5d6c017bdabe68e4eaf817d450 | 1,098 | ex | Elixir | lib/whistle/http_server.ex | andreasronge/whistle | 8dc5b4246e9f0fea8bc5ffe8c89737eceb082a32 | [
"MIT"
] | 59 | 2018-12-18T15:24:23.000Z | 2020-11-19T18:40:25.000Z | lib/whistle/http_server.ex | andreasronge/whistle | 8dc5b4246e9f0fea8bc5ffe8c89737eceb082a32 | [
"MIT"
] | 8 | 2019-02-05T22:36:17.000Z | 2019-03-20T21:13:42.000Z | lib/whistle/http_server.ex | andreasronge/whistle | 8dc5b4246e9f0fea8bc5ffe8c89737eceb082a32 | [
"MIT"
] | 3 | 2019-01-30T19:13:53.000Z | 2020-11-19T18:40:28.000Z | defmodule Whistle.HttpServer do
def child_spec(opts) do
dispatch_rules = dispatch(Keyword.get(opts, :routers, []), Keyword.get(opts, :plug, nil))
children =
Enum.flat_map([:http, :https], fn scheme ->
opts
|> Keyword.get(scheme, false)
|> case do
false ->
[... | 22.408163 | 93 | 0.563752 |
1cc2f85767fb0a91829db9f6acfaf433506ebf71 | 18,360 | ex | Elixir | lib/cli/help.ex | sndnv/track | 3d3727f752877f51a69700c0efff13d3eed978fa | [
"Apache-2.0"
] | null | null | null | lib/cli/help.ex | sndnv/track | 3d3727f752877f51a69700c0efff13d3eed978fa | [
"Apache-2.0"
] | null | null | null | lib/cli/help.ex | sndnv/track | 3d3727f752877f51a69700c0efff13d3eed978fa | [
"Apache-2.0"
] | null | null | null | defmodule Cli.Help do
@moduledoc """
Module used for generating application documentation and help messages.
"""
@app "track"
@brief "#{IO.ANSI.format([:bright, @app], true)} - Simple time/task tracking terminal utility"
@description [
"#{IO.ANSI.format([:bright, @app], true)} is a basic time/task tr... | 29.096672 | 136 | 0.545098 |
1cc31a0764e9aeaecc4e9afd973cc18e490d4184 | 8,601 | ex | Elixir | samples/client/petstore/elixir/lib/swagger_petstore/api/fake.ex | swavans/swagger-codegen | 8f4d7d7ba3155b8ad8af0ebb196b1f87014f9c84 | [
"Apache-2.0"
] | null | null | null | samples/client/petstore/elixir/lib/swagger_petstore/api/fake.ex | swavans/swagger-codegen | 8f4d7d7ba3155b8ad8af0ebb196b1f87014f9c84 | [
"Apache-2.0"
] | null | null | null | samples/client/petstore/elixir/lib/swagger_petstore/api/fake.ex | swavans/swagger-codegen | 8f4d7d7ba3155b8ad8af0ebb196b1f87014f9c84 | [
"Apache-2.0"
] | null | null | null | # NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
defmodule SwaggerPetstore.Api.Fake do
@moduledoc """
API calls for all endpoints tagged `Fake`.
"""
alias SwaggerPetstore.Connection
import Swagg... | 30.938849 | 151 | 0.650389 |
1cc341ac7d1bb4a3f75de08a37c3ba06fd2dde11 | 8,611 | exs | Elixir | apps/omg_watcher/test/integration/block_getter_test.exs | Pongch/elixir-omg | 8a33c246898b49cba62b847e0989d9b6c89f5106 | [
"Apache-2.0"
] | null | null | null | apps/omg_watcher/test/integration/block_getter_test.exs | Pongch/elixir-omg | 8a33c246898b49cba62b847e0989d9b6c89f5106 | [
"Apache-2.0"
] | null | null | null | apps/omg_watcher/test/integration/block_getter_test.exs | Pongch/elixir-omg | 8a33c246898b49cba62b847e0989d9b6c89f5106 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 OmiseGO Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 30.753571 | 120 | 0.656021 |
1cc365911ad25d5535b609d67ff09af426cbc904 | 461 | ex | Elixir | example/web/router.ex | poplarhq/ua_parser | 9246082a67c11fbcbeb7e409ffdc7ae4aef86612 | [
"Apache-2.0"
] | null | null | null | example/web/router.ex | poplarhq/ua_parser | 9246082a67c11fbcbeb7e409ffdc7ae4aef86612 | [
"Apache-2.0"
] | null | null | null | example/web/router.ex | poplarhq/ua_parser | 9246082a67c11fbcbeb7e409ffdc7ae4aef86612 | [
"Apache-2.0"
] | null | null | null | defmodule Example.Router do
use Example.Web, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
end
pipeline :api do
plug :accepts, ["json"]
end
scope "/", Example do
pipe_throu... | 20.043478 | 57 | 0.687636 |
1cc36b831d0c119f470a4b08d2bb55112e7d4f9f | 999 | exs | Elixir | mix.exs | allenan/coinbase_commerce | cbd97484fe559b47cc62d6bf068094942d8e0d86 | [
"MIT"
] | 4 | 2018-08-13T20:41:37.000Z | 2021-11-11T04:58:58.000Z | mix.exs | allenan/coinbase_commerce | cbd97484fe559b47cc62d6bf068094942d8e0d86 | [
"MIT"
] | null | null | null | mix.exs | allenan/coinbase_commerce | cbd97484fe559b47cc62d6bf068094942d8e0d86 | [
"MIT"
] | null | null | null | defmodule CoinbaseCommerce.MixProject do
use Mix.Project
def project do
[
app: :coinbase_commerce,
name: "coinbase_commerce",
description: "Simple Elixir wrapper for the Coinbase Commerce API",
source_url: "https://github.com/allenan/coinbase_commerce",
version: "0.3.0",
eli... | 22.704545 | 73 | 0.582583 |
1cc37729eab1c535f0cd79e56c63e24f67622194 | 7,721 | ex | Elixir | lib/vintage_net/power_manager.ex | axelson/vintage_net | 68866ff223fa40e7ad6fd4d9fb2f7960cf51b1ca | [
"Apache-2.0"
] | 85 | 2019-05-09T14:54:38.000Z | 2022-02-08T16:52:04.000Z | lib/vintage_net/power_manager.ex | axelson/vintage_net | 68866ff223fa40e7ad6fd4d9fb2f7960cf51b1ca | [
"Apache-2.0"
] | 132 | 2019-05-09T15:57:59.000Z | 2022-02-28T16:31:22.000Z | lib/vintage_net/power_manager.ex | axelson/vintage_net | 68866ff223fa40e7ad6fd4d9fb2f7960cf51b1ca | [
"Apache-2.0"
] | 14 | 2019-07-08T19:18:23.000Z | 2022-02-08T16:52:05.000Z | defmodule VintageNet.PowerManager do
@moduledoc """
This is a behaviour for implementing platform-specific power management.
From VintageNet's point of view, network devices have the following
lifecycle:
```
off ---> on ---> powering-off ---> off
```
Power management does not necessarily mean contro... | 45.417647 | 97 | 0.756249 |
1cc37ac3aeaf3831fc24d040cb30a5b414a489ab | 3,488 | exs | Elixir | test/mock_test.exs | azhi/mock | 77b5b6758991b348ecedb195cd884bf66a019bdb | [
"MIT"
] | null | null | null | test/mock_test.exs | azhi/mock | 77b5b6758991b348ecedb195cd884bf66a019bdb | [
"MIT"
] | null | null | null | test/mock_test.exs | azhi/mock | 77b5b6758991b348ecedb195cd884bf66a019bdb | [
"MIT"
] | null | null | null | Code.require_file "test_helper.exs", __DIR__
defmodule MockTest do
use ExUnit.Case, async: false
import Mock
setup_all do
foo = "bar"
{:ok, foo: foo}
end
test "simple mock" do
with_mock String,
[reverse: fn(x) -> 2*x end] do
assert String.reverse(3) == 6
end
end
test "mo... | 25.093525 | 88 | 0.571101 |
1cc3e03e73215875f6e45e2f4fcdd82188a66998 | 568 | exs | Elixir | mix.exs | pcranaway/metro | 99c17e3f59b54affaec615c9f044b294be7064a6 | [
"Apache-2.0"
] | 1 | 2022-01-23T15:49:13.000Z | 2022-01-23T15:49:13.000Z | mix.exs | pcranaway/metro | 99c17e3f59b54affaec615c9f044b294be7064a6 | [
"Apache-2.0"
] | null | null | null | mix.exs | pcranaway/metro | 99c17e3f59b54affaec615c9f044b294be7064a6 | [
"Apache-2.0"
] | null | null | null | defmodule Metro.MixProject do
use Mix.Project
def project do
[
app: :metro,
version: "0.1.0",
elixir: "~> 1.10",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applic... | 19.586207 | 87 | 0.573944 |
1cc421ad8cf97b609cbeeced18d28e1ffbef6dd3 | 1,046 | exs | Elixir | machine_translation/MorpHIN/Learned/Resources/Set4/TrainingInstances/35.exs | AdityaPrasadMishra/NLP--Project-Group-16 | fb62cc6a1db4a494058171f11c14a2be3933a9a1 | [
"MIT"
] | null | null | null | machine_translation/MorpHIN/Learned/Resources/Set4/TrainingInstances/35.exs | AdityaPrasadMishra/NLP--Project-Group-16 | fb62cc6a1db4a494058171f11c14a2be3933a9a1 | [
"MIT"
] | null | null | null | machine_translation/MorpHIN/Learned/Resources/Set4/TrainingInstances/35.exs | AdityaPrasadMishra/NLP--Project-Group-16 | fb62cc6a1db4a494058171f11c14a2be3933a9a1 | [
"MIT"
] | null | null | null | **EXAMPLE FILE**
cm cm noun cm adjective;
conj noun SYM noun adjective;
pn cm pnoun cm adjective;
pnoun conj noun adjective adjective;
SYM adjective noun cm adjective;
verb conj adverb particle adjective;
cm adjective noun cm adjective;
cardinal adjective noun cm adjective;
cm adjective noun cm adjective;
ve... | 30.764706 | 49 | 0.785851 |
1cc45300992900fb6282ffbb3eac8675230d5658 | 2,662 | exs | Elixir | test/swotex_test.exs | maartenvanvliet/swotex | 960ae3a1214c832af400b2b517ee5846e234cace | [
"MIT"
] | 7 | 2018-08-18T09:16:27.000Z | 2021-01-16T23:12:33.000Z | test/swotex_test.exs | maartenvanvliet/swotex | 960ae3a1214c832af400b2b517ee5846e234cace | [
"MIT"
] | 15 | 2020-03-30T04:13:05.000Z | 2022-02-28T04:02:57.000Z | test/swotex_test.exs | maartenvanvliet/swotex | 960ae3a1214c832af400b2b517ee5846e234cace | [
"MIT"
] | null | null | null | defmodule SwotExTest do
use ExUnit.Case, async: true
test "recognizes academic email addresses and domains" do
assert_academic("lreilly@stanford.edu")
assert_academic("LREILLY@STANFORD.EDU")
assert_academic("Lreilly@Stanford.Edu")
assert_academic("lreilly@slac.stanford.edu")
assert_academic("lr... | 30.597701 | 90 | 0.706236 |
1cc4647fafc628ca0e1e080842f7b9fb488384f3 | 144 | ex | Elixir | lib/wong_bejo_web/views/layout_view.ex | fossabot/web.bejoistic | edd672a8f125180397b89e1f5ee469b1f2344e7f | [
"MIT"
] | null | null | null | lib/wong_bejo_web/views/layout_view.ex | fossabot/web.bejoistic | edd672a8f125180397b89e1f5ee469b1f2344e7f | [
"MIT"
] | null | null | null | lib/wong_bejo_web/views/layout_view.ex | fossabot/web.bejoistic | edd672a8f125180397b89e1f5ee469b1f2344e7f | [
"MIT"
] | null | null | null | defmodule WongBejoWeb.LayoutView do
use WongBejoWeb, :view
def production? do
Application.get_env(:wong_bejo, :env) == :prod
end
end
| 18 | 50 | 0.729167 |
1cc46da055f810daf4306183636f8d1cad0028a4 | 807 | exs | Elixir | test/channels/game_channel_test.exs | deerob4/words-with-enemies | f9de13d599bdecc71007db57d3c21651b9be7463 | [
"MIT"
] | 1 | 2015-02-15T23:50:29.000Z | 2015-02-15T23:50:29.000Z | test/channels/game_channel_test.exs | deerob4/words-with-enemies | f9de13d599bdecc71007db57d3c21651b9be7463 | [
"MIT"
] | null | null | null | test/channels/game_channel_test.exs | deerob4/words-with-enemies | f9de13d599bdecc71007db57d3c21651b9be7463 | [
"MIT"
] | null | null | null | defmodule WordsWithEnemies.GameChannelTest do
use WordsWithEnemies.ChannelCase
alias WordsWithEnemies.GameChannel
setup do
{:ok, _, socket} =
socket("user_id", %{some: :assign})
|> subscribe_and_join(GameChannel, "games:lobby")
{:ok, socket: socket}
end
test "ping replies with status o... | 27.827586 | 66 | 0.639405 |
1cc4707954c9f7aab4b1bd343f53280081f581a6 | 393 | exs | Elixir | config/environment/test.exs | Fire-Dragon-DoL/esp_ex | 0cd95de570ed7963744b298ad403fe4e1947dd2b | [
"MIT"
] | null | null | null | config/environment/test.exs | Fire-Dragon-DoL/esp_ex | 0cd95de570ed7963744b298ad403fe4e1947dd2b | [
"MIT"
] | null | null | null | config/environment/test.exs | Fire-Dragon-DoL/esp_ex | 0cd95de570ed7963744b298ad403fe4e1947dd2b | [
"MIT"
] | null | null | null | use Mix.Config
config :logger,
backends: [],
utc_log: true,
compile_time_purge_level: :debug
config :delugex, Delugex.MessageStore.Postgres, notify: false
config :delugex, Delugex.MessageStore.Postgres.Repo,
pool: Ecto.Adapters.SQL.Sandbox,
url:
System.get_env("TEST_DELUGEX_DATABASE_URL") ||
"pos... | 26.2 | 82 | 0.763359 |
1cc4b4d4844b6aaf60c076089291df6e137e8681 | 1,111 | exs | Elixir | config/config.exs | samacs/xslt | 503f4ca7de86eb63643c8e6288dd961e2f4c167e | [
"MIT"
] | 10 | 2017-03-08T16:21:58.000Z | 2021-05-30T12:32:25.000Z | config/config.exs | samacs/xslt | 503f4ca7de86eb63643c8e6288dd961e2f4c167e | [
"MIT"
] | 4 | 2017-11-06T12:02:29.000Z | 2021-05-22T13:38:11.000Z | config/config.exs | samacs/xslt | 503f4ca7de86eb63643c8e6288dd961e2f4c167e | [
"MIT"
] | 7 | 2017-04-09T01:37:37.000Z | 2021-05-21T11:01:22.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... | 35.83871 | 73 | 0.749775 |
1cc4ef0ba34f842c91180f426f1833d2825728ed | 1,713 | ex | Elixir | lib/remote_points_web/telemetry.ex | DianaOlympos/remote_test | e222d4e937789871baab3a7b4fd8428b714c1af4 | [
"MIT"
] | 1 | 2020-09-18T03:32:45.000Z | 2020-09-18T03:32:45.000Z | lib/remote_points_web/telemetry.ex | DianaOlympos/remote_test | e222d4e937789871baab3a7b4fd8428b714c1af4 | [
"MIT"
] | null | null | null | lib/remote_points_web/telemetry.ex | DianaOlympos/remote_test | e222d4e937789871baab3a7b4fd8428b714c1af4 | [
"MIT"
] | null | null | null | defmodule RemotePointsWeb.Telemetry do
use Supervisor
import Telemetry.Metrics
def start_link(arg) do
Supervisor.start_link(__MODULE__, arg, name: __MODULE__)
end
@impl true
def init(_arg) do
children = [
{:telemetry_poller, measurements: periodic_measurements(), period: 10_000}
# Add ... | 31.722222 | 86 | 0.673088 |
1cc4f1d14c95d4fde7f1bc185a4d881faddc8533 | 999 | ex | Elixir | lib/schemas/server/container.ex | Kintull/elidactyl | 9a051ed511ed92fa7578038784baa73288f1312b | [
"MIT"
] | 6 | 2020-04-28T21:38:40.000Z | 2022-02-13T01:04:10.000Z | lib/schemas/server/container.ex | Kintull/elidactyl | 9a051ed511ed92fa7578038784baa73288f1312b | [
"MIT"
] | 1 | 2021-03-16T10:39:32.000Z | 2021-03-16T10:39:32.000Z | lib/schemas/server/container.ex | Kintull/elidactyl | 9a051ed511ed92fa7578038784baa73288f1312b | [
"MIT"
] | null | null | null | defmodule Elidactyl.Schemas.Server.Container do
@moduledoc false
alias Ecto.Changeset
alias Elidactyl.Utils
alias Elidactyl.Response.Parser
use Ecto.Schema
@behaviour Parser
@type t :: %__MODULE__{
startup_command: binary | nil,
image: binary | nil,
environment: Parser.json_map | nil,
... | 24.365854 | 85 | 0.6997 |
1cc50a5982d747fd1df03694ea3fd85dcf823809 | 4,401 | ex | Elixir | lib/ex338_web/controllers/trade_controller.ex | axelclark/ex338 | 3fb3c260d93bda61f7636ee1a677770d2dc1b89a | [
"MIT"
] | 17 | 2016-12-22T06:39:26.000Z | 2021-01-20T13:51:13.000Z | lib/ex338_web/controllers/trade_controller.ex | axelclark/ex338 | 3fb3c260d93bda61f7636ee1a677770d2dc1b89a | [
"MIT"
] | 608 | 2016-08-06T18:57:58.000Z | 2022-03-01T02:48:17.000Z | lib/ex338_web/controllers/trade_controller.ex | axelclark/ex338 | 3fb3c260d93bda61f7636ee1a677770d2dc1b89a | [
"MIT"
] | 6 | 2017-11-21T22:35:45.000Z | 2022-01-11T21:37:40.000Z | defmodule Ex338Web.TradeController do
use Ex338Web, :controller
alias Ex338.{DraftPicks, FantasyLeagues, Trades, FantasyTeams, Accounts}
alias Ex338Web.{Authorization, TradeEmail, Mailer}
import Canary.Plugs
plug(
:load_and_authorize_resource,
model: FantasyTeams.FantasyTeam,
only: [:create, :n... | 30.143836 | 92 | 0.643263 |
1cc50b0a8f7747ff7f758dec87ff33fb6e7cee2f | 145 | ex | Elixir | lib/philopets_web/controllers/page_controller.ex | audacioustux/philopets | 9380416937d635d4b1f5e13fa6f8b52ee603addf | [
"blessing"
] | null | null | null | lib/philopets_web/controllers/page_controller.ex | audacioustux/philopets | 9380416937d635d4b1f5e13fa6f8b52ee603addf | [
"blessing"
] | null | null | null | lib/philopets_web/controllers/page_controller.ex | audacioustux/philopets | 9380416937d635d4b1f5e13fa6f8b52ee603addf | [
"blessing"
] | null | null | null | defmodule PhilopetsWeb.PageController do
use PhilopetsWeb, :controller
def index(conn, _params) do
render(conn, "index.html")
end
end
| 18.125 | 40 | 0.744828 |
1cc50e48b1f94c1dddec5408295772364c92e016 | 705 | ex | Elixir | src/myapp/apps/services/web/gettext.ex | ecamacho/elixir_at_work | c8e4c604c925455b4794931c2b9c15ef3774005f | [
"MIT"
] | null | null | null | src/myapp/apps/services/web/gettext.ex | ecamacho/elixir_at_work | c8e4c604c925455b4794931c2b9c15ef3774005f | [
"MIT"
] | null | null | null | src/myapp/apps/services/web/gettext.ex | ecamacho/elixir_at_work | c8e4c604c925455b4794931c2b9c15ef3774005f | [
"MIT"
] | null | null | null | defmodule Services.Gettext do
@moduledoc """
A module providing Internationalization with a gettext-based API.
By using [Gettext](https://hexdocs.pm/gettext),
your module gains a set of macros for translations, for example:
import Services.Gettext
# Simple translation
gettext "Here is the s... | 28.2 | 72 | 0.679433 |
1cc51c16be56cc7b350c65925693c5653dc0c390 | 7,212 | exs | Elixir | lib/mix/test/mix/tasks/app.start_test.exs | namjae/elixir | 6d1561a5939d68fb61f422b83271fbc824847395 | [
"Apache-2.0"
] | 1 | 2021-05-20T13:08:37.000Z | 2021-05-20T13:08:37.000Z | lib/mix/test/mix/tasks/app.start_test.exs | namjae/elixir | 6d1561a5939d68fb61f422b83271fbc824847395 | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/tasks/app.start_test.exs | namjae/elixir | 6d1561a5939d68fb61f422b83271fbc824847395 | [
"Apache-2.0"
] | null | null | null | Code.require_file("../../test_helper.exs", __DIR__)
defmodule Mix.Tasks.App.StartTest do
use MixTest.Case
defmodule AppStartSample do
def project do
[app: :app_start_sample, version: "0.1.0"]
end
def application do
[applications: [:logger]]
end
end
defmodule WrongElixirProject do... | 29.557377 | 139 | 0.635885 |
1cc54dcf006edc63431905034eb1c46dc837e57b | 18,247 | exs | Elixir | lib/elixir/test/elixir/kernel/expansion_test.exs | diogovk/elixir | 7b8213affaad38b50afaa3dfc3a43717f35ba4e7 | [
"Apache-2.0"
] | 4 | 2015-12-22T02:46:39.000Z | 2016-04-26T06:11:09.000Z | lib/elixir/test/elixir/kernel/expansion_test.exs | diogovk/elixir | 7b8213affaad38b50afaa3dfc3a43717f35ba4e7 | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/kernel/expansion_test.exs | diogovk/elixir | 7b8213affaad38b50afaa3dfc3a43717f35ba4e7 | [
"Apache-2.0"
] | null | null | null | Code.require_file "../test_helper.exs", __DIR__
defmodule Kernel.ExpansionTarget do
defmacro seventeen, do: 17
end
defmodule Kernel.ExpansionTest do
use ExUnit.Case, async: true
## __block__
test "__block__: expands to nil when empty" do
assert expand(quote do: __block__()) == nil
end
test "__block... | 32.642218 | 121 | 0.590672 |
1cc55135b2e1a20841510a26c19c7f1d5dad81ee | 397 | exs | Elixir | test/test_helper.exs | andyl/phx-cmdd | f72319d81b264b4deba4831ee1d0eb725d2b5adb | [
"MIT"
] | 5 | 2019-05-23T23:25:25.000Z | 2019-05-31T12:10:59.000Z | test/test_helper.exs | andyl/comgen | f72319d81b264b4deba4831ee1d0eb725d2b5adb | [
"MIT"
] | 3 | 2019-05-31T04:42:02.000Z | 2019-06-01T06:42:14.000Z | test/test_helper.exs | andyl/comgen | f72319d81b264b4deba4831ee1d0eb725d2b5adb | [
"MIT"
] | 1 | 2019-06-01T05:04:14.000Z | 2019-06-01T05:04:14.000Z | ExUnit.start()
defmodule TestHelper do
@doc """
Use this function to reset the base_dir before running tests that generate
files. Note that when MIX_ENV == test, basedir == "tmp/test/"
"""
def reset_base_dir(_args) do
basedir = Comspec.basedir()
case [basedir, Mix.env()] do
["tmp/", :test] ->
... | 23.352941 | 76 | 0.639798 |
1cc5575c32ceee0e75e5a8a15ba03eb4bea54de6 | 1,783 | exs | Elixir | apps/asf_bo_web/test/asf_web/controllers/user_registration_controller_test.exs | LazarRistic/asf | 2c557f06839a129b35174142c91f60696be2fa89 | [
"MIT"
] | null | null | null | apps/asf_bo_web/test/asf_web/controllers/user_registration_controller_test.exs | LazarRistic/asf | 2c557f06839a129b35174142c91f60696be2fa89 | [
"MIT"
] | null | null | null | apps/asf_bo_web/test/asf_web/controllers/user_registration_controller_test.exs | LazarRistic/asf | 2c557f06839a129b35174142c91f60696be2fa89 | [
"MIT"
] | null | null | null | defmodule AsfBOWeb.UserRegistrationControllerTest do
use AsfBOWeb.ConnCase, async: true
import Asf.AccountsFixtures
describe "GET /users/register" do
test "renders registration page", %{conn: conn} do
conn = get(conn, Routes.user_registration_path(conn, :new))
response = html_response(conn, 200)... | 32.418182 | 98 | 0.624229 |
1cc569ec8fd93b08a0bed71400f0c9c1918d86f9 | 459 | ex | Elixir | system3/lib/beb.ex | mihaivanea/broadcast_algorithms | 124a93791c0589e4f56088fe98b0a3469b3d90c7 | [
"MIT"
] | null | null | null | system3/lib/beb.ex | mihaivanea/broadcast_algorithms | 124a93791c0589e4f56088fe98b0a3469b3d90c7 | [
"MIT"
] | null | null | null | system3/lib/beb.ex | mihaivanea/broadcast_algorithms | 124a93791c0589e4f56088fe98b0a3469b3d90c7 | [
"MIT"
] | null | null | null | # Mihail Vanea (mv1315)
defmodule BEB do
def start() do
receive do
{:bind, pl, app, neighbours} -> next(pl, app, neighbours)
end
end
defp next(pl, app, neighbours) do
receive do
{:broadcast, message, from} ->
for n <- neighbours, do:
send(pl, {:beb_broadcast, n, messa... | 20.863636 | 63 | 0.586057 |
1cc57f005f35b2a712a4fb23b3a7ee92be7b991a | 1,181 | ex | Elixir | lib/camino_challenge/contratos/entities/partes_contrato.ex | kadmohardy/camino_challenge | 53117f763c0a51b0825cac18b799b7d772781671 | [
"MIT"
] | null | null | null | lib/camino_challenge/contratos/entities/partes_contrato.ex | kadmohardy/camino_challenge | 53117f763c0a51b0825cac18b799b7d772781671 | [
"MIT"
] | null | null | null | lib/camino_challenge/contratos/entities/partes_contrato.ex | kadmohardy/camino_challenge | 53117f763c0a51b0825cac18b799b7d772781671 | [
"MIT"
] | null | null | null | defmodule CaminoChallenge.Contratos.Entities.PartesContrato do
@moduledoc """
Module relativo a entidade de PartesContrato que é representa uma ligação
entre um contrato e uma pessoa.
"""
use Ecto.Schema
import Ecto.Changeset
alias CaminoChallenge.Contratos.Entities.Contrato
alias CaminoChallenge.... | 31.078947 | 81 | 0.740898 |
1cc5838f766a99561dea294fbaf97eca13453778 | 1,434 | exs | Elixir | apps/ewallet/mix.exs | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | null | null | null | apps/ewallet/mix.exs | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | null | null | null | apps/ewallet/mix.exs | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | null | null | null | defmodule EWallet.Mixfile do
use Mix.Project
def project do
[
app: :ewallet,
version: "0.1.0-beta",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixir: "~> 1.5",
elixirc_paths: elixirc_p... | 26.072727 | 59 | 0.561367 |
1cc5aef7f816090e09695b1c40431c47b99ebd76 | 151 | ex | Elixir | lib/metro_cdmx_api_web/controllers/page_controller.ex | erickbarcenas/metro_cdmx_api | 6a598fe0b0e8a2bb999ea6c517053f902f16662b | [
"MIT"
] | null | null | null | lib/metro_cdmx_api_web/controllers/page_controller.ex | erickbarcenas/metro_cdmx_api | 6a598fe0b0e8a2bb999ea6c517053f902f16662b | [
"MIT"
] | null | null | null | lib/metro_cdmx_api_web/controllers/page_controller.ex | erickbarcenas/metro_cdmx_api | 6a598fe0b0e8a2bb999ea6c517053f902f16662b | [
"MIT"
] | null | null | null | defmodule MetroCdmxApiWeb.PageController do
use MetroCdmxApiWeb, :controller
def index(conn, _params) do
render(conn, "index.html")
end
end
| 18.875 | 43 | 0.754967 |
1cc5cec56b4d22b1bb8ec0aef5030aedb2bf4735 | 236 | exs | Elixir | test/cforum_web/controllers/forum_controller_test.exs | campingrider/cforum_ex | cf27684c47d6dc26c9c37a946f1c729a79d27c70 | [
"MIT"
] | 16 | 2019-04-04T06:33:33.000Z | 2021-08-16T19:34:31.000Z | test/cforum_web/controllers/forum_controller_test.exs | campingrider/cforum_ex | cf27684c47d6dc26c9c37a946f1c729a79d27c70 | [
"MIT"
] | 294 | 2019-02-10T11:10:27.000Z | 2022-03-30T04:52:53.000Z | test/cforum_web/controllers/forum_controller_test.exs | campingrider/cforum_ex | cf27684c47d6dc26c9c37a946f1c729a79d27c70 | [
"MIT"
] | 10 | 2019-02-10T10:39:24.000Z | 2021-07-06T11:46:05.000Z | defmodule CforumWeb.ForumControllerTest do
use CforumWeb.ConnCase
test "lists forums on index", %{conn: conn} do
conn = get(conn, Path.root_path(conn, :index))
assert html_response(conn, 200) =~ gettext("Forums")
end
end
| 26.222222 | 56 | 0.716102 |
1cc5dc7066f3c158117df81c1a276b132fd22d91 | 2,466 | ex | Elixir | lib/db_connection/backoff.ex | khattori/db_connection | fb82de035522762e4df804e48750ee1f977aec0d | [
"Apache-2.0"
] | 227 | 2016-06-16T13:56:02.000Z | 2022-03-09T23:03:58.000Z | deps/db_connection/lib/db_connection/backoff.ex | rwtrecs/rocketseat-nlw5-inmana | 8ce8bc32e0bdd005c423394bb163945747b557e2 | [
"MIT"
] | 198 | 2016-06-20T08:08:15.000Z | 2022-03-06T17:54:37.000Z | deps/db_connection/lib/db_connection/backoff.ex | adrianomota/blog | ef3b2d2ed54f038368ead8234d76c18983caa75b | [
"MIT"
] | 110 | 2016-06-20T03:50:39.000Z | 2022-03-03T20:53:01.000Z | defmodule DBConnection.Backoff do
@moduledoc false
@compile :nowarn_deprecated_function
alias DBConnection.Backoff
@default_type :rand_exp
@min 1_000
@max 30_000
defstruct [:type, :min, :max, :state]
def new(opts) do
case Keyword.get(opts, :backoff_type, @default_type) do
:stop ->
... | 25.42268 | 78 | 0.603406 |
1cc5ea55d7069a1d514366be90627ead476907f7 | 2,753 | ex | Elixir | clients/container/lib/google_api/container/v1/model/set_network_policy_request.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/container/lib/google_api/container/v1/model/set_network_policy_request.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/container/lib/google_api/container/v1/model/set_network_policy_request.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 41.712121 | 161 | 0.714493 |
1cc608b722c9ae6bafb69ff4ec8f1f3877e63e93 | 2,731 | exs | Elixir | test/wallaby/selenium_test.exs | bobwaycott/wallaby | b25e6937f007f6e56be1b7b6a62591db5ac5a240 | [
"MIT"
] | 926 | 2016-03-28T17:01:54.000Z | 2019-11-05T11:59:58.000Z | test/wallaby/selenium_test.exs | marcandre/wallaby | d351c46f1a272bbcf8333c8327d154be3bd12c5c | [
"MIT"
] | 377 | 2016-03-17T00:35:56.000Z | 2019-11-03T07:15:24.000Z | test/wallaby/selenium_test.exs | marcandre/wallaby | d351c46f1a272bbcf8333c8327d154be3bd12c5c | [
"MIT"
] | 144 | 2016-03-29T15:28:28.000Z | 2019-10-31T00:48:42.000Z | defmodule Wallaby.SeleniumTest do
use Wallaby.HttpClientCase, async: true
alias Wallaby.Selenium
alias Wallaby.Session
alias Wallaby.TestSupport.JSONWireProtocolResponses
describe "start_session/1" do
test "starts a selenium session with remote_url", %{bypass: bypass} do
remote_url = bypass_url(by... | 29.365591 | 92 | 0.6342 |
1cc65d13c716e8708a40a03c66d2c9125183991f | 2,155 | ex | Elixir | clients/language/lib/google_api/language/v1/model/analyze_sentiment_response.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/language/lib/google_api/language/v1/model/analyze_sentiment_response.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/language/lib/google_api/language/v1/model/analyze_sentiment_response.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... | 39.907407 | 240 | 0.749884 |
1cc675aa3ded67417124148bc510795176f927e0 | 606 | ex | Elixir | lib/level_web/views/form_helpers.ex | mindriot101/level | 0a2cbae151869c2d9b79b3bfb388f5d00739ae12 | [
"Apache-2.0"
] | 928 | 2018-04-03T16:18:11.000Z | 2019-09-09T17:59:55.000Z | lib/level_web/views/form_helpers.ex | mindriot101/level | 0a2cbae151869c2d9b79b3bfb388f5d00739ae12 | [
"Apache-2.0"
] | 74 | 2018-04-03T00:46:50.000Z | 2019-03-10T18:57:27.000Z | lib/level_web/views/form_helpers.ex | mindriot101/level | 0a2cbae151869c2d9b79b3bfb388f5d00739ae12 | [
"Apache-2.0"
] | 89 | 2018-04-03T17:33:20.000Z | 2019-08-19T03:40:20.000Z | defmodule LevelWeb.FormHelpers do
@moduledoc """
Helper functions for generating form markup.
"""
@doc """
Generates the list of classes for a form input.
If there are errors for the given field, the input will be outlined in red.
"""
def input_classes(form, field) do
if form.errors[field] do
... | 24.24 | 77 | 0.674917 |
1cc68cf90bed25b7a04e3efb8026f8b7b187130e | 4,043 | ex | Elixir | lib/mongo/protocol/utils.ex | activeprospect/mongodb | 6bfd814480c3b4eaff505e1c8791d219b8071acc | [
"Apache-2.0"
] | 1 | 2019-01-24T09:02:56.000Z | 2019-01-24T09:02:56.000Z | lib/mongo/protocol/utils.ex | yatender-oktalk/mongodb | 3dd14b9eeff769aee315ad07e050f79501fbad1c | [
"Apache-2.0"
] | 1 | 2021-09-23T18:21:31.000Z | 2021-09-28T14:39:42.000Z | lib/mongo/protocol/utils.ex | activeprospect/mongodb | 6bfd814480c3b4eaff505e1c8791d219b8071acc | [
"Apache-2.0"
] | null | null | null | defmodule Mongo.Protocol.Utils do
@moduledoc false
import Kernel, except: [send: 2]
import Mongo.Messages
def message(id, ops, s) when is_list(ops) do
with :ok <- send(ops, s),
{:ok, ^id, reply} <- recv(s),
do: {:ok, reply}
end
def message(id, op, s) do
with :ok <- send(id, op, s)... | 30.398496 | 106 | 0.564432 |
1cc6bb63b8624e1fdcda92d7d0484c5f530a5cde | 1,817 | ex | Elixir | clients/app_engine/lib/google_api/app_engine/v1/model/network_utilization.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/app_engine/lib/google_api/app_engine/v1/model/network_utilization.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/app_engine/lib/google_api/app_engine/v1/model/network_utilization.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | 1 | 2018-07-28T20:50:50.000Z | 2018-07-28T20:50:50.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 34.942308 | 102 | 0.763897 |
1cc6bf044657762e1c9ffcad7ccff54d5cccd407 | 1,504 | ex | Elixir | apps/gitgud/lib/gitgud/repo_supervisor.ex | EdmondFrank/gitgud | 1952c16130564357aa6f23e35f48f19e3a50d4dd | [
"MIT"
] | 449 | 2018-03-06T01:05:55.000Z | 2022-03-23T21:03:56.000Z | apps/gitgud/lib/gitgud/repo_supervisor.ex | EdmondFrank/gitgud | 1952c16130564357aa6f23e35f48f19e3a50d4dd | [
"MIT"
] | 69 | 2018-03-06T09:26:41.000Z | 2022-03-21T22:43:09.000Z | apps/gitgud/lib/gitgud/repo_supervisor.ex | EdmondFrank/gitgud | 1952c16130564357aa6f23e35f48f19e3a50d4dd | [
"MIT"
] | 41 | 2018-03-06T01:06:07.000Z | 2021-11-21T17:55:04.000Z | defmodule GitGud.RepoSupervisor do
@moduledoc """
Supervisor for dealing with repository processes.
"""
use Supervisor
alias GitGud.RepoPool
alias GitGud.RepoStorage
@doc """
Starts the supervisor as part of a supervision tree.
"""
@spec start_link(Supervisor.option | Supervisor.init_option) :: Su... | 25.491525 | 88 | 0.637633 |
1cc6d0620352b9da85dfb765ea91af2be8178304 | 600 | exs | Elixir | test/hergetto_web/live/page_live_test.exs | dusthijsvdh/hergetto | 87598d8023a68fdb23b0eeb7659f5c61113997c9 | [
"MIT"
] | 8 | 2021-03-07T16:24:05.000Z | 2022-02-28T02:36:35.000Z | test/hergetto_web/live/page_live_test.exs | dusthijsvdh/hergetto | 87598d8023a68fdb23b0eeb7659f5c61113997c9 | [
"MIT"
] | 126 | 2021-02-15T10:51:07.000Z | 2022-03-28T02:25:01.000Z | test/hergetto_web/live/page_live_test.exs | dusthijsvdh/hergetto | 87598d8023a68fdb23b0eeb7659f5c61113997c9 | [
"MIT"
] | null | null | null | defmodule HergettoWeb.PageLiveTest do
use HergettoWeb.ConnCase
import Phoenix.LiveViewTest
test "disconnected and connected render", %{conn: conn} do
{:ok, page_live, disconnected_html} = live(conn, "/")
assert disconnected_html =~ "Resources"
assert render(page_live) =~ "Resources"
end
test "re... | 35.294118 | 103 | 0.688333 |
1cc6f77822a982d915e1dac53980882e92c4f7d1 | 1,910 | ex | Elixir | example/lib/wizard_example/button.ex | paulanthonywilson/vintage_net_wizard | 338877f79b96e9ba1c2482260b95a1a44d7c66d8 | [
"Apache-2.0"
] | 50 | 2019-08-02T18:56:53.000Z | 2022-02-19T20:00:52.000Z | example/lib/wizard_example/button.ex | paulanthonywilson/vintage_net_wizard | 338877f79b96e9ba1c2482260b95a1a44d7c66d8 | [
"Apache-2.0"
] | 93 | 2019-06-21T02:36:09.000Z | 2022-03-21T09:47:27.000Z | example/lib/wizard_example/button.ex | paulanthonywilson/vintage_net_wizard | 338877f79b96e9ba1c2482260b95a1a44d7c66d8 | [
"Apache-2.0"
] | 14 | 2019-09-16T23:50:11.000Z | 2022-03-18T16:36:21.000Z | defmodule WizardExample.Button do
use GenServer
@moduledoc """
This GenServer starts the wizard if a button is depressed for long enough.
"""
alias Circuits.GPIO
@doc """
Start the button monitor
Pass an index to the GPIO that's connected to the button.
"""
@spec start_link(non_neg_integer()) ::... | 26.527778 | 93 | 0.663351 |
1cc701efc5d9032c794dcf9f248a0ac758dfb269 | 9,186 | exs | Elixir | apps/snitch_core/test/domain/shipping_calculator_test.exs | VeryBigThings/avia | 7ce5d5b244ae0dfddc30c09c17efe27f1718a4c9 | [
"MIT"
] | 1 | 2021-04-08T22:29:19.000Z | 2021-04-08T22:29:19.000Z | apps/snitch_core/test/domain/shipping_calculator_test.exs | VeryBigThings/avia | 7ce5d5b244ae0dfddc30c09c17efe27f1718a4c9 | [
"MIT"
] | null | null | null | apps/snitch_core/test/domain/shipping_calculator_test.exs | VeryBigThings/avia | 7ce5d5b244ae0dfddc30c09c17efe27f1718a4c9 | [
"MIT"
] | null | null | null | defmodule Snitch.Domain.ShippingCalculatorTest do
use ExUnit.Case, async: true
use Snitch.DataCase
import Snitch.Factory
alias Snitch.Data.Schema.Package
alias Snitch.Domain.ShippingCalculator
setup do
Application.put_env(:snitch_core, :defaults, currency: :USD)
end
setup :zones
setup :shipping... | 31.675862 | 96 | 0.63673 |
1cc71ae1b93298825aff57a24cf554e9291f4826 | 3,458 | ex | Elixir | lib/plaid/transactions.ex | degzhaus/plaid-elixir | b10557303276efc6d66063af9ed1b2db2444e06b | [
"MIT"
] | null | null | null | lib/plaid/transactions.ex | degzhaus/plaid-elixir | b10557303276efc6d66063af9ed1b2db2444e06b | [
"MIT"
] | null | null | null | lib/plaid/transactions.ex | degzhaus/plaid-elixir | b10557303276efc6d66063af9ed1b2db2444e06b | [
"MIT"
] | null | null | null | defmodule Plaid.Transactions do
@moduledoc """
Functions for Plaid `transactions` endpoint.
"""
import Plaid, only: [make_request_with_cred: 4, get_cred: 0]
alias Plaid.Utils
defstruct accounts: [], item: nil, total_transactions: nil, transactions: [], request_id: nil
@type t :: %__MODULE__{
... | 27.228346 | 95 | 0.530943 |
1cc72f10c01334d1202a5a827d68ccda0a348e19 | 893 | exs | Elixir | .check.exs | qworks-io/rabbitex | 3359fc573b8e8e60cdd2cc03b6ebc2bdcc8a3d70 | [
"MIT"
] | 29 | 2020-05-02T18:25:31.000Z | 2021-02-16T19:43:39.000Z | .check.exs | qworks-io/rabbit_ex_mq | 3359fc573b8e8e60cdd2cc03b6ebc2bdcc8a3d70 | [
"MIT"
] | 43 | 2020-04-30T16:34:46.000Z | 2021-07-26T06:22:43.000Z | .check.exs | qworks-io/rabbit_ex_mq | 3359fc573b8e8e60cdd2cc03b6ebc2bdcc8a3d70 | [
"MIT"
] | 3 | 2020-05-03T15:47:16.000Z | 2021-04-05T05:05:47.000Z | [
## all available options with default values (see `mix check` docs for description)
# parallel: true,
# skipped: true,
## list of tools (see `mix check` docs for defaults)
tools: [
## curated tools may be disabled (e.g. the check for compilation warnings)
# {:compiler, false},
{:sobelow, false}... | 35.72 | 91 | 0.634938 |
1cc76b3e2652f1d068138e8528f20dddbfb4c64e | 236 | exs | Elixir | priv/repo/migrations/20200812040021_add_parent_field_in_person.exs | calvin-kargo/fictitious | a37cb7db2370d136ff59c8072108456da9c757c4 | [
"MIT"
] | 18 | 2020-05-26T12:22:51.000Z | 2021-12-18T15:34:48.000Z | priv/repo/migrations/20200812040021_add_parent_field_in_person.exs | calvin-kargo/fictitious | a37cb7db2370d136ff59c8072108456da9c757c4 | [
"MIT"
] | 4 | 2020-09-05T07:41:08.000Z | 2021-07-28T03:22:36.000Z | priv/repo/migrations/20200812040021_add_parent_field_in_person.exs | calvin-kargo/fictitious | a37cb7db2370d136ff59c8072108456da9c757c4 | [
"MIT"
] | 4 | 2020-08-12T03:19:28.000Z | 2021-06-28T04:53:20.000Z | defmodule Fictitious.Repo.Migrations.AddParentFieldInPerson do
use Ecto.Migration
def change do
alter table(:persons) do
add :parent_id, references(:persons, column: :id, type: :id, on_delete: :nothing)
end
end
end
| 23.6 | 87 | 0.724576 |
1cc7754cfa07bf0c14e4566f9bfd917adbedc49f | 856 | ex | Elixir | lib/brewing_stand/dummy_client.ex | Ovyerus/brewing-stand | a631d5e90485b959525e3a79b941f7aaa86b3fdd | [
"MIT"
] | 14 | 2021-03-28T10:27:50.000Z | 2021-04-27T10:14:07.000Z | lib/brewing_stand/dummy_client.ex | Ovyerus/brewing-stand | a631d5e90485b959525e3a79b941f7aaa86b3fdd | [
"MIT"
] | null | null | null | lib/brewing_stand/dummy_client.ex | Ovyerus/brewing-stand | a631d5e90485b959525e3a79b941f7aaa86b3fdd | [
"MIT"
] | null | null | null | defmodule BrewingStand.DummyClient do
require Logger
alias BrewingStand.DummyClient.{Level, PacketReader}
import BrewingStand.Util
def start do
Level.init()
case :gen_tcp.connect({127, 0, 0, 1}, 25565, [:list, :inet, packet: :raw, active: false]) do
{:ok, socket} ->
Logger.info("Connect... | 23.135135 | 96 | 0.626168 |
1cc77a9082a8458556a963105dcbad289d7f6194 | 1,922 | exs | Elixir | mix.exs | rayrrr/fameliphotos | cc928abdc6d761d76113067432e9d6d0fcb2507b | [
"MIT"
] | null | null | null | mix.exs | rayrrr/fameliphotos | cc928abdc6d761d76113067432e9d6d0fcb2507b | [
"MIT"
] | null | null | null | mix.exs | rayrrr/fameliphotos | cc928abdc6d761d76113067432e9d6d0fcb2507b | [
"MIT"
] | null | null | null | defmodule PhotoGallery.MixProject do
use Mix.Project
def project do
[
app: :photo_gallery,
version: "0.1.0",
elixir: "~> 1.5",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
start_permanent: Mix.env() == :prod,
aliases: ali... | 26.694444 | 79 | 0.546306 |
1cc782de2cdbddecdf0e3fb573bf2aac708bdd69 | 283 | ex | Elixir | lib/flea/Variable.ex | davidgrupp/Flea | a15bb7d4b121b08155862b390dfe1626bbdc5840 | [
"Apache-2.0"
] | null | null | null | lib/flea/Variable.ex | davidgrupp/Flea | a15bb7d4b121b08155862b390dfe1626bbdc5840 | [
"Apache-2.0"
] | null | null | null | lib/flea/Variable.ex | davidgrupp/Flea | a15bb7d4b121b08155862b390dfe1626bbdc5840 | [
"Apache-2.0"
] | null | null | null | defmodule Flea.Variable do
defstruct name: nil, memfuncs: HashDict.new
def init(name) do
%Flea.Variable { name: name }
end
def add_func(var, name, memfunc) do
memfuncs = Dict.put(var.memfuncs, name, memfunc)
Map.put(var, :memfuncs, memfuncs )
end
end | 21.769231 | 53 | 0.667845 |
1cc7883e608aa1b7cda3af15261c3976b24e6cbc | 1,082 | exs | Elixir | test/type/inspect/maps_test.exs | kianmeng/mavis | 6ba154efdfadcce1aca92ac735dadb209380c25b | [
"MIT"
] | null | null | null | test/type/inspect/maps_test.exs | kianmeng/mavis | 6ba154efdfadcce1aca92ac735dadb209380c25b | [
"MIT"
] | null | null | null | test/type/inspect/maps_test.exs | kianmeng/mavis | 6ba154efdfadcce1aca92ac735dadb209380c25b | [
"MIT"
] | null | null | null | defmodule TypeTest.Type.Inspect.MapsTest do
use ExUnit.Case, async: true
import TypeTest.InspectCase
@moduletag :inspect
import Type, only: :macros
alias Type.Map
@source TypeTest.TypeExample.Maps
test "empty map literal" do
assert "%{}" == inspect_type(@source, :empty_map_type)
end
test "th... | 25.162791 | 93 | 0.676525 |
1cc7951781a5fbe04630c208b6be0b64fbbd6a72 | 586 | ex | Elixir | exercises/practice/go-counting/lib/go_counting.ex | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 343 | 2017-06-22T16:28:28.000Z | 2022-03-25T21:33:32.000Z | exercises/practice/go-counting/lib/go_counting.ex | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 583 | 2017-06-19T10:48:40.000Z | 2022-03-28T21:43:12.000Z | exercises/practice/go-counting/lib/go_counting.ex | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 228 | 2017-07-05T07:09:32.000Z | 2022-03-27T08:59:08.000Z | defmodule GoCounting do
@type position :: {integer, integer}
@type owner :: %{owner: atom, territory: [position]}
@type territories :: %{white: [position], black: [position], none: [position]}
@doc """
Return the owner and territory around a position
"""
@spec territory(board :: String.t(), position :: p... | 27.904762 | 80 | 0.638225 |
1cc79a065c586349f94e0f60a835f7465bef7058 | 9,028 | ex | Elixir | lib/oli/delivery/attempts/page_lifecycle/hierarchy.ex | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | 1 | 2022-03-17T20:35:47.000Z | 2022-03-17T20:35:47.000Z | lib/oli/delivery/attempts/page_lifecycle/hierarchy.ex | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | 9 | 2021-11-02T16:52:09.000Z | 2022-03-25T15:14:01.000Z | lib/oli/delivery/attempts/page_lifecycle/hierarchy.ex | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | null | null | null | defmodule Oli.Delivery.Attempts.PageLifecycle.Hierarchy do
import Ecto.Query, warn: false
require Logger
alias Oli.Repo
alias Oli.Delivery.Attempts.Core.{
PartAttempt,
ActivityAttempt
}
import Oli.Delivery.Attempts.Core
alias Oli.Activities.Realizer.Query.Source
alias Oli.Resources.Revision
... | 33.686567 | 158 | 0.661498 |
1cc7eb2d73f6f262ebec355b60a2954e74f44166 | 6,802 | exs | Elixir | .credo.exs | hippware/loner | 7f7831b65bb9a2e5e63540f877bbb0b1243b3885 | [
"MIT"
] | 1 | 2020-08-18T15:00:51.000Z | 2020-08-18T15:00:51.000Z | .credo.exs | hippware/loner | 7f7831b65bb9a2e5e63540f877bbb0b1243b3885 | [
"MIT"
] | null | null | null | .credo.exs | hippware/loner | 7f7831b65bb9a2e5e63540f877bbb0b1243b3885 | [
"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 ... | 38.429379 | 88 | 0.608792 |
1cc804a993a684eb2e3cf1e363707325481ef5d0 | 5,772 | ex | Elixir | lib/phoenix/router/route.ex | misfo/phoenix | 04464429d9b958e331b2ffe0f0f5926690ab3b56 | [
"MIT"
] | 1 | 2021-03-14T17:50:24.000Z | 2021-03-14T17:50:24.000Z | lib/phoenix/router/route.ex | misfo/phoenix | 04464429d9b958e331b2ffe0f0f5926690ab3b56 | [
"MIT"
] | null | null | null | lib/phoenix/router/route.ex | misfo/phoenix | 04464429d9b958e331b2ffe0f0f5926690ab3b56 | [
"MIT"
] | 2 | 2020-08-02T04:00:17.000Z | 2020-10-07T16:07:37.000Z | defmodule Phoenix.Router.Route do
# This module defines the Route struct that is used
# throughout Phoenix's router. This struct is private
# as it contains internal routing information.
@moduledoc false
alias Phoenix.Router.Route
@doc """
The `Phoenix.Router.Route` struct. It stores:
* :verb - the... | 32.795455 | 127 | 0.637561 |
1cc814a249c750e4dfc96242f870d74d8c39753c | 3,593 | ex | Elixir | lib/coxir/gateway.ex | jano017/coxir | 81e89e0113a9219685be2b61af7d17c5fcd9e5fb | [
"Apache-2.0"
] | null | null | null | lib/coxir/gateway.ex | jano017/coxir | 81e89e0113a9219685be2b61af7d17c5fcd9e5fb | [
"Apache-2.0"
] | null | null | null | lib/coxir/gateway.ex | jano017/coxir | 81e89e0113a9219685be2b61af7d17c5fcd9e5fb | [
"Apache-2.0"
] | null | null | null | defmodule Coxir.Gateway do
defmodule Worker do
require Logger
use WebSockex
defmodule State do
defstruct [
:token,
heartbeat_interval: 5000,
sequence: 0,
id: 0,
shards: 1
]
end
def start_link(url, state) do
WebSockex.start_link(url, __MOD... | 30.193277 | 96 | 0.527971 |
1cc82292005c7bef6a17862468c5d3ed0664e29a | 540 | exs | Elixir | priv/repo/migrations/20170406153416_tags_associations.exs | sahilpaudel/AfterGlow | 0859ec14b47c8c5704cc8e5cba86d39aa258fff5 | [
"MIT"
] | null | null | null | priv/repo/migrations/20170406153416_tags_associations.exs | sahilpaudel/AfterGlow | 0859ec14b47c8c5704cc8e5cba86d39aa258fff5 | [
"MIT"
] | null | null | null | priv/repo/migrations/20170406153416_tags_associations.exs | sahilpaudel/AfterGlow | 0859ec14b47c8c5704cc8e5cba86d39aa258fff5 | [
"MIT"
] | null | null | null | defmodule AfterGlow.Repo.Migrations.TagsAssociations do
use Ecto.Migration
def change do
create table(:tag_questions) do
add :tag_id, references(:tags)
add :question_id, references(:questions)
timestamps()
end
create table(:tag_dashboards) do
add :tag_id, references(:tags)
... | 24.545455 | 66 | 0.692593 |
1cc8389c2dbdfa27db6ede9860b49cdd8f01f79b | 94 | ex | Elixir | lib/chirper_web/views/relationship_view.ex | PranavPuranik/project_twitter | 0b660e8749488a632d6f64212205757254caaec3 | [
"MIT"
] | null | null | null | lib/chirper_web/views/relationship_view.ex | PranavPuranik/project_twitter | 0b660e8749488a632d6f64212205757254caaec3 | [
"MIT"
] | 1 | 2021-03-10T07:27:11.000Z | 2021-03-10T07:27:11.000Z | lib/chirper_web/views/relationship_view.ex | PranavPuranik/project_twitter | 0b660e8749488a632d6f64212205757254caaec3 | [
"MIT"
] | null | null | null | defmodule ChirperWeb.RelationshipView do
use ChirperWeb, :view
alias Chirper.Accounts
end | 18.8 | 40 | 0.819149 |
1cc883e06a1b88411a6183c790c20e9f2ee456da | 57 | ex | Elixir | web/views/layout_view.ex | leifg/byzal | 64b688de4c597808ee82a8222e7c3fd7ce4c295b | [
"MIT"
] | null | null | null | web/views/layout_view.ex | leifg/byzal | 64b688de4c597808ee82a8222e7c3fd7ce4c295b | [
"MIT"
] | null | null | null | web/views/layout_view.ex | leifg/byzal | 64b688de4c597808ee82a8222e7c3fd7ce4c295b | [
"MIT"
] | null | null | null | defmodule Byzal.LayoutView do
use Byzal.Web, :view
end
| 14.25 | 29 | 0.77193 |
1cc88621d357174a941d91559d16865c0b0917be | 1,664 | exs | Elixir | test/run_workflows/simple_workflow_test.exs | nipierre/ex_step_flow | 4345ee57bd4e5eb79138df68d10579ba1b9ec6a1 | [
"MIT"
] | null | null | null | test/run_workflows/simple_workflow_test.exs | nipierre/ex_step_flow | 4345ee57bd4e5eb79138df68d10579ba1b9ec6a1 | [
"MIT"
] | null | null | null | test/run_workflows/simple_workflow_test.exs | nipierre/ex_step_flow | 4345ee57bd4e5eb79138df68d10579ba1b9ec6a1 | [
"MIT"
] | null | null | null | defmodule StepFlow.RunWorkflows.SimpleWorkflowTest do
use ExUnit.Case
use Plug.Test
alias Ecto.Adapters.SQL.Sandbox
alias StepFlow.Step
doctest StepFlow
setup do
# Explicitly get a connection before each test
:ok = Sandbox.checkout(StepFlow.Repo)
{_conn, channel} = StepFlow.HelpersTest.get_am... | 23.43662 | 76 | 0.579928 |
1cc8a2f2569a8854775430903163c401ec9b1b6a | 1,510 | ex | Elixir | clients/content/lib/google_api/content/v2/model/liasettings_request_gmb_access_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/content/lib/google_api/content/v2/model/liasettings_request_gmb_access_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/content/lib/google_api/content/v2/model/liasettings_request_gmb_access_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... | 32.12766 | 166 | 0.750331 |
1cc921ab3e9c889dafe3d3c9a3798b4ba9271216 | 182 | exs | Elixir | priv/repo/migrations/20170213140200_add_alert_emails_field_to_cameras.exs | mekongit/evercam_models | 7c36d52f2b47ffc89a3eaca65c2e353716fafacc | [
"MIT"
] | null | null | null | priv/repo/migrations/20170213140200_add_alert_emails_field_to_cameras.exs | mekongit/evercam_models | 7c36d52f2b47ffc89a3eaca65c2e353716fafacc | [
"MIT"
] | null | null | null | priv/repo/migrations/20170213140200_add_alert_emails_field_to_cameras.exs | mekongit/evercam_models | 7c36d52f2b47ffc89a3eaca65c2e353716fafacc | [
"MIT"
] | null | null | null | defmodule Evercam.Repo.Migrations.AddAlertEmailsFieldToCameras do
use Ecto.Migration
def change do
alter table(:cameras) do
add :alert_emails, :text
end
end
end
| 18.2 | 65 | 0.736264 |
1cc9247776e4eee90841e1c29cd970f5585fa837 | 199 | ex | Elixir | apps/rayyan_site/lib/rayyan_site_web/views/page_view.ex | boqolo/boqolo | ba9a2ebcf379f5056b3836756179b49163f91d72 | [
"BSD-3-Clause"
] | null | null | null | apps/rayyan_site/lib/rayyan_site_web/views/page_view.ex | boqolo/boqolo | ba9a2ebcf379f5056b3836756179b49163f91d72 | [
"BSD-3-Clause"
] | null | null | null | apps/rayyan_site/lib/rayyan_site_web/views/page_view.ex | boqolo/boqolo | ba9a2ebcf379f5056b3836756179b49163f91d72 | [
"BSD-3-Clause"
] | null | null | null | defmodule RayyanSiteWeb.PageView do
use RayyanSiteWeb, :view
def recent_posts() do
Writings.list_entries
|> Enum.take(5)
end
def all_posts() do
Writings.list_entries
end
end
| 14.214286 | 35 | 0.708543 |
1cc93961191bfaa9489a9574ea80845ed6768ed5 | 1,324 | ex | Elixir | lib/virgo_web/controllers/judgement_type_controller.ex | GinShio/AstraeaVirgo | 92804cbae01f67e21b8f421009fa37fddc9054e1 | [
"BSD-2-Clause"
] | null | null | null | lib/virgo_web/controllers/judgement_type_controller.ex | GinShio/AstraeaVirgo | 92804cbae01f67e21b8f421009fa37fddc9054e1 | [
"BSD-2-Clause"
] | null | null | null | lib/virgo_web/controllers/judgement_type_controller.ex | GinShio/AstraeaVirgo | 92804cbae01f67e21b8f421009fa37fddc9054e1 | [
"BSD-2-Clause"
] | null | null | null | defmodule AstraeaVirgoWeb.JudgementTypeController do
use AstraeaVirgoWeb, :controller
@moduledoc """
Impl Judgement Type API:
- `GET /api/judgement-types`: get judgement types info
- `GET /api/judgement-types/<judgement_type_id>` get the specified judgement type info
"""
@doc """
Get all judgement... | 29.422222 | 112 | 0.655589 |
1cc93ee732f3e85e75dbdc4c1624cda01676a8fb | 62 | ex | Elixir | test/support/cast.ex | depressed-pho/xema | 56de4a5d3b3f37827c70f6052f895c59feb0bb51 | [
"MIT"
] | 49 | 2018-06-05T09:42:19.000Z | 2022-02-15T12:50:51.000Z | test/support/cast.ex | depressed-pho/xema | 56de4a5d3b3f37827c70f6052f895c59feb0bb51 | [
"MIT"
] | 152 | 2017-06-11T13:43:06.000Z | 2022-01-09T17:13:45.000Z | test/support/cast.ex | depressed-pho/xema | 56de4a5d3b3f37827c70f6052f895c59feb0bb51 | [
"MIT"
] | 6 | 2019-05-31T05:41:47.000Z | 2021-12-14T08:09:36.000Z | defmodule Cast do
@moduledoc File.read!("docs/cast.md")
end
| 15.5 | 39 | 0.725806 |
1cc9459eb62661a47c4dc1ad27407a15dc36e889 | 1,722 | ex | Elixir | lib/slack/lookups.ex | nmohoric/Elixir-Slack | da6df7612cc0a8c56bc29498a8c636fa6f095d88 | [
"MIT"
] | null | null | null | lib/slack/lookups.ex | nmohoric/Elixir-Slack | da6df7612cc0a8c56bc29498a8c636fa6f095d88 | [
"MIT"
] | null | null | null | lib/slack/lookups.ex | nmohoric/Elixir-Slack | da6df7612cc0a8c56bc29498a8c636fa6f095d88 | [
"MIT"
] | 3 | 2017-08-16T23:02:52.000Z | 2020-09-23T13:31:35.000Z | defmodule Slack.Lookups do
@doc ~S"""
Turns a string like `"@USER_NAME"` into the ID that Slack understands (`"U…"`).
"""
def lookup_user_id("@" <> user_name, slack) do
slack.users
|> Map.values
|> Enum.find(%{ }, fn user -> user.name == user_name end)
|> Map.get(:id)
end
@doc ~S"""
Turns... | 29.689655 | 81 | 0.631243 |
1cc94857c2bdbdde23221f71a4c620a3ae3b1c16 | 1,276 | ex | Elixir | lib/mix/exenv.master_key.ex | nsweeting/exenv | 88a9863fd055aa4d99ab9bf416c0b35bc86eadac | [
"MIT"
] | 35 | 2019-03-10T05:16:16.000Z | 2021-12-05T00:12:55.000Z | lib/mix/exenv.master_key.ex | nsweeting/exenv | 88a9863fd055aa4d99ab9bf416c0b35bc86eadac | [
"MIT"
] | 2 | 2019-03-08T17:01:50.000Z | 2019-03-14T09:20:22.000Z | lib/mix/exenv.master_key.ex | nsweeting/exenv | 88a9863fd055aa4d99ab9bf416c0b35bc86eadac | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.Exenv.MasterKey do
@shortdoc "Generates a master.key file within the given path"
@moduledoc """
Generates a master key file at the given path.
The generated file will be added to your `.gitignore` file.
mix exenv.master_key /config/master.key
"""
use Mix.Task
alias Exenv.Enc... | 23.2 | 87 | 0.647335 |
1cc9789dab39276b24a97613bd82aecc09352d67 | 444 | exs | Elixir | elixir/sum-of-multiples/sum_of_multiples.exs | macborowy/exercism | c5d45e074e81b946a82a340b2730e0d2732b7e0a | [
"MIT"
] | null | null | null | elixir/sum-of-multiples/sum_of_multiples.exs | macborowy/exercism | c5d45e074e81b946a82a340b2730e0d2732b7e0a | [
"MIT"
] | null | null | null | elixir/sum-of-multiples/sum_of_multiples.exs | macborowy/exercism | c5d45e074e81b946a82a340b2730e0d2732b7e0a | [
"MIT"
] | null | null | null | defmodule SumOfMultiples do
@doc """
Adds up all numbers from 1 to a given end number that are multiples of the factors provided.
"""
@spec to(non_neg_integer, [non_neg_integer]) :: non_neg_integer
def to(limit, factors) do
multiples(limit, factors)
|> List.flatten
|> Enum.uniq
|> Enum.sum
e... | 26.117647 | 94 | 0.655405 |
1cc980833818f18919aa37f20f4b06928f16d922 | 237 | exs | Elixir | .formatter.exs | am-kantox/lazy_for | 2b6882170bf9f2c3ef346aec595cb1cbe7850a36 | [
"MIT"
] | null | null | null | .formatter.exs | am-kantox/lazy_for | 2b6882170bf9f2c3ef346aec595cb1cbe7850a36 | [
"MIT"
] | 6 | 2019-09-17T15:45:43.000Z | 2019-09-18T12:34:09.000Z | .formatter.exs | am-kantox/lazy_for | 2b6882170bf9f2c3ef346aec595cb1cbe7850a36 | [
"MIT"
] | null | null | null | locals_without_parens = Enum.map(2..43, &{:stream, &1})
[
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"],
locals_without_parens: locals_without_parens,
export: [locals_without_parens: locals_without_parens]
]
| 29.625 | 70 | 0.704641 |
1cc9a0373dff71455706c3ac4b8991f5c083beaa | 2,420 | ex | Elixir | lib/chat_api/users/user.ex | xprazak2/papercups | 925e7c20ab868648e078a129e832856026c50424 | [
"MIT"
] | 1 | 2021-01-18T09:57:23.000Z | 2021-01-18T09:57:23.000Z | lib/chat_api/users/user.ex | xprazak2/papercups | 925e7c20ab868648e078a129e832856026c50424 | [
"MIT"
] | null | null | null | lib/chat_api/users/user.ex | xprazak2/papercups | 925e7c20ab868648e078a129e832856026c50424 | [
"MIT"
] | null | null | null | defmodule ChatApi.Users.User do
use Ecto.Schema
use Pow.Ecto.Schema
import Ecto.Changeset
alias ChatApi.Conversations.Conversation
alias ChatApi.Messages.Message
alias ChatApi.Accounts.Account
alias ChatApi.Users.{UserProfile, UserSettings}
schema "users" do
field(:email_confirmation_token, :strin... | 31.842105 | 96 | 0.71157 |
1cc9d075ef10bb7378c7bcaeaec3f18aa49860df | 1,226 | ex | Elixir | lib/satellite_web/router.ex | joshnuss/satellite-prototype | 9cf813d8b75efab9a8118f9fecb9ac6f70bd841a | [
"MIT"
] | null | null | null | lib/satellite_web/router.ex | joshnuss/satellite-prototype | 9cf813d8b75efab9a8118f9fecb9ac6f70bd841a | [
"MIT"
] | null | null | null | lib/satellite_web/router.ex | joshnuss/satellite-prototype | 9cf813d8b75efab9a8118f9fecb9ac6f70bd841a | [
"MIT"
] | null | null | null | defmodule SatelliteWeb.Router do
use SatelliteWeb, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
end
pipeline :api do
plug :accepts, ["json"]
end
scope "/", SatelliteWeb do
... | 26.085106 | 70 | 0.702284 |
1cc9f77f2b49d40f95350e5ae6cc3383ed4c265b | 9,301 | ex | Elixir | lib/ecto_mnesia/storage/migrator.ex | rudebono/ecto_mnesia | a2672ee25692d24570cefa6025ca73c8929566cb | [
"MIT"
] | 245 | 2016-10-22T14:43:36.000Z | 2022-02-28T03:46:27.000Z | lib/ecto_mnesia/storage/migrator.ex | KushanChamindu/ecto_mnesia | bc0fb46d210eb1be63bcc8f0383212f0633b8c52 | [
"MIT"
] | 80 | 2016-10-22T16:09:19.000Z | 2021-03-03T10:45:01.000Z | lib/ecto_mnesia/storage/migrator.ex | KushanChamindu/ecto_mnesia | bc0fb46d210eb1be63bcc8f0383212f0633b8c52 | [
"MIT"
] | 53 | 2016-12-03T14:23:05.000Z | 2021-07-01T01:55:22.000Z | defmodule EctoMnesia.Storage.Migrator do
@moduledoc """
This module implements `Ecto.Storage` behavior that is used by `Ecto.Migrations`.
"""
alias EctoMnesia.Table
alias :mnesia, as: Mnesia
@pk_table_name :id_seq
@doc false
# Tables
def execute(repo, {:create, %Ecto.Migration.Table{name: table, eng... | 30.495082 | 118 | 0.628212 |
1cca073d6248547145cf73a7216cb719f2d1995c | 2,922 | exs | Elixir | mix.exs | lexa62/hb | c6b2169ad3e5af546da3f7ad0d499f5d5d29d044 | [
"MIT"
] | null | null | null | mix.exs | lexa62/hb | c6b2169ad3e5af546da3f7ad0d499f5d5d29d044 | [
"MIT"
] | null | null | null | mix.exs | lexa62/hb | c6b2169ad3e5af546da3f7ad0d499f5d5d29d044 | [
"MIT"
] | null | null | null | defmodule Hb.Mixfile do
use Mix.Project
def project do
[app: :hb,
version: "1.0.0",
elixir: "~> 1.2",
description: "Hb release deb",
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix, :gettext] ++ Mix.compilers,
build_embedded: Mix.env == :prod,
start_permanent: Mix... | 30.757895 | 102 | 0.561944 |
1cca2b5372059a9ac452583c8c64412c1ce12815 | 3,866 | ex | Elixir | projects/api/lib/margaret_web/resolvers/publication_invitations.ex | strattadb/margaret | dde5d7b42f6d9b4d320069a0117136dae03b13b5 | [
"MIT"
] | 82 | 2017-11-06T01:00:55.000Z | 2020-12-09T10:35:29.000Z | projects/api/lib/margaret_web/resolvers/publication_invitations.ex | dbstratta/margaret | dde5d7b42f6d9b4d320069a0117136dae03b13b5 | [
"MIT"
] | 98 | 2017-11-06T22:57:32.000Z | 2020-07-03T04:46:39.000Z | projects/api/lib/margaret_web/resolvers/publication_invitations.ex | strattadb/margaret | dde5d7b42f6d9b4d320069a0117136dae03b13b5 | [
"MIT"
] | 10 | 2017-11-16T05:31:58.000Z | 2020-10-29T18:02:35.000Z | defmodule MargaretWeb.Resolvers.PublicationInvitations do
@moduledoc """
The Publication Invitation GraphQL resolvers.
"""
import Margaret.Helpers, only: [ok: 1]
alias MargaretWeb.Helpers
alias Margaret.{Accounts, Publications}
alias Accounts.User
alias Publications.PublicationInvitation
@doc """
... | 30.928 | 96 | 0.696586 |
1cca5e169354b138f69890aacbabcf87ccde5144 | 2,886 | ex | Elixir | clients/access_approval/lib/google_api/access_approval/v1/model/enrolled_service.ex | Contractbook/elixir-google-api | 342751041aaf8c2e7f76f9922cf24b9c5895802b | [
"Apache-2.0"
] | 1 | 2021-10-01T09:20:41.000Z | 2021-10-01T09:20:41.000Z | clients/access_approval/lib/google_api/access_approval/v1/model/enrolled_service.ex | Contractbook/elixir-google-api | 342751041aaf8c2e7f76f9922cf24b9c5895802b | [
"Apache-2.0"
] | null | null | null | clients/access_approval/lib/google_api/access_approval/v1/model/enrolled_service.ex | Contractbook/elixir-google-api | 342751041aaf8c2e7f76f9922cf24b9c5895802b | [
"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... | 57.72 | 1,330 | 0.752252 |
1cca614e7d9d86dde86c03d5c7002c45b3e00908 | 1,652 | ex | Elixir | lib/flickrex/parsers/auth.ex | christopheradams/flickrex | 67e3a507e128c55969aeda3802f6dacd94bb03c5 | [
"MIT"
] | 13 | 2017-04-02T10:55:10.000Z | 2022-03-02T02:55:40.000Z | lib/flickrex/parsers/auth.ex | christopheradams/flickrex | 67e3a507e128c55969aeda3802f6dacd94bb03c5 | [
"MIT"
] | null | null | null | lib/flickrex/parsers/auth.ex | christopheradams/flickrex | 67e3a507e128c55969aeda3802f6dacd94bb03c5 | [
"MIT"
] | 1 | 2021-01-31T17:47:27.000Z | 2021-01-31T17:47:27.000Z | defmodule Flickrex.Parsers.Auth do
@moduledoc false
alias Flickrex.Response
@type response :: {:ok, Response.t()} | {:error, term}
@spec parse_request_token(response) :: response
def parse_request_token({:ok, %{status_code: 200, body: body} = resp}) do
oauth_token = URI.decode_query(body, %{})
tok... | 25.8125 | 93 | 0.659201 |
1ccaa81d83577af1882933738e8507a67067ef3f | 3,761 | ex | Elixir | clients/double_click_bid_manager/lib/google_api/double_click_bid_manager/v1/model/query_metadata.ex | jechol/elixir-google-api | 0290b683dfc6491ca2ef755a80bc329378738d03 | [
"Apache-2.0"
] | null | null | null | clients/double_click_bid_manager/lib/google_api/double_click_bid_manager/v1/model/query_metadata.ex | jechol/elixir-google-api | 0290b683dfc6491ca2ef755a80bc329378738d03 | [
"Apache-2.0"
] | null | null | null | clients/double_click_bid_manager/lib/google_api/double_click_bid_manager/v1/model/query_metadata.ex | jechol/elixir-google-api | 0290b683dfc6491ca2ef755a80bc329378738d03 | [
"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... | 48.844156 | 375 | 0.701143 |
1ccaa897ab472938457027a6a459fdcca5d04a8b | 1,248 | exs | Elixir | mix.exs | twix14/elastic | 1e2c7a3fe7b28bfa6cc574b10fd7bc6dca3dadfa | [
"MIT"
] | null | null | null | mix.exs | twix14/elastic | 1e2c7a3fe7b28bfa6cc574b10fd7bc6dca3dadfa | [
"MIT"
] | null | null | null | mix.exs | twix14/elastic | 1e2c7a3fe7b28bfa6cc574b10fd7bc6dca3dadfa | [
"MIT"
] | null | null | null | defmodule Elastic.Mixfile do
use Mix.Project
@version "3.5.2"
def project do
[
app: :elastic,
version: @version,
elixir: "~> 1.5",
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
elixirc_paths: elixirc_paths(Mix.env()),
package: package(),
... | 23.111111 | 62 | 0.527244 |
1ccae2cd9a997eddab057e09d22bbc15a24c0788 | 920 | ex | Elixir | lib/griffin/lib/http.ex | craigspaeth/griffin | 44a59e08b119b4725369e90dc1398b9ec51173b7 | [
"MIT"
] | null | null | null | lib/griffin/lib/http.ex | craigspaeth/griffin | 44a59e08b119b4725369e90dc1398b9ec51173b7 | [
"MIT"
] | 2 | 2017-12-11T06:40:30.000Z | 2018-03-06T06:04:05.000Z | lib/griffin/lib/http.ex | craigspaeth/griffin | 44a59e08b119b4725369e90dc1398b9ec51173b7 | [
"MIT"
] | null | null | null | defmodule Griffin.HTTP do
@moduledoc """
Elixir(script) wrapper for a universal HTTP API
"""
import ExScript.Universal
def gql!(url, query) do
res = await(post!(url, body: query, headers: ["Content-Type": "application/graphql"]))
res.data
end
def post!(url, options) do
json =
if env?(... | 22.439024 | 91 | 0.554348 |
1ccaf67a42e3f4f946657cb4dc2c8d6235f00955 | 1,927 | ex | Elixir | clients/health_care/lib/google_api/health_care/v1beta1/model/list_dicom_stores_response.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/v1beta1/model/list_dicom_stores_response.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/v1beta1/model/list_dicom_stores_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... | 38.54 | 203 | 0.744681 |
1ccb1d9bbc8e7b575af3bcb8bcad7ea7c7d1471f | 411 | ex | Elixir | lib/events/adhoc.ex | feihong/event-announcer | b73d6f0c286b1101accb0898b16e658b68f9bb01 | [
"Apache-2.0"
] | null | null | null | lib/events/adhoc.ex | feihong/event-announcer | b73d6f0c286b1101accb0898b16e658b68f9bb01 | [
"Apache-2.0"
] | null | null | null | lib/events/adhoc.ex | feihong/event-announcer | b73d6f0c286b1101accb0898b16e658b68f9bb01 | [
"Apache-2.0"
] | null | null | null | defmodule Events.Adhoc do
@events_file "adhoc_events.json"
@keywords Application.fetch_env!(:events, :keywords)
@doc """
Fetch adhoc events from adhoc_events.json file.
"""
def fetch_all() do
if File.exists?(@events_file) do
@events_file
|> Events.Util.from_json_file()
|> Enum.map(fn ... | 22.833333 | 75 | 0.659367 |
1ccb3a50ba572d26c1cae31fde360662e0dc0277 | 1,233 | ex | Elixir | apps/admin_api/lib/admin_api/v1/channels/user_channel.ex | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 322 | 2018-02-28T07:38:44.000Z | 2020-05-27T23:09:55.000Z | apps/admin_api/lib/admin_api/v1/channels/user_channel.ex | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 643 | 2018-02-28T12:05:20.000Z | 2020-05-22T08:34:38.000Z | apps/admin_api/lib/admin_api/v1/channels/user_channel.ex | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 63 | 2018-02-28T10:57:06.000Z | 2020-05-27T23:10:38.000Z | # Copyright 2018-2019 OmiseGO Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 29.357143 | 86 | 0.673966 |
1ccb3ed39927062388c14566f0900ceda144c0ee | 388 | ex | Elixir | web/models/location.ex | colbydehart/MartaWhistle | 852d1aaecb1fe5705fdcaab30283870613f6a66f | [
"MIT"
] | null | null | null | web/models/location.ex | colbydehart/MartaWhistle | 852d1aaecb1fe5705fdcaab30283870613f6a66f | [
"MIT"
] | null | null | null | web/models/location.ex | colbydehart/MartaWhistle | 852d1aaecb1fe5705fdcaab30283870613f6a66f | [
"MIT"
] | null | null | null | defmodule TrainWhistle.Location do
use TrainWhistle.Web, :model
schema "locations" do
field :name, :string
field :lat, :float
field :long, :float
timestamps()
end
@doc """
Builds a changeset based on the `struct` and `params`.
"""
def changeset(struct, params \\ %{}) do
struct
|... | 18.47619 | 56 | 0.626289 |
1ccb5df116c5f9a50f237a3b7caa23b362743e2a | 3,689 | ex | Elixir | lib/livebook_web/endpoint.ex | aleDsz/livebook | 3ad817ac69b8459b684ff8d00c879ae7787b6dcc | [
"Apache-2.0"
] | null | null | null | lib/livebook_web/endpoint.ex | aleDsz/livebook | 3ad817ac69b8459b684ff8d00c879ae7787b6dcc | [
"Apache-2.0"
] | null | null | null | lib/livebook_web/endpoint.ex | aleDsz/livebook | 3ad817ac69b8459b684ff8d00c879ae7787b6dcc | [
"Apache-2.0"
] | null | null | null | defmodule LivebookWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :livebook
# 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: "_liveboo... | 29.277778 | 93 | 0.692057 |
1ccb67cd08312d7fb7757856db52bfb49180d508 | 404 | ex | Elixir | lib/matchmaker/matchmaker_supervisor.ex | spawnphile/garuda | f394e38fbbbcf89380cac4b331f21e3be0fd8518 | [
"MIT"
] | 4 | 2021-02-01T12:20:24.000Z | 2021-07-29T08:37:50.000Z | lib/matchmaker/matchmaker_supervisor.ex | spawnphile/garuda | f394e38fbbbcf89380cac4b331f21e3be0fd8518 | [
"MIT"
] | 2 | 2021-06-10T11:22:48.000Z | 2021-07-30T06:09:10.000Z | lib/matchmaker/matchmaker_supervisor.ex | spawnphile/garuda | f394e38fbbbcf89380cac4b331f21e3be0fd8518 | [
"MIT"
] | null | null | null | defmodule Garuda.Matchmaker.MatchmakerSupervisor do
@moduledoc false
# Supervises the core matchmaking process
use Supervisor
alias Garuda.MatchMaker.Matcher
def start_link(opts \\ []) do
Supervisor.start_link(__MODULE__, opts, name: __MODULE__)
end
@impl true
def init(_opts) do
children = [
... | 20.2 | 61 | 0.720297 |
1ccbe1471e079c73d17596e3bbb167c9c4d701b9 | 1,487 | ex | Elixir | lib/pluggy/models/group.ex | TE4-David-Sundqvist/Pro1-Docsify | b6857195508c1d6135f9084cc383e853468bf012 | [
"MIT"
] | null | null | null | lib/pluggy/models/group.ex | TE4-David-Sundqvist/Pro1-Docsify | b6857195508c1d6135f9084cc383e853468bf012 | [
"MIT"
] | null | null | null | lib/pluggy/models/group.ex | TE4-David-Sundqvist/Pro1-Docsify | b6857195508c1d6135f9084cc383e853468bf012 | [
"MIT"
] | null | null | null | defmodule Pluggy.Group do
defstruct(id: nil, name: "")
alias Pluggy.Group
alias Pluggy.Student
def get(id) do
Postgrex.query!(DB, "SELECT id, name FROM groups WHERE id = $1 LIMIT 1", [id],
pool: DBConnection.ConnectionPool
).rows
|> to_struct
end
def get_id(name) do
Postgrex.query!(... | 32.326087 | 131 | 0.672495 |
1ccbe2a04d4ec7b48c945634abe011eec5565d80 | 760 | ex | Elixir | test/support/live_case.ex | paulgoetze/adoptoposs | 1a143917ac5a192f12054fff4410a1ee18935353 | [
"MIT"
] | 120 | 2020-03-30T13:58:40.000Z | 2022-03-30T10:17:50.000Z | test/support/live_case.ex | paulgoetze/adoptoposs | 1a143917ac5a192f12054fff4410a1ee18935353 | [
"MIT"
] | 34 | 2020-04-01T23:11:59.000Z | 2022-03-13T08:14:37.000Z | test/support/live_case.ex | paulgoetze/adoptoposs | 1a143917ac5a192f12054fff4410a1ee18935353 | [
"MIT"
] | 16 | 2020-04-24T17:14:23.000Z | 2022-03-27T22:32:48.000Z | defmodule AdoptopossWeb.LiveCase do
@moduledoc """
This module defines the test case to be used by
tests that require setting up a live view.
Such tests rely on `AdoptopossWeb.ConnCase`,
`Phoenix.LiveViewTest` and also import other
functionality to make it easier to build common
data structures and query... | 28.148148 | 56 | 0.744737 |
1ccbe6c26dd3e92f2cc761ffd44b7b7bfa25d60a | 1,511 | ex | Elixir | apps/zones/lib/zone.ex | noisecapella/dotcom | d5ef869412102d2230fac3dcc216f01a29726227 | [
"MIT"
] | 42 | 2019-05-29T16:05:30.000Z | 2021-08-09T16:03:37.000Z | apps/zones/lib/zone.ex | noisecapella/dotcom | d5ef869412102d2230fac3dcc216f01a29726227 | [
"MIT"
] | 872 | 2019-05-29T17:55:50.000Z | 2022-03-30T09:28:43.000Z | apps/zones/lib/zone.ex | noisecapella/dotcom | d5ef869412102d2230fac3dcc216f01a29726227 | [
"MIT"
] | 12 | 2019-07-01T18:33:21.000Z | 2022-03-10T02:13:57.000Z | defmodule Zones.Zone do
@moduledoc """
Represents a commuter rail zone
"""
@type t :: String.t()
@doc """
Returns whether or not this is a "combo" zone.
A combo zone uses one fare between the terminus stop, and another between all other stops.
iex> Zones.Zone.combo_zone?("1A-1")
true
iex> Zones.Z... | 22.220588 | 92 | 0.630046 |
1ccbea11e2145d2837e241f93875f6ce8291602f | 1,320 | ex | Elixir | lib/brando_admin/live/pages/page_list_live.ex | brandocms/brando | 4198e0c0920031bd909969055064e4e2b7230d21 | [
"MIT"
] | 4 | 2020-10-30T08:40:38.000Z | 2022-01-07T22:21:37.000Z | lib/brando_admin/live/pages/page_list_live.ex | brandocms/brando | 4198e0c0920031bd909969055064e4e2b7230d21 | [
"MIT"
] | 1,162 | 2020-07-05T11:20:15.000Z | 2022-03-31T06:01:49.000Z | lib/brando_admin/live/pages/page_list_live.ex | brandocms/brando | 4198e0c0920031bd909969055064e4e2b7230d21 | [
"MIT"
] | null | null | null | defmodule BrandoAdmin.Pages.PageListLive do
use BrandoAdmin.LiveView.Listing, schema: Brando.Pages.Page
alias BrandoAdmin.Components.Content
alias Surface.Components.LivePatch
import Brando.Gettext
def render(assigns) do
~F"""
<Content.Header
title={gettext("Pages & sections")}
subtitle=... | 26.4 | 93 | 0.630303 |
1ccbeeb02e2169703510222895da2de652fcfd26 | 7,284 | ex | Elixir | lib/ex_oauth2_provider/oauth2/authorization/strategy/code.ex | gozego/ex_oauth2_provider | d3a7658d28233dda2dfdef7ed397b5b440a2f737 | [
"Unlicense",
"MIT"
] | 2 | 2021-04-25T20:59:53.000Z | 2021-07-13T22:49:20.000Z | lib/ex_oauth2_provider/oauth2/authorization/strategy/code.ex | gozego/ex_oauth2_provider | d3a7658d28233dda2dfdef7ed397b5b440a2f737 | [
"Unlicense",
"MIT"
] | null | null | null | lib/ex_oauth2_provider/oauth2/authorization/strategy/code.ex | gozego/ex_oauth2_provider | d3a7658d28233dda2dfdef7ed397b5b440a2f737 | [
"Unlicense",
"MIT"
] | null | null | null | defmodule ExOauth2Provider.Authorization.Code do
@moduledoc """
Methods for authorization code flow.
The flow consists of three method calls:
1. `preauthorize(resource_owner, request)`
This validates the request. If a resource owner already have been
authenticated previously it'll respond with a redirect... | 33.56682 | 129 | 0.653213 |
1ccc14f11c235150627ffa1babc4247d7f74ba11 | 1,058 | ex | Elixir | lib/autocomplete.ex | ventuno/elixir-fundamentals | eda1388f9815f8f9238b236edea9ca55447e3d27 | [
"BSD-3-Clause"
] | 14 | 2018-04-18T12:58:54.000Z | 2020-09-14T16:40:07.000Z | lib/autocomplete.ex | ventuno/elixir-fundamentals | eda1388f9815f8f9238b236edea9ca55447e3d27 | [
"BSD-3-Clause"
] | 6 | 2018-02-27T18:25:57.000Z | 2021-10-19T02:40:08.000Z | lib/autocomplete.ex | ventuno/elixir-fundamentals | eda1388f9815f8f9238b236edea9ca55447e3d27 | [
"BSD-3-Clause"
] | 5 | 2018-02-28T16:10:53.000Z | 2019-04-18T11:18:05.000Z | defmodule Autocomplete do
require Logger
def get_completions(hint) do
# Switch this to use get_completions_good
{time, result} = measure(fn -> get_completions_bad(hint) end)
Logger.info "Completed search for \"#{hint}\" in #{time}s"
result
end
'''
This is the enum (non-stream) version of t... | 25.804878 | 84 | 0.665406 |
1ccc22d655f036634a58b799ae5194829b4eb798 | 1,257 | ex | Elixir | lib/mipha/topics/node.ex | ZPVIP/mipha | a7df054f72eec7de88b60d94c501488375bdff6a | [
"MIT"
] | 156 | 2018-06-01T19:52:32.000Z | 2022-02-03T10:58:10.000Z | lib/mipha/topics/node.ex | ZPVIP/mipha | a7df054f72eec7de88b60d94c501488375bdff6a | [
"MIT"
] | 139 | 2018-07-10T01:57:23.000Z | 2021-08-02T21:29:24.000Z | lib/mipha/topics/node.ex | ZPVIP/mipha | a7df054f72eec7de88b60d94c501488375bdff6a | [
"MIT"
] | 29 | 2018-07-17T08:43:45.000Z | 2021-12-14T13:45:30.000Z | defmodule Mipha.Topics.Node do
@moduledoc false
use Ecto.Schema
import Ecto.{Changeset, Query}
alias Mipha.Repo
alias Mipha.Topics.{Topic, Node}
@type t :: %Node{}
schema "nodes" do
field :name, :string
field :position, :integer
field :summary, :string
belongs_to :parent, Node, foreign... | 20.95 | 89 | 0.645982 |
1ccc2cd5e4d66bbdf7a0391cf4903922f94add09 | 670 | exs | Elixir | lib/elixir/test/elixir/bitwise_test.exs | doughsay/elixir | 7356a47047d0b54517bd6886603f09b1121dde2b | [
"Apache-2.0"
] | 19,291 | 2015-01-01T02:42:49.000Z | 2022-03-31T21:01:40.000Z | lib/elixir/test/elixir/bitwise_test.exs | doughsay/elixir | 7356a47047d0b54517bd6886603f09b1121dde2b | [
"Apache-2.0"
] | 8,082 | 2015-01-01T04:16:23.000Z | 2022-03-31T22:08:02.000Z | lib/elixir/test/elixir/bitwise_test.exs | doughsay/elixir | 7356a47047d0b54517bd6886603f09b1121dde2b | [
"Apache-2.0"
] | 3,472 | 2015-01-03T04:11:56.000Z | 2022-03-29T02:07:30.000Z | Code.require_file("test_helper.exs", __DIR__)
defmodule BitwiseTest do
use ExUnit.Case, async: true
import Bitwise
doctest Bitwise
test "bnot/1" do
assert bnot(1) == -2
end
test "band/2" do
assert band(1, 1) == 1
end
test "bor/2" do
assert bor(0, 1) == 1
end
test "bxor/2" do
as... | 13.673469 | 45 | 0.523881 |
1ccc404af88939b7250e9a5db06172f0d190de75 | 566 | exs | Elixir | test/views/error_view_test.exs | zcdunn/elixirstatus-web | 9df758dce01c676403effdeb3231db0529285e6c | [
"MIT"
] | 299 | 2015-06-24T09:14:27.000Z | 2022-03-03T13:31:59.000Z | test/views/error_view_test.exs | zcdunn/elixirstatus-web | 9df758dce01c676403effdeb3231db0529285e6c | [
"MIT"
] | 63 | 2015-07-04T19:42:12.000Z | 2021-12-10T14:27:28.000Z | test/views/error_view_test.exs | zcdunn/elixirstatus-web | 9df758dce01c676403effdeb3231db0529285e6c | [
"MIT"
] | 49 | 2015-07-06T13:42:43.000Z | 2021-12-22T21:38:04.000Z | defmodule ElixirStatus.ErrorViewTest do
use ElixirStatus.ConnCase, async: true
# Bring render/3 and render_to_string/3 for testing custom views
import Phoenix.View
test "renders 404.html" do
assert render_to_string(ElixirStatus.ErrorView, "404.html", []) == "404 - Page not found"
end
test "render 500... | 29.789474 | 94 | 0.727915 |
1ccc572aead4cb3e6d8f1e2b11022d56311a148d | 766 | exs | Elixir | apps/day1/mix.exs | DFilipeS/advent-of-code-2020 | 89acbc1dcc2352e91463b0faebda868417d7e5d7 | [
"Unlicense"
] | null | null | null | apps/day1/mix.exs | DFilipeS/advent-of-code-2020 | 89acbc1dcc2352e91463b0faebda868417d7e5d7 | [
"Unlicense"
] | null | null | null | apps/day1/mix.exs | DFilipeS/advent-of-code-2020 | 89acbc1dcc2352e91463b0faebda868417d7e5d7 | [
"Unlicense"
] | null | null | null | defmodule Day1.MixProject do
use Mix.Project
def project do
[
app: :day1,
version: "0.1.0",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixir: "~> 1.11",
start_permanent: Mix.env() == :... | 22.529412 | 88 | 0.563969 |
1cccca7658cdddc195054ac33dea30c0df9bb9e2 | 1,125 | exs | Elixir | config/config.exs | mpahrens/Nehe_Elixir | ba40e0390b2d524643ec29b7de046cf13b325daa | [
"MIT"
] | null | null | null | config/config.exs | mpahrens/Nehe_Elixir | ba40e0390b2d524643ec29b7de046cf13b325daa | [
"MIT"
] | null | null | null | config/config.exs | mpahrens/Nehe_Elixir | ba40e0390b2d524643ec29b7de046cf13b325daa | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
# 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.290323 | 73 | 0.752889 |
1cccebbe2d618035d59093d0561e1943fe33d234 | 2,256 | exs | Elixir | test/membrane_file/sink_multi_test.exs | nathanjohnson320/membrane_file_plugin | 1011a0a20b79962a84fc6129f96dd598b58c4abb | [
"Apache-2.0"
] | null | null | null | test/membrane_file/sink_multi_test.exs | nathanjohnson320/membrane_file_plugin | 1011a0a20b79962a84fc6129f96dd598b58c4abb | [
"Apache-2.0"
] | null | null | null | test/membrane_file/sink_multi_test.exs | nathanjohnson320/membrane_file_plugin | 1011a0a20b79962a84fc6129f96dd598b58c4abb | [
"Apache-2.0"
] | null | null | null | defmodule Membrane.File.Sink.MultiTest do
use ExUnit.Case
use Mockery
alias Membrane.File
alias File.{CommonFile, SplitEvent}
alias Membrane.Buffer
@module File.Sink.Multi
use File.TestSupport.Common
def state(_ctx) do
%{
state: %{
location: "",
fd: nil,
naming_fun: fn... | 28.923077 | 97 | 0.587323 |
1ccd04c184dbe704134f362951e91c7eb8a16c33 | 1,454 | ex | Elixir | lib/magic_number.ex | themitigater/elixir-magic-number | 6b7b82bd5333835995ffea11bf5e98a3254c827a | [
"MIT"
] | null | null | null | lib/magic_number.ex | themitigater/elixir-magic-number | 6b7b82bd5333835995ffea11bf5e98a3254c827a | [
"MIT"
] | null | null | null | lib/magic_number.ex | themitigater/elixir-magic-number | 6b7b82bd5333835995ffea11bf5e98a3254c827a | [
"MIT"
] | null | null | null | defmodule MagicNumber do
@moduledoc """
The module to determine a file's type from its
[magic number](https://en.wikipedia.org/wiki/File_format#Magic_number).
"""
@typedoc """
A media type is a two-part identifier for file format. For example:
```elixir
{:application, :zip} # application/zip
{:image... | 25.068966 | 106 | 0.568776 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.