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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e874552604e1af40867285d342d07790702444b6 | 931 | exs | Elixir | test/slack_inviter/clearbit_api_test.exs | syracuseio/slack_inviter | a2bdf4ffc45b12db95aa74bf7a167ef4996a9b81 | [
"MIT"
] | null | null | null | test/slack_inviter/clearbit_api_test.exs | syracuseio/slack_inviter | a2bdf4ffc45b12db95aa74bf7a167ef4996a9b81 | [
"MIT"
] | 3 | 2021-03-08T19:58:55.000Z | 2021-09-01T03:46:56.000Z | test/slack_inviter/clearbit_api_test.exs | syracuseio/slack_inviter | a2bdf4ffc45b12db95aa74bf7a167ef4996a9b81 | [
"MIT"
] | 1 | 2018-08-15T01:52:40.000Z | 2018-08-15T01:52:40.000Z | defmodule SlackInviter.ClearbitApiTest do
use ExUnit.Case
alias SlackInviter.ClearbitApi
describe "ClearbitApi.lookup" do
test "When the person can be found" do
email = "newbie@syracuse.io"
case ClearbitApi.lookup(email) do
{:ok, %{body: res} } ->
assert res["name"] ==... | 23.871795 | 57 | 0.568206 |
e8747a7d8df59e2cd0bc0c618498df90a5e508ac | 2,535 | ex | Elixir | lib/jaeger/thrift/batch.ex | konstantinzolotarev/frettchen | 4aced1fb3d1571893ae09c18a31b05352c80cd9e | [
"MIT"
] | 3 | 2018-10-27T18:18:14.000Z | 2020-11-27T11:47:41.000Z | lib/jaeger/thrift/batch.ex | konstantinzolotarev/frettchen | 4aced1fb3d1571893ae09c18a31b05352c80cd9e | [
"MIT"
] | null | null | null | lib/jaeger/thrift/batch.ex | konstantinzolotarev/frettchen | 4aced1fb3d1571893ae09c18a31b05352c80cd9e | [
"MIT"
] | 3 | 2019-01-07T12:32:44.000Z | 2021-09-05T07:24:09.000Z | defmodule(Jaeger.Thrift.Batch) do
_ = "Auto-generated Thrift struct jaeger.Batch"
_ = "1: jaeger.Process process"
_ = "2: list<jaeger.Span> spans"
defstruct(process: nil, spans: nil)
@type(t :: %__MODULE__{})
def(new) do
%__MODULE__{}
end
defmodule(BinaryProtocol) do
@moduledoc(false)
def(de... | 34.256757 | 107 | 0.621302 |
e8747c69a04842f8d177a6b55ba44d6bd41d7647 | 314 | ex | Elixir | web/controllers/file_controller.ex | temp/opencov | 0fc7d5af8d4d88162f9f74f371ed5799a0c8808e | [
"MIT"
] | 189 | 2018-09-25T09:02:41.000Z | 2022-03-09T13:52:06.000Z | web/controllers/file_controller.ex | temp/opencov | 0fc7d5af8d4d88162f9f74f371ed5799a0c8808e | [
"MIT"
] | 29 | 2018-09-26T05:51:18.000Z | 2021-11-05T08:55:03.000Z | web/controllers/file_controller.ex | temp/opencov | 0fc7d5af8d4d88162f9f74f371ed5799a0c8808e | [
"MIT"
] | 32 | 2018-10-21T12:28:11.000Z | 2022-03-28T02:20:19.000Z | defmodule Opencov.FileController do
use Opencov.Web, :controller
alias Opencov.File
def show(conn, %{"id" => id}) do
file = Repo.get!(File, id) |> Opencov.Repo.preload(job: [build: :project])
file_json = Jason.encode!(file)
render(conn, "show.html", file: file, file_json: file_json)
end
end
| 26.166667 | 78 | 0.675159 |
e87498d7510cffe4429b6aea264c4548564b3010 | 260 | ex | Elixir | lib/display/intro.ex | salfum/elixir-koans | 1924cdc630cfe7bf8c32aa0c33b661c378d0a6fe | [
"MIT"
] | null | null | null | lib/display/intro.ex | salfum/elixir-koans | 1924cdc630cfe7bf8c32aa0c33b661c378d0a6fe | [
"MIT"
] | null | null | null | lib/display/intro.ex | salfum/elixir-koans | 1924cdc630cfe7bf8c32aa0c33b661c378d0a6fe | [
"MIT"
] | null | null | null | defmodule Display.Intro do
alias Display.Paint
def intro(module, modules) do
if module not in modules do
show_intro(module.intro)
else
""
end
end
def show_intro(message) do
(message <> "\n")
|> Paint.green()
end
end
| 15.294118 | 31 | 0.623077 |
e874a2e75831aba864d7b347bd9c9189ee35ccc0 | 194 | exs | Elixir | priv/repo/migrations/20170907190348_alter_posts.exs | community-tools/community-tools | 40b0e6cc9234b44593d2ab60bb2303d7224deb30 | [
"Apache-2.0"
] | 2 | 2017-10-06T01:14:35.000Z | 2017-11-18T16:44:44.000Z | priv/repo/migrations/20170907190348_alter_posts.exs | community-tools/community-tools | 40b0e6cc9234b44593d2ab60bb2303d7224deb30 | [
"Apache-2.0"
] | 6 | 2017-10-06T00:04:59.000Z | 2017-10-06T00:09:27.000Z | priv/repo/migrations/20170907190348_alter_posts.exs | apps-team/community-tools | 40b0e6cc9234b44593d2ab60bb2303d7224deb30 | [
"Apache-2.0"
] | 1 | 2017-10-06T01:17:35.000Z | 2017-10-06T01:17:35.000Z | defmodule CommunityTools.Repo.Migrations.AlterPosts do
use Ecto.Migration
def change do
alter table(:posts) do
add :subtitle, :string
add :teaser, :text
end
end
end
| 14.923077 | 54 | 0.680412 |
e874b6f95478db82ba0fe9b1ce1208217aa11016 | 196 | exs | Elixir | priv/repo/migrations/20180822111739_remove_post_id_favorites_categories.exs | coderplanets/coderplanets_server | 3663e56340d6d050e974c91f7e499d8424fc25e9 | [
"Apache-2.0"
] | 240 | 2018-11-06T09:36:54.000Z | 2022-02-20T07:12:36.000Z | priv/repo/migrations/20180822111739_remove_post_id_favorites_categories.exs | coderplanets/coderplanets_server | 3663e56340d6d050e974c91f7e499d8424fc25e9 | [
"Apache-2.0"
] | 363 | 2018-07-11T03:38:14.000Z | 2021-12-14T01:42:40.000Z | priv/repo/migrations/20180822111739_remove_post_id_favorites_categories.exs | mydearxym/mastani_server | f24034a4a5449200165cf4a547964a0961793eab | [
"Apache-2.0"
] | 22 | 2019-01-27T11:47:56.000Z | 2021-02-28T13:17:52.000Z | defmodule GroupherServer.Repo.Migrations.RemovePostIdFavoritesCategories do
use Ecto.Migration
def change do
alter table(:favorite_categories) do
remove(:post_id)
end
end
end
| 19.6 | 75 | 0.765306 |
e874bf6915fe44d6c5811f1e76c8e7d038550815 | 475 | exs | Elixir | priv/repo/migrations/20210101171220_create_items.exs | markglenn/shelving | d76a2df11186ace3fbca14e00a2b5010692b5ee0 | [
"MIT"
] | null | null | null | priv/repo/migrations/20210101171220_create_items.exs | markglenn/shelving | d76a2df11186ace3fbca14e00a2b5010692b5ee0 | [
"MIT"
] | null | null | null | priv/repo/migrations/20210101171220_create_items.exs | markglenn/shelving | d76a2df11186ace3fbca14e00a2b5010692b5ee0 | [
"MIT"
] | null | null | null | defmodule Shelving.Repo.Migrations.CreateItems do
use Ecto.Migration
def change do
create table(:items) do
add :name, :string, null: false
add :slug, :string
add :archived_at, :naive_datetime
add :account_id, references(:accounts, on_delete: :delete_all), null: false
timestamps()... | 25 | 81 | 0.673684 |
e874c09b6a50a192c26ac8d950e01df9ab1673ab | 407 | exs | Elixir | priv/repo/migrations/20160201230456_add_packages_unique_name_index.exs | findmypast/hexfmp | 38a50f5e1057833fd98748faac230bf4b9cc26a3 | [
"Apache-2.0"
] | null | null | null | priv/repo/migrations/20160201230456_add_packages_unique_name_index.exs | findmypast/hexfmp | 38a50f5e1057833fd98748faac230bf4b9cc26a3 | [
"Apache-2.0"
] | null | null | null | priv/repo/migrations/20160201230456_add_packages_unique_name_index.exs | findmypast/hexfmp | 38a50f5e1057833fd98748faac230bf4b9cc26a3 | [
"Apache-2.0"
] | null | null | null | defmodule Hexpm.Repo.Migrations.AddPackagesUniqueNameIndex do
use Ecto.Migration
def up do
execute "DROP INDEX packages_name"
execute "DROP INDEX users_username_index"
execute "CREATE UNIQUE INDEX ON packages (name)"
execute "CREATE UNIQUE INDEX ON users (username)"
end
def down do
execut... | 23.941176 | 61 | 0.751843 |
e874c7450e86ff4b0ccfa0932951c12837391968 | 30,252 | ex | Elixir | lib/httpoison/base.ex | OwayTripGroup/httpoison | 9b9debf168b6db45abbf5129721f5d01759d32f4 | [
"MIT"
] | null | null | null | lib/httpoison/base.ex | OwayTripGroup/httpoison | 9b9debf168b6db45abbf5129721f5d01759d32f4 | [
"MIT"
] | null | null | null | lib/httpoison/base.ex | OwayTripGroup/httpoison | 9b9debf168b6db45abbf5129721f5d01759d32f4 | [
"MIT"
] | null | null | null | defmodule HTTPoison.Base do
@moduledoc """
Provides a default implementation for HTTPoison functions.
This module is meant to be `use`'d in custom modules in order to wrap the
functionalities provided by HTTPoison. For example, this is very useful to
build API clients around HTTPoison:
defmodule GitHu... | 34.652921 | 100 | 0.617744 |
e874ce2d2f0800e8da607ff1c985031fda0c2f57 | 2,723 | ex | Elixir | lib/mix/tasks/ecto.gen.migration.ex | dgvncsz0f/ecto | bae06fe650328cc1060c09fe889a2de9a10edb1b | [
"Apache-2.0"
] | null | null | null | lib/mix/tasks/ecto.gen.migration.ex | dgvncsz0f/ecto | bae06fe650328cc1060c09fe889a2de9a10edb1b | [
"Apache-2.0"
] | null | null | null | lib/mix/tasks/ecto.gen.migration.ex | dgvncsz0f/ecto | bae06fe650328cc1060c09fe889a2de9a10edb1b | [
"Apache-2.0"
] | 1 | 2018-09-21T16:05:29.000Z | 2018-09-21T16:05:29.000Z | defmodule Mix.Tasks.Ecto.Gen.Migration do
use Mix.Task
import Macro, only: [camelize: 1, underscore: 1]
import Mix.Generator
import Mix.Ecto
@shortdoc "Generates a new migration for the repo"
@moduledoc """
Generates a migration.
The repository must be set under `:ecto_repos` in the
current app co... | 29.27957 | 104 | 0.636063 |
e874ebf17a3ea6a605b1185abd8bac0503891dc7 | 1,042 | ex | Elixir | lib/websheets/application.ex | mpope9/Websheets | 9509cfa5f0a58c0e21be64ddfea5c3228fd32cbc | [
"Apache-2.0"
] | null | null | null | lib/websheets/application.ex | mpope9/Websheets | 9509cfa5f0a58c0e21be64ddfea5c3228fd32cbc | [
"Apache-2.0"
] | 2 | 2018-12-23T03:51:26.000Z | 2018-12-23T04:53:18.000Z | lib/websheets/application.ex | mpope9/Websheets | 9509cfa5f0a58c0e21be64ddfea5c3228fd32cbc | [
"Apache-2.0"
] | null | null | null | defmodule Websheets.Application do
use Application
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
def start(_type, _args) do
import Supervisor.Spec
# Define workers and child supervisors to be supervised
children = [
# Start the endpoint when the ... | 28.162162 | 72 | 0.716891 |
e874efd4ab92f585b4aa17d30d14596b1c22be7b | 856 | exs | Elixir | test/brando_pages/pages/models/page_test.exs | twined/brando_pages | cc9905bf9ab47fdcaef9588a056f19dc18f036a9 | [
"MIT"
] | null | null | null | test/brando_pages/pages/models/page_test.exs | twined/brando_pages | cc9905bf9ab47fdcaef9588a056f19dc18f036a9 | [
"MIT"
] | null | null | null | test/brando_pages/pages/models/page_test.exs | twined/brando_pages | cc9905bf9ab47fdcaef9588a056f19dc18f036a9 | [
"MIT"
] | null | null | null | defmodule Brando.Pages.PageTest do
use ExUnit.Case
use BrandoPages.ConnCase
alias Brando.Page
alias BrandoPages.Factory
setup do
user = Factory.insert(:user)
page = Factory.insert(:page, creator: user)
{:ok, %{user: user, page: page}}
end
test "search" do
results = Brando.repo.all(Page.s... | 26.75 | 74 | 0.619159 |
e874f186d78ff345ff33181f01e1973268203c9b | 1,105 | ex | Elixir | test/support/conn_case.ex | mlgubolin/fullstack-challenge | ac953fc420337ec9343ef634ab5fdcc0181804a6 | [
"MIT"
] | null | null | null | test/support/conn_case.ex | mlgubolin/fullstack-challenge | ac953fc420337ec9343ef634ab5fdcc0181804a6 | [
"MIT"
] | null | null | null | test/support/conn_case.ex | mlgubolin/fullstack-challenge | ac953fc420337ec9343ef634ab5fdcc0181804a6 | [
"MIT"
] | null | null | null | defmodule FullstackChallengeWeb.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.
Fin... | 28.333333 | 80 | 0.732127 |
e874f9deeca5a4a584566318be16a0f6aa2d3595 | 1,292 | exs | Elixir | test/plausible_web/controllers/stats_controller_test.exs | dukhniav/plausible | dfcbf9cc98637721698b2046eee205b66b204acb | [
"MIT"
] | null | null | null | test/plausible_web/controllers/stats_controller_test.exs | dukhniav/plausible | dfcbf9cc98637721698b2046eee205b66b204acb | [
"MIT"
] | null | null | null | test/plausible_web/controllers/stats_controller_test.exs | dukhniav/plausible | dfcbf9cc98637721698b2046eee205b66b204acb | [
"MIT"
] | null | null | null | defmodule PlausibleWeb.StatsControllerTest do
use PlausibleWeb.ConnCase
use Plausible.Repo
import Plausible.TestUtils
describe "as an anonymous visitor" do
test "public site - shows site stats", %{conn: conn} do
insert(:site, domain: "public-site.io", public: true)
insert(:pageview, hostname: "... | 31.512195 | 81 | 0.654799 |
e8750b0622933f1ada4025fba25f6c89aee33066 | 2,601 | ex | Elixir | clients/sheets/lib/google_api/sheets/v4/model/update_developer_metadata_request.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/sheets/lib/google_api/sheets/v4/model/update_developer_metadata_request.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/sheets/lib/google_api/sheets/v4/model/update_developer_metadata_request.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... | 49.075472 | 353 | 0.750865 |
e8752699a72e1dba73a938d422609936eaba34bd | 187 | ex | Elixir | lib/exshome_clock/web/live/preview.ex | exshome/exshome | ef6b7a89f11dcd2016856dd49517b74aeebb6513 | [
"MIT"
] | 2 | 2021-12-21T16:32:56.000Z | 2022-02-22T17:06:39.000Z | lib/exshome_clock/web/live/preview.ex | exshome/exshome | ef6b7a89f11dcd2016856dd49517b74aeebb6513 | [
"MIT"
] | null | null | null | lib/exshome_clock/web/live/preview.ex | exshome/exshome | ef6b7a89f11dcd2016856dd49517b74aeebb6513 | [
"MIT"
] | null | null | null | defmodule ExshomeClock.Web.Live.Preview do
@moduledoc """
Clock preview widget.
"""
use ExshomeWeb.Live.AppPage,
dependencies: [{ExshomeClock.Services.LocalTime, :time}]
end
| 20.777778 | 60 | 0.727273 |
e8755c85b89a5ac3e889ddf96b79334f7e02a67f | 72 | exs | Elixir | test/wild_test.exs | TylerPachal/wild | 2cbc6255511cf1b16267353f94e973abbaa0c3e0 | [
"MIT"
] | 3 | 2019-12-20T14:56:05.000Z | 2021-09-06T02:10:16.000Z | test/wild_test.exs | TylerPachal/wild | 2cbc6255511cf1b16267353f94e973abbaa0c3e0 | [
"MIT"
] | 1 | 2020-02-24T18:26:49.000Z | 2020-02-24T18:26:49.000Z | test/wild_test.exs | TylerPachal/wild | 2cbc6255511cf1b16267353f94e973abbaa0c3e0 | [
"MIT"
] | null | null | null | defmodule WildTest do
use ExUnit.Case, async: true
doctest Wild
end
| 14.4 | 30 | 0.763889 |
e87566a2c403651c4a9c55a77a546d375d3fc001 | 819 | ex | Elixir | lib/straw_hat/error/error_list.ex | straw-hat-llc/straw_hat | fc870b5d9306d0e95f12670fa468c7cd5df51345 | [
"MIT"
] | 2 | 2020-01-12T03:20:33.000Z | 2022-02-26T14:42:19.000Z | lib/straw_hat/error/error_list.ex | straw-hat-llc/straw_hat | fc870b5d9306d0e95f12670fa468c7cd5df51345 | [
"MIT"
] | 38 | 2017-09-26T13:05:51.000Z | 2019-11-01T10:49:41.000Z | lib/straw_hat/error/error_list.ex | straw-hat-llc/straw_hat | fc870b5d9306d0e95f12670fa468c7cd5df51345 | [
"MIT"
] | 1 | 2018-03-15T22:04:06.000Z | 2018-03-15T22:04:06.000Z | defmodule StrawHat.Error.ErrorList do
@moduledoc """
Data structure that represents a list of `t:StrawHat.Error.t/0`.
"""
@typedoc """
List of Errors.
- `errors`: List of `t:StrawHat.Error.t/0`.
"""
@type t :: %__MODULE__{errors: [StrawHat.Error.t()]}
defstruct errors: []
@doc """
Creates an `... | 26.419355 | 87 | 0.680098 |
e875b1cf244991fb003d484e77e59a1eb20c8cd8 | 4,557 | ex | Elixir | clients/dataproc/lib/google_api/dataproc/v1/model/workflow_template.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/dataproc/lib/google_api/dataproc/v1/model/workflow_template.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/dataproc/lib/google_api/dataproc/v1/model/workflow_template.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... | 62.424658 | 596 | 0.730963 |
e875f1cf01994c649e8bf1aa70cfd8bd08e86514 | 1,795 | ex | Elixir | clients/content/lib/google_api/content/v2/model/orderinvoices_custom_batch_request_entry_create_refund_invoice_return_option.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/orderinvoices_custom_batch_request_entry_create_refund_invoice_return_option.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/orderinvoices_custom_batch_request_entry_create_refund_invoice_return_option.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... | 30.948276 | 107 | 0.750975 |
e875f90b2a568a58dc66671918760af57b7034ed | 17,966 | ex | Elixir | clients/dfa_reporting/lib/google_api/dfa_reporting/v34/api/account_user_profiles.ex | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"Apache-2.0"
] | null | null | null | clients/dfa_reporting/lib/google_api/dfa_reporting/v34/api/account_user_profiles.ex | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"Apache-2.0"
] | null | null | null | clients/dfa_reporting/lib/google_api/dfa_reporting/v34/api/account_user_profiles.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... | 44.360494 | 519 | 0.618502 |
e8761622fccbe1e655f53a8d22cf80d73a80504a | 1,309 | exs | Elixir | src/app/validation/mix.exs | sosedoff/coda | f1c2b807dc608d637c6f7ab933b527f16b413b22 | [
"Apache-2.0"
] | 2 | 2020-11-14T20:16:02.000Z | 2021-08-19T12:44:52.000Z | src/app/validation/mix.exs | sosedoff/coda | f1c2b807dc608d637c6f7ab933b527f16b413b22 | [
"Apache-2.0"
] | 11 | 2021-09-02T10:10:36.000Z | 2022-02-27T08:56:41.000Z | src/app/validation/mix.exs | sosedoff/coda | f1c2b807dc608d637c6f7ab933b527f16b413b22 | [
"Apache-2.0"
] | null | null | null | defmodule CodaValidation.MixProject do
use Mix.Project
def project do
[
app: :coda_validation,
name: "CodaValidation",
version: "0.1.0",
elixir: "~> 1.10",
start_permanent: true,
deps: deps(),
aliases: aliases(),
dialyzer: [
plt_add_deps: :app_tree,
... | 22.568966 | 65 | 0.506494 |
e8763c7618f332cc663c3ef7a7d07b08b034e5f0 | 1,556 | ex | Elixir | lib/watch_faces_web/views/error_helpers.ex | DaniruKun/watchfaces-ex | 699e345596000ec3e50141e44217b155400261d6 | [
"MIT"
] | null | null | null | lib/watch_faces_web/views/error_helpers.ex | DaniruKun/watchfaces-ex | 699e345596000ec3e50141e44217b155400261d6 | [
"MIT"
] | null | null | null | lib/watch_faces_web/views/error_helpers.ex | DaniruKun/watchfaces-ex | 699e345596000ec3e50141e44217b155400261d6 | [
"MIT"
] | null | null | null | defmodule WatchFacesWeb.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_t... | 32.416667 | 79 | 0.667095 |
e8765b07fdf3f0689d7b694b4dfe2ff32ce78621 | 536 | exs | Elixir | apps/thundermoon/test/thundermoon/lotka_volterra/vegetation_test.exs | psychedel/thundermoon-umbrella | b52cb59f1b55fe092ddc70fac7cf2f6e7890c9af | [
"MIT"
] | null | null | null | apps/thundermoon/test/thundermoon/lotka_volterra/vegetation_test.exs | psychedel/thundermoon-umbrella | b52cb59f1b55fe092ddc70fac7cf2f6e7890c9af | [
"MIT"
] | null | null | null | apps/thundermoon/test/thundermoon/lotka_volterra/vegetation_test.exs | psychedel/thundermoon-umbrella | b52cb59f1b55fe092ddc70fac7cf2f6e7890c9af | [
"MIT"
] | null | null | null | defmodule Thundermoon.VegetationTest do
use ExUnit.Case, async: true
alias Thundermoon.Vegetation
test "calculate delta of default vegetation" do
vegetation = %Vegetation{}
assert 32.5 == Vegetation.delta(vegetation)
end
test "calculate delta already reached max vegetation" do
vegetation = %Veg... | 25.52381 | 58 | 0.729478 |
e87685f7b17920f5a7830ae2eb71618ace188a93 | 427 | ex | Elixir | lib/rocketpay/accounts/deposit.ex | nnmuniz/rocketpay | 3174bcb6bed1578a1cd96e3be90499cc87382b21 | [
"MIT"
] | 2 | 2021-03-09T22:58:09.000Z | 2021-03-28T12:22:11.000Z | lib/rocketpay/accounts/deposit.ex | nnmuniz/rocketpay | 3174bcb6bed1578a1cd96e3be90499cc87382b21 | [
"MIT"
] | 9 | 2021-02-28T20:29:58.000Z | 2021-03-26T01:28:01.000Z | lib/rocketpay/accounts/deposit.ex | nnmuniz/rocketpay | 3174bcb6bed1578a1cd96e3be90499cc87382b21 | [
"MIT"
] | 1 | 2021-03-28T11:56:37.000Z | 2021-03-28T11:56:37.000Z | defmodule Rocketpay.Accounts.Deposit do
alias Rocketpay.Accounts.Operation
alias Rocketpay.Repo
def call(params) do
params
|> Operation.call(:deposit)
|> run_transaction()
end
defp run_transaction(multi) do
case Repo.transaction(multi) do
{:error, _operation, reason, _changes} ->
... | 19.409091 | 48 | 0.637002 |
e876fbf0902d92b27fac84f5a784480ac5399abb | 6,039 | ex | Elixir | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/api/user_role_permissions.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/api/user_role_permissions.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/api/user_role_permissions.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 ... | 39.993377 | 187 | 0.640669 |
e8772970f049b12aa699f4ad1e0768aa4ee6f5bb | 24,181 | exs | Elixir | test/ex_json_schema/validator_test.exs | stefanchrobot/ex_json_schema | 81c8b031a9fb9317c514f03a874f74819bb0cf9e | [
"MIT"
] | null | null | null | test/ex_json_schema/validator_test.exs | stefanchrobot/ex_json_schema | 81c8b031a9fb9317c514f03a874f74819bb0cf9e | [
"MIT"
] | null | null | null | test/ex_json_schema/validator_test.exs | stefanchrobot/ex_json_schema | 81c8b031a9fb9317c514f03a874f74819bb0cf9e | [
"MIT"
] | null | null | null | defmodule ExJsonSchema.ValidatorTest do
use ExUnit.Case, async: true
import ExJsonSchema.Validator
alias ExJsonSchema.Validator.Error
alias ExJsonSchema.Schema
@schema_with_ref Schema.resolve(%{
"properties" => %{
"foo" => %{"$ref" => "http://localhost:8000/subsc... | 31.943197 | 112 | 0.515942 |
e87773542f75a9a978267414fae271234019c514 | 3,620 | ex | Elixir | lib/groupher_server/cms/delegates/blog_curd.ex | coderplanets/coderplanets_server | 3663e56340d6d050e974c91f7e499d8424fc25e9 | [
"Apache-2.0"
] | 240 | 2018-11-06T09:36:54.000Z | 2022-02-20T07:12:36.000Z | lib/groupher_server/cms/delegates/blog_curd.ex | coderplanets/coderplanets_server | 3663e56340d6d050e974c91f7e499d8424fc25e9 | [
"Apache-2.0"
] | 363 | 2018-07-11T03:38:14.000Z | 2021-12-14T01:42:40.000Z | lib/groupher_server/cms/delegates/blog_curd.ex | coderplanets/coderplanets_server | 3663e56340d6d050e974c91f7e499d8424fc25e9 | [
"Apache-2.0"
] | 22 | 2019-01-27T11:47:56.000Z | 2021-02-28T13:17:52.000Z | defmodule GroupherServer.CMS.Delegate.BlogCURD do
@moduledoc """
CURD operation on post/job ...
"""
import Ecto.Query, warn: false
import Helper.Utils, only: [strip_struct: 1, done: 1]
import GroupherServer.Support.Factory, only: [mock_rich_text: 1]
import Helper.ErrorCode
import GroupherServer.CMS.Del... | 30.420168 | 95 | 0.654696 |
e877b35ed0c0523c1f5c3f6d9964d5b0fe8978ee | 55 | exs | Elixir | test/test_read.exs | avoceteditors/wulfila | 0cc3b3264a6b1b94bf168d5953ea34d5a0a5194a | [
"BSD-3-Clause"
] | null | null | null | test/test_read.exs | avoceteditors/wulfila | 0cc3b3264a6b1b94bf168d5953ea34d5a0a5194a | [
"BSD-3-Clause"
] | null | null | null | test/test_read.exs | avoceteditors/wulfila | 0cc3b3264a6b1b94bf168d5953ea34d5a0a5194a | [
"BSD-3-Clause"
] | null | null | null | defmodule Wulfila.Read.Test do
use ExUnit.Core
end
| 9.166667 | 30 | 0.763636 |
e877e7a16fcbba50dca98616f1182f82bee3ebc1 | 93,547 | ex | Elixir | clients/security_center/lib/google_api/security_center/v1/api/folders.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/security_center/lib/google_api/security_center/v1/api/folders.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/security_center/lib/google_api/security_center/v1/api/folders.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... | 53.121522 | 2,230 | 0.637979 |
e877f473ae6ee69956f5a13a49310c5b789620fc | 2,482 | exs | Elixir | test/saxy/builder_test.exs | duffelhq/saxy | fb37f1d9ce919e6085a924c2483c515ee6cb997b | [
"MIT"
] | null | null | null | test/saxy/builder_test.exs | duffelhq/saxy | fb37f1d9ce919e6085a924c2483c515ee6cb997b | [
"MIT"
] | null | null | null | test/saxy/builder_test.exs | duffelhq/saxy | fb37f1d9ce919e6085a924c2483c515ee6cb997b | [
"MIT"
] | null | null | null | defmodule Saxy.BuilderTest do
use ExUnit.Case, async: true
use ExUnitProperties
import Saxy.Builder, only: [build: 1]
doctest Saxy.Builder
test "builds pre-built simple-form element" do
element = Saxy.XML.element(:foo, [], [])
assert build(element) == element
element = Saxy.XML.empty_element(:... | 26.688172 | 112 | 0.642224 |
e877f9a73a3042286d9ee9cc2788384203b4a258 | 2,524 | ex | Elixir | lib/monad/writer.ex | lerencao/MonadEx | b8276cfc354da1e31d82e5ca9dfaa624340e835b | [
"MIT"
] | null | null | null | lib/monad/writer.ex | lerencao/MonadEx | b8276cfc354da1e31d82e5ca9dfaa624340e835b | [
"MIT"
] | null | null | null | lib/monad/writer.ex | lerencao/MonadEx | b8276cfc354da1e31d82e5ca9dfaa624340e835b | [
"MIT"
] | 1 | 2018-09-27T20:47:16.000Z | 2018-09-27T20:47:16.000Z | defmodule Monad.Writer do
@moduledoc """
The writer monad keeps track of a calculation and a "log".
The log can be anything that conforms to the `Monoid` protocol.
It's often useful to combine the writer monad with others. For example, you
can use a `Monad.Maybe` as the `value` of the writer monad. This off... | 29.694118 | 90 | 0.656101 |
e87829db75990ca249ff040a3277d59cd7833448 | 1,117 | ex | Elixir | test/support/channel_case.ex | manojsamanta/election | e4eca4f2813011954d08eb04d057f84a9f6bda90 | [
"MIT"
] | null | null | null | test/support/channel_case.ex | manojsamanta/election | e4eca4f2813011954d08eb04d057f84a9f6bda90 | [
"MIT"
] | null | null | null | test/support/channel_case.ex | manojsamanta/election | e4eca4f2813011954d08eb04d057f84a9f6bda90 | [
"MIT"
] | null | null | null | defmodule ElectionWeb.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 interacts ... | 27.243902 | 70 | 0.728738 |
e8783f06f4f878772486c1ac01e9c757b7165e74 | 2,585 | ex | Elixir | farmbot_core/lib/farmbot_core/asset_workers/firmware_config_worker.ex | SeppPenner/farmbot_os | 39ba5c5880f8aef71792e2c009514bed1177089c | [
"MIT"
] | 1 | 2019-08-06T11:51:48.000Z | 2019-08-06T11:51:48.000Z | farmbot_core/lib/farmbot_core/asset_workers/firmware_config_worker.ex | SeppPenner/farmbot_os | 39ba5c5880f8aef71792e2c009514bed1177089c | [
"MIT"
] | null | null | null | farmbot_core/lib/farmbot_core/asset_workers/firmware_config_worker.ex | SeppPenner/farmbot_os | 39ba5c5880f8aef71792e2c009514bed1177089c | [
"MIT"
] | null | null | null | defimpl FarmbotCore.AssetWorker, for: FarmbotCore.Asset.FirmwareConfig do
@moduledoc """
This asset worker does not get restarted. It inistead responds to GenServer
calls.
"""
use GenServer
require FarmbotCore.Logger
alias FarmbotFirmware
alias FarmbotCore.{Asset.FirmwareConfig, FirmwareSideEffects}
... | 39.166667 | 125 | 0.708317 |
e8786af9fb2663c6b194842a1eb395402ed6f00f | 306 | ex | Elixir | lib/shopix_web/controllers/admin/home_controller.ex | gsarwate/shopix | 21d0e85294ee92cb7573d1b5a5746af6824b9355 | [
"MIT"
] | 196 | 2019-05-05T15:59:32.000Z | 2022-03-15T02:37:19.000Z | lib/shopix_web/controllers/admin/home_controller.ex | gsarwate/shopix | 21d0e85294ee92cb7573d1b5a5746af6824b9355 | [
"MIT"
] | 105 | 2019-05-04T19:04:40.000Z | 2021-07-28T11:21:45.000Z | lib/shopix_web/controllers/admin/home_controller.ex | gsarwate/shopix | 21d0e85294ee92cb7573d1b5a5746af6824b9355 | [
"MIT"
] | 26 | 2019-05-05T19:40:52.000Z | 2021-11-16T00:32:46.000Z | defmodule ShopixWeb.Admin.HomeController do
use ShopixWeb, :controller
def index(conn, %{"locale" => locale}) do
conn
|> put_session(:admin_current_locale, locale)
|> redirect(to: admin_home_path(conn, :index))
end
def index(conn, _params) do
render(conn, "index.html")
end
end
| 21.857143 | 50 | 0.689542 |
e8786b410158b6f23cdf3ab8db5244f986985834 | 2,949 | ex | Elixir | lib/glimesh_web/controllers/user_settings_controller.ex | Darkhax-Forked/glimesh.tv | 9566f0ec6909ecc5151f0e092f3e08b63d911fa8 | [
"MIT"
] | 1 | 2020-08-02T00:12:28.000Z | 2020-08-02T00:12:28.000Z | lib/glimesh_web/controllers/user_settings_controller.ex | Darkhax-Forked/glimesh.tv | 9566f0ec6909ecc5151f0e092f3e08b63d911fa8 | [
"MIT"
] | null | null | null | lib/glimesh_web/controllers/user_settings_controller.ex | Darkhax-Forked/glimesh.tv | 9566f0ec6909ecc5151f0e092f3e08b63d911fa8 | [
"MIT"
] | null | null | null | defmodule GlimeshWeb.UserSettingsController do
use GlimeshWeb, :controller
alias Glimesh.Accounts
alias Glimesh.Streams
alias GlimeshWeb.UserAuth
plug :put_layout, "user-sidebar.html"
plug :assign_profile_changesets
plug :assign_channel_changesets
def profile(conn, _params) do
render(conn, "prof... | 28.085714 | 83 | 0.680231 |
e8789ccd4831bff5700bea817028726d06fd77e9 | 1,275 | ex | Elixir | lib/game/command/examine.ex | shanesveller/ex_venture | 68507da11442a9e0423073fcd305e9021f649ca1 | [
"MIT"
] | null | null | null | lib/game/command/examine.ex | shanesveller/ex_venture | 68507da11442a9e0423073fcd305e9021f649ca1 | [
"MIT"
] | null | null | null | lib/game/command/examine.ex | shanesveller/ex_venture | 68507da11442a9e0423073fcd305e9021f649ca1 | [
"MIT"
] | null | null | null | defmodule Game.Command.Examine do
@moduledoc """
The "info" command
"""
use Game.Command
alias Game.Item
alias Game.Items
commands(["examine"])
@impl Game.Command
def help(:topic), do: "Examine"
def help(:short), do: "View information about items in your inventory"
def help(:full) do
"""
... | 21.610169 | 97 | 0.622745 |
e8789deef4e6bd5a29f195567a13a94220de0714 | 815 | ex | Elixir | lib/mix/tasks/init.ex | jfrolich/smoothie | 4b471913b8b9dc80484153cc2fda0c8944039356 | [
"MIT"
] | 45 | 2016-09-23T15:36:28.000Z | 2022-02-08T19:43:03.000Z | lib/mix/tasks/init.ex | jfrolich/smoothie | 4b471913b8b9dc80484153cc2fda0c8944039356 | [
"MIT"
] | 20 | 2016-09-27T15:51:32.000Z | 2020-09-21T02:56:59.000Z | lib/mix/tasks/init.ex | jfrolich/smoothie | 4b471913b8b9dc80484153cc2fda0c8944039356 | [
"MIT"
] | 6 | 2016-09-27T15:38:39.000Z | 2017-07-17T19:09:27.000Z | defmodule Mix.Tasks.Smoothie.Init do
use Mix.Task
@shortdoc "Initializes smoothie"
@package_version "elixir-smoothie@3.X"
@root "./"
@assets "./assets"
@standard_opts [into: IO.stream(:stdio, :line), cd: @root]
@new_opts [into: IO.stream(:stdio, :line), cd: @assets]
def run(_) do
try do
do_in... | 26.290323 | 79 | 0.582822 |
e878ce4abc3eff40874e008b849d875ff0c44e8f | 10,273 | ex | Elixir | clients/speech/lib/google_api/speech/v1/api/projects.ex | chingor13/elixir-google-api | 85e13fa25c4c9f4618bb463ab4c79245fc6d2a7b | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/speech/lib/google_api/speech/v1/api/projects.ex | chingor13/elixir-google-api | 85e13fa25c4c9f4618bb463ab4c79245fc6d2a7b | [
"Apache-2.0"
] | null | null | null | clients/speech/lib/google_api/speech/v1/api/projects.ex | chingor13/elixir-google-api | 85e13fa25c4c9f4618bb463ab4c79245fc6d2a7b | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 42.804167 | 196 | 0.627081 |
e878fbfbfdf1fe1503aead3746633ac6afaea9b1 | 3,543 | ex | Elixir | lib/rdf/serialization/parse_helper.ex | marcelotto/rdf-ex | 12adce69eb2dbff027cbc83aaaf912067aea1b02 | [
"MIT"
] | 53 | 2017-06-25T22:20:44.000Z | 2020-04-27T17:27:51.000Z | lib/rdf/serialization/parse_helper.ex | marcelotto/rdf-ex | 12adce69eb2dbff027cbc83aaaf912067aea1b02 | [
"MIT"
] | 7 | 2017-06-25T00:29:11.000Z | 2020-03-11T00:23:47.000Z | lib/rdf/serialization/parse_helper.ex | rdf-elixir/rdf-ex | 7d4280ec9a912ef6ee9fc96ecdfdf26647016d6a | [
"MIT"
] | 3 | 2020-07-03T13:25:36.000Z | 2021-04-04T12:33:51.000Z | defmodule RDF.Serialization.ParseHelper do
@moduledoc false
alias RDF.IRI
@rdf_type RDF.Utils.Bootstrapping.rdf_iri("type")
def rdf_type, do: @rdf_type
def to_iri_string({:iriref, _line, value}), do: value |> iri_unescape
def to_iri({:iriref, line, value}) do
with iri = RDF.iri(iri_unescape(value)) ... | 34.735294 | 96 | 0.678521 |
e8793c64f705a4211bc354b5c0fbbee6893263df | 4,756 | ex | Elixir | deps/phoenix_html/lib/phoenix_html/link.ex | hallebadkapp/rumbl-ms | ae2ef9975658115f8c4d5c49c28d8bde00a74b83 | [
"MIT"
] | 1 | 2019-05-07T15:05:58.000Z | 2019-05-07T15:05:58.000Z | deps/phoenix_html/lib/phoenix_html/link.ex | hallebadkapp/rumbl-ms | ae2ef9975658115f8c4d5c49c28d8bde00a74b83 | [
"MIT"
] | null | null | null | deps/phoenix_html/lib/phoenix_html/link.ex | hallebadkapp/rumbl-ms | ae2ef9975658115f8c4d5c49c28d8bde00a74b83 | [
"MIT"
] | null | null | null | defmodule Phoenix.HTML.Link do
@moduledoc """
Conveniences for working with links and URLs in HTML.
"""
import Phoenix.HTML.Tag
@doc """
Generates a link to the given URL.
## Examples
link("hello", to: "/world")
#=> <a href="/world">hello</a>
link("<hello>", to: "/world")
#=> ... | 28.479042 | 98 | 0.625526 |
e879487cb5e071790984953f1fb9c1207ea7a983 | 3,627 | ex | Elixir | lib/credo/cli/options.ex | jlgeering/credo | b952190ed758c262aa0d9bbee01227f9b1f0c63b | [
"MIT"
] | null | null | null | lib/credo/cli/options.ex | jlgeering/credo | b952190ed758c262aa0d9bbee01227f9b1f0c63b | [
"MIT"
] | null | null | null | lib/credo/cli/options.ex | jlgeering/credo | b952190ed758c262aa0d9bbee01227f9b1f0c63b | [
"MIT"
] | null | null | null | defmodule Credo.CLI.Options do
@moduledoc """
The `Options` struct represents the options given on the command line.
"""
@switches [
all_priorities: :boolean,
all: :boolean,
checks: :string,
config_name: :string,
config_file: :string,
color: :boolean,
crash_on_error: :boolean,
d... | 25.542254 | 129 | 0.629997 |
e8795a56b251cb1dafc5aaf11d39c22ac62b5d70 | 9,695 | exs | Elixir | test/hangman/web_test.exs | brpandey/elixir-hangman | 458502af766b42e492ebb9ca543fc8b855687b09 | [
"MIT"
] | 1 | 2016-12-19T00:10:34.000Z | 2016-12-19T00:10:34.000Z | test/hangman/web_test.exs | brpandey/elixir-hangman | 458502af766b42e492ebb9ca543fc8b855687b09 | [
"MIT"
] | null | null | null | test/hangman/web_test.exs | brpandey/elixir-hangman | 458502af766b42e492ebb9ca543fc8b855687b09 | [
"MIT"
] | null | null | null | defmodule Hangman.Web.Test do
use ExUnit.Case, async: false
setup do
IO.puts("Web Test")
# File.rm_rf("./tmp/*_test_hangman_games.txt")
{:ok, apps} = Application.ensure_all_started(:hangman_game)
# We also need to start HTTPoison
HTTPoison.start()
on_exit(fn ->
# When the test is f... | 54.774011 | 1,905 | 0.674884 |
e87971e3e00f6e51bbb8459502dc3c43bfd30bed | 568 | exs | Elixir | 2021/day01/mix.exs | faried/advent | 1d3817a3c305963ff22e844630bbafd3af242d3e | [
"MIT"
] | 2 | 2021-11-24T12:54:15.000Z | 2022-01-20T11:02:11.000Z | jpcarver+elixir/day01/mix.exs | NashFP/advent-2021 | d2f4648e904c9105514fd68db2dfe3b0e682093d | [
"MIT"
] | null | null | null | jpcarver+elixir/day01/mix.exs | NashFP/advent-2021 | d2f4648e904c9105514fd68db2dfe3b0e682093d | [
"MIT"
] | null | null | null | defmodule Day01.MixProject do
use Mix.Project
def project do
[
app: :day01,
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 |
e879bb897fdd8c3f3d98c13e6512b624652cb070 | 191 | ex | Elixir | lib/bitcoin/node/storage/engine/postgres/models/tx.ex | anthdm/bitcoin-elixir | 5ca9f8bf4e9b2b38527670e80568a85e0aa612c0 | [
"Apache-2.0"
] | 81 | 2017-04-20T17:42:59.000Z | 2022-02-08T03:49:22.000Z | lib/bitcoin/node/storage/engine/postgres/models/tx.ex | anthdm/bitcoin-elixir | 5ca9f8bf4e9b2b38527670e80568a85e0aa612c0 | [
"Apache-2.0"
] | 2 | 2017-09-07T13:58:57.000Z | 2018-01-13T10:38:07.000Z | lib/bitcoin/node/storage/engine/postgres/models/tx.ex | anthdm/bitcoin-elixir | 5ca9f8bf4e9b2b38527670e80568a85e0aa612c0 | [
"Apache-2.0"
] | 22 | 2017-08-16T14:19:44.000Z | 2021-12-22T04:36:57.000Z | defmodule Bitcoin.Node.Storage.Engine.Postgres.Models.Tx do
use Ecto.Schema
schema "tx" do
field :hash, :binary
field :version, :integer
field :lock_time, :integer
end
end
| 19.1 | 59 | 0.706806 |
e879c9ebfe847d4e9685ce434ddebb108c16b1ba | 1,074 | exs | Elixir | test/phoenix_starter_web/plugs/require_user_permission_test.exs | newaperio/phoenix_starter | 02f2f5550a94b940bb4e9c61042b032f54af8b72 | [
"MIT"
] | 3 | 2021-03-19T10:39:02.000Z | 2021-07-25T19:54:09.000Z | test/phoenix_starter_web/plugs/require_user_permission_test.exs | newaperio/phoenix_starter | 02f2f5550a94b940bb4e9c61042b032f54af8b72 | [
"MIT"
] | 204 | 2020-11-27T06:00:31.000Z | 2022-03-25T08:08:16.000Z | test/phoenix_starter_web/plugs/require_user_permission_test.exs | newaperio/phoenix_starter | 02f2f5550a94b940bb4e9c61042b032f54af8b72 | [
"MIT"
] | null | null | null | defmodule PhoenixStarterWeb.RequireUserPermissionTest do
use PhoenixStarterWeb.ConnCase
import PhoenixStarter.UsersFixtures
alias PhoenixStarterWeb.RequireUserPermission
test "init raises without permission option" do
assert_raise ArgumentError, fn ->
RequireUserPermission.init([])
end
end
... | 26.195122 | 86 | 0.689944 |
e87a146355a6c2b044f640c5b753b7d6c0792b4d | 401 | exs | Elixir | priv/repo/migrations/20210503122200_create_sessions.exs | jeepers3327/senti | 2e346759d8a8704f11364a835b6b9cd00a52c640 | [
"MIT"
] | null | null | null | priv/repo/migrations/20210503122200_create_sessions.exs | jeepers3327/senti | 2e346759d8a8704f11364a835b6b9cd00a52c640 | [
"MIT"
] | null | null | null | priv/repo/migrations/20210503122200_create_sessions.exs | jeepers3327/senti | 2e346759d8a8704f11364a835b6b9cd00a52c640 | [
"MIT"
] | null | null | null | defmodule Senti.Repo.Migrations.CreateSessions do
use Ecto.Migration
def change do
create table(:sessions) do
add :access_code, :string, null: false
add :is_done, :boolean, default: false, null: false
add :presentation_id, references(:presentations, on_delete: :delete_all), null: false
... | 25.0625 | 91 | 0.700748 |
e87a1d32c39df8f84df315e2c88c45ea18adbb90 | 8,358 | ex | Elixir | lib/phoenix/live_dashboard/pages/home_page.ex | feng19/phoenix_live_dashboard | a415422e2ef11527c983a29fb9f3c9e03808439c | [
"MIT"
] | 1 | 2020-11-04T16:17:32.000Z | 2020-11-04T16:17:32.000Z | lib/phoenix/live_dashboard/pages/home_page.ex | feng19/phoenix_live_dashboard | a415422e2ef11527c983a29fb9f3c9e03808439c | [
"MIT"
] | null | null | null | lib/phoenix/live_dashboard/pages/home_page.ex | feng19/phoenix_live_dashboard | a415422e2ef11527c983a29fb9f3c9e03808439c | [
"MIT"
] | 1 | 2020-11-16T14:01:08.000Z | 2020-11-16T14:01:08.000Z | defmodule Phoenix.LiveDashboard.HomePage do
@moduledoc false
use Phoenix.LiveDashboard.PageBuilder
import Phoenix.HTML
import Phoenix.LiveDashboard.Helpers
alias Phoenix.LiveDashboard.SystemInfo
@memory_usage_sections [
{:atom, "Atoms", "green", nil},
{:binary, "Binary", "blue", nil},
{:code,... | 25.716923 | 130 | 0.570112 |
e87a2daac0563512745331401505226b80b8a13a | 715 | ex | Elixir | lib/shoehorn/release.ex | petrus-jvrensburg/shoehorn | 253b677b2ac68faf22b864ed0ab346ae02e8709a | [
"Apache-2.0"
] | null | null | null | lib/shoehorn/release.ex | petrus-jvrensburg/shoehorn | 253b677b2ac68faf22b864ed0ab346ae02e8709a | [
"Apache-2.0"
] | null | null | null | lib/shoehorn/release.ex | petrus-jvrensburg/shoehorn | 253b677b2ac68faf22b864ed0ab346ae02e8709a | [
"Apache-2.0"
] | null | null | null | defmodule Shoehorn.Release do
alias Shoehorn.Utils
def init(%{boot_scripts: boot_scripts, applications: applications} = release) do
boot_scripts =
Map.put(boot_scripts, :shoehorn, start_apps(applications) ++ load_apps(applications))
%{release | boot_scripts: boot_scripts}
end
def start_apps(app... | 26.481481 | 91 | 0.665734 |
e87a7c237ecc0f893f4c40d23d1d1530224208ff | 795 | exs | Elixir | apps/xomg_tasks/mix.exs | omisego/elixir-omg | 2c68973d8f29033d137f63a6e060f12e2a7dcd59 | [
"Apache-2.0"
] | 177 | 2018-08-24T03:51:02.000Z | 2020-05-30T13:29:25.000Z | apps/xomg_tasks/mix.exs | omisego/elixir-omg | 2c68973d8f29033d137f63a6e060f12e2a7dcd59 | [
"Apache-2.0"
] | 1,042 | 2018-08-25T00:52:39.000Z | 2020-06-01T05:15:17.000Z | apps/xomg_tasks/mix.exs | omisego/elixir-omg | 2c68973d8f29033d137f63a6e060f12e2a7dcd59 | [
"Apache-2.0"
] | 47 | 2018-08-24T12:06:33.000Z | 2020-04-28T11:49:25.000Z | defmodule OMG.XomgTasks.MixProject do
@moduledoc """
This is just a proxy app to hold and use all the code related to running `xomg` Mix.Tasks.
NOTE: this is not a proper mix app, just some Mix.Tasks which call into other mix apps
"""
use Mix.Project
def project() do
[
app: :xomg_tasks,
ve... | 22.714286 | 92 | 0.571069 |
e87aa47b2ed158e524944198a0a9beca1357402d | 1,834 | ex | Elixir | test/config/authorization/config.ex | MPParsley/harvesting-validator | b2c00fd2b8688ceedb9df137b6eb5cf4413967ac | [
"MIT"
] | null | null | null | test/config/authorization/config.ex | MPParsley/harvesting-validator | b2c00fd2b8688ceedb9df137b6eb5cf4413967ac | [
"MIT"
] | 2 | 2021-04-06T09:36:08.000Z | 2021-12-20T12:19:03.000Z | test/config/authorization/config.ex | MPParsley/harvesting-validator | b2c00fd2b8688ceedb9df137b6eb5cf4413967ac | [
"MIT"
] | 1 | 2021-12-20T11:53:51.000Z | 2021-12-20T11:53:51.000Z | alias Acl.Accessibility.Always, as: AlwaysAccessible
alias Acl.GraphSpec.Constraint.Resource, as: ResourceConstraint
alias Acl.GraphSpec.Constraint.ResourceFormat, as: ResourceFormatConstraint
alias Acl.Accessibility.ByQuery, as: AccessByQuery
alias Acl.GraphSpec, as: GraphSpec
alias Acl.GroupSpec, as: GroupSpec
alias ... | 37.428571 | 90 | 0.61723 |
e87acd936c948e4d88f24d600773b9407bf2a2b9 | 127 | ex | Elixir | test/support/in_memory_mailer.ex | ngscheurich/jabberwocky | c99cd52d35a4847afa83194132f8b1f5ee952d32 | [
"MIT"
] | null | null | null | test/support/in_memory_mailer.ex | ngscheurich/jabberwocky | c99cd52d35a4847afa83194132f8b1f5ee952d32 | [
"MIT"
] | null | null | null | test/support/in_memory_mailer.ex | ngscheurich/jabberwocky | c99cd52d35a4847afa83194132f8b1f5ee952d32 | [
"MIT"
] | null | null | null | defmodule Jabberwocky.Email.InMemoryMailer do
@behaviour Jabberwocky.Email.Client
def deliver_later(email), do: email
end
| 21.166667 | 45 | 0.811024 |
e87b442a3e0ac677b4156a5f5d3ce94f963aec53 | 1,060 | exs | Elixir | mix.exs | tiagoengel/phoenix-jsroutes | 9dacc6472c9db0f97d7a39e1cc7e1b7dbd74ac50 | [
"MIT"
] | 27 | 2016-06-05T02:07:58.000Z | 2021-06-11T20:12:38.000Z | mix.exs | tiagoengel/phoenix-jsroutes | 9dacc6472c9db0f97d7a39e1cc7e1b7dbd74ac50 | [
"MIT"
] | 9 | 2016-06-21T18:09:58.000Z | 2021-03-10T14:21:51.000Z | mix.exs | tiagoengel/phoenix-jsroutes | 9dacc6472c9db0f97d7a39e1cc7e1b7dbd74ac50 | [
"MIT"
] | 6 | 2016-06-05T21:01:13.000Z | 2020-04-22T13:50:37.000Z | defmodule PhoenixJsroutes.Mixfile do
use Mix.Project
def project do
[
app: :phoenix_jsroutes,
version: "2.0.0",
elixir: "~> 1.4",
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
description: description(),
package: package(),
deps: deps()... | 22.553191 | 95 | 0.565094 |
e87b5fb38059475eea563a0317cb450acd5b0752 | 53,163 | ex | Elixir | clients/redis/lib/google_api/redis/v1beta1/api/projects.ex | chingor13/elixir-google-api | 85e13fa25c4c9f4618bb463ab4c79245fc6d2a7b | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/redis/lib/google_api/redis/v1beta1/api/projects.ex | chingor13/elixir-google-api | 85e13fa25c4c9f4618bb463ab4c79245fc6d2a7b | [
"Apache-2.0"
] | null | null | null | clients/redis/lib/google_api/redis/v1beta1/api/projects.ex | chingor13/elixir-google-api | 85e13fa25c4c9f4618bb463ab4c79245fc6d2a7b | [
"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 ... | 45.168224 | 196 | 0.623366 |
e87b81611336b0e61cfc7211b5e0490a2c428f0f | 165 | exs | Elixir | test/statements_reader_test.exs | r-coh/mpesa_statements_scrapper | 6d4d6116c5d8f465a8c503891e4d4b45bc8b088f | [
"MIT"
] | 2 | 2021-07-28T18:09:04.000Z | 2021-11-20T07:27:02.000Z | test/statements_reader_test.exs | r-coh/mpesa_statements_scrapper | 6d4d6116c5d8f465a8c503891e4d4b45bc8b088f | [
"MIT"
] | null | null | null | test/statements_reader_test.exs | r-coh/mpesa_statements_scrapper | 6d4d6116c5d8f465a8c503891e4d4b45bc8b088f | [
"MIT"
] | null | null | null | defmodule StatementsReaderTest do
use ExUnit.Case
doctest StatementsReader
test "greets the world" do
assert StatementsReader.hello() == :world
end
end
| 18.333333 | 45 | 0.757576 |
e87b9682701199ae812d5f99300f715f06ec15d2 | 7,815 | ex | Elixir | test/_support/spec_example.ex | kianmeng/mavis | 6ba154efdfadcce1aca92ac735dadb209380c25b | [
"MIT"
] | null | null | null | test/_support/spec_example.ex | kianmeng/mavis | 6ba154efdfadcce1aca92ac735dadb209380c25b | [
"MIT"
] | null | null | null | test/_support/spec_example.ex | kianmeng/mavis | 6ba154efdfadcce1aca92ac735dadb209380c25b | [
"MIT"
] | null | null | null | defmodule TypeTest.SpecExample do
defmodule Basics do
@spec any_spec(any) :: any
def any_spec(x), do: x
@spec term_spec(term) :: term
def term_spec(x), do: x
@spec none_spec(any) :: no_return
def none_spec(_), do: raise "foo"
@spec pid_spec(pid) :: pid
def pid_spec(x), do: x
@s... | 27.517606 | 117 | 0.65771 |
e87bfa42bdb4096cb42e9e94f40c744a0c23b665 | 12,723 | ex | Elixir | lib/phoenix/logger.ex | 4goodapp/phoenix | d1b7ff9095fe5cf94150b7bdaa65e007af8eac83 | [
"MIT"
] | null | null | null | lib/phoenix/logger.ex | 4goodapp/phoenix | d1b7ff9095fe5cf94150b7bdaa65e007af8eac83 | [
"MIT"
] | null | null | null | lib/phoenix/logger.ex | 4goodapp/phoenix | d1b7ff9095fe5cf94150b7bdaa65e007af8eac83 | [
"MIT"
] | null | null | null | defmodule Phoenix.Logger do
@moduledoc """
Instrumenter to handle logging of various instrumentation events.
## Instrumentation
Phoenix uses the `:telemetry` library for instrumentation. The following events
are published by Phoenix with the following measurements and metadata:
* `[:phoenix, :endpoint,... | 34.386486 | 186 | 0.640022 |
e87c2b6acfd2ed55956b533e05a3d73852edbb26 | 78 | exs | Elixir | test/views/layout_view_test.exs | thatbraxguy/knowledgeshare | e17b2904641f805cc231aa18f45f05103e1fb9ef | [
"MIT"
] | null | null | null | test/views/layout_view_test.exs | thatbraxguy/knowledgeshare | e17b2904641f805cc231aa18f45f05103e1fb9ef | [
"MIT"
] | null | null | null | test/views/layout_view_test.exs | thatbraxguy/knowledgeshare | e17b2904641f805cc231aa18f45f05103e1fb9ef | [
"MIT"
] | null | null | null | defmodule Hivemind.LayoutViewTest do
use Hivemind.ConnCase, async: true
end
| 19.5 | 36 | 0.820513 |
e87c4237fd436375851b416c93122a77c011c705 | 1,728 | ex | Elixir | elixir/lib/homework_web/resolvers/transactions_resolver.ex | CallMeHK/web-homework | 30f41f193b99706fd7c7d9cc3f6db4941bad86b5 | [
"MIT"
] | null | null | null | elixir/lib/homework_web/resolvers/transactions_resolver.ex | CallMeHK/web-homework | 30f41f193b99706fd7c7d9cc3f6db4941bad86b5 | [
"MIT"
] | null | null | null | elixir/lib/homework_web/resolvers/transactions_resolver.ex | CallMeHK/web-homework | 30f41f193b99706fd7c7d9cc3f6db4941bad86b5 | [
"MIT"
] | null | null | null | defmodule HomeworkWeb.Resolvers.TransactionsResolver do
alias Homework.Merchants
alias Homework.Transactions
alias Homework.Users
@doc """
Get a list of transcations
"""
def transactions(_root, args, _info) do
{:ok, Transactions.list_transactions(args)}
end
@doc """
Get the user associated wit... | 24 | 71 | 0.653356 |
e87c520560deaa7a1cb298e1c15b69b8d26b5ba5 | 136 | exs | Elixir | installer/templates/phx_umbrella/apps/app_name/config/config.exs | raspo/phoenix | 438b74255e7a4d68b4eaf1a295d0fcd201c71421 | [
"MIT"
] | 1 | 2015-05-19T11:04:16.000Z | 2015-05-19T11:04:16.000Z | installer/templates/phx_umbrella/apps/app_name/config/config.exs | raspo/phoenix | 438b74255e7a4d68b4eaf1a295d0fcd201c71421 | [
"MIT"
] | null | null | null | installer/templates/phx_umbrella/apps/app_name/config/config.exs | raspo/phoenix | 438b74255e7a4d68b4eaf1a295d0fcd201c71421 | [
"MIT"
] | null | null | null | use Mix.Config
<%= if ecto do %>config :<%= app_name %>, ecto_repos: [<%= app_module %>.Repo]<% end %>
import_config "#{Mix.env}.exs"
| 22.666667 | 87 | 0.610294 |
e87c55a486e5758097d40771a6074494f38913a5 | 1,709 | ex | Elixir | clients/real_time_bidding/lib/google_api/real_time_bidding/v1/model/image.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/real_time_bidding/lib/google_api/real_time_bidding/v1/model/image.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/real_time_bidding/lib/google_api/real_time_bidding/v1/model/image.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... | 32.245283 | 113 | 0.698654 |
e87c5e69284ba29f452e87faedb9d41c8801a5da | 4,380 | ex | Elixir | clients/container/lib/google_api/container/v1/model/addons_config.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/container/lib/google_api/container/v1/model/addons_config.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/container/lib/google_api/container/v1/model/addons_config.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... | 67.384615 | 424 | 0.769178 |
e87c6c2e9c85802af8ed181645353df00d999eed | 2,303 | exs | Elixir | spec_formatters/diff_showcase_spec.exs | andrei-mihaila/espec | ffab88aa987bd446e9c44fe38d73cfe6b789f80b | [
"Apache-2.0"
] | 807 | 2015-03-25T14:00:19.000Z | 2022-03-24T08:08:15.000Z | spec_formatters/diff_showcase_spec.exs | andrei-mihaila/espec | ffab88aa987bd446e9c44fe38d73cfe6b789f80b | [
"Apache-2.0"
] | 254 | 2015-03-27T10:12:25.000Z | 2021-07-12T01:40:15.000Z | spec_formatters/diff_showcase_spec.exs | andrei-mihaila/espec | ffab88aa987bd446e9c44fe38d73cfe6b789f80b | [
"Apache-2.0"
] | 85 | 2015-04-02T10:25:19.000Z | 2021-01-30T21:30:43.000Z | Code.require_file("spec_formatters/custom_formatter.ex")
Code.require_file("spec_formatters/spec_helper.exs")
defmodule DiffShowcaseSpec do
use ESpec, async: true
it "shows eq" do
expect([1 + 1]) |> to(eq 2)
end
it "shows eql" do
expect(" one") |> to(eq "none ")
end
it "shows be" do
expect(2... | 21.933333 | 86 | 0.585758 |
e87c870654c92b4748b94527863736af729d9d84 | 388 | exs | Elixir | daniel/prog_elix/ch24/is_collection.exs | jdashton/glowing-succotash | 44580c2d4cb300e33156d42e358e8a055948a079 | [
"MIT"
] | null | null | null | daniel/prog_elix/ch24/is_collection.exs | jdashton/glowing-succotash | 44580c2d4cb300e33156d42e358e8a055948a079 | [
"MIT"
] | 1 | 2020-02-26T14:55:23.000Z | 2020-02-26T14:55:23.000Z | daniel/prog_elix/ch24/is_collection.exs | jdashton/glowing-succotash | 44580c2d4cb300e33156d42e358e8a055948a079 | [
"MIT"
] | null | null | null | defprotocol Collection do
@fallback_to_any true
def is_collection?(value)
end
defimpl Collection, for: [List, Tuple, BitString, Map] do
def is_collection?(_), do: true
end
defimpl Collection, for: Any do
def is_collection?(_), do: false
end
Enum.each [ 1, 1.0, [1, 2], {1, 2}, %{}, "cat" ], fn value ->
IO.p... | 22.823529 | 69 | 0.67268 |
e87c8bc7459fa25dfb401f22ebd610142c16959c | 847 | ex | Elixir | lib/logger/context.ex | Bruno-Louvem/ecto-job-scheduler | cb6816652cd92f4afb82663e038544f839113152 | [
"MIT"
] | 4 | 2019-12-07T12:52:52.000Z | 2021-03-11T18:31:25.000Z | lib/logger/context.ex | Bruno-Louvem/ecto-job-scheduler | cb6816652cd92f4afb82663e038544f839113152 | [
"MIT"
] | 1 | 2020-12-17T15:47:30.000Z | 2020-12-17T15:47:30.000Z | lib/logger/context.ex | Bruno-Louvem/ecto-job-scheduler | cb6816652cd92f4afb82663e038544f839113152 | [
"MIT"
] | 5 | 2019-09-10T19:03:52.000Z | 2021-08-16T03:18:00.000Z | defmodule EctoJobScheduler.Logger.Context do
@moduledoc """
Module responsible to get and set the request context from Logger metadata.
"""
require Logger
@type context :: keyword
@type key :: atom
@spec get() :: context
def get, do: Logger.metadata()
@spec get(key) :: any()
def get(key), do: Ke... | 19.25 | 77 | 0.61039 |
e87ca84a625cf59c81a8f3a34086d5ad00020e0f | 444 | ex | Elixir | lib/brando_admin/live/content/palette_create_live.ex | univers-agency/brando | 69c3c52498a3f64518da3522cd9f27294a52cc68 | [
"Apache-2.0"
] | 1 | 2020-04-26T09:53:02.000Z | 2020-04-26T09:53:02.000Z | lib/brando_admin/live/content/palette_create_live.ex | univers-agency/brando | 69c3c52498a3f64518da3522cd9f27294a52cc68 | [
"Apache-2.0"
] | 198 | 2019-08-20T16:16:07.000Z | 2020-07-03T15:42:07.000Z | lib/brando_admin/live/content/palette_create_live.ex | univers-agency/brando | 69c3c52498a3f64518da3522cd9f27294a52cc68 | [
"Apache-2.0"
] | null | null | null | defmodule BrandoAdmin.Content.PaletteCreateLive do
use BrandoAdmin.LiveView.Form, schema: Brando.Content.Palette
alias BrandoAdmin.Components.Form
import Brando.Gettext
def render(assigns) do
~H"""
<.live_component module={Form}
id="palette_form"
current_user={@current_user}
schema={@... | 23.368421 | 63 | 0.657658 |
e87cde96ab987af37ce6906f59ba3997c29005e7 | 1,281 | ex | Elixir | lib/execjs/runtimes.ex | liveforeverx/execjs | 7e08a57aa950db3a3cc47ea583dd810e6e99e686 | [
"Unlicense"
] | null | null | null | lib/execjs/runtimes.ex | liveforeverx/execjs | 7e08a57aa950db3a3cc47ea583dd810e6e99e686 | [
"Unlicense"
] | null | null | null | lib/execjs/runtimes.ex | liveforeverx/execjs | 7e08a57aa950db3a3cc47ea583dd810e6e99e686 | [
"Unlicense"
] | null | null | null | defmodule Execjs.Runtimes do
import Execjs.Runtime
alias Execjs.RuntimeUnavailable
Module.register_attribute __MODULE__, :runtimes, accumulate: true
defruntime Node,
command: "node",
runner: "node_runner.js.eex"
defruntime SpiderMonkey,
command: "js",
runner: "spidermonkey_runner.js.eex"
... | 26.142857 | 92 | 0.639344 |
e87d0b8e4e010e1d76d9b0ee05d6cba5d34e7f59 | 2,549 | ex | Elixir | apps/admin_api/lib/admin_api.ex | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | apps/admin_api/lib/admin_api.ex | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | apps/admin_api/lib/admin_api.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... | 28.010989 | 74 | 0.721852 |
e87d1017055eb94a00458ce05762fa044ae0dc21 | 558 | exs | Elixir | day04/el_b.exs | mason-bially/aoc-2021 | 866ffc7e85f690c2ad9195da2304bfb515819023 | [
"MIT"
] | null | null | null | day04/el_b.exs | mason-bially/aoc-2021 | 866ffc7e85f690c2ad9195da2304bfb515819023 | [
"MIT"
] | null | null | null | day04/el_b.exs | mason-bially/aoc-2021 | 866ffc7e85f690c2ad9195da2304bfb515819023 | [
"MIT"
] | null | null | null | Code.require_file("el.ex", __DIR__)
File.stream!("day03/input", [encoding: :utf8], :line)
|> Stream.map(&String.trim/1)
|> Stream.filter(fn l -> l != "" end)
|> Enum.map(&String.to_charlist/1)
|> Kernel.then(fn n ->
{
Day03.eliminate_to_last_number(n,
fn c, {c0, c1} -> if c0 > c1, do: c == ?0, else: c == ?... | 27.9 | 67 | 0.582437 |
e87d3df809e41f2cbfacacca5267a7136b89da40 | 79 | ex | Elixir | lib/crimson_commerce_web/views/layout_view.ex | fossabot/crimson_commerce | c23c9ec8d0deedccd0e98e2e6adf634f96ec27ab | [
"MIT"
] | 64 | 2019-10-18T02:53:22.000Z | 2021-11-24T13:10:29.000Z | lib/crimson_commerce_web/views/layout_view.ex | soediro/crimson_commerce | a6f260dd68afb4cd497a14dd33b5075830d5f84a | [
"MIT"
] | 334 | 2019-10-15T22:14:20.000Z | 2022-03-31T06:07:26.000Z | lib/crimson_commerce_web/views/layout_view.ex | soediro/crimson_commerce | a6f260dd68afb4cd497a14dd33b5075830d5f84a | [
"MIT"
] | 12 | 2019-10-18T02:53:29.000Z | 2021-11-16T01:08:46.000Z | defmodule CrimsonCommerceWeb.LayoutView do
use CrimsonCommerceWeb, :view
end
| 19.75 | 42 | 0.848101 |
e87d527d4b664ed938ef51c119d62ef4b2da1bc7 | 2,289 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/host_rule.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/compute/lib/google_api/compute/v1/model/host_rule.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/compute/lib/google_api/compute/v1/model/host_rule.ex | dazuma/elixir-google-api | 6a9897168008efe07a6081d2326735fe332e522c | [
"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.188679 | 450 | 0.719965 |
e87d5ce2466e100a4e023f3746c14f31760d86bd | 115 | exs | Elixir | test/conduit/content_type/erlang_binary_test.exs | log4b/conduit | 5ecf5aa0edd831f54c28d596f1cb2d414fc99c6e | [
"MIT"
] | 119 | 2016-11-21T13:19:22.000Z | 2021-11-07T17:29:05.000Z | test/conduit/content_type/erlang_binary_test.exs | log4b/conduit | 5ecf5aa0edd831f54c28d596f1cb2d414fc99c6e | [
"MIT"
] | 104 | 2018-02-02T20:42:46.000Z | 2021-08-03T05:36:09.000Z | test/conduit/content_type/erlang_binary_test.exs | log4b/conduit | 5ecf5aa0edd831f54c28d596f1cb2d414fc99c6e | [
"MIT"
] | 21 | 2018-08-03T02:38:21.000Z | 2022-03-16T18:26:58.000Z | defmodule Conduit.ContentType.ErlangBinaryTest do
use ExUnit.Case
doctest Conduit.ContentType.ErlangBinary
end
| 23 | 49 | 0.852174 |
e87d5f47dfda71ecb79d71a55c1a2f1e2254df51 | 8,782 | ex | Elixir | lib/elixir/lib/protocol.ex | ekosz/elixir | 62e375bc711b4072e1b68de776e96cc31f571d45 | [
"Apache-2.0"
] | 1 | 2017-10-29T16:37:08.000Z | 2017-10-29T16:37:08.000Z | lib/elixir/lib/protocol.ex | ekosz/elixir | 62e375bc711b4072e1b68de776e96cc31f571d45 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/protocol.ex | ekosz/elixir | 62e375bc711b4072e1b68de776e96cc31f571d45 | [
"Apache-2.0"
] | null | null | null | defmodule Protocol do
@moduledoc false
# We need to use Erlang.lists because Enum is not available yet
require Erlang.lists, as: L
@doc """
Handle `defprotocol`. It will define a function for each
protocol plus two extra functions:
* `__protocol__/1` - returns the protocol name when :name is given,
... | 28.512987 | 91 | 0.599749 |
e87da0288566e3840ede231dfc95535eb0208421 | 1,321 | ex | Elixir | lib/phoenix_cms/content.ex | SerenityIK/phoenix_cms | 2e6f5068c5d3bf0a1372f6da4f910522f7faa6a4 | [
"Apache-2.0"
] | null | null | null | lib/phoenix_cms/content.ex | SerenityIK/phoenix_cms | 2e6f5068c5d3bf0a1372f6da4f910522f7faa6a4 | [
"Apache-2.0"
] | 17 | 2021-03-22T06:11:32.000Z | 2022-03-28T20:03:58.000Z | lib/phoenix_cms/content.ex | SerenityIK/phoenix_cms | 2e6f5068c5d3bf0a1372f6da4f910522f7faa6a4 | [
"Apache-2.0"
] | null | null | null | defmodule PhoenixCms.Content do
import Ecto.Query, warn: false
alias PhoenixCms.Repo
alias PhoenixCms.Content.Post
def list_posts() do
Repo.all(from p in Post, preload: :user)
end
def list_posts(id) do
Repo.all(from p in Post, where: p.user_id == ^id, preload: :user)
end
def get_published_p... | 20.968254 | 72 | 0.642695 |
e87dc7d4ad19f198f48f75ea331fceda2709c195 | 50 | ex | Elixir | lib/honeydew/dispatcher.ex | jacobwarren/honeydew | d601143017b8d530df63bf357ed8f2d66649e3d4 | [
"MIT"
] | null | null | null | lib/honeydew/dispatcher.ex | jacobwarren/honeydew | d601143017b8d530df63bf357ed8f2d66649e3d4 | [
"MIT"
] | null | null | null | lib/honeydew/dispatcher.ex | jacobwarren/honeydew | d601143017b8d530df63bf357ed8f2d66649e3d4 | [
"MIT"
] | null | null | null | defmodule Honeydew.Dispatcher do
#typespecs
end
| 12.5 | 32 | 0.82 |
e87e0edc84c564b3f9ab9dbcc85962fffb91f7f3 | 558 | exs | Elixir | mix.exs | joaoeliandro/api-heavy-processing | 4073b18e2e3e85f336e9d85d45f9cd8349805d51 | [
"MIT"
] | null | null | null | mix.exs | joaoeliandro/api-heavy-processing | 4073b18e2e3e85f336e9d85d45f9cd8349805d51 | [
"MIT"
] | null | null | null | mix.exs | joaoeliandro/api-heavy-processing | 4073b18e2e3e85f336e9d85d45f9cd8349805d51 | [
"MIT"
] | null | null | null | defmodule ApiHeavyProcessing.MixProject do
use Mix.Project
def project do
[
app: :api_heavy_processing,
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... | 19.241379 | 62 | 0.575269 |
e87e2ac6fa48255ddc9ab05d0b33c5099a6e8e1a | 328 | exs | Elixir | part1/.workshop/exercises/determine_winner/files/hand.exs | Tuxified/weert-workshop | abe48af48631acac89a374277b98b981702deed7 | [
"Apache-2.0"
] | null | null | null | part1/.workshop/exercises/determine_winner/files/hand.exs | Tuxified/weert-workshop | abe48af48631acac89a374277b98b981702deed7 | [
"Apache-2.0"
] | null | null | null | part1/.workshop/exercises/determine_winner/files/hand.exs | Tuxified/weert-workshop | abe48af48631acac89a374277b98b981702deed7 | [
"Apache-2.0"
] | null | null | null | defmodule Hand do
def colours, do: [:hearts, :clubs, :diamonds, :spades]
def numbers, do: Enum.to_list(2..10) ++ [:jack, :queen, :king, :ace]
@spec determine_score(list) :: integer
def determine_score(hand) do
180 # wrong sport?
end
defp card_value(number), do: Enum.find_index(numbers, &(&1 == numbe... | 23.428571 | 72 | 0.661585 |
e87e2dd8d5718757ee15a08c4cd1733231d30a19 | 523 | ex | Elixir | lib/battle_box_web/controllers/user_redirect_controller.ex | GrantJamesPowell/battle_box | 301091955b68cd4672f6513d645eca4e3c4e17d0 | [
"Apache-2.0"
] | 2 | 2020-10-17T05:48:49.000Z | 2020-11-11T02:34:15.000Z | lib/battle_box_web/controllers/user_redirect_controller.ex | FlyingDutchmanGames/battle_box | 301091955b68cd4672f6513d645eca4e3c4e17d0 | [
"Apache-2.0"
] | 3 | 2020-05-18T05:52:21.000Z | 2020-06-09T07:24:14.000Z | lib/battle_box_web/controllers/user_redirect_controller.ex | FlyingDutchmanGames/battle_box | 301091955b68cd4672f6513d645eca4e3c4e17d0 | [
"Apache-2.0"
] | null | null | null | defmodule BattleBoxWeb.UserRedirectController do
use BattleBoxWeb, :controller
def arenas(%{assigns: %{current_user: user}} = conn, _params) do
redirect(conn, to: Routes.user_arena_path(conn, :index, user.username))
end
def bots(%{assigns: %{current_user: user}} = conn, _params) do
redirect(conn, to: ... | 32.6875 | 75 | 0.713193 |
e87e3d2c77dcbb168e9a341413efb551458ba749 | 1,018 | exs | Elixir | apps/graphql/test/mutations/rollouts_test.exs | michaeljguarino/forge | 50ee583ecb4aad5dee4ef08fce29a8eaed1a0824 | [
"Apache-2.0"
] | null | null | null | apps/graphql/test/mutations/rollouts_test.exs | michaeljguarino/forge | 50ee583ecb4aad5dee4ef08fce29a8eaed1a0824 | [
"Apache-2.0"
] | 2 | 2019-12-13T23:55:50.000Z | 2019-12-17T05:49:58.000Z | apps/graphql/test/mutations/rollouts_test.exs | michaeljguarino/chartmart | a34c949cc29d6a1ab91c04c5e4f797e6f0daabfc | [
"Apache-2.0"
] | null | null | null | defmodule GraphQl.RolloutMutationsTest do
use Core.SchemaCase, async: true
import GraphQl.TestHelpers
describe "unlockRepository" do
test "it will unlock the module installations for a repository" do
user = insert(:user)
repo = insert(:repository)
inst = insert(:installation, repository: re... | 33.933333 | 125 | 0.664047 |
e87e419841da0a759fe502588536eed5e2c28abe | 86 | ex | Elixir | code examples/appd-2.ex | kujua/erlang-elixir-imperative-bookcompanion | 7bc9f033bacd0f8744ec6bcee3932794d594fe69 | [
"Apache-2.0"
] | 8 | 2016-08-14T12:35:16.000Z | 2021-01-26T04:05:31.000Z | code examples/appd-2.ex | kujua/erlang-elixir-imperative-bookcompanion | 7bc9f033bacd0f8744ec6bcee3932794d594fe69 | [
"Apache-2.0"
] | null | null | null | code examples/appd-2.ex | kujua/erlang-elixir-imperative-bookcompanion | 7bc9f033bacd0f8744ec6bcee3932794d594fe69 | [
"Apache-2.0"
] | 5 | 2016-08-18T22:12:19.000Z | 2020-02-17T18:52:41.000Z | :v
:"atom with space"
is_atom(:"atom with space") # -> true
is_atom(false) # -> true
| 17.2 | 38 | 0.627907 |
e87e55a405545d0a884655b32bfdd9f21aee7046 | 334 | exs | Elixir | test/tube_stream_web/controllers/sitemap_controller_test.exs | surik/tube_streamer | c353e8512ec6b7521c18e8bdad927d8abad0d346 | [
"MIT"
] | 1 | 2018-02-06T17:28:51.000Z | 2018-02-06T17:28:51.000Z | test/tube_stream_web/controllers/sitemap_controller_test.exs | surik/tube_streamer | c353e8512ec6b7521c18e8bdad927d8abad0d346 | [
"MIT"
] | null | null | null | test/tube_stream_web/controllers/sitemap_controller_test.exs | surik/tube_streamer | c353e8512ec6b7521c18e8bdad927d8abad0d346 | [
"MIT"
] | null | null | null | defmodule TubeStreamerWeb.SiteControllerTest do
use TubeStreamerWeb.ConnCase, async: true
describe "index/2" do
test "responds with 200" do
response = build_conn()
|> get(sitemap_path(build_conn(), :index))
assert 200 == response.status
assert response.resp_body =~ "xml"
... | 25.692308 | 59 | 0.664671 |
e87e595d7b313d367c92dae8daf74c0bcada6ce7 | 2,947 | exs | Elixir | .credo.exs | vintikzzz/cassandra_ecto | 95375fbc20bd7aedc81d38fe791086cab0d86e84 | [
"Apache-2.0"
] | 35 | 2016-12-12T01:21:10.000Z | 2022-03-17T13:31:11.000Z | .credo.exs | vintikzzz/cassandra_ecto | 95375fbc20bd7aedc81d38fe791086cab0d86e84 | [
"Apache-2.0"
] | 14 | 2016-12-24T19:38:55.000Z | 2018-03-15T17:57:44.000Z | .credo.exs | vintikzzz/cassandra_ecto | 95375fbc20bd7aedc81d38fe791086cab0d86e84 | [
"Apache-2.0"
] | 12 | 2017-02-21T02:35:08.000Z | 2018-09-01T09:32:31.000Z | %{configs: [
%{name: "default",
files: %{
included: ["lib/", "spec/"],
excluded: [~r"/_build/", ~r"/deps/"]
},
requires: [],
check_for_updates: false,
# You can customize the parameters of any check by adding a second element
# to the tuple.
#
# To disable a check put `fal... | 40.930556 | 106 | 0.699695 |
e87e6eafa285c8a74360fc390acf8c84faf0e3c0 | 358 | exs | Elixir | priv/repo/seeds.exs | cedretaber/bibliotheca | 642ec9908d6d98f16e25b6a482c52e9cbaa21ad2 | [
"MIT"
] | null | null | null | priv/repo/seeds.exs | cedretaber/bibliotheca | 642ec9908d6d98f16e25b6a482c52e9cbaa21ad2 | [
"MIT"
] | 22 | 2017-05-15T07:34:08.000Z | 2018-02-25T07:26:18.000Z | priv/repo/seeds.exs | cedretaber/bibliotheca | 642ec9908d6d98f16e25b6a482c52e9cbaa21ad2 | [
"MIT"
] | null | null | null | # Script for populating the database. You can run it as:
#
# mix run priv/repo/seeds.exs
#
# Inside the script, you can read and write to any of your
# repositories directly:
#
# Bibliotheca.Repo.insert!(%Bibliotheca.SomeModel{})
#
# We recommend using the bang functions (`insert!`, `update!`
# and so on) as th... | 29.833333 | 61 | 0.712291 |
e87e82344980709eb71f762f28fb6c70352d3b7a | 21,625 | ex | Elixir | lib/scenic/primitive.ex | sbe-arg/scenic | 96e066c05b88fc15974a2e95a8a5613ef8dfee22 | [
"Apache-2.0"
] | null | null | null | lib/scenic/primitive.ex | sbe-arg/scenic | 96e066c05b88fc15974a2e95a8a5613ef8dfee22 | [
"Apache-2.0"
] | null | null | null | lib/scenic/primitive.ex | sbe-arg/scenic | 96e066c05b88fc15974a2e95a8a5613ef8dfee22 | [
"Apache-2.0"
] | null | null | null | #
# Created by Boyd Multerer on 2017-05-06.
# Copyright © 2017 Kry10 Industries. All rights reserved.
#
defmodule Scenic.Primitive do
@moduledoc """
Please see [`Primitives Overview`](overview_primitives.html) for a high-level description.
## What is a primitive
A primitive is the simplest thing Scenic kno... | 30.937053 | 241 | 0.619838 |
e87e8a723d5dc99207be2d1374f04a3e8d5c6190 | 74 | exs | Elixir | test/pmj_web/views/layout_view_test.exs | Mehonoshin/pmj | d16e6af7f136cb69c9008e55886ef4619974fc1e | [
"MIT"
] | 1 | 2020-01-12T20:08:37.000Z | 2020-01-12T20:08:37.000Z | test/pmj_web/views/layout_view_test.exs | Mehonoshin/pmj | d16e6af7f136cb69c9008e55886ef4619974fc1e | [
"MIT"
] | null | null | null | test/pmj_web/views/layout_view_test.exs | Mehonoshin/pmj | d16e6af7f136cb69c9008e55886ef4619974fc1e | [
"MIT"
] | null | null | null | defmodule PmjWeb.LayoutViewTest do
use PmjWeb.ConnCase, async: true
end
| 18.5 | 34 | 0.810811 |
e87e8d3de4deebfd023d54b17bfb768f059ea257 | 506 | ex | Elixir | lib/gen/uuid.ex | MathyouMB/scored | 403b109975c6819d21961e13a38d1d73aa3ee25d | [
"MIT"
] | 4 | 2021-03-29T10:36:12.000Z | 2021-04-23T19:41:09.000Z | lib/gen/uuid.ex | MathyouMB/scored | 403b109975c6819d21961e13a38d1d73aa3ee25d | [
"MIT"
] | 3 | 2021-04-22T04:32:22.000Z | 2021-04-24T00:26:19.000Z | lib/gen/uuid.ex | MathyouMB/scored | 403b109975c6819d21961e13a38d1d73aa3ee25d | [
"MIT"
] | null | null | null | defmodule Scored.Gen.Uuid do
use GenServer
def start_link(_) do
GenServer.start_link(__MODULE__, :ok, name: __MODULE__)
end
def init(:ok) do
{:ok, %{next_id: 0}}
end
# Client Methods
def next_id() do
GenServer.whereis(__MODULE__)
|> GenServer.call(:next_id)
end
# Server Method
de... | 20.24 | 59 | 0.658103 |
e87e92a888e33c405cb544ca1937b9e06b0ce9fd | 358 | exs | Elixir | priv/repo/migrations/20160307063023_create_user.exs | kenta-aktsk/media_sample | a0368236bd81c18ac136a54aa7383332a5e3cf36 | [
"MIT"
] | 99 | 2016-04-19T11:11:57.000Z | 2021-12-12T14:38:02.000Z | priv/repo/migrations/20160307063023_create_user.exs | ogamw/media_sample | a0368236bd81c18ac136a54aa7383332a5e3cf36 | [
"MIT"
] | 48 | 2016-04-06T02:28:46.000Z | 2016-05-31T06:56:56.000Z | priv/repo/migrations/20160307063023_create_user.exs | ogamw/media_sample | a0368236bd81c18ac136a54aa7383332a5e3cf36 | [
"MIT"
] | 32 | 2016-04-19T11:12:00.000Z | 2021-03-25T18:19:52.000Z | defmodule MediaSample.Repo.Migrations.CreateUser do
use Ecto.Migration
def change do
create table(:users, options: "ROW_FORMAT=DYNAMIC") do
add :email, :string
add :name, :string
add :encrypted_password, :string
add :profile, :string
add :image, :string
add :status, :integer... | 19.888889 | 58 | 0.653631 |
e87ea161b087c29424098d31b56c8c75f26a5f8c | 62 | ex | Elixir | quickly/web/views/session_view.ex | hectorip/quickly | 99a4b2720b34591c5ba19bdcf8b517ce11b4c0ad | [
"MIT"
] | null | null | null | quickly/web/views/session_view.ex | hectorip/quickly | 99a4b2720b34591c5ba19bdcf8b517ce11b4c0ad | [
"MIT"
] | null | null | null | quickly/web/views/session_view.ex | hectorip/quickly | 99a4b2720b34591c5ba19bdcf8b517ce11b4c0ad | [
"MIT"
] | null | null | null | defmodule Quickly.SessionView do
use Quickly.Web, :view
end
| 15.5 | 32 | 0.790323 |
e87eaad2ef4479f225e984b587e1278aa0b90808 | 824 | ex | Elixir | lib/sobelow/sql.ex | juancgalvis/sobelow | 9ae3874c26ab7cfa6c8a8517ccd02af98e187585 | [
"Apache-2.0"
] | 1,305 | 2017-05-12T21:09:40.000Z | 2022-03-31T04:31:49.000Z | lib/sobelow/sql.ex | juancgalvis/sobelow | 9ae3874c26ab7cfa6c8a8517ccd02af98e187585 | [
"Apache-2.0"
] | 95 | 2017-05-15T09:45:41.000Z | 2022-03-23T03:35:48.000Z | lib/sobelow/sql.ex | juancgalvis/sobelow | 9ae3874c26ab7cfa6c8a8517ccd02af98e187585 | [
"Apache-2.0"
] | 86 | 2017-05-15T20:18:59.000Z | 2022-02-11T22:10:34.000Z | defmodule Sobelow.SQL do
@moduledoc """
# SQL Injection
SQL injection occurs when untrusted input is interpolated
directly into a SQL query. In a typical Phoenix application,
this would mean using the `Ecto.Adapters.SQL.query` method
and not using the parameterization feature.
Read more about SQL inject... | 25.75 | 65 | 0.708738 |
e87ebd91a74e30bbee1164342fb0bb1f94f9c0b6 | 1,500 | exs | Elixir | tutorials/phoenix/jwt_api/config/dev.exs | idfumg/ElixirSynopsis | 74c668d84300812dd41eb18772aecfb89bc7628b | [
"MIT"
] | null | null | null | tutorials/phoenix/jwt_api/config/dev.exs | idfumg/ElixirSynopsis | 74c668d84300812dd41eb18772aecfb89bc7628b | [
"MIT"
] | null | null | null | tutorials/phoenix/jwt_api/config/dev.exs | idfumg/ElixirSynopsis | 74c668d84300812dd41eb18772aecfb89bc7628b | [
"MIT"
] | null | null | null | use Mix.Config
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with brunch.io to recompile .js and .css sources.
config :jwt_api, JwtApiWeb.Endpoint,
http: [port: 400... | 31.914894 | 170 | 0.734 |
e87ede40a7468a6f29c0ddd2087dce13e4932773 | 2,468 | ex | Elixir | clients/alert_center/lib/google_api/alert_center/v1beta1/model/bad_whitelist.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/alert_center/lib/google_api/alert_center/v1beta1/model/bad_whitelist.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/alert_center/lib/google_api/alert_center/v1beta1/model/bad_whitelist.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... | 44.071429 | 168 | 0.739465 |
e87f059e11bb53247285bdbc4e5f83870736f818 | 431 | ex | Elixir | lib/database/database.ex | groksrc/Plsm | 6902213282597775c188ea0e2f094a6bf69eae19 | [
"MIT"
] | null | null | null | lib/database/database.ex | groksrc/Plsm | 6902213282597775c188ea0e2f094a6bf69eae19 | [
"MIT"
] | null | null | null | lib/database/database.ex | groksrc/Plsm | 6902213282597775c188ea0e2f094a6bf69eae19 | [
"MIT"
] | null | null | null | defprotocol Plsm.Database do
@doc """
Create a database struct that implements the Plsm.Database protocol.
"""
def create(db, configs)
@doc """
Connect to the given database
"""
def connect(db)
@doc """
Get all of the tables that are in the database that was selected
"""
def get_tab... | 18.73913 | 72 | 0.647332 |
e87f090d9d530bac8d38ed9b4a16c129cab10e47 | 3,460 | ex | Elixir | clients/contact_center_insights/lib/google_api/contact_center_insights/v1/model/google_cloud_contactcenterinsights_v1_issue_model.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/contact_center_insights/lib/google_api/contact_center_insights/v1/model/google_cloud_contactcenterinsights_v1_issue_model.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/contact_center_insights/lib/google_api/contact_center_insights/v1/model/google_cloud_contactcenterinsights_v1_issue_model.ex | dazuma/elixir-google-api | 6a9897168008efe07a6081d2326735fe332e522c | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 41.190476 | 232 | 0.725434 |
e87f0bb4ded01a6f481993d7356a6d409135b107 | 434 | exs | Elixir | config/prod.exs | KazuCocoa/http_proxy | f8050af0ecb6629e2c4e6c3e7507de3af5a108e5 | [
"MIT"
] | 62 | 2015-11-08T05:16:22.000Z | 2021-12-24T21:23:30.000Z | config/prod.exs | KazuCocoa/http_proxy | f8050af0ecb6629e2c4e6c3e7507de3af5a108e5 | [
"MIT"
] | 30 | 2015-12-18T03:38:07.000Z | 2021-06-25T15:16:18.000Z | config/prod.exs | KazuCocoa/http_proxy | f8050af0ecb6629e2c4e6c3e7507de3af5a108e5 | [
"MIT"
] | 9 | 2016-01-17T06:57:21.000Z | 2022-02-17T08:42:39.000Z | use Mix.Config
config :http_proxy,
proxies: [
%{port: 4000,
to: "http://google.com"},
%{port: 4001,
to: "http://yahoo.com"}
],
timeout: 20_000, # ms
record: true,
play: false,
export_path: "test/example",
play_path: "test/data"
config... | 21.7 | 53 | 0.534562 |
e87f0cf88e65470a14ef95a974f99a48961380d5 | 1,232 | exs | Elixir | spec/assertions/be_close_to_spec.exs | bblaszkow06/espec | 4d9819ca5c68c6eb70276c7d9c9630ded01ba778 | [
"Apache-2.0"
] | null | null | null | spec/assertions/be_close_to_spec.exs | bblaszkow06/espec | 4d9819ca5c68c6eb70276c7d9c9630ded01ba778 | [
"Apache-2.0"
] | null | null | null | spec/assertions/be_close_to_spec.exs | bblaszkow06/espec | 4d9819ca5c68c6eb70276c7d9c9630ded01ba778 | [
"Apache-2.0"
] | null | null | null | defmodule ESpec.Assertions.BeCloseToSpec do
use ESpec, async: true
describe "ESpec.Assertions.BeCloseTo" do
context "Success" do
it "checks success with `to`" do
message = expect(5).to(be_close_to(4, 1))
expect(message) |> to(eq "`5` is close to `4` with delta `1`.")
end
it "... | 28.651163 | 86 | 0.573864 |
e87f7d9343debc3195d739d307a8a1a4128cebb2 | 150 | exs | Elixir | umbrella1/apps/umbrella1_app2/test/umbrella1_app2_test.exs | hirotnk/excoveralls_post_sample | 3a1bffa632964ff99d2fe31d4adf793f5154fbb2 | [
"MIT"
] | null | null | null | umbrella1/apps/umbrella1_app2/test/umbrella1_app2_test.exs | hirotnk/excoveralls_post_sample | 3a1bffa632964ff99d2fe31d4adf793f5154fbb2 | [
"MIT"
] | null | null | null | umbrella1/apps/umbrella1_app2/test/umbrella1_app2_test.exs | hirotnk/excoveralls_post_sample | 3a1bffa632964ff99d2fe31d4adf793f5154fbb2 | [
"MIT"
] | null | null | null | defmodule Umbrella1App2Test do
use ExUnit.Case
doctest Umbrella1App2
test "multiply" do
assert Umbrella1App2.multiply(2, 3) == 6
end
end
| 16.666667 | 44 | 0.74 |
e87fb5d58ac2b8674d015fb754f1a4557e8f4300 | 1,150 | ex | Elixir | bidding_poc/lib/bidding_poc_web/router.ex | KeenMate/phoenix-websocket-auction | 412148ad5621b511c0690b9395f4b6c9ce3a3352 | [
"MIT"
] | null | null | null | bidding_poc/lib/bidding_poc_web/router.ex | KeenMate/phoenix-websocket-auction | 412148ad5621b511c0690b9395f4b6c9ce3a3352 | [
"MIT"
] | null | null | null | bidding_poc/lib/bidding_poc_web/router.ex | KeenMate/phoenix-websocket-auction | 412148ad5621b511c0690b9395f4b6c9ce3a3352 | [
"MIT"
] | null | null | null | defmodule BiddingPocWeb.Router do
use BiddingPocWeb, :router
alias BiddingPocWeb.Plugs
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
end
pipeline :auth do
plug Plugs.VerifyAuthToken
en... | 21.296296 | 98 | 0.666087 |
e87fcc6da86e69760695ad2f094328b2293d1209 | 33 | ex | Elixir | statifier-ex/lib/statifier/state.ex | riddler/statifier | 4f4e2d1cdbb0e570a06ddf087caf2f986d1024b5 | [
"MIT"
] | 9 | 2020-08-06T23:45:07.000Z | 2020-12-21T01:47:06.000Z | statifier-ex/lib/statifier/state.ex | riddler/statifier | 4f4e2d1cdbb0e570a06ddf087caf2f986d1024b5 | [
"MIT"
] | 19 | 2020-03-12T03:57:46.000Z | 2020-09-11T03:40:48.000Z | statifier-ex/lib/statifier/state.ex | riddler/statifier | 4f4e2d1cdbb0e570a06ddf087caf2f986d1024b5 | [
"MIT"
] | null | null | null | defmodule Statifier.State do
end
| 11 | 28 | 0.848485 |
e87fcc95af5724493260d90702eda1b200d904ff | 10,077 | ex | Elixir | clients/runtime_config/lib/google_api/runtime_config/v1/api/operations.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/runtime_config/lib/google_api/runtime_config/v1/api/operations.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/runtime_config/lib/google_api/runtime_config/v1/api/operations.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"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... | 47.985714 | 669 | 0.686117 |
e87fd452f024900e7d791afdd680c13d51ad1936 | 1,418 | ex | Elixir | examples/phoenix_example/test/support/data_case.ex | kianmeng/ex_health | f7311d5e23e8cfbb6dd91381a52a420345331535 | [
"MIT"
] | 9 | 2019-03-16T21:24:57.000Z | 2021-12-29T21:31:16.000Z | examples/phoenix_example/test/support/data_case.ex | kianmeng/ex_health | f7311d5e23e8cfbb6dd91381a52a420345331535 | [
"MIT"
] | 13 | 2018-12-11T16:43:26.000Z | 2022-02-09T23:08:01.000Z | examples/phoenix_example/test/support/data_case.ex | kianmeng/ex_health | f7311d5e23e8cfbb6dd91381a52a420345331535 | [
"MIT"
] | 4 | 2019-09-18T00:54:04.000Z | 2021-05-09T05:30:47.000Z | defmodule PhoenixExample.DataCase do
@moduledoc """
This module defines the setup for tests requiring
access to the application's data layer.
You may define functions here to be used as helpers in
your tests.
Finally, if the test case interacts with the database,
it cannot be async. For this reason, eve... | 26.259259 | 77 | 0.687588 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.