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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
21be11bb90609437aba0d89b3f32ea3871f5c0a4 | 1,670 | exs | Elixir | test/game/simple_response_test.exs | jgsmith/militerm | c4252d0a93f5620b90750ac2b61baf282e9ef7eb | [
"Apache-2.0"
] | 6 | 2017-06-16T10:26:35.000Z | 2021-04-07T15:01:00.000Z | test/game/simple_response_test.exs | jgsmith/militerm | c4252d0a93f5620b90750ac2b61baf282e9ef7eb | [
"Apache-2.0"
] | 2 | 2020-04-14T02:17:46.000Z | 2021-03-10T11:09:05.000Z | test/game/simple_response_test.exs | jgsmith/militerm | c4252d0a93f5620b90750ac2b61baf282e9ef7eb | [
"Apache-2.0"
] | null | null | null | defmodule Game.SimpleResponseTest do
use Militerm.DataCase, async: false
alias Militerm.Test.{Entity}
alias Militerm.Systems.Entity, as: EntitySystem
@elevator_id "scene:test:area:elevator"
@elevator {:thing, @elevator_id}
setup do
Militerm.Systems.Entity.whereis(@elevator)
entity =
Entity... | 26.935484 | 98 | 0.579641 |
21be44010b16cfb8d8c5d97ea5a97191170e72f8 | 380 | ex | Elixir | examples/simple_blog/web/views/error_view.ex | inaka/Dayron | d6773dacdc681766bfcb41dd792c102ab7217b1c | [
"Apache-2.0"
] | 169 | 2016-05-05T17:21:45.000Z | 2022-01-31T20:23:07.000Z | examples/simple_blog/web/views/error_view.ex | inaka/Dayron | d6773dacdc681766bfcb41dd792c102ab7217b1c | [
"Apache-2.0"
] | 51 | 2016-04-22T20:46:37.000Z | 2022-02-22T00:15:40.000Z | examples/simple_blog/web/views/error_view.ex | inaka/RestRepo | d6773dacdc681766bfcb41dd792c102ab7217b1c | [
"Apache-2.0"
] | 26 | 2016-05-21T09:52:26.000Z | 2022-02-11T18:07:14.000Z | defmodule SimpleBlog.ErrorView do
use SimpleBlog.Web, :view
def render("404.html", _assigns) do
"Page not found"
end
def render("500.html", _assigns) do
"Server internal error"
end
# In case no render clause matches or no
# template is found, let's render it as 500
def template_not_found(_tem... | 21.111111 | 47 | 0.702632 |
21be4f57a4c4b191b6cd3c283110037f1d331820 | 10,512 | exs | Elixir | test/ecto/query/subquery_test.exs | dgvncsz0f/ecto | bae06fe650328cc1060c09fe889a2de9a10edb1b | [
"Apache-2.0"
] | null | null | null | test/ecto/query/subquery_test.exs | dgvncsz0f/ecto | bae06fe650328cc1060c09fe889a2de9a10edb1b | [
"Apache-2.0"
] | null | null | null | test/ecto/query/subquery_test.exs | dgvncsz0f/ecto | bae06fe650328cc1060c09fe889a2de9a10edb1b | [
"Apache-2.0"
] | null | null | null | Code.require_file "../../../integration_test/support/types.exs", __DIR__
defmodule Ecto.Query.SubqueryTest do
use ExUnit.Case, async: true
import Ecto.Query
alias Ecto.Query.Planner
alias Ecto.Query.JoinExpr
defmodule Comment do
use Ecto.Schema
schema "comments" do
field :text, :string
... | 38.225455 | 116 | 0.60293 |
21be6103fe7a4138b56088488a8605a3ce72f23d | 1,184 | ex | Elixir | deps/absinthe/lib/absinthe/language/inline_fragment.ex | JoakimEskils/elixir-absinthe | d81e24ec7c7b1164e6d152101dd50422f192d7e9 | [
"MIT"
] | 3 | 2017-06-22T16:33:58.000Z | 2021-07-07T15:21:09.000Z | lib/absinthe/language/inline_fragment.ex | bruce/absinthe | 19b63d3aaa9fb75aad01ffd5e91d89e0b30d7f91 | [
"MIT"
] | null | null | null | lib/absinthe/language/inline_fragment.ex | bruce/absinthe | 19b63d3aaa9fb75aad01ffd5e91d89e0b30d7f91 | [
"MIT"
] | null | null | null | defmodule Absinthe.Language.InlineFragment do
@moduledoc false
alias Absinthe.{Blueprint, Language}
defstruct [
type_condition: nil,
directives: [],
selection_set: nil,
loc: %{start_line: nil}
]
@type t :: %__MODULE__{
type_condition: nil | Language.NamedType.t,
directives: [Languag... | 24.666667 | 80 | 0.683277 |
21bebf6d82cac5519965a4364bfcf62167ca3ed7 | 1,185 | ex | Elixir | apps/telegraph/lib/telegraph/pipeline.ex | paulanthonywilson/morsey | b72d1eee54db1bcc8d0f2097c345da602995ce43 | [
"MIT"
] | 1 | 2018-12-30T04:37:15.000Z | 2018-12-30T04:37:15.000Z | apps/telegraph/lib/telegraph/pipeline.ex | paulanthonywilson/morsey | b72d1eee54db1bcc8d0f2097c345da602995ce43 | [
"MIT"
] | null | null | null | apps/telegraph/lib/telegraph/pipeline.ex | paulanthonywilson/morsey | b72d1eee54db1bcc8d0f2097c345da602995ce43 | [
"MIT"
] | null | null | null | defmodule Telegraph.Pipeline do
@moduledoc """
Sets up the all the processes responsible for detecting the telgraph key,
to decoding the morse.
"""
use GenServer
alias Telegraph.{
GpioKey,
Debounce,
DetectEndOfWord,
DotDash,
GroupIntoCharacters,
GroupIntoWords,
MorseDecode
}
... | 24.183673 | 80 | 0.691139 |
21bf0d055b462f0e2090bae08a62355f98c51977 | 396 | exs | Elixir | priv/repo/migrations/20200701164746_create_change_log.exs | RatioPBC/epi-viaduct-nys | 99fb637785ea207aee5449fa01fa59dd18ec8bf2 | [
"MIT"
] | 2 | 2021-06-22T21:01:49.000Z | 2021-11-04T18:36:48.000Z | priv/repo/migrations/20200701164746_create_change_log.exs | RatioPBC/epi-viaduct-nys | 99fb637785ea207aee5449fa01fa59dd18ec8bf2 | [
"MIT"
] | null | null | null | priv/repo/migrations/20200701164746_create_change_log.exs | RatioPBC/epi-viaduct-nys | 99fb637785ea207aee5449fa01fa59dd18ec8bf2 | [
"MIT"
] | null | null | null | defmodule NYSETL.Repo.Migrations.CreateChangeLog do
use Ecto.Migration
def change do
create table(:change_logs) do
add :source_type, :string
add :source_id, :integer
add :destination_type, :string
add :destination_id, :integer
add :previous_state, :map
add :applied_changes, ... | 22 | 51 | 0.671717 |
21bf117b75bc01b6ef90decf5ddd1105f4d4dfbd | 456 | exs | Elixir | priv/repo/user_seeds.exs | axelclark/ex338 | 3fb3c260d93bda61f7636ee1a677770d2dc1b89a | [
"MIT"
] | 17 | 2016-12-22T06:39:26.000Z | 2021-01-20T13:51:13.000Z | priv/repo/user_seeds.exs | axelclark/ex338 | 3fb3c260d93bda61f7636ee1a677770d2dc1b89a | [
"MIT"
] | 608 | 2016-08-06T18:57:58.000Z | 2022-03-01T02:48:17.000Z | priv/repo/user_seeds.exs | axelclark/ex338 | 3fb3c260d93bda61f7636ee1a677770d2dc1b89a | [
"MIT"
] | 6 | 2017-11-21T22:35:45.000Z | 2022-01-11T21:37:40.000Z | Ex338.Repo.delete_all(Ex338.Accounts.User)
Ex338.Accounts.User.changeset(%Ex338.Accounts.User{}, %{
name: "Test Admin",
email: "testadmin@example.com",
password: "secret",
confirm_password: "secret",
admin: true
})
|> Ex338.Repo.insert!()
Ex338.Accounts.User.changeset(%Ex338.Accounts.User{}, %{
name: "Tes... | 22.8 | 56 | 0.690789 |
21bf3d4339aebcc25ced9010d04872703f5cb30d | 666 | exs | Elixir | rel/config.exs | omisego/potterhat | 47635e5d061c76900bd0e42a19e5dfc2ae8c0253 | [
"Apache-2.0"
] | 6 | 2019-03-28T14:47:41.000Z | 2019-06-25T02:38:06.000Z | rel/config.exs | omisego/potterhat | 47635e5d061c76900bd0e42a19e5dfc2ae8c0253 | [
"Apache-2.0"
] | 30 | 2019-05-22T10:08:09.000Z | 2019-08-02T06:37:56.000Z | rel/config.exs | omisego/potterhat | 47635e5d061c76900bd0e42a19e5dfc2ae8c0253 | [
"Apache-2.0"
] | null | null | null | Path.join(["rel", "plugins", "*.exs"])
|> Path.wildcard()
|> Enum.map(&Code.eval_file(&1))
use Mix.Releases.Config,
default_release: :potterhat,
default_environment: Mix.env
environment :dev do
set dev_mode: true
set include_erts: false
set cookie: :dev
end
environment :prod do
set include_erts: true
s... | 19.588235 | 47 | 0.71021 |
21bf67b74eff175312b927e48f990ec56706311c | 1,435 | ex | Elixir | lib/heat_tags_web/endpoint.ex | DPechetti/nlw-heat-elixir | c3fe71244a4c1d49bb28668f9334c5b4c803aa54 | [
"MIT"
] | 2 | 2021-10-30T11:53:58.000Z | 2022-02-06T02:17:06.000Z | lib/heat_tags_web/endpoint.ex | DPechetti/nlw-heat-elixir | c3fe71244a4c1d49bb28668f9334c5b4c803aa54 | [
"MIT"
] | 1 | 2021-10-30T14:24:28.000Z | 2021-10-30T14:24:28.000Z | lib/heat_tags_web/endpoint.ex | DPechetti/nlw-heat-elixir | c3fe71244a4c1d49bb28668f9334c5b4c803aa54 | [
"MIT"
] | null | null | null | defmodule HeatTagsWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :heat_tags
# The session will be stored in the cookie and signed,
# this means its contents can be read but not tampered with.
# Set :encryption_salt if you would also like to encrypt it.
@session_options [
store: :cookie,
key: "_heat_t... | 29.285714 | 97 | 0.719164 |
21bfa493dc7303867c7d38d2e0acf21bb76ab552 | 2,093 | exs | Elixir | mix.exs | mbta/screens | 4b586970f8844b19543bb2ffd4b032a89f6fa40a | [
"MIT"
] | 3 | 2021-07-27T14:11:00.000Z | 2022-01-03T14:16:43.000Z | mix.exs | mbta/screens | 4b586970f8844b19543bb2ffd4b032a89f6fa40a | [
"MIT"
] | 444 | 2021-03-10T20:57:17.000Z | 2022-03-31T16:00:35.000Z | mix.exs | mbta/screens | 4b586970f8844b19543bb2ffd4b032a89f6fa40a | [
"MIT"
] | null | null | null | defmodule Screens.MixProject do
use Mix.Project
def project do
[
app: :screens,
version: "0.1.0",
elixir: "~> 1.9",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
start_permanent: Mix.env() == :prod,
deps: deps(),
dia... | 26.1625 | 67 | 0.510272 |
21bfb2df73248adbc3b3c2516eaab751b748bfc1 | 296 | exs | Elixir | priv/repo/migrations/001_create_projection_versions.exs | fleadope/freshcom | 8d5944befaa6eea8d31e5f5995939be2a1a44262 | [
"BSD-3-Clause"
] | 46 | 2018-10-13T23:18:13.000Z | 2021-08-07T07:46:51.000Z | priv/repo/migrations/001_create_projection_versions.exs | fleadope/freshcom | 8d5944befaa6eea8d31e5f5995939be2a1a44262 | [
"BSD-3-Clause"
] | 25 | 2018-10-14T00:56:07.000Z | 2019-12-23T19:41:02.000Z | priv/repo/migrations/001_create_projection_versions.exs | fleadope/freshcom | 8d5944befaa6eea8d31e5f5995939be2a1a44262 | [
"BSD-3-Clause"
] | 5 | 2018-12-16T04:39:51.000Z | 2020-10-01T12:17:03.000Z | defmodule Freshcom.Repo.Migrations.CreateProjectionVersions do
use Ecto.Migration
def change do
create table(:projection_versions, primary_key: false) do
add :projection_name, :text, primary_key: true
add :last_seen_event_number, :bigint
timestamps()
end
end
end | 24.666667 | 62 | 0.739865 |
21bfb7b7a308826caf9044815f22ec3ac7314f45 | 879 | ex | Elixir | lib/xgps/driver/adafruit_gps.ex | gmcintire/xgps | 56cf4c83dfc05aa22b1d7b7d1d2456cf5acfa7a2 | [
"MIT"
] | null | null | null | lib/xgps/driver/adafruit_gps.ex | gmcintire/xgps | 56cf4c83dfc05aa22b1d7b7d1d2456cf5acfa7a2 | [
"MIT"
] | null | null | null | lib/xgps/driver/adafruit_gps.ex | gmcintire/xgps | 56cf4c83dfc05aa22b1d7b7d1d2456cf5acfa7a2 | [
"MIT"
] | null | null | null | defmodule XGPS.Driver.AdafruitGps do
@moduledoc """
XGPS driver for Adafruit
"""
alias Circuits.UART
def init(%{pid: pid, port_name: port_name} = state) do
:ok = UART.configure(pid, framing: {UART.Framing.Line, separator: "\r\n"})
:ok = UART.open(pid, port_name, speed: 9600, active: true)
cmd1 ... | 31.392857 | 90 | 0.626849 |
21bfd2c289875e830ccde62a7221cce9555830db | 1,850 | ex | Elixir | lib/ja_serializer/params.ex | gamesrol/ja_serializer | c48d8fb0fb742bd96c30acd40e24f7395f25af2c | [
"Apache-2.0"
] | null | null | null | lib/ja_serializer/params.ex | gamesrol/ja_serializer | c48d8fb0fb742bd96c30acd40e24f7395f25af2c | [
"Apache-2.0"
] | null | null | null | lib/ja_serializer/params.ex | gamesrol/ja_serializer | c48d8fb0fb742bd96c30acd40e24f7395f25af2c | [
"Apache-2.0"
] | null | null | null | defmodule JaSerializer.Params do
@moduledoc """
Functions to help when working with json api params.
"""
@doc """
Takes the entire params passed in, and merges relationships and attributes.
Note, this expects to receive the json api "data" param.
Example functionality:
JaSerializer.Params.to_att... | 25.342466 | 80 | 0.522703 |
21bfd47e8ed57d9f22e52c1ededbf4f03007be99 | 2,944 | ex | Elixir | lib/check.ex | jrbart/deeppipe2 | ac242f680c8a523dca0cd7bb1cbe7192823ee356 | [
"BSD-2-Clause"
] | 99 | 2020-02-12T23:15:57.000Z | 2022-01-09T08:05:29.000Z | lib/check.ex | jrbart/deeppipe2 | ac242f680c8a523dca0cd7bb1cbe7192823ee356 | [
"BSD-2-Clause"
] | 27 | 2020-03-01T09:54:55.000Z | 2021-09-18T21:38:43.000Z | lib/check.ex | jrbart/deeppipe2 | ac242f680c8a523dca0cd7bb1cbe7192823ee356 | [
"BSD-2-Clause"
] | 8 | 2020-04-19T22:14:32.000Z | 2021-03-12T07:05:10.000Z | defmodule Check do
import Network
alias Deeppipe, as: DP
alias Cumatrix, as: CM
@moduledoc """
gradient check
for debug
"""
# for grad confirmation
defnetwork test_network0(_x) do
_x
|> f(3, 3, 1, 2, {1, 1}, 0, 0.1, 0.1)
|> relu
|> f(3, 3, 2, 2, {1, 1}, 0, 0.1, 0.1)
|> relu
... | 20.303448 | 96 | 0.471128 |
21bff7f05fead3c0631865d426a17e8b70a2c34b | 2,782 | ex | Elixir | clients/elixir/generated/lib/swaggy_jenkins/model/free_style_project.ex | PankTrue/swaggy-jenkins | aca35a7cca6e1fcc08bd399e05148942ac2f514b | [
"MIT"
] | 23 | 2017-08-01T12:25:26.000Z | 2022-01-25T03:44:11.000Z | clients/elixir/generated/lib/swaggy_jenkins/model/free_style_project.ex | PankTrue/swaggy-jenkins | aca35a7cca6e1fcc08bd399e05148942ac2f514b | [
"MIT"
] | 35 | 2017-06-14T03:28:15.000Z | 2022-02-14T10:25:54.000Z | clients/elixir/generated/lib/swaggy_jenkins/model/free_style_project.ex | PankTrue/swaggy-jenkins | aca35a7cca6e1fcc08bd399e05148942ac2f514b | [
"MIT"
] | 11 | 2017-08-31T19:00:20.000Z | 2021-12-19T12:04:12.000Z | # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://openapi-generator.tech
# Do not edit the class manually.
defmodule SwaggyJenkins.Model.FreeStyleProject do
@moduledoc """
"""
@derive [Poison.Encoder]
defstruct [
:"_class",
:"name",
:"url",
... | 31.613636 | 101 | 0.658519 |
21bffc6655bdec34f00883da0c0e80bea8abde55 | 1,981 | exs | Elixir | test/hexpm/web/controllers/user_controller_test.exs | lau/hexpm | beee80f5358a356530debfea35ee65c3a0aa9b25 | [
"Apache-2.0"
] | null | null | null | test/hexpm/web/controllers/user_controller_test.exs | lau/hexpm | beee80f5358a356530debfea35ee65c3a0aa9b25 | [
"Apache-2.0"
] | null | null | null | test/hexpm/web/controllers/user_controller_test.exs | lau/hexpm | beee80f5358a356530debfea35ee65c3a0aa9b25 | [
"Apache-2.0"
] | null | null | null | defmodule Hexpm.Web.UserControllerTest do
use Hexpm.ConnCase, async: true
setup do
user1 = insert(:user)
user2 = insert(:user)
user3 = insert(:user)
organization1 = insert(:organization)
organization2 = insert(:organization)
owners = [build(:package_owner, user: user1)]
package1 = ins... | 25.075949 | 84 | 0.635033 |
21c01b6d688390a8f45f7420cc66a365035a449a | 1,370 | exs | Elixir | config/config.exs | alienware/mixpanel-writer | e7f09dc0eb733c1d8967a447f79d7ac8cd82e8b5 | [
"MIT"
] | null | null | null | config/config.exs | alienware/mixpanel-writer | e7f09dc0eb733c1d8967a447f79d7ac8cd82e8b5 | [
"MIT"
] | null | null | null | config/config.exs | alienware/mixpanel-writer | e7f09dc0eb733c1d8967a447f79d7ac8cd82e8b5 | [
"MIT"
] | 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
config :mixpanel_writer, MixpanelWriter.Repo,
adapter: Ecto.Adapters.Postgres,
database: "holonet_elixir",
username: "postgres",
password: "",
hostname: "localhost"
# Thi... | 33.414634 | 73 | 0.754015 |
21c022c56c2594a03a1d27060a2cf492c0c39e2a | 2,813 | exs | Elixir | benchmarks/benchmark.exs | amplifiedai/nebulex | fa788d9ae71ef0e4aba73f98953e98d8a7644a29 | [
"MIT"
] | null | null | null | benchmarks/benchmark.exs | amplifiedai/nebulex | fa788d9ae71ef0e4aba73f98953e98d8a7644a29 | [
"MIT"
] | null | null | null | benchmarks/benchmark.exs | amplifiedai/nebulex | fa788d9ae71ef0e4aba73f98953e98d8a7644a29 | [
"MIT"
] | null | null | null | ## Benchmarks
nodes = [:"node1@127.0.0.1", :"node2@127.0.0.1"]
Nebulex.Cluster.spawn(nodes)
alias Nebulex.NodeCase
alias Nebulex.TestCache.Cache
alias Nebulex.TestCache.Partitioned
# start local caches
{:ok, local_ets} = Cache.start_link(name: :cache_ets_bench)
{:ok, local_shards} = Cache.start_link(name: :cache_sha... | 26.28972 | 96 | 0.657305 |
21c0569ed44bdf1c49e16aff513846f07245f2db | 1,373 | ex | Elixir | test/support/data_case.ex | jacruzca/mango | 9978dc609ed1fc86aa40386e35fae06cb95f80fc | [
"MIT"
] | 121 | 2017-06-24T10:33:38.000Z | 2022-03-17T16:02:16.000Z | test/support/data_case.ex | jacruzca/mango | 9978dc609ed1fc86aa40386e35fae06cb95f80fc | [
"MIT"
] | 6 | 2017-06-24T22:48:21.000Z | 2018-03-17T01:20:32.000Z | test/support/data_case.ex | jacruzca/mango | 9978dc609ed1fc86aa40386e35fae06cb95f80fc | [
"MIT"
] | 29 | 2017-07-03T04:09:15.000Z | 2022-03-02T15:45:49.000Z | defmodule Mango.DataCase do
@moduledoc """
This module defines the setup for tests requiring
access to the application's data layer.
You may define functions here to be used as helpers in
your tests.
Finally, if the test case interacts with the database,
it cannot be async. For this reason, every test r... | 25.425926 | 77 | 0.677349 |
21c05c15d933142639fbb0f8e351d99e82a58e97 | 2,108 | ex | Elixir | clients/docs/lib/google_api/docs/v1/model/batch_update_document_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/docs/lib/google_api/docs/v1/model/batch_update_document_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/docs/lib/google_api/docs/v1/model/batch_update_document_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 39.773585 | 194 | 0.730076 |
21c05ef214af9378ce9339f38cd56cbfec2ef824 | 417 | ex | Elixir | prototypes/old_server/apps/server/lib/server/service/ping.ex | PJS4-projet-gestionnaire-de-contact/Gambett-Server | fa30a85ffa6da480e177d40364dd59f73f0ad892 | [
"MIT"
] | 5 | 2021-03-28T21:20:41.000Z | 2021-07-02T22:46:29.000Z | prototypes/old_server/apps/server/lib/server/service/ping.ex | PJS4-projet-gestionnaire-de-contact/Gambett-Server | fa30a85ffa6da480e177d40364dd59f73f0ad892 | [
"MIT"
] | null | null | null | prototypes/old_server/apps/server/lib/server/service/ping.ex | PJS4-projet-gestionnaire-de-contact/Gambett-Server | fa30a85ffa6da480e177d40364dd59f73f0ad892 | [
"MIT"
] | null | null | null | defmodule Server.Service.Ping do
require Logger
@behaviour Server.Service
def init(_opts, send_function) do
send_function.("HELLO????\n")
{:ok, 0}
end
def on_message(state, message, send_function) when message == "ping" do
send_function.("pong #{state}\n")
{:ok, state + 1}
end
def on_me... | 20.85 | 73 | 0.661871 |
21c068a2c1bf5e4d096095e30f40bab3585c6cac | 229 | exs | Elixir | apps/snitch_core/priv/repo/migrations/20190115093617_add_upn_field_to_products.exs | Acrecio/avia | 54d264fc179b5b5f17d174854bdca063e1d935e9 | [
"MIT"
] | 456 | 2018-09-20T02:40:59.000Z | 2022-03-07T08:53:48.000Z | apps/snitch_core/priv/repo/migrations/20190115093617_add_upn_field_to_products.exs | Acrecio/avia | 54d264fc179b5b5f17d174854bdca063e1d935e9 | [
"MIT"
] | 273 | 2018-09-19T06:43:43.000Z | 2021-08-07T12:58:26.000Z | apps/snitch_core/priv/repo/migrations/20190115093617_add_upn_field_to_products.exs | Acrecio/avia | 54d264fc179b5b5f17d174854bdca063e1d935e9 | [
"MIT"
] | 122 | 2018-09-26T16:32:46.000Z | 2022-03-13T11:44:19.000Z | defmodule Snitch.Repo.Migrations.AddUpnFieldToProducts do
use Ecto.Migration
def change do
alter table("snitch_products") do
add(:upn, :string)
end
create unique_index("snitch_products", [:upn])
end
end
| 19.083333 | 57 | 0.71179 |
21c086dd3e93fce3d1444719a40a4dcbb40e37f8 | 6,284 | ex | Elixir | lib/game/overworld/sector.ex | stevegrossi/ex_venture | e02d5a63fdb882d92cfb4af3e15f7b48ad7054aa | [
"MIT"
] | 1 | 2019-02-10T10:22:39.000Z | 2019-02-10T10:22:39.000Z | lib/game/overworld/sector.ex | stevegrossi/ex_venture | e02d5a63fdb882d92cfb4af3e15f7b48ad7054aa | [
"MIT"
] | null | null | null | lib/game/overworld/sector.ex | stevegrossi/ex_venture | e02d5a63fdb882d92cfb4af3e15f7b48ad7054aa | [
"MIT"
] | null | null | null | defmodule Game.Overworld.Sector do
@moduledoc """
Sector process
For information on the callbacks, see `Game.Environment`
"""
use GenServer
alias Game.Environment
alias Game.NPC
alias Game.Overworld
alias Game.Session
alias Game.Overworld.Sector.Implementation
alias Metrics.CommunicationInstrum... | 27.203463 | 86 | 0.627626 |
21c0873be343b260e8e4acbb4baf8addb6da31a4 | 247 | ex | Elixir | lib/xmlelixirstructs.ex | dkuhlman/xmlelixirstructs | 466b7c163703a1a8b9eb4553e3e3f7cf0404e53d | [
"BSD-3-Clause"
] | 1 | 2020-01-27T11:30:32.000Z | 2020-01-27T11:30:32.000Z | lib/xmlelixirstructs.ex | dkuhlman/xmlelixirstructs | 466b7c163703a1a8b9eb4553e3e3f7cf0404e53d | [
"BSD-3-Clause"
] | null | null | null | lib/xmlelixirstructs.ex | dkuhlman/xmlelixirstructs | 466b7c163703a1a8b9eb4553e3e3f7cf0404e53d | [
"BSD-3-Clause"
] | null | null | null | defmodule Xmlelixirstructs do
@moduledoc """
Documentation for Xmlelixirstructs.
"""
#import SweetXml
@doc """
Hello world.
## Examples
iex> Xmlelixirstructs.hello()
:world
"""
def hello do
:world
end
end
| 11.227273 | 37 | 0.619433 |
21c0c216620fd9785be004761eccc320deac4720 | 2,202 | ex | Elixir | banking_challenge_stone_umbrella/apps/banking_challenge_web/lib/banking_challenge_web/controllers/transaction_controller.ex | douxsalemk/banking_challenge_stone | 59c2790a0f14b68c2b25851c806ebc553227316d | [
"Apache-2.0"
] | null | null | null | banking_challenge_stone_umbrella/apps/banking_challenge_web/lib/banking_challenge_web/controllers/transaction_controller.ex | douxsalemk/banking_challenge_stone | 59c2790a0f14b68c2b25851c806ebc553227316d | [
"Apache-2.0"
] | null | null | null | banking_challenge_stone_umbrella/apps/banking_challenge_web/lib/banking_challenge_web/controllers/transaction_controller.ex | douxsalemk/banking_challenge_stone | 59c2790a0f14b68c2b25851c806ebc553227316d | [
"Apache-2.0"
] | null | null | null | defmodule BankingChallengeWeb.TransactionController do
@moduledoc """
Actions related to the transactions resource.
"""
use BankingChallengeWeb, :controller
# alias BankingChallenge.Accounts.Account
alias BankingChallenge.Transactions.Transaction
action_fallback BankingChallengeWeb.FallbackController
... | 25.905882 | 76 | 0.644868 |
21c0d9f27625a5200cabaacf89c307e67bc29b56 | 2,684 | exs | Elixir | config/dev.exs | shtanaka/elixir-transfer-control | 1b325a4c0c5ee10551515d7a440e503ed68d4ddf | [
"MIT"
] | null | null | null | config/dev.exs | shtanaka/elixir-transfer-control | 1b325a4c0c5ee10551515d7a440e503ed68d4ddf | [
"MIT"
] | 2 | 2021-03-10T02:00:57.000Z | 2021-05-10T21:22:39.000Z | config/dev.exs | shtanaka/elixir-transfer-control | 1b325a4c0c5ee10551515d7a440e503ed68d4ddf | [
"MIT"
] | null | null | null | use Mix.Config
# Configure your database
config :tfcon, Tfcon.Repo,
username: System.get_env("DB_USERNAME"),
password: System.get_env("DB_PASSWORD"),
database: System.get_env("DB_NAME"),
hostname: System.get_env("DB_HOST"),
port: System.get_env("DB_PORT"),
show_sensitive_data_on_connection_error: true,
p... | 28.553191 | 80 | 0.703055 |
21c128daf248a6a69b5e0c51f6ace5c00243ad25 | 1,081 | ex | Elixir | examples/test/support/conn_case.ex | sntran/live_map | 9c1fa5b29c4af9d59ad464d45a0e884f5f90a048 | [
"MIT"
] | 3 | 2021-11-28T18:17:05.000Z | 2021-12-19T01:35:13.000Z | examples/test/support/conn_case.ex | sntran/live_map | 9c1fa5b29c4af9d59ad464d45a0e884f5f90a048 | [
"MIT"
] | null | null | null | examples/test/support/conn_case.ex | sntran/live_map | 9c1fa5b29c4af9d59ad464d45a0e884f5f90a048 | [
"MIT"
] | null | null | null | defmodule LiveMapsWeb.ConnCase do
@moduledoc """
This module defines the test case to be used by
tests that require setting up a connection.
Such tests rely on `Phoenix.ConnTest` and also
import other functionality to make it easier
to build common data structures and query the data layer.
Finally, if t... | 28.447368 | 62 | 0.73543 |
21c132115a947db7902a93ef99879013f6163b0c | 6,614 | ex | Elixir | lib/credo/check/refactor/pipe_chain_start.ex | isaacsanders/credo | 5623570bb2e3944345f1bf11819ca613533b5e10 | [
"MIT"
] | null | null | null | lib/credo/check/refactor/pipe_chain_start.ex | isaacsanders/credo | 5623570bb2e3944345f1bf11819ca613533b5e10 | [
"MIT"
] | null | null | null | lib/credo/check/refactor/pipe_chain_start.ex | isaacsanders/credo | 5623570bb2e3944345f1bf11819ca613533b5e10 | [
"MIT"
] | 1 | 2020-06-30T16:32:44.000Z | 2020-06-30T16:32:44.000Z | defmodule Credo.Check.Refactor.PipeChainStart do
@moduledoc false
@checkdoc """
Pipes (`|>`) can become more readable by starting with a "raw" value.
So while this is easily comprehendable:
list
|> Enum.take(5)
|> Enum.shuffle
|> pick_winner()
This might be harder to read:
E... | 24.316176 | 91 | 0.590868 |
21c16bbc8767a4e5d95ba682ef32dac5a030e419 | 32,665 | ex | Elixir | lib/parent.ex | axelson/parent | d85e15a1d9129f4a9dec8a881a67fe50a6264910 | [
"MIT"
] | null | null | null | lib/parent.ex | axelson/parent | d85e15a1d9129f4a9dec8a881a67fe50a6264910 | [
"MIT"
] | null | null | null | lib/parent.ex | axelson/parent | d85e15a1d9129f4a9dec8a881a67fe50a6264910 | [
"MIT"
] | null | null | null | defmodule Parent do
@moduledoc """
Functions for implementing a parent process.
A parent process is a process that manages the lifecycle of its children. Typically the simplest
approach is to use higher-level abstractions, such as `Parent.Supervisor` or `Parent.GenServer`.
The common behaviour for every pare... | 37.806713 | 101 | 0.696678 |
21c1abce72c5c04cf468e014e905ba630a440c73 | 589 | ex | Elixir | Microsoft.Azure.Management.Network/lib/microsoft/azure/management/network/model/vpn_client_root_certificate.ex | chgeuer/ex_microsoft_azure_management | 99cd9f7f2ff1fdbe69ca5bac55b6e2af91ba3603 | [
"Apache-2.0"
] | 4 | 2018-09-29T03:43:15.000Z | 2021-04-01T18:30:46.000Z | Microsoft.Azure.Management.Network/lib/microsoft/azure/management/network/model/vpn_client_root_certificate.ex | chgeuer/ex_microsoft_azure_management | 99cd9f7f2ff1fdbe69ca5bac55b6e2af91ba3603 | [
"Apache-2.0"
] | null | null | null | Microsoft.Azure.Management.Network/lib/microsoft/azure/management/network/model/vpn_client_root_certificate.ex | chgeuer/ex_microsoft_azure_management | 99cd9f7f2ff1fdbe69ca5bac55b6e2af91ba3603 | [
"Apache-2.0"
] | null | null | null | # NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
defmodule Microsoft.Azure.Management.Network.Model.VpnClientRootCertificate do
@moduledoc """
VPN client root certificate of virtual network gateway
"... | 22.653846 | 97 | 0.730051 |
21c1b5c8ef330821f0ccbfaaa5379266a6517835 | 1,635 | exs | Elixir | test/workers/send_email_report_test.exs | wvffle/analytics | 2c0fd55bc67f74af1fe1e2641678d44e9fee61d5 | [
"MIT"
] | 2 | 2020-05-16T13:48:44.000Z | 2020-05-22T09:52:36.000Z | test/workers/send_email_report_test.exs | wvffle/analytics | 2c0fd55bc67f74af1fe1e2641678d44e9fee61d5 | [
"MIT"
] | null | null | null | test/workers/send_email_report_test.exs | wvffle/analytics | 2c0fd55bc67f74af1fe1e2641678d44e9fee61d5 | [
"MIT"
] | null | null | null | defmodule Plausible.Workers.SendEmailReportTest do
use Plausible.DataCase
use Bamboo.Test
alias Plausible.Workers.SendEmailReport
defp perform(args) do
SendEmailReport.new(args) |> Oban.insert!()
Oban.drain_queue(:send_email_reports)
end
describe "weekly reports" do
test "sends weekly report t... | 29.727273 | 92 | 0.629969 |
21c1c1ae19bc9c93b6859292d4ac251a5f61d195 | 771 | ex | Elixir | template/$PROJECT_NAME$/lib/$PROJECT_NAME$/web/gettext.ex | cas27/gen_template_phoenix_webpack | 53f92ea9f1eeca1874234b8bcd38f20f7aedbcbd | [
"MIT"
] | 3 | 2017-06-08T16:53:07.000Z | 2018-05-25T19:37:23.000Z | template/$PROJECT_NAME$/lib/$PROJECT_NAME$/web/gettext.ex | cas27/gen_template_phoenix_webpack | 53f92ea9f1eeca1874234b8bcd38f20f7aedbcbd | [
"MIT"
] | null | null | null | template/$PROJECT_NAME$/lib/$PROJECT_NAME$/web/gettext.ex | cas27/gen_template_phoenix_webpack | 53f92ea9f1eeca1874234b8bcd38f20f7aedbcbd | [
"MIT"
] | null | null | null | defmodule <%= @project_name_camel_case %>.Web.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 <%= @project_name_camel_case %>.Web.Gettext
... | 30.84 | 72 | 0.673152 |
21c20b91130ded824bfba09fb48ec8fef2e574f2 | 1,512 | ex | Elixir | clients/apigee/lib/google_api/apigee/v1/model/google_cloud_apigee_v1_integration_config.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/apigee/lib/google_api/apigee/v1/model/google_cloud_apigee_v1_integration_config.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/apigee/lib/google_api/apigee/v1/model/google_cloud_apigee_v1_integration_config.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 32.170213 | 120 | 0.75 |
21c25e3069369748e7b6b7bccd2cb30234a74890 | 450 | ex | Elixir | lib/weekday/integer.ex | eiel/weekday | 6eae830069a8f919d0972b143d6a75ce1c14e268 | [
"MIT"
] | null | null | null | lib/weekday/integer.ex | eiel/weekday | 6eae830069a8f919d0972b143d6a75ce1c14e268 | [
"MIT"
] | null | null | null | lib/weekday/integer.ex | eiel/weekday | 6eae830069a8f919d0972b143d6a75ce1c14e268 | [
"MIT"
] | null | null | null | defimpl Weekday, for: Integer do
@moduledoc """
Weekday support Integer
"""
@doc """
translate `int` to atom type day_of_week
## Examples
iex> Weekday.day_of_week(7)
:sunday
"""
@spec day_of_week(1..7) :: Weekday.t()
def day_of_week(int) do
case int do
1 -> :monday
2 ->... | 16.071429 | 42 | 0.548889 |
21c260406166c23048322787eae50a6e942284ec | 20,607 | ex | Elixir | lib/chart/barchart.ex | srowley/contex | 0e64e41916a6183c0df7d5b451090f3f4b4dada9 | [
"MIT"
] | null | null | null | lib/chart/barchart.ex | srowley/contex | 0e64e41916a6183c0df7d5b451090f3f4b4dada9 | [
"MIT"
] | null | null | null | lib/chart/barchart.ex | srowley/contex | 0e64e41916a6183c0df7d5b451090f3f4b4dada9 | [
"MIT"
] | null | null | null | defmodule Contex.BarChart do
@moduledoc """
Draws a barchart from a `Contex.Dataset`.
`Contex.BarChart` will attempt to create reasonable output with minimal input. The defaults are as follows:
- Bars will be drawn vertically (use `orientation/2` to override - options are `:horizontal` and `:vertical`)
- The... | 35.590674 | 300 | 0.689377 |
21c263f66951280c801d3a3ead5d4ce559049910 | 2,715 | ex | Elixir | lib/ex_web3_ec_recover/signed_type/message.ex | dagumak/ex_web3_ec_recover | fd82dedb00454ead67613fb56e94ef30086d5ab5 | [
"MIT"
] | 5 | 2021-12-31T11:02:31.000Z | 2022-01-31T09:26:40.000Z | lib/ex_web3_ec_recover/signed_type/message.ex | dagumak/ex_web3_ec_recover | fd82dedb00454ead67613fb56e94ef30086d5ab5 | [
"MIT"
] | 6 | 2022-01-05T05:13:42.000Z | 2022-03-30T22:19:23.000Z | lib/ex_web3_ec_recover/signed_type/message.ex | dagumak/ex_web3_ec_recover | fd82dedb00454ead67613fb56e94ef30086d5ab5 | [
"MIT"
] | 5 | 2022-01-03T14:19:59.000Z | 2022-03-30T21:17:14.000Z | defmodule ExWeb3EcRecover.SignedType.Message do
@moduledoc """
This module represents a message data structure that is used
to sign and recover, based on EIP 712.
## Domain
For details look at this [website](https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator).
```
- string name the use... | 33.109756 | 150 | 0.637937 |
21c2ac30683b73ba245edc2cb814f8b0a5afb4df | 15,254 | ex | Elixir | lib/phoenix_live_view/html_engine.ex | leductam/phoenix_live_view | 196e4ee72d357a8a45b8d940bfaf06d35daa8f28 | [
"MIT"
] | null | null | null | lib/phoenix_live_view/html_engine.ex | leductam/phoenix_live_view | 196e4ee72d357a8a45b8d940bfaf06d35daa8f28 | [
"MIT"
] | null | null | null | lib/phoenix_live_view/html_engine.ex | leductam/phoenix_live_view | 196e4ee72d357a8a45b8d940bfaf06d35daa8f28 | [
"MIT"
] | null | null | null | defmodule Phoenix.LiveView.HTMLEngine do
@moduledoc """
The HTMLEngine that powers `.heex` templates and the `~H` sigil.
"""
alias Phoenix.LiveView.HTMLTokenizer
@behaviour Phoenix.Template.Engine
# TODO: Use @impl true instead of @doc false when we require Elixir v1.12
@doc false
def compile(path, ... | 28.672932 | 96 | 0.617805 |
21c2bdb17a2833aecfcff19d7233a191656e6d53 | 1,245 | ex | Elixir | lib/astarte_rpc/protocol.ex | Annopaolo/astarte_rpc | cd720004d225631f41d6f4d7f964aecb92b52849 | [
"Apache-2.0"
] | 3 | 2018-02-02T14:07:03.000Z | 2020-02-10T07:12:39.000Z | lib/astarte_rpc/protocol.ex | Annopaolo/astarte_rpc | cd720004d225631f41d6f4d7f964aecb92b52849 | [
"Apache-2.0"
] | 49 | 2018-02-02T10:00:30.000Z | 2022-03-22T10:39:10.000Z | lib/astarte_rpc/protocol.ex | Annopaolo/astarte_rpc | cd720004d225631f41d6f4d7f964aecb92b52849 | [
"Apache-2.0"
] | 5 | 2018-02-02T09:58:07.000Z | 2021-04-07T08:53:44.000Z | #
# This file is part of Astarte.
#
# Copyright 2018 Ispirata Srl
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | 28.953488 | 84 | 0.716466 |
21c2bfef3c07d6bb8d4c9c7bb471f2dc3c1ac54d | 777 | ex | Elixir | lib/ash/error/invalid/multiple_results.ex | smt116/ash | 880a17f197873eb1c8dc8d81a8b4d6d9cb570b3f | [
"MIT"
] | 528 | 2019-12-08T01:51:54.000Z | 2022-03-30T10:09:45.000Z | lib/ash/error/invalid/multiple_results.ex | smt116/ash | 880a17f197873eb1c8dc8d81a8b4d6d9cb570b3f | [
"MIT"
] | 278 | 2019-12-04T15:25:06.000Z | 2022-03-31T03:40:51.000Z | lib/ash/error/invalid/multiple_results.ex | smt116/ash | 880a17f197873eb1c8dc8d81a8b4d6d9cb570b3f | [
"MIT"
] | 53 | 2020-08-17T22:08:09.000Z | 2022-03-24T01:58:59.000Z | defmodule Ash.Error.Invalid.MultipleResults do
@moduledoc "Used when multiple requests with the same path are passed to the internal engine"
use Ash.Error.Exception
def_ash_error([:count, :at_least?], class: :invalid)
defimpl Ash.ErrorKind do
def id(_), do: Ash.UUID.generate()
def code(_), do: "multi... | 27.75 | 95 | 0.656371 |
21c2e68d893944886b51f73296b4049b350b6366 | 25,382 | ex | Elixir | lib/tune/spotify/session/http.ex | nickgnd/tune | 7244d2ff318c68b4712d24871ac26b009e0933ae | [
"MIT"
] | 206 | 2020-08-23T17:50:03.000Z | 2022-03-28T04:39:01.000Z | lib/tune/spotify/session/http.ex | nickgnd/tune | 7244d2ff318c68b4712d24871ac26b009e0933ae | [
"MIT"
] | 112 | 2020-08-21T08:26:38.000Z | 2022-03-31T06:11:06.000Z | lib/tune/spotify/session/http.ex | mateuszkwiatkowski/tune | 9a929e30fa20581349385ac8be0db5eb88036a36 | [
"MIT"
] | 15 | 2020-08-25T02:30:23.000Z | 2021-12-16T14:19:35.000Z | defmodule Tune.Spotify.Session.HTTP do
@moduledoc """
This module implements a state machine mapped to a user session, wrapping
interaction with the Spotify API.
## General structure
The state machine implements the `Tune.Spotify.Session` behaviour for its public API
and uses `GenStateMachine` to model it... | 31.143558 | 99 | 0.608896 |
21c340f356c7c49c04da957d1ef56678932a7e5f | 3,894 | exs | Elixir | benchmark/crc.exs | kianmeng/ex_aliyun_ots | 554da4a80b7d59640f1b8aed75c2ff81678f0c4d | [
"MIT"
] | null | null | null | benchmark/crc.exs | kianmeng/ex_aliyun_ots | 554da4a80b7d59640f1b8aed75c2ff81678f0c4d | [
"MIT"
] | null | null | null | benchmark/crc.exs | kianmeng/ex_aliyun_ots | 554da4a80b7d59640f1b8aed75c2ff81678f0c4d | [
"MIT"
] | null | null | null | defmodule ExAliyunOts.Old.CRC do
use Bitwise
@crc8_table [0x00, 0x07, 0x0e, 0x09, 0x1c, 0x1b, 0x12, 0x15,
0x38, 0x3f, 0x36, 0x31, 0x24, 0x23, 0x2a, 0x2d,
0x70, 0x77, 0x7e, 0x79, 0x6c, 0x6b, 0x62, 0x65,
0x48, 0x4f, 0x46, 0x41, 0x54, 0x53, 0x5a, 0x5d,
0xe0, 0x... | 33.568966 | 141 | 0.549563 |
21c3608c4dc45481e5453efffe1d6fe1911e984b | 1,564 | ex | Elixir | fisherman_server/lib/fisherman_server_web/router.ex | henrysdev/Fisherman | 57bc51730cedb84a47807e2d617061f2cfe54ffd | [
"MIT"
] | 1 | 2020-05-14T06:07:21.000Z | 2020-05-14T06:07:21.000Z | fisherman_server/lib/fisherman_server_web/router.ex | henrysdev/Fisherman | 57bc51730cedb84a47807e2d617061f2cfe54ffd | [
"MIT"
] | 19 | 2020-05-04T17:29:44.000Z | 2020-07-05T18:15:10.000Z | fisherman_server/lib/fisherman_server_web/router.ex | henrysdev/Fisherman | 57bc51730cedb84a47807e2d617061f2cfe54ffd | [
"MIT"
] | null | null | null | defmodule FishermanServerWeb.Router do
use FishermanServerWeb, :router
import Phoenix.LiveView.Router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
plug :put_root_layout, {FishermanServerWeb.L... | 26.508475 | 72 | 0.705882 |
21c36270fbecd8cc1b8cd39f528ebb45f429fa1a | 1,543 | ex | Elixir | clients/translate/lib/google_api/translate/v3/model/empty.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/translate/lib/google_api/translate/v3/model/empty.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/translate/lib/google_api/translate/v3/model/empty.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... | 30.86 | 76 | 0.742061 |
21c3735e10b070037000132a36abb038e1881421 | 386 | ex | Elixir | lib/api/fake.ex | hectorperez/amplitude_ex | 4df519f2e8edfefcc61e5732da1f3b1190bec293 | [
"BSD-3-Clause"
] | null | null | null | lib/api/fake.ex | hectorperez/amplitude_ex | 4df519f2e8edfefcc61e5732da1f3b1190bec293 | [
"BSD-3-Clause"
] | null | null | null | lib/api/fake.ex | hectorperez/amplitude_ex | 4df519f2e8edfefcc61e5732da1f3b1190bec293 | [
"BSD-3-Clause"
] | null | null | null | defmodule Amplitude.API.Fake do
defp priv(path) do
priv =
:code.priv_dir(:amplitude)
|> to_string
priv <> "/mock" <> path
end
defp load(path) do
with {:ok, content} <- File.read(priv(path)),
do: Poison.decode(content)
end
def api_track(_, _), do: load("/track/response.txt")... | 21.444444 | 60 | 0.61658 |
21c3779ca870f618e09407aa1c6cbf36a6681099 | 57 | ex | Elixir | hello/web/views/hello_view.ex | benjohns1/phoenix-sandbox | 58fa6650828882f684a37de7af48d9fb6bd39f59 | [
"MIT"
] | null | null | null | hello/web/views/hello_view.ex | benjohns1/phoenix-sandbox | 58fa6650828882f684a37de7af48d9fb6bd39f59 | [
"MIT"
] | null | null | null | hello/web/views/hello_view.ex | benjohns1/phoenix-sandbox | 58fa6650828882f684a37de7af48d9fb6bd39f59 | [
"MIT"
] | null | null | null | defmodule Hello.HelloView do
use Hello.Web, :view
end | 19 | 29 | 0.754386 |
21c37dd00f505913558fefec67d7823ac807b94f | 62,347 | ex | Elixir | lib/money.ex | Doerge/money | 10af920a2405a789a15645e67d7810e51d5cbff0 | [
"Apache-2.0"
] | null | null | null | lib/money.ex | Doerge/money | 10af920a2405a789a15645e67d7810e51d5cbff0 | [
"Apache-2.0"
] | null | null | null | lib/money.ex | Doerge/money | 10af920a2405a789a15645e67d7810e51d5cbff0 | [
"Apache-2.0"
] | null | null | null | defmodule Money do
@moduledoc """
Money implements a set of functions to store, retrieve, convert and perform
arithmetic on a `Money.t` type that is composed of a currency code and
a decimal currency amount.
Money is very opinionated in the interests of serving as a dependable library
that can underpin acc... | 29.367405 | 216 | 0.649638 |
21c3b2e89c01437c780f63cf8f6209badb933895 | 1,010 | ex | Elixir | chapter3/challenges/mealcon/lib/mealcon/application.ex | mCodex/rocketseat-ignite-elixir | bdb48db778c36b2325c75a41b4d6f7ef77b03cf5 | [
"MIT"
] | 1 | 2021-07-23T19:48:27.000Z | 2021-07-23T19:48:27.000Z | chapter3/challenges/mealcon/lib/mealcon/application.ex | mCodex/rocketseat-ignite-elixir | bdb48db778c36b2325c75a41b4d6f7ef77b03cf5 | [
"MIT"
] | null | null | null | chapter3/challenges/mealcon/lib/mealcon/application.ex | mCodex/rocketseat-ignite-elixir | bdb48db778c36b2325c75a41b4d6f7ef77b03cf5 | [
"MIT"
] | null | null | null | defmodule Mealcon.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
children = [
# Start the Ecto repository
Mealcon.Repo,
# Start the Telemetry supervisor
Mealcon... | 28.857143 | 65 | 0.70198 |
21c3bfbbe68ffdbfea5869fa25753def895d868e | 739 | ex | Elixir | lib/ex_ftx/orders/cancel_by_client_order_id.ex | RaghavSood/ex_ftx | 257ba35221abe4957836eb6e8312ecae0d9d51aa | [
"MIT"
] | 3 | 2021-09-27T17:19:41.000Z | 2022-03-16T09:28:13.000Z | lib/ex_ftx/orders/cancel_by_client_order_id.ex | RaghavSood/ex_ftx | 257ba35221abe4957836eb6e8312ecae0d9d51aa | [
"MIT"
] | 3 | 2021-07-28T19:53:02.000Z | 2021-09-27T15:48:38.000Z | lib/ex_ftx/orders/cancel_by_client_order_id.ex | RaghavSood/ex_ftx | 257ba35221abe4957836eb6e8312ecae0d9d51aa | [
"MIT"
] | 4 | 2021-08-01T11:25:58.000Z | 2021-10-11T22:15:44.000Z | defmodule ExFtx.Orders.CancelByClientOrderId do
alias ExFtx.JsonResponse
@type credentials :: ExFtx.Credentials.t()
@type result :: :ok | {:error, String.t() | :unhandled_result}
@spec delete(credentials, ExFtx.OrderPayload.client_id()) :: result
def delete(credentials, client_order_id) do
"/orders/by_c... | 28.423077 | 77 | 0.691475 |
21c3d8862163c27242e05e8aa54dc58a6a827363 | 552 | ex | Elixir | lib/hubby_web/views/changeset_view.ex | alissonfpmorais/hubby | 5e8510f4cd30aca1f36864119240ec54f7069b5b | [
"MIT"
] | null | null | null | lib/hubby_web/views/changeset_view.ex | alissonfpmorais/hubby | 5e8510f4cd30aca1f36864119240ec54f7069b5b | [
"MIT"
] | null | null | null | lib/hubby_web/views/changeset_view.ex | alissonfpmorais/hubby | 5e8510f4cd30aca1f36864119240ec54f7069b5b | [
"MIT"
] | null | null | null | defmodule HubbyWeb.ChangesetView do
use HubbyWeb, :view
@doc """
Traverses and translates changeset errors.
See `Ecto.Changeset.traverse_errors/2` and
`HubbyWeb.ErrorHelpers.translate_error/1` for more details.
"""
def translate_errors(changeset) do
Ecto.Changeset.traverse_errors(changeset, &transla... | 27.6 | 65 | 0.735507 |
21c44f1c10f018665da4725303a592fa84872f1b | 931 | ex | Elixir | elixir/rocketpay/lib/rocketpay/users/create.ex | andredezzy/rocketseat-nextlevel-04 | 5d54631a58ae57f6c43d8ea11c9aa32054c1acfd | [
"MIT"
] | null | null | null | elixir/rocketpay/lib/rocketpay/users/create.ex | andredezzy/rocketseat-nextlevel-04 | 5d54631a58ae57f6c43d8ea11c9aa32054c1acfd | [
"MIT"
] | null | null | null | elixir/rocketpay/lib/rocketpay/users/create.ex | andredezzy/rocketseat-nextlevel-04 | 5d54631a58ae57f6c43d8ea11c9aa32054c1acfd | [
"MIT"
] | null | null | null | defmodule Rocketpay.Users.Create do
alias Ecto.Multi
alias Rocketpay.{Repo, User, Account}
def call(params) do
Multi.new()
|> Multi.insert(:create_user, User.changeset(params))
|> Multi.run(:create_account, fn repo, %{create_user: user} -> insert_account(repo, user) end)
|> Multi.run(:preload_dat... | 25.861111 | 98 | 0.66058 |
21c4710fca1201291747aab4d0849c30c48cfd94 | 10,434 | ex | Elixir | lib/chat_api_web/controllers/slack_controller.ex | jalford14/papercups | fbe5e5ce4ff51702a0f898c39a9be47c33e9cb4a | [
"MIT"
] | null | null | null | lib/chat_api_web/controllers/slack_controller.ex | jalford14/papercups | fbe5e5ce4ff51702a0f898c39a9be47c33e9cb4a | [
"MIT"
] | null | null | null | lib/chat_api_web/controllers/slack_controller.ex | jalford14/papercups | fbe5e5ce4ff51702a0f898c39a9be47c33e9cb4a | [
"MIT"
] | null | null | null | defmodule ChatApiWeb.SlackController do
use ChatApiWeb, :controller
require Logger
alias ChatApi.{Conversations, Slack, SlackAuthorizations}
alias ChatApi.SlackAuthorizations.SlackAuthorization
action_fallback(ChatApiWeb.FallbackController)
@spec oauth(Plug.Conn.t(), map()) :: Plug.Conn.t()
def oauth(... | 34.896321 | 173 | 0.630343 |
21c47b96120019067862eb97e3d84caf103d1ee5 | 1,889 | exs | Elixir | apps/mishka_database/priv/repo/migrations/20210329064603_blog_categories.exs | mojtaba-naserei/mishka-cms | 1f31f61347bab1aae6ba0d47c5515a61815db6c9 | [
"Apache-2.0"
] | 35 | 2021-06-26T09:05:50.000Z | 2022-03-30T15:41:22.000Z | apps/mishka_database/priv/repo/migrations/20210329064603_blog_categories.exs | iArazar/mishka-cms | 8b579101d607d91e80834527c1508fe5f4ceefef | [
"Apache-2.0"
] | 101 | 2021-01-01T09:54:07.000Z | 2022-03-28T10:02:24.000Z | apps/mishka_database/priv/repo/migrations/20210329064603_blog_categories.exs | iArazar/mishka-cms | 8b579101d607d91e80834527c1508fe5f4ceefef | [
"Apache-2.0"
] | 8 | 2021-01-17T17:08:07.000Z | 2022-03-11T16:12:06.000Z | defmodule MishkaDatabase.Repo.Migrations.BlogCategories do
use Ecto.Migration
def change do
create table(:blog_categories, primary_key: false) do
add(:id, :uuid, primary_key: true)
# Category basic info
add(:title, :string, size: 200, null: false)
add(:short_description, :string, size:... | 34.981481 | 62 | 0.641609 |
21c4d797b016493bbb84a741cd9c4387db2da121 | 12,418 | ex | Elixir | lib/elixir/lib/task/supervisor.ex | tmbb/exdocs_makedown_demo | 6a0039c54d2fa10d79c080efcef8d70d359678f8 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/task/supervisor.ex | tmbb/exdocs_makedown_demo | 6a0039c54d2fa10d79c080efcef8d70d359678f8 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/task/supervisor.ex | tmbb/exdocs_makedown_demo | 6a0039c54d2fa10d79c080efcef8d70d359678f8 | [
"Apache-2.0"
] | null | null | null | defmodule Task.Supervisor do
@moduledoc """
A task supervisor.
This module defines a supervisor which can be used to dynamically
supervise tasks.
`start_link/1` can be used to start the supervisor. See the `Task`
module for more examples.
## Name registration
A `Task.Supervisor` is bound to the same... | 38.80625 | 98 | 0.698583 |
21c4f4b6fec396bc363e64df21ae94213db81455 | 941 | ex | Elixir | Chapter11/todo_env/lib/todo/database.ex | benjamindburke/elixir-studies | 65231b5af83dcf701041cae2879107c3bd3e5078 | [
"Unlicense"
] | null | null | null | Chapter11/todo_env/lib/todo/database.ex | benjamindburke/elixir-studies | 65231b5af83dcf701041cae2879107c3bd3e5078 | [
"Unlicense"
] | null | null | null | Chapter11/todo_env/lib/todo/database.ex | benjamindburke/elixir-studies | 65231b5af83dcf701041cae2879107c3bd3e5078 | [
"Unlicense"
] | null | null | null | # Todo Database [supervisor]
# This module supervises the creation of database workers
defmodule Todo.Database do
# ---------
# Interface functions
# ---------
def store(key, data) do
:poolboy.transaction(
__MODULE__,
fn worker_pid -> Todo.DatabaseWorker.store(worker_pid, key, data) end
)
... | 21.883721 | 75 | 0.624867 |
21c53cf42ae26befddf0b23b96573a53e0962956 | 40,359 | ex | Elixir | plugins/ucc_chat/lib/ucc_chat/services/channel_service.ex | josephkabraham/ucx_ucc | 0dbd9e3eb5940336b4870cff033482ceba5f6ee7 | [
"MIT"
] | null | null | null | plugins/ucc_chat/lib/ucc_chat/services/channel_service.ex | josephkabraham/ucx_ucc | 0dbd9e3eb5940336b4870cff033482ceba5f6ee7 | [
"MIT"
] | null | null | null | plugins/ucc_chat/lib/ucc_chat/services/channel_service.ex | josephkabraham/ucx_ucc | 0dbd9e3eb5940336b4870cff033482ceba5f6ee7 | [
"MIT"
] | null | null | null | defmodule UccChat.ChannelService do
@moduledoc """
Helper functions used by the controller, channel, and model for Channels
"""
use UccChat.Shared, :service
import Ecto.Query
import UccChat.NotifierService
alias UccChat.Schema.Channel, as: ChannelSchema
alias UccChat.{
Channel, Subscription, UserS... | 30.761433 | 108 | 0.629252 |
21c54e89ff219dc5ceee893cfab08642f41ba46e | 545 | ex | Elixir | lib/upside_down_leds/application.ex | CraigCottingham/UpsideDownLEDs | 129fc0aa9ac1cdb7dd144aa9c40fd0b5c449615e | [
"MIT"
] | 2 | 2016-12-02T16:19:25.000Z | 2017-01-06T00:38:43.000Z | lib/upside_down_leds/application.ex | CraigCottingham/UpsideDownLEDs | 129fc0aa9ac1cdb7dd144aa9c40fd0b5c449615e | [
"MIT"
] | 2 | 2019-12-28T04:01:00.000Z | 2021-04-30T13:12:02.000Z | lib/upside_down_leds/application.ex | CraigCottingham/UpsideDownLEDs | 129fc0aa9ac1cdb7dd144aa9c40fd0b5c449615e | [
"MIT"
] | 1 | 2018-03-17T05:50:40.000Z | 2018-03-17T05:50:40.000Z | defmodule UpsideDownLeds.Application do
use Application
require Logger
# See http://elixir-lang.org/docs/stable/elixir/Application.html
# for more information on OTP Applications
def start(_type, _args) do
Logger.info("Starting BlinkingLights process")
{:ok, lights} = UpsideDownLeds.BlinkingLights.s... | 30.277778 | 132 | 0.744954 |
21c5630cd0b6a88bc4483fed875237aa189c85bc | 60 | ex | Elixir | lib/hello_web/views/company_view.ex | suhaschitade/AppoRemind | 64ed7123e7e5e2c40e398597c61d0a45db0cae50 | [
"MIT"
] | null | null | null | lib/hello_web/views/company_view.ex | suhaschitade/AppoRemind | 64ed7123e7e5e2c40e398597c61d0a45db0cae50 | [
"MIT"
] | null | null | null | lib/hello_web/views/company_view.ex | suhaschitade/AppoRemind | 64ed7123e7e5e2c40e398597c61d0a45db0cae50 | [
"MIT"
] | null | null | null | defmodule HelloWeb.CompanyView do
use HelloWeb, :view
end
| 15 | 33 | 0.8 |
21c5885b8404d4b039101a996215d510be2a08f0 | 1,356 | exs | Elixir | config/dev.exs | ZURASTA/bonbon | 231888326535a11aa7e7c4ed93e0a0ba01411d95 | [
"BSD-2-Clause"
] | 1 | 2017-06-15T11:20:27.000Z | 2017-06-15T11:20:27.000Z | config/dev.exs | ScrimpyCat/bonbon | 231888326535a11aa7e7c4ed93e0a0ba01411d95 | [
"BSD-2-Clause"
] | null | null | null | config/dev.exs | ScrimpyCat/bonbon | 231888326535a11aa7e7c4ed93e0a0ba01411d95 | [
"BSD-2-Clause"
] | 2 | 2017-07-25T10:16:19.000Z | 2017-08-02T06:54:22.000Z | use Mix.Config
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with brunch.io to recompile .js and .css sources.
config :bonbon, Bonbon.Endpoint,
http: [port: 4000]... | 30.818182 | 146 | 0.738938 |
21c58d378a2fa3ac86a93a55ed0cb32ae35cbd90 | 18,820 | exs | Elixir | test/elixir/test/reduce_test.exs | aogier/couchdb | 0c7111c49932e742981145b88389f7bdcfda5ee6 | [
"Apache-2.0"
] | 1 | 2017-07-05T18:50:12.000Z | 2017-07-05T18:50:12.000Z | test/elixir/test/reduce_test.exs | aogier/couchdb | 0c7111c49932e742981145b88389f7bdcfda5ee6 | [
"Apache-2.0"
] | 1 | 2017-09-05T15:46:20.000Z | 2017-09-05T15:46:20.000Z | test/elixir/test/reduce_test.exs | garrensmith/couchdb | 25838d078b1cf8ef5554f41c0b51d8628ca712ba | [
"Apache-2.0"
] | null | null | null | defmodule ReduceTest do
use CouchTestCase
@moduletag :views
@moduledoc """
Test CouchDB view reduces
This is a port of the reduce.js suite
"""
def summate(n) do
(n + 1) * n / 2
end
@tag :with_db
test "Basic reduce functions", context do
db_name = context[:db_name]
view_url = "/#{db_n... | 29.778481 | 104 | 0.538257 |
21c5938384d25414dfb5312dc744b00cfe22d1bb | 1,025 | ex | Elixir | apps/rig/lib/rig/session_hub.ex | arana3/reactive-interaction-gateway | 793648bcc5b8b05fc53df1f5f97818fb40ca84be | [
"Apache-2.0"
] | null | null | null | apps/rig/lib/rig/session_hub.ex | arana3/reactive-interaction-gateway | 793648bcc5b8b05fc53df1f5f97818fb40ca84be | [
"Apache-2.0"
] | 132 | 2018-11-26T14:00:54.000Z | 2022-03-11T04:17:54.000Z | apps/rig/lib/rig/session_hub.ex | arana3/reactive-interaction-gateway | 793648bcc5b8b05fc53df1f5f97818fb40ca84be | [
"Apache-2.0"
] | null | null | null | defmodule Rig.SessionHub do
@moduledoc """
Tracking sessions and sending signals to kill off connections.
"""
require Logger
@group_prefix "rig::session::"
@doc "Joins (or creates) a session."
@spec join(pid :: pid(), session_name :: String.t()) :: :ok
def join(pid, session_name) do
group = @group... | 25.625 | 72 | 0.633171 |
21c599ba2ba393513662504d6e533036720f8b1d | 1,885 | ex | Elixir | lib/mix/lib/mix/shell.ex | MSch/elixir | fc42dc9bb76ec1fdcfcbdbfb11fea6a845a62fca | [
"Apache-2.0"
] | 1 | 2017-09-09T20:59:04.000Z | 2017-09-09T20:59:04.000Z | lib/mix/lib/mix/shell.ex | bruce/elixir | d77ccf941541959079e5f677f8717da24b486fac | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/shell.ex | bruce/elixir | d77ccf941541959079e5f677f8717da24b486fac | [
"Apache-2.0"
] | null | null | null | defmodule Mix.Shell do
@moduledoc """
Defines Mix.Shell contract.
"""
use Behaviour
@doc """
Informs the given message.
"""
defcallback info(message :: binary) :: any
@doc """
Warns about the given error message.
"""
defcallback error(message :: binary) :: any
@doc """
Asks the user for ... | 24.802632 | 106 | 0.592042 |
21c5b1430cc12d9254caccf5a209aa177e62d228 | 3,217 | exs | Elixir | test/api/groups_test.exs | connorlay/hue_sdk | f69e038c7f6527277f2ef13c92eb10c5d98b6ba8 | [
"MIT"
] | 4 | 2021-03-22T16:50:55.000Z | 2021-07-09T11:42:08.000Z | test/api/groups_test.exs | connorlay/hue_sdk | f69e038c7f6527277f2ef13c92eb10c5d98b6ba8 | [
"MIT"
] | null | null | null | test/api/groups_test.exs | connorlay/hue_sdk | f69e038c7f6527277f2ef13c92eb10c5d98b6ba8 | [
"MIT"
] | null | null | null | defmodule HueSDK.API.GroupsTest do
alias HueSDK.API.Groups
use HueSDK.BypassCase, async: true
@json_resp %{"1" => %{"name" => "example"}}
@http_error %Mint.TransportError{reason: :econnrefused}
describe "get_all_groups/1" do
test "returns parsed JSON if the request succeeds", %{bypass: bypass, bridge: ... | 36.977011 | 92 | 0.655891 |
21c5c48d3b58ef31c3cf589a29212e40fba9176e | 2,498 | exs | Elixir | test/engine/health_test.exs | mbta/realtime_signs | 3fd8cbc26ce2b0820e608e60fe12135dab5def69 | [
"MIT"
] | 1 | 2022-01-24T12:39:05.000Z | 2022-01-24T12:39:05.000Z | test/engine/health_test.exs | mbta/realtime_signs | 3fd8cbc26ce2b0820e608e60fe12135dab5def69 | [
"MIT"
] | 40 | 2021-05-05T10:14:25.000Z | 2022-03-31T18:34:15.000Z | test/engine/health_test.exs | mbta/realtime_signs | 3fd8cbc26ce2b0820e608e60fe12135dab5def69 | [
"MIT"
] | 1 | 2022-03-20T21:08:12.000Z | 2022-03-20T21:08:12.000Z | defmodule Engine.HealthTest do
use ExUnit.Case, async: true
import ExUnit.CaptureLog
import Mox
require Logger
setup :verify_on_exit!
test "logs pool stats" do
{:ok, _pid} = Engine.Health.start_link(period_ms: 500)
log =
capture_log(fn ->
Process.sleep(600)
end)
assert lo... | 23.566038 | 74 | 0.620496 |
21c5da6f9be5ac9f67f6439c4a3ef8817c665f00 | 1,098 | ex | Elixir | lib/phoenix_live_vue_test_web/channels/user_socket.ex | tfwright/phoenix_live_vue_test | f560401c28fdf0132c33e4943a80357110d16160 | [
"MIT"
] | null | null | null | lib/phoenix_live_vue_test_web/channels/user_socket.ex | tfwright/phoenix_live_vue_test | f560401c28fdf0132c33e4943a80357110d16160 | [
"MIT"
] | 1 | 2021-05-11T13:17:32.000Z | 2021-05-11T13:17:32.000Z | lib/phoenix_live_vue_test_web/channels/user_socket.ex | tfwright/phoenix_live_vue_test | f560401c28fdf0132c33e4943a80357110d16160 | [
"MIT"
] | null | null | null | defmodule PhoenixLiveVueTestWeb.UserSocket do
use Phoenix.Socket
## Channels
# channel "room:*", PhoenixLiveVueTestWeb.RoomChannel
# Socket params are passed from the client and can
# be used to verify and authenticate a user. After
# verification, you can put default assigns into
# the socket that will... | 32.294118 | 93 | 0.705829 |
21c5dc927399671e88a68751da6813f45c054658 | 1,880 | ex | Elixir | src/mailer/lib/mailer/directory.ex | alexjoybc/elixir-kafka-phoenix | c3d20415f980455081102f3bd4287647bf2292ba | [
"Apache-2.0"
] | null | null | null | src/mailer/lib/mailer/directory.ex | alexjoybc/elixir-kafka-phoenix | c3d20415f980455081102f3bd4287647bf2292ba | [
"Apache-2.0"
] | null | null | null | src/mailer/lib/mailer/directory.ex | alexjoybc/elixir-kafka-phoenix | c3d20415f980455081102f3bd4287647bf2292ba | [
"Apache-2.0"
] | null | null | null | defmodule Mailer.Directory do
@moduledoc """
The Directory context.
"""
import Ecto.Query, warn: false
alias Mailer.Repo
alias Mailer.Directory.Business
@doc """
Returns the list of businesses.
## Examples
iex> list_businesses()
[%Business{}, ...]
"""
def list_businesses do
R... | 17.904762 | 63 | 0.612766 |
21c5eaf375907781211dd2aeca91a3ff5da4705f | 2,661 | exs | Elixir | test/phone/b_countries/br_test.exs | net/phone | 18e1356d2f8d32fe3f95638c3c44bceab0164fb2 | [
"Apache-2.0"
] | null | null | null | test/phone/b_countries/br_test.exs | net/phone | 18e1356d2f8d32fe3f95638c3c44bceab0164fb2 | [
"Apache-2.0"
] | null | null | null | test/phone/b_countries/br_test.exs | net/phone | 18e1356d2f8d32fe3f95638c3c44bceab0164fb2 | [
"Apache-2.0"
] | null | null | null | defmodule Phone.BRTest do
use ExUnit.Case, async: true
main_module = Phone.BR
all_modules = [
Phone.BR.AC, Phone.BR.AL, Phone.BR.AM, Phone.BR.AP, Phone.BR.BA,
Phone.BR.CE, Phone.BR.DF, Phone.BR.ES, Phone.BR.GO, Phone.BR.MA,
Phone.BR.MT, Phone.BR.MS, Phone.BR.MG, Phone.BR.PA, Phone.BR.PB,
Phone.B... | 38.565217 | 81 | 0.615182 |
21c60b8755e9db6c818a13600da587d4cd3c96de | 1,569 | ex | Elixir | web/web.ex | OpenFermentor/Local-Monitor | 4b356e8ac3f154ec72bdd23b3a501d5f1645241c | [
"MIT"
] | null | null | null | web/web.ex | OpenFermentor/Local-Monitor | 4b356e8ac3f154ec72bdd23b3a501d5f1645241c | [
"MIT"
] | null | null | null | web/web.ex | OpenFermentor/Local-Monitor | 4b356e8ac3f154ec72bdd23b3a501d5f1645241c | [
"MIT"
] | null | null | null | defmodule BioMonitor.Web do
@moduledoc """
A module that keeps using definitions for controllers,
views and so on.
This can be used in your application as:
use BioMonitor.Web, :controller
use BioMonitor.Web, :view
The definitions below will be executed for every view,
controller, etc, so keep... | 19.860759 | 88 | 0.674952 |
21c61dcc7fa2b8ffb4966cdc04e15c06bfe3c0a1 | 2,492 | ex | Elixir | clients/tool_results/lib/google_api/tool_results/v1beta3/model/android_test.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/tool_results/lib/google_api/tool_results/v1beta3/model/android_test.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/tool_results/lib/google_api/tool_results/v1beta3/model/android_test.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... | 39.555556 | 120 | 0.760032 |
21c62bb10c17e10862efc0aff198df883b014a17 | 26,621 | ex | Elixir | lib/elixir/lib/access.ex | michalmuskala/elixir | 097de7d308ac40747b4524e266558a3d9498a60b | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/access.ex | michalmuskala/elixir | 097de7d308ac40747b4524e266558a3d9498a60b | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/access.ex | michalmuskala/elixir | 097de7d308ac40747b4524e266558a3d9498a60b | [
"Apache-2.0"
] | null | null | null | defmodule Access do
@moduledoc """
Key-based access to data structures using the `data[key]` syntax.
Elixir provides two syntaxes for accessing values. `user[:name]`
is used by dynamic structures, like maps and keywords, while
`user.name` is used by structs. The main difference is that
`user[:name]` won't ... | 33.317897 | 114 | 0.63078 |
21c65bd99564dfe3e86f8333748b62645ec93201 | 1,872 | ex | Elixir | lib/mix/tasks/encode_loop.ex | marcinbiegun/membrane-msdk | 2960fafdcf6ac389064d37620e9b0fa55422f9b8 | [
"Apache-2.0"
] | null | null | null | lib/mix/tasks/encode_loop.ex | marcinbiegun/membrane-msdk | 2960fafdcf6ac389064d37620e9b0fa55422f9b8 | [
"Apache-2.0"
] | null | null | null | lib/mix/tasks/encode_loop.ex | marcinbiegun/membrane-msdk | 2960fafdcf6ac389064d37620e9b0fa55422f9b8 | [
"Apache-2.0"
] | null | null | null | defmodule Mix.Tasks.EncodeLoop do
import Membrane.Testing.Assertions
alias Membrane.Element
alias Membrane.Testing.Pipeline
use Mix.Task
@shortdoc "Infinitely loops a task: Encodes a raw I420 input file to a h264 encoded output file."
def run([width_param, height_param, bitrate_param, in_path_param, out_pa... | 34.036364 | 99 | 0.662927 |
21c6804102d5e3acd270faf1c5ea016ecb71b550 | 378 | ex | Elixir | lib/slack/team/profile.ex | cjbottaro/slack_ex | 866c3bb4df324094f97cbeed9201c8e83d6904db | [
"MIT"
] | null | null | null | lib/slack/team/profile.ex | cjbottaro/slack_ex | 866c3bb4df324094f97cbeed9201c8e83d6904db | [
"MIT"
] | null | null | null | lib/slack/team/profile.ex | cjbottaro/slack_ex | 866c3bb4df324094f97cbeed9201c8e83d6904db | [
"MIT"
] | null | null | null | defmodule Slack.Team.Profile do
@moduledoc """
Functions for team profiles
"""
@base "team.profile"
use Slack.Request
@doc """
Get the profile field definitions for the team.
https://api.slack.com/methods/team.profile.get
## Examples
Slack.Team.Profile.get(client)
"""
@spec get(Slack... | 17.181818 | 56 | 0.671958 |
21c6a311118b4f7784c182ba5fd917db6e86d75d | 728 | exs | Elixir | test/macros/generate_handler_test.exs | bnns/state_server | d62dcd7c8d261e057764c39370b6ac5a63f11aa4 | [
"MIT"
] | 8 | 2019-08-31T00:31:58.000Z | 2021-06-11T22:12:05.000Z | test/macros/generate_handler_test.exs | bnns/state_server | d62dcd7c8d261e057764c39370b6ac5a63f11aa4 | [
"MIT"
] | 39 | 2019-09-07T21:29:09.000Z | 2020-05-05T15:01:30.000Z | test/macros/generate_handler_test.exs | bnns/state_server | d62dcd7c8d261e057764c39370b6ac5a63f11aa4 | [
"MIT"
] | 2 | 2020-01-04T05:44:25.000Z | 2020-01-19T21:44:41.000Z | defmodule StateServerTest.Macros.GenerateHandlerTest do
use ExUnit.Case, async: true
alias StateServer.Macros
test "generate_handler snapshot" do
assert (~S"""
@doc false
def handle_foo(_, _) do
proc = case Process.info(self(), :registered_name) do
{_, []} -> self()
{_, name} -... | 26 | 128 | 0.597527 |
21c6e42ac27477889823a72c47cd6308a39a59cd | 2,118 | ex | Elixir | clients/admin/lib/google_api/admin/directory_v1/model/buildings.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/admin/lib/google_api/admin/directory_v1/model/buildings.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/admin/lib/google_api/admin/directory_v1/model/buildings.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... | 37.821429 | 205 | 0.71577 |
21c6f0ebd97e46955ed3f1292ea8e86e5950bd8d | 101 | exs | Elixir | config/prod.exs | frahugo/docusign_elixir | 7e4be31f5c3008b1facfe8c1aaa5ff3f3fb2988e | [
"MIT"
] | 4 | 2020-12-21T12:50:13.000Z | 2022-01-12T16:50:43.000Z | config/prod.exs | frahugo/docusign_elixir | 7e4be31f5c3008b1facfe8c1aaa5ff3f3fb2988e | [
"MIT"
] | 12 | 2018-09-18T15:26:34.000Z | 2019-09-28T15:29:39.000Z | config/prod.exs | frahugo/docusign_elixir | 7e4be31f5c3008b1facfe8c1aaa5ff3f3fb2988e | [
"MIT"
] | 15 | 2020-04-29T21:50:16.000Z | 2022-02-11T18:01:51.000Z | use Mix.Config
config :docusign, app_env: :prod
config :docusign, hostname: "account.docusign.com"
| 16.833333 | 50 | 0.762376 |
21c712c584ecac8368e6c0c5d2ea8cfe1d9bb902 | 1,782 | ex | Elixir | lib/chaperon/action/spread_async.ex | ideo/chaperon | 6298e96ae2b8f39a1d729b7363f4a451bc4c3a6e | [
"MIT"
] | null | null | null | lib/chaperon/action/spread_async.ex | ideo/chaperon | 6298e96ae2b8f39a1d729b7363f4a451bc4c3a6e | [
"MIT"
] | null | null | null | lib/chaperon/action/spread_async.ex | ideo/chaperon | 6298e96ae2b8f39a1d729b7363f4a451bc4c3a6e | [
"MIT"
] | null | null | null | defmodule Chaperon.Action.SpreadAsync do
@moduledoc """
Action that calls a function with a given `rate` over a given `interval` of
time (ms).
"""
defstruct func: nil,
rate: nil,
interval: nil,
task_name: nil
@type rate :: non_neg_integer
@type time :: non_neg_integer... | 24.081081 | 78 | 0.623457 |
21c716f1b0354053041154d7a64bfc7f78867b72 | 200 | exs | Elixir | priv/repo/migrations/20210421205517_add_adr_to_devices.exs | maco2035/console | 2a9a65678b8c671c7d92cdb62dfcfc71b84957c5 | [
"Apache-2.0"
] | 83 | 2018-05-31T14:49:10.000Z | 2022-03-27T16:49:49.000Z | priv/repo/migrations/20210421205517_add_adr_to_devices.exs | maco2035/console | 2a9a65678b8c671c7d92cdb62dfcfc71b84957c5 | [
"Apache-2.0"
] | 267 | 2018-05-22T23:19:02.000Z | 2022-03-31T04:31:06.000Z | priv/repo/migrations/20210421205517_add_adr_to_devices.exs | maco2035/console | 2a9a65678b8c671c7d92cdb62dfcfc71b84957c5 | [
"Apache-2.0"
] | 18 | 2018-11-20T05:15:54.000Z | 2022-03-28T08:20:13.000Z | defmodule Console.Repo.Migrations.AddAdrToDevices do
use Ecto.Migration
def change do
alter table(:devices) do
add :adr_allowed, :boolean, null: false, default: false
end
end
end
| 20 | 61 | 0.72 |
21c71f900ebea6e33a7b7987e91253d00e540f9c | 18,491 | exs | Elixir | test/elixir/test/basics_test.exs | Terreii/couchdb | 720393b4961f0a14742a39304a7f04415aef1aa8 | [
"Apache-2.0"
] | null | null | null | test/elixir/test/basics_test.exs | Terreii/couchdb | 720393b4961f0a14742a39304a7f04415aef1aa8 | [
"Apache-2.0"
] | null | null | null | test/elixir/test/basics_test.exs | Terreii/couchdb | 720393b4961f0a14742a39304a7f04415aef1aa8 | [
"Apache-2.0"
] | null | null | null | defmodule BasicsTest do
use CouchTestCase
@moduletag :basics
@moduletag kind: :single_node
@moduledoc """
Test CouchDB basics.
This is a port of the basics.js suite
"""
test "Session contains adm context" do
user_ctx = Couch.get("/_session").body["userCtx"]
assert user_ctx["name"] == "adm", "... | 34.757519 | 112 | 0.616029 |
21c73374ccb76338cd293c10eafa009f4c43ea9e | 16,411 | ex | Elixir | lib/faker/address/es.ex | michaelfich/faker | 2894465c3eddc51962da6f5c9be63bf901218510 | [
"MIT"
] | null | null | null | lib/faker/address/es.ex | michaelfich/faker | 2894465c3eddc51962da6f5c9be63bf901218510 | [
"MIT"
] | null | null | null | lib/faker/address/es.ex | michaelfich/faker | 2894465c3eddc51962da6f5c9be63bf901218510 | [
"MIT"
] | null | null | null | defmodule Faker.Address.Es do
import Faker, only: [sampler: 2]
alias Faker.Name.Es
@moduledoc """
Functions for generating addresses in Spanish
"""
@doc """
Return random building number.
## Examples
iex> Faker.Address.Es.building_number()
"s/n."
iex> Faker.Address.Es.building_num... | 19.421302 | 94 | 0.555542 |
21c75680a237d376f1a10935f2328451c60744b6 | 1,956 | ex | Elixir | clients/genomics/lib/google_api/genomics/v1/model/merge_variants_request.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/genomics/lib/google_api/genomics/v1/model/merge_variants_request.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/genomics/lib/google_api/genomics/v1/model/merge_variants_request.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... | 35.563636 | 172 | 0.732106 |
21c764e8a9efdbd4fb6727f61da3a32311f798aa | 291 | exs | Elixir | .formatter.exs | kianmeng/typed_struct | 3b63b1a6a22dcc71bc647d08a6badaa21f4700b2 | [
"MIT"
] | 560 | 2018-06-18T20:56:54.000Z | 2022-03-23T00:30:50.000Z | .formatter.exs | kianmeng/typed_struct | 3b63b1a6a22dcc71bc647d08a6badaa21f4700b2 | [
"MIT"
] | 24 | 2018-05-31T05:37:04.000Z | 2022-02-15T20:12:45.000Z | .formatter.exs | kianmeng/typed_struct | 3b63b1a6a22dcc71bc647d08a6badaa21f4700b2 | [
"MIT"
] | 25 | 2018-07-03T23:42:59.000Z | 2022-03-24T20:30:52.000Z | locals_without_parens = [field: 2, field: 3, plugin: 1, plugin: 2]
[
inputs: [
"{mix,.iex,.formatter,.credo}.exs",
"{config,lib,test}/**/*.{ex,exs}"
],
line_length: 80,
locals_without_parens: locals_without_parens,
export: [locals_without_parens: locals_without_parens]
]
| 24.25 | 66 | 0.676976 |
21c7892023af28018d690d5f696d832b8998f9d6 | 1,040 | ex | Elixir | cryin/test/support/conn_case.ex | Graveyardillon/cryin | 975ef2f2c170351d60b0b9846b0616dc7d32a747 | [
"MIT"
] | null | null | null | cryin/test/support/conn_case.ex | Graveyardillon/cryin | 975ef2f2c170351d60b0b9846b0616dc7d32a747 | [
"MIT"
] | 1 | 2020-05-18T13:34:20.000Z | 2020-05-18T13:34:20.000Z | cryin/test/support/conn_case.ex | Papillon6814/cryin | 975ef2f2c170351d60b0b9846b0616dc7d32a747 | [
"MIT"
] | null | null | null | defmodule CryinWeb.ConnCase do
@moduledoc """
This module defines the test case to be used by
tests that require setting up a connection.
Such tests rely on `Phoenix.ConnTest` and also
import other functionality to make it easier
to build common data structures and query the data layer.
Finally, if the ... | 26.666667 | 67 | 0.715385 |
21c7a52c2f9161a88c7b74443d90452753d46b2c | 286 | ex | Elixir | microservice/web/router.ex | eduardobarbiero/microservice-contacts | 330d1855c8b9296e030bfe62cabc3a1c20cef500 | [
"MIT"
] | null | null | null | microservice/web/router.ex | eduardobarbiero/microservice-contacts | 330d1855c8b9296e030bfe62cabc3a1c20cef500 | [
"MIT"
] | null | null | null | microservice/web/router.ex | eduardobarbiero/microservice-contacts | 330d1855c8b9296e030bfe62cabc3a1c20cef500 | [
"MIT"
] | null | null | null | defmodule Microservice.Router do
use Microservice.Web, :router
pipeline :api do
plug :accepts, ["json"]
end
scope "/", Microservice do
pipe_through :api
scope "/v1", V1, as: :v1 do
resources "/contacts", ContactController, origins: ["*"]
end
end
end
| 19.066667 | 65 | 0.63986 |
21c7b714117cd94ae46fef6773d3e88da55b036a | 4,252 | ex | Elixir | lib/trivial/packet.ex | ityonemo/trivial | 8db4c85f8c5945354102100eff3e89909fc458ec | [
"MIT"
] | 4 | 2020-01-27T21:26:38.000Z | 2021-11-16T22:42:57.000Z | lib/trivial/packet.ex | ityonemo/trivial | 8db4c85f8c5945354102100eff3e89909fc458ec | [
"MIT"
] | 6 | 2020-01-25T23:43:33.000Z | 2020-08-19T19:36:22.000Z | lib/trivial/packet.ex | ityonemo/trivial | 8db4c85f8c5945354102100eff3e89909fc458ec | [
"MIT"
] | null | null | null | defmodule Trivial.Packet do
@moduledoc """
Code for converting structured erlang data into a udp packet
which is then sent over the udp connection in a `Trivial.Conn`
struct.
"""
alias Trivial.Conn
@errorcodes %{
error: 0,
enoent: 1,
eacces: 2,
enotsup: 4,
einval: 5,
... | 30.589928 | 79 | 0.584901 |
21c7cbb2917d37be137a2b94c518a4c67daca6ff | 209 | exs | Elixir | littlechat/priv/repo/migrations/20200813103018_create_rooms.exs | gkzz/phoenix-video-chat | 326253386e6d8d2a7224741fb9a8cd2d4ca13e4e | [
"MIT"
] | null | null | null | littlechat/priv/repo/migrations/20200813103018_create_rooms.exs | gkzz/phoenix-video-chat | 326253386e6d8d2a7224741fb9a8cd2d4ca13e4e | [
"MIT"
] | null | null | null | littlechat/priv/repo/migrations/20200813103018_create_rooms.exs | gkzz/phoenix-video-chat | 326253386e6d8d2a7224741fb9a8cd2d4ca13e4e | [
"MIT"
] | null | null | null | defmodule Littlechat.Repo.Migrations.CreateRooms do
use Ecto.Migration
def change do
create table(:rooms) do
add :titile, :string
add :slug, :string
timestamps()
end
end
end
| 14.928571 | 51 | 0.660287 |
21c8124a44a40bb6a43c906872fa5cf39330e76f | 197 | exs | Elixir | test/checker_mal_web/controllers/page_controller_test.exs | Hiyori-API/checker-mal | c52f6e8a248ba160ffebc2c9369a933fc8fc4499 | [
"MIT"
] | 10 | 2020-06-12T18:36:58.000Z | 2022-02-20T11:07:49.000Z | test/checker_mal_web/controllers/page_controller_test.exs | Hiyori-API/checker-mal | c52f6e8a248ba160ffebc2c9369a933fc8fc4499 | [
"MIT"
] | 7 | 2020-05-08T06:03:08.000Z | 2022-01-24T02:57:16.000Z | test/checker_mal_web/controllers/page_controller_test.exs | Hiyori-API/checker-mal | c52f6e8a248ba160ffebc2c9369a933fc8fc4499 | [
"MIT"
] | 1 | 2020-12-03T03:49:27.000Z | 2020-12-03T03:49:27.000Z | defmodule CheckerMalWeb.PageControllerTest do
use CheckerMalWeb.ConnCase
# test "GET /", %{conn: conn} do
# conn = get(conn, "/")
# assert html_response(conn, 200) =~ "TODO"
# end
end
| 21.888889 | 46 | 0.659898 |
21c818a16afe1a596db7e2855abf8dbdd29043a0 | 193 | ex | Elixir | fixtures/elixir/get_insecure_short.ex | kado0413/curlconverter | a532bd415853f350198d891e14c59babed16902e | [
"MIT"
] | 1 | 2022-03-24T04:18:11.000Z | 2022-03-24T04:18:11.000Z | fixtures/elixir/get_insecure_short.ex | kado0413/curlconverter | a532bd415853f350198d891e14c59babed16902e | [
"MIT"
] | null | null | null | fixtures/elixir/get_insecure_short.ex | kado0413/curlconverter | a532bd415853f350198d891e14c59babed16902e | [
"MIT"
] | null | null | null | request = %HTTPoison.Request{
method: :get,
url: "https://www.site.com",
options: [hackney: [:insecure]],
headers: [],
params: [],
body: ""
}
response = HTTPoison.request(request)
| 17.545455 | 37 | 0.621762 |
21c81d712cb9c60a8e5f768ceca1b702fa9f1321 | 2,620 | exs | Elixir | test/context_test.exs | edgarmiadzieles/surface | 24d1162cc25004df9d40a11dd65fca98d7b65c64 | [
"MIT"
] | null | null | null | test/context_test.exs | edgarmiadzieles/surface | 24d1162cc25004df9d40a11dd65fca98d7b65c64 | [
"MIT"
] | null | null | null | test/context_test.exs | edgarmiadzieles/surface | 24d1162cc25004df9d40a11dd65fca98d7b65c64 | [
"MIT"
] | null | null | null | defmodule ContextTest do
use ExUnit.Case, async: true
import Surface
import ComponentTestHelper
defmodule Outer do
use Surface.Component
context set field, :any, scope: :only_children
def init_context(_assigns) do
{:ok, field: "field from Outer"}
end
def render(assigns) do
~... | 19.124088 | 71 | 0.560305 |
21c828732c5c0d3337c33bbc27142f3fa237ad2b | 4,112 | exs | Elixir | test/rsa_test.exs | mbaleczny/rsa-ex | 74104295861857f440358410cc78da78f186cee0 | [
"MIT"
] | null | null | null | test/rsa_test.exs | mbaleczny/rsa-ex | 74104295861857f440358410cc78da78f186cee0 | [
"MIT"
] | null | null | null | test/rsa_test.exs | mbaleczny/rsa-ex | 74104295861857f440358410cc78da78f186cee0 | [
"MIT"
] | null | null | null | defmodule RsaEx.RSATest do
use ExUnit.Case, async: true
test "generate_private_key() generates string" do
{:ok, priv} = RsaEx.generate_private_key()
assert is_binary(priv)
end
test "generate_private_key(\"4096\") generates bigger string" do
{:ok, priv_2048} = RsaEx.generate_private_key()
{:ok... | 31.875969 | 83 | 0.675097 |
21c8484b9531c71c1736540ce5327dbfb052a080 | 1,963 | exs | Elixir | apps/configure/test/configure/persist_test.exs | paulanthonywilson/mcam | df9c5aaae00b568749dff22613636f5cb92f905a | [
"MIT"
] | null | null | null | apps/configure/test/configure/persist_test.exs | paulanthonywilson/mcam | df9c5aaae00b568749dff22613636f5cb92f905a | [
"MIT"
] | 8 | 2020-11-16T09:59:12.000Z | 2020-11-16T10:13:07.000Z | apps/configure/test/configure/persist_test.exs | paulanthonywilson/mcam | df9c5aaae00b568749dff22613636f5cb92f905a | [
"MIT"
] | null | null | null | defmodule Configure.PersistTest do
use ExUnit.Case
import ExUnit.CaptureLog
alias Configure.{Events, Persist}
setup do
filename = "#{System.tmp_dir!()}/#{inspect(self())}.txt"
update_topic = "updated_#{inspect(self())}"
Events.subscribe(update_topic)
{:ok, persist_pid} = Persist.start_link(... | 28.449275 | 94 | 0.694345 |
21c8ca626cd647cc0cf116f870ed11bded49955e | 451 | ex | Elixir | apps/tanx/lib/tanx/game/events.ex | 4eek/tanx | 32750c15966d6272db9d96fa620fb277a61520e4 | [
"MIT"
] | 112 | 2016-05-10T17:17:08.000Z | 2022-01-25T22:41:29.000Z | apps/tanx/lib/tanx/game/events.ex | 4eek/tanx | 32750c15966d6272db9d96fa620fb277a61520e4 | [
"MIT"
] | 3 | 2016-05-10T04:39:02.000Z | 2019-07-19T12:50:07.000Z | apps/tanx/lib/tanx/game/events.ex | 4eek/tanx | 32750c15966d6272db9d96fa620fb277a61520e4 | [
"MIT"
] | 22 | 2016-05-17T01:51:51.000Z | 2022-03-15T03:21:02.000Z | defmodule Tanx.Game.Events.ArenaUpdated do
defstruct(
time: nil,
arena: nil
)
end
defmodule Tanx.Game.Events.TankCreated do
defstruct(
id: nil,
tank: nil,
event_data: nil
)
end
defmodule Tanx.Game.Events.TankDeleted do
defstruct(
id: nil,
tank: nil,
event_data: nil
)
end
d... | 14.09375 | 46 | 0.656319 |
21c8d17b8818addeb43dc8b9281bb85a6af962d5 | 341 | ex | Elixir | webrtc/auth/lib/auth/room.ex | membraneframework/videoroom_advanced | d5bfbcec7558bb7ddd4f74742c0d842e5d759b21 | [
"Apache-2.0"
] | 84 | 2020-08-01T14:57:29.000Z | 2022-03-27T13:28:23.000Z | webrtc/auth/lib/auth/room.ex | membraneframework/videoroom_advanced | d5bfbcec7558bb7ddd4f74742c0d842e5d759b21 | [
"Apache-2.0"
] | 75 | 2020-08-24T08:01:53.000Z | 2022-03-17T10:41:22.000Z | webrtc/auth/lib/auth/room.ex | membraneframework/videoroom_advanced | d5bfbcec7558bb7ddd4f74742c0d842e5d759b21 | [
"Apache-2.0"
] | 17 | 2020-09-15T21:04:23.000Z | 2022-03-31T07:43:48.000Z | defmodule Example.Auth.Room do
@moduledoc false
use Membrane.WebRTC.Server.Room
@impl true
def on_join(auth_data, state) do
with {:ok, _claims} <-
Guardian.decode_and_verify(
Example.Auth.UserManager.Guardian,
auth_data.credentials.token
) do
{:ok, stat... | 21.3125 | 47 | 0.621701 |
21c8dd0139e7649ddc5a47765e1d9950831e133e | 124 | exs | Elixir | test/fixturist_test.exs | izelnakri/fixturastic | 43980c233fd89d132d3b79ebd3f5d1d544849397 | [
"MIT"
] | null | null | null | test/fixturist_test.exs | izelnakri/fixturastic | 43980c233fd89d132d3b79ebd3f5d1d544849397 | [
"MIT"
] | null | null | null | test/fixturist_test.exs | izelnakri/fixturastic | 43980c233fd89d132d3b79ebd3f5d1d544849397 | [
"MIT"
] | null | null | null | defmodule FixturasticTest do
use ExUnit.Case
doctest Fixturastic
test "the truth" do
assert 1 + 1 == 2
end
end
| 13.777778 | 28 | 0.693548 |
21c8ff6ef588ff3c6bdd6069bbda4243082d6c6f | 3,535 | exs | Elixir | test/tradehub/tx/create_order_test.exs | anhmv/tradehub-api-elixir | 6ec87c2b07188d4140506011e2b28db4d372ac6d | [
"MIT"
] | 5 | 2021-05-04T16:54:25.000Z | 2021-12-15T06:53:24.000Z | test/tradehub/tx/create_order_test.exs | anhmv/tradehub-api-elixir | 6ec87c2b07188d4140506011e2b28db4d372ac6d | [
"MIT"
] | 5 | 2021-05-19T04:49:00.000Z | 2021-06-01T13:36:50.000Z | test/tradehub/tx/create_order_test.exs | anhmv/tradehub-elixir | 6ec87c2b07188d4140506011e2b28db4d372ac6d | [
"MIT"
] | null | null | null | defmodule TradehubTest.Tx.CreateOrderTest do
use ExUnit.Case, async: true
alias Tradehub.Tx.MsgInvalid
alias Tradehub.Tx.CreateOrder
import Tradehub.Tx.CreateOrder
setup do
{
:ok,
limit: %CreateOrder{
market: "swth_eth1",
side: :buy,
quantity: "1",
price: "10... | 27.192308 | 110 | 0.628289 |
21c992ca29df6d0b44fe2a73e60e0fb81f1ce5bd | 273 | exs | Elixir | programming_elixir_1.3_snippets/query.exs | benjohns1/elixer-app | 6e866ec084c5e75442c0b70f66e35f61b5b74d34 | [
"MIT"
] | null | null | null | programming_elixir_1.3_snippets/query.exs | benjohns1/elixer-app | 6e866ec084c5e75442c0b70f66e35f61b5b74d34 | [
"MIT"
] | null | null | null | programming_elixir_1.3_snippets/query.exs | benjohns1/elixer-app | 6e866ec084c5e75442c0b70f66e35f61b5b74d34 | [
"MIT"
] | null | null | null | people = [
%{ name: "Grumpy", height: 1.24 },
%{ name: "Dave", height: 1.88 },
%{ name: "Dopey", height: 1.32 },
%{ name: "Shaq", height: 2.16 },
%{ name: "Sneezy", height: 1.28 }
]
IO.inspect(for person = %{ height: height } <- people, height > 1.5, do: person) | 30.333333 | 80 | 0.542125 |
21c996ad3f34021d5ee642508adedb1ea32040d5 | 2,496 | ex | Elixir | lib/vimdoc/parser.ex | liquidz/ex_vimdoc | 3b3df4b53d45045f1ef60d4db965ea4e4d2d8a40 | [
"MIT"
] | null | null | null | lib/vimdoc/parser.ex | liquidz/ex_vimdoc | 3b3df4b53d45045f1ef60d4db965ea4e4d2d8a40 | [
"MIT"
] | null | null | null | lib/vimdoc/parser.ex | liquidz/ex_vimdoc | 3b3df4b53d45045f1ef60d4db965ea4e4d2d8a40 | [
"MIT"
] | null | null | null | defmodule Vimdoc.Parser do
def parse(file_body) do
file_body
|> String.split(~r{\r?\n})
|> Enum.map(&String.strip/1)
|> tokenize([], [], false)
|> analyze
end
def tokenize([], result, _, _), do: result
def tokenize([line | tail], result, tmp, started?) do
case line do
"\"\"" ->
... | 26 | 68 | 0.513622 |
21c99b769eed98ef274d36480710253e06da8c62 | 7,513 | ex | Elixir | lib/xlsx_reader/parsers/worksheet_parser.ex | evaldobratti/xlsx_reader | dcfe51ae7e86863953b7ab641e15448a9651ce0d | [
"Apache-2.0"
] | null | null | null | lib/xlsx_reader/parsers/worksheet_parser.ex | evaldobratti/xlsx_reader | dcfe51ae7e86863953b7ab641e15448a9651ce0d | [
"Apache-2.0"
] | null | null | null | lib/xlsx_reader/parsers/worksheet_parser.ex | evaldobratti/xlsx_reader | dcfe51ae7e86863953b7ab641e15448a9651ce0d | [
"Apache-2.0"
] | null | null | null | defmodule XlsxReader.Parsers.WorksheetParser do
@moduledoc false
# Parses SpreadsheetML worksheets.
@behaviour Saxy.Handler
alias XlsxReader.{CellReference, Conversion, Number}
alias XlsxReader.Parsers.Utils
defmodule State do
@moduledoc false
@enforce_keys [:workbook, :type_conversion, :blank_v... | 25.554422 | 134 | 0.641422 |
21c9ebf0639fd4c605503986a70bf781e48c71c0 | 1,366 | ex | Elixir | lib/alcsmg/github.ex | velimir0xff/alcsmg | 7f8845b4e4698009a44769fc593a551c5f9387ee | [
"MIT"
] | null | null | null | lib/alcsmg/github.ex | velimir0xff/alcsmg | 7f8845b4e4698009a44769fc593a551c5f9387ee | [
"MIT"
] | null | null | null | lib/alcsmg/github.ex | velimir0xff/alcsmg | 7f8845b4e4698009a44769fc593a551c5f9387ee | [
"MIT"
] | null | null | null | defmodule Alcsmg.Github do
require Logger
def client do
conf = Application.get_env(:alcsmg, :github)
cond do
token = conf[:auth_token] ->
%Tentacat.Client{auth: %{access_token: token}}
(user = conf[:user]) && (password = conf[:password]) ->
%Tentacat.Client{auth: %{user: user, pa... | 33.317073 | 84 | 0.661054 |
21c9f0c8be58ee5b222440cbe365df4a577c547f | 2,339 | ex | Elixir | lib/memento/memento.ex | Sitata/memento | 137ff84c40b4a1c2e3496f160cecdb0428dd397a | [
"MIT"
] | 679 | 2018-08-17T23:10:00.000Z | 2022-03-27T07:23:27.000Z | lib/memento/memento.ex | Sitata/memento | 137ff84c40b4a1c2e3496f160cecdb0428dd397a | [
"MIT"
] | 26 | 2018-09-06T01:27:31.000Z | 2022-03-09T07:16:05.000Z | lib/memento/memento.ex | Sitata/memento | 137ff84c40b4a1c2e3496f160cecdb0428dd397a | [
"MIT"
] | 23 | 2018-09-06T01:06:14.000Z | 2022-03-09T00:55:06.000Z | defmodule Memento do
require Memento.Mnesia
require Memento.Error
@moduledoc """
Simple + Powerful interface to the Erlang Mnesia Database.
See the [README](https://github.com/sheharyarn/memento) to get
started.
"""
# Public API
# ----------
@doc """
Start the Memento Application.
Thi... | 20.163793 | 76 | 0.668234 |
21ca0afcafab2b95bd4fcd7e805c0f01550d22ff | 374 | ex | Elixir | Chapter07/vocial-demo-chapter-7/lib/vocial_web/views/error_view.ex | PacktPublishing/Phoenix-Web-Development | a071392abe2a459be1896580446b006126c393bf | [
"MIT"
] | 10 | 2018-05-13T14:53:05.000Z | 2021-11-08T13:10:44.000Z | Chapter04/vocial-demo-0.4.0/lib/vocial_web/views/error_view.ex | PacktPublishing/Phoenix-Web-Development | a071392abe2a459be1896580446b006126c393bf | [
"MIT"
] | null | null | null | Chapter04/vocial-demo-0.4.0/lib/vocial_web/views/error_view.ex | PacktPublishing/Phoenix-Web-Development | a071392abe2a459be1896580446b006126c393bf | [
"MIT"
] | 2 | 2019-04-23T10:54:33.000Z | 2019-04-27T15:47:07.000Z | defmodule VocialWeb.ErrorView do
use VocialWeb, :view
def render("404.html", _assigns) do
"Page not found"
end
def render("500.html", _assigns) do
"Internal server error"
end
# In case no render clause matches or no
# template is found, let's render it as 500
def template_not_found(_template,... | 20.777778 | 47 | 0.700535 |
21ca1b4a58059c758b5232020582aff36d341acd | 14,084 | ex | Elixir | lib/prom_ex/plugins/broadway.ex | dvic/prom_ex | 36cd5e0850e3e1ccc369011fbd15d5b442024a1e | [
"MIT"
] | null | null | null | lib/prom_ex/plugins/broadway.ex | dvic/prom_ex | 36cd5e0850e3e1ccc369011fbd15d5b442024a1e | [
"MIT"
] | null | null | null | lib/prom_ex/plugins/broadway.ex | dvic/prom_ex | 36cd5e0850e3e1ccc369011fbd15d5b442024a1e | [
"MIT"
] | null | null | null | if Code.ensure_loaded?(Broadway) do
defmodule PromEx.Plugins.Broadway do
@moduledoc """
This plugin captures metrics emitted by Broadway.
This plugin exposes the following metric groups:
- `:broadway_init_event_metrics`
- `:broadway_message_event_metrics`
- `:broadway_batch_event_metrics`
... | 36.298969 | 116 | 0.606859 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.