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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2d19f3534e88693e777782c3ab7dc20b2ef3cfe9 | 1,211 | exs | Elixir | test/authorization_helper_test.exs | tinfoil/poxa | a1c3501ecf1df9873a5c7018dc7da0abe4556cec | [
"MIT"
] | null | null | null | test/authorization_helper_test.exs | tinfoil/poxa | a1c3501ecf1df9873a5c7018dc7da0abe4556cec | [
"MIT"
] | null | null | null | test/authorization_helper_test.exs | tinfoil/poxa | a1c3501ecf1df9873a5c7018dc7da0abe4556cec | [
"MIT"
] | null | null | null | defmodule Poxa.AuthorizarionHelperTest do
use ExUnit.Case, async: true
alias Poxa.Authentication
import Mimic
import Poxa.AuthorizationHelper
setup :verify_on_exit!
setup do
stub(Authentication)
stub(:cowboy_req)
:ok
end
test "is_authorized returns true if Authentication is ok" do
exp... | 33.638889 | 88 | 0.654831 |
2d1a9074dd9633ae6304e42e3c146d7780f12eae | 669 | exs | Elixir | test/lib/mix/task_test.exs | IvanPereyra-23/PaaS | 0179c7b57645473308b0a295a70b6284ed220fbf | [
"Apache-2.0"
] | 1 | 2020-08-27T18:43:11.000Z | 2020-08-27T18:43:11.000Z | test/lib/mix/task_test.exs | IvanPereyra-23/PaaS | 0179c7b57645473308b0a295a70b6284ed220fbf | [
"Apache-2.0"
] | null | null | null | test/lib/mix/task_test.exs | IvanPereyra-23/PaaS | 0179c7b57645473308b0a295a70b6284ed220fbf | [
"Apache-2.0"
] | 1 | 2020-08-27T18:43:21.000Z | 2020-08-27T18:43:21.000Z | # Copyright(c) 2015-2020 ACCESS CO., LTD. All rights reserved.
defmodule Antikythera.Mix.TaskTest do
use Croma.TestCase
alias AntikytheraCore.GearLog.ContextHelper
describe "set_node_id_to_gear_log_context/1" do
test "should set node_id to AntikytheraCore.GearLog.ContextHelper" do
node_id = "My-Node-... | 30.409091 | 73 | 0.733931 |
2d1addec524235fde408a03a922c35f9d9d18f33 | 1,121 | exs | Elixir | config/config.exs | gialib/relax_lib | 0a94b1fe38d00b51832ef947a4c3a1c2956583ca | [
"MIT"
] | null | null | null | config/config.exs | gialib/relax_lib | 0a94b1fe38d00b51832ef947a4c3a1c2956583ca | [
"MIT"
] | null | null | null | config/config.exs | gialib/relax_lib | 0a94b1fe38d00b51832ef947a4c3a1c2956583ca | [
"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.16129 | 73 | 0.752007 |
2d1aeb352772120a93ad499bce5e0298ab4aeef9 | 1,131 | ex | Elixir | clients/groups_migration/lib/google_api/groups_migration/v1/connection.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/groups_migration/lib/google_api/groups_migration/v1/connection.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/groups_migration/lib/google_api/groups_migration/v1/connection.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 34.272727 | 77 | 0.741821 |
2d1af7d5499b77247f73e571440824f2c864f485 | 208 | exs | Elixir | apps/core/priv/prm_repo/migrations/20180228134902_add_party_declaration_fields.exs | ehealth-ua/ehealth.api | 4ffe26a464fe40c95fb841a4aa2e147068f65ca2 | [
"Apache-2.0"
] | 8 | 2019-06-14T11:34:49.000Z | 2021-08-05T19:14:24.000Z | apps/core/priv/prm_repo/migrations/20180228134902_add_party_declaration_fields.exs | edenlabllc/ehealth.api.public | 4ffe26a464fe40c95fb841a4aa2e147068f65ca2 | [
"Apache-2.0"
] | 1 | 2019-07-08T15:20:22.000Z | 2019-07-08T15:20:22.000Z | apps/core/priv/prm_repo/migrations/20180228134902_add_party_declaration_fields.exs | ehealth-ua/ehealth.api | 4ffe26a464fe40c95fb841a4aa2e147068f65ca2 | [
"Apache-2.0"
] | 6 | 2018-05-11T13:59:32.000Z | 2022-01-19T20:15:22.000Z | defmodule Core.PRMRepo.Migrations.AddPartyDeclarationFields do
@moduledoc false
use Ecto.Migration
def change do
alter table(:parties) do
add(:declaration_limit, :integer)
end
end
end
| 17.333333 | 62 | 0.735577 |
2d1af8b5c5d019242fc934f8377f69dced4e204b | 1,032 | ex | Elixir | lib/hub/server.ex | devstopfix/iot-wander | 7cb089fe4775d487d082d938dc72ed5d71d01ee2 | [
"MIT"
] | 1 | 2021-01-19T05:44:14.000Z | 2021-01-19T05:44:14.000Z | lib/hub/server.ex | devstopfix/iot-wander | 7cb089fe4775d487d082d938dc72ed5d71d01ee2 | [
"MIT"
] | 3 | 2016-05-01T14:30:04.000Z | 2016-05-19T20:52:50.000Z | lib/hub/server.ex | devstopfix/iot-wander | 7cb089fe4775d487d082d938dc72ed5d71d01ee2 | [
"MIT"
] | null | null | null | defmodule Hub.Server do
use GenServer
@moduledoc """
A Hub process maintains the latest state broadcast from the
physical Hub device.
"""
def start_link(mac) do
GenServer.start_link(__MODULE__, now(), name: via_tuple(mac))
end
defp identify(mac) do
{:n, :l, {:hub, mac}}
end
# Generate a ... | 19.111111 | 71 | 0.640504 |
2d1b11b2774bca61d75e1fc197b8e920f909a80f | 379 | ex | Elixir | lib/noap/type/boolean.ex | bpardee/noap | 4c21c55ef2d88ad26a9fab94805beff954315dbf | [
"MIT"
] | 1 | 2022-03-04T03:55:46.000Z | 2022-03-04T03:55:46.000Z | lib/noap/type/boolean.ex | bpardee/noap | 4c21c55ef2d88ad26a9fab94805beff954315dbf | [
"MIT"
] | null | null | null | lib/noap/type/boolean.ex | bpardee/noap | 4c21c55ef2d88ad26a9fab94805beff954315dbf | [
"MIT"
] | null | null | null | defmodule Noap.Type.Boolean do
use Noap.Type
@impl true
def from_str("true", _opts), do: {:ok, true}
def from_str("false", _opts), do: {:ok, false}
def from_str("1", _opts), do: {:ok, true}
def from_str("0", _opts), do: {:ok, false}
def from_str("Y", _opts), do: {:ok, true}
def from_str("N", _opts), do... | 29.153846 | 48 | 0.620053 |
2d1b214840e9ce85093067c1e8ac4c764f809d32 | 639 | ex | Elixir | test/support/live_views/events.ex | LostKobrakai/phoenix_live_view | 18d7c18e7338a5a041896baaeee12a917922b65c | [
"MIT"
] | 1 | 2020-12-23T18:28:30.000Z | 2020-12-23T18:28:30.000Z | test/support/live_views/events.ex | LostKobrakai/phoenix_live_view | 18d7c18e7338a5a041896baaeee12a917922b65c | [
"MIT"
] | null | null | null | test/support/live_views/events.ex | LostKobrakai/phoenix_live_view | 18d7c18e7338a5a041896baaeee12a917922b65c | [
"MIT"
] | null | null | null | defmodule Phoenix.LiveViewTest.EventsLive do
use Phoenix.LiveView, namespace: Phoenix.LiveViewTest
def render(assigns) do
~L"""
count: <%= @count %>
"""
end
def mount(_params, _session, socket) do
{:ok, assign(socket, events: [], count: 0)}
end
def handle_event("reply", %{"count" => new_c... | 24.576923 | 81 | 0.638498 |
2d1b21b579bb85d49f07a58f6915b59ada2bed65 | 1,202 | ex | Elixir | lib/dogma/reporter/flycheck.ex | lpil/dogma | e0f55c27ec3053be0313ac93f3d036437ee590a1 | [
"MIT"
] | 558 | 2015-06-21T18:20:59.000Z | 2021-12-30T16:25:47.000Z | lib/dogma/reporter/flycheck.ex | lpil/dogma | e0f55c27ec3053be0313ac93f3d036437ee590a1 | [
"MIT"
] | 252 | 2015-06-19T13:00:47.000Z | 2021-04-21T08:04:16.000Z | lib/dogma/reporter/flycheck.ex | lpil/dogma | e0f55c27ec3053be0313ac93f3d036437ee590a1 | [
"MIT"
] | 79 | 2015-06-21T14:18:30.000Z | 2021-12-30T16:26:09.000Z | defmodule Dogma.Reporter.Flycheck do
@moduledoc """
A machine-readable format suitable for integration with tools like
[Flycheck](https://github.com/flycheck/flycheck) or
[Syntastic](https://github.com/scrooloose/syntastic).
/project/lib/test.ex:1:1: W: Module with out a @moduledoc detected
/projec... | 23.115385 | 72 | 0.648087 |
2d1b2401b51618913b9614861ec30a5b498db98a | 1,122 | ex | Elixir | lib/red_potion/web/controllers/counter_value_controller.ex | mvdwg/red_potion | 3026b13d80d9157a598b08e959beb5e56c6f9ff9 | [
"MIT"
] | null | null | null | lib/red_potion/web/controllers/counter_value_controller.ex | mvdwg/red_potion | 3026b13d80d9157a598b08e959beb5e56c6f9ff9 | [
"MIT"
] | null | null | null | lib/red_potion/web/controllers/counter_value_controller.ex | mvdwg/red_potion | 3026b13d80d9157a598b08e959beb5e56c6f9ff9 | [
"MIT"
] | null | null | null | defmodule RedPotion.Web.CounterValueController do
use RedPotion.Web, :controller
alias RedPotion.Artifacts
def index(conn, params) do
counter = Artifacts.get_counter_with_values!(params["counter_id"])
render(conn, "index.html", counter_values: counter.values, counter: counter)
end
# GET /counters/:... | 34 | 93 | 0.69697 |
2d1b25363c9bb7c771a79e64875924f8cfbf674f | 1,334 | ex | Elixir | lib/code_corps_web/views/stripe_platform_customer_view.ex | fikape/code-corps-api | c21674b0b2a19fa26945c94268db8894420ca181 | [
"MIT"
] | 275 | 2015-06-23T00:20:51.000Z | 2021-08-19T16:17:37.000Z | lib/code_corps_web/views/stripe_platform_customer_view.ex | fikape/code-corps-api | c21674b0b2a19fa26945c94268db8894420ca181 | [
"MIT"
] | 1,304 | 2015-06-26T02:11:54.000Z | 2019-12-12T21:08:00.000Z | lib/code_corps_web/views/stripe_platform_customer_view.ex | fikape/code-corps-api | c21674b0b2a19fa26945c94268db8894420ca181 | [
"MIT"
] | 140 | 2016-01-01T18:19:47.000Z | 2020-11-22T06:24:47.000Z | defmodule CodeCorpsWeb.StripePlatformCustomerView do
@moduledoc false
use CodeCorpsWeb, :view
use JaSerializer.PhoenixView
attributes [:created, :currency, :delinquent, :email, :id_from_stripe, :inserted_at, :updated_at]
has_one :user, type: "user", field: :user_id
@doc """
Returns the email or an empt... | 41.6875 | 113 | 0.765367 |
2d1b2759c33b73a16d274d163c3fe9c877317ef2 | 947 | ex | Elixir | test/support/fixtures/keyword_file_fixtures.ex | rafayet-monon/elixir_search_extractor | a644e53ab364315fd7d055738d76e2ad1518d0ee | [
"MIT"
] | null | null | null | test/support/fixtures/keyword_file_fixtures.ex | rafayet-monon/elixir_search_extractor | a644e53ab364315fd7d055738d76e2ad1518d0ee | [
"MIT"
] | 32 | 2021-05-24T06:52:33.000Z | 2021-07-19T05:04:40.000Z | test/support/fixtures/keyword_file_fixtures.ex | rafayet-monon/elixir_search_extractor | a644e53ab364315fd7d055738d76e2ad1518d0ee | [
"MIT"
] | null | null | null | defmodule ElixirSearchExtractor.KeywordFileFixtures do
def valid_file_name, do: "Test File"
def csv_directory, do: "#{File.cwd!()}/test/support/fixtures/csv_files"
def valid_csv_file,
do: %Plug.Upload{
content_type: "text/csv",
path: "#{csv_directory()}/valid_keywords.csv",
filename: "valid... | 25.594595 | 73 | 0.645195 |
2d1b291225eed3e4ca1a3b03454dac6d210fbae0 | 865 | ex | Elixir | lib/tortoise/package/unsuback.ex | lucaong/tortoise | fd2f83527937ba39b47f58eb8d392a1aa927e28f | [
"Apache-2.0"
] | 272 | 2018-04-22T22:47:35.000Z | 2022-03-01T05:22:02.000Z | lib/tortoise/package/unsuback.ex | lucaong/tortoise | fd2f83527937ba39b47f58eb8d392a1aa927e28f | [
"Apache-2.0"
] | 120 | 2018-04-22T20:42:04.000Z | 2022-01-20T23:12:13.000Z | lib/tortoise/package/unsuback.ex | lucaong/tortoise | fd2f83527937ba39b47f58eb8d392a1aa927e28f | [
"Apache-2.0"
] | 58 | 2018-04-24T06:28:36.000Z | 2022-02-09T06:55:42.000Z | defmodule Tortoise.Package.Unsuback do
@moduledoc false
@opcode 11
alias Tortoise.Package
@opaque t :: %__MODULE__{
__META__: Package.Meta.t(),
identifier: Tortoise.package_identifier()
}
@enforce_keys [:identifier]
defstruct __META__: %Package.Meta{opcode: @opcode, flag... | 28.833333 | 80 | 0.611561 |
2d1b6ac2ff2451e6104fe61447f34bd3412e632b | 929 | exs | Elixir | test/deck_test.exs | stuart/cardshark | 2b23bf9719816f909ec37420539e44ea6837a275 | [
"MIT"
] | 2 | 2016-12-29T17:33:49.000Z | 2020-01-14T04:33:50.000Z | test/deck_test.exs | stuart/cardshark | 2b23bf9719816f909ec37420539e44ea6837a275 | [
"MIT"
] | null | null | null | test/deck_test.exs | stuart/cardshark | 2b23bf9719816f909ec37420539e44ea6837a275 | [
"MIT"
] | null | null | null | defmodule DeckTest do
use ExUnit.Case
alias BlackJack.Deck
def is_a_card(card) do
Enum.member?(Deck.cards, card)
end
setup do
{:ok, deck} = Deck.start_link
{:ok, deck: deck}
end
test "list of cards" do
assert 52 = length(Deck.cards)
assert [card | _ ]= Deck.cards
assert is_a_ca... | 22.119048 | 65 | 0.642626 |
2d1b779ee8a342775bddc392f0e7255b624af044 | 1,946 | ex | Elixir | apps/neoscan_web/lib/neoscan_web/views/view_helper.ex | cc1776/neo-scan | 49fc9256f5c7ed4e0a7cd43513b27ba5d9d4f287 | [
"MIT"
] | 1 | 2021-02-23T02:55:26.000Z | 2021-02-23T02:55:26.000Z | apps/neoscan_web/lib/neoscan_web/views/view_helper.ex | cc1776/neo-scan | 49fc9256f5c7ed4e0a7cd43513b27ba5d9d4f287 | [
"MIT"
] | null | null | null | apps/neoscan_web/lib/neoscan_web/views/view_helper.ex | cc1776/neo-scan | 49fc9256f5c7ed4e0a7cd43513b27ba5d9d4f287 | [
"MIT"
] | 1 | 2019-10-16T21:37:31.000Z | 2019-10-16T21:37:31.000Z | defmodule NeoscanWeb.ViewHelper do
@moduledoc "Contains function used in multiple views"
use NeoscanWeb, :view
import Number.Delimit
alias NeoscanMonitor.Api
alias Neoscan.Helpers
alias Plug.Conn
def get_tooltips(conn) do
Conn.get_session(conn, "tooltips")
end
def get_GAS_balance(nil) do
raw... | 26.297297 | 169 | 0.588386 |
2d1bd7e1a96081261b2a837e5149504c8f25da42 | 1,165 | ex | Elixir | lib/reach_web/channels/user_socket.ex | UBCAnimeClub/buzzer | 39836c664307ababccc3789829549446d81eae96 | [
"MIT"
] | 1 | 2018-06-08T03:20:01.000Z | 2018-06-08T03:20:01.000Z | lib/reach_web/channels/user_socket.ex | UBCAnimeClub/buzzer | 39836c664307ababccc3789829549446d81eae96 | [
"MIT"
] | 12 | 2018-08-19T20:05:27.000Z | 2022-02-12T15:34:18.000Z | lib/reach_web/channels/user_socket.ex | UBCAnimeClub/buzzer | 39836c664307ababccc3789829549446d81eae96 | [
"MIT"
] | null | null | null | defmodule ReachWeb.UserSocket do
use Phoenix.Socket
## Channels
channel "game:*", ReachWeb.GameChannel
## Transports
transport :websocket, Phoenix.Transports.WebSocket
# transport :longpoll, Phoenix.Transports.LongPoll
# Socket params are passed from the client and can
# be used to verify and authent... | 30.657895 | 83 | 0.703004 |
2d1be6d4302f11d011ddd6d3239dc860f688f3a1 | 1,687 | ex | Elixir | clients/content/lib/google_api/content/v21/model/orders_refund_order_response.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | 1 | 2021-10-01T09:20:41.000Z | 2021-10-01T09:20:41.000Z | clients/content/lib/google_api/content/v21/model/orders_refund_order_response.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v21/model/orders_refund_order_response.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 33.74 | 156 | 0.727327 |
2d1bec1b55da677b6f5fdbfd6470b5bb320e6b59 | 1,711 | ex | Elixir | clients/security_center/lib/google_api/security_center/v1/model/list_assets_result.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/security_center/lib/google_api/security_center/v1/model/list_assets_result.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/security_center/lib/google_api/security_center/v1/model/list_assets_result.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 34.22 | 122 | 0.735243 |
2d1bf75844067f3adbfb867690ab8ff6b749018d | 1,917 | ex | Elixir | lib/mux/video/playback_ids.ex | mcrumm/mux-elixir | 07b8a655299474560906ae5ef278cfc7ffdd46d6 | [
"MIT"
] | null | null | null | lib/mux/video/playback_ids.ex | mcrumm/mux-elixir | 07b8a655299474560906ae5ef278cfc7ffdd46d6 | [
"MIT"
] | null | null | null | lib/mux/video/playback_ids.ex | mcrumm/mux-elixir | 07b8a655299474560906ae5ef278cfc7ffdd46d6 | [
"MIT"
] | null | null | null | defmodule Mux.Video.PlaybackIds do
@moduledoc """
This module provides functions around managing Playback IDs in Mux Video. Playback IDs are the
public identifier for streaming a piece of content and can include policies such as `signed` or
`public`. [API Documentation](https://docs.mux.com/v1/reference#playbac... | 30.919355 | 159 | 0.693792 |
2d1c00a3d53c171dddc220ac108742a877a1c444 | 481 | exs | Elixir | test/models/user_test.exs | inaka/phoenix_passwordless_login | 8cdd1b6c83e28f4a36fd13381141dc382e4b92f8 | [
"Apache-2.0"
] | 29 | 2016-07-27T21:39:06.000Z | 2020-01-16T10:34:05.000Z | test/models/user_test.exs | inaka/phoenix_passwordless_login | 8cdd1b6c83e28f4a36fd13381141dc382e4b92f8 | [
"Apache-2.0"
] | null | null | null | test/models/user_test.exs | inaka/phoenix_passwordless_login | 8cdd1b6c83e28f4a36fd13381141dc382e4b92f8 | [
"Apache-2.0"
] | 6 | 2016-07-28T18:44:25.000Z | 2019-11-09T12:43:40.000Z | defmodule PasswordlessLoginApp.UserTest do
use PasswordlessLoginApp.ModelCase
alias PasswordlessLoginApp.User
@valid_attrs %{access_token: "some content", email: "some content"}
@invalid_attrs %{}
test "changeset with valid attributes" do
changeset = User.changeset(%User{}, @valid_attrs)
assert cha... | 25.315789 | 69 | 0.744283 |
2d1c065d21e66044dcad3afa76c46ea8c0604592 | 1,849 | ex | Elixir | lib/oban/migrations/v10.ex | nathanl/oban | e7b22c8fb5a9f7fc6fdeecdfdff3c2eb9b4cb39b | [
"Apache-2.0"
] | null | null | null | lib/oban/migrations/v10.ex | nathanl/oban | e7b22c8fb5a9f7fc6fdeecdfdff3c2eb9b4cb39b | [
"Apache-2.0"
] | null | null | null | lib/oban/migrations/v10.ex | nathanl/oban | e7b22c8fb5a9f7fc6fdeecdfdff3c2eb9b4cb39b | [
"Apache-2.0"
] | null | null | null | defmodule Oban.Migrations.V10 do
@moduledoc false
use Ecto.Migration
def up(prefix) do
# These didn't have defaults out of consideration for older PG versions
alter table(:oban_jobs, prefix: prefix) do
modify :args, :map, default: %{}
modify :priority, :integer, null: false
end
# Th... | 34.240741 | 93 | 0.659816 |
2d1c35aa40e485626cea0cb1d558311a060608be | 68 | exs | Elixir | apps/app2/test/views/page_view_test.exs | jschoch/umb | 98e4ca8b883777c775d2b1115ae5116cc32570fe | [
"MIT"
] | null | null | null | apps/app2/test/views/page_view_test.exs | jschoch/umb | 98e4ca8b883777c775d2b1115ae5116cc32570fe | [
"MIT"
] | null | null | null | apps/app2/test/views/page_view_test.exs | jschoch/umb | 98e4ca8b883777c775d2b1115ae5116cc32570fe | [
"MIT"
] | null | null | null | defmodule App2.PageViewTest do
use App2.ConnCase, async: true
end
| 17 | 32 | 0.794118 |
2d1c6e67d388c72be513528905872bd034caf860 | 758 | ex | Elixir | lib/ecto_schema_store/event.ex | onboardingsystems/ecto_schema_store | 120c929faecb686e3da685f411da66c80d7d0127 | [
"Apache-2.0"
] | null | null | null | lib/ecto_schema_store/event.ex | onboardingsystems/ecto_schema_store | 120c929faecb686e3da685f411da66c80d7d0127 | [
"Apache-2.0"
] | null | null | null | lib/ecto_schema_store/event.ex | onboardingsystems/ecto_schema_store | 120c929faecb686e3da685f411da66c80d7d0127 | [
"Apache-2.0"
] | null | null | null | defmodule EctoSchemaStore.Event do
@moduledoc false
alias EventQueues.Event
def new(fields) do
previous_model = Keyword.get(fields, :previous_model, nil)
new_model = Keyword.get(fields, :new_model, nil)
changeset = Keyword.get(fields, :changeset, nil)
current_action = Keyword.get(fields, :curren... | 26.137931 | 62 | 0.646438 |
2d1c853ab499ab0ac03a70f6092aae201398e9b2 | 506 | ex | Elixir | samples/client/petstore/elixir/lib/openapi_petstore/model/category.ex | MalcolmScoffable/openapi-generator | 73605a0c0e0c825286c95123c63678ba75b44d5c | [
"Apache-2.0"
] | 11,868 | 2018-05-12T02:58:07.000Z | 2022-03-31T21:19:39.000Z | samples/client/petstore/elixir/lib/openapi_petstore/model/category.ex | MalcolmScoffable/openapi-generator | 73605a0c0e0c825286c95123c63678ba75b44d5c | [
"Apache-2.0"
] | 9,672 | 2018-05-12T14:25:43.000Z | 2022-03-31T23:59:30.000Z | samples/client/petstore/elixir/lib/openapi_petstore/model/category.ex | MalcolmScoffable/openapi-generator | 73605a0c0e0c825286c95123c63678ba75b44d5c | [
"Apache-2.0"
] | 4,776 | 2018-05-12T12:06:08.000Z | 2022-03-31T19:52:51.000Z | # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://openapi-generator.tech
# Do not edit the class manually.
defmodule OpenapiPetstore.Model.Category do
@moduledoc """
"""
@derive [Poison.Encoder]
defstruct [
:"id",
:"name"
]
@type t :: %__MODU... | 18.071429 | 91 | 0.656126 |
2d1cabf032f049b3f87dba5a612fa4b92348d079 | 319 | ex | Elixir | coherence_demo-0.6/lib/coherence_demo/blog/post.ex | hotpyn/coherence-setup | fc10bb15d993ae0dd13a19fd178bdfb4ee13d6b6 | [
"MIT"
] | null | null | null | coherence_demo-0.6/lib/coherence_demo/blog/post.ex | hotpyn/coherence-setup | fc10bb15d993ae0dd13a19fd178bdfb4ee13d6b6 | [
"MIT"
] | null | null | null | coherence_demo-0.6/lib/coherence_demo/blog/post.ex | hotpyn/coherence-setup | fc10bb15d993ae0dd13a19fd178bdfb4ee13d6b6 | [
"MIT"
] | null | null | null | defmodule CoherenceDemo.Blog.Post do
use Ecto.Schema
import Ecto.Changeset
schema "posts" do
field :body, :string
field :title, :string
timestamps()
end
@doc false
def changeset(post, attrs) do
post
|> cast(attrs, [:title, :body])
|> validate_required([:title, :body])
end
end
| 15.95 | 41 | 0.645768 |
2d1cecc43a5624f144d7cfb50db6fc621492573b | 1,192 | ex | Elixir | lib/web/views/project_view.ex | UnofficialJuliaMirror/bors-ng-bors-ng | fcec51b5f6e5a691d3e310bd35ba7b74e55b667f | [
"Apache-2.0"
] | null | null | null | lib/web/views/project_view.ex | UnofficialJuliaMirror/bors-ng-bors-ng | fcec51b5f6e5a691d3e310bd35ba7b74e55b667f | [
"Apache-2.0"
] | 1 | 2020-03-07T08:28:14.000Z | 2020-03-07T08:28:14.000Z | lib/web/views/project_view.ex | UnofficialJuliaMirror/bors-ng-bors-ng | fcec51b5f6e5a691d3e310bd35ba7b74e55b667f | [
"Apache-2.0"
] | 3 | 2020-11-15T16:17:58.000Z | 2021-06-04T11:26:42.000Z | defmodule BorsNG.ProjectView do
@moduledoc """
The list of repository's, and each individual repository page.
n.b.
We call it a project internally, though it corresponds
to a GitHub repository. This is to avoid confusing
a GitHub repo with an Ecto repo.
"""
use BorsNG.Web, :view
def stringify_state... | 25.913043 | 76 | 0.627517 |
2d1d3aa95411a442b2addbf0a2d81cc053ff8923 | 196 | exs | Elixir | config/config.exs | chrislaskey/oauth2_facebook | 07816bf8219913b5516f68193a3f472cb55fa92d | [
"MIT"
] | 4 | 2017-08-12T22:35:04.000Z | 2018-01-31T00:59:57.000Z | config/config.exs | chrislaskey/oauth2_facebook | 07816bf8219913b5516f68193a3f472cb55fa92d | [
"MIT"
] | null | null | null | config/config.exs | chrislaskey/oauth2_facebook | 07816bf8219913b5516f68193a3f472cb55fa92d | [
"MIT"
] | 1 | 2018-06-19T03:56:28.000Z | 2018-06-19T03:56:28.000Z | use Mix.Config
config :logger, level: :info
config :oauth2_facebook, OAuth2.Provider.Facebook,
client_id: "example-id",
client_secret: "example-secret",
redirect_uri: "http://example.dev"
| 21.777778 | 50 | 0.744898 |
2d1d479072b46b5d7165480186aaf20d0a75f2dd | 756 | ex | Elixir | lib/model/recipient.ex | terianil/sendgridex | e2a998fcea794cf71ab9df1ffb0b73198f916206 | [
"MIT"
] | null | null | null | lib/model/recipient.ex | terianil/sendgridex | e2a998fcea794cf71ab9df1ffb0b73198f916206 | [
"MIT"
] | null | null | null | lib/model/recipient.ex | terianil/sendgridex | e2a998fcea794cf71ab9df1ffb0b73198f916206 | [
"MIT"
] | null | null | null | defmodule SendGridEx.Model.Recipient do
@moduledoc """
New recipient model.
"""
alias SendGridEx.Model.Recipient
@enforce_keys [:email]
defstruct [
:email,
custom_fields: %{}
]
@type t :: %Recipient{
email: String.t(),
custom_fields: map()
}
@doc """
Builds a ... | 18.9 | 78 | 0.588624 |
2d1d493fb0dcd26220c1bcd89d14f8caf581e4b9 | 2,224 | ex | Elixir | clients/partners/lib/google_api/partners/v2/model/money.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/partners/lib/google_api/partners/v2/model/money.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/partners/lib/google_api/partners/v2/model/money.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... | 41.185185 | 498 | 0.709982 |
2d1d73adcceb4a00c0a9f0f9ca08dc69ab72fb35 | 316 | exs | Elixir | priv/repo/migrations/20220403214827_rebuild_campaign_stats_view.exs | bikebrigade/dispatch | eb622fe4f6dab7c917d678d3d7a322a01f97da44 | [
"Apache-2.0"
] | 28 | 2021-10-11T01:53:53.000Z | 2022-03-24T17:45:55.000Z | priv/repo/migrations/20220403214827_rebuild_campaign_stats_view.exs | bikebrigade/dispatch | eb622fe4f6dab7c917d678d3d7a322a01f97da44 | [
"Apache-2.0"
] | 20 | 2021-10-21T08:12:31.000Z | 2022-03-31T13:35:53.000Z | priv/repo/migrations/20220403214827_rebuild_campaign_stats_view.exs | bikebrigade/dispatch | eb622fe4f6dab7c917d678d3d7a322a01f97da44 | [
"Apache-2.0"
] | null | null | null | defmodule BikeBrigade.Repo.Migrations.RebuildCampaignStatsView do
use Ecto.Migration
import BikeBrigade.MigrationUtils
def change do
execute "drop view if exists campaign_stats", "drop view if exists campaign_stats"
load_sql("campaign_stats_view.sql", "drop view if exists campaign_stats")
end
end
| 28.727273 | 86 | 0.794304 |
2d1d746f5d3ffc3ba0e0eb2c6665b3a3c050de24 | 456 | ex | Elixir | code/tooling/webapp/web/views/page_view.ex | alvarocamillont/introdu-o_elixir | 1d72d4f4b01d9312c4b066ce3c0fe8d9bfaaade1 | [
"MIT"
] | null | null | null | code/tooling/webapp/web/views/page_view.ex | alvarocamillont/introdu-o_elixir | 1d72d4f4b01d9312c4b066ce3c0fe8d9bfaaade1 | [
"MIT"
] | 1 | 2021-03-09T16:27:25.000Z | 2021-03-09T16:27:25.000Z | programming-elixir-book/code/tooling/webapp/web/views/page_view.ex | jordanhubbard/elixir-projects | dee341d672e83a45a17a4a85abd54a480f95c506 | [
"BSD-2-Clause"
] | null | null | null | #---
# Excerpted from "Programming Elixir ≥ 1.6",
# published by The Pragmatic Bookshelf.
# Copyrights apply to this code. It may not be used to create training material,
# courses, books, articles, and the like. Contact us if you are in doubt.
# We make no guarantees that this code is fit for any purpose.
# Visit http... | 38 | 85 | 0.752193 |
2d1d8228178b747356608a99eac9fad07788d153 | 37,897 | ex | Elixir | lib/ecto/migration.ex | dojusa/ecto_sql | 28d16c3265b7da103cbfecb3fa5026593923e1eb | [
"Apache-2.0"
] | null | null | null | lib/ecto/migration.ex | dojusa/ecto_sql | 28d16c3265b7da103cbfecb3fa5026593923e1eb | [
"Apache-2.0"
] | null | null | null | lib/ecto/migration.ex | dojusa/ecto_sql | 28d16c3265b7da103cbfecb3fa5026593923e1eb | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.Migration do
@moduledoc """
Migrations are used to modify your database schema over time.
This module provides many helpers for migrating the database,
allowing developers to use Elixir to alter their storage in
a way that is database independent.
Migrations typically provide two operations... | 32.280239 | 123 | 0.678022 |
2d1d93c02e9a92c6dff5e65311cbb2fa21a7cebf | 2,001 | ex | Elixir | apps/astarte_housekeeping_api/lib/astarte_housekeeping_api_web/controllers/fallback_controller.ex | matt-mazzucato/astarte | 34d84941a5019efc42321052f7f34b7d907a38f2 | [
"Apache-2.0"
] | 1 | 2020-02-04T13:15:22.000Z | 2020-02-04T13:15:22.000Z | apps/astarte_housekeeping_api/lib/astarte_housekeeping_api_web/controllers/fallback_controller.ex | matt-mazzucato/astarte | 34d84941a5019efc42321052f7f34b7d907a38f2 | [
"Apache-2.0"
] | 5 | 2019-11-18T17:06:34.000Z | 2019-12-19T10:03:59.000Z | apps/astarte_housekeeping_api/lib/astarte_housekeeping_api_web/controllers/fallback_controller.ex | matt-mazzucato/astarte | 34d84941a5019efc42321052f7f34b7d907a38f2 | [
"Apache-2.0"
] | 2 | 2018-02-05T19:23:18.000Z | 2019-11-19T11:44:40.000Z | #
# This file is part of Astarte.
#
# Copyright 2017 Ispirata Srl
#
# 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 appl... | 27.040541 | 74 | 0.698651 |
2d1d944d322153ac4e18e44e4c04edff83942627 | 5,358 | ex | Elixir | lib/codes/codes_g81.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_g81.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_g81.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | defmodule IcdCode.ICDCode.Codes_G81 do
alias IcdCode.ICDCode
def _G8100 do
%ICDCode{full_code: "G8100",
category_code: "G81",
short_code: "00",
full_name: "Flaccid hemiplegia affecting unspecified side",
short_name: "Flaccid hemiplegia affecting unspecified side",
... | 37.732394 | 83 | 0.652109 |
2d1dbc60f8e9cc4481081f331e332a766e229b65 | 258 | exs | Elixir | priv/repo/migrations/20190501084552_create_users.exs | corka149/jarvis | 66ddb3d919323aaf39be15e937c28cc8cc805e40 | [
"MIT"
] | null | null | null | priv/repo/migrations/20190501084552_create_users.exs | corka149/jarvis | 66ddb3d919323aaf39be15e937c28cc8cc805e40 | [
"MIT"
] | 7 | 2019-05-25T06:39:46.000Z | 2021-02-13T11:24:50.000Z | priv/repo/migrations/20190501084552_create_users.exs | corka149/jarvis | 66ddb3d919323aaf39be15e937c28cc8cc805e40 | [
"MIT"
] | null | null | null | defmodule Jarvis.Repo.Migrations.CreateUsers do
use Ecto.Migration
def change do
create table(:users) do
add :name, :string
add :email, :string
add :provider, :string
add :token, :string
timestamps()
end
end
end
| 17.2 | 47 | 0.635659 |
2d1dc1fd846e970aeecbdf94888390732c47e5d5 | 1,097 | ex | Elixir | discuss/web/controllers/auth_controller.ex | brunomenezes/elixir-projects | 1bc365131bf0f4d10fc99d14813a94fc7178b1e5 | [
"Apache-2.0"
] | null | null | null | discuss/web/controllers/auth_controller.ex | brunomenezes/elixir-projects | 1bc365131bf0f4d10fc99d14813a94fc7178b1e5 | [
"Apache-2.0"
] | null | null | null | discuss/web/controllers/auth_controller.ex | brunomenezes/elixir-projects | 1bc365131bf0f4d10fc99d14813a94fc7178b1e5 | [
"Apache-2.0"
] | null | null | null | defmodule Discuss.AuthController do
use Discuss.Web, :controller
plug Ueberauth
alias Discuss.User
def callback(%{assigns: %{ueberauth_auth: auth}} = conn, params) do
user_params = %{token: auth.credentials.token, email: auth.info.email, provider: "github"}
changeset = User.changeset(%User{}, user_para... | 26.119048 | 94 | 0.631723 |
2d1deb2f93dcea2d07bce8ba0ecbc215b219bf5b | 1,102 | ex | Elixir | lib/dogma/rule/multiple_blank_lines.ex | lpil/dogma | e0f55c27ec3053be0313ac93f3d036437ee590a1 | [
"MIT"
] | 558 | 2015-06-21T18:20:59.000Z | 2021-12-30T16:25:47.000Z | lib/dogma/rule/multiple_blank_lines.ex | lpil/dogma | e0f55c27ec3053be0313ac93f3d036437ee590a1 | [
"MIT"
] | 252 | 2015-06-19T13:00:47.000Z | 2021-04-21T08:04:16.000Z | lib/dogma/rule/multiple_blank_lines.ex | lpil/dogma | e0f55c27ec3053be0313ac93f3d036437ee590a1 | [
"MIT"
] | 79 | 2015-06-21T14:18:30.000Z | 2021-12-30T16:26:09.000Z | use Dogma.RuleBuilder
defrule Dogma.Rule.MultipleBlankLines, [max_lines: 2] do
@moduledoc """
A rule that disallows multiple consecutive blank lines.
"""
def test(rule, script) do
script.lines |> strip_lines |> check_blank_lines(rule.max_lines)
end
defp strip_lines(lines) do
Enum.map lines, fn {l... | 23.956522 | 68 | 0.663339 |
2d1ded4df5118ec97d7b3366e1d6fa9ff5280e7e | 890 | ex | Elixir | clients/domains/lib/google_api/domains/v1beta1/metadata.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | clients/domains/lib/google_api/domains/v1beta1/metadata.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | clients/domains/lib/google_api/domains/v1beta1/metadata.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 32.962963 | 74 | 0.760674 |
2d1e75fde90d9b807c24ede872937264ea6675f7 | 1,191 | ex | Elixir | apps/interface/lib/interface/client.ex | rosetta-home/example_fw | 7359bd0dec05dc2df73b49b815fb844af842098d | [
"Apache-2.0"
] | 67 | 2017-03-25T19:18:09.000Z | 2021-02-15T13:09:57.000Z | apps/interface/lib/interface/client.ex | rosetta-home/example_fw | 7359bd0dec05dc2df73b49b815fb844af842098d | [
"Apache-2.0"
] | 2 | 2018-08-21T20:12:58.000Z | 2020-04-29T23:06:53.000Z | apps/interface/lib/interface/client.ex | rosetta-home/example_fw | 7359bd0dec05dc2df73b49b815fb844af842098d | [
"Apache-2.0"
] | 15 | 2017-03-25T19:16:04.000Z | 2020-07-06T00:14:09.000Z | defmodule Interface.Client do
use GenServer
require Logger
alias Cicada.{NetworkManager, EventManager}
alias Cicada.NetworkManager.State, as: NM
alias Cicada.NetworkManager.Interface, as: NMInterface
def start_link do
GenServer.start_link(__MODULE__, :ok, name: __MODULE__)
end
def init(:ok) do
... | 22.903846 | 93 | 0.660789 |
2d1e7693a7d5c468f1dad01148e265de8423d803 | 1,192 | ex | Elixir | apps/rig_inbound_gateway/lib/rig_inbound_gateway/transports/server_sent_events/encoder.ex | maxglassie/reactive-interaction-gateway | 36b68fc75c71b9b4c3b6bd70fb11900c67172137 | [
"Apache-2.0"
] | null | null | null | apps/rig_inbound_gateway/lib/rig_inbound_gateway/transports/server_sent_events/encoder.ex | maxglassie/reactive-interaction-gateway | 36b68fc75c71b9b4c3b6bd70fb11900c67172137 | [
"Apache-2.0"
] | null | null | null | apps/rig_inbound_gateway/lib/rig_inbound_gateway/transports/server_sent_events/encoder.ex | maxglassie/reactive-interaction-gateway | 36b68fc75c71b9b4c3b6bd70fb11900c67172137 | [
"Apache-2.0"
] | null | null | null | defmodule RigInboundGateway.Transports.ServerSentEvents.Encoder do
@moduledoc """
SSE-protocol encoding of messages ready to be sent over the wire.
"""
@doc false
def format(%Phoenix.Socket.Message{} = msg) do
format_id(msg) <> format_event(msg) <> format_data(msg) <> "\n"
end
def format(:hello), d... | 31.368421 | 87 | 0.676174 |
2d1e8782d99cc7b1c9ef15b5d6b2db52bcfbeb1d | 8,527 | exs | Elixir | test/course_planner_web/controllers/supervisor_controller_test.exs | digitalnatives/course_planner | 27b1c8067edc262685e9c4dcbfcf82633bc8b8dc | [
"MIT"
] | 38 | 2017-04-11T13:37:38.000Z | 2021-05-22T19:35:36.000Z | test/course_planner_web/controllers/supervisor_controller_test.exs | digitalnatives/course_planner | 27b1c8067edc262685e9c4dcbfcf82633bc8b8dc | [
"MIT"
] | 226 | 2017-04-07T13:14:14.000Z | 2018-03-08T16:50:11.000Z | test/course_planner_web/controllers/supervisor_controller_test.exs | digitalnatives/course_planner | 27b1c8067edc262685e9c4dcbfcf82633bc8b8dc | [
"MIT"
] | 7 | 2017-08-30T23:58:13.000Z | 2021-03-28T11:50:45.000Z | defmodule CoursePlanner.SupervisorControllerTest do
use CoursePlannerWeb.ConnCase
alias CoursePlanner.Repo
alias CoursePlanner.Accounts.User
import CoursePlanner.Factory
setup do
{:ok, conn: login_as(:coordinator)}
end
defp login_as(user_type) do
user_type
|> insert()
|> guardian_login_... | 38.237668 | 127 | 0.704703 |
2d1eb6a8cc74700bceccab1c3113898d4f46fbf0 | 619 | ex | Elixir | lib/waveshare/calling.ex | PJUllrich/nerves_waveshare_868_gsm_gprs_gnss_hat | 1f4a7cfd0261eb1ff6a53d9e61f807514bca1334 | [
"MIT"
] | 1 | 2021-09-09T10:49:23.000Z | 2021-09-09T10:49:23.000Z | lib/waveshare/calling.ex | PJUllrich/nerves_waveshare_868_gsm_gprs_gnss_hat | 1f4a7cfd0261eb1ff6a53d9e61f807514bca1334 | [
"MIT"
] | null | null | null | lib/waveshare/calling.ex | PJUllrich/nerves_waveshare_868_gsm_gprs_gnss_hat | 1f4a7cfd0261eb1ff6a53d9e61f807514bca1334 | [
"MIT"
] | 1 | 2021-11-10T17:35:48.000Z | 2021-11-10T17:35:48.000Z | defmodule WaveshareHat.Calling do
@moduledoc """
Includes helper functions for calling.
"""
import WaveshareHat.Utils
@doc """
Enable (1) or disable (0) CLIP notifications.
"""
def set_clip(pid, status) when status in [0, 1] do
write(pid, "AT+CLIP=#{status}")
end
@doc """
Start a phone call... | 20.633333 | 62 | 0.633279 |
2d1ec1506ebf6acc11cc9907e2791f43a7970827 | 994 | exs | Elixir | frameworks/Elixir/phoenix/config/prod.exs | andrcmdr/FrameworkBenchmarks | 960480a1ed1a65c0590e4d3e569ecb2dbdf80c4d | [
"BSD-3-Clause"
] | 5 | 2015-11-05T12:57:32.000Z | 2021-02-24T05:03:05.000Z | frameworks/Elixir/phoenix/config/prod.exs | andrcmdr/FrameworkBenchmarks | 960480a1ed1a65c0590e4d3e569ecb2dbdf80c4d | [
"BSD-3-Clause"
] | 1 | 2020-02-22T11:15:48.000Z | 2020-02-22T11:15:48.000Z | frameworks/Elixir/phoenix/config/prod.exs | andrcmdr/FrameworkBenchmarks | 960480a1ed1a65c0590e4d3e569ecb2dbdf80c4d | [
"BSD-3-Clause"
] | null | null | null | use Mix.Config
config :hello, Hello.Endpoint,
url: [host: "0.0.0.0"],
http: [port: 8080, protocol_options: [max_keepalive: :infinity], backlog: 8096],
cache_static_lookup: false,
check_origin: false,
debug_errors: false,
code_reloader: false,
server: true
config :hello, Hello.Repo,
username: "benchmar... | 23.666667 | 82 | 0.683099 |
2d1ec3c5270abb1ce90db3295fdc9c7ba97348a0 | 283 | ex | Elixir | lib/hologram/template/helpers.ex | gregjohnsonsaltaire/hologram | aa8e9ea0d599def864c263cc37cc8ee31f02ac4a | [
"MIT"
] | 40 | 2022-01-19T20:27:36.000Z | 2022-03-31T18:17:41.000Z | lib/hologram/template/helpers.ex | gregjohnsonsaltaire/hologram | aa8e9ea0d599def864c263cc37cc8ee31f02ac4a | [
"MIT"
] | 42 | 2022-02-03T22:52:43.000Z | 2022-03-26T20:57:32.000Z | lib/hologram/template/helpers.ex | gregjohnsonsaltaire/hologram | aa8e9ea0d599def864c263cc37cc8ee31f02ac4a | [
"MIT"
] | 3 | 2022-02-10T04:00:37.000Z | 2022-03-08T22:07:45.000Z | defmodule Hologram.Template.Helpers do
# DEFER: test
def tag_type(tag_name) do
first_char = String.at(tag_name, 0)
downcased_first_char = String.downcase(first_char)
if first_char == downcased_first_char do
:element
else
:component
end
end
end
| 20.214286 | 54 | 0.699647 |
2d1ed5171d6a4e595982fd84cd6ce33f451b0f76 | 290 | exs | Elixir | config/test.exs | epinault/honeylixir_tracing | 42d0bb5f55ab791ad9d44f1aa7d31f0c122f45d4 | [
"Apache-2.0"
] | null | null | null | config/test.exs | epinault/honeylixir_tracing | 42d0bb5f55ab791ad9d44f1aa7d31f0c122f45d4 | [
"Apache-2.0"
] | 5 | 2021-04-26T01:12:39.000Z | 2021-10-06T18:35:14.000Z | config/test.exs | epinault/honeylixir_tracing | 42d0bb5f55ab791ad9d44f1aa7d31f0c122f45d4 | [
"Apache-2.0"
] | 1 | 2021-10-06T17:40:29.000Z | 2021-10-06T17:40:29.000Z | import Config
config :honeylixir,
dataset: "honeylixir-test",
service_name: "honeylixir-tests",
datetime_module: DateTimeFake,
transmission_queue: HoneylixirTestListener,
api_host: "https://api.honeycomb.io"
config :honeylixir_tracing,
_start_reaper: false,
span_ttl_sec: 1
| 22.307692 | 45 | 0.775862 |
2d1edc02f82a2883348bfb987e2e0bb921ab65ed | 598 | exs | Elixir | mix.exs | adrielradicchi/bill | 42dbaaccc2b2e2ecceda697ff76a2dc07d647b6a | [
"MIT"
] | null | null | null | mix.exs | adrielradicchi/bill | 42dbaaccc2b2e2ecceda697ff76a2dc07d647b6a | [
"MIT"
] | null | null | null | mix.exs | adrielradicchi/bill | 42dbaaccc2b2e2ecceda697ff76a2dc07d647b6a | [
"MIT"
] | null | null | null | defmodule Fatura.MixProject do
use Mix.Project
def project do
[
app: :fatura,
version: "0.1.0",
elixir: "~> 1.8",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_appli... | 19.933333 | 87 | 0.563545 |
2d1eed0b3f421523dbefbda5912afc852f02d590 | 1,723 | ex | Elixir | clients/content/lib/google_api/content/v2/model/orders_set_line_item_metadata_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/orders_set_line_item_metadata_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/orders_set_line_item_metadata_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... | 34.46 | 164 | 0.733024 |
2d1f1f03cc44fdaa22fc023cf4e6eea9a413483a | 1,082 | ex | Elixir | lib/ratatouille/renderer/element/view.ex | krgn/ratatouille | b5ed610c7e8fe64f6be372144c1d3a670b6fabed | [
"MIT"
] | null | null | null | lib/ratatouille/renderer/element/view.ex | krgn/ratatouille | b5ed610c7e8fe64f6be372144c1d3a670b6fabed | [
"MIT"
] | null | null | null | lib/ratatouille/renderer/element/view.ex | krgn/ratatouille | b5ed610c7e8fe64f6be372144c1d3a670b6fabed | [
"MIT"
] | null | null | null | defmodule Ratatouille.Renderer.Element.View do
@moduledoc false
@behaviour Ratatouille.Renderer
alias Ratatouille.Renderer.{Box, Canvas, Element}
alias ExTermbox.Position
@impl true
def render(canvas, %Element{attributes: attrs, children: children}, render_fn) do
canvas
|> render_top_bar(attrs[:t... | 26.390244 | 83 | 0.695933 |
2d1f3853d8b697b992cb628372d23dec9e4d4b1b | 940 | exs | Elixir | elixir/config/config.exs | samuelmesq/graphql_languages | f19158ba3a60bc1a6b3a0bcc7d8380002ebef151 | [
"BSD-3-Clause"
] | null | null | null | elixir/config/config.exs | samuelmesq/graphql_languages | f19158ba3a60bc1a6b3a0bcc7d8380002ebef151 | [
"BSD-3-Clause"
] | 2 | 2021-01-08T13:31:06.000Z | 2021-01-08T13:31:07.000Z | elixir/config/config.exs | samuelmesq/graphql_languages | f19158ba3a60bc1a6b3a0bcc7d8380002ebef151 | [
"BSD-3-Clause"
] | 1 | 2019-09-07T03:20:29.000Z | 2019-09-07T03:20:29.000Z | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
use Mix.Config
# General application configuration
config :sensedata,
ecto_repos: [Sensedata.Repo]... | 33.571429 | 86 | 0.767021 |
2d1f56e84a062cb06e93d01aa54797e40e5c88f0 | 740 | exs | Elixir | config/test.exs | Rukenshia/sthub-web | 2749e0a08ca71683ca1d44ceecc89310dea70e07 | [
"MIT"
] | null | null | null | config/test.exs | Rukenshia/sthub-web | 2749e0a08ca71683ca1d44ceecc89310dea70e07 | [
"MIT"
] | 14 | 2020-07-17T06:00:03.000Z | 2020-10-29T20:28:32.000Z | config/test.exs | Rukenshia/sthub-web | 2749e0a08ca71683ca1d44ceecc89310dea70e07 | [
"MIT"
] | null | null | null | use Mix.Config
# Configure your database
#
# The MIX_TEST_PARTITION environment variable can be used
# to provide built-in test partitioning in CI environment.
# Run `mix help test` for more information.
config :sthub, StHub.Repo,
username: "postgres",
password: "postgres",
database: "sthub_test#{System.get_env(... | 28.461538 | 64 | 0.747297 |
2d1f58dd71804e85cdaf5c3a0a3e430349614085 | 2,222 | exs | Elixir | config/prod.exs | zachary-kuhn/guardian_demo | f973cb5a665db1608543a31d3d2340caa2d11228 | [
"MIT"
] | 2 | 2017-09-10T12:44:31.000Z | 2017-11-05T14:15:55.000Z | config/prod.exs | zachary-kuhn/guardian_demo | f973cb5a665db1608543a31d3d2340caa2d11228 | [
"MIT"
] | null | null | null | config/prod.exs | zachary-kuhn/guardian_demo | f973cb5a665db1608543a31d3d2340caa2d11228 | [
"MIT"
] | null | null | null | use Mix.Config
# For production, we often load configuration from external
# sources, such as your system environment. For this reason,
# you won't find the :http configuration below, but set inside
# GuardianDemoWeb.Endpoint.init/2 when load_from_system_env is
# true. Any dynamic configuration should be done there.
#... | 34.184615 | 67 | 0.727723 |
2d1f7f4c278656295f3bfe126ae61a4dcb056df6 | 2,421 | ex | Elixir | clients/content/lib/google_api/content/v21/model/shippingsettings_custom_batch_request_entry.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v21/model/shippingsettings_custom_batch_request_entry.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v21/model/shippingsettings_custom_batch_request_entry.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... | 38.428571 | 184 | 0.711276 |
2d1f99c1314112de2991114271d999f3fa379549 | 245 | exs | Elixir | priv/repo/migrations/20210616213547_create_links.exs | hansjhoffman/bagheera | a816a38a4dd8a4ac841accb0234dfdc15f1aeec2 | [
"MIT"
] | 3 | 2020-02-19T14:57:45.000Z | 2020-02-26T03:38:09.000Z | priv/repo/migrations/20210616213547_create_links.exs | hansjhoffman/bagheera | a816a38a4dd8a4ac841accb0234dfdc15f1aeec2 | [
"MIT"
] | 1 | 2021-09-30T13:51:51.000Z | 2021-09-30T13:51:51.000Z | priv/repo/migrations/20210616213547_create_links.exs | hansjhoffman/bagheera | a816a38a4dd8a4ac841accb0234dfdc15f1aeec2 | [
"MIT"
] | null | null | null | defmodule Bagheera.Repo.Migrations.CreateLinks do
use Ecto.Migration
def change do
create table(:links) do
add :hash, :string
add :url, :string
timestamps()
end
create unique_index(:links, [:hash])
end
end
| 16.333333 | 49 | 0.653061 |
2d1fb00c1d0e7849dc7ce9c1564f11211e6445f3 | 80 | exs | Elixir | test/figgis_web/views/layout_view_test.exs | jherdman/figgis | 4eae5d0fc48d550c3585c088ff5ac74d97efa7d4 | [
"MIT"
] | null | null | null | test/figgis_web/views/layout_view_test.exs | jherdman/figgis | 4eae5d0fc48d550c3585c088ff5ac74d97efa7d4 | [
"MIT"
] | null | null | null | test/figgis_web/views/layout_view_test.exs | jherdman/figgis | 4eae5d0fc48d550c3585c088ff5ac74d97efa7d4 | [
"MIT"
] | null | null | null | defmodule FiggisWeb.LayoutViewTest do
use FiggisWeb.ConnCase, async: true
end
| 20 | 37 | 0.825 |
2d1fd5b51e0671b0efd4896affd1f9c7cd228f6c | 181 | exs | Elixir | apps/aecore/config/prod.exs | gspasov/dogs-blockchain | 884c14cfc98de2c3793a204da069630d090bbc90 | [
"0BSD"
] | null | null | null | apps/aecore/config/prod.exs | gspasov/dogs-blockchain | 884c14cfc98de2c3793a204da069630d090bbc90 | [
"0BSD"
] | 2 | 2018-10-01T16:46:26.000Z | 2018-10-01T19:45:42.000Z | apps/aecore/config/prod.exs | gspasov/dogs-blockchain | 884c14cfc98de2c3793a204da069630d090bbc90 | [
"0BSD"
] | null | null | null | use Mix.Config
import_config "dev.exs"
config :aecore, :pow,
params: {"./mean28s-generic", "-t 5", 28},
max_target_change: 1
config :aecore, :miner, resumed_by_default: true
| 18.1 | 48 | 0.701657 |
2d1fe743fed7e71b1c1008f26d3bbd2f6ffc083d | 1,121 | ex | Elixir | elixir/lib/homework/Queries.ex | sameertj/web-homework | 244ca20455c5e4adcab8d5f395be313abccd87fd | [
"MIT"
] | null | null | null | elixir/lib/homework/Queries.ex | sameertj/web-homework | 244ca20455c5e4adcab8d5f395be313abccd87fd | [
"MIT"
] | null | null | null | elixir/lib/homework/Queries.ex | sameertj/web-homework | 244ca20455c5e4adcab8d5f395be313abccd87fd | [
"MIT"
] | null | null | null | defmodule Homework.Queries do
import Ecto.Query, warn: false
import Ecto.UUID
import Ecto.Query, warn: false
alias Homework.Repo
alias Homework.Users.User
alias Homework.SeedDb
def get_row_count(tableName) do
Repo.one(from p in tableName, select: count(p.id))
end
def run_query(query) do
... | 22.877551 | 152 | 0.693131 |
2d2037dfe37701c6ef97e3c539231ce385a58638 | 922 | exs | Elixir | src/dask/mix.exs | visciang/mbs | 3f218b82f3097c03149b6a4a440804056d94c387 | [
"MIT"
] | null | null | null | src/dask/mix.exs | visciang/mbs | 3f218b82f3097c03149b6a4a440804056d94c387 | [
"MIT"
] | 1 | 2021-12-15T07:22:59.000Z | 2021-12-15T07:47:56.000Z | src/dask/mix.exs | visciang/mbs | 3f218b82f3097c03149b6a4a440804056d94c387 | [
"MIT"
] | null | null | null | defmodule Dask.MixProject do
use Mix.Project
def project do
[
app: :dask,
version: "0.0.0",
elixir: "~> 1.13",
start_permanent: Mix.env() == :prod,
deps: deps(),
dialyzer: dialyzer(),
preferred_cli_env: [
coveralls: :test,
"coveralls.github": :test,
... | 20.488889 | 61 | 0.532538 |
2d204435c65f63c171a65f40ea87a1508e170b07 | 43 | exs | Elixir | v02/ch12/pm4.edit1.exs | oiax/elixir-primer | c8b89a29f108cc335b8e1341b7a1e90ec12adc66 | [
"MIT"
] | null | null | null | v02/ch12/pm4.edit1.exs | oiax/elixir-primer | c8b89a29f108cc335b8e1341b7a1e90ec12adc66 | [
"MIT"
] | null | null | null | v02/ch12/pm4.edit1.exs | oiax/elixir-primer | c8b89a29f108cc335b8e1341b7a1e90ec12adc66 | [
"MIT"
] | null | null | null | m = %{a: 1, b: 2}
%{a: x} = m
IO.inspect x
| 10.75 | 17 | 0.418605 |
2d2059865db452a365c55ee5714673618c369cf7 | 790 | exs | Elixir | proficionym_api/config/config.exs | appropont/proficionym-api-elixir | 37519691e04176490154d7d8205c7bf1f90ff8b3 | [
"Apache-2.0"
] | null | null | null | proficionym_api/config/config.exs | appropont/proficionym-api-elixir | 37519691e04176490154d7d8205c7bf1f90ff8b3 | [
"Apache-2.0"
] | null | null | null | proficionym_api/config/config.exs | appropont/proficionym-api-elixir | 37519691e04176490154d7d8205c7bf1f90ff8b3 | [
"Apache-2.0"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
use Mix.Config
# Configures the endpoint
config :proficionym_api, ProficionymApi.Endpoint,
url: [h... | 35.909091 | 86 | 0.778481 |
2d205bb646c966390d266e160c0d254c258b57d5 | 226 | exs | Elixir | apps/rent_bot/config/dev.exs | Shiva-1927/Chatbot | cfc4adcb70a5481ecbf65b9dc932029bbdcf5eae | [
"MIT"
] | 94 | 2018-02-19T11:53:45.000Z | 2021-11-15T12:20:24.000Z | apps/rent_bot/config/dev.exs | Shiva-1927/Chatbot | cfc4adcb70a5481ecbf65b9dc932029bbdcf5eae | [
"MIT"
] | 2 | 2021-03-10T03:48:31.000Z | 2021-05-10T23:32:27.000Z | apps/rent_bot/config/dev.exs | dih78/rent-bot | 35ee3f32ca227979922aee37678e98e6e46491c8 | [
"MIT"
] | 28 | 2018-02-19T11:53:48.000Z | 2021-01-02T21:55:36.000Z | use Mix.Config
# Configure your database
config :rent_bot, RentBot.Repo,
adapter: Ecto.Adapters.Postgres,
username: "postgres",
password: "postgres",
database: "rent_bot_dev",
hostname: "localhost",
pool_size: 10
| 20.545455 | 34 | 0.730088 |
2d20b33f1527aa30edee6fe3e5dffedba2f2859e | 457 | ex | Elixir | lib/gatekeeper/http_client.ex | samfrench/gatekeeper | 6286ed16360e0d538e7f4c802a866b2cd83d5514 | [
"MIT"
] | null | null | null | lib/gatekeeper/http_client.ex | samfrench/gatekeeper | 6286ed16360e0d538e7f4c802a866b2cd83d5514 | [
"MIT"
] | null | null | null | lib/gatekeeper/http_client.ex | samfrench/gatekeeper | 6286ed16360e0d538e7f4c802a866b2cd83d5514 | [
"MIT"
] | null | null | null | defmodule Gatekeeper.HttpClient do
def fetch(url) do
MachineGun.request(:get, url)
|> handle()
end
defp handle({:ok, response}) do
%Gatekeeper.Response{
status_code: response.status_code,
body: response.body,
headers: response.headers
}
end
defp handle({:error, _response}) ... | 22.85 | 85 | 0.671772 |
2d20bcf365403ff9b57f2fadd244b81acb70e168 | 6,145 | exs | Elixir | machine_translation/MorpHIN/Learned/Resources/Set1/TrainingInstances/76.exs | AdityaPrasadMishra/NLP--Project-Group-16 | fb62cc6a1db4a494058171f11c14a2be3933a9a1 | [
"MIT"
] | null | null | null | machine_translation/MorpHIN/Learned/Resources/Set1/TrainingInstances/76.exs | AdityaPrasadMishra/NLP--Project-Group-16 | fb62cc6a1db4a494058171f11c14a2be3933a9a1 | [
"MIT"
] | null | null | null | machine_translation/MorpHIN/Learned/Resources/Set1/TrainingInstances/76.exs | AdityaPrasadMishra/NLP--Project-Group-16 | fb62cc6a1db4a494058171f11c14a2be3933a9a1 | [
"MIT"
] | null | null | null | **EXAMPLE FILE**
verb verb_aux SYM noun verb_aux;
verb verb_aux SYM pnoun verb_aux;
verb verb_aux SYM SYM verb_aux;
cardinal noun SYM pnoun verb;
adjective adjective SYM SYM verb;
particle adjective SYM pnoun verb;
verb verb_aux pn pn verb_aux;
noun adjective conj cardinal verb;
verb_aux verb_aux SYM pnoun ve... | 33.037634 | 46 | 0.790399 |
2d20e34efa4fdea08cc66deac226ac0154e771e4 | 4,373 | ex | Elixir | lib/entice/entity.ex | hoodaly/entity | e325231c7c15375e45889e8bd0b71d48c60974ca | [
"WTFPL"
] | 14 | 2015-02-11T21:50:08.000Z | 2021-09-20T21:02:25.000Z | lib/entice/entity.ex | hoodaly/entity | e325231c7c15375e45889e8bd0b71d48c60974ca | [
"WTFPL"
] | 1 | 2016-08-07T09:16:21.000Z | 2016-08-07T09:16:21.000Z | lib/entice/entity.ex | hoodaly/entity | e325231c7c15375e45889e8bd0b71d48c60974ca | [
"WTFPL"
] | 5 | 2016-01-21T01:23:19.000Z | 2020-10-25T22:24:48.000Z | defmodule Entice.Entity do
@moduledoc """
Thin convenience wrapper around a `Entice.Utils.SyncEvent` manager.
"""
alias Entice.Entity.{Attribute, Suicide}
alias Entice.Entity
alias Entice.Utils.{ETSSupervisor, SyncEvent}
defstruct id: "", attributes: %{}
# Entity lifecycle & retrieval API
def st... | 31.014184 | 128 | 0.726961 |
2d2132d080fa9a2f699243bb4c65c106b11476a4 | 653 | exs | Elixir | test/changelog_web/views/podcast_view_test.exs | PsOverflow/changelog.com | 53f4ecfc39b021c6b8cfcc0fa11f29aff8038a7f | [
"MIT"
] | 1 | 2020-10-12T13:28:41.000Z | 2020-10-12T13:28:41.000Z | test/changelog_web/views/podcast_view_test.exs | PsOverflow/changelog.com | 53f4ecfc39b021c6b8cfcc0fa11f29aff8038a7f | [
"MIT"
] | null | null | null | test/changelog_web/views/podcast_view_test.exs | PsOverflow/changelog.com | 53f4ecfc39b021c6b8cfcc0fa11f29aff8038a7f | [
"MIT"
] | 1 | 2018-10-03T20:55:52.000Z | 2018-10-03T20:55:52.000Z | defmodule ChangelogWeb.PodcastViewTest do
use ChangelogWeb.ConnCase, async: true
import ChangelogWeb.PodcastView
describe "subscribe_on_overcast_url" do
test "reformats the iTunes URL as necessary" do
p = build(:podcast, itunes_url: "https://itunes.apple.com/us/podcast/the-changelog/id341623264")
... | 32.65 | 102 | 0.732006 |
2d215faa6e19b979260f972e66c4d9969f054b77 | 1,102 | ex | Elixir | lib/credo/check/warning/unused_regex_operation.ex | rodrigues/credo | b4e08477a2141d5537d8fc9c5cc08ebf93a5ee23 | [
"MIT"
] | null | null | null | lib/credo/check/warning/unused_regex_operation.ex | rodrigues/credo | b4e08477a2141d5537d8fc9c5cc08ebf93a5ee23 | [
"MIT"
] | null | null | null | lib/credo/check/warning/unused_regex_operation.ex | rodrigues/credo | b4e08477a2141d5537d8fc9c5cc08ebf93a5ee23 | [
"MIT"
] | null | null | null | defmodule Credo.Check.Warning.UnusedRegexOperation do
@moduledoc """
"""
@explanation [check: @moduledoc]
@checked_module :Regex
@funs_with_return_value nil
alias Credo.Check.Warning.UnusedFunctionReturnHelper
use Credo.Check, base_priority: :high
@doc false
def run(%SourceFile{} = source_file, p... | 26.878049 | 89 | 0.640653 |
2d2199da0b83c69f5b2e425ce52536881b4a349d | 1,495 | ex | Elixir | clients/android_management/lib/google_api/android_management/v1/model/launch_app_action.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/android_management/lib/google_api/android_management/v1/model/launch_app_action.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/android_management/lib/google_api/android_management/v1/model/launch_app_action.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 31.145833 | 84 | 0.749164 |
2d21adefbe093789673e930e7120063cd72bea61 | 1,660 | ex | Elixir | lib/rifter/accounts/accounts.ex | artjimlop/rifter | b91d66c033691fd50a1e222176f3b454de283b12 | [
"Apache-2.0"
] | null | null | null | lib/rifter/accounts/accounts.ex | artjimlop/rifter | b91d66c033691fd50a1e222176f3b454de283b12 | [
"Apache-2.0"
] | null | null | null | lib/rifter/accounts/accounts.ex | artjimlop/rifter | b91d66c033691fd50a1e222176f3b454de283b12 | [
"Apache-2.0"
] | null | null | null | defmodule Rifter.Accounts do
@moduledoc """
The Accounts context.
"""
import Ecto.Query, warn: false
alias Rifter.Repo
alias Rifter.Accounts.User
@doc """
Returns the list of users.
## Examples
iex> list_users()
[%User{}, ...]
"""
def list_users do
Repo.all(User)
end
@do... | 15.809524 | 59 | 0.56506 |
2d21ca8e5d62e39a74c31d27bd9ff6e9e4e0572e | 197 | ex | Elixir | test/support/web/controllers/broadcast4_controller.ex | Gamecode-HQ/drab | dfbe73c0675831f42829f0f3f7fe12d47a78badc | [
"MIT"
] | 933 | 2017-01-14T13:47:37.000Z | 2022-03-21T18:14:41.000Z | test/support/web/controllers/broadcast4_controller.ex | Gamecode-HQ/drab | dfbe73c0675831f42829f0f3f7fe12d47a78badc | [
"MIT"
] | 189 | 2017-01-15T18:35:06.000Z | 2022-01-24T17:41:22.000Z | test/support/web/controllers/broadcast4_controller.ex | Gamecode-HQ/drab | dfbe73c0675831f42829f0f3f7fe12d47a78badc | [
"MIT"
] | 54 | 2017-01-15T18:10:48.000Z | 2021-02-06T17:21:44.000Z | defmodule DrabTestApp.Broadcast4Controller do
@moduledoc false
use DrabTestApp.Web, :controller
# use Drab.Controller
def index(conn, _params) do
render(conn, "index.html")
end
end
| 17.909091 | 45 | 0.741117 |
2d22431f7c54dd134a750d89fcdfd5525d866990 | 2,035 | ex | Elixir | priv/templates/phx.gen.json/controller.ex | zorn/phoenix | ac88958550fbd861e2f1e1af6e3c6b787b1a202e | [
"MIT"
] | 1 | 2019-07-15T21:58:09.000Z | 2019-07-15T21:58:09.000Z | priv/templates/phx.gen.json/controller.ex | zorn/phoenix | ac88958550fbd861e2f1e1af6e3c6b787b1a202e | [
"MIT"
] | null | null | null | priv/templates/phx.gen.json/controller.ex | zorn/phoenix | ac88958550fbd861e2f1e1af6e3c6b787b1a202e | [
"MIT"
] | null | null | null | defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web_namespace, schema.alias) %>Controller do
use <%= inspect context.web_module %>, :controller
alias <%= inspect context.module %>
alias <%= inspect schema.module %>
action_fallback <%= inspect context.web_module %>.FallbackControll... | 47.325581 | 191 | 0.607862 |
2d225073fe14d1e7ce1a215f1ace4ea88aedfb0c | 203 | exs | Elixir | template/$PROJECT_NAME$/priv/repo/migrations/20190710134230_add_roles_to_users.exs | luke-hawk/degree | 9274fc979ea0715d3bdf65a0adb14fdd2419db9a | [
"MIT"
] | 3 | 2019-08-01T08:28:24.000Z | 2019-08-18T14:50:32.000Z | template/$PROJECT_NAME$/priv/repo/migrations/20190710134230_add_roles_to_users.exs | luke-hawk/degree | 9274fc979ea0715d3bdf65a0adb14fdd2419db9a | [
"MIT"
] | 3 | 2021-03-09T12:14:26.000Z | 2022-02-10T18:46:15.000Z | template/$PROJECT_NAME$/priv/repo/migrations/20190710134230_add_roles_to_users.exs | luke-hawk/degree | 9274fc979ea0715d3bdf65a0adb14fdd2419db9a | [
"MIT"
] | null | null | null | defmodule <%= @project_name_camel_case %>.Repo.Migrations.AddRolesToUsers do
use Ecto.Migration
def change do
alter table(:users) do
add :role, :string, default: "editor"
end
end
end
| 20.3 | 76 | 0.699507 |
2d2255783d1f8b9c071989a8fce63cc270532ad7 | 243 | ex | Elixir | test/support/repo.ex | andershansson/ecto_ltree | 3c4af25ccf6d4d2f6100615b55be051760e5c20d | [
"MIT"
] | null | null | null | test/support/repo.ex | andershansson/ecto_ltree | 3c4af25ccf6d4d2f6100615b55be051760e5c20d | [
"MIT"
] | null | null | null | test/support/repo.ex | andershansson/ecto_ltree | 3c4af25ccf6d4d2f6100615b55be051760e5c20d | [
"MIT"
] | null | null | null | defmodule EctoLtree.TestRepo do
use Ecto.Repo,
otp_app: :ecto_ltree,
adapter: Ecto.Adapters.Postgres
def config_postgrex() do
config()
|> Keyword.take([:hostname, :port, :database, :username, :password, :types])
end
end
| 22.090909 | 80 | 0.687243 |
2d22711cb8f65c1ca3d0e1c568a4933dd57fcfb7 | 817 | ex | Elixir | lib/options_tracker_web/live/feedback_live/index.ex | mgwidmann/options_tracker | 5520f88a9a5873842a63a23d4bcc5da82a51feba | [
"MIT"
] | 12 | 2020-06-25T17:25:15.000Z | 2021-09-30T20:13:33.000Z | lib/options_tracker_web/live/feedback_live/index.ex | mgwidmann/options_tracker | 5520f88a9a5873842a63a23d4bcc5da82a51feba | [
"MIT"
] | 5 | 2020-08-05T03:12:31.000Z | 2021-07-15T04:59:03.000Z | lib/options_tracker_web/live/feedback_live/index.ex | mgwidmann/options_tracker | 5520f88a9a5873842a63a23d4bcc5da82a51feba | [
"MIT"
] | 2 | 2021-07-03T17:20:15.000Z | 2021-09-01T15:38:58.000Z | defmodule OptionsTrackerWeb.FeedbackLive.Index do
use OptionsTrackerWeb, :live_view
alias OptionsTracker.Users
@impl true
def mount(params, %{"user_token" => user_token} = _session, socket) do
current_user = Users.get_user_by_session_token(user_token)
track(current_user)
feedbacks = Users.list_fee... | 24.029412 | 72 | 0.69033 |
2d228eb7d9ad46ea5989fb26a502f948c5f623fd | 1,234 | ex | Elixir | test/support/conn_case.ex | pelgero/featex | ef0bd9efa07f87b58f3df68e355a5fa6d367b04f | [
"Apache-2.0"
] | null | null | null | test/support/conn_case.ex | pelgero/featex | ef0bd9efa07f87b58f3df68e355a5fa6d367b04f | [
"Apache-2.0"
] | 1 | 2021-05-11T19:13:08.000Z | 2021-05-11T19:13:08.000Z | test/support/conn_case.ex | pelgero/featex | ef0bd9efa07f87b58f3df68e355a5fa6d367b04f | [
"Apache-2.0"
] | null | null | null | defmodule FeatexWeb.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 the... | 28.045455 | 68 | 0.722853 |
2d22a2ab9e1bddee170f801bef7703cc5ee26a6b | 630 | ex | Elixir | parkapp_server/lib/parkapp/logging/external_payment_log.ex | bitmaker-software/parkapp | 39d9fd3cb8ab6bd1d54b776a5467eccf3b65f310 | [
"MIT"
] | 2 | 2018-11-06T12:21:16.000Z | 2018-11-21T10:20:17.000Z | parkapp_server/lib/parkapp/logging/external_payment_log.ex | bitmaker-software/parkapp | 39d9fd3cb8ab6bd1d54b776a5467eccf3b65f310 | [
"MIT"
] | null | null | null | parkapp_server/lib/parkapp/logging/external_payment_log.ex | bitmaker-software/parkapp | 39d9fd3cb8ab6bd1d54b776a5467eccf3b65f310 | [
"MIT"
] | null | null | null | defmodule Parkapp.Logging.ExternalPaymentLog do
use Ecto.Schema
import Ecto.Changeset
alias Parkapp.Reservations.Reservation
schema "external_payment_logs" do
field(:body, :string)
field(:result_code, :string)
field(:received_at, :utc_datetime)
belongs_to(:reservation, Reservation)
times... | 25.2 | 78 | 0.736508 |
2d22a2f948f29edbd248ca8e09a0fcc304f504c8 | 816 | ex | Elixir | lib/ratatouille/event_manager.ex | krgn/ratatouille | b5ed610c7e8fe64f6be372144c1d3a670b6fabed | [
"MIT"
] | null | null | null | lib/ratatouille/event_manager.ex | krgn/ratatouille | b5ed610c7e8fe64f6be372144c1d3a670b6fabed | [
"MIT"
] | null | null | null | lib/ratatouille/event_manager.ex | krgn/ratatouille | b5ed610c7e8fe64f6be372144c1d3a670b6fabed | [
"MIT"
] | null | null | null | defmodule Ratatouille.EventManager do
@moduledoc """
A wrapper of `ExTermbox.EventManager` so that Ratatouille applications don't
need to use or depend on ex_termbox directly.
"""
@doc """
Starts the `ExTermbox.EventManager` gen_server.
"""
@spec start_link(Keyword.t()) :: GenServer.on_start()
def st... | 28.137931 | 79 | 0.727941 |
2d22b591f01bf96d6e81d056a04a118fff2b27f6 | 67 | ex | Elixir | lib/forensic/repo.ex | DylanGuedes/forensic | 16ea59bb6aeefe636012b747a7caab26e0b7f686 | [
"Apache-2.0"
] | null | null | null | lib/forensic/repo.ex | DylanGuedes/forensic | 16ea59bb6aeefe636012b747a7caab26e0b7f686 | [
"Apache-2.0"
] | null | null | null | lib/forensic/repo.ex | DylanGuedes/forensic | 16ea59bb6aeefe636012b747a7caab26e0b7f686 | [
"Apache-2.0"
] | null | null | null | defmodule Forensic.Repo do
use Ecto.Repo, otp_app: :forensic
end
| 16.75 | 35 | 0.776119 |
2d22d072afbb03da2a6aa4511e857e71607a86e0 | 5,137 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/external_vpn_gateway.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/external_vpn_gateway.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/external_vpn_gateway.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 61.154762 | 490 | 0.725131 |
2d22dda4eadea6d439fbfba546fa04274f586372 | 3,508 | ex | Elixir | lib/html/form.ex | simonmcconnell/polymorphic_embed | 2729385d66f207dc30bbafff58b833758e8410e5 | [
"Apache-2.0"
] | null | null | null | lib/html/form.ex | simonmcconnell/polymorphic_embed | 2729385d66f207dc30bbafff58b833758e8410e5 | [
"Apache-2.0"
] | null | null | null | lib/html/form.ex | simonmcconnell/polymorphic_embed | 2729385d66f207dc30bbafff58b833758e8410e5 | [
"Apache-2.0"
] | null | null | null | if Code.ensure_loaded?(Phoenix.HTML) && Code.ensure_loaded?(Phoenix.HTML.Form) do
defmodule PolymorphicEmbed.HTML.Form do
import Phoenix.HTML, only: [html_escape: 1]
import Phoenix.HTML.Form, only: [hidden_inputs_for: 1]
@spec polymorphic_embed_inputs_for(Phoenix.HTML.Form.t(), Phoenix.HTML.Form.field(),... | 34.732673 | 180 | 0.616876 |
2d231bb1f109a40aabab2502c69df30440c6cb84 | 1,499 | ex | Elixir | lib/ash_policy_authorizer.ex | TheFirstAvenger/ash_policy_authorizer | 05eef4ee9038b06abbd4f945507067348c45a424 | [
"MIT"
] | null | null | null | lib/ash_policy_authorizer.ex | TheFirstAvenger/ash_policy_authorizer | 05eef4ee9038b06abbd4f945507067348c45a424 | [
"MIT"
] | null | null | null | lib/ash_policy_authorizer.ex | TheFirstAvenger/ash_policy_authorizer | 05eef4ee9038b06abbd4f945507067348c45a424 | [
"MIT"
] | null | null | null | defmodule AshPolicyAuthorizer do
@moduledoc """
Documentation forthcoming.
"""
@type request :: Ash.Engine.Request.t()
@type side_load :: {:side_load, Keyword.t()}
@type prepare_instruction :: side_load
alias Ash.Dsl.Extension
def describe_resource(resource) do
resource
|> policies()
|> de... | 23.793651 | 74 | 0.63042 |
2d2352cd75e1a1d2378f45e19115a0d442b2c08a | 3,417 | exs | Elixir | test/emoji_char_test.exs | kianmeng/exmoji | 515cac7e7b3f681e9b45d551b5dc5137c0a6f926 | [
"MIT"
] | 89 | 2015-01-31T03:00:47.000Z | 2022-03-23T02:46:51.000Z | test/emoji_char_test.exs | kianmeng/exmoji | 515cac7e7b3f681e9b45d551b5dc5137c0a6f926 | [
"MIT"
] | 18 | 2015-05-27T19:13:49.000Z | 2022-01-31T03:36:02.000Z | test/emoji_char_test.exs | kianmeng/exmoji | 515cac7e7b3f681e9b45d551b5dc5137c0a6f926 | [
"MIT"
] | 37 | 2015-05-27T04:35:50.000Z | 2021-11-08T02:30:15.000Z | defmodule EmojiCharTest do
use ExUnit.Case, async: true
alias Exmoji.EmojiChar
setup do
invader = %EmojiChar{unified: "1F47E"}
usflag = %EmojiChar{unified: "1F1FA-1F1F8"}
hourglass = %EmojiChar{unified: "231B", variations: ["231B-FE0F"]}
cloud = %EmojiChar{unified: "2601", variations: [... | 34.515152 | 109 | 0.688323 |
2d2360e1cb5bc8d435a3ef87a3747794f0b413e9 | 1,851 | ex | Elixir | apps/resource_manager/lib/identities/commands/create_client_application.ex | dcdourado/watcher_ex | ce80df81610a6e9b77612911aac2a6d6cf4de8d5 | [
"Apache-2.0"
] | 9 | 2020-10-13T14:11:37.000Z | 2021-08-12T18:40:08.000Z | apps/resource_manager/lib/identities/commands/create_client_application.ex | dcdourado/watcher_ex | ce80df81610a6e9b77612911aac2a6d6cf4de8d5 | [
"Apache-2.0"
] | 28 | 2020-10-04T14:43:48.000Z | 2021-12-07T16:54:22.000Z | apps/resource_manager/lib/identities/commands/create_client_application.ex | dcdourado/watcher_ex | ce80df81610a6e9b77612911aac2a6d6cf4de8d5 | [
"Apache-2.0"
] | 3 | 2020-11-25T20:59:47.000Z | 2021-08-30T10:36:58.000Z | defmodule ResourceManager.Identities.Commands.CreateClientApplication do
@moduledoc """
Command for creating a new client application identity.
"""
require Logger
alias ResourceManager.Identities.ClientApplications
alias ResourceManager.Identities.Commands.Inputs.CreateClientApplication
alias ResourceMa... | 33.654545 | 88 | 0.719611 |
2d2374564bf9b35ee91d3138c7cc2b98cf1c51f3 | 549 | exs | Elixir | config/test.exs | CMcDonald82/phoenix-api-starter | c3ece669ea047dc523c867e7609486f1a1818a1f | [
"MIT"
] | null | null | null | config/test.exs | CMcDonald82/phoenix-api-starter | c3ece669ea047dc523c867e7609486f1a1818a1f | [
"MIT"
] | null | null | null | config/test.exs | CMcDonald82/phoenix-api-starter | c3ece669ea047dc523c867e7609486f1a1818a1f | [
"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 :phoenix_api_starter, PhoenixApiStarterWeb.Endpoint,
http: [port: 4001],
server: false
# Print only warnings and errors during test
config :logger, level: :warn
# Configure your database
confi... | 27.45 | 59 | 0.761384 |
2d23a32c98681d90f4fd021305014ba21a43bd15 | 4,895 | exs | Elixir | exercism/elixir/protein-translation/test/protein_translation_test.exs | Tyyagoo/studies | f8fcc3a539cfb6d04a149174c88bf2208e220b96 | [
"Unlicense"
] | null | null | null | exercism/elixir/protein-translation/test/protein_translation_test.exs | Tyyagoo/studies | f8fcc3a539cfb6d04a149174c88bf2208e220b96 | [
"Unlicense"
] | null | null | null | exercism/elixir/protein-translation/test/protein_translation_test.exs | Tyyagoo/studies | f8fcc3a539cfb6d04a149174c88bf2208e220b96 | [
"Unlicense"
] | null | null | null | defmodule ProteinTranslationTest do
use ExUnit.Case
describe "of_codon" do
test "AUG translates to methionine" do
assert ProteinTranslation.of_codon("AUG") == {:ok, "Methionine"}
end
test "identifies Phenylalanine codons" do
assert ProteinTranslation.of_codon("UUU") == {:ok, "Phenylalanine... | 34.964286 | 96 | 0.667007 |
2d23ab74b97b5ae3b8242e50a18e633197f56285 | 709 | exs | Elixir | config/test.exs | 10clouds/10Books | 622360ea190421e07d4b207700867be105894218 | [
"MIT"
] | 11 | 2018-08-29T15:59:09.000Z | 2021-08-25T16:35:13.000Z | config/test.exs | fram74/10Books | 9e4e280032c7f7b9625c831efa9850d999327e53 | [
"MIT"
] | 16 | 2018-08-29T15:43:52.000Z | 2021-05-09T00:53:56.000Z | config/test.exs | fram74/10Books | 9e4e280032c7f7b9625c831efa9850d999327e53 | [
"MIT"
] | 3 | 2019-05-29T14:22:59.000Z | 2020-06-06T12:30:54.000Z | use Mix.Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :lib_ten, LibTenWeb.Endpoint,
http: [port: 4001],
server: false
config :lib_ten,
allowed_google_auth_domains: "test.com, 10clouds.com"
# Print only warnings and errors during test
config :lo... | 26.259259 | 87 | 0.760226 |
2d23b2b2aa1f4ec2ab0414a988ebe53c0b3aa7d9 | 2,639 | ex | Elixir | lib/norm/errors.ex | NarrativeApp/norm | a66621c8a31d57370d56c07dec5bc035dc7f3c75 | [
"MIT"
] | null | null | null | lib/norm/errors.ex | NarrativeApp/norm | a66621c8a31d57370d56c07dec5bc035dc7f3c75 | [
"MIT"
] | 1 | 2020-10-01T22:40:59.000Z | 2020-10-01T22:40:59.000Z | lib/norm/errors.ex | NarrativeApp/norm | a66621c8a31d57370d56c07dec5bc035dc7f3c75 | [
"MIT"
] | null | null | null | defmodule Norm.MismatchError do
defexception [:message]
def exception(errors) do
msg =
errors
|> Enum.map(&Norm.Conformer.error_to_msg/1)
|> Enum.join("\n")
%__MODULE__{message: "Could not conform input:\n" <> msg}
end
end
defmodule Norm.GeneratorLibraryError do
defexception [:messa... | 23.353982 | 91 | 0.567639 |
2d23c49b64b55f0ebc3a0d59d225d883dcc81fd3 | 1,184 | ex | Elixir | lib/diversity_in_tech/companies/company.ex | dreamingechoes/diversity-in-tech | 4eb5dadf69f82fd08e1cdd1b125264930d3b4e6f | [
"MIT"
] | 8 | 2018-06-22T05:43:30.000Z | 2020-04-13T20:31:40.000Z | lib/diversity_in_tech/companies/company.ex | dreamingechoes/diversity-in-tech | 4eb5dadf69f82fd08e1cdd1b125264930d3b4e6f | [
"MIT"
] | null | null | null | lib/diversity_in_tech/companies/company.ex | dreamingechoes/diversity-in-tech | 4eb5dadf69f82fd08e1cdd1b125264930d3b4e6f | [
"MIT"
] | null | null | null | defmodule DiversityInTech.Companies.Company do
use Arc.Ecto.Schema
use Ecto.Schema
import Ecto.Changeset
alias DiversityInTech.Companies.Company
alias DiversityInTech.Companies.Review
schema "companies" do
field(:name, :string)
field(:slug, :string)
field(:description, :string)
field(:logo,... | 22.339623 | 62 | 0.654561 |
2d23c6e762eeb2189d221ba690af675478607a27 | 3,493 | ex | Elixir | apps/elixir_ls_utils/test/support/mix_test.case.ex | ihabunek/elixir-ls | a8bdf9304f04254160c9fc982ad314a50085c51a | [
"Apache-2.0"
] | 1 | 2020-06-01T11:25:33.000Z | 2020-06-01T11:25:33.000Z | apps/elixir_ls_utils/test/support/mix_test.case.ex | ihabunek/elixir-ls | a8bdf9304f04254160c9fc982ad314a50085c51a | [
"Apache-2.0"
] | null | null | null | apps/elixir_ls_utils/test/support/mix_test.case.ex | ihabunek/elixir-ls | a8bdf9304f04254160c9fc982ad314a50085c51a | [
"Apache-2.0"
] | null | null | null | defmodule ElixirLS.Utils.MixTest.Case do
# This module is based heavily on MixTest.Case in Elixir's tests
use ExUnit.CaseTemplate
using do
quote do
import ElixirLS.Utils.MixTest.Case
end
end
setup config do
if apps = config[:apps] do
Logger.remove_backend(:console)
end
on_ex... | 23.13245 | 96 | 0.632694 |
2d23e3393dfbf67e8bc2448eff4f96a6771f3300 | 641 | ex | Elixir | lib/bmp3xx/bmp388/measurement.ex | elixir-sensors/bmp3xx | 39ea2d62ed345204b1d45d3e280429e7cd8f1f7a | [
"Apache-2.0"
] | 1 | 2021-05-28T23:32:36.000Z | 2021-05-28T23:32:36.000Z | lib/bmp3xx/bmp388/measurement.ex | mnishiguchi/bmp3xx | 39ea2d62ed345204b1d45d3e280429e7cd8f1f7a | [
"Apache-2.0"
] | null | null | null | lib/bmp3xx/bmp388/measurement.ex | mnishiguchi/bmp3xx | 39ea2d62ed345204b1d45d3e280429e7cd8f1f7a | [
"Apache-2.0"
] | null | null | null | defmodule BMP3XX.BMP388.Measurement do
@moduledoc false
alias BMP3XX.BMP388
@spec from_raw_samples(<<_::48>>, BMP388.Calibration.t(), number()) :: BMP3XX.Measurement.t()
def from_raw_samples(raw_samples, calibration, sea_level_pa) do
{pressure_pa, temperature_c} =
BMP388.Calibration.raw_to_pressure_... | 30.52381 | 95 | 0.75039 |
2d240fe37c507d085be41aa57465477a26c71736 | 6,623 | ex | Elixir | lib/ecto/repo/backend.ex | scrogson/ecto | fdcf807901683c73c1117d89751e0d5a7a318154 | [
"Apache-2.0"
] | null | null | null | lib/ecto/repo/backend.ex | scrogson/ecto | fdcf807901683c73c1117d89751e0d5a7a318154 | [
"Apache-2.0"
] | null | null | null | lib/ecto/repo/backend.ex | scrogson/ecto | fdcf807901683c73c1117d89751e0d5a7a318154 | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.Repo.Backend do
# The backend invoked by user defined repos.
@moduledoc false
alias Ecto.Queryable
alias Ecto.Query.Util
alias Ecto.Query.FromBuilder
alias Ecto.Query.BuilderUtil
alias Ecto.Query.Normalizer
alias Ecto.Query.Validator
require Ecto.Query, as: Q
def storage_up(repo, ad... | 28.424893 | 106 | 0.666163 |
2d244a8f15d9be4bc526cf8f85bd91045afbec0c | 1,720 | ex | Elixir | clients/dataflow/lib/google_api/dataflow/v1b3/model/send_worker_messages_response.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/dataflow/lib/google_api/dataflow/v1b3/model/send_worker_messages_response.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/dataflow/lib/google_api/dataflow/v1b3/model/send_worker_messages_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... | 33.076923 | 119 | 0.759884 |
2d24686cbd405a848d967370596eeebdae4624ea | 57,884 | ex | Elixir | clients/admin/lib/google_api/admin/directory_v1/api/users.ex | jechol/elixir-google-api | 0290b683dfc6491ca2ef755a80bc329378738d03 | [
"Apache-2.0"
] | null | null | null | clients/admin/lib/google_api/admin/directory_v1/api/users.ex | jechol/elixir-google-api | 0290b683dfc6491ca2ef755a80bc329378738d03 | [
"Apache-2.0"
] | null | null | null | clients/admin/lib/google_api/admin/directory_v1/api/users.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... | 49.473504 | 466 | 0.618686 |
2d2469e6283dc05dc96062ba77a9cbc282ccf23c | 750 | ex | Elixir | lib/fnv1a.ex | jeremytregunna/elixir-fnv1a | 42a71a3d75026534dd899a2552ce3d44e7ec4030 | [
"ECL-2.0",
"Apache-2.0"
] | 3 | 2017-04-06T02:20:48.000Z | 2020-01-16T07:39:30.000Z | lib/fnv1a.ex | jeremytregunna/elixir-fnv1a | 42a71a3d75026534dd899a2552ce3d44e7ec4030 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | lib/fnv1a.ex | jeremytregunna/elixir-fnv1a | 42a71a3d75026534dd899a2552ce3d44e7ec4030 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-12-15T16:28:54.000Z | 2021-12-15T16:28:54.000Z | defmodule Fnv1a do
@moduledoc ~S"""
Hashes terms using the FNV-1a 32-bit algorithm.
## Examples
iex> Fnv1a.hash({1, 2})
2761922969
iex> Fnv1a.hash("this thing")
891900385
"""
use Bitwise
@offset 2_166_136_261
@prime 16_777_619
def hash(term) when is_binary(term) do
_hash... | 19.230769 | 74 | 0.617333 |
2d2497de2d0b3a4f7ee9956707f832a825d9d8c9 | 3,772 | exs | Elixir | gilded_rose_test.exs | thetamind/gilded_rose_kata_elixir | ae27c0f25da972c99d5375c890756085583d6fd7 | [
"MIT"
] | 1 | 2020-09-03T20:43:49.000Z | 2020-09-03T20:43:49.000Z | gilded_rose_test.exs | thetamind/gilded_rose_kata_elixir | ae27c0f25da972c99d5375c890756085583d6fd7 | [
"MIT"
] | null | null | null | gilded_rose_test.exs | thetamind/gilded_rose_kata_elixir | ae27c0f25da972c99d5375c890756085583d6fd7 | [
"MIT"
] | 1 | 2021-05-30T13:18:04.000Z | 2021-05-30T13:18:04.000Z | Code.require_file "gilded_rose.ex", __DIR__
Code.require_file "gilded_rose_driver.ex", __DIR__
ExUnit.start seed: 0, trace: true
defmodule GildedRoseTest do
use ExUnit.Case
test "cli output" do
expected =
File.read!(Path.expand("expected_stdout_test.txt", __DIR__))
|> String.trim_trailing("\n")
... | 27.333333 | 87 | 0.66649 |
2d24a1a1cbba900da201b0bccbd5bc9cc4aca4f9 | 598 | ex | Elixir | lib/example.ex | thebriz24/gen_timer | 563dddd268f665527939a58fe6f8d4ae7604b94b | [
"MIT"
] | null | null | null | lib/example.ex | thebriz24/gen_timer | 563dddd268f665527939a58fe6f8d4ae7604b94b | [
"MIT"
] | null | null | null | lib/example.ex | thebriz24/gen_timer | 563dddd268f665527939a58fe6f8d4ae7604b94b | [
"MIT"
] | null | null | null | defmodule GenTimer.Example do
@moduledoc false
use GenTimer
require Logger
def start_link(args) do
GenTimer.start_link(__MODULE__, args, name: __MODULE__)
end
def stop do
GenServer.cast(__MODULE__, :stop)
end
@impl true
def init(%{message: message}) do
{:ok, %{milli: 1000, times: :infin... | 19.933333 | 61 | 0.682274 |
2d24b838798531606ab093800978d64f148ea65e | 3,494 | ex | Elixir | clients/spanner/lib/google_api/spanner/v1/model/mutation.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/spanner/lib/google_api/spanner/v1/model/mutation.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/spanner/lib/google_api/spanner/v1/model/mutation.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... | 59.220339 | 517 | 0.735547 |
2d24d3497d1b0cdbb2e1fe768e8b271a391683ad | 441 | ex | Elixir | lib/attentive/helpers/auth.ex | malomohq/attentive-elixir | 0bb550b482a1da6e344779aa0d077eacc790f021 | [
"MIT"
] | null | null | null | lib/attentive/helpers/auth.ex | malomohq/attentive-elixir | 0bb550b482a1da6e344779aa0d077eacc790f021 | [
"MIT"
] | 3 | 2021-08-06T16:50:58.000Z | 2022-02-21T17:18:12.000Z | lib/attentive/helpers/auth.ex | malomohq/attentive-elixir | 0bb550b482a1da6e344779aa0d077eacc790f021 | [
"MIT"
] | null | null | null | defmodule Attentive.Helpers.Auth do
@moduledoc false
alias Attentive.{ Config, Request }
@spec put_api_key(Request.t(), Config.t()) :: Request.t()
def put_api_key(request, %_{ api_key: api_key }) when not is_nil(api_key) do
headers = request.headers
headers = headers ++ [{ "authorization", "Bearer #{a... | 24.5 | 78 | 0.684807 |
2d24e087ca638226ac310215fe72d0df5870c176 | 1,262 | ex | Elixir | test/support/conn_case.ex | Hiyori-API/checker-mal | c52f6e8a248ba160ffebc2c9369a933fc8fc4499 | [
"MIT"
] | 10 | 2020-06-12T18:36:58.000Z | 2022-02-20T11:07:49.000Z | test/support/conn_case.ex | Hiyori-API/checker-mal | c52f6e8a248ba160ffebc2c9369a933fc8fc4499 | [
"MIT"
] | 7 | 2020-05-08T06:03:08.000Z | 2022-01-24T02:57:16.000Z | test/support/conn_case.ex | Hiyori-API/checker-mal | c52f6e8a248ba160ffebc2c9369a933fc8fc4499 | [
"MIT"
] | 1 | 2020-12-03T03:49:27.000Z | 2020-12-03T03:49:27.000Z | defmodule CheckerMalWeb.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... | 28.681818 | 72 | 0.729002 |
2d24e9cb9e1900deb0a2265c0894631c1ce27cec | 1,580 | exs | Elixir | phoenixphun/newphx/mix.exs | guthb/fp | 2a754adfcf2eb60e80016a23de81fad83993bafe | [
"MIT"
] | null | null | null | phoenixphun/newphx/mix.exs | guthb/fp | 2a754adfcf2eb60e80016a23de81fad83993bafe | [
"MIT"
] | null | null | null | phoenixphun/newphx/mix.exs | guthb/fp | 2a754adfcf2eb60e80016a23de81fad83993bafe | [
"MIT"
] | null | null | null | defmodule Newphx.MixProject do
use Mix.Project
def project do
[
app: :newphx,
version: "0.1.0",
elixir: "~> 1.7",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
start_permanent: Mix.env() == :prod,
aliases: aliases(),
... | 25.483871 | 84 | 0.588608 |
2d24ebba070041651f49429067272e04c4260cd1 | 568 | exs | Elixir | test/views/error_view_test.exs | whiterook6/learning_pheonix | 5825ddc484c99ca828c42116d9b16806fd85a76e | [
"MIT"
] | null | null | null | test/views/error_view_test.exs | whiterook6/learning_pheonix | 5825ddc484c99ca828c42116d9b16806fd85a76e | [
"MIT"
] | null | null | null | test/views/error_view_test.exs | whiterook6/learning_pheonix | 5825ddc484c99ca828c42116d9b16806fd85a76e | [
"MIT"
] | null | null | null | defmodule Penguin.ErrorViewTest do
use Penguin.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(Penguin.ErrorView, "404.html", []) ==
"Page not found"
end
test "render 500.html" do
... | 25.818182 | 66 | 0.676056 |
2d24f3bb9fcf084ea7a96a998583fc814a36405a | 600 | ex | Elixir | lib/instream/connection/supervisor.ex | coder-from-hell/instream | f062e924b74a403e0f41b5374d9ed0e00ae59507 | [
"Apache-2.0"
] | null | null | null | lib/instream/connection/supervisor.ex | coder-from-hell/instream | f062e924b74a403e0f41b5374d9ed0e00ae59507 | [
"Apache-2.0"
] | null | null | null | lib/instream/connection/supervisor.ex | coder-from-hell/instream | f062e924b74a403e0f41b5374d9ed0e00ae59507 | [
"Apache-2.0"
] | null | null | null | defmodule Instream.Connection.Supervisor do
@moduledoc false
use Supervisor
@doc false
def start_link(conn), do: Supervisor.start_link(__MODULE__, conn, name: conn)
@doc false
def init(conn) do
:ok =
case conn.config(:init) do
nil -> :ok
{mod, fun} -> apply(mod, fun, [conn])
... | 20.689655 | 90 | 0.635 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.