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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3f29e0ad938ff2727178d0c445268d266d8a68b5 | 389 | exs | Elixir | test/time_utils_test.exs | bahanni/custom_rpi4 | ddefa85d30bacaae40151a63a9a0ebbf4ad30ed5 | [
"MIT"
] | null | null | null | test/time_utils_test.exs | bahanni/custom_rpi4 | ddefa85d30bacaae40151a63a9a0ebbf4ad30ed5 | [
"MIT"
] | null | null | null | test/time_utils_test.exs | bahanni/custom_rpi4 | ddefa85d30bacaae40151a63a9a0ebbf4ad30ed5 | [
"MIT"
] | null | null | null | defmodule FarmbotOS.TimeUtilsTest do
alias FarmbotOS.TimeUtils
use ExUnit.Case
test "compare_datetimes" do
early = ~U[2021-09-27 12:34:56.780000Z]
late = ~U[2021-09-28 12:34:56.780000Z]
assert :eq == TimeUtils.compare_datetimes(early, early)
assert :gt == TimeUtils.compare_datetimes(late, early)
... | 29.923077 | 59 | 0.722365 |
3f2a297cf035e9c3e93c3ad72bf5b1383d056ed7 | 1,176 | exs | Elixir | mix.exs | rosetta-home/cicada | a5ac51ecc202e1694dedc9875604fa3564ef4b3c | [
"Apache-2.0"
] | 7 | 2017-09-08T11:29:42.000Z | 2020-01-18T22:15:12.000Z | mix.exs | rosetta-home/cicada | a5ac51ecc202e1694dedc9875604fa3564ef4b3c | [
"Apache-2.0"
] | null | null | null | mix.exs | rosetta-home/cicada | a5ac51ecc202e1694dedc9875604fa3564ef4b3c | [
"Apache-2.0"
] | 2 | 2017-07-02T11:58:50.000Z | 2019-09-14T03:16:12.000Z | defmodule Cicada.Mixfile do
use Mix.Project
def project do
[app: :cicada,
version: "0.1.0",
build_path: "_build",
config_path: "config/config.exs",
deps_path: "deps",
lockfile: "mix.lock",
elixir: "~> 1.4",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :p... | 24.5 | 135 | 0.543367 |
3f2a457429cf1f6e81292616e595e8e831d563ec | 1,244 | exs | Elixir | config/config.exs | ijcd/presto | 6aa07267f2340d799939ce595fc199d1ad473562 | [
"Apache-2.0"
] | 12 | 2018-04-26T06:12:46.000Z | 2021-01-04T16:21:04.000Z | config/config.exs | ijcd/presto | 6aa07267f2340d799939ce595fc199d1ad473562 | [
"Apache-2.0"
] | 8 | 2020-06-10T07:45:19.000Z | 2020-06-10T07:45:30.000Z | config/config.exs | ijcd/presto | 6aa07267f2340d799939ce595fc199d1ad473562 | [
"Apache-2.0"
] | 1 | 2018-04-26T06:12:51.000Z | 2018-04-26T06:12:51.000Z | # 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... | 31.1 | 73 | 0.723473 |
3f2a5d92b27b0b839d51f04b45a32daed2a681f7 | 625 | exs | Elixir | test/phoenix/transports/json_serializer_test.exs | wojtekmach/phoenix | a6b3bf301c7088b8824a39a165582dc85dfdd2a4 | [
"MIT"
] | null | null | null | test/phoenix/transports/json_serializer_test.exs | wojtekmach/phoenix | a6b3bf301c7088b8824a39a165582dc85dfdd2a4 | [
"MIT"
] | null | null | null | test/phoenix/transports/json_serializer_test.exs | wojtekmach/phoenix | a6b3bf301c7088b8824a39a165582dc85dfdd2a4 | [
"MIT"
] | null | null | null | defmodule Phoenix.Tranports.JSONSerializerTest do
use ExUnit.Case, async: true
alias Phoenix.Transports.JSONSerializer
alias Phoenix.Socket.Message
@msg_json "{\"topic\":\"t\",\"message\":\"m\",\"event\":\"e\",\"channel\":\"c\"}"
test "encode!/1 encodes `Phoenix.Socket.Message` as JSON" do
msg = %Messa... | 31.25 | 83 | 0.6576 |
3f2a68a33f097ef5bdbc4c162999fa1b19616c62 | 459 | exs | Elixir | test/landing_page_web/views/error_view_test.exs | paulfioravanti/phoenix-and-elm-landing-page | 8453cf0209bca8da46248d78a17092982e5a7e62 | [
"MIT"
] | null | null | null | test/landing_page_web/views/error_view_test.exs | paulfioravanti/phoenix-and-elm-landing-page | 8453cf0209bca8da46248d78a17092982e5a7e62 | [
"MIT"
] | null | null | null | test/landing_page_web/views/error_view_test.exs | paulfioravanti/phoenix-and-elm-landing-page | 8453cf0209bca8da46248d78a17092982e5a7e62 | [
"MIT"
] | null | null | null | defmodule LandingPageWeb.ErrorViewTest do
use LandingPageWeb.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(LandingPageWeb.ErrorView, "404.html", []) ==
"Not Found"
end
test "re... | 27 | 72 | 0.701525 |
3f2a7923f5964c09e31d0116f9fc8c0247d0a80c | 191 | ex | Elixir | pooly/lib/pooly.ex | Jwsonic/otp_book | a2fab769ab13e136112e73837513be245bbfb3ca | [
"Apache-2.0"
] | 1 | 2018-04-21T22:38:14.000Z | 2018-04-21T22:38:14.000Z | pooly/lib/pooly.ex | Jwsonic/otp_book | a2fab769ab13e136112e73837513be245bbfb3ca | [
"Apache-2.0"
] | null | null | null | pooly/lib/pooly.ex | Jwsonic/otp_book | a2fab769ab13e136112e73837513be245bbfb3ca | [
"Apache-2.0"
] | null | null | null | defmodule Pooly do
@moduledoc """
Documentation for Pooly.
"""
@doc """
Hello world.
## Examples
iex> Pooly.hello
:world
"""
def hello do
:world
end
end
| 10.052632 | 26 | 0.554974 |
3f2a802f7a76945ebbdaed4ec36e1ebf5452cb47 | 1,756 | exs | Elixir | mix.exs | andershansson/ecto_ltree | 3c4af25ccf6d4d2f6100615b55be051760e5c20d | [
"MIT"
] | null | null | null | mix.exs | andershansson/ecto_ltree | 3c4af25ccf6d4d2f6100615b55be051760e5c20d | [
"MIT"
] | null | null | null | mix.exs | andershansson/ecto_ltree | 3c4af25ccf6d4d2f6100615b55be051760e5c20d | [
"MIT"
] | null | null | null | defmodule EctoLtree.MixProject do
use Mix.Project
def project do
[
app: :ecto_ltree,
version: "0.2.1",
elixir: "~> 1.7",
start_permanent: Mix.env() == :prod,
elixirc_paths: elixirc_paths(Mix.env()),
dialyzer: [flags: [:unmatched_returns, :error_handling, :race_conditions, :u... | 25.823529 | 108 | 0.56549 |
3f2a8a8200630e403dcd0f49dd2f635b8e573baa | 80 | exs | Elixir | test/test_helper.exs | supernintendo/rustler_live_view_toy | 4faeb662daae4238142d3f560ef22d5cd26bb3c6 | [
"Apache-2.0"
] | 1 | 2019-10-07T09:30:16.000Z | 2019-10-07T09:30:16.000Z | test/test_helper.exs | supernintendo/rustler_live_view_toy | 4faeb662daae4238142d3f560ef22d5cd26bb3c6 | [
"Apache-2.0"
] | 2 | 2021-03-09T19:17:39.000Z | 2021-05-10T16:30:30.000Z | test/test_helper.exs | supernintendo/rustler_live_view_toy | 4faeb662daae4238142d3f560ef22d5cd26bb3c6 | [
"Apache-2.0"
] | null | null | null | ExUnit.start()
Ecto.Adapters.SQL.Sandbox.mode(RustlerLiveViewToy.Repo, :manual)
| 26.666667 | 64 | 0.8125 |
3f2a948650cead27e38f5378700bee48590714d8 | 831 | exs | Elixir | mix.exs | jnylen/pkg_core | a8575c5202615f671b450b9aad17f0b70ed88d09 | [
"MIT"
] | null | null | null | mix.exs | jnylen/pkg_core | a8575c5202615f671b450b9aad17f0b70ed88d09 | [
"MIT"
] | 10 | 2020-07-18T10:39:03.000Z | 2022-03-24T04:03:27.000Z | mix.exs | jnylen/pkg_core | a8575c5202615f671b450b9aad17f0b70ed88d09 | [
"MIT"
] | null | null | null | defmodule PkgCore.MixProject do
use Mix.Project
@name :pkg_core
@version "0.1.3"
@description """
The core functions for all of the pkg_* libraries.
"""
@deps [{:ex_doc, ">= 0.0.0", only: :dev, runtime: false}]
@hex_package [
name: @name,
files: ["lib", "mix.exs", "README*", "LICENSE*"],
ma... | 21.307692 | 59 | 0.56799 |
3f2aa99093aba24ccb9dcbeba0502dad776f9086 | 577 | exs | Elixir | test/parser/default_test.exs | mhanberg/dsl | 21e3c7e3a24fabecd436fb09271d90c3e9fb8c30 | [
"MIT"
] | null | null | null | test/parser/default_test.exs | mhanberg/dsl | 21e3c7e3a24fabecd436fb09271d90c3e9fb8c30 | [
"MIT"
] | null | null | null | test/parser/default_test.exs | mhanberg/dsl | 21e3c7e3a24fabecd436fb09271d90c3e9fb8c30 | [
"MIT"
] | null | null | null | defmodule Temple.Parser.DefaultTest do
use ExUnit.Case, async: true
alias Temple.Parser.Default
describe "applicable?/1" do
test "returns true when the node is an elixir expression" do
ast =
quote do
Foo.bar!(baz)
end
assert Default.applicable?(ast)
end
end
de... | 19.233333 | 64 | 0.616984 |
3f2ab3f4aa6ea80fb648df327885cdfbc4651936 | 282 | ex | Elixir | repository_summary/lib/repository_summary_web/views/github_view.ex | joabehenrique/repository-summary | 6a7c28098a9faf11386b43996bf5ad33b50cddf2 | [
"MIT"
] | null | null | null | repository_summary/lib/repository_summary_web/views/github_view.ex | joabehenrique/repository-summary | 6a7c28098a9faf11386b43996bf5ad33b50cddf2 | [
"MIT"
] | null | null | null | repository_summary/lib/repository_summary_web/views/github_view.ex | joabehenrique/repository-summary | 6a7c28098a9faf11386b43996bf5ad33b50cddf2 | [
"MIT"
] | null | null | null | defmodule RepositorySummaryWeb.GithubView do
use RepositorySummaryWeb, :view
def render("find_repositorys.json", %{repositorys: repositorys, token: new_token}) do
%{
message: "Repositorys found",
repositorys: repositorys,
token: new_token
}
end
end
| 23.5 | 87 | 0.70922 |
3f2ab553d75266850029eda80689803fa0540e09 | 2,931 | ex | Elixir | lib/ecto/log_entry.ex | cnsa/ecto | a6e0eaaa5da1032fad571308c338eca1b5f77738 | [
"Apache-2.0"
] | null | null | null | lib/ecto/log_entry.ex | cnsa/ecto | a6e0eaaa5da1032fad571308c338eca1b5f77738 | [
"Apache-2.0"
] | null | null | null | lib/ecto/log_entry.ex | cnsa/ecto | a6e0eaaa5da1032fad571308c338eca1b5f77738 | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.LogEntry do
@moduledoc """
Struct used for logging entries.
It is composed of the following fields:
* query - the query as string or a function that when invoked resolves to string;
* params - the query parameters;
* result - the query result as an `:ok` or `:error` tuple;
* query... | 31.516129 | 94 | 0.644831 |
3f2ac781d3eb77bf1d922d4eeb173e779cc56292 | 2,374 | ex | Elixir | lib/segment/encoder.ex | FindHotel/analytics-elixir | 0aaba3d37063f812d2c5681c2755b6d19033ec63 | [
"MIT"
] | 1 | 2019-11-15T20:34:19.000Z | 2019-11-15T20:34:19.000Z | lib/segment/encoder.ex | FindHotel/analytics-elixir | 0aaba3d37063f812d2c5681c2755b6d19033ec63 | [
"MIT"
] | 5 | 2019-01-28T19:55:56.000Z | 2022-03-17T15:55:31.000Z | lib/segment/encoder.ex | FindHotel/analytics-elixir | 0aaba3d37063f812d2c5681c2755b6d19033ec63 | [
"MIT"
] | 1 | 2022-03-13T09:23:21.000Z | 2022-03-13T09:23:21.000Z | defmodule Segment.Encoder do
@moduledoc """
Responsible to transforming structs into JSON strings.
"""
@doc """
Encodes a given struct into a JSON string.
## Options
* `drop_nil_fields`: If set to `true` all the struct `nil` fields will be
filtered out from the JSON string. Defaults to `false... | 31.653333 | 82 | 0.643218 |
3f2ad930181737e03042e193eac4c45a3990c34b | 3,268 | exs | Elixir | test/bankapi/operations_callback_test.exs | t00lmaker/elixir-bank | 41897d8fa87bb2fedbe3ef6f8f5cd78b756e24f0 | [
"MIT"
] | 4 | 2020-05-05T18:37:28.000Z | 2022-01-05T00:56:19.000Z | test/bankapi/operations_callback_test.exs | t00lmaker/elixir-bank | 41897d8fa87bb2fedbe3ef6f8f5cd78b756e24f0 | [
"MIT"
] | 21 | 2019-12-01T15:32:02.000Z | 2019-12-19T13:10:36.000Z | test/bankapi/operations_callback_test.exs | t00lmaker/elixir-bank | 41897d8fa87bb2fedbe3ef6f8f5cd78b756e24f0 | [
"MIT"
] | 2 | 2020-09-12T16:07:11.000Z | 2020-12-11T06:46:45.000Z | defmodule Bank.Operations.CallbackTest do
@moduledoc """
Testes para a validação deoperações
"""
use Bank.DataCase
alias Bank.Accounts
alias Bank.Clients
alias Bank.Operations
alias Bank.Operations.Callback
@client_attrs %{
name: "Luan Pontes",
social_id: "3",
birth_date: "16/10/1991",... | 24.946565 | 95 | 0.654529 |
3f2b10b61e7a734f611bb0d437031f23bd2f66c6 | 13,716 | ex | Elixir | deps/phoenix_pubsub/lib/phoenix/tracker/state.ex | hallebadkapp/rumbl-ms | ae2ef9975658115f8c4d5c49c28d8bde00a74b83 | [
"MIT"
] | null | null | null | deps/phoenix_pubsub/lib/phoenix/tracker/state.ex | hallebadkapp/rumbl-ms | ae2ef9975658115f8c4d5c49c28d8bde00a74b83 | [
"MIT"
] | null | null | null | deps/phoenix_pubsub/lib/phoenix/tracker/state.ex | hallebadkapp/rumbl-ms | ae2ef9975658115f8c4d5c49c28d8bde00a74b83 | [
"MIT"
] | null | null | null | defmodule Phoenix.Tracker.State do
@moduledoc """
Provides an ORSWOT CRDT.
"""
alias Phoenix.Tracker.{State, Clock}
@type name :: term
@type topic :: String.t
@type key :: term
@type meta :: Map.t
@type ets_id :: pos_integer
@type clock :: pos_integer
@type tag ... | 33.291262 | 113 | 0.592374 |
3f2b1c59c3dab235f37d549e81c08bb851829f8c | 3,093 | ex | Elixir | lib/broadway_sqs/ex_aws_client.ex | martosaur/broadway_sqs | 7f40625de96465ea9a079ded9528dccb991c9e97 | [
"Apache-2.0"
] | 27 | 2020-01-20T16:26:06.000Z | 2022-02-17T18:54:01.000Z | lib/broadway_sqs/ex_aws_client.ex | martosaur/broadway_sqs | 7f40625de96465ea9a079ded9528dccb991c9e97 | [
"Apache-2.0"
] | 24 | 2020-01-28T11:37:57.000Z | 2022-03-27T18:35:54.000Z | lib/broadway_sqs/ex_aws_client.ex | martosaur/broadway_sqs | 7f40625de96465ea9a079ded9528dccb991c9e97 | [
"Apache-2.0"
] | 13 | 2020-04-12T20:30:29.000Z | 2022-03-25T17:40:50.000Z | defmodule BroadwaySQS.ExAwsClient do
@moduledoc """
Default SQS client used by `BroadwaySQS.Producer` to communicate with AWS
SQS service. This client uses the `ExAws.SQS` library and implements the
`BroadwaySQS.SQSClient` and `Broadway.Acknowledger` behaviours which define
callbacks for receiving and acknowl... | 30.623762 | 82 | 0.721306 |
3f2b25539f72888f25b9f3d7765f8ce5d6c7395a | 1,237 | ex | Elixir | lib/preview_web/plugs/rollbax.ex | leandrocp/preview | 9dd3a9bae4385dc4935e76f63328f70b9d78fe4d | [
"Apache-2.0"
] | 26 | 2021-01-25T20:30:46.000Z | 2021-12-16T08:42:35.000Z | lib/preview_web/plugs/rollbax.ex | leandrocp/preview | 9dd3a9bae4385dc4935e76f63328f70b9d78fe4d | [
"Apache-2.0"
] | 17 | 2021-01-25T18:45:43.000Z | 2021-07-23T15:15:41.000Z | lib/preview_web/plugs/rollbax.ex | leandrocp/preview | 9dd3a9bae4385dc4935e76f63328f70b9d78fe4d | [
"Apache-2.0"
] | 4 | 2021-01-25T21:32:28.000Z | 2021-07-07T12:36:19.000Z | defmodule PreviewWeb.Plugs.Rollbax do
defmacro __using__(_opts) do
quote do
defp handle_errors(conn, %{kind: kind, reason: reason, stack: stacktrace}) do
if report?(kind, reason) do
conn = maybe_fetch_params(conn)
url = "#{conn.scheme}://#{conn.host}:#{conn.port}#{conn.request_pa... | 28.767442 | 83 | 0.503638 |
3f2b2931029342b49cc00aca2fa19d468e0c9106 | 4,269 | ex | Elixir | lib/mix/lib/mix/rebar.ex | jbcrail/elixir | f30ef15d9d028a6d0f74d10c2bb320d5f8501bdb | [
"Apache-2.0"
] | 1 | 2015-02-23T00:01:48.000Z | 2015-02-23T00:01:48.000Z | lib/mix/lib/mix/rebar.ex | jbcrail/elixir | f30ef15d9d028a6d0f74d10c2bb320d5f8501bdb | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/rebar.ex | jbcrail/elixir | f30ef15d9d028a6d0f74d10c2bb320d5f8501bdb | [
"Apache-2.0"
] | 1 | 2020-12-07T08:04:16.000Z | 2020-12-07T08:04:16.000Z | defmodule Mix.Rebar do
@moduledoc false
@doc """
Returns the path supposed to host the local copy of rebar.
"""
def local_rebar_path, do: Path.join(Mix.Utils.mix_home, "rebar")
@doc """
Returns the path to the global copy of rebar, if one exists.
"""
def global_rebar_cmd do
wrap_cmd System.find_... | 25.872727 | 99 | 0.605762 |
3f2b3e399995ae16341106b84758b050932b6dc3 | 2,076 | ex | Elixir | lib/juvet/slack_api.ex | juvet/juvet | 5590ff7b1e5f411195d0becfe8b5740deb977cc5 | [
"MIT"
] | 19 | 2018-07-14T16:54:11.000Z | 2022-03-01T09:02:19.000Z | lib/juvet/slack_api.ex | juvet/juvet | 5590ff7b1e5f411195d0becfe8b5740deb977cc5 | [
"MIT"
] | 31 | 2018-06-29T15:30:40.000Z | 2022-02-26T01:07:12.000Z | lib/juvet/slack_api.ex | juvet/juvet | 5590ff7b1e5f411195d0becfe8b5740deb977cc5 | [
"MIT"
] | null | null | null | defmodule Juvet.SlackAPI do
@moduledoc """
Helper methods to help process the response from Slack.
"""
use HTTPoison.Base
alias Juvet.SlackAPI
@doc """
Returns an error tuple if the body contains an `ok: false` node, else
returns an ok tuple and the body.
"""
def handle_response({:ok, %{ok: false... | 22.565217 | 74 | 0.659923 |
3f2b538a0ab7b6bcef42d7fdec1e5458a568fa4d | 1,928 | ex | Elixir | lib/batch_elixir/rest_client/transactional.ex | OnceApp/batch_elixir | eabd12abaef7b703c95a30641be27c1658c2a64f | [
"MIT"
] | 3 | 2019-02-11T11:32:44.000Z | 2019-03-01T15:58:46.000Z | lib/batch_elixir/rest_client/transactional.ex | OnceApp/batch_elixir | eabd12abaef7b703c95a30641be27c1658c2a64f | [
"MIT"
] | 1 | 2019-02-05T17:20:15.000Z | 2019-02-11T11:03:14.000Z | lib/batch_elixir/rest_client/transactional.ex | OnceApp/batch_elixir | eabd12abaef7b703c95a30641be27c1658c2a64f | [
"MIT"
] | 1 | 2019-08-08T16:40:26.000Z | 2019-08-08T16:40:26.000Z | defmodule BatchElixir.RestClient.Transactional do
@derive [Poison.Encoder]
@moduledoc """
Module for interacting with the transactional API
"""
alias BatchElixir.RestClient.Base
@type t :: %__MODULE__{
group_id: String.t(),
recipients: BatchElixir.RestClient.Transactional.Recipients.t()... | 29.212121 | 106 | 0.645228 |
3f2b66320fcc9c0346dce5ef545aa97747663b79 | 2,654 | ex | Elixir | clients/calendar/lib/google_api/calendar/v3/model/event_gadget.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/calendar/lib/google_api/calendar/v3/model/event_gadget.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/calendar/lib/google_api/calendar/v3/model/event_gadget.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | 1 | 2020-11-10T16:58:27.000Z | 2020-11-10T16:58:27.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 38.463768 | 274 | 0.686134 |
3f2b6e78ec3fcee2b9ecb759c0072139830e19a9 | 197 | ex | Elixir | lib/cbstats_importer/station_query.ex | micahyoung/cbstats-importer | a7176b3a25d8a4e919ddda32475c9ecf65e9892a | [
"Unlicense",
"MIT"
] | 1 | 2016-01-06T18:19:35.000Z | 2016-01-06T18:19:35.000Z | lib/cbstats_importer/station_query.ex | micahyoung/cbstats-importer | a7176b3a25d8a4e919ddda32475c9ecf65e9892a | [
"Unlicense",
"MIT"
] | null | null | null | lib/cbstats_importer/station_query.ex | micahyoung/cbstats-importer | a7176b3a25d8a4e919ddda32475c9ecf65e9892a | [
"Unlicense",
"MIT"
] | null | null | null | defmodule CbstatsImporter.StationQuery do
import Ecto.Query
def station_ids do
query = from s in CbstatsImporter.Station,
select: s.id
CbstatsImporter.Repo.all(query)
end
end
| 17.909091 | 46 | 0.736041 |
3f2b74046a8fcf8bd35b6b52fb515561c71248f1 | 2,261 | ex | Elixir | clients/genomics/lib/google_api/genomics/v2alpha1/model/resources.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/genomics/lib/google_api/genomics/v2alpha1/model/resources.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/genomics/lib/google_api/genomics/v2alpha1/model/resources.ex | dazuma/elixir-google-api | 6a9897168008efe07a6081d2326735fe332e522c | [
"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.375 | 152 | 0.712959 |
3f2b758703151661aa99e015a656499f59dd4075 | 9,240 | ex | Elixir | lib/mix/lib/mix/utils.ex | bruce/elixir | d77ccf941541959079e5f677f8717da24b486fac | [
"Apache-2.0"
] | 1 | 2017-09-09T20:59:04.000Z | 2017-09-09T20:59:04.000Z | lib/mix/lib/mix/utils.ex | bruce/elixir | d77ccf941541959079e5f677f8717da24b486fac | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/utils.ex | bruce/elixir | d77ccf941541959079e5f677f8717da24b486fac | [
"Apache-2.0"
] | null | null | null | defmodule Mix.Utils do
@moduledoc """
Utilities used throughout Mix and tasks.
## Conversions
This module handles two types of conversions:
* From command names to module names, i.e. how the command
`deps.get` translates to `Deps.Get` and vice-versa;
* From underscore to CamelCase, i.e. how the file... | 25.454545 | 101 | 0.622835 |
3f2b872ea71c98954eefe90f355a6d18514d4637 | 865 | ex | Elixir | lib/unleash/strategy/active_for_users_with_id.ex | duffelhq/unleashed_ex | a0009b1528fd14f517225c62544fb927cc5b684f | [
"MIT"
] | null | null | null | lib/unleash/strategy/active_for_users_with_id.ex | duffelhq/unleashed_ex | a0009b1528fd14f517225c62544fb927cc5b684f | [
"MIT"
] | 2 | 2021-11-23T11:17:00.000Z | 2022-03-01T13:31:22.000Z | lib/unleash/strategy/active_for_users_with_id.ex | duffelhq/unleashed_ex | a0009b1528fd14f517225c62544fb927cc5b684f | [
"MIT"
] | null | null | null | defmodule Unleash.Strategy.ActiveForUsersWithId do
@moduledoc """
Requires `:user_id` in `t:Unleash.context/0`
Based on the
[`userWithId`](https://unleash.github.io/docs/activation_strategy#userwithid)
strategy.
"""
use Unleash.Strategy, name: "ActiveForUsersWithId"
alias Unleash.Strategy.Utils
@im... | 27.903226 | 96 | 0.699422 |
3f2ba470d8120c870011c74e00c3a252b0f8709d | 1,584 | exs | Elixir | mix.exs | hectorperez/hcaptcha | fac3123a36365bc24dd53626937cd677d9421a7a | [
"MIT"
] | 3 | 2020-05-24T00:15:26.000Z | 2021-08-05T14:15:30.000Z | mix.exs | hectorperez/hcaptcha | fac3123a36365bc24dd53626937cd677d9421a7a | [
"MIT"
] | null | null | null | mix.exs | hectorperez/hcaptcha | fac3123a36365bc24dd53626937cd677d9421a7a | [
"MIT"
] | 3 | 2021-03-17T19:23:01.000Z | 2021-08-05T14:51:07.000Z | defmodule Hcaptcha.Mixfile do
use Mix.Project
def project do
[
app: :hcaptcha,
name: "hcaptcha",
source_url: "https://github.com/Sebi55/hcaptcha",
version: "0.0.1",
elixir: "~> 1.6",
description: description(),
deps: deps(),
package: package(),
build_embedd... | 24.369231 | 120 | 0.556187 |
3f2be3d94e3bf49c052accb2ed600ff0be65ce08 | 3,305 | ex | Elixir | lib/schema.ex | m0rt3nlund/query_builder | 68bfdf7b642ded1a9056a85776c3fc5296b2b7b7 | [
"Apache-2.0"
] | 47 | 2019-12-20T08:35:20.000Z | 2022-03-23T15:11:45.000Z | lib/schema.ex | m0rt3nlund/query_builder | 68bfdf7b642ded1a9056a85776c3fc5296b2b7b7 | [
"Apache-2.0"
] | 7 | 2020-05-14T09:25:53.000Z | 2021-10-01T04:58:22.000Z | lib/schema.ex | m0rt3nlund/query_builder | 68bfdf7b642ded1a9056a85776c3fc5296b2b7b7 | [
"Apache-2.0"
] | 4 | 2020-04-21T13:54:46.000Z | 2021-08-12T22:15:22.000Z | defmodule QueryBuilder.Schema do
@moduledoc false
# The library code relies on named bindings to refer to associations. This module
# allows to define a named binding for a schema, when it is used in a join.
#
# The module provides the caller with the following functions:
# * `_binding/1`: binding name for... | 37.134831 | 91 | 0.643873 |
3f2c046c4fbaf5fcfafdc84317f721f7344234c7 | 2,232 | ex | Elixir | clients/dfa_reporting/lib/google_api/dfa_reporting/v28/model/conversions_batch_insert_request.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/dfa_reporting/lib/google_api/dfa_reporting/v28/model/conversions_batch_insert_request.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/dfa_reporting/lib/google_api/dfa_reporting/v28/model/conversions_batch_insert_request.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"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... | 41.333333 | 216 | 0.760305 |
3f2c11f8413beca89abe22ae3c608bc79de2774c | 581 | ex | Elixir | lib/functions/type.ex | simpers/ash_postgres | 22ba737d0d1e57da3d3150bcf94961a99b145ae9 | [
"MIT"
] | null | null | null | lib/functions/type.ex | simpers/ash_postgres | 22ba737d0d1e57da3d3150bcf94961a99b145ae9 | [
"MIT"
] | null | null | null | lib/functions/type.ex | simpers/ash_postgres | 22ba737d0d1e57da3d3150bcf94961a99b145ae9 | [
"MIT"
] | null | null | null | defmodule AshPostgres.Functions.Type do
@moduledoc """
A function that maps to ecto's `type` function
https://hexdocs.pm/ecto/Ecto.Query.API.html#type/2
"""
use Ash.Query.Function, name: :type
def args, do: [[:any, :any]]
def new([left, :citext]) do
%AshPostgres.Functions.Fragment{arguments: ["?::... | 21.518519 | 78 | 0.6179 |
3f2c1d0048c400fe33e55703665a9a686d14516b | 896 | exs | Elixir | test/ecto_autoslug_field_test/edge_cases_test/empty_sources_test.exs | kianmeng/ecto_autoslug_field | 38d83fa3cd7ae925f816b96dd3778554c70e3c84 | [
"MIT"
] | 143 | 2016-07-21T22:54:57.000Z | 2021-12-31T13:53:03.000Z | test/ecto_autoslug_field_test/edge_cases_test/empty_sources_test.exs | kianmeng/ecto_autoslug_field | 38d83fa3cd7ae925f816b96dd3778554c70e3c84 | [
"MIT"
] | 154 | 2016-08-04T18:35:13.000Z | 2022-01-12T06:42:17.000Z | test/ecto_autoslug_field_test/edge_cases_test/empty_sources_test.exs | kianmeng/ecto_autoslug_field | 38d83fa3cd7ae925f816b96dd3778554c70e3c84 | [
"MIT"
] | 21 | 2016-07-23T18:43:14.000Z | 2021-06-03T15:09:21.000Z | defmodule EctoAutoslugField.SlugTest.EdgeCases.EmptySources do
use ExUnit.Case
defmodule StringSource do
use EctoAutoslugField.Slug, to: :slug
def get_sources(_, _) do
[]
end
end
defmodule Article do
use Ecto.Schema
import Ecto.Changeset
schema "articles" do
field(:title,... | 22.974359 | 68 | 0.659598 |
3f2c4f3c6b8107b6e41526a1458985a1fd3ab2da | 1,564 | ex | Elixir | lib/wow/jobs/character_fetch.ex | DrPandemic/expressive-broker | 66a8da94ede2c101db9e1841e17898b5bae5df49 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | null | null | null | lib/wow/jobs/character_fetch.ex | DrPandemic/expressive-broker | 66a8da94ede2c101db9e1841e17898b5bae5df49 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | null | null | null | lib/wow/jobs/character_fetch.ex | DrPandemic/expressive-broker | 66a8da94ede2c101db9e1841e17898b5bae5df49 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | null | null | null | defmodule Wow.Jobs.CharacterFetch do
alias Wow.Character
alias Wow.Crawler
alias Wow.Repo
import Wow.Helpers, only: [with_logs: 1]
use Toniq.Worker, max_concurrency: 5
@spec perform([{:character_name, String.t}, {:realm_name, String.t}, {:region, String.t}]) :: :ok
def perform(options) do
%{character... | 34 | 99 | 0.631074 |
3f2c666e850049eeb89cbf72403518ad859058ba | 2,019 | ex | Elixir | lib/top5/accounts/accounts.ex | rpillar/Top5_Elixir | 9c450d2e9b291108ff1465dc066dfe442dbca822 | [
"MIT"
] | null | null | null | lib/top5/accounts/accounts.ex | rpillar/Top5_Elixir | 9c450d2e9b291108ff1465dc066dfe442dbca822 | [
"MIT"
] | null | null | null | lib/top5/accounts/accounts.ex | rpillar/Top5_Elixir | 9c450d2e9b291108ff1465dc066dfe442dbca822 | [
"MIT"
] | null | null | null | defmodule Top5.Accounts do
@moduledoc """
The Accounts context.
"""
import Ecto.Query, warn: false
alias Top5.Repo
alias Top5.Accounts.User
@doc """
Returns the list of users.
## Examples
iex> list_users()
[%User{}, ...]
"""
def list_users do
Repo.all(User... | 17.25641 | 60 | 0.540862 |
3f2c72c5333cebeef5c9e7747a472d7f139d43d2 | 1,104 | exs | Elixir | mix.exs | tobstarr/contex | c557c78ba98e8d6545d063209f149320b9947c03 | [
"MIT"
] | null | null | null | mix.exs | tobstarr/contex | c557c78ba98e8d6545d063209f149320b9947c03 | [
"MIT"
] | null | null | null | mix.exs | tobstarr/contex | c557c78ba98e8d6545d063209f149320b9947c03 | [
"MIT"
] | null | null | null | defmodule Contex.MixProject do
use Mix.Project
def project do
[
app: :contex,
version: "0.2.0",
elixir: "~> 1.9",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env() == :prod,
description: description(),
package: package(),
name: "ContEx",
source_u... | 20.444444 | 62 | 0.550725 |
3f2c75beec9495c024e51baed6c4d9c344bc695a | 85 | ex | Elixir | lib/thing/api.ex | slurmulon/thing | 21791e7a9579d41de28a0a6131218aed3679d033 | [
"Apache-2.0"
] | null | null | null | lib/thing/api.ex | slurmulon/thing | 21791e7a9579d41de28a0a6131218aed3679d033 | [
"Apache-2.0"
] | null | null | null | lib/thing/api.ex | slurmulon/thing | 21791e7a9579d41de28a0a6131218aed3679d033 | [
"Apache-2.0"
] | null | null | null | defmodule Thing.API do
def get do
end
def all do
end
def by do
end
end
| 7.727273 | 22 | 0.635294 |
3f2ccbd8a65e0ae350cead6639eea9a59f68690b | 1,054 | ex | Elixir | lib/glimesh_web/uploaders/chat_background.ex | itsUnsmart/glimesh.tv | 22c532184bb5046f6c6d8232e8bd66ba534c01c1 | [
"MIT"
] | 1 | 2020-08-02T00:12:28.000Z | 2020-08-02T00:12:28.000Z | lib/glimesh_web/uploaders/chat_background.ex | itsUnsmart/glimesh.tv | 22c532184bb5046f6c6d8232e8bd66ba534c01c1 | [
"MIT"
] | null | null | null | lib/glimesh_web/uploaders/chat_background.ex | itsUnsmart/glimesh.tv | 22c532184bb5046f6c6d8232e8bd66ba534c01c1 | [
"MIT"
] | null | null | null | defmodule Glimesh.ChatBackground do
@moduledoc false
use Waffle.Definition
use Waffle.Ecto.Definition
@versions [:original]
@max_file_size 100_000
def acl(:original, _), do: :public_read
# Whitelist file extensions:
def validate({file, _}) do
extension_passes = ~w(.jpg .jpeg .png) |> Enum.member... | 23.954545 | 88 | 0.697343 |
3f2cd7139f35bb10ab89c8b4eb9d251454fd6424 | 86 | exs | Elixir | test/views/page_view_test.exs | adhocteam/ClusterScrape | 7cfd9d8a926677b0f5b578cc53c74333719de2f9 | [
"Apache-2.0"
] | 4 | 2018-01-04T18:48:53.000Z | 2021-11-25T22:40:05.000Z | test/views/page_view_test.exs | adhocteam/ClusterScrape | 7cfd9d8a926677b0f5b578cc53c74333719de2f9 | [
"Apache-2.0"
] | null | null | null | test/views/page_view_test.exs | adhocteam/ClusterScrape | 7cfd9d8a926677b0f5b578cc53c74333719de2f9 | [
"Apache-2.0"
] | 1 | 2021-11-26T10:24:05.000Z | 2021-11-26T10:24:05.000Z | defmodule ClusterScrape.PageViewTest do
use ClusterScrape.ConnCase, async: true
end
| 21.5 | 41 | 0.837209 |
3f2ce89777424936b6791d1853e127b52b4dcd57 | 97 | exs | Elixir | test/clockr/masterclock_crypt_test.exs | powerhome/clockr | 751ceb03885a1a0a0f20e7443e961d6f1ca0a091 | [
"Apache-2.0"
] | null | null | null | test/clockr/masterclock_crypt_test.exs | powerhome/clockr | 751ceb03885a1a0a0f20e7443e961d6f1ca0a091 | [
"Apache-2.0"
] | null | null | null | test/clockr/masterclock_crypt_test.exs | powerhome/clockr | 751ceb03885a1a0a0f20e7443e961d6f1ca0a091 | [
"Apache-2.0"
] | null | null | null | defmodule Clockr.MasterclockCryptTest do
use ExUnit.Case
doctest Clockr.MasterclockCrypt
end
| 19.4 | 40 | 0.845361 |
3f2d26562be6fa81c312481e1002cbe5ff01cb9a | 393 | ex | Elixir | lib/potionx/redis.ex | shuv1824/potionx | a5888413b13a520d8ddf79fb26b7483e441737c3 | [
"MIT"
] | 31 | 2021-02-16T20:50:46.000Z | 2022-02-03T10:38:07.000Z | lib/potionx/redis.ex | shuv1824/potionx | a5888413b13a520d8ddf79fb26b7483e441737c3 | [
"MIT"
] | 6 | 2021-04-07T21:50:20.000Z | 2022-02-06T21:54:04.000Z | lib/potionx/redis.ex | shuv1824/potionx | a5888413b13a520d8ddf79fb26b7483e441737c3 | [
"MIT"
] | 4 | 2021-03-25T17:59:44.000Z | 2021-04-25T16:28:22.000Z | defmodule Potionx.Redis do
@redix_instance_name :redix
def delete(id) do
Redix.command(
@redix_instance_name,
["DEL", id]
)
end
def get(id) do
Redix.command(
@redix_instance_name,
["GET", id]
)
end
def put(key, value, ttl_s) do
Redix.command(
@redix_inst... | 15.72 | 45 | 0.580153 |
3f2d8b89535c02ee070d784374b5d74e5ead73c2 | 1,678 | exs | Elixir | test/ez_calendar/calendars/week_calendar_test.exs | elixir-twister/ez_calendar | 4d08f049f4e8cd162e333f1ad296b29297a57621 | [
"MIT"
] | 7 | 2016-11-12T07:53:34.000Z | 2021-05-19T01:34:27.000Z | test/ez_calendar/calendars/week_calendar_test.exs | elixir-twister/ez_calendar | 4d08f049f4e8cd162e333f1ad296b29297a57621 | [
"MIT"
] | 1 | 2017-04-06T15:16:22.000Z | 2017-04-06T15:16:22.000Z | test/ez_calendar/calendars/week_calendar_test.exs | elixir-twister/ez_calendar | 4d08f049f4e8cd162e333f1ad296b29297a57621 | [
"MIT"
] | 2 | 2017-04-19T15:03:58.000Z | 2018-07-04T19:37:10.000Z | defmodule EZCalendar.WeekCalendarTest do
use ExUnit.Case, async: true
alias EZCalendar.Repo
alias EZCalendar.Event
alias EZCalendar.WeekCalendar
setup do
:ok = Ecto.Adapters.SQL.Sandbox.checkout(EZCalendar.Repo)
end
test "returns the correct date range" do
{start_date, end_date} = WeekCalendar.... | 28.931034 | 76 | 0.656734 |
3f2da85fb362759909dfd57ca0408c995f2c8b1f | 790 | ex | Elixir | test/fixtures/umbrella/apps/toolchain_platform/lib/toolchain_platform.ex | petermm/nerves | 173b0a424177f45f77db4206406d9c98f1d73e95 | [
"Apache-2.0"
] | 1,944 | 2016-01-25T14:04:50.000Z | 2022-03-30T13:25:53.000Z | test/fixtures/umbrella/apps/toolchain_platform/lib/toolchain_platform.ex | petermm/nerves | 173b0a424177f45f77db4206406d9c98f1d73e95 | [
"Apache-2.0"
] | 397 | 2016-05-19T21:17:51.000Z | 2022-03-30T18:02:49.000Z | test/fixtures/umbrella/apps/toolchain_platform/lib/toolchain_platform.ex | petermm/nerves | 173b0a424177f45f77db4206406d9c98f1d73e95 | [
"Apache-2.0"
] | 191 | 2016-01-30T01:56:25.000Z | 2022-03-30T17:58:57.000Z | defmodule ToolchainPlatform do
use Nerves.Package.Platform
alias Nerves.Artifact
def bootstrap(_pkg) do
System.put_env("NERVES_BOOTSTRAP_TOOLCHAIN", "1")
:ok
end
def build(pkg, _toolchain, _opts) do
build_path = Artifact.build_path(pkg)
File.rm_rf!(build_path)
File.mkdir_p!(build_path)
... | 20.25641 | 59 | 0.675949 |
3f2db7f37e3dac5b695e7efb1a4a02cdb8480e8b | 1,836 | ex | Elixir | lib/civbot_forum.ex | Civcraft/CivBot | 063a393220fbca5ee1ac6daddfb59d0af60f194b | [
"MIT"
] | null | null | null | lib/civbot_forum.ex | Civcraft/CivBot | 063a393220fbca5ee1ac6daddfb59d0af60f194b | [
"MIT"
] | null | null | null | lib/civbot_forum.ex | Civcraft/CivBot | 063a393220fbca5ee1ac6daddfb59d0af60f194b | [
"MIT"
] | null | null | null | defmodule Civbot.Forum do
use GenServer
@site "https://forum.civcraft.co/"
@delay Application.get_env(:civbot, :check_forum_delay)
def start_link do
GenServer.start_link(__MODULE__,[],[])
end
def init(_opts) do
Process.register(self, :forum)
init_state = %{
:last_post_count => nil,
... | 27.402985 | 140 | 0.608932 |
3f2dc676cc5a3cd41845711889a92fc5dbc398c4 | 4,744 | exs | Elixir | test/phx_in_place_test.exs | cjwadair/phx_in_place | 12ea71ec1d3dc8ac2b2f220d0b3f4c676706c570 | [
"MIT"
] | 4 | 2018-05-17T09:56:51.000Z | 2022-02-26T21:24:47.000Z | test/phx_in_place_test.exs | cjwadair/phx_in_place | 12ea71ec1d3dc8ac2b2f220d0b3f4c676706c570 | [
"MIT"
] | null | null | null | test/phx_in_place_test.exs | cjwadair/phx_in_place | 12ea71ec1d3dc8ac2b2f220d0b3f4c676706c570 | [
"MIT"
] | null | null | null | defmodule PhxInPlaceTest do
use ExUnit.Case
doctest PhxInPlace
defmodule SandboxProduct do
defstruct id: 1855, name: "Test 1-54", input_quote: 223.45, markup: 13.43
end
test "input tag correctly generated when no options provided" do
query_result = Phoenix.HTML.safe_to_string(PhxInPlace.phx_in_place(... | 44.336449 | 181 | 0.729132 |
3f2dc74842e50d95fe57d3f97b8b1d8fa440c875 | 146 | exs | Elixir | test/lib/crawler/linker/path_expander_test.exs | Gauthamiv/crawler | 394b09d4e8f4c15abefc6295c1b3e72fb82d5416 | [
"MIT"
] | 884 | 2016-08-08T17:07:02.000Z | 2022-03-17T10:11:42.000Z | test/lib/crawler/linker/path_expander_test.exs | rhnonose/crawler | e0ba256cb4f81e6edfa405febcbc5741ac007f27 | [
"MIT"
] | 28 | 2017-08-04T14:11:42.000Z | 2021-01-02T22:40:20.000Z | test/lib/crawler/linker/path_expander_test.exs | rhnonose/crawler | e0ba256cb4f81e6edfa405febcbc5741ac007f27 | [
"MIT"
] | 86 | 2017-01-12T15:13:49.000Z | 2022-01-12T21:24:52.000Z | defmodule Crawler.Linker.PathExpanderTest do
use Crawler.TestCase, async: true
alias Crawler.Linker.PathExpander
doctest PathExpander
end
| 18.25 | 44 | 0.815068 |
3f2e0c63cb20ac4e1b14db41c7d13d2c1e42c742 | 1,379 | exs | Elixir | test/rocketpay_web/controllers/accounts_controller_test.exs | lucas-sachet/NLW04 | 1c678764d49d421d73d6beb942036593863397e0 | [
"MIT"
] | null | null | null | test/rocketpay_web/controllers/accounts_controller_test.exs | lucas-sachet/NLW04 | 1c678764d49d421d73d6beb942036593863397e0 | [
"MIT"
] | null | null | null | test/rocketpay_web/controllers/accounts_controller_test.exs | lucas-sachet/NLW04 | 1c678764d49d421d73d6beb942036593863397e0 | [
"MIT"
] | null | null | null | defmodule RocketpayWeb.AccountsControllerTest do
use RocketpayWeb.ConnCase, async: true
alias Rocketpay.{Account, User}
describe "deposit/2" do
setup %{conn: conn} do
params = %{
name: "Lucas",
password: "123465",
nickname: "Pew",
email: "lucas@pew.com",
age: 25... | 27.039216 | 100 | 0.598985 |
3f2e399565a167d7d2a26fe144a29d94aa18aad9 | 1,618 | ex | Elixir | lib/detect_web.ex | serokellcao/preact-phoenix | 6094c0db9411231adb053f2dc351b447dc53732a | [
"MIT"
] | null | null | null | lib/detect_web.ex | serokellcao/preact-phoenix | 6094c0db9411231adb053f2dc351b447dc53732a | [
"MIT"
] | 2 | 2021-03-10T04:41:11.000Z | 2021-05-11T00:41:00.000Z | lib/detect_web.ex | serokellcao/preact-phoenix | 6094c0db9411231adb053f2dc351b447dc53732a | [
"MIT"
] | null | null | null | defmodule DetectWeb do
@moduledoc """
The entrypoint for defining your web interface, such
as controllers, views, channels and so on.
This can be used in your application as:
use DetectWeb, :controller
use DetectWeb, :view
The definitions below will be executed for every view,
controller, etc... | 23.114286 | 83 | 0.68665 |
3f2e43d73f512a10c9c5a6f1ec368df79f5c0bf5 | 134 | exs | Elixir | test/fetch_crest_market_test.exs | DianaOlympos/EVE_Crest_fetcher | 26e98b31d4c80ae9c78b5b9398966da6f9c3abe2 | [
"MIT"
] | 1 | 2016-02-01T14:33:37.000Z | 2016-02-01T14:33:37.000Z | test/fetch_crest_market_test.exs | DianaOlympos/EVE_Crest_fetcher | 26e98b31d4c80ae9c78b5b9398966da6f9c3abe2 | [
"MIT"
] | null | null | null | test/fetch_crest_market_test.exs | DianaOlympos/EVE_Crest_fetcher | 26e98b31d4c80ae9c78b5b9398966da6f9c3abe2 | [
"MIT"
] | null | null | null | defmodule FetchCrestMarketTest do
use ExUnit.Case
doctest FetchCrestMarket
test "the truth" do
assert 1 + 1 == 2
end
end
| 14.888889 | 33 | 0.716418 |
3f2e67f905505e8abcd25d483aedaeb871368c0c | 2,777 | ex | Elixir | clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_v2_fulfillment.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_v2_fulfillment.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_v2_fulfillment.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... | 39.671429 | 213 | 0.734606 |
3f2ecd73354373c4a8b4fe99876935717ffd150e | 1,767 | ex | Elixir | apps/nerves_hub_web_core/lib/nerves_hub_web_core/firmwares/upload/file.ex | valiot/nerves_hub_web | 01aef0b9b6b07d9f5c5440f7df0d2a3ec026daa8 | [
"Apache-2.0"
] | 1 | 2020-08-04T14:13:24.000Z | 2020-08-04T14:13:24.000Z | apps/nerves_hub_web_core/lib/nerves_hub_web_core/firmwares/upload/file.ex | valiot/nerves_hub_web | 01aef0b9b6b07d9f5c5440f7df0d2a3ec026daa8 | [
"Apache-2.0"
] | 1 | 2020-09-08T15:15:50.000Z | 2020-09-08T16:13:28.000Z | apps/nerves_hub_web_core/lib/nerves_hub_web_core/firmwares/upload/file.ex | valiot/nerves_hub_web | 01aef0b9b6b07d9f5c5440f7df0d2a3ec026daa8 | [
"Apache-2.0"
] | null | null | null | defmodule NervesHubWebCore.Firmwares.Upload.File do
@moduledoc """
Local file adapter for CRUDing firmware files.
"""
@behaviour NervesHubWebCore.Firmwares.Upload
@type upload_metadata :: %{local_path: String.t(), public_path: String.t()}
@impl NervesHubWebCore.Firmwares.Upload
def upload_file(source, ... | 32.722222 | 81 | 0.679117 |
3f2f01080820c76be1f17f129edcff0bcbdc713a | 94 | ex | Elixir | lib/fireball/models/game.ex | Catharz/fireball | bb9f123c0d2d71b16eda01d3838565e6e762de20 | [
"MIT"
] | null | null | null | lib/fireball/models/game.ex | Catharz/fireball | bb9f123c0d2d71b16eda01d3838565e6e762de20 | [
"MIT"
] | null | null | null | lib/fireball/models/game.ex | Catharz/fireball | bb9f123c0d2d71b16eda01d3838565e6e762de20 | [
"MIT"
] | null | null | null | defmodule Game do
defstruct [:id, :start_time, :end_time, players: [], score_table: []]
end
| 23.5 | 71 | 0.691489 |
3f2f69b099eeb93278b28908163c666dbce42e54 | 349 | exs | Elixir | priv/repo/migrations/20210511052156_move_is_reported_to_article.exs | coderplanets/coderplanets_server | 3663e56340d6d050e974c91f7e499d8424fc25e9 | [
"Apache-2.0"
] | 240 | 2018-11-06T09:36:54.000Z | 2022-02-20T07:12:36.000Z | priv/repo/migrations/20210511052156_move_is_reported_to_article.exs | coderplanets/coderplanets_server | 3663e56340d6d050e974c91f7e499d8424fc25e9 | [
"Apache-2.0"
] | 363 | 2018-07-11T03:38:14.000Z | 2021-12-14T01:42:40.000Z | priv/repo/migrations/20210511052156_move_is_reported_to_article.exs | mydearxym/mastani_server | f24034a4a5449200165cf4a547964a0961793eab | [
"Apache-2.0"
] | 22 | 2019-01-27T11:47:56.000Z | 2021-02-28T13:17:52.000Z | defmodule GroupherServer.Repo.Migrations.MoveIsReportedToArticle do
use Ecto.Migration
def change do
alter(table(:cms_posts), do: add(:is_reported, :boolean, default: false))
alter(table(:cms_jobs), do: add(:is_reported, :boolean, default: false))
alter(table(:cms_repos), do: add(:is_reported, :boolean... | 34.9 | 77 | 0.733524 |
3f2f6ef8f57de5193b874d1df99f22ea1172d5d1 | 1,575 | ex | Elixir | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v14/model/deal_terms_non_guaranteed_fixed_price_terms.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v14/model/deal_terms_non_guaranteed_fixed_price_terms.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v14/model/deal_terms_non_guaranteed_fixed_price_terms.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... | 32.8125 | 105 | 0.772063 |
3f2faf68befb3f391141af7fdaea7f50652a2557 | 1,367 | ex | Elixir | server/lib/taskerito_web/resolvers/comments.ex | jonatanklosko/taskerito | e9b9bfdd10f53a676c0c5eccbd54e4c8a1c2d8a1 | [
"MIT"
] | 5 | 2020-06-18T20:31:11.000Z | 2021-07-23T10:05:56.000Z | server/lib/taskerito_web/resolvers/comments.ex | jonatanklosko/taskerito | e9b9bfdd10f53a676c0c5eccbd54e4c8a1c2d8a1 | [
"MIT"
] | null | null | null | server/lib/taskerito_web/resolvers/comments.ex | jonatanklosko/taskerito | e9b9bfdd10f53a676c0c5eccbd54e4c8a1c2d8a1 | [
"MIT"
] | null | null | null | defmodule TaskeritoWeb.Resolvers.Comments do
alias Taskerito.Projects.{Tasks, Comments}
def can_manage(comment, _args, %{context: %{current_user: current_user}}) do
{:ok, Comments.can_manage_comment(comment, current_user)}
end
def can_manage(_parent, _args, _resolution), do: {:ok, false}
def create_com... | 31.790698 | 100 | 0.711046 |
3f2fc6403ae47724223d3ec670b88afc71d8de15 | 892 | exs | Elixir | test/toniq/job_event_test.exs | joakimk/exqueue | bc2c4fdf311174ea92ff1cf3c0a1860137132ed7 | [
"MIT",
"Unlicense"
] | 366 | 2015-07-04T22:05:44.000Z | 2021-11-15T10:13:46.000Z | test/toniq/job_event_test.exs | joakimk/exqueue | bc2c4fdf311174ea92ff1cf3c0a1860137132ed7 | [
"MIT",
"Unlicense"
] | 47 | 2015-07-05T13:40:56.000Z | 2019-10-04T03:16:56.000Z | test/toniq/job_event_test.exs | joakimk/exqueue | bc2c4fdf311174ea92ff1cf3c0a1860137132ed7 | [
"MIT",
"Unlicense"
] | 33 | 2015-07-05T12:50:55.000Z | 2021-01-28T03:42:41.000Z | defmodule Toniq.JobEventTest do
use ExUnit.Case
test "can send events to multiple subscribers" do
test_pid = self()
spawn_link(fn ->
Toniq.JobEvent.subscribe()
receive do
{:finished, job} -> send(test_pid, {:one, job.id})
end
end)
spawn_link(fn ->
Toniq.JobEvent.s... | 18.583333 | 58 | 0.609865 |
3f2fe6dbb596fad60bc872a0d86d93aff1886863 | 502 | ex | Elixir | test/support/pets_controller.ex | data-twister/smlr | 6c5bbb5d45feb1426c643fef3d714dcee039ad00 | [
"MIT"
] | 5 | 2020-03-03T08:33:50.000Z | 2021-02-22T01:19:01.000Z | test/support/pets_controller.ex | mogorman/smlr | 280b827be8df92969781269e59986d6d66a9f3e1 | [
"MIT"
] | null | null | null | test/support/pets_controller.ex | mogorman/smlr | 280b827be8df92969781269e59986d6d66a9f3e1 | [
"MIT"
] | 1 | 2021-02-06T05:01:41.000Z | 2021-02-06T05:01:41.000Z | defmodule SmlrTest.PetsController do
use Phoenix.Controller
def index(conn, _params) do
json(conn, %{"pet" => "asdf"})
end
def index_nil(conn, _params) do
conn
|> Plug.Conn.send_file(200, "README.md")
end
def index_zip(conn, _params) do
conn
|> Plug.Conn.put_resp_content_type("applica... | 20.916667 | 57 | 0.631474 |
3f2fec901eabf5383e7a9c658a862fe174d81788 | 1,122 | ex | Elixir | lib/google_api/you_tube/v3/model/live_stream_snippet.ex | jesteracer/ytb | 67e3cab899e4f69e586383f7be2c3855c6beea49 | [
"Apache-2.0"
] | null | null | null | lib/google_api/you_tube/v3/model/live_stream_snippet.ex | jesteracer/ytb | 67e3cab899e4f69e586383f7be2c3855c6beea49 | [
"Apache-2.0"
] | null | null | null | lib/google_api/you_tube/v3/model/live_stream_snippet.ex | jesteracer/ytb | 67e3cab899e4f69e586383f7be2c3855c6beea49 | [
"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... | 27.365854 | 77 | 0.73262 |
3f2ff39bfdfb9d7f8c714fc03fe150f0a6ecb23a | 96 | ex | Elixir | assets/anakinQuery2.ex | valerybugakov/gqlSlides | 7ca310b222738673abbecbfa7345acd316b28008 | [
"MIT"
] | null | null | null | assets/anakinQuery2.ex | valerybugakov/gqlSlides | 7ca310b222738673abbecbfa7345acd316b28008 | [
"MIT"
] | null | null | null | assets/anakinQuery2.ex | valerybugakov/gqlSlides | 7ca310b222738673abbecbfa7345acd316b28008 | [
"MIT"
] | null | null | null | person(id: $id) {
name
birthYear
planet {
name
}
films {
title
year
}
}
| 8 | 17 | 0.489583 |
3f3009128236da53f6bd23a0eb959d3a6738a95b | 9,589 | ex | Elixir | lib/elixir/unicode/unicode.ex | carlosantoniodasilva/elixir | 0b7d1c9d4964cd6699b72298294844d8d7d694b5 | [
"Apache-2.0"
] | null | null | null | lib/elixir/unicode/unicode.ex | carlosantoniodasilva/elixir | 0b7d1c9d4964cd6699b72298294844d8d7d694b5 | [
"Apache-2.0"
] | null | null | null | lib/elixir/unicode/unicode.ex | carlosantoniodasilva/elixir | 0b7d1c9d4964cd6699b72298294844d8d7d694b5 | [
"Apache-2.0"
] | null | null | null | defmodule String.Unicode do
@moduledoc false
def version, do: {7, 0, 0}
to_binary = fn
"" ->
nil
codepoints ->
codepoints = :binary.split(codepoints, " ", [:global])
Enum.reduce codepoints, "", fn(codepoint, acc) ->
acc <> << String.to_integer(codepoint, 16) :: utf8 >>
end... | 27.087571 | 105 | 0.634581 |
3f3010245454d6f32653dce026c28d1fe79ee380 | 25,592 | exs | Elixir | lib/mix/test/mix/tasks/release_test.exs | voltone/elixir | e208e1066e484c46726e4d931c18e54aba036f6e | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/tasks/release_test.exs | voltone/elixir | e208e1066e484c46726e4d931c18e54aba036f6e | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/tasks/release_test.exs | voltone/elixir | e208e1066e484c46726e4d931c18e54aba036f6e | [
"Apache-2.0"
] | null | null | null | Code.require_file("../../test_helper.exs", __DIR__)
defmodule Mix.Tasks.ReleaseTest do
use MixTest.Case
@erts_version :erlang.system_info(:version)
@hostname :inet_db.gethostname()
defmacrop release_node(name), do: :"#{name}@#{@hostname}"
describe "customize" do
test "env and vm.args with EEx" do
... | 37.580029 | 137 | 0.568576 |
3f3025c587de61297bfbbe6b8d693553b67bf3d7 | 1,919 | ex | Elixir | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1beta2__explicit_content_frame.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1beta2__explicit_content_frame.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1beta2__explicit_content_frame.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 33.666667 | 164 | 0.750912 |
3f3027b8b79cb6c591369d57d1e13723a9babfe4 | 1,129 | ex | Elixir | integration_test/temple_demo/lib/temple_demo_web/router.ex | rktjmp/temple | 6fe46cbb4998477d76147fa95c9fd9c7841545ef | [
"MIT"
] | 366 | 2019-07-12T22:43:35.000Z | 2022-03-31T07:26:25.000Z | integration_test/temple_demo/lib/temple_demo_web/router.ex | rktjmp/temple | 6fe46cbb4998477d76147fa95c9fd9c7841545ef | [
"MIT"
] | 114 | 2019-07-12T19:49:10.000Z | 2022-03-23T10:48:48.000Z | integration_test/temple_demo/lib/temple_demo_web/router.ex | rktjmp/temple | 6fe46cbb4998477d76147fa95c9fd9c7841545ef | [
"MIT"
] | 17 | 2019-07-23T15:16:34.000Z | 2021-02-25T02:42:02.000Z | defmodule TempleDemoWeb.Router do
use TempleDemoWeb, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
end
pipeline :api do
plug :accepts, ["json"]
end
scope "/", TempleDemoWeb do
... | 25.659091 | 70 | 0.703277 |
3f302bc39c2f9f2602ac10900b4913389a1c054e | 650 | ex | Elixir | lib/convert/convert_error.ex | chungwong/timex | bcd2504119f5c11ada7455d19726b5a49254dabf | [
"MIT"
] | null | null | null | lib/convert/convert_error.ex | chungwong/timex | bcd2504119f5c11ada7455d19726b5a49254dabf | [
"MIT"
] | null | null | null | lib/convert/convert_error.ex | chungwong/timex | bcd2504119f5c11ada7455d19726b5a49254dabf | [
"MIT"
] | null | null | null | defmodule Timex.ConvertError do
@moduledoc false
defexception [:message]
def exception({:error, :insufficient_date_information}) do
%__MODULE__{message: "unable to convert value, insufficient date/time information"}
end
def exception({:error, {:expected_integer, for: k, got: v}}) do
msg = "unable to ... | 34.210526 | 92 | 0.712308 |
3f304790ce3b8a6660adbc9dcf817bb8a5805d84 | 488 | ex | Elixir | 03-chapter/19_knowing_enumerables.ex | herminiotorres/elixir-in-action | 25db6f50ce4d2587d5a8e44a0362a3dd8981741c | [
"MIT"
] | null | null | null | 03-chapter/19_knowing_enumerables.ex | herminiotorres/elixir-in-action | 25db6f50ce4d2587d5a8e44a0362a3dd8981741c | [
"MIT"
] | null | null | null | 03-chapter/19_knowing_enumerables.ex | herminiotorres/elixir-in-action | 25db6f50ce4d2587d5a8e44a0362a3dd8981741c | [
"MIT"
] | null | null | null | Enum.each([1, 2, 3], fn x -> IO.puts(x) end)
Enum.map([1, 2, 3], fn x -> x * 2 end)
Enum.map([1, 2, 3], &(2 * &1))
Enum.filter([1, 2, 3], fn x -> rem(x, 2) == 1 end)
Enum.filter([1, 2, 3], &(rem(&1, 2) == 1))
# 0 is the accumulator
Enum.reduce([1, 2, 3], 0, fn element, sum -> sum + element end)
Enum.reduce([1, 2,... | 18.074074 | 63 | 0.504098 |
3f305613cf340632de76c956a79dc6e7ac2c3527 | 3,605 | ex | Elixir | clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/api/operations.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/api/operations.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/api/operations.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... | 42.916667 | 178 | 0.695423 |
3f305bd92e37f136dd12ca61ceaff65b28192451 | 1,422 | ex | Elixir | lib/teslamate/mqtt.ex | kuma/teslamate | ea175fddb49cc08070182455e0073c3dcfcb3b4c | [
"MIT"
] | 2,602 | 2019-07-24T23:19:12.000Z | 2022-03-31T15:03:48.000Z | lib/teslamate/mqtt.ex | kuma/teslamate | ea175fddb49cc08070182455e0073c3dcfcb3b4c | [
"MIT"
] | 1,547 | 2019-07-26T22:02:09.000Z | 2022-03-31T15:39:41.000Z | lib/teslamate/mqtt.ex | kuma/teslamate | ea175fddb49cc08070182455e0073c3dcfcb3b4c | [
"MIT"
] | 524 | 2019-07-26T17:31:33.000Z | 2022-03-29T15:16:36.000Z | defmodule TeslaMate.Mqtt do
use Supervisor
alias __MODULE__.{Publisher, PubSub, Handler}
# API
def start_link(opts) do
Supervisor.start_link(__MODULE__, opts, name: __MODULE__)
end
@impl true
def init(opts) do
client_id = generate_client_id()
children = [
{Tortoise.Connection, conne... | 21.876923 | 94 | 0.596343 |
3f307c6458f860511d3122fab68375430970bf9f | 2,439 | ex | Elixir | lib/tru_face/request_helper.ex | Waasi/tru_face | 93062d703d6664b16a046f76e0db4a07c48ebf07 | [
"MIT"
] | 3 | 2017-07-06T15:12:13.000Z | 2021-07-11T10:01:05.000Z | lib/tru_face/request_helper.ex | Waasi/tru_face | 93062d703d6664b16a046f76e0db4a07c48ebf07 | [
"MIT"
] | null | null | null | lib/tru_face/request_helper.ex | Waasi/tru_face | 93062d703d6664b16a046f76e0db4a07c48ebf07 | [
"MIT"
] | 2 | 2020-01-22T13:38:03.000Z | 2020-05-11T19:06:50.000Z | defmodule TruFace.RequestHelper do
@moduledoc false
@base_url "https://api.chui.ai/v1"
def path_for(resource) do
"#{@base_url}/#{resource}"
end
def headers do
[{"Content-Type", "application/json"}, {"x-api-key", api_key()}]
end
def parse_response(%HTTPoison.Response{status_code: 200, body: body... | 27.715909 | 74 | 0.599836 |
3f30e670549c30de734de4805135078481d6c08c | 3,324 | ex | Elixir | clients/you_tube_analytics/lib/google_api/you_tube_analytics/v1/model/result_table.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/you_tube_analytics/lib/google_api/you_tube_analytics/v1/model/result_table.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/you_tube_analytics/lib/google_api/you_tube_analytics/v1/model/result_table.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | 1 | 2020-11-10T16:58:27.000Z | 2020-11-10T16:58:27.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 56.338983 | 721 | 0.76444 |
3f30f57717546271f5cd57ac3391bbcad88e8e7c | 640 | ex | Elixir | exercism/elixir/grains/lib/grains.ex | Tyyagoo/studies | f8fcc3a539cfb6d04a149174c88bf2208e220b96 | [
"Unlicense"
] | null | null | null | exercism/elixir/grains/lib/grains.ex | Tyyagoo/studies | f8fcc3a539cfb6d04a149174c88bf2208e220b96 | [
"Unlicense"
] | null | null | null | exercism/elixir/grains/lib/grains.ex | Tyyagoo/studies | f8fcc3a539cfb6d04a149174c88bf2208e220b96 | [
"Unlicense"
] | null | null | null | defmodule Grains do
@doc """
Calculate two to the power of the input minus one.
"""
@spec square(pos_integer()) :: {:ok, pos_integer()} | {:error, String.t()}
def square(number) when 1 <= number and number <= 64, do: {:ok, Integer.pow(2, number - 1)}
def square(_), do: {:error, "The requested square must be... | 25.6 | 93 | 0.573438 |
3f30f86c8d49faedb40adc039013d4399cd41472 | 1,336 | ex | Elixir | lib/videorama_web/controllers/usuario_controller.ex | ruben44bac/videorama | 6350f9aabd778b8660aac5952dc828b3bd35c4c6 | [
"MIT"
] | null | null | null | lib/videorama_web/controllers/usuario_controller.ex | ruben44bac/videorama | 6350f9aabd778b8660aac5952dc828b3bd35c4c6 | [
"MIT"
] | null | null | null | lib/videorama_web/controllers/usuario_controller.ex | ruben44bac/videorama | 6350f9aabd778b8660aac5952dc828b3bd35c4c6 | [
"MIT"
] | null | null | null | defmodule VideoramaWeb.UsuarioController do
use VideoramaWeb, :controller
alias Videorama.Cuentas
alias Videorama.Cuentas.Usuario
alias VideoramaWeb.Autentificacion
plug :autenticacion_usuario when action in [:index, :show ]
def index(conn, _params) do
usuarios = Cuentas.lista_usuarios()
render(conn... | 25.692308 | 67 | 0.695359 |
3f3105b0dceb29e53b06d9869df2a152ba556303 | 1,716 | ex | Elixir | lib/surface_bootstrap4_demo_web/endpoint.ex | tschmidleithner/surface_bootstrap4_demo | 9034762e3df1b31832a88a7a08931fe6571e1456 | [
"MIT"
] | null | null | null | lib/surface_bootstrap4_demo_web/endpoint.ex | tschmidleithner/surface_bootstrap4_demo | 9034762e3df1b31832a88a7a08931fe6571e1456 | [
"MIT"
] | null | null | null | lib/surface_bootstrap4_demo_web/endpoint.ex | tschmidleithner/surface_bootstrap4_demo | 9034762e3df1b31832a88a7a08931fe6571e1456 | [
"MIT"
] | null | null | null | defmodule SurfaceBootstrap4DemoWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :surface_bootstrap4_demo
# 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:... | 31.2 | 97 | 0.735431 |
3f3108431b29522979b932b2a58ca05bf34fd39c | 717 | ex | Elixir | apps/ewallet/lib/ewallet/application.ex | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | null | null | null | apps/ewallet/lib/ewallet/application.ex | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | null | null | null | apps/ewallet/lib/ewallet/application.ex | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | null | null | null | defmodule EWallet.Application do
@moduledoc false
use Application
@decimal_precision 38
@decimal_rounding :half_even
def start(_type, _args) do
import Supervisor.Spec
set_decimal_context()
# List all child processes to be supervised
children = [
worker(EWallet.Scheduler, [])
]
... | 23.9 | 61 | 0.707113 |
3f312693481956a3ba7eb97439fe73be62806be3 | 814 | ex | Elixir | lib/real_world_web/components/profile/profile_feed_toggle.ex | razuf/elixir-phoenix-surface-realworld | 282bd2966012611432affc026539b81dd8bc934f | [
"MIT"
] | 17 | 2020-09-21T23:24:38.000Z | 2021-10-22T01:11:27.000Z | lib/real_world_web/components/profile/profile_feed_toggle.ex | razuf/elixir-phoenix-surface-realworld | 282bd2966012611432affc026539b81dd8bc934f | [
"MIT"
] | 1 | 2020-10-13T20:43:16.000Z | 2020-10-13T20:43:16.000Z | lib/real_world_web/components/profile/profile_feed_toggle.ex | razuf/elixir-phoenix-surface-realworld | 282bd2966012611432affc026539b81dd8bc934f | [
"MIT"
] | 1 | 2021-11-02T19:18:40.000Z | 2021-11-02T19:18:40.000Z | defmodule RealWorldWeb.ProfileFeedToggle do
use Surface.Component
use RealWorldWeb, :surface_view_helpers
alias Surface.Components.LivePatch
property(current_user, :map)
property(active_feed, :string)
@impl true
def render(assigns) do
~H"""
<div class="articles-toggle">
<ul class="nav nav... | 22.611111 | 78 | 0.588452 |
3f313396141613a9e427a2018b9907befe7e59ac | 2,046 | exs | Elixir | mix.exs | mszczygiel/opencensus_elixir | f968f96bb187e879815d5a1a643bac74b33667f6 | [
"Apache-2.0"
] | 40 | 2019-01-02T01:53:17.000Z | 2022-03-22T17:18:10.000Z | mix.exs | mszczygiel/opencensus_elixir | f968f96bb187e879815d5a1a643bac74b33667f6 | [
"Apache-2.0"
] | 29 | 2018-12-14T19:46:22.000Z | 2022-01-07T02:35:33.000Z | mix.exs | mszczygiel/opencensus_elixir | f968f96bb187e879815d5a1a643bac74b33667f6 | [
"Apache-2.0"
] | 10 | 2018-12-14T01:39:25.000Z | 2021-12-13T13:36:31.000Z | defmodule OpencensusElixir.MixProject do
use Mix.Project
def project do
[
app: :opencensus_elixir,
version: "0.4.0",
elixir: "~> 1.5",
start_permanent: Mix.env() == :prod,
deps: deps(),
dialyzer: dialyzer(),
test_coverage: [tool: ExCoveralls],
aliases: aliases(),... | 23.790698 | 93 | 0.547898 |
3f315326e53119e07161a4ef17cf6d6c381c79ba | 982 | ex | Elixir | lib/ex_chatwork.ex | baron/ex_chatwork | 26de2569bf38ddffc178c31b3a059ad1875b51a9 | [
"MIT"
] | null | null | null | lib/ex_chatwork.ex | baron/ex_chatwork | 26de2569bf38ddffc178c31b3a059ad1875b51a9 | [
"MIT"
] | null | null | null | lib/ex_chatwork.ex | baron/ex_chatwork | 26de2569bf38ddffc178c31b3a059ad1875b51a9 | [
"MIT"
] | 1 | 2019-09-20T03:27:17.000Z | 2019-09-20T03:27:17.000Z | defmodule ExChatwork do
alias ExChatwork.Environment
@doc """
me
"""
def me do
"https://api.chatwork.com/v2/me"
|> HTTPoison.get(headers())
|> decode()
end
@doc """
rooms
"""
def rooms do
"https://api.chatwork.com/v2/rooms"
|> HTTPoison.get(headers())
|> decode()
end
@... | 18.185185 | 75 | 0.584521 |
3f3162510d69a2e662443ca172efc49bea839dfa | 3,510 | exs | Elixir | test/ex_algo/stack/stack_test.exs | code-shoily/ex_algo | 7837c222fd2844a151b6b92038f94ea088bec0a2 | [
"MIT"
] | 21 | 2021-11-21T08:07:38.000Z | 2022-03-13T06:19:35.000Z | test/ex_algo/stack/stack_test.exs | code-shoily/ex_algo | 7837c222fd2844a151b6b92038f94ea088bec0a2 | [
"MIT"
] | 3 | 2021-11-26T22:54:09.000Z | 2022-03-06T21:16:12.000Z | test/ex_algo/stack/stack_test.exs | code-shoily/ex_algo | 7837c222fd2844a151b6b92038f94ea088bec0a2 | [
"MIT"
] | null | null | null | defmodule ExAlgo.StackTest do
use ExUnit.Case
use ExUnitProperties
@moduletag :stack
alias ExAlgo.Stack
doctest ExAlgo.Stack
setup_all do
{:ok,
%{
empty_stack: %Stack{},
singleton_stack: %Stack{container: [1]},
stack: %Stack{container: [1, 2, 3]}
}}
end
describe "n... | 28.536585 | 90 | 0.602564 |
3f319aab60a88d421d63a97e0403e91e5c7da5ef | 3,808 | exs | Elixir | test/slack/sends_test.exs | jokawachi-hg/Elixir-Slack | 342f63f3b75b64ea43328277d568a4ba3c5e3977 | [
"MIT"
] | 657 | 2015-01-05T21:56:30.000Z | 2022-03-28T12:56:47.000Z | test/slack/sends_test.exs | jokawachi-hg/Elixir-Slack | 342f63f3b75b64ea43328277d568a4ba3c5e3977 | [
"MIT"
] | 214 | 2015-02-15T18:06:20.000Z | 2022-02-21T21:15:53.000Z | test/slack/sends_test.exs | jokawachi-hg/Elixir-Slack | 342f63f3b75b64ea43328277d568a4ba3c5e3977 | [
"MIT"
] | 207 | 2015-02-26T23:24:36.000Z | 2022-02-27T21:53:57.000Z | defmodule Slack.SendsTest do
use ExUnit.Case
alias Slack.Sends
defmodule FakeWebsocketClient do
def send({:text, json}, socket) do
{json, socket}
end
def cast(pid, {:text, json}) do
{pid, json}
end
end
test "send_raw sends slack formatted to client" do
result = Sends.send_ra... | 34 | 101 | 0.615546 |
3f31d4f4a957104da0e30a5ba0e88377dcf7475d | 1,138 | ex | Elixir | lib/mix/tasks/gen_view.ex | nathanjohnson320/elmer | 41ce46422dec91a2ab342c098e010eaf1cc7c98f | [
"MIT"
] | 9 | 2016-05-31T04:49:27.000Z | 2017-06-17T11:50:36.000Z | lib/mix/tasks/gen_view.ex | nathanjohnson320/elmer | 41ce46422dec91a2ab342c098e010eaf1cc7c98f | [
"MIT"
] | null | null | null | lib/mix/tasks/gen_view.ex | nathanjohnson320/elmer | 41ce46422dec91a2ab342c098e010eaf1cc7c98f | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.Elmer.Gen.View do
@shortdoc "Generates a barebones View file."
@moduledoc """
This is a mix task for creating a View template.
"""
use Mix.Task
@doc """
Creates a new elm View in your elm path.
Run with `mix elmer.gen.view <module name>`
"""
def run(_args) do
Mix.shell.in... | 28.45 | 90 | 0.683656 |
3f31e407424a83814a683f104044baa7d1b54ff8 | 1,433 | ex | Elixir | utils/lib/utils.ex | aroojahmad/beta_curriculum | 635ac56f833c544483cbba20e8ecdba8494246f7 | [
"MIT"
] | 15 | 2022-02-26T08:00:13.000Z | 2022-03-28T05:06:19.000Z | utils/lib/utils.ex | aroojahmad/beta_curriculum | 635ac56f833c544483cbba20e8ecdba8494246f7 | [
"MIT"
] | 19 | 2022-03-06T19:07:41.000Z | 2022-03-31T02:08:20.000Z | utils/lib/utils.ex | aroojahmad/beta_curriculum | 635ac56f833c544483cbba20e8ecdba8494246f7 | [
"MIT"
] | 11 | 2022-03-02T13:00:18.000Z | 2022-03-22T22:19:57.000Z | defmodule Utils do
@moduledoc """
Documentation for `Utils`.
"""
alias Kino.ValidatedForm
defdelegate visual(visual_name, params), to: Utils.Visual
defdelegate animate(visual_name), to: Utils.Animate
def form(form_name), do: ValidatedForm.new(apply(Utils.Form, form_name, []))
def constants(constant), ... | 34.119048 | 131 | 0.689463 |
3f320a521b4bea11b78fe2655acf63d0f8093d35 | 527 | ex | Elixir | lib/neko/shikimori/client.ex | xmaid/neko-achievements | 4998e462efcc977e4ee1b3e2471023f427e400f6 | [
"MIT"
] | 21 | 2017-05-11T19:19:22.000Z | 2021-06-15T23:43:18.000Z | lib/neko/shikimori/client.ex | xmaid/neko-achievements | 4998e462efcc977e4ee1b3e2471023f427e400f6 | [
"MIT"
] | 41 | 2017-11-20T18:43:31.000Z | 2021-12-09T18:17:25.000Z | lib/neko/shikimori/client.ex | xmaid/neko-achievements | 4998e462efcc977e4ee1b3e2471023f427e400f6 | [
"MIT"
] | 97 | 2017-10-11T15:38:11.000Z | 2022-01-21T09:56:01.000Z | defmodule Neko.Shikimori.Client do
defmodule Behaviour do
@callback get_user_rates!(pos_integer) :: [Neko.UserRate.t()]
@callback get_achievements!(pos_integer) :: [Neko.Achievement.t()]
@callback get_animes!() :: [Neko.Anime.t()]
end
@behaviour Behaviour
@adapter Application.get_env(:neko, :shiki... | 27.736842 | 70 | 0.72296 |
3f3221f582a4a37ee85cc0c67581eab00ddb231d | 374 | ex | Elixir | web/views/error_view.ex | chasm/elm_pack | 5bbdc4df335376170b6d161bfc65f9fc7eca2648 | [
"MIT"
] | 1 | 2016-08-02T00:36:46.000Z | 2016-08-02T00:36:46.000Z | web/views/error_view.ex | chasm/elm_pack | 5bbdc4df335376170b6d161bfc65f9fc7eca2648 | [
"MIT"
] | null | null | null | web/views/error_view.ex | chasm/elm_pack | 5bbdc4df335376170b6d161bfc65f9fc7eca2648 | [
"MIT"
] | null | null | null | defmodule ElmPack.ErrorView do
use ElmPack.Web, :view
def render("404.html", _assigns) do
"Page not found"
end
def render("500.html", _assigns) do
"Server internal error"
end
# In case no render clause matches or no
# template is found, let's render it as 500
def template_not_found(_template,... | 20.777778 | 47 | 0.697861 |
3f3244424acf249c7885ca9ac4da672408bef9d2 | 1,948 | exs | Elixir | test/ja_serializer/formatter/utils_test.exs | gamesrol/ja_serializer | c48d8fb0fb742bd96c30acd40e24f7395f25af2c | [
"Apache-2.0"
] | null | null | null | test/ja_serializer/formatter/utils_test.exs | gamesrol/ja_serializer | c48d8fb0fb742bd96c30acd40e24f7395f25af2c | [
"Apache-2.0"
] | null | null | null | test/ja_serializer/formatter/utils_test.exs | gamesrol/ja_serializer | c48d8fb0fb742bd96c30acd40e24f7395f25af2c | [
"Apache-2.0"
] | null | null | null | defmodule JaSerializer.Formatter.UtilsTest do
use ExUnit.Case
alias JaSerializer.Formatter.Utils
test "formatting keys - dasherize - by default" do
assert Utils.format_key(:blog_post) == "blog-post"
assert Utils.format_key("approved_comments") == "approved-comments"
end
test "formatting keys - dashe... | 33.586207 | 88 | 0.717659 |
3f324fe2f09a30a108bb23c9d095bbfa12b46425 | 61 | ex | Elixir | lib/mango_web/views/checkout_view.ex | nittin-shankar/mango | 3d988a494f57b26bddaad9a25e63eb4e7f6f9c12 | [
"MIT"
] | 121 | 2017-06-24T10:33:38.000Z | 2022-03-17T16:02:16.000Z | lib/mango_web/views/checkout_view.ex | nittin-shankar/mango | 3d988a494f57b26bddaad9a25e63eb4e7f6f9c12 | [
"MIT"
] | 6 | 2017-06-24T22:48:21.000Z | 2018-03-17T01:20:32.000Z | lib/mango_web/views/checkout_view.ex | nittin-shankar/mango | 3d988a494f57b26bddaad9a25e63eb4e7f6f9c12 | [
"MIT"
] | 29 | 2017-07-03T04:09:15.000Z | 2022-03-02T15:45:49.000Z | defmodule MangoWeb.CheckoutView do
use MangoWeb, :view
end
| 15.25 | 34 | 0.803279 |
3f3273e979ec874d57d73038ac2b5c8b91d5cf8c | 314 | ex | Elixir | web/controllers/slugged_route_controller.ex | superdev999/Phoenix-project | ab13ac9366cdd0aa9581da7faf993b11aaa5344c | [
"MIT"
] | null | null | null | web/controllers/slugged_route_controller.ex | superdev999/Phoenix-project | ab13ac9366cdd0aa9581da7faf993b11aaa5344c | [
"MIT"
] | null | null | null | web/controllers/slugged_route_controller.ex | superdev999/Phoenix-project | ab13ac9366cdd0aa9581da7faf993b11aaa5344c | [
"MIT"
] | null | null | null | defmodule CodeCorps.SluggedRouteController do
use CodeCorps.Web, :controller
use JaResource
import CodeCorps.Helpers.Query, only: [slug_finder: 2]
alias CodeCorps.SluggedRoute
plug JaResource
def record(%Plug.Conn{params: %{"slug" => slug}}, _id) do
SluggedRoute |> slug_finder(slug)
end
end
| 20.933333 | 59 | 0.738854 |
3f3299f03357b6887494dba18fb127e985058efa | 464 | exs | Elixir | priv/repo/migrations/20170806132638_create_mcq_questions.exs | trewdys/source-academy2-debug | 6146e1fac81472184877f47aa32dee7fdceb4fb6 | [
"Unlicense"
] | null | null | null | priv/repo/migrations/20170806132638_create_mcq_questions.exs | trewdys/source-academy2-debug | 6146e1fac81472184877f47aa32dee7fdceb4fb6 | [
"Unlicense"
] | null | null | null | priv/repo/migrations/20170806132638_create_mcq_questions.exs | trewdys/source-academy2-debug | 6146e1fac81472184877f47aa32dee7fdceb4fb6 | [
"Unlicense"
] | null | null | null | defmodule SourceAcademy.Repo.Migrations.CreateMcqQuestions do
@moduledoc false
use Ecto.Migration
def change do
create table(:assessment_mcq_questions) do
add :content, :text
add :question_id, references(:assessment_questions,
on_delete: :delete_all)
timestamps()
end
crea... | 21.090909 | 61 | 0.709052 |
3f329b7fc8262112804d57f776f0bf123f689ecb | 2,561 | exs | Elixir | config/config.exs | djschilling/radiator | 382e22904d7e400a8ffba54e9ddfd2845bc2b623 | [
"MIT"
] | null | null | null | config/config.exs | djschilling/radiator | 382e22904d7e400a8ffba54e9ddfd2845bc2b623 | [
"MIT"
] | null | null | null | config/config.exs | djschilling/radiator | 382e22904d7e400a8ffba54e9ddfd2845bc2b623 | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
# General application configuration
use Mix.Config
default_host = "localhost"
config :radiator,
... | 29.77907 | 92 | 0.737993 |
3f32ae5a838cec4c762fad3ce84c19855f618b9d | 621 | exs | Elixir | bowling_game/test/iteration_01/bowling_game_test/day12_test.exs | alex-dukhno/elixir-tdd-katas | 57e25fc275c4274c889f2b3760276cc8a393de9e | [
"MIT"
] | null | null | null | bowling_game/test/iteration_01/bowling_game_test/day12_test.exs | alex-dukhno/elixir-tdd-katas | 57e25fc275c4274c889f2b3760276cc8a393de9e | [
"MIT"
] | null | null | null | bowling_game/test/iteration_01/bowling_game_test/day12_test.exs | alex-dukhno/elixir-tdd-katas | 57e25fc275c4274c889f2b3760276cc8a393de9e | [
"MIT"
] | null | null | null | defmodule BowlingGameKataTest.Day12 do
use ExUnit.Case
import BowlingGameKata.Day12
defp roll_many(times, pins), do:
for _ <- 1..times, do:
pins
defp spare(), do: [4, 6]
defp strike(), do: [10]
test "gutter game", do:
assert score(roll_many(20, 0)) == 0
test "all ones", do:
assert s... | 22.178571 | 78 | 0.587762 |
3f32d20429a93c6b40c022e5c57dc45692a67a5d | 925 | exs | Elixir | implements/bob/bob.exs | MickeyOoh/Exercises | 3b34e7fdab4a09e0269d20c68531b4fb75bb7f16 | [
"MIT"
] | null | null | null | implements/bob/bob.exs | MickeyOoh/Exercises | 3b34e7fdab4a09e0269d20c68531b4fb75bb7f16 | [
"MIT"
] | 1 | 2018-06-19T18:59:41.000Z | 2018-06-19T18:59:41.000Z | implements/bob/bob.exs | MickeyOoh/Exercises | 3b34e7fdab4a09e0269d20c68531b4fb75bb7f16 | [
"MIT"
] | null | null | null | defmodule Bob do
@answer %{
silent: "Fine. Be that way!",
shout_question: "Calm down, I know what I'm doing!",
question: "Sure.",
shouting: "Whoa, chill out!",
meaningless: "Whatever."}
def hey(input) do
cond do
silent?(input) -> @answer.silent
shout_question?(input) -> @answer... | 25.694444 | 56 | 0.607568 |
3f33123c7c0cffd8ffa93481fcb2e6abb2a73d6c | 2,744 | ex | Elixir | lib/core/event_handler.ex | wojtekmach/telemetry_metrics_prometheus_core | d5ecf3d2964b1a25827b3058c55202123263e690 | [
"Apache-2.0"
] | null | null | null | lib/core/event_handler.ex | wojtekmach/telemetry_metrics_prometheus_core | d5ecf3d2964b1a25827b3058c55202123263e690 | [
"Apache-2.0"
] | 1 | 2019-07-04T14:50:29.000Z | 2019-07-04T14:50:29.000Z | lib/core/event_handler.ex | Gazler/telemetry_metrics_prometheus_core | 6a08e81d2a0f897a3e2c050d0399c2cb9a94ab93 | [
"Apache-2.0"
] | 1 | 2020-03-30T18:50:32.000Z | 2020-03-30T18:50:32.000Z | defmodule TelemetryMetricsPrometheus.Core.EventHandler do
@moduledoc false
alias Telemetry.Metrics
alias TelemetryMetricsPrometheus.Core.{Counter, Distribution, LastValue, Sum}
@typep measurement_not_found_error :: {:measurement_not_found, atom()}
@typep measurement_parse_error :: {:measurement_parse_error, ... | 39.768116 | 105 | 0.70481 |
3f3375a688f8ec96ea74f5815a087dbd2b1df49f | 2,054 | ex | Elixir | lib/spender/wish_list/wish_list.ex | LittleKidogo/Budgetinization | eae6dd62208ec7fb43c8c212f40611f8635205d5 | [
"MIT"
] | 2 | 2018-02-27T06:29:59.000Z | 2018-06-09T16:53:49.000Z | lib/spender/wish_list/wish_list.ex | LittleKidogo/Budgetinization | eae6dd62208ec7fb43c8c212f40611f8635205d5 | [
"MIT"
] | 94 | 2018-02-22T06:03:19.000Z | 2018-06-28T14:30:31.000Z | lib/spender/wish_list/wish_list.ex | LittleKidogo/Budgetinization | eae6dd62208ec7fb43c8c212f40611f8635205d5 | [
"MIT"
] | 1 | 2020-03-04T19:41:06.000Z | 2020-03-04T19:41:06.000Z | defmodule Spender.WishList do
@moduledoc """
This module is used for crud functions on WishList items
"""
import Ecto.Query, warn: false
alias Spender.Repo
alias Ecto.Changeset
alias Spender.{
MoneyLogs,
MoneyLogs.Moneylog,
WishList.Item
}
@doc """
Lists all wishlist items in a moneylo... | 26 | 94 | 0.619279 |
3f339486e2ae171c313270a3017d5dc1809bfc7f | 2,276 | exs | Elixir | http_authentication/config/prod.exs | hbobenicio/phoenix-examples | dd2adc8887a341b50d192bc31c61ee528e896672 | [
"MIT"
] | null | null | null | http_authentication/config/prod.exs | hbobenicio/phoenix-examples | dd2adc8887a341b50d192bc31c61ee528e896672 | [
"MIT"
] | null | null | null | http_authentication/config/prod.exs | hbobenicio/phoenix-examples | dd2adc8887a341b50d192bc31c61ee528e896672 | [
"MIT"
] | null | null | null | use Mix.Config
# For production, we often load configuration from external
# sources, such as your system environment. For this reason,
# you won't find the :http configuration below, but set inside
# HttpAuthenticationWeb.Endpoint.init/2 when load_from_system_env is
# true. Any dynamic configuration should be done th... | 35.015385 | 79 | 0.734183 |
3f33ce9554589901bc03d2b217f321e000eb1b60 | 201 | exs | Elixir | test/controllers/page_controller_test.exs | hgaard/RethinkLogs-Elixir | 45fd72938bf7c953c76e867687fca0e9a8e05115 | [
"MIT"
] | null | null | null | test/controllers/page_controller_test.exs | hgaard/RethinkLogs-Elixir | 45fd72938bf7c953c76e867687fca0e9a8e05115 | [
"MIT"
] | null | null | null | test/controllers/page_controller_test.exs | hgaard/RethinkLogs-Elixir | 45fd72938bf7c953c76e867687fca0e9a8e05115 | [
"MIT"
] | null | null | null | defmodule RethinkLogs.PageControllerTest do
use RethinkLogs.ConnCase
test "GET /", %{conn: conn} do
conn = get conn, "/"
assert html_response(conn, 200) =~ "Welcome to Phoenix!"
end
end
| 22.333333 | 60 | 0.686567 |
3f33f83468046db4f2f8125e62400b016ed95ca4 | 796 | exs | Elixir | elixir/advent_of_code/test/day1_test.exs | karlwnw/adventofcode2019 | 7a01a0dd9c3f93ae3f9aa123a91641a37289eb7a | [
"MIT"
] | 2 | 2020-01-02T12:59:44.000Z | 2020-01-04T19:21:31.000Z | elixir/advent_of_code/test/day1_test.exs | karlwnw/adventofcode2019 | 7a01a0dd9c3f93ae3f9aa123a91641a37289eb7a | [
"MIT"
] | null | null | null | elixir/advent_of_code/test/day1_test.exs | karlwnw/adventofcode2019 | 7a01a0dd9c3f93ae3f9aa123a91641a37289eb7a | [
"MIT"
] | null | null | null | defmodule Day1Test do
use ExUnit.Case
doctest Day1
test "fuel for mass=13 is 2" do
assert Day1.calculate_fuel(13) == 2
end
test "test parse" do
assert Day1.parse("12\n14\n1969\n100756") == [12, 14, 1969, 100_756]
end
test "part1 adds all fuel values" do
assert Day1.part1("12\n14\n1969\n1007... | 24.121212 | 72 | 0.703518 |
3f341c3506e421e448808e2e8cad602f6c8f0b9f | 1,153 | ex | Elixir | clients/elixir/generated/lib/swaggy_jenkins/model/extension_class_container_impl1map.ex | PankTrue/swaggy-jenkins | aca35a7cca6e1fcc08bd399e05148942ac2f514b | [
"MIT"
] | 23 | 2017-08-01T12:25:26.000Z | 2022-01-25T03:44:11.000Z | clients/elixir/generated/lib/swaggy_jenkins/model/extension_class_container_impl1map.ex | PankTrue/swaggy-jenkins | aca35a7cca6e1fcc08bd399e05148942ac2f514b | [
"MIT"
] | 35 | 2017-06-14T03:28:15.000Z | 2022-02-14T10:25:54.000Z | clients/elixir/generated/lib/swaggy_jenkins/model/extension_class_container_impl1map.ex | PankTrue/swaggy-jenkins | aca35a7cca6e1fcc08bd399e05148942ac2f514b | [
"MIT"
] | 11 | 2017-08-31T19:00:20.000Z | 2021-12-19T12:04:12.000Z | # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://openapi-generator.tech
# Do not edit the class manually.
defmodule SwaggyJenkins.Model.ExtensionClassContainerImpl1map do
@moduledoc """
"""
@derive [Poison.Encoder]
defstruct [
:"io.jenkins.blueocean.... | 34.939394 | 147 | 0.760624 |
3f3445f6cea89331614bc74c06edb3edd88f8983 | 1,959 | exs | Elixir | mix.exs | reetou/elixir-mongodb-driver | b17b8fa337a3fdea783bbb991984f93a4848b652 | [
"Apache-2.0"
] | null | null | null | mix.exs | reetou/elixir-mongodb-driver | b17b8fa337a3fdea783bbb991984f93a4848b652 | [
"Apache-2.0"
] | null | null | null | mix.exs | reetou/elixir-mongodb-driver | b17b8fa337a3fdea783bbb991984f93a4848b652 | [
"Apache-2.0"
] | null | null | null | defmodule Mongodb.Mixfile do
use Mix.Project
@version "0.6.4"
def project() do
[app: :mongodb_driver,
version: @version,
elixirc_paths: elixirc_paths(Mix.env),
elixir: "~> 1.8",
name: "mongodb-driver",
deps: deps(),
docs: docs(),
description: description(),
package: p... | 28.391304 | 133 | 0.574783 |
3f34a15222768371138acbfa8b7191ebb3558b55 | 1,727 | ex | Elixir | lib/mix/tasks/ecto.rollback.ex | john-vinters/ecto | 82683a80e865dd0863c08860f609d6910355bfc4 | [
"Apache-2.0"
] | null | null | null | lib/mix/tasks/ecto.rollback.ex | john-vinters/ecto | 82683a80e865dd0863c08860f609d6910355bfc4 | [
"Apache-2.0"
] | null | null | null | lib/mix/tasks/ecto.rollback.ex | john-vinters/ecto | 82683a80e865dd0863c08860f609d6910355bfc4 | [
"Apache-2.0"
] | null | null | null | defmodule Mix.Tasks.Ecto.Rollback do
use Mix.Task
import Mix.Ecto
@shortdoc "Rollback migrations from a repo"
@moduledoc """
Reverts applied migrations in the given repository.
By default, migrations are expected at "priv/YOUR_REPO/migrations"
directory of the current application but it can be configur... | 29.775862 | 79 | 0.664737 |
3f34a48aab7b7bac792baafd687ea2fcc3f5032a | 1,207 | ex | Elixir | test/support/channel_case.ex | cogini/phoenix_container_example | 2c4d66ad7186ec165b9d260bc232d6c6ee9b2abe | [
"Apache-2.0"
] | 19 | 2020-07-21T06:03:36.000Z | 2022-03-21T22:35:22.000Z | test/support/channel_case.ex | cogini/phoenix_container_example | 2c4d66ad7186ec165b9d260bc232d6c6ee9b2abe | [
"Apache-2.0"
] | 1 | 2022-03-08T10:26:55.000Z | 2022-03-08T10:26:55.000Z | test/support/channel_case.ex | cogini/phoenix_container_example | 2c4d66ad7186ec165b9d260bc232d6c6ee9b2abe | [
"Apache-2.0"
] | 1 | 2022-02-09T01:25:09.000Z | 2022-02-09T01:25:09.000Z | defmodule PhoenixContainerExampleWeb.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 ... | 29.439024 | 85 | 0.748964 |
3f34be4476f074747e6c5df75e3bd7636fe02683 | 502 | exs | Elixir | test/pummpcomm/history/daily_total_515_test.exs | infinity-aps/pummpcomm | 7380585ecd110ab1c19d2aea3880e51e3f433050 | [
"MIT"
] | 15 | 2017-08-31T00:58:47.000Z | 2020-01-12T03:53:13.000Z | test/pummpcomm/history/daily_total_515_test.exs | vladhj38/pummpcomm | 7380585ecd110ab1c19d2aea3880e51e3f433050 | [
"MIT"
] | 1 | 2017-09-15T02:09:31.000Z | 2017-09-15T02:09:31.000Z | test/pummpcomm/history/daily_total_515_test.exs | vladhj38/pummpcomm | 7380585ecd110ab1c19d2aea3880e51e3f433050 | [
"MIT"
] | 3 | 2017-09-10T17:24:59.000Z | 2019-09-10T19:41:49.000Z | defmodule Pummpcomm.History.DailyTotal515Test do
use ExUnit.Case
# TODO capture in the wild
test "Daily Total 515" do
{:ok, history_page} =
Base.decode16(
"6C2D110500AF85D9020000077803E434039430008203943002F05200A4120000000907020000"
)
decoded_events = Pummpcomm.History.decode_record... | 29.529412 | 91 | 0.713147 |
3f34cda632f4952e447ff52f313fae9fe4d424a7 | 2,028 | ex | Elixir | lib/helpers/area.ex | net/phone | 18e1356d2f8d32fe3f95638c3c44bceab0164fb2 | [
"Apache-2.0"
] | null | null | null | lib/helpers/area.ex | net/phone | 18e1356d2f8d32fe3f95638c3c44bceab0164fb2 | [
"Apache-2.0"
] | null | null | null | lib/helpers/area.ex | net/phone | 18e1356d2f8d32fe3f95638c3c44bceab0164fb2 | [
"Apache-2.0"
] | null | null | null | defmodule Helper.Area do
@moduledoc false
defmacro __using__(_) do
quote do
import Helper.Area
def regex, do: ""
def area_name, do: ""
def area_type, do: ""
def area_abbreviation, do: ""
defoverridable [regex: 0, area_name: 0, area_type: 0, area_abbreviation: 0]
def ... | 21.806452 | 88 | 0.548817 |
3f34d1ac735cc30c2f6d750699645432b49e432c | 3,180 | exs | Elixir | apps/artemis_web/test/artemis_web/controllers/data_center_controller_test.exs | artemis-platform/artemis_dashboard | 5ab3f5ac4c5255478bbebf76f0e43b44992e3cab | [
"MIT"
] | 9 | 2019-08-19T19:56:34.000Z | 2022-03-22T17:56:38.000Z | apps/artemis_web/test/artemis_web/controllers/data_center_controller_test.exs | chrislaskey/atlas_dashboard | 9009ef5aac8fefba126fa7d3e3b82d1b610ee6fe | [
"MIT"
] | 7 | 2019-07-12T21:41:01.000Z | 2020-08-17T21:29:22.000Z | apps/artemis_web/test/artemis_web/controllers/data_center_controller_test.exs | chrislaskey/atlas_dashboard | 9009ef5aac8fefba126fa7d3e3b82d1b610ee6fe | [
"MIT"
] | 2 | 2019-07-05T22:51:47.000Z | 2019-08-19T19:56:37.000Z | defmodule ArtemisWeb.DataCenterControllerTest do
use ArtemisWeb.ConnCase
import Artemis.Factories
@create_attrs %{name: "some name", slug: "test-slug"}
@update_attrs %{name: "some updated name", slug: "test-slug"}
@invalid_attrs %{name: nil, slug: nil}
setup %{conn: conn} do
{:ok, conn: sign_in(conn)... | 32.121212 | 99 | 0.671384 |
3f34eb5c5d1c4281eb89ad15f7a5ecd395dd8541 | 639 | ex | Elixir | Microsoft.Azure.Management.Storage/lib/microsoft/azure/management/storage/model/usage_name.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.Storage/lib/microsoft/azure/management/storage/model/usage_name.ex | chgeuer/ex_microsoft_azure_management | 99cd9f7f2ff1fdbe69ca5bac55b6e2af91ba3603 | [
"Apache-2.0"
] | null | null | null | Microsoft.Azure.Management.Storage/lib/microsoft/azure/management/storage/model/usage_name.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.Storage.Model.UsageName do
@moduledoc """
The usage names that can be used; currently limited to StorageAccount.
... | 22.821429 | 82 | 0.707355 |
3f3503c9cbf600c8eeb4709409e3dfa2152738f8 | 1,262 | ex | Elixir | test/support/npc.ex | stevegrossi/ex_venture | e02d5a63fdb882d92cfb4af3e15f7b48ad7054aa | [
"MIT"
] | 1 | 2019-02-10T10:22:39.000Z | 2019-02-10T10:22:39.000Z | test/support/npc.ex | stevegrossi/ex_venture | e02d5a63fdb882d92cfb4af3e15f7b48ad7054aa | [
"MIT"
] | null | null | null | test/support/npc.ex | stevegrossi/ex_venture | e02d5a63fdb882d92cfb4af3e15f7b48ad7054aa | [
"MIT"
] | null | null | null | defmodule Test.Game.NPC do
alias Data.NPC
def start_link() do
Agent.start_link(fn () -> %{npc: _npc()} end, name: __MODULE__)
end
def _npc() do
%NPC{
id: 1,
name: "Guard",
level: 1,
experience_points: 124,
currency: 0,
events: [],
status_line: "{name} is here.... | 22.140351 | 75 | 0.584786 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.