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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1ce2470cbe5cfccb28f45fa65303950e9e5e6e92 | 1,070 | ex | Elixir | lib/ex_ftx/orders/modify_by_order_id.ex | RaghavSood/ex_ftx | 257ba35221abe4957836eb6e8312ecae0d9d51aa | [
"MIT"
] | 3 | 2021-09-27T17:19:41.000Z | 2022-03-16T09:28:13.000Z | lib/ex_ftx/orders/modify_by_order_id.ex | RaghavSood/ex_ftx | 257ba35221abe4957836eb6e8312ecae0d9d51aa | [
"MIT"
] | 3 | 2021-07-28T19:53:02.000Z | 2021-09-27T15:48:38.000Z | lib/ex_ftx/orders/modify_by_order_id.ex | RaghavSood/ex_ftx | 257ba35221abe4957836eb6e8312ecae0d9d51aa | [
"MIT"
] | 4 | 2021-08-01T11:25:58.000Z | 2021-10-11T22:15:44.000Z | defmodule ExFtx.Orders.ModifyByOrderId do
alias ExFtx.JsonResponse
@type credentials :: ExFtx.Credentials.t()
@type modify_order_payload :: ExFtx.ModifyOrderPayload.t()
@type order :: ExFtx.Order.t()
@type result :: {:ok, order} | {:error, String.t() | :parse_result_item}
@spec post(credentials, ExFtx.Ord... | 30.571429 | 80 | 0.696262 |
1ce24ba528d2485d2e29ea8ad88e41b2ffe64144 | 1,938 | ex | Elixir | integration-tests/mysql-client-tests/elixir/lib/simple.ex | HassanAlsamahi/dolt | 8328916026f9ccab8fc396d2e60c40f6c8384a5b | [
"Apache-2.0"
] | 8,776 | 2020-09-24T22:14:40.000Z | 2022-03-31T20:26:02.000Z | integration-tests/mysql-client-tests/elixir/lib/simple.ex | HassanAlsamahi/dolt | 8328916026f9ccab8fc396d2e60c40f6c8384a5b | [
"Apache-2.0"
] | 1,177 | 2020-09-26T02:49:35.000Z | 2022-03-31T22:00:23.000Z | integration-tests/mysql-client-tests/elixir/lib/simple.ex | HassanAlsamahi/dolt | 8328916026f9ccab8fc396d2e60c40f6c8384a5b | [
"Apache-2.0"
] | 247 | 2020-10-05T19:25:29.000Z | 2022-03-30T17:40:45.000Z | defmodule SmokeTest do
def myTestFunc(arg1, arg2) do
if arg1 != arg2 do
raise "Test error"
end
end
@spec run :: nil
def run do
args = System.argv()
user = Enum.at(args, 0)
{port, _} = Integer.parse(Enum.at(args, 1))
database = Enum.at(args, 2)
{:ok, pid} = MyXQL.start_link(us... | 38.76 | 112 | 0.615583 |
1ce274485ad2306a56abad97a18cc007b856d258 | 6,860 | ex | Elixir | lib/plugin_manager/state/plugin_state.ex | mishka-group/mishka_installer | ab19e3e1e8aaa984ec48d6277a77d567eb5f61ea | [
"Apache-2.0"
] | 3 | 2022-03-18T14:32:15.000Z | 2022-03-24T06:33:21.000Z | lib/plugin_manager/state/plugin_state.ex | mishka-group/mishka_installer | ab19e3e1e8aaa984ec48d6277a77d567eb5f61ea | [
"Apache-2.0"
] | 3 | 2022-03-25T08:30:42.000Z | 2022-03-27T17:13:46.000Z | lib/plugin_manager/state/plugin_state.ex | mishka-group/mishka_installer | ab19e3e1e8aaa984ec48d6277a77d567eb5f61ea | [
"Apache-2.0"
] | null | null | null | defmodule MishkaInstaller.PluginState do
use GenServer
require Logger
alias MishkaInstaller.PluginStateDynamicSupervisor, as: PSupervisor
alias MishkaInstaller.Plugin
alias __MODULE__
defstruct [:name, :event, priority: 1, status: :started, depend_type: :soft, depends: [], extra: [], parent_pid: nil]
@t... | 32.358491 | 119 | 0.650146 |
1ce28bcf41c9ceed8d204ed45a07a7876f085a9d | 787 | ex | Elixir | api/lib/grook/web/guardian/error_handler.ex | ukita/grook | add716bf92fcde35b941ea8067933c28c192e01e | [
"MIT"
] | 3 | 2017-05-22T13:28:13.000Z | 2018-06-29T16:39:19.000Z | api/lib/grook/web/guardian/error_handler.ex | ukita/grook | add716bf92fcde35b941ea8067933c28c192e01e | [
"MIT"
] | null | null | null | api/lib/grook/web/guardian/error_handler.ex | ukita/grook | add716bf92fcde35b941ea8067933c28c192e01e | [
"MIT"
] | null | null | null | defmodule Grook.Guardian.ErrorHandler do
import Plug.Conn
def unauthenticated(conn, _params) do
respond(conn, :json, 401, "Unauthenticated")
end
def unauthorized(conn, _params) do
respond(conn, :json, 403, "Unauthorized")
end
def no_resource(conn, _params) do
respond(conn, :json, 403, "Unauthor... | 23.848485 | 51 | 0.674714 |
1ce29286c529e6d22a9d70f86c8ab4f96cbe135f | 1,070 | ex | Elixir | lib/credo/cli/command/info/info_command.ex | jlgeering/credo | b952190ed758c262aa0d9bbee01227f9b1f0c63b | [
"MIT"
] | null | null | null | lib/credo/cli/command/info/info_command.ex | jlgeering/credo | b952190ed758c262aa0d9bbee01227f9b1f0c63b | [
"MIT"
] | null | null | null | lib/credo/cli/command/info/info_command.ex | jlgeering/credo | b952190ed758c262aa0d9bbee01227f9b1f0c63b | [
"MIT"
] | null | null | null | defmodule Credo.CLI.Command.Info.InfoCommand do
use Credo.CLI.Command
alias Credo.CLI.Command.Info.InfoOutput
alias Credo.CLI.Task
alias Credo.Execution
@shortdoc "Show useful debug information"
@moduledoc @shortdoc
@doc false
def call(%Execution{help: true} = exec, _opts), do: InfoOutput.print_help(... | 19.454545 | 81 | 0.603738 |
1ce29665d5909b0c3807eabb369c21885c1dc0ed | 3,192 | ex | Elixir | broker/lib/broker/ledger.ex | mikehelmick/broker-prototype | 68082f753d3a7ea29399706504419e495287b35f | [
"Apache-2.0"
] | 1 | 2019-02-04T21:09:16.000Z | 2019-02-04T21:09:16.000Z | broker/lib/broker/ledger.ex | mikehelmick/broker-prototype | 68082f753d3a7ea29399706504419e495287b35f | [
"Apache-2.0"
] | null | null | null | broker/lib/broker/ledger.ex | mikehelmick/broker-prototype | 68082f753d3a7ea29399706504419e495287b35f | [
"Apache-2.0"
] | null | null | null | defmodule Broker.Ledger do
use GenServer
# GenServer state is a map of
# EventID is the tuple of {type, source, id}
# types -> {eventType -> [EventID]}
# events -> {EventId -> event}
# children -> %{{type, source, id} -> %{trigger -> EventID}}
# children = {{trigger, [{type, source, id}]}}
def start... | 35.076923 | 116 | 0.653195 |
1ce2af06b87675dd73a9e956284ab0c10729582e | 2,820 | ex | Elixir | web/models/tariff_plan.ex | zombalo/cgrates_web_jsonapi | 47845be4311839fe180cc9f2c7c6795649da4430 | [
"MIT"
] | null | null | null | web/models/tariff_plan.ex | zombalo/cgrates_web_jsonapi | 47845be4311839fe180cc9f2c7c6795649da4430 | [
"MIT"
] | null | null | null | web/models/tariff_plan.ex | zombalo/cgrates_web_jsonapi | 47845be4311839fe180cc9f2c7c6795649da4430 | [
"MIT"
] | null | null | null | defmodule CgratesWebJsonapi.TariffPlan do
use CgratesWebJsonapi.Web, :model
schema "tariff_plans" do
field :alias, :string
field :name, :string
field :description, :string
has_many :tp_account_actions, CgratesWebJsonapi.TpAccountAction, foreign_key: :tpid, references: :alias,
on_delete: :del... | 52.222222 | 121 | 0.748936 |
1ce2df1f192cf9768b4da3886c62632e271263b9 | 197 | exs | Elixir | priv/repo/migrations/20180925202650_change_telegram_id_to_string.exs | elitau/page_change_notifier | 55c02ef0a464040d98cf416c131e39e7a09df975 | [
"MIT"
] | null | null | null | priv/repo/migrations/20180925202650_change_telegram_id_to_string.exs | elitau/page_change_notifier | 55c02ef0a464040d98cf416c131e39e7a09df975 | [
"MIT"
] | null | null | null | priv/repo/migrations/20180925202650_change_telegram_id_to_string.exs | elitau/page_change_notifier | 55c02ef0a464040d98cf416c131e39e7a09df975 | [
"MIT"
] | null | null | null | defmodule PageChangeNotifier.Repo.Migrations.ChangeTelegramIdToString do
use Ecto.Migration
def change do
alter table(:users) do
modify(:telegram_chat_id, :string)
end
end
end
| 19.7 | 72 | 0.751269 |
1ce33815442a1f0a1d0bc514d6adbc60854b05b3 | 1,535 | ex | Elixir | lib/cadet/jobs/autograder/utilities.ex | Hou-Rui/cadet | f9036d76005bf3b267b632dce176067ae1a19f71 | [
"Apache-2.0"
] | null | null | null | lib/cadet/jobs/autograder/utilities.ex | Hou-Rui/cadet | f9036d76005bf3b267b632dce176067ae1a19f71 | [
"Apache-2.0"
] | 2 | 2020-04-22T09:06:38.000Z | 2020-04-22T09:15:33.000Z | lib/cadet/jobs/autograder/utilities.ex | Hou-Rui/cadet | f9036d76005bf3b267b632dce176067ae1a19f71 | [
"Apache-2.0"
] | 1 | 2020-06-01T03:26:02.000Z | 2020-06-01T03:26:02.000Z | defmodule Cadet.Autograder.Utilities do
@moduledoc """
This module defines functions that support the autograder functionality.
"""
use Cadet, :context
require Logger
import Ecto.Query
alias Cadet.Accounts.User
alias Cadet.Assessments.{Answer, Assessment, Question, Submission}
def dispatch_program... | 28.962264 | 98 | 0.663192 |
1ce36c5b270908e71931948e5782dc70306b7935 | 1,705 | exs | Elixir | test/list_test.exs | openapi-ro/annotations | a141164235d68d20b52ef199e342b5b9bf130acb | [
"WTFPL"
] | null | null | null | test/list_test.exs | openapi-ro/annotations | a141164235d68d20b52ef199e342b5b9bf130acb | [
"WTFPL"
] | null | null | null | test/list_test.exs | openapi-ro/annotations | a141164235d68d20b52ef199e342b5b9bf130acb | [
"WTFPL"
] | null | null | null | defmodule ListTest do
alias Annotations.Annotation
alias Annotations.List
use ExUnit.Case
#doctest Annotations
@alphabet "abcdefghijklmnopqrstuvwxyz"
@ro_alphabet "aăâbcdefghiîjklmnopqrsștțuvwxyz"
test "add tag by regex" do
str = @alphabet
annotations= List.tag(str, ~r/[aeiou]/u, :vowel)
vow... | 27.5 | 55 | 0.597067 |
1ce38edbcb92d4478a0f77697f3d5ccf0469d635 | 2,351 | ex | Elixir | lib/livebook/runtime/embedded.ex | kianmeng/livebook | 8fe8d27d3d46b64d22126d1b97157330b87e611c | [
"Apache-2.0"
] | null | null | null | lib/livebook/runtime/embedded.ex | kianmeng/livebook | 8fe8d27d3d46b64d22126d1b97157330b87e611c | [
"Apache-2.0"
] | null | null | null | lib/livebook/runtime/embedded.ex | kianmeng/livebook | 8fe8d27d3d46b64d22126d1b97157330b87e611c | [
"Apache-2.0"
] | null | null | null | defmodule Livebook.Runtime.Embedded do
@moduledoc false
# A runtime backed by the same node Livebook is running in.
#
# This runtime is reserved for specific use cases,
# where there is no option of starting a separate
# Elixir runtime.
defstruct [:node, :server_pid]
@type t :: %__MODULE__{
... | 31.77027 | 97 | 0.729051 |
1ce395d63d43c53664fd62fe7d3bca0ffeeec54a | 2,564 | exs | Elixir | mix.exs | SophieDeBenedetto/elixir-companies | d81111b6e9e4a93cde3aede0af180453a953dfd1 | [
"MIT"
] | null | null | null | mix.exs | SophieDeBenedetto/elixir-companies | d81111b6e9e4a93cde3aede0af180453a953dfd1 | [
"MIT"
] | null | null | null | mix.exs | SophieDeBenedetto/elixir-companies | d81111b6e9e4a93cde3aede0af180453a953dfd1 | [
"MIT"
] | null | null | null | defmodule Companies.MixProject do
use Mix.Project
def project do
[
app: :companies,
version: "0.1.0",
elixir: "~> 1.7",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
start_permanent: Mix.env() == :prod,
test_coverage: [too... | 29.136364 | 79 | 0.542512 |
1ce3adbca4544797c5d5d4e70e305f46741a98b7 | 1,101 | ex | Elixir | installer/templates/new/lib/app_name.ex | raspo/phoenix | 438b74255e7a4d68b4eaf1a295d0fcd201c71421 | [
"MIT"
] | null | null | null | installer/templates/new/lib/app_name.ex | raspo/phoenix | 438b74255e7a4d68b4eaf1a295d0fcd201c71421 | [
"MIT"
] | null | null | null | installer/templates/new/lib/app_name.ex | raspo/phoenix | 438b74255e7a4d68b4eaf1a295d0fcd201c71421 | [
"MIT"
] | null | null | null | defmodule <%= app_module %> 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 = [<%= if ecto do %>
# Start the Ecto ... | 34.40625 | 95 | 0.676658 |
1ce3ce577b9f83b86f95ccc3b8127e86bdaa5ecb | 254 | exs | Elixir | Books/Programming_Elixir-Dave_Thomas/ch_14/spawn/pmap.exs | cjschneider2/book_example_problems | 18192a6d3ddb4371b79f88e4ab3444d25f2e1ce0 | [
"Unlicense"
] | null | null | null | Books/Programming_Elixir-Dave_Thomas/ch_14/spawn/pmap.exs | cjschneider2/book_example_problems | 18192a6d3ddb4371b79f88e4ab3444d25f2e1ce0 | [
"Unlicense"
] | null | null | null | Books/Programming_Elixir-Dave_Thomas/ch_14/spawn/pmap.exs | cjschneider2/book_example_problems | 18192a6d3ddb4371b79f88e4ab3444d25f2e1ce0 | [
"Unlicense"
] | null | null | null | defmodule Parallel do
def pmap(collection, fun) do
me = self
collection
|> Enum.map( fn (elem) -> spawn_link fn -> (send me, {self, fun.(elem)}) end end )
|> Enum.map( fn (pid) -> receive do {^pid, result} -> result end end )
end
end
| 28.222222 | 86 | 0.602362 |
1ce40f0be706bc82ff4036ba00c7ae85d5b5f7a2 | 154 | exs | Elixir | test/test_helper.exs | wholroyd/fake-elixir | 9d67431d12da9f3500fd62a000d76408c40f3b66 | [
"Apache-2.0"
] | null | null | null | test/test_helper.exs | wholroyd/fake-elixir | 9d67431d12da9f3500fd62a000d76408c40f3b66 | [
"Apache-2.0"
] | null | null | null | test/test_helper.exs | wholroyd/fake-elixir | 9d67431d12da9f3500fd62a000d76408c40f3b66 | [
"Apache-2.0"
] | null | null | null | ExUnit.start
Mix.Task.run "ecto.create", ["--quiet"]
Mix.Task.run "ecto.migrate", ["--quiet"]
Ecto.Adapters.SQL.begin_test_transaction(FakeElixir.Repo)
| 22 | 57 | 0.733766 |
1ce425a1cf2c2907e7e93318d05f02ac07ecbbe0 | 2,266 | ex | Elixir | clients/datastream/lib/google_api/datastream/v1/model/oracle_profile.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/datastream/lib/google_api/datastream/v1/model/oracle_profile.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/datastream/lib/google_api/datastream/v1/model/oracle_profile.ex | dazuma/elixir-google-api | 6a9897168008efe07a6081d2326735fe332e522c | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 36.548387 | 110 | 0.688879 |
1ce4462ca674929c07b6a72fdeff20820db9e978 | 781 | ex | Elixir | web/channels/routine_channel.ex | mcousillas6/BioMonitor | 312a903fe19751b6896aca9346340ea502397350 | [
"MIT"
] | null | null | null | web/channels/routine_channel.ex | mcousillas6/BioMonitor | 312a903fe19751b6896aca9346340ea502397350 | [
"MIT"
] | null | null | null | web/channels/routine_channel.ex | mcousillas6/BioMonitor | 312a903fe19751b6896aca9346340ea502397350 | [
"MIT"
] | null | null | null | defmodule BioMonitor.RoutineChannel do
@moduledoc """
Channel used to broadcast all updates for the sensors status.
* Sensor status updates.
* Errors.
"""
use BioMonitor.Web, :channel
intercept(["update", "alert", "started", "stopped"])
def join("routine", _payload, socket) do
{:ok, socket}... | 22.970588 | 65 | 0.659411 |
1ce45e8c508154780e8444007dbe73c0eb3b0759 | 382 | ex | Elixir | lib/radiator/task/supervisor.ex | bhtabor/radiator | 39c137a18d36d6f418f9d1ffb7aa2c99011d66cf | [
"MIT"
] | 92 | 2019-01-03T11:46:23.000Z | 2022-02-19T21:28:44.000Z | lib/radiator/task/supervisor.ex | bhtabor/radiator | 39c137a18d36d6f418f9d1ffb7aa2c99011d66cf | [
"MIT"
] | 350 | 2019-04-11T07:55:51.000Z | 2021-08-03T11:19:05.000Z | lib/radiator/task/supervisor.ex | bhtabor/radiator | 39c137a18d36d6f418f9d1ffb7aa2c99011d66cf | [
"MIT"
] | 10 | 2019-04-18T12:47:27.000Z | 2022-01-25T20:49:15.000Z | defmodule Radiator.Task.Supervisor do
@moduledoc false
use Supervisor
def start_link(opts \\ []) do
Supervisor.start_link(__MODULE__, :ok, [name: __MODULE__] ++ opts)
end
@impl true
def init(_init_arg) do
children = [
Radiator.Task.TaskManager,
Radiator.Task.WorkerSupervisor
]
... | 19.1 | 70 | 0.691099 |
1ce46267d7b82a79579c76130991461475a91b37 | 12,120 | ex | Elixir | lib/phoenix/live_dashboard/router.ex | geometerio/phoenix_live_dashboard | 349ab9e60e3a0fce7e35a024e1dddcc1715f1ed0 | [
"MIT"
] | null | null | null | lib/phoenix/live_dashboard/router.ex | geometerio/phoenix_live_dashboard | 349ab9e60e3a0fce7e35a024e1dddcc1715f1ed0 | [
"MIT"
] | 4 | 2021-03-04T13:00:52.000Z | 2021-03-12T12:42:09.000Z | deps/phoenix_live_dashboard/lib/phoenix/live_dashboard/router.ex | adrianomota/blog | ef3b2d2ed54f038368ead8234d76c18983caa75b | [
"MIT"
] | null | null | null | defmodule Phoenix.LiveDashboard.Router do
@moduledoc """
Provides LiveView routing for LiveDashboard.
"""
@doc """
Defines a LiveDashboard route.
It expects the `path` the dashboard will be mounted at
and a set of options.
This will also generate a named helper called `live_dashboard_path/2`
which ... | 31.156812 | 103 | 0.62302 |
1ce4862f2edb9c8624b91e4ac805e40f5c219518 | 6,417 | ex | Elixir | lib/commerce_cure/data_type/payment_card.ex | auroche/commerce_cure | 82e2d60d1044f86dd2f491f4713a31132d709ccf | [
"MIT"
] | null | null | null | lib/commerce_cure/data_type/payment_card.ex | auroche/commerce_cure | 82e2d60d1044f86dd2f491f4713a31132d709ccf | [
"MIT"
] | null | null | null | lib/commerce_cure/data_type/payment_card.ex | auroche/commerce_cure | 82e2d60d1044f86dd2f491f4713a31132d709ccf | [
"MIT"
] | null | null | null | defmodule CommerceCure.PaymentCard do
alias __MODULE__
alias CommerceCure.PaymentCardNumber
alias CommerceCure.{ExpiryDate, Year, Month, Name}
@type t :: %__MODULE__{
number: PaymentCardNumber.number,
first_name: Name.first_name,
last_name: Name.last_name,
... | 34.875 | 155 | 0.64672 |
1ce4a843ffb75bbbb2befb315a00e0396c173c67 | 327 | ex | Elixir | lib/nsq/producer_supervisor.ex | amokan/elixir_nsq | 26e9cdf8f6c99b6688e540181a501f53aa5e9e4b | [
"MIT"
] | 89 | 2015-11-17T01:15:02.000Z | 2022-01-31T20:17:17.000Z | lib/nsq/producer_supervisor.ex | amokan/elixir_nsq | 26e9cdf8f6c99b6688e540181a501f53aa5e9e4b | [
"MIT"
] | 20 | 2016-06-17T14:15:22.000Z | 2019-09-23T13:31:18.000Z | lib/nsq/producer_supervisor.ex | amokan/elixir_nsq | 26e9cdf8f6c99b6688e540181a501f53aa5e9e4b | [
"MIT"
] | 33 | 2016-01-28T15:20:43.000Z | 2021-12-18T14:36:19.000Z | defmodule NSQ.ProducerSupervisor do
use Supervisor
def start_link(topic, config, opts \\ []) do
Supervisor.start_link(__MODULE__, {topic, config}, opts)
end
def init({topic, config}) do
children = [
worker(NSQ.Producer, [topic, config])
]
supervise(children, strategy: :one_for_one)
e... | 19.235294 | 60 | 0.675841 |
1ce4ccde59afab7ad4dbc2dc4a48cd604647fe05 | 1,716 | ex | Elixir | clients/games/lib/google_api/games/v1/model/room_client_address.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/games/lib/google_api/games/v1/model/room_client_address.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/games/lib/google_api/games/v1/model/room_client_address.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | 1 | 2020-11-10T16:58:27.000Z | 2020-11-10T16:58:27.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 33.647059 | 146 | 0.738928 |
1ce517a3783a028afe8e6a179134c7575a65d95b | 6,582 | ex | Elixir | clients/run/lib/google_api/run/v1/model/policy.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/run/lib/google_api/run/v1/model/policy.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/run/lib/google_api/run/v1/model/policy.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 41.658228 | 157 | 0.674719 |
1ce524628983c907008b4597b823605cffc6e950 | 2,825 | ex | Elixir | lib/day11.ex | ntwyman/aoc_2019 | 444dfd58ce9272d79a511785d24d5ba8443a2dfa | [
"MIT"
] | null | null | null | lib/day11.ex | ntwyman/aoc_2019 | 444dfd58ce9272d79a511785d24d5ba8443a2dfa | [
"MIT"
] | null | null | null | lib/day11.ex | ntwyman/aoc_2019 | 444dfd58ce9272d79a511785d24d5ba8443a2dfa | [
"MIT"
] | null | null | null | defmodule Day11 do
defmodule Pos do
defstruct x: 0, y: 0
end
@spec do_turn(atom, integer) :: atom
defp do_turn(direction, turn) do
case turn do
# left
0 ->
case direction do
:up -> :left
:right -> :up
:down -> :right
:left -> :down
end... | 24.565217 | 90 | 0.532389 |
1ce57a45e5e1d2447964d40b184e853b8af456bb | 509 | ex | Elixir | example/lib/live_phone_example_web/views/error_view.ex | workwithmax/live_phone | 1a5482a9032735dd201f2468643145f1ee0a3588 | [
"MIT"
] | 3 | 2021-02-28T22:27:58.000Z | 2021-12-08T03:18:10.000Z | example/lib/live_phone_example_web/views/error_view.ex | whitepaperclip/live_phone | bda5d554dd7d3df313fa15cd71eb2bcb8acda897 | [
"MIT"
] | 25 | 2021-02-26T16:15:46.000Z | 2022-03-24T08:10:51.000Z | example/lib/live_phone_example_web/views/error_view.ex | workwithmax/live_phone | 1a5482a9032735dd201f2468643145f1ee0a3588 | [
"MIT"
] | 2 | 2020-11-27T17:33:52.000Z | 2021-01-25T16:05:16.000Z | defmodule LivePhoneExampleWeb.ErrorView do
use LivePhoneExampleWeb, :view
# If you want to customize a particular status code
# for a certain format, you may uncomment below.
# def render("500.html", _assigns) do
# "Internal Server Error"
# end
# By default, Phoenix returns the status message from
#... | 29.941176 | 61 | 0.744597 |
1ce57d9fe18273ebfa9278abac18725f6f1952dc | 1,953 | ex | Elixir | lib/web/controllers/sync_controller.ex | leonardocouy/accent | 29fb324395ff998cc5cdc6947c60070ffabe647c | [
"BSD-3-Clause"
] | null | null | null | lib/web/controllers/sync_controller.ex | leonardocouy/accent | 29fb324395ff998cc5cdc6947c60070ffabe647c | [
"BSD-3-Clause"
] | null | null | null | lib/web/controllers/sync_controller.ex | leonardocouy/accent | 29fb324395ff998cc5cdc6947c60070ffabe647c | [
"BSD-3-Clause"
] | null | null | null | defmodule Accent.SyncController do
use Plug.Builder
import Canary.Plugs
alias Movement.Builders.ProjectSync, as: SyncBuilder
alias Movement.Persisters.ProjectSync, as: SyncPersister
alias Movement.Comparers.Sync, as: SyncComparer
alias Accent.Project
alias Accent.Hook.Context, as: HookContext
plug(Pl... | 25.038462 | 75 | 0.651306 |
1ce58ab250832f1e20ad8503a3b4a0ef0e4430fd | 289 | ex | Elixir | test/support/qux.ex | garthk/notion | 08c6288659c23e47f97fbd6c0a9dfbd8bc28019e | [
"MIT"
] | 12 | 2019-06-15T09:08:01.000Z | 2021-11-10T04:25:28.000Z | test/support/qux.ex | garthk/notion | 08c6288659c23e47f97fbd6c0a9dfbd8bc28019e | [
"MIT"
] | 11 | 2019-06-16T01:38:25.000Z | 2022-02-13T06:21:51.000Z | test/support/qux.ex | garthk/notion | 08c6288659c23e47f97fbd6c0a9dfbd8bc28019e | [
"MIT"
] | 2 | 2019-06-16T05:43:22.000Z | 2022-02-09T00:31:30.000Z | defmodule Qux do
use Notion, name: :qux, metadata: %{region: "us-west"}
@moduledoc false
@doc "Received an HTTP Request"
@spec http_request(%{latency: integer}, %{}) :: :ok
defevent([:http, :request])
@spec users_signup(integer, %{}) :: :ok
defevent([:users, :signup])
end
| 24.083333 | 56 | 0.643599 |
1ce59b52c84c6eef24f35bf20ea159b335a072d0 | 2,114 | exs | Elixir | test/credo/check/warning/operation_on_same_values_test.exs | codeclimate-community/credo | b960a25d604b4499a2577321f9d61b39dc4b0437 | [
"MIT"
] | null | null | null | test/credo/check/warning/operation_on_same_values_test.exs | codeclimate-community/credo | b960a25d604b4499a2577321f9d61b39dc4b0437 | [
"MIT"
] | null | null | null | test/credo/check/warning/operation_on_same_values_test.exs | codeclimate-community/credo | b960a25d604b4499a2577321f9d61b39dc4b0437 | [
"MIT"
] | 1 | 2020-09-25T11:48:49.000Z | 2020-09-25T11:48:49.000Z | defmodule Credo.Check.Warning.OperationOnSameValuesTest do
use Credo.TestHelper
@described_check Credo.Check.Warning.OperationOnSameValues
#
# cases NOT raising issues
#
test "it should NOT report expected code" do
"""
defmodule CredoSampleModule do
use ExUnit.Case
def some_fun do
... | 19.943396 | 67 | 0.578051 |
1ce5ce3d8e1eb5f9f89985883be37653ca0ba2c4 | 1,238 | ex | Elixir | lib/job_board_web/controllers/config_controller.ex | TDogVoid/job_board | 23793917bd1cc4e68bccce737b971093030a31eb | [
"MIT"
] | null | null | null | lib/job_board_web/controllers/config_controller.ex | TDogVoid/job_board | 23793917bd1cc4e68bccce737b971093030a31eb | [
"MIT"
] | null | null | null | lib/job_board_web/controllers/config_controller.ex | TDogVoid/job_board | 23793917bd1cc4e68bccce737b971093030a31eb | [
"MIT"
] | null | null | null | defmodule JobBoardWeb.ConfigController do
use JobBoardWeb, :controller
alias JobBoard.Siteconfigs
plug JobBoardWeb.Plugs.RequireAuth
plug JobBoardWeb.Plugs.RequireAdmin
def index(conn, _params) do
configs = Siteconfigs.list_configs()
render(conn, "index.html", configs: configs, pagetitle: "Config ... | 29.47619 | 97 | 0.675283 |
1ce5d380510f5a262e6041feae31f8b115ffe078 | 730 | ex | Elixir | lib/obelisk/assets.ex | knewter/obelisk | 360425914d36c1c6094820ae035a4555a177ed00 | [
"MIT"
] | 1 | 2017-04-04T15:44:25.000Z | 2017-04-04T15:44:25.000Z | lib/obelisk/assets.ex | knewter/obelisk | 360425914d36c1c6094820ae035a4555a177ed00 | [
"MIT"
] | null | null | null | lib/obelisk/assets.ex | knewter/obelisk | 360425914d36c1c6094820ae035a4555a177ed00 | [
"MIT"
] | null | null | null | defmodule Obelisk.Assets do
alias Obelisk.Config
def copy, do: File.cp_r("./themes/#{Config.config.theme}/assets", "./build/assets")
def css_files do
File.ls!("./build/assets/css")
|> Enum.sort
|> Enum.map(&("assets/css/#{&1}"))
|> Enum.filter(&(!File.dir? "./build/#{&1}"))
end
def js_files... | 22.121212 | 85 | 0.541096 |
1ce61298e509bc3869295abf6ece14da44a4f727 | 3,160 | ex | Elixir | clients/policy_troubleshooter/lib/google_api/policy_troubleshooter/v1beta/model/google_iam_v1_audit_config.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/policy_troubleshooter/lib/google_api/policy_troubleshooter/v1beta/model/google_iam_v1_audit_config.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/policy_troubleshooter/lib/google_api/policy_troubleshooter/v1beta/model/google_iam_v1_audit_config.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... | 57.454545 | 1,106 | 0.754114 |
1ce616c25c2ac061963da6afa8ef0a53c3f4edfd | 847 | ex | Elixir | lib/ash_audit_log/transformers/add_relationship.ex | zimt28/ash_audit_log | cabb2cd19d3ca3139c8beaf17b16aa7dad339947 | [
"MIT"
] | null | null | null | lib/ash_audit_log/transformers/add_relationship.ex | zimt28/ash_audit_log | cabb2cd19d3ca3139c8beaf17b16aa7dad339947 | [
"MIT"
] | 2 | 2021-01-23T14:43:15.000Z | 2021-01-23T14:58:07.000Z | lib/ash_audit_log/transformers/add_relationship.ex | zimt28/ash_audit_log | cabb2cd19d3ca3139c8beaf17b16aa7dad339947 | [
"MIT"
] | null | null | null | defmodule AshAuditLog.Transformers.AddRelationship do
@moduledoc "Adds a relationship to the resource"
use Ash.Dsl.Transformer
import AshAuditLog, only: [private?: 1]
import AshAuditLog.Resource, only: [audit_log_module: 1]
alias Ash.Dsl.Transformer
def before?(Ash.Api.Transformers.EnsureResourcesCompile... | 27.322581 | 71 | 0.696576 |
1ce6317760328afa6e6c4a48cc35f2530cca4935 | 112 | ex | Elixir | lib/domain/repo.ex | ideaMarcos/portishead | 0ad09af305e1e663c0d080a9637b8420d0f40fd1 | [
"MIT"
] | 3 | 2020-03-09T04:29:49.000Z | 2020-07-14T16:09:50.000Z | lib/domain/repo.ex | ideaMarcos/portishead | 0ad09af305e1e663c0d080a9637b8420d0f40fd1 | [
"MIT"
] | null | null | null | lib/domain/repo.ex | ideaMarcos/portishead | 0ad09af305e1e663c0d080a9637b8420d0f40fd1 | [
"MIT"
] | null | null | null | defmodule Portishead.Repo do
use Ecto.Repo,
otp_app: :portishead,
adapter: Ecto.Adapters.Postgres
end
| 18.666667 | 35 | 0.741071 |
1ce649d6f4781992e3c307a8367aa54b9136305d | 160 | exs | Elixir | day_1_inverse_captcha/elixir/inverse_captcha/test/inverse_captcha_test.exs | cjschneider2/advent_of_code_2017 | db7907ecb7df22a1173ec4162676a71f4e5d45e8 | [
"MIT"
] | null | null | null | day_1_inverse_captcha/elixir/inverse_captcha/test/inverse_captcha_test.exs | cjschneider2/advent_of_code_2017 | db7907ecb7df22a1173ec4162676a71f4e5d45e8 | [
"MIT"
] | null | null | null | day_1_inverse_captcha/elixir/inverse_captcha/test/inverse_captcha_test.exs | cjschneider2/advent_of_code_2017 | db7907ecb7df22a1173ec4162676a71f4e5d45e8 | [
"MIT"
] | null | null | null | defmodule InverseCaptchaTest do
use ExUnit.Case
doctest InverseCaptcha
test "greets the world" do
assert InverseCaptcha.hello() == :world
end
end
| 16 | 43 | 0.74375 |
1ce69b7b4389686dfdefe262fd067912f91f64d9 | 17,308 | ex | Elixir | lib/scenic/components.ex | milmazz/scenic | 551050797721bda38fcb54188fe362abbc68ddc7 | [
"Apache-2.0"
] | null | null | null | lib/scenic/components.ex | milmazz/scenic | 551050797721bda38fcb54188fe362abbc68ddc7 | [
"Apache-2.0"
] | null | null | null | lib/scenic/components.ex | milmazz/scenic | 551050797721bda38fcb54188fe362abbc68ddc7 | [
"Apache-2.0"
] | null | null | null | #
# Created by Boyd Multerer April 30, 2018.
# Copyright © 2018 Kry10 Industries. All rights reserved.
#
# convenience functions for adding basic components to a graph.
# this module should be updated as new base components are added
defmodule Scenic.Components do
alias Scenic.Component
alias Scenic.Primitive
... | 30.311734 | 98 | 0.661833 |
1ce69dece2e24a724955698e5bf54a37aea22a15 | 1,807 | ex | Elixir | lib/boundary/mix/tasks/find_external_deps.ex | randycoulman/boundary | 2fdea46e702400c152670262d5ca1f31edbd4fa1 | [
"MIT"
] | 490 | 2019-09-07T10:33:15.000Z | 2022-03-30T09:50:03.000Z | lib/boundary/mix/tasks/find_external_deps.ex | randycoulman/boundary | 2fdea46e702400c152670262d5ca1f31edbd4fa1 | [
"MIT"
] | 35 | 2019-09-07T10:49:25.000Z | 2022-03-18T10:02:34.000Z | lib/boundary/mix/tasks/find_external_deps.ex | randycoulman/boundary | 2fdea46e702400c152670262d5ca1f31edbd4fa1 | [
"MIT"
] | 16 | 2019-09-08T15:09:16.000Z | 2022-02-12T21:40:14.000Z | defmodule Mix.Tasks.Boundary.FindExternalDeps do
@shortdoc "Prints information about external dependencies of all application boundaries."
@moduledoc """
Prints information about external dependencies of all application boundaries.
Note that `:stdlib`, `:kernel`, `:elixir`, and `:boundary` will not be include... | 29.145161 | 113 | 0.643055 |
1ce69fa7c4798386b31572123ed10977899247b4 | 1,924 | exs | Elixir | test/judgment_test.exs | MieuxVoter/majority-judgment-library-elixir | 0dd2cb1553d88dedd85585af4046a789c364143d | [
"MIT"
] | null | null | null | test/judgment_test.exs | MieuxVoter/majority-judgment-library-elixir | 0dd2cb1553d88dedd85585af4046a789c364143d | [
"MIT"
] | 1 | 2021-10-18T02:40:58.000Z | 2021-10-18T02:40:58.000Z | test/judgment_test.exs | MieuxVoter/majority-judgment-library-elixir | 0dd2cb1553d88dedd85585af4046a789c364143d | [
"MIT"
] | null | null | null | defmodule JudgmentTest do
use ExUnit.Case
doctest Judgment
# test "WTF is IO.inspect doing?" do
# [13, 13, 13, 13, 13]
# |> IO.inspect(label: "WTF with lucky 13")
# # > '\r\r\r\r\r'
# # Yeah… right.
#
# for i <- 0..20 do
# [i, i, i, i, i]
# |> IO.inspect(label: "WTF wi... | 29.151515 | 79 | 0.523909 |
1ce6a34274c92c2f829a823f63a453212dc902e6 | 218 | exs | Elixir | priv/repo/migrations/20160329062749_add_role_id_to_users.exs | davepersing/blog_engine | 8605732f72c169d6cc2c2261a9acef0de7769403 | [
"MIT"
] | null | null | null | priv/repo/migrations/20160329062749_add_role_id_to_users.exs | davepersing/blog_engine | 8605732f72c169d6cc2c2261a9acef0de7769403 | [
"MIT"
] | null | null | null | priv/repo/migrations/20160329062749_add_role_id_to_users.exs | davepersing/blog_engine | 8605732f72c169d6cc2c2261a9acef0de7769403 | [
"MIT"
] | null | null | null | defmodule BlogEngine.Repo.Migrations.AddRoleIdToUsers do
use Ecto.Migration
def change do
alter table(:users) do
add :role_id, references(:roles)
end
create index(:users, [:role_id])
end
end
| 19.818182 | 56 | 0.697248 |
1ce6a5a7c063af17b035d220172f8e3425110868 | 1,538 | ex | Elixir | lib/river/flags.ex | peburrows/river | e8968535d02a86e70a7942a690c8e461fed55913 | [
"MIT"
] | 86 | 2016-08-19T21:59:28.000Z | 2022-01-31T20:14:18.000Z | lib/river/flags.ex | peburrows/river | e8968535d02a86e70a7942a690c8e461fed55913 | [
"MIT"
] | 7 | 2016-09-27T14:44:16.000Z | 2017-08-08T14:57:45.000Z | lib/river/flags.ex | peburrows/river | e8968535d02a86e70a7942a690c8e461fed55913 | [
"MIT"
] | 4 | 2016-09-26T10:57:24.000Z | 2018-04-03T14:30:19.000Z | defmodule River.Flags do
use Bitwise
require River.FrameTypes
alias River.{Frame, FrameTypes}
def encode(%{} = flags) do
flags
|> Enum.filter(fn {_k, v} -> v end)
|> Enum.map(fn {k, _v} -> key_to_val(k) end)
|> Enum.reduce(0, fn el, acc -> el ||| acc end)
end
def flags(FrameTypes.settings(... | 23.661538 | 74 | 0.59883 |
1ce6b5c49633dff907524cff98a505baf94a4bf4 | 69 | ex | Elixir | test/support/test_repo.ex | mazz/beepbop | 9d5930a870904fd84c317d3c2865d6b1c9a1080c | [
"MIT"
] | 3 | 2018-03-26T14:04:26.000Z | 2018-12-09T11:53:18.000Z | test/support/test_repo.ex | mazz/beepbop | 9d5930a870904fd84c317d3c2865d6b1c9a1080c | [
"MIT"
] | 6 | 2018-04-16T13:07:18.000Z | 2018-06-25T09:54:47.000Z | test/support/test_repo.ex | mazz/beepbop | 9d5930a870904fd84c317d3c2865d6b1c9a1080c | [
"MIT"
] | 6 | 2019-04-01T07:58:56.000Z | 2022-03-13T16:08:05.000Z | defmodule BeepBop.TestRepo do
use Ecto.Repo, otp_app: :beepbop
end
| 17.25 | 34 | 0.782609 |
1ce6ce953d8e4b6807bbf310f37156fc5e2ae753 | 22,053 | ex | Elixir | lib/tortoise/connection.ex | lucaong/tortoise | fd2f83527937ba39b47f58eb8d392a1aa927e28f | [
"Apache-2.0"
] | null | null | null | lib/tortoise/connection.ex | lucaong/tortoise | fd2f83527937ba39b47f58eb8d392a1aa927e28f | [
"Apache-2.0"
] | null | null | null | lib/tortoise/connection.ex | lucaong/tortoise | fd2f83527937ba39b47f58eb8d392a1aa927e28f | [
"Apache-2.0"
] | null | null | null | defmodule Tortoise.Connection do
@moduledoc """
Establish a connection to a MQTT broker.
Todo.
"""
use GenServer
require Logger
defstruct [:client_id, :connect, :server, :status, :backoff, :subscriptions, :keep_alive, :opts]
alias __MODULE__, as: State
alias Tortoise.{Transport, Connection, Packa... | 33.112613 | 98 | 0.649027 |
1ce6e7704d2f67822b4c38d35a310683bc196054 | 64 | ex | Elixir | lib/kirby_web/views/user_session_view.ex | prefeitura-municipal-campos/kirby | 290835751a28cd7e39be2e721de243e495273be7 | [
"BSD-3-Clause"
] | null | null | null | lib/kirby_web/views/user_session_view.ex | prefeitura-municipal-campos/kirby | 290835751a28cd7e39be2e721de243e495273be7 | [
"BSD-3-Clause"
] | null | null | null | lib/kirby_web/views/user_session_view.ex | prefeitura-municipal-campos/kirby | 290835751a28cd7e39be2e721de243e495273be7 | [
"BSD-3-Clause"
] | null | null | null | defmodule KirbyWeb.UserSessionView do
use KirbyWeb, :view
end
| 16 | 37 | 0.8125 |
1ce6eaa436422fedebee6b933ce0e8de495eec62 | 1,617 | ex | Elixir | clients/docs/lib/google_api/docs/v1/model/shading_suggestion_state.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/docs/lib/google_api/docs/v1/model/shading_suggestion_state.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/docs/lib/google_api/docs/v1/model/shading_suggestion_state.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... | 34.404255 | 166 | 0.749536 |
1ce6eb080be66e3045660f2157ddf1ba40861fc8 | 328 | exs | Elixir | config/test.exs | matrinox/absinthe_phoenix | e0ae14c04a55550f9cd7a6845583ad0bcce79305 | [
"MIT"
] | 263 | 2016-05-12T21:26:08.000Z | 2022-03-29T04:06:46.000Z | config/test.exs | matrinox/absinthe_phoenix | e0ae14c04a55550f9cd7a6845583ad0bcce79305 | [
"MIT"
] | 79 | 2017-06-25T08:18:46.000Z | 2021-12-14T15:13:06.000Z | config/test.exs | matrinox/absinthe_phoenix | e0ae14c04a55550f9cd7a6845583ad0bcce79305 | [
"MIT"
] | 86 | 2016-05-19T09:52:32.000Z | 2022-03-26T13:46:52.000Z | use Mix.Config
config :logger, level: :warn
config :absinthe_phoenix, Absinthe.Phoenix.TestEndpoint,
url: [host: "localhost"],
root: Path.dirname(__DIR__),
secret_key_base: "GSGmIoMRxcLfHBfBhtD/Powy7WaucKbLuB7BTMt41nkm5xS+8LfnXZYNsk6qKOo1",
render_errors: [accepts: ~w(json)],
pubsub_server: Absinthe.Phoenix... | 29.818182 | 86 | 0.780488 |
1ce6fbddab35eef2616cee1bc52b5b08a302454d | 2,166 | ex | Elixir | lib/mix/tasks/ecto.drop.ex | jccf091/ecto | 42d47a6da0711f842e1a0e6724a89b318b9b2144 | [
"Apache-2.0"
] | 1 | 2017-11-27T06:00:32.000Z | 2017-11-27T06:00:32.000Z | lib/mix/tasks/ecto.drop.ex | jccf091/ecto | 42d47a6da0711f842e1a0e6724a89b318b9b2144 | [
"Apache-2.0"
] | null | null | null | lib/mix/tasks/ecto.drop.ex | jccf091/ecto | 42d47a6da0711f842e1a0e6724a89b318b9b2144 | [
"Apache-2.0"
] | null | null | null | defmodule Mix.Tasks.Ecto.Drop do
use Mix.Task
import Mix.Ecto
@shortdoc "Drops the repository storage"
@default_opts [force: false]
@moduledoc """
Drop the storage for the given repository.
The repositories to create are the ones specified under the
`:ecto_repos` option in the current app configurati... | 30.083333 | 98 | 0.643121 |
1ce7004fbf82857c8d905aa493f4a6f9dea73ed9 | 324 | ex | Elixir | lib/arrow/field.ex | nyo16/elixir-arrow | 655b14ac412716c29aa33d0fab178577e3eca330 | [
"Apache-2.0"
] | 16 | 2021-03-21T14:59:33.000Z | 2022-03-11T01:52:16.000Z | lib/arrow/field.ex | nyo16/elixir-arrow | 655b14ac412716c29aa33d0fab178577e3eca330 | [
"Apache-2.0"
] | null | null | null | lib/arrow/field.ex | nyo16/elixir-arrow | 655b14ac412716c29aa33d0fab178577e3eca330 | [
"Apache-2.0"
] | 3 | 2021-09-02T03:25:08.000Z | 2022-03-11T01:53:01.000Z | defmodule Arrow.Field do
@enforce_keys [:name, :data_type, :nullable]
defstruct [:name, :data_type, :nullable, :metadata, dict_id: 0, dict_is_ordered: false]
def from_column({name, values}) do
type = Arrow.Type.infer(values)
%Arrow.Field{name: Atom.to_string(name), data_type: type, nullable: true}
end
... | 32.4 | 89 | 0.716049 |
1ce701d4c1d400a4f93e8c0d0ba2be1b1c51f118 | 1,472 | ex | Elixir | lib/ash/notifier/pub_sub/publication.ex | kyle5794/ash | 82023da84400366d07001593673d1aaa2a418803 | [
"MIT"
] | null | null | null | lib/ash/notifier/pub_sub/publication.ex | kyle5794/ash | 82023da84400366d07001593673d1aaa2a418803 | [
"MIT"
] | null | null | null | lib/ash/notifier/pub_sub/publication.ex | kyle5794/ash | 82023da84400366d07001593673d1aaa2a418803 | [
"MIT"
] | null | null | null | defmodule Ash.Notifier.PubSub.Publication do
@moduledoc "Represents an individual publication setup"
defstruct [
:action,
:topic,
:event,
:type
]
@schema [
action: [
type: :atom,
doc: "The name of the action that should be published",
required: true
],
topic: [
... | 24.131148 | 110 | 0.605299 |
1ce7742fbbeef3ec9490344b7e80f28b33d62952 | 1,834 | exs | Elixir | clients/cloud_profiler/mix.exs | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/cloud_profiler/mix.exs | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/cloud_profiler/mix.exs | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 27.373134 | 105 | 0.658124 |
1ce77d20a27be7ce92d311fa55b6eee61a0225d9 | 3,633 | exs | Elixir | test/recurly/webhooks/new_subscription_notification_test.exs | calibr/recurly-client-elixir | a1160a10f90e0919adacf39bd95df3784e11fdcc | [
"MIT"
] | 8 | 2016-08-11T00:45:46.000Z | 2020-05-04T18:55:48.000Z | test/recurly/webhooks/new_subscription_notification_test.exs | calibr/recurly-client-elixir | a1160a10f90e0919adacf39bd95df3784e11fdcc | [
"MIT"
] | 10 | 2016-08-15T20:01:56.000Z | 2019-05-10T02:09:35.000Z | test/recurly/webhooks/new_subscription_notification_test.exs | calibr/recurly-client-elixir | a1160a10f90e0919adacf39bd95df3784e11fdcc | [
"MIT"
] | 4 | 2017-10-16T14:29:58.000Z | 2019-05-09T23:20:56.000Z | defmodule Recurly.Webhooks.NewSubscriptionNotificationTest do
use ExUnit.Case, async: true
alias Recurly.{Webhooks,Account,Subscription,Plan,SubscriptionAddOn}
test "correctly parses payload" do
xml_doc = """
<new_subscription_notification>
<account>
<account_code>1</account_code>
... | 46.576923 | 101 | 0.649876 |
1ce796bdd908da19050e8b3942d8dd5a851bd940 | 1,616 | ex | Elixir | farmbot_os/lib/farmbot_os/sys_calls/change_ownership.ex | SeppPenner/farmbot_os | 39ba5c5880f8aef71792e2c009514bed1177089c | [
"MIT"
] | 1 | 2019-08-06T11:51:48.000Z | 2019-08-06T11:51:48.000Z | farmbot_os/lib/farmbot_os/sys_calls/change_ownership.ex | SeppPenner/farmbot_os | 39ba5c5880f8aef71792e2c009514bed1177089c | [
"MIT"
] | null | null | null | farmbot_os/lib/farmbot_os/sys_calls/change_ownership.ex | SeppPenner/farmbot_os | 39ba5c5880f8aef71792e2c009514bed1177089c | [
"MIT"
] | null | null | null | defmodule FarmbotOS.SysCalls.ChangeOwnership do
@moduledoc false
require Logger
require FarmbotCore.Logger
import FarmbotCore.Config, only: [get_config_value: 3, update_config_value: 4]
alias FarmbotCore.{Asset, EctoMigrator}
alias FarmbotExt.Bootstrap.Authorization
def change_ownership(email, secret, se... | 34.382979 | 91 | 0.704827 |
1ce7bbaa6f10d02f1db5b55c220f7e1c49085896 | 72 | ex | Elixir | lib/super_issuer_web/views/lottery_view.ex | WeLightProject/WeLight-Portal | 6e701469423e3a62affdc415c4e8c186d603d324 | [
"MIT"
] | 2 | 2021-02-12T09:21:56.000Z | 2021-02-22T08:52:20.000Z | lib/super_issuer_web/views/lottery_view.ex | WeLightProject/WeLight-Portal | 6e701469423e3a62affdc415c4e8c186d603d324 | [
"MIT"
] | 4 | 2021-02-22T08:53:43.000Z | 2021-06-09T09:24:46.000Z | lib/super_issuer_web/views/lottery_view.ex | WeLightProject/WeLight-Portal | 6e701469423e3a62affdc415c4e8c186d603d324 | [
"MIT"
] | null | null | null | defmodule SuperIssuerWeb.LotteryView do
use SuperIssuerWeb, :view
end
| 18 | 39 | 0.833333 |
1ce7cc4058beedb73450d5fe566b101cfb175261 | 87 | ex | Elixir | lib/stripe_app_web/views/coherence/unlock_view.ex | hotpyn/stripe_demo | 2a0ac3ab34a616ffcd6d7e979c25517b5f1636b5 | [
"MIT"
] | null | null | null | lib/stripe_app_web/views/coherence/unlock_view.ex | hotpyn/stripe_demo | 2a0ac3ab34a616ffcd6d7e979c25517b5f1636b5 | [
"MIT"
] | null | null | null | lib/stripe_app_web/views/coherence/unlock_view.ex | hotpyn/stripe_demo | 2a0ac3ab34a616ffcd6d7e979c25517b5f1636b5 | [
"MIT"
] | null | null | null | defmodule StripeAppWeb.Coherence.UnlockView do
use StripeAppWeb.Coherence, :view
end
| 21.75 | 46 | 0.83908 |
1ce7e53d8d013890ca1dd81c105dcee172155371 | 437 | exs | Elixir | apps/test_empty_app_web/test/test_empty_app_web/views/error_view_test.exs | baseballlover723/test_empty_app | fd7046ea8ee88e1c0eefee82fe95aecc7ede3f82 | [
"MIT"
] | null | null | null | apps/test_empty_app_web/test/test_empty_app_web/views/error_view_test.exs | baseballlover723/test_empty_app | fd7046ea8ee88e1c0eefee82fe95aecc7ede3f82 | [
"MIT"
] | null | null | null | apps/test_empty_app_web/test/test_empty_app_web/views/error_view_test.exs | baseballlover723/test_empty_app | fd7046ea8ee88e1c0eefee82fe95aecc7ede3f82 | [
"MIT"
] | null | null | null | defmodule TestEmptyAppWeb.ErrorViewTest do
use TestEmptyAppWeb.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(TestEmptyAppWeb.ErrorView, "404.html", []) == "Not Found"
end
test "renders 500.... | 29.133333 | 97 | 0.745995 |
1ce7f80e8e52a7a2acfcaea89ade13aab4fff802 | 2,327 | exs | Elixir | test/xdr/transactions/muxed_account_med25519_test.exs | einerzg/stellar_base | 2d10c5fc3b8159efc5de10b5c7c665e3b57b3d8f | [
"MIT"
] | 3 | 2021-08-17T20:32:45.000Z | 2022-03-13T20:26:02.000Z | test/xdr/transactions/muxed_account_med25519_test.exs | einerzg/stellar_base | 2d10c5fc3b8159efc5de10b5c7c665e3b57b3d8f | [
"MIT"
] | 45 | 2021-08-12T20:19:41.000Z | 2022-03-27T21:00:10.000Z | test/xdr/transactions/muxed_account_med25519_test.exs | einerzg/stellar_base | 2d10c5fc3b8159efc5de10b5c7c665e3b57b3d8f | [
"MIT"
] | 2 | 2021-09-22T23:11:13.000Z | 2022-01-23T03:19:11.000Z | defmodule StellarBase.XDR.MuxedAccountMed25519Test do
use ExUnit.Case
alias StellarBase.XDR.{UInt64, UInt256, MuxedAccountMed25519}
describe "StellarBase.XDR.MuxedAccountMed25519" do
setup do
account_id =
UInt256.new(
<<18, 27, 249, 51, 160, 215, 152, 50, 153, 222, 53, 177, 115, 224,... | 36.359375 | 97 | 0.63902 |
1ce815389bededce451f3a8d61c68f75af491709 | 260 | ex | Elixir | lib/forus/repo.ex | finalclass/forus | f745d3ef63684b8fa61a904d4032b5ae26931943 | [
"MIT"
] | null | null | null | lib/forus/repo.ex | finalclass/forus | f745d3ef63684b8fa61a904d4032b5ae26931943 | [
"MIT"
] | 1 | 2018-06-19T10:38:48.000Z | 2018-06-19T10:38:48.000Z | lib/forus/repo.ex | finalclass/forus | f745d3ef63684b8fa61a904d4032b5ae26931943 | [
"MIT"
] | null | null | null | defmodule Forus.Repo do
use Ecto.Repo, otp_app: :forus
@doc """
Dynamically loads the repository url from the
DATABASE_URL environment variable.
"""
def init(_, opts) do
{:ok, Keyword.put(opts, :url, System.get_env("DATABASE_URL"))}
end
end
| 21.666667 | 66 | 0.692308 |
1ce8187e4046114abc6d54587442d6bc6775e052 | 3,666 | ex | Elixir | clients/sheets/lib/google_api/sheets/v4/model/waterfall_chart_series.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/sheets/lib/google_api/sheets/v4/model/waterfall_chart_series.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/sheets/lib/google_api/sheets/v4/model/waterfall_chart_series.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... | 56.4 | 283 | 0.7485 |
1ce8a87d83b83b6876f8cb651c9021ae488ada1f | 578 | exs | Elixir | config/prod.exs | phoenixframework/plds | 820600e8da6e13f376f8341cb78868bc189ddad8 | [
"MIT"
] | 60 | 2021-09-13T21:53:34.000Z | 2022-03-09T14:31:36.000Z | config/prod.exs | phoenixframework/plds | 820600e8da6e13f376f8341cb78868bc189ddad8 | [
"MIT"
] | 2 | 2021-09-23T17:13:40.000Z | 2021-11-16T15:57:05.000Z | config/prod.exs | phoenixframework/plds | 820600e8da6e13f376f8341cb78868bc189ddad8 | [
"MIT"
] | 2 | 2021-11-16T10:37:42.000Z | 2022-02-18T19:32:38.000Z | import Config
# For production, don't forget to configure the url host
# to something meaningful, Phoenix uses this information
# when generating URLs.
#
# Note we also include the path to a cache manifest
# containing the digested version of static files. This
# manifest is generated by the `mix phx.digest` task,
# w... | 32.111111 | 56 | 0.752595 |
1ce8aedfd0a9d135aa425a019104a358940fe5cb | 12,257 | ex | Elixir | lib/parent/gen_server.ex | axelson/parent | d85e15a1d9129f4a9dec8a881a67fe50a6264910 | [
"MIT"
] | 200 | 2018-04-08T20:36:15.000Z | 2022-03-12T14:43:46.000Z | lib/parent/gen_server.ex | axelson/parent | d85e15a1d9129f4a9dec8a881a67fe50a6264910 | [
"MIT"
] | 15 | 2018-05-31T11:03:21.000Z | 2022-02-19T21:26:21.000Z | lib/parent/gen_server.ex | axelson/parent | d85e15a1d9129f4a9dec8a881a67fe50a6264910 | [
"MIT"
] | 18 | 2018-05-16T02:09:35.000Z | 2022-02-03T18:56:30.000Z | defmodule Parent.GenServer do
@moduledoc """
GenServer with parenting capabilities powered by `Parent`.
This behaviour can be useful in situations where `Parent.Supervisor` won't suffice.
## Example
The following example is roughly similar to a standard
[callback-based Supervisor](https://hexdocs.pm/elix... | 38.065217 | 105 | 0.694705 |
1ce8e8d5aa3e5872ee8e15b4fa7da252d1aa9252 | 1,778 | ex | Elixir | test/support/model_case.ex | ench0/ex_elasr | a97e182d13bc5de56c370b687771a485e51fc6ea | [
"MIT"
] | null | null | null | test/support/model_case.ex | ench0/ex_elasr | a97e182d13bc5de56c370b687771a485e51fc6ea | [
"MIT"
] | null | null | null | test/support/model_case.ex | ench0/ex_elasr | a97e182d13bc5de56c370b687771a485e51fc6ea | [
"MIT"
] | null | null | null | defmodule Elasr.ModelCase do
@moduledoc """
This module defines the test case to be used by
model tests.
You may define functions here to be used as helpers in
your model tests. See `errors_on/2`'s definition as reference.
Finally, if the test case interacts with the database,
it cannot be async. For th... | 26.939394 | 84 | 0.68279 |
1ce91ca2b8239c6bd1d19314947a42984553f93a | 1,145 | ex | Elixir | apps/tai/lib/tai/venue_adapters/bitmex/stream/process_auth/venue_message.ex | ihorkatkov/tai | 09f9f15d2c385efe762ae138a8570f1e3fd41f26 | [
"MIT"
] | 1 | 2019-12-19T05:16:26.000Z | 2019-12-19T05:16:26.000Z | apps/tai/lib/tai/venue_adapters/bitmex/stream/process_auth/venue_message.ex | ihorkatkov/tai | 09f9f15d2c385efe762ae138a8570f1e3fd41f26 | [
"MIT"
] | null | null | null | apps/tai/lib/tai/venue_adapters/bitmex/stream/process_auth/venue_message.ex | ihorkatkov/tai | 09f9f15d2c385efe762ae138a8570f1e3fd41f26 | [
"MIT"
] | 1 | 2020-05-03T23:32:11.000Z | 2020-05-03T23:32:11.000Z | defmodule Tai.VenueAdapters.Bitmex.Stream.ProcessAuth.VenueMessage do
alias Tai.VenueAdapters.Bitmex.Stream.ProcessAuth
defmodule DefaultProvider do
@empty []
def update_orders(data), do: ProcessAuth.VenueMessages.UpdateOrders.extract(data)
def empty, do: @empty
def unhandled(msg), do: [%ProcessAu... | 38.166667 | 88 | 0.692576 |
1ce932363aa531a8508f921dca13403c3b293a72 | 324 | ex | Elixir | lib/credo/cli/command/list/output/oneline.ex | jlgeering/credo | b952190ed758c262aa0d9bbee01227f9b1f0c63b | [
"MIT"
] | null | null | null | lib/credo/cli/command/list/output/oneline.ex | jlgeering/credo | b952190ed758c262aa0d9bbee01227f9b1f0c63b | [
"MIT"
] | null | null | null | lib/credo/cli/command/list/output/oneline.ex | jlgeering/credo | b952190ed758c262aa0d9bbee01227f9b1f0c63b | [
"MIT"
] | null | null | null | defmodule Credo.CLI.Command.List.Output.Oneline do
alias Credo.CLI.Output.Formatter.Oneline
alias Credo.Execution
def print_before_info(_source_files, _exec), do: nil
def print_after_info(_source_files, exec, _time_load, _time_run) do
exec
|> Execution.get_issues()
|> Oneline.print_issues()
end
... | 24.923077 | 69 | 0.756173 |
1ce968bed44b40158cc32892cade9762c543d9de | 15,016 | ex | Elixir | lib/phoenix_live_component.ex | toranb/phoenix_live_view | 56868d5c3d1e5f6496e838214d1e952e777c4939 | [
"MIT"
] | 1 | 2020-07-26T12:20:43.000Z | 2020-07-26T12:20:43.000Z | lib/phoenix_live_component.ex | mcrumm/phoenix_live_view | ff2313f42444c27e7652ebc5e4ee94ffa619bf85 | [
"MIT"
] | null | null | null | lib/phoenix_live_component.ex | mcrumm/phoenix_live_view | ff2313f42444c27e7652ebc5e4ee94ffa619bf85 | [
"MIT"
] | null | null | null | defmodule Phoenix.LiveComponent do
@moduledoc """
Components are a mechanism to compartmentalize state, markup, and
events in LiveView.
Components are defined by using `Phoenix.LiveComponent` and are used
by calling `Phoenix.LiveView.Helpers.live_component/3` in a parent LiveView.
Components run inside the... | 37.634085 | 92 | 0.688998 |
1ce9e32647cf38dcffc19807527fd678ae6456b3 | 1,260 | exs | Elixir | config/dev.exs | erwald/hangman | 38c8b6cc45bb3bf9f44d6fe5d33714b40dd78d26 | [
"MIT"
] | 1 | 2016-06-28T10:48:46.000Z | 2016-06-28T10:48:46.000Z | config/dev.exs | erwald/hangman | 38c8b6cc45bb3bf9f44d6fe5d33714b40dd78d26 | [
"MIT"
] | null | null | null | config/dev.exs | erwald/hangman | 38c8b6cc45bb3bf9f44d6fe5d33714b40dd78d26 | [
"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 :hangman, Hangman.Endpoint,
http: [port: 4000]... | 29.302326 | 74 | 0.70873 |
1cea0496ca14da009b003430c1b9809fe4facf3b | 1,048 | ex | Elixir | test/support/channel_case.ex | zombalo/cgrates_web_jsonapi | 47845be4311839fe180cc9f2c7c6795649da4430 | [
"MIT"
] | null | null | null | test/support/channel_case.ex | zombalo/cgrates_web_jsonapi | 47845be4311839fe180cc9f2c7c6795649da4430 | [
"MIT"
] | null | null | null | test/support/channel_case.ex | zombalo/cgrates_web_jsonapi | 47845be4311839fe180cc9f2c7c6795649da4430 | [
"MIT"
] | null | null | null | defmodule CgratesWebJsonapi.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 |
1cea63d148a7bda8fb4d9a55e2f076794547e5cd | 552 | ex | Elixir | Microsoft.Azure.Management.Network/lib/microsoft/azure/management/network/model/backend_address_pool.ex | chgeuer/ex_microsoft_azure_management | 99cd9f7f2ff1fdbe69ca5bac55b6e2af91ba3603 | [
"Apache-2.0"
] | 4 | 2018-09-29T03:43:15.000Z | 2021-04-01T18:30:46.000Z | Microsoft.Azure.Management.Network/lib/microsoft/azure/management/network/model/backend_address_pool.ex | chgeuer/ex_microsoft_azure_management | 99cd9f7f2ff1fdbe69ca5bac55b6e2af91ba3603 | [
"Apache-2.0"
] | null | null | null | Microsoft.Azure.Management.Network/lib/microsoft/azure/management/network/model/backend_address_pool.ex | chgeuer/ex_microsoft_azure_management | 99cd9f7f2ff1fdbe69ca5bac55b6e2af91ba3603 | [
"Apache-2.0"
] | null | null | null | # NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
defmodule Microsoft.Azure.Management.Network.Model.BackendAddressPool do
@moduledoc """
Pool of backend IP addresses.
"""
@derive [Poison.Encoder]
... | 21.230769 | 91 | 0.71558 |
1cea8caaf2503d9b399b35f590cdb36c4a1f2c4a | 1,495 | exs | Elixir | test/acceptance/html/block_quotes_test.exs | manuel-rubio/earmark | d747d73d31e8b8fa39389b01fc67cc53d946b707 | [
"Apache-1.1"
] | 734 | 2015-01-05T19:08:00.000Z | 2022-03-28T14:04:21.000Z | test/acceptance/html/block_quotes_test.exs | manuel-rubio/earmark | d747d73d31e8b8fa39389b01fc67cc53d946b707 | [
"Apache-1.1"
] | 343 | 2015-01-01T04:56:57.000Z | 2022-02-15T11:00:57.000Z | test/acceptance/html/block_quotes_test.exs | manuel-rubio/earmark | d747d73d31e8b8fa39389b01fc67cc53d946b707 | [
"Apache-1.1"
] | 169 | 2015-02-26T15:18:05.000Z | 2022-03-18T08:00:42.000Z | defmodule Acceptance.Html.BlockQuotesTest do
use ExUnit.Case, async: true
describe "with breaks: true" do
test "acceptance test 490 with breaks" do
markdown = "> bar\nbaz\n> foo\n"
html = "<blockquote>\n <p>\nbar <br />\nbaz <br />\nfoo </p>\n</blockquote>\n"
assert Earmark.as_htm... | 31.808511 | 122 | 0.553846 |
1ceaa154299ca62e18936655afd89c3782e6786e | 683 | ex | Elixir | lib/phoenix/endpoint/watcher.ex | benjamintanweihao/phoenix | eb4ef03852f447d67cd61355753147c39b520e1f | [
"MIT"
] | null | null | null | lib/phoenix/endpoint/watcher.ex | benjamintanweihao/phoenix | eb4ef03852f447d67cd61355753147c39b520e1f | [
"MIT"
] | null | null | null | lib/phoenix/endpoint/watcher.ex | benjamintanweihao/phoenix | eb4ef03852f447d67cd61355753147c39b520e1f | [
"MIT"
] | null | null | null | defmodule Phoenix.Endpoint.Watcher do
@moduledoc false
require Logger
def start_link(root, cmd, args) do
Task.start_link(__MODULE__, :watch, [root, to_string(cmd), args])
end
def watch(root, cmd, args) do
if exists?(cmd) do
System.cmd(cmd, args, into: IO.stream(:stdio, :line),
... | 25.296296 | 91 | 0.648609 |
1ceaa83ff0b42d1646058e051ac7491e93bc88b4 | 1,474 | ex | Elixir | lib/screens/config/solari/section/layout.ex | mbta/screens | 4b586970f8844b19543bb2ffd4b032a89f6fa40a | [
"MIT"
] | 3 | 2021-07-27T14:11:00.000Z | 2022-01-03T14:16:43.000Z | lib/screens/config/solari/section/layout.ex | mbta/screens | 4b586970f8844b19543bb2ffd4b032a89f6fa40a | [
"MIT"
] | 444 | 2021-03-10T20:57:17.000Z | 2022-03-31T16:00:35.000Z | lib/screens/config/solari/section/layout.ex | mbta/screens | 4b586970f8844b19543bb2ffd4b032a89f6fa40a | [
"MIT"
] | null | null | null | defmodule Screens.Config.Solari.Section.Layout do
@moduledoc false
alias Screens.Config.Solari.Section.Layout.{Bidirectional, Upcoming}
@behaviour Screens.Config.Behaviour
@type t ::
Bidirectional.t()
| Upcoming.t()
@default_type :upcoming
@opts_modules %{
bidirectional: Bidirec... | 21.057143 | 70 | 0.648575 |
1ceb2233b019e75d7a7d29e8fe2ffb7d73898f59 | 1,504 | exs | Elixir | test/local_hex_web/plugs/auth_token_check_test.exs | imsoulfly/local_hex_repo | 18fca51c44b3dd01d27684877b3c7bc13471f548 | [
"Apache-2.0"
] | 5 | 2021-11-13T13:58:06.000Z | 2022-03-26T03:47:57.000Z | test/local_hex_web/plugs/auth_token_check_test.exs | imsoulfly/local_hex_repo | 18fca51c44b3dd01d27684877b3c7bc13471f548 | [
"Apache-2.0"
] | 3 | 2021-11-16T18:45:45.000Z | 2021-12-05T13:58:25.000Z | test/local_hex_web/plugs/auth_token_check_test.exs | imsoulfly/local_hex_repo | 18fca51c44b3dd01d27684877b3c7bc13471f548 | [
"Apache-2.0"
] | null | null | null | defmodule LocalHexWeb.Plugs.AuthTokenCheckTest do
use LocalHexWeb.ConnCase
alias LocalHexWeb.Plugs.AuthTokenCheck
test "init just returns opts" do
opts = [test: :foo]
result = AuthTokenCheck.init(opts)
assert ^opts = result
end
test "call successful with not not matching endpoint" do
conn ... | 25.931034 | 67 | 0.662899 |
1ceb3b6a34bfa01e0a44420f8f2f41df15a66ff3 | 985 | exs | Elixir | test/flatten_and_deepen_test.exs | RobertDober/nested_map | 8b70579401e560929fd5e07c6e6f2c10df7ba084 | [
"Apache-2.0"
] | 1 | 2021-08-23T23:54:35.000Z | 2021-08-23T23:54:35.000Z | test/flatten_and_deepen_test.exs | RobertDober/nested_map | 8b70579401e560929fd5e07c6e6f2c10df7ba084 | [
"Apache-2.0"
] | null | null | null | test/flatten_and_deepen_test.exs | RobertDober/nested_map | 8b70579401e560929fd5e07c6e6f2c10df7ba084 | [
"Apache-2.0"
] | null | null | null | defmodule Test.FlattenAndDeepenTest do
use ExUnit.Case
import NestedMap, only: [deepen: 1, flatten: 1]
import Test.Support.RandomMap
@tests 200
@n 1000
describe "property test" do
(1..@tests)
|> Enum.each(fn test_n ->
expected = rand_flattened_elements(@n) |> deepen()
result =... | 21.888889 | 60 | 0.573604 |
1ceb578965aeb86491469e429192e9d45302771f | 1,348 | exs | Elixir | machine_translation/MorpHIN/Learned/Resources/Set5/TrainingInstances/86.exs | AdityaPrasadMishra/NLP--Project-Group-16 | fb62cc6a1db4a494058171f11c14a2be3933a9a1 | [
"MIT"
] | null | null | null | machine_translation/MorpHIN/Learned/Resources/Set5/TrainingInstances/86.exs | AdityaPrasadMishra/NLP--Project-Group-16 | fb62cc6a1db4a494058171f11c14a2be3933a9a1 | [
"MIT"
] | null | null | null | machine_translation/MorpHIN/Learned/Resources/Set5/TrainingInstances/86.exs | AdityaPrasadMishra/NLP--Project-Group-16 | fb62cc6a1db4a494058171f11c14a2be3933a9a1 | [
"MIT"
] | null | null | null | **EXAMPLE FILE**
pnoun cm noun cm quantifier;
verb SYM adjective noun quantifier;
cm cm noun demonstrative quantifier;
cm adjective particle quantifier quantifier;
noun cm noun cm quantifier;
pnoun cm noun pnoun quantifier;
pn adjective noun cm quantifier;
pnoun cm noun cm quantifier;
pnoun cm noun cm quantif... | 32.095238 | 45 | 0.792285 |
1ceb70965a6dc1b3d68f2929a640da7ebbccdd1e | 1,559 | ex | Elixir | lib/runlet/cmd/limit.ex | msantos/runlet | d9cb44b113295387c296ab4576a09ca4a7ce0f7b | [
"ISC"
] | 4 | 2020-01-12T19:04:46.000Z | 2021-09-20T14:37:22.000Z | lib/runlet/cmd/limit.ex | msantos/runlet | d9cb44b113295387c296ab4576a09ca4a7ce0f7b | [
"ISC"
] | null | null | null | lib/runlet/cmd/limit.ex | msantos/runlet | d9cb44b113295387c296ab4576a09ca4a7ce0f7b | [
"ISC"
] | 1 | 2021-09-20T14:37:25.000Z | 2021-09-20T14:37:25.000Z | defmodule Runlet.Cmd.Limit do
@moduledoc "Limit events to count per seconds"
@doc """
Set upper limit on the number of events permitted per *seconds*
seconds. Events exceeding this rate are discarded.
"""
@spec exec(Enumerable.t(), pos_integer, pos_integer) :: Enumerable.t()
def exec(stream, count, secon... | 28.87037 | 104 | 0.503528 |
1ceb7849422bb7573022861fc81b0516ba590763 | 2,207 | ex | Elixir | lib/thumbifier/convert/types.ex | sysdia-solutions/thumbifier | b2b71571bb8a33159e5d90ecb5ea3931eafdd62b | [
"MIT"
] | 4 | 2016-10-16T22:22:52.000Z | 2019-05-24T13:44:15.000Z | lib/thumbifier/convert/types.ex | sysdia-solutions/thumbifier | b2b71571bb8a33159e5d90ecb5ea3931eafdd62b | [
"MIT"
] | 1 | 2016-10-21T00:16:16.000Z | 2017-09-24T02:24:23.000Z | lib/thumbifier/convert/types.ex | sysdia-solutions/thumbifier | b2b71571bb8a33159e5d90ecb5ea3931eafdd62b | [
"MIT"
] | null | null | null | defmodule Thumbifier.Convert.Types do
def all() do
basic_image
++ pdf
++ psd
++ video
++ website
++ document
++ spreadsheet
++ presentation
end
def is_supported?(type) do
type in all
end
def is_basic_image?(type) do
type in basic_image
end
def is_pdf?(type) do
... | 16.847328 | 73 | 0.583598 |
1ceb959406ddbc3606a0673fa471abd1a502c25a | 84,885 | ex | Elixir | lib/phoenix_live_view.ex | full-stack-biz/phoenix_live_view | 5b9fe24ff1b2e91a97681259df993badcd4cd461 | [
"MIT"
] | null | null | null | lib/phoenix_live_view.ex | full-stack-biz/phoenix_live_view | 5b9fe24ff1b2e91a97681259df993badcd4cd461 | [
"MIT"
] | null | null | null | lib/phoenix_live_view.ex | full-stack-biz/phoenix_live_view | 5b9fe24ff1b2e91a97681259df993badcd4cd461 | [
"MIT"
] | null | null | null | defmodule Phoenix.LiveView do
@moduledoc ~S'''
LiveView provides rich, real-time user experiences with
server-rendered HTML.
LiveView programming model is declarative: instead of
saying "once event X happens, change Y on the page",
events in LiveView are regular messages which may cause
changes to its st... | 39.153598 | 111 | 0.696436 |
1cebda6296e6b9a9afb92ebb566b6829eb0f0921 | 4,501 | ex | Elixir | clients/fitness/lib/google_api/fitness/v1/model/aggregate_request.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/fitness/lib/google_api/fitness/v1/model/aggregate_request.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/fitness/lib/google_api/fitness/v1/model/aggregate_request.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... | 66.191176 | 480 | 0.751166 |
1cebed69d22e0cad82c96167b24f1dd6cbc06cab | 1,656 | ex | Elixir | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/disk_encryption_status.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/disk_encryption_status.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/disk_encryption_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... | 33.12 | 130 | 0.730676 |
1cec12bcc58245d07fdabd7a1bd764db9065f702 | 1,066 | ex | Elixir | blank/test/support/conn_case.ex | unozerocode/turbo-journey | 55c54e4b10bb1e49a1f999fd0eb03acdd35fef98 | [
"MIT"
] | null | null | null | blank/test/support/conn_case.ex | unozerocode/turbo-journey | 55c54e4b10bb1e49a1f999fd0eb03acdd35fef98 | [
"MIT"
] | 2 | 2021-03-10T20:40:33.000Z | 2021-05-11T16:13:21.000Z | blank/test/support/conn_case.ex | unozerocode/turbo-journey | 55c54e4b10bb1e49a1f999fd0eb03acdd35fef98 | [
"MIT"
] | null | null | null | defmodule BlankWeb.ConnCase do
@moduledoc """
This module defines the test case to be used by
tests that require setting up a connection.
Such tests rely on `Phoenix.ConnTest` and also
import other functionality to make it easier
to build common data structures and query the data layer.
Finally, if the ... | 28.052632 | 60 | 0.731707 |
1cec183c8a01e95416b95a2a048f0bfae10e22b6 | 4,130 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/security_policy.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/security_policy.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/security_policy.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 ... | 57.361111 | 490 | 0.722034 |
1cec4b52f57a0069dcd661e162086a8ff6902031 | 70 | exs | Elixir | .formatter.exs | fimars/netease_music_api | 821f19782f482a092b10e3cc39c93f6c131e9075 | [
"MIT"
] | 3 | 2017-12-25T02:40:05.000Z | 2019-05-09T04:01:24.000Z | .formatter.exs | fimars/netease_music_api | 821f19782f482a092b10e3cc39c93f6c131e9075 | [
"MIT"
] | null | null | null | .formatter.exs | fimars/netease_music_api | 821f19782f482a092b10e3cc39c93f6c131e9075 | [
"MIT"
] | null | null | null | [
inputs: [
"lib/**/*.{ex,exs}",
"test/**/*.{ex,exs}"
]
]
| 10 | 24 | 0.328571 |
1cec52ecb39255941b92f0795007d70ecc4227b3 | 1,375 | ex | Elixir | lib/ex_admin/schema.ex | augnustin/ex_admin | 218d0094de8186808924dcca6157875a7bb382c9 | [
"MIT"
] | 2 | 2019-12-21T12:59:19.000Z | 2020-04-01T15:27:12.000Z | lib/ex_admin/schema.ex | augnustin/ex_admin | 218d0094de8186808924dcca6157875a7bb382c9 | [
"MIT"
] | null | null | null | lib/ex_admin/schema.ex | augnustin/ex_admin | 218d0094de8186808924dcca6157875a7bb382c9 | [
"MIT"
] | 1 | 2020-02-29T22:13:24.000Z | 2020-02-29T22:13:24.000Z | defmodule ExAdmin.Schema do
@moduledoc false
defp query_to_module(%Ecto.Query{} = q) do
{_table, module} = q.from.source
module
end
defp resource_to_module(resource) do
Map.get(resource, :__struct__)
end
def primary_key(%Ecto.Query{} = q) do
primary_key(query_to_module(q))
end
def pr... | 24.122807 | 84 | 0.694545 |
1cec63a55e34fbfbf640fbfc654b7cb0b0e8a35a | 906 | ex | Elixir | apps/tag_editor/lib/tag_editor/application.ex | gregredhead/belethor | 255925396b18ba4a6950f386abf8a9e17a7e5e7c | [
"Apache-2.0"
] | 3 | 2018-07-20T22:14:36.000Z | 2018-12-21T19:54:48.000Z | apps/tag_editor/lib/tag_editor/application.ex | gregredhead/belethor | 255925396b18ba4a6950f386abf8a9e17a7e5e7c | [
"Apache-2.0"
] | 36 | 2018-09-15T21:46:54.000Z | 2020-03-28T16:10:18.000Z | apps/tag_editor/lib/tag_editor/application.ex | gregredhead/belethor | 255925396b18ba4a6950f386abf8a9e17a7e5e7c | [
"Apache-2.0"
] | 2 | 2018-07-22T08:47:07.000Z | 2021-12-11T01:39:19.000Z | defmodule TagEditor.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
alias TagEditorWeb.Endpoint
use Application
def start(_type, _args) do
# List all child processes to be supervised
children = [
# Start the endpoin... | 28.3125 | 68 | 0.724062 |
1cec741031e325fdc726559acd8c15539d018bdf | 484 | ex | Elixir | apps/sample/lib/sample/application.ex | ODYLIGHT/sample_umbrella | 8b4ef00c732e24ccec6d98555d7542dff10a73f9 | [
"MIT"
] | 1 | 2020-02-20T11:27:02.000Z | 2020-02-20T11:27:02.000Z | apps/sample/lib/sample/application.ex | ODYLIGHT/sample_umbrella | 8b4ef00c732e24ccec6d98555d7542dff10a73f9 | [
"MIT"
] | 1 | 2020-04-30T00:58:40.000Z | 2020-04-30T00:58:40.000Z | apps/sample/lib/sample/application.ex | ODYLIGHT/sample_umbrella | 8b4ef00c732e24ccec6d98555d7542dff10a73f9 | [
"MIT"
] | null | null | null | defmodule Sample.Application do
@moduledoc """
The Sample Application Service.
The sample system business domain lives in this application.
Exposes API to clients such as the `SampleWeb` application
for use in channels, controllers, and elsewhere.
"""
use Application
def start(_type, _args) do
im... | 24.2 | 62 | 0.72314 |
1cec78116ba0d3289d4d01462375957e10263b40 | 831 | ex | Elixir | lib/mongooseice/udp/worker_supervisor.ex | glassechidna/MongooseICE | c2ea99f47460fd7293b51eaa72fbce122a60affe | [
"Apache-2.0"
] | 90 | 2017-09-26T12:20:06.000Z | 2022-01-30T17:58:11.000Z | lib/mongooseice/udp/worker_supervisor.ex | glassechidna/MongooseICE | c2ea99f47460fd7293b51eaa72fbce122a60affe | [
"Apache-2.0"
] | 39 | 2017-01-20T08:54:13.000Z | 2017-09-13T11:30:14.000Z | lib/mongooseice/udp/worker_supervisor.ex | glassechidna/MongooseICE | c2ea99f47460fd7293b51eaa72fbce122a60affe | [
"Apache-2.0"
] | 13 | 2018-03-29T07:03:25.000Z | 2022-03-06T10:21:45.000Z | defmodule MongooseICE.UDP.WorkerSupervisor do
@moduledoc false
# Supervisor of `MongooseICE.UDP.Worker` processes
alias MongooseICE.UDP
def start_link(base_name, server_opts) do
import Supervisor.Spec, warn: false
name = UDP.worker_sup_name(base_name)
dispatcher = UDP.dispatcher_name(base_name)
... | 25.96875 | 84 | 0.694344 |
1cec8ca42253f11934b863bb66986394023e19a9 | 3,737 | ex | Elixir | clients/storage_transfer/lib/google_api/storage_transfer/v1/model/transfer_spec.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/storage_transfer/lib/google_api/storage_transfer/v1/model/transfer_spec.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/storage_transfer/lib/google_api/storage_transfer/v1/model/transfer_spec.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... | 52.633803 | 184 | 0.744447 |
1cecda786615ae092312c232929d30e9c4ae62b3 | 438 | exs | Elixir | config/dev.exs | arpieb/annex | 6f472a30361bf0a1646e256d6dfe478706427f64 | [
"MIT"
] | 1 | 2020-10-23T13:41:07.000Z | 2020-10-23T13:41:07.000Z | config/dev.exs | arpieb/annex | 6f472a30361bf0a1646e256d6dfe478706427f64 | [
"MIT"
] | null | null | null | config/dev.exs | arpieb/annex | 6f472a30361bf0a1646e256d6dfe478706427f64 | [
"MIT"
] | null | null | null | use Mix.Config
config :annex, Annex.Data.DTensor, debug: true
config :git_hooks,
hooks: [
pre_commit: [
verbose: true,
tasks: [
"mix format --check-formatted --dry-run --check-equivalent"
]
],
pre_push: [
verbose: true,
tasks: [
"mix clean",
"mix com... | 19.043478 | 67 | 0.53653 |
1cecdb7b51c0cef5da59a4abe6148e0eb22d91f6 | 1,558 | exs | Elixir | test/ex_docker_compose/subcommands_test.exs | amitizle/ex_docker_compose | 55ad38f24771af9f2d30889da5762c3148f87e18 | [
"MIT"
] | 2 | 2020-12-15T02:59:04.000Z | 2021-05-05T02:21:24.000Z | test/ex_docker_compose/subcommands_test.exs | amitizle/ex_docker_compose | 55ad38f24771af9f2d30889da5762c3148f87e18 | [
"MIT"
] | 1 | 2018-01-21T19:00:04.000Z | 2018-01-21T19:00:04.000Z | test/ex_docker_compose/subcommands_test.exs | amitizle/ex_docker_compose | 55ad38f24771af9f2d30889da5762c3148f87e18 | [
"MIT"
] | null | null | null | defmodule ExDockerCompose.SubcommandsTest do
use ExUnit.Case
doctest ExDockerCompose.Subcommands
@compose_bin "/bin/dc"
test "build command without opts should just return the subcommand" do
assert {:ok, "#{@compose_bin} up"} = ExDockerCompose.Subcommands.build_command(@compose_bin, :up, [], [])
end
... | 42.108108 | 152 | 0.685494 |
1ced38458c2143fa8a9a17cc330d5444c3228816 | 1,553 | exs | Elixir | mix.exs | sveredyuk/absinthe_ecto | 3c216d837d39ce8684ccfa7d0052375fdbc127b7 | [
"MIT"
] | null | null | null | mix.exs | sveredyuk/absinthe_ecto | 3c216d837d39ce8684ccfa7d0052375fdbc127b7 | [
"MIT"
] | null | null | null | mix.exs | sveredyuk/absinthe_ecto | 3c216d837d39ce8684ccfa7d0052375fdbc127b7 | [
"MIT"
] | null | null | null | defmodule Absinthe.Ecto.Mixfile do
use Mix.Project
@version "0.1.3"
def project do
[app: :absinthe_ecto,
version: @version,
elixir: "~> 1.3",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
elixirc_paths: elixirc_paths(Mix.env),
package: package(),
sou... | 27.245614 | 77 | 0.598197 |
1ced4862e6a2c23464eebab12b5da652660b58b8 | 1,925 | exs | Elixir | config/dev.exs | elixir-china-community/community | b1c52c0530949a60bf4aadf63e60a34c5d58dd66 | [
"MIT"
] | 18 | 2019-10-04T01:49:16.000Z | 2020-07-04T23:53:26.000Z | config/dev.exs | elixirchina/community | b1c52c0530949a60bf4aadf63e60a34c5d58dd66 | [
"MIT"
] | 2 | 2019-10-17T04:56:54.000Z | 2019-11-11T04:05:06.000Z | config/dev.exs | elixir-china-community/community | b1c52c0530949a60bf4aadf63e60a34c5d58dd66 | [
"MIT"
] | 5 | 2019-10-17T06:42:26.000Z | 2020-02-17T18:08:54.000Z | use Mix.Config
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with webpack to recompile .js and .css sources.
config :community, CommunityWeb.Endpoint,
http: [port: ... | 28.308824 | 68 | 0.685714 |
1ced627e0a008920be64d8baf333bc99328830ac | 767 | exs | Elixir | lib/ex_unit/mix.exs | chulkilee/elixir | 699231dcad52916a76f38856cbd7cf7c7bdadc51 | [
"Apache-2.0"
] | 1 | 2021-04-28T21:35:01.000Z | 2021-04-28T21:35:01.000Z | lib/ex_unit/mix.exs | chulkilee/elixir | 699231dcad52916a76f38856cbd7cf7c7bdadc51 | [
"Apache-2.0"
] | null | null | null | lib/ex_unit/mix.exs | chulkilee/elixir | 699231dcad52916a76f38856cbd7cf7c7bdadc51 | [
"Apache-2.0"
] | 8 | 2018-02-20T18:30:53.000Z | 2019-06-18T14:23:31.000Z | defmodule ExUnit.MixProject do
use Mix.Project
def project do
[
app: :ex_unit,
version: System.version(),
build_per_environment: false
]
end
def application do
[
registered: [ExUnit.Server],
mod: {ExUnit, []},
env: [
# Calculated on demand
# max_... | 20.184211 | 50 | 0.551499 |
1cedad561fe89ecc599ad90d04d7109238233ce4 | 2,188 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/reservation_aggregated_list_warning.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/reservation_aggregated_list_warning.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/compute/lib/google_api/compute/v1/model/reservation_aggregated_list_warning.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... | 40.518519 | 194 | 0.72989 |
1cedcf3e4f48ab33c883209a4fe8747dc618dc92 | 868 | ex | Elixir | deps/mazurka/lib/mazurka/utils.ex | conorfoley/dota_hero_combos | d75a3f0673fc1f1d0845c9d5c692c0605d3b445d | [
"MIT"
] | null | null | null | deps/mazurka/lib/mazurka/utils.ex | conorfoley/dota_hero_combos | d75a3f0673fc1f1d0845c9d5c692c0605d3b445d | [
"MIT"
] | null | null | null | deps/mazurka/lib/mazurka/utils.ex | conorfoley/dota_hero_combos | d75a3f0673fc1f1d0845c9d5c692c0605d3b445d | [
"MIT"
] | null | null | null | defmodule Mazurka.Utils do
@moduledoc false
def eval(quoted, env) do
{out, []} = quoted
|> Macro.expand(env)
|> Code.eval_quoted([], env)
out
end
def prewalk(quoted, fun) do
Macro.prewalk(quoted, walk(fun, &prewalk(&1, fun)))
end
def postwalk(quoted, fun) do
Macro.postwalk(quoted,... | 22.25641 | 57 | 0.539171 |
1cee2e67bdeffdc7947b2517368ec98b6571338d | 2,725 | exs | Elixir | test/mix/tasks/prom_ex.gen.config_test.exs | maartenvanvliet/prom_ex | 8eb4f86c169af3b184a1a45cf42e298af2b05816 | [
"MIT"
] | 354 | 2020-10-21T06:27:15.000Z | 2022-03-29T13:22:46.000Z | test/mix/tasks/prom_ex.gen.config_test.exs | maartenvanvliet/prom_ex | 8eb4f86c169af3b184a1a45cf42e298af2b05816 | [
"MIT"
] | 111 | 2020-11-25T21:27:13.000Z | 2022-03-28T10:42:59.000Z | test/mix/tasks/prom_ex.gen.config_test.exs | maartenvanvliet/prom_ex | 8eb4f86c169af3b184a1a45cf42e298af2b05816 | [
"MIT"
] | 45 | 2020-12-31T20:37:11.000Z | 2022-03-18T13:12:21.000Z | defmodule Mix.Tasks.PromEx.Gen.ConfigTest do
use ExUnit.Case
import ExUnit.CaptureIO
import Mix.Tasks.PromEx.Gen.Config
test "raises if invalid args are present" do
assert_raise RuntimeError, ~r/Invalid CLI args/, fn ->
run(~w(--unexpected unknown))
end
end
test "raises if datasource arg is... | 25.46729 | 77 | 0.606606 |
1cee4ab3db7cdf875f37477c18f981a5eb0da257 | 330 | ex | Elixir | src/phoenix/hello/lib/hello_web/controllers/hello_controller.ex | mkdika/learn-elixir | f66defe8c7255f2b36dcf668e10389b0f2b0985a | [
"MIT"
] | null | null | null | src/phoenix/hello/lib/hello_web/controllers/hello_controller.ex | mkdika/learn-elixir | f66defe8c7255f2b36dcf668e10389b0f2b0985a | [
"MIT"
] | null | null | null | src/phoenix/hello/lib/hello_web/controllers/hello_controller.ex | mkdika/learn-elixir | f66defe8c7255f2b36dcf668e10389b0f2b0985a | [
"MIT"
] | null | null | null | defmodule HelloWeb.HelloController do
use HelloWeb, :controller
@spec index(Plug.Conn.t(), any()) :: Plug.Conn.t()
def index(conn, _params), do: render(conn, "index.html") # can use single line naming function
def show(conn, %{"messenger" => messenger}) do
render(conn, "show.html", messenger: messenger)
... | 27.5 | 96 | 0.690909 |
1cee65bac8c370704b8a6697963d0f2398d5a0a5 | 65 | ex | Elixir | apps/ex_figment_web/lib/ex_figment_web/views/page_view.ex | rishenko/ex_figment | 7cb578a0da26dd50a947f6c155adc0c69a37ad4b | [
"Apache-2.0"
] | 1 | 2018-05-05T18:34:53.000Z | 2018-05-05T18:34:53.000Z | apps/ex_figment_web/lib/ex_figment_web/views/page_view.ex | rishenko/ex_figment | 7cb578a0da26dd50a947f6c155adc0c69a37ad4b | [
"Apache-2.0"
] | null | null | null | apps/ex_figment_web/lib/ex_figment_web/views/page_view.ex | rishenko/ex_figment | 7cb578a0da26dd50a947f6c155adc0c69a37ad4b | [
"Apache-2.0"
] | null | null | null | defmodule ExFigmentWeb.PageView do
use ExFigmentWeb, :view
end
| 16.25 | 34 | 0.815385 |
1cee68f2aa492e8c26af752b5ace5ef2301695cd | 10,418 | exs | Elixir | test/controllers/tp_threshold_controller_test.exs | zombalo/cgrates_web_jsonapi | 47845be4311839fe180cc9f2c7c6795649da4430 | [
"MIT"
] | null | null | null | test/controllers/tp_threshold_controller_test.exs | zombalo/cgrates_web_jsonapi | 47845be4311839fe180cc9f2c7c6795649da4430 | [
"MIT"
] | null | null | null | test/controllers/tp_threshold_controller_test.exs | zombalo/cgrates_web_jsonapi | 47845be4311839fe180cc9f2c7c6795649da4430 | [
"MIT"
] | null | null | null | defmodule CgratesWebJsonapi.TpThresholdControllerTest do
use CgratesWebJsonapi.ConnCase
alias CgratesWebJsonapi.TpThreshold
alias CgratesWebJsonapi.Repo
import CgratesWebJsonapi.Factory
setup do
user = insert :user
conn = build_conn()
|> put_req_header("accept", "application/vnd.api+json")
... | 35.924138 | 136 | 0.646669 |
1cee76170381b03b9c31e6cf770aeada79c56031 | 240 | exs | Elixir | priv/repo/migrations/20160912135432_add_featured_to_products.exs | anndream/phoenix-commerce | 5e4471fa8fd1ac402d4df68fe7ccbcb0f7a53296 | [
"MIT"
] | 229 | 2016-09-21T09:24:46.000Z | 2020-05-16T22:41:31.000Z | priv/repo/migrations/20160912135432_add_featured_to_products.exs | sadiqmmm/ex-shop | 5e4471fa8fd1ac402d4df68fe7ccbcb0f7a53296 | [
"MIT"
] | 3 | 2016-09-21T10:26:50.000Z | 2016-10-19T07:25:12.000Z | priv/repo/migrations/20160912135432_add_featured_to_products.exs | sadiqmmm/ex-shop | 5e4471fa8fd1ac402d4df68fe7ccbcb0f7a53296 | [
"MIT"
] | 32 | 2016-09-22T05:19:05.000Z | 2019-11-01T04:07:13.000Z | defmodule Ap.Repo.Migrations.AddFeaturedToProducts do
use Ecto.Migration
def change do
alter table(:products) do
add :featured, :boolean, default: true, null: false
end
create index(:products, [:featured])
end
end
| 20 | 57 | 0.704167 |
1cee83c82502c2d8b29b7b6b44c9f192454efed9 | 1,255 | ex | Elixir | netaxs_sniff/suckmisic/test/support/conn_case.ex | TomasMadeja/santomet-playground | f4467233401756e276612b8a94421e7820ad67fc | [
"WTFPL"
] | null | null | null | netaxs_sniff/suckmisic/test/support/conn_case.ex | TomasMadeja/santomet-playground | f4467233401756e276612b8a94421e7820ad67fc | [
"WTFPL"
] | null | null | null | netaxs_sniff/suckmisic/test/support/conn_case.ex | TomasMadeja/santomet-playground | f4467233401756e276612b8a94421e7820ad67fc | [
"WTFPL"
] | null | null | null | defmodule SuckmisicWeb.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 ... | 28.522727 | 71 | 0.72749 |
1ceea908a0a7051174f40e7d1f035d1111163654 | 5,443 | exs | Elixir | .credo.exs | sztosz/sentry-elixir | 3a2cf14eb4a4778d7e77e3b851897a2575b08052 | [
"MIT"
] | null | null | null | .credo.exs | sztosz/sentry-elixir | 3a2cf14eb4a4778d7e77e3b851897a2575b08052 | [
"MIT"
] | null | null | null | .credo.exs | sztosz/sentry-elixir | 3a2cf14eb4a4778d7e77e3b851897a2575b08052 | [
"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 ... | 41.869231 | 80 | 0.661584 |
1ceecc07e579c4727e19cd7b6cb8beb8f1c36894 | 473 | exs | Elixir | config/test.exs | nullpilot/pawmon | 00623bf1cd2ca126af385bf0c81e5fe3afca11a3 | [
"MIT"
] | null | null | null | config/test.exs | nullpilot/pawmon | 00623bf1cd2ca126af385bf0c81e5fe3afca11a3 | [
"MIT"
] | null | null | null | config/test.exs | nullpilot/pawmon | 00623bf1cd2ca126af385bf0c81e5fe3afca11a3 | [
"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 :paw_mon, PawMonWeb.Endpoint,
http: [ip: {127, 0, 0, 1}, port: 4002],
secret_key_base: "datvNyHnrOZD5UUISOL1dE69JUiWvzBVfjXXgXeaJe1100sTEG9Mlka385HCZQ+l",
server: false
# Print only warnings a... | 31.533333 | 86 | 0.767442 |
1cef333b68b20edb15316428de6cf354ad3518f4 | 73 | exs | Elixir | v02/ch02/struct2.edit0.exs | oiax/elixir-primer | c8b89a29f108cc335b8e1341b7a1e90ec12adc66 | [
"MIT"
] | null | null | null | v02/ch02/struct2.edit0.exs | oiax/elixir-primer | c8b89a29f108cc335b8e1341b7a1e90ec12adc66 | [
"MIT"
] | null | null | null | v02/ch02/struct2.edit0.exs | oiax/elixir-primer | c8b89a29f108cc335b8e1341b7a1e90ec12adc66 | [
"MIT"
] | null | null | null | u = %User{email: "foo@example.com"}
IO.inspect u.name
IO.inspect u.email
| 18.25 | 35 | 0.712329 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.