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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ab1b6ec816ff7c7850099d0d095c1e7c4a4fedda | 3,461 | ex | Elixir | clients/sheets/lib/google_api/sheets/v4/model/spreadsheet.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/sheets/lib/google_api/sheets/v4/model/spreadsheet.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/sheets/lib/google_api/sheets/v4/model/spreadsheet.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... | 50.15942 | 173 | 0.720601 |
ab1b93c018db1acff44d2c42f2567af6fccefc70 | 571 | ex | Elixir | lib/freshcom_web/jwt.ex | freshcom/freshcom_web | fab44c9468e86b1770eef9971a97ad2b11545e9c | [
"BSD-3-Clause"
] | 9 | 2018-12-16T14:02:59.000Z | 2021-01-19T07:25:40.000Z | lib/freshcom_web/jwt.ex | freshcom/freshcom_web | fab44c9468e86b1770eef9971a97ad2b11545e9c | [
"BSD-3-Clause"
] | null | null | null | lib/freshcom_web/jwt.ex | freshcom/freshcom_web | fab44c9468e86b1770eef9971a97ad2b11545e9c | [
"BSD-3-Clause"
] | 4 | 2018-12-16T17:50:01.000Z | 2021-01-19T07:25:51.000Z | defmodule FreshcomWeb.JWT do
def sign_token(claims) do
{_, signed} =
System.get_env("JWT_PRIVATE_KEY")
|> JOSE.JWK.from_pem()
|> JOSE.JWT.sign(%{"alg" => "RS256"}, claims)
|> JOSE.JWS.compact()
signed
end
def verify_token(signed_token) do
with {true, %JOSE.JWT{fields: claims}... | 24.826087 | 64 | 0.583187 |
ab1bbb09ac29ef99a499ea25f6166adee99e49ca | 16,032 | exs | Elixir | apps/alert_processor/test/alert_processor/model/trip_test.exs | mbta/alerts_concierge | d8e643445ef06f80ca273f2914c6959daea146f6 | [
"MIT"
] | null | null | null | apps/alert_processor/test/alert_processor/model/trip_test.exs | mbta/alerts_concierge | d8e643445ef06f80ca273f2914c6959daea146f6 | [
"MIT"
] | 21 | 2021-03-12T17:05:30.000Z | 2022-02-16T21:48:35.000Z | apps/alert_processor/test/alert_processor/model/trip_test.exs | mbta/alerts_concierge | d8e643445ef06f80ca273f2914c6959daea146f6 | [
"MIT"
] | 1 | 2021-12-09T15:09:53.000Z | 2021-12-09T15:09:53.000Z | defmodule AlertProcessor.Model.TripTest do
@moduledoc false
use AlertProcessor.DataCase, async: true
import AlertProcessor.Factory
alias AlertProcessor.Repo
alias AlertProcessor.Model.{Trip, Subscription}
@base_attrs %{
relevant_days: [:monday],
start_time: ~T[12:00:00],
end_time: ~T[18:00:00],... | 29.966355 | 113 | 0.632859 |
ab1bc1f02db65fabd5ea63ec1bb96d941f719e7b | 653 | ex | Elixir | apps/artemis/lib/artemis/contexts/reaction/delete_reaction.ex | artemis-platform/artemis_teams | 9930c3d9528e37b76f0525390e32b66eed7eadde | [
"MIT"
] | 2 | 2020-04-23T02:29:18.000Z | 2020-07-07T13:13:17.000Z | apps/artemis/lib/artemis/contexts/reaction/delete_reaction.ex | chrislaskey/artemis_teams | 9930c3d9528e37b76f0525390e32b66eed7eadde | [
"MIT"
] | 4 | 2020-04-26T20:35:36.000Z | 2020-11-10T22:13:19.000Z | apps/artemis/lib/artemis/contexts/reaction/delete_reaction.ex | chrislaskey/artemis_teams | 9930c3d9528e37b76f0525390e32b66eed7eadde | [
"MIT"
] | null | null | null | defmodule Artemis.DeleteReaction do
use Artemis.Context
alias Artemis.GetReaction
alias Artemis.Repo
def call!(id, user) do
case call(id, user) do
{:error, _} -> raise(Artemis.Context.Error, "Error deleting reaction")
{:ok, result} -> result
end
end
def call(id, user) do
id
|>... | 24.185185 | 76 | 0.667688 |
ab1bc64d914192cb3a8bd2d45001fdfe08ff1883 | 1,242 | exs | Elixir | config/config.exs | copenhas/ropex | 5da9cafd26ac1d7509c7a0bb4203fb506a485219 | [
"Apache-2.0"
] | 8 | 2016-07-23T00:07:52.000Z | 2021-04-06T18:45:05.000Z | config/config.exs | copenhas/ropex | 5da9cafd26ac1d7509c7a0bb4203fb506a485219 | [
"Apache-2.0"
] | 2 | 2017-09-07T20:08:12.000Z | 2017-09-08T02:34:32.000Z | config/config.exs | copenhas/ropex | 5da9cafd26ac1d7509c7a0bb4203fb506a485219 | [
"Apache-2.0"
] | 2 | 2016-07-23T00:10:33.000Z | 2017-09-01T05:43:01.000Z | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the paren... | 31.05 | 73 | 0.723027 |
ab1bf29c6c5c96ccb1bedcf03e7674aa3da38842 | 599 | exs | Elixir | test/blaine/entities/video_test.exs | eeng/blaine | d91d94034925d64632789925ef90a198c0a1d8ea | [
"MIT"
] | null | null | null | test/blaine/entities/video_test.exs | eeng/blaine | d91d94034925d64632789925ef90a198c0a1d8ea | [
"MIT"
] | null | null | null | test/blaine/entities/video_test.exs | eeng/blaine | d91d94034925d64632789925ef90a198c0a1d8ea | [
"MIT"
] | null | null | null | defmodule Blaine.Entities.VideoTest do
use ExUnit.Case, async: true
alias Blaine.Entities.Video
import Blaine.Factory
describe "filter" do
test "allows to filter by published_after" do
v1 = build(:video, published_at: ~U[2020-07-15 00:00:00Z])
v2 = build(:video, published_at: ~U[2020-07-17 00:... | 26.043478 | 85 | 0.647746 |
ab1c4fb4e455f8db7d0d3656ba5fa113e4f578d4 | 2,112 | exs | Elixir | priv/repo/migrations/20200720222533_create_game_rules_table.exs | QBonaventure/mppm | 06047083e3f56e750b60a2c2bd2c430228066e63 | [
"MIT"
] | 6 | 2020-11-18T10:10:51.000Z | 2021-03-17T14:28:36.000Z | priv/repo/migrations/20200720222533_create_game_rules_table.exs | QBonaventure/mppm | 06047083e3f56e750b60a2c2bd2c430228066e63 | [
"MIT"
] | 6 | 2020-11-10T21:50:43.000Z | 2021-03-04T09:41:22.000Z | priv/repo/migrations/20200720222533_create_game_rules_table.exs | QBonaventure/mppm | 06047083e3f56e750b60a2c2bd2c430228066e63 | [
"MIT"
] | null | null | null | defmodule Mppm.Repo.Migrations.CreateGameRulesTable do
use Ecto.Migration
def change do
create table(:game_rules, primary_key: false) do
add :server_id, references(:servers, on_delete: :delete_all), primary_key: true
add :mode_id, references(:game_modes)
### Time Attack
add :ta_respawn... | 43.102041 | 87 | 0.708333 |
ab1c6074e8090a3a88935b3b7f7b84bf6bb6903c | 49 | exs | Elixir | config/config.exs | giraphme/ex_magick | 0883e835d05987bc5118c4c0f8904a155cbf9ca0 | [
"MIT"
] | null | null | null | config/config.exs | giraphme/ex_magick | 0883e835d05987bc5118c4c0f8904a155cbf9ca0 | [
"MIT"
] | 4 | 2018-02-06T09:30:26.000Z | 2018-02-06T09:40:17.000Z | config/config.exs | giraphme/ex_magick | 0883e835d05987bc5118c4c0f8904a155cbf9ca0 | [
"MIT"
] | null | null | null | use Mix.Config
# config :ex_magick, key: :value
| 12.25 | 32 | 0.714286 |
ab1c619b25bc95c9411752809822c08b78caec7d | 1,291 | ex | Elixir | lib/ecto_vista.ex | kianmeng/ecto_vista | f0d0cb8303719e1437f1c0b9ba68690c092c3dcc | [
"Apache-2.0"
] | null | null | null | lib/ecto_vista.ex | kianmeng/ecto_vista | f0d0cb8303719e1437f1c0b9ba68690c092c3dcc | [
"Apache-2.0"
] | null | null | null | lib/ecto_vista.ex | kianmeng/ecto_vista | f0d0cb8303719e1437f1c0b9ba68690c092c3dcc | [
"Apache-2.0"
] | null | null | null | defmodule EctoVista do
@moduledoc false
require Ecto.Query
defmacro __using__(opts \\ []) do
unless repo = Keyword.get(opts, :repo) do
raise ArgumentError,
"""
expected :repo to be given as an option. Example:
use EctoVista, repo: App.Repo
"""
end
... | 23.907407 | 84 | 0.583269 |
ab1c7c32c4d08e1f2c26522651449862b54f6ce9 | 1,981 | ex | Elixir | lib/vex/validators/inclusion.ex | jtmoulia/vex | 78161e174777cb2d0d808326afe619fb893da8d1 | [
"MIT"
] | null | null | null | lib/vex/validators/inclusion.ex | jtmoulia/vex | 78161e174777cb2d0d808326afe619fb893da8d1 | [
"MIT"
] | null | null | null | lib/vex/validators/inclusion.ex | jtmoulia/vex | 78161e174777cb2d0d808326afe619fb893da8d1 | [
"MIT"
] | null | null | null | defmodule Vex.Validators.Inclusion do
@moduledoc """
Ensure a value is a member of a list of values.
## Options
* `:in`: The list.
* `:message`: Optional. A custom error message. May be in EEx format
and use the fields described in "Custom Error Messages," below.
The list can be provided in plac... | 31.951613 | 119 | 0.626956 |
ab1c87740e96b18020f9f4bf20516f2eeb122f29 | 40 | ex | Elixir | testData/org/elixir_lang/parser_definition/matched_type_operation_parsing_test_case/CharListHeredoc.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_type_operation_parsing_test_case/CharListHeredoc.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_type_operation_parsing_test_case/CharListHeredoc.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 145 | 2015-01-15T11:37:16.000Z | 2021-12-22T05:51:02.000Z | '''
One
''' :: '''
Two
''' | 8 | 10 | 0.15 |
ab1cb0e2c0aa7dc77d739a3707d1ffeb0af417cd | 1,589 | ex | Elixir | lib/chaperon/export/json.ex | ideo/chaperon | 6298e96ae2b8f39a1d729b7363f4a451bc4c3a6e | [
"MIT"
] | null | null | null | lib/chaperon/export/json.ex | ideo/chaperon | 6298e96ae2b8f39a1d729b7363f4a451bc4c3a6e | [
"MIT"
] | null | null | null | lib/chaperon/export/json.ex | ideo/chaperon | 6298e96ae2b8f39a1d729b7363f4a451bc4c3a6e | [
"MIT"
] | null | null | null | defmodule Chaperon.Export.JSON do
@moduledoc """
JSON metrics export module.
"""
@behaviour Chaperon.Exporter
alias Chaperon.Scenario.Metrics
@columns [
:total_count,
:max,
:mean,
:min
] ++ for(p <- Metrics.percentiles(), do: {:percentile, p}... | 21.186667 | 69 | 0.522341 |
ab1d0ca1fa7ec40a72a2f30c589dc69be4ae7355 | 4,857 | ex | Elixir | lib/cforum_web/paginator.ex | campingrider/cforum_ex | cf27684c47d6dc26c9c37a946f1c729a79d27c70 | [
"MIT"
] | null | null | null | lib/cforum_web/paginator.ex | campingrider/cforum_ex | cf27684c47d6dc26c9c37a946f1c729a79d27c70 | [
"MIT"
] | null | null | null | lib/cforum_web/paginator.ex | campingrider/cforum_ex | cf27684c47d6dc26c9c37a946f1c729a79d27c70 | [
"MIT"
] | null | null | null | defmodule CforumWeb.Paginator do
defstruct [:per_page, :page, :params, :all_entries_count, :pages_count, :distance]
import CforumWeb.Gettext
alias CforumWeb.Paginator
use Phoenix.HTML
def paginate(data_count, opts \\ []) do
config = Application.get_env(:cforum, :paginator)
per_page = opts[:per_pag... | 30.54717 | 98 | 0.63846 |
ab1d23fbf8aa932986ffe564cdf9d15759d11c84 | 10,775 | ex | Elixir | lib/mix/tasks/import_helper.ex | GSA/Challenge_gov | f249b53e880537989f1840c4cf0d546ada976810 | [
"CC0-1.0"
] | 9 | 2020-02-26T20:24:38.000Z | 2022-03-22T21:14:52.000Z | lib/mix/tasks/import_helper.ex | GSA/Challenge_gov | f249b53e880537989f1840c4cf0d546ada976810 | [
"CC0-1.0"
] | 15 | 2020-04-22T19:33:24.000Z | 2022-03-26T15:11:17.000Z | lib/mix/tasks/import_helper.ex | GSA/Challenge_gov | f249b53e880537989f1840c4cf0d546ada976810 | [
"CC0-1.0"
] | 4 | 2020-04-27T22:58:57.000Z | 2022-01-14T13:42:09.000Z | require Logger
defmodule Mix.Tasks.ImportHelper do
@moduledoc """
Helper for archived challenge importers
"""
alias ChallengeGov.Accounts
alias ChallengeGov.Agencies
alias ChallengeGov.Challenges.Challenge
alias ChallengeGov.HTTPClient
@date_formats [
"{0M}/{0D}/{YYYY} {h12}:{m} {AM}",
"{M}/{... | 23.785872 | 95 | 0.595267 |
ab1d25174c7d25581b52e91eb6f7707398cc070d | 1,926 | exs | Elixir | backend/test/edgehog/geolocation/providers/google_geocoding_test.exs | szakhlypa/edgehog | b1193c26f403132dead6964c1c052e5dcae533af | [
"Apache-2.0"
] | 14 | 2021-12-02T16:31:16.000Z | 2022-03-18T17:40:44.000Z | backend/test/edgehog/geolocation/providers/google_geocoding_test.exs | szakhlypa/edgehog | b1193c26f403132dead6964c1c052e5dcae533af | [
"Apache-2.0"
] | 77 | 2021-11-03T15:14:41.000Z | 2022-03-30T14:13:32.000Z | backend/test/edgehog/geolocation/providers/google_geocoding_test.exs | szakhlypa/edgehog | b1193c26f403132dead6964c1c052e5dcae533af | [
"Apache-2.0"
] | 7 | 2021-11-03T10:58:37.000Z | 2022-02-28T14:00:03.000Z | #
# This file is part of Edgehog.
#
# Copyright 2021-2022 SECO Mind 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 b... | 29.630769 | 84 | 0.676532 |
ab1d34b1aa69fba6b92bc299a51ec192d316c37e | 2,115 | exs | Elixir | mix.exs | membraneframework/membrane-element-gcloud-speech-to-text | 18483aae342af59f0dbbec1cf26cfbc9ccb9fd3b | [
"Apache-2.0"
] | null | null | null | mix.exs | membraneframework/membrane-element-gcloud-speech-to-text | 18483aae342af59f0dbbec1cf26cfbc9ccb9fd3b | [
"Apache-2.0"
] | null | null | null | mix.exs | membraneframework/membrane-element-gcloud-speech-to-text | 18483aae342af59f0dbbec1cf26cfbc9ccb9fd3b | [
"Apache-2.0"
] | null | null | null | defmodule Membrane.Element.GCloud.SpeechToText.MixProject do
use Mix.Project
@version "0.7.0"
@github_url "https://github.com/membraneframework/membrane-element-gcloud-speech-to-text"
def project do
[
app: :membrane_element_gcloud_speech_to_text,
version: @version,
elixir: "~> 1.12",
... | 24.593023 | 91 | 0.58156 |
ab1d3526aa8bc19a34e97cb40d22995aa3a5f6b6 | 1,910 | ex | Elixir | lib/dynamo/filters/static.ex | aforward-oss/dynamo | c8d47dab7de3ce730d4ec314d23e171051d5eff7 | [
"Apache-2.0"
] | null | null | null | lib/dynamo/filters/static.ex | aforward-oss/dynamo | c8d47dab7de3ce730d4ec314d23e171051d5eff7 | [
"Apache-2.0"
] | null | null | null | lib/dynamo/filters/static.ex | aforward-oss/dynamo | c8d47dab7de3ce730d4ec314d23e171051d5eff7 | [
"Apache-2.0"
] | null | null | null | defmodule Dynamo.Filters.Static do
@moduledoc """
A Dynamo filter capable of serving static assets.
It must be initialized passing the path to watch
for assets and path to the assets from the Dynamo
root.
If an assets cannot be found, it simply forwards
the request to the underlying service.
## Examp... | 25.466667 | 77 | 0.619895 |
ab1d6115e49854891079485d27c9027cca66e7d8 | 241 | ex | Elixir | lib/integrate/config.ex | integratedb/core | 0b4a7a38d014e5ae973a1fa807c137834dfdf9cb | [
"MIT"
] | 13 | 2021-01-28T14:45:43.000Z | 2021-11-04T21:54:19.000Z | lib/integrate/config.ex | integratedb/integrate | 0b4a7a38d014e5ae973a1fa807c137834dfdf9cb | [
"MIT"
] | null | null | null | lib/integrate/config.ex | integratedb/integrate | 0b4a7a38d014e5ae973a1fa807c137834dfdf9cb | [
"MIT"
] | null | null | null | defmodule Integrate.Config do
@moduledoc """
Config helpers.
"""
alias Integrate.Validate
def namespace do
:integratedb
|> Application.fetch_env!(:db_namespace)
|> Validate.validate_and_downcase_namespace()
end
end
| 17.214286 | 49 | 0.713693 |
ab1d8461ad66762e8a6bbd369e9715f1de63e577 | 8,977 | ex | Elixir | apps/ewallet/lib/ewallet/gates/transaction_request_gate.ex | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 322 | 2018-02-28T07:38:44.000Z | 2020-05-27T23:09:55.000Z | apps/ewallet/lib/ewallet/gates/transaction_request_gate.ex | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 643 | 2018-02-28T12:05:20.000Z | 2020-05-22T08:34:38.000Z | apps/ewallet/lib/ewallet/gates/transaction_request_gate.ex | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 63 | 2018-02-28T10:57:06.000Z | 2020-05-27T23:10:38.000Z | # Copyright 2018-2019 OmiseGO Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 32.407942 | 95 | 0.640526 |
ab1d8b51673e2b3752ab87dac159c2133ce9cbc2 | 2,619 | ex | Elixir | clients/sheets/lib/google_api/sheets/v4/model/waterfall_chart_spec.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | null | null | null | clients/sheets/lib/google_api/sheets/v4/model/waterfall_chart_spec.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | null | null | null | clients/sheets/lib/google_api/sheets/v4/model/waterfall_chart_spec.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"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... | 40.921875 | 114 | 0.736541 |
ab1d9d6e3c0409a41ace5192ad3f8d35e9d76fc3 | 161,813 | ex | Elixir | clients/security_center/lib/google_api/security_center/v1/api/organizations.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/security_center/lib/google_api/security_center/v1/api/organizations.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/security_center/lib/google_api/security_center/v1/api/organizations.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... | 50.221291 | 2,230 | 0.632199 |
ab1db29be84c36d174df61f7af7a6280260c8d33 | 1,066 | exs | Elixir | StringsAndBinaries/11.7.exs | miguelcoba/ProgrammingElixir | c3aee9151ab2346fbd31a5411c473b1a4e626e36 | [
"MIT"
] | 2 | 2015-11-14T21:35:01.000Z | 2017-07-12T07:09:40.000Z | StringsAndBinaries/11.7.exs | miguelcoba/ProgrammingElixir | c3aee9151ab2346fbd31a5411c473b1a4e626e36 | [
"MIT"
] | null | null | null | StringsAndBinaries/11.7.exs | miguelcoba/ProgrammingElixir | c3aee9151ab2346fbd31a5411c473b1a4e626e36 | [
"MIT"
] | null | null | null | defmodule Taxes do
defp sales_tax(order, tax_rates) do
total_amount = order[:net_amount]
if List.keymember?(tax_rates, order[:ship_to], 0) do
tax_amount = order[:net_amount] * tax_rates[order[:ship_to]]
total_amount = order[:net_amount] + tax_amount
end
order ++ [total_amount: total_amount]
end
defp ... | 26 | 72 | 0.680113 |
ab1de78ea4bb1dac46a98148f0e74b552aa4db4a | 1,372 | ex | Elixir | lib/nautilus/adapters/key_value_adapter/bucket.ex | CarloHFR/NautilusGateway | 26211948c5f9127e6662a90e41df5b43b2408372 | [
"MIT"
] | null | null | null | lib/nautilus/adapters/key_value_adapter/bucket.ex | CarloHFR/NautilusGateway | 26211948c5f9127e6662a90e41df5b43b2408372 | [
"MIT"
] | null | null | null | lib/nautilus/adapters/key_value_adapter/bucket.ex | CarloHFR/NautilusGateway | 26211948c5f9127e6662a90e41df5b43b2408372 | [
"MIT"
] | null | null | null | defmodule Nautilus.Adapters.KeyValue.Bucket do
@moduledoc """
This module is responsible for storing values
"""
use GenServer
@doc """
This function is the main function of this module, and will be executed first
"""
def start_link(_) do
GenServer.start_link(__MO... | 23.655172 | 82 | 0.58965 |
ab1e0ae223d3bd50ca88d98c6a717311f9455250 | 124 | exs | Elixir | machine_translation/MorpHIN/Learned/Resources/TrainingInstances/10.exs | AdityaPrasadMishra/NLP--Project-Group-16 | fb62cc6a1db4a494058171f11c14a2be3933a9a1 | [
"MIT"
] | null | null | null | machine_translation/MorpHIN/Learned/Resources/TrainingInstances/10.exs | AdityaPrasadMishra/NLP--Project-Group-16 | fb62cc6a1db4a494058171f11c14a2be3933a9a1 | [
"MIT"
] | null | null | null | machine_translation/MorpHIN/Learned/Resources/TrainingInstances/10.exs | AdityaPrasadMishra/NLP--Project-Group-16 | fb62cc6a1db4a494058171f11c14a2be3933a9a1 | [
"MIT"
] | null | null | null | **EXAMPLE FILE**
cm noun cm adjective adjective;
verb SYM particle adjective adjective;
verb verb_aux particle pn conj;
| 20.666667 | 39 | 0.774194 |
ab1e0aeef3e67509311586f488c8fc5bb4b670a1 | 4,252 | ex | Elixir | clients/network_management/lib/google_api/network_management/v1/model/binding.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | 1 | 2021-10-01T09:20:41.000Z | 2021-10-01T09:20:41.000Z | clients/network_management/lib/google_api/network_management/v1/model/binding.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/network_management/lib/google_api/network_management/v1/model/binding.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... | 80.226415 | 1,972 | 0.753998 |
ab1e1c8a3701e247f0ffcfb3fc3c3f69396cb776 | 603 | exs | Elixir | test/views/error_view_test.exs | jwworth/wallaby_example | 03372b15ee700fc309bd3371cc445671d41316d4 | [
"MIT"
] | null | null | null | test/views/error_view_test.exs | jwworth/wallaby_example | 03372b15ee700fc309bd3371cc445671d41316d4 | [
"MIT"
] | null | null | null | test/views/error_view_test.exs | jwworth/wallaby_example | 03372b15ee700fc309bd3371cc445671d41316d4 | [
"MIT"
] | null | null | null | defmodule WallabyExample.ErrorViewTest do
use WallabyExample.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(WallabyExample.ErrorView, "404.html", []) ==
"Page not found"
end
test ... | 27.409091 | 72 | 0.694859 |
ab1e27f923569e2e0f5af1d2476744824022ae84 | 2,379 | exs | Elixir | test/qmi/dev_bridge_test.exs | nerves-networking/qmi | d0e826636900a79e3c204f59ce5155985441472c | [
"Apache-2.0"
] | 2 | 2021-05-26T19:12:46.000Z | 2021-06-09T02:21:49.000Z | test/qmi/dev_bridge_test.exs | nerves-networking/qmi | d0e826636900a79e3c204f59ce5155985441472c | [
"Apache-2.0"
] | 8 | 2021-05-27T19:57:03.000Z | 2022-02-10T20:04:06.000Z | test/qmi/dev_bridge_test.exs | nerves-networking/qmi | d0e826636900a79e3c204f59ce5155985441472c | [
"Apache-2.0"
] | 1 | 2022-02-18T20:29:11.000Z | 2022-02-18T20:29:11.000Z | defmodule QMI.DevBridgeTest do
use ExUnit.Case
alias QMI.DevBridge
doctest DevBridge
@pipe_filename "test_pipe"
setup do
_ = File.rm(@pipe_filename)
{"", 0} = System.cmd("mkfifo", [@pipe_filename])
on_exit(fn -> File.rm!(@pipe_filename) end)
{:ok, dev1} = start_supervised(DevBridge, id: :... | 33.507042 | 76 | 0.660782 |
ab1e6de58cc230ce3b66b84b3237ad80d21b5006 | 1,745 | ex | Elixir | clients/service_control/lib/google_api/service_control/v1/model/report_error.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/service_control/lib/google_api/service_control/v1/model/report_error.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/service_control/lib/google_api/service_control/v1/model/report_error.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.9 | 141 | 0.735244 |
ab1e7af70a7d13295db2a7b131cbb525f85f563a | 843 | exs | Elixir | community/samples/serving/helloworld-elixir/config/config.exs | chaodaiG/docs | 5a923e958ade76b299f69c188c185ac0ee2ce4bc | [
"Apache-2.0"
] | 3,383 | 2018-07-23T21:00:17.000Z | 2022-03-30T17:13:52.000Z | community/samples/serving/helloworld-elixir/config/config.exs | chaodaiG/docs | 5a923e958ade76b299f69c188c185ac0ee2ce4bc | [
"Apache-2.0"
] | 4,617 | 2018-07-23T21:55:06.000Z | 2022-03-31T21:52:36.000Z | community/samples/serving/helloworld-elixir/config/config.exs | chaodaiG/docs | 5a923e958ade76b299f69c188c185ac0ee2ce4bc | [
"Apache-2.0"
] | 1,240 | 2018-07-23T20:36:04.000Z | 2022-03-30T20:03:07.000Z | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
use Mix.Config
# Configures the endpoint
config :hello, HelloWeb.Endpoint,
url: [host: "localhost"... | 35.125 | 86 | 0.758007 |
ab1ea101c0bc0c7e349ba94e35407cd10b87c29e | 1,290 | ex | Elixir | examples/elixir-phoenix/test/support/conn_case.ex | manumayank/starters | 194ea6d35457c55d0fcd571894b089419f876a4d | [
"MIT"
] | 23 | 2020-07-10T22:33:13.000Z | 2021-01-12T04:19:54.000Z | examples/elixir-phoenix/test/support/conn_case.ex | manumayank/starters | 194ea6d35457c55d0fcd571894b089419f876a4d | [
"MIT"
] | 7 | 2021-10-05T01:50:40.000Z | 2021-12-14T06:35:22.000Z | examples/elixir-phoenix/test/support/conn_case.ex | manumayank/starters | 194ea6d35457c55d0fcd571894b089419f876a4d | [
"MIT"
] | 3 | 2020-08-27T01:33:25.000Z | 2020-12-15T18:19:43.000Z | defmodule RailwayPhoenixWeb.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... | 29.318182 | 76 | 0.734884 |
ab1ea54fe30b261d9bee45f841dc320c77a0153e | 221 | exs | Elixir | elixir/priv/repo/migrations/20211127184041_associate_users_company.exs | ceejaay/web-homework | e5844609b62bdfa79a9b5b8f302c0d7ba81dc75d | [
"MIT"
] | null | null | null | elixir/priv/repo/migrations/20211127184041_associate_users_company.exs | ceejaay/web-homework | e5844609b62bdfa79a9b5b8f302c0d7ba81dc75d | [
"MIT"
] | null | null | null | elixir/priv/repo/migrations/20211127184041_associate_users_company.exs | ceejaay/web-homework | e5844609b62bdfa79a9b5b8f302c0d7ba81dc75d | [
"MIT"
] | null | null | null | defmodule Homework.Repo.Migrations.AssociateUsersCompany do
use Ecto.Migration
def change do
alter table(:users) do
add :company_id, references(:company, type: :uuid, on_delete: :nothing)
end
end
end
| 22.1 | 77 | 0.728507 |
ab1eab47cee71163bb75badac381fb99da03caed | 49,856 | ex | Elixir | lib/ex_aws/elastic_load_balancingv2.ex | JustinTangg/ex_aws_elastic_load_balancing | e43871ecd07b12de49d42e7c4d1f442a32eaebae | [
"MIT"
] | 4 | 2017-12-04T21:17:52.000Z | 2018-08-08T20:44:53.000Z | lib/ex_aws/elastic_load_balancingv2.ex | JustinTangg/ex_aws_elastic_load_balancing | e43871ecd07b12de49d42e7c4d1f442a32eaebae | [
"MIT"
] | 4 | 2017-12-08T21:07:17.000Z | 2021-08-31T19:50:02.000Z | lib/ex_aws/elastic_load_balancingv2.ex | JustinTangg/ex_aws_elastic_load_balancing | e43871ecd07b12de49d42e7c4d1f442a32eaebae | [
"MIT"
] | 6 | 2018-05-07T22:03:45.000Z | 2022-01-10T18:13:37.000Z | defmodule ExAws.ElasticLoadBalancingV2 do
@moduledoc """
Operations on AWS ELB (Elastic Load Balancing) V2 API
AWS Elastic Load Balancing supports three types of load balancers: Application
Load Balancers (ALB), Network Load Balancers (NLB), and Classic Load Balancers. You can
select a load balancer based on... | 41.616027 | 156 | 0.685554 |
ab1eaff41cee957bdf826a4345a9f079a6040ae7 | 1,626 | ex | Elixir | lib/semtex/utils.ex | alizain/semtex | 6e608d94ee1dfa2c9186e8672812dfb49752c3c3 | [
"MIT"
] | null | null | null | lib/semtex/utils.ex | alizain/semtex | 6e608d94ee1dfa2c9186e8672812dfb49752c3c3 | [
"MIT"
] | null | null | null | lib/semtex/utils.ex | alizain/semtex | 6e608d94ee1dfa2c9186e8672812dfb49752c3c3 | [
"MIT"
] | null | null | null | defmodule Semtex.Utils do
def scheme(nil) do
nil
end
def scheme(raw_str) when is_binary(raw_str) do
raw_str
|> String.trim()
|> String.split(":", parts: 2, trim: true)
|> case do
[scheme | _] ->
scheme
_ ->
nil
end
end
def unwrap_nodes([], [_tag_to_find |... | 21.68 | 80 | 0.623001 |
ab1ed0022a3519b1a01741163b12634a9758b34b | 244 | ex | Elixir | lib/boat_server/web/router.ex | norbu09/boat_server | 80ef693f49e75e8af62371f150e836b4f350dd7b | [
"BSD-3-Clause"
] | null | null | null | lib/boat_server/web/router.ex | norbu09/boat_server | 80ef693f49e75e8af62371f150e836b4f350dd7b | [
"BSD-3-Clause"
] | null | null | null | lib/boat_server/web/router.ex | norbu09/boat_server | 80ef693f49e75e8af62371f150e836b4f350dd7b | [
"BSD-3-Clause"
] | null | null | null | defmodule BoatServer.Web.Router do
@moduledoc false
use Plug.Router
plug(BoatServer.Web.MetricsExporter)
plug(Plug.Logger)
plug(:match)
plug(:dispatch)
match _ do
send_resp(conn, 404, "Hmmmm...that didn't work")
end
end
| 15.25 | 52 | 0.704918 |
ab1eec25f7dc08cd87f6adf4a60262f3c1301b26 | 82 | exs | Elixir | installer/templates/phx_umbrella/apps/app_name_web/test/test_helper.exs | faheempatel/phoenix | a83318f2a2284b7ab29b0b86cdd9d2e1f4d0a7c9 | [
"MIT"
] | 18,092 | 2015-01-01T01:51:04.000Z | 2022-03-31T19:37:14.000Z | installer/templates/phx_umbrella/apps/app_name_web/test/test_helper.exs | faheempatel/phoenix | a83318f2a2284b7ab29b0b86cdd9d2e1f4d0a7c9 | [
"MIT"
] | 3,905 | 2015-01-01T00:22:47.000Z | 2022-03-31T17:06:21.000Z | installer/templates/phx_umbrella/apps/app_name_web/test/test_helper.exs | faheempatel/phoenix | a83318f2a2284b7ab29b0b86cdd9d2e1f4d0a7c9 | [
"MIT"
] | 3,205 | 2015-01-03T10:58:22.000Z | 2022-03-30T14:55:57.000Z | ExUnit.start()<%= if @ecto do %>
<%= @adapter_config[:test_setup_all] %><% end %>
| 27.333333 | 48 | 0.609756 |
ab1f0ed3df64b517be29d15323ac027c83cd2f62 | 2,442 | ex | Elixir | testData/org/elixir_lang/parser_definition/unmatched_expression_parsing_test_case/UnqualifiedNoArgumentsRescueStabBlock.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/unmatched_expression_parsing_test_case/UnqualifiedNoArgumentsRescueStabBlock.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/unmatched_expression_parsing_test_case/UnqualifiedNoArgumentsRescueStabBlock.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 145 | 2015-01-15T11:37:16.000Z | 2021-12-22T05:51:02.000Z | identifier do rescue expression end
identifier do rescue; expression; end
identifier do
rescue expression
end
identifier do
rescue
expression
end
identifier do rescue -> end
identifier do rescue -> ; end
identifier do
rescue ->
end
identifier do
rescue
->
end
identifier do rescue -> expression end
identif... | 17.442857 | 58 | 0.665848 |
ab1f788275786414ff31b5248861c9e93b871c8c | 631 | exs | Elixir | bryan_hunter+elixir+hashring/mix.exs | NashFP/globo | 630cdb401dd37f72f0b747a5870f48a23f6961b9 | [
"MIT"
] | 2 | 2020-10-28T03:09:51.000Z | 2020-10-28T14:57:52.000Z | bryan_hunter+elixir+hashring/mix.exs | NashFP/globo | 630cdb401dd37f72f0b747a5870f48a23f6961b9 | [
"MIT"
] | null | null | null | bryan_hunter+elixir+hashring/mix.exs | NashFP/globo | 630cdb401dd37f72f0b747a5870f48a23f6961b9 | [
"MIT"
] | null | null | null | defmodule Globo.MixProject do
use Mix.Project
def project do
[
app: :globo,
version: "0.1.0",
elixir: "~> 1.10",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applic... | 20.354839 | 87 | 0.561014 |
ab1f80d7451fe2c1e05f65a40456a9a97fda8c2d | 3,515 | exs | Elixir | test/chat_api_web/controllers/user_invitation_controller_test.exs | rlanga/papercups | 358ca46c344908585cd0214a0de96e5676120c68 | [
"MIT"
] | 2 | 2020-09-21T07:27:13.000Z | 2021-12-20T13:23:56.000Z | test/chat_api_web/controllers/user_invitation_controller_test.exs | rlanga/papercups | 358ca46c344908585cd0214a0de96e5676120c68 | [
"MIT"
] | null | null | null | test/chat_api_web/controllers/user_invitation_controller_test.exs | rlanga/papercups | 358ca46c344908585cd0214a0de96e5676120c68 | [
"MIT"
] | 1 | 2021-08-29T14:10:18.000Z | 2021-08-29T14:10:18.000Z | defmodule ChatApiWeb.UserInvitationControllerTest do
use ChatApiWeb.ConnCase
alias ChatApi.UserInvitations
alias ChatApi.UserInvitations.UserInvitation
alias ChatApi.Accounts
@invalid_attrs %{account_id: nil, expires_at: nil}
def fixture(:account) do
{:ok, account} = Accounts.create_account(%{company... | 30.565217 | 98 | 0.653201 |
ab1f8457ab8733485ffdcb7390d31baed8e237a1 | 81 | ex | Elixir | testData/org/elixir_lang/find_usages/function_multiple_modules_usage_target.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/find_usages/function_multiple_modules_usage_target.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/find_usages/function_multiple_modules_usage_target.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 145 | 2015-01-15T11:37:16.000Z | 2021-12-22T05:51:02.000Z | defmodule Usage do
def usage do
Declaration.dec<caret>laration()
end
end
| 13.5 | 36 | 0.728395 |
ab1f8981d65f36732dd5491b1242bf87fc9f01c8 | 5,324 | ex | Elixir | clients/home_graph/lib/google_api/home_graph/v1/model/device.ex | jechol/elixir-google-api | 0290b683dfc6491ca2ef755a80bc329378738d03 | [
"Apache-2.0"
] | null | null | null | clients/home_graph/lib/google_api/home_graph/v1/model/device.ex | jechol/elixir-google-api | 0290b683dfc6491ca2ef755a80bc329378738d03 | [
"Apache-2.0"
] | null | null | null | clients/home_graph/lib/google_api/home_graph/v1/model/device.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... | 64.144578 | 464 | 0.714125 |
ab1f9d6fbf7d11ed09d14d4ce38b7599e024617b | 1,833 | ex | Elixir | lib/jsonrpc2/servers/tcp/protocol.ex | fanduel/jsonrpc2-elixir | 9b6f5c6472fa66885d7385e60d0b2f64c0e42e09 | [
"Apache-2.0"
] | 49 | 2016-07-14T01:12:59.000Z | 2022-03-22T02:13:50.000Z | lib/jsonrpc2/servers/tcp/protocol.ex | fanduel/jsonrpc2-elixir | 9b6f5c6472fa66885d7385e60d0b2f64c0e42e09 | [
"Apache-2.0"
] | 18 | 2016-09-02T18:08:37.000Z | 2021-06-10T21:28:11.000Z | lib/jsonrpc2/servers/tcp/protocol.ex | fanduel/jsonrpc2-elixir | 9b6f5c6472fa66885d7385e60d0b2f64c0e42e09 | [
"Apache-2.0"
] | 26 | 2016-09-07T21:46:16.000Z | 2021-10-09T13:52:16.000Z | defmodule JSONRPC2.Servers.TCP.Protocol do
@moduledoc false
use GenServer
require Logger
if Code.ensure_loaded?(:ranch_protocol) do
@behaviour :ranch_protocol
end
def start_link(ref, socket, transport, {jsonrpc2_handler, timeout, line_packet}) do
:proc_lib.start_link(__MODULE__, :init, [
{r... | 28.2 | 95 | 0.652482 |
ab1fb792bd1b24b2040f5ff60523b11c03c89760 | 3,167 | ex | Elixir | apps/local_ledger_db/lib/local_ledger_db/transaction.ex | amadeobrands/ewallet | 505b7822721940a7b892a9b35c225e80cc8ac0b4 | [
"Apache-2.0"
] | 1 | 2018-12-07T06:21:21.000Z | 2018-12-07T06:21:21.000Z | apps/local_ledger_db/lib/local_ledger_db/transaction.ex | amadeobrands/ewallet | 505b7822721940a7b892a9b35c225e80cc8ac0b4 | [
"Apache-2.0"
] | null | null | null | apps/local_ledger_db/lib/local_ledger_db/transaction.ex | amadeobrands/ewallet | 505b7822721940a7b892a9b35c225e80cc8ac0b4 | [
"Apache-2.0"
] | null | null | null | defmodule LocalLedgerDB.Transaction do
@moduledoc """
Ecto Schema representing entries. An entry is used to group a set of
transactions (debits/credits).
"""
use Ecto.Schema
import Ecto.{Changeset, Query}
alias LocalLedgerDB.{Entry, Repo, Transaction}
@primary_key {:uuid, Ecto.UUID, autogenerate: true}... | 23.634328 | 91 | 0.646353 |
ab1fc1a005eff34f09807b9deafe4df2cfc9719b | 61 | ex | Elixir | lib/robolia_web/views/home_view.ex | Robolia/robolia | cbd3ea24db460f213a3411f474d765536ae7871c | [
"MIT"
] | 1 | 2020-01-19T04:27:46.000Z | 2020-01-19T04:27:46.000Z | lib/robolia_web/views/home_view.ex | Robolia/robolia | cbd3ea24db460f213a3411f474d765536ae7871c | [
"MIT"
] | null | null | null | lib/robolia_web/views/home_view.ex | Robolia/robolia | cbd3ea24db460f213a3411f474d765536ae7871c | [
"MIT"
] | 1 | 2018-05-13T14:06:46.000Z | 2018-05-13T14:06:46.000Z | defmodule RoboliaWeb.HomeView do
use RoboliaWeb, :view
end
| 15.25 | 32 | 0.803279 |
ab1fdfd8e7c14549ca8fcebf4820387ab43d7270 | 1,511 | exs | Elixir | priv/repo/seed_plans_and_products.exs | santiment/sanbase2 | 9ef6e2dd1e377744a6d2bba570ea6bd477a1db31 | [
"MIT"
] | 81 | 2017-11-20T01:20:22.000Z | 2022-03-05T12:04:25.000Z | priv/repo/seed_plans_and_products.exs | rmoorman/sanbase2 | 226784ab43a24219e7332c49156b198d09a6dd85 | [
"MIT"
] | 359 | 2017-10-15T14:40:53.000Z | 2022-01-25T13:34:20.000Z | priv/repo/seed_plans_and_products.exs | rmoorman/sanbase2 | 226784ab43a24219e7332c49156b198d09a6dd85 | [
"MIT"
] | 16 | 2017-11-19T13:57:40.000Z | 2022-02-07T08:13:02.000Z | alias Sanbase.Repo
Repo.query!("""
INSERT INTO products (id, name, code) VALUES
(1, 'Neuro by Santiment', 'SANAPI'),
(2, 'Sanbase by Santiment', 'SANBASE'),
(4, 'Sandata by Santiment', 'SANDATA'),
(5, 'Exchange Wallets by Santiment', 'SAN_EXCHANGE_WALLETS')
ON CONFLICT DO NOTHING
""")
Repo.query!("""
INSERT... | 35.139535 | 84 | 0.589014 |
ab1fff7b837cd79ba2ac4f94b86f87b6029b527d | 1,028 | ex | Elixir | monitoring_hub/apps/metrics_reporter_ui/web/channels/computation_channel.ex | awesome-archive/wallaroo | 852c19ffad0ed75a767a658a9a72c355e3c4c1c8 | [
"Apache-2.0"
] | null | null | null | monitoring_hub/apps/metrics_reporter_ui/web/channels/computation_channel.ex | awesome-archive/wallaroo | 852c19ffad0ed75a767a658a9a72c355e3c4c1c8 | [
"Apache-2.0"
] | null | null | null | monitoring_hub/apps/metrics_reporter_ui/web/channels/computation_channel.ex | awesome-archive/wallaroo | 852c19ffad0ed75a767a658a9a72c355e3c4c1c8 | [
"Apache-2.0"
] | null | null | null | defmodule MetricsReporterUI.ComputationChannel do
use Phoenix.Channel
alias MonitoringHubUtils.MessageLog
def join("computation:" <> _computation_name, _message, socket) do
send(self, :after_join)
{:ok, socket}
end
def handle_info(:after_join, socket) do
push_initial_throughputs(socket)
{:no... | 34.266667 | 92 | 0.745136 |
ab2002ed967faf8d68f541a083d090f8ac3011b7 | 80 | exs | Elixir | discussapp/test/views/page_view_test.exs | eduardorasgado/ElixirWarlock | 1658ab2ffb2870cb81c8a434755d98678572838c | [
"MIT"
] | null | null | null | discussapp/test/views/page_view_test.exs | eduardorasgado/ElixirWarlock | 1658ab2ffb2870cb81c8a434755d98678572838c | [
"MIT"
] | 1 | 2021-03-10T05:09:49.000Z | 2021-03-10T05:09:49.000Z | discussapp/test/views/page_view_test.exs | eduardorasgado/ElixirWarlock | 1658ab2ffb2870cb81c8a434755d98678572838c | [
"MIT"
] | null | null | null | defmodule Discussapp.PageViewTest do
use Discussapp.ConnCase, async: true
end
| 20 | 38 | 0.825 |
ab201da44bc20ee4b53e4d8fab8bdc440ac75e59 | 1,445 | exs | Elixir | test/plasm/at_or_earlier_than_test.exs | facto/plasm | cd8a713e8409738f776f77cecbc65e2f0f42c146 | [
"Apache-2.0"
] | 56 | 2016-07-31T19:35:49.000Z | 2021-10-21T20:32:42.000Z | test/plasm/at_or_earlier_than_test.exs | atomic-fads/plasm | cd8a713e8409738f776f77cecbc65e2f0f42c146 | [
"Apache-2.0"
] | 2 | 2016-01-27T17:38:55.000Z | 2016-05-21T18:33:14.000Z | test/plasm/at_or_earlier_than_test.exs | atomic-fads/plasm | cd8a713e8409738f776f77cecbc65e2f0f42c146 | [
"Apache-2.0"
] | 3 | 2016-01-27T14:00:55.000Z | 2016-05-21T18:06:56.000Z | defmodule Plasm.AtOrEarlierThanTest do
use Plasm.Case
alias Plasm.Repo
alias Plasm.User
import Plasm.Factory
test ".at_or_earlier_than with a DateTime" do
# Arrange
castable_string = "2016-07-27T00:00:00Z"
{:ok, date_time, _} = DateTime.from_iso8601(castable_string)
earlier_user = insert(:u... | 32.840909 | 114 | 0.703806 |
ab2037f270e6f0e96da3a3f13ff0ee403f5f0c1c | 1,318 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/routers_scoped_list_warning.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/routers_scoped_list_warning.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/routers_scoped_list_warning.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... | 32.146341 | 111 | 0.752656 |
ab205a81367afcb7ff8abc4f7ddcdba04a37c275 | 2,255 | exs | Elixir | mix.exs | VanHelmont/phoenix_pagination | 899b64d056ee815835e6e11b82b835ab20c25a91 | [
"MIT"
] | null | null | null | mix.exs | VanHelmont/phoenix_pagination | 899b64d056ee815835e6e11b82b835ab20c25a91 | [
"MIT"
] | null | null | null | mix.exs | VanHelmont/phoenix_pagination | 899b64d056ee815835e6e11b82b835ab20c25a91 | [
"MIT"
] | null | null | null | defmodule Phoenix.Pagination.Mixfile do
use Mix.Project
@version "1.0.0"
def project do
[
app: :phoenix_pagination,
version: @version,
elixir: "~> 1.11",
elixirc_paths: path(Mix.env()),
package: package(),
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env(... | 26.529412 | 81 | 0.578714 |
ab2078e7b002112b7b01d6050e21f9a71256f0ca | 512 | ex | Elixir | lib/algae/tree/binary_search/foldable.ex | doma-engineering/algae | da85c5a9e78591c707859f07f9d485ed68019349 | [
"MIT"
] | 191 | 2016-08-22T17:34:45.000Z | 2019-05-28T19:02:39.000Z | lib/algae/tree/binary_search/foldable.ex | doma-engineering/algae | da85c5a9e78591c707859f07f9d485ed68019349 | [
"MIT"
] | 35 | 2016-08-30T20:56:22.000Z | 2019-05-02T17:32:31.000Z | lib/algae/tree/binary_search/foldable.ex | doma-engineering/algae | da85c5a9e78591c707859f07f9d485ed68019349 | [
"MIT"
] | 10 | 2016-08-30T18:41:54.000Z | 2019-02-14T14:14:55.000Z | alias Algae.Tree.BinarySearch.Node
import TypeClass
use Witchcraft
definst Witchcraft.Foldable, for: Algae.Tree.BinarySearch.Empty do
def right_fold(_, seed, _), do: seed
end
definst Witchcraft.Foldable, for: Algae.Tree.BinarySearch.Node do
def right_fold(%Node{node: node, left: left, right: right}, seed, fun) do... | 30.117647 | 75 | 0.748047 |
ab207e3907c64229c07d6e52b404f3f1bc0c5493 | 1,578 | ex | Elixir | clients/tool_results/lib/google_api/tool_results/v1beta3/model/used_robo_ignore_directive.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/tool_results/lib/google_api/tool_results/v1beta3/model/used_robo_ignore_directive.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/tool_results/lib/google_api/tool_results/v1beta3/model/used_robo_ignore_directive.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 33.574468 | 126 | 0.751584 |
ab20ab535a3bf966496106d94351609f506510a3 | 10,661 | ex | Elixir | lib/structex.ex | h-ikeda/structex | 109f019108e76c5464fb2273c2e7f0f79fbfef37 | [
"MIT"
] | null | null | null | lib/structex.ex | h-ikeda/structex | 109f019108e76c5464fb2273c2e7f0f79fbfef37 | [
"MIT"
] | 6 | 2021-07-20T20:10:18.000Z | 2022-02-23T20:14:12.000Z | lib/structex.ex | h-ikeda/structex | 109f019108e76c5464fb2273c2e7f0f79fbfef37 | [
"MIT"
] | null | null | null | defmodule Structex do
@doc """
Calculates expected distortion response by equivalent linearization.
iex> model =
...> fn %Tensorex{shape: [2]} = distortion ->
...> mass = Tensorex.from_list([[10.2, 0], [0, 20.4]])
...> k0 = 88.1 - distortion[[0]] * 10
...> k1 = 165.2 - d... | 50.051643 | 240 | 0.407748 |
ab20d34afd4a352fde9a29b909b28d51d8461c81 | 63,948 | ex | Elixir | lib/codes/codes_t17.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_t17.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_t17.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | defmodule IcdCode.ICDCode.Codes_T17 do
alias IcdCode.ICDCode
def _T170XXA do
%ICDCode{full_code: "T170XXA",
category_code: "T17",
short_code: "0XXA",
full_name: "Foreign body in nasal sinus, initial encounter",
short_name: "Foreign body in nasal sinus, initial encounter",
... | 47.124539 | 133 | 0.678723 |
ab20d39c014ae052813e0dafebdb9b37e7b54027 | 2,480 | exs | Elixir | test/fexr_yahoo_test.exs | Schultzer/fexr_yahoo | ad3d75098b4798b82d19de5d8dc757d7a6e5c26f | [
"MIT",
"Unlicense"
] | null | null | null | test/fexr_yahoo_test.exs | Schultzer/fexr_yahoo | ad3d75098b4798b82d19de5d8dc757d7a6e5c26f | [
"MIT",
"Unlicense"
] | null | null | null | test/fexr_yahoo_test.exs | Schultzer/fexr_yahoo | ad3d75098b4798b82d19de5d8dc757d7a6e5c26f | [
"MIT",
"Unlicense"
] | null | null | null | defmodule FexrYahooTest do
use ExUnit.Case
@rates """
{\"query\":{\"count\":10,\"created\":\"2017-11-01T04:56:02Z\",\"lang\":\"en-US\",\"results\":{\"rate\":[{\"id\":\"USDAED\",\"Name\":\"USD/AED\",\"Rate\":\"3.6725\",\"Date\":\"11/1/2017\",\"Time\":\"4:55am\",\"Ask\":\"3.6730\",\"Bid\":\"3.6725\"},{\"id\... | 80 | 1,564 | 0.488306 |
ab20e057fe7d837e145a4ff70cf105375fce66cc | 11,090 | ex | Elixir | lib/mapper/centeuro.ex | nikneroz/exconv | 31a9f424462f88024af3afb32d2cb80160f07ebf | [
"MIT"
] | null | null | null | lib/mapper/centeuro.ex | nikneroz/exconv | 31a9f424462f88024af3afb32d2cb80160f07ebf | [
"MIT"
] | 1 | 2020-07-16T09:38:33.000Z | 2020-07-16T09:38:33.000Z | lib/mapper/centeuro.ex | nikneroz/exconv | 31a9f424462f88024af3afb32d2cb80160f07ebf | [
"MIT"
] | null | null | null | defmodule Exconv.Mapper.Centeuro do
def to_unicode(255), do: 711 # <<203, 135>> | "ˇ"
def to_unicode(254), do: 290 # <<196, 162>> | "Ģ"
def to_unicode(253), do: 380 # <<197, 188>> | "ż"
def to_unicode(252), do: 321 # <<197, 129>> | "Ł"
def to_unicode(251), do: 379 # <<197, 187>> | "Ż"
def to_unicode(250), d... | 49.288889 | 57 | 0.523986 |
ab20e30722269aa7f9563be8b7d558c97760f06c | 1,430 | ex | Elixir | clients/drive_activity/lib/google_api/drive_activity/v2/model/folder.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/drive_activity/lib/google_api/drive_activity/v2/model/folder.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/drive_activity/lib/google_api/drive_activity/v2/model/folder.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... | 30.425532 | 118 | 0.730769 |
ab20e6d524ad33cd3e46f53ff04845a4af8b2ef0 | 1,576 | exs | Elixir | mix.exs | davidenglishmusic/wolfgang_api | 828df91ddf46dcce4dee86c0f416cf292fc261be | [
"MIT"
] | null | null | null | mix.exs | davidenglishmusic/wolfgang_api | 828df91ddf46dcce4dee86c0f416cf292fc261be | [
"MIT"
] | null | null | null | mix.exs | davidenglishmusic/wolfgang_api | 828df91ddf46dcce4dee86c0f416cf292fc261be | [
"MIT"
] | null | null | null | defmodule WolfgangApi.MixProject do
use Mix.Project
def project do
[
app: :wolfgang_api,
version: "0.1.0",
elixir: "~> 1.5",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
start_permanent: Mix.env() == :prod,
aliases: alias... | 25.836066 | 79 | 0.584391 |
ab2117834f3163916bae063a797055f82c1af723 | 5,078 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/machine_type.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/machine_type.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/compute/lib/google_api/compute/v1/model/machine_type.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... | 54.021277 | 221 | 0.695746 |
ab21210023e301617f1a26ee53e55a60d671c2a0 | 2,221 | exs | Elixir | lib/elixir/docs.exs | doughsay/elixir | 7356a47047d0b54517bd6886603f09b1121dde2b | [
"Apache-2.0"
] | 19,291 | 2015-01-01T02:42:49.000Z | 2022-03-31T21:01:40.000Z | lib/elixir/docs.exs | doughsay/elixir | 7356a47047d0b54517bd6886603f09b1121dde2b | [
"Apache-2.0"
] | 8,082 | 2015-01-01T04:16:23.000Z | 2022-03-31T22:08:02.000Z | lib/elixir/docs.exs | doughsay/elixir | 7356a47047d0b54517bd6886603f09b1121dde2b | [
"Apache-2.0"
] | 3,472 | 2015-01-03T04:11:56.000Z | 2022-03-29T02:07:30.000Z | # Returns config for Elixir docs
canonical = System.fetch_env!("CANONICAL")
[
extras: Path.wildcard("lib/elixir/pages/*.md") ++ ["CHANGELOG.md"],
deps: [
eex: "https://hexdocs.pm/eex/#{canonical}",
ex_unit: "https://hexdocs.pm/ex_unit/#{canonical}",
iex: "https://hexdocs.pm/iex/#{canonical}",
logg... | 18.663866 | 95 | 0.540297 |
ab21214e5ab534db3c4e4bcca088a32009522df2 | 1,718 | exs | Elixir | mix_tests/test/property_test.exs | starbelly/thoas | a02f35368911303fc2e7f6b6be790d8ce009903b | [
"Apache-2.0"
] | null | null | null | mix_tests/test/property_test.exs | starbelly/thoas | a02f35368911303fc2e7f6b6be790d8ce009903b | [
"Apache-2.0"
] | null | null | null | mix_tests/test/property_test.exs | starbelly/thoas | a02f35368911303fc2e7f6b6be790d8ce009903b | [
"Apache-2.0"
] | null | null | null | if Code.ensure_loaded?(ExUnitProperties) do
defmodule Jason.PropertyTest do
use ExUnit.Case, async: true
use ExUnitProperties
property "string rountrip" do
check all(string <- string(:printable)) do
assert decode(:thoas.encode(string, %{})) == string
end
end
property "integer... | 27.269841 | 81 | 0.586729 |
ab21328c0cc937a852d92068a58901f09f693606 | 1,228 | exs | Elixir | test/kvstore/router_test.exs | IvanAnaniev/kvstore | 348a0881df60f05af571c170c7fe189488a1a937 | [
"MIT"
] | null | null | null | test/kvstore/router_test.exs | IvanAnaniev/kvstore | 348a0881df60f05af571c170c7fe189488a1a937 | [
"MIT"
] | null | null | null | test/kvstore/router_test.exs | IvanAnaniev/kvstore | 348a0881df60f05af571c170c7fe189488a1a937 | [
"MIT"
] | null | null | null | defmodule KVstore.RouterTest do
use ExUnit.Case
use Plug.Test
alias KVstore.Router
@opts Router.init([])
test "set store without ttl" do
conn = conn(:post, "/stores", "key=key2&value=value")
|> put_req_header("content-type", "application/x-www-form-urlencoded")
|> Router.call(@opt... | 24.078431 | 81 | 0.59772 |
ab21461fe290db5fe5076c864a5901f29f38e12c | 4,521 | ex | Elixir | lib/sourceror/lines_corrector.ex | hrzndhrn/sourceror | f66a21d9deebcf260600f6e3cdf9272808da384d | [
"Apache-2.0"
] | null | null | null | lib/sourceror/lines_corrector.ex | hrzndhrn/sourceror | f66a21d9deebcf260600f6e3cdf9272808da384d | [
"Apache-2.0"
] | null | null | null | lib/sourceror/lines_corrector.ex | hrzndhrn/sourceror | f66a21d9deebcf260600f6e3cdf9272808da384d | [
"Apache-2.0"
] | null | null | null | defmodule Sourceror.LinesCorrector do
@moduledoc false
import Sourceror, only: [get_line: 1, correct_lines: 2]
import Sourceror.Identifier, only: [is_binary_op: 1]
@doc """
Corrects the line numbers of AST nodes such that they are correctly ordered.
* If a node has no line number, it's assumed to be in ... | 27.736196 | 94 | 0.631497 |
ab217f18b3aebaf50d665727d972e3fa17a7ba45 | 1,135 | exs | Elixir | clients/url_shortener/mix.exs | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | null | null | null | clients/url_shortener/mix.exs | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | null | null | null | clients/url_shortener/mix.exs | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | 1 | 2020-11-10T16:58:27.000Z | 2020-11-10T16:58:27.000Z | defmodule GoogleApi.UrlShortener.V1.Mixfile do
use Mix.Project
@version "0.1.0"
def project do
[app: :google_api_url_shortener,
version: @version,
elixir: "~> 1.4",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
description: description(),
package: package... | 23.645833 | 113 | 0.607048 |
ab21cbc86283052698914b8e3a3a8befd90036c1 | 2,184 | ex | Elixir | apps/thundermoon_web/lib/thundermoon_web/live/counter_live.ex | psychedel/thundermoon-umbrella | b52cb59f1b55fe092ddc70fac7cf2f6e7890c9af | [
"MIT"
] | null | null | null | apps/thundermoon_web/lib/thundermoon_web/live/counter_live.ex | psychedel/thundermoon-umbrella | b52cb59f1b55fe092ddc70fac7cf2f6e7890c9af | [
"MIT"
] | null | null | null | apps/thundermoon_web/lib/thundermoon_web/live/counter_live.ex | psychedel/thundermoon-umbrella | b52cb59f1b55fe092ddc70fac7cf2f6e7890c9af | [
"MIT"
] | null | null | null | defmodule ThundermoonWeb.CounterLive do
use Phoenix.LiveView
import Canada.Can
alias Thundermoon.Counter
alias Thundermoon.Repo
alias Thundermoon.Accounts.User
alias ThundermoonWeb.CounterView
alias ThundermoonWeb.Endpoint
alias ThundermoonWeb.Router.Helpers, as: Routes
def mount(session, socket) ... | 27.64557 | 93 | 0.669414 |
ab21dc7603d6acde103cf1688807da93797fcd11 | 1,709 | ex | Elixir | lib/fighter_web/controllers/user_controller.ex | gautambaghel/fighter | 970a098f0d234892af351070b6b2b596b9a2d83c | [
"Apache-2.0"
] | null | null | null | lib/fighter_web/controllers/user_controller.ex | gautambaghel/fighter | 970a098f0d234892af351070b6b2b596b9a2d83c | [
"Apache-2.0"
] | null | null | null | lib/fighter_web/controllers/user_controller.ex | gautambaghel/fighter | 970a098f0d234892af351070b6b2b596b9a2d83c | [
"Apache-2.0"
] | null | null | null | defmodule FighterWeb.UserController do
use FighterWeb, :controller
alias Fighter.Accounts
alias Fighter.Accounts.User
def index(conn, _params) do
users = Accounts.list_users()
render(conn, "index.html", users: users)
end
def new(conn, _params) do
changeset = Accounts.change_user(%User{})
... | 28.016393 | 76 | 0.626097 |
ab21fbec548a13f67b72b0ae37864ab0a53cd7e8 | 78 | ex | Elixir | web/views/coherence/coherence_view.ex | jwarwick/class_list | 05ac775e7b5d42f258024db361a9de1aeed71c73 | [
"MIT"
] | null | null | null | web/views/coherence/coherence_view.ex | jwarwick/class_list | 05ac775e7b5d42f258024db361a9de1aeed71c73 | [
"MIT"
] | null | null | null | web/views/coherence/coherence_view.ex | jwarwick/class_list | 05ac775e7b5d42f258024db361a9de1aeed71c73 | [
"MIT"
] | null | null | null | defmodule Coherence.CoherenceView do
use ClassList.Coherence.Web, :view
end
| 19.5 | 36 | 0.820513 |
ab2215597d064593eac4056270c16d9ba0363117 | 303 | exs | Elixir | installer/mix.exs | seejee/phoenix | 3f7bed87d74be9e3100492545e3750e80765c271 | [
"MIT"
] | null | null | null | installer/mix.exs | seejee/phoenix | 3f7bed87d74be9e3100492545e3750e80765c271 | [
"MIT"
] | null | null | null | installer/mix.exs | seejee/phoenix | 3f7bed87d74be9e3100492545e3750e80765c271 | [
"MIT"
] | null | null | null | defmodule Phoenix.New.Mixfile do
use Mix.Project
def project do
[app: :phoenix_new,
version: "1.1.2",
elixir: "~> 1.0-dev"]
end
# Configuration for the OTP application
#
# Type `mix help compile.app` for more information
def application do
[applications: []]
end
end
| 17.823529 | 52 | 0.650165 |
ab2247392e4065c437dfa11ea6dfbd0c00aadd55 | 6,808 | ex | Elixir | lib/teslamate/locations.ex | douglasevaristo/teslamate | d239023942b319e9446d2da316d0afbddf701b9d | [
"MIT"
] | null | null | null | lib/teslamate/locations.ex | douglasevaristo/teslamate | d239023942b319e9446d2da316d0afbddf701b9d | [
"MIT"
] | 94 | 2020-10-26T06:28:30.000Z | 2022-03-30T15:03:41.000Z | lib/teslamate/locations.ex | douglasevaristo/teslamate | d239023942b319e9446d2da316d0afbddf701b9d | [
"MIT"
] | null | null | null | defmodule TeslaMate.Locations do
@moduledoc """
The Locations context.
"""
require Logger
import Ecto.Query, warn: false
import TeslaMate.CustomExpressions
alias __MODULE__.{Address, Geocoder, GeoFence}
alias TeslaMate.Log.{Drive, ChargingProcess}
alias TeslaMate.Settings.GlobalSettings
alias Tes... | 28.970213 | 115 | 0.587985 |
ab22ad9f931cc5c4f9f4d75e355c31fb2a05c436 | 703 | exs | Elixir | test/support/quick_migration.exs | epinault/snowflake_elixir_ecto | 9f8fc9d272ca140e27acb671af1a1c46ff923b2b | [
"MIT"
] | 4 | 2020-10-30T03:30:01.000Z | 2021-08-07T10:27:15.000Z | test/support/quick_migration.exs | epinault/snowflake_elixir_ecto | 9f8fc9d272ca140e27acb671af1a1c46ff923b2b | [
"MIT"
] | 5 | 2020-10-25T12:48:17.000Z | 2021-12-06T07:29:02.000Z | test/support/quick_migration.exs | epinault/snowflake_elixir_ecto | 9f8fc9d272ca140e27acb671af1a1c46ff923b2b | [
"MIT"
] | 3 | 2020-10-25T11:18:58.000Z | 2021-10-16T04:00:18.000Z | defmodule Ecto.Integration.QuickMigration do
use Ecto.Migration
def change do
# IO.puts "TESTING MIGRATION LOCK"
# Process.sleep(10000)
create table(:posts) do
add(:title, :string, size: 100)
add(:counter, :integer)
add(:blob, :binary)
add(:bid, :binary_id)
add(:uuid, :uu... | 25.107143 | 50 | 0.59175 |
ab22cb3a8d78fd478ee4bd7dc798048d808fe6ae | 644 | ex | Elixir | lib/iceland.ex | YodelTalk/iceland | 625f5dd94b1d3286248016bace5a95fc15cf6aba | [
"MIT"
] | null | null | null | lib/iceland.ex | YodelTalk/iceland | 625f5dd94b1d3286248016bace5a95fc15cf6aba | [
"MIT"
] | null | null | null | lib/iceland.ex | YodelTalk/iceland | 625f5dd94b1d3286248016bace5a95fc15cf6aba | [
"MIT"
] | null | null | null | defmodule Iceland do
def run({[selector: selector], files, _}) do
files
|> Stream.flat_map(fn file ->
{:ok, document} = File.read(file)
{:ok, html} = Floki.parse_document(document)
Floki.find(html, selector)
|> Enum.map(fn result ->
{file, Floki.raw_html(result)}
end)
... | 28 | 86 | 0.572981 |
ab23347c3b220a59afc2427f28578bf2aa261f7c | 351 | ex | Elixir | web/controllers/plugs/auth_plug.ex | cadorfo/SchoolAgenda | 5dd99f3482f103f7a3ac5ef83a07a36d15bbe17d | [
"MIT"
] | null | null | null | web/controllers/plugs/auth_plug.ex | cadorfo/SchoolAgenda | 5dd99f3482f103f7a3ac5ef83a07a36d15bbe17d | [
"MIT"
] | null | null | null | web/controllers/plugs/auth_plug.ex | cadorfo/SchoolAgenda | 5dd99f3482f103f7a3ac5ef83a07a36d15bbe17d | [
"MIT"
] | null | null | null | defmodule SchoolAgenda.Plugs.AuthPlug do
import Plug.Conn
import Phoenix.Controller
def init(options), do: options
def call(conn, _options) do
id = conn |> get_session(:user_id)
if !id do
do_redirect(conn, "/login")
end
conn
end
defp do_redirect(conn, to) do
conn
|> redirect... | 16.714286 | 40 | 0.643875 |
ab23420644bb91a23c01c4a478f0d4dd1b19becc | 1,470 | ex | Elixir | elixir/scrap_preview/lib/scrap_web/views/error_helpers.ex | marcinbiegun/exercises | 36ad942e8d40d6471136326a3f6d09285bbd90aa | [
"MIT"
] | 1 | 2018-12-11T14:09:14.000Z | 2018-12-11T14:09:14.000Z | elixir/scrap_preview/lib/scrap_web/views/error_helpers.ex | marcinbiegun/exercises | 36ad942e8d40d6471136326a3f6d09285bbd90aa | [
"MIT"
] | null | null | null | elixir/scrap_preview/lib/scrap_web/views/error_helpers.ex | marcinbiegun/exercises | 36ad942e8d40d6471136326a3f6d09285bbd90aa | [
"MIT"
] | null | null | null | defmodule ScrapWeb.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
Enum.map(Keyword.get_values(form.errors, field), fn (error) ->
content_tag ... | 32.666667 | 74 | 0.669388 |
ab235c3529388f92076a1829b8cb83263e47e345 | 3,087 | exs | Elixir | dio/exibee/config/exibee.exs | exineris/shp_challenge2021 | 2a5447af681259d0ea699b670cf079bd31315cd8 | [
"Apache-2.0"
] | null | null | null | dio/exibee/config/exibee.exs | exineris/shp_challenge2021 | 2a5447af681259d0ea699b670cf079bd31315cd8 | [
"Apache-2.0"
] | null | null | null | dio/exibee/config/exibee.exs | exineris/shp_challenge2021 | 2a5447af681259d0ea699b670cf079bd31315cd8 | [
"Apache-2.0"
] | null | null | null | import Config
# ==============================
# Exibee Configration
# ==============================
config :exibee,
common: %{
exicombo: {:global, :exicombo},
state_server: {:global, :state_server},
health_check_server: {:global, :health_check_server},
logic_controller_server: {:global, :logic_cont... | 24.696 | 68 | 0.663103 |
ab2370038f28ba317ac3d96e4054d73c02e1041f | 3,358 | exs | Elixir | test/web/controllers/thread_controller_test.exs | palindrom615/firestorm | 0690493c9dcae5c04c63c5321532a7db923e5be7 | [
"MIT"
] | null | null | null | test/web/controllers/thread_controller_test.exs | palindrom615/firestorm | 0690493c9dcae5c04c63c5321532a7db923e5be7 | [
"MIT"
] | 4 | 2021-03-01T21:25:42.000Z | 2022-02-10T23:50:11.000Z | test/web/controllers/thread_controller_test.exs | palindrom615/firestorm | 0690493c9dcae5c04c63c5321532a7db923e5be7 | [
"MIT"
] | 1 | 2020-03-20T12:58:37.000Z | 2020-03-20T12:58:37.000Z | defmodule FirestormWeb.Web.ThreadControllerTest do
use FirestormWeb.Web.ConnCase
alias FirestormWeb.Forums
@create_attrs %{title: "some title", body: "some body"}
@update_attrs %{title: "some updated title"}
@invalid_attrs %{title: nil}
setup do
{:ok, category} = Forums.create_category(%{title: "Cate... | 41.45679 | 128 | 0.705777 |
ab2372c9fdca2f92feadeb6ecc3eaba9868588b5 | 2,263 | exs | Elixir | config/config.exs | andyl/ragged | 2baab0849e2dfc068652ecb2fe88a7c6fe5437d0 | [
"MIT"
] | null | null | null | config/config.exs | andyl/ragged | 2baab0849e2dfc068652ecb2fe88a7c6fe5437d0 | [
"MIT"
] | null | null | null | config/config.exs | andyl/ragged | 2baab0849e2dfc068652ecb2fe88a7c6fe5437d0 | [
"MIT"
] | null | null | null | # This file is responsible for configuring your umbrella
# and **all applications** and their dependencies with the
# help of Mix.Config.
#
# Note that all applications in your umbrella share the
# same configuration and dependencies, which is why they
# all use the same configuration file. If you want different
# conf... | 28.64557 | 86 | 0.685373 |
ab2373d6a0efe192cc9800e484fe5198654539d2 | 224 | ex | Elixir | lib/co2_offset_web/views/donation_view.ex | markevich/co2_offset | 98a799d3f30d21b595c9e083d9ee43bb96a4c68c | [
"Apache-2.0"
] | 15 | 2018-12-26T10:31:16.000Z | 2020-12-01T09:27:01.000Z | lib/co2_offset_web/views/donation_view.ex | markevich/co2_offset | 98a799d3f30d21b595c9e083d9ee43bb96a4c68c | [
"Apache-2.0"
] | 267 | 2018-12-26T07:46:17.000Z | 2020-04-04T17:05:47.000Z | lib/co2_offset_web/views/donation_view.ex | markevich/co2_offset | 98a799d3f30d21b595c9e083d9ee43bb96a4c68c | [
"Apache-2.0"
] | 1 | 2019-07-12T13:53:25.000Z | 2019-07-12T13:53:25.000Z | defmodule Co2OffsetWeb.DonationView do
use Co2OffsetWeb, :view
def to_float_string(float) do
float
|> :erlang.float_to_binary([:compact, {:decimals, 2}])
end
def to_int(float) do
round(float)
end
end
| 17.230769 | 58 | 0.696429 |
ab237e1863a088a322cad5acaf14c871f9582700 | 1,282 | exs | Elixir | days/day2/day2.exs | zachschickler/advent-of-code-2021-elixir | 51a8a7bc6bd0ead7f833261ac8671e12ef0cece8 | [
"MIT"
] | null | null | null | days/day2/day2.exs | zachschickler/advent-of-code-2021-elixir | 51a8a7bc6bd0ead7f833261ac8671e12ef0cece8 | [
"MIT"
] | null | null | null | days/day2/day2.exs | zachschickler/advent-of-code-2021-elixir | 51a8a7bc6bd0ead7f833261ac8671e12ef0cece8 | [
"MIT"
] | null | null | null |
{:ok, contents} = File.read("days/day2/input.txt")
IO.puts "Day 2\n------"
IO.puts "Part 1"
contents
|> String.split("\n")
|> Enum.map(fn s -> String.split(s, " ") end)
|> Enum.map(fn [s, v] -> [s, String.to_integer(v)] end)
|> Enum.map(fn [s, v] -> [s, v, [0,0]] end)
|> Enum.map(fn [s, v, [h, d]] -> case s do
... | 34.648649 | 71 | 0.397036 |
ab2386070d9e18677ea8358503ef097ada645012 | 116 | exs | Elixir | config/config.exs | peaceful-james/tz_datetime | 847806a50c27afae29bd63127634a7997b1450b9 | [
"Apache-2.0"
] | 3 | 2019-10-02T11:35:14.000Z | 2020-10-21T11:02:30.000Z | config/config.exs | peaceful-james/tz_datetime | 847806a50c27afae29bd63127634a7997b1450b9 | [
"Apache-2.0"
] | 3 | 2019-10-03T08:48:01.000Z | 2021-03-22T18:37:56.000Z | config/config.exs | peaceful-james/tz_datetime | 847806a50c27afae29bd63127634a7997b1450b9 | [
"Apache-2.0"
] | 2 | 2020-11-18T16:36:53.000Z | 2021-02-25T03:31:04.000Z | use Mix.Config
if Mix.env() == :test do
config :elixir, :time_zone_database, TzDatetime.TimeZoneDatabaseMock
end
| 19.333333 | 70 | 0.767241 |
ab23bb40222837734e7697dd88f3d732731fbd1b | 2,308 | ex | Elixir | implementations/elixir/ockam/ockam/lib/ockam/protocol/protocol.ex | psinghal20/ockam | 55c2787eb2392c919156c6dded9f31a5249541e1 | [
"Apache-2.0"
] | null | null | null | implementations/elixir/ockam/ockam/lib/ockam/protocol/protocol.ex | psinghal20/ockam | 55c2787eb2392c919156c6dded9f31a5249541e1 | [
"Apache-2.0"
] | null | null | null | implementations/elixir/ockam/ockam/lib/ockam/protocol/protocol.ex | psinghal20/ockam | 55c2787eb2392c919156c6dded9f31a5249541e1 | [
"Apache-2.0"
] | null | null | null | defmodule Ockam.Protocol do
@moduledoc """
Message payload protocol definition and helper functions
See Ockam.Protocol.Stream and Ockam.Stream.Workers.Stream for examples
"""
alias Ockam.Bare.Extended, as: BareExtended
@enforce_keys [:name]
defstruct [:name, :request, :response]
@type extended_schema(... | 28.493827 | 95 | 0.659879 |
ab23bfff5ecb73200e8366b9bea936af9078ad9e | 2,189 | ex | Elixir | clients/content/lib/google_api/content/v2/model/shipment_tracking_info.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/shipment_tracking_info.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/shipment_tracking_info.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... | 26.695122 | 103 | 0.60804 |
ab23e800ec5c8e803eb307ae8d55205c8930e70a | 609 | exs | Elixir | ex_graphs_book/config/config.exs | NickMcG/ExGraphsBook | 89276d374dd21cc4605a4b1b5a05b177723680c2 | [
"Apache-2.0"
] | 75 | 2021-11-17T11:55:13.000Z | 2022-03-28T04:35:04.000Z | ex_graphs_book/config/config.exs | NickMcG/ExGraphsBook | 89276d374dd21cc4605a4b1b5a05b177723680c2 | [
"Apache-2.0"
] | 48 | 2021-11-15T13:56:14.000Z | 2022-03-31T15:55:47.000Z | ex_graphs_book/config/config.exs | NickMcG/ExGraphsBook | 89276d374dd21cc4605a4b1b5a05b177723680c2 | [
"Apache-2.0"
] | 6 | 2021-12-22T20:41:27.000Z | 2022-03-09T09:07:38.000Z | # This file is responsible for configuring your umbrella
# and **all applications** and their dependencies with the
# help of the Config module.
#
# Note that all applications in your umbrella share the
# same configuration and dependencies, which is why they
# all use the same configuration file. If you want different... | 32.052632 | 60 | 0.724138 |
ab240949619688166becba35d1fef93f32b306c7 | 1,085 | ex | Elixir | lib/noven_web/channels/user_socket.ex | ConnorRigby/noven | 2c34953490585b77b6c7ae8dd772da5028f6a948 | [
"Apache-2.0"
] | 8 | 2020-09-10T09:18:17.000Z | 2022-03-25T03:43:25.000Z | lib/noven_web/channels/user_socket.ex | ConnorRigby/noven | 2c34953490585b77b6c7ae8dd772da5028f6a948 | [
"Apache-2.0"
] | null | null | null | lib/noven_web/channels/user_socket.ex | ConnorRigby/noven | 2c34953490585b77b6c7ae8dd772da5028f6a948 | [
"Apache-2.0"
] | 4 | 2020-12-28T06:13:51.000Z | 2021-04-27T18:00:06.000Z | defmodule NovenWeb.UserSocket do
use Phoenix.Socket
## Channels
# channel "room:*", NovenWeb.RoomChannel
# Socket params are passed from the client and can
# be used to verify and authenticate a user. After
# verification, you can put default assigns into
# the socket that will be set for all channels, ... | 30.138889 | 83 | 0.693088 |
ab2436e5de66d4e9ef617f400462ee51da5c6d75 | 159 | ex | Elixir | phoenix-app/flyr/lib/flyr_web/views/page_view.ex | rounakdatta/flyr | b455bd44f712b4d7f31d23df7059bd2b88a53bea | [
"WTFPL"
] | 1 | 2018-11-23T08:36:25.000Z | 2018-11-23T08:36:25.000Z | phoenix-app/flyr/lib/flyr_web/views/page_view.ex | rounakdatta/flyr | b455bd44f712b4d7f31d23df7059bd2b88a53bea | [
"WTFPL"
] | 1 | 2018-10-07T14:34:50.000Z | 2018-10-08T19:46:29.000Z | phoenix-app/flyr/lib/flyr_web/views/page_view.ex | rounakdatta/flyr | b455bd44f712b4d7f31d23df7059bd2b88a53bea | [
"WTFPL"
] | null | null | null | defmodule FlyrWeb.PageView do
use FlyrWeb, :view
# we can put HTML code within 3 quotes (in separate lines) here instead of HTML files in /views/page
end
| 26.5 | 102 | 0.754717 |
ab245d3f43c331ae7941ea77c2074447885f607c | 277 | ex | Elixir | lib/afterglow_web/views/alert_notification_setting_view.ex | sahilpaudel/AfterGlow | 0859ec14b47c8c5704cc8e5cba86d39aa258fff5 | [
"MIT"
] | null | null | null | lib/afterglow_web/views/alert_notification_setting_view.ex | sahilpaudel/AfterGlow | 0859ec14b47c8c5704cc8e5cba86d39aa258fff5 | [
"MIT"
] | null | null | null | lib/afterglow_web/views/alert_notification_setting_view.ex | sahilpaudel/AfterGlow | 0859ec14b47c8c5704cc8e5cba86d39aa258fff5 | [
"MIT"
] | null | null | null | defmodule AfterGlow.AlertNotificationSettingView do
use AfterGlow.Web, :view
use JaSerializer.PhoenixView
attributes([
:method,
:recipients,
:alert_setting_id,
:inserted_at,
:updated_at
])
def type do
"alert-notification-settings"
end
end
| 16.294118 | 51 | 0.707581 |
ab24778f723ef36cbcc35d022321b041625b7c78 | 1,835 | exs | Elixir | test/railway_ipc/message_bus/rabbitmq/adapter_test.exs | learn-co/railway_ipc | aeec16fb5b315fb3d8472b38c6eeea20d20e731a | [
"MIT"
] | 2 | 2021-03-22T19:37:33.000Z | 2022-01-04T08:48:20.000Z | test/railway_ipc/message_bus/rabbitmq/adapter_test.exs | learn-co/railway_ipc | aeec16fb5b315fb3d8472b38c6eeea20d20e731a | [
"MIT"
] | 10 | 2019-11-29T20:24:24.000Z | 2021-02-26T22:06:13.000Z | test/railway_ipc/message_bus/rabbitmq/adapter_test.exs | learn-co/railway_ipc | aeec16fb5b315fb3d8472b38c6eeea20d20e731a | [
"MIT"
] | 1 | 2020-01-09T17:13:29.000Z | 2020-01-09T17:13:29.000Z | defmodule RailwayIpc.MessageBus.RabbitMQ.AdapterTest do
use ExUnit.Case
use Test.Support.RabbitCase
alias RailwayIpc.MessageBus.Publisher
alias RailwayIpc.MessageBus.RabbitMQ.Adapter
alias RailwayIpc.MessageBus.RabbitMQ.Logger, as: RabbitLog
setup :attach_telemetry_handlers
test "setup publisher" do
... | 26.985294 | 91 | 0.676294 |
ab24aff55a776449baf888d0b48d93b5305e3902 | 6,698 | ex | Elixir | clients/metastore/lib/google_api/metastore/v1beta/model/service.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/metastore/lib/google_api/metastore/v1beta/model/service.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/metastore/lib/google_api/metastore/v1beta/model/service.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 61.449541 | 333 | 0.709913 |
ab24dde13f9f2b8e9ecf3d846d46b896b413ae59 | 4,637 | ex | Elixir | farmbot_ext/lib/farmbot_ext/amqp/auto_sync_channel.ex | Arti4ever/farmbot_os | a238c1d5ae78c08d1f5894cac41ed61035fb3266 | [
"MIT"
] | 1 | 2021-04-22T10:18:50.000Z | 2021-04-22T10:18:50.000Z | farmbot_ext/lib/farmbot_ext/amqp/auto_sync_channel.ex | Arti4ever/farmbot_os | a238c1d5ae78c08d1f5894cac41ed61035fb3266 | [
"MIT"
] | null | null | null | farmbot_ext/lib/farmbot_ext/amqp/auto_sync_channel.ex | Arti4ever/farmbot_os | a238c1d5ae78c08d1f5894cac41ed61035fb3266 | [
"MIT"
] | null | null | null | defmodule FarmbotExt.AMQP.AutoSyncChannel do
@moduledoc """
This module provides an AMQP channel for
auto-sync messages from the FarmBot API.
SEE:
https://developer.farm.bot/docs/realtime-updates-auto-sync#section-example-auto-sync-subscriptions
"""
use GenServer
use AMQP
require FarmbotCore.Logger... | 28.27439 | 102 | 0.669398 |
ab24de643e31814dc175e6660e7c803e46914a7d | 1,071 | ex | Elixir | retain/lib/retain/flash_card.ex | zakimedina/otp_apr_2021 | fc2eb3b84c62bbfc88ec57728775098582c06f0e | [
"MIT"
] | null | null | null | retain/lib/retain/flash_card.ex | zakimedina/otp_apr_2021 | fc2eb3b84c62bbfc88ec57728775098582c06f0e | [
"MIT"
] | null | null | null | retain/lib/retain/flash_card.ex | zakimedina/otp_apr_2021 | fc2eb3b84c62bbfc88ec57728775098582c06f0e | [
"MIT"
] | 4 | 2021-04-20T19:27:03.000Z | 2021-04-21T13:02:39.000Z | defmodule Retain.FlashCard do
defstruct [:plan, :text]
@reject [" ", "?", "!", ".", "-", ",", "\n"]
def new(text \\ "hello", steps \\ 2) do
%__MODULE__{
plan: plan(text, steps),
text: text
}
end
def text(flashcard), do: flashcard.text
def erase(%{plan: [], text: _text} = flashcard), ... | 23.282609 | 79 | 0.605976 |
ab24df30e442f5e2aaf748852401e3cb10dd93d3 | 433 | ex | Elixir | lib/boss_tuples.ex | inaka/beam_olympics-solver | a32fa18a4a7e03900b7274c4a0c4e8b82f1a9768 | [
"Apache-2.0"
] | 1 | 2018-10-11T06:58:02.000Z | 2018-10-11T06:58:02.000Z | lib/boss_tuples.ex | inaka/beam_olympics-solver | a32fa18a4a7e03900b7274c4a0c4e8b82f1a9768 | [
"Apache-2.0"
] | null | null | null | lib/boss_tuples.ex | inaka/beam_olympics-solver | a32fa18a4a7e03900b7274c4a0c4e8b82f1a9768 | [
"Apache-2.0"
] | null | null | null | defmodule BossTuples do
@moduledoc """
Solver for bo_tuple_counter
"""
@doc """
Solves the task requirement
"""
def solve do
Boss.submit &solution/1
end
@doc """
Solution for bo_first_task
"""
def solution([]) do
0
end
def solution([h | t]) do
solution(h) + solution(t)
end
d... | 15.464286 | 37 | 0.616628 |
ab250b46dc491b6e2c842c920391f0ad5b51ff34 | 14,265 | ex | Elixir | lib/huex.ex | directionalpad/huex | 2bf2e9596d4c9712d580622fd592ab85ef4b9664 | [
"Apache-2.0"
] | null | null | null | lib/huex.ex | directionalpad/huex | 2bf2e9596d4c9712d580622fd592ab85ef4b9664 | [
"Apache-2.0"
] | null | null | null | lib/huex.ex | directionalpad/huex | 2bf2e9596d4c9712d580622fd592ab85ef4b9664 | [
"Apache-2.0"
] | null | null | null | defmodule Huex do
@moduledoc """
Elixir client for Philips Hue connected light bulbs.
* Query functions return the response from the API.
* Command functions return a `Bridge` struct in order to be pipeline friendly.
Read more on the [GitHub page](https://github.com/xavier/huex).
"""
@typedoc """
... | 34.456522 | 178 | 0.691553 |
ab2513dfbf0b467181998960af5bbeee0d43f1e1 | 6,234 | exs | Elixir | lib/mix/test/mix/tasks/new_test.exs | maartenvanvliet/elixir | 62d75fd7c657b2e08bfaff4002a851efaccf5a65 | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/tasks/new_test.exs | maartenvanvliet/elixir | 62d75fd7c657b2e08bfaff4002a851efaccf5a65 | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/tasks/new_test.exs | maartenvanvliet/elixir | 62d75fd7c657b2e08bfaff4002a851efaccf5a65 | [
"Apache-2.0"
] | null | null | null | Code.require_file("../../test_helper.exs", __DIR__)
defmodule Mix.Tasks.NewTest do
use MixTest.Case
test "new" do
in_tmp "new", fn ->
Mix.Tasks.New.run(["hello_world"])
assert_file("hello_world/mix.exs", fn file ->
assert file =~ "app: :hello_world"
assert file =~ "version: \"0.1.... | 31.969231 | 93 | 0.62111 |
ab2528168c51dcc4957bd24398b4656111ec9815 | 51 | ex | Elixir | apps/rtr/web/views/page_view.ex | jschoch/umb | 98e4ca8b883777c775d2b1115ae5116cc32570fe | [
"MIT"
] | null | null | null | apps/rtr/web/views/page_view.ex | jschoch/umb | 98e4ca8b883777c775d2b1115ae5116cc32570fe | [
"MIT"
] | null | null | null | apps/rtr/web/views/page_view.ex | jschoch/umb | 98e4ca8b883777c775d2b1115ae5116cc32570fe | [
"MIT"
] | null | null | null | defmodule Rtr.PageView do
use Rtr.Web, :view
end
| 12.75 | 25 | 0.745098 |
ab25958805eb93fe1a58be149cb68d21f15a736c | 2,903 | ex | Elixir | lib/surface_bulma/button.ex | justin-m-morgan/surface_bulma | c31faebc818c39d06250574b913096504bd6eeec | [
"MIT"
] | 21 | 2020-06-09T21:59:24.000Z | 2021-01-08T19:06:20.000Z | lib/surface_bulma/button.ex | justin-m-morgan/surface_bulma | c31faebc818c39d06250574b913096504bd6eeec | [
"MIT"
] | 4 | 2020-06-18T18:00:23.000Z | 2021-01-15T15:08:54.000Z | lib/surface_bulma/button.ex | justin-m-morgan/surface_bulma | c31faebc818c39d06250574b913096504bd6eeec | [
"MIT"
] | 1 | 2020-12-09T17:18:57.000Z | 2020-12-09T17:18:57.000Z | defmodule SurfaceBulma.Button do
@moduledoc """
The classic **button**, in different colors, sizes, and states
"""
use Surface.Component
@doc """
The button type, defaults to "button", mainly used for instances like modal X to close style buttons
where you don't want to set a type at all. Setting to nil... | 23.224 | 103 | 0.610403 |
ab25dcb38a1ed16434d8a6ed3e778d467c57745a | 189 | exs | Elixir | test/test_helper.exs | emanchado/cataloger | 4ecd08e26017fd19b1a26196e87604b3d973b6be | [
"BSD-3-Clause"
] | 2 | 2016-08-07T12:27:07.000Z | 2017-07-19T22:28:36.000Z | test/test_helper.exs | emanchado/cataloger | 4ecd08e26017fd19b1a26196e87604b3d973b6be | [
"BSD-3-Clause"
] | null | null | null | test/test_helper.exs | emanchado/cataloger | 4ecd08e26017fd19b1a26196e87604b3d973b6be | [
"BSD-3-Clause"
] | 1 | 2018-11-22T03:08:25.000Z | 2018-11-22T03:08:25.000Z | ExUnit.start
Mix.Task.run "ecto.create", ~w(-r Cataloger.Repo --quiet)
Mix.Task.run "ecto.migrate", ~w(-r Cataloger.Repo --quiet)
Ecto.Adapters.SQL.begin_test_transaction(Cataloger.Repo)
| 27 | 58 | 0.751323 |
ab25eb290c7cee408d29e074285111c3dc6ab001 | 999 | ex | Elixir | apps/artemis/lib/artemis/workers/interval_supervisor.ex | artemis-platform/artemis_dashboard | 5ab3f5ac4c5255478bbebf76f0e43b44992e3cab | [
"MIT"
] | 9 | 2019-08-19T19:56:34.000Z | 2022-03-22T17:56:38.000Z | apps/artemis/lib/artemis/workers/interval_supervisor.ex | chrislaskey/atlas_dashboard | 9009ef5aac8fefba126fa7d3e3b82d1b610ee6fe | [
"MIT"
] | 7 | 2019-07-12T21:41:01.000Z | 2020-08-17T21:29:22.000Z | apps/artemis/lib/artemis/workers/interval_supervisor.ex | chrislaskey/atlas_dashboard | 9009ef5aac8fefba126fa7d3e3b82d1b610ee6fe | [
"MIT"
] | 2 | 2019-07-05T22:51:47.000Z | 2019-08-19T19:56:37.000Z | defmodule Artemis.IntervalSupervisor do
use Supervisor
@moduledoc """
Starts and supervises interval workers.
"""
def start_link(options \\ []) do
Supervisor.start_link(__MODULE__, :ok, name: options[:name] || __MODULE__)
end
@impl true
def init(:ok) do
children = [
supervisor(Artemis.W... | 30.272727 | 78 | 0.701702 |
ab25f9eb1eafccf999ed9a4bd1fbfd2742403bf6 | 3,931 | ex | Elixir | apps/reaper/lib/reaper/event/event_handler.ex | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | 18 | 2020-11-13T15:38:24.000Z | 2021-05-26T00:40:08.000Z | apps/reaper/lib/reaper/event/event_handler.ex | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | 365 | 2020-09-21T12:31:40.000Z | 2021-09-25T14:54:21.000Z | apps/reaper/lib/reaper/event/event_handler.ex | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | 3 | 2020-10-06T16:17:49.000Z | 2021-09-03T17:11:41.000Z | defmodule Reaper.Event.EventHandler do
@moduledoc "This modules processes all events for Reaper"
use Brook.Event.Handler
import SmartCity.Event,
only: [
dataset_update: 0,
error_dataset_update: 0,
data_ingest_start: 0,
data_extract_start: 0,
data_extract_end: 0,
file_inges... | 29.335821 | 116 | 0.689392 |
ab260df392cbbb168035edb69bc6068e784c9c61 | 872 | ex | Elixir | clients/iap/lib/google_api/iap/v1/metadata.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/iap/lib/google_api/iap/v1/metadata.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/iap/lib/google_api/iap/v1/metadata.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 32.296296 | 74 | 0.755734 |
ab263cdaa0fa0ed179abf75f2d4d2de55cae223f | 3,557 | ex | Elixir | clients/analytics/lib/google_api/analytics/v3/model/filter_advanced_details.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/analytics/lib/google_api/analytics/v3/model/filter_advanced_details.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/analytics/lib/google_api/analytics/v3/model/filter_advanced_details.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 ... | 42.855422 | 177 | 0.676413 |
ab269140b3bddc43e2a68da6cf17be60bf1726af | 59 | exs | Elixir | test/deux_test.exs | 3zcurdia/deux | 59e548fbd7e42b460ce624971dd1a0437d9c1df9 | [
"MIT"
] | null | null | null | test/deux_test.exs | 3zcurdia/deux | 59e548fbd7e42b460ce624971dd1a0437d9c1df9 | [
"MIT"
] | null | null | null | test/deux_test.exs | 3zcurdia/deux | 59e548fbd7e42b460ce624971dd1a0437d9c1df9 | [
"MIT"
] | null | null | null | defmodule DeuxTest do
use ExUnit.Case
doctest Deux
end
| 11.8 | 21 | 0.779661 |
ab26d1e34784953b9b43af070b0bdeb369f6ca7a | 6,264 | ex | Elixir | test/support/live_views/lifecycle.ex | tomconroy/phoenix_live_view | 655e95170e3e1b8fead1ffe43a661c7f5aa6b519 | [
"MIT"
] | null | null | null | test/support/live_views/lifecycle.ex | tomconroy/phoenix_live_view | 655e95170e3e1b8fead1ffe43a661c7f5aa6b519 | [
"MIT"
] | null | null | null | test/support/live_views/lifecycle.ex | tomconroy/phoenix_live_view | 655e95170e3e1b8fead1ffe43a661c7f5aa6b519 | [
"MIT"
] | null | null | null | defmodule Phoenix.LiveViewTest.InitAssigns do
alias Phoenix.LiveView
def mount(_params, _session, socket) do
{:cont,
socket
|> LiveView.assign(:init_assigns_mount, true)
|> LiveView.assign(:last_on_mount, :init_assigns_mount)}
end
def other_mount(_params, _session, socket) do
{:cont,
... | 26.319328 | 96 | 0.672573 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.