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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
65da5c39094af11897e66c4aa177728f6e2ebbbd | 695 | ex | Elixir | test/support/integration_case.ex | edwinthinks/semaphore-demo-elixir-phoenix | 16c60f1a37f204156a17628947a7dda552a76ee0 | [
"MIT"
] | 1 | 2020-03-19T13:26:01.000Z | 2020-03-19T13:26:01.000Z | test/support/integration_case.ex | edwinthinks/semaphore-demo-elixir-phoenix | 16c60f1a37f204156a17628947a7dda552a76ee0 | [
"MIT"
] | 6 | 2019-05-29T16:34:19.000Z | 2021-09-01T02:10:43.000Z | test/support/integration_case.ex | edwinthinks/semaphore-demo-elixir-phoenix | 16c60f1a37f204156a17628947a7dda552a76ee0 | [
"MIT"
] | 68 | 2019-05-16T15:40:51.000Z | 2022-03-20T06:30:53.000Z | defmodule SemaWeb.IntegrationCase do
@moduledoc """
This module defines the test case to be used by
integration tests.
"""
use ExUnit.CaseTemplate
using do
quote do
use Wallaby.DSL
alias Sema.Repo
import Ecto
import Ecto.{Changeset, Query}
alias SemaWeb.Router.Helpers, ... | 21.060606 | 71 | 0.669065 |
65da6a0ab544ddbbda7d89730317e1b3cbcd6ce0 | 1,550 | ex | Elixir | tags_service/test/support/data_case.ex | miguelriosoliveira/dowhile-mural | 3f616bf7d536f0442b41f6f8795af43ed54e61a0 | [
"MIT"
] | null | null | null | tags_service/test/support/data_case.ex | miguelriosoliveira/dowhile-mural | 3f616bf7d536f0442b41f6f8795af43ed54e61a0 | [
"MIT"
] | null | null | null | tags_service/test/support/data_case.ex | miguelriosoliveira/dowhile-mural | 3f616bf7d536f0442b41f6f8795af43ed54e61a0 | [
"MIT"
] | null | null | null | defmodule Nlw07HeatTags.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,
we enable the SQL sandbox, so changes don... | 29.807692 | 94 | 0.70129 |
65da9fc9e3b218cffc4cc45553291c0e53dd1a29 | 2,343 | exs | Elixir | mix.exs | jnylen/task_bunny | 72f014960b71b3e4b2685f9296c28819cd85929f | [
"MIT"
] | null | null | null | mix.exs | jnylen/task_bunny | 72f014960b71b3e4b2685f9296c28819cd85929f | [
"MIT"
] | 55 | 2020-05-12T05:18:41.000Z | 2022-03-24T04:04:17.000Z | mix.exs | jnylen/task_bunny | 72f014960b71b3e4b2685f9296c28819cd85929f | [
"MIT"
] | null | null | null | defmodule TaskBunny.Mixfile do
use Mix.Project
@version "0.3.4"
@description "Background processing application/library written in Elixir that uses RabbitMQ as a messaging backend"
def project do
[
app: :task_bunny,
version: @version,
elixir: "~> 1.4",
elixirc_paths: elixirc_paths(... | 25.193548 | 118 | 0.528809 |
65dad9d18df9f912be11ac62eb2fd345bd66259e | 875 | exs | Elixir | day10/test/day10_test.exs | bjorng/advent-of-code-2017 | bd58a36864a4d82809253770f8a6d0c4e02cb59a | [
"Apache-2.0"
] | null | null | null | day10/test/day10_test.exs | bjorng/advent-of-code-2017 | bd58a36864a4d82809253770f8a6d0c4e02cb59a | [
"Apache-2.0"
] | null | null | null | day10/test/day10_test.exs | bjorng/advent-of-code-2017 | bd58a36864a4d82809253770f8a6d0c4e02cb59a | [
"Apache-2.0"
] | null | null | null | defmodule Day10Test do
use ExUnit.Case
doctest Day10
test "test part 1 with examples" do
assert Day10.part1(5, example()) == 12
end
test "test part 1 with my input data" do
# 3540 (60 * 59) -- too low
# 8648 (94 * 92) -- too high
assert Day10.part1(256, input()) == 3770
end
test "test p... | 25.735294 | 72 | 0.667429 |
65dae2782a53137990a16dd1ab5988b6ff8aa028 | 10,696 | ex | Elixir | test/support/search.ex | hou8/ex_aliyun_ots | 46aaca99fa6c9aa9640bb206a1ab31e400b73404 | [
"MIT"
] | null | null | null | test/support/search.ex | hou8/ex_aliyun_ots | 46aaca99fa6c9aa9640bb206a1ab31e400b73404 | [
"MIT"
] | null | null | null | test/support/search.ex | hou8/ex_aliyun_ots | 46aaca99fa6c9aa9640bb206a1ab31e400b73404 | [
"MIT"
] | null | null | null | defmodule ExAliyunOtsTest.Support.Search do
import ExAliyunOts.DSL, only: [condition: 1]
require Logger
alias ExAliyunOts.{Var, Client}
alias ExAliyunOts.Var.Search
alias ExAliyunOts.Const.PKType
alias ExAliyunOts.Const.Search.FieldType
require PKType
require FieldType
import ExAliyunOts.Search, only... | 29.30411 | 98 | 0.58779 |
65daf28914b8664aa468e8e9ef1cc144af38491d | 3,243 | ex | Elixir | clients/dns/lib/google_api/dns/v1/model/change.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/dns/lib/google_api/dns/v1/model/change.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/dns/lib/google_api/dns/v1/model/change.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... | 49.892308 | 459 | 0.713537 |
65db039c779dc84187be879e04ea580fe734c013 | 2,918 | ex | Elixir | clients/managed_identities/lib/google_api/managed_identities/v1/model/google_cloud_saasaccelerator_management_providers_v1_per_sli_slo_eligibility.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/managed_identities/lib/google_api/managed_identities/v1/model/google_cloud_saasaccelerator_management_providers_v1_per_sli_slo_eligibility.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/managed_identities/lib/google_api/managed_identities/v1/model/google_cloud_saasaccelerator_management_providers_v1_per_sli_slo_eligibility.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... | 47.836066 | 1,006 | 0.778958 |
65db30ce40ae45f9ee5798a881f778e381007489 | 1,176 | ex | Elixir | lib/hexpm/billing/billing.ex | lau/hexpm | beee80f5358a356530debfea35ee65c3a0aa9b25 | [
"Apache-2.0"
] | null | null | null | lib/hexpm/billing/billing.ex | lau/hexpm | beee80f5358a356530debfea35ee65c3a0aa9b25 | [
"Apache-2.0"
] | null | null | null | lib/hexpm/billing/billing.ex | lau/hexpm | beee80f5358a356530debfea35ee65c3a0aa9b25 | [
"Apache-2.0"
] | null | null | null | defmodule Hexpm.Billing do
@type organization() :: String.t()
@callback checkout(organization(), data :: map()) :: map()
@callback dashboard(organization()) :: map() | nil
@callback cancel(organization()) :: map()
@callback create(map()) :: {:ok, map()} | {:error, map()}
@callback update(organization(), ma... | 45.230769 | 85 | 0.671769 |
65db50a57f245c1cc5fe503c652e4d54d9ed8d24 | 1,606 | ex | Elixir | clients/service_consumer_management/lib/google_api/service_consumer_management/v1/model/delete_tenant_project_request.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/service_consumer_management/lib/google_api/service_consumer_management/v1/model/delete_tenant_project_request.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/service_consumer_management/lib/google_api/service_consumer_management/v1/model/delete_tenant_project_request.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... | 32.12 | 98 | 0.759651 |
65db6ee374c1981b1ffed6cb73a428e36ce6d019 | 148 | exs | Elixir | test/printer/utils/common_operations_test.exs | HenkPoley/json-schema-to-elm | 92230ac907d1eab27a0c8e4d969c5104f8e66383 | [
"MIT"
] | 74 | 2017-03-05T22:26:34.000Z | 2022-03-14T13:22:47.000Z | test/printer/utils/common_operations_test.exs | HenkPoley/json-schema-to-elm | 92230ac907d1eab27a0c8e4d969c5104f8e66383 | [
"MIT"
] | 43 | 2017-03-05T22:56:21.000Z | 2022-03-26T19:19:26.000Z | test/printer/utils/common_operations_test.exs | HenkPoley/json-schema-to-elm | 92230ac907d1eab27a0c8e4d969c5104f8e66383 | [
"MIT"
] | 6 | 2017-06-19T01:49:32.000Z | 2018-06-22T02:04:24.000Z | defmodule JS2ETest.Printer.Utils.CommonOperations do
use ExUnit.Case, async: true
doctest JS2E.Printer.Utils.CommonOperations, import: true
end
| 29.6 | 59 | 0.817568 |
65db742eed59ffa52547f3cc1a324ddb8f9a1b19 | 516 | ex | Elixir | lib/timetracker_web/controllers/work_block_controller.ex | LunarLogic/timetracker | 5c2ffffc9023c7b099d7af8de7f21225352483ca | [
"MIT"
] | 1 | 2019-06-26T06:53:01.000Z | 2019-06-26T06:53:01.000Z | lib/timetracker_web/controllers/work_block_controller.ex | LunarLogic/timetracker | 5c2ffffc9023c7b099d7af8de7f21225352483ca | [
"MIT"
] | null | null | null | lib/timetracker_web/controllers/work_block_controller.ex | LunarLogic/timetracker | 5c2ffffc9023c7b099d7af8de7f21225352483ca | [
"MIT"
] | null | null | null | defmodule TimetrackerWeb.WorkBlockController do
use TimetrackerWeb, :controller
def index(conn, _params) do
work_blocks = Timetracker.WorkBlocks.list_work_blocks()
render(conn, "index.html", work_blocks: work_blocks)
end
def start(conn, _params) do
Timetracker.WorkBlocks.start()
redirect(conn,... | 27.157895 | 60 | 0.728682 |
65db8e2eee786213d5342949e538898fd37bd8f8 | 3,749 | ex | Elixir | clients/firestore/lib/google_api/firestore/v1beta1/model/partition_query_request.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/firestore/lib/google_api/firestore/v1beta1/model/partition_query_request.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/firestore/lib/google_api/firestore/v1beta1/model/partition_query_request.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"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... | 63.542373 | 661 | 0.746066 |
65dbb4bc7101303b7eb42b6aa1e6ab2f4a2dc6ca | 2,209 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/vm_endpoint_nat_mappings_list_warning.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/compute/lib/google_api/compute/v1/model/vm_endpoint_nat_mappings_list_warning.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/vm_endpoint_nat_mappings_list_warning.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 ... | 40.907407 | 194 | 0.730647 |
65dbb6501d79b6ee8d0f07bb11b1456a8262dfbd | 507 | exs | Elixir | code/enum/longest_line.exs | alvarocamillont/introdu-o_elixir | 1d72d4f4b01d9312c4b066ce3c0fe8d9bfaaade1 | [
"MIT"
] | null | null | null | code/enum/longest_line.exs | alvarocamillont/introdu-o_elixir | 1d72d4f4b01d9312c4b066ce3c0fe8d9bfaaade1 | [
"MIT"
] | 1 | 2021-03-09T16:27:25.000Z | 2021-03-09T16:27:25.000Z | programming-elixir-book/code/enum/longest_line.exs | jordanhubbard/elixir-projects | dee341d672e83a45a17a4a85abd54a480f95c506 | [
"BSD-2-Clause"
] | null | null | null | #---
# Excerpted from "Programming Elixir ≥ 1.6",
# published by The Pragmatic Bookshelf.
# Copyrights apply to this code. It may not be used to create training material,
# courses, books, articles, and the like. Contact us if you are in doubt.
# We make no guarantees that this code is fit for any purpose.
# Visit http... | 46.090909 | 85 | 0.717949 |
65dbd9879e198f3fd558b8f91e029b891fa603dd | 755 | exs | Elixir | priv/repo/migrations/20170630084751_add_event_notification_trigger.exs | mbuhot/irateburgers | 3ea07805501c10ef9b04cee04c22c36582f26e1e | [
"MIT"
] | 1 | 2020-01-13T09:27:21.000Z | 2020-01-13T09:27:21.000Z | priv/repo/migrations/20170630084751_add_event_notification_trigger.exs | mbuhot/irateburgers | 3ea07805501c10ef9b04cee04c22c36582f26e1e | [
"MIT"
] | null | null | null | priv/repo/migrations/20170630084751_add_event_notification_trigger.exs | mbuhot/irateburgers | 3ea07805501c10ef9b04cee04c22c36582f26e1e | [
"MIT"
] | null | null | null | defmodule Irateburgers.Repo.Migrations.AddEventNotificationTrigger do
use Ecto.Migration
def up do
execute """
CREATE OR REPLACE FUNCTION notify_events_added()
RETURNS trigger AS $$
BEGIN
PERFORM pg_notify(
'events',
json_build_object(
'id', NEW.id,
'aggreg... | 20.972222 | 69 | 0.611921 |
65dc5597aa6def3b12123618a5be5a86d770b02c | 3,907 | ex | Elixir | clients/ad_experience_report/lib/google_api/ad_experience_report/v1/api/sites.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/ad_experience_report/lib/google_api/ad_experience_report/v1/api/sites.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/ad_experience_report/lib/google_api/ad_experience_report/v1/api/sites.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... | 42.467391 | 196 | 0.652163 |
65dc810bcf78dcc06ac1da5b54903b970fbd5932 | 2,541 | ex | Elixir | lib/glimesh_web/views/layout_view.ex | LittleToonCat/glimesh.tv | 97b0eb7881888faeb525e6a99cc73ebb559e8eba | [
"MIT"
] | null | null | null | lib/glimesh_web/views/layout_view.ex | LittleToonCat/glimesh.tv | 97b0eb7881888faeb525e6a99cc73ebb559e8eba | [
"MIT"
] | null | null | null | lib/glimesh_web/views/layout_view.ex | LittleToonCat/glimesh.tv | 97b0eb7881888faeb525e6a99cc73ebb559e8eba | [
"MIT"
] | null | null | null | defmodule GlimeshWeb.LayoutView do
use GlimeshWeb, :view
def html_root_tags(conn) do
[]
|> site_them_attribute(conn)
|> lang_attribute(conn)
|> Enum.join(" ")
end
defp site_them_attribute(attributes, conn) do
case Plug.Conn.get_session(conn, :site_theme) do
nil -> attributes
th... | 27.031915 | 97 | 0.72924 |
65dc8dd672f7a47267a77607be812d14eaa15955 | 6,185 | ex | Elixir | kousa/lib/beef/mutations/users.ex | LeonardSSH/dogehouse | 584055ad407bc37fa35cdf36ebb271622e29d436 | [
"MIT"
] | 9 | 2021-03-17T03:56:18.000Z | 2021-09-24T22:45:14.000Z | kousa/lib/beef/mutations/users.ex | ActuallyTomas/dogehouse | 8c3d2cd1d7e99e173f0658759467a391c4a90c4e | [
"MIT"
] | 12 | 2021-07-06T12:51:13.000Z | 2022-03-16T12:38:18.000Z | kousa/lib/beef/mutations/users.ex | ActuallyTomas/dogehouse | 8c3d2cd1d7e99e173f0658759467a391c4a90c4e | [
"MIT"
] | 4 | 2021-07-15T20:33:50.000Z | 2022-03-27T12:46:47.000Z | defmodule Beef.Mutations.Users do
import Ecto.Query, warn: false
alias Beef.Repo
alias Beef.Schemas.User
alias Beef.Queries.Users, as: Query
alias Beef.RoomPermissions
def edit_profile(user_id, data) do
# TODO: make this not perform a db query
user_id
|> Beef.Users.get_by_id()
|> User.edit... | 24.160156 | 97 | 0.551819 |
65dcc54810b323bc1cf3c6a55a44c29d86e30697 | 2,021 | exs | Elixir | test/format_parser/audio_test.exs | ahtung/format_parser.ex | b4c858f9f3dedd8e62ac17b633d951eb247b7c1f | [
"Apache-2.0"
] | 21 | 2018-02-17T18:49:37.000Z | 2020-03-13T11:14:30.000Z | test/format_parser/audio_test.exs | ahtung/format_parser.ex | b4c858f9f3dedd8e62ac17b633d951eb247b7c1f | [
"Apache-2.0"
] | 20 | 2018-02-15T07:17:56.000Z | 2021-01-13T13:08:49.000Z | test/format_parser/audio_test.exs | dunyakirkali/format_parser.ex | 418a6ff5d83be4bcaaa057b4f7eb652c1add2ae6 | [
"Apache-2.0"
] | 1 | 2020-01-28T09:39:00.000Z | 2020-01-28T09:39:00.000Z | defmodule FormatParser.AudioTest do
use ExUnit.Case
test "parse passed error" do
{:ok, file} = File.read("priv/test.aiff")
assert FormatParser.Audio.parse({:error, file}).format == :aiff
end
test "parse file" do
{:ok, file} = File.read("priv/test.aiff")
assert FormatParser.Audio.parse(file).... | 29.289855 | 92 | 0.673429 |
65dcdd1b42bf0de5229e1e78102d40329689bc66 | 2,056 | exs | Elixir | config/prod.exs | psolvy/cat_on_duty | b03ba225286c85407ca21576c39225f058b22b56 | [
"MIT"
] | 3 | 2020-11-23T15:30:04.000Z | 2020-12-01T17:11:49.000Z | config/prod.exs | psolvy/cat_on_duty | b03ba225286c85407ca21576c39225f058b22b56 | [
"MIT"
] | 1 | 2020-12-29T09:09:03.000Z | 2020-12-29T09:09:03.000Z | config/prod.exs | psolvy/cat_on_duty | b03ba225286c85407ca21576c39225f058b22b56 | [
"MIT"
] | 1 | 2021-08-11T10:10:16.000Z | 2021-08-11T10:10:16.000Z | import 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,
# w... | 36.070175 | 66 | 0.719358 |
65dce9c147a3493481cda2031420deee8bcfa3db | 56 | exs | Elixir | test/900/p987_test.exs | penqen/yukicoder-elixir | 4f3e9e4694a14434cc3700280e9205226434733b | [
"MIT"
] | null | null | null | test/900/p987_test.exs | penqen/yukicoder-elixir | 4f3e9e4694a14434cc3700280e9205226434733b | [
"MIT"
] | null | null | null | test/900/p987_test.exs | penqen/yukicoder-elixir | 4f3e9e4694a14434cc3700280e9205226434733b | [
"MIT"
] | null | null | null | defmodule P987Test do
use ExUnit.Case
doctest P987
end | 14 | 21 | 0.821429 |
65dced28fb364238a03d83480a51098401e95146 | 712 | ex | Elixir | web/gettext.ex | mapmeld/superfund-me | 8bd1aeb78504e6ae068cf57dbefca05bebbb2b07 | [
"MIT"
] | null | null | null | web/gettext.ex | mapmeld/superfund-me | 8bd1aeb78504e6ae068cf57dbefca05bebbb2b07 | [
"MIT"
] | 3 | 2016-09-09T21:09:17.000Z | 2017-09-13T17:55:20.000Z | web/gettext.ex | Georeactor/superfund-me | 8bd1aeb78504e6ae068cf57dbefca05bebbb2b07 | [
"MIT"
] | null | null | null | defmodule Superfundme.Gettext do
@moduledoc """
A module providing Internationalization with a gettext-based API.
By using [Gettext](http://hexdocs.pm/gettext),
your module gains a set of macros for translations, for example:
import Superfundme.Gettext
# Simple translation
gettext "Here is ... | 28.48 | 71 | 0.682584 |
65dcee732a23f39065cc6a82042a4eeb1e4ffe1c | 20,731 | exs | Elixir | lib/mix/test/mix/tasks/deps_test.exs | gsphanikumar/elixir | 6ca225da4e016200a462888348ff1c3feb625b78 | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/tasks/deps_test.exs | gsphanikumar/elixir | 6ca225da4e016200a462888348ff1c3feb625b78 | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/tasks/deps_test.exs | gsphanikumar/elixir | 6ca225da4e016200a462888348ff1c3feb625b78 | [
"Apache-2.0"
] | null | null | null | Code.require_file "../../test_helper.exs", __DIR__
defmodule Mix.Tasks.DepsTest do
use MixTest.Case
defmodule DepsApp do
def project do
[app: :deps, version: "0.1.0",
deps: [
{:ok, "0.1.0", github: "elixir-lang/ok"},
{:invalidvsn, "0.2.0", path: "deps/invalidvsn"},
... | 30.803863 | 171 | 0.609956 |
65dd16a8e2fc49b8fe252d0d1f5442557c8c1f74 | 988 | ex | Elixir | test/support/channel_case.ex | orsai-project/orsai-be | 31786c8f0c2e50b3586579c43400a84f83b0781d | [
"MIT"
] | null | null | null | test/support/channel_case.ex | orsai-project/orsai-be | 31786c8f0c2e50b3586579c43400a84f83b0781d | [
"MIT"
] | 9 | 2017-06-18T00:45:12.000Z | 2017-07-12T22:08:27.000Z | test/support/channel_case.ex | orsai-project/orsai-be | 31786c8f0c2e50b3586579c43400a84f83b0781d | [
"MIT"
] | null | null | null | defmodule Orsai.ChannelCase do
@moduledoc """
This module defines the test case to be used by
channel tests.
Such tests rely on `Phoenix.ChannelTest` and also
import other functionality to make it easier
to build and query models.
Finally, if the test case interacts with the database,
it cannot be asy... | 22.454545 | 67 | 0.697368 |
65dd18530bd2071ac01fcd851611dcf8082d0a49 | 890 | ex | Elixir | test/support/conn_case.ex | kevinzg/phoenix-bloc | 7c61b6abfdebe25e0e43948b325093b5c98f48c8 | [
"MIT"
] | 5 | 2017-07-13T03:38:55.000Z | 2019-03-25T18:19:54.000Z | test/support/conn_case.ex | kevinzg/phoenix-bloc | 7c61b6abfdebe25e0e43948b325093b5c98f48c8 | [
"MIT"
] | null | null | null | test/support/conn_case.ex | kevinzg/phoenix-bloc | 7c61b6abfdebe25e0e43948b325093b5c98f48c8 | [
"MIT"
] | 2 | 2017-04-26T04:59:46.000Z | 2021-09-19T12:53:49.000Z | defmodule PhoenixBloc.Web.ConnCase do
@moduledoc """
This module defines the test case to be used by
tests that require setting up a connection.
Such tests rely on `Phoenix.ConnTest` and also
import other functionality to make it easier
to build common datastructures and query the data layer.
Finally, i... | 25.428571 | 58 | 0.730337 |
65dd49eff8001ea19b7d7f2a8214002ef0ee65b8 | 3,855 | exs | Elixir | aur-pkg-checker.exs | tfrisk/aur-pkg-checker-elixir | 262148a5e1fe49e2d2eb87e3a199182c6bf8cb4f | [
"MIT"
] | null | null | null | aur-pkg-checker.exs | tfrisk/aur-pkg-checker-elixir | 262148a5e1fe49e2d2eb87e3a199182c6bf8cb4f | [
"MIT"
] | null | null | null | aur-pkg-checker.exs | tfrisk/aur-pkg-checker-elixir | 262148a5e1fe49e2d2eb87e3a199182c6bf8cb4f | [
"MIT"
] | null | null | null | defmodule AurChecker do
# Run system command 'pacman -Qm' and return its raw output.
defp run_pacman_command() do
case System.cmd("pacman", ["-Qm"]) do
{string, 0} -> {:ok, string}
[] -> :error
end
end
# Run system command 'vercmp v1 v2' and return status message
# based on the result.
... | 32.948718 | 115 | 0.638651 |
65dd6e59c37e87cb569fbc18d0a99158b005d83e | 289 | ex | Elixir | lib/batched_communication/type.ex | skirino/batched_communication | 14dea7075a13c94df0e3c63c034029cc36bd0ab0 | [
"MIT"
] | 4 | 2018-08-28T03:49:08.000Z | 2020-06-25T16:00:13.000Z | lib/batched_communication/type.ex | skirino/batched_communication | 14dea7075a13c94df0e3c63c034029cc36bd0ab0 | [
"MIT"
] | null | null | null | lib/batched_communication/type.ex | skirino/batched_communication | 14dea7075a13c94df0e3c63c034029cc36bd0ab0 | [
"MIT"
] | null | null | null | use Croma
defmodule BatchedCommunication.Compression do
use Croma.SubtypeOfAtom, values: [:raw, :gzip]
end
defmodule BatchedCommunication.EncodedBatch do
use Croma.SubtypeOfTuple, elem_modules: [Croma.PosInteger, Croma.PosInteger, BatchedCommunication.Compression, Croma.Binary]
end
| 28.9 | 126 | 0.82699 |
65ddfba8e9e88c77b889c123921bcac181ad398a | 1,577 | ex | Elixir | clients/bigtable_admin/lib/google_api/bigtable_admin/v2/model/multi_cluster_routing_use_any.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | 1 | 2021-10-01T09:20:41.000Z | 2021-10-01T09:20:41.000Z | clients/bigtable_admin/lib/google_api/bigtable_admin/v2/model/multi_cluster_routing_use_any.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/bigtable_admin/lib/google_api/bigtable_admin/v2/model/multi_cluster_routing_use_any.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"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... | 37.547619 | 311 | 0.780596 |
65de071b87a183c4c6b280efc5a339fa56f5ee50 | 1,805 | ex | Elixir | apps/store/lib/staxx/store/testchain/models/snapshot.ex | makerdao/qa_backend_gateway | 38e9a3f3f4b66212f1ee9d38b3b698a2a1f9a809 | [
"Apache-2.0"
] | 1 | 2020-10-23T19:25:27.000Z | 2020-10-23T19:25:27.000Z | apps/store/lib/staxx/store/testchain/models/snapshot.ex | makerdao/qa_backend_gateway | 38e9a3f3f4b66212f1ee9d38b3b698a2a1f9a809 | [
"Apache-2.0"
] | 5 | 2019-01-11T11:48:08.000Z | 2019-01-16T17:29:23.000Z | apps/store/lib/staxx/store/testchain/models/snapshot.ex | makerdao/qa_backend_gateway | 38e9a3f3f4b66212f1ee9d38b3b698a2a1f9a809 | [
"Apache-2.0"
] | 7 | 2019-10-09T05:49:52.000Z | 2022-03-23T16:48:45.000Z | defmodule Staxx.Store.Testchain.Models.Snapshot do
@moduledoc """
Model of testchain snapshot.
"""
use Ecto.Schema
import Ecto.Changeset
@type t :: %__MODULE__{
id: binary,
description: binary,
path: binary,
chain: binary | atom
}
@derive {Jason.Encoder, o... | 28.203125 | 124 | 0.659834 |
65de3712a0e19ff769fd89f4008f513639a558f8 | 9,453 | exs | Elixir | test/media_server/watches_test.exs | MNDL-27/midarr-server | b749707a1777205cea2d93349cde2ef922e527ec | [
"MIT"
] | null | null | null | test/media_server/watches_test.exs | MNDL-27/midarr-server | b749707a1777205cea2d93349cde2ef922e527ec | [
"MIT"
] | null | null | null | test/media_server/watches_test.exs | MNDL-27/midarr-server | b749707a1777205cea2d93349cde2ef922e527ec | [
"MIT"
] | null | null | null | defmodule MediaServer.WatchesTest do
use MediaServer.DataCase
alias MediaServer.AccountsFixtures
alias MediaServer.Watches
describe "movie_watches" do
alias MediaServer.Watches.Movie
import MediaServer.WatchesFixtures
@invalid_attrs %{
movie_id: nil,
title: nil,
image_url: nil,... | 31.828283 | 90 | 0.645404 |
65de5e8c8191c17a54d1b59c63e20523b31423dc | 2,143 | ex | Elixir | lib/ecto_tablestore/migration/runner.ex | kianmeng/ecto_tablestore | d07b34a10e4476f15524d37e7a22210cdb9744b3 | [
"MIT"
] | null | null | null | lib/ecto_tablestore/migration/runner.ex | kianmeng/ecto_tablestore | d07b34a10e4476f15524d37e7a22210cdb9744b3 | [
"MIT"
] | null | null | null | lib/ecto_tablestore/migration/runner.ex | kianmeng/ecto_tablestore | d07b34a10e4476f15524d37e7a22210cdb9744b3 | [
"MIT"
] | null | null | null | defmodule EctoTablestore.Migration.Runner do
@moduledoc false
use Agent, restart: :temporary
require Logger
def run(repo, version, module, operation, opts) do
level = Keyword.get(opts, :log, :info)
args = {self(), repo, module, %{level: level}}
{:ok, runner} =
DynamicSupervisor.start_child(E... | 24.632184 | 90 | 0.639291 |
65de669d0a4de349329f7932a34a93c4f092abd4 | 3,182 | ex | Elixir | lib/elixero/utils/oauth.ex | philals/elixero | fd75fe4a6f0a93b1d2ff94adbb307d20f014d458 | [
"MIT"
] | 84 | 2016-11-09T01:15:17.000Z | 2022-01-06T02:55:35.000Z | lib/elixero/utils/oauth.ex | philals/elixero | fd75fe4a6f0a93b1d2ff94adbb307d20f014d458 | [
"MIT"
] | 14 | 2017-03-10T04:16:07.000Z | 2021-11-10T16:39:19.000Z | lib/elixero/utils/oauth.ex | philals/elixero | fd75fe4a6f0a93b1d2ff94adbb307d20f014d458 | [
"MIT"
] | 18 | 2017-03-11T21:12:15.000Z | 2022-02-22T20:07:10.000Z | defmodule EliXero.Utils.Oauth do
def oauth_consumer_key do
Application.get_env(:elixero, :consumer_key)
end
def oauth_consumer_secret do
Application.get_env(:elixero, :consumer_secret)
end
def application_type do
Application.get_env(:elixero, :app_type)
end
def private_key do
Applicatio... | 29.462963 | 183 | 0.684161 |
65deac3ff449f1f307bab203d1e4687b017d839d | 2,085 | ex | Elixir | priv/perf/apps/load_test/lib/ethereum/account.ex | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | null | null | null | priv/perf/apps/load_test/lib/ethereum/account.ex | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | null | null | null | priv/perf/apps/load_test/lib/ethereum/account.ex | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019-2020 OmiseGO Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 29.785714 | 81 | 0.668585 |
65deafc880f1fe6047d70cb245bf26225b148006 | 203 | exs | Elixir | scripts/hello_world_sketchet.exs | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | null | null | null | scripts/hello_world_sketchet.exs | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | null | null | null | scripts/hello_world_sketchet.exs | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | 1 | 2019-10-24T06:45:21.000Z | 2019-10-24T06:45:21.000Z | # LANGUAGE: Elixir
# AUTHOR: Daylen Wolaniuk
# GITHUB: https://github.com/sketchet
# LINK: https://elixir-lang.org/
IO.puts([
72, 101,
108, 108,
111, 44,
32, 87,
111, 114,
108, 100,
33
])
| 13.533333 | 37 | 0.610837 |
65debfc2461346ec7fd047d2d2117bf400f0a8b0 | 467 | ex | Elixir | lib/yacto/schema/single.ex | mori5321/yacto | 85d6f216fd7ae16825c03e9772cb75a06b495245 | [
"Apache-2.0"
] | null | null | null | lib/yacto/schema/single.ex | mori5321/yacto | 85d6f216fd7ae16825c03e9772cb75a06b495245 | [
"Apache-2.0"
] | null | null | null | lib/yacto/schema/single.ex | mori5321/yacto | 85d6f216fd7ae16825c03e9772cb75a06b495245 | [
"Apache-2.0"
] | null | null | null | defmodule Yacto.Schema.Single do
@moduledoc """
通常の(水平分割されていない)スキーマ
`Yacto.Schema` とほぼ同じだが、`Yacto.DB.repo(MySchema.dbname())` のショートハンドとして `MySchema.repo()` が使える点のみが異なる。
"""
defmacro __using__(opts) do
dbname = Keyword.fetch!(opts, :dbname)
quote do
use Yacto.Schema, dbname: unquote(dbname)
... | 22.238095 | 102 | 0.64454 |
65ded34887c1bfd485caf07639538d080cb7239e | 610 | ex | Elixir | lib/data_providers/ecto_provider/jwk.ex | Simon-Initiative/lti_1p3_ecto_provider | 15b84b35aa2de266a5199bfab73cf339220e2b87 | [
"MIT"
] | null | null | null | lib/data_providers/ecto_provider/jwk.ex | Simon-Initiative/lti_1p3_ecto_provider | 15b84b35aa2de266a5199bfab73cf339220e2b87 | [
"MIT"
] | null | null | null | lib/data_providers/ecto_provider/jwk.ex | Simon-Initiative/lti_1p3_ecto_provider | 15b84b35aa2de266a5199bfab73cf339220e2b87 | [
"MIT"
] | null | null | null | defmodule Lti_1p3.DataProviders.EctoProvider.Jwk do
use Ecto.Schema
import Ecto.Changeset
import Lti_1p3.DataProviders.EctoProvider.Config
schema "lti_1p3_jwks" do
field :pem, :string
field :typ, :string
field :alg, :string
field :kid, :string
field :active, :boolean, default: false
ha... | 24.4 | 77 | 0.677049 |
65ded5104a1776158b081a58d8cda43291b6fff0 | 768 | ex | Elixir | lib/graphqexl/application.ex | eslingerbryan/graphqexl | 07c0058b6dd72ac374d14b6091a0280f3564e29c | [
"MIT"
] | 14 | 2020-01-20T10:55:56.000Z | 2020-03-25T11:24:35.000Z | lib/graphqexl/application.ex | eslingerbryan/graphqexl | 07c0058b6dd72ac374d14b6091a0280f3564e29c | [
"MIT"
] | 16 | 2020-01-21T00:45:50.000Z | 2021-05-11T01:54:23.000Z | lib/graphqexl/application.ex | eslingerbryan/graphqexl | 07c0058b6dd72ac374d14b6091a0280f3564e29c | [
"MIT"
] | 1 | 2020-01-20T10:56:02.000Z | 2020-01-20T10:56:02.000Z | alias Graphqexl.Server.Router
defmodule Graphqexl.Application do
@moduledoc false
require Logger
use Application
@type on_start:: {:ok, pid} | {:error, {:already_started, pid} | {:shutdown, term} | term}
@doc false
@spec start(term, list(term)):: on_start
def start(_type, _args) do
Logger.info("Sta... | 29.538462 | 92 | 0.695313 |
65deeb647a8b96c0aae87f0691d4169d3ecf340f | 642 | exs | Elixir | test/redis_test.exs | behe/redis-ex | 191487c36f0f0928ef461a3bbe5330556e55e5cb | [
"MIT"
] | null | null | null | test/redis_test.exs | behe/redis-ex | 191487c36f0f0928ef461a3bbe5330556e55e5cb | [
"MIT"
] | null | null | null | test/redis_test.exs | behe/redis-ex | 191487c36f0f0928ef461a3bbe5330556e55e5cb | [
"MIT"
] | null | null | null | defmodule RedisTest do
use ExUnit.Case
import Redis
doctest Redis
setup do
pid = start
Process.put(:pid, pid)
:eredis.q(pid, ["FLUSHDB"])
:ok
end
def pid do
Process.get(:pid)
end
test "simple api" do
assert execute(pid, get("mykey")) == :undefined
assert execute(pid, set... | 17.351351 | 60 | 0.587227 |
65def44484ac8b90829a8274f38bab887fcad0b6 | 2,390 | ex | Elixir | clients/people/lib/google_api/people/v1/model/list_connections_response.ex | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"Apache-2.0"
] | null | null | null | clients/people/lib/google_api/people/v1/model/list_connections_response.ex | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"Apache-2.0"
] | null | null | null | clients/people/lib/google_api/people/v1/model/list_connections_response.ex | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 39.833333 | 147 | 0.710879 |
65defd91243ccda364384f431be7c880199938f5 | 805 | ex | Elixir | lib/mix/tasks/hf.gen.veg.ex | palm86/hex_flora | 26dc95f948763507b4d7cb643d98696936b45e07 | [
"CC-BY-3.0"
] | null | null | null | lib/mix/tasks/hf.gen.veg.ex | palm86/hex_flora | 26dc95f948763507b4d7cb643d98696936b45e07 | [
"CC-BY-3.0"
] | 8 | 2021-06-04T18:50:28.000Z | 2021-08-08T19:43:46.000Z | lib/mix/tasks/hf.gen.veg.ex | palm86/hex_flora | 26dc95f948763507b4d7cb643d98696936b45e07 | [
"CC-BY-3.0"
] | null | null | null | defmodule Mix.Tasks.Hf.Gen.Veg do
@shortdoc "Generates a vegetation type markdown document."
@moduledoc """
Generates a vegetation type markdown document.
mix hf.gen.veg South Hex Sandstone Fynbos
The first argument is vegetation type name.
Overall, this generator will add the following files to `priv... | 27.758621 | 82 | 0.689441 |
65df0824e22c7f80b68e486ab2ab5e0489028661 | 1,515 | exs | Elixir | test/nebulex_redis_adapter/redis_cluster_test.exs | bjyoungblood/nebulex_redis_adapter | 8ecf19f91d1d332c39e3507831fbfabc800fcf2b | [
"MIT"
] | 20 | 2018-09-02T15:14:44.000Z | 2021-12-10T16:40:56.000Z | test/nebulex_redis_adapter/redis_cluster_test.exs | bjyoungblood/nebulex_redis_adapter | 8ecf19f91d1d332c39e3507831fbfabc800fcf2b | [
"MIT"
] | 23 | 2018-10-26T19:49:11.000Z | 2022-03-23T22:37:25.000Z | test/nebulex_redis_adapter/redis_cluster_test.exs | bjyoungblood/nebulex_redis_adapter | 8ecf19f91d1d332c39e3507831fbfabc800fcf2b | [
"MIT"
] | 17 | 2018-11-06T00:19:03.000Z | 2021-11-19T09:46:06.000Z | defmodule NebulexRedisAdapter.RedisClusterTest do
use ExUnit.Case, async: true
use NebulexRedisAdapter.CacheTest
alias NebulexRedisAdapter.RedisCluster
alias NebulexRedisAdapter.TestCache.RedisCluster, as: Cache
alias NebulexRedisAdapter.TestCache.{RedisClusterConnError, RedisClusterWithKeyslot}
setup do
... | 28.584906 | 97 | 0.642904 |
65df147f06a35f68894a936fa2e34d97f5736fa3 | 4,208 | ex | Elixir | lib/samly/helper.ex | eriosv/samly | e5d2c53b0819426286c5abcb75e68f4ada35a549 | [
"MIT"
] | null | null | null | lib/samly/helper.ex | eriosv/samly | e5d2c53b0819426286c5abcb75e68f4ada35a549 | [
"MIT"
] | null | null | null | lib/samly/helper.ex | eriosv/samly | e5d2c53b0819426286c5abcb75e68f4ada35a549 | [
"MIT"
] | null | null | null | defmodule Samly.Helper do
@moduledoc false
require Samly.Esaml
alias Samly.{Assertion, Esaml, IdpData}
@spec get_idp(binary) :: nil | IdpData.t()
def get_idp(idp_id) do
idps = Application.get_env(:samly, :identity_providers, %{})
Map.get(idps, idp_id)
end
@spec get_metadata_uri(nil | binary, bi... | 35.361345 | 98 | 0.705561 |
65df19f8db63c8b239c9ba457c3f4eb4e1160eaa | 3,186 | ex | Elixir | lib/temple/engine.ex | zimt28/temple | 07858739b06cd9f0fa6d76e185514b9a60d922b5 | [
"MIT"
] | null | null | null | lib/temple/engine.ex | zimt28/temple | 07858739b06cd9f0fa6d76e185514b9a60d922b5 | [
"MIT"
] | null | null | null | lib/temple/engine.ex | zimt28/temple | 07858739b06cd9f0fa6d76e185514b9a60d922b5 | [
"MIT"
] | null | null | null | defmodule Temple.Engine do
@behaviour Phoenix.Template.Engine
@moduledoc """
Temple provides a templating engine for use in Phoenix web applications.
You can configure your application to use Temple templates by adding the following configuration.
```elixir
# config.exs
config :phoenix, :template_engin... | 27 | 119 | 0.595731 |
65df267dec86838284af171e6aa23ce1bbc350cd | 5,929 | exs | Elixir | exercises/concept/newsletter/test/newsletter_test.exs | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | null | null | null | exercises/concept/newsletter/test/newsletter_test.exs | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 9 | 2021-09-12T15:19:06.000Z | 2022-03-30T22:24:24.000Z | exercises/concept/newsletter/test/newsletter_test.exs | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | null | null | null | defmodule NewsletterTest do
# run test synchronously to be able to use the same file path for all tests without write conflicts
use ExUnit.Case, async: false
@temp_file_path Path.join(["assets", "temp.txt"])
setup do
File.write!(@temp_file_path, "")
on_exit(fn -> File.rm!(@temp_file_path) end)
end
... | 28.642512 | 101 | 0.572609 |
65df27e73103952c1a9b32bb14110a67dbb3a3b4 | 491 | ex | Elixir | lib/tapebas_web/views/error_view.ex | cristineguadelupe/tapebas | 5f8c70d5ac36b2a606fe4630cc659161b2f4d7bf | [
"MIT"
] | 3 | 2022-03-24T16:48:38.000Z | 2022-03-24T16:50:04.000Z | lib/tapebas_web/views/error_view.ex | cristineguadelupe/tapebas | 5f8c70d5ac36b2a606fe4630cc659161b2f4d7bf | [
"MIT"
] | null | null | null | lib/tapebas_web/views/error_view.ex | cristineguadelupe/tapebas | 5f8c70d5ac36b2a606fe4630cc659161b2f4d7bf | [
"MIT"
] | 1 | 2022-03-20T01:11:12.000Z | 2022-03-20T01:11:12.000Z | defmodule TapebasWeb.ErrorView do
use TapebasWeb, :view
# If you want to customize a particular status code
# for a certain format, you may uncomment below.
# def render("500.html", _assigns) do
# "Internal Server Error"
# end
# By default, Phoenix returns the status message from
# the template name... | 28.882353 | 61 | 0.735234 |
65df47d9867934e727dcca4f4c3a52defb2c2d82 | 20,217 | ex | Elixir | lib/cqrs/command.ex | trbngr/elixir_cqrs_tools | a78076144c118474789421c0ae29bd642ad13566 | [
"MIT"
] | 17 | 2021-05-04T09:27:48.000Z | 2022-02-02T00:53:28.000Z | lib/cqrs/command.ex | trbngr/elixir_cqrs_tools | a78076144c118474789421c0ae29bd642ad13566 | [
"MIT"
] | 18 | 2021-05-05T21:17:54.000Z | 2021-12-08T19:25:21.000Z | lib/cqrs/command.ex | trbngr/elixir_cqrs_tools | a78076144c118474789421c0ae29bd642ad13566 | [
"MIT"
] | 2 | 2021-05-04T13:35:00.000Z | 2021-07-08T22:28:32.000Z | defmodule Cqrs.Command do
alias Cqrs.{Command, CommandError, Documentation, DomainEvent, Guards, Metadata, Options, Input}
@moduledoc """
The `Command` macro allows you to define a command that encapsulates a struct definition,
data validation, dependency validation, and dispatching of the command.
## Optio... | 30.219731 | 194 | 0.630558 |
65df8fb025c0258c066f584cd5688aeade0a2f79 | 164 | exs | Elixir | config/config.exs | joshrotenberg/exling | e79fd7bb721f0f3ea1c7572f24b59b350363e029 | [
"Apache-2.0"
] | 2 | 2017-04-13T05:09:20.000Z | 2017-11-14T05:03:39.000Z | config/config.exs | joshrotenberg/exling | e79fd7bb721f0f3ea1c7572f24b59b350363e029 | [
"Apache-2.0"
] | null | null | null | config/config.exs | joshrotenberg/exling | e79fd7bb721f0f3ea1c7572f24b59b350363e029 | [
"Apache-2.0"
] | null | null | null | use Mix.Config
# set the default HTTP client module here for the entire
# project to avoid specifying it on every request ...
# config :exling, client: HTTPoison
| 27.333333 | 56 | 0.756098 |
65dff221773c12b415a597ee899b513c0cf908ae | 1,139 | exs | Elixir | test/cloudini/multipart_test.exs | socialpaymentsbv/cloudini | 69c9c4bdc62aa12754a44e03cba991626034e186 | [
"MIT"
] | 3 | 2016-10-02T13:13:47.000Z | 2017-09-11T22:12:39.000Z | test/cloudini/multipart_test.exs | socialpaymentsbv/cloudini | 69c9c4bdc62aa12754a44e03cba991626034e186 | [
"MIT"
] | 7 | 2016-06-22T14:08:43.000Z | 2018-08-03T07:49:48.000Z | test/cloudini/multipart_test.exs | socialpaymentsbv/cloudini | 69c9c4bdc62aa12754a44e03cba991626034e186 | [
"MIT"
] | 4 | 2017-12-10T04:11:21.000Z | 2021-01-14T11:49:19.000Z | defmodule Cloudini.MultipartTest do
use ExUnit.Case
doctest Cloudini
alias Cloudini.Multipart
test "Encodes basic fields without files" do
{boundary, body} = Multipart.render([field1: "value1", field2: "value2"], [])
assert String.starts_with?(body, "--" <> boundary)
assert String.contains?(body,... | 39.275862 | 107 | 0.687445 |
65dff98a522227ba5ced048a9221d2684e20f32e | 3,743 | ex | Elixir | implementations/elixir/ockam/ockam/lib/ockam/topic.ex | twittner/ockam | 96eadf99da42f7c35539c6e29010a657c579ccba | [
"Apache-2.0"
] | 1,912 | 2019-01-10T14:17:00.000Z | 2022-03-30T19:16:44.000Z | implementations/elixir/ockam/ockam/lib/ockam/topic.ex | twittner/ockam | 96eadf99da42f7c35539c6e29010a657c579ccba | [
"Apache-2.0"
] | 1,473 | 2019-01-16T15:14:47.000Z | 2022-03-31T23:44:50.000Z | implementations/elixir/ockam/ockam/lib/ockam/topic.ex | twittner/ockam | 96eadf99da42f7c35539c6e29010a657c579ccba | [
"Apache-2.0"
] | 219 | 2019-01-11T03:35:13.000Z | 2022-03-31T10:25:56.000Z | defmodule Ockam.Topics do
@moduledoc """
Ockam.Topics
"""
@doc false
use DynamicSupervisor
require Logger
def start_link(init_arg) do
DynamicSupervisor.start_link(__MODULE__, init_arg, name: __MODULE__)
end
@impl true
def init(_init_arg) do
DynamicSupervisor.init(strategy: :one_for_one)
... | 26.359155 | 102 | 0.685012 |
65e0008f9af0fca20d56623a52ddb3edb7a33e22 | 1,317 | exs | Elixir | mix.exs | membraneframework/membrane_element_fake | 0d3060f524073bcd187afc95e6f1895e07b7d5d9 | [
"Apache-2.0"
] | null | null | null | mix.exs | membraneframework/membrane_element_fake | 0d3060f524073bcd187afc95e6f1895e07b7d5d9 | [
"Apache-2.0"
] | null | null | null | mix.exs | membraneframework/membrane_element_fake | 0d3060f524073bcd187afc95e6f1895e07b7d5d9 | [
"Apache-2.0"
] | null | null | null | defmodule Membrane.Fake.Mixfile do
use Mix.Project
@version "0.7.0"
@github_url "https://github.com/membraneframework/membrane_fake_plugin"
def project do
[
app: :membrane_fake_plugin,
compilers: Mix.compilers(),
version: @version,
elixir: "~> 1.7",
elixirc_paths: elixirc_pat... | 21.95 | 73 | 0.567957 |
65e06977cf9785b43142615180cebba7b6edd6cc | 947 | ex | Elixir | lib/phoenix/view.ex | brightroll/phoenix | b93022086322bcc1d797214a28e0c9710f537c22 | [
"MIT"
] | null | null | null | lib/phoenix/view.ex | brightroll/phoenix | b93022086322bcc1d797214a28e0c9710f537c22 | [
"MIT"
] | null | null | null | lib/phoenix/view.ex | brightroll/phoenix | b93022086322bcc1d797214a28e0c9710f537c22 | [
"MIT"
] | null | null | null | defmodule Phoenix.View do
defmacro __using__(options \\ []) do
templates_root = Dict.fetch!(options, :templates_root)
quote do
import unquote(__MODULE__)
import Phoenix.Html, only: [safe: 1, unsafe: 1]
path = template_path_from_module(__MODULE__, unquote(templates_root))
use Phoenix.... | 29.59375 | 81 | 0.705385 |
65e07802107a2523661c20bbc9223d43b60c88f0 | 20,798 | ex | Elixir | clients/you_tube_reporting/lib/google_api/you_tube_reporting/v1/api/jobs.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/you_tube_reporting/lib/google_api/you_tube_reporting/v1/api/jobs.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/you_tube_reporting/lib/google_api/you_tube_reporting/v1/api/jobs.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... | 47.160998 | 196 | 0.623377 |
65e07d708f9c4b074c695baa715b9dfaa68511c2 | 992 | ex | Elixir | lib/fake_cas/responses.ex | rhruiz/elixir-fake_cas | a85a67f9b7df235276df0fabfee49d89d7ec60cc | [
"MIT"
] | 1 | 2016-12-08T00:39:34.000Z | 2016-12-08T00:39:34.000Z | lib/fake_cas/responses.ex | rhruiz/elixir-fake_cas | a85a67f9b7df235276df0fabfee49d89d7ec60cc | [
"MIT"
] | null | null | null | lib/fake_cas/responses.ex | rhruiz/elixir-fake_cas | a85a67f9b7df235276df0fabfee49d89d7ec60cc | [
"MIT"
] | null | null | null | defmodule FakeCas.Responses do
@moduledoc """
Module with authentcation respose strings
"""
@doc "Response for an authentication failure"
@spec failure() :: String.t()
def failure do
"""
<?xml version="1.0"?>
<cas:serviceResponse xmlns:cas="http://www.yale.edu/tp/cas">
<cas:authentication... | 26.810811 | 64 | 0.627016 |
65e0a4eb4426b6de819c89d641648f07cf4a2548 | 956 | ex | Elixir | services/fc_identity/lib/fc_identity/command_handlers/app_handler.ex | fleadope/freshcom | 8d5944befaa6eea8d31e5f5995939be2a1a44262 | [
"BSD-3-Clause"
] | 46 | 2018-10-13T23:18:13.000Z | 2021-08-07T07:46:51.000Z | services/fc_identity/lib/fc_identity/command_handlers/app_handler.ex | fleadope/freshcom | 8d5944befaa6eea8d31e5f5995939be2a1a44262 | [
"BSD-3-Clause"
] | 25 | 2018-10-14T00:56:07.000Z | 2019-12-23T19:41:02.000Z | services/fc_identity/lib/fc_identity/command_handlers/app_handler.ex | fleadope/freshcom | 8d5944befaa6eea8d31e5f5995939be2a1a44262 | [
"BSD-3-Clause"
] | 5 | 2018-12-16T04:39:51.000Z | 2020-10-01T12:17:03.000Z | defmodule FCIdentity.AppHandler do
@moduledoc false
@behaviour Commanded.Commands.Handler
use FCBase, :command_handler
import FCIdentity.AppPolicy
alias FCIdentity.{AddApp, UpdateApp, DeleteApp}
alias FCIdentity.{AppAdded, AppUpdated, AppDeleted}
alias FCIdentity.App
def handle(%App{id: nil} = stat... | 22.232558 | 77 | 0.639121 |
65e0b1785f6559a9a495c5dff84aeda3ee59611f | 11,793 | ex | Elixir | lib/norm.ex | QuinnWilton/norm | 5ddce1b1ed2c8cb246a54b4aa0a1db5033541407 | [
"MIT"
] | null | null | null | lib/norm.ex | QuinnWilton/norm | 5ddce1b1ed2c8cb246a54b4aa0a1db5033541407 | [
"MIT"
] | null | null | null | lib/norm.ex | QuinnWilton/norm | 5ddce1b1ed2c8cb246a54b4aa0a1db5033541407 | [
"MIT"
] | null | null | null | defmodule Norm do
@moduledoc "README.md"
|> File.read!()
|> String.split("<!-- MDOC !-->")
|> Enum.fetch!(1)
alias Norm.Conformer
alias Norm.Generatable
alias Norm.Generator
alias Norm.MismatchError
alias Norm.GeneratorError
alias Norm.Core.{
Alt,
AnyOf,
... | 32.849582 | 161 | 0.586874 |
65e0b7507bbb53a602b5a263daeff97566d0a6a3 | 344 | exs | Elixir | coherence_demo-0.6/priv/repo/migrations/20181027051304_create_coherence_invitable.exs | hotpyn/coherence-setup | fc10bb15d993ae0dd13a19fd178bdfb4ee13d6b6 | [
"MIT"
] | null | null | null | coherence_demo-0.6/priv/repo/migrations/20181027051304_create_coherence_invitable.exs | hotpyn/coherence-setup | fc10bb15d993ae0dd13a19fd178bdfb4ee13d6b6 | [
"MIT"
] | null | null | null | coherence_demo-0.6/priv/repo/migrations/20181027051304_create_coherence_invitable.exs | hotpyn/coherence-setup | fc10bb15d993ae0dd13a19fd178bdfb4ee13d6b6 | [
"MIT"
] | null | null | null | defmodule CoherenceDemo.Repo.Migrations.CreateCoherenceInvitable do
use Ecto.Migration
def change do
create table(:invitations) do
add :name, :string
add :email, :string
add :token, :string
timestamps()
end
create unique_index(:invitations, [:email])
create index(:invitation... | 21.5 | 67 | 0.680233 |
65e0c6ff9c7289ed49b3399659625e9353f42ab3 | 1,808 | ex | Elixir | clients/android_enterprise/lib/google_api/android_enterprise/v1/model/enterprises_send_test_push_notification_response.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/android_enterprise/lib/google_api/android_enterprise/v1/model/enterprises_send_test_push_notification_response.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/android_enterprise/lib/google_api/android_enterprise/v1/model/enterprises_send_test_push_notification_response.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 ... | 32.872727 | 170 | 0.740044 |
65e0e76fe0b2bb8a6cd07528246839830e470733 | 388 | exs | Elixir | apps/diet_web/test/diet_web/controllers/page_controller_test.exs | isavita/diet-umbrella | 0eee4d0dc4d9567888e4b69ccc7993e95d95ed29 | [
"MIT"
] | 1 | 2020-06-01T21:25:54.000Z | 2020-06-01T21:25:54.000Z | apps/diet_web/test/diet_web/controllers/page_controller_test.exs | isavita/diet-umbrella | 0eee4d0dc4d9567888e4b69ccc7993e95d95ed29 | [
"MIT"
] | 221 | 2019-07-20T17:20:49.000Z | 2021-08-02T06:21:10.000Z | apps/diet_web/test/diet_web/controllers/page_controller_test.exs | isavita/diet-umbrella | 0eee4d0dc4d9567888e4b69ccc7993e95d95ed29 | [
"MIT"
] | null | null | null | defmodule DietWeb.PageControllerTest do
use DietWeb.ConnCase
describe "index/2" do
test "GET /", %{conn: conn} do
conn = get(conn, "/")
assert html_response(conn, 200) =~ "Welcome to Weight Hater!"
end
end
describe "newsfeed/2" do
test "GET /", %{conn: conn} do
conn = get(conn, "... | 21.555556 | 67 | 0.618557 |
65e0f5fc4366db60bc202d6e02d81c561a15c166 | 760 | ex | Elixir | lib/nucleotide_count.ex | NullChronos/exercism | 1a30fa34e780303582c562e452534b9b45944f77 | [
"MIT"
] | null | null | null | lib/nucleotide_count.ex | NullChronos/exercism | 1a30fa34e780303582c562e452534b9b45944f77 | [
"MIT"
] | null | null | null | lib/nucleotide_count.ex | NullChronos/exercism | 1a30fa34e780303582c562e452534b9b45944f77 | [
"MIT"
] | null | null | null | defmodule NucleotideCount do
@doc """
Counts individual nucleotides in a DNA strand.
## Examples
iex> NucleotideCount.count('AATAA', ?A)
4
iex> NucleotideCount.count('AATAA', ?T)
1
"""
@spec count(charlist(), char()) :: non_neg_integer()
def count(strand, nucleotide) do
Enum.count(strand, &(&... | 21.714286 | 74 | 0.597368 |
65e0fcfc088ad3f51fd9d56cc1bde5da60496fc8 | 4,642 | exs | Elixir | apps/ewallet/test/ewallet/web/v1/serializers/websocket_response_serializer_test.exs | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | 1 | 2018-12-07T06:21:21.000Z | 2018-12-07T06:21:21.000Z | apps/ewallet/test/ewallet/web/v1/serializers/websocket_response_serializer_test.exs | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | null | null | null | apps/ewallet/test/ewallet/web/v1/serializers/websocket_response_serializer_test.exs | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | null | null | null | defmodule EWallet.Web.V1.WebsocketResponseSerializerTest do
use EWallet.Web.SerializerCase, :v1
alias EWallet.Web.V1.WebsocketResponseSerializer
alias Phoenix.Socket.{Broadcast, Message, Reply}
describe "serialize/1" do
test "serializes a websocket message" do
msg = %Message{ref: 1, topic: "topic", e... | 29.0125 | 93 | 0.454115 |
65e128a915de307ef452c2c10feff671da8ab6fa | 3,765 | ex | Elixir | lib/requester_web/http/send_request.ex | jbrb/lyrix-api | c532d1a9f42f9d086a35f8aeb59dc363143d4242 | [
"MIT"
] | null | null | null | lib/requester_web/http/send_request.ex | jbrb/lyrix-api | c532d1a9f42f9d086a35f8aeb59dc363143d4242 | [
"MIT"
] | null | null | null | lib/requester_web/http/send_request.ex | jbrb/lyrix-api | c532d1a9f42f9d086a35f8aeb59dc363143d4242 | [
"MIT"
] | null | null | null | defmodule RequesterWeb.Http.SendRequest do
@api_url "https://api.genius.com/search?q="
@elchatto_url "https://app.elchatto.com/api/integrations"
def get_lyrics(params) do
keyword = String.replace(params["song"], " ", "%20")
url = @api_url <> keyword
case HTTPoison.get(url, %{"Authorization" => "Beare... | 26.892857 | 89 | 0.601859 |
65e1887de048811671f8b5fa1ff5dd782c9e32b3 | 742 | ex | Elixir | lib/platform_web/plugs/www_redirect_plug.ex | lucab85/audioslides.io | cb502ccf6ed0b2db42d9fb20bb4c963bcca3cfa9 | [
"MIT"
] | 17 | 2017-11-14T14:03:18.000Z | 2021-12-10T04:18:48.000Z | lib/platform_web/plugs/www_redirect_plug.ex | lucab85/audioslides.io | cb502ccf6ed0b2db42d9fb20bb4c963bcca3cfa9 | [
"MIT"
] | 21 | 2017-11-19T13:38:07.000Z | 2022-02-10T00:11:14.000Z | lib/platform_web/plugs/www_redirect_plug.ex | lucab85/audioslides.io | cb502ccf6ed0b2db42d9fb20bb4c963bcca3cfa9 | [
"MIT"
] | 2 | 2019-09-03T03:32:13.000Z | 2021-02-23T21:52:57.000Z | defmodule PlatformWeb.WwwRedirectPlug do
@moduledoc """
Removes the www. from an url
"""
import Plug.Conn
def init(opts), do: opts
def call(conn, _opts) do
if String.starts_with?(conn.host, "www.") do
redirect_to_naked_domain(conn)
else
conn
end
end
defp redirect_to_naked_doma... | 22.484848 | 96 | 0.641509 |
65e1b1d3c6bf65b458af7a48a8c48669c782ee5d | 1,105 | exs | Elixir | test/emails/project_invite_email_test.exs | isshindev/accent | ae4c13139b0a0dfd64ff536b94c940a4e2862150 | [
"BSD-3-Clause"
] | 806 | 2018-04-07T20:40:33.000Z | 2022-03-30T01:39:57.000Z | test/emails/project_invite_email_test.exs | isshindev/accent | ae4c13139b0a0dfd64ff536b94c940a4e2862150 | [
"BSD-3-Clause"
] | 194 | 2018-04-07T13:49:37.000Z | 2022-03-30T19:58:45.000Z | test/emails/project_invite_email_test.exs | isshindev/accent | ae4c13139b0a0dfd64ff536b94c940a4e2862150 | [
"BSD-3-Clause"
] | 89 | 2018-04-09T13:55:49.000Z | 2022-03-24T07:09:31.000Z | defmodule AccentTest.ProjectInviteEmail do
use ExUnit.Case
test "create" do
user = %Accent.User{email: "test@test.com"}
project = %Accent.Project{name: "test"}
email_address = "new@test.com"
email = Accent.ProjectInviteEmail.create(email_address, user, project)
assert email.to == email_addres... | 38.103448 | 91 | 0.672398 |
65e1f11dd1792ac69b87c9112190ef1320b74145 | 828 | ex | Elixir | lib/teiserver/battle/tasks/export_aggregate_match_metrics_task.ex | badosu/teiserver | 19b623aeb7c2ab28756405f7486e92b714777c54 | [
"MIT"
] | 4 | 2021-07-29T16:23:20.000Z | 2022-02-23T05:34:36.000Z | lib/teiserver/battle/tasks/export_aggregate_match_metrics_task.ex | badosu/teiserver | 19b623aeb7c2ab28756405f7486e92b714777c54 | [
"MIT"
] | 14 | 2021-08-01T02:36:14.000Z | 2022-01-30T21:15:03.000Z | lib/teiserver/battle/tasks/export_aggregate_match_metrics_task.ex | badosu/teiserver | 19b623aeb7c2ab28756405f7486e92b714777c54 | [
"MIT"
] | 7 | 2021-05-13T12:55:28.000Z | 2022-01-14T06:39:06.000Z | defmodule Teiserver.Battle.ExportAggregateMatchMetricsTask do
alias Teiserver.Telemetry
alias Central.Helpers.{DatePresets}
def perform(params) do
{start_date, end_date} =
DatePresets.parse(
params["date_preset"],
params["start_date"],
params["end_date"]
)
start_date ... | 21.789474 | 61 | 0.624396 |
65e211294a0661a4c683919fcca45d340408cc15 | 262 | ex | Elixir | lib/mix/lib/mix/tasks/iex.ex | jbcrail/elixir | f30ef15d9d028a6d0f74d10c2bb320d5f8501bdb | [
"Apache-2.0"
] | 1 | 2015-02-23T00:01:48.000Z | 2015-02-23T00:01:48.000Z | lib/mix/lib/mix/tasks/iex.ex | jbcrail/elixir | f30ef15d9d028a6d0f74d10c2bb320d5f8501bdb | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/tasks/iex.ex | jbcrail/elixir | f30ef15d9d028a6d0f74d10c2bb320d5f8501bdb | [
"Apache-2.0"
] | null | null | null | defmodule Mix.Tasks.Iex do
use Mix.Task
@moduledoc """
A task that is simply meant to redirect users to `iex -S mix`.
"""
@spec run(OptionParser.argv) :: no_return
def run(_) do
Mix.raise "To use IEx with Mix, please run: iex -S mix"
end
end
| 20.153846 | 64 | 0.660305 |
65e216baad90d3b6e4306d3e993c04821b35e87d | 2,386 | ex | Elixir | web/uploaders/avatar.ex | ClubNix/academy | 962be0defc1d8eedc5d19ac0a65e931c794c6538 | [
"MIT"
] | 3 | 2016-06-18T17:46:14.000Z | 2020-01-21T03:19:41.000Z | web/uploaders/avatar.ex | ClubNix/academy | 962be0defc1d8eedc5d19ac0a65e931c794c6538 | [
"MIT"
] | 18 | 2016-06-18T18:05:43.000Z | 2018-03-06T08:19:41.000Z | web/uploaders/avatar.ex | ClubNix/academy | 962be0defc1d8eedc5d19ac0a65e931c794c6538 | [
"MIT"
] | 3 | 2016-10-26T19:51:06.000Z | 2018-09-18T09:06:14.000Z | defmodule Academy.Avatar do
@moduledoc ~S"""
Handle the avatar uploads.
This uses both the "arc" and "arc_ecto" dependencies. The "arc" dependency is
the baseline of this object (validation, defaults, etc...). The "arc_ecto"
dependency is used to be able to integrate that to our database model (in this
cas... | 26.511111 | 96 | 0.670159 |
65e22279e5d49cf2e8dc2b33f586c529b5c5cfac | 35,674 | ex | Elixir | clients/admin/lib/google_api/admin/directory_v1/api/customers.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/admin/lib/google_api/admin/directory_v1/api/customers.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/admin/lib/google_api/admin/directory_v1/api/customers.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... | 45.971649 | 419 | 0.616443 |
65e232c2a63d9f47484d78924de0ef217f47f24a | 1,804 | ex | Elixir | clients/sheets/lib/google_api/sheets/v4/model/search_developer_metadata_request.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/sheets/lib/google_api/sheets/v4/model/search_developer_metadata_request.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/sheets/lib/google_api/sheets/v4/model/search_developer_metadata_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... | 36.08 | 161 | 0.756652 |
65e24ff8410286f00c86b5f13c60bffd2cc8e151 | 281 | ex | Elixir | rocketpay/lib/rocketpay_web/controllers/fallback_controller.ex | victorabarros/rocketpay | 6bc1fbcd0240c44d720a6c86ab4c45249a6c1230 | [
"MIT"
] | null | null | null | rocketpay/lib/rocketpay_web/controllers/fallback_controller.ex | victorabarros/rocketpay | 6bc1fbcd0240c44d720a6c86ab4c45249a6c1230 | [
"MIT"
] | null | null | null | rocketpay/lib/rocketpay_web/controllers/fallback_controller.ex | victorabarros/rocketpay | 6bc1fbcd0240c44d720a6c86ab4c45249a6c1230 | [
"MIT"
] | null | null | null | defmodule RocketpayWeb.FallbackController do
use RocketpayWeb, :controller
def call(conn, {:error, result}) do
IO.puts("Fallback trigged")
conn
|> put_status(:bad_request)
|> put_view(RocketpayWeb.ErrorView)
|> render("400.json", result: result)
end
end
| 23.416667 | 44 | 0.697509 |
65e25ef6001668af0857b61ac327da6270aa6cd3 | 2,018 | exs | Elixir | config/prod.exs | cblock/circular | fb784d638bde2b1f125a03c403783f93533f5892 | [
"Apache-2.0"
] | null | null | null | config/prod.exs | cblock/circular | fb784d638bde2b1f125a03c403783f93533f5892 | [
"Apache-2.0"
] | 3 | 2020-09-04T09:32:55.000Z | 2022-03-06T02:17:06.000Z | config/prod.exs | cblock/circular | fb784d638bde2b1f125a03c403783f93533f5892 | [
"Apache-2.0"
] | 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.035714 | 66 | 0.71556 |
65e26464eec531648d8821388bf91f231c94d519 | 399 | ex | Elixir | test/support/conn_parser.ex | ntodd/swoosh | e2cc97b695543f9ef29c02d0c50dd692107762b0 | [
"MIT"
] | null | null | null | test/support/conn_parser.ex | ntodd/swoosh | e2cc97b695543f9ef29c02d0c50dd692107762b0 | [
"MIT"
] | null | null | null | test/support/conn_parser.ex | ntodd/swoosh | e2cc97b695543f9ef29c02d0c50dd692107762b0 | [
"MIT"
] | null | null | null | defmodule Swoosh.ConnParser do
def parse(conn, opts \\ []) do
opts =
opts
|> Keyword.put_new(:parsers, [
Plug.Parsers.URLENCODED,
Plug.Parsers.RFC822,
Plug.Parsers.JSON
])
|> Keyword.put_new(:json_decoder, Swoosh.json_library())
|> Keyword.put_new(:pass, ["mes... | 24.9375 | 62 | 0.616541 |
65e2fd0647e30fdd429930b3bc3450bd92040999 | 2,497 | ex | Elixir | lib/graphql/lang/ast/type_info.ex | marvinhagemeister/graphql | 43bccc041438f05d14c8c6f40f193c3d7957ca9d | [
"BSD-3-Clause"
] | 719 | 2016-03-18T03:10:46.000Z | 2022-02-02T10:07:29.000Z | lib/graphql/lang/ast/type_info.ex | marvinhagemeister/graphql | 43bccc041438f05d14c8c6f40f193c3d7957ca9d | [
"BSD-3-Clause"
] | 51 | 2015-08-30T03:15:17.000Z | 2016-03-02T07:13:26.000Z | lib/graphql/lang/ast/type_info.ex | marvinhagemeister/graphql | 43bccc041438f05d14c8c6f40f193c3d7957ca9d | [
"BSD-3-Clause"
] | 34 | 2016-03-30T12:56:11.000Z | 2021-08-30T09:21:54.000Z |
defmodule GraphQL.Lang.AST.TypeInfo do
@moduledoc ~S"""
TypeInfo maintains type metadata pertaining to the current node of a query AST,
and is generated by the TypeInfoVistor.
The type information is made available to validation rules.
"""
alias GraphQL.Util.Stack
alias GraphQL.Type.{
CompositeType... | 27.744444 | 99 | 0.678414 |
65e301b301c367fa7abdcc87b12ce5ea6fa1b49d | 7,557 | ex | Elixir | lib/stream/stream.ex | UA3MQJ/nats.ex | 549ac3180fe08d3a06cf3b085cf5a40759cc090b | [
"MIT"
] | null | null | null | lib/stream/stream.ex | UA3MQJ/nats.ex | 549ac3180fe08d3a06cf3b085cf5a40759cc090b | [
"MIT"
] | null | null | null | lib/stream/stream.ex | UA3MQJ/nats.ex | 549ac3180fe08d3a06cf3b085cf5a40759cc090b | [
"MIT"
] | null | null | null | # State transitions:
# :waiting_for_message => receive PING, send PONG => :waiting_for_message
# :waiting_for_message => receive MSG... -> :waiting_for_message
defmodule Gnat.Stream do
use GenServer
require Logger
alias Gnat.Stream.Subscription
alias Gnat.Stream.Proto
alias Proto.{ConnectResponse, Subscrip... | 29.635294 | 113 | 0.661374 |
65e30be11bc5f60802701b1cd730b89edf39e403 | 2,075 | exs | Elixir | config/dev.exs | gsmlg/phoenix-template | bcaa68c21f4c9d28e359c933a03b5347028dcd73 | [
"MIT"
] | 1 | 2020-08-08T22:57:58.000Z | 2020-08-08T22:57:58.000Z | config/dev.exs | gsmlg/phoenix-template | bcaa68c21f4c9d28e359c933a03b5347028dcd73 | [
"MIT"
] | 4 | 2020-04-06T01:43:11.000Z | 2021-09-02T20:55:46.000Z | config/dev.exs | gsmlg/phoenix-template | bcaa68c21f4c9d28e359c933a03b5347028dcd73 | [
"MIT"
] | null | null | null | use Mix.Config
# Configure your database
# config :gsmlg, Gsmlg.Repo,
# username: "postgres",
# password: "postgres",
# database: "gsmlg_dev",
# hostname: "localhost",
# show_sensitive_data_on_connection_error: true,
# pool_size: 10
# For development, we disable any cache and enable
# debugging and code r... | 27.302632 | 68 | 0.683373 |
65e3367c3310b48f8fb1e79a045dfc9febe6faa5 | 163 | ex | Elixir | wabanex/lib/wabanex/trainings/create.ex | shonorio/nlwt_elixir | 029b731c747e4b4954bc0197881b325fb80b4ab6 | [
"MIT"
] | null | null | null | wabanex/lib/wabanex/trainings/create.ex | shonorio/nlwt_elixir | 029b731c747e4b4954bc0197881b325fb80b4ab6 | [
"MIT"
] | null | null | null | wabanex/lib/wabanex/trainings/create.ex | shonorio/nlwt_elixir | 029b731c747e4b4954bc0197881b325fb80b4ab6 | [
"MIT"
] | null | null | null | defmodule Wabanex.Training.Create do
alias Wabanex.{Repo, Training}
def call(params) do
params
|> Training.changeset()
|> Repo.insert()
end
end
| 16.3 | 36 | 0.674847 |
65e341e1718c77bda3ac1e3406894b6a054388d5 | 1,224 | exs | Elixir | mix.exs | werkzeugh/exi18n | c29780ba56f516dca471e1cc2379c37ea85cb04b | [
"MIT"
] | null | null | null | mix.exs | werkzeugh/exi18n | c29780ba56f516dca471e1cc2379c37ea85cb04b | [
"MIT"
] | null | null | null | mix.exs | werkzeugh/exi18n | c29780ba56f516dca471e1cc2379c37ea85cb04b | [
"MIT"
] | null | null | null | defmodule ExI18n.Mixfile do
use Mix.Project
def project do
[
app: :exi18n,
version: "0.8.0",
elixir: "~> 1.5",
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
deps: deps(),
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [coveralls... | 25.5 | 71 | 0.544118 |
65e3677ba3392413978b7c11ffcd2af5cb11a40b | 6,431 | ex | Elixir | lib/phoenix/live_dashboard/live/request_logger_live.ex | wojtekmach/phoenix_live_dashboard | 5b0a001bd5772ffc1e9de82b954a62c860490fc5 | [
"MIT"
] | 2 | 2020-05-07T23:49:26.000Z | 2020-05-10T13:56:03.000Z | lib/phoenix/live_dashboard/live/request_logger_live.ex | wojtekmach/phoenix_live_dashboard | 5b0a001bd5772ffc1e9de82b954a62c860490fc5 | [
"MIT"
] | 1 | 2020-06-11T01:43:00.000Z | 2020-06-16T04:48:00.000Z | lib/phoenix/live_dashboard/live/request_logger_live.ex | wojtekmach/phoenix_live_dashboard | 5b0a001bd5772ffc1e9de82b954a62c860490fc5 | [
"MIT"
] | null | null | null | defmodule Phoenix.LiveDashboard.RequestLoggerLive do
use Phoenix.LiveDashboard.Web, :live_view
@impl true
def mount(%{"stream" => stream} = params, session, socket) do
%{"request_logger" => {param_key, cookie_key}} = session
if connected?(socket) do
# TODO: Remove || once we support Phoenix v1.5+
... | 35.335165 | 158 | 0.587311 |
65e3867ef4182d556024af48ac71a84c3ab71d52 | 2,647 | ex | Elixir | lib/base62_uuid.ex | aboard-io/base62_uuid | cee41bd1a597c48803481c75e49711ad7c819a1e | [
"MIT"
] | 4 | 2016-09-20T17:21:29.000Z | 2017-04-17T12:06:21.000Z | lib/base62_uuid.ex | aboard-io/base62_uuid | cee41bd1a597c48803481c75e49711ad7c819a1e | [
"MIT"
] | null | null | null | lib/base62_uuid.ex | aboard-io/base62_uuid | cee41bd1a597c48803481c75e49711ad7c819a1e | [
"MIT"
] | 2 | 2019-01-18T22:49:26.000Z | 2021-10-18T20:10:35.000Z | defmodule Base62UUID do
@moduledoc """
A base 62-encoded v4 UUID.
"""
@length 22
@uuid_length 32
@doc """
Generate a 22-byte base-62-encoded v4 UUID.
"""
@spec generate :: String.t()
def generate do
encode!(UUID.uuid4())
end
@doc """
Encode a v4 UUID to a 22-byte encoded UUID.
Return... | 24.509259 | 98 | 0.614658 |
65e3974dc381db4bcfbfc267b7541eea205c778d | 2,392 | exs | Elixir | config/dev.exs | zarynxyz/website | 6c833c78f83f7765286cdbf7b0aa2976ddcfac3f | [
"Apache-2.0"
] | null | null | null | config/dev.exs | zarynxyz/website | 6c833c78f83f7765286cdbf7b0aa2976ddcfac3f | [
"Apache-2.0"
] | null | null | null | config/dev.exs | zarynxyz/website | 6c833c78f83f7765286cdbf7b0aa2976ddcfac3f | [
"Apache-2.0"
] | null | null | null | import Config
# Configure your database
config :website, Website.Repo,
username: "postgres",
password: "postgres",
hostname: "localhost",
database: "website_dev",
show_sensitive_data_on_connection_error: true,
pool_size: 10
# For development, we disable any cache and enable
# debugging and code reloading.... | 31.893333 | 86 | 0.713211 |
65e3b17503cef54a36305ebf236a2c43da55e017 | 1,005 | ex | Elixir | lib/hora/changeset.ex | sticksnleaves/me | a63478c4eb82f586da706c9394156018f35ca686 | [
"MIT"
] | 5 | 2017-04-07T19:27:27.000Z | 2020-10-30T23:24:16.000Z | lib/hora/changeset.ex | sticksnleaves/me | a63478c4eb82f586da706c9394156018f35ca686 | [
"MIT"
] | null | null | null | lib/hora/changeset.ex | sticksnleaves/me | a63478c4eb82f586da706c9394156018f35ca686 | [
"MIT"
] | null | null | null | defmodule Hora.Changeset do
@moduledoc """
Utility functions for working with Ecto.Changeset.
"""
import Ecto.Changeset
@doc """
Modifies the changeset by adding a secure password if a change to the password
has been made.
### Example
```elixir
changeset
|> Hora.Changeset.put_secure_password(:... | 25.769231 | 101 | 0.709453 |
65e3cbb90765cc10343cbd0099a12b74ae5ebe1d | 1,863 | ex | Elixir | clients/drive_activity/lib/google_api/drive_activity/v2/model/query_drive_activity_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/drive_activity/lib/google_api/drive_activity/v2/model/query_drive_activity_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/drive_activity/lib/google_api/drive_activity/v2/model/query_drive_activity_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 37.26 | 157 | 0.744498 |
65e41aa1d1e1d0671d1b9de43a514aaf65145ff6 | 9,636 | exs | Elixir | lib/mix/test/test_helper.exs | sjBao/elixir | 52ee3ac163098f91f15dcb1360ae801a98453a77 | [
"Apache-2.0"
] | 1 | 2020-01-14T18:44:56.000Z | 2020-01-14T18:44:56.000Z | lib/mix/test/test_helper.exs | sjBao/elixir | 52ee3ac163098f91f15dcb1360ae801a98453a77 | [
"Apache-2.0"
] | null | null | null | lib/mix/test/test_helper.exs | sjBao/elixir | 52ee3ac163098f91f15dcb1360ae801a98453a77 | [
"Apache-2.0"
] | null | null | null | Mix.start()
Mix.shell(Mix.Shell.Process)
Application.put_env(:mix, :colors, enabled: false)
Logger.remove_backend(:console)
Application.put_env(:logger, :backends, [])
os_exclude = if match?({:win32, _}, :os.type()), do: [unix: true], else: [windows: true]
epmd_exclude = if match?({:win32, _}, :os.type()), do: [epmd:... | 23.052632 | 88 | 0.626297 |
65e41efcde6d7cac305a47c4cff4ac5390d2e329 | 496 | ex | Elixir | lib/doppler_config_provider/http_client.ex | sevenshores/doppler_config_provider | b64e58413cac45ee95a0e25cb0ecc03306fbf814 | [
"Apache-2.0"
] | 3 | 2022-01-01T03:38:16.000Z | 2022-01-02T16:47:42.000Z | lib/doppler_config_provider/http_client.ex | sevenshores/doppler_config_provider | b64e58413cac45ee95a0e25cb0ecc03306fbf814 | [
"Apache-2.0"
] | null | null | null | lib/doppler_config_provider/http_client.ex | sevenshores/doppler_config_provider | b64e58413cac45ee95a0e25cb0ecc03306fbf814 | [
"Apache-2.0"
] | null | null | null | defmodule DopplerConfigProvider.HTTPClient do
@moduledoc """
HTTP client behaviour. Any HTTP client module supplied to this config provider
must implement a `request/2` function that returns either `:ok` or `:error`
tuples matching the specified `type`s.
"""
@type url :: String.t()
@type headers :: [{Str... | 35.428571 | 82 | 0.677419 |
65e469b0c30b2b860c8bbfce2344c65f5a8a61cb | 97 | ex | Elixir | lib/recipient_2.ex | ianrumford/siariwyd_examples | 73eecc80b3f21f175a767bbf03c18acbc32a84f3 | [
"MIT"
] | null | null | null | lib/recipient_2.ex | ianrumford/siariwyd_examples | 73eecc80b3f21f175a767bbf03c18acbc32a84f3 | [
"MIT"
] | null | null | null | lib/recipient_2.ex | ianrumford/siariwyd_examples | 73eecc80b3f21f175a767bbf03c18acbc32a84f3 | [
"MIT"
] | null | null | null | defmodule Recipient2 do
import DonorA
def recipient_2_fun_p do
donor_a_fun_j()
end
end
| 13.857143 | 26 | 0.762887 |
65e46bede17f38f9de016c6168a30932679dc9b6 | 1,944 | ex | Elixir | lib/checker_mal/backend/txt.ex | Hiyori-API/checker-mal | c52f6e8a248ba160ffebc2c9369a933fc8fc4499 | [
"MIT"
] | 10 | 2020-06-12T18:36:58.000Z | 2022-02-20T11:07:49.000Z | lib/checker_mal/backend/txt.ex | Hiyori-API/checker-mal | c52f6e8a248ba160ffebc2c9369a933fc8fc4499 | [
"MIT"
] | 7 | 2020-05-08T06:03:08.000Z | 2022-01-24T02:57:16.000Z | lib/checker_mal/backend/txt.ex | Hiyori-API/checker-mal | c52f6e8a248ba160ffebc2c9369a933fc8fc4499 | [
"MIT"
] | 1 | 2020-12-03T03:49:27.000Z | 2020-12-03T03:49:27.000Z | defmodule CheckerMal.Backend.Txt do
@moduledoc """
Stores the approved IDs for MAL in local txt files, one ID per line
"""
require Logger
alias CheckerMal.Core.FeedItem
def read(type, rating), do: read_or_empty(type, rating)
def write(new_structs, type, rating) when is_list(new_structs) do
entries ... | 29.907692 | 79 | 0.63786 |
65e47b2e7161d29105343cbfc0b52a756ef7dcc7 | 1,279 | ex | Elixir | lib/blog_web/endpoint.ex | jbcaprell/absinthe_tutorial | 52db65e9b07e4117ec2ef44a91028a0f01e5dd8a | [
"MIT"
] | null | null | null | lib/blog_web/endpoint.ex | jbcaprell/absinthe_tutorial | 52db65e9b07e4117ec2ef44a91028a0f01e5dd8a | [
"MIT"
] | null | null | null | lib/blog_web/endpoint.ex | jbcaprell/absinthe_tutorial | 52db65e9b07e4117ec2ef44a91028a0f01e5dd8a | [
"MIT"
] | null | null | null | defmodule BlogWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :blog
# The session will be stored in the cookie and signed,
# this means its contents can be read but not tampered with.
# Set :encryption_salt if you would also like to encrypt it.
@session_options [
store: :cookie,
key: "_blog_key",
... | 27.212766 | 63 | 0.702893 |
65e4a23404898af21eb8590a2d36e0cbda0a6820 | 356 | exs | Elixir | priv/repo/migrations/20180809140205_add_exit_status_to_job.exs | marcosvm/elixir-bench-api | b60164521cf774a7a861c5c373671324f222e7f0 | [
"Apache-2.0"
] | 9 | 2018-01-05T18:59:29.000Z | 2019-01-20T22:18:41.000Z | priv/repo/migrations/20180809140205_add_exit_status_to_job.exs | marcosvm/elixir-bench-api | b60164521cf774a7a861c5c373671324f222e7f0 | [
"Apache-2.0"
] | 52 | 2018-02-19T20:04:23.000Z | 2019-09-23T14:36:58.000Z | priv/repo/migrations/20180809140205_add_exit_status_to_job.exs | marcosvm/elixir-bench-api | b60164521cf774a7a861c5c373671324f222e7f0 | [
"Apache-2.0"
] | 3 | 2018-03-07T21:56:46.000Z | 2018-10-09T12:29:27.000Z | defmodule ElixirBench.Repo.Migrations.AddExitStatusToJob do
use Ecto.Migration
def change do
alter table(:jobs) do
add :exit_status, :integer, default: nil
end
# assume all existent jobs has finished with success
execute """
UPDATE jobs SET exit_status = 0 WHERE exit_status IS NULL;
... | 23.733333 | 62 | 0.69382 |
65e4b48a5c10ecca130ceda34c61c2e12b0b08c5 | 746 | exs | Elixir | test/ex_openrtb/user_test.exs | justuswilhelm/ex_openrtb | 72f2559e7a76d63867efda2a8fa16169d931348c | [
"MIT",
"Unlicense"
] | 2 | 2019-01-16T17:54:06.000Z | 2021-02-13T19:14:29.000Z | test/ex_openrtb/user_test.exs | justuswilhelm/ex_openrtb | 72f2559e7a76d63867efda2a8fa16169d931348c | [
"MIT",
"Unlicense"
] | null | null | null | test/ex_openrtb/user_test.exs | justuswilhelm/ex_openrtb | 72f2559e7a76d63867efda2a8fa16169d931348c | [
"MIT",
"Unlicense"
] | 1 | 2018-02-18T16:19:14.000Z | 2018-02-18T16:19:14.000Z | defmodule ExOpenRTB.UserTest do
use ExUnit.Case, async: true
import ExOpenRTB.Test
test_decode %ExOpenRTB.User{
"id": "456789876567897654678987656789",
"buyeruid": "545678765467876567898765678987654",
"data": [
%ExOpenRTB.Data{
"id": "6",
"name": "Data Provider 1",
"segm... | 24.064516 | 52 | 0.50134 |
65e5063a3b099df49e6c2a108345164331bf71ab | 743 | exs | Elixir | test/comeback_movement_test.exs | cruessler/lafamiglia | 084915a2d44a5e69fb6ad9321eac08ced0e3016a | [
"MIT"
] | 5 | 2016-10-20T10:00:59.000Z | 2017-11-19T08:14:18.000Z | test/comeback_movement_test.exs | cruessler/lafamiglia | 084915a2d44a5e69fb6ad9321eac08ced0e3016a | [
"MIT"
] | 39 | 2020-04-22T05:27:32.000Z | 2022-03-13T17:22:26.000Z | test/comeback_movement_test.exs | cruessler/lafamiglia | 084915a2d44a5e69fb6ad9321eac08ced0e3016a | [
"MIT"
] | null | null | null | defmodule LaFamiglia.ComebackMovementTest do
use LaFamiglia.ModelCase
alias LaFamiglia.Unit
alias LaFamiglia.ComebackMovement
test "from_attack" do
attack = build(:attack)
comeback = ComebackMovement.from_attack(attack)
assert get_field(comeback, :origin) == attack.origin
assert DateTime.co... | 27.518519 | 92 | 0.752355 |
65e5064493d423f9c59e8c2ced65a2ad2281f49d | 2,234 | exs | Elixir | test/gim_test.exs | jan-sti/gim | 1b8be6c2163577f375825170cc9b01674e59b646 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | test/gim_test.exs | jan-sti/gim | 1b8be6c2163577f375825170cc9b01674e59b646 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | test/gim_test.exs | jan-sti/gim | 1b8be6c2163577f375825170cc9b01674e59b646 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | defmodule GimTest do
@moduledoc false
use ExUnit.Case
alias GimTest.Biblio, as: MyApp
doctest Gim, import: true
alias GimTest.Biblio
alias Biblio.{Repo, Author, Book, Publisher}
setup do
Biblio.setup(:set3)
# {:ok, pid: pid}
end
# @tag movies: true
test "all" do
assert {:ok, books} =... | 30.60274 | 93 | 0.66607 |
65e51f3b735b6bf0df37d31895fb1c90f7aa2387 | 1,028 | ex | Elixir | elixir/phoenix_socket/test/support/channel_case.ex | BStudent/SPANC-websocket-shootout | 44353f1b9bf87ba7017b2788d876e732b410b4c4 | [
"MIT"
] | 421 | 2016-09-01T14:16:04.000Z | 2022-03-11T14:22:29.000Z | elixir/phoenix_socket/test/support/channel_case.ex | BStudent/SPANC-websocket-shootout | 44353f1b9bf87ba7017b2788d876e732b410b4c4 | [
"MIT"
] | 48 | 2016-09-01T23:10:37.000Z | 2020-10-28T14:34:47.000Z | elixir/phoenix_socket/test/support/channel_case.ex | thewillhuang/websocket-shootout | d9046f341dc2a1ed54be5e734a546b392db09b05 | [
"MIT"
] | 84 | 2016-09-01T14:37:39.000Z | 2021-11-10T16:46:13.000Z | defmodule PhoenixSocket.ChannelCase do
@moduledoc """
This module defines the test case to be used by
channel tests.
Such tests rely on `Phoenix.ChannelTest` and also
import other functionality to make it easier
to build and query models.
Finally, if the test case interacts with the database,
it canno... | 23.363636 | 75 | 0.709144 |
65e54a73a1fa599998192affb9457880d8073b0b | 2,946 | ex | Elixir | lib/helpers.ex | sketch-hq/lossless-jason | a7aa28160de146269662f4e4d72a76a7f75fb875 | [
"Apache-2.0"
] | null | null | null | lib/helpers.ex | sketch-hq/lossless-jason | a7aa28160de146269662f4e4d72a76a7f75fb875 | [
"Apache-2.0"
] | null | null | null | lib/helpers.ex | sketch-hq/lossless-jason | a7aa28160de146269662f4e4d72a76a7f75fb875 | [
"Apache-2.0"
] | null | null | null | defmodule LosslessJason.Helpers do
@moduledoc """
Provides macro facilities for partial compile-time encoding of JSON.
"""
alias LosslessJason.{Codegen, Fragment}
@doc ~S"""
Encodes a JSON map from a compile-time keyword.
Encodes the keys at compile time and strives to create as flat iodata
structure... | 29.757576 | 93 | 0.650373 |
65e55be370c92524ca179b908f5363c2cb854d26 | 285 | ex | Elixir | template/lib/application.ex | rastasheep/thunder | d095628329b05fb55961603d52a5999e325c6a3e | [
"MIT"
] | 1 | 2015-07-26T13:33:45.000Z | 2015-07-26T13:33:45.000Z | template/lib/application.ex | rastasheep/thunder | d095628329b05fb55961603d52a5999e325c6a3e | [
"MIT"
] | null | null | null | template/lib/application.ex | rastasheep/thunder | d095628329b05fb55961603d52a5999e325c6a3e | [
"MIT"
] | null | null | null | defmodule <%= application_module %> do
use Application.Behaviour
# See http://elixir-lang.org/docs/stable/Application.Behaviour.html
# for more information on OTP Applications
def start(_type, _args) do
Thunder.HttpServer.run
Thunder.Supervisor.start_link
end
end
| 21.923077 | 69 | 0.750877 |
65e55f9892599e3b817dab698cb1bca0f517de53 | 1,787 | ex | Elixir | clients/testing/lib/google_api/testing/v1/model/uniform_sharding.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/testing/lib/google_api/testing/v1/model/uniform_sharding.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/testing/lib/google_api/testing/v1/model/uniform_sharding.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 38.021277 | 277 | 0.746503 |
65e5661adf4aa0ed97d101745b05568d16cee40d | 7,134 | ex | Elixir | clients/content/lib/google_api/content/v21/api/localinventory.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/content/lib/google_api/content/v21/api/localinventory.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/content/lib/google_api/content/v21/api/localinventory.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... | 43.236364 | 196 | 0.630642 |
65e58794fbed32a57d67971035a8a0bd2f032246 | 371 | ex | Elixir | lib/tiny_earl/server_supervisor.ex | rossta/tiny-earl | 60dca22617c38c75da384c432da6c6ae9a95df94 | [
"MIT"
] | null | null | null | lib/tiny_earl/server_supervisor.ex | rossta/tiny-earl | 60dca22617c38c75da384c432da6c6ae9a95df94 | [
"MIT"
] | null | null | null | lib/tiny_earl/server_supervisor.ex | rossta/tiny-earl | 60dca22617c38c75da384c432da6c6ae9a95df94 | [
"MIT"
] | null | null | null | defmodule TinyEarl.ServerSupervisor do
use Supervisor
def start_link do
Supervisor.start_link(__MODULE__, nil, name: :server_supervisor)
end
def start_child(domain_name) do
Supervisor.start_child(:server_supervisor, [domain_name])
end
def init(_) do
supervise([
worker(TinyEarl.Server, [... | 20.611111 | 68 | 0.727763 |
65e59e86a50dbf718e7150ededaf40926ca907c5 | 1,092 | exs | Elixir | mix.exs | ianrumford/harnais_error | f3151d7f15200a357fb8da1f16bcb4719fb2e839 | [
"MIT"
] | null | null | null | mix.exs | ianrumford/harnais_error | f3151d7f15200a357fb8da1f16bcb4719fb2e839 | [
"MIT"
] | null | null | null | mix.exs | ianrumford/harnais_error | f3151d7f15200a357fb8da1f16bcb4719fb2e839 | [
"MIT"
] | null | null | null | defmodule Harnais.Error.Mixfile do
use Mix.Project
@version "0.3.0"
def project do
[
app: :harnais_error,
version: @version,
description: description(),
package: package(),
source_url: "https://github.com/ianrumford/harnais_error",
homepage_url: "https://github.com/ianrum... | 22.285714 | 69 | 0.574176 |
65e5b77a31c1f45f5161205afec5418a01642ffb | 1,362 | ex | Elixir | blockchain/lib/src/user.ex | anipmehta/BlockChain | c73b5ca7aad44be6e85a47ecd972f093f78d26e2 | [
"MIT"
] | null | null | null | blockchain/lib/src/user.ex | anipmehta/BlockChain | c73b5ca7aad44be6e85a47ecd972f093f78d26e2 | [
"MIT"
] | null | null | null | blockchain/lib/src/user.ex | anipmehta/BlockChain | c73b5ca7aad44be6e85a47ecd972f093f78d26e2 | [
"MIT"
] | null | null | null | defmodule User do
use GenServer
def init([]) do
{public_key, private_key} = :crypto.generate_key(:ecdh, :crypto.ec_curve(:secp256k1))
user_id = Nanoid.generate()
{:ok, {private_key, public_key, user_id}}
end
def start_link() do
GenServer.start_link(__MODULE__, [])
end
def get_private_key(... | 28.978723 | 90 | 0.674009 |
65e5d97430029aa0214dcbfd01a4aa3078e5b12c | 303 | ex | Elixir | lib/elixir_adn/model/clause.ex | shaunc311/ElixirADN | 9d46329c47695eb04bed02fb9316b2090735141b | [
"0BSD"
] | 6 | 2015-02-08T01:22:31.000Z | 2015-09-24T01:24:18.000Z | lib/elixir_adn/model/clause.ex | shaunc311/ElixirADN | 9d46329c47695eb04bed02fb9316b2090735141b | [
"0BSD"
] | 23 | 2015-02-08T12:26:01.000Z | 2015-06-02T00:39:15.000Z | lib/elixir_adn/model/clause.ex | shaunc311/ElixirADN | 9d46329c47695eb04bed02fb9316b2090735141b | [
"0BSD"
] | null | null | null | defmodule ElixirADN.Model.Clause do
@doc ~S"""
An elixir representation of the ADN clause map
{
"field": "/data/entities/hashtags/*/name",
"object_type": "post",
"operator": "matches",
"value": "rollout"
}
"""
defstruct field: "", object_type: "", operator: "", value: ""
end | 25.25 | 63 | 0.613861 |
65e5e591cbe14ad4b0abb69f476a8ba7f322a38c | 2,402 | exs | Elixir | mix.exs | b-a-b-e/ProComPrag | 50c6c87933e71cb69b5c95bc77bf591a34661410 | [
"MIT"
] | 1 | 2018-05-19T12:08:10.000Z | 2018-05-19T12:08:10.000Z | mix.exs | b-a-b-e/ProComPrag | 50c6c87933e71cb69b5c95bc77bf591a34661410 | [
"MIT"
] | 59 | 2018-05-16T00:53:06.000Z | 2019-04-19T12:16:49.000Z | mix.exs | babe-project/BABE | 50c6c87933e71cb69b5c95bc77bf591a34661410 | [
"MIT"
] | 1 | 2019-07-28T19:17:43.000Z | 2019-07-28T19:17:43.000Z | defmodule Magpie.Mixfile do
use Mix.Project
def project do
[
app: :magpie,
version: "2.3.4",
elixir: "~> 1.12",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() =... | 30.405063 | 90 | 0.559117 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.