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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1acab28b033fc16f20014c0920bd528305dda4e3 | 103 | ex | Elixir | examples/ecto_assoc/lib/ecto_assoc/repo.ex | dgvncsz0f/ecto | bae06fe650328cc1060c09fe889a2de9a10edb1b | [
"Apache-2.0"
] | null | null | null | examples/ecto_assoc/lib/ecto_assoc/repo.ex | dgvncsz0f/ecto | bae06fe650328cc1060c09fe889a2de9a10edb1b | [
"Apache-2.0"
] | null | null | null | examples/ecto_assoc/lib/ecto_assoc/repo.ex | dgvncsz0f/ecto | bae06fe650328cc1060c09fe889a2de9a10edb1b | [
"Apache-2.0"
] | 1 | 2018-09-21T16:05:29.000Z | 2018-09-21T16:05:29.000Z | defmodule EctoAssoc.Repo do
use Ecto.Repo, otp_app: :ecto_assoc, adapter: Ecto.Adapters.Postgres
end
| 25.75 | 70 | 0.796117 |
1acab471a2dffdba9f8593f53ca485f1b53a6005 | 449 | exs | Elixir | lib/keyword_lists.exs | amiroff/learning_elixir | 362eb71ac6af69877c96a3ad03213632a8ed85fc | [
"MIT"
] | null | null | null | lib/keyword_lists.exs | amiroff/learning_elixir | 362eb71ac6af69877c96a3ad03213632a8ed85fc | [
"MIT"
] | null | null | null | lib/keyword_lists.exs | amiroff/learning_elixir | 362eb71ac6af69877c96a3ad03213632a8ed85fc | [
"MIT"
] | null | null | null | # We often need simple pairs of key-values.
[ name: "Dave", city: "Dallas", likes: "Programming" ]
# is actually:
[ {:name, "Dave"}, {:city, "Dallas"}, {:likes, "Programming"} ]
# we can omit square brackets if kwlist is last or the only argument in fn call:
DB.save record, [ {:u... | 40.818182 | 81 | 0.596882 |
1acab71ece708df8191e63429d04fb79b723d5aa | 736 | ex | Elixir | lib/extatus/callback.ex | gmtprime/extatus | e9bf16cb1e83d2c4225c66d7c0bfdfb40993de03 | [
"MIT"
] | 17 | 2017-03-01T07:19:46.000Z | 2021-11-25T21:57:38.000Z | lib/extatus/callback.ex | gmtprime/extatus | e9bf16cb1e83d2c4225c66d7c0bfdfb40993de03 | [
"MIT"
] | 1 | 2018-04-02T11:09:28.000Z | 2018-04-02T14:33:30.000Z | lib/extatus/callback.ex | gmtprime/extatus | e9bf16cb1e83d2c4225c66d7c0bfdfb40993de03 | [
"MIT"
] | 1 | 2021-12-14T20:49:02.000Z | 2021-12-14T20:49:02.000Z | defmodule Extatus.Callback do
@moduledoc """
This module implements the `/metrics` callback for Prometheus.
"""
@behaviour :cowboy_handler
alias Extatus.CowboyExporter
@doc false
def init(request, state) do
method = :cowboy_req.method(request)
handle(method, request, state)
end
@doc false
... | 21.647059 | 64 | 0.67663 |
1acab964a7e2849cf5594d09f097dbfe68b097e6 | 735 | ex | Elixir | lib/cforum_web/plug/authorize_access.ex | jrieger/cforum_ex | 61f6ce84708cb55bd0feedf69853dae64146a7a0 | [
"MIT"
] | 16 | 2019-04-04T06:33:33.000Z | 2021-08-16T19:34:31.000Z | lib/cforum_web/plug/authorize_access.ex | jrieger/cforum_ex | 61f6ce84708cb55bd0feedf69853dae64146a7a0 | [
"MIT"
] | 294 | 2019-02-10T11:10:27.000Z | 2022-03-30T04:52:53.000Z | lib/cforum_web/plug/authorize_access.ex | jrieger/cforum_ex | 61f6ce84708cb55bd0feedf69853dae64146a7a0 | [
"MIT"
] | 10 | 2019-02-10T10:39:24.000Z | 2021-07-06T11:46:05.000Z | defmodule CforumWeb.Plug.AuthorizeAccess do
@moduledoc """
This plug is pluggable in controllers for authorizing actions based on our
Abilities module. It constructs a path by the controller name and then calls
`Abilities.may?(mod, action)`
## Examples
# Authorize access to all actions
plug Auth... | 27.222222 | 80 | 0.711565 |
1acad825252c4022fb7a1aefc85da168cf0bdf3b | 1,728 | ex | Elixir | clients/android_management/lib/google_api/android_management/v1/model/telephony_info.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/android_management/lib/google_api/android_management/v1/model/telephony_info.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/android_management/lib/google_api/android_management/v1/model/telephony_info.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 34.56 | 147 | 0.73669 |
1acada08a36fc34dfcbb76e477251d53e943fa75 | 1,215 | ex | Elixir | lib/fryse/script_loader.ex | fryse/fryse | 56e25ff2dc3dad56593849af7e8786225b918934 | [
"MIT"
] | 7 | 2018-02-03T01:04:22.000Z | 2020-07-19T16:47:03.000Z | lib/fryse/script_loader.ex | fryse/fryse | 56e25ff2dc3dad56593849af7e8786225b918934 | [
"MIT"
] | 3 | 2020-07-16T09:28:38.000Z | 2020-07-22T09:40:45.000Z | lib/fryse/script_loader.ex | fryse/fryse | 56e25ff2dc3dad56593849af7e8786225b918934 | [
"MIT"
] | null | null | null | defmodule Fryse.ScriptLoader do
@moduledoc false
alias Fryse.ErrorBag
alias Fryse.Errors.InvalidScriptModule
def load_for(%Fryse{config: %{theme: theme}, source_path: source_path}) do
project_scripts = project_scripts(source_path)
theme_scripts = theme_scripts(source_path, theme)
files = project_... | 29.634146 | 96 | 0.658436 |
1acaf6c0ab176001a53f44cd6cb7a859bd8ce9b6 | 2,191 | ex | Elixir | clients/speech/lib/google_api/speech/v1/model/long_running_recognize_metadata.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/speech/lib/google_api/speech/v1/model/long_running_recognize_metadata.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/speech/lib/google_api/speech/v1/model/long_running_recognize_metadata.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"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... | 40.574074 | 265 | 0.744865 |
1acb0cfb56947f4061fdec19bbfe50c211045481 | 1,047 | exs | Elixir | test/quatern/quatern_from_matrix_test.exs | crertel/graphmath | 798e51d21d509e397a86d9ca855ef18a92243583 | [
"Unlicense"
] | 70 | 2015-01-07T10:13:38.000Z | 2021-09-29T05:06:14.000Z | test/quatern/quatern_from_matrix_test.exs | crertel/graphmath | 798e51d21d509e397a86d9ca855ef18a92243583 | [
"Unlicense"
] | 28 | 2015-01-22T22:38:24.000Z | 2021-06-24T06:15:38.000Z | test/quatern/quatern_from_matrix_test.exs | crertel/graphmath | 798e51d21d509e397a86d9ca855ef18a92243583 | [
"Unlicense"
] | 17 | 2015-01-22T18:35:41.000Z | 2020-12-24T22:42:40.000Z | defmodule GraphmathTest.Quatern.FromMatrixQuatern do
use ExUnit.Case
@tag :quatern
@tag :from_matrix
# values obtained through another calculator
test "from_rotation_matrix({1,2,3,4,5,6,7,8,9}) returns {2, 0.25, -0.5, 0.25}" do
assert {2, 0.25, -0.5, 0.25} ==
Graphmath.Quatern.from_rotation_... | 34.9 | 89 | 0.617001 |
1acb18fe603700cca892473d7c2b798cecb2c58e | 2,011 | ex | Elixir | lib/2020/day8.ex | Bentheburrito/adventofcode | 6fca0933c2a0e541567fe9f8bc34df4a048b5d8a | [
"MIT"
] | null | null | null | lib/2020/day8.ex | Bentheburrito/adventofcode | 6fca0933c2a0e541567fe9f8bc34df4a048b5d8a | [
"MIT"
] | null | null | null | lib/2020/day8.ex | Bentheburrito/adventofcode | 6fca0933c2a0e541567fe9f8bc34df4a048b5d8a | [
"MIT"
] | null | null | null | defmodule AOC.Day8 do
def run(input) do
program = input |> String.split("\n") |> Enum.map(&({String.slice(&1, 0..2), String.slice(&1, 4..10) |> String.to_integer(), false}))
{:loop_hit, acc} = AOC.time(&run_till_loop/1, [program])
IO.puts "The value of acc before the loop is: #{acc}"
{:ok, acc_repaired} = AO... | 44.688889 | 135 | 0.670811 |
1acb2975bdece66e73d28fd175e97df8736d8a2f | 73 | ex | Elixir | server/web/views/page_view.ex | MikaAK/trello-burndown | b78d97fa03fcdd60c1c9652b65d272936f648c6f | [
"MIT"
] | null | null | null | server/web/views/page_view.ex | MikaAK/trello-burndown | b78d97fa03fcdd60c1c9652b65d272936f648c6f | [
"MIT"
] | 3 | 2016-04-18T18:09:21.000Z | 2016-04-25T07:29:59.000Z | server/web/views/page_view.ex | MikaAK/trello-burndown | b78d97fa03fcdd60c1c9652b65d272936f648c6f | [
"MIT"
] | null | null | null | defmodule TrelloBurndown.PageView do
use TrelloBurndown.Web, :view
end
| 18.25 | 36 | 0.821918 |
1acb2f2de2f9024ef8b1233d435d02f690d097dc | 455 | ex | Elixir | 2017/day_02/elixir/lib/day2.ex | nicbet/advent-of-code | a44a16c777081bdc9fabdfee72541a95c291ef18 | [
"MIT"
] | null | null | null | 2017/day_02/elixir/lib/day2.ex | nicbet/advent-of-code | a44a16c777081bdc9fabdfee72541a95c291ef18 | [
"MIT"
] | null | null | null | 2017/day_02/elixir/lib/day2.ex | nicbet/advent-of-code | a44a16c777081bdc9fabdfee72541a95c291ef18 | [
"MIT"
] | null | null | null | defmodule Day2 do
def factor_pairs(list) do
list
|> Enum.flat_map( fn x -> list |> Enum.map( fn y -> {x,y} end ) end )
|> Enum.uniq
|> Enum.filter( fn {a,b} -> a != b && rem(a,b) == 0 end )
end
def row_sum_part2(row) do
row
|> factor_pairs
|> Enum.map( fn {a,b} -> div(a,b) end)
|>... | 21.666667 | 73 | 0.553846 |
1acb3412af900e62399539ef94a158fe29185394 | 559 | ex | Elixir | lib/models/oauth_access_token.ex | kevinbaisas/oauth2_server | b622bb2c3f5f6e930a014d7ead7e3bfe14baed22 | [
"MIT"
] | 13 | 2016-05-16T13:27:42.000Z | 2017-03-14T19:57:33.000Z | lib/models/oauth_access_token.ex | kvnbai/oauth2_server | b622bb2c3f5f6e930a014d7ead7e3bfe14baed22 | [
"MIT"
] | null | null | null | lib/models/oauth_access_token.ex | kvnbai/oauth2_server | b622bb2c3f5f6e930a014d7ead7e3bfe14baed22 | [
"MIT"
] | 1 | 2016-06-23T18:14:53.000Z | 2016-06-23T18:14:53.000Z | defmodule Oauth2Server.OauthAccessToken do
use Ecto.Schema
import Ecto.Changeset
schema "oauth_access_tokens" do
field :token, :string
field :expires_at, :integer
belongs_to :user, Oauth2Server.User
belongs_to :oauth_client, Oauth2Server.OauthClient
end
@required_fields ~w(token expires_at ... | 24.304348 | 55 | 0.73703 |
1acb529ab567324fa962ce9de788da10796eb548 | 1,162 | ex | Elixir | lib/mimicry/application.ex | mimicry-tech/mimicry | 08a28fb08a7f02fbbb0a2bc2724a08a0b0b41cd9 | [
"MIT"
] | 4 | 2021-06-18T17:47:32.000Z | 2022-01-04T22:41:36.000Z | lib/mimicry/application.ex | mimicry-tech/mimicry | 08a28fb08a7f02fbbb0a2bc2724a08a0b0b41cd9 | [
"MIT"
] | 56 | 2021-06-14T19:04:35.000Z | 2022-03-24T04:18:58.000Z | lib/mimicry/application.ex | mimicry-tech/mimicry | 08a28fb08a7f02fbbb0a2bc2724a08a0b0b41cd9 | [
"MIT"
] | 1 | 2021-06-13T13:44:35.000Z | 2021-06-13T13:44:35.000Z | defmodule Mimicry.Application do
@moduledoc """
The main Mimicry Application will start a set of mock servers.
These servers will be bootstrapped from the specs folder, and initialized via a single
`Task` run concurrently to the `Mimicry.MockServerList` itself.
"""
use Application
alias Mimicry.MockServ... | 32.277778 | 88 | 0.734079 |
1acb580349c5a2ee0ff6f2782bf5cb1b41e1b95e | 7,422 | ex | Elixir | farmbot_os/lib/farmbot_os/sys_calls.ex | adamswsk/farmbot_os | d177d3b74888c1e7bcbf8f8595818708ee97f73b | [
"MIT"
] | null | null | null | farmbot_os/lib/farmbot_os/sys_calls.ex | adamswsk/farmbot_os | d177d3b74888c1e7bcbf8f8595818708ee97f73b | [
"MIT"
] | null | null | null | farmbot_os/lib/farmbot_os/sys_calls.ex | adamswsk/farmbot_os | d177d3b74888c1e7bcbf8f8595818708ee97f73b | [
"MIT"
] | null | null | null | defmodule FarmbotOS.SysCalls do
@moduledoc """
Implementation for FarmbotCeleryScript.SysCalls
"""
require FarmbotCore.Logger
require FarmbotTelemetry
require Logger
alias FarmbotCeleryScript.AST
alias FarmbotFirmware
alias FarmbotCore.Asset.{
BoxLed,
Private
}
alias FarmbotOS.SysCalls... | 22.766871 | 76 | 0.673808 |
1acb842315ba67ec592d48a8f31befb9c1e2c6c9 | 221 | exs | Elixir | test/grakn/query_test.exs | taxfix/grakn-elixir | 23d094bad69cfbd1c021cf782fd8aff1bff38140 | [
"MIT"
] | 16 | 2018-10-10T09:29:19.000Z | 2021-07-17T03:37:03.000Z | test/grakn/query_test.exs | taxfix/grakn-elixir | 23d094bad69cfbd1c021cf782fd8aff1bff38140 | [
"MIT"
] | 8 | 2019-01-12T19:35:17.000Z | 2020-02-20T16:02:52.000Z | test/grakn/query_test.exs | taxfix/grakn-elixir | 23d094bad69cfbd1c021cf782fd8aff1bff38140 | [
"MIT"
] | 6 | 2018-12-11T08:12:10.000Z | 2020-04-27T02:52:53.000Z | defmodule Grakn.QueryTest do
use ExUnit.Case
doctest Grakn.Query
test "create new Query from graql string" do
graql = "test query"
query = Grakn.Query.graql(graql)
assert query.graql == graql
end
end
| 20.090909 | 46 | 0.705882 |
1acbbd45af6e416de83db7a3c0327e2a2a307334 | 5,092 | ex | Elixir | lib/ueberauth/strategy/google.ex | axelson/ueberauth_google | ee6f9ddff059a0b8eb2cddaf64d3eefcc2202450 | [
"MIT"
] | null | null | null | lib/ueberauth/strategy/google.ex | axelson/ueberauth_google | ee6f9ddff059a0b8eb2cddaf64d3eefcc2202450 | [
"MIT"
] | null | null | null | lib/ueberauth/strategy/google.ex | axelson/ueberauth_google | ee6f9ddff059a0b8eb2cddaf64d3eefcc2202450 | [
"MIT"
] | null | null | null | defmodule Ueberauth.Strategy.Google do
@moduledoc """
Google Strategy for Überauth.
"""
use Ueberauth.Strategy,
uid_field: :sub,
default_scope: "email",
hd: nil,
userinfo_endpoint: "https://www.googleapis.com/oauth2/v3/userinfo"
alias Ueberauth.Auth.Info
alias Ueberauth.Auth.Credentials
... | 28.446927 | 99 | 0.647486 |
1acbd3490e6b990f90df9d1af9fbed2fd0d0622d | 535 | exs | Elixir | test/test_helper.exs | xavier/plug_test_helpers | 25f5621287af4d3061f09f6b7a686677176ef90f | [
"Apache-2.0"
] | 9 | 2015-11-01T07:24:55.000Z | 2022-02-22T19:54:17.000Z | test/test_helper.exs | xavier/plug_test_helpers | 25f5621287af4d3061f09f6b7a686677176ef90f | [
"Apache-2.0"
] | null | null | null | test/test_helper.exs | xavier/plug_test_helpers | 25f5621287af4d3061f09f6b7a686677176ef90f | [
"Apache-2.0"
] | null | null | null | ExUnit.start()
defmodule AssertTestHelpers do
@doc "Passes if the given function raised an ExUnit.Assertion error"
defmacro assert_fail(do: block) do
quote do
assert_raise ExUnit.AssertionError, fn ->
unquote(block)
end
end
end
@doc "Passes if the given function raised an ExUnit.A... | 23.26087 | 93 | 0.695327 |
1acbd8f8d90f06ca7372e3ec54d1ca1322856efb | 9,217 | ex | Elixir | lib/query_elf/plugins/automatic_filters.ex | bonfire-networks/query_elf | c00ca2f3d7e04b5b9e792e8dd7d752994532fc85 | [
"Apache-2.0"
] | 1 | 2021-02-13T15:12:24.000Z | 2021-02-13T15:12:24.000Z | lib/query_elf/plugins/automatic_filters.ex | bonfire-networks/query_elf | c00ca2f3d7e04b5b9e792e8dd7d752994532fc85 | [
"Apache-2.0"
] | null | null | null | lib/query_elf/plugins/automatic_filters.ex | bonfire-networks/query_elf | c00ca2f3d7e04b5b9e792e8dd7d752994532fc85 | [
"Apache-2.0"
] | null | null | null | defmodule QueryElf.Plugins.AutomaticFilters do
@moduledoc """
Plugin for automatically defining filters for a set of fields.
It accepts the following options:
- `:fields` - the list of fields for which to define filters. (required)
The defined filters will vary according to the field type in the schema:
... | 35.314176 | 132 | 0.643051 |
1acc2383ead12d729395bf0903a8d64667083ba7 | 1,468 | ex | Elixir | lib/example_web/endpoint.ex | guisehn/sface-on-view-demo | 7d9db80d02d1f82e6c874255d56eabcc414215ae | [
"MIT"
] | null | null | null | lib/example_web/endpoint.ex | guisehn/sface-on-view-demo | 7d9db80d02d1f82e6c874255d56eabcc414215ae | [
"MIT"
] | null | null | null | lib/example_web/endpoint.ex | guisehn/sface-on-view-demo | 7d9db80d02d1f82e6c874255d56eabcc414215ae | [
"MIT"
] | null | null | null | defmodule ExampleWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :example
# 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: "_example_k... | 29.36 | 97 | 0.719346 |
1acc311848c23df502e72eae7cdbcbc849ad06b3 | 19,252 | exs | Elixir | test/elixir_email_reply_parser_test.exs | hellogustav/elixir_email_reply_parser | e0cad1831cfaf1eb8db41fd8965eea2dd6e03c7d | [
"MIT"
] | 7 | 2017-04-15T13:49:45.000Z | 2022-02-15T08:06:33.000Z | test/elixir_email_reply_parser_test.exs | hellogustav/elixir_email_reply_parser | e0cad1831cfaf1eb8db41fd8965eea2dd6e03c7d | [
"MIT"
] | 12 | 2017-03-28T16:56:23.000Z | 2019-10-16T13:41:12.000Z | test/elixir_email_reply_parser_test.exs | hellogustav/elixir_email_reply_parser | e0cad1831cfaf1eb8db41fd8965eea2dd6e03c7d | [
"MIT"
] | 2 | 2017-11-11T19:14:29.000Z | 2020-10-19T17:41:44.000Z | defmodule ElixirEmailReplyParserTest do
use ExUnit.Case, async: true
doctest ElixirEmailReplyParser
test "test_simple_body" do
email_message = get_email('email_1_1')
%ElixirEmailReplyParser.EmailMessage{fragments: fragments} = email_message
assert length(fragments) == 3
for fragment <- fragments,... | 40.360587 | 182 | 0.730366 |
1acc545cbbf5d5606efbc49e0c756624aee356c0 | 1,455 | exs | Elixir | test/ja_serializer/builder/resource_object_test.exs | gamesrol/ja_serializer | c48d8fb0fb742bd96c30acd40e24f7395f25af2c | [
"Apache-2.0"
] | null | null | null | test/ja_serializer/builder/resource_object_test.exs | gamesrol/ja_serializer | c48d8fb0fb742bd96c30acd40e24f7395f25af2c | [
"Apache-2.0"
] | null | null | null | test/ja_serializer/builder/resource_object_test.exs | gamesrol/ja_serializer | c48d8fb0fb742bd96c30acd40e24f7395f25af2c | [
"Apache-2.0"
] | null | null | null | defmodule JaSerializer.Builder.ResourceObjectTest do
use ExUnit.Case
defmodule ArticleSerializer do
use JaSerializer
def type, do: "articles"
attributes [:title, :body]
end
test "single resource object built correctly" do
a1 = %TestModel.Article{id: "a1", title: "a1", body: "a1"}
context... | 30.3125 | 91 | 0.676289 |
1acc945b4d466d97f9b8a114f231109021af2b9d | 1,315 | exs | Elixir | config/dev.exs | GoberInfinity/ExamplePhoenix | 4f2e016000a55dd4dbc28409dd214f0923e38e32 | [
"MIT"
] | null | null | null | config/dev.exs | GoberInfinity/ExamplePhoenix | 4f2e016000a55dd4dbc28409dd214f0923e38e32 | [
"MIT"
] | null | null | null | config/dev.exs | GoberInfinity/ExamplePhoenix | 4f2e016000a55dd4dbc28409dd214f0923e38e32 | [
"MIT"
] | null | null | null | use Mix.Config
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with brunch.io to recompile .js and .css sources.
config :otherpool, Otherpool.Endpoint,
http: [port: 4... | 29.886364 | 73 | 0.697338 |
1accbb3e8a5437230d1b8e5da9d8b6c1e7d14688 | 1,242 | ex | Elixir | apps/astarte_housekeeping_api/test/support/astarte_housekeeping_mock_db.ex | matt-mazzucato/astarte | 34d84941a5019efc42321052f7f34b7d907a38f2 | [
"Apache-2.0"
] | 1 | 2020-02-04T13:15:22.000Z | 2020-02-04T13:15:22.000Z | apps/astarte_housekeeping_api/test/support/astarte_housekeeping_mock_db.ex | matt-mazzucato/astarte | 34d84941a5019efc42321052f7f34b7d907a38f2 | [
"Apache-2.0"
] | 5 | 2019-11-18T17:06:34.000Z | 2019-12-19T10:03:59.000Z | apps/astarte_housekeeping_api/test/support/astarte_housekeeping_mock_db.ex | matt-mazzucato/astarte | 34d84941a5019efc42321052f7f34b7d907a38f2 | [
"Apache-2.0"
] | 2 | 2018-02-05T19:23:18.000Z | 2019-11-19T11:44:40.000Z | #
# This file is part of Astarte.
#
# Copyright 2017 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... | 27 | 74 | 0.723833 |
1acccf3cf4cdc5b670d6d8e826d7325021e434c4 | 1,142 | exs | Elixir | config/releases.exs | carlosviana/find_mypersonal | 6fadea6135b074a296c6f2a501a694b5222ec6db | [
"MIT"
] | null | null | null | config/releases.exs | carlosviana/find_mypersonal | 6fadea6135b074a296c6f2a501a694b5222ec6db | [
"MIT"
] | 6 | 2021-07-06T17:41:35.000Z | 2021-07-10T10:26:30.000Z | config/releases.exs | carlosviana/find_mypersonal | 6fadea6135b074a296c6f2a501a694b5222ec6db | [
"MIT"
] | null | null | null | import Config
database_url =
"postgres://etczizlc:UyFqB_6cuzWpfmw38ZoPwbrJfBDRb6ZW@tuffi.db.elephantsql.com/etczizlc" ||
raise """
environment variable DATABASE_URL is missing.
For example: ecto://USER:PASS@HOST/DATABASE
"""
config :findmy_personal, FindmyPersonal.Repo,
# ssl: true,
url: databas... | 30.052632 | 93 | 0.735552 |
1accd1e9e0f745dbe0774f12ac3d3acd0fb578a0 | 3,198 | ex | Elixir | clients/service_networking/lib/google_api/service_networking/v1/model/range_reservation.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/service_networking/lib/google_api/service_networking/v1/model/range_reservation.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/service_networking/lib/google_api/service_networking/v1/model/range_reservation.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 57.107143 | 396 | 0.752033 |
1acd283d7fa00ccd63ecf53ebfa704e4586aab4e | 4,263 | ex | Elixir | lib/conduit_amqp.ex | Moronisauner/conduit_amqp | 453af122b2f98c31034916097ad20b4128b51e7a | [
"MIT"
] | 9 | 2017-02-01T14:12:28.000Z | 2021-07-06T23:22:29.000Z | lib/conduit_amqp.ex | Moronisauner/conduit_amqp | 453af122b2f98c31034916097ad20b4128b51e7a | [
"MIT"
] | 77 | 2018-02-02T19:17:08.000Z | 2021-08-03T05:20:21.000Z | lib/conduit_amqp.ex | Moronisauner/conduit_amqp | 453af122b2f98c31034916097ad20b4128b51e7a | [
"MIT"
] | 10 | 2018-02-02T19:07:44.000Z | 2021-05-05T03:34:41.000Z | defmodule ConduitAMQP do
@moduledoc """
AMQP adapter for Conduit.
* `url` - Full connection url. Can be used instead of the individual connection options. Default is `amqp://guest:guest@localhost:5672/`.
* `host` - Hostname of the broker (defaults to \"localhost\");
* `port` - Port the broker is listen... | 29.4 | 141 | 0.642271 |
1acd6d5f09312d5be14864cdb4489a8953ea7aa9 | 1,965 | exs | Elixir | config/config.exs | prashantpawar/kitteh-test | 8b5b9e8a080b495ea6f506597a1bb66be56de064 | [
"MIT"
] | null | null | null | config/config.exs | prashantpawar/kitteh-test | 8b5b9e8a080b495ea6f506597a1bb66be56de064 | [
"MIT"
] | null | null | null | config/config.exs | prashantpawar/kitteh-test | 8b5b9e8a080b495ea6f506597a1bb66be56de064 | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
use Mix.Config
# General application configuration
config :kitteh_test,
ecto_repos: [KittehTest.Re... | 33.305085 | 75 | 0.754198 |
1acd80527b769310da3f306205dc3d001d083fcf | 1,419 | exs | Elixir | test/level_web/graphql/mutations/record_post_view_test.exs | pradyumna2905/level | 186878a128521074923edd7171eda2f1b181b4f4 | [
"Apache-2.0"
] | null | null | null | test/level_web/graphql/mutations/record_post_view_test.exs | pradyumna2905/level | 186878a128521074923edd7171eda2f1b181b4f4 | [
"Apache-2.0"
] | null | null | null | test/level_web/graphql/mutations/record_post_view_test.exs | pradyumna2905/level | 186878a128521074923edd7171eda2f1b181b4f4 | [
"Apache-2.0"
] | null | null | null | defmodule LevelWeb.GraphQL.RecordPostViewTest do
use LevelWeb.ConnCase, async: true
import LevelWeb.GraphQL.TestHelpers
alias Level.Posts.PostView
alias Level.Repo
@query """
mutation RecordPostView(
$space_id: ID!,
$post_id: ID!,
$reply_id: ID
) {
recordPostView(
spa... | 22.171875 | 90 | 0.541226 |
1acda9c22a9a019c5fdb6410339c0757e8ed847f | 2,265 | exs | Elixir | exercises/practice/rectangles/test/rectangles_test.exs | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 343 | 2017-06-22T16:28:28.000Z | 2022-03-25T21:33:32.000Z | exercises/practice/rectangles/test/rectangles_test.exs | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 583 | 2017-06-19T10:48:40.000Z | 2022-03-28T21:43:12.000Z | exercises/practice/rectangles/test/rectangles_test.exs | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 228 | 2017-07-05T07:09:32.000Z | 2022-03-27T08:59:08.000Z | defmodule RectanglesTest do
use ExUnit.Case
# @tag :pending
test "no rows" do
input = ""
assert Rectangles.count(input) == 0
end
@tag :pending
test "no columns" do
input = """
"""
assert Rectangles.count(input) == 0
end
@tag :pending
test "no rectangles" do
input = """
... | 15 | 61 | 0.445916 |
1acdab55b942295b5b8be4e628f7d31fd4688c56 | 2,669 | exs | Elixir | mix.exs | moustacheful/nerves_system_rpi_mt7601u | a65578674cff8ba5898184cea44db2255fdbe7d4 | [
"Apache-2.0"
] | null | null | null | mix.exs | moustacheful/nerves_system_rpi_mt7601u | a65578674cff8ba5898184cea44db2255fdbe7d4 | [
"Apache-2.0"
] | null | null | null | mix.exs | moustacheful/nerves_system_rpi_mt7601u | a65578674cff8ba5898184cea44db2255fdbe7d4 | [
"Apache-2.0"
] | null | null | null | defmodule NervesSystemRpiMT7601U.MixProject do
use Mix.Project
@app :nerves_system_rpi_mt7601u
@version Path.join(__DIR__, "VERSION")
|> File.read!()
|> String.trim()
def project do
[
app: @app,
version: @version,
elixir: "~> 1.6",
compilers: Mix.compilers() +... | 22.811966 | 76 | 0.584863 |
1ace1b21771cd8c0091f52e2afb94bbf1b9cb709 | 844 | ex | Elixir | lib/tortoise311/package/pubrec.ex | ngenic/tortoise311 | 18aa234c26f0e1d7b3dcac5dad562231346a20ef | [
"Apache-2.0"
] | 2 | 2021-12-23T21:51:31.000Z | 2022-02-20T22:29:24.000Z | lib/tortoise311/package/pubrec.ex | ngenic/tortoise311 | 18aa234c26f0e1d7b3dcac5dad562231346a20ef | [
"Apache-2.0"
] | 11 | 2021-11-18T01:23:15.000Z | 2022-03-28T18:15:18.000Z | lib/tortoise311/package/pubrec.ex | ngenic/tortoise311 | 18aa234c26f0e1d7b3dcac5dad562231346a20ef | [
"Apache-2.0"
] | 3 | 2021-11-19T16:23:38.000Z | 2022-03-18T11:36:54.000Z | defmodule Tortoise311.Package.Pubrec do
@moduledoc false
alias Tortoise311.Package
@opcode 5
@opaque t :: %__MODULE__{
__META__: Package.Meta.t(),
identifier: Tortoise311.package_identifier()
}
defstruct __META__: %Package.Meta{opcode: @opcode, flags: 0b000},
... | 28.133333 | 82 | 0.609005 |
1ace35654239ab31251bdcde4eaffc62d6e9db69 | 2,331 | exs | Elixir | test/predicate_test.exs | sebastian/excheck | 1a13bb582e6df9fcdec8dd2073f46d46cac255df | [
"MIT"
] | 318 | 2015-01-19T16:45:51.000Z | 2022-03-18T21:28:16.000Z | test/predicate_test.exs | sebastian/excheck | 1a13bb582e6df9fcdec8dd2073f46d46cac255df | [
"MIT"
] | 44 | 2015-01-04T13:02:20.000Z | 2019-08-08T19:35:21.000Z | test/predicate_test.exs | sebastian/excheck | 1a13bb582e6df9fcdec8dd2073f46d46cac255df | [
"MIT"
] | 35 | 2015-01-30T02:48:37.000Z | 2019-08-06T14:37:48.000Z | defmodule ExCheck.PredicateTest do
use ExUnit.Case, async: false
use ExCheck
import ExUnit.CaptureIO
property :implies do
for_all x in int() do
implies x >= 0 do
x >= 0
end
end
end
property :such_that do
for_all {x, y} in such_that({xx, yy} in {int(), int()} when xx < yy) d... | 22.2 | 114 | 0.594166 |
1ace6ccbab85a47ce3da04781df2dbd5922f3aec | 682 | ex | Elixir | web/gettext.ex | davidsantoso/z | f9918e308c802116351db00510fbfcd871150c1c | [
"MIT"
] | null | null | null | web/gettext.ex | davidsantoso/z | f9918e308c802116351db00510fbfcd871150c1c | [
"MIT"
] | null | null | null | web/gettext.ex | davidsantoso/z | f9918e308c802116351db00510fbfcd871150c1c | [
"MIT"
] | null | null | null | defmodule Z.Gettext do
@moduledoc """
A module providing Internationalization with a gettext-based API.
By using [Gettext](http://hexdocs.pm/gettext),
your module gains a set of macros for translations, for example:
import Z.Gettext
# Simple translation
gettext "Here is the string to transl... | 27.28 | 71 | 0.668622 |
1ace7e416300eaae64d1ff521be9b997bdd3925d | 671 | ex | Elixir | lib/app_api/cart_item.ex | turbo-play/phoenix-services | 9d3318c6b5d5ce6dead441758fc86ec34892b0f6 | [
"Apache-2.0"
] | 2 | 2018-07-05T15:13:12.000Z | 2021-12-16T08:58:56.000Z | lib/app_api/cart_item.ex | turbo-play/phoenix-services | 9d3318c6b5d5ce6dead441758fc86ec34892b0f6 | [
"Apache-2.0"
] | null | null | null | lib/app_api/cart_item.ex | turbo-play/phoenix-services | 9d3318c6b5d5ce6dead441758fc86ec34892b0f6 | [
"Apache-2.0"
] | 2 | 2018-08-13T21:37:00.000Z | 2021-11-10T04:08:26.000Z | defmodule AppApi.CartItem do
use Ecto.Schema
import Ecto.Changeset
alias AppApi.{Game, Cart, Repo}
@primary_key {:id, :binary_id, autogenerate: true}
@foreign_key_type :binary_id
schema "cart_items" do
field :qty, :integer
belongs_to :game, Game
belongs_to :cart, Cart
timestamps()
end
... | 20.333333 | 52 | 0.669151 |
1ace9d9bb4fc1da8676b380700cf85beab8af3cf | 76 | exs | Elixir | apps/hometree/test/views/page_view_test.exs | sheltont/pandora | a83a67000cfd1171bca90fade9de4a69bec3587f | [
"MIT"
] | null | null | null | apps/hometree/test/views/page_view_test.exs | sheltont/pandora | a83a67000cfd1171bca90fade9de4a69bec3587f | [
"MIT"
] | null | null | null | apps/hometree/test/views/page_view_test.exs | sheltont/pandora | a83a67000cfd1171bca90fade9de4a69bec3587f | [
"MIT"
] | null | null | null | defmodule Hometree.PageViewTest do
use Hometree.ConnCase, async: true
end
| 19 | 36 | 0.815789 |
1aceb155bb5dc733376e4dd2923666069fcb15aa | 134 | ex | Elixir | web/controllers/page_controller.ex | appdojolabs/myapp | 41887a60f7ea86db3c70470631b703455c865042 | [
"MIT"
] | 41 | 2017-05-21T14:33:28.000Z | 2022-03-28T22:29:56.000Z | web/controllers/page_controller.ex | DMeechan/deploy-elixir-docker-example | b63a46453629ced5134aba039575a3c010a6f2a1 | [
"MIT"
] | 2 | 2017-07-23T07:06:38.000Z | 2018-07-16T23:53:12.000Z | web/controllers/page_controller.ex | appdojolabs/myapp | 41887a60f7ea86db3c70470631b703455c865042 | [
"MIT"
] | 16 | 2017-05-21T22:35:10.000Z | 2022-03-28T22:30:04.000Z | defmodule Myapp.PageController do
use Myapp.Web, :controller
def index(conn, _params) do
render conn, "index.html"
end
end
| 16.75 | 33 | 0.723881 |
1acec308a92291c4c505cbe6eaad78d7149ebb9e | 241 | ex | Elixir | lib/kaffy_web/views/product_view.ex | functionaryco/komos_admin | 20e0c3d302c5dd8ac72da795f6073d496e327d52 | [
"MIT"
] | 1 | 2021-02-10T09:47:21.000Z | 2021-02-10T09:47:21.000Z | lib/kaffy_web/views/product_view.ex | functionaryco/komos_admin | 20e0c3d302c5dd8ac72da795f6073d496e327d52 | [
"MIT"
] | null | null | null | lib/kaffy_web/views/product_view.ex | functionaryco/komos_admin | 20e0c3d302c5dd8ac72da795f6073d496e327d52 | [
"MIT"
] | null | null | null | defmodule KaffyWeb.ProductView do
@moduledoc false
use Phoenix.View,
root: "lib/kaffy_web/templates",
namespace: KaffyWeb
# import Phoenix.Controller, only: [get_flash: 1, get_flash: 2, view_module: 1]
use Phoenix.HTML
end
| 21.909091 | 81 | 0.73029 |
1acf08dd7aeb23f9322235dcd43027fda962d713 | 610 | ex | Elixir | test/support/pages/sign_in_page.ex | bus-detective/pro | d313f4facdb4c9229bd7a022eeabb85170000e18 | [
"MIT"
] | null | null | null | test/support/pages/sign_in_page.ex | bus-detective/pro | d313f4facdb4c9229bd7a022eeabb85170000e18 | [
"MIT"
] | null | null | null | test/support/pages/sign_in_page.ex | bus-detective/pro | d313f4facdb4c9229bd7a022eeabb85170000e18 | [
"MIT"
] | null | null | null | defmodule BdPro.SignInPage do
use BdPro.Page
def visit do
navigate_to("/session/new")
end
def sign_in(%{email: email, password: password}) do
fill_field({:css, ".qa-session-email"}, email)
fill_field({:css, ".qa-session-password"}, password)
click({:css, ".qa-session-submit"})
end
def sig... | 21.785714 | 75 | 0.64918 |
1acf13bbb3f7219cc2d5ede596bc0fe9f81da3ba | 1,796 | ex | Elixir | lib/makeup/styles/html/pygments/rainbow_dash.ex | rubysolo/makeup | e1c5d27e3f14c04904d74b94b6298bbc28a406c3 | [
"BSD-2-Clause"
] | null | null | null | lib/makeup/styles/html/pygments/rainbow_dash.ex | rubysolo/makeup | e1c5d27e3f14c04904d74b94b6298bbc28a406c3 | [
"BSD-2-Clause"
] | null | null | null | lib/makeup/styles/html/pygments/rainbow_dash.ex | rubysolo/makeup | e1c5d27e3f14c04904d74b94b6298bbc28a406c3 | [
"BSD-2-Clause"
] | null | null | null |
defmodule Makeup.Styles.HTML.RainbowDashStyle do
@moduledoc false
require Makeup.Token.TokenTypes
alias Makeup.Token.TokenTypes, as: Tok
@styles %{
Tok.text => "#4d4d4d",
Tok.error => "bg:#cc0000 #ffffff",
Tok.keyword => "bold #2c5dcd",
Tok.keyword_pseudo => "nobold",
Tok.keyword_type => ... | 30.440678 | 56 | 0.632517 |
1acf14b0cc75c93b77184e78fc907391b307a9f7 | 29,035 | ex | Elixir | lib/mix/lib/mix/tasks/xref.ex | chrysocolla/elixir | 8203cf171ae4c1c3149342e7f4acd9b265510add | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/tasks/xref.ex | chrysocolla/elixir | 8203cf171ae4c1c3149342e7f4acd9b265510add | [
"Apache-2.0"
] | 1 | 2021-10-21T08:22:30.000Z | 2021-10-21T08:22:30.000Z | lib/mix/lib/mix/tasks/xref.ex | chrysocolla/elixir | 8203cf171ae4c1c3149342e7f4acd9b265510add | [
"Apache-2.0"
] | null | null | null | defmodule Mix.Tasks.Xref do
use Mix.Task
import Mix.Compilers.Elixir,
only: [read_manifest: 1, source: 0, source: 1, source: 2, module: 1]
@shortdoc "Prints cross reference information"
@recursive true
@manifest "compile.elixir"
@moduledoc """
Prints cross reference information between modules.
... | 30.371339 | 98 | 0.630963 |
1acf231ddd060b39cdfdd3e6f261fb753da21416 | 2,406 | exs | Elixir | test/credo/code/strings_test.exs | elixir-twister/credo | 619e0ec6e244c5e0c12eeeb58ed9de97e1571d99 | [
"MIT"
] | null | null | null | test/credo/code/strings_test.exs | elixir-twister/credo | 619e0ec6e244c5e0c12eeeb58ed9de97e1571d99 | [
"MIT"
] | null | null | null | test/credo/code/strings_test.exs | elixir-twister/credo | 619e0ec6e244c5e0c12eeeb58ed9de97e1571d99 | [
"MIT"
] | null | null | null | defmodule Credo.Code.StringsTest do
use Credo.TestHelper
alias Credo.Code.Strings
test "it should return the source without string literals 2" do
source = """
@moduledoc \"\"\"
this is an example # TODO: and this is no actual comment
\"\"\"
x = ~s{also: # TODO: no comment here}
?" # TODO: this is the third... | 21.292035 | 86 | 0.536991 |
1acf3edd5d4222298496ee8f5f368c38caccaac4 | 996 | exs | Elixir | exercises/difference-of-squares/test/difference_of_squares_test.exs | DuoPan/elixir | e96388f242c383c1f45935570ed2f42394171fc6 | [
"MIT"
] | null | null | null | exercises/difference-of-squares/test/difference_of_squares_test.exs | DuoPan/elixir | e96388f242c383c1f45935570ed2f42394171fc6 | [
"MIT"
] | null | null | null | exercises/difference-of-squares/test/difference_of_squares_test.exs | DuoPan/elixir | e96388f242c383c1f45935570ed2f42394171fc6 | [
"MIT"
] | null | null | null | defmodule DifferenceOfSquaresTest do
use ExUnit.Case
# @tag :pending
test "square of sum to 5" do
assert Squares.square_of_sum(5) == 225
end
# @tag :pending
test "sum of squares to 5" do
assert Squares.sum_of_squares(5) == 55
end
# @tag :pending
test "difference of sum to 5" do
assert S... | 20.326531 | 51 | 0.665663 |
1acf453f4761913899f59c821306922cbcb8374d | 3,124 | exs | Elixir | apps/concierge_site/test/web/views/route_select_helper_test.exs | mbta/alerts_concierge | d8e643445ef06f80ca273f2914c6959daea146f6 | [
"MIT"
] | null | null | null | apps/concierge_site/test/web/views/route_select_helper_test.exs | mbta/alerts_concierge | d8e643445ef06f80ca273f2914c6959daea146f6 | [
"MIT"
] | 21 | 2021-03-12T17:05:30.000Z | 2022-02-16T21:48:35.000Z | apps/concierge_site/test/web/views/route_select_helper_test.exs | mbta/alerts_concierge | d8e643445ef06f80ca273f2914c6959daea146f6 | [
"MIT"
] | 1 | 2021-12-09T15:09:53.000Z | 2021-12-09T15:09:53.000Z | defmodule ConciergeSite.RouteSelectHelperTest do
@moduledoc false
use ExUnit.Case, async: true
alias ConciergeSite.RouteSelectHelper
test "render/2" do
html = Phoenix.HTML.safe_to_string(RouteSelectHelper.render(:foo, :bar))
assert html =~
"<select class=\"form-control\" data-type=\"route... | 30.330097 | 139 | 0.565301 |
1acf4cc7cb5a348a9e6a50aafa321c8cd053af2d | 1,598 | ex | Elixir | lib/makeup/styles/html/pygments/paraiso-dark.ex | rubysolo/makeup | e1c5d27e3f14c04904d74b94b6298bbc28a406c3 | [
"BSD-2-Clause"
] | null | null | null | lib/makeup/styles/html/pygments/paraiso-dark.ex | rubysolo/makeup | e1c5d27e3f14c04904d74b94b6298bbc28a406c3 | [
"BSD-2-Clause"
] | null | null | null | lib/makeup/styles/html/pygments/paraiso-dark.ex | rubysolo/makeup | e1c5d27e3f14c04904d74b94b6298bbc28a406c3 | [
"BSD-2-Clause"
] | null | null | null |
defmodule Makeup.Styles.HTML.ParaisoDarkStyle do
@moduledoc false
require Makeup.Token.TokenTypes
alias Makeup.Token.TokenTypes, as: Tok
@styles %{
Tok.text => "#e7e9db",
Tok.error => "#ef6155",
Tok.keyword => "#815ba4",
Tok.keyword_namespace => "#5bc4bf",
Tok.keyword_type => "#fec418",
... | 28.035088 | 48 | 0.614518 |
1acf504d6ed76a9dd59f9f935353085c81b26e5e | 1,134 | exs | Elixir | config/config.exs | warmwaffles/file_store | 6b6f4cf4ef036b616915ce0dffd5de05e0b021de | [
"MIT"
] | null | null | null | config/config.exs | warmwaffles/file_store | 6b6f4cf4ef036b616915ce0dffd5de05e0b021de | [
"MIT"
] | null | null | null | config/config.exs | warmwaffles/file_store | 6b6f4cf4ef036b616915ce0dffd5de05e0b021de | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
import 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 parent... | 36.580645 | 73 | 0.753086 |
1acf93a50c3511686aa5f0887d5e399decffcd42 | 439 | exs | Elixir | test/elixbwe_web/views/error_view_test.exs | pwgn/elixbwe | ce8baedfb923d36991ff944de368ce7008e72805 | [
"MIT"
] | 1 | 2019-03-17T15:04:36.000Z | 2019-03-17T15:04:36.000Z | test/elixbwe_web/views/error_view_test.exs | pwgn/elixbwe | ce8baedfb923d36991ff944de368ce7008e72805 | [
"MIT"
] | null | null | null | test/elixbwe_web/views/error_view_test.exs | pwgn/elixbwe | ce8baedfb923d36991ff944de368ce7008e72805 | [
"MIT"
] | null | null | null | defmodule ElixbweWeb.ErrorViewTest do
use ElixbweWeb.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(ElixbweWeb.ErrorView, "404.html", []) ==
"Not Found"
end
test "renders 500.html... | 25.823529 | 68 | 0.697039 |
1acf9d45042f4ee3b1568abdd2791ba06362afa7 | 1,928 | ex | Elixir | apps/api_web/lib/api_web/rate_limiter/ets.ex | fjlanasa/api | c39bc393aea572bfb81754b2ea1adf9dda9ce24a | [
"MIT"
] | 62 | 2019-01-17T12:34:39.000Z | 2022-03-20T21:49:47.000Z | apps/api_web/lib/api_web/rate_limiter/ets.ex | fjlanasa/api | c39bc393aea572bfb81754b2ea1adf9dda9ce24a | [
"MIT"
] | 375 | 2019-02-13T15:30:50.000Z | 2022-03-30T18:50:41.000Z | apps/api_web/lib/api_web/rate_limiter/ets.ex | fjlanasa/api | c39bc393aea572bfb81754b2ea1adf9dda9ce24a | [
"MIT"
] | 14 | 2019-01-16T19:35:57.000Z | 2022-02-26T18:55:54.000Z | defmodule ApiWeb.RateLimiter.ETS do
@moduledoc """
RateLimiter backend which uses an ETS table as the backend.
"""
@behaviour ApiWeb.RateLimiter.Limiter
use GenServer
@tab :mbta_api_rate_limiter
@impl ApiWeb.RateLimiter.Limiter
def start_link(opts) do
GenServer.start_link(__MODULE__, opts, name: _... | 24.1 | 95 | 0.679461 |
1acf9ef603c81d99151986ce90c559c428f682f6 | 164 | ex | Elixir | lib/Sdws/sdws.ex | truoko/sdws | 24d5de4d4c02b3fa8045e504380621839baa3de8 | [
"MIT"
] | null | null | null | lib/Sdws/sdws.ex | truoko/sdws | 24d5de4d4c02b3fa8045e504380621839baa3de8 | [
"MIT"
] | null | null | null | lib/Sdws/sdws.ex | truoko/sdws | 24d5de4d4c02b3fa8045e504380621839baa3de8 | [
"MIT"
] | null | null | null | # Simple distributed web server
defmodule Sdws do
def start(port \\ 80) do
:pg2.create(:worker)
Sdws.Top.Supervisor.start_link(port)
end
end | 23.428571 | 44 | 0.664634 |
1acfb04ce5742b7ef2033ecfeedb004bb12e866c | 188 | ex | Elixir | lib/rank.ex | denispeplin/rank | f60eaad6ce9bae43a8ccbf9d0f667fb47f500863 | [
"MIT"
] | 58 | 2017-06-12T19:17:10.000Z | 2022-03-08T10:47:43.000Z | lib/rank.ex | denispeplin/rank | f60eaad6ce9bae43a8ccbf9d0f667fb47f500863 | [
"MIT"
] | 2 | 2017-06-15T05:53:43.000Z | 2019-03-31T16:01:05.000Z | lib/rank.ex | denispeplin/rank | f60eaad6ce9bae43a8ccbf9d0f667fb47f500863 | [
"MIT"
] | 5 | 2017-12-06T03:33:12.000Z | 2021-07-30T20:35:33.000Z | defmodule Rank do
@moduledoc """
Documentation for Rank.
"""
@doc """
Hello world.
## Examples
iex> Rank.hello
:world
"""
def hello do
:world
end
end
| 9.894737 | 25 | 0.547872 |
1acfecae2d5020ec6ac15a7fa3821ac55c10723a | 2,878 | ex | Elixir | lib/chat_api/accounts/account.ex | weisk/papercups | 118cd6206ecbe382c6e4fa6bee11f726e83fc1cb | [
"MIT"
] | null | null | null | lib/chat_api/accounts/account.ex | weisk/papercups | 118cd6206ecbe382c6e4fa6bee11f726e83fc1cb | [
"MIT"
] | 1 | 2021-01-17T10:42:34.000Z | 2021-01-17T10:42:34.000Z | lib/chat_api/accounts/account.ex | BotCart/papercups | 7e7533ac8a8becc114060ab5033376c6aab4b369 | [
"MIT"
] | null | null | null | defmodule ChatApi.Accounts.Account do
use Ecto.Schema
import Ecto.Changeset
alias ChatApi.Accounts.{Settings, WorkingHours}
alias ChatApi.Customers.Customer
alias ChatApi.Conversations.Conversation
alias ChatApi.Messages.Message
alias ChatApi.Users.User
alias ChatApi.WidgetSettings.WidgetSetting
@ty... | 29.979167 | 70 | 0.666088 |
1acffcd3c12e57900d61f8ebfb1bb05030fec793 | 4,341 | ex | Elixir | lib/sobelow/config/csp.ex | juancgalvis/sobelow | 9ae3874c26ab7cfa6c8a8517ccd02af98e187585 | [
"Apache-2.0"
] | 1,305 | 2017-05-12T21:09:40.000Z | 2022-03-31T04:31:49.000Z | lib/sobelow/config/csp.ex | juancgalvis/sobelow | 9ae3874c26ab7cfa6c8a8517ccd02af98e187585 | [
"Apache-2.0"
] | 95 | 2017-05-15T09:45:41.000Z | 2022-03-23T03:35:48.000Z | lib/sobelow/config/csp.ex | juancgalvis/sobelow | 9ae3874c26ab7cfa6c8a8517ccd02af98e187585 | [
"Apache-2.0"
] | 86 | 2017-05-15T20:18:59.000Z | 2022-02-11T22:10:34.000Z | defmodule Sobelow.Config.CSP do
@moduledoc """
# Missing Content-Security-Policy
Content-Security-Policy is an HTTP header that helps mitigate
a number of attacks, including Cross-Site Scripting.
Read more about CSP here:
https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP
Missing Content-Security-Po... | 28.559211 | 100 | 0.658143 |
1ad0641b0794b78f41f38efbf027bec3db810cba | 754 | ex | Elixir | Microsoft.Azure.Management.Database.CosmosDb/lib/microsoft/azure/management/database/cosmos_db/model/metric_list_result.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.Database.CosmosDb/lib/microsoft/azure/management/database/cosmos_db/model/metric_list_result.ex | chgeuer/ex_microsoft_azure_management | 99cd9f7f2ff1fdbe69ca5bac55b6e2af91ba3603 | [
"Apache-2.0"
] | null | null | null | Microsoft.Azure.Management.Database.CosmosDb/lib/microsoft/azure/management/database/cosmos_db/model/metric_list_result.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.Database.CosmosDb.Model.MetricListResult do
@moduledoc """
The response to a list metrics request.
"""
@derive... | 26.928571 | 103 | 0.738727 |
1ad078d29e20badb13de3abd949d2c05d888982d | 1,821 | ex | Elixir | architect/lib/architect/events/events.ex | VJftw/velocity | 8335c39c510dbde1446e6cde03eebb450339d212 | [
"Apache-2.0"
] | 3 | 2017-12-09T21:05:54.000Z | 2019-08-06T08:13:34.000Z | architect/lib/architect/events/events.ex | VJftw/velocity | 8335c39c510dbde1446e6cde03eebb450339d212 | [
"Apache-2.0"
] | 63 | 2017-09-09T15:44:24.000Z | 2022-03-03T22:16:24.000Z | architect/lib/architect/events/events.ex | VJftw/velocity | 8335c39c510dbde1446e6cde03eebb450339d212 | [
"Apache-2.0"
] | 5 | 2017-09-14T00:17:22.000Z | 2019-11-27T14:43:45.000Z | defmodule Architect.Events do
alias Architect.Repo
alias Architect.Events.Event
alias Architect.Projects.Project
alias Architect.KnownHosts.KnownHost
alias Architect.Accounts.User
import Ecto.Query
@project_events [:project_created]
@known_host_events [:known_host_created, :known_host_verified]
def ... | 21.423529 | 72 | 0.643602 |
1ad09b7d1ae7b902b999879e9f4b6103021008f9 | 6 | ex | Elixir | testData/org/elixir_lang/parser_definition/decimal_float_parsing_test_case/IntegralDecimalMarkFractionalPlusExponent.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/decimal_float_parsing_test_case/IntegralDecimalMarkFractionalPlusExponent.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/decimal_float_parsing_test_case/IntegralDecimalMarkFractionalPlusExponent.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 145 | 2015-01-15T11:37:16.000Z | 2021-12-22T05:51:02.000Z | 1.2e+3 | 6 | 6 | 0.666667 |
1ad0a9751f23fa564b0d1748add3d86477144285 | 6,099 | exs | Elixir | test/ua_inspector/parser/device_test.exs | elixytics/ua_inspector | 11fd98f69b7853b70529ee73355ef57851248572 | [
"Apache-2.0"
] | 57 | 2015-04-07T03:10:45.000Z | 2019-03-11T01:01:40.000Z | test/ua_inspector/parser/device_test.exs | elixytics/ua_inspector | 11fd98f69b7853b70529ee73355ef57851248572 | [
"Apache-2.0"
] | 16 | 2015-03-09T19:56:17.000Z | 2019-03-16T14:24:02.000Z | test/ua_inspector/parser/device_test.exs | elixytics/ua_inspector | 11fd98f69b7853b70529ee73355ef57851248572 | [
"Apache-2.0"
] | 15 | 2015-02-02T23:14:00.000Z | 2019-03-16T13:15:05.000Z | defmodule UAInspector.Parser.DeviceTest do
use ExUnit.Case, async: true
alias UAInspector.Result
test "#1" do
agent =
"Tiphone T67/1.0 Browser/wap2.0 Sync/SyncClient1.1 Profile/MIDP-2.0 Configuration/CLDC-1.1"
parsed = UAInspector.parse(agent)
result = %Result.Device{brand: "TiPhone", model: ... | 28.905213 | 330 | 0.66142 |
1ad0ccd39f9b0e3a167f75f2e706c6a49badc428 | 2,717 | ex | Elixir | lib/wise_homex/api_client_impl/creator.ex | wise-home/wise_homex | 851f13191ed67acb1003888c12f4e6b71800d31b | [
"MIT"
] | 2 | 2019-03-14T09:09:14.000Z | 2020-11-25T06:44:46.000Z | lib/wise_homex/api_client_impl/creator.ex | wise-home/wise_homex | 851f13191ed67acb1003888c12f4e6b71800d31b | [
"MIT"
] | 139 | 2019-03-14T06:58:55.000Z | 2022-03-29T12:28:09.000Z | lib/wise_homex/api_client_impl/creator.ex | wise-home/wise_homex | 851f13191ed67acb1003888c12f4e6b71800d31b | [
"MIT"
] | 7 | 2021-04-09T13:55:45.000Z | 2021-04-16T15:49:36.000Z | defmodule WiseHomex.ApiClientImpl.Creator do
@moduledoc """
Auto generator for api client implementation functions at compile time.
"""
@doc """
When a module uses this module, we will inject the autogenerated api client functions.
"""
defmacro __using__([]) do
WiseHomex.ApiDefinition.api_endpoints()... | 28.302083 | 88 | 0.626058 |
1ad0e6c7b71ec31d9e64b4701e9f495dcdb09df3 | 16,154 | exs | Elixir | test/mix/tasks/phx.gen.html_test.exs | Jayshua/phoenix | 070a5c6e4f698e5ba472e0bf615e149cedcad3b5 | [
"MIT"
] | null | null | null | test/mix/tasks/phx.gen.html_test.exs | Jayshua/phoenix | 070a5c6e4f698e5ba472e0bf615e149cedcad3b5 | [
"MIT"
] | null | null | null | test/mix/tasks/phx.gen.html_test.exs | Jayshua/phoenix | 070a5c6e4f698e5ba472e0bf615e149cedcad3b5 | [
"MIT"
] | 1 | 2020-11-30T18:56:22.000Z | 2020-11-30T18:56:22.000Z | Code.require_file "../../../installer/test/mix_helper.exs", __DIR__
defmodule Mix.Tasks.Phx.Gen.HtmlTest do
use ExUnit.Case
import MixHelper
alias Mix.Tasks.Phx.Gen
setup do
Mix.Task.clear()
:ok
end
test "invalid mix arguments", config do
in_tmp_project config.test, fn ->
assert_raise M... | 40.690176 | 144 | 0.639346 |
1ad0ec066997cf3dcebe245afd7da252d877956a | 660 | exs | Elixir | priv/repo/migrations/20181212044026_create_books.exs | allen-garvey/booklist-phoenix | b3c87713d742b64684c222cd3e5869dc9fbd2bd2 | [
"MIT"
] | 4 | 2019-10-04T16:11:15.000Z | 2021-08-18T21:00:13.000Z | apps/booklist/priv/repo/migrations/20181212044026_create_books.exs | allen-garvey/phoenix-umbrella | 1d444bbd62a5e7b5f51d317ce2be71ee994125d5 | [
"MIT"
] | 5 | 2020-03-16T23:52:25.000Z | 2021-09-03T16:52:17.000Z | priv/repo/migrations/20181212044026_create_books.exs | allen-garvey/booklist-phoenix | b3c87713d742b64684c222cd3e5869dc9fbd2bd2 | [
"MIT"
] | null | null | null | defmodule Booklist.Repo.Migrations.CreateBooks do
use Ecto.Migration
def change do
create table(:books) do
add :title, :text, null: false
add :sort_title, :text, null: false
add :subtitle, :text
add :is_fiction, :boolean, default: false, null: false
add :is_active, :boolean, defau... | 30 | 74 | 0.665152 |
1ad0faaef73f82f945f7bb54d661e1af825344ba | 5,356 | ex | Elixir | lib/mazaryn_web/controllers/core/user_controller.ex | mazarynxyz/Mazaryn | b84d08d236cbcd356c8b7ec6215c5c0b411b9617 | [
"Apache-2.0"
] | null | null | null | lib/mazaryn_web/controllers/core/user_controller.ex | mazarynxyz/Mazaryn | b84d08d236cbcd356c8b7ec6215c5c0b411b9617 | [
"Apache-2.0"
] | null | null | null | lib/mazaryn_web/controllers/core/user_controller.ex | mazarynxyz/Mazaryn | b84d08d236cbcd356c8b7ec6215c5c0b411b9617 | [
"Apache-2.0"
] | null | null | null | defmodule MazarynWeb.UserController do
use MazarynWeb, :controller
alias Account.Users
alias Mazaryn.Token
@registeration_schema %{
username: [type: :string, length: [min: 3], required: true],
password: [type: :string, required: true],
email: [type: :string, required: true],
}
@login_schema ... | 32.460606 | 139 | 0.577857 |
1ad124ce70f6edf243be439b23d2c292dce1c5af | 3,535 | exs | Elixir | test/jumubase_web/controllers/performance_controller_test.exs | richeterre/jumubase-phoenix | 7584f890af117d496971b5284bf9de798e22266f | [
"MIT"
] | 2 | 2019-01-20T07:03:30.000Z | 2019-04-11T10:20:14.000Z | test/jumubase_web/controllers/performance_controller_test.exs | richeterre/jumubase-phoenix | 7584f890af117d496971b5284bf9de798e22266f | [
"MIT"
] | 6 | 2018-09-20T05:52:14.000Z | 2019-04-23T19:27:39.000Z | test/jumubase_web/controllers/performance_controller_test.exs | richeterre/jumubase-phoenix | 7584f890af117d496971b5284bf9de798e22266f | [
"MIT"
] | null | null | null | defmodule JumubaseWeb.PerformanceControllerTest do
use JumubaseWeb.ConnCase
use Bamboo.Test
@today Timex.today()
@yesterday Timex.shift(@today, days: -1)
setup context do
deadline = Map.get(context, :deadline, @today)
allows_registration = Map.get(context, :allows_registration, true)
contest = ... | 32.431193 | 111 | 0.672419 |
1ad138c5c7d4216ef5b8259cbdd45b28c2731f56 | 2,150 | ex | Elixir | clients/app_engine/lib/google_api/app_engine/v1/model/google_appengine_v1beta_location_metadata.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/app_engine/lib/google_api/app_engine/v1/model/google_appengine_v1beta_location_metadata.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/app_engine/lib/google_api/app_engine/v1/model/google_appengine_v1beta_location_metadata.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.566038 | 193 | 0.751628 |
1ad1535d450d3a0867a350c438ea0bd4d7212be9 | 356 | ex | Elixir | exercises/concurrency/tic.ex | Murre3/ID1019 | 8240d07be35843610c6c14a40bcb3ed21b3ea36f | [
"MIT"
] | null | null | null | exercises/concurrency/tic.ex | Murre3/ID1019 | 8240d07be35843610c6c14a40bcb3ed21b3ea36f | [
"MIT"
] | null | null | null | exercises/concurrency/tic.ex | Murre3/ID1019 | 8240d07be35843610c6c14a40bcb3ed21b3ea36f | [
"MIT"
] | null | null | null | defmodule Tic do
def first do
receive do
{:tic, x} -> IO.inspect(x)
second()
end
end
defp second do
receive do
{:tac, x} ->
IO.inspect(x)
last()
{:toe, x} ->
IO.inspect(x)
last()
end
end
defp last do
receive do
x ->
... | 12.275862 | 32 | 0.452247 |
1ad199b28fa82b2653a0d60aac972a93ddea36f1 | 193 | ex | Elixir | apps/wechat_base/lib/wechat_base/api/endpoint/body_type/constant.ex | secretworry/exwechat | 2d3a8bf03135eebd58452122c2f7b3718b5f5b3d | [
"Apache-2.0"
] | null | null | null | apps/wechat_base/lib/wechat_base/api/endpoint/body_type/constant.ex | secretworry/exwechat | 2d3a8bf03135eebd58452122c2f7b3718b5f5b3d | [
"Apache-2.0"
] | null | null | null | apps/wechat_base/lib/wechat_base/api/endpoint/body_type/constant.ex | secretworry/exwechat | 2d3a8bf03135eebd58452122c2f7b3718b5f5b3d | [
"Apache-2.0"
] | null | null | null | defmodule WechatBase.Api.Endpoint.BodyType.Constant do
@behaviour WechatBase.Api.Endpoint.BodyType
def init(constant), do: constant
def embed(_conn, constant), do: {:ok, constant}
end | 21.444444 | 54 | 0.761658 |
1ad1c8536efde893fb3e8edf92c3f97a4c91604c | 2,150 | exs | Elixir | mix.exs | leandroslc/rocketpay | 92e807998ca48e842a30f10be681481271905691 | [
"MIT"
] | null | null | null | mix.exs | leandroslc/rocketpay | 92e807998ca48e842a30f10be681481271905691 | [
"MIT"
] | null | null | null | mix.exs | leandroslc/rocketpay | 92e807998ca48e842a30f10be681481271905691 | [
"MIT"
] | null | null | null | defmodule Rocketpay.MixProject do
use Mix.Project
def project do
[
app: :rocketpay,
version: "0.1.0",
elixir: "~> 1.7",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
start_permanent: Mix.env() == :prod,
aliases: aliases(),... | 27.922078 | 84 | 0.563721 |
1ad1f28ebbd9327c8dd09c52101b9598b0329727 | 59 | ex | Elixir | lib/eligit_web/views/page_view.ex | spawnfest/fuchsia-team | 26aa4ee5a6e8ab023ef9038a35b35f4deed16a7d | [
"MIT"
] | 2 | 2019-05-25T18:34:43.000Z | 2020-01-20T17:35:31.000Z | lib/eligit_web/views/page_view.ex | spawnfest/fuchsia-team | 26aa4ee5a6e8ab023ef9038a35b35f4deed16a7d | [
"MIT"
] | 1 | 2019-01-25T19:16:23.000Z | 2019-08-30T18:40:10.000Z | lib/eligit_web/views/page_view.ex | spawnfest/fuchsia-team | 26aa4ee5a6e8ab023ef9038a35b35f4deed16a7d | [
"MIT"
] | null | null | null | defmodule EligitWeb.PageView do
use EligitWeb, :view
end
| 14.75 | 31 | 0.79661 |
1ad1f3ea4db0e5d0a01458ae9c3f92e43c7122ad | 2,364 | exs | Elixir | config/prod.exs | ldd/hn_comments_game | 5f720621c549a3737c155f9d59fa8277491f3b16 | [
"MIT"
] | 5 | 2020-05-15T17:06:22.000Z | 2020-06-20T12:05:46.000Z | config/prod.exs | ldd/hn_comments_game | 5f720621c549a3737c155f9d59fa8277491f3b16 | [
"MIT"
] | null | null | null | config/prod.exs | ldd/hn_comments_game | 5f720621c549a3737c155f9d59fa8277491f3b16 | [
"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.369231 | 66 | 0.711506 |
1ad1f4b1976957c010c05fcc12ea7e108318c230 | 3,392 | exs | Elixir | priv/templates/phx.gen.context/test_cases.exs | raspo/phoenix | 438b74255e7a4d68b4eaf1a295d0fcd201c71421 | [
"MIT"
] | 8 | 2019-06-02T05:02:36.000Z | 2021-08-11T04:23:10.000Z | priv/templates/phx.gen.context/test_cases.exs | raspo/phoenix | 438b74255e7a4d68b4eaf1a295d0fcd201c71421 | [
"MIT"
] | 7 | 2019-05-15T08:32:51.000Z | 2020-06-10T07:46:43.000Z | priv/templates/phx.gen.context/test_cases.exs | raspo/phoenix | 438b74255e7a4d68b4eaf1a295d0fcd201c71421 | [
"MIT"
] | 1 | 2019-06-02T05:02:47.000Z | 2019-06-02T05:02:47.000Z |
describe "<%= schema.plural %>" do
alias <%= inspect schema.module %>
@valid_attrs <%= inspect schema.params.create %>
@update_attrs <%= inspect schema.params.update %>
@invalid_attrs <%= inspect for {key, _} <- schema.params.create, into: %{}, do: {key, nil} %>
def <%= schema.singular %>_fixtu... | 55.606557 | 202 | 0.602889 |
1ad1f87f003787e866271cdb0df5ad29777d0146 | 312 | exs | Elixir | apps/shopping/priv/repo/migrations/20201027221000_create_categories.exs | paulanthonywilson/shopping | 11870c4d70b04fb139908793102ce3917d189275 | [
"MIT"
] | null | null | null | apps/shopping/priv/repo/migrations/20201027221000_create_categories.exs | paulanthonywilson/shopping | 11870c4d70b04fb139908793102ce3917d189275 | [
"MIT"
] | null | null | null | apps/shopping/priv/repo/migrations/20201027221000_create_categories.exs | paulanthonywilson/shopping | 11870c4d70b04fb139908793102ce3917d189275 | [
"MIT"
] | null | null | null | defmodule Shopping.Repo.Migrations.CreateCategories do
use Ecto.Migration
def change do
create table(:categories) do
add :emoji, :string
add :category_name, :string
add :ordering, :integer
timestamps()
end
create index(:categories, [:ordering], unique: true)
end
end
| 19.5 | 56 | 0.676282 |
1ad22967b25159ed317d48c2f409037393c3111e | 1,068 | ex | Elixir | lib/rankings_web/channels/user_socket.ex | spkane31/cc-rankings | 0acda9f3ca35abd4874ab06478ad22aa473811bf | [
"MIT"
] | 1 | 2020-06-28T19:31:07.000Z | 2020-06-28T19:31:07.000Z | lib/rankings_web/channels/user_socket.ex | spkane31/rankings | 0acda9f3ca35abd4874ab06478ad22aa473811bf | [
"MIT"
] | 5 | 2019-07-25T17:00:39.000Z | 2019-07-25T17:12:07.000Z | lib/rankings_web/channels/user_socket.ex | spkane31/rankings | 0acda9f3ca35abd4874ab06478ad22aa473811bf | [
"MIT"
] | null | null | null | defmodule RankingsWeb.UserSocket do
use Phoenix.Socket
## Channels
# channel "room:*", RankingsWeb.RoomChannel
# Socket params are passed from the client and can
# be used to verify and authenticate a user. After
# verification, you can put default assigns into
# the socket that will be set for all chan... | 31.411765 | 83 | 0.697566 |
1ad231d96574f650a38407876151695f06a96f3e | 8,992 | ex | Elixir | lib/phoenix/token.ex | matthewp/phoenix | af86b95db365faada58d326e98de65c811690bc7 | [
"MIT"
] | 2 | 2020-05-06T14:51:56.000Z | 2020-05-06T14:52:21.000Z | lib/phoenix/token.ex | matthewp/phoenix | af86b95db365faada58d326e98de65c811690bc7 | [
"MIT"
] | 3 | 2021-06-20T14:51:14.000Z | 2021-06-25T00:56:11.000Z | lib/phoenix/token.ex | matthewp/phoenix | af86b95db365faada58d326e98de65c811690bc7 | [
"MIT"
] | 1 | 2020-08-31T15:29:31.000Z | 2020-08-31T15:29:31.000Z | defmodule Phoenix.Token do
@moduledoc """
Tokens provide a way to generate and verify bearer
tokens for use in Channels or API authentication.
The data stored in the token is signed to prevent tampering
but not encrypted. This means it is safe to store identification
information (such as user IDs) but shou... | 37.157025 | 98 | 0.691837 |
1ad23d69ea6add87fc3faed0ffce23f8f16a5959 | 280 | ex | Elixir | examples/SimpleChat/lib/route.ex | elixir-web/weber | 1c8caa43681cc432813dff33b2c6d08ca1d61f29 | [
"MIT"
] | 124 | 2015-01-03T16:48:21.000Z | 2022-02-02T21:13:11.000Z | examples/SimpleChat/lib/route.ex | Mendor/weber | 3c4fceff2bc6cf6ce38138b7e1c042c3f2536221 | [
"MIT"
] | 2 | 2015-03-08T05:29:36.000Z | 2015-07-19T15:31:19.000Z | examples/SimpleChat/lib/route.ex | Mendor/weber | 3c4fceff2bc6cf6ce38138b7e1c042c3f2536221 | [
"MIT"
] | 12 | 2015-02-23T02:09:27.000Z | 2016-08-07T13:50:38.000Z | defmodule Route do
import Weber.Route
require Weber.Route
route on("GET", "/", :Simplechat.Main.Login, :render_login)
|> on("ANY", "/join/:username", :Simplechat.Main.Login, :join)
|> on("ANY", "/chat", :Simplechat.Main.Chat, :render_chat)
end | 25.454545 | 67 | 0.610714 |
1ad24fa21a7cbe009b43c20dcae5e765801f8401 | 2,028 | ex | Elixir | lib/elasticsearch/storage/data_stream.ex | steffkes/elasticsearch-elixir | ce904e5dea959a5caefe2cde15669bba43ac3fa6 | [
"MIT"
] | null | null | null | lib/elasticsearch/storage/data_stream.ex | steffkes/elasticsearch-elixir | ce904e5dea959a5caefe2cde15669bba43ac3fa6 | [
"MIT"
] | null | null | null | lib/elasticsearch/storage/data_stream.ex | steffkes/elasticsearch-elixir | ce904e5dea959a5caefe2cde15669bba43ac3fa6 | [
"MIT"
] | null | null | null | defmodule Elasticsearch.DataStream do
@moduledoc """
Functions for building `Stream`s using the configured `Elasticsearch.Store`.
See `stream/2`.
"""
@type source :: any
alias Elasticsearch.Config
@doc """
Creates a `Stream` from a given source.
## Configuration
Your configured `:store` module ... | 26.684211 | 78 | 0.647929 |
1ad2702fcd3a73894a33d7c11f0d1e85126583c1 | 35,098 | exs | Elixir | lib/elixir/test/elixir/macro_test.exs | doughsay/elixir | 7356a47047d0b54517bd6886603f09b1121dde2b | [
"Apache-2.0"
] | 19,291 | 2015-01-01T02:42:49.000Z | 2022-03-31T21:01:40.000Z | lib/elixir/test/elixir/macro_test.exs | doughsay/elixir | 7356a47047d0b54517bd6886603f09b1121dde2b | [
"Apache-2.0"
] | 8,082 | 2015-01-01T04:16:23.000Z | 2022-03-31T22:08:02.000Z | lib/elixir/test/elixir/macro_test.exs | doughsay/elixir | 7356a47047d0b54517bd6886603f09b1121dde2b | [
"Apache-2.0"
] | 3,472 | 2015-01-03T04:11:56.000Z | 2022-03-29T02:07:30.000Z | Code.require_file("test_helper.exs", __DIR__)
defmodule Macro.ExternalTest do
defmacro external do
line = 18
file = __ENV__.file
^line = __CALLER__.line
^file = __CALLER__.file
^line = Macro.Env.location(__CALLER__)[:line]
^file = Macro.Env.location(__CALLER__)[:file]
end
defmacro oror(l... | 31.032714 | 98 | 0.508946 |
1ad27d93b4ce36e5d4519abcbf3086bfd2c28746 | 5,965 | exs | Elixir | test/mix/tasks/phx.gen.notifier_test.exs | faheempatel/phoenix | a83318f2a2284b7ab29b0b86cdd9d2e1f4d0a7c9 | [
"MIT"
] | 18,092 | 2015-01-01T01:51:04.000Z | 2022-03-31T19:37:14.000Z | test/mix/tasks/phx.gen.notifier_test.exs | faheempatel/phoenix | a83318f2a2284b7ab29b0b86cdd9d2e1f4d0a7c9 | [
"MIT"
] | 3,905 | 2015-01-01T00:22:47.000Z | 2022-03-31T17:06:21.000Z | test/mix/tasks/phx.gen.notifier_test.exs | faheempatel/phoenix | a83318f2a2284b7ab29b0b86cdd9d2e1f4d0a7c9 | [
"MIT"
] | 3,205 | 2015-01-03T10:58:22.000Z | 2022-03-30T14:55:57.000Z | Code.require_file("../../../installer/test/mix_helper.exs", __DIR__)
defmodule MyTestApp.Mailer do
end
defmodule Mix.Tasks.Phx.Gen.NotifierTest do
use ExUnit.Case
import MixHelper
alias Mix.Tasks.Phx.Gen
setup do
Mix.Task.clear()
:ok
end
test "new notifier", config do
in_tmp_project(config.t... | 38.237179 | 105 | 0.643755 |
1ad2b28e2235f82526331912686756d5583a0057 | 1,022 | ex | Elixir | {{APP_NAME}}_umbrella/apps/{{APP_NAME}}_api/lib/{{APP_NAME}}_api/views/error_helpers.ex | Vorzious/Phoenix-Template | 7baa93c97047906afa2557fd0b0980a0bafd320d | [
"MIT"
] | null | null | null | {{APP_NAME}}_umbrella/apps/{{APP_NAME}}_api/lib/{{APP_NAME}}_api/views/error_helpers.ex | Vorzious/Phoenix-Template | 7baa93c97047906afa2557fd0b0980a0bafd320d | [
"MIT"
] | null | null | null | {{APP_NAME}}_umbrella/apps/{{APP_NAME}}_api/lib/{{APP_NAME}}_api/views/error_helpers.ex | Vorzious/Phoenix-Template | 7baa93c97047906afa2557fd0b0980a0bafd320d | [
"MIT"
] | null | null | null | defmodule {{MODULE_NAME}}Api.ErrorHelpers do
@moduledoc """
Conveniences for translating and building error messages.
"""
@doc """
Translates an error message using gettext.
"""
def translate_error({msg, opts}) do
# Because error messages were defined within Ecto, we must
# call the Gettext modul... | 34.066667 | 84 | 0.668297 |
1ad2c2b50971437ef3cb67f5b4df0498c9f50753 | 23,662 | ex | Elixir | lib/ex_unit/lib/ex_unit/assertions.ex | michalmuskala/elixir | 097de7d308ac40747b4524e266558a3d9498a60b | [
"Apache-2.0"
] | null | null | null | lib/ex_unit/lib/ex_unit/assertions.ex | michalmuskala/elixir | 097de7d308ac40747b4524e266558a3d9498a60b | [
"Apache-2.0"
] | null | null | null | lib/ex_unit/lib/ex_unit/assertions.ex | michalmuskala/elixir | 097de7d308ac40747b4524e266558a3d9498a60b | [
"Apache-2.0"
] | null | null | null | defmodule ExUnit.AssertionError do
@moduledoc """
Raised to signal an assertion error.
"""
@no_value :ex_unit_no_meaningful_value
defexception left: @no_value,
right: @no_value,
message: @no_value,
expr: @no_value,
args: @no_value
@doc """
Ind... | 25.69164 | 102 | 0.615713 |
1ad2ceffb9f690abfb6b7c9ee25c721195c8883d | 8,834 | ex | Elixir | web/controllers/admin_resource_controller.ex | elixir-twister/ex_admin | fbba06de24105c175abd53ea0b14d27714b0cde7 | [
"MIT"
] | null | null | null | web/controllers/admin_resource_controller.ex | elixir-twister/ex_admin | fbba06de24105c175abd53ea0b14d27714b0cde7 | [
"MIT"
] | null | null | null | web/controllers/admin_resource_controller.ex | elixir-twister/ex_admin | fbba06de24105c175abd53ea0b14d27714b0cde7 | [
"MIT"
] | null | null | null | defmodule ExAdmin.AdminResourceController do
@moduledoc false
@resource nil
use ExAdmin.Web, :resource_controller
import ExAdmin.Index
def index(conn, defn, params) do
model = defn.__struct__
page = case conn.assigns[:page] do
nil ->
id = params |> Map.to_list
query = model.ru... | 33.462121 | 139 | 0.658931 |
1ad30c254af2316900aedd950f659df0a6ce25f2 | 1,802 | ex | Elixir | test/support/model_case.ex | renuo/dev-quotes | dcb187c82697c756f19c40bbe84b0555eda6ae86 | [
"MIT"
] | null | null | null | test/support/model_case.ex | renuo/dev-quotes | dcb187c82697c756f19c40bbe84b0555eda6ae86 | [
"MIT"
] | null | null | null | test/support/model_case.ex | renuo/dev-quotes | dcb187c82697c756f19c40bbe84b0555eda6ae86 | [
"MIT"
] | null | null | null | defmodule DevQuotes.ModelCase do
@moduledoc """
This module defines the test case to be used by
model tests.
You may define functions here to be used as helpers in
your model tests. See `errors_on/2`'s definition as reference.
Finally, if the test case interacts with the database,
it cannot be async. Fo... | 27.30303 | 84 | 0.687014 |
1ad31bf53ab6d6e7703afaec219ad95b345fdd1c | 803 | ex | Elixir | test/support/channel_case.ex | tanguilp/wax_fido_test_suite_server | 7b744f0861b3c7abf1117429cd23f83c9d576436 | [
"Apache-2.0"
] | null | null | null | test/support/channel_case.ex | tanguilp/wax_fido_test_suite_server | 7b744f0861b3c7abf1117429cd23f83c9d576436 | [
"Apache-2.0"
] | null | null | null | test/support/channel_case.ex | tanguilp/wax_fido_test_suite_server | 7b744f0861b3c7abf1117429cd23f83c9d576436 | [
"Apache-2.0"
] | null | null | null | defmodule WaxFidoTestSuiteServerWeb.ChannelCase do
@moduledoc """
This module defines the test case to be used by
channel tests.
Such tests rely on `Phoenix.ChannelTest` and also
import other functionality to make it easier
to build common data structures and query the data layer.
Finally, if the test c... | 25.09375 | 59 | 0.737235 |
1ad350d018b88e9756c40aa944f06c37b27910f3 | 1,119 | exs | Elixir | config/config.exs | anthonyfalzetti/ccbx | 2940051222efcbc9a814e14469e6dc1ec01487b0 | [
"MIT"
] | null | null | null | config/config.exs | anthonyfalzetti/ccbx | 2940051222efcbc9a814e14469e6dc1ec01487b0 | [
"MIT"
] | null | null | null | config/config.exs | anthonyfalzetti/ccbx | 2940051222efcbc9a814e14469e6dc1ec01487b0 | [
"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
# 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.096774 | 73 | 0.748883 |
1ad366714e22b3ea129091106bbb4be1227a10da | 19,069 | ex | Elixir | lib/mix/lib/mix/tasks/test.ex | RyanBard/elixir | 3e0f3b47cf26aa121470141b9a1aa55a366c066e | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/tasks/test.ex | RyanBard/elixir | 3e0f3b47cf26aa121470141b9a1aa55a366c066e | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/tasks/test.ex | RyanBard/elixir | 3e0f3b47cf26aa121470141b9a1aa55a366c066e | [
"Apache-2.0"
] | null | null | null | defmodule Mix.Tasks.Test do
defmodule Cover do
@default_threshold 90
@moduledoc false
def start(compile_path, opts) do
Mix.shell().info("Cover compiling modules ...")
_ = :cover.stop()
_ = :cover.start()
case :cover.compile_beam_directory(compile_path |> to_charlist) do
... | 31.728785 | 104 | 0.647386 |
1ad36cecbce459a245cd39b8afc91f198264431c | 7,691 | ex | Elixir | apps/omg_child_chain/lib/omg_child_chain/sync_supervisor.ex | omgnetwork/omg-childchain-v1 | 1e2313029ece2282c22ce411edc078a17e6bba09 | [
"Apache-2.0"
] | 1 | 2020-10-06T03:07:47.000Z | 2020-10-06T03:07:47.000Z | apps/omg_child_chain/lib/omg_child_chain/sync_supervisor.ex | omgnetwork/omg-childchain-v1 | 1e2313029ece2282c22ce411edc078a17e6bba09 | [
"Apache-2.0"
] | 9 | 2020-09-16T15:31:17.000Z | 2021-03-17T07:12:35.000Z | apps/omg_child_chain/lib/omg_child_chain/sync_supervisor.ex | omgnetwork/omg-childchain-v1 | 1e2313029ece2282c22ce411edc078a17e6bba09 | [
"Apache-2.0"
] | 1 | 2020-09-30T17:17:27.000Z | 2020-09-30T17:17:27.000Z | # Copyright 2019-2020 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 ... | 45.241176 | 111 | 0.76466 |
1ad38adec99271ba9b9f032ce7a0c31927a71b12 | 1,098 | ex | Elixir | lib/zig/patches.ex | wojtekmach/zigler | b2102744bff212351abfeb4f6d87e57dd1ab232c | [
"MIT"
] | 1 | 2021-02-26T00:00:34.000Z | 2021-02-26T00:00:34.000Z | lib/zig/patches.ex | fhunleth/zigler | 037ff05087563d3255f58fb0abbaedeb12b97211 | [
"MIT"
] | null | null | null | lib/zig/patches.ex | fhunleth/zigler | 037ff05087563d3255f58fb0abbaedeb12b97211 | [
"MIT"
] | null | null | null | defmodule Zig.Patches do
@moduledoc """
occasionally zig and/or the llvm bits that get
pulled down have errors. This module actively patches
code when this situation occurs.
"""
require Logger
# currently no patches identified for zig 0.7.1
@patches %{}
def sync(zig_path) do
@patches
|> En... | 24.954545 | 64 | 0.673042 |
1ad3da270dc9df3b6aad632b5858405df1ae8fb1 | 583 | exs | Elixir | dev.exs | BinaryNoggin/lilly | 5f4034b7a48b322b4f480f49826612cb555efc44 | [
"MIT"
] | 1 | 2022-03-20T15:07:59.000Z | 2022-03-20T15:07:59.000Z | dev.exs | BinaryNoggin/lilly | 5f4034b7a48b322b4f480f49826612cb555efc44 | [
"MIT"
] | null | null | null | dev.exs | BinaryNoggin/lilly | 5f4034b7a48b322b4f480f49826612cb555efc44 | [
"MIT"
] | null | null | null | Logger.configure(level: :debug)
defmodule Surface.Catalogue.ErrorView do
use Phoenix.View,
root: "lib/surface/catalogue/templates",
namespace: Surface.Catalogue
end
Surface.Catalogue.Server.start(
watchers: [
# Start the esbuild watcher by calling Esbuild.install_and_run(:default, args)
esbuild: {... | 25.347826 | 86 | 0.674099 |
1ad41fd5eef97341da5b8d414279f144fc9ff1fe | 2,162 | exs | Elixir | spec/clickhouse_ecto/helpers_spec.exs | kundi/clickhouse_ecto | 3251221bd63a159c0e8af8336663b0bef855bbca | [
"Apache-2.0"
] | 1 | 2019-06-14T16:00:30.000Z | 2019-06-14T16:00:30.000Z | spec/clickhouse_ecto/helpers_spec.exs | kundi/clickhouse_ecto | 3251221bd63a159c0e8af8336663b0bef855bbca | [
"Apache-2.0"
] | null | null | null | spec/clickhouse_ecto/helpers_spec.exs | kundi/clickhouse_ecto | 3251221bd63a159c0e8af8336663b0bef855bbca | [
"Apache-2.0"
] | 2 | 2019-07-08T12:28:35.000Z | 2019-09-25T14:18:10.000Z | defmodule ClickhouseEcto.HelpersSpec do
alias ClickhouseEcto.Helpers
use ESpec
it do: Helpers.ecto_to_db({:array, :id}) |> should(be "Array(UInt32)")
it do: Helpers.ecto_to_db(:id) |> should(be "UInt32")
it do: Helpers.ecto_to_db(:binary_id) ... | 63.588235 | 104 | 0.488437 |
1ad42bbc73913e73194aa00f0c2011c467ece8dc | 1,539 | ex | Elixir | clients/composer/lib/google_api/composer/v1/model/empty.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/composer/lib/google_api/composer/v1/model/empty.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/composer/lib/google_api/composer/v1/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.78 | 76 | 0.741391 |
1ad43ca5244123c5cdd15bcf8af8526d90459392 | 1,478 | ex | Elixir | lib/alice.ex | micheleberetta98/qkd-sim | 7766797fbf5e8056947f8a121e3b3d35bd8466b8 | [
"MIT"
] | 2 | 2021-05-25T21:17:44.000Z | 2021-06-07T12:03:22.000Z | lib/alice.ex | micheleberetta98/qkd-sim | 7766797fbf5e8056947f8a121e3b3d35bd8466b8 | [
"MIT"
] | null | null | null | lib/alice.ex | micheleberetta98/qkd-sim | 7766797fbf5e8056947f8a121e3b3d35bd8466b8 | [
"MIT"
] | null | null | null | defmodule Alice do
def init(n, delta, bob) do
IO.puts("ALICE :: Started")
k = (4 + delta) * n
bits = Utils.random_bits(k)
bases = Utils.random_bits(k)
IO.puts("ALICE :: Given n = #{n}, generated k = #{k} random bits")
qubits = BB84.encode(bits, bases)
send_qubits(bob, qubits)
loop(bit... | 26.392857 | 85 | 0.546685 |
1ad4581aa3ae44f07830ac1caad8c1148409c76d | 138 | ex | Elixir | apps/sample_web/lib/sample_web/controllers/page_controller.ex | ODYLIGHT/sample_umbrella | 8b4ef00c732e24ccec6d98555d7542dff10a73f9 | [
"MIT"
] | 1 | 2020-02-20T11:27:02.000Z | 2020-02-20T11:27:02.000Z | apps/sample_web/lib/sample_web/controllers/page_controller.ex | ODYLIGHT/sample_umbrella | 8b4ef00c732e24ccec6d98555d7542dff10a73f9 | [
"MIT"
] | 1 | 2020-04-30T00:58:40.000Z | 2020-04-30T00:58:40.000Z | apps/sample_web/lib/sample_web/controllers/page_controller.ex | ODYLIGHT/sample_umbrella | 8b4ef00c732e24ccec6d98555d7542dff10a73f9 | [
"MIT"
] | null | null | null | defmodule SampleWeb.PageController do
use SampleWeb, :controller
def index(conn, _params) do
render conn, "index.html"
end
end
| 17.25 | 37 | 0.73913 |
1ad47520402a65a826d6b60c39972ed44f76784e | 156 | ex | Elixir | lib/core/asset_workers/public_key_worker/stub_ssh_handler.ex | FarmBot/farmbot_os | 5ebdca3afd672eb6b0af5c71cfca02488b32569a | [
"MIT"
] | 843 | 2016-10-05T23:46:05.000Z | 2022-03-14T04:31:55.000Z | lib/core/asset_workers/public_key_worker/stub_ssh_handler.ex | FarmBot/farmbot_os | 5ebdca3afd672eb6b0af5c71cfca02488b32569a | [
"MIT"
] | 455 | 2016-10-15T08:49:16.000Z | 2022-03-15T12:23:04.000Z | lib/core/asset_workers/public_key_worker/stub_ssh_handler.ex | FarmBot/farmbot_os | 5ebdca3afd672eb6b0af5c71cfca02488b32569a | [
"MIT"
] | 261 | 2016-10-10T04:37:06.000Z | 2022-03-13T21:07:38.000Z | defmodule FarmbotCore.PublicKeyHandler.StubSSHHandler do
@behaviour FarmbotCore.Asset.PublicKey
def ready?(), do: true
def add_key(_key), do: :ok
end
| 26 | 56 | 0.775641 |
1ad4a6b1655fa08cd382d8bbf345cb131b0c7dc4 | 5,875 | exs | Elixir | test/parklot_rsvp_web/controllers/reservation_controller_test.exs | egutter/parklot-rsvp | 356b71b1a819a6c701cdf3b74e938255199f86e0 | [
"MIT"
] | null | null | null | test/parklot_rsvp_web/controllers/reservation_controller_test.exs | egutter/parklot-rsvp | 356b71b1a819a6c701cdf3b74e938255199f86e0 | [
"MIT"
] | 3 | 2018-08-17T23:12:30.000Z | 2018-09-18T12:54:57.000Z | test/parklot_rsvp_web/controllers/reservation_controller_test.exs | egutter/parklot-rsvp | 356b71b1a819a6c701cdf3b74e938255199f86e0 | [
"MIT"
] | null | null | null | defmodule ParklotRsvpWeb.ReservationControllerTest do
use ParklotRsvpWeb.ConnCase
alias ParklotRsvp.Schedule
alias ParklotRsvp.Schedule.Reservation
@create_attrs %{notes: "some notes", scheduled_at: "2010-04-17", user: "some user", work_related: false}
@create_from_slack_attrs %{"text" => "reservar el 17-04... | 37.903226 | 124 | 0.642043 |
1ad4c899c0e198a0ee9132d03eba67f322162262 | 1,369 | exs | Elixir | config/config.exs | tedstrauss/sonar | 65de7a9a78eae9fd4e02f5abdf00f9fdec19b081 | [
"MIT"
] | 1 | 2020-07-17T14:02:31.000Z | 2020-07-17T14:02:31.000Z | config/config.exs | tedstrauss/sonar | 65de7a9a78eae9fd4e02f5abdf00f9fdec19b081 | [
"MIT"
] | null | null | null | config/config.exs | tedstrauss/sonar | 65de7a9a78eae9fd4e02f5abdf00f9fdec19b081 | [
"MIT"
] | 1 | 2019-12-02T17:51:36.000Z | 2019-12-02T17:51:36.000Z | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
use Mix.Config
# General application configuration
config :sonar,
ecto_repos: [Sonar.Repo]
# Conf... | 30.422222 | 86 | 0.7458 |
1ad4c8a88052b4242d2db7aeb921e7f5c3cae123 | 36,981 | ex | Elixir | lib/exoml/entities.ex | Overbryd/exoml | 355b0560473fe4eb79cde5829220737c83b3204e | [
"MIT"
] | 7 | 2018-03-08T15:32:13.000Z | 2020-12-04T00:31:06.000Z | lib/exoml/entities.ex | Overbryd/exoml | 355b0560473fe4eb79cde5829220737c83b3204e | [
"MIT"
] | 2 | 2018-05-17T15:49:22.000Z | 2020-01-16T16:59:32.000Z | lib/exoml/entities.ex | Overbryd/exoml | 355b0560473fe4eb79cde5829220737c83b3204e | [
"MIT"
] | 3 | 2018-03-08T15:32:07.000Z | 2019-09-10T12:10:08.000Z | defmodule Exoml.Entities do
@entities %{
"im" => "ℑ",
"submult" => "⫁",
"fpartint" => "⨍",
"ldquo" => "“",
"rarrw" => "↝",
"ngt" => "≯",
"nesear" => "⤨",
"thinsp" => " ",
"blank" => "␣",
"simge" => "⪠",
"veeeq" => "≚",
"bkarow" => "⤍",
"sdot" => "⋅",
"notni" => ... | 21.986326 | 83 | 0.33455 |
1ad4cf7356f572c32a64903c2eea34aa8fafbf9c | 1,641 | exs | Elixir | test/wait_for_state_test.exs | renderedtext/green-worker | ca69c243e5a98590a6d82ca2872996783948b8fb | [
"Apache-2.0"
] | 1 | 2019-09-05T14:40:33.000Z | 2019-09-05T14:40:33.000Z | test/wait_for_state_test.exs | renderedtext/green-worker | ca69c243e5a98590a6d82ca2872996783948b8fb | [
"Apache-2.0"
] | null | null | null | test/wait_for_state_test.exs | renderedtext/green-worker | ca69c243e5a98590a6d82ca2872996783948b8fb | [
"Apache-2.0"
] | null | null | null | defmodule WaitForStateTest do
use ExUnit.Case
alias Support.EctoRepo, as: Repo
alias Support.BasicTransitionWithChangeset, as: Worker
import TestHelpers, only: [start_family: 1]
setup do
TestHelpers.truncate_db()
id = "86781246-0847-11e9-b6f4-482ae31ad2de"
ctx = %{id: id, state: "init"}
s... | 26.467742 | 80 | 0.668495 |
1ad4e63bc0313cea72f00f0c29cdceef40f7692f | 1,687 | ex | Elixir | lib/mix/tasks/phx.gen.presence.ex | coderberry/phoenix | 9abaa84ea675d3db97cfba77745e76300acb6fd2 | [
"MIT"
] | null | null | null | lib/mix/tasks/phx.gen.presence.ex | coderberry/phoenix | 9abaa84ea675d3db97cfba77745e76300acb6fd2 | [
"MIT"
] | null | null | null | lib/mix/tasks/phx.gen.presence.ex | coderberry/phoenix | 9abaa84ea675d3db97cfba77745e76300acb6fd2 | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.Phx.Gen.Presence do
@shortdoc "Generates a Presence tracker"
@moduledoc """
Generates a Presence tracker for your application.
mix phx.gen.presence
mix phx.gen.presence MyPresence
The only argument is the module name of the Presence tracker,
which defaults to Presence.
A... | 26.359375 | 106 | 0.664493 |
1ad4efa40cad8b8f6284b303449d551447dc5f51 | 4,810 | exs | Elixir | test/condiment_test.exs | edisonywh/condiment | 8efd220dc1488721258e1e206f9139f63c5f3baa | [
"MIT"
] | 16 | 2020-09-05T20:17:43.000Z | 2021-04-26T19:54:54.000Z | test/condiment_test.exs | edisonywh/condiment | 8efd220dc1488721258e1e206f9139f63c5f3baa | [
"MIT"
] | 4 | 2020-09-05T21:07:13.000Z | 2020-09-06T12:30:22.000Z | test/condiment_test.exs | edisonywh/condiment | 8efd220dc1488721258e1e206f9139f63c5f3baa | [
"MIT"
] | null | null | null | defmodule CondimentTest do
use ExUnit.Case
doctest Condiment
describe "Condiment.new/2" do
test "should always return %Condiment{}" do
condiment = create_condiment()
assert %Condiment{token: _token, opts: _opts, resolvers: _resolvers} = condiment
end
test "token, opts are set correctly"... | 28.461538 | 97 | 0.599792 |
1ad4f58551f9e5159a3327040e6df16229e44b4d | 551 | ex | Elixir | lib/contentful/entry.ex | prototypsthlm/contentful.ex | cde53cd6792643c2d5518f97db00c4118f842863 | [
"MIT"
] | 28 | 2016-06-19T00:18:46.000Z | 2021-05-17T07:53:22.000Z | lib/contentful/entry.ex | prototypsthlm/contentful.ex | cde53cd6792643c2d5518f97db00c4118f842863 | [
"MIT"
] | 79 | 2016-07-13T14:46:07.000Z | 2021-05-17T09:26:50.000Z | lib/contentful/entry.ex | prototypsthlm/contentful.ex | cde53cd6792643c2d5518f97db00c4118f842863 | [
"MIT"
] | 25 | 2016-07-13T17:31:52.000Z | 2021-05-08T10:14:46.000Z | defmodule Contentful.Entry do
@moduledoc """
An entry is a representation of anything that can be expressed as a
defined content type within a given `Contentful.Space`.
See the [official documentation for more information](https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/e... | 29 | 152 | 0.671506 |
1ad5299183de38ba0e4e82e1ea041e0de9c57524 | 1,341 | ex | Elixir | lib/bs_web/channels/game_channel.ex | andersjanmyr/battlesnake-server-2018 | 091b4d1201d144de232be08fd7fb6df8156c5ee2 | [
"MIT"
] | 3 | 2018-07-14T22:55:23.000Z | 2019-02-25T06:11:55.000Z | lib/bs_web/channels/game_channel.ex | andersjanmyr/battlesnake-server-2018 | 091b4d1201d144de232be08fd7fb6df8156c5ee2 | [
"MIT"
] | 7 | 2020-02-12T03:22:59.000Z | 2022-02-10T20:23:52.000Z | lib/bs_web/channels/game_channel.ex | andersjanmyr/battlesnake-server-2018 | 091b4d1201d144de232be08fd7fb6df8156c5ee2 | [
"MIT"
] | 12 | 2018-03-27T05:27:20.000Z | 2019-04-02T08:19:04.000Z | defmodule BsWeb.GameChannel do
alias Bs.Event
alias Bs.Game
alias Phoenix.View
use BsWeb, :channel
def join("game:" <> id, _params, socket) do
:ok = Game.subscribe(id)
send(self(), :after_join)
socket = assign(socket, :id, id)
{:ok, socket}
end
def handle_in(cmd, _params, socket) do
... | 19.157143 | 68 | 0.548844 |
1ad53f941d8b6fda5199be46f9e77bb14909f17a | 2,947 | ex | Elixir | lib/plug/error_handler.ex | scrogson/plug | 576c04c2cba778f1ac9ca28aa71c50efa1046b50 | [
"Apache-2.0"
] | 1 | 2019-05-07T15:05:52.000Z | 2019-05-07T15:05:52.000Z | lib/plug/error_handler.ex | DavidAlphaFox/Plug | 3a98e7667d76ba8d2eb629e518bcb7ac83a1a188 | [
"Apache-2.0"
] | null | null | null | lib/plug/error_handler.ex | DavidAlphaFox/Plug | 3a98e7667d76ba8d2eb629e518bcb7ac83a1a188 | [
"Apache-2.0"
] | null | null | null | defmodule Plug.ErrorHandler do
@moduledoc """
A module to be used in your existing plugs in order to provide
error handling.
defmodule AppRouter do
use Plug.Router
use Plug.ErrorHandler
plug :match
plug :dispatch
get "/hello" do
send_resp(conn, 200, "worl... | 28.336538 | 85 | 0.661011 |
1ad5750fc4224029902c95f70d030182a5273b12 | 1,089 | exs | Elixir | test/phoenix/controller_component_test.exs | omohokcoj/x_component | 0f51d78b80b7d54d238b7d0c2c3c2f93b9320108 | [
"MIT"
] | 53 | 2020-02-09T16:34:46.000Z | 2021-04-01T17:48:26.000Z | test/phoenix/controller_component_test.exs | omohokcoj/x_component | 0f51d78b80b7d54d238b7d0c2c3c2f93b9320108 | [
"MIT"
] | 1 | 2020-03-11T03:22:52.000Z | 2020-03-11T03:22:52.000Z | test/phoenix/controller_component_test.exs | omohokcoj/x_component | 0f51d78b80b7d54d238b7d0c2c3c2f93b9320108 | [
"MIT"
] | 1 | 2020-02-09T16:34:49.000Z | 2020-02-09T16:34:49.000Z | defmodule Phoenix.Phoenix.Controller.ComponentsTest do
use ExUnit.Case
import Plug.Test
defmodule ExampleLayout do
use X.Template
def render("default.html", assigns) do
{:safe,
~X"""
<div>
<span>Example Layout</span>
<X
:assigns="@assigns"
:co... | 21.352941 | 95 | 0.603306 |
1ad58ee89babaf0521c82c24cc22d37703656535 | 80 | exs | Elixir | config/config.exs | gasparch/mix-test.watch | 6be7f440bedb04ee191c187a6eeed433fd001572 | [
"MIT"
] | 1 | 2021-01-04T16:42:18.000Z | 2021-01-04T16:42:18.000Z | config/config.exs | mkaszubowski/mix-test.watch | 6be7f440bedb04ee191c187a6eeed433fd001572 | [
"MIT"
] | null | null | null | config/config.exs | mkaszubowski/mix-test.watch | 6be7f440bedb04ee191c187a6eeed433fd001572 | [
"MIT"
] | null | null | null | use Mix.Config
config :mix_test_watch,
tasks: [
"test",
"dogma",
]
| 10 | 23 | 0.575 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.