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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1a70865766c71cbfd9d22a0ba0ae7bd6ae734dd2 | 1,005 | exs | Elixir | test/crit/ecto/name_list_test.exs | jesseshieh/crit19 | 0bba407fea09afed72cbb90ca579ba34c537edef | [
"MIT"
] | null | null | null | test/crit/ecto/name_list_test.exs | jesseshieh/crit19 | 0bba407fea09afed72cbb90ca579ba34c537edef | [
"MIT"
] | null | null | null | test/crit/ecto/name_list_test.exs | jesseshieh/crit19 | 0bba407fea09afed72cbb90ca579ba34c537edef | [
"MIT"
] | null | null | null | defmodule Crit.Ecto.NameListTest do
use ExUnit.Case, async: true
alias Crit.Ecto.NameList
test "casting" do
assert NameList.cast("name, name2, name3") ==
{:ok, ["name", "name2", "name3"]}
assert NameList.cast("name ") == {:ok, ["name"]}
assert NameList.cast(1) == :error
end
test "castin... | 27.916667 | 72 | 0.637811 |
1a70aa48bf0e61835f6c42204369e8cfcebcbb69 | 171 | ex | Elixir | lib/redoc.ex | wingyplus/redoc_ui_plug | 0667dd9b5dc53a49355c67177c7bb025b7ddc86b | [
"MIT"
] | null | null | null | lib/redoc.ex | wingyplus/redoc_ui_plug | 0667dd9b5dc53a49355c67177c7bb025b7ddc86b | [
"MIT"
] | null | null | null | lib/redoc.ex | wingyplus/redoc_ui_plug | 0667dd9b5dc53a49355c67177c7bb025b7ddc86b | [
"MIT"
] | null | null | null | defmodule Redoc do
@moduledoc """
A collection of modules to working with ReDoc.
Please consult documentation in `Redoc.Plug.RedocUI` for
more details.
"""
end
| 19 | 58 | 0.725146 |
1a70abea6b544715464c7a220f22827b4f9ac272 | 382 | ex | Elixir | web/models/event.ex | ckochx/unparsed_endpoint | fe84c7bb1e2d69f3ed6f4cfcd74834e53c36e897 | [
"MIT"
] | null | null | null | web/models/event.ex | ckochx/unparsed_endpoint | fe84c7bb1e2d69f3ed6f4cfcd74834e53c36e897 | [
"MIT"
] | null | null | null | web/models/event.ex | ckochx/unparsed_endpoint | fe84c7bb1e2d69f3ed6f4cfcd74834e53c36e897 | [
"MIT"
] | null | null | null | defmodule UnparsedEndpoint.Event do
use UnparsedEndpoint.Web, :model
schema "events" do
field :type, :string
field :name, :string
timestamps()
end
@doc """
Builds a changeset based on the `struct` and `params`.
"""
def changeset(struct, params \\ %{}) do
struct
|> cast(params, [:typ... | 19.1 | 56 | 0.63089 |
1a70b79c6809d77fc85880a5331286675beeec00 | 11,046 | ex | Elixir | lib/cldr/language_tag.ex | mskv/cldr | 92d10d264602db914fe9fb3ea3c8468ee2442678 | [
"Apache-2.0"
] | null | null | null | lib/cldr/language_tag.ex | mskv/cldr | 92d10d264602db914fe9fb3ea3c8468ee2442678 | [
"Apache-2.0"
] | null | null | null | lib/cldr/language_tag.ex | mskv/cldr | 92d10d264602db914fe9fb3ea3c8468ee2442678 | [
"Apache-2.0"
] | null | null | null | defmodule Cldr.LanguageTag do
@moduledoc """
Represents a language tag as defined in [rfc5646](https://tools.ietf.org/html/rfc5646)
with extensions "u" and "t" as defined in [BCP 47](https://tools.ietf.org/html/bcp47).
Language tags are used to help identify languages, whether spoken,
written, signed, or oth... | 39.733813 | 168 | 0.577585 |
1a710d2b772a435df6cd8b4bc27827b9f051f5de | 3,989 | ex | Elixir | lib/mix/lib/mix/tasks/deps.loadpaths.ex | eproxus/elixir | 1c3a3bde539bc96c80d917fbcf3c9dc9e123860b | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/tasks/deps.loadpaths.ex | eproxus/elixir | 1c3a3bde539bc96c80d917fbcf3c9dc9e123860b | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/tasks/deps.loadpaths.ex | eproxus/elixir | 1c3a3bde539bc96c80d917fbcf3c9dc9e123860b | [
"Apache-2.0"
] | null | null | null | defmodule Mix.Tasks.Deps.Loadpaths do
use Mix.Task
import Mix.Dep, only: [loaded_by_name: 2, format_dep: 1, ok?: 1,
format_status: 1, check_lock: 1]
@moduledoc """
Checks and loads all dependencies along the way.
If there is an invalid dependency, its status is printed
before abo... | 27.895105 | 88 | 0.635498 |
1a71143ce0ab17925c283433a0667f054f26c46c | 891 | ex | Elixir | lib/rockelivery_web/router.ex | joabehenrique/rockelivery | 02f83fe99df8e27d4e2a6270fecb39a521f2ceaf | [
"MIT"
] | null | null | null | lib/rockelivery_web/router.ex | joabehenrique/rockelivery | 02f83fe99df8e27d4e2a6270fecb39a521f2ceaf | [
"MIT"
] | null | null | null | lib/rockelivery_web/router.ex | joabehenrique/rockelivery | 02f83fe99df8e27d4e2a6270fecb39a521f2ceaf | [
"MIT"
] | null | null | null | defmodule RockeliveryWeb.Router do
use RockeliveryWeb, :router
alias RockeliveryWeb.Plugs.UUIDChecker
pipeline :api do
plug(:accepts, ["json"])
plug(UUIDChecker)
end
pipeline :auth do
plug(RockeliveryWeb.Auth.Pipeline)
end
scope "/api/v1", RockeliveryWeb do
pipe_through([:api, :auth])
... | 22.275 | 70 | 0.680135 |
1a71393c42fc33f55b0dfbff9e60a012f41cb1b8 | 33,726 | ex | Elixir | lib/elixir/lib/system.ex | razuf/elixir | a80b6d00738668f5ca2325bfc8c3581af5d531dc | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/system.ex | razuf/elixir | a80b6d00738668f5ca2325bfc8c3581af5d531dc | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/system.ex | razuf/elixir | a80b6d00738668f5ca2325bfc8c3581af5d531dc | [
"Apache-2.0"
] | null | null | null | defmodule System do
@moduledoc """
The `System` module provides functions that interact directly
with the VM or the host system.
## Time
The `System` module also provides functions that work with time,
returning different times kept by the system with support for
different time units.
One of the comp... | 30.548913 | 102 | 0.676659 |
1a71770a1b4d11456d9ce2309252f0f02407f6a1 | 1,064 | ex | Elixir | test/support/conn_case.ex | chasm/elmmeetup | 95f9850a075dcc6ea884279485c532ac2f4db803 | [
"MIT"
] | null | null | null | test/support/conn_case.ex | chasm/elmmeetup | 95f9850a075dcc6ea884279485c532ac2f4db803 | [
"MIT"
] | 1 | 2018-12-26T09:07:03.000Z | 2018-12-26T09:07:03.000Z | test/support/conn_case.ex | chasm/elmmeetup | 95f9850a075dcc6ea884279485c532ac2f4db803 | [
"MIT"
] | null | null | null | defmodule Elmmeetup.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
imports other functionality to make it easier
to build and query models.
Finally, if the test case interacts with the ... | 24.744186 | 68 | 0.705827 |
1a718775681e5bee221387552ac3b475520808eb | 378 | ex | Elixir | lib/erlef/members.ex | RudolfMan/website | dacf833f043e22f8f297a149a7ecce0d2fdb1696 | [
"Apache-2.0"
] | null | null | null | lib/erlef/members.ex | RudolfMan/website | dacf833f043e22f8f297a149a7ecce0d2fdb1696 | [
"Apache-2.0"
] | null | null | null | lib/erlef/members.ex | RudolfMan/website | dacf833f043e22f8f297a149a7ecce0d2fdb1696 | [
"Apache-2.0"
] | null | null | null | defmodule Erlef.Members do
Enum.each(Application.get_env(:erlef, :rosters), fn roster ->
Module.register_attribute(__MODULE__, roster, persist: true)
Module.put_attribute(__MODULE__, roster, Application.get_env(:erlef, roster))
def roster(unquote(Atom.to_string(roster))) do
Keyword.get(__MODULE__._... | 34.363636 | 81 | 0.743386 |
1a718b0deb1cc58956ab4b4398a38c73985f14fa | 6,641 | ex | Elixir | lib/scaffolding/internal/implementation/domain_object/core/repo.ex | noizu-labs/advanced_elixir_scaffolding | 9e7a1199a4b25fcc16fc5a795104b926d2f238df | [
"MIT"
] | null | null | null | lib/scaffolding/internal/implementation/domain_object/core/repo.ex | noizu-labs/advanced_elixir_scaffolding | 9e7a1199a4b25fcc16fc5a795104b926d2f238df | [
"MIT"
] | null | null | null | lib/scaffolding/internal/implementation/domain_object/core/repo.ex | noizu-labs/advanced_elixir_scaffolding | 9e7a1199a4b25fcc16fc5a795104b926d2f238df | [
"MIT"
] | null | null | null | #-------------------------------------------------------------------------------
# Author: Keith Brings <keith.brings@noizu.com>
# Copyright (C) 2021 Noizu Labs Inc. All rights reserved.
#-------------------------------------------------------------------------------
defmodule Noizu.AdvancedScaffolding.Internal.Core.... | 36.894444 | 201 | 0.58184 |
1a719892b2fe19c8e1118be4e272347721ad6505 | 1,807 | exs | Elixir | apps/faqcheck_web/test/faqcheck_web/controllers/user_registration_controller_test.exs | csboling/faqcheck | bc182c365d466c8dcacc6b1a5fe9186a2c912cd4 | [
"CC0-1.0"
] | null | null | null | apps/faqcheck_web/test/faqcheck_web/controllers/user_registration_controller_test.exs | csboling/faqcheck | bc182c365d466c8dcacc6b1a5fe9186a2c912cd4 | [
"CC0-1.0"
] | 20 | 2021-09-08T04:07:31.000Z | 2022-03-10T21:52:24.000Z | apps/faqcheck_web/test/faqcheck_web/controllers/user_registration_controller_test.exs | csboling/faqcheck | bc182c365d466c8dcacc6b1a5fe9186a2c912cd4 | [
"CC0-1.0"
] | null | null | null | defmodule FaqcheckWeb.UserRegistrationControllerTest do
use FaqcheckWeb.ConnCase, async: true
import Faqcheck.AccountsFixtures
describe "GET /users/register" do
test "renders registration page", %{conn: conn} do
conn = get(conn, Routes.user_registration_path(conn, :new, "en"))
response = html_re... | 32.854545 | 104 | 0.628113 |
1a719f1ca6351b808c6c5d3ff55685fa2906c383 | 958 | ex | Elixir | test/support/channel_case.ex | NinjasCL/huemulixir | 0f0ceb69f19e5d361725284f0f8cb1264e7e1742 | [
"BSD-2-Clause"
] | 2 | 2022-03-21T00:57:19.000Z | 2022-03-25T14:28:15.000Z | test/support/channel_case.ex | NinjasCL/huemulixir | 0f0ceb69f19e5d361725284f0f8cb1264e7e1742 | [
"BSD-2-Clause"
] | null | null | null | test/support/channel_case.ex | NinjasCL/huemulixir | 0f0ceb69f19e5d361725284f0f8cb1264e7e1742 | [
"BSD-2-Clause"
] | null | null | null | defmodule HuemulixirWeb.ChannelCase do
@moduledoc """
This module defines the test case to be used by
channel tests.
Such tests rely on `Phoenix.ChannelTest` and also
import other functionality to make it easier
to build common data structures and query the data layer.
Finally, if the test case interact... | 27.371429 | 67 | 0.742171 |
1a71a199ef06b3efeaa56ba6536f423694dfea79 | 213 | ex | Elixir | farmbot_firmware/lib/farmbot_firmware/transports/uart_transport/reset.ex | SeppPenner/farmbot_os | 39ba5c5880f8aef71792e2c009514bed1177089c | [
"MIT"
] | 1 | 2019-08-06T11:51:48.000Z | 2019-08-06T11:51:48.000Z | farmbot_firmware/lib/farmbot_firmware/transports/uart_transport/reset.ex | SeppPenner/farmbot_os | 39ba5c5880f8aef71792e2c009514bed1177089c | [
"MIT"
] | null | null | null | farmbot_firmware/lib/farmbot_firmware/transports/uart_transport/reset.ex | SeppPenner/farmbot_os | 39ba5c5880f8aef71792e2c009514bed1177089c | [
"MIT"
] | null | null | null | defmodule FarmbotFirmware.UARTTransport.Reset do
@moduledoc """
Behaviour to reset the UART connection into
bootloader mode for firmware upgrades.
"""
@callback reset :: :ok | {:error, Stirng.t()}
end
| 23.666667 | 48 | 0.71831 |
1a71aa2fb9d3a4864eb06762508131678ed0e433 | 1,368 | ex | Elixir | integration_test/phoenix_example_app/lib/phoenix_example_app_web/endpoint.ex | elitau/tix | 2aa5fe4d91e7962ebcdc9b668aacf65e09ff9bb8 | [
"MIT"
] | 1 | 2021-08-16T18:52:45.000Z | 2021-08-16T18:52:45.000Z | integration_test/phoenix_example_app/lib/phoenix_example_app_web/endpoint.ex | elitau/tix | 2aa5fe4d91e7962ebcdc9b668aacf65e09ff9bb8 | [
"MIT"
] | 16 | 2021-03-09T19:39:31.000Z | 2022-03-15T15:20:24.000Z | integration_test/phoenix_example_app/lib/phoenix_example_app_web/endpoint.ex | elitau/tix | 2aa5fe4d91e7962ebcdc9b668aacf65e09ff9bb8 | [
"MIT"
] | null | null | null | defmodule PhoenixExampleAppWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :phoenix_example_app
socket "/socket", PhoenixExampleAppWeb.UserSocket,
websocket: true,
longpoll: false
# Serve at "/" the static files from "priv/static" directory.
#
# You should set gzip to true if you are running phx.dige... | 29.106383 | 69 | 0.724415 |
1a71aaab325303e5b98257c85dc8d2fa239f40a3 | 842 | ex | Elixir | lib/listentothis_web/views/user_view.ex | IamTheLime/listentothis | cc2b4ca3a11623e68f5657d8538a586fddeba85b | [
"Apache-2.0"
] | null | null | null | lib/listentothis_web/views/user_view.ex | IamTheLime/listentothis | cc2b4ca3a11623e68f5657d8538a586fddeba85b | [
"Apache-2.0"
] | null | null | null | lib/listentothis_web/views/user_view.ex | IamTheLime/listentothis | cc2b4ca3a11623e68f5657d8538a586fddeba85b | [
"Apache-2.0"
] | null | null | null | defmodule ListentothisWeb.UserView do
use ListentothisWeb, :view
alias ListentothisWeb.User
def first_name(%{name: name}) do
name
|> String.split(" ")
|> Enum.at(0)
end
def last_name(%{name: name}) do
name
|> String.split(" ")
|> List.last()
end
def username(%{username: usernam... | 21.589744 | 67 | 0.608076 |
1a71fd8c97a5bde68a3d6007c9bdc6f604667eda | 9,550 | ex | Elixir | lib/bamboo/adapters/send_grid_adapter.ex | YodelTalk/bamboo | 3e92b6f9687bfc70c2b019152ed9a4410c0a6275 | [
"MIT"
] | null | null | null | lib/bamboo/adapters/send_grid_adapter.ex | YodelTalk/bamboo | 3e92b6f9687bfc70c2b019152ed9a4410c0a6275 | [
"MIT"
] | null | null | null | lib/bamboo/adapters/send_grid_adapter.ex | YodelTalk/bamboo | 3e92b6f9687bfc70c2b019152ed9a4410c0a6275 | [
"MIT"
] | null | null | null | defmodule Bamboo.SendGridAdapter do
@moduledoc """
Sends email using SendGrid's JSON API.
Use this adapter to send emails through SendGrid's API. Requires that an API
key is set in the config.
If you would like to add a replyto header to your email, then simply pass it in
using the header property or put_... | 28.171091 | 112 | 0.666073 |
1a722c39adaa475863355ff045312690657d3e71 | 745 | ex | Elixir | test/support/channel_case.ex | faithandbrave/elixir-phoenix-chunked-response-example | 3390aba36a9fe9fa55316205021eef1f566b57a6 | [
"MIT"
] | 3 | 2016-12-16T03:00:32.000Z | 2020-09-17T16:04:58.000Z | test/support/channel_case.ex | faithandbrave/elixir-phoenix-chunked-response-example | 3390aba36a9fe9fa55316205021eef1f566b57a6 | [
"MIT"
] | null | null | null | test/support/channel_case.ex | faithandbrave/elixir-phoenix-chunked-response-example | 3390aba36a9fe9fa55316205021eef1f566b57a6 | [
"MIT"
] | null | null | null | defmodule ChunkServer.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 cannot ... | 21.911765 | 56 | 0.720805 |
1a723563372d40807e612696f159c8d843882637 | 1,688 | exs | Elixir | test/math_utils_test.exs | alanvardy/elixir-statistics | 21a923bbf84a3e71a133868abe5d3610864b130e | [
"Apache-2.0"
] | 118 | 2015-03-31T18:57:57.000Z | 2022-02-25T18:14:06.000Z | test/math_utils_test.exs | alanvardy/elixir-statistics | 21a923bbf84a3e71a133868abe5d3610864b130e | [
"Apache-2.0"
] | 13 | 2015-08-10T14:28:27.000Z | 2021-11-23T06:44:40.000Z | test/math_utils_test.exs | alanvardy/elixir-statistics | 21a923bbf84a3e71a133868abe5d3610864b130e | [
"Apache-2.0"
] | 32 | 2015-06-01T01:50:20.000Z | 2021-11-19T16:00:44.000Z | defmodule MathTest do
use ExUnit.Case, async: true
doctest Statistics.Math
alias Statistics.Math
test "square root" do
assert Math.sqrt(9) == 3
assert Math.sqrt(99) == 9.9498743710662
end
test "raise to a power" do
assert Math.pow(3, 2) == 9
assert Math.pow(2, -1) == 0.5
assert Math.p... | 23.123288 | 54 | 0.62737 |
1a7262147be3ab84d89f41af80ebaa5c92a55240 | 957 | exs | Elixir | test/get_test.exs | expert360/dal | 0a95353fa7d98a52061b4a713d762d32746774dc | [
"Apache-2.0"
] | 5 | 2018-07-28T07:29:56.000Z | 2020-01-12T04:50:03.000Z | test/get_test.exs | expert360/dal | 0a95353fa7d98a52061b4a713d762d32746774dc | [
"Apache-2.0"
] | 22 | 2018-07-22T03:37:26.000Z | 2019-06-30T22:35:23.000Z | test/get_test.exs | expert360/dal | 0a95353fa7d98a52061b4a713d762d32746774dc | [
"Apache-2.0"
] | 2 | 2018-07-28T01:13:21.000Z | 2018-08-07T22:19:36.000Z | defmodule DALTest.Get do
use DALTest.Case
doctest DAL
alias DALTest.Band
describe "When a record exists" do
setup [:create_band]
test "get will return the record", %{band: band} do
assert DAL.get(Band, band.id) == band
end
test "get_by will return the record", %{band: band} do
as... | 23.341463 | 60 | 0.633229 |
1a7277843e284e7a288594dae8b90b6cc7aff44e | 388 | ex | Elixir | ejemplo_errores/lib/chainProcesses.ex | bossiernesto/elixir_basics | 035e3c719b189c53a5ba7272fe106c6ad58da563 | [
"BSD-3-Clause"
] | null | null | null | ejemplo_errores/lib/chainProcesses.ex | bossiernesto/elixir_basics | 035e3c719b189c53a5ba7272fe106c6ad58da563 | [
"BSD-3-Clause"
] | 12 | 2017-01-24T20:40:26.000Z | 2017-01-25T02:19:42.000Z | ejemplo_errores/lib/chainProcesses.ex | bossiernesto/elixir_basics | 035e3c719b189c53a5ba7272fe106c6ad58da563 | [
"BSD-3-Clause"
] | 1 | 2018-12-30T15:59:45.000Z | 2018-12-30T15:59:45.000Z | defmodule ChainProcesses do
def chain(0) do
IO.puts "Pid: #{inspect self}"
receive do
{:msg,contents} -> :ok
after 2000 ->
exit "Chain dies here"
end
end
def chain(n) do
spawn_link(fn ->
IO.puts "Pid: #{inspect self}"
IO.puts "chaining to #{inspect self}"; chain(n-1)... | 17.636364 | 56 | 0.543814 |
1a72d7cd29257524ba15631480d249dd0f2baaea | 2,669 | ex | Elixir | lib/login.ex | justicedemocrats/actionkit_ex | 4727e2dd9a11b553131879d67da904b45645d84e | [
"MIT"
] | null | null | null | lib/login.ex | justicedemocrats/actionkit_ex | 4727e2dd9a11b553131879d67da904b45645d84e | [
"MIT"
] | null | null | null | lib/login.ex | justicedemocrats/actionkit_ex | 4727e2dd9a11b553131879d67da904b45645d84e | [
"MIT"
] | null | null | null | defmodule Ak.DialerLogin do
import ShortMaps
# Returns a login or nil
def existing_login_for_email(email, client) do
%{body: ~m(objects)} = Ak.Api.get("user", query: ~m(email))
user = List.first(objects)
case user do
nil ->
nil
~m(token) ->
[_, user_id, _] = String.split... | 28.094737 | 91 | 0.590858 |
1a72df8f76d9d4413471274dbfeda8f3b6e8af9f | 1,067 | ex | Elixir | lib/koans/11_sigils.ex | dario-castano/elixir-koans | 7cc9eea42bc5832c64c5351c1a3bd1396f77cc76 | [
"MIT"
] | null | null | null | lib/koans/11_sigils.ex | dario-castano/elixir-koans | 7cc9eea42bc5832c64c5351c1a3bd1396f77cc76 | [
"MIT"
] | null | null | null | lib/koans/11_sigils.ex | dario-castano/elixir-koans | 7cc9eea42bc5832c64c5351c1a3bd1396f77cc76 | [
"MIT"
] | null | null | null | defmodule Sigils do
use Koans
@intro "Sigils"
koan "The ~s sigil is a different way of expressing string literals" do
assert ~s{This is a string} == "This is a string"
end
koan "Sigils are useful to avoid escaping quotes in strings" do
assert "\"Welcome to the jungle\", they said." == ~s{"Welcome t... | 27.358974 | 93 | 0.611996 |
1a7312e3f43efe43cff4587c2f286e598be26963 | 1,544 | ex | Elixir | lib/hal_web/endpoint.ex | piersadrian/hal | 190e3fb1cd0d187ac3ef485d1bf9e2623296ae16 | [
"MIT"
] | null | null | null | lib/hal_web/endpoint.ex | piersadrian/hal | 190e3fb1cd0d187ac3ef485d1bf9e2623296ae16 | [
"MIT"
] | null | null | null | lib/hal_web/endpoint.ex | piersadrian/hal | 190e3fb1cd0d187ac3ef485d1bf9e2623296ae16 | [
"MIT"
] | null | null | null | defmodule HALWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :hal
socket "/socket", HALWeb.UserSocket
# Serve at "/" the static files from "priv/static" directory.
#
# You should set gzip to true if you are running phoenix.digest
# when deploying your static files in production.
plug Plug.Static,
at:... | 27.571429 | 95 | 0.698834 |
1a7314604071b03a0b1d3f914069bfd92b0d517a | 5,616 | exs | Elixir | lib/elixir/test/elixir/kernel/comprehension_test.exs | sunaku/elixir | 8aa43eaedd76be8ac0d495049eb9ecd56971f4fe | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/kernel/comprehension_test.exs | sunaku/elixir | 8aa43eaedd76be8ac0d495049eb9ecd56971f4fe | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/kernel/comprehension_test.exs | sunaku/elixir | 8aa43eaedd76be8ac0d495049eb9ecd56971f4fe | [
"Apache-2.0"
] | 1 | 2020-12-07T08:04:16.000Z | 2020-12-07T08:04:16.000Z | Code.require_file "../test_helper.exs", __DIR__
defmodule Kernel.ComprehensionTest do
use ExUnit.Case, async: true
import ExUnit.CaptureIO
require Integer
defp to_bin(x) do
<< x >>
end
defp nilly, do: nil
## Enum comprehensions (the common case)
test "for comprehensions" do
enum = 1..3
... | 25.880184 | 89 | 0.558226 |
1a73175438753115e5eafa3f1bcd0f39f2869cf5 | 343 | ex | Elixir | lib/strava/model/cadence_stream.ex | rkorzeniec/strava | aa99040355f72ff2766c080d5a919c66a53ac44b | [
"MIT"
] | 39 | 2016-04-09T21:50:34.000Z | 2022-03-04T09:16:25.000Z | lib/strava/model/cadence_stream.ex | rkorzeniec/strava | aa99040355f72ff2766c080d5a919c66a53ac44b | [
"MIT"
] | 24 | 2016-05-29T15:49:07.000Z | 2022-01-17T11:57:05.000Z | lib/strava/model/cadence_stream.ex | rkorzeniec/strava | aa99040355f72ff2766c080d5a919c66a53ac44b | [
"MIT"
] | 21 | 2016-02-02T01:19:23.000Z | 2022-02-06T23:29:32.000Z | defmodule Strava.CadenceStream do
@moduledoc """
"""
@derive [Poison.Encoder]
defstruct [
:original_size,
:resolution,
:series_type,
:data
]
@type t :: %__MODULE__{
original_size: integer(),
resolution: String.t(),
series_type: String.t(),
data: [in... | 16.333333 | 35 | 0.55102 |
1a732947d39d63abca8902014b32fbe52e64ad3a | 1,807 | ex | Elixir | lib/plenario/etl/queue.ex | vforgione/plenario2 | 001526e5c60a1d32794a18f3fd65ead6cade1a29 | [
"Apache-2.0"
] | 13 | 2017-12-11T13:59:42.000Z | 2020-11-16T21:52:31.000Z | lib/plenario/etl/queue.ex | vforgione/plenario2 | 001526e5c60a1d32794a18f3fd65ead6cade1a29 | [
"Apache-2.0"
] | 310 | 2017-11-13T22:52:26.000Z | 2018-11-19T17:49:30.000Z | lib/plenario/etl/queue.ex | vforgione/plenario2 | 001526e5c60a1d32794a18f3fd65ead6cade1a29 | [
"Apache-2.0"
] | 3 | 2017-12-05T00:36:12.000Z | 2020-03-10T15:15:29.000Z | defmodule Plenario.Etl.Queue do
use GenStage
require Logger
alias Plenario.{
DataSet,
DataSetActions
}
@pid __MODULE__
@clean_state {:queue.new(), 0}
# init
def start_link, do: GenStage.start_link(@pid, :ok, name: @pid)
def init(:ok), do: {:producer, @clean_state}
# client api
def... | 24.753425 | 134 | 0.638074 |
1a7333d0b825a7573017f8c99237885fa12e0569 | 894 | ex | Elixir | lib/options_tracker_web/live/feedback_live/feedback_entry.ex | mgwidmann/options_tracker | 5520f88a9a5873842a63a23d4bcc5da82a51feba | [
"MIT"
] | 12 | 2020-06-25T17:25:15.000Z | 2021-09-30T20:13:33.000Z | lib/options_tracker_web/live/feedback_live/feedback_entry.ex | mgwidmann/options_tracker | 5520f88a9a5873842a63a23d4bcc5da82a51feba | [
"MIT"
] | 5 | 2020-08-05T03:12:31.000Z | 2021-07-15T04:59:03.000Z | lib/options_tracker_web/live/feedback_live/feedback_entry.ex | mgwidmann/options_tracker | 5520f88a9a5873842a63a23d4bcc5da82a51feba | [
"MIT"
] | 2 | 2021-07-03T17:20:15.000Z | 2021-09-01T15:38:58.000Z | defmodule OptionsTrackerWeb.FeedbackLive.FeedbackEntry do
use OptionsTrackerWeb, :live_component
alias OptionsTracker.Users.Feedback
@impl true
@spec update(%{}, Phoenix.LiveView.Socket.t()) :: {:ok, Phoenix.LiveView.Socket.t()}
def update(%{current_user: _, path: _} = assigns, socket) do
{:ok,
soc... | 22.35 | 86 | 0.635347 |
1a733d452d45ea02399ceb22a0a6833fb6891331 | 12,883 | ex | Elixir | lib/speak_up/moderator_worker.ex | krishnakumar4a4/speak_up | a7b99e812ea4aaa6473a866f89fb0f4bb8973f6e | [
"MIT"
] | null | null | null | lib/speak_up/moderator_worker.ex | krishnakumar4a4/speak_up | a7b99e812ea4aaa6473a866f89fb0f4bb8973f6e | [
"MIT"
] | null | null | null | lib/speak_up/moderator_worker.ex | krishnakumar4a4/speak_up | a7b99e812ea4aaa6473a866f89fb0f4bb8973f6e | [
"MIT"
] | null | null | null | defmodule SpeakUp.ModeratorWorker do
use GenServer
def start_link(register_name, target) do
{:ok,pid} = GenServer.start_link(__MODULE__, target, name: ModeratorWorker)
:global.register_name(register_name, pid)
{:ok,pid}
end
def init(moderator_name) do
# For storing participant tokens/cookies
... | 42.518152 | 157 | 0.661337 |
1a736b4b8464744c0101e7e3410a9ec33841318b | 4,498 | ex | Elixir | clients/games/lib/google_api/games/v1/model/player.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/games/lib/google_api/games/v1/model/player.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/games/lib/google_api/games/v1/model/player.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... | 54.192771 | 340 | 0.705202 |
1a73808e39e0a6c0dfe203c2981b156e132857e1 | 2,252 | exs | Elixir | test/changelog_web/controllers/redirect_controller_test.exs | gustavoarmoa/changelog.com | e898a9979a237ae66962714821ed8633a4966f37 | [
"MIT"
] | 2,599 | 2016-10-25T15:02:53.000Z | 2022-03-26T02:34:42.000Z | test/changelog_web/controllers/redirect_controller_test.exs | sdrees/changelog.com | 955cdcf93d74991062f19a03e34c9f083ade1705 | [
"MIT"
] | 253 | 2016-10-25T20:29:24.000Z | 2022-03-29T21:52:36.000Z | test/changelog_web/controllers/redirect_controller_test.exs | sdrees/changelog.com | 955cdcf93d74991062f19a03e34c9f083ade1705 | [
"MIT"
] | 298 | 2016-10-25T15:18:31.000Z | 2022-01-18T21:25:52.000Z | defmodule ChangelogWeb.RedirectorTest do
use ExUnit.Case, async: true
alias ChangelogWeb.RedirectController, as: Redirector
defmodule Router do
use Phoenix.Router
get "/tatooine", Redirector, to: "/alderaan"
get "/exceptional", Redirector, []
get "/bespin", Redirector, external: "https://duckdu... | 28.871795 | 97 | 0.671847 |
1a738d64fe8b3ddbfb32ea9eb6ccaa7300977379 | 7,423 | exs | Elixir | test/vintage_net_ethernet_test.exs | nerves-networking/vintage_net_ethernet | 35a8b39a1fa242cfb828460a3f2e3f22298846d8 | [
"Apache-2.0"
] | 3 | 2020-04-04T19:08:47.000Z | 2020-08-03T22:02:36.000Z | test/vintage_net_ethernet_test.exs | nerves-networking/vintage_net_ethernet | 35a8b39a1fa242cfb828460a3f2e3f22298846d8 | [
"Apache-2.0"
] | 4 | 2021-06-27T23:49:11.000Z | 2022-02-09T00:22:30.000Z | test/vintage_net_ethernet_test.exs | nerves-networking/vintage_net_ethernet | 35a8b39a1fa242cfb828460a3f2e3f22298846d8 | [
"Apache-2.0"
] | null | null | null | defmodule VintageNetEthernetTest do
use ExUnit.Case
import ExUnit.CaptureLog
alias VintageNet.Interface.RawConfig
alias VintageNetEthernet, as: Ethernet
test "create a wired ethernet configuration" do
input = %{type: Ethernet, ipv4: %{method: :dhcp}, hostname: "unit_test"}
output = %RawConfig{
... | 29.573705 | 89 | 0.542099 |
1a739cbb6c9efbf538a5a8f393df21e91986f10a | 1,217 | ex | Elixir | lib/models/attachment.ex | accord-coop/ex_microsoftbot | 45f2d45f04e256435563a3ffc155651e8ec26fb6 | [
"MIT"
] | null | null | null | lib/models/attachment.ex | accord-coop/ex_microsoftbot | 45f2d45f04e256435563a3ffc155651e8ec26fb6 | [
"MIT"
] | 1 | 2021-06-26T00:52:21.000Z | 2021-06-26T00:52:21.000Z | lib/models/attachment.ex | accord-coop/ex_microsoftbot | 45f2d45f04e256435563a3ffc155651e8ec26fb6 | [
"MIT"
] | null | null | null | defmodule ExMicrosoftBot.Models.Attachment do
@moduledoc """
Microsoft bot attachment structure within the message
"""
@derive [Poison.Encoder]
defstruct [
:contentType,
:contentUrl,
:content,
:name,
:thumbnailUrl
]
@type json_base_value :: String.t() | number | boolean
@type json_... | 25.354167 | 86 | 0.648316 |
1a739d80ee1271ddca95a643bd96fe9262f8aac0 | 2,572 | ex | Elixir | web/channels/room_channel.ex | helapu/gd_push | 4bfe17194a898232fe8e8a4d54d4f90934ba4125 | [
"MIT"
] | null | null | null | web/channels/room_channel.ex | helapu/gd_push | 4bfe17194a898232fe8e8a4d54d4f90934ba4125 | [
"MIT"
] | null | null | null | web/channels/room_channel.ex | helapu/gd_push | 4bfe17194a898232fe8e8a4d54d4f90934ba4125 | [
"MIT"
] | null | null | null | defmodule GdPush.RoomChannel do
use Phoenix.Channel
require Logger
intercept ["new:msg"]
def join("rooms:plan", payload, socket) do
# 验证账户
Logger.debug "join uuid: #{payload["uuid"]}, token: #{payload["token"]}"
Logger.debug "join others: #{payload["body"]} #{payload["subject"]}"
Logger.debug ... | 26.791667 | 96 | 0.610031 |
1a73b6f439a5ab3ae072c318df27389a21577032 | 3,893 | ex | Elixir | lib/ex_docker_build/stream/worker.ex | filipevarjao/ex_docker_build | a263de4dda38cc849de9496e1c2f47781024996f | [
"MIT"
] | 18 | 2019-01-15T10:54:05.000Z | 2022-03-29T22:15:06.000Z | lib/ex_docker_build/stream/worker.ex | filipevarjao/ex_docker_build | a263de4dda38cc849de9496e1c2f47781024996f | [
"MIT"
] | 28 | 2019-01-30T12:52:04.000Z | 2021-08-03T05:46:17.000Z | lib/ex_docker_build/stream/worker.ex | filipevarjao/ex_docker_build | a263de4dda38cc849de9496e1c2f47781024996f | [
"MIT"
] | 3 | 2020-02-03T06:45:03.000Z | 2022-03-06T10:05:18.000Z | defmodule ExDockerBuild.Stream.Worker do
use GenServer, restart: :temporary
@timeout 10_000
defmodule State do
alias __MODULE__
@type t :: %__MODULE__{
id: reference(),
chunks: list(),
more_chunks: boolean(),
reply_to: pid()
}
defstruct id: ... | 32.173554 | 99 | 0.653737 |
1a73c33c468bd09998ebe39025f2172233c76740 | 1,626 | ex | Elixir | lib/rig/kafka_config.ex | steveoliver/reactive-interaction-gateway | 59b6dc994fd0f098bed19b7bf1e699513ac87167 | [
"Apache-2.0"
] | 518 | 2017-11-09T13:10:49.000Z | 2022-03-28T14:29:50.000Z | lib/rig/kafka_config.ex | steveoliver/reactive-interaction-gateway | 59b6dc994fd0f098bed19b7bf1e699513ac87167 | [
"Apache-2.0"
] | 270 | 2017-11-10T00:11:34.000Z | 2022-02-27T13:08:16.000Z | lib/rig/kafka_config.ex | steveoliver/reactive-interaction-gateway | 59b6dc994fd0f098bed19b7bf1e699513ac87167 | [
"Apache-2.0"
] | 67 | 2017-12-19T20:16:37.000Z | 2022-03-31T10:43:04.000Z | defmodule Rig.KafkaConfig do
@moduledoc """
Boiler plate for initializing Kafka client configuration.
"""
alias RigKafka
# ---
@doc """
Create a Kafka configuration map from given parameters.
Note that `brokers` is the only required parameter.
# Example
iex> __MODULE__.parse(%{brokers: ["l... | 25.809524 | 85 | 0.626691 |
1a73f52ffdf4d78761abd9637196735668b0a2d6 | 674 | exs | Elixir | spec/membrane/pipeline_state_spec.exs | treble37/membrane-core | 3f7c7200a80eef370092ef252b5f75dc9eb16cbd | [
"Apache-2.0"
] | null | null | null | spec/membrane/pipeline_state_spec.exs | treble37/membrane-core | 3f7c7200a80eef370092ef252b5f75dc9eb16cbd | [
"Apache-2.0"
] | null | null | null | spec/membrane/pipeline_state_spec.exs | treble37/membrane-core | 3f7c7200a80eef370092ef252b5f75dc9eb16cbd | [
"Apache-2.0"
] | null | null | null | defmodule Membrane.Pipeline.StateSpec do
use ESpec, async: true
describe "when creating new struct" do
it "should have internal_state field set to nil" do
%Membrane.Pipeline.State{internal_state: internal_state} = struct(described_module())
expect(internal_state) |> to(be_nil())
end
it "sh... | 32.095238 | 91 | 0.691395 |
1a740f0cfa27e6998f7b310cf7d06b66e8c56647 | 765 | ex | Elixir | address_validator/apps/address_validation_rest/test/support/channel_case.ex | aikssen/address_hackaton | 38f608d23705052776ce26f38ba67a6c1ef52ab2 | [
"MIT"
] | null | null | null | address_validator/apps/address_validation_rest/test/support/channel_case.ex | aikssen/address_hackaton | 38f608d23705052776ce26f38ba67a6c1ef52ab2 | [
"MIT"
] | null | null | null | address_validator/apps/address_validation_rest/test/support/channel_case.ex | aikssen/address_hackaton | 38f608d23705052776ce26f38ba67a6c1ef52ab2 | [
"MIT"
] | null | null | null | defmodule AddressValidationRest.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,
... | 22.5 | 56 | 0.728105 |
1a743aa9b89375a7ad995ef0a657491e4ed5da2f | 2,610 | exs | Elixir | test/yubikey_otp_test.exs | thomdixon/yubikey_otp | 8069c4c765bbcdb603b1f62779c00f2443151013 | [
"MIT"
] | null | null | null | test/yubikey_otp_test.exs | thomdixon/yubikey_otp | 8069c4c765bbcdb603b1f62779c00f2443151013 | [
"MIT"
] | null | null | null | test/yubikey_otp_test.exs | thomdixon/yubikey_otp | 8069c4c765bbcdb603b1f62779c00f2443151013 | [
"MIT"
] | null | null | null | defmodule YubikeyOTPTest do
use ExUnit.Case
#doctest YubikeyOTP
@api_id 1
alias YubikeyOTP.Service
setup do
bad_otp =
"h=Dfogk5qwCcw6+pr1G64gmomCKgQ=\nt=2020-04-09T09:31:56Z0363\notp=ccccccclulvjgvivliddvvdhdtuculkgikhnrgeueeri\nnonce=vwC1WQd3ip6QLPJfUJji5n\nstatus=BAD_OTP\n\n"
Tesla.Mock.mo... | 33.461538 | 166 | 0.668199 |
1a74c2a2613a566464c882baf053a3113f7d5eac | 1,293 | ex | Elixir | lib/ex_bin_web/endpoint.ex | bmartin2015/ex_bin | efa6755271f28fb67db862ac849c4449a067e9a4 | [
"MIT"
] | null | null | null | lib/ex_bin_web/endpoint.ex | bmartin2015/ex_bin | efa6755271f28fb67db862ac849c4449a067e9a4 | [
"MIT"
] | 2 | 2021-03-09T15:45:09.000Z | 2021-05-10T09:11:46.000Z | lib/ex_bin_web/endpoint.ex | bmartin2015/ex_bin | efa6755271f28fb67db862ac849c4449a067e9a4 | [
"MIT"
] | null | null | null | defmodule ExBinWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :ex_bin
socket "/socket", ExBinWeb.UserSocket,
websocket: true,
longpoll: false
# Serve at "/" the static files from "priv/static" directory.
#
# You should set gzip to true if you are running phx.digest
# when deploying your static fil... | 27.510638 | 69 | 0.70843 |
1a75276fef522be163d76dc5d3eb8645090711b3 | 1,301 | ex | Elixir | lib/noap.ex | bpardee/noap | 4c21c55ef2d88ad26a9fab94805beff954315dbf | [
"MIT"
] | 1 | 2022-03-04T03:55:46.000Z | 2022-03-04T03:55:46.000Z | lib/noap.ex | bpardee/noap | 4c21c55ef2d88ad26a9fab94805beff954315dbf | [
"MIT"
] | null | null | null | lib/noap.ex | bpardee/noap | 4c21c55ef2d88ad26a9fab94805beff954315dbf | [
"MIT"
] | null | null | null | defmodule Noap do
@type status_code :: pos_integer()
@type ok_status :: {:ok, status_code(), Noap.XMLSchema.t()}
@type error_status :: {:error, status_code(), String.t()} | {:error, status_code(), atom()}
@type call_operation_t :: ok_status() | error_status() | no_return()
@spec call_operation(Noap.WSDL.Oper... | 43.366667 | 99 | 0.714835 |
1a758918173d10dfe2fc73c96b031312ae6e08b4 | 1,066 | ex | Elixir | test/fixtures/elixir/options.ex | csperando/curlconverter | 733f110e5621375701f4424299ccd72e669876f6 | [
"MIT"
] | 536 | 2021-10-06T17:21:25.000Z | 2022-03-31T13:05:48.000Z | test/fixtures/elixir/options.ex | csperando/curlconverter | 733f110e5621375701f4424299ccd72e669876f6 | [
"MIT"
] | 74 | 2021-10-08T13:57:14.000Z | 2022-03-31T06:55:39.000Z | test/fixtures/elixir/options.ex | csperando/curlconverter | 733f110e5621375701f4424299ccd72e669876f6 | [
"MIT"
] | 104 | 2021-10-06T19:36:15.000Z | 2022-03-31T07:34:04.000Z | request = %HTTPoison.Request{
method: :options,
url: "https://localhost:28139/api/tunein/queue-and-play",
options: [],
headers: [
{~s|Pragma|, ~s|no-cache|},
{~s|Access-Control-Request-Method|, ~s|POST|},
{~s|Origin|, ~s|https://alexa.amazon.de|},
{~s|Accept-Encoding|, ~s|gzip, deflate, br|},
... | 34.387097 | 142 | 0.578799 |
1a75b36c3d99b766c03bb170a5967d05518e84c8 | 147 | exs | Elixir | test/sepomex_api_test.exs | erickueen/sepomex-api | f975a5b462c44181fed8ac8852e9503a9ff2bdb7 | [
"Apache-2.0"
] | null | null | null | test/sepomex_api_test.exs | erickueen/sepomex-api | f975a5b462c44181fed8ac8852e9503a9ff2bdb7 | [
"Apache-2.0"
] | null | null | null | test/sepomex_api_test.exs | erickueen/sepomex-api | f975a5b462c44181fed8ac8852e9503a9ff2bdb7 | [
"Apache-2.0"
] | 1 | 2022-02-09T00:23:25.000Z | 2022-02-09T00:23:25.000Z | defmodule SepomexAPITest do
use ExUnit.Case
doctest SepomexAPI
test "greets the world" do
assert SepomexAPI.hello() == :world
end
end
| 16.333333 | 39 | 0.727891 |
1a75c239e143d561c64187388ed1e8644a515f99 | 3,135 | ex | Elixir | clients/analytics_reporting/lib/google_api/analytics_reporting/v4/model/segment_filter.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/analytics_reporting/lib/google_api/analytics_reporting/v4/model/segment_filter.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/analytics_reporting/lib/google_api/analytics_reporting/v4/model/segment_filter.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... | 58.055556 | 749 | 0.70941 |
1a75c545ed7f06e5ea7453380e8de0eba7060ac2 | 5,935 | exs | Elixir | test/ex_plasma/transaction/type/fee_test.exs | omisego/ex_plasma | 27c33206297a4d6832a9419c4e61e04b3c2c9f71 | [
"Apache-2.0"
] | 6 | 2019-11-15T13:34:24.000Z | 2020-03-02T11:38:01.000Z | test/ex_plasma/transaction/type/fee_test.exs | omisego/ex_plasma | 27c33206297a4d6832a9419c4e61e04b3c2c9f71 | [
"Apache-2.0"
] | 34 | 2019-11-20T03:33:22.000Z | 2020-05-27T18:40:10.000Z | test/ex_plasma/transaction/type/fee_test.exs | omisego/ex_plasma | 27c33206297a4d6832a9419c4e61e04b3c2c9f71 | [
"Apache-2.0"
] | 6 | 2020-06-02T19:00:36.000Z | 2021-08-19T11:06:33.000Z | defmodule ExPlasma.Transaction.Type.FeeTest do
@moduledoc false
use ExUnit.Case, async: true
doctest ExPlasma.Transaction.Type.Fee, import: true
alias ExPlasma.Builder
alias ExPlasma.Output
alias ExPlasma.Transaction
alias ExPlasma.Transaction.Type.Fee
describe "new_output/3" do
test "returns a ne... | 31.073298 | 119 | 0.516428 |
1a75fd80bd40079fba097e11cb224693c0cbec38 | 2,219 | ex | Elixir | deps/timex/lib/comparable/comparable.ex | robot-overlord/starter_kit | 254153221d0a3a06324c65ad8e89d610de2429c3 | [
"MIT"
] | 1 | 2020-01-31T10:23:37.000Z | 2020-01-31T10:23:37.000Z | deps/timex/lib/comparable/comparable.ex | robot-overlord/starter_kit | 254153221d0a3a06324c65ad8e89d610de2429c3 | [
"MIT"
] | null | null | null | deps/timex/lib/comparable/comparable.ex | robot-overlord/starter_kit | 254153221d0a3a06324c65ad8e89d610de2429c3 | [
"MIT"
] | null | null | null | defprotocol Timex.Comparable do
@moduledoc """
This protocol is used for comparing and diffing different date/time representations
"""
alias Timex.Types
@type granularity :: :years | :months | :weeks | :calendar_weeks | :days |
:hours | :minutes | :seconds | :milliseconds | :microsecon... | 32.15942 | 89 | 0.678684 |
1a76073f948a11b85405f016e335fdab45b2ede0 | 351 | exs | Elixir | priv/repo/seeds.exs | qhwa/bonfire | 4a368d6d5300539399dcaff167ac69e3165c2bff | [
"MIT"
] | 71 | 2020-03-09T02:09:30.000Z | 2022-03-09T06:10:23.000Z | priv/repo/seeds.exs | qhwa/bonfire | 4a368d6d5300539399dcaff167ac69e3165c2bff | [
"MIT"
] | null | null | null | priv/repo/seeds.exs | qhwa/bonfire | 4a368d6d5300539399dcaff167ac69e3165c2bff | [
"MIT"
] | 4 | 2020-04-03T02:28:05.000Z | 2021-11-24T20:07:25.000Z | # Script for populating the database. You can run it as:
#
# mix run priv/repo/seeds.exs
#
# Inside the script, you can read and write to any of your
# repositories directly:
#
# Bonfire.Repo.insert!(%Bonfire.SomeSchema{})
#
# We recommend using the bang functions (`insert!`, `update!`
# and so on) as they will... | 29.25 | 61 | 0.706553 |
1a7638d1cabf5753d58037f0a126d6d4136f9305 | 952 | exs | Elixir | test/live_sup/core/datasources/chuck_norris_api_datasource_test.exs | livesup-dev/livesup | eaf9ffc78d3043bd9e3408f0f4df26ed16eb8446 | [
"Apache-2.0",
"MIT"
] | null | null | null | test/live_sup/core/datasources/chuck_norris_api_datasource_test.exs | livesup-dev/livesup | eaf9ffc78d3043bd9e3408f0f4df26ed16eb8446 | [
"Apache-2.0",
"MIT"
] | 3 | 2022-02-23T15:51:48.000Z | 2022-03-14T22:52:43.000Z | test/live_sup/core/datasources/chuck_norris_api_datasource_test.exs | livesup-dev/livesup | eaf9ffc78d3043bd9e3408f0f4df26ed16eb8446 | [
"Apache-2.0",
"MIT"
] | null | null | null | defmodule LiveSup.Test.Core.Datasources.ChuckNorrisApiDatasourceTest do
use LiveSup.DataCase, async: true
alias LiveSup.Core.Datasources.ChuckNorrisApiDatasource
@response """
{
"icon_url" : "https://assets.chucknorris.host/img/avatar/chuck-norris.png",
"id" : "xAAGEowVTaaN5P0_-LvBSA",
"url" : "",... | 26.444444 | 79 | 0.663866 |
1a764975ab415b98ae70f8a9e1eed1822ab3d691 | 809 | ex | Elixir | example/lib/example_web/models/user_from_auth.ex | bvandgrift/ueberauth_microsoft_single_tenant | 680523dca182536ac8caa87a7ec31840a877eac4 | [
"MIT"
] | null | null | null | example/lib/example_web/models/user_from_auth.ex | bvandgrift/ueberauth_microsoft_single_tenant | 680523dca182536ac8caa87a7ec31840a877eac4 | [
"MIT"
] | null | null | null | example/lib/example_web/models/user_from_auth.ex | bvandgrift/ueberauth_microsoft_single_tenant | 680523dca182536ac8caa87a7ec31840a877eac4 | [
"MIT"
] | null | null | null | defmodule InfoFromAuth do
@moduledoc """
Retrieve the user information from an auth request
"""
require Logger
require Poison
alias Ueberauth.Auth
def find_or_create(%Auth{} = auth) do
{:ok, basic_info(auth)}
end
defp basic_info(auth) do
%{id: auth.uid, name: name_from_auth(auth), email: em... | 19.731707 | 77 | 0.624227 |
1a7653381ed4f7f07e9cb9242de93f76aeeb0393 | 1,008 | exs | Elixir | app/phxfeeds/config/config.exs | chrispaynes/PhoenixFeeds | dd6451b96c8005eff94727da760a3716ecb18545 | [
"MIT"
] | null | null | null | app/phxfeeds/config/config.exs | chrispaynes/PhoenixFeeds | dd6451b96c8005eff94727da760a3716ecb18545 | [
"MIT"
] | null | null | null | app/phxfeeds/config/config.exs | chrispaynes/PhoenixFeeds | dd6451b96c8005eff94727da760a3716ecb18545 | [
"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.
# General application configuration
use Mix.Config
config :phxfeeds,
ecto_repos: [Phxfeeds.Repo]
... | 32.516129 | 86 | 0.771825 |
1a76abb508e7b8ab04bc474e3bc6daca4f09b557 | 381 | exs | Elixir | examples/tcp_connection/mix.exs | cjimison/connection | 81889d80e2e0ad69844b4de8f042440172478d6d | [
"Apache-2.0"
] | 250 | 2015-05-28T22:02:57.000Z | 2020-10-19T22:45:03.000Z | examples/tcp_connection/mix.exs | cjimison/connection | 81889d80e2e0ad69844b4de8f042440172478d6d | [
"Apache-2.0"
] | 12 | 2015-05-31T12:16:32.000Z | 2020-10-23T11:02:41.000Z | examples/tcp_connection/mix.exs | cjimison/connection | 81889d80e2e0ad69844b4de8f042440172478d6d | [
"Apache-2.0"
] | 34 | 2015-05-31T11:51:09.000Z | 2020-11-06T19:29:24.000Z | defmodule TCPConnection.Mixfile do
use Mix.Project
def project do
[app: :tcp_connection,
version: "0.0.1",
elixir: "~> 1.0",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps]
end
def application do
[applications: [:logger, :connection]]
end
... | 18.142857 | 42 | 0.598425 |
1a76f8a3dc6f8973412388e75b01c3e375f17a54 | 3,855 | ex | Elixir | lib/sanbase/accounts/user_follower.ex | santiment/sanbase2 | 9ef6e2dd1e377744a6d2bba570ea6bd477a1db31 | [
"MIT"
] | 81 | 2017-11-20T01:20:22.000Z | 2022-03-05T12:04:25.000Z | lib/sanbase/accounts/user_follower.ex | rmoorman/sanbase2 | 226784ab43a24219e7332c49156b198d09a6dd85 | [
"MIT"
] | 359 | 2017-10-15T14:40:53.000Z | 2022-01-25T13:34:20.000Z | lib/sanbase/accounts/user_follower.ex | rmoorman/sanbase2 | 226784ab43a24219e7332c49156b198d09a6dd85 | [
"MIT"
] | 16 | 2017-11-19T13:57:40.000Z | 2022-02-07T08:13:02.000Z | defmodule Sanbase.Accounts.UserFollower do
@moduledoc """
Module implementing follow/unfollow functionality between users.
"""
use Ecto.Schema
import Ecto.Query
import Ecto.Changeset
import Sanbase.Accounts.EventEmitter, only: [emit_event: 3]
alias Sanbase.Accounts.User
alias Sanbase.Repo
@primar... | 26.586207 | 95 | 0.64332 |
1a772318b1aff6336f2cae6a4e12b7271c7e8712 | 11,293 | ex | Elixir | clients/you_tube/lib/google_api/you_tube/v3/api/comment_threads.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/you_tube/lib/google_api/you_tube/v3/api/comment_threads.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/you_tube/lib/google_api/you_tube/v3/api/comment_threads.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... | 53.268868 | 306 | 0.667847 |
1a7726a2d25437fac67c6a1f1c5a367e88efd48a | 458 | ex | Elixir | lib/codes/codes_n12.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_n12.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_n12.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | defmodule IcdCode.ICDCode.Codes_N12 do
alias IcdCode.ICDCode
def _N12 do
%ICDCode{full_code: "N12",
category_code: "N12",
short_code: "",
full_name: "Tubulo-interstitial nephritis, not specified as acute or chronic",
short_name: "Tubulo-interstitial nephritis, not specifie... | 28.625 | 91 | 0.676856 |
1a773618fa21b2ededee997b866c890e32d2e7e9 | 209 | ex | Elixir | lib/stylist_ex.ex | alganet/stylistex | b1ceb3b6456f841a03153d58153fc6ed1427a923 | [
"MIT"
] | 9 | 2020-07-20T03:08:28.000Z | 2021-05-15T08:50:14.000Z | lib/stylist_ex.ex | alganet/stylistex | b1ceb3b6456f841a03153d58153fc6ed1427a923 | [
"MIT"
] | 5 | 2020-07-27T22:14:58.000Z | 2021-08-31T08:13:05.000Z | lib/stylist_ex.ex | alganet/stylistex | b1ceb3b6456f841a03153d58153fc6ed1427a923 | [
"MIT"
] | 1 | 2020-07-27T19:56:49.000Z | 2020-07-27T19:56:49.000Z | defmodule StylistEx do
@moduledoc """
StylistEx is a parser for CSS to Elixir types and structs,
which can generate CSS string with validations that are triggered
before "compiling the CSS".
"""
end
| 26.125 | 67 | 0.746411 |
1a7766545f633eaa08ae4049f8e584085ff210f4 | 286 | ex | Elixir | ongeza/lib/ongeza/core/counter.ex | djslakivich/otp_apr_2021 | 5542dc54ee4b4cccdf20daeb9108dcc55cb94323 | [
"MIT"
] | null | null | null | ongeza/lib/ongeza/core/counter.ex | djslakivich/otp_apr_2021 | 5542dc54ee4b4cccdf20daeb9108dcc55cb94323 | [
"MIT"
] | null | null | null | ongeza/lib/ongeza/core/counter.ex | djslakivich/otp_apr_2021 | 5542dc54ee4b4cccdf20daeb9108dcc55cb94323 | [
"MIT"
] | 4 | 2021-04-20T19:27:03.000Z | 2021-04-21T13:02:39.000Z | defmodule Ongeza.Core.Counter do
# It's a constructor Moh!
def new(n) do
String.to_integer(n)
end
def add(acc \\ 1, n) do
acc + n
end
def convert(n) do
to_string(n)
end
# def flow(n) do
# n
# |> new()
# |> add()
# |> convert()
# end
end
| 13 | 32 | 0.527972 |
1a779064170382c7a418c9c5015e30912c77e1e9 | 47 | exs | Elixir | test/ex_pesa_test.exs | beamkenya/ex_jenga | 03a936a04d99614043d120d0e3ee787f1b8a5b8d | [
"AML",
"MIT"
] | 1 | 2021-09-14T09:50:22.000Z | 2021-09-14T09:50:22.000Z | test/ex_pesa_test.exs | beamkenya/ex_jenga | 03a936a04d99614043d120d0e3ee787f1b8a5b8d | [
"AML",
"MIT"
] | 15 | 2021-04-23T11:28:49.000Z | 2021-06-23T04:42:35.000Z | test/ex_pesa_test.exs | beamkenya/ex_jenga | 03a936a04d99614043d120d0e3ee787f1b8a5b8d | [
"AML",
"MIT"
] | null | null | null | defmodule ExJengaTest do
use ExUnit.Case
end
| 11.75 | 24 | 0.808511 |
1a77939edfddc2c6d2e2b3b475bc399681b18f5d | 348 | exs | Elixir | templates/_elixir_/_fragments_/mix.exs/deps/dev.exs | ejpcmac/ex_gen | ccd2beec8912fa6ea6ff9839454986bf3124b001 | [
"MIT"
] | 1 | 2019-10-06T07:31:06.000Z | 2019-10-06T07:31:06.000Z | templates/_elixir_/_fragments_/mix.exs/deps/dev.exs | ejpcmac/xgen | ccd2beec8912fa6ea6ff9839454986bf3124b001 | [
"MIT"
] | 30 | 2018-08-29T12:52:59.000Z | 2020-05-28T04:54:33.000Z | templates/_elixir_/_fragments_/mix.exs/deps/dev.exs | ejpcmac/ex_gen | ccd2beec8912fa6ea6ff9839454986bf3124b001 | [
"MIT"
] | 1 | 2020-09-25T09:39:56.000Z | 2020-09-25T09:39:56.000Z | # Development dependencies
{:credo, "~> 1.0", only: :dev, runtime: false},
{:dialyxir, "~> 1.0-rc", only: :dev, runtime: false},
{:excoveralls, ">= 0.0.0", only: :test, runtime: false},
{:mix_test_watch, ">= 0.0.0", only: :test, runtime: false},
{:ex_unit_notifier, ">= 0.0.0", only: :test, runtime: false},
{:stream_dat... | 43.5 | 61 | 0.609195 |
1a779e2573c10bc166270cf01092a2c154ee19ee | 311 | exs | Elixir | talks-articles/languages-n-runtimes/elixir/book--programming-elixir-ge-1.6/duper19/config/config.exs | abhishekkr/tutorials_as_code | f355dc62a5025b710ac6d4a6ac2f9610265fad54 | [
"MIT"
] | 37 | 2015-02-01T23:16:39.000Z | 2021-12-22T16:50:48.000Z | talks-articles/languages-n-runtimes/elixir/book--programming-elixir-ge-1.6/duper19/config/config.exs | abhishekkr/tutorials_as_code | f355dc62a5025b710ac6d4a6ac2f9610265fad54 | [
"MIT"
] | 1 | 2017-03-02T04:55:48.000Z | 2018-01-14T10:51:11.000Z | talks-articles/languages-n-runtimes/elixir/book--programming-elixir-ge-1.6/duper19/config/config.exs | abhishekkr/tutorials_as_code | f355dc62a5025b710ac6d4a6ac2f9610265fad54 | [
"MIT"
] | 15 | 2015-03-02T08:09:01.000Z | 2021-06-10T03:25:41.000Z | use Mix.Config
config :duper19, results: :dup_results
config :duper19, pathfinder: :dup_pathfinder
config :duper19, worker_supervisor: :dup_worker_sup
config :duper19, worker: :dup_worker
config :duper19, gatherer: :dup_gatherer
config :duper19, dirwalker: :dup_dirwalker
config :duper19, mystash: :dup_stash
| 28.272727 | 51 | 0.803859 |
1a77a93907b573c5902a1f84f5d21b901b6e6c59 | 508 | ex | Elixir | test/helper/xor_mapped_address.ex | ACollectionOfAtoms/jerboa | 16000d450bb60b544b5c91f0fd7540a31b6c90b8 | [
"Apache-2.0"
] | 14 | 2016-12-22T10:38:34.000Z | 2021-03-11T23:20:26.000Z | test/helper/xor_mapped_address.ex | ACollectionOfAtoms/jerboa | 16000d450bb60b544b5c91f0fd7540a31b6c90b8 | [
"Apache-2.0"
] | 94 | 2016-12-22T13:13:29.000Z | 2021-02-10T14:22:32.000Z | test/helper/xor_mapped_address.ex | ACollectionOfAtoms/jerboa | 16000d450bb60b544b5c91f0fd7540a31b6c90b8 | [
"Apache-2.0"
] | 6 | 2017-04-03T20:23:00.000Z | 2022-03-06T10:14:30.000Z | defmodule Jerboa.Test.Helper.XORMappedAddress do
@moduledoc false
alias Jerboa.Format.Body.Attribute.XORMappedAddress
def struct(4) do
struct(:ipv4, ip_4_a(), port())
end
def struct(6) do
struct(:ipv6, ip_6_a(), port())
end
def ip_4_a do
{0, 0, 0, 0}
end
def ip_6_a do
:erlang.make_... | 16.387097 | 53 | 0.645669 |
1a77bdb57221a8aa4ca8407ccbdbe4eaaae82711 | 2,204 | ex | Elixir | clients/content/lib/google_api/content/v21/model/shipment_invoice.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v21/model/shipment_invoice.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v21/model/shipment_invoice.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... | 37.355932 | 246 | 0.735481 |
1a77bfb09e7570f91c31645e56ed3133454f6cc4 | 1,685 | ex | Elixir | lib/mix/lib/mix/tasks/compile.ex | ekosz/elixir | 62e375bc711b4072e1b68de776e96cc31f571d45 | [
"Apache-2.0"
] | 1 | 2017-10-29T16:37:08.000Z | 2017-10-29T16:37:08.000Z | lib/mix/lib/mix/tasks/compile.ex | ekosz/elixir | 62e375bc711b4072e1b68de776e96cc31f571d45 | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/tasks/compile.ex | ekosz/elixir | 62e375bc711b4072e1b68de776e96cc31f571d45 | [
"Apache-2.0"
] | null | null | null | defmodule Mix.Tasks.Compile do
use Mix.Task
@shortdoc "Compile source files"
@moduledoc """
A meta task that compile source files. It simply runs the
compilers registered in your project. At the end of compilation
it ensures load paths are set.
## Configuration
* `:compilers` - compilers to be run, ... | 22.466667 | 70 | 0.617211 |
1a77cfee3bf064c475d3e3d3e489d2d7f58ff3ea | 2,519 | ex | Elixir | lib/draft.ex | estermer/ex-draft | 346c877227a5b96a3e177464a478a821c75c4172 | [
"MIT"
] | null | null | null | lib/draft.ex | estermer/ex-draft | 346c877227a5b96a3e177464a478a821c75c4172 | [
"MIT"
] | null | null | null | lib/draft.ex | estermer/ex-draft | 346c877227a5b96a3e177464a478a821c75c4172 | [
"MIT"
] | null | null | null | defmodule Draft do
defmacro __using__(_) do
quote do
@moduledoc """
Provides functions for parsing DraftJS content.
"""
@doc """
Renders the given DraftJS input as html.
## Examples
iex> draft = %{"entityMap"=>%{},"blocks"=>[%{"key"=>"1","text"=>"Hello","type"=>"unstyle... | 37.044118 | 186 | 0.572449 |
1a77d6d0a19b779615c482d69d445d4de7d07f81 | 2,505 | exs | Elixir | test/components/form/radio_button_test.exs | jshmrtn/surface | 5ddbbc67b2c165ba53a85c68c0da8fce491472f2 | [
"MIT"
] | 1 | 2021-04-30T14:28:08.000Z | 2021-04-30T14:28:08.000Z | test/components/form/radio_button_test.exs | davydog187/surface | 6547e015a70d06fe20548b5618d0666c4f7481d1 | [
"MIT"
] | null | null | null | test/components/form/radio_button_test.exs | davydog187/surface | 6547e015a70d06fe20548b5618d0666c4f7481d1 | [
"MIT"
] | null | null | null | defmodule Surface.Components.Form.RadioButtonTest do
use Surface.ConnCase, async: true
alias Surface.Components.Form.RadioButton
test "radio" do
html =
render_surface do
~H"""
<RadioButton form="user" field="role" value="admin"/>
"""
end
assert html =~ """
... | 22.772727 | 106 | 0.561277 |
1a77dcad956f4d69609e2ae0dd597e7a897e0037 | 2,948 | ex | Elixir | data/web/deps/ecto/lib/ecto/adapters/sql/connection.ex | lydiadwyer/trains_elixir | 16da18d4582307f4967b6cce7320e9aa08a849c3 | [
"Apache-2.0"
] | null | null | null | data/web/deps/ecto/lib/ecto/adapters/sql/connection.ex | lydiadwyer/trains_elixir | 16da18d4582307f4967b6cce7320e9aa08a849c3 | [
"Apache-2.0"
] | null | null | null | data/web/deps/ecto/lib/ecto/adapters/sql/connection.ex | lydiadwyer/trains_elixir | 16da18d4582307f4967b6cce7320e9aa08a849c3 | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.Adapters.SQL.Connection do
@moduledoc """
Specifies the behaviour to be implemented by all SQL connections.
"""
@typedoc "The prepared query which is an SQL command"
@type prepared :: String.t
@typedoc "The cache query which is a DBConnection Query"
@type cached :: map
@doc """
Recei... | 32.395604 | 128 | 0.644844 |
1a77e74dbe4c618bcd1d992f465d15a282ee654d | 428 | exs | Elixir | mix.exs | sleipnir/elixir_support | b296e4aad1f3f642590c3f29f4dccafc80c5df0e | [
"Apache-2.0"
] | 2 | 2021-07-28T23:02:24.000Z | 2021-07-29T00:34:42.000Z | mix.exs | sleipnir/elixir_support | b296e4aad1f3f642590c3f29f4dccafc80c5df0e | [
"Apache-2.0"
] | 11 | 2020-10-26T19:55:18.000Z | 2020-11-10T00:23:28.000Z | mix.exs | sleipnir/elixir_support | b296e4aad1f3f642590c3f29f4dccafc80c5df0e | [
"Apache-2.0"
] | 1 | 2021-07-28T21:31:12.000Z | 2021-07-28T21:31:12.000Z | defmodule ElixirSupport.MixProject do
use Mix.Project
def project do
[
apps_path: "apps",
version: "0.1.0",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Dependencies listed here are available only for this
# project and cannot be accessed from applications inside... | 19.454545 | 59 | 0.642523 |
1a77fe6687db3d14079d3b2495107fdf7166d405 | 1,809 | ex | Elixir | plants_weather_traffic/apps/weather_server/lib/weather_zmq.ex | andfoy/cpd-exercises | f36ac16c74bb980d7edd6aaf5661a6d4d4b09489 | [
"MIT"
] | null | null | null | plants_weather_traffic/apps/weather_server/lib/weather_zmq.ex | andfoy/cpd-exercises | f36ac16c74bb980d7edd6aaf5661a6d4d4b09489 | [
"MIT"
] | null | null | null | plants_weather_traffic/apps/weather_server/lib/weather_zmq.ex | andfoy/cpd-exercises | f36ac16c74bb980d7edd6aaf5661a6d4d4b09489 | [
"MIT"
] | null | null | null | defmodule WeatherZMQ do
use Agent
def start_link(args) do
pid = spawn_link(__MODULE__, :init, args)
{:ok, pid}
end
def init(ip, port) do
{:ok, socket} = :chumak.socket(:rep, "weather-rep" |> String.to_charlist())
case :chumak.bind(socket, :tcp, ip |> String.to_charlist(), port) do
{:ok,... | 24.445946 | 86 | 0.522941 |
1a780e8cc5450fb2917ea56d1eb5c2f41cf3e850 | 1,680 | ex | Elixir | lib/cat_on_duty_web/live/team_live/form_component.ex | psolvy/cat_on_duty | b03ba225286c85407ca21576c39225f058b22b56 | [
"MIT"
] | 3 | 2020-11-23T15:30:04.000Z | 2020-12-01T17:11:49.000Z | lib/cat_on_duty_web/live/team_live/form_component.ex | psolvy/cat_on_duty | b03ba225286c85407ca21576c39225f058b22b56 | [
"MIT"
] | 1 | 2020-12-29T09:09:03.000Z | 2020-12-29T09:09:03.000Z | lib/cat_on_duty_web/live/team_live/form_component.ex | psolvy/cat_on_duty | b03ba225286c85407ca21576c39225f058b22b56 | [
"MIT"
] | 1 | 2021-08-11T10:10:16.000Z | 2021-08-11T10:10:16.000Z | defmodule CatOnDutyWeb.TeamLive.FormComponent do
@moduledoc "Team edit page handlers"
use CatOnDutyWeb, :live_component
alias CatOnDuty.Employees
@impl true
def update(%{team: team} = assigns, socket) do
changeset = Employees.change_team(team)
{:ok,
socket
|> assign(assigns)
|> assi... | 28 | 68 | 0.638095 |
1a7839a61e165ad053476a407795980729884954 | 1,062 | ex | Elixir | lib/game.ex | diogovk/mexgoo | 6c51d8376858f1634c44e8c3d0178f6956d8707b | [
"Unlicense"
] | null | null | null | lib/game.ex | diogovk/mexgoo | 6c51d8376858f1634c44e8c3d0178f6956d8707b | [
"Unlicense"
] | null | null | null | lib/game.ex | diogovk/mexgoo | 6c51d8376858f1634c44e8c3d0178f6956d8707b | [
"Unlicense"
] | null | null | null |
defmodule Mexgoo.Game do
use GenServer
alias Mexgoo.Player
alias Mexgoo.Gamestate
@doc """
Starts a game
"""
def start_link(player1 = %Player{}, player2 = %Player{} , opts \\ []) do
GenServer.start_link(__MODULE__, [player1, player2], opts)
end
def init([player1, player2]) do
{:ok, %Gamest... | 24.697674 | 96 | 0.672316 |
1a7850cfaa48905eb421bee0826e3f2f5974f13f | 64,413 | exs | Elixir | test/lib/ec2_test.exs | xaelectronics/ex_aws_ec2 | 7cfdcf57521b8fa9e025a18b6e6598706ebd7cf8 | [
"Unlicense",
"MIT"
] | 4 | 2019-07-06T01:20:48.000Z | 2021-10-09T19:51:34.000Z | test/lib/ec2_test.exs | xaelectronics/ex_aws_ec2 | 7cfdcf57521b8fa9e025a18b6e6598706ebd7cf8 | [
"Unlicense",
"MIT"
] | 4 | 2017-10-19T01:27:01.000Z | 2019-04-11T12:51:35.000Z | test/lib/ec2_test.exs | xaelectronics/ex_aws_ec2 | 7cfdcf57521b8fa9e025a18b6e6598706ebd7cf8 | [
"Unlicense",
"MIT"
] | 15 | 2017-10-27T05:35:37.000Z | 2021-09-05T12:34:02.000Z | defmodule ExAws.EC2Test do
use ExUnit.Case, async: true
doctest ExAws.EC2
alias ExAws.EC2
@version "2016-11-15"
defp build_query(action, params) do
action_string = action |> Atom.to_string |> Macro.camelize
%ExAws.Operation.Query{
path: "/",
params: params |> Map.merge(%{"Version" => ... | 29.834646 | 153 | 0.622762 |
1a7851418f8a556280e32c43ee91d7a50f6481b5 | 669 | ex | Elixir | lib/stripe/subscriptions/discount.ex | Rutaba/stripity_stripe | 12c525301c781f9c8c7e578cc0d933f5d35183d5 | [
"BSD-3-Clause"
] | null | null | null | lib/stripe/subscriptions/discount.ex | Rutaba/stripity_stripe | 12c525301c781f9c8c7e578cc0d933f5d35183d5 | [
"BSD-3-Clause"
] | null | null | null | lib/stripe/subscriptions/discount.ex | Rutaba/stripity_stripe | 12c525301c781f9c8c7e578cc0d933f5d35183d5 | [
"BSD-3-Clause"
] | 1 | 2021-06-28T08:42:34.000Z | 2021-06-28T08:42:34.000Z | defmodule Stripe.Discount do
@moduledoc """
Work with Stripe discounts.
Stripe API reference: https://stripe.com/docs/api#discounts
"""
use Stripe.Entity
@type t :: %__MODULE__{
object: String.t(),
coupon: Stripe.Coupon.t(),
customer: Stripe.id() | Stripe.Customer.t() | nil,... | 20.90625 | 61 | 0.568012 |
1a78a669c7a0771bb9b6cc1d11fa9be4b2d6e260 | 820 | exs | Elixir | lib/elixir/test/elixir/gen_event/behaviour_test.exs | Nicd/elixir | e62ef92a4be1b562033d35b2d822cc9d6c661077 | [
"Apache-2.0"
] | 4 | 2016-04-05T05:51:36.000Z | 2019-10-31T06:46:35.000Z | lib/elixir/test/elixir/gen_event/behaviour_test.exs | Nicd/elixir | e62ef92a4be1b562033d35b2d822cc9d6c661077 | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/gen_event/behaviour_test.exs | Nicd/elixir | e62ef92a4be1b562033d35b2d822cc9d6c661077 | [
"Apache-2.0"
] | 5 | 2015-02-01T06:01:19.000Z | 2019-08-29T09:02:35.000Z | Code.require_file "../test_helper.exs", __DIR__
defmodule GenEvent.BehaviourTest do
use ExUnit.Case, async: true
defmodule MyEventHandler do
use GenEvent.Behaviour
# Callbacks
def init(_) do
{ :ok, [] }
end
def handle_event({:notification, x}, notifications) do
{ :ok, [x|notific... | 22.162162 | 72 | 0.653659 |
1a78ae9df8807a3d977f2385ac1863aaa6fbc78c | 429 | exs | Elixir | test/admissions_web/views/error_view_test.exs | doomspork/admissions | a1fd7946dc980189f47a5b808c12e56655fdedfb | [
"Apache-2.0"
] | 18 | 2018-12-01T22:55:24.000Z | 2022-03-11T04:12:43.000Z | test/admissions_web/views/error_view_test.exs | doomspork/admissions | a1fd7946dc980189f47a5b808c12e56655fdedfb | [
"Apache-2.0"
] | 14 | 2018-12-01T01:00:33.000Z | 2021-06-24T00:40:39.000Z | test/admissions_web/views/error_view_test.exs | doomspork/admissions | a1fd7946dc980189f47a5b808c12e56655fdedfb | [
"Apache-2.0"
] | 1 | 2019-02-10T16:12:15.000Z | 2019-02-10T16:12:15.000Z | defmodule AdmissionsWeb.ErrorViewTest do
use AdmissionsWeb.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(AdmissionsWeb.ErrorView, "404.html", []) == "Not Found"
end
test "renders 500.html" ... | 28.6 | 95 | 0.741259 |
1a78c1e1520152ec406c493a0756350dc28d6af7 | 1,999 | ex | Elixir | lib/syscrap.ex | elpulgardelpanda/syscrap | 03e5dee924df8cd69db4eddb1e557168ea0ee04f | [
"MIT"
] | null | null | null | lib/syscrap.ex | elpulgardelpanda/syscrap | 03e5dee924df8cd69db4eddb1e557168ea0ee04f | [
"MIT"
] | null | null | null | lib/syscrap.ex | elpulgardelpanda/syscrap | 03e5dee924df8cd69db4eddb1e557168ea0ee04f | [
"MIT"
] | null | null | null | require Syscrap.Helpers, as: H
alias Syscrap.Aggregator, as: A
alias Syscrap.Reactor, as: R
defmodule Syscrap do
@moduledoc """
Main Syscrap Application
"""
use Application
def start(_type, _args), do: Syscrap.Supervisor.start_link
@doc """
Tell the world outside we are alive
"""
def alive_loo... | 32.241935 | 94 | 0.62031 |
1a78fb60281a668b175e09a4eb08a9fe9244ff6c | 1,943 | ex | Elixir | clients/sheets/lib/google_api/sheets/v4/model/data_source_refresh_weekly_schedule.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/sheets/lib/google_api/sheets/v4/model/data_source_refresh_weekly_schedule.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/sheets/lib/google_api/sheets/v4/model/data_source_refresh_weekly_schedule.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... | 38.86 | 255 | 0.740607 |
1a7907dff0fbd78beb2c2740d1113b867ddb94dc | 877 | ex | Elixir | YouTube/mergesort/lib/mergesort.ex | adolfont/pensandoemelixir | 10a639c6451b8ec181116a0531a77815fde04f3f | [
"CC0-1.0"
] | 5 | 2021-09-02T20:07:04.000Z | 2021-12-14T21:24:38.000Z | YouTube/mergesort/lib/mergesort.ex | adolfont/pensandoemelixir | 10a639c6451b8ec181116a0531a77815fde04f3f | [
"CC0-1.0"
] | null | null | null | YouTube/mergesort/lib/mergesort.ex | adolfont/pensandoemelixir | 10a639c6451b8ec181116a0531a77815fde04f3f | [
"CC0-1.0"
] | null | null | null | defmodule Mergesort do
@moduledoc """
Documentation for `Mergesort`.
Source: https://gist.github.com/coproduto/1c833523680628cd25884e047e64bd7b
"""
@doc """
Sorts a list.
"""
def merge_sort([]), do: []
def merge_sort(list) do
list
|> Enum.map(fn x -> [x] end)
|> merge_lists()
end
... | 17.54 | 76 | 0.576967 |
1a792bca90aedd39c069095dc9249c82ae266873 | 2,095 | ex | Elixir | lib/bitstyles_phoenix/component/use_svg.ex | bitcrowd/bitstyles_phoenix | 697d9380d376f23885b696776736643687d4dd14 | [
"0BSD"
] | 4 | 2021-03-12T07:57:06.000Z | 2021-11-15T11:41:30.000Z | lib/bitstyles_phoenix/component/use_svg.ex | bitcrowd/bitstyles_phoenix | 697d9380d376f23885b696776736643687d4dd14 | [
"0BSD"
] | 39 | 2021-03-11T15:36:51.000Z | 2022-01-04T12:13:48.000Z | lib/bitstyles_phoenix/component/use_svg.ex | bitcrowd/bitstyles_phoenix | 697d9380d376f23885b696776736643687d4dd14 | [
"0BSD"
] | null | null | null | defmodule BitstylesPhoenix.Component.UseSVG do
use BitstylesPhoenix.Component
@moduledoc """
Components for rendering SVGs.
"""
@doc ~S"""
Renders an SVG tag with a `use` reference.
"""
story(
"A referenced SVG (inlined on the page)",
'''
iex> assigns = %{}
...> render ~H"""
... | 24.360465 | 188 | 0.49642 |
1a793ea4a3e719b1f59a6436b3ae53633bb1868e | 2,534 | exs | Elixir | test/json_api_client/middleware/stats_tracker_test.exs | jmax/json_api_client | 10518564077860c291008887639dcef13f9ac3a7 | [
"MIT"
] | 36 | 2017-10-06T17:58:27.000Z | 2022-01-07T13:52:50.000Z | test/json_api_client/middleware/stats_tracker_test.exs | jmax/json_api_client | 10518564077860c291008887639dcef13f9ac3a7 | [
"MIT"
] | 12 | 2017-11-30T00:17:05.000Z | 2019-11-25T18:05:24.000Z | test/json_api_client/middleware/stats_tracker_test.exs | jmax/json_api_client | 10518564077860c291008887639dcef13f9ac3a7 | [
"MIT"
] | 12 | 2017-12-03T21:14:55.000Z | 2020-09-08T23:43:33.000Z | defmodule TestMiddleware do
def call(_, _, _), do: nil
end
defmodule JsonApiClient.Middleware.StatsTrackerTest do
use ExUnit.Case, async: true
import ExUnit.CaptureLog
doctest JsonApiClient.Middleware.StatsTracker, import: true
alias JsonApiClient.Middleware.StatsTracker
import JsonApiClient.Middleware.St... | 25.34 | 72 | 0.531176 |
1a7941ec7252e8b08cd4acffbd518400250ddafe | 1,887 | ex | Elixir | clients/cloud_resource_manager/lib/google_api/cloud_resource_manager/v1/model/list_org_policies_request.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/cloud_resource_manager/lib/google_api/cloud_resource_manager/v1/model/list_org_policies_request.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/cloud_resource_manager/lib/google_api/cloud_resource_manager/v1/model/list_org_policies_request.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... | 35.603774 | 131 | 0.735559 |
1a79ab9210eb2a506fc32c111e85de9b8483f7b3 | 722 | exs | Elixir | test/feature_background_test.exs | distributeaid/cabbage | 140b643609497063637429e3307b3efef428d4cc | [
"MIT"
] | null | null | null | test/feature_background_test.exs | distributeaid/cabbage | 140b643609497063637429e3307b3efef428d4cc | [
"MIT"
] | null | null | null | test/feature_background_test.exs | distributeaid/cabbage | 140b643609497063637429e3307b3efef428d4cc | [
"MIT"
] | 2 | 2020-09-29T13:33:40.000Z | 2020-09-29T13:33:46.000Z | Code.require_file("test_helper.exs", __DIR__)
defmodule Cabbage.FeatureBackgroundTest do
use ExUnit.Case
describe "Features can have state setup by a Background" do
test "Checks that Background was properly run" do
defmodule FeatureBackgroundTest do
use Cabbage.Feature, file: "background.featu... | 28.88 | 90 | 0.65651 |
1a79abb07f4ab216cdf66c41d1391b0dd16fe528 | 2,462 | exs | Elixir | config/dev.exs | nickyeager/phoenix-starter | 6940499c28b460916d610929e6a6fec256345018 | [
"MIT"
] | null | null | null | config/dev.exs | nickyeager/phoenix-starter | 6940499c28b460916d610929e6a6fec256345018 | [
"MIT"
] | 2 | 2021-03-10T19:22:36.000Z | 2021-05-11T15:05:23.000Z | config/dev.exs | nickyeager/phoenix-starter | 6940499c28b460916d610929e6a6fec256345018 | [
"MIT"
] | null | null | null | use Mix.Config
# Configure your database
config :phoenixstarter, PhoenixStarter.Repo,
username: "postgres",
password: "postgres",
database: "phoenixstarter_dev",
hostname: "localhost",
show_sensitive_data_on_connection_error: true,
pool_size: 10
#config :phoenixstarter, PhoenixStarterWeb.Pow.Mailer,
# ... | 29.309524 | 89 | 0.699431 |
1a79ae1bc1154bb12e40344f0d21509dda3c42ae | 1,248 | ex | Elixir | test/support/conn_case.ex | AlexJuca/small-url | 25f4828ac3566a435b15e6b9581e1e1e508d6650 | [
"Apache-2.0"
] | 7 | 2021-06-28T14:43:10.000Z | 2021-09-21T21:00:30.000Z | test/support/conn_case.ex | AlexJuca/small-url | 25f4828ac3566a435b15e6b9581e1e1e508d6650 | [
"Apache-2.0"
] | 2 | 2021-06-30T21:43:06.000Z | 2021-07-01T16:40:10.000Z | test/support/conn_case.ex | AlexJuca/small-url | 25f4828ac3566a435b15e6b9581e1e1e508d6650 | [
"Apache-2.0"
] | null | null | null | defmodule SmallUrlWeb.ConnCase do
@moduledoc """
This module defines the test case to be used by
tests that require setting up a connection.
Such tests rely on `Phoenix.ConnTest` and also
import other functionality to make it easier
to build common data structures and query the data layer.
Finally, if t... | 28.363636 | 70 | 0.725962 |
1a79d486685b3c0d027e0eac22815f51716087ae | 1,491 | exs | Elixir | test/uncharted_phoenix/components/live_progress_test.exs | rocketvalidator/uncharted_phoenix | 6c22c5cbbe0a430262ec87256a164191ef25f263 | [
"MIT"
] | 2 | 2021-07-16T12:17:42.000Z | 2021-08-15T22:17:28.000Z | test/uncharted_phoenix/components/live_progress_test.exs | rocketvalidator/uncharted_phoenix | 6c22c5cbbe0a430262ec87256a164191ef25f263 | [
"MIT"
] | null | null | null | test/uncharted_phoenix/components/live_progress_test.exs | rocketvalidator/uncharted_phoenix | 6c22c5cbbe0a430262ec87256a164191ef25f263 | [
"MIT"
] | 1 | 2021-08-15T22:01:51.000Z | 2021-08-15T22:01:51.000Z | defmodule UnchartedPhoenix.LiveProgressComponentTest do
alias Uncharted.BaseChart
alias Uncharted.ProgressChart
alias Uncharted.ProgressChart.Dataset
import UnchartedPhoenix.TestRenderer
use ExUnit.Case
@chart %BaseChart{
title: "my progress chart",
colors: %{gray: "#e2e2e2"},
dataset: %Dataset... | 32.413043 | 117 | 0.686117 |
1a79e24755d665748b8b34cacfe2e261659febef | 1,805 | ex | Elixir | clients/proximity_beacon/lib/google_api/proximity_beacon/v1beta1/model/get_info_for_observed_beacons_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/proximity_beacon/lib/google_api/proximity_beacon/v1beta1/model/get_info_for_observed_beacons_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/proximity_beacon/lib/google_api/proximity_beacon/v1beta1/model/get_info_for_observed_beacons_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... | 33.425926 | 140 | 0.757341 |
1a79fad787b9d12f70edc51935bc9cf210285370 | 1,907 | ex | Elixir | clients/verified_access/lib/google_api/verified_access/v1/model/challenge.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/verified_access/lib/google_api/verified_access/v1/model/challenge.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/verified_access/lib/google_api/verified_access/v1/model/challenge.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... | 38.14 | 200 | 0.750918 |
1a7a526a9daff4b8c7e71df392d9fddd01b656dc | 502 | exs | Elixir | priv/repo/migrations/20200724162310_add_displayname_to_user_auth_table.exs | itsUnsmart/glimesh.tv | 22c532184bb5046f6c6d8232e8bd66ba534c01c1 | [
"MIT"
] | 328 | 2020-07-23T22:13:49.000Z | 2022-03-31T21:22:28.000Z | priv/repo/migrations/20200724162310_add_displayname_to_user_auth_table.exs | itsUnsmart/glimesh.tv | 22c532184bb5046f6c6d8232e8bd66ba534c01c1 | [
"MIT"
] | 362 | 2020-07-23T22:38:38.000Z | 2022-03-24T02:11:16.000Z | priv/repo/migrations/20200724162310_add_displayname_to_user_auth_table.exs | itsUnsmart/glimesh.tv | 22c532184bb5046f6c6d8232e8bd66ba534c01c1 | [
"MIT"
] | 72 | 2020-07-23T22:50:46.000Z | 2022-02-02T11:59:32.000Z | defmodule Glimesh.Repo.Migrations.AddDisplaynameToUserAuthTable do
use Ecto.Migration
def change do
alter table(:users) do
add :displayname, :string, default: nil
modify :username, :citext
end
execute "UPDATE users SET displayname = username"
end
def down do
execute "UPDATE users ... | 21.826087 | 66 | 0.695219 |
1a7a66bbfd5042450d29d04577ae48ba2a55efaa | 1,368 | ex | Elixir | lib/platform_web/views/error_helpers.ex | lucab85/audioslides.io | cb502ccf6ed0b2db42d9fb20bb4c963bcca3cfa9 | [
"MIT"
] | 17 | 2017-11-14T14:03:18.000Z | 2021-12-10T04:18:48.000Z | lib/platform_web/views/error_helpers.ex | lucab85/audioslides.io | cb502ccf6ed0b2db42d9fb20bb4c963bcca3cfa9 | [
"MIT"
] | 21 | 2017-11-19T13:38:07.000Z | 2022-02-10T00:11:14.000Z | lib/platform_web/views/error_helpers.ex | lucab85/audioslides.io | cb502ccf6ed0b2db42d9fb20bb4c963bcca3cfa9 | [
"MIT"
] | 2 | 2019-09-03T03:32:13.000Z | 2021-02-23T21:52:57.000Z | defmodule PlatformWeb.ErrorHelpers do
@moduledoc """
Conveniences for translating and building error messages.
"""
use Phoenix.HTML
@doc """
Generates tag for inlined form input errors.
"""
def error_tag(form, field) do
Enum.map(Keyword.get_values(form.errors, field), fn error ->
content_tag... | 31.090909 | 77 | 0.671784 |
1a7a7b697170597d5dc29d580c22f6a3bef179ca | 692 | ex | Elixir | kousa/lib/gen/start_rabbits.ex | yakohere/dogehouse | 3df9602f3148f3b7613a6cf82d8d87c185f5daf9 | [
"MIT"
] | 5 | 2021-03-02T09:00:45.000Z | 2021-03-13T04:45:46.000Z | kousa/lib/gen/start_rabbits.ex | agt25/dogehouse | 6666028fa52b48f11bf64e60e859610dce2a3956 | [
"MIT"
] | 1 | 2021-04-19T16:54:48.000Z | 2021-04-19T16:54:48.000Z | kousa/lib/gen/start_rabbits.ex | agt25/dogehouse | 6666028fa52b48f11bf64e60e859610dce2a3956 | [
"MIT"
] | 1 | 2021-04-09T12:25:24.000Z | 2021-04-09T12:25:24.000Z | # @todo should probably stop this after initial load
defmodule Kousa.Gen.StartRabbits do
use GenServer
alias Kousa.{Gen, VoiceServerUtils}
def start_link(_) do
GenServer.start_link(__MODULE__, [], name: __MODULE__)
end
def init(_opts) do
n = Application.get_env(:kousa, :num_voice_servers, 1) - 1
... | 24.714286 | 66 | 0.671965 |
1a7ab6a13d61a719038032bc09ec5502e1e80048 | 1,298 | exs | Elixir | clients/cloud_trace/mix.exs | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/cloud_trace/mix.exs | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/cloud_trace/mix.exs | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | defmodule GoogleApi.CloudTrace.V2.Mixfile do
use Mix.Project
@version "0.3.0"
def project() do
[
app: :google_api_cloud_trace,
version: @version,
elixir: "~> 1.4",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
description: description(),
packa... | 25.45098 | 111 | 0.617103 |
1a7ad249e5d3c4f732e339843119c0380c03fa3e | 3,156 | exs | Elixir | lib/mix/test/mix/tasks/profile.fprof_test.exs | doughsay/elixir | 7356a47047d0b54517bd6886603f09b1121dde2b | [
"Apache-2.0"
] | 19,291 | 2015-01-01T02:42:49.000Z | 2022-03-31T21:01:40.000Z | lib/mix/test/mix/tasks/profile.fprof_test.exs | doughsay/elixir | 7356a47047d0b54517bd6886603f09b1121dde2b | [
"Apache-2.0"
] | 8,082 | 2015-01-01T04:16:23.000Z | 2022-03-31T22:08:02.000Z | lib/mix/test/mix/tasks/profile.fprof_test.exs | doughsay/elixir | 7356a47047d0b54517bd6886603f09b1121dde2b | [
"Apache-2.0"
] | 3,472 | 2015-01-03T04:11:56.000Z | 2022-03-29T02:07:30.000Z | Code.require_file("../../test_helper.exs", __DIR__)
defmodule Mix.Tasks.Profile.FprofTest do
use MixTest.Case
import ExUnit.CaptureIO
alias Mix.Tasks.Profile.Fprof
test "profiles evaluated expression", context do
in_tmp(context.test, fn ->
assert capture_io(fn ->
Fprof.run(["-e", "En... | 30.941176 | 95 | 0.539607 |
1a7ade186281071047379b3100d84210eb58bd49 | 28,274 | exs | Elixir | test/sigaws_test.exs | heltonsantos/sigaws | 5c9f4f3f2b9a5c8afb1dd97e1c4128f79432448c | [
"MIT"
] | null | null | null | test/sigaws_test.exs | heltonsantos/sigaws | 5c9f4f3f2b9a5c8afb1dd97e1c4128f79432448c | [
"MIT"
] | null | null | null | test/sigaws_test.exs | heltonsantos/sigaws | 5c9f4f3f2b9a5c8afb1dd97e1c4128f79432448c | [
"MIT"
] | null | null | null | defmodule VerificationProvider do
@behaviour Sigaws.Provider
defp test_regions, do: ["us-east-1", "alpha-quad", "gamma-quad"]
defp test_services, do: ["s3", "d3", "my-service"]
defp test_creds, do: %{"ak1" => "sk1", "ak2" => "sk2", "ak3" => "sk3"}
def pre_verification(%Sigaws.Ctxt{} = ctxt) do
cond do
... | 31.591061 | 109 | 0.561435 |
1a7b3d5ac33784a1de21c29500ff02c1ded50584 | 495 | ex | Elixir | lib/web/views/markdown_view.ex | random-mud-pie/grapevine | 40688da3413e5216df5ee19ad6f7272932d49e23 | [
"MIT"
] | 107 | 2018-10-05T18:20:32.000Z | 2022-02-28T04:02:50.000Z | lib/web/views/markdown_view.ex | random-mud-pie/grapevine | 40688da3413e5216df5ee19ad6f7272932d49e23 | [
"MIT"
] | 33 | 2018-10-05T14:11:18.000Z | 2022-02-10T22:19:18.000Z | lib/web/views/markdown_view.ex | random-mud-pie/grapevine | 40688da3413e5216df5ee19ad6f7272932d49e23 | [
"MIT"
] | 18 | 2019-02-03T03:08:20.000Z | 2021-12-28T04:29:36.000Z | defmodule Web.MarkdownView do
@doc """
Parse into html and then strip to only markdown tags
"""
def parse(text) do
text
|> Earmark.as_html!()
|> HtmlSanitizeEx.markdown_html()
|> Phoenix.HTML.raw()
end
def parse(text, raw: false) do
text
|> Earmark.as_html!()
|> HtmlSanitizeEx.m... | 18.333333 | 54 | 0.626263 |
1a7b538957836584eb23d6f088d607a9644a66bb | 3,387 | ex | Elixir | lib/turbo_ecto/hooks/search.ex | kianmeng/turbo_ecto | b9fa5ee50dfdeeb9ad0782e7a8fcb3bd012d4c03 | [
"MIT"
] | null | null | null | lib/turbo_ecto/hooks/search.ex | kianmeng/turbo_ecto | b9fa5ee50dfdeeb9ad0782e7a8fcb3bd012d4c03 | [
"MIT"
] | null | null | null | lib/turbo_ecto/hooks/search.ex | kianmeng/turbo_ecto | b9fa5ee50dfdeeb9ad0782e7a8fcb3bd012d4c03 | [
"MIT"
] | null | null | null | defmodule Turbo.Ecto.Hooks.Search do
@moduledoc """
This module provides a operations that can add searching functionality to
a pipeline of `Ecto` queries. This module works by taking fields.
Inspire from: [ex_sieve](https://github.com/valyukov/ex_sieve/blob/master/lib/ex_sieve/node/grouping.ex)
"""
impor... | 31.361111 | 361 | 0.601712 |
1a7b5d0c93d04d61eef3619af9db190fcfbca74e | 3,349 | ex | Elixir | apps/omg_eth/lib/omg_eth/root_chain/rpc.ex | omisego/elixir-omg | 2c68973d8f29033d137f63a6e060f12e2a7dcd59 | [
"Apache-2.0"
] | 177 | 2018-08-24T03:51:02.000Z | 2020-05-30T13:29:25.000Z | apps/omg_eth/lib/omg_eth/root_chain/rpc.ex | omisego/elixir-omg | 2c68973d8f29033d137f63a6e060f12e2a7dcd59 | [
"Apache-2.0"
] | 1,042 | 2018-08-25T00:52:39.000Z | 2020-06-01T05:15:17.000Z | apps/omg_eth/lib/omg_eth/root_chain/rpc.ex | omisego/elixir-omg | 2c68973d8f29033d137f63a6e060f12e2a7dcd59 | [
"Apache-2.0"
] | 47 | 2018-08-24T12:06:33.000Z | 2020-04-28T11:49:25.000Z | # Copyright 2019-2020 OMG Network 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... | 35.252632 | 118 | 0.721111 |
1a7b736214127e6befc9f0f2265e19e60dc96209 | 767 | ex | Elixir | exercism/isbn-verifier/isbn_verifier.ex | defndaines/elixir_bits | 78a9c2dc0c9946df715a662ef62cd437fdd9e3d1 | [
"Apache-2.0"
] | null | null | null | exercism/isbn-verifier/isbn_verifier.ex | defndaines/elixir_bits | 78a9c2dc0c9946df715a662ef62cd437fdd9e3d1 | [
"Apache-2.0"
] | null | null | null | exercism/isbn-verifier/isbn_verifier.ex | defndaines/elixir_bits | 78a9c2dc0c9946df715a662ef62cd437fdd9e3d1 | [
"Apache-2.0"
] | null | null | null | defmodule IsbnVerifier do
@invalid -1
@doc """
Checks if a string is a valid ISBN-10 identifier
## Examples
iex> IsbnVerifier.isbn?("3-598-21507-X")
true
iex> IsbnVerifier.isbn?("3-598-2K507-0")
false
"""
@spec isbn?(String.t()) :: boolean
def isbn?(isbn) do
0 == check... | 23.96875 | 73 | 0.584094 |
1a7be6f7d938f597d0824b515c83ae75f32d9653 | 1,788 | ex | Elixir | clients/big_query/lib/google_api/big_query/v2/model/cluster_info.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/big_query/lib/google_api/big_query/v2/model/cluster_info.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/big_query/lib/google_api/big_query/v2/model/cluster_info.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... | 33.735849 | 151 | 0.715884 |
1a7bf8eeec04282bf60e16f0fde4cacb9e162d84 | 623 | exs | Elixir | test/codex_test.exs | sbacarob/codex | b6876e90106129d2e02e77a73c4b0383cea3cf17 | [
"MIT"
] | null | null | null | test/codex_test.exs | sbacarob/codex | b6876e90106129d2e02e77a73c4b0383cea3cf17 | [
"MIT"
] | 1 | 2020-09-16T22:00:09.000Z | 2020-10-28T03:58:01.000Z | test/codex_test.exs | sbacarob/codex | b6876e90106129d2e02e77a73c4b0383cea3cf17 | [
"MIT"
] | null | null | null | defmodule CodexTest do
use ExUnit.Case
use ExVCR.Mock, adapter: ExVCR.Adapter.Hackney
setup_all do
HTTPoison.start
end
test "signed request returns the expected result" do
ExVCR.Config.filter_request_headers("Authorization")
ExVCR.Config.filter_sensitive_data("<key>.*<\/key>", "<key>[CDATA[YOUR_... | 31.15 | 107 | 0.715891 |
1a7c1104581ea45811b8bad3b2f67ceb67444a37 | 5,190 | exs | Elixir | test/elixir/test/bulk_docs_test.exs | mtenrero/couchdb-vetcontrol | b7ede3ededdf0072c73f08d8f1217cb723b03f7a | [
"Apache-2.0"
] | null | null | null | test/elixir/test/bulk_docs_test.exs | mtenrero/couchdb-vetcontrol | b7ede3ededdf0072c73f08d8f1217cb723b03f7a | [
"Apache-2.0"
] | null | null | null | test/elixir/test/bulk_docs_test.exs | mtenrero/couchdb-vetcontrol | b7ede3ededdf0072c73f08d8f1217cb723b03f7a | [
"Apache-2.0"
] | null | null | null | defmodule BulkDocsTest do
use CouchTestCase
@moduletag :bulk_docs
@moduledoc """
Test CouchDB bulk docs
This is a port of bulk_docs.js
"""
@doc_range 1..5
@tag :with_db
test "bulk docs can create, update, & delete many docs per request", ctx do
db = ctx[:db_name]
docs = create_docs(@doc_ra... | 33.483871 | 87 | 0.6158 |
1a7c2533d84307758997e9d9caf7c1ff5ebf1177 | 813 | ex | Elixir | lib/arkenston_web/schema/types/custom/page_size.ex | dolfinus/omicron-backend | dd3544a421ce8b05447fe72640f73f180549270f | [
"MIT"
] | 1 | 2019-04-29T18:07:08.000Z | 2019-04-29T18:07:08.000Z | lib/arkenston_web/schema/types/custom/page_size.ex | dolfinus/omicron-backend | dd3544a421ce8b05447fe72640f73f180549270f | [
"MIT"
] | 126 | 2020-12-03T15:39:31.000Z | 2022-03-30T22:02:23.000Z | lib/arkenston_web/schema/types/custom/page_size.ex | dolfinus/arkenston-backend | 258880936dce673eb15db0c4b52e68d3d40c58ff | [
"MIT"
] | null | null | null | defmodule ArkenstonWeb.Schema.Types.Custom.PageSize do
use Absinthe.Schema.Notation
@max_page_size Application.compile_env(:arkenston, [ArkenstonWeb.Endpoint, :max_page_size])
@desc "Integer which value should be between 1 and #{@max_page_size}"
scalar :page_size, name: "PageSize" do
serialize(&encode/1)
... | 25.40625 | 93 | 0.687577 |
1a7c685484bbc472118c3e6e97117d419f7de8a3 | 3,563 | ex | Elixir | lib/arangox_ecto/behaviour/queryable.ex | rxndxm/arangox_ecto | 78ee4cbdff38efdacc0e29049caa799c85bd08e0 | [
"Apache-2.0"
] | null | null | null | lib/arangox_ecto/behaviour/queryable.ex | rxndxm/arangox_ecto | 78ee4cbdff38efdacc0e29049caa799c85bd08e0 | [
"Apache-2.0"
] | null | null | null | lib/arangox_ecto/behaviour/queryable.ex | rxndxm/arangox_ecto | 78ee4cbdff38efdacc0e29049caa799c85bd08e0 | [
"Apache-2.0"
] | null | null | null | defmodule ArangoXEcto.Behaviour.Queryable do
@moduledoc false
require Logger
@behaviour Ecto.Adapter.Queryable
@doc """
Streams a previously prepared query.
"""
@impl true
def stream(_adapter_meta, _query_meta, _query, _params, _options) do
raise "#{inspect(__MODULE__)}.stream: #{inspect(__MODULE... | 27.198473 | 99 | 0.598653 |
1a7c8f39e412913b9a5f3254c1b79f0ae1109832 | 1,809 | ex | Elixir | lib/tilex_web/endpoint.ex | RyanWillDev/tilex | 1fef06ca37434c9448c97e5a7387af2e7039b46c | [
"MIT"
] | null | null | null | lib/tilex_web/endpoint.ex | RyanWillDev/tilex | 1fef06ca37434c9448c97e5a7387af2e7039b46c | [
"MIT"
] | null | null | null | lib/tilex_web/endpoint.ex | RyanWillDev/tilex | 1fef06ca37434c9448c97e5a7387af2e7039b46c | [
"MIT"
] | null | null | null | defmodule TilexWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :tilex
use Appsignal.Phoenix
@cors_origin Application.get_env(:tilex, :cors_origin)
if Application.get_env(:tilex, :sql_sandbox) do
plug(Phoenix.Ecto.SQL.Sandbox)
end
socket("/socket", TilexWeb.UserSocket, websocket: true)
if @cors_orig... | 22.898734 | 70 | 0.664456 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.