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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6245cdca1f28d93d2b0e652cee107a1cb9f38f91 | 1,887 | ex | Elixir | lib/faker/name.ex | forksss/faker | 380ca7d5f5be6a43fdbbe471ee96a60cd7c706fe | [
"MIT"
] | 2 | 2016-04-23T15:09:51.000Z | 2017-03-02T12:04:42.000Z | lib/faker/name.ex | batate/faker | b352ea8254ddf3185ce2839f91c862605e8a0498 | [
"MIT"
] | null | null | null | lib/faker/name.ex | batate/faker | b352ea8254ddf3185ce2839f91c862605e8a0498 | [
"MIT"
] | null | null | null | defmodule Faker.Name do
data_path = Path.expand(Path.join(__DIR__, "../../priv/name.json"))
{:ok, json} = File.read(data_path)
{:ok, json} = Poison.Parser.parse(json, [{:labels, :binary}])
Enum.each json, fn({lang, functions}) ->
Enum.each functions, fn({fun, list}) ->
defp unquote(String.to_atom("#{f... | 26.957143 | 103 | 0.674616 |
6245ceeef33f918ed2d360deb6c024fb46abce16 | 425 | exs | Elixir | test/magnemite/customers/gender_options_test.exs | andsleonardo/magnemite | 2a06c1520defeb193d718313ad3fc6a50349bc8d | [
"MIT"
] | null | null | null | test/magnemite/customers/gender_options_test.exs | andsleonardo/magnemite | 2a06c1520defeb193d718313ad3fc6a50349bc8d | [
"MIT"
] | null | null | null | test/magnemite/customers/gender_options_test.exs | andsleonardo/magnemite | 2a06c1520defeb193d718313ad3fc6a50349bc8d | [
"MIT"
] | null | null | null | defmodule Magnemite.Customers.GenderOptionsTest do
use ExUnit.Case, async: true
alias Magnemite.Customers.GenderOptions
describe "list/0" do
test "returns a list of gender options" do
assert GenderOptions.list() == [
:female,
:male,
:non_binary,
... | 22.368421 | 50 | 0.550588 |
62461e063aa3d5380af2ea1a4780e2d837d21c19 | 3,040 | ex | Elixir | lib/extensions/email_confirmation/phoenix/controllers/controller_callbacks.ex | dweremeichik/pow | 8c45624c1bf40487680abf5a077549fad2de2141 | [
"MIT"
] | null | null | null | lib/extensions/email_confirmation/phoenix/controllers/controller_callbacks.ex | dweremeichik/pow | 8c45624c1bf40487680abf5a077549fad2de2141 | [
"MIT"
] | null | null | null | lib/extensions/email_confirmation/phoenix/controllers/controller_callbacks.ex | dweremeichik/pow | 8c45624c1bf40487680abf5a077549fad2de2141 | [
"MIT"
] | 1 | 2020-07-13T01:11:17.000Z | 2020-07-13T01:11:17.000Z | defmodule PowEmailConfirmation.Phoenix.ControllerCallbacks do
@moduledoc false
use Pow.Extension.Phoenix.ControllerCallbacks.Base
alias Plug.Conn
alias Pow.Plug
alias PowEmailConfirmation.Phoenix.{ConfirmationController, Mailer}
@impl true
def before_process(Pow.Phoenix.RegistrationController, :update, ... | 40 | 173 | 0.737829 |
62462ad603a2c34a33111534f344c720c7909e0e | 1,048 | ex | Elixir | test/support/channel_case.ex | tommcgurl/phoenix_elm_jukebox | de522b700f484e9b7f9f73a826695c0cf06472b5 | [
"MIT"
] | null | null | null | test/support/channel_case.ex | tommcgurl/phoenix_elm_jukebox | de522b700f484e9b7f9f73a826695c0cf06472b5 | [
"MIT"
] | null | null | null | test/support/channel_case.ex | tommcgurl/phoenix_elm_jukebox | de522b700f484e9b7f9f73a826695c0cf06472b5 | [
"MIT"
] | null | null | null | defmodule PhoenixElmJukebox.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 and query models.
Finally, if the test case interacts with the database,
it c... | 23.818182 | 79 | 0.714695 |
62465702b6ccc5da8b2114e3346ee7a723e459d1 | 839 | ex | Elixir | lib/commodity/elastic/index.ex | akdilsiz/commodity-cloud | 08c366c9fc95fbb3565131672db4cc52f8b870c9 | [
"Apache-2.0"
] | 7 | 2019-04-11T21:12:49.000Z | 2021-04-14T12:56:42.000Z | lib/commodity/elastic/index.ex | akdilsiz/commodity-cloud | 08c366c9fc95fbb3565131672db4cc52f8b870c9 | [
"Apache-2.0"
] | null | null | null | lib/commodity/elastic/index.ex | akdilsiz/commodity-cloud | 08c366c9fc95fbb3565131672db4cc52f8b870c9 | [
"Apache-2.0"
] | 2 | 2019-06-06T18:05:33.000Z | 2019-07-16T08:49:45.000Z | ##
# Copyright 2018 Abdulkadir DILSIZ
#
# 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... | 29.964286 | 77 | 0.702026 |
62465aaf4e51d8c82139b2d01cdf0db7e5a622b6 | 4,650 | ex | Elixir | lib/server.ex | Celeo/simple_irc_server | 090dfdff236c51216922733412339ef477fe43da | [
"MIT"
] | null | null | null | lib/server.ex | Celeo/simple_irc_server | 090dfdff236c51216922733412339ef477fe43da | [
"MIT"
] | null | null | null | lib/server.ex | Celeo/simple_irc_server | 090dfdff236c51216922733412339ef477fe43da | [
"MIT"
] | null | null | null | defmodule IRC.Server do
use GenServer
require Logger
# =============================================================================
# Internal API
# =============================================================================
@impl true
def init(state) do
{:ok, state}
end
@doc """
Process's... | 28.703704 | 88 | 0.606452 |
62465b69ff1c948322e5e58cb7503ca642e3e50e | 729 | ex | Elixir | lib/ambry/media/media_narrator.ex | doughsay/ambry | c04e855bf06a6b00b8053c6eacb2eac14a56a37c | [
"MIT"
] | 12 | 2021-09-30T20:51:49.000Z | 2022-01-27T04:09:32.000Z | lib/ambry/media/media_narrator.ex | doughsay/ambry | c04e855bf06a6b00b8053c6eacb2eac14a56a37c | [
"MIT"
] | 76 | 2021-10-01T05:45:11.000Z | 2022-03-28T04:12:39.000Z | lib/ambry/media/media_narrator.ex | doughsay/ambry | c04e855bf06a6b00b8053c6eacb2eac14a56a37c | [
"MIT"
] | 2 | 2021-10-04T19:27:28.000Z | 2022-01-13T22:36:38.000Z | defmodule Ambry.Media.MediaNarrator do
@moduledoc """
Join table between media and narrators.
"""
use Ecto.Schema
import Ecto.Changeset
alias Ambry.Media.Media
alias Ambry.Narrators.Narrator
schema "media_narrators" do
belongs_to :media, Media
belongs_to :narrator, Narrator
field :delet... | 20.25 | 62 | 0.698217 |
624661c3f5be4c351dab75bfe76d3fa5a5b898a7 | 6,304 | exs | Elixir | lib/mix/test/mix/umbrella_test.exs | knewter/elixir | 8310d62499e292d78d5c9d79d5d15a64e32fb738 | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/umbrella_test.exs | knewter/elixir | 8310d62499e292d78d5c9d79d5d15a64e32fb738 | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/umbrella_test.exs | knewter/elixir | 8310d62499e292d78d5c9d79d5d15a64e32fb738 | [
"Apache-2.0"
] | null | null | null | Code.require_file "../test_helper.exs", __DIR__
defmodule Mix.UmbrellaTest do
use MixTest.Case
test "compiles umbrella" do
in_fixture "umbrella_dep/deps/umbrella", fn ->
Mix.Project.in_project(:umbrella, ".", fn _ ->
Mix.Task.run "compile"
assert_received { :mix_shell, :info, ["==> bar"... | 30.019048 | 83 | 0.58106 |
62467705187ecac755a1e0cb0ca175817847b282 | 948 | ex | Elixir | lib/jeopardy/games/login.ex | ryoung786/jeopardy | 5558fc49013c5a22e556a0040cbc116aa8f63912 | [
"MIT"
] | null | null | null | lib/jeopardy/games/login.ex | ryoung786/jeopardy | 5558fc49013c5a22e556a0040cbc116aa8f63912 | [
"MIT"
] | 32 | 2020-06-08T14:50:46.000Z | 2021-01-01T05:40:44.000Z | lib/jeopardy/games/login.ex | ryoung786/jeopardy | 5558fc49013c5a22e556a0040cbc116aa8f63912 | [
"MIT"
] | null | null | null | defmodule Jeopardy.Games.Login do
use Jeopardy.Games.Schema
import Ecto.Changeset
embedded_schema do
field :name, :string, null: false, size: 25
field :code, :string, null: false, size: 4
end
@doc false
def changeset(%Jeopardy.Games.Login{} = login \\ %Jeopardy.Games.Login{}, attrs \\ %{}) do
... | 32.689655 | 92 | 0.660338 |
62468a18da3a49351c3c7cb0aa63e20664ad72fa | 438 | ex | Elixir | server/lib/events_app/comments/comment.ex | kylesmith-1/blazeneu | 83cb68b8112bac8d51c9f92e709720d7e7ba1472 | [
"MIT"
] | null | null | null | server/lib/events_app/comments/comment.ex | kylesmith-1/blazeneu | 83cb68b8112bac8d51c9f92e709720d7e7ba1472 | [
"MIT"
] | null | null | null | server/lib/events_app/comments/comment.ex | kylesmith-1/blazeneu | 83cb68b8112bac8d51c9f92e709720d7e7ba1472 | [
"MIT"
] | 1 | 2021-04-10T18:37:30.000Z | 2021-04-10T18:37:30.000Z | defmodule CompanyTest.Comments.Comment do
use Ecto.Schema
import Ecto.Changeset
schema "comments" do
field :body, :string
belongs_to :company, CompanyTest.Companies.Company
belongs_to :user, CompanyTest.Users.User
timestamps()
end
@doc false
def changeset(comment, attrs) do
comment
... | 20.857143 | 57 | 0.69863 |
6246ccc8c5571eac08e1378940e8673d5f59cc96 | 227 | ex | Elixir | lib/exq_ui_web/live/dashboard_live.ex | snowflakes-network/ecq_ui | c6a9cef5ce10d501d2408bcd30e27f4e570d6fce | [
"Apache-2.0"
] | 125 | 2015-12-21T00:20:28.000Z | 2022-03-29T07:21:43.000Z | lib/exq_ui_web/live/dashboard_live.ex | snowflakes-network/ecq_ui | c6a9cef5ce10d501d2408bcd30e27f4e570d6fce | [
"Apache-2.0"
] | 81 | 2015-12-20T06:00:43.000Z | 2022-02-05T13:53:22.000Z | lib/exq_ui_web/live/dashboard_live.ex | snowflakes-network/ecq_ui | c6a9cef5ce10d501d2408bcd30e27f4e570d6fce | [
"Apache-2.0"
] | 87 | 2016-01-25T05:37:04.000Z | 2022-01-28T15:33:44.000Z | defmodule ExqUIWeb.DashboardLive do
use ExqUIWeb, :live_view
@impl true
def mount(_params, _session, socket) do
{:ok, socket}
end
@impl true
def handle_params(_, _, socket) do
{:noreply, socket}
end
end
| 16.214286 | 41 | 0.682819 |
62471ccb3dff9543237c1a744b3443da6678c7b9 | 3,716 | ex | Elixir | lib/eex/lib/eex/compiler.ex | guilleiguaran/elixir | 952052869ff7af0e293d2a7160b1aebc68fc46be | [
"Apache-2.0"
] | null | null | null | lib/eex/lib/eex/compiler.ex | guilleiguaran/elixir | 952052869ff7af0e293d2a7160b1aebc68fc46be | [
"Apache-2.0"
] | null | null | null | lib/eex/lib/eex/compiler.ex | guilleiguaran/elixir | 952052869ff7af0e293d2a7160b1aebc68fc46be | [
"Apache-2.0"
] | null | null | null | defrecord EEx.State, engine: EEx.SmartEngine, dict: [], file: "nofile", line: 1, start_line: 1
defmodule EEx.Compiler do
@moduledoc false
@doc """
This is the compilation entry point. It glues the tokenizer
and the engine together by handling the tokens and invoking
the engine every time a full expression o... | 33.178571 | 103 | 0.665501 |
62472dd113b02a4604ab0f03a93736667607f70a | 970 | exs | Elixir | reflow_controller/config/config.exs | harmon25/ReflowToaster | e38bb6dcff2be5a738b432897c4f46628c20cf26 | [
"Apache-2.0"
] | null | null | null | reflow_controller/config/config.exs | harmon25/ReflowToaster | e38bb6dcff2be5a738b432897c4f46628c20cf26 | [
"Apache-2.0"
] | null | null | null | reflow_controller/config/config.exs | harmon25/ReflowToaster | e38bb6dcff2be5a738b432897c4f46628c20cf26 | [
"Apache-2.0"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
use Mix.Config
# Configures the endpoint
config :reflow_controller, ReflowController.Web.Endpoint,
... | 33.448276 | 86 | 0.76701 |
62473499f18e007cc2995ca6c085a891bc2c1424 | 415 | ex | Elixir | lib/signon_accounts.ex | nikhilmore54/ofex | bc12ec2fe052bb32710c871d89ed5009f687eeaf | [
"MIT"
] | 6 | 2017-02-23T13:27:39.000Z | 2021-03-20T09:33:07.000Z | lib/signon_accounts.ex | nikhilmore54/ofex | bc12ec2fe052bb32710c871d89ed5009f687eeaf | [
"MIT"
] | 7 | 2017-03-17T15:19:31.000Z | 2018-10-13T03:12:00.000Z | lib/signon_accounts.ex | nikhilmore54/ofex | bc12ec2fe052bb32710c871d89ed5009f687eeaf | [
"MIT"
] | 5 | 2017-04-18T23:03:29.000Z | 2020-01-26T14:01:35.000Z | defmodule Ofex.SignonAccounts do
import SweetXml
@spec create(binary) :: [%{account: %{}}]
def create(ofx_data) do
ofx_data |> xpath(~x"//ACCTINFO"l) |> Enum.map(&parse_account/1)
end
defp parse_account(account_data) do
case xpath(account_data, ~x"//CCACCTINFO"l) do
[] -> Ofex.BankAccount.crea... | 25.9375 | 68 | 0.686747 |
62474064890ad43f06944fd2c961e39d01e3c5e3 | 948 | ex | Elixir | lib/rmc/application.ex | robbyronk/race-control | f44922cb151c04ccf0e30fa226e49323c537ce2b | [
"Apache-2.0"
] | null | null | null | lib/rmc/application.ex | robbyronk/race-control | f44922cb151c04ccf0e30fa226e49323c537ce2b | [
"Apache-2.0"
] | null | null | null | lib/rmc/application.ex | robbyronk/race-control | f44922cb151c04ccf0e30fa226e49323c537ce2b | [
"Apache-2.0"
] | null | null | null | defmodule Rmc.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 applic... | 30.580645 | 81 | 0.71097 |
62475d0fdaa05fed5a667e7ffbf1a886a0bb534a | 3,866 | ex | Elixir | clients/you_tube/lib/google_api/you_tube/v3/api/sponsors.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/you_tube/lib/google_api/you_tube/v3/api/sponsors.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/you_tube/lib/google_api/you_tube/v3/api/sponsors.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... | 46.02381 | 252 | 0.671754 |
62476d4c7f9fad98e1a9e7d031a9d96554a87d71 | 332 | ex | Elixir | lib/mongo/auth/x509.ex | hauleth/mongodb | d1be214cb38494bfd2cb861628526b853e7b776f | [
"Apache-2.0"
] | 286 | 2017-06-06T04:21:31.000Z | 2021-09-11T16:37:59.000Z | lib/mongo/auth/x509.ex | hauleth/mongodb | d1be214cb38494bfd2cb861628526b853e7b776f | [
"Apache-2.0"
] | 202 | 2017-05-28T13:22:01.000Z | 2020-05-15T20:15:51.000Z | lib/mongo/auth/x509.ex | hauleth/mongodb | d1be214cb38494bfd2cb861628526b853e7b776f | [
"Apache-2.0"
] | 120 | 2016-12-16T17:05:12.000Z | 2020-05-15T16:20:17.000Z | defmodule Mongo.Auth.X509 do
@moduledoc false
import Mongo.Protocol.Utils
def auth({username, _password}, s) do
cmd = [authenticate: 1, user: username, mechanism: "MONGODB-X509"]
with {:ok, _message} <- command(-2, cmd, s) do
:ok
else
_error ->
{:error, "X509 auth failed"}
en... | 20.75 | 70 | 0.61747 |
624773ada963d588700e7c4ff4cbffbc3446400e | 429 | exs | Elixir | src/003/p003.exs | murilocamargos/polyglot-euler | cbc48d2542a3c44b2fa2714decad961be6074233 | [
"MIT"
] | null | null | null | src/003/p003.exs | murilocamargos/polyglot-euler | cbc48d2542a3c44b2fa2714decad961be6074233 | [
"MIT"
] | null | null | null | src/003/p003.exs | murilocamargos/polyglot-euler | cbc48d2542a3c44b2fa2714decad961be6074233 | [
"MIT"
] | null | null | null | #!/usr/bin/env elixir
defmodule Problem003 do
defp prime?(x) when x in [2, 3, 7, 11, 13, 17], do: true
defp prime?(x) do
Enum.all?((2..round(:math.sqrt(x))), fn(n) -> rem(x, n) != 0 end)
end
defp factors(n) do
1..round(:math.sqrt(n))
|> Enum.filter(fn(x) -> rem(n, x) == 0 end)
end
def solve do... | 20.428571 | 69 | 0.582751 |
62479fa64abdbc6b7d36fbd4d6cb9c66e2360c10 | 4,367 | ex | Elixir | lib/vintage_net_qmi/connection.ex | nerves-networking/vintage_net_qmi | 228baec658befc83ec72e24a8ec9b003c8df668c | [
"Apache-2.0"
] | 3 | 2021-05-28T00:43:55.000Z | 2022-02-05T00:45:35.000Z | lib/vintage_net_qmi/connection.ex | nerves-networking/vintage_net_qmi | 228baec658befc83ec72e24a8ec9b003c8df668c | [
"Apache-2.0"
] | 12 | 2021-06-30T18:37:16.000Z | 2022-02-11T12:40:36.000Z | lib/vintage_net_qmi/connection.ex | nerves-networking/vintage_net_qmi | 228baec658befc83ec72e24a8ec9b003c8df668c | [
"Apache-2.0"
] | null | null | null | defmodule VintageNetQMI.Connection do
@moduledoc """
Establish an connection with the QMI device
"""
use GenServer
alias QMI.WirelessData
alias VintageNet.PropertyTable
alias VintageNetQMI.ServiceProvider
require Logger
@configure_connection_stats_retry 10_000
@typedoc """
Options for to esta... | 27.639241 | 136 | 0.688115 |
6247bbaff1ca2554fe65d5a272b994ae7dd675e3 | 3,704 | exs | Elixir | test/controllers/retro_controller_test.exs | octosteve/remote_retro | 3385b0db3c2daab934ce12a2f7642a5f10ac5147 | [
"MIT"
] | 523 | 2017-03-15T15:21:11.000Z | 2022-03-14T03:04:18.000Z | test/controllers/retro_controller_test.exs | octosteve/remote_retro | 3385b0db3c2daab934ce12a2f7642a5f10ac5147 | [
"MIT"
] | 524 | 2017-03-16T18:31:09.000Z | 2022-02-26T10:02:06.000Z | test/controllers/retro_controller_test.exs | octosteve/remote_retro | 3385b0db3c2daab934ce12a2f7642a5f10ac5147 | [
"MIT"
] | 60 | 2017-05-01T18:02:28.000Z | 2022-03-04T21:04:56.000Z | defmodule RemoteRetro.RetroControllerTest do
use RemoteRetroWeb.ConnCase, async: true
alias RemoteRetro.{Participation, Retro, Repo}
import ShorterMaps
describe "authenticated requests" do
setup :authenticate_connection
test "POST requests to /retros result in the creation of a retro \
of the g... | 34.616822 | 109 | 0.687365 |
6247cb5904b483c7c55c0dcbb369e39b095764f4 | 3,107 | ex | Elixir | lib/ksuid.ex | thanos/elixir-ksuid | f4ef601331f74529ae531aaf27c7860f00143edf | [
"MIT"
] | null | null | null | lib/ksuid.ex | thanos/elixir-ksuid | f4ef601331f74529ae531aaf27c7860f00143edf | [
"MIT"
] | null | null | null | lib/ksuid.ex | thanos/elixir-ksuid | f4ef601331f74529ae531aaf27c7860f00143edf | [
"MIT"
] | 1 | 2021-10-09T15:09:27.000Z | 2021-10-09T15:09:27.000Z | defmodule Ksuid do
@moduledoc """
KSuid stands for K-Sortable Unique Identifier. It's a way to generate globally unique
IDs which are partially chronologically sortable.
"""
@epoch 1400000000
@payload_length 16
@ksuid_raw_length 20
@ksuid_encoded_length 27
@parse_error "the value given is more than... | 27.741071 | 130 | 0.691986 |
6247e992c5b843223f88cb6dbb5a30fa1448af40 | 2,454 | ex | Elixir | lib/koans/04_numbers.ex | tkling/elixir-koans-solutions | e591d38de0c048c036008f32e521b681d87ff706 | [
"MIT"
] | null | null | null | lib/koans/04_numbers.ex | tkling/elixir-koans-solutions | e591d38de0c048c036008f32e521b681d87ff706 | [
"MIT"
] | null | null | null | lib/koans/04_numbers.ex | tkling/elixir-koans-solutions | e591d38de0c048c036008f32e521b681d87ff706 | [
"MIT"
] | null | null | null | defmodule Numbers do
require Integer
use Koans
@intro "Why is the number six so scared? Because seven eight nine!\nWe should get to know numbers a bit more!"
koan "Are you odd?" do
assert Integer.is_odd(3) == true
end
koan "Actually you might be even" do
assert Integer.is_even(4) == true
end
... | 24.29703 | 112 | 0.640587 |
6247ecf4d9c17929f4b6a504c12c6ce02b19a7b5 | 437 | ex | Elixir | lib/parser/shell.ex | pobo380/elixir-thrift | 79db211574f4a91ef0563c187eed69c9aeee6bf3 | [
"Apache-2.0"
] | null | null | null | lib/parser/shell.ex | pobo380/elixir-thrift | 79db211574f4a91ef0563c187eed69c9aeee6bf3 | [
"Apache-2.0"
] | null | null | null | lib/parser/shell.ex | pobo380/elixir-thrift | 79db211574f4a91ef0563c187eed69c9aeee6bf3 | [
"Apache-2.0"
] | 2 | 2018-03-28T08:16:17.000Z | 2021-06-24T08:46:09.000Z | defmodule Thrift.Parser.Shell do
@moduledoc """
Utility for writing output to the shell.
"""
@yellow IO.ANSI.yellow()
@red IO.ANSI.red()
@reset IO.ANSI.reset()
@doc """
Emits a warning to the shell in a yellow color
"""
def warn(msg) do
IO.puts("#{@yellow}#{msg}#{@reset}")
end
@doc """
... | 18.208333 | 48 | 0.601831 |
6248025d4176ce6290d7326666359961ed263591 | 908 | ex | Elixir | currency/lib/currency_web/controllers/page_controller.ex | ziminyuri/currency_exchange | 3d65d466a519816f606b16bb2f304db65105ca9a | [
"Apache-2.0"
] | null | null | null | currency/lib/currency_web/controllers/page_controller.ex | ziminyuri/currency_exchange | 3d65d466a519816f606b16bb2f304db65105ca9a | [
"Apache-2.0"
] | null | null | null | currency/lib/currency_web/controllers/page_controller.ex | ziminyuri/currency_exchange | 3d65d466a519816f606b16bb2f304db65105ca9a | [
"Apache-2.0"
] | null | null | null | defmodule CurrencyWeb.PageController do
use CurrencyWeb, :controller
alias Currency.{Daily, Repo, Cache}
def index(conn, _params) do
table = Cache.all()
render conn, "index.html", currencies: table
end
def converter(conn, _params) do
table = Cache.all()
render conn, "converter.html", curre... | 29.290323 | 86 | 0.732379 |
62480375a6e59de2e7852b8936c97e6e425e7da8 | 477 | exs | Elixir | examples/config/test.exs | sntran/live_map | 9c1fa5b29c4af9d59ad464d45a0e884f5f90a048 | [
"MIT"
] | 3 | 2021-11-28T18:17:05.000Z | 2021-12-19T01:35:13.000Z | examples/config/test.exs | sntran/live_map | 9c1fa5b29c4af9d59ad464d45a0e884f5f90a048 | [
"MIT"
] | null | null | null | examples/config/test.exs | sntran/live_map | 9c1fa5b29c4af9d59ad464d45a0e884f5f90a048 | [
"MIT"
] | null | null | null | import Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :live_maps, LiveMapsWeb.Endpoint,
http: [ip: {127, 0, 0, 1}, port: 4002],
secret_key_base: "Tj/vFWGvsPiHXLVymNszS7nY817kJR4PsJxvFrsV2fPNAhJ4TT29x8oMqj36i2N1",
server: false
# Print only warnin... | 31.8 | 86 | 0.769392 |
62481ebffc4e1de5e8f54dcd51b9fd7417ab2adf | 276 | ex | Elixir | lib/binance/historical_trade.ex | dwarvesf/ex_binance | ed55e4b363c1cca54401b3b7d0e76c34e8797877 | [
"MIT"
] | 52 | 2018-01-16T23:38:06.000Z | 2022-02-14T11:05:47.000Z | lib/binance/historical_trade.ex | dwarvesf/ex_binance | ed55e4b363c1cca54401b3b7d0e76c34e8797877 | [
"MIT"
] | 56 | 2018-02-24T15:10:29.000Z | 2022-03-28T19:05:41.000Z | lib/binance/historical_trade.ex | dwarvesf/ex_binance | ed55e4b363c1cca54401b3b7d0e76c34e8797877 | [
"MIT"
] | 37 | 2018-01-20T14:56:56.000Z | 2022-03-03T20:18:30.000Z | defmodule Binance.HistoricalTrade do
@moduledoc """
Struct for representing the result returned by /api/v3/historicalTrades
"""
defstruct [
:id,
:price,
:qty,
:quote_qty,
:time,
:is_buyer_maker,
:is_best_match
]
use ExConstructor
end
| 15.333333 | 73 | 0.655797 |
6248658f506f0535f289373c0681daba612c4eab | 3,483 | ex | Elixir | lib/divo/compose.ex | Datastillery/divo | 67877742341dc8b53515339cfc4a33520a8da7c6 | [
"Apache-2.0"
] | 9 | 2020-12-15T02:55:51.000Z | 2021-08-10T18:13:54.000Z | lib/divo/compose.ex | Datastillery/divo | 67877742341dc8b53515339cfc4a33520a8da7c6 | [
"Apache-2.0"
] | 1 | 2021-05-25T20:12:18.000Z | 2021-07-21T18:19:02.000Z | lib/divo/compose.ex | Datastillery/divo | 67877742341dc8b53515339cfc4a33520a8da7c6 | [
"Apache-2.0"
] | 2 | 2020-11-04T04:20:52.000Z | 2021-08-10T17:47:14.000Z | defmodule Divo.Compose do
@moduledoc """
Implements the basic docker-compose commands for running from
your mix tasks. Run, stop, and kill container services.
These operations only apply to services managed by Divo, i.e. defined in
your Mix.env file under the `:myapp, :divo` key.
"""
require Logger
al... | 25.057554 | 107 | 0.63451 |
6248c96967205ee2108008c04997a6b5581b7f13 | 1,967 | ex | Elixir | clients/vision/lib/google_api/vision/v1/model/google_cloud_vision_v1p4beta1_async_batch_annotate_files_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/vision/lib/google_api/vision/v1/model/google_cloud_vision_v1p4beta1_async_batch_annotate_files_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/vision/lib/google_api/vision/v1/model/google_cloud_vision_v1p4beta1_async_batch_annotate_files_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 33.338983 | 198 | 0.75394 |
6248d8863496a5b4905c86d88fd5072b8ee861b2 | 1,009 | ex | Elixir | lib/forus/application.ex | finalclass/forus | f745d3ef63684b8fa61a904d4032b5ae26931943 | [
"MIT"
] | null | null | null | lib/forus/application.ex | finalclass/forus | f745d3ef63684b8fa61a904d4032b5ae26931943 | [
"MIT"
] | 1 | 2018-06-19T10:38:48.000Z | 2018-06-19T10:38:48.000Z | lib/forus/application.ex | finalclass/forus | f745d3ef63684b8fa61a904d4032b5ae26931943 | [
"MIT"
] | null | null | null | defmodule Forus.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 Ecto repository
... | 31.53125 | 83 | 0.709613 |
6248e92737e13eece90dcde60ee1a8c4d2adb540 | 5,576 | exs | Elixir | test/faktory_worker/job/job_test.exs | SeatedInc/faktory_worker | 13469c7208392454b83d6061ddd8e3195ae4cd7a | [
"MIT"
] | 17 | 2019-04-14T21:35:33.000Z | 2019-10-26T10:36:35.000Z | test/faktory_worker/job/job_test.exs | SeatedInc/faktory_worker | 13469c7208392454b83d6061ddd8e3195ae4cd7a | [
"MIT"
] | 75 | 2019-03-12T12:09:34.000Z | 2020-01-04T14:19:11.000Z | test/faktory_worker/job/job_test.exs | opt-elixir/faktory_worker | a4774dcef45da02c568003275b79d235be9beab5 | [
"MIT"
] | 2 | 2021-11-18T16:38:33.000Z | 2022-01-14T17:34:10.000Z | defmodule FaktoryWorker.Job.JobTest do
use ExUnit.Case, async: true
alias FaktoryWorker.Job
defmodule TestWorker do
use FaktoryWorker.Job,
queue: "test_queue",
concurrency: 10
def perform(_), do: :ok
end
defmodule OverridesWorker do
use FaktoryWorker.Job,
queue: "override_que... | 29.659574 | 91 | 0.607245 |
6248ef30a40a6321da998ba74dde5b3142db9505 | 2,468 | exs | Elixir | config/config.exs | mbta/realtime_signs | 3fd8cbc26ce2b0820e608e60fe12135dab5def69 | [
"MIT"
] | 1 | 2022-01-24T12:39:05.000Z | 2022-01-24T12:39:05.000Z | config/config.exs | mbta/realtime_signs | 3fd8cbc26ce2b0820e608e60fe12135dab5def69 | [
"MIT"
] | 40 | 2021-05-05T10:14:25.000Z | 2022-03-31T18:34:15.000Z | config/config.exs | mbta/realtime_signs | 3fd8cbc26ce2b0820e608e60fe12135dab5def69 | [
"MIT"
] | 1 | 2022-03-20T21:08:12.000Z | 2022-03-20T21:08:12.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... | 35.768116 | 89 | 0.76094 |
62494c2f45a26ae4140145aef02fb686c845104f | 13,282 | ex | Elixir | lib/photog/api/api.ex | allen-garvey/photog-react | c400174d0e456dcbfd565407eb85e8ce80ec59c0 | [
"MIT"
] | null | null | null | lib/photog/api/api.ex | allen-garvey/photog-react | c400174d0e456dcbfd565407eb85e8ce80ec59c0 | [
"MIT"
] | null | null | null | lib/photog/api/api.ex | allen-garvey/photog-react | c400174d0e456dcbfd565407eb85e8ce80ec59c0 | [
"MIT"
] | null | null | null | defmodule Photog.Api do
@moduledoc """
The Api context.
"""
import Ecto.Query, warn: false
alias Photog.Repo
alias Photog.Api.Folder
alias Photog.Api.Album
alias Photog.Api.AlbumImage
alias Photog.Api.PersonImage
@doc """
Returns the list of folders.
## Examples
iex> list_folders()
... | 20.308869 | 145 | 0.600437 |
624962b3137ce45b4c648dae02b47eb3049e32d8 | 8,013 | ex | Elixir | deps/gettext/lib/mix/tasks/gettext.merge.ex | rchervin/phoenixportfolio | a5a6a60168d7261647a10a8dbd395b440db8a4f9 | [
"MIT"
] | 1 | 2020-01-31T10:23:37.000Z | 2020-01-31T10:23:37.000Z | deps/gettext/lib/mix/tasks/gettext.merge.ex | rchervin/phoenixportfolio | a5a6a60168d7261647a10a8dbd395b440db8a4f9 | [
"MIT"
] | null | null | null | deps/gettext/lib/mix/tasks/gettext.merge.ex | rchervin/phoenixportfolio | a5a6a60168d7261647a10a8dbd395b440db8a4f9 | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.Gettext.Merge do
use Mix.Task
@recursive true
@shortdoc "Merge template files into translation files"
@moduledoc """
Merges PO/POT files with PO files.
This task is used when translations in the source code change: when they do,
`mix gettext.extract` is usually used to extract the n... | 32.706122 | 87 | 0.683389 |
62499472d98608b05c4a0ee7c93cb0a531468235 | 1,022 | ex | Elixir | lib/glimesh_web/live/user_live/components/tag_selector.ex | DeeRock94/glimesh.tv | e4517e4e3b03f98a3cab2d16b82f365e3b23fd9d | [
"MIT"
] | null | null | null | lib/glimesh_web/live/user_live/components/tag_selector.ex | DeeRock94/glimesh.tv | e4517e4e3b03f98a3cab2d16b82f365e3b23fd9d | [
"MIT"
] | null | null | null | lib/glimesh_web/live/user_live/components/tag_selector.ex | DeeRock94/glimesh.tv | e4517e4e3b03f98a3cab2d16b82f365e3b23fd9d | [
"MIT"
] | null | null | null | defmodule GlimeshWeb.UserLive.Components.TagSelector do
use GlimeshWeb, :live_component
@impl true
def render(assigns) do
~L"""
<div id="tagify" phx-update="replace">
<%= text_input @form, @field,
value: @existing_tags,
class: "tagify",
"data-category": @current_category_id,... | 26.205128 | 97 | 0.639922 |
6249a497278330fc10577406c3096ec96f1436e6 | 114 | ex | Elixir | lib/sisnuvempay/repo.ex | jairpro/nlw4-elixir_sisnuvempay | 5a1ca3f45f9396ce766bf147b45ace545e7704d4 | [
"MIT"
] | null | null | null | lib/sisnuvempay/repo.ex | jairpro/nlw4-elixir_sisnuvempay | 5a1ca3f45f9396ce766bf147b45ace545e7704d4 | [
"MIT"
] | null | null | null | lib/sisnuvempay/repo.ex | jairpro/nlw4-elixir_sisnuvempay | 5a1ca3f45f9396ce766bf147b45ace545e7704d4 | [
"MIT"
] | null | null | null | defmodule Sisnuvempay.Repo do
use Ecto.Repo,
otp_app: :sisnuvempay,
adapter: Ecto.Adapters.Postgres
end
| 19 | 35 | 0.745614 |
6249c39980cb104828529613286cc3c099ba295d | 2,179 | ex | Elixir | lib/torch/views/pagination_view.ex | mitchellhenke/torch | 2d0ab68f4e2d7f3bc37fbf7edbd1298b29b36e71 | [
"MIT"
] | null | null | null | lib/torch/views/pagination_view.ex | mitchellhenke/torch | 2d0ab68f4e2d7f3bc37fbf7edbd1298b29b36e71 | [
"MIT"
] | null | null | null | lib/torch/views/pagination_view.ex | mitchellhenke/torch | 2d0ab68f4e2d7f3bc37fbf7edbd1298b29b36e71 | [
"MIT"
] | null | null | null | defmodule Torch.PaginationView do
@moduledoc """
`Phoenix.View` to render pagination controls for Torch-generated index templates.
"""
use Phoenix.View, root: "lib/torch/templates"
use Phoenix.HTML
import Torch.Gettext, only: [dgettext: 2]
import Torch.TableView
@doc """
Generates a "< Prev" link t... | 25.635294 | 87 | 0.651216 |
6249dd49990a3b969dc85b0feecccb4b2037fcf9 | 119 | exs | Elixir | .formatter.exs | breachintelligence/ecto_ip_range | 8928f85041607f16a890905ddffc2cee582056a7 | [
"Apache-2.0"
] | 3 | 2019-11-14T00:10:40.000Z | 2022-01-20T18:12:44.000Z | .formatter.exs | breachintelligence/ecto_ip_range | 8928f85041607f16a890905ddffc2cee582056a7 | [
"Apache-2.0"
] | 1 | 2022-01-10T19:27:05.000Z | 2022-01-23T12:31:41.000Z | .formatter.exs | breachintelligence/ecto_ip_range | 8928f85041607f16a890905ddffc2cee582056a7 | [
"Apache-2.0"
] | 2 | 2020-11-23T07:51:22.000Z | 2022-01-09T22:15:20.000Z | [
import_deps: [:ecto_sql],
inputs: [
"{config,lib,priv,test}/**/*.{ex,exs}",
"{.formatter,mix}.exs"
]
]
| 14.875 | 43 | 0.521008 |
6249dfe82edb0a6115e7f2c0b32a1372196cd78a | 2,638 | ex | Elixir | clients/monitoring/lib/google_api/monitoring/v3/model/query_time_series_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/monitoring/lib/google_api/monitoring/v3/model/query_time_series_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/monitoring/lib/google_api/monitoring/v3/model/query_time_series_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 47.107143 | 251 | 0.745641 |
6249f0e0d32b689b55ba7b0378267ea0b08ff2d0 | 3,662 | ex | Elixir | lib/docomo_text_to_speech.ex | TORIFUKUKaiou/docomo_text_to_speech | d5ce75bf2875153d9261dfd30faffced261d6efe | [
"MIT"
] | 1 | 2021-06-16T22:20:10.000Z | 2021-06-16T22:20:10.000Z | lib/docomo_text_to_speech.ex | TORIFUKUKaiou/docomo_text_to_speech | d5ce75bf2875153d9261dfd30faffced261d6efe | [
"MIT"
] | 2 | 2020-10-04T03:02:10.000Z | 2020-10-12T11:23:13.000Z | lib/docomo_text_to_speech.ex | TORIFUKUKaiou/docomo_text_to_speech | d5ce75bf2875153d9261dfd30faffced261d6efe | [
"MIT"
] | 1 | 2020-10-04T02:48:35.000Z | 2020-10-04T02:48:35.000Z | defmodule DocomoTextToSpeech do
@moduledoc "README.md"
|> File.read!()
|> String.split("<!-- MDOC !-->")
|> Enum.fetch!(1)
use Tesla, only: [:post], docs: false
adapter Tesla.Adapter.Hackney
plug Tesla.Middleware.BaseUrl, "https://api.apigw.smt.docomo.ne.jp/futureVoiceCr... | 30.016393 | 95 | 0.594484 |
624a0b8b47992d168e48752a54c06c8045e0e3c2 | 5,959 | exs | Elixir | apps/blunt/test/blunt/testing/factories_test.exs | blunt-elixir/blunt | a88b88984022db7ba2110204248fdb541121e3a0 | [
"MIT"
] | 1 | 2022-03-07T11:54:47.000Z | 2022-03-07T11:54:47.000Z | apps/blunt/test/blunt/testing/factories_test.exs | elixir-cqrs/cqrs_tools | afbf82da522a10d2413547a46f316ed3aadebba5 | [
"MIT"
] | null | null | null | apps/blunt/test/blunt/testing/factories_test.exs | elixir-cqrs/cqrs_tools | afbf82da522a10d2413547a46f316ed3aadebba5 | [
"MIT"
] | null | null | null | defmodule Blunt.Testing.FactoriesTest do
use ExUnit.Case, async: true
@moduletag :skip
use Blunt.Testing.Factories
alias Support.Testing.{CreatePerson, GetPerson, PlainMessage, PlainMessage}
alias Support.Testing.LayzFactoryValueMessages.{CreatePolicyFee, CreatePolicy, CreateProduct}
factory GetPerson
... | 26.721973 | 118 | 0.638027 |
624a1e42ab56d972958250073fc9820ced9981bb | 125 | ex | Elixir | test/support/repo.ex | OnigiriJack/polymorphic_embed | 6ce9c868cc31c408b62f9d64bf3f9b9b860912a5 | [
"Apache-2.0"
] | 154 | 2020-05-30T17:39:33.000Z | 2022-03-30T10:35:14.000Z | test/support/repo.ex | OnigiriJack/polymorphic_embed | 6ce9c868cc31c408b62f9d64bf3f9b9b860912a5 | [
"Apache-2.0"
] | 49 | 2020-06-18T11:50:24.000Z | 2022-03-07T19:51:52.000Z | test/support/repo.ex | OnigiriJack/polymorphic_embed | 6ce9c868cc31c408b62f9d64bf3f9b9b860912a5 | [
"Apache-2.0"
] | 31 | 2020-06-18T11:30:44.000Z | 2022-03-07T06:38:27.000Z | defmodule PolymorphicEmbed.Repo do
use Ecto.Repo,
otp_app: :polymorphic_embed,
adapter: Ecto.Adapters.Postgres
end
| 20.833333 | 35 | 0.768 |
624a3fa94f7118bf7a7b89984f32eadd2b32846e | 1,978 | ex | Elixir | clients/game_services/lib/google_api/game_services/v1/model/list_realms_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/game_services/lib/google_api/game_services/v1/model/list_realms_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/game_services/lib/google_api/game_services/v1/model/list_realms_response.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.320755 | 157 | 0.721436 |
624a46e5a73e489f33a89ef79168126f3b6f69ee | 1,487 | exs | Elixir | code/protocols/midi_inspect.exs | alvarocamillont/introdu-o_elixir | 1d72d4f4b01d9312c4b066ce3c0fe8d9bfaaade1 | [
"MIT"
] | null | null | null | code/protocols/midi_inspect.exs | alvarocamillont/introdu-o_elixir | 1d72d4f4b01d9312c4b066ce3c0fe8d9bfaaade1 | [
"MIT"
] | 1 | 2021-03-09T16:27:25.000Z | 2021-03-09T16:27:25.000Z | programming-elixir-book/code/protocols/midi_inspect.exs | jordanhubbard/elixir-projects | dee341d672e83a45a17a4a85abd54a480f95c506 | [
"BSD-2-Clause"
] | null | null | null | #---
# Excerpted from "Programming Elixir ≥ 1.6",
# published by The Pragmatic Bookshelf.
# Copyrights apply to this code. It may not be used to create training material,
# courses, books, articles, and the like. Contact us if you are in doubt.
# We make no guarantees that this code is fit for any purpose.
# Visit http... | 30.346939 | 85 | 0.566913 |
624a4a911102cc912952c8b2094d17203a22fdaf | 2,479 | ex | Elixir | installer/lib/phx_new/umbrella.ex | faheempatel/phoenix | a83318f2a2284b7ab29b0b86cdd9d2e1f4d0a7c9 | [
"MIT"
] | 18,092 | 2015-01-01T01:51:04.000Z | 2022-03-31T19:37:14.000Z | installer/lib/phx_new/umbrella.ex | faheempatel/phoenix | a83318f2a2284b7ab29b0b86cdd9d2e1f4d0a7c9 | [
"MIT"
] | 3,905 | 2015-01-01T00:22:47.000Z | 2022-03-31T17:06:21.000Z | installer/lib/phx_new/umbrella.ex | faheempatel/phoenix | a83318f2a2284b7ab29b0b86cdd9d2e1f4d0a7c9 | [
"MIT"
] | 3,205 | 2015-01-03T10:58:22.000Z | 2022-03-30T14:55:57.000Z | defmodule Phx.New.Umbrella do
@moduledoc false
use Phx.New.Generator
alias Phx.New.{Ecto, Web, Project, Mailer}
template :new, [
{:eex, "phx_umbrella/gitignore", :project, ".gitignore"},
{:eex, "phx_umbrella/config/config.exs", :project, "config/config.exs"},
{:config, "ph... | 34.430556 | 86 | 0.606293 |
624a92468c1ec5fec6264b55505cf7e1627e4959 | 1,571 | ex | Elixir | lib/csv_uploader_web/endpoint.ex | jolyus/csv-uploader | ca29234a4b1bf1ab3f0760099b1bcd4f9aa8c354 | [
"MIT"
] | null | null | null | lib/csv_uploader_web/endpoint.ex | jolyus/csv-uploader | ca29234a4b1bf1ab3f0760099b1bcd4f9aa8c354 | [
"MIT"
] | null | null | null | lib/csv_uploader_web/endpoint.ex | jolyus/csv-uploader | ca29234a4b1bf1ab3f0760099b1bcd4f9aa8c354 | [
"MIT"
] | null | null | null | defmodule CsvUploaderWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :csv_uploader
socket "/socket", CsvUploaderWeb.UserSocket
# Serve at "/" the static files from "priv/static" directory.
#
# You should set gzip to true if you are running phoenix.digest
# when deploying your static files in production.
... | 28.563636 | 95 | 0.706556 |
624a966c051d68919e218cf65fb0821a833049cd | 10,855 | ex | Elixir | lib/mix/tasks/coh.clean.ex | henb/coherence | 725247353bad46df464caffa12b9ea2788fe774f | [
"MIT"
] | 2 | 2018-01-19T06:12:16.000Z | 2018-03-12T07:17:17.000Z | lib/mix/tasks/coh.clean.ex | henb/coherence | 725247353bad46df464caffa12b9ea2788fe774f | [
"MIT"
] | null | null | null | lib/mix/tasks/coh.clean.ex | henb/coherence | 725247353bad46df464caffa12b9ea2788fe774f | [
"MIT"
] | 1 | 2019-09-11T10:21:21.000Z | 2019-09-11T10:21:21.000Z | defmodule Mix.Tasks.Coh.Clean do
@moduledoc """
This task will clean most of the files installed by the `mix coh.install` task.
Projects created with both `coh.install` and `coherence.install` can be
cleaned with this task. It will auto detect the project structure and remove
the appropriate files.
## Exa... | 27.273869 | 132 | 0.634731 |
624a9d6c0631897c311aeadc7c1f4746bc170abe | 779 | ex | Elixir | apps/admin_api/lib/admin_api/v1/controllers/fallback_controller.ex | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 322 | 2018-02-28T07:38:44.000Z | 2020-05-27T23:09:55.000Z | apps/admin_api/lib/admin_api/v1/controllers/fallback_controller.ex | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 643 | 2018-02-28T12:05:20.000Z | 2020-05-22T08:34:38.000Z | apps/admin_api/lib/admin_api/v1/controllers/fallback_controller.ex | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 63 | 2018-02-28T10:57:06.000Z | 2020-05-27T23:10:38.000Z | # Copyright 2018-2019 OmiseGO Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 33.869565 | 74 | 0.767651 |
624abd5fc0896b8702f668d3385177f2d2a98ec3 | 594 | ex | Elixir | lib/lib_ten/accounts/users.ex | 10clouds/10Books | 622360ea190421e07d4b207700867be105894218 | [
"MIT"
] | 11 | 2018-08-29T15:59:09.000Z | 2021-08-25T16:35:13.000Z | lib/lib_ten/accounts/users.ex | fram74/10Books | 9e4e280032c7f7b9625c831efa9850d999327e53 | [
"MIT"
] | 16 | 2018-08-29T15:43:52.000Z | 2021-05-09T00:53:56.000Z | lib/lib_ten/accounts/users.ex | fram74/10Books | 9e4e280032c7f7b9625c831efa9850d999327e53 | [
"MIT"
] | 3 | 2019-05-29T14:22:59.000Z | 2020-06-06T12:30:54.000Z | defmodule LibTen.Accounts.Users do
import Ecto.Query, warn: false
alias LibTen.Repo
alias LibTen.Accounts.User
def list do
query = from u in User, order_by: [desc: u.is_admin]
Repo.all(query)
end
def get!(id), do: Repo.get!(User, id)
def create(attrs \\ %{}) do
%User{}
|> User.changeset... | 18 | 56 | 0.612795 |
624ad6ee35f1e20c03eefe8d83a1f5c724df4556 | 2,959 | exs | Elixir | test/integration/reservations/after_the_fact_test.exs | brownt23/crit19 | c45c7b3ae580c193168d83144da0eeb9bc91c8a9 | [
"MIT"
] | 6 | 2019-07-16T19:31:23.000Z | 2021-06-05T19:01:05.000Z | test/integration/reservations/after_the_fact_test.exs | brownt23/crit19 | c45c7b3ae580c193168d83144da0eeb9bc91c8a9 | [
"MIT"
] | null | null | null | test/integration/reservations/after_the_fact_test.exs | brownt23/crit19 | c45c7b3ae580c193168d83144da0eeb9bc91c8a9 | [
"MIT"
] | 3 | 2020-02-24T23:38:27.000Z | 2020-08-01T23:50:17.000Z | defmodule Integration.Reservations.AfterTheFactTest do
use CritWeb.IntegrationCase
alias CritWeb.Reservations.AfterTheFactController, as: UnderTest
use CritWeb.ConnMacros, controller: UnderTest
alias Crit.Servers.UserTask
alias Crit.Reservations.ReservationApi
alias Crit.Servers.Institution
alias Ecto.Tim... | 34.811765 | 86 | 0.575194 |
624ad825f2e38818a1bb3908400dc7d042666c4a | 111 | ex | Elixir | lib/he_broker/consumer.ex | HackerExperience/HEBroker | 2a653a43b512c6392f55508dfc1be8463a845b31 | [
"BSD-3-Clause"
] | 5 | 2017-02-15T18:25:35.000Z | 2018-03-29T16:36:31.000Z | lib/he_broker/consumer.ex | HackerExperience/HeBroker | 2a653a43b512c6392f55508dfc1be8463a845b31 | [
"BSD-3-Clause"
] | null | null | null | lib/he_broker/consumer.ex | HackerExperience/HeBroker | 2a653a43b512c6392f55508dfc1be8463a845b31 | [
"BSD-3-Clause"
] | null | null | null | defmodule HeBroker.Consumer do
defdelegate subscribe(broker, topics, callbacks),
to: HeBroker.Broker
end | 22.2 | 51 | 0.783784 |
624adfc43a3c99175506b22e5041783c37b38ecc | 165 | ex | Elixir | test/support/money.ex | s33m4nn/ex_sieve | 20c54e6f9f2b48dca09aa97a750a218c15812d2d | [
"MIT"
] | 35 | 2016-10-09T14:20:11.000Z | 2022-01-06T20:05:10.000Z | test/support/money.ex | s33m4nn/ex_sieve | 20c54e6f9f2b48dca09aa97a750a218c15812d2d | [
"MIT"
] | 10 | 2016-10-26T09:55:24.000Z | 2020-05-28T12:09:10.000Z | test/support/money.ex | s33m4nn/ex_sieve | 20c54e6f9f2b48dca09aa97a750a218c15812d2d | [
"MIT"
] | 12 | 2016-10-19T08:13:58.000Z | 2020-05-12T08:55:36.000Z | defmodule Money do
defstruct amount: 0
def new(int) when is_integer(int), do: %Money{amount: int}
def new(_), do: raise(ArgumentError, "expects integer")
end
| 23.571429 | 60 | 0.715152 |
624aef5bbb7c145c1c988c59313039d359962dd7 | 422 | ex | Elixir | web/views/error_view.ex | pdebelak/snack_chat | db24d47257b57abb5886ec5c742532c99a31cc8c | [
"MIT"
] | null | null | null | web/views/error_view.ex | pdebelak/snack_chat | db24d47257b57abb5886ec5c742532c99a31cc8c | [
"MIT"
] | null | null | null | web/views/error_view.ex | pdebelak/snack_chat | db24d47257b57abb5886ec5c742532c99a31cc8c | [
"MIT"
] | null | null | null | defmodule SnackChat.ErrorView do
use SnackChat.Web, :view
def render("404.json", _assigns) do
%{errors: %{detail: "Page not found"}}
end
def render("500.json", _assigns) do
%{errors: %{detail: "Internal server error"}}
end
# In case no render clause matches or no
# template is found, let's rend... | 23.444444 | 49 | 0.684834 |
624af8a51ee392083d93422978186d1096d2de10 | 15,272 | ex | Elixir | lib/erlex.ex | kianmeng/erlex | e320a9082536893bd57cd2dd8dd5e246e2937a0c | [
"Apache-2.0"
] | 29 | 2018-07-23T11:57:03.000Z | 2022-02-15T10:20:26.000Z | lib/erlex.ex | kianmeng/erlex | e320a9082536893bd57cd2dd8dd5e246e2937a0c | [
"Apache-2.0"
] | 31 | 2018-07-27T11:37:01.000Z | 2021-01-20T12:43:05.000Z | lib/erlex.ex | kianmeng/erlex | e320a9082536893bd57cd2dd8dd5e246e2937a0c | [
"Apache-2.0"
] | 11 | 2018-07-27T07:53:11.000Z | 2021-01-18T01:04:25.000Z | defmodule Erlex do
@moduledoc """
Convert Erlang style structs and error messages to equivalent Elixir.
Lexes and parses the Erlang output, then runs through pretty
printer.
## Usage
Invoke `Erlex.pretty_print/1` wuth the input string.
```elixir
iex> str = ~S"('Elixir.Plug.Conn':t(),binary() | atom(... | 24.592593 | 199 | 0.570914 |
624b065e12f530a58fe26e734a7310d05d023eca | 1,885 | ex | Elixir | clients/you_tube_reporting/lib/google_api/you_tube_reporting/v1/model/list_jobs_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/you_tube_reporting/lib/google_api/you_tube_reporting/v1/model/list_jobs_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/you_tube_reporting/lib/google_api/you_tube_reporting/v1/model/list_jobs_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 34.907407 | 110 | 0.731565 |
624b13f5bd44d9970a47c4771556eda70f3b8642 | 1,403 | ex | Elixir | apps/neoscan_web/lib/neoscan_web/schema/address_types.ex | vincentgeneste/neo-scan | 4a654575331eeb3eb12d4fd61696a7bd6dbca3ce | [
"MIT"
] | 75 | 2017-07-23T02:45:32.000Z | 2021-12-13T11:04:17.000Z | apps/neoscan_web/lib/neoscan_web/schema/address_types.ex | vincentgeneste/neo-scan | 4a654575331eeb3eb12d4fd61696a7bd6dbca3ce | [
"MIT"
] | 252 | 2017-07-13T19:36:00.000Z | 2021-07-28T18:40:00.000Z | apps/neoscan_web/lib/neoscan_web/schema/address_types.ex | vincentgeneste/neo-scan | 4a654575331eeb3eb12d4fd61696a7bd6dbca3ce | [
"MIT"
] | 87 | 2017-07-23T02:45:34.000Z | 2022-03-02T14:54:27.000Z | defmodule NeoscanWeb.Schema.AddressTypes do
@moduledoc false
use Absinthe.Schema.Notation
alias NeoscanWeb.Resolvers.Address
@desc "Queries for addresses"
object :address_queries do
@desc """
Address query.
Get information about one address.
Use the filter to get the address by hash.
... | 27.509804 | 73 | 0.685674 |
624b1eafd9ad522a5305d5085b5d9a994a63a165 | 96 | exs | Elixir | test/documents_design_web/views/page_view_test.exs | documents-org/documents.design-el | 6976254e175232afe5e913c29b04c13a86d2e9a2 | [
"MIT"
] | null | null | null | test/documents_design_web/views/page_view_test.exs | documents-org/documents.design-el | 6976254e175232afe5e913c29b04c13a86d2e9a2 | [
"MIT"
] | null | null | null | test/documents_design_web/views/page_view_test.exs | documents-org/documents.design-el | 6976254e175232afe5e913c29b04c13a86d2e9a2 | [
"MIT"
] | null | null | null | defmodule DocumentsDesignWeb.PageViewTest do
use DocumentsDesignWeb.ConnCase, async: true
end
| 24 | 46 | 0.854167 |
624b22e5d88348def25e02a97de1101e6e760787 | 849 | ex | Elixir | lib/erlef_web/controllers/page_controller.ex | zacky1972/website | b0638572bf0a7a18882c4b8ed6d561dcfa61475d | [
"Apache-2.0"
] | null | null | null | lib/erlef_web/controllers/page_controller.ex | zacky1972/website | b0638572bf0a7a18882c4b8ed6d561dcfa61475d | [
"Apache-2.0"
] | null | null | null | lib/erlef_web/controllers/page_controller.ex | zacky1972/website | b0638572bf0a7a18882c4b8ed6d561dcfa61475d | [
"Apache-2.0"
] | null | null | null | defmodule ErlefWeb.PageController do
use ErlefWeb, :controller
action_fallback ErlefWeb.FallbackController
def index(conn, _params), do: render(conn)
def board_members(conn, _params) do
members = Enum.shuffle(Erlef.Rosters.get("board"))
render(conn, members: members)
end
def bylaws(conn, _params... | 26.53125 | 88 | 0.729093 |
624b868713a3c1b9e7d950085b199e3fa4029ae1 | 363 | exs | Elixir | priv/repo/migrations/20160212090540_create_user.exs | tuvistavie/projare | e776b2d326fed97e0dbf62530674fe688ff73ab8 | [
"MIT"
] | 3 | 2016-03-06T12:23:01.000Z | 2017-03-21T18:22:07.000Z | priv/repo/migrations/20160212090540_create_user.exs | tuvistavie/projare | e776b2d326fed97e0dbf62530674fe688ff73ab8 | [
"MIT"
] | null | null | null | priv/repo/migrations/20160212090540_create_user.exs | tuvistavie/projare | e776b2d326fed97e0dbf62530674fe688ff73ab8 | [
"MIT"
] | null | null | null | defmodule Projare.Repo.Migrations.CreateUser do
use Ecto.Migration
def change do
create table(:users) do
add :name, :string
add :email, :string
add :password_digest, :string
add :secret_token, :string
timestamps
end
create unique_index(:users, [:email])
create uniqu... | 19.105263 | 48 | 0.663912 |
624b9e7b7bec974dc724287fb851dc080302bcc2 | 1,313 | ex | Elixir | lib/defbang.ex | Drahcirius/defbang | 8342541d559821b2ce3484b631650dc40e2a52f5 | [
"MIT"
] | 2 | 2019-11-25T19:46:26.000Z | 2020-03-26T10:30:15.000Z | lib/defbang.ex | Drahcirius/defbang | 8342541d559821b2ce3484b631650dc40e2a52f5 | [
"MIT"
] | null | null | null | lib/defbang.ex | Drahcirius/defbang | 8342541d559821b2ce3484b631650dc40e2a52f5 | [
"MIT"
] | null | null | null | defmodule Defbang do
defmacro defbang({name, metadata, args} = call, body) do
banged_name = String.to_atom(Atom.to_string(name) <> "!")
banged_call = {banged_name, metadata, args}
quote do
def unquote(call), unquote(body)
def unquote(banged_call) do
[do: expr] = unquote(body)
... | 23.446429 | 68 | 0.574257 |
624bcaca44b3a6eeda5c80db4f84870b2a75d18c | 417 | exs | Elixir | test/otp_demo_web/views/error_view_test.exs | moroz/phoenix-totp-demo | b07b1925a1116ecbade15cb37764e4aebf442b5b | [
"MIT"
] | null | null | null | test/otp_demo_web/views/error_view_test.exs | moroz/phoenix-totp-demo | b07b1925a1116ecbade15cb37764e4aebf442b5b | [
"MIT"
] | null | null | null | test/otp_demo_web/views/error_view_test.exs | moroz/phoenix-totp-demo | b07b1925a1116ecbade15cb37764e4aebf442b5b | [
"MIT"
] | null | null | null | defmodule OtpDemoWeb.ErrorViewTest do
use OtpDemoWeb.ConnCase, async: true
# Bring render/3 and render_to_string/3 for testing custom views
import Phoenix.View
test "renders 404.html" do
assert render_to_string(OtpDemoWeb.ErrorView, "404.html", []) == "Not Found"
end
test "renders 500.html" do
as... | 27.8 | 92 | 0.733813 |
624bdf5c4b4dba9af7301a0117e9e2ae6e13b264 | 452 | ex | Elixir | web/models/server_type.ex | rob05c/tox | f54847ca058ad24b909341ad65d595a4069d2471 | [
"Apache-2.0"
] | 2 | 2016-11-16T17:24:21.000Z | 2019-02-15T05:38:27.000Z | web/models/server_type.ex | rob05c/tox | f54847ca058ad24b909341ad65d595a4069d2471 | [
"Apache-2.0"
] | null | null | null | web/models/server_type.ex | rob05c/tox | f54847ca058ad24b909341ad65d595a4069d2471 | [
"Apache-2.0"
] | null | null | null | defmodule Tox.ServerType do
use Tox.Web, :model
@primary_key false
@derive {Phoenix.Param, key: :name}
schema "server_types" do
field :name, :string, primary_key: true
field :description, :string
timestamps()
end
@doc """
Builds a changeset based on the `struct` and `params`.
"""
def ch... | 20.545455 | 56 | 0.646018 |
624bef163d59179f06b51c199a420b48a41d556d | 1,504 | ex | Elixir | lib/mix_systemd_deploy_web/views/error_helpers.ex | cogini/mix-systemd-deploy-example | 7b0720a46a14fd0f7f61f88f7fdc26fdd7f05772 | [
"Apache-2.0"
] | 4 | 2019-03-01T07:26:26.000Z | 2021-11-05T13:53:07.000Z | lib/mix_systemd_deploy_web/views/error_helpers.ex | cogini/mix-systemd-deploy-example | 7b0720a46a14fd0f7f61f88f7fdc26fdd7f05772 | [
"Apache-2.0"
] | null | null | null | lib/mix_systemd_deploy_web/views/error_helpers.ex | cogini/mix-systemd-deploy-example | 7b0720a46a14fd0f7f61f88f7fdc26fdd7f05772 | [
"Apache-2.0"
] | null | null | null | defmodule MixSystemdDeployWeb.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 ->
con... | 33.422222 | 85 | 0.676197 |
624bf1d9b36b8d88a0e92a1dbb8a3a10466bbdd7 | 2,921 | ex | Elixir | web_finngen_r8/test/support/data_case.ex | vincent-octo/risteys | 5bb1e70b78988770048b91b42fad025faf98d84a | [
"MIT"
] | null | null | null | web_finngen_r8/test/support/data_case.ex | vincent-octo/risteys | 5bb1e70b78988770048b91b42fad025faf98d84a | [
"MIT"
] | null | null | null | web_finngen_r8/test/support/data_case.ex | vincent-octo/risteys | 5bb1e70b78988770048b91b42fad025faf98d84a | [
"MIT"
] | null | null | null | defmodule Risteys.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, every test... | 24.546218 | 78 | 0.590551 |
624bf469a9804052da532a0a65d528fe1afdaa0f | 3,148 | ex | Elixir | lib/lob/client.ex | itsachen/lob-elixir | b1bacd56fd3a1752cdbda4614354b3120cbc0841 | [
"MIT"
] | null | null | null | lib/lob/client.ex | itsachen/lob-elixir | b1bacd56fd3a1752cdbda4614354b3120cbc0841 | [
"MIT"
] | null | null | null | lib/lob/client.ex | itsachen/lob-elixir | b1bacd56fd3a1752cdbda4614354b3120cbc0841 | [
"MIT"
] | null | null | null | defmodule Lob.Client do
@moduledoc """
Client responsible for making requests to Lob and handling the responses.
"""
alias Poison.Parser
alias HTTPoison.Error
alias HTTPoison.Response
use HTTPoison.Base
@client_version Mix.Project.config[:version]
@type client_response :: {:ok, map, list} | {:erro... | 28.107143 | 133 | 0.641677 |
624c0c7988f4b448cb442756faa14603f08f647d | 1,069 | exs | Elixir | mix.exs | pollingj/itunes-parser | e76cf7af4c5930d624f0a88d117440addd5ece94 | [
"MIT"
] | null | null | null | mix.exs | pollingj/itunes-parser | e76cf7af4c5930d624f0a88d117440addd5ece94 | [
"MIT"
] | null | null | null | mix.exs | pollingj/itunes-parser | e76cf7af4c5930d624f0a88d117440addd5ece94 | [
"MIT"
] | null | null | null | defmodule ITunesParser.Mixfile do
use Mix.Project
def project do
[app: :itunesparser,
version: "0.1.0",
elixir: "~> 1.0",
description: "Elixir RSS/Atom parser built on erlang's xmerl xml parser",
package: package,
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod... | 22.744681 | 78 | 0.591207 |
624c37ef9eb25e8b1db342153c07f132def5cb40 | 4,255 | exs | Elixir | test/grpc/transport/http2_test.exs | coingaming/grpc | 33b8b3ceec007ae530a33b49a7b302a1ee356b05 | [
"Apache-2.0"
] | null | null | null | test/grpc/transport/http2_test.exs | coingaming/grpc | 33b8b3ceec007ae530a33b49a7b302a1ee356b05 | [
"Apache-2.0"
] | null | null | null | test/grpc/transport/http2_test.exs | coingaming/grpc | 33b8b3ceec007ae530a33b49a7b302a1ee356b05 | [
"Apache-2.0"
] | 1 | 2022-01-19T22:21:04.000Z | 2022-01-19T22:21:04.000Z | defmodule GRPC.Transport.HTTP2Test do
use ExUnit.Case, async: true
alias GRPC.Channel
alias GRPC.Transport.HTTP2
@channel %Channel{scheme: "http", host: "grpc.io"}
alias GRPC.Client.Stream
defp assert_header({key, _v} = pair, headers) do
assert pair == Enum.find(headers, nil, fn {k, _v} -> if k == key... | 35.458333 | 99 | 0.621387 |
624c46780a4a27bf6d96d769fef0cdbd710ebd57 | 380 | exs | Elixir | priv/repo/migrations/20170721115723_create_test_schema.exs | surgeventures/surgex | b3acdd6a9a010c26f0081b9cb23aeb072459be30 | [
"MIT"
] | 10 | 2017-09-15T08:55:48.000Z | 2021-07-08T09:26:24.000Z | priv/repo/migrations/20170721115723_create_test_schema.exs | surgeventures/surgex | b3acdd6a9a010c26f0081b9cb23aeb072459be30 | [
"MIT"
] | 17 | 2017-07-24T11:27:22.000Z | 2022-01-24T22:28:18.000Z | priv/repo/migrations/20170721115723_create_test_schema.exs | surgeventures/surgex | b3acdd6a9a010c26f0081b9cb23aeb072459be30 | [
"MIT"
] | 2 | 2018-04-12T15:01:00.000Z | 2018-05-27T12:14:34.000Z | defmodule Surgex.Repo.Migrations.CreateTestSchema do
use Ecto.Migration
def change do
create table(:users) do
add(:name, :string)
add(:email, :string)
add(:provider_id, :integer, null: false)
end
create table(:other_users) do
add(:name, :string)
add(:email, :string)
... | 21.111111 | 52 | 0.636842 |
624c63d4432a6e6a1991a243dea7809d1944dc7a | 236 | exs | Elixir | apps/rig_api/test/dummy_smoke_test.exs | hlavacek/reactive-interaction-gateway | 6b968b742d8f0456a51c31dbc744ccfacd57191e | [
"Apache-2.0"
] | null | null | null | apps/rig_api/test/dummy_smoke_test.exs | hlavacek/reactive-interaction-gateway | 6b968b742d8f0456a51c31dbc744ccfacd57191e | [
"Apache-2.0"
] | null | null | null | apps/rig_api/test/dummy_smoke_test.exs | hlavacek/reactive-interaction-gateway | 6b968b742d8f0456a51c31dbc744ccfacd57191e | [
"Apache-2.0"
] | null | null | null | defmodule RigApi.DummySmokeTest do
@moduledoc "Prevents a warning as long as there is no smoke test in this app."
use ExUnit.Case, async: true
describe "dummy" do
@tag :smoke
test "nothing" do
nil
end
end
end
| 19.666667 | 80 | 0.682203 |
624c65eb8e3ff7a280b013c83b9ba038a01438a3 | 1,687 | ex | Elixir | lib/agile_pulse_web/endpoint.ex | cscairns/agile_pulse | 01675fc60c5ebc88e6e6c3304f2a5aa683528f7c | [
"CC0-1.0"
] | null | null | null | lib/agile_pulse_web/endpoint.ex | cscairns/agile_pulse | 01675fc60c5ebc88e6e6c3304f2a5aa683528f7c | [
"CC0-1.0"
] | null | null | null | lib/agile_pulse_web/endpoint.ex | cscairns/agile_pulse | 01675fc60c5ebc88e6e6c3304f2a5aa683528f7c | [
"CC0-1.0"
] | null | null | null | defmodule AgilePulseWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :agile_pulse
socket "/socket", AgilePulseWeb.UserSocket
# Serve at "/" the static files from "priv/static" directory.
#
# You should set gzip to true if you are running phoenix.digest
# when deploying your static files in production.
plu... | 29.086207 | 95 | 0.711322 |
624c84dac3373139a353dce4b02e74113f5b58c1 | 2,779 | ex | Elixir | lib/phone_number.ex | m4hi2/phone_number | 8d89384b64cd6793634c461bae05bad7903f505e | [
"MIT"
] | 9 | 2017-12-07T09:22:40.000Z | 2022-01-09T06:27:24.000Z | lib/phone_number.ex | m4hi2/phone_number | 8d89384b64cd6793634c461bae05bad7903f505e | [
"MIT"
] | 6 | 2017-12-13T11:13:02.000Z | 2022-02-19T02:52:47.000Z | lib/phone_number.ex | m4hi2/phone_number | 8d89384b64cd6793634c461bae05bad7903f505e | [
"MIT"
] | 3 | 2018-04-30T23:55:30.000Z | 2022-01-09T00:02:56.000Z | defmodule PhoneNumber do
@moduledoc """
Library for validating international phone numbers. Based on Google's libphonenumber.
"""
@doc """
parse phone number
## Examples
iex> phone = PhoneNumber.parse("381601234567")
...>
iex> phone.valid
true
"""
@spec parse(String.t()) :: %... | 23.752137 | 87 | 0.554516 |
624c98eb064b1d6da8e8d99ea14837c87e6a6828 | 2,215 | ex | Elixir | clients/monitoring/lib/google_api/monitoring/v3/model/dropped_labels.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/monitoring/lib/google_api/monitoring/v3/model/dropped_labels.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/monitoring/lib/google_api/monitoring/v3/model/dropped_labels.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 ... | 47.12766 | 800 | 0.764786 |
624cab50cb82ceaeb6e5e557eda40fee10ee2c06 | 12,303 | ex | Elixir | lib/geometry/multi_point.ex | hrzndhrn/geometry | bffdac0a9554f7f5fd05caceee0fa8f3c96d1c60 | [
"MIT"
] | null | null | null | lib/geometry/multi_point.ex | hrzndhrn/geometry | bffdac0a9554f7f5fd05caceee0fa8f3c96d1c60 | [
"MIT"
] | 2 | 2020-10-25T10:06:07.000Z | 2020-10-26T18:15:20.000Z | lib/geometry/multi_point.ex | hrzndhrn/geometry | bffdac0a9554f7f5fd05caceee0fa8f3c96d1c60 | [
"MIT"
] | null | null | null | defmodule Geometry.MultiPoint do
@moduledoc """
A set of points from type `Geometry.Point`.
`MultiPoint` implements the protocols `Enumerable` and `Collectable`.
## Examples
iex> Enum.map(
...> MultiPoint.new([
...> Point.new(1, 2),
...> Point.new(3, 4)
...> ]),
... | 25.792453 | 92 | 0.559051 |
624cc5846c693d5ce74f4349a576f33f805d1cc2 | 211 | ex | Elixir | apps/lotka_volterra/lib/lotka_volterra/herbivore.ex | grrrisu/thundermoon-mvp | 17939d51c7b07216dfd63ba1b2ba53d56f94a48d | [
"MIT"
] | 10 | 2019-08-02T06:41:23.000Z | 2022-03-09T16:12:30.000Z | apps/lotka_volterra/lib/lotka_volterra/herbivore.ex | grrrisu/thundermoon-mvp | 17939d51c7b07216dfd63ba1b2ba53d56f94a48d | [
"MIT"
] | 319 | 2019-06-11T20:16:26.000Z | 2022-03-09T16:24:22.000Z | apps/lotka_volterra/lib/lotka_volterra/herbivore.ex | grrrisu/thundermoon-mvp | 17939d51c7b07216dfd63ba1b2ba53d56f94a48d | [
"MIT"
] | 4 | 2019-08-15T19:52:07.000Z | 2021-12-02T14:52:54.000Z | defmodule LotkaVolterra.Herbivore do
defstruct birth_rate: 0.5,
death_rate: 0.01,
needed_food: 5,
starving_rate: 0.4,
graze_rate: 0.05,
size: 50
end
| 23.444444 | 36 | 0.549763 |
624cdb6d945e9d497f48e874cd2048f62cd3c5b8 | 1,094 | ex | Elixir | apps/revision_web/lib/revision_web/channels/user_socket.ex | chargio/revision | 28831e6608409de6ef46ac4619c56ad3b0fa90bd | [
"Apache-2.0"
] | 1 | 2022-02-06T11:29:56.000Z | 2022-02-06T11:29:56.000Z | apps/revision_web/lib/revision_web/channels/user_socket.ex | chargio/revision | 28831e6608409de6ef46ac4619c56ad3b0fa90bd | [
"Apache-2.0"
] | null | null | null | apps/revision_web/lib/revision_web/channels/user_socket.ex | chargio/revision | 28831e6608409de6ef46ac4619c56ad3b0fa90bd | [
"Apache-2.0"
] | null | null | null | defmodule RevisionWeb.UserSocket do
use Phoenix.Socket
## Channels
# channel "room:*", RevisionWeb.RoomChannel
# Socket params are passed from the client and can
# be used to verify and authenticate a user. After
# verification, you can put default assigns into
# the socket that will be set for all chan... | 30.388889 | 83 | 0.695612 |
624cdcba266cff1fd467c2a8d56cef68ce908ad7 | 433 | exs | Elixir | test/jeopardixir_web/views/error_view_test.exs | arielj/jeopardixir | d596dd4c0af7398f8b533518b5d8dc30c5bac94b | [
"MIT"
] | 1 | 2021-06-16T15:27:04.000Z | 2021-06-16T15:27:04.000Z | test/jeopardixir_web/views/error_view_test.exs | arielj/jeopardixir | d596dd4c0af7398f8b533518b5d8dc30c5bac94b | [
"MIT"
] | 25 | 2021-06-18T13:08:18.000Z | 2021-12-15T19:04:57.000Z | test/jeopardixir_web/views/error_view_test.exs | arielj/jeopardixir | d596dd4c0af7398f8b533518b5d8dc30c5bac94b | [
"MIT"
] | null | null | null | defmodule JeopardixirWeb.ErrorViewTest do
use JeopardixirWeb.ConnCase, async: true
# Bring render/3 and render_to_string/3 for testing custom views
import Phoenix.View
test "renders 404.html" do
assert render_to_string(JeopardixirWeb.ErrorView, "404.html", []) == "Not Found"
end
test "renders 500.htm... | 28.866667 | 96 | 0.743649 |
624ce96208d7cca5ee8ae27775e4dae5e1fe5c6b | 1,214 | exs | Elixir | config/dev.exs | cedretaber/bibliotheca | 642ec9908d6d98f16e25b6a482c52e9cbaa21ad2 | [
"MIT"
] | null | null | null | config/dev.exs | cedretaber/bibliotheca | 642ec9908d6d98f16e25b6a482c52e9cbaa21ad2 | [
"MIT"
] | 22 | 2017-05-15T07:34:08.000Z | 2018-02-25T07:26:18.000Z | config/dev.exs | cedretaber/bibliotheca | 642ec9908d6d98f16e25b6a482c52e9cbaa21ad2 | [
"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 :bibliotheca, Bibliotheca.Endpoint,
http: [por... | 28.904762 | 68 | 0.714168 |
624ce9840c5640416fac3a38b1f8b9334fdc68b8 | 1,135 | exs | Elixir | config/config.exs | rickfo97/personnummer-elixir | 1d0b97384e5ddd411e66bd2ec31f3543cfba66c3 | [
"MIT"
] | 1 | 2019-09-24T21:04:14.000Z | 2019-09-24T21:04:14.000Z | config/config.exs | rickfo97/personnummer-elixir | 1d0b97384e5ddd411e66bd2ec31f3543cfba66c3 | [
"MIT"
] | null | null | null | config/config.exs | rickfo97/personnummer-elixir | 1d0b97384e5ddd411e66bd2ec31f3543cfba66c3 | [
"MIT"
] | 1 | 2018-11-20T21:30:57.000Z | 2018-11-20T21:30:57.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.612903 | 73 | 0.752423 |
624d0a62dc974019a0faea1e735b5118233ef782 | 696 | ex | Elixir | apps/ui/lib/ui_web/gettext.ex | Cinderella-Man/crypto-streamer | b1e990d375f7143c5149930be991249f0d9c3ee3 | [
"MIT"
] | 49 | 2019-10-28T22:27:28.000Z | 2021-10-11T06:40:29.000Z | apps/ui/lib/ui_web/gettext.ex | Cinderella-Man/crypto-streamer | b1e990d375f7143c5149930be991249f0d9c3ee3 | [
"MIT"
] | 9 | 2019-08-30T13:15:36.000Z | 2019-10-10T21:25:14.000Z | apps/ui/lib/ui_web/gettext.ex | Cinderella-Man/crypto-streamer | b1e990d375f7143c5149930be991249f0d9c3ee3 | [
"MIT"
] | 7 | 2019-10-31T06:19:26.000Z | 2021-09-30T04:20:58.000Z | defmodule UiWeb.Gettext do
@moduledoc """
A module providing Internationalization with a gettext-based API.
By using [Gettext](https://hexdocs.pm/gettext),
your module gains a set of macros for translations, for example:
import UiWeb.Gettext
# Simple translation
gettext("Here is the string ... | 27.84 | 72 | 0.670977 |
624d0cfbe972fa55d237d88cb7c433367f62c409 | 1,536 | exs | Elixir | mix.exs | damonkelley/requestbin | 1f59df73ad3e47e74ba18a2987bd0b0cce262a13 | [
"MIT"
] | 4 | 2016-05-20T04:40:21.000Z | 2017-12-20T12:54:55.000Z | mix.exs | damonkelley/requestbin | 1f59df73ad3e47e74ba18a2987bd0b0cce262a13 | [
"MIT"
] | null | null | null | mix.exs | damonkelley/requestbin | 1f59df73ad3e47e74ba18a2987bd0b0cce262a13 | [
"MIT"
] | null | null | null | defmodule RequestBin.Mixfile do
use Mix.Project
def project do
[app: :requestbin,
version: "0.0.1",
elixir: "~> 1.0",
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix, :gettext] ++ Mix.compilers,
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
... | 28.981132 | 78 | 0.608073 |
624d6917fbb304fcfbef7a8bee77034f4be3d25e | 249 | ex | Elixir | apps/go_stop/lib/go_stop.ex | camirmas/go-stop-server | ecf3e919b9ee1d2e8b45e628bc10b4706cc4e698 | [
"MIT"
] | 8 | 2017-06-04T04:05:47.000Z | 2019-11-04T18:00:45.000Z | apps/go_stop/lib/go_stop.ex | camirmas/go-stop-server | ecf3e919b9ee1d2e8b45e628bc10b4706cc4e698 | [
"MIT"
] | 19 | 2018-04-19T07:24:57.000Z | 2019-08-07T16:37:05.000Z | apps/go_stop/lib/go_stop.ex | camirmas/go-stop-server | ecf3e919b9ee1d2e8b45e628bc10b4706cc4e698 | [
"MIT"
] | 1 | 2018-07-18T07:51:47.000Z | 2018-07-18T07:51:47.000Z | defmodule GoStop do
@moduledoc """
GoStop keeps the contexts that define your domain
and business logic.
Contexts are also responsible for managing your data, regardless
if it comes from the database, an external API or others.
"""
end
| 24.9 | 66 | 0.751004 |
624de7e84afb2c8fec6616d3342d2f1ac592cdc7 | 2,260 | ex | Elixir | lib/phoenix_mtm/changeset.ex | adam12/phoenix_mtm | 4f508e3fdd427e6cf1271c8e0f78dbdb90bb6a9b | [
"MIT"
] | 28 | 2016-06-18T20:18:51.000Z | 2021-12-01T10:49:45.000Z | lib/phoenix_mtm/changeset.ex | adam12/phoenix_mtm | 4f508e3fdd427e6cf1271c8e0f78dbdb90bb6a9b | [
"MIT"
] | 18 | 2016-08-10T19:25:15.000Z | 2021-11-30T15:44:38.000Z | lib/phoenix_mtm/changeset.ex | adam12/phoenix_mtm | 4f508e3fdd427e6cf1271c8e0f78dbdb90bb6a9b | [
"MIT"
] | 14 | 2016-08-18T17:45:15.000Z | 2022-02-28T11:08:02.000Z | defmodule PhoenixMTM.Changeset do
@moduledoc """
Provides `many_to_many` helpers for `Ecto.Changeset`.
The following example schema demonstrates how you would configure the
functionality of our examples below.
## Example Schema
schema "models" do
many_to_many :tags, App.Tag,
join_th... | 25.111111 | 80 | 0.619027 |
624de80d9dd3b79ad8c8390acc9140421ac29ae7 | 2,584 | ex | Elixir | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/operating_system_version.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/operating_system_version.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/operating_system_version.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 41.677419 | 190 | 0.716331 |
624e0966f3cd0cd1ce79efb16db2ebcd5d7e643c | 455 | ex | Elixir | lib/fragment/document_link.ex | TheRealReal/prismic-elixir | 0850b922be6d2f2d541add8426fe27f8ce5f63eb | [
"MIT"
] | 10 | 2018-01-12T18:52:53.000Z | 2022-02-17T06:00:21.000Z | lib/fragment/document_link.ex | TheRealReal/prismic-elixir | 0850b922be6d2f2d541add8426fe27f8ce5f63eb | [
"MIT"
] | 12 | 2018-02-14T23:08:08.000Z | 2021-11-22T15:55:41.000Z | lib/fragment/document_link.ex | TheRealReal/prismic-elixir | 0850b922be6d2f2d541add8426fe27f8ce5f63eb | [
"MIT"
] | 8 | 2018-05-08T14:02:21.000Z | 2021-12-15T08:19:55.000Z | defmodule Prismic.Fragment.DocumentLink do
defstruct [:id, :uid, :type, :tags, :slug, :lang, :fragments, :broken, :target]
@type fragments :: [any()]
@type t :: %__MODULE__{
id: String.t(),
uid: String.t(),
type: String.t(),
tags: [String.t()],
slug: String.t(),
... | 26.764706 | 81 | 0.50989 |
624e23ce7d1c483cd1884643ca327a59b438aa3c | 127 | ex | Elixir | test/support/repo.ex | stevedomin/paginator | 4832f6e93f2554db056152dbef396de4e3ee29f8 | [
"MIT"
] | 528 | 2018-02-13T15:01:54.000Z | 2022-03-29T13:53:44.000Z | test/support/repo.ex | stevedomin/paginator | 4832f6e93f2554db056152dbef396de4e3ee29f8 | [
"MIT"
] | 94 | 2018-02-13T15:32:03.000Z | 2022-03-12T03:20:18.000Z | test/support/repo.ex | stevedomin/paginator | 4832f6e93f2554db056152dbef396de4e3ee29f8 | [
"MIT"
] | 74 | 2018-02-13T15:12:49.000Z | 2022-03-12T02:47:59.000Z | defmodule Paginator.Repo do
use Ecto.Repo,
otp_app: :paginator,
adapter: Ecto.Adapters.Postgres
use Paginator
end
| 15.875 | 35 | 0.732283 |
624e4ebee7e607c2c6427e20dce1a9d7b0e8910b | 404 | ex | Elixir | lib/agx.ex | andrewaguiar/agx | e0e26ba08892ea59a4c2d6829f2066aadd97c305 | [
"MIT"
] | null | null | null | lib/agx.ex | andrewaguiar/agx | e0e26ba08892ea59a4c2d6829f2066aadd97c305 | [
"MIT"
] | null | null | null | lib/agx.ex | andrewaguiar/agx | e0e26ba08892ea59a4c2d6829f2066aadd97c305 | [
"MIT"
] | null | null | null | defmodule Agx do
alias Agx.Scanner
alias Agx.ResultPrinter
alias Agx.Summarizer
alias Agx.Searcher
def run(args_config, term_string) do
term = %Agx.Term{value: term_string, regex: args_config[:regex] != nil}
all_files = Searcher.find()
matched_lines = Scanner.generate(all_files, term)
Resu... | 21.263158 | 75 | 0.732673 |
624e869513352a7f0d7cb5e410ddcd348eb740c6 | 943 | ex | Elixir | web/controllers/api/v1/session_controller.ex | behrendtio/phoenix-toggl | dcaa2409ed8b53d3b56dc7ce02cdc4252dd19647 | [
"MIT"
] | 207 | 2016-02-24T06:43:04.000Z | 2021-03-05T02:26:47.000Z | web/controllers/api/v1/session_controller.ex | behrendtio/phoenix-toggl | dcaa2409ed8b53d3b56dc7ce02cdc4252dd19647 | [
"MIT"
] | 6 | 2016-02-26T00:13:06.000Z | 2017-06-15T07:49:02.000Z | web/controllers/api/v1/session_controller.ex | behrendtio/phoenix-toggl | dcaa2409ed8b53d3b56dc7ce02cdc4252dd19647 | [
"MIT"
] | 24 | 2016-02-24T18:02:21.000Z | 2019-11-11T12:47:06.000Z | defmodule PhoenixToggl.SessionController do
use PhoenixToggl.Web, :controller
plug :scrub_params, "session" when action in [:create]
def create(conn, %{"session" => session_params}) do
case PhoenixToggl.Session.authenticate(session_params) do
{:ok, user} ->
{:ok, jwt, _full_claims} = user |> G... | 24.179487 | 85 | 0.637328 |
624e88e87731e24e7eb4dc6a03a8dfd11090bea3 | 151 | ex | Elixir | day11/dumbo_octopus/lib/dumbo_octopus_web/controllers/page_controller.ex | alopezz/advent_of_code-2021 | 90f0d7e3290a5c8ba5d18b2a5d9240ea6b1682bd | [
"MIT"
] | null | null | null | day11/dumbo_octopus/lib/dumbo_octopus_web/controllers/page_controller.ex | alopezz/advent_of_code-2021 | 90f0d7e3290a5c8ba5d18b2a5d9240ea6b1682bd | [
"MIT"
] | null | null | null | day11/dumbo_octopus/lib/dumbo_octopus_web/controllers/page_controller.ex | alopezz/advent_of_code-2021 | 90f0d7e3290a5c8ba5d18b2a5d9240ea6b1682bd | [
"MIT"
] | null | null | null | defmodule DumboOctopusWeb.PageController do
use DumboOctopusWeb, :controller
def index(conn, _params) do
render(conn, "index.html")
end
end
| 18.875 | 43 | 0.754967 |
624e938a7d2e96c106fedf0721c5ca413a686bb6 | 70 | exs | Elixir | test/evo_test.exs | cas27/evo | 4ca1945749014917b7a3af870c1cd4db645cb09b | [
"Apache-2.0"
] | 3 | 2016-07-20T22:45:32.000Z | 2017-05-03T17:15:39.000Z | test/evo_test.exs | cas27/evo | 4ca1945749014917b7a3af870c1cd4db645cb09b | [
"Apache-2.0"
] | null | null | null | test/evo_test.exs | cas27/evo | 4ca1945749014917b7a3af870c1cd4db645cb09b | [
"Apache-2.0"
] | null | null | null | defmodule EvoTest do
use ExUnit.Case, async: true
doctest Evo
end
| 14 | 30 | 0.757143 |
624eb37841ccfece0d4218a4a11dbade8bd0b535 | 176 | ex | Elixir | lib/seven/utils/tagger.ex | the-AjK/sevenotters | b56c4c129f441f832561b6a9aff66281aa8627de | [
"MIT"
] | 7 | 2019-08-23T16:28:34.000Z | 2020-12-18T04:57:51.000Z | lib/seven/utils/tagger.ex | the-AjK/sevenotters | b56c4c129f441f832561b6a9aff66281aa8627de | [
"MIT"
] | 9 | 2021-07-29T16:18:30.000Z | 2021-07-29T16:36:59.000Z | lib/seven/utils/tagger.ex | the-AjK/sevenotters | b56c4c129f441f832561b6a9aff66281aa8627de | [
"MIT"
] | 6 | 2020-04-07T15:41:50.000Z | 2021-10-01T19:03:08.000Z | defmodule Seven.Utils.Tagger do
@moduledoc false
defmacro __using__([]) do
quote do
Module.register_attribute(__MODULE__, :tag, persist: true)
end
end
end
| 17.6 | 64 | 0.704545 |
624ec22b5e75956493b2c15378ca744a47b44ac7 | 380 | ex | Elixir | apps/datapio_play/lib/datapio_play.ex | datapio/opencore | 6e766c3b3a2ad8b07295c7fd27cffc0923284197 | [
"Apache-2.0"
] | 5 | 2021-05-14T22:01:08.000Z | 2021-09-21T16:28:09.000Z | apps/datapio_play/lib/datapio_play.ex | datapio/opencore | 6e766c3b3a2ad8b07295c7fd27cffc0923284197 | [
"Apache-2.0"
] | 198 | 2019-10-17T12:22:25.000Z | 2022-03-16T02:14:14.000Z | apps/datapio_play/lib/datapio_play.ex | datapio/opencore | 6e766c3b3a2ad8b07295c7fd27cffc0923284197 | [
"Apache-2.0"
] | 1 | 2022-03-10T08:54:36.000Z | 2022-03-10T08:54:36.000Z | defmodule Datapio.Play do
@moduledoc false
defmacro __using__(opts) do
quote do
require Datapio.Play.Manifest
import Datapio.Play.Manifest
use Datapio.Play.DSL
:ets.new(:datapio_play_config, [:set, :public, :named_table])
unquote(opts) |> Enum.each(fn entry ->
:ets.inser... | 21.111111 | 67 | 0.657895 |
624ee23feb40f08f980eb28a054a26f6fce8da64 | 806 | ex | Elixir | lib/miniuni/application.ex | da99/miniuni.elixir | 5d0bc6c4bd9b8e49665b917b03d7c33f5e6e9740 | [
"MIT"
] | null | null | null | lib/miniuni/application.ex | da99/miniuni.elixir | 5d0bc6c4bd9b8e49665b917b03d7c33f5e6e9740 | [
"MIT"
] | null | null | null | lib/miniuni/application.ex | da99/miniuni.elixir | 5d0bc6c4bd9b8e49665b917b03d7c33f5e6e9740 | [
"MIT"
] | null | null | null |
defmodule Miniuni.Application do
# See http://elixir-lang.org/docs/stable/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
import Supervisor.Spec, warn: false
# Define workers and child supervisors to be supervised
c... | 32.24 | 103 | 0.7134 |
624ee9e0823ebea01802042309a06c209c2419b4 | 1,396 | exs | Elixir | config/dev.exs | necosta/raspberry-pi-x | 478f49de74b03d4a652c35ef185735ca0f2f6878 | [
"MIT"
] | null | null | null | config/dev.exs | necosta/raspberry-pi-x | 478f49de74b03d4a652c35ef185735ca0f2f6878 | [
"MIT"
] | null | null | null | config/dev.exs | necosta/raspberry-pi-x | 478f49de74b03d4a652c35ef185735ca0f2f6878 | [
"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 :raspberry_pi, RaspberryPiWeb.Endpoint,
http: ... | 28.489796 | 68 | 0.701289 |
624ef00d53f88ff8429a3cdbdb2feb75f74c9c36 | 2,140 | ex | Elixir | clients/android_management/lib/google_api/android_management/v1/model/web_token.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/android_management/lib/google_api/android_management/v1/model/web_token.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/android_management/lib/google_api/android_management/v1/model/web_token.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... | 40.377358 | 213 | 0.747664 |
624f04b9d4e4b28cc52e93efadd00750bf217475 | 546 | exs | Elixir | apps/reaper/test/unit/reaper/topic/topic_manager_test.exs | msomji/smartcitiesdata | fc96abc1ef1306f7af6bd42bbcb4ed041a6d922c | [
"Apache-2.0"
] | 1 | 2020-03-18T21:14:39.000Z | 2020-03-18T21:14:39.000Z | apps/reaper/test/unit/reaper/topic/topic_manager_test.exs | msomji/smartcitiesdata | fc96abc1ef1306f7af6bd42bbcb4ed041a6d922c | [
"Apache-2.0"
] | null | null | null | apps/reaper/test/unit/reaper/topic/topic_manager_test.exs | msomji/smartcitiesdata | fc96abc1ef1306f7af6bd42bbcb4ed041a6d922c | [
"Apache-2.0"
] | null | null | null | defmodule Reaper.Topic.TopicManagerTest do
use ExUnit.Case
use Placebo
alias Reaper.Topic.TopicManager
@endpoints Application.get_env(:reaper, :elsa_brokers)
@output_topic_prefix Application.get_env(:reaper, :output_topic_prefix)
test "should delete input topic when the topic names are provided" do
d... | 32.117647 | 89 | 0.760073 |
624f1bc194befddfe8e77814b5b621993da32463 | 483 | ex | Elixir | server/lib/melody_match/accounts/spotify_token.ex | brianjaustin/melody-match | 5200fd347f7ae636ec782398896c782d80c17f59 | [
"Apache-1.1"
] | null | null | null | server/lib/melody_match/accounts/spotify_token.ex | brianjaustin/melody-match | 5200fd347f7ae636ec782398896c782d80c17f59 | [
"Apache-1.1"
] | 4 | 2021-03-28T03:09:37.000Z | 2021-04-10T17:45:10.000Z | server/lib/melody_match/accounts/spotify_token.ex | brianjaustin/melody-match | 5200fd347f7ae636ec782398896c782d80c17f59 | [
"Apache-1.1"
] | null | null | null | defmodule MelodyMatch.Accounts.SpotifyToken do
use Ecto.Schema
import Ecto.Changeset
@primary_key {:user_id, :id, []}
@derive {Phoenix.Param, key: :user_id}
schema "spotify_tokens" do
field :auth_token, :string
field :refresh_token, :string
timestamps()
end
@doc false
def changeset(spotif... | 23 | 59 | 0.703934 |
624f42722f4e47132d80d93fc9d65d70524f0481 | 4,512 | ex | Elixir | lib/app_api_web/v1/channels/conversation_channel.ex | turbo-play/phoenix-services | 9d3318c6b5d5ce6dead441758fc86ec34892b0f6 | [
"Apache-2.0"
] | 2 | 2018-07-05T15:13:12.000Z | 2021-12-16T08:58:56.000Z | lib/app_api_web/v1/channels/conversation_channel.ex | turbo-play/phoenix-services | 9d3318c6b5d5ce6dead441758fc86ec34892b0f6 | [
"Apache-2.0"
] | null | null | null | lib/app_api_web/v1/channels/conversation_channel.ex | turbo-play/phoenix-services | 9d3318c6b5d5ce6dead441758fc86ec34892b0f6 | [
"Apache-2.0"
] | 2 | 2018-08-13T21:37:00.000Z | 2021-11-10T04:08:26.000Z | defmodule AppApiWeb.ConversationChannel do
use AppApiWeb, :channel
alias AppApi.{MessageEvent, ConversationFetcher, UserFetcher, ConversationMessageEventFetcher, Repo}
alias AppApiWeb.V1.JSON.ConversationMessageEventSerializer, as: CMESerializer
require Logger
# @TODO: check if user can join conversation cha... | 32.460432 | 149 | 0.643174 |
624f655d886cd84405ffe3724d221eb2749a244f | 1,522 | ex | Elixir | clients/service_management/lib/google_api/service_management/v1/model/step.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/service_management/lib/google_api/service_management/v1/model/step.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/service_management/lib/google_api/service_management/v1/model/step.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... | 31.061224 | 91 | 0.746386 |
624f6b3395be2c772cdabcdd95a16c526568a331 | 918 | exs | Elixir | config/config.exs | rafaelwkerr/elixir-phoenix-introduction | 34dc77f1b9013e8bb59a1095279f90ce813c5f79 | [
"MIT"
] | null | null | null | config/config.exs | rafaelwkerr/elixir-phoenix-introduction | 34dc77f1b9013e8bb59a1095279f90ce813c5f79 | [
"MIT"
] | 1 | 2019-04-10T03:50:58.000Z | 2019-04-10T03:50:58.000Z | config/config.exs | rafaelwkerr/elixir-phoenix-introduction | 34dc77f1b9013e8bb59a1095279f90ce813c5f79 | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
use Mix.Config
# General application configuration
config :hello,
ecto_repos: [Hello.Repo]
# Conf... | 32.785714 | 86 | 0.75817 |
624f80e983aa83c17ae7cb9cc743a4c765caae6e | 11,716 | ex | Elixir | clients/storage_transfer/lib/google_api/storage_transfer/v1/api/transfer_jobs.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/storage_transfer/lib/google_api/storage_transfer/v1/api/transfer_jobs.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/storage_transfer/lib/google_api/storage_transfer/v1/api/transfer_jobs.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | 1 | 2018-07-28T20:50:50.000Z | 2018-07-28T20:50:50.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 45.945098 | 667 | 0.66661 |
624f9a7b632b2962a9f1ad0983a8ae2b8395fe85 | 1,159 | exs | Elixir | test/ex_bitmex/rest/instrument/composite_index_test.exs | eduardoscottini/ex_bitmex | f8528bd635922e1777a5b01ea4941d625da7396e | [
"MIT"
] | 6 | 2019-02-13T04:05:19.000Z | 2020-12-31T07:40:09.000Z | test/ex_bitmex/rest/instrument/composite_index_test.exs | eduardoscottini/ex_bitmex | f8528bd635922e1777a5b01ea4941d625da7396e | [
"MIT"
] | 28 | 2021-03-29T06:46:42.000Z | 2022-03-28T11:03:38.000Z | test/ex_bitmex/rest/instrument/composite_index_test.exs | yurikoval/ex_bitmex | d9492789fb319fbdf78d90a99f7c0e40c95c1885 | [
"MIT"
] | 4 | 2019-05-03T21:27:10.000Z | 2021-01-12T09:26:34.000Z | defmodule ExBitmex.Rest.Instrument.CompositeIndexTest do
use ExUnit.Case, async: false
use ExVCR.Mock, adapter: ExVCR.Adapter.Hackney
import Mock
alias ExBitmex.Rest.Instrument
doctest ExBitmex.Rest.Instrument.CompositeIndex
setup_all do
HTTPoison.start()
:ok
end
test ".get returns a list of i... | 33.114286 | 97 | 0.711821 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.