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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5a870ba999e92c8abb06e495f105f6f5eff4273d | 2,041 | ex | Elixir | clients/calendar/lib/google_api/calendar/v3/model/create_conference_request.ex | ericrwolfe/elixir-google-api | 3dc0f17edd5e2d6843580c16ddae3bf84b664ffd | [
"Apache-2.0"
] | null | null | null | clients/calendar/lib/google_api/calendar/v3/model/create_conference_request.ex | ericrwolfe/elixir-google-api | 3dc0f17edd5e2d6843580c16ddae3bf84b664ffd | [
"Apache-2.0"
] | null | null | null | clients/calendar/lib/google_api/calendar/v3/model/create_conference_request.ex | ericrwolfe/elixir-google-api | 3dc0f17edd5e2d6843580c16ddae3bf84b664ffd | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 35.807018 | 235 | 0.756002 |
5a8726dc075ad34bac306f1f4566d7a4160315f0 | 2,847 | exs | Elixir | test/scenic/primitive/quad_test.exs | mikeover/scenic | 4b61c4996ed2d06b8cdf94f88c8a0522160e10b5 | [
"Apache-2.0"
] | null | null | null | test/scenic/primitive/quad_test.exs | mikeover/scenic | 4b61c4996ed2d06b8cdf94f88c8a0522160e10b5 | [
"Apache-2.0"
] | null | null | null | test/scenic/primitive/quad_test.exs | mikeover/scenic | 4b61c4996ed2d06b8cdf94f88c8a0522160e10b5 | [
"Apache-2.0"
] | null | null | null | #
# Created by Boyd Multerer on 5/8/17. Re-written on 11/01/17
# Copyright © 2017 Kry10 Industries. All rights reserved.
#
defmodule Scenic.Primitive.QuadTest do
use ExUnit.Case, async: true
doctest Scenic
alias Scenic.Primitive
alias Scenic.Primitive.Quad
@convex {{100, 300}, {300, 180}, {400, 310}, {30... | 35.148148 | 84 | 0.563049 |
5a873aa5ee8a5f4bf2968b3bf26b898e81035f97 | 1,480 | ex | Elixir | lib/mix/lib/mix/tasks/deps.update.ex | davidsulc/elixir | dd4fd6ab742acd75862e34e26dbdb86e0cf6453f | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/tasks/deps.update.ex | davidsulc/elixir | dd4fd6ab742acd75862e34e26dbdb86e0cf6453f | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/tasks/deps.update.ex | davidsulc/elixir | dd4fd6ab742acd75862e34e26dbdb86e0cf6453f | [
"Apache-2.0"
] | null | null | null | defmodule Mix.Tasks.Deps.Update do
use Mix.Task
@shortdoc "Updates the given dependencies"
@moduledoc """
Updates the given dependencies.
Since this is a destructive action, updating all dependencies
only occurs when the `--all` command line option is passed.
All dependencies are automatically recompi... | 30.204082 | 88 | 0.637838 |
5a87481950a69cb3a81e780710be54dda90864a6 | 1,318 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/target_reference.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/target_reference.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/target_reference.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... | 28.042553 | 74 | 0.729135 |
5a877883618e6e5ccbe2aec0d263e2ba8886e612 | 873 | exs | Elixir | lib/elixir/test/elixir/bitwise_test.exs | jwarwick/elixir | de103c0f4e3240aa38967298ccb5f483a9e40c16 | [
"Apache-2.0"
] | 243 | 2020-02-03T03:48:51.000Z | 2021-11-08T12:56:25.000Z | lib/elixir/test/elixir/bitwise_test.exs | jwarwick/elixir | de103c0f4e3240aa38967298ccb5f483a9e40c16 | [
"Apache-2.0"
] | 6 | 2021-03-19T12:33:21.000Z | 2021-04-02T17:52:45.000Z | lib/elixir/test/elixir/bitwise_test.exs | jwarwick/elixir | de103c0f4e3240aa38967298ccb5f483a9e40c16 | [
"Apache-2.0"
] | 1 | 2021-11-08T10:21:27.000Z | 2021-11-08T10:21:27.000Z | Code.require_file("test_helper.exs", __DIR__)
defmodule Bitwise.FunctionsTest do
use ExUnit.Case, async: true
doctest Bitwise, import: true
use Bitwise, skip_operators: true
test "bnot/1" do
assert bnot(1) == -2
end
test "band/2" do
assert band(1, 1) == 1
end
test "bor/2" do
assert bor... | 14.79661 | 45 | 0.561283 |
5a87cff15b2d4aac8f5ec697b5a1753f788228a1 | 82 | exs | Elixir | test/bsv/crypto/hash_test.exs | afomi/bsv-ex | a31db1e9d223aa4ac9cc00e86b1e6344a0037805 | [
"Apache-2.0"
] | null | null | null | test/bsv/crypto/hash_test.exs | afomi/bsv-ex | a31db1e9d223aa4ac9cc00e86b1e6344a0037805 | [
"Apache-2.0"
] | null | null | null | test/bsv/crypto/hash_test.exs | afomi/bsv-ex | a31db1e9d223aa4ac9cc00e86b1e6344a0037805 | [
"Apache-2.0"
] | null | null | null | defmodule BSV.Crypto.HashTest do
use ExUnit.Case
doctest BSV.Crypto.Hash
end
| 13.666667 | 32 | 0.780488 |
5a87d03013f012019d6a50f5be502328208d0e69 | 573 | exs | Elixir | test/views/error_view_test.exs | Namuraid/backend | 04a10248bfeb156eb291207931621b40585d8f7e | [
"MIT"
] | null | null | null | test/views/error_view_test.exs | Namuraid/backend | 04a10248bfeb156eb291207931621b40585d8f7e | [
"MIT"
] | null | null | null | test/views/error_view_test.exs | Namuraid/backend | 04a10248bfeb156eb291207931621b40585d8f7e | [
"MIT"
] | null | null | null | defmodule Namuraid.ErrorViewTest do
use Namuraid.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(Namuraid.ErrorView, "404.html", []) ==
"Page not found"
end
test "render 500.html" ... | 26.045455 | 66 | 0.678883 |
5a87fba46463becda1993dd9cca7727adee3c4fe | 206 | exs | Elixir | .credo.exs | konstantinzolotarev/frettchen | 4aced1fb3d1571893ae09c18a31b05352c80cd9e | [
"MIT"
] | 3 | 2018-10-27T18:18:14.000Z | 2020-11-27T11:47:41.000Z | .credo.exs | konstantinzolotarev/frettchen | 4aced1fb3d1571893ae09c18a31b05352c80cd9e | [
"MIT"
] | null | null | null | .credo.exs | konstantinzolotarev/frettchen | 4aced1fb3d1571893ae09c18a31b05352c80cd9e | [
"MIT"
] | 3 | 2019-01-07T12:32:44.000Z | 2021-09-05T07:24:09.000Z | %{
configs: [
%{
name: "default",
files: %{
included: ["config/", "lib/", "test/"],
excluded: ["lib/jaeger", ~r"/_build/", ~r"/deps/"]
},
color: true
}
]
}
| 15.846154 | 58 | 0.398058 |
5a88b634dc43b22dcb16db1a9e1f19b7e4469599 | 6,119 | ex | Elixir | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/api/conversions.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/api/conversions.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/api/conversions.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 41.344595 | 187 | 0.651577 |
5a88c1dede19b36f6d50c205d8e6dd690f222421 | 1,835 | ex | Elixir | backend/lib/aptamer_web/emails/email.ex | ui-icts/aptamer-web | a28502c22a4e55ab1fbae8bbeaa6b11c9a477c06 | [
"MIT"
] | null | null | null | backend/lib/aptamer_web/emails/email.ex | ui-icts/aptamer-web | a28502c22a4e55ab1fbae8bbeaa6b11c9a477c06 | [
"MIT"
] | 7 | 2019-02-08T18:28:49.000Z | 2022-02-12T06:44:59.000Z | backend/lib/aptamer_web/emails/email.ex | ui-icts/aptamer-web | a28502c22a4e55ab1fbae8bbeaa6b11c9a477c06 | [
"MIT"
] | null | null | null | defmodule AptamerWeb.Email do
import Bamboo.Email
require Logger
alias Aptamer.{Repo, Mailer}
alias Aptamer.Jobs.Job
alias AptamerWeb.Endpoint
def send_job_complete(job) when is_nil(job) do
error = "job cannot be nil. Not sending job completion email..."
Logger.error(error)
{:error, error}
... | 25.136986 | 132 | 0.637602 |
5a89028b88024c9a85b03aeb0119e0105a632c9b | 2,039 | exs | Elixir | config/prod.exs | anakind/phoenix-lrucache-api | cfb0dfba181fe196dd0d77dba9854dd9c50ba070 | [
"MIT"
] | null | null | null | config/prod.exs | anakind/phoenix-lrucache-api | cfb0dfba181fe196dd0d77dba9854dd9c50ba070 | [
"MIT"
] | null | null | null | config/prod.exs | anakind/phoenix-lrucache-api | cfb0dfba181fe196dd0d77dba9854dd9c50ba070 | [
"MIT"
] | null | null | null | use Mix.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,
# ... | 36.410714 | 66 | 0.718489 |
5a8917536b32d94f800e84645d69bb0374d4e74f | 1,881 | exs | Elixir | apps/reaper/test/unit/test_helper.exs | jakeprem/smartcitiesdata | da309ac0d2261527278951cbae88604455207589 | [
"Apache-2.0"
] | 1 | 2021-04-05T19:17:18.000Z | 2021-04-05T19:17:18.000Z | apps/reaper/test/unit/test_helper.exs | SmartColumbusOS/smartcitiesdata | c8553d34631c822b034945eebf396994bf1001ff | [
"Apache-2.0"
] | 11 | 2020-01-07T15:43:42.000Z | 2020-12-22T15:23:25.000Z | apps/reaper/test/unit/test_helper.exs | jakeprem/smartcitiesdata | da309ac0d2261527278951cbae88604455207589 | [
"Apache-2.0"
] | null | null | null | Application.load(:reaper)
Application.spec(:reaper, :applications)
|> Enum.each(&Application.ensure_all_started/1)
Application.ensure_all_started(:bypass)
ExUnit.start(exclude: [:skip])
defmodule TestHelper do
use ExUnit.Case
use Placebo
require Logger
def start_horde() do
children = [
{Reaper.Ho... | 25.767123 | 108 | 0.673578 |
5a892963278c07fe34ff74d313891a1b3ba82d8d | 1,846 | exs | Elixir | clients/health_care/mix.exs | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/health_care/mix.exs | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/health_care/mix.exs | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"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.552239 | 108 | 0.656555 |
5a893056dcd80789e457c139ce2ebf38d6ff5839 | 2,933 | ex | Elixir | lib/sparql_server/sparql_server.ex | langens-jonathan/mu-authorization | 3b411460b81b87581af7c7f302b1d3bec4610608 | [
"MIT"
] | 1 | 2019-09-05T23:00:48.000Z | 2019-09-05T23:00:48.000Z | lib/sparql_server/sparql_server.ex | langens-jonathan/mu-authorization | 3b411460b81b87581af7c7f302b1d3bec4610608 | [
"MIT"
] | 7 | 2020-10-27T20:42:06.000Z | 2021-11-15T07:41:15.000Z | lib/sparql_server/sparql_server.ex | langens-jonathan/mu-authorization | 3b411460b81b87581af7c7f302b1d3bec4610608 | [
"MIT"
] | 6 | 2016-04-06T09:28:43.000Z | 2021-08-09T12:29:16.000Z | defmodule SparqlServer do
@moduledoc """
A proxy server that will behave as a SPARQL endpoint
"""
use Application
require Logger
def start(_type, _args) do
public_port_env =
System.get_env("SPARQL_PORT") &&
elem(Integer.parse(System.get_env("SPARQL_PORT")), 0)
port = public_port_env ... | 32.230769 | 101 | 0.685305 |
5a894109f03ba4c2e9998dd0ee31ed59e97d5862 | 317 | ex | Elixir | lib/exshome/schema.ex | exshome/exshome | ef6b7a89f11dcd2016856dd49517b74aeebb6513 | [
"MIT"
] | 2 | 2021-12-21T16:32:56.000Z | 2022-02-22T17:06:39.000Z | lib/exshome/schema.ex | exshome/exshome | ef6b7a89f11dcd2016856dd49517b74aeebb6513 | [
"MIT"
] | null | null | null | lib/exshome/schema.ex | exshome/exshome | ef6b7a89f11dcd2016856dd49517b74aeebb6513 | [
"MIT"
] | null | null | null | defmodule Exshome.Schema do
@moduledoc """
Base module with default schema settings.
"""
defmacro __using__(_) do
quote do
use Ecto.Schema
@primary_key {:id, :binary_id, autogenerate: true}
@foreign_key_type :binary_id
@timestamps_opts [type: :utc_datetime_usec]
end
end
end
| 22.642857 | 56 | 0.681388 |
5a897799c66e2291d4ac82e58f95059a2650d856 | 5,573 | exs | Elixir | test/acceptance/html1/html_test.exs | ZeLarpMaster/earmark | 35c9661d6647059e507c0278347e21d92351c417 | [
"Apache-1.1"
] | null | null | null | test/acceptance/html1/html_test.exs | ZeLarpMaster/earmark | 35c9661d6647059e507c0278347e21d92351c417 | [
"Apache-1.1"
] | null | null | null | test/acceptance/html1/html_test.exs | ZeLarpMaster/earmark | 35c9661d6647059e507c0278347e21d92351c417 | [
"Apache-1.1"
] | null | null | null | defmodule Acceptance.Html1.Html1BlocksTest do
use ExUnit.Case, async: true
import Support.Helpers, only: [as_html: 1]
import Support.Html1Helpers
@moduletag :html1
describe "HTML blocks" do
test "tables are just tables again (or was that mountains?)" do
markdown = "<table>\n <tr>\n <td>\n... | 29.962366 | 111 | 0.547999 |
5a899658e9be5d0bc6d46aefa1be273ff4a5fb9f | 9,924 | ex | Elixir | lib/mastani_server_web/resolvers/accounts_resolver.ex | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | 1 | 2019-05-07T15:03:54.000Z | 2019-05-07T15:03:54.000Z | lib/mastani_server_web/resolvers/accounts_resolver.ex | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | null | null | null | lib/mastani_server_web/resolvers/accounts_resolver.ex | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | null | null | null | defmodule MastaniServerWeb.Resolvers.Accounts do
@moduledoc """
accounts resolvers
"""
import ShortMaps
import Helper.ErrorCode
alias Helper.{Certification, ORM, Utils}
alias MastaniServer.{Accounts, CMS}
alias Accounts.{MentionMail, NotificationMail, SysNotificationMail, User}
# def user(_root, %{... | 34.3391 | 98 | 0.707175 |
5a89baac24570d8ed829c092108d851e0b6b50c8 | 698 | ex | Elixir | lib/storage/aws_db.ex | aeturnum/twitch_discord_connector | b965ba1164540c92a925d2bd08e3fa299dfd457a | [
"MIT"
] | null | null | null | lib/storage/aws_db.ex | aeturnum/twitch_discord_connector | b965ba1164540c92a925d2bd08e3fa299dfd457a | [
"MIT"
] | null | null | null | lib/storage/aws_db.ex | aeturnum/twitch_discord_connector | b965ba1164540c92a925d2bd08e3fa299dfd457a | [
"MIT"
] | null | null | null | defmodule TwitchDiscordConnector.JsonDB.AwsDB do
@moduledoc """
Accessors for AWS-related info
"""
# Common method for saving and getting twitch data
alias TwitchDiscordConnector.JsonDB
# alias TwitchDiscordConnector.Util.H
@dbkey "digital_ocean_aws"
@doc """
Get the base url for the aws creds
... | 19.942857 | 92 | 0.654728 |
5a89c97c0b37c0363a13dac422136393fa43a44d | 5,784 | exs | Elixir | configs/credo.exs | ricardoruwer/dotfiles | 81af0b4a691651de1339e94a6a9e2300df76bca9 | [
"MIT"
] | 1 | 2019-07-10T19:54:54.000Z | 2019-07-10T19:54:54.000Z | configs/credo.exs | samuelpordeus/dotfiles | fc830e9ca9a2a888d9aa6a158cf2e9cc0e79deeb | [
"MIT"
] | null | null | null | configs/credo.exs | samuelpordeus/dotfiles | fc830e9ca9a2a888d9aa6a158cf2e9cc0e79deeb | [
"MIT"
] | 1 | 2020-01-29T20:45:09.000Z | 2020-01-29T20:45:09.000Z | %{
#
# You can have as many configs as you like in the `configs:` field.
configs: [
%{
#
# Run any exec using `mix credo -C <name>`. If no exec name is given
# "default" is used.
#
name: "default",
#
# These are the files included in the analysis:
files: %{
... | 37.558442 | 80 | 0.629322 |
5a89e7d19f642443ab3257ae06ee26e0c5074776 | 2,591 | ex | Elixir | lib/utils/crypto.ex | leeduckgo/Tai-Shang | 33831f54b0ef8eb7772b0b559d8fe8897a06b57c | [
"MIT"
] | 17 | 2021-06-10T07:39:18.000Z | 2021-12-16T03:26:53.000Z | lib/utils/crypto.ex | leeduckgo/Tai-Shang | 33831f54b0ef8eb7772b0b559d8fe8897a06b57c | [
"MIT"
] | 4 | 2021-05-19T02:09:53.000Z | 2021-07-03T09:34:09.000Z | lib/utils/crypto.ex | leeduckgo/Tai-Shang | 33831f54b0ef8eb7772b0b559d8fe8897a06b57c | [
"MIT"
] | 4 | 2021-07-06T02:50:29.000Z | 2021-12-21T09:33:20.000Z | defmodule Utils.Crypto do
@moduledoc """
Crypto Lib
"""
@secret_key "test"
@base_recovery_id 27
@base_recovery_id_eip_155 35
def sign_hash(hash, private_key, chain_id \\ nil) do
# {:libsecp256k1, "~> 0.1.9"} is useful.
{:ok, <<r::size(256), s::size(256)>>, recovery_id} =
:libsecp256k1.e... | 23.133929 | 73 | 0.622926 |
5a89ecca1e0dd64ec4d8f39b34f34d2a21a7cf03 | 15,299 | exs | Elixir | lib/elixir/test/elixir/kernel/quote_test.exs | britto/elixir | 1f6e7093cff4b68dada60b924399bc8404d39a7e | [
"Apache-2.0"
] | 2 | 2020-06-02T18:00:28.000Z | 2021-12-10T03:21:42.000Z | lib/elixir/test/elixir/kernel/quote_test.exs | britto/elixir | 1f6e7093cff4b68dada60b924399bc8404d39a7e | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/kernel/quote_test.exs | britto/elixir | 1f6e7093cff4b68dada60b924399bc8404d39a7e | [
"Apache-2.0"
] | null | null | null | Code.require_file("../test_helper.exs", __DIR__)
defmodule Kernel.QuoteTest do
use ExUnit.Case, async: true
@some_fun &List.flatten/1
test "fun" do
assert is_function(@some_fun)
end
test "list" do
assert quote(do: [1, 2, 3]) == [1, 2, 3]
end
test "tuple" do
assert quote(do: {:a, 1}) == {:... | 24.400319 | 92 | 0.550886 |
5a89ed5ff7c99b22177973d324ef8e54043fa416 | 23,944 | ex | Elixir | lib/github/github/server.ex | yoav-orca/bors-ng | c93cfbbdaf19b48db34fdf2a142a453ea36e1e73 | [
"Apache-2.0"
] | null | null | null | lib/github/github/server.ex | yoav-orca/bors-ng | c93cfbbdaf19b48db34fdf2a142a453ea36e1e73 | [
"Apache-2.0"
] | 65 | 2021-10-14T02:29:46.000Z | 2022-03-28T23:14:18.000Z | lib/github/github/server.ex | yoav-orca/bors-ng | c93cfbbdaf19b48db34fdf2a142a453ea36e1e73 | [
"Apache-2.0"
] | null | null | null | require Logger
defmodule BorsNG.GitHub.Server do
use GenServer
alias BorsNG.GitHub
@moduledoc """
Provides a real connection to GitHub's REST API.
This doesn't currently do rate limiting, but it will.
"""
def start_link do
GenServer.start_link(__MODULE__, :ok, name: GitHub)
end
@installation_c... | 24.786749 | 98 | 0.555337 |
5a8a2fb24f91c163101182a8e37da86a01cce025 | 128 | ex | Elixir | lib/reaxive.ex | alfert/reaxive | fdf6795319ee8f0ceab7e66fc9074ae98f157cb3 | [
"Apache-2.0"
] | 298 | 2015-02-18T18:37:55.000Z | 2022-02-27T17:55:16.000Z | lib/reaxive.ex | vsouza/reaxive | a3678aca901ff23885c6f38be0f1aea4d009f70d | [
"Apache-2.0"
] | 11 | 2015-01-11T20:27:28.000Z | 2019-05-25T19:06:54.000Z | lib/reaxive.ex | vsouza/reaxive | a3678aca901ff23885c6f38be0f1aea4d009f70d | [
"Apache-2.0"
] | 13 | 2015-04-29T21:16:17.000Z | 2020-12-02T01:30:26.000Z | defmodule Reaxive do
use Application
def start(_type, _args) do
Reaxive.Supervisor.start_link
end
end
| 14.222222 | 37 | 0.664063 |
5a8a4b7c212938c369d2a06805112628d7b44e16 | 692 | ex | Elixir | lib/ebayka/request.ex | ssnickolay/ebayka | a03e3aa2d7b0abe3cbb9dbc90efa59ae9c6e6ccd | [
"Apache-2.0"
] | 6 | 2018-02-11T13:10:04.000Z | 2021-08-13T14:35:52.000Z | lib/ebayka/request.ex | ssnickolay/ebayka | a03e3aa2d7b0abe3cbb9dbc90efa59ae9c6e6ccd | [
"Apache-2.0"
] | null | null | null | lib/ebayka/request.ex | ssnickolay/ebayka | a03e3aa2d7b0abe3cbb9dbc90efa59ae9c6e6ccd | [
"Apache-2.0"
] | 3 | 2018-02-11T13:09:56.000Z | 2021-12-09T20:29:10.000Z | defmodule Ebayka.Request do
def make(nil, _body), do: raise(Ebayka.RequestError, message: "You should set name of Ebay method")
def make(_name, nil), do: raise(Ebayka.RequestError, message: "You should set body of Ebay method")
def make(name, body), do: gateway().make_request(name, body)
def make_and_parse(nam... | 43.25 | 104 | 0.706647 |
5a8a4f5ef138c9531de08a2807f7d7753ec75d1f | 615 | ex | Elixir | 2022/w04/bank_kata_ex/test/support/fake-account-repo.ex | dc0d/workshop-notes | 971f0166116f1c6157ff999059e0151a2db539b8 | [
"MIT"
] | null | null | null | 2022/w04/bank_kata_ex/test/support/fake-account-repo.ex | dc0d/workshop-notes | 971f0166116f1c6157ff999059e0151a2db539b8 | [
"MIT"
] | null | null | null | 2022/w04/bank_kata_ex/test/support/fake-account-repo.ex | dc0d/workshop-notes | 971f0166116f1c6157ff999059e0151a2db539b8 | [
"MIT"
] | null | null | null | defmodule Bank.Tests.Support.FakeAccountRepo do
@moduledoc false
use Agent
@behaviour Bank.Core.Model.Account.Boundaries.Repo
@name __MODULE__
def start_link(_) do
Agent.start_link(fn -> %{} end, name: @name)
end
def load(account_id: account_id) do
Agent.get(@name, fn data ->
case Map.ge... | 22.777778 | 82 | 0.668293 |
5a8a637c92f34bffeccfef08f7a0017686ebab19 | 5,615 | ex | Elixir | lib/iex/lib/iex/options.ex | QuinnWilton/elixir | e42e3e55ca1561fe56b58d6f51c7b0faae6a7a1e | [
"Apache-2.0"
] | null | null | null | lib/iex/lib/iex/options.ex | QuinnWilton/elixir | e42e3e55ca1561fe56b58d6f51c7b0faae6a7a1e | [
"Apache-2.0"
] | null | null | null | lib/iex/lib/iex/options.ex | QuinnWilton/elixir | e42e3e55ca1561fe56b58d6f51c7b0faae6a7a1e | [
"Apache-2.0"
] | null | null | null | defmodule IEx.Options do
@moduledoc """
Provides an interface for adjusting options of the running IEx session.
Changing options is usually done inside an IEx session or in your .iex file.
See `h(IEx)` for more info on the latter.
If the value of an option is a keyword list, only those keys that are
menti... | 26.995192 | 89 | 0.674087 |
5a8a96840e08d2885e55260f668aa772903b93a7 | 15,382 | ex | Elixir | lib/cafex/consumer/manager.ex | MishaConway/cafex | 32965b7e099bc45de24c229cc76f7b83b35ff7b4 | [
"Apache-2.0"
] | null | null | null | lib/cafex/consumer/manager.ex | MishaConway/cafex | 32965b7e099bc45de24c229cc76f7b83b35ff7b4 | [
"Apache-2.0"
] | null | null | null | lib/cafex/consumer/manager.ex | MishaConway/cafex | 32965b7e099bc45de24c229cc76f7b83b35ff7b4 | [
"Apache-2.0"
] | null | null | null | defmodule Cafex.Consumer.Manager do
@moduledoc """
This module is the main manager for a high-level kafka consumer
## structure
The manager works together with a offset manager and a group manager to
manage the consumer workers.
The group manager handles the client assignment via kafka(0.9) or zookeeper.... | 35.606481 | 139 | 0.58887 |
5a8ac398ac4f9f3a54f81fd5a7c41a338840349a | 231 | ex | Elixir | lib/phoenix_postman_web/router.ex | gVirtu/phoenix-postman | 526cbb44ae2779b2ab06ee8437258a24bdf9e43b | [
"MIT"
] | null | null | null | lib/phoenix_postman_web/router.ex | gVirtu/phoenix-postman | 526cbb44ae2779b2ab06ee8437258a24bdf9e43b | [
"MIT"
] | null | null | null | lib/phoenix_postman_web/router.ex | gVirtu/phoenix-postman | 526cbb44ae2779b2ab06ee8437258a24bdf9e43b | [
"MIT"
] | null | null | null | defmodule PhoenixPostmanWeb.Router do
use PhoenixPostmanWeb, :router
pipeline :api do
plug :accepts, ["json"]
end
scope "/api", PhoenixPostmanWeb do
pipe_through :api
get "/", ApiController, :index
end
end
| 16.5 | 37 | 0.692641 |
5a8ae33149a9a206840b1a488076fa419b0ea93c | 1,027 | exs | Elixir | test/rosetta_euler/visual_basic_test.exs | seaneshbaugh/rosetta-euler | 14f24dfc347e7d9a4c9c0f090acf2811aa65f453 | [
"MIT"
] | 36 | 2015-01-24T08:11:52.000Z | 2021-03-21T00:32:00.000Z | test/rosetta_euler/visual_basic_test.exs | seaneshbaugh/rosetta-euler | 14f24dfc347e7d9a4c9c0f090acf2811aa65f453 | [
"MIT"
] | null | null | null | test/rosetta_euler/visual_basic_test.exs | seaneshbaugh/rosetta-euler | 14f24dfc347e7d9a4c9c0f090acf2811aa65f453 | [
"MIT"
] | 4 | 2015-01-24T08:17:42.000Z | 2022-01-11T16:10:56.000Z | Code.require_file("../rosetta_euler_test.exs", __DIR__)
Code.require_file("../support/answers.exs", __DIR__)
defmodule RosettaEuler.VisualBasicTest do
use ExUnit.Case, async: true
import RosettaEuler.Test, only: [rosetta_euler_tests: 2]
import RosettaEuler.Answers, only: [answer_for: 1]
setup context do
... | 27.756757 | 83 | 0.675755 |
5a8ae8ab1df5dda51c4fd8b0b2b09c9a40877774 | 4,210 | ex | Elixir | apps/ewallet/lib/ewallet/web/search_parser.ex | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | apps/ewallet/lib/ewallet/web/search_parser.ex | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | apps/ewallet/lib/ewallet/web/search_parser.ex | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 OmiseGO Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 32.890625 | 91 | 0.678385 |
5a8af3c540c5018fb49851d923b97d5c85c058bf | 216 | ex | Elixir | testData/org/elixir_lang/parser_definition/matched_addition_operation_parsing_test_case/AtomKeyword.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 1,668 | 2015-01-03T05:54:27.000Z | 2022-03-25T08:01:20.000Z | testData/org/elixir_lang/parser_definition/matched_addition_operation_parsing_test_case/AtomKeyword.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 2,018 | 2015-01-01T22:43:39.000Z | 2022-03-31T20:13:08.000Z | testData/org/elixir_lang/parser_definition/matched_addition_operation_parsing_test_case/AtomKeyword.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 145 | 2015-01-15T11:37:16.000Z | 2021-12-22T05:51:02.000Z | nil + false
nil + true
nil + nil
nil - false
nil - true
nil - nil
false + nil
false + false
false + true
false - nil
false - false
false - true
true + nil
true + false
true + true
true - nil
true - false
true - true
| 11.368421 | 13 | 0.666667 |
5a8afedc644f195a7a1abd5b67167d1e2a6c2642 | 26 | ex | Elixir | apps/idp/src/idp/base.ex | lbrty/idp-backend | 81d5f10ef6177a1e678b994331c5a09abbdca8d6 | [
"Apache-2.0"
] | null | null | null | apps/idp/src/idp/base.ex | lbrty/idp-backend | 81d5f10ef6177a1e678b994331c5a09abbdca8d6 | [
"Apache-2.0"
] | null | null | null | apps/idp/src/idp/base.ex | lbrty/idp-backend | 81d5f10ef6177a1e678b994331c5a09abbdca8d6 | [
"Apache-2.0"
] | null | null | null | defmodule Idp.Base do
end
| 8.666667 | 21 | 0.807692 |
5a8b0ff40f93c6b654e1dca9262948a2ddd2345e | 6,192 | exs | Elixir | apps/snitch_core/test/data/model/stock/stock_item_test.exs | saurabharch/avia | 74a82a95cf8bfe8143d1fce8136a3bb7ffc9467c | [
"MIT"
] | 1 | 2018-12-01T18:13:55.000Z | 2018-12-01T18:13:55.000Z | apps/snitch_core/test/data/model/stock/stock_item_test.exs | saurabharch/avia | 74a82a95cf8bfe8143d1fce8136a3bb7ffc9467c | [
"MIT"
] | null | null | null | apps/snitch_core/test/data/model/stock/stock_item_test.exs | saurabharch/avia | 74a82a95cf8bfe8143d1fce8136a3bb7ffc9467c | [
"MIT"
] | null | null | null | defmodule Snitch.Data.Model.StockItemTest do
@moduledoc false
use ExUnit.Case, async: true
use Snitch.DataCase
import Snitch.Factory
alias Snitch.Data.Model.StockItem, as: StockItemModel
describe "create/4" do
test "Fails for INVALID attributes" do
assert {:error, changeset} = StockItemModel.cre... | 36 | 97 | 0.706718 |
5a8b1474e0c57d8e065c7f175e5d9d9799e2a2bb | 840 | ex | Elixir | priv/templates/phx.gen.auth/context_fixtures_functions.ex | faheempatel/phoenix | a83318f2a2284b7ab29b0b86cdd9d2e1f4d0a7c9 | [
"MIT"
] | 18,092 | 2015-01-01T01:51:04.000Z | 2022-03-31T19:37:14.000Z | priv/templates/phx.gen.auth/context_fixtures_functions.ex | faheempatel/phoenix | a83318f2a2284b7ab29b0b86cdd9d2e1f4d0a7c9 | [
"MIT"
] | 3,905 | 2015-01-01T00:22:47.000Z | 2022-03-31T17:06:21.000Z | priv/templates/phx.gen.auth/context_fixtures_functions.ex | faheempatel/phoenix | a83318f2a2284b7ab29b0b86cdd9d2e1f4d0a7c9 | [
"MIT"
] | 3,205 | 2015-01-03T10:58:22.000Z | 2022-03-30T14:55:57.000Z | def unique_<%= schema.singular %>_email, do: "<%= schema.singular %>#{System.unique_integer()}@example.com"
def valid_<%= schema.singular %>_password, do: "hello world!"
def valid_<%= schema.singular %>_attributes(attrs \\ %{}) do
Enum.into(attrs, %{
email: unique_<%= schema.singular %>_email(),
... | 33.6 | 109 | 0.607143 |
5a8b22e9cfa12b4494d571b61d438efe81a73f44 | 1,432 | ex | Elixir | lib/app/commands.ex | MrL1605/lambdinha-bot | cf5b399f7fdc5fdaff3485c4917d2c5042d74793 | [
"MIT"
] | null | null | null | lib/app/commands.ex | MrL1605/lambdinha-bot | cf5b399f7fdc5fdaff3485c4917d2c5042d74793 | [
"MIT"
] | null | null | null | lib/app/commands.ex | MrL1605/lambdinha-bot | cf5b399f7fdc5fdaff3485c4917d2c5042d74793 | [
"MIT"
] | null | null | null | defmodule App.Commands do
use App.Router
use App.Commander
use App.Tools
alias App.Commands.Outside
command "welcome" do
Logger.log :info, "Command /welcome"
send_message "Seja bem vindo ao Lambda Study Group! Leia as regras do grupo no pinado e visite nosso GitHub: https://github.com/lambda-study-g... | 26.036364 | 151 | 0.687151 |
5a8b4846737beaaf5b02f2232d1a1c05e48dc312 | 1,573 | ex | Elixir | lib/glimesh_web/channels/api_socket.ex | Darkhax-Forked/glimesh.tv | 9566f0ec6909ecc5151f0e092f3e08b63d911fa8 | [
"MIT"
] | 1 | 2020-08-02T00:12:28.000Z | 2020-08-02T00:12:28.000Z | lib/glimesh_web/channels/api_socket.ex | Darkhax-Forked/glimesh.tv | 9566f0ec6909ecc5151f0e092f3e08b63d911fa8 | [
"MIT"
] | null | null | null | lib/glimesh_web/channels/api_socket.ex | Darkhax-Forked/glimesh.tv | 9566f0ec6909ecc5151f0e092f3e08b63d911fa8 | [
"MIT"
] | null | null | null | defmodule GlimeshWeb.ApiSocket do
use Phoenix.Socket
use Absinthe.Phoenix.Socket,
schema: Glimesh.Schema
alias Glimesh.Accounts.User
## Channels
# channel "room:*", GlimeshWeb.RoomChannel
# Socket params are passed from the client and can
# be used to verify and authenticate a user. After
# veri... | 27.12069 | 83 | 0.645264 |
5a8b4a687a14db309fb6af2e3e64c45a2a6ac08a | 429 | exs | Elixir | ddd_counter/test/ddd_counter_web/views/error_view_test.exs | mwindholtz/unit_tested_live_view_counter | 16e354cb3e4f6632e6d0ffec1c34778ba37df5e5 | [
"Apache-2.0"
] | null | null | null | ddd_counter/test/ddd_counter_web/views/error_view_test.exs | mwindholtz/unit_tested_live_view_counter | 16e354cb3e4f6632e6d0ffec1c34778ba37df5e5 | [
"Apache-2.0"
] | 1 | 2021-05-10T17:10:32.000Z | 2021-05-10T17:10:32.000Z | ddd_counter/test/ddd_counter_web/views/error_view_test.exs | mwindholtz/elixir_unit_testing_example | 16e354cb3e4f6632e6d0ffec1c34778ba37df5e5 | [
"Apache-2.0"
] | null | null | null | defmodule DddCounterWeb.ErrorViewTest do
use DddCounterWeb.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(DddCounterWeb.ErrorView, "404.html", []) == "Not Found"
end
test "renders 500.html" ... | 28.6 | 95 | 0.741259 |
5a8b6550e35f813f68272efd2dc2b2581d7599ce | 322 | ex | Elixir | lib/ex_binance/spot/private/responses/cancel_order.ex | rupurt/ex_binance | fa3fe75878758eef73508c72533e881fbf6ea0d7 | [
"MIT"
] | 7 | 2019-04-12T12:46:53.000Z | 2021-06-29T19:43:41.000Z | lib/ex_binance/spot/private/responses/cancel_order.ex | rupurt/ex_binance | fa3fe75878758eef73508c72533e881fbf6ea0d7 | [
"MIT"
] | 18 | 2020-05-25T09:03:58.000Z | 2021-06-24T19:44:29.000Z | lib/ex_binance/spot/private/responses/cancel_order.ex | rupurt/ex_binance | fa3fe75878758eef73508c72533e881fbf6ea0d7 | [
"MIT"
] | 12 | 2019-08-08T09:20:59.000Z | 2021-04-12T19:19:43.000Z | defmodule ExBinance.Spot.Private.Responses.CancelOrderResponse do
@type t :: %__MODULE__{}
defstruct ~w(
client_order_id
cummulative_quote_qty
executed_qty
order_id
orig_client_order_id
orig_qty
price
side
status
symbol
time_in_force
type
)a
use ExConstructor
en... | 15.333333 | 65 | 0.701863 |
5a8b7ab9a0c46c0ec36f529881cac3d0cdd5936c | 320 | ex | Elixir | lib/local_hex_web/views/package_view.ex | imsoulfly/local_hex_repo | 18fca51c44b3dd01d27684877b3c7bc13471f548 | [
"Apache-2.0"
] | 5 | 2021-11-13T13:58:06.000Z | 2022-03-26T03:47:57.000Z | lib/local_hex_web/views/package_view.ex | imsoulfly/local_hex_repo | 18fca51c44b3dd01d27684877b3c7bc13471f548 | [
"Apache-2.0"
] | 3 | 2021-11-16T18:45:45.000Z | 2021-12-05T13:58:25.000Z | lib/local_hex_web/views/package_view.ex | imsoulfly/local_hex_repo | 18fca51c44b3dd01d27684877b3c7bc13471f548 | [
"Apache-2.0"
] | null | null | null | defmodule LocalHexWeb.PackageView do
use LocalHexWeb, :view
def package_dom_id(package, version) do
package.name <> "-" <> String.replace(version, ".", "_")
end
def package_clipboard(repo, package, version) do
"{:" <> package.name <> ", \"~> " <> version <> "\", repo: :" <> repo.name <> "}"
end
end
| 26.666667 | 85 | 0.609375 |
5a8b967d6f2d51bbc521e278c46adf888aa3be22 | 905 | ex | Elixir | lib/glowing_telegram/endpoint.ex | shipperizer/glowing-telegram | 953d2737e2945b4de11697392ff827f554c63537 | [
"MIT"
] | null | null | null | lib/glowing_telegram/endpoint.ex | shipperizer/glowing-telegram | 953d2737e2945b4de11697392ff827f554c63537 | [
"MIT"
] | 5 | 2018-09-26T16:45:29.000Z | 2018-09-26T16:56:38.000Z | lib/glowing_telegram/endpoint.ex | shipperizer/glowing-telegram | 953d2737e2945b4de11697392ff827f554c63537 | [
"MIT"
] | null | null | null | defmodule GlowingTelegram.Endpoint do
use Plug.Router
require Logger
plug(:match)
plug(Plug.Parsers,
parsers: [:json],
pass: ["application/json"],
json_decoder: Poison
)
plug(:dispatch)
forward("/metrics/", to: GlowingTelegram.Router)
get "/" do
Logger.info("Hit path </>, thanks fo... | 19.255319 | 73 | 0.641989 |
5a8bd42297f8653f2a4d73541bbd96911f693120 | 957 | exs | Elixir | test/four_lucha/region_test.exs | Thomas-Jean/four_lucha | 591627059c02edc3315b5cac2c35eacb821108ff | [
"Apache-2.0"
] | 1 | 2021-02-21T19:15:27.000Z | 2021-02-21T19:15:27.000Z | test/four_lucha/region_test.exs | Thomas-Jean/four_lucha | 591627059c02edc3315b5cac2c35eacb821108ff | [
"Apache-2.0"
] | null | null | null | test/four_lucha/region_test.exs | Thomas-Jean/four_lucha | 591627059c02edc3315b5cac2c35eacb821108ff | [
"Apache-2.0"
] | null | null | null | defmodule FourLucha.RegionsTest do
use ExUnit.Case, async: true
use ExVCR.Mock, adapter: ExVCR.Adapter.Hackney, options: [clear_mock: true]
ExVCR.Config.filter_url_params(true)
setup_all do
HTTPoison.start()
end
setup do
{status, _cleared} = Cachex.clear(:gb_cache)
status
end
test "respo... | 25.864865 | 77 | 0.680251 |
5a8bdbc2240b07f9cddecde40c4d6287848ba80c | 910 | ex | Elixir | lib/ecto/repo/transaction.ex | Anber/ecto | 2b903c8c6acb924f87746fe4d40cb4b42a7f0491 | [
"Apache-2.0"
] | null | null | null | lib/ecto/repo/transaction.ex | Anber/ecto | 2b903c8c6acb924f87746fe4d40cb4b42a7f0491 | [
"Apache-2.0"
] | null | null | null | lib/ecto/repo/transaction.ex | Anber/ecto | 2b903c8c6acb924f87746fe4d40cb4b42a7f0491 | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.Repo.Transaction do
@moduledoc false
@dialyzer {:no_opaque, transaction: 3}
def transaction(name, fun, opts) when is_function(fun, 0) do
{adapter, meta} = Ecto.Repo.Registry.lookup(name)
adapter.transaction(meta, opts, fun)
end
def transaction(name, %Ecto.Multi{} = multi, opts) do
... | 28.4375 | 80 | 0.672527 |
5a8c0b5adc31b9a0a27318b88e92908fefbded97 | 14,186 | ex | Elixir | deps/phoenix/lib/phoenix/presence.ex | thaisfiori/blog_da_tha | e860e64e5251dae03b95fdf1e339ec0a3d789a29 | [
"Apache-2.0"
] | 2 | 2020-05-06T14:51:56.000Z | 2020-05-06T14:52:21.000Z | deps/phoenix/lib/phoenix/presence.ex | rwtrecs/rocketseat-nlw5-inmana | 8ce8bc32e0bdd005c423394bb163945747b557e2 | [
"MIT"
] | 3 | 2021-06-20T14:51:14.000Z | 2021-06-25T00:56:11.000Z | deps/phoenix/lib/phoenix/presence.ex | rwtrecs/rocketseat-nlw5-inmana | 8ce8bc32e0bdd005c423394bb163945747b557e2 | [
"MIT"
] | 1 | 2020-05-16T22:44:14.000Z | 2020-05-16T22:44:14.000Z | defmodule Phoenix.Presence do
@moduledoc """
Provides Presence tracking to processes and channels.
This behaviour provides presence features such as fetching
presences for a given topic, as well as handling diffs of
join and leave events as they occur in real-time. Using this
module defines a supervisor an... | 32.914153 | 100 | 0.652615 |
5a8c5698e52323b06566e49eb73f932f6c0f4ad1 | 2,115 | exs | Elixir | test/httpotion_test.exs | azukiapp/httpotion | 71cedb525d7676ea667ab90036657680ab91e930 | [
"WTFPL"
] | 1 | 2015-06-13T03:35:22.000Z | 2015-06-13T03:35:22.000Z | test/httpotion_test.exs | azukiapp/httpotion | 71cedb525d7676ea667ab90036657680ab91e930 | [
"WTFPL"
] | null | null | null | test/httpotion_test.exs | azukiapp/httpotion | 71cedb525d7676ea667ab90036657680ab91e930 | [
"WTFPL"
] | null | null | null | Code.require_file "../test_helper.exs", __FILE__
defmodule HTTPotionTest do
use ExUnit.Case
import ExUnit.CaptureIO
test "get" do
assert_response HTTPotion.get("httpbin.org/get")
end
test "head" do
assert_response HTTPotion.head("httpbin.org/get"), fn(response) ->
assert response.body == ""
... | 24.310345 | 94 | 0.685579 |
5a8c6b5ecbdbe5d2cd0c2ca17febd3e6d5c70ec6 | 3,421 | ex | Elixir | apps/sue/lib/sue/db/d_b.ex | inculi/Sue | 42e249aec1d9c467db63526966d9690d5c58f346 | [
"MIT"
] | 9 | 2018-03-23T11:18:21.000Z | 2021-08-06T18:38:37.000Z | apps/sue/lib/sue/db/d_b.ex | inculi/Sue | 42e249aec1d9c467db63526966d9690d5c58f346 | [
"MIT"
] | 21 | 2017-12-01T05:57:10.000Z | 2021-06-06T18:53:25.000Z | apps/sue/lib/sue/db/d_b.ex | inculi/Sue | 42e249aec1d9c467db63526966d9690d5c58f346 | [
"MIT"
] | 6 | 2018-03-23T11:24:21.000Z | 2021-08-06T18:40:28.000Z | defmodule Sue.DB do
@moduledoc """
The following is, I suppose, temporary. While I find Mnesia really cool, I
think going forward we're better off using something else.
"""
use GenServer
require Logger
alias __MODULE__
alias :mnesia, as: Mnesia
alias DB.Schema
@type result() :: {:ok, any()} | ... | 25.529851 | 79 | 0.596901 |
5a8c7ec17a64dafe85f7d815430d18cb97abfa1c | 1,205 | ex | Elixir | lib/coop_minesweeper/application.ex | sdoering01/coop_minesweeper | 4fc7265c3734584f93a325c2ceaa172da578f7a5 | [
"MIT"
] | null | null | null | lib/coop_minesweeper/application.ex | sdoering01/coop_minesweeper | 4fc7265c3734584f93a325c2ceaa172da578f7a5 | [
"MIT"
] | null | null | null | lib/coop_minesweeper/application.ex | sdoering01/coop_minesweeper | 4fc7265c3734584f93a325c2ceaa172da578f7a5 | [
"MIT"
] | null | null | null | defmodule CoopMinesweeper.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
@impl true
def start(_type, _args) do
children = [
# Start the Ecto repository (Not needed for now)
# CoopMinesweeper.Repo,
... | 30.897436 | 73 | 0.719502 |
5a8cf127763ca0b96443f7d91c5676eb659583a0 | 702 | ex | Elixir | lib/habex_web/gettext.ex | richardpanda/habex | ba7869f11d8c736db3cbedfb326c754a2d79bec8 | [
"MIT"
] | null | null | null | lib/habex_web/gettext.ex | richardpanda/habex | ba7869f11d8c736db3cbedfb326c754a2d79bec8 | [
"MIT"
] | null | null | null | lib/habex_web/gettext.ex | richardpanda/habex | ba7869f11d8c736db3cbedfb326c754a2d79bec8 | [
"MIT"
] | null | null | null | defmodule HabexWeb.Gettext do
@moduledoc """
A module providing Internationalization with a gettext-based API.
By using [Gettext](https://hexdocs.pm/gettext),
your module gains a set of macros for translations, for example:
import HabexWeb.Gettext
# Simple translation
gettext "Here is the s... | 28.08 | 72 | 0.678063 |
5a8cf1413adbb27e22dac200475320f326a8f5b2 | 128 | ex | Elixir | test/first.ex | Ogiwara-CostlierRain464/Elixir | 498d0aa7f1b66ed1674b89c0fec4a5cb34234a33 | [
"MIT"
] | null | null | null | test/first.ex | Ogiwara-CostlierRain464/Elixir | 498d0aa7f1b66ed1674b89c0fec4a5cb34234a33 | [
"MIT"
] | null | null | null | test/first.ex | Ogiwara-CostlierRain464/Elixir | 498d0aa7f1b66ed1674b89c0fec4a5cb34234a33 | [
"MIT"
] | null | null | null | defmodule Test.First do
@moduledoc false
def hello do
IO.puts "Hello Elixir with macOS"
end
end
Test.First.hello()
| 11.636364 | 37 | 0.703125 |
5a8cfda6e813b21bfb59a50b00dfe71e7dcb7593 | 2,564 | exs | Elixir | exercises/concept/rpn-calculator-output/test/rpn_calculator/output_test.exs | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | null | null | null | exercises/concept/rpn-calculator-output/test/rpn_calculator/output_test.exs | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | null | null | null | exercises/concept/rpn-calculator-output/test/rpn_calculator/output_test.exs | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | null | null | null | defmodule RPNCalculator.OutputTest do
use ExUnit.Case
import ExUnit.CaptureIO
def open(filename \\ "<nil>") do
send(self(), {:open, filename})
case filename do
"filename" -> {:ok, :stdio}
"bad_filename" -> {:ok, spawn(fn -> nil end)}
end
end
def close(_) do
send(self(), :close)... | 26.989474 | 108 | 0.640016 |
5a8d272ada928e985ff071b7d2bc2b5b9b4301e3 | 3,036 | exs | Elixir | test/earmark_helpers_tests/attr_parser_test.exs | ZeLarpMaster/earmark | 35c9661d6647059e507c0278347e21d92351c417 | [
"Apache-1.1"
] | null | null | null | test/earmark_helpers_tests/attr_parser_test.exs | ZeLarpMaster/earmark | 35c9661d6647059e507c0278347e21d92351c417 | [
"Apache-1.1"
] | null | null | null | test/earmark_helpers_tests/attr_parser_test.exs | ZeLarpMaster/earmark | 35c9661d6647059e507c0278347e21d92351c417 | [
"Apache-1.1"
] | 1 | 2020-03-31T19:53:15.000Z | 2020-03-31T19:53:15.000Z | defmodule EarmarkHelpersTests.AttrParserTest do
use ExUnit.Case, async: true
import Earmark.Helpers.AttrParser
#
# describe "without errors" do # still using Elixir 1.2
#
test "empty" do
assert_parsed_as( %{}, "")
end
test "base case" do
assert_parsed_as(%{"title" => ~w[Pragdave]}, "title=Prag... | 36.142857 | 140 | 0.604414 |
5a8d39e6591b3a5fbceeec4f0571cac5b24a9517 | 1,820 | exs | Elixir | apps/odo/mix.exs | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | 18 | 2020-11-13T15:38:24.000Z | 2021-05-26T00:40:08.000Z | apps/odo/mix.exs | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | 365 | 2020-09-21T12:31:40.000Z | 2021-09-25T14:54:21.000Z | apps/odo/mix.exs | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | 3 | 2020-10-06T16:17:49.000Z | 2021-09-03T17:11:41.000Z | defmodule Odo.MixProject do
use Mix.Project
def project do
[
app: :odo,
version: "1.0.0",
elixir: "~> 1.10",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",
start_permanent: Mix.env() == :pr... | 29.354839 | 114 | 0.518681 |
5a8d3be62967d016c971d7607f1e80d70291f46b | 491 | ex | Elixir | chapter9/deck.ex | dcarneiro/etudes-for-elixir | 807d21942747817d84fc2890806582b59921bd59 | [
"MIT"
] | null | null | null | chapter9/deck.ex | dcarneiro/etudes-for-elixir | 807d21942747817d84fc2890806582b59921bd59 | [
"MIT"
] | null | null | null | chapter9/deck.ex | dcarneiro/etudes-for-elixir | 807d21942747817d84fc2890806582b59921bd59 | [
"MIT"
] | null | null | null | defmodule Deck do
@moduledoc """
Funcions to simulate a deck of cards
"""
@doc """
build a list with the defined suits and values
"""
@spec build() :: list(tuple)
def build do
for x <- values, y <- suits, do: { x, y }
end
defp suits do
# ["Hearts", "Diamonds", "Clubs", "Spades"]
["Hear... | 20.458333 | 54 | 0.519348 |
5a8d55039642550e898991b2cb627a4c7e328702 | 90 | ex | Elixir | lib/geocoder/structs/bounds.ex | poly65536/geocoder | e36c1faf8881d45b11f31837abc5298828517941 | [
"MIT"
] | 98 | 2015-08-21T08:47:11.000Z | 2021-10-18T07:48:40.000Z | lib/geocoder/structs/bounds.ex | poly65536/geocoder | e36c1faf8881d45b11f31837abc5298828517941 | [
"MIT"
] | 42 | 2015-09-03T14:02:18.000Z | 2021-05-17T13:56:24.000Z | lib/geocoder/structs/bounds.ex | poly65536/geocoder | e36c1faf8881d45b11f31837abc5298828517941 | [
"MIT"
] | 63 | 2015-09-03T13:50:27.000Z | 2021-09-14T20:50:58.000Z | defmodule Geocoder.Bounds do
defstruct top: nil, right: nil, bottom: nil, left: nil
end
| 22.5 | 56 | 0.744444 |
5a8d6d4ee62186523e936378ccb6a32f47bf8b43 | 4,810 | ex | Elixir | lib/norm/core/schema.ex | slashdotdash/norm | 881aabe2f5f08a8858a77cfd67b7f17f87dc282c | [
"MIT"
] | null | null | null | lib/norm/core/schema.ex | slashdotdash/norm | 881aabe2f5f08a8858a77cfd67b7f17f87dc282c | [
"MIT"
] | null | null | null | lib/norm/core/schema.ex | slashdotdash/norm | 881aabe2f5f08a8858a77cfd67b7f17f87dc282c | [
"MIT"
] | null | null | null | defmodule Norm.Core.Schema do
@moduledoc false
# Provides the definition for schemas
alias __MODULE__
defstruct specs: %{}, struct: nil
def build(%{__struct__: name} = struct) do
# If we're building a schema from a struct then we need to reject any keys with
# values that don't implement the confor... | 26.574586 | 101 | 0.578378 |
5a8d883d9b35ddba0fb4476cf9e11d994d0adafe | 1,017 | ex | Elixir | lib/token.ex | kongo2002/retro | 781149bfe96a665778319ccea03d5ee66349373d | [
"MIT"
] | 3 | 2020-05-09T09:57:35.000Z | 2020-08-28T10:33:42.000Z | lib/token.ex | kongo2002/retro | 781149bfe96a665778319ccea03d5ee66349373d | [
"MIT"
] | 5 | 2020-08-18T19:19:19.000Z | 2021-10-06T16:41:58.000Z | lib/token.ex | kongo2002/retro | 781149bfe96a665778319ccea03d5ee66349373d | [
"MIT"
] | 1 | 2020-05-06T20:28:19.000Z | 2020-05-06T20:28:19.000Z | defmodule Retro.Token do
use Guardian, otp_app: :retro
defstruct session: nil,
user: nil,
is_creator: nil
alias Retro.{Session, Participant, Token}
def subject_for_token(resource, _claims) do
{:ok, resource}
end
def resource_from_claims(%{"sub" => resource} = _claims) do
... | 22.6 | 102 | 0.632252 |
5a8d8863a35749ce21b1bef33762420bbd33a5c5 | 76 | exs | Elixir | weathervane_api/test/test_helper.exs | dtanner/weathervane-api | d4308fc73cb34da57ef6d60bc3b6e5ff633f0a0a | [
"MIT"
] | null | null | null | weathervane_api/test/test_helper.exs | dtanner/weathervane-api | d4308fc73cb34da57ef6d60bc3b6e5ff633f0a0a | [
"MIT"
] | null | null | null | weathervane_api/test/test_helper.exs | dtanner/weathervane-api | d4308fc73cb34da57ef6d60bc3b6e5ff633f0a0a | [
"MIT"
] | null | null | null | ExUnit.start
Ecto.Adapters.SQL.Sandbox.mode(WeathervaneApi.Repo, :manual)
| 15.2 | 60 | 0.802632 |
5a8d8ed9f47ec2ffe6266f855e6e15f28793f4ff | 321 | exs | Elixir | apps/local_ledger_db/config/test.exs | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | apps/local_ledger_db/config/test.exs | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | apps/local_ledger_db/config/test.exs | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | use Mix.Config
config :local_ledger_db, LocalLedgerDB.Repo,
adapter: Ecto.Adapters.Postgres,
pool: Ecto.Adapters.SQL.Sandbox,
url: {:system, "LOCAL_LEDGER_DATABASE_URL", "postgres://localhost/local_ledger_test"},
migration_timestamps: [type: :naive_datetime_usec],
queue_target: 1_000,
queue_interval: 5_000... | 32.1 | 88 | 0.778816 |
5a8dc66ae47f9680e750f3a3ff42ddfa53b8d034 | 2,089 | ex | Elixir | lib/brando/types/status.ex | brandocms/brando | 4198e0c0920031bd909969055064e4e2b7230d21 | [
"MIT"
] | 4 | 2020-10-30T08:40:38.000Z | 2022-01-07T22:21:37.000Z | lib/brando/types/status.ex | brandocms/brando | 4198e0c0920031bd909969055064e4e2b7230d21 | [
"MIT"
] | 1,162 | 2020-07-05T11:20:15.000Z | 2022-03-31T06:01:49.000Z | lib/brando/types/status.ex | brandocms/brando | 4198e0c0920031bd909969055064e4e2b7230d21 | [
"MIT"
] | null | null | null | defmodule Brando.Type.Status do
@moduledoc """
Defines a type for managing status in post schemas.
"""
use Ecto.Type
import Brando.Gettext
@type status :: :disabled | :draft | :pending | :published
@status_codes [draft: 0, published: 1, pending: 2, disabled: 3]
@doc """
Returns the internal type rep... | 28.22973 | 79 | 0.65438 |
5a8de7e4599685b6575e2615406f0a0ea0b18555 | 6,371 | exs | Elixir | benchmark/confusable.exs | ColaCheng/ex_tr39 | cd0fcf1bb906c6527891cb74d2dcd80e1ca0f439 | [
"MIT"
] | 2 | 2021-04-02T04:38:11.000Z | 2021-04-05T10:15:22.000Z | benchmark/confusable.exs | ColaCheng/ex_tr39 | cd0fcf1bb906c6527891cb74d2dcd80e1ca0f439 | [
"MIT"
] | null | null | null | benchmark/confusable.exs | ColaCheng/ex_tr39 | cd0fcf1bb906c6527891cb74d2dcd80e1ca0f439 | [
"MIT"
] | null | null | null | alias ExConfusables.Data
confusables_string = Data.get()
|> Enum.shuffle()
|> Enum.reduce(
"",
fn ({char, _}, acc) ->
char = String.to_integer(char, 16)
<<acc::binary, char::utf8>>
end
)
Benchee.run(
%{
"skeleton" => fn -> ExConfusables.skeleton(confusables_string) end
},
warmup: 0.3,
time: ... | 55.885965 | 96 | 0.388008 |
5a8e119704d7caf6df5a8ff5d975f3da0ff4f44d | 14,551 | exs | Elixir | lib/elixir/test/elixir/exception_test.exs | liveforeverx/elixir | cf3cf0bd5443b59206e5733602244bc3543f0a53 | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/exception_test.exs | liveforeverx/elixir | cf3cf0bd5443b59206e5733602244bc3543f0a53 | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/exception_test.exs | liveforeverx/elixir | cf3cf0bd5443b59206e5733602244bc3543f0a53 | [
"Apache-2.0"
] | null | null | null | Code.require_file "test_helper.exs", __DIR__
defmodule Kernel.ExceptionTest do
use ExUnit.Case, async: true
test "raise preserves the stacktrace" do
stacktrace =
try do
raise "a"
rescue _ ->
[top|_] = System.stacktrace
top
end
file = __ENV__.file |> Path.relative_... | 43.435821 | 131 | 0.63006 |
5a8e4665470a7c12b94b03c56beaaf13a6101631 | 3,652 | ex | Elixir | lib/compilers/separator.ex | rishenko/dice_roller | 1cdea207a2a6007963e52dca817129245ffb470e | [
"Apache-2.0"
] | 8 | 2018-09-24T22:37:07.000Z | 2021-06-17T00:47:20.000Z | lib/compilers/separator.ex | rishenko/dice_roller | 1cdea207a2a6007963e52dca817129245ffb470e | [
"Apache-2.0"
] | 14 | 2018-10-05T11:17:45.000Z | 2018-11-12T13:47:10.000Z | lib/compilers/separator.ex | rishenko/dice_roller | 1cdea207a2a6007963e52dca817129245ffb470e | [
"Apache-2.0"
] | null | null | null | defmodule ExDiceRoller.Compilers.Separator do
@moduledoc """
Handles the `,` separator for rolls.
The separator allows for multiple, separate dice expressions to be evaluated
and only one returned based on provided options:
* `:highest`: returns the highest calculated value and is the default option
* `:l... | 33.504587 | 96 | 0.645947 |
5a8e5e609450b3558e7cf2e08d41d1556bea6571 | 7,947 | ex | Elixir | lib/ecto/query/builder/join.ex | jccf091/ecto | 42d47a6da0711f842e1a0e6724a89b318b9b2144 | [
"Apache-2.0"
] | null | null | null | lib/ecto/query/builder/join.ex | jccf091/ecto | 42d47a6da0711f842e1a0e6724a89b318b9b2144 | [
"Apache-2.0"
] | null | null | null | lib/ecto/query/builder/join.ex | jccf091/ecto | 42d47a6da0711f842e1a0e6724a89b318b9b2144 | [
"Apache-2.0"
] | null | null | null | import Kernel, except: [apply: 2]
defmodule Ecto.Query.Builder.Join do
@moduledoc false
alias Ecto.Query.Builder
alias Ecto.Query.{JoinExpr, QueryExpr}
@doc """
Escapes a join expression (not including the `on` expression).
It returns a tuple containing the binds, the on expression (if available)
and ... | 32.838843 | 108 | 0.603498 |
5a8e81bbc0da8d1a5905a04a1afc29d5edd6c447 | 790 | exs | Elixir | test/tweet_test.exs | kabisa/machine_learning_exercise-elixir | 27fe37ff47676483aa6aa271ac3047f6105343cf | [
"MIT"
] | 3 | 2017-03-10T09:08:47.000Z | 2019-02-09T16:41:23.000Z | test/tweet_test.exs | kabisa/machine_learning_exercise-elixir | 27fe37ff47676483aa6aa271ac3047f6105343cf | [
"MIT"
] | null | null | null | test/tweet_test.exs | kabisa/machine_learning_exercise-elixir | 27fe37ff47676483aa6aa271ac3047f6105343cf | [
"MIT"
] | null | null | null | defmodule MachineLearningExercise.TweetTest do
alias MachineLearningExercise.Tweet
use ExUnit.Case, async: true
test "changeset with valid attributes" do
changeset = Tweet.changeset(%Tweet{}, %{text: "Hello world", klass: "negative", correlation_id: "123"})
assert changeset.valid?
end
test "changes... | 30.384615 | 107 | 0.707595 |
5a8ecd0ea3230caaa809fa122586f694bc642c37 | 73 | ex | Elixir | lib/esp_ex.ex | Carburetor/esp_ex | 0a0ab02c71945e521b213befc0421a4642c9e07b | [
"MIT"
] | null | null | null | lib/esp_ex.ex | Carburetor/esp_ex | 0a0ab02c71945e521b213befc0421a4642c9e07b | [
"MIT"
] | 1 | 2018-05-11T04:27:54.000Z | 2018-05-11T04:27:54.000Z | lib/esp_ex.ex | Carburetor/esp_ex | 0a0ab02c71945e521b213befc0421a4642c9e07b | [
"MIT"
] | 1 | 2018-10-30T06:08:02.000Z | 2018-10-30T06:08:02.000Z | defmodule EspEx do
@moduledoc """
Documentation for EspEx.
"""
end
| 12.166667 | 26 | 0.671233 |
5a8ed52f84bd870c7bb8ff82690e768c9817cedd | 916 | exs | Elixir | config/config.exs | cciuenf/lovelaceccuenf_bot | 22a9d4e25d59cf3e5f1de4c4de8e257a6b44fba9 | [
"MIT"
] | null | null | null | config/config.exs | cciuenf/lovelaceccuenf_bot | 22a9d4e25d59cf3e5f1de4c4de8e257a6b44fba9 | [
"MIT"
] | null | null | null | config/config.exs | cciuenf/lovelaceccuenf_bot | 22a9d4e25d59cf3e5f1de4c4de8e257a6b44fba9 | [
"MIT"
] | null | null | null | import Config
config :lovelace,
ecto_repos: [Lovelace.Repo],
generators: [binary_id: true]
# Configures the endpoint
config :lovelace, LovelaceWeb.Endpoint,
url: [host: "localhost"],
secret_key_base: "+41x5h8Xbn3ilu0YZ5UShcHI2/qhY3JGZpT8ockkzdkTHahMJe177aE2dcyQ5CAn",
render_errors: [view: LovelaceWeb.ErrorV... | 30.533333 | 86 | 0.765284 |
5a8ef660286e2d092a1b4f22081bb150ca595226 | 1,460 | exs | Elixir | test/acme/openssl_test.exs | sikanhe/acme | 2c28818a2edea5c570dcb1ab09de695b5e0a4021 | [
"MIT"
] | 44 | 2017-03-31T15:55:48.000Z | 2022-02-21T11:16:26.000Z | test/acme/openssl_test.exs | sikanhe/acme | 2c28818a2edea5c570dcb1ab09de695b5e0a4021 | [
"MIT"
] | 7 | 2017-07-12T09:36:57.000Z | 2018-01-18T21:30:43.000Z | test/acme/openssl_test.exs | sikanhe/acme | 2c28818a2edea5c570dcb1ab09de695b5e0a4021 | [
"MIT"
] | 6 | 2017-11-20T05:04:10.000Z | 2019-07-09T11:12:41.000Z | defmodule Acme.OpenSSLTest do
use ExUnit.Case, async: true
alias Acme.OpenSSL
def gen_key_path do
name = :crypto.strong_rand_bytes(8) |> Base.url_encode64() |> binary_part(0, 8)
Path.join(System.tmp_dir!(), "#{name}.pem")
end
for size <- [2048, 3072, 4096] do
test "generate RSA keys, size: #{siz... | 33.953488 | 97 | 0.626027 |
5a8f34fec8c0bbad0d9b047aa47b21301e58e6cf | 1,080 | ex | Elixir | lib/system_registry/application.ex | nerves-project/system_registry | b0aa7d8826e5c37a374961338596fee10556ec79 | [
"Apache-2.0"
] | 9 | 2017-09-08T06:34:48.000Z | 2019-08-03T15:35:10.000Z | lib/system_registry/application.ex | nerves-project/system_registry | b0aa7d8826e5c37a374961338596fee10556ec79 | [
"Apache-2.0"
] | 13 | 2017-08-29T22:55:09.000Z | 2019-10-16T20:02:06.000Z | lib/system_registry/application.ex | nerves-project/system_registry | b0aa7d8826e5c37a374961338596fee10556ec79 | [
"Apache-2.0"
] | 4 | 2017-09-07T16:36:40.000Z | 2019-03-14T00:23:45.000Z | defmodule SystemRegistry.Application do
# See http://elixir-lang.org/docs/stable/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
partitions = System.schedulers_online()
registries =
Enum.map([Registration, Binding,... | 31.764706 | 88 | 0.725926 |
5a8f36e7aa4f4c3ec05102e1029a222f9b6732af | 1,200 | ex | Elixir | test/support/conn_case.ex | GleisonAndrade/easiest_api | d30298974fbd0d2538ba25ab1a43e125ea4cf6bf | [
"Apache-2.0"
] | null | null | null | test/support/conn_case.ex | GleisonAndrade/easiest_api | d30298974fbd0d2538ba25ab1a43e125ea4cf6bf | [
"Apache-2.0"
] | null | null | null | test/support/conn_case.ex | GleisonAndrade/easiest_api | d30298974fbd0d2538ba25ab1a43e125ea4cf6bf | [
"Apache-2.0"
] | null | null | null | defmodule EasiestAppWeb.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... | 29.268293 | 72 | 0.730833 |
5a8f6ebfb4cd54210e115006c228fd69ac89a02d | 786 | ex | Elixir | lib/mppm/game_ui/controller.ex | QBonaventure/mppm | 06047083e3f56e750b60a2c2bd2c430228066e63 | [
"MIT"
] | 6 | 2020-11-18T10:10:51.000Z | 2021-03-17T14:28:36.000Z | lib/mppm/game_ui/controller.ex | QBonaventure/mppm | 06047083e3f56e750b60a2c2bd2c430228066e63 | [
"MIT"
] | 6 | 2020-11-10T21:50:43.000Z | 2021-03-04T09:41:22.000Z | lib/mppm/game_ui/controller.ex | QBonaventure/mppm | 06047083e3f56e750b60a2c2bd2c430228066e63 | [
"MIT"
] | null | null | null | defmodule Mppm.GameUI.Controller do
use GenServer
def handle_info({:user_connected, server_login, user, _is_spectator?}, state) do
xml = Mppm.GameUI.Helper.get_custom_template(server_login, user)
Mppm.GameUI.Helper.send_to_user(xml, server_login, user.login)
{:noreply, state}
end
def handle_info(... | 28.071429 | 101 | 0.684478 |
5a8f7d9e88294842b36e9469b0729bb260c07221 | 351 | ex | Elixir | test/support/test_case.ex | pukkamustard/sparql-ex | 4f8907ddbd15215c9b6c40edac19362c92e34d91 | [
"MIT"
] | null | null | null | test/support/test_case.ex | pukkamustard/sparql-ex | 4f8907ddbd15215c9b6c40edac19362c92e34d91 | [
"MIT"
] | null | null | null | test/support/test_case.ex | pukkamustard/sparql-ex | 4f8907ddbd15215c9b6c40edac19362c92e34d91 | [
"MIT"
] | null | null | null | defmodule SPARQL.Test.Case do
use ExUnit.CaseTemplate
use RDF.Vocabulary.Namespace
defvocab EX,
base_iri: "http://example.org/",
terms: [], strict: false
using do
quote do
import RDF.Sigils
alias RDF.{Dataset, Graph, Description, IRI}
alias SPARQL.Query
alias unquote(__M... | 15.954545 | 50 | 0.65812 |
5a8f97c57ddef124fdf3d0339fb38553371c70eb | 818 | exs | Elixir | config/test.exs | chargio/reservation_book_phoenix | 87f07e390f0da2bed162d55b26d3c73c0f3aea4a | [
"MIT"
] | null | null | null | config/test.exs | chargio/reservation_book_phoenix | 87f07e390f0da2bed162d55b26d3c73c0f3aea4a | [
"MIT"
] | null | null | null | config/test.exs | chargio/reservation_book_phoenix | 87f07e390f0da2bed162d55b26d3c73c0f3aea4a | [
"MIT"
] | null | null | null | use Mix.Config
# Only in tests, remove the complexity from the password hashing algorithm
config :bcrypt_elixir, :log_rounds, 1
# Configure your database
#
# The MIX_TEST_PARTITION environment variable can be used
# to provide built-in test partitioning in CI environment.
# Run `mix help test` for more information.
c... | 31.461538 | 75 | 0.768949 |
5a8f9abd023af2b071244b5cb9a327a6465cf49f | 2,156 | ex | Elixir | lib/realm/monoid.ex | Shikanime/Lingua | 537625e97ee8fca826bebdf3a5b58480ca2af460 | [
"MIT"
] | 9 | 2020-02-12T18:45:11.000Z | 2020-11-26T10:44:01.000Z | lib/realm/monoid.ex | Shikanime/Realm | 537625e97ee8fca826bebdf3a5b58480ca2af460 | [
"MIT"
] | null | null | null | lib/realm/monoid.ex | Shikanime/Realm | 537625e97ee8fca826bebdf3a5b58480ca2af460 | [
"MIT"
] | null | null | null | defprotocol Realm.Monoid do
@moduledoc ~S"""
Monoid extends the semigroup with the concept of an "empty" or "zero" element.
## Type Class
An instance of `Realm.Monoid` must also implement `Realm.Semigroup`,
and define `Realm.Monoid.empty/1`.
Semigroup [append/2]
↓
Monoid [empty/1]
... | 23.692308 | 80 | 0.603432 |
5a8fa154916885ff27769fd042f83e44037d1386 | 2,746 | ex | Elixir | clients/content/lib/google_api/content/v21/model/pos_inventory_request.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/content/lib/google_api/content/v21/model/pos_inventory_request.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/content/lib/google_api/content/v21/model/pos_inventory_request.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 40.382353 | 198 | 0.680262 |
5a8fbfef61c6b1e444c894efe609162b328420dc | 363 | exs | Elixir | priv/repo/seeds.exs | ddidwyll/awesome-elixir | 55b72305884cfd10510e25dd5f17f1a32765a17f | [
"MIT"
] | null | null | null | priv/repo/seeds.exs | ddidwyll/awesome-elixir | 55b72305884cfd10510e25dd5f17f1a32765a17f | [
"MIT"
] | null | null | null | priv/repo/seeds.exs | ddidwyll/awesome-elixir | 55b72305884cfd10510e25dd5f17f1a32765a17f | [
"MIT"
] | null | null | null | # Script for populating the database. You can run it as:
#
# mix run priv/repo/seeds.exs
#
# Inside the script, you can read and write to any of your
# repositories directly:
#
# ElixirAwesome.Repo.insert!(%ElixirAwesome.SomeSchema{})
#
# We recommend using the bang functions (`insert!`, `update!`
# and so on) ... | 30.25 | 61 | 0.716253 |
5a8fcd015fde5e9835cd45b256f97646ff6dbecc | 6,214 | exs | Elixir | test/edgedb/api_test.exs | nsidnev/edgedb-elixir | bade2b9daba2e83bfaa5915b2addb74f41610968 | [
"MIT"
] | 30 | 2021-05-19T08:54:44.000Z | 2022-03-11T22:52:25.000Z | test/edgedb/api_test.exs | nsidnev/edgedb-elixir | bade2b9daba2e83bfaa5915b2addb74f41610968 | [
"MIT"
] | 3 | 2021-11-17T21:26:01.000Z | 2022-03-12T09:49:25.000Z | test/edgedb/api_test.exs | nsidnev/edgedb-elixir | bade2b9daba2e83bfaa5915b2addb74f41610968 | [
"MIT"
] | 3 | 2021-08-29T14:55:41.000Z | 2022-03-12T01:30:35.000Z | defmodule Tests.APITest do
use Tests.Support.EdgeDBCase
setup :edgedb_connection
describe "EdgeDB.query/4" do
test "returns EdgeDB.Set on succesful query", %{conn: conn} do
assert {:ok, %EdgeDB.Set{}} = EdgeDB.query(conn, "SELECT 1")
end
test "returns error on failed query", %{conn: conn} do
... | 31.866667 | 97 | 0.617155 |
5a8fcf06b5292c6e11c45ea13efdbdb077583c3b | 1,085 | exs | Elixir | test/utils_tests/urls_test.exs | scottmessinger/elixero | 4e62c4d80d221639ba2347a563002511e8d4a6c6 | [
"MIT"
] | 1 | 2021-12-01T18:21:31.000Z | 2021-12-01T18:21:31.000Z | test/utils_tests/urls_test.exs | scottmessinger/elixero | 4e62c4d80d221639ba2347a563002511e8d4a6c6 | [
"MIT"
] | null | null | null | test/utils_tests/urls_test.exs | scottmessinger/elixero | 4e62c4d80d221639ba2347a563002511e8d4a6c6 | [
"MIT"
] | 1 | 2021-10-01T12:09:46.000Z | 2021-10-01T12:09:46.000Z | defmodule UrlsTest do
use ExUnit.Case
test "Urls are constructed correctly based on type" do
expected =
%{
:assets => "https://api.xero.com/assets.xro/1.0/resource",
:core => "https://api.xero.com/api.xro/2.0/resource",
:files => "https://api.xero.com/files.xro/1.0/resource",
... | 36.166667 | 111 | 0.635023 |
5a901aefdf14331739d7f6b6dfa8b1e1b836c4b8 | 135 | ex | Elixir | lib/intermodal_containers/container_code/size_bound.ex | jjdonov/intermodal_containers | 43cdd7af84fae773ea5a7fc416454ef9aeab0345 | [
"MIT"
] | null | null | null | lib/intermodal_containers/container_code/size_bound.ex | jjdonov/intermodal_containers | 43cdd7af84fae773ea5a7fc416454ef9aeab0345 | [
"MIT"
] | null | null | null | lib/intermodal_containers/container_code/size_bound.ex | jjdonov/intermodal_containers | 43cdd7af84fae773ea5a7fc416454ef9aeab0345 | [
"MIT"
] | null | null | null | defmodule IntermodalContainers.ContainerCode.RangeBound do
defstruct mm_limit: Infinity, inches_limit: Infinity, inclusive: true
end
| 33.75 | 71 | 0.851852 |
5a902094e071cfd5bb55ff0bfbd1bc79b48e3137 | 61 | ex | Elixir | web/views/page_view.ex | cesarreyesa/timeline | fb7b7bdfc64a28420d690999dd3777ba3838afbb | [
"Apache-2.0"
] | null | null | null | web/views/page_view.ex | cesarreyesa/timeline | fb7b7bdfc64a28420d690999dd3777ba3838afbb | [
"Apache-2.0"
] | null | null | null | web/views/page_view.ex | cesarreyesa/timeline | fb7b7bdfc64a28420d690999dd3777ba3838afbb | [
"Apache-2.0"
] | null | null | null | defmodule Timeline.PageView do
use Timeline.Web, :view
end
| 15.25 | 30 | 0.786885 |
5a9037432654662c1693d36a45a078d21449aaad | 1,008 | exs | Elixir | code/tasks/my_app/mix.exs | alvarocamillont/introdu-o_elixir | 1d72d4f4b01d9312c4b066ce3c0fe8d9bfaaade1 | [
"MIT"
] | null | null | null | code/tasks/my_app/mix.exs | alvarocamillont/introdu-o_elixir | 1d72d4f4b01d9312c4b066ce3c0fe8d9bfaaade1 | [
"MIT"
] | 1 | 2021-03-09T16:27:25.000Z | 2021-03-09T16:27:25.000Z | programming-elixir-book/code/tasks/my_app/mix.exs | jordanhubbard/elixir-projects | dee341d672e83a45a17a4a85abd54a480f95c506 | [
"BSD-2-Clause"
] | null | null | null | #---
# Excerpted from "Programming Elixir ≥ 1.6",
# published by The Pragmatic Bookshelf.
# Copyrights apply to this code. It may not be used to create training material,
# courses, books, articles, and the like. Contact us if you are in doubt.
# We make no guarantees that this code is fit for any purpose.
# Visit http... | 26.526316 | 88 | 0.641865 |
5a903b815c08d2d750ccc086e951b8d682cd2ae3 | 394 | ex | Elixir | lib/exploring_elixir/application.ex | arcseldon/exploring-elixir | 0115aed80e5905384e7277dfe740d09e3a496b7b | [
"Apache-2.0"
] | 30 | 2017-07-03T23:53:37.000Z | 2021-03-14T21:27:14.000Z | lib/exploring_elixir/application.ex | arcseldon/exploring-elixir | 0115aed80e5905384e7277dfe740d09e3a496b7b | [
"Apache-2.0"
] | 1 | 2018-05-25T20:00:24.000Z | 2018-05-30T09:40:09.000Z | lib/exploring_elixir/application.ex | aseigo/exploring-elixir | 0115aed80e5905384e7277dfe740d09e3a496b7b | [
"Apache-2.0"
] | 4 | 2017-07-27T09:07:17.000Z | 2019-05-22T11:14:25.000Z | defmodule ExploringElixir.Application do
@moduledoc false
use Application
def start(_type, _args) do
children = [
ExploringElixir.ChildSpec,
{ExploringElixir.ChildSpec, %{type: :forever}},
{ExploringElixir.ChildSpec, %{type: :random}}
]
opts = [strategy: :one_for_one, name: Explor... | 23.176471 | 69 | 0.700508 |
5a904912bfc1f6a25a6000f0316dc33a610715ee | 198 | ex | Elixir | lophi-disk-introspection-server/debian/menu.ex | patriotemeritus/LO-PHI | 8f92c4efb94061cb08b7e9b0ff96346565c12653 | [
"BSD-3-Clause"
] | 28 | 2016-02-26T00:54:16.000Z | 2022-02-24T12:21:15.000Z | lophi-disk-introspection-server/debian/menu.ex | patriotemeritus/LO-PHI | 8f92c4efb94061cb08b7e9b0ff96346565c12653 | [
"BSD-3-Clause"
] | 2 | 2016-03-15T21:49:09.000Z | 2016-07-12T22:11:39.000Z | lophi-disk-introspection-server/debian/menu.ex | patriotemeritus/LO-PHI | 8f92c4efb94061cb08b7e9b0ff96346565c12653 | [
"BSD-3-Clause"
] | 9 | 2016-06-08T14:42:28.000Z | 2021-11-11T03:51:34.000Z | ?package(lophi-disk-introspection-server):needs="X11|text|vc|wm" section="Applications/see-menu-manual"\
title="lophi-disk-introspection-server" command="/usr/bin/lophi-disk-introspection-server"
| 66 | 104 | 0.792929 |
5a9072ab59eb37bc36954741dcf60711ac40dbf4 | 1,019 | ex | Elixir | lib/blue_jet/core/control_flow.ex | freshcom/freshcom-api | 4f2083277943cf4e4e8fd4c4d443c7309f285ad7 | [
"BSD-3-Clause"
] | 44 | 2018-05-09T01:08:57.000Z | 2021-01-19T07:25:26.000Z | lib/blue_jet/core/control_flow.ex | freshcom/freshcom-api | 4f2083277943cf4e4e8fd4c4d443c7309f285ad7 | [
"BSD-3-Clause"
] | 36 | 2018-05-08T23:59:54.000Z | 2018-09-28T13:50:30.000Z | lib/blue_jet/core/control_flow.ex | freshcom/freshcom-api | 4f2083277943cf4e4e8fd4c4d443c7309f285ad7 | [
"BSD-3-Clause"
] | 9 | 2018-05-09T14:09:19.000Z | 2021-03-21T21:04:04.000Z | defmodule BlueJet.ControlFlow do
def tt({:ok, any}), do: {:ok, any}
def tt({:error, error}), do: {:ok, error}
def tt(nil), do: {:error, nil}
def tt(:error), do: {:error, :error}
def tt(any), do: {:ok, any}
def map({:ok, value}, fun) when is_function(fun, 1) do
case fun.(value) do
nil -> {:error, ... | 27.540541 | 102 | 0.588813 |
5a9080482566ab6e07384fc07d91ea0a3ec3da3f | 1,300 | exs | Elixir | config/config.exs | msawka/ccb_api_ex | 5a63eece2218cbe91740b9dea50f50a5036f081f | [
"Apache-2.0"
] | null | null | null | config/config.exs | msawka/ccb_api_ex | 5a63eece2218cbe91740b9dea50f50a5036f081f | [
"Apache-2.0"
] | null | null | null | config/config.exs | msawka/ccb_api_ex | 5a63eece2218cbe91740b9dea50f50a5036f081f | [
"Apache-2.0"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the paren... | 36.111111 | 73 | 0.736154 |
5a90a1986d65fb856c99105e4360278a26a62ecd | 364 | ex | Elixir | lib/algae/tree/rose/chain.ex | doma-engineering/algae | da85c5a9e78591c707859f07f9d485ed68019349 | [
"MIT"
] | 191 | 2016-08-22T17:34:45.000Z | 2019-05-28T19:02:39.000Z | lib/algae/tree/rose/chain.ex | doma-engineering/algae | da85c5a9e78591c707859f07f9d485ed68019349 | [
"MIT"
] | 35 | 2016-08-30T20:56:22.000Z | 2019-05-02T17:32:31.000Z | lib/algae/tree/rose/chain.ex | doma-engineering/algae | da85c5a9e78591c707859f07f9d485ed68019349 | [
"MIT"
] | 10 | 2016-08-30T18:41:54.000Z | 2019-02-14T14:14:55.000Z | alias Algae.Tree.Rose
alias Witchcraft.{Chain, Functor}
import TypeClass
definst Witchcraft.Chain, for: Algae.Tree.Rose do
def chain(%Rose{rose: rose, forest: forest}, link) do
%Rose{rose: new_rose, forest: mid_forest} = link.(rose)
new_forest = mid_forest ++ Functor.map(forest, &Chain.chain(&1, link))
... | 26 | 74 | 0.714286 |
5a90c20d70a997481d64fd9c6100a0e6d4cf1ae1 | 2,047 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/accelerator_type_aggregated_list_warning_data.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/accelerator_type_aggregated_list_warning_data.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/accelerator_type_aggregated_list_warning_data.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.94 | 527 | 0.747435 |
5a90ecef330b1b98e93a2dd30b9464e3e80c215f | 352 | ex | Elixir | lib/meal_tracker/date_utils.ex | lee-dohm/meal-tracker | cfcf738ecf262b1763d239e6936826909d23f46e | [
"MIT"
] | 2 | 2019-07-21T22:47:33.000Z | 2020-01-26T17:54:07.000Z | lib/meal_tracker/date_utils.ex | lee-dohm/meal-tracker | cfcf738ecf262b1763d239e6936826909d23f46e | [
"MIT"
] | 21 | 2015-09-14T06:37:06.000Z | 2019-08-05T02:30:22.000Z | lib/meal_tracker/date_utils.ex | lee-dohm/meal-tracker | cfcf738ecf262b1763d239e6936826909d23f46e | [
"MIT"
] | null | null | null | defmodule MealTracker.DateUtils do
@moduledoc """
Utilities for handling dates.
"""
@doc """
Gets today's date.
## Examples
```
iex> MealTracker.Helper.today()
~D[2019-07-21]
```
"""
@spec today() :: Date.t()
def today do
:calendar.local_time()
|> NaiveDateTime.from_erl!()
|> Na... | 15.304348 | 34 | 0.605114 |
5a917713fe4010e4afd495dabc9f1e5e39452e83 | 2,786 | ex | Elixir | lib/surface/formatter/phase.ex | RudolfMan/surface | ee8c1546b77c91fe08e7360e64666c613bc5a900 | [
"MIT"
] | 468 | 2021-03-11T23:10:41.000Z | 2022-03-30T20:12:06.000Z | lib/surface/formatter/phase.ex | RudolfMan/surface | ee8c1546b77c91fe08e7360e64666c613bc5a900 | [
"MIT"
] | 248 | 2021-03-12T07:39:37.000Z | 2022-03-31T13:36:44.000Z | lib/surface/formatter/phase.ex | RudolfMan/surface | ee8c1546b77c91fe08e7360e64666c613bc5a900 | [
"MIT"
] | 46 | 2021-03-22T09:28:58.000Z | 2022-03-23T21:32:20.000Z | defmodule Surface.Formatter.Phase do
@moduledoc """
A phase implementing a single "rule" for formatting code. These work as middleware
between `Surface.Compiler.Parser.parse` and `Surface.Formatter.Render.node/2`
to modify node lists before they are rendered.
Some phases rely on other phases; `@moduledoc`s s... | 32.776471 | 102 | 0.684135 |
5a91bb2e805aa4f3b5b2057c089ae4bf9d4cef86 | 246 | ex | Elixir | test/unit/fixtures/compiler/pruner/module_59.ex | gregjohnsonsaltaire/hologram | aa8e9ea0d599def864c263cc37cc8ee31f02ac4a | [
"MIT"
] | 40 | 2022-01-19T20:27:36.000Z | 2022-03-31T18:17:41.000Z | test/unit/fixtures/compiler/pruner/module_59.ex | gregjohnsonsaltaire/hologram | aa8e9ea0d599def864c263cc37cc8ee31f02ac4a | [
"MIT"
] | 42 | 2022-02-03T22:52:43.000Z | 2022-03-26T20:57:32.000Z | test/unit/fixtures/compiler/pruner/module_59.ex | gregjohnsonsaltaire/hologram | aa8e9ea0d599def864c263cc37cc8ee31f02ac4a | [
"MIT"
] | 3 | 2022-02-10T04:00:37.000Z | 2022-03-08T22:07:45.000Z | defmodule Hologram.Test.Fixtures.Compiler.Pruner.Module59 do
use Hologram.Page
alias Hologram.Test.Fixtures.Compiler.Pruner.Module60
route "/test-route-59"
def template do
~H"""
"""
end
def action do
Module60
end
end
| 15.375 | 60 | 0.703252 |
5a91c6575539824a3a1538e8089ac215f2d3b743 | 269 | exs | Elixir | priv/repo/migrations/20151215085543_create_category.exs | van-mronov/ex_money | 39010f02fd822657e3b5694e08b872bd2ab72c26 | [
"0BSD"
] | 184 | 2015-11-23T20:51:50.000Z | 2022-03-30T01:01:39.000Z | priv/repo/migrations/20151215085543_create_category.exs | van-mronov/ex_money | 39010f02fd822657e3b5694e08b872bd2ab72c26 | [
"0BSD"
] | 15 | 2015-11-26T16:00:20.000Z | 2018-05-25T20:13:39.000Z | priv/repo/migrations/20151215085543_create_category.exs | van-mronov/ex_money | 39010f02fd822657e3b5694e08b872bd2ab72c26 | [
"0BSD"
] | 21 | 2015-11-26T21:34:40.000Z | 2022-03-26T02:56:42.000Z | defmodule ExMoney.Repo.Migrations.CreateCategory do
use Ecto.Migration
def change do
create table(:categories) do
add :name, :string
add :parent_id, :integer
timestamps
end
create index(:categories, [:name], unique: true)
end
end
| 17.933333 | 52 | 0.67658 |
5a91f2ba7d54209a93f8781205f25f8491910753 | 1,446 | ex | Elixir | lib/mix/tasks/phoenix.gen.channel.ex | thegrubbsian/phoenix | a8ff809ddd24a2c4277da5cca122d70709313ac8 | [
"MIT"
] | null | null | null | lib/mix/tasks/phoenix.gen.channel.ex | thegrubbsian/phoenix | a8ff809ddd24a2c4277da5cca122d70709313ac8 | [
"MIT"
] | null | null | null | lib/mix/tasks/phoenix.gen.channel.ex | thegrubbsian/phoenix | a8ff809ddd24a2c4277da5cca122d70709313ac8 | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.Phoenix.Gen.Channel do
use Mix.Task
@shortdoc "Generates a Phoenix channel"
@moduledoc """
Generates a Phoenix channel.
mix phoenix.gen.channel Room rooms
The first argument is the module name for the channel.
The second argument is the plural used as the topic.
The generate... | 23.322581 | 79 | 0.667358 |
5a923c7f8b862f5f269edb4754989431917f4e39 | 846 | ex | Elixir | lib/railway_ipc/ipc/messages/default_message.ex | learn-co/railway_ipc | aeec16fb5b315fb3d8472b38c6eeea20d20e731a | [
"MIT"
] | 2 | 2021-03-22T19:37:33.000Z | 2022-01-04T08:48:20.000Z | lib/railway_ipc/ipc/messages/default_message.ex | learn-co/railway_ipc | aeec16fb5b315fb3d8472b38c6eeea20d20e731a | [
"MIT"
] | 10 | 2019-11-29T20:24:24.000Z | 2021-02-26T22:06:13.000Z | lib/railway_ipc/ipc/messages/default_message.ex | learn-co/railway_ipc | aeec16fb5b315fb3d8472b38c6eeea20d20e731a | [
"MIT"
] | 1 | 2020-01-09T17:13:29.000Z | 2020-01-09T17:13:29.000Z | defmodule RailwayIpc.DefaultMessage do
@moduledoc false
use Protobuf, syntax: :proto3
@type t :: %__MODULE__{
user_uuid: String.t(),
correlation_id: String.t(),
uuid: String.t(),
context: %{String.t() => String.t()}
}
defstruct [:user_uuid, :correlation_id, :uuid... | 26.4375 | 91 | 0.62766 |
5a9241ef82e70636255d57820174b4415a00c4a6 | 888 | ex | Elixir | test/support/conn_case.ex | neftalyluis/komi_chan | 7b4f1b0163f66ca5b193e27d514de4e6d88a7672 | [
"MIT"
] | 4 | 2020-01-20T05:54:44.000Z | 2021-01-21T00:15:19.000Z | test/support/conn_case.ex | neftalyluis/komi_chan | 7b4f1b0163f66ca5b193e27d514de4e6d88a7672 | [
"MIT"
] | 65 | 2019-06-28T06:35:54.000Z | 2022-02-28T10:16:49.000Z | test/support/conn_case.ex | neftalyluis/komi_chan | 7b4f1b0163f66ca5b193e27d514de4e6d88a7672 | [
"MIT"
] | 1 | 2019-01-31T19:17:15.000Z | 2019-01-31T19:17:15.000Z | defmodule KomiChanWeb.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... | 26.909091 | 59 | 0.72973 |
5a92495847c79365400fdb0e229e89cb27c05c98 | 346 | ex | Elixir | lib/paginator/cursor.ex | stevedomin/paginator | 4832f6e93f2554db056152dbef396de4e3ee29f8 | [
"MIT"
] | 528 | 2018-02-13T15:01:54.000Z | 2022-03-29T13:53:44.000Z | lib/paginator/cursor.ex | stevedomin/paginator | 4832f6e93f2554db056152dbef396de4e3ee29f8 | [
"MIT"
] | 94 | 2018-02-13T15:32:03.000Z | 2022-03-12T03:20:18.000Z | lib/paginator/cursor.ex | stevedomin/paginator | 4832f6e93f2554db056152dbef396de4e3ee29f8 | [
"MIT"
] | 74 | 2018-02-13T15:12:49.000Z | 2022-03-12T02:47:59.000Z | defmodule Paginator.Cursor do
@moduledoc false
def decode(nil), do: nil
def decode(encoded_cursor) do
encoded_cursor
|> Base.url_decode64!()
|> Plug.Crypto.non_executable_binary_to_term([:safe])
end
def encode(values) when is_map(values) do
values
|> :erlang.term_to_binary()
|> Base... | 19.222222 | 57 | 0.690751 |
5a9257ba4882685077420195578ada0118b16d78 | 18,721 | ex | Elixir | clients/content/lib/google_api/content/v21/api/datafeeds.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v21/api/datafeeds.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v21/api/datafeeds.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... | 43.537209 | 187 | 0.630148 |
5a9260035ec85fb2edb397a21b010f92e5b36711 | 409 | exs | Elixir | test/score_web/views/error_view_test.exs | JulianaHelena5/score | 153122d88586d00c11c73ac447fd14cf95599805 | [
"MIT"
] | 3 | 2021-08-09T14:17:42.000Z | 2022-03-01T17:31:03.000Z | test/score_web/views/error_view_test.exs | JulianaHelena5/score | 153122d88586d00c11c73ac447fd14cf95599805 | [
"MIT"
] | 3 | 2021-08-09T12:27:01.000Z | 2021-08-10T08:54:22.000Z | test/score_web/views/error_view_test.exs | JulianaHelena5/score | 153122d88586d00c11c73ac447fd14cf95599805 | [
"MIT"
] | null | null | null | defmodule ScoreWeb.ErrorViewTest do
use ScoreWeb.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(ScoreWeb.ErrorView, "404.html", []) == "Not Found"
end
test "renders 500.html" do
assert r... | 27.266667 | 90 | 0.728606 |
5a9268abcd66524e4b25efcfc955dc211ca916b3 | 627 | ex | Elixir | lib/debounce_and_throttle/application.ex | johnknott/debounce-and-throttle | ba250551067c195f2390ada26e04b427820011bf | [
"MIT"
] | null | null | null | lib/debounce_and_throttle/application.ex | johnknott/debounce-and-throttle | ba250551067c195f2390ada26e04b427820011bf | [
"MIT"
] | null | null | null | lib/debounce_and_throttle/application.ex | johnknott/debounce-and-throttle | ba250551067c195f2390ada26e04b427820011bf | [
"MIT"
] | null | null | null | defmodule DebounceAndThrottle.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
@impl true
def start(_type, _args) do
children = [
# Starts a worker by calling: DebounceAndThrottle.Worker.start_link(arg)
... | 28.5 | 78 | 0.732057 |
5a926d08f4ed62b65f064167792bd426cc72de42 | 834 | ex | Elixir | plants_weather_traffic/apps/plants_server/lib/plants_server/application.ex | andfoy/cpd-exercises | f36ac16c74bb980d7edd6aaf5661a6d4d4b09489 | [
"MIT"
] | null | null | null | plants_weather_traffic/apps/plants_server/lib/plants_server/application.ex | andfoy/cpd-exercises | f36ac16c74bb980d7edd6aaf5661a6d4d4b09489 | [
"MIT"
] | null | null | null | plants_weather_traffic/apps/plants_server/lib/plants_server/application.ex | andfoy/cpd-exercises | f36ac16c74bb980d7edd6aaf5661a6d4d4b09489 | [
"MIT"
] | null | null | null | defmodule PlantsServer.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
# List all child processes to be supervised
# :logger.info("#{inspect Mdns.Client.query("_ssh._tcp.local")}")
... | 28.758621 | 71 | 0.660671 |
5a929ad2caffb4905c8cc7bb9b3acb460319668c | 817 | exs | Elixir | mix.exs | 3zcurdia/whereami_ex | 52688718cff6c5fe2d5a7c5e284a78242f87a9fd | [
"MIT"
] | null | null | null | mix.exs | 3zcurdia/whereami_ex | 52688718cff6c5fe2d5a7c5e284a78242f87a9fd | [
"MIT"
] | null | null | null | mix.exs | 3zcurdia/whereami_ex | 52688718cff6c5fe2d5a7c5e284a78242f87a9fd | [
"MIT"
] | null | null | null | defmodule Whereami.MixProject do
use Mix.Project
def project do
[
app: :whereami,
version: "0.1.0",
elixir: "~> 1.10",
config_path: "config/config.exs",
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help... | 22.694444 | 62 | 0.541004 |
5a92b2029c1c49ba6e70570bb0ffdffb8f5d8371 | 849 | ex | Elixir | test/support/factory.ex | upmaru/cineplex | 7d1d516d3e3d3683b2ad4425b61517a8f556f721 | [
"MIT"
] | null | null | null | test/support/factory.ex | upmaru/cineplex | 7d1d516d3e3d3683b2ad4425b61517a8f556f721 | [
"MIT"
] | null | null | null | test/support/factory.ex | upmaru/cineplex | 7d1d516d3e3d3683b2ad4425b61517a8f556f721 | [
"MIT"
] | null | null | null | defmodule Cineplex.Factory do
use ExMachina.Ecto, repo: Cineplex.Repo
alias Cineplex.Queue
@spec source_factory() :: Cineplex.Queue.Source.t()
def source_factory do
%Queue.Source{
endpoint: "https://example.com",
token: "blah",
reel: "upmaru_studio"
}
end
@spec job_factory() :: ... | 21.769231 | 63 | 0.644287 |
5a92f8ae4f32a5014c28bf4f8a6d031636178142 | 414 | exs | Elixir | priv/repo/migrations/20190927194013_create_visualizations_table.exs | folkengine/discovery_api | 0bb7a0aff4603a4f7532cc65ca8c8dbb37a57217 | [
"Apache-2.0"
] | 26 | 2019-09-20T23:54:45.000Z | 2020-08-20T14:23:32.000Z | priv/repo/migrations/20190927194013_create_visualizations_table.exs | folkengine/discovery_api | 0bb7a0aff4603a4f7532cc65ca8c8dbb37a57217 | [
"Apache-2.0"
] | 757 | 2019-08-15T18:15:07.000Z | 2020-09-18T20:55:31.000Z | priv/repo/migrations/20190927194013_create_visualizations_table.exs | folkengine/discovery_api | 0bb7a0aff4603a4f7532cc65ca8c8dbb37a57217 | [
"Apache-2.0"
] | 9 | 2019-11-12T16:43:46.000Z | 2020-03-25T16:23:16.000Z | defmodule DiscoveryApi.Repo.Migrations.CreateVisualizationsTable do
use Ecto.Migration
def change do
create table(:visualizations) do
add(:public_id, :string, null: false)
add(:query, :string, null: false)
add(:title, :string, null: false)
add :owner_id, references(:users), null: false
... | 24.352941 | 67 | 0.68599 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.