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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
085a868c005eed1c549985f42dc2ef1a62c789c1 | 4,386 | ex | Elixir | lib/membrane/log/logger.ex | eboskma/membrane_core | e216994fe1ba99c5d228a4b0959faa5fabb13b1c | [
"Apache-2.0"
] | null | null | null | lib/membrane/log/logger.ex | eboskma/membrane_core | e216994fe1ba99c5d228a4b0959faa5fabb13b1c | [
"Apache-2.0"
] | null | null | null | lib/membrane/log/logger.ex | eboskma/membrane_core | e216994fe1ba99c5d228a4b0959faa5fabb13b1c | [
"Apache-2.0"
] | null | null | null | defmodule Membrane.Log.Logger do
@moduledoc deprecated: "Use Elixir `Logger` instead"
@moduledoc """
Module containing functions spawning, shutting down, and handling messages
sent to logger.
"""
use GenServer
alias Membrane.Log.Logger.State
# Type that defines possible return values of start/start_l... | 32.25 | 97 | 0.702234 |
085a8d1dbe9f3001126cb7ec4ee2d3a0d3d22bf9 | 2,523 | exs | Elixir | config/dev.exs | helium/roaming-console | 0157d0f1666f50259d2887ed23f6bc5138ce67b6 | [
"Apache-2.0"
] | null | null | null | config/dev.exs | helium/roaming-console | 0157d0f1666f50259d2887ed23f6bc5138ce67b6 | [
"Apache-2.0"
] | 14 | 2022-03-02T17:01:59.000Z | 2022-03-30T17:45:47.000Z | config/dev.exs | helium/roaming-console | 0157d0f1666f50259d2887ed23f6bc5138ce67b6 | [
"Apache-2.0"
] | null | null | null | use Mix.Config
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with brunch.io to recompile .js and .css sources.
config :console, ConsoleWeb.Endpoint,
http: [port: 40... | 28.348315 | 170 | 0.720174 |
085ae00bb3efa1f69552783e227e56cf793e868c | 2,427 | ex | Elixir | lib/harness/tree.ex | kianmeng/harness | b68ab97f86a09ebf847bb950068dd9c52a5288bd | [
"Apache-2.0"
] | 2 | 2020-10-30T13:59:02.000Z | 2021-05-03T16:34:01.000Z | lib/harness/tree.ex | kianmeng/harness | b68ab97f86a09ebf847bb950068dd9c52a5288bd | [
"Apache-2.0"
] | 9 | 2020-09-22T14:51:52.000Z | 2021-11-26T15:03:40.000Z | lib/harness/tree.ex | kianmeng/harness | b68ab97f86a09ebf847bb950068dd9c52a5288bd | [
"Apache-2.0"
] | 1 | 2020-10-06T13:11:02.000Z | 2020-10-06T13:11:02.000Z | # credo:disable-for-this-file Credo.Check.Consistency.ParameterPatternMatching
defmodule Harness.Tree do
@moduledoc """
Renders things as a tree
See the original implementation in Mix
[here](https://github.com/elixir-lang/elixir/blob/v1.10/lib/mix/lib/mix/utils.ex).
The original implementation has an optimi... | 27.269663 | 84 | 0.601154 |
085b215705c285f88218026c84be4c79199930ef | 2,206 | exs | Elixir | priv/templates/phx.gen.auth/registration_controller_test.exs | faheempatel/phoenix | a83318f2a2284b7ab29b0b86cdd9d2e1f4d0a7c9 | [
"MIT"
] | 18,092 | 2015-01-01T01:51:04.000Z | 2022-03-31T19:37:14.000Z | priv/templates/phx.gen.auth/registration_controller_test.exs | faheempatel/phoenix | a83318f2a2284b7ab29b0b86cdd9d2e1f4d0a7c9 | [
"MIT"
] | 3,905 | 2015-01-01T00:22:47.000Z | 2022-03-31T17:06:21.000Z | priv/templates/phx.gen.auth/registration_controller_test.exs | faheempatel/phoenix | a83318f2a2284b7ab29b0b86cdd9d2e1f4d0a7c9 | [
"MIT"
] | 3,205 | 2015-01-03T10:58:22.000Z | 2022-03-30T14:55:57.000Z | defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web_namespace, schema.alias) %>RegistrationControllerTest do
use <%= inspect context.web_module %>.ConnCase<%= test_case_options %>
import <%= inspect context.module %>Fixtures
describe "GET <%= web_path_prefix %>/<%= schema.plural %>/... | 40.109091 | 156 | 0.62602 |
085b34154ad9e9e0b7dd6b8917f6523dfdc4c74c | 1,235 | ex | Elixir | release/src-rt-6.x.4708/router/apcupsd/platforms/debian/examples/emacsen-install.ex | afeng11/tomato-arm | 1ca18a88480b34fd495e683d849f46c2d47bb572 | [
"FSFAP"
] | 278 | 2015-11-03T03:01:20.000Z | 2022-01-20T18:21:05.000Z | release/src-rt-6.x.4708/router/apcupsd/platforms/debian/examples/emacsen-install.ex | afeng11/tomato-arm | 1ca18a88480b34fd495e683d849f46c2d47bb572 | [
"FSFAP"
] | 374 | 2015-11-03T12:37:22.000Z | 2021-12-17T14:18:08.000Z | release/src-rt-6.x.4708/router/apcupsd/platforms/debian/examples/emacsen-install.ex | afeng11/tomato-arm | 1ca18a88480b34fd495e683d849f46c2d47bb572 | [
"FSFAP"
] | 96 | 2015-11-22T07:47:26.000Z | 2022-01-20T19:52:19.000Z | #! /bin/sh -e
# /usr/lib/emacsen-common/packages/install/apcupsd
# Written by Jim Van Zandt <jrv@vanzandt.mv.com>, borrowing heavily
# from the install scripts for gettext by Santiago Vila
# <sanvila@ctv.es> and octave by Dirk Eddelbuettel <edd@debian.org>.
FLAVOR=$1
PACKAGE=apcupsd
if [ ${FLAVOR} = emacs ]; then ex... | 26.847826 | 96 | 0.68664 |
085b640f8a596c3587359aae0a98cc8a8ddfca31 | 467 | exs | Elixir | example/priv/repo/migrations/20160715134921_add_versions.exs | rschef/paper_trail | 6ab8b29ee97b46222cc48d376daea70fc5cb8105 | [
"MIT"
] | 484 | 2016-06-19T19:33:31.000Z | 2022-03-30T00:04:06.000Z | example/priv/repo/migrations/20160715134921_add_versions.exs | rschef/paper_trail | 6ab8b29ee97b46222cc48d376daea70fc5cb8105 | [
"MIT"
] | 125 | 2016-12-13T14:28:45.000Z | 2022-03-01T00:07:06.000Z | example/priv/repo/migrations/20160715134921_add_versions.exs | rschef/paper_trail | 6ab8b29ee97b46222cc48d376daea70fc5cb8105 | [
"MIT"
] | 80 | 2016-09-09T02:12:41.000Z | 2022-03-29T20:51:12.000Z | defmodule Repo.Migrations.AddVersions do
use Ecto.Migration
def change do
create table(:versions) do
add :event, :string
add :item_type, :string
add :item_id, :integer
add :item_changes, :map
add :origin, :string
add :originator_id, references(:people)
... | 23.35 | 51 | 0.608137 |
085b6abdfbadaf86a34da5da34c6c5c891d8df2d | 1,673 | exs | Elixir | test/teiserver/coordinator/setup_test.exs | badosu/teiserver | 19b623aeb7c2ab28756405f7486e92b714777c54 | [
"MIT"
] | 4 | 2021-07-29T16:23:20.000Z | 2022-02-23T05:34:36.000Z | test/teiserver/coordinator/setup_test.exs | Jazcash/teiserver | fec14784901cb2965d8c1350fe84107c57451877 | [
"MIT"
] | 14 | 2021-08-01T02:36:14.000Z | 2022-01-30T21:15:03.000Z | test/teiserver/coordinator/setup_test.exs | Jazcash/teiserver | fec14784901cb2965d8c1350fe84107c57451877 | [
"MIT"
] | 7 | 2021-05-13T12:55:28.000Z | 2022-01-14T06:39:06.000Z | defmodule Teiserver.Protocols.Coordinator.SetupTest do
use Central.ServerCase, async: false
alias Teiserver.{Client}
alias Teiserver.Account.UserCache
alias Teiserver.TeiserverTestLib
alias Teiserver.Battle.Lobby
alias Teiserver.Common.PubsubListener
import Teiserver.TeiserverTestLib,
only: [tachyon_... | 30.981481 | 113 | 0.687986 |
085b6ae85cbc793e4ccc310272fd303ef1465385 | 908 | ex | Elixir | lib/web/views/error_view.ex | smartlogic/Challenge_gov | b4203d1fcfb742dd17ecfadb9e9c56ad836d4254 | [
"CC0-1.0"
] | 9 | 2020-02-26T20:24:38.000Z | 2022-03-22T21:14:52.000Z | lib/web/views/error_view.ex | smartlogic/Challenge_gov | b4203d1fcfb742dd17ecfadb9e9c56ad836d4254 | [
"CC0-1.0"
] | 15 | 2020-04-22T19:33:24.000Z | 2022-03-26T15:11:17.000Z | lib/web/views/error_view.ex | smartlogic/Challenge_gov | b4203d1fcfb742dd17ecfadb9e9c56ad836d4254 | [
"CC0-1.0"
] | 4 | 2020-04-27T22:58:57.000Z | 2022-01-14T13:42:09.000Z | defmodule Web.ErrorView do
use Web, :view
def render("errors.json", %{changeset: changeset}) do
errors =
Enum.reduce(changeset.errors, %{}, fn {field, error}, errors ->
error = translate_error(error)
field_errors = Map.get(errors, field, [])
Map.put(errors, field, [error | field_e... | 28.375 | 69 | 0.680617 |
085b74aca4689aa18869039001f6750af1d7a265 | 545 | exs | Elixir | chapter_5/process_bottleneck.exs | librity/elixir_in_action | d2df441ceb7e6a0d3f18bc3ab3c59570125fcdec | [
"MIT"
] | 3 | 2021-04-22T11:55:58.000Z | 2021-08-22T13:19:56.000Z | chapter_5/process_bottleneck.exs | librity/elixir_in_action | d2df441ceb7e6a0d3f18bc3ab3c59570125fcdec | [
"MIT"
] | null | null | null | chapter_5/process_bottleneck.exs | librity/elixir_in_action | d2df441ceb7e6a0d3f18bc3ab3c59570125fcdec | [
"MIT"
] | 3 | 2021-04-22T21:19:45.000Z | 2021-08-22T13:20:03.000Z | defmodule Server do
def start, do: spawn(&loop/0)
def send_msg(server, message) do
send(server, {self(), message})
receive do
{:response, response} -> response
end
end
defp loop do
receive do
{caller, msg} ->
Process.sleep(1000)
send(caller, {:response, msg})
e... | 15.571429 | 40 | 0.561468 |
085b9baf6b1be81aba51b04556276d38e9cd7256 | 425 | exs | Elixir | test/modules/definition_named.exs | kianmeng/unsafe | 76951b0b9e4f8b82e32fbb5a91e67de8963898e8 | [
"MIT"
] | 11 | 2017-11-09T05:58:25.000Z | 2020-01-23T02:12:27.000Z | test/modules/definition_named.exs | kianmeng/unsafe | 76951b0b9e4f8b82e32fbb5a91e67de8963898e8 | [
"MIT"
] | 3 | 2017-11-09T09:23:41.000Z | 2018-07-30T16:21:48.000Z | test/modules/definition_named.exs | kianmeng/unsafe | 76951b0b9e4f8b82e32fbb5a91e67de8963898e8 | [
"MIT"
] | 2 | 2018-07-30T02:59:14.000Z | 2021-11-27T13:05:58.000Z | defmodule UnsafeTest.DefinitionNamed do
use Unsafe.Generator
@unsafe { :test, [ :bool ], :private_handler }
@unsafe { :test, [ :bool, :opts ], :private_handler }
def test(bool, opts \\ [])
def test(true, _opts),
do: { :ok, true }
def test(false, _opts),
do: { :error, false }
defp private_handle... | 23.611111 | 55 | 0.625882 |
085bcc7bedb537ec98ddbb5667de447f244187f1 | 3,184 | ex | Elixir | lib/securex_permissions.ex | wasitanbits/secruex | 5ae45935612e965fd0db682e510bf3d4dc14565e | [
"Apache-2.0"
] | 3 | 2022-03-05T13:46:23.000Z | 2022-03-07T13:15:29.000Z | lib/securex_permissions.ex | DevWasi/secruex | 5ae45935612e965fd0db682e510bf3d4dc14565e | [
"Apache-2.0"
] | null | null | null | lib/securex_permissions.ex | DevWasi/secruex | 5ae45935612e965fd0db682e510bf3d4dc14565e | [
"Apache-2.0"
] | null | null | null | defmodule SecureX.Permissions do
alias SecureXWeb.{PermissionController}
@moduledoc """
Contains CRUD For Permissions.
"""
@doc """
Get list of Permissions by User Roles.
List/1 is without pagination,
List/2 & List/3 is with pagination.
## Examples
iex> list([], 1)
{:error, :bad_in... | 27.213675 | 100 | 0.556219 |
085be1f3f8a94f353b39628b922ed4eda69a94e3 | 132 | exs | Elixir | learn/test/learn_test.exs | Electrux/Elixir-Code | d0e2cf0c3caa7269f6438a378b750ced7531e0f4 | [
"BSD-3-Clause"
] | null | null | null | learn/test/learn_test.exs | Electrux/Elixir-Code | d0e2cf0c3caa7269f6438a378b750ced7531e0f4 | [
"BSD-3-Clause"
] | null | null | null | learn/test/learn_test.exs | Electrux/Elixir-Code | d0e2cf0c3caa7269f6438a378b750ced7531e0f4 | [
"BSD-3-Clause"
] | null | null | null | defmodule LearnTest do
use ExUnit.Case
doctest Learn
test "greets the world" do
assert Learn.hello() == :world
end
end
| 14.666667 | 34 | 0.69697 |
085c3a2c3ecfa6f54c6bdc73dbb1b5b52c2a0a17 | 247 | exs | Elixir | config/test.exs | exit9/jwt-google-tokens | 8e2d97fde486dc43687d92e91b6951515fef133b | [
"Apache-2.0"
] | null | null | null | config/test.exs | exit9/jwt-google-tokens | 8e2d97fde486dc43687d92e91b6951515fef133b | [
"Apache-2.0"
] | null | null | null | config/test.exs | exit9/jwt-google-tokens | 8e2d97fde486dc43687d92e91b6951515fef133b | [
"Apache-2.0"
] | 1 | 2019-11-23T12:09:14.000Z | 2019-11-23T12:09:14.000Z | use Mix.Config
config :logger, level: :debug
config :jwt, :googlecerts, Jwt.GoogleCerts.PublicKey.Mock
config :jwt, :firebasecerts, Jwt.FirebaseCerts.PublicKey.Mock
config :jwt, :timeutils, Jwt.TimeUtils.Mock
config :jwt, :check_signature, true
| 27.444444 | 61 | 0.785425 |
085c4726100db89f8ca30c72555c8c80e5704b78 | 829 | exs | Elixir | mix.exs | kipcole9/tempo | 817714acd6baf38be3a8a997ef1d205206d79adc | [
"Apache-2.0"
] | 16 | 2021-01-03T12:53:52.000Z | 2021-08-25T03:47:14.000Z | mix.exs | kipcole9/tempo | 817714acd6baf38be3a8a997ef1d205206d79adc | [
"Apache-2.0"
] | 3 | 2021-01-10T09:32:22.000Z | 2021-07-19T12:16:17.000Z | mix.exs | kipcole9/tempo | 817714acd6baf38be3a8a997ef1d205206d79adc | [
"Apache-2.0"
] | 1 | 2021-01-10T09:01:11.000Z | 2021-01-10T09:01:11.000Z | defmodule Tempo.MixProject do
use Mix.Project
def project do
[
app: :tempo,
version: "0.1.0",
elixir: "~> 1.11",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications... | 23.027778 | 71 | 0.576598 |
085c5bc3f9fdbd0c5eff7744ac3144278f407a9f | 13,489 | ex | Elixir | lib/militerm/systems/mixins.ex | jgsmith/militerm | c4252d0a93f5620b90750ac2b61baf282e9ef7eb | [
"Apache-2.0"
] | 6 | 2017-06-16T10:26:35.000Z | 2021-04-07T15:01:00.000Z | lib/militerm/systems/mixins.ex | jgsmith/militerm | c4252d0a93f5620b90750ac2b61baf282e9ef7eb | [
"Apache-2.0"
] | 2 | 2020-04-14T02:17:46.000Z | 2021-03-10T11:09:05.000Z | lib/militerm/systems/mixins.ex | jgsmith/militerm | c4252d0a93f5620b90750ac2b61baf282e9ef7eb | [
"Apache-2.0"
] | null | null | null | defmodule Militerm.Systems.Mixins do
@moduledoc """
The Mixins system manages running code defined in a mixin and inspecting aspects
of the mixin.
"""
alias Militerm.Services.Mixins, as: MixinService
alias Militerm.Systems.Mixins
require Logger
def introspect(this_mixin) do
data = MixinService.ge... | 23.541012 | 97 | 0.54689 |
085ca33b4d3962209a6a4299a2373f7504589db2 | 9,470 | ex | Elixir | lib/astarte_flow/flows/flow.ex | matt-mazzucato/astarte_flow | e8644b5a27edf325977f5bced9a919f20e289ee2 | [
"Apache-2.0"
] | null | null | null | lib/astarte_flow/flows/flow.ex | matt-mazzucato/astarte_flow | e8644b5a27edf325977f5bced9a919f20e289ee2 | [
"Apache-2.0"
] | null | null | null | lib/astarte_flow/flows/flow.ex | matt-mazzucato/astarte_flow | e8644b5a27edf325977f5bced9a919f20e289ee2 | [
"Apache-2.0"
] | null | null | null | #
# This file is part of Astarte.
#
# Copyright 2020 Ispirata 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 appl... | 28.184524 | 101 | 0.632313 |
085cab7a0dfa6fcedc37cc770afeedb73236a9b4 | 4,182 | ex | Elixir | clients/big_query/lib/google_api/big_query/v2/model/training_run.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/big_query/lib/google_api/big_query/v2/model/training_run.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/big_query/lib/google_api/big_query/v2/model/training_run.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 55.026316 | 249 | 0.732903 |
085cbf4b1be3a99934e2aea5bf3fcc4066734d10 | 2,534 | exs | Elixir | apps/core/test/pubsub/fanout/accounts_test.exs | michaeljguarino/forge | 50ee583ecb4aad5dee4ef08fce29a8eaed1a0824 | [
"Apache-2.0"
] | null | null | null | apps/core/test/pubsub/fanout/accounts_test.exs | michaeljguarino/forge | 50ee583ecb4aad5dee4ef08fce29a8eaed1a0824 | [
"Apache-2.0"
] | 2 | 2019-12-13T23:55:50.000Z | 2019-12-17T05:49:58.000Z | apps/core/test/pubsub/fanout/accounts_test.exs | michaeljguarino/chartmart | a34c949cc29d6a1ab91c04c5e4f797e6f0daabfc | [
"Apache-2.0"
] | null | null | null | defmodule Core.PubSub.Fanout.AccountsTest do
use Core.SchemaCase, async: true
alias Core.Services.Accounts
alias Core.PubSub
describe "ZoomMeetingCreated" do
test "it can post a message about the meeting" do
incident = insert(:incident)
event = %PubSub.ZoomMeetingCreated{
item: %{join_... | 31.675 | 85 | 0.651539 |
085cdc0637bfc173882f4f6650df96232c017310 | 1,587 | ex | Elixir | lib/pixel_font/table_source/gsub/reverse_chaining_context1.ex | Dalgona/pixel_font | 6a65bf85e5228296eb29fddbfdd690565767ff76 | [
"MIT"
] | 17 | 2020-09-14T15:25:38.000Z | 2022-03-05T17:14:24.000Z | lib/pixel_font/table_source/gsub/reverse_chaining_context1.ex | Dalgona/pixel_font | 6a65bf85e5228296eb29fddbfdd690565767ff76 | [
"MIT"
] | 1 | 2021-08-19T05:05:37.000Z | 2021-08-19T05:05:37.000Z | lib/pixel_font/table_source/gsub/reverse_chaining_context1.ex | Dalgona/pixel_font | 6a65bf85e5228296eb29fddbfdd690565767ff76 | [
"MIT"
] | null | null | null | defmodule PixelFont.TableSource.GSUB.ReverseChainingContext1 do
alias PixelFont.Glyph
alias PixelFont.TableSource.OTFLayout.GlyphCoverage
defstruct backtrack: [],
lookahead: [],
substitutions: []
@type t :: %__MODULE__{
backtrack: [GlyphCoverage.t()],
lookahead: [Gl... | 29.943396 | 96 | 0.611216 |
085cf68849be21dbe4ad1692ee63fe03a596f942 | 1,760 | ex | Elixir | lib/sobelow/config/https.ex | OldhamMade/sobelow | b0196d2655c2fdf744d5797d17e152f36d453d72 | [
"Apache-2.0"
] | null | null | null | lib/sobelow/config/https.ex | OldhamMade/sobelow | b0196d2655c2fdf744d5797d17e152f36d453d72 | [
"Apache-2.0"
] | null | null | null | lib/sobelow/config/https.ex | OldhamMade/sobelow | b0196d2655c2fdf744d5797d17e152f36d453d72 | [
"Apache-2.0"
] | null | null | null | defmodule Sobelow.Config.HTTPS do
@moduledoc """
# HTTPS
Without HTTPS, attackers in a priveleged network position can
intercept and modify traffic.
Sobelow detects missing HTTPS by checking the prod
configuration.
HTTPS checks can be ignored with the following command:
$ mix sobelow -i Config.H... | 22 | 76 | 0.631818 |
085d33b0adf9cc1211761feafd57f69bf0f0b25a | 937 | ex | Elixir | web/controllers/session_controller.ex | NorifumiKawamoto/ginjyo | 8e28438db4675bb55ba090614c6834190adb61b1 | [
"MIT"
] | null | null | null | web/controllers/session_controller.ex | NorifumiKawamoto/ginjyo | 8e28438db4675bb55ba090614c6834190adb61b1 | [
"MIT"
] | null | null | null | web/controllers/session_controller.ex | NorifumiKawamoto/ginjyo | 8e28438db4675bb55ba090614c6834190adb61b1 | [
"MIT"
] | null | null | null | defmodule Ginjyo.SessionController do
use Ginjyo.Web, :controller
alias Plug.Conn
alias Ginjyo.Session
alias Ginjyo.Repo
require Logger
def new(conn, _params) do
render conn, "new.html"
end
def create(conn, %{"session" => session_params}) do
case Session.login(session_params, Repo) do
{:... | 25.324324 | 64 | 0.611526 |
085d559275a5e9bf8c74cd11f358f316db4206af | 145,012 | ex | Elixir | lib/elixir/lib/kernel.ex | tmikeschu/elixir | ae108c110af3220cd4f729ac25edb06f0f81c884 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/kernel.ex | tmikeschu/elixir | ae108c110af3220cd4f729ac25edb06f0f81c884 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/kernel.ex | tmikeschu/elixir | ae108c110af3220cd4f729ac25edb06f0f81c884 | [
"Apache-2.0"
] | null | null | null | # Use elixir_bootstrap module to be able to bootstrap Kernel.
# The bootstrap module provides simpler implementations of the
# functions removed, simple enough to bootstrap.
import Kernel,
except: [@: 1, defmodule: 2, def: 1, def: 2, defp: 2, defmacro: 1, defmacro: 2, defmacrop: 2]
import :elixir_bootstrap
defmodul... | 26.864024 | 98 | 0.635899 |
085dd03097e275428d68e724bbc263e3bcf445a7 | 1,806 | ex | Elixir | clients/games_management/lib/google_api/games_management/v1management/model/profile_settings.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/games_management/lib/google_api/games_management/v1management/model/profile_settings.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/games_management/lib/google_api/games_management/v1management/model/profile_settings.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... | 35.411765 | 154 | 0.751384 |
085dfaf772fbac2bbb7b20283ec519f3273256a6 | 1,797 | ex | Elixir | clients/dataproc/lib/google_api/dataproc/v1/model/managed_group_config.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/dataproc/lib/google_api/dataproc/v1/model/managed_group_config.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/dataproc/lib/google_api/dataproc/v1/model/managed_group_config.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... | 35.235294 | 141 | 0.752922 |
085e1754eaf9b3eca65ceae6cd18f29c5f5dcbe2 | 161 | exs | Elixir | demos/phoenix/config/config.exs | bucha/site_encrypt | b5559fa26ce84fd8cb84ebfcddb1b9967214e2eb | [
"MIT"
] | 387 | 2018-05-22T21:46:20.000Z | 2022-03-26T18:51:01.000Z | demos/phoenix/config/config.exs | bucha/site_encrypt | b5559fa26ce84fd8cb84ebfcddb1b9967214e2eb | [
"MIT"
] | 41 | 2018-06-03T13:02:24.000Z | 2022-02-14T11:16:24.000Z | demos/phoenix/config/config.exs | bucha/site_encrypt | b5559fa26ce84fd8cb84ebfcddb1b9967214e2eb | [
"MIT"
] | 24 | 2018-05-24T07:04:12.000Z | 2022-02-09T08:21:05.000Z | use Mix.Config
config :phoenix, json_library: Jason
config :phoenix_demo, PhoenixDemo.Endpoint, []
if Mix.env() == :test do
config :logger, level: :warn
end
| 17.888889 | 46 | 0.726708 |
085e2448604ec9e0b00baa6aaa4103e6f28afc81 | 429 | exs | Elixir | test/huemulixir_web/views/error_view_test.exs | NinjasCL/huemulixir | 0f0ceb69f19e5d361725284f0f8cb1264e7e1742 | [
"BSD-2-Clause"
] | 2 | 2022-03-21T00:57:19.000Z | 2022-03-25T14:28:15.000Z | test/huemulixir_web/views/error_view_test.exs | NinjasCL/huemulixir | 0f0ceb69f19e5d361725284f0f8cb1264e7e1742 | [
"BSD-2-Clause"
] | null | null | null | test/huemulixir_web/views/error_view_test.exs | NinjasCL/huemulixir | 0f0ceb69f19e5d361725284f0f8cb1264e7e1742 | [
"BSD-2-Clause"
] | null | null | null | defmodule HuemulixirWeb.ErrorViewTest do
use HuemulixirWeb.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(HuemulixirWeb.ErrorView, "404.html", []) == "Not Found"
end
test "renders 500.html" ... | 28.6 | 95 | 0.741259 |
085e3ee47cc9f413e3821fde82cf906cc029ec04 | 2,696 | ex | Elixir | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_key.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_key.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_key.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 ... | 42.793651 | 179 | 0.746662 |
085e44ebb584e4567b1c6bd0fa6975295891f11f | 917 | exs | Elixir | apps/firestorm_web/test/unit/markdown_test.exs | CircleCI-Public/firestorm | 9ca2c46a2b2377370347ad94d6003eeb77be38d6 | [
"MIT"
] | 10 | 2017-06-28T08:06:52.000Z | 2022-03-19T17:49:21.000Z | apps/firestorm_web/test/unit/markdown_test.exs | CircleCI-Public/firestorm | 9ca2c46a2b2377370347ad94d6003eeb77be38d6 | [
"MIT"
] | null | null | null | apps/firestorm_web/test/unit/markdown_test.exs | CircleCI-Public/firestorm | 9ca2c46a2b2377370347ad94d6003eeb77be38d6 | [
"MIT"
] | 2 | 2017-10-21T12:01:02.000Z | 2021-01-29T10:26:22.000Z | defmodule FirestormWeb.MarkdownTest do
use ExUnit.Case
alias FirestormWeb.Markdown
test "renders basic things" do
assert "<p>foo</p>" == Markdown.render("foo")
end
test "autolinks URLs" do
assert "<p><a href=\"http://slashdot.org\">http://slashdot.org</a></p>" == Markdown.render("http://slashdot.org... | 33.962963 | 117 | 0.669575 |
085e45c3e283e8db8a53d96b1480ff1fa668e94e | 528 | exs | Elixir | test/alertlytics/adapters/rabbit_mq_adapter_test.exs | cultivatedcode/alertlytics | 92bbc071bfc667e8c15dca6aa3a5cc28627f2fed | [
"Apache-2.0"
] | null | null | null | test/alertlytics/adapters/rabbit_mq_adapter_test.exs | cultivatedcode/alertlytics | 92bbc071bfc667e8c15dca6aa3a5cc28627f2fed | [
"Apache-2.0"
] | 3 | 2019-02-24T18:04:02.000Z | 2020-06-12T04:36:44.000Z | test/alertlytics/adapters/rabbit_mq_adapter_test.exs | cultivatedcode/alertlytics | 92bbc071bfc667e8c15dca6aa3a5cc28627f2fed | [
"Apache-2.0"
] | null | null | null | defmodule RabbitMqAdapterTest do
use ExUnit.Case
alias Alertlytics.Adapters.RabbitMqAdapter, as: Subject
doctest Alertlytics.Adapters.RabbitMqAdapter
test "parse_response" do
assert 1 == Subject.consumer_count_from_response("{ \"consumers\": 1 }")
end
test "bad address" do
assert false ==
... | 27.789474 | 76 | 0.625 |
085e72a88d8441a711b0196270ebf80c2b495dea | 1,084 | ex | Elixir | lib/seent_web/live/page_live.ex | seent-app/seent | 6071a0f90f1cb5345faa0c9e476d3c64310a7be9 | [
"0BSD"
] | null | null | null | lib/seent_web/live/page_live.ex | seent-app/seent | 6071a0f90f1cb5345faa0c9e476d3c64310a7be9 | [
"0BSD"
] | 1 | 2020-07-04T17:19:38.000Z | 2020-07-04T17:19:38.000Z | lib/seent_web/live/page_live.ex | seent-app/seent | 6071a0f90f1cb5345faa0c9e476d3c64310a7be9 | [
"0BSD"
] | null | null | null | defmodule SeentWeb.PageLive do
use SeentWeb, :live_view
@impl true
def mount(_params, _session, socket) do
{:ok, assign(socket, query: "", results: %{})}
end
@impl true
def handle_event("suggest", %{"q" => query}, socket) do
{:noreply, assign(socket, results: search(query), query: query)}
end
... | 27.1 | 84 | 0.599631 |
085eb63acb4a3d8c6d41121563f56b2b0d678636 | 323 | exs | Elixir | day_04/exercise1.exs | dams/adventofcode | dac9638c6fe3c99b726de8899e9baedf2efbb15a | [
"Artistic-2.0"
] | null | null | null | day_04/exercise1.exs | dams/adventofcode | dac9638c6fe3c99b726de8899e9baedf2efbb15a | [
"Artistic-2.0"
] | null | null | null | day_04/exercise1.exs | dams/adventofcode | dac9638c6fe3c99b726de8899e9baedf2efbb15a | [
"Artistic-2.0"
] | null | null | null | defmodule Exercise1 do
def compute(input) do
compute(input, nil, 0)
end
def compute(_input, "00000" <> _md5_rest, nb) do
nb
end
def compute(input, _md5, nb) do
compute(input, :crypto.hash(:md5, input <> to_string(nb+1)) |> Base.encode16, nb + 1)
end
end
input = "ckczppom"
IO.puts Exercise1.compute(inpu... | 17 | 87 | 0.684211 |
085ed3ac4f4e09ab10a2424ab9027b5fae4032af | 1,547 | exs | Elixir | test/data/mutate_rows_test.exs | rockneurotiko/bigtable | a83d0c3e513a212265b2f6fc775407fa71ac049c | [
"MIT"
] | null | null | null | test/data/mutate_rows_test.exs | rockneurotiko/bigtable | a83d0c3e513a212265b2f6fc775407fa71ac049c | [
"MIT"
] | null | null | null | test/data/mutate_rows_test.exs | rockneurotiko/bigtable | a83d0c3e513a212265b2f6fc775407fa71ac049c | [
"MIT"
] | null | null | null | defmodule MutateRowsTest do
@moduledoc false
# TODO: Integration tests including errors
alias Bigtable.{MutateRows, Mutations}
use ExUnit.Case
setup do
[
entries: [Mutations.build("Test#123"), Mutations.build("Test#124")]
]
end
describe "MutateRow.build() " do
test "should build a Mu... | 24.555556 | 77 | 0.585003 |
085ef87beb155d7be9950f77e914f7bf7255bbe5 | 161 | ex | Elixir | debian/mingw-w64-libpcre.cron.d.ex | mingw-deb/libpcre | 3b506b85702c7a8f06115cea50dc41ffd9aaa7bc | [
"BSD-3-Clause"
] | null | null | null | debian/mingw-w64-libpcre.cron.d.ex | mingw-deb/libpcre | 3b506b85702c7a8f06115cea50dc41ffd9aaa7bc | [
"BSD-3-Clause"
] | null | null | null | debian/mingw-w64-libpcre.cron.d.ex | mingw-deb/libpcre | 3b506b85702c7a8f06115cea50dc41ffd9aaa7bc | [
"BSD-3-Clause"
] | null | null | null | #
# Regular cron jobs for the mingw-w64-libpcre package
#
0 4 * * * root [ -x /usr/bin/mingw-w64-libpcre_maintenance ] && /usr/bin/mingw-w64-libpcre_maintenance
| 32.2 | 102 | 0.720497 |
085f1cfe02758d8ff5123bf19386736c2b5a4b7c | 1,053 | exs | Elixir | apps/omg/test/omg/state/transaction/witness_test.exs | omgnetwork/omg-childchain-v1 | 1e2313029ece2282c22ce411edc078a17e6bba09 | [
"Apache-2.0"
] | 1 | 2020-10-06T03:07:47.000Z | 2020-10-06T03:07:47.000Z | apps/omg/test/omg/state/transaction/witness_test.exs | omgnetwork/omg-childchain-v1 | 1e2313029ece2282c22ce411edc078a17e6bba09 | [
"Apache-2.0"
] | 9 | 2020-09-16T15:31:17.000Z | 2021-03-17T07:12:35.000Z | apps/omg/test/omg/state/transaction/witness_test.exs | omgnetwork/omg-childchain-v1 | 1e2313029ece2282c22ce411edc078a17e6bba09 | [
"Apache-2.0"
] | 1 | 2020-09-30T17:17:27.000Z | 2020-09-30T17:17:27.000Z | # Copyright 2019-2020 OmiseGO Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 29.25 | 74 | 0.717949 |
085f1db0985a0be856c7a5cea2b51907f3861b33 | 2,731 | ex | Elixir | lib/model/sql.ex | diodechain/diode_server | 1692788bd92cc17654965878abd059d13b5e236c | [
"Apache-2.0"
] | 8 | 2021-03-12T15:35:09.000Z | 2022-03-06T06:37:49.000Z | lib/model/sql.ex | diodechain/diode_server_ex | 5cf47e5253a0caafd335d0af4dba711d4dcad42d | [
"Apache-2.0"
] | 15 | 2019-09-06T07:58:01.000Z | 2021-03-06T17:04:46.000Z | lib/model/sql.ex | diodechain/diode_server | 1692788bd92cc17654965878abd059d13b5e236c | [
"Apache-2.0"
] | 5 | 2021-10-01T12:52:28.000Z | 2022-02-02T19:29:56.000Z | # Diode Server
# Copyright 2021 Diode
# Licensed under the Diode License, Version 1.1
defmodule Model.Sql do
# Automatically defines child_spec/1
use Supervisor
# esqlite doesn't support :infinity
@infinity 300_000_000
defp databases() do
[
{Db.Sync, "sync.sq3"},
{Db.Cache, "cache.sq3"},
... | 26.259615 | 95 | 0.637495 |
085f24d83e7ed1d9baaede3c0bf5bb5abaf73904 | 1,489 | ex | Elixir | lib/timetracker_web/views/error_helpers.ex | LunarLogic/timetracker | 5c2ffffc9023c7b099d7af8de7f21225352483ca | [
"MIT"
] | 1 | 2019-06-26T06:53:01.000Z | 2019-06-26T06:53:01.000Z | lib/timetracker_web/views/error_helpers.ex | LunarLogic/timetracker | 5c2ffffc9023c7b099d7af8de7f21225352483ca | [
"MIT"
] | null | null | null | lib/timetracker_web/views/error_helpers.ex | LunarLogic/timetracker | 5c2ffffc9023c7b099d7af8de7f21225352483ca | [
"MIT"
] | null | null | null | defmodule TimetrackerWeb.ErrorHelpers do
@moduledoc """
Conveniences for translating and building error messages.
"""
use Phoenix.HTML
@doc """
Generates tag for inlined form input errors.
"""
def error_tag(form, field) do
Enum.map(Keyword.get_values(form.errors, field), fn error ->
content_... | 33.088889 | 80 | 0.672935 |
085f272be9b57f165015458130479d878c73ee05 | 191 | exs | Elixir | apps/core/priv/repo/migrations/20210427205933_add_publisher_icon.exs | michaeljguarino/forge | 50ee583ecb4aad5dee4ef08fce29a8eaed1a0824 | [
"Apache-2.0"
] | 59 | 2021-09-16T19:29:39.000Z | 2022-03-31T20:44:24.000Z | apps/core/priv/repo/migrations/20210427205933_add_publisher_icon.exs | svilenkov/plural | ac6c6cc15ac4b66a3b5e32ed4a7bee4d46d1f026 | [
"Apache-2.0"
] | 111 | 2021-08-15T09:56:37.000Z | 2022-03-31T23:59:32.000Z | apps/core/priv/repo/migrations/20210427205933_add_publisher_icon.exs | svilenkov/plural | ac6c6cc15ac4b66a3b5e32ed4a7bee4d46d1f026 | [
"Apache-2.0"
] | 4 | 2021-12-13T09:43:01.000Z | 2022-03-29T18:08:44.000Z | defmodule Core.Repo.Migrations.AddPublisherIcon do
use Ecto.Migration
def change do
alter table(:accounts) do
add :icon_id, :uuid
add :icon, :string
end
end
end
| 17.363636 | 50 | 0.670157 |
085f6c483d352b52680cfb56b6748d3536718028 | 313 | exs | Elixir | config/config.exs | LeonardSSH/lanyard | 407bc5c7dfcfcaf28ee72a70dc8695c39980f87d | [
"MIT"
] | 323 | 2021-03-12T17:42:44.000Z | 2022-03-31T21:32:30.000Z | config/config.exs | LeonardSSH/lanyard | 407bc5c7dfcfcaf28ee72a70dc8695c39980f87d | [
"MIT"
] | 56 | 2021-03-22T12:30:36.000Z | 2022-03-25T17:56:01.000Z | config/config.exs | LeonardSSH/lanyard | 407bc5c7dfcfcaf28ee72a70dc8695c39980f87d | [
"MIT"
] | 113 | 2021-03-13T17:30:36.000Z | 2022-03-29T13:19:24.000Z | use Mix.Config
config :lanyard,
discord_spotify_activity_id: "spotify:1",
command_prefix: System.get_env("COMMAND_PREFIX") || ".",
bot_presence: System.get_env("BOT_PRESENCE") || "you <3",
bot_presence_type: String.to_integer(System.get_env("BOT_PRESENCE_TYPE") || "3")
import_config "#{Mix.env()}.exs"
| 31.3 | 82 | 0.728435 |
085f75e663a47d98c12ead24d714352b91dd2f3f | 1,096 | exs | Elixir | test/openapi_compiler_test.exs | jshmrtn/openapi-compiler | 72ce58321bcaf7310b1286fa90dd2feaa2a7b565 | [
"MIT"
] | 3 | 2021-09-07T13:13:44.000Z | 2022-01-16T22:25:11.000Z | test/openapi_compiler_test.exs | jshmrtn/openapi-compiler | 72ce58321bcaf7310b1286fa90dd2feaa2a7b565 | [
"MIT"
] | 26 | 2020-03-31T17:26:58.000Z | 2020-04-01T17:32:21.000Z | test/openapi_compiler_test.exs | jshmrtn/openapi-compiler | 72ce58321bcaf7310b1286fa90dd2feaa2a7b565 | [
"MIT"
] | 1 | 2020-10-27T13:32:07.000Z | 2020-10-27T13:32:07.000Z | defmodule OpenAPICompilerTest do
@moduledoc false
use ExUnit.Case, async: true
doctest OpenAPICompiler
test "valid response" do
Tesla.Mock.mock(fn
%Tesla.Env{url: "https://dev.localhost:8080/valid"} ->
%Tesla.Env{
status: 200,
body: ~S("hello"),
headers: [{"con... | 26.095238 | 79 | 0.513686 |
085fd70018555269e570b6cc2c5ea50815206022 | 1,192 | exs | Elixir | config/config.exs | noelbk/battlesnake | cb50a40cc2fd47fb335835c5b0e92d7761e7ea13 | [
"MIT"
] | null | null | null | config/config.exs | noelbk/battlesnake | cb50a40cc2fd47fb335835c5b0e92d7761e7ea13 | [
"MIT"
] | null | null | null | config/config.exs | noelbk/battlesnake | cb50a40cc2fd47fb335835c5b0e92d7761e7ea13 | [
"MIT"
] | null | null | null | # 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.058824 | 73 | 0.760906 |
085ff9081761894c12fbc03ceeb5ea42da72a10e | 3,823 | ex | Elixir | lib/koans/12_pattern_matching.ex | kapware/elixir-koans | 47f1d8705d7748fac026c3996c31b460e90697fe | [
"MIT"
] | null | null | null | lib/koans/12_pattern_matching.ex | kapware/elixir-koans | 47f1d8705d7748fac026c3996c31b460e90697fe | [
"MIT"
] | null | null | null | lib/koans/12_pattern_matching.ex | kapware/elixir-koans | 47f1d8705d7748fac026c3996c31b460e90697fe | [
"MIT"
] | null | null | null | defmodule PatternMatching do
use Koans
@intro "PatternMatching"
koan "One matches one" do
assert match?(1, 1)
end
koan "Patterns can be used to pull things apart" do
[head | tail] = [1, 2, 3, 4]
assert head == 1
assert tail == [2, 3, 4]
end
koan "And then put them back together" do
... | 23.598765 | 101 | 0.592728 |
08600c03fda6cc9f1ce8296634b81ec40d707d3a | 1,418 | exs | Elixir | priv/repo/migrations/20220511024749_finance.exs | knoebber/petaller | 3532db5a3688459127d2427af42e32ca0f494d44 | [
"MIT"
] | null | null | null | priv/repo/migrations/20220511024749_finance.exs | knoebber/petaller | 3532db5a3688459127d2427af42e32ca0f494d44 | [
"MIT"
] | null | null | null | priv/repo/migrations/20220511024749_finance.exs | knoebber/petaller | 3532db5a3688459127d2427af42e32ca0f494d44 | [
"MIT"
] | null | null | null | defmodule Purple.Repo.Migrations.Finance do
use Ecto.Migration
def change do
create table(:merchants) do
add :name, :citext, null: false
add :description, :text, null: false, default: ""
timestamps()
end
create unique_index(:merchants, [:name])
create table(:payment_methods) do... | 27.803922 | 89 | 0.673484 |
08604edfeac1d9dc0c475999182c1b7eed1b6ecb | 247 | exs | Elixir | priv/test_repo/migrations/1_migrate_all.exs | tineo/absinthe_ecto | 55e31dfd4e7932c1e31c8beac7aa22d663fdc304 | [
"MIT"
] | 132 | 2016-11-20T22:23:30.000Z | 2021-07-18T18:16:19.000Z | priv/test_repo/migrations/1_migrate_all.exs | tineo/absinthe_ecto | 55e31dfd4e7932c1e31c8beac7aa22d663fdc304 | [
"MIT"
] | 34 | 2016-11-24T05:06:57.000Z | 2022-02-23T16:57:40.000Z | priv/test_repo/migrations/1_migrate_all.exs | tineo/absinthe_ecto | 55e31dfd4e7932c1e31c8beac7aa22d663fdc304 | [
"MIT"
] | 36 | 2016-11-22T06:38:59.000Z | 2022-03-09T11:32:53.000Z | defmodule Absinthe.Ecto.TestRepo.Migrations.MigrateAll do
use Ecto.Migration
def change do
create table(:users) do
add :username, :string
end
create table(:posts) do
add :user_id, references(:users)
end
end
end
| 17.642857 | 57 | 0.680162 |
086070eaaa92af998a2bfe3ac9ef8219d8339fb7 | 1,962 | exs | Elixir | test/clienthandler_test.exs | ServusGameServer/Servus_Protobuf | cb870b7dccb6676e71045e231fd31547d63efa74 | [
"Apache-2.0"
] | 2 | 2018-10-19T06:14:08.000Z | 2018-11-23T00:56:09.000Z | test/clienthandler_test.exs | ServusGameServer/Servus_Protobuf | cb870b7dccb6676e71045e231fd31547d63efa74 | [
"Apache-2.0"
] | null | null | null | test/clienthandler_test.exs | ServusGameServer/Servus_Protobuf | cb870b7dccb6676e71045e231fd31547d63efa74 | [
"Apache-2.0"
] | null | null | null | defmodule ClientHandlerTests do
use ExUnit.Case
alias Servus.Serverutils
alias Servus.ProtoFactory
setup_all do
connect_opts = [
:binary,
packet: :raw,
active: false,
reuseaddr: true
]
{:ok, socket_alice} = :gen_tcp.connect('localhost', 3334, connect_opts)
{:ok,
[... | 40.040816 | 136 | 0.732926 |
08607564abe599cf1fcb69535031394c0cdd330f | 424 | exs | Elixir | 2019/utilities.exs | KashMoneyMillionaire/adventofcode | 2160b4af4ad9a994cfde2bffb65a6f6758c8003d | [
"MIT"
] | null | null | null | 2019/utilities.exs | KashMoneyMillionaire/adventofcode | 2160b4af4ad9a994cfde2bffb65a6f6758c8003d | [
"MIT"
] | null | null | null | 2019/utilities.exs | KashMoneyMillionaire/adventofcode | 2160b4af4ad9a994cfde2bffb65a6f6758c8003d | [
"MIT"
] | null | null | null | defmodule Utilities do
def read_list_int() do
"input.txt"
|> File.read!()
|> String.trim()
|> String.split()
|> Enum.take_while(fn x -> x != "#" end)
|> Enum.map(&String.to_integer/1)
end
def read_list_int(split) do
"input.txt"
|> File.read!()
|> String.trim()
|> String.sp... | 21.2 | 44 | 0.563679 |
0860956e441f0891bd6d4ce2030fca60007fea1c | 708 | exs | Elixir | lib/iex/test/iex/evaluator_test.exs | mk/elixir | 2b2c66ecf7b1cc2167cae9cc3e88f950994223f1 | [
"Apache-2.0"
] | 4 | 2015-12-22T02:46:39.000Z | 2016-04-26T06:11:09.000Z | lib/iex/test/iex/evaluator_test.exs | mk/elixir | 2b2c66ecf7b1cc2167cae9cc3e88f950994223f1 | [
"Apache-2.0"
] | null | null | null | lib/iex/test/iex/evaluator_test.exs | mk/elixir | 2b2c66ecf7b1cc2167cae9cc3e88f950994223f1 | [
"Apache-2.0"
] | 1 | 2020-12-07T08:04:16.000Z | 2020-12-07T08:04:16.000Z | Code.require_file "../test_helper.exs", __DIR__
defmodule IEx.EvaluatorTest do
use ExUnit.Case, async: true
alias IEx.Evaluator, as: E
test "format_stacktrace returns formatted result in columns" do
frames = [
{List, :one, 1, [file: "loc", line: 1]},
{String, :second, 2, [file: "loc2", ... | 27.230769 | 65 | 0.564972 |
0860c29d3bbd4888890b9d5214f50fbecac53b0e | 2,913 | ex | Elixir | clients/you_tube_reporting/lib/google_api/you_tube_reporting/v1/model/gdata_composite_media.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/you_tube_reporting/lib/google_api/you_tube_reporting/v1/model/gdata_composite_media.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/you_tube_reporting/lib/google_api/you_tube_reporting/v1/model/gdata_composite_media.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... | 37.831169 | 118 | 0.673532 |
0860c3cf4e5c4b2dca5bf32a6b0ec49dfa5d20a4 | 331 | exs | Elixir | Books/Programming_Elixir-Dave_Thomas/ch_14/spawn/link2.exs | cjschneider2/book_example_problems | 18192a6d3ddb4371b79f88e4ab3444d25f2e1ce0 | [
"Unlicense"
] | null | null | null | Books/Programming_Elixir-Dave_Thomas/ch_14/spawn/link2.exs | cjschneider2/book_example_problems | 18192a6d3ddb4371b79f88e4ab3444d25f2e1ce0 | [
"Unlicense"
] | null | null | null | Books/Programming_Elixir-Dave_Thomas/ch_14/spawn/link2.exs | cjschneider2/book_example_problems | 18192a6d3ddb4371b79f88e4ab3444d25f2e1ce0 | [
"Unlicense"
] | null | null | null | defmodule Link2 do
import :timer, only: [sleep: 1]
def sad_function do
sleep 500
exit(:boom)
end
def run do
spawn_link(Link2, :sad_function, [])
receive do
msg ->
IO.puts "Message Revieved #{inspect msg}"
after 1000 ->
IO.puts "Nothing Happened..."
end
end
end
... | 15.045455 | 49 | 0.598187 |
0860d500b8bf659b40a7dfdef657f7c7dbf58dc0 | 566 | exs | Elixir | test/chronos/timezone_test.exs | nurugger07/chronos | be8fcbee7330d938dff87532cf108125bf952d05 | [
"Apache-2.0"
] | 72 | 2015-01-28T16:30:45.000Z | 2021-05-21T03:33:16.000Z | test/chronos/timezone_test.exs | nurugger07/chronos | be8fcbee7330d938dff87532cf108125bf952d05 | [
"Apache-2.0"
] | 9 | 2015-01-20T21:08:43.000Z | 2018-04-04T02:57:05.000Z | test/chronos/timezone_test.exs | nurugger07/chronos | be8fcbee7330d938dff87532cf108125bf952d05 | [
"Apache-2.0"
] | 15 | 2015-01-20T04:34:06.000Z | 2019-02-10T22:42:12.000Z | defmodule TimezonesTest do
use ExUnit.Case
import Chronos.Timezones
test "retieve the timezone offset" do
assert "-6:00" == offset "CST"
assert "-6:00" == offset "Central Standard Time"
assert "-5:00" == offset "EST"
assert "" == offset "BOB"
end
test "retrieve the timezone abbreviation" d... | 23.583333 | 56 | 0.651943 |
0860d6468c41eab12578b311bff0f58cb73962c7 | 1,346 | ex | Elixir | lib/journal/adapter.ex | revelrylabs/journal | 82450c22a5f77e152a0f91ba37345bc411e002e0 | [
"MIT"
] | 1 | 2019-08-09T06:01:42.000Z | 2019-08-09T06:01:42.000Z | lib/journal/adapter.ex | revelrylabs/journal | 82450c22a5f77e152a0f91ba37345bc411e002e0 | [
"MIT"
] | 3 | 2019-02-23T23:31:16.000Z | 2019-03-07T15:22:23.000Z | lib/journal/adapter.ex | revelrylabs/journal | 82450c22a5f77e152a0f91ba37345bc411e002e0 | [
"MIT"
] | 1 | 2020-03-05T21:17:21.000Z | 2020-03-05T21:17:21.000Z | defmodule Journal.Adapter do
@moduledoc """
Specifies API for Journal adapters
"""
@type adapter_meta :: map
alias Journal.Entry
alias Journal.Error
@doc """
Initializes the adapter
"""
@callback init(config :: Keyword.t()) :: {:ok, :supervisor.child_spec() | nil, adapter_meta}
@doc """
Store... | 29.911111 | 94 | 0.611441 |
0860f586ef8f7c3350e6c7c098fccaae9092dd70 | 63 | ex | Elixir | lib/first_app_web/views/page_view.ex | marcogbarcellos/phoenix_first_app | f610831a05e32fc4b15cf49630008c307024d023 | [
"MIT"
] | null | null | null | lib/first_app_web/views/page_view.ex | marcogbarcellos/phoenix_first_app | f610831a05e32fc4b15cf49630008c307024d023 | [
"MIT"
] | null | null | null | lib/first_app_web/views/page_view.ex | marcogbarcellos/phoenix_first_app | f610831a05e32fc4b15cf49630008c307024d023 | [
"MIT"
] | null | null | null | defmodule FirstAppWeb.PageView do
use FirstAppWeb, :view
end
| 15.75 | 33 | 0.809524 |
0860fbf41caf832c2d09a5d02e85a096a06096af | 5,724 | ex | Elixir | clients/recommender/lib/google_api/recommender/v1/model/google_cloud_recommender_v1_operation.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/recommender/lib/google_api/recommender/v1/model/google_cloud_recommender_v1_operation.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/recommender/lib/google_api/recommender/v1/model/google_cloud_recommender_v1_operation.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... | 69.804878 | 691 | 0.722048 |
08610a0e8a1893e3f36665218cc2781d4aba1229 | 423 | exs | Elixir | day_5/day_5.exs | cjschneider2/advent_of_code_2015 | 347b45ba3201f874aab5fa74ec9a2594e68def48 | [
"MIT"
] | null | null | null | day_5/day_5.exs | cjschneider2/advent_of_code_2015 | 347b45ba3201f874aab5fa74ec9a2594e68def48 | [
"MIT"
] | null | null | null | day_5/day_5.exs | cjschneider2/advent_of_code_2015 | 347b45ba3201f874aab5fa74ec9a2594e68def48 | [
"MIT"
] | null | null | null | defmodule Day5 do
defp contains_vowels(input, vowel_count) do
end
defp contains_double_letter(input) do
end
defp contains_forbidden_strings(input, strings) do
end
def run_tests() do
{:ok, file} = File.read("day_5-test_input.txt")
strings = file
|> String.split(~r/\R/)
stri... | 16.269231 | 52 | 0.647754 |
086117a4e6d02afa0e43c21787192cef5e1e01c9 | 1,044 | ex | Elixir | test/support/conn_case.ex | jordyvanvorselen/chewie-backend | b382ee0726f54d8ae45f2b41f43e38469cecc326 | [
"MIT"
] | null | null | null | test/support/conn_case.ex | jordyvanvorselen/chewie-backend | b382ee0726f54d8ae45f2b41f43e38469cecc326 | [
"MIT"
] | null | null | null | test/support/conn_case.ex | jordyvanvorselen/chewie-backend | b382ee0726f54d8ae45f2b41f43e38469cecc326 | [
"MIT"
] | null | null | null | defmodule ChewieWeb.ConnCase do
alias Ecto.Adapters.SQL.Sandbox
@moduledoc """
This module defines the test case to be used by
tests that require setting up a connection.
Such tests rely on `Phoenix.ConnTest` and also
import other functionality to make it easier
to build common data structures and query... | 25.463415 | 59 | 0.714559 |
08612a68ddee5e6eb04bcf66c1e48efea33d6f3b | 5,662 | ex | Elixir | kousa/lib/data-layer/user_data.ex | xeon3175x/dogehouse | 42e1ee0d19bc7838de6fffb4503f328619c6954a | [
"MIT"
] | 1 | 2021-02-13T17:42:22.000Z | 2021-02-13T17:42:22.000Z | kousa/lib/data-layer/user_data.ex | xeon3175x/dogehouse | 42e1ee0d19bc7838de6fffb4503f328619c6954a | [
"MIT"
] | null | null | null | kousa/lib/data-layer/user_data.ex | xeon3175x/dogehouse | 42e1ee0d19bc7838de6fffb4503f328619c6954a | [
"MIT"
] | null | null | null | defmodule Kousa.Data.User do
import Ecto.Query, warn: false
alias Beef.{Repo, User}
@fetch_limit 16
def search(query, offset) do
query_with_percent = "%" <> query <> "%"
items =
from(u in Beef.User,
where:
ilike(u.username, ^query_with_percent) or
ilike(u.displayNa... | 21.776923 | 95 | 0.529142 |
0861396b8b2b4487e21bdbacbfbff045aa85eacc | 51,824 | exs | Elixir | backend/deps/ecto/integration_test/cases/repo.exs | hploscar/palike | 71618593ee6e6687e0d1cdc9e923ed8f9c2cc2cb | [
"MIT"
] | null | null | null | backend/deps/ecto/integration_test/cases/repo.exs | hploscar/palike | 71618593ee6e6687e0d1cdc9e923ed8f9c2cc2cb | [
"MIT"
] | null | null | null | backend/deps/ecto/integration_test/cases/repo.exs | hploscar/palike | 71618593ee6e6687e0d1cdc9e923ed8f9c2cc2cb | [
"MIT"
] | null | null | null | Code.require_file "../support/types.exs", __DIR__
defmodule Ecto.Integration.RepoTest do
use Ecto.Integration.Case, async: Application.get_env(:ecto, :async_integration_tests, true)
alias Ecto.Integration.TestRepo
import Ecto.Query
alias Ecto.Integration.Post
alias Ecto.Integration.User
alias Ecto.Integr... | 37.635439 | 112 | 0.637542 |
08616295e23c977bcbed4f97fe465a3988731e0a | 6,024 | ex | Elixir | lib/techblog_web/live/hangman_live.ex | aforward/anunknown | 67838fe6f60825fd8c057c825f497ce7ef046083 | [
"MIT"
] | null | null | null | lib/techblog_web/live/hangman_live.ex | aforward/anunknown | 67838fe6f60825fd8c057c825f497ce7ef046083 | [
"MIT"
] | null | null | null | lib/techblog_web/live/hangman_live.ex | aforward/anunknown | 67838fe6f60825fd8c057c825f497ce7ef046083 | [
"MIT"
] | null | null | null | defmodule TechblogWeb.HangmanLive do
use TechblogWeb, :live_view
alias Diet.Stepper
@colours [
"#5ED0FA",
"#54D1DB",
"#A368FC",
"#F86A6A",
"#FADB5F",
"#65D6AD",
"#127FBF",
"#0E7C86",
"#690CB0",
"#AB091E",
"#CB6E17",
"#147D64"
]
@hit "#D64545"
def render(ass... | 39.372549 | 273 | 0.594124 |
086192b681d80bafcafa4b7968cdcbb2fc9935da | 1,233 | ex | Elixir | lib/juntos_web/live/page_live.ex | elixir-berlin/juntos | 64dd05888f357cf0c74da11d1eda69bab7f38e95 | [
"MIT"
] | 1 | 2019-11-15T15:39:24.000Z | 2019-11-15T15:39:24.000Z | lib/juntos_web/live/page_live.ex | elixir-berlin/juntos | 64dd05888f357cf0c74da11d1eda69bab7f38e95 | [
"MIT"
] | 166 | 2020-06-30T16:07:48.000Z | 2021-11-25T00:02:24.000Z | lib/juntos_web/live/page_live.ex | elixir-berlin/juntos | 64dd05888f357cf0c74da11d1eda69bab7f38e95 | [
"MIT"
] | null | null | null | defmodule JuntosWeb.PageLive do
@moduledoc false
use JuntosWeb, :live_view
@impl true
def mount(_params, session, socket) do
user =
session["user_token"] && Juntos.Accounts.get_user_by_session_token(session["user_token"])
{:ok, assign(socket, query: "", results: %{}, current_user: user)}
end
... | 28.022727 | 95 | 0.615572 |
0861ae99c3a50b63be755729199bcef6b23e86e2 | 982 | ex | Elixir | web/router.ex | cadorfo/SchoolAgenda | 5dd99f3482f103f7a3ac5ef83a07a36d15bbe17d | [
"MIT"
] | null | null | null | web/router.ex | cadorfo/SchoolAgenda | 5dd99f3482f103f7a3ac5ef83a07a36d15bbe17d | [
"MIT"
] | null | null | null | web/router.ex | cadorfo/SchoolAgenda | 5dd99f3482f103f7a3ac5ef83a07a36d15bbe17d | [
"MIT"
] | null | null | null | defmodule SchoolAgenda.Router do
use SchoolAgenda.Web, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
plug SchoolAgenda.Plugs.UserSession
end
pipeline :api do
plug :accepts, ... | 24.55 | 57 | 0.703666 |
0861d252b0460493e99fe438a3686efc3fabe6b5 | 108 | exs | Elixir | test/littlechat_web/live/page_live_test.exs | BenBera/littleChatWebrtc | 91850323d0e60c4049a84ff8985b09856b356016 | [
"MIT"
] | 166 | 2020-07-15T14:47:19.000Z | 2022-03-25T03:57:35.000Z | test/littlechat_web/live/page_live_test.exs | BenBera/littleChatWebrtc | 91850323d0e60c4049a84ff8985b09856b356016 | [
"MIT"
] | 12 | 2020-07-01T23:32:47.000Z | 2021-03-18T21:21:28.000Z | test/littlechat_web/live/page_live_test.exs | BenBera/littleChatWebrtc | 91850323d0e60c4049a84ff8985b09856b356016 | [
"MIT"
] | 21 | 2020-07-15T14:59:39.000Z | 2022-03-20T21:05:16.000Z | defmodule LittlechatWeb.PageLiveTest do
# use LittlechatWeb.ConnCase
# import Phoenix.LiveViewTest
end
| 18 | 39 | 0.814815 |
0861e38432c4989c3f371c4f27987276dee1358b | 2,694 | ex | Elixir | lib/elixir_keeb_ui_web/contex/barchart_timer.ex | amalbuquerque/elixir_keeb_ui | d203ccc128547668febd13a35d9472e5b4b3151a | [
"MIT"
] | 3 | 2020-07-07T15:57:55.000Z | 2021-08-12T05:09:38.000Z | lib/elixir_keeb_ui_web/contex/barchart_timer.ex | amalbuquerque/elixir_keeb_ui | d203ccc128547668febd13a35d9472e5b4b3151a | [
"MIT"
] | 3 | 2020-09-28T20:53:30.000Z | 2021-08-31T20:41:04.000Z | lib/elixir_keeb_ui_web/contex/barchart_timer.ex | amalbuquerque/elixir_keeb_ui | d203ccc128547668febd13a35d9472e5b4b3151a | [
"MIT"
] | 1 | 2021-07-16T13:49:09.000Z | 2021-07-16T13:49:09.000Z | defmodule ElixirKeeb.UIWeb.Contex.BarchartTimer do
use Phoenix.LiveView
use Phoenix.HTML
import ElixirKeeb.UIWeb.Contex.Shared
alias Contex.{BarChart, Plot, Dataset}
def render(assigns) do
~L"""
<div class="container">
<div class="row">
<div class="column column-75">
... | 26.411765 | 139 | 0.657758 |
0861f37a83c148c5a61d21b15f416f3998c788a3 | 423 | exs | Elixir | test/bus_web/views/error_view_test.exs | titouancreach/bus-rennes | 9d85a1c13a161b4f48e6efaf7ed52dbd7991f9d8 | [
"MIT"
] | 3 | 2018-06-16T22:34:46.000Z | 2018-06-20T07:15:27.000Z | test/bus_web/views/error_view_test.exs | titouancreach/bus-rennes | 9d85a1c13a161b4f48e6efaf7ed52dbd7991f9d8 | [
"MIT"
] | null | null | null | test/bus_web/views/error_view_test.exs | titouancreach/bus-rennes | 9d85a1c13a161b4f48e6efaf7ed52dbd7991f9d8 | [
"MIT"
] | null | null | null | defmodule BusWeb.ErrorViewTest do
use BusWeb.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(BusWeb.ErrorView, "404.html", []) ==
"Not Found"
end
test "renders 500.html" do
ass... | 24.882353 | 66 | 0.685579 |
08623b740135b270ec677baed617c00478a82a27 | 5,834 | ex | Elixir | lib/rtp_h264/payloader.ex | membraneframework/membrane-element-rtp-h264 | 807befb264775c9994108403214e039d039e18b1 | [
"Apache-2.0"
] | 3 | 2019-10-15T05:29:07.000Z | 2020-02-18T12:43:44.000Z | lib/rtp_h264/payloader.ex | membraneframework/membrane-element-rtp-h264 | 807befb264775c9994108403214e039d039e18b1 | [
"Apache-2.0"
] | 2 | 2019-08-21T07:43:21.000Z | 2020-07-16T10:46:13.000Z | lib/rtp_h264/payloader.ex | membraneframework/membrane-element-rtp-h264 | 807befb264775c9994108403214e039d039e18b1 | [
"Apache-2.0"
] | null | null | null | defmodule Membrane.RTP.H264.Payloader do
@moduledoc """
Payloads H264 NAL Units into H264 RTP payloads.
Based on [RFC 6184](https://tools.ietf.org/html/rfc6184)
Supported types: Single NALU, FU-A, STAP-A.
"""
use Bunch
use Membrane.Filter
alias Membrane.Buffer
alias Membrane.H264
alias Membrane.... | 28.598039 | 82 | 0.588447 |
086240d36961e9a815eed4208f0ce6b1f166bdb2 | 532 | exs | Elixir | test/create_sequence_test.exs | jonseaberg/ecto_extract_migrations | 6372825495b702386c291a5dda2f63ad1c8317ca | [
"Apache-2.0"
] | 7 | 2020-09-02T14:50:12.000Z | 2021-11-12T20:07:36.000Z | test/create_sequence_test.exs | jonseaberg/ecto_extract_migrations | 6372825495b702386c291a5dda2f63ad1c8317ca | [
"Apache-2.0"
] | 2 | 2020-10-31T12:17:25.000Z | 2020-11-05T13:13:13.000Z | test/create_sequence_test.exs | jonseaberg/ecto_extract_migrations | 6372825495b702386c291a5dda2f63ad1c8317ca | [
"Apache-2.0"
] | 3 | 2020-10-31T11:46:31.000Z | 2022-02-11T15:23:10.000Z | defmodule CreateSequenceTest do
use ExUnit.Case
alias EctoExtractMigrations.Parsers.CreateSequence
test "create_sequence" do
sql = """
CREATE SEQUENCE chat.assignment_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
"""
expected = %{
... | 19 | 55 | 0.603383 |
08624fa09cfbf97bfbee94a8a364de570f7f7b4e | 67 | ex | Elixir | lib/issues.ex | vonum/issues | 5b453d17d0b15092d7cdf47bfb29abea4fecca5d | [
"MIT"
] | null | null | null | lib/issues.ex | vonum/issues | 5b453d17d0b15092d7cdf47bfb29abea4fecca5d | [
"MIT"
] | null | null | null | lib/issues.ex | vonum/issues | 5b453d17d0b15092d7cdf47bfb29abea4fecca5d | [
"MIT"
] | null | null | null | defmodule Issues do
def main(argv), do: Issues.CLI.run(argv)
end
| 16.75 | 42 | 0.731343 |
08626a61c56224ef15dd0ad92e537d8c724ee799 | 167 | ex | Elixir | lib/honeydew/please/events/task_reactivated.ex | christian-fei/honeydew | af06f5778de164fd50979ae20e59b6aeb3092485 | [
"MIT"
] | 13 | 2022-02-13T18:43:20.000Z | 2022-03-19T11:53:48.000Z | lib/honeydew/please/events/task_reactivated.ex | christian-fei/honeydew | af06f5778de164fd50979ae20e59b6aeb3092485 | [
"MIT"
] | 1 | 2022-02-23T13:57:19.000Z | 2022-02-23T13:57:19.000Z | lib/honeydew/please/events/task_reactivated.ex | christian-fei/honeydew | af06f5778de164fd50979ae20e59b6aeb3092485 | [
"MIT"
] | 3 | 2022-02-13T19:25:19.000Z | 2022-02-22T17:56:52.000Z | defmodule Honeydew.Please.Events.TaskReactivated do
@moduledoc """
OH NO! WHYYYYYY!
"""
@derive Jason.Encoder
defstruct [
:task_id,
:notes
]
end
| 12.846154 | 51 | 0.652695 |
0862ab7ed2a1e783f775c117f84fe3e4e22a8619 | 974 | exs | Elixir | test/absinthe/language/inline_fragment_test.exs | TheRealReal/absinthe | 6eae5bc36283e58f42d032b8afd90de3ad64f97b | [
"MIT"
] | 4,101 | 2016-03-02T03:49:20.000Z | 2022-03-31T05:46:01.000Z | test/absinthe/language/inline_fragment_test.exs | TheRealReal/absinthe | 6eae5bc36283e58f42d032b8afd90de3ad64f97b | [
"MIT"
] | 889 | 2016-03-02T16:06:59.000Z | 2022-03-31T20:24:12.000Z | test/absinthe/language/inline_fragment_test.exs | TheRealReal/absinthe | 6eae5bc36283e58f42d032b8afd90de3ad64f97b | [
"MIT"
] | 564 | 2016-03-02T07:49:59.000Z | 2022-03-06T14:40:59.000Z | defmodule Absinthe.Language.InlineFragmentTest do
use Absinthe.Case, async: true
alias Absinthe.{Blueprint, Language}
@query """
{
... on RootQueryType {
foo
bar
}
}
"""
describe "converting to Blueprint" do
test "builds a Document.Fragment.Inline.t" do
assert %Blueprint.D... | 22.136364 | 84 | 0.601643 |
0862d4348ef0ab4ea0bec6d815cd31358fe3db70 | 1,681 | ex | Elixir | clients/big_query/lib/google_api/big_query/v2/model/job_statistics_reservation_usage.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/big_query/lib/google_api/big_query/v2/model/job_statistics_reservation_usage.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/big_query/lib/google_api/big_query/v2/model/job_statistics_reservation_usage.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... | 32.960784 | 131 | 0.740631 |
0862e76c90c8e410e572c53670125e30e6611871 | 2,765 | exs | Elixir | test/floki/selector/tokenizer_test.exs | nathanl/floki | 042b3f60f4d9a6218ec85d558d13cc6dac30c587 | [
"MIT"
] | 1,778 | 2015-01-07T14:12:31.000Z | 2022-03-29T22:42:48.000Z | test/floki/selector/tokenizer_test.exs | nathanl/floki | 042b3f60f4d9a6218ec85d558d13cc6dac30c587 | [
"MIT"
] | 279 | 2015-01-01T15:54:50.000Z | 2022-03-28T18:06:03.000Z | test/floki/selector/tokenizer_test.exs | nathanl/floki | 042b3f60f4d9a6218ec85d558d13cc6dac30c587 | [
"MIT"
] | 166 | 2015-04-24T20:48:02.000Z | 2022-03-28T17:29:05.000Z | defmodule Floki.Selector.TokenizerTest do
use ExUnit.Case, async: true
alias Floki.Selector.Tokenizer
test "empty selector" do
assert Tokenizer.tokenize("") == []
end
test "complex selector" do
complex = """
ns|a.link,
.b[title=hello],
[href~=foo] *,
a > b
"""
assert Tokeniz... | 26.84466 | 64 | 0.428571 |
086310026bed1b769f0bb9f8d10eb3a14648c343 | 1,050 | ex | Elixir | test/support/apps/example/test/support/conn_case.ex | mitchellhenke/torch | 2d0ab68f4e2d7f3bc37fbf7edbd1298b29b36e71 | [
"MIT"
] | 528 | 2019-09-13T15:10:36.000Z | 2022-03-31T10:28:27.000Z | test/support/apps/example/test/support/conn_case.ex | mitchellhenke/torch | 2d0ab68f4e2d7f3bc37fbf7edbd1298b29b36e71 | [
"MIT"
] | 133 | 2019-09-13T17:46:59.000Z | 2022-03-01T13:37:10.000Z | test/support/apps/example/test/support/conn_case.ex | mitchellhenke/torch | 2d0ab68f4e2d7f3bc37fbf7edbd1298b29b36e71 | [
"MIT"
] | 38 | 2019-10-29T20:37:13.000Z | 2022-03-03T05:19:33.000Z | defmodule ExampleWeb.ConnCase do
@moduledoc """
This module defines the test case to be used by
tests that require setting up a connection.
Such tests rely on `Phoenix.ConnTest` and also
import other functionality to make it easier
to build common data structures and query the data layer.
Finally, if th... | 26.923077 | 69 | 0.718095 |
086311472fbb244a5b088990d516900cacb14eec | 269 | ex | Elixir | lib/live_view_examples.ex | zorbash/observer_live | f78af309a85783ac61d97ba9bb5ffd7a64ec9823 | [
"MIT"
] | 219 | 2019-04-02T02:51:59.000Z | 2021-11-10T22:14:17.000Z | lib/live_view_examples.ex | zorbash/observer_live | f78af309a85783ac61d97ba9bb5ffd7a64ec9823 | [
"MIT"
] | 1 | 2021-05-08T11:51:29.000Z | 2021-05-08T11:51:29.000Z | lib/live_view_examples.ex | zorbash/observer_live | f78af309a85783ac61d97ba9bb5ffd7a64ec9823 | [
"MIT"
] | 14 | 2019-04-02T07:19:38.000Z | 2021-03-27T19:19:45.000Z | defmodule LiveViewExamples do
@moduledoc """
LiveViewExamples keeps the contexts that define your domain
and business logic.
Contexts are also responsible for managing your data, regardless
if it comes from the database, an external API or others.
"""
end
| 26.9 | 66 | 0.769517 |
0863294f0b5f2430c51141cfb29599f6a2dc7f08 | 4,398 | ex | Elixir | lib/mango_pay/preauthorization.ex | Eweev/mangopay-elixir | 7a4ff7b47c31bfa9a77d944803158f8297d51505 | [
"MIT"
] | 1 | 2020-04-07T22:17:25.000Z | 2020-04-07T22:17:25.000Z | lib/mango_pay/preauthorization.ex | Eweev/mangopay-elixir | 7a4ff7b47c31bfa9a77d944803158f8297d51505 | [
"MIT"
] | 17 | 2018-04-11T12:07:07.000Z | 2019-03-18T21:33:18.000Z | lib/mango_pay/preauthorization.ex | Eweev/mangopay-elixir | 7a4ff7b47c31bfa9a77d944803158f8297d51505 | [
"MIT"
] | 2 | 2020-06-22T09:31:41.000Z | 2020-06-22T09:34:23.000Z | defmodule MangoPay.PreAuthorization do
@moduledoc """
Functions for MangoPay [pre authorization](https://docs.mangopay.com/endpoints/v2.01/preauthorizations#e183_the-preauthorization-object).
"""
use MangoPay.Query.Base
set_path "preauthorizations"
@doc """
Get a preauthorization.
## Examples
{:... | 23.393617 | 139 | 0.552979 |
086342f12c1d6015f9268b439bd2adf74e3bd22c | 136 | exs | Elixir | start_point/test/hiker_test.exs | cyber-dojo-start-points/elixir-exunit | ebc7a55024105e368b700aa212bfd668f6011665 | [
"BSD-2-Clause"
] | null | null | null | start_point/test/hiker_test.exs | cyber-dojo-start-points/elixir-exunit | ebc7a55024105e368b700aa212bfd668f6011665 | [
"BSD-2-Clause"
] | null | null | null | start_point/test/hiker_test.exs | cyber-dojo-start-points/elixir-exunit | ebc7a55024105e368b700aa212bfd668f6011665 | [
"BSD-2-Clause"
] | null | null | null | defmodule HIKERTest do
use ExUnit.Case
test "life the universe and everything" do
assert HIKER.answer == 42
end
end
| 15.111111 | 45 | 0.676471 |
08636f846b3898fb5ec502f42fb4b4a31cd16aef | 1,468 | exs | Elixir | test/sentry_test.exs | mbta/sentry-elixir | ce417a69efec0eeb968a3c8fdcd61d3115c69875 | [
"MIT"
] | null | null | null | test/sentry_test.exs | mbta/sentry-elixir | ce417a69efec0eeb968a3c8fdcd61d3115c69875 | [
"MIT"
] | null | null | null | test/sentry_test.exs | mbta/sentry-elixir | ce417a69efec0eeb968a3c8fdcd61d3115c69875 | [
"MIT"
] | null | null | null | defmodule SentryTest do
use ExUnit.Case
import ExUnit.CaptureLog
import Sentry.TestEnvironmentHelper
test "excludes events properly" do
bypass = Bypass.open
Bypass.expect bypass, fn conn ->
{:ok, body, conn} = Plug.Conn.read_body(conn)
assert body =~ "RuntimeError"
assert conn.request_path... | 35.804878 | 128 | 0.678474 |
08638e033260f711ddcb1c62af22f8e7503241b9 | 820 | exs | Elixir | priv/repo/migrations/20170205004943_create_stock.exs | neilfulwiler/open_pantry | 4b705f2282c7b2365a784503c9f1bdd34c741798 | [
"MIT"
] | 41 | 2017-10-04T00:33:46.000Z | 2021-04-09T01:33:34.000Z | priv/repo/migrations/20170205004943_create_stock.exs | openpantry/open_pantry | 27d898a65dd6f44b325f48d41bc448bb486d9c6f | [
"MIT"
] | 74 | 2017-09-20T03:36:17.000Z | 2018-11-20T20:46:16.000Z | priv/repo/migrations/20170205004943_create_stock.exs | neilfulwiler/open_pantry | 4b705f2282c7b2365a784503c9f1bdd34c741798 | [
"MIT"
] | 12 | 2017-10-04T10:02:49.000Z | 2021-12-28T22:57:20.000Z | defmodule OpenPantry.Repo.Migrations.CreateStock do
use Ecto.Migration
def change do
create table(:stocks) do
add :quantity, :integer
add :arrival, :utc_datetime
add :expiration, :utc_datetime
add :reorder_quantity, :integer
add :aisle, :string
add :row, :string
add :s... | 30.37037 | 104 | 0.667073 |
0863b36b0796ce9feb21994f6f7b9d10e4523916 | 1,957 | exs | Elixir | lib/logger/test/logger/formatter_test.exs | sunaku/elixir | 8aa43eaedd76be8ac0d495049eb9ecd56971f4fe | [
"Apache-2.0"
] | null | null | null | lib/logger/test/logger/formatter_test.exs | sunaku/elixir | 8aa43eaedd76be8ac0d495049eb9ecd56971f4fe | [
"Apache-2.0"
] | null | null | null | lib/logger/test/logger/formatter_test.exs | sunaku/elixir | 8aa43eaedd76be8ac0d495049eb9ecd56971f4fe | [
"Apache-2.0"
] | null | null | null | defmodule Logger.FormatterTest do
use Logger.Case, async: true
doctest Logger.Formatter
import Logger.Formatter
defmodule CompileMod do
def format(_level, _msg, _ts, _md) do
true
end
end
test "compile/1 with nil" do
assert compile(nil) ==
[:time, " ", :metadata, "[", :level, ... | 30.107692 | 84 | 0.584568 |
0863b801c493e6f072881eb56f1fb9bfdb504d0d | 1,309 | exs | Elixir | apps/ewallet_api/test/ewallet_api/v1/views/settings_view_test.exs | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 322 | 2018-02-28T07:38:44.000Z | 2020-05-27T23:09:55.000Z | apps/ewallet_api/test/ewallet_api/v1/views/settings_view_test.exs | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 643 | 2018-02-28T12:05:20.000Z | 2020-05-22T08:34:38.000Z | apps/ewallet_api/test/ewallet_api/v1/views/settings_view_test.exs | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 63 | 2018-02-28T10:57:06.000Z | 2020-05-27T23:10:38.000Z | # Copyright 2018-2019 OmiseGO Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 31.166667 | 74 | 0.686784 |
0863b8189699add019e989a0855f83e4a5504945 | 722 | exs | Elixir | umbrella/apps/core/mix.exs | adamsnyk/elixir-goof | 73a59a681205a440401fdc0eb76f058d30487508 | [
"Apache-2.0"
] | null | null | null | umbrella/apps/core/mix.exs | adamsnyk/elixir-goof | 73a59a681205a440401fdc0eb76f058d30487508 | [
"Apache-2.0"
] | null | null | null | umbrella/apps/core/mix.exs | adamsnyk/elixir-goof | 73a59a681205a440401fdc0eb76f058d30487508 | [
"Apache-2.0"
] | 1 | 2021-11-29T16:27:10.000Z | 2021-11-29T16:27:10.000Z | defmodule Core.MixProject do
use Mix.Project
def project do
[
app: :core,
version: "0.1.0",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixir: "~> 1.7",
elixirc_paths: elixirc_paths(Mix... | 20.055556 | 53 | 0.549861 |
0863bf79b3f7459150c9c1d5d7ff6ba331a1a898 | 662 | ex | Elixir | onboarding/service/web/models/merchant_application_business_profile.ex | FoxComm/highlander | 1aaf8f9e5353b94c34d574c2a92206a1c363b5be | [
"MIT"
] | 10 | 2018-04-12T22:29:52.000Z | 2021-10-18T17:07:45.000Z | onboarding/service/web/models/merchant_application_business_profile.ex | FoxComm/highlander | 1aaf8f9e5353b94c34d574c2a92206a1c363b5be | [
"MIT"
] | null | null | null | onboarding/service/web/models/merchant_application_business_profile.ex | FoxComm/highlander | 1aaf8f9e5353b94c34d574c2a92206a1c363b5be | [
"MIT"
] | 1 | 2018-07-06T18:42:05.000Z | 2018-07-06T18:42:05.000Z | defmodule OnboardingService.MerchantApplicationBusinessProfile do
use OnboardingService.Web, :model
schema "merchant_application_business_profiles" do
belongs_to :merchant_application, OnboardingService.MerchantApplication
belongs_to :business_profile, OnboardingService.BusinessProfile
end
@required_... | 33.1 | 88 | 0.800604 |
0863d534a2747ceebfd24f442a550ec20e56a869 | 19,986 | ex | Elixir | lib/codes/codes_s74.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_s74.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_s74.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | defmodule IcdCode.ICDCode.Codes_S74 do
alias IcdCode.ICDCode
def _S7400XA do
%ICDCode{full_code: "S7400XA",
category_code: "S74",
short_code: "00XA",
full_name: "Injury of sciatic nerve at hip and thigh level, unspecified leg, initial encounter",
short_name: "Injury of sci... | 48.509709 | 122 | 0.662514 |
0863dd8d51535a50f4444080907be6e2617ff7c7 | 688 | ex | Elixir | lib/grafanawebhook_web/live/index.ex | juanpabloaj/grafana-webhook-monitor | 5ee5048d572bf0e42d6464c3096c0842c23b69d4 | [
"MIT"
] | 2 | 2019-10-31T16:22:36.000Z | 2020-04-29T19:31:42.000Z | lib/grafanawebhook_web/live/index.ex | juanpabloaj/grafana-webhook-monitor | 5ee5048d572bf0e42d6464c3096c0842c23b69d4 | [
"MIT"
] | 4 | 2019-10-16T20:13:41.000Z | 2021-05-10T16:54:26.000Z | lib/grafanawebhook_web/live/index.ex | juanpabloaj/grafana-webhook-monitor | 5ee5048d572bf0e42d6464c3096c0842c23b69d4 | [
"MIT"
] | null | null | null | defmodule GrafanawebhookWeb.Live.Index do
use Phoenix.LiveView
alias Grafanawebhook.Dashboard
def mount(_session, socket) do
if connected?(socket), do: Dashboard.subscribe()
{:ok, fetch(socket)}
end
def render(assigns) do
GrafanawebhookWeb.DashboardView.render("index.html", assigns)
end
de... | 22.193548 | 76 | 0.697674 |
0863f0e93c5eecdd46b03b36416c298833d25382 | 12,344 | exs | Elixir | test/plug/router_test.exs | CrowdHailer/plug | 22c96e556b83583bf56247c596ba137725f48bad | [
"Apache-2.0"
] | null | null | null | test/plug/router_test.exs | CrowdHailer/plug | 22c96e556b83583bf56247c596ba137725f48bad | [
"Apache-2.0"
] | null | null | null | test/plug/router_test.exs | CrowdHailer/plug | 22c96e556b83583bf56247c596ba137725f48bad | [
"Apache-2.0"
] | null | null | null | defmodule Plug.RouterTest do
defmodule Forward do
use Plug.Router
use Plug.ErrorHandler
plug :match
plug :dispatch
def call(conn, opts) do
super(conn, opts)
after
Process.put(:plug_forward_call, true)
end
get "/" do
resp(conn, 200, "forwarded")
end
get "/s... | 27.070175 | 98 | 0.627835 |
086405013878d676f356604ab4da93f45cbd47b9 | 14,299 | ex | Elixir | lib/iex/lib/iex/helpers.ex | Tica2/elixir | 6cf1dcbfe4572fc75619f05e40c10fd0844083ef | [
"Apache-2.0"
] | null | null | null | lib/iex/lib/iex/helpers.ex | Tica2/elixir | 6cf1dcbfe4572fc75619f05e40c10fd0844083ef | [
"Apache-2.0"
] | null | null | null | lib/iex/lib/iex/helpers.ex | Tica2/elixir | 6cf1dcbfe4572fc75619f05e40c10fd0844083ef | [
"Apache-2.0"
] | null | null | null | defmodule IEx.Helpers do
@moduledoc """
Welcome to Interactive Elixir. You are currently
seeing the documentation for the module `IEx.Helpers`
which provides many helpers to make Elixir's shell
more joyful to work with.
This message was triggered by invoking the helper
`h()`, usually referred to as `h/0`... | 25.998182 | 95 | 0.618295 |
08642fc92b4714f5d39f7f191290807f8f0955d3 | 1,601 | ex | Elixir | lib/auxilio_web.ex | HackathonSupport/auxilio | 7afc7372d0fbd902580a567be4cd106ece0d5b9b | [
"MIT"
] | null | null | null | lib/auxilio_web.ex | HackathonSupport/auxilio | 7afc7372d0fbd902580a567be4cd106ece0d5b9b | [
"MIT"
] | 1 | 2018-02-04T02:33:55.000Z | 2018-12-07T11:22:13.000Z | lib/auxilio_web.ex | HackathonSupport/auxilio | 7afc7372d0fbd902580a567be4cd106ece0d5b9b | [
"MIT"
] | null | null | null | defmodule AuxilioWeb do
@moduledoc """
The entrypoint for defining your web interface, such
as controllers, views, channels and so on.
This can be used in your application as:
use AuxilioWeb, :controller
use AuxilioWeb, :view
The definitions below will be executed for every view,
controller, ... | 23.544118 | 69 | 0.686446 |
086454a345b074bcd4b92abdba46b98c15894e8c | 2,219 | ex | Elixir | clients/cloud_resource_manager/lib/google_api/cloud_resource_manager/v3/model/search_organizations_response.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/cloud_resource_manager/lib/google_api/cloud_resource_manager/v3/model/search_organizations_response.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/cloud_resource_manager/lib/google_api/cloud_resource_manager/v3/model/search_organizations_response.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... | 44.38 | 390 | 0.7589 |
0864787b721fbe227308fa52b7b528a6f3655031 | 2,280 | ex | Elixir | lib/credo/build_info.ex | coryodaniel/credo | 840e9be99cb2ebcacb7d012e49b40714c0b37852 | [
"MIT"
] | null | null | null | lib/credo/build_info.ex | coryodaniel/credo | 840e9be99cb2ebcacb7d012e49b40714c0b37852 | [
"MIT"
] | null | null | null | lib/credo/build_info.ex | coryodaniel/credo | 840e9be99cb2ebcacb7d012e49b40714c0b37852 | [
"MIT"
] | null | null | null | defmodule Credo.BuildInfo do
@moduledoc false
# This is called at compile-time and should not be used at runtime!
@doc false
def version(mix_version) do
version(mix_version, git_info())
end
defp version(mix_version, nil) do
mix_version
end
defp version(mix_version, git_info) do
version =... | 21.308411 | 77 | 0.564474 |
0864bccd9cea8dae103400cfb845a4d9a4d3f748 | 5,132 | exs | Elixir | test/scenic/component/input/slider_list_test.exs | bruceme/scenic | bd8a1e63c122c44cc263e1fb5dfab2547ce8ef43 | [
"Apache-2.0"
] | null | null | null | test/scenic/component/input/slider_list_test.exs | bruceme/scenic | bd8a1e63c122c44cc263e1fb5dfab2547ce8ef43 | [
"Apache-2.0"
] | null | null | null | test/scenic/component/input/slider_list_test.exs | bruceme/scenic | bd8a1e63c122c44cc263e1fb5dfab2547ce8ef43 | [
"Apache-2.0"
] | null | null | null | #
# Created by Boyd Multerer on 2021-05-16
# Copyright © 2021 Kry10 Limited. All rights reserved.
#
defmodule Scenic.Component.Input.SliderListTest do
use ExUnit.Case, async: false
doctest Scenic.Component.Input.Slider
alias Scenic.Graph
alias Scenic.Scene
alias Scenic.ViewPort.Input
alias Scenic.Compon... | 29.66474 | 105 | 0.620811 |
0864c9619f2712faa4481752016e718b19c74d2b | 847 | exs | Elixir | mix.exs | JackyChiu/pageviews | aaa9a45444befd12cd5b73b26f2629e1a5eb4be7 | [
"MIT"
] | null | null | null | mix.exs | JackyChiu/pageviews | aaa9a45444befd12cd5b73b26f2629e1a5eb4be7 | [
"MIT"
] | null | null | null | mix.exs | JackyChiu/pageviews | aaa9a45444befd12cd5b73b26f2629e1a5eb4be7 | [
"MIT"
] | null | null | null | defmodule Pageviews.MixProject do
use Mix.Project
def project do
[
app: :pageviews,
version: "0.1.0",
elixir: "~> 1.8",
start_permanent: Mix.env() == :prod,
deps: deps(),
escript: escript(),
aliases: aliases()
]
end
# Run "mix help compile.app" to learn about ... | 18.021277 | 59 | 0.543093 |
0864d89d462a5ac1efa88d0cf909dc518d311551 | 418 | ex | Elixir | episode06/test/web/views/json_post_view.ex | paulfioravanti/learn_phoenix | 3767f28b09bb5e740231dd261a0bfa8b3eea98d3 | [
"MIT"
] | null | null | null | episode06/test/web/views/json_post_view.ex | paulfioravanti/learn_phoenix | 3767f28b09bb5e740231dd261a0bfa8b3eea98d3 | [
"MIT"
] | null | null | null | episode06/test/web/views/json_post_view.ex | paulfioravanti/learn_phoenix | 3767f28b09bb5e740231dd261a0bfa8b3eea98d3 | [
"MIT"
] | null | null | null | defmodule Test.JSONPostView do
use Test.Web, :view
def render("index.json", %{json_posts: json_posts}) do
%{data: render_many(json_posts, Test.JSONPostView, "json_post.json")}
end
def render("show.json", %{json_post: json_post}) do
%{data: render_one(json_post, Test.JSONPostView, "json_post.json")}
... | 26.125 | 73 | 0.696172 |
0864f99893ba007baeb6cc2541d0e74a9a1e88c1 | 2,156 | ex | Elixir | lib/terraform.ex | tilo/terraform | 6315b34ddd6998d89fe67c6d979aae0a8673693d | [
"MIT"
] | 417 | 2016-08-08T06:24:51.000Z | 2022-02-20T12:34:14.000Z | lib/terraform.ex | tilo/terraform | 6315b34ddd6998d89fe67c6d979aae0a8673693d | [
"MIT"
] | 11 | 2016-08-08T01:07:45.000Z | 2021-06-29T11:54:50.000Z | lib/terraform.ex | tilo/terraform | 6315b34ddd6998d89fe67c6d979aae0a8673693d | [
"MIT"
] | 17 | 2016-08-16T00:12:44.000Z | 2021-07-27T05:04:36.000Z | defmodule Terraform do
@moduledoc """
A simple plug designed to work with Phoenix. Terraform allows you to incrementally transform an older API into one powered by Phoenix - one endpoint at a time.
## Usage
First, add to your router:
defmodule MyApp.Router do
use Terraform, terraformer: MyApp.T... | 30.366197 | 302 | 0.647959 |
086510310d41782fd9b8e3bfa4ec6eeef4fea64d | 969 | ex | Elixir | backend/lib/getaways/accounts/user.ex | Prumme/Projet_phx_ex_gql | 6324af91f94f96ee1f8403d5397ab930347e3e4f | [
"Unlicense"
] | null | null | null | backend/lib/getaways/accounts/user.ex | Prumme/Projet_phx_ex_gql | 6324af91f94f96ee1f8403d5397ab930347e3e4f | [
"Unlicense"
] | 6 | 2020-01-31T19:44:15.000Z | 2021-09-02T04:26:49.000Z | backend/lib/getaways/accounts/user.ex | Prumme/Projet_phx_ex_gql | 6324af91f94f96ee1f8403d5397ab930347e3e4f | [
"Unlicense"
] | null | null | null | defmodule Getaways.Accounts.User do
use Ecto.Schema
import Ecto.Changeset
schema "users" do
field :username, :string
field :email, :string
field :password_hash, :string
field :password, :string, virtual: true
has_many :bookings, Getaways.Vacation.Booking
has_many :reviews, Getaways.Vacat... | 24.846154 | 77 | 0.676987 |
0865174e92e89945da17f349842c22f2a84dbe6c | 1,395 | ex | Elixir | lib/ecto/adapter/migrations.ex | joshnuss/ecto | 17cc8d7ac39cd4f9331f2ff461f7d64ecebde9f0 | [
"Apache-2.0"
] | null | null | null | lib/ecto/adapter/migrations.ex | joshnuss/ecto | 17cc8d7ac39cd4f9331f2ff461f7d64ecebde9f0 | [
"Apache-2.0"
] | null | null | null | lib/ecto/adapter/migrations.ex | joshnuss/ecto | 17cc8d7ac39cd4f9331f2ff461f7d64ecebde9f0 | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.Adapter.Migrations do
@moduledoc """
Specifies the adapter migrations API.
"""
use Behaviour
alias Ecto.Migration.Table
alias Ecto.Migration.Index
alias Ecto.Migration.Reference
@typedoc "All migration commands"
@type command ::
raw :: String.t |
{:create, Table.t, [table_su... | 28.469388 | 79 | 0.658781 |
086541169a10a41234948006d836a6f4a93edb49 | 5,018 | ex | Elixir | clients/content/lib/google_api/content/v21/model/order_promotion.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/content/lib/google_api/content/v21/model/order_promotion.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/content/lib/google_api/content/v21/model/order_promotion.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... | 62.725 | 485 | 0.69729 |
086558cf813905b78b4072fe8a8beeac3bc91dcf | 572 | ex | Elixir | lib/jeopardy_web/plugs.ex | banzr/CS4550proj2 | 4e7ce6098c2a8a9fe38dab1d83e52ef9e3247f2c | [
"MIT"
] | null | null | null | lib/jeopardy_web/plugs.ex | banzr/CS4550proj2 | 4e7ce6098c2a8a9fe38dab1d83e52ef9e3247f2c | [
"MIT"
] | 2 | 2020-04-30T14:14:00.000Z | 2020-07-07T20:57:31.000Z | lib/jeopardy_web/plugs.ex | banzr/CS4550proj2 | 4e7ce6098c2a8a9fe38dab1d83e52ef9e3247f2c | [
"MIT"
] | null | null | null | defmodule JeopardyWeb.Plugs do
import Plug.Conn
alias Jeopardy.Sessions
def fetch_user(conn, _opts) do
user_id = get_session(conn, :user_id)
if user_id do
user = Jeopardy.Users.get_user!(user_id)
assign(conn, :current_user, user)
else
assign(conn, :current_user, nil)
end
end
... | 22.88 | 56 | 0.699301 |
08657fbd7216fe3e610802113e4c87aa34cfb946 | 13,411 | ex | Elixir | lib/rayex/structs.ex | shiryel/rayex | 20cbffe788ef9df66d3e8ff918fe16a040aff737 | [
"Apache-2.0"
] | 8 | 2021-08-06T16:12:53.000Z | 2022-02-07T21:23:00.000Z | lib/rayex/structs.ex | shiryel/rayex | 20cbffe788ef9df66d3e8ff918fe16a040aff737 | [
"Apache-2.0"
] | 3 | 2021-07-31T20:04:29.000Z | 2021-12-17T19:52:41.000Z | lib/rayex/structs.ex | shiryel/rayex | 20cbffe788ef9df66d3e8ff918fe16a040aff737 | [
"Apache-2.0"
] | 3 | 2021-07-30T06:20:00.000Z | 2022-02-23T22:33:31.000Z | defmodule Rayex.Structs.Vector2 do
@moduledoc "Vector2"
@enforce_keys ~w[x y]a
defstruct ~w[x y]a
@type t :: %__MODULE__{x: float(), y: float()}
end
defmodule Rayex.Structs.Vector3 do
@moduledoc "Vector3"
@enforce_keys ~w[x y z]a
defstruct ~w[x y z]a
@type t :: %__MODULE__{x: float(), y: float(), z: ... | 27.651546 | 114 | 0.646559 |
08659ffb28ae4b3837e866580adeea5f8fcd1625 | 843 | ex | Elixir | lib/socket/handler/core/heartbeat.ex | sb8244/grapevine | effaaa01294d30114090c20f9cc40b8665d834f2 | [
"MIT"
] | null | null | null | lib/socket/handler/core/heartbeat.ex | sb8244/grapevine | effaaa01294d30114090c20f9cc40b8665d834f2 | [
"MIT"
] | null | null | null | lib/socket/handler/core/heartbeat.ex | sb8244/grapevine | effaaa01294d30114090c20f9cc40b8665d834f2 | [
"MIT"
] | null | null | null | defmodule Socket.Handler.Core.Heartbeat do
@moduledoc """
Handle a heartbeat internally to Grapevine
"""
require Logger
def handle(state = %{status: "inactive"}) do
state = Map.put(state, :heartbeat_count, state.heartbeat_count + 1)
case state.heartbeat_count > 3 do
true ->
:telemetry... | 24.794118 | 93 | 0.606168 |
0865c129bf4b8f7482433d6ee3d70d7a6d20dda5 | 1,163 | ex | Elixir | examples/alarm/lib/alarm.ex | asummers/grovepi | 8092fd704457265929e4d9676bedd8cf2176f48d | [
"Apache-2.0"
] | 34 | 2017-08-28T22:44:59.000Z | 2022-02-15T06:37:40.000Z | examples/alarm/lib/alarm.ex | schainks/grovepi | 2de21f12a2ab28f9788a2add4c6409871e098479 | [
"Apache-2.0"
] | 19 | 2017-08-14T17:27:44.000Z | 2019-05-26T02:49:39.000Z | examples/alarm/lib/alarm.ex | schainks/grovepi | 2de21f12a2ab28f9788a2add4c6409871e098479 | [
"Apache-2.0"
] | 5 | 2017-09-06T02:20:28.000Z | 2020-03-29T06:05:16.000Z | defmodule Alarm do
@moduledoc false
use Application
# Pick ports that work on both the GrovePi+ and GrovePi Zero
@button_pin 14 # Port A0
@buzzer_pin 3 # Port D3
def start(_type, _args) do
import Supervisor.Spec, warn: false
children = [
# Start the GrovePi sensors that we want
worke... | 22.365385 | 62 | 0.645744 |
0865c3d9b64b1a3945db56cdf1df1f523c631c23 | 615 | exs | Elixir | apps/day05/mix.exs | jochumb/aoc2017 | 813851fcab9270adea1bc532335f2228f5c015be | [
"MIT"
] | null | null | null | apps/day05/mix.exs | jochumb/aoc2017 | 813851fcab9270adea1bc532335f2228f5c015be | [
"MIT"
] | null | null | null | apps/day05/mix.exs | jochumb/aoc2017 | 813851fcab9270adea1bc532335f2228f5c015be | [
"MIT"
] | null | null | null | defmodule Day05.Mixfile do
use Mix.Project
def project do
[
app: :day05,
version: "0.1.0",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixir: "~> 1.5",
start_permanent: Mix.env == :prod... | 19.21875 | 59 | 0.554472 |
0865cac982aa2bb13dbf591977bd6e1b93d7bd87 | 1,539 | ex | Elixir | clients/big_query/lib/google_api/big_query/v2/model/test_iam_permissions_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/big_query/lib/google_api/big_query/v2/model/test_iam_permissions_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/big_query/lib/google_api/big_query/v2/model/test_iam_permissions_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 32.744681 | 143 | 0.746589 |
0865ea84b025a43cb31797c8edd700f2767fff06 | 1,286 | ex | Elixir | lib/step_flow/amqp/common_emitter.ex | mathiaHT/ex_step_flow | 6496e9511239de64f00119428476338dfcde9dea | [
"MIT"
] | 4 | 2019-12-07T05:18:26.000Z | 2020-11-06T23:28:43.000Z | lib/step_flow/amqp/common_emitter.ex | mathiaHT/ex_step_flow | 6496e9511239de64f00119428476338dfcde9dea | [
"MIT"
] | 53 | 2020-01-06T11:23:09.000Z | 2021-06-25T15:30:07.000Z | lib/step_flow/amqp/common_emitter.ex | mathiaHT/ex_step_flow | 6496e9511239de64f00119428476338dfcde9dea | [
"MIT"
] | 3 | 2020-01-30T15:37:40.000Z | 2020-10-27T14:10:02.000Z | defmodule StepFlow.Amqp.CommonEmitter do
@moduledoc """
A common emitter to send job orders to workers.
"""
require Logger
alias StepFlow.Amqp.Connection
alias StepFlow.Metrics.JobInstrumenter
@doc """
Publish a message.
Example:
```elixir
StepFlow.Amqp.CommonEmitter.publish_json("my_rabbit_mq_... | 22.172414 | 96 | 0.66563 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.