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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7aaa143f2037abd54f232572787c4aaf40614478 | 2,442 | ex | Elixir | Elixir/Phoenix/chirp/lib/chirp/timeline.ex | Jac21/GistsCollection | 4200b0cecf00af443711ca127028fccbbe8cfbf5 | [
"MIT"
] | 5 | 2015-09-11T15:02:54.000Z | 2020-10-14T05:16:18.000Z | Elixir/Phoenix/chirp/lib/chirp/timeline.ex | Jac21/GistsCollection | 4200b0cecf00af443711ca127028fccbbe8cfbf5 | [
"MIT"
] | 21 | 2019-12-28T11:18:09.000Z | 2022-01-02T10:32:36.000Z | Elixir/Phoenix/chirp/lib/chirp/timeline.ex | Jac21/GistsCollection | 4200b0cecf00af443711ca127028fccbbe8cfbf5 | [
"MIT"
] | 2 | 2016-11-07T23:16:56.000Z | 2020-10-14T05:16:49.000Z | defmodule Chirp.Timeline do
@moduledoc """
The Timeline context.
"""
import Ecto.Query, warn: false
alias Chirp.Repo
alias Chirp.Timeline.Post
@doc """
Returns the list of posts.
## Examples
iex> list_posts()
[%Post{}, ...]
"""
def list_posts do
Repo.all(from p in Post, order... | 18.360902 | 66 | 0.581081 |
7aaa1e34f738d6580699c9769dff490221b38d2b | 540 | ex | Elixir | lib/test_pattern.ex | Bajena/the-ray-tracer-challenge | 8b18405fbfadd247c888660adf0a542e4f2024cd | [
"MIT"
] | 3 | 2020-03-23T09:41:07.000Z | 2021-06-03T00:14:24.000Z | lib/test_pattern.ex | Bajena/the-ray-tracer-challenge | 8b18405fbfadd247c888660adf0a542e4f2024cd | [
"MIT"
] | 17 | 2020-03-14T11:54:59.000Z | 2020-06-21T20:01:29.000Z | lib/test_pattern.ex | Bajena/the-ray-tracer-challenge | 8b18405fbfadd247c888660adf0a542e4f2024cd | [
"MIT"
] | null | null | null | defmodule RayTracer.TestPattern do
@moduledoc """
This module defines a test pattern
"""
alias RayTracer.Color
alias RayTracer.Matrix
alias RayTracer.RTuple
alias RayTracer.Pattern
@type t :: %__MODULE__{
transform: Matrix.matrix,
inv_transform: Matrix.matrix
}
use Pattern
defimpl Patt... | 20 | 60 | 0.712963 |
7aaa31b347c57b934f024a8aa9d4fd9ac3cd0418 | 1,659 | ex | Elixir | lib/readtome_web/endpoint.ex | zephraph/readtome | 64a5f773bdc3c19d9c5ac50a04aa14e446e36c55 | [
"MIT"
] | 1 | 2021-09-05T20:54:57.000Z | 2021-09-05T20:54:57.000Z | lib/readtome_web/endpoint.ex | zephraph/readtome | 64a5f773bdc3c19d9c5ac50a04aa14e446e36c55 | [
"MIT"
] | 17 | 2019-07-06T17:31:56.000Z | 2021-06-22T15:31:06.000Z | lib/readtome_web/endpoint.ex | zephraph/readtome | 64a5f773bdc3c19d9c5ac50a04aa14e446e36c55 | [
"MIT"
] | 1 | 2021-03-15T20:50:27.000Z | 2021-03-15T20:50:27.000Z | defmodule ReadtomeWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :readtome
socket("/socket", ReadtomeWeb.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... | 29.105263 | 112 | 0.704039 |
7aaa562d20b5cd72c4960dc641b2aa4a94a1af28 | 91 | ex | Elixir | lib/web_qa/repo.ex | KazuCocoa/web_qa | cd0074e950ef354eeafb7d48db685c82d653cc60 | [
"MIT"
] | null | null | null | lib/web_qa/repo.ex | KazuCocoa/web_qa | cd0074e950ef354eeafb7d48db685c82d653cc60 | [
"MIT"
] | null | null | null | lib/web_qa/repo.ex | KazuCocoa/web_qa | cd0074e950ef354eeafb7d48db685c82d653cc60 | [
"MIT"
] | null | null | null | defmodule WebQaVote.Repo do
@moduledoc false
use Ecto.Repo, otp_app: :web_qa_vote
end
| 15.166667 | 38 | 0.769231 |
7aaa6c0a5507422b83583005ee7044889bc6a253 | 673 | exs | Elixir | priv/repo/migrations/20220109205119_create_exchange_rate_requests_table.exs | ding-an-sich/ex_change_rate | 89858694dc98cef6d21089599120600a075c93db | [
"MIT"
] | null | null | null | priv/repo/migrations/20220109205119_create_exchange_rate_requests_table.exs | ding-an-sich/ex_change_rate | 89858694dc98cef6d21089599120600a075c93db | [
"MIT"
] | null | null | null | priv/repo/migrations/20220109205119_create_exchange_rate_requests_table.exs | ding-an-sich/ex_change_rate | 89858694dc98cef6d21089599120600a075c93db | [
"MIT"
] | null | null | null | defmodule ExChangeRate.Repo.Migrations.CreateExchangeRateRequestsTable do
use Ecto.Migration
def up do
create table("exchange_rate_requests", primary_key: false) do
add :id, :binary_id, primary_key: true
add :user_id, :binary_id, null: false
add :to, :string, null: false
add :from, :str... | 28.041667 | 73 | 0.692422 |
7aaa74471588b858c11b821ca93b9230c6f1542e | 3,255 | exs | Elixir | lib/mix/test/mix/project_test.exs | patrickgombert/elixir | dc4b7c89ea30a9734d9f1cbf3bb1612fada498d4 | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/project_test.exs | patrickgombert/elixir | dc4b7c89ea30a9734d9f1cbf3bb1612fada498d4 | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/project_test.exs | patrickgombert/elixir | dc4b7c89ea30a9734d9f1cbf3bb1612fada498d4 | [
"Apache-2.0"
] | 1 | 2020-12-07T08:04:16.000Z | 2020-12-07T08:04:16.000Z | Code.require_file "../test_helper.exs", __DIR__
defmodule Mix.ProjectTest do
use MixTest.Case
defmodule SampleProject do
def project do
[app: :sample, hello: "world"]
end
end
test "push and pop projects" do
refute Mix.Project.get
Mix.Project.push(SampleProject, "sample")
assert Mix.... | 30.707547 | 92 | 0.677112 |
7aaaad41d98ab3995a4f1db18dfa5c1a53e86f01 | 2,177 | exs | Elixir | config/dev.exs | bglusman/elixir-companies | d6a728cf9136888367e261feb876c5d2a266ed57 | [
"MIT"
] | 333 | 2019-05-18T14:01:17.000Z | 2022-03-22T05:07:40.000Z | config/dev.exs | bglusman/elixir-companies | d6a728cf9136888367e261feb876c5d2a266ed57 | [
"MIT"
] | 89 | 2019-05-18T10:01:54.000Z | 2021-05-12T15:19:26.000Z | config/dev.exs | envato/elixir-companies | 7488075d1a372c9ca8fa6603f93e384b73977526 | [
"MIT"
] | 33 | 2019-06-07T00:33:53.000Z | 2022-03-21T05:38:28.000Z | use Mix.Config
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with webpack to recompile .js and .css sources.
config :companies, CompaniesWeb.Endpoint,
http: [port: ... | 27.556962 | 68 | 0.691318 |
7aaab90081bc6d6980eb18e864947d2c2bffd921 | 2,411 | ex | Elixir | clients/health_care/lib/google_api/health_care/v1beta1/model/google_cloud_healthcare_v1beta1_annotation_gcs_source.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/health_care/lib/google_api/health_care/v1beta1/model/google_cloud_healthcare_v1beta1_annotation_gcs_source.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/health_care/lib/google_api/health_care/v1beta1/model/google_cloud_healthcare_v1beta1_annotation_gcs_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... | 46.365385 | 899 | 0.757362 |
7aaac6f459217e6791b8a117ff6fb686c5af7bb1 | 2,728 | ex | Elixir | clients/dataflow/lib/google_api/dataflow/v1b3/model/disk.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/dataflow/lib/google_api/dataflow/v1b3/model/disk.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/dataflow/lib/google_api/dataflow/v1b3/model/disk.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 38.422535 | 119 | 0.716276 |
7aaacd32d4d6bc1d60d2706fef36bde39d7516a4 | 4,286 | ex | Elixir | lib/ci_automatic_test_timing_splitter.ex | gempesaw/ci_test_timing_splitter | a887f63eca4664ccf3e1d12a9fcec5f6bb0bd088 | [
"MIT"
] | null | null | null | lib/ci_automatic_test_timing_splitter.ex | gempesaw/ci_test_timing_splitter | a887f63eca4664ccf3e1d12a9fcec5f6bb0bd088 | [
"MIT"
] | null | null | null | lib/ci_automatic_test_timing_splitter.ex | gempesaw/ci_test_timing_splitter | a887f63eca4664ccf3e1d12a9fcec5f6bb0bd088 | [
"MIT"
] | null | null | null | import SweetXml
defmodule CiAutomaticTestTimingSplitter do
def main(args \\ []) do
{timings, count, index} =
args
|> parse_args
|> build_timings_hash
case count do
nil ->
determine_optimal_parallel({timings, 2, index})
_ ->
do_greedy_number_partitioning({timing... | 28.765101 | 142 | 0.578861 |
7aaae868079845b3423086478d14bce5f1abb236 | 573 | exs | Elixir | test/views/error_view_test.exs | cazrin/stranger | 887dfe52c8b934cf6fd0d598d64c3735da96d4e1 | [
"MIT"
] | 50 | 2016-01-24T11:45:47.000Z | 2016-08-26T20:20:20.000Z | test/views/error_view_test.exs | dnlgrv/stranger | 887dfe52c8b934cf6fd0d598d64c3735da96d4e1 | [
"MIT"
] | 1 | 2016-01-24T20:21:19.000Z | 2016-01-28T11:26:10.000Z | test/views/error_view_test.exs | dnlgrv/stranger | 887dfe52c8b934cf6fd0d598d64c3735da96d4e1 | [
"MIT"
] | 3 | 2017-03-17T12:46:09.000Z | 2021-01-14T19:41:01.000Z | defmodule Stranger.ErrorViewTest do
use Stranger.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(Stranger.ErrorView, "404.html", []) ==
"Page not found"
end
test "render 500.html" ... | 26.045455 | 66 | 0.678883 |
7aab1698c6ab988b2a2bf7d275a3ba4aabcbf9a3 | 29,459 | ex | Elixir | lib/elixir/lib/list.ex | inoas/elixir | 55954483d57f059fc899c62a4310a3054a7808f0 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/list.ex | inoas/elixir | 55954483d57f059fc899c62a4310a3054a7808f0 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/list.ex | inoas/elixir | 55954483d57f059fc899c62a4310a3054a7808f0 | [
"Apache-2.0"
] | null | null | null | defmodule List do
@moduledoc """
Functions that work on (linked) lists.
Many of the functions provided for lists, which implement
the `Enumerable` protocol, are found in the `Enum` module.
Additionally, the following functions and operators for lists are
found in `Kernel`:
* `++/2`
* `--/2`
*... | 25.286695 | 98 | 0.607862 |
7aab1e3dd4583eb5cf72abe0555a4b2466345c08 | 16,528 | exs | Elixir | apps/ewallet/test/ewallet/web/filters/match_all_query_test.exs | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 322 | 2018-02-28T07:38:44.000Z | 2020-05-27T23:09:55.000Z | apps/ewallet/test/ewallet/web/filters/match_all_query_test.exs | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 643 | 2018-02-28T12:05:20.000Z | 2020-05-22T08:34:38.000Z | apps/ewallet/test/ewallet/web/filters/match_all_query_test.exs | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 63 | 2018-02-28T10:57:06.000Z | 2020-05-27T23:10:38.000Z | # Copyright 2018-2019 OmiseGO Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 28.794425 | 96 | 0.62258 |
7aab1fba070928405c5529aad8253d7a13d673c6 | 5,632 | ex | Elixir | apps/data/lib/grapevine_data/authorizations.ex | sb8244/grapevine | effaaa01294d30114090c20f9cc40b8665d834f2 | [
"MIT"
] | 107 | 2018-10-05T18:20:32.000Z | 2022-02-28T04:02:50.000Z | apps/data/lib/grapevine_data/authorizations.ex | sb8244/grapevine | effaaa01294d30114090c20f9cc40b8665d834f2 | [
"MIT"
] | 33 | 2018-10-05T14:11:18.000Z | 2022-02-10T22:19:18.000Z | apps/data/lib/grapevine_data/authorizations.ex | sb8244/grapevine | effaaa01294d30114090c20f9cc40b8665d834f2 | [
"MIT"
] | 18 | 2019-02-03T03:08:20.000Z | 2021-12-28T04:29:36.000Z | defmodule GrapevineData.Authorizations do
@moduledoc """
Authorize remote logins
"""
import Ecto.Query
alias GrapevineData.Authorizations.AccessToken
alias GrapevineData.Authorizations.Authorization
alias GrapevineData.Games
alias GrapevineData.Repo
@doc """
Check for a username before allowing o... | 24.810573 | 139 | 0.630682 |
7aab2c3690cabe0ae0079d92fb9221d77c9c8ad9 | 71 | ex | Elixir | web/views/layout_view.ex | molossus/api | 39da836aa244239ad8bf55371f3e1573541eeb7a | [
"BSD-2-Clause"
] | 1 | 2016-02-23T11:31:18.000Z | 2016-02-23T11:31:18.000Z | web/views/layout_view.ex | molossus/api | 39da836aa244239ad8bf55371f3e1573541eeb7a | [
"BSD-2-Clause"
] | null | null | null | web/views/layout_view.ex | molossus/api | 39da836aa244239ad8bf55371f3e1573541eeb7a | [
"BSD-2-Clause"
] | null | null | null | defmodule BalanceSheet.LayoutView do
use BalanceSheet.Web, :view
end
| 17.75 | 36 | 0.816901 |
7aab559e858ab1f16184a8dfc08695a4de92981f | 5,990 | exs | Elixir | config/config.exs | ffMathy/analytics | 4e8c06076a7a94c4ad3b2410437f2b0ab31e1f8e | [
"MIT"
] | null | null | null | config/config.exs | ffMathy/analytics | 4e8c06076a7a94c4ad3b2410437f2b0ab31e1f8e | [
"MIT"
] | 2 | 2020-07-09T21:44:35.000Z | 2020-07-14T07:06:10.000Z | config/config.exs | ffMathy/analytics | 4e8c06076a7a94c4ad3b2410437f2b0ab31e1f8e | [
"MIT"
] | null | null | null | use Mix.Config
config :plausible,
admin_user: System.get_env("ADMIN_USER_NAME", "admin"),
admin_email: System.get_env("ADMIN_USER_EMAIL", "admin@plausible.local"),
mailer_email: System.get_env("MAILER_EMAIL", "hello@plausible.local"),
admin_pwd: System.get_env("ADMIN_USER_PWD", "!@d3in"),
ecto_repos: [Plausi... | 31.861702 | 92 | 0.717362 |
7aab93974ef9ec62603d85092b9e21adeac9df15 | 241 | exs | Elixir | priv/repo/migrations/20201230151148_add_short_name_to_schools.exs | jfcloutier/freegiving | 2ab3821595996fc295c5b55515d6f60cbce05181 | [
"Unlicense"
] | null | null | null | priv/repo/migrations/20201230151148_add_short_name_to_schools.exs | jfcloutier/freegiving | 2ab3821595996fc295c5b55515d6f60cbce05181 | [
"Unlicense"
] | null | null | null | priv/repo/migrations/20201230151148_add_short_name_to_schools.exs | jfcloutier/freegiving | 2ab3821595996fc295c5b55515d6f60cbce05181 | [
"Unlicense"
] | null | null | null | defmodule Freegiving.Repo.Migrations.AddShortNameToSchools do
use Ecto.Migration
def change do
alter table("schools") do
add :short_name, :string, null: false
end
create unique_index("schools", :short_name)
end
end
| 20.083333 | 61 | 0.721992 |
7aab967ca9fd38d06a553e705f80759c63c8cf37 | 666 | ex | Elixir | lib/server/connectionregistry.ex | 3decibels/yams | c00bfb02f8c0e41d94afcd1a2d2dbf248fce5be0 | [
"MIT"
] | null | null | null | lib/server/connectionregistry.ex | 3decibels/yams | c00bfb02f8c0e41d94afcd1a2d2dbf248fce5be0 | [
"MIT"
] | null | null | null | lib/server/connectionregistry.ex | 3decibels/yams | c00bfb02f8c0e41d94afcd1a2d2dbf248fce5be0 | [
"MIT"
] | null | null | null | defmodule Yams.Server.ConnectionRegistry do
@moduledoc """
This module registers connection processes for lookup
"""
@doc """
Starts a `Yams.Server.ConnectionRegistry` process linked to the current process.
"""
def start_link(), do: Registry.start_link(keys: :unique, name: __MODULE__, partitions: System.... | 28.956522 | 116 | 0.711712 |
7aabb5832361b5687a1eb4d3c34620afbab0ae79 | 1,674 | ex | Elixir | apps/graphql/lib/graphql/schema/base/base.ex | michaeljguarino/forge | 50ee583ecb4aad5dee4ef08fce29a8eaed1a0824 | [
"Apache-2.0"
] | 59 | 2021-09-16T19:29:39.000Z | 2022-03-31T20:44:24.000Z | apps/graphql/lib/graphql/schema/base/base.ex | michaeljguarino/forge | 50ee583ecb4aad5dee4ef08fce29a8eaed1a0824 | [
"Apache-2.0"
] | 111 | 2021-08-15T09:56:37.000Z | 2022-03-31T23:59:32.000Z | apps/graphql/lib/graphql/schema/base/base.ex | michaeljguarino/chartmart | a34c949cc29d6a1ab91c04c5e4f797e6f0daabfc | [
"Apache-2.0"
] | 4 | 2021-12-13T09:43:01.000Z | 2022-03-29T18:08:44.000Z | defmodule GraphQl.Schema.Base do
defmacro __using__(_) do
quote do
use Absinthe.Schema.Notation
use Absinthe.Relay.Schema.Notation, :modern
import Absinthe.Resolution.Helpers
import GraphQl.Schema.Helpers
import GraphQl.Schema.Base
alias GraphQl.Middleware.Authenticated
end... | 22.32 | 97 | 0.600956 |
7aabd7b24a9f01cf7970c3e3145388b4035c7584 | 1,574 | ex | Elixir | lib/live_sup/queries/metric_value_query.ex | livesup-dev/livesup | eaf9ffc78d3043bd9e3408f0f4df26ed16eb8446 | [
"Apache-2.0",
"MIT"
] | null | null | null | lib/live_sup/queries/metric_value_query.ex | livesup-dev/livesup | eaf9ffc78d3043bd9e3408f0f4df26ed16eb8446 | [
"Apache-2.0",
"MIT"
] | 3 | 2022-02-23T15:51:48.000Z | 2022-03-14T22:52:43.000Z | lib/live_sup/queries/metric_value_query.ex | livesup-dev/livesup | eaf9ffc78d3043bd9e3408f0f4df26ed16eb8446 | [
"Apache-2.0",
"MIT"
] | null | null | null | defmodule LiveSup.Queries.MetricValueQuery do
import Ecto.Query
alias LiveSup.Repo
alias LiveSup.Schemas.{MetricValue, Metric}
import Logger
def get!(id) do
base() |> Repo.get!(id)
end
def delete_all() do
base() |> Repo.delete_all()
end
def all() do
Repo.all(MetricValue)
end
def in... | 19.195122 | 59 | 0.595299 |
7aabd7bc4693343834236266a6c8895df53a7bfb | 1,549 | ex | Elixir | phx/praxkit/lib/praxkit_web/views/error_helpers.ex | zoosky/praxkit | 4b4fe1af274e79e1a4f728a94ff58468f0fe13e0 | [
"Apache-2.0"
] | null | null | null | phx/praxkit/lib/praxkit_web/views/error_helpers.ex | zoosky/praxkit | 4b4fe1af274e79e1a4f728a94ff58468f0fe13e0 | [
"Apache-2.0"
] | 5 | 2021-02-28T14:39:51.000Z | 2021-02-28T14:43:10.000Z | phx/praxkit/lib/praxkit_web/views/error_helpers.ex | zoosky/praxkit | 4b4fe1af274e79e1a4f728a94ff58468f0fe13e0 | [
"Apache-2.0"
] | 1 | 2018-09-19T17:53:28.000Z | 2018-09-19T17:53:28.000Z | defmodule PraxkitWeb.ErrorHelpers do
@moduledoc """
Conveniences for translating and building error messages.
"""
use Phoenix.HTML
@doc """
Generates tag for inlined form input errors.
"""
def error_tag(form, field) do
Enum.map(Keyword.get_values(form.errors, field), fn error ->
content_tag(... | 32.270833 | 76 | 0.665591 |
7aabede07327c6f8fc7fc7757de87ee7bc1debb0 | 1,554 | ex | Elixir | clients/content/lib/google_api/content/v2/model/shipment_tracking_info.ex | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/shipment_tracking_info.ex | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/shipment_tracking_info.ex | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"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... | 31.08 | 103 | 0.725869 |
7aac0544a2c99556febf5b46f07b51a72bff30d2 | 417 | ex | Elixir | lib/pg_contrivance/transformer.ex | plamb/pg_contrivance | fa33d75a792e15662c3cdf98f1d20a11f43772b1 | [
"BSD-3-Clause"
] | null | null | null | lib/pg_contrivance/transformer.ex | plamb/pg_contrivance | fa33d75a792e15662c3cdf98f1d20a11f43772b1 | [
"BSD-3-Clause"
] | null | null | null | lib/pg_contrivance/transformer.ex | plamb/pg_contrivance | fa33d75a792e15662c3cdf98f1d20a11f43772b1 | [
"BSD-3-Clause"
] | null | null | null | defmodule PgContrivance.Transformer do
@moduledoc false
def lists_to_map(columns, rows) do
Enum.map rows, fn(r) ->
columns
|> Enum.zip(r)
|> Enum.into(Map.new)
end
end
def lists_to_map(columns, rows, keys: :atoms) do
Enum.map rows, fn(r) ->
columns
|> Enum.zip(r)
... | 18.954545 | 80 | 0.597122 |
7aac59ff6f2ffc64105411312b514528e9ba6e79 | 159 | exs | Elixir | examples/typed_gen_server/test/typed_gen_server_test.exs | Fl4m3Ph03n1x/gradient | 60d7d3fe2ebdf68747325c1e852959f8b92fdcee | [
"Apache-2.0"
] | 75 | 2021-11-17T11:55:13.000Z | 2022-03-28T04:35:04.000Z | examples/typed_gen_server/test/typed_gen_server_test.exs | Fl4m3Ph03n1x/gradient | 60d7d3fe2ebdf68747325c1e852959f8b92fdcee | [
"Apache-2.0"
] | 48 | 2021-11-15T13:56:14.000Z | 2022-03-31T15:55:47.000Z | examples/typed_gen_server/test/typed_gen_server_test.exs | Fl4m3Ph03n1x/gradient | 60d7d3fe2ebdf68747325c1e852959f8b92fdcee | [
"Apache-2.0"
] | 6 | 2021-12-22T20:41:27.000Z | 2022-03-09T09:07:38.000Z | defmodule TypedGenServerTest do
use ExUnit.Case
doctest TypedGenServer
test "greets the world" do
assert TypedGenServer.hello() == :world
end
end
| 17.666667 | 43 | 0.748428 |
7aac99591436526645e518f5faee5fdb96281f08 | 5,018 | ex | Elixir | clients/big_query/lib/google_api/big_query/v2/model/job_statistics.ex | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"Apache-2.0"
] | null | null | null | clients/big_query/lib/google_api/big_query/v2/model/job_statistics.ex | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"Apache-2.0"
] | null | null | null | clients/big_query/lib/google_api/big_query/v2/model/job_statistics.ex | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"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... | 52.821053 | 277 | 0.696692 |
7aacf9b4f870c4de606607767e73a1b0e38c7402 | 458 | exs | Elixir | priv/repo/migrations/20190130185358_create_user_roles.exs | jmhthethird/assoc | d73c556f398d01258cbc17b6de58a621a6bc4397 | [
"MIT"
] | 6 | 2019-01-31T23:31:42.000Z | 2020-10-06T20:05:34.000Z | priv/repo/migrations/20190130185358_create_user_roles.exs | jmhthethird/assoc | d73c556f398d01258cbc17b6de58a621a6bc4397 | [
"MIT"
] | 2 | 2021-11-09T14:35:51.000Z | 2021-11-09T18:04:15.000Z | priv/repo/migrations/20190130185358_create_user_roles.exs | jmhthethird/assoc | d73c556f398d01258cbc17b6de58a621a6bc4397 | [
"MIT"
] | 2 | 2019-01-31T23:53:33.000Z | 2021-11-05T21:47:26.000Z | defmodule Assoc.Test.Repo.Migrations.CreateUserRoles do
use Ecto.Migration
def change do
create table(:user_roles) do
add :user_id, references(:users, on_delete: :delete_all), null: false
add :role_id, references(:roles, on_delete: :delete_all), null: false
add :created_by_id, references(:use... | 30.533333 | 81 | 0.709607 |
7aad021ed3eefffaa67bbca8dee53aab15959d13 | 320 | ex | Elixir | lib/changelog/formatter.ex | zorbash/changelog | 1fdfcdb1ec7fba54e09d4d8eb21f2c4935f1491c | [
"MIT"
] | 1 | 2022-03-21T08:50:35.000Z | 2022-03-21T08:50:35.000Z | lib/changelog/formatter.ex | zorbash/changelog | 1fdfcdb1ec7fba54e09d4d8eb21f2c4935f1491c | [
"MIT"
] | null | null | null | lib/changelog/formatter.ex | zorbash/changelog | 1fdfcdb1ec7fba54e09d4d8eb21f2c4935f1491c | [
"MIT"
] | null | null | null | defmodule Changelog.Formatter do
@moduledoc """
A simple formatter for changelogs.
"""
@doc "It removes changes older than the given version"
def format(changelog, version) do
changelog
|> String.replace(~r/# Changelog(\n+)?/si, "")
|> String.replace(~r/##? +v?\[?#{version}\]?.*/s, "")
end
end
| 24.615385 | 57 | 0.628125 |
7aad070def98eab51509689db25942aa76e20248 | 1,106 | ex | Elixir | lib/excg/builder/yaml.ex | laozhp/excg | be946bc19011bf17f35d4fa01ed69ad1a0b9dcaa | [
"MIT"
] | 1 | 2016-08-17T09:34:07.000Z | 2016-08-17T09:34:07.000Z | lib/excg/builder/yaml.ex | laozhp/excg | be946bc19011bf17f35d4fa01ed69ad1a0b9dcaa | [
"MIT"
] | 3 | 2015-09-17T02:47:35.000Z | 2015-09-18T02:51:49.000Z | lib/excg/builder/yaml.ex | laozhp/excg | be946bc19011bf17f35d4fa01ed69ad1a0b9dcaa | [
"MIT"
] | null | null | null | defmodule Excg.Builder.Yaml do
def build_fields(excg, align, cfg, data) do
tab = " "
map = cfg.map
type_map = excg.type_map
space = String.duplicate(tab, align)
list = cfg.info[:cli_out] || cfg.list
for {fld_name, i} <- Enum.with_index(list) do
%{kind: kind, name: name, type: type} = m... | 29.891892 | 73 | 0.480108 |
7aad31aca3c79b545ec66082487ca9b99407baae | 32 | ex | Elixir | apps/gobstopper_api/lib/gobstopper.api.ex | ScrimpyCat/gobstopper | 41a64991d8fb809065a52d09f8f4c6c707ae3403 | [
"BSD-2-Clause"
] | 3 | 2017-05-02T12:53:07.000Z | 2017-05-28T11:53:15.000Z | apps/gobstopper_api/lib/gobstopper.api.ex | ScrimpyCat/gobstopper | 41a64991d8fb809065a52d09f8f4c6c707ae3403 | [
"BSD-2-Clause"
] | null | null | null | apps/gobstopper_api/lib/gobstopper.api.ex | ScrimpyCat/gobstopper | 41a64991d8fb809065a52d09f8f4c6c707ae3403 | [
"BSD-2-Clause"
] | 1 | 2019-10-24T11:55:23.000Z | 2019-10-24T11:55:23.000Z | defmodule Gobstopper.API do
end
| 10.666667 | 27 | 0.84375 |
7aad457dc494c9de4a1c4d9ff5b0529f2d6abf64 | 78 | ex | Elixir | test/support/xml_builder.ex | mpotra/ex_sni | ff2187da7208348a315eda03fe086a3ce5ded27c | [
"MIT"
] | null | null | null | test/support/xml_builder.ex | mpotra/ex_sni | ff2187da7208348a315eda03fe086a3ce5ded27c | [
"MIT"
] | 1 | 2022-01-14T10:43:25.000Z | 2022-01-14T10:43:25.000Z | test/support/xml_builder.ex | elixir-desktop/ex_sni | 9bbd4f18e271ddd66db54afd6409149fc6bebe4f | [
"MIT"
] | null | null | null | defprotocol ExSni.XML.Builder do
@fallback_to_any true
def encode!(t)
end
| 15.6 | 32 | 0.769231 |
7aad5bb2164db8863c4d98d0c103de47363a70b1 | 1,224 | ex | Elixir | memory_backend/lib/memory_backend_web/controllers/card_controller.ex | AdrianPaulCarrieres/lpiot2020-memory-adrianpaulcarrieres | 0a2d66c6ecf501188a949807c8ea2d99c26c531b | [
"MIT"
] | null | null | null | memory_backend/lib/memory_backend_web/controllers/card_controller.ex | AdrianPaulCarrieres/lpiot2020-memory-adrianpaulcarrieres | 0a2d66c6ecf501188a949807c8ea2d99c26c531b | [
"MIT"
] | 15 | 2020-12-23T16:09:28.000Z | 2020-12-26T22:32:47.000Z | memory_backend/lib/memory_backend_web/controllers/card_controller.ex | AdrianPaulCarrieres/lpiot2020-memory-adrianpaulcarrieres | 0a2d66c6ecf501188a949807c8ea2d99c26c531b | [
"MIT"
] | null | null | null | defmodule MemoryBackendWeb.CardController do
use MemoryBackendWeb, :controller
alias MemoryBackend.Model
alias MemoryBackend.Model.Card
action_fallback MemoryBackendWeb.FallbackController
def index(conn, %{"deck_id" => deck_id}) do
deck = Model.get_deck!(deck_id)
render(conn, "index.json", cards: d... | 26.608696 | 87 | 0.638889 |
7aad8e65476f9b4b2bcb91b1e5c499ee7d1cb8c4 | 60 | exs | Elixir | config/bonfire_editor_ck.exs | bonfire-networks/bonfire_editor_ck | a215d58d1e81119bdb6d8ea609615269db3112fa | [
"MIT"
] | 1 | 2022-03-11T13:09:11.000Z | 2022-03-11T13:09:11.000Z | config/bonfire_editor_ck.exs | bonfire-networks/bonfire_editor_ck | a215d58d1e81119bdb6d8ea609615269db3112fa | [
"MIT"
] | null | null | null | config/bonfire_editor_ck.exs | bonfire-networks/bonfire_editor_ck | a215d58d1e81119bdb6d8ea609615269db3112fa | [
"MIT"
] | null | null | null | import Config
config :bonfire_editor_ck,
disabled: false
| 12 | 26 | 0.8 |
7aade026206f0d72cf1d7f15bb077ca82374485a | 1,123 | exs | Elixir | config/config.exs | bschaeffer/timeout | e36e5e5b02536204f36af65e53e8aa3ca534ea21 | [
"MIT"
] | 4 | 2018-03-15T03:55:43.000Z | 2022-01-27T23:17:07.000Z | config/config.exs | bschaeffer/timeout | e36e5e5b02536204f36af65e53e8aa3ca534ea21 | [
"MIT"
] | null | null | null | config/config.exs | bschaeffer/timeout | e36e5e5b02536204f36af65e53e8aa3ca534ea21 | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the paren... | 36.225806 | 73 | 0.751558 |
7aae0d033f76ecab97c31c026ead89108d88d6cf | 7,862 | ex | Elixir | lib/absinthe/blueprint/schema.ex | TheRealReal/absinthe | 6eae5bc36283e58f42d032b8afd90de3ad64f97b | [
"MIT"
] | 2 | 2021-04-22T23:45:04.000Z | 2021-05-07T01:01:15.000Z | lib/absinthe/blueprint/schema.ex | TheRealReal/absinthe | 6eae5bc36283e58f42d032b8afd90de3ad64f97b | [
"MIT"
] | 1 | 2020-04-07T23:46:38.000Z | 2020-04-07T23:46:38.000Z | lib/absinthe/blueprint/schema.ex | TheRealReal/absinthe | 6eae5bc36283e58f42d032b8afd90de3ad64f97b | [
"MIT"
] | null | null | null | defmodule Absinthe.Blueprint.Schema do
@moduledoc false
alias __MODULE__
alias Absinthe.Blueprint
@type directive_t :: Schema.DirectiveDefinition.t()
@type type_t ::
Blueprint.Schema.EnumTypeDefinition.t()
| Blueprint.Schema.InputObjectTypeDefinition.t()
| Blueprint.Schema.In... | 31.701613 | 101 | 0.646782 |
7aae4588445f346216abe172655e1e9798f478db | 596 | ex | Elixir | lib/node.ex | uhoreg/ex_remote_dockers | c4df4c0d3838cbbb6326d79f9400ea1050e3f49f | [
"MIT"
] | 7 | 2019-09-30T23:14:51.000Z | 2021-11-08T12:11:08.000Z | lib/node.ex | uhoreg/ex_remote_dockers | c4df4c0d3838cbbb6326d79f9400ea1050e3f49f | [
"MIT"
] | 5 | 2018-02-26T08:45:37.000Z | 2018-04-03T13:30:44.000Z | lib/node.ex | uhoreg/ex_remote_dockers | c4df4c0d3838cbbb6326d79f9400ea1050e3f49f | [
"MIT"
] | 3 | 2019-09-30T23:22:21.000Z | 2020-10-04T18:24:40.000Z | defmodule RemoteDockers.Node do
alias RemoteDockers.Client
alias RemoteDockers.NodeConfig
@info_uri "/v1.35/info"
@doc """
Get Node info
"""
@spec info!(NodeConfig.t()) :: map()
def info!(%NodeConfig{} = node_config) do
response =
@info_uri
|> Client.build_uri(node_config)
|> Cli... | 21.285714 | 77 | 0.642617 |
7aae539859f4f27933c2edaf0e226daa4a54a195 | 11,126 | ex | Elixir | lib/pow_assent/ecto/user_identities/context.ex | mitcheaton1/pow_assent | f3e9e6cc7dd16a3f2d9add885bd160d227abb713 | [
"MIT"
] | null | null | null | lib/pow_assent/ecto/user_identities/context.ex | mitcheaton1/pow_assent | f3e9e6cc7dd16a3f2d9add885bd160d227abb713 | [
"MIT"
] | null | null | null | lib/pow_assent/ecto/user_identities/context.ex | mitcheaton1/pow_assent | f3e9e6cc7dd16a3f2d9add885bd160d227abb713 | [
"MIT"
] | null | null | null | defmodule PowAssent.Ecto.UserIdentities.Context do
@moduledoc """
Handles pow assent user identity context for user identities.
## Usage
This module will be used by PowAssent by default. If you wish to have control
over context methods, you can do configure
`lib/my_project/user_identities/user_identities.... | 35.320635 | 212 | 0.682635 |
7aae83d7ab13e50e1e3cf316ccf1779fcab418bc | 893 | ex | Elixir | web/controllers/auth_controller.ex | bschmeck/ex_gnarl | 25d6961795f10a2d49efd1a29167a771ef9772f1 | [
"MIT"
] | null | null | null | web/controllers/auth_controller.ex | bschmeck/ex_gnarl | 25d6961795f10a2d49efd1a29167a771ef9772f1 | [
"MIT"
] | 1 | 2017-04-21T17:02:56.000Z | 2017-04-21T17:02:56.000Z | web/controllers/auth_controller.ex | bschmeck/ex_gnarl | 25d6961795f10a2d49efd1a29167a771ef9772f1 | [
"MIT"
] | null | null | null | defmodule ExGnarl.AuthController do
require Logger
use ExGnarl.Web, :controller
plug Ueberauth
alias ExGnarl.User, as: User
def callback(%{assigns: %{ueberauth_auth: auth}} = conn, _params) do
case find_or_create(auth.provider, auth.info) do
{:ok, user} ->
conn
|> put_flash(:info,... | 24.805556 | 70 | 0.548712 |
7aaea732d3a32027e9da44bb4f943bab1c52be16 | 1,057 | ex | Elixir | lib/qmi/user_identity.ex | nerves-networking/qmi | d0e826636900a79e3c204f59ce5155985441472c | [
"Apache-2.0"
] | 2 | 2021-05-26T19:12:46.000Z | 2021-06-09T02:21:49.000Z | lib/qmi/user_identity.ex | nerves-networking/qmi | d0e826636900a79e3c204f59ce5155985441472c | [
"Apache-2.0"
] | 8 | 2021-05-27T19:57:03.000Z | 2022-02-10T20:04:06.000Z | lib/qmi/user_identity.ex | nerves-networking/qmi | d0e826636900a79e3c204f59ce5155985441472c | [
"Apache-2.0"
] | 1 | 2022-02-18T20:29:11.000Z | 2022-02-18T20:29:11.000Z | defmodule QMI.UserIdentity do
@moduledoc """
Provides commands related to the user identity service
"""
alias QMI.Codec
@doc """
Send a request to read a transparent file
"""
@spec read_transparent(QMI.name(), non_neg_integer(), non_neg_integer()) ::
{:ok, Codec.UserIdentity.read_transparent... | 27.102564 | 82 | 0.663198 |
7aaeabf5de9424697cb30211c70afd4456c4b7ab | 2,606 | ex | Elixir | clients/vision/lib/google_api/vision/v1/model/google_cloud_vision_v1p2beta1_page.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/vision/lib/google_api/vision/v1/model/google_cloud_vision_v1p2beta1_page.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/vision/lib/google_api/vision/v1/model/google_cloud_vision_v1p2beta1_page.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... | 40.71875 | 174 | 0.723331 |
7aaed1bd6c3fc53cf8e22f5a09adeef91bc8d55c | 801 | ex | Elixir | lib/turbo_html/theme_adapter/semantic.ex | drnikon/turbo_html | 12e69abb6dc66d09c6a4332f037c75f126ad222b | [
"MIT"
] | 4 | 2019-01-23T14:10:31.000Z | 2019-05-14T15:41:11.000Z | lib/turbo_html/theme_adapter/semantic.ex | drnikon/turbo_html | 12e69abb6dc66d09c6a4332f037c75f126ad222b | [
"MIT"
] | 35 | 2019-02-19T02:11:33.000Z | 2021-09-01T07:09:42.000Z | lib/turbo_html/theme_adapter/semantic.ex | drnikon/turbo_html | 12e69abb6dc66d09c6a4332f037c75f126ad222b | [
"MIT"
] | 4 | 2019-11-03T16:11:39.000Z | 2022-03-05T14:34:23.000Z | defmodule Turbo.HTML.ThemeAdapter.Semantic do
@moduledoc """
Semantic Theme.
"""
defmacro pagination_links(do: expression) do
quote do
Phoenix.HTML.Tag.content_tag :div, class: "ui pagination menu" do
unquote(expression)
end
end
end
defmacro page_link(url, :disabled, do: text) ... | 21.078947 | 72 | 0.63171 |
7aaefa2f92a640b23293c29c1c66a90634a029b9 | 504 | exs | Elixir | api_sample/config/test.exs | saiidalhalawi/phoenix-ansible | d03843256c20b74fd69bb48f058825785dd7fea2 | [
"Apache-2.0"
] | null | null | null | api_sample/config/test.exs | saiidalhalawi/phoenix-ansible | d03843256c20b74fd69bb48f058825785dd7fea2 | [
"Apache-2.0"
] | null | null | null | api_sample/config/test.exs | saiidalhalawi/phoenix-ansible | d03843256c20b74fd69bb48f058825785dd7fea2 | [
"Apache-2.0"
] | 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 :api_sample, ApiSample.Endpoint,
http: [port: 4001],
server: false
# Print only warnings and errors during test
config :logger, level: :warn
# Configure your database
config :api_sample, ApiSa... | 25.2 | 56 | 0.740079 |
7aaf07ff770b81b6720e1bf5ab1c0f28e3bc9094 | 251 | ex | Elixir | lib/bullish.ex | EssenceOfChaos/bullish | b5044a383b9aa1550b2a1ca40593de198f51ceec | [
"MIT"
] | 1 | 2019-04-24T03:04:23.000Z | 2019-04-24T03:04:23.000Z | lib/bullish.ex | EssenceOfChaos/bullish | b5044a383b9aa1550b2a1ca40593de198f51ceec | [
"MIT"
] | 3 | 2019-03-13T03:26:51.000Z | 2021-05-08T02:34:05.000Z | lib/bullish.ex | EssenceOfChaos/bullish | b5044a383b9aa1550b2a1ca40593de198f51ceec | [
"MIT"
] | 1 | 2019-03-07T04:56:16.000Z | 2019-03-07T04:56:16.000Z | defmodule Bullish do
@moduledoc """
Bullish keeps the contexts that define your domain
and business logic.
Contexts are also responsible for managing your data, regardless
if it comes from the database, an external API or others.
"""
end
| 25.1 | 66 | 0.752988 |
7aaf3a1770caa6c6137d6f943c7ed4650697f345 | 1,153 | exs | Elixir | config/config.exs | turbo-play/elixir-stellar-sdk | ed0711d69493ed2723a1197120667a7fa2c97f9f | [
"MIT"
] | 1 | 2019-12-19T14:12:20.000Z | 2019-12-19T14:12:20.000Z | config/config.exs | turbo-play/elixir-stellar-sdk | ed0711d69493ed2723a1197120667a7fa2c97f9f | [
"MIT"
] | null | null | null | config/config.exs | turbo-play/elixir-stellar-sdk | ed0711d69493ed2723a1197120667a7fa2c97f9f | [
"MIT"
] | 4 | 2019-10-09T20:58:35.000Z | 2021-12-06T23:00:46.000Z | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the paren... | 34.939394 | 73 | 0.753686 |
7aaf4ff23bb06c0cc170d8f706c8d178d72995f0 | 986 | exs | Elixir | point-mutations/point_mutations_test.exs | nickpellant/xelixir | 6e27dc7083ef3e423a1615f5151910672e6397a8 | [
"MIT"
] | null | null | null | point-mutations/point_mutations_test.exs | nickpellant/xelixir | 6e27dc7083ef3e423a1615f5151910672e6397a8 | [
"MIT"
] | null | null | null | point-mutations/point_mutations_test.exs | nickpellant/xelixir | 6e27dc7083ef3e423a1615f5151910672e6397a8 | [
"MIT"
] | null | null | null | if System.get_env("EXERCISM_TEST_EXAMPLES") do
Code.load_file("example.exs")
else
Code.load_file("point_mutations.exs")
end
ExUnit.start
ExUnit.configure exclude: :pending, trace: true
defmodule DNATest do
use ExUnit.Case, async: true
# @tag :pending
test "no difference between empty strands" do
assert... | 25.282051 | 74 | 0.718053 |
7aaf816e63ff06b3134e556e1d5711ecceb622de | 620 | exs | Elixir | elixir/hello_world/mix.exs | raventid/coursera_learning | 115a03f08d30d8ba49f02c9692c289cbfb242358 | [
"MIT"
] | 1 | 2019-11-28T09:26:00.000Z | 2019-11-28T09:26:00.000Z | elixir/hello_world/mix.exs | raventid/coursera_learning | 115a03f08d30d8ba49f02c9692c289cbfb242358 | [
"MIT"
] | null | null | null | elixir/hello_world/mix.exs | raventid/coursera_learning | 115a03f08d30d8ba49f02c9692c289cbfb242358 | [
"MIT"
] | null | null | null | defmodule HelloWorld.MixProject do
use Mix.Project
def project do
[
app: :hello_world,
version: "0.1.0",
elixir: "~> 1.6",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
ex... | 20.666667 | 88 | 0.580645 |
7aaf81b0e3b990a130173e3dd30d85486aa77120 | 2,315 | ex | Elixir | xarb/lib/xarb_web.ex | Erik-joh/examensarbete | 951847f0ee5195abc0e3aa5f2b6fff78233127ee | [
"MIT"
] | null | null | null | xarb/lib/xarb_web.ex | Erik-joh/examensarbete | 951847f0ee5195abc0e3aa5f2b6fff78233127ee | [
"MIT"
] | null | null | null | xarb/lib/xarb_web.ex | Erik-joh/examensarbete | 951847f0ee5195abc0e3aa5f2b6fff78233127ee | [
"MIT"
] | null | null | null | defmodule XarbWeb 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 XarbWeb, :controller
use XarbWeb, :view
The definitions below will be executed for every view,
controller, etc, so k... | 22.259615 | 78 | 0.677322 |
7aaf9998bcd897599156b8967be1cad244fa38ac | 678 | ex | Elixir | lib/wolves_and_rabbits_world_simulation_ui.ex | afronski/wolves-and-rabbits-world-simulation-ui | 78d93afd77a950411104e57a0c3a72c4e3aa1ba6 | [
"MIT"
] | 4 | 2015-08-18T01:02:59.000Z | 2017-07-23T19:44:57.000Z | lib/wolves_and_rabbits_world_simulation_ui.ex | afronski/wolves-and-rabbits-world-simulation-ui | 78d93afd77a950411104e57a0c3a72c4e3aa1ba6 | [
"MIT"
] | null | null | null | lib/wolves_and_rabbits_world_simulation_ui.ex | afronski/wolves-and-rabbits-world-simulation-ui | 78d93afd77a950411104e57a0c3a72c4e3aa1ba6 | [
"MIT"
] | 1 | 2021-01-04T18:19:49.000Z | 2021-01-04T18:19:49.000Z | defmodule WolvesAndRabbitsWorldSimulationUi do
use Application
def start(_type, _args) do
import Supervisor.Spec, warn: false
children = [
supervisor(WolvesAndRabbitsWorldSimulationUi.Endpoint, [])
]
:simulation_event_stream.remove_handler(:simulation_cli_handler)
:simulation_event_stre... | 29.478261 | 101 | 0.781711 |
7aafe4014b4045f44fe44bd7472038609b523445 | 2,419 | ex | Elixir | clients/access_context_manager/lib/google_api/access_context_manager/v1/model/ingress_to.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/access_context_manager/lib/google_api/access_context_manager/v1/model/ingress_to.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/access_context_manager/lib/google_api/access_context_manager/v1/model/ingress_to.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... | 48.38 | 496 | 0.761885 |
7aafe6838b6ce2321d1e4ede3ac983ae1e101c8a | 1,748 | exs | Elixir | test/ja_serializer/formatter/attribute_test.exs | gamesrol/ja_serializer | c48d8fb0fb742bd96c30acd40e24f7395f25af2c | [
"Apache-2.0"
] | null | null | null | test/ja_serializer/formatter/attribute_test.exs | gamesrol/ja_serializer | c48d8fb0fb742bd96c30acd40e24f7395f25af2c | [
"Apache-2.0"
] | null | null | null | test/ja_serializer/formatter/attribute_test.exs | gamesrol/ja_serializer | c48d8fb0fb742bd96c30acd40e24f7395f25af2c | [
"Apache-2.0"
] | null | null | null | defmodule JaSerializer.Formatter.AttributeTest do
use ExUnit.Case
@attr JaSerializer.Builder.Attribute
defmodule Example do
defstruct [:foo, :bar]
end
defmodule SimpleSerializer do
def type(_,_), do: "simple"
def attributes(data,_), do: data
end
defimpl JaSerializer.Formatter, for: [Exampl... | 28.193548 | 73 | 0.600114 |
7aafef5e365733fdb91a2ab2166a188d22001970 | 1,414 | ex | Elixir | lib/future_made_concerts/spotify/schema/device/name.ex | Future-Made/concerts-for-impact | 5532cd1be5252fa0ccb0b956f0961be8701e0e04 | [
"MIT"
] | null | null | null | lib/future_made_concerts/spotify/schema/device/name.ex | Future-Made/concerts-for-impact | 5532cd1be5252fa0ccb0b956f0961be8701e0e04 | [
"MIT"
] | null | null | null | lib/future_made_concerts/spotify/schema/device/name.ex | Future-Made/concerts-for-impact | 5532cd1be5252fa0ccb0b956f0961be8701e0e04 | [
"MIT"
] | null | null | null | defmodule FutureMadeConcerts.Spotify.Schema.Device.Name do
@moduledoc """
This module contains logic to generate player names with a reasonable degree
of entropy without the need of a stateful generator.
Player names are supposed to be unique for a given user/session. A user is
likely to have < 10 clients op... | 29.458333 | 78 | 0.679632 |
7aaff0580bd3ac4c1f77f1bc731fd63d92d3c1e6 | 559 | ex | Elixir | apps/common/lib/struct/mod.ex | gregredhead/belethor | 255925396b18ba4a6950f386abf8a9e17a7e5e7c | [
"Apache-2.0"
] | 3 | 2018-07-20T22:14:36.000Z | 2018-12-21T19:54:48.000Z | apps/common/lib/struct/mod.ex | gregredhead/belethor | 255925396b18ba4a6950f386abf8a9e17a7e5e7c | [
"Apache-2.0"
] | 36 | 2018-09-15T21:46:54.000Z | 2020-03-28T16:10:18.000Z | apps/common/lib/struct/mod.ex | gregredhead/belethor | 255925396b18ba4a6950f386abf8a9e17a7e5e7c | [
"Apache-2.0"
] | 2 | 2018-07-22T08:47:07.000Z | 2021-12-11T01:39:19.000Z | defmodule Common.Struct.Mod do
@moduledoc """
Represents a mod.
"""
alias Common.Struct.Mod
@enforce_keys [:name, :description, :published]
defstruct [
:name,
:description,
:published,
:sse,
:oldrim,
:images,
:tags
]
@typedoc "typespec for a mod"
@type t :: %Mod{}
def ... | 15.108108 | 49 | 0.592129 |
7aaffc79ce8a49a1a47e302c7ebad577fae6a550 | 2,821 | ex | Elixir | lib/money/parser/combinators.ex | conceivably/money | af00c5b2023054fecb36fe71547251f656d12fdb | [
"Apache-2.0"
] | null | null | null | lib/money/parser/combinators.ex | conceivably/money | af00c5b2023054fecb36fe71547251f656d12fdb | [
"Apache-2.0"
] | null | null | null | lib/money/parser/combinators.ex | conceivably/money | af00c5b2023054fecb36fe71547251f656d12fdb | [
"Apache-2.0"
] | null | null | null | defmodule Money.Combinators do
@moduledoc false
import NimbleParsec
# Whitespace as defined by Unicode set :Zs plus tab
@whitespace [?\s, ?\t, 0xa0, 0x1680, 0x2000, 0x202F, 0x205f, 0x3000]
def whitespace do
repeat(utf8_char(@whitespace))
|> label("whitespace")
end
@separators [?., ?,, ?،, ?٫, ?... | 22.75 | 70 | 0.566466 |
7ab01a61e6f1b6bda5822fdf5198f3831b83914f | 3,031 | ex | Elixir | lib/adoptoposs/accounts.ex | paulgoetze/adoptoposs | 1a143917ac5a192f12054fff4410a1ee18935353 | [
"MIT"
] | 120 | 2020-03-30T13:58:40.000Z | 2022-03-30T10:17:50.000Z | lib/adoptoposs/accounts.ex | paulgoetze/adoptoposs | 1a143917ac5a192f12054fff4410a1ee18935353 | [
"MIT"
] | 34 | 2020-04-01T23:11:59.000Z | 2022-03-13T08:14:37.000Z | lib/adoptoposs/accounts.ex | paulgoetze/adoptoposs | 1a143917ac5a192f12054fff4410a1ee18935353 | [
"MIT"
] | 16 | 2020-04-24T17:14:23.000Z | 2022-03-27T22:32:48.000Z | defmodule Adoptoposs.Accounts do
@moduledoc """
The Accounts context.
"""
import Ecto.Query, warn: false
alias Adoptoposs.Repo
alias Adoptoposs.Accounts.{User, UserFromAuth}
alias Ueberauth.Auth
@doc """
Gets a single user.
Raises `Ecto.NoResultsError` if the User does not exist.
## Examples
... | 18.595092 | 97 | 0.592874 |
7ab028621511b1c3295b1af4e81a0a6f3154e9ab | 29,926 | ex | Elixir | lib/elixir/lib/gen_server.ex | eproxus/elixir | 1c3a3bde539bc96c80d917fbcf3c9dc9e123860b | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/gen_server.ex | eproxus/elixir | 1c3a3bde539bc96c80d917fbcf3c9dc9e123860b | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/gen_server.ex | eproxus/elixir | 1c3a3bde539bc96c80d917fbcf3c9dc9e123860b | [
"Apache-2.0"
] | null | null | null | defmodule GenServer do
@moduledoc """
A behaviour module for implementing the server of a client-server relation.
A GenServer is a process like any other Elixir process and it can be used
to keep state, execute code asynchronously and so on. The advantage of using
a generic server process (GenServer) impleme... | 37.360799 | 122 | 0.686894 |
7ab02e4c7efa6f053bb7ead9f242ac49c2a6412b | 14,293 | exs | Elixir | test/assent/strategies/oauth2_test.exs | Nayshins/assent | 0e98827a1783701a99d765c7cde8bc40a2b9c10d | [
"MIT"
] | null | null | null | test/assent/strategies/oauth2_test.exs | Nayshins/assent | 0e98827a1783701a99d765c7cde8bc40a2b9c10d | [
"MIT"
] | null | null | null | test/assent/strategies/oauth2_test.exs | Nayshins/assent | 0e98827a1783701a99d765c7cde8bc40a2b9c10d | [
"MIT"
] | null | null | null | defmodule Assent.Strategy.OAuth2Test do
use Assent.Test.OAuth2TestCase
alias Assent.{CallbackCSRFError, CallbackError, Config.MissingKeyError, MissingParamError, RequestError, Strategy.OAuth2}
@client_id "id"
@client_secret "secret"
@private_key_id "key_id"
@private_key """
-----BEGIN RSA PRIVATE KEY-... | 45.810897 | 186 | 0.700903 |
7ab055c02232a9b431b3a8f99a9532d2ef36e2cf | 1,667 | exs | Elixir | mix.exs | markolson/turbo_ecto | 7833236baf08e68d2477139c1adc44424bee2756 | [
"MIT"
] | null | null | null | mix.exs | markolson/turbo_ecto | 7833236baf08e68d2477139c1adc44424bee2756 | [
"MIT"
] | null | null | null | mix.exs | markolson/turbo_ecto | 7833236baf08e68d2477139c1adc44424bee2756 | [
"MIT"
] | null | null | null | defmodule Turbo.Ecto.MixProject do
use Mix.Project
@version "0.5.1"
@github "https://github.com/zven21/turbo_ecto"
def project do
[
app: :turbo_ecto,
description: "A elixir lib for search, sort, paginate.",
version: @version,
elixir: "~> 1.6",
start_permanent: Mix.env() == :p... | 23.478873 | 65 | 0.536293 |
7ab07a7db81dd60ebe657dd4dad7f327b4a42dbe | 3,510 | ex | Elixir | lib/astarte_flow_web/telemetry.ex | Pavinati/astarte_flow | 82b6bee82e23907f7623a94a072239591b19b9d8 | [
"Apache-2.0"
] | 11 | 2020-01-30T17:44:35.000Z | 2022-01-13T19:17:21.000Z | lib/astarte_flow_web/telemetry.ex | Pavinati/astarte_flow | 82b6bee82e23907f7623a94a072239591b19b9d8 | [
"Apache-2.0"
] | 100 | 2020-02-11T10:01:35.000Z | 2022-02-17T10:39:35.000Z | lib/astarte_flow_web/telemetry.ex | Pavinati/astarte_flow | 82b6bee82e23907f7623a94a072239591b19b9d8 | [
"Apache-2.0"
] | 7 | 2020-01-30T11:33:20.000Z | 2021-05-03T09:48:41.000Z | #
# This file is part of Astarte.
#
# Copyright 2020 Ispirata Srl
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | 28.536585 | 88 | 0.628205 |
7ab09e75ef6720d7f28086295c59c8beb43671f3 | 845 | ex | Elixir | apps/eigr_functions/lib/functions/crdt/supervisor.ex | sleipnir/permastate-elixir | 43cda3a186819c9cfd3ce993907f24251c9ef42b | [
"Apache-2.0"
] | 2 | 2021-07-28T23:02:24.000Z | 2021-07-29T00:34:42.000Z | apps/eigr_functions/lib/functions/crdt/supervisor.ex | sleipnir/permastate-elixir | 43cda3a186819c9cfd3ce993907f24251c9ef42b | [
"Apache-2.0"
] | null | null | null | apps/eigr_functions/lib/functions/crdt/supervisor.ex | sleipnir/permastate-elixir | 43cda3a186819c9cfd3ce993907f24251c9ef42b | [
"Apache-2.0"
] | 1 | 2021-07-28T21:31:12.000Z | 2021-07-28T21:31:12.000Z | defmodule Functions.CRDT.Supervisor do
@moduledoc false
use DynamicSupervisor
@impl true
def init(_opts) do
DynamicSupervisor.init(strategy: :one_for_one)
end
@spec start_link(any) :: :ignore | {:error, any} | {:ok, pid}
def start_link(opts) do
DynamicSupervisor.start_link(__MODULE__, opts, nam... | 26.40625 | 86 | 0.671006 |
7ab0c37d69983cbbdb8cbb684dce8dd0b56dec91 | 3,047 | ex | Elixir | clients/container/lib/google_api/container/v1/model/set_node_pool_management_request.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/container/lib/google_api/container/v1/model/set_node_pool_management_request.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/container/lib/google_api/container/v1/model/set_node_pool_management_request.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 49.145161 | 270 | 0.720381 |
7ab0f8c5c9dff3ecbfa4281e855e23014098e380 | 1,807 | exs | Elixir | rel/config.exs | ramortegui/pdf_calendar | 38f367aa505c7f7374cedc34c51e6640f6f983ee | [
"MIT"
] | null | null | null | rel/config.exs | ramortegui/pdf_calendar | 38f367aa505c7f7374cedc34c51e6640f6f983ee | [
"MIT"
] | 2 | 2021-03-08T23:54:52.000Z | 2021-05-08T00:14:57.000Z | rel/config.exs | ramortegui/pdf_calendar | 38f367aa505c7f7374cedc34c51e6640f6f983ee | [
"MIT"
] | null | null | null | # Import all plugins from `rel/plugins`
# They can then be used by adding `plugin MyPlugin` to
# either an environment, or release definition, where
# `MyPlugin` is the name of the plugin module.
~w(rel plugins *.exs)
|> Path.join()
|> Path.wildcard()
|> Enum.map(&Code.eval_file(&1))
use Mix.Releases.Config,
# Thi... | 32.267857 | 81 | 0.732706 |
7ab10d5cccc1f7cecb7e1419aecf53a3c19ccf3d | 2,579 | ex | Elixir | clients/sheets/lib/google_api/sheets/v4/model/data_source_object_reference.ex | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"Apache-2.0"
] | null | null | null | clients/sheets/lib/google_api/sheets/v4/model/data_source_object_reference.ex | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"Apache-2.0"
] | null | null | null | clients/sheets/lib/google_api/sheets/v4/model/data_source_object_reference.ex | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"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.711864 | 174 | 0.739822 |
7ab111a240533696d5b66c3d95b23084339d95ea | 1,793 | ex | Elixir | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/conversion_error.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/conversion_error.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/conversion_error.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... | 33.830189 | 176 | 0.715003 |
7ab1441c4c7e9fe6861ebf53db779282c178a323 | 6,634 | ex | Elixir | lib/mix_templates/cache.ex | drumusician/mix_templates | ff84eab7c1067427685a6621caea8506e1514202 | [
"Apache-2.0"
] | 98 | 2017-04-18T18:33:07.000Z | 2022-01-24T09:59:48.000Z | lib/mix_templates/cache.ex | drumusician/mix_templates | ff84eab7c1067427685a6621caea8506e1514202 | [
"Apache-2.0"
] | 15 | 2017-04-28T14:49:27.000Z | 2018-12-28T00:03:08.000Z | lib/mix_templates/cache.ex | drumusician/mix_templates | ff84eab7c1067427685a6621caea8506e1514202 | [
"Apache-2.0"
] | 20 | 2017-04-27T14:36:17.000Z | 2021-12-06T13:36:03.000Z | defmodule MixTemplates.Cache do
use Private
alias MixTemplates.{Docs, Specs}
@moduledoc """
Manage the cache of local templates. These are stored as Elixir projects
under `MIX_HOME/templates`.
"""
@doc """
Return a list of locally installed templates.
"""
def list() do
template_projects()
... | 24.389706 | 107 | 0.577178 |
7ab1469e2ba295170c1d7e4b0ccaa74143eea100 | 6,591 | ex | Elixir | lib/game/session/login.ex | NatTuck/ex_venture | 7a74d33025a580f1e3e93d3755f22258eb3e9127 | [
"MIT"
] | null | null | null | lib/game/session/login.ex | NatTuck/ex_venture | 7a74d33025a580f1e3e93d3755f22258eb3e9127 | [
"MIT"
] | null | null | null | lib/game/session/login.ex | NatTuck/ex_venture | 7a74d33025a580f1e3e93d3755f22258eb3e9127 | [
"MIT"
] | null | null | null | defmodule Game.Session.Login do
@moduledoc """
Login workflow
Displays the MOTD and asks for a login, then password. Will push off to
creating an account if that is asked for.
"""
use Networking.Socket
use Game.Environment
import Game.Gettext, only: [dgettext: 2]
require Logger
alias Data.Repo
... | 26.576613 | 112 | 0.644515 |
7ab159880773726f102ef3240711efeca0277fd4 | 990 | ex | Elixir | lib/spelt_web/controllers/r0/login_controller.ex | jec/spelt | b6e5070226b646e1eb5dfc28453db7e7bf5030d9 | [
"BSD-3-Clause"
] | null | null | null | lib/spelt_web/controllers/r0/login_controller.ex | jec/spelt | b6e5070226b646e1eb5dfc28453db7e7bf5030d9 | [
"BSD-3-Clause"
] | null | null | null | lib/spelt_web/controllers/r0/login_controller.ex | jec/spelt | b6e5070226b646e1eb5dfc28453db7e7bf5030d9 | [
"BSD-3-Clause"
] | null | null | null | defmodule SpeltWeb.R0.LoginController do
use SpeltWeb, :controller
def show(conn, _params) do
json(conn, %{flows: Enum.map(Spelt.Auth.login_types(), fn x -> %{type: x} end)})
end
def create(conn, params) do
case Spelt.Auth.log_in(params) do
{:ok, _, body} ->
conn
|> put_status(20... | 23.023256 | 88 | 0.578788 |
7ab1a0a1e894cbe9b430d480784ebd2c3011daee | 1,065 | ex | Elixir | lib/hello_web/router.ex | michaelroudnitski/hello-phoenix | 3fee75784948b37732a0feba1a31e22b83281e7f | [
"Apache-2.0"
] | 3 | 2020-12-21T07:31:53.000Z | 2021-07-07T05:11:32.000Z | lib/hello_web/router.ex | michaelroudnitski/hello-phoenix | 3fee75784948b37732a0feba1a31e22b83281e7f | [
"Apache-2.0"
] | null | null | null | lib/hello_web/router.ex | michaelroudnitski/hello-phoenix | 3fee75784948b37732a0feba1a31e22b83281e7f | [
"Apache-2.0"
] | null | null | null | defmodule HelloWeb.Router do
use HelloWeb, :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
scope "/", HelloWeb do
pipe_throug... | 24.767442 | 70 | 0.695775 |
7ab1a4b54db9bcba2c8adf8cc7f0333c675e08ef | 2,638 | ex | Elixir | clients/drive_activity/lib/google_api/drive_activity/v2/model/action.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/drive_activity/lib/google_api/drive_activity/v2/model/action.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/drive_activity/lib/google_api/drive_activity/v2/model/action.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.245902 | 161 | 0.723275 |
7ab1c39ebc3d7df64d027856304df3a3c6c1438d | 2,780 | ex | Elixir | lib/movement/migrator.ex | isshindev/accent | ae4c13139b0a0dfd64ff536b94c940a4e2862150 | [
"BSD-3-Clause"
] | 806 | 2018-04-07T20:40:33.000Z | 2022-03-30T01:39:57.000Z | lib/movement/migrator.ex | isshindev/accent | ae4c13139b0a0dfd64ff536b94c940a4e2862150 | [
"BSD-3-Clause"
] | 194 | 2018-04-07T13:49:37.000Z | 2022-03-30T19:58:45.000Z | lib/movement/migrator.ex | isshindev/accent | ae4c13139b0a0dfd64ff536b94c940a4e2862150 | [
"BSD-3-Clause"
] | 89 | 2018-04-09T13:55:49.000Z | 2022-03-24T07:09:31.000Z | defmodule Movement.Migrator do
@moduledoc """
Route action to the module which will execute it or return
a value without a function call.
Module used to execute operation should implement the `Migration` behaviour.
## Exemple
# Given an `up` operation:
%{action: :correct_conflict}
... | 54.509804 | 103 | 0.707914 |
7ab1d9b1bf61d380f4cbc08b307bc926c8a56882 | 1,228 | ex | Elixir | lib/rak/discovery.ex | rak/rak | cdfcd7227b38d9c6cac10bd778b03361b28f67df | [
"MIT"
] | 2 | 2018-09-30T02:59:33.000Z | 2018-10-08T19:55:38.000Z | lib/rak/discovery.ex | rak/rak | cdfcd7227b38d9c6cac10bd778b03361b28f67df | [
"MIT"
] | null | null | null | lib/rak/discovery.ex | rak/rak | cdfcd7227b38d9c6cac10bd778b03361b28f67df | [
"MIT"
] | null | null | null | defmodule Rak.Discovery do
@moduledoc """
Defines the behavior expected from discovery components.
Discovery components are in charge of:
1. Topology discovery
2. Clustering
3. Sharding between end-user modules
"""
# Todo: event callback functions for discovered and disappeared
@doc """
Re... | 21.54386 | 81 | 0.655537 |
7ab1e2d3f30a9fa3ea5abf35bf7a315890103401 | 2,669 | ex | Elixir | apps/ewallet/lib/ewallet/policies/transaction_policy.ex | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | apps/ewallet/lib/ewallet/policies/transaction_policy.ex | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | apps/ewallet/lib/ewallet/policies/transaction_policy.ex | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 OmiseGO Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 33.3625 | 87 | 0.723867 |
7ab1ec25c788b8e7bb2aa62ecbc4f440d6cfbcfd | 394 | ex | Elixir | lib/authority/ecto.ex | infinitered/authority_ecto | 3d076b04c4ad4f5d5b89df990f91b45d1a45da19 | [
"MIT"
] | 11 | 2018-01-17T09:31:26.000Z | 2019-03-11T03:20:50.000Z | lib/authority/ecto.ex | infinitered/authority_ecto | 3d076b04c4ad4f5d5b89df990f91b45d1a45da19 | [
"MIT"
] | 24 | 2018-01-17T00:13:38.000Z | 2018-11-12T09:38:09.000Z | lib/authority/ecto.ex | infinitered/authority_ecto | 3d076b04c4ad4f5d5b89df990f91b45d1a45da19 | [
"MIT"
] | 3 | 2018-01-17T03:23:17.000Z | 2019-03-11T03:20:47.000Z | defmodule Authority.Ecto do
@moduledoc """
`Authority.Ecto` helps you implement the `Authority` authentication spec
for your application, using `Ecto` for persistence.
### Components
- `Authority.Ecto.Changeset`: Authentication-related `Ecto.Changeset`
functions.
- `Authority.Ecto.Template`: Implements... | 26.266667 | 74 | 0.738579 |
7ab1ec912d8a5f37ba5f6dd2c48f8c9058f66ded | 568 | exs | Elixir | 2021/day05/mix.exs | faried/advent | 1d3817a3c305963ff22e844630bbafd3af242d3e | [
"MIT"
] | null | null | null | 2021/day05/mix.exs | faried/advent | 1d3817a3c305963ff22e844630bbafd3af242d3e | [
"MIT"
] | null | null | null | 2021/day05/mix.exs | faried/advent | 1d3817a3c305963ff22e844630bbafd3af242d3e | [
"MIT"
] | null | null | null | defmodule Day05.MixProject do
use Mix.Project
def project do
[
app: :day05,
version: "0.1.0",
elixir: "~> 1.12",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applic... | 19.586207 | 87 | 0.573944 |
7ab1f45dff83a6f35a7da5ef257b33ee277074db | 1,125 | exs | Elixir | config/config.exs | dmorgan3405/elixir_katas | 76e5570eee55c548c773faea7615c5ee02f5d3ba | [
"MIT"
] | null | null | null | config/config.exs | dmorgan3405/elixir_katas | 76e5570eee55c548c773faea7615c5ee02f5d3ba | [
"MIT"
] | null | null | null | config/config.exs | dmorgan3405/elixir_katas | 76e5570eee55c548c773faea7615c5ee02f5d3ba | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the paren... | 36.290323 | 73 | 0.752889 |
7ab200b043a44fe838e17f8be7c7b89e5907e075 | 1,107 | ex | Elixir | lib/bible_study_spreadsheet_web/channels/user_socket.ex | dbishai/bible-study-spreadsheet | 9009cf8c343c215b2d8d6c1d8d24fd1ed2219434 | [
"MIT"
] | null | null | null | lib/bible_study_spreadsheet_web/channels/user_socket.ex | dbishai/bible-study-spreadsheet | 9009cf8c343c215b2d8d6c1d8d24fd1ed2219434 | [
"MIT"
] | 1 | 2021-03-10T06:25:15.000Z | 2021-03-10T06:25:15.000Z | lib/bible_study_spreadsheet_web/channels/user_socket.ex | dbishai/bible-study-spreadsheet | 9009cf8c343c215b2d8d6c1d8d24fd1ed2219434 | [
"MIT"
] | null | null | null | defmodule BibleStudySpreadsheetWeb.UserSocket do
use Phoenix.Socket
## Channels
# channel "room:*", BibleStudySpreadsheetWeb.RoomChannel
# Socket params are passed from the client and can
# be used to verify and authenticate a user. After
# verification, you can put default assigns into
# the socket tha... | 32.558824 | 96 | 0.70822 |
7ab22063bb17f51d44bf756e73c02e7863d5be72 | 7,287 | ex | Elixir | clients/games/lib/google_api/games/v1/api/snapshots.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/games/lib/google_api/games/v1/api/snapshots.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/games/lib/google_api/games/v1/api/snapshots.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... | 46.711538 | 244 | 0.632771 |
7ab22ded07b55f6e65656f630f11bfda57ccd706 | 1,523 | ex | Elixir | lib/ex_doc/group_matcher.ex | henrik/ex_doc | f09796782121f935e70cc51405d4773130fd70ca | [
"Apache-2.0",
"CC-BY-4.0"
] | 1,206 | 2015-01-02T02:05:12.000Z | 2022-03-29T17:18:10.000Z | lib/ex_doc/group_matcher.ex | henrik/ex_doc | f09796782121f935e70cc51405d4773130fd70ca | [
"Apache-2.0",
"CC-BY-4.0"
] | 1,266 | 2015-01-03T03:26:04.000Z | 2022-03-31T09:43:53.000Z | lib/ex_doc/group_matcher.ex | henrik/ex_doc | f09796782121f935e70cc51405d4773130fd70ca | [
"Apache-2.0",
"CC-BY-4.0"
] | 300 | 2015-01-03T04:07:24.000Z | 2022-03-29T08:10:56.000Z | defmodule ExDoc.GroupMatcher do
@moduledoc false
@type pattern :: Regex.t() | module() | String.t()
@type patterns :: pattern | [pattern]
@type group_patterns :: keyword(patterns)
@doc """
Finds the index of a given group.
"""
def group_index(groups, group) do
Enum.find_index(groups, fn {k, _v} ->... | 29.288462 | 74 | 0.650689 |
7ab2505aa38880cddd77a552359b5a0b890b7206 | 1,839 | exs | Elixir | clients/classroom/mix.exs | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/classroom/mix.exs | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/classroom/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... | 27.447761 | 103 | 0.655791 |
7ab257e0678fb20e233618244140340d6f5456a7 | 250 | exs | Elixir | apps/podder/config/dev.exs | chattes/podder_umbrella | a2662a21a067fd3f0cd02b98cb63afd958c895db | [
"MIT"
] | null | null | null | apps/podder/config/dev.exs | chattes/podder_umbrella | a2662a21a067fd3f0cd02b98cb63afd958c895db | [
"MIT"
] | null | null | null | apps/podder/config/dev.exs | chattes/podder_umbrella | a2662a21a067fd3f0cd02b98cb63afd958c895db | [
"MIT"
] | null | null | null | # Since configuration is shared in umbrella projects, this file
# should only configure the :podder application itself
# and only for organization purposes. All other config goes to
# the umbrella root.
use Mix.Config
import_config "dev.secret.exs"
| 31.25 | 63 | 0.796 |
7ab281b54a0246040cf556792ffaeaada6e6a44e | 967 | ex | Elixir | lib/phoenix14_base/release_tasks.ex | pgrunwald/phoenix14_base | 991313f244af350245f5fd3e8fe6716a1a9e88a4 | [
"MIT"
] | 1 | 2019-03-28T05:47:39.000Z | 2019-03-28T05:47:39.000Z | lib/phoenix14_base/release_tasks.ex | pgrunwald/phoenix14_base | 991313f244af350245f5fd3e8fe6716a1a9e88a4 | [
"MIT"
] | null | null | null | lib/phoenix14_base/release_tasks.ex | pgrunwald/phoenix14_base | 991313f244af350245f5fd3e8fe6716a1a9e88a4 | [
"MIT"
] | 1 | 2020-05-23T09:20:53.000Z | 2020-05-23T09:20:53.000Z | defmodule Phoenix14Base.ReleaseTasks do
@application :phoenix14_base
@migrate_deps [:postgrex, :ecto, :ssl]
@repo Phoenix14Base.Repo
@doc """
Runs DB migrations as a release task.
Please see the README for instructions on running release tasks. See `rel/commands/` for
accompanying shell script.
"""
... | 29.30303 | 90 | 0.698035 |
7ab281ef7db0005cc717e0e61885745624d79992 | 1,056 | ex | Elixir | clients/page_speed_online/lib/google_api/page_speed_online/v2/connection.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/page_speed_online/lib/google_api/page_speed_online/v2/connection.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/page_speed_online/lib/google_api/page_speed_online/v2/connection.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... | 36.413793 | 77 | 0.75947 |
7ab2bab898e8956cf5808d9e415d160378fe4af6 | 6,724 | exs | Elixir | test/pathfinder_test.exs | rbkmoney/pathfinder | fdb3102f524b6f58cba579389047b425fdbd4c92 | [
"Apache-2.0"
] | null | null | null | test/pathfinder_test.exs | rbkmoney/pathfinder | fdb3102f524b6f58cba579389047b425fdbd4c92 | [
"Apache-2.0"
] | null | null | null | test/pathfinder_test.exs | rbkmoney/pathfinder | fdb3102f524b6f58cba579389047b425fdbd4c92 | [
"Apache-2.0"
] | 1 | 2021-12-07T09:25:32.000Z | 2021-12-07T09:25:32.000Z | defmodule PathfinderTest do
use ExUnit.Case
alias Woody.Client
require Pathfinder.Thrift.Proto, as: Proto
Proto.import_records([
:pf_LookupParameters,
:pf_RelationParameters,
:pf_Filter,
:pf_InvalidArguments,
:pf_Result
])
setup do
client = Client.new("http://localhost:8022")
... | 28.612766 | 80 | 0.576889 |
7ab2d215437347a614aa9c73b75cf71cfe6f591c | 126 | ex | Elixir | apps/ewallet/lib/ewallet/mailer.ex | amadeobrands/ewallet | 505b7822721940a7b892a9b35c225e80cc8ac0b4 | [
"Apache-2.0"
] | 1 | 2018-12-07T06:21:21.000Z | 2018-12-07T06:21:21.000Z | apps/ewallet/lib/ewallet/mailer.ex | amadeobrands/ewallet | 505b7822721940a7b892a9b35c225e80cc8ac0b4 | [
"Apache-2.0"
] | null | null | null | apps/ewallet/lib/ewallet/mailer.ex | amadeobrands/ewallet | 505b7822721940a7b892a9b35c225e80cc8ac0b4 | [
"Apache-2.0"
] | null | null | null | defmodule EWallet.Mailer do
@moduledoc """
The module that sends emails.
"""
use Bamboo.Mailer, otp_app: :ewallet
end
| 18 | 38 | 0.706349 |
7ab2e1fe8a2e6824dca7d06d4bd68a1d1dd42b83 | 1,740 | exs | Elixir | test/features/visitor_visits_homepage_test.exs | plicjo/tilex | f3d9cba7f2ca99c75622cd1a9992508614dd455f | [
"MIT"
] | 460 | 2016-12-28T21:50:05.000Z | 2022-03-16T14:34:08.000Z | test/features/visitor_visits_homepage_test.exs | plicjo/tilex | f3d9cba7f2ca99c75622cd1a9992508614dd455f | [
"MIT"
] | 412 | 2016-12-27T17:32:01.000Z | 2021-09-17T23:51:47.000Z | test/features/visitor_visits_homepage_test.exs | plicjo/tilex | f3d9cba7f2ca99c75622cd1a9992508614dd455f | [
"MIT"
] | 140 | 2017-01-06T06:55:58.000Z | 2022-02-04T13:35:21.000Z | defmodule VisitorVisitsHomepageTest do
use Tilex.IntegrationCase, async: true
test "the page does not have a Create Post link", %{session: session} do
visit(session, "/")
refute has?(session, Query.link("Create Post"))
end
test "the page has the appropriate branding", %{session: session} do
heade... | 28.064516 | 78 | 0.654598 |
7ab32210c6ec25394a19992c0964eefe39a56c80 | 2,029 | exs | Elixir | apps/definition_dictionary/test/dictionary/type/date_test.exs | kennyatpillar/hindsight | e90e2150a14218e5d6fdf5874f57eb055fd2dd07 | [
"Apache-2.0"
] | null | null | null | apps/definition_dictionary/test/dictionary/type/date_test.exs | kennyatpillar/hindsight | e90e2150a14218e5d6fdf5874f57eb055fd2dd07 | [
"Apache-2.0"
] | null | null | null | apps/definition_dictionary/test/dictionary/type/date_test.exs | kennyatpillar/hindsight | e90e2150a14218e5d6fdf5874f57eb055fd2dd07 | [
"Apache-2.0"
] | null | null | null | defmodule Dictionary.Type.DateTest do
use ExUnit.Case
import Checkov
describe "new/1" do
data_test "validates #{inspect(field)} against bad input" do
assert {:error, [%{input: value, path: [field]} | _]} =
put_in(%{}, [field], value)
|> Dictionary.Type.Date.new()
wh... | 29.405797 | 94 | 0.534746 |
7ab354f6c76164dc373c576c972aaf8ccec3f25b | 1,424 | exs | Elixir | mix.exs | scoopteam/backend | c9efa958f5f536870abd722e2c55a1fb907acff2 | [
"MIT"
] | null | null | null | mix.exs | scoopteam/backend | c9efa958f5f536870abd722e2c55a1fb907acff2 | [
"MIT"
] | null | null | null | mix.exs | scoopteam/backend | c9efa958f5f536870abd722e2c55a1fb907acff2 | [
"MIT"
] | null | null | null | defmodule Scoop.MixProject do
use Mix.Project
def project do
[
app: :scoop,
version: "0.1.0",
elixir: "~> 1.5",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
start_permanent: Mix.env() == :prod,
aliases: aliases(),
d... | 24.982456 | 79 | 0.545646 |
7ab369713d95e3bf6fe44a9e710a222a2aefc2a8 | 2,648 | ex | Elixir | lib/utils/http.ex | WeLightProject/WeLight-Portal | 6e701469423e3a62affdc415c4e8c186d603d324 | [
"MIT"
] | 2 | 2021-02-12T09:21:56.000Z | 2021-02-22T08:52:20.000Z | lib/utils/http.ex | WeLightProject/WeLight-Portal | 6e701469423e3a62affdc415c4e8c186d603d324 | [
"MIT"
] | 4 | 2021-02-22T08:53:43.000Z | 2021-06-09T09:24:46.000Z | lib/utils/http.ex | WeLightProject/WeLight-Portal | 6e701469423e3a62affdc415c4e8c186d603d324 | [
"MIT"
] | null | null | null | defmodule Http do
@moduledoc """
the encapsulation of http
"""
require Logger
@retries 5
@doc """
+----------------------+
| json_rpc_constructer |
+----------------------+
"""
def json_rpc(method, id)
when is_integer(id) do
%{method: method, jsonrpc: "2.0", id: id}
end
de... | 21.704918 | 88 | 0.563066 |
7ab3804407272876ee0fa34c01b388c4f392ee08 | 2,016 | exs | Elixir | scripts/parse_user_agents.exs | findmypast/hexfmp | 38a50f5e1057833fd98748faac230bf4b9cc26a3 | [
"Apache-2.0"
] | null | null | null | scripts/parse_user_agents.exs | findmypast/hexfmp | 38a50f5e1057833fd98748faac230bf4b9cc26a3 | [
"Apache-2.0"
] | null | null | null | scripts/parse_user_agents.exs | findmypast/hexfmp | 38a50f5e1057833fd98748faac230bf4b9cc26a3 | [
"Apache-2.0"
] | null | null | null | files = Path.wildcard("logs/hex/*")
log_regex_s3 = ~r"
[^\040]+\040 # bucket owner
[^\040]+\040 # bucket
\[.+\]\040 # time
[^\040]+\040 # IP address
[^\040]+\040 # requester ID
[^\040]+\040 # request ID
REST.GET.OBJECT\040
registry.ets.gz\040
\"... | 30.545455 | 180 | 0.467262 |
7ab38a000cea044913189ed6e23d2b2476760af2 | 262 | ex | Elixir | Tuples.ex | hectorip/ErlangExercises | 4a1aa5de0504da1bfe5a6c31c1d20277524ab363 | [
"MIT"
] | 4 | 2016-09-22T03:47:56.000Z | 2017-02-02T17:42:57.000Z | Tuples.ex | hectorip/ErlangExercises | 4a1aa5de0504da1bfe5a6c31c1d20277524ab363 | [
"MIT"
] | null | null | null | Tuples.ex | hectorip/ErlangExercises | 4a1aa5de0504da1bfe5a6c31c1d20277524ab363 | [
"MIT"
] | null | null | null | person = {"name", 42}
age = elem(person, 1)
#IO.puts person
IO.puts age
person_2 = put_elem(person, 1, 43)
# IO.puts person
age = elem(person_2, 1)
IO.puts age
# Destructuration
{a, b, c, d} = {"a", "b", "c", "d"}
IO.puts a
IO.puts b
IO.puts c
IO.puts d
| 11.391304 | 35 | 0.610687 |
7ab3a8e9b43d517abbf95f8f8412adee8ab241c9 | 874 | ex | Elixir | clients/file/lib/google_api/file/v1/metadata.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/file/lib/google_api/file/v1/metadata.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/file/lib/google_api/file/v1/metadata.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 32.37037 | 74 | 0.756293 |
7ab3c2b848f38f41e00dc0ce81b2ef80a41822c4 | 3,220 | ex | Elixir | lib/ecto/repo/assoc.ex | photomattmills/ecto | ad3a455aa3d5e4f932a5bb8ae1590b21d95cce54 | [
"Apache-2.0"
] | 1 | 2019-05-07T15:05:52.000Z | 2019-05-07T15:05:52.000Z | lib/ecto/repo/assoc.ex | photomattmills/ecto | ad3a455aa3d5e4f932a5bb8ae1590b21d95cce54 | [
"Apache-2.0"
] | null | null | null | lib/ecto/repo/assoc.ex | photomattmills/ecto | ad3a455aa3d5e4f932a5bb8ae1590b21d95cce54 | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.Repo.Assoc do
# The module invoked by repomodules
# for association related functionality.
@moduledoc false
@doc """
Transforms a result set based on query assocs, loading
the associations onto their parent model.
"""
@spec query([Ecto.Schema.t], list, tuple) :: [Ecto.Schema.t]
def que... | 30.961538 | 74 | 0.642236 |
7ab3c6757d9d9cb93f6bd1b6125560842cb13ce3 | 1,625 | ex | Elixir | lib/livebook_web/live/home_live/import_url_component.ex | benjreinhart/livebook | 0500ad5c6237167ce9769d8cc78fca360834f576 | [
"Apache-2.0"
] | null | null | null | lib/livebook_web/live/home_live/import_url_component.ex | benjreinhart/livebook | 0500ad5c6237167ce9769d8cc78fca360834f576 | [
"Apache-2.0"
] | null | null | null | lib/livebook_web/live/home_live/import_url_component.ex | benjreinhart/livebook | 0500ad5c6237167ce9769d8cc78fca360834f576 | [
"Apache-2.0"
] | 1 | 2021-07-07T06:18:36.000Z | 2021-07-07T06:18:36.000Z | defmodule LivebookWeb.HomeLive.ImportUrlComponent do
use LivebookWeb, :live_component
alias Livebook.{ContentLoader, Utils}
@impl true
def mount(socket) do
{:ok, assign(socket, url: "", error_message: nil)}
end
@impl true
def render(assigns) do
~L"""
<div class="flex-col space-y-5">
<... | 27.542373 | 85 | 0.540308 |
7ab42315280c7105aebc532589fd5236d0fa7ecc | 354 | ex | Elixir | apps/tai/lib/tai/orders/transitions/skip.ex | yurikoval/tai | 94254b45d22fa0307b01577ff7c629c7280c0295 | [
"MIT"
] | null | null | null | apps/tai/lib/tai/orders/transitions/skip.ex | yurikoval/tai | 94254b45d22fa0307b01577ff7c629c7280c0295 | [
"MIT"
] | 78 | 2020-10-12T06:21:43.000Z | 2022-03-28T09:02:00.000Z | apps/tai/lib/tai/orders/transitions/skip.ex | yurikoval/tai | 94254b45d22fa0307b01577ff7c629c7280c0295 | [
"MIT"
] | null | null | null | defmodule Tai.Orders.Transitions.Skip do
@moduledoc """
Bypass sending the order to the venue
"""
@type t :: %__MODULE__{client_id: atom}
@enforce_keys ~w[client_id]a
defstruct ~w[client_id]a
defimpl Tai.Orders.Transition do
def required(_), do: :enqueued
def attrs(_), do: %{status: :skip, leav... | 22.125 | 66 | 0.689266 |
7ab429de78bd8e6418483ba2e0989e2a64fd39a1 | 144 | exs | Elixir | test/hex_search_test.exs | minhajuddin/hex_search | 31a4bfdcb1eb52dd33a1583160fd0a6556ab4534 | [
"MIT"
] | 2 | 2018-08-13T18:01:25.000Z | 2020-01-21T01:19:05.000Z | test/hex_search_test.exs | minhajuddin/hex_search | 31a4bfdcb1eb52dd33a1583160fd0a6556ab4534 | [
"MIT"
] | null | null | null | test/hex_search_test.exs | minhajuddin/hex_search | 31a4bfdcb1eb52dd33a1583160fd0a6556ab4534 | [
"MIT"
] | null | null | null | defmodule HexSearchTest do
use ExUnit.Case
doctest HexSearch
test "greets the world" do
assert HexSearch.hello() == :world
end
end
| 16 | 38 | 0.722222 |
7ab4758d3f546e229b5911ab794cd6126ee91f5b | 6,250 | exs | Elixir | test/linkir_web/controllers/user_auth_test.exs | byhbt/linkir | 8ac72cd0da2696b628f6981595e75164adfc5945 | [
"MIT"
] | null | null | null | test/linkir_web/controllers/user_auth_test.exs | byhbt/linkir | 8ac72cd0da2696b628f6981595e75164adfc5945 | [
"MIT"
] | null | null | null | test/linkir_web/controllers/user_auth_test.exs | byhbt/linkir | 8ac72cd0da2696b628f6981595e75164adfc5945 | [
"MIT"
] | null | null | null | defmodule LinkirWeb.UserAuthTest do
use LinkirWeb.ConnCase, async: true
alias Linkir.Accounts
alias LinkirWeb.UserAuth
import Linkir.AccountsFixtures
@remember_me_cookie "_linkir_web_user_remember_me"
setup %{conn: conn} do
conn =
conn
|> Map.replace!(:secret_key_base, LinkirWeb.Endpoint.... | 35.91954 | 98 | 0.67424 |
7ab487f6dacec5597f5b19c1eaa747553f3ccbfe | 1,184 | exs | Elixir | priv/repo/migrations/201705071742_create_checkout_view.exs | sumanbh/phoenix-angular | 0954ce60edc95832f6bf62e54e54977c770d33c3 | [
"MIT"
] | 5 | 2017-07-01T16:08:27.000Z | 2021-04-14T12:50:31.000Z | priv/repo/migrations/201705071742_create_checkout_view.exs | sumanbh/phoenix-angular | 0954ce60edc95832f6bf62e54e54977c770d33c3 | [
"MIT"
] | null | null | null | priv/repo/migrations/201705071742_create_checkout_view.exs | sumanbh/phoenix-angular | 0954ce60edc95832f6bf62e54e54977c770d33c3 | [
"MIT"
] | 4 | 2017-05-08T00:57:52.000Z | 2019-05-26T23:29:38.000Z | defmodule Amazon.Repo.Migrations.CreateCheckoutView do
use Ecto.Migration
def up do
execute """
CREATE view checkoutview
AS
SELECT cart.customer_id,
customers.fullname,
customers.address,
... | 33.828571 | 58 | 0.396115 |
7ab49d8c77bf46016726bf8d325be38402d63162 | 718 | ex | Elixir | services/fc_inventory/lib/fc_inventory/events/transaction_prepared.ex | fleadope/freshcom | 8d5944befaa6eea8d31e5f5995939be2a1a44262 | [
"BSD-3-Clause"
] | 46 | 2018-10-13T23:18:13.000Z | 2021-08-07T07:46:51.000Z | services/fc_inventory/lib/fc_inventory/events/transaction_prepared.ex | fleadope/freshcom | 8d5944befaa6eea8d31e5f5995939be2a1a44262 | [
"BSD-3-Clause"
] | 25 | 2018-10-14T00:56:07.000Z | 2019-12-23T19:41:02.000Z | services/fc_inventory/lib/fc_inventory/events/transaction_prepared.ex | fleadope/freshcom | 8d5944befaa6eea8d31e5f5995939be2a1a44262 | [
"BSD-3-Clause"
] | 5 | 2018-12-16T04:39:51.000Z | 2020-10-01T12:17:03.000Z | defmodule FCInventory.TransactionPrepared do
use FCBase, :event
@version 1
typedstruct do
field :__version__, integer(), default: @version
field :request_id, String.t()
field :requester_id, String.t()
field :requester_type, String.t()
field :requester_role, String.t()
field :client_id, ... | 25.642857 | 84 | 0.70195 |
7ab4ed07bd962ab1babfc61132923cd070935cdc | 358 | ex | Elixir | lib/contentful/configuration.ex | prototypsthlm/contentful.ex | cde53cd6792643c2d5518f97db00c4118f842863 | [
"MIT"
] | 28 | 2016-06-19T00:18:46.000Z | 2021-05-17T07:53:22.000Z | lib/contentful/configuration.ex | prototypsthlm/contentful.ex | cde53cd6792643c2d5518f97db00c4118f842863 | [
"MIT"
] | 79 | 2016-07-13T14:46:07.000Z | 2021-05-17T09:26:50.000Z | lib/contentful/configuration.ex | prototypsthlm/contentful.ex | cde53cd6792643c2d5518f97db00c4118f842863 | [
"MIT"
] | 25 | 2016-07-13T17:31:52.000Z | 2021-05-08T10:14:46.000Z | defmodule Contentful.Configuration do
@moduledoc """
Provides Configuration for the different Contentful modules, providing easier access to the values
in config/*.exs
"""
def get(key, context \\ :delivery) do
context |> config() |> Keyword.get(key)
end
defp config(context) do
Application.get_en... | 23.866667 | 100 | 0.709497 |
7ab4fc697e48c68019756ad97a6bdd18e173be0b | 265 | ex | Elixir | lib/document_viewer.ex | arkadyan/document_viewer | d45594632b83559520820744e4afd37d3bfdb03d | [
"MIT"
] | 1 | 2021-03-17T19:04:28.000Z | 2021-03-17T19:04:28.000Z | lib/document_viewer.ex | mbta/document_viewer | f3af972f4996759bc18811186f753b87bbe43b53 | [
"MIT"
] | 121 | 2021-03-18T21:03:02.000Z | 2022-03-28T09:24:49.000Z | lib/document_viewer.ex | arkadyan/document_viewer | d45594632b83559520820744e4afd37d3bfdb03d | [
"MIT"
] | 1 | 2021-05-19T21:21:56.000Z | 2021-05-19T21:21:56.000Z | defmodule DocumentViewer do
@moduledoc """
DocumentViewer keeps the contexts that define your domain
and business logic.
Contexts are also responsible for managing your data, regardless
if it comes from the database, an external API or others.
"""
end
| 26.5 | 66 | 0.766038 |
7ab53cb0ab2a637bcc6e4219f7cec92cf8d55805 | 2,471 | ex | Elixir | apps/robby_web/web/router.ex | jeffweiss/openrobby | 9fed2024e6ce87a6fe27ef3af85558f3116aca2a | [
"Apache-2.0"
] | null | null | null | apps/robby_web/web/router.ex | jeffweiss/openrobby | 9fed2024e6ce87a6fe27ef3af85558f3116aca2a | [
"Apache-2.0"
] | null | null | null | apps/robby_web/web/router.ex | jeffweiss/openrobby | 9fed2024e6ce87a6fe27ef3af85558f3116aca2a | [
"Apache-2.0"
] | null | null | null | defmodule RobbyWeb.Router do
use RobbyWeb.Web, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
plug RobbyWeb.Plugs.Locale, "en"
plug RobbyWeb.Auth, repo: RobbyWeb.Repo
end
pipelin... | 26.858696 | 76 | 0.696884 |
7ab5467cd7afcebb2e66a437f51a0f72378df9f3 | 1,538 | ex | Elixir | lib/ambi_web/views/error_helpers.ex | Jim-Hodapp-Coaching/ambi | aeb7b90d4393fbade4633cdacd55042f6e280f2e | [
"BSD-2-Clause-Patent"
] | null | null | null | lib/ambi_web/views/error_helpers.ex | Jim-Hodapp-Coaching/ambi | aeb7b90d4393fbade4633cdacd55042f6e280f2e | [
"BSD-2-Clause-Patent"
] | 10 | 2022-02-02T17:50:41.000Z | 2022-03-24T23:50:31.000Z | lib/ambi_web/views/error_helpers.ex | Jim-Hodapp-Coaching/ambi | aeb7b90d4393fbade4633cdacd55042f6e280f2e | [
"BSD-2-Clause-Patent"
] | null | null | null | defmodule AmbiWeb.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(:sp... | 32.041667 | 73 | 0.663199 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.