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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e85e0a50e23917706bab469bce5ea5a2dff276bb | 4,994 | ex | Elixir | clients/dfa_reporting/lib/google_api/dfa_reporting/v35/model/order.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/dfa_reporting/lib/google_api/dfa_reporting/v35/model/order.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/dfa_reporting/lib/google_api/dfa_reporting/v35/model/order.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... | 48.019231 | 170 | 0.659191 |
e85e4c9c726a7f422bb37343a203837daca0027e | 1,421 | ex | Elixir | lib/absinthe/middleware/telemetry.ex | pulkit110/absinthe | fa2060307a401d0943bde72d08267602e4027889 | [
"MIT"
] | 4,101 | 2016-03-02T03:49:20.000Z | 2022-03-31T05:46:01.000Z | lib/absinthe/middleware/telemetry.ex | pulkit110/absinthe | fa2060307a401d0943bde72d08267602e4027889 | [
"MIT"
] | 889 | 2016-03-02T16:06:59.000Z | 2022-03-31T20:24:12.000Z | lib/absinthe/middleware/telemetry.ex | pulkit110/absinthe | fa2060307a401d0943bde72d08267602e4027889 | [
"MIT"
] | 564 | 2016-03-02T07:49:59.000Z | 2022-03-06T14:40:59.000Z | defmodule Absinthe.Middleware.Telemetry do
@moduledoc """
Gather and report telemetry about an individual field resolution
"""
@field_start [:absinthe, :resolve, :field, :start]
@field_stop [:absinthe, :resolve, :field, :stop]
@behaviour Absinthe.Middleware
@impl Absinthe.Middleware
def call(resolutio... | 23.295082 | 67 | 0.579873 |
e85e56ee167193bff4645b9e1b2af6d64bfe1cc7 | 1,841 | ex | Elixir | lib/hexedio/auth/login_attempts/auth_attempts.ex | netsudo/hexedio | 3e0e1ff7cfffcd704ba60394d0a38c4d8608e100 | [
"MIT"
] | null | null | null | lib/hexedio/auth/login_attempts/auth_attempts.ex | netsudo/hexedio | 3e0e1ff7cfffcd704ba60394d0a38c4d8608e100 | [
"MIT"
] | 3 | 2020-07-16T05:37:16.000Z | 2022-03-16T08:58:28.000Z | lib/hexedio/auth/login_attempts/auth_attempts.ex | netsudo/hexedio | 3e0e1ff7cfffcd704ba60394d0a38c4d8608e100 | [
"MIT"
] | null | null | null | defmodule Hexedio.LoginAttempt do
use Agent
alias Hexedio.Auth
@doc """
Starts the LoginAttempt agent to keep track of login attempts
"""
def start_link do
Agent.start_link(fn -> %{} end, name: __MODULE__)
end
@doc """
Get the number of attempts by a username
"""
def get(username) do
Age... | 21.658824 | 66 | 0.60076 |
e85e5a6d4d32565282296b1ac62baa194bfded80 | 5,402 | ex | Elixir | lib/nostrum/voice/session.ex | phereford/nostrum | 3d273671f51d839eedac4d6e52ba9cf70720ac01 | [
"MIT"
] | null | null | null | lib/nostrum/voice/session.ex | phereford/nostrum | 3d273671f51d839eedac4d6e52ba9cf70720ac01 | [
"MIT"
] | null | null | null | lib/nostrum/voice/session.ex | phereford/nostrum | 3d273671f51d839eedac4d6e52ba9cf70720ac01 | [
"MIT"
] | null | null | null | defmodule Nostrum.Voice.Session do
@moduledoc false
alias Nostrum.Cache.{ChannelCache, GuildCache}
alias Nostrum.Constants
alias Nostrum.Shard.Stage.Producer
alias Nostrum.Struct.{VoiceState, VoiceWSState}
alias Nostrum.Voice
alias Nostrum.Voice.{Event, Payload}
require Logger
use GenServer
@gat... | 28.282723 | 98 | 0.671048 |
e85e6809c344a59c9d9bc76e4ea10e7dbe9a7186 | 27,622 | ex | Elixir | lib/ash/api/api.ex | savish/ash | 7faf73097a6c6f801851e9d89569b6f5e6e87f81 | [
"MIT"
] | null | null | null | lib/ash/api/api.ex | savish/ash | 7faf73097a6c6f801851e9d89569b6f5e6e87f81 | [
"MIT"
] | null | null | null | lib/ash/api/api.ex | savish/ash | 7faf73097a6c6f801851e9d89569b6f5e6e87f81 | [
"MIT"
] | null | null | null | defmodule Ash.Api do
@moduledoc """
An Api allows you to interact with your resources, and holds non-resource-specific configuration.
For example, the json api extension adds an api extension that lets you toggle authorization on/off
for all resources in that Api. You include them in an Api like so:
```elix... | 29.829374 | 157 | 0.571067 |
e85e9e2f655abcfa5b4aa6e4c4d2655c61723eb2 | 407 | exs | Elixir | apps/idp/priv/repo/migrations/20191027205337_create_states_table.exs | lbrty/idp-backend | 81d5f10ef6177a1e678b994331c5a09abbdca8d6 | [
"Apache-2.0"
] | null | null | null | apps/idp/priv/repo/migrations/20191027205337_create_states_table.exs | lbrty/idp-backend | 81d5f10ef6177a1e678b994331c5a09abbdca8d6 | [
"Apache-2.0"
] | null | null | null | apps/idp/priv/repo/migrations/20191027205337_create_states_table.exs | lbrty/idp-backend | 81d5f10ef6177a1e678b994331c5a09abbdca8d6 | [
"Apache-2.0"
] | null | null | null | defmodule Idp.Repo.Migrations.CreateStatesTable do
use Ecto.Migration
def change do
create table(:states, primary_key: false) do
add :id, :uuid, primary_key: true
add :name, :string
add :country_id, references(:countries, on_delete: :delete_all, type: :binary_id)
timestamps()
end
... | 22.611111 | 87 | 0.675676 |
e85eda6b33c44e1afe76cea0a4004dafe64f9de7 | 1,517 | ex | Elixir | lib/rotterdam/node.ex | holandes22/rotterdam | d8b56079638c15a8492c08a6859ed14413163e62 | [
"MIT"
] | null | null | null | lib/rotterdam/node.ex | holandes22/rotterdam | d8b56079638c15a8492c08a6859ed14413163e62 | [
"MIT"
] | null | null | null | lib/rotterdam/node.ex | holandes22/rotterdam | d8b56079638c15a8492c08a6859ed14413163e62 | [
"MIT"
] | null | null | null | defmodule Rotterdam.Node do
defstruct id: nil,
created_at: nil,
updated_at: nil,
hostname: nil,
role: nil,
availability: nil,
nano_cpus: 0,
memory_bytes: 0,
state: nil,
leader: false,
reachability:... | 21.671429 | 63 | 0.51615 |
e85edb456ee8de8cf73c0f822f85fdcffe4046b5 | 715 | ex | Elixir | lib/supply_chain_web/live/index_live.ex | BailianBlockchain/Bailian_Supply_Chain | 8341e974b133c86f48488cb52ec4b3b281a99eb5 | [
"MIT"
] | 5 | 2020-12-10T07:24:18.000Z | 2021-12-15T08:26:05.000Z | lib/supply_chain_web/live/index_live.ex | BailianBlockchain/Bailian_Supply_Chain | 8341e974b133c86f48488cb52ec4b3b281a99eb5 | [
"MIT"
] | null | null | null | lib/supply_chain_web/live/index_live.ex | BailianBlockchain/Bailian_Supply_Chain | 8341e974b133c86f48488cb52ec4b3b281a99eb5 | [
"MIT"
] | 2 | 2020-12-12T17:06:13.000Z | 2021-04-09T02:12:31.000Z | defmodule SupplyChainWeb.IndexLive do
use Phoenix.LiveView
def render(assigns) do
~L"""
<div>
<center>
<h2>验证</h2>
</center>
<label>File</label>
</div>
"""
end
def read_test_file() do
File.read!("credential_exp")
|> Poison.decode!()
|> StructTranslater.to_... | 17.875 | 72 | 0.612587 |
e85f03873600b491025cc00bb231b661df2ca49c | 431 | exs | Elixir | mix.exs | jnylen/auditor | 54c2044bf08dcb20f621461b0e8e0ca900690d14 | [
"MIT"
] | null | null | null | mix.exs | jnylen/auditor | 54c2044bf08dcb20f621461b0e8e0ca900690d14 | [
"MIT"
] | null | null | null | mix.exs | jnylen/auditor | 54c2044bf08dcb20f621461b0e8e0ca900690d14 | [
"MIT"
] | null | null | null | defmodule Auditor.MixProject do
use Mix.Project
@name :auditor
@version "0.1.0"
@deps [
{:differ, "~> 0.1.1"}
]
def project do
[
app: @name,
version: @version,
elixir: "~> 1.9",
start_permanent: Mix.env() == :prod,
deps: @deps
]
end
# Run "mix help compile.ap... | 15.962963 | 59 | 0.561485 |
e85f0c0c2f79f18c74486f142513b815889823f9 | 5,792 | exs | Elixir | test/hammer_test.exs | noma4i/hammer | 481f70210787fc2cae60f18b6da723ce2fa1db04 | [
"MIT"
] | 1 | 2019-04-15T12:59:38.000Z | 2019-04-15T12:59:38.000Z | test/hammer_test.exs | ni-kismet/hammer | 08c43447a4ee4ae63d3af43b5ba2c7a7411617b1 | [
"MIT"
] | null | null | null | test/hammer_test.exs | ni-kismet/hammer | 08c43447a4ee4ae63d3af43b5ba2c7a7411617b1 | [
"MIT"
] | null | null | null | defmodule HammerTest do
use ExUnit.Case, async: true
setup _context do
{:ok, _hammer_ets_pid} = Hammer.Backend.ETS.start_link()
{:ok, []}
end
test "make_rate_checker" do
check = Hammer.make_rate_checker("some-prefix:", 10000, 2)
assert {:allow, 1} = check.("aaa")
assert {:allow, 2} = check... | 38.357616 | 96 | 0.656941 |
e85f27e0e13f4462449f7fae15d01fb538d21f3a | 1,111 | exs | Elixir | config/config.exs | Homepolish/ulid | 376d778a30bdd9c15e43a29418613e48bd0e3519 | [
"MIT"
] | 23 | 2018-07-16T07:54:35.000Z | 2019-08-04T10:05:47.000Z | config/config.exs | Homepolish/ulid | 376d778a30bdd9c15e43a29418613e48bd0e3519 | [
"MIT"
] | 2 | 2020-01-10T21:38:10.000Z | 2021-03-14T13:13:07.000Z | config/config.exs | Homepolish/ulid | 376d778a30bdd9c15e43a29418613e48bd0e3519 | [
"MIT"
] | 2 | 2018-07-16T07:54:48.000Z | 2019-01-14T21:38:02.000Z | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the paren... | 35.83871 | 73 | 0.749775 |
e85f3b6c16ef9e62b20b4321c178c16585dad9b3 | 1,679 | ex | Elixir | clients/slides/lib/google_api/slides/v1/model/theme_color_pair.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/slides/lib/google_api/slides/v1/model/theme_color_pair.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/slides/lib/google_api/slides/v1/model/theme_color_pair.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... | 33.58 | 146 | 0.722454 |
e85f78ad9e2b4cd2d19ec6699d8346ac06b4557c | 1,449 | exs | Elixir | test/functional/render/headings_test.exs | RobertDober/earmark | 6f20bd06f40e4333294d19eb38031ea480f3d3ba | [
"Apache-2.0"
] | null | null | null | test/functional/render/headings_test.exs | RobertDober/earmark | 6f20bd06f40e4333294d19eb38031ea480f3d3ba | [
"Apache-2.0"
] | null | null | null | test/functional/render/headings_test.exs | RobertDober/earmark | 6f20bd06f40e4333294d19eb38031ea480f3d3ba | [
"Apache-2.0"
] | 1 | 2020-09-15T17:47:35.000Z | 2020-09-15T17:47:35.000Z | defmodule HeadingsTest do
use ExUnit.Case
alias Earmark.HtmlRenderer, as: Renderer
alias Earmark.Block.Heading
import Support.Helpers
defp render [level: level, content: content] do
Renderer.render([
%Heading{attrs: nil, level: level, content: content}],
updated_context()
)
end
de... | 27.865385 | 99 | 0.668737 |
e85fa2c3c3eed6af942a30de13c154da10996e4d | 3,220 | ex | Elixir | clients/cloud_functions/lib/google_api/cloud_functions/v1/model/expr.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/cloud_functions/lib/google_api/cloud_functions/v1/model/expr.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/cloud_functions/lib/google_api/cloud_functions/v1/model/expr.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 57.5 | 1,092 | 0.736335 |
e85fb03be07cccb7e929dbb26f2891edd413a5dd | 913 | ex | Elixir | elixir/beer-song-alternatives/beer_song_onefunc.ex | nickbosch/exercism | de81b5ff07bb314160e5a171bedcfca3e7d1e307 | [
"MIT"
] | null | null | null | elixir/beer-song-alternatives/beer_song_onefunc.ex | nickbosch/exercism | de81b5ff07bb314160e5a171bedcfca3e7d1e307 | [
"MIT"
] | null | null | null | elixir/beer-song-alternatives/beer_song_onefunc.ex | nickbosch/exercism | de81b5ff07bb314160e5a171bedcfca3e7d1e307 | [
"MIT"
] | null | null | null | defmodule BeerSong do
@doc """
Get a single verse of the beer song
"""
@spec verse(integer) :: String.t()
def verse(n) do
{how_many_bottles, action, remaing_bottles} =
case n do
2 -> {"2 bottles", "Take one down and pass it around", "1 bottle"}
1 -> {"1 bottle", "Take it down and pas... | 31.482759 | 92 | 0.599124 |
e85fd09e38d3c44de6d3cdd87d4d8039068253cc | 28,616 | exs | Elixir | lib/elixir/test/elixir/dynamic_supervisor_test.exs | spencerdcarlson/elixir | 23d75ecdf58df80969e12f4420282238e19219a1 | [
"Apache-2.0"
] | 243 | 2020-02-03T03:48:51.000Z | 2021-11-08T12:56:25.000Z | lib/elixir/test/elixir/dynamic_supervisor_test.exs | spencerdcarlson/elixir | 23d75ecdf58df80969e12f4420282238e19219a1 | [
"Apache-2.0"
] | 6 | 2021-03-19T12:33:21.000Z | 2021-04-02T17:52:45.000Z | lib/elixir/test/elixir/dynamic_supervisor_test.exs | spencerdcarlson/elixir | 23d75ecdf58df80969e12f4420282238e19219a1 | [
"Apache-2.0"
] | 1 | 2018-01-09T20:10:59.000Z | 2018-01-09T20:10:59.000Z | Code.require_file("test_helper.exs", __DIR__)
defmodule DynamicSupervisorTest do
use ExUnit.Case, async: true
defmodule Simple do
use DynamicSupervisor
def init(args), do: args
end
test "can be supervised directly" do
children = [{DynamicSupervisor, strategy: :one_for_one, name: :dyn_sup_spec_te... | 38.775068 | 98 | 0.651454 |
e85fe57c7c1aa2114f9949676e05650e7727ccbb | 353 | ex | Elixir | test/facade/system/spacing_test.ex | devilcoders/facade | 6aca8aaaf643b83ec275344436049c162d3a3b9a | [
"MIT"
] | null | null | null | test/facade/system/spacing_test.ex | devilcoders/facade | 6aca8aaaf643b83ec275344436049c162d3a3b9a | [
"MIT"
] | null | null | null | test/facade/system/spacing_test.ex | devilcoders/facade | 6aca8aaaf643b83ec275344436049c162d3a3b9a | [
"MIT"
] | null | null | null | defmodule Facade.System.SpacingTest do
use Facade.ConnCase, async: true
alias Facade.System.Spacing
test "generate proper spacin classes list" do
assert Spacing.to_classes(p: 10, m: 10, px: [10, 5, 4]) == [
"p-10",
"m-10",
"px-10",
"sm:px-5",
... | 22.0625 | 64 | 0.515581 |
e8601206aa26176ec63b82112607d074a4955aaa | 900 | ex | Elixir | lib/sobelow/vuln/coherence.ex | juancgalvis/sobelow | 9ae3874c26ab7cfa6c8a8517ccd02af98e187585 | [
"Apache-2.0"
] | 1,305 | 2017-05-12T21:09:40.000Z | 2022-03-31T04:31:49.000Z | lib/sobelow/vuln/coherence.ex | juancgalvis/sobelow | 9ae3874c26ab7cfa6c8a8517ccd02af98e187585 | [
"Apache-2.0"
] | 95 | 2017-05-15T09:45:41.000Z | 2022-03-23T03:35:48.000Z | lib/sobelow/vuln/coherence.ex | juancgalvis/sobelow | 9ae3874c26ab7cfa6c8a8517ccd02af98e187585 | [
"Apache-2.0"
] | 86 | 2017-05-15T20:18:59.000Z | 2022-02-11T22:10:34.000Z | defmodule Sobelow.Vuln.Coherence do
alias Sobelow.Config
alias Sobelow.Vuln
@uid 22
@finding_type "Vuln.Coherence: Known Vulnerable Dependency - Update Coherence"
use Sobelow.Finding
@vuln_vsn ["<=0.5.1"]
def run(root) do
plug_conf = root <> "/deps/coherence/mix.exs"
if File.exists?(plug_conf... | 21.95122 | 80 | 0.568889 |
e8601390e5b425193d9b6a324c3d1dab8649e2f7 | 373 | exs | Elixir | apps/platform_runner/config/integration.exs | kennyatpillar/hindsight | e90e2150a14218e5d6fdf5874f57eb055fd2dd07 | [
"Apache-2.0"
] | null | null | null | apps/platform_runner/config/integration.exs | kennyatpillar/hindsight | e90e2150a14218e5d6fdf5874f57eb055fd2dd07 | [
"Apache-2.0"
] | null | null | null | apps/platform_runner/config/integration.exs | kennyatpillar/hindsight | e90e2150a14218e5d6fdf5874f57eb055fd2dd07 | [
"Apache-2.0"
] | null | null | null | import Config
config :platform_runner,
divo: "docker-compose.yml",
divo_wait: [dwell: 1_000, max_tries: 120]
config :ex_aws,
debug_requests: true,
access_key_id: "testing_access_key",
secret_access_key: "testing_secret_key",
region: "local"
config :ex_aws, :s3,
scheme: "http://",
region: "local",
h... | 18.65 | 43 | 0.675603 |
e8602dee2863423fe600d3cad55fcf1873c96098 | 2,416 | exs | Elixir | test/base_test.exs | joevandyk/result | b516f0440ca41f0a68fbd2f66064b1bca70bd1d9 | [
"MIT"
] | 70 | 2019-04-24T00:53:18.000Z | 2022-02-28T07:03:14.000Z | test/base_test.exs | joevandyk/result | b516f0440ca41f0a68fbd2f66064b1bca70bd1d9 | [
"MIT"
] | 3 | 2019-06-25T22:43:32.000Z | 2020-02-13T15:15:50.000Z | test/base_test.exs | joevandyk/result | b516f0440ca41f0a68fbd2f66064b1bca70bd1d9 | [
"MIT"
] | 4 | 2019-04-25T04:52:02.000Z | 2020-07-28T19:56:22.000Z | defmodule BaseTest do
@moduledoc false
use ExUnit.Case
import Brex.Result.Base
doctest Brex.Result.Base
def sgn(x) do
if x > 0 do
{:ok, "pos"}
else
{:error, "neg"}
end
end
def two_args(x, y), do: {:ok, x - y}
def inside_bind(x, f), do: x ~> f.()
test "bind" do
assert... | 21.765766 | 92 | 0.502483 |
e860370ee56654f61ec119ecdeff4fbd793d249b | 59 | ex | Elixir | test/support/mocks.ex | daskycodes/trifolium | 322f01f89948c51d974e64b049ca2ce2d0f8b45f | [
"MIT"
] | 1 | 2021-04-19T15:09:35.000Z | 2021-04-19T15:09:35.000Z | test/support/mocks.ex | daskycodes/trifolium | 322f01f89948c51d974e64b049ca2ce2d0f8b45f | [
"MIT"
] | 1 | 2021-04-19T18:08:05.000Z | 2021-04-19T18:08:05.000Z | test/support/mocks.ex | daskycodes/trifolium | 322f01f89948c51d974e64b049ca2ce2d0f8b45f | [
"MIT"
] | 2 | 2021-04-19T15:09:39.000Z | 2021-04-28T14:05:21.000Z | Mox.defmock(Trifolium.HTTPClientMock, for: HTTPoison.Base)
| 29.5 | 58 | 0.830508 |
e8606b7c8683a81dade0d04a41b29f3704119a87 | 1,661 | ex | Elixir | aoc21/lib/graph.ex | sastels/advent-of-code-2021 | 7cefbb8bf08cce2c4a4e9517ecbaf49459a8671a | [
"MIT"
] | null | null | null | aoc21/lib/graph.ex | sastels/advent-of-code-2021 | 7cefbb8bf08cce2c4a4e9517ecbaf49459a8671a | [
"MIT"
] | null | null | null | aoc21/lib/graph.ex | sastels/advent-of-code-2021 | 7cefbb8bf08cce2c4a4e9517ecbaf49459a8671a | [
"MIT"
] | null | null | null | defmodule Graph do
@type graph_t :: map
@type vertex_t :: String.t()
@type edge_t :: {vertex_t(), vertex_t(), number()}
@spec new() :: graph_t()
def new(), do: %{}
@spec new(String.t()) :: graph_t()
def new(edge_data) do
edge_data
|> String.split(~r/\s+/, trim: true)
|> Enum.reduce(new(), &a... | 26.790323 | 73 | 0.603251 |
e860700f41a5b582bf46c894c741ef892c0286b1 | 1,353 | exs | Elixir | priv/templates/html/controller_test.exs | parkerl/phoenix | 3dc207222877ce1876a07b8dd8d67fcd0325f7e1 | [
"MIT"
] | null | null | null | priv/templates/html/controller_test.exs | parkerl/phoenix | 3dc207222877ce1876a07b8dd8d67fcd0325f7e1 | [
"MIT"
] | null | null | null | priv/templates/html/controller_test.exs | parkerl/phoenix | 3dc207222877ce1876a07b8dd8d67fcd0325f7e1 | [
"MIT"
] | null | null | null | defmodule <%= module %>ControllerTest do
use <%= base %>.ConnCase
alias <%= module %>
@valid_params <%= singular %>: <%= inspect params %>
test "GET /<%= plural %>" do
conn = get conn(), <%= singular %>_path(conn, :index)
assert conn.resp_body =~ "Listing <%= plural %>"
end
test "GET /<%= plural ... | 33.825 | 93 | 0.566888 |
e860c080b029f337d9068936f9bea7733eec5c54 | 4,619 | exs | Elixir | test/test_helper.exs | kianmeng/credo_naming | da1d26144d5bb9c019ffc02d19497fb365692b6d | [
"BSD-3-Clause"
] | 36 | 2019-06-17T11:03:45.000Z | 2021-12-21T19:30:17.000Z | test/test_helper.exs | kianmeng/credo_naming | da1d26144d5bb9c019ffc02d19497fb365692b6d | [
"BSD-3-Clause"
] | 12 | 2019-08-01T10:06:31.000Z | 2022-03-18T14:10:21.000Z | test/test_helper.exs | kianmeng/credo_naming | da1d26144d5bb9c019ffc02d19497fb365692b6d | [
"BSD-3-Clause"
] | 5 | 2019-09-13T09:09:46.000Z | 2022-02-24T22:02:38.000Z | Code.require_file("support/test_application.exs", __DIR__)
Credo.Test.Application.start([], [])
ExUnit.start()
check_version =
~w(1.6.5 1.7.0)
|> Enum.reduce([], fn version, acc ->
# allow -dev versions so we can test before the Elixir release.
if System.version() |> Version.match?("< #{version}-dev") do... | 26.244318 | 93 | 0.686296 |
e860c8cead7a03cc31f1a4e6394ad3322c6f427e | 4,578 | ex | Elixir | lib/hexpm/web/views/package_view.ex | lau/hexpm | beee80f5358a356530debfea35ee65c3a0aa9b25 | [
"Apache-2.0"
] | null | null | null | lib/hexpm/web/views/package_view.ex | lau/hexpm | beee80f5358a356530debfea35ee65c3a0aa9b25 | [
"Apache-2.0"
] | null | null | null | lib/hexpm/web/views/package_view.ex | lau/hexpm | beee80f5358a356530debfea35ee65c3a0aa9b25 | [
"Apache-2.0"
] | null | null | null | defmodule Hexpm.Web.PackageView do
use Hexpm.Web, :view
def show_sort_info(nil), do: show_sort_info(:name)
def show_sort_info(:name), do: "Sort: Name"
def show_sort_info(:inserted_at), do: "Sort: Recently created"
def show_sort_info(:updated_at), do: "Sort: Recently updated"
def show_sort_info(:total_downl... | 28.792453 | 98 | 0.637178 |
e860cc9038beba3a66ab80c5e6de61f2c1922638 | 6,206 | exs | Elixir | test/exqlite/integration_test.exs | laszlohegedus/exqlite | ed0668228fc668cf6d49e1989614eaf02c5a2dd9 | [
"MIT"
] | null | null | null | test/exqlite/integration_test.exs | laszlohegedus/exqlite | ed0668228fc668cf6d49e1989614eaf02c5a2dd9 | [
"MIT"
] | null | null | null | test/exqlite/integration_test.exs | laszlohegedus/exqlite | ed0668228fc668cf6d49e1989614eaf02c5a2dd9 | [
"MIT"
] | null | null | null | defmodule Exqlite.IntegrationTest do
use ExUnit.Case
alias Exqlite.Connection
alias Exqlite.Sqlite3
alias Exqlite.Query
test "simple prepare execute and close" do
path = Temp.path!()
{:ok, db} = Sqlite3.open(path)
:ok = Sqlite3.execute(db, "create table test (id ingeger primary key, stuff text)"... | 30.722772 | 87 | 0.63358 |
e860f0a111a044e7f346ff6b977f2b6b869d1b53 | 69 | ex | Elixir | web/views/layout_view.ex | cavneb/elixir_casts | c650a2850825e0305387b95ba6a7eb386e984097 | [
"MIT"
] | null | null | null | web/views/layout_view.ex | cavneb/elixir_casts | c650a2850825e0305387b95ba6a7eb386e984097 | [
"MIT"
] | null | null | null | web/views/layout_view.ex | cavneb/elixir_casts | c650a2850825e0305387b95ba6a7eb386e984097 | [
"MIT"
] | null | null | null | defmodule ElixirCasts.LayoutView do
use ElixirCasts.Web, :view
end
| 17.25 | 35 | 0.811594 |
e8612243efea4c8731b35c0cd1e5578387a99ba2 | 3,123 | ex | Elixir | clients/you_tube/lib/google_api/you_tube/v3/model/guide_category_list_response.ex | nuxlli/elixir-google-api | ecb8679ac7282b7dd314c3e20c250710ec6a7870 | [
"Apache-2.0"
] | null | null | null | clients/you_tube/lib/google_api/you_tube/v3/model/guide_category_list_response.ex | nuxlli/elixir-google-api | ecb8679ac7282b7dd314c3e20c250710ec6a7870 | [
"Apache-2.0"
] | null | null | null | clients/you_tube/lib/google_api/you_tube/v3/model/guide_category_list_response.ex | nuxlli/elixir-google-api | ecb8679ac7282b7dd314c3e20c250710ec6a7870 | [
"Apache-2.0"
] | 1 | 2020-11-10T16:58:27.000Z | 2020-11-10T16:58:27.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 43.375 | 220 | 0.723023 |
e86123ee2efafc05687d250626a76646cb8ce9d9 | 960 | ex | Elixir | lib/conduit/encoding/gzip.ex | log4b/conduit | 5ecf5aa0edd831f54c28d596f1cb2d414fc99c6e | [
"MIT"
] | 119 | 2016-11-21T13:19:22.000Z | 2021-11-07T17:29:05.000Z | lib/conduit/encoding/gzip.ex | log4b/conduit | 5ecf5aa0edd831f54c28d596f1cb2d414fc99c6e | [
"MIT"
] | 104 | 2018-02-02T20:42:46.000Z | 2021-08-03T05:36:09.000Z | lib/conduit/encoding/gzip.ex | log4b/conduit | 5ecf5aa0edd831f54c28d596f1cb2d414fc99c6e | [
"MIT"
] | 21 | 2018-08-03T02:38:21.000Z | 2022-03-16T18:26:58.000Z | defmodule Conduit.Encoding.GZip do
use Conduit.Encoding
@moduledoc """
Handles encoding to and from gzip.
"""
@doc """
Encodes the message body to gzip.
## Examples
iex> import Conduit.Message
iex> message =
iex> %Conduit.Message{}
iex> |> put_body("{}")
iex> |> Con... | 21.333333 | 100 | 0.573958 |
e8616bd64ef855443f93a957edf5842b43b2e3f2 | 29,512 | ex | Elixir | lib/elixir/lib/uri.ex | jmbejar/elixir | 4a5fcbe04a5a477e27c6645a8a4bdb98332fb6eb | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/uri.ex | jmbejar/elixir | 4a5fcbe04a5a477e27c6645a8a4bdb98332fb6eb | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/uri.ex | jmbejar/elixir | 4a5fcbe04a5a477e27c6645a8a4bdb98332fb6eb | [
"Apache-2.0"
] | 1 | 2021-12-09T11:36:07.000Z | 2021-12-09T11:36:07.000Z | defmodule URI do
@moduledoc """
Utilities for working with URIs.
This module provides functions for working with URIs (for example, parsing
URIs or encoding query strings). The functions in this module are implemented
according to [RFC 3986](https://tools.ietf.org/html/rfc3986).
URIs are structs behind th... | 29.075862 | 105 | 0.606228 |
e86172e079330607e5a81aa2cb9ff19438c7ef24 | 67 | ex | Elixir | lib/course_01_web/views/planning_view.ex | geirilja/web_dev | e1a64336bf52148a63e54a7326ea9ed13a2034a0 | [
"MIT"
] | null | null | null | lib/course_01_web/views/planning_view.ex | geirilja/web_dev | e1a64336bf52148a63e54a7326ea9ed13a2034a0 | [
"MIT"
] | null | null | null | lib/course_01_web/views/planning_view.ex | geirilja/web_dev | e1a64336bf52148a63e54a7326ea9ed13a2034a0 | [
"MIT"
] | null | null | null | defmodule Course01Web.PlanningView do
use Course01Web, :view
end
| 16.75 | 37 | 0.820896 |
e861853559f9f1db8f0bc3009998e62290259cbf | 76 | exs | Elixir | test/sengo_web/views/page_view_test.exs | henrikcoll/sengo | d5ef840843bffbc858dc18d331e4ebc74e6837cb | [
"MIT"
] | null | null | null | test/sengo_web/views/page_view_test.exs | henrikcoll/sengo | d5ef840843bffbc858dc18d331e4ebc74e6837cb | [
"MIT"
] | null | null | null | test/sengo_web/views/page_view_test.exs | henrikcoll/sengo | d5ef840843bffbc858dc18d331e4ebc74e6837cb | [
"MIT"
] | null | null | null | defmodule SengoWeb.PageViewTest do
use SengoWeb.ConnCase, async: true
end
| 19 | 36 | 0.815789 |
e8619a9f87c7abee959a0fd1f27b2634e1ab4820 | 13,694 | ex | Elixir | lib/mix/oasis/router.ex | hou8/oasis | 1f8a54da4202f315031d6ceeb6735e81bda1dad2 | [
"MIT"
] | null | null | null | lib/mix/oasis/router.ex | hou8/oasis | 1f8a54da4202f315031d6ceeb6735e81bda1dad2 | [
"MIT"
] | null | null | null | lib/mix/oasis/router.ex | hou8/oasis | 1f8a54da4202f315031d6ceeb6735e81bda1dad2 | [
"MIT"
] | null | null | null | defmodule Mix.Oasis.Router do
@moduledoc false
defstruct [
:http_verb,
:path_schema,
:body_schema,
:header_schema,
:cookie_schema,
:query_schema,
:url,
:operation_id,
:name_space,
:pre_plug_module,
:plug_module,
:request_validator,
:plug_parsers,
:security
... | 29.704989 | 138 | 0.672265 |
e861ac320acaaceaa98c5661d381893f21fd4b97 | 1,489 | exs | Elixir | test/ja_serializer/builder/resource_object_test.exs | mbta/ja_serializer | efb1d4489809e31e4b54b4af9e85f0b3ceeb650b | [
"Apache-2.0"
] | null | null | null | test/ja_serializer/builder/resource_object_test.exs | mbta/ja_serializer | efb1d4489809e31e4b54b4af9e85f0b3ceeb650b | [
"Apache-2.0"
] | 1 | 2021-06-25T13:28:34.000Z | 2021-06-25T13:28:34.000Z | test/ja_serializer/builder/resource_object_test.exs | mbta/ja_serializer | efb1d4489809e31e4b54b4af9e85f0b3ceeb650b | [
"Apache-2.0"
] | null | null | null | defmodule JaSerializer.Builder.ResourceObjectTest do
use ExUnit.Case
defmodule ArticleSerializer do
use JaSerializer
def type, do: "articles"
attributes [:title, :body]
end
test "single resource object built correctly" do
a1 = %TestModel.Article{id: "a1", title: "a1", body: "a1"}
context... | 27.574074 | 78 | 0.660846 |
e861c5c5a2545354933ea033a758cbad498495bb | 2,286 | exs | Elixir | test/nabo/parser/front_test.exs | douglascorrea/nabo | b4e72ddfa491f390f2c9d509f334ade4994fd6bc | [
"MIT"
] | 109 | 2017-06-02T08:14:06.000Z | 2021-11-05T17:47:59.000Z | test/nabo/parser/front_test.exs | douglascorrea/nabo | b4e72ddfa491f390f2c9d509f334ade4994fd6bc | [
"MIT"
] | 11 | 2017-07-03T19:46:15.000Z | 2021-02-11T14:48:29.000Z | test/nabo/parser/front_test.exs | douglascorrea/nabo | b4e72ddfa491f390f2c9d509f334ade4994fd6bc | [
"MIT"
] | 20 | 2017-06-11T10:40:51.000Z | 2021-02-10T18:14:06.000Z | defmodule Nabo.Parser.FrontTest do
use ExUnit.Case, async: true
import Nabo.Parser.Front, only: [parse: 2]
test "parse/2 with successful case" do
json = """
{
"title": "Title",
"slug": "slug",
"published_at": "2017-01-01T01:02:03Z",
"draft": false,
"categories": ["cat-1", "... | 23.326531 | 102 | 0.531059 |
e86205355adb37d2c4ff25cde63eb8cabd1300c0 | 488 | ex | Elixir | lib/fuschia_web/plugs/locale.ex | cciuenf/fuschia | cc21d38445a8236142191efd66a3e3997b25cf42 | [
"BSD-3-Clause"
] | 1 | 2022-02-21T18:25:14.000Z | 2022-02-21T18:25:14.000Z | lib/fuschia_web/plugs/locale.ex | cciuenf/fuschia | cc21d38445a8236142191efd66a3e3997b25cf42 | [
"BSD-3-Clause"
] | 32 | 2021-07-27T20:48:30.000Z | 2022-03-26T10:35:43.000Z | lib/fuschia_web/plugs/locale.ex | cciuenf/fuschia | cc21d38445a8236142191efd66a3e3997b25cf42 | [
"BSD-3-Clause"
] | null | null | null | defmodule FuschiaWeb.LocalePlug do
@moduledoc """
Plug to handle gettext locale from request header
"""
import Plug.Conn
@default_locale "en"
@spec init(map) :: map
def init(default), do: default
@spec call(Plug.Conn.t(), map) :: map
def call(conn, _opts) do
req_locale =
conn
|> ge... | 19.52 | 51 | 0.657787 |
e8622c5b315897da319cb4c478072463404fc178 | 207 | ex | Elixir | lib/excoveralls_linter/coverage_ratio.ex | miros/excoveralls_linter | 661e9d4019d9f8842340c172d78341e8822d4d6c | [
"Apache-2.0"
] | 4 | 2019-11-25T15:32:45.000Z | 2020-01-29T23:27:45.000Z | lib/excoveralls_linter/coverage_ratio.ex | miros/excoveralls_linter | 661e9d4019d9f8842340c172d78341e8822d4d6c | [
"Apache-2.0"
] | null | null | null | lib/excoveralls_linter/coverage_ratio.ex | miros/excoveralls_linter | 661e9d4019d9f8842340c172d78341e8822d4d6c | [
"Apache-2.0"
] | null | null | null | defmodule ExCoverallsLinter.CoverageRatio do
@type t :: float
def round(coverage) when is_integer(coverage), do: coverage
def round(coverage) when is_float(coverage), do: Float.round(coverage, 3)
end
| 29.571429 | 75 | 0.768116 |
e8624fd869e0d19d95a027f6bd940ab5df252c9f | 406 | ex | Elixir | lib/top5_2_web/views/note_view.ex | rpillar/Top5_Elixir2 | 9f3a9a0315c5dc53cb53aab93deadccdb697a868 | [
"MIT"
] | 1 | 2019-11-11T21:48:20.000Z | 2019-11-11T21:48:20.000Z | lib/top5_2_web/views/note_view.ex | rpillar/Top5_Elixir2 | 9f3a9a0315c5dc53cb53aab93deadccdb697a868 | [
"MIT"
] | 2 | 2021-03-09T09:26:25.000Z | 2021-05-09T08:58:51.000Z | lib/top5_2_web/views/note_view.ex | rpillar/Top5_Elixir2 | 9f3a9a0315c5dc53cb53aab93deadccdb697a868 | [
"MIT"
] | null | null | null | defmodule Top52Web.NoteView do
use Top52Web, :view
alias Top52Web.NoteView
def render("index.json", %{notes: notes}) do
%{data: render_many(notes, NoteView, "note.json")}
end
def render("show.json", %{note: note}) do
%{data: render_one(note, NoteView, "note.json")}
end
def render("note.json", %... | 23.882353 | 58 | 0.657635 |
e86252929be0e40d425e6858528897077498d856 | 994 | ex | Elixir | lib/vintage_net/route/interface_info.ex | danielspofford/vintage_net | 2fc6f251069aa0ae283524aed6714991c0137773 | [
"Apache-2.0"
] | null | null | null | lib/vintage_net/route/interface_info.ex | danielspofford/vintage_net | 2fc6f251069aa0ae283524aed6714991c0137773 | [
"Apache-2.0"
] | null | null | null | lib/vintage_net/route/interface_info.ex | danielspofford/vintage_net | 2fc6f251069aa0ae283524aed6714991c0137773 | [
"Apache-2.0"
] | null | null | null | defmodule VintageNet.Route.InterfaceInfo do
alias VintageNet.Interface.Classification
@moduledoc false
defstruct default_gateway: nil,
weight: 0,
ip_subnets: [],
interface_type: :unknown,
status: :disconnected
@type t :: %__MODULE__{
default_gateway: ... | 34.275862 | 96 | 0.634809 |
e8625fef474822a7e68bb4f69ece457dc698f1ac | 26,896 | ex | Elixir | lib/aws/generated/app_config.ex | salemove/aws-elixir | debdf6482158a71a57636ac664c911e682093395 | [
"Apache-2.0"
] | null | null | null | lib/aws/generated/app_config.ex | salemove/aws-elixir | debdf6482158a71a57636ac664c911e682093395 | [
"Apache-2.0"
] | null | null | null | lib/aws/generated/app_config.ex | salemove/aws-elixir | debdf6482158a71a57636ac664c911e682093395 | [
"Apache-2.0"
] | null | null | null | # WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
# See https://github.com/aws-beam/aws-codegen for more details.
defmodule AWS.AppConfig do
@moduledoc """
AWS AppConfig
Use AWS AppConfig, a capability of AWS Systems Manager, to create, manage, and
quickly deploy application configurations.
AppConfig supports c... | 23.759717 | 191 | 0.623959 |
e8627ca11f0be27e55f6366ac9f1435a07944a74 | 1,330 | ex | Elixir | lib/geolix/adapter.ex | tcitworld/geolix | e5afe54efe664b1cd0617fcaedae8d9e9e5d977a | [
"Apache-2.0"
] | null | null | null | lib/geolix/adapter.ex | tcitworld/geolix | e5afe54efe664b1cd0617fcaedae8d9e9e5d977a | [
"Apache-2.0"
] | null | null | null | lib/geolix/adapter.ex | tcitworld/geolix | e5afe54efe664b1cd0617fcaedae8d9e9e5d977a | [
"Apache-2.0"
] | null | null | null | defmodule Geolix.Adapter do
@moduledoc """
Adapter behaviour module.
"""
@optional_callbacks [
database_workers: 1,
load_database: 1,
metadata: 1,
unload_database: 1
]
@doc """
Returns the adapter processes to be supervised.
If no automatic supervision should take place or it is inten... | 27.708333 | 99 | 0.660902 |
e862803517bd2b8abdc28e8590cbf3d424f3b17c | 4,692 | exs | Elixir | test/parsers/rss2_test.exs | pollingj/itunes-parser | e76cf7af4c5930d624f0a88d117440addd5ece94 | [
"MIT"
] | null | null | null | test/parsers/rss2_test.exs | pollingj/itunes-parser | e76cf7af4c5930d624f0a88d117440addd5ece94 | [
"MIT"
] | null | null | null | test/parsers/rss2_test.exs | pollingj/itunes-parser | e76cf7af4c5930d624f0a88d117440addd5ece94 | [
"MIT"
] | null | null | null | defmodule ITunesParser.Test.Parsers.RSS2 do
use ExUnit.Case
alias ITunesParser.XmlNode
alias ITunesParser.Parsers.RSS2
setup do
sample1 = XmlNode.from_file("test/fixtures/rss2/sample1.xml")
big_sample = XmlNode.from_file("test/fixtures/rss2/bigsample.xml")
{:ok, [sample1: sample1, big_sample: b... | 36.092308 | 443 | 0.622336 |
e8629f8063c66812cad0922054cdcf1de04f2c64 | 267 | exs | Elixir | priv/repo/migrations/20170913114958_remove_github_event_source_field.exs | fikape/code-corps-api | c21674b0b2a19fa26945c94268db8894420ca181 | [
"MIT"
] | 275 | 2015-06-23T00:20:51.000Z | 2021-08-19T16:17:37.000Z | priv/repo/migrations/20170913114958_remove_github_event_source_field.exs | fikape/code-corps-api | c21674b0b2a19fa26945c94268db8894420ca181 | [
"MIT"
] | 1,304 | 2015-06-26T02:11:54.000Z | 2019-12-12T21:08:00.000Z | priv/repo/migrations/20170913114958_remove_github_event_source_field.exs | fikape/code-corps-api | c21674b0b2a19fa26945c94268db8894420ca181 | [
"MIT"
] | 140 | 2016-01-01T18:19:47.000Z | 2020-11-22T06:24:47.000Z | defmodule CodeCorps.Repo.Migrations.RemoveGithubEventSourceField do
use Ecto.Migration
def up do
alter table(:github_events) do
remove :source
end
end
def down do
alter table(:github_events) do
add :source, :string
end
end
end
| 16.6875 | 67 | 0.696629 |
e862c0a0b12f4ad42b78be3976929e10906f90cc | 7,189 | exs | Elixir | test/redix/protocol_test.exs | SoCal-Software-Labs/safe-redix | 6ac3d42c104ee3a2bcd5d726aaca1474e95cc29f | [
"MIT"
] | 968 | 2015-08-17T14:14:57.000Z | 2022-03-29T03:39:17.000Z | test/redix/protocol_test.exs | SoCal-Software-Labs/safe-redix | 6ac3d42c104ee3a2bcd5d726aaca1474e95cc29f | [
"MIT"
] | 192 | 2015-08-17T20:39:57.000Z | 2022-03-23T08:48:36.000Z | test/redix/protocol_test.exs | SoCal-Software-Labs/safe-redix | 6ac3d42c104ee3a2bcd5d726aaca1474e95cc29f | [
"MIT"
] | 145 | 2015-08-17T20:38:22.000Z | 2022-03-04T22:59:47.000Z | defmodule Redix.ProtocolTest do
use ExUnit.Case, async: true
use ExUnitProperties
alias Redix.{Error, Protocol.ParseError}
doctest Redix.Protocol
describe "pack/1" do
import Redix.Protocol, only: [pack: 1]
test "empty array" do
assert IO.iodata_to_binary(pack([])) == "*0\r\n"
end
te... | 35.413793 | 95 | 0.601892 |
e86309436b2fab4c573c9052d4f189fb31bd2bd1 | 1,119 | ex | Elixir | lib/ex_jira/utils/query_params.ex | dullandwitless/elixir-ex_jira | d9a2f45fe47c70e1b5f1e1dd2ba2c3e5175c4bc2 | [
"MIT"
] | 2 | 2019-09-18T00:43:54.000Z | 2019-10-24T21:35:02.000Z | lib/ex_jira/utils/query_params.ex | dullandwitless/elixir-ex_jira | d9a2f45fe47c70e1b5f1e1dd2ba2c3e5175c4bc2 | [
"MIT"
] | 5 | 2018-05-21T15:47:45.000Z | 2022-02-11T16:21:00.000Z | lib/ex_jira/utils/query_params.ex | dullandwitless/elixir-ex_jira | d9a2f45fe47c70e1b5f1e1dd2ba2c3e5175c4bc2 | [
"MIT"
] | 6 | 2018-01-04T01:40:04.000Z | 2022-02-11T16:02:27.000Z | defmodule ExJira.QueryParams do
@moduledoc """
Helper module to convert parameters passed as a keyword list into a querystring.
"""
@doc """
Converts a keyword list and a list of atoms into a querystring containing only
entries that exist in both the keyword list and the list of atoms.
## Examples
... | 24.866667 | 82 | 0.589812 |
e86338a362e94f57b398d9988570a1a0ffb6f083 | 4,156 | ex | Elixir | lib/absinthe/plug/graphiql/assets.ex | autopilothq/absinthe_plug | c7a87f7e1f0ecc88be9563dc7f9d55ea96e5a781 | [
"MIT"
] | null | null | null | lib/absinthe/plug/graphiql/assets.ex | autopilothq/absinthe_plug | c7a87f7e1f0ecc88be9563dc7f9d55ea96e5a781 | [
"MIT"
] | null | null | null | lib/absinthe/plug/graphiql/assets.ex | autopilothq/absinthe_plug | c7a87f7e1f0ecc88be9563dc7f9d55ea96e5a781 | [
"MIT"
] | 1 | 2019-04-23T04:22:52.000Z | 2019-04-23T04:22:52.000Z | defmodule Absinthe.Plug.GraphiQL.Assets do
@moduledoc """
"""
@config Application.get_env(:absinthe_plug, Absinthe.Plug.GraphiQL)
@default_config [
source: :smart,
local_url_path: "/absinthe_graphiql",
local_directory: "priv/static/absinthe_graphiql",
local_source: ":package/:alias",
remote... | 32.217054 | 100 | 0.63282 |
e8633fbfc27ca1cd36c0dcb1fd9a9c63702fa6f7 | 5,377 | ex | Elixir | lib/event_store/storage/appender.ex | davydog187/eventstore | 085602a8cfae7401e6d89472a053fd52f586832f | [
"MIT"
] | 576 | 2017-11-03T14:11:07.000Z | 2022-03-29T06:18:47.000Z | lib/event_store/storage/appender.ex | davydog187/eventstore | 085602a8cfae7401e6d89472a053fd52f586832f | [
"MIT"
] | 129 | 2017-11-08T06:10:20.000Z | 2021-09-15T16:18:14.000Z | lib/event_store/storage/appender.ex | davydog187/eventstore | 085602a8cfae7401e6d89472a053fd52f586832f | [
"MIT"
] | 118 | 2017-11-14T14:10:09.000Z | 2022-03-28T13:13:56.000Z | defmodule EventStore.Storage.Appender do
@moduledoc false
require Logger
alias EventStore.RecordedEvent
alias EventStore.Sql.Statements
@doc """
Append the given list of events to storage.
Events are inserted in batches of 1,000 within a single transaction. This is
due to PostgreSQL's limit of 65,53... | 28.601064 | 100 | 0.639576 |
e8639952372146a8b8008a85f942c73b6c8c51b6 | 3,377 | ex | Elixir | clients/service_directory/lib/google_api/service_directory/v1beta1/model/expr.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/service_directory/lib/google_api/service_directory/v1beta1/model/expr.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/service_directory/lib/google_api/service_directory/v1beta1/model/expr.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... | 37.10989 | 129 | 0.710394 |
e863a510ea76ebdaab1bd0e6e4c6630a61b4bf81 | 5,457 | ex | Elixir | lib/tzdata/data_loader.ex | noizu/tzdata | bc9003ec5d23fe7c5dcdbfe0858b16d1080a7a09 | [
"MIT"
] | null | null | null | lib/tzdata/data_loader.ex | noizu/tzdata | bc9003ec5d23fe7c5dcdbfe0858b16d1080a7a09 | [
"MIT"
] | 1 | 2018-12-30T12:15:35.000Z | 2018-12-30T12:15:35.000Z | lib/tzdata/data_loader.ex | koan-ci/tzdata | bc9003ec5d23fe7c5dcdbfe0858b16d1080a7a09 | [
"MIT"
] | null | null | null | defmodule Tzdata.DataLoader do
require Logger
@compile :nowarn_deprecated_function
# Can poll for newest version of tz data and can download
# and extract it.
@download_url "https://data.iana.org/time-zones/tzdata-latest.tar.gz"
def download_new(url \\ @download_url) do
Logger.debug("Tzdata downloading ... | 29.181818 | 167 | 0.6674 |
e863beb3222efe73b0da650d6158604af63132ff | 10,177 | exs | Elixir | lib/elixir/test/elixir/kernel/raise_test.exs | RyanBard/elixir | 3e0f3b47cf26aa121470141b9a1aa55a366c066e | [
"Apache-2.0"
] | 2 | 2018-11-15T06:38:14.000Z | 2018-11-17T18:03:14.000Z | lib/elixir/test/elixir/kernel/raise_test.exs | RyanBard/elixir | 3e0f3b47cf26aa121470141b9a1aa55a366c066e | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/kernel/raise_test.exs | RyanBard/elixir | 3e0f3b47cf26aa121470141b9a1aa55a366c066e | [
"Apache-2.0"
] | null | null | null | Code.require_file("../test_helper.exs", __DIR__)
defmodule Kernel.RaiseTest do
use ExUnit.Case, async: true
# Silence warnings
defp atom, do: RuntimeError
defp binary, do: "message"
defp opts, do: [message: "message"]
defp struct, do: %RuntimeError{message: "message"}
@trace [{:foo, :bar, 0, []}]
te... | 20.39479 | 97 | 0.535128 |
e86400b0de2c0e25a4e4df65fbcee78580870834 | 167 | exs | Elixir | priv/repo/migrations/20211028122202_grace_period_end.exs | plausible-insights/plausible | 88173342b9e969894879bfb2e8d203426f6a1b1c | [
"MIT"
] | 984 | 2019-09-02T11:36:41.000Z | 2020-06-08T06:25:48.000Z | priv/repo/migrations/20211028122202_grace_period_end.exs | plausible-insights/plausible | 88173342b9e969894879bfb2e8d203426f6a1b1c | [
"MIT"
] | 24 | 2019-09-10T09:53:17.000Z | 2020-06-08T07:35:26.000Z | priv/repo/migrations/20211028122202_grace_period_end.exs | plausible-insights/plausible | 88173342b9e969894879bfb2e8d203426f6a1b1c | [
"MIT"
] | 51 | 2019-09-03T10:48:10.000Z | 2020-06-07T00:23:34.000Z | defmodule Plausible.Repo.Migrations.GracePeriodEnd do
use Ecto.Migration
def change do
alter table(:users) do
add :grace_period, :map
end
end
end
| 16.7 | 53 | 0.712575 |
e8642ccb8241e8c03f793db49290650d9c1d23a5 | 254 | ex | Elixir | testData/org/elixir_lang/parser_definition/at_bracket_operation_parsing_test_case/MatchedQualifiedIdentifier.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 1,668 | 2015-01-03T05:54:27.000Z | 2022-03-25T08:01:20.000Z | testData/org/elixir_lang/parser_definition/at_bracket_operation_parsing_test_case/MatchedQualifiedIdentifier.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 2,018 | 2015-01-01T22:43:39.000Z | 2022-03-31T20:13:08.000Z | testData/org/elixir_lang/parser_definition/at_bracket_operation_parsing_test_case/MatchedQualifiedIdentifier.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 145 | 2015-01-15T11:37:16.000Z | 2021-12-22T05:51:02.000Z | @Module.function[key: value]
@Module.function [key: value]
@Module.function[()]
@Module.function [()]
@Module.function[matched_expression]
@Module.function [matched_expression]
@Module.function[matched_expression,]
@Module.function [matched_expression,]
| 28.222222 | 38 | 0.787402 |
e86438c798bda12e5fb49a29e6422f9551312446 | 2,805 | ex | Elixir | assets/node_modules/phoenix/priv/templates/phx.gen.presence/presence.ex | xiongxin/web_chat | 4123887993083058a358358595c06970a5ac873f | [
"MIT"
] | 8 | 2019-06-02T05:02:36.000Z | 2021-08-11T04:23:10.000Z | assets/node_modules/phoenix/priv/templates/phx.gen.presence/presence.ex | xiongxin/web_chat | 4123887993083058a358358595c06970a5ac873f | [
"MIT"
] | 7 | 2019-05-15T08:32:51.000Z | 2020-06-10T07:46:43.000Z | assets/node_modules/phoenix/priv/templates/phx.gen.presence/presence.ex | xiongxin/web_chat | 4123887993083058a358358595c06970a5ac873f | [
"MIT"
] | 1 | 2019-06-02T05:02:47.000Z | 2019-06-02T05:02:47.000Z | defmodule <%= module %> do
@moduledoc """
Provides presence tracking to channels and processes.
See the [`Phoenix.Presence`](http://hexdocs.pm/phoenix/Phoenix.Presence.html)
docs for more details.
## Usage
Presences can be tracked in your channel after joining:
defmodule <%= base %>.MyChannel do
... | 37.905405 | 79 | 0.662032 |
e86454b96cf2a9d46471137cbf09e87ccca213ed | 2,620 | exs | Elixir | test/acceptance/emphasis_test.exs | RichMorin/earmark | e65fcf67345c84c23d237c732e5c174246662c68 | [
"Apache-1.1"
] | null | null | null | test/acceptance/emphasis_test.exs | RichMorin/earmark | e65fcf67345c84c23d237c732e5c174246662c68 | [
"Apache-1.1"
] | null | null | null | test/acceptance/emphasis_test.exs | RichMorin/earmark | e65fcf67345c84c23d237c732e5c174246662c68 | [
"Apache-1.1"
] | null | null | null | defmodule Acceptance.EmphasisTest do
use ExUnit.Case
import Support.Helpers, only: [as_html: 1, as_html: 2]
# describe "Emphasis" do
test "important" do
markdown = "*foo bar*\n"
html = "<p><em>foo bar</em></p>\n"
messages = []
assert as_html(markdown) == {:ok, html, messages}
... | 24.485981 | 75 | 0.537405 |
e8646f03feabafc8716b0fe7cec6385bd3f34233 | 198 | ex | Elixir | lib/phone/gn.ex | net/phone | 18e1356d2f8d32fe3f95638c3c44bceab0164fb2 | [
"Apache-2.0"
] | null | null | null | lib/phone/gn.ex | net/phone | 18e1356d2f8d32fe3f95638c3c44bceab0164fb2 | [
"Apache-2.0"
] | null | null | null | lib/phone/gn.ex | net/phone | 18e1356d2f8d32fe3f95638c3c44bceab0164fb2 | [
"Apache-2.0"
] | null | null | null | defmodule Phone.GN do
@moduledoc false
use Helper.Country
def regex, do: ~r/^(224)()(.{8})/
def country, do: "Guinea"
def a2, do: "GN"
def a3, do: "GIN"
matcher :regex, ["224"]
end
| 15.230769 | 35 | 0.59596 |
e864a19d957a85e25863b363313a4b3bb77c1822 | 365 | exs | Elixir | test/web/controllers/api/v1/upload_signature_controller_test.exs | palindrom615/firestorm | 0690493c9dcae5c04c63c5321532a7db923e5be7 | [
"MIT"
] | null | null | null | test/web/controllers/api/v1/upload_signature_controller_test.exs | palindrom615/firestorm | 0690493c9dcae5c04c63c5321532a7db923e5be7 | [
"MIT"
] | 4 | 2021-03-01T21:25:42.000Z | 2022-02-10T23:50:11.000Z | test/web/controllers/api/v1/upload_signature_controller_test.exs | palindrom615/firestorm | 0690493c9dcae5c04c63c5321532a7db923e5be7 | [
"MIT"
] | 1 | 2020-03-20T12:58:37.000Z | 2020-03-20T12:58:37.000Z | defmodule FirestormWeb.Web.Api.V1.UploadSignatureControllerTest do
use FirestormWeb.Web.ConnCase
test "POST /", %{conn: conn} do
upload = %{
"filename" => "image.jpg",
"mimetype" => "image/jpeg"
}
conn = post conn, "/api/v1/upload_signature", upload: upload
response = json_response(conn... | 26.071429 | 66 | 0.657534 |
e864be8ba9364ab7be1a1b8b6e2e454900b301ea | 665 | ex | Elixir | lib/dark_matter/deps.ex | dark-elixir/dark_matter | 3f70edf4220ad1c066489110ef30880a143522fd | [
"Apache-2.0"
] | 2 | 2020-12-01T21:33:44.000Z | 2021-05-29T14:51:18.000Z | lib/dark_matter/deps.ex | dark-elixir/dark_matter | 3f70edf4220ad1c066489110ef30880a143522fd | [
"Apache-2.0"
] | null | null | null | lib/dark_matter/deps.ex | dark-elixir/dark_matter | 3f70edf4220ad1c066489110ef30880a143522fd | [
"Apache-2.0"
] | 2 | 2020-09-02T14:36:58.000Z | 2021-04-22T11:20:43.000Z | defmodule DarkMatter.Deps do
@moduledoc """
Utils for working with deps.
"""
@moduledoc since: "1.1.0"
@doc """
Check if a given `dependency` has a version matching the `semversion`.
## Examples
iex> version_match?(:dark_matter, ">= 0.0.0")
true
iex> version_match?(:dark_matter, "<= ... | 25.576923 | 98 | 0.646617 |
e864fd2d3d0b9ce409721187f002f2a1c755ebdf | 1,419 | ex | Elixir | example_json_parse/lib/example_json_parse.ex | cuevacreativa/Domo | 5f2f5ff3cb57dfe774408dcae6ccb5b79d1a3089 | [
"MIT"
] | null | null | null | example_json_parse/lib/example_json_parse.ex | cuevacreativa/Domo | 5f2f5ff3cb57dfe774408dcae6ccb5b79d1a3089 | [
"MIT"
] | null | null | null | example_json_parse/lib/example_json_parse.ex | cuevacreativa/Domo | 5f2f5ff3cb57dfe774408dcae6ccb5b79d1a3089 | [
"MIT"
] | null | null | null | defmodule ExampleJsonParse do
@moduledoc """
Parses JSON and validates data to conform to model types.
"""
alias Core.Product
alias Core.Product.Image
alias JsonReply.ProductCatalog
def parse_valid_file do
parse("product-catalog.json")
end
def parse_invalid_file do
{:error, message} = parse... | 27.288462 | 87 | 0.641297 |
e8650671441b0aacdbc696a228fccbb00912b4e6 | 1,152 | ex | Elixir | clients/service_directory/lib/google_api/service_directory/v1beta1/connection.ex | jechol/elixir-google-api | 0290b683dfc6491ca2ef755a80bc329378738d03 | [
"Apache-2.0"
] | null | null | null | clients/service_directory/lib/google_api/service_directory/v1beta1/connection.ex | jechol/elixir-google-api | 0290b683dfc6491ca2ef755a80bc329378738d03 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/service_directory/lib/google_api/service_directory/v1beta1/connection.ex | jechol/elixir-google-api | 0290b683dfc6491ca2ef755a80bc329378738d03 | [
"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... | 34.909091 | 74 | 0.748264 |
e8650fe92cb62dbdbc44658ba3bb4f5b0ebfe7d3 | 24,176 | ex | Elixir | lib/sweet_xml.ex | gilacost/sweet_xml | cc740334a5e2060a98195b05ef55575fc3718b75 | [
"MIT"
] | null | null | null | lib/sweet_xml.ex | gilacost/sweet_xml | cc740334a5e2060a98195b05ef55575fc3718b75 | [
"MIT"
] | null | null | null | lib/sweet_xml.ex | gilacost/sweet_xml | cc740334a5e2060a98195b05ef55575fc3718b75 | [
"MIT"
] | null | null | null | defmodule SweetXpath do
defmodule Priv do
@moduledoc false
@doc false
def self_val(val), do: val
end
defstruct path: ".",
is_value: true,
is_list: false,
is_keyword: false,
is_optional: false,
cast_to: false,
transform_fun: &Priv... | 30.719187 | 142 | 0.582396 |
e8653bd6d2f41f20b6b72138f8416498ba7ddc5a | 5,857 | exs | Elixir | apps/blockchain/test/blockchain/contract/create_contract_test.exs | atoulme/mana | cff3fd96c23feaaeb9fe32df3c0d35ee6dc548a5 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | apps/blockchain/test/blockchain/contract/create_contract_test.exs | atoulme/mana | cff3fd96c23feaaeb9fe32df3c0d35ee6dc548a5 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | apps/blockchain/test/blockchain/contract/create_contract_test.exs | atoulme/mana | cff3fd96c23feaaeb9fe32df3c0d35ee6dc548a5 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | defmodule Blockchain.Contract.CreateContractTest do
use ExUnit.Case
doctest Blockchain.Contract.CreateContract
alias Blockchain.{Account, Contract}
alias Blockchain.Account.Repo
alias ExthCrypto.Hash.Keccak
alias EVM.{MachineCode, SubState}
alias MerklePatriciaTree.{DB, Trie}
setup do
db = MerkleP... | 29.580808 | 98 | 0.606112 |
e8654700838dd81a19eb6174881cbedd364e611f | 52 | exs | Elixir | config/config.exs | chungwong/timex | bcd2504119f5c11ada7455d19726b5a49254dabf | [
"MIT"
] | null | null | null | config/config.exs | chungwong/timex | bcd2504119f5c11ada7455d19726b5a49254dabf | [
"MIT"
] | null | null | null | config/config.exs | chungwong/timex | bcd2504119f5c11ada7455d19726b5a49254dabf | [
"MIT"
] | null | null | null | use Mix.Config
config :timex, default_locale: "en"
| 13 | 35 | 0.75 |
e8655642781c68c07b5057d6bca309ed8baf03ec | 273 | exs | Elixir | config/test.exs | boqolo/boqolo | ba9a2ebcf379f5056b3836756179b49163f91d72 | [
"BSD-3-Clause"
] | null | null | null | config/test.exs | boqolo/boqolo | ba9a2ebcf379f5056b3836756179b49163f91d72 | [
"BSD-3-Clause"
] | null | null | null | config/test.exs | boqolo/boqolo | ba9a2ebcf379f5056b3836756179b49163f91d72 | [
"BSD-3-Clause"
] | null | null | null | use Mix.Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :rayyan_site, RayyanSiteWeb.Endpoint,
http: [port: 4002],
server: false
# Print only warnings and errors during test
config :logger, level: :warn
| 24.818182 | 56 | 0.74359 |
e8656098b06b52927899547b714c4973176cddde | 400 | exs | Elixir | priv/repo/migrations/20210811165243_create_blogs.exs | ysaito8015/communitex | d469447a62029d59883d95df4df3c9b09e0022e2 | [
"Apache-2.0"
] | 7 | 2021-07-14T15:45:55.000Z | 2022-01-25T11:13:01.000Z | priv/repo/migrations/20210811165243_create_blogs.exs | ysaito8015/communitex | d469447a62029d59883d95df4df3c9b09e0022e2 | [
"Apache-2.0"
] | 10 | 2021-08-09T15:54:05.000Z | 2022-02-17T04:18:38.000Z | priv/repo/migrations/20210811165243_create_blogs.exs | ysaito8015/communitex | d469447a62029d59883d95df4df3c9b09e0022e2 | [
"Apache-2.0"
] | 5 | 2021-07-23T05:54:35.000Z | 2022-01-28T04:14:51.000Z | defmodule Basic.Repo.Migrations.CreateBlogs do
use Ecto.Migration
def change do
create table(:blogs) do
add :post_id, :string
add :user_id, :integer
add :title, :string
add :image, :text
add :tags, :string
add :body, :text
add :likes, :integer
add :views, :intege... | 19.047619 | 46 | 0.6125 |
e86562a89e7a216bb3dc306d5e7294c3cda5a581 | 2,627 | ex | Elixir | lib/coherence_assent/web/controllers/auth_controller.ex | danschultzer/coherence_assent | 538e7e4aba3146c9bf4ac7798fea4b8a0ff099d5 | [
"Unlicense",
"MIT"
] | 22 | 2017-09-15T17:52:31.000Z | 2018-10-07T02:36:27.000Z | lib/coherence_assent/web/controllers/auth_controller.ex | danschultzer/coherence_oauth2 | 538e7e4aba3146c9bf4ac7798fea4b8a0ff099d5 | [
"Unlicense",
"MIT"
] | 15 | 2017-11-01T15:39:37.000Z | 2019-03-11T18:02:04.000Z | lib/coherence_assent/web/controllers/auth_controller.ex | danschultzer/coherence_oauth2 | 538e7e4aba3146c9bf4ac7798fea4b8a0ff099d5 | [
"Unlicense",
"MIT"
] | 9 | 2017-09-18T20:48:06.000Z | 2018-12-05T15:24:24.000Z | defmodule CoherenceAssent.AuthController do
@moduledoc false
use CoherenceWeb, :controller
alias CoherenceAssent.Callback
alias CoherenceAssent.Controller
import Phoenix.Naming, only: [humanize: 1]
plug Coherence.RequireLogin when action in ~w(delete)a
def index(conn, %{"provider" => provider}) do
... | 32.432099 | 116 | 0.62086 |
e865b9c077a8d7f035920f651a60d714cc7e070e | 818 | exs | Elixir | blinky/config/config.exs | rob-brown/ElixirTraining2018 | 9724cc4961d767a1ba2450240e026b46ad5a0f1b | [
"MIT"
] | 2 | 2018-02-01T22:56:09.000Z | 2020-01-20T19:57:48.000Z | blinky/config/config.exs | rob-brown/ElixirTraining2018 | 9724cc4961d767a1ba2450240e026b46ad5a0f1b | [
"MIT"
] | null | null | null | blinky/config/config.exs | rob-brown/ElixirTraining2018 | 9724cc4961d767a1ba2450240e026b46ad5a0f1b | [
"MIT"
] | null | null | null | use Mix.Config
# Use shoehorn to start the main application. See the shoehorn
# docs for separating out critical OTP applications such as those
# involved with firmware updates.
config :shoehorn,
init: [:nerves_runtime, :nerves_network],
app: Mix.Project.config()[:app]
config :nerves_network,
regulatory_domain:... | 29.214286 | 65 | 0.734719 |
e865dffb26c3095fb54f518f2b40aae570f691e7 | 449 | exs | Elixir | throwaway/hello/config/prod.secret.exs | BryanJBryce/programming-phoenix | ced3b5c383ada2575237d377430ef0a2743da0a2 | [
"MIT"
] | null | null | null | throwaway/hello/config/prod.secret.exs | BryanJBryce/programming-phoenix | ced3b5c383ada2575237d377430ef0a2743da0a2 | [
"MIT"
] | null | null | null | throwaway/hello/config/prod.secret.exs | BryanJBryce/programming-phoenix | ced3b5c383ada2575237d377430ef0a2743da0a2 | [
"MIT"
] | null | null | null | use Mix.Config
# In this file, we keep production configuration that
# you likely want to automate and keep it away from
# your version control system.
config :hello, Hello.Endpoint,
secret_key_base: "DRMNKXMxDAafM8SS7JrhU82VOtMTwEVzS/vtQHuku1RAFj/CX/Q3e+0YpHXAaR3B"
# Configure your database
config :hello, Hello.Re... | 28.0625 | 85 | 0.772829 |
e8661f2ef25b0123807bd878564e65b5a6b8cf1c | 1,322 | exs | Elixir | test/event_test.exs | tinfoil/poxa | a1c3501ecf1df9873a5c7018dc7da0abe4556cec | [
"MIT"
] | null | null | null | test/event_test.exs | tinfoil/poxa | a1c3501ecf1df9873a5c7018dc7da0abe4556cec | [
"MIT"
] | null | null | null | test/event_test.exs | tinfoil/poxa | a1c3501ecf1df9873a5c7018dc7da0abe4556cec | [
"MIT"
] | null | null | null | defmodule Poxa.EventTest do
use ExUnit.Case, async: true
import Mimic
alias Poxa.Event
alias Poxa.SocketId
setup :verify_on_exit!
setup do
stub(SocketId)
{ :ok, _ } = GenEvent.start_link(name: Poxa.Event)
:ok
end
defmodule TestHandler do
use GenEvent
def handle_event(%{event: :fa... | 25.921569 | 84 | 0.652799 |
e86622b8b3046eecabeb9a167bfca2ae0b44be26 | 1,646 | ex | Elixir | lib/live_sup_web/live/setup/components/dashboard_component.ex | livesup-dev/livesup | eaf9ffc78d3043bd9e3408f0f4df26ed16eb8446 | [
"Apache-2.0",
"MIT"
] | null | null | null | lib/live_sup_web/live/setup/components/dashboard_component.ex | livesup-dev/livesup | eaf9ffc78d3043bd9e3408f0f4df26ed16eb8446 | [
"Apache-2.0",
"MIT"
] | 3 | 2022-02-23T15:51:48.000Z | 2022-03-14T22:52:43.000Z | lib/live_sup_web/live/setup/components/dashboard_component.ex | livesup-dev/livesup | eaf9ffc78d3043bd9e3408f0f4df26ed16eb8446 | [
"Apache-2.0",
"MIT"
] | null | null | null | defmodule LiveSupWeb.SetupLive.Components.DashboardComponent do
use LiveSupWeb, :live_component
alias LiveSup.Core.Projects
@impl true
def update(%{project: project} = assigns, socket) do
changeset = Projects.change(project)
{:ok,
socket
|> assign(assigns)
|> assign(:changeset, changes... | 24.567164 | 92 | 0.586877 |
e86655788cd800c7b7f51ba3ec0fad7bb647c09d | 2,966 | exs | Elixir | test/ecto/query/builder/join_test.exs | christhekeele/ecto | 8d4a9b4e3230bf98694ed652972bd127ac2f7460 | [
"Apache-2.0"
] | null | null | null | test/ecto/query/builder/join_test.exs | christhekeele/ecto | 8d4a9b4e3230bf98694ed652972bd127ac2f7460 | [
"Apache-2.0"
] | null | null | null | test/ecto/query/builder/join_test.exs | christhekeele/ecto | 8d4a9b4e3230bf98694ed652972bd127ac2f7460 | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.Query.Builder.JoinTest do
use ExUnit.Case, async: true
import Ecto.Query.Builder.Join
doctest Ecto.Query.Builder.Join
import Ecto.Query
defmacro join_macro(left, right) do
quote do
fragment("? <> ?", unquote(left), unquote(right))
end
end
test "expands macros as sources" d... | 32.593407 | 117 | 0.584626 |
e8668a7b7abdef1b1ba8599aec3b9bdd145f8681 | 6,540 | exs | Elixir | spec/narou_query_spec.exs | harukikubota/narou_wrapper | d8b4279ca57760f44bc3da8fbb70e2927a987809 | [
"MIT"
] | null | null | null | spec/narou_query_spec.exs | harukikubota/narou_wrapper | d8b4279ca57760f44bc3da8fbb70e2927a987809 | [
"MIT"
] | 2 | 2021-01-15T17:14:26.000Z | 2021-01-16T12:58:06.000Z | spec/narou_query_spec.exs | harukikubota/narou | d8b4279ca57760f44bc3da8fbb70e2927a987809 | [
"MIT"
] | null | null | null | defmodule NarouQuerySpec do
use ESpec
use Narou.Query
describe "from" do
context "from good_param default" do
subject do: from :novel
it do: is_expected() |> to(have type: :novel)
end
context "from good_param with initialize option" do
subject do: from :novel, limit: 10, st: 10
... | 34.240838 | 120 | 0.556881 |
e866b0ffac65a1d87f841d6bfd4315dd5edc1148 | 2,113 | ex | Elixir | lib/redix_clustered/options.ex | PRX/redix-clustered | 46d5826fdcd877ba9794e083260b5bcc784b8a9e | [
"MIT"
] | null | null | null | lib/redix_clustered/options.ex | PRX/redix-clustered | 46d5826fdcd877ba9794e083260b5bcc784b8a9e | [
"MIT"
] | null | null | null | lib/redix_clustered/options.ex | PRX/redix-clustered | 46d5826fdcd877ba9794e083260b5bcc784b8a9e | [
"MIT"
] | null | null | null | defmodule RedixClustered.Options do
@namespace "namespace"
@pool_size "pool_size"
@default_pool_size 1
@redix_opts "redix_opts"
@redix_keys [:host, :port, :username, :password, :timeout]
@redix_request_opts "redix_request_opts"
@redix_request_key :request_opts
def init(opts) do
cluster_name = clust... | 32.015152 | 95 | 0.679129 |
e866bcb52101f469d8ab3ec18871c86229c6d2a9 | 1,844 | exs | Elixir | clients/o_auth2/mix.exs | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"Apache-2.0"
] | null | null | null | clients/o_auth2/mix.exs | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"Apache-2.0"
] | null | null | null | clients/o_auth2/mix.exs | 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... | 27.522388 | 107 | 0.65564 |
e867163c4a042bbdbdbfea96e907bb31a87ed649 | 353 | ex | Elixir | lib/supabase_surface/components/icons/icon_shopping_cart.ex | treebee/supabase-surface | 5a184ca92323c085dd81e2fc8aa8c10367f2382e | [
"Apache-2.0"
] | 5 | 2021-06-08T08:02:43.000Z | 2022-02-09T23:13:46.000Z | lib/supabase_surface/components/icons/icon_shopping_cart.ex | treebee/supabase-surface | 5a184ca92323c085dd81e2fc8aa8c10367f2382e | [
"Apache-2.0"
] | null | null | null | lib/supabase_surface/components/icons/icon_shopping_cart.ex | treebee/supabase-surface | 5a184ca92323c085dd81e2fc8aa8c10367f2382e | [
"Apache-2.0"
] | 1 | 2021-07-14T05:20:31.000Z | 2021-07-14T05:20:31.000Z | defmodule SupabaseSurface.Components.Icons.IconShoppingCart do
use SupabaseSurface.Components.Icon
@impl true
def render(assigns) do
icon_size = IconContainer.get_size(assigns.size)
~F"""
<IconContainer assigns={assigns}>
{Feathericons.shopping_cart(width: icon_size, height: icon_size)}
</... | 23.533333 | 71 | 0.728045 |
e8671cf0e838760cf2edda3a1932668cc121c277 | 605 | ex | Elixir | lib/exbee/adapters/adapter.ex | msm/exbee | b99b7996c5da9092472371b8bc0bd5e7c2daa3f6 | [
"Apache-2.0"
] | 6 | 2017-06-18T14:29:59.000Z | 2019-07-28T15:47:02.000Z | lib/exbee/adapters/adapter.ex | msm/exbee | b99b7996c5da9092472371b8bc0bd5e7c2daa3f6 | [
"Apache-2.0"
] | 3 | 2018-01-28T22:00:06.000Z | 2019-10-14T11:14:47.000Z | lib/exbee/adapters/adapter.ex | msm/exbee | b99b7996c5da9092472371b8bc0bd5e7c2daa3f6 | [
"Apache-2.0"
] | 4 | 2016-09-22T02:50:34.000Z | 2019-10-14T07:43:38.000Z | defmodule Exbee.Adapter do
@moduledoc """
Interface to a serial connection.
"""
@type adapter_option ::
{:speed, non_neg_integer}
| {:data_bits, 5..8}
| {:stop_bits, 1..2}
| {:parity, :none | :even | :odd | :space | :mark}
| {:flow_control, :none | :hardware | ... | 31.842105 | 71 | 0.565289 |
e8671d33365e6f86a3036d7590dabfa36845fbc5 | 610 | exs | Elixir | http_practice/mix.exs | TheBrockstar/elixir-projects | eb55246dd24c949b7e6d77c9eb5847391dd05175 | [
"MIT"
] | null | null | null | http_practice/mix.exs | TheBrockstar/elixir-projects | eb55246dd24c949b7e6d77c9eb5847391dd05175 | [
"MIT"
] | null | null | null | http_practice/mix.exs | TheBrockstar/elixir-projects | eb55246dd24c949b7e6d77c9eb5847391dd05175 | [
"MIT"
] | null | null | null | defmodule HttpPractice.MixProject do
use Mix.Project
def project do
[
app: :http_practice,
version: "0.1.0",
elixir: "~> 1.8",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
... | 20.333333 | 87 | 0.572131 |
e8672526b63c0aa2b4dcacd4c4166af7f3445c11 | 135 | exs | Elixir | test/parser_test.exs | tera-insights/angularjs-template-migrate | 94ba52781417ed375b7b904fc8ca5481caef4fdb | [
"Apache-2.0"
] | 1 | 2019-07-04T00:39:31.000Z | 2019-07-04T00:39:31.000Z | test/parser_test.exs | tera-insights/angularjs-template-migrate | 94ba52781417ed375b7b904fc8ca5481caef4fdb | [
"Apache-2.0"
] | null | null | null | test/parser_test.exs | tera-insights/angularjs-template-migrate | 94ba52781417ed375b7b904fc8ca5481caef4fdb | [
"Apache-2.0"
] | null | null | null | defmodule ParserTest do
use ExUnit.Case
doctest Parser
test "greets the world" do
assert Parser.hello() == :world
end
end
| 15 | 35 | 0.703704 |
e8674bbc8c30d2c09c395be799646adbf26488ff | 892 | ex | Elixir | clients/bigtable_admin/lib/google_api/bigtable_admin/v2/metadata.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/bigtable_admin/lib/google_api/bigtable_admin/v2/metadata.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/bigtable_admin/lib/google_api/bigtable_admin/v2/metadata.ex | dazuma/elixir-google-api | 6a9897168008efe07a6081d2326735fe332e522c | [
"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.037037 | 74 | 0.761211 |
e86778ae75b131465116432d8201d2a52ea363e8 | 475 | ex | Elixir | lib/temple/parser/temple_namespace_void.ex | mhanberg/dsl | 21e3c7e3a24fabecd436fb09271d90c3e9fb8c30 | [
"MIT"
] | 366 | 2019-07-12T22:43:35.000Z | 2022-03-31T07:26:25.000Z | lib/temple/parser/temple_namespace_void.ex | mhanberg/dsl | 21e3c7e3a24fabecd436fb09271d90c3e9fb8c30 | [
"MIT"
] | 114 | 2019-07-12T19:49:10.000Z | 2022-03-23T10:48:48.000Z | lib/temple/parser/temple_namespace_void.ex | mhanberg/dsl | 21e3c7e3a24fabecd436fb09271d90c3e9fb8c30 | [
"MIT"
] | 17 | 2019-07-23T15:16:34.000Z | 2021-02-25T02:42:02.000Z | defmodule Temple.Parser.TempleNamespaceVoid do
@moduledoc false
@behaviour Temple.Parser
@impl Temple.Parser
def applicable?({{:., _, [{:__aliases__, _, [:Temple]}, name]}, _meta, _args}) do
name in Temple.Parser.void_elements_aliases()
end
def applicable?(_), do: false
@impl Temple.Parser
def ru... | 25 | 83 | 0.671579 |
e8677a3440ebdcfa6e89c657e4cb7ad45e81a684 | 73 | exs | Elixir | exercises/concept/wine-cellar/test/test_helper.exs | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 343 | 2017-06-22T16:28:28.000Z | 2022-03-25T21:33:32.000Z | exercises/concept/wine-cellar/test/test_helper.exs | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 583 | 2017-06-19T10:48:40.000Z | 2022-03-28T21:43:12.000Z | exercises/concept/wine-cellar/test/test_helper.exs | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 228 | 2017-07-05T07:09:32.000Z | 2022-03-27T08:59:08.000Z | ExUnit.start()
ExUnit.configure(exclude: :pending, trace: true, seed: 0)
| 24.333333 | 57 | 0.739726 |
e8678faa9c6fd9bae3e1848e1ef6293340b894ad | 442 | ex | Elixir | broker/lib/broker_web/views/api_view.ex | mikehelmick/broker-prototype | 68082f753d3a7ea29399706504419e495287b35f | [
"Apache-2.0"
] | 1 | 2019-02-04T21:09:16.000Z | 2019-02-04T21:09:16.000Z | broker/lib/broker_web/views/api_view.ex | mikehelmick/broker-prototype | 68082f753d3a7ea29399706504419e495287b35f | [
"Apache-2.0"
] | null | null | null | broker/lib/broker_web/views/api_view.ex | mikehelmick/broker-prototype | 68082f753d3a7ea29399706504419e495287b35f | [
"Apache-2.0"
] | null | null | null | defmodule BrokerWeb.ApiView do
use BrokerWeb, :view
def render("add_type.json", %{type: type}) do
%{type: type}
end
def render("list_types.json", %{types: types}) do
types
end
def render("emit.json", %{event: event}) do
%{id: CloudEvent.id(event)}
end
def render("set_trigger.json", %{tri... | 18.416667 | 60 | 0.649321 |
e867ae3d69de3ad1672f73c9f65ba1acd36c9f8f | 336 | ex | Elixir | lib/supabase_surface/components/icons/icon_bell.ex | treebee/supabase-surface | 5a184ca92323c085dd81e2fc8aa8c10367f2382e | [
"Apache-2.0"
] | 5 | 2021-06-08T08:02:43.000Z | 2022-02-09T23:13:46.000Z | lib/supabase_surface/components/icons/icon_bell.ex | treebee/supabase-surface | 5a184ca92323c085dd81e2fc8aa8c10367f2382e | [
"Apache-2.0"
] | null | null | null | lib/supabase_surface/components/icons/icon_bell.ex | treebee/supabase-surface | 5a184ca92323c085dd81e2fc8aa8c10367f2382e | [
"Apache-2.0"
] | 1 | 2021-07-14T05:20:31.000Z | 2021-07-14T05:20:31.000Z | defmodule SupabaseSurface.Components.Icons.IconBell do
use SupabaseSurface.Components.Icon
@impl true
def render(assigns) do
icon_size = IconContainer.get_size(assigns.size)
~F"""
<IconContainer assigns={assigns}>
{Feathericons.bell(width: icon_size, height: icon_size)}
</IconContainer>
... | 22.4 | 62 | 0.714286 |
e867d316610e461ffcc4b513ec087846990c9ddf | 2,287 | exs | Elixir | microservice/test/controllers/v1/contact_controller_test.exs | eduardobarbiero/microservice-contacts | 330d1855c8b9296e030bfe62cabc3a1c20cef500 | [
"MIT"
] | null | null | null | microservice/test/controllers/v1/contact_controller_test.exs | eduardobarbiero/microservice-contacts | 330d1855c8b9296e030bfe62cabc3a1c20cef500 | [
"MIT"
] | null | null | null | microservice/test/controllers/v1/contact_controller_test.exs | eduardobarbiero/microservice-contacts | 330d1855c8b9296e030bfe62cabc3a1c20cef500 | [
"MIT"
] | null | null | null | defmodule Microservice.V1.ContactControllerTest do
use Microservice.ConnCase
alias Microservice.Contact
@valid_attrs %{email: "some content", fone: "some content", name: "some content"}
@invalid_attrs %{}
setup do
conn = conn() |> put_req_header("accept", "application/json")
{:ok, conn: conn}
end
... | 35.734375 | 98 | 0.675557 |
e867d5e917bfaea99a7e7427a4718c32edc04bc0 | 1,662 | exs | Elixir | mix.exs | aforward/gen_template_library | 6243ad8a0def0128f2a0be0e37e1e17250daed5f | [
"MIT"
] | null | null | null | mix.exs | aforward/gen_template_library | 6243ad8a0def0128f2a0be0e37e1e17250daed5f | [
"MIT"
] | null | null | null | mix.exs | aforward/gen_template_library | 6243ad8a0def0128f2a0be0e37e1e17250daed5f | [
"MIT"
] | null | null | null | defmodule GenTemplateLibrary.Mixfile do
use Mix.Project
@name :gen_template_library
@version "0.1.1"
@deps [
{:mix_templates, ">0.0.0", app: false},
{:version_tasks, "~> 0.11"},
{:ex_doc, ">0.0.0", only: [:dev, :test]}
]
@maintainers ["Andrew Forward <aforward@gmail.com>"]
@github "https://... | 22.459459 | 88 | 0.554152 |
e867de5e2d9361e7d9a91e14789097dc33725182 | 11,396 | ex | Elixir | lib/oli/delivery/paywall.ex | candert1/oli-torus | b7408f7d7c04cc3e9cf537873d98c3a586ec3a66 | [
"MIT"
] | null | null | null | lib/oli/delivery/paywall.ex | candert1/oli-torus | b7408f7d7c04cc3e9cf537873d98c3a586ec3a66 | [
"MIT"
] | null | null | null | lib/oli/delivery/paywall.ex | candert1/oli-torus | b7408f7d7c04cc3e9cf537873d98c3a586ec3a66 | [
"MIT"
] | null | null | null | defmodule Oli.Delivery.Paywall do
import Ecto.Query, warn: false
require Logger
alias Oli.Repo
alias Oli.Accounts.User
alias Oli.Delivery.Paywall.Payment
alias Oli.Delivery.Paywall.Discount
alias Oli.Delivery.Sections.Section
alias Oli.Delivery.Sections
alias Oli.Delivery.Sections.Enrollment
alias... | 29.14578 | 98 | 0.589944 |
e867f453eff750e224765cc58762388616114bde | 1,161 | ex | Elixir | lib/ash_policy_authorizer/check/relating_to_actor.ex | jonathanstiansen/ash_policy_authorizer | d383c63d890c43211c2ac65c8ebb1aeed7fddfa5 | [
"MIT"
] | null | null | null | lib/ash_policy_authorizer/check/relating_to_actor.ex | jonathanstiansen/ash_policy_authorizer | d383c63d890c43211c2ac65c8ebb1aeed7fddfa5 | [
"MIT"
] | null | null | null | lib/ash_policy_authorizer/check/relating_to_actor.ex | jonathanstiansen/ash_policy_authorizer | d383c63d890c43211c2ac65c8ebb1aeed7fddfa5 | [
"MIT"
] | null | null | null | defmodule AshPolicyAuthorizer.Check.RelatingToActor do
@moduledoc false
use AshPolicyAuthorizer.SimpleCheck
@impl true
def describe(opts) do
"relating this.#{opts[:relationship]} to the actor"
end
@impl true
def match?(nil, _, _), do: false
def match?(actor, %{changeset: %Ash.Changeset{} = change... | 28.317073 | 76 | 0.645134 |
e867f9e2fda561617d12816c4bda2007895e5056 | 1,269 | exs | Elixir | config/prod.secret.exs | Dhall777/signinsheet | 703f6f2b0bc4e31888bf7e81939cfd4b05d99cfb | [
"BSD-3-Clause"
] | null | null | null | config/prod.secret.exs | Dhall777/signinsheet | 703f6f2b0bc4e31888bf7e81939cfd4b05d99cfb | [
"BSD-3-Clause"
] | null | null | null | config/prod.secret.exs | Dhall777/signinsheet | 703f6f2b0bc4e31888bf7e81939cfd4b05d99cfb | [
"BSD-3-Clause"
] | null | null | null | # In this file, we load production configuration and secrets
# from environment variables. You can also hardcode secrets,
# although such is generally not recommended and you have to
# remember to add this file to your .gitignore.
use Mix.Config
database_url =
System.get_env("DATABASE_URL") ||
raise """
envi... | 30.214286 | 67 | 0.724192 |
e867fcb3697cf263c46692790e4337c05354b8eb | 828 | exs | Elixir | lib/elixir/test/elixir/bitwise_test.exs | Nicd/elixir | e62ef92a4be1b562033d35b2d822cc9d6c661077 | [
"Apache-2.0"
] | 4 | 2016-04-05T05:51:36.000Z | 2019-10-31T06:46:35.000Z | lib/elixir/test/elixir/bitwise_test.exs | Nicd/elixir | e62ef92a4be1b562033d35b2d822cc9d6c661077 | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/bitwise_test.exs | Nicd/elixir | e62ef92a4be1b562033d35b2d822cc9d6c661077 | [
"Apache-2.0"
] | 5 | 2015-02-01T06:01:19.000Z | 2019-08-29T09:02:35.000Z | Code.require_file "test_helper.exs", __DIR__
defmodule Bitwise.FunctionsTest do
use ExUnit.Case, async: true
use Bitwise, skip_operators: true
test :bnot do
assert bnot(1) == -2
end
test :band do
assert band(1, 1) == 1
end
test :bor do
assert bor(0, 1) == 1
end
test :bxor do
asser... | 13.8 | 44 | 0.582126 |
e868007be6a4fc736271ea80474053a93f0eafda | 3,548 | ex | Elixir | apps/re_integrations/lib/salesforce/job_queue.ex | ruby2elixir/emcasa-backend | 70d7f4f233555417941ffa6ada84cf8740c21dd2 | [
"MIT"
] | 4 | 2019-11-01T16:29:31.000Z | 2020-10-10T21:20:12.000Z | apps/re_integrations/lib/salesforce/job_queue.ex | eduardomartines/emcasa-backend | 70d7f4f233555417941ffa6ada84cf8740c21dd2 | [
"MIT"
] | null | null | null | apps/re_integrations/lib/salesforce/job_queue.ex | eduardomartines/emcasa-backend | 70d7f4f233555417941ffa6ada84cf8740c21dd2 | [
"MIT"
] | 5 | 2019-11-04T21:25:45.000Z | 2020-02-13T23:49:36.000Z | defmodule ReIntegrations.Salesforce.JobQueue do
@moduledoc """
Module for processing jobs related with emcasa/salesforce's api.
"""
use EctoJob.JobQueue, table_name: "salesforce_jobs", schema_prefix: "re_integrations"
require Logger
alias Ecto.Multi
alias ReIntegrations.{
Repo,
Routific,
S... | 29.815126 | 96 | 0.628805 |
e8680bd6d9f2cadc19a4f4f5740c3ff91e3d6154 | 583 | exs | Elixir | test/views/error_view_test.exs | linx-iot/linx_controller | 1a227ebff85180f0781fef7fd0371e2fcb94cfeb | [
"MIT"
] | null | null | null | test/views/error_view_test.exs | linx-iot/linx_controller | 1a227ebff85180f0781fef7fd0371e2fcb94cfeb | [
"MIT"
] | null | null | null | test/views/error_view_test.exs | linx-iot/linx_controller | 1a227ebff85180f0781fef7fd0371e2fcb94cfeb | [
"MIT"
] | null | null | null | defmodule LinxCntrlr.ErrorViewTest do
use LinxCntrlr.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(LinxCntrlr.ErrorView, "404.html", []) ==
"Page not found"
end
test "render 500.... | 26.5 | 68 | 0.684391 |
e8682d4c8172e1833d81e908e1c3fd6cbe5465be | 524 | ex | Elixir | lib/pton/exceptions.ex | casey-chow/pton.co | c794dc6903326dc827f5cbd5c7a8e35868a0fa45 | [
"MIT"
] | null | null | null | lib/pton/exceptions.ex | casey-chow/pton.co | c794dc6903326dc827f5cbd5c7a8e35868a0fa45 | [
"MIT"
] | 4 | 2017-10-18T15:52:20.000Z | 2017-10-19T00:18:38.000Z | lib/pton/exceptions.ex | casey-chow/pton.co | c794dc6903326dc827f5cbd5c7a8e35868a0fa45 | [
"MIT"
] | null | null | null | defmodule Pton.QuotaExceededError do
@moduledoc """
Raised when the user exceeds a given resource quota.
This exception is raised by `Pton.Redirection.create_link/2`.
"""
defexception [:message, plug_status: :too_many_requests]
def exception do
msg = "The current user has exceeded their hard quota for... | 32.75 | 78 | 0.715649 |
e86831cfd4833ca724ff93a5169fa9a4def66a1a | 255 | ex | Elixir | apps/cucumber_expressions/lib/string_reducer.ex | Ajwah/ex_cucumber | f2b9cf06caeef624c66424ae6160f274dc133fc6 | [
"Apache-2.0"
] | 2 | 2021-05-18T18:20:05.000Z | 2022-02-13T00:15:06.000Z | apps/cucumber_expressions/lib/string_reducer.ex | Ajwah/ex_cucumber | f2b9cf06caeef624c66424ae6160f274dc133fc6 | [
"Apache-2.0"
] | 2 | 2021-04-22T00:28:17.000Z | 2021-05-19T21:04:20.000Z | apps/cucumber_expressions/lib/string_reducer.ex | Ajwah/ex_cucumber | f2b9cf06caeef624c66424ae6160f274dc133fc6 | [
"Apache-2.0"
] | 4 | 2021-04-14T03:07:45.000Z | 2021-12-12T21:23:59.000Z | defmodule StringReducer do
def reduce(str, initial_val, fun), do: traverse(str, initial_val, fun)
defp traverse("", acc, _), do: acc
defp traverse(<<char::utf8, rest::binary>>, acc, fun),
do: traverse(rest, fun.(<<char::utf8>>, acc), fun)
end
| 28.333333 | 72 | 0.658824 |
e868dd39558d038a7b27c9e44d9c20fbab94575b | 1,477 | ex | Elixir | lib/bamboo/adapters/test_adapter.ex | tslcjames/bamboo | d10fb1d51737d1b505de5462a2e25988f13744b4 | [
"MIT"
] | null | null | null | lib/bamboo/adapters/test_adapter.ex | tslcjames/bamboo | d10fb1d51737d1b505de5462a2e25988f13744b4 | [
"MIT"
] | null | null | null | lib/bamboo/adapters/test_adapter.ex | tslcjames/bamboo | d10fb1d51737d1b505de5462a2e25988f13744b4 | [
"MIT"
] | 1 | 2018-09-05T09:17:27.000Z | 2018-09-05T09:17:27.000Z | defmodule Bamboo.TestAdapter do
@moduledoc """
Used for testing email delivery
No emails are sent, instead a message is sent to the current process and can
be asserted on with helpers from `Bamboo.Test`.
## Example config
# Typically done in config/test.exs
config :my_app, MyApp.Mailer,
... | 26.375 | 82 | 0.693297 |
e8691d22813bf6941f35d895561794cbdd866a1a | 5,157 | ex | Elixir | deps/earmark/lib/earmark/scanner.ex | alex-philippov/jwt-google-tokens | 18aa3eccc9a2c1a6016b2fe53b0bc6b1612a04b7 | [
"Apache-2.0"
] | null | null | null | deps/earmark/lib/earmark/scanner.ex | alex-philippov/jwt-google-tokens | 18aa3eccc9a2c1a6016b2fe53b0bc6b1612a04b7 | [
"Apache-2.0"
] | null | null | null | deps/earmark/lib/earmark/scanner.ex | alex-philippov/jwt-google-tokens | 18aa3eccc9a2c1a6016b2fe53b0bc6b1612a04b7 | [
"Apache-2.0"
] | 1 | 2019-11-23T12:09:14.000Z | 2019-11-23T12:09:14.000Z | defmodule Earmark.Scanner do
import Earmark.Helpers.StringHelpers, only: [behead: 2]
@backtix_rgx ~r/\A(`+)(.*)/
@blockquote_rgx ~r/\A>(?!\S)/
@code_fence_rgx ~r/\A(\s*)~~~/
@headline_rgx ~r/\A(\#{1,6})(\s+)(.*)/
@id_close_rgx ~r/\[(.*?)\](?!:)/
@id_open_rgx ~r/\A(\s{0,3})\[(.*?)\]:\s+(.*)\z/
... | 33.487013 | 199 | 0.586387 |
e8691ee4c058a64fa749aa4782607595e9ea9f22 | 4,273 | ex | Elixir | clients/slides/lib/google_api/slides/v1/model/page.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/slides/lib/google_api/slides/v1/model/page.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/slides/lib/google_api/slides/v1/model/page.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... | 50.869048 | 161 | 0.717061 |
e86939f5fa2e983a075f37c5b09e540fdb55d273 | 1,308 | exs | Elixir | inventory_management_system/inventory_management_system.exs | ChrisWilding/advent-of-code-2018 | 144a60875c66eb79f4c57aff50bdaf1d236d2656 | [
"Apache-2.0"
] | 1 | 2019-05-14T04:43:23.000Z | 2019-05-14T04:43:23.000Z | inventory_management_system/inventory_management_system.exs | ChrisWilding/advent-of-code-2018 | 144a60875c66eb79f4c57aff50bdaf1d236d2656 | [
"Apache-2.0"
] | null | null | null | inventory_management_system/inventory_management_system.exs | ChrisWilding/advent-of-code-2018 | 144a60875c66eb79f4c57aff50bdaf1d236d2656 | [
"Apache-2.0"
] | null | null | null | defmodule InventoryManagementSystem do
def run("1", file) do
{two, three} =
file
|> String.split()
|> Enum.map(&InventoryManagementSystem.count/1)
|> Enum.reduce({0, 0}, fn list, acc ->
Enum.reduce(list, acc, fn n, {two, three} ->
cond do
n == 2 -> {two + 1, t... | 25.647059 | 84 | 0.535933 |
e8695702d6db303971a1ce02624ff362e31fdea4 | 17,637 | ex | Elixir | clients/slides/lib/google_api/slides/v1/api/presentations.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/slides/lib/google_api/slides/v1/api/presentations.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/slides/lib/google_api/slides/v1/api/presentations.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... | 44.537879 | 196 | 0.632817 |
e8695938801415869444044c882b22254333e0bb | 1,460 | exs | Elixir | bracket-push/bracket_push_test.exs | ravanscafi/exercism-elixir | 0f5c8c923166a0a795c323c7e2d6ccc9da572fcf | [
"MIT"
] | null | null | null | bracket-push/bracket_push_test.exs | ravanscafi/exercism-elixir | 0f5c8c923166a0a795c323c7e2d6ccc9da572fcf | [
"MIT"
] | null | null | null | bracket-push/bracket_push_test.exs | ravanscafi/exercism-elixir | 0f5c8c923166a0a795c323c7e2d6ccc9da572fcf | [
"MIT"
] | null | null | null | if !System.get_env("EXERCISM_TEST_EXAMPLES") do
Code.load_file("bracket_push.exs", __DIR__)
end
ExUnit.start()
# ExUnit.configure exclude: :pending, trace: true
defmodule BracketPushTest do
use ExUnit.Case
# @tag :pending
test "empty string" do
assert BracketPush.check_brackets("")
end
# @tag :pendi... | 22.121212 | 61 | 0.681507 |
e8695fe1963a9c8352b7ce9c9fffb9a50d7ccf21 | 429 | exs | Elixir | apps/quickstart_web/test/quickstart_web/views/error_view_test.exs | jdcumpson/elixir-phoenix-ssr-redux-postgres | 20ecf8bac1322be273ed6441bb586b8574998286 | [
"MIT"
] | 1 | 2020-11-04T04:32:56.000Z | 2020-11-04T04:32:56.000Z | apps/quickstart_web/test/quickstart_web/views/error_view_test.exs | jdcumpson/elixir-phoenix-ssr-redux-postgres | 20ecf8bac1322be273ed6441bb586b8574998286 | [
"MIT"
] | 4 | 2021-10-06T22:46:17.000Z | 2022-02-27T12:04:59.000Z | apps/quickstart_web/test/quickstart_web/views/error_view_test.exs | jdcumpson/elixir-phoenix-ssr-redux-postgres | 20ecf8bac1322be273ed6441bb586b8574998286 | [
"MIT"
] | null | null | null | defmodule QuickstartWeb.ErrorViewTest do
use QuickstartWeb.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(QuickstartWeb.ErrorView, "404.html", []) == "Not Found"
end
test "renders 500.html" ... | 28.6 | 95 | 0.741259 |
e8697bf8b9b7b0d5bb5582c4c8d675f8409a98fd | 417 | exs | Elixir | priv/repo/migrations/20180903223853_create_inquries.exs | zephraph/readtome | 64a5f773bdc3c19d9c5ac50a04aa14e446e36c55 | [
"MIT"
] | 1 | 2021-09-05T20:54:57.000Z | 2021-09-05T20:54:57.000Z | priv/repo/migrations/20180903223853_create_inquries.exs | zephraph/readtome | 64a5f773bdc3c19d9c5ac50a04aa14e446e36c55 | [
"MIT"
] | 17 | 2019-07-06T17:31:56.000Z | 2021-06-22T15:31:06.000Z | priv/repo/migrations/20180903223853_create_inquries.exs | zephraph/readtome | 64a5f773bdc3c19d9c5ac50a04aa14e446e36c55 | [
"MIT"
] | 1 | 2021-03-15T20:50:27.000Z | 2021-03-15T20:50:27.000Z | defmodule Readtome.Repo.Migrations.Createinquiries do
use Ecto.Migration
def change do
create table(:inquiries) do
add :type, :string
add :user_id, references(:users, on_delete: :nothing)
add :book_instance_id, references(:book_instances, on_delete: :nothing)
timestamps()
end
... | 24.529412 | 77 | 0.70024 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.