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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
28460092e33be79cc7f28f7c252ec16d09848860 | 358 | ex | Elixir | lib/word_battle/node_region.ex | oskarkook/word_battle | 0811b1adca2ccdbd23b769f163e25b33fe3dc2d6 | [
"MIT"
] | null | null | null | lib/word_battle/node_region.ex | oskarkook/word_battle | 0811b1adca2ccdbd23b769f163e25b33fe3dc2d6 | [
"MIT"
] | null | null | null | lib/word_battle/node_region.ex | oskarkook/word_battle | 0811b1adca2ccdbd23b769f163e25b33fe3dc2d6 | [
"MIT"
] | null | null | null | defmodule WordBattle.NodeRegion do
def get(nodes) do
for node <- nodes do
region =
:persistent_term.get({:node_region, node}, nil) ||
:erpc.call(node, System, :get_env, ["REGION"]) ||
Atom.to_string(node)
:persistent_term.put({:node_region, node}, region)
%{node: no... | 23.866667 | 59 | 0.603352 |
2846320f5c2ad6cd18bffe5c95971b86d4ed7c6d | 4,910 | ex | Elixir | apps/model/lib/model/vehicle.ex | pacebus/mbta-api-fork | 6bf1d3a16e8917c9cfac0001b184c443be1f3abd | [
"MIT"
] | null | null | null | apps/model/lib/model/vehicle.ex | pacebus/mbta-api-fork | 6bf1d3a16e8917c9cfac0001b184c443be1f3abd | [
"MIT"
] | null | null | null | apps/model/lib/model/vehicle.ex | pacebus/mbta-api-fork | 6bf1d3a16e8917c9cfac0001b184c443be1f3abd | [
"MIT"
] | 1 | 2019-09-09T20:40:13.000Z | 2019-09-09T20:40:13.000Z | defmodule Model.Vehicle do
@moduledoc """
Vehicle represents the current status of a vehicle.
"""
use Recordable, [
:id,
:trip_id,
:stop_id,
:route_id,
:direction_id,
:label,
:latitude,
:longitude,
:bearing,
:speed,
:current_status,
:current_stop_sequence,
:u... | 50.618557 | 185 | 0.641548 |
2846453e52bec7caafbbb9620ffc99f9c5d81e14 | 765 | exs | Elixir | apps/parser/mix.exs | qwertystop/dominions5.analyst | 7c39ea14640b3a2d2c70df249688bc501f2f2184 | [
"MIT"
] | 1 | 2019-07-04T00:39:31.000Z | 2019-07-04T00:39:31.000Z | apps/parser/mix.exs | qwertystop/dominions5.analyst | 7c39ea14640b3a2d2c70df249688bc501f2f2184 | [
"MIT"
] | null | null | null | apps/parser/mix.exs | qwertystop/dominions5.analyst | 7c39ea14640b3a2d2c70df249688bc501f2f2184 | [
"MIT"
] | null | null | null | defmodule Parser.Mixfile do
use Mix.Project
def project do
[
app: :parser,
version: "0.1.0",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixir: "~> 1.5",
start_permanent: Mix.env == :pr... | 22.5 | 88 | 0.564706 |
2846519df54b2b1d6480c937790b967d9fe2f001 | 1,656 | exs | Elixir | elixir/langxpay/config/dev.exs | ednailson/languages-experiments | 309a0360c6c26a3c95f3c8e25fe37bc7a5cbb8d4 | [
"MIT"
] | null | null | null | elixir/langxpay/config/dev.exs | ednailson/languages-experiments | 309a0360c6c26a3c95f3c8e25fe37bc7a5cbb8d4 | [
"MIT"
] | null | null | null | elixir/langxpay/config/dev.exs | ednailson/languages-experiments | 309a0360c6c26a3c95f3c8e25fe37bc7a5cbb8d4 | [
"MIT"
] | null | null | null | use Mix.Config
# Configure your database
config :langxpay, Langxpay.Repo,
username: "postgres",
password: "postgres",
database: "langxpay_dev",
hostname: "localhost",
show_sensitive_data_on_connection_error: true,
pool_size: 10
# For development, we disable any cache and enable
# debugging and code reload... | 28.551724 | 68 | 0.727053 |
284659b00102adbe5a5c868206bd72e2bf607119 | 2,293 | ex | Elixir | lib/webapp_web.ex | runhyve/webapp | 434b074f98c1ebac657b56062c1c1a54e683dea1 | [
"BSD-2-Clause"
] | 12 | 2019-07-02T14:30:06.000Z | 2022-03-12T08:22:18.000Z | lib/webapp_web.ex | runhyve/webapp | 434b074f98c1ebac657b56062c1c1a54e683dea1 | [
"BSD-2-Clause"
] | 9 | 2020-03-16T20:10:50.000Z | 2021-06-17T17:45:44.000Z | lib/webapp_web.ex | runhyve/webapp | 434b074f98c1ebac657b56062c1c1a54e683dea1 | [
"BSD-2-Clause"
] | null | null | null | defmodule WebappWeb do
@moduledoc """
The entrypoint for defining your web interface, such
as controllers, views, channels and so on.
This can be used in your application as:
use WebappWeb, :controller
use WebappWeb, :view
The definitions below will be executed for every view,
controller, etc... | 23.161616 | 95 | 0.675534 |
284696172793893888762b05266eea2062286fd0 | 6,746 | exs | Elixir | test/tesla/middleware/logger_test.exs | Ch4s3/tesla | 8f5a4d0ba5810eea5a06994ec84b3bc14b25bbde | [
"MIT"
] | 1 | 2019-06-25T07:01:01.000Z | 2019-06-25T07:01:01.000Z | test/tesla/middleware/logger_test.exs | Ch4s3/tesla | 8f5a4d0ba5810eea5a06994ec84b3bc14b25bbde | [
"MIT"
] | null | null | null | test/tesla/middleware/logger_test.exs | Ch4s3/tesla | 8f5a4d0ba5810eea5a06994ec84b3bc14b25bbde | [
"MIT"
] | null | null | null | defmodule Tesla.Middleware.LoggerTest do
use ExUnit.Case, async: false
defmodule Client do
use Tesla
plug Tesla.Middleware.Logger
adapter fn env ->
env = Tesla.put_header(env, "content-type", "text/plain")
case env.url do
"/connection-error" ->
{:error, :econnrefused}
... | 26.664032 | 98 | 0.570264 |
2846b4d0b979a791ba5cb3d79412eacd20e62faf | 1,800 | ex | Elixir | clients/testing/lib/google_api/testing/v1/model/device_ip_block.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/testing/lib/google_api/testing/v1/model/device_ip_block.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/testing/lib/google_api/testing/v1/model/device_ip_block.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... | 33.962264 | 134 | 0.71 |
2846b95c5686df7c9069f85492a137b12a11cceb | 5,473 | ex | Elixir | clients/games_management/lib/google_api/games_management/v1management/api/players.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/games_management/lib/google_api/games_management/v1management/api/players.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/games_management/lib/google_api/games_management/v1management/api/players.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... | 45.991597 | 217 | 0.701626 |
2846c3126ef70bf6ded5fe6119cb4b4cc12165a3 | 278 | ex | Elixir | lib/user/model/search_params.ex | Lechindianer/ex_pnut | 99164b73e9b60bfccb90574dd1a6f418a7bd96ed | [
"ISC"
] | 2 | 2019-07-12T04:07:34.000Z | 2019-11-26T01:08:14.000Z | lib/user/model/search_params.ex | Lechindianer/ex_pnut | 99164b73e9b60bfccb90574dd1a6f418a7bd96ed | [
"ISC"
] | null | null | null | lib/user/model/search_params.ex | Lechindianer/ex_pnut | 99164b73e9b60bfccb90574dd1a6f418a7bd96ed | [
"ISC"
] | 1 | 2019-11-26T01:18:54.000Z | 2019-11-26T01:18:54.000Z | defmodule ExPnut.User.SearchParams do
@moduledoc """
[https://pnut.io/docs/api/resources/users/search](https://pnut.io/docs/api/resources/users/search)
"""
@enforce_keys [:q]
defstruct [
:q,
:locale,
:timezone,
:types,
order: "relevance"
]
end
| 17.375 | 100 | 0.636691 |
2846e8bc279657b78af50b7719395408f4a80c38 | 641 | exs | Elixir | apps/admin_panel/config/dev.exs | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | 1 | 2018-12-07T06:21:21.000Z | 2018-12-07T06:21:21.000Z | apps/admin_panel/config/dev.exs | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | null | null | null | apps/admin_panel/config/dev.exs | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | null | null | null | use Mix.Config
# General application configuration
config :admin_panel, webpack_watch: true
# 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... | 30.52381 | 68 | 0.781591 |
2846ea308e85a414a8cf0df82d8d3e5e7aeedb4e | 2,961 | exs | Elixir | test/ex_oauth2_provider/oauth_access_grants/oauth_access_grants_test.exs | gozego/ex_oauth2_provider | d3a7658d28233dda2dfdef7ed397b5b440a2f737 | [
"Unlicense",
"MIT"
] | 2 | 2021-04-25T20:59:53.000Z | 2021-07-13T22:49:20.000Z | test/ex_oauth2_provider/oauth_access_grants/oauth_access_grants_test.exs | gozego/ex_oauth2_provider | d3a7658d28233dda2dfdef7ed397b5b440a2f737 | [
"Unlicense",
"MIT"
] | null | null | null | test/ex_oauth2_provider/oauth_access_grants/oauth_access_grants_test.exs | gozego/ex_oauth2_provider | d3a7658d28233dda2dfdef7ed397b5b440a2f737 | [
"Unlicense",
"MIT"
] | null | null | null | defmodule ExOauth2Provider.OauthAccessGrantTest do
use ExOauth2Provider.TestCase
import ExOauth2Provider.Test.QueryHelper
import ExOauth2Provider.Test.Fixture
alias ExOauth2Provider.OauthAccessGrants
alias ExOauth2Provider.OauthAccessGrants.OauthAccessGrant
@valid_attrs %{expires_in: 600, redirect_uri... | 42.913043 | 122 | 0.72104 |
28470add7275c020bd06cfb2d6c6fed9da710521 | 1,359 | ex | Elixir | apps/testchain/lib/testchain/evm/state.ex | makerdao/qa_backend_gateway | 38e9a3f3f4b66212f1ee9d38b3b698a2a1f9a809 | [
"Apache-2.0"
] | 1 | 2020-10-23T19:25:27.000Z | 2020-10-23T19:25:27.000Z | apps/testchain/lib/testchain/evm/state.ex | makerdao/qa_backend_gateway | 38e9a3f3f4b66212f1ee9d38b3b698a2a1f9a809 | [
"Apache-2.0"
] | 5 | 2019-01-11T11:48:08.000Z | 2019-01-16T17:29:23.000Z | apps/testchain/lib/testchain/evm/state.ex | makerdao/qa_backend_gateway | 38e9a3f3f4b66212f1ee9d38b3b698a2a1f9a809 | [
"Apache-2.0"
] | 7 | 2019-10-09T05:49:52.000Z | 2022-03-23T16:48:45.000Z | defmodule Staxx.Testchain.EVM.State do
@moduledoc """
Default structure for handling state into any EVM implementation
Consist of this properties:
- `status` - Chain status
- `version` - EVM version
- `http_port` - HTTP JSONRPC port. In case of `nil` - port will be randomly assigned (Default: `nil`)
... | 34.846154 | 104 | 0.640912 |
28472770f8d3021242840ac0d6dc3ebaa1dda74b | 1,257 | ex | Elixir | lib/fexr_web/views/error_helpers.ex | Schultzer/fexr | f64d67b78bc785ae967f4c1193491a1d9cf33279 | [
"MIT",
"Unlicense"
] | 4 | 2017-08-13T09:03:24.000Z | 2018-06-19T06:32:07.000Z | lib/fexr_web/views/error_helpers.ex | Schultzer/fexr | f64d67b78bc785ae967f4c1193491a1d9cf33279 | [
"MIT",
"Unlicense"
] | null | null | null | lib/fexr_web/views/error_helpers.ex | Schultzer/fexr | f64d67b78bc785ae967f4c1193491a1d9cf33279 | [
"MIT",
"Unlicense"
] | null | null | null | defmodule FexrWeb.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 :... | 30.658537 | 73 | 0.668258 |
28476268153bba90b24357df72fae5fd05ab4ee6 | 1,980 | exs | Elixir | config/config.exs | ashton314/indexing-reporter | 7bb9d1bb436b18a359ad4855b084b92c076b979d | [
"MIT"
] | null | null | null | config/config.exs | ashton314/indexing-reporter | 7bb9d1bb436b18a359ad4855b084b92c076b979d | [
"MIT"
] | null | null | null | config/config.exs | ashton314/indexing-reporter | 7bb9d1bb436b18a359ad4855b084b92c076b979d | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
# General application configuration
import Config
config :indexing_reporter,
ecto_repos: [IndexingRep... | 31.935484 | 117 | 0.729798 |
28476b82e49b69dd2d255560eae0d983d075a3f5 | 1,203 | ex | Elixir | lib/car_cache/lru.ex | jeffutter/car_cache | d1f9cd6f629a6fcdddd07575bc35776bfc5b2912 | [
"MIT"
] | 1 | 2021-02-21T03:09:04.000Z | 2021-02-21T03:09:04.000Z | lib/car_cache/lru.ex | jeffutter/car_cache | d1f9cd6f629a6fcdddd07575bc35776bfc5b2912 | [
"MIT"
] | 3 | 2021-02-19T19:03:33.000Z | 2021-02-21T03:10:20.000Z | lib/car_cache/lru.ex | jeffutter/car_cache | d1f9cd6f629a6fcdddd07575bc35776bfc5b2912 | [
"MIT"
] | null | null | null | defmodule CarCache.LRU do
@moduledoc """
Datastructure to represent a LRU list.
The structure is approximated with the :queue module.
It is O(1) complexity for most operations with the exception of member/2
"""
defstruct size: 0,
queue: nil
@type t :: %__MODULE__{
size: non_neg_i... | 21.872727 | 92 | 0.588529 |
28477c6e55548c697d3aa53e6cecb1e2fe7f0051 | 645 | ex | Elixir | lib/paper_trading/util/date.ex | nicolafiorillo/PaperTrading | b76d4328fbf8e78dc0b1224fc0d19cb0372de7f5 | [
"MIT"
] | null | null | null | lib/paper_trading/util/date.ex | nicolafiorillo/PaperTrading | b76d4328fbf8e78dc0b1224fc0d19cb0372de7f5 | [
"MIT"
] | null | null | null | lib/paper_trading/util/date.ex | nicolafiorillo/PaperTrading | b76d4328fbf8e78dc0b1224fc0d19cb0372de7f5 | [
"MIT"
] | null | null | null | defmodule Surveyraiser.Util.Date do
use Timex
def utc_now_with_delay(delay) when is_number(delay) do
Date.now
|> Timex.add(Time.to_timestamp(delay, :seconds))
|> Timex.to_erlang_datetime
|> Ecto.DateTime.from_erl
end
def utc_now() do
Date.now
|> Timex.to_erlang_datetime
|> ... | 22.241379 | 56 | 0.626357 |
28479b2a72e211e28e0b741e2a931971b47040f4 | 2,461 | ex | Elixir | clients/content/lib/google_api/content/v21/model/account_status_account_level_issue.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v21/model/account_status_account_level_issue.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v21/model/account_status_account_level_issue.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... | 35.157143 | 175 | 0.674523 |
2847ca4bf2196fbe93e3951e1b368614a1726953 | 1,297 | ex | Elixir | lib/mix/tasks/phx_up.del.view.ex | henriquefernandez/phoenix_up | b549a2e464d858a090ffa7b0a4100a71561807df | [
"MIT"
] | 27 | 2020-02-22T21:15:33.000Z | 2021-12-25T07:31:14.000Z | lib/mix/tasks/phx_up.del.view.ex | henriquefernandez/phoenix_up | b549a2e464d858a090ffa7b0a4100a71561807df | [
"MIT"
] | 1 | 2020-03-07T12:14:12.000Z | 2020-03-07T12:14:12.000Z | lib/mix/tasks/phx_up.del.view.ex | henriquefernandez/phoenix_up | b549a2e464d858a090ffa7b0a4100a71561807df | [
"MIT"
] | 2 | 2020-03-03T13:09:08.000Z | 2020-07-24T05:07:45.000Z | defmodule Mix.Tasks.PhxUp.Del.View do
@shortdoc "Delete a view file and its test"
@moduledoc """
Delete a view file and its test.
mix phx_up.del.view Posts
or
mix phx_up.del.v Posts
The first argument is the view module name.
"""
use Mix.Task
@doc false
def run(io_puts \\ true, args)... | 23.581818 | 80 | 0.5798 |
2847dbf042e43e8502d18bbf6e272d40a6184d32 | 2,687 | ex | Elixir | elixir/lib/homework_web/schemas/transactions_schema.ex | alexparker/divvy-homework | f656b6966c626befb5404d0c8455de86da5aab14 | [
"MIT"
] | null | null | null | elixir/lib/homework_web/schemas/transactions_schema.ex | alexparker/divvy-homework | f656b6966c626befb5404d0c8455de86da5aab14 | [
"MIT"
] | null | null | null | elixir/lib/homework_web/schemas/transactions_schema.ex | alexparker/divvy-homework | f656b6966c626befb5404d0c8455de86da5aab14 | [
"MIT"
] | 2 | 2021-03-16T22:27:37.000Z | 2021-10-16T08:38:35.000Z | defmodule HomeworkWeb.Schemas.TransactionsSchema do
@moduledoc """
Defines the graphql schema for transactions.
"""
use Absinthe.Schema.Notation
alias HomeworkWeb.Resolvers.TransactionsResolver
scalar :currency, name: "Currency" do
serialize(&serialize_amount_to_dollars/1)
parse(&parse_amount_to_c... | 25.836538 | 80 | 0.666915 |
2847df5b940b728ae1884b0bd3c3fe329ff7eaa3 | 1,949 | ex | Elixir | clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_v2beta1_intent_message_rbm_suggested_action_rbm_suggested_action_dial.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_v2beta1_intent_message_rbm_suggested_action_rbm_suggested_action_dial.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_v2beta1_intent_message_rbm_suggested_action_rbm_suggested_action_dial.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... | 36.092593 | 263 | 0.76706 |
28480fdf1be3f62968e348814f82d0551c26977e | 5,722 | ex | Elixir | deps/credo/lib/credo/check/code_helper.ex | BandanaPandey/nary_tree | fb1eeb69e38e43c9f9ffb54297cef52dff5c928d | [
"MIT"
] | 13 | 2018-09-19T21:03:29.000Z | 2022-01-27T04:06:32.000Z | deps/credo/lib/credo/check/code_helper.ex | BandanaPandey/nary_tree | fb1eeb69e38e43c9f9ffb54297cef52dff5c928d | [
"MIT"
] | 1 | 2020-05-26T04:16:57.000Z | 2020-05-26T04:16:57.000Z | deps/credo/lib/credo/check/code_helper.ex | BandanaPandey/nary_tree | fb1eeb69e38e43c9f9ffb54297cef52dff5c928d | [
"MIT"
] | 3 | 2020-05-21T04:32:08.000Z | 2021-07-28T05:14:01.000Z | defmodule Credo.Check.CodeHelper do
@moduledoc """
This module contains functions that are used by several checks when dealing
with the AST.
"""
alias Credo.Code.Block
alias Credo.Code.Parameters
alias Credo.Code.Module
alias Credo.Code.Scope
alias Credo.Code.Charlists
alias Credo.Code.Sigils
ali... | 28.467662 | 81 | 0.658861 |
28483ba984febf7f7c3ddc8c04c4f9669f684abf | 2,038 | ex | Elixir | apps/ewallet/lib/ewallet/release_tasks/config.ex | enyan94/ewallet | e938e686319867d133b21cd0eb5496e213ae7620 | [
"Apache-2.0"
] | null | null | null | apps/ewallet/lib/ewallet/release_tasks/config.ex | enyan94/ewallet | e938e686319867d133b21cd0eb5496e213ae7620 | [
"Apache-2.0"
] | null | null | null | apps/ewallet/lib/ewallet/release_tasks/config.ex | enyan94/ewallet | e938e686319867d133b21cd0eb5496e213ae7620 | [
"Apache-2.0"
] | null | null | null | # 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 ... | 26.467532 | 81 | 0.647694 |
28483df24f1c01e134914b52138210015816cc2a | 2,485 | ex | Elixir | apps/commuter_rail_boarding/lib/schedule_cache.ex | paulswartz/commuter_rail_boarding | 6be34c192d6a1ee980307d9f3d027bf4cdafa53f | [
"MIT"
] | null | null | null | apps/commuter_rail_boarding/lib/schedule_cache.ex | paulswartz/commuter_rail_boarding | 6be34c192d6a1ee980307d9f3d027bf4cdafa53f | [
"MIT"
] | null | null | null | apps/commuter_rail_boarding/lib/schedule_cache.ex | paulswartz/commuter_rail_boarding | 6be34c192d6a1ee980307d9f3d027bf4cdafa53f | [
"MIT"
] | null | null | null | defmodule ScheduleCache do
@moduledoc """
Caches information about GTFS schedule for later use.
"""
use GenServer
require Logger
@table __MODULE__.Table
@six_month_timeout :timer.hours(24 * 30 * 60)
def start_link(_args \\ []) do
GenServer.start_link(__MODULE__, :ok, name: __MODULE__)
end
@do... | 25.357143 | 78 | 0.615694 |
284847c10391e16ce946b7cf86dc03629da04051 | 15,930 | ex | Elixir | lib/plaid/webhooks.ex | ethangunderson/elixir-plaid | 53aa0a87a4a837df6a2d15684870e7a58a003db6 | [
"MIT"
] | 16 | 2021-03-09T02:29:32.000Z | 2022-03-13T07:18:03.000Z | lib/plaid/webhooks.ex | ethangunderson/elixir-plaid | 53aa0a87a4a837df6a2d15684870e7a58a003db6 | [
"MIT"
] | 5 | 2021-04-24T20:38:14.000Z | 2022-03-19T22:03:09.000Z | lib/plaid/webhooks.ex | ethangunderson/elixir-plaid | 53aa0a87a4a837df6a2d15684870e7a58a003db6 | [
"MIT"
] | 2 | 2021-06-11T02:15:01.000Z | 2022-03-15T18:39:59.000Z | defmodule Plaid.Webhooks do
@moduledoc """
Verify webhooks from plaid and construct the raw body into structs
"""
require Logger
alias Plaid.Castable
@doc """
Verify that a webhook is actually from plaid, constructing the raw body into an event struct.
Adheres to the guidelines outlined in [this gui... | 30.992218 | 166 | 0.64162 |
28488b4b592e329fee50fbbd5afd476de7b64a74 | 380 | ex | Elixir | lib/euros/crawl_option.ex | RichMorin/euros | 7c592c532c53f954ed323d63f4f358c5ebd370a0 | [
"MIT"
] | 2 | 2017-12-18T00:10:14.000Z | 2017-12-18T03:25:26.000Z | lib/euros/crawl_option.ex | RichMorin/euros | 7c592c532c53f954ed323d63f4f358c5ebd370a0 | [
"MIT"
] | 26 | 2017-12-15T09:49:16.000Z | 2018-01-13T09:11:48.000Z | lib/euros/crawl_option.ex | RichMorin/euros | 7c592c532c53f954ed323d63f4f358c5ebd370a0 | [
"MIT"
] | 2 | 2017-12-18T00:10:18.000Z | 2019-03-10T09:29:56.000Z | defmodule Euros.CrawlOption do
@moduledoc """
This is Euros.Core.crawl option
* `http_option` - http option. `Euros.HTTPOption`
* `pattern` - crawl url pattern regexp. default is `~r/.*/`
* `depth_limit` - number of recusive crawl fetch page. default nil
"""
defstruct http_option: %Euros.HTTPOption{},
... | 29.230769 | 68 | 0.65 |
28489aeaeb699c6454b6277d0680916936d7c9b0 | 156 | ex | Elixir | examples/lib/button.ex | omohokcoj/x_component | 0f51d78b80b7d54d238b7d0c2c3c2f93b9320108 | [
"MIT"
] | 53 | 2020-02-09T16:34:46.000Z | 2021-04-01T17:48:26.000Z | examples/lib/button.ex | omohokcoj/x_component | 0f51d78b80b7d54d238b7d0c2c3c2f93b9320108 | [
"MIT"
] | 1 | 2020-03-11T03:22:52.000Z | 2020-03-11T03:22:52.000Z | examples/lib/button.ex | omohokcoj/x_component | 0f51d78b80b7d54d238b7d0c2c3c2f93b9320108 | [
"MIT"
] | 1 | 2020-02-09T16:34:49.000Z | 2020-02-09T16:34:49.000Z | defmodule Button do
use X.Component,
template: ~X"""
<button
:attrs="@attrs"
class="btn"
> {{= yield }}
</button>
"""
end
| 14.181818 | 21 | 0.49359 |
2848be9fd699efa134ae231ebb89d2d5ab6457cb | 448 | exs | Elixir | priv/repo/migrations/20160317183129_add_chat_provider_user_id_to_chat_handles.exs | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 1,003 | 2016-02-23T17:21:12.000Z | 2022-02-20T14:39:35.000Z | priv/repo/migrations/20160317183129_add_chat_provider_user_id_to_chat_handles.exs | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 906 | 2016-02-22T22:54:19.000Z | 2022-03-11T15:19:43.000Z | priv/repo/migrations/20160317183129_add_chat_provider_user_id_to_chat_handles.exs | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 95 | 2016-02-23T13:42:31.000Z | 2021-11-30T14:39:55.000Z | defmodule Cog.Repo.Migrations.AddChatProviderUserIdToChatHandles do
use Ecto.Migration
def change do
alter table(:chat_handles) do
add :chat_provider_user_id, :text
end
create unique_index(:chat_handles, [:provider_id, :chat_provider_user_id])
execute("UPDATE chat_handles SET chat_provider_... | 24.888889 | 78 | 0.745536 |
2848d75f3983c4f76b85b39a5b4bf367f9707557 | 3,100 | ex | Elixir | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_output_storage_config.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_output_storage_config.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_output_storage_config.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 43.055556 | 168 | 0.740645 |
28491039f48232e518a7f3cafc1807dc7a034678 | 4,331 | ex | Elixir | clients/container/lib/google_api/container/v1/model/autoprovisioning_node_pool_defaults.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/container/lib/google_api/container/v1/model/autoprovisioning_node_pool_defaults.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/container/lib/google_api/container/v1/model/autoprovisioning_node_pool_defaults.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... | 61 | 533 | 0.737474 |
284938ef63a7b073a7533e796ae478773c589c70 | 7,080 | ex | Elixir | lib/pow/ecto/context.ex | joepstender/pow | 052a69113710fc5a7a796c38ca02067ad399a9f3 | [
"MIT"
] | 1 | 2021-06-25T10:36:01.000Z | 2021-06-25T10:36:01.000Z | lib/pow/ecto/context.ex | joepstender/pow | 052a69113710fc5a7a796c38ca02067ad399a9f3 | [
"MIT"
] | null | null | null | lib/pow/ecto/context.ex | joepstender/pow | 052a69113710fc5a7a796c38ca02067ad399a9f3 | [
"MIT"
] | null | null | null | defmodule Pow.Ecto.Context do
@moduledoc """
Handles pow users context for user.
## Usage
This module will be used by pow by default. If you
wish to have control over context methods, you can
do configure `lib/my_project/users/users.ex`
the following way:
defmodule MyApp.Users do
use Pow.... | 28.780488 | 115 | 0.664548 |
28495e6a7cfd3b971fa516b7882f25e69642ded0 | 314 | ex | Elixir | apps/admin_panel/lib/admin_panel/router.ex | turbo-play/ewallet | b7fee3eed62ac716f46246132c2ead1045f2e4f3 | [
"Apache-2.0"
] | 2 | 2019-07-13T05:49:03.000Z | 2021-08-19T23:58:23.000Z | apps/admin_panel/lib/admin_panel/router.ex | turbo-play/ewallet | b7fee3eed62ac716f46246132c2ead1045f2e4f3 | [
"Apache-2.0"
] | null | null | null | apps/admin_panel/lib/admin_panel/router.ex | turbo-play/ewallet | b7fee3eed62ac716f46246132c2ead1045f2e4f3 | [
"Apache-2.0"
] | 3 | 2018-05-08T17:15:42.000Z | 2021-11-10T04:08:33.000Z | defmodule AdminPanel.Router do
use AdminPanel, :router
pipeline :browser do
plug :accepts, ["html"]
plug :put_secure_browser_headers
end
scope "/admin", AdminPanel do
pipe_through :browser
match :*, "/*path", PageController, :index # All requests serve from the same index page
end
end
| 22.428571 | 92 | 0.707006 |
28498ac7c51b454281eee084a25c0a1079104dd1 | 1,401 | ex | Elixir | lib/wpcom/call.ex | Automattic/wpcom.ex | 093ac66f2f9341b4d35910dd9d1dcc53a547f3af | [
"MIT"
] | 4 | 2020-06-25T01:35:36.000Z | 2021-07-04T20:35:49.000Z | lib/wpcom/call.ex | Automattic/wpcom.ex | 093ac66f2f9341b4d35910dd9d1dcc53a547f3af | [
"MIT"
] | 25 | 2019-04-29T17:27:16.000Z | 2021-08-02T11:16:48.000Z | lib/wpcom/call.ex | Automattic/wpcom.ex | 093ac66f2f9341b4d35910dd9d1dcc53a547f3af | [
"MIT"
] | 1 | 2021-02-04T10:34:04.000Z | 2021-02-04T10:34:04.000Z | defmodule Wpcom.Call do
@moduledoc """
Synchronous HTTP request functions for the WordPress.com REST API
"""
import Wpcom, only: [api_url: 2]
@type api_version :: Wpcom.api_version() | nil
@type http_headers :: Wpcom.Req.http_headers()
@type http_response :: Wpcom.Req.http_response()
@doc "Performs a... | 38.916667 | 92 | 0.688794 |
2849bda2a4368ec6c44ccbf4b1dc7f57c0b6ac9a | 1,973 | exs | Elixir | config/prod.exs | mbta/screens | 4b586970f8844b19543bb2ffd4b032a89f6fa40a | [
"MIT"
] | 3 | 2021-07-27T14:11:00.000Z | 2022-01-03T14:16:43.000Z | config/prod.exs | mbta/screens | 4b586970f8844b19543bb2ffd4b032a89f6fa40a | [
"MIT"
] | 444 | 2021-03-10T20:57:17.000Z | 2022-03-31T16:00:35.000Z | config/prod.exs | mbta/screens | 4b586970f8844b19543bb2ffd4b032a89f6fa40a | [
"MIT"
] | null | null | null | use Mix.Config
# For production, don't forget to configure the url host
# to something meaningful, Phoenix uses this information
# when generating URLs.
#
# Note we also include the path to a cache manifest
# containing the digested version of static files. This
# manifest is generated by the `mix phx.digest` task,
# ... | 32.883333 | 66 | 0.707045 |
2849d110db66591a9c21e17546aa887935126791 | 1,906 | ex | Elixir | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/export_context_sql_export_options_mysql_export_options.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | 1 | 2021-10-01T09:20:41.000Z | 2021-10-01T09:20:41.000Z | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/export_context_sql_export_options_mysql_export_options.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/export_context_sql_export_options_mysql_export_options.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... | 36.653846 | 422 | 0.750262 |
2849e69666dbdf62596de6228a0afc846c949c82 | 46,622 | ex | Elixir | lib/aws/generated/cloud_formation.ex | pecigonzalo/aws-elixir | b52181ebfb9e62349dc8e8067b7fbcd4f7a18c68 | [
"Apache-2.0"
] | null | null | null | lib/aws/generated/cloud_formation.ex | pecigonzalo/aws-elixir | b52181ebfb9e62349dc8e8067b7fbcd4f7a18c68 | [
"Apache-2.0"
] | null | null | null | lib/aws/generated/cloud_formation.ex | pecigonzalo/aws-elixir | b52181ebfb9e62349dc8e8067b7fbcd4f7a18c68 | [
"Apache-2.0"
] | null | null | null | # WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
# See https://github.com/aws-beam/aws-codegen for more details.
defmodule AWS.CloudFormation do
@moduledoc """
CloudFormation
CloudFormation allows you to create and manage Amazon Web Services
infrastructure deployments predictably and repeatedly.
You can use Cl... | 44.742802 | 205 | 0.757647 |
2849f1e61844c1c1e5c97aef35c27028fb230621 | 1,620 | ex | Elixir | lib/ynd_phx_bootstrap_web/endpoint.ex | ynd-consult-ug/ynd-phx-bootstrap | 784480186fee0375a01a534fcf597d1ef026e7ac | [
"MIT"
] | 33 | 2018-02-01T16:02:05.000Z | 2020-08-20T07:47:33.000Z | lib/ynd_phx_bootstrap_web/endpoint.ex | ynd-consult/ynd-phx-bootstrap | 784480186fee0375a01a534fcf597d1ef026e7ac | [
"MIT"
] | null | null | null | lib/ynd_phx_bootstrap_web/endpoint.ex | ynd-consult/ynd-phx-bootstrap | 784480186fee0375a01a534fcf597d1ef026e7ac | [
"MIT"
] | 2 | 2020-10-30T10:49:38.000Z | 2021-03-29T15:07:40.000Z | defmodule YndPhxBootstrapWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :ynd_phx_bootstrap
socket "/socket", YndPhxBootstrapWeb.UserSocket
# Serve at "/" the static files from "priv/static" directory.
#
# You should set gzip to true if you are running phoenix.digest
# when deploying your static files in p... | 28.928571 | 95 | 0.712963 |
284a0245c0505a3815b3690927bff1afb5900d72 | 1,064 | ex | Elixir | lib/koans/11_sigils.ex | loicginoux/elixir-koans | 11a15fd55771fed43823db9429d6fa8ba60fa73f | [
"MIT"
] | null | null | null | lib/koans/11_sigils.ex | loicginoux/elixir-koans | 11a15fd55771fed43823db9429d6fa8ba60fa73f | [
"MIT"
] | null | null | null | lib/koans/11_sigils.ex | loicginoux/elixir-koans | 11a15fd55771fed43823db9429d6fa8ba60fa73f | [
"MIT"
] | null | null | null | defmodule Sigils do
use Koans
@intro "Sigils"
koan "The ~s sigil is a different way of expressing string literals" do
assert ~s{This is a string} == "This is a string"
end
koan "Sigils are useful to avoid escaping quotes in strings" do
assert "\"Welcome to the jungle\", they said." == ~s{"Welcome t... | 26.6 | 93 | 0.614662 |
284a231c0012e9d5e1b6fba592cee661b26bee0a | 503 | exs | Elixir | test/recurly/money_test.exs | calibr/recurly-client-elixir | a1160a10f90e0919adacf39bd95df3784e11fdcc | [
"MIT"
] | 8 | 2016-08-11T00:45:46.000Z | 2020-05-04T18:55:48.000Z | test/recurly/money_test.exs | calibr/recurly-client-elixir | a1160a10f90e0919adacf39bd95df3784e11fdcc | [
"MIT"
] | 10 | 2016-08-15T20:01:56.000Z | 2019-05-10T02:09:35.000Z | test/recurly/money_test.exs | calibr/recurly-client-elixir | a1160a10f90e0919adacf39bd95df3784e11fdcc | [
"MIT"
] | 4 | 2017-10-16T14:29:58.000Z | 2019-05-09T23:20:56.000Z | defmodule Recurly.MoneyTest do
use ExUnit.Case, async: true
alias Recurly.Money
import Utils
@all_fields ~w(
aud
brl
cad
chf
czk
dkk
eur
gbp
huf
ils
inr
mxn
nok
nzd
pln
sek
sgd
usd
zar
)a
test "should maintain the list of writeabl... | 13.972222 | 56 | 0.634195 |
284a24ba90387523a2738855ce5be831f8c6928f | 36,446 | ex | Elixir | lib/phoenix_live_view/test/live_view_test.ex | rhruiz/phoenix_live_view | 597c417bb9664b8b45454367758775453f615973 | [
"MIT"
] | null | null | null | lib/phoenix_live_view/test/live_view_test.ex | rhruiz/phoenix_live_view | 597c417bb9664b8b45454367758775453f615973 | [
"MIT"
] | null | null | null | lib/phoenix_live_view/test/live_view_test.ex | rhruiz/phoenix_live_view | 597c417bb9664b8b45454367758775453f615973 | [
"MIT"
] | null | null | null | defmodule Phoenix.LiveViewTest do
@moduledoc """
Conveniences for testing Phoenix LiveViews.
In LiveView tests, we interact with views via process
communication in substitution of a browser. Like a browser,
our test process receives messages about the rendered updates
from the view which can be asserted ag... | 32.253097 | 98 | 0.65999 |
284a29f20957f45a7a100e563982c0566f345329 | 159 | exs | Elixir | config/test.exs | Annopaolo/astarte_rpc | cd720004d225631f41d6f4d7f964aecb92b52849 | [
"Apache-2.0"
] | 3 | 2018-02-02T14:07:03.000Z | 2020-02-10T07:12:39.000Z | config/test.exs | Annopaolo/astarte_rpc | cd720004d225631f41d6f4d7f964aecb92b52849 | [
"Apache-2.0"
] | 49 | 2018-02-02T10:00:30.000Z | 2022-03-22T10:39:10.000Z | config/test.exs | Annopaolo/astarte_rpc | cd720004d225631f41d6f4d7f964aecb92b52849 | [
"Apache-2.0"
] | 5 | 2018-02-02T09:58:07.000Z | 2021-04-07T08:53:44.000Z | use Mix.Config
config :astarte_rpc, :amqp_connection,
host: System.get_env("RABBITMQ_HOST") || "rabbitmq"
config :astarte_rpc, :amqp_queue,
"test_queue"
| 19.875 | 53 | 0.748428 |
284a2e6c6fc3a1a79010e1b25160f3aa4b959670 | 878 | exs | Elixir | test/k8s/conn/auth/basic_auth_test.exs | FreedomBen/k8s | 9cfd7bec869cd1f2d8a6c543923f3849710941a5 | [
"MIT"
] | null | null | null | test/k8s/conn/auth/basic_auth_test.exs | FreedomBen/k8s | 9cfd7bec869cd1f2d8a6c543923f3849710941a5 | [
"MIT"
] | 2 | 2022-03-28T03:22:37.000Z | 2022-03-28T03:22:54.000Z | test/k8s/conn/auth/basic_auth_test.exs | FreedomBen/k8s | 9cfd7bec869cd1f2d8a6c543923f3849710941a5 | [
"MIT"
] | null | null | null | defmodule K8s.Conn.Auth.BasicAuthTest do
@moduledoc false
use ExUnit.Case, async: true
alias K8s.Conn
alias K8s.Conn.Auth.BasicAuth
describe "create/2" do
test "creates a BasicAuth struct from token data" do
auth = %{"username" => "basic-auth-username", "password" => "basic-auth-password"}
... | 31.357143 | 95 | 0.681093 |
284a6b56df57a3494035cf4825554401d5e1804b | 389 | ex | Elixir | lib/preview/package/local_updater.ex | cainwatson/preview | f3d4ce442072987b66c5d72a14682b25f1a6c268 | [
"Apache-2.0"
] | 26 | 2021-01-25T20:30:46.000Z | 2021-12-16T08:42:35.000Z | lib/preview/package/local_updater.ex | cainwatson/preview | f3d4ce442072987b66c5d72a14682b25f1a6c268 | [
"Apache-2.0"
] | 17 | 2021-01-25T18:45:43.000Z | 2021-07-23T15:15:41.000Z | lib/preview/package/local_updater.ex | cainwatson/preview | f3d4ce442072987b66c5d72a14682b25f1a6c268 | [
"Apache-2.0"
] | 4 | 2021-01-25T21:32:28.000Z | 2021-07-07T12:36:19.000Z | defmodule Preview.Package.LocalUpdater do
use GenServer
require Logger
def start_link(_opts) do
GenServer.start_link(__MODULE__, [], name: __MODULE__)
end
def init(_opts) do
Logger.debug("Skipping version updater")
Preview.Package.Store.fill([
{"decimal", ["2.0.0"]},
{"ecto", ["0.2.... | 18.52381 | 58 | 0.604113 |
284ae098a726a0ecf8636de2fcb4c6fcf3d57022 | 1,559 | ex | Elixir | clients/firebase_rules/lib/google_api/firebase_rules/v1/model/source.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/firebase_rules/lib/google_api/firebase_rules/v1/model/source.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/firebase_rules/lib/google_api/firebase_rules/v1/model/source.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.170213 | 136 | 0.734445 |
284b013e168f424e39a9451c7a7773d80c0778c6 | 1,796 | ex | Elixir | rojak-api/test/support/model_case.ex | pyk/rojak | 0dd69efedb58ee5d951e1a43cdfa65b60f8bb7c7 | [
"BSD-3-Clause"
] | 107 | 2016-10-02T05:54:42.000Z | 2021-08-05T00:20:51.000Z | rojak-api/test/support/model_case.ex | pyk/rojak | 0dd69efedb58ee5d951e1a43cdfa65b60f8bb7c7 | [
"BSD-3-Clause"
] | 134 | 2016-10-02T21:21:08.000Z | 2016-12-27T02:46:34.000Z | rojak-api/test/support/model_case.ex | pyk/rojak | 0dd69efedb58ee5d951e1a43cdfa65b60f8bb7c7 | [
"BSD-3-Clause"
] | 54 | 2016-10-02T08:47:56.000Z | 2020-03-08T00:56:03.000Z | defmodule RojakAPI.ModelCase do
@moduledoc """
This module defines the test case to be used by
model tests.
You may define functions here to be used as helpers in
your model tests. See `errors_on/2`'s definition as reference.
Finally, if the test case interacts with the database,
it cannot be async. For... | 27.212121 | 84 | 0.685969 |
284b0d1511248df761e4024ceffdf4e98611be29 | 249 | exs | Elixir | apps/institute/priv/repo/migrations/20190726183532_add_template_and_redirect_url_to_thesis_pages.exs | hui-ad/institute | 28242d9d324d710a0e70678ec2d79099f1d3a98d | [
"MIT"
] | 4 | 2019-06-12T19:05:34.000Z | 2019-08-18T15:02:56.000Z | apps/institute/priv/repo/migrations/20190726183532_add_template_and_redirect_url_to_thesis_pages.exs | hui-ad/institute | 28242d9d324d710a0e70678ec2d79099f1d3a98d | [
"MIT"
] | 33 | 2019-06-12T18:59:21.000Z | 2021-03-31T15:45:22.000Z | apps/institute/priv/repo/migrations/20190726183532_add_template_and_redirect_url_to_thesis_pages.exs | hui-ad/institute | 28242d9d324d710a0e70678ec2d79099f1d3a98d | [
"MIT"
] | 1 | 2019-06-16T09:38:08.000Z | 2019-06-16T09:38:08.000Z | defmodule Institute.Repo.Migrations.AddTemplateAndRedirectUrlToThesisPages do
@moduledoc false
use Ecto.Migration
def change do
alter table(:thesis_pages) do
add :template, :string
add :redirect_url, :string
end
end
end
| 20.75 | 77 | 0.738956 |
284b23a28b96ec4ba66f013495873bede9be1639 | 1,236 | ex | Elixir | apps/fz_http/lib/fz_http/users/session.ex | jasonboukheir/firezone | 79d610b94f67ae25c8ca26f391c0edf288f6aaa5 | [
"Apache-2.0"
] | 5 | 2020-05-22T00:24:39.000Z | 2021-06-18T18:28:45.000Z | apps/fz_http/lib/fz_http/users/session.ex | jasonboukheir/firezone | 79d610b94f67ae25c8ca26f391c0edf288f6aaa5 | [
"Apache-2.0"
] | 64 | 2020-05-22T00:31:00.000Z | 2021-06-28T15:21:33.000Z | apps/fz_http/lib/fz_http/users/session.ex | jasonboukheir/firezone | 79d610b94f67ae25c8ca26f391c0edf288f6aaa5 | [
"Apache-2.0"
] | 2 | 2020-05-22T00:27:52.000Z | 2021-03-14T19:37:27.000Z | defmodule FzHttp.Users.Session do
@moduledoc """
Represents a Session
"""
use Ecto.Schema
import Ecto.Changeset
alias FzHttp.{Users, Users.User}
schema "users" do
field :email, :string
field :password, :string, virtual: true
field :last_signed_in_at, :utc_datetime_usec
end
def create_ch... | 25.22449 | 74 | 0.686084 |
284b3e99dd600fc660631350cba747ea2fd9472d | 7,575 | ex | Elixir | kousa/lib/beef/users.ex | xkral-tr/dogehouse | b03bd912a8efbdd7078e0e488eab61c35dcc544f | [
"MIT"
] | 1 | 2021-03-07T10:17:11.000Z | 2021-03-07T10:17:11.000Z | kousa/lib/beef/users.ex | DHRUV-CODER/dogehouse | bb5b60788e8a491a539824e090e73786e5b4da31 | [
"MIT"
] | null | null | null | kousa/lib/beef/users.ex | DHRUV-CODER/dogehouse | bb5b60788e8a491a539824e090e73786e5b4da31 | [
"MIT"
] | null | null | null | defmodule Beef.Users do
@moduledoc """
Context module for Users.
Contains database access and mutation functions for User.
"""
import Ecto.Query, warn: false
alias Beef.Repo
alias Beef.Rooms
alias Beef.Schemas.Room
alias Beef.Schemas.User
@fetch_limit 16
def edit_profile(user_id, data) do
%... | 22.544643 | 95 | 0.518548 |
284b4ccfb3f830586b19d78d0d55f9d8f854593f | 2,821 | ex | Elixir | clients/spanner/lib/google_api/spanner/v1/model/request_options.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/spanner/lib/google_api/spanner/v1/model/request_options.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/spanner/lib/google_api/spanner/v1/model/request_options.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... | 53.226415 | 686 | 0.749734 |
284b6d763febb227f16171b529f0f8705dc737f2 | 3,696 | ex | Elixir | clients/cloud_shell/lib/google_api/cloud_shell/v1/model/environment.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/cloud_shell/lib/google_api/cloud_shell/v1/model/environment.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/cloud_shell/lib/google_api/cloud_shell/v1/model/environment.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | 1 | 2020-11-10T16:58:27.000Z | 2020-11-10T16:58:27.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... | 52.8 | 397 | 0.729708 |
284b95fbde44f752f74a63a0e827f7f7224d68e3 | 3,986 | exs | Elixir | mix.exs | bhtabor/radiator | 39c137a18d36d6f418f9d1ffb7aa2c99011d66cf | [
"MIT"
] | null | null | null | mix.exs | bhtabor/radiator | 39c137a18d36d6f418f9d1ffb7aa2c99011d66cf | [
"MIT"
] | null | null | null | mix.exs | bhtabor/radiator | 39c137a18d36d6f418f9d1ffb7aa2c99011d66cf | [
"MIT"
] | null | null | null | defmodule Radiator.MixProject do
use Mix.Project
@version "0.3.0"
def project do
[
app: :radiator,
version: @version,
elixir: "~> 1.9",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
start_permanent: Mix.env() == :prod,
... | 28.471429 | 103 | 0.537381 |
284bb19121043c2a8fc79fe05253f14c0add4478 | 5,005 | exs | Elixir | 2021/day_2/day_2.exs | AmadorZcv/advent_of_code | 93ca7521c65f6a3bc0f90b753848898d988a3771 | [
"MIT"
] | null | null | null | 2021/day_2/day_2.exs | AmadorZcv/advent_of_code | 93ca7521c65f6a3bc0f90b753848898d988a3771 | [
"MIT"
] | null | null | null | 2021/day_2/day_2.exs | AmadorZcv/advent_of_code | 93ca7521c65f6a3bc0f90b753848898d988a3771 | [
"MIT"
] | null | null | null | # --- Day 2: Dive! ---
# Now, you need to figure out how to pilot this thing.
# It seems like the submarine can take a series of commands like forward 1, down 2, or up 3:
# forward X increases the horizontal position by X units.
# down X increases the depth by X units.
# up X decreases the depth by X uni... | 40.362903 | 227 | 0.701299 |
284bfa84909b1f5baa9ebe71566d30325a53ffa0 | 579 | exs | Elixir | integration_test/cases/element/hover_test.exs | bobwaycott/wallaby | b25e6937f007f6e56be1b7b6a62591db5ac5a240 | [
"MIT"
] | 926 | 2016-03-28T17:01:54.000Z | 2019-11-05T11:59:58.000Z | integration_test/cases/element/hover_test.exs | marcandre/wallaby | d351c46f1a272bbcf8333c8327d154be3bd12c5c | [
"MIT"
] | 377 | 2016-03-17T00:35:56.000Z | 2019-11-03T07:15:24.000Z | integration_test/cases/element/hover_test.exs | marcandre/wallaby | d351c46f1a272bbcf8333c8327d154be3bd12c5c | [
"MIT"
] | 144 | 2016-03-29T15:28:28.000Z | 2019-10-31T00:48:42.000Z | defmodule Wallaby.Integration.Element.HoverTest do
use Wallaby.Integration.SessionCase, async: true
setup %{session: session} do
{:ok, page: visit(session, "move_mouse.html")}
end
describe "hover/2" do
test "hovers over the specified element", %{page: page} do
page
|> find(Query.text("B", ... | 25.173913 | 62 | 0.604491 |
284bfac1f7835db49cd96baf8540e023b9280497 | 4,602 | ex | Elixir | debian/init.d.ex | MacroFab/gerber-to-svg | 213253e0eb0dfd44c224953593203766e0c46ccb | [
"MIT"
] | 5 | 2016-04-20T11:12:56.000Z | 2018-01-15T09:50:45.000Z | debian/init.d.ex | MacroFab/gerber-to-svg | 213253e0eb0dfd44c224953593203766e0c46ccb | [
"MIT"
] | null | null | null | debian/init.d.ex | MacroFab/gerber-to-svg | 213253e0eb0dfd44c224953593203766e0c46ccb | [
"MIT"
] | 1 | 2017-02-27T17:36:52.000Z | 2017-02-27T17:36:52.000Z | #!/bin/sh
### BEGIN INIT INFO
# Provides: gerber-to-svg
# Required-Start: $local_fs $network $remote_fs $syslog
# Required-Stop: $local_fs $network $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: <Enter a short description of the software>
# Description: ... | 27.556886 | 89 | 0.659496 |
284c0e2413c9368f1619d9aa19063b931db57888 | 2,367 | ex | Elixir | lib/toml_config_provider.ex | tlux/toml_config_provider | 2438db46c072bd5e9b661770443e188f7dd807cc | [
"MIT"
] | 3 | 2020-09-02T16:31:50.000Z | 2020-11-20T19:09:17.000Z | lib/toml_config_provider.ex | tlux/toml_config | 2438db46c072bd5e9b661770443e188f7dd807cc | [
"MIT"
] | null | null | null | lib/toml_config_provider.ex | tlux/toml_config | 2438db46c072bd5e9b661770443e188f7dd807cc | [
"MIT"
] | null | null | null | defmodule TomlConfigProvider do
@moduledoc """
A config provider to read [TOML](https://github.com/toml-lang/toml)
configuration files that works with Elixir (1.9+) releases.
## Usage
Update the release configuration in your mix.exs file:
You can either give a fully qualified pathname to the config file.... | 23.67 | 79 | 0.617659 |
284c27d72412f8aedb6c9e85d9b76f6596bf7743 | 654 | ex | Elixir | elixir-in-action/todo/lib/todo/db_worker.ex | techgaun/dumpster | c2a5394afe759fb99041aea677e9b0bc4bf91aec | [
"Unlicense"
] | 1 | 2019-12-10T22:25:31.000Z | 2019-12-10T22:25:31.000Z | elixir-in-action/todo/lib/todo/db_worker.ex | techgaun/dumpster | c2a5394afe759fb99041aea677e9b0bc4bf91aec | [
"Unlicense"
] | 3 | 2020-10-25T04:40:05.000Z | 2020-10-25T04:48:10.000Z | elixir-in-action/todo/lib/todo/db_worker.ex | techgaun/dumpster | c2a5394afe759fb99041aea677e9b0bc4bf91aec | [
"Unlicense"
] | null | null | null | defmodule Todo.DBWorker do
use GenServer
def start(db_folder) do
GenServer.start(__MODULE__, db_folder)
end
def init(db_folder) do
File.mkdir_p!(db_folder)
{:ok, db_folder}
end
def handle_call({:get, key}, _, db_folder) do
data = case File.read(filename(db_folder, key)) do
{:ok, con... | 21.8 | 58 | 0.651376 |
284c34dca25e16d4912ba379421d5a61dff7aeba | 194 | ex | Elixir | lib/ex_ibus.ex | konstantinzolotarev/ex_ibus | 2ba037772e7f52427f14d3bbea3eab1244fed511 | [
"MIT"
] | 3 | 2019-05-07T05:52:54.000Z | 2020-12-14T03:44:16.000Z | lib/ex_ibus.ex | konstantinzolotarev/ex_ibus | 2ba037772e7f52427f14d3bbea3eab1244fed511 | [
"MIT"
] | null | null | null | lib/ex_ibus.ex | konstantinzolotarev/ex_ibus | 2ba037772e7f52427f14d3bbea3eab1244fed511 | [
"MIT"
] | null | null | null | defmodule ExIbus do
@moduledoc """
Documentation for ExIbus.
"""
@doc """
Hello world.
## Examples
iex> ExIbus.hello
:world
"""
def hello do
:world
end
end
| 10.210526 | 27 | 0.561856 |
284c50eb26a5e31385e9093f215a327a45dbfc06 | 907 | ex | Elixir | lib/hui/query.ex | niccolox/hui | d0eecd0176d1bf3c9ff4075ab1c6048e3d1c25b3 | [
"Apache-2.0"
] | null | null | null | lib/hui/query.ex | niccolox/hui | d0eecd0176d1bf3c9ff4075ab1c6048e3d1c25b3 | [
"Apache-2.0"
] | null | null | null | lib/hui/query.ex | niccolox/hui | d0eecd0176d1bf3c9ff4075ab1c6048e3d1c25b3 | [
"Apache-2.0"
] | null | null | null | defmodule Hui.Query do
@moduledoc """
Hui.Query module provides underpinning HTTP-based request functions for Solr, including:
- `get/2`
"""
use HTTPoison.Base
alias Hui.URL
alias Hui.Encoder
@type solr_struct :: Query.Standard.t | Query.Common.t
@type solr_structs :: list(Query.Standard.t | Quer... | 29.258065 | 91 | 0.694598 |
284c7005d4eae4c2394dc6cf3befc79c867cd9ca | 892 | ex | Elixir | lib/logger_lager_backend.ex | qbisserie/logger_lager_backend | 75f2e363c702ae56317b41f37d1d2a83d56207fc | [
"MIT"
] | 11 | 2016-04-08T20:00:55.000Z | 2019-09-24T14:01:59.000Z | lib/logger_lager_backend.ex | qbisserie/logger_lager_backend | 75f2e363c702ae56317b41f37d1d2a83d56207fc | [
"MIT"
] | 7 | 2016-04-15T13:12:11.000Z | 2020-03-02T23:07:37.000Z | lib/logger_lager_backend.ex | qbisserie/logger_lager_backend | 75f2e363c702ae56317b41f37d1d2a83d56207fc | [
"MIT"
] | 9 | 2017-02-10T11:22:20.000Z | 2021-08-02T14:22:35.000Z | defmodule LoggerLagerBackend do
@behaviour :gen_event
@moduledoc """
A `lager` backend for `Logger`.
"""
@sink :lager_event
@truncation_size 4096
def init(__MODULE__) do
{:ok, nil}
end
def handle_call({:configure, _opts}, state) do
{:ok, :ok, state}
end
defp to_lager_level(:warn), do:... | 19.391304 | 106 | 0.663677 |
284c8102e62ef23b4c3cd907cdf3e61832870c3c | 347 | exs | Elixir | priv/repo/seeds.exs | wsmoak/my_app_808732 | f4f92dd5cb2ffa2d6854a6573ba092ef433ab85d | [
"MIT"
] | null | null | null | priv/repo/seeds.exs | wsmoak/my_app_808732 | f4f92dd5cb2ffa2d6854a6573ba092ef433ab85d | [
"MIT"
] | null | null | null | priv/repo/seeds.exs | wsmoak/my_app_808732 | f4f92dd5cb2ffa2d6854a6573ba092ef433ab85d | [
"MIT"
] | null | null | null | # Script for populating the database. You can run it as:
#
# mix run priv/repo/seeds.exs
#
# Inside the script, you can read and write to any of your
# repositories directly:
#
# MyApp_808732.Repo.insert!(%SomeModel{})
#
# We recommend using the bang functions (`insert!`, `update!`
# and so on) as they will fai... | 28.916667 | 61 | 0.706052 |
284c8a1120c8204001156030f3eb01efdcd2715e | 155 | ex | Elixir | lib/exirchatterd.ex | ExSemantica/exsemantica | c2d72513195f44b6b5f73c8cc07394de0a1fd273 | [
"Apache-2.0"
] | null | null | null | lib/exirchatterd.ex | ExSemantica/exsemantica | c2d72513195f44b6b5f73c8cc07394de0a1fd273 | [
"Apache-2.0"
] | 2 | 2020-07-21T20:53:13.000Z | 2020-07-21T20:54:15.000Z | lib/exirchatterd.ex | Chlorophytus/eactivitypub | 469346b4d5cd7ad2b575c245ac50fd71b00c4864 | [
"Apache-2.0"
] | null | null | null | defmodule Exirchatterd do
@moduledoc """
IRCd in Elixir.
Tightly coupled with ExSemantica authentication logic, but some bits are useful.
"""
end
| 19.375 | 82 | 0.741935 |
284c8cd018fd34f4c38e846175b2faae337ec1dc | 323 | ex | Elixir | lib/bot_command/bot_command_supervisor.ex | FarmBot-Labs/laughing-octo-telegram | 9d3d161362b17da82378c51a815f4c46e0a7a09d | [
"MIT"
] | 2 | 2016-09-18T03:06:37.000Z | 2016-12-26T23:55:40.000Z | lib/bot_command/bot_command_supervisor.ex | FarmBot-Labs/laughing-octo-telegram | 9d3d161362b17da82378c51a815f4c46e0a7a09d | [
"MIT"
] | 3 | 2016-09-30T08:38:15.000Z | 2016-10-01T19:26:10.000Z | lib/bot_command/bot_command_supervisor.ex | FarmBot-Labs/laughing-octo-telegram | 9d3d161362b17da82378c51a815f4c46e0a7a09d | [
"MIT"
] | 5 | 2016-09-30T17:13:42.000Z | 2021-01-06T17:58:15.000Z | defmodule BotCommandSupervisor do
@moduledoc """
Supervises Bot Commands
"""
def start_link(_) do
import Supervisor.Spec
children = [
worker(BotCommandHandler, [[]])
]
Supervisor.start_link(children, strategy: :one_for_one, name: __MODULE__)
end
def init(_) do
{:ok, %{}}
end
e... | 19 | 77 | 0.650155 |
284cadae4a93d2288a60ae195ddf475f9c996384 | 2,224 | ex | Elixir | clients/firebase_dynamic_links/lib/google_api/firebase_dynamic_links/v1/model/get_ios_reopen_attribution_request.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/firebase_dynamic_links/lib/google_api/firebase_dynamic_links/v1/model/get_ios_reopen_attribution_request.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/firebase_dynamic_links/lib/google_api/firebase_dynamic_links/v1/model/get_ios_reopen_attribution_request.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... | 39.714286 | 341 | 0.738759 |
284cb5110ca4ab2f1b4c320bed47371b1dbec088 | 584 | ex | Elixir | lib/events_tools/tags/tag.ex | Apps-Team/conferencetools | ce2e16a3e4a521dc4682e736a209e6dd380c050d | [
"Apache-2.0"
] | null | null | null | lib/events_tools/tags/tag.ex | Apps-Team/conferencetools | ce2e16a3e4a521dc4682e736a209e6dd380c050d | [
"Apache-2.0"
] | 6 | 2017-10-05T20:16:34.000Z | 2017-10-05T20:36:11.000Z | lib/events_tools/tags/tag.ex | apps-team/events-tools | ce2e16a3e4a521dc4682e736a209e6dd380c050d | [
"Apache-2.0"
] | null | null | null | defmodule EventsTools.Tags.Tag do
use Ecto.Schema
import Ecto.Changeset
alias EventsTools.Tags.Tag
schema "tags" do
field :name, :string
#many_to_many :post, EventsTools.Posts.Posts, join_through: "posts_tags", on_delete: :delete_all, on_replace: :delete
#many_to_many :presentation, EventsTools.Pr... | 26.545455 | 152 | 0.717466 |
284cc16344ed779fae6b42f7b175da29764cfc76 | 5,766 | exs | Elixir | test/sparql/processor/group_graph_pattern_test.exs | pukkamustard/sparql-ex | 4f8907ddbd15215c9b6c40edac19362c92e34d91 | [
"MIT"
] | 23 | 2018-09-25T21:09:35.000Z | 2020-05-14T16:28:22.000Z | test/sparql/processor/group_graph_pattern_test.exs | pukkamustard/sparql-ex | 4f8907ddbd15215c9b6c40edac19362c92e34d91 | [
"MIT"
] | 2 | 2018-06-01T20:47:48.000Z | 2019-03-05T23:20:34.000Z | test/sparql/processor/group_graph_pattern_test.exs | pukkamustard/sparql-ex | 4f8907ddbd15215c9b6c40edac19362c92e34d91 | [
"MIT"
] | 2 | 2019-12-13T19:20:54.000Z | 2019-12-20T08:23:21.000Z | defmodule SPARQL.Processor.GroupGraphPatternTest do
use SPARQL.Test.Case
import SPARQL.Processor, only: [query: 2]
@example_graph Graph.new([
{EX.s1, EX.p1, EX.o1},
{EX.s1, EX.p2, EX.o2},
{EX.s3, EX.p3, EX.o2}
])
test "two groups with connected triple patterns with a match" do
assert query(... | 30.347368 | 86 | 0.319112 |
284cce7e8f4a6ecef56af5945952b511f1273676 | 2,517 | ex | Elixir | lib/ring_central/http_client/http_client.ex | ringcentral-elixir/ringcentral_elixir | 51c5bec661cc469f3fa44933223bfd0e8a0d63d8 | [
"MIT"
] | 4 | 2019-03-12T15:22:16.000Z | 2020-01-19T03:51:52.000Z | lib/ring_central/http_client/http_client.ex | linjunpop/ringcentral_elixir | dd7b758778a29f590a27fd7798c449a38a231ccf | [
"MIT"
] | null | null | null | lib/ring_central/http_client/http_client.ex | linjunpop/ringcentral_elixir | dd7b758778a29f590a27fd7798c449a38a231ccf | [
"MIT"
] | null | null | null | defmodule RingCentral.HTTPClient do
@moduledoc """
HTTPClient behaviour for RingCentral
## Build your own HTTP client:
```elixir
defmodule MyApp.AwesomeHTTPClient do
@behaviour RingCentral.HTTPClient
@impl true
def request(method, url, body, headers \\ []) do
if success
{:ok,
... | 22.881818 | 81 | 0.583234 |
284ced56a6409bbc2d743648343c0e9e46231e0c | 826 | ex | Elixir | lib/voomex_web/router.ex | caktus/voomex | d9df2ef20498f0eb01e69da834bb41459784357c | [
"BSD-2-Clause"
] | null | null | null | lib/voomex_web/router.ex | caktus/voomex | d9df2ef20498f0eb01e69da834bb41459784357c | [
"BSD-2-Clause"
] | 18 | 2019-11-08T19:42:18.000Z | 2020-06-09T17:00:16.000Z | lib/voomex_web/router.ex | caktus/voomex | d9df2ef20498f0eb01e69da834bb41459784357c | [
"BSD-2-Clause"
] | null | null | null | defmodule VoomexWeb.Router do
use VoomexWeb, :router
import Phoenix.LiveDashboard.Router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
end
pipeline :api do
plug :accepts, ["json"]
end
... | 21.179487 | 66 | 0.676755 |
284d010b50bcc9fc8502eaf74d164fef00a95588 | 1,079 | exs | Elixir | apps/legion/test/identity/telephony/phone_number/prioritization_trait_test.exs | i386-64/legion | 41ae99af9be962d7fb38726ddf4bb0456edb5ca4 | [
"Apache-2.0"
] | 1 | 2021-01-04T11:06:12.000Z | 2021-01-04T11:06:12.000Z | apps/legion/test/identity/telephony/phone_number/prioritization_trait_test.exs | i386-64/legion | 41ae99af9be962d7fb38726ddf4bb0456edb5ca4 | [
"Apache-2.0"
] | 3 | 2021-01-30T06:40:37.000Z | 2021-01-30T06:41:08.000Z | apps/legion/test/identity/telephony/phone_number/prioritization_trait_test.exs | i386-64/legion | 41ae99af9be962d7fb38726ddf4bb0456edb5ca4 | [
"Apache-2.0"
] | null | null | null | defmodule Legion.Identity.Telephony.PhoneNumber.PrioritizationTraitTest do
@moduledoc false
use Legion.DataCase
alias Legion.Identity.Telephony.PhoneNumber.PrioritizationTrait
@valid_params %{phone_number_id: 1, authority_id: 1}
test "changeset with valid attrs" do
changeset =
PrioritizationTrait... | 22.957447 | 74 | 0.71177 |
284d0aa42d22f2b87873b8b9737452170dd79f6b | 222 | ex | Elixir | lib/metrics/setup.ex | oestrich/grapevine-legacy | 9d84f8e2d65dda5982686381ffa94a940142e1da | [
"MIT"
] | null | null | null | lib/metrics/setup.ex | oestrich/grapevine-legacy | 9d84f8e2d65dda5982686381ffa94a940142e1da | [
"MIT"
] | null | null | null | lib/metrics/setup.ex | oestrich/grapevine-legacy | 9d84f8e2d65dda5982686381ffa94a940142e1da | [
"MIT"
] | null | null | null | defmodule Metrics.Setup do
@moduledoc """
Common area to set up metrics
"""
def setup() do
Metrics.AccountInstrumenter.setup()
Metrics.OAuthInstrumenter.setup()
Metrics.PlugExporter.setup()
end
end
| 17.076923 | 39 | 0.702703 |
284d0fd5d1a024f6f5b66d79ee5fb0479c1731e2 | 3,144 | ex | Elixir | apps/tai/lib/tai/venue_adapters/binance/stream_supervisor.ex | ihorkatkov/tai | 09f9f15d2c385efe762ae138a8570f1e3fd41f26 | [
"MIT"
] | 1 | 2019-12-19T05:16:26.000Z | 2019-12-19T05:16:26.000Z | apps/tai/lib/tai/venue_adapters/binance/stream_supervisor.ex | ihorkatkov/tai | 09f9f15d2c385efe762ae138a8570f1e3fd41f26 | [
"MIT"
] | null | null | null | apps/tai/lib/tai/venue_adapters/binance/stream_supervisor.ex | ihorkatkov/tai | 09f9f15d2c385efe762ae138a8570f1e3fd41f26 | [
"MIT"
] | null | null | null | defmodule Tai.VenueAdapters.Binance.StreamSupervisor do
use Supervisor
alias Tai.VenueAdapters.Binance.Stream.{
Connection,
ProcessOptionalChannels,
ProcessOrderBook,
RouteOrderBooks
}
alias Tai.Markets.{OrderBook, ProcessQuote}
@type adapter :: Tai.Venues.Adapter.t()
@type venue_id :: Ta... | 27.33913 | 91 | 0.665712 |
284d4d28fdf7ed345776dbce63d0fe298b8cc6e7 | 2,745 | exs | Elixir | test/suite/draft4/optional/bignum_test.exs | depressed-pho/xema | 56de4a5d3b3f37827c70f6052f895c59feb0bb51 | [
"MIT"
] | null | null | null | test/suite/draft4/optional/bignum_test.exs | depressed-pho/xema | 56de4a5d3b3f37827c70f6052f895c59feb0bb51 | [
"MIT"
] | null | null | null | test/suite/draft4/optional/bignum_test.exs | depressed-pho/xema | 56de4a5d3b3f37827c70f6052f895c59feb0bb51 | [
"MIT"
] | null | null | null | defmodule Draft4.Optional.BignumTest do
use ExUnit.Case, async: true
import Xema, only: [valid?: 2]
describe "integer (1)" do
setup do
%{schema: Xema.new(:integer)}
end
test "a bignum is an integer", %{schema: schema} do
data = 12_345_678_910_111_213_141_516_171_819_202_122_232_425_262_... | 24.078947 | 84 | 0.669581 |
284d62a3d44db05ebd8e2a653fae8d45f81fdd97 | 3,258 | ex | Elixir | lib/livebook/content_loader.ex | danhuynhdev/livebook | d20d4f6bf123d58e4666c064027b55e3b300702f | [
"Apache-2.0"
] | null | null | null | lib/livebook/content_loader.ex | danhuynhdev/livebook | d20d4f6bf123d58e4666c064027b55e3b300702f | [
"Apache-2.0"
] | null | null | null | lib/livebook/content_loader.ex | danhuynhdev/livebook | d20d4f6bf123d58e4666c064027b55e3b300702f | [
"Apache-2.0"
] | null | null | null | defmodule Livebook.ContentLoader do
@moduledoc false
@doc """
Rewrite known URLs, so that they point to plain text file rather than HTML.
Currently the rewerites handle:
* GitHub files
* Gist files
"""
@spec rewrite_url(String.t()) :: String.t()
def rewrite_url(url) do
url
|> URI.parse(... | 24.870229 | 102 | 0.565378 |
284d640dd3c7fef7d07a1f3cdff45e01345f8502 | 59 | ex | Elixir | testData/org/elixir_lang/parser_definition/numeric_dot_operation_parsing_test_case/Alias.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/numeric_dot_operation_parsing_test_case/Alias.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/numeric_dot_operation_parsing_test_case/Alias.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 145 | 2015-01-15T11:37:16.000Z | 2021-12-22T05:51:02.000Z | ?c.Alias
0b0.Alias
1.2e-3.Alias
1.Alias
0x0.Alias
0o0.Alias | 9.833333 | 12 | 0.762712 |
284d675122b32c99fb93eb51367d7c44e231f791 | 2,897 | ex | Elixir | apps/artemis/lib/artemis/drivers/ibm_cloudant/query/create_query_indexes.ex | artemis-platform/artemis_dashboard | 5ab3f5ac4c5255478bbebf76f0e43b44992e3cab | [
"MIT"
] | 9 | 2019-08-19T19:56:34.000Z | 2022-03-22T17:56:38.000Z | apps/artemis/lib/artemis/drivers/ibm_cloudant/query/create_query_indexes.ex | chrislaskey/atlas_dashboard | 9009ef5aac8fefba126fa7d3e3b82d1b610ee6fe | [
"MIT"
] | 7 | 2019-07-12T21:41:01.000Z | 2020-08-17T21:29:22.000Z | apps/artemis/lib/artemis/drivers/ibm_cloudant/query/create_query_indexes.ex | chrislaskey/atlas_dashboard | 9009ef5aac8fefba126fa7d3e3b82d1b610ee6fe | [
"MIT"
] | 2 | 2019-04-10T13:34:15.000Z | 2019-05-17T02:42:24.000Z | defmodule Artemis.Drivers.IBMCloudant.CreateQueryIndexes do
alias Artemis.Drivers.IBMCloudant
@moduledoc """
Creates query indexes
## Warning!
Indexes are expensive to create. Avoid cascading updates by only
adding new indexes as needed.
"""
def call(schema) do
database_config = IBMCloudant.Conf... | 30.819149 | 101 | 0.725923 |
284d7e6cfce5cc0412cdd1b27dfd204adaa4ce29 | 1,237 | ex | Elixir | lib/okr_app_web/controllers/api/objective_assessment_controller.ex | sb8244/okr_app_pub | 933872107bd13390a0a5ea119d7997d4cb5ea7db | [
"MIT"
] | 12 | 2019-05-10T21:48:06.000Z | 2021-11-07T14:04:30.000Z | lib/okr_app_web/controllers/api/objective_assessment_controller.ex | sb8244/okr_app_pub | 933872107bd13390a0a5ea119d7997d4cb5ea7db | [
"MIT"
] | 2 | 2019-05-14T19:07:10.000Z | 2019-05-20T21:06:27.000Z | lib/okr_app_web/controllers/api/objective_assessment_controller.ex | sb8244/okr_app_pub | 933872107bd13390a0a5ea119d7997d4cb5ea7db | [
"MIT"
] | 3 | 2019-05-19T18:24:20.000Z | 2019-10-31T20:29:12.000Z | defmodule OkrAppWeb.Api.ObjectiveAssessmentController do
use OkrAppWeb, :controller
alias OkrAppWeb.Serializer
alias OkrApp.{Objectives}
def create(conn, params) do
with {:create, {:ok, assessment}} <- {:create, Objectives.create_objective_assessment(params)} do
conn
|> put_status(201)
|... | 28.113636 | 113 | 0.641876 |
284da950d6bfe7e0e1420ada0604a22a2b543624 | 49,781 | ex | Elixir | lib/ecto/adapters/tds/connection.ex | alco/ecto_sql | 62967b2dfef66f8efb9c3bd70b2bbb0f483a3848 | [
"Apache-2.0"
] | null | null | null | lib/ecto/adapters/tds/connection.ex | alco/ecto_sql | 62967b2dfef66f8efb9c3bd70b2bbb0f483a3848 | [
"Apache-2.0"
] | null | null | null | lib/ecto/adapters/tds/connection.ex | alco/ecto_sql | 62967b2dfef66f8efb9c3bd70b2bbb0f483a3848 | [
"Apache-2.0"
] | null | null | null | if Code.ensure_loaded?(Tds) do
defmodule Ecto.Adapters.Tds.Connection do
@moduledoc false
require Logger
alias Tds.Query
alias Ecto.Query.Tagged
require Ecto.Schema
@behaviour Ecto.Adapters.SQL.Connection
@impl true
def child_spec(opts) do
opts
|> Keyword.put_new(:use_eli... | 29.826842 | 104 | 0.561379 |
284da9a124682d3242622ae67dd921ee2b640ea1 | 3,761 | ex | Elixir | clients/dfa_reporting/lib/google_api/dfa_reporting/v34/api/dimension_values.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/dfa_reporting/lib/google_api/dfa_reporting/v34/api/dimension_values.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/dfa_reporting/lib/google_api/dfa_reporting/v34/api/dimension_values.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 41.788889 | 187 | 0.660197 |
284e6e301b9bc90388dc56828379450e97b5e445 | 1,064 | exs | Elixir | config/config.exs | robinsonj/ptdb | a804b3eabd1026342089be6ed951642ee0a74dcb | [
"MIT"
] | null | null | null | config/config.exs | robinsonj/ptdb | a804b3eabd1026342089be6ed951642ee0a74dcb | [
"MIT"
] | null | null | null | config/config.exs | robinsonj/ptdb | a804b3eabd1026342089be6ed951642ee0a74dcb | [
"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
# General application configuration
config :poke_team_db,
ecto_repos: [PokeTeamDb.R... | 33.25 | 86 | 0.767857 |
284e86af6a8ff26a2d1cb74864c442093b48224e | 10,606 | exs | Elixir | lib/mix/test/mix/tasks/deps.git_test.exs | bellthoven/elixir | 14610cb09b8d093d9513f97b7f4da82bdcbdd46d | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/tasks/deps.git_test.exs | bellthoven/elixir | 14610cb09b8d093d9513f97b7f4da82bdcbdd46d | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/tasks/deps.git_test.exs | bellthoven/elixir | 14610cb09b8d093d9513f97b7f4da82bdcbdd46d | [
"Apache-2.0"
] | null | null | null | Code.require_file "../../test_helper.exs", __DIR__
defmodule Mix.Tasks.DepsGitTest do
use MixTest.Case
defmodule DepsOnGitApp do
def project do
[ app: :deps_on_git_app,
version: "0.1.0",
deps: [
{:deps_on_git_repo, "0.2.0", git: fixture_path("deps_on_git_repo")}
] ]
... | 30.921283 | 138 | 0.631058 |
284ed8413affb6dae174846c79004ce66b59e771 | 1,713 | ex | Elixir | lib/codes/codes_r20.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_r20.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_r20.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | defmodule IcdCode.ICDCode.Codes_R20 do
alias IcdCode.ICDCode
def _R200 do
%ICDCode{full_code: "R200",
category_code: "R20",
short_code: "0",
full_name: "Anesthesia of skin",
short_name: "Anesthesia of skin",
category_name: "Anesthesia of skin"
}
end
d... | 28.081967 | 69 | 0.589609 |
284eda3afcd3ef5035b5adedefbd34550b927f99 | 1,796 | ex | Elixir | test/support/model_case.ex | openregister/local-authority-demo | 92260b530a98d7b1e34fa8b4e1a0e4f4e4e28dc3 | [
"MIT"
] | null | null | null | test/support/model_case.ex | openregister/local-authority-demo | 92260b530a98d7b1e34fa8b4e1a0e4f4e4e28dc3 | [
"MIT"
] | null | null | null | test/support/model_case.ex | openregister/local-authority-demo | 92260b530a98d7b1e34fa8b4e1a0e4f4e4e28dc3 | [
"MIT"
] | 1 | 2021-04-11T08:29:46.000Z | 2021-04-11T08:29:46.000Z | defmodule DataDemo.ModelCase do
@moduledoc """
This module defines the test case to be used by
model tests.
You may define functions here to be used as helpers in
your model tests. See `errors_on/2`'s definition as reference.
Finally, if the test case interacts with the database,
it cannot be async. For... | 27.212121 | 84 | 0.685969 |
284f0462b4bcbf93e395c1f65825154213a7c9be | 1,818 | ex | Elixir | clients/dataflow/lib/google_api/dataflow/v1b3/model/reported_parallelism.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/dataflow/lib/google_api/dataflow/v1b3/model/reported_parallelism.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/dataflow/lib/google_api/dataflow/v1b3/model/reported_parallelism.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... | 37.875 | 374 | 0.759626 |
284f0e8a93a1f5a250b7d33d67bc8a0faa743ebc | 813 | exs | Elixir | priv/template/mix.exs | bitgamma/phoenix | c06fc0fa03a95f2c863c49711da58fedfa56c374 | [
"MIT"
] | null | null | null | priv/template/mix.exs | bitgamma/phoenix | c06fc0fa03a95f2c863c49711da58fedfa56c374 | [
"MIT"
] | null | null | null | priv/template/mix.exs | bitgamma/phoenix | c06fc0fa03a95f2c863c49711da58fedfa56c374 | [
"MIT"
] | null | null | null | defmodule <%= application_module %>.Mixfile do
use Mix.Project
def project do
[app: :<%= application_name %>,
version: "0.0.1",<%= if in_umbrella do %>
deps_path: "../../deps",
lockfile: "../../mix.lock",<% end %>
elixir: "~> 1.0",
elixirc_paths: ["lib", "web"],
compilers: [:phoen... | 25.40625 | 52 | 0.581796 |
284f46aa2464d1510af1b7fba93b38683c25076e | 2,168 | ex | Elixir | apps/testchain/lib/testchain/evm/health_checker.ex | makerdao/qa_backend_gateway | 38e9a3f3f4b66212f1ee9d38b3b698a2a1f9a809 | [
"Apache-2.0"
] | 1 | 2020-10-23T19:25:27.000Z | 2020-10-23T19:25:27.000Z | apps/testchain/lib/testchain/evm/health_checker.ex | makerdao/qa_backend_gateway | 38e9a3f3f4b66212f1ee9d38b3b698a2a1f9a809 | [
"Apache-2.0"
] | 5 | 2019-01-11T11:48:08.000Z | 2019-01-16T17:29:23.000Z | apps/testchain/lib/testchain/evm/health_checker.ex | makerdao/qa_backend_gateway | 38e9a3f3f4b66212f1ee9d38b3b698a2a1f9a809 | [
"Apache-2.0"
] | 7 | 2019-10-09T05:49:52.000Z | 2022-03-23T16:48:45.000Z | defmodule Staxx.Testchain.EVM.HealthChecker do
@moduledoc """
Process that will check health of EVM periodically.
GenServer will have some timeout for health checks but for some special cases
like take/revert snapshot it might be paused.
"""
use GenServer
require Logger
alias Staxx.Testchain
@typed... | 27.443038 | 91 | 0.640683 |
284f88dee5cc06c730f46ab75753eb659b3572e1 | 22,051 | exs | Elixir | lib/elixir/test/elixir/code_formatter/calls_test.exs | chulkilee/elixir | 699231dcad52916a76f38856cbd7cf7c7bdadc51 | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/code_formatter/calls_test.exs | chulkilee/elixir | 699231dcad52916a76f38856cbd7cf7c7bdadc51 | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/code_formatter/calls_test.exs | chulkilee/elixir | 699231dcad52916a76f38856cbd7cf7c7bdadc51 | [
"Apache-2.0"
] | null | null | null | Code.require_file("../test_helper.exs", __DIR__)
defmodule Code.Formatter.CallsTest do
use ExUnit.Case, async: true
import CodeFormatterHelpers
@short_length [line_length: 10]
@medium_length [line_length: 20]
describe "next break fits" do
test "does not apply to function calls" do
bad = "foo(ver... | 19.830036 | 80 | 0.438574 |
284f8ec12e73ec32c8c7df5c4f5b1e778797b09b | 647 | exs | Elixir | elixir/bob/bob.exs | ErikSchierboom/exercism | 3da5d41ad3811c5963a0da62f862602ba01a9f55 | [
"Apache-2.0"
] | 23 | 2017-02-22T16:57:12.000Z | 2022-02-11T20:32:36.000Z | elixir/bob/bob.exs | ErikSchierboom/exercism | 3da5d41ad3811c5963a0da62f862602ba01a9f55 | [
"Apache-2.0"
] | 36 | 2020-07-21T09:34:05.000Z | 2020-07-21T10:29:20.000Z | elixir/bob/bob.exs | ErikSchierboom/exercism | 3da5d41ad3811c5963a0da62f862602ba01a9f55 | [
"Apache-2.0"
] | 14 | 2017-02-22T16:58:23.000Z | 2021-10-06T00:21:57.000Z | defmodule Bob do
def hey(input) do
cond do
silence?(input) ->
"Fine. Be that way!"
question?(input) && shouting?(input) ->
"Calm down, I know what I'm doing!"
question?(input) ->
"Sure."
shouting?(input) ->
"Whoa, chill out!"
true ->
"Whate... | 23.962963 | 81 | 0.576507 |
284f91972c4c38b6a476bdbb6668286d95163304 | 374 | ex | Elixir | lib/dnsapp_web/views/error_view.ex | tashavanes/dnsapp | 92d1069e3ef06df6a990047297d87e91a782a75b | [
"MIT"
] | null | null | null | lib/dnsapp_web/views/error_view.ex | tashavanes/dnsapp | 92d1069e3ef06df6a990047297d87e91a782a75b | [
"MIT"
] | null | null | null | lib/dnsapp_web/views/error_view.ex | tashavanes/dnsapp | 92d1069e3ef06df6a990047297d87e91a782a75b | [
"MIT"
] | null | null | null | defmodule DnsappWeb.ErrorView do
use DnsappWeb, :view
def render("404.html", _assigns) do
"Page not found"
end
def render("500.html", _assigns) do
"Internal server error"
end
# In case no render clause matches or no
# template is found, let's render it as 500
def template_not_found(_template,... | 20.777778 | 47 | 0.700535 |
284fe7821680db6f399f61331fa521033b69add7 | 1,637 | ex | Elixir | clients/datastore/lib/google_api/datastore/v1/model/begin_transaction_request.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/datastore/lib/google_api/datastore/v1/model/begin_transaction_request.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/datastore/lib/google_api/datastore/v1/model/begin_transaction_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... | 34.104167 | 96 | 0.764814 |
284ff7f6437439ba59790ae3cf3f2e1631ea4392 | 2,799 | ex | Elixir | lib/task_bunny/errors.ex | lfmalves/task_bunny | 31644ae87f5532f1a75bfebb76e5f2adf6325c5b | [
"MIT"
] | null | null | null | lib/task_bunny/errors.ex | lfmalves/task_bunny | 31644ae87f5532f1a75bfebb76e5f2adf6325c5b | [
"MIT"
] | 1 | 2020-04-24T22:39:53.000Z | 2020-04-24T22:43:32.000Z | lib/task_bunny/errors.ex | lfmalves/task_bunny | 31644ae87f5532f1a75bfebb76e5f2adf6325c5b | [
"MIT"
] | 1 | 2021-02-24T19:50:27.000Z | 2021-02-24T19:50:27.000Z | defmodule TaskBunny.ConfigError do
@moduledoc """
Raised when an error was found on TaskBunny config
"""
defexception [:message]
def exception(message: message) do
title = "Failed to load TaskBunny config"
message = "#{title}\n#{message}"
%__MODULE__{message: message}
end
end
defmodule TaskBun... | 24.991071 | 80 | 0.629868 |
284ffadad0125bf534108da112cd046bf42ab96b | 1,972 | exs | Elixir | config/prod.exs | saketmehta/elixir-poker | 1cdad03fddc86bb7c4004f0741c6727c39f71dbc | [
"MIT"
] | null | null | null | config/prod.exs | saketmehta/elixir-poker | 1cdad03fddc86bb7c4004f0741c6727c39f71dbc | [
"MIT"
] | null | null | null | config/prod.exs | saketmehta/elixir-poker | 1cdad03fddc86bb7c4004f0741c6727c39f71dbc | [
"MIT"
] | null | null | null | use Mix.Config
# For production, we configure the host to read the PORT
# from the system environment. Therefore, you will need
# to set PORT=80 before running your server.
#
# You should also configure the url host to something
# meaningful, we use this information when generating URLs.
#
# Finally, we also include t... | 31.806452 | 67 | 0.710953 |
28507c0affc42853f298ba54c76662f889aa0c06 | 1,095 | ex | Elixir | lib/hex/api/package.ex | hrzndhrn/hex | f74e2ed979e74130bdc4a6974660aa986333f33f | [
"Apache-2.0"
] | 824 | 2015-01-05T09:12:36.000Z | 2022-03-28T12:02:29.000Z | lib/hex/api/package.ex | hrzndhrn/hex | f74e2ed979e74130bdc4a6974660aa986333f33f | [
"Apache-2.0"
] | 737 | 2015-01-01T05:48:46.000Z | 2022-03-29T12:56:12.000Z | lib/hex/api/package.ex | hrzndhrn/hex | f74e2ed979e74130bdc4a6974660aa986333f33f | [
"Apache-2.0"
] | 220 | 2015-03-14T17:55:11.000Z | 2022-03-23T22:17:07.000Z | defmodule Hex.API.Package do
@moduledoc false
alias Hex.API
def get(repo, name, auth \\ []) do
path = "packages/#{URI.encode(name)}"
API.request(:get, repo, path, auth)
end
def search(repo, search, auth \\ []) do
path = "packages?search=#{URI.encode(search)}&sort=downloads"
API.request(:get... | 26.707317 | 77 | 0.643836 |
28507c3c5da6719533d8a0a765e5166208b3b9e4 | 1,077 | ex | Elixir | lib/console/services/builds/changelogs.ex | pluralsh/console | 38a446ce1bc2f7bc3e904fcacb102d3d57835ada | [
"Apache-2.0"
] | 6 | 2021-11-17T21:10:49.000Z | 2022-02-16T19:45:28.000Z | lib/console/services/builds/changelogs.ex | pluralsh/console | 38a446ce1bc2f7bc3e904fcacb102d3d57835ada | [
"Apache-2.0"
] | 18 | 2021-11-25T04:31:06.000Z | 2022-03-27T04:54:00.000Z | lib/console/services/builds/changelogs.ex | pluralsh/console | 38a446ce1bc2f7bc3e904fcacb102d3d57835ada | [
"Apache-2.0"
] | null | null | null | defmodule Console.Services.Changelogs do
use Console.Services.Base
alias Console.{Repo, Schema.Changelog}
def add_changelogs(transaction) do
diff_folder = Console.workspace() |> Path.join("diffs")
with {:ok, [_ | _] = subfolders} <- File.ls(diff_folder) do
subfolders
|> Enum.map(& {&1, Path.... | 31.676471 | 89 | 0.611885 |
285095f16a4398880413422b5fa2aba47f8dec2a | 547 | ex | Elixir | lib/farmbot/celery_script/ast/node/remove_farmware.ex | pdgonzalez872/farmbot_os | a444248f05ee8f4fe57f6a4865b942131960f76c | [
"MIT"
] | 2 | 2018-08-01T23:07:52.000Z | 2018-10-17T12:49:21.000Z | lib/farmbot/celery_script/ast/node/remove_farmware.ex | pdgonzalez872/farmbot_os | a444248f05ee8f4fe57f6a4865b942131960f76c | [
"MIT"
] | null | null | null | lib/farmbot/celery_script/ast/node/remove_farmware.ex | pdgonzalez872/farmbot_os | a444248f05ee8f4fe57f6a4865b942131960f76c | [
"MIT"
] | 1 | 2017-07-22T21:51:14.000Z | 2017-07-22T21:51:14.000Z | defmodule Farmbot.CeleryScript.AST.Node.RemoveFarmware do
@moduledoc false
use Farmbot.CeleryScript.AST.Node
allow_args [:package]
def execute(%{package: {:farmware, name}}, _, env) do
env = mutate_env(env)
case Farmbot.Farmware.lookup(name) do
{:ok, fw} -> do_uninstall(fw, env)
{:error, _}... | 26.047619 | 57 | 0.639854 |
2850ab42badd02f544fc8455bc35e43c456d60c7 | 2,655 | ex | Elixir | clients/games/lib/google_api/games/v1/model/achievement_update_response.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/games/lib/google_api/games/v1/model/achievement_update_response.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/games/lib/google_api/games/v1/model/achievement_update_response.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | 1 | 2020-11-10T16:58:27.000Z | 2020-11-10T16:58:27.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 42.142857 | 264 | 0.729944 |
2850c9989a990ab6aba97793e92463dd636e62cd | 1,796 | ex | Elixir | episode-025/test/support/model_case.ex | thaterikperson/elmseeds | 72b09358926287ab4ea79893196d1ba002f190b3 | [
"MIT"
] | 84 | 2016-07-02T05:21:36.000Z | 2021-02-12T22:45:45.000Z | episode-036/test/support/model_case.ex | thaterikperson/elmseeds | 72b09358926287ab4ea79893196d1ba002f190b3 | [
"MIT"
] | 3 | 2016-07-02T06:03:47.000Z | 2017-06-03T14:11:06.000Z | episode-014/elm_is_fun/test/support/model_case.ex | thaterikperson/elmseeds | 72b09358926287ab4ea79893196d1ba002f190b3 | [
"MIT"
] | 6 | 2017-02-16T19:33:49.000Z | 2019-04-05T19:27:17.000Z | defmodule ElmIsFun.ModelCase do
@moduledoc """
This module defines the test case to be used by
model tests.
You may define functions here to be used as helpers in
your model tests. See `errors_on/2`'s definition as reference.
Finally, if the test case interacts with the database,
it cannot be async. For... | 27.212121 | 84 | 0.685969 |
2850fcec0a4dca0af2bc2f57cb03a6ecc191385c | 1,291 | ex | Elixir | kousa/lib/broth/plugs/check_auth.ex | LeonardSSH/dogehouse | 584055ad407bc37fa35cdf36ebb271622e29d436 | [
"MIT"
] | 9 | 2021-03-17T03:56:18.000Z | 2021-09-24T22:45:14.000Z | kousa/lib/broth/plugs/check_auth.ex | ActuallyTomas/dogehouse | 8c3d2cd1d7e99e173f0658759467a391c4a90c4e | [
"MIT"
] | 12 | 2021-07-06T12:51:13.000Z | 2022-03-16T12:38:18.000Z | kousa/lib/broth/plugs/check_auth.ex | ActuallyTomas/dogehouse | 8c3d2cd1d7e99e173f0658759467a391c4a90c4e | [
"MIT"
] | 4 | 2021-07-15T20:33:50.000Z | 2022-03-27T12:46:47.000Z | defmodule Broth.Plugs.CheckAuth do
import Plug.Conn
def init(opts) do
opts
end
def call(conn = %{req_headers: req_headers}, opts) do
access_token = :proplists.get_value("x-access-token", req_headers, nil)
refresh_token = :proplists.get_value("x-refresh-token", req_headers, nil)
if access_toke... | 24.358491 | 95 | 0.628195 |
285111bf3bafc2828ee5dbe481d56d8a3bf0f6c9 | 1,974 | exs | Elixir | clients/document_ai/mix.exs | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/document_ai/mix.exs | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/document_ai/mix.exs | 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... | 29.462687 | 229 | 0.66768 |
2851334c793bb4ceb3ad873c99177882de6a6c1d | 71,539 | ex | Elixir | lib/elixir/lib/string.ex | jdanielnd/elixir | d81260ebe7941c8cb3270e1fa14e8a3f878cfce1 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/string.ex | jdanielnd/elixir | d81260ebe7941c8cb3270e1fa14e8a3f878cfce1 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/string.ex | jdanielnd/elixir | d81260ebe7941c8cb3270e1fa14e8a3f878cfce1 | [
"Apache-2.0"
] | null | null | null | import Kernel, except: [length: 1]
defmodule String do
@moduledoc ~S"""
Strings in Elixir are UTF-8 encoded binaries.
Strings in Elixir are a sequence of Unicode characters,
typically written between double quoted strings, such
as `"hello"` and `"héllò"`.
In case a string must have a double-quote in itse... | 28.076531 | 102 | 0.646654 |
2851d0b57693ac044f9a0263d21be84e1a6e649b | 189 | exs | Elixir | test/test_helper.exs | rzalamena/pxscratch | 19d3db64b52a6d034d818482c88421f697264b56 | [
"0BSD"
] | 1 | 2016-06-02T21:21:42.000Z | 2016-06-02T21:21:42.000Z | test/test_helper.exs | rzalamena/pxscratch | 19d3db64b52a6d034d818482c88421f697264b56 | [
"0BSD"
] | null | null | null | test/test_helper.exs | rzalamena/pxscratch | 19d3db64b52a6d034d818482c88421f697264b56 | [
"0BSD"
] | null | null | null | ExUnit.start
Mix.Task.run "ecto.create", ~w(-r Pxscratch.Repo --quiet)
Mix.Task.run "ecto.migrate", ~w(-r Pxscratch.Repo --quiet)
Ecto.Adapters.SQL.begin_test_transaction(Pxscratch.Repo)
| 27 | 58 | 0.751323 |
28520aace9686c748ed440969ad5954a4ad75d78 | 405 | exs | Elixir | niex/test/niex_web/views/error_view_test.exs | rellen/elixir_nx_demo | a0334e5f3b76f09421bf9c5bcb4c85bb3e929aad | [
"Apache-2.0"
] | 1 | 2021-04-10T01:02:29.000Z | 2021-04-10T01:02:29.000Z | test/niex_web/views/error_view_test.exs | team-alembic/elixir_nx_demo | a0334e5f3b76f09421bf9c5bcb4c85bb3e929aad | [
"Apache-2.0"
] | null | null | null | test/niex_web/views/error_view_test.exs | team-alembic/elixir_nx_demo | a0334e5f3b76f09421bf9c5bcb4c85bb3e929aad | [
"Apache-2.0"
] | 1 | 2021-03-24T23:04:57.000Z | 2021-03-24T23:04:57.000Z | defmodule NiexWeb.ErrorViewTest do
use NiexWeb.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(NiexWeb.ErrorView, "404.html", []) == "Not Found"
end
test "renders 500.html" do
assert rend... | 27 | 89 | 0.725926 |
28520e0742c25c18fcbc1285c4d9e3af10e95c93 | 3,214 | exs | Elixir | test/formatter_test.exs | tiagoefmoraes/exsamples | 45aaf6a29a45b05ac3f8b4c297cd72af16c82215 | [
"MIT"
] | null | null | null | test/formatter_test.exs | tiagoefmoraes/exsamples | 45aaf6a29a45b05ac3f8b4c297cd72af16c82215 | [
"MIT"
] | null | null | null | test/formatter_test.exs | tiagoefmoraes/exsamples | 45aaf6a29a45b05ac3f8b4c297cd72af16c82215 | [
"MIT"
] | null | null | null | defmodule Samples.FormatterPluginTest do
use ExUnit.Case
test "format all samples" do
code = """
samples do
:name | :country | :city
"Christian" | "United States" | "New York City"
"Peter" | "Austria" | "Vienna"
end
samples do
:name | :country | :city
... | 27.237288 | 95 | 0.457996 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.