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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9707008c7079206e57059ad29964811b50dee1ab | 101 | exs | Elixir | test/unit/serialization/format_test.exs | pukkamustard/rdf-ex | c459d8e7fa548fdfad82643338b68decf380a296 | [
"MIT"
] | null | null | null | test/unit/serialization/format_test.exs | pukkamustard/rdf-ex | c459d8e7fa548fdfad82643338b68decf380a296 | [
"MIT"
] | null | null | null | test/unit/serialization/format_test.exs | pukkamustard/rdf-ex | c459d8e7fa548fdfad82643338b68decf380a296 | [
"MIT"
] | null | null | null | defmodule RDF.Serialization.FormatTest do
use ExUnit.Case
doctest RDF.Serialization.Format
end
| 14.428571 | 41 | 0.811881 |
970708c523d195832993e2aa5232debaa44e7ef1 | 171 | ex | Elixir | lib/spotify.ex | chippers/spotify_web_api | 221a197dbac4971f87e9917d02cb335e6a42b726 | [
"MIT"
] | null | null | null | lib/spotify.ex | chippers/spotify_web_api | 221a197dbac4971f87e9917d02cb335e6a42b726 | [
"MIT"
] | null | null | null | lib/spotify.ex | chippers/spotify_web_api | 221a197dbac4971f87e9917d02cb335e6a42b726 | [
"MIT"
] | null | null | null | defmodule Spotify do
@moduledoc """
Documentation for mapping the Spotify Web API objects.
"""
@type spotify_id :: String.t
@type spotify_uri :: String.t
end
| 19 | 58 | 0.695906 |
97073b8f35f0328e50bde4b195791a53d109d22a | 886 | ex | Elixir | clients/pub_sub_lite/lib/google_api/pub_sub_lite/v1/metadata.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/pub_sub_lite/lib/google_api/pub_sub_lite/v1/metadata.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/pub_sub_lite/lib/google_api/pub_sub_lite/v1/metadata.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 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.814815 | 74 | 0.759594 |
97073c3a905ae6c69e8ebbd4815551268b229996 | 1,439 | ex | Elixir | lib/rfx/ops/project/deps_add.ex | doorgan/rfx | 566b8623ce8957632329b4b0a142ea26a46f2301 | [
"MIT"
] | null | null | null | lib/rfx/ops/project/deps_add.ex | doorgan/rfx | 566b8623ce8957632329b4b0a142ea26a46f2301 | [
"MIT"
] | null | null | null | lib/rfx/ops/project/deps_add.ex | doorgan/rfx | 566b8623ce8957632329b4b0a142ea26a46f2301 | [
"MIT"
] | null | null | null | defmodule Rfx.Ops.Project.DepsAdd do
def cl_code(source_code, name, version) do
source_code
|> Sourceror.parse_string()
|> Sourceror.postwalk(fn
{:defp, meta, [{:deps, _, _} = fun, body]}, state ->
[{{_, _, [:do]}, block_ast}] = body
{:__block__, block_meta, [deps]} = bl... | 25.696429 | 88 | 0.471855 |
97075ce2121c7922272e8d28414c9be784d862b4 | 3,574 | exs | Elixir | test/basic/contacts_test.exs | ysaito8015/communitex | d469447a62029d59883d95df4df3c9b09e0022e2 | [
"Apache-2.0"
] | 7 | 2021-07-14T15:45:55.000Z | 2022-01-25T11:13:01.000Z | test/basic/contacts_test.exs | ysaito8015/communitex | d469447a62029d59883d95df4df3c9b09e0022e2 | [
"Apache-2.0"
] | 10 | 2021-08-09T15:54:05.000Z | 2022-02-17T04:18:38.000Z | test/basic/contacts_test.exs | ysaito8015/communitex | d469447a62029d59883d95df4df3c9b09e0022e2 | [
"Apache-2.0"
] | 5 | 2021-07-23T05:54:35.000Z | 2022-01-28T04:14:51.000Z | defmodule Basic.ContactsTest do
use Basic.DataCase
alias Basic.Contacts
describe "contacts" do
alias Basic.Contacts.Contact
@valid_attrs %{body: "some body", deleted_at: ~N[2010-04-17 14:00:00], email: "some email", first_name: "some first_name", first_name_kana: "some first_name_kana", last_name: "som... | 44.123457 | 332 | 0.699776 |
970764a106ca9bdce086a381157d74525ecf1925 | 1,297 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/operation_error.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/operation_error.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/operation_error.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | 1 | 2018-07-28T20:50:50.000Z | 2018-07-28T20:50:50.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 33.25641 | 114 | 0.757903 |
9707712d9ec44bcaabe6bae2e752c8d1e783517d | 1,055 | ex | Elixir | test/support/conn_case.ex | ontanj/karroake | b3346707df9d2378a06ee3bb7d218d0962fe7d86 | [
"MIT"
] | null | null | null | test/support/conn_case.ex | ontanj/karroake | b3346707df9d2378a06ee3bb7d218d0962fe7d86 | [
"MIT"
] | 1 | 2021-05-10T10:36:59.000Z | 2021-05-10T10:36:59.000Z | test/support/conn_case.ex | ontanj/karroake | b3346707df9d2378a06ee3bb7d218d0962fe7d86 | [
"MIT"
] | null | null | null | defmodule KarroakeWeb.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... | 27.051282 | 70 | 0.719431 |
97079a05f096d5b8759579b887c70e8ef391bff0 | 202 | exs | Elixir | test/web/controllers/page_controller_test.exs | awochna/quick_polls | b599918b795728feda338e6a00f295a97faba08a | [
"MIT"
] | null | null | null | test/web/controllers/page_controller_test.exs | awochna/quick_polls | b599918b795728feda338e6a00f295a97faba08a | [
"MIT"
] | 6 | 2017-04-10T05:01:04.000Z | 2017-04-21T06:02:03.000Z | test/web/controllers/page_controller_test.exs | awochna/quick_polls | b599918b795728feda338e6a00f295a97faba08a | [
"MIT"
] | null | null | null | defmodule QuickPolls.Web.PageControllerTest do
use QuickPolls.Web.ConnCase
test "GET /", %{conn: conn} do
conn = get conn, "/"
assert html_response(conn, 200) =~ "Make fun polls"
end
end
| 22.444444 | 55 | 0.683168 |
9707c0b95e3f9f2e025c055d9cb828655652911d | 18,570 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/backend_service.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/backend_service.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/backend_service.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 117.531646 | 1,760 | 0.749542 |
9707d30b10014b1b2aa353806f1769a1e99e07ed | 1,065 | ex | Elixir | preview/lib/preview_web/channels/user_socket.ex | podlove/podlove-preview | 7a12cedf338929762e8ef4dea69771e29a89f132 | [
"MIT"
] | 2 | 2019-02-23T12:19:46.000Z | 2020-02-18T11:53:09.000Z | preview/lib/preview_web/channels/user_socket.ex | podlove/podlove-preview | 7a12cedf338929762e8ef4dea69771e29a89f132 | [
"MIT"
] | 5 | 2019-01-09T16:18:04.000Z | 2019-01-19T10:10:30.000Z | preview/lib/preview_web/channels/user_socket.ex | podlove/podlove-preview | 7a12cedf338929762e8ef4dea69771e29a89f132 | [
"MIT"
] | null | null | null | defmodule PreviewWeb.UserSocket do
use Phoenix.Socket
## Channels
# channel "room:*", PreviewWeb.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 channe... | 31.323529 | 83 | 0.696714 |
9707d64627fac2b594b3d9e0003421d7a98988ea | 1,404 | exs | Elixir | test/phoenix_feathers/side_bar_test.exs | timpile/phoenix_feathers | 6ac706d9384772f8cc5950ee2328fef77fa85413 | [
"MIT"
] | null | null | null | test/phoenix_feathers/side_bar_test.exs | timpile/phoenix_feathers | 6ac706d9384772f8cc5950ee2328fef77fa85413 | [
"MIT"
] | null | null | null | test/phoenix_feathers/side_bar_test.exs | timpile/phoenix_feathers | 6ac706d9384772f8cc5950ee2328fef77fa85413 | [
"MIT"
] | null | null | null | defmodule PhoenixFeathers.SideBarTest do
use ExUnit.Case
use PhoenixFeathers.LiveViewTest
@open_icon ~s|<svg viewbox="0 0 20 20"><path fill="#fff" d="M12.95 10.707l.707-.707L8 4.343 6.586 5.757 10.828 10l-4.242 4.243L8 15.657l4.95-4.95z"></path></svg>|
@close_icon ~s|<svg viewbox="0 0 20 20"><path fill="#fff"... | 32.651163 | 164 | 0.643162 |
9707da54c743826ac3a765661024545cc508f63c | 8,435 | ex | Elixir | lib/rig/distributed_set.ex | fossabot/reactive-interaction-gateway | 8772159ce9f834ffd602dcde4e2d0a0c9038b6e7 | [
"Apache-2.0"
] | null | null | null | lib/rig/distributed_set.ex | fossabot/reactive-interaction-gateway | 8772159ce9f834ffd602dcde4e2d0a0c9038b6e7 | [
"Apache-2.0"
] | null | null | null | lib/rig/distributed_set.ex | fossabot/reactive-interaction-gateway | 8772159ce9f834ffd602dcde4e2d0a0c9038b6e7 | [
"Apache-2.0"
] | null | null | null | defmodule RIG.DistributedSet do
@moduledoc """
Distributed grow-only set with per key time-to-live support.
"""
require Logger
use GenServer
import Ex2ms
alias Timex
alias UUID
@type key :: String.t()
@type uuid :: String.t()
@type creation_ts :: non_neg_integer()
@type expiration_ts :: non_ne... | 26.863057 | 97 | 0.629994 |
9707fa566f2b2d34d3467bc1e17b886e238d03a0 | 2,011 | ex | Elixir | clients/firebase_dynamic_links/lib/google_api/firebase_dynamic_links/v1/model/analytics_info.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | null | null | null | clients/firebase_dynamic_links/lib/google_api/firebase_dynamic_links/v1/model/analytics_info.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | null | null | null | clients/firebase_dynamic_links/lib/google_api/firebase_dynamic_links/v1/model/analytics_info.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"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.910714 | 103 | 0.766783 |
9708296bc701c420efdb60277596f895b7cf17c2 | 239 | ex | Elixir | apps/customer/lib/customer/web/queries/job_title.ex | JaiMali/job_search-1 | 5fe1afcd80aa5d55b92befed2780cd6721837c88 | [
"MIT"
] | 102 | 2017-05-21T18:24:04.000Z | 2022-03-10T12:53:20.000Z | apps/customer/lib/customer/web/queries/job_title.ex | JaiMali/job_search-1 | 5fe1afcd80aa5d55b92befed2780cd6721837c88 | [
"MIT"
] | 2 | 2017-05-21T01:53:30.000Z | 2017-12-01T00:27:06.000Z | apps/customer/lib/customer/web/queries/job_title.ex | JaiMali/job_search-1 | 5fe1afcd80aa5d55b92befed2780cd6721837c88 | [
"MIT"
] | 18 | 2017-05-22T09:51:36.000Z | 2021-09-24T00:57:01.000Z | defmodule Customer.Web.Query.JobTitle do
use Customer.Query, model: Customer.Web.JobTitle
alias Customer.Web.JobTitle
def names(repo) do
repo.all(names)
end
defp names do
(from j in JobTitle, select: j.name)
end
end
| 17.071429 | 50 | 0.715481 |
97082d549e0b4aa134209f697ce3457ba5cdf329 | 212 | exs | Elixir | test/nr_phoenix_demo_web/controllers/page_controller_test.exs | jbhardman/nr-phoenix-demo-app | 1369ced0e87e6ab36443c50158bd340e05242afc | [
"Apache-2.0"
] | 1 | 2022-01-25T08:26:38.000Z | 2022-01-25T08:26:38.000Z | test/nr_phoenix_demo_web/controllers/page_controller_test.exs | jbhardman/nr-phoenix-demo-app | 1369ced0e87e6ab36443c50158bd340e05242afc | [
"Apache-2.0"
] | 4 | 2022-01-21T13:23:49.000Z | 2022-01-25T08:21:44.000Z | test/nr_phoenix_demo_web/controllers/page_controller_test.exs | jbhardman/nr-phoenix-demo-app | 1369ced0e87e6ab36443c50158bd340e05242afc | [
"Apache-2.0"
] | 1 | 2022-02-23T22:33:42.000Z | 2022-02-23T22:33:42.000Z | defmodule NrPhoenixDemoWeb.PageControllerTest do
use NrPhoenixDemoWeb.ConnCase
test "GET /", %{conn: conn} do
conn = get(conn, "/")
assert html_response(conn, 200) =~ "Welcome to Phoenix!"
end
end
| 23.555556 | 60 | 0.698113 |
97084168d4cb6459087302be29eb4aae84a2c9e2 | 20,217 | ex | Elixir | lib/ecto/adapters/sql/sandbox.ex | barthez/ecto | 747ea7e207132f7b72451c9d3942acfe5db0aa7b | [
"Apache-2.0"
] | null | null | null | lib/ecto/adapters/sql/sandbox.ex | barthez/ecto | 747ea7e207132f7b72451c9d3942acfe5db0aa7b | [
"Apache-2.0"
] | null | null | null | lib/ecto/adapters/sql/sandbox.ex | barthez/ecto | 747ea7e207132f7b72451c9d3942acfe5db0aa7b | [
"Apache-2.0"
] | 1 | 2018-09-21T16:05:29.000Z | 2018-09-21T16:05:29.000Z | defmodule Ecto.Adapters.SQL.Sandbox do
@moduledoc ~S"""
A pool for concurrent transactional tests.
The sandbox pool is implemented on top of an ownership mechanism.
When started, the pool is in automatic mode, which means the
repository will automatically check connections out as with any
other pool.
Th... | 36.427027 | 114 | 0.688529 |
9708544ee434689f94e0798b00f837d42cf4a3fe | 3,963 | exs | Elixir | talks-articles/languages-n-runtimes/elixir/book--programming-elixir-ge-1.6/chapter-22.exs | abhishekkr/tutorials_as_code | f355dc62a5025b710ac6d4a6ac2f9610265fad54 | [
"MIT"
] | 37 | 2015-02-01T23:16:39.000Z | 2021-12-22T16:50:48.000Z | talks-articles/languages-n-runtimes/elixir/book--programming-elixir-ge-1.6/chapter-22.exs | abhishekkr/tutorials_as_code | f355dc62a5025b710ac6d4a6ac2f9610265fad54 | [
"MIT"
] | 1 | 2017-03-02T04:55:48.000Z | 2018-01-14T10:51:11.000Z | talks-articles/languages-n-runtimes/elixir/book--programming-elixir-ge-1.6/chapter-22.exs | abhishekkr/tutorials_as_code | f355dc62a5025b710ac6d4a6ac2f9610265fad54 | [
"MIT"
] | 15 | 2015-03-02T08:09:01.000Z | 2021-06-10T03:25:41.000Z | defmodule DontUse do
def xif(condition, clauses) do
case condition do
val when val in [false, nil] -> Keyword.get(clauses, :else, nil)
_ -> Keyword.get(clauses, :do, nil)
end
end
end
xiff = DontUse.xif 1 == 1, do: :gotthis, else: :notthis
IO.inspect(xiff)
DontUse.xif 1 == 1, do: (IO.puts("this... | 19.522167 | 82 | 0.625032 |
970858046c175cbbada6654376897c957c5caeb7 | 1,329 | exs | Elixir | kindergarten-garden/garden.exs | ravanscafi/exercism-elixir | 0f5c8c923166a0a795c323c7e2d6ccc9da572fcf | [
"MIT"
] | null | null | null | kindergarten-garden/garden.exs | ravanscafi/exercism-elixir | 0f5c8c923166a0a795c323c7e2d6ccc9da572fcf | [
"MIT"
] | null | null | null | kindergarten-garden/garden.exs | ravanscafi/exercism-elixir | 0f5c8c923166a0a795c323c7e2d6ccc9da572fcf | [
"MIT"
] | null | null | null | defmodule Garden do
@plants [
V: :violets,
C: :clover,
R: :radishes,
G: :grass
]
@students [
:alice,
:bob,
:charlie,
:david,
:eve,
:fred,
:ginny,
:harriet,
:ileana,
:joseph,
:kincaid,
:larry
]
@doc """
Accepts a string representing the arra... | 22.913793 | 80 | 0.617758 |
97085aaad2800b111e683cb14ab80e689cdfa62f | 3,717 | ex | Elixir | lib/export/ruby.ex | nutheory/export | 8a6eb7de59bb9818ddd2b00d4bde32eff85dff9d | [
"MIT"
] | null | null | null | lib/export/ruby.ex | nutheory/export | 8a6eb7de59bb9818ddd2b00d4bde32eff85dff9d | [
"MIT"
] | null | null | null | lib/export/ruby.ex | nutheory/export | 8a6eb7de59bb9818ddd2b00d4bde32eff85dff9d | [
"MIT"
] | null | null | null | defmodule Export.Ruby do
@moduledoc """
Wrapper for ruby.
## Example
```elixir
defmodule SomeRubyCall do
use Export.Ruby
def call_ruby_method
# path to ruby files
{:ok, ruby} = Ruby.start(ruby_lib: Path.expand("lib/ruby"))
# call "upcase" method from "test" file with "hello" argum... | 26.55 | 118 | 0.656981 |
97086ed9d32a24b42a3e8fe4244fdaab2b05edc0 | 1,514 | ex | Elixir | lib/json.ex | massivefermion/Enux | 19c95a0c75b3b2285452210d6e5c84b3376d8788 | [
"Apache-2.0"
] | 1 | 2021-07-10T07:16:13.000Z | 2021-07-10T07:16:13.000Z | lib/json.ex | massivefermion/enux | 19c95a0c75b3b2285452210d6e5c84b3376d8788 | [
"Apache-2.0"
] | null | null | null | lib/json.ex | massivefermion/enux | 19c95a0c75b3b2285452210d6e5c84b3376d8788 | [
"Apache-2.0"
] | null | null | null | defmodule Enux.Json do
@moduledoc """
handles json files
"""
import Enux.Utils
@doc """
decodes the json passed to it by `Enux.load` and format it into a keyword list
"""
def decode(content, opts) do
decode = get_decode_function()
decoded = decode.(content)
cond do
is_map(decoded) ->... | 22.939394 | 87 | 0.542272 |
97087c103512df99a0bde30aad6336358ae8372a | 2,464 | ex | Elixir | clients/content/lib/google_api/content/v2/model/orders_update_shipment_request.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/content/lib/google_api/content/v2/model/orders_update_shipment_request.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/orders_update_shipment_request.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 39.741935 | 211 | 0.702516 |
97088c60cd276369b4a3e54908b65bef70599153 | 1,036 | ex | Elixir | test/support/conn_case.ex | launchdarkly/hello-phoenix | 3e812ad959789e89e1de8a216d1c30db659e4be2 | [
"Apache-2.0"
] | null | null | null | test/support/conn_case.ex | launchdarkly/hello-phoenix | 3e812ad959789e89e1de8a216d1c30db659e4be2 | [
"Apache-2.0"
] | 2 | 2022-03-29T22:26:54.000Z | 2022-03-30T22:33:49.000Z | test/support/conn_case.ex | launchdarkly/hello-phoenix | 3e812ad959789e89e1de8a216d1c30db659e4be2 | [
"Apache-2.0"
] | 1 | 2021-05-23T17:43:09.000Z | 2021-05-23T17:43:09.000Z | defmodule HelloPhoenixWeb.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, ... | 28.777778 | 66 | 0.741313 |
9708ce156febd6a5dccf441460bc5c7ebade7be7 | 12,136 | exs | Elixir | test/glimesh/chat_test.exs | mja00/glimesh.tv | 1f543bfdf68de269d0984041ed8394b78fb2158d | [
"MIT"
] | null | null | null | test/glimesh/chat_test.exs | mja00/glimesh.tv | 1f543bfdf68de269d0984041ed8394b78fb2158d | [
"MIT"
] | null | null | null | test/glimesh/chat_test.exs | mja00/glimesh.tv | 1f543bfdf68de269d0984041ed8394b78fb2158d | [
"MIT"
] | null | null | null | defmodule Glimesh.ChatTest do
use Glimesh.DataCase
import Glimesh.AccountsFixtures
import Phoenix.HTML, only: [safe_to_string: 1]
alias Glimesh.Chat
alias Glimesh.Streams
alias Glimesh.Streams.ChannelModerationLog
describe "chat_messages" do
alias Glimesh.Chat.ChatMessage
@valid_attrs %{messag... | 34.379603 | 109 | 0.655817 |
9708dd9a51718fab058c3292d6c8c3881d3f9a6a | 3,771 | ex | Elixir | lib/new_relic/harvest/collector/span_event/harvester.ex | ll1498/elixir_agent | a7b3bf1b49639c61d9eba3d4b91b30e0e856b54a | [
"Apache-2.0"
] | 1 | 2020-08-13T05:08:20.000Z | 2020-08-13T05:08:20.000Z | lib/new_relic/harvest/collector/span_event/harvester.ex | ll1498/elixir_agent | a7b3bf1b49639c61d9eba3d4b91b30e0e856b54a | [
"Apache-2.0"
] | null | null | null | lib/new_relic/harvest/collector/span_event/harvester.ex | ll1498/elixir_agent | a7b3bf1b49639c61d9eba3d4b91b30e0e856b54a | [
"Apache-2.0"
] | null | null | null | defmodule NewRelic.Harvest.Collector.SpanEvent.Harvester do
use GenServer
@moduledoc false
alias NewRelic.DistributedTrace
alias NewRelic.Harvest.Collector
alias NewRelic.Span.Event
alias NewRelic.Util.PriorityQueue
def start_link do
GenServer.start_link(__MODULE__, [])
end
def init(_) do
... | 26.370629 | 101 | 0.674887 |
9708f041d93125ac77b71ae04c42635c554e6bfe | 5,924 | ex | Elixir | OctoPrint-Chromoid_link_octo_print/lib/chromoid_link_octo_print/plugin_socket.ex | ConnorRigby/chromoid | 6424a9234227d18d7c287ded869caeb31511bb97 | [
"Apache-2.0"
] | 7 | 2020-11-18T11:29:20.000Z | 2022-01-16T03:16:14.000Z | OctoPrint-Chromoid_link_octo_print/lib/chromoid_link_octo_print/plugin_socket.ex | ConnorRigby/chromoid | 6424a9234227d18d7c287ded869caeb31511bb97 | [
"Apache-2.0"
] | null | null | null | OctoPrint-Chromoid_link_octo_print/lib/chromoid_link_octo_print/plugin_socket.ex | ConnorRigby/chromoid | 6424a9234227d18d7c287ded869caeb31511bb97 | [
"Apache-2.0"
] | 1 | 2021-01-06T15:40:46.000Z | 2021-01-06T15:40:46.000Z | defmodule ChromoidLinkOctoPrint.PluginSocket do
use GenServer
require Logger
alias ChromoidLinkOctoPrint.{PluginHTTP, DeviceChannel}
@socket_name ChromoidLinkOctoPrint.PhoenixSocket
defmodule SocketLogger do
@behaviour :gen_event
@impl :gen_event
def init(__MODULE__) do
init({__MODULE__, [... | 25.982456 | 99 | 0.629642 |
97090911286eee8950468c3c6b66ebe10405488e | 8,761 | ex | Elixir | lib/cgrates_web_jsonapi_web/router.ex | max-konin/cgrates_web_jsonapi | e82690e343d790b0f77dea6699483fcb6fd8a162 | [
"MIT"
] | 2 | 2018-10-03T07:41:32.000Z | 2021-03-21T11:27:27.000Z | lib/cgrates_web_jsonapi_web/router.ex | max-konin/cgrates_web_jsonapi | e82690e343d790b0f77dea6699483fcb6fd8a162 | [
"MIT"
] | 1 | 2018-10-31T04:55:59.000Z | 2018-10-31T04:55:59.000Z | lib/cgrates_web_jsonapi_web/router.ex | max-konin/cgrates_web_jsonapi | e82690e343d790b0f77dea6699483fcb6fd8a162 | [
"MIT"
] | 5 | 2018-09-27T11:30:44.000Z | 2021-01-16T08:28:58.000Z | defmodule CgratesWebJsonapiWeb.Router do
use CgratesWebJsonapiWeb, :router
pipeline :cors do
plug CORSPlug, origin: "*"
end
pipeline :api do
plug(:accepts, ["json-api"])
plug JaSerializer.ContentTypeNegotiation
plug JaSerializer.Deserializer
end
pipeline :private_api do
plug :accepts,... | 49.778409 | 96 | 0.726629 |
9709157b2fcc97308d0fb8065e5fd441165150fe | 237 | exs | Elixir | config/config.exs | libitx/manic | c77363b09908d135996fbe43339ac6b3c5cc0499 | [
"MIT"
] | 12 | 2020-04-22T16:14:44.000Z | 2022-01-17T15:44:09.000Z | config/config.exs | libitx/manic | c77363b09908d135996fbe43339ac6b3c5cc0499 | [
"MIT"
] | 1 | 2020-07-10T23:18:59.000Z | 2020-07-16T16:06:32.000Z | config/config.exs | libitx/manic | c77363b09908d135996fbe43339ac6b3c5cc0499 | [
"MIT"
] | 2 | 2021-01-10T22:38:19.000Z | 2021-02-13T22:14:03.000Z | use Mix.Config
case Mix.env do
:test ->
config :logger, level: :error
config :tesla, adapter: Tesla.Mock
_ ->
config :tesla, adapter: {Tesla.Adapter.Mint, [
timeout: :infinity,
protocols: [:http1]
]}
end
| 18.230769 | 50 | 0.607595 |
97094492aab04be50ab7fde7f96be03400770af6 | 1,147 | exs | Elixir | test/grizzly/zwave/commands/time_parameters_set_test.exs | jellybob/grizzly | 290bee04cb16acbb9dc996925f5c501697b7ac94 | [
"Apache-2.0"
] | 76 | 2019-09-04T16:56:58.000Z | 2022-03-29T06:54:36.000Z | test/grizzly/zwave/commands/time_parameters_set_test.exs | jellybob/grizzly | 290bee04cb16acbb9dc996925f5c501697b7ac94 | [
"Apache-2.0"
] | 124 | 2019-09-05T14:01:24.000Z | 2022-02-28T22:58:14.000Z | test/grizzly/zwave/commands/time_parameters_set_test.exs | jellybob/grizzly | 290bee04cb16acbb9dc996925f5c501697b7ac94 | [
"Apache-2.0"
] | 10 | 2019-10-23T19:25:45.000Z | 2021-11-17T13:21:20.000Z | defmodule Grizzly.ZWave.Commands.TimeParametersSetTest do
use ExUnit.Case, async: true
alias Grizzly.ZWave.Commands.TimeParametersSet
test "creates the command and validates params" do
params = [year: 2020, month: 7, day: 17, hour_utc: 14, minute_utc: 30, second_utc: 45]
{:ok, _command} = TimeParameters... | 39.551724 | 90 | 0.700959 |
97094ef5421a00a177de0a6993ba0d4de338e1c7 | 257 | ex | Elixir | 09-error-handlig/custom_error.ex | kranfix/elixir-playground | 28f1314b137eb591946f501647e76d8017070ffa | [
"MIT"
] | null | null | null | 09-error-handlig/custom_error.ex | kranfix/elixir-playground | 28f1314b137eb591946f501647e76d8017070ffa | [
"MIT"
] | null | null | null | 09-error-handlig/custom_error.ex | kranfix/elixir-playground | 28f1314b137eb591946f501647e76d8017070ffa | [
"MIT"
] | 1 | 2020-11-17T07:06:17.000Z | 2020-11-17T07:06:17.000Z | defmodule CustomError do
defexception [:message, country: "Peru"]
end
defmodule DefaultError do
defexception message: "My default Error"
end
# iex> raise CustomError
# iex> raise DefaultError
# iex> raise DefaultError, message: "Not my default error"
| 21.416667 | 58 | 0.766537 |
9709553c3c4f79bd2cfb696bb05f2b4f980d5f28 | 2,811 | ex | Elixir | web/controllers/run_controller.ex | austinschwartz/docker_frontend_demo | 5f6d0bb3db91db93d032b59cec95998bbb1935d8 | [
"MIT"
] | null | null | null | web/controllers/run_controller.ex | austinschwartz/docker_frontend_demo | 5f6d0bb3db91db93d032b59cec95998bbb1935d8 | [
"MIT"
] | null | null | null | web/controllers/run_controller.ex | austinschwartz/docker_frontend_demo | 5f6d0bb3db91db93d032b59cec95998bbb1935d8 | [
"MIT"
] | null | null | null | defmodule Demo.RunController do
use Demo.Web, :controller
alias Demo.Run
def index(conn, _params) do
runs = Repo.all(Run)
render(conn, "index.html", runs: runs)
end
def new(conn, _params) do
changeset = Run.changeset(%Run{})
render(conn, "new.html", changeset: changeset)
end
def create... | 25.554545 | 103 | 0.580576 |
97099eb6d2bf3510342cef5b50ed52b94c48f681 | 1,547 | ex | Elixir | lib/portfolio_web/views/error_helpers.ex | drewfravert/drewfravert.com | 57b3c890d7d931700908bfe9af35921d12419e96 | [
"MIT"
] | null | null | null | lib/portfolio_web/views/error_helpers.ex | drewfravert/drewfravert.com | 57b3c890d7d931700908bfe9af35921d12419e96 | [
"MIT"
] | null | null | null | lib/portfolio_web/views/error_helpers.ex | drewfravert/drewfravert.com | 57b3c890d7d931700908bfe9af35921d12419e96 | [
"MIT"
] | null | null | null | defmodule PortfolioWeb.ErrorHelpers do
@moduledoc """
Conveniences for translating and building error messages.
"""
use Phoenix.HTML
@doc """
Generates tag for inlined form input errors.
"""
def error_tag(form, field) do
Enum.map(Keyword.get_values(form.errors, field), fn error ->
content_ta... | 32.914894 | 90 | 0.669037 |
9709e8e5f7875efe5556a742293425757fc66d6b | 988 | ex | Elixir | test/support/channel_case.ex | wlodarczykj/yacht | 31a4199555a1e5e14b3cbed8a0d960477f4a5bd0 | [
"Apache-2.0"
] | null | null | null | test/support/channel_case.ex | wlodarczykj/yacht | 31a4199555a1e5e14b3cbed8a0d960477f4a5bd0 | [
"Apache-2.0"
] | null | null | null | test/support/channel_case.ex | wlodarczykj/yacht | 31a4199555a1e5e14b3cbed8a0d960477f4a5bd0 | [
"Apache-2.0"
] | null | null | null | defmodule Yacht.ChannelCase do
@moduledoc """
This module defines the test case to be used by
channel tests.
Such tests rely on `Phoenix.ChannelTest` and also
import other functionality to make it easier
to build and query models.
Finally, if the test case interacts with the database,
it cannot be asy... | 22.454545 | 67 | 0.697368 |
970a37b583ca8a0df4eb6c0b9ca1b3e13f97a830 | 795 | ex | Elixir | farmbot_core/lib/farmbot_celery_script/compilers/lua.ex | gdwb/farmbot_os | 0ef2697c580c9fbf37a22daa063a64addfcb778d | [
"MIT"
] | 1 | 2021-08-23T13:36:14.000Z | 2021-08-23T13:36:14.000Z | farmbot_core/lib/farmbot_celery_script/compilers/lua.ex | gdwb/farmbot_os | 0ef2697c580c9fbf37a22daa063a64addfcb778d | [
"MIT"
] | null | null | null | farmbot_core/lib/farmbot_celery_script/compilers/lua.ex | gdwb/farmbot_os | 0ef2697c580c9fbf37a22daa063a64addfcb778d | [
"MIT"
] | null | null | null | defmodule FarmbotCeleryScript.Compiler.Lua do
alias FarmbotCeleryScript.SysCalls
alias FarmbotCeleryScript.Compiler.{ VariableTransformer, Scope, }
def lua(%{args: %{lua: lua}}, cs_scope) do
quote location: :keep do
# lua.ex
mod = unquote(__MODULE__)
mod.do_lua(unquote(lua), unquote(cs_scop... | 27.413793 | 78 | 0.630189 |
970a51cf68a67ef1383fe33ba03b93fc5bf4f175 | 1,906 | ex | Elixir | clients/content/lib/google_api/content/v21/model/list_repricing_rule_reports_response.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v21/model/list_repricing_rule_reports_response.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/content/lib/google_api/content/v21/model/list_repricing_rule_reports_response.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... | 38.12 | 160 | 0.753935 |
970a5d9d7252d03e457633db15aa67f4f9022053 | 1,815 | ex | Elixir | clients/content/lib/google_api/content/v2/model/transit_table_transit_time_row_transit_time_value.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/transit_table_transit_time_row_transit_time_value.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/transit_table_transit_time_row_transit_time_value.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 35.588235 | 159 | 0.75978 |
970a6ac024c27cb2fb719fdf9ec51278275c49a2 | 2,055 | ex | Elixir | lib/cforum_web/controllers/users/registration_controller.ex | jrieger/cforum_ex | 61f6ce84708cb55bd0feedf69853dae64146a7a0 | [
"MIT"
] | 16 | 2019-04-04T06:33:33.000Z | 2021-08-16T19:34:31.000Z | lib/cforum_web/controllers/users/registration_controller.ex | jrieger/cforum_ex | 61f6ce84708cb55bd0feedf69853dae64146a7a0 | [
"MIT"
] | 294 | 2019-02-10T11:10:27.000Z | 2022-03-30T04:52:53.000Z | lib/cforum_web/controllers/users/registration_controller.ex | jrieger/cforum_ex | 61f6ce84708cb55bd0feedf69853dae64146a7a0 | [
"MIT"
] | 10 | 2019-02-10T10:39:24.000Z | 2021-07-06T11:46:05.000Z | defmodule CforumWeb.Users.RegistrationController do
use CforumWeb, :controller
alias Cforum.Abilities
alias Cforum.Users
alias Cforum.Users.User
alias Cforum.Helpers
def new(conn, _params) do
changeset = User.register_changeset(%User{})
render(conn, "new.html", changeset: changeset)
end
def c... | 29.357143 | 116 | 0.633577 |
970a795b37c0ca9e578be460c81767165cf8512c | 522 | exs | Elixir | test/absinthe/integration/execution/introspection/subscription_type_test.exs | hauptbenutzer/absinthe | f1d76e5c249ca337187971b0c96b1870f53716ed | [
"MIT"
] | null | null | null | test/absinthe/integration/execution/introspection/subscription_type_test.exs | hauptbenutzer/absinthe | f1d76e5c249ca337187971b0c96b1870f53716ed | [
"MIT"
] | null | null | null | test/absinthe/integration/execution/introspection/subscription_type_test.exs | hauptbenutzer/absinthe | f1d76e5c249ca337187971b0c96b1870f53716ed | [
"MIT"
] | 1 | 2018-11-16T02:34:40.000Z | 2018-11-16T02:34:40.000Z | defmodule Elixir.Absinthe.Integration.Execution.Introspection.SubscriptionTypeTest do
use ExUnit.Case, async: true
@query """
query { __schema { subscriptionType { name kind } } }
"""
test "scenario #1" do
assert {:ok,
%{
data: %{
"__schema" => %{
... | 27.473684 | 95 | 0.532567 |
970a7ce152ee2dab8e4abf19bc6266f4aab9f534 | 3,687 | ex | Elixir | lib/gitexpress/entries/parser.ex | juhalehtonen/GitExPress | 1116d72fdf74571a7506d6550f0f55fde3293422 | [
"MIT"
] | null | null | null | lib/gitexpress/entries/parser.ex | juhalehtonen/GitExPress | 1116d72fdf74571a7506d6550f0f55fde3293422 | [
"MIT"
] | null | null | null | lib/gitexpress/entries/parser.ex | juhalehtonen/GitExPress | 1116d72fdf74571a7506d6550f0f55fde3293422 | [
"MIT"
] | null | null | null | defmodule GitExPress.Entries.Parser do
@moduledoc """
Provide mechanisms for parsing markdown content and converting it to GitExPress
friendly format.
"""
require Logger
alias GitExPress.Entries.Entry
@source Application.get_env(:gitexpress, :local_path)
@meta_title "Title: "
@meta_date "Date: "
@pa... | 25.604167 | 89 | 0.62083 |
970aa506f8c34619d16bf382f9b2cdf723b36c66 | 1,853 | ex | Elixir | clients/content/lib/google_api/content/v21/model/accounts_custom_batch_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/content/lib/google_api/content/v21/model/accounts_custom_batch_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/content/lib/google_api/content/v21/model/accounts_custom_batch_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... | 36.333333 | 167 | 0.738802 |
970aa5512a1a55e15b2138f8d72b1a8eaf935a26 | 734 | exs | Elixir | day1/test/day1_test.exs | amacgregor/AdventOfCode2015 | 0d90c75743a5298e7325aad1f4842b5ce9f36e1c | [
"CC0-1.0"
] | null | null | null | day1/test/day1_test.exs | amacgregor/AdventOfCode2015 | 0d90c75743a5298e7325aad1f4842b5ce9f36e1c | [
"CC0-1.0"
] | null | null | null | day1/test/day1_test.exs | amacgregor/AdventOfCode2015 | 0d90c75743a5298e7325aad1f4842b5ce9f36e1c | [
"CC0-1.0"
] | null | null | null | defmodule Day1Test do
use ExUnit.Case
doctest Day1
test "the truth" do
assert 1 + 1 == 2
end
test "the floor should be zero to start" do
assert Day1.get_floor() == 0
end
test "the elevator should go up" do
instructions = "("
assert Day1.get_floor(instructions) == 1
end
test "the e... | 22.242424 | 83 | 0.655313 |
970aa55b64920075f2a6f60bc583a5d8cdde5e3e | 1,373 | ex | Elixir | hello/test/support/data_case.ex | Ogiwara-CostlierRain464/Elixir | 498d0aa7f1b66ed1674b89c0fec4a5cb34234a33 | [
"MIT"
] | 1 | 2018-01-12T20:21:56.000Z | 2018-01-12T20:21:56.000Z | hello/test/support/data_case.ex | nash-elixir/intro-to-phoenix | 46e78713a0e8dcd895ad4f22d75b40c55ae41435 | [
"MIT"
] | null | null | null | hello/test/support/data_case.ex | nash-elixir/intro-to-phoenix | 46e78713a0e8dcd895ad4f22d75b40c55ae41435 | [
"MIT"
] | null | null | null | defmodule Hello.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 |
970ab7103be2149159c4a065fa5f473112244d17 | 27,346 | ex | Elixir | lib/generated/list_offsets.ex | kevint-simplifi/kayrock | 9c88e99ec913728107ec99f9af94dc1d25e0e0d8 | [
"MIT"
] | 24 | 2019-06-26T22:08:13.000Z | 2022-01-27T00:10:41.000Z | lib/generated/list_offsets.ex | kevint-simplifi/kayrock | 9c88e99ec913728107ec99f9af94dc1d25e0e0d8 | [
"MIT"
] | 10 | 2020-04-10T07:48:53.000Z | 2021-03-26T10:50:25.000Z | lib/generated/list_offsets.ex | kevint-simplifi/kayrock | 9c88e99ec913728107ec99f9af94dc1d25e0e0d8 | [
"MIT"
] | 11 | 2019-10-30T12:53:09.000Z | 2022-03-09T23:16:42.000Z | defmodule(Kayrock.ListOffsets) do
@api :list_offsets
@moduledoc "Kayrock-generated module for the Kafka `#{@api}` API\n"
_ = " THIS CODE IS GENERATED BY KAYROCK"
(
@vmin 0
@vmax 2
)
defmodule(V0.Request) do
@vsn 0
@api :list_offsets
@schema replica_id: :int32,
topics:
... | 31.039728 | 130 | 0.529364 |
970abb9f05c4db05fb1ee7c66ba7f66633cfef20 | 4,042 | ex | Elixir | lib/credo/check/refactor/long_quote_blocks.ex | adrienmo/credo | 205f43ba6cfc81b932605d4aa86fdb8378dea3a3 | [
"MIT"
] | null | null | null | lib/credo/check/refactor/long_quote_blocks.ex | adrienmo/credo | 205f43ba6cfc81b932605d4aa86fdb8378dea3a3 | [
"MIT"
] | null | null | null | lib/credo/check/refactor/long_quote_blocks.ex | adrienmo/credo | 205f43ba6cfc81b932605d4aa86fdb8378dea3a3 | [
"MIT"
] | null | null | null | defmodule Credo.Check.Refactor.LongQuoteBlocks do
use Credo.Check,
base_priority: :high,
param_defaults: [max_line_count: 150, ignore_comments: false],
explanations: [
check: """
Long `quote` blocks are generally an indication that too much is done inside
them.
Let's look at why t... | 26.768212 | 95 | 0.534636 |
970abc31409e8c01b6a3e8ea26fa0e604e2ab29c | 6,528 | ex | Elixir | lib/helper/query_builder.ex | mydearxym/mastani_server | f24034a4a5449200165cf4a547964a0961793eab | [
"Apache-2.0"
] | 2 | 2018-03-26T08:56:21.000Z | 2018-07-02T22:34:51.000Z | lib/helper/query_builder.ex | mydearxym/mastani_server | f24034a4a5449200165cf4a547964a0961793eab | [
"Apache-2.0"
] | 22 | 2018-03-21T03:40:50.000Z | 2018-07-10T06:33:10.000Z | lib/helper/query_builder.ex | mydearxym/mastani_server | f24034a4a5449200165cf4a547964a0961793eab | [
"Apache-2.0"
] | null | null | null | defmodule Helper.QueryBuilder do
@moduledoc """
handle common query pices across the project
"""
import Ecto.Query, warn: false
alias GroupherServer.CMS
alias CMS.Model.Repo, as: CMSRepo
@audit_illegal CMS.Constant.pending(:illegal)
@audit_failed CMS.Constant.pending(:audit_failed)
@doc """
load ... | 29.672727 | 86 | 0.591452 |
970ad1f480598f6d92d2d1cd97e228cce381643b | 405 | exs | Elixir | hoge/test/hoge_web/views/error_view_test.exs | t-yamanashi/testex | 2b51788fc71f7b60c40316b9a9b6166953a060ba | [
"Apache-2.0"
] | null | null | null | hoge/test/hoge_web/views/error_view_test.exs | t-yamanashi/testex | 2b51788fc71f7b60c40316b9a9b6166953a060ba | [
"Apache-2.0"
] | null | null | null | hoge/test/hoge_web/views/error_view_test.exs | t-yamanashi/testex | 2b51788fc71f7b60c40316b9a9b6166953a060ba | [
"Apache-2.0"
] | null | null | null | defmodule HogeWeb.ErrorViewTest do
use HogeWeb.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(HogeWeb.ErrorView, "404.html", []) == "Not Found"
end
test "renders 500.html" do
assert rend... | 27 | 89 | 0.725926 |
970af520deb8c0197659689ee3b3f504789f6fac | 861 | ex | Elixir | lib/terp/value.ex | tpoulsen/terp | a11b2452bec7b3dd558b5b51a27b44a5b7dda009 | [
"BSD-2-Clause"
] | 23 | 2017-09-22T07:13:34.000Z | 2021-06-08T14:50:06.000Z | lib/terp/value.ex | smpoulsen/terp | a11b2452bec7b3dd558b5b51a27b44a5b7dda009 | [
"BSD-2-Clause"
] | 5 | 2017-08-26T18:40:54.000Z | 2017-09-28T00:24:50.000Z | lib/terp/value.ex | smpoulsen/terp | a11b2452bec7b3dd558b5b51a27b44a5b7dda009 | [
"BSD-2-Clause"
] | 4 | 2017-09-27T23:14:59.000Z | 2021-06-08T14:50:12.000Z | defmodule Terp.Value do
defstruct [:constructor, :args]
alias __MODULE__
alias Terp.Evaluate.Environment
def constructor_fn([c | xs], env) do
args = Enum.map(xs, fn x -> x.node end)
f = constructor_helper(args, c.node, [])
Environment.let([c, RoseTree.new(f)], env)
end
defp constructor_helper(... | 23.27027 | 61 | 0.62137 |
970af52fea8e36da66487d5a41baa817f6f5a332 | 2,133 | ex | Elixir | apps/omg_watcher/lib/omg_watcher/api/utxo.ex | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | null | null | null | apps/omg_watcher/lib/omg_watcher/api/utxo.ex | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | null | null | null | apps/omg_watcher/lib/omg_watcher/api/utxo.ex | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | null | null | null | # 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 ... | 33.857143 | 113 | 0.699953 |
970b09a19d35efd744550cc4b2b93d6787ca6edf | 19,392 | ex | Elixir | clients/compute/lib/google_api/compute/v1/api/http_health_checks.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/api/http_health_checks.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/api/http_health_checks.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... | 53.421488 | 1,213 | 0.705188 |
970b0f423b3a7ed8eb56a3b0835756fae20b314d | 892 | ex | Elixir | clients/search_console/lib/google_api/search_console/v1/metadata.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/search_console/lib/google_api/search_console/v1/metadata.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/search_console/lib/google_api/search_console/v1/metadata.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 33.037037 | 74 | 0.761211 |
970b13ae381d68d99dfb16f11c7e8b4bcfccf75e | 1,425 | ex | Elixir | lib/changelog/newsletters/newsletters.ex | boneskull/changelog.com | 2fa2e356bb0e8fcf038c46a4a947fef98822e37d | [
"MIT"
] | null | null | null | lib/changelog/newsletters/newsletters.ex | boneskull/changelog.com | 2fa2e356bb0e8fcf038c46a4a947fef98822e37d | [
"MIT"
] | null | null | null | lib/changelog/newsletters/newsletters.ex | boneskull/changelog.com | 2fa2e356bb0e8fcf038c46a4a947fef98822e37d | [
"MIT"
] | null | null | null | defmodule Changelog.Newsletters do
alias Changelog.Cache
alias Changelog.Newsletters.Newsletter
alias Craisin.List
def get_by_slug(slug) do
apply(__MODULE__, String.to_existing_atom(slug), [])
end
def afk do
%Newsletter{
name: "Away from Keyboard",
list_id: "8c8c5f024909b9627f26ec8fc9... | 20.955882 | 64 | 0.666667 |
970b21ab21fa38eedd257280d78757740269355d | 2,161 | ex | Elixir | clients/content/lib/google_api/content/v2/model/orders_custom_batch_request_entry_set_line_item_metadata.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/content/lib/google_api/content/v2/model/orders_custom_batch_request_entry_set_line_item_metadata.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/content/lib/google_api/content/v2/model/orders_custom_batch_request_entry_set_line_item_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... | 36.627119 | 191 | 0.732068 |
970b23ab41d56fc540d4084941459836e20b2643 | 36,671 | ex | Elixir | lib/phoenix_live_view/engine.ex | sthagen/phoenixframework-phoenix_live_view | 196ba2f8c9c367ee9e0ff8273f2a9c22a1c7027a | [
"MIT"
] | null | null | null | lib/phoenix_live_view/engine.ex | sthagen/phoenixframework-phoenix_live_view | 196ba2f8c9c367ee9e0ff8273f2a9c22a1c7027a | [
"MIT"
] | null | null | null | lib/phoenix_live_view/engine.ex | sthagen/phoenixframework-phoenix_live_view | 196ba2f8c9c367ee9e0ff8273f2a9c22a1c7027a | [
"MIT"
] | null | null | null | defmodule Phoenix.LiveView.Component do
@moduledoc """
The struct returned by components in .heex templates.
This component is never meant to be output directly
into the template. It should always be handled by
the diffing algorithm.
"""
defstruct [:id, :component, :assigns]
@type t :: %__MODULE__{
... | 31.749784 | 100 | 0.630935 |
970b51c282344929114eee07de0c2c315f25902c | 1,983 | ex | Elixir | identicon/lib/identicon.ex | ivoferro/elixir_phoenix_bootcamp | e3445dbf90c1eea81e8aa34cc7801934a516d7d7 | [
"MIT"
] | null | null | null | identicon/lib/identicon.ex | ivoferro/elixir_phoenix_bootcamp | e3445dbf90c1eea81e8aa34cc7801934a516d7d7 | [
"MIT"
] | null | null | null | identicon/lib/identicon.ex | ivoferro/elixir_phoenix_bootcamp | e3445dbf90c1eea81e8aa34cc7801934a516d7d7 | [
"MIT"
] | null | null | null | defmodule Identicon do
@moduledoc """
Documentation for Identicon.
"""
@doc """
Hello world.
## Examples
iex> Identicon.hello
:world
"""
def hello do
:world
end
def main(input) do
input
|> hash_input
|> pick_color
|> build_grid
|> filter_odd_squares
|> bu... | 20.443299 | 73 | 0.620272 |
970b765a117dc94edec46c2bcdba9a83bcafdaa6 | 13,135 | ex | Elixir | lib/plug/parsers.ex | victorolinasc/plug | 9c459a396a3406d73371daf2631fd3682b254c86 | [
"Apache-2.0"
] | 1,218 | 2017-07-14T15:13:32.000Z | 2022-03-30T16:42:42.000Z | deps/plug/lib/plug/parsers.ex | rwtrecs/rocketseat-nlw5-inmana | 8ce8bc32e0bdd005c423394bb163945747b557e2 | [
"MIT"
] | 502 | 2017-07-19T15:36:44.000Z | 2022-03-31T06:47:36.000Z | deps/plug/lib/plug/parsers.ex | adrianomota/blog | ef3b2d2ed54f038368ead8234d76c18983caa75b | [
"MIT"
] | 376 | 2017-07-17T15:47:55.000Z | 2022-03-23T19:24:30.000Z | defmodule Plug.Parsers do
defmodule RequestTooLargeError do
@moduledoc """
Error raised when the request is too large.
"""
defexception message:
"the request is too large. If you are willing to process " <>
"larger requests, please give a :length to Plug.Parser... | 33.940568 | 96 | 0.653293 |
970b76608f2015afeac0c70d9cf131d7a4af687d | 1,456 | exs | Elixir | config/dev.exs | zemuldo/zemuldo.com.backend | 0d9ee45e8595f9e154744e68eb820cce01905bac | [
"MIT"
] | 2 | 2018-03-02T11:29:33.000Z | 2019-10-26T18:38:01.000Z | config/dev.exs | zemuldo/zemuldo.com.backend | 0d9ee45e8595f9e154744e68eb820cce01905bac | [
"MIT"
] | 5 | 2018-01-30T11:40:56.000Z | 2021-07-12T05:30:02.000Z | config/dev.exs | zemuldo/zemuldo.com.backend | 0d9ee45e8595f9e154744e68eb820cce01905bac | [
"MIT"
] | 1 | 2020-07-25T15:07:12.000Z | 2020-07-25T15:07:12.000Z | use Mix.Config
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with webpack to recompile .js and .css sources.
config :ex_api, ExApiWeb.Endpoint,
http: [port: 8091],
... | 29.12 | 68 | 0.723901 |
970b8935afcd41ec3d42b054528c585a3b7f50a6 | 1,113 | ex | Elixir | lib/ex_crowdin/request.ex | thekirinlab/ex_crowdin | 6c1dd73955ad48254b8121c61a41ce3a4678713b | [
"Apache-2.0"
] | 5 | 2021-06-30T02:50:19.000Z | 2021-07-26T09:42:04.000Z | lib/ex_crowdin/request.ex | thekirinlab/ex_crowdin | 6c1dd73955ad48254b8121c61a41ce3a4678713b | [
"Apache-2.0"
] | null | null | null | lib/ex_crowdin/request.ex | thekirinlab/ex_crowdin | 6c1dd73955ad48254b8121c61a41ce3a4678713b | [
"Apache-2.0"
] | null | null | null | defmodule ExCrowdin.Request do
@moduledoc """
Utilities to send request to Crowdin API v2
"""
alias HTTPoison.{Error, Response}
require Logger
alias ExCrowdin.Config
@default_opts [
timeout: 15_000,
recv_timeout: 15_000
]
@callback request(String.t(), String.t(), any(), list, list) :: {:ok... | 24.195652 | 97 | 0.6469 |
970bd4d857516728c686b63450f0fa0352b0942b | 729 | exs | Elixir | test/cog/chat/hipchat/templates/embedded/role_list_test.exs | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 1,003 | 2016-02-23T17:21:12.000Z | 2022-02-20T14:39:35.000Z | test/cog/chat/hipchat/templates/embedded/role_list_test.exs | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 906 | 2016-02-22T22:54:19.000Z | 2022-03-11T15:19:43.000Z | test/cog/chat/hipchat/templates/embedded/role_list_test.exs | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 95 | 2016-02-23T13:42:31.000Z | 2021-11-30T14:39:55.000Z | defmodule Cog.Chat.HipChat.Templates.Embedded.RoleListTest do
use Cog.TemplateCase
test "role-list template" do
data = %{"results" => [%{"name" => "foo"},
%{"name" => "bar"},
%{"name" => "baz",
"permissions" => [%{"name": "manag... | 33.136364 | 94 | 0.462277 |
970bd5383341d3afd4231126bf923af93693e5d3 | 3,403 | ex | Elixir | lib/coxir/struct/channel.ex | jano017/coxir | 81e89e0113a9219685be2b61af7d17c5fcd9e5fb | [
"Apache-2.0"
] | null | null | null | lib/coxir/struct/channel.ex | jano017/coxir | 81e89e0113a9219685be2b61af7d17c5fcd9e5fb | [
"Apache-2.0"
] | null | null | null | lib/coxir/struct/channel.ex | jano017/coxir | 81e89e0113a9219685be2b61af7d17c5fcd9e5fb | [
"Apache-2.0"
] | null | null | null | defmodule Coxir.Struct.Channel do
use Coxir.Struct
alias Coxir.Struct.{User, Member, Overwrite, Message}
def pretty(struct) do
struct
|> replace(:owner_id, &User.get/1)
end
def send_message(%{id: id}, content),
do: send_message(id, content)
def send_message(channel, content) do
content =... | 22.536424 | 76 | 0.625624 |
970c0389368a1ec27619744a3e8245bd1f4521f6 | 576 | ex | Elixir | priv/templates/phx.gen.embedded/embedded_schema.ex | blunckr/fenix | aeccae9658ed3d85d8af8f28ce2584d407b43d6b | [
"MIT"
] | 2 | 2017-06-08T23:28:13.000Z | 2017-06-08T23:28:16.000Z | priv/templates/phx.gen.embedded/embedded_schema.ex | blunckr/fenix | aeccae9658ed3d85d8af8f28ce2584d407b43d6b | [
"MIT"
] | null | null | null | priv/templates/phx.gen.embedded/embedded_schema.ex | blunckr/fenix | aeccae9658ed3d85d8af8f28ce2584d407b43d6b | [
"MIT"
] | null | null | null | defmodule <%= inspect schema.module %> do
use Ecto.Schema
import Ecto.Changeset
alias <%= inspect schema.module %>
embedded_schema do
<%= for {k, v} <- schema.types do %> field <%= inspect k %>, <%= inspect v %><%= schema.defaults[k] %><% end %>
end
@doc false
def changeset(%<%= inspect schema.alias ... | 33.882353 | 114 | 0.590278 |
970c21e37c76bb01881664aff2130afda1f74749 | 1,348 | ex | Elixir | questions/basic/00070000-classify.ex | zachvalenta/pgexercises | b16d5c28bb5e21732e6fb39090fa5902d0016e78 | [
"BSD-2-Clause"
] | 335 | 2015-02-09T09:21:34.000Z | 2022-03-30T12:28:18.000Z | questions/basic/00070000-classify.ex | zachvalenta/pgexercises | b16d5c28bb5e21732e6fb39090fa5902d0016e78 | [
"BSD-2-Clause"
] | 58 | 2015-05-12T03:10:54.000Z | 2021-11-27T15:53:36.000Z | questions/basic/00070000-classify.ex | zachvalenta/pgexercises | b16d5c28bb5e21732e6fb39090fa5902d0016e78 | [
"BSD-2-Clause"
] | 63 | 2015-03-18T18:15:56.000Z | 2022-02-23T07:27:46.000Z | |QUESTIONNAME|
Classify results into buckets
|QUESTION|
How can you produce a list of facilities, with each labelled as 'cheap' or 'expensive' depending on if their monthly maintenance cost is more than $100? Return the name and monthly maintenance of the facilities in question.
|QUERY|
select name,
case when (month... | 53.92 | 344 | 0.760386 |
970c226e05b4953f8a654ed80d75870e09aca75c | 1,133 | exs | Elixir | config/config.exs | erikstorm/ex-cli | 3adc97ddea2e622f6b8996bdbf190ad1df24ddc1 | [
"MIT"
] | 1 | 2017-02-03T07:14:31.000Z | 2017-02-03T07:14:31.000Z | config/config.exs | erikstorm/ex-cli | 3adc97ddea2e622f6b8996bdbf190ad1df24ddc1 | [
"MIT"
] | null | null | null | config/config.exs | erikstorm/ex-cli | 3adc97ddea2e622f6b8996bdbf190ad1df24ddc1 | [
"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.548387 | 73 | 0.754634 |
970c30b823ab2155d1d87d2f7658f98fdbeae98b | 1,946 | ex | Elixir | clients/games/lib/google_api/games/v1/model/achievement_update_multiple_response.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/games/lib/google_api/games/v1/model/achievement_update_multiple_response.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/games/lib/google_api/games/v1/model/achievement_update_multiple_response.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 38.92 | 210 | 0.756937 |
970c36c27cc94f1436e3159c36ca563667332e0e | 325 | ex | Elixir | lib/hierbautberlin_web/views/state_helpers.ex | HierBautBerlin/website | 91410e7c61c1efad438fe84bf550f87b0056c440 | [
"MIT"
] | 13 | 2021-03-06T12:16:34.000Z | 2022-03-31T09:46:35.000Z | lib/hierbautberlin_web/views/state_helpers.ex | HierBautBerlin/website | 91410e7c61c1efad438fe84bf550f87b0056c440 | [
"MIT"
] | 148 | 2021-03-05T12:44:55.000Z | 2022-03-11T12:09:06.000Z | lib/hierbautberlin_web/views/state_helpers.ex | HierBautBerlin/website | 91410e7c61c1efad438fe84bf550f87b0056c440 | [
"MIT"
] | 2 | 2021-06-02T14:31:21.000Z | 2022-02-14T08:36:51.000Z | defmodule HierbautberlinWeb.StateHelpers do
def state_to_text(item) do
case item.state do
"intended" -> "Geplant"
"in_preparation" -> "In Vorbereitung"
"in_planning" -> "In Planung"
"under_construction" -> "Im Bau"
"active" -> "Aktiv"
"finished" -> "Abgeschlossen"
end
end... | 25 | 43 | 0.627692 |
970c3a4a5ad01ede86d60acfffc841f065050d18 | 441 | exs | Elixir | test/cableclub/pokemon/gen1/session_test.exs | CableClub/cable-club-core | 70c67c7a105dea83f2c1a1e2ee75a1ee97713bfb | [
"Apache-2.0"
] | null | null | null | test/cableclub/pokemon/gen1/session_test.exs | CableClub/cable-club-core | 70c67c7a105dea83f2c1a1e2ee75a1ee97713bfb | [
"Apache-2.0"
] | null | null | null | test/cableclub/pokemon/gen1/session_test.exs | CableClub/cable-club-core | 70c67c7a105dea83f2c1a1e2ee75a1ee97713bfb | [
"Apache-2.0"
] | null | null | null | defmodule CableClub.Pokemon.Gen1.SessionTest do
use ExUnit.Case
alias CableClub.Pokemon.Gen1.Session
setup %{test: test} do
registry = :ets.new(test, [:public, :set])
{:ok, session} = Session.start_link(registry)
%{session: session, registry: registry}
end
test "code", %{session: session, regist... | 27.5625 | 60 | 0.684807 |
970c704adffb112dcbb37638f773b98659fb68c3 | 3,106 | ex | Elixir | lib/game/command/socials.ex | shanesveller/ex_venture | 68507da11442a9e0423073fcd305e9021f649ca1 | [
"MIT"
] | null | null | null | lib/game/command/socials.ex | shanesveller/ex_venture | 68507da11442a9e0423073fcd305e9021f649ca1 | [
"MIT"
] | null | null | null | lib/game/command/socials.ex | shanesveller/ex_venture | 68507da11442a9e0423073fcd305e9021f649ca1 | [
"MIT"
] | null | null | null | defmodule Game.Command.Socials do
@moduledoc """
The "mail" command
"""
use Game.Command
import Game.Room.Helpers, only: [find_character: 2]
alias Game.Format
alias Game.Socials
commands(["socials"], parse: false)
@impl Game.Command
def help(:topic), do: "Socials"
def help(:short), do: "Say p... | 22.838235 | 98 | 0.60689 |
970c7292075277638ee0ff1e969be8e7bfba438d | 31,995 | ex | Elixir | lib/xema/validator.ex | kianmeng/xema | a990d64fb4bcd708249514daa55426ee003da25d | [
"MIT"
] | null | null | null | lib/xema/validator.ex | kianmeng/xema | a990d64fb4bcd708249514daa55426ee003da25d | [
"MIT"
] | null | null | null | lib/xema/validator.ex | kianmeng/xema | a990d64fb4bcd708249514daa55426ee003da25d | [
"MIT"
] | null | null | null | defmodule Xema.Validator do
@moduledoc """
This module contains all validators to check data against a schema.
"""
use Xema.Format
import Xema.Utils
alias Xema.{Behaviour, Ref, Schema}
@compile {
:inline,
do_validate: 3,
get_type: 1,
struct?: 1,
struct?: 2,
type?: 2,
types:... | 29.11283 | 98 | 0.592124 |
970c78b732647d3e4351fc88dd501dd5a93ec61f | 398 | ex | Elixir | web/views/error_view.ex | JKGisMe/square_square_backend | 1b5237fff2c9dab0e03082ecf5a5a28a1133935b | [
"MIT"
] | null | null | null | web/views/error_view.ex | JKGisMe/square_square_backend | 1b5237fff2c9dab0e03082ecf5a5a28a1133935b | [
"MIT"
] | null | null | null | web/views/error_view.ex | JKGisMe/square_square_backend | 1b5237fff2c9dab0e03082ecf5a5a28a1133935b | [
"MIT"
] | null | null | null | defmodule SquareSquareBackend.ErrorView do
use SquareSquareBackend.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 templ... | 22.111111 | 47 | 0.71608 |
970ca103475fe070da0f73070e355ceff121e05b | 1,350 | ex | Elixir | lib/rally_api/rally_query.ex | jcartwright/rally_api | fdcea7d2a40c7d9c0e392d6836693f5a9a9677a9 | [
"MIT"
] | null | null | null | lib/rally_api/rally_query.ex | jcartwright/rally_api | fdcea7d2a40c7d9c0e392d6836693f5a9a9677a9 | [
"MIT"
] | 11 | 2016-08-31T03:29:31.000Z | 2016-09-02T22:00:05.000Z | lib/rally_api/rally_query.ex | jcartwright/rally_api | fdcea7d2a40c7d9c0e392d6836693f5a9a9677a9 | [
"MIT"
] | null | null | null | defmodule RallyApi.RallyQuery do
import RallyApi
import RallyApi.Rallyties, only: [queryable_types: 0]
def find(client, type, query, fetch, options \\ []) do
case path_for(type) do
{:ok, path} ->
client
|> get(path, query, fetch, options)
{:error, reason} -> {:error, reason}
e... | 26.470588 | 104 | 0.594815 |
970cb113512d10984ad8804e0683714f8cd2c608 | 77 | ex | Elixir | testData/org/elixir_lang/parser_definition/matched_qualified_multiple_aliases_parsing_test_case/MatchedAdditionOperation.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 1,668 | 2015-01-03T05:54:27.000Z | 2022-03-25T08:01:20.000Z | testData/org/elixir_lang/parser_definition/matched_qualified_multiple_aliases_parsing_test_case/MatchedAdditionOperation.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 2,018 | 2015-01-01T22:43:39.000Z | 2022-03-31T20:13:08.000Z | testData/org/elixir_lang/parser_definition/matched_qualified_multiple_aliases_parsing_test_case/MatchedAdditionOperation.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 145 | 2015-01-15T11:37:16.000Z | 2021-12-22T05:51:02.000Z | One.{} + Two.{}
One.{Two} + Three.{Four}
One.{Two, Three} + Four.{Five, Six}
| 19.25 | 35 | 0.558442 |
970cb5600587a5963971bc6339e33d8d3b632f51 | 90 | ex | Elixir | lib/freshcom/core/repo.ex | dclausen/freshcom | 7e1d6397c8ab222cfd03830232cee0718f050490 | [
"BSD-3-Clause"
] | null | null | null | lib/freshcom/core/repo.ex | dclausen/freshcom | 7e1d6397c8ab222cfd03830232cee0718f050490 | [
"BSD-3-Clause"
] | null | null | null | lib/freshcom/core/repo.ex | dclausen/freshcom | 7e1d6397c8ab222cfd03830232cee0718f050490 | [
"BSD-3-Clause"
] | null | null | null | defmodule Freshcom.Repo do
@moduledoc false
use Ecto.Repo,
otp_app: :freshcom
end | 15 | 26 | 0.733333 |
970cb92ca774a326bf4fd08528c7bc90c80bda26 | 27 | exs | Elixir | priv/repo/seeds.exs | jackjoe/mailgun_logger | 7d5a1989afdeb215bcd3753671c61bc25ed4e522 | [
"MIT"
] | 64 | 2020-02-10T20:42:46.000Z | 2021-11-16T10:47:50.000Z | priv/repo/seeds.exs | jackjoe/mailgun_logger | 7d5a1989afdeb215bcd3753671c61bc25ed4e522 | [
"MIT"
] | 16 | 2020-02-10T20:45:57.000Z | 2022-03-04T12:53:34.000Z | priv/repo/seeds.exs | jackjoe/mailgun_logger | 7d5a1989afdeb215bcd3753671c61bc25ed4e522 | [
"MIT"
] | 4 | 2020-04-03T17:13:19.000Z | 2020-07-17T12:56:31.000Z | MailgunLogger.Seeder.run()
| 13.5 | 26 | 0.814815 |
970cef827e49d401578cee0bdbd43a4b8cb9f095 | 1,238 | ex | Elixir | phoenix_chat/web/views/error_helpers.ex | jacopofar/phoenix-chat | a95db8c9d8ed4674426f8c70dae2078ec8cddc9f | [
"Apache-2.0"
] | 3 | 2017-01-24T17:03:46.000Z | 2017-01-26T14:33:50.000Z | phoenix_chat/web/views/error_helpers.ex | jacopofar/phoenix-chat | a95db8c9d8ed4674426f8c70dae2078ec8cddc9f | [
"Apache-2.0"
] | null | null | null | phoenix_chat/web/views/error_helpers.ex | jacopofar/phoenix-chat | a95db8c9d8ed4674426f8c70dae2078ec8cddc9f | [
"Apache-2.0"
] | null | null | null | defmodule PhoenixChat.ErrorHelpers do
@moduledoc """
Conveniences for translating and building error messages.
"""
use Phoenix.HTML
@doc """
Generates tag for inlined form input errors.
"""
def error_tag(form, field) do
if error = form.errors[field] do
content_tag :span, translate_error(erro... | 30.195122 | 77 | 0.670436 |
970cf8e84876fa651fa452b5845ac1d7bc745772 | 1,816 | ex | Elixir | lib/credo/check/readability/module_names.ex | codeclimate-community/credo | b960a25d604b4499a2577321f9d61b39dc4b0437 | [
"MIT"
] | null | null | null | lib/credo/check/readability/module_names.ex | codeclimate-community/credo | b960a25d604b4499a2577321f9d61b39dc4b0437 | [
"MIT"
] | null | null | null | lib/credo/check/readability/module_names.ex | codeclimate-community/credo | b960a25d604b4499a2577321f9d61b39dc4b0437 | [
"MIT"
] | 1 | 2020-09-25T11:48:49.000Z | 2020-09-25T11:48:49.000Z | defmodule Credo.Check.Readability.ModuleNames do
@moduledoc false
@checkdoc """
Module names are always written in PascalCase in Elixir.
# PascalCase
defmodule MyApp.WebSearchController do
# ...
end
# not PascalCase
defmodule MyApp.Web_searchController do
# ...
... | 22.7 | 78 | 0.644824 |
970cfa307c1dedd54615b23db5cae351203fa294 | 1,253 | ex | Elixir | web/views/error_helpers.ex | cpjolicoeur/pivotal-swimlanes | ebe6b2b48516e6bd8dec557cda2b890f820974be | [
"CC0-1.0"
] | 6 | 2015-10-27T01:46:27.000Z | 2021-04-08T18:28:44.000Z | web/views/error_helpers.ex | cpjolicoeur/pivotal-swimlanes | ebe6b2b48516e6bd8dec557cda2b890f820974be | [
"CC0-1.0"
] | 66 | 2015-10-23T20:21:12.000Z | 2018-04-18T15:25:57.000Z | web/views/error_helpers.ex | cpjolicoeur/pivotal-swimlanes | ebe6b2b48516e6bd8dec557cda2b890f820974be | [
"CC0-1.0"
] | null | null | null | defmodule PivotalSwimlanes.ErrorHelpers do
@moduledoc """
Conveniences for translating and building error messages.
"""
use Phoenix.HTML
@doc """
Generates tag for inlined form input errors.
"""
def error_tag(form, field) do
if error = form.errors[field] do
content_tag :span, translate_error... | 30.560976 | 82 | 0.674381 |
970d06fea7409aeb8336e82611f7305c17d6cf65 | 1,764 | ex | Elixir | clients/chat/lib/google_api/chat/v1/model/list_memberships_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/chat/lib/google_api/chat/v1/model/list_memberships_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/chat/lib/google_api/chat/v1/model/list_memberships_response.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... | 34.588235 | 148 | 0.730726 |
970d0d8e9f1b7b227d5052e1d51dad74f8739529 | 4,293 | exs | Elixir | test/lib/type/conn_types_test.exs | ikeyasu/antikythera | 544fdd22e46b1f34177053d87d9e2a9708c74113 | [
"Apache-2.0"
] | null | null | null | test/lib/type/conn_types_test.exs | ikeyasu/antikythera | 544fdd22e46b1f34177053d87d9e2a9708c74113 | [
"Apache-2.0"
] | null | null | null | test/lib/type/conn_types_test.exs | ikeyasu/antikythera | 544fdd22e46b1f34177053d87d9e2a9708c74113 | [
"Apache-2.0"
] | null | null | null | # Copyright(c) 2015-2018 ACCESS CO., LTD. All rights reserved.
defmodule Antikythera.ConnTypesTest do
use ExUnit.Case
alias Antikythera.Request, as: Req
alias Antikythera.Context
alias Antikythera.Conn
test "validate PathMatches" do
assert Req.PathMatches.valid?(%{foo: "bar"})
assert Req.PathMatches... | 51.107143 | 183 | 0.596087 |
970d2b9d8126e7518b158bae4dbe36b0692f2215 | 1,937 | ex | Elixir | lib/mix/tasks/phx.digest.ex | matthewp/phoenix | af86b95db365faada58d326e98de65c811690bc7 | [
"MIT"
] | 7 | 2021-01-31T04:51:08.000Z | 2022-01-09T06:59:28.000Z | lib/mix/tasks/phx.digest.ex | matthewp/phoenix | af86b95db365faada58d326e98de65c811690bc7 | [
"MIT"
] | 2 | 2022-02-19T12:43:20.000Z | 2022-02-27T23:30:32.000Z | lib/mix/tasks/phx.digest.ex | matthewp/phoenix | af86b95db365faada58d326e98de65c811690bc7 | [
"MIT"
] | 2 | 2021-02-06T08:40:23.000Z | 2021-03-20T16:35:47.000Z | defmodule Mix.Tasks.Phx.Digest do
use Mix.Task
@default_input_path "priv/static"
@shortdoc "Digests and compresses static files"
@recursive true
@moduledoc """
Digests and compresses static files.
mix phx.digest
mix phx.digest priv/static -o /www/public
The first argument is the path where... | 31.754098 | 102 | 0.68921 |
970d3941c013da4e467adda73c16f6111b6f4903 | 959 | exs | Elixir | test/company_test.exs | craigp/ex_intercom | fb45bb04f1cf0709cdc31f69b1cc844d2ddfefe8 | [
"MIT"
] | 1 | 2019-07-12T13:38:11.000Z | 2019-07-12T13:38:11.000Z | test/company_test.exs | craigp/ex_intercom | fb45bb04f1cf0709cdc31f69b1cc844d2ddfefe8 | [
"MIT"
] | null | null | null | test/company_test.exs | craigp/ex_intercom | fb45bb04f1cf0709cdc31f69b1cc844d2ddfefe8 | [
"MIT"
] | 1 | 2019-11-22T12:56:13.000Z | 2019-11-22T12:56:13.000Z | defmodule ExIntercom.CompanyTest do
@moduledoc false
use ExUnit.Case
alias ExIntercom.Company
setup do
%{port: port} = bypass = Bypass.open
Application.put_env(:ex_intercom, :api_url, "http://localhost:#{port}")
{:ok, company_json} = File.read("test/support/company.json")
{:ok,
bypass: ... | 22.833333 | 75 | 0.623566 |
970d95e70e74c9ef4ac449a6a20a8a758a700b5e | 2,756 | exs | Elixir | test/phoenix/live_dashboard/pages/applications_page_test.exs | uumo/phoenix_live_dashboard | cd07929341d9dca0f85b58c624c62d63cf7c2f07 | [
"MIT"
] | null | null | null | test/phoenix/live_dashboard/pages/applications_page_test.exs | uumo/phoenix_live_dashboard | cd07929341d9dca0f85b58c624c62d63cf7c2f07 | [
"MIT"
] | null | null | null | test/phoenix/live_dashboard/pages/applications_page_test.exs | uumo/phoenix_live_dashboard | cd07929341d9dca0f85b58c624c62d63cf7c2f07 | [
"MIT"
] | null | null | null | defmodule Phoenix.LiveDashboard.ApplicationsPageTest do
use ExUnit.Case, async: true
import Phoenix.ConnTest
import Phoenix.LiveViewTest
@endpoint Phoenix.LiveDashboardTest.Endpoint
test "menu_link/2" do
assert {:ok, "Applications"} = Phoenix.LiveDashboard.ApplicationsPage.menu_link(nil, nil)
end
t... | 35.333333 | 93 | 0.661103 |
970daca8cbc0a7e0bafe765f05c66f41ab77b068 | 495 | ex | Elixir | app/lib/hobby_dapp_web/views/error_view.ex | irisTa56/hobby_dapp | 5738995f4f68202aeb50df7fd23fd5c6b84ee244 | [
"MIT"
] | null | null | null | app/lib/hobby_dapp_web/views/error_view.ex | irisTa56/hobby_dapp | 5738995f4f68202aeb50df7fd23fd5c6b84ee244 | [
"MIT"
] | null | null | null | app/lib/hobby_dapp_web/views/error_view.ex | irisTa56/hobby_dapp | 5738995f4f68202aeb50df7fd23fd5c6b84ee244 | [
"MIT"
] | null | null | null | defmodule HobbyDappWeb.ErrorView do
use HobbyDappWeb, :view
# If you want to customize a particular status code
# for a certain format, you may uncomment below.
# def render("500.html", _assigns) do
# "Internal Server Error"
# end
# By default, Phoenix returns the status message from
# the template ... | 29.117647 | 61 | 0.737374 |
970dde0075e84ca67f8768114469ce704b3a436d | 72 | exs | Elixir | test/1000/practice_1040_test.exs | penqen/yukicoder-elixir | 4f3e9e4694a14434cc3700280e9205226434733b | [
"MIT"
] | null | null | null | test/1000/practice_1040_test.exs | penqen/yukicoder-elixir | 4f3e9e4694a14434cc3700280e9205226434733b | [
"MIT"
] | null | null | null | test/1000/practice_1040_test.exs | penqen/yukicoder-elixir | 4f3e9e4694a14434cc3700280e9205226434733b | [
"MIT"
] | null | null | null | defmodule Practice1040Test do
use ExUnit.Case
doctest Practice1040
end | 18 | 29 | 0.861111 |
970deca94690381839340ed4398fb0d498bf2858 | 16,315 | exs | Elixir | test/phoenix_mdbootstrap_form_test.exs | fbettag/phoenix_mdbootstrap_form | 3c9400f90944107e3d34e28e7f24e4c98a066de3 | [
"MIT"
] | 1 | 2021-05-05T16:20:26.000Z | 2021-05-05T16:20:26.000Z | test/phoenix_mdbootstrap_form_test.exs | fbettag/phoenix_mdbootstrap_form.ex | 3c9400f90944107e3d34e28e7f24e4c98a066de3 | [
"MIT"
] | null | null | null | test/phoenix_mdbootstrap_form_test.exs | fbettag/phoenix_mdbootstrap_form.ex | 3c9400f90944107e3d34e28e7f24e4c98a066de3 | [
"MIT"
] | null | null | null | defmodule PhoenixMDBootstrapFormTest do
use ExUnit.Case
import Phoenix.HTML
doctest PhoenixMDBootstrapForm
setup do
conn = Phoenix.ConnTest.build_conn()
form = Phoenix.HTML.FormData.to_form(conn, as: :record, multipart: true)
{:ok, [conn: conn, form: form]}
end
test "text_input", %{form: form... | 46.481481 | 136 | 0.547656 |
970e0166a8f7df139f7525be84f47d1621e1d5c1 | 800 | exs | Elixir | test/suite/draft6/exclusive_maximum_test.exs | starbelly/json_xema | 73ca23f9ce51d450d2f9cf0509ee6bb82f9a8c79 | [
"MIT"
] | 1 | 2019-06-21T10:55:33.000Z | 2019-06-21T10:55:33.000Z | test/suite/draft6/exclusive_maximum_test.exs | starbelly/json_xema | 73ca23f9ce51d450d2f9cf0509ee6bb82f9a8c79 | [
"MIT"
] | null | null | null | test/suite/draft6/exclusive_maximum_test.exs | starbelly/json_xema | 73ca23f9ce51d450d2f9cf0509ee6bb82f9a8c79 | [
"MIT"
] | null | null | null | defmodule Draft6.ExclusiveMaximumTest do
use ExUnit.Case, async: true
import JsonXema, only: [valid?: 2]
describe "exclusiveMaximum validation" do
setup do
%{schema: ~s(
{
"exclusiveMaximum": 3.0
}
) |> Jason.decode!() |> JsonXema.new()}
end
test "below the e... | 22.222222 | 70 | 0.595 |
970e05c930b211623adb7f3fc1d987e029cd8c54 | 1,714 | ex | Elixir | clients/display_video/lib/google_api/display_video/v1/model/on_screen_position_targeting_option_details.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/display_video/lib/google_api/display_video/v1/model/on_screen_position_targeting_option_details.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/display_video/lib/google_api/display_video/v1/model/on_screen_position_targeting_option_details.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... | 34.979592 | 214 | 0.766044 |
970e6737eab672206619a2f582ec630d2e8e5776 | 6,550 | exs | Elixir | test/transport_session_test.exs | desoulter/smppex | 1c8dbd9673291431b2d329a2cb20134c91857af2 | [
"MIT"
] | 49 | 2019-11-27T00:20:59.000Z | 2022-02-18T17:07:14.000Z | test/transport_session_test.exs | desoulter/smppex | 1c8dbd9673291431b2d329a2cb20134c91857af2 | [
"MIT"
] | 62 | 2016-05-19T17:11:02.000Z | 2019-11-21T16:47:15.000Z | test/transport_session_test.exs | desoulter/smppex | 1c8dbd9673291431b2d329a2cb20134c91857af2 | [
"MIT"
] | 25 | 2016-05-20T14:44:43.000Z | 2019-11-15T14:50:24.000Z | defmodule SMPPEX.TransportSessionTest do
use ExUnit.Case
alias :timer, as: Timer
alias Support.TCP.Server
alias Support.SMPPSession
setup do
server = Server.start_link()
{:ok, pid} = Agent.start_link(fn -> [] end)
Timer.sleep(50)
session = SMPPSession.start_link({127, 0, 0, 1}, Server.port(... | 26.41129 | 95 | 0.62458 |
970e67463d7e25c21aa8f371562bf29d12a6c826 | 204 | ex | Elixir | lib/princess.ex | typesend/princess | 948f3afdeab20deef3debecddc3440031f836e36 | [
"MIT"
] | 3 | 2020-05-24T01:30:14.000Z | 2020-06-20T20:32:37.000Z | lib/princess.ex | typesend/princess | 948f3afdeab20deef3debecddc3440031f836e36 | [
"MIT"
] | null | null | null | lib/princess.ex | typesend/princess | 948f3afdeab20deef3debecddc3440031f836e36 | [
"MIT"
] | null | null | null | defmodule Princess do
@moduledoc """
Documentation for `Princess`.
"""
@doc """
Hello world.
## Examples
iex> Princess.hello()
:world
"""
def hello do
:world
end
end
| 10.736842 | 31 | 0.563725 |
970e6add197a0d4aca80c5f181eb76134aed73cf | 2,528 | exs | Elixir | installer/templates/phx_single/mix.exs | samkenxstream/phoenix | 18433f95a90fc948e1d6d0f5606dfa339fdc6d61 | [
"MIT"
] | 1 | 2022-02-05T13:37:59.000Z | 2022-02-05T13:37:59.000Z | installer/templates/phx_single/mix.exs | samkenxstream/phoenix | 18433f95a90fc948e1d6d0f5606dfa339fdc6d61 | [
"MIT"
] | null | null | null | installer/templates/phx_single/mix.exs | samkenxstream/phoenix | 18433f95a90fc948e1d6d0f5606dfa339fdc6d61 | [
"MIT"
] | 1 | 2018-10-01T19:42:35.000Z | 2018-10-01T19:42:35.000Z | defmodule <%= @app_module %>.MixProject do
use Mix.Project
def project do
[
app: :<%= @app_name %>,
version: "0.1.0",<%= if @in_umbrella do %>
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",<% end %>
... | 33.706667 | 97 | 0.543117 |
970e6ce696a26311eedc0a9c5037e02d3ca1db31 | 2,602 | ex | Elixir | lib/core/asset_workers/farm_event_worker/regimen_event.ex | FarmBot/farmbot_os | 5ebdca3afd672eb6b0af5c71cfca02488b32569a | [
"MIT"
] | 843 | 2016-10-05T23:46:05.000Z | 2022-03-14T04:31:55.000Z | lib/core/asset_workers/farm_event_worker/regimen_event.ex | FarmBot/farmbot_os | 5ebdca3afd672eb6b0af5c71cfca02488b32569a | [
"MIT"
] | 455 | 2016-10-15T08:49:16.000Z | 2022-03-15T12:23:04.000Z | lib/core/asset_workers/farm_event_worker/regimen_event.ex | FarmBot/farmbot_os | 5ebdca3afd672eb6b0af5c71cfca02488b32569a | [
"MIT"
] | 261 | 2016-10-10T04:37:06.000Z | 2022-03-13T21:07:38.000Z | defmodule FarmbotCore.FarmEventWorker.RegimenEvent do
@moduledoc """
Periodically checks the current date versus the date that
a regimen should be started.
"""
require Logger
use GenServer
alias FarmbotCore.Asset
@impl GenServer
def init([event, args]) do
send(self(), :checkup)
{:ok, %{event:... | 25.262136 | 91 | 0.648732 |
970e859ecb28880eecca425b66b2dd619fb65cdc | 6,206 | ex | Elixir | apps/opentelemetry_api/lib/open_telemetry/span.ex | marpo60/opentelemetry-erlang | 28b383da8ee595606c20c2e5b867349a3d525b4e | [
"Apache-2.0"
] | 209 | 2019-05-14T00:46:18.000Z | 2022-03-29T21:14:21.000Z | apps/opentelemetry_api/lib/open_telemetry/span.ex | marpo60/opentelemetry-erlang | 28b383da8ee595606c20c2e5b867349a3d525b4e | [
"Apache-2.0"
] | 327 | 2019-07-13T15:36:31.000Z | 2022-03-31T23:39:02.000Z | apps/opentelemetry_api/lib/open_telemetry/span.ex | marpo60/opentelemetry-erlang | 28b383da8ee595606c20c2e5b867349a3d525b4e | [
"Apache-2.0"
] | 53 | 2019-06-19T20:17:44.000Z | 2022-03-04T19:07:27.000Z | defmodule OpenTelemetry.Span do
@moduledoc """
This module contains macros for Span operations that update the active current Span in the current process.
An example of creating an Event and adding it to the current Span:
require OpenTelemetry.Tracer, as: Tracer
require OpenTelemetry.Span, as: Span
... | 35.666667 | 163 | 0.708508 |
970e95d13bae86570217a61034c0965be4212e66 | 1,701 | ex | Elixir | lib/posexional_file.ex | kianmeng/posexional | dfe1242d5f676416582f174f72bb8a73e9e06a99 | [
"MIT"
] | 10 | 2017-02-21T20:59:18.000Z | 2021-01-28T13:44:41.000Z | lib/posexional_file.ex | kianmeng/posexional | dfe1242d5f676416582f174f72bb8a73e9e06a99 | [
"MIT"
] | 13 | 2016-10-16T15:45:51.000Z | 2021-02-12T09:38:28.000Z | lib/posexional_file.ex | kianmeng/posexional | dfe1242d5f676416582f174f72bb8a73e9e06a99 | [
"MIT"
] | 8 | 2016-10-16T12:43:03.000Z | 2021-01-28T20:47:51.000Z | defmodule PosexionalFile do
@moduledoc """
macros for defining file modules
"""
@doc """
add use Posexional on top of an elixir module to use macros to define fields
"""
defmacro __using__(_opts) do
quote do
import unquote(__MODULE__)
import PosexionalRow
@separator "\n"
Modul... | 24.3 | 85 | 0.652557 |
970ea1d8384e0c726632035987564cb9866c074a | 239 | exs | Elixir | takso-hw5 2/priv/repo/migrations/20171003082555_create_user.exs | alpdenizz/ElixirPlayground | 58b5a16c489058e0067e4811042d96fe6a5f8d59 | [
"MIT"
] | null | null | null | takso-hw5 2/priv/repo/migrations/20171003082555_create_user.exs | alpdenizz/ElixirPlayground | 58b5a16c489058e0067e4811042d96fe6a5f8d59 | [
"MIT"
] | null | null | null | takso-hw5 2/priv/repo/migrations/20171003082555_create_user.exs | alpdenizz/ElixirPlayground | 58b5a16c489058e0067e4811042d96fe6a5f8d59 | [
"MIT"
] | null | null | null | defmodule Takso.Repo.Migrations.CreateUser do
use Ecto.Migration
def change do
create table(:users) do
add :name, :string
add :username, :string
add :password, :string
timestamps()
end
end
end
| 17.071429 | 45 | 0.631799 |
970eab4ecef777e2802e0218c56de882209f1dfe | 1,682 | ex | Elixir | clients/dlp/lib/google_api/dlp/v2beta1/model/google_privacy_dlp_v2beta1_inspect_content_response.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/dlp/lib/google_api/dlp/v2beta1/model/google_privacy_dlp_v2beta1_inspect_content_response.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/dlp/lib/google_api/dlp/v2beta1/model/google_privacy_dlp_v2beta1_inspect_content_response.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | 1 | 2018-07-28T20:50:50.000Z | 2018-07-28T20:50:50.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.041667 | 174 | 0.774673 |
970eae461c2793689935c150ea545b73587bef47 | 928 | exs | Elixir | mix.exs | FredrikAugust/exmath | dddbd2f3da4f110b4f02287e24e02f613d663df6 | [
"MIT"
] | null | null | null | mix.exs | FredrikAugust/exmath | dddbd2f3da4f110b4f02287e24e02f613d663df6 | [
"MIT"
] | 3 | 2017-04-05T18:45:08.000Z | 2017-06-07T14:49:08.000Z | mix.exs | FredrikAugust/exmath | dddbd2f3da4f110b4f02287e24e02f613d663df6 | [
"MIT"
] | null | null | null | defmodule Exmath.Mixfile do
use Mix.Project
def project do
[app: :exmath,
version: "0.2.5",
elixir: "~> 1.4",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
description: description(),
package: package(),
deps: deps()]
end
def application do
# S... | 23.2 | 130 | 0.614224 |
970eb210a7cd5edff7316a443c6990a4f21a87a8 | 1,904 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/resource_policy_weekly_cycle_day_of_week.ex | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/resource_policy_weekly_cycle_day_of_week.ex | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/resource_policy_weekly_cycle_day_of_week.ex | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 35.924528 | 177 | 0.718487 |
970ec09ee9f6d4d76936a2e2f4de980fffd73052 | 1,677 | exs | Elixir | mix.exs | CherryMan/bourne | 27f9206f9c172cb02f6191594ff2940fcbc34e07 | [
"Unlicense"
] | null | null | null | mix.exs | CherryMan/bourne | 27f9206f9c172cb02f6191594ff2940fcbc34e07 | [
"Unlicense"
] | null | null | null | mix.exs | CherryMan/bourne | 27f9206f9c172cb02f6191594ff2940fcbc34e07 | [
"Unlicense"
] | null | null | null | defmodule Bourne.Mixfile do
use Mix.Project
@version File.read!("VERSION") |> String.trim_trailing
@source "https://github.com/mtwilliams/bourne"
def project do [
app: :bourne,
elixir: "~> 1.4",
elixirc_paths: elixirc_paths(Mix.env),
config_path: "config/config.exs",
build_path: "_build",
... | 25.029851 | 65 | 0.592129 |
970ed84417552b92944b69afe9279b1f4093f025 | 1,426 | exs | Elixir | priv/templates/brando.upgrade/migrations/brando_67_restructure_multi_module.exs | brandocms/brando | 4198e0c0920031bd909969055064e4e2b7230d21 | [
"MIT"
] | 4 | 2020-10-30T08:40:38.000Z | 2022-01-07T22:21:37.000Z | priv/templates/brando.upgrade/migrations/brando_67_restructure_multi_module.exs | brandocms/brando | 4198e0c0920031bd909969055064e4e2b7230d21 | [
"MIT"
] | 1,162 | 2020-07-05T11:20:15.000Z | 2022-03-31T06:01:49.000Z | priv/templates/brando.upgrade/migrations/brando_67_restructure_multi_module.exs | brandocms/brando | 4198e0c0920031bd909969055064e4e2b7230d21 | [
"MIT"
] | null | null | null | defmodule Brando.Repo.Migrations.RestructureMultiModule do
use Ecto.Migration
import Ecto.Query
def up do
alter table(:content_modules) do
add :entry_template, :jsonb
add :wrapper_boolean, :boolean, default: false
end
flush()
query =
from m in "content_modules",
select... | 20.666667 | 66 | 0.532959 |
970eddb0ed28a407afc4b70ecdbd927257fac0d4 | 852 | ex | Elixir | lib/layers/queries/queries/count_documents.ex | haskric/mongo_agile | 393e1e96f706e3580f6bac9ff7bcc081b0a2e4eb | [
"MIT"
] | 1 | 2020-12-30T18:30:32.000Z | 2020-12-30T18:30:32.000Z | lib/layers/queries/queries/count_documents.ex | haskric/mongo_agile | 393e1e96f706e3580f6bac9ff7bcc081b0a2e4eb | [
"MIT"
] | null | null | null | lib/layers/queries/queries/count_documents.ex | haskric/mongo_agile | 393e1e96f706e3580f6bac9ff7bcc081b0a2e4eb | [
"MIT"
] | null | null | null | defmodule MongoAgile.Queries.CountDocuments do
@moduledoc false
use MapSchema,
atomize: true,
schema: %{
:base => "<query_base>",
:selector => :map,
:opts => :keyword
},
custom_types: %{
"<query_base>" => MongoAgile.Queries.Helper.Base.Type
}
use MongoAgile.Queries... | 25.058824 | 75 | 0.66784 |
970ee728eb348da428fa0aac7f243e88d114814c | 756 | exs | Elixir | mix.exs | mfoley40/nerves_hub | 3e0009d067af4ac365b6c4134b600115da29dc1d | [
"Apache-2.0"
] | null | null | null | mix.exs | mfoley40/nerves_hub | 3e0009d067af4ac365b6c4134b600115da29dc1d | [
"Apache-2.0"
] | null | null | null | mix.exs | mfoley40/nerves_hub | 3e0009d067af4ac365b6c4134b600115da29dc1d | [
"Apache-2.0"
] | null | null | null | defmodule Nerves.Hub.Mixfile do
@version "1.0.0"
use Mix.Project
def project do
[app: :nerves_hub,
description: "Heirarchical key-value state store with pub-sub semantics",
version: @version,
elixir: "~> 1.11",
deps: deps(),
# ExDoc
name: "Hub",
docs: [main: Nerves.Hub,
... | 23.625 | 78 | 0.572751 |
970f64bf930be3a5895c7769ce01505e9525290c | 1,910 | exs | Elixir | clients/artifact_registry/mix.exs | mopp/elixir-google-api | d496227d17600bccbdf8f6be9ad1b7e7219d7ec6 | [
"Apache-2.0"
] | null | null | null | clients/artifact_registry/mix.exs | mopp/elixir-google-api | d496227d17600bccbdf8f6be9ad1b7e7219d7ec6 | [
"Apache-2.0"
] | null | null | null | clients/artifact_registry/mix.exs | mopp/elixir-google-api | d496227d17600bccbdf8f6be9ad1b7e7219d7ec6 | [
"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... | 28.507463 | 143 | 0.665445 |
970f76c59e0a64c4a27fef3da835a3d6f03cffa0 | 1,617 | exs | Elixir | test/renaissance/users/user_test.exs | rstein66/Renaissance | 947880e1b492adc2ce1f4a0883ddb41e597de011 | [
"Unlicense"
] | 2 | 2021-02-01T12:09:07.000Z | 2021-03-14T12:20:43.000Z | test/renaissance/users/user_test.exs | rstein66/Renaissance | 947880e1b492adc2ce1f4a0883ddb41e597de011 | [
"Unlicense"
] | 11 | 2019-04-09T18:01:16.000Z | 2019-05-16T15:02:24.000Z | test/renaissance/users/user_test.exs | rstein66/Renaissance | 947880e1b492adc2ce1f4a0883ddb41e597de011 | [
"Unlicense"
] | 2 | 2019-04-30T22:43:18.000Z | 2019-05-15T20:34:49.000Z | defmodule Renaissance.Test.UserTest do
use Renaissance.DataCase
require Ecto.Query
alias Renaissance.User
alias Renaissance.Repo
@user_one_params %{email: "mail@mail.com", password: "password"}
@user_two_params %{email: "mail2@mail.com", password: "password123"}
describe "user" do
test "requires em... | 31.096154 | 93 | 0.676562 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.