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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
087d93aab0dc54cd833e2d72c1bfdfab9adb29ac | 1,258 | ex | Elixir | lib/vega/board_overview.ex | Fudoshiki/vega | 0577024afc734933048645976705784512fbc1f4 | [
"MIT"
] | 4 | 2020-03-22T22:12:29.000Z | 2020-07-01T22:32:01.000Z | lib/vega/board_overview.ex | Fudoshiki/vega | 0577024afc734933048645976705784512fbc1f4 | [
"MIT"
] | 3 | 2021-03-10T11:53:41.000Z | 2021-10-17T11:18:54.000Z | lib/vega/board_overview.ex | Fudoshiki/vega | 0577024afc734933048645976705784512fbc1f4 | [
"MIT"
] | 3 | 2020-03-30T19:03:23.000Z | 2022-01-17T20:21:42.000Z | defmodule Vega.BoardOverview do
@moduledoc """
The module is used to fetch the title of the boards connected to the user. It only fetches some attributes (title, background color and the id) of each board.
"""
@collection "boards"
alias Vega.User
alias Vega.Board
@doc """
Fetch all boards which are c... | 27.347826 | 160 | 0.618442 |
087d993fc62c2d456c8002f6491cf2482dcb099c | 900 | ex | Elixir | clients/service_management/lib/google_api/service_management/v1/metadata.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/service_management/lib/google_api/service_management/v1/metadata.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/service_management/lib/google_api/service_management/v1/metadata.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 33.333333 | 74 | 0.763333 |
087dbc24a819b6c2d978eabf7ae8a3041c62db8c | 4,413 | ex | Elixir | clients/testing/lib/google_api/testing/v1/model/android_instrumentation_test.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/testing/lib/google_api/testing/v1/model/android_instrumentation_test.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/testing/lib/google_api/testing/v1/model/android_instrumentation_test.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... | 63.042857 | 603 | 0.755495 |
087dd10d4d2da18d278ba790f2e243101c6c6450 | 3,582 | exs | Elixir | test/vintage_net/name_resolver_test.exs | danielspofford/vintage_net | 2fc6f251069aa0ae283524aed6714991c0137773 | [
"Apache-2.0"
] | null | null | null | test/vintage_net/name_resolver_test.exs | danielspofford/vintage_net | 2fc6f251069aa0ae283524aed6714991c0137773 | [
"Apache-2.0"
] | null | null | null | test/vintage_net/name_resolver_test.exs | danielspofford/vintage_net | 2fc6f251069aa0ae283524aed6714991c0137773 | [
"Apache-2.0"
] | null | null | null | defmodule VintageNet.NameResolverTest do
use VintageNetTest.Case
alias VintageNet.NameResolver
import ExUnit.CaptureLog
@resolvconf_path "fake_resolv.conf"
# See resolv_conf_test.exs for more involved testing of the configuration file
# The purpose of this set of tests is to exercise the GenServer and fil... | 27.136364 | 82 | 0.606924 |
087dd2ad0d5ad3069abd87739345e514ca2d31b3 | 3,865 | ex | Elixir | clients/monitoring/lib/google_api/monitoring/v3/model/service_level_objective.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/monitoring/lib/google_api/monitoring/v3/model/service_level_objective.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/monitoring/lib/google_api/monitoring/v3/model/service_level_objective.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... | 59.461538 | 491 | 0.727296 |
087e2f39d9725102ac63e79a75b028c530564779 | 398 | exs | Elixir | test/nabo/compilers/markdown_test.exs | bechanh5/nabo | 3e406a5875622a8f702649ced30b39a296039f71 | [
"MIT"
] | null | null | null | test/nabo/compilers/markdown_test.exs | bechanh5/nabo | 3e406a5875622a8f702649ced30b39a296039f71 | [
"MIT"
] | null | null | null | test/nabo/compilers/markdown_test.exs | bechanh5/nabo | 3e406a5875622a8f702649ced30b39a296039f71 | [
"MIT"
] | null | null | null | defmodule Nabo.Compilers.MarkdownTest do
use ExUnit.Case, async: true
test "from_string/1 with meta string" do
string =
~s(
{"title":"Hello","slug":"hello","datetime":"2017-01-01T00:00:00Z"}
---
Welcome to your first Nabo post
---
This is the content of your f... | 24.875 | 75 | 0.605528 |
087e4c7570f34728e55520819439af991b88fe28 | 4,948 | exs | Elixir | test/protox/message_test.exs | EasyMile/protox | 6b58b7aaba00b2b5faf1d7e8e2e226b9d2b72a7b | [
"MIT"
] | 18 | 2017-03-02T16:46:10.000Z | 2019-12-07T03:31:16.000Z | test/protox/message_test.exs | EasyMile/protox | 6b58b7aaba00b2b5faf1d7e8e2e226b9d2b72a7b | [
"MIT"
] | 8 | 2017-09-21T21:45:33.000Z | 2020-05-13T18:54:01.000Z | test/protox/message_test.exs | EasyMile/protox | 6b58b7aaba00b2b5faf1d7e8e2e226b9d2b72a7b | [
"MIT"
] | 2 | 2018-02-26T13:13:08.000Z | 2020-05-12T07:01:36.000Z | defmodule Protox.MessageTest do
use ExUnit.Case
test "Protobuf 2, replace only set scalar fields" do
r1 = %Protobuf2{a: 0, s: :ONE}
r2 = %Protobuf2{a: nil, s: :TWO}
r3 = %Protobuf2{a: 1, s: nil}
assert Protox.Message.merge(r1, r2) == %Protobuf2{a: 0, s: :TWO}
assert Protox.Message.merge(r1, r3... | 30.732919 | 90 | 0.473525 |
087e64b7c0fece0c53d08f6bf2d756df314c2656 | 970 | ex | Elixir | lib/accent/scopes/version.ex | samuelnygaard/accent | db753badab1d885397b48a42ac3fb43024345467 | [
"BSD-3-Clause"
] | 1 | 2020-07-01T16:08:34.000Z | 2020-07-01T16:08:34.000Z | lib/accent/scopes/version.ex | samuelnygaard/accent | db753badab1d885397b48a42ac3fb43024345467 | [
"BSD-3-Clause"
] | 2 | 2021-09-28T05:37:00.000Z | 2022-02-26T10:10:15.000Z | lib/accent/scopes/version.ex | samuelnygaard/accent | db753badab1d885397b48a42ac3fb43024345467 | [
"BSD-3-Clause"
] | null | null | null | defmodule Accent.Scopes.Version do
import Ecto.Query, only: [from: 2]
@doc """
## Examples
iex> Accent.Scopes.Version.from_project(Accent.Version, "test")
#Ecto.Query<from v0 in Accent.Version, where: v0.project_id == ^"test">
iex> Accent.Scopes.Version.from_project(Accent.Version, nil)
Accent.V... | 28.529412 | 75 | 0.673196 |
087e9a5a2a3e7c9b9cc22ec49d502120ead8ac4d | 11,802 | ex | Elixir | hangman/b2/lib/b2_web/live/game/figure.ex | neal-bpm/TinyHangman | c2b9bcfe9b3c6d918e83271dc943f09706693b4e | [
"MIT"
] | null | null | null | hangman/b2/lib/b2_web/live/game/figure.ex | neal-bpm/TinyHangman | c2b9bcfe9b3c6d918e83271dc943f09706693b4e | [
"MIT"
] | null | null | null | hangman/b2/lib/b2_web/live/game/figure.ex | neal-bpm/TinyHangman | c2b9bcfe9b3c6d918e83271dc943f09706693b4e | [
"MIT"
] | null | null | null | defmodule B2Web.Live.Game.Figure do
use B2Web, :live_component
def render(assigns) do
~H"""
<div class="figure">
<svg id="drawing"
xmlns="http://www.w3.org/2000/svg"
x-height="155mm"
x-width="130mm"
version="1.1"
viewBox="0 0 460.9899 548.03535">
... | 53.402715 | 142 | 0.458651 |
087ec051766d49e7b376aadbdcd07e1932cbf5f6 | 2,078 | exs | Elixir | mix.exs | ricardopadua/introduction_phoenix_liveview | 3e320b4ea7f80b079dfcd9ac2d5714b1204ce4ed | [
"Apache-2.0"
] | null | null | null | mix.exs | ricardopadua/introduction_phoenix_liveview | 3e320b4ea7f80b079dfcd9ac2d5714b1204ce4ed | [
"Apache-2.0"
] | null | null | null | mix.exs | ricardopadua/introduction_phoenix_liveview | 3e320b4ea7f80b079dfcd9ac2d5714b1204ce4ed | [
"Apache-2.0"
] | null | null | null | defmodule IntroductionPhoenixLiveview.MixProject do
use Mix.Project
def project do
[
app: :introduction_phoenix_liveview,
version: "0.1.0",
elixir: "~> 1.12",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:gettext] ++ Mix.compilers(),
start_permanent: Mix.env() == :pr... | 29.267606 | 84 | 0.578441 |
087ec49e5758510470b49f12dca3ca34cb0e38db | 15,549 | ex | Elixir | lib/mix/tasks/docs.ex | supersimple/ex_doc | 6368a128e3c871f25e3dc7c1f86d51cdf84e3e3d | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | lib/mix/tasks/docs.ex | supersimple/ex_doc | 6368a128e3c871f25e3dc7c1f86d51cdf84e3e3d | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | lib/mix/tasks/docs.ex | supersimple/ex_doc | 6368a128e3c871f25e3dc7c1f86d51cdf84e3e3d | [
"Apache-2.0",
"CC-BY-4.0"
] | 1 | 2020-05-11T16:54:10.000Z | 2020-05-11T16:54:10.000Z | defmodule Mix.Tasks.Docs do
use Mix.Task
@shortdoc "Generate documentation for the project"
@moduledoc ~S"""
Uses ExDoc to generate a static web page from the project documentation.
## Command line options
* `--canonical`, `-n` - Indicate the preferred URL with
rel="canonical" link element, defa... | 35.827189 | 101 | 0.68088 |
087edad091062c8666b6a2f43559871228bfcf3b | 515 | ex | Elixir | Day-2/part1.ex | alekxeyuk/ADOC-2021 | 9b9f31724b940d62dcc2de7354b0054f46810760 | [
"MIT"
] | 1 | 2021-12-03T13:34:13.000Z | 2021-12-03T13:34:13.000Z | Day-2/part1.ex | alekxeyuk/ADOC-2021 | 9b9f31724b940d62dcc2de7354b0054f46810760 | [
"MIT"
] | null | null | null | Day-2/part1.ex | alekxeyuk/ADOC-2021 | 9b9f31724b940d62dcc2de7354b0054f46810760 | [
"MIT"
] | null | null | null | procedure main()
object f = get_text("input.txt", GT_LF_STRIPPED)
if f=-1 then
puts(1, "Can't find input.txt file")
abort(1)
end if
integer {hor, dep, x} @= 0
for i=1 to length(f) do
seq s = split(f[i])
x = to_integer(s[2])
switch s[1] do
... | 21.458333 | 52 | 0.485437 |
087ee2b61e7d145d14f943f18ef8567d3a99354e | 1,896 | exs | Elixir | config/dev.exs | ShaneKilkelly/teal | 494de9b9a3848ab57a5c3731c9d462bad335a3c0 | [
"MIT"
] | null | null | null | config/dev.exs | ShaneKilkelly/teal | 494de9b9a3848ab57a5c3731c9d462bad335a3c0 | [
"MIT"
] | null | null | null | config/dev.exs | ShaneKilkelly/teal | 494de9b9a3848ab57a5c3731c9d462bad335a3c0 | [
"MIT"
] | null | null | null | use Mix.Config
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with brunch.io to recompile .js and .css sources.
config :teal, Teal.Web.Endpoint,
http: [port: 4000],
... | 32.135593 | 170 | 0.695675 |
087ee9585476513fe0027417c1d9da89c0b065d5 | 3,284 | ex | Elixir | lib/erlef/members.ex | paulo-ferraz-oliveira/website | c7a1aa02d4d402d3e0e7f3973619ba0e7b53cbd8 | [
"Apache-2.0"
] | 1 | 2021-03-13T01:34:28.000Z | 2021-03-13T01:34:28.000Z | lib/erlef/members.ex | paulo-ferraz-oliveira/website | c7a1aa02d4d402d3e0e7f3973619ba0e7b53cbd8 | [
"Apache-2.0"
] | null | null | null | lib/erlef/members.ex | paulo-ferraz-oliveira/website | c7a1aa02d4d402d3e0e7f3973619ba0e7b53cbd8 | [
"Apache-2.0"
] | null | null | null | defmodule Erlef.Members do
@moduledoc """
Members context
"""
alias Erlef.Repo
alias Erlef.Members.{EmailRequest, EmailRequestNotification, Notifications}
alias Erlef.Mailer
alias Erlef.Admins
alias Erlef.Accounts.Member
import Ecto.Query
def new_email_request(params \\ %{}) do
EmailRequest.c... | 22.965035 | 86 | 0.63581 |
087efe4dd9c84e737c385bc7683622917a1817d1 | 374 | ex | Elixir | lib/basic_web/controllers/shotrize/liveview_controller.ex | ysaito8015/communitex | d469447a62029d59883d95df4df3c9b09e0022e2 | [
"Apache-2.0"
] | 7 | 2021-07-14T15:45:55.000Z | 2022-01-25T11:13:01.000Z | lib/basic_web/controllers/shotrize/liveview_controller.ex | ysaito8015/communitex | d469447a62029d59883d95df4df3c9b09e0022e2 | [
"Apache-2.0"
] | 10 | 2021-08-09T15:54:05.000Z | 2022-02-17T04:18:38.000Z | lib/basic_web/controllers/shotrize/liveview_controller.ex | ysaito8015/communitex | d469447a62029d59883d95df4df3c9b09e0022e2 | [
"Apache-2.0"
] | 5 | 2021-07-23T05:54:35.000Z | 2022-01-28T04:14:51.000Z | defmodule BasicWeb.LiveViewController do
use Phoenix.LiveView
def render(assigns) do
params = assigns.params
template = if params["path_"] == nil, do: "index.html", else: Path.join(params["path_"]) <> ".html"
BasicWeb.PageLiveView.render(template, assigns)
end
def mount(params, _session, socket) d... | 26.714286 | 103 | 0.695187 |
087f5e35f60c56b63332df21697db83337c88cf6 | 5,839 | ex | Elixir | clients/docs/lib/google_api/docs/v1/model/document_style_suggestion_state.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/docs/lib/google_api/docs/v1/model/document_style_suggestion_state.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/docs/lib/google_api/docs/v1/model/document_style_suggestion_state.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... | 57.245098 | 199 | 0.730947 |
087f7bff0b89e9ce951e2c8635c511a62bf21dbc | 1,329 | ex | Elixir | lib/teiserver_web/controllers/report/report_controller.ex | badosu/teiserver | 19b623aeb7c2ab28756405f7486e92b714777c54 | [
"MIT"
] | 4 | 2021-07-29T16:23:20.000Z | 2022-02-23T05:34:36.000Z | lib/teiserver_web/controllers/report/report_controller.ex | badosu/teiserver | 19b623aeb7c2ab28756405f7486e92b714777c54 | [
"MIT"
] | 14 | 2021-08-01T02:36:14.000Z | 2022-01-30T21:15:03.000Z | lib/teiserver_web/controllers/report/report_controller.ex | badosu/teiserver | 19b623aeb7c2ab28756405f7486e92b714777c54 | [
"MIT"
] | 7 | 2021-05-13T12:55:28.000Z | 2022-01-14T06:39:06.000Z | defmodule TeiserverWeb.Report.ReportController do
use CentralWeb, :controller
plug(AssignPlug,
sidemenu_active: ["teiserver"]
)
plug Bodyguard.Plug.Authorize,
policy: Teiserver.Moderator,
action: {Phoenix.Controller, :action_name},
user: {Central.Account.AuthLib, :current_user}
plug(:add_... | 26.58 | 80 | 0.62453 |
087f8686f490726a1b5a5b861cd24ed1e2d81461 | 547 | ex | Elixir | lib/opencov/core.ex | ramkrishna70/opencov | 7a3415f8eebb797ad1f7b6c832daa4f04d70af8d | [
"MIT"
] | 189 | 2018-09-25T09:02:41.000Z | 2022-03-09T13:52:06.000Z | lib/opencov/core.ex | ramkrishna70/opencov | 7a3415f8eebb797ad1f7b6c832daa4f04d70af8d | [
"MIT"
] | 29 | 2018-09-26T05:51:18.000Z | 2021-11-05T08:55:03.000Z | lib/opencov/core.ex | ramkrishna70/opencov | 7a3415f8eebb797ad1f7b6c832daa4f04d70af8d | [
"MIT"
] | 32 | 2018-10-21T12:28:11.000Z | 2022-03-28T02:20:19.000Z | defmodule Opencov.Core do
defmacro __using__(_opts) do
quote do
import Opencov.Core, only: [pipe_when: 3]
end
end
defmacro pipe_when(left, condition, fun) do
quote do
if Opencov.Core.should_pipe(left, unquote(condition)) do
unquote(left) |> unquote(fun)
else
unquote(... | 21.88 | 70 | 0.665448 |
087fa0c4ce624c55962ebe4668068ba45431d4ad | 1,259 | ex | Elixir | lib/findmy_personal_web/controllers/api/teacher_controller.ex | carlosviana/find_mypersonal | 6fadea6135b074a296c6f2a501a694b5222ec6db | [
"MIT"
] | null | null | null | lib/findmy_personal_web/controllers/api/teacher_controller.ex | carlosviana/find_mypersonal | 6fadea6135b074a296c6f2a501a694b5222ec6db | [
"MIT"
] | 6 | 2021-07-06T17:41:35.000Z | 2021-07-10T10:26:30.000Z | lib/findmy_personal_web/controllers/api/teacher_controller.ex | carlosviana/find_mypersonal | 6fadea6135b074a296c6f2a501a694b5222ec6db | [
"MIT"
] | null | null | null | defmodule FindmyPersonalWeb.Api.TeacherController do
use FindmyPersonalWeb, :controller
alias FindmyPersonal.Teachers
alias FindmyPersonal.Teachers.Teacher
action_fallback FindmyPersonalWeb.FallbackController
def index(conn, _params) do
teacher = Teachers.list_teacher()
render(conn, "index.json", t... | 28.613636 | 91 | 0.676728 |
087fcd9902655cbb93093600c02af0b1999973ad | 596 | exs | Elixir | test/pixel_font/table_source/otf_layout/feature_test.exs | Dalgona/pixel_font | 6a65bf85e5228296eb29fddbfdd690565767ff76 | [
"MIT"
] | 17 | 2020-09-14T15:25:38.000Z | 2022-03-05T17:14:24.000Z | test/pixel_font/table_source/otf_layout/feature_test.exs | Dalgona/pixel_font | 6a65bf85e5228296eb29fddbfdd690565767ff76 | [
"MIT"
] | 1 | 2021-08-19T05:05:37.000Z | 2021-08-19T05:05:37.000Z | test/pixel_font/table_source/otf_layout/feature_test.exs | Dalgona/pixel_font | 6a65bf85e5228296eb29fddbfdd690565767ff76 | [
"MIT"
] | null | null | null | defmodule PixelFont.TableSource.OTFLayout.FeatureTest do
use PixelFont.Case, async: true
alias PixelFont.TableSource.OTFLayout.Feature
describe "compile/2" do
test "compiles a OpenType feature table" do
feature = %Feature{
tag: "liga",
name: "Test Feature",
lookups: ["Lookup 1",... | 28.380952 | 81 | 0.654362 |
087fdc9a23a63c66d6fc7a86007893cf176ccfa2 | 136 | exs | Elixir | test/grovepi/potentiometer/default_trigger_test.exs | asummers/grovepi | 8092fd704457265929e4d9676bedd8cf2176f48d | [
"Apache-2.0"
] | 34 | 2017-08-28T22:44:59.000Z | 2022-02-15T06:37:40.000Z | test/grovepi/potentiometer/default_trigger_test.exs | schainks/grovepi | 2de21f12a2ab28f9788a2add4c6409871e098479 | [
"Apache-2.0"
] | 19 | 2017-08-14T17:27:44.000Z | 2019-05-26T02:49:39.000Z | test/grovepi/potentiometer/default_trigger_test.exs | schainks/grovepi | 2de21f12a2ab28f9788a2add4c6409871e098479 | [
"Apache-2.0"
] | 5 | 2017-09-06T02:20:28.000Z | 2020-03-29T06:05:16.000Z | defmodule GrovePi.Potentiometer.DefaultTriggerTest do
use ExUnit.Case, async: true
doctest GrovePi.Potentiometer.DefaultTrigger
end
| 27.2 | 53 | 0.845588 |
087ff0828a047d670eb3d09cde8397699fe98461 | 1,614 | exs | Elixir | secret-handshake/secret_handshake_test.exs | mauricius/exercism-elixir | c6babb343f9f024a84cfa8328c6adf7a8aa504a5 | [
"MIT"
] | null | null | null | secret-handshake/secret_handshake_test.exs | mauricius/exercism-elixir | c6babb343f9f024a84cfa8328c6adf7a8aa504a5 | [
"MIT"
] | null | null | null | secret-handshake/secret_handshake_test.exs | mauricius/exercism-elixir | c6babb343f9f024a84cfa8328c6adf7a8aa504a5 | [
"MIT"
] | null | null | null | if !System.get_env("EXERCISM_TEST_EXAMPLES") do
Code.load_file("secret_handshake.exs", __DIR__)
end
ExUnit.start()
ExUnit.configure(trace: true, exclude: :pending)
defmodule SecretHandshakeTest do
use ExUnit.Case
describe "Create a handshake for a number" do
test "wink for 1" do
assert SecretHandshak... | 26.9 | 96 | 0.660471 |
087ff3f544d6040e967b912bda40b3fabfd34608 | 12,348 | ex | Elixir | lib/ex_admin/index.ex | ArthurPai/ex_admin | 8894a5e2d4a8ca0c0bfeceded16df3b7058ca665 | [
"MIT"
] | null | null | null | lib/ex_admin/index.ex | ArthurPai/ex_admin | 8894a5e2d4a8ca0c0bfeceded16df3b7058ca665 | [
"MIT"
] | null | null | null | lib/ex_admin/index.ex | ArthurPai/ex_admin | 8894a5e2d4a8ca0c0bfeceded16df3b7058ca665 | [
"MIT"
] | 1 | 2021-04-14T16:18:31.000Z | 2021-04-14T16:18:31.000Z | defmodule ExAdmin.Index do
@moduledoc """
Override the default index page for an ExAdmin resource
By default, ExAdmin renders the index table without any additional
configuration. It renders each column in the model, except the id,
inserted_at, and updated_at columns.
## Default Table Type
ExAdmin disp... | 29.611511 | 118 | 0.621963 |
08800e62009bb5c52bbfcfb3d9b377361d3a96d3 | 984 | ex | Elixir | lib/xgen/generator/standard_callbacks.ex | ejpcmac/ex_gen | ccd2beec8912fa6ea6ff9839454986bf3124b001 | [
"MIT"
] | 1 | 2019-10-06T07:31:06.000Z | 2019-10-06T07:31:06.000Z | lib/xgen/generator/standard_callbacks.ex | ejpcmac/xgen | ccd2beec8912fa6ea6ff9839454986bf3124b001 | [
"MIT"
] | 30 | 2018-08-29T12:52:59.000Z | 2020-05-28T04:54:33.000Z | lib/xgen/generator/standard_callbacks.ex | ejpcmac/ex_gen | ccd2beec8912fa6ea6ff9839454986bf3124b001 | [
"MIT"
] | 1 | 2020-09-25T09:39:56.000Z | 2020-09-25T09:39:56.000Z | defmodule XGen.Generator.StandardCallbacks do
@moduledoc """
Standard callbacks to use in generators.
"""
import Marcus
@doc """
Initialises a Git repository and sets correct permissions on the `.gitsetup`
script if necessary.
"""
@spec init_git(map()) :: map()
def init_git(opts) do
if opts[:g... | 20.5 | 78 | 0.629065 |
0880125e54313079be83803fb53e5905b69587fd | 1,237 | exs | Elixir | all-your-base/all_your_base.exs | ravanscafi/exercism-elixir | 0f5c8c923166a0a795c323c7e2d6ccc9da572fcf | [
"MIT"
] | null | null | null | all-your-base/all_your_base.exs | ravanscafi/exercism-elixir | 0f5c8c923166a0a795c323c7e2d6ccc9da572fcf | [
"MIT"
] | null | null | null | all-your-base/all_your_base.exs | ravanscafi/exercism-elixir | 0f5c8c923166a0a795c323c7e2d6ccc9da572fcf | [
"MIT"
] | null | null | null | defmodule AllYourBase do
@doc """
Given a number in base a, represented as a sequence of digits, converts it to base b,
or returns nil if either of the bases are less than 2
"""
@spec convert(list, integer, integer) :: list
def convert([], _, _), do: nil
def convert(_, base_a, base_b) when base_a < 2 or ... | 26.319149 | 90 | 0.640259 |
08807600addf3d6c662d8c881f82c0436fbd992c | 16,784 | exs | Elixir | test/broadway_dashboard/counters_test.exs | leductam/broadway_dashboard | 57b6b2ddcbfedeaca22a7daf96ee643580b83eb6 | [
"Apache-2.0"
] | 132 | 2021-05-27T12:18:09.000Z | 2022-02-15T09:30:56.000Z | test/broadway_dashboard/counters_test.exs | leductam/broadway_dashboard | 57b6b2ddcbfedeaca22a7daf96ee643580b83eb6 | [
"Apache-2.0"
] | 9 | 2021-05-26T23:22:02.000Z | 2021-09-08T11:43:08.000Z | test/broadway_dashboard/counters_test.exs | leductam/broadway_dashboard | 57b6b2ddcbfedeaca22a7daf96ee643580b83eb6 | [
"Apache-2.0"
] | 9 | 2021-06-28T18:20:01.000Z | 2022-02-21T14:13:28.000Z | defmodule BroadwayDashboard.CountersTest do
use ExUnit.Case, async: true
use ExUnitProperties
alias BroadwayDashboard.Counters
test "build/1 builds counters with a topology without batchers" do
topology = [
producers: [%{name: :default, concurrency: 1}],
processors: [%{name: :default, concurre... | 35.112971 | 98 | 0.645794 |
0880a38b165c56eebe578d87d379bd8b33d29b3d | 1,086 | exs | Elixir | clients/tasks/mix.exs | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/tasks/mix.exs | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/tasks/mix.exs | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | 1 | 2020-11-10T16:58:27.000Z | 2020-11-10T16:58:27.000Z | defmodule GoogleApi.Tasks.V1.Mixfile do
use Mix.Project
@version "0.1.0"
def project do
[app: :google_api_tasks,
version: @version,
elixir: "~> 1.4",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
description: description(),
package: package(),
deps: ... | 22.625 | 105 | 0.592081 |
0880d4533f929c7a48e22b8abc5ab989d3286279 | 3,047 | exs | Elixir | test/ex_check/project_cases/config_and_scripts_test.exs | gerbal/ex_check | 1247075a64d17f69c3e6e9699bd95664cc128466 | [
"MIT"
] | 225 | 2019-07-21T14:44:17.000Z | 2022-03-31T11:08:07.000Z | test/ex_check/project_cases/config_and_scripts_test.exs | gerbal/ex_check | 1247075a64d17f69c3e6e9699bd95664cc128466 | [
"MIT"
] | 23 | 2019-07-30T03:05:42.000Z | 2022-03-06T18:11:50.000Z | test/ex_check/project_cases/config_and_scripts_test.exs | gerbal/ex_check | 1247075a64d17f69c3e6e9699bd95664cc128466 | [
"MIT"
] | 9 | 2019-11-23T23:04:39.000Z | 2022-03-29T00:54:34.000Z | defmodule ExCheck.ProjectCases.ConfigAndScriptsTest do
use ExCheck.ProjectCase, async: true
@config """
[
parallel: false,
skipped: false,
fix: true,
tools: [
{:compiler, false},
{:formatter, enabled: false},
{:ex_unit, order: 2, command: ~w[mix test --cover]},
{:my_mix_t... | 32.073684 | 97 | 0.636364 |
0880e497ecf08588549d46de3d7239e3ae7fc575 | 179 | exs | Elixir | config/dev.exs | 4eek/wax | eee7c5460267dce2cd8fe76df2e05f46e90e50b6 | [
"Apache-2.0"
] | null | null | null | config/dev.exs | 4eek/wax | eee7c5460267dce2cd8fe76df2e05f46e90e50b6 | [
"Apache-2.0"
] | null | null | null | config/dev.exs | 4eek/wax | eee7c5460267dce2cd8fe76df2e05f46e90e50b6 | [
"Apache-2.0"
] | null | null | null | use Mix.Config
config :wax,
origin: "http://localhost:4000",
rp_id: :auto,
metadata_update_interval: 3600,
allowed_attestation_types: [:basic, :uncertain, :attca, :self]
| 22.375 | 64 | 0.72067 |
0880fb7a7db66a89acd733bc4be128bd3e833d7e | 3,289 | exs | Elixir | test/snowpack_test.exs | HGInsights/snowpack | adf1cd8521056896b2e76ad071f761c5f21fc6d5 | [
"Apache-2.0"
] | null | null | null | test/snowpack_test.exs | HGInsights/snowpack | adf1cd8521056896b2e76ad071f761c5f21fc6d5 | [
"Apache-2.0"
] | 13 | 2021-03-25T19:50:58.000Z | 2022-01-26T23:26:28.000Z | test/snowpack_test.exs | HGInsights/snowpack | adf1cd8521056896b2e76ad071f761c5f21fc6d5 | [
"Apache-2.0"
] | null | null | null | defmodule SnowpackTest do
use ExUnit.Case, async: true
import Snowpack.TestHelper
alias Snowpack.Result
describe "connect" do
@tag ciskip: true
test "using ODBC.ini" do
{:ok, pid} = Snowpack.start_link(odbc_ini_opts())
assert {:ok, %Result{columns: ["1"], num_rows: 1, rows: [[1]]}} =
... | 30.453704 | 109 | 0.583156 |
0880fbc29d33f43b7dcfc1036dbcfc31305287e0 | 139 | ex | Elixir | lib/turret_web/controllers/page_controller.ex | rosswilson/turret-elixir | effbc34a14e95d73db2075c66fe78f8432f83977 | [
"MIT"
] | 1 | 2021-02-03T23:34:04.000Z | 2021-02-03T23:34:04.000Z | lib/turret_web/controllers/page_controller.ex | rosswilson/turret-elixir | effbc34a14e95d73db2075c66fe78f8432f83977 | [
"MIT"
] | 58 | 2021-02-16T10:16:08.000Z | 2022-03-07T10:57:32.000Z | lib/turret_web/controllers/page_controller.ex | rosswilson/turret-elixir | effbc34a14e95d73db2075c66fe78f8432f83977 | [
"MIT"
] | null | null | null | defmodule TurretWeb.PageController do
use TurretWeb, :controller
def index(conn, _params) do
render(conn, "index.html")
end
end
| 17.375 | 37 | 0.733813 |
0881038a8cf8c279d315d20ae248d5c8f1a21385 | 2,124 | ex | Elixir | clients/service_user/lib/google_api/service_user/v1/model/backend_rule.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/service_user/lib/google_api/service_user/v1/model/backend_rule.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/service_user/lib/google_api/service_user/v1/model/backend_rule.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... | 37.263158 | 194 | 0.728814 |
08810a29d41ac906d112943c6cdecfdcd9f774c6 | 906 | ex | Elixir | clients/cloud_resource_manager/lib/google_api/cloud_resource_manager/v2/metadata.ex | jechol/elixir-google-api | 0290b683dfc6491ca2ef755a80bc329378738d03 | [
"Apache-2.0"
] | null | null | null | clients/cloud_resource_manager/lib/google_api/cloud_resource_manager/v2/metadata.ex | jechol/elixir-google-api | 0290b683dfc6491ca2ef755a80bc329378738d03 | [
"Apache-2.0"
] | null | null | null | clients/cloud_resource_manager/lib/google_api/cloud_resource_manager/v2/metadata.ex | jechol/elixir-google-api | 0290b683dfc6491ca2ef755a80bc329378738d03 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 33.555556 | 74 | 0.764901 |
088135c33939698a90f18352ccabca09266efe55 | 890 | ex | Elixir | clients/text_to_speech/lib/google_api/text_to_speech/v1/metadata.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/text_to_speech/lib/google_api/text_to_speech/v1/metadata.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/text_to_speech/lib/google_api/text_to_speech/v1/metadata.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 32.962963 | 74 | 0.760674 |
088139bd8e33a04d3c2d29260d5ac72db3c28d13 | 8,294 | exs | Elixir | test/mix/tasks/phx.gen.schema_test.exs | blunckr/fenix | aeccae9658ed3d85d8af8f28ce2584d407b43d6b | [
"MIT"
] | null | null | null | test/mix/tasks/phx.gen.schema_test.exs | blunckr/fenix | aeccae9658ed3d85d8af8f28ce2584d407b43d6b | [
"MIT"
] | null | null | null | test/mix/tasks/phx.gen.schema_test.exs | blunckr/fenix | aeccae9658ed3d85d8af8f28ce2584d407b43d6b | [
"MIT"
] | null | null | null | Code.require_file "../../../installer/test/mix_helper.exs", __DIR__
defmodule Phoenix.DupSchema do
end
defmodule Mix.Tasks.Phx.Gen.SchemaTest do
use ExUnit.Case
import MixHelper
alias Mix.Tasks.Phx.Gen
alias Mix.Phoenix.Schema
setup do
Mix.Task.clear()
:ok
end
test "build" do
in_tmp_projec... | 34.558333 | 131 | 0.652399 |
088165e5c4f8ba36fc86cbfcc5870352977e63cd | 917 | exs | Elixir | apps/feedex_core/test/feedex_core/api/reg_feed_test.exs | andyl/ragged | 2baab0849e2dfc068652ecb2fe88a7c6fe5437d0 | [
"MIT"
] | null | null | null | apps/feedex_core/test/feedex_core/api/reg_feed_test.exs | andyl/ragged | 2baab0849e2dfc068652ecb2fe88a7c6fe5437d0 | [
"MIT"
] | 10 | 2021-02-08T00:01:41.000Z | 2021-05-27T12:54:28.000Z | apps/feedex_core/test/feedex_core/api/reg_feed_test.exs | andyl/ragged | 2baab0849e2dfc068652ecb2fe88a7c6fe5437d0 | [
"MIT"
] | null | null | null | defmodule FeedexCore.Api.RegFeedTest do
use ExUnit.Case, async: true
use FeedexCore.DataCase
alias FeedexCore.Api
describe "#find_or_create_regfeed" do
test "with no precursors" do
fld = insert(:folder)
assert count(Feed) == 0
assert count(Register) == 0
assert count(Folder) == ... | 25.472222 | 82 | 0.619411 |
0881a2e8da8b17433bc3835878fdb867d51e63f2 | 1,000 | ex | Elixir | test/support/conn_case.ex | kupferwerk/ci_visuals | 95b6d56b074d6dbc0aad33764fb1dae38f1e3822 | [
"MIT"
] | null | null | null | test/support/conn_case.ex | kupferwerk/ci_visuals | 95b6d56b074d6dbc0aad33764fb1dae38f1e3822 | [
"MIT"
] | null | null | null | test/support/conn_case.ex | kupferwerk/ci_visuals | 95b6d56b074d6dbc0aad33764fb1dae38f1e3822 | [
"MIT"
] | null | null | null | defmodule CiVisuals.ConnCase do
@moduledoc """
This module defines the test case to be used by
tests that require setting up a connection.
Such tests rely on `Phoenix.ConnTest` and also
imports other functionality to make it easier
to build and query models.
Finally, if the test case interacts with the ... | 23.809524 | 68 | 0.709 |
0881b0238d7594592a8b2b85049d058abe6d878b | 456 | ex | Elixir | lib/forge_sdk/protocol/display/protocol_state.ex | ArcBlock/forge-elixir-sdk | 61ff656a59116d3da18055d54655e8eb5ca15f63 | [
"Apache-2.0"
] | 21 | 2019-05-08T01:25:42.000Z | 2022-02-08T02:30:18.000Z | lib/forge_sdk/protocol/display/protocol_state.ex | ArcBlock/forge-elixir-sdk | 61ff656a59116d3da18055d54655e8eb5ca15f63 | [
"Apache-2.0"
] | 6 | 2019-05-27T23:07:00.000Z | 2020-03-10T04:33:10.000Z | lib/forge_sdk/protocol/display/protocol_state.ex | ArcBlock/forge-elixir-sdk | 61ff656a59116d3da18055d54655e8eb5ca15f63 | [
"Apache-2.0"
] | 2 | 2019-07-21T18:12:47.000Z | 2021-07-31T21:18:38.000Z | defimpl ForgeSdk.Display, for: ForgeAbi.ProtocolState do
@moduledoc """
Implementation of `Display` protocol for `ProtocolState`
"""
alias ForgeSdk.Display
def display(data, expand? \\ false) do
basic = Map.from_struct(data)
group = basic.itx |> Map.get(:tags) |> List.first()
Map.merge(basic, %{... | 25.333333 | 58 | 0.651316 |
0881b55c55cf4ebb8059645d483bc4b6eaf2cc72 | 2,001 | exs | Elixir | lib/oban/crontab/parser.ex.exs | hartzell/oban | 2901cd4655d61eda95813cc1880b003f37cd8983 | [
"Apache-2.0"
] | 1 | 2021-11-20T19:16:24.000Z | 2021-11-20T19:16:24.000Z | lib/oban/crontab/parser.ex.exs | hartzell/oban | 2901cd4655d61eda95813cc1880b003f37cd8983 | [
"Apache-2.0"
] | null | null | null | lib/oban/crontab/parser.ex.exs | hartzell/oban | 2901cd4655d61eda95813cc1880b003f37cd8983 | [
"Apache-2.0"
] | null | null | null | defmodule Oban.Crontab.Parser do
@moduledoc false
# parsec:Oban.Crontab.Parser
import NimbleParsec
month_alias =
[
replace(string("JAN"), 1),
replace(string("FEB"), 2),
replace(string("MAR"), 3),
replace(string("APR"), 4),
replace(string("MAY"), 5),
replace(string("JUN... | 19.811881 | 63 | 0.537231 |
0881bc34b82d57092b90fa1663457125a3fa49a0 | 894 | exs | Elixir | test/kantan_cluster/config_test.exs | mnishiguchi/kantan_cluster | 7398a64f003d38c2fd9674a17dcde0c72053ba2a | [
"MIT"
] | 2 | 2021-10-30T02:37:28.000Z | 2021-10-31T12:43:24.000Z | test/kantan_cluster/config_test.exs | mnishiguchi/kantan_cluster | 7398a64f003d38c2fd9674a17dcde0c72053ba2a | [
"MIT"
] | 1 | 2022-01-09T03:50:16.000Z | 2022-01-10T02:46:55.000Z | test/kantan_cluster/config_test.exs | mnishiguchi/kantan_cluster | 7398a64f003d38c2fd9674a17dcde0c72053ba2a | [
"MIT"
] | null | null | null | defmodule KantanCluster.ConfigTest do
use ExUnit.Case
import KantanCluster.Config
describe "get_node_option/1" do
test "explicit longnames mode" do
opts = [node: {:longnames, :"node@127.0.0.1"}]
assert {:longnames, :"node@127.0.0.1"} == get_node_option(opts)
end
test "explicit shortname... | 29.8 | 80 | 0.638702 |
0881d00d82a29d30326b24e3aab391a7ae1414a2 | 484 | exs | Elixir | config/config.exs | bitcrowd/carbonite | 663af92caa2afa8838cb43800da8e320f323276a | [
"Apache-2.0"
] | 26 | 2021-10-30T06:32:20.000Z | 2022-03-28T14:34:24.000Z | config/config.exs | bitcrowd/carbonite | 663af92caa2afa8838cb43800da8e320f323276a | [
"Apache-2.0"
] | 8 | 2021-10-20T08:03:34.000Z | 2022-02-25T08:48:14.000Z | config/config.exs | bitcrowd/carbonite | 663af92caa2afa8838cb43800da8e320f323276a | [
"Apache-2.0"
] | null | null | null | # SPDX-License-Identifier: Apache-2.0
import Config
if config_env() in [:dev, :test] do
config :carbonite, Carbonite.TestRepo,
database: "carbonite_#{config_env()}",
username: "postgres",
password: "postgres",
hostname: "localhost"
config :carbonite, ecto_repos: [Carbonite.TestRepo]
end
if confi... | 23.047619 | 72 | 0.702479 |
0881d678abd6b848e952bc68f9d51d7022e718ad | 1,449 | ex | Elixir | lib/mail_slurp_api/model/page_alias.ex | mailslurp/mailslurp-client-elixir | 5b98b91bb327de5216e873cd45b4fbb3c1b55c90 | [
"MIT"
] | 1 | 2021-06-17T18:07:49.000Z | 2021-06-17T18:07:49.000Z | lib/mail_slurp_api/model/page_alias.ex | mailslurp/mailslurp-client-elixir | 5b98b91bb327de5216e873cd45b4fbb3c1b55c90 | [
"MIT"
] | null | null | null | lib/mail_slurp_api/model/page_alias.ex | mailslurp/mailslurp-client-elixir | 5b98b91bb327de5216e873cd45b4fbb3c1b55c90 | [
"MIT"
] | 1 | 2021-03-16T18:55:56.000Z | 2021-03-16T18:55:56.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 MailSlurpAPI.Model.PageAlias do
@moduledoc """
Paginated email alias results. Page index starts at zero. Projection results may omit larger entity... | 28.98 | 188 | 0.641132 |
0881d9bf5c18fb7b4175e4ffffda7735e3805041 | 1,524 | exs | Elixir | test/plug/adapters/translator_test.exs | DavidAlphaFox/Plug | 3a98e7667d76ba8d2eb629e518bcb7ac83a1a188 | [
"Apache-2.0"
] | 1 | 2019-05-07T15:05:52.000Z | 2019-05-07T15:05:52.000Z | test/plug/adapters/translator_test.exs | DavidAlphaFox/Plug | 3a98e7667d76ba8d2eb629e518bcb7ac83a1a188 | [
"Apache-2.0"
] | null | null | null | test/plug/adapters/translator_test.exs | DavidAlphaFox/Plug | 3a98e7667d76ba8d2eb629e518bcb7ac83a1a188 | [
"Apache-2.0"
] | null | null | null | defmodule Plug.Adapters.TranslatorTest do
use ExUnit.Case
def init(opts) do
opts
end
def call(%{path_info: ["warn"]}, _opts) do
raise Plug.Parsers.UnsupportedMediaTypeError, media_type: "foo/bar"
end
def call(%{path_info: ["error"]}, _opts) do
raise "oops"
end
import ExUnit.CaptureIO
... | 28.222222 | 90 | 0.632546 |
0881dec4507e594d3c58064e9842dc40dc814b3b | 1,067 | exs | Elixir | mix.exs | smeevil/pay_nl | 8b62ed5c01405aba432e56e8c2b6c5774da1470a | [
"WTFPL"
] | 3 | 2017-10-03T12:30:57.000Z | 2020-01-06T00:23:59.000Z | mix.exs | smeevil/pay_nl | 8b62ed5c01405aba432e56e8c2b6c5774da1470a | [
"WTFPL"
] | null | null | null | mix.exs | smeevil/pay_nl | 8b62ed5c01405aba432e56e8c2b6c5774da1470a | [
"WTFPL"
] | 1 | 2019-02-11T11:12:17.000Z | 2019-02-11T11:12:17.000Z | defmodule PayNL.Mixfile do
use Mix.Project
def project do
[
app: :pay_nl,
version: "0.1.0",
elixir: "~> 1.7",
start_permanent: Mix.env == :prod,
deps: deps(),
test_coverage: [
tool: ExCoveralls
],
preferred_cli_env: [
coveralls: :test
],
... | 21.77551 | 65 | 0.477976 |
0881fa1ccb61d705c1224e0e73e95f73ff49477f | 1,027 | ex | Elixir | lib/asteroid/object_store/authenticated_session/mnesia/purge.ex | tanguilp/asteroid | 8e03221d365da7f03f82df192c535d3ba2101f4d | [
"Apache-2.0"
] | 36 | 2019-07-23T20:01:05.000Z | 2021-08-05T00:52:34.000Z | lib/asteroid/object_store/authenticated_session/mnesia/purge.ex | tanguilp/asteroid | 8e03221d365da7f03f82df192c535d3ba2101f4d | [
"Apache-2.0"
] | 19 | 2019-08-23T19:04:50.000Z | 2021-05-07T22:12:25.000Z | lib/asteroid/object_store/authenticated_session/mnesia/purge.ex | tanguilp/asteroid | 8e03221d365da7f03f82df192c535d3ba2101f4d | [
"Apache-2.0"
] | 3 | 2019-09-06T10:47:20.000Z | 2020-09-09T03:43:31.000Z | defmodule Asteroid.ObjectStore.AuthenticatedSession.Mnesia.Purge do
@moduledoc false
use GenServer
require Logger
def start_link(opts) do
GenServer.start_link(__MODULE__, opts)
end
def init(opts) do
if opts[:purge_interval] != :no_purge do
Process.send_after(self(), :purge, opts[:purge_inte... | 22.822222 | 91 | 0.64557 |
0881fa6fdebb240afc2852f10b6781a3c411ff68 | 2,569 | ex | Elixir | astreu/deps/prometheus_ex/lib/prometheus/injector.ex | wesleimp/Astreu | 4d430733e7ecc8b3eba8e27811a152aa2c6d79c1 | [
"Apache-2.0"
] | null | null | null | astreu/deps/prometheus_ex/lib/prometheus/injector.ex | wesleimp/Astreu | 4d430733e7ecc8b3eba8e27811a152aa2c6d79c1 | [
"Apache-2.0"
] | null | null | null | astreu/deps/prometheus_ex/lib/prometheus/injector.ex | wesleimp/Astreu | 4d430733e7ecc8b3eba8e27811a152aa2c6d79c1 | [
"Apache-2.0"
] | null | null | null | defmodule Prometheus.Injector do
def inject(callback, env, ast) do
ast
|> Macro.prewalk(fn thing ->
case thing do
{:def, _, _} = defun ->
defun
# otherwise e in RuntimeError will be rewritten
{:in, _, _} = arrow ->
arrow
_ ->
Macro.expand(t... | 23.144144 | 93 | 0.546516 |
08823695766806daee14529942e6cf4edd05ca89 | 384 | exs | Elixir | clients/people/test/test_helper.exs | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/people/test/test_helper.exs | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/people/test/test_helper.exs | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | 1 | 2020-11-10T16:58:27.000Z | 2020-11-10T16:58:27.000Z | ExUnit.start()
defmodule GoogleApi.People.V1.TestHelper do
defmacro __using__(opts) do
quote do
use ExUnit.Case, unquote(opts)
import GoogleApi.People.V1.TestHelper
end
end
def for_scope(scopes) when is_list(scopes), do: for_scope(Enum.join(scopes, " "))
def for_scope(scope) do
{:ok, ... | 20.210526 | 83 | 0.695313 |
0882370e3255161379626747d2875d1f2daf42b5 | 658 | ex | Elixir | lib/hello_world.ex | chrta/hello_world_elixir | 6fbcca1042d3c49b43c1650178c2de3bd80fe3f5 | [
"MIT"
] | null | null | null | lib/hello_world.ex | chrta/hello_world_elixir | 6fbcca1042d3c49b43c1650178c2de3bd80fe3f5 | [
"MIT"
] | null | null | null | lib/hello_world.ex | chrta/hello_world_elixir | 6fbcca1042d3c49b43c1650178c2de3bd80fe3f5 | [
"MIT"
] | null | null | null | defmodule HelloWorld do
use Application
# See http://elixir-lang.org/docs/stable/elixir/Application.html
# for more information on OTP Applications
def start(_type, _args) do
import Supervisor.Spec, warn: false
children = [
# Define workers and child supervisors to be supervised
# worker(H... | 29.909091 | 67 | 0.705167 |
08824460cc390683f7d52d8be941319a0bae9095 | 54 | exs | Elixir | test/test_helper.exs | kianmeng/spider_man | 48941f42e901d03f7c6cc1f8aaf6f8a35d576614 | [
"Apache-2.0"
] | 5 | 2021-05-08T08:50:58.000Z | 2021-11-27T09:59:56.000Z | test/test_helper.exs | kianmeng/spider_man | 48941f42e901d03f7c6cc1f8aaf6f8a35d576614 | [
"Apache-2.0"
] | null | null | null | test/test_helper.exs | kianmeng/spider_man | 48941f42e901d03f7c6cc1f8aaf6f8a35d576614 | [
"Apache-2.0"
] | 1 | 2021-08-05T15:50:49.000Z | 2021-08-05T15:50:49.000Z | System.put_env("TMPDIR", "tmp")
ExUnit.start(seed: 0)
| 18 | 31 | 0.703704 |
088246f1bd420c76193e880851bd910e2dedd454 | 137 | ex | Elixir | lib/execution/frame.ex | ElixiumNetwork/WaspVM | 7a313825ed50720256dda6e61e83356621357963 | [
"MIT"
] | 112 | 2018-12-14T23:43:38.000Z | 2019-03-22T22:02:27.000Z | lib/execution/frame.ex | ElixiumNetwork/Elixium-Wasm | 7a313825ed50720256dda6e61e83356621357963 | [
"MIT"
] | 21 | 2018-12-22T23:53:14.000Z | 2019-02-21T00:18:05.000Z | lib/execution/frame.ex | ElixiumNetwork/Elixium-Wasm | 7a313825ed50720256dda6e61e83356621357963 | [
"MIT"
] | 4 | 2019-05-11T16:37:19.000Z | 2021-05-18T13:45:06.000Z | defmodule AlchemyVM.Frame do
defstruct [:module, :instructions, :locals, :gas_limit, labels: [], snapshots: []]
@moduledoc false
end
| 27.4 | 84 | 0.722628 |
08825e03c83bccfb4e3dc96a514cb897b089188c | 276 | exs | Elixir | backend/priv/repo/migrations/20220129204713_create_logs.exs | ugbots/ggj2022 | 1c7b9f6694268951f93a11fde91fa9573c179c26 | [
"MIT"
] | null | null | null | backend/priv/repo/migrations/20220129204713_create_logs.exs | ugbots/ggj2022 | 1c7b9f6694268951f93a11fde91fa9573c179c26 | [
"MIT"
] | null | null | null | backend/priv/repo/migrations/20220129204713_create_logs.exs | ugbots/ggj2022 | 1c7b9f6694268951f93a11fde91fa9573c179c26 | [
"MIT"
] | null | null | null | defmodule Backend.Repo.Migrations.CreateLogs do
use Ecto.Migration
def change do
create table(:logs) do
add :message, :string
add :user_id, references(:users, on_delete: :nothing)
timestamps()
end
create index(:logs, [:user_id])
end
end
| 18.4 | 59 | 0.666667 |
08826ede1175ee0fdf460b42a55b02f143713f7d | 917 | exs | Elixir | rel/config/config.exs | styx/co2_offset | ac4b2bce8142e2d33ea089322c8dade34839448b | [
"Apache-2.0"
] | 15 | 2018-12-26T10:31:16.000Z | 2020-12-01T09:27:01.000Z | rel/config/config.exs | styx/co2_offset | ac4b2bce8142e2d33ea089322c8dade34839448b | [
"Apache-2.0"
] | 267 | 2018-12-26T07:46:17.000Z | 2020-04-04T17:05:47.000Z | rel/config/config.exs | styx/co2_offset | ac4b2bce8142e2d33ea089322c8dade34839448b | [
"Apache-2.0"
] | 1 | 2019-07-12T13:53:25.000Z | 2019-07-12T13:53:25.000Z | use Mix.Config
defmodule Helpers do
def get_env(name) do
case System.get_env(name) do
nil -> raise "Environment variable #{name} is not set!"
val -> val
end
end
end
# ensure that other env variables exists
Helpers.get_env("ERLANG_COOKIE")
config :co2_offset, Co2Offset.Endpoint, secret_key_bas... | 27.787879 | 91 | 0.738277 |
0882769aa573ff786ff2185c925de6d189865f7a | 2,105 | ex | Elixir | clients/game_services/lib/google_api/game_services/v1/model/list_game_server_configs_response.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/game_services/lib/google_api/game_services/v1/model/list_game_server_configs_response.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/game_services/lib/google_api/game_services/v1/model/list_game_server_configs_response.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... | 39.716981 | 157 | 0.741568 |
08827af0729e61664ec513cb81a1f8042de7d4c1 | 1,366 | ex | Elixir | address_validator/apps/address_validator_api/lib/address_validator_api.ex | aikssen/address_hackaton | 38f608d23705052776ce26f38ba67a6c1ef52ab2 | [
"MIT"
] | null | null | null | address_validator/apps/address_validator_api/lib/address_validator_api.ex | aikssen/address_hackaton | 38f608d23705052776ce26f38ba67a6c1ef52ab2 | [
"MIT"
] | null | null | null | address_validator/apps/address_validator_api/lib/address_validator_api.ex | aikssen/address_hackaton | 38f608d23705052776ce26f38ba67a6c1ef52ab2 | [
"MIT"
] | null | null | null | defmodule AddressValidatorApi do
@moduledoc """
Documentation for AddressValidatorApi.
"""
defstruct [:address, :response]
alias AddressValidatorApi.Repo
alias AddressValidatorApi.Address
@doc """
Validate a given address
"""
def validate_address(address) do
# If addres is in cache return valu... | 27.32 | 72 | 0.668375 |
0882ac25144cb50e63b7801151918c142a69c752 | 1,144 | ex | Elixir | core/ets/config_cache.ex | wses-yoshida/antikythera | e108e59d2339edd0b0fad31ad4f41f56df45be55 | [
"Apache-2.0"
] | null | null | null | core/ets/config_cache.ex | wses-yoshida/antikythera | e108e59d2339edd0b0fad31ad4f41f56df45be55 | [
"Apache-2.0"
] | null | null | null | core/ets/config_cache.ex | wses-yoshida/antikythera | e108e59d2339edd0b0fad31ad4f41f56df45be55 | [
"Apache-2.0"
] | null | null | null | # Copyright(c) 2015-2019 ACCESS CO., LTD. All rights reserved.
use Croma
defmodule AntikytheraCore.Ets.ConfigCache do
defun init() :: :ok do
AntikytheraCore.Ets.create_read_optimized_table(table_name())
end
defun table_name() :: atom do
:antikythera_config_cache
end
end
defmodule AntikytheraCore.Ets... | 25.422222 | 76 | 0.690559 |
0882b1b11506aec5c7a58060798537743436fd0a | 794 | ex | Elixir | lib/flickrex/oauth.ex | christopheradams/flickrex | 67e3a507e128c55969aeda3802f6dacd94bb03c5 | [
"MIT"
] | 13 | 2017-04-02T10:55:10.000Z | 2022-03-02T02:55:40.000Z | lib/flickrex/oauth.ex | christopheradams/flickrex | 67e3a507e128c55969aeda3802f6dacd94bb03c5 | [
"MIT"
] | null | null | null | lib/flickrex/oauth.ex | christopheradams/flickrex | 67e3a507e128c55969aeda3802f6dacd94bb03c5 | [
"MIT"
] | 1 | 2021-01-31T17:47:27.000Z | 2021-01-31T17:47:27.000Z | defmodule Flickrex.OAuth do
@moduledoc false
@type method :: atom | String.t()
@type url :: String.t() | URI.t()
@type params :: Keyword.t()
@type consumer_key :: String.t()
@type consumer_secret :: String.t()
@type token :: nil | String.t()
@type token_secret :: nil | String.t()
@type signed :: [{St... | 30.538462 | 95 | 0.664987 |
08832b88a42195466059553e59a6c26f222616b1 | 1,392 | ex | Elixir | lib/ash/api/transformers/ensure_resources_compiled.ex | MrFlorius/ash | 247abbb8333d252da5440a58ddf4f1b7f184342f | [
"MIT"
] | null | null | null | lib/ash/api/transformers/ensure_resources_compiled.ex | MrFlorius/ash | 247abbb8333d252da5440a58ddf4f1b7f184342f | [
"MIT"
] | null | null | null | lib/ash/api/transformers/ensure_resources_compiled.ex | MrFlorius/ash | 247abbb8333d252da5440a58ddf4f1b7f184342f | [
"MIT"
] | null | null | null | defmodule Ash.Api.Transformers.EnsureResourcesCompiled do
@moduledoc """
Ensures that all resources for a given api are compiled.
This is required for later transformers.
"""
use Ash.Dsl.Transformer
alias Ash.Dsl.Transformer
require Logger
def transform(module, dsl, times \\ 3) do
dsl
|> Tran... | 24.857143 | 93 | 0.574713 |
08834d9a7f4583617504ebbc02948d88d053c58e | 1,038 | ex | Elixir | web/controllers/todo_controller.ex | tykowale/todo_api | 8e154dc2fef0cac79bd97646a338c569486a0e0a | [
"MIT"
] | null | null | null | web/controllers/todo_controller.ex | tykowale/todo_api | 8e154dc2fef0cac79bd97646a338c569486a0e0a | [
"MIT"
] | null | null | null | web/controllers/todo_controller.ex | tykowale/todo_api | 8e154dc2fef0cac79bd97646a338c569486a0e0a | [
"MIT"
] | null | null | null | defmodule Todos.TodoController do
use Todos.Web, :controller
alias Todos.Todo
plug :scrub_params, "todo" when action in [:create, :update]
plug Todos.Authentication
def index(conn, _params) do
user_id = conn.assigns.current_user.id
query = from t in Todo, where: t.owner_id == ^user_id
todos = R... | 22.085106 | 62 | 0.581888 |
08834f74656423662b24dfb840b9d4964f53b77a | 922 | ex | Elixir | test/support/channel_case.ex | kw7oe/til | 5ecaa3d199c06d535d1bbbfa05e2dc88e86ad815 | [
"MIT"
] | null | null | null | test/support/channel_case.ex | kw7oe/til | 5ecaa3d199c06d535d1bbbfa05e2dc88e86ad815 | [
"MIT"
] | 2 | 2020-04-26T14:03:27.000Z | 2020-12-12T17:14:02.000Z | test/support/channel_case.ex | kw7oe/til | 5ecaa3d199c06d535d1bbbfa05e2dc88e86ad815 | [
"MIT"
] | null | null | null | defmodule TilWeb.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 with ... | 24.263158 | 65 | 0.710412 |
088369f1ef58541ca71aace06b7434db00537a80 | 3,651 | ex | Elixir | lib/recase.ex | kempt09/recase | d6bebb6e801c3d70e585ee58bbf6bc142670e3e1 | [
"MIT"
] | null | null | null | lib/recase.ex | kempt09/recase | d6bebb6e801c3d70e585ee58bbf6bc142670e3e1 | [
"MIT"
] | null | null | null | lib/recase.ex | kempt09/recase | d6bebb6e801c3d70e585ee58bbf6bc142670e3e1 | [
"MIT"
] | null | null | null | defmodule Recase do
@moduledoc """
Recase allows you to convert string from any to any case.
This module contains public interface.
"""
alias Recase.{
CamelCase,
ConstantCase,
DotCase,
HeaderCase,
KebabCase,
NameCase,
PascalCase,
PathCase,
SentenceCase,
SnakeCase,
... | 20.396648 | 71 | 0.627499 |
08837a4a321bc1b9988d6088ebb49d99fe774b7c | 5,355 | ex | Elixir | test/fixtures/autobahn_client.ex | hkrutzer/mint_web_socket | 213bdc56addbc3d7b5344d14b6e194cc1ca3024f | [
"Apache-2.0"
] | null | null | null | test/fixtures/autobahn_client.ex | hkrutzer/mint_web_socket | 213bdc56addbc3d7b5344d14b6e194cc1ca3024f | [
"Apache-2.0"
] | null | null | null | test/fixtures/autobahn_client.ex | hkrutzer/mint_web_socket | 213bdc56addbc3d7b5344d14b6e194cc1ca3024f | [
"Apache-2.0"
] | null | null | null | defmodule AutobahnClient do
@moduledoc """
A client that uses Mint.WebSocket to test against the Autobahn|Testsuite
WebSocket testing suite
"""
import Kernel, except: [send: 2]
require Logger
defstruct [:conn, :websocket, :ref, messages: [], next: :cont, sent_close?: false, buffer: <<>>]
defguardp is... | 27.603093 | 116 | 0.621849 |
08838218c067835352cd4b4d0cc9f78d697f4bc0 | 1,709 | ex | Elixir | clients/admin/lib/google_api/admin/reports_v1/model/activity_id.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/admin/lib/google_api/admin/reports_v1/model/activity_id.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/admin/lib/google_api/admin/reports_v1/model/activity_id.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.865385 | 106 | 0.746635 |
088384093d3b54fa7751458d08f6f024e9717354 | 3,264 | ex | Elixir | clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/in_toto.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/in_toto.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/in_toto.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... | 48 | 306 | 0.735294 |
0883a8a997dd548d007c608a85747557bb7b5194 | 951 | exs | Elixir | services/fc_inventory/mix.exs | fleadope/freshcom | 8d5944befaa6eea8d31e5f5995939be2a1a44262 | [
"BSD-3-Clause"
] | 46 | 2018-10-13T23:18:13.000Z | 2021-08-07T07:46:51.000Z | services/fc_inventory/mix.exs | fleadope/freshcom | 8d5944befaa6eea8d31e5f5995939be2a1a44262 | [
"BSD-3-Clause"
] | 25 | 2018-10-14T00:56:07.000Z | 2019-12-23T19:41:02.000Z | services/fc_inventory/mix.exs | fleadope/freshcom | 8d5944befaa6eea8d31e5f5995939be2a1a44262 | [
"BSD-3-Clause"
] | 5 | 2018-12-16T04:39:51.000Z | 2020-10-01T12:17:03.000Z | defmodule FCInventory.MixProject do
use Mix.Project
def project do
[
app: :fc_inventory,
name: "Freshcom Inventory",
version: "0.1.0",
elixir: "~> 1.7",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix... | 23.195122 | 64 | 0.553102 |
0883b000a94e5969916ba2667956aa259d3282c8 | 205 | ex | Elixir | test/support/custom_parsers.ex | mediapress-ltd/solid | 025b49ab9d8286d4fc557085331cc7643e0beb20 | [
"MIT"
] | 1 | 2021-11-16T19:10:02.000Z | 2021-11-16T19:10:02.000Z | test/support/custom_parsers.ex | mediapress-ltd/solid | 025b49ab9d8286d4fc557085331cc7643e0beb20 | [
"MIT"
] | null | null | null | test/support/custom_parsers.ex | mediapress-ltd/solid | 025b49ab9d8286d4fc557085331cc7643e0beb20 | [
"MIT"
] | null | null | null | defmodule CustomDateParser do
use Solid.Parser.Base, custom_tags: ["current_date", "get_year_of_date"]
end
defmodule CustomFooParser do
use Solid.Parser.Base, custom_tags: ["foobar", "foobarval"]
end
| 25.625 | 74 | 0.780488 |
0883e2c61871ef05bdbbf5e9a16b731de10da577 | 17,732 | ex | Elixir | lib/aws/generated/work_mail.ex | salemove/aws-elixir | debdf6482158a71a57636ac664c911e682093395 | [
"Apache-2.0"
] | null | null | null | lib/aws/generated/work_mail.ex | salemove/aws-elixir | debdf6482158a71a57636ac664c911e682093395 | [
"Apache-2.0"
] | null | null | null | lib/aws/generated/work_mail.ex | salemove/aws-elixir | debdf6482158a71a57636ac664c911e682093395 | [
"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.WorkMail do
@moduledoc """
Amazon WorkMail is a secure, managed business email and calendaring service with
support for existing desktop and mobile email clients.
You can access your emai... | 37.096234 | 173 | 0.718419 |
0883f6d6a7e0dec4cfa51f4117557043bc5c1f51 | 6,990 | exs | Elixir | test/phoenix/endpoint/render_errors_test.exs | coderberry/phoenix | 9abaa84ea675d3db97cfba77745e76300acb6fd2 | [
"MIT"
] | null | null | null | test/phoenix/endpoint/render_errors_test.exs | coderberry/phoenix | 9abaa84ea675d3db97cfba77745e76300acb6fd2 | [
"MIT"
] | null | null | null | test/phoenix/endpoint/render_errors_test.exs | coderberry/phoenix | 9abaa84ea675d3db97cfba77745e76300acb6fd2 | [
"MIT"
] | null | null | null | defmodule Phoenix.Endpoint.RenderErrorsTest do
use ExUnit.Case, async: true
use RouterHelper
import ExUnit.CaptureLog
view = __MODULE__
def render("app.html", %{view_template: view_template} = assigns) do
"Layout: " <> render(view_template, assigns)
end
def render("404.html", %{kind: kind, reason: ... | 27.96 | 93 | 0.634335 |
0884226f9be29746ddc1cf1715bc166f59da1d09 | 1,446 | ex | Elixir | lib/dogma/rule/function_arity.ex | lpil/dogma | e0f55c27ec3053be0313ac93f3d036437ee590a1 | [
"MIT"
] | 558 | 2015-06-21T18:20:59.000Z | 2021-12-30T16:25:47.000Z | lib/dogma/rule/function_arity.ex | lpil/dogma | e0f55c27ec3053be0313ac93f3d036437ee590a1 | [
"MIT"
] | 252 | 2015-06-19T13:00:47.000Z | 2021-04-21T08:04:16.000Z | lib/dogma/rule/function_arity.ex | lpil/dogma | e0f55c27ec3053be0313ac93f3d036437ee590a1 | [
"MIT"
] | 79 | 2015-06-21T14:18:30.000Z | 2021-12-30T16:26:09.000Z | use Dogma.RuleBuilder
defrule Dogma.Rule.FunctionArity, max: 4 do
@moduledoc """
A rule that disallows functions and macros with arity greater than 4, meaning
a function may not take more than 4 arguments.
By default this function is considered invalid by this rule:
def transform(a, b, c, d, e) do
... | 23.322581 | 79 | 0.613416 |
08846b38ceccb3b6efaa848efbf56f3235114a71 | 327 | ex | Elixir | lib/repoex_web/auth/error_handler.ex | RomuloHe4rt/Repoex | 6ccf09e1f0be63d3021533c3c9bd7b8e5fd73925 | [
"MIT"
] | null | null | null | lib/repoex_web/auth/error_handler.ex | RomuloHe4rt/Repoex | 6ccf09e1f0be63d3021533c3c9bd7b8e5fd73925 | [
"MIT"
] | null | null | null | lib/repoex_web/auth/error_handler.ex | RomuloHe4rt/Repoex | 6ccf09e1f0be63d3021533c3c9bd7b8e5fd73925 | [
"MIT"
] | null | null | null | defmodule RepoexWeb.Auth.ErrorHandler do
import Plug.Conn
alias Guardian.Plug.ErrorHandler
@behaviour ErrorHandler
def auth_error(conn, {error, _reason}, _opts) do
body = Jason.encode!(%{message: to_string(error)})
conn
|> put_resp_content_type("application/json")
|> send_resp(401, body)
e... | 20.4375 | 54 | 0.715596 |
0884a63f5562c8644ac56cafac8af05c614ed96d | 400 | exs | Elixir | test/api_key_test.exs | norbertnull/pubg_api | 54b20ec91feeefc72d6dc2034cd70da62f06083a | [
"Apache-2.0"
] | null | null | null | test/api_key_test.exs | norbertnull/pubg_api | 54b20ec91feeefc72d6dc2034cd70da62f06083a | [
"Apache-2.0"
] | null | null | null | test/api_key_test.exs | norbertnull/pubg_api | 54b20ec91feeefc72d6dc2034cd70da62f06083a | [
"Apache-2.0"
] | null | null | null | defmodule PubgApiTest.ApiKey do
use ExUnit.Case
doctest PubgApi.ApiKey
test "Generate API Key string" do
assert PubgApi.ApiKey.generate("api_key") == "Bearer api_key"
end
test "Add API Key string to header map" do
api_key = "api_key"
header_map =
%{}
|> PubgApi.ApiKey.add_to_headers... | 21.052632 | 65 | 0.6875 |
0884adc401f8fa66fc92c49ec958b3996c54fe80 | 10,357 | exs | Elixir | test/expression_test.exs | turnhub/expression | 51b857bc1d9f276a2bd8750892eddebd5f35f922 | [
"Apache-2.0"
] | 4 | 2020-12-13T21:11:13.000Z | 2022-01-18T19:20:30.000Z | test/expression_test.exs | turnhub/expression | 51b857bc1d9f276a2bd8750892eddebd5f35f922 | [
"Apache-2.0"
] | 31 | 2021-02-08T07:12:49.000Z | 2022-03-04T10:54:40.000Z | test/expression_test.exs | turnhub/expression | 51b857bc1d9f276a2bd8750892eddebd5f35f922 | [
"Apache-2.0"
] | null | null | null | defmodule ExpressionTest do
use ExUnit.Case, async: true
doctest Expression
describe "types" do
test "text" do
assert {:ok, [text: "hello"]} = Expression.parse("hello")
end
test "decimal" do
value = Decimal.new("1.23")
assert {:ok, [substitution: [block: [literal: ^value]]]} = Exp... | 32.569182 | 95 | 0.487883 |
0884b908392fef5c4386ecb8d687a80a4e9021f1 | 517 | ex | Elixir | lib/webpipe/session_store.ex | hyperngn/webpipe | 67393cdc6f5fc26fccc24d1081341239f2d7d733 | [
"MIT"
] | 36 | 2020-05-25T07:55:10.000Z | 2021-11-09T11:18:47.000Z | lib/webpipe/session_store.ex | hyperngn/webpipe | 67393cdc6f5fc26fccc24d1081341239f2d7d733 | [
"MIT"
] | null | null | null | lib/webpipe/session_store.ex | hyperngn/webpipe | 67393cdc6f5fc26fccc24d1081341239f2d7d733 | [
"MIT"
] | 1 | 2020-05-25T15:04:24.000Z | 2020-05-25T15:04:24.000Z | defmodule Webpipe.SessionStore do
use GenServer
def start_link(_opts) do
GenServer.start_link(__MODULE__, :state)
end
@impl GenServer
def init(_opts) do
# {"foo" => [#<PID1>, #<PID2>], "bar"....}
:ets.new(:sessions, [:named_table, :public, :bag])
{:ok, :state}
end
def get_listeners(sess... | 21.541667 | 54 | 0.642166 |
0884d532e8c2f7fc1842928e0090a64ca20d93c9 | 482 | exs | Elixir | priv/repo/migrations/20190118235356_add_transactions_table.exs | pakorn186c/blockchain-api | 3c9fbc892e645f9bb144414f3da36749603f37bc | [
"Apache-2.0"
] | 17 | 2019-11-03T03:02:41.000Z | 2022-01-13T17:03:32.000Z | priv/repo/migrations/20190118235356_add_transactions_table.exs | AddressXception/blockchain-api | eea98fa78af2887cc84762f84532c602c3b8b666 | [
"Apache-2.0"
] | 5 | 2019-11-07T23:26:53.000Z | 2020-11-24T21:45:35.000Z | priv/repo/migrations/20190118235356_add_transactions_table.exs | AddressXception/blockchain-api | eea98fa78af2887cc84762f84532c602c3b8b666 | [
"Apache-2.0"
] | 11 | 2019-12-04T07:03:16.000Z | 2022-01-13T17:03:50.000Z | defmodule BlockchainAPI.Repo.Migrations.AddTransactionsTable do
use Ecto.Migration
def change do
create table(:transactions) do
add :hash, :binary, null: false
add :type, :string, null: false
add :status, :string, null: false, default: "cleared"
add :block_height, references(:blocks, o... | 25.368421 | 95 | 0.688797 |
0884daaeb4e2494b60a8486a7a534e5b1dfc808d | 7,382 | exs | Elixir | test/brando/blueprints/blueprint_test.exs | univers-agency/brando | 69c3c52498a3f64518da3522cd9f27294a52cc68 | [
"Apache-2.0"
] | 1 | 2020-04-26T09:53:02.000Z | 2020-04-26T09:53:02.000Z | test/brando/blueprints/blueprint_test.exs | univers-agency/brando | 69c3c52498a3f64518da3522cd9f27294a52cc68 | [
"Apache-2.0"
] | 198 | 2019-08-20T16:16:07.000Z | 2020-07-03T15:42:07.000Z | test/brando/blueprints/blueprint_test.exs | univers-agency/brando | 69c3c52498a3f64518da3522cd9f27294a52cc68 | [
"Apache-2.0"
] | null | null | null | defmodule Brando.Blueprint.BlueprintTest do
use ExUnit.Case
alias Brando.Blueprint.Asset
alias Brando.Blueprint.Attribute
alias Brando.Blueprint.Relation
test "naming" do
assert Brando.BlueprintTest.Project.__naming__().application == "Brando"
assert Brando.BlueprintTest.Project.__naming__().domain =... | 35.834951 | 94 | 0.483744 |
088501a93aef8f88b00c6700e9174753fddced8c | 1,274 | exs | Elixir | mix.exs | henb/phoenix_swoosh | 9815955a92a7550379f56e40cea4212b04fde9c9 | [
"MIT"
] | null | null | null | mix.exs | henb/phoenix_swoosh | 9815955a92a7550379f56e40cea4212b04fde9c9 | [
"MIT"
] | null | null | null | mix.exs | henb/phoenix_swoosh | 9815955a92a7550379f56e40cea4212b04fde9c9 | [
"MIT"
] | null | null | null | defmodule PhoenixSwoosh.Mixfile do
use Mix.Project
@version "0.2.0"
def project do
[app: :phoenix_swoosh,
version: @version,
elixir: "~> 1.2",
compilers: compilers(Mix.env),
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps(),
# Hex
desc... | 23.592593 | 70 | 0.578493 |
0885119450b62c730cda2474fbdfcddb84080219 | 3,139 | ex | Elixir | clients/sql_admin/lib/google_api/sql_admin/v1beta4/api/flags.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/sql_admin/lib/google_api/sql_admin/v1beta4/api/flags.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/sql_admin/lib/google_api/sql_admin/v1beta4/api/flags.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 43 | 187 | 0.675056 |
08852a4714d27bd393aa7fa303a5914a406f3564 | 61 | exs | Elixir | apps/kv_server/config/prod.exs | WhiteRookPL/production-debugging-workshop.ex | 26e81d14ba39c33764ddaee5d6d65a6061f4e823 | [
"MIT"
] | 5 | 2017-05-03T08:05:54.000Z | 2022-03-11T04:11:00.000Z | apps/kv_server/config/prod.exs | WhiteRookPL/production-debugging-workshop.ex | 26e81d14ba39c33764ddaee5d6d65a6061f4e823 | [
"MIT"
] | null | null | null | apps/kv_server/config/prod.exs | WhiteRookPL/production-debugging-workshop.ex | 26e81d14ba39c33764ddaee5d6d65a6061f4e823 | [
"MIT"
] | null | null | null | use Mix.Config
config :kv_server, :persistence_enabled, true | 20.333333 | 45 | 0.819672 |
08852ed571ef51399b3e0b9a52d5c6e81cb3fe20 | 560 | exs | Elixir | mix.exs | robinhilliard/lightplane | 8b73829ada29b31574df48aa437fd8087e9d1e60 | [
"MIT-0"
] | 3 | 2020-07-15T10:08:09.000Z | 2020-07-15T10:31:07.000Z | mix.exs | robinhilliard/lightplane | 8b73829ada29b31574df48aa437fd8087e9d1e60 | [
"MIT-0"
] | null | null | null | mix.exs | robinhilliard/lightplane | 8b73829ada29b31574df48aa437fd8087e9d1e60 | [
"MIT-0"
] | null | null | null | defmodule Aero.MixProject do
use Mix.Project
def project do
[
app: :lightplane,
version: "0.1.0",
elixir: "~> 1.9",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_app... | 19.310345 | 59 | 0.566071 |
088547611552a8d05a63fa5e0ed33203f191d4c6 | 116 | exs | Elixir | exercises/02-higher-order-functions/02-goodbye-loops/13-max_by/solution.exs | DennisWinnepenninckx/distributed-applications | 06743e4e2a09dc52ff52be831e486bb073916173 | [
"BSD-3-Clause"
] | 1 | 2021-09-22T09:52:11.000Z | 2021-09-22T09:52:11.000Z | exercises/02-higher-order-functions/02-goodbye-loops/13-max_by/solution.exs | DennisWinnepenninckx/distributed-applications | 06743e4e2a09dc52ff52be831e486bb073916173 | [
"BSD-3-Clause"
] | 22 | 2019-06-19T18:58:13.000Z | 2020-03-16T14:43:06.000Z | exercises/02-higher-order-functions/02-goodbye-loops/13-max_by/solution.exs | DennisWinnepenninckx/distributed-applications | 06743e4e2a09dc52ff52be831e486bb073916173 | [
"BSD-3-Clause"
] | 32 | 2019-09-19T03:25:11.000Z | 2020-10-06T15:01:47.000Z | defmodule Grades do
def best_student(grades) do
elem(Enum.max_by(grades, fn {_, _, g} -> g end), 1)
end
end
| 19.333333 | 55 | 0.655172 |
088567efe349e9b69b7e900d37f832c04e271ba0 | 779 | ex | Elixir | lib/anchore_engine_api_server/model/image_selection_rule.ex | michaeljguarino/anchore-elixir-client | 156a44f429ecb62433729a2b4c52de5dc0ef44d2 | [
"MIT"
] | null | null | null | lib/anchore_engine_api_server/model/image_selection_rule.ex | michaeljguarino/anchore-elixir-client | 156a44f429ecb62433729a2b4c52de5dc0ef44d2 | [
"MIT"
] | null | null | null | lib/anchore_engine_api_server/model/image_selection_rule.ex | michaeljguarino/anchore-elixir-client | 156a44f429ecb62433729a2b4c52de5dc0ef44d2 | [
"MIT"
] | 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 AnchoreEngineAPIServer.Model.ImageSelectionRule do
@moduledoc """
"""
@derive [Poison.Encoder]
defstruct [
:id,
:image,
:nam... | 21.638889 | 83 | 0.691913 |
088572f2cfaa4dd8c20f2c6c4f58d315c15ac185 | 39,225 | ex | Elixir | lib/livebook/session.ex | alaadahmed/livebook | 24668c6edb6ee638a3f5291b27bd42a3dfc0c18d | [
"Apache-2.0"
] | 1,846 | 2021-04-13T14:46:36.000Z | 2021-07-14T20:37:40.000Z | lib/livebook/session.ex | alaadahmed/livebook | 24668c6edb6ee638a3f5291b27bd42a3dfc0c18d | [
"Apache-2.0"
] | 411 | 2021-07-15T07:41:54.000Z | 2022-03-31T21:34:22.000Z | lib/livebook/session.ex | alaadahmed/livebook | 24668c6edb6ee638a3f5291b27bd42a3dfc0c18d | [
"Apache-2.0"
] | 130 | 2021-04-13T15:43:55.000Z | 2021-07-12T16:57:46.000Z | defmodule Livebook.Session do
@moduledoc false
# Server corresponding to a single notebook session.
#
# The process keeps the current notebook state and serves
# as a source of truth that multiple clients talk to.
# Receives update requests from the clients and notifies
# them of any changes applied to t... | 30.837264 | 98 | 0.678751 |
088573657dd31515766036900b587638a2156e96 | 974 | exs | Elixir | apps/hard_hat/mix.exs | gullintanni/gullintanni | 63c58b7ea438a4c6885a13842d8e33d3b1273ced | [
"0BSD"
] | 15 | 2016-08-09T21:27:54.000Z | 2020-12-03T11:21:10.000Z | apps/hard_hat/mix.exs | gullintanni/gullintanni | 63c58b7ea438a4c6885a13842d8e33d3b1273ced | [
"0BSD"
] | 15 | 2016-08-04T21:11:05.000Z | 2017-08-02T17:46:17.000Z | apps/hard_hat/mix.exs | gullintanni/gullintanni | 63c58b7ea438a4c6885a13842d8e33d3b1273ced | [
"0BSD"
] | null | null | null | defmodule HardHat.Mixfile do
use Mix.Project
def project() do
[
app: :hard_hat,
version: "0.1.0",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixir: "~> 1.3",
build_embedded: Mix.env ==... | 20.723404 | 49 | 0.488706 |
0885bf40629c9e5c9a0c63a9ac25d810d9a88592 | 1,881 | exs | Elixir | mix.exs | membraneframework/membrane-element-lame | fb8db6170ed8c4cb95432e941d707a1e87175780 | [
"Apache-2.0"
] | 2 | 2018-07-27T14:08:58.000Z | 2019-03-01T10:19:37.000Z | mix.exs | membraneframework/membrane-element-lame | fb8db6170ed8c4cb95432e941d707a1e87175780 | [
"Apache-2.0"
] | 9 | 2018-10-15T07:58:53.000Z | 2020-10-22T13:51:43.000Z | mix.exs | membraneframework/membrane-element-lame | fb8db6170ed8c4cb95432e941d707a1e87175780 | [
"Apache-2.0"
] | 1 | 2019-02-06T10:28:42.000Z | 2019-02-06T10:28:42.000Z | defmodule Membrane.MP3.Lame.Mixfile do
use Mix.Project
@version "0.14.0"
@github_url "https://github.com/membraneframework/membrane_mp3_lame_plugin"
def project do
[
app: :membrane_mp3_lame_plugin,
version: @version,
elixir: "~> 1.9",
elixirc_paths: elixirc_paths(Mix.env()),
... | 26.492958 | 97 | 0.565657 |
0885c9f284681ba6667e352d50f4814184e48c7b | 499 | exs | Elixir | test/rfx_cli/arg_test.exs | andyl/rfxi | 9007c75693d643555c45a20e9634dd4b3867deba | [
"MIT"
] | 1 | 2021-08-10T14:46:10.000Z | 2021-08-10T14:46:10.000Z | test/rfx_cli/arg_test.exs | andyl/rfxi | 9007c75693d643555c45a20e9634dd4b3867deba | [
"MIT"
] | 2 | 2021-06-22T14:12:37.000Z | 2021-06-28T05:06:23.000Z | test/rfx_cli/arg_test.exs | andyl/rfxi | 9007c75693d643555c45a20e9634dd4b3867deba | [
"MIT"
] | null | null | null | defmodule RfxCli.ArgTest do
use ExUnit.Case
alias RfxCli.Arg
alias RfxCli.State
describe "#gen_token" do
test "generates output" do
assert Arg.gen_token(:ok)
end
end
describe "#build" do
test "basic output" do
result = %{argv: "--help"} |> State.new() |> Arg.build()
assert r... | 19.192308 | 62 | 0.629259 |
0885e413084c15af0fe1fdfbfbc7c6ce9e468fe0 | 6,097 | exs | Elixir | lib/elixir/test/elixir/record_test.exs | Nicd/elixir | e62ef92a4be1b562033d35b2d822cc9d6c661077 | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/record_test.exs | Nicd/elixir | e62ef92a4be1b562033d35b2d822cc9d6c661077 | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/record_test.exs | Nicd/elixir | e62ef92a4be1b562033d35b2d822cc9d6c661077 | [
"Apache-2.0"
] | null | null | null | Code.require_file "test_helper.exs", __DIR__
defrecord RecordTest.FileInfo,
Record.extract(:file_info, from_lib: "kernel/include/file.hrl")
defrecord RecordTest.SomeRecord, a: 0, b: 1
defrecord RecordTest.WithNoField, []
## Record import
defmodule RecordTest.FileInfo.Helper do
Record.import RecordTest.FileInfo,... | 25.51046 | 85 | 0.689683 |
0885ffe3e99b883b5ed500d6d1b340b84a9c1183 | 717 | exs | Elixir | day_03/exercise1.exs | dams/adventofcode | dac9638c6fe3c99b726de8899e9baedf2efbb15a | [
"Artistic-2.0"
] | null | null | null | day_03/exercise1.exs | dams/adventofcode | dac9638c6fe3c99b726de8899e9baedf2efbb15a | [
"Artistic-2.0"
] | null | null | null | day_03/exercise1.exs | dams/adventofcode | dac9638c6fe3c99b726de8899e9baedf2efbb15a | [
"Artistic-2.0"
] | null | null | null | defmodule Exercise1 do
def parse(input) do
parse(input, 0, 0, %{ "0x0" => 1 } )
end
def parse(">" <> rest, x, y, dict) do
parse(rest, x+1, y, Dict.put_new(dict, gen_key(x+1, y), 1))
end
def parse("<" <> rest, x, y, dict) do
parse(rest, x-1, y, Dict.put_new(dict, gen_key(x-1, y), 1))
end
def parse("^" <>... | 21.727273 | 61 | 0.592748 |
08860c566d755ab729bca657f3f1de33afead099 | 1,464 | ex | Elixir | architect/lib/architect_web/context.ex | VJftw/velocity | 8335c39c510dbde1446e6cde03eebb450339d212 | [
"Apache-2.0"
] | 3 | 2017-12-09T21:05:54.000Z | 2019-08-06T08:13:34.000Z | architect/lib/architect_web/context.ex | VJftw/velocity | 8335c39c510dbde1446e6cde03eebb450339d212 | [
"Apache-2.0"
] | 63 | 2017-09-09T15:44:24.000Z | 2022-03-03T22:16:24.000Z | architect/lib/architect_web/context.ex | VJftw/velocity | 8335c39c510dbde1446e6cde03eebb450339d212 | [
"Apache-2.0"
] | 5 | 2017-09-14T00:17:22.000Z | 2019-11-27T14:43:45.000Z | defmodule ArchitectWeb.Context do
@behaviour Plug
alias Architect.Accounts
alias Architect.Accounts.User
alias Architect.Repo
import Plug.Conn
def init(opts), do: opts
def call(conn, _) do
context = build_context(conn)
put_private(conn, :absinthe, %{context: context})
end
defp build_contex... | 24.4 | 98 | 0.645492 |
088639f8246803aca9b0ba7e742b4711e1ebc540 | 1,891 | ex | Elixir | clients/books/lib/google_api/books/v1/model/series_series_series_subscription_release_info_next_release_info.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/books/lib/google_api/books/v1/model/series_series_series_subscription_release_info_next_release_info.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/books/lib/google_api/books/v1/model/series_series_series_subscription_release_info_next_release_info.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... | 31 | 94 | 0.710735 |
08865eb81a884f93c4a8872074617053d8f92e0a | 13,329 | ex | Elixir | lib/ex_unit/lib/ex_unit/assertions.ex | jeregrine/elixir | 080201477955bcd2d755fb4162966dc6882b1521 | [
"Apache-2.0"
] | null | null | null | lib/ex_unit/lib/ex_unit/assertions.ex | jeregrine/elixir | 080201477955bcd2d755fb4162966dc6882b1521 | [
"Apache-2.0"
] | null | null | null | lib/ex_unit/lib/ex_unit/assertions.ex | jeregrine/elixir | 080201477955bcd2d755fb4162966dc6882b1521 | [
"Apache-2.0"
] | null | null | null | defexception ExUnit.AssertionError, message: "assertion failed"
defexception ExUnit.ExpectationError, expected: nil, actual: nil, assertion: "",
negation: false, prelude: "Expected", expr: nil do
def message(exception) do
if desc = exception.expr do
"#{exception.prelude} #{desc} #{exception.full_asser... | 25.054511 | 125 | 0.633281 |
0886742dfe2a1a4e6299ba43c68e99e07161e962 | 3,495 | exs | Elixir | test/req_test.exs | walkr/exns | 40379d38ce363b6f9208182dc3309529b1939fe3 | [
"MIT"
] | 6 | 2016-06-12T12:59:21.000Z | 2018-09-23T06:57:42.000Z | test/req_test.exs | walkr/exns | 40379d38ce363b6f9208182dc3309529b1939fe3 | [
"MIT"
] | null | null | null | test/req_test.exs | walkr/exns | 40379d38ce363b6f9208182dc3309529b1939fe3 | [
"MIT"
] | null | null | null | defmodule Exns.RequestWorkerTest do
use ExUnit.Case, async: true
setup_all do
# Start math service
pid1 = spawn fn ->
path = Path.join(System.cwd, "priv/math_service.py")
System.cmd "python", [path]
end
# Start string service
pid2 = spawn fn ->... | 26.278195 | 83 | 0.526466 |
08868099ab317c4c3f57f8847fbc8a2ce66c3f45 | 620 | exs | Elixir | test/configuration_test.exs | schultyy/localci | 0105ff01de1fd4a05dfa9d1e60f8ba79dc120d25 | [
"MIT"
] | null | null | null | test/configuration_test.exs | schultyy/localci | 0105ff01de1fd4a05dfa9d1e60f8ba79dc120d25 | [
"MIT"
] | null | null | null | test/configuration_test.exs | schultyy/localci | 0105ff01de1fd4a05dfa9d1e60f8ba79dc120d25 | [
"MIT"
] | null | null | null | defmodule ConfigurationTest do
use ExUnit.Case
def read_config do
File.read!("test/example_config.json")
end
setup do
config = LocalCi.Configuration.parse(read_config)
{:ok, config: config}
end
test "returns object from json", meta do
assert meta[:config] != nil
end
test "has reposit... | 21.37931 | 76 | 0.675806 |
088688a0627c4e9264a251e1218f159fdbf754de | 1,735 | ex | Elixir | clients/script/lib/google_api/script/v1/model/create_project_request.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/script/lib/google_api/script/v1/model/create_project_request.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/script/lib/google_api/script/v1/model/create_project_request.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... | 33.365385 | 132 | 0.720461 |
088690bb8318273e1a2bb97a7351f3ed447a7307 | 59 | ex | Elixir | lib/bitpal_web/views/home_view.ex | bitpal/bitpal | 0e10eeaacf7a65b23945cfb95e4dbda8bffd4590 | [
"BSD-3-Clause-Clear"
] | 5 | 2021-05-04T21:28:00.000Z | 2021-12-01T11:19:48.000Z | lib/bitpal_web/views/home_view.ex | bitpal/bitpal | 0e10eeaacf7a65b23945cfb95e4dbda8bffd4590 | [
"BSD-3-Clause-Clear"
] | 71 | 2021-04-21T05:48:49.000Z | 2022-03-23T06:30:37.000Z | lib/bitpal_web/views/home_view.ex | bitpal/bitpal | 0e10eeaacf7a65b23945cfb95e4dbda8bffd4590 | [
"BSD-3-Clause-Clear"
] | 1 | 2021-04-25T10:35:41.000Z | 2021-04-25T10:35:41.000Z | defmodule BitPalWeb.HomeView do
use BitPalWeb, :view
end
| 14.75 | 31 | 0.79661 |
088699518c8c416b1aa7dec9ef78229da88b1311 | 4,233 | exs | Elixir | test/review_scraper_test.exs | andrhevictor/review_scraper | 7628b814d7d35b185bd9bfbe83400c68486bd19a | [
"MIT"
] | null | null | null | test/review_scraper_test.exs | andrhevictor/review_scraper | 7628b814d7d35b185bd9bfbe83400c68486bd19a | [
"MIT"
] | null | null | null | test/review_scraper_test.exs | andrhevictor/review_scraper | 7628b814d7d35b185bd9bfbe83400c68486bd19a | [
"MIT"
] | null | null | null | defmodule ReviewScraperTest do
use ExUnit.Case
import ReviewScraper.DealerRaterMock
alias ReviewScraper.DealerRater.Review
setup do
mock_dealer_rater_endpoint(200)
end
describe "get_overly_positive_reviews/2" do
test "loads the three most positive reviews from a dealership" do
assert {:ok,... | 27.666667 | 90 | 0.616112 |
08869d8dfca9e97aaa00ab64b8b7274f5bb82579 | 543 | exs | Elixir | priv/repo/migrations/20180606004418_create_book_instance.exs | zephraph/readtome | 64a5f773bdc3c19d9c5ac50a04aa14e446e36c55 | [
"MIT"
] | 1 | 2021-09-05T20:54:57.000Z | 2021-09-05T20:54:57.000Z | priv/repo/migrations/20180606004418_create_book_instance.exs | zephraph/readtome | 64a5f773bdc3c19d9c5ac50a04aa14e446e36c55 | [
"MIT"
] | 17 | 2019-07-06T17:31:56.000Z | 2021-06-22T15:31:06.000Z | priv/repo/migrations/20180606004418_create_book_instance.exs | zephraph/readtome | 64a5f773bdc3c19d9c5ac50a04aa14e446e36c55 | [
"MIT"
] | 1 | 2021-03-15T20:50:27.000Z | 2021-03-15T20:50:27.000Z | defmodule Readtome.Repo.Migrations.CreateBookInstances do
use Ecto.Migration
def change do
execute "CREATE EXTENSION IF NOT EXISTS postgis"
create table(:book_instances) do
add :condition, :string
add :medium, :string
add :offerings, :string
add :location, :geometry
add :avail... | 24.681818 | 59 | 0.6814 |
0886c398a28dd79b8e8ae1174b591acc1232b664 | 2,624 | ex | Elixir | clients/tool_results/lib/google_api/tool_results/v1/model/non_sdk_api_insight.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/tool_results/lib/google_api/tool_results/v1/model/non_sdk_api_insight.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/tool_results/lib/google_api/tool_results/v1/model/non_sdk_api_insight.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... | 41.650794 | 192 | 0.73628 |
0886fe6535085e41f1410f82508ae9adc983ee6f | 6,156 | ex | Elixir | lib/oban/repo.ex | kianmeng/oban | 2ee44412f8ed3b5940017131eb29bf5296a7cf55 | [
"Apache-2.0"
] | null | null | null | lib/oban/repo.ex | kianmeng/oban | 2ee44412f8ed3b5940017131eb29bf5296a7cf55 | [
"Apache-2.0"
] | null | null | null | lib/oban/repo.ex | kianmeng/oban | 2ee44412f8ed3b5940017131eb29bf5296a7cf55 | [
"Apache-2.0"
] | null | null | null | defmodule Oban.Repo do
@moduledoc """
Wrappers around `Ecto.Repo` callbacks.
These functions should be used when working with an Ecto repo inside a plugin. These functions
will resolve the correct repo instance, and set the schema prefix and the log level, according
to the Oban configuration.
"""
@type ... | 31.090909 | 96 | 0.585932 |
08874816fb743e6af1f670a7ec5a6fcc9504b6ec | 1,238 | exs | Elixir | config/test.exs | MatthieuSegret/yummy-phoenix-graphql | f0b258293697b0b120ef8e8a3b3905043c998617 | [
"MIT"
] | 122 | 2017-11-24T11:28:17.000Z | 2022-02-25T17:05:20.000Z | config/test.exs | MatthieuSegret/yummy-phoenix-graphql | f0b258293697b0b120ef8e8a3b3905043c998617 | [
"MIT"
] | 6 | 2018-01-11T22:07:44.000Z | 2021-11-21T15:41:42.000Z | config/test.exs | MatthieuSegret/yummy-phoenix-graphql | f0b258293697b0b120ef8e8a3b3905043c998617 | [
"MIT"
] | 25 | 2018-04-01T02:43:21.000Z | 2022-02-15T03:22:54.000Z | use Mix.Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :yummy, YummyWeb.Endpoint,
http: [port: System.get_env("PORT") || 4000],
server: true
config :yummy, :sql_sandbox, true
config :wallaby,
driver: Wallaby.Experimental.Chrome,
# screenshot_o... | 27.511111 | 66 | 0.727787 |
08874b8480c8a438b8173acaa799b603a95cfe16 | 1,555 | ex | Elixir | lib/store_card_web/views/error_helpers.ex | manojsamanta/stripe-store-card | 5acc474240fe0eb85cfa8a3ef1d696d12694ad14 | [
"MIT"
] | null | null | null | lib/store_card_web/views/error_helpers.ex | manojsamanta/stripe-store-card | 5acc474240fe0eb85cfa8a3ef1d696d12694ad14 | [
"MIT"
] | null | null | null | lib/store_card_web/views/error_helpers.ex | manojsamanta/stripe-store-card | 5acc474240fe0eb85cfa8a3ef1d696d12694ad14 | [
"MIT"
] | null | null | null | defmodule StoreCardWeb.ErrorHelpers do
@moduledoc """
Conveniences for translating and building error messages.
"""
use Phoenix.HTML
@doc """
Generates tag for inlined form input errors.
"""
def error_tag(form, field) do
Enum.map(Keyword.get_values(form.errors, field), fn error ->
content_ta... | 32.395833 | 78 | 0.666881 |
088759230c3a9d47df8263f9d848215e4a15774c | 1,900 | ex | Elixir | lib/new_relic/transaction.ex | runtastic/newrelic-elixir | 6e9b1337277962402e4f910e39168bbed3ff4991 | [
"MIT"
] | 7 | 2017-03-14T14:29:55.000Z | 2018-03-27T20:27:27.000Z | lib/new_relic/transaction.ex | runtastic/newrelic-elixir | 6e9b1337277962402e4f910e39168bbed3ff4991 | [
"MIT"
] | 1 | 2017-05-15T11:45:53.000Z | 2017-05-16T17:56:44.000Z | lib/new_relic/transaction.ex | runtastic/newrelic-elixir | 6e9b1337277962402e4f910e39168bbed3ff4991 | [
"MIT"
] | 1 | 2017-05-15T10:33:56.000Z | 2017-05-15T10:33:56.000Z | defmodule NewRelic.Transaction do
@moduledoc """
Records information about an instrumented web transaction.
"""
defstruct [:name, :start_time]
@typedoc "A New Relixir transaction context."
@opaque t :: %__MODULE__{name: String.t, start_time: :erlang.timestamp}
@typedoc "The name of a query."
@type qu... | 30.15873 | 98 | 0.705263 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.