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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
625af0612353f5b9e5cb4ce8d2215c8b26dd2fe5 | 301 | ex | Elixir | lib/oli/interop/custom_activities/attribute.ex | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | 1 | 2022-03-17T20:35:47.000Z | 2022-03-17T20:35:47.000Z | lib/oli/interop/custom_activities/attribute.ex | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | 9 | 2021-11-02T16:52:09.000Z | 2022-03-25T15:14:01.000Z | lib/oli/interop/custom_activities/attribute.ex | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | null | null | null | defmodule Oli.Interop.CustomActivities.Attribute do
import XmlBuilder
def setup(
%{
attribute_id: attribute_id,
value: value
}
) do
element(
:attribute,
%{
attribute_id: attribute_id,
value: value
}
)
end
end
| 15.05 | 51 | 0.538206 |
625b42fc7eb1a3c571fb74312dd5281905d428d6 | 260 | exs | Elixir | config/test.exs | joaohf/epad | ff3e37c3fc3b13363f5fb728c6d4a0a3d0ef3fce | [
"MIT"
] | 2 | 2020-09-07T19:45:28.000Z | 2021-05-04T05:31:41.000Z | config/test.exs | joaohf/epad | ff3e37c3fc3b13363f5fb728c6d4a0a3d0ef3fce | [
"MIT"
] | null | null | null | config/test.exs | joaohf/epad | ff3e37c3fc3b13363f5fb728c6d4a0a3d0ef3fce | [
"MIT"
] | null | null | null | use Mix.Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :epad, EpadWeb.Endpoint,
http: [port: 4002],
server: false
# Print only warnings and errors during test
config :logger, level: :warn
| 23.636364 | 56 | 0.730769 |
625b4a909d848caf6c181744b3b334aebf360ece | 1,140 | ex | Elixir | lib/ex_aws/request/url.ex | MisterToolbox/ex_aws | b9d4badbe66b9a0069a253dddda7014974c8e909 | [
"MIT"
] | null | null | null | lib/ex_aws/request/url.ex | MisterToolbox/ex_aws | b9d4badbe66b9a0069a253dddda7014974c8e909 | [
"MIT"
] | null | null | null | lib/ex_aws/request/url.ex | MisterToolbox/ex_aws | b9d4badbe66b9a0069a253dddda7014974c8e909 | [
"MIT"
] | null | null | null | defmodule ExAws.Request.Url do
@moduledoc false
@doc """
Builds URL for an operation and a config"
"""
def build(operation, config) do
config
|> Map.take([:scheme, :host, :port])
|> Map.put(:query, query(operation))
|> Map.put(:path, operation.path)
|> normalize_scheme
|> normalize_pa... | 23.75 | 75 | 0.622807 |
625b4df668216fde484ed73408874f4524f001dc | 2,276 | ex | Elixir | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v2beta1/model/delivery_control.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v2beta1/model/delivery_control.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v2beta1/model/delivery_control.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... | 40.642857 | 124 | 0.760984 |
625b5788a0bb1677112487fd7299125e0237735a | 1,016 | ex | Elixir | lib/blog_api_web/views/error_helpers.ex | vbrazo/blog_api | 8a3e15c666beef8f33b6d323627f92379267ecd9 | [
"MIT"
] | null | null | null | lib/blog_api_web/views/error_helpers.ex | vbrazo/blog_api | 8a3e15c666beef8f33b6d323627f92379267ecd9 | [
"MIT"
] | null | null | null | lib/blog_api_web/views/error_helpers.ex | vbrazo/blog_api | 8a3e15c666beef8f33b6d323627f92379267ecd9 | [
"MIT"
] | null | null | null | defmodule BlogApiWeb.ErrorHelpers do
@moduledoc """
Conveniences for translating and building error messages.
"""
@doc """
Translates an error message using gettext.
"""
def translate_error({msg, opts}) do
# Because error messages were defined within Ecto, we must
# call the Gettext module passin... | 31.75 | 78 | 0.661417 |
625b5f1f763d7e9e75973ddf98c7b025dc2df015 | 87 | exs | Elixir | config/config.exs | mindvalley/mv-opentelemetry | 90d654c023e6912f74c2cce518530878b46dd20b | [
"MIT"
] | 9 | 2021-10-05T08:01:18.000Z | 2022-03-30T07:19:38.000Z | config/config.exs | mindvalley/mv-opentelemetry | 90d654c023e6912f74c2cce518530878b46dd20b | [
"MIT"
] | 29 | 2021-10-04T05:46:47.000Z | 2022-03-31T18:47:10.000Z | config/config.exs | mindvalley/mv-opentelemetry | 90d654c023e6912f74c2cce518530878b46dd20b | [
"MIT"
] | 2 | 2021-10-04T05:50:38.000Z | 2021-10-05T05:01:34.000Z | import Config
if Mix.env() in [:dev, :test] do
import_config "#{Mix.env()}.exs"
end
| 14.5 | 34 | 0.643678 |
625b66ca4202ebecf513c246c5aa6986a93e49cf | 2,135 | ex | Elixir | clients/document_ai/lib/google_api/document_ai/v1/model/google_cloud_documentai_v1_document_text_anchor.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/document_ai/lib/google_api/document_ai/v1/model/google_cloud_documentai_v1_document_text_anchor.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/document_ai/lib/google_api/document_ai/v1/model/google_cloud_documentai_v1_document_text_anchor.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... | 35.583333 | 195 | 0.740047 |
625b6a873a1b26697427b5964fa0e1d241a38913 | 2,262 | ex | Elixir | clients/dns/lib/google_api/dns/v1/model/change.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/dns/lib/google_api/dns/v1/model/change.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/dns/lib/google_api/dns/v1/model/change.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.7 | 146 | 0.729885 |
625b7719ba53d039ab6db1aba8abfce6bf2044d2 | 1,793 | ex | Elixir | lib/codex.ex | maartenvanvliet/codex | 4026a5bc64f5aafd94ce21ee4ec922ea79af49c9 | [
"MIT"
] | 3 | 2021-05-16T14:13:18.000Z | 2021-05-18T18:51:06.000Z | lib/codex.ex | maartenvanvliet/codex | 4026a5bc64f5aafd94ce21ee4ec922ea79af49c9 | [
"MIT"
] | 11 | 2021-09-22T04:15:16.000Z | 2022-03-24T04:14:17.000Z | lib/codex.ex | maartenvanvliet/codex | 4026a5bc64f5aafd94ce21ee4ec922ea79af49c9 | [
"MIT"
] | null | null | null | defmodule Codex do
@external_resource "README.md"
@moduledoc @external_resource
|> File.read!()
|> String.split("<!-- MDOC !-->")
|> Enum.fetch!(1)
@callback init(opts :: any) :: any
@callback call(params :: any) :: {:ok, any} | {:error, any}
defmacro __using__(opts) d... | 21.60241 | 80 | 0.587842 |
625b9d1ad5e9e38d3fc9eaee9cc6e56681999624 | 1,749 | ex | Elixir | clients/plus/lib/google_api/plus/v1/model/activity_actor_client_specific_actor_info.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/plus/lib/google_api/plus/v1/model/activity_actor_client_specific_actor_info.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/plus/lib/google_api/plus/v1/model/activity_actor_client_specific_actor_info.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 34.294118 | 175 | 0.765009 |
625bbb4c14e2bef4be70102c1901db81a5389e19 | 3,004 | ex | Elixir | lib/farside/instances.ex | rottenstonks/farside | 3654fee2b36a2e770a056bd36f9884cba4a453de | [
"MIT"
] | 133 | 2021-11-19T05:38:08.000Z | 2022-03-31T21:24:44.000Z | lib/farside/instances.ex | rottenstonks/farside | 3654fee2b36a2e770a056bd36f9884cba4a453de | [
"MIT"
] | 21 | 2021-11-24T17:56:42.000Z | 2022-03-23T17:30:18.000Z | lib/farside/instances.ex | rottenstonks/farside | 3654fee2b36a2e770a056bd36f9884cba4a453de | [
"MIT"
] | 10 | 2021-11-24T03:39:35.000Z | 2022-03-22T00:43:54.000Z | defmodule Farside.Instances do
@fallback_suffix Application.fetch_env!(:farside, :fallback_suffix)
@update_file Application.fetch_env!(:farside, :update_file)
@services_json Application.fetch_env!(:farside, :services_json)
@service_prefix Application.fetch_env!(:farside, :service_prefix)
@headers Application.... | 25.896552 | 79 | 0.576565 |
625beba95832c01563d6211207631236f4c08e22 | 770 | ex | Elixir | test/support/factory.ex | codefordenver/new-code-for-denver-site | af6cc232c898a197601b4d37e0cd217d0503fd9b | [
"MIT"
] | 1 | 2019-09-28T05:50:46.000Z | 2019-09-28T05:50:46.000Z | test/support/factory.ex | codefordenver/new-code-for-denver-site | af6cc232c898a197601b4d37e0cd217d0503fd9b | [
"MIT"
] | null | null | null | test/support/factory.ex | codefordenver/new-code-for-denver-site | af6cc232c898a197601b4d37e0cd217d0503fd9b | [
"MIT"
] | null | null | null | defmodule RealWorld.Factory do
use ExMachina.Ecto, repo: RealWorld.Repo
def user_factory do
%RealWorld.Accounts.User{
email: "john@jacob.com",
username: "john",
password: "some password",
bio: "some bio",
image: "some image"
}
end
def article_factory do
%RealWorld.Bl... | 19.25 | 42 | 0.6 |
625bf932bab521e2950ecf7ecd3593abb872ae18 | 305 | exs | Elixir | priv/repo/migrations/20171226164336_add_indexes.exs | Rabsztok/HexWorlds | 6d4b00824a6bf09ab84eca4efd14722cf3326616 | [
"MIT"
] | 7 | 2017-08-11T12:08:58.000Z | 2020-08-17T14:31:49.000Z | priv/repo/migrations/20171226164336_add_indexes.exs | Rabsztok/HexWorlds | 6d4b00824a6bf09ab84eca4efd14722cf3326616 | [
"MIT"
] | 1 | 2020-06-20T17:54:12.000Z | 2020-06-20T17:54:12.000Z | priv/repo/migrations/20171226164336_add_indexes.exs | Rabsztok/HexWorlds | 6d4b00824a6bf09ab84eca4efd14722cf3326616 | [
"MIT"
] | null | null | null | defmodule Game.Repo.Migrations.AddIndexes do
use Ecto.Migration
@disable_ddl_transaction true
def change do
create index("tiles", [:world_id], concurrently: true)
create index("tiles", [:region_id], concurrently: true)
create index("regions", [:world_id], concurrently: true)
end
end
| 27.727273 | 60 | 0.727869 |
625c0311769f7a38147b4c992cb6dca99605b84f | 2,030 | ex | Elixir | clients/plus_domains/lib/google_api/plus_domains/v1/model/acl.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/plus_domains/lib/google_api/plus_domains/v1/model/acl.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/plus_domains/lib/google_api/plus_domains/v1/model/acl.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 35.614035 | 133 | 0.727586 |
625c2436e6e72c1ccad2c637f17e172b5662c5aa | 3,780 | ex | Elixir | clients/domains_rdap/lib/google_api/domains_rdap/v1/api/entity.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/domains_rdap/lib/google_api/domains_rdap/v1/api/entity.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/domains_rdap/lib/google_api/domains_rdap/v1/api/entity.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... | 43.448276 | 196 | 0.649471 |
625c7ece11426ea5c42575b3fc072a0b1ecd7703 | 3,131 | ex | Elixir | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/on_premises_configuration.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/on_premises_configuration.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/on_premises_configuration.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... | 44.098592 | 176 | 0.697541 |
625c7f9b112356a5ac6d62a0369232bbdfd86e34 | 83 | ex | Elixir | recallr/lib/recallr/counter.ex | myfoundea/liveview_march_2021 | 8aef6225271bbc8e9985746505d74dc850f295fb | [
"MIT"
] | null | null | null | recallr/lib/recallr/counter.ex | myfoundea/liveview_march_2021 | 8aef6225271bbc8e9985746505d74dc850f295fb | [
"MIT"
] | 1 | 2021-03-24T14:49:29.000Z | 2021-03-24T14:49:29.000Z | recallr/lib/recallr/counter.ex | myfoundea/liveview_march_2021 | 8aef6225271bbc8e9985746505d74dc850f295fb | [
"MIT"
] | 5 | 2021-03-21T19:45:38.000Z | 2021-03-24T14:53:07.000Z | defmodule Recallr.Counter do
def increment(number) do
number + 1
end
end
| 10.375 | 28 | 0.698795 |
625c886f249990df7a9f4b2743c80c07b146d800 | 12,903 | exs | Elixir | test/sourceror_test.exs | msaraiva/sourceror | c3b5604207b6966759bbd4b0aca99a7fb18284d0 | [
"Apache-2.0"
] | null | null | null | test/sourceror_test.exs | msaraiva/sourceror | c3b5604207b6966759bbd4b0aca99a7fb18284d0 | [
"Apache-2.0"
] | null | null | null | test/sourceror_test.exs | msaraiva/sourceror | c3b5604207b6966759bbd4b0aca99a7fb18284d0 | [
"Apache-2.0"
] | null | null | null | defmodule SourcerorTest do
use ExUnit.Case, async: true
doctest Sourceror
defmacro assert_same(string) do
quote bind_quoted: [string: string] do
string = String.trim(string)
assert string == Sourceror.parse_string!(string) |> Sourceror.to_string()
end
end
test "parse_string!/2 and to_str... | 23.165171 | 97 | 0.487949 |
625c97c98a904afcfa0a0001e5d82831861db1c8 | 2,343 | ex | Elixir | lib/appsignal/transmitter.ex | Magi-KS/appsignal-elixir | bc7498b5e103b658401ecd27c6d27c2cfa44e59a | [
"MIT"
] | 234 | 2016-08-18T20:43:15.000Z | 2022-02-27T11:31:48.000Z | lib/appsignal/transmitter.ex | Magi-KS/appsignal-elixir | bc7498b5e103b658401ecd27c6d27c2cfa44e59a | [
"MIT"
] | 563 | 2016-07-25T17:45:14.000Z | 2022-03-21T11:39:29.000Z | lib/appsignal/transmitter.ex | Magi-KS/appsignal-elixir | bc7498b5e103b658401ecd27c6d27c2cfa44e59a | [
"MIT"
] | 86 | 2016-09-13T22:53:46.000Z | 2022-02-16T11:03:51.000Z | defmodule Appsignal.Transmitter do
@moduledoc false
require Logger
def request(method, url, headers \\ [], body \\ "") do
http_client = Application.get_env(:appsignal, :http_client, :hackney)
:application.ensure_all_started(http_client)
http_client.request(method, url, headers, body, options())
en... | 25.193548 | 101 | 0.56338 |
625cb87f8e8b6a6e33f7544afb4022122c9c12d8 | 4,000 | ex | Elixir | lib/mastani_server/accounts/delegates/mails.ex | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | 1 | 2019-05-07T15:03:54.000Z | 2019-05-07T15:03:54.000Z | lib/mastani_server/accounts/delegates/mails.ex | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | null | null | null | lib/mastani_server/accounts/delegates/mails.ex | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | null | null | null | defmodule MastaniServer.Accounts.Delegate.Mails do
import Ecto.Query, warn: false
import Helper.Utils, only: [done: 1, done: 2]
import ShortMaps
alias MastaniServer.Repo
alias MastaniServer.Accounts.{User, MentionMail, NotificationMail, SysNotificationMail}
alias MastaniServer.Delivery
alias Helper.ORM
... | 30.534351 | 93 | 0.645 |
625cd782f027a48972446e968ec4f3ff5465be2c | 1,019 | ex | Elixir | examples/phoenix_basic_example/lib/dripper_example_web/views/error_helpers.ex | Ninigi/ecto_dripper | ca472e90aafd3313b91a268f81e6aa936c59e021 | [
"MIT"
] | 1 | 2018-06-28T11:15:14.000Z | 2018-06-28T11:15:14.000Z | examples/phoenix_basic_example/lib/dripper_example_web/views/error_helpers.ex | Ninigi/ecto_dripper | ca472e90aafd3313b91a268f81e6aa936c59e021 | [
"MIT"
] | null | null | null | examples/phoenix_basic_example/lib/dripper_example_web/views/error_helpers.ex | Ninigi/ecto_dripper | ca472e90aafd3313b91a268f81e6aa936c59e021 | [
"MIT"
] | null | null | null | defmodule DripperExampleWeb.ErrorHelpers do
@moduledoc """
Conveniences for translating and building error messages.
"""
@doc """
Translates an error message using gettext.
"""
def translate_error({msg, opts}) do
# Because error messages were defined within Ecto, we must
# call the Gettext module... | 33.966667 | 83 | 0.679097 |
625ce55a2a18847d25882ba948ca043a5b2be066 | 2,241 | ex | Elixir | clients/bigtable_admin/lib/google_api/bigtable_admin/v2/model/list_clusters_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/bigtable_admin/lib/google_api/bigtable_admin/v2/model/list_clusters_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/bigtable_admin/lib/google_api/bigtable_admin/v2/model/list_clusters_response.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... | 39.315789 | 135 | 0.731816 |
625ce9822d6cde06456fbe3a569ab1bdc36e38be | 3,165 | exs | Elixir | test/app_unite_web/controllers/pharmacy/pharmacy_controller_test.exs | JakTomczak/AppUniteTask | 05694bef7c9867cd873ebce308e3fe1bb8e89bf4 | [
"Unlicense"
] | null | null | null | test/app_unite_web/controllers/pharmacy/pharmacy_controller_test.exs | JakTomczak/AppUniteTask | 05694bef7c9867cd873ebce308e3fe1bb8e89bf4 | [
"Unlicense"
] | null | null | null | test/app_unite_web/controllers/pharmacy/pharmacy_controller_test.exs | JakTomczak/AppUniteTask | 05694bef7c9867cd873ebce308e3fe1bb8e89bf4 | [
"Unlicense"
] | null | null | null | defmodule AppUniteWeb.Pharmacy.PharmacyControllerTest do
use AppUniteWeb.ConnCase
describe "Pharmacy Controller GET index/2" do
setup do
[
url: "/api/pharmacies"
]
end
test "returns all fields", context do
budget = 300
%{id: id, name: name} = insert(:pharmacy, budget: ... | 25.119048 | 99 | 0.463507 |
625cf278abf2ae736e4168036dbe49ecd9975646 | 1,555 | exs | Elixir | config/test.exs | mindriot101/level | 0a2cbae151869c2d9b79b3bfb388f5d00739ae12 | [
"Apache-2.0"
] | 928 | 2018-04-03T16:18:11.000Z | 2019-09-09T17:59:55.000Z | config/test.exs | mindriot101/level | 0a2cbae151869c2d9b79b3bfb388f5d00739ae12 | [
"Apache-2.0"
] | 74 | 2018-04-03T00:46:50.000Z | 2019-03-10T18:57:27.000Z | config/test.exs | mindriot101/level | 0a2cbae151869c2d9b79b3bfb388f5d00739ae12 | [
"Apache-2.0"
] | 89 | 2018-04-03T17:33:20.000Z | 2019-08-19T03:40:20.000Z | use Mix.Config
config :level, mailer_host: "level.test"
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :level, LevelWeb.Endpoint,
http: [port: 4001],
url: [host: "level.test", port: 4001],
server: false
# Print only warnings and errors during test
conf... | 25.916667 | 67 | 0.750482 |
625d1ff3fcd6f458c42f826d8168ca215b78869f | 2,080 | exs | Elixir | apps/re_web/test/controllers/sitemap_controller_test.exs | ruby2elixir/emcasa-backend | 70d7f4f233555417941ffa6ada84cf8740c21dd2 | [
"MIT"
] | 4 | 2019-11-01T16:29:31.000Z | 2020-10-10T21:20:12.000Z | apps/re_web/test/controllers/sitemap_controller_test.exs | eduardomartines/emcasa-backend | 70d7f4f233555417941ffa6ada84cf8740c21dd2 | [
"MIT"
] | null | null | null | apps/re_web/test/controllers/sitemap_controller_test.exs | eduardomartines/emcasa-backend | 70d7f4f233555417941ffa6ada84cf8740c21dd2 | [
"MIT"
] | 5 | 2019-11-04T21:25:45.000Z | 2020-02-13T23:49:36.000Z | defmodule ReWeb.SitemapControllerTest do
use ReWeb.ConnCase
import Re.Factory
alias ReWeb.Guardian
setup %{conn: conn} do
user = insert(:user)
{:ok, jwt, _full_claims} = Guardian.encode_and_sign(user)
conn = put_req_header(conn, "accept", "application/json")
authenticated_conn = put_req_head... | 40.784314 | 93 | 0.604808 |
625d581cb41657f7c589d221cc3589c05868c22f | 1,661 | ex | Elixir | reflow_controller/lib/reflow_controller/web/endpoint.ex | harmon25/ReflowToaster | e38bb6dcff2be5a738b432897c4f46628c20cf26 | [
"Apache-2.0"
] | null | null | null | reflow_controller/lib/reflow_controller/web/endpoint.ex | harmon25/ReflowToaster | e38bb6dcff2be5a738b432897c4f46628c20cf26 | [
"Apache-2.0"
] | null | null | null | reflow_controller/lib/reflow_controller/web/endpoint.ex | harmon25/ReflowToaster | e38bb6dcff2be5a738b432897c4f46628c20cf26 | [
"Apache-2.0"
] | null | null | null | defmodule ReflowController.Web.Endpoint do
use Phoenix.Endpoint, otp_app: :reflow_controller
socket "/socket", ReflowController.Web.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 ... | 30.2 | 93 | 0.726069 |
625d6389a40388664fb49835c5f4832154b15957 | 1,565 | ex | Elixir | apps/camera/lib/camera/fake_cam.ex | paulanthonywilson/mcam | df9c5aaae00b568749dff22613636f5cb92f905a | [
"MIT"
] | null | null | null | apps/camera/lib/camera/fake_cam.ex | paulanthonywilson/mcam | df9c5aaae00b568749dff22613636f5cb92f905a | [
"MIT"
] | 8 | 2020-11-16T09:59:12.000Z | 2020-11-16T10:13:07.000Z | apps/camera/lib/camera/fake_cam.ex | paulanthonywilson/mcam | df9c5aaae00b568749dff22613636f5cb92f905a | [
"MIT"
] | null | null | null | defmodule Camera.FakeCam do
@moduledoc """
Returns alternate images of a jumping stick man
"""
use GenServer
@behaviour Camera.Cam
@name __MODULE__
defstruct images: nil, undisplayed_images: nil
@type t :: %__MODULE__{images: list(String.t()), undisplayed_images: list(String.t())}
def start_link(_)... | 26.083333 | 95 | 0.668371 |
625da1f9279c575ae4966c7cad4df24edb7f72ac | 1,807 | ex | Elixir | lib/rampart/policy.ex | pareeohnos/rampart | 21afc1b6880d9f1ba11ece8872fd88de917e39e9 | [
"MIT"
] | 2 | 2017-05-03T15:02:01.000Z | 2017-05-04T01:18:53.000Z | lib/rampart/policy.ex | pareeohnos/rampart | 21afc1b6880d9f1ba11ece8872fd88de917e39e9 | [
"MIT"
] | null | null | null | lib/rampart/policy.ex | pareeohnos/rampart | 21afc1b6880d9f1ba11ece8872fd88de917e39e9 | [
"MIT"
] | null | null | null | defmodule Rampart.Policy do
@moduledoc ~S"""
The `Policy` module provides very little functionality,
but is key to the way in which Rampart works. Any user
defined policy must `use` this module, which allows
Rampart to find it when your application starts.
Additionally, policies will be given access to fun... | 32.267857 | 70 | 0.736027 |
625dc3e203c3ee0c30810bee4739df925a7725ab | 1,432 | ex | Elixir | clients/vision/lib/google_api/vision/v1/model/paragraph.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/vision/lib/google_api/vision/v1/model/paragraph.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/vision/lib/google_api/vision/v1/model/paragraph.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | 1 | 2018-07-28T20:50:50.000Z | 2018-07-28T20:50:50.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 33.302326 | 92 | 0.739525 |
625dcd6a7376a4a84430403ab3852d1c7929f903 | 3,070 | ex | Elixir | clients/slides/lib/google_api/slides/v1/model/replace_all_shapes_with_sheets_chart_request.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/slides/lib/google_api/slides/v1/model/replace_all_shapes_with_sheets_chart_request.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/slides/lib/google_api/slides/v1/model/replace_all_shapes_with_sheets_chart_request.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.239437 | 172 | 0.727362 |
625ddc2e8d532b8ef11bddc2e32f674eeb6a2754 | 882 | ex | Elixir | apps/panacea_beacon/test/support/conn_case.ex | timjp87/panacea | 5edddfa12a8f18b040248b9b186479b9ec8aed51 | [
"MIT"
] | null | null | null | apps/panacea_beacon/test/support/conn_case.ex | timjp87/panacea | 5edddfa12a8f18b040248b9b186479b9ec8aed51 | [
"MIT"
] | null | null | null | apps/panacea_beacon/test/support/conn_case.ex | timjp87/panacea | 5edddfa12a8f18b040248b9b186479b9ec8aed51 | [
"MIT"
] | null | null | null | defmodule BeaconWeb.ConnCase do
@moduledoc """
This module defines the test case to be used by
tests that require setting up a connection.
Such tests rely on `Phoenix.ConnTest` and also
import other functionality to make it easier
to build common data structures and query the data layer.
Finally, if the... | 26.727273 | 59 | 0.727891 |
625df3c75c8df8cadea34f79dd19b3d12ca8c05e | 4,987 | ex | Elixir | apps/gitgud/lib/gitgud/ssh_server.ex | anndream/gitgud | 0dee75547f86040df417def209bf62c33cd8dfec | [
"MIT"
] | 1 | 2019-09-08T07:48:10.000Z | 2019-09-08T07:48:10.000Z | apps/gitgud/lib/gitgud/ssh_server.ex | anndream/gitgud | 0dee75547f86040df417def209bf62c33cd8dfec | [
"MIT"
] | null | null | null | apps/gitgud/lib/gitgud/ssh_server.ex | anndream/gitgud | 0dee75547f86040df417def209bf62c33cd8dfec | [
"MIT"
] | null | null | null | defmodule GitGud.SSHServer do
@moduledoc """
Secure Shell (SSH) server providing support for Git server commands.
The server handles following Git commands:
* `git-receive-pack` - corresponding server-side command to `git push`.
* `git-upload-pack` - corresponding server-side command to `git fetch`.
A re... | 30.224242 | 131 | 0.666332 |
625e0afdac85d1b5a45094073d8512b678655ac8 | 631 | exs | Elixir | test/test_helper.exs | valuechainfactory/phoenix_oauth2_provider | 5219115e6ca08af427b05771b1e1e6f9e45dc054 | [
"MIT"
] | 68 | 2017-04-08T08:31:19.000Z | 2022-02-08T11:41:08.000Z | test/test_helper.exs | valuechainfactory/phoenix_oauth2_provider | 5219115e6ca08af427b05771b1e1e6f9e45dc054 | [
"MIT"
] | 32 | 2017-08-24T19:11:57.000Z | 2021-12-29T07:18:49.000Z | test/test_helper.exs | valuechainfactory/phoenix_oauth2_provider | 5219115e6ca08af427b05771b1e1e6f9e45dc054 | [
"MIT"
] | 29 | 2017-04-07T22:45:46.000Z | 2022-03-08T15:55:42.000Z | Logger.configure(level: :warn)
ExUnit.start()
# Ensure that symlink to custom ecto priv directory exists
source = Dummy.Repo.config()[:priv]
target = Application.app_dir(:phoenix_oauth2_provider, source)
File.rm_rf(target)
File.mkdir_p(target)
File.rmdir(target)
:ok = :file.make_symlink(Path.expand(source), target)
... | 28.681818 | 62 | 0.730586 |
625e2d44ac80d2bdc0822b15bd47241d938b5751 | 2,922 | exs | Elixir | mix.exs | gmile/swoosh | a8dd93e2d06d2cd70ebd88e8f82f047ebe8c360d | [
"MIT"
] | null | null | null | mix.exs | gmile/swoosh | a8dd93e2d06d2cd70ebd88e8f82f047ebe8c360d | [
"MIT"
] | null | null | null | mix.exs | gmile/swoosh | a8dd93e2d06d2cd70ebd88e8f82f047ebe8c360d | [
"MIT"
] | null | null | null | defmodule Swoosh.Mixfile do
use Mix.Project
@source_url "https://github.com/swoosh/swoosh"
@version "1.0.6"
def project do
[
app: :swoosh,
version: @version,
elixir: "~> 1.8",
elixirc_paths: elixirc_paths(Mix.env()),
build_embedded: Mix.env() == :prod,
start_permanent: ... | 23.564516 | 85 | 0.52601 |
625e4efc7c17aac0d6b6a75f6ca74ae1474082ba | 975 | ex | Elixir | clients/cloud_trace/lib/google_api/cloud_trace/v2/deserializer.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/cloud_trace/lib/google_api/cloud_trace/v2/deserializer.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/cloud_trace/lib/google_api/cloud_trace/v2/deserializer.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... | 37.5 | 77 | 0.766154 |
625e59221aa9525eb61cb80998ffb83a25b53094 | 2,546 | exs | Elixir | test/mongo/grid_fs/bucket_test.exs | hauleth/mongodb | d1be214cb38494bfd2cb861628526b853e7b776f | [
"Apache-2.0"
] | 286 | 2017-06-06T04:21:31.000Z | 2021-09-11T16:37:59.000Z | test/mongo/grid_fs/bucket_test.exs | hauleth/mongodb | d1be214cb38494bfd2cb861628526b853e7b776f | [
"Apache-2.0"
] | 202 | 2017-05-28T13:22:01.000Z | 2020-05-15T20:15:51.000Z | test/mongo/grid_fs/bucket_test.exs | hauleth/mongodb | d1be214cb38494bfd2cb861628526b853e7b776f | [
"Apache-2.0"
] | 120 | 2016-12-16T17:05:12.000Z | 2020-05-15T16:20:17.000Z | defmodule Mongo.GridFs.BucketTest do
use ExUnit.Case
alias Mongo.GridFs.Bucket
alias Mongo.GridFs.Upload
setup_all do
assert {:ok, pid} = Mongo.TestConnection.connect()
{:ok, [pid: pid]}
end
test "check implementation of the protocols Inspect and String.Chars", c do
b = Bucket.new(c.pid)
... | 28.288889 | 94 | 0.67989 |
625e59bcf0f764445939bb78f29fb54b0e711a59 | 3,364 | ex | Elixir | clients/file/lib/google_api/file/v1/model/instance.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/file/lib/google_api/file/v1/model/instance.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/file/lib/google_api/file/v1/model/instance.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.128205 | 143 | 0.678656 |
625e9312dfd1406a695883ec0410767166a581d3 | 9,104 | ex | Elixir | clients/analytics_reporting/lib/google_api/analytics_reporting/v4/model/report_request.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/analytics_reporting/lib/google_api/analytics_reporting/v4/model/report_request.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/analytics_reporting/lib/google_api/analytics_reporting/v4/model/report_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... | 82.018018 | 761 | 0.747583 |
625ec9efc592555a4317c694b01a83e7696cc41c | 1,085 | exs | Elixir | mix.exs | mark-b-kauffman/phxwhttpoison | 6d9acb505c302f19e5aba5ffc22166a8877a39d9 | [
"BSD-3-Clause",
"MIT"
] | null | null | null | mix.exs | mark-b-kauffman/phxwhttpoison | 6d9acb505c302f19e5aba5ffc22166a8877a39d9 | [
"BSD-3-Clause",
"MIT"
] | null | null | null | mix.exs | mark-b-kauffman/phxwhttpoison | 6d9acb505c302f19e5aba5ffc22166a8877a39d9 | [
"BSD-3-Clause",
"MIT"
] | null | null | null | defmodule Phxwhttpoison.Mixfile do
use Mix.Project
def project do
[
app: :phxwhttpoison,
version: "0.0.1",
elixir: "~> 1.4",
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix, :gettext] ++ Mix.compilers,
start_permanent: Mix.env == :prod,
deps: deps()
]
... | 24.111111 | 56 | 0.582488 |
625ed1ec36d8b90c29440f2b899ee70f04ef8110 | 1,091 | exs | Elixir | clients/speech/mix.exs | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/speech/mix.exs | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/speech/mix.exs | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | defmodule GoogleApi.Speech.V1.Mixfile do
use Mix.Project
@version "0.10.0"
def project do
[app: :google_api_speech,
version: @version,
elixir: "~> 1.4",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
description: description(),
package: package(),
dep... | 22.729167 | 106 | 0.593951 |
625ed2800bacdabc889f7b286b6e2794c584a7d9 | 4,226 | ex | Elixir | lib/faker/beer/en.ex | pharosproduction/faker | 91deca51b3dc4bf8de75f81480e9f8880aa93886 | [
"MIT"
] | null | null | null | lib/faker/beer/en.ex | pharosproduction/faker | 91deca51b3dc4bf8de75f81480e9f8880aa93886 | [
"MIT"
] | null | null | null | lib/faker/beer/en.ex | pharosproduction/faker | 91deca51b3dc4bf8de75f81480e9f8880aa93886 | [
"MIT"
] | null | null | null | defmodule Faker.Beer.En do
import Faker, only: [sampler: 2]
@moduledoc """
Functions for generating Beer related data in English
"""
@doc"""
Returns a Beer name string
"""
@spec name() :: String.t
sampler :name, ["Pliny The Elder", "Founders Kentucky Breakfast", "Trappistes Rochefort 10", "HopSlam A... | 111.210526 | 1,272 | 0.677473 |
625eee713bb9709f71a9a0545fc355d9bf1dcd35 | 1,096 | ex | Elixir | lib/tarantool/response.ex | xronos-i-am/tarantool.ex | 929ee9dd3da1b6dd3e38961870e758fba3e6aa8c | [
"MIT"
] | 27 | 2016-02-11T08:38:46.000Z | 2022-02-23T21:48:13.000Z | lib/tarantool/response.ex | xronos-i-am/tarantool.ex | 929ee9dd3da1b6dd3e38961870e758fba3e6aa8c | [
"MIT"
] | 5 | 2016-06-04T18:32:00.000Z | 2019-04-14T08:14:46.000Z | lib/tarantool/response.ex | xronos-i-am/tarantool.ex | 929ee9dd3da1b6dd3e38961870e758fba3e6aa8c | [
"MIT"
] | 6 | 2016-03-01T08:34:09.000Z | 2019-02-09T17:29:56.000Z | defmodule Tarantool.Response do
use Tarantool.Constants
require Logger
def parse_data(data, %{response_size: nil} = s) do
case Msgpax.unpack_slice(data) do
{:ok, response_size, rest} ->
parse_data(rest, %{s | response_size: response_size})
{:error, _} ->
%{s| tail: data}
end
... | 28.102564 | 106 | 0.624088 |
625f01e1c472c0b0ea52d3adc7cd44a30ece9eb1 | 1,195 | exs | Elixir | test/cog/chat/hipchat/templates/embedded/trigger_list_test.exs | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 1,003 | 2016-02-23T17:21:12.000Z | 2022-02-20T14:39:35.000Z | test/cog/chat/hipchat/templates/embedded/trigger_list_test.exs | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 906 | 2016-02-22T22:54:19.000Z | 2022-03-11T15:19:43.000Z | test/cog/chat/hipchat/templates/embedded/trigger_list_test.exs | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 95 | 2016-02-23T13:42:31.000Z | 2021-11-30T14:39:55.000Z | defmodule Cog.Chat.HipChat.Templates.Embedded.TriggerListTest do
use Cog.TemplateCase
test "trigger-list template" do
data = %{"results" => [%{"id" => "abc123",
"name" => "test_trigger",
"enabled" => true,
"pipeline" => "ech... | 44.259259 | 97 | 0.459414 |
625f208c13b4996d30e6e622d0e05255ae67d310 | 712 | exs | Elixir | priv/repo/migrations/20210419200019_restructure_phase_winners_and_winners.exs | smartlogic/Challenge_gov | b4203d1fcfb742dd17ecfadb9e9c56ad836d4254 | [
"CC0-1.0"
] | 9 | 2020-02-26T20:24:38.000Z | 2022-03-22T21:14:52.000Z | priv/repo/migrations/20210419200019_restructure_phase_winners_and_winners.exs | smartlogic/Challenge_gov | b4203d1fcfb742dd17ecfadb9e9c56ad836d4254 | [
"CC0-1.0"
] | 15 | 2020-04-22T19:33:24.000Z | 2022-03-26T15:11:17.000Z | priv/repo/migrations/20210419200019_restructure_phase_winners_and_winners.exs | smartlogic/Challenge_gov | b4203d1fcfb742dd17ecfadb9e9c56ad836d4254 | [
"CC0-1.0"
] | 4 | 2020-04-27T22:58:57.000Z | 2022-01-14T13:42:09.000Z | defmodule ChallengeGov.Repo.Migrations.RestructurePhaseWinnersAndWinners do
use Ecto.Migration
def change do
execute "TRUNCATE TABLE winners", ""
rename table("winners"), to: table("phase_winners")
alter table("phase_winners") do
add(:overview_image_path, :string)
modify(:overview, :text... | 22.967742 | 75 | 0.664326 |
625f39a6ba5a023bc4f1d1e1b7803e333157fb7b | 109 | ex | Elixir | ex_github/lib/ex_github/repo.ex | arilsonsouza/rocketseat-ignite-elixir | 93e32d52d589336dfd2d81e755d6dd7f05ee40b8 | [
"MIT"
] | null | null | null | ex_github/lib/ex_github/repo.ex | arilsonsouza/rocketseat-ignite-elixir | 93e32d52d589336dfd2d81e755d6dd7f05ee40b8 | [
"MIT"
] | null | null | null | ex_github/lib/ex_github/repo.ex | arilsonsouza/rocketseat-ignite-elixir | 93e32d52d589336dfd2d81e755d6dd7f05ee40b8 | [
"MIT"
] | null | null | null | defmodule ExGithub.Repo do
use Ecto.Repo,
otp_app: :ex_github,
adapter: Ecto.Adapters.Postgres
end
| 18.166667 | 35 | 0.733945 |
625f579acd4167f93aaf14c1a4fdf05d60e2e245 | 1,401 | ex | Elixir | apps/brain/lib/mix/tasks/firmware_upgrade.ex | elicopter/core | 7731dc7558dea39bd1c473ab9e512c9db9e1b2c9 | [
"MIT"
] | 39 | 2016-11-01T07:21:51.000Z | 2021-02-05T20:19:02.000Z | apps/brain/lib/mix/tasks/firmware_upgrade.ex | elicopter/core | 7731dc7558dea39bd1c473ab9e512c9db9e1b2c9 | [
"MIT"
] | null | null | null | apps/brain/lib/mix/tasks/firmware_upgrade.ex | elicopter/core | 7731dc7558dea39bd1c473ab9e512c9db9e1b2c9 | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.Firmware.Upgrade do
use Mix.Task
require Logger
def run(_) do
{:ok, _pid} = HTTPoison.start
{:ok, _pid} = Nerves.SSDPClient.start(nil, nil)
host = case System.get_env("ELICOPTER_REMOTE_HOST") do
nil ->
{:ok, elicopters} = discover()
# Need to handl... | 29.1875 | 75 | 0.611706 |
625f654b28754e151e125666d3501ca645947cec | 10,789 | ex | Elixir | clients/android_publisher/lib/google_api/android_publisher/v3/api/reviews.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/android_publisher/lib/google_api/android_publisher/v3/api/reviews.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/android_publisher/lib/google_api/android_publisher/v3/api/reviews.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 42.813492 | 196 | 0.619335 |
625f8681c69a22978d257b024cd0f07c35238dd2 | 4,302 | exs | Elixir | exercises/practice/alphametics/test/alphametics_test.exs | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 343 | 2017-06-22T16:28:28.000Z | 2022-03-25T21:33:32.000Z | exercises/practice/alphametics/test/alphametics_test.exs | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 583 | 2017-06-19T10:48:40.000Z | 2022-03-28T21:43:12.000Z | exercises/practice/alphametics/test/alphametics_test.exs | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 228 | 2017-07-05T07:09:32.000Z | 2022-03-27T08:59:08.000Z | defmodule AlphameticsTest do
use ExUnit.Case
# @tag :pending
test "puzzle with three letters" do
puzzle = "I + BB == ILL"
solution = %{
?I => 1,
?B => 9,
?L => 0
}
assert Alphametics.solve(puzzle) == solution
end
@tag :pending
test "solution must have unique value for e... | 25.157895 | 82 | 0.472106 |
625f999b6bcf88bdffedb0207d052fe15b0e614a | 6,523 | exs | Elixir | apps/omg_watcher/test/integration/invalid_exit_test.exs | hoardexchange/elixir-omg | 423528699d467f1cc0d02c596290ab907af38c2c | [
"Apache-2.0"
] | null | null | null | apps/omg_watcher/test/integration/invalid_exit_test.exs | hoardexchange/elixir-omg | 423528699d467f1cc0d02c596290ab907af38c2c | [
"Apache-2.0"
] | null | null | null | apps/omg_watcher/test/integration/invalid_exit_test.exs | hoardexchange/elixir-omg | 423528699d467f1cc0d02c596290ab907af38c2c | [
"Apache-2.0"
] | 2 | 2020-06-07T11:14:54.000Z | 2020-08-02T07:36:32.000Z | # 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... | 37.274286 | 158 | 0.689713 |
625fb7aad71867abab560241d1e86625fb71b4f0 | 1,932 | ex | Elixir | clients/sheets/lib/google_api/sheets/v4/model/boolean_rule.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/sheets/lib/google_api/sheets/v4/model/boolean_rule.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/sheets/lib/google_api/sheets/v4/model/boolean_rule.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 38.64 | 234 | 0.73913 |
625fce07a3bae56acfac87383cf4aeb5a58b83b6 | 5,856 | exs | Elixir | .credo.exs | ramonsnir/contentful.ex | c8c31a3dd362c34a97de39a4b642595670316234 | [
"MIT"
] | null | null | null | .credo.exs | ramonsnir/contentful.ex | c8c31a3dd362c34a97de39a4b642595670316234 | [
"MIT"
] | null | null | null | .credo.exs | ramonsnir/contentful.ex | c8c31a3dd362c34a97de39a4b642595670316234 | [
"MIT"
] | null | null | null | # This file contains the configuration for Credo and you are probably reading
# this after creating it with `mix credo.gen.config`.
#
# If you find anything wrong or unclear in this file, please report an
# issue on GitHub: https://github.com/rrrene/credo/issues
#
%{
#
# You can have as many configs as you like in ... | 40.109589 | 80 | 0.653347 |
625fceb968fd17c3e1999eacaf1835b7d3690005 | 2,267 | ex | Elixir | clients/you_tube/lib/google_api/you_tube/v3/model/channel_branding_settings.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/you_tube/lib/google_api/you_tube/v3/model/channel_branding_settings.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/you_tube/lib/google_api/you_tube/v3/model/channel_branding_settings.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... | 39.77193 | 94 | 0.74592 |
625fd71174485d70e3b23b9a91977d5ed0d0ca1f | 2,704 | exs | Elixir | config/dev.exs | ExSemantica/exsemantica | c2d72513195f44b6b5f73c8cc07394de0a1fd273 | [
"Apache-2.0"
] | null | null | null | config/dev.exs | ExSemantica/exsemantica | c2d72513195f44b6b5f73c8cc07394de0a1fd273 | [
"Apache-2.0"
] | 2 | 2020-07-21T20:53:13.000Z | 2020-07-21T20:54:15.000Z | config/dev.exs | Chlorophytus/eactivitypub | 469346b4d5cd7ad2b575c245ac50fd71b00c4864 | [
"Apache-2.0"
] | null | null | null | import 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 esbuild to bundle .js and .css sources.
config :exsemantica, ExsemanticaWeb.Endpoint,
# Binding to ... | 34.227848 | 92 | 0.710429 |
625fe991224b82948567395c4ec227c239d9259f | 76 | exs | Elixir | hitb_umbrella/apps/hitb_web/test/hitb_web/views/layout_view_test.exs | ravesky/hitb | 91276be81a8b797ea47a6e048a723a08be21288c | [
"MIT"
] | 1 | 2020-03-17T11:46:23.000Z | 2020-03-17T11:46:23.000Z | hitb_umbrella/apps/hitb_web/test/hitb_web/views/layout_view_test.exs | wang12580/hitb | b004aad92660541bcbae5a2af933f48fa6b14cd7 | [
"MIT"
] | null | null | null | hitb_umbrella/apps/hitb_web/test/hitb_web/views/layout_view_test.exs | wang12580/hitb | b004aad92660541bcbae5a2af933f48fa6b14cd7 | [
"MIT"
] | null | null | null | defmodule HitbWeb.LayoutViewTest do
use HitbWeb.ConnCase, async: true
end
| 19 | 35 | 0.815789 |
625ff619f00549d669a08b091bb39f9d8aa4dc40 | 1,998 | ex | Elixir | clients/service_management/lib/google_api/service_management/v1/model/metric_rule.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/service_management/lib/google_api/service_management/v1/model/metric_rule.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/service_management/lib/google_api/service_management/v1/model/metric_rule.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... | 34.448276 | 132 | 0.726226 |
6260200f655ca9ff1ba61eea18db2c1fb6242f3d | 79 | ex | Elixir | web/views/layout_view.ex | crosscloudci/ci_status_repository | 335e8b89bbf59e6cf63e49541ce3ea6b60167e52 | [
"Apache-2.0"
] | 2 | 2019-03-05T16:29:10.000Z | 2020-01-17T14:11:48.000Z | web/views/layout_view.ex | crosscloudci/ci_status_repository | 335e8b89bbf59e6cf63e49541ce3ea6b60167e52 | [
"Apache-2.0"
] | 3 | 2019-03-18T20:26:48.000Z | 2020-06-25T14:31:13.000Z | web/views/layout_view.ex | crosscloudci/ci_status_repository | 335e8b89bbf59e6cf63e49541ce3ea6b60167e52 | [
"Apache-2.0"
] | 1 | 2018-06-16T15:32:25.000Z | 2018-06-16T15:32:25.000Z | defmodule CncfDashboardApi.LayoutView do
use CncfDashboardApi.Web, :view
end
| 19.75 | 40 | 0.835443 |
62602582def7773609d80aaee45761c8ba0654cb | 471 | exs | Elixir | example/test/js_routes_example_web/views/error_view_test.exs | tokafish/phoenix-jsroutes | 2deb3d03210e4a91a0550079fa6c300595c86b0c | [
"MIT"
] | 27 | 2016-06-05T02:07:58.000Z | 2021-06-11T20:12:38.000Z | example/test/js_routes_example_web/views/error_view_test.exs | tokafish/phoenix-jsroutes | 2deb3d03210e4a91a0550079fa6c300595c86b0c | [
"MIT"
] | 9 | 2016-06-21T18:09:58.000Z | 2021-03-10T14:21:51.000Z | example/test/js_routes_example_web/views/error_view_test.exs | tiagoengel/phoenix-jsroutes | 9dacc6472c9db0f97d7a39e1cc7e1b7dbd74ac50 | [
"MIT"
] | 6 | 2016-06-05T21:01:13.000Z | 2020-04-22T13:50:37.000Z | defmodule JsRoutesExampleWeb.ErrorViewTest do
use JsRoutesExampleWeb.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(JsRoutesExampleWeb.ErrorView, "404.html", []) ==
"Not Found"
end
... | 27.705882 | 76 | 0.717622 |
62602efbef6540acc3536f30513786cba8888144 | 3,453 | exs | Elixir | test/hexpm/web/controllers/password_controller_test.exs | lau/hexpm | beee80f5358a356530debfea35ee65c3a0aa9b25 | [
"Apache-2.0"
] | null | null | null | test/hexpm/web/controllers/password_controller_test.exs | lau/hexpm | beee80f5358a356530debfea35ee65c3a0aa9b25 | [
"Apache-2.0"
] | null | null | null | test/hexpm/web/controllers/password_controller_test.exs | lau/hexpm | beee80f5358a356530debfea35ee65c3a0aa9b25 | [
"Apache-2.0"
] | null | null | null | defmodule Hexpm.Web.PasswordControllerTest do
use Hexpm.ConnCase
alias Hexpm.Accounts.{Auth, User, Users}
alias Hexpm.Repo
setup do
user = insert(:user, password: Auth.gen_password("hunter42"))
%{user: user}
end
describe "GET /password/new" do
test "show select new password redirect" do
... | 30.557522 | 98 | 0.585578 |
6260924bbbecef63d60ff8562c37becf413d97f2 | 2,040 | ex | Elixir | clients/machine_learning/lib/google_api/machine_learning/v1/model/google_cloud_ml_v1__get_config_response.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/machine_learning/lib/google_api/machine_learning/v1/model/google_cloud_ml_v1__get_config_response.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/machine_learning/lib/google_api/machine_learning/v1/model/google_cloud_ml_v1__get_config_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... | 37.777778 | 121 | 0.758824 |
6260a7e5f4a24502b07795b2c154156337c8132c | 1,746 | exs | Elixir | elixir/bank-account/test/bank_account_test.exs | agschaid/exercism | bd9f731bf12427d440820a6c7c8d580d395a205e | [
"MIT"
] | null | null | null | elixir/bank-account/test/bank_account_test.exs | agschaid/exercism | bd9f731bf12427d440820a6c7c8d580d395a205e | [
"MIT"
] | null | null | null | elixir/bank-account/test/bank_account_test.exs | agschaid/exercism | bd9f731bf12427d440820a6c7c8d580d395a205e | [
"MIT"
] | null | null | null | defmodule BankAccountTest do
use ExUnit.Case
doctest BankAccount
setup do
account = BankAccount.open_bank()
{:ok, account: account}
end
test "initial balance is 0", %{account: account} do
assert BankAccount.balance(account) == 0
end
test "incrementing and checking balance", %{account: accou... | 26.454545 | 89 | 0.695304 |
6260b81c73660eb9a703061519f677be0d50d2d2 | 3,180 | ex | Elixir | lib/membrane_bin_rtp/receiver/ssrc_router.ex | membraneframework/membrane-bin-rtp | 68c53ef993d72944b3c7251a5591e603b31806d6 | [
"Apache-2.0"
] | null | null | null | lib/membrane_bin_rtp/receiver/ssrc_router.ex | membraneframework/membrane-bin-rtp | 68c53ef993d72944b3c7251a5591e603b31806d6 | [
"Apache-2.0"
] | 2 | 2020-03-04T21:32:49.000Z | 2020-08-10T14:35:02.000Z | lib/membrane_bin_rtp/receiver/ssrc_router.ex | membraneframework/membrane-bin-rtp | 68c53ef993d72944b3c7251a5591e603b31806d6 | [
"Apache-2.0"
] | null | null | null | defmodule Membrane.Bin.RTP.Receiver.SSRCRouter do
@moduledoc """
A bin that receives parsed rtp packets
and based on their ssrc routes them to an appropriate
rtp session bin and creates one if the received packet
is the first for this rtp stream.
"""
use Membrane.Filter
def_input_pad :input, demand_un... | 26.949153 | 90 | 0.619811 |
6260c413ec258c6d2be6df0500f04a0a81ce3f36 | 3,585 | ex | Elixir | lib/snowflex.ex | kianmeng/snowflex | 0dc66ca34e919466fcf49884fe8882c5b5ccb79b | [
"Apache-2.0"
] | 24 | 2020-03-10T18:10:47.000Z | 2022-03-22T19:38:17.000Z | lib/snowflex.ex | kianmeng/snowflex | 0dc66ca34e919466fcf49884fe8882c5b5ccb79b | [
"Apache-2.0"
] | 12 | 2020-11-16T22:26:29.000Z | 2022-02-09T19:39:47.000Z | lib/snowflex.ex | kianmeng/snowflex | 0dc66ca34e919466fcf49884fe8882c5b5ccb79b | [
"Apache-2.0"
] | 5 | 2020-06-16T17:43:07.000Z | 2022-01-14T21:59:31.000Z | defmodule Snowflex do
@moduledoc """
The client interface for connecting to the Snowflake data warehouse.
The main entry point to this module is `Snowflex.sql_query`. This function takes a string containing
a SQL query and returns a list of maps (one per row). NOTE: due to the way the Erlang ODBC works, all va... | 30.381356 | 119 | 0.609763 |
6260d78bb44186a378655972f5e8f92150dd9283 | 3,358 | ex | Elixir | lib/validator/builder.ex | wimwian/strukt | f7893daf4a220da094fbd8e0ed5445aa2b5efbf1 | [
"Apache-2.0"
] | 59 | 2021-06-09T01:47:04.000Z | 2022-03-17T23:41:22.000Z | lib/validator/builder.ex | fishtreesugar/strukt | 38569ed7170919f9b5c969db5e8c62934da70c6f | [
"Apache-2.0"
] | 7 | 2021-07-12T14:11:04.000Z | 2022-03-17T18:06:45.000Z | lib/validator/builder.ex | wimwian/strukt | f7893daf4a220da094fbd8e0ed5445aa2b5efbf1 | [
"Apache-2.0"
] | 4 | 2021-06-13T13:45:31.000Z | 2021-07-01T08:34:38.000Z | defmodule Strukt.Validator.Builder do
@moduledoc """
This module compiles a validator pipeline.
It is largely based on `Plug.Builder`, with minimal changes.
"""
@doc """
Compiles the pipeline.
Each pipeline element should be a tuple of `{validator_name, options, guards}`
This function expects a reve... | 30.527273 | 100 | 0.666766 |
6260de391955c8ec0973aa5868956de5471f217e | 320 | exs | Elixir | priv/repo/migrations/20180424003946_create_groups.exs | maco2035/console | 2a9a65678b8c671c7d92cdb62dfcfc71b84957c5 | [
"Apache-2.0"
] | 83 | 2018-05-31T14:49:10.000Z | 2022-03-27T16:49:49.000Z | priv/repo/migrations/20180424003946_create_groups.exs | maco2035/console | 2a9a65678b8c671c7d92cdb62dfcfc71b84957c5 | [
"Apache-2.0"
] | 267 | 2018-05-22T23:19:02.000Z | 2022-03-31T04:31:06.000Z | priv/repo/migrations/20180424003946_create_groups.exs | maco2035/console | 2a9a65678b8c671c7d92cdb62dfcfc71b84957c5 | [
"Apache-2.0"
] | 18 | 2018-11-20T05:15:54.000Z | 2022-03-28T08:20:13.000Z | defmodule Console.Repo.Migrations.CreateGroups do
use Ecto.Migration
def change do
create table("groups") do
add :name, :string, null: false
add :team_id, references(:teams)
timestamps()
end
create unique_index(:groups, [:name, :team_id], name: :groups_name_team_id_index)
end
end
| 21.333333 | 85 | 0.6875 |
62610da71e111f8e1ce79bcf6b268a9e5481c13f | 212 | exs | Elixir | config/test.exs | StoiximanServices/tds_ecto | 5defd5540a91a760e88daf7e15df1bbcee33afba | [
"Apache-2.0"
] | 3 | 2016-12-07T08:38:37.000Z | 2021-08-24T10:38:55.000Z | config/test.exs | StoiximanServices/tds_ecto | 5defd5540a91a760e88daf7e15df1bbcee33afba | [
"Apache-2.0"
] | null | null | null | config/test.exs | StoiximanServices/tds_ecto | 5defd5540a91a760e88daf7e15df1bbcee33afba | [
"Apache-2.0"
] | null | null | null | use Mix.Config
config :logger, level: :info
config :tds_ecto,
opts: [
hostname: "localhost",
username: "sa",
password: System.get_env("SQL_PASSWORD") || "some!Password",
database: "test"
]
| 16.307692 | 64 | 0.636792 |
6261121021eafe1a81fcf462446d3df4d90527ee | 626 | ex | Elixir | lib/pgsub/pgsub/todo.ex | bredikhin/phoenix-postgresql-notify-listen-example | 1b6be1963a9da90e166f7b345850fbfd95d17498 | [
"MIT"
] | 18 | 2017-07-27T10:13:46.000Z | 2021-09-03T22:28:28.000Z | lib/pgsub/pgsub/todo.ex | bredikhin/phoenix-postgresql-notify-listen-example | 1b6be1963a9da90e166f7b345850fbfd95d17498 | [
"MIT"
] | 1 | 2021-04-27T10:15:22.000Z | 2021-04-27T10:15:22.000Z | lib/pgsub/pgsub/todo.ex | bredikhin/phoenix-postgresql-notify-listen-example | 1b6be1963a9da90e166f7b345850fbfd95d17498 | [
"MIT"
] | 3 | 2020-08-30T09:05:35.000Z | 2022-01-24T09:06:15.000Z | defmodule Pgsub.Pgsub.Todo do
use Ecto.Schema
import Ecto.Changeset
alias Pgsub.Pgsub.Todo
schema "todos" do
field :completed, :boolean, default: false
field :task, :string
timestamps()
end
@doc false
def changeset(%Todo{} = todo, attrs) do
todo
|> cast(attrs, [:task, :completed])
... | 20.866667 | 51 | 0.65016 |
62618ec90806f9f04f1559cd5031f7a98c8973b0 | 13,804 | ex | Elixir | lib/iron.ex | leandrocp/iron | c61f3717c2ef5e7cf2a4eece77c0b36e416b7508 | [
"MIT",
"Unlicense"
] | 4 | 2019-01-18T17:22:38.000Z | 2020-05-12T07:58:52.000Z | lib/iron.ex | leandrocp/iron | c61f3717c2ef5e7cf2a4eece77c0b36e416b7508 | [
"MIT",
"Unlicense"
] | null | null | null | lib/iron.ex | leandrocp/iron | c61f3717c2ef5e7cf2a4eece77c0b36e416b7508 | [
"MIT",
"Unlicense"
] | 1 | 2020-03-20T20:26:58.000Z | 2020-03-20T20:26:58.000Z | defmodule Iron do
@moduledoc """
Serialize and encrypt any Elixir `term()` and send it around.
## Examples
iex> Iron.seal(%{"very" => "secret"}, "password")
{:error, "password string too short (min 32 characters required)"}
iex> sealed = Iron.seal(%{"a" => 1, "b" => 2, "c" => [3, 4, 5], "d" =... | 44.24359 | 279 | 0.644596 |
6261a212e9df1ae21b885c1e53ed30e848b83692 | 836 | ex | Elixir | lib/anchore_engine_api_server/model/vulnerability_response.ex | michaeljguarino/anchore-elixir-client | 156a44f429ecb62433729a2b4c52de5dc0ef44d2 | [
"MIT"
] | null | null | null | lib/anchore_engine_api_server/model/vulnerability_response.ex | michaeljguarino/anchore-elixir-client | 156a44f429ecb62433729a2b4c52de5dc0ef44d2 | [
"MIT"
] | null | null | null | lib/anchore_engine_api_server/model/vulnerability_response.ex | michaeljguarino/anchore-elixir-client | 156a44f429ecb62433729a2b4c52de5dc0ef44d2 | [
"MIT"
] | null | null | null | # NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
defmodule AnchoreEngineAPIServer.Model.VulnerabilityResponse do
@moduledoc """
envelope containing list of vulnerabilities
"""
@derive [Poison.Enco... | 26.125 | 102 | 0.751196 |
6261a5502895eb2ca9898148397e735388edffbe | 1,277 | ex | Elixir | lib/boilerplate_web/views/error_helpers.ex | lorenzosinisi/react-phoenix-users-boilerplate | f39022a41c2b08947c9b4451248febce5005c1a3 | [
"MIT"
] | 152 | 2017-05-29T06:04:01.000Z | 2021-12-11T19:24:02.000Z | lib/boilerplate_web/views/error_helpers.ex | lorenzosinisi/react-phoenix-users-boilerplate | f39022a41c2b08947c9b4451248febce5005c1a3 | [
"MIT"
] | 13 | 2017-07-29T18:26:37.000Z | 2018-10-26T08:33:16.000Z | lib/boilerplate_web/views/error_helpers.ex | lorenzosinisi/react-phoenix-users-boilerplate | f39022a41c2b08947c9b4451248febce5005c1a3 | [
"MIT"
] | 12 | 2017-11-18T19:13:44.000Z | 2019-10-10T01:29:28.000Z | defmodule BoilerplateWeb.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_... | 31.146341 | 80 | 0.674236 |
6261bc3be49f0ca1cd94aa56038544172a805282 | 23,168 | ex | Elixir | lib/postgrex/type_module.ex | enter-haken/postgrex | fb3438d4e6a56db81ddd0d578cdfc0484909c233 | [
"Apache-2.0"
] | null | null | null | lib/postgrex/type_module.ex | enter-haken/postgrex | fb3438d4e6a56db81ddd0d578cdfc0484909c233 | [
"Apache-2.0"
] | 3 | 2021-06-20T14:51:14.000Z | 2021-06-25T00:56:11.000Z | deps/postgrex/lib/postgrex/type_module.ex | carlosviana/blog | 1dcf58c3ca40bc3a7105d75de6f51954eb44bca8 | [
"MIT"
] | null | null | null | defmodule Postgrex.TypeModule do
@moduledoc false
alias Postgrex.TypeInfo
def define(module, extensions, opts) do
opts =
opts
|> Keyword.put_new(:decode_binary, :copy)
config = configure(extensions, opts)
define_inline(module, config, opts)
end
## Helpers
defp directives(config,... | 25.742222 | 97 | 0.560946 |
6261bd03fa20e154776ecc0e845beafdcee7b69a | 1,325 | ex | Elixir | lib/workers/sync_gmail_inboxes.ex | rgstephens/papercups | 60128d6ae9b5425e9b250f7764518838b498100e | [
"MIT"
] | 1 | 2021-08-02T07:59:41.000Z | 2021-08-02T07:59:41.000Z | lib/workers/sync_gmail_inboxes.ex | rgstephens/papercups | 60128d6ae9b5425e9b250f7764518838b498100e | [
"MIT"
] | null | null | null | lib/workers/sync_gmail_inboxes.ex | rgstephens/papercups | 60128d6ae9b5425e9b250f7764518838b498100e | [
"MIT"
] | null | null | null | defmodule ChatApi.Workers.SyncGmailInboxes do
use Oban.Worker, queue: :default
import Ecto.Query, warn: false
require Logger
alias ChatApi.Repo
@impl Oban.Worker
@spec perform(Oban.Job.t()) :: :ok
def perform(%Oban.Job{} = job) do
Logger.debug("Syncing Gmail inboxes: #{inspect(job)}")
account_id... | 28.191489 | 69 | 0.66566 |
6261c15f6f26231425cd4d59764c3156f84872fe | 1,437 | exs | Elixir | mix.exs | ImmaculatePine/facebook.ex | cdd23805746480ef44473f6a2b051aa937b73a9c | [
"MIT"
] | null | null | null | mix.exs | ImmaculatePine/facebook.ex | cdd23805746480ef44473f6a2b051aa937b73a9c | [
"MIT"
] | null | null | null | mix.exs | ImmaculatePine/facebook.ex | cdd23805746480ef44473f6a2b051aa937b73a9c | [
"MIT"
] | null | null | null | Code.ensure_loaded?(Hex) and Hex.start()
defmodule Facebook.Mixfile do
use Mix.Project
def project do
[
app: :facebook,
version: "0.23.0",
elixir: "~> 1.0",
description: description(),
package: package(),
deps: deps(),
source_url: "https://github.com/mweibel/facebook.... | 22.107692 | 99 | 0.541406 |
6261e865aaf4dfa32add690b3ece0c1ddfc54706 | 6,021 | exs | Elixir | test/protobuf/encoder/encode_type_test.exs | jechol/protobuf | 8a361e684da2b14d0e68a02372888833e4929c91 | [
"MIT"
] | 4 | 2021-01-16T02:21:44.000Z | 2022-03-04T18:42:18.000Z | test/protobuf/encoder/encode_type_test.exs | jechol/protobuf | 8a361e684da2b14d0e68a02372888833e4929c91 | [
"MIT"
] | 5 | 2020-04-07T20:22:38.000Z | 2020-09-23T02:28:36.000Z | test/protobuf/encoder/encode_type_test.exs | jechol/protobuf | 8a361e684da2b14d0e68a02372888833e4929c91 | [
"MIT"
] | 4 | 2020-07-22T23:38:34.000Z | 2021-03-26T18:52:54.000Z | defmodule Protobuf.Encoder.DecodeTypeTest do
use ExUnit.Case, async: true
alias Protobuf.Encoder
alias Protobuf.Decoder
require Logger
import Protobuf.Decoder
test "encode_type/2 varint" do
assert encode(:int32, 42) == <<42>>
end
test "encode_type/2 min int32" do
assert encode(:int32, -2_147_... | 26.524229 | 81 | 0.654044 |
626242b5b49571f07856787fc9aeada11b0b1a3e | 2,179 | ex | Elixir | clients/document_ai/lib/google_api/document_ai/v1beta3/model/google_cloud_documentai_v1beta3_human_review_status.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/document_ai/lib/google_api/document_ai/v1beta3/model/google_cloud_documentai_v1beta3_human_review_status.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/document_ai/lib/google_api/document_ai/v1beta3/model/google_cloud_documentai_v1beta3_human_review_status.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... | 37.568966 | 319 | 0.740248 |
6262611306089ed9d822d40d1724f3cd562f4eb4 | 2,078 | ex | Elixir | lib/zoho/response.ex | neektza/zoho-elixir | c08f083b122fdb78dc3147c22055ad201a660520 | [
"MIT"
] | null | null | null | lib/zoho/response.ex | neektza/zoho-elixir | c08f083b122fdb78dc3147c22055ad201a660520 | [
"MIT"
] | null | null | null | lib/zoho/response.ex | neektza/zoho-elixir | c08f083b122fdb78dc3147c22055ad201a660520 | [
"MIT"
] | null | null | null | defmodule Zoho.Response do
@type t :: %Zoho.Response{
status_code: number,
data: term,
raw_response: Zoho.Response.http_potion_response
}
@type http_potion_response :: %{
status_code: number,
body: String.t,
headers: list
}
defstruct data: nil,
raw_response: nil,
... | 28.081081 | 95 | 0.647257 |
6262ba537ea855d0e99c9cab971dcde574454537 | 2,436 | exs | Elixir | demo/config/dev.exs | bitcrowd/bitstyles_phoenix | 697d9380d376f23885b696776736643687d4dd14 | [
"0BSD"
] | 4 | 2021-03-12T07:57:06.000Z | 2021-11-15T11:41:30.000Z | demo/config/dev.exs | bitcrowd/bitstyles_phoenix | 697d9380d376f23885b696776736643687d4dd14 | [
"0BSD"
] | 39 | 2021-03-11T15:36:51.000Z | 2022-01-04T12:13:48.000Z | demo/config/dev.exs | bitcrowd/bitstyles_phoenix | 697d9380d376f23885b696776736643687d4dd14 | [
"0BSD"
] | null | null | null | import 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 esbuild to bundle .js and .css sources.
config :bitstyles_phoenix_demo, BitstylesPhoenixDemoWeb.Endpo... | 33.833333 | 86 | 0.707718 |
6262e5a5da83d1917a1b585358424ecb5289ce20 | 180 | ex | Elixir | lib/upclid.ex | flat235/upclid | ee06b3146e57a82a348eafd14f1f6ade03ca04b6 | [
"Apache-2.0"
] | null | null | null | lib/upclid.ex | flat235/upclid | ee06b3146e57a82a348eafd14f1f6ade03ca04b6 | [
"Apache-2.0"
] | 3 | 2018-06-11T16:09:46.000Z | 2018-11-29T17:05:39.000Z | lib/upclid.ex | flat235/upclid | ee06b3146e57a82a348eafd14f1f6ade03ca04b6 | [
"Apache-2.0"
] | null | null | null | defmodule Upclid do
@moduledoc """
- Main loop is in reporter.ex
- action and collector are "interfaces", implementations can be found in the corresponding folders
"""
end
| 25.714286 | 100 | 0.733333 |
6262f6c8c291c66b12321507f1c6a113c3239a36 | 34 | exs | Elixir | test/elastic/http_test.exs | twix14/elastic | 1e2c7a3fe7b28bfa6cc574b10fd7bc6dca3dadfa | [
"MIT"
] | 63 | 2016-10-19T15:48:22.000Z | 2021-12-21T02:55:39.000Z | test/elastic/http_test.exs | twix14/elastic | 1e2c7a3fe7b28bfa6cc574b10fd7bc6dca3dadfa | [
"MIT"
] | 33 | 2016-11-13T02:41:07.000Z | 2021-05-25T11:12:51.000Z | test/elastic/http_test.exs | twix14/elastic | 1e2c7a3fe7b28bfa6cc574b10fd7bc6dca3dadfa | [
"MIT"
] | 27 | 2016-11-13T02:47:29.000Z | 2022-01-25T02:16:39.000Z | defmodule Elastic.HTTPTest do
end
| 11.333333 | 29 | 0.852941 |
626355186210cc6047e44106452c6700f3b624da | 2,300 | exs | Elixir | bench/scripts/micro/load_bench.exs | nasrulgunawan/ecto_sql | ace2c9daf07190a3f7debfa2060cd3ddd251b6c7 | [
"Apache-2.0"
] | 384 | 2018-10-03T17:52:39.000Z | 2022-03-24T17:54:21.000Z | bench/scripts/micro/load_bench.exs | nasrulgunawan/ecto_sql | ace2c9daf07190a3f7debfa2060cd3ddd251b6c7 | [
"Apache-2.0"
] | 357 | 2018-10-06T13:47:33.000Z | 2022-03-29T08:18:02.000Z | bench/scripts/micro/load_bench.exs | nasrulgunawan/ecto_sql | ace2c9daf07190a3f7debfa2060cd3ddd251b6c7 | [
"Apache-2.0"
] | 251 | 2018-10-04T11:06:41.000Z | 2022-03-29T07:22:53.000Z | # -----------------------------------Goal--------------------------------------
# Compare the implementation of loading raw database data into Ecto structures by
# the different database adapters
# -------------------------------Description-----------------------------------
# Repo.load/2 is an important step of a dat... | 41.071429 | 99 | 0.601304 |
626378bbf92ce6d925b296d5aef69ad50c2538bb | 584 | ex | Elixir | lib/cereal.ex | APB9785/cereal_ex | 7405122553aacfc0a37b69bb4b14ae013be99f0c | [
"MIT"
] | 4 | 2018-09-29T18:34:04.000Z | 2019-11-24T17:18:57.000Z | lib/cereal.ex | APB9785/cereal_ex | 7405122553aacfc0a37b69bb4b14ae013be99f0c | [
"MIT"
] | 4 | 2018-07-25T17:09:21.000Z | 2020-01-23T15:06:21.000Z | lib/cereal.ex | APB9785/cereal_ex | 7405122553aacfc0a37b69bb4b14ae013be99f0c | [
"MIT"
] | 1 | 2021-11-01T19:32:18.000Z | 2021-11-01T19:32:18.000Z | defmodule Cereal do
alias Cereal.Builders.{Base, Errors}
alias Cereal.Formatter
defmodule Context do
defstruct [:data, :conn, :opts, :serializer]
end
def serialize(serializer, data, conn \\ %{}, opts \\ []) do
Context
|> struct(%{data: data, conn: conn, opts: opts, serializer: serializer})
|... | 25.391304 | 76 | 0.633562 |
6263e4d7d86a50b18e8ebd0cc3a70f854150842e | 498 | ex | Elixir | lib/animu/web/views/account/user_view.ex | elarkham/animu | 0f0c7b0b34168e69255943bdede60e03df057a44 | [
"MIT"
] | 1 | 2018-01-02T06:59:08.000Z | 2018-01-02T06:59:08.000Z | lib/animu/web/views/account/user_view.ex | elarkham/Animu | 0f0c7b0b34168e69255943bdede60e03df057a44 | [
"MIT"
] | null | null | null | lib/animu/web/views/account/user_view.ex | elarkham/Animu | 0f0c7b0b34168e69255943bdede60e03df057a44 | [
"MIT"
] | null | null | null | defmodule Animu.Web.UserView do
use Animu.Web, :view
def render("index.json", %{users: users}) do
%{users: render_many(users, Animu.Web.UserView, "user.json")}
end
def render("show.json", %{user: user}) do
%{user: render_one(user, Animu.Web.UserView, "user.json")}
end
def render("user.json", %{us... | 23.714286 | 65 | 0.628514 |
6263f0b9172dcd5ea9e4bed1f747b948073601ae | 239 | exs | Elixir | priv/repo/migrations/20171213193854_add_processed_to_lines.exs | sobolevn/docdog-engine | 5f7ad60465063fac3d56574f2bf27a4a52d0a91e | [
"MIT"
] | null | null | null | priv/repo/migrations/20171213193854_add_processed_to_lines.exs | sobolevn/docdog-engine | 5f7ad60465063fac3d56574f2bf27a4a52d0a91e | [
"MIT"
] | null | null | null | priv/repo/migrations/20171213193854_add_processed_to_lines.exs | sobolevn/docdog-engine | 5f7ad60465063fac3d56574f2bf27a4a52d0a91e | [
"MIT"
] | null | null | null | defmodule Docdog.Repo.Migrations.AddProcessedToLines do
use Ecto.Migration
def change do
alter table(:lines) do
add :processed, :boolean, default: false, null: false
end
create index(:lines, [:processed])
end
end
| 19.916667 | 59 | 0.702929 |
6263f4ea2c3d2548aef5e949fed121e3c43f8457 | 231 | ex | Elixir | web/controller/hello.ex | irisTa56/mygear | 5f1d8404ea01521df12c32d17aa5afb87ec8448e | [
"Apache-2.0"
] | null | null | null | web/controller/hello.ex | irisTa56/mygear | 5f1d8404ea01521df12c32d17aa5afb87ec8448e | [
"Apache-2.0"
] | null | null | null | web/controller/hello.ex | irisTa56/mygear | 5f1d8404ea01521df12c32d17aa5afb87ec8448e | [
"Apache-2.0"
] | null | null | null | defmodule Mygear.Controller.Hello do
use Antikythera.Controller
def hello(conn) do
Mygear.Gettext.put_locale(conn.request.query_params["locale"] || "en")
Conn.render(conn, 200, "hello", [gear_name: :mygear])
end
end
| 25.666667 | 74 | 0.722944 |
626429be36873a932f3ae466863ae0e951e15984 | 1,272 | exs | Elixir | lib/mix/test/mix/shell/quiet_test.exs | mk/elixir | 2b2c66ecf7b1cc2167cae9cc3e88f950994223f1 | [
"Apache-2.0"
] | 4 | 2015-12-22T02:46:39.000Z | 2016-04-26T06:11:09.000Z | lib/mix/test/mix/shell/quiet_test.exs | mk/elixir | 2b2c66ecf7b1cc2167cae9cc3e88f950994223f1 | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/shell/quiet_test.exs | mk/elixir | 2b2c66ecf7b1cc2167cae9cc3e88f950994223f1 | [
"Apache-2.0"
] | 1 | 2017-07-25T21:46:48.000Z | 2017-07-25T21:46:48.000Z | Code.require_file "../../test_helper.exs", __DIR__
defmodule Mix.Shell.QuietTest do
use MixTest.Case
import ExUnit.CaptureIO
import Mix.Shell.Quiet
test "prints nothing to stdio when info is invoked" do
assert capture_io(fn ->
info "hello"
end) == ""
end
test "prints error message to stder... | 28.266667 | 90 | 0.617138 |
6264356598d2c17d712c6fdb1cb859b8e5c317bd | 611 | ex | Elixir | lib/basic/blogs/blog.ex | ysaito8015/communitex | d469447a62029d59883d95df4df3c9b09e0022e2 | [
"Apache-2.0"
] | 7 | 2021-07-14T15:45:55.000Z | 2022-01-25T11:13:01.000Z | lib/basic/blogs/blog.ex | ysaito8015/communitex | d469447a62029d59883d95df4df3c9b09e0022e2 | [
"Apache-2.0"
] | 10 | 2021-08-09T15:54:05.000Z | 2022-02-17T04:18:38.000Z | lib/basic/blogs/blog.ex | ysaito8015/communitex | d469447a62029d59883d95df4df3c9b09e0022e2 | [
"Apache-2.0"
] | 5 | 2021-07-23T05:54:35.000Z | 2022-01-28T04:14:51.000Z | defmodule Basic.Blogs.Blog do
use Ecto.Schema
import Ecto.Changeset
schema "blogs" do
field :body, :string
field :deleted_at, :naive_datetime
field :image, :string
field :likes, :integer
field :post_id, :string
field :tags, :string
field :title, :string
field :user_id, :integer
... | 23.5 | 99 | 0.648118 |
626459a80d34e98486fd93bab1b560be4090fd63 | 1,768 | ex | Elixir | web/live/todo/board/index_view.ex | noozo/live_view_trello_clone | 7400f1c1d4d5bcaf92f3bc9d12df500118dba61f | [
"MIT"
] | 18 | 2020-07-10T12:48:23.000Z | 2022-01-17T16:05:55.000Z | web/live/todo/board/index_view.ex | noozo/live_view_trello_clone | 7400f1c1d4d5bcaf92f3bc9d12df500118dba61f | [
"MIT"
] | null | null | null | web/live/todo/board/index_view.ex | noozo/live_view_trello_clone | 7400f1c1d4d5bcaf92f3bc9d12df500118dba61f | [
"MIT"
] | 2 | 2020-07-10T12:48:25.000Z | 2020-07-10T18:47:59.000Z | defmodule Apps.TrelloClone.Web.Live.Todo.Board.IndexView do
@moduledoc """
List all the boards
"""
use Phoenix.LiveView
import Noozo.Pagination
alias Apps.TrelloClone.Contexts.Todo
alias Apps.TrelloClone.Web.Live.Todo.Board.CreateView
alias Apps.TrelloClone.Web.Live.Todo.Board.EditView
alias Apps.Tr... | 28.063492 | 102 | 0.585973 |
62645f05aa6ef3997916b5b7bf502d546a3f15cd | 1,019 | ex | Elixir | elixir/beer-song/lib/beer_song.ex | jiegillet/exercism | bf901cd477aede9d06f322dae0763c968688806d | [
"MIT"
] | null | null | null | elixir/beer-song/lib/beer_song.ex | jiegillet/exercism | bf901cd477aede9d06f322dae0763c968688806d | [
"MIT"
] | null | null | null | elixir/beer-song/lib/beer_song.ex | jiegillet/exercism | bf901cd477aede9d06f322dae0763c968688806d | [
"MIT"
] | null | null | null | defmodule BeerSong do
@doc """
Get a single verse of the beer song
"""
@spec verse(integer) :: String.t()
def verse(0) do
"""
No more bottles of beer on the wall, no more bottles of beer.
Go to the store and buy some more, 99 bottles of beer on the wall.
"""
end
def verse(1) do
"""
... | 24.853659 | 75 | 0.612365 |
62646f6ca9c98faf77bb48afffafef4d9eaf6147 | 6,311 | exs | Elixir | test/validation_test.exs | lbighetti/exop | 206381c493610d3161f8fddd4d00028477daa7e3 | [
"MIT"
] | 202 | 2016-08-28T13:35:58.000Z | 2021-11-20T20:13:41.000Z | test/validation_test.exs | lbighetti/exop | 206381c493610d3161f8fddd4d00028477daa7e3 | [
"MIT"
] | 34 | 2016-10-25T13:04:39.000Z | 2021-05-19T07:35:35.000Z | test/validation_test.exs | lbighetti/exop | 206381c493610d3161f8fddd4d00028477daa7e3 | [
"MIT"
] | 22 | 2016-11-30T14:25:58.000Z | 2021-06-19T11:52:03.000Z | defmodule ValidationTest do
use ExUnit.Case, async: false
doctest Exop.Validation
import Exop.Validation
defmodule TestStruct do
defstruct ~w(a b)a
end
setup do
contract = [
%{
name: :param,
opts: [required: true, type: :string]
},
%{
name: :param2,
... | 26.628692 | 101 | 0.542545 |
626477a93f6c0916a6e80860d84412798afdc92b | 1,692 | ex | Elixir | clients/vision/lib/google_api/vision/v1/model/lat_long_rect.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/vision/lib/google_api/vision/v1/model/lat_long_rect.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/vision/lib/google_api/vision/v1/model/lat_long_rect.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 33.84 | 103 | 0.725177 |
62648a287fb683095caf7e89f24047ec9909f0b6 | 1,173 | ex | Elixir | other/using-phoenix/fall/lib/fall/endpoint.ex | MaraniMatias/elixir-hola-mundo | 325a6ba623378521ec6f79bd4627a0eb7c6cd1fa | [
"MIT"
] | 1 | 2016-12-25T09:53:53.000Z | 2016-12-25T09:53:53.000Z | other/using-phoenix/fall/lib/fall/endpoint.ex | MaraniMatias/elixir-hola-mundo | 325a6ba623378521ec6f79bd4627a0eb7c6cd1fa | [
"MIT"
] | null | null | null | other/using-phoenix/fall/lib/fall/endpoint.ex | MaraniMatias/elixir-hola-mundo | 325a6ba623378521ec6f79bd4627a0eb7c6cd1fa | [
"MIT"
] | null | null | null | defmodule Fall.Endpoint do
use Phoenix.Endpoint, otp_app: :fall
socket "/socket", Fall.UserSocket
# Serve at "/" the static files from "priv/static" directory.
#
# You should set gzip to true if you are running phoenix.digest
# when deploying your static files in production.
plug Plug.Static,
at: "/... | 27.27907 | 69 | 0.709292 |
6264978331d870dab20488715f706dfea8e84ad6 | 1,087 | ex | Elixir | test/support/channel_case.ex | treetopdevs/distillery-aws-example | aa09b96490dd2d1052d1e580f02e3328b1b366bc | [
"Apache-2.0"
] | null | null | null | test/support/channel_case.ex | treetopdevs/distillery-aws-example | aa09b96490dd2d1052d1e580f02e3328b1b366bc | [
"Apache-2.0"
] | null | null | null | test/support/channel_case.ex | treetopdevs/distillery-aws-example | aa09b96490dd2d1052d1e580f02e3328b1b366bc | [
"Apache-2.0"
] | null | null | null | defmodule ClecodesExWeb.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.175 | 72 | 0.729531 |
6264a6950ff5f7aba0399a05e3377a9647235a46 | 5,059 | exs | Elixir | test/batcher/message_test.exs | vvuk/bors-ng | 607f0eac378cea7658b89213897f14cf256222f8 | [
"Apache-2.0"
] | null | null | null | test/batcher/message_test.exs | vvuk/bors-ng | 607f0eac378cea7658b89213897f14cf256222f8 | [
"Apache-2.0"
] | 1 | 2020-03-07T08:28:14.000Z | 2020-03-07T08:28:14.000Z | test/batcher/message_test.exs | vvuk/bors-ng | 607f0eac378cea7658b89213897f14cf256222f8 | [
"Apache-2.0"
] | null | null | null | defmodule BorsNG.Worker.BatcherMessageTest do
use ExUnit.Case, async: true
alias BorsNG.Worker.Batcher.Message
test "generate configuration problem message" do
expected_message = "# Configuration problem\nExample problem"
actual_message = Message.generate_message({:config, "Example problem"})
assert... | 29.412791 | 108 | 0.660012 |
6264af36756e808be7cfa82c8caac281d3856493 | 1,085 | ex | Elixir | lib/asciinema/email.ex | acloudiator/asciinema-server | f0afa4cb4312822f5dd56008b0c5ec9c7a410f85 | [
"Apache-2.0"
] | 1 | 2021-07-07T12:36:10.000Z | 2021-07-07T12:36:10.000Z | lib/asciinema/email.ex | acloudiator/asciinema-server | f0afa4cb4312822f5dd56008b0c5ec9c7a410f85 | [
"Apache-2.0"
] | null | null | null | lib/asciinema/email.ex | acloudiator/asciinema-server | f0afa4cb4312822f5dd56008b0c5ec9c7a410f85 | [
"Apache-2.0"
] | null | null | null | defmodule Asciinema.Email do
use Bamboo.Phoenix, view: AsciinemaWeb.EmailView
import Bamboo.Email
def signup_email(email_address, signup_url) do
base_email()
|> to(email_address)
|> subject("Welcome to #{instance_hostname()}")
|> render("signup.text", signup_url: signup_url)
|> render("signup... | 27.125 | 73 | 0.693088 |
6264b94f24e067ef8dd7cd5a7bbdd71c74f5469a | 1,907 | exs | Elixir | clients/sts/mix.exs | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/sts/mix.exs | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/sts/mix.exs | 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... | 28.462687 | 175 | 0.660724 |
6264c7c2e5c762ac9b759175eade25f3ad3c0893 | 637 | exs | Elixir | apps/exred_ui/priv/repo/migrations/20180105224845_create_flows.exs | exredorg/exred | 0ece8e6680747ba8f30b4413ede598a45495aa7c | [
"MIT"
] | null | null | null | apps/exred_ui/priv/repo/migrations/20180105224845_create_flows.exs | exredorg/exred | 0ece8e6680747ba8f30b4413ede598a45495aa7c | [
"MIT"
] | null | null | null | apps/exred_ui/priv/repo/migrations/20180105224845_create_flows.exs | exredorg/exred | 0ece8e6680747ba8f30b4413ede598a45495aa7c | [
"MIT"
] | null | null | null | defmodule ExredUI.Repo.Migrations.CreateFlows do
use Ecto.Migration
def change do
create table(:flows, primary_key: false) do
add :id, :uuid, primary_key: true
add :name, :string
add :type, :string
add :info, :string
add :config, :map
add :service_id, references(:services, o... | 30.333333 | 203 | 0.686028 |
6264e4e324ab8fa7d934c4a045e5e2bdb1c4c519 | 1,552 | ex | Elixir | lib/shikoba_web.ex | vertico/vertico-test | af68000ff99450cf5686d7c5b803931f267c8e19 | [
"MIT"
] | 3 | 2021-11-23T23:07:34.000Z | 2021-11-24T01:40:01.000Z | lib/shikoba_web.ex | vertico/vertico-test | af68000ff99450cf5686d7c5b803931f267c8e19 | [
"MIT"
] | null | null | null | lib/shikoba_web.ex | vertico/vertico-test | af68000ff99450cf5686d7c5b803931f267c8e19 | [
"MIT"
] | 1 | 2021-07-19T11:48:30.000Z | 2021-07-19T11:48:30.000Z | defmodule ShikobaWeb 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 ShikobaWeb, :controller
use ShikobaWeb, :view
The definitions below will be executed for every view,
controller, ... | 23.164179 | 83 | 0.69201 |
6265175b067242be35634fc02cf5aba4d85ba08e | 2,723 | exs | Elixir | test/kazan/request_test.exs | chazsconi/kazan | da42cef9686584ed7b46428780d099ce77dae3ea | [
"MIT"
] | null | null | null | test/kazan/request_test.exs | chazsconi/kazan | da42cef9686584ed7b46428780d099ce77dae3ea | [
"MIT"
] | null | null | null | test/kazan/request_test.exs | chazsconi/kazan | da42cef9686584ed7b46428780d099ce77dae3ea | [
"MIT"
] | null | null | null | defmodule RequestTest do
use ExUnit.Case, async: true
alias Kazan.Request
alias Kazan.Models.Api.V1
alias Kazan.Models.ApiMachinery.Apis.Meta.V1.ObjectMeta
describe "Request.create" do
test "building a get request with no parameters" do
{:ok, request} = Request.create(
"listCoreV1PodForAll... | 32.035294 | 67 | 0.610356 |
62651db11507b660e529e307132a56a2691378da | 1,341 | ex | Elixir | web/models/message.ex | luca-apostoli/ruru-chat | d6c62000b78592f03cf56f63acd23a6404df1924 | [
"MIT"
] | 1 | 2017-04-22T12:36:19.000Z | 2017-04-22T12:36:19.000Z | web/models/message.ex | luca-apostoli/ruru-chat | d6c62000b78592f03cf56f63acd23a6404df1924 | [
"MIT"
] | null | null | null | web/models/message.ex | luca-apostoli/ruru-chat | d6c62000b78592f03cf56f63acd23a6404df1924 | [
"MIT"
] | null | null | null | defmodule Ruru.Message do
@moduledoc """
Ecto model for Messages
"""
use Ruru.Web, :model
@derive {Poison.Encoder, only: [:id, :text, :user, :operator, :inserted_at]}
schema "messages" do
field :text, :string
belongs_to :user, Ruru.User, foreign_key: :user_id
belongs_to :operator, Ruru.Ope... | 21.983607 | 78 | 0.634601 |
62651dcba16fca88e7bfba9f6ff79dafd8cf932e | 807 | exs | Elixir | test/devito/link_test.exs | supersimple/devito | 9b976849d934a9551450ca0459859e76c0929893 | [
"Apache-2.0"
] | 37 | 2020-07-23T16:05:32.000Z | 2022-02-04T07:06:17.000Z | test/devito/link_test.exs | supersimple/devito | 9b976849d934a9551450ca0459859e76c0929893 | [
"Apache-2.0"
] | 1 | 2020-08-03T03:58:57.000Z | 2020-08-05T03:06:37.000Z | test/devito/link_test.exs | supersimple/devito | 9b976849d934a9551450ca0459859e76c0929893 | [
"Apache-2.0"
] | 3 | 2020-07-24T22:43:08.000Z | 2021-05-30T17:43:45.000Z | defmodule Devito.LinkTest do
use ExUnit.Case
alias Devito.Link
describe "valid?/1" do
test "when given a valid link" do
assert Link.valid?(%Link{
url: "https://supersimple.org",
short_code: "srpsmpl",
count: 0,
created_at: DateTime.utc_now()
... | 24.454545 | 58 | 0.555143 |
62652283efda42aa72dad069e07ce82c6cbb8131 | 25,949 | ex | Elixir | lib/phoenix/endpoint.ex | kenta-aktsk/phoenix | e3c23a364af4f2283e2498fdb47c60161f262a1f | [
"MIT"
] | 1 | 2021-03-14T17:50:24.000Z | 2021-03-14T17:50:24.000Z | lib/phoenix/endpoint.ex | ogamw/phoenix | e3c23a364af4f2283e2498fdb47c60161f262a1f | [
"MIT"
] | null | null | null | lib/phoenix/endpoint.ex | ogamw/phoenix | e3c23a364af4f2283e2498fdb47c60161f262a1f | [
"MIT"
] | 2 | 2020-08-02T04:00:17.000Z | 2020-10-07T16:07:37.000Z | defmodule Phoenix.Endpoint do
@moduledoc """
Defines a Phoenix endpoint.
The endpoint is the boundary where all requests to your
web application start. It is also the interface your
application provides to the underlying web servers.
Overall, an endpoint has three responsibilities:
* to provide a wra... | 36.445225 | 105 | 0.683687 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.