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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2d9ca80058fcc48c44afe9106421115b9bc60453 | 788 | exs | Elixir | apps/ewallet_db/priv/repo/migrations/20171027151104_add_account_id_to_balance_table.exs | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | apps/ewallet_db/priv/repo/migrations/20171027151104_add_account_id_to_balance_table.exs | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | apps/ewallet_db/priv/repo/migrations/20171027151104_add_account_id_to_balance_table.exs | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"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... | 32.833333 | 74 | 0.755076 |
2d9cdf3b863f0716ae31ce57644bd3cd5a61dade | 1,055 | exs | Elixir | apps/tai/test/tai/advisors/factories/one_for_all_products_test.exs | ccamateur/tai | 41c4b3e09dafc77987fa3f6b300c15461d981e16 | [
"MIT"
] | 276 | 2018-01-16T06:36:06.000Z | 2021-03-20T21:48:01.000Z | apps/tai/test/tai/advisors/factories/one_for_all_products_test.exs | ccamateur/tai | 41c4b3e09dafc77987fa3f6b300c15461d981e16 | [
"MIT"
] | 73 | 2018-10-05T18:45:06.000Z | 2021-02-08T05:46:33.000Z | apps/tai/test/tai/advisors/factories/one_for_all_products_test.exs | ccamateur/tai | 41c4b3e09dafc77987fa3f6b300c15461d981e16 | [
"MIT"
] | 43 | 2018-06-09T09:54:51.000Z | 2021-03-07T07:35:17.000Z | defmodule Tai.Advisors.Factories.OneForAllProductsTest do
use Tai.TestSupport.DataCase, async: false
alias Tai.Advisors.Factories.OneForAllProducts
@fleet_config struct(Tai.Fleets.FleetConfig,
id: :fleet_a,
advisor: MyAdvisor,
factory: OneForAllProducts,
quotes: "venue_a.btc_usdt venue_b.etc_usdt... | 37.678571 | 89 | 0.745024 |
2d9cf2fa73553ea82c4026837ef0e91524960cca | 2,166 | exs | Elixir | test/militerm_web/controllers/character_controller_test.exs | jgsmith/militerm | c4252d0a93f5620b90750ac2b61baf282e9ef7eb | [
"Apache-2.0"
] | 6 | 2017-06-16T10:26:35.000Z | 2021-04-07T15:01:00.000Z | test/militerm_web/controllers/character_controller_test.exs | jgsmith/militerm | c4252d0a93f5620b90750ac2b61baf282e9ef7eb | [
"Apache-2.0"
] | 2 | 2020-04-14T02:17:46.000Z | 2021-03-10T11:09:05.000Z | test/militerm_web/controllers/character_controller_test.exs | jgsmith/militerm | c4252d0a93f5620b90750ac2b61baf282e9ef7eb | [
"Apache-2.0"
] | null | null | null | defmodule MilitermWeb.CharacterControllerTest do
use MilitermWeb.ConnCase
alias Militerm.Accounts
@create_attrs %{cap_name: "SomeCap-Name", gender: "male"}
@invalid_attrs %{cap_name: "some-cap--name", gender: nil}
@create_user_attrs %{
email: "example@example.com",
uid: "example@example.com",
n... | 24.337079 | 86 | 0.624654 |
2d9cf4aa80cba032892ee3dd1fb42001a03078b2 | 8,627 | ex | Elixir | components/notifications-service/server/lib/data/timed_cache.ex | fossabot/automate-1 | 16910c3ebd75ee0aa25e527bfce3e1378306f42d | [
"Apache-2.0"
] | 191 | 2019-04-16T15:04:53.000Z | 2022-03-21T14:10:44.000Z | components/notifications-service/server/lib/data/timed_cache.ex | fossabot/automate-1 | 16910c3ebd75ee0aa25e527bfce3e1378306f42d | [
"Apache-2.0"
] | 4,882 | 2019-04-16T16:16:01.000Z | 2022-03-31T15:39:35.000Z | components/notifications-service/server/lib/data/timed_cache.ex | fossabot/automate-1 | 16910c3ebd75ee0aa25e527bfce3e1378306f42d | [
"Apache-2.0"
] | 114 | 2019-04-16T15:21:27.000Z | 2022-03-26T09:50:08.000Z | defmodule Notifications.Data.TimedCache do
@moduledoc "A lightweight cache with timed refreshes per key"
use GenServer
require Logger
# What do I need to track?
# each cached data bit:
# - the key:
# - data
# - the settings
# - initializing caller pid
# each running loader:
# - the pid ... | 41.277512 | 115 | 0.647386 |
2d9cf511187668548ad7391515107d2a0fcf0c5e | 7,958 | ex | Elixir | clients/logging/lib/google_api/logging/v2/model/metric_descriptor.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/logging/lib/google_api/logging/v2/model/metric_descriptor.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/logging/lib/google_api/logging/v2/model/metric_descriptor.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 103.350649 | 3,292 | 0.730837 |
2d9d128aaf3382d702c97194558149811289e8d9 | 31,479 | ex | Elixir | lib/google_api/storage/v1/api/buckets.ex | DinaWork/google-api-storage | 4ad1e5716e4f2a4e85b91dc1aaf93ac13096c9a2 | [
"Apache-2.0"
] | null | null | null | lib/google_api/storage/v1/api/buckets.ex | DinaWork/google-api-storage | 4ad1e5716e4f2a4e85b91dc1aaf93ac13096c9a2 | [
"Apache-2.0"
] | null | null | null | lib/google_api/storage/v1/api/buckets.ex | DinaWork/google-api-storage | 4ad1e5716e4f2a4e85b91dc1aaf93ac13096c9a2 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 49.340125 | 247 | 0.640046 |
2d9d36266c813fcbc1cb8574baba7d1c92dc7800 | 225 | exs | Elixir | apps/storage/priv/repo/migrations/20190202070821_create_article_foreign_key.exs | anyex-project/anyex | d04018337bcec621f2e2e8d17773fa2724e3c6e1 | [
"MIT"
] | 12 | 2019-02-21T21:29:08.000Z | 2019-05-14T11:41:10.000Z | apps/storage/priv/repo/migrations/20190202070821_create_article_foreign_key.exs | Hentioe/anyex | d04018337bcec621f2e2e8d17773fa2724e3c6e1 | [
"MIT"
] | 18 | 2019-02-05T17:19:33.000Z | 2019-03-13T13:38:08.000Z | apps/storage/priv/repo/migrations/20190202070821_create_article_foreign_key.exs | Hentioe/anyex | d04018337bcec621f2e2e8d17773fa2724e3c6e1 | [
"MIT"
] | null | null | null | defmodule Storage.Repo.Migrations.CreateArticleForeignKey do
use Storage.Migration
def change do
alter table(:article) do
add :category_id, references(:category), null: false, comment: "关联类别"
end
end
end
| 22.5 | 75 | 0.733333 |
2d9d45d085ca3ffbf6580a2a250fb450c2721b66 | 537 | ex | Elixir | lib/mail_slurp_api/model/create_group_options.ex | sumup-bank/mailslurp-client-elixir | 87ccdedf2f0f4cd3e50f5781ffb088142e3cf4e8 | [
"MIT"
] | 1 | 2021-06-17T18:07:49.000Z | 2021-06-17T18:07:49.000Z | lib/mail_slurp_api/model/create_group_options.ex | sumup-bank/mailslurp-client-elixir | 87ccdedf2f0f4cd3e50f5781ffb088142e3cf4e8 | [
"MIT"
] | null | null | null | lib/mail_slurp_api/model/create_group_options.ex | sumup-bank/mailslurp-client-elixir | 87ccdedf2f0f4cd3e50f5781ffb088142e3cf4e8 | [
"MIT"
] | 1 | 2021-03-16T18:55:56.000Z | 2021-03-16T18:55:56.000Z | # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://openapi-generator.tech
# Do not edit the class manually.
defmodule MailSlurpAPI.Model.CreateGroupOptions do
@moduledoc """
"""
@derive [Poison.Encoder]
defstruct [
:"name",
:"description"
]
@t... | 19.178571 | 91 | 0.67784 |
2d9d51266213cc9a330fe3b4857c6f96cda00be3 | 67 | exs | Elixir | config/test.exs | NFIBrokerage/beeline_appsignal | 7dc9da08075c0f4a8bcf30e2fb23be5a9bc1ef36 | [
"Apache-2.0"
] | null | null | null | config/test.exs | NFIBrokerage/beeline_appsignal | 7dc9da08075c0f4a8bcf30e2fb23be5a9bc1ef36 | [
"Apache-2.0"
] | null | null | null | config/test.exs | NFIBrokerage/beeline_appsignal | 7dc9da08075c0f4a8bcf30e2fb23be5a9bc1ef36 | [
"Apache-2.0"
] | null | null | null | import Config
config :beeline_appsignal, appsignal: AppsignalMock
| 16.75 | 51 | 0.850746 |
2d9d62b247d529a47c89a4cc6c861c87e766736d | 1,985 | ex | Elixir | clients/policy_troubleshooter/lib/google_api/policy_troubleshooter/v1/model/google_cloud_policytroubleshooter_v1_troubleshoot_iam_policy_request.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/policy_troubleshooter/lib/google_api/policy_troubleshooter/v1/model/google_cloud_policytroubleshooter_v1_troubleshoot_iam_policy_request.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/policy_troubleshooter/lib/google_api/policy_troubleshooter/v1/model/google_cloud_policytroubleshooter_v1_troubleshoot_iam_policy_request.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.824561 | 224 | 0.77733 |
2d9d66e2b6d306c5989881220434662acf2cb405 | 2,054 | ex | Elixir | lib/cforum/messages/interesting_messages.ex | campingrider/cforum_ex | cf27684c47d6dc26c9c37a946f1c729a79d27c70 | [
"MIT"
] | null | null | null | lib/cforum/messages/interesting_messages.ex | campingrider/cforum_ex | cf27684c47d6dc26c9c37a946f1c729a79d27c70 | [
"MIT"
] | null | null | null | lib/cforum/messages/interesting_messages.ex | campingrider/cforum_ex | cf27684c47d6dc26c9c37a946f1c729a79d27c70 | [
"MIT"
] | null | null | null | defmodule Cforum.Messages.InterestingMessages do
import Ecto.Query, warn: false
alias Cforum.Repo
alias Cforum.Messages.Message
alias Cforum.Messages.InterestingMessage
alias Cforum.Messages.Tag
@doc """
Marks a message as interesting for a user.
## Examples
iex> mark_message_interesting(%User... | 26.333333 | 93 | 0.667478 |
2d9d803897cdbaab318eb1dcfdd4371b9aa963a2 | 354 | ex | Elixir | test/support/factories/mastery.ex | ktornwall/elixir_conf_2016_demo | 5a0adf832773714ba7743c049964623262ee7a13 | [
"MIT"
] | 27 | 2016-09-02T19:26:16.000Z | 2017-11-30T02:27:16.000Z | test/support/factories/mastery.ex | katzenbar/elixir_conf_2016_demo | 5a0adf832773714ba7743c049964623262ee7a13 | [
"MIT"
] | 1 | 2016-10-23T18:24:59.000Z | 2016-10-23T18:24:59.000Z | test/support/factories/mastery.ex | ktornwall/elixir_conf_2016_demo | 5a0adf832773714ba7743c049964623262ee7a13 | [
"MIT"
] | 4 | 2016-10-08T02:51:41.000Z | 2017-12-05T02:02:40.000Z | defmodule ExConf.Factory.Mastery do
defmacro __using__(_) do
quote do
def mastery_factory do
%ExConf.Mastery{
name: sequence(:name, &"Mastery #{&1}"),
ranks: 1,
description: ["asdf"],
sanitized_description: ["asdf"],
mastery_tree: "Ferocity",
... | 18.631579 | 50 | 0.545198 |
2d9d9d05d2d71335567706eb342d6160d69dbba2 | 1,238 | ex | Elixir | lib/accent/scopes/search.ex | suryatmodulus/accent | 6aaf34075c33f3d9d84d38237af4a39b594eb808 | [
"BSD-3-Clause"
] | null | null | null | lib/accent/scopes/search.ex | suryatmodulus/accent | 6aaf34075c33f3d9d84d38237af4a39b594eb808 | [
"BSD-3-Clause"
] | null | null | null | lib/accent/scopes/search.ex | suryatmodulus/accent | 6aaf34075c33f3d9d84d38237af4a39b594eb808 | [
"BSD-3-Clause"
] | null | null | null | defmodule Accent.Scopes.Search do
import Ecto.Query, only: [from: 2, dynamic: 2]
@doc """
## Examples
iex> Accent.Scopes.Search.from_search(Accent.Project, "", :name)
Accent.ProjectSearch
iex> Accent.Scopes.Search.from_search(Accent.Project, nil, :name)
Accent.ProjectSearch
iex> Accent.Scope... | 32.578947 | 76 | 0.655089 |
2d9df493b9b8b7491160463e669456133fb9f6de | 2,054 | ex | Elixir | lib/ash/resource/transformers/default_accept.ex | axelson/ash | 5992fc00f7bdc0ba0ebdb476a5191245145ef7c8 | [
"MIT"
] | null | null | null | lib/ash/resource/transformers/default_accept.ex | axelson/ash | 5992fc00f7bdc0ba0ebdb476a5191245145ef7c8 | [
"MIT"
] | null | null | null | lib/ash/resource/transformers/default_accept.ex | axelson/ash | 5992fc00f7bdc0ba0ebdb476a5191245145ef7c8 | [
"MIT"
] | null | null | null | defmodule Ash.Resource.Transformers.DefaultAccept do
@moduledoc "Sets the default `accept` for each action"
use Ash.Dsl.Transformer
alias Ash.Dsl.Transformer
def transform(resource, dsl_state) do
default_accept_attributes =
resource
|> Ash.Resource.Info.attributes()
|> Enum.map(& &1.nam... | 29.342857 | 89 | 0.575463 |
2d9df7987bfe1af0d69fbb92950df3ab4715a010 | 5,276 | ex | Elixir | clients/games/lib/google_api/games/v1/api/leaderboards.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/games/lib/google_api/games/v1/api/leaderboards.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/games/lib/google_api/games/v1/api/leaderboards.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... | 41.873016 | 196 | 0.694086 |
2d9dfe8c2841786db92b7b5492ce42bcc8b0631c | 12,035 | ex | Elixir | lib/printer/any_of_printer.ex | HenkPoley/json-schema-to-elm | 92230ac907d1eab27a0c8e4d969c5104f8e66383 | [
"MIT"
] | null | null | null | lib/printer/any_of_printer.ex | HenkPoley/json-schema-to-elm | 92230ac907d1eab27a0c8e4d969c5104f8e66383 | [
"MIT"
] | null | null | null | lib/printer/any_of_printer.ex | HenkPoley/json-schema-to-elm | 92230ac907d1eab27a0c8e4d969c5104f8e66383 | [
"MIT"
] | null | null | null | defmodule JS2E.Printer.AnyOfPrinter do
@behaviour JS2E.Printer.PrinterBehaviour
@moduledoc ~S"""
A printer for printing an 'any of' type decoder.
"""
require Elixir.{EEx, Logger}
alias JS2E.Printer
alias JsonSchema.{Resolver, Types}
alias Printer.{ErrorUtil, PrinterError, PrinterResult, Utils}
alias... | 27.167043 | 91 | 0.604736 |
2d9e0ca73ec7051810512f1ef55a3037e9616e28 | 243 | exs | Elixir | priv/repo/migrations/20210322143145_create_feedback.exs | N-Patarov/bgsite_official | 9ed082dd8c6c5dbc83e0bc50ec63095a72ee2854 | [
"Apache-2.0"
] | 1 | 2021-08-05T12:44:37.000Z | 2021-08-05T12:44:37.000Z | priv/repo/migrations/20210322143145_create_feedback.exs | N-Patarov/bgsite_official | 9ed082dd8c6c5dbc83e0bc50ec63095a72ee2854 | [
"Apache-2.0"
] | 16 | 2021-02-20T19:22:45.000Z | 2021-06-14T13:59:01.000Z | priv/repo/migrations/20210322143145_create_feedback.exs | N-Patarov/bgsite_official | 9ed082dd8c6c5dbc83e0bc50ec63095a72ee2854 | [
"Apache-2.0"
] | 3 | 2021-05-17T17:54:43.000Z | 2021-11-03T15:30:30.000Z | defmodule BgsiteOfficial.Repo.Migrations.CreateFeedback do
use Ecto.Migration
def change do
create table(:feedback) do
add :name, :string
add :email, :string
add :text, :string
timestamps()
end
end
end
| 16.2 | 58 | 0.658436 |
2d9e1b00df1889c24193e278ed6f7d93b991bd0a | 1,121 | exs | Elixir | scripts/matematica.exs | Elixir-UTFPR/curso_de_elixir_sequencial_marco_2022 | f05d723eebd35ea1b448ddc5a4e420e2a1e39e9c | [
"MIT"
] | 2 | 2022-03-07T18:24:44.000Z | 2022-03-22T09:26:20.000Z | scripts/matematica.exs | Elixir-UTFPR/curso_de_elixir_sequencial_marco_2022 | f05d723eebd35ea1b448ddc5a4e420e2a1e39e9c | [
"MIT"
] | null | null | null | scripts/matematica.exs | Elixir-UTFPR/curso_de_elixir_sequencial_marco_2022 | f05d723eebd35ea1b448ddc5a4e420e2a1e39e9c | [
"MIT"
] | 3 | 2022-03-14T22:34:06.000Z | 2022-03-16T20:56:27.000Z | defmodule Matematica do
def divide(um_numero, outro_numero) do
case {Float.parse(um_numero), Float.parse(outro_numero)} do
{:error, _} ->
{:erro, "O primeiro argumento não é um número!"}
{_, :error} ->
{:erro, "O segundo argumento não é um número!"}
{{_num1, _}, {0.0, _}} ->
... | 26.690476 | 64 | 0.606601 |
2d9e5e1b99d8181694f1614f841b153e2b59aa41 | 688 | ex | Elixir | lib/shopix_web/email.ex | gsarwate/shopix | 21d0e85294ee92cb7573d1b5a5746af6824b9355 | [
"MIT"
] | 196 | 2019-05-05T15:59:32.000Z | 2022-03-15T02:37:19.000Z | lib/shopix_web/email.ex | gsarwate/shopix | 21d0e85294ee92cb7573d1b5a5746af6824b9355 | [
"MIT"
] | 105 | 2019-05-04T19:04:40.000Z | 2021-07-28T11:21:45.000Z | lib/shopix_web/email.ex | gsarwate/shopix | 21d0e85294ee92cb7573d1b5a5746af6824b9355 | [
"MIT"
] | 26 | 2019-05-05T19:40:52.000Z | 2021-11-16T00:32:46.000Z | defmodule ShopixWeb.Email do
use Bamboo.Phoenix, view: ShopixWeb.EmailView
import ShopixWeb.TranslationHelpers
alias Shopix.Front
alias Shopix.Schema.Order
def order_complete_email(%Order{} = order, current_locale, global_config) do
conn = %{
assigns: %{
translations: Front.get_translations... | 26.461538 | 78 | 0.68314 |
2d9e72ecea64d6d860f12196e55bcfe2e1e9671c | 12,497 | ex | Elixir | lib/sanbase/prices/price_sql_query.ex | sitedata/sanbase2 | 8da5e44a343288fbc41b68668c6c80ae8547d557 | [
"MIT"
] | null | null | null | lib/sanbase/prices/price_sql_query.ex | sitedata/sanbase2 | 8da5e44a343288fbc41b68668c6c80ae8547d557 | [
"MIT"
] | 1 | 2021-07-24T16:26:03.000Z | 2021-07-24T16:26:03.000Z | lib/sanbase/prices/price_sql_query.ex | sitedata/sanbase2 | 8da5e44a343288fbc41b68668c6c80ae8547d557 | [
"MIT"
] | null | null | null | defmodule Sanbase.Price.SqlQuery do
@table "asset_prices"
import Sanbase.Metric.SqlQuery.Helper, only: [aggregation: 3, generate_comparison_string: 2]
def timeseries_data_query(slug, from, to, interval, source, aggregation) do
{from, to, interval, span} = timerange_parameters(from, to, interval)
query ... | 26.817597 | 112 | 0.602625 |
2d9e74f695ae59032d5bc016d0ea8aeaeaf38916 | 2,944 | ex | Elixir | clients/document_ai/lib/google_api/document_ai/v1beta2/model/google_cloud_documentai_v1beta1_document_revision.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-10-01T09:20:41.000Z | 2021-10-01T09:20:41.000Z | clients/document_ai/lib/google_api/document_ai/v1beta2/model/google_cloud_documentai_v1beta1_document_revision.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | clients/document_ai/lib/google_api/document_ai/v1beta2/model/google_cloud_documentai_v1beta1_document_revision.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... | 40.328767 | 233 | 0.715353 |
2d9e8515d9c9e1d1cea2372fc8d347323210f21c | 490 | exs | Elixir | bench/create_ngrams.exs | kipcole9/text_corpus_udhr | 8fb948444ebfe6160572bd907617bd1a270e090c | [
"Apache-2.0"
] | 1 | 2020-07-08T11:19:03.000Z | 2020-07-08T11:19:03.000Z | bench/create_ngrams.exs | kipcole9/text_corpus_udhr | 8fb948444ebfe6160572bd907617bd1a270e090c | [
"Apache-2.0"
] | null | null | null | bench/create_ngrams.exs | kipcole9/text_corpus_udhr | 8fb948444ebfe6160572bd907617bd1a270e090c | [
"Apache-2.0"
] | 1 | 2020-07-03T17:40:00.000Z | 2020-07-03T17:40:00.000Z | runner =
Text.Vocabulary.known_vocabularies
|> Enum.map(fn vocabulary ->
{inspect(vocabulary), &vocabulary.calculate_ngrams(hd(&1))}
end)
language = "en"
Benchee.run(
runner,
inputs: %{
"50 characters" => Enum.take(Text.Streamer.corpus_random_stream(corpus, language, 50), 1),
"100 characters" =>... | 28.823529 | 96 | 0.702041 |
2d9e98c717c1722bdde7b27f95fa0a803a8919e5 | 7,735 | ex | Elixir | lib/temp.ex | kianmeng/elixir-temp | 7ec85c15be5f9c2a69813d33fa648de4c3a89198 | [
"MIT"
] | 32 | 2018-09-28T01:12:19.000Z | 2022-02-23T12:08:24.000Z | lib/temp.ex | kianmeng/elixir-temp | 7ec85c15be5f9c2a69813d33fa648de4c3a89198 | [
"MIT"
] | 10 | 2018-10-08T16:00:59.000Z | 2022-02-25T13:45:39.000Z | lib/temp.ex | kianmeng/elixir-temp | 7ec85c15be5f9c2a69813d33fa648de4c3a89198 | [
"MIT"
] | 7 | 2019-05-10T11:44:45.000Z | 2021-01-13T12:51:51.000Z | defmodule Temp do
@type options :: nil | Path.t | map
@doc """
Returns `:ok` when the tracking server used to track temporary files started properly.
"""
@pdict_key :"$__temp_tracker__"
@spec track :: Agent.on_start
def track() do
case Process.get(@pdict_key) do
nil ->
start_tracker()... | 28.025362 | 117 | 0.612928 |
2d9e9d0c3b785b519d36efd05944f2c062dab370 | 4,128 | ex | Elixir | lib/chat_api_web/views/customer_view.ex | Tiamat-Tech/papercups | f17d2b0ce080c0edab92a4b2e6d4afcef04aa291 | [
"MIT"
] | null | null | null | lib/chat_api_web/views/customer_view.ex | Tiamat-Tech/papercups | f17d2b0ce080c0edab92a4b2e6d4afcef04aa291 | [
"MIT"
] | null | null | null | lib/chat_api_web/views/customer_view.ex | Tiamat-Tech/papercups | f17d2b0ce080c0edab92a4b2e6d4afcef04aa291 | [
"MIT"
] | null | null | null | defmodule ChatApiWeb.CustomerView do
use ChatApiWeb, :view
alias ChatApiWeb.{
CompanyView,
ConversationView,
CustomerView,
MessageView,
NoteView,
TagView,
CSVHelpers
}
alias ChatApi.Companies.Company
alias ChatApi.Customers.Customer
@customer_csv_ordered_fields ~w(id name emai... | 31.037594 | 97 | 0.671269 |
2d9ea177607ffa63f54f0c46baafab62b061d1b7 | 2,361 | ex | Elixir | lib/opencov/badge_creator.ex | yknx4/opencov | dc961a41e29b41b0657bc2a64bb67350a65477b8 | [
"MIT"
] | 8 | 2021-08-22T10:37:57.000Z | 2022-01-10T11:27:06.000Z | lib/opencov/badge_creator.ex | yknx4/librecov | dc961a41e29b41b0657bc2a64bb67350a65477b8 | [
"MIT"
] | 109 | 2021-08-20T04:08:04.000Z | 2022-01-03T07:39:18.000Z | lib/opencov/badge_creator.ex | Librecov/librecov | dc961a41e29b41b0657bc2a64bb67350a65477b8 | [
"MIT"
] | null | null | null | defmodule Librecov.BadgeCreator do
require EEx
# values and SVG are taken from https://github.com/badges/shields
@base_width 89
@extra_width 7
@template_path Path.join(__DIR__, "templates/badge_template.eex")
@authorized_formats ~w(png jpg svg)
EEx.function_from_file(:defp, :template, @template_path, [
... | 25.663043 | 86 | 0.631089 |
2d9ead8ed7b56124736443c1c7a1677427bab3b4 | 1,079 | ex | Elixir | bulls_and_cows/lib/game_router.ex | alpdenizz/ElixirPlayground | 58b5a16c489058e0067e4811042d96fe6a5f8d59 | [
"MIT"
] | null | null | null | bulls_and_cows/lib/game_router.ex | alpdenizz/ElixirPlayground | 58b5a16c489058e0067e4811042d96fe6a5f8d59 | [
"MIT"
] | null | null | null | bulls_and_cows/lib/game_router.ex | alpdenizz/ElixirPlayground | 58b5a16c489058e0067e4811042d96fe6a5f8d59 | [
"MIT"
] | null | null | null | defmodule GameRouter do
use Plug.Router
plug :match
plug Plug.Parsers, parsers: [:json], pass: ["application/json"], json_decoder: Poison
plug :dispatch
def start_link do
Plug.Adapters.Cowboy.http(GameRouter, [])
end
post "/games" do
id = UUID.uuid1()
{:ok, _} = Game.start_link(String.to_at... | 23.977778 | 87 | 0.629286 |
2d9eb15808b95edf3aedeeafaba2a115663a5e2e | 1,113 | exs | Elixir | apps/error/config/config.exs | mikrofusion/passwordless | 26621389cc0e8e307080b1eb5be42b0527e6611b | [
"MIT"
] | null | null | null | apps/error/config/config.exs | mikrofusion/passwordless | 26621389cc0e8e307080b1eb5be42b0527e6611b | [
"MIT"
] | null | null | null | apps/error/config/config.exs | mikrofusion/passwordless | 26621389cc0e8e307080b1eb5be42b0527e6611b | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the paren... | 35.903226 | 73 | 0.750225 |
2d9ec8155d4b78fdfc608446939787132ed74e57 | 1,340 | exs | Elixir | mix.exs | m00sey/keriex | cb1442b5793f2c3e2ea381eeb1cab9dea14c39a8 | [
"Apache-2.0"
] | null | null | null | mix.exs | m00sey/keriex | cb1442b5793f2c3e2ea381eeb1cab9dea14c39a8 | [
"Apache-2.0"
] | null | null | null | mix.exs | m00sey/keriex | cb1442b5793f2c3e2ea381eeb1cab9dea14c39a8 | [
"Apache-2.0"
] | null | null | null | defmodule Core.MixProject do
use Mix.Project
def project do
[
app: :keriex,
version: "0.1.0",
elixir: "~> 1.11",
start_permanent: Mix.env() == :prod,
deps: deps(),
test_coverage: [
tool: ExCoveralls,
ignore_modules: []
],
elixirc_options: [warning... | 23.508772 | 85 | 0.523881 |
2d9ef99e64490880f5940ad0b6b1dc9c33180629 | 358 | ex | Elixir | lib/api/task.ex | sndnv/track | 3d3727f752877f51a69700c0efff13d3eed978fa | [
"Apache-2.0"
] | null | null | null | lib/api/task.ex | sndnv/track | 3d3727f752877f51a69700c0efff13d3eed978fa | [
"Apache-2.0"
] | null | null | null | lib/api/task.ex | sndnv/track | 3d3727f752877f51a69700c0efff13d3eed978fa | [
"Apache-2.0"
] | null | null | null | defmodule Api.Task do
@moduledoc """
Structure defining all the fields of a task:
- `id` - unique task identifier (UUID)
- `task` - task name
- `start` - `NaiveDateTime` timestamp (UTC); task start date/time
- `duration` - task duration, in minutes since `start`
"""
@derive [Poison.Encoder]
defstruc... | 25.571429 | 67 | 0.662011 |
2d9f043abbbb4f85f48954249c00056c51b19b8f | 133 | ex | Elixir | apps/gen_rtmp_server/lib/gen_rtmp_server/meta_data.ex | Kabie/elixir-media-libs | 9750c6dcdffdf8014183a6a4f303c5d0d658f062 | [
"MIT"
] | 75 | 2016-12-23T14:37:18.000Z | 2021-04-26T14:07:20.000Z | apps/gen_rtmp_server/lib/gen_rtmp_server/meta_data.ex | Kabie/elixir-media-libs | 9750c6dcdffdf8014183a6a4f303c5d0d658f062 | [
"MIT"
] | 19 | 2016-12-22T03:20:43.000Z | 2020-06-11T12:10:37.000Z | apps/gen_rtmp_server/lib/gen_rtmp_server/meta_data.ex | Kabie/elixir-media-libs | 9750c6dcdffdf8014183a6a4f303c5d0d658f062 | [
"MIT"
] | 3 | 2018-03-29T06:40:40.000Z | 2019-02-13T09:37:19.000Z | defmodule GenRtmpServer.MetaData do
@type t :: %__MODULE__{
details: Rtmp.StreamMetadata.t
}
defstruct details: nil
end | 16.625 | 35 | 0.714286 |
2d9f14bc1c64f9a088de14a95c3bc15387501a9d | 18,106 | ex | Elixir | lib/ex_unit/lib/ex_unit/doc_test.ex | enokd/elixir | e39b32f235082b8a29fcb22d250c822cca98609f | [
"Apache-2.0"
] | 1 | 2015-11-12T19:23:45.000Z | 2015-11-12T19:23:45.000Z | lib/ex_unit/lib/ex_unit/doc_test.ex | enokd/elixir | e39b32f235082b8a29fcb22d250c822cca98609f | [
"Apache-2.0"
] | null | null | null | lib/ex_unit/lib/ex_unit/doc_test.ex | enokd/elixir | e39b32f235082b8a29fcb22d250c822cca98609f | [
"Apache-2.0"
] | null | null | null | defmodule ExUnit.DocTest do
@moduledoc """
ExUnit.DocTest implements functionality similar to [Python's
doctest](http://docs.python.org/2/library/doctest.html).
In a nutshell, it allows us to generate tests from the code
examples existing in a module/function/macro's documentation.
In order to do that, one... | 32.27451 | 171 | 0.631282 |
2d9f22c4f6bf3ee577d2e34a499fc4621b0b909e | 130 | ex | Elixir | lib/elixir/lib/supervisor/default.ex | tmbb/exdocs_makedown_demo | 6a0039c54d2fa10d79c080efcef8d70d359678f8 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/supervisor/default.ex | tmbb/exdocs_makedown_demo | 6a0039c54d2fa10d79c080efcef8d70d359678f8 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/supervisor/default.ex | tmbb/exdocs_makedown_demo | 6a0039c54d2fa10d79c080efcef8d70d359678f8 | [
"Apache-2.0"
] | null | null | null | defmodule Supervisor.Default do
@moduledoc false
def init({children, opts}) do
Supervisor.init(children, opts)
end
end
| 16.25 | 35 | 0.730769 |
2d9f7108f20d4979bff2bd201dd17ac62310ecad | 793 | ex | Elixir | lib/changelog_web/controllers/post_controller.ex | boneskull/changelog.com | 2fa2e356bb0e8fcf038c46a4a947fef98822e37d | [
"MIT"
] | null | null | null | lib/changelog_web/controllers/post_controller.ex | boneskull/changelog.com | 2fa2e356bb0e8fcf038c46a4a947fef98822e37d | [
"MIT"
] | null | null | null | lib/changelog_web/controllers/post_controller.ex | boneskull/changelog.com | 2fa2e356bb0e8fcf038c46a4a947fef98822e37d | [
"MIT"
] | null | null | null | defmodule ChangelogWeb.PostController do
use ChangelogWeb, :controller
alias Changelog.{Post, NewsItem}
plug PublicEtsCache
def index(conn, params) do
page =
NewsItem.published
|> NewsItem.with_object_prefix("post")
|> NewsItem.newest_first
|> NewsItem.preload_all
|> Repo.pa... | 22.657143 | 61 | 0.639344 |
2d9f7a99dc180991aa15f2fe1e0cf94594593c5d | 665 | ex | Elixir | lib/dotfiler/cli.ex | filipebarros/dotfiler | 6d0984371c6b0bc91902c65b7b10691579d7d414 | [
"MIT"
] | null | null | null | lib/dotfiler/cli.ex | filipebarros/dotfiler | 6d0984371c6b0bc91902c65b7b10691579d7d414 | [
"MIT"
] | null | null | null | lib/dotfiler/cli.ex | filipebarros/dotfiler | 6d0984371c6b0bc91902c65b7b10691579d7d414 | [
"MIT"
] | null | null | null | defmodule Dotfiler.CLI do
alias Dotfiler.{Brew, Link, Print}
def parse(args \\ []) do
strict_options = [source: :string, brew: :boolean, version: :boolean, help: :boolean]
aliased_options = [s: :source, b: :brew, v: :version, h: :help]
options = OptionParser.parse(args, strict: strict_options, aliases... | 27.708333 | 89 | 0.618045 |
2d9f91b1cf246f402b5b7963eafeab047ce361bb | 3,855 | exs | Elixir | test/firmware/tx_buffer_test.exs | FarmBot/farmbot_os | 5ebdca3afd672eb6b0af5c71cfca02488b32569a | [
"MIT"
] | 843 | 2016-10-05T23:46:05.000Z | 2022-03-14T04:31:55.000Z | test/firmware/tx_buffer_test.exs | FarmBot/farmbot_os | 5ebdca3afd672eb6b0af5c71cfca02488b32569a | [
"MIT"
] | 455 | 2016-10-15T08:49:16.000Z | 2022-03-15T12:23:04.000Z | test/firmware/tx_buffer_test.exs | FarmBot/farmbot_os | 5ebdca3afd672eb6b0af5c71cfca02488b32569a | [
"MIT"
] | 261 | 2016-10-10T04:37:06.000Z | 2022-03-13T21:07:38.000Z | defmodule FarmbotCore.Firmware.TxBufferTest do
use ExUnit.Case
use Mimic
import ExUnit.CaptureLog
alias FarmbotCore.Firmware.TxBuffer
alias FarmbotCore.Firmware.GCode
alias FarmbotCore.Firmware.UARTCoreSupport, as: Support
doctest FarmbotCore.Firmware.TxBuffer, import: true
@fake_buffer1 TxBuffer.new... | 25.872483 | 79 | 0.6262 |
2d9fa364bd4344c57008c9a9fd3cdb27a7e5684c | 637 | exs | Elixir | test/koans/patterns_koans_test.exs | Imtiyaaz1234/elixir-koans | e1a8a55e3acbb88bb598becf3f40cb52f912e60a | [
"MIT"
] | 1,944 | 2016-04-24T02:46:10.000Z | 2022-03-29T00:19:17.000Z | test/koans/patterns_koans_test.exs | Imtiyaaz1234/elixir-koans | e1a8a55e3acbb88bb598becf3f40cb52f912e60a | [
"MIT"
] | 157 | 2016-04-23T18:40:24.000Z | 2022-02-10T14:00:45.000Z | test/koans/patterns_koans_test.exs | Imtiyaaz1234/elixir-koans | e1a8a55e3acbb88bb598becf3f40cb52f912e60a | [
"MIT"
] | 636 | 2016-04-23T17:18:00.000Z | 2022-03-23T10:04:06.000Z | defmodule PatternsTests do
use ExUnit.Case
import TestHarness
test "Pattern Matching" do
answers = [
1,
{:multiple, [1, [2, 3, 4]]},
[1, 2, 3, 4],
3,
"eggs, milk",
"Honda",
MatchError,
{:multiple, [:make, "Honda"]},
[1, 2, 3],
{:multiple, ["Meow", "... | 19.90625 | 72 | 0.474097 |
2da00659cdeb2c748a303c31597dd3e2ea8351f2 | 89 | ex | Elixir | web/emails/coherence/coherence_mailer.ex | Symbolk/social_network | 11df1ba9bc19fd140b630ac2abbd4b13b42def92 | [
"MIT"
] | 17 | 2017-01-02T10:38:28.000Z | 2021-02-28T22:16:54.000Z | web/emails/coherence/coherence_mailer.ex | Symbolk/social_network | 11df1ba9bc19fd140b630ac2abbd4b13b42def92 | [
"MIT"
] | null | null | null | web/emails/coherence/coherence_mailer.ex | Symbolk/social_network | 11df1ba9bc19fd140b630ac2abbd4b13b42def92 | [
"MIT"
] | 2 | 2017-01-09T13:02:13.000Z | 2018-06-16T22:01:53.000Z | defmodule SocialNetwork.Coherence.Mailer do
use Swoosh.Mailer, otp_app: :coherence
end
| 22.25 | 43 | 0.820225 |
2da00694489b88f76963358fa131c6692d5e1289 | 1,538 | exs | Elixir | projects/api/config/dev.exs | strattadb/margaret | dde5d7b42f6d9b4d320069a0117136dae03b13b5 | [
"MIT"
] | 82 | 2017-11-06T01:00:55.000Z | 2020-12-09T10:35:29.000Z | projects/api/config/dev.exs | dbstratta/margaret | dde5d7b42f6d9b4d320069a0117136dae03b13b5 | [
"MIT"
] | 98 | 2017-11-06T22:57:32.000Z | 2020-07-03T04:46:39.000Z | projects/api/config/dev.exs | strattadb/margaret | dde5d7b42f6d9b4d320069a0117136dae03b13b5 | [
"MIT"
] | 10 | 2017-11-16T05:31:58.000Z | 2020-10-29T18:02:35.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 brunch.io to recompile .js and .css sources.
config :margaret, MargaretWeb.Endpoint,
http: [port: ... | 31.387755 | 170 | 0.73342 |
2da00ea5193d2a0267e0651fa92d480cac273426 | 2,432 | ex | Elixir | lib/map_utils.ex | sitedata/sanbase2 | 8da5e44a343288fbc41b68668c6c80ae8547d557 | [
"MIT"
] | null | null | null | lib/map_utils.ex | sitedata/sanbase2 | 8da5e44a343288fbc41b68668c6c80ae8547d557 | [
"MIT"
] | 1 | 2021-07-24T16:26:03.000Z | 2021-07-24T16:26:03.000Z | lib/map_utils.ex | sitedata/sanbase2 | 8da5e44a343288fbc41b68668c6c80ae8547d557 | [
"MIT"
] | null | null | null | defmodule Sanbase.MapUtils do
@doc ~s"""
Return a subset of `left` map that has only the keys that are also present in `right`.
#### Examples:
iex> Sanbase.MapUtils.drop_diff_keys(%{}, %{})
%{}
iex> Sanbase.MapUtils.drop_diff_keys(%{a: 1}, %{a: 1})
%{a: 1}
iex> Sanbase.MapUtils.drop_diff_ke... | 30.4 | 97 | 0.539474 |
2da00f41ea5fcb65e07eb6d2c64938e47edd70e1 | 127 | ex | Elixir | lib/google_fit/activity_type/team_sports.ex | tsubery/google_fit | 7578b832c560b3b4a78059ac86af6e111812712e | [
"Apache-2.0"
] | 2 | 2017-02-01T13:51:26.000Z | 2019-04-12T11:37:25.000Z | lib/google_fit/activity_type/team_sports.ex | tsubery/google_fit | 7578b832c560b3b4a78059ac86af6e111812712e | [
"Apache-2.0"
] | null | null | null | lib/google_fit/activity_type/team_sports.ex | tsubery/google_fit | 7578b832c560b3b4a78059ac86af6e111812712e | [
"Apache-2.0"
] | null | null | null | defmodule GoogleFit.ActivityType.TeamSports do
@moduledoc false
def code, do: GoogleFit.ActivityType.code(__MODULE__)
end
| 21.166667 | 55 | 0.811024 |
2da02be0a1588d8219bc7d39e460cb0f6458c733 | 23,574 | ex | Elixir | app/lib/app/accounts.ex | kljensen/yale-class-chat | b03e72deed967249a64404bff68b1cf22e7e1e6a | [
"Unlicense"
] | 1 | 2020-02-10T21:35:17.000Z | 2020-02-10T21:35:17.000Z | app/lib/app/accounts.ex | kljensen/yale-class-chat | b03e72deed967249a64404bff68b1cf22e7e1e6a | [
"Unlicense"
] | 86 | 2020-01-24T14:53:27.000Z | 2021-05-18T19:16:30.000Z | app/lib/app/accounts.ex | kljensen/yale-class-chat | b03e72deed967249a64404bff68b1cf22e7e1e6a | [
"Unlicense"
] | null | null | null | defmodule App.Accounts do
@course_owner_roles ["owner"]
@course_admin_roles ["administrator", "owner"]
@section_write_roles ["student"]
@section_read_roles ["student", "defunct_student", "guest"]
@moduledoc """
The Accounts context.
"""
import Ecto.Query, warn: false
alias App.Repo
alias App.Acco... | 25.348387 | 141 | 0.616951 |
2da055f5df5e2afa51bc8770a946f328991fd648 | 2,598 | exs | Elixir | mix.exs | supersimple/nerves_bootstrap | 4187fcbb4f2be70fb71391a9d47b13db35561886 | [
"Apache-2.0"
] | null | null | null | mix.exs | supersimple/nerves_bootstrap | 4187fcbb4f2be70fb71391a9d47b13db35561886 | [
"Apache-2.0"
] | null | null | null | mix.exs | supersimple/nerves_bootstrap | 4187fcbb4f2be70fb71391a9d47b13db35561886 | [
"Apache-2.0"
] | null | null | null | defmodule Nerves.Bootstrap.Mixfile do
use Mix.Project
@version "1.7.1"
@source_url "https://github.com/nerves-project/nerves_bootstrap"
def project do
[
app: :nerves_bootstrap,
version: @version,
elixir: "~> 1.7",
aliases: aliases(),
xref: [exclude: [Nerves.Env, Nerves.Artifa... | 24.055556 | 92 | 0.585835 |
2da09bec56b6266714938326830784cad57340f3 | 678 | exs | Elixir | test/performance_test.exs | jeremyjh/money | 236d14eb7bcf1ef96982bd65081cf676287d5560 | [
"Apache-2.0"
] | null | null | null | test/performance_test.exs | jeremyjh/money | 236d14eb7bcf1ef96982bd65081cf676287d5560 | [
"Apache-2.0"
] | null | null | null | test/performance_test.exs | jeremyjh/money | 236d14eb7bcf1ef96982bd65081cf676287d5560 | [
"Apache-2.0"
] | null | null | null | defmodule MoneyTest.Performance do
use ExUnit.Case
# This is fixed to a single machine spec which is not good.
# A proper approach is required.
# @acceptable_limit 76_000
# @acceptable_tolerance 0.02
# @iterations 1000
# @acceptable_range trunc(@acceptable_limit * (1 - @acceptable_tolerance))..
# ... | 30.818182 | 78 | 0.641593 |
2da0a56698453789a16a5b8fc6f3c757827d9fe7 | 2,003 | ex | Elixir | clients/drive/lib/google_api/drive/v3/model/comment_list.ex | CertifiedrLi/elixir-google-api | 4e0e261dd06ee7753c356cca413783f3facd5f03 | [
"Apache-2.0"
] | null | null | null | clients/drive/lib/google_api/drive/v3/model/comment_list.ex | CertifiedrLi/elixir-google-api | 4e0e261dd06ee7753c356cca413783f3facd5f03 | [
"Apache-2.0"
] | null | null | null | clients/drive/lib/google_api/drive/v3/model/comment_list.ex | CertifiedrLi/elixir-google-api | 4e0e261dd06ee7753c356cca413783f3facd5f03 | [
"Apache-2.0"
] | 1 | 2018-07-28T20:50:50.000Z | 2018-07-28T20:50:50.000Z | # Copyright 2018 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 39.27451 | 298 | 0.749875 |
2da0b0156713be09eaed7e42ed15047fec43e03e | 522 | ex | Elixir | lib/mockin_web/controllers/user_controller.ex | victor-mesquita/mockin-api | 31efb457067b0b1cf8878eccc87480e009934fc9 | [
"MIT"
] | null | null | null | lib/mockin_web/controllers/user_controller.ex | victor-mesquita/mockin-api | 31efb457067b0b1cf8878eccc87480e009934fc9 | [
"MIT"
] | null | null | null | lib/mockin_web/controllers/user_controller.ex | victor-mesquita/mockin-api | 31efb457067b0b1cf8878eccc87480e009934fc9 | [
"MIT"
] | null | null | null | defmodule MockinWeb.UserController do
use MockinWeb, :controller
alias MockinWeb.APIAuthPlug
action_fallback(MockinWeb.FallbackController)
def get(conn, _) do
config = Pow.Plug.fetch_config(conn)
conn
|> APIAuthPlug.fetch(config)
|> case do
{conn, nil} ->
conn
|> put_sta... | 20.88 | 68 | 0.603448 |
2da0b76021a0a8d7bc5dad7883ee828655cce9f2 | 6,553 | ex | Elixir | lib/phoenix/router/helpers.ex | henrik/phoenix | 4f784ec808b33638263e8d6b8c4b43d21b62a43b | [
"MIT"
] | null | null | null | lib/phoenix/router/helpers.ex | henrik/phoenix | 4f784ec808b33638263e8d6b8c4b43d21b62a43b | [
"MIT"
] | null | null | null | lib/phoenix/router/helpers.ex | henrik/phoenix | 4f784ec808b33638263e8d6b8c4b43d21b62a43b | [
"MIT"
] | null | null | null | defmodule Phoenix.Router.Helpers do
# Module that generates the routing helpers.
@moduledoc false
alias Phoenix.Router.Route
alias Phoenix.Socket
alias Plug.Conn
@transports [Phoenix.Transports.WebSocket, Phoenix.Transports.LongPoller]
@doc """
Generates the helper module for the given environment an... | 30.910377 | 126 | 0.638791 |
2da0dc665edbed50ef3a97796f24883d4f090a74 | 2,120 | ex | Elixir | clients/source_repo/lib/google_api/source_repo/v1/model/set_iam_policy_request.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/source_repo/lib/google_api/source_repo/v1/model/set_iam_policy_request.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/source_repo/lib/google_api/source_repo/v1/model/set_iam_policy_request.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | 1 | 2020-11-10T16:58:27.000Z | 2020-11-10T16:58:27.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 41.568627 | 298 | 0.74717 |
2da0f156d66527a2446f1abcffae4d769298d44a | 664 | ex | Elixir | lib/exile/process_nif.ex | akash-akya/exile | bcb6a0fe32839678e129fbb5927c07da72b9cc12 | [
"Apache-2.0"
] | 78 | 2020-05-19T15:36:13.000Z | 2022-03-29T18:16:44.000Z | lib/exile/process_nif.ex | akash-akya/exile | bcb6a0fe32839678e129fbb5927c07da72b9cc12 | [
"Apache-2.0"
] | 5 | 2020-08-04T23:06:56.000Z | 2021-02-03T16:32:08.000Z | lib/exile/process_nif.ex | akash-akya/exile | bcb6a0fe32839678e129fbb5927c07da72b9cc12 | [
"Apache-2.0"
] | 1 | 2021-02-05T18:42:55.000Z | 2021-02-05T18:42:55.000Z | defmodule Exile.ProcessNif do
@moduledoc false
@on_load :load_nifs
def load_nifs do
nif_path = :filename.join(:code.priv_dir(:exile), "exile")
:erlang.load_nif(nif_path, 0)
end
def nif_is_os_pid_alive(_os_pid), do: :erlang.nif_error(:nif_library_not_loaded)
def nif_kill(_os_pid, _signal), do: :er... | 30.181818 | 82 | 0.760542 |
2da0fb0506959004e851d32a056ce5860d8fb866 | 1,166 | ex | Elixir | lib/bank_account_charts_web/controllers/user_controller.ex | pinksynth/bank-account-charts | a4bb4c94941994a68151a7b3a94828d9bbf10833 | [
"MIT"
] | null | null | null | lib/bank_account_charts_web/controllers/user_controller.ex | pinksynth/bank-account-charts | a4bb4c94941994a68151a7b3a94828d9bbf10833 | [
"MIT"
] | null | null | null | lib/bank_account_charts_web/controllers/user_controller.ex | pinksynth/bank-account-charts | a4bb4c94941994a68151a7b3a94828d9bbf10833 | [
"MIT"
] | null | null | null | defmodule BankAccountChartsWeb.UserController do
use BankAccountChartsWeb, :controller
alias BankAccountCharts.Accounts
alias BankAccountCharts.Accounts.User
action_fallback BankAccountChartsWeb.FallbackController
def index(conn, _params) do
users = Accounts.list_users()
render(conn, "index.json", ... | 26.5 | 76 | 0.651801 |
2da10793e88740b62791c445c1248a1717d35fa1 | 2,562 | ex | Elixir | lib/appsignal/diagnose/paths.ex | MeterSoft/appsignal-elixir | 52e3505b9dc90bce0795c4753a758d40bdf41463 | [
"MIT"
] | 234 | 2016-08-18T20:43:15.000Z | 2022-02-27T11:31:48.000Z | lib/appsignal/diagnose/paths.ex | MeterSoft/appsignal-elixir | 52e3505b9dc90bce0795c4753a758d40bdf41463 | [
"MIT"
] | 563 | 2016-07-25T17:45:14.000Z | 2022-03-21T11:39:29.000Z | lib/appsignal/diagnose/paths.ex | MeterSoft/appsignal-elixir | 52e3505b9dc90bce0795c4753a758d40bdf41463 | [
"MIT"
] | 86 | 2016-09-13T22:53:46.000Z | 2022-02-16T11:03:51.000Z | defmodule Appsignal.Diagnose.Paths do
@moduledoc false
def info do
log_file_path = Appsignal.Config.log_file_path() || "/tmp/appsignal.log"
log_dir_path = Path.dirname(log_file_path)
%{
working_dir: path_report(File.cwd!()),
log_dir_path: path_report(log_dir_path),
"appsignal.log": pa... | 24.169811 | 95 | 0.521077 |
2da1156aedf3b0dceff83475e58050a3cbbc53ce | 449 | ex | Elixir | leap/lib/year.ex | okaram/exercism-elixir | 66429a50738a16da5d352ad4455a483622625949 | [
"Unlicense"
] | null | null | null | leap/lib/year.ex | okaram/exercism-elixir | 66429a50738a16da5d352ad4455a483622625949 | [
"Unlicense"
] | null | null | null | leap/lib/year.ex | okaram/exercism-elixir | 66429a50738a16da5d352ad4455a483622625949 | [
"Unlicense"
] | null | null | null | defmodule Year do
@doc """
Returns whether 'year' is a leap year.
A leap year occurs:
on every year that is evenly divisible by 4
except every year that is evenly divisible by 100
unless the year is also evenly divisible by 400
"""
@spec leap_year?(non_neg_integer) :: boolean
def leap_year?(ye... | 22.45 | 53 | 0.643653 |
2da1245b8e8727278d8874dd8cbc8a3d111b3274 | 1,731 | ex | Elixir | clients/document_ai/lib/google_api/document_ai/v1beta2/model/google_cloud_documentai_v1beta2_normalized_vertex.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/document_ai/lib/google_api/document_ai/v1beta2/model/google_cloud_documentai_v1beta2_normalized_vertex.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/document_ai/lib/google_api/document_ai/v1beta2/model/google_cloud_documentai_v1beta2_normalized_vertex.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... | 31.472727 | 144 | 0.729058 |
2da16f3b0d1db056de823a80d1fa5d9f74527bcb | 1,127 | exs | Elixir | mix.exs | pilu/gravatar | d3a31bee7ebb7f1e65dc96b9bab4da31b1216778 | [
"MIT"
] | 2 | 2016-09-15T03:29:19.000Z | 2017-09-09T12:26:26.000Z | mix.exs | pilu/gravatar | d3a31bee7ebb7f1e65dc96b9bab4da31b1216778 | [
"MIT"
] | null | null | null | mix.exs | pilu/gravatar | d3a31bee7ebb7f1e65dc96b9bab4da31b1216778 | [
"MIT"
] | null | null | null | defmodule Gravatar.Mixfile do
use Mix.Project
def project do
[app: :gravatar,
version: "0.1.0",
elixir: "~> 1.2",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
description: description,
package: package,
deps: deps]
end
defp description do
"""... | 21.264151 | 77 | 0.576752 |
2da181999278ed1a4e5d61f2d3e56e901df177c5 | 1,786 | ex | Elixir | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/bin_log_coordinates.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/bin_log_coordinates.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/bin_log_coordinates.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... | 33.698113 | 117 | 0.714446 |
2da1b18eeaf96ae54a83aac3d8da0367dc78e9d7 | 396 | ex | Elixir | lib/jwt/claim/iss.ex | tzumby/elixir-jwt | 1e44bef4d1f706062050fedad79bdd9b3b4d81a5 | [
"MIT"
] | 13 | 2017-05-15T13:37:11.000Z | 2021-07-29T23:06:23.000Z | lib/jwt/claim/iss.ex | tzumby/elixir-jwt | 1e44bef4d1f706062050fedad79bdd9b3b4d81a5 | [
"MIT"
] | 7 | 2019-01-26T12:42:24.000Z | 2021-03-16T23:01:00.000Z | lib/jwt/claim/iss.ex | tzumby/elixir-jwt | 1e44bef4d1f706062050fedad79bdd9b3b4d81a5 | [
"MIT"
] | 3 | 2019-07-26T06:03:48.000Z | 2020-01-14T20:42:55.000Z | defmodule JWT.Claim.Iss do
@moduledoc """
Issuer
see http://tools.ietf.org/html/rfc7519#section-4.1.1
"""
@doc """
Predicate to reject an iss claim that does not match the expected issuer
## Example
iex> Iss.reject?("issuer", %{iss: "other issuer"})
true
Returns `true` or `false`
"""
... | 19.8 | 74 | 0.621212 |
2da1c6eff802794674cdc80b1f25186e132c5d47 | 863 | exs | Elixir | config/config.exs | Sam-Dowling/DiscoveryApi | d52c178daa8f6a2a9e5685974976ca9dea020e01 | [
"MIT"
] | null | null | null | config/config.exs | Sam-Dowling/DiscoveryApi | d52c178daa8f6a2a9e5685974976ca9dea020e01 | [
"MIT"
] | null | null | null | config/config.exs | Sam-Dowling/DiscoveryApi | d52c178daa8f6a2a9e5685974976ca9dea020e01 | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
use Mix.Config
# Configures the endpoint
config :discovery_api, DiscoveryApi.Endpoint,
url: [host:... | 35.958333 | 86 | 0.764774 |
2da1c89d24a9a603af263a9b0d22af564cbfba07 | 7,040 | ex | Elixir | lib/oban/queue/producer.ex | maartenvanvliet/oban | a9b602491bd5ccfdf59b8e330d9565374c7406e8 | [
"Apache-2.0"
] | null | null | null | lib/oban/queue/producer.ex | maartenvanvliet/oban | a9b602491bd5ccfdf59b8e330d9565374c7406e8 | [
"Apache-2.0"
] | null | null | null | lib/oban/queue/producer.ex | maartenvanvliet/oban | a9b602491bd5ccfdf59b8e330d9565374c7406e8 | [
"Apache-2.0"
] | null | null | null | defmodule Oban.Queue.Producer do
@moduledoc false
use GenServer
import Oban.Breaker, only: [open_circuit: 1, trip_errors: 0, trip_circuit: 3]
alias Oban.{Breaker, Config, Notifier, Query}
alias Oban.Queue.Executor
@type option ::
{:name, module()}
| {:conf, Config.t()}
| {:... | 25.6 | 98 | 0.607955 |
2da1d932818a5fbdec16585c54b2238b4539aba5 | 2,611 | exs | Elixir | mix.exs | niklasnisbeth/nerves_system_tinkerboard | e47384820a0d73f13953a1aaec1b8982a2a92529 | [
"Apache-2.0"
] | null | null | null | mix.exs | niklasnisbeth/nerves_system_tinkerboard | e47384820a0d73f13953a1aaec1b8982a2a92529 | [
"Apache-2.0"
] | null | null | null | mix.exs | niklasnisbeth/nerves_system_tinkerboard | e47384820a0d73f13953a1aaec1b8982a2a92529 | [
"Apache-2.0"
] | null | null | null | defmodule NervesSystemRpi3.MixProject do
use Mix.Project
@app :nerves_system_tinkerboard
@version Path.join(__DIR__, "VERSION")
|> File.read!()
|> String.trim()
def project do
[
app: @app,
version: @version,
elixir: "~> 1.6",
compilers: Mix.compilers() ++ [:ne... | 22.508621 | 79 | 0.581769 |
2da20a3235475a3a76e1556c956e72d5c24254e3 | 16,190 | ex | Elixir | lib/aws/logs.ex | ttyerl/aws-elixir | 48f6360fccee5dd587fab7a6efb109a399ff9a46 | [
"Apache-2.0"
] | 223 | 2015-05-29T17:45:35.000Z | 2021-06-29T08:37:14.000Z | lib/aws/logs.ex | ttyerl/aws-elixir | 48f6360fccee5dd587fab7a6efb109a399ff9a46 | [
"Apache-2.0"
] | 33 | 2015-11-20T20:56:43.000Z | 2021-07-09T20:13:34.000Z | lib/aws/logs.ex | ttyerl/aws-elixir | 48f6360fccee5dd587fab7a6efb109a399ff9a46 | [
"Apache-2.0"
] | 62 | 2015-06-14T20:53:24.000Z | 2021-12-13T07:20:15.000Z | # WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
# See https://github.com/jkakar/aws-codegen for more details.
defmodule AWS.Logs do
@moduledoc """
You can use Amazon CloudWatch Logs to monitor, store, and access your log
files from EC2 instances, Amazon CloudTrail, or other sources. You can then
retrieve the asso... | 37.133028 | 87 | 0.716677 |
2da218940883cc4f12d58264f09e4dbd013a1833 | 4,438 | exs | Elixir | test/document_graphql_schema_test.exs | emibloque/nicene | f22560520bf7da573ed3e046c49526b16eb4b407 | [
"MIT"
] | null | null | null | test/document_graphql_schema_test.exs | emibloque/nicene | f22560520bf7da573ed3e046c49526b16eb4b407 | [
"MIT"
] | null | null | null | test/document_graphql_schema_test.exs | emibloque/nicene | f22560520bf7da573ed3e046c49526b16eb4b407 | [
"MIT"
] | null | null | null | defmodule Nicene.DocumentGraphqlSchemaTest do
use Assertions.Case
alias Credo.{Issue, SourceFile}
alias Nicene.DocumentGraphqlSchema
test "does not warn if everything is documented correctly" do
~S'''
defmodule App.Types.User do
scalar :time, description: "A time scalar" do
parse &Timex... | 26.260355 | 97 | 0.581343 |
2da237255ce8d4b15c19014ccc174741c2ecd476 | 1,580 | ex | Elixir | lib/api/suffrages/paper_vote.ex | nunopolonia/psc-api | 2e358503851cc04cdaa89201a3f56586f8746736 | [
"MIT"
] | 1 | 2017-09-10T23:51:40.000Z | 2017-09-10T23:51:40.000Z | lib/api/suffrages/paper_vote.ex | nunopolonia/psc-api | 2e358503851cc04cdaa89201a3f56586f8746736 | [
"MIT"
] | 24 | 2018-03-14T18:17:00.000Z | 2021-03-01T07:47:53.000Z | lib/api/suffrages/paper_vote.ex | portosummerofcode/psc-api | 2e358503851cc04cdaa89201a3f56586f8746736 | [
"MIT"
] | null | null | null | defmodule Api.Suffrages.PaperVote do
use Ecto.Schema
import Ecto.Changeset
alias Api.Accounts.User
alias Api.Teams.Team
alias Api.Suffrages.Suffrage
alias ApiWeb.EctoHelper
@valid_attrs ~w(
suffrage_id
created_by_id
redeemed_at
redeeming_admin_id
redeeming_member_id
team_id
a... | 21.066667 | 52 | 0.648734 |
2da260ebae1bb842383087a5921d5330215084c1 | 1,954 | ex | Elixir | lib/opt_web/live/wobbler_live.ex | awwong1/opt | 8d84c5789b84e95e4825a7a49711263537933b56 | [
"Apache-2.0"
] | null | null | null | lib/opt_web/live/wobbler_live.ex | awwong1/opt | 8d84c5789b84e95e4825a7a49711263537933b56 | [
"Apache-2.0"
] | null | null | null | lib/opt_web/live/wobbler_live.ex | awwong1/opt | 8d84c5789b84e95e4825a7a49711263537933b56 | [
"Apache-2.0"
] | null | null | null | defmodule OptWeb.WobblerLive do
use OptWeb, :live_view
@sec 1000
def mount(_params, _session, socket) do
if connected?(socket) do
Process.send_after(self(), :tick, @sec)
end
socket = assign(socket, step: 0, tick_time: @sec, counter: 50, halting: false, past_steps: [])
{:ok, socket}
end
... | 26.405405 | 109 | 0.578301 |
2da274f94dbd3e364a30d5484631ad609ab9c69d | 892 | ex | Elixir | clients/firebase_rules/lib/google_api/firebase_rules/v1/metadata.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/firebase_rules/lib/google_api/firebase_rules/v1/metadata.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/firebase_rules/lib/google_api/firebase_rules/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... | 33.037037 | 74 | 0.761211 |
2da27e017e398ad7a3cbd33c3c1605d65deb13a5 | 729 | ex | Elixir | authentication/lib/authentication_web/gettext.ex | hbobenicio/phoenix-examples | dd2adc8887a341b50d192bc31c61ee528e896672 | [
"MIT"
] | null | null | null | authentication/lib/authentication_web/gettext.ex | hbobenicio/phoenix-examples | dd2adc8887a341b50d192bc31c61ee528e896672 | [
"MIT"
] | null | null | null | authentication/lib/authentication_web/gettext.ex | hbobenicio/phoenix-examples | dd2adc8887a341b50d192bc31c61ee528e896672 | [
"MIT"
] | null | null | null | defmodule AuthenticationWeb.Gettext do
@moduledoc """
A module providing Internationalization with a gettext-based API.
By using [Gettext](https://hexdocs.pm/gettext),
your module gains a set of macros for translations, for example:
import AuthenticationWeb.Gettext
# Simple translation
gett... | 29.16 | 72 | 0.689986 |
2da2cbc332184a68606674480d01aeb28093a265 | 597 | ex | Elixir | lib/music_sync/release.ex | ZucchiniZe/music_sync | 23550e5aa71503dfdbad39f49cfcd83bd98ce457 | [
"MIT"
] | 2 | 2021-07-27T10:39:02.000Z | 2021-12-18T06:55:42.000Z | lib/music_sync/release.ex | ZucchiniZe/music_sync | 23550e5aa71503dfdbad39f49cfcd83bd98ce457 | [
"MIT"
] | null | null | null | lib/music_sync/release.ex | ZucchiniZe/music_sync | 23550e5aa71503dfdbad39f49cfcd83bd98ce457 | [
"MIT"
] | null | null | null | defmodule MusicSync.Release do
@moduledoc """
Used for executing DB release tasks when run in production without Mix
installed.
"""
@app :music_sync
def migrate do
load_app()
for repo <- repos() do
{:ok, _, _} = Ecto.Migrator.with_repo(repo, &Ecto.Migrator.run(&1, :up, all: true))
end
... | 20.586207 | 91 | 0.651591 |
2da2f876c59ed65a4ac536d3167b624a076c82af | 835 | exs | Elixir | code/general/sort_vs_sort_by.exs | TheMaikXX/fast-elixir | 0e622c3f8bb4751fd023fde1e34ec78cf4337dfd | [
"CC0-1.0"
] | 1,154 | 2017-05-04T10:18:30.000Z | 2022-03-29T06:43:28.000Z | code/general/sort_vs_sort_by.exs | TheMaikXX/fast-elixir | 0e622c3f8bb4751fd023fde1e34ec78cf4337dfd | [
"CC0-1.0"
] | 13 | 2017-05-22T21:58:36.000Z | 2022-02-25T15:52:12.000Z | code/general/sort_vs_sort_by.exs | TheMaikXX/fast-elixir | 0e622c3f8bb4751fd023fde1e34ec78cf4337dfd | [
"CC0-1.0"
] | 35 | 2017-05-27T17:55:07.000Z | 2022-03-13T18:55:48.000Z | defmodule Card, do: defstruct([:rank, :suit])
defmodule Sort.Fast do
def sort(enumerable), do: Enum.sort(enumerable)
end
defmodule Sort.Medium do
def sort(enumerable), do: Enum.sort(enumerable, &(&1.rank <= &2.rank))
end
defmodule Sort.Slow do
def sort(enumerable), do: Enum.sort_by(enumerable, & &1.rank)
end
... | 21.410256 | 80 | 0.615569 |
2da308c0839b12a09cc02dba70fffae13d719260 | 1,430 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/network_interface.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/network_interface.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/network_interface.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... | 31.086957 | 93 | 0.733566 |
2da32089bc167b62e0ad7c337dd205ba254705a1 | 2,823 | exs | Elixir | mix.exs | kernel-io/ash_policy_authorizer | cf9f44398e156dad3c38eb56d5f3fd25ebaa704a | [
"MIT"
] | null | null | null | mix.exs | kernel-io/ash_policy_authorizer | cf9f44398e156dad3c38eb56d5f3fd25ebaa704a | [
"MIT"
] | null | null | null | mix.exs | kernel-io/ash_policy_authorizer | cf9f44398e156dad3c38eb56d5f3fd25ebaa704a | [
"MIT"
] | null | null | null | defmodule AshPolicyAuthorizer.MixProject do
@moduledoc false
use Mix.Project
@version "0.16.4-rc.1"
@description """
A policy based authorizer for the Ash Framework
"""
def project do
[
app: :ash_policy_authorizer,
version: @version,
package: package(),
description: @descrip... | 25.663636 | 82 | 0.58661 |
2da32bb18bbcffda013508f2e77a7c502abf48ce | 13,623 | ex | Elixir | lib/exshape/shp.ex | ssbb/exshape | 7f0de9e7013cfc17d1e417bd2cf61b8be5259a63 | [
"MIT"
] | null | null | null | lib/exshape/shp.ex | ssbb/exshape | 7f0de9e7013cfc17d1e417bd2cf61b8be5259a63 | [
"MIT"
] | null | null | null | lib/exshape/shp.ex | ssbb/exshape | 7f0de9e7013cfc17d1e417bd2cf61b8be5259a63 | [
"MIT"
] | null | null | null | defmodule Exshape.Shp do
defmodule State do
defstruct mode: :header,
shape_type: nil,
emit: [],
to_read: nil,
item: nil,
part_index: 0,
measures: []
end
defmodule Bbox do
defstruct [:xmin, :xmax, :ymin, :ymax, :zmin, :zmax, :mmin, :mmax]
end
defmodule Header do
... | 23.733449 | 104 | 0.576011 |
2da3403295af21290fe619fdf28baf069adebe5c | 6,491 | ex | Elixir | apps/aecore/lib/aecore/naming/tx/name_revoke_tx.ex | SingularityMatrix/elixir-node | ad126aa97931165185cf35454718ed2eee40ceed | [
"ISC"
] | null | null | null | apps/aecore/lib/aecore/naming/tx/name_revoke_tx.ex | SingularityMatrix/elixir-node | ad126aa97931165185cf35454718ed2eee40ceed | [
"ISC"
] | null | null | null | apps/aecore/lib/aecore/naming/tx/name_revoke_tx.ex | SingularityMatrix/elixir-node | ad126aa97931165185cf35454718ed2eee40ceed | [
"ISC"
] | null | null | null | defmodule Aecore.Naming.Tx.NameRevokeTx do
@moduledoc """
Module defining the NameRevoke transaction
"""
use Aecore.Tx.Transaction
alias Aecore.Account.AccountStateTree
alias Aecore.Chain.{Chainstate, Identifier}
alias Aecore.Governance.GovernanceConstants
alias Aecore.Naming.NamingStateTree
alias A... | 28.469298 | 101 | 0.629795 |
2da38b0ca17d00a6dd9c4293e78b617a13685513 | 1,084 | ex | Elixir | test/support/conn_case.ex | mentels/pomex | 57eca65777171ee0116b5ffde56c35f41bff7c8e | [
"Apache-2.0"
] | null | null | null | test/support/conn_case.ex | mentels/pomex | 57eca65777171ee0116b5ffde56c35f41bff7c8e | [
"Apache-2.0"
] | null | null | null | test/support/conn_case.ex | mentels/pomex | 57eca65777171ee0116b5ffde56c35f41bff7c8e | [
"Apache-2.0"
] | null | null | null | defmodule Pomex.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 and query models.
Finally, if the test case interacts with the datab... | 24.088889 | 67 | 0.701107 |
2da3c0b63316cb887f3603ec5cc8afd6e514550e | 6,197 | ex | Elixir | lib/wallaby/phantom.ex | carl-al/wallaby | a4c9811902370b15db17fc62d451035ee7464eea | [
"MIT"
] | null | null | null | lib/wallaby/phantom.ex | carl-al/wallaby | a4c9811902370b15db17fc62d451035ee7464eea | [
"MIT"
] | null | null | null | lib/wallaby/phantom.ex | carl-al/wallaby | a4c9811902370b15db17fc62d451035ee7464eea | [
"MIT"
] | null | null | null | defmodule Wallaby.Phantom do
@moduledoc """
Wallaby driver for PhantomJS.
## Usage
Start a Wallaby Session using this driver with the following command:
```
{:ok, session} = Wallaby.start_session(driver: Wallaby.Phantom)
```
## Notes
This driver requires PhantomJS be installed in your path. You c... | 29.231132 | 132 | 0.627723 |
2da3f149731493844ac0a679016f31f43d6f3108 | 528 | exs | Elixir | config/test.exs | BasileNouvellet/phoenix-live-view-demo | da3694dc13aa02a49804dadffd072398433df0fe | [
"MIT"
] | null | null | null | config/test.exs | BasileNouvellet/phoenix-live-view-demo | da3694dc13aa02a49804dadffd072398433df0fe | [
"MIT"
] | 2 | 2021-03-09T12:16:11.000Z | 2021-05-10T02:09:43.000Z | config/test.exs | BasileNouvellet/phoenix-live-view-demo | da3694dc13aa02a49804dadffd072398433df0fe | [
"MIT"
] | null | null | null | use Mix.Config
# Configure your database
config :phoenix_live_view_demo, PhoenixLiveViewDemo.Repo,
username: "postgres",
password: "postgres",
database: "phoenix_live_view_demo_test",
hostname: "localhost",
pool: Ecto.Adapters.SQL.Sandbox
# We don't run a server during test. If one is required,
# you can en... | 27.789474 | 64 | 0.767045 |
2da3f42b3b155d192a4a574163c7db97addf7d21 | 291 | ex | Elixir | bench/lib/bench/application.ex | davorbadrov/memoize | dd34c313de805e57da18c4e6142247cc8eb1ba6a | [
"MIT"
] | null | null | null | bench/lib/bench/application.ex | davorbadrov/memoize | dd34c313de805e57da18c4e6142247cc8eb1ba6a | [
"MIT"
] | null | null | null | bench/lib/bench/application.ex | davorbadrov/memoize | dd34c313de805e57da18c4e6142247cc8eb1ba6a | [
"MIT"
] | null | null | null | defmodule Bench.Application do
use Application
def start(_type, _args) do
children = [
Supervisor.Spec.worker(Cachex, [:my_cache, [transactions: true], []])
]
opts = [strategy: :one_for_one, name: Bench.Supervisor]
Supervisor.start_link(children, opts)
end
end
| 22.384615 | 75 | 0.683849 |
2da41e5f8a473afca0172cb0804ee80d29b05465 | 1,117 | exs | Elixir | config/test.exs | noozo/honest_chat | b3c45f72fd9c579404d05ce308eb13a0a2997760 | [
"Apache-2.0"
] | 3 | 2021-11-19T07:18:30.000Z | 2021-12-23T22:19:48.000Z | config/test.exs | noozo/honest_chat | b3c45f72fd9c579404d05ce308eb13a0a2997760 | [
"Apache-2.0"
] | null | null | null | config/test.exs | noozo/honest_chat | b3c45f72fd9c579404d05ce308eb13a0a2997760 | [
"Apache-2.0"
] | null | null | null | import Config
# Only in tests, remove the complexity from the password hashing algorithm
config :pbkdf2_elixir, :rounds, 1
# Configure your database
#
# The MIX_TEST_PARTITION environment variable can be used
# to provide built-in test partitioning in CI environment.
# Run `mix help test` for more information.
config... | 32.852941 | 86 | 0.766338 |
2da45c36ab7a5942bd9658a4994cf613f33f200c | 453 | exs | Elixir | test/interaction_test.exs | desweemerl/origami | 9b9111fb06e0ea94ce289e70cac4caffa208dcce | [
"MIT"
] | null | null | null | test/interaction_test.exs | desweemerl/origami | 9b9111fb06e0ea94ce289e70cac4caffa208dcce | [
"MIT"
] | null | null | null | test/interaction_test.exs | desweemerl/origami | 9b9111fb06e0ea94ce289e70cac4caffa208dcce | [
"MIT"
] | null | null | null | defmodule Origami.InteractionChannelTest do
use Origami.ChannelCase
setup do
{:ok, _, socket} =
Origami.Socket
|> socket("user_id", %{some: :assign})
|> subscribe_and_join(Origami.InteractionChannel, "origami:interaction")
%{socket: socket}
end
test "ping replies with status ok", %{... | 25.166667 | 78 | 0.640177 |
2da46b6c134ba29afe0632d9685708417dad67ce | 161 | ex | Elixir | lib/solutions/struct/position.ex | DianaOlympos/AdventOfCode2016 | f7b9551df87c878073738468e29228efd4c8784f | [
"MIT"
] | null | null | null | lib/solutions/struct/position.ex | DianaOlympos/AdventOfCode2016 | f7b9551df87c878073738468e29228efd4c8784f | [
"MIT"
] | null | null | null | lib/solutions/struct/position.ex | DianaOlympos/AdventOfCode2016 | f7b9551df87c878073738468e29228efd4c8784f | [
"MIT"
] | null | null | null | defmodule Adventofcode2016.Solution.Struct.Position do
defstruct [
direction: :N,
x: 0,
y: 0,
visited: MapSet.new(),
stopped: false
]
end | 17.888889 | 54 | 0.639752 |
2da484bb91ef3611a19a98c7f2cdc2308fcd499c | 424 | ex | Elixir | examples/elixir_hello_world/lib/elixir_hello_world.ex | jwheare/cowboy | 4769412daaff2be53cb7d7391d0a196acb6346c3 | [
"0BSD"
] | 7 | 2015-01-08T08:01:03.000Z | 2019-11-16T16:22:03.000Z | examples/elixir_hello_world/lib/elixir_hello_world.ex | jwheare/cowboy | 4769412daaff2be53cb7d7391d0a196acb6346c3 | [
"0BSD"
] | 2 | 2015-01-14T16:33:41.000Z | 2015-03-30T18:34:07.000Z | examples/elixir_hello_world/lib/elixir_hello_world.ex | jwheare/cowboy | 4769412daaff2be53cb7d7391d0a196acb6346c3 | [
"0BSD"
] | 1 | 2016-02-07T21:55:44.000Z | 2016-02-07T21:55:44.000Z | defmodule ElixirHelloWorld do
use Application.Behaviour
def start(_type, _args) do
dispatch = :cowboy_router.compile([
{:_, [{"/", ElixirHelloWorld.TopPageHandler, []}]}
])
{:ok, _} = :cowboy.start_http(:http, 100,
[port: 8080],
... | 30.285714 | 67 | 0.528302 |
2da4a22f65ca4a284662005fb4c9d733aec7fcee | 3,976 | ex | Elixir | lib/hexpm/factory.ex | christopherlai/hexpm | 054dd5b30f0c8010681fa5cf8e84dc17b9a23a7c | [
"Apache-2.0"
] | null | null | null | lib/hexpm/factory.ex | christopherlai/hexpm | 054dd5b30f0c8010681fa5cf8e84dc17b9a23a7c | [
"Apache-2.0"
] | null | null | null | lib/hexpm/factory.ex | christopherlai/hexpm | 054dd5b30f0c8010681fa5cf8e84dc17b9a23a7c | [
"Apache-2.0"
] | null | null | null | defmodule Hexpm.Factory do
use ExMachina.Ecto, repo: Hexpm.Repo
alias Hexpm.Fake
@password Bcrypt.hash_pwd_salt("password")
@checksum "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855"
def user_factory() do
%Hexpm.Accounts.User{
username: Fake.sequence(:username),
password: @... | 21.376344 | 88 | 0.629276 |
2da4d36e699b5342d9f0819b10a33216b3635267 | 362 | exs | Elixir | test/mipha_web/controllers/admin/user_controller_test.exs | ZPVIP/mipha | a7df054f72eec7de88b60d94c501488375bdff6a | [
"MIT"
] | 156 | 2018-06-01T19:52:32.000Z | 2022-02-03T10:58:10.000Z | test/mipha_web/controllers/admin/user_controller_test.exs | ZPVIP/mipha | a7df054f72eec7de88b60d94c501488375bdff6a | [
"MIT"
] | 139 | 2018-07-10T01:57:23.000Z | 2021-08-02T21:29:24.000Z | test/mipha_web/controllers/admin/user_controller_test.exs | ZPVIP/mipha | a7df054f72eec7de88b60d94c501488375bdff6a | [
"MIT"
] | 29 | 2018-07-17T08:43:45.000Z | 2021-12-14T13:45:30.000Z | defmodule MiphaWeb.Admin.UserControllerTest do
use MiphaWeb.ConnCase
@tag :as_admin
test "lists all users on index", %{conn: conn} do
u1 = insert(:user)
u2 = insert(:user)
conn = get(conn, admin_user_path(conn, :index))
assert conn.status == 200
assert conn.resp_body =~ u1.username
asser... | 24.133333 | 51 | 0.685083 |
2da4d40f08d6215f96c26e5a88deb31bfb7e2a68 | 2,550 | ex | Elixir | lib/fare_web/router.ex | btihen/fare | 4fb959b2c5e7d96cdb6049764ebac829f68b8128 | [
"MIT"
] | null | null | null | lib/fare_web/router.ex | btihen/fare | 4fb959b2c5e7d96cdb6049764ebac829f68b8128 | [
"MIT"
] | null | null | null | lib/fare_web/router.ex | btihen/fare | 4fb959b2c5e7d96cdb6049764ebac829f68b8128 | [
"MIT"
] | null | null | null | defmodule FareWeb.Router do
use FareWeb, :router
import FareWeb.UserAuth
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_live_flash
plug :put_root_layout, {FareWeb.LayoutView, :root}
plug :protect_from_forgery
plug :put_secure_browser_headers
plug :fetch_... | 30 | 86 | 0.720392 |
2da4ed46aa595a22463bbb53398592fbc2b715cb | 5,124 | exs | Elixir | test/bsv/transaction_test.exs | 0xwallet/bsv-ex | 9dc966a17dfd69c65f591dcf03e69fb11f59e930 | [
"Apache-2.0"
] | null | null | null | test/bsv/transaction_test.exs | 0xwallet/bsv-ex | 9dc966a17dfd69c65f591dcf03e69fb11f59e930 | [
"Apache-2.0"
] | null | null | null | test/bsv/transaction_test.exs | 0xwallet/bsv-ex | 9dc966a17dfd69c65f591dcf03e69fb11f59e930 | [
"Apache-2.0"
] | null | null | null | defmodule BSV.TransactionTest do
use ExUnit.Case
doctest BSV.Transaction
alias BSV.Script
alias BSV.Transaction.{Input, Output}
setup_all do
%{
tx1:
"02000000027bb22176433bb45bacede86a43764f98c7023f1a79b00138e3d3ea610716a8f1010000006b483045022100c7036739f47361398bd115dbe9302fdc456d75f83fb38... | 38.526316 | 827 | 0.733997 |
2da52da6b5d12749c76c8ec761041a438f999711 | 1,265 | ex | Elixir | lib/xdr/ledger_entries/trust_line_flags.ex | einerzg/stellar_base | 2d10c5fc3b8159efc5de10b5c7c665e3b57b3d8f | [
"MIT"
] | null | null | null | lib/xdr/ledger_entries/trust_line_flags.ex | einerzg/stellar_base | 2d10c5fc3b8159efc5de10b5c7c665e3b57b3d8f | [
"MIT"
] | null | null | null | lib/xdr/ledger_entries/trust_line_flags.ex | einerzg/stellar_base | 2d10c5fc3b8159efc5de10b5c7c665e3b57b3d8f | [
"MIT"
] | null | null | null | defmodule StellarBase.XDR.TrustLineFlags do
@moduledoc """
Representation of Stellar `TrustLineFlags` type.
"""
@behaviour XDR.Declaration
@declarations [
AUTHORIZED_FLAG: 1,
AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG: 2,
TRUSTLINE_CLAWBACK_ENABLED_FLAG: 4
]
@enum_spec %XDR.Enum{declarations: @... | 23.425926 | 76 | 0.663241 |
2da52dad1baf7f541244d887adfc8ae5a2c0682e | 726 | ex | Elixir | Elixir/phoenixskeleton/web/gettext.ex | kujua/erlang-elixir-imperative-bookcompanion | 7bc9f033bacd0f8744ec6bcee3932794d594fe69 | [
"Apache-2.0"
] | 8 | 2016-08-14T12:35:16.000Z | 2021-01-26T04:05:31.000Z | Elixir/phoenixskeleton/web/gettext.ex | kujua/erlang-elixir-imperative-bookcompanion | 7bc9f033bacd0f8744ec6bcee3932794d594fe69 | [
"Apache-2.0"
] | null | null | null | Elixir/phoenixskeleton/web/gettext.ex | kujua/erlang-elixir-imperative-bookcompanion | 7bc9f033bacd0f8744ec6bcee3932794d594fe69 | [
"Apache-2.0"
] | 5 | 2016-08-18T22:12:19.000Z | 2020-02-17T18:52:41.000Z | defmodule Phoenixskeleton.Gettext do
@moduledoc """
A module providing Internationalization with a gettext-based API.
By using [Gettext](https://hexdocs.pm/gettext),
your module gains a set of macros for translations, for example:
import Phoenixskeleton.Gettext
# Simple translation
gettext ... | 29.04 | 72 | 0.688705 |
2da53afe350a55c6d7a68d091d737a3494b490a8 | 880 | ex | Elixir | clients/os_login/lib/google_api/os_login/v1/metadata.ex | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"Apache-2.0"
] | null | null | null | clients/os_login/lib/google_api/os_login/v1/metadata.ex | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"Apache-2.0"
] | null | null | null | clients/os_login/lib/google_api/os_login/v1/metadata.ex | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"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 |
2da54a6db3e83259e72a0acf5c29b349752ccf7a | 7,889 | exs | Elixir | test/swoosh/mailer_test.exs | nallwhy/swoosh | c4dfefda0d347fe73b189ac91eede3d73d6f6904 | [
"MIT"
] | 1,214 | 2016-03-21T16:56:42.000Z | 2022-03-31T19:10:11.000Z | test/swoosh/mailer_test.exs | nallwhy/swoosh | c4dfefda0d347fe73b189ac91eede3d73d6f6904 | [
"MIT"
] | 399 | 2016-03-21T23:11:32.000Z | 2022-03-04T10:52:28.000Z | test/swoosh/mailer_test.exs | nallwhy/swoosh | c4dfefda0d347fe73b189ac91eede3d73d6f6904 | [
"MIT"
] | 208 | 2016-03-21T21:12:11.000Z | 2022-03-04T06:35:33.000Z | defmodule Swoosh.MailerTest do
use ExUnit.Case, async: true
alias Swoosh.DeliveryError
Application.put_env(
:swoosh,
Swoosh.MailerTest.FakeMailer,
api_key: "api-key",
domain: "avengers.com"
)
defmodule FakeAdapter do
use Swoosh.Adapter
def deliver(email, config) do
case Keywo... | 31.556 | 95 | 0.623653 |
2da54c8eed69fd40276375ec514c7ef4b6b78419 | 958 | ex | Elixir | demo_backend/test/support/channel_case.ex | jacopofar/godot-multiplayer-phoenix-demo | fef08cffe9ad51d27051b614ef90a8d4257cdcaa | [
"MIT"
] | 7 | 2020-11-12T14:30:30.000Z | 2021-08-03T20:49:53.000Z | demo_backend/test/support/channel_case.ex | jacopofar/godot-multiplayer-phoenix-demo | fef08cffe9ad51d27051b614ef90a8d4257cdcaa | [
"MIT"
] | null | null | null | demo_backend/test/support/channel_case.ex | jacopofar/godot-multiplayer-phoenix-demo | fef08cffe9ad51d27051b614ef90a8d4257cdcaa | [
"MIT"
] | 1 | 2022-01-09T07:25:14.000Z | 2022-01-09T07:25:14.000Z | defmodule DemoServerWeb.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 case interact... | 27.371429 | 67 | 0.742171 |
2da55ce278aaa5e48ee66086b552016900f5000d | 2,466 | ex | Elixir | clients/service_consumer_management/lib/google_api/service_consumer_management/v1/model/auth_requirement.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/service_consumer_management/lib/google_api/service_consumer_management/v1/model/auth_requirement.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/service_consumer_management/lib/google_api/service_consumer_management/v1/model/auth_requirement.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... | 49.32 | 785 | 0.761152 |
2da561547fcbcda563257352349d2ea7d7df2c88 | 1,802 | exs | Elixir | rel/config.exs | beji/hiit_live | ddd835d27cbe733ea177540dd625b665c8b54f86 | [
"MIT"
] | null | null | null | rel/config.exs | beji/hiit_live | ddd835d27cbe733ea177540dd625b665c8b54f86 | [
"MIT"
] | null | null | null | rel/config.exs | beji/hiit_live | ddd835d27cbe733ea177540dd625b665c8b54f86 | [
"MIT"
] | null | null | null | # Import all plugins from `rel/plugins`
# They can then be used by adding `plugin MyPlugin` to
# either an environment, or release definition, where
# `MyPlugin` is the name of the plugin module.
~w(rel plugins *.exs)
|> Path.join()
|> Path.wildcard()
|> Enum.map(&Code.eval_file(&1))
use Mix.Releases.Config,
# Thi... | 32.178571 | 81 | 0.732519 |
2da56da277345f4fad2c297b83ed6354942c20c4 | 872 | ex | Elixir | clients/tpu/lib/google_api/tpu/v1/metadata.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/tpu/lib/google_api/tpu/v1/metadata.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/tpu/lib/google_api/tpu/v1/metadata.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"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.296296 | 74 | 0.755734 |
2da57495120365e8dced9419e4fde94607f836cb | 368 | ex | Elixir | lib/my_bot_ex/client/github/user.ex | KazuCocoa/my_bot_ex | 9d3d71b4340109f35cf6e72b84346a3e609f40a5 | [
"MIT"
] | null | null | null | lib/my_bot_ex/client/github/user.ex | KazuCocoa/my_bot_ex | 9d3d71b4340109f35cf6e72b84346a3e609f40a5 | [
"MIT"
] | null | null | null | lib/my_bot_ex/client/github/user.ex | KazuCocoa/my_bot_ex | 9d3d71b4340109f35cf6e72b84346a3e609f40a5 | [
"MIT"
] | null | null | null | defmodule MyBotEx.Client.Github.User do
alias Tentacat, as: TC
def user(name), do: TC.Users.find(name)
def user(client, :me) when is_atom(:me), do: TC.Users.me(client)
def user(client, name) when is_bitstring(name), do: TC.Users.find(name, client)
def streak(name) do
CurrentStreakEx.contributions(name)
... | 28.307692 | 81 | 0.722826 |
2da5ca93f00a6712d81340445feac7d1befbb89a | 7,886 | ex | Elixir | lib/extwitter/api/v1/streaming.ex | PJUllrich/extwitter | edee88d5b9411bd0e3226c295362e328ae73255d | [
"MIT"
] | null | null | null | lib/extwitter/api/v1/streaming.ex | PJUllrich/extwitter | edee88d5b9411bd0e3226c295362e328ae73255d | [
"MIT"
] | null | null | null | lib/extwitter/api/v1/streaming.ex | PJUllrich/extwitter | edee88d5b9411bd0e3226c295362e328ae73255d | [
"MIT"
] | null | null | null | defmodule ExTwitter.API.V1.Streaming do
@moduledoc """
Provides streaming API interfaces.
"""
@doc """
The default timeout value (in milliseconds) for how long keeps waiting until next message arrives.
"""
@default_stream_timeout 60_000
@default_control_timeout 10_000
@http_unauthorized 401
requir... | 26.374582 | 100 | 0.599543 |
2da5ed00d8314d7798852c70393f7ae6aaedbf6e | 562 | ex | Elixir | apps/desafio_api/lib/desafio_api/application.ex | brunobamaral/desafio_api | 90362b0fa6c0c9e3c4d1c212fe84b7ad264a46f6 | [
"Apache-2.0"
] | null | null | null | apps/desafio_api/lib/desafio_api/application.ex | brunobamaral/desafio_api | 90362b0fa6c0c9e3c4d1c212fe84b7ad264a46f6 | [
"Apache-2.0"
] | null | null | null | apps/desafio_api/lib/desafio_api/application.ex | brunobamaral/desafio_api | 90362b0fa6c0c9e3c4d1c212fe84b7ad264a46f6 | [
"Apache-2.0"
] | null | null | null | defmodule DesafioApi.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
children = [
# Start the Ecto repository
DesafioApi.Repo,
# Start the PubSub system
{Phoenix... | 26.761905 | 88 | 0.704626 |
2da5f0d5547f28d436875261523fb7a9a16d7f2f | 5,530 | exs | Elixir | test/plausible_web/controllers/api/stats_controller/main_graph_test.exs | wvffle/analytics | 2c0fd55bc67f74af1fe1e2641678d44e9fee61d5 | [
"MIT"
] | 1 | 2020-10-08T13:33:04.000Z | 2020-10-08T13:33:04.000Z | test/plausible_web/controllers/api/stats_controller/main_graph_test.exs | wvffle/analytics | 2c0fd55bc67f74af1fe1e2641678d44e9fee61d5 | [
"MIT"
] | null | null | null | test/plausible_web/controllers/api/stats_controller/main_graph_test.exs | wvffle/analytics | 2c0fd55bc67f74af1fe1e2641678d44e9fee61d5 | [
"MIT"
] | null | null | null | defmodule PlausibleWeb.Api.StatsController.MainGraphTest do
use PlausibleWeb.ConnCase
import Plausible.TestUtils
describe "GET /api/stats/main-graph - plot" do
setup [:create_user, :log_in, :create_site]
test "displays pageviews for the last 30 minutes in realtime graph", %{conn: conn, site: site} do
... | 35.22293 | 101 | 0.602893 |
2da63281a17617490707266145c5bae4cae72924 | 6,972 | ex | Elixir | lib/protobuf/encoder.ex | matehat/protobuf-elixir | 3f27218842979037c31f355488e5c3350f641b41 | [
"MIT"
] | null | null | null | lib/protobuf/encoder.ex | matehat/protobuf-elixir | 3f27218842979037c31f355488e5c3350f641b41 | [
"MIT"
] | null | null | null | lib/protobuf/encoder.ex | matehat/protobuf-elixir | 3f27218842979037c31f355488e5c3350f641b41 | [
"MIT"
] | null | null | null | defmodule Protobuf.Encoder do
import Protobuf.WireTypes
import Bitwise, only: [bsr: 2, band: 2, bsl: 2, bor: 2]
alias Protobuf.{MessageProps, FieldProps}
@spec encode(atom, struct, keyword) :: iodata
def encode(mod, struct, opts) do
case struct do
%{__struct__: _} ->
encode(struct, opts)
... | 31.835616 | 94 | 0.606713 |
2da63af60a8fc2b9c8d26ed0c7defd8f2191fbae | 738 | ex | Elixir | apps/service_define/lib/define_web/channels/view_messages_channel.ex | rucker/hindsight | 876a5d344c5d8eebbea37684ee07e0a91e4430f0 | [
"Apache-2.0"
] | null | null | null | apps/service_define/lib/define_web/channels/view_messages_channel.ex | rucker/hindsight | 876a5d344c5d8eebbea37684ee07e0a91e4430f0 | [
"Apache-2.0"
] | null | null | null | apps/service_define/lib/define_web/channels/view_messages_channel.ex | rucker/hindsight | 876a5d344c5d8eebbea37684ee07e0a91e4430f0 | [
"Apache-2.0"
] | null | null | null | defmodule Define.ViewMessages.Channel do
use DefineWeb, :channel
require Logger
alias Define.ViewState
def join("view_messages", _payload, socket) do
send(self(), :after_join)
{:ok, socket}
end
def handle_info(:after_join, socket) do
push(socket, "view_state_update", ViewState.state(socket.ass... | 26.357143 | 88 | 0.708672 |
2da67b766749ad2cf384ac8f3aaf9ef0b8b9e75b | 7,018 | ex | Elixir | deps/phoenix_pubsub/lib/phoenix/pubsub/local.ex | rchervin/phoenixportfolio | a5a6a60168d7261647a10a8dbd395b440db8a4f9 | [
"MIT"
] | null | null | null | deps/phoenix_pubsub/lib/phoenix/pubsub/local.ex | rchervin/phoenixportfolio | a5a6a60168d7261647a10a8dbd395b440db8a4f9 | [
"MIT"
] | null | null | null | deps/phoenix_pubsub/lib/phoenix/pubsub/local.ex | rchervin/phoenixportfolio | a5a6a60168d7261647a10a8dbd395b440db8a4f9 | [
"MIT"
] | null | null | null | defmodule Phoenix.PubSub.Local do
@moduledoc """
PubSub implementation for handling local-node process groups.
This module is used by Phoenix pubsub adapters to handle
their local node subscriptions and it is usually not accessed
directly. See `Phoenix.PubSub.PG2` for an example integration.
"""
use Gen... | 28.298387 | 105 | 0.644771 |
2da68838fe226b0d8b3e247e9d0cab466fed3e2e | 273 | ex | Elixir | lib/changelog_web/views/layout_view.ex | kball/changelog.com | e9782271be360dd82cc2cb6bb9379854f9203c2c | [
"MIT"
] | 1 | 2020-10-12T13:28:41.000Z | 2020-10-12T13:28:41.000Z | lib/changelog_web/views/layout_view.ex | kball/changelog.com | e9782271be360dd82cc2cb6bb9379854f9203c2c | [
"MIT"
] | null | null | null | lib/changelog_web/views/layout_view.ex | kball/changelog.com | e9782271be360dd82cc2cb6bb9379854f9203c2c | [
"MIT"
] | 1 | 2018-10-03T20:55:52.000Z | 2018-10-03T20:55:52.000Z | defmodule ChangelogWeb.LayoutView do
use ChangelogWeb, :public_view
import ChangelogWeb.Meta.{AdminTitle, Apple, Title, Image, Description, Feeds, Twitter}
alias ChangelogWeb.{Endpoint, PersonView}
def canonical_url(conn), do: url(conn) <> conn.request_path
end
| 27.3 | 89 | 0.776557 |
2da69c20f3829f990b7fe6426f6ee4d35d6c5c78 | 141 | ex | Elixir | lib/ecto_crdt_types/types/pure/awset.ex | ExpressApp/ecto_crdt_types | cf18557cf888b3d50a44640997507cff6caf2b93 | [
"MIT"
] | 8 | 2018-09-20T13:05:16.000Z | 2021-09-22T08:40:40.000Z | lib/ecto_crdt_types/types/pure/awset.ex | ExpressApp/ecto_crdt_types | cf18557cf888b3d50a44640997507cff6caf2b93 | [
"MIT"
] | null | null | null | lib/ecto_crdt_types/types/pure/awset.ex | ExpressApp/ecto_crdt_types | cf18557cf888b3d50a44640997507cff6caf2b93 | [
"MIT"
] | null | null | null | defmodule EctoCrdtTypes.Types.Pure.AWSet do
@crdt_type :pure_awset
@crdt_value_type {:array, :string}
use EctoCrdtTypes.Types.CRDT
end
| 23.5 | 43 | 0.787234 |
2da6a90d6a7d600fd533194fb5e94a251b237af7 | 2,111 | exs | Elixir | test/pg_case_test.exs | Elonsoft/pg_case | 3cff708c4b9959fa0e06cabe8de92ad7694bb397 | [
"MIT"
] | 1 | 2021-04-01T10:48:43.000Z | 2021-04-01T10:48:43.000Z | test/pg_case_test.exs | Elonsoft/pg_case | 3cff708c4b9959fa0e06cabe8de92ad7694bb397 | [
"MIT"
] | null | null | null | test/pg_case_test.exs | Elonsoft/pg_case | 3cff708c4b9959fa0e06cabe8de92ad7694bb397 | [
"MIT"
] | null | null | null | defmodule PgCaseTest do
use ExUnit.Case
doctest PgCase
import Ecto.Query, only: [from: 2]
import PgCase
alias Ecto.Adapters.SQL
alias PgCase.Repo
describe "pg_case/1" do
test "correctly expands the macro on all the clauses" do
query =
from(r in "rows",
select: %{
... | 23.197802 | 91 | 0.491236 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.