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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ff5f8e97d5d87da740cf4b4d572bdc1e02546ae7 | 2,076 | ex | Elixir | clients/cloud_identity/lib/google_api/cloud_identity/v1/model/google_apps_cloudidentity_devices_v1_list_devices_response.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/cloud_identity/lib/google_api/cloud_identity/v1/model/google_apps_cloudidentity_devices_v1_list_devices_response.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/cloud_identity/lib/google_api/cloud_identity/v1/model/google_apps_cloudidentity_devices_v1_list_devices_response.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 34.6 | 166 | 0.751445 |
ff5fab2b0dbd0bc9d0f0d9159c398564e46a6983 | 405 | exs | Elixir | priv/repo/migrations/20210324043952_create_characterizations.exs | conradwt/flix-elixir | e4d6bf6fd79be12fbed6fb6250f78e929247c1a4 | [
"MIT"
] | 3 | 2021-03-21T23:52:16.000Z | 2021-06-02T03:47:00.000Z | priv/repo/migrations/20210324043952_create_characterizations.exs | conradwt/flix-elixir | e4d6bf6fd79be12fbed6fb6250f78e929247c1a4 | [
"MIT"
] | 44 | 2021-04-09T04:04:13.000Z | 2022-03-29T06:29:37.000Z | priv/repo/migrations/20210324043952_create_characterizations.exs | conradwt/flix-elixir | e4d6bf6fd79be12fbed6fb6250f78e929247c1a4 | [
"MIT"
] | null | null | null | defmodule Flix.Repo.Migrations.CreateCharacterizations do
use Ecto.Migration
def change do
create table(:characterizations) do
add :movie_id, references(:movies, on_delete: :delete_all)
add :genre_id, references(:genres, on_delete: :delete_all)
timestamps()
end
create index(:charact... | 25.3125 | 64 | 0.720988 |
ff602837e8de31be2fec7c7a9c769dba3e7dea54 | 1,295 | ex | Elixir | DL-DLR2-006/DL-DLR2-006.ELEMENT-IoT.ex | Realscrat/decentlab-decoders | 3ca5006cd85e3772a15a1b3fff3922c50979eeb6 | [
"MIT"
] | 13 | 2020-01-18T22:08:44.000Z | 2022-02-06T14:19:57.000Z | DL-DLR2-006/DL-DLR2-006.ELEMENT-IoT.ex | Realscrat/decentlab-decoders | 3ca5006cd85e3772a15a1b3fff3922c50979eeb6 | [
"MIT"
] | 4 | 2019-05-10T07:17:41.000Z | 2021-10-20T16:24:04.000Z | DL-DLR2-006/DL-DLR2-006.ELEMENT-IoT.ex | Realscrat/decentlab-decoders | 3ca5006cd85e3772a15a1b3fff3922c50979eeb6 | [
"MIT"
] | 15 | 2019-06-04T06:13:32.000Z | 2022-02-15T07:28:52.000Z |
# https://www.decentlab.com/products/analog-or-digital-sensor-device-for-lorawan
defmodule Parser do
use Platform.Parsing.Behaviour
## test payloads
# 0211110003409a00860c54
# 02111100020c54
def fields do
[
%{field: "potentiometer_position", display: "Potentiometer position", unit: ""},
... | 26.979167 | 87 | 0.564479 |
ff602fe4440d8aa76f47ae215238a8a0c03dd9c2 | 8,697 | ex | Elixir | lib/epi_contacts/commcare_sms_trigger.ex | RatioPBC/epi-contacts | 6c43eea52cbfe2097f48b02e3d0c8fce3b46f1ee | [
"Apache-2.0"
] | null | null | null | lib/epi_contacts/commcare_sms_trigger.ex | RatioPBC/epi-contacts | 6c43eea52cbfe2097f48b02e3d0c8fce3b46f1ee | [
"Apache-2.0"
] | 13 | 2021-06-29T04:35:41.000Z | 2022-02-09T04:25:39.000Z | lib/epi_contacts/commcare_sms_trigger.ex | RatioPBC/epi-contacts | 6c43eea52cbfe2097f48b02e3d0c8fce3b46f1ee | [
"Apache-2.0"
] | null | null | null | defmodule EpiContacts.CommcareSmsTrigger do
@moduledoc """
Encapsulates the logic as to if a case should be updated with a secure_id.
"""
use Oban.Worker, queue: :default
require Logger
alias EpiContacts.{Commcare, Encryption, PatientCase}
defmodule PatientCaseWrapper do
@moduledoc """
A stuct ... | 31.397112 | 110 | 0.726227 |
ff6053a21f2dfea6638b024a148fe637934b964d | 983 | ex | Elixir | lib/shopify_api/bulk/telemetry.ex | tres/elixir-shopifyapi | 57f379fca062126c8752fcba226f34807370403f | [
"Apache-2.0"
] | 18 | 2019-06-07T13:36:39.000Z | 2021-08-03T21:06:36.000Z | lib/shopify_api/bulk/telemetry.ex | tres/elixir-shopifyapi | 57f379fca062126c8752fcba226f34807370403f | [
"Apache-2.0"
] | 158 | 2018-08-30T22:09:00.000Z | 2021-09-22T01:18:59.000Z | lib/shopify_api/bulk/telemetry.ex | tres/elixir-shopifyapi | 57f379fca062126c8752fcba226f34807370403f | [
"Apache-2.0"
] | 4 | 2020-09-05T00:48:46.000Z | 2020-09-30T15:53:50.000Z | defmodule ShopifyAPI.Bulk.Telemetry do
@moduledoc """
Helper module handle instrumentation with telemetry
"""
def send(module_name, token, data, bulk_id \\ nil)
def send(
module_name,
%{app_name: app, shop_name: shop} = _token,
{:error, type, reason},
bulk_id
) do
m... | 19.66 | 53 | 0.582909 |
ff605b4cd28eaea3b4075659e9004fcad515bfc3 | 458 | ex | Elixir | todo/lib/todo_web/live/item_live/show.ex | IITA-DMCS-2122/iita_elixir | e636360edd96f0bfcde91eec212a467f10186437 | [
"MIT"
] | null | null | null | todo/lib/todo_web/live/item_live/show.ex | IITA-DMCS-2122/iita_elixir | e636360edd96f0bfcde91eec212a467f10186437 | [
"MIT"
] | 22 | 2021-12-11T13:12:45.000Z | 2022-01-29T14:20:03.000Z | todo/lib/todo_web/live/item_live/show.ex | IITA-DMCS-2122/iita_elixir | e636360edd96f0bfcde91eec212a467f10186437 | [
"MIT"
] | null | null | null | defmodule TodoWeb.ItemLive.Show do
use TodoWeb, :live_view
alias Todo.Todos
@impl true
def mount(_params, _session, socket) do
{:ok, socket}
end
@impl true
def handle_params(%{"id" => id}, _, socket) do
{:noreply,
socket
|> assign(:page_title, page_title(socket.assigns.live_action))
... | 20.818182 | 67 | 0.655022 |
ff605e2048f5ae99be291512e145b5c76bd586ac | 1,022 | ex | Elixir | plugins/ucc_chat/lib/ucc_chat_web/flex_bar/tab/user_info.ex | josephkabraham/ucx_ucc | 0dbd9e3eb5940336b4870cff033482ceba5f6ee7 | [
"MIT"
] | null | null | null | plugins/ucc_chat/lib/ucc_chat_web/flex_bar/tab/user_info.ex | josephkabraham/ucx_ucc | 0dbd9e3eb5940336b4870cff033482ceba5f6ee7 | [
"MIT"
] | null | null | null | plugins/ucc_chat/lib/ucc_chat_web/flex_bar/tab/user_info.ex | josephkabraham/ucx_ucc | 0dbd9e3eb5940336b4870cff033482ceba5f6ee7 | [
"MIT"
] | null | null | null | defmodule UccChatWeb.FlexBar.Tab.UserInfo do
use UccChatWeb.FlexBar.Helpers
alias UccChat.{Channel, Direct}
alias UcxUcc.{Accounts, TabBar.Tab}
def add_buttons do
TabBar.add_button Tab.new(
__MODULE__,
~w[direct],
"user-info",
~g"User Info",
"icon-user",
View,
"us... | 24.926829 | 127 | 0.62818 |
ff6078f2a9812f3dd93f06d833950ac9c9c88d66 | 834 | exs | Elixir | projects/api/priv/repo/migrations/20171203172447_add_users_table.exs | strattadb/margaret | dde5d7b42f6d9b4d320069a0117136dae03b13b5 | [
"MIT"
] | 82 | 2017-11-06T01:00:55.000Z | 2020-12-09T10:35:29.000Z | projects/api/priv/repo/migrations/20171203172447_add_users_table.exs | dbstratta/margaret | dde5d7b42f6d9b4d320069a0117136dae03b13b5 | [
"MIT"
] | 98 | 2017-11-06T22:57:32.000Z | 2020-07-03T04:46:39.000Z | projects/api/priv/repo/migrations/20171203172447_add_users_table.exs | strattadb/margaret | dde5d7b42f6d9b4d320069a0117136dae03b13b5 | [
"MIT"
] | 10 | 2017-11-16T05:31:58.000Z | 2020-10-29T18:02:35.000Z | defmodule Margaret.Repo.Migrations.AddUsersTable do
@moduledoc false
use Ecto.Migration
@doc false
def change do
create table(:users) do
add(:username, :string, size: 64, null: false)
add(:email, :string, size: 254, null: false)
add(:unverified_email, :string, size: 254)
add(:fir... | 23.166667 | 62 | 0.631894 |
ff607c4cbea894c01bbe67dc568b170e43347e7b | 851 | ex | Elixir | lib/one_word/command/start_story.ex | Bentheburrito/onewordstorybot | 2d75f3a59a952d141cfa4306fb14c902815cbff5 | [
"MIT"
] | null | null | null | lib/one_word/command/start_story.ex | Bentheburrito/onewordstorybot | 2d75f3a59a952d141cfa4306fb14c902815cbff5 | [
"MIT"
] | null | null | null | lib/one_word/command/start_story.ex | Bentheburrito/onewordstorybot | 2d75f3a59a952d141cfa4306fb14c902815cbff5 | [
"MIT"
] | null | null | null | defmodule OneWord.Command.StartStory do
@behaviour OneWord.Command
alias Nostrum.Api
require Logger
@impl OneWord.Command
def run(%{channel_id: channel_id} = message, _args) do
with {:ok, game} <- OneWord.GameHandler.get_game(channel_id),
:ok <- OneWord.Game.start_game(game.pid, message.author.id)
do
... | 32.730769 | 132 | 0.741481 |
ff6084df2e4c6e65954e3f8ea4a25fa99081844a | 565 | ex | Elixir | lib/ccb_api_ex/model/family.ex | msawka/ccb_api_ex | 5a63eece2218cbe91740b9dea50f50a5036f081f | [
"Apache-2.0"
] | null | null | null | lib/ccb_api_ex/model/family.ex | msawka/ccb_api_ex | 5a63eece2218cbe91740b9dea50f50a5036f081f | [
"Apache-2.0"
] | null | null | null | lib/ccb_api_ex/model/family.ex | msawka/ccb_api_ex | 5a63eece2218cbe91740b9dea50f50a5036f081f | [
"Apache-2.0"
] | null | null | null | defmodule CcbApiEx.Model.Family do
alias CcbApiEx.Model.Individual
defstruct id: nil,
modified: nil,
individuals: nil
def from_list(maps) do
Enum.reduce maps, [], fn(map, result) ->
result ++ [from(map)]
end
end
def from(map) do
{:ok, modified} = if map[:modified] != nil do
... | 20.178571 | 58 | 0.614159 |
ff6085e92a54667f002f3524a51053b978638582 | 1,866 | ex | Elixir | lib/akin/algorithms/tversky.ex | vanessaklee/akin | fc97befb871536b6c7ef0b35740fe6efc032c566 | [
"Apache-2.0"
] | 8 | 2021-10-31T21:24:37.000Z | 2022-02-27T05:30:24.000Z | lib/akin/algorithms/tversky.ex | vanessaklee/akin | fc97befb871536b6c7ef0b35740fe6efc032c566 | [
"Apache-2.0"
] | 1 | 2021-10-31T17:57:41.000Z | 2021-11-09T22:54:50.000Z | lib/akin/algorithms/tversky.ex | vanessaklee/akin | fc97befb871536b6c7ef0b35740fe6efc032c566 | [
"Apache-2.0"
] | null | null | null | defmodule Akin.Tversky do
@moduledoc """
Functions to calculate the Tversky index
between two strings.
"""
@behaviour Akin.Task
import Akin.Util, only: [ngram_tokenize: 2, opts: 2, intersect: 2]
alias Akin.Corpus
@default_alpha 1
@default_beta 1
@spec compare(%Corpus{}, %Corpus{}, Keyword.t()) :: ... | 35.884615 | 112 | 0.687567 |
ff60a6f4fa3d72365a19843f1e212e4b24b97654 | 3,493 | exs | Elixir | .iex.exs | phishx-docs/transform_map | 7dfb9787eb41bbeebcedffb7ede434a414538a1b | [
"MIT"
] | 3 | 2018-07-10T11:01:28.000Z | 2020-02-27T21:32:47.000Z | .iex.exs | phishx-docs/transform_map | 7dfb9787eb41bbeebcedffb7ede434a414538a1b | [
"MIT"
] | null | null | null | .iex.exs | phishx-docs/transform_map | 7dfb9787eb41bbeebcedffb7ede434a414538a1b | [
"MIT"
] | 1 | 2020-09-23T03:28:00.000Z | 2020-09-23T03:28:00.000Z | m = [%{
"_ip" => "104.41.40.73",
"country" => %{
"alpha3Code" => "BRA",
"callingCodes" => ["55"],
"capital" => "Brasília",
"currencies" => [
%{"code" => "BRL", "name" => "Brazilian real", "symbol" => "R$"},
%{"code" => "BRL", "name" => "Brazilian real", "symbol" => "R$"}
],
"flag... | 26.664122 | 72 | 0.423705 |
ff60b16a2e16ac0b3133db9e072515b327cd1a45 | 5,170 | exs | Elixir | elixir/high-score/test/high_score_test.exs | hoangbits/exercism | 11a527d63526e07b1eba114ebeb2fddca8f9419c | [
"MIT"
] | 343 | 2017-06-22T16:28:28.000Z | 2022-03-25T21:33:32.000Z | elixir/high-score/test/high_score_test.exs | hoangbits/exercism | 11a527d63526e07b1eba114ebeb2fddca8f9419c | [
"MIT"
] | 583 | 2017-06-19T10:48:40.000Z | 2022-03-28T21:43:12.000Z | elixir/high-score/test/high_score_test.exs | hoangbits/exercism | 11a527d63526e07b1eba114ebeb2fddca8f9419c | [
"MIT"
] | 228 | 2017-07-05T07:09:32.000Z | 2022-03-27T08:59:08.000Z | defmodule HighScoreTest do
use ExUnit.Case
# Trivia: Scores used in this test suite are based on lines of code
# added to the elixir-lang/elixir github repository as of Apr 27, 2020.
@tag task_id: 1
test "new/1 result in empty score map" do
assert HighScore.new() == %{}
end
describe "add_player/2" ... | 27.647059 | 89 | 0.603675 |
ff60f53c9d5d7039d88a10ff86127ce88af0fb26 | 260 | exs | Elixir | test/test_helper.exs | ashneyderman/ecto | 16f27f64c5ca2480568fad10e40c26522ffbf793 | [
"Apache-2.0"
] | null | null | null | test/test_helper.exs | ashneyderman/ecto | 16f27f64c5ca2480568fad10e40c26522ffbf793 | [
"Apache-2.0"
] | null | null | null | test/test_helper.exs | ashneyderman/ecto | 16f27f64c5ca2480568fad10e40c26522ffbf793 | [
"Apache-2.0"
] | null | null | null | # For tasks/generators testing
Mix.start()
Mix.shell(Mix.Shell.Process)
System.put_env("ECTO_EDITOR", "")
Logger.configure(level: :info)
# Commonly used support feature
Code.require_file "../integration_test/support/file_helpers.exs", __DIR__
ExUnit.start()
| 23.636364 | 73 | 0.776923 |
ff612e4a8cb277a4c3f0d22f855dec711c54c94a | 264 | exs | Elixir | lib/elixir/test/elixir/node_test.exs | jbcrail/elixir | f30ef15d9d028a6d0f74d10c2bb320d5f8501bdb | [
"Apache-2.0"
] | 1 | 2015-02-23T00:01:48.000Z | 2015-02-23T00:01:48.000Z | lib/elixir/test/elixir/node_test.exs | jbcrail/elixir | f30ef15d9d028a6d0f74d10c2bb320d5f8501bdb | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/node_test.exs | jbcrail/elixir | f30ef15d9d028a6d0f74d10c2bb320d5f8501bdb | [
"Apache-2.0"
] | 1 | 2020-12-07T08:04:16.000Z | 2020-12-07T08:04:16.000Z | Code.require_file "test_helper.exs", __DIR__
defmodule NodeTest do
use ExUnit.Case
test "start/3 and stop/0" do
assert Node.stop == {:error, :not_found}
assert {:ok, _} = Node.start(:hello, :shortnames, 15000)
assert Node.stop() == :ok
end
end
| 22 | 60 | 0.670455 |
ff61384309f481826a31745360e89de631701048 | 1,717 | ex | Elixir | clients/app_engine/lib/google_api/app_engine/v1/model/error_handler.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/app_engine/lib/google_api/app_engine/v1/model/error_handler.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/app_engine/lib/google_api/app_engine/v1/model/error_handler.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... | 33.666667 | 134 | 0.750146 |
ff6176d9cb702900104fa05c60050fcb52c32153 | 2,122 | exs | Elixir | config/dev.exs | hassanshaikley/ascii-quest | 8b3b3af3b9c6c59b8155fe2e6cb2a794033c29f1 | [
"MIT"
] | 8 | 2019-01-15T09:31:05.000Z | 2020-04-20T13:59:01.000Z | config/dev.exs | hassanshaikley/ascii-quest | 8b3b3af3b9c6c59b8155fe2e6cb2a794033c29f1 | [
"MIT"
] | 2 | 2019-01-06T02:53:44.000Z | 2019-05-30T20:30:20.000Z | config/dev.exs | hassanshaikley/ascii-quest | 8b3b3af3b9c6c59b8155fe2e6cb2a794033c29f1 | [
"MIT"
] | 1 | 2019-01-04T04:37:21.000Z | 2019-01-04T04:37:21.000Z | use Mix.Config
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with webpack to recompile .js and .css sources.
config :stabby_flies, StabbyFliesWeb.Endpoint,
http: [p... | 27.921053 | 68 | 0.692743 |
ff61a1e0430d3d493ebaf3bda30c5bd2624e901c | 11,243 | exs | Elixir | test/protobuf/wire_test.exs | zolakeith/protobuf | 2d412b260c48be8f90e05408f8569cef2f6d3ace | [
"MIT"
] | 419 | 2017-04-02T13:10:51.000Z | 2020-11-15T15:53:17.000Z | test/protobuf/wire_test.exs | zolakeith/protobuf | 2d412b260c48be8f90e05408f8569cef2f6d3ace | [
"MIT"
] | 101 | 2020-11-22T20:20:11.000Z | 2022-03-06T16:09:26.000Z | test/protobuf/wire_test.exs | zolakeith/protobuf | 2d412b260c48be8f90e05408f8569cef2f6d3ace | [
"MIT"
] | 83 | 2017-07-24T21:50:04.000Z | 2020-11-15T08:52:34.000Z | defmodule Protobuf.WireTest do
use ExUnit.Case, async: true
alias Protobuf.Wire
describe "encode/2" do
test "varint" do
assert encode(:int32, 42) == <<42>>
end
test "min int32" do
assert encode(:int32, -2_147_483_648) ==
<<128, 128, 128, 128, 248, 255, 255, 255, 255, 1>>
... | 27.624079 | 98 | 0.597883 |
ff61a9a25e7fe8cdf8e0934c63e5da4fee72461b | 349 | exs | Elixir | config/config.exs | florinpatrascu/callisto_demo | 4d0a7c2d491233a18c075eaa4fc3fa37b581334f | [
"Apache-2.0"
] | null | null | null | config/config.exs | florinpatrascu/callisto_demo | 4d0a7c2d491233a18c075eaa4fc3fa37b581334f | [
"Apache-2.0"
] | null | null | null | config/config.exs | florinpatrascu/callisto_demo | 4d0a7c2d491233a18c075eaa4fc3fa37b581334f | [
"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.
use Mix.Config
config :callisto_demo, CallistoDemo.Graph,
adapter: Callisto.Adapters.Neo4j,
url: "http://localhost:7474",
pool_size: 5,
max_overflow: 2,
timeout: 30
if Mix.env == :test, ... | 26.846154 | 61 | 0.744986 |
ff61d2e2975b3ebf84d51ecc262952e67a6085c2 | 10,581 | ex | Elixir | clients/ad_sense/lib/google_api/ad_sense/v14/api/reports.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/ad_sense/lib/google_api/ad_sense/v14/api/reports.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/ad_sense/lib/google_api/ad_sense/v14/api/reports.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 47.236607 | 246 | 0.641244 |
ff61eaaccf5d46b266ceed3604dfc5a1ca91b425 | 4,980 | exs | Elixir | test/prepay_and_use_web/controllers/user_settings_controller_test.exs | manojsamanta/stripe-prepay-and-use | 511b33cd93d619052fe0f6ecbf4374474f6a96e6 | [
"MIT"
] | null | null | null | test/prepay_and_use_web/controllers/user_settings_controller_test.exs | manojsamanta/stripe-prepay-and-use | 511b33cd93d619052fe0f6ecbf4374474f6a96e6 | [
"MIT"
] | null | null | null | test/prepay_and_use_web/controllers/user_settings_controller_test.exs | manojsamanta/stripe-prepay-and-use | 511b33cd93d619052fe0f6ecbf4374474f6a96e6 | [
"MIT"
] | null | null | null | defmodule PrepayAndUseWeb.UserSettingsControllerTest do
use PrepayAndUseWeb.ConnCase, async: true
alias PrepayAndUse.Accounts
import PrepayAndUse.AccountsFixtures
setup :register_and_log_in_user
describe "GET /users/settings" do
test "renders settings page", %{conn: conn} do
conn = get(conn, Rout... | 38.307692 | 96 | 0.652209 |
ff620350fbc2b00a8cb1bcdcfdb4bdd9979aba5e | 4,129 | ex | Elixir | apps/language_server/lib/language_server/providers/code_lens/type_spec.ex | SerenityIK/elixir-ls | 9569197be87809c241360a6ef1f5a9fffd25ab74 | [
"Apache-2.0"
] | null | null | null | apps/language_server/lib/language_server/providers/code_lens/type_spec.ex | SerenityIK/elixir-ls | 9569197be87809c241360a6ef1f5a9fffd25ab74 | [
"Apache-2.0"
] | null | null | null | apps/language_server/lib/language_server/providers/code_lens/type_spec.ex | SerenityIK/elixir-ls | 9569197be87809c241360a6ef1f5a9fffd25ab74 | [
"Apache-2.0"
] | null | null | null | defmodule ElixirLS.LanguageServer.Providers.CodeLens.TypeSpec do
@moduledoc """
Collects the success typings inferred by Dialyzer, translates the syntax to Elixir, and shows them
inline in the editor as @spec suggestions.
The server, unfortunately, has no way to force the client to refresh the @spec code lense... | 30.360294 | 101 | 0.562364 |
ff6206e936d15253ab12fad16d4d7bfcb48673d5 | 11,728 | ex | Elixir | clients/digital_asset_links/lib/google_api/digital_asset_links/v1/api/assetlinks.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/digital_asset_links/lib/google_api/digital_asset_links/v1/api/assetlinks.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/digital_asset_links/lib/google_api/digital_asset_links/v1/api/assetlinks.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... | 47.869388 | 196 | 0.638984 |
ff6229932de5bdedc172fcc7ec4fa4a3272cd86b | 3,646 | ex | Elixir | lib/river/encoder.ex | peburrows/river | e8968535d02a86e70a7942a690c8e461fed55913 | [
"MIT"
] | 86 | 2016-08-19T21:59:28.000Z | 2022-01-31T20:14:18.000Z | lib/river/encoder.ex | peburrows/river | e8968535d02a86e70a7942a690c8e461fed55913 | [
"MIT"
] | 7 | 2016-09-27T14:44:16.000Z | 2017-08-08T14:57:45.000Z | lib/river/encoder.ex | peburrows/river | e8968535d02a86e70a7942a690c8e461fed55913 | [
"MIT"
] | 4 | 2016-09-26T10:57:24.000Z | 2018-04-03T14:30:19.000Z | defmodule River.Encoder do
require River.FrameTypes
alias River.{Frame, FrameTypes}
alias River.Frame.Settings
def encode(%Frame{} = frame, ctx \\ nil) do
frame
|> payload(ctx)
|> header
|> compile
end
defp compile(%Frame{__header: head, __payload: body}) do
head <> body
end
defp ... | 28.263566 | 97 | 0.585573 |
ff624ff6b3802968c86bbfeaea0620f49e09d511 | 1,200 | ex | Elixir | backend/lib/caffe/support/middleware/validator.ex | eeng/caffe | d85d0dd56a8204c715052ddaf3d990e47c5df0e9 | [
"MIT"
] | 7 | 2020-03-27T08:26:52.000Z | 2021-08-29T09:50:31.000Z | backend/lib/caffe/support/middleware/validator.ex | eeng/caffe | d85d0dd56a8204c715052ddaf3d990e47c5df0e9 | [
"MIT"
] | null | null | null | backend/lib/caffe/support/middleware/validator.ex | eeng/caffe | d85d0dd56a8204c715052ddaf3d990e47c5df0e9 | [
"MIT"
] | null | null | null | defmodule Caffe.Middleware.Validator do
@behaviour Commanded.Middleware
alias Commanded.Middleware.Pipeline
import Pipeline
def before_dispatch(%Pipeline{command: command} = pipeline) do
changeset = build_changeset(command)
case Ecto.Changeset.apply_action(changeset, :insert) do
{:ok, command} ... | 27.906977 | 92 | 0.685 |
ff62600c00f99ca733e648589bde975759462cf7 | 373 | exs | Elixir | example of using ExCrypto.exs | pmarreck/elixir-snippets | 5f5ee26087bc2ded4e71c4c3eeff1231310ff358 | [
"BSD-3-Clause"
] | 34 | 2015-02-27T14:41:12.000Z | 2021-09-26T06:06:18.000Z | example of using ExCrypto.exs | pmarreck/elixir-snippets | 5f5ee26087bc2ded4e71c4c3eeff1231310ff358 | [
"BSD-3-Clause"
] | null | null | null | example of using ExCrypto.exs | pmarreck/elixir-snippets | 5f5ee26087bc2ded4e71c4c3eeff1231310ff358 | [
"BSD-3-Clause"
] | 3 | 2016-02-05T16:09:41.000Z | 2017-10-21T15:47:04.000Z | arbitrary_data = %{id: 6, name: "test"}
clear_text = :erlang.term_to_binary(arbitrary_data)
{:ok, aes_256_key} = ExCrypto.generate_aes_key(:aes_256, :bytes)
{:ok, {init_vec, cipher_text}} = ExCrypto.encrypt(aes_256_key, clear_text)
16 = String.length(init_vec)
{:ok, val} = ExCrypto.decrypt(aes_256_key, init_vec, ciphe... | 37.3 | 74 | 0.758713 |
ff62615a6eba0528dcc3494f4d42aaba0c97fd17 | 1,130 | ex | Elixir | test/support/channel_case.ex | noozo/honest_chat | b3c45f72fd9c579404d05ce308eb13a0a2997760 | [
"Apache-2.0"
] | 3 | 2021-11-19T07:18:30.000Z | 2021-12-23T22:19:48.000Z | test/support/channel_case.ex | noozo/honest_chat | b3c45f72fd9c579404d05ce308eb13a0a2997760 | [
"Apache-2.0"
] | null | null | null | test/support/channel_case.ex | noozo/honest_chat | b3c45f72fd9c579404d05ce308eb13a0a2997760 | [
"Apache-2.0"
] | null | null | null | defmodule HonestChatWeb.ChannelCase do
@moduledoc """
This module defines the test case to be used by
channel tests.
Such tests rely on `Phoenix.ChannelTest` and also
import other functionality to make it easier
to build common data structures and query the data layer.
Finally, if the test ca... | 28.974359 | 73 | 0.727434 |
ff627149f37684a55ed4365bcce55f10399feb4d | 766 | exs | Elixir | test/phoenix/transports/websocket_serializer_test.exs | misfo/phoenix | 04464429d9b958e331b2ffe0f0f5926690ab3b56 | [
"MIT"
] | 1 | 2019-06-11T20:22:21.000Z | 2019-06-11T20:22:21.000Z | test/phoenix/transports/websocket_serializer_test.exs | misfo/phoenix | 04464429d9b958e331b2ffe0f0f5926690ab3b56 | [
"MIT"
] | null | null | null | test/phoenix/transports/websocket_serializer_test.exs | misfo/phoenix | 04464429d9b958e331b2ffe0f0f5926690ab3b56 | [
"MIT"
] | 2 | 2020-08-02T04:00:17.000Z | 2020-10-07T16:07:37.000Z | defmodule Phoenix.Tranports.WebSocketSerializerTest do
use ExUnit.Case, async: true
alias Phoenix.Transports.WebSocketSerializer
alias Phoenix.Socket.Message
@msg_json [123, [[34, ["topic"], 34], 58, [34, ["t"], 34], 44, [34, ["ref"], 34], 58, "null", 44, [34, ["payload"], 34], 58, [34, ["m"], 34], 44, [34, [... | 40.315789 | 195 | 0.63577 |
ff6293da4a0b93bed3b53698bb6cfd0bf7058dfb | 882 | ex | Elixir | lib/decoding/export_section_parser.ex | ElixiumNetwork/WaspVM | 7a313825ed50720256dda6e61e83356621357963 | [
"MIT"
] | 112 | 2018-12-14T23:43:38.000Z | 2019-03-22T22:02:27.000Z | lib/decoding/export_section_parser.ex | ElixiumNetwork/Elixium-Wasm | 7a313825ed50720256dda6e61e83356621357963 | [
"MIT"
] | 21 | 2018-12-22T23:53:14.000Z | 2019-02-21T00:18:05.000Z | lib/decoding/export_section_parser.ex | ElixiumNetwork/Elixium-Wasm | 7a313825ed50720256dda6e61e83356621357963 | [
"MIT"
] | 4 | 2019-05-11T16:37:19.000Z | 2021-05-18T13:45:06.000Z | defmodule AlchemyVM.Decoder.ExportSectionParser do
alias AlchemyVM.LEB128
alias AlchemyVM.OpCodes
require IEx
@moduledoc false
def parse(section) do
{count, entries} = LEB128.decode_unsigned(section)
entries = if count > 0, do: parse_entries(entries), else: []
entries = entries |> Enum.reject(&... | 23.837838 | 73 | 0.68254 |
ff62b1e3c75897a8f45595131dd6cfbd56d9527a | 1,249 | ex | Elixir | lib/elixir_lokalise_api/config.ex | kianmeng/elixir-lokalise-api | fca59438cbd8ee960adbbce8b13cef12ddc68ef6 | [
"BSD-3-Clause"
] | 1 | 2021-09-27T09:48:29.000Z | 2021-09-27T09:48:29.000Z | lib/elixir_lokalise_api/config.ex | kianmeng/elixir-lokalise-api | fca59438cbd8ee960adbbce8b13cef12ddc68ef6 | [
"BSD-3-Clause"
] | null | null | null | lib/elixir_lokalise_api/config.ex | kianmeng/elixir-lokalise-api | fca59438cbd8ee960adbbce8b13cef12ddc68ef6 | [
"BSD-3-Clause"
] | null | null | null | defmodule ElixirLokaliseApi.Config do
@moduledoc """
Stores configuration variables used to communicate with Lokalise APIv2.
All settings also accept `{:system, "ENV_VAR_NAME"}` to read their
values from environment variables at runtime.
"""
@doc """
Returns Lokalise APIv2 token. Set it inside your `mix.... | 30.463415 | 118 | 0.709367 |
ff62c94e8f4b4476da74b9fa17f06410f0e3764e | 1,116 | exs | Elixir | implements/pascals-triangle/pascals_triangle_test.exs | MickeyOoh/Exercises | 3b34e7fdab4a09e0269d20c68531b4fb75bb7f16 | [
"MIT"
] | null | null | null | implements/pascals-triangle/pascals_triangle_test.exs | MickeyOoh/Exercises | 3b34e7fdab4a09e0269d20c68531b4fb75bb7f16 | [
"MIT"
] | 1 | 2018-06-19T18:59:41.000Z | 2018-06-19T18:59:41.000Z | implements/pascals-triangle/pascals_triangle_test.exs | MickeyOoh/Exercises | 3b34e7fdab4a09e0269d20c68531b4fb75bb7f16 | [
"MIT"
] | null | null | null | #if !System.get_env("EXERCISM_TEST_EXAMPLES") do
Code.load_file("pascals_triangle.exs", __DIR__)
#end
ExUnit.start()
#ExUnit.configure(exclude: :pending, trace: true)
defmodule PascalsTriangleTest do
use ExUnit.Case
# @tag pending
test "one row" do
assert PascalsTriangle.rows(1) == [[1]]
end
@tag ... | 17.4375 | 64 | 0.576165 |
ff62d6cc7d22db197f4ce1ec4d28134d96c76381 | 127 | ex | Elixir | lib/exkonsument/exchange.ex | ivx/ExKonsument | cce7f4f5a78c5d2910358e34649cdc70b299618d | [
"MIT"
] | 3 | 2016-08-22T12:27:09.000Z | 2021-03-17T19:24:43.000Z | lib/exkonsument/exchange.ex | ivx/ExKonsument | cce7f4f5a78c5d2910358e34649cdc70b299618d | [
"MIT"
] | 50 | 2018-05-24T08:10:43.000Z | 2021-06-28T11:59:24.000Z | lib/exkonsument/exchange.ex | ivx/ExKonsument | cce7f4f5a78c5d2910358e34649cdc70b299618d | [
"MIT"
] | null | null | null | defmodule ExKonsument.Exchange do
@moduledoc false
defstruct name: nil,
type: nil,
options: []
end
| 18.142857 | 33 | 0.606299 |
ff62f8576d7919a7067670c4e58c6cfe2b732a03 | 118,321 | ex | Elixir | lib/ecto/changeset.ex | CrazyEggInc/ecto | 790616281a787a9f5715476c62d811b8b64beedd | [
"Apache-2.0"
] | null | null | null | lib/ecto/changeset.ex | CrazyEggInc/ecto | 790616281a787a9f5715476c62d811b8b64beedd | [
"Apache-2.0"
] | null | null | null | lib/ecto/changeset.ex | CrazyEggInc/ecto | 790616281a787a9f5715476c62d811b8b64beedd | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.Changeset do
@moduledoc ~S"""
Changesets allow filtering, casting, validation and
definition of constraints when manipulating structs.
There is an example of working with changesets in the introductory
documentation in the `Ecto` module. The functions `cast/4` and
`change/2` are the usual en... | 38.415909 | 169 | 0.663618 |
ff630f4d62c5535137e72ed307b695ec9ac18a33 | 100,543 | exs | Elixir | test/validation/line_polygon_a_test.exs | codabrink/topo | f1ca4b7fe337a67285ee4c65a34fb521b119342c | [
"MIT"
] | 110 | 2016-05-05T21:09:19.000Z | 2022-03-08T05:22:16.000Z | test/validation/line_polygon_a_test.exs | codabrink/topo | f1ca4b7fe337a67285ee4c65a34fb521b119342c | [
"MIT"
] | 15 | 2016-12-01T00:32:11.000Z | 2022-01-18T13:56:37.000Z | test/validation/line_polygon_a_test.exs | codabrink/topo | f1ca4b7fe337a67285ee4c65a34fb521b119342c | [
"MIT"
] | 24 | 2016-09-19T20:06:50.000Z | 2021-06-16T06:41:10.000Z | defmodule Intersect.Validation.LinePolygonATest do
use ExUnit.Case
@tag :validation
test "05-001 - L/A-3-1: a line touching the closing point of a polygon" do
a = "LINESTRING (150 150, 40 230)" |> Geo.WKT.decode!()
b = "POLYGON ((150 150, 410 150, 280 20, 20 20, 150 150))" |> Geo.WKT.decode!()
asser... | 38.507468 | 169 | 0.606159 |
ff632b127cc401b2a7956dc6fb0dc95b662d1464 | 991 | ex | Elixir | lib/hunter/config.ex | milmazz/hunter | f84fd72ffae067da5b0ef24a86e780d3ef70ee01 | [
"Apache-2.0"
] | 38 | 2017-04-09T16:43:58.000Z | 2021-10-30T00:47:41.000Z | lib/hunter/config.ex | milmazz/hunter | f84fd72ffae067da5b0ef24a86e780d3ef70ee01 | [
"Apache-2.0"
] | 51 | 2017-04-14T13:02:42.000Z | 2022-02-28T11:16:44.000Z | lib/hunter/config.ex | milmazz/hunter | f84fd72ffae067da5b0ef24a86e780d3ef70ee01 | [
"Apache-2.0"
] | 8 | 2017-04-14T12:45:18.000Z | 2020-09-04T23:08:30.000Z | defmodule Hunter.Config do
@moduledoc """
Hunter configuration.
"""
@doc """
Returns adapter module to do run API calls.
## Examples
iex> Hunter.Config.hunter_api()
Hunter.ApiMock
"""
def hunter_api do
Application.get_env(:hunter, :hunter_api, Hunter.Api.HTTPClient)
end
@doc """... | 17.385965 | 92 | 0.635721 |
ff6330aa356b338524e32ee9484694b2fd81422f | 1,468 | ex | Elixir | deps/gettext/lib/gettext/po/translation.ex | pdamoc/cowboy_issue | 3873ffed5cc2b15ead54b2d3e95575b09ba1833a | [
"MIT"
] | null | null | null | deps/gettext/lib/gettext/po/translation.ex | pdamoc/cowboy_issue | 3873ffed5cc2b15ead54b2d3e95575b09ba1833a | [
"MIT"
] | null | null | null | deps/gettext/lib/gettext/po/translation.ex | pdamoc/cowboy_issue | 3873ffed5cc2b15ead54b2d3e95575b09ba1833a | [
"MIT"
] | null | null | null | defmodule Gettext.PO.Translation do
@moduledoc """
A struct that holds information on a translation.
This struct describes a translation that has no plural form, such as the one
in the following snippet of `.po` file:
msgid "Hello world!"
msgstr "Ciao mondo!"
Translations with a plural form are... | 29.959184 | 84 | 0.632834 |
ff633da4cbc14ad3d97767e0a6a992e8f2849c7f | 3,651 | exs | Elixir | apps/examples/test/examples/ping_pong/advisor_test.exs | yurikoval/tai | 94254b45d22fa0307b01577ff7c629c7280c0295 | [
"MIT"
] | null | null | null | apps/examples/test/examples/ping_pong/advisor_test.exs | yurikoval/tai | 94254b45d22fa0307b01577ff7c629c7280c0295 | [
"MIT"
] | 78 | 2020-10-12T06:21:43.000Z | 2022-03-28T09:02:00.000Z | apps/examples/test/examples/ping_pong/advisor_test.exs | yurikoval/tai | 94254b45d22fa0307b01577ff7c629c7280c0295 | [
"MIT"
] | null | null | null | defmodule Examples.PingPong.AdvisorTest do
use Tai.TestSupport.E2ECase, async: false
alias Tai.NewOrders.{OrderRepo, Order, Transitions}
@scenario :ping_pong
@venue :test_exchange_a
@product :btc_usd
def before_start_app, do: seed_mock_responses(@scenario)
def after_start_app, do: seed_venues(@scenario... | 41.022472 | 90 | 0.743906 |
ff634f44bbbd59fab374d17c5c6171573cf8caff | 520 | ex | Elixir | samples/client/petstore/elixir/lib/swagger_petstore/model/user.ex | bruceadams/swagger-codegen-1 | 2e5289c4d74eafd48e3a324ccdd9e39323b5fb06 | [
"Apache-2.0"
] | null | null | null | samples/client/petstore/elixir/lib/swagger_petstore/model/user.ex | bruceadams/swagger-codegen-1 | 2e5289c4d74eafd48e3a324ccdd9e39323b5fb06 | [
"Apache-2.0"
] | null | null | null | samples/client/petstore/elixir/lib/swagger_petstore/model/user.ex | bruceadams/swagger-codegen-1 | 2e5289c4d74eafd48e3a324ccdd9e39323b5fb06 | [
"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.Model.User do
@moduledoc """
"""
@derive [Poison.Encoder]
defstruct [
:"id",
:"username",
:"firstName",
... | 17.931034 | 75 | 0.653846 |
ff635f85706c1675b3ba824ff913a878d0db53a7 | 1,929 | ex | Elixir | web/models/payment.ex | harry-gao/ex-cart | 573e7f977bb3b710d11618dd215d4ddd8f819fb3 | [
"Apache-2.0"
] | 356 | 2016-03-16T12:37:28.000Z | 2021-12-18T03:22:39.000Z | web/models/payment.ex | harry-gao/ex-cart | 573e7f977bb3b710d11618dd215d4ddd8f819fb3 | [
"Apache-2.0"
] | 30 | 2016-03-16T09:19:10.000Z | 2021-01-12T08:10:52.000Z | web/models/payment.ex | harry-gao/ex-cart | 573e7f977bb3b710d11618dd215d4ddd8f819fb3 | [
"Apache-2.0"
] | 72 | 2016-03-16T13:32:14.000Z | 2021-03-23T11:27:43.000Z | defmodule Nectar.Payment do
use Nectar.Web, :model
alias __MODULE__
schema "payments" do
belongs_to :order, Nectar.Order
belongs_to :payment_method, Nectar.PaymentMethod
field :amount, :decimal
field :payment_state, :string, default: "authorized"
field :transaction_id
timestamps()
e... | 27.557143 | 83 | 0.708657 |
ff63c39f081e7f2b681b7ebaeb326b6bcfaeeb6e | 580 | ex | Elixir | lib/consumer.ex | TenTakano/Senkosan | 4ecddece5eb69ea5c3d10bd70e44c8c224b03a29 | [
"MIT"
] | null | null | null | lib/consumer.ex | TenTakano/Senkosan | 4ecddece5eb69ea5c3d10bd70e44c8c224b03a29 | [
"MIT"
] | 5 | 2020-08-10T21:45:19.000Z | 2020-08-10T22:05:14.000Z | lib/consumer.ex | TenTakano/Senkosan | 4ecddece5eb69ea5c3d10bd70e44c8c224b03a29 | [
"MIT"
] | null | null | null | defmodule Senkosan.Consumer do
@moduledoc false
use Nostrum.Consumer
alias Nostrum.Api
alias Senkosan.Util
alias Senkosan.VoiceState
@default_text_channel Application.get_env(:senkosan, :default_text_channel)
def start_link do
Consumer.start_link(__MODULE__)
end
def handle_event({:VOICE_STATE... | 20.714286 | 77 | 0.727586 |
ff63fa2bc1ede42e484a4aa645685db42e39653f | 1,654 | ex | Elixir | hello/lib/hello_web/endpoint.ex | nash-elixir/intro-to-phoenix | 46e78713a0e8dcd895ad4f22d75b40c55ae41435 | [
"MIT"
] | 1 | 2018-01-12T20:21:56.000Z | 2018-01-12T20:21:56.000Z | hello/lib/hello_web/endpoint.ex | nash-elixir/intro-to-phoenix | 46e78713a0e8dcd895ad4f22d75b40c55ae41435 | [
"MIT"
] | null | null | null | hello/lib/hello_web/endpoint.ex | nash-elixir/intro-to-phoenix | 46e78713a0e8dcd895ad4f22d75b40c55ae41435 | [
"MIT"
] | null | null | null | defmodule HelloWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :hello
socket "/socket", HelloWeb.UserSocket
# Serve at "/" the static files from "priv/static" directory.
#
# You should set gzip to true if you are running phoenix.digest
# when deploying your static files in production.
plug Plug.Static,
... | 28.517241 | 95 | 0.705562 |
ff63ffcd8d534dc25544b0488db850ed76bd0cfd | 186 | exs | Elixir | test/support/fixtures.exs | eeng/blaine | d91d94034925d64632789925ef90a198c0a1d8ea | [
"MIT"
] | null | null | null | test/support/fixtures.exs | eeng/blaine | d91d94034925d64632789925ef90a198c0a1d8ea | [
"MIT"
] | null | null | null | test/support/fixtures.exs | eeng/blaine | d91d94034925d64632789925ef90a198c0a1d8ea | [
"MIT"
] | null | null | null | defmodule Watchlater.Support.Fixtures do
def fixture(file) do
Path.dirname(__ENV__.file)
|> Path.join(["fixtures/", file])
|> File.read!()
|> Jason.decode!()
end
end
| 20.666667 | 40 | 0.639785 |
ff6401f10a4603d4f77032e7355c09a4dcdcb81b | 1,860 | ex | Elixir | lib/oban/plugins/repeater.ex | chrismo/oban | f912ccf75a1d89e02229041d578f9263d4de0232 | [
"Apache-2.0"
] | null | null | null | lib/oban/plugins/repeater.ex | chrismo/oban | f912ccf75a1d89e02229041d578f9263d4de0232 | [
"Apache-2.0"
] | 26 | 2021-07-24T21:32:21.000Z | 2022-03-23T11:55:24.000Z | lib/oban/plugins/repeater.ex | chrismo/oban | f912ccf75a1d89e02229041d578f9263d4de0232 | [
"Apache-2.0"
] | null | null | null | defmodule Oban.Plugins.Repeater do
@moduledoc """
Repeatedly send inserted messages to all registered producers to simulate polling.
This plugin is only necessary if you're running Oban in an environment where Postgres
notifications don't work, notably one of:
* Using a database connection pooler in transac... | 25.833333 | 94 | 0.660215 |
ff6423ed26e6c04af0c78065bd2f906e7cfa255a | 102 | ex | Elixir | testData/org/elixir_lang/parser_definition/matched_or_operation_parsing_test_case/MatchedCallOperation.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 1,668 | 2015-01-03T05:54:27.000Z | 2022-03-25T08:01:20.000Z | testData/org/elixir_lang/parser_definition/matched_or_operation_parsing_test_case/MatchedCallOperation.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 2,018 | 2015-01-01T22:43:39.000Z | 2022-03-31T20:13:08.000Z | testData/org/elixir_lang/parser_definition/matched_or_operation_parsing_test_case/MatchedCallOperation.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 145 | 2015-01-15T11:37:16.000Z | 2021-12-22T05:51:02.000Z | one || two positional, key: value
one ||| two positional, key: value
one or two positional, key: value | 34 | 34 | 0.72549 |
ff6425d3e6495dff93c5260f12ec7a1a27ead18c | 5,499 | ex | Elixir | coherence_demo-0.6/lib/coherence_demo_web/coherence_messages.ex | hotpyn/coherence-setup | fc10bb15d993ae0dd13a19fd178bdfb4ee13d6b6 | [
"MIT"
] | null | null | null | coherence_demo-0.6/lib/coherence_demo_web/coherence_messages.ex | hotpyn/coherence-setup | fc10bb15d993ae0dd13a19fd178bdfb4ee13d6b6 | [
"MIT"
] | null | null | null | coherence_demo-0.6/lib/coherence_demo_web/coherence_messages.ex | hotpyn/coherence-setup | fc10bb15d993ae0dd13a19fd178bdfb4ee13d6b6 | [
"MIT"
] | null | null | null | defmodule CoherenceDemoWeb.Coherence.Messages do
@moduledoc """
Application facing messages generated by the Coherence application.
This module was created by the coh.install mix task. It contains all the
messages used in the coherence application except those in other generated
files like the view and templ... | 45.825 | 108 | 0.753228 |
ff642e499a1adeb1a36f2772dda22279abfa30c8 | 191 | ex | Elixir | harbor/lib/ports/rumble/private_peer_data.ex | miapolis/port7 | 7df1223f83d055eeb6ce8f61f4af8b4f2cf33e74 | [
"MIT"
] | null | null | null | harbor/lib/ports/rumble/private_peer_data.ex | miapolis/port7 | 7df1223f83d055eeb6ce8f61f4af8b4f2cf33e74 | [
"MIT"
] | null | null | null | harbor/lib/ports/rumble/private_peer_data.ex | miapolis/port7 | 7df1223f83d055eeb6ce8f61f4af8b4f2cf33e74 | [
"MIT"
] | null | null | null | defmodule Ports.Rumble.PrivatePeerData do
alias Ports.Rumble.TileData
@derive Jason.Encoder
defstruct hand: []
@type t :: %__MODULE__{
hand: [TileData.t()]
}
end
| 15.916667 | 41 | 0.643979 |
ff6430a3d13270364b22b4c4e1e067aba439fbd4 | 2,095 | exs | Elixir | exercises/wordy/wordy_test.exs | jerith/elixir | 9a3f2a2fbee26a7b6a6b3ad74a9e6d1ff2495ed4 | [
"Apache-2.0"
] | null | null | null | exercises/wordy/wordy_test.exs | jerith/elixir | 9a3f2a2fbee26a7b6a6b3ad74a9e6d1ff2495ed4 | [
"Apache-2.0"
] | null | null | null | exercises/wordy/wordy_test.exs | jerith/elixir | 9a3f2a2fbee26a7b6a6b3ad74a9e6d1ff2495ed4 | [
"Apache-2.0"
] | 1 | 2018-07-19T23:43:56.000Z | 2018-07-19T23:43:56.000Z | if !System.get_env("EXERCISM_TEST_EXAMPLES") do
Code.load_file("wordy.exs", __DIR__)
end
ExUnit.start()
ExUnit.configure(exclude: :pending, trace: true)
defmodule WordyTest do
use ExUnit.Case
test "addition" do
assert Wordy.answer("What is 1 plus 1?") == 2
end
@tag :pending
test "more addition" do
... | 22.287234 | 77 | 0.658234 |
ff643ff92c18d5b9d765cb49d7160161a2b50c33 | 7,970 | ex | Elixir | lib/bn/fqp.ex | ayrat555/bn | 68e1504e4e1524ffbc4a6277829e8ada7108cb9a | [
"MIT"
] | 1 | 2018-10-27T20:33:36.000Z | 2018-10-27T20:33:36.000Z | lib/bn/fqp.ex | ayrat555/bn | 68e1504e4e1524ffbc4a6277829e8ada7108cb9a | [
"MIT"
] | 2 | 2022-02-28T13:20:14.000Z | 2022-03-28T13:23:29.000Z | lib/bn/fqp.ex | ayrat555/bn | 68e1504e4e1524ffbc4a6277829e8ada7108cb9a | [
"MIT"
] | 1 | 2019-05-02T02:29:37.000Z | 2019-05-02T02:29:37.000Z | defmodule BN.FQP do
defstruct [:coef, :modulus_coef, :dim]
alias BN.FQ
@type t :: %__MODULE__{
coef: [FQ.t()],
modulus_coef: [integer()]
}
@spec new([integer()], [integer()], keyword()) :: t() | no_return
def new(coef, modulus_coef, params \\ []) do
modulus = Keyword.get(par... | 25.79288 | 98 | 0.547553 |
ff6443537e1bef2815c4da826719cf2e0f926d87 | 5,234 | ex | Elixir | lib/spandex_tesla.ex | leodeoliveirasilva/spandex_tesla | 6b5029996696542ba24c5a0c97c0bb0a2d2a077f | [
"Apache-2.0"
] | null | null | null | lib/spandex_tesla.ex | leodeoliveirasilva/spandex_tesla | 6b5029996696542ba24c5a0c97c0bb0a2d2a077f | [
"Apache-2.0"
] | null | null | null | lib/spandex_tesla.ex | leodeoliveirasilva/spandex_tesla | 6b5029996696542ba24c5a0c97c0bb0a2d2a077f | [
"Apache-2.0"
] | null | null | null | defmodule SpandexTesla do
@external_resource "README.md"
@moduledoc "README.md"
|> File.read!()
|> String.split("<!-- MDOC !-->")
|> Enum.fetch!(1)
defmodule Error do
@moduledoc """
Struct used to identify the errors.
"""
defexception [:message]
end
@do... | 27.547368 | 95 | 0.617692 |
ff64499d7e77d82cdae0eb1111646c21f4ab1f26 | 880 | ex | Elixir | clients/logging/lib/google_api/logging/v2/metadata.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/logging/lib/google_api/logging/v2/metadata.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/logging/lib/google_api/logging/v2/metadata.ex | dazuma/elixir-google-api | 6a9897168008efe07a6081d2326735fe332e522c | [
"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.592593 | 74 | 0.757955 |
ff646d1d8d1946fbba3c4977f2d60bcaeba22ea2 | 1,696 | exs | Elixir | test/bintree_test.exs | wmean-spec/bintree | 881dca96437ea67bf588587f0f924cd9c9efcdbe | [
"MIT"
] | null | null | null | test/bintree_test.exs | wmean-spec/bintree | 881dca96437ea67bf588587f0f924cd9c9efcdbe | [
"MIT"
] | null | null | null | test/bintree_test.exs | wmean-spec/bintree | 881dca96437ea67bf588587f0f924cd9c9efcdbe | [
"MIT"
] | null | null | null | defmodule BintreeTest do
use ExUnit.Case
doctest Bintree
describe "creating bintree" do
test "using value" do
assert Bintree.new(:some_value) == %Bintree{value: :some_value}
end
test "using three values" do
assert Bintree.new(1, 2, 3) == %Bintree{
value: 1,
... | 24.228571 | 97 | 0.519458 |
ff648b4b87ad46b48b9f8eeef93cdd62707a8c4d | 1,971 | exs | Elixir | test/bandit/initial_handler_test.exs | mtrudel/bandit | 9b1e0f66637a16fb18921bb29b6b577938b4eb07 | [
"MIT"
] | 226 | 2020-05-18T09:36:32.000Z | 2022-03-30T00:25:51.000Z | test/bandit/initial_handler_test.exs | mtrudel/bandit | 9b1e0f66637a16fb18921bb29b6b577938b4eb07 | [
"MIT"
] | 11 | 2021-10-11T13:48:24.000Z | 2022-03-05T20:18:11.000Z | test/bandit/initial_handler_test.exs | mtrudel/bandit | 9b1e0f66637a16fb18921bb29b6b577938b4eb07 | [
"MIT"
] | 7 | 2020-05-18T09:36:35.000Z | 2022-02-08T11:12:16.000Z | defmodule InitialHandlerTest do
use ExUnit.Case, async: true
use ServerHelpers
use FinchHelpers
def report_version(conn) do
body = "#{get_http_protocol(conn)} #{conn.scheme}"
send_resp(conn, 200, body)
end
describe "HTTP/1.x handling over TCP" do
setup :http_server
setup :finch_http1_clien... | 30.323077 | 97 | 0.663623 |
ff64900adc83e7fa1aa2764b4965448276fb057c | 3,336 | exs | Elixir | test/currencyconverter/transactions_test.exs | Aguiar575/Currency-ConvertEX | 886181476c49bd068df5450ab98dcb885ac55746 | [
"MIT"
] | 1 | 2021-12-27T01:29:58.000Z | 2021-12-27T01:29:58.000Z | test/currencyconverter/transactions_test.exs | Aguiar575/Currency-ConvertEX | 886181476c49bd068df5450ab98dcb885ac55746 | [
"MIT"
] | null | null | null | test/currencyconverter/transactions_test.exs | Aguiar575/Currency-ConvertEX | 886181476c49bd068df5450ab98dcb885ac55746 | [
"MIT"
] | null | null | null | defmodule Currencyconverter.TransactionTest do
use Currencyconverter.DataCase
alias Currencyconverter.Transaction
describe "transactions" do
alias Currencyconverter.Transaction.Transactions
import Currencyconverter.TransactionFixtures
@invalid_attrs %{
conversion_rate: nil,
destination... | 36.26087 | 97 | 0.718525 |
ff64ab8b5f30d5514dd969618a99b438ddf07540 | 18,999 | ex | Elixir | lib/mix/lib/mix.ex | mrcasals/elixir | 8cb9ebf708f2789a0e7dbf574294b82a55dd2f21 | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix.ex | mrcasals/elixir | 8cb9ebf708f2789a0e7dbf574294b82a55dd2f21 | [
"Apache-2.0"
] | 1 | 2021-07-01T17:58:37.000Z | 2021-07-01T19:05:37.000Z | lib/mix/lib/mix.ex | mrcasals/elixir | 8cb9ebf708f2789a0e7dbf574294b82a55dd2f21 | [
"Apache-2.0"
] | null | null | null | defmodule Mix do
@moduledoc ~S"""
Mix is a build tool that provides tasks for creating, compiling,
and testing Elixir projects, managing its dependencies, and more.
## Mix.Project
The foundation of Mix is a project. A project can be defined by using
`Mix.Project` in a module, usually placed in a file name... | 30.34984 | 148 | 0.664772 |
ff64c2fbd3a8d87159e71ebd9a364f1cec2dc339 | 11,709 | ex | Elixir | lib/stripe/subscriptions/subscription.ex | esse/stripity_stripe-1 | 4434ed7911e818f483cd0eb91ca8f867165fa9f1 | [
"BSD-3-Clause"
] | null | null | null | lib/stripe/subscriptions/subscription.ex | esse/stripity_stripe-1 | 4434ed7911e818f483cd0eb91ca8f867165fa9f1 | [
"BSD-3-Clause"
] | null | null | null | lib/stripe/subscriptions/subscription.ex | esse/stripity_stripe-1 | 4434ed7911e818f483cd0eb91ca8f867165fa9f1 | [
"BSD-3-Clause"
] | 1 | 2021-09-06T14:46:19.000Z | 2021-09-06T14:46:19.000Z | defmodule Stripe.Subscription do
@moduledoc """
Work with Stripe subscription objects.
You can:
- Create a subscription
- Retrieve a subscription
- Update a subscription
- Delete a subscription
Stripe API reference: https://stripe.com/docs/api#subscription
"""
use Stripe.Entity
import Stripe.R... | 35.374622 | 98 | 0.582202 |
ff64ffbbabcd09ca1da49ced0491ce3e2ba8a338 | 898 | exs | Elixir | mix.exs | fremantle-industries/clustered | 511098794f6fbd4fce33ed79e855b46bb91e6012 | [
"MIT"
] | null | null | null | mix.exs | fremantle-industries/clustered | 511098794f6fbd4fce33ed79e855b46bb91e6012 | [
"MIT"
] | 11 | 2021-09-01T06:02:13.000Z | 2022-03-01T06:03:07.000Z | mix.exs | fremantle-industries/clustered | 511098794f6fbd4fce33ed79e855b46bb91e6012 | [
"MIT"
] | null | null | null | defmodule Clustered.MixProject do
use Mix.Project
def project do
[
app: :clustered,
version: "0.0.1",
elixir: "~> 1.11",
package: package(),
start_permanent: Mix.env() == :prod,
description: description(),
deps: deps()
]
end
def application do
[
extr... | 20.409091 | 79 | 0.548998 |
ff6533c51e98f2e1add914fc1484b45bb9f3baf6 | 695 | ex | Elixir | lib/cronex/test/date_time.ex | clangley/cronex | 32992311abb1f444dcd86f75cc4d8ad41dbb2b0a | [
"MIT"
] | 45 | 2016-11-03T11:00:33.000Z | 2021-02-03T14:59:58.000Z | lib/cronex/test/date_time.ex | clangley/cronex | 32992311abb1f444dcd86f75cc4d8ad41dbb2b0a | [
"MIT"
] | 19 | 2017-09-25T17:13:00.000Z | 2020-07-08T22:53:24.000Z | lib/cronex/test/date_time.ex | clangley/cronex | 32992311abb1f444dcd86f75cc4d8ad41dbb2b0a | [
"MIT"
] | 18 | 2017-01-20T22:00:45.000Z | 2021-06-16T12:47:53.000Z | defmodule Cronex.Test.DateTime do
@moduledoc """
Simple DateTime provider that is static and user manipulated.
"""
def start_link do
Agent.start_link(fn -> DateTime.from_unix!(0) end, name: __MODULE__)
end
@doc """
Sets the DateTime value of the provider.
"""
def set(args) when is_list(args) do
... | 23.166667 | 80 | 0.667626 |
ff653c407cea3297cd8acf55263cf1b21b497225 | 3,760 | exs | Elixir | apps/astarte_realm_management_api/test/astarte_realm_management_api_web/controllers/realm_config_controller_test.exs | Annopaolo/astarte | f8190e8bf044759a9b84bdeb5786a55b6f793a4f | [
"Apache-2.0"
] | 191 | 2018-03-30T13:23:08.000Z | 2022-03-02T12:05:32.000Z | apps/astarte_realm_management_api/test/astarte_realm_management_api_web/controllers/realm_config_controller_test.exs | Annopaolo/astarte | f8190e8bf044759a9b84bdeb5786a55b6f793a4f | [
"Apache-2.0"
] | 402 | 2018-03-30T13:37:00.000Z | 2022-03-31T16:47:10.000Z | apps/astarte_realm_management_api/test/astarte_realm_management_api_web/controllers/realm_config_controller_test.exs | Annopaolo/astarte | f8190e8bf044759a9b84bdeb5786a55b6f793a4f | [
"Apache-2.0"
] | 24 | 2018-03-30T13:29:48.000Z | 2022-02-28T11:10:26.000Z | #
# This file is part of Astarte.
#
# Copyright 2018 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... | 34.814815 | 100 | 0.726064 |
ff655d44ae1c6ff4f7e6ed38c1ad222cc988c204 | 34,151 | ex | Elixir | lib/live_element/channel.ex | gaslight/live_element | 78d4ab0a2daab470f2ffd25d446fbabb0d746afe | [
"MIT"
] | null | null | null | lib/live_element/channel.ex | gaslight/live_element | 78d4ab0a2daab470f2ffd25d446fbabb0d746afe | [
"MIT"
] | null | null | null | lib/live_element/channel.ex | gaslight/live_element | 78d4ab0a2daab470f2ffd25d446fbabb0d746afe | [
"MIT"
] | null | null | null | defmodule LiveElement.Channel do
@moduledoc false
use GenServer, restart: :temporary
require Logger
alias LiveElement.{Socket, Utils, Diff, Upload, UploadConfig, Route, Session, Lifecycle}
alias Phoenix.Socket.Message
@prefix :phoenix
@not_mounted_at_router :not_mounted_at_router
def start_link({end... | 31.738848 | 130 | 0.634154 |
ff6584f3fe58863a64653eff953180c1c92fdbc1 | 245 | ex | Elixir | lib/farmbot/http/helpers.ex | pdgonzalez872/farmbot_os | a444248f05ee8f4fe57f6a4865b942131960f76c | [
"MIT"
] | 2 | 2018-08-01T23:07:52.000Z | 2018-10-17T12:49:21.000Z | lib/farmbot/http/helpers.ex | pdgonzalez872/farmbot_os | a444248f05ee8f4fe57f6a4865b942131960f76c | [
"MIT"
] | null | null | null | lib/farmbot/http/helpers.ex | pdgonzalez872/farmbot_os | a444248f05ee8f4fe57f6a4865b942131960f76c | [
"MIT"
] | 1 | 2017-07-22T21:51:14.000Z | 2017-07-22T21:51:14.000Z | defmodule Farmbot.HTTP.Helpers do
@moduledoc """
Helpful stuff.
"""
@doc """
Helper for checking status codes
"""
defmacro is_2xx(number) do
quote do
unquote(number) > 199 and unquote(number) < 300
end
end
end
| 16.333333 | 53 | 0.628571 |
ff65a521c1845b926a196df2ffe84c1b0c8b4624 | 2,441 | ex | Elixir | lib/guardian/db/token.ex | phaibin/guardian_db | c8706b140f0aca689fdfe3c96d7fbd79ee52cdda | [
"MIT"
] | null | null | null | lib/guardian/db/token.ex | phaibin/guardian_db | c8706b140f0aca689fdfe3c96d7fbd79ee52cdda | [
"MIT"
] | null | null | null | lib/guardian/db/token.ex | phaibin/guardian_db | c8706b140f0aca689fdfe3c96d7fbd79ee52cdda | [
"MIT"
] | null | null | null | defmodule Guardian.DB.Token do
@moduledoc """
A very simple model for storing tokens generated by `Guardian`.
"""
use Ecto.Schema
import Ecto.Changeset
import Ecto.Query, only: [where: 3]
alias Guardian.DB.Token
@primary_key {:jti, :string, autogenerate: false}
@allowed_fields ~w(jti typ aud iss su... | 23.028302 | 77 | 0.623105 |
ff65be9d88579ab710eafc39eedfe46468ed74d2 | 2,471 | ex | Elixir | lib/uro/v_sekai.ex | V-Sekai/uro | 0b23da65d5c7e459efcd6b2c3d9bdf91c533b737 | [
"MIT"
] | 1 | 2022-01-11T04:05:39.000Z | 2022-01-11T04:05:39.000Z | lib/uro/v_sekai.ex | V-Sekai/uro | 0b23da65d5c7e459efcd6b2c3d9bdf91c533b737 | [
"MIT"
] | 35 | 2021-02-10T08:18:57.000Z | 2021-05-06T17:19:50.000Z | lib/uro/v_sekai.ex | V-Sekai/uro | 0b23da65d5c7e459efcd6b2c3d9bdf91c533b737 | [
"MIT"
] | null | null | null | defmodule Uro.VSekai do
@moduledoc """
The VSekai context.
"""
import Ecto.Query, warn: false
alias Uro.Repo
alias Uro.VSekai.Shard
@doc """
Returns the time in seconds a shard before is considered stale.
"""
def shard_freshness_time_in_seconds, do: 30
@doc """
Returns the list of shards.
... | 17.905797 | 99 | 0.604614 |
ff65c5f160881ae71177200cea0f6ac2e487ac46 | 1,144 | ex | Elixir | lib/config_cat/in_memory_cache.ex | kianmeng/elixir-sdk | 89fb73f6249f82ac8415246519c17ad4ade54760 | [
"MIT"
] | 14 | 2020-10-15T09:15:12.000Z | 2022-03-18T19:42:28.000Z | lib/config_cat/in_memory_cache.ex | kianmeng/elixir-sdk | 89fb73f6249f82ac8415246519c17ad4ade54760 | [
"MIT"
] | 54 | 2020-10-14T05:08:21.000Z | 2021-05-28T13:00:22.000Z | lib/config_cat/in_memory_cache.ex | kianmeng/elixir-sdk | 89fb73f6249f82ac8415246519c17ad4ade54760 | [
"MIT"
] | 5 | 2020-10-13T10:24:17.000Z | 2021-11-30T17:47:11.000Z | defmodule ConfigCat.InMemoryCache do
@moduledoc false
use GenServer
alias ConfigCat.ConfigCache
@type option :: {:cache_key, ConfigCache.key()}
@type options :: [option]
@behaviour ConfigCache
@spec start_link(options()) :: GenServer.on_start()
def start_link(options) do
name =
options
... | 20.070175 | 65 | 0.678322 |
ff660e7078f465730697ced25b4c5e09e37e88e4 | 2,532 | exs | Elixir | test/agent1_test.exs | ianrumford/elixir_state_map_api | a30388f4677e3c09e3536a5b10082ba459cf6522 | [
"MIT"
] | null | null | null | test/agent1_test.exs | ianrumford/elixir_state_map_api | a30388f4677e3c09e3536a5b10082ba459cf6522 | [
"MIT"
] | null | null | null | test/agent1_test.exs | ianrumford/elixir_state_map_api | a30388f4677e3c09e3536a5b10082ba459cf6522 | [
"MIT"
] | null | null | null | defmodule ExampleAgent1 do
# generate wrappers for three submaps
use Amlapio, agent: [:buttons, :menus, :checkboxes]
# generate *only* get, put and pop wrappers for the state itself and
# use a namer function to name the wrappers "agent_state_get",
# "agent_state_put" and "agent_state_pop"
use Amlapio, ag... | 32.883117 | 96 | 0.682859 |
ff66197dbc0ee168b6ea8269e9f3e23032f07fdc | 662 | exs | Elixir | apps/definition_schedule/test/schedule_test.exs | kennyatpillar/hindsight | e90e2150a14218e5d6fdf5874f57eb055fd2dd07 | [
"Apache-2.0"
] | null | null | null | apps/definition_schedule/test/schedule_test.exs | kennyatpillar/hindsight | e90e2150a14218e5d6fdf5874f57eb055fd2dd07 | [
"Apache-2.0"
] | null | null | null | apps/definition_schedule/test/schedule_test.exs | kennyatpillar/hindsight | e90e2150a14218e5d6fdf5874f57eb055fd2dd07 | [
"Apache-2.0"
] | null | null | null | defmodule ScheduleTest do
use Checkov
doctest Schedule
describe "new/1" do
data_test "validates #{field} against bad input" do
input = put_in(%{}, [field], value)
assert {:error, [%{input: value, path: [field]} | _]} = Schedule.new(input)
where [
[:field, :value],
[:version... | 22.827586 | 81 | 0.480363 |
ff6640ad5d52556f31945c718dff88517142b94d | 53,865 | exs | Elixir | lib/elixir/test/elixir/typespec_test.exs | samgaw/elixir | 92e8263102d95281a5aa7850b747636805f13fc9 | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/typespec_test.exs | samgaw/elixir | 92e8263102d95281a5aa7850b747636805f13fc9 | [
"Apache-2.0"
] | 1 | 2021-10-21T08:22:30.000Z | 2021-10-21T08:22:30.000Z | lib/elixir/test/elixir/typespec_test.exs | samgaw/elixir | 92e8263102d95281a5aa7850b747636805f13fc9 | [
"Apache-2.0"
] | null | null | null | Code.require_file("test_helper.exs", __DIR__)
# Holds tests for both Kernel.Typespec and Code.Typespec
defmodule TypespecTest do
use ExUnit.Case, async: true
alias TypespecTest.TypespecSample
defstruct [:hello]
defmacrop test_module(do: block) do
quote do
{:module, _, bytecode, _} =
defmodu... | 34.070209 | 109 | 0.527652 |
ff665773cb5c6214eba9f395f172aa947c18f128 | 2,193 | ex | Elixir | elixir_grpc_bench/lib/helloworld.pb.ex | scala-steward/grpc_bench | da158cd3551309857aa54feebab1d3bad3993f14 | [
"MIT"
] | null | null | null | elixir_grpc_bench/lib/helloworld.pb.ex | scala-steward/grpc_bench | da158cd3551309857aa54feebab1d3bad3993f14 | [
"MIT"
] | null | null | null | elixir_grpc_bench/lib/helloworld.pb.ex | scala-steward/grpc_bench | da158cd3551309857aa54feebab1d3bad3993f14 | [
"MIT"
] | null | null | null | defmodule Helloworld.Hello.Pet.Color do
@moduledoc false
use Protobuf, enum: true, syntax: :proto3
@type t :: integer | :BLACK | :WHITE | :BLUE | :RED | :YELLOW | :GREEN
field :BLACK, 0
field :WHITE, 1
field :BLUE, 2
field :RED, 3
field :YELLOW, 4
field :GREEN, 5
end
defmodule Helloworld.Hello.Pet ... | 23.836957 | 72 | 0.638395 |
ff665b5a2f5bf3b88a68bfb9a37633aa19b0855e | 1,962 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/backend_bucket_cdn_policy_cache_key_policy.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/backend_bucket_cdn_policy_cache_key_policy.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/backend_bucket_cdn_policy_cache_key_policy.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"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... | 39.24 | 241 | 0.743119 |
ff6690003a02f663b1ce850eab1477621f7ab543 | 521 | ex | Elixir | lib/trento/domain/host/events/host_registered.ex | trento-project/web | 3260b30c781bffbbb0e5205cd650966c4026b9ac | [
"Apache-2.0"
] | 1 | 2022-03-22T16:59:34.000Z | 2022-03-22T16:59:34.000Z | lib/trento/domain/host/events/host_registered.ex | trento-project/web | 3260b30c781bffbbb0e5205cd650966c4026b9ac | [
"Apache-2.0"
] | 24 | 2022-03-22T16:45:25.000Z | 2022-03-31T13:00:02.000Z | lib/trento/domain/host/events/host_registered.ex | trento-project/web | 3260b30c781bffbbb0e5205cd650966c4026b9ac | [
"Apache-2.0"
] | 1 | 2022-03-30T14:16:16.000Z | 2022-03-30T14:16:16.000Z | defmodule Trento.Domain.Events.HostRegistered do
@moduledoc """
This event is emitted when a host is registered.
"""
use Trento.Event
defevent do
field :host_id, Ecto.UUID
field :hostname, :string
field :ip_addresses, {:array, :string}
field :ssh_address, :string
field :agent_version, :s... | 24.809524 | 51 | 0.694818 |
ff6694e5121145000e31288f3a89a50fa2792d4a | 1,119 | exs | Elixir | config/config.exs | tsubery/seams | 99d08455a059770dabd2482dcf085d59a8d705bb | [
"Apache-2.0"
] | null | null | null | config/config.exs | tsubery/seams | 99d08455a059770dabd2482dcf085d59a8d705bb | [
"Apache-2.0"
] | null | null | null | config/config.exs | tsubery/seams | 99d08455a059770dabd2482dcf085d59a8d705bb | [
"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.
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.096774 | 73 | 0.75067 |
ff6697c75f76860dcbdf46ff95d76ecfdaee13a7 | 4,081 | exs | Elixir | test/challenge_gov/submission_documents_test.exs | smartlogic/Challenge_gov | b4203d1fcfb742dd17ecfadb9e9c56ad836d4254 | [
"CC0-1.0"
] | 9 | 2020-02-26T20:24:38.000Z | 2022-03-22T21:14:52.000Z | test/challenge_gov/submission_documents_test.exs | smartlogic/Challenge_gov | b4203d1fcfb742dd17ecfadb9e9c56ad836d4254 | [
"CC0-1.0"
] | 15 | 2020-04-22T19:33:24.000Z | 2022-03-26T15:11:17.000Z | test/challenge_gov/submission_documents_test.exs | smartlogic/Challenge_gov | b4203d1fcfb742dd17ecfadb9e9c56ad836d4254 | [
"CC0-1.0"
] | 4 | 2020-04-27T22:58:57.000Z | 2022-01-14T13:42:09.000Z | defmodule ChallengeGov.SubmissionDocumentsTest do
use ChallengeGov.DataCase
alias ChallengeGov.Submissions
alias ChallengeGov.SubmissionDocuments
alias ChallengeGov.TestHelpers.AccountHelpers
alias ChallengeGov.TestHelpers.ChallengeHelpers
alias ChallengeGov.TestHelpers.SubmissionHelpers
alias ChallengeG... | 34.294118 | 93 | 0.676795 |
ff669df13c506ac872de9195a591c7d9ba5bc24f | 1,375 | ex | Elixir | lib/discovery_api_web/plugs/response_cache.ex | folkengine/discovery_api | 0bb7a0aff4603a4f7532cc65ca8c8dbb37a57217 | [
"Apache-2.0"
] | 1 | 2021-04-05T19:17:18.000Z | 2021-04-05T19:17:18.000Z | lib/discovery_api_web/plugs/response_cache.ex | folkengine/discovery_api | 0bb7a0aff4603a4f7532cc65ca8c8dbb37a57217 | [
"Apache-2.0"
] | 11 | 2020-01-07T15:43:42.000Z | 2020-12-22T15:23:25.000Z | lib/discovery_api_web/plugs/response_cache.ex | folkengine/discovery_api | 0bb7a0aff4603a4f7532cc65ca8c8dbb37a57217 | [
"Apache-2.0"
] | null | null | null | defmodule DiscoveryApiWeb.Plugs.ResponseCache do
@moduledoc """
Plug that will cache responses for configured url patterns
"""
import Plug.Conn
require Logger
def child_spec([]) do
Supervisor.child_spec({Cachex, __MODULE__}, id: __MODULE__)
end
def init(opts) do
opts
end
def call(conn, op... | 24.122807 | 129 | 0.658909 |
ff66c7551050b93bdb270fd39708b5f4dda6eae0 | 11,049 | ex | Elixir | lib/elixir/lib/map_set.ex | hurrycaner/elixir | c54daf97764c222a3ade6c84ac89bacb68abb0fb | [
"Apache-2.0"
] | 243 | 2020-02-03T03:48:51.000Z | 2021-11-08T12:56:25.000Z | lib/elixir/lib/map_set.ex | hurrycaner/elixir | c54daf97764c222a3ade6c84ac89bacb68abb0fb | [
"Apache-2.0"
] | 6 | 2021-03-19T12:33:21.000Z | 2021-04-02T17:52:45.000Z | lib/elixir/lib/map_set.ex | hurrycaner/elixir | c54daf97764c222a3ade6c84ac89bacb68abb0fb | [
"Apache-2.0"
] | null | null | null | defmodule MapSet do
@moduledoc """
Functions that work on sets.
A set is a data structure that can contain unique elements of any kind,
without any particular order. `MapSet` is the "go to" set data structure in Elixir.
A set can be constructed using `MapSet.new/0`:
iex> MapSet.new()
#MapSet<[]... | 25.997647 | 100 | 0.613721 |
ff66d42485548cf64250810ec2ff7d5b14d2b3f1 | 640 | exs | Elixir | test/grizzly/zwave/commands/schedule_entry_type_supported_get_test.exs | smartrent/grizzly | 65a397ea7bfedb5518fe63a3f058a0b6af473e39 | [
"Apache-2.0"
] | 76 | 2019-09-04T16:56:58.000Z | 2022-03-29T06:54:36.000Z | test/grizzly/zwave/commands/schedule_entry_type_supported_get_test.exs | smartrent/grizzly | 65a397ea7bfedb5518fe63a3f058a0b6af473e39 | [
"Apache-2.0"
] | 124 | 2019-09-05T14:01:24.000Z | 2022-02-28T22:58:14.000Z | test/grizzly/zwave/commands/schedule_entry_type_supported_get_test.exs | smartrent/grizzly | 65a397ea7bfedb5518fe63a3f058a0b6af473e39 | [
"Apache-2.0"
] | 10 | 2019-10-23T19:25:45.000Z | 2021-11-17T13:21:20.000Z | defmodule Grizzly.ZWave.Commands.ScheduleEntryTypeSupportedGetTest do
use ExUnit.Case, async: true
alias Grizzly.ZWave.Commands.ScheduleEntryTypeSupportedGet
test "creates the command and validates params" do
{:ok, _command} = ScheduleEntryTypeSupportedGet.new()
end
test "encodes params correctly" do
... | 30.47619 | 82 | 0.760938 |
ff66e5673dc7996052fcda1c2f563670b3f276b5 | 6,251 | ex | Elixir | lib/absinthe/blueprint.ex | zoldar/absinthe | 72ff9f91fcc0a261f9965cf8120c7c72ff6e4c7c | [
"MIT"
] | 4,101 | 2016-03-02T03:49:20.000Z | 2022-03-31T05:46:01.000Z | lib/absinthe/blueprint.ex | zoldar/absinthe | 72ff9f91fcc0a261f9965cf8120c7c72ff6e4c7c | [
"MIT"
] | 889 | 2016-03-02T16:06:59.000Z | 2022-03-31T20:24:12.000Z | lib/absinthe/blueprint.ex | zoldar/absinthe | 72ff9f91fcc0a261f9965cf8120c7c72ff6e4c7c | [
"MIT"
] | 564 | 2016-03-02T07:49:59.000Z | 2022-03-06T14:40:59.000Z | defmodule Absinthe.Blueprint do
@moduledoc """
Represents the graphql document to be executed.
Please see the code itself for more information on individual blueprint sub
modules.
"""
alias __MODULE__
defstruct operations: [],
directives: [],
fragments: [],
name: nil... | 28.03139 | 100 | 0.600704 |
ff674051151f90060b0a14b4693814edf1fa0caa | 1,217 | ex | Elixir | tags/web/views/error_helpers.ex | merxer/kata | 5dbbca8b4173029f9311398148de9437a329cf9a | [
"MIT"
] | null | null | null | tags/web/views/error_helpers.ex | merxer/kata | 5dbbca8b4173029f9311398148de9437a329cf9a | [
"MIT"
] | null | null | null | tags/web/views/error_helpers.ex | merxer/kata | 5dbbca8b4173029f9311398148de9437a329cf9a | [
"MIT"
] | null | null | null | defmodule Tags.ErrorHelpers do
@moduledoc """
Conveniences for translating and building error messages.
"""
use Phoenix.HTML
@doc """
Generates tag for inlined form input errors.
"""
def error_tag(form, field) do
if error = form.errors[field] do
content_tag :span, translate_error(error), cla... | 29.682927 | 70 | 0.664749 |
ff675329b26cb799dd9018dfe011d27f3f3a3517 | 777 | exs | Elixir | test/estated/property/valuation_test.exs | jdav-dev/estated | a8476b803eff425b5b73517e7ea180bb7f8cc30b | [
"Apache-2.0"
] | null | null | null | test/estated/property/valuation_test.exs | jdav-dev/estated | a8476b803eff425b5b73517e7ea180bb7f8cc30b | [
"Apache-2.0"
] | null | null | null | test/estated/property/valuation_test.exs | jdav-dev/estated | a8476b803eff425b5b73517e7ea180bb7f8cc30b | [
"Apache-2.0"
] | null | null | null | defmodule Estated.Property.ValuationTest do
use ExUnit.Case, async: true
alias Estated.Property.Valuation
doctest Valuation
describe "cast/1" do
@tag :unit
test "casts a map as a Valuation" do
valuation = %{
"value" => 16_430,
"high" => 17_220,
"low" => 15_780,
"... | 22.2 | 47 | 0.537967 |
ff6755104985986f887e979208ffa7aa8a80ad51 | 4,863 | ex | Elixir | clients/testing/lib/google_api/testing/v1/model/test_matrix.ex | MechimCook/elixir-google-api | 0240ede69ec77115076724d223f9d1f849ff1d6b | [
"Apache-2.0"
] | null | null | null | clients/testing/lib/google_api/testing/v1/model/test_matrix.ex | MechimCook/elixir-google-api | 0240ede69ec77115076724d223f9d1f849ff1d6b | [
"Apache-2.0"
] | null | null | null | clients/testing/lib/google_api/testing/v1/model/test_matrix.ex | MechimCook/elixir-google-api | 0240ede69ec77115076724d223f9d1f849ff1d6b | [
"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... | 60.7875 | 768 | 0.761875 |
ff676ad6d4359ea194c51c36cf655096eb3996cd | 3,190 | ex | Elixir | lib/dynamic_page_handler.ex | EfeElixir/cowboy-elixir-example | 36f728d2e6d223b9cb0981cabcca6aefb6859cf1 | [
"MIT"
] | null | null | null | lib/dynamic_page_handler.ex | EfeElixir/cowboy-elixir-example | 36f728d2e6d223b9cb0981cabcca6aefb6859cf1 | [
"MIT"
] | null | null | null | lib/dynamic_page_handler.ex | EfeElixir/cowboy-elixir-example | 36f728d2e6d223b9cb0981cabcca6aefb6859cf1 | [
"MIT"
] | null | null | null |
defmodule DynamicPageHandler do
@moduledoc """
A cowboy handler for serving a single dynamic wepbage. No templates are used; the
HTML is all generated within the handler.
"""
@doc """
inititalize a plain HTTP handler. See the documentation here:
http://ninenines.eu/docs/en/cowboy/1.0/manual/cowboy_... | 29.266055 | 98 | 0.637304 |
ff678ffe25688c22769684b4657ea9cd369172ff | 2,001 | ex | Elixir | web/controllers/tipopagamento_controller.ex | alissonfpmorais/tucano | d22480fc416d14b44862be2ed89040d92b7c08d1 | [
"MIT"
] | null | null | null | web/controllers/tipopagamento_controller.ex | alissonfpmorais/tucano | d22480fc416d14b44862be2ed89040d92b7c08d1 | [
"MIT"
] | null | null | null | web/controllers/tipopagamento_controller.ex | alissonfpmorais/tucano | d22480fc416d14b44862be2ed89040d92b7c08d1 | [
"MIT"
] | null | null | null | defmodule Tucano.TipoPagamentoController do
use Tucano.Web, :controller
plug Tucano.Plugs.RequireAuth
alias Tucano.TipoPagamento
def index(conn, _params) do
tipos_pagamento =
TipoPagamento.get_all
|> Enum.sort(&(&1.tipo <= &2.tipo))
render conn, "index.html", tipos_pagamento: tipos_pagam... | 30.318182 | 112 | 0.674663 |
ff679e0f5e17d534751902b8f23b2c638d57f5df | 2,624 | ex | Elixir | chatting_hangmans/lib/chatting_hangmans/hangman_server.ex | lukpra/Chatting-Hangmans | db1b8ff95ed9e98ad0682960ad0deb81c7b5024d | [
"MIT"
] | null | null | null | chatting_hangmans/lib/chatting_hangmans/hangman_server.ex | lukpra/Chatting-Hangmans | db1b8ff95ed9e98ad0682960ad0deb81c7b5024d | [
"MIT"
] | null | null | null | chatting_hangmans/lib/chatting_hangmans/hangman_server.ex | lukpra/Chatting-Hangmans | db1b8ff95ed9e98ad0682960ad0deb81c7b5024d | [
"MIT"
] | null | null | null | defmodule ChattingHangmans.HangmanServer do
alias ChattingHangmans.Hangman
alias ChattingHangmans.Game
@name :hangman_server
use GenServer
defmodule State do
defstruct games: %{}, games_queue: %{}
end
# Client Interface
def start_link(_arg) do
IO.puts("Starting Hangman Game Server ...")
... | 28.215054 | 82 | 0.719131 |
ff67a987ccf8c3930a1b4298fa1187c70bc692ba | 630 | exs | Elixir | test/five_hundred/bid_test.exs | hugomd/five_hundred | 74d5b251d4da05ff650d786d5627965114f26447 | [
"MIT"
] | 2 | 2021-06-28T07:06:13.000Z | 2021-07-18T01:13:27.000Z | test/five_hundred/bid_test.exs | hugomd/five_hundred | 74d5b251d4da05ff650d786d5627965114f26447 | [
"MIT"
] | 1 | 2021-06-20T07:49:56.000Z | 2021-06-20T07:49:56.000Z | test/five_hundred/bid_test.exs | hugomd/five_hundred | 74d5b251d4da05ff650d786d5627965114f26447 | [
"MIT"
] | 1 | 2021-07-17T10:23:36.000Z | 2021-07-17T10:23:36.000Z | defmodule FiveHundred.BidTest do
use ExUnit.Case
alias FiveHundred.{Bid}
describe "bid generation" do
test "generates correct number of bids" do
result = Bid.bids()
assert length(result) == 28
end
end
describe "bid comparison" do
test "a < b" do
a = %Bid{points: 0}
b = %... | 19.090909 | 46 | 0.547619 |
ff67ad70d02fedd6af14f94137796274f7cbd81d | 349 | exs | Elixir | apps/blog_api/priv/repo/migrations/20190809200442_tokens.exs | yashin5/blog_api | 5dd6d0c9e43ca9c1dc555afd73713b62b4efa34e | [
"MIT"
] | null | null | null | apps/blog_api/priv/repo/migrations/20190809200442_tokens.exs | yashin5/blog_api | 5dd6d0c9e43ca9c1dc555afd73713b62b4efa34e | [
"MIT"
] | null | null | null | apps/blog_api/priv/repo/migrations/20190809200442_tokens.exs | yashin5/blog_api | 5dd6d0c9e43ca9c1dc555afd73713b62b4efa34e | [
"MIT"
] | null | null | null | defmodule BlogApi.Repo.Migrations.Tokens do
use Ecto.Migration
def change do
create table(:tokens, primary_key: false) do
add(:id, :uuid, primary_key: true)
add(:token, :string)
add(:user_id, references(:users, type: :uuid), null: false)
timestamps()
end
create(unique_index(:... | 20.529412 | 65 | 0.653295 |
ff67e4dd013ad1d22d85b85f5614e62a9aba72e6 | 3,377 | ex | Elixir | apps/omg_jsonrpc/lib/expose_spec/rpc_translate.ex | Pongch/elixir-omg | 8a33c246898b49cba62b847e0989d9b6c89f5106 | [
"Apache-2.0"
] | null | null | null | apps/omg_jsonrpc/lib/expose_spec/rpc_translate.ex | Pongch/elixir-omg | 8a33c246898b49cba62b847e0989d9b6c89f5106 | [
"Apache-2.0"
] | null | null | null | apps/omg_jsonrpc/lib/expose_spec/rpc_translate.ex | 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... | 35.177083 | 111 | 0.654723 |
ff67eb979fd81558a112838ae5b61828f4dad0b9 | 507 | ex | Elixir | lib/protocols/values.ex | skovsgaard/exleveldb | b7fa20b127fe712a50581d88a86339dc37684038 | [
"Apache-2.0"
] | 38 | 2015-01-01T04:12:25.000Z | 2021-06-04T10:19:24.000Z | lib/protocols/values.ex | skovsgaard/exleveldb | b7fa20b127fe712a50581d88a86339dc37684038 | [
"Apache-2.0"
] | 12 | 2015-03-31T23:19:05.000Z | 2016-10-24T14:33:57.000Z | lib/protocols/values.ex | skovsgaard/exleveldb | b7fa20b127fe712a50581d88a86339dc37684038 | [
"Apache-2.0"
] | 6 | 2015-03-28T09:37:33.000Z | 2019-05-10T05:30:37.000Z | defprotocol Exleveldb.Values do
@doc "Implicitly converts integer, atom, or list keys to strings."
def to_value(non_string)
end
defimpl Exleveldb.Values, for: Integer do
def to_value(number), do: Integer.to_string(number)
end
defimpl Exleveldb.Values, for: Atom do
def to_value(atom), do: Atom.to_string(atom)
... | 24.142857 | 68 | 0.767258 |
ff6816bb5099c1dae3aad7873684f4a5d7e9de0a | 2,765 | ex | Elixir | apps/shipping/lib/shipping/cargoes/cargoes.ex | pcmarks/ddd_elixir_demo_stage1 | e496f95cfaca1f9aca0e65a660eb8b999450f2f3 | [
"MIT"
] | 44 | 2017-11-12T17:12:55.000Z | 2022-03-29T18:21:08.000Z | apps/shipping/lib/shipping/cargoes/cargoes.ex | pcmarks/ddd_elixir_demo_stage1 | e496f95cfaca1f9aca0e65a660eb8b999450f2f3 | [
"MIT"
] | 7 | 2017-09-11T12:17:36.000Z | 2017-09-25T13:15:21.000Z | apps/shipping/lib/shipping/cargoes/cargoes.ex | pcmarks/ddd_elixir_demo_stage1 | e496f95cfaca1f9aca0e65a660eb8b999450f2f3 | [
"MIT"
] | 4 | 2019-04-15T08:03:30.000Z | 2021-12-15T16:00:02.000Z | defmodule Shipping.Cargoes do
@moduledoc """
The Cargoes Aggregate*. Its root is the module Shipping.Cargo
Cargoes is also responsible for creating a Delivery History from the Handling Events
From the DDD book: [An AGGREGATE is] a cluster of associated objects that
are treated as a unit for the purgpose of d... | 30.722222 | 94 | 0.681736 |
ff6818f57cacff53e58dc12c538f1afb3d1ab155 | 2,063 | ex | Elixir | lib/blog_web/controllers/post_controller.ex | kadmohardy/Blog | 755bfc4325c899166b7c865a60060fc4355e7d15 | [
"MIT"
] | null | null | null | lib/blog_web/controllers/post_controller.ex | kadmohardy/Blog | 755bfc4325c899166b7c865a60060fc4355e7d15 | [
"MIT"
] | null | null | null | lib/blog_web/controllers/post_controller.ex | kadmohardy/Blog | 755bfc4325c899166b7c865a60060fc4355e7d15 | [
"MIT"
] | null | null | null | defmodule BlogWeb.PostController do
use BlogWeb, :controller
alias Blog.{Posts, Posts.Post}
plug BlogWeb.Plug.RequireAuth when action in [:create, :new, :edit, :update, :delete]
plug :check_owner when action in [:edit, :update, :delete]
def index(conn, _params) do
posts = Posts.list_posts(conn.assigns[:... | 26.792208 | 87 | 0.615124 |
ff68259813ace3de5fbec536515bf3ae4ce44844 | 489 | ex | Elixir | lib/devito_web/views/error_view.ex | supersimple/devito | 9b976849d934a9551450ca0459859e76c0929893 | [
"Apache-2.0"
] | 37 | 2020-07-23T16:05:32.000Z | 2022-02-04T07:06:17.000Z | lib/devito_web/views/error_view.ex | supersimple/devito | 9b976849d934a9551450ca0459859e76c0929893 | [
"Apache-2.0"
] | 1 | 2020-08-03T03:58:57.000Z | 2020-08-05T03:06:37.000Z | lib/devito_web/views/error_view.ex | supersimple/devito | 9b976849d934a9551450ca0459859e76c0929893 | [
"Apache-2.0"
] | 3 | 2020-07-24T22:43:08.000Z | 2021-05-30T17:43:45.000Z | defmodule DevitoWeb.ErrorView do
use DevitoWeb, :view
# If you want to customize a particular status code
# for a certain format, you may uncomment below.
# def render("500.html", _assigns) do
# "Internal Server Error"
# end
# By default, Phoenix returns the status message from
# the template name. ... | 28.764706 | 61 | 0.734151 |
ff684137b317bbebf425bba2e961948e3aea63ef | 8,388 | ex | Elixir | lib/live_sup_web/live/widgets/blameless/blameless_current_incidents_live.ex | livesup-dev/livesup | eaf9ffc78d3043bd9e3408f0f4df26ed16eb8446 | [
"Apache-2.0",
"MIT"
] | null | null | null | lib/live_sup_web/live/widgets/blameless/blameless_current_incidents_live.ex | livesup-dev/livesup | eaf9ffc78d3043bd9e3408f0f4df26ed16eb8446 | [
"Apache-2.0",
"MIT"
] | 3 | 2022-02-23T15:51:48.000Z | 2022-03-14T22:52:43.000Z | lib/live_sup_web/live/widgets/blameless/blameless_current_incidents_live.ex | livesup-dev/livesup | eaf9ffc78d3043bd9e3408f0f4df26ed16eb8446 | [
"Apache-2.0",
"MIT"
] | null | null | null | defmodule LiveSupWeb.Live.Widgets.Blameless.CurrentIncidentsLive do
use LiveSupWeb.Live.Widgets.WidgetLive
@impl true
def render_widget(assigns) do
~H"""
<.live_component module={SmartRenderComponent} id={@widget_data.id} let={widget_data} widget_data={@widget_data}>
<!-- Current Incidents -->
... | 70.487395 | 549 | 0.487601 |
ff6868353faa7b181fd75c023958ecdc3498ae64 | 1,902 | ex | Elixir | clients/content/lib/google_api/content/v2/model/product_amount.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/product_amount.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/product_amount.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"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... | 35.222222 | 115 | 0.736067 |
ff687ac135e0cf47b2eae042e3bd6ac459901d73 | 6,827 | ex | Elixir | lib/mix/tasks/hydrate_clickhouse.ex | lizlam/plausible | 886ba62cd814e5ca2d05c51a375bccc753c7c6ff | [
"MIT"
] | null | null | null | lib/mix/tasks/hydrate_clickhouse.ex | lizlam/plausible | 886ba62cd814e5ca2d05c51a375bccc753c7c6ff | [
"MIT"
] | null | null | null | lib/mix/tasks/hydrate_clickhouse.ex | lizlam/plausible | 886ba62cd814e5ca2d05c51a375bccc753c7c6ff | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.HydrateClickhouse do
use Mix.Task
use Plausible.Repo
require Logger
@hash_key Keyword.fetch!(Application.get_env(:plausible, PlausibleWeb.Endpoint), :secret_key_base) |> binary_part(0, 16)
def run(args) do
Application.ensure_all_started(:db_connection)
Application.ensure_all_start... | 33.79703 | 273 | 0.6549 |
ff68bc82dbc05db836e36362f4b7ef71e5b57244 | 437 | ex | Elixir | lib/history/sources/gdax.ex | fremantle-industries/history | a8a33744279ff4ca62620785f9a2e9c0c99e4de7 | [
"MIT"
] | 20 | 2021-08-06T01:09:48.000Z | 2022-03-28T18:44:56.000Z | lib/history/sources/gdax.ex | fremantle-industries/history | a8a33744279ff4ca62620785f9a2e9c0c99e4de7 | [
"MIT"
] | 13 | 2021-08-21T21:17:02.000Z | 2022-03-27T06:33:51.000Z | lib/history/sources/gdax.ex | fremantle-industries/history | a8a33744279ff4ca62620785f9a2e9c0c99e4de7 | [
"MIT"
] | 2 | 2021-09-23T11:31:59.000Z | 2022-01-09T16:19:35.000Z | defmodule History.Sources.Gdax do
alias History.Sources.NoOp
@behaviour History.DataAdapter
@impl true
def trades, do: NoOp.Trades
@impl true
def candles, do: NoOp.Candles
@impl true
def liquidations, do: NoOp.Liquidations
@impl true
def funding_rates, do: NoOp.FundingRates
@impl true
def ... | 18.208333 | 61 | 0.750572 |
ff68fb66df1a2b07c949179a5019e8e4cf4678fe | 80 | exs | Elixir | test/reactor_web/views/page_view_test.exs | jeantsai/phoenix-react-starter | dd0e048285134492dad160f1f2a8d942648acba9 | [
"MIT"
] | null | null | null | test/reactor_web/views/page_view_test.exs | jeantsai/phoenix-react-starter | dd0e048285134492dad160f1f2a8d942648acba9 | [
"MIT"
] | null | null | null | test/reactor_web/views/page_view_test.exs | jeantsai/phoenix-react-starter | dd0e048285134492dad160f1f2a8d942648acba9 | [
"MIT"
] | null | null | null | defmodule ReactorWeb.PageViewTest do
use ReactorWeb.ConnCase, async: true
end
| 20 | 38 | 0.825 |
ff6970fa0f3ec1ddcbe9d36b9e5b7cdc33b190da | 82 | ex | Elixir | lib/web/views/manage/hosted_site_view.ex | sb8244/grapevine | effaaa01294d30114090c20f9cc40b8665d834f2 | [
"MIT"
] | 107 | 2018-10-05T18:20:32.000Z | 2022-02-28T04:02:50.000Z | lib/web/views/manage/hosted_site_view.ex | sb8244/grapevine | effaaa01294d30114090c20f9cc40b8665d834f2 | [
"MIT"
] | 33 | 2018-10-05T14:11:18.000Z | 2022-02-10T22:19:18.000Z | lib/web/views/manage/hosted_site_view.ex | sb8244/grapevine | effaaa01294d30114090c20f9cc40b8665d834f2 | [
"MIT"
] | 18 | 2019-02-03T03:08:20.000Z | 2021-12-28T04:29:36.000Z | defmodule Web.Manage.HostedSiteView do
use Web, :view
alias Web.FormView
end
| 13.666667 | 38 | 0.768293 |
ff697e5a7d01c11285cf54ce137cf27c17f887e4 | 291 | ex | Elixir | bot/lib/bot.ex | hectorip/Facebook_Bot_Elixir | 097967c985f2b48c7fc9d67979fed9b4821c888b | [
"Apache-2.0"
] | 1 | 2016-05-25T04:39:09.000Z | 2016-05-25T04:39:09.000Z | bot/lib/bot.ex | hectorip/Facebook_Bot_Elixir | 097967c985f2b48c7fc9d67979fed9b4821c888b | [
"Apache-2.0"
] | null | null | null | bot/lib/bot.ex | hectorip/Facebook_Bot_Elixir | 097967c985f2b48c7fc9d67979fed9b4821c888b | [
"Apache-2.0"
] | null | null | null | defmodule Bot do
use Application
def start(_type, _args) do
import Supervisor.Spec, warn: false
children = [
worker(Bot.Server, [System.get_env("PORT")])
]
opts = [strategy: :one_for_one, name: Bot.Supervisor]
Supervisor.start_link(children, opts)
end
end
| 19.4 | 57 | 0.670103 |
ff698554456ad2247d08613bd7aa089048116cf2 | 1,013 | ex | Elixir | test/support/channel_case.ex | thatbraxguy/real-time-quill | 288df903ddada42695c68fd0674e5976a4a848a9 | [
"MIT"
] | null | null | null | test/support/channel_case.ex | thatbraxguy/real-time-quill | 288df903ddada42695c68fd0674e5976a4a848a9 | [
"MIT"
] | null | null | null | test/support/channel_case.ex | thatbraxguy/real-time-quill | 288df903ddada42695c68fd0674e5976a4a848a9 | [
"MIT"
] | null | null | null | defmodule Quickquill.ChannelCase do
@moduledoc """
This module defines the test case to be used by
channel tests.
Such tests rely on `Phoenix.ChannelTest` and also
import other functionality to make it easier
to build and query models.
Finally, if the test case interacts with the database,
it cannot b... | 23.022727 | 72 | 0.704837 |
ff69959173e02ad2807a8ab7c871a08849c7a4b5 | 765 | exs | Elixir | test/interactors/validate_password_test.exs | moxley/addict | 9271c60d9a862edcefc31e8a764b3eb5a5905171 | [
"MIT"
] | 750 | 2015-01-18T23:00:36.000Z | 2021-03-24T22:11:09.000Z | test/interactors/validate_password_test.exs | moxley/addict | 9271c60d9a862edcefc31e8a764b3eb5a5905171 | [
"MIT"
] | 130 | 2015-01-19T12:39:42.000Z | 2021-09-28T22:40:52.000Z | test/interactors/validate_password_test.exs | moxley/addict | 9271c60d9a862edcefc31e8a764b3eb5a5905171 | [
"MIT"
] | 151 | 2015-01-19T09:24:44.000Z | 2020-09-21T13:52:46.000Z | defmodule ValidatePasswordTest do
alias Addict.Interactors.ValidatePassword
use ExUnit.Case, async: true
defmodule Addict.PasswordUser do
use Ecto.Schema
schema "users" do
field :password, :string
field :email, :string
end
end
test "it passes on happy path" do
changeset = %Addic... | 29.423077 | 109 | 0.669281 |
ff69b90a5804a8c99053142e3bf60a46060aa042 | 75 | ex | Elixir | lib/example_app_web/views/admin/layout_view.ex | elixirasturias/example-app | d68d3c141446cf81a9181198b22d51a41b26ce71 | [
"MIT"
] | 3 | 2018-05-31T13:06:48.000Z | 2020-01-14T03:29:30.000Z | lib/example_app_web/views/admin/layout_view.ex | elixirasturias/example-app | d68d3c141446cf81a9181198b22d51a41b26ce71 | [
"MIT"
] | null | null | null | lib/example_app_web/views/admin/layout_view.ex | elixirasturias/example-app | d68d3c141446cf81a9181198b22d51a41b26ce71 | [
"MIT"
] | null | null | null | defmodule ExampleAppWeb.Admin.LayoutView do
use ExampleAppWeb, :view
end
| 18.75 | 43 | 0.826667 |
ff6a16aace8390405962bd03b9204ebc224a5083 | 601 | exs | Elixir | examples/multiple_bars.exs | kianmeng/owl | 55c0f31438866d79526d1feab44e23728ad88dd6 | [
"Apache-2.0"
] | 123 | 2021-12-15T22:42:04.000Z | 2022-03-30T22:21:29.000Z | examples/multiple_bars.exs | kianmeng/owl | 55c0f31438866d79526d1feab44e23728ad88dd6 | [
"Apache-2.0"
] | 2 | 2021-12-16T16:42:24.000Z | 2022-01-25T23:47:17.000Z | examples/multiple_bars.exs | kianmeng/owl | 55c0f31438866d79526d1feab44e23728ad88dd6 | [
"Apache-2.0"
] | 1 | 2022-01-25T14:02:40.000Z | 2022-01-25T14:02:40.000Z | 1..10
|> Enum.map(fn index ->
Task.async(fn ->
range = 1..Enum.random(100..300)
label = "Demo Progress ##{index}"
Owl.ProgressBar.start(
id: {:demo, index},
label: label,
total: range.last,
timer: true,
bar_width_ratio: 0.3,
filled_symbol: Owl.Data.tag("#", :red),
... | 21.464286 | 52 | 0.585691 |
ff6a324d1a9f126bf3469aaec2bf1c1d21c6a9fa | 323 | exs | Elixir | config/osd32mp1.exs | trarbr/nerves_livebook | ac5a5f7f8b80fb0c63cfe81e565c439e912973dc | [
"Apache-2.0"
] | 51 | 2021-09-21T12:23:41.000Z | 2022-03-31T08:37:17.000Z | config/osd32mp1.exs | trarbr/nerves_livebook | ac5a5f7f8b80fb0c63cfe81e565c439e912973dc | [
"Apache-2.0"
] | 37 | 2021-09-21T11:35:28.000Z | 2022-03-18T13:00:31.000Z | config/osd32mp1.exs | trarbr/nerves_livebook | ac5a5f7f8b80fb0c63cfe81e565c439e912973dc | [
"Apache-2.0"
] | 7 | 2021-09-26T22:33:35.000Z | 2022-02-20T10:59:29.000Z | import Config
# Configure the network using vintage_net
# See https://github.com/nerves-networking/vintage_net for more information
config :vintage_net,
config: [
{"usb0", %{type: VintageNetDirect}},
{"eth0", %{type: VintageNetEthernet, ipv4: %{method: :dhcp}}}
]
# TBD
config :nerves_livebook, :ui, led: n... | 24.846154 | 75 | 0.705882 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.