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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7437741f54b37d7cb3b1a43dea6cbf9fb9668cf6 | 6,234 | ex | Elixir | lib/mix/lib/mix/tasks/compile.ex | bruteforcecat/elixir | 2013b4dc34cd65953615f71e721e2e9c3949ec85 | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/tasks/compile.ex | bruteforcecat/elixir | 2013b4dc34cd65953615f71e721e2e9c3949ec85 | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/tasks/compile.ex | bruteforcecat/elixir | 2013b4dc34cd65953615f71e721e2e9c3949ec85 | [
"Apache-2.0"
] | null | null | null | defmodule Mix.Tasks.Compile do
use Mix.Task.Compiler
@shortdoc "Compiles source files"
@moduledoc """
The main entry point to compile source files.
It simply runs the compilers registered in your project and returns
a tuple with the compilation status and a list of diagnostics.
Before compiling code, ... | 28.995349 | 92 | 0.642765 |
7437fa0a37b9687f71ef79f4a7bd12ce93b2cf7f | 87 | exs | Elixir | apps/app_with_brunch/test/views/layout_view_test.exs | jschoch/umb | 98e4ca8b883777c775d2b1115ae5116cc32570fe | [
"MIT"
] | null | null | null | apps/app_with_brunch/test/views/layout_view_test.exs | jschoch/umb | 98e4ca8b883777c775d2b1115ae5116cc32570fe | [
"MIT"
] | null | null | null | apps/app_with_brunch/test/views/layout_view_test.exs | jschoch/umb | 98e4ca8b883777c775d2b1115ae5116cc32570fe | [
"MIT"
] | null | null | null | defmodule AppWithBrunch.LayoutViewTest do
use AppWithBrunch.ConnCase, async: true
end | 29 | 41 | 0.850575 |
74380b24d1eb1a942ee05c46fbddcd73eb7031f2 | 2,989 | ex | Elixir | lib/ex_bitmex/rest/orders.ex | eduardoscottini/ex_bitmex | f8528bd635922e1777a5b01ea4941d625da7396e | [
"MIT"
] | null | null | null | lib/ex_bitmex/rest/orders.ex | eduardoscottini/ex_bitmex | f8528bd635922e1777a5b01ea4941d625da7396e | [
"MIT"
] | null | null | null | lib/ex_bitmex/rest/orders.ex | eduardoscottini/ex_bitmex | f8528bd635922e1777a5b01ea4941d625da7396e | [
"MIT"
] | null | null | null | defmodule ExBitmex.Rest.Orders do
alias ExBitmex.Rest
@type credentials :: ExBitmex.Credentials.t()
@type order :: ExBitmex.Order.t()
@type rate_limit :: ExBitmex.RateLimit.t()
@type auth_error_reason :: Rest.HTTPClient.auth_error_reason()
@type params :: map
@type insufficient_balance_error_reason :: {:... | 32.48913 | 93 | 0.651723 |
74380d55b5dfd528a65be27c01034f8a0cc0ab96 | 286 | ex | Elixir | servy/codes/simple_timer.ex | herminiotorres/pragmaticstudio | 273647694519fd4149716abf190eb8d97102f488 | [
"MIT"
] | null | null | null | servy/codes/simple_timer.ex | herminiotorres/pragmaticstudio | 273647694519fd4149716abf190eb8d97102f488 | [
"MIT"
] | null | null | null | servy/codes/simple_timer.ex | herminiotorres/pragmaticstudio | 273647694519fd4149716abf190eb8d97102f488 | [
"MIT"
] | null | null | null | defmodule Timer do
def remind(reminder, seconds) do
spawn(fn ->
ms = seconds * 1000
ms |> :timer.sleep
IO.puts reminder
end)
end
end
Timer.remind("Stand Up", 5)
Timer.remind("Sit Down", 10)
Timer.remind("Fight, Fight, Fight", 15)
:timer.sleep(:infinity)
| 17.875 | 39 | 0.636364 |
74381d189dcd4b335bb9b7bfe949ccc123d10d09 | 261 | exs | Elixir | priv/repo/migrations/20160709204613_create_organization.exs | marick/eecrit | 50b1ebeadc5cf21ea9f9df6add65e4d7037e2482 | [
"MIT"
] | 10 | 2016-07-15T15:57:33.000Z | 2018-06-09T00:40:46.000Z | priv/repo/migrations/20160709204613_create_organization.exs | marick/eecrit | 50b1ebeadc5cf21ea9f9df6add65e4d7037e2482 | [
"MIT"
] | null | null | null | priv/repo/migrations/20160709204613_create_organization.exs | marick/eecrit | 50b1ebeadc5cf21ea9f9df6add65e4d7037e2482 | [
"MIT"
] | 6 | 2016-07-15T15:57:41.000Z | 2018-03-22T16:38:00.000Z | defmodule Eecrit.Repo.Migrations.CreateOrganization do
use Ecto.Migration
def change do
create table(:organizations) do
add :short_name, :string, null: false
add :full_name, :string, null: false
timestamps
end
end
end
| 20.076923 | 54 | 0.67433 |
743820e3ee28d482b215a0d70cd743a8434c1858 | 340 | ex | Elixir | lib/metadata/extracter.ex | sohjiro/ex_ebook | 4d5d72fbb880a7b25b1c5e217d0a9b679d0496ac | [
"MIT"
] | null | null | null | lib/metadata/extracter.ex | sohjiro/ex_ebook | 4d5d72fbb880a7b25b1c5e217d0a9b679d0496ac | [
"MIT"
] | null | null | null | lib/metadata/extracter.ex | sohjiro/ex_ebook | 4d5d72fbb880a7b25b1c5e217d0a9b679d0496ac | [
"MIT"
] | null | null | null | defmodule ExEbook.Extracter do
@moduledoc """
Extracter behaviour for ebooks
"""
@callback read_file(path :: String.t()) :: {:ok, String.t()}
@callback extract_metadata(data :: String.t()) :: map()
@callback transform(information :: map()) :: %ExEbook.Metadata{}
@callback extract_image(path :: map()) :: ... | 30.909091 | 66 | 0.655882 |
74382eb6a122697174e227f5f07f6360318777ca | 386 | ex | Elixir | server/lib/db/user.ex | rafbgarcia/conn | e23e09a8be900bc72c083780693d0fe5bd7cbd99 | [
"MIT"
] | null | null | null | server/lib/db/user.ex | rafbgarcia/conn | e23e09a8be900bc72c083780693d0fe5bd7cbd99 | [
"MIT"
] | 3 | 2021-04-27T14:11:46.000Z | 2021-04-27T16:00:42.000Z | server/lib/db/user.ex | rafbgarcia/conn | e23e09a8be900bc72c083780693d0fe5bd7cbd99 | [
"MIT"
] | null | null | null | defmodule Db.User do
use Cassandrax.Schema
import Ecto.Changeset
alias Db.{User}
@primary_key [:server_id, :id]
table "users" do
field(:server_id, :string)
field(:id, :integer)
field(:name, :string)
end
def new(attrs) do
%User{}
|> cast(attrs, [
:server_id,
:id,
:... | 15.44 | 43 | 0.588083 |
7438512a5edf58d50b5adc4bb6d550ab7d26dac3 | 1,818 | ex | Elixir | clients/you_tube/lib/google_api/you_tube/v3/model/live_chat_new_sponsor_details.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/you_tube/lib/google_api/you_tube/v3/model/live_chat_new_sponsor_details.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/you_tube/lib/google_api/you_tube/v3/model/live_chat_new_sponsor_details.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... | 36.36 | 239 | 0.736524 |
743872c8c7d9d4f25eb6620b9559859e80a7bf60 | 2,258 | ex | Elixir | lib/vehicle_monitor.ex | rhumbertgz/mivbm | ce710cf9c4e9f12b741714c8e5153bc4bd8cf9c4 | [
"Apache-2.0"
] | 1 | 2019-05-27T17:22:12.000Z | 2019-05-27T17:22:12.000Z | lib/vehicle_monitor.ex | rhumbertgz/mivbm | ce710cf9c4e9f12b741714c8e5153bc4bd8cf9c4 | [
"Apache-2.0"
] | null | null | null | lib/vehicle_monitor.ex | rhumbertgz/mivbm | ce710cf9c4e9f12b741714c8e5153bc4bd8cf9c4 | [
"Apache-2.0"
] | null | null | null | defmodule MIVBM.VehicleMonitor do
@moduledoc """
Documentation for Mivbm.
"""
use GenServer
require Logger
alias MIVBC.VehiclePositionByLine.Line
alias MIVBM.CoordinatesManager
def monitor(lines, token, observer) do
GenServer.start_link(__MODULE__, {lines, token, observer})
end
@impl true
d... | 32.257143 | 121 | 0.643933 |
7438776375c3cb0ae976c4c09c23f76422031954 | 336 | exs | Elixir | exercises/collatz-conjecture/collatz_conjecture.exs | darktef/elixir-exercism | bcaae351486b1405f0a01cd33b4d39555546298e | [
"MIT"
] | null | null | null | exercises/collatz-conjecture/collatz_conjecture.exs | darktef/elixir-exercism | bcaae351486b1405f0a01cd33b4d39555546298e | [
"MIT"
] | null | null | null | exercises/collatz-conjecture/collatz_conjecture.exs | darktef/elixir-exercism | bcaae351486b1405f0a01cd33b4d39555546298e | [
"MIT"
] | null | null | null | defmodule CollatzConjecture do
@doc """
calc/1 takes an integer and returns the number of steps required to get the
number to 1 when following the rules:
- if number is odd, multiply with 3 and add 1
- if number is even, divide by 2
"""
@spec calc(number :: pos_integer) :: pos_integer
def calc(inpu... | 25.846154 | 77 | 0.696429 |
743893a455a319116c3a79c143ba0d806bcb73c1 | 4,559 | ex | Elixir | lib/scrub/cip/symbol.ex | IslandUsurper/scrub | e36f1c602d53b2534084d8ba21100687a698a1be | [
"Apache-2.0"
] | 3 | 2020-04-30T13:53:42.000Z | 2021-04-20T16:53:54.000Z | lib/scrub/cip/symbol.ex | IslandUsurper/scrub | e36f1c602d53b2534084d8ba21100687a698a1be | [
"Apache-2.0"
] | 3 | 2020-05-04T19:21:21.000Z | 2021-03-31T23:00:36.000Z | lib/scrub/cip/symbol.ex | IslandUsurper/scrub | e36f1c602d53b2534084d8ba21100687a698a1be | [
"Apache-2.0"
] | 1 | 2021-12-14T20:31:29.000Z | 2021-12-14T20:31:29.000Z | defmodule Scrub.CIP.Symbol do
import Scrub.BinaryUtils, warn: false
alias Scrub.CIP
@services [
get_instance_attribute_list: 0x55
]
def encode_service(:get_instance_attribute_list, opts \\ []) do
instance_id = opts[:instance_id] || 0
class = opts[:class] || 0x6B
request_words = 3
requ... | 27.79878 | 99 | 0.60386 |
743896310b3f2bc3cfe7675890e59ec95ef64c8e | 5,063 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/router.ex | jechol/elixir-google-api | 0290b683dfc6491ca2ef755a80bc329378738d03 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/router.ex | jechol/elixir-google-api | 0290b683dfc6491ca2ef755a80bc329378738d03 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/router.ex | jechol/elixir-google-api | 0290b683dfc6491ca2ef755a80bc329378738d03 | [
"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... | 58.872093 | 490 | 0.700178 |
7438966455bc72c5740bb9e0ac4b9a9454411d71 | 2,928 | ex | Elixir | lib/membrane/rtcp/parser.ex | membraneframework/membrane_rtp | 1df5f0bdb66d5c89bc63122c8b29af6cd4e600aa | [
"Apache-2.0"
] | null | null | null | lib/membrane/rtcp/parser.ex | membraneframework/membrane_rtp | 1df5f0bdb66d5c89bc63122c8b29af6cd4e600aa | [
"Apache-2.0"
] | 2 | 2020-04-01T14:06:34.000Z | 2020-04-08T11:48:59.000Z | lib/membrane/rtcp/parser.ex | membraneframework/membrane_rtp | 1df5f0bdb66d5c89bc63122c8b29af6cd4e600aa | [
"Apache-2.0"
] | null | null | null | defmodule Membrane.RTCP.Parser do
@moduledoc """
Element responsible for receiving raw RTCP packets, parsing them and emitting proper RTCP events.
"""
use Membrane.Filter
alias Membrane.Buffer
alias Membrane.{RTCP, RTCPEvent, RemoteStream}
require Membrane.Logger
def_input_pad :input,
caps: {Rem... | 26.618182 | 99 | 0.658128 |
7438975ba3f9e46f256a7ad91eb5441744fa74fe | 1,408 | exs | Elixir | test/storage/dets_test.exs | g1ntas/ex-accio | 18f82b8dba1dbb0087505a3016259ae936a62fbe | [
"MIT"
] | null | null | null | test/storage/dets_test.exs | g1ntas/ex-accio | 18f82b8dba1dbb0087505a3016259ae936a62fbe | [
"MIT"
] | null | null | null | test/storage/dets_test.exs | g1ntas/ex-accio | 18f82b8dba1dbb0087505a3016259ae936a62fbe | [
"MIT"
] | null | null | null | defmodule Accio.Storage.DETSTest do
use ExUnit.Case
alias Accio.Storage.DETS
test "it should insert data into the storage file" do
defmodule DETSInsertMock do
def insert(:table, {:key, "data"}), do: :ok
end
assert DETS.insert(:table, :key, "data", DETSInsertMock) === :ok
end
test "it sho... | 26.074074 | 81 | 0.649148 |
7438b1dbff0f250ae800decb40b5500b867f5f2b | 390 | exs | Elixir | clients/classroom/test/test_helper.exs | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/classroom/test/test_helper.exs | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/classroom/test/test_helper.exs | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | 1 | 2020-11-10T16:58:27.000Z | 2020-11-10T16:58:27.000Z | ExUnit.start()
defmodule GoogleApi.Classroom.V1.TestHelper do
defmacro __using__(opts) do
quote do
use ExUnit.Case, unquote(opts)
import GoogleApi.Classroom.V1.TestHelper
end
end
def for_scope(scopes) when is_list(scopes), do: for_scope(Enum.join(scopes, " "))
def for_scope(scope) do
... | 20.526316 | 83 | 0.7 |
7438e55e65efcce08d66cb5aa0f230b3c9e4c023 | 1,866 | ex | Elixir | lib/advanced_pool/cluster_management_framework/structures/cluster/state_entity.ex | noizu-labs/SimplePoolAdvanced | 9555071e42917d280c7ce4846c19ef208c77f14e | [
"MIT"
] | null | null | null | lib/advanced_pool/cluster_management_framework/structures/cluster/state_entity.ex | noizu-labs/SimplePoolAdvanced | 9555071e42917d280c7ce4846c19ef208c77f14e | [
"MIT"
] | null | null | null | lib/advanced_pool/cluster_management_framework/structures/cluster/state_entity.ex | noizu-labs/SimplePoolAdvanced | 9555071e42917d280c7ce4846c19ef208c77f14e | [
"MIT"
] | null | null | null | #-------------------------------------------------------------------------------
# Author: Keith Brings
# Copyright (C) 2020 Noizu Labs, Inc. All rights reserved.
#-------------------------------------------------------------------------------
defmodule Noizu.AdvancedPool.V3.ClusterManagement.Cluster.State do
... | 31.1 | 135 | 0.603966 |
7438fc31cd74e5dfba4babfcadbd1ca566701f65 | 321 | exs | Elixir | test/shared/cache_test.exs | vasuadari/nebulex_memcached_adapter | fe235008ca2f363fcfbf39f770d814e7378e5d73 | [
"MIT"
] | 4 | 2019-03-04T19:39:26.000Z | 2019-03-06T15:39:46.000Z | test/shared/cache_test.exs | vasuadari/nebulex_memcached_adapter | fe235008ca2f363fcfbf39f770d814e7378e5d73 | [
"MIT"
] | 1 | 2019-01-11T19:38:01.000Z | 2019-01-11T19:38:01.000Z | test/shared/cache_test.exs | cabol/nebulex_memcached_adapter | 24d42b415c1d1782c8e37d0ecffb94eb32ed95df | [
"MIT"
] | null | null | null | defmodule NebulexMemcachedAdapter.CacheTest do
@moduledoc """
Shared Tests
"""
defmacro __using__(opts) do
quote bind_quoted: [opts: opts] do
@cache Keyword.fetch!(opts, :cache)
use Nebulex.Cache.ObjectTest, cache: @cache
use Nebulex.Cache.TransactionTest, cache: @cache
end
end
end... | 21.4 | 54 | 0.691589 |
743931296a655112e319cf760a6f57fdd9827bbb | 652 | ex | Elixir | example/lib/example/application.ex | arjan/sworm | a76a5fed2108db2a58615cd2d1721139d608ef23 | [
"MIT"
] | 21 | 2019-05-15T09:43:20.000Z | 2021-01-12T10:04:47.000Z | example/lib/example/application.ex | arjan/sworm | a76a5fed2108db2a58615cd2d1721139d608ef23 | [
"MIT"
] | 1 | 2019-05-30T09:18:28.000Z | 2019-08-16T13:41:38.000Z | example/lib/example/application.ex | arjan/sworm | a76a5fed2108db2a58615cd2d1721139d608ef23 | [
"MIT"
] | null | null | null | defmodule Example.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
# List all child processes to be supervised
children = [
Example.Swarm
]
spawn(fn ->
Process.s... | 24.148148 | 61 | 0.662577 |
74395cea9d00bebe199a0cd384487af9240948c1 | 5,411 | ex | Elixir | lib/ecto/repo/model.ex | joshnuss/ecto | 17cc8d7ac39cd4f9331f2ff461f7d64ecebde9f0 | [
"Apache-2.0"
] | null | null | null | lib/ecto/repo/model.ex | joshnuss/ecto | 17cc8d7ac39cd4f9331f2ff461f7d64ecebde9f0 | [
"Apache-2.0"
] | null | null | null | lib/ecto/repo/model.ex | joshnuss/ecto | 17cc8d7ac39cd4f9331f2ff461f7d64ecebde9f0 | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.Repo.Model do
# The module invoked by user defined repos
# for model related functionality.
@moduledoc false
alias Ecto.Query.Planner
alias Ecto.Model.Callbacks
@doc """
Implementation for `Ecto.Repo.insert/2`.
"""
def insert(repo, adapter, %Ecto.Changeset{} = changeset, opts) when is... | 35.598684 | 86 | 0.683238 |
7439d1a7ed4f62e5df3d86fffb2cc522efb26105 | 11,339 | ex | Elixir | lib/boundary/checker.ex | sasa1977/boundaries | c6ed70dc07c37da14172761b4d08bc38d9d6594b | [
"MIT"
] | 133 | 2019-08-12T12:22:37.000Z | 2019-09-06T16:27:34.000Z | lib/boundary/checker.ex | sasa1977/boundaries | c6ed70dc07c37da14172761b4d08bc38d9d6594b | [
"MIT"
] | 7 | 2019-08-13T00:41:05.000Z | 2019-09-07T10:24:22.000Z | lib/boundary/checker.ex | sasa1977/boundaries | c6ed70dc07c37da14172761b4d08bc38d9d6594b | [
"MIT"
] | 2 | 2019-08-13T09:45:49.000Z | 2019-08-20T19:43:09.000Z | # credo:disable-for-this-file Credo.Check.Readability.Specs
defmodule Boundary.Checker do
@moduledoc false
def errors(view, references) do
Enum.concat([
invalid_config(view),
invalid_ignores(view),
ancestor_with_ignored_checks(view),
invalid_deps(view),
invalid_exports(view),
... | 35.323988 | 119 | 0.660552 |
7439e2d59a2fdebb83cf1061bf6c14932110e533 | 1,369 | exs | Elixir | test/telecms_web/td/client_test.exs | carbon-hvze/telecms | 72db81c4321cd85f8b516ef5ee1c169a7cc753d1 | [
"MIT"
] | 1 | 2022-02-17T03:00:39.000Z | 2022-02-17T03:00:39.000Z | test/telecms_web/td/client_test.exs | carbon-hvze/telecms | 72db81c4321cd85f8b516ef5ee1c169a7cc753d1 | [
"MIT"
] | null | null | null | test/telecms_web/td/client_test.exs | carbon-hvze/telecms | 72db81c4321cd85f8b516ef5ee1c169a7cc753d1 | [
"MIT"
] | null | null | null | defmodule TelecmsWeb.ClientTest do
use ExUnit.Case
def auth_state(state) do
%{
"@type" => "updateAuthorizationState",
"authorization_state" => %{"@type" => state}
}
end
test "auth flow goes brr" do
GenServer.call(:client, auth_state("authorizationStateWaitTdlibParameters"))
last_r... | 27.38 | 90 | 0.542001 |
7439e5899cc8b10771f3ae0d30134949fca3e514 | 2,025 | exs | Elixir | mix.exs | xtagon/snek | f659c66b586dcbec811c26e0a1f9a552b9878752 | [
"MIT"
] | 1 | 2020-09-06T18:56:49.000Z | 2020-09-06T18:56:49.000Z | mix.exs | xtagon/snek | f659c66b586dcbec811c26e0a1f9a552b9878752 | [
"MIT"
] | null | null | null | mix.exs | xtagon/snek | f659c66b586dcbec811c26e0a1f9a552b9878752 | [
"MIT"
] | null | null | null | defmodule Snek.MixProject do
use Mix.Project
def project do
[
app: :snek,
version: "0.4.0",
description: "A framework for simulating Battlesnake-compatible game rules in Elixir.",
package: package(),
elixir: "~> 1.10",
start_permanent: Mix.env() == :prod,
deps: deps(),... | 23.546512 | 93 | 0.532346 |
7439ee132c6d3e117e6502b0439f55751a1c8c73 | 1,883 | ex | Elixir | lib/game/format/proficiencies.ex | jgsmith/ex_venture | 546adaa8fe80d45a72fde6de8d8d6906902c12d4 | [
"MIT"
] | 2 | 2019-05-14T11:36:44.000Z | 2020-07-01T08:54:04.000Z | lib/game/format/proficiencies.ex | nickwalton/ex_venture | d8ff1b0181db03f9ddcb7610ae7ab533feecbfbb | [
"MIT"
] | null | null | null | lib/game/format/proficiencies.ex | nickwalton/ex_venture | d8ff1b0181db03f9ddcb7610ae7ab533feecbfbb | [
"MIT"
] | 1 | 2021-01-29T14:12:40.000Z | 2021-01-29T14:12:40.000Z | defmodule Game.Format.Proficiencies do
@moduledoc """
Formatting for proficiencies
"""
import Game.Format.Context
alias Game.Format
alias Game.Format.Table
def name(proficiency) do
context()
|> assign(:name, proficiency.name)
|> Format.template("{white}[name]{/white}")
end
def proficie... | 22.686747 | 72 | 0.651089 |
7439f42973d7a67e4f473e60c0b8f159a11a25d7 | 612 | ex | Elixir | lib/ex_stone_openbank/api/models/transfer/target/account.ex | duzzifelipe/ex-stone-openbank | 5a0faa547c3aa3d7f3842739e50cca6b14337124 | [
"Apache-2.0"
] | null | null | null | lib/ex_stone_openbank/api/models/transfer/target/account.ex | duzzifelipe/ex-stone-openbank | 5a0faa547c3aa3d7f3842739e50cca6b14337124 | [
"Apache-2.0"
] | null | null | null | lib/ex_stone_openbank/api/models/transfer/target/account.ex | duzzifelipe/ex-stone-openbank | 5a0faa547c3aa3d7f3842739e50cca6b14337124 | [
"Apache-2.0"
] | null | null | null | defmodule ExStoneOpenbank.API.Model.Transfer.Target.Account do
@moduledoc """
Account model
"""
use ExStoneOpenbank.Model
@fields [:account_code]
@optional [:branch_code, :institution_code]
embedded_schema do
field :account_code, :string
field :branch_code, :string
field :institution_ispb, :... | 23.538462 | 62 | 0.707516 |
7439fd458ed3af73027c9c7c2c378b4335144a60 | 1,334 | ex | Elixir | code/project/0/issues/lib/issues/cli.ex | alvarocamillont/introdu-o_elixir | 1d72d4f4b01d9312c4b066ce3c0fe8d9bfaaade1 | [
"MIT"
] | null | null | null | code/project/0/issues/lib/issues/cli.ex | alvarocamillont/introdu-o_elixir | 1d72d4f4b01d9312c4b066ce3c0fe8d9bfaaade1 | [
"MIT"
] | 1 | 2021-03-09T16:27:25.000Z | 2021-03-09T16:27:25.000Z | programming-elixir-book/code/project/0/issues/lib/issues/cli.ex | jordanhubbard/elixir-projects | dee341d672e83a45a17a4a85abd54a480f95c506 | [
"BSD-2-Clause"
] | null | null | null | #---
# Excerpted from "Programming Elixir ≥ 1.6",
# published by The Pragmatic Bookshelf.
# Copyrights apply to this code. It may not be used to create training material,
# courses, books, articles, and the like. Contact us if you are in doubt.
# We make no guarantees that this code is fit for any purpose.
# Visit http... | 26.68 | 85 | 0.630435 |
743a0f0069c69766502a80b6c6c85c25e62ec559 | 561 | exs | Elixir | day08/el_a.exs | mason-bially/aoc-2019 | f1cefa455b967d9d23dcd092be6242f8ff539c7a | [
"MIT"
] | 1 | 2019-12-13T22:44:09.000Z | 2019-12-13T22:44:09.000Z | day08/el_a.exs | mason-bially/aoc-2019 | f1cefa455b967d9d23dcd092be6242f8ff539c7a | [
"MIT"
] | null | null | null | day08/el_a.exs | mason-bially/aoc-2019 | f1cefa455b967d9d23dcd092be6242f8ff539c7a | [
"MIT"
] | 1 | 2019-12-05T21:06:06.000Z | 2019-12-05T21:06:06.000Z | Code.require_file("el.ex", __DIR__)
defmodule Day08.A do
end
width = 25
height = 6
layer_size = width * height
File.stream!("day08/input.txt", [encoding: :utf8], 1)
|> Stream.filter(fn c -> c >= "0" and c <= "9" end)
|> Stream.map(&elem(Integer.parse(&1), 0))
|> Stream.chunk_every(layer_size)
|> Stream.map(fn layer... | 23.375 | 88 | 0.614973 |
743a2550b1a754dad9faab297208d985b761ed5e | 2,124 | exs | Elixir | config/dev.exs | brandedux/phoenix_api | 3613d3d2a232a0d39cd125bd09cceee876fbf475 | [
"MIT"
] | 1 | 2019-09-25T22:03:14.000Z | 2019-09-25T22:03:14.000Z | config/dev.exs | brandedux/phoenix_api | 3613d3d2a232a0d39cd125bd09cceee876fbf475 | [
"MIT"
] | 2 | 2021-03-09T12:10:09.000Z | 2021-05-10T01:25:36.000Z | config/dev.exs | brandedux/phoenix_api | 3613d3d2a232a0d39cd125bd09cceee876fbf475 | [
"MIT"
] | null | null | null | use Mix.Config
# Configure your database
config :my_app, MyApp.Repo,
username: "postgres",
password: "postgres",
database: "my_app_dev",
hostname: "localhost",
show_sensitive_data_on_connection_error: true,
pool_size: 10
# For development, we disable any cache and enable
# debugging and code reloading.
#
... | 27.584416 | 68 | 0.688795 |
743a48fe6dc7695f39effa325fd17d06799e7ac4 | 1,861 | exs | Elixir | config/prod.exs | JairAlmazanM/porta_folio_umbrella | 456c7f90c08f654f37b07d861e974323a0b8c0f2 | [
"MIT"
] | null | null | null | config/prod.exs | JairAlmazanM/porta_folio_umbrella | 456c7f90c08f654f37b07d861e974323a0b8c0f2 | [
"MIT"
] | null | null | null | config/prod.exs | JairAlmazanM/porta_folio_umbrella | 456c7f90c08f654f37b07d861e974323a0b8c0f2 | [
"MIT"
] | null | null | null | import Config
# For production, don't forget to configure the url host
# to something meaningful, Phoenix uses this information
# when generating URLs.
#
# Note we also include the path to a cache manifest
# containing the digested version of static files. This
# manifest is generated by the `mix phx.digest` task,
# w... | 35.788462 | 66 | 0.709296 |
743a94bc8f9ee6d51cfabeaf62a58dca39064ef9 | 825 | ex | Elixir | lib/runlet/ctrl/ps.ex | msantos/runlet | d9cb44b113295387c296ab4576a09ca4a7ce0f7b | [
"ISC"
] | 4 | 2020-01-12T19:04:46.000Z | 2021-09-20T14:37:22.000Z | lib/runlet/ctrl/ps.ex | msantos/runlet | d9cb44b113295387c296ab4576a09ca4a7ce0f7b | [
"ISC"
] | null | null | null | lib/runlet/ctrl/ps.ex | msantos/runlet | d9cb44b113295387c296ab4576a09ca4a7ce0f7b | [
"ISC"
] | 1 | 2021-09-20T14:37:25.000Z | 2021-09-20T14:37:25.000Z | defmodule Runlet.Ctrl.Ps do
@moduledoc "List running processes"
@doc """
List running processes.
"""
@spec exec(Runlet.t()) :: Enumerable.t()
def exec(%Runlet{uid: uid} = env), do: exec(env, uid)
@doc """
List a user's running processes.
"""
@spec exec(Runlet.t(), String.t()) :: Enumerable.t()
d... | 22.297297 | 55 | 0.530909 |
743aa046039a7cc2068b4ab1b5aa87f3074543e6 | 2,597 | ex | Elixir | clients/document_ai/lib/google_api/document_ai/v1beta2/model/google_cloud_documentai_v1beta2_document_page_visual_element.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/document_ai/lib/google_api/document_ai/v1beta2/model/google_cloud_documentai_v1beta2_document_page_visual_element.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/document_ai/lib/google_api/document_ai/v1beta2/model/google_cloud_documentai_v1beta2_document_page_visual_element.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... | 36.069444 | 212 | 0.7397 |
743adff91dfefbf3bd6b5f718baf24c74292e814 | 8,063 | ex | Elixir | lib/ecto_schema_store/fetch.ex | onboardingsystems/ecto_schema_store | 120c929faecb686e3da685f411da66c80d7d0127 | [
"Apache-2.0"
] | null | null | null | lib/ecto_schema_store/fetch.ex | onboardingsystems/ecto_schema_store | 120c929faecb686e3da685f411da66c80d7d0127 | [
"Apache-2.0"
] | null | null | null | lib/ecto_schema_store/fetch.ex | onboardingsystems/ecto_schema_store | 120c929faecb686e3da685f411da66c80d7d0127 | [
"Apache-2.0"
] | null | null | null | defmodule EctoSchemaStore.Fetch do
@moduledoc false
defmacro build(schema, repo) do
quote do
defp __preload__(model, preload), do: preload_assocs(model, preload)
defp __to_map__(model, true), do: to_map(model)
defp __to_map__(model, false), do: model
defp __order_by__(query, nil), do:... | 32.123506 | 120 | 0.589731 |
743aea2f7cd11333e404376243f88700e49c941d | 1,912 | ex | Elixir | lib/teiserver/agents/in_out_agent_server.ex | badosu/teiserver | 19b623aeb7c2ab28756405f7486e92b714777c54 | [
"MIT"
] | 4 | 2021-07-29T16:23:20.000Z | 2022-02-23T05:34:36.000Z | lib/teiserver/agents/in_out_agent_server.ex | Jazcash/teiserver | fec14784901cb2965d8c1350fe84107c57451877 | [
"MIT"
] | 14 | 2021-08-01T02:36:14.000Z | 2022-01-30T21:15:03.000Z | lib/teiserver/agents/in_out_agent_server.ex | Jazcash/teiserver | fec14784901cb2965d8c1350fe84107c57451877 | [
"MIT"
] | 7 | 2021-05-13T12:55:28.000Z | 2022-01-14T06:39:06.000Z | defmodule Teiserver.Agents.InOutAgentServer do
use GenServer
alias Teiserver.Agents.AgentLib
require Logger
@tick_period 2000
@logout_chance 0.1
@login_chance 0.2
def handle_info(:startup, state) do
:timer.send_interval(@tick_period, self(), :tick)
{:noreply, do_login(state)}
end
def handl... | 20.782609 | 61 | 0.626569 |
743b1d587225d4cdae5e14f3f2660211c7fc94dd | 11,090 | ex | Elixir | lib/meeseeks/document.ex | mischov/meeseeks | 74f84010252da3298f8c74e90fdee1ab9ad6d700 | [
"Apache-2.0",
"MIT"
] | 291 | 2017-03-27T15:53:36.000Z | 2022-03-14T23:01:42.000Z | lib/meeseeks/document.ex | mischov/meeseeks | 74f84010252da3298f8c74e90fdee1ab9ad6d700 | [
"Apache-2.0",
"MIT"
] | 70 | 2017-03-30T23:32:34.000Z | 2021-06-27T06:26:28.000Z | lib/meeseeks/document.ex | mischov/meeseeks | 74f84010252da3298f8c74e90fdee1ab9ad6d700 | [
"Apache-2.0",
"MIT"
] | 23 | 2017-06-18T10:29:04.000Z | 2021-11-04T13:08:12.000Z | defmodule Meeseeks.Document do
@moduledoc """
A `Meeseeks.Document` represents a flattened, queryable view of an HTML
document in which:
- The nodes (element, comment, or text) have been provided an id
- Parent-child relationships have been made explicit
## Examples
The actual contents of a documen... | 30.054201 | 122 | 0.613436 |
743b440b6945f9a0e8edaae91808d99d3f201fb1 | 103 | exs | Elixir | .iex.exs | adam-phillips/letter_lines_elixir | 03ac93049b7a31d72650ef0dafdacc82737a7221 | [
"MIT"
] | null | null | null | .iex.exs | adam-phillips/letter_lines_elixir | 03ac93049b7a31d72650ef0dafdacc82737a7221 | [
"MIT"
] | 5 | 2020-05-12T05:46:44.000Z | 2020-06-13T09:46:09.000Z | .iex.exs | adam-phillips/letter_lines_elixir | 03ac93049b7a31d72650ef0dafdacc82737a7221 | [
"MIT"
] | null | null | null | alias LetterLinesElixir.BoardState
alias LetterLinesElixir.BoardWord
alias LetterLinesElixir.GameState
| 25.75 | 34 | 0.912621 |
743b5c438540549ec47099daf5d5c1bc4dd93cc4 | 966 | ex | Elixir | clients/service_broker/lib/google_api/service_broker/v1/request_builder.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/service_broker/lib/google_api/service_broker/v1/request_builder.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/service_broker/lib/google_api/service_broker/v1/request_builder.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... | 37.153846 | 77 | 0.76501 |
743b790c8ad27974db4c84db9af095e4f38e90ef | 1,981 | ex | Elixir | lib/tentacat/users.ex | reset/tentacat | 1a69f54ae9b4d79d27246c903c6ef42d2631b7c5 | [
"MIT"
] | null | null | null | lib/tentacat/users.ex | reset/tentacat | 1a69f54ae9b4d79d27246c903c6ef42d2631b7c5 | [
"MIT"
] | null | null | null | lib/tentacat/users.ex | reset/tentacat | 1a69f54ae9b4d79d27246c903c6ef42d2631b7c5 | [
"MIT"
] | null | null | null | defmodule Tentacat.Users do
import Tentacat
alias Tentacat.Client
@doc """
Get a single `user`
## Example
Tentacat.Users.find "edgurgel", client
Tentacat.Users.find "iurifq", client
More info at: http:\\developer.github.com/v3/users/#get-a-single-user
"""
@spec find(binary, Client.t) :: ... | 22.511364 | 83 | 0.657244 |
743b83890372de21b4122040c71f3b01b9129948 | 511 | ex | Elixir | lib/nomad_client/model/csi_topology.ex | mrmstn/nomad_client | a586022e5eb4d166acba08b55b198ec079d4b118 | [
"Apache-2.0"
] | 8 | 2021-09-04T21:22:53.000Z | 2022-02-22T22:48:38.000Z | lib/nomad_client/model/csi_topology.ex | mrmstn/nomad_client | a586022e5eb4d166acba08b55b198ec079d4b118 | [
"Apache-2.0"
] | null | null | null | lib/nomad_client/model/csi_topology.ex | mrmstn/nomad_client | a586022e5eb4d166acba08b55b198ec079d4b118 | [
"Apache-2.0"
] | null | null | null | # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://openapi-generator.tech
# Do not edit the class manually.
defmodule NomadClient.Model.CsiTopology do
@moduledoc """
"""
@derive [Poison.Encoder]
defstruct [
:Segments
]
@type t :: %__MODULE__{
... | 20.44 | 91 | 0.669276 |
743b89960e2f41785389c37eb37ba51610e92e13 | 3,871 | ex | Elixir | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_content_location.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_content_location.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_content_location.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... | 59.553846 | 509 | 0.754069 |
743b980894e31e0292da90c3384b6d5cd006afd6 | 3,021 | ex | Elixir | clients/container/lib/google_api/container/v1/model/set_node_pool_management_request.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/container/lib/google_api/container/v1/model/set_node_pool_management_request.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/container/lib/google_api/container/v1/model/set_node_pool_management_request.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... | 48.725806 | 258 | 0.718967 |
743bad64d2a5fec3a5e0e79e33b971205af57eb5 | 1,155 | exs | Elixir | lib/mix/test/mix/tasks/run_test.exs | guilleiguaran/elixir | 952052869ff7af0e293d2a7160b1aebc68fc46be | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/tasks/run_test.exs | guilleiguaran/elixir | 952052869ff7af0e293d2a7160b1aebc68fc46be | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/tasks/run_test.exs | guilleiguaran/elixir | 952052869ff7af0e293d2a7160b1aebc68fc46be | [
"Apache-2.0"
] | null | null | null | Code.require_file "../../test_helper.exs", __DIR__
defmodule Mix.Tasks.RunTest do
use MixTest.Case
defmodule GetApp do
def project do
[ app: :get_app,
version: "0.1.0",
deps: [
{ :git_repo, "0.1.0", git: MixTest.Case.fixture_path("git_repo") }
] ]
end
end
test ... | 25.666667 | 79 | 0.621645 |
743bb4ae89a5a4744c9e11c2e4ff3aced07b0d95 | 116 | exs | Elixir | test/grovepi/dht/default_trigger_test.exs | asummers/grovepi | 8092fd704457265929e4d9676bedd8cf2176f48d | [
"Apache-2.0"
] | 34 | 2017-08-28T22:44:59.000Z | 2022-02-15T06:37:40.000Z | test/grovepi/dht/default_trigger_test.exs | schainks/grovepi | 2de21f12a2ab28f9788a2add4c6409871e098479 | [
"Apache-2.0"
] | 19 | 2017-08-14T17:27:44.000Z | 2019-05-26T02:49:39.000Z | test/grovepi/dht/default_trigger_test.exs | schainks/grovepi | 2de21f12a2ab28f9788a2add4c6409871e098479 | [
"Apache-2.0"
] | 5 | 2017-09-06T02:20:28.000Z | 2020-03-29T06:05:16.000Z | defmodule GrovePi.DHT.DefaultTriggerTest do
use ExUnit.Case, async: true
doctest GrovePi.DHT.DefaultTrigger
end
| 23.2 | 43 | 0.818966 |
743bc0f152374d5a3731d7547648024cc9354469 | 1,037 | ex | Elixir | lib/blog_engine/application.ex | jpbrab0/blog-engine-elixir | 7d9394abdbe1963036f4bae9264efa27708236c2 | [
"Apache-2.0"
] | null | null | null | lib/blog_engine/application.ex | jpbrab0/blog-engine-elixir | 7d9394abdbe1963036f4bae9264efa27708236c2 | [
"Apache-2.0"
] | null | null | null | lib/blog_engine/application.ex | jpbrab0/blog-engine-elixir | 7d9394abdbe1963036f4bae9264efa27708236c2 | [
"Apache-2.0"
] | null | null | null | defmodule BlogEngine.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
children = [
# Start the Ecto repository
BlogEngine.Repo,
# Start the Telemetry supervisor
B... | 29.628571 | 68 | 0.70974 |
743bd6a4676e40c6e4ee4d6a59af720b26ada9c4 | 2,908 | ex | Elixir | lib/teslamate_web/live/signin_live/index.ex | jschollenberger/teslamate | a2129b1457ee42399cfedb78cdd6cc618ff691b1 | [
"MIT"
] | null | null | null | lib/teslamate_web/live/signin_live/index.ex | jschollenberger/teslamate | a2129b1457ee42399cfedb78cdd6cc618ff691b1 | [
"MIT"
] | 1 | 2022-03-30T14:40:12.000Z | 2022-03-30T14:40:12.000Z | lib/teslamate_web/live/signin_live/index.ex | jschollenberger/teslamate | a2129b1457ee42399cfedb78cdd6cc618ff691b1 | [
"MIT"
] | null | null | null | defmodule TeslaMateWeb.SignInLive.Index do
use TeslaMateWeb, :live_view
import Core.Dependency, only: [call: 3]
alias TeslaMate.{Auth, Api}
@impl true
def mount(_params, %{"locale" => locale}, socket) do
if connected?(socket), do: Gettext.put_locale(locale)
assigns = %{
api: get_api(socket),
... | 27.17757 | 101 | 0.604539 |
743c044a295429578dc9afeb4baef423daa00c08 | 79 | exs | Elixir | test/cldr_strftime_test.exs | elixir-cldr/cldr_strftime | ef2bca82f90bcc321a35f0696a97a04b4b6e2329 | [
"Apache-2.0"
] | 1 | 2020-11-23T08:54:31.000Z | 2020-11-23T08:54:31.000Z | test/cldr_strftime_test.exs | elixir-cldr/cldr_strftime | ef2bca82f90bcc321a35f0696a97a04b4b6e2329 | [
"Apache-2.0"
] | 1 | 2021-12-01T00:14:37.000Z | 2021-12-01T00:14:37.000Z | test/cldr_strftime_test.exs | elixir-cldr/cldr_strftime | ef2bca82f90bcc321a35f0696a97a04b4b6e2329 | [
"Apache-2.0"
] | 1 | 2021-11-30T19:59:58.000Z | 2021-11-30T19:59:58.000Z | defmodule Cldr.Strftime.Test do
use ExUnit.Case
doctest Cldr.Strftime
end
| 13.166667 | 31 | 0.78481 |
743c3409d2bd7577e3dc09a601619b8fdfd410d0 | 1,884 | ex | Elixir | clients/service_directory/lib/google_api/service_directory/v1beta1/model/list_endpoints_response.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/service_directory/lib/google_api/service_directory/v1beta1/model/list_endpoints_response.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/service_directory/lib/google_api/service_directory/v1beta1/model/list_endpoints_response.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... | 36.941176 | 131 | 0.747346 |
743c4b04e1709ddc1d1055d711a4d4ce3763e6de | 536 | exs | Elixir | password-check/test/password_test.exs | crsanti/codewars-elixir | 7e7d9bceea5db8b965ecc1e17be52bc2aeafa4f0 | [
"MIT"
] | 2 | 2021-08-18T11:31:31.000Z | 2021-08-24T00:25:08.000Z | password-check/test/password_test.exs | crsanti/codewars-elixir | 7e7d9bceea5db8b965ecc1e17be52bc2aeafa4f0 | [
"MIT"
] | null | null | null | password-check/test/password_test.exs | crsanti/codewars-elixir | 7e7d9bceea5db8b965ecc1e17be52bc2aeafa4f0 | [
"MIT"
] | null | null | null | # TODO: Replace examples and use TDD development by writing your own tests
defmodule TestSolution do
use ExUnit.Case
import Password, only: [check: 2]
test "basic tests" do
assert check("", "") == false
assert check(
"anything",
"CF329313EBB04CD2A6440547EC374C5A8EF601C82862251... | 25.52381 | 79 | 0.652985 |
743ca38674abb3df6af8a7443002a379c315b59a | 347 | ex | Elixir | lib/shopix/localized_countries/localized_countries.ex | gsarwate/shopix | 21d0e85294ee92cb7573d1b5a5746af6824b9355 | [
"MIT"
] | 196 | 2019-05-05T15:59:32.000Z | 2022-03-15T02:37:19.000Z | lib/shopix/localized_countries/localized_countries.ex | gsarwate/shopix | 21d0e85294ee92cb7573d1b5a5746af6824b9355 | [
"MIT"
] | 105 | 2019-05-04T19:04:40.000Z | 2021-07-28T11:21:45.000Z | lib/shopix/localized_countries/localized_countries.ex | gsarwate/shopix | 21d0e85294ee92cb7573d1b5a5746af6824b9355 | [
"MIT"
] | 26 | 2019-05-05T19:40:52.000Z | 2021-11-16T00:32:46.000Z | defmodule Shopix.LocalizedCountries do
def countries(locale) do
[Application.app_dir(:shopix, "priv"), "locales", "#{locale}.yml"]
|> Path.join()
|> YamlElixir.read_from_file!()
|> Map.fetch!(locale)
|> Map.fetch!("countries")
|> Enum.sort()
|> Enum.map(fn {key, value} -> {String.to_atom(v... | 28.916667 | 70 | 0.62536 |
743cc50370a4822f622036d2cd9f3ad8d2f76e02 | 10,465 | ex | Elixir | lib/icalendar/recurrence.ex | clockkcom/icalendar | a476eff9e17f4a386e81e06353a9109645f03388 | [
"MIT"
] | 82 | 2016-05-13T10:13:10.000Z | 2022-02-23T04:11:12.000Z | lib/icalendar/recurrence.ex | clockkcom/icalendar | a476eff9e17f4a386e81e06353a9109645f03388 | [
"MIT"
] | 50 | 2015-12-24T12:30:55.000Z | 2022-03-22T18:13:19.000Z | lib/icalendar/recurrence.ex | clockkcom/icalendar | a476eff9e17f4a386e81e06353a9109645f03388 | [
"MIT"
] | 43 | 2016-05-25T15:11:18.000Z | 2022-03-19T16:54:58.000Z | defmodule ICalendar.Recurrence do
@moduledoc """
Adds support for recurring events.
Events can recur by frequency, count, interval, and/or start/end date. To
see the specific rules and examples, see `add_recurring_events/2` below.
Credit to @fazibear for this module.
"""
alias ICalendar.Event
# igno... | 35 | 96 | 0.644625 |
743cc71776b67cce6fa3d8d33033b65f6f4045f5 | 2,549 | ex | Elixir | lib/scrip/config.ex | maartenvanvliet/scrip | cb2a69f12a6a086b03cc131902014241392901c4 | [
"MIT"
] | 2 | 2021-03-24T11:51:53.000Z | 2021-05-16T14:13:20.000Z | lib/scrip/config.ex | maartenvanvliet/scrip | cb2a69f12a6a086b03cc131902014241392901c4 | [
"MIT"
] | 14 | 2020-12-28T04:13:47.000Z | 2022-03-24T04:04:53.000Z | lib/scrip/config.ex | maartenvanvliet/scrip | cb2a69f12a6a086b03cc131902014241392901c4 | [
"MIT"
] | null | null | null | defmodule Scrip.Config do
@moduledoc """
Handles the configuration
"""
@typedoc """
Opts to be passed in to the `verify/3` function. Will be merged with the config
"""
@type opts ::
{:client, client}
| {:json_encoder, json_encoder}
| {:production_url, String.t()}
... | 28.010989 | 97 | 0.644566 |
743ccdd50f06c330453b769f9012f931f9062b0e | 634 | ex | Elixir | lib/queries/extensions.ex | aseigo/ecto_psql_extras | 7050708dfd5a8b8ba522e9606ddb3caeac714e93 | [
"MIT"
] | null | null | null | lib/queries/extensions.ex | aseigo/ecto_psql_extras | 7050708dfd5a8b8ba522e9606ddb3caeac714e93 | [
"MIT"
] | null | null | null | lib/queries/extensions.ex | aseigo/ecto_psql_extras | 7050708dfd5a8b8ba522e9606ddb3caeac714e93 | [
"MIT"
] | null | null | null | defmodule EctoPSQLExtras.Extensions do
@behaviour EctoPSQLExtras
def info do
%{
title: "Available and installed extensions",
order_by: [installed_version: :asc],
columns: [
%{name: :name, type: :string},
%{name: :default_version, type: :string},
%{name: :installed_vers... | 23.481481 | 62 | 0.635647 |
743cf8b337a88cca5da6ee8c2cfc7485c2bafcfe | 69 | exs | Elixir | eth_client/test/eth_client_test.exs | lambdaclass/ethereum_playground | 20dcbce9c2f55645aca6fbf3796bd182633845ad | [
"MIT"
] | null | null | null | eth_client/test/eth_client_test.exs | lambdaclass/ethereum_playground | 20dcbce9c2f55645aca6fbf3796bd182633845ad | [
"MIT"
] | null | null | null | eth_client/test/eth_client_test.exs | lambdaclass/ethereum_playground | 20dcbce9c2f55645aca6fbf3796bd182633845ad | [
"MIT"
] | null | null | null | defmodule EthClientTest do
use ExUnit.Case
doctest EthClient
end
| 13.8 | 26 | 0.811594 |
743d5ba3acc9cd7d796dccbbffba6ea6d93b0179 | 808 | exs | Elixir | test/rig_api/rig_metrics_test.exs | steveoliver/reactive-interaction-gateway | 59b6dc994fd0f098bed19b7bf1e699513ac87167 | [
"Apache-2.0"
] | 518 | 2017-11-09T13:10:49.000Z | 2022-03-28T14:29:50.000Z | test/rig_api/rig_metrics_test.exs | steveoliver/reactive-interaction-gateway | 59b6dc994fd0f098bed19b7bf1e699513ac87167 | [
"Apache-2.0"
] | 270 | 2017-11-10T00:11:34.000Z | 2022-02-27T13:08:16.000Z | test/rig_api/rig_metrics_test.exs | steveoliver/reactive-interaction-gateway | 59b6dc994fd0f098bed19b7bf1e699513ac87167 | [
"Apache-2.0"
] | 67 | 2017-12-19T20:16:37.000Z | 2022-03-31T10:43:04.000Z | defmodule RigMetricsTest do
@moduledoc false
use ExUnit.Case, async: false
use RigApi.ConnCase
require Logger
setup do
# enable metrics to be able to test them
RigMetrics.EventsMetrics.setup()
RigMetrics.ProxyMetrics.setup()
RigMetrics.MetricsPlugExporter.setup()
:ok
end
describe "G... | 23.764706 | 75 | 0.665842 |
743d770daefdc57ad2e630fc0d6b551d64a668e9 | 1,606 | exs | Elixir | day04/day04.exs | ranisalt/advent-of-code-2020 | e9d0c75f4d565a7483692ea83441aaa9d114dfb1 | [
"CC0-1.0"
] | 1 | 2020-12-01T19:47:02.000Z | 2020-12-01T19:47:02.000Z | day04/day04.exs | ranisalt/aoc2020 | e9d0c75f4d565a7483692ea83441aaa9d114dfb1 | [
"CC0-1.0"
] | null | null | null | day04/day04.exs | ranisalt/aoc2020 | e9d0c75f4d565a7483692ea83441aaa9d114dfb1 | [
"CC0-1.0"
] | null | null | null | defmodule Util do
defp is_valid_hgt(value) do
{num, unit} = String.split_at(value, -2)
case unit do
"cm" -> Enum.member?(150..193, String.to_integer(num))
"in" -> Enum.member?(59..76, String.to_integer(num))
_ -> false
end
end
defp valid_eye_colors(), do: MapSet.new(["amb", "blu", ... | 26.766667 | 92 | 0.57472 |
743d7b50c5ca413d6a0b6f98bc432a39e4d18df0 | 871 | ex | Elixir | exercism/elixir/raindrops/lib/raindrops.ex | Tyyagoo/studies | f8fcc3a539cfb6d04a149174c88bf2208e220b96 | [
"Unlicense"
] | null | null | null | exercism/elixir/raindrops/lib/raindrops.ex | Tyyagoo/studies | f8fcc3a539cfb6d04a149174c88bf2208e220b96 | [
"Unlicense"
] | null | null | null | exercism/elixir/raindrops/lib/raindrops.ex | Tyyagoo/studies | f8fcc3a539cfb6d04a149174c88bf2208e220b96 | [
"Unlicense"
] | null | null | null | defmodule Raindrops do
@doc """
Returns a string based on raindrop factors.
- If the number contains 3 as a prime factor, output 'Pling'.
- If the number contains 5 as a prime factor, output 'Plang'.
- If the number contains 7 as a prime factor, output 'Plong'.
- If the number does not contain 3, 5, or 7 a... | 36.291667 | 88 | 0.659013 |
743d8a59ec44a47170da142ee51452c6c831834a | 71 | ex | Elixir | lib/phoenix_chat_web/views/layout_view.ex | gmlewis/phoenix_chat | 536662f94016a9bf44a6ffca91b7653f82350185 | [
"Apache-2.0"
] | 3 | 2019-02-11T13:01:49.000Z | 2019-03-31T10:58:15.000Z | lib/phoenix_chat_web/views/layout_view.ex | gmlewis/phoenix_chat | 536662f94016a9bf44a6ffca91b7653f82350185 | [
"Apache-2.0"
] | null | null | null | lib/phoenix_chat_web/views/layout_view.ex | gmlewis/phoenix_chat | 536662f94016a9bf44a6ffca91b7653f82350185 | [
"Apache-2.0"
] | 1 | 2019-03-31T10:58:18.000Z | 2019-03-31T10:58:18.000Z | defmodule PhoenixChatWeb.LayoutView do
use PhoenixChatWeb, :view
end
| 17.75 | 38 | 0.830986 |
743d986df42a417d042f151ccc320c34fe6b1c72 | 278 | exs | Elixir | test/koans/atoms_koans_test.exs | tkling/elixir-koans-solutions | e591d38de0c048c036008f32e521b681d87ff706 | [
"MIT"
] | null | null | null | test/koans/atoms_koans_test.exs | tkling/elixir-koans-solutions | e591d38de0c048c036008f32e521b681d87ff706 | [
"MIT"
] | null | null | null | test/koans/atoms_koans_test.exs | tkling/elixir-koans-solutions | e591d38de0c048c036008f32e521b681d87ff706 | [
"MIT"
] | null | null | null | defmodule AtomsTests do
use ExUnit.Case
import TestHarness
test "Atoms" do
answers = [
:human,
{:multiple, [:atomized, "stringified"]},
{:multiple, [true, true, true, false]},
true,
"HELLO",
]
test_all(Atoms, answers)
end
end
| 16.352941 | 46 | 0.579137 |
743da44357e09db63f69e4f0f97676e11743269f | 3,709 | exs | Elixir | test/dogma/rule/match_in_condition_test.exs | lpil/dogma | e0f55c27ec3053be0313ac93f3d036437ee590a1 | [
"MIT"
] | 558 | 2015-06-21T18:20:59.000Z | 2021-12-30T16:25:47.000Z | test/dogma/rule/match_in_condition_test.exs | lpil/dogma | e0f55c27ec3053be0313ac93f3d036437ee590a1 | [
"MIT"
] | 252 | 2015-06-19T13:00:47.000Z | 2021-04-21T08:04:16.000Z | test/dogma/rule/match_in_condition_test.exs | lpil/dogma | e0f55c27ec3053be0313ac93f3d036437ee590a1 | [
"MIT"
] | 79 | 2015-06-21T14:18:30.000Z | 2021-12-30T16:26:09.000Z | defmodule Dogma.Rule.MatchInConditionTest do
use RuleCase, for: MatchInCondition
describe "a variable/function argument" do
test "not error for if" do
script = """
if feeling_tired do
have_an_early_night
end
""" |> Script.parse!("")
assert [] == Rule.test( @rule, script )
... | 24.084416 | 58 | 0.481531 |
743dbdcdcaf3d36a0492a26f53e3dd510aa6e5b6 | 1,898 | ex | Elixir | lib/middleware/simple_or_policy.ex | spunkedy/sucrose | 57a5f969d878f49e82faf666b7d5c5b21c67c771 | [
"MIT"
] | 2 | 2019-09-23T18:19:26.000Z | 2019-09-30T13:18:06.000Z | lib/middleware/simple_or_policy.ex | spunkedy/sucrose | 57a5f969d878f49e82faf666b7d5c5b21c67c771 | [
"MIT"
] | null | null | null | lib/middleware/simple_or_policy.ex | spunkedy/sucrose | 57a5f969d878f49e82faf666b7d5c5b21c67c771 | [
"MIT"
] | null | null | null | defmodule Sucrose.Middleware.SimpleOrPolicy do
alias Absinthe.Resolution
alias Sucrose.Common
@behaviour Absinthe.Middleware
@error_message :no_proper_resolution_or_config
def call(resolution = %{context: %{claims: claims}}, %{handler: handler}) do
check = simple_resolution(resolution)
response = ... | 27.911765 | 83 | 0.638567 |
743ddf2178662fe8283583eeeceda913e85722f4 | 584 | ex | Elixir | lib/cforum/messages/subscription.ex | campingrider/cforum_ex | cf27684c47d6dc26c9c37a946f1c729a79d27c70 | [
"MIT"
] | null | null | null | lib/cforum/messages/subscription.ex | campingrider/cforum_ex | cf27684c47d6dc26c9c37a946f1c729a79d27c70 | [
"MIT"
] | null | null | null | lib/cforum/messages/subscription.ex | campingrider/cforum_ex | cf27684c47d6dc26c9c37a946f1c729a79d27c70 | [
"MIT"
] | null | null | null | defmodule Cforum.Messages.Subscription do
use CforumWeb, :model
@primary_key {:subscription_id, :id, autogenerate: true}
@derive {Phoenix.Param, key: :subscription_id}
schema "subscriptions" do
belongs_to(:user, Cforum.Accounts.User, references: :user_id)
belongs_to(:message, Cforum.Messages.Message, ... | 27.809524 | 74 | 0.69863 |
743df95a376e71aca583b56c3c721c6d1a308b33 | 2,488 | ex | Elixir | clients/content/lib/google_api/content/v21/model/order_customer_marketing_rights_info.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v21/model/order_customer_marketing_rights_info.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/content/lib/google_api/content/v21/model/order_customer_marketing_rights_info.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... | 46.943396 | 481 | 0.753215 |
743e111a84c6c1e0927c1da128814002ed227700 | 13,931 | ex | Elixir | config/authorization/config.ex | kanselarij-vlaanderen/app-kaleidos | 891c43958edc5ee6b67993a7921e6221de0379dc | [
"MIT"
] | null | null | null | config/authorization/config.ex | kanselarij-vlaanderen/app-kaleidos | 891c43958edc5ee6b67993a7921e6221de0379dc | [
"MIT"
] | 10 | 2021-12-22T10:50:31.000Z | 2022-03-31T16:45:46.000Z | config/authorization/config.ex | kanselarij-vlaanderen/app-kaleidos | 891c43958edc5ee6b67993a7921e6221de0379dc | [
"MIT"
] | null | null | null | alias Acl.Accessibility.Always, as: AlwaysAccessible
alias Acl.Accessibility.ByQuery, as: AccessByQuery
alias Acl.GraphSpec.Constraint.Resource.AllPredicates, as: AllPredicates
alias Acl.GraphSpec.Constraint.Resource.NoPredicates, as: NoPredicates
alias Acl.GraphSpec.Constraint.ResourceFormat, as: ResourceFormatConstra... | 41.338279 | 204 | 0.641232 |
743e321a0f2bb0ba4656849de314c94d431ae45e | 110 | ex | Elixir | lib/exception.ex | quantd2/elixir_priority_queue | 60011e3d24698c652b2fc9a9047f44def8c96788 | [
"Apache-2.0"
] | 2 | 2016-04-15T23:59:13.000Z | 2018-08-03T19:28:24.000Z | lib/exception.ex | quantd2/elixir_priority_queue | 60011e3d24698c652b2fc9a9047f44def8c96788 | [
"Apache-2.0"
] | 1 | 2016-06-21T15:56:54.000Z | 2016-06-21T18:32:51.000Z | lib/exception.ex | quantd2/elixir_priority_queue | 60011e3d24698c652b2fc9a9047f44def8c96788 | [
"Apache-2.0"
] | 5 | 2016-06-21T18:19:41.000Z | 2021-12-15T19:12:31.000Z | defmodule PriorityQueue.EmptyError do
defexception []
def message(_) do
"queue empty error"
end
end | 15.714286 | 37 | 0.727273 |
743e3343142c147aa1f9228116579844c398639b | 1,037 | ex | Elixir | lib/ibu/stats.ex | ericgoodwin/ibu | 949ce9baf4f794ed74c0903f43e25c1f9caec840 | [
"Apache-2.0"
] | 1 | 2021-01-18T17:39:05.000Z | 2021-01-18T17:39:05.000Z | lib/ibu/stats.ex | ericgoodwin/ibu | 949ce9baf4f794ed74c0903f43e25c1f9caec840 | [
"Apache-2.0"
] | null | null | null | lib/ibu/stats.ex | ericgoodwin/ibu | 949ce9baf4f794ed74c0903f43e25c1f9caec840 | [
"Apache-2.0"
] | null | null | null | defmodule IBU.Stats do
@moduledoc """
"""
alias IBU.Stats.Standing, as: Stnd
alias IBU.Stats.Percentage, as: Pcnt
@doc """
Build a map of statistics for an athletes given data from /CISBios?IBUId=
The build use merge to merge different statistics together under one set of
season_id keys. As long as t... | 22.543478 | 78 | 0.635487 |
743e6bfe0af1c083d8632c777be1671b65262321 | 999 | ex | Elixir | lib/simple_proxy/task.ex | qwexvf/McProtocol | a9e243e2d6de7b51e049881c8ea8f12bff94feb1 | [
"MIT"
] | 21 | 2016-04-23T03:54:33.000Z | 2021-07-08T12:03:44.000Z | lib/simple_proxy/task.ex | qwexvf/McProtocol | a9e243e2d6de7b51e049881c8ea8f12bff94feb1 | [
"MIT"
] | 2 | 2016-04-06T07:01:18.000Z | 2017-04-15T11:09:23.000Z | lib/simple_proxy/task.ex | hansihe/elixir_mc_protocol | 4b3011338af573c6f583f541c410fb23574f4c10 | [
"MIT"
] | 9 | 2016-04-09T21:05:48.000Z | 2021-07-27T12:42:49.000Z | defmodule Mix.Tasks.McProtocol.Proxy do
use Mix.Task
@shortdoc "Starts a simple minecraft proxy. For testing, not production."
def run(args) do
#spawn fn ->
# McProtocol.Acceptor.SimpleAcceptor.accept(25565, &handle_connect(&1))
#end
spawn fn -> acceptor end
Mix.Task.run "run", run_args
... | 23.785714 | 82 | 0.640641 |
743e72cc4af29c0426f0e6ecf35a41e16e09a70e | 1,146 | exs | Elixir | test/markdown/blockquote_test.exs | RobertDober/scanx | 5ce8720d860d049d7c20b7a521bcf2406f3e98c0 | [
"Apache-2.0"
] | null | null | null | test/markdown/blockquote_test.exs | RobertDober/scanx | 5ce8720d860d049d7c20b7a521bcf2406f3e98c0 | [
"Apache-2.0"
] | null | null | null | test/markdown/blockquote_test.exs | RobertDober/scanx | 5ce8720d860d049d7c20b7a521bcf2406f3e98c0 | [
"Apache-2.0"
] | null | null | null | defmodule Markdown.BlockquoteTest do
use Support.MarkdownTestHelper
describe "blockquotes" do
test "this is a blockquote" do
line = ">"
assert scan(line) == complete_tokens(blockquote: ">")
end
test "and so is this one" do
line = "> "
assert scan(line) == complete_tokens(block... | 30.157895 | 106 | 0.569808 |
743e7c01e06ac41d4225274b02157a8384aa4069 | 15,626 | exs | Elixir | lib/elixir/test/elixir/code_formatter/integration_test.exs | felipelincoln/elixir | 6724c1d1819f2926dac561980b4beab281bbd3c2 | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/code_formatter/integration_test.exs | felipelincoln/elixir | 6724c1d1819f2926dac561980b4beab281bbd3c2 | [
"Apache-2.0"
] | 1 | 2021-07-01T17:58:37.000Z | 2021-07-01T19:05:37.000Z | lib/elixir/test/elixir/code_formatter/integration_test.exs | felipelincoln/elixir | 6724c1d1819f2926dac561980b4beab281bbd3c2 | [
"Apache-2.0"
] | null | null | null | Code.require_file("../test_helper.exs", __DIR__)
defmodule Code.Formatter.IntegrationTest do
use ExUnit.Case, async: true
import CodeFormatterHelpers
test "empty documents" do
assert_format " ", ""
assert_format "\n", ""
assert_format ";", ""
end
test "function with multiple calls and case" ... | 25.041667 | 137 | 0.523103 |
743ebe9af1365d6fb0896f14812ebf94e010de80 | 192 | exs | Elixir | example_app/test/test_helper.exs | moxley/addict | 9271c60d9a862edcefc31e8a764b3eb5a5905171 | [
"MIT"
] | 750 | 2015-01-18T23:00:36.000Z | 2021-03-24T22:11:09.000Z | example_app/test/test_helper.exs | moxley/addict | 9271c60d9a862edcefc31e8a764b3eb5a5905171 | [
"MIT"
] | 130 | 2015-01-19T12:39:42.000Z | 2021-09-28T22:40:52.000Z | example_app/test/test_helper.exs | moxley/addict | 9271c60d9a862edcefc31e8a764b3eb5a5905171 | [
"MIT"
] | 151 | 2015-01-19T09:24:44.000Z | 2020-09-21T13:52:46.000Z | ExUnit.start
Mix.Task.run "ecto.create", ~w(-r ExampleApp.Repo --quiet)
Mix.Task.run "ecto.migrate", ~w(-r ExampleApp.Repo --quiet)
Ecto.Adapters.SQL.begin_test_transaction(ExampleApp.Repo)
| 27.428571 | 59 | 0.755208 |
743edbc67a94ec6a501e8f9b0f342d19a195e5d6 | 1,010 | ex | Elixir | test/support/channel_case.ex | mwindholtz/has_many_blog | 521f13c8b91620713a305f44040581276d162abc | [
"Apache-2.0"
] | 7 | 2016-12-15T00:33:22.000Z | 2019-04-24T20:42:17.000Z | test/support/channel_case.ex | mwindholtz/has_many_blog | 521f13c8b91620713a305f44040581276d162abc | [
"Apache-2.0"
] | 1 | 2017-07-19T16:41:35.000Z | 2017-07-19T16:41:35.000Z | test/support/channel_case.ex | mwindholtz/has_many_blog | 521f13c8b91620713a305f44040581276d162abc | [
"Apache-2.0"
] | 2 | 2017-04-28T21:52:38.000Z | 2020-04-24T14:41:31.000Z | defmodule Blog.ChannelCase do
@moduledoc """
This module defines the test case to be used by
channel tests.
Such tests rely on `Phoenix.ChannelTest` and also
imports other functionality to make it easier
to build and query models.
Finally, if the test case interacts with the database,
it cannot be asy... | 22.954545 | 66 | 0.692079 |
743ee4b00c84e6fc614c79f040ef70433f3d5924 | 888 | ex | Elixir | lib/day3/challenge_one.ex | AJPcodes/advent_of_code_2018 | 1c24bd41cd3b8e556e91e7d1e8ff4bbb1edf5235 | [
"MIT"
] | 1 | 2018-12-04T19:54:13.000Z | 2018-12-04T19:54:13.000Z | lib/day3/challenge_one.ex | AJPcodes/advent_of_code_2018 | 1c24bd41cd3b8e556e91e7d1e8ff4bbb1edf5235 | [
"MIT"
] | null | null | null | lib/day3/challenge_one.ex | AJPcodes/advent_of_code_2018 | 1c24bd41cd3b8e556e91e7d1e8ff4bbb1edf5235 | [
"MIT"
] | null | null | null | defmodule D3.Ch1 do
@input_file_path './challenge_inputs/day_three/challenge_one.txt'
def start do
grid = Grid.create()
@input_file_path
|> ChallengeFileLoader.parse_file_to_lines()
|> Enum.map(&parse_line/1)
|> Enum.reduce(grid, &Grid.update/2)
|> Grid.sum
end
def parse_line(line) d... | 20.181818 | 67 | 0.557432 |
743ee564e98b753088d7626eb267267ee67d81eb | 10,432 | ex | Elixir | apps/evm/lib/evm/debugger/breakpoint.ex | InoMurko/ethereum | 282ca2a23a897c5b9684ddf9abae2bf65691b039 | [
"MIT"
] | 22 | 2017-06-22T02:50:34.000Z | 2022-01-26T20:43:21.000Z | apps/evm/lib/evm/debugger/breakpoint.ex | InoMurko/ethereum | 282ca2a23a897c5b9684ddf9abae2bf65691b039 | [
"MIT"
] | 9 | 2018-10-08T22:56:56.000Z | 2018-10-18T20:41:55.000Z | apps/evm/lib/evm/debugger/breakpoint.ex | InoMurko/ethereum | 282ca2a23a897c5b9684ddf9abae2bf65691b039 | [
"MIT"
] | 5 | 2018-10-06T16:30:48.000Z | 2022-01-26T20:43:26.000Z | defmodule EVM.Debugger.Breakpoint do
@moduledoc """
Breakpoints allow us to break execution of a given
contract based on a set of conditions.
"""
@table __MODULE__
@type id :: integer()
@type conditions :: [
# only triggers when contract executes at given address
:address
]
... | 33.329073 | 131 | 0.649827 |
743f7876cd001ff783e02b938cac8c4aaabfc765 | 2,095 | exs | Elixir | config/dev.exs | spawnfest/spawn_api | e99dbc20dfc5ff18747efc0c2dafbecdf577707c | [
"MIT"
] | 2 | 2018-12-19T16:12:41.000Z | 2020-01-20T17:37:15.000Z | config/dev.exs | spawnfest/spawn_api | e99dbc20dfc5ff18747efc0c2dafbecdf577707c | [
"MIT"
] | null | null | null | config/dev.exs | spawnfest/spawn_api | e99dbc20dfc5ff18747efc0c2dafbecdf577707c | [
"MIT"
] | null | null | null | use Mix.Config
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with webpack to recompile .js and .css sources.
config :spawn_api, SpawnApiWeb.Endpoint,
http: [port: 4... | 27.565789 | 68 | 0.688783 |
743f8316ae972b97d6f2329261adce7629cd88cb | 1,223 | ex | Elixir | lib/fipe_crawler/worker/informacoes.ex | teofilosalgado/FipeCrawler | 0e25bc10bb23da2b8cb0204fd1db07a07cc7b4c5 | [
"MIT"
] | 1 | 2021-01-14T01:12:24.000Z | 2021-01-14T01:12:24.000Z | lib/fipe_crawler/worker/informacoes.ex | teofilosalgado/FipeCrawler | 0e25bc10bb23da2b8cb0204fd1db07a07cc7b4c5 | [
"MIT"
] | null | null | null | lib/fipe_crawler/worker/informacoes.ex | teofilosalgado/FipeCrawler | 0e25bc10bb23da2b8cb0204fd1db07a07cc7b4c5 | [
"MIT"
] | null | null | null | defmodule FipeCrawler.Worker.Informacoes do
use GenServer
def start_link(init_arg) do
GenServer.start_link(__MODULE__, init_arg, name: :informacoes)
end
def salvar_informacoes(modelo, informacoes) do
GenServer.call(:database, {:ano, modelo, informacoes})
end
def handle_fetch_informacoes(form_anos... | 29.829268 | 79 | 0.695012 |
743f85e26515ec925c252db281b8c243d5325a41 | 91 | exs | Elixir | .formatter.exs | jshmrtn/phoenix-client-ssl | 60055f6b7a54d38d006732ad72a48f7aa55c5c08 | [
"MIT"
] | 17 | 2017-12-01T09:12:41.000Z | 2021-04-16T07:53:37.000Z | .formatter.exs | jshmrtn/phoenix-client-ssl | 60055f6b7a54d38d006732ad72a48f7aa55c5c08 | [
"MIT"
] | 2 | 2018-01-29T13:04:26.000Z | 2018-05-24T11:03:55.000Z | .formatter.exs | jshmrtn/phoenix-client-ssl | 60055f6b7a54d38d006732ad72a48f7aa55c5c08 | [
"MIT"
] | 6 | 2018-05-24T07:42:22.000Z | 2020-11-14T17:41:35.000Z | [
inputs: ["{.formatter,.dialyzer-ignore,mix}.exs", "{config,lib,test}/**/*.{ex,exs}"]
]
| 22.75 | 86 | 0.582418 |
743fc9a6beb7a14829b953a4df16d4df3c8e6fd1 | 320 | exs | Elixir | apps/engine/config/test.exs | bitwalker/aws-dist-test | 94d87e82b617da02d541f7b2744d20747d8ef21f | [
"Apache-2.0"
] | 4 | 2019-03-13T16:38:32.000Z | 2020-01-11T20:05:25.000Z | apps/engine/config/test.exs | bitwalker/aws-dist-test | 94d87e82b617da02d541f7b2744d20747d8ef21f | [
"Apache-2.0"
] | 1 | 2019-03-14T17:41:55.000Z | 2019-03-14T17:41:55.000Z | apps/engine/config/test.exs | bitwalker/aws-dist-test | 94d87e82b617da02d541f7b2744d20747d8ef21f | [
"Apache-2.0"
] | 1 | 2019-03-14T14:53:29.000Z | 2019-03-14T14:53:29.000Z | use Mix.Config
# Print only warnings and errors during test
config :logger, level: :warn
# Configure your database
config :engine, Engine.Repo,
adapter: Ecto.Adapters.Postgres,
username: "postgres",
password: "postgres",
database: "example_web_test",
hostname: "localhost",
pool: Ecto.Adapters.SQL.Sandbox
| 22.857143 | 44 | 0.74375 |
743fd41edd96ed7c148c71339403c7789851e183 | 946 | ex | Elixir | tfl_demo/test/support/channel_case.ex | shoz-f/tfl_projects | 274db6b952e2f6042f7e3ab2ab2505f55a60de90 | [
"Apache-2.0"
] | null | null | null | tfl_demo/test/support/channel_case.ex | shoz-f/tfl_projects | 274db6b952e2f6042f7e3ab2ab2505f55a60de90 | [
"Apache-2.0"
] | null | null | null | tfl_demo/test/support/channel_case.ex | shoz-f/tfl_projects | 274db6b952e2f6042f7e3ab2ab2505f55a60de90 | [
"Apache-2.0"
] | null | null | null | defmodule TflDemoWeb.ChannelCase do
@moduledoc """
This module defines the test case to be used by
channel tests.
Such tests rely on `Phoenix.ChannelTest` and also
import other functionality to make it easier
to build common data structures and query the data layer.
Finally, if the test case interacts w... | 27.028571 | 64 | 0.738901 |
743fff1357cc4336d615b292ae719e7a223bae95 | 2,153 | ex | Elixir | clients/safe_browsing/lib/google_api/safe_browsing/v4/model/find_full_hashes_response.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/safe_browsing/lib/google_api/safe_browsing/v4/model/find_full_hashes_response.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/safe_browsing/lib/google_api/safe_browsing/v4/model/find_full_hashes_response.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 38.446429 | 152 | 0.734324 |
7440025fac0406b4bec409165fa137f8c5007382 | 2,975 | ex | Elixir | lib/mix/lib/releases/config/providers/elixir.ex | happysalada/distillery | 2098604c9f12a26227d6bd794c62d5e62e609ad4 | [
"MIT"
] | null | null | null | lib/mix/lib/releases/config/providers/elixir.ex | happysalada/distillery | 2098604c9f12a26227d6bd794c62d5e62e609ad4 | [
"MIT"
] | null | null | null | lib/mix/lib/releases/config/providers/elixir.ex | happysalada/distillery | 2098604c9f12a26227d6bd794c62d5e62e609ad4 | [
"MIT"
] | null | null | null | defmodule Mix.Releases.Config.Providers.Elixir do
@moduledoc """
Provides support for `Mix.Config` config scripts, e.g. `config.exs`
This provider expects a path to a config file to load during boot as an argument:
set config_providers: [
{Mix.Releases.Config.Providers.Elixir, ["${RELEASE_ROOT_DIR... | 34.195402 | 105 | 0.668235 |
74400e8d62d26c22f1b2ae31c84641da13b327b4 | 493 | ex | Elixir | lib/nudge_api_web/views/error_view.ex | feelja-tech/feelja-api | 03ce15430460cf2dac24a7740242c7e5ac5c5804 | [
"MIT"
] | null | null | null | lib/nudge_api_web/views/error_view.ex | feelja-tech/feelja-api | 03ce15430460cf2dac24a7740242c7e5ac5c5804 | [
"MIT"
] | null | null | null | lib/nudge_api_web/views/error_view.ex | feelja-tech/feelja-api | 03ce15430460cf2dac24a7740242c7e5ac5c5804 | [
"MIT"
] | null | null | null | defmodule NudgeApiWeb.ErrorView do
use NudgeApiWeb, :view
# If you want to customize a particular status code
# for a certain format, you may uncomment below.
# def render("500.html", _assigns) do
# "Internal Server Error"
# end
# By default, Phoenix returns the status message from
# the template na... | 29 | 61 | 0.736308 |
74402c6f407627c5a3b7ee0a05e15ee52af54841 | 13,492 | ex | Elixir | lib/util.ex | smanolloff/phoenix_params | 90ce2f08b04db11a267ddadbf72bb645ceac275f | [
"MIT"
] | 15 | 2018-09-05T13:36:40.000Z | 2021-03-18T15:00:12.000Z | lib/util.ex | smanolloff/phoenix_params | 90ce2f08b04db11a267ddadbf72bb645ceac275f | [
"MIT"
] | null | null | null | lib/util.ex | smanolloff/phoenix_params | 90ce2f08b04db11a267ddadbf72bb645ceac275f | [
"MIT"
] | 1 | 2018-11-15T09:33:53.000Z | 2018-11-15T09:33:53.000Z | defmodule PhoenixParams.Util do
def validate(params, _) when not is_map(params),
do: {:error, "invalid"}
def validate(params, meta),
do: validate(params, {nil, nil, nil}, meta)
def validate(params, {pparams, bparams, qparams}, meta) do
params
|> extract({pparams, bparams, qparams}, meta)
|> ... | 31.159353 | 111 | 0.574711 |
7440aecf75c0b61e68623a139c3b71bf62fabe3c | 320 | ex | Elixir | lib/cforum/errors/not_found_error.ex | jrieger/cforum_ex | 61f6ce84708cb55bd0feedf69853dae64146a7a0 | [
"MIT"
] | 16 | 2019-04-04T06:33:33.000Z | 2021-08-16T19:34:31.000Z | lib/cforum/errors/not_found_error.ex | jrieger/cforum_ex | 61f6ce84708cb55bd0feedf69853dae64146a7a0 | [
"MIT"
] | 294 | 2019-02-10T11:10:27.000Z | 2022-03-30T04:52:53.000Z | lib/cforum/errors/not_found_error.ex | jrieger/cforum_ex | 61f6ce84708cb55bd0feedf69853dae64146a7a0 | [
"MIT"
] | 10 | 2019-02-10T10:39:24.000Z | 2021-07-06T11:46:05.000Z | defmodule Cforum.Errors.NotFoundError do
defexception plug_status: 404, message: "Not found", conn: nil
def exception(opts) do
conn = Keyword.fetch!(opts, :conn)
path = "/" <> Enum.join(conn.path_info, "/")
%Cforum.Errors.NotFoundError{message: "#{conn.method} #{path} not found", conn: conn}
end
end
| 32 | 89 | 0.684375 |
7440b165f0c418e4aacc8c7c4d20647a2af95aab | 1,835 | ex | Elixir | lib/cforum_web.ex | MatthiasApsel/cforum_ex | 52c621a583182d82692b74694b0b2792ac23b8ff | [
"MIT"
] | null | null | null | lib/cforum_web.ex | MatthiasApsel/cforum_ex | 52c621a583182d82692b74694b0b2792ac23b8ff | [
"MIT"
] | null | null | null | lib/cforum_web.ex | MatthiasApsel/cforum_ex | 52c621a583182d82692b74694b0b2792ac23b8ff | [
"MIT"
] | null | null | null | defmodule CforumWeb do
@moduledoc """
A module that keeps using definitions for controllers,
views and so on.
This can be used in your application as:
use CforumWeb, :controller
use CforumWeb, :view
The definitions below will be executed for every view,
controller, etc, so keep them short and... | 21.091954 | 101 | 0.681744 |
7440e2f2ea9a5ce23504697337f51b2eb5c6155b | 1,886 | ex | Elixir | lib/videorama_web.ex | ruben44bac/videorama | 6350f9aabd778b8660aac5952dc828b3bd35c4c6 | [
"MIT"
] | null | null | null | lib/videorama_web.ex | ruben44bac/videorama | 6350f9aabd778b8660aac5952dc828b3bd35c4c6 | [
"MIT"
] | null | null | null | lib/videorama_web.ex | ruben44bac/videorama | 6350f9aabd778b8660aac5952dc828b3bd35c4c6 | [
"MIT"
] | null | null | null | defmodule VideoramaWeb 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 VideoramaWeb, :controller
use VideoramaWeb, :view
The definitions below will be executed for every view,
contro... | 25.486486 | 76 | 0.698303 |
7440e90c978b39d884d101941e5ec3ccd45b2e47 | 264 | ex | Elixir | lib/lexin_web/controllers/pages_controller.ex | cr0t/lexin | bff2997db52a00bf770614630b8684821ab72abc | [
"MIT"
] | null | null | null | lib/lexin_web/controllers/pages_controller.ex | cr0t/lexin | bff2997db52a00bf770614630b8684821ab72abc | [
"MIT"
] | 6 | 2022-01-05T12:51:37.000Z | 2022-01-13T09:52:36.000Z | lib/lexin_web/controllers/pages_controller.ex | cr0t/lexin | bff2997db52a00bf770614630b8684821ab72abc | [
"MIT"
] | null | null | null | defmodule LexinWeb.PagesController do
use LexinWeb, :controller
def contact(conn, _params),
do: render(conn, "contact.html")
def about(conn, _params),
do: render(conn, "about.html")
def help(conn, _params),
do: render(conn, "help.html")
end
| 20.307692 | 37 | 0.681818 |
744145aa332b4eda5d36dedf59bd0e4cf262fcdc | 1,356 | ex | Elixir | backend/test/support/conn_case.ex | eeng/caffe | d85d0dd56a8204c715052ddaf3d990e47c5df0e9 | [
"MIT"
] | 7 | 2020-03-27T08:26:52.000Z | 2021-08-29T09:50:31.000Z | backend/test/support/conn_case.ex | eeng/caffe | d85d0dd56a8204c715052ddaf3d990e47c5df0e9 | [
"MIT"
] | null | null | null | backend/test/support/conn_case.ex | eeng/caffe | d85d0dd56a8204c715052ddaf3d990e47c5df0e9 | [
"MIT"
] | null | null | null | defmodule CaffeWeb.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 the ... | 27.12 | 73 | 0.692478 |
744199632986ed9dbf8b3e15f6abfcd9c8379e68 | 6,149 | ex | Elixir | clients/games/lib/google_api/games/v1/model/turn_based_match.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/games/lib/google_api/games/v1/model/turn_based_match.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/games/lib/google_api/games/v1/model/turn_based_match.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | 1 | 2018-07-28T20:50:50.000Z | 2018-07-28T20:50:50.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 66.836957 | 623 | 0.744023 |
7441af44c8396c31c2e7e31e4b5098070c39f7c3 | 1,435 | ex | Elixir | elixir-in-action/ch-13/todo_release/lib/todo/web.ex | danurna/elixir-playground | 6acb40e513d8ab324368b3ec5151b0a4fd88f849 | [
"MIT"
] | null | null | null | elixir-in-action/ch-13/todo_release/lib/todo/web.ex | danurna/elixir-playground | 6acb40e513d8ab324368b3ec5151b0a4fd88f849 | [
"MIT"
] | null | null | null | elixir-in-action/ch-13/todo_release/lib/todo/web.ex | danurna/elixir-playground | 6acb40e513d8ab324368b3ec5151b0a4fd88f849 | [
"MIT"
] | null | null | null | defmodule Todo.Web do
use Plug.Router
plug :match
plug :dispatch
def child_spec(_arg) do
Plug.Adapters.Cowboy.child_spec(
scheme: :http,
options: [port: Application.fetch_env!(:todo, :port)],
plug: __MODULE__
)
end
# curl -d "" http://192.168.1.112:5454/add_entry\?list\=sophie\... | 25.625 | 95 | 0.634843 |
7441b546378ba759bf00a022abbd20755fcc0887 | 882 | ex | Elixir | clients/indexing/lib/google_api/indexing/v3/metadata.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/indexing/lib/google_api/indexing/v3/metadata.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/indexing/lib/google_api/indexing/v3/metadata.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 32.666667 | 74 | 0.758503 |
7441d5acc55d79836899693443e2b6147e4a1a78 | 329 | ex | Elixir | lib/hedwig_simple_responders/responders/echo.ex | HeroicEric/hedwig_simple_responders | f939b1a88a93651ee7406ae8dd85f58c759bce45 | [
"MIT",
"Unlicense"
] | null | null | null | lib/hedwig_simple_responders/responders/echo.ex | HeroicEric/hedwig_simple_responders | f939b1a88a93651ee7406ae8dd85f58c759bce45 | [
"MIT",
"Unlicense"
] | null | null | null | lib/hedwig_simple_responders/responders/echo.ex | HeroicEric/hedwig_simple_responders | f939b1a88a93651ee7406ae8dd85f58c759bce45 | [
"MIT",
"Unlicense"
] | null | null | null | defmodule HedwigSimpleResponders.Echo do
@moduledoc """
`echo <text>` - As you would expect, <text> will be echoed back
"""
use Hedwig.Responder
@usage """
hedwig echo <text> - As you would expect, <text> will be echoed back
"""
respond ~r/echo (?<text>.*)$/i, msg do
reply msg, msg.matches["text"]
... | 25.307692 | 70 | 0.647416 |
7441edac59e29545e7c7c28b67cc9442aa3bd454 | 22 | exs | Elixir | test/test_helper.exs | kianmeng/elixir_wechat | cc838f0930fd6d26d903e4c3535bdfc263d628d6 | [
"MIT"
] | 12 | 2019-03-07T01:34:12.000Z | 2021-09-11T06:40:29.000Z | test/test_helper.exs | kianmeng/elixir_wechat | cc838f0930fd6d26d903e4c3535bdfc263d628d6 | [
"MIT"
] | 10 | 2021-09-22T04:17:05.000Z | 2022-03-24T04:16:34.000Z | test/test_helper.exs | kianmeng/elixir_wechat | cc838f0930fd6d26d903e4c3535bdfc263d628d6 | [
"MIT"
] | 5 | 2019-03-07T01:34:31.000Z | 2021-01-06T08:01:51.000Z | ExUnit.start(seed: 0)
| 11 | 21 | 0.727273 |
7442001940cdc5c31c92272d70c7ba8b5501ada0 | 1,141 | ex | Elixir | elixir_backend/clubhouse_phx/lib/clubhouse_phx_web/views/room_view.ex | yusufaine/nus-clubhouse | eae8223d26111bab5e981c95b539c964293908e8 | [
"MIT"
] | 1 | 2021-05-16T08:17:37.000Z | 2021-05-16T08:17:37.000Z | elixir_backend/clubhouse_phx/lib/clubhouse_phx_web/views/room_view.ex | yusufaine/nus-clubhouse | eae8223d26111bab5e981c95b539c964293908e8 | [
"MIT"
] | 116 | 2021-05-29T16:32:51.000Z | 2021-08-13T16:05:29.000Z | elixir_backend/clubhouse_phx/lib/clubhouse_phx_web/views/room_view.ex | yusufaine/nus-clubhouse | eae8223d26111bab5e981c95b539c964293908e8 | [
"MIT"
] | 2 | 2021-05-23T07:12:40.000Z | 2021-10-11T02:59:40.000Z | defmodule ClubhousePhxWeb.RoomView do
use ClubhousePhxWeb, :view
alias ClubhousePhxWeb.RoomView
def render("index.json", %{rooms: rooms}) do
%{data: render_many(rooms, RoomView, "room.json")}
end
def render("showRoomSession.json", %{room: room}) do
%{data: render_one(room, RoomView, "roomSession.jso... | 24.276596 | 59 | 0.623138 |
744209e47b46f6a78da882c4c560ec33651ad2d7 | 515 | ex | Elixir | elixir/basic_algorithms/lib/fibonacci.ex | giubueno/code-almanacs | 9fa0e0ac251d8900c754fdaa6a02d1cd382338c5 | [
"MIT"
] | null | null | null | elixir/basic_algorithms/lib/fibonacci.ex | giubueno/code-almanacs | 9fa0e0ac251d8900c754fdaa6a02d1cd382338c5 | [
"MIT"
] | null | null | null | elixir/basic_algorithms/lib/fibonacci.ex | giubueno/code-almanacs | 9fa0e0ac251d8900c754fdaa6a02d1cd382338c5 | [
"MIT"
] | null | null | null | defmodule Fibonacci do
@moduledoc """
Basic Fibonacci implementation.
"""
@doc """
Returns the Fibonacci element of the position n.
## Examples
iex> Fibonacci.position(0)
0
"""
def position(0), do: 0
def position(1), do: 1
def position(n), do: position(n-1) + position(n-2)
@doc ""... | 17.166667 | 62 | 0.607767 |
744219606175d092a5d4c7e78fb2db568c8e45c5 | 77 | ex | Elixir | complete/lib/e2e_with_cypress_web/views/layout_view.ex | PJUllrich/e2e-testing-with-cypress | 19806edb347d829eef1fd13079ceb905fc2e4a39 | [
"MIT"
] | 2 | 2019-11-03T20:42:36.000Z | 2019-12-03T14:12:52.000Z | complete/lib/e2e_with_cypress_web/views/layout_view.ex | PJUllrich/e2e-testing-with-cypress | 19806edb347d829eef1fd13079ceb905fc2e4a39 | [
"MIT"
] | 1 | 2021-03-09T20:17:35.000Z | 2021-03-09T20:17:35.000Z | incomplete/lib/e2e_with_cypress_web/views/layout_view.ex | PJUllrich/e2e-testing-with-cypress | 19806edb347d829eef1fd13079ceb905fc2e4a39 | [
"MIT"
] | null | null | null | defmodule E2eWithCypressWeb.LayoutView do
use E2eWithCypressWeb, :view
end
| 19.25 | 41 | 0.844156 |
744224b0b59e474ee091d8eb9beb5a9a47332189 | 428 | ex | Elixir | apps/core/lib/core/medications/innm_dosage/renderer.ex | ehealth-ua/ehealth.api | 4ffe26a464fe40c95fb841a4aa2e147068f65ca2 | [
"Apache-2.0"
] | 8 | 2019-06-14T11:34:49.000Z | 2021-08-05T19:14:24.000Z | apps/core/lib/core/medications/innm_dosage/renderer.ex | edenlabllc/ehealth.api.public | 4ffe26a464fe40c95fb841a4aa2e147068f65ca2 | [
"Apache-2.0"
] | 1 | 2019-07-08T15:20:22.000Z | 2019-07-08T15:20:22.000Z | apps/core/lib/core/medications/innm_dosage/renderer.ex | ehealth-ua/ehealth.api | 4ffe26a464fe40c95fb841a4aa2e147068f65ca2 | [
"Apache-2.0"
] | 6 | 2018-05-11T13:59:32.000Z | 2022-01-19T20:15:22.000Z | defmodule Core.Medications.INNMDosage.Renderer do
@moduledoc false
def render("innm_dosage_short.json", innm_dosage, medication_qty) do
dosage = innm_dosage.ingredients |> Enum.find(fn i -> i.is_primary end) |> Map.get(:dosage)
%{
medication_id: innm_dosage.id,
medication_name: innm_dosage.nam... | 26.75 | 95 | 0.703271 |
744276f8adf996e08b1d7e92f010a80c702c2a44 | 206 | exs | Elixir | test/pocket_reducer_web/controllers/page_controller_test.exs | czogori/pocket_reducer | 09ecb2fcdf56a360b827a93c6e211e2885d3b8a3 | [
"MIT"
] | null | null | null | test/pocket_reducer_web/controllers/page_controller_test.exs | czogori/pocket_reducer | 09ecb2fcdf56a360b827a93c6e211e2885d3b8a3 | [
"MIT"
] | null | null | null | test/pocket_reducer_web/controllers/page_controller_test.exs | czogori/pocket_reducer | 09ecb2fcdf56a360b827a93c6e211e2885d3b8a3 | [
"MIT"
] | null | null | null | defmodule PocketReducerWeb.PageControllerTest do
use PocketReducerWeb.ConnCase
test "GET /", %{conn: conn} do
conn = get(conn, "/")
assert html_response(conn, 200) =~ "PocketReducer"
end
end
| 22.888889 | 54 | 0.703883 |
74427c91c42f4a7267899d3f31111b3088f28a39 | 615 | ex | Elixir | clients/elixir/generated/lib/swaggy_jenkins/model/user.ex | PankTrue/swaggy-jenkins | aca35a7cca6e1fcc08bd399e05148942ac2f514b | [
"MIT"
] | 23 | 2017-08-01T12:25:26.000Z | 2022-01-25T03:44:11.000Z | clients/elixir/generated/lib/swaggy_jenkins/model/user.ex | PankTrue/swaggy-jenkins | aca35a7cca6e1fcc08bd399e05148942ac2f514b | [
"MIT"
] | 35 | 2017-06-14T03:28:15.000Z | 2022-02-14T10:25:54.000Z | clients/elixir/generated/lib/swaggy_jenkins/model/user.ex | PankTrue/swaggy-jenkins | aca35a7cca6e1fcc08bd399e05148942ac2f514b | [
"MIT"
] | 11 | 2017-08-31T19:00:20.000Z | 2021-12-19T12:04:12.000Z | # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://openapi-generator.tech
# Do not edit the class manually.
defmodule SwaggyJenkins.Model.User do
@moduledoc """
"""
@derive [Poison.Encoder]
defstruct [
:"_class",
:"id",
:"fullName",
:"email... | 18.088235 | 91 | 0.611382 |
7442a974218aef616842b04bd46007d9fde3642f | 566 | exs | Elixir | test/elixirgithub/users/create_test.exs | LuizFerK/ElixirGitHub | 7db1270e296c6f0a33b7a85e80753cc010ea50af | [
"MIT"
] | 1 | 2021-11-23T16:51:04.000Z | 2021-11-23T16:51:04.000Z | test/elixirgithub/users/create_test.exs | LuizFerK/Repositoriex | 7db1270e296c6f0a33b7a85e80753cc010ea50af | [
"MIT"
] | null | null | null | test/elixirgithub/users/create_test.exs | LuizFerK/Repositoriex | 7db1270e296c6f0a33b7a85e80753cc010ea50af | [
"MIT"
] | null | null | null | defmodule Elixirgithub.Users.CreateTest do
use Elixirgithub.DataCase, async: true
alias Elixirgithub.{Error, User}
alias Elixirgithub.Users.Create
describe "call/1" do
test "when all params are valid, create the user" do
response = Create.call(%{"password" => "123456"})
assert {:ok, %User{id:... | 26.952381 | 65 | 0.669611 |
7442bf3c71b66e24338fbcf8f2b42764595c44e4 | 850 | ex | Elixir | lib/cat/macros/common.ex | fehu/elixir-cat | 7ca3492e755937c875747d0c3914fa47901080df | [
"MIT"
] | null | null | null | lib/cat/macros/common.ex | fehu/elixir-cat | 7ca3492e755937c875747d0c3914fa47901080df | [
"MIT"
] | null | null | null | lib/cat/macros/common.ex | fehu/elixir-cat | 7ca3492e755937c875747d0c3914fa47901080df | [
"MIT"
] | null | null | null | defmodule Cat.Macros.Common do
@moduledoc false
@spec safe(Macro.input, Macro.input, Macro.input) :: Macro.output
def safe(success, failure, x), do:
_safe(success, failure, x)
@spec flat_safe(Macro.input, Macro.input) :: Macro.output
def flat_safe(failure, x), do:
_safe(nil, failure, x)
@spec _sa... | 28.333333 | 68 | 0.627059 |
7442cb3cf6ac5a9335618d86adcead6aeecc75e6 | 459 | exs | Elixir | config/test.exs | navidmostafiz/discuss | 7a5d3dc8fb98103813b0d3ee32083af98d350e80 | [
"MIT"
] | 2 | 2019-03-08T04:21:53.000Z | 2020-07-05T00:53:26.000Z | phoenix_lessons/discuss/config/test.exs | sreecodeslayer/learn-elixir-phoenix | e32bcdbceef53b71dc560d79411c2023c13488ca | [
"MIT"
] | null | null | null | phoenix_lessons/discuss/config/test.exs | sreecodeslayer/learn-elixir-phoenix | e32bcdbceef53b71dc560d79411c2023c13488ca | [
"MIT"
] | 1 | 2020-07-05T00:53:29.000Z | 2020-07-05T00:53:29.000Z | use Mix.Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :discuss, DiscussWeb.Endpoint,
http: [port: 4002],
server: false
# Print only warnings and errors during test
config :logger, level: :warn
# Configure your database
config :discuss, Discuss.Re... | 24.157895 | 56 | 0.732026 |
7442df6732adf3f6807c91a062438d421cf18dff | 628 | ex | Elixir | lib/utils/private_methods.ex | spawnphile/garuda | f394e38fbbbcf89380cac4b331f21e3be0fd8518 | [
"MIT"
] | 4 | 2021-02-01T12:20:24.000Z | 2021-07-29T08:37:50.000Z | lib/utils/private_methods.ex | spawnphile/garuda | f394e38fbbbcf89380cac4b331f21e3be0fd8518 | [
"MIT"
] | 2 | 2021-06-10T11:22:48.000Z | 2021-07-30T06:09:10.000Z | lib/utils/private_methods.ex | spawnphile/garuda | f394e38fbbbcf89380cac4b331f21e3be0fd8518 | [
"MIT"
] | null | null | null | defmodule Garuda.Utils.PrivateMethods do
@moduledoc """
Some copies of private funtions that are very hard to test with normal flow
"""
defstruct(
name: "state_to_string",
type: "function"
)
def t_state_to_string(statemap) when is_struct(statemap) do
Map.from_struct(statemap)
|> Jason.encod... | 26.166667 | 80 | 0.719745 |
7442f224625008dfe73869128d890ba398714f81 | 799 | exs | Elixir | day21/test/day21_test.exs | bjorng/advent-of-code-2020 | 9d2f4b6cb7f6a2c9a39596a90ce2709c7f1df22a | [
"Apache-2.0"
] | 2 | 2020-12-19T00:40:21.000Z | 2021-02-16T04:17:05.000Z | day21/test/day21_test.exs | bjorng/advent-of-code-2020 | 9d2f4b6cb7f6a2c9a39596a90ce2709c7f1df22a | [
"Apache-2.0"
] | null | null | null | day21/test/day21_test.exs | bjorng/advent-of-code-2020 | 9d2f4b6cb7f6a2c9a39596a90ce2709c7f1df22a | [
"Apache-2.0"
] | 1 | 2020-12-14T22:37:13.000Z | 2020-12-14T22:37:13.000Z | defmodule Day21Test do
use ExUnit.Case
doctest Day21
test "part 1 with example" do
assert Day21.part1(example()) == 5
end
test "part 1 with my input data" do
assert Day21.part1(input()) == 2380
end
test "part 2 with example" do
assert Day21.part2(example()) == "mxmxvkd,sqjhc,fvjkl"
end
... | 21.594595 | 90 | 0.649562 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.