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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e9794eada9b36c460a155490d10b2a8512f666eb | 114 | ex | Elixir | programacao_funcional/04/salario.ex | MatheusPSantos/functional-prog-lessons | 79ecc40798f5aadb895b5c2a1875010de48998b5 | [
"MIT"
] | null | null | null | programacao_funcional/04/salario.ex | MatheusPSantos/functional-prog-lessons | 79ecc40798f5aadb895b5c2a1875010de48998b5 | [
"MIT"
] | null | null | null | programacao_funcional/04/salario.ex | MatheusPSantos/functional-prog-lessons | 79ecc40798f5aadb895b5c2a1875010de48998b5 | [
"MIT"
] | null | null | null | defmodule Salario do
def calculo_do_bonus(porcentagem) do
fn salario -> salario * porcentagem end
end
end
| 19 | 43 | 0.754386 |
e9795a987d0c825a98cda725c026f9330a63a211 | 66 | exs | Elixir | test/test_helper.exs | oberonv1/elixir-react-train-schedule | 89821c5be1f595f1ef34e778df0ca24eeedad674 | [
"MIT"
] | null | null | null | test/test_helper.exs | oberonv1/elixir-react-train-schedule | 89821c5be1f595f1ef34e778df0ca24eeedad674 | [
"MIT"
] | null | null | null | test/test_helper.exs | oberonv1/elixir-react-train-schedule | 89821c5be1f595f1ef34e778df0ca24eeedad674 | [
"MIT"
] | null | null | null | ExUnit.start
Ecto.Adapters.SQL.Sandbox.mode(Mbta.Repo, :manual)
| 13.2 | 50 | 0.772727 |
e9795b38982f72c4c010ecb229c3836c6a09d6ed | 1,595 | ex | Elixir | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_quote_info.ex | nuxlli/elixir-google-api | ecb8679ac7282b7dd314c3e20c250710ec6a7870 | [
"Apache-2.0"
] | null | null | null | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_quote_info.ex | nuxlli/elixir-google-api | ecb8679ac7282b7dd314c3e20c250710ec6a7870 | [
"Apache-2.0"
] | null | null | null | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_quote_info.ex | nuxlli/elixir-google-api | ecb8679ac7282b7dd314c3e20c250710ec6a7870 | [
"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... | 33.229167 | 82 | 0.759875 |
e9795df94575b0ce74e19c444061fe1574b079f4 | 251 | ex | Elixir | day_1/lib/day_1/calculator.ex | vanetix/advent-of-code-2019 | d21866846d56a0c6ee9274d812961730ae4392ba | [
"MIT"
] | null | null | null | day_1/lib/day_1/calculator.ex | vanetix/advent-of-code-2019 | d21866846d56a0c6ee9274d812961730ae4392ba | [
"MIT"
] | null | null | null | day_1/lib/day_1/calculator.ex | vanetix/advent-of-code-2019 | d21866846d56a0c6ee9274d812961730ae4392ba | [
"MIT"
] | null | null | null | defmodule Day1.Calculator do
use Rustler, otp_app: :day_1, crate: :calculator
@moduledoc false
@doc """
Calculate fuel required using native code.
"""
def calculate(_), do: error()
defp error(), do: :erlang.nif_error(:not_loaded)
end
| 19.307692 | 50 | 0.693227 |
e979663e12eebbf2a471b8efc3ba6f592292cd5d | 154 | ex | Elixir | lib/ex_viva/station_identity.ex | kwando/ex_viva | 21ac00fcb187295c4038584fd25f78b56cfde418 | [
"MIT"
] | null | null | null | lib/ex_viva/station_identity.ex | kwando/ex_viva | 21ac00fcb187295c4038584fd25f78b56cfde418 | [
"MIT"
] | null | null | null | lib/ex_viva/station_identity.ex | kwando/ex_viva | 21ac00fcb187295c4038584fd25f78b56cfde418 | [
"MIT"
] | 1 | 2021-01-06T06:58:02.000Z | 2021-01-06T06:58:02.000Z |
defprotocol ExViva.StationIdentity do
def station_id(arg)
end
defimpl ExViva.StationIdentity, for: Integer do
def station_id(value), do: value
end
| 15.4 | 47 | 0.785714 |
e97968624f9853a7b2c7e11d7c99b3a103c5366a | 33,453 | exs | Elixir | test/phoenix_live_view/html_engine_test.exs | holandes22/phoenix_live_view | 1b144a624818bd14c216097c7b40c4026171c84d | [
"MIT"
] | null | null | null | test/phoenix_live_view/html_engine_test.exs | holandes22/phoenix_live_view | 1b144a624818bd14c216097c7b40c4026171c84d | [
"MIT"
] | null | null | null | test/phoenix_live_view/html_engine_test.exs | holandes22/phoenix_live_view | 1b144a624818bd14c216097c7b40c4026171c84d | [
"MIT"
] | null | null | null | defmodule Phoenix.LiveView.HTMLEngineTest do
use ExUnit.Case, async: true
import Phoenix.LiveView.Helpers,
only: [sigil_H: 2, render_slot: 1, render_slot: 2]
alias Phoenix.LiveView.HTMLEngine
alias Phoenix.LiveView.HTMLTokenizer.ParseError
defp eval(string, assigns \\ %{}, opts \\ []) do
opts =
... | 28.017588 | 118 | 0.533375 |
e9796f82d3a5cf30e5df365e6c024d687494ea80 | 861 | exs | Elixir | mix.exs | yasuhiro-okada-aktsk/sample_rakuten_genre | 560454d694ea6e2727a2f51ca43bfd0f87ec4dda | [
"MIT"
] | null | null | null | mix.exs | yasuhiro-okada-aktsk/sample_rakuten_genre | 560454d694ea6e2727a2f51ca43bfd0f87ec4dda | [
"MIT"
] | null | null | null | mix.exs | yasuhiro-okada-aktsk/sample_rakuten_genre | 560454d694ea6e2727a2f51ca43bfd0f87ec4dda | [
"MIT"
] | null | null | null | defmodule SampleRakutenGenre.Mixfile do
use Mix.Project
def project do
[app: :sample_rakuten_genre,
version: "0.0.1",
elixir: "~> 1.1",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps]
end
# Configuration for the OTP application
#
# Type "mix he... | 22.076923 | 77 | 0.569106 |
e9797b382d3aedc1bd2dc5fe8c23d10489d69df4 | 354 | exs | Elixir | bundlex.exs | membraneframework/membrane_ffmpeg_video_filter_plugin | b9585d3830ce66c3657989c6edee0dc9c067287c | [
"Apache-2.0"
] | null | null | null | bundlex.exs | membraneframework/membrane_ffmpeg_video_filter_plugin | b9585d3830ce66c3657989c6edee0dc9c067287c | [
"Apache-2.0"
] | null | null | null | bundlex.exs | membraneframework/membrane_ffmpeg_video_filter_plugin | b9585d3830ce66c3657989c6edee0dc9c067287c | [
"Apache-2.0"
] | null | null | null | defmodule Membrane.FFmpeg.VideoFilter.BundlexProject do
use Bundlex.Project
def project do
[
natives: natives()
]
end
defp natives() do
[
text_overlay: [
interface: :nif,
sources: ["text_overlay.c"],
pkg_configs: ["libavutil", "libavfilter"],
preprocesso... | 16.857143 | 55 | 0.587571 |
e979f15252be7cfae004aa24155b57c1445762a9 | 12,150 | exs | Elixir | test/plausible_web/controllers/api/external_controller_test.exs | samuel-p/analytics | 5d35bab9c6c2aafc556659f64e4213848a37ed8a | [
"MIT"
] | 2 | 2020-05-16T13:48:44.000Z | 2020-05-22T09:52:36.000Z | test/plausible_web/controllers/api/external_controller_test.exs | samuel-p/analytics | 5d35bab9c6c2aafc556659f64e4213848a37ed8a | [
"MIT"
] | null | null | null | test/plausible_web/controllers/api/external_controller_test.exs | samuel-p/analytics | 5d35bab9c6c2aafc556659f64e4213848a37ed8a | [
"MIT"
] | null | null | null | defmodule PlausibleWeb.Api.ExternalControllerTest do
use PlausibleWeb.ConnCase
use Plausible.Repo
defp get_event(domain) do
Plausible.Event.WriteBuffer.flush()
events =
Plausible.Clickhouse.all(
from e in Plausible.ClickhouseEvent,
where: e.domain == ^domain,
order_by: ... | 28.859857 | 137 | 0.587737 |
e97a1084e65915bfc6c32b902e2c7dd621b42004 | 3,117 | ex | Elixir | lib/tresmid/config.ex | kennethpjdyer/tresmid | 220a18b509fc3ce0911e6db3e18c0861cac5b099 | [
"BSD-3-Clause"
] | null | null | null | lib/tresmid/config.ex | kennethpjdyer/tresmid | 220a18b509fc3ce0911e6db3e18c0861cac5b099 | [
"BSD-3-Clause"
] | null | null | null | lib/tresmid/config.ex | kennethpjdyer/tresmid | 220a18b509fc3ce0911e6db3e18c0861cac5b099 | [
"BSD-3-Clause"
] | null | null | null | defmodule Tresmid.Config do
require Logger
use GenServer
@moduledoc """
Stores and provides configuration data to other processes.
"""
@moduledoc since: "0.1.0"
############################# SERVER IMPLEMENTATION ##########################
@doc false
@impl true
def init(config) do
{:ok, conf... | 21.204082 | 82 | 0.578762 |
e97a2e0967bd35ec9ee46c0a882b36199c57c4f1 | 2,982 | ex | Elixir | lib/helpers.ex | inkuzmin/aea | 0a1ed9c6c0fe74b96a6a1c71974b1f50497f6657 | [
"BSD-3-Clause"
] | null | null | null | lib/helpers.ex | inkuzmin/aea | 0a1ed9c6c0fe74b96a6a1c71974b1f50497f6657 | [
"BSD-3-Clause"
] | null | null | null | lib/helpers.ex | inkuzmin/aea | 0a1ed9c6c0fe74b96a6a1c71974b1f50497f6657 | [
"BSD-3-Clause"
] | null | null | null | defmodule AEA.Helpers do
def get_ets_keys_lazy(table_name) when is_atom(table_name) do
eot = :"$end_of_table"
Stream.resource(
fn -> [] end,
fn acc ->
case acc do
[] ->
case :ets.first(table_name) do
... | 25.930435 | 82 | 0.476526 |
e97a4a161c20ead0604ae249bade1af92f67c7e1 | 1,240 | ex | Elixir | web/views/error_helpers.ex | KazuCocoa/web_qa | cd0074e950ef354eeafb7d48db685c82d653cc60 | [
"MIT"
] | null | null | null | web/views/error_helpers.ex | KazuCocoa/web_qa | cd0074e950ef354eeafb7d48db685c82d653cc60 | [
"MIT"
] | null | null | null | web/views/error_helpers.ex | KazuCocoa/web_qa | cd0074e950ef354eeafb7d48db685c82d653cc60 | [
"MIT"
] | null | null | null | defmodule WebQaVote.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
error = form.errors[field]
if error do
content_tag :span, translate_err... | 31 | 75 | 0.670968 |
e97a7f10f0847af3d176c4521438f7445f29610b | 2,937 | exs | Elixir | example/config/config.exs | ringvold/kiosk_system_rpi3 | 0fd464a4743d6de2eae757df11f60254b66fa6b2 | [
"Apache-2.0"
] | null | null | null | example/config/config.exs | ringvold/kiosk_system_rpi3 | 0fd464a4743d6de2eae757df11f60254b66fa6b2 | [
"Apache-2.0"
] | null | null | null | example/config/config.exs | ringvold/kiosk_system_rpi3 | 0fd464a4743d6de2eae757df11f60254b66fa6b2 | [
"Apache-2.0"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
use Mix.Config
# Customize non-Elixir parts of the firmware. See
# https://hexdocs.pm/nerves/advance... | 30.915789 | 77 | 0.736806 |
e97aa898d959f817753ed3458bca80b3e2b3fdf5 | 9,520 | ex | Elixir | lib/logger_graylog_backend/tcp.ex | rranelli/logger_graylog_backend | d2b0abae68190a0a95ef219fda8282ef02608605 | [
"Apache-2.0"
] | null | null | null | lib/logger_graylog_backend/tcp.ex | rranelli/logger_graylog_backend | d2b0abae68190a0a95ef219fda8282ef02608605 | [
"Apache-2.0"
] | null | null | null | lib/logger_graylog_backend/tcp.ex | rranelli/logger_graylog_backend | d2b0abae68190a0a95ef219fda8282ef02608605 | [
"Apache-2.0"
] | null | null | null | defmodule LoggerGraylogBackend.Tcp do
@moduledoc false
require Logger
alias LoggerGraylogBackend.GelfFormatter, as: Formatter
@behaviour :gen_event
defstruct [
:host,
:port,
:gelf_host,
:backoff,
socket: :disconnected,
level: :info,
metadata_filter: [],
include_timestamp: t... | 27.514451 | 99 | 0.609349 |
e97ad23f3d30390d4208abc73c9d3abf41c8594f | 16,970 | ex | Elixir | lib/iex/lib/iex/autocomplete.ex | gsarwate/elixir | df65074a8143cebec810dfb91cafa43f19dcdbaf | [
"Apache-2.0"
] | null | null | null | lib/iex/lib/iex/autocomplete.ex | gsarwate/elixir | df65074a8143cebec810dfb91cafa43f19dcdbaf | [
"Apache-2.0"
] | null | null | null | lib/iex/lib/iex/autocomplete.ex | gsarwate/elixir | df65074a8143cebec810dfb91cafa43f19dcdbaf | [
"Apache-2.0"
] | null | null | null | defmodule IEx.Autocomplete do
@moduledoc false
@doc """
Provides one helper function that is injected into connecting
remote nodes to properly handle autocompletion.
"""
def remsh(node) do
fn e ->
case :rpc.call(node, IEx.Autocomplete, :expand, [e, IEx.Broker.shell()]) do
{:badrpc, _} -> ... | 27.108626 | 95 | 0.60878 |
e97ae9d677b59674fecb9ba49430769b80412fd3 | 813 | exs | Elixir | apps/buzzcms/priv/repo/migrations/20200315033716_add_forms.exs | buzzcms/buzzcms | 8ca8e6dea381350f94cc4a666448b5dba6676520 | [
"Apache-2.0"
] | null | null | null | apps/buzzcms/priv/repo/migrations/20200315033716_add_forms.exs | buzzcms/buzzcms | 8ca8e6dea381350f94cc4a666448b5dba6676520 | [
"Apache-2.0"
] | 41 | 2020-02-12T07:53:14.000Z | 2020-03-30T02:18:14.000Z | apps/buzzcms/priv/repo/migrations/20200315033716_add_forms.exs | buzzcms/buzzcms | 8ca8e6dea381350f94cc4a666448b5dba6676520 | [
"Apache-2.0"
] | null | null | null | defmodule Buzzcms.Repo.Migrations.AddForms do
use Buzzcms.Migration
def change do
create table(:form) do
add :code, :string, null: false
add :display_name, :string, null: false
add :note, :string
add :data, :jsonb, default: "{}", null: false
add :created_at, :utc_datetime, null: f... | 29.035714 | 77 | 0.627306 |
e97aef9b6e2b462858b93621412e37ffb5d358ea | 7,778 | exs | Elixir | test/esme/sync_test.exs | sasa1977/smppex | 21bc56e433b3c6fb0becddb5fbbe06edcedc40c2 | [
"MIT"
] | null | null | null | test/esme/sync_test.exs | sasa1977/smppex | 21bc56e433b3c6fb0becddb5fbbe06edcedc40c2 | [
"MIT"
] | null | null | null | test/esme/sync_test.exs | sasa1977/smppex | 21bc56e433b3c6fb0becddb5fbbe06edcedc40c2 | [
"MIT"
] | null | null | null | defmodule SMPPEX.ESME.SyncTest do
use ExUnit.Case
alias :timer, as: Timer
alias SMPPEX.Session
alias SMPPEX.MC
alias SMPPEX.Pdu
alias SMPPEX.ESME.Sync, as: ESMESync
setup do
{:ok, callback_agent} = Agent.start_link(fn -> [] end)
callbacks = fn ->
Agent.get(
callback_agent,
... | 20.6313 | 96 | 0.550141 |
e97afae1cbafb8be466e21548ebda68ea6bcb26f | 1,986 | ex | Elixir | clients/document_ai/lib/google_api/document_ai/v1beta2/model/google_cloud_documentai_uiv1beta3_evaluate_processor_version_metadata.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-10-01T09:20:41.000Z | 2021-10-01T09:20:41.000Z | clients/document_ai/lib/google_api/document_ai/v1beta2/model/google_cloud_documentai_uiv1beta3_evaluate_processor_version_metadata.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/document_ai/lib/google_api/document_ai/v1beta2/model/google_cloud_documentai_uiv1beta3_evaluate_processor_version_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... | 34.241379 | 195 | 0.772407 |
e97b0eb83b2aa61fe6656d361648937e39e88be0 | 2,932 | ex | Elixir | lib/pow/plug/base.ex | abartier/pow | 58a3d082da093e2dc7f07825a950ee133204813f | [
"Unlicense",
"MIT"
] | null | null | null | lib/pow/plug/base.ex | abartier/pow | 58a3d082da093e2dc7f07825a950ee133204813f | [
"Unlicense",
"MIT"
] | null | null | null | lib/pow/plug/base.ex | abartier/pow | 58a3d082da093e2dc7f07825a950ee133204813f | [
"Unlicense",
"MIT"
] | null | null | null | defmodule Pow.Plug.Base do
@moduledoc """
This plug macro will set `:pow_config` as private, and attempt to fetch and
assign a user in the connection if it has not already been assigned. The user
will be assigned automatically in any of the operations.
## Example
defmodule MyAppWeb.Pow.CustomPlug do
... | 27.660377 | 102 | 0.601978 |
e97b23d8ee3a6cde10cfd9e18ace52260edadd0a | 2,357 | ex | Elixir | clients/analytics_data/lib/google_api/analytics_data/v1alpha/model/row.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/analytics_data/lib/google_api/analytics_data/v1alpha/model/row.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/analytics_data/lib/google_api/analytics_data/v1alpha/model/row.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... | 47.14 | 388 | 0.746712 |
e97b2c85dff3db044e7ad693572da170bcd7626a | 3,645 | ex | Elixir | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1p3beta1_object_tracking_annotation.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1p3beta1_object_tracking_annotation.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1p3beta1_object_tracking_annotation.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... | 41.896552 | 379 | 0.761591 |
e97b3659b6a3aa37a0174b6d8870c0521ff3876a | 1,189 | ex | Elixir | lib/spandex_otlp/opentelemetry/proto/collector/trace/v1/trace_service.pb.ex | fr0stbyte/spandex_otlp | 5c311939c4035ea094cb7c22c96522e2bf08ba42 | [
"MIT"
] | 2 | 2021-05-24T16:34:13.000Z | 2021-05-25T06:14:54.000Z | lib/spandex_otlp/opentelemetry/proto/collector/trace/v1/trace_service.pb.ex | fr0stbyte/spandex_otlp | 5c311939c4035ea094cb7c22c96522e2bf08ba42 | [
"MIT"
] | 5 | 2021-05-22T19:30:03.000Z | 2021-05-25T03:01:10.000Z | lib/spandex_otlp/opentelemetry/proto/collector/trace/v1/trace_service.pb.ex | fr0stbyte/spandex_otlp | 5c311939c4035ea094cb7c22c96522e2bf08ba42 | [
"MIT"
] | 3 | 2021-05-25T06:15:00.000Z | 2022-01-28T18:58:59.000Z | defmodule SpandexOTLP.Opentelemetry.Proto.Collector.Trace.V1.ExportTraceServiceRequest do
@moduledoc false
use Protobuf, syntax: :proto3
@type t :: %__MODULE__{
resource_spans: [SpandexOTLP.Opentelemetry.Proto.Trace.V1.ResourceSpans.t()]
}
defstruct [:resource_spans]
field(:resource_spans,... | 30.487179 | 97 | 0.783011 |
e97b3bb41ae0278d38a5dadb9bf5b8eede5a8ba2 | 2,853 | ex | Elixir | clients/vault/lib/google_api/vault/v1/model/export_options.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/vault/lib/google_api/vault/v1/model/export_options.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/vault/lib/google_api/vault/v1/model/export_options.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"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... | 46.016129 | 155 | 0.730459 |
e97b48b7cc98ac6e5b0a6d9629d410b898a8a0a6 | 2,098 | ex | Elixir | lib/elm_phoenix_web_socket_example_web.ex | phollyer/elm-phoenix-websocket-example | 147da038b5ca4f9304924124c546284f12ecfaa8 | [
"BSD-3-Clause"
] | null | null | null | lib/elm_phoenix_web_socket_example_web.ex | phollyer/elm-phoenix-websocket-example | 147da038b5ca4f9304924124c546284f12ecfaa8 | [
"BSD-3-Clause"
] | 2 | 2020-12-29T15:13:39.000Z | 2020-12-30T01:01:02.000Z | lib/elm_phoenix_web_socket_example_web.ex | phollyer/elm-phoenix-websocket-example | 147da038b5ca4f9304924124c546284f12ecfaa8 | [
"BSD-3-Clause"
] | null | null | null | defmodule ElmPhoenixWebSocketExampleWeb 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 ElmPhoenixWebSocketExampleWeb, :controller
use ElmPhoenixWebSocketExampleWeb, :view
The definiti... | 25.901235 | 83 | 0.722116 |
e97b7cd2b0780d306e52e576a575348d5bec3ec0 | 828 | exs | Elixir | apps/andi/config/test.exs | msomji/smartcitiesdata | fc96abc1ef1306f7af6bd42bbcb4ed041a6d922c | [
"Apache-2.0"
] | null | null | null | apps/andi/config/test.exs | msomji/smartcitiesdata | fc96abc1ef1306f7af6bd42bbcb4ed041a6d922c | [
"Apache-2.0"
] | null | null | null | apps/andi/config/test.exs | msomji/smartcitiesdata | fc96abc1ef1306f7af6bd42bbcb4ed041a6d922c | [
"Apache-2.0"
] | null | null | null | use Mix.Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :andi, AndiWeb.Endpoint,
http: [port: 4002],
server: false,
live_view: [
signing_salt: "CHANGEME?"
]
# Print only warnings and errors during test
config :logger, level: :warn
config :a... | 21.789474 | 56 | 0.69686 |
e97b7dc84022c9c3e2bf134f3d0fc647e477ff24 | 853 | exs | Elixir | test/imagineer/image/png/pngsuite/ancillary/physical_pixel_dimensions_test.exs | ndemonner/imagineer | a6872296756cde19f8f575a7d1854d0fe7cbcb02 | [
"MIT"
] | 103 | 2015-01-28T19:09:42.000Z | 2018-10-22T15:05:46.000Z | test/imagineer/image/png/pngsuite/ancillary/physical_pixel_dimensions_test.exs | tyre/imagineer | a6872296756cde19f8f575a7d1854d0fe7cbcb02 | [
"MIT"
] | 12 | 2015-07-11T05:12:41.000Z | 2018-07-21T04:42:47.000Z | test/imagineer/image/png/pngsuite/ancillary/physical_pixel_dimensions_test.exs | ndemonner/imagineer | a6872296756cde19f8f575a7d1854d0fe7cbcb02 | [
"MIT"
] | 18 | 2015-06-16T15:48:34.000Z | 2018-06-22T02:34:40.000Z | defmodule Imagineer.Image.PNG.PngSuite.Ancillary.PhysicalPixelDimensionsTest do
use ExUnit.Case, async: true
@test_path "test/support/images/pngsuite/ancillary/"
test "8 by 32 horizontal image" do
{:ok, image} = Imagineer.load(@test_path <> "cdfn2c08.png")
assert image.attributes.pixel_dimensions == {1... | 28.433333 | 79 | 0.692849 |
e97b9ca6dbb09efda624716eade98c637eb83c98 | 1,828 | ex | Elixir | clients/vision/lib/google_api/vision/v1/model/google_cloud_vision_v1p1beta1_position.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/vision/lib/google_api/vision/v1/model/google_cloud_vision_v1p1beta1_position.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/vision/lib/google_api/vision/v1/model/google_cloud_vision_v1p1beta1_position.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... | 33.851852 | 197 | 0.727024 |
e97bd3419098b3744940a96349b375dd367222e8 | 1,049 | exs | Elixir | test/plug/builder_test.exs | falood/plug | 6022465ed2e44cf092d16ae3d564648615eab87b | [
"Apache-2.0"
] | null | null | null | test/plug/builder_test.exs | falood/plug | 6022465ed2e44cf092d16ae3d564648615eab87b | [
"Apache-2.0"
] | null | null | null | test/plug/builder_test.exs | falood/plug | 6022465ed2e44cf092d16ae3d564648615eab87b | [
"Apache-2.0"
] | 1 | 2020-12-07T08:04:20.000Z | 2020-12-07T08:04:20.000Z | defmodule Plug.BuilderTest do
import Plug.Conn
defmodule Wrapper do
def init(val) do
{:init, val}
end
def wrap(conn, opts, fun) do
stack = [{:wrap, opts}|conn.assigns[:stack]]
fun.(assign(conn, :stack, stack))
end
end
defmodule Module do
def init(val) do
{:init, ... | 20.173077 | 67 | 0.582459 |
e97c2910ad8ad758e2d8749ee8d4ab7c6c791279 | 1,398 | ex | Elixir | test/support/data_case.ex | Yathi/emc-backend-phoenix | a14cfb38a2b698bc5bd7107a6466383a7b91053a | [
"MIT"
] | null | null | null | test/support/data_case.ex | Yathi/emc-backend-phoenix | a14cfb38a2b698bc5bd7107a6466383a7b91053a | [
"MIT"
] | null | null | null | test/support/data_case.ex | Yathi/emc-backend-phoenix | a14cfb38a2b698bc5bd7107a6466383a7b91053a | [
"MIT"
] | null | null | null | defmodule EmcBackend.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 t... | 25.888889 | 77 | 0.683119 |
e97c66615c441e9fd042527527fd12b3bc39c45d | 21,802 | exs | Elixir | lib/elixir/test/elixir/string_test.exs | hamiltop/elixir | 3b601660d4d4eb0c69f824fcebbbe93a3f2ba463 | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/string_test.exs | hamiltop/elixir | 3b601660d4d4eb0c69f824fcebbbe93a3f2ba463 | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/string_test.exs | hamiltop/elixir | 3b601660d4d4eb0c69f824fcebbbe93a3f2ba463 | [
"Apache-2.0"
] | null | null | null | Code.require_file "test_helper.exs", __DIR__
defmodule StringTest do
use ExUnit.Case, async: true
doctest String
test "next codepoint" do
assert String.next_codepoint("ésoj") == {"é", "soj"}
assert String.next_codepoint(<<255>>) == {<<255>>, ""}
assert String.next_codepoint("") == nil
end
# te... | 40.827715 | 211 | 0.561325 |
e97cc2a833a4b9b137827636a1c702f8c8477cab | 101 | ex | Elixir | testData/org/elixir_lang/parser_definition/matched_relational_operation_parsing_test_case/MatchedMultiplicationOperation.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_relational_operation_parsing_test_case/MatchedMultiplicationOperation.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_relational_operation_parsing_test_case/MatchedMultiplicationOperation.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 145 | 2015-01-15T11:37:16.000Z | 2021-12-22T05:51:02.000Z | one * two < three / four
one * two > three / four
one * two <= three / four
one * two >= three / four | 25.25 | 25 | 0.594059 |
e97cccca35cf0fac29e8426a23e659c5d64ab605 | 795 | exs | Elixir | test/integration/trigger_event_test.exs | pkdcryptos/edgurgel-poxa | d99fbd3ac54317a180349ee91d8e20cdc8270a63 | [
"MIT"
] | null | null | null | test/integration/trigger_event_test.exs | pkdcryptos/edgurgel-poxa | d99fbd3ac54317a180349ee91d8e20cdc8270a63 | [
"MIT"
] | null | null | null | test/integration/trigger_event_test.exs | pkdcryptos/edgurgel-poxa | d99fbd3ac54317a180349ee91d8e20cdc8270a63 | [
"MIT"
] | null | null | null | defmodule Poxa.Integration.TriggerEvent do
use ExUnit.Case
@moduletag :integration
setup_all do
Application.ensure_all_started(:pusher)
Pusher.configure!("localhost", 8080, "app_id", "app_key", "secret")
:ok
end
test "trigger event returns 200" do
[channel, socket_id] = ["channel", "123.456... | 26.5 | 74 | 0.679245 |
e97ce48c58aed42ac33163cdb712d621b0271e84 | 44 | ex | Elixir | testData/org/elixir_lang/parser_definition/matched_qualified_multiple_aliases_parsing_test_case/DecimalFloat.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/DecimalFloat.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/DecimalFloat.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 145 | 2015-01-15T11:37:16.000Z | 2021-12-22T05:51:02.000Z | 1.2e-3.{}
1.2e-3.{Four}
1.2e-3.{Four, Five}
| 11 | 19 | 0.545455 |
e97d11fd823ebdad0ba9bd864bbdc04231bde454 | 11,307 | ex | Elixir | lib/mail/message.ex | primeminddigital/elixir-mail | d3713d630aebc222a14628249d5b708fb163412c | [
"MIT"
] | null | null | null | lib/mail/message.ex | primeminddigital/elixir-mail | d3713d630aebc222a14628249d5b708fb163412c | [
"MIT"
] | 29 | 2020-06-07T11:50:37.000Z | 2022-03-24T19:02:05.000Z | lib/mail/message.ex | primeminddigital/elixir-mail | d3713d630aebc222a14628249d5b708fb163412c | [
"MIT"
] | null | null | null | defmodule Mail.Message do
defstruct headers: %{},
body: nil,
parts: [],
multipart: false
@doc """
Add new part
Mail.Message.put_part(%Mail.Message{}, %Mail.Message{})
"""
def put_part(message, %Mail.Message{} = part) do
put_in(message.parts, message.parts ++ [pa... | 32.031161 | 215 | 0.675953 |
e97d1b03ef16c311a37d4a988f575f26fc644c90 | 675 | exs | Elixir | apps/nectar/priv/repo/seeds.exs | saurabharch/nectarcommerce | 3497ab8f0c3fcf5a679dc112d905fea9e6df45ac | [
"MIT"
] | 356 | 2016-03-16T12:37:28.000Z | 2021-12-18T03:22:39.000Z | apps/nectar/priv/repo/seeds.exs | sshyran/elixir-nectar-commerce | 87f846ef1bc5cd2d675165b468ae7014dd4fe354 | [
"MIT"
] | 30 | 2016-03-16T09:19:10.000Z | 2021-01-12T08:10:52.000Z | apps/nectar/priv/repo/seeds.exs | sshyran/nectarcommerce | 3497ab8f0c3fcf5a679dc112d905fea9e6df45ac | [
"MIT"
] | 72 | 2016-03-16T13:32:14.000Z | 2021-03-23T11:27:43.000Z | # Script for populating the database. You can run it as:
#
# mix run priv/repo/seeds.exs
#
# Inside the script, you can read and write to any of your
# repositories directly:
#
# Nectar.Repo.insert!(%Nectar.SomeModel{})
#
# We recommend using the bang functions (`insert!`, `update!`
# and so on) as they will fa... | 33.75 | 149 | 0.752593 |
e97d4eb51be5d7c7aa28294c8c9c3b2b9bc2e5fe | 1,079 | ex | Elixir | phoenix/pfu/lib/pfu_web/channels/user_socket.ex | cenezaraujo/unifor_prog_funcional | 08b5d75c535b10b7dca8ac26efc1dba14fe2a4f1 | [
"Apache-2.0"
] | null | null | null | phoenix/pfu/lib/pfu_web/channels/user_socket.ex | cenezaraujo/unifor_prog_funcional | 08b5d75c535b10b7dca8ac26efc1dba14fe2a4f1 | [
"Apache-2.0"
] | null | null | null | phoenix/pfu/lib/pfu_web/channels/user_socket.ex | cenezaraujo/unifor_prog_funcional | 08b5d75c535b10b7dca8ac26efc1dba14fe2a4f1 | [
"Apache-2.0"
] | null | null | null | defmodule PfuWeb.UserSocket do
use Phoenix.Socket
## Channels
# channel "room:*", PfuWeb.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 channels, ie
... | 29.972222 | 83 | 0.691381 |
e97d58d4546d52c8d9a4d1a50576f4844f2a7ed3 | 1,677 | ex | Elixir | clients/sheets/lib/google_api/sheets/v4/model/update_embedded_object_position_response.ex | nuxlli/elixir-google-api | ecb8679ac7282b7dd314c3e20c250710ec6a7870 | [
"Apache-2.0"
] | null | null | null | clients/sheets/lib/google_api/sheets/v4/model/update_embedded_object_position_response.ex | nuxlli/elixir-google-api | ecb8679ac7282b7dd314c3e20c250710ec6a7870 | [
"Apache-2.0"
] | null | null | null | clients/sheets/lib/google_api/sheets/v4/model/update_embedded_object_position_response.ex | nuxlli/elixir-google-api | ecb8679ac7282b7dd314c3e20c250710ec6a7870 | [
"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... | 34.9375 | 100 | 0.765653 |
e97d5ec750f024ef26602980d091f77cfaf19da4 | 549 | ex | Elixir | lib/phoenix_postman_web/views/error_view.ex | gVirtu/phoenix-postman | 526cbb44ae2779b2ab06ee8437258a24bdf9e43b | [
"MIT"
] | null | null | null | lib/phoenix_postman_web/views/error_view.ex | gVirtu/phoenix-postman | 526cbb44ae2779b2ab06ee8437258a24bdf9e43b | [
"MIT"
] | null | null | null | lib/phoenix_postman_web/views/error_view.ex | gVirtu/phoenix-postman | 526cbb44ae2779b2ab06ee8437258a24bdf9e43b | [
"MIT"
] | null | null | null | defmodule PhoenixPostmanWeb.ErrorView do
use PhoenixPostmanWeb, :view
# If you want to customize a particular status code
# for a certain format, you may uncomment below.
# def render("500.json", _assigns) do
# %{errors: %{detail: "Internal Server Error"}}
# end
# By default, Phoenix returns the statu... | 32.294118 | 83 | 0.726776 |
e97d8ddde3b51f10bef0cc6a96f54b9758c02fe9 | 7,602 | ex | Elixir | server/lib/realtime/rls/subscriptions/subscriptions.ex | Omneedia/realtime | 90a72170aa1502e211c9f5cbf638c60add6faaf6 | [
"Apache-2.0"
] | null | null | null | server/lib/realtime/rls/subscriptions/subscriptions.ex | Omneedia/realtime | 90a72170aa1502e211c9f5cbf638c60add6faaf6 | [
"Apache-2.0"
] | null | null | null | server/lib/realtime/rls/subscriptions/subscriptions.ex | Omneedia/realtime | 90a72170aa1502e211c9f5cbf638c60add6faaf6 | [
"Apache-2.0"
] | null | null | null | defmodule Realtime.RLS.Subscriptions do
import Ecto.Query, only: [from: 2]
alias Ecto.{Changeset, Multi}
alias Realtime.RLS.Repo
alias Realtime.RLS.Subscriptions.Subscription
@spec create_topic_subscriber(%{topic: String.t(), user_id: Ecto.UUID.raw(), email: String.t()}) ::
{:ok, term()} | {:error... | 32.348936 | 101 | 0.386083 |
e97db1b0faa3e27edf35c591202d80bf8e475941 | 557 | exs | Elixir | priv/repo/migrations/20220204073210_create_tracker_entries_and_assoc_food_entries.exs | charl3sj/dutu | dbc56c863f5874137175ba4ede34f3ff69a004a6 | [
"MIT"
] | null | null | null | priv/repo/migrations/20220204073210_create_tracker_entries_and_assoc_food_entries.exs | charl3sj/dutu | dbc56c863f5874137175ba4ede34f3ff69a004a6 | [
"MIT"
] | null | null | null | priv/repo/migrations/20220204073210_create_tracker_entries_and_assoc_food_entries.exs | charl3sj/dutu | dbc56c863f5874137175ba4ede34f3ff69a004a6 | [
"MIT"
] | null | null | null | defmodule Dutu.Repo.Migrations.CreateMealLogs do
use Ecto.Migration
def change do
create table(:tracker_entries) do
add :meal_time, :naive_datetime, null: false
timestamps()
end
create table(:tracker_entries_foods, primary_key: false) do
add :entry_id, references(:tracker_entries, on... | 29.315789 | 86 | 0.719928 |
e97dce1e89234ca0fd7a264f84d5a0d3ece546c1 | 2,430 | ex | Elixir | lib/brando.ex | brandocms/brando | 4198e0c0920031bd909969055064e4e2b7230d21 | [
"MIT"
] | 4 | 2020-10-30T08:40:38.000Z | 2022-01-07T22:21:37.000Z | lib/brando.ex | brandocms/brando | 4198e0c0920031bd909969055064e4e2b7230d21 | [
"MIT"
] | 1,162 | 2020-07-05T11:20:15.000Z | 2022-03-31T06:01:49.000Z | lib/brando.ex | brandocms/brando | 4198e0c0920031bd909969055064e4e2b7230d21 | [
"MIT"
] | null | null | null | defmodule Brando do
@moduledoc File.read!("README.md")
@version Mix.Project.config()[:version]
@doc """
Start supervisor
"""
def start_link(opts), do: Brando.Supervisor.start_link(opts)
def child_spec(opts) do
%{
id: __MODULE__,
start: {__MODULE__, :start_link, [opts]},
type: :work... | 20.769231 | 76 | 0.650617 |
e97df3b35f59c8eb3dc699aad20c13c47128430f | 1,763 | ex | Elixir | apps/omg_utils/lib/omg_utils/http_rpc/encoding.ex | omisego/elixir-omg | 2c68973d8f29033d137f63a6e060f12e2a7dcd59 | [
"Apache-2.0"
] | 177 | 2018-08-24T03:51:02.000Z | 2020-05-30T13:29:25.000Z | apps/omg_utils/lib/omg_utils/http_rpc/encoding.ex | omisego/elixir-omg | 2c68973d8f29033d137f63a6e060f12e2a7dcd59 | [
"Apache-2.0"
] | 1,042 | 2018-08-25T00:52:39.000Z | 2020-06-01T05:15:17.000Z | apps/omg_utils/lib/omg_utils/http_rpc/encoding.ex | omisego/elixir-omg | 2c68973d8f29033d137f63a6e060f12e2a7dcd59 | [
"Apache-2.0"
] | 47 | 2018-08-24T12:06:33.000Z | 2020-04-28T11:49:25.000Z | # Copyright 2019-2020 OMG Network 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... | 41.97619 | 83 | 0.712989 |
e97e6f08994f396564e5a43dc666667b035b0730 | 4,091 | exs | Elixir | test/drip_test_next.exs | lud/ark | 672ee65baf06e6c323a8580f24f699f1495a886e | [
"MIT"
] | null | null | null | test/drip_test_next.exs | lud/ark | 672ee65baf06e6c323a8580f24f699f1495a886e | [
"MIT"
] | null | null | null | test/drip_test_next.exs | lud/ark | 672ee65baf06e6c323a8580f24f699f1495a886e | [
"MIT"
] | null | null | null | defmodule Ark.DripTest do
use ExUnit.Case, async: true
alias Ark.DripNext, as: Drip
defmodule H do
def task(drip, id) do
Task.async(fn ->
:ok = Drip.await(drip)
IO.puts("drop [#{id}] #{inspect(self())} #{:erlang.system_time(:second)}")
end)
end
def task_timeout(drip, id, ... | 29.861314 | 84 | 0.595209 |
e97e7711e742d45a9f3335bbe10f5e3492e5737c | 9,782 | ex | Elixir | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v14/api/marketplacedeals.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v14/api/marketplacedeals.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v14/api/marketplacedeals.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... | 38.360784 | 170 | 0.676651 |
e97e7945162005601589b13ba7eb568b03cdd061 | 547 | ex | Elixir | apps/socket/lib/grapevine_socket/pub_sub.ex | oestrich/grapevine | 7fb745a3a6e4eb68bd761baa190b2df32fa1f73d | [
"MIT"
] | 107 | 2018-10-05T18:20:32.000Z | 2022-02-28T04:02:50.000Z | apps/socket/lib/grapevine_socket/pub_sub.ex | oestrich/grapevine | 7fb745a3a6e4eb68bd761baa190b2df32fa1f73d | [
"MIT"
] | 33 | 2018-10-05T14:11:18.000Z | 2022-02-10T22:19:18.000Z | apps/socket/lib/grapevine_socket/pub_sub.ex | oestrich/grapevine | 7fb745a3a6e4eb68bd761baa190b2df32fa1f73d | [
"MIT"
] | 18 | 2019-02-03T03:08:20.000Z | 2021-12-28T04:29:36.000Z | defmodule GrapevineSocket.PubSub do
@moduledoc """
Phoenix pubsub setup
"""
@doc """
Publish to the local phoenix channels layer
"""
def broadcast(topic, event, payload) do
Phoenix.PubSub.broadcast(Grapevine.PubSub, topic, %{
__struct__: Phoenix.Socket.Broadcast,
topic: topic,
event... | 21.038462 | 56 | 0.687386 |
e97e978f364f28f9cbcee92fc258be818802023b | 4,504 | ex | Elixir | lib/ecto/pools/poolboy/worker.ex | photomattmills/ecto | ad3a455aa3d5e4f932a5bb8ae1590b21d95cce54 | [
"Apache-2.0"
] | null | null | null | lib/ecto/pools/poolboy/worker.ex | photomattmills/ecto | ad3a455aa3d5e4f932a5bb8ae1590b21d95cce54 | [
"Apache-2.0"
] | null | null | null | lib/ecto/pools/poolboy/worker.ex | photomattmills/ecto | ad3a455aa3d5e4f932a5bb8ae1590b21d95cce54 | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.Pools.Poolboy.Worker do
@moduledoc false
use GenServer
require Logger
alias Ecto.Adapters.Connection
@type modconn :: {module :: atom, conn :: pid}
@spec start_link({module, Keyword.t}) :: {:ok, pid}
def start_link({module, params}) do
GenServer.start_link(__MODULE__, {module, params... | 25.590909 | 86 | 0.624112 |
e97eb6494daf881c531182a9ff7837143ae739c9 | 577 | ex | Elixir | lib/squarestore/Identity/adress.ex | NinjaAnge/forksquare | ee9ea91e45e50b9f1ba4a8261ebdd99b7fe3333d | [
"MIT"
] | null | null | null | lib/squarestore/Identity/adress.ex | NinjaAnge/forksquare | ee9ea91e45e50b9f1ba4a8261ebdd99b7fe3333d | [
"MIT"
] | null | null | null | lib/squarestore/Identity/adress.ex | NinjaAnge/forksquare | ee9ea91e45e50b9f1ba4a8261ebdd99b7fe3333d | [
"MIT"
] | null | null | null | defmodule Squarestore.Identity.Adress do
use Ecto.Schema
import Ecto.Changeset
schema "adresses" do
field :adress, :string
field :post_number, :integer
field :city, :string
field :country, :string
belongs_to :user, Squarestore.Identity.User
timestamps()
end
def changeset(adress, at... | 23.08 | 76 | 0.684575 |
e97ee7581140a49228c82d6590f1f23697c6c785 | 1,917 | ex | Elixir | lib/codes/codes_i73.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_i73.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_i73.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | defmodule IcdCode.ICDCode.Codes_I73 do
alias IcdCode.ICDCode
def _I7300 do
%ICDCode{full_code: "I7300",
category_code: "I73",
short_code: "00",
full_name: "Raynaud's syndrome without gangrene",
short_name: "Raynaud's syndrome without gangrene",
category_name: "Ra... | 31.42623 | 73 | 0.620762 |
e97ee808856fa5609073c1423a8cbab0740c7334 | 5,383 | ex | Elixir | lib/challenge_gov/message_context_statuses.ex | smartlogic/Challenge_gov | b4203d1fcfb742dd17ecfadb9e9c56ad836d4254 | [
"CC0-1.0"
] | null | null | null | lib/challenge_gov/message_context_statuses.ex | smartlogic/Challenge_gov | b4203d1fcfb742dd17ecfadb9e9c56ad836d4254 | [
"CC0-1.0"
] | null | null | null | lib/challenge_gov/message_context_statuses.ex | smartlogic/Challenge_gov | b4203d1fcfb742dd17ecfadb9e9c56ad836d4254 | [
"CC0-1.0"
] | null | null | null | defmodule ChallengeGov.MessageContextStatuses do
@moduledoc """
Context for MessageContextStatuses
"""
@behaviour Stein.Filter
import Ecto.Query
alias Ecto.Multi
alias ChallengeGov.Repo
alias ChallengeGov.Accounts
alias ChallengeGov.Challenges
alias ChallengeGov.Challenges.Challenge
alias Chall... | 26.387255 | 96 | 0.662642 |
e97f0b02a7dc89e37fd487da3bd2686320b94bfb | 1,025 | ex | Elixir | lib/bi/application.ex | xuyizhe/phoenix-sample | 9f5a79d9da13858a62d0d9316f799e8cf89d0038 | [
"MIT"
] | null | null | null | lib/bi/application.ex | xuyizhe/phoenix-sample | 9f5a79d9da13858a62d0d9316f799e8cf89d0038 | [
"MIT"
] | null | null | null | lib/bi/application.ex | xuyizhe/phoenix-sample | 9f5a79d9da13858a62d0d9316f799e8cf89d0038 | [
"MIT"
] | null | null | null | defmodule Bi.Application do
use Application
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
def start(_type, _args) do
import Supervisor.Spec
# Define workers and child supervisors to be supervised
children = [
# Start the Ecto repository
sup... | 31.060606 | 80 | 0.700488 |
e97f729cd06b5118b638336b8259471b0b1501df | 1,204 | exs | Elixir | apps/service_persist/test/persist/data_file/json_test.exs | NathanielScottStevens/hindsight | 0dda1a931cff85b62eb53d623cc59cdb970ec33a | [
"Apache-2.0"
] | null | null | null | apps/service_persist/test/persist/data_file/json_test.exs | NathanielScottStevens/hindsight | 0dda1a931cff85b62eb53d623cc59cdb970ec33a | [
"Apache-2.0"
] | null | null | null | apps/service_persist/test/persist/data_file/json_test.exs | NathanielScottStevens/hindsight | 0dda1a931cff85b62eb53d623cc59cdb970ec33a | [
"Apache-2.0"
] | null | null | null | defmodule Persist.DataFile.JsonTest do
use ExUnit.Case
test "should open write a close a json file" do
dictionary = [
Dictionary.Type.Integer.new!(name: "id"),
Dictionary.Type.String.new!(name: "name"),
Dictionary.Type.Timestamp.new!(name: "ts", format: "%Y")
]
data = [
%{"id" ... | 28 | 68 | 0.542359 |
e97f74679d4cb17cf83513287c7a915f22eb66a4 | 7,691 | ex | Elixir | backend/lib/windshield/task_votes_fork.ex | EOS-CSX/windshield-docker | 77769dfd16a0b2da09fef2a62b5d393647f0aa6b | [
"MIT"
] | 19 | 2018-06-07T23:28:34.000Z | 2019-04-23T18:57:43.000Z | backend/lib/windshield/task_votes_fork.ex | EOS-CSX/windshield-docker | 77769dfd16a0b2da09fef2a62b5d393647f0aa6b | [
"MIT"
] | 27 | 2018-06-10T14:38:55.000Z | 2018-10-10T23:28:43.000Z | backend/lib/windshield/task_votes_fork.ex | EOS-CSX/windshield-docker | 77769dfd16a0b2da09fef2a62b5d393647f0aa6b | [
"MIT"
] | 7 | 2018-06-08T01:38:46.000Z | 2022-01-12T18:25:34.000Z | defmodule Windshield.TaskVotesFork do
@moduledoc """
Task for Execution of Votes Calculations and Generation of Fork Report
"""
require Logger
alias Windshield.EosApi
alias Windshield.Node
alias Windshield.Database
alias Windshield.Alerts
def init_report(principal_node, principal_url, block_num) do... | 28.805243 | 96 | 0.581459 |
e97f772e2083a6f5de418ffd382aee9b9183c9bd | 1,106 | ex | Elixir | apps/odo/lib/odo/metrics_recorder.ex | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | 18 | 2020-11-13T15:38:24.000Z | 2021-05-26T00:40:08.000Z | apps/odo/lib/odo/metrics_recorder.ex | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | 365 | 2020-09-21T12:31:40.000Z | 2021-09-25T14:54:21.000Z | apps/odo/lib/odo/metrics_recorder.ex | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | 3 | 2020-10-06T16:17:49.000Z | 2021-09-03T17:11:41.000Z | defmodule Odo.MetricsRecorder do
@moduledoc """
Main interface for recording app metrics
"""
require Logger
def record_file_conversion_metrics(dataset_id, file_key, success, start_date_time \\ DateTime.utc_now()) do
success_value = if success, do: 1, else: 0
duration = Time.diff(DateTime.utc_now(), s... | 31.6 | 109 | 0.690778 |
e97f82b8de00c5d078b59c031941b7fb90739681 | 174 | ex | Elixir | test/fakes/comment.ex | paulhenri-l/resty | b6aec738569355bab53fbc732bfd323c63348b85 | [
"MIT"
] | 3 | 2018-11-17T11:11:47.000Z | 2019-09-13T16:13:43.000Z | test/fakes/comment.ex | paulhenri-l/resty | b6aec738569355bab53fbc732bfd323c63348b85 | [
"MIT"
] | 38 | 2018-11-11T01:28:41.000Z | 2019-04-01T21:28:02.000Z | test/fakes/comment.ex | paulhenri-l/resty | b6aec738569355bab53fbc732bfd323c63348b85 | [
"MIT"
] | 1 | 2019-01-10T12:41:48.000Z | 2019-01-10T12:41:48.000Z | defmodule Comment do
use Resty.Resource.Base
set_site "site.tld/posts/:post_id"
set_resource_path "/comments"
set_extension ".json"
define_attributes [:name]
end
| 17.4 | 36 | 0.752874 |
e97f92c913f6272207062cb6f02f66fd0f3315bc | 2,537 | ex | Elixir | lib/livebook_web/controllers/session_controller.ex | kianmeng/livebook | 8fe8d27d3d46b64d22126d1b97157330b87e611c | [
"Apache-2.0"
] | null | null | null | lib/livebook_web/controllers/session_controller.ex | kianmeng/livebook | 8fe8d27d3d46b64d22126d1b97157330b87e611c | [
"Apache-2.0"
] | null | null | null | lib/livebook_web/controllers/session_controller.ex | kianmeng/livebook | 8fe8d27d3d46b64d22126d1b97157330b87e611c | [
"Apache-2.0"
] | 1 | 2021-12-18T03:42:04.000Z | 2021-12-18T03:42:04.000Z | defmodule LivebookWeb.SessionController do
use LivebookWeb, :controller
alias Livebook.{Sessions, Session, FileSystem}
def show_image(conn, %{"id" => id, "image" => image}) do
case Sessions.fetch_session(id) do
{:ok, session} ->
file = FileSystem.File.resolve(session.images_dir, image)
... | 27.576087 | 85 | 0.643279 |
e97ff1a9ed63a5954c93f2b181a27edcef820f88 | 1,515 | ex | Elixir | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v2beta1/model/platform_context.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-10-01T09:20:41.000Z | 2021-10-01T09:20:41.000Z | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v2beta1/model/platform_context.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v2beta1/model/platform_context.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 32.234043 | 107 | 0.743894 |
e98069824668683256bd3dbd203f7f524b1fcfe8 | 251 | ex | Elixir | lib/phone/nanp/us/ut.ex | net/phone | 18e1356d2f8d32fe3f95638c3c44bceab0164fb2 | [
"Apache-2.0"
] | null | null | null | lib/phone/nanp/us/ut.ex | net/phone | 18e1356d2f8d32fe3f95638c3c44bceab0164fb2 | [
"Apache-2.0"
] | null | null | null | lib/phone/nanp/us/ut.ex | net/phone | 18e1356d2f8d32fe3f95638c3c44bceab0164fb2 | [
"Apache-2.0"
] | null | null | null | defmodule Phone.NANP.US.UT do
@moduledoc false
use Helper.Area
def regex, do: ~r/^(1)(385|435|801)([2-9].{6})$/
def area_name, do: "Utah"
def area_type, do: "state"
def area_abbreviation, do: "UT"
matcher ["1385", "1435", "1801"]
end
| 19.307692 | 50 | 0.629482 |
e9807c9b4961045ef0b4457a0c545d5ec1b80e8d | 1,373 | exs | Elixir | test/day3/squares_with_three_sides_test.exs | fboyer/advent_of_code_2016 | ffe02f093298fa60a5547dc6a9391c1acfb2b325 | [
"MIT"
] | null | null | null | test/day3/squares_with_three_sides_test.exs | fboyer/advent_of_code_2016 | ffe02f093298fa60a5547dc6a9391c1acfb2b325 | [
"MIT"
] | null | null | null | test/day3/squares_with_three_sides_test.exs | fboyer/advent_of_code_2016 | ffe02f093298fa60a5547dc6a9391c1acfb2b325 | [
"MIT"
] | null | null | null | defmodule AdventOfCode2016.SquaresWithThreeSidesTest do
use ExUnit.Case
doctest AdventOfCode2016.SquaresWithThreeSides
import AdventOfCode2016.SquaresWithThreeSides
describe "day 3 - part 1" do
test "can parse specs to integer values" do
assert parse_specs(" 5 10 25") == [5, 10, 25]
asser... | 24.517857 | 68 | 0.609614 |
e980840fee18819257da4d6c77063284da099f58 | 1,753 | ex | Elixir | clients/service_networking/lib/google_api/service_networking/v1/model/dns_zone.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/service_networking/lib/google_api/service_networking/v1/model/dns_zone.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/service_networking/lib/google_api/service_networking/v1/model/dns_zone.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... | 33.711538 | 126 | 0.719338 |
e98086591d4ab5f40d9cd19fed6c1a30b8d08295 | 241 | exs | Elixir | code/ops_chapter/src/example/dir2/.iex.exs | rhumbertgz/theBeamBook | 6f11829596470d5f786208e00fa8e576bb10f4c0 | [
"CC-BY-4.0"
] | 3,076 | 2017-04-07T09:11:50.000Z | 2022-03-29T02:44:40.000Z | code/ops_chapter/src/example/dir2/.iex.exs | rhumbertgz/theBeamBook | 6f11829596470d5f786208e00fa8e576bb10f4c0 | [
"CC-BY-4.0"
] | 105 | 2017-04-07T11:50:10.000Z | 2022-01-30T05:30:31.000Z | code/ops_chapter/src/example/dir2/.iex.exs | rhumbertgz/theBeamBook | 6f11829596470d5f786208e00fa8e576bb10f4c0 | [
"CC-BY-4.0"
] | 258 | 2017-04-07T11:13:00.000Z | 2022-02-12T14:15:38.000Z | IO.puts "iEx starting in "
pwd()
IO.puts "iEx starting on "
IO.puts Node.self
IEx.configure(
colors: [enabled: true],
alive_prompt: [
"\e[G",
"(%node)",
"%prefix",
"<d2>",
] |> IO.ANSI.format |> IO.chardata_to_string
) | 17.214286 | 46 | 0.589212 |
e980ebd6eb0a85032d33d0015d44a061a1a33072 | 4,175 | ex | Elixir | clients/pub_sub/lib/google_api/pub_sub/v1/model/binding.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | 1 | 2021-10-01T09:20:41.000Z | 2021-10-01T09:20:41.000Z | clients/pub_sub/lib/google_api/pub_sub/v1/model/binding.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/pub_sub/lib/google_api/pub_sub/v1/model/binding.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"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... | 78.773585 | 1,972 | 0.749461 |
e980f49fec97f0b02e2a49ad814ec6186c8fc168 | 982 | ex | Elixir | lib/eurexa/eurexa_v1.ex | CatCalZone/eurexa | d428d57ed66a7ec58e42eefefd85d1e61f33ea80 | [
"Apache-2.0"
] | 6 | 2015-11-29T22:59:30.000Z | 2020-02-27T11:41:54.000Z | lib/eurexa/eurexa_v1.ex | CatCalZone/eurexa | d428d57ed66a7ec58e42eefefd85d1e61f33ea80 | [
"Apache-2.0"
] | 2 | 2016-01-21T12:28:57.000Z | 2016-01-21T16:07:59.000Z | lib/eurexa/eurexa_v1.ex | CatCalZone/eurexa | d428d57ed66a7ec58e42eefefd85d1e61f33ea80 | [
"Apache-2.0"
] | 2 | 2016-01-20T20:21:55.000Z | 2022-02-19T22:13:23.000Z | defmodule Eurexa.EurekaV1 do
@moduledoc """
This module implements the protocol of the Eureka version 1 interface.
"""
alias Eurexa.EurexaServer
@behaviour Eurexa.EurexaBehaviour
def send_heartbeat(eureka_base_url, app_name, hostname) do
header = [{"content-type", "application/json"}]
make_url(eureka_ba... | 28.057143 | 71 | 0.732179 |
e98113d94a7bf18691b1f5c076790ea8c153cfdc | 1,957 | ex | Elixir | clients/workflow_executions/lib/google_api/workflow_executions/v1beta/model/position.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/workflow_executions/lib/google_api/workflow_executions/v1beta/model/position.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/workflow_executions/lib/google_api/workflow_executions/v1beta/model/position.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.924528 | 151 | 0.721513 |
e9811ae9366ee3c330c2ce0d85f122a497ea55e2 | 20,601 | ex | Elixir | lib/phoenix/socket/transport.ex | achalagarwal/phoenix | 6534f05beda6696c50ca007d02c922fa168083d7 | [
"MIT"
] | 18,092 | 2015-01-01T01:51:04.000Z | 2022-03-31T19:37:14.000Z | lib/phoenix/socket/transport.ex | achalagarwal/phoenix | 6534f05beda6696c50ca007d02c922fa168083d7 | [
"MIT"
] | 3,905 | 2015-01-01T00:22:47.000Z | 2022-03-31T17:06:21.000Z | lib/phoenix/socket/transport.ex | achalagarwal/phoenix | 6534f05beda6696c50ca007d02c922fa168083d7 | [
"MIT"
] | 3,205 | 2015-01-03T10:58:22.000Z | 2022-03-30T14:55:57.000Z | defmodule Phoenix.Socket.Transport do
@moduledoc """
Outlines the Socket <-> Transport communication.
This module specifies a behaviour that all sockets must implement.
`Phoenix.Socket` is just one possible implementation of a socket
that multiplexes events over multiple channels. Developers can
implement ... | 32.9616 | 143 | 0.673948 |
e98130174b266af3e6c3ec4af055540d46fa28b6 | 3,569 | ex | Elixir | lib/pretty_print_formatter/ecto.ex | byjord/pretty_print_formatter | a008f9368eaa03bf69da47754caae11ec3f51c5f | [
"MIT"
] | null | null | null | lib/pretty_print_formatter/ecto.ex | byjord/pretty_print_formatter | a008f9368eaa03bf69da47754caae11ec3f51c5f | [
"MIT"
] | null | null | null | lib/pretty_print_formatter/ecto.ex | byjord/pretty_print_formatter | a008f9368eaa03bf69da47754caae11ec3f51c5f | [
"MIT"
] | null | null | null | defmodule PrettyPrintFormatter.Ecto do
@moduledoc """
Format ecto's specific log messages
"""
# https://github.com/elixir-ecto/ecto/blob/e243ff4597ad244ae5870dc1c9d3eb86fd91a507/lib/ecto/log_entry.ex#L77-L79
import PrettyPrintFormatter.Ecto.SqlTokenizer
@select "\e[34m"
@update "\e[33m"
@delete "\e[31... | 21.630303 | 116 | 0.554217 |
e9813891a38ebe0bd49f60ddb6d9642a8a998775 | 1,290 | ex | Elixir | solutions/reverse-words/elixir/reverse-words-elixir.ex | EdwinFajardoBarrera/google-code-jam | 3bc2979c726a3a40d1a82888439534ea429c2327 | [
"MIT"
] | 15 | 2015-02-27T01:34:41.000Z | 2022-02-03T23:16:47.000Z | solutions/reverse-words/elixir/reverse-words-elixir.ex | EdwinFajardoBarrera/google-code-jam | 3bc2979c726a3a40d1a82888439534ea429c2327 | [
"MIT"
] | 35 | 2015-02-17T15:55:33.000Z | 2021-05-10T16:52:46.000Z | solutions/reverse-words/elixir/reverse-words-elixir.ex | EdwinFajardoBarrera/google-code-jam | 3bc2979c726a3a40d1a82888439534ea429c2327 | [
"MIT"
] | 163 | 2015-02-10T19:19:51.000Z | 2021-10-19T04:20:15.000Z | #Modulo con metodos recursivos para la impresion de datos inversos
defmodule Cases do
def print_cases(array, n, cont) when n <= 1 do
IO.puts "Case #"<>Integer.to_string(cont+1)<>": "<>
Enum.join(Enum.reverse(String.split(Enum.at(array,cont)," "))," ")
end
def print_cases(array, n, cont) do
IO.puts "Case #"<>... | 37.941176 | 147 | 0.709302 |
e9813a123ca515c2db78fd2ca8c5a6dafa43d3d6 | 1,411 | ex | Elixir | lib/elixir/lib/list/chars.ex | kenichi/elixir | 8c27da88c70623cbe516d5310c885943395a82a2 | [
"Apache-2.0"
] | 1 | 2019-04-29T12:35:51.000Z | 2019-04-29T12:35:51.000Z | lib/elixir/lib/list/chars.ex | kenichi/elixir | 8c27da88c70623cbe516d5310c885943395a82a2 | [
"Apache-2.0"
] | 1 | 2019-04-25T12:52:49.000Z | 2019-04-25T13:27:31.000Z | lib/elixir/lib/list/chars.ex | kenichi/elixir | 8c27da88c70623cbe516d5310c885943395a82a2 | [
"Apache-2.0"
] | null | null | null | defprotocol List.Chars do
@moduledoc ~S"""
The `List.Chars` protocol is responsible for
converting a structure to a charlist (only if applicable).
The only function required to be implemented is
`to_charlist/1` which does the conversion.
The `to_charlist/1` function automatically imported
by `Kernel` in... | 22.758065 | 61 | 0.717222 |
e98152180d1e37b732dcb04c824e84a78027d65c | 261,837 | ex | Elixir | lib/aws/generated/s3.ex | benmmari/aws-elixir | b97477498a9e8ba0d46a09255302d88c6a1c8573 | [
"Apache-2.0"
] | null | null | null | lib/aws/generated/s3.ex | benmmari/aws-elixir | b97477498a9e8ba0d46a09255302d88c6a1c8573 | [
"Apache-2.0"
] | null | null | null | lib/aws/generated/s3.ex | benmmari/aws-elixir | b97477498a9e8ba0d46a09255302d88c6a1c8573 | [
"Apache-2.0"
] | null | null | null | # WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
# See https://github.com/aws-beam/aws-codegen for more details.
defmodule AWS.S3 do
@moduledoc """
<p/>
"""
@doc """
This operation aborts a multipart upload. After a multipart upload is
aborted, no additional parts can be uploaded using that upload ID. The
s... | 40.892863 | 536 | 0.711332 |
e98155ba471676a5a2a3adf7792979619427cc5c | 12,254 | ex | Elixir | lib/brando_admin/components/form/input/entries.ex | univers-agency/brando | 69c3c52498a3f64518da3522cd9f27294a52cc68 | [
"Apache-2.0"
] | 1 | 2020-04-26T09:53:02.000Z | 2020-04-26T09:53:02.000Z | lib/brando_admin/components/form/input/entries.ex | univers-agency/brando | 69c3c52498a3f64518da3522cd9f27294a52cc68 | [
"Apache-2.0"
] | 198 | 2019-08-20T16:16:07.000Z | 2020-07-03T15:42:07.000Z | lib/brando_admin/components/form/input/entries.ex | univers-agency/brando | 69c3c52498a3f64518da3522cd9f27294a52cc68 | [
"Apache-2.0"
] | null | null | null | defmodule BrandoAdmin.Components.Form.Input.Entries do
use BrandoAdmin, :live_component
use Phoenix.HTML
import Brando.Gettext
import Brando.Utils.Datetime, only: [format_datetime: 1]
alias BrandoAdmin.Components.Content
alias BrandoAdmin.Components.Form
alias BrandoAdmin.Components.Form.Input
alias B... | 32.764706 | 284 | 0.599723 |
e9816d127be38a2816989aea896147b9ec1b9220 | 3,619 | ex | Elixir | lib/cereal/utils.ex | APB9785/cereal_ex | 7405122553aacfc0a37b69bb4b14ae013be99f0c | [
"MIT"
] | 4 | 2018-09-29T18:34:04.000Z | 2019-11-24T17:18:57.000Z | lib/cereal/utils.ex | APB9785/cereal_ex | 7405122553aacfc0a37b69bb4b14ae013be99f0c | [
"MIT"
] | 4 | 2018-07-25T17:09:21.000Z | 2020-01-23T15:06:21.000Z | lib/cereal/utils.ex | APB9785/cereal_ex | 7405122553aacfc0a37b69bb4b14ae013be99f0c | [
"MIT"
] | 1 | 2021-11-01T19:32:18.000Z | 2021-11-01T19:32:18.000Z | defmodule Cereal.Utils do
@doc """
Given a the name of a serializer, will return a string
that represents the type of the entity being processed.
"""
def module_to_type(module) do
module
|> Module.split()
|> List.last()
|> String.replace("Serializer", "")
|> String.replace("View", "")
... | 31.745614 | 115 | 0.658746 |
e981783129ce21eb366bff1c63d88c452eb6ac4d | 894 | ex | Elixir | lib/phoenix/socket.ex | brightroll/phoenix | b93022086322bcc1d797214a28e0c9710f537c22 | [
"MIT"
] | null | null | null | lib/phoenix/socket.ex | brightroll/phoenix | b93022086322bcc1d797214a28e0c9710f537c22 | [
"MIT"
] | null | null | null | lib/phoenix/socket.ex | brightroll/phoenix | b93022086322bcc1d797214a28e0c9710f537c22 | [
"MIT"
] | null | null | null | defmodule Phoenix.Socket do
alias Phoenix.Socket
defstruct conn: nil,
pid: nil,
channel: nil,
topic: nil,
router: nil,
channels: [],
assigns: %{}
def set_current_channel(socket, channel, topic) do
%Socket{socket | channel: channel, topi... | 23.526316 | 78 | 0.63311 |
e9817ca313ad3280038f8277507c854d004fe711 | 13,913 | ex | Elixir | lib/elixir/lib/system.ex | sunaku/elixir | 8aa43eaedd76be8ac0d495049eb9ecd56971f4fe | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/system.ex | sunaku/elixir | 8aa43eaedd76be8ac0d495049eb9ecd56971f4fe | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/system.ex | sunaku/elixir | 8aa43eaedd76be8ac0d495049eb9ecd56971f4fe | [
"Apache-2.0"
] | null | null | null | defmodule System do
@moduledoc """
The System module provides access to variables used or
maintained by the VM and to functions that interact directly
with the VM or the host system.
"""
defp strip_re(iodata, pattern) do
:re.replace(iodata, pattern, "", [return: :binary])
end
defp read_stripped(pa... | 28.925156 | 118 | 0.664271 |
e981a2a361271ed59e9321e57a2bcf1701253144 | 5,114 | ex | Elixir | elixir/bowling/lib/bowling.ex | jiegillet/exercism | bf901cd477aede9d06f322dae0763c968688806d | [
"MIT"
] | null | null | null | elixir/bowling/lib/bowling.ex | jiegillet/exercism | bf901cd477aede9d06f322dae0763c968688806d | [
"MIT"
] | null | null | null | elixir/bowling/lib/bowling.ex | jiegillet/exercism | bf901cd477aede9d06f322dae0763c968688806d | [
"MIT"
] | null | null | null | defmodule Bowling do
@doc """
Creates a new game of bowling that can be used to store the results of
the game
There are several possible states of the game:
* :ball_1 means waiting for the first roll of the frame
* {:ball_2, roll_1} means waiting for the second roll of t... | 41.577236 | 117 | 0.618889 |
e981acb5fc41646fdaec72496860c7a62e358b24 | 661 | exs | Elixir | server/config/test.exs | jeepers3327/prepply | 64b6be3b832fddf429faa31f5f7c1b93b842f821 | [
"MIT"
] | 2 | 2021-03-04T15:21:14.000Z | 2021-03-21T13:43:07.000Z | server/config/test.exs | jeepers3327/prepply | 64b6be3b832fddf429faa31f5f7c1b93b842f821 | [
"MIT"
] | null | null | null | server/config/test.exs | jeepers3327/prepply | 64b6be3b832fddf429faa31f5f7c1b93b842f821 | [
"MIT"
] | null | null | null | use Mix.Config
# Configure your database
#
# The MIX_TEST_PARTITION environment variable can be used
# to provide built-in test partitioning in CI environment.
# Run `mix help test` for more information.
config :prepply, Prepply.Repo,
username: "postgres",
password: "postgres",
database: "prepply_test#{System.ge... | 28.73913 | 66 | 0.748865 |
e98216ca03cfa0643ded419898ada3abac409861 | 708 | ex | Elixir | lib/chatter_web/gettext.ex | E1337Kat/chatter | e21728af5bfcadf3723b531081e0536a95da043e | [
"MIT"
] | null | null | null | lib/chatter_web/gettext.ex | E1337Kat/chatter | e21728af5bfcadf3723b531081e0536a95da043e | [
"MIT"
] | null | null | null | lib/chatter_web/gettext.ex | E1337Kat/chatter | e21728af5bfcadf3723b531081e0536a95da043e | [
"MIT"
] | null | null | null | defmodule ChatterWeb.Gettext do
@moduledoc """
A module providing Internationalization with a gettext-based API.
By using [Gettext](https://hexdocs.pm/gettext),
your module gains a set of macros for translations, for example:
import ChatterWeb.Gettext
# Simple translation
gettext "Here is t... | 28.32 | 72 | 0.680791 |
e9821c85fa38afe4c6f238956eb6b767b63d3b66 | 11,733 | ex | Elixir | lib/absinthe/pipeline.ex | stavro/absinthe | b794d371ad8590f461d5c56ee0e0a643f72a3989 | [
"MIT"
] | null | null | null | lib/absinthe/pipeline.ex | stavro/absinthe | b794d371ad8590f461d5c56ee0e0a643f72a3989 | [
"MIT"
] | null | null | null | lib/absinthe/pipeline.ex | stavro/absinthe | b794d371ad8590f461d5c56ee0e0a643f72a3989 | [
"MIT"
] | null | null | null | defmodule Absinthe.Pipeline do
@moduledoc """
Execute a pipeline of phases.
A pipeline is merely a list of phases. This module contains functions for building,
modifying, and executing pipelines of phases.
"""
alias Absinthe.Phase
require Logger
@type data_t :: any
@type phase_config_t :: Phase.t... | 28.97037 | 88 | 0.644166 |
e98221f8afd179ae56440c274bdc82eeba3b6ecf | 305 | ex | Elixir | lib/graphql_with_absinthe_on_phoenix/auth_token.ex | wbotelhos/graphql-with-absinthe-on-phoenix | f831d4c78bbba821ef2dd6deee5e3640aff864a5 | [
"MIT"
] | 1 | 2021-08-03T20:30:49.000Z | 2021-08-03T20:30:49.000Z | lib/graphql_with_absinthe_on_phoenix/auth_token.ex | wbotelhos/graphql-with-absinthe-on-phoenix | f831d4c78bbba821ef2dd6deee5e3640aff864a5 | [
"MIT"
] | null | null | null | lib/graphql_with_absinthe_on_phoenix/auth_token.ex | wbotelhos/graphql-with-absinthe-on-phoenix | f831d4c78bbba821ef2dd6deee5e3640aff864a5 | [
"MIT"
] | null | null | null | defmodule GraphqlWithAbsintheOnPhoenix.AuthToken do
@salt "any salt"
alias GraphqlWithAbsintheOnPhoenixWeb.Endpoint
def create(user) do
Phoenix.Token.sign(Endpoint, @salt, user.id)
end
def verify(token) do
Phoenix.Token.verify(Endpoint, @salt, token, max_age: 60 * 60 * 24)
end
end
| 21.785714 | 71 | 0.737705 |
e98287ebf91afc696d00d9c1169e39bb414380fc | 16,311 | ex | Elixir | lib/aws/generated/iot_events.ex | kw7oe/aws-elixir | 4ba60502dde270c83143822c9964018c7770bad7 | [
"Apache-2.0"
] | 341 | 2018-04-04T19:06:19.000Z | 2022-03-25T21:34:23.000Z | lib/aws/generated/iot_events.ex | kw7oe/aws-elixir | 4ba60502dde270c83143822c9964018c7770bad7 | [
"Apache-2.0"
] | 82 | 2018-04-04T17:32:33.000Z | 2022-03-24T15:12:04.000Z | lib/aws/generated/iot_events.ex | kw7oe/aws-elixir | 4ba60502dde270c83143822c9964018c7770bad7 | [
"Apache-2.0"
] | 76 | 2018-04-10T20:19:44.000Z | 2022-03-15T13:49:19.000Z | # WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
# See https://github.com/aws-beam/aws-codegen for more details.
defmodule AWS.IoTEvents do
@moduledoc """
AWS IoT Events monitors your equipment or device fleets for failures or changes
in operation, and triggers actions when such events occur.
You can use AWS IoT ... | 21.100906 | 150 | 0.591012 |
e982d32fe600046c0f3f7633c9379c26f86f0b25 | 185 | ex | Elixir | .workshop/exercises/my_enum/files/my_enum.ex | silesian-beamers/elixir-from-the-ground-up | 1ad8c2a4d429175461dc45e218849eb6a212c776 | [
"MIT"
] | 10 | 2015-12-13T07:29:08.000Z | 2016-09-22T03:47:35.000Z | .workshop/exercises/my_enum/files/my_enum.ex | silesian-beamers/elixir-from-the-ground-up | 1ad8c2a4d429175461dc45e218849eb6a212c776 | [
"MIT"
] | 4 | 2015-12-02T12:12:14.000Z | 2016-01-11T07:33:24.000Z | .workshop/exercises/my_enum/files/my_enum.ex | silesian-beamers/elixir-from-the-ground-up | 1ad8c2a4d429175461dc45e218849eb6a212c776 | [
"MIT"
] | null | null | null | defmodule MyEnum do
def map(list, mapper) do
#...
end
def reverse(list) do
#...
end
def append(lhs, rhs) do
#...
end
def length(list) do
#...
end
end
| 10.277778 | 26 | 0.52973 |
e982f079535ff386ae19816b0fd6b06b994e99a7 | 82 | ex | Elixir | lib/multi_tenancex_web/views/admin/company_view.ex | dreamingechoes/multi_tenancex | cfe3feb6b7eb25559f9abaa4da89e4aafc9ad2ec | [
"MIT"
] | 30 | 2018-06-27T17:51:53.000Z | 2021-04-24T03:17:55.000Z | lib/multi_tenancex_web/views/admin/company_view.ex | dreamingechoes/multi_tenancex | cfe3feb6b7eb25559f9abaa4da89e4aafc9ad2ec | [
"MIT"
] | null | null | null | lib/multi_tenancex_web/views/admin/company_view.ex | dreamingechoes/multi_tenancex | cfe3feb6b7eb25559f9abaa4da89e4aafc9ad2ec | [
"MIT"
] | 7 | 2018-07-24T17:56:14.000Z | 2019-12-31T02:10:13.000Z | defmodule MultiTenancexWeb.Admin.CompanyView do
use MultiTenancexWeb, :view
end
| 20.5 | 47 | 0.841463 |
e98313c224478813e9605ce9c38251d21b40390b | 4,356 | ex | Elixir | lib/mix/elasticsearch.build.ex | cdunn/elasticsearch-elixir | a8d5d349a048c8bf115ea36d0904e934d0af8b42 | [
"MIT"
] | null | null | null | lib/mix/elasticsearch.build.ex | cdunn/elasticsearch-elixir | a8d5d349a048c8bf115ea36d0904e934d0af8b42 | [
"MIT"
] | null | null | null | lib/mix/elasticsearch.build.ex | cdunn/elasticsearch-elixir | a8d5d349a048c8bf115ea36d0904e934d0af8b42 | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.Elasticsearch.Build do
@moduledoc """
Builds Elasticsearch indexes using a zero-downtime, hot-swap technique.
1. Build an index for the given `alias`, with a timestamp: `alias-12323123`
2. Bulk upload data to that index using `store` and `sources`.
3. Alias the `alias` to `alias-12323123`... | 25.034483 | 108 | 0.60652 |
e9831a9b02bd95a426587bda41c7c39aa7c16e9e | 4,874 | exs | Elixir | day_07.exs | itwasscience/AdventOfCode-2021 | 45867c902f737ed22291826b7ce8dcf8c932e8af | [
"MIT"
] | null | null | null | day_07.exs | itwasscience/AdventOfCode-2021 | 45867c902f737ed22291826b7ce8dcf8c932e8af | [
"MIT"
] | null | null | null | day_07.exs | itwasscience/AdventOfCode-2021 | 45867c902f737ed22291826b7ce8dcf8c932e8af | [
"MIT"
] | null | null | null | defmodule Day_07 do
def part_1() do
fuel = get_fuel()
costs =
for target <- -0..Enum.max(fuel),
do: %{
position: target,
cost: fuel |> Enum.map(fn p -> Kernel.abs(target - p) end) |> Enum.sum()
}
costs
|> Enum.sort_by(fn x -> x.cost end)
|> Enum.... | 105.956522 | 3,935 | 0.697579 |
e9833ec70345f582276e868b2a05120922d856a0 | 1,877 | ex | Elixir | lib/koans/10_structs.ex | gillkyle/elixir-koans | 50961fd848193479356f72391c3f927c1acb174b | [
"MIT"
] | null | null | null | lib/koans/10_structs.ex | gillkyle/elixir-koans | 50961fd848193479356f72391c3f927c1acb174b | [
"MIT"
] | null | null | null | lib/koans/10_structs.ex | gillkyle/elixir-koans | 50961fd848193479356f72391c3f927c1acb174b | [
"MIT"
] | null | null | null | defmodule Structs do
use Koans
@intro "Structs"
defmodule Person do
defstruct [:name, :age]
end
koan "Structs are defined and named after a module" do
person = %Person{}
assert person == %Person{}
end
koan "Unless previously defined, fields begin as nil" do
nobody = %Person{}
asser... | 26.069444 | 86 | 0.616942 |
e9836b1bca426c9c7a447069a0be484ebbfe6973 | 202 | ex | Elixir | lib/searchex/command/info.ex | andyl/searchex | aae186cddd14f0415b116fca198b8cc95eb2c379 | [
"MIT"
] | 91 | 2016-11-22T23:52:01.000Z | 2022-02-12T13:06:24.000Z | lib/searchex/command/info.ex | andyl/searchex | aae186cddd14f0415b116fca198b8cc95eb2c379 | [
"MIT"
] | 11 | 2016-11-23T17:37:57.000Z | 2018-03-07T13:40:48.000Z | lib/searchex/command/info.ex | andyl/searchex | aae186cddd14f0415b116fca198b8cc95eb2c379 | [
"MIT"
] | 9 | 2016-11-24T01:44:40.000Z | 2020-05-15T04:16:19.000Z | defmodule Searchex.Command.Info do
@moduledoc false
use Shake.Module
@doc "Module API"
def exec(cfg_snip) do
call(%Frame{cfg_snip: cfg_snip}, [])
end
step Searchex.Command.Index
end | 14.428571 | 40 | 0.70297 |
e9838bec805bedadb6af972d6ee47c0b66a46dd2 | 1,549 | ex | Elixir | apps/rex_web/lib/rex_web/channels/worker_channel.ex | baymax42/rex | 7c8571ac308960973fea9e8df77a6f1ad5c16906 | [
"MIT"
] | null | null | null | apps/rex_web/lib/rex_web/channels/worker_channel.ex | baymax42/rex | 7c8571ac308960973fea9e8df77a6f1ad5c16906 | [
"MIT"
] | 16 | 2020-05-18T20:06:29.000Z | 2020-06-08T14:32:11.000Z | apps/rex_web/lib/rex_web/channels/worker_channel.ex | baymax42/rex | 7c8571ac308960973fea9e8df77a6f1ad5c16906 | [
"MIT"
] | null | null | null | require Logger
defmodule RexWeb.WorkerChannel do
@moduledoc """
Testing channel.
"""
require Constants.Events
alias Constants.Events
use RexWeb, :channel
alias RexWeb.{NodeHandler, ProjectHandler, TaskHandler}
def join("worker:new", payload, socket) do
end
@spec join(String.t(), map, Phoenix.So... | 24.983871 | 83 | 0.634603 |
e983bb3d825f3b79ccd763dba4eae87234d1b012 | 351 | ex | Elixir | lib/supabase_surface/components/icons/icon_skip_forward.ex | treebee/supabase-surface | 5a184ca92323c085dd81e2fc8aa8c10367f2382e | [
"Apache-2.0"
] | 5 | 2021-06-08T08:02:43.000Z | 2022-02-09T23:13:46.000Z | lib/supabase_surface/components/icons/icon_skip_forward.ex | treebee/supabase-surface | 5a184ca92323c085dd81e2fc8aa8c10367f2382e | [
"Apache-2.0"
] | null | null | null | lib/supabase_surface/components/icons/icon_skip_forward.ex | treebee/supabase-surface | 5a184ca92323c085dd81e2fc8aa8c10367f2382e | [
"Apache-2.0"
] | 1 | 2021-07-14T05:20:31.000Z | 2021-07-14T05:20:31.000Z | defmodule SupabaseSurface.Components.Icons.IconSkipForward do
use SupabaseSurface.Components.Icon
@impl true
def render(assigns) do
icon_size = IconContainer.get_size(assigns.size)
~F"""
<IconContainer assigns={assigns}>
{Feathericons.skip_forward(width: icon_size, height: icon_size)}
</Ic... | 23.4 | 70 | 0.726496 |
e983d1c033618b904f11020c0f4d2264c280d6be | 1,967 | exs | Elixir | echo/mix.exs | mrjbj/liveview_sept_2021 | 1722a9527acef2b4584810976fecc507cc3eda8b | [
"MIT"
] | null | null | null | echo/mix.exs | mrjbj/liveview_sept_2021 | 1722a9527acef2b4584810976fecc507cc3eda8b | [
"MIT"
] | null | null | null | echo/mix.exs | mrjbj/liveview_sept_2021 | 1722a9527acef2b4584810976fecc507cc3eda8b | [
"MIT"
] | null | null | null | defmodule Echo.MixProject do
use Mix.Project
def project do
[
app: :echo,
version: "0.1.0",
elixir: "~> 1.12",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
start_permanent: Mix.env() == :prod,
aliases: aliases(),
de... | 28.507246 | 84 | 0.569395 |
e983e1a1c489b645741cf2ef64d7d2b0e5014d36 | 1,014 | ex | Elixir | lib/bookpile_web/plug/locale.ex | bitboxer/bookpile | eabdb0c9dd5859621512b0af7b516ab11ac34825 | [
"MIT"
] | 4 | 2021-08-23T19:27:00.000Z | 2021-12-24T14:22:10.000Z | lib/bookpile_web/plug/locale.ex | bitboxer/bookpile | eabdb0c9dd5859621512b0af7b516ab11ac34825 | [
"MIT"
] | 16 | 2021-08-23T16:48:07.000Z | 2022-02-28T17:25:37.000Z | lib/bookpile_web/plug/locale.ex | bitboxer/bookpile | eabdb0c9dd5859621512b0af7b516ab11ac34825 | [
"MIT"
] | 2 | 2021-08-23T16:18:42.000Z | 2021-08-23T16:35:41.000Z | defmodule BookpileWeb.Plug.Locale do
import Plug.Conn
@valid_locales ["de", "en"]
def init(_opts), do: nil
def call(conn, _opts) do
case fetch_locale(conn) do
nil -> conn
locale -> update_locale(conn, locale)
end
end
defp fetch_locale(conn) do
clean_param(
conn.params["loca... | 21.574468 | 86 | 0.638067 |
e983f5cdbc01ea70b48598c8d091512852708250 | 1,895 | ex | Elixir | swapi/lib/swapi/resolvers/content.ex | rob-brown/ElixirTraining2018 | 9724cc4961d767a1ba2450240e026b46ad5a0f1b | [
"MIT"
] | 2 | 2018-02-01T22:56:09.000Z | 2020-01-20T19:57:48.000Z | swapi/lib/swapi/resolvers/content.ex | rob-brown/ElixirTraining2018 | 9724cc4961d767a1ba2450240e026b46ad5a0f1b | [
"MIT"
] | null | null | null | swapi/lib/swapi/resolvers/content.ex | rob-brown/ElixirTraining2018 | 9724cc4961d767a1ba2450240e026b46ad5a0f1b | [
"MIT"
] | null | null | null | defmodule Swapi.Resolvers.Content do
alias Swapi.HTTP
require Logger
def search_planets(_parent, args = %{name: name}, _resolution) do
request_all "https://swapi.co/api/planets?search=#{name}", args
end
def list_planets(%{planets: planets}, args, _resolution) do
request_each [planets], args
end
... | 24.61039 | 67 | 0.625858 |
e983fa93e9e30e791ced83f16436fe5c9a5a4f73 | 942 | ex | Elixir | test/support/channel_case.ex | jdangerx/telepath | 75314db05dd97ea86b5a828ab673fed33ecad5e1 | [
"MIT"
] | null | null | null | test/support/channel_case.ex | jdangerx/telepath | 75314db05dd97ea86b5a828ab673fed33ecad5e1 | [
"MIT"
] | null | null | null | test/support/channel_case.ex | jdangerx/telepath | 75314db05dd97ea86b5a828ab673fed33ecad5e1 | [
"MIT"
] | null | null | null | defmodule TelepathWeb.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 case interacts ... | 24.789474 | 70 | 0.716561 |
e9841333cbdec99abb369dd4c88ec22081e601f2 | 1,608 | ex | Elixir | clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_cx_v3_dtmf_input.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_cx_v3_dtmf_input.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_cx_v3_dtmf_input.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... | 32.16 | 96 | 0.731965 |
e9841acd447676fb5298ed361bd2a82dfc6c3ca7 | 905 | ex | Elixir | lib/still/preprocessor/profiler.ex | tomasz-tomczyk/still | 3f2fdb64c72244b789e14b31d514199f8adeb796 | [
"ISC"
] | 202 | 2021-01-13T15:45:17.000Z | 2022-03-22T01:26:27.000Z | lib/still/preprocessor/profiler.ex | tomasz-tomczyk/still | 3f2fdb64c72244b789e14b31d514199f8adeb796 | [
"ISC"
] | 55 | 2021-01-26T14:11:34.000Z | 2022-03-22T22:34:37.000Z | lib/still/preprocessor/profiler.ex | tomasz-tomczyk/still | 3f2fdb64c72244b789e14b31d514199f8adeb796 | [
"ISC"
] | 10 | 2021-02-04T21:14:41.000Z | 2022-03-20T10:12:59.000Z | defmodule Still.Preprocessor.Profiler do
alias Still.Preprocessor
alias Still.Profiler
alias Still.SourceFile
use Preprocessor
@impl true
def render(%{run_type: :compile_metadata} = source_file),
do: source_file
def render(%{metadata: metadata} = file) do
if should_profile?(file) do
start... | 22.625 | 81 | 0.708287 |
e9842fbc2cf75d357b52ba62f7ed2a468104d2a2 | 139 | exs | Elixir | test/fixtures/unsafe.exs | supernintendo/eon | 8064b4a4500b1e3f7699244cd40cef27f8641b85 | [
"Apache-2.0"
] | 7 | 2016-05-08T20:35:55.000Z | 2021-05-11T08:32:55.000Z | test/fixtures/unsafe.exs | supernintendo/eon | 8064b4a4500b1e3f7699244cd40cef27f8641b85 | [
"Apache-2.0"
] | 1 | 2018-04-06T15:35:34.000Z | 2018-12-20T04:48:15.000Z | test/fixtures/unsafe.exs | supernintendo/eon | 8064b4a4500b1e3f7699244cd40cef27f8641b85 | [
"Apache-2.0"
] | 2 | 2018-04-06T15:15:02.000Z | 2022-03-18T08:00:25.000Z | %{
math: 8 + 8,
func: (fn ->
value = :rand.uniform(888)
:ets.insert(:eon_test_bucket, {"unsafe", value})
value
end).()
}
| 15.444444 | 52 | 0.532374 |
e9843515b949663dc1323d571b6d0d3e5a1e4df5 | 663 | ex | Elixir | lib/bugsnag_elixir/payload.ex | Lukkor/bugsnag-elixir | 554fd5c8480720cc6379912fb54f364034e9b94f | [
"Unlicense"
] | 3 | 2016-12-15T13:19:35.000Z | 2017-02-27T09:30:11.000Z | lib/bugsnag_elixir/payload.ex | Lukkor/bugsnag-elixir | 554fd5c8480720cc6379912fb54f364034e9b94f | [
"Unlicense"
] | null | null | null | lib/bugsnag_elixir/payload.ex | Lukkor/bugsnag-elixir | 554fd5c8480720cc6379912fb54f364034e9b94f | [
"Unlicense"
] | null | null | null | defmodule BugsnagElixir.Payload do
@moduledoc false
@derive [Poison.Encoder]
@type t :: %__MODULE__{}
defstruct apiKey: "",
notifier: %{},
events: []
@name "bugsnag-elixir"
@version Mix.Project.config[:version]
@url "https://github.com/Lukkor/bugsnag-elixir"
@api_key Applicati... | 20.71875 | 95 | 0.644042 |
e9843b9e7a75a2c893e66b344786377a0895fcc4 | 2,051 | exs | Elixir | config/prod.exs | amalgamated-tools/ex_appointment | 095237f0bd6746afd8ec93d92540158aa1934075 | [
"MIT"
] | 1 | 2021-03-28T17:41:37.000Z | 2021-03-28T17:41:37.000Z | config/prod.exs | amalgamated-tools/ex_appointment | 095237f0bd6746afd8ec93d92540158aa1934075 | [
"MIT"
] | null | null | null | config/prod.exs | amalgamated-tools/ex_appointment | 095237f0bd6746afd8ec93d92540158aa1934075 | [
"MIT"
] | null | null | null | use Mix.Config
# For production, don't forget to configure the url host
# to something meaningful, Phoenix uses this information
# when generating URLs.
#
# Note we also include the path to a cache manifest
# containing the digested version of static files. This
# manifest is generated by the `mix phx.digest` task,
# ... | 36.625 | 66 | 0.720137 |
e9844656ae2460557bae9e93be39874fc3055439 | 1,808 | ex | Elixir | bidding_poc/lib/bidding_poc/user/user_publisher.ex | KeenMate/phoenix-websocket-auction | 412148ad5621b511c0690b9395f4b6c9ce3a3352 | [
"MIT"
] | null | null | null | bidding_poc/lib/bidding_poc/user/user_publisher.ex | KeenMate/phoenix-websocket-auction | 412148ad5621b511c0690b9395f4b6c9ce3a3352 | [
"MIT"
] | null | null | null | bidding_poc/lib/bidding_poc/user/user_publisher.ex | KeenMate/phoenix-websocket-auction | 412148ad5621b511c0690b9395f4b6c9ce3a3352 | [
"MIT"
] | null | null | null | defmodule BiddingPoc.UserPublisher do
alias BiddingPoc.UserPubSub
alias BiddingPoc.Database.{AuctionBid, AuctionItem}
# BROADCASTS
@spec send_bid_placed_success(pos_integer(), AuctionBid.t()) :: :ok | {:error, any()}
def send_bid_placed_success(user_id, auction_bid) do
Phoenix.PubSub.broadcast(UserPubS... | 36.16 | 111 | 0.737832 |
e984790b39cecd5801520dd9fd9b8375d16361d6 | 3,610 | ex | Elixir | lib/verk/dead_set.ex | Psli/verk | a538ceed1217d7aee89e92cf7740a96543ecc94c | [
"MIT"
] | null | null | null | lib/verk/dead_set.ex | Psli/verk | a538ceed1217d7aee89e92cf7740a96543ecc94c | [
"MIT"
] | null | null | null | lib/verk/dead_set.ex | Psli/verk | a538ceed1217d7aee89e92cf7740a96543ecc94c | [
"MIT"
] | null | null | null | defmodule Verk.DeadSet do
@moduledoc """
This module interacts with jobs in the dead set.
Set `config :verk, max_dead_jobs: value` on your config file to set the max
amount of dead jobs to be stored on your dead queue. Defaults at `100`.
"""
import Verk.Dsl
alias Verk.{Job, SortedSet}
# a week
@time... | 30.854701 | 97 | 0.644598 |
e98481a00608333404fd7621fe86d612eeaf2808 | 2,256 | ex | Elixir | lib/gringotts/credit_card.ex | szTheory/gringotts | 706774d31a94ce173679f3b91b0feaad0739d006 | [
"MIT"
] | 454 | 2017-12-19T07:03:51.000Z | 2022-03-29T00:52:31.000Z | lib/gringotts/credit_card.ex | szTheory/gringotts | 706774d31a94ce173679f3b91b0feaad0739d006 | [
"MIT"
] | 140 | 2017-12-19T07:23:36.000Z | 2021-02-13T18:08:58.000Z | lib/gringotts/credit_card.ex | szTheory/gringotts | 706774d31a94ce173679f3b91b0feaad0739d006 | [
"MIT"
] | 57 | 2017-12-21T18:21:32.000Z | 2021-08-15T13:50:38.000Z | defmodule Gringotts.CreditCard do
@moduledoc """
Defines a `struct` for (credit) cards and some utilities.
"""
defstruct [:number, :month, :year, :first_name, :last_name, :verification_code, :brand]
@typedoc """
Represents a Credit Card.
| Field | Type | Description ... | 41.777778 | 89 | 0.473848 |
e98487f4b14d3f5d190a300adb0658087b2508d3 | 2,134 | exs | Elixir | test/chat_api_web/controllers/widget_settings_controller_test.exs | rlanga/papercups | 358ca46c344908585cd0214a0de96e5676120c68 | [
"MIT"
] | 2 | 2020-09-21T07:27:13.000Z | 2021-12-20T13:23:56.000Z | test/chat_api_web/controllers/widget_settings_controller_test.exs | rlanga/papercups | 358ca46c344908585cd0214a0de96e5676120c68 | [
"MIT"
] | null | null | null | test/chat_api_web/controllers/widget_settings_controller_test.exs | rlanga/papercups | 358ca46c344908585cd0214a0de96e5676120c68 | [
"MIT"
] | 1 | 2021-08-29T14:10:18.000Z | 2021-08-29T14:10:18.000Z | defmodule ChatApiWeb.WidgetSettingsControllerTest do
use ChatApiWeb.ConnCase
alias ChatApi.WidgetSettings
alias ChatApi.Accounts
def create_attr(account_id) do
%{
color: "some color",
subtitle: "some subtitle",
title: "some title",
account_id: account_id
}
end
def update_a... | 27.358974 | 90 | 0.614339 |
e9849164c880effc3ff4e6cc81fdc76938dbae64 | 5,863 | exs | Elixir | lib/mix/test/test_helper.exs | sunaku/elixir | 8aa43eaedd76be8ac0d495049eb9ecd56971f4fe | [
"Apache-2.0"
] | null | null | null | lib/mix/test/test_helper.exs | sunaku/elixir | 8aa43eaedd76be8ac0d495049eb9ecd56971f4fe | [
"Apache-2.0"
] | null | null | null | lib/mix/test/test_helper.exs | sunaku/elixir | 8aa43eaedd76be8ac0d495049eb9ecd56971f4fe | [
"Apache-2.0"
] | null | null | null | Mix.start()
Mix.shell(Mix.Shell.Process)
Application.put_env(:mix, :colors, [enabled: false])
ExUnit.start [trace: "--trace" in System.argv]
defmodule MixTest.Case do
use ExUnit.CaseTemplate
defmodule Sample do
def project do
[ app: :sample,
version: "0.1.0" ]
end
end
using do
quot... | 20.939286 | 82 | 0.623913 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.