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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a8bddbbe3bc214fb3f9ad6fce2502a9c2ec1c6b | 949 | exs | Elixir | test/nlw_05_elixir/restaurant_test.exs | wfercosta/nlw_05_elexir | a833f62c6a9985fe43a22f8450250b8ceea3dd34 | [
"MIT"
] | null | null | null | test/nlw_05_elixir/restaurant_test.exs | wfercosta/nlw_05_elexir | a833f62c6a9985fe43a22f8450250b8ceea3dd34 | [
"MIT"
] | null | null | null | test/nlw_05_elixir/restaurant_test.exs | wfercosta/nlw_05_elexir | a833f62c6a9985fe43a22f8450250b8ceea3dd34 | [
"MIT"
] | null | null | null | defmodule Nlw05Elixir.RestaurantTest do
use Nlw05Elixir.DataCase
alias Ecto.Changeset
alias Nlw05Elixir.Restaurant
describe "changeset/1" do
test "when all params are valid, returns a valid changeset" do
# Arranges
params = %{email: "siri@cascudo.com", name: "Siri cascudo"}
# Act
... | 24.973684 | 100 | 0.624868 |
4a8be006cec5d7c19a53b25636fe6173fb356962 | 1,090 | ex | Elixir | lib/servy/wildthings.ex | lcr0815/pcw | 17b3b86059fa5e7fac41e28b2b54e4011491c3f9 | [
"MIT"
] | null | null | null | lib/servy/wildthings.ex | lcr0815/pcw | 17b3b86059fa5e7fac41e28b2b54e4011491c3f9 | [
"MIT"
] | null | null | null | lib/servy/wildthings.ex | lcr0815/pcw | 17b3b86059fa5e7fac41e28b2b54e4011491c3f9 | [
"MIT"
] | null | null | null | defmodule Servy.Wildthings do
alias Servy.Bear
def list_bears do
[
%Bear{id: 1, name: "Teddy", type: "Brown", hibernating: false},
%Bear{id: 2, name: "Smokey", type: "Black", hibernating: false},
%Bear{id: 3, name: "Paddington", type: "Brown", hibernating: false},
%Bear{i... | 38.928571 | 76 | 0.583486 |
4a8bf28364c97bc2fab5967bd2ad058518ae7b81 | 2,642 | exs | Elixir | elixir/test/homework/users_test.exs | kellyfelkins/web-homework | b204866bd0a6908efa05ef8f5772b9fa926dbf02 | [
"MIT"
] | null | null | null | elixir/test/homework/users_test.exs | kellyfelkins/web-homework | b204866bd0a6908efa05ef8f5772b9fa926dbf02 | [
"MIT"
] | null | null | null | elixir/test/homework/users_test.exs | kellyfelkins/web-homework | b204866bd0a6908efa05ef8f5772b9fa926dbf02 | [
"MIT"
] | null | null | null | defmodule Homework.UsersTest do
use Homework.DataCase
alias Homework.Users
describe "users" do
alias Homework.Users.User
@valid_attrs %{dob: "some dob", first_name: "some first_name", last_name: "some last_name"}
@update_attrs %{
dob: "some updated dob",
first_name: "some updated first_... | 31.082353 | 95 | 0.653293 |
4a8c0226107b57e6adedb9131bded09e5ed81279 | 612 | ex | Elixir | apps/authorizer/lib/authorizer.ex | lcpojr/watcher_ex | bd5a9210b5b41a6c9b5d4255de19fc6967d29fb7 | [
"Apache-2.0"
] | 9 | 2020-10-13T14:11:37.000Z | 2021-08-12T18:40:08.000Z | apps/authorizer/lib/authorizer.ex | lcpojr/watcher_ex | bd5a9210b5b41a6c9b5d4255de19fc6967d29fb7 | [
"Apache-2.0"
] | 28 | 2020-10-04T14:43:48.000Z | 2021-12-07T16:54:22.000Z | apps/authorizer/lib/authorizer.ex | lcpojr/watcher_ex | bd5a9210b5b41a6c9b5d4255de19fc6967d29fb7 | [
"Apache-2.0"
] | 3 | 2020-11-25T20:59:47.000Z | 2021-08-30T10:36:58.000Z | defmodule Authorizer do
@moduledoc """
Application to deal with request's to authorization server.
"""
alias Authorizer.Rules.Commands.{AdminAccess, AuthorizationCodeSignIn, PublicAccess}
@doc "Delegates to #{AdminAccess}.execute/1"
defdelegate authorize_admin(conn), to: AdminAccess, as: :execute
@doc ... | 32.210526 | 86 | 0.764706 |
4a8c1188e58ec650d92a87146b4be323068dc2f6 | 626 | ex | Elixir | lib/options_tracker/campaign.ex | mgwidmann/options_tracker | 5520f88a9a5873842a63a23d4bcc5da82a51feba | [
"MIT"
] | 12 | 2020-06-25T17:25:15.000Z | 2021-09-30T20:13:33.000Z | lib/options_tracker/campaign.ex | mgwidmann/options_tracker | 5520f88a9a5873842a63a23d4bcc5da82a51feba | [
"MIT"
] | 5 | 2020-08-05T03:12:31.000Z | 2021-07-15T04:59:03.000Z | lib/options_tracker/campaign.ex | mgwidmann/options_tracker | 5520f88a9a5873842a63a23d4bcc5da82a51feba | [
"MIT"
] | 2 | 2021-07-03T17:20:15.000Z | 2021-09-01T15:38:58.000Z | defmodule OptionsTracker.Campaign do
@moduledoc """
The Campaign context.
"""
import Ecto.Query, warn: false
alias OptionsTracker.Repo
alias OptionsTracker.Users.{User}
alias OptionsTracker.Campaign.Sentiment
@spec campaigns(User.t) :: [Sentiment.t]
def campaigns(user) do
from(s in Sentiment, wh... | 27.217391 | 89 | 0.693291 |
4a8c148608fe199d372800d2452716937a39a0ff | 296 | ex | Elixir | rojak-api/lib/rojak_api/data/schemas/news_sentiment.ex | pyk/rojak | 0dd69efedb58ee5d951e1a43cdfa65b60f8bb7c7 | [
"BSD-3-Clause"
] | 107 | 2016-10-02T05:54:42.000Z | 2021-08-05T00:20:51.000Z | rojak-api/lib/rojak_api/data/schemas/news_sentiment.ex | pyk/rojak | 0dd69efedb58ee5d951e1a43cdfa65b60f8bb7c7 | [
"BSD-3-Clause"
] | 134 | 2016-10-02T21:21:08.000Z | 2016-12-27T02:46:34.000Z | rojak-api/lib/rojak_api/data/schemas/news_sentiment.ex | pyk/rojak | 0dd69efedb58ee5d951e1a43cdfa65b60f8bb7c7 | [
"BSD-3-Clause"
] | 54 | 2016-10-02T08:47:56.000Z | 2020-03-08T00:56:03.000Z | defmodule RojakAPI.Data.Schemas.NewsSentiment do
use Ecto.Schema
schema "news_sentiment" do
field :confident_score_scaled, :float
# Relationship
belongs_to :news, RojakAPI.Data.Schemas.News
belongs_to :sentiment, RojakAPI.Data.Schemas.Sentiment
timestamps()
end
end
| 19.733333 | 58 | 0.75 |
4a8c21752879171997a8fef03b78edbf73adfca7 | 1,239 | exs | Elixir | phoenix_app/benchmarker/mix.exs | ansrivas/phoenix-and-gin | c3ee9f2bc5db3bb41179bc7b8747455ae148b55b | [
"MIT"
] | null | null | null | phoenix_app/benchmarker/mix.exs | ansrivas/phoenix-and-gin | c3ee9f2bc5db3bb41179bc7b8747455ae148b55b | [
"MIT"
] | null | null | null | phoenix_app/benchmarker/mix.exs | ansrivas/phoenix-and-gin | c3ee9f2bc5db3bb41179bc7b8747455ae148b55b | [
"MIT"
] | null | null | null | defmodule Benchmarker.Mixfile do
use Mix.Project
def project do
[
app: :benchmarker,
version: "0.0.1",
elixir: "~> 1.4",
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix, :gettext] ++ Mix.compilers,
start_permanent: Mix.env == :prod,
deps: deps()
]
end... | 25.8125 | 64 | 0.5682 |
4a8c2b241b13cf6ec331c4b8c015fe28e302000f | 1,876 | exs | Elixir | clients/cloud_billing/mix.exs | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/cloud_billing/mix.exs | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/cloud_billing/mix.exs | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 28 | 132 | 0.661514 |
4a8c2fabeff294feac4b8098ad80f0166aea6a0f | 380 | ex | Elixir | test/models/team.ex | metagraph-wiki/dlex | dcd06f8e9f701abf0d27e64c9bf12e35ece4fb20 | [
"Apache-2.0"
] | 2 | 2021-01-22T19:14:15.000Z | 2021-02-11T20:09:04.000Z | test/models/team.ex | metagraph-wiki/dlex | dcd06f8e9f701abf0d27e64c9bf12e35ece4fb20 | [
"Apache-2.0"
] | 8 | 2020-04-03T08:28:40.000Z | 2020-10-08T04:56:06.000Z | test/models/team.ex | jnylen/dlex | dcd06f8e9f701abf0d27e64c9bf12e35ece4fb20 | [
"Apache-2.0"
] | null | null | null | defmodule DlexTest.Team do
use Dlex.Node
use Dlex.Changeset
schema "team" do
field :name, :string, index: ["term"]
field :text, :string, lang: true
relation(:members, :many, models: [DlexTest.User], reverse: true)
end
def changeset(team, params \\ %{}) do
team
|> cast(params, [:name, :me... | 22.352941 | 69 | 0.639474 |
4a8c3b744de12a2324df6bc536495943548675d4 | 2,206 | ex | Elixir | lib/neko/user_rate/store/registry.ex | xmaid/neko-achievements | 4998e462efcc977e4ee1b3e2471023f427e400f6 | [
"MIT"
] | 21 | 2017-05-11T19:19:22.000Z | 2021-06-15T23:43:18.000Z | lib/neko/user_rate/store/registry.ex | xmaid/neko-achievements | 4998e462efcc977e4ee1b3e2471023f427e400f6 | [
"MIT"
] | 41 | 2017-11-20T18:43:31.000Z | 2021-12-09T18:17:25.000Z | lib/neko/user_rate/store/registry.ex | xmaid/neko-achievements | 4998e462efcc977e4ee1b3e2471023f427e400f6 | [
"MIT"
] | 97 | 2017-10-11T15:38:11.000Z | 2022-01-21T09:56:01.000Z | defmodule Neko.UserRate.Store.Registry do
@moduledoc """
Registry of user rate stores:
each user is mapped to his user rate store.
"""
use GenServer
@name __MODULE__
# ------------------------------------------------------------------
# Client API
# -------------------------------------------------... | 25.068182 | 78 | 0.55349 |
4a8c5679b19dd3678e549de10da5927046567ea3 | 5,541 | ex | Elixir | lib/swoosh/adapters/postmark.ex | Deepwalker/swoosh | 5970e1a20e5d787347ce825f4803e972ddc30095 | [
"MIT"
] | 1 | 2020-01-19T04:55:09.000Z | 2020-01-19T04:55:09.000Z | lib/swoosh/adapters/postmark.ex | Deepwalker/swoosh | 5970e1a20e5d787347ce825f4803e972ddc30095 | [
"MIT"
] | null | null | null | lib/swoosh/adapters/postmark.ex | Deepwalker/swoosh | 5970e1a20e5d787347ce825f4803e972ddc30095 | [
"MIT"
] | 1 | 2019-11-05T19:06:55.000Z | 2019-11-05T19:06:55.000Z | defmodule Swoosh.Adapters.Postmark do
@moduledoc ~S"""
An adapter that sends email using the Postmark API.
For reference: [Postmark API docs](http://developer.postmarkapp.com/developer-send-api.html)
## Example
# config/config.exs
config :sample, Sample.Mailer,
adapter: Swoosh.Adapters.Po... | 32.215116 | 97 | 0.659628 |
4a8c6f234e0e5e9a901d59b23eb0ad38d9a9a30a | 6,690 | ex | Elixir | lib/phoenix/transports/long_poll.ex | bhicks/phoenix | 2c43d798c184f6085cd2765d6cb2b463c87edac7 | [
"MIT"
] | null | null | null | lib/phoenix/transports/long_poll.ex | bhicks/phoenix | 2c43d798c184f6085cd2765d6cb2b463c87edac7 | [
"MIT"
] | 1 | 2021-11-17T12:10:06.000Z | 2021-11-24T12:53:45.000Z | lib/phoenix/transports/long_poll.ex | bhicks/phoenix | 2c43d798c184f6085cd2765d6cb2b463c87edac7 | [
"MIT"
] | null | null | null | defmodule Phoenix.Transports.LongPoll do
@moduledoc false
@behaviour Plug
import Plug.Conn
alias Phoenix.Socket.{V1, V2, Transport}
def default_config() do
[
window_ms: 10_000,
path: "/longpoll",
pubsub_timeout_ms: 2_000,
serializer: [{V1.JSONSerializer, "~> 1.0.0"}, {V2.JSONSeri... | 31.706161 | 106 | 0.649925 |
4a8c7cdb7b8bb85b041fe5971f0ffc3330c42a3d | 757 | exs | Elixir | catcasts/test/catcasts_web/controllers/session_controller_test.exs | cashmann/phoenix-tutorial | ea37b9d54a79df9bc1351a948eb8f8400c5e62ff | [
"MIT"
] | null | null | null | catcasts/test/catcasts_web/controllers/session_controller_test.exs | cashmann/phoenix-tutorial | ea37b9d54a79df9bc1351a948eb8f8400c5e62ff | [
"MIT"
] | 3 | 2021-03-09T20:36:45.000Z | 2021-05-10T17:47:02.000Z | catcasts/test/catcasts_web/controllers/session_controller_test.exs | cashmann/phoenix-tutorial | ea37b9d54a79df9bc1351a948eb8f8400c5e62ff | [
"MIT"
] | null | null | null | defmodule CatcastsWeb.SessionControllerTest do
use CatcastsWeb.ConnCase
alias Catcasts.{Repo, User}
@ueberauth_auth %{
credentials: %{token: "fdsnoafhnoofh08h38h"},
info: %{email: "ironman@example.com", first_name: "Tony", last_name: "Stark"},
provider: :google
}
test "redirects user to Google f... | 29.115385 | 82 | 0.685601 |
4a8cc29387d780f323d7151e705e6577bf4b5f62 | 308 | exs | Elixir | config/config.exs | sgilson/mine | aa07682525ff72545dc2df91a68c23c1d5c937ef | [
"MIT"
] | 1 | 2019-11-15T22:59:57.000Z | 2019-11-15T22:59:57.000Z | config/config.exs | sgilson/mine | aa07682525ff72545dc2df91a68c23c1d5c937ef | [
"MIT"
] | null | null | null | config/config.exs | sgilson/mine | aa07682525ff72545dc2df91a68c23c1d5c937ef | [
"MIT"
] | null | null | null | import Mix.Config
unless Mix.env() in [:prod, :bench] do
config :git_hooks,
verbose: true,
hooks: [
pre_commit: [
tasks: [
"mix clean",
"mix compile --warnings-as-errors",
"mix format --check-formatted",
"mix test"
]
]
]
end
| 18.117647 | 45 | 0.496753 |
4a8cd3af4b4881448857c3033905dd3b6a207565 | 902 | ex | Elixir | clients/admin/lib/google_api/admin/datatransfer_v1/metadata.ex | mopp/elixir-google-api | d496227d17600bccbdf8f6be9ad1b7e7219d7ec6 | [
"Apache-2.0"
] | null | null | null | clients/admin/lib/google_api/admin/datatransfer_v1/metadata.ex | mopp/elixir-google-api | d496227d17600bccbdf8f6be9ad1b7e7219d7ec6 | [
"Apache-2.0"
] | null | null | null | clients/admin/lib/google_api/admin/datatransfer_v1/metadata.ex | mopp/elixir-google-api | d496227d17600bccbdf8f6be9ad1b7e7219d7ec6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 33.407407 | 74 | 0.763858 |
4a8cdc6add7b9aac1867d58e8a372a19c9aefa07 | 5,601 | exs | Elixir | .credo.exs | eqmvii/gen_rmq | 074b0cf45fbc0ab2c3ab29b1ff79df51fa64c2bf | [
"MIT"
] | null | null | null | .credo.exs | eqmvii/gen_rmq | 074b0cf45fbc0ab2c3ab29b1ff79df51fa64c2bf | [
"MIT"
] | null | null | null | .credo.exs | eqmvii/gen_rmq | 074b0cf45fbc0ab2c3ab29b1ff79df51fa64c2bf | [
"MIT"
] | null | null | null | # This file contains the configuration for Credo and you are probably reading
# this after creating it with `mix credo.gen.config`.
#
# If you find anything wrong or unclear in this file, please report an
# issue on GitHub: https://github.com/rrrene/credo/issues
#
%{
#
# You can have as many configs as you like in ... | 42.431818 | 82 | 0.659347 |
4a8cdfe1d701e9d810999fce74740e7cf53f3f5c | 9,985 | ex | Elixir | lib/astarte_flow/flows/flow.ex | Annopaolo/astarte_flow | d6846917d2adb87127cb06ab6aeb11d6c0d10de8 | [
"Apache-2.0"
] | 11 | 2020-01-30T17:44:35.000Z | 2022-01-13T19:17:21.000Z | lib/astarte_flow/flows/flow.ex | Annopaolo/astarte_flow | d6846917d2adb87127cb06ab6aeb11d6c0d10de8 | [
"Apache-2.0"
] | 100 | 2020-02-11T10:01:35.000Z | 2022-02-17T10:39:35.000Z | lib/astarte_flow/flows/flow.ex | Annopaolo/astarte_flow | d6846917d2adb87127cb06ab6aeb11d6c0d10de8 | [
"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.775216 | 102 | 0.634251 |
4a8ce204d60931c46e47cfa412ddcc1f0cb24792 | 138,740 | ex | Elixir | lib/elixir/lib/kernel.ex | chulkilee/elixir | 699231dcad52916a76f38856cbd7cf7c7bdadc51 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/kernel.ex | chulkilee/elixir | 699231dcad52916a76f38856cbd7cf7c7bdadc51 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/kernel.ex | chulkilee/elixir | 699231dcad52916a76f38856cbd7cf7c7bdadc51 | [
"Apache-2.0"
] | null | null | null | # Use elixir_bootstrap module to be able to bootstrap Kernel.
# The bootstrap module provides simpler implementations of the
# functions removed, simple enough to bootstrap.
import Kernel,
except: [@: 1, defmodule: 2, def: 1, def: 2, defp: 2, defmacro: 1, defmacro: 2, defmacrop: 2]
import :elixir_bootstrap
defmodul... | 26.814843 | 104 | 0.635347 |
4a8d018c47823d3cecb8189dc90fb01f641d2c90 | 316 | ex | Elixir | apps/tai/lib/tai/events/boot_advisors.ex | ccamateur/tai | 41c4b3e09dafc77987fa3f6b300c15461d981e16 | [
"MIT"
] | 276 | 2018-01-16T06:36:06.000Z | 2021-03-20T21:48:01.000Z | apps/tai/lib/tai/events/boot_advisors.ex | ccamateur/tai | 41c4b3e09dafc77987fa3f6b300c15461d981e16 | [
"MIT"
] | 73 | 2018-10-05T18:45:06.000Z | 2021-02-08T05:46:33.000Z | apps/tai/lib/tai/events/boot_advisors.ex | ccamateur/tai | 41c4b3e09dafc77987fa3f6b300c15461d981e16 | [
"MIT"
] | 43 | 2018-06-09T09:54:51.000Z | 2021-03-07T07:35:17.000Z | defmodule Tai.Events.BootAdvisors do
@type t :: %__MODULE__{
loaded_fleets: non_neg_integer,
loaded_advisors: non_neg_integer,
started_advisors: non_neg_integer
}
@enforce_keys ~w[loaded_fleets loaded_advisors started_advisors]a
defstruct ~w[loaded_fleets loaded_advisors started_advisors]a
end
| 28.727273 | 67 | 0.797468 |
4a8d0d03dd28ddfcfb476f4e94b240548c561370 | 54 | ex | Elixir | web/views/html_cdn_view.ex | rob05c/tox | f54847ca058ad24b909341ad65d595a4069d2471 | [
"Apache-2.0"
] | 2 | 2016-11-16T17:24:21.000Z | 2019-02-15T05:38:27.000Z | web/views/html_cdn_view.ex | rob05c/tox | f54847ca058ad24b909341ad65d595a4069d2471 | [
"Apache-2.0"
] | null | null | null | web/views/html_cdn_view.ex | rob05c/tox | f54847ca058ad24b909341ad65d595a4069d2471 | [
"Apache-2.0"
] | null | null | null | defmodule Tox.HtmlCdnView do
use Tox.Web, :view
end
| 13.5 | 28 | 0.759259 |
4a8d1fbda2f0dbb1faa530e4b4153340cb09c9a0 | 181 | exs | Elixir | Problem015/Elixir/solution_1.exs | drocha87/ProjectEuler | c18407448aa4f05484191a0df1380e34f2b8c5d7 | [
"MIT"
] | 167 | 2015-08-12T19:32:03.000Z | 2022-03-25T12:26:43.000Z | Problem015/Elixir/solution_1.exs | drocha87/ProjectEuler | c18407448aa4f05484191a0df1380e34f2b8c5d7 | [
"MIT"
] | 153 | 2016-02-16T02:05:31.000Z | 2020-11-06T15:35:51.000Z | Problem015/Elixir/solution_1.exs | drocha87/ProjectEuler | c18407448aa4f05484191a0df1380e34f2b8c5d7 | [
"MIT"
] | 84 | 2015-08-12T20:54:04.000Z | 2022-02-27T05:14:53.000Z | # Author: G4BB3R
defmodule Fat do
def fatorial(1), do: 1
def fatorial(n), do: n * fatorial(n - 1)
end
IO.puts round(Fat.fatorial(40) / round(:math.pow(Fat.fatorial(20), 2)))
| 16.454545 | 72 | 0.657459 |
4a8d415e94f8527d4a527a097866cbfc5fa783d5 | 10,126 | ex | Elixir | lib/elixir/lib/config.ex | LaudateCorpus1/elixir | b131f874640775fdf08707d5b2fbbc1e91722cd0 | [
"Apache-2.0"
] | 2 | 2020-08-11T16:19:53.000Z | 2020-08-11T18:07:11.000Z | lib/elixir/lib/config.ex | LaudateCorpus1/elixir | b131f874640775fdf08707d5b2fbbc1e91722cd0 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/config.ex | LaudateCorpus1/elixir | b131f874640775fdf08707d5b2fbbc1e91722cd0 | [
"Apache-2.0"
] | 1 | 2021-11-08T10:21:27.000Z | 2021-11-08T10:21:27.000Z | defmodule Config do
@moduledoc ~S"""
A simple keyword-based configuration API.
## Example
This module is most commonly used to define application configuration,
typically in `config/config.exs`:
import Config
config :some_app,
key1: "value1",
key2: "value2"
import_config... | 30.317365 | 95 | 0.674896 |
4a8d6ebecbf202507a2b37f9f37ec88422e9b9c0 | 12,399 | ex | Elixir | lib/blue_bird/writer/blueprint.ex | KittyHeaven/blue_bird | 375846642bd2cc52a6f1c7df87cda2a25973b79a | [
"MIT"
] | 52 | 2017-05-29T11:18:43.000Z | 2021-09-17T07:55:14.000Z | lib/blue_bird/writer/blueprint.ex | KittyHeaven/blue_bird | 375846642bd2cc52a6f1c7df87cda2a25973b79a | [
"MIT"
] | 50 | 2017-05-30T13:21:00.000Z | 2019-12-24T00:17:02.000Z | lib/blue_bird/writer/blueprint.ex | KittyHeaven/blue_bird | 375846642bd2cc52a6f1c7df87cda2a25973b79a | [
"MIT"
] | 13 | 2017-07-06T20:52:08.000Z | 2020-04-27T06:28:34.000Z | defmodule BlueBird.Writer.Blueprint do
@moduledoc """
Defines functions to generate an API BluePrint representation of the
`BlueBird.ApiDoc` struct.
"""
import BlueBird.Writer, only: [group_routes: 2]
alias BlueBird.{ApiDoc, JSONData, Parameter, Request, Response, Route}
@doc """
Generates a string fr... | 28.969626 | 80 | 0.631099 |
4a8daa902da8391e35dee41da8e730acb0fdde7f | 563 | exs | Elixir | test/configs/issue_85.exs | LaudateCorpus1/conform | 664c3b8de09a4b35c64e4b7559869740d906fcee | [
"MIT"
] | 410 | 2015-01-10T13:33:00.000Z | 2022-01-31T20:12:15.000Z | test/configs/issue_85.exs | LaudateCorpus1/conform | 664c3b8de09a4b35c64e4b7559869740d906fcee | [
"MIT"
] | 140 | 2015-02-05T16:29:32.000Z | 2020-10-22T10:52:33.000Z | test/configs/issue_85.exs | LaudateCorpus1/conform | 664c3b8de09a4b35c64e4b7559869740d906fcee | [
"MIT"
] | 65 | 2015-02-13T21:02:29.000Z | 2021-06-23T05:49:09.000Z | use Mix.Config
config :rocket, Rocket.Endpoint,
url: [host: "localhost"],
root: Path.dirname(__DIR__),
secret_key_base: "Hoopdie doopdie doo",
debug_errors: false,
http: [
dispatch: [
{:_, [
{"/ws", Pixie.Adapter.Cowboy.HttpHandler, {Pixie.Adapter.Plug, []}},
{"/me... | 31.277778 | 140 | 0.547069 |
4a8db355321724ba5a6bf805b3a1ae9d7f1672d3 | 9,797 | ex | Elixir | lib/mix/tasks/coherence.clean.ex | harmon25/coherence | 5c4f26d3c87f6a16638adf623d041e2723ccf2b8 | [
"MIT"
] | 1 | 2022-03-06T16:30:21.000Z | 2022-03-06T16:30:21.000Z | lib/mix/tasks/coherence.clean.ex | ysbaddaden/coherence | 5c4f26d3c87f6a16638adf623d041e2723ccf2b8 | [
"MIT"
] | null | null | null | lib/mix/tasks/coherence.clean.ex | ysbaddaden/coherence | 5c4f26d3c87f6a16638adf623d041e2723ccf2b8 | [
"MIT"
] | 2 | 2017-09-22T16:54:36.000Z | 2021-11-09T20:55:58.000Z | defmodule Mix.Tasks.Coherence.Clean do
@shortdoc "Clean files created by the coherence installer."
@moduledoc """
This task will clean most of the files installed by the `mix coherence.install` task.
## Examples
# Clean all the installed files
mix coherence.clean --all
# Clean only the ins... | 28.899705 | 132 | 0.635092 |
4a8ded116da98daaf3521421b748f385f500ab8e | 213 | exs | Elixir | priv/repo/migrations/20160626174300_create_products.exs | AlloyCI/kerosene | 9cba2a414d34ca0f5c5796f7e17d175374ca2b42 | [
"MIT"
] | null | null | null | priv/repo/migrations/20160626174300_create_products.exs | AlloyCI/kerosene | 9cba2a414d34ca0f5c5796f7e17d175374ca2b42 | [
"MIT"
] | null | null | null | priv/repo/migrations/20160626174300_create_products.exs | AlloyCI/kerosene | 9cba2a414d34ca0f5c5796f7e17d175374ca2b42 | [
"MIT"
] | null | null | null | defmodule Kerosene.Repo.Migrations.CreateProduct do
use Ecto.Migration
def change do
create table(:products) do
add(:name, :string)
add(:price, :decimal)
timestamps()
end
end
end
| 16.384615 | 51 | 0.661972 |
4a8df5cd486968085300b7139c22ed2246a29d34 | 2,595 | ex | Elixir | lib/case_style/snake_case.ex | thomas9911/case_style_ex | da733d613782924b52051634b60534a96215ae18 | [
"MIT"
] | null | null | null | lib/case_style/snake_case.ex | thomas9911/case_style_ex | da733d613782924b52051634b60534a96215ae18 | [
"MIT"
] | null | null | null | lib/case_style/snake_case.ex | thomas9911/case_style_ex | da733d613782924b52051634b60534a96215ae18 | [
"MIT"
] | null | null | null | defmodule CaseStyle.SnakeCase do
@moduledoc """
Module for converting from and to snake_case
"""
defstruct tokens: []
@behaviour CaseStyle
alias CaseStyle.Tokens
alias CaseStyle.Tokens.{
AfterSpacingChar,
AfterSpacingDigit,
Char,
Digit,
End,
FirstLetter,
Literal,
Spacing... | 29.488636 | 98 | 0.638921 |
4a8e0884baacf475ecded1dae59137a181b281f4 | 182 | exs | Elixir | priv/repo/migrations/20200714012704_increase_size_of_notes_field.exs | bikebrigade/dispatch | eb622fe4f6dab7c917d678d3d7a322a01f97da44 | [
"Apache-2.0"
] | 28 | 2021-10-11T01:53:53.000Z | 2022-03-24T17:45:55.000Z | priv/repo/migrations/20200714012704_increase_size_of_notes_field.exs | bikebrigade/dispatch | eb622fe4f6dab7c917d678d3d7a322a01f97da44 | [
"Apache-2.0"
] | 20 | 2021-10-21T08:12:31.000Z | 2022-03-31T13:35:53.000Z | priv/repo/migrations/20200714012704_increase_size_of_notes_field.exs | bikebrigade/dispatch | eb622fe4f6dab7c917d678d3d7a322a01f97da44 | [
"Apache-2.0"
] | null | null | null | defmodule BikeBrigade.Repo.Migrations.IncreaseSizeOfNotesField do
use Ecto.Migration
def change do
alter table(:tasks) do
modify :rider_notes, :text
end
end
end
| 18.2 | 65 | 0.736264 |
4a8e27474361fa722f5b71707bb6c70b741f5813 | 265 | ex | Elixir | apps/rest_api/test/support/mocks.ex | dcdourado/watcher_ex | ce80df81610a6e9b77612911aac2a6d6cf4de8d5 | [
"Apache-2.0"
] | 9 | 2020-10-13T14:11:37.000Z | 2021-08-12T18:40:08.000Z | apps/rest_api/test/support/mocks.ex | dcdourado/watcher_ex | ce80df81610a6e9b77612911aac2a6d6cf4de8d5 | [
"Apache-2.0"
] | 28 | 2020-10-04T14:43:48.000Z | 2021-12-07T16:54:22.000Z | apps/rest_api/test/support/mocks.ex | dcdourado/watcher_ex | ce80df81610a6e9b77612911aac2a6d6cf4de8d5 | [
"Apache-2.0"
] | 3 | 2020-11-25T20:59:47.000Z | 2021-08-30T10:36:58.000Z | for module <- [
# Authenticator domain
RestAPI.Ports.Authenticator,
# Authorizer domain
RestAPI.Ports.Authorizer,
# ResourceManager domain
RestAPI.Ports.ResourceManager
] do
Mox.defmock(:"#{module}Mock", for: module)
end
| 20.384615 | 44 | 0.65283 |
4a8e3e064ccce99a17e42766b5653dbbf3d35633 | 204 | ex | Elixir | lib/chlorine.ex | Phiriq/chlorine | 30da3362949a8264125ce2d90a96f0f5318cf589 | [
"MIT"
] | 1 | 2021-06-30T03:40:47.000Z | 2021-06-30T03:40:47.000Z | lib/chlorine.ex | Phiriq/chlorine | 30da3362949a8264125ce2d90a96f0f5318cf589 | [
"MIT"
] | null | null | null | lib/chlorine.ex | Phiriq/chlorine | 30da3362949a8264125ce2d90a96f0f5318cf589 | [
"MIT"
] | null | null | null | defmodule Chlorine do
@moduledoc """
Documentation for `Chlorine`.
"""
@doc """
Hello world.
## Examples
iex> Chlorine.hello()
:world
"""
def hello do
:world
end
end
| 10.736842 | 31 | 0.563725 |
4a8eaadd1669e61ae99c96a05cb3c34aaf2c8f83 | 318 | ex | Elixir | test/support/web/controllers/live_query_controller.ex | bdfinlayson/drab | ce11a643ec8fe7e7f622489af5792ef12e69a8c7 | [
"MIT"
] | null | null | null | test/support/web/controllers/live_query_controller.ex | bdfinlayson/drab | ce11a643ec8fe7e7f622489af5792ef12e69a8c7 | [
"MIT"
] | null | null | null | test/support/web/controllers/live_query_controller.ex | bdfinlayson/drab | ce11a643ec8fe7e7f622489af5792ef12e69a8c7 | [
"MIT"
] | null | null | null | defmodule DrabTestApp.LiveQueryController do
@moduledoc false
use DrabTestApp.Web, :controller
use Drab.Controller
require Logger
def index(conn, _params) do
render(
conn,
"index.html",
color: "#ffeecc",
href: "https://tg.pl/drab",
link: "Drab Demo Page"
)
end
end
| 16.736842 | 44 | 0.63522 |
4a8eb15ab60c09b388a2f1c8ea52a9400fdd6660 | 427 | exs | Elixir | apps/telegraph/test/telegraph/morse_decode_test.exs | paulanthonywilson/morsey | b72d1eee54db1bcc8d0f2097c345da602995ce43 | [
"MIT"
] | 1 | 2018-12-30T04:37:15.000Z | 2018-12-30T04:37:15.000Z | apps/telegraph/test/telegraph/morse_decode_test.exs | paulanthonywilson/morsey | b72d1eee54db1bcc8d0f2097c345da602995ce43 | [
"MIT"
] | null | null | null | apps/telegraph/test/telegraph/morse_decode_test.exs | paulanthonywilson/morsey | b72d1eee54db1bcc8d0f2097c345da602995ce43 | [
"MIT"
] | null | null | null | defmodule Telegraph.MorseDecodeTest do
use ExUnit.Case
alias Telegraph.MorseDecode
test "decodes" do
{:ok, pid} = MorseDecode.start_link(self())
send(pid, {:morse_character, [:.]})
assert_receive {:telegraph_character, "E"}
end
test "passes through :morse_end_of_word" do
{:ok, pid} = MorseD... | 23.722222 | 47 | 0.70726 |
4a8eb3855cef68c20a59d6845608396e5c19a9ef | 871 | ex | Elixir | lib/rocketpay_web/controllers/accounts_controller.ex | TiagoBani/rocketpay | 52b10d90160926eb506135ae0b251e2ed859d958 | [
"MIT"
] | null | null | null | lib/rocketpay_web/controllers/accounts_controller.ex | TiagoBani/rocketpay | 52b10d90160926eb506135ae0b251e2ed859d958 | [
"MIT"
] | null | null | null | lib/rocketpay_web/controllers/accounts_controller.ex | TiagoBani/rocketpay | 52b10d90160926eb506135ae0b251e2ed859d958 | [
"MIT"
] | null | null | null | defmodule RocketpayWeb.AccountsController do
use RocketpayWeb, :controller
alias Rocketpay.Account
alias Rocketpay.Accounts.Transaction.Response, as: TransactionResponse
action_fallback RocketpayWeb.FallbackController
def deposit(conn, params) do
with {:ok, %Account{} = account} <- Rocketpay.deposit(pa... | 26.393939 | 88 | 0.677382 |
4a8ec91178b61e303fa14c1d188ee08323b95339 | 5,539 | ex | Elixir | lib/swoosh/adapters/sendgrid.ex | jackmarchant/swoosh | e387e9c0c8a224d1d0761f24ffba90cafc8ef664 | [
"MIT"
] | null | null | null | lib/swoosh/adapters/sendgrid.ex | jackmarchant/swoosh | e387e9c0c8a224d1d0761f24ffba90cafc8ef664 | [
"MIT"
] | null | null | null | lib/swoosh/adapters/sendgrid.ex | jackmarchant/swoosh | e387e9c0c8a224d1d0761f24ffba90cafc8ef664 | [
"MIT"
] | null | null | null | defmodule Swoosh.Adapters.Sendgrid do
@moduledoc ~S"""
An adapter that sends email using the Sendgrid API.
For reference: [Sendgrid API docs](https://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/index.html)
## Example
# config/config.exs
config :sample, Sample.Mailer,
adapter: Swoosh.A... | 30.103261 | 104 | 0.654089 |
4a8ee4e3ba93e7bb9c9fbcea7f10041df5cb6222 | 566 | exs | Elixir | todo/mix.exs | ug0/play_with_elixir | 03a9c3f088e275d89ac7b5dde86d479e37c17840 | [
"MIT"
] | null | null | null | todo/mix.exs | ug0/play_with_elixir | 03a9c3f088e275d89ac7b5dde86d479e37c17840 | [
"MIT"
] | null | null | null | todo/mix.exs | ug0/play_with_elixir | 03a9c3f088e275d89ac7b5dde86d479e37c17840 | [
"MIT"
] | null | null | null | defmodule Todo.MixProject do
use Mix.Project
def project do
[
app: :todo,
version: "0.1.0",
elixir: "~> 1.7",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applicati... | 19.517241 | 88 | 0.570671 |
4a8f4dd169fd30a742e466df555fd79f694f52ff | 4,269 | exs | Elixir | exercises/simple-linked-list/linked_list_test.exs | jerith/elixir | 9a3f2a2fbee26a7b6a6b3ad74a9e6d1ff2495ed4 | [
"Apache-2.0"
] | null | null | null | exercises/simple-linked-list/linked_list_test.exs | jerith/elixir | 9a3f2a2fbee26a7b6a6b3ad74a9e6d1ff2495ed4 | [
"Apache-2.0"
] | 1 | 2019-06-13T09:31:54.000Z | 2019-06-13T09:31:54.000Z | exercises/simple-linked-list/linked_list_test.exs | jerith/elixir | 9a3f2a2fbee26a7b6a6b3ad74a9e6d1ff2495ed4 | [
"Apache-2.0"
] | 1 | 2018-07-19T23:43:56.000Z | 2018-07-19T23:43:56.000Z | if !System.get_env("EXERCISM_TEST_EXAMPLES") do
Code.load_file("linked_list.exs", __DIR__)
end
ExUnit.start()
ExUnit.configure(exclude: :pending, trace: true)
defmodule LinkedListTest do
use ExUnit.Case
test "length/1 of new list" do
list = LinkedList.new()
assert LinkedList.length(list) == 0
end
... | 27.018987 | 74 | 0.645819 |
4a8fe03abe4df351985fb91c52ba834c23e308a0 | 5,171 | ex | Elixir | lib/tesla/multipart.ex | DNNX/tesla | a1a60ad74de1b88782ab50a7f52719d7cecef94a | [
"MIT"
] | null | null | null | lib/tesla/multipart.ex | DNNX/tesla | a1a60ad74de1b88782ab50a7f52719d7cecef94a | [
"MIT"
] | null | null | null | lib/tesla/multipart.ex | DNNX/tesla | a1a60ad74de1b88782ab50a7f52719d7cecef94a | [
"MIT"
] | null | null | null | defmodule Tesla.Multipart do
@moduledoc """
Multipart functionality.
### Example
```
mp =
Multipart.new
|> Multipart.add_content_type_param("charset=utf-8")
|> Multipart.add_field("field1", "foo")
|> Multipart.add_field("field2", "bar", headers: [{:"Content-Id", 1}, {:"Content-Type", "text/pl... | 28.569061 | 107 | 0.612067 |
4a8fe0cd2c87f42b69c34876e519ae671e18a62b | 74 | exs | Elixir | test/test_helper.exs | corybuecker/simple-budget | d86241ff712552267da87052120468b01d2b8f41 | [
"MIT"
] | 2 | 2019-04-02T01:06:40.000Z | 2019-05-13T01:12:24.000Z | test/test_helper.exs | corybuecker/simple-budget | d86241ff712552267da87052120468b01d2b8f41 | [
"MIT"
] | 7 | 2018-12-27T12:33:38.000Z | 2021-03-08T22:31:14.000Z | test/test_helper.exs | corybuecker/simple-budget | d86241ff712552267da87052120468b01d2b8f41 | [
"MIT"
] | null | null | null | ExUnit.start()
Ecto.Adapters.SQL.Sandbox.mode(SimpleBudget.Repo, :manual)
| 24.666667 | 58 | 0.797297 |
4a8ff5a08c0126b8e30ace48723686b1417cefa4 | 2,179 | ex | Elixir | lib/xdr/transactions/transaction_result_code.ex | einerzg/stellar_base | 2d10c5fc3b8159efc5de10b5c7c665e3b57b3d8f | [
"MIT"
] | 3 | 2021-08-17T20:32:45.000Z | 2022-03-13T20:26:02.000Z | lib/xdr/transactions/transaction_result_code.ex | einerzg/stellar_base | 2d10c5fc3b8159efc5de10b5c7c665e3b57b3d8f | [
"MIT"
] | 45 | 2021-08-12T20:19:41.000Z | 2022-03-27T21:00:10.000Z | lib/xdr/transactions/transaction_result_code.ex | einerzg/stellar_base | 2d10c5fc3b8159efc5de10b5c7c665e3b57b3d8f | [
"MIT"
] | 2 | 2021-09-22T23:11:13.000Z | 2022-01-23T03:19:11.000Z | defmodule StellarBase.XDR.TransactionResultCode do
@moduledoc """
Representation of Stellar `TransactionResultCode` type.
"""
@behaviour XDR.Declaration
@declarations [
# fee bump inner transaction succeeded
txFEE_BUMP_INNER_SUCCESS: 1,
# all operations succeeded
txSUCCESS: 0,
# one of th... | 26.253012 | 76 | 0.672786 |
4a902e2274dc552f365ba54af664dac3b1372c7b | 1,229 | ex | Elixir | api/lib/trello_clone_api_web/views/error_helpers.ex | arkanoryn/trello-clone | 2d5f5bc5c498c1740054dc56da16ad78c545b755 | [
"Apache-2.0"
] | 1 | 2021-04-17T20:20:59.000Z | 2021-04-17T20:20:59.000Z | api/lib/trello_clone_api_web/views/error_helpers.ex | arkanoryn/trello-clone | 2d5f5bc5c498c1740054dc56da16ad78c545b755 | [
"Apache-2.0"
] | null | null | null | api/lib/trello_clone_api_web/views/error_helpers.ex | arkanoryn/trello-clone | 2d5f5bc5c498c1740054dc56da16ad78c545b755 | [
"Apache-2.0"
] | null | null | null | defmodule TrelloCloneApiWeb.ErrorHelpers do
@moduledoc """
Conveniences for translating and building error messages.
"""
@doc """
Translates an error message using gettext.
"""
def translate_error({msg, opts}) do
# When using gettext, we typically pass the strings we want
# to translate as a stat... | 36.147059 | 83 | 0.677787 |
4a9038b33cedac8d957b789c36bf43b867218a3f | 1,420 | exs | Elixir | test/do_it/commfig_test.exs | rzcastilho/do_it | 4b670dfbbc05de0c6cc5a2f9002f5974f5eb6c29 | [
"Apache-2.0"
] | null | null | null | test/do_it/commfig_test.exs | rzcastilho/do_it | 4b670dfbbc05de0c6cc5a2f9002f5974f5eb6c29 | [
"Apache-2.0"
] | null | null | null | test/do_it/commfig_test.exs | rzcastilho/do_it | 4b670dfbbc05de0c6cc5a2f9002f5974f5eb6c29 | [
"Apache-2.0"
] | null | null | null | defmodule DoIt.CommfigTest do
@moduledoc false
use ExUnit.Case
alias DoIt.Commfig
setup_all do
Commfig.set("test", "setup")
on_exit(fn -> File.rm!(Commfig.get_file()) end)
{:ok, Commfig.get_data()}
end
test "success getting dir name" do
assert Application.get_env(:do_it, DoIt.Commfig)[:di... | 27.307692 | 83 | 0.643662 |
4a903e843b6a07736f1898229cefa9a207039914 | 3,326 | ex | Elixir | lib/sthub_web/router.ex | Rukenshia/sthub-web | 2749e0a08ca71683ca1d44ceecc89310dea70e07 | [
"MIT"
] | null | null | null | lib/sthub_web/router.ex | Rukenshia/sthub-web | 2749e0a08ca71683ca1d44ceecc89310dea70e07 | [
"MIT"
] | 14 | 2020-07-17T06:00:03.000Z | 2020-10-29T20:28:32.000Z | lib/sthub_web/router.ex | Rukenshia/sthub-web | 2749e0a08ca71683ca1d44ceecc89310dea70e07 | [
"MIT"
] | null | null | null | defmodule StHubWeb.Router do
use StHubWeb, :router
pipeline :auth do
plug StHub.UserManager.Pipeline
end
pipeline :ensure_auth do
plug Guardian.Plug.EnsureAuthenticated
end
pipeline :ensure_admin do
plug StHub.UserManager.EnsureAdministrator
end
pipeline :ensure_contributor do
plug S... | 24.637037 | 74 | 0.676188 |
4a90421cc9768352060d1ad9d997b4372c2c3968 | 194 | exs | Elixir | priv/repo/migrations/20210730074834_add_background_color_to_sources.exs | HierBautBerlin/website | 91410e7c61c1efad438fe84bf550f87b0056c440 | [
"MIT"
] | 13 | 2021-03-06T12:16:34.000Z | 2022-03-31T09:46:35.000Z | priv/repo/migrations/20210730074834_add_background_color_to_sources.exs | HierBautBerlin/website | 91410e7c61c1efad438fe84bf550f87b0056c440 | [
"MIT"
] | 148 | 2021-03-05T12:44:55.000Z | 2022-03-11T12:09:06.000Z | priv/repo/migrations/20210730074834_add_background_color_to_sources.exs | HierBautBerlin/website | 91410e7c61c1efad438fe84bf550f87b0056c440 | [
"MIT"
] | 2 | 2021-06-02T14:31:21.000Z | 2022-02-14T08:36:51.000Z | defmodule Hierbautberlin.Repo.Migrations.AddBackgroundColorToSources do
use Ecto.Migration
def change do
alter table(:sources) do
add :background_color, :string
end
end
end
| 19.4 | 71 | 0.752577 |
4a90443f38ecd3d1bfeef96e144e1d8fec1fb631 | 623 | exs | Elixir | config/test.exs | hoodaly/web | 852f4c3da5b1f248d08206b58cd58981e76f6899 | [
"WTFPL"
] | null | null | null | config/test.exs | hoodaly/web | 852f4c3da5b1f248d08206b58cd58981e76f6899 | [
"WTFPL"
] | null | null | null | config/test.exs | hoodaly/web | 852f4c3da5b1f248d08206b58cd58981e76f6899 | [
"WTFPL"
] | 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 :entice_web, Entice.Web.Endpoint,
http: [port: 4001],
server: false
config :entice_web, client_version: "TestVersion"
# Print only warnings and errors during test
config :logger, level: :warn
... | 24.92 | 56 | 0.743178 |
4a904f9607dd8bbae2fe845ef6eb542ff82fd882 | 1,372 | ex | Elixir | lib/top5_2_web/router.ex | rpillar/Top5_Elixir2 | 9f3a9a0315c5dc53cb53aab93deadccdb697a868 | [
"MIT"
] | 1 | 2019-11-11T21:48:20.000Z | 2019-11-11T21:48:20.000Z | lib/top5_2_web/router.ex | rpillar/Top5_Elixir2 | 9f3a9a0315c5dc53cb53aab93deadccdb697a868 | [
"MIT"
] | 2 | 2021-03-09T09:26:25.000Z | 2021-05-09T08:58:51.000Z | lib/top5_2_web/router.ex | rpillar/Top5_Elixir2 | 9f3a9a0315c5dc53cb53aab93deadccdb697a868 | [
"MIT"
] | null | null | null | defmodule Top52Web.Router do
use Top52Web, :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"]
plug :fetch_session
plug :fetch_flash
... | 31.906977 | 82 | 0.614431 |
4a90576ce2cb1f7ea4e0d776d39bacb50bfdb5e2 | 5,833 | exs | Elixir | test/message_hook_test.exs | garfenter/git_ops | f6e64cf9b798024e0be7cec06fc006a8372cffb3 | [
"MIT"
] | 61 | 2018-10-05T20:40:58.000Z | 2021-11-11T02:34:38.000Z | test/message_hook_test.exs | frankdugan3/git_ops | 5cf91452cd6f6214f5aa1a0c232902b4f6c3c31c | [
"MIT"
] | 51 | 2018-10-15T23:34:32.000Z | 2022-03-03T19:35:42.000Z | test/message_hook_test.exs | frankdugan3/git_ops | 5cf91452cd6f6214f5aa1a0c232902b4f6c3c31c | [
"MIT"
] | 18 | 2018-11-18T20:50:08.000Z | 2022-02-24T23:39:37.000Z | # Read Mix input from current process to test user input
Mix.shell(Mix.Shell.Process)
defmodule GitOps.Mix.Tasks.Test.MessageHookTest do
use ExUnit.Case
alias Mix.Tasks.GitOps.MessageHook
setup do
test_hooks_dir = "test_hooks_dir"
on_exit(fn -> delete_temp_dir!(test_hooks_dir) end)
%{test_hooks_d... | 32.954802 | 97 | 0.664152 |
4a90619965cbf415a7715871c2d5ac3435270b3d | 1,851 | ex | Elixir | lib/discogs/models/user.ex | cribbles/discogs-shuffle | aa82f8f9bb0fbb1245da22bd2bc8ed37b7a56b22 | [
"MIT"
] | null | null | null | lib/discogs/models/user.ex | cribbles/discogs-shuffle | aa82f8f9bb0fbb1245da22bd2bc8ed37b7a56b22 | [
"MIT"
] | null | null | null | lib/discogs/models/user.ex | cribbles/discogs-shuffle | aa82f8f9bb0fbb1245da22bd2bc8ed37b7a56b22 | [
"MIT"
] | null | null | null | defmodule Discogs.Models.User do
@moduledoc """
Ecto model representing a Discogs user.
"""
use Ecto.Schema
import Ecto.Changeset
alias Discogs.Models.{Release, User, UserRelease}
alias Discogs.Repo
schema "users" do
many_to_many(:releases, Release, join_through: UserRelease)
has_many(:records,... | 25.356164 | 72 | 0.621286 |
4a9064a6e17563da5d1593cfee5b6df1bcb22849 | 1,811 | exs | Elixir | test/commands/alert_test.exs | nathanjohnson320/exselenium | 8794296b305f3418a1c77444f2ca6ea0ec3ae4b6 | [
"MIT"
] | 9 | 2017-04-23T05:32:55.000Z | 2021-01-29T21:11:43.000Z | test/commands/alert_test.exs | nathanjohnson320/exselenium | 8794296b305f3418a1c77444f2ca6ea0ec3ae4b6 | [
"MIT"
] | null | null | null | test/commands/alert_test.exs | nathanjohnson320/exselenium | 8794296b305f3418a1c77444f2ca6ea0ec3ae4b6 | [
"MIT"
] | 1 | 2019-07-20T00:18:52.000Z | 2019-07-20T00:18:52.000Z | defmodule AlertTest do
use ExUnit.Case
alias Selenium.Session
alias Selenium.Commands.Navigate
alias Selenium.Commands.Javascript
alias Selenium.Commands.Alert
doctest Alert
test "get alert text" do
session_name = "alert text"
# Create a new session
Session.create(session_name, "firefox")
... | 20.579545 | 59 | 0.662065 |
4a906b23289ddfbf2b88cb79c442a95c10eaa9d8 | 8,229 | exs | Elixir | lib/elixir/test/elixir/io_test.exs | doughsay/elixir | 7356a47047d0b54517bd6886603f09b1121dde2b | [
"Apache-2.0"
] | 19,291 | 2015-01-01T02:42:49.000Z | 2022-03-31T21:01:40.000Z | lib/elixir/test/elixir/io_test.exs | doughsay/elixir | 7356a47047d0b54517bd6886603f09b1121dde2b | [
"Apache-2.0"
] | 8,082 | 2015-01-01T04:16:23.000Z | 2022-03-31T22:08:02.000Z | lib/elixir/test/elixir/io_test.exs | doughsay/elixir | 7356a47047d0b54517bd6886603f09b1121dde2b | [
"Apache-2.0"
] | 3,472 | 2015-01-03T04:11:56.000Z | 2022-03-29T02:07:30.000Z | Code.require_file("test_helper.exs", __DIR__)
defmodule IOTest do
use ExUnit.Case, async: true
doctest IO
import ExUnit.CaptureIO
test "read with count" do
{:ok, file} = File.open(Path.expand('fixtures/file.txt', __DIR__), [:charlist])
assert 'FOO' == IO.read(file, 3)
assert File.close(file) == ... | 33.72541 | 93 | 0.586219 |
4a90b83b0f49ec87ab3f36dde9d16f4a4dd17ade | 61,957 | ex | Elixir | lib/elixir/lib/kernel/special_forms.ex | char0n/elixir | 0f61c6185ba635f7149728884c5072aa0ccddd48 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/kernel/special_forms.ex | char0n/elixir | 0f61c6185ba635f7149728884c5072aa0ccddd48 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/kernel/special_forms.ex | char0n/elixir | 0f61c6185ba635f7149728884c5072aa0ccddd48 | [
"Apache-2.0"
] | null | null | null | defmodule Kernel.SpecialForms do
@moduledoc """
Special forms are the basic building blocks of Elixir, and therefore
cannot be overridden by the developer.
The `Kernel.SpecialForms` module consists solely of macros that can be
invoked anywhere in Elixir code without the use of the
`Kernel.SpecialForms.` pr... | 28.697082 | 117 | 0.631164 |
4a90dfa949ce0b690d06a2a71b116145b88b6282 | 1,668 | exs | Elixir | word-count/word_count_test.exs | nickpellant/xelixir | 6e27dc7083ef3e423a1615f5151910672e6397a8 | [
"MIT"
] | null | null | null | word-count/word_count_test.exs | nickpellant/xelixir | 6e27dc7083ef3e423a1615f5151910672e6397a8 | [
"MIT"
] | null | null | null | word-count/word_count_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("word_count.exs")
end
ExUnit.start
ExUnit.configure exclude: :pending, trace: true
defmodule WordsTest do
use ExUnit.Case
test "count one word" do
assert Words.count("word") == %{ "word" => 1 }
end
@tag ... | 25.661538 | 88 | 0.602518 |
4a90e55271cd698b7a966d93ea7a54d7a663e8ab | 1,201 | exs | Elixir | apps/cms/test/partial/menu_links_test.exs | noisecapella/dotcom | d5ef869412102d2230fac3dcc216f01a29726227 | [
"MIT"
] | 42 | 2019-05-29T16:05:30.000Z | 2021-08-09T16:03:37.000Z | apps/cms/test/partial/menu_links_test.exs | noisecapella/dotcom | d5ef869412102d2230fac3dcc216f01a29726227 | [
"MIT"
] | 872 | 2019-05-29T17:55:50.000Z | 2022-03-30T09:28:43.000Z | apps/cms/test/partial/menu_links_test.exs | noisecapella/dotcom | d5ef869412102d2230fac3dcc216f01a29726227 | [
"MIT"
] | 12 | 2019-07-01T18:33:21.000Z | 2022-03-10T02:13:57.000Z | defmodule CMS.Partial.MenuLinksTest do
use ExUnit.Case, async: true
import CMS.Partial.MenuLinks
alias CMS.API.Static
alias CMS.Field.Link
alias CMS.Partial.MenuLinks
setup do
api_data =
Static.basic_page_with_sidebar_response()
|> Map.get("field_sidebar_menu")
|> List.first()
... | 26.108696 | 113 | 0.473772 |
4a91042384ba3182e2a7313579c8d8adebcd42d7 | 2,206 | ex | Elixir | clients/sheets/lib/google_api/sheets/v4/model/batch_update_spreadsheet_response.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/sheets/lib/google_api/sheets/v4/model/batch_update_spreadsheet_response.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/sheets/lib/google_api/sheets/v4/model/batch_update_spreadsheet_response.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... | 41.622642 | 237 | 0.74252 |
4a9123e6604020aa0237a1816335ee701c8e902e | 2,146 | ex | Elixir | lib/scenic/primitive/text.ex | tiger808/scenic | 77abc6d891b7a1a9262cdc47d7c5fac3c8609d1f | [
"Apache-2.0"
] | 1,716 | 2018-09-07T21:55:43.000Z | 2022-03-31T16:16:30.000Z | lib/scenic/primitive/text.ex | tiger808/scenic | 77abc6d891b7a1a9262cdc47d7c5fac3c8609d1f | [
"Apache-2.0"
] | 220 | 2018-09-08T01:28:00.000Z | 2022-03-22T03:55:17.000Z | lib/scenic/primitive/text.ex | tiger808/scenic | 77abc6d891b7a1a9262cdc47d7c5fac3c8609d1f | [
"Apache-2.0"
] | 137 | 2018-09-07T21:55:56.000Z | 2022-03-26T04:07:27.000Z | #
# Created by Boyd Multerer on 2017-05-06.
# Copyright © 2017 Kry10 Industries. All rights reserved.
#
defmodule Scenic.Primitive.Text do
@moduledoc """
Draw text on the screen.
## Data
`text`
The data for a Text primitive is a bitstring
* `text` - the text to draw
## Styles
This primitive reco... | 32.515152 | 97 | 0.582013 |
4a913ef5c64374f52d700fc6937176f92882654c | 1,365 | exs | Elixir | mix.exs | nats-io/elixir-nats | cd1ddcee1a145093924c1acf24d1bb627b6d61cd | [
"MIT"
] | 82 | 2016-01-27T20:43:50.000Z | 2022-01-31T20:27:18.000Z | mix.exs | nats-io/elixir-nats | cd1ddcee1a145093924c1acf24d1bb627b6d61cd | [
"MIT"
] | 21 | 2016-01-28T16:49:55.000Z | 2019-04-17T16:46:32.000Z | mix.exs | nats-io/elixir-nats | cd1ddcee1a145093924c1acf24d1bb627b6d61cd | [
"MIT"
] | 17 | 2016-01-28T16:14:51.000Z | 2021-04-07T11:00:07.000Z | # Copyright 2016 Apcera Inc. All rights reserved.
defmodule Nats.Mixfile do
use Mix.Project
@name "Nats"
@git_url "https://github.com/nats-io/elixir-nats"
@nats_io_url "https://nats.io/"
@home_url @git_url
@doc_url "https://nats-io.github.com/elixir-nats/"
@description "NATS framework for Elixir"
@ver... | 25.277778 | 64 | 0.564835 |
4a9146bab7a630b144114d7f57b04768a47a7af5 | 1,941 | exs | Elixir | test/glimesh_web/live/user_live_components/subscribe_button_test.exs | Megami-Studios/glimesh.tv | 57dde3a328fabdcc3305be48ae1b82df27b83c9b | [
"MIT"
] | 328 | 2020-07-23T22:13:49.000Z | 2022-03-31T21:22:28.000Z | test/glimesh_web/live/user_live_components/subscribe_button_test.exs | Megami-Studios/glimesh.tv | 57dde3a328fabdcc3305be48ae1b82df27b83c9b | [
"MIT"
] | 362 | 2020-07-23T22:38:38.000Z | 2022-03-24T02:11:16.000Z | test/glimesh_web/live/user_live_components/subscribe_button_test.exs | Megami-Studios/glimesh.tv | 57dde3a328fabdcc3305be48ae1b82df27b83c9b | [
"MIT"
] | 72 | 2020-07-23T22:50:46.000Z | 2022-02-02T11:59:32.000Z | defmodule GlimeshWeb.UserLive.Components.SubscribeButtonTest do
use GlimeshWeb.ConnCase
import Phoenix.LiveViewTest
import Glimesh.AccountsFixtures
@component GlimeshWeb.UserLive.Components.SubscribeButton
defp create_streamer(_) do
{:ok, streamer} =
Glimesh.Accounts.set_stripe_attrs(streamer_fix... | 28.544118 | 99 | 0.641937 |
4a915390218cdaf3091d81ef5b13fc3d25dd8505 | 934 | ex | Elixir | test/support/channel_case.ex | neofelisho/flipay | 71a03a3f4c859892536faf600b93ff35da82fb88 | [
"MIT"
] | null | null | null | test/support/channel_case.ex | neofelisho/flipay | 71a03a3f4c859892536faf600b93ff35da82fb88 | [
"MIT"
] | null | null | null | test/support/channel_case.ex | neofelisho/flipay | 71a03a3f4c859892536faf600b93ff35da82fb88 | [
"MIT"
] | null | null | null | defmodule FlipayWeb.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 wi... | 24.578947 | 68 | 0.714133 |
4a915c5f15f892b96923e59de619a9038ff3c1c6 | 206 | exs | Elixir | Chapter02/apps/elixir_drip_web/test/elixir_drip_web/controllers/page_controller_test.exs | sthagen/Mastering-Elixir | 1b52ee79afe6b2ae80767a5e55c2be51df3c4c1d | [
"MIT"
] | 28 | 2018-08-09T05:05:29.000Z | 2022-03-14T06:59:07.000Z | Chapter02/apps/elixir_drip_web/test/elixir_drip_web/controllers/page_controller_test.exs | sthagen/Mastering-Elixir | 1b52ee79afe6b2ae80767a5e55c2be51df3c4c1d | [
"MIT"
] | 1 | 2019-02-11T09:11:33.000Z | 2019-05-06T06:40:19.000Z | Chapter02/apps/elixir_drip_web/test/elixir_drip_web/controllers/page_controller_test.exs | sthagen/Mastering-Elixir | 1b52ee79afe6b2ae80767a5e55c2be51df3c4c1d | [
"MIT"
] | 8 | 2018-08-09T14:53:02.000Z | 2020-12-14T19:31:21.000Z | defmodule ElixirDripWeb.PageControllerTest do
use ElixirDripWeb.ConnCase
test "GET /", %{conn: conn} do
conn = get(conn, "/")
assert html_response(conn, 200) =~ "Welcome to Phoenix!"
end
end
| 22.888889 | 60 | 0.68932 |
4a91ac5fdd73854e6b488bdf50f4410130deb520 | 2,168 | ex | Elixir | lib/2016/18.ex | segfaultvicta/advent-ex | a300e2659858b45b545773a0f2ff24f00453d35f | [
"MIT"
] | null | null | null | lib/2016/18.ex | segfaultvicta/advent-ex | a300e2659858b45b545773a0f2ff24f00453d35f | [
"MIT"
] | null | null | null | lib/2016/18.ex | segfaultvicta/advent-ex | a300e2659858b45b545773a0f2ff24f00453d35f | [
"MIT"
] | null | null | null | defmodule Advent.Sixteen.Eighteen do
alias Advent.Helpers.Utility, as: U
use Timing
@input "^.^^^..^^...^.^..^^^^^.....^...^^^..^^^^.^^.^^^^^^^^.^^.^^^^...^^...^^^^.^.^..^^..^..^.^^.^.^......."
#@input ".^^.^.^^^^"
@mapdepth 400000
#@mapdepth 10
@rowlength 100
#@rowlength 10
def safe_or_trap(posit... | 28.906667 | 111 | 0.565037 |
4a91c4828d06e1c870922874a87e735e1675f317 | 1,646 | ex | Elixir | lib/offsite/zipper/zipper_worker.ex | Arp-G/offsite | 31ae9332cead20a045948d8850f68fc9e7ab1db4 | [
"MIT"
] | null | null | null | lib/offsite/zipper/zipper_worker.ex | Arp-G/offsite | 31ae9332cead20a045948d8850f68fc9e7ab1db4 | [
"MIT"
] | null | null | null | lib/offsite/zipper/zipper_worker.ex | Arp-G/offsite | 31ae9332cead20a045948d8850f68fc9e7ab1db4 | [
"MIT"
] | null | null | null | defmodule Offsite.Zipper.ZipperWorker do
use GenServer
require Logger
alias Offsite.{Zipper.ZipperQueue, Downloaders.Torrent}
@base_zip_dest "/tmp/torrents_zip"
@check_for_work_interval 1000
def start_link(_opts), do: GenServer.start_link(__MODULE__, %{}, name: __MODULE__)
def remove_zip(id) do
re... | 23.514286 | 84 | 0.63791 |
4a91c68729cf023ee327c8d9705ea8c1a357c0df | 9,671 | ex | Elixir | lib/mix/lib/mix/local/installer.ex | meddle0x53/elixir | 963ea30931ff66ab72d5e3bab75e701f8c693185 | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/local/installer.ex | meddle0x53/elixir | 963ea30931ff66ab72d5e3bab75e701f8c693185 | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/local/installer.ex | meddle0x53/elixir | 963ea30931ff66ab72d5e3bab75e701f8c693185 | [
"Apache-2.0"
] | 1 | 2021-09-30T01:21:02.000Z | 2021-09-30T01:21:02.000Z | defmodule Mix.Local.Installer do
@moduledoc false
# This module implements pieces of functionality shared
# by the archive- and escript-related tasks.
@typedoc """
Installs types supported by `Mix.Local.Installer`.
* `:project` - installs the current Mix project's artifact
* `:local` - installs the... | 28.277778 | 96 | 0.617516 |
4a91d6f258f79fdc254d54f8e030c8324798b965 | 1,016 | ex | Elixir | supervised_todo_cache/lib/todo/database_worker.ex | AJPcodes/elixir_in_action | d9c9b0aeea13bf48cd65af7c2de6ba5cf30e5d26 | [
"MIT"
] | null | null | null | supervised_todo_cache/lib/todo/database_worker.ex | AJPcodes/elixir_in_action | d9c9b0aeea13bf48cd65af7c2de6ba5cf30e5d26 | [
"MIT"
] | null | null | null | supervised_todo_cache/lib/todo/database_worker.ex | AJPcodes/elixir_in_action | d9c9b0aeea13bf48cd65af7c2de6ba5cf30e5d26 | [
"MIT"
] | null | null | null | defmodule Todo.DatabaseWorker do
use GenServer
def start_link(db_folder) do
IO.puts "Starting database worker"
GenServer.start_link(__MODULE__, db_folder)
end
def store(worker_pid, key, data) do
GenServer.cast(worker_pid, {:store, key, data})
end
def get(worker_pid, key) do
IO.puts('gett... | 23.627907 | 77 | 0.660433 |
4a91e9c0d48e00c8a20f65d3b1a327971911fac5 | 1,019 | ex | Elixir | web/views/error_helpers.ex | victorspringer/recommendationsEx | f9facf8672d91df1037ccb065609a2a756d7fcc3 | [
"MIT"
] | 3 | 2017-06-20T07:47:32.000Z | 2020-10-27T15:25:10.000Z | web/views/error_helpers.ex | victorspringer/zionRecs | f9facf8672d91df1037ccb065609a2a756d7fcc3 | [
"MIT"
] | null | null | null | web/views/error_helpers.ex | victorspringer/zionRecs | f9facf8672d91df1037ccb065609a2a756d7fcc3 | [
"MIT"
] | 1 | 2019-08-22T03:38:19.000Z | 2019-08-22T03:38:19.000Z | defmodule RecommendationsEx.ErrorHelpers do
@moduledoc """
Conveniences for translating and building error messages.
"""
@doc """
Translates an error message using gettext.
"""
def translate_error({msg, opts}) do
# Because error messages were defined within Ecto, we must
# call the Gettext module... | 33.966667 | 83 | 0.679097 |
4a922c4f5571416dfde0f5620f59d3d8507ce3f4 | 3,146 | ex | Elixir | farmbot_core/lib/farmbot_core/asset/sync.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/sync.ex | SeppPenner/farmbot_os | 39ba5c5880f8aef71792e2c009514bed1177089c | [
"MIT"
] | null | null | null | farmbot_core/lib/farmbot_core/asset/sync.ex | SeppPenner/farmbot_os | 39ba5c5880f8aef71792e2c009514bed1177089c | [
"MIT"
] | null | null | null | defmodule FarmbotCore.Asset.Sync do
@moduledoc """
"""
use FarmbotCore.Asset.Schema, path: "/api/device/sync"
defmodule Item do
@moduledoc false
use Ecto.Schema
@primary_key false
@behaviour FarmbotCore.Asset.View
import FarmbotCore.Asset.View, only: [view: 2]
view sync_item do
... | 29.961905 | 84 | 0.664654 |
4a9232d17cfb337b1f88c9d51e7b1ba0de824c3c | 2,884 | ex | Elixir | implementations/elixir/ockam/ockam/lib/ockam/stream/client/bi_directional.ex | cipherboy/ockam | bbb6c19d8ba01847dda14ecc11588fe875512a8d | [
"Apache-2.0"
] | null | null | null | implementations/elixir/ockam/ockam/lib/ockam/stream/client/bi_directional.ex | cipherboy/ockam | bbb6c19d8ba01847dda14ecc11588fe875512a8d | [
"Apache-2.0"
] | null | null | null | implementations/elixir/ockam/ockam/lib/ockam/stream/client/bi_directional.ex | cipherboy/ockam | bbb6c19d8ba01847dda14ecc11588fe875512a8d | [
"Apache-2.0"
] | null | null | null | defmodule Ockam.Stream.Client.BiDirectional do
@moduledoc """
A node-wide subscription to a stream via Stream.Client.Consumer
On consumption creates publishers (PublishProxy) for return_stream in the messages
"""
alias Ockam.Message
alias Ockam.Stream.Client.BiDirectional.PublisherRegistry
alias Ockam.... | 30.041667 | 99 | 0.72018 |
4a9277555e1dde59763e2b91ddc80f0432da7ee7 | 145 | ex | Elixir | lib/ok/pipe.ex | andersonmcook/OK | 93b68cd60b1f0f6d78f07afe8040c7210ff8cfe2 | [
"Apache-2.0"
] | 582 | 2015-10-21T06:51:08.000Z | 2022-03-22T09:21:12.000Z | lib/ok/pipe.ex | andersonmcook/OK | 93b68cd60b1f0f6d78f07afe8040c7210ff8cfe2 | [
"Apache-2.0"
] | 61 | 2015-10-21T07:09:19.000Z | 2021-06-20T10:16:39.000Z | lib/ok/pipe.ex | andersonmcook/OK | 93b68cd60b1f0f6d78f07afe8040c7210ff8cfe2 | [
"Apache-2.0"
] | 24 | 2015-10-21T06:59:02.000Z | 2021-05-02T12:09:10.000Z | defmodule OK.Pipe do
@moduledoc false
defmacro __using__(_options) do
quote do
import OK, only: [~>: 2, ~>>: 2]
end
end
end
| 14.5 | 38 | 0.606897 |
4a92a26a6f6c927faaeeb0b182d2fb91ece266b5 | 5,094 | ex | Elixir | lib/honeydew/work_queue.ex | shovelend/honeydew | 8575beaae480154bdfa5dae2f6a8814e1a563d80 | [
"MIT"
] | null | null | null | lib/honeydew/work_queue.ex | shovelend/honeydew | 8575beaae480154bdfa5dae2f6a8814e1a563d80 | [
"MIT"
] | null | null | null | lib/honeydew/work_queue.ex | shovelend/honeydew | 8575beaae480154bdfa5dae2f6a8814e1a563d80 | [
"MIT"
] | 1 | 2019-12-06T12:05:18.000Z | 2019-12-06T12:05:18.000Z | defmodule Honeydew.WorkQueue do
use GenServer
require Logger
alias Honeydew.Job
defmodule State do
defstruct max_failures: nil,
delay_secs: nil,
suspended: false,
queue: :queue.new, # jobs waiting to be taken by a worker
backlog: MapSet.new, # jobs th... | 31.444444 | 108 | 0.636631 |
4a92a283899202920c07bbf036f620ae31a72094 | 66 | exs | Elixir | ModulesAndNamedFunctions/6.4.exs | miguelcoba/ProgrammingElixir | c3aee9151ab2346fbd31a5411c473b1a4e626e36 | [
"MIT"
] | 2 | 2015-11-14T21:35:01.000Z | 2017-07-12T07:09:40.000Z | ModulesAndNamedFunctions/6.4.exs | miguelcoba/ProgrammingElixir | c3aee9151ab2346fbd31a5411c473b1a4e626e36 | [
"MIT"
] | null | null | null | ModulesAndNamedFunctions/6.4.exs | miguelcoba/ProgrammingElixir | c3aee9151ab2346fbd31a5411c473b1a4e626e36 | [
"MIT"
] | null | null | null | defmodule Sum do
def of(0), do: 0
def of(n), do: n + of(n-1)
end | 16.5 | 27 | 0.590909 |
4a92c28595c379da213fac38ffd2f279b5fa79bd | 104 | exs | Elixir | test/elixir_google_scraper_web/views/page_view_test.exs | junan/elixir_google_scraper | d032f3a9d5a30e354f1e6d607434670334936630 | [
"MIT"
] | null | null | null | test/elixir_google_scraper_web/views/page_view_test.exs | junan/elixir_google_scraper | d032f3a9d5a30e354f1e6d607434670334936630 | [
"MIT"
] | 25 | 2021-05-21T02:23:37.000Z | 2021-07-09T09:22:32.000Z | test/elixir_google_scraper_web/views/page_view_test.exs | junan/elixir_google_scraper | d032f3a9d5a30e354f1e6d607434670334936630 | [
"MIT"
] | null | null | null | defmodule ElixirGoogleScraperWeb.PageViewTest do
use ElixirGoogleScraperWeb.ConnCase, async: true
end
| 26 | 50 | 0.865385 |
4a92e5a93e148d1a47b57316b1f627bcb7c84ecd | 1,025 | ex | Elixir | lib/ex_polygon/rest/stocks/last_trade_of_ticker.ex | aai/ex_polygon | 3bd6d8d0f1fbe4cd3fa939751c5ff00813eeeba3 | [
"MIT"
] | null | null | null | lib/ex_polygon/rest/stocks/last_trade_of_ticker.ex | aai/ex_polygon | 3bd6d8d0f1fbe4cd3fa939751c5ff00813eeeba3 | [
"MIT"
] | null | null | null | lib/ex_polygon/rest/stocks/last_trade_of_ticker.ex | aai/ex_polygon | 3bd6d8d0f1fbe4cd3fa939751c5ff00813eeeba3 | [
"MIT"
] | null | null | null | defmodule ExPolygon.Rest.Stocks.LastTradeOfTicker do
@moduledoc """
Returns a call to "Last Trade for a Symbol" Polygon.io
"""
@type last_trade :: ExPolygon.LastTrade.t()
@type api_key :: ExPolygon.Rest.HTTPClient.api_key()
@type shared_error_reasons :: ExPolygon.Rest.HTTPClient.shared_error_reasons()
@... | 27.702703 | 88 | 0.654634 |
4a9308d7711fd82289f893e05acd9c0593e8ed95 | 3,807 | exs | Elixir | test/extatus/metric_test.exs | gmtprime/extatus | e9bf16cb1e83d2c4225c66d7c0bfdfb40993de03 | [
"MIT"
] | 17 | 2017-03-01T07:19:46.000Z | 2021-11-25T21:57:38.000Z | test/extatus/metric_test.exs | gmtprime/extatus | e9bf16cb1e83d2c4225c66d7c0bfdfb40993de03 | [
"MIT"
] | 1 | 2018-04-02T11:09:28.000Z | 2018-04-02T14:33:30.000Z | test/extatus/metric_test.exs | gmtprime/extatus | e9bf16cb1e83d2c4225c66d7c0bfdfb40993de03 | [
"MIT"
] | 1 | 2021-12-14T20:49:02.000Z | 2021-12-14T20:49:02.000Z | defmodule Extatus.MetricTest do
use ExUnit.Case, async: true
alias Extatus.Sandbox.Metric
defmodule TestMetrics do
use Extatus.Metric
defmetrics do
counter :counter_test do
label :module
label :name
registry :default
help "Test counter"
end
gauge :gaug... | 31.46281 | 91 | 0.653008 |
4a93195f75610e67ec3d47e0c463b1e99e91ad4b | 7,184 | ex | Elixir | app_builder/lib/app_builder/windows.ex | apoorv-2204/elixir_learn_work_notebook_setup | 7ea75c1b53e0e9ce7ae89d386cc16b7277a1d86e | [
"Apache-2.0"
] | null | null | null | app_builder/lib/app_builder/windows.ex | apoorv-2204/elixir_learn_work_notebook_setup | 7ea75c1b53e0e9ce7ae89d386cc16b7277a1d86e | [
"Apache-2.0"
] | null | null | null | app_builder/lib/app_builder/windows.ex | apoorv-2204/elixir_learn_work_notebook_setup | 7ea75c1b53e0e9ce7ae89d386cc16b7277a1d86e | [
"Apache-2.0"
] | null | null | null | defmodule AppBuilder.Windows do
@moduledoc false
import AppBuilder.Utils
require EEx
@doc """
Creates a Windows installer.
"""
def build_windows_installer(release, options) do
tmp_dir = release.path <> "_tmp"
File.rm_rf(tmp_dir)
File.mkdir_p!(tmp_dir)
File.cp_r!(release.path, Path.join(... | 31.234783 | 150 | 0.640312 |
4a931ab5ad69f64a39c77d32946c276c31429962 | 69 | exs | Elixir | test/test_helper.exs | tjefferson08/frizzle-server | 8db3f31e4dae6583603fd2006415129f623827ba | [
"MIT"
] | null | null | null | test/test_helper.exs | tjefferson08/frizzle-server | 8db3f31e4dae6583603fd2006415129f623827ba | [
"MIT"
] | null | null | null | test/test_helper.exs | tjefferson08/frizzle-server | 8db3f31e4dae6583603fd2006415129f623827ba | [
"MIT"
] | null | null | null | ExUnit.start
Ecto.Adapters.SQL.Sandbox.mode(Frizzle.Repo, :manual)
| 13.8 | 53 | 0.782609 |
4a931e66287e83a466bfa64154d42644158b0cc2 | 535 | ex | Elixir | lib/eopencc/api.ex | TimLang/Eopencc | e376453c66395ed3fb3e147778d3d15e00ca7f01 | [
"MIT"
] | null | null | null | lib/eopencc/api.ex | TimLang/Eopencc | e376453c66395ed3fb3e147778d3d15e00ca7f01 | [
"MIT"
] | null | null | null | lib/eopencc/api.ex | TimLang/Eopencc | e376453c66395ed3fb3e147778d3d15e00ca7f01 | [
"MIT"
] | null | null | null |
defmodule Eopencc.Api do
alias Eopencc.Worker
def s2t str do
_translate(:s2t, str)
end
def t2s str do
_translate(:t2s, str)
end
def s2twp str do
_translate(:s2twp, str)
end
def tw2sp str do
_translate(:tw2sp, str)
end
defp _translate op, str do
worker = :poolboy.checkout(:e... | 15.735294 | 48 | 0.6 |
4a932272a2404b97b55aa8467d181ac4a120f8f5 | 382 | exs | Elixir | test/test_helper.exs | PRX/redix-clustered | 46d5826fdcd877ba9794e083260b5bcc784b8a9e | [
"MIT"
] | null | null | null | test/test_helper.exs | PRX/redix-clustered | 46d5826fdcd877ba9794e083260b5bcc784b8a9e | [
"MIT"
] | null | null | null | test/test_helper.exs | PRX/redix-clustered | 46d5826fdcd877ba9794e083260b5bcc784b8a9e | [
"MIT"
] | null | null | null | Dotenv.load()
# check if we have clustered redis running
host = System.get_env("REDIS_HOST", "127.0.0.1")
port = System.get_env("REDIS_PORT", "6379")
{:ok, conn} = Redix.start_link(host: host, port: String.to_integer(port))
with {:error, _err} <- Redix.command(conn, ["CLUSTER", "INFO"]) do
ExUnit.configure(exclude:... | 25.466667 | 73 | 0.698953 |
4a93481df94d98a816d667c738eceddb301a0950 | 680 | exs | Elixir | grade-school/school.exs | ravanscafi/exercism-elixir | 0f5c8c923166a0a795c323c7e2d6ccc9da572fcf | [
"MIT"
] | null | null | null | grade-school/school.exs | ravanscafi/exercism-elixir | 0f5c8c923166a0a795c323c7e2d6ccc9da572fcf | [
"MIT"
] | null | null | null | grade-school/school.exs | ravanscafi/exercism-elixir | 0f5c8c923166a0a795c323c7e2d6ccc9da572fcf | [
"MIT"
] | null | null | null | defmodule School do
@moduledoc """
Simulate students in a school.
Each student is in a grade.
"""
@doc """
Add a student to a particular grade in school.
"""
@spec add(map, String.t(), integer) :: map
def add(db, name, grade) do
students = [name | Map.get(db, grade, [])] |> Enum.sort()
Map.p... | 20.606061 | 61 | 0.598529 |
4a936310ff169b9131cd99c1948f9d868ccab961 | 1,818 | exs | Elixir | exercises/matrix/example.exs | jerith/elixir | 9a3f2a2fbee26a7b6a6b3ad74a9e6d1ff2495ed4 | [
"Apache-2.0"
] | 2 | 2019-07-09T05:23:38.000Z | 2019-07-29T01:39:59.000Z | exercises/matrix/example.exs | jerith/elixir | 9a3f2a2fbee26a7b6a6b3ad74a9e6d1ff2495ed4 | [
"Apache-2.0"
] | 1 | 2018-06-19T18:59:41.000Z | 2018-06-19T18:59:41.000Z | exercises/matrix/example.exs | jerith/elixir | 9a3f2a2fbee26a7b6a6b3ad74a9e6d1ff2495ed4 | [
"Apache-2.0"
] | 1 | 2018-07-19T23:43:56.000Z | 2018-07-19T23:43:56.000Z | defmodule Matrix do
defstruct matrix: nil, transposed_matrix: nil
@doc """
Convert an `input` string, with rows separated by newlines and values
separated by single spaces, into a `Matrix` struct.
"""
@spec from_string(input :: String.t()) :: %Matrix{}
def from_string(input) do
rows =
input
... | 28.40625 | 79 | 0.629813 |
4a9388b9bf67e42f4d60ebed4ffa6242da3bdd85 | 2,879 | ex | Elixir | clients/app_engine/lib/google_api/app_engine/v1/model/network.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/app_engine/lib/google_api/app_engine/v1/model/network.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/app_engine/lib/google_api/app_engine/v1/model/network.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | 1 | 2018-07-28T20:50:50.000Z | 2018-07-28T20:50:50.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 55.365385 | 975 | 0.77388 |
4a938e867ecc1edb588555c11950a8a916990310 | 197 | ex | Elixir | apps/diet_web/lib/diet_web/contextual_web_api/contextual_web_api.ex | isavita/diet-umbrella | 0eee4d0dc4d9567888e4b69ccc7993e95d95ed29 | [
"MIT"
] | 1 | 2020-06-01T21:25:54.000Z | 2020-06-01T21:25:54.000Z | apps/diet_web/lib/diet_web/contextual_web_api/contextual_web_api.ex | isavita/diet-umbrella | 0eee4d0dc4d9567888e4b69ccc7993e95d95ed29 | [
"MIT"
] | 221 | 2019-07-20T17:20:49.000Z | 2021-08-02T06:21:10.000Z | apps/diet_web/lib/diet_web/contextual_web_api/contextual_web_api.ex | isavita/diet-umbrella | 0eee4d0dc4d9567888e4b69ccc7993e95d95ed29 | [
"MIT"
] | null | null | null | defmodule DietWeb.ContextualWebApi do
@contextual_web_api Application.fetch_env!(:diet_web, :contextual_web_api)[:adapter]
def search(query) do
@contextual_web_api.search(query)
end
end
| 24.625 | 86 | 0.791878 |
4a93e97f8ba4dda5ea7bba4b5ac12a52a070ffff | 2,327 | exs | Elixir | test/controllers/user_controller_test.exs | noobiehacker/phoenixFilter | 42d913cc0b76b58ccbddf0a37b8f21dc6c639a3d | [
"Apache-2.0"
] | null | null | null | test/controllers/user_controller_test.exs | noobiehacker/phoenixFilter | 42d913cc0b76b58ccbddf0a37b8f21dc6c639a3d | [
"Apache-2.0"
] | null | null | null | test/controllers/user_controller_test.exs | noobiehacker/phoenixFilter | 42d913cc0b76b58ccbddf0a37b8f21dc6c639a3d | [
"Apache-2.0"
] | null | null | null | defmodule BluntApi.UserControllerTest do
use BluntApi.ConnCase
alias BluntApi.User
@valid_attrs %{email: "some content", name: "some content"}
@invalid_attrs %{}
test "lists all entries on index", %{conn: conn} do
conn = get conn, user_path(conn, :index)
assert html_response(conn, 200) =~ "Listing u... | 34.731343 | 98 | 0.676407 |
4a943487dcbcc49f09a15428f46c3d4f88ccce37 | 3,291 | exs | Elixir | config/ex_admin_config.exs | santiment/sanbase2 | 9ef6e2dd1e377744a6d2bba570ea6bd477a1db31 | [
"MIT"
] | 81 | 2017-11-20T01:20:22.000Z | 2022-03-05T12:04:25.000Z | config/ex_admin_config.exs | rmoorman/sanbase2 | 226784ab43a24219e7332c49156b198d09a6dd85 | [
"MIT"
] | 359 | 2017-10-15T14:40:53.000Z | 2022-01-25T13:34:20.000Z | config/ex_admin_config.exs | rmoorman/sanbase2 | 226784ab43a24219e7332c49156b198d09a6dd85 | [
"MIT"
] | 16 | 2017-11-19T13:57:40.000Z | 2022-02-07T08:13:02.000Z | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
import Config
config :ex_admin,
repo: Sanbase.Repo,
theme: ExAdmin.Theme.AdminLte2,
# MyProjec... | 41.658228 | 72 | 0.797934 |
4a944e32721884e13fe09f031cc72e6af53401db | 2,574 | ex | Elixir | lib/militerm/components/ephemeral_flag.ex | jgsmith/militerm | c4252d0a93f5620b90750ac2b61baf282e9ef7eb | [
"Apache-2.0"
] | 6 | 2017-06-16T10:26:35.000Z | 2021-04-07T15:01:00.000Z | lib/militerm/components/ephemeral_flag.ex | jgsmith/militerm | c4252d0a93f5620b90750ac2b61baf282e9ef7eb | [
"Apache-2.0"
] | 2 | 2020-04-14T02:17:46.000Z | 2021-03-10T11:09:05.000Z | lib/militerm/components/ephemeral_flag.ex | jgsmith/militerm | c4252d0a93f5620b90750ac2b61baf282e9ef7eb | [
"Apache-2.0"
] | null | null | null | defmodule Militerm.Components.EphemeralFlag do
use Militerm.ECS.Component, default: MapSet.new(), ephemeral: true
@moduledoc """
Ephemeral flags are used during run-time and aren't appropriate for saving across restarts.
These are useful to coordinate command execution.
"""
require Logger
def set_value... | 25.74 | 98 | 0.587024 |
4a9454f0366cf537598665563d41ad84df1c0c5d | 96 | exs | Elixir | config/config.exs | objectuser/dart_sass | 842650dbfe23a302ad8d10e674e7d6f189b17b46 | [
"MIT"
] | null | null | null | config/config.exs | objectuser/dart_sass | 842650dbfe23a302ad8d10e674e7d6f189b17b46 | [
"MIT"
] | null | null | null | config/config.exs | objectuser/dart_sass | 842650dbfe23a302ad8d10e674e7d6f189b17b46 | [
"MIT"
] | null | null | null | import Config
config :dart_sass,
version: "1.38.1",
another: [
args: ["--version"]
]
| 12 | 23 | 0.583333 |
4a945702a1e2bd68d2f22d890ac7424f7b77f555 | 568 | ex | Elixir | currency/lib/currency/cache.ex | ziminyuri/currency_exchange | 3d65d466a519816f606b16bb2f304db65105ca9a | [
"Apache-2.0"
] | null | null | null | currency/lib/currency/cache.ex | ziminyuri/currency_exchange | 3d65d466a519816f606b16bb2f304db65105ca9a | [
"Apache-2.0"
] | null | null | null | currency/lib/currency/cache.ex | ziminyuri/currency_exchange | 3d65d466a519816f606b16bb2f304db65105ca9a | [
"Apache-2.0"
] | null | null | null | defmodule Currency.Cache do
use GenServer
@name __MODULE__
def start_link(_), do: GenServer.start_link(__MODULE__, [], name: @name)
def init(_) do
:ets.new(:cache, [:public, :named_table])
Currency.JobScheduler.write_values()
{:ok, "ETS Created"}
end
def insert(currencies) do
for c <- cu... | 18.322581 | 74 | 0.616197 |
4a94771f94237bd3d1feb964569762843b9da4d5 | 11,781 | exs | Elixir | test/sap/combinators/client_error_test.exs | slogsdon/sap | 766f06cfac8a04772affd977a88d61210064e598 | [
"MIT"
] | 7 | 2015-10-25T16:38:45.000Z | 2020-01-12T19:06:57.000Z | test/sap/combinators/client_error_test.exs | slogsdon/sap | 766f06cfac8a04772affd977a88d61210064e598 | [
"MIT"
] | null | null | null | test/sap/combinators/client_error_test.exs | slogsdon/sap | 766f06cfac8a04772affd977a88d61210064e598 | [
"MIT"
] | null | null | null | defmodule Sap.Combinators.ClientErrorTest do
use ExUnit.Case, async: true
use Plug.Test
import Sap.Combinators.ClientError
test "bad_request without body" do
conn = conn(:get, "/")
resp = bad_request().(conn)
assert resp.status == :ok
refute resp.conn == conn
assert resp.conn.status == 400... | 26.064159 | 80 | 0.647398 |
4a9477469b95ba307272792d67d8a1fbd7cee642 | 925 | exs | Elixir | test/tds_encoding_test.exs | pulzze/tds-encoding | 749772874e9dc2e679f5c8de134de17e7556344f | [
"MIT"
] | null | null | null | test/tds_encoding_test.exs | pulzze/tds-encoding | 749772874e9dc2e679f5c8de134de17e7556344f | [
"MIT"
] | null | null | null | test/tds_encoding_test.exs | pulzze/tds-encoding | 749772874e9dc2e679f5c8de134de17e7556344f | [
"MIT"
] | null | null | null | defmodule TdsEncodingTest do
use ExUnit.Case
import Tds.Encoding
doctest Tds.Encoding
test "should decode string correctly" do
assert "caf\u00e9" == decode(<<99, 97, 102, 233>>, "iso-8859-1")
assert "Hello, 世界!" ==
decode(<<72, 101, 108, 108, 111, 44, 32, 225, 166, 205, 163, 33>>, "window... | 38.541667 | 94 | 0.612973 |
4a948e501f0db5c19f127ce5d668a3e4b125702d | 388 | ex | Elixir | apps/testchain/lib/testchain/deployment/result.ex | makerdao/qa_backend_gateway | 38e9a3f3f4b66212f1ee9d38b3b698a2a1f9a809 | [
"Apache-2.0"
] | 1 | 2020-10-23T19:25:27.000Z | 2020-10-23T19:25:27.000Z | apps/testchain/lib/testchain/deployment/result.ex | makerdao/qa_backend_gateway | 38e9a3f3f4b66212f1ee9d38b3b698a2a1f9a809 | [
"Apache-2.0"
] | 5 | 2019-01-11T11:48:08.000Z | 2019-01-16T17:29:23.000Z | apps/testchain/lib/testchain/deployment/result.ex | makerdao/qa_backend_gateway | 38e9a3f3f4b66212f1ee9d38b3b698a2a1f9a809 | [
"Apache-2.0"
] | 7 | 2019-10-09T05:49:52.000Z | 2022-03-23T16:48:45.000Z | defmodule Staxx.Testchain.Deployment.Result do
@moduledoc """
Default sctructure for deployment result.
"""
@type t :: %__MODULE__{
request_id: binary,
git_ref: binary,
step_id: binary,
result: map
}
@derive Jason.Encoder
defstruct request_id: "",
... | 20.421053 | 46 | 0.546392 |
4a94fc20fd74fd0ce5787241279c558a49017864 | 64 | ex | Elixir | lib/mibli_web/views/user_session_view.ex | FabriDamazio/mibli | 853fe5e7575040fdbade5ed5997465a68bcc529d | [
"MIT"
] | null | null | null | lib/mibli_web/views/user_session_view.ex | FabriDamazio/mibli | 853fe5e7575040fdbade5ed5997465a68bcc529d | [
"MIT"
] | null | null | null | lib/mibli_web/views/user_session_view.ex | FabriDamazio/mibli | 853fe5e7575040fdbade5ed5997465a68bcc529d | [
"MIT"
] | null | null | null | defmodule MibliWeb.UserSessionView do
use MibliWeb, :view
end
| 16 | 37 | 0.8125 |
4a950a7b781fff76c4d4e2439321e087a86a7880 | 18,159 | ex | Elixir | lib/scaffolding/behaviours/schema_info.ex | noizu-labs/advanced_elixir_scaffolding | 9e7a1199a4b25fcc16fc5a795104b926d2f238df | [
"MIT"
] | null | null | null | lib/scaffolding/behaviours/schema_info.ex | noizu-labs/advanced_elixir_scaffolding | 9e7a1199a4b25fcc16fc5a795104b926d2f238df | [
"MIT"
] | null | null | null | lib/scaffolding/behaviours/schema_info.ex | noizu-labs/advanced_elixir_scaffolding | 9e7a1199a4b25fcc16fc5a795104b926d2f238df | [
"MIT"
] | null | null | null | #-------------------------------------------------------------------------------
# Author: Keith Brings <keith.brings@noizu.com>
# Copyright (C) 2021 Noizu Labs Inc. All rights reserved.
#-------------------------------------------------------------------------------
defmodule Noizu.DomainObject.SchemaInfo do
@modu... | 39.220302 | 185 | 0.591552 |
4a952f7be1afa988aad0ebda491f474b495b52e4 | 349 | ex | Elixir | lib/supabase_surface/components/icons/icon_chevrons_up.ex | treebee/supabase-surface | 5a184ca92323c085dd81e2fc8aa8c10367f2382e | [
"Apache-2.0"
] | 5 | 2021-06-08T08:02:43.000Z | 2022-02-09T23:13:46.000Z | lib/supabase_surface/components/icons/icon_chevrons_up.ex | treebee/supabase-surface | 5a184ca92323c085dd81e2fc8aa8c10367f2382e | [
"Apache-2.0"
] | null | null | null | lib/supabase_surface/components/icons/icon_chevrons_up.ex | treebee/supabase-surface | 5a184ca92323c085dd81e2fc8aa8c10367f2382e | [
"Apache-2.0"
] | 1 | 2021-07-14T05:20:31.000Z | 2021-07-14T05:20:31.000Z | defmodule SupabaseSurface.Components.Icons.IconChevronsUp do
use SupabaseSurface.Components.Icon
@impl true
def render(assigns) do
icon_size = IconContainer.get_size(assigns.size)
~F"""
<IconContainer assigns={assigns}>
{Feathericons.chevrons_up(width: icon_size, height: icon_size)}
</Icon... | 23.266667 | 69 | 0.724928 |
4a95af5fa34b10f0cd98d66d715df1db2a13dd73 | 1,129 | exs | Elixir | config/config.exs | validere-ben/ex_aws_ecs | 369d258fcea96aeaacb0895123dfa124b557695b | [
"MIT"
] | 3 | 2019-01-10T14:13:38.000Z | 2020-08-29T18:43:11.000Z | config/config.exs | validere-ben/ex_aws_ecs | 369d258fcea96aeaacb0895123dfa124b557695b | [
"MIT"
] | 2 | 2020-02-14T21:19:18.000Z | 2020-09-01T03:56:41.000Z | config/config.exs | validere-ben/ex_aws_ecs | 369d258fcea96aeaacb0895123dfa124b557695b | [
"MIT"
] | 2 | 2019-01-21T18:11:16.000Z | 2019-06-17T17:19:59.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... | 36.419355 | 73 | 0.752879 |
4a95b02189a5a026847029a71fd0dbfcfe61a7d4 | 982 | ex | Elixir | apps/tai/lib/tai/events/sub_free_account.ex | chrism2671/tai-1 | 847827bd23908adfad4a82c83d5295bdbc022796 | [
"MIT"
] | null | null | null | apps/tai/lib/tai/events/sub_free_account.ex | chrism2671/tai-1 | 847827bd23908adfad4a82c83d5295bdbc022796 | [
"MIT"
] | null | null | null | apps/tai/lib/tai/events/sub_free_account.ex | chrism2671/tai-1 | 847827bd23908adfad4a82c83d5295bdbc022796 | [
"MIT"
] | 1 | 2020-05-03T23:32:11.000Z | 2020-05-03T23:32:11.000Z | defmodule Tai.Events.SubFreeAccount do
alias __MODULE__
@type venue_id :: Tai.Venues.Adapter.venue_id()
@type credential_id :: Tai.Venues.Adapter.credential_id()
@type t :: %SubFreeAccount{
venue_id: venue_id,
credential_id: credential_id,
asset: atom,
val: Decimal.t(),
... | 20.893617 | 67 | 0.601833 |
4a95f56641d2bf1b9dad9f25ffc9a898857151df | 274 | ex | Elixir | lib/wanon/quotes/quote.ex | graffic/wanon-elixir | 65fcde17cbbeb1af3fda5f6423dba112dfa3b9a9 | [
"MIT"
] | 1 | 2018-11-28T07:44:28.000Z | 2018-11-28T07:44:28.000Z | lib/wanon/quotes/quote.ex | graffic/wanon-elixir | 65fcde17cbbeb1af3fda5f6423dba112dfa3b9a9 | [
"MIT"
] | 1 | 2018-10-24T20:59:09.000Z | 2018-10-24T20:59:09.000Z | lib/wanon/quotes/quote.ex | graffic/wanon-elixir | 65fcde17cbbeb1af3fda5f6423dba112dfa3b9a9 | [
"MIT"
] | null | null | null | defmodule Wanon.Quotes.Quote do
use Ecto.Schema
schema "quote" do
# User map https://core.telegram.org/bots/api#user
field(:creator, :map)
field(:chat_id, :integer)
has_many(:entries, Wanon.Quotes.QuoteEntry)
timestamps(updated_at: false)
end
end
| 22.833333 | 54 | 0.70073 |
4a95f6b64ac9d61d5cf543f23f53c80c3f3d25d3 | 1,081 | ex | Elixir | test/support/conn_case.ex | xtagon/chatsnek | a2bc762da02467631d17ddc8b47217f4a49b740b | [
"MIT"
] | 3 | 2020-12-13T15:24:40.000Z | 2021-09-22T17:45:40.000Z | test/support/conn_case.ex | xtagon/chatsnek | a2bc762da02467631d17ddc8b47217f4a49b740b | [
"MIT"
] | 8 | 2020-12-14T01:25:44.000Z | 2021-10-03T16:12:23.000Z | test/support/conn_case.ex | xtagon/chatsnek | a2bc762da02467631d17ddc8b47217f4a49b740b | [
"MIT"
] | null | null | null | defmodule ChatSnekWeb.ConnCase do
@moduledoc """
This module defines the test case to be used by
tests that require setting up a connection.
Such tests rely on `Phoenix.ConnTest` and also
import other functionality to make it easier
to build common data structures and query the data layer.
Finally, if t... | 28.447368 | 62 | 0.73543 |
4a960b7d0859993264e6725eb268f43dbf96847e | 314 | ex | Elixir | lib/screens/config/solari/section/audio.ex | mbta/screens | 4b586970f8844b19543bb2ffd4b032a89f6fa40a | [
"MIT"
] | 3 | 2021-07-27T14:11:00.000Z | 2022-01-03T14:16:43.000Z | lib/screens/config/solari/section/audio.ex | mbta/screens | 4b586970f8844b19543bb2ffd4b032a89f6fa40a | [
"MIT"
] | 444 | 2021-03-10T20:57:17.000Z | 2022-03-31T16:00:35.000Z | lib/screens/config/solari/section/audio.ex | mbta/screens | 4b586970f8844b19543bb2ffd4b032a89f6fa40a | [
"MIT"
] | null | null | null | defmodule Screens.Config.Solari.Section.Audio do
@moduledoc false
@type t :: %__MODULE__{
wayfinding: String.t() | nil
}
defstruct wayfinding: nil
use Screens.Config.Struct, with_default: true
defp value_from_json(_, value), do: value
defp value_to_json(_, value), do: value
end
| 19.625 | 48 | 0.687898 |
4a961304458ef57a197b48f899f084369f104de0 | 407 | ex | Elixir | lib/portmidi/nifs/output.ex | bwanab/ex-portmidi | 9e10a5ff007ebef81c5212dbfb65b4bd90e49daa | [
"MIT"
] | 36 | 2016-03-28T15:01:18.000Z | 2021-09-11T02:41:31.000Z | lib/portmidi/nifs/output.ex | bwanab/ex-portmidi | 9e10a5ff007ebef81c5212dbfb65b4bd90e49daa | [
"MIT"
] | 15 | 2016-05-29T13:01:33.000Z | 2021-11-18T18:24:23.000Z | lib/portmidi/nifs/output.ex | bwanab/ex-portmidi | 9e10a5ff007ebef81c5212dbfb65b4bd90e49daa | [
"MIT"
] | 11 | 2016-05-19T15:37:49.000Z | 2020-12-13T21:34:07.000Z | defmodule PortMidi.Nifs.Output do
@on_load {:init, 0}
def init do
:ok = :portmidi
|> :code.priv_dir
|> :filename.join("portmidi_out")
|> :erlang.load_nif(0)
end
def do_open(_device_name, _latency), do:
raise "NIF library not loaded"
def do_write(_stream, _message), do:
raise "NIF li... | 20.35 | 42 | 0.660934 |
4a9631b3a4c25ceb90983179e8ce70cc462228cc | 2,680 | ex | Elixir | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1p1beta1__text_segment.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1p1beta1__text_segment.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1p1beta1__text_segment.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... | 37.746479 | 206 | 0.743657 |
4a964f9a5bc7920abfc54d9880bc1fe0a12459f5 | 3,055 | ex | Elixir | clients/android_management/lib/google_api/android_management/v1/model/hardware_status.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/android_management/lib/google_api/android_management/v1/model/hardware_status.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/android_management/lib/google_api/android_management/v1/model/hardware_status.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... | 47 | 231 | 0.706383 |
4a9667af3339c474cb1409c2cb2267296e7e2f37 | 1,471 | ex | Elixir | clients/tool_results/lib/google_api/tool_results/v1beta3/model/used_robo_directive.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/tool_results/lib/google_api/tool_results/v1beta3/model/used_robo_directive.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/tool_results/lib/google_api/tool_results/v1beta3/model/used_robo_directive.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... | 31.297872 | 101 | 0.743712 |
4a96691c0bd32a0b146670de31cf6947af3df1d2 | 11,155 | ex | Elixir | clients/manufacturers/lib/google_api/manufacturers/v1/model/attributes.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/manufacturers/lib/google_api/manufacturers/v1/model/attributes.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/manufacturers/lib/google_api/manufacturers/v1/model/attributes.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... | 71.967742 | 257 | 0.697893 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.