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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2d303103a4b6baa377fc8e3e9af02a516fd5523e | 100,857 | ex | Elixir | clients/compute/lib/google_api/compute/v1/api/instances.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/api/instances.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/api/instances.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... | 48.983487 | 1,213 | 0.681262 |
2d304195cbf0b95259f6a633cf562c653fd5afbc | 773 | exs | Elixir | part2/.spoiler/mix.exs | Tuxified/weert-workshop | abe48af48631acac89a374277b98b981702deed7 | [
"Apache-2.0"
] | null | null | null | part2/.spoiler/mix.exs | Tuxified/weert-workshop | abe48af48631acac89a374277b98b981702deed7 | [
"Apache-2.0"
] | null | null | null | part2/.spoiler/mix.exs | Tuxified/weert-workshop | abe48af48631acac89a374277b98b981702deed7 | [
"Apache-2.0"
] | null | null | null | defmodule Flamel.Mixfile do
use Mix.Project
def project do
[app: :flamel,
version: "0.0.1",
elixir: "~> 1.2",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps,
escript: escript]
end
# Configuration for the OTP application
#
# Type "mix help ... | 20.342105 | 77 | 0.60414 |
2d3056a8aa0060dc87fdab4d90bc471a882e9a1a | 1,062 | ex | Elixir | lib/verk_web/tracking_jobs_handler.ex | apodlaski/verk_web | 91c544b1f792f929e06f18e26b964e23a5771a8a | [
"MIT"
] | null | null | null | lib/verk_web/tracking_jobs_handler.ex | apodlaski/verk_web | 91c544b1f792f929e06f18e26b964e23a5771a8a | [
"MIT"
] | null | null | null | lib/verk_web/tracking_jobs_handler.ex | apodlaski/verk_web | 91c544b1f792f929e06f18e26b964e23a5771a8a | [
"MIT"
] | null | null | null | defmodule VerkWeb.TrackingJobsHandler do
@broadcast_interval 1_000
use GenStage
def start_link(pid) do
GenStage.start_link(__MODULE__, pid)
end
def init(pid) do
Process.send_after(self(), :broadcast_stats, @broadcast_interval)
{:consumer, {pid, %{finished: 0, failed: 0}}, subscribe_to: [Verk.Ev... | 27.947368 | 85 | 0.676083 |
2d3068a2b06794d77feddf804338f59f43df92df | 8,225 | ex | Elixir | lib/ex_doc/formatter/html/templates.ex | zoldar/ex_doc | f2ca5d1f4f85650b55460bc08e4d17a00f9f0d75 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | lib/ex_doc/formatter/html/templates.ex | zoldar/ex_doc | f2ca5d1f4f85650b55460bc08e4d17a00f9f0d75 | [
"Apache-2.0",
"CC-BY-4.0"
] | 2 | 2020-12-04T22:03:31.000Z | 2022-03-02T10:00:23.000Z | lib/ex_doc/formatter/html/templates.ex | bonomali/ex_doc | d22cdad512fbfd8bfc44b417c680b1105c8aa19a | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | defmodule ExDoc.Formatter.HTML.Templates do
@moduledoc false
require EEx
alias ExDoc.Formatter.HTML
@doc """
Generate content from the module template for a given `node`
"""
def module_page(module_node, nodes_map, config) do
summary = module_summary(module_node)
module_template(config, module_no... | 26.704545 | 105 | 0.624924 |
2d30e9d3576b9fb07c073575540b916b4d906452 | 11,568 | exs | Elixir | apps/app_lin/test/app_lin_test.exs | niclaslind/signalbroker-server | afb80514dcbabe561ac2da42adc08843a15c37c5 | [
"Apache-2.0"
] | 17 | 2020-06-20T11:29:43.000Z | 2022-03-21T05:53:06.000Z | apps/app_lin/test/app_lin_test.exs | niclaslind/signalbroker-server | afb80514dcbabe561ac2da42adc08843a15c37c5 | [
"Apache-2.0"
] | 2 | 2020-07-09T10:22:50.000Z | 2020-09-01T14:46:40.000Z | apps/app_lin/test/app_lin_test.exs | niclaslind/signalbroker-server | afb80514dcbabe561ac2da42adc08843a15c37c5 | [
"Apache-2.0"
] | 3 | 2020-07-17T20:04:36.000Z | 2022-01-24T14:19:46.000Z | # Copyright 2019 Volvo Cars
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (t... | 34.531343 | 383 | 0.674879 |
2d310729c20138919515e5f5194db07f974abf66 | 1,620 | ex | Elixir | lib/oli_web/live/products/payments/discounts_form.ex | wyeworks/oli-torus | 146ee79a7e315e57bdf3c7b6fd4f7dbe73610647 | [
"MIT"
] | null | null | null | lib/oli_web/live/products/payments/discounts_form.ex | wyeworks/oli-torus | 146ee79a7e315e57bdf3c7b6fd4f7dbe73610647 | [
"MIT"
] | 9 | 2021-11-02T16:52:09.000Z | 2022-03-25T15:14:01.000Z | lib/oli_web/live/products/payments/discounts_form.ex | wyeworks/oli-torus | 146ee79a7e315e57bdf3c7b6fd4f7dbe73610647 | [
"MIT"
] | null | null | null | defmodule OliWeb.Products.Payments.DiscountsForm do
use Surface.Component
import Ecto.Changeset
alias Surface.Components.Form
alias Surface.Components.Form.{ErrorTag, Field, Label, Select, NumberInput, TextInput}
alias OliWeb.Common.Properties.ReadOnly
prop changeset, :changeset, required: true
prop di... | 34.468085 | 149 | 0.643827 |
2d311bb5cdc8d242446c0d01cf40d85a00ca0ff0 | 128 | exs | Elixir | .credo.exs | kianmeng/mmdb2_decoder | dbf65dd6e3de5804928e36c38c19aefe1a83f081 | [
"Apache-2.0"
] | 4 | 2018-03-03T18:59:49.000Z | 2019-09-10T07:59:22.000Z | .credo.exs | elixytics/accesslog_parser | d8d565fde15df262ba7725f3f7e0095dc443fdb7 | [
"Apache-2.0"
] | 1 | 2021-12-23T12:26:05.000Z | 2021-12-23T12:26:05.000Z | .credo.exs | elixytics/accesslog_parser | d8d565fde15df262ba7725f3f7e0095dc443fdb7 | [
"Apache-2.0"
] | 4 | 2018-06-21T16:45:56.000Z | 2021-08-30T11:31:19.000Z | %{
configs: [
%{
name: "default",
files: %{
included: ["bench/", "lib/", "test/"]
}
}
]
}
| 11.636364 | 45 | 0.335938 |
2d3123935ec93fd15dcfcd3905eddbaaed7de40b | 1,527 | exs | Elixir | mix.exs | cenurv/ecto_store | 3e414cb56b5c788f6adf35bad597f34fa95f2f29 | [
"Apache-2.0"
] | 8 | 2016-10-27T15:53:18.000Z | 2022-01-03T23:47:45.000Z | mix.exs | cenurv/ecto_store | 3e414cb56b5c788f6adf35bad597f34fa95f2f29 | [
"Apache-2.0"
] | 5 | 2017-04-25T15:28:29.000Z | 2017-10-05T16:08:57.000Z | mix.exs | cenurv/ecto_store | 3e414cb56b5c788f6adf35bad597f34fa95f2f29 | [
"Apache-2.0"
] | 3 | 2017-08-28T18:51:24.000Z | 2020-01-16T22:30:33.000Z | defmodule EctoStore.Mixfile do
use Mix.Project
@version "3.0.0"
def project do
[app: :ecto_schema_store,
version: @version,
elixir: "~> 1.6",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
compilers: [:gettext] ++ Mix.compilers,
deps: deps(),
descript... | 29.365385 | 100 | 0.592665 |
2d31722cbf9ddb741bf7a46612405ed5521adb0e | 2,810 | exs | Elixir | apps/re/test/addresses/neighborhoods_test.exs | caspg/backend | 34df9dc14ab8ed75de4578fefa2e087580c7e867 | [
"MIT"
] | 1 | 2021-01-19T05:01:15.000Z | 2021-01-19T05:01:15.000Z | apps/re/test/addresses/neighborhoods_test.exs | caspg/backend | 34df9dc14ab8ed75de4578fefa2e087580c7e867 | [
"MIT"
] | null | null | null | apps/re/test/addresses/neighborhoods_test.exs | caspg/backend | 34df9dc14ab8ed75de4578fefa2e087580c7e867 | [
"MIT"
] | null | null | null | defmodule Re.NeighborhoodsTest do
use Re.ModelCase
alias Re.Addresses.Neighborhoods
import Re.Factory
describe "all" do
test "should return only addresses with active listing" do
address1 = insert(:address, neighborhood: "Test 1")
insert(:listing, address: address1)
insert(:listing, add... | 33.452381 | 95 | 0.666904 |
2d317f77926bbb57239eb246f139ab8433ebcd22 | 350 | exs | Elixir | phoenix/priv/repo/seeds.exs | pfac/generated | 3611d887bb4eba1ef63b1f16ed1dba54ce94f341 | [
"MIT"
] | null | null | null | phoenix/priv/repo/seeds.exs | pfac/generated | 3611d887bb4eba1ef63b1f16ed1dba54ce94f341 | [
"MIT"
] | null | null | null | phoenix/priv/repo/seeds.exs | pfac/generated | 3611d887bb4eba1ef63b1f16ed1dba54ce94f341 | [
"MIT"
] | null | null | null | # Script for populating the database. You can run it as:
#
# mix run priv/repo/seeds.exs
#
# Inside the script, you can read and write to any of your
# repositories directly:
#
# Phoenix.Repo.insert!(%Phoenix.SomeModel{})
#
# We recommend using the bang functions (`insert!`, `update!`
# and so on) as they will ... | 29.166667 | 61 | 0.705714 |
2d318e992fba2ee6f899a4a69515f1e15a8ad281 | 383 | ex | Elixir | lib/visualixir_web/views/error_view.ex | markhu53/visualixir | 80ce8b75fe33476fe7d17110ffc0271f71bc1f91 | [
"MIT"
] | 1,311 | 2015-11-08T02:21:41.000Z | 2022-03-25T17:32:57.000Z | lib/visualixir_web/views/error_view.ex | hoangpq/visualixir | a8efdee3faea00cf59ae74f4bf8bcfa36e7b6d79 | [
"MIT"
] | 30 | 2015-11-09T17:07:50.000Z | 2022-02-10T17:13:50.000Z | lib/visualixir_web/views/error_view.ex | hoangpq/visualixir | a8efdee3faea00cf59ae74f4bf8bcfa36e7b6d79 | [
"MIT"
] | 58 | 2015-11-08T16:50:00.000Z | 2022-03-30T13:03:18.000Z | defmodule VisualixirWeb.ErrorView do
use Visualixir.Web, :view
def render("404.html", _assigns) do
"Page not found"
end
def render("500.html", _assigns) do
"Server internal error"
end
# In case no render clause matches or no
# template is found, let's render it as 500
def template_not_found(_... | 21.277778 | 47 | 0.704961 |
2d3191549942a302ba263f47929b6eb5f571961a | 250 | ex | Elixir | lib/extensions/reset_password/ecto/schema.ex | abartier/pow | 58a3d082da093e2dc7f07825a950ee133204813f | [
"Unlicense",
"MIT"
] | null | null | null | lib/extensions/reset_password/ecto/schema.ex | abartier/pow | 58a3d082da093e2dc7f07825a950ee133204813f | [
"Unlicense",
"MIT"
] | null | null | null | lib/extensions/reset_password/ecto/schema.ex | abartier/pow | 58a3d082da093e2dc7f07825a950ee133204813f | [
"Unlicense",
"MIT"
] | null | null | null | defmodule PowResetPassword.Ecto.Schema do
@moduledoc false
use Pow.Extension.Ecto.Schema.Base
alias Pow.Extension.Ecto.Schema
def validate!(_config, module) do
Schema.require_schema_field!(module, :email, PowEmailConfirmation)
end
end
| 25 | 70 | 0.784 |
2d31997cc52455fae283145c228e6801224c867d | 12,826 | ex | Elixir | lib/ash/actions/update.ex | tlietz/ash | 12cfe0d8486b4bf9d750f428b43d8adb87d5c964 | [
"MIT"
] | null | null | null | lib/ash/actions/update.ex | tlietz/ash | 12cfe0d8486b4bf9d750f428b43d8adb87d5c964 | [
"MIT"
] | null | null | null | lib/ash/actions/update.ex | tlietz/ash | 12cfe0d8486b4bf9d750f428b43d8adb87d5c964 | [
"MIT"
] | null | null | null | defmodule Ash.Actions.Update do
@moduledoc false
alias Ash.Actions.Helpers
alias Ash.Engine
alias Ash.Engine.Request
require Logger
@spec run(Ash.Api.t(), Ash.Resource.record(), Ash.Resource.Actions.action(), Keyword.t()) ::
{:ok, Ash.Resource.record(), list(Ash.Notifier.Notification.t())}
... | 34.02122 | 101 | 0.492827 |
2d319ea6a9b36b5299cb23351ec49b7751d180a1 | 1,432 | ex | Elixir | clients/fcm/lib/google_api/fcm/v1/model/fcm_options.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/fcm/lib/google_api/fcm/v1/model/fcm_options.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/fcm/lib/google_api/fcm/v1/model/fcm_options.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... | 30.468085 | 115 | 0.734637 |
2d31e001183b1d17b086b697284e00fa5b933c84 | 369 | exs | Elixir | lib/hangman/load_test.exs | brpandey/elixir-hangman | 458502af766b42e492ebb9ca543fc8b855687b09 | [
"MIT"
] | 1 | 2016-12-19T00:10:34.000Z | 2016-12-19T00:10:34.000Z | lib/hangman/load_test.exs | brpandey/elixir-hangman | 458502af766b42e492ebb9ca543fc8b855687b09 | [
"MIT"
] | null | null | null | lib/hangman/load_test.exs | brpandey/elixir-hangman | 458502af766b42e492ebb9ca543fc8b855687b09 | [
"MIT"
] | null | null | null | # Before starting, run:
# MIX_ENV=prod mix compile.protocols
#
# Then, to start the test:
# MIX_ENV=prod elixir -pa _build/prod/consolidated/ -S mix run load_test.exs
# runs benchmark for 20 seconds, using 4 threads, and keeping 30 HTTP connections open
:os.cmd('wrk -t4 -c30 -d20s --timeout 2000 "http://127.0.0... | 33.545455 | 93 | 0.710027 |
2d31e08a464ff0bd85a7f706de07e87a10380ef7 | 1,594 | exs | Elixir | test/resource/aggregates_test.exs | WolfDan/ash | 7cc60f41a003e2d06b5e19107e22424efafed1be | [
"MIT"
] | null | null | null | test/resource/aggregates_test.exs | WolfDan/ash | 7cc60f41a003e2d06b5e19107e22424efafed1be | [
"MIT"
] | null | null | null | test/resource/aggregates_test.exs | WolfDan/ash | 7cc60f41a003e2d06b5e19107e22424efafed1be | [
"MIT"
] | null | null | null | defmodule Ash.Test.Resource.AggregatesTest do
@moduledoc false
use ExUnit.Case, async: true
defmodule Comment do
@moduledoc false
use Ash.Resource
attributes do
attribute :id, :uuid, primary_key?: true, default: &Ecto.UUID.generate/0
attribute :post_id, :uuid
end
end
defmacrop d... | 23.791045 | 90 | 0.604768 |
2d31ef5b28382d9b238d77e20ceea750c35d8e5e | 2,907 | ex | Elixir | lib/credo/check/consistency/space_around_operators/collector.ex | jlgeering/credo | b952190ed758c262aa0d9bbee01227f9b1f0c63b | [
"MIT"
] | null | null | null | lib/credo/check/consistency/space_around_operators/collector.ex | jlgeering/credo | b952190ed758c262aa0d9bbee01227f9b1f0c63b | [
"MIT"
] | null | null | null | lib/credo/check/consistency/space_around_operators/collector.ex | jlgeering/credo | b952190ed758c262aa0d9bbee01227f9b1f0c63b | [
"MIT"
] | null | null | null | defmodule Credo.Check.Consistency.SpaceAroundOperators.Collector do
use Credo.Check.Consistency.Collector
alias Credo.Code
import Credo.Check.Consistency.SpaceAroundOperators.SpaceHelper,
only: [
operator?: 1,
space_between?: 2,
no_space_between?: 2,
usually_no_space_before?: 3,
... | 22.022727 | 81 | 0.576883 |
2d31f005fd41b77d345f237ab4ad2459bac39c78 | 573 | exs | Elixir | test/web/views/error_view_test.exs | ShaneKilkelly/teal | 494de9b9a3848ab57a5c3731c9d462bad335a3c0 | [
"MIT"
] | null | null | null | test/web/views/error_view_test.exs | ShaneKilkelly/teal | 494de9b9a3848ab57a5c3731c9d462bad335a3c0 | [
"MIT"
] | null | null | null | test/web/views/error_view_test.exs | ShaneKilkelly/teal | 494de9b9a3848ab57a5c3731c9d462bad335a3c0 | [
"MIT"
] | null | null | null | defmodule Teal.Web.ErrorViewTest do
use Teal.Web.ConnCase, async: true
# Bring render/3 and render_to_string/3 for testing custom views
import Phoenix.View
test "renders 404.html" do
assert render_to_string(Teal.Web.ErrorView, "404.html", []) ==
"Page not found"
end
test "render 500.html" ... | 26.045455 | 66 | 0.670157 |
2d31f2e42e6b7b2754e26c0e3fcb1a7a9a44dc8d | 133 | exs | Elixir | test/test_helper.exs | bruce/absinthe | 19b63d3aaa9fb75aad01ffd5e91d89e0b30d7f91 | [
"MIT"
] | 3 | 2017-06-22T16:33:58.000Z | 2021-07-07T15:21:09.000Z | test/test_helper.exs | bruce/absinthe | 19b63d3aaa9fb75aad01ffd5e91d89e0b30d7f91 | [
"MIT"
] | null | null | null | test/test_helper.exs | bruce/absinthe | 19b63d3aaa9fb75aad01ffd5e91d89e0b30d7f91 | [
"MIT"
] | null | null | null | Code.require_file("test/lib/absinthe/type/fixtures.exs")
ExUnit.configure(exclude: [pending: true], timeout: 30_000)
ExUnit.start()
| 26.6 | 59 | 0.774436 |
2d32059ef116f8ccc3a92848e25ce7eaf933ed38 | 1,246 | ex | Elixir | lib/versionary/plug/handler.ex | sticksnleaves/versionary | bffb61b53d2002c90bb2b8e40eeafa32a89382ca | [
"MIT"
] | 35 | 2017-04-05T19:47:08.000Z | 2022-02-12T22:05:17.000Z | lib/versionary/plug/handler.ex | sticksnleaves/versionary | bffb61b53d2002c90bb2b8e40eeafa32a89382ca | [
"MIT"
] | 16 | 2017-03-23T14:36:53.000Z | 2021-09-23T17:31:46.000Z | lib/versionary/plug/handler.ex | sticksnleaves/versionary | bffb61b53d2002c90bb2b8e40eeafa32a89382ca | [
"MIT"
] | 6 | 2017-03-19T03:04:34.000Z | 2021-08-10T14:05:27.000Z | defmodule Versionary.Plug.Handler do
@moduledoc """
Provides the ability to specify how to finish processing a request when
version validation fails.
Typically a handler will finish the request by responding with a 400 level
HTTP status code. For example, `Versionary.Plug.ErrorHandler` responds to the
requ... | 27.688889 | 80 | 0.708668 |
2d321d4a2aa8a6310992fd4516c7d245880e8171 | 424 | exs | Elixir | priv/repo/migrations/20170604064845_create_accounts_user.exs | lee-dohm/ed-explorer | 879a883a8143531bc657fa74e55f72ed36b3547e | [
"MIT"
] | 1 | 2020-01-26T18:07:51.000Z | 2020-01-26T18:07:51.000Z | priv/repo/migrations/20170604064845_create_accounts_user.exs | lee-dohm/ed-explorer | 879a883a8143531bc657fa74e55f72ed36b3547e | [
"MIT"
] | null | null | null | priv/repo/migrations/20170604064845_create_accounts_user.exs | lee-dohm/ed-explorer | 879a883a8143531bc657fa74e55f72ed36b3547e | [
"MIT"
] | null | null | null | defmodule EdExplorer.Repo.Migrations.CreateEdExplorer.Accounts.User do
use Ecto.Migration
def change do
create table(:accounts_users, primary_key: false) do
add :id, :binary_id, primary_key: true
add :name, :string, null: false
add :avatar_url, :string
add :github_id, :integer, null: fa... | 24.941176 | 70 | 0.686321 |
2d324a1663105289c78ba41e9bf40554a22b0feb | 1,864 | ex | Elixir | apps/ex_wire/lib/ex_wire/peer_supervisor.ex | InoMurko/ethereum | 282ca2a23a897c5b9684ddf9abae2bf65691b039 | [
"MIT"
] | 22 | 2017-06-22T02:50:34.000Z | 2022-01-26T20:43:21.000Z | apps/ex_wire/lib/ex_wire/peer_supervisor.ex | InoMurko/ethereum | 282ca2a23a897c5b9684ddf9abae2bf65691b039 | [
"MIT"
] | 9 | 2018-10-08T22:56:56.000Z | 2018-10-18T20:41:55.000Z | apps/ex_wire/lib/ex_wire/peer_supervisor.ex | InoMurko/ethereum | 282ca2a23a897c5b9684ddf9abae2bf65691b039 | [
"MIT"
] | 5 | 2018-10-06T16:30:48.000Z | 2022-01-26T20:43:26.000Z | defmodule ExWire.PeerSupervisor do
@moduledoc """
The Peer Supervisor is responsible for maintaining a set of peer TCP connections.
We should ask bootnodes for a set of potential peers via the Discovery Protocol, and then
we can connect to those nodes. Currently, we just connect to the Bootnodes themselves.
... | 29.125 | 99 | 0.693133 |
2d327ea9f5bb0510e8732b3d7b33d9898b9c5f9b | 3,231 | exs | Elixir | test/ambry_web/controllers/api/bookmark_controller_test.exs | doughsay/ambry | c04e855bf06a6b00b8053c6eacb2eac14a56a37c | [
"MIT"
] | 12 | 2021-09-30T20:51:49.000Z | 2022-01-27T04:09:32.000Z | test/ambry_web/controllers/api/bookmark_controller_test.exs | doughsay/ambry | c04e855bf06a6b00b8053c6eacb2eac14a56a37c | [
"MIT"
] | 76 | 2021-10-01T05:45:11.000Z | 2022-03-28T04:12:39.000Z | test/ambry_web/controllers/api/bookmark_controller_test.exs | doughsay/ambry | c04e855bf06a6b00b8053c6eacb2eac14a56a37c | [
"MIT"
] | 2 | 2021-10-04T19:27:28.000Z | 2022-01-13T22:36:38.000Z | defmodule AmbryWeb.Api.BookmarkControllerTest do
use AmbryWeb.ConnCase
setup :register_and_put_user_api_token
describe "GET /api/bookmarks/:media_id" do
test "returns 401 if missing api token", %{conn: conn} do
conn = remove_user_api_token(conn)
conn = get(conn, "/api/bookmarks/1")
asser... | 28.848214 | 97 | 0.585887 |
2d328a6f550ab66081cc0bf2e3c4e07990d342f3 | 321 | exs | Elixir | priv/repo/migrations/20170403074836_create_book_backed.exs | cedretaber/bibliotheca | 642ec9908d6d98f16e25b6a482c52e9cbaa21ad2 | [
"MIT"
] | null | null | null | priv/repo/migrations/20170403074836_create_book_backed.exs | cedretaber/bibliotheca | 642ec9908d6d98f16e25b6a482c52e9cbaa21ad2 | [
"MIT"
] | 22 | 2017-05-15T07:34:08.000Z | 2018-02-25T07:26:18.000Z | priv/repo/migrations/20170403074836_create_book_backed.exs | cedretaber/bibliotheca | 642ec9908d6d98f16e25b6a482c52e9cbaa21ad2 | [
"MIT"
] | null | null | null | defmodule Bibliotheca.Repo.Migrations.CreateBookBacked do
use Ecto.Migration
def change do
create table(:books_backed) do
add :book_lent_id, references(:books_lent, on_delete: :delete_all), null: false
timestamps updated_at: false
end
create index(:books_backed, [:book_lent_id])
end
end... | 22.928571 | 85 | 0.735202 |
2d328e097803698139e11bc2655f723c4f849918 | 1,927 | exs | Elixir | test/cog/chat/slack/templates/embedded/group_list_verbose_test.exs | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 1,003 | 2016-02-23T17:21:12.000Z | 2022-02-20T14:39:35.000Z | test/cog/chat/slack/templates/embedded/group_list_verbose_test.exs | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 906 | 2016-02-22T22:54:19.000Z | 2022-03-11T15:19:43.000Z | test/cog/chat/slack/templates/embedded/group_list_verbose_test.exs | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 95 | 2016-02-23T13:42:31.000Z | 2021-11-30T14:39:55.000Z | defmodule Cog.Chat.Slack.Templates.Embedded.GroupListVerboseTest do
use Cog.TemplateCase
test "group-list verbose template" do
data = %{"results" => [%{"name" => "testgroup1",
"id" => "aaaa-bbbb-cccc-dddd-eeee-ffff",
"roles" => [%{"name" => "role1"},
... | 40.145833 | 94 | 0.389725 |
2d32d91678b7e67dab282555b0e055fbb694747c | 186 | exs | Elixir | test/data_processor_web/controllers/page_controller_test.exs | DylanGuedes/batch_processor | 2f3122a5f1a31557a39fac67aa62e297c39e8bf5 | [
"Apache-2.0"
] | null | null | null | test/data_processor_web/controllers/page_controller_test.exs | DylanGuedes/batch_processor | 2f3122a5f1a31557a39fac67aa62e297c39e8bf5 | [
"Apache-2.0"
] | 3 | 2018-08-17T13:42:45.000Z | 2018-08-17T17:05:11.000Z | test/data_processor_web/controllers/page_controller_test.exs | DylanGuedes/batch_processor | 2f3122a5f1a31557a39fac67aa62e297c39e8bf5 | [
"Apache-2.0"
] | null | null | null | defmodule DataProcessorWeb.PageControllerTest do
use DataProcessorWeb.ConnCase
test "GET /", %{conn: conn} do
conn = get conn, "/"
assert html_response(conn, 200)
end
end
| 20.666667 | 48 | 0.709677 |
2d32e0dc827fffeddd8672ddf8bdae9971dc642d | 11,022 | ex | Elixir | lib/blockchain_api/query/account_transaction.ex | pakorn186c/blockchain-api | 3c9fbc892e645f9bb144414f3da36749603f37bc | [
"Apache-2.0"
] | 17 | 2019-11-03T03:02:41.000Z | 2022-01-13T17:03:32.000Z | lib/blockchain_api/query/account_transaction.ex | pakorn186c/blockchain-api | 3c9fbc892e645f9bb144414f3da36749603f37bc | [
"Apache-2.0"
] | 5 | 2019-11-07T23:26:53.000Z | 2020-11-24T21:45:35.000Z | lib/blockchain_api/query/account_transaction.ex | pakorn186c/blockchain-api | 3c9fbc892e645f9bb144414f3da36749603f37bc | [
"Apache-2.0"
] | 11 | 2019-12-04T07:03:16.000Z | 2022-01-13T17:03:50.000Z | defmodule BlockchainAPI.Query.AccountTransaction do
@moduledoc false
import Ecto.Query, warn: false
@default_limit 100
alias BlockchainAPI.{
Query,
Repo,
Schema.AccountTransaction,
Schema.CoinbaseTransaction,
Schema.DataCreditTransaction,
Schema.GatewayTransaction,
Schema.LocationTr... | 27.014706 | 88 | 0.523136 |
2d3328efac2897bbf201e19ea744a24ebc7c6f3e | 3,984 | ex | Elixir | apps/datapio_mq/lib/datapio_mq/consumer.ex | datapio/opencore | 6e766c3b3a2ad8b07295c7fd27cffc0923284197 | [
"Apache-2.0"
] | 5 | 2021-05-14T22:01:08.000Z | 2021-09-21T16:28:09.000Z | apps/datapio_mq/lib/datapio_mq/consumer.ex | datapio/opencore | 6e766c3b3a2ad8b07295c7fd27cffc0923284197 | [
"Apache-2.0"
] | 198 | 2019-10-17T12:22:25.000Z | 2022-03-16T02:14:14.000Z | apps/datapio_mq/lib/datapio_mq/consumer.ex | datapio/opencore | 6e766c3b3a2ad8b07295c7fd27cffc0923284197 | [
"Apache-2.0"
] | 1 | 2022-03-10T08:54:36.000Z | 2022-03-10T08:54:36.000Z | defmodule Datapio.MQ.Consumer do
@moduledoc """
Distributed queue consumer.
"""
require Logger
use GenServer
@typedoc "Consumer Identifier"
@type consumer_id :: atom() | String.t() | pos_integer()
@typedoc "Available consumer option"
@type consumer_option ::
{:module, module()}
| {:id, cons... | 27.475862 | 89 | 0.642821 |
2d333c6712c939df9201d30538a1caf65657bb63 | 17,496 | ex | Elixir | clients/sql_admin/lib/google_api/sql_admin/v1/api/ssl_certs.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/sql_admin/lib/google_api/sql_admin/v1/api/ssl_certs.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/sql_admin/lib/google_api/sql_admin/v1/api/ssl_certs.ex | dazuma/elixir-google-api | 6a9897168008efe07a6081d2326735fe332e522c | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 45.326425 | 231 | 0.616598 |
2d3357dc56f59224f6b61148aa571968661faece | 530 | ex | Elixir | rocketpay/lib/rocketpay_web/controllers/welcome_controller.ex | victorabarros/rocketpay | 6bc1fbcd0240c44d720a6c86ab4c45249a6c1230 | [
"MIT"
] | null | null | null | rocketpay/lib/rocketpay_web/controllers/welcome_controller.ex | victorabarros/rocketpay | 6bc1fbcd0240c44d720a6c86ab4c45249a6c1230 | [
"MIT"
] | null | null | null | rocketpay/lib/rocketpay_web/controllers/welcome_controller.ex | victorabarros/rocketpay | 6bc1fbcd0240c44d720a6c86ab4c45249a6c1230 | [
"MIT"
] | null | null | null | defmodule RocketpayWeb.WelcomeController do
use RocketpayWeb, :controller
alias Rocketpay.Numbers
def index(conn, %{"filename" => filename}) do
filename
|> Numbers.sum_from_file()
|>handle_response(conn)
end
defp handle_response({:ok, %{result: result}}, conn) do
conn
|> put_status(:ok)
... | 23.043478 | 82 | 0.669811 |
2d3371ded011ee6797ada6d92f7cd2f924e860eb | 906 | ex | Elixir | clients/cloud_resource_manager/lib/google_api/cloud_resource_manager/v2/metadata.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/cloud_resource_manager/lib/google_api/cloud_resource_manager/v2/metadata.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/cloud_resource_manager/lib/google_api/cloud_resource_manager/v2/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... | 33.555556 | 74 | 0.764901 |
2d3386b23bdb246b0e68ffbd678230284ec48c52 | 67 | ex | Elixir | lib/toybot/robot.ex | rdrobinson3/toybot | 2bf1824b65ca55f60ffa1a34562d09f074306697 | [
"MIT"
] | null | null | null | lib/toybot/robot.ex | rdrobinson3/toybot | 2bf1824b65ca55f60ffa1a34562d09f074306697 | [
"MIT"
] | null | null | null | lib/toybot/robot.ex | rdrobinson3/toybot | 2bf1824b65ca55f60ffa1a34562d09f074306697 | [
"MIT"
] | null | null | null | defmodule Toybot.Robot do
use Hedwig.Robot, otp_app: :toybot
end
| 16.75 | 36 | 0.776119 |
2d338954fe559ec9db6bb408bd926d30594f78cc | 6,369 | ex | Elixir | lib/ggity/geom/boxplot.ex | srowley/ggity | e49f40141ea7b56e07cf9e00a20c04ed4d42df2f | [
"MIT"
] | 47 | 2020-06-21T15:23:54.000Z | 2022-03-13T01:24:19.000Z | lib/ggity/geom/boxplot.ex | srowley/ggity | e49f40141ea7b56e07cf9e00a20c04ed4d42df2f | [
"MIT"
] | 3 | 2020-11-28T11:00:59.000Z | 2020-11-30T18:20:37.000Z | lib/ggity/geom/boxplot.ex | srowley/ggity | e49f40141ea7b56e07cf9e00a20c04ed4d42df2f | [
"MIT"
] | 2 | 2020-11-28T10:40:10.000Z | 2021-05-28T06:44:47.000Z | defmodule GGity.Geom.Boxplot do
@moduledoc false
alias GGity.{Draw, Geom, Plot, Shapes}
@type t() :: %__MODULE__{}
@type record() :: map()
@type mapping() :: map()
defstruct data: nil,
mapping: nil,
stat: :boxplot,
position: :dodge,
key_glyph: :boxplot,
... | 34.427027 | 98 | 0.588004 |
2d339d161c1034f2a56f38068cedb784bf6d6bab | 1,404 | ex | Elixir | backend/test/support/mocks/astarte/device/device_status.ex | szakhlypa/edgehog | b1193c26f403132dead6964c1c052e5dcae533af | [
"Apache-2.0"
] | 14 | 2021-12-02T16:31:16.000Z | 2022-03-18T17:40:44.000Z | backend/test/support/mocks/astarte/device/device_status.ex | szakhlypa/edgehog | b1193c26f403132dead6964c1c052e5dcae533af | [
"Apache-2.0"
] | 77 | 2021-11-03T15:14:41.000Z | 2022-03-30T14:13:32.000Z | backend/test/support/mocks/astarte/device/device_status.ex | szakhlypa/edgehog | b1193c26f403132dead6964c1c052e5dcae533af | [
"Apache-2.0"
] | 7 | 2021-11-03T10:58:37.000Z | 2022-02-28T14:00:03.000Z | #
# This file is part of Edgehog.
#
# Copyright 2021 SECO Mind Srl
#
# 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 app... | 31.2 | 79 | 0.718661 |
2d33a43e381d8ce5d14abb253e5f87d16765ecbb | 191 | ex | Elixir | lib/frost.ex | pauljxtan/frost | e3c59cdff8a6374f6618aea473a30a88497587e5 | [
"MIT"
] | 1 | 2018-10-20T20:17:12.000Z | 2018-10-20T20:17:12.000Z | lib/frost.ex | pauljxtan/frost | e3c59cdff8a6374f6618aea473a30a88497587e5 | [
"MIT"
] | null | null | null | lib/frost.ex | pauljxtan/frost | e3c59cdff8a6374f6618aea473a30a88497587e5 | [
"MIT"
] | null | null | null | defmodule Frost do
@moduledoc """
Documentation for Frost.
"""
@doc """
Hello world.
## Examples
iex> Frost.hello
:world
"""
def hello do
:world
end
end
| 10.052632 | 26 | 0.554974 |
2d33b464cce92a178d091f3f92f299055b1d7140 | 10,612 | ex | Elixir | lib/raft_fleet/manager.ex | queer/raft_fleet | 4b18f93428c8a948e621eb92ecc771816df8347f | [
"MIT"
] | null | null | null | lib/raft_fleet/manager.ex | queer/raft_fleet | 4b18f93428c8a948e621eb92ecc771816df8347f | [
"MIT"
] | null | null | null | lib/raft_fleet/manager.ex | queer/raft_fleet | 4b18f93428c8a948e621eb92ecc771816df8347f | [
"MIT"
] | null | null | null | use Croma
alias Croma.TypeGen, as: TG
defmodule RaftFleet.Manager do
use GenServer
require Logger
alias RaftFleet.{ConsensusMemberSup, ConsensusMemberAdjuster, Activator, Deactivator, Config, ProcessAndDiskLogIndexInspector}
defmodule State do
@type consensus_group_progress :: :leader_started | {:leader_d... | 43.314286 | 154 | 0.663023 |
2d33d8a1d52522cabf72a2702d952136b42006a5 | 2,375 | ex | Elixir | clients/service_management/lib/google_api/service_management/v1/model/backend_rule.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/service_management/lib/google_api/service_management/v1/model/backend_rule.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/service_management/lib/google_api/service_management/v1/model/backend_rule.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... | 39.583333 | 194 | 0.730526 |
2d340ef8f7e650623424e6e6e3d817ff4e30fc51 | 4,194 | ex | Elixir | clients/service_networking/lib/google_api/service_networking/v1/model/monitoring.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/service_networking/lib/google_api/service_networking/v1/model/monitoring.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/service_networking/lib/google_api/service_networking/v1/model/monitoring.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 39.942857 | 198 | 0.728898 |
2d341135c353c1a7c6a6568a23b25d88a5296c5a | 505 | ex | Elixir | lib/farmbot/celery_script/ast/node/set_user_env.ex | pdgonzalez872/farmbot_os | a444248f05ee8f4fe57f6a4865b942131960f76c | [
"MIT"
] | 2 | 2018-08-01T23:07:52.000Z | 2018-10-17T12:49:21.000Z | lib/farmbot/celery_script/ast/node/set_user_env.ex | pdgonzalez872/farmbot_os | a444248f05ee8f4fe57f6a4865b942131960f76c | [
"MIT"
] | null | null | null | lib/farmbot/celery_script/ast/node/set_user_env.ex | pdgonzalez872/farmbot_os | a444248f05ee8f4fe57f6a4865b942131960f76c | [
"MIT"
] | 1 | 2017-07-22T21:51:14.000Z | 2017-07-22T21:51:14.000Z | defmodule Farmbot.CeleryScript.AST.Node.SetUserEnv do
@moduledoc false
use Farmbot.CeleryScript.AST.Node
allow_args []
use Farmbot.Logger
def execute(_args, body, env) do
env = mutate_env(env)
do_reduce(body, env)
end
defp do_reduce([%{args: %{label: key, value: val}} | rest], env) do
case F... | 24.047619 | 69 | 0.655446 |
2d3422d9d42856450e21c3bbe28ae2e6375ddc5c | 2,455 | ex | Elixir | lib/advent2019_web/controllers/day08_controller.ex | neslinesli93/advent-of-code-2019-phoenix-react | d7523d0bda5581990c21e8113e5c78c4f0ff921a | [
"MIT"
] | null | null | null | lib/advent2019_web/controllers/day08_controller.ex | neslinesli93/advent-of-code-2019-phoenix-react | d7523d0bda5581990c21e8113e5c78c4f0ff921a | [
"MIT"
] | null | null | null | lib/advent2019_web/controllers/day08_controller.ex | neslinesli93/advent-of-code-2019-phoenix-react | d7523d0bda5581990c21e8113e5c78c4f0ff921a | [
"MIT"
] | null | null | null | defmodule Advent2019Web.Day08Controller do
use Advent2019Web, :controller
@doc """
Given a space image converts it to a list of layers.
The input is a map with w and h parameters defining the size of an image.
Then the rawImage parameter defines the content, in reading order,
of N layers. Every digit is a ... | 26.397849 | 79 | 0.628513 |
2d343b1822d258ae965692e43895da8d5d9eaaf6 | 4,690 | exs | Elixir | test/cobol_to_elixir/data_division/group_items_test.exs | TheFirstAvenger/cobol_to_elixir | 549528aed3dd1de8a14bb3a763539b5cbf714811 | [
"MIT"
] | 65 | 2021-08-10T19:16:25.000Z | 2022-02-23T01:38:13.000Z | test/cobol_to_elixir/data_division/group_items_test.exs | TheFirstAvenger/cobol_to_elixir | 549528aed3dd1de8a14bb3a763539b5cbf714811 | [
"MIT"
] | 1 | 2021-08-15T21:59:54.000Z | 2021-08-20T20:30:06.000Z | test/cobol_to_elixir/data_division/group_items_test.exs | TheFirstAvenger/cobol_to_elixir | 549528aed3dd1de8a14bb3a763539b5cbf714811 | [
"MIT"
] | 1 | 2021-08-21T19:53:13.000Z | 2021-08-21T19:53:13.000Z | defmodule CobolToElixir.DataDivision.GroupItemsTest do
use CobolToElixirCase
alias CobolToElixir.Parsed
alias CobolToElixir.Parser
alias CobolToElixir.Parsed.Variable
alias CobolToElixir.Tokenizer
test "Parses a group item" do
cobol = """
>>SOURCE FORMAT FREE
IDENTIFICATION DIVISION.
... | 28.597561 | 126 | 0.54435 |
2d3466fd205b90a3da21f35d9ee44358f4c38812 | 1,244 | exs | Elixir | config/dev.exs | carbon-hvze/telecms | 72db81c4321cd85f8b516ef5ee1c169a7cc753d1 | [
"MIT"
] | 1 | 2022-02-17T03:00:39.000Z | 2022-02-17T03:00:39.000Z | config/dev.exs | carbon-hvze/telecms | 72db81c4321cd85f8b516ef5ee1c169a7cc753d1 | [
"MIT"
] | null | null | null | config/dev.exs | carbon-hvze/telecms | 72db81c4321cd85f8b516ef5ee1c169a7cc753d1 | [
"MIT"
] | null | null | null | import Config
config :telecms, TelecmsWeb.Endpoint,
http: [ip: {127, 0, 0, 1}, port: 4000],
check_origin: false,
code_reloader: true,
debug_errors: true,
secret_key_base: "l+lm6cbI8n7k4f5/oCmmz3SCHdYhO6axygXFl9MWIW9lKZerqmCL4y+/p9HZSNlm",
watchers: [
esbuild: {Esbuild, :install_and_run, [:default, ~w(-... | 32.736842 | 86 | 0.728296 |
2d34719ab3497d2baba0a8a4717ea4c3721defe7 | 1,575 | exs | Elixir | test/remit/usernames_from_mentions_test.exs | calleluks/ex-remit | 893dbc42c9ace6db6ee044f82371075198089fdc | [
"MIT"
] | 17 | 2020-06-28T19:01:49.000Z | 2021-11-24T23:55:09.000Z | test/remit/usernames_from_mentions_test.exs | calleluks/ex-remit | 893dbc42c9ace6db6ee044f82371075198089fdc | [
"MIT"
] | 29 | 2020-06-27T17:44:38.000Z | 2022-01-17T10:00:12.000Z | test/remit/usernames_from_mentions_test.exs | calleluks/ex-remit | 893dbc42c9ace6db6ee044f82371075198089fdc | [
"MIT"
] | 2 | 2021-03-01T09:51:56.000Z | 2021-03-04T21:27:56.000Z | defmodule Remit.UsernamesFromMentionsTest do
use Remit.DataCase
alias Remit.{UsernamesFromMentions, Factory}
test "returns known (from commits or comments) usernames @mentioned in the text, normalised to their known form" do
Factory.insert!(:commit, usernames: ["helLo"])
Factory.insert!(:comment, comment... | 33.510638 | 117 | 0.690794 |
2d3483dff8c74468ba0a6ff477580e9b4252fed0 | 549 | exs | Elixir | test/import_test.exs | mnussbaumer/cssex | da3b0add68d766faacb459c14a8eb43ca32aa9f4 | [
"MIT"
] | 13 | 2021-03-16T15:02:08.000Z | 2021-09-22T02:40:25.000Z | test/import_test.exs | mnussbaumer/cssex | da3b0add68d766faacb459c14a8eb43ca32aa9f4 | [
"MIT"
] | 3 | 2021-03-19T20:14:19.000Z | 2021-03-29T13:34:17.000Z | test/import_test.exs | mnussbaumer/cssex | da3b0add68d766faacb459c14a8eb43ca32aa9f4 | [
"MIT"
] | null | null | null | defmodule CSSEx.Import.Test do
use ExUnit.Case, async: true
alias CSSEx.Parser
@basic """
$!width 567px;
@charset "UTF-8";
@import "test.css";
@import url("/other.css") print;
@import url("/other.css") screen and (max-width: <$width$>);
.test{color:red;}
"""
test "basic import statements" do
... | 27.45 | 167 | 0.604736 |
2d348794d1d679d196913bd981bcb4a7c7abb340 | 160 | exs | Elixir | test/commanded/shredder_test.exs | KazW/commanded-shredder-middleware | ab4494db84983acfe7cd2d47a9b81dbec7c36a9d | [
"MIT"
] | 1 | 2020-07-30T18:40:11.000Z | 2020-07-30T18:40:11.000Z | test/commanded/shredder_test.exs | KazW/commanded-shredder-middleware | ab4494db84983acfe7cd2d47a9b81dbec7c36a9d | [
"MIT"
] | null | null | null | test/commanded/shredder_test.exs | KazW/commanded-shredder-middleware | ab4494db84983acfe7cd2d47a9b81dbec7c36a9d | [
"MIT"
] | null | null | null | defmodule Commanded.ShredderTest do
use Commanded.Shredder.RuntimeCase
# doctest Commanded.Shredder
test "greets the world" do
assert true
end
end
| 17.777778 | 36 | 0.76875 |
2d3493aee0c66b6fdfd03af4fb0574be91028eb4 | 10,427 | ex | Elixir | lib/dataloader.ex | TheRealReal/dataloader | 7f2db1fe4a64ff876eeb013388532cb9415f72f4 | [
"MIT"
] | null | null | null | lib/dataloader.ex | TheRealReal/dataloader | 7f2db1fe4a64ff876eeb013388532cb9415f72f4 | [
"MIT"
] | 2 | 2020-01-30T17:11:10.000Z | 2021-11-01T18:27:40.000Z | lib/dataloader.ex | TheRealReal/dataloader | 7f2db1fe4a64ff876eeb013388532cb9415f72f4 | [
"MIT"
] | null | null | null | defmodule Dataloader do
defmodule GetError do
defexception message:
"Failed to get data, this may mean it has not been loaded, see Dataloader documentation for more info."
end
@moduledoc """
# Dataloader
Dataloader provides an easy way efficiently load data in batches. It's
inspired... | 32.482866 | 122 | 0.666731 |
2d34b2eb3edcffcdde65f171be81d2d3f9b65193 | 637 | ex | Elixir | lib/command_line/autoencoder_trainer.ex | Markonis/BrainElixir | 7f1d193827b7ca8113424e7debedd920f75a0a10 | [
"MIT"
] | null | null | null | lib/command_line/autoencoder_trainer.ex | Markonis/BrainElixir | 7f1d193827b7ca8113424e7debedd920f75a0a10 | [
"MIT"
] | null | null | null | lib/command_line/autoencoder_trainer.ex | Markonis/BrainElixir | 7f1d193827b7ca8113424e7debedd920f75a0a10 | [
"MIT"
] | null | null | null | defmodule CommandLine.AutoencoderTrainer do
alias CommandLine.TrainerHelper
alias CommandLine.ImageHelper
def run(json, options) do
configuration = Poison.decode! json
network = TrainerHelper.create_network(configuration, options)
configuration
|> prepare_inputs
|> create_input_output_pairs
... | 23.592593 | 66 | 0.734694 |
2d34d39377afb5a7c983d9289a888567817fccfa | 907 | ex | Elixir | lib/ex_twilio/resources/sip_domain.ex | paulanthonywilson/ex_twilio | 4f58cb13ae8e4ba61237369bc29669724f9491ff | [
"MIT"
] | 1 | 2017-03-23T08:03:58.000Z | 2017-03-23T08:03:58.000Z | lib/ex_twilio/resources/sip_domain.ex | paulanthonywilson/ex_twilio | 4f58cb13ae8e4ba61237369bc29669724f9491ff | [
"MIT"
] | 1 | 2019-09-02T15:15:39.000Z | 2019-09-03T04:28:09.000Z | lib/ex_twilio/resources/sip_domain.ex | paulanthonywilson/ex_twilio | 4f58cb13ae8e4ba61237369bc29669724f9491ff | [
"MIT"
] | 1 | 2017-03-06T21:15:31.000Z | 2017-03-06T21:15:31.000Z | defmodule ExTwilio.SipDomain do
@moduledoc """
Represents a SIP Domain resource in the Twilio API.
- [Twilio docs](https://www.twilio.com/docs/api/rest/domain)
"""
defstruct sid: nil,
friendly_name: nil,
account_sid: nil,
api_version: nil,
domain_name: nil,
... | 23.868421 | 62 | 0.571114 |
2d34d651bdd9e633d435c136464f578cb30c29f3 | 1,222 | exs | Elixir | test/models/user_test.exs | Ellocsys/kedo | 81626082952bfc63c382d015cffaa1ebd80e1f67 | [
"MIT"
] | null | null | null | test/models/user_test.exs | Ellocsys/kedo | 81626082952bfc63c382d015cffaa1ebd80e1f67 | [
"MIT"
] | null | null | null | test/models/user_test.exs | Ellocsys/kedo | 81626082952bfc63c382d015cffaa1ebd80e1f67 | [
"MIT"
] | null | null | null | defmodule Pxblog.UserTest do
use Pxblog.ModelCase
alias Pxblog.User
alias Pxblog.TestHelper
setup do
{:ok, role} = TestHelper.create_role(%{name: "user", admin: false})
{:ok, role: role}
end
defp valid_attrs(role) do
Map.put(@valid_attrs, :role_id, role.id)
end
test "changeset with vali... | 29.804878 | 131 | 0.715221 |
2d34e4803d0aebead15cab150fcc1270313d48c4 | 3,545 | exs | Elixir | test/log_decorator_test.exs | elpddev/elixir-function-decorating | fb633792ada653ad81d4e0fd3aec9c8e6337ce3a | [
"MIT"
] | 4 | 2016-03-22T10:58:52.000Z | 2020-12-10T18:24:58.000Z | test/log_decorator_test.exs | elpddev/elixir-function-decorating | fb633792ada653ad81d4e0fd3aec9c8e6337ce3a | [
"MIT"
] | 9 | 2016-04-04T10:13:24.000Z | 2016-04-10T16:40:13.000Z | test/log_decorator_test.exs | elpddev/elixir-function-decorating | fb633792ada653ad81d4e0fd3aec9c8e6337ce3a | [
"MIT"
] | 2 | 2017-07-12T21:55:04.000Z | 2018-09-08T13:03:17.000Z | defmodule LogDecoratorTest do
use ExUnit.Case
doctest LogDecorator
test "decorate - with simple params" do
{:ok, %FnDef{
fn_call_ast: result_fn_call_ast,
fn_options_ast: result_fn_options_ast
}} =
LogDecorator.decorate(%FnDef{
fn_call_ast: quote do beep(word) end,
fn_opti... | 32.522936 | 126 | 0.666573 |
2d35129b90bf44cc93940657d0e8f5171ccc1c1b | 4,986 | exs | Elixir | apps/discovery_api/test/integration/discovery_api/stats/completeness_test.exs | SmartColumbusOS/smartcitiesdata | c8553d34631c822b034945eebf396994bf1001ff | [
"Apache-2.0"
] | 1 | 2021-04-05T19:17:18.000Z | 2021-04-05T19:17:18.000Z | apps/discovery_api/test/integration/discovery_api/stats/completeness_test.exs | AWHServiceAccount/smartcitiesdata | 6957afac12809288640b6ba6b576c3016e6033d7 | [
"Apache-2.0"
] | 11 | 2020-01-07T15:43:42.000Z | 2020-12-22T15:23:25.000Z | apps/discovery_api/test/integration/discovery_api/stats/completeness_test.exs | SmartColumbusOS/smartcitiesdata | c8553d34631c822b034945eebf396994bf1001ff | [
"Apache-2.0"
] | null | null | null | defmodule DiscoveryApi.Stats.CompletenessTest do
use ExUnit.Case
use Divo
use DiscoveryApi.DataCase
import SmartCity.TestHelper
alias SmartCity.TestDataGenerator, as: TDG
alias DiscoveryApi.Data.Persistence
alias DiscoveryApi.Stats.StatsCalculator
alias DiscoveryApi.Stats.DataHelper
alias DiscoveryApi... | 30.036145 | 100 | 0.596069 |
2d3522fd646c9ef072843c5b560c8f17d03a4df0 | 1,879 | ex | Elixir | clients/logging/lib/google_api/logging/v2/model/list_log_metrics_response.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/logging/lib/google_api/logging/v2/model/list_log_metrics_response.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/logging/lib/google_api/logging/v2/model/list_log_metrics_response.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... | 36.843137 | 245 | 0.74827 |
2d3533e21290cb70aaa921d6d8723915c9560701 | 420 | exs | Elixir | priv/repo/migrations/20180705034105_create_customizations_for_account.exs | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | 1 | 2019-05-07T15:03:54.000Z | 2019-05-07T15:03:54.000Z | priv/repo/migrations/20180705034105_create_customizations_for_account.exs | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | null | null | null | priv/repo/migrations/20180705034105_create_customizations_for_account.exs | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | null | null | null | defmodule MastaniServer.Repo.Migrations.CreateCustomizationsForAccount do
use Ecto.Migration
def change do
create table(:customizations) do
add(:user_id, references(:users, on_delete: :nothing), null: false)
add(:theme, :boolean)
add(:community_chart, :boolean)
add(:brainwash_free, :bo... | 23.333333 | 73 | 0.7 |
2d3559b7afa78f5be4edbfdd4df2fe7d32f5e9bc | 1,287 | ex | Elixir | lib/deploy_template_web/views/error_helpers.ex | cogini/elixir-deploy-template | eebe9e335ebbc54ef9388faf50c6fd64936a85aa | [
"MIT"
] | 82 | 2018-01-08T16:57:13.000Z | 2021-12-25T07:34:21.000Z | lib/deploy_template_web/views/error_helpers.ex | cogini/elixir-deploy-template | eebe9e335ebbc54ef9388faf50c6fd64936a85aa | [
"MIT"
] | 8 | 2018-05-21T10:31:27.000Z | 2018-11-25T07:17:56.000Z | lib/deploy_template_web/views/error_helpers.ex | cogini/elixir-deploy-template | eebe9e335ebbc54ef9388faf50c6fd64936a85aa | [
"MIT"
] | 15 | 2018-05-21T10:18:16.000Z | 2021-03-30T17:14:40.000Z | defmodule DeployTemplateWeb.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) ->
con... | 31.390244 | 83 | 0.675991 |
2d3585a85d103aba6351539b83b4a76616247312 | 1,147 | ex | Elixir | examples/reader.ex | Fudoshiki/elixir-mongodb-driver | 28273e2e0bb9ef0cf9a4bb48aed17336446257f6 | [
"Apache-2.0"
] | 140 | 2019-04-10T09:23:53.000Z | 2022-03-27T12:37:02.000Z | examples/reader.ex | Fudoshiki/elixir-mongodb-driver | 28273e2e0bb9ef0cf9a4bb48aed17336446257f6 | [
"Apache-2.0"
] | 99 | 2019-04-11T07:46:45.000Z | 2022-03-31T07:23:28.000Z | examples/reader.ex | Fudoshiki/elixir-mongodb-driver | 28273e2e0bb9ef0cf9a4bb48aed17336446257f6 | [
"Apache-2.0"
] | 45 | 2019-07-15T07:06:21.000Z | 2021-11-24T09:23:21.000Z | defmodule Reader do
require Logger
##
# see https://github.com/zookzook/elixir-mongodb-driver/issues/63 for more information
#
# 1. start a replica set and call the Reader.test()
# 2. go to the primary db and call db.adminCommand({replSetStepDown: 30})
# 3. check the log to see the error message only on... | 23.895833 | 121 | 0.632084 |
2d358f6da3d0797cbe1815fe074f3c068700f31f | 1,157 | ex | Elixir | lib/farmbot/system/supervisor.ex | defcon201/farmbot_os | acc22702afbb13be461c9d80591604958117ff75 | [
"MIT"
] | null | null | null | lib/farmbot/system/supervisor.ex | defcon201/farmbot_os | acc22702afbb13be461c9d80591604958117ff75 | [
"MIT"
] | null | null | null | lib/farmbot/system/supervisor.ex | defcon201/farmbot_os | acc22702afbb13be461c9d80591604958117ff75 | [
"MIT"
] | 1 | 2020-12-16T16:39:32.000Z | 2020-12-16T16:39:32.000Z | defmodule Farmbot.System.Supervisor do
@moduledoc """
Supervises Platform specific stuff for Farmbot to operate
"""
use Supervisor
import Farmbot.System.Init
@doc false
def start_link() do
Supervisor.start_link(__MODULE__, [], [name: __MODULE__])
end
def init([]) do
before_init_children = [
... | 29.666667 | 75 | 0.656007 |
2d359e0650fe26c75f00cf04f1b8ac5a2527e745 | 2,039 | ex | Elixir | clients/artifact_registry/lib/google_api/artifact_registry/v1beta1/model/tag.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/artifact_registry/lib/google_api/artifact_registry/v1beta1/model/tag.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/artifact_registry/lib/google_api/artifact_registry/v1beta1/model/tag.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 40.78 | 327 | 0.733693 |
2d361a8bc03899b64b1014fbec0a45ef81d4d88f | 593 | exs | Elixir | test/phoenix/status/status_test.exs | brightroll/phoenix | b93022086322bcc1d797214a28e0c9710f537c22 | [
"MIT"
] | null | null | null | test/phoenix/status/status_test.exs | brightroll/phoenix | b93022086322bcc1d797214a28e0c9710f537c22 | [
"MIT"
] | null | null | null | test/phoenix/status/status_test.exs | brightroll/phoenix | b93022086322bcc1d797214a28e0c9710f537c22 | [
"MIT"
] | null | null | null | defmodule Phoenix.Status.StatusTest do
use ExUnit.Case
alias Phoenix.Status
test "code converts atom to http status code" do
assert Status.code(:ok) == 200
assert Status.code(:request_uri_too_long) == 414
assert Status.code(:variant_also_negotiates) == 506
assert_raise Status.InvalidStatus, fn ->... | 28.238095 | 66 | 0.70489 |
2d36397a569ff9deb89684bdb1a7b03bf46b6930 | 995 | ex | Elixir | lib/validators/each.ex | gmartsenkov/gate | 67a1d9a3b0c0515312b49e9a110cb00ebc46d402 | [
"MIT"
] | 3 | 2019-11-04T21:40:10.000Z | 2021-12-22T11:25:37.000Z | lib/validators/each.ex | gmartsenkov/gate | 67a1d9a3b0c0515312b49e9a110cb00ebc46d402 | [
"MIT"
] | null | null | null | lib/validators/each.ex | gmartsenkov/gate | 67a1d9a3b0c0515312b49e9a110cb00ebc46d402 | [
"MIT"
] | null | null | null | defmodule Gate.Validators.Each do
@moduledoc false
alias Gate.Locale
defmacro __using__(_opts) do
quote do
def validate([head|tail] = value, {:each, option}) when is_map(option) do
validate_list(value, 0, option, %{})
end
def validate([head|tail] = value, {:each, option}) do
with true <... | 28.428571 | 81 | 0.627136 |
2d364b553f35764f8bdf73ea5e3caad3a9dba131 | 94 | exs | Elixir | test/elixir_example_web/views/layout_view_test.exs | wedeploy-examples/phoenix-example | 28fab9969556f1b2c68b36d4cad0da2dd011d322 | [
"BSD-3-Clause"
] | null | null | null | test/elixir_example_web/views/layout_view_test.exs | wedeploy-examples/phoenix-example | 28fab9969556f1b2c68b36d4cad0da2dd011d322 | [
"BSD-3-Clause"
] | null | null | null | test/elixir_example_web/views/layout_view_test.exs | wedeploy-examples/phoenix-example | 28fab9969556f1b2c68b36d4cad0da2dd011d322 | [
"BSD-3-Clause"
] | null | null | null | defmodule ElixirExampleWeb.LayoutViewTest do
use ElixirExampleWeb.ConnCase, async: true
end
| 23.5 | 44 | 0.851064 |
2d36f3b9e85e55727ee772b1b8052612aa18f69c | 876 | ex | Elixir | lib/requestbox/models/hashid.ex | kevinastone/phoenixbin | 8b7326b5de1fe9961c1a2d7971a3d4abe7178829 | [
"MIT"
] | 18 | 2015-11-18T09:52:34.000Z | 2021-04-27T19:38:08.000Z | lib/requestbox/models/hashid.ex | kevinastone/phoenixbin | 8b7326b5de1fe9961c1a2d7971a3d4abe7178829 | [
"MIT"
] | 3 | 2017-01-11T18:55:39.000Z | 2021-06-15T05:46:34.000Z | lib/requestbox/models/hashid.ex | kevinastone/phoenixbin | 8b7326b5de1fe9961c1a2d7971a3d4abe7178829 | [
"MIT"
] | 7 | 2016-08-17T10:24:20.000Z | 2020-07-10T13:00:36.000Z | defmodule Requestbox.HashID do
defmacro __using__(opts) do
salt =
case Keyword.fetch(opts, :salt) do
{:ok, salt} -> salt
:error -> Application.get_env(:hashids, :salt)
end
quote do
import Requestbox.HashID
@local_encoder Hashids.new(salt: unquote(salt))
def encod... | 27.375 | 83 | 0.608447 |
2d3715508cedaa3a4e752c945a267509317550ea | 446 | ex | Elixir | lib/keriex/seals/root.ex | m00sey/keriex | cb1442b5793f2c3e2ea381eeb1cab9dea14c39a8 | [
"Apache-2.0"
] | null | null | null | lib/keriex/seals/root.ex | m00sey/keriex | cb1442b5793f2c3e2ea381eeb1cab9dea14c39a8 | [
"Apache-2.0"
] | null | null | null | lib/keriex/seals/root.ex | m00sey/keriex | cb1442b5793f2c3e2ea381eeb1cab9dea14c39a8 | [
"Apache-2.0"
] | null | null | null | defmodule Keriex.Seals.Root do
@moduledoc """
A root seal is provides the hash tree root of external data.
This minimal seal has an element whose label indicates that the value is the root of a hash tree.
The value is fully qualified Base64 with a prepended derivation code that indicates the type of hash
algo... | 27.875 | 102 | 0.715247 |
2d3721427ae6f64f8dac964ad63b7150856a22ae | 930 | exs | Elixir | test/budget_app/operations/currency/update_test.exs | djordje/budget_app.backend | 3febe64892e700f3174b8eddbc4b96260c444308 | [
"MIT"
] | null | null | null | test/budget_app/operations/currency/update_test.exs | djordje/budget_app.backend | 3febe64892e700f3174b8eddbc4b96260c444308 | [
"MIT"
] | null | null | null | test/budget_app/operations/currency/update_test.exs | djordje/budget_app.backend | 3febe64892e700f3174b8eddbc4b96260c444308 | [
"MIT"
] | null | null | null | defmodule BudgetApp.Operations.Currency.UpdateTest do
use BudgetAppWeb.ConnCase, async: true
alias BudgetApp.Operations.Currency.Update
test "saves updated record to the DB" do
currency = insert(:currency)
{:ok, updated_currency} = Update.exec(currency.id, iso_code: "RSD")
assert updated_currency.is... | 34.444444 | 71 | 0.716129 |
2d373582361b8c9cc6de834167d92e28aacecce5 | 573 | exs | Elixir | test/views/error_view_test.exs | av-ast/scrawler | 4fe7e59dd35aad977fa0d73b400461bcccfe727e | [
"MIT"
] | null | null | null | test/views/error_view_test.exs | av-ast/scrawler | 4fe7e59dd35aad977fa0d73b400461bcccfe727e | [
"MIT"
] | null | null | null | test/views/error_view_test.exs | av-ast/scrawler | 4fe7e59dd35aad977fa0d73b400461bcccfe727e | [
"MIT"
] | null | null | null | defmodule Scrawler.ErrorViewTest do
use Scrawler.ConnCase, async: true
# Bring render/3 and render_to_string/3 for testing custom views
import Phoenix.View
test "renders 404.html" do
assert render_to_string(Scrawler.ErrorView, "404.html", []) ==
"Page not found"
end
test "render 500.html" ... | 26.045455 | 66 | 0.678883 |
2d37456297a9912c94a74b7b772d344a35bee6a2 | 141 | exs | Elixir | test/ex_quizet_test.exs | cincinnati-elixir/ExQuiz | 569bc62f54ac049a481a53c1d5e916399ca0a4be | [
"MIT"
] | null | null | null | test/ex_quizet_test.exs | cincinnati-elixir/ExQuiz | 569bc62f54ac049a481a53c1d5e916399ca0a4be | [
"MIT"
] | null | null | null | test/ex_quizet_test.exs | cincinnati-elixir/ExQuiz | 569bc62f54ac049a481a53c1d5e916399ca0a4be | [
"MIT"
] | null | null | null | defmodule ExQuizetTest do
use ExUnit.Case
doctest ExQuizet
test "greets the world" do
assert ExQuizet.hello() == :world
end
end
| 15.666667 | 37 | 0.716312 |
2d379b42deab6b92f5954ef4f4120e499c2811e5 | 1,860 | ex | Elixir | web/controllers/user_skill_controller.ex | roryqueue/code-corps-api | f23007e13fed2d7264fd2e2e97b1497488fb54ba | [
"MIT"
] | null | null | null | web/controllers/user_skill_controller.ex | roryqueue/code-corps-api | f23007e13fed2d7264fd2e2e97b1497488fb54ba | [
"MIT"
] | null | null | null | web/controllers/user_skill_controller.ex | roryqueue/code-corps-api | f23007e13fed2d7264fd2e2e97b1497488fb54ba | [
"MIT"
] | null | null | null | defmodule CodeCorps.UserSkillController do
use CodeCorps.Web, :controller
import CodeCorps.AuthenticationHelpers, only: [authorize: 2, authorized?: 1]
alias CodeCorps.UserSkill
alias JaSerializer.Params
@analytics Application.get_env(:code_corps, :analytics)
plug :load_and_authorize_resource, model: UserS... | 28.181818 | 84 | 0.617742 |
2d37ff2eeaf157359bc992c188aecd151cbf0723 | 144 | exs | Elixir | test/qr_code_svg_test.exs | gutschilla/elixir-qr-code-svg | dd1dd403fdbeea3a4ef616dfd192760ce02603cb | [
"MIT"
] | 1 | 2020-01-26T06:17:29.000Z | 2020-01-26T06:17:29.000Z | test/qr_code_svg_test.exs | gutschilla/elixir-qr-code-svg | dd1dd403fdbeea3a4ef616dfd192760ce02603cb | [
"MIT"
] | null | null | null | test/qr_code_svg_test.exs | gutschilla/elixir-qr-code-svg | dd1dd403fdbeea3a4ef616dfd192760ce02603cb | [
"MIT"
] | null | null | null | defmodule QrCodeSvgTest do
use ExUnit.Case
doctest QrCodeSvg
test "greets the world" do
assert QrCodeSvg.hello() == :world
end
end
| 16 | 38 | 0.722222 |
2d3848e697982b2c85c97589a7f3c727d847a617 | 3,515 | ex | Elixir | lib/player_ws.ex | fumycat/explosive | b4eff80da2548f90c805924c6681abeeb303fd56 | [
"MIT"
] | null | null | null | lib/player_ws.ex | fumycat/explosive | b4eff80da2548f90c805924c6681abeeb303fd56 | [
"MIT"
] | null | null | null | lib/player_ws.ex | fumycat/explosive | b4eff80da2548f90c805924c6681abeeb303fd56 | [
"MIT"
] | null | null | null | defmodule PlayerWS do
@moduledoc """
https://ninenines.eu/docs/en/cowboy/2.6/manual/cowboy_websocket/
https://ninenines.eu/docs/en/cowboy/2.6/guide/ws_handlers/
To send many frames at once, return a reply tuple with the list of frames to send:
{reply, [
{text, "Hello"},
{text, <<"world!">>},
... | 27.677165 | 98 | 0.611095 |
2d384dce89658b9732e1e4b8ee5d2054a776cfbb | 1,685 | ex | Elixir | lib/deux/report.ex | 3zcurdia/deux | 59e548fbd7e42b460ce624971dd1a0437d9c1df9 | [
"MIT"
] | null | null | null | lib/deux/report.ex | 3zcurdia/deux | 59e548fbd7e42b460ce624971dd1a0437d9c1df9 | [
"MIT"
] | null | null | null | lib/deux/report.ex | 3zcurdia/deux | 59e548fbd7e42b460ce624971dd1a0437d9c1df9 | [
"MIT"
] | null | null | null | defprotocol Deux.Report do
@doc """
Protocol to handle report actions for any given format
"""
@spec diff(any, any) :: {atom, map}
def diff(local, remote)
@spec valid?(any, any) :: boolean
def valid?(local, remote)
end
defimpl Deux.Report, for: Map do
def diff(local, remote) do
if valid?(local, re... | 22.466667 | 76 | 0.58635 |
2d3855722af09697773cbe73f705fd6685801c7a | 402 | ex | Elixir | lib/events_tools_web/accounts/guardian_serializer.ex | community-tools/community-tools | 40b0e6cc9234b44593d2ab60bb2303d7224deb30 | [
"Apache-2.0"
] | 2 | 2017-10-06T01:14:35.000Z | 2017-11-18T16:44:44.000Z | lib/events_tools_web/accounts/guardian_serializer.ex | community-tools/community-tools | 40b0e6cc9234b44593d2ab60bb2303d7224deb30 | [
"Apache-2.0"
] | 6 | 2017-10-06T00:04:59.000Z | 2017-10-06T00:09:27.000Z | lib/events_tools_web/accounts/guardian_serializer.ex | apps-team/community-tools | 40b0e6cc9234b44593d2ab60bb2303d7224deb30 | [
"Apache-2.0"
] | 1 | 2017-10-06T01:17:35.000Z | 2017-10-06T01:17:35.000Z | defmodule CommunityTools.GuardianSerializer do
@behaviour Guardian.Serializer
alias CommunityTools.Repo
alias CommunityTools.Accounts.User
def for_token(user = %User{}), do: { :ok, "User:#{user.id}" }
def for_token(_), do: { :error, "Unknown resource type" }
def from_token("User:" <> id), do: { :ok, Repo... | 30.923077 | 64 | 0.686567 |
2d3892cd8abe2ca7b4e4aefd55de7d7f6bbeb30f | 1,735 | ex | Elixir | lib/phoenix_and_elm_web/endpoint.ex | paulfioravanti/phoenix-and-elm | ed3dd942a597913fa675c6a60eff87f06a6f59cf | [
"MIT"
] | 2 | 2019-05-24T14:10:01.000Z | 2019-12-16T02:57:41.000Z | lib/phoenix_and_elm_web/endpoint.ex | paulfioravanti/phoenix-and-elm | ed3dd942a597913fa675c6a60eff87f06a6f59cf | [
"MIT"
] | 1 | 2018-11-01T08:12:02.000Z | 2018-11-01T09:37:56.000Z | lib/phoenix_and_elm_web/endpoint.ex | The-Vikings/phoenix-and-elm | c6c6bcc2415a479b81cae09cd62872873c7b7e78 | [
"MIT"
] | 4 | 2018-07-16T12:16:35.000Z | 2019-05-24T14:10:04.000Z | defmodule PhoenixAndElmWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :phoenix_and_elm
socket "/socket", PhoenixAndElmWeb.UserSocket
# Serve at "/" the static files from "priv/static" directory.
#
# You should set gzip to true if you are running phoenix.digest
# when deploying your static files in product... | 27.539683 | 69 | 0.70317 |
2d3893469d5ea259f79ffbd70c68f8cbbbde2c86 | 4,157 | ex | Elixir | apps/core/lib/core/utils/address_merger.ex | ehealth-ua/ehealth.api | 4ffe26a464fe40c95fb841a4aa2e147068f65ca2 | [
"Apache-2.0"
] | 8 | 2019-06-14T11:34:49.000Z | 2021-08-05T19:14:24.000Z | apps/core/lib/core/utils/address_merger.ex | edenlabllc/ehealth.api.public | 4ffe26a464fe40c95fb841a4aa2e147068f65ca2 | [
"Apache-2.0"
] | 1 | 2019-07-08T15:20:22.000Z | 2019-07-08T15:20:22.000Z | apps/core/lib/core/utils/address_merger.ex | ehealth-ua/ehealth.api | 4ffe26a464fe40c95fb841a4aa2e147068f65ca2 | [
"Apache-2.0"
] | 6 | 2018-05-11T13:59:32.000Z | 2022-01-19T20:15:22.000Z | defmodule Core.Utils.AddressMerger do
@moduledoc """
Address merger
"""
alias Core.Dictionaries
@config Confex.fetch_env!(:core, Core.Utils.AddressMerger)
def merge_address(nil), do: ""
def merge_address(address) do
area =
address
|> Map.get("area")
|> to_string()
|> check_... | 27.529801 | 118 | 0.653115 |
2d38eddbded5a7ab703def870a95c757a4ef0b13 | 160 | ex | Elixir | web/views/stats_view.ex | mciastek/emotions-wheel-backend | 072a88b3ad15b2c6d2aad414e6b7cfc8fb4a70bf | [
"MIT"
] | null | null | null | web/views/stats_view.ex | mciastek/emotions-wheel-backend | 072a88b3ad15b2c6d2aad414e6b7cfc8fb4a70bf | [
"MIT"
] | null | null | null | web/views/stats_view.ex | mciastek/emotions-wheel-backend | 072a88b3ad15b2c6d2aad414e6b7cfc8fb4a70bf | [
"MIT"
] | null | null | null | defmodule EmotionsWheelBackend.StatsView do
use EmotionsWheelBackend.Web, :view
def render("index.json", %{stats: stats}) do
%{stats: stats}
end
end
| 20 | 46 | 0.725 |
2d38f11fc0fd021a4916f38d6a0a5bc9baaee35a | 1,929 | ex | Elixir | lib/cloak_ecto/types/sha_256.ex | nickdichev/cloak_ecto | 4e7c49dc3eaf623162aa5d55e91b83c49f3b2854 | [
"MIT"
] | 139 | 2018-12-17T13:52:42.000Z | 2022-03-27T02:58:55.000Z | lib/cloak_ecto/types/sha_256.ex | nickdichev/cloak_ecto | 4e7c49dc3eaf623162aa5d55e91b83c49f3b2854 | [
"MIT"
] | 25 | 2019-08-07T16:49:03.000Z | 2022-03-14T18:17:54.000Z | lib/cloak_ecto/types/sha_256.ex | nickdichev/cloak_ecto | 4e7c49dc3eaf623162aa5d55e91b83c49f3b2854 | [
"MIT"
] | 30 | 2019-01-09T12:36:16.000Z | 2022-03-14T18:03:28.000Z | defmodule Cloak.Ecto.SHA256 do
@moduledoc """
An `Ecto.Type` which hashes the field value using the SHA256 algorithm.
## Why
If you store a hash of a field's value, you can then query on it as a proxy
for the encrypted field. This works because SHA256 is deterministic and
always results in the same value,... | 22.172414 | 78 | 0.668222 |
2d391e9d597ffed47cf5b492723becf400543e84 | 657 | ex | Elixir | lib/docusign/model/account_password_strength_type.ex | gaslight/docusign_elixir | d9d88d53dd85d32a39d537bade9db28d779414e6 | [
"MIT"
] | 4 | 2020-12-21T12:50:13.000Z | 2022-01-12T16:50:43.000Z | lib/docusign/model/account_password_strength_type.ex | gaslight/docusign_elixir | d9d88d53dd85d32a39d537bade9db28d779414e6 | [
"MIT"
] | 12 | 2018-09-18T15:26:34.000Z | 2019-09-28T15:29:39.000Z | lib/docusign/model/account_password_strength_type.ex | gaslight/docusign_elixir | d9d88d53dd85d32a39d537bade9db28d779414e6 | [
"MIT"
] | 15 | 2020-04-29T21:50:16.000Z | 2022-02-11T18:01:51.000Z | # 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 DocuSign.Model.AccountPasswordStrengthType do
@moduledoc """
"""
@derive [Poison.Encoder]
defstruct [
:options
]
@type t :: %__... | 23.464286 | 94 | 0.729072 |
2d39258c1ebb7054d0ef774bdca3c33f6f6bd50a | 6,481 | ex | Elixir | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/conversion.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/conversion.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/conversion.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 ... | 64.168317 | 641 | 0.724425 |
2d399e98fcce532d55e2c9b757139b272ec17f60 | 8,393 | ex | Elixir | lib/chaperon/action/http.ex | coryPE/chaperon | 9c4c2bb74bcfde26a04bd3339d307c5380bd3899 | [
"MIT"
] | null | null | null | lib/chaperon/action/http.ex | coryPE/chaperon | 9c4c2bb74bcfde26a04bd3339d307c5380bd3899 | [
"MIT"
] | null | null | null | lib/chaperon/action/http.ex | coryPE/chaperon | 9c4c2bb74bcfde26a04bd3339d307c5380bd3899 | [
"MIT"
] | null | null | null | defmodule Chaperon.Action.HTTP do
@moduledoc """
HTTP based actions to be run in a `Chaperon.Scenario` module for a given
`Chaperon.Session`.
This supports `GET`, `POST`, `PUT`, `PATCH`, `DELETE` & `HEAD` requests with
support for optional headers & query params.
"""
defstruct method: :get,
... | 23.642254 | 87 | 0.579531 |
2d39b1360292e8e4f1801a3515c5cb000bf1d6b8 | 796 | exs | Elixir | test/protobuf/builder_test.exs | hayesgm/protobuf-ex | 9ca03063de265a9690f341fcda77055613f4ff17 | [
"MIT"
] | null | null | null | test/protobuf/builder_test.exs | hayesgm/protobuf-ex | 9ca03063de265a9690f341fcda77055613f4ff17 | [
"MIT"
] | null | null | null | test/protobuf/builder_test.exs | hayesgm/protobuf-ex | 9ca03063de265a9690f341fcda77055613f4ff17 | [
"MIT"
] | null | null | null | Code.require_file("../support/test_msg.ex", __DIR__)
defmodule Protobuf.BuilderTest do
use ExUnit.Case, async: true
test "new/2 uses default values for proto3" do
assert TestMsg.Foo.new().a == 0
assert TestMsg.Foo.new().c == ""
assert TestMsg.Foo.new().e == nil
end
test "new/2 use nil for proto2" ... | 22.742857 | 52 | 0.592965 |
2d39b6cf89387805305e915a26e21128b8886216 | 846 | ex | Elixir | apps/ui/lib/ui/application.ex | Cinderella-Man/crypto-streamer | b1e990d375f7143c5149930be991249f0d9c3ee3 | [
"MIT"
] | 49 | 2019-10-28T22:27:28.000Z | 2021-10-11T06:40:29.000Z | apps/ui/lib/ui/application.ex | Cinderella-Man/crypto-streamer | b1e990d375f7143c5149930be991249f0d9c3ee3 | [
"MIT"
] | 9 | 2019-08-30T13:15:36.000Z | 2019-10-10T21:25:14.000Z | apps/ui/lib/ui/application.ex | Cinderella-Man/crypto-streamer | b1e990d375f7143c5149930be991249f0d9c3ee3 | [
"MIT"
] | 7 | 2019-10-31T06:19:26.000Z | 2021-09-30T04:20:58.000Z | defmodule Ui.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
# List all child processes to be supervised
children = [
# Start the endpoint when the application starts
Ui... | 28.2 | 61 | 0.710402 |
2d3a051b15ebce5f8f679fa346a28113cc10b344 | 1,809 | ex | Elixir | clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_cx_v3_intent_training_phrase_part.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_cx_v3_intent_training_phrase_part.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_cx_v3_intent_training_phrase_part.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 32.890909 | 192 | 0.737977 |
2d3a2f62baae727c5d51e4b8724f187ef116c4b1 | 1,729 | exs | Elixir | test/fixtures/views.exs | angwoontiong/phoenix-ui | 03227b13f3c780b5626d56207bfa99c8a06525d8 | [
"MIT"
] | null | null | null | test/fixtures/views.exs | angwoontiong/phoenix-ui | 03227b13f3c780b5626d56207bfa99c8a06525d8 | [
"MIT"
] | null | null | null | test/fixtures/views.exs | angwoontiong/phoenix-ui | 03227b13f3c780b5626d56207bfa99c8a06525d8 | [
"MIT"
] | null | null | null | defmodule MyApp.View do
use Phoenix.View, root: "test/fixtures/templates"
def escaped_title(title) do
{:safe, Plug.HTML.html_escape(title)}
end
end
defmodule MyApp.LayoutView do
use Phoenix.View, root: "test/fixtures/templates"
def default_title do
"MyApp"
end
end
defmodule MyApp.User do
defst... | 21.6125 | 87 | 0.678427 |
2d3a3d63828163eb85086d7afa7473ea55dac950 | 27,196 | exs | Elixir | test/ecto/changeset/has_assoc_test.exs | tokafish/ecto | 45d23da6faf660303484d0c993930af674685631 | [
"Apache-2.0"
] | null | null | null | test/ecto/changeset/has_assoc_test.exs | tokafish/ecto | 45d23da6faf660303484d0c993930af674685631 | [
"Apache-2.0"
] | null | null | null | test/ecto/changeset/has_assoc_test.exs | tokafish/ecto | 45d23da6faf660303484d0c993930af674685631 | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.Changeset.HasAssocTest do
use ExUnit.Case, async: true
alias Ecto.Changeset
alias Ecto.Changeset.Relation
alias __MODULE__.Author
alias __MODULE__.Post
alias __MODULE__.Profile
defmodule Post do
use Ecto.Schema
schema "posts" do
field :title, :string
belongs_to :auth... | 35.596859 | 115 | 0.649912 |
2d3a5d543383bb1c4a0bf1bfd0dabd7251e3f525 | 297 | ex | Elixir | lib/ex_aws/boto/request.ex | seanedwards/ex_aws_boto | 53603c77318befb7a146e8b24d79dcb0003dab72 | [
"MIT"
] | 2 | 2020-02-19T18:34:35.000Z | 2020-10-26T19:54:28.000Z | lib/ex_aws/boto/request.ex | seanedwards/ex_aws_boto | 53603c77318befb7a146e8b24d79dcb0003dab72 | [
"MIT"
] | null | null | null | lib/ex_aws/boto/request.ex | seanedwards/ex_aws_boto | 53603c77318befb7a146e8b24d79dcb0003dab72 | [
"MIT"
] | null | null | null | defmodule ExAws.Boto.Request do
defstruct operation: nil
end
defimpl ExAws.Operation, for: ExAws.Boto.Request do
def perform(%ExAws.Boto.Request{operation: operation}, config) do
operation.__struct__.op_spec().protocol.perform(operation, config)
end
def stream!(_, _) do
end
end
| 19.8 | 70 | 0.750842 |
2d3a74a25db9761b5fc94c44331012a1d7afa018 | 2,802 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/subnetwork_list.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/subnetwork_list.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/compute/lib/google_api/compute/v1/model/subnetwork_list.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"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... | 45.193548 | 393 | 0.715203 |
2d3a8eac8bdd2eb44faf91ebbf71de29b0e55d5c | 2,333 | ex | Elixir | lib/dgraph_ex/core/types.ex | sunny-g/dgraph_ex | fab9f1fd684538758ed211537c3b0869233e7ce4 | [
"MIT"
] | 1 | 2019-05-01T15:18:41.000Z | 2019-05-01T15:18:41.000Z | lib/dgraph_ex/core/types.ex | sunny-g/dgraph_ex | fab9f1fd684538758ed211537c3b0869233e7ce4 | [
"MIT"
] | null | null | null | lib/dgraph_ex/core/types.ex | sunny-g/dgraph_ex | fab9f1fd684538758ed211537c3b0869233e7ce4 | [
"MIT"
] | 1 | 2019-05-01T15:18:48.000Z | 2019-05-01T15:18:48.000Z | defmodule DgraphEx.Core.Types do
@moduledoc false
@types [
:geo,
:datetime,
:date,
:int,
:float,
:string,
:bool,
:uid
]
@doc """
Examples:
iex> DgraphEx.Core.Types.validate(:geo, [1.0, 0.1])
:ok
iex> DgraphEx.Core.Types.validate(:geo, [[[1.0, 0.1], [1.0, 0.2], [... | 22.009434 | 95 | 0.575654 |
2d3a9265bd41a791eb7544435629e9077bc775c3 | 114 | exs | Elixir | config/test.exs | kentork/kensakukun | 188e1d931fa525ccf0ace9f13fccbefc19406eea | [
"MIT"
] | null | null | null | config/test.exs | kentork/kensakukun | 188e1d931fa525ccf0ace9f13fccbefc19406eea | [
"MIT"
] | null | null | null | config/test.exs | kentork/kensakukun | 188e1d931fa525ccf0ace9f13fccbefc19406eea | [
"MIT"
] | null | null | null | use Mix.Config
config :kensakukun, es_host: "localhost", es_port: "9200", api_token: System.get_env("API_TOKEN")
| 28.5 | 97 | 0.754386 |
2d3a95b3b0e038615937723314f168e1efd875f1 | 1,600 | exs | Elixir | apps/aehttpclient/test/aehttpclient_test.exs | wuminzhe/elixir-node | eb87b47339a8349bac767dd4cf597dfaf0ed75c6 | [
"ISC"
] | null | null | null | apps/aehttpclient/test/aehttpclient_test.exs | wuminzhe/elixir-node | eb87b47339a8349bac767dd4cf597dfaf0ed75c6 | [
"ISC"
] | null | null | null | apps/aehttpclient/test/aehttpclient_test.exs | wuminzhe/elixir-node | eb87b47339a8349bac767dd4cf597dfaf0ed75c6 | [
"ISC"
] | null | null | null | defmodule AehttpclientTest do
use ExUnit.Case
alias Aecore.Chain.Worker, as: Chain
alias Aecore.Txs.Pool.Worker, as: Pool
alias Aehttpclient.Client
alias Aecore.Structures.SignedTx
alias Aecore.Structures.SpendTx
alias Aecore.Miner.Worker, as: Miner
alias Aecore.Wallet.Worker, as: Wallet
alias Aeutil... | 29.090909 | 82 | 0.658125 |
2d3aafbd2e809df59a64a4bbe0850bbe24acb2cf | 767 | ex | Elixir | app/test/support/channel_case.ex | finalclass/ubg5 | 237c51f4a54668cc8164382a3895d9dcf07ae6e0 | [
"MIT"
] | null | null | null | app/test/support/channel_case.ex | finalclass/ubg5 | 237c51f4a54668cc8164382a3895d9dcf07ae6e0 | [
"MIT"
] | 2 | 2021-03-09T13:44:12.000Z | 2021-05-10T05:02:52.000Z | app/test/support/channel_case.ex | finalclass/ubg5 | 237c51f4a54668cc8164382a3895d9dcf07ae6e0 | [
"MIT"
] | null | null | null | defmodule Ubg5Web.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... | 23.96875 | 59 | 0.724902 |
2d3abc786493c2258c16c3497da2ddad4314fb41 | 4,187 | ex | Elixir | lib/docusign/oauth.ex | gaslight/docusign_elixir | d9d88d53dd85d32a39d537bade9db28d779414e6 | [
"MIT"
] | null | null | null | lib/docusign/oauth.ex | gaslight/docusign_elixir | d9d88d53dd85d32a39d537bade9db28d779414e6 | [
"MIT"
] | null | null | null | lib/docusign/oauth.ex | gaslight/docusign_elixir | d9d88d53dd85d32a39d537bade9db28d779414e6 | [
"MIT"
] | null | null | null | defmodule DocuSign.OAuth do
@moduledoc ~S"""
This module implements an oauth2 strategy for DocuSign.
### Examples
client = DocuSign.OAuth2Strategy.get_token!
{:ok, user_info } = OAuth2.Client.get(client, "/oauth/userinfo")
"""
use OAuth2.Strategy
alias OAuth2.{AccessToken, Client, Error}
@type par... | 29.27972 | 89 | 0.660139 |
2d3ade17835dfbe8231e29da5bea7ba60299aef3 | 775 | exs | Elixir | wabanex/test/imc_test.exs | DanielObara/NLW-Together-Elixir | 830330a28768e26451bbb8d50992aafe76ce5c78 | [
"MIT"
] | 17 | 2021-06-21T15:34:53.000Z | 2021-11-08T20:16:15.000Z | wabanex/test/imc_test.exs | DanielObara/NLW-Together-Elixir | 830330a28768e26451bbb8d50992aafe76ce5c78 | [
"MIT"
] | null | null | null | wabanex/test/imc_test.exs | DanielObara/NLW-Together-Elixir | 830330a28768e26451bbb8d50992aafe76ce5c78 | [
"MIT"
] | 2 | 2021-06-21T14:01:22.000Z | 2021-06-25T12:17:49.000Z | defmodule Wabanex.IMCTest do
use ExUnit.Case, async: true
alias Wabanex.IMC
describe "calculate/1" do
test "when the file exist, returns the data" do
params = %{"filename" => "students.csv"}
response = IMC.calculate(params)
expected_response =
{:ok,
%{
"Daniel... | 22.794118 | 66 | 0.607742 |
2d3b14f8672244ca67da369d3e923babaab0de31 | 1,011 | ex | Elixir | game_server_umbrella/apps/game_server_web/lib/game_server_web/channels/ttt_game_channel.ex | jburky/dara-dots | 7a67de3d77448792435ccbf9fb8291e821fed4ac | [
"MIT"
] | null | null | null | game_server_umbrella/apps/game_server_web/lib/game_server_web/channels/ttt_game_channel.ex | jburky/dara-dots | 7a67de3d77448792435ccbf9fb8291e821fed4ac | [
"MIT"
] | null | null | null | game_server_umbrella/apps/game_server_web/lib/game_server_web/channels/ttt_game_channel.ex | jburky/dara-dots | 7a67de3d77448792435ccbf9fb8291e821fed4ac | [
"MIT"
] | null | null | null | defmodule GameServerWeb.TttGameChannel do
use GameServerWeb, :channel
alias GameServer.TicTacToe
def join("ttt_game:" <> game_id, %{"username" => username}, socket) do
# TODO replace user name with player id at socket join
updated_socket =
socket
|> assign(:game_id, game_id)
|> assign(:... | 24.658537 | 72 | 0.659743 |
2d3b2a1ec6a26ec3838d14cae50e8b5ab05a9514 | 4,186 | ex | Elixir | examples/firehose.ex | ideo/chaperon | 6298e96ae2b8f39a1d729b7363f4a451bc4c3a6e | [
"MIT"
] | null | null | null | examples/firehose.ex | ideo/chaperon | 6298e96ae2b8f39a1d729b7363f4a451bc4c3a6e | [
"MIT"
] | null | null | null | examples/firehose.ex | ideo/chaperon | 6298e96ae2b8f39a1d729b7363f4a451bc4c3a6e | [
"MIT"
] | null | null | null | defmodule Firehose.Scenario.SubscribeChannel do
use Chaperon.Scenario
def run(session) do
session
|> multi_subscribe_loop(session.config.subscriptions_per_loop)
end
def multi_subscribe_loop(session, 0) do
session
<~ subscribe_loop
end
def multi_subscribe_loop(session, count) when count > ... | 21.466667 | 76 | 0.654085 |
2d3b33377b585ffb5e72a0ed87acab79e39792b1 | 74 | exs | Elixir | test/test_web/views/page_view_test.exs | dabaer/liveview-table-test | 61d22fb964120aa4715cc0e9ef12f3d5c61718ea | [
"MIT"
] | 138 | 2019-10-04T19:55:35.000Z | 2022-03-31T10:24:32.000Z | test/test_web/views/page_view_test.exs | dabaer/liveview-table-test | 61d22fb964120aa4715cc0e9ef12f3d5c61718ea | [
"MIT"
] | 127 | 2019-10-03T21:51:27.000Z | 2022-03-31T02:57:00.000Z | test/test_web/views/page_view_test.exs | dabaer/liveview-table-test | 61d22fb964120aa4715cc0e9ef12f3d5c61718ea | [
"MIT"
] | 14 | 2019-10-04T19:55:41.000Z | 2022-03-27T04:47:30.000Z | defmodule TestWeb.PageViewTest do
use TestWeb.ConnCase, async: true
end
| 18.5 | 35 | 0.810811 |
2d3b6b6b515ff5af14b37b61c7209f8d718fb3a5 | 499 | ex | Elixir | lib/embed_chat_web/views/visitor_view.ex | guofei/embedchat | 6562108acd1d488dde457f28cf01d82b4c5a9bf8 | [
"MIT"
] | 27 | 2016-10-15T12:13:22.000Z | 2021-02-07T20:31:41.000Z | lib/embed_chat_web/views/visitor_view.ex | guofei/embedchat | 6562108acd1d488dde457f28cf01d82b4c5a9bf8 | [
"MIT"
] | null | null | null | lib/embed_chat_web/views/visitor_view.ex | guofei/embedchat | 6562108acd1d488dde457f28cf01d82b4c5a9bf8 | [
"MIT"
] | 4 | 2016-08-21T15:03:29.000Z | 2019-11-22T13:15:29.000Z | defmodule EmbedChatWeb.VisitorView do
use EmbedChatWeb, :view
def render("index.json", %{visitors: visitors}) do
%{data: render_many(visitors, EmbedChatWeb.VisitorView, "visitor.json")}
end
def render("show.json", %{visitor: visitor}) do
%{data: render_one(visitor, EmbedChatWeb.VisitorView, "visitor.j... | 26.263158 | 76 | 0.681363 |
2d3b6d0be4e086445d9ee253c47e5270ef8e22d3 | 6,100 | ex | Elixir | mix/support/normalize/normalize_units.ex | KineticCafe/cldr | 7b84cd85564bca4a2c4e01c02ee0aa284bf07367 | [
"Apache-2.0"
] | 179 | 2019-06-16T09:16:00.000Z | 2022-03-30T04:04:55.000Z | mix/support/normalize/normalize_units.ex | KineticCafe/cldr | 7b84cd85564bca4a2c4e01c02ee0aa284bf07367 | [
"Apache-2.0"
] | 46 | 2019-06-09T02:35:58.000Z | 2022-03-08T10:39:08.000Z | mix/support/normalize/normalize_units.ex | KineticCafe/cldr | 7b84cd85564bca4a2c4e01c02ee0aa284bf07367 | [
"Apache-2.0"
] | 14 | 2020-03-03T16:35:50.000Z | 2022-02-27T14:01:40.000Z | # credo:disable-for-this-file
defmodule Cldr.Normalize.Units do
@moduledoc false
alias Cldr.Substitution
def normalize(content, locale) do
content
|> normalize_units(locale)
end
@unit_types ["short", "long", "narrow"]
def normalize_units(content, locale) do
units =
units_for_locale(loca... | 26.754386 | 85 | 0.608033 |
2d3b873b758bb01fbd0a7696472cafcd5206a53d | 413 | exs | Elixir | pulsar/test/pulsar_web/views/error_view_test.exs | Dermah/pulsar.wtf | fed5734578eb4c8b93bd1cdcb6e2f6d894a4af9e | [
"MIT"
] | null | null | null | pulsar/test/pulsar_web/views/error_view_test.exs | Dermah/pulsar.wtf | fed5734578eb4c8b93bd1cdcb6e2f6d894a4af9e | [
"MIT"
] | 1 | 2021-03-09T21:33:42.000Z | 2021-03-09T21:33:42.000Z | pulsar/test/pulsar_web/views/error_view_test.exs | Dermah/pulsar.wtf | fed5734578eb4c8b93bd1cdcb6e2f6d894a4af9e | [
"MIT"
] | null | null | null | defmodule PulsarWeb.ErrorViewTest do
use PulsarWeb.ConnCase, async: true
# Bring render/3 and render_to_string/3 for testing custom views
import Phoenix.View
test "renders 404.html" do
assert render_to_string(PulsarWeb.ErrorView, "404.html", []) == "Not Found"
end
test "renders 500.html" do
asser... | 27.533333 | 91 | 0.731235 |
2d3bb3618aa55fa8d1ee3b133218280f0120fb95 | 1,563 | ex | Elixir | clients/firestore/lib/google_api/firestore/v1beta1/model/empty.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/firestore/lib/google_api/firestore/v1beta1/model/empty.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/firestore/lib/google_api/firestore/v1beta1/model/empty.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... | 31.26 | 76 | 0.745361 |
2d3bc1ece444e7f00f8d0242999900490a0ad4ac | 3,759 | ex | Elixir | lib/event_log.ex | pbudzik/eventlog | 1db572f401aecf119528b851ba6665cbc01becbd | [
"Apache-2.0"
] | 9 | 2020-01-05T17:27:12.000Z | 2021-09-01T03:41:17.000Z | lib/event_log.ex | pbudzik/eventlog | 1db572f401aecf119528b851ba6665cbc01becbd | [
"Apache-2.0"
] | 1 | 2020-12-20T20:56:58.000Z | 2021-01-01T20:17:47.000Z | lib/event_log.ex | pbudzik/eventlog | 1db572f401aecf119528b851ba6665cbc01becbd | [
"Apache-2.0"
] | 1 | 2020-02-19T09:14:31.000Z | 2020-02-19T09:14:31.000Z | defmodule EventLog do
@moduledoc """
Can host multiple streams. Stream has a log and index.
* Entries are being appended to log. There is no deletion operation.
* Entry contains the actual data, timestamp, crc and some meta data.
* Log is partitioned to segments that are named by it's least offset.
* Each... | 26.659574 | 97 | 0.633679 |
2d3bc541fe85e67efa630bf539375ac076dc1f21 | 1,099 | ex | Elixir | lib/sobelow/traversal/send_download.ex | samhstn/sobelow | c699e62509c137fbaaeb79213e9f1c68969ede21 | [
"Apache-2.0"
] | null | null | null | lib/sobelow/traversal/send_download.ex | samhstn/sobelow | c699e62509c137fbaaeb79213e9f1c68969ede21 | [
"Apache-2.0"
] | null | null | null | lib/sobelow/traversal/send_download.ex | samhstn/sobelow | c699e62509c137fbaaeb79213e9f1c68969ede21 | [
"Apache-2.0"
] | null | null | null | defmodule Sobelow.Traversal.SendDownload do
use Sobelow.Finding
@finding_type "Traversal.SendDownload: Directory Traversal in `send_download`"
def run(fun, meta_file) do
confidence = if !meta_file.is_controller?, do: :low
Finding.init(@finding_type, meta_file.filename, confidence)
|> Finding.multi_f... | 30.527778 | 97 | 0.681529 |
2d3bcaaf1594bd3db7692ab306286923dc23d776 | 4,096 | ex | Elixir | lib/code_corps/github/sync/comment/comment.ex | fikape/code-corps-api | c21674b0b2a19fa26945c94268db8894420ca181 | [
"MIT"
] | 275 | 2015-06-23T00:20:51.000Z | 2021-08-19T16:17:37.000Z | lib/code_corps/github/sync/comment/comment.ex | fikape/code-corps-api | c21674b0b2a19fa26945c94268db8894420ca181 | [
"MIT"
] | 1,304 | 2015-06-26T02:11:54.000Z | 2019-12-12T21:08:00.000Z | lib/code_corps/github/sync/comment/comment.ex | fikape/code-corps-api | c21674b0b2a19fa26945c94268db8894420ca181 | [
"MIT"
] | 140 | 2016-01-01T18:19:47.000Z | 2020-11-22T06:24:47.000Z | defmodule CodeCorps.GitHub.Sync.Comment do
@moduledoc ~S"""
In charge of syncing `CodeCorps.Comment` records with a GitHub comment
payload.
A single GitHub comment always matches a single `CodeCorps.GithubComment`, but
it can match multiple `CodeCorps.Comment` records. This module handles
creating or updat... | 33.032258 | 102 | 0.679932 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.