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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5a717fb1aa1624645c374b0d8f2fdcbca24d29f6 | 1,503 | ex | Elixir | lib/inmana_web/endpoint.ex | joaoeliandro/inmana | f50f77dc14498349f5f361a8acfba86093d66a81 | [
"MIT"
] | 2 | 2021-04-21T04:55:47.000Z | 2021-04-21T15:38:42.000Z | lib/inmana_web/endpoint.ex | joaoeliandro/inmana | f50f77dc14498349f5f361a8acfba86093d66a81 | [
"MIT"
] | null | null | null | lib/inmana_web/endpoint.ex | joaoeliandro/inmana | f50f77dc14498349f5f361a8acfba86093d66a81 | [
"MIT"
] | 1 | 2021-04-25T22:20:19.000Z | 2021-04-25T22:20:19.000Z | defmodule InmanaWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :inmana
# The session will be stored in the cookie and signed,
# this means its contents can be read but not tampered with.
# Set :encryption_salt if you would also like to encrypt it.
@session_options [
store: :cookie,
key: "_inmana_key"... | 28.358491 | 97 | 0.71324 |
5a7196616ce67060a7316c6a43506e1f598df84b | 604 | exs | Elixir | day23/mix.exs | bjorng/advent-of-code-2016 | fb3e40ae2fd52d761f6c0bf55e7634277917ba25 | [
"Apache-2.0"
] | 1 | 2021-05-12T11:30:15.000Z | 2021-05-12T11:30:15.000Z | day23/mix.exs | bjorng/advent-of-code-2016 | fb3e40ae2fd52d761f6c0bf55e7634277917ba25 | [
"Apache-2.0"
] | null | null | null | day23/mix.exs | bjorng/advent-of-code-2016 | fb3e40ae2fd52d761f6c0bf55e7634277917ba25 | [
"Apache-2.0"
] | null | null | null | defmodule Day23.MixProject do
use Mix.Project
def project do
[
app: :day23,
version: "0.1.0",
elixir: "~> 1.11",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applic... | 20.133333 | 87 | 0.56457 |
5a71fa17f49f6b22a109087580d2f253e47a42b6 | 2,121 | ex | Elixir | clients/content/lib/google_api/content/v2/model/account_address.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/account_address.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/account_address.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 35.949153 | 186 | 0.688355 |
5a7220f504a4c65dc18281ac8aef6e6848881262 | 111 | ex | Elixir | lib/battle_box/repo.ex | GrantJamesPowell/battle_box | 301091955b68cd4672f6513d645eca4e3c4e17d0 | [
"Apache-2.0"
] | 2 | 2020-10-17T05:48:49.000Z | 2020-11-11T02:34:15.000Z | lib/battle_box/repo.ex | FlyingDutchmanGames/battle_box | 301091955b68cd4672f6513d645eca4e3c4e17d0 | [
"Apache-2.0"
] | 3 | 2020-05-18T05:52:21.000Z | 2020-06-09T07:24:14.000Z | lib/battle_box/repo.ex | FlyingDutchmanGames/battle_box | 301091955b68cd4672f6513d645eca4e3c4e17d0 | [
"Apache-2.0"
] | null | null | null | defmodule BattleBox.Repo do
use Ecto.Repo,
otp_app: :battle_box,
adapter: Ecto.Adapters.Postgres
end
| 18.5 | 35 | 0.738739 |
5a7240737f5518b6774c2eeaf5c949efc705ee46 | 734 | ex | Elixir | lib/plug/validate_access_token.ex | KeenMate/keen_auth | 55ef1903e446a666ff2762a03080999196c5c355 | [
"MIT"
] | null | null | null | lib/plug/validate_access_token.ex | KeenMate/keen_auth | 55ef1903e446a666ff2762a03080999196c5c355 | [
"MIT"
] | null | null | null | lib/plug/validate_access_token.ex | KeenMate/keen_auth | 55ef1903e446a666ff2762a03080999196c5c355 | [
"MIT"
] | null | null | null | defmodule KeenAuth.Plug.ValidateAccessToken do
require Logger
alias KeenAuth.Request
alias KeenAuth.Claims
def init(params) do
%{
audience: Keyword.fetch!(params, :audience),
client: Keyword.fetch!(params, :client)
}
end
def call(conn, %{audience: audience, client: client}) when is_bi... | 25.310345 | 83 | 0.638965 |
5a72886b09b1cf4234b057b3ba23ff92ee4d062e | 669 | ex | Elixir | Elixir/nodeping_push/lib/modules/memavail.ex | stratacast/PUSH_Clients | 3f26794fecf4bdcf933a6a98fd2da3ba150e73cc | [
"MIT"
] | null | null | null | Elixir/nodeping_push/lib/modules/memavail.ex | stratacast/PUSH_Clients | 3f26794fecf4bdcf933a6a98fd2da3ba150e73cc | [
"MIT"
] | null | null | null | Elixir/nodeping_push/lib/modules/memavail.ex | stratacast/PUSH_Clients | 3f26794fecf4bdcf933a6a98fd2da3ba150e73cc | [
"MIT"
] | null | null | null | defmodule NodepingPUSH.Modules.Memavail do
@moduledoc """
LINUX ONLY: Get the amount of available system memory
"""
def main(_checkid) do
memtypes = [:buffered_memory, :cached_memory, :free_memory]
case :os.type() do
{:unix, :linux} ->
used_plus_caches =
:memsup.get_system_memo... | 26.76 | 83 | 0.585949 |
5a7291573b69694f0c74947f93c748187ab63d92 | 2,196 | exs | Elixir | config/web/dev.exs | paulanthonywilson/mcam | df9c5aaae00b568749dff22613636f5cb92f905a | [
"MIT"
] | null | null | null | config/web/dev.exs | paulanthonywilson/mcam | df9c5aaae00b568749dff22613636f5cb92f905a | [
"MIT"
] | 8 | 2020-11-16T09:59:12.000Z | 2020-11-16T10:13:07.000Z | config/web/dev.exs | paulanthonywilson/mcam | df9c5aaae00b568749dff22613636f5cb92f905a | [
"MIT"
] | null | null | null | use Mix.Config
# Configure your database
config :mcam_server, McamServer.Repo,
username: "postgres",
password: "postgres",
database: "mcam_server_dev",
hostname: "localhost",
show_sensitive_data_on_connection_error: true,
pool_size: 10
# For development, we disable any cache and enable
# debugging and cod... | 28.519481 | 68 | 0.698087 |
5a729b4e6a5444be5fb2acdf41658701d7607988 | 1,123 | exs | Elixir | config/config.exs | willpenington/morse_code | 76d202f94d5411b7d8f3f5cdc9221054dd88b6dd | [
"MIT"
] | null | null | null | config/config.exs | willpenington/morse_code | 76d202f94d5411b7d8f3f5cdc9221054dd88b6dd | [
"MIT"
] | null | null | null | config/config.exs | willpenington/morse_code | 76d202f94d5411b7d8f3f5cdc9221054dd88b6dd | [
"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... | 36.225806 | 73 | 0.752449 |
5a72b5543e174c052ae52e91400af43729aa739c | 305 | ex | Elixir | test/shared_examples/shared_examples.ex | SoCal-Software-Labs/cubdb | 20ee343ad1abedc6a3c66df152983e6530840ba9 | [
"Apache-2.0"
] | 318 | 2019-06-17T16:54:25.000Z | 2022-03-09T07:37:23.000Z | test/shared_examples/shared_examples.ex | SoCal-Software-Labs/cubdb | 20ee343ad1abedc6a3c66df152983e6530840ba9 | [
"Apache-2.0"
] | 29 | 2019-07-03T13:46:28.000Z | 2022-02-15T10:44:58.000Z | test/shared_examples/shared_examples.ex | SoCal-Software-Labs/cubdb | 20ee343ad1abedc6a3c66df152983e6530840ba9 | [
"Apache-2.0"
] | 18 | 2019-06-29T04:40:22.000Z | 2022-01-18T16:30:15.000Z | defmodule SharedExamples do
@moduledoc false
defmacro shared_examples(do: block) do
quote do
defmacro __using__(options) do
block = unquote(Macro.escape(block))
quote do
@moduletag unquote(options)
unquote(block)
end
end
end
end
end
| 17.941176 | 44 | 0.619672 |
5a72b8fbe12cfd27d9df599f1bc0b7971d982ec3 | 533 | ex | Elixir | apps/schedules/lib/schedules.ex | noisecapella/dotcom | d5ef869412102d2230fac3dcc216f01a29726227 | [
"MIT"
] | 42 | 2019-05-29T16:05:30.000Z | 2021-08-09T16:03:37.000Z | apps/schedules/lib/schedules.ex | noisecapella/dotcom | d5ef869412102d2230fac3dcc216f01a29726227 | [
"MIT"
] | 872 | 2019-05-29T17:55:50.000Z | 2022-03-30T09:28:43.000Z | apps/schedules/lib/schedules.ex | noisecapella/dotcom | d5ef869412102d2230fac3dcc216f01a29726227 | [
"MIT"
] | 12 | 2019-07-01T18:33:21.000Z | 2022-03-10T02:13:57.000Z | defmodule Schedules do
use Application
# See http://elixir-lang.org/docs/stable/elixir/Application.html
# for more information on OTP Applications
def start(_type, _args) do
import Supervisor.Spec, warn: false
children = [
Schedules.Repo,
Schedules.RepoCondensed
]
# See http://eli... | 26.65 | 67 | 0.718574 |
5a7327430e6b7203130b756bcc1a1ecc17ed8db2 | 76 | ex | Elixir | apps/nightcrawler_web/lib/nightcrawler_web/views/character_view.ex | ZucchiniZe/nightcrawler_elixir | be82b0e7c25f55c7d2c2d3aa2860371cb68aeeb6 | [
"MIT"
] | null | null | null | apps/nightcrawler_web/lib/nightcrawler_web/views/character_view.ex | ZucchiniZe/nightcrawler_elixir | be82b0e7c25f55c7d2c2d3aa2860371cb68aeeb6 | [
"MIT"
] | null | null | null | apps/nightcrawler_web/lib/nightcrawler_web/views/character_view.ex | ZucchiniZe/nightcrawler_elixir | be82b0e7c25f55c7d2c2d3aa2860371cb68aeeb6 | [
"MIT"
] | null | null | null | defmodule NightcrawlerWeb.CharacterView do
use NightcrawlerWeb, :view
end
| 19 | 42 | 0.842105 |
5a732cc74ffa19ed20dd13754658d9c329ba3440 | 804 | ex | Elixir | lib/poll_proxy_sup.ex | odo/poll_proxy | e14efdeccf238f72a0a78fec02ca31d9441839b9 | [
"MIT"
] | null | null | null | lib/poll_proxy_sup.ex | odo/poll_proxy | e14efdeccf238f72a0a78fec02ca31d9441839b9 | [
"MIT"
] | null | null | null | lib/poll_proxy_sup.ex | odo/poll_proxy | e14efdeccf238f72a0a78fec02ca31d9441839b9 | [
"MIT"
] | null | null | null | defmodule PollProxy.Supervisor do
# Automatically defines child_spec/1
use DynamicSupervisor
def start_link(arg) do
DynamicSupervisor.start_link(__MODULE__, arg, name: __MODULE__)
end
def init(_arg) do
DynamicSupervisor.init(strategy: :one_for_one)
end
def start_child(poll_module, poll_args, na... | 28.714286 | 112 | 0.717662 |
5a736388df4458ff63b31a81abbb16ffe9c85aa8 | 1,409 | ex | Elixir | clients/storage_transfer/lib/google_api/storage_transfer/v1/model/pause_transfer_operation_request.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/storage_transfer/lib/google_api/storage_transfer/v1/model/pause_transfer_operation_request.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/storage_transfer/lib/google_api/storage_transfer/v1/model/pause_transfer_operation_request.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... | 32.767442 | 96 | 0.776437 |
5a7374dae2065755b12dd432e67cd7e386ccf626 | 197 | ex | Elixir | test/support/web/controllers/broadcast5_controller.ex | Gamecode-HQ/drab | dfbe73c0675831f42829f0f3f7fe12d47a78badc | [
"MIT"
] | 933 | 2017-01-14T13:47:37.000Z | 2022-03-21T18:14:41.000Z | test/support/web/controllers/broadcast5_controller.ex | Gamecode-HQ/drab | dfbe73c0675831f42829f0f3f7fe12d47a78badc | [
"MIT"
] | 189 | 2017-01-15T18:35:06.000Z | 2022-01-24T17:41:22.000Z | test/support/web/controllers/broadcast5_controller.ex | Gamecode-HQ/drab | dfbe73c0675831f42829f0f3f7fe12d47a78badc | [
"MIT"
] | 54 | 2017-01-15T18:10:48.000Z | 2021-02-06T17:21:44.000Z | defmodule DrabTestApp.Broadcast5Controller do
@moduledoc false
use DrabTestApp.Web, :controller
# use Drab.Controller
def index(conn, _params) do
render(conn, "index.html")
end
end
| 17.909091 | 45 | 0.741117 |
5a738511b76e8e0bb3f76f36905f35b65f2d0db9 | 519 | ex | Elixir | lib/api/my_people.ex | silbermm/memelex | 1ab62069ceb4deb773b479b6ed21ac34ae0bfab5 | [
"Apache-2.0"
] | 5 | 2021-11-03T03:45:59.000Z | 2021-12-14T04:39:06.000Z | lib/api/my_people.ex | silbermm/memelex | 1ab62069ceb4deb773b479b6ed21ac34ae0bfab5 | [
"Apache-2.0"
] | 1 | 2021-12-14T18:26:14.000Z | 2021-12-14T18:26:14.000Z | lib/api/my_people.ex | silbermm/memelex | 1ab62069ceb4deb773b479b6ed21ac34ae0bfab5 | [
"Apache-2.0"
] | 3 | 2021-12-07T01:51:55.000Z | 2021-12-08T22:21:46.000Z | defmodule Memex.My.People do
alias Memex.Env.WikiManager
def new(params) do
new_person = params |> Memex.Person.construct()
Memex.My.Wiki.new_tidbit(params |> Map.merge(%{type: :person, data: new_person}))
end
def add(params) do
new(params)
end
@doc ~s(Fetch the whole list of TODOs)
def lis... | 23.590909 | 85 | 0.676301 |
5a739223e0bc230cb1e89a5330fbdc5d2b90f1ab | 4,778 | ex | Elixir | lib/surface/components/form/error_tag.ex | inspired-consulting/surface | 3a6a3a454704a9aaf83cd23a6393cbd09bdca8bd | [
"MIT"
] | 1,161 | 2019-12-12T02:30:52.000Z | 2021-03-11T17:55:44.000Z | lib/surface/components/form/error_tag.ex | inspired-consulting/surface | 3a6a3a454704a9aaf83cd23a6393cbd09bdca8bd | [
"MIT"
] | 244 | 2019-12-12T14:05:07.000Z | 2021-03-11T07:04:17.000Z | lib/surface/components/form/error_tag.ex | inspired-consulting/surface | 3a6a3a454704a9aaf83cd23a6393cbd09bdca8bd | [
"MIT"
] | 73 | 2019-12-12T13:57:41.000Z | 2021-03-11T21:46:10.000Z | defmodule Surface.Components.Form.ErrorTag do
@moduledoc """
A component inspired by `error_tag/3` that ships with `mix phx.new` in
`MyAppWeb.ErrorHelpers`.
Renders error messages if any exist regarding the given field.
## Error Translation
Changeset errors are translated using the default error translat... | 28.957576 | 113 | 0.676224 |
5a73b01f786c68f7494e781451168c0bda7b0e9f | 1,015 | exs | Elixir | test/charge_payment_test.exs | hooplab/nets-easy-elixir | 5d60a31ef36bb1518d7a3768851d09b258f62411 | [
"MIT"
] | null | null | null | test/charge_payment_test.exs | hooplab/nets-easy-elixir | 5d60a31ef36bb1518d7a3768851d09b258f62411 | [
"MIT"
] | null | null | null | test/charge_payment_test.exs | hooplab/nets-easy-elixir | 5d60a31ef36bb1518d7a3768851d09b258f62411 | [
"MIT"
] | null | null | null | defmodule ChargePaymentTest do
use ExUnit.Case
import Tesla.Mock
require Logger
alias NetsEasy.Model
alias NetsEasy.Model.ChargePaymentRequest
alias NetsEasy.Model.ChargePaymentResponse
test "charge_payment sends Idempotency-Key header if set" do
client = TestHelpers.create_client()
mock(fn
... | 29.852941 | 93 | 0.693596 |
5a73f4af1bcbf0d20e19c1481efd0d8172d8ada7 | 736 | ex | Elixir | learn/OTPAndPhoenix/islands_interface/lib/islands_interface_web/gettext.ex | idfumg/ElixirSynopsis | 74c668d84300812dd41eb18772aecfb89bc7628b | [
"MIT"
] | null | null | null | learn/OTPAndPhoenix/islands_interface/lib/islands_interface_web/gettext.ex | idfumg/ElixirSynopsis | 74c668d84300812dd41eb18772aecfb89bc7628b | [
"MIT"
] | null | null | null | learn/OTPAndPhoenix/islands_interface/lib/islands_interface_web/gettext.ex | idfumg/ElixirSynopsis | 74c668d84300812dd41eb18772aecfb89bc7628b | [
"MIT"
] | null | null | null | defmodule IslandsInterfaceWeb.Gettext do
@moduledoc """
A module providing Internationalization with a gettext-based API.
By using [Gettext](https://hexdocs.pm/gettext),
your module gains a set of macros for translations, for example:
import IslandsInterfaceWeb.Gettext
# Simple translation
... | 29.44 | 72 | 0.692935 |
5a741437aaf74d4e26e5db4d8e4428baef09ac0c | 380 | exs | Elixir | spec/aoc/day15_spec.exs | CraigCottingham/advent-of-code-2019 | 76a1545e4cca14fe1e9e0de475de253170da1645 | [
"Apache-2.0"
] | null | null | null | spec/aoc/day15_spec.exs | CraigCottingham/advent-of-code-2019 | 76a1545e4cca14fe1e9e0de475de253170da1645 | [
"Apache-2.0"
] | null | null | null | spec/aoc/day15_spec.exs | CraigCottingham/advent-of-code-2019 | 76a1545e4cca14fe1e9e0de475de253170da1645 | [
"Apache-2.0"
] | null | null | null | defmodule AoC.Day15.Spec do
@moduledoc false
use ESpec
describe "sanity checks" do
it do
graph =
Graph.new()
|> Graph.add_edge({0, 0}, {1, 0})
|> Graph.add_edge({0, 0}, {0, 1})
|> Graph.add_edge({0, 1}, {-1, 1})
expect(Graph.get_shortest_path(graph, {0, 0}, {-1, ... | 21.111111 | 98 | 0.502632 |
5a7422e2838e04dbd8a69878cf8802ec26d516c2 | 6,635 | ex | Elixir | lib/ark_tbw_delegate_server/ledger.ex | poka-IT/ark_tbw_delegate_server | c3b238b0967e0e03b078ad8938b33d66cdf0e8c7 | [
"MIT"
] | null | null | null | lib/ark_tbw_delegate_server/ledger.ex | poka-IT/ark_tbw_delegate_server | c3b238b0967e0e03b078ad8938b33d66cdf0e8c7 | [
"MIT"
] | null | null | null | lib/ark_tbw_delegate_server/ledger.ex | poka-IT/ark_tbw_delegate_server | c3b238b0967e0e03b078ad8938b33d66cdf0e8c7 | [
"MIT"
] | null | null | null | defmodule ArkTbwDelegateServer.Ledger do
defstruct [:account, :transactions, :__type_index__]
@defaults %{tranactions: [], __type_index__: %{}}
@disbursement_regex ~r/payout to height (\d+)/
alias ArkElixir.Models.{Account, Transaction}
alias ArkElixir.Util.TransactionBuilder
alias ArkTbwDelegateServer.{C... | 27.304527 | 79 | 0.64431 |
5a74288cef778d38b0b2cef402882cbbae226880 | 2,068 | exs | Elixir | lib/mix/test/mix/umbrella_test.exs | Nicd/elixir | e62ef92a4be1b562033d35b2d822cc9d6c661077 | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/umbrella_test.exs | Nicd/elixir | e62ef92a4be1b562033d35b2d822cc9d6c661077 | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/umbrella_test.exs | Nicd/elixir | e62ef92a4be1b562033d35b2d822cc9d6c661077 | [
"Apache-2.0"
] | null | null | null | Code.require_file "../test_helper.exs", __DIR__
defmodule Mix.UmbrellaTest do
use MixTest.Case
test "compile umbrella" do
in_fixture "umbrella_dep/deps/umbrella", fn ->
Mix.Project.in_project(:umbrella, ".", fn _ ->
Mix.Task.run "compile"
assert_received { :mix_shell, :info, ["==> bar"] ... | 33.354839 | 87 | 0.614603 |
5a744239807cb7be9ff8ce068035206bc6b43e07 | 28,932 | exs | Elixir | test/scrivener/html_test.exs | dbii/scrivener_html | 8d7845724be2b984f69b1bb6966e355c2a1f8347 | [
"MIT"
] | null | null | null | test/scrivener/html_test.exs | dbii/scrivener_html | 8d7845724be2b984f69b1bb6966e355c2a1f8347 | [
"MIT"
] | null | null | null | test/scrivener/html_test.exs | dbii/scrivener_html | 8d7845724be2b984f69b1bb6966e355c2a1f8347 | [
"MIT"
] | 4 | 2020-10-21T09:46:05.000Z | 2021-03-02T19:28:10.000Z | defmodule Scrivener.HTMLTest do
use ExUnit.Case
alias Scrivener.HTML
doctest Scrivener.HTML
import Scrivener.Support.HTML
alias Scrivener.Page
setup do
Application.put_env(:scrivener_html, :view_style, :bootstrap)
Application.put_env(:scrivener_html, :routes_helper, MyApp.Router.Helpers)
:ok
... | 32.507865 | 826 | 0.370662 |
5a7445932b172dbc843d1a10feb75d627fea4fad | 732 | ex | Elixir | lib/hypermock/registry.ex | mfeckie/hypermock | 93d580567f05f0dcbee2f200b9b60ef905621d21 | [
"MIT"
] | 25 | 2015-07-29T15:17:56.000Z | 2019-12-24T11:24:13.000Z | lib/hypermock/registry.ex | mfeckie/hypermock | 93d580567f05f0dcbee2f200b9b60ef905621d21 | [
"MIT"
] | 6 | 2015-07-29T14:54:33.000Z | 2015-12-15T17:12:32.000Z | lib/hypermock/registry.ex | mfeckie/hypermock | 93d580567f05f0dcbee2f200b9b60ef905621d21 | [
"MIT"
] | 2 | 2015-11-14T11:35:38.000Z | 2016-02-24T06:02:12.000Z | defmodule HyperMock.Registry do
def start_link do
Agent.start_link fn -> [] end, name: __MODULE__
end
def stop do
Agent.stop __MODULE__
end
def get(request) do
Agent.get_and_update __MODULE__, &_process(&1, request)
end
def all do
Agent.get __MODULE__, fn(state) -> state end
end
de... | 20.333333 | 66 | 0.625683 |
5a7451058f407bf3a5ceaa3d266616be75feb4f2 | 2,982 | exs | Elixir | test/append_to_stream_test.exs | uberbrodt/eventstore | 2bcdc7f8bcea6af87a08a4c719141f780e7a4fc4 | [
"MIT"
] | null | null | null | test/append_to_stream_test.exs | uberbrodt/eventstore | 2bcdc7f8bcea6af87a08a4c719141f780e7a4fc4 | [
"MIT"
] | null | null | null | test/append_to_stream_test.exs | uberbrodt/eventstore | 2bcdc7f8bcea6af87a08a4c719141f780e7a4fc4 | [
"MIT"
] | 1 | 2018-07-30T18:25:06.000Z | 2018-07-30T18:25:06.000Z | defmodule EventStore.AppendToStreamTest do
use EventStore.StorageCase
alias EventStore.EventFactory
describe "append to new stream using `:any_version`" do
test "should persist events" do
stream_uuid = UUID.uuid4()
events = EventFactory.create_events(3)
assert :ok = EventStore.append_to_s... | 31.389474 | 124 | 0.712274 |
5a74e561524fa236e0ea589e3b36793fa1f921fc | 2,220 | ex | Elixir | lib/incendium/controller.ex | tmbb/incendium | e95beb23c2d5916c99fd098e290c334eaf1dbd63 | [
"MIT"
] | 10 | 2021-07-05T01:37:11.000Z | 2022-01-22T19:31:30.000Z | lib/incendium/controller.ex | tmbb/incendium | e95beb23c2d5916c99fd098e290c334eaf1dbd63 | [
"MIT"
] | 1 | 2021-07-16T11:30:17.000Z | 2021-07-16T11:30:17.000Z | lib/incendium/controller.ex | tmbb/incendium | e95beb23c2d5916c99fd098e290c334eaf1dbd63 | [
"MIT"
] | null | null | null | defmodule Incendium.Controller do
alias Incendium.{
Flamegraph,
Assets,
Storage
}
@doc """
Turn the current module into an Icendium controller.
Options:
* `routes_module` (required) - The module that contains the routes
in your application (it should be something like `YourApp.Router.... | 27.073171 | 84 | 0.671171 |
5a74f08347c6ee76ddd7d1ec6b5f8bd71c37db4f | 17,561 | exs | Elixir | test/integration_test.exs | happysalada/distillery | 2098604c9f12a26227d6bd794c62d5e62e609ad4 | [
"MIT"
] | null | null | null | test/integration_test.exs | happysalada/distillery | 2098604c9f12a26227d6bd794c62d5e62e609ad4 | [
"MIT"
] | null | null | null | test/integration_test.exs | happysalada/distillery | 2098604c9f12a26227d6bd794c62d5e62e609ad4 | [
"MIT"
] | null | null | null | defmodule Distillery.Test.IntegrationTest do
use ExUnit.Case, async: false
alias Mix.Releases.Utils
import MixTestHelper
@moduletag integration: true
@moduletag timeout: 60_000 * 5
@standard_app_path Path.join([__DIR__, "fixtures", "standard_app"])
@standard_output_path Path.join([
... | 34.099029 | 108 | 0.560162 |
5a750b15102e05be11e57672dfb689a0ff40ca97 | 402 | ex | Elixir | elixir/lib/homework/utils/pagination.ex | mrcampbell/web-homework | 339c9de86c5ce099b9e9bfa01fddaa8da8922491 | [
"MIT"
] | null | null | null | elixir/lib/homework/utils/pagination.ex | mrcampbell/web-homework | 339c9de86c5ce099b9e9bfa01fddaa8da8922491 | [
"MIT"
] | null | null | null | elixir/lib/homework/utils/pagination.ex | mrcampbell/web-homework | 339c9de86c5ce099b9e9bfa01fddaa8da8922491 | [
"MIT"
] | null | null | null | defmodule Homework.Utils.Pagination do
import Ecto.Query
alias Homework.Repo
def skip_limit(query, args) do
# not sure how to pass this along to the query...
_total_rows = query |> select(fragment("count(*)")) |> Repo.one()
case args do
%{ pagination: %{ skip: s, limit: l } } -> query |> ord... | 23.647059 | 107 | 0.621891 |
5a75545f9b7269655991d4e7de1c56c88a294969 | 797 | ex | Elixir | test/support/conn_case.ex | jschoch/guardex | 26b2894385efbf032527ceef4a38c23e454faf40 | [
"MIT"
] | null | null | null | test/support/conn_case.ex | jschoch/guardex | 26b2894385efbf032527ceef4a38c23e454faf40 | [
"MIT"
] | null | null | null | test/support/conn_case.ex | jschoch/guardex | 26b2894385efbf032527ceef4a38c23e454faf40 | [
"MIT"
] | null | null | null | defmodule Guardex.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
imports other functionality to make it easier
to build and query models.
Finally, if the test case interacts with the da... | 22.771429 | 56 | 0.720201 |
5a755a3627702e279bf41ceebf944e9ddbf6d558 | 3,590 | ex | Elixir | lib/dispenser/demands.ex | LaudateCorpus1/dispenser | 5cdba1c0efa6b2c8cb2a878dc14ebee0717b8765 | [
"MIT"
] | 1 | 2021-12-05T20:55:40.000Z | 2021-12-05T20:55:40.000Z | lib/dispenser/demands.ex | LaudateCorpus1/dispenser | 5cdba1c0efa6b2c8cb2a878dc14ebee0717b8765 | [
"MIT"
] | null | null | null | lib/dispenser/demands.ex | LaudateCorpus1/dispenser | 5cdba1c0efa6b2c8cb2a878dc14ebee0717b8765 | [
"MIT"
] | 3 | 2022-01-25T14:15:52.000Z | 2022-03-17T09:38:04.000Z | defmodule Dispenser.Demands do
@moduledoc """
Tracks the demands of subscribers.
Keeps a constant-time `total/1` of the overall demand.
Used by `Buffer` to keep track of demand for events.
Used by implementations of `Dispenser.AssignmentStrategy`
to determine which subscribers to send to.
"""
@typed... | 27.615385 | 89 | 0.656546 |
5a757b17385047845a7f32f041966a72185e1b57 | 8 | ex | Elixir | testData/org/elixir_lang/parser_definition/tail_expression_parsing_test_case/EmptyParentheses.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 1,668 | 2015-01-03T05:54:27.000Z | 2022-03-25T08:01:20.000Z | testData/org/elixir_lang/parser_definition/tail_expression_parsing_test_case/EmptyParentheses.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 2,018 | 2015-01-01T22:43:39.000Z | 2022-03-31T20:13:08.000Z | testData/org/elixir_lang/parser_definition/tail_expression_parsing_test_case/EmptyParentheses.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 145 | 2015-01-15T11:37:16.000Z | 2021-12-22T05:51:02.000Z | # nil
() | 4 | 5 | 0.375 |
5a758341e47bac495e1036c9d9d63609d3b41f98 | 155 | ex | Elixir | lib/ido_keido/repo.ex | isabella232/ido_keido | 871fd5c8b294fdc89e31e8dba173f2a5464de399 | [
"Apache-2.0"
] | 6 | 2019-11-15T20:34:47.000Z | 2021-04-05T03:15:23.000Z | lib/ido_keido/repo.ex | FindHotel/ido_keido | 871fd5c8b294fdc89e31e8dba173f2a5464de399 | [
"Apache-2.0"
] | 1 | 2022-03-20T09:34:42.000Z | 2022-03-20T09:34:42.000Z | lib/ido_keido/repo.ex | isabella232/ido_keido | 871fd5c8b294fdc89e31e8dba173f2a5464de399 | [
"Apache-2.0"
] | 3 | 2021-06-09T05:58:09.000Z | 2022-03-20T07:05:13.000Z | defmodule IdoKeido.Repo do
@moduledoc """
Repository behaviour.
"""
@callback lookup(ip :: String.t(), options :: Keyword.t()) :: map() | nil
end
| 19.375 | 75 | 0.632258 |
5a75838e2a3698e760f81662b44269b1b864e53a | 281 | ex | Elixir | test/support/config.ex | Apemb/ersatz | 8f4c57c56588efefd94655934f57bd0df34c84f7 | [
"Apache-2.0"
] | 1 | 2019-11-28T16:30:56.000Z | 2019-11-28T16:30:56.000Z | test/support/config.ex | Apemb/ersatz | 8f4c57c56588efefd94655934f57bd0df34c84f7 | [
"Apache-2.0"
] | null | null | null | test/support/config.ex | Apemb/ersatz | 8f4c57c56588efefd94655934f57bd0df34c84f7 | [
"Apache-2.0"
] | null | null | null | defmodule Mock.Config do
@moduledoc false
@behaviour Ersatz.Config
defmodule Logger do
@callback log(String.t()) :: :ok | {:error, term()}
end
def setup do
Ersatz.set_mock_implementation(&MockLogger.log/1, fn _ -> {:error, :not_working} end)
:ok
end
end
| 18.733333 | 89 | 0.669039 |
5a75a4956a215dc698ea50580dad5058de2a37c4 | 1,095 | ex | Elixir | clients/cloud_kms/lib/google_api/cloud_kms/v1/model/key_ring.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/cloud_kms/lib/google_api/cloud_kms/v1/model/key_ring.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/cloud_kms/lib/google_api/cloud_kms/v1/model/key_ring.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... | 28.815789 | 77 | 0.742466 |
5a75b789f62a595d3f3b5953b25004c523ed3b10 | 219 | ex | Elixir | lib/oauth_azure_activedirectory.ex | onurkucukkece/oauth_azure_activedirectory | e698db137a8c475eb9a844c73e17f09243846e1f | [
"Apache-2.0"
] | 10 | 2018-01-09T23:34:48.000Z | 2022-02-14T16:50:23.000Z | lib/oauth_azure_activedirectory.ex | hryyan/oauth_azure_activedirectory | e698db137a8c475eb9a844c73e17f09243846e1f | [
"Apache-2.0"
] | null | null | null | lib/oauth_azure_activedirectory.ex | hryyan/oauth_azure_activedirectory | e698db137a8c475eb9a844c73e17f09243846e1f | [
"Apache-2.0"
] | 4 | 2018-05-25T03:57:51.000Z | 2021-08-03T17:06:44.000Z | defmodule OauthAzureActivedirectory do
@moduledoc """
Documentation for OauthAzureActivedirectory.
"""
@doc """
Hello world.
## Examples
iex> OauthAzureActivedirectory.hello
:world
"""
end
| 13.6875 | 46 | 0.675799 |
5a75cc5d12b06d916d49d5f8196e313d389c6845 | 63 | ex | Elixir | lib/gistex/exception.ex | MrYawe/gistex | 3521420ae5c092e37f47a7ca9123d0ca68539d2c | [
"MIT"
] | null | null | null | lib/gistex/exception.ex | MrYawe/gistex | 3521420ae5c092e37f47a7ca9123d0ca68539d2c | [
"MIT"
] | null | null | null | lib/gistex/exception.ex | MrYawe/gistex | 3521420ae5c092e37f47a7ca9123d0ca68539d2c | [
"MIT"
] | null | null | null | defmodule Gistex.Error do
defexception [:code, :message]
end
| 15.75 | 32 | 0.761905 |
5a75f78224cbb35e89f51305344d97f5f64bc7a5 | 449 | ex | Elixir | lib/slax/sprints/sprint.ex | HoffsMH/slax | b91ee30b9fd71a4cb7826f50b605ce580b7c1651 | [
"MIT"
] | 11 | 2016-07-05T18:56:21.000Z | 2021-09-15T22:23:54.000Z | lib/slax/sprints/sprint.ex | HoffsMH/slax | b91ee30b9fd71a4cb7826f50b605ce580b7c1651 | [
"MIT"
] | 181 | 2016-06-23T00:47:13.000Z | 2022-03-10T11:23:44.000Z | lib/slax/sprints/sprint.ex | HoffsMH/slax | b91ee30b9fd71a4cb7826f50b605ce580b7c1651 | [
"MIT"
] | 7 | 2019-01-30T21:38:28.000Z | 2022-03-01T07:13:39.000Z | defmodule Slax.Sprint do
@moduledoc false
use Slax.Schema
@type t :: %__MODULE__{}
schema "sprints" do
belongs_to(:project_repo, Slax.ProjectRepo)
field(:issues, {:array, :integer}, default: [])
field(:milestone_id, :integer)
end
@fields ~w(project_repo_id milestone_id issues)a
@doc false
... | 20.409091 | 51 | 0.672606 |
5a7607228b6aa6efb57a048cebae7088e097b520 | 19,621 | exs | Elixir | test/game/npc/events_test.exs | deep-spaced/ex_venture | 45848abe509620d6d2643b2a780dab01c1ac523b | [
"MIT"
] | null | null | null | test/game/npc/events_test.exs | deep-spaced/ex_venture | 45848abe509620d6d2643b2a780dab01c1ac523b | [
"MIT"
] | null | null | null | test/game/npc/events_test.exs | deep-spaced/ex_venture | 45848abe509620d6d2643b2a780dab01c1ac523b | [
"MIT"
] | null | null | null | defmodule Game.NPC.EventsTest do
use Data.ModelCase
import Test.DamageTypesHelper
@room Test.Game.Room
alias Game.Channel
alias Game.Door
alias Game.Message
alias Game.NPC.Events
alias Game.NPC.State
alias Game.NPC.Status
alias Game.Session.Registry
setup do
@room.clear_says()
@room.cl... | 30.802198 | 137 | 0.56465 |
5a76272b489588da6e7e4758628239f7b8e3bf0a | 2,444 | ex | Elixir | elixir/lib/homework/transactions.ex | pokemaughan/web-homework | f4676741f6efa44eb72561694fe793c29dcbfc6a | [
"MIT"
] | null | null | null | elixir/lib/homework/transactions.ex | pokemaughan/web-homework | f4676741f6efa44eb72561694fe793c29dcbfc6a | [
"MIT"
] | null | null | null | elixir/lib/homework/transactions.ex | pokemaughan/web-homework | f4676741f6efa44eb72561694fe793c29dcbfc6a | [
"MIT"
] | null | null | null | defmodule Homework.Transactions do
@moduledoc """
The Transactions context.
"""
import Ecto.Query, warn: false
alias Homework.Repo
alias Homework.Transactions.Transaction
@doc """
Returns the list of transactions.
## Examples
iex> list_transactions([])
[%Transaction{}, ...]
"""
d... | 20.888889 | 77 | 0.645663 |
5a76366f2e96dfaa43420344c0aa7df2796c58c9 | 2,163 | exs | Elixir | config/dev.exs | jfcloutier/freegiving | 2ab3821595996fc295c5b55515d6f60cbce05181 | [
"Unlicense"
] | null | null | null | config/dev.exs | jfcloutier/freegiving | 2ab3821595996fc295c5b55515d6f60cbce05181 | [
"Unlicense"
] | null | null | null | config/dev.exs | jfcloutier/freegiving | 2ab3821595996fc295c5b55515d6f60cbce05181 | [
"Unlicense"
] | null | null | null | use Mix.Config
# Configure your database
config :freegiving, Freegiving.Repo,
username: "postgres",
password: "postgres",
database: "freegiving_dev",
hostname: "localhost",
show_sensitive_data_on_connection_error: true,
pool_size: 10
# For development, we disable any cache and enable
# debugging and code ... | 28.090909 | 68 | 0.694406 |
5a76527375b35e4a49c2af6cd418d1275906e478 | 2,113 | ex | Elixir | clients/civic_info/lib/google_api/civic_info/v2/model/voter_info_segment_result.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/civic_info/lib/google_api/civic_info/v2/model/voter_info_segment_result.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/civic_info/lib/google_api/civic_info/v2/model/voter_info_segment_result.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 37.732143 | 99 | 0.728822 |
5a766b8df07de3774690d3f1d685c7685488c2bb | 872 | ex | Elixir | clients/fcm/lib/google_api/fcm/v1/metadata.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/fcm/lib/google_api/fcm/v1/metadata.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/fcm/lib/google_api/fcm/v1/metadata.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"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.296296 | 74 | 0.755734 |
5a768dc11de392a3f668143abe17c23a99e14787 | 3,179 | ex | Elixir | lib/sanbase_web/admin/user_lists/user_list.ex | rmoorman/sanbase2 | 226784ab43a24219e7332c49156b198d09a6dd85 | [
"MIT"
] | 1 | 2022-01-30T19:51:39.000Z | 2022-01-30T19:51:39.000Z | lib/sanbase_web/admin/user_lists/user_list.ex | rmoorman/sanbase2 | 226784ab43a24219e7332c49156b198d09a6dd85 | [
"MIT"
] | null | null | null | lib/sanbase_web/admin/user_lists/user_list.ex | rmoorman/sanbase2 | 226784ab43a24219e7332c49156b198d09a6dd85 | [
"MIT"
] | null | null | null | defmodule SanbaseWeb.ExAdmin.UserList do
use ExAdmin.Register
alias Sanbase.UserList
register_resource Sanbase.UserList do
update_changeset(:update_changeset)
action_items(only: [:show, :edit, :delete])
scope(:all, default: true)
scope(:featured, [], fn query ->
from(
user_list i... | 24.267176 | 75 | 0.60994 |
5a76d7ad1942b57b003f2c74d7c5ed6f77b893ea | 606 | ex | Elixir | lib/august_db/startup.ex | Terkwood/AugustDB | 6de696a80bc4eb523b89d64cd4292ac342bdb3aa | [
"MIT"
] | 5 | 2021-07-28T15:56:42.000Z | 2021-08-18T20:58:43.000Z | lib/august_db/startup.ex | Terkwood/AugustDB | 6de696a80bc4eb523b89d64cd4292ac342bdb3aa | [
"MIT"
] | 54 | 2021-07-28T14:51:49.000Z | 2021-08-11T21:56:10.000Z | lib/august_db/startup.ex | Terkwood/AugustDB | 6de696a80bc4eb523b89d64cd4292ac342bdb3aa | [
"MIT"
] | null | null | null | defmodule Startup do
@moduledoc """
Commit log / memtable / SSTable initialization procedures.
"""
@doc """
1. Touch the commit log so that we can receive writes.
2. Replay any stale commit log entries into memory. This
lets us recover from crashes without losing writes from
the previou... | 28.857143 | 67 | 0.681518 |
5a76d999804db09fc9358f3cce5c3d7ebcf357fe | 416 | exs | Elixir | test/test_helper.exs | boonious/hui_mon | c88008c92c4a0977333c94f109ab6451af20cc9a | [
"Apache-2.0"
] | null | null | null | test/test_helper.exs | boonious/hui_mon | c88008c92c4a0977333c94f109ab6451af20cc9a | [
"Apache-2.0"
] | 3 | 2021-04-22T10:10:04.000Z | 2021-05-14T15:21:13.000Z | test/test_helper.exs | boonious/hui_mon | c88008c92c4a0977333c94f109ab6451af20cc9a | [
"Apache-2.0"
] | null | null | null | Application.ensure_all_started(:bypass)
Application.ensure_all_started(:mox)
ExUnit.start()
defmodule TestHelpers do
def bypass_ping_ok(bypass, qtime \\ 0) do
Bypass.expect_once(bypass, "GET", "/solr/test/admin/ping", fn conn ->
Plug.Conn.put_resp_header(conn, "content-type", "application/json")
|> ... | 29.714286 | 85 | 0.697115 |
5a770f401a09b909e22f5ac743a8f626fe37c797 | 1,281 | ex | Elixir | lib/telepath_web/endpoint.ex | jdangerx/telepath | 75314db05dd97ea86b5a828ab673fed33ecad5e1 | [
"MIT"
] | null | null | null | lib/telepath_web/endpoint.ex | jdangerx/telepath | 75314db05dd97ea86b5a828ab673fed33ecad5e1 | [
"MIT"
] | null | null | null | lib/telepath_web/endpoint.ex | jdangerx/telepath | 75314db05dd97ea86b5a828ab673fed33ecad5e1 | [
"MIT"
] | null | null | null | defmodule TelepathWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :telepath
socket "/socket", TelepathWeb.UserSocket,
websocket: [timeout: 45_000],
longpoll: false
# Serve at "/" the static files from "priv/static" directory.
#
# You should set gzip to true if you are running phx.digest
# when depl... | 27.255319 | 69 | 0.709602 |
5a77251a11582c7ed11a67daafbc117b32d108f6 | 680 | exs | Elixir | integration/mix.exs | amclain/jylis_ex | cff66a5881ebc1f76403e2b8a60fba25f5b73bec | [
"MIT"
] | 3 | 2018-08-09T12:02:29.000Z | 2019-12-08T21:10:17.000Z | integration/mix.exs | amclain/jylis_ex | cff66a5881ebc1f76403e2b8a60fba25f5b73bec | [
"MIT"
] | 1 | 2018-08-06T17:10:13.000Z | 2018-08-08T19:16:47.000Z | integration/mix.exs | amclain/jylis_ex | cff66a5881ebc1f76403e2b8a60fba25f5b73bec | [
"MIT"
] | null | null | null | defmodule Integration.MixProject do
use Mix.Project
def project do
[
app: :jylis_integration,
version: "0.1.0",
elixir: "~> 1.6",
deps: deps(),
start_permanent: Mix.env() == :test,
aliases: [test: "espec"],
pr... | 21.935484 | 59 | 0.507353 |
5a775a2a7bcd4c921e114df5b692b79a1867acdb | 1,021 | ex | Elixir | test/support/channel_case.ex | GBH/pedal | a2d68c3561f186ee3017a21b4170127b1625e18d | [
"MIT"
] | 48 | 2017-04-25T16:02:08.000Z | 2021-01-23T01:57:29.000Z | test/support/channel_case.ex | GBH/pedal | a2d68c3561f186ee3017a21b4170127b1625e18d | [
"MIT"
] | 5 | 2018-03-09T20:17:55.000Z | 2018-07-23T16:29:21.000Z | test/support/channel_case.ex | GBH/pedal | a2d68c3561f186ee3017a21b4170127b1625e18d | [
"MIT"
] | 4 | 2017-05-21T14:38:38.000Z | 2017-12-29T11:09:54.000Z | defmodule LoadedBike.Web.ChannelCase do
@moduledoc """
This module defines the test case to be used by
channel tests.
Such tests rely on `Phoenix.ChannelTest` and also
import other functionality to make it easier
to build and query models.
Finally, if the test case interacts with the database,
it cann... | 23.204545 | 72 | 0.705191 |
5a77668af6b85097814acf3621b2c211c5bac531 | 479 | ex | Elixir | hangman/lib/hangman.ex | imattman/elixir-for-programmers | ff757b05fec5d00f32a067fc5e6d0364ce56358b | [
"MIT"
] | null | null | null | hangman/lib/hangman.ex | imattman/elixir-for-programmers | ff757b05fec5d00f32a067fc5e6d0364ce56358b | [
"MIT"
] | null | null | null | hangman/lib/hangman.ex | imattman/elixir-for-programmers | ff757b05fec5d00f32a067fc5e6d0364ce56358b | [
"MIT"
] | null | null | null | defmodule Hangman do
alias Hangman.Runtime.Server
alias Hangman.Type
@opaque game :: Server.t()
@type tally :: Type.tally()
@spec new_game() :: game
def new_game() do
{:ok, pid} = Hangman.Runtime.Application.start_game()
pid
end
@spec make_move(game, String.t()) :: tally
def make_move(game,... | 19.958333 | 57 | 0.65762 |
5a776b46cd6fbfe94eb6a6f891f64b46ec09cbd7 | 74 | ex | Elixir | lib/cxs_starter_web/views/user_session_view.ex | antp/cxs_starter | 349cbd61e561f276b552f95e88e24e01397b8519 | [
"MIT"
] | null | null | null | lib/cxs_starter_web/views/user_session_view.ex | antp/cxs_starter | 349cbd61e561f276b552f95e88e24e01397b8519 | [
"MIT"
] | null | null | null | lib/cxs_starter_web/views/user_session_view.ex | antp/cxs_starter | 349cbd61e561f276b552f95e88e24e01397b8519 | [
"MIT"
] | null | null | null | defmodule CxsStarterWeb.UserSessionView do
use CxsStarterWeb, :view
end
| 18.5 | 42 | 0.837838 |
5a776f9c9f5bd9750e6a6cdc5b0c5ecd441a9f41 | 729 | ex | Elixir | lib/webbkoll_web/controllers/controller_helpers.ex | twigbit/webbkoll | 9faac7d0b4101f3801e78ed156665c8132197116 | [
"MIT"
] | 268 | 2016-07-08T17:14:58.000Z | 2022-02-15T19:41:24.000Z | lib/webbkoll_web/controllers/controller_helpers.ex | twigbit/webbkoll | 9faac7d0b4101f3801e78ed156665c8132197116 | [
"MIT"
] | 29 | 2016-08-23T19:19:01.000Z | 2022-02-01T16:28:23.000Z | lib/webbkoll_web/controllers/controller_helpers.ex | twigbit/webbkoll | 9faac7d0b4101f3801e78ed156665c8132197116 | [
"MIT"
] | 37 | 2016-08-24T21:52:45.000Z | 2021-09-08T11:27:15.000Z | defmodule WebbkollWeb.ControllerHelpers do
import Plug.Conn
import Phoenix.Controller
import WebbkollWeb.Gettext
alias Webbkoll.Sites
@backends Application.get_env(:webbkoll, :backends)
def enqueue_site(conn, url) do
{queue, settings} = Enum.random(@backends)
{:ok, site} = Sites.add_site(url)
... | 19.702703 | 87 | 0.636488 |
5a7771d9677a22c095d5da69f23544b543a15faf | 1,154 | exs | Elixir | config/config.exs | albertocsouto/udemy-phoenix-bootcamp | f2506fee672fe22c8b6ff80805bd7324a3a629a9 | [
"Apache-2.0"
] | null | null | null | config/config.exs | albertocsouto/udemy-phoenix-bootcamp | f2506fee672fe22c8b6ff80805bd7324a3a629a9 | [
"Apache-2.0"
] | null | null | null | config/config.exs | albertocsouto/udemy-phoenix-bootcamp | f2506fee672fe22c8b6ff80805bd7324a3a629a9 | [
"Apache-2.0"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
# General application configuration
use Mix.Config
config :discuss,
ecto_repos: [Discuss.Repo]
#... | 31.189189 | 86 | 0.761698 |
5a77d621df571987ff7b01039b821aa5cae67950 | 710 | ex | Elixir | lib/bencode.ex | olof/elixir-bencode | e9bd497f22ef5f4c481378ca1efbfde4a453b472 | [
"Apache-2.0"
] | 19 | 2015-12-05T13:50:41.000Z | 2022-01-31T20:20:48.000Z | lib/bencode.ex | olof/elixir-bencode | e9bd497f22ef5f4c481378ca1efbfde4a453b472 | [
"Apache-2.0"
] | 7 | 2016-02-24T13:46:42.000Z | 2020-03-23T01:03:26.000Z | lib/bencode.ex | olof/elixir-bencode | e9bd497f22ef5f4c481378ca1efbfde4a453b472 | [
"Apache-2.0"
] | 5 | 2016-02-24T13:18:29.000Z | 2019-09-09T08:59:52.000Z | defmodule Bencode do
@type encodable :: binary | atom | Map | List | Integer
@spec encode(encodable) :: {:ok, binary} | {:error, binary}
def encode(data) do
try do
Bencode.Encoder.encode!(data)
rescue
e in Protocol.UndefinedError ->
{:error, "protocol Bencode.Encoder is not implemente... | 22.1875 | 86 | 0.660563 |
5a781389eed3bc340908eabfe2b03e9fb9d0578b | 1,147 | ex | Elixir | lib/skeleton/types/default/any.ex | haskric/map_schema | 615d6428e168a0d3991d334cba76c2d8e5c417b6 | [
"MIT"
] | 3 | 2020-12-15T09:04:57.000Z | 2021-06-11T02:01:09.000Z | lib/skeleton/types/default/any.ex | haskric/map_schema | 615d6428e168a0d3991d334cba76c2d8e5c417b6 | [
"MIT"
] | null | null | null | lib/skeleton/types/default/any.ex | haskric/map_schema | 615d6428e168a0d3991d334cba76c2d8e5c417b6 | [
"MIT"
] | null | null | null | defmodule MapSchema.DefaultTypes.MSchemaAny do
@moduledoc false
@doc """
Any type
"""
@behaviour MapSchema.CustomType
@spec name :: atom | String.t()
def name, do: :any
def nested?, do: true
@doc """
Always the same
## Examples
iex> alias MapSchema.DefaultTypes.MSchemaAny
iex> MSch... | 18.803279 | 58 | 0.610288 |
5a78175c9f974a549799a223a72dc8188d0d6296 | 2,622 | exs | Elixir | integration_test/support/migration.exs | aforward/ecto | 74bf4528abf198b25ff261d127fe7cf54a1ff044 | [
"Apache-2.0"
] | null | null | null | integration_test/support/migration.exs | aforward/ecto | 74bf4528abf198b25ff261d127fe7cf54a1ff044 | [
"Apache-2.0"
] | null | null | null | integration_test/support/migration.exs | aforward/ecto | 74bf4528abf198b25ff261d127fe7cf54a1ff044 | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.Integration.Migration do
use Ecto.Migration
def change do
create table(:posts) do
add :title, :string, size: 100
add :counter, :integer, default: 10 # Do not propagate unless read_after_write
add :text, :binary
add :bid, :binary_id
add :uuid, :uuid
add :public... | 23.20354 | 84 | 0.614416 |
5a7818187497d532b11065a41367e3d9a4f3bcbd | 980 | ex | Elixir | harbor/lib/pier/message/room/get_profiles.ex | miapolis/port7 | 7df1223f83d055eeb6ce8f61f4af8b4f2cf33e74 | [
"MIT"
] | null | null | null | harbor/lib/pier/message/room/get_profiles.ex | miapolis/port7 | 7df1223f83d055eeb6ce8f61f4af8b4f2cf33e74 | [
"MIT"
] | null | null | null | harbor/lib/pier/message/room/get_profiles.ex | miapolis/port7 | 7df1223f83d055eeb6ce8f61f4af8b4f2cf33e74 | [
"MIT"
] | null | null | null | defmodule Pier.Message.Room.GetProfiles do
use Pier.Message.Call
@primary_key false
embedded_schema do
end
def changeset(initializer \\ %__MODULE__{}, data) do
initializer
|> cast(data, [])
end
defmodule Reply do
use Pier.Message.Push
@derive {Jason.Encoder, only: [:profiles]}
@pr... | 22.790698 | 79 | 0.606122 |
5a781a50b74b94cc24bd5557825e9447553e40a6 | 2,334 | exs | Elixir | config/dev.exs | moroz/phoenix-totp-demo | b07b1925a1116ecbade15cb37764e4aebf442b5b | [
"MIT"
] | null | null | null | config/dev.exs | moroz/phoenix-totp-demo | b07b1925a1116ecbade15cb37764e4aebf442b5b | [
"MIT"
] | null | null | null | config/dev.exs | moroz/phoenix-totp-demo | b07b1925a1116ecbade15cb37764e4aebf442b5b | [
"MIT"
] | null | null | null | import Config
# Configure your database
config :otp_demo, OtpDemo.Repo,
username: "postgres",
password: "postgres",
hostname: "localhost",
database: "otp_demo_dev",
show_sensitive_data_on_connection_error: true,
pool_size: 10
# For development, we disable any cache and enable
# debugging and code reloadin... | 30.311688 | 86 | 0.70437 |
5a7830d382d29d04617b849b8b2ab34489f9a421 | 4,303 | ex | Elixir | lib/fdb/coder/integer.ex | VinogradovAlexandr/fdb | 312b0a173337993ce28024f338f0977ccf81ae25 | [
"MIT"
] | 40 | 2018-06-12T17:38:51.000Z | 2022-03-31T05:16:14.000Z | lib/fdb/coder/integer.ex | VinogradovAlexandr/fdb | 312b0a173337993ce28024f338f0977ccf81ae25 | [
"MIT"
] | 15 | 2018-06-19T00:56:37.000Z | 2022-01-30T04:33:25.000Z | lib/fdb/coder/integer.ex | VinogradovAlexandr/fdb | 312b0a173337993ce28024f338f0977ccf81ae25 | [
"MIT"
] | 6 | 2018-08-23T19:30:50.000Z | 2021-11-06T14:44:32.000Z | defmodule FDB.Coder.Integer do
@moduledoc """
Supports integer in the range
`-0xFFFFFFFFFFFFFFFF..0xFFFFFFFFFFFFFFFF` (8 bytes). Consider using
`FDB.Coder.ArbitraryInteger` for arbitrary precision numbers.
"""
use FDB.Coder.Behaviour
use Bitwise
@spec new() :: FDB.Coder.t()
def new do
%FDB.Coder{... | 28.496689 | 94 | 0.577736 |
5a7841c1d93d55367ed65e299187f29185d8ab58 | 2,783 | ex | Elixir | lib/cforum/accounts/scores.ex | campingrider/cforum_ex | cf27684c47d6dc26c9c37a946f1c729a79d27c70 | [
"MIT"
] | null | null | null | lib/cforum/accounts/scores.ex | campingrider/cforum_ex | cf27684c47d6dc26c9c37a946f1c729a79d27c70 | [
"MIT"
] | null | null | null | lib/cforum/accounts/scores.ex | campingrider/cforum_ex | cf27684c47d6dc26c9c37a946f1c729a79d27c70 | [
"MIT"
] | null | null | null | defmodule Cforum.Accounts.Scores do
@moduledoc """
The boundary for the Accounts system.
"""
import Ecto.Query, warn: false
alias Cforum.Repo
alias Cforum.Accounts.Score
alias Cforum.Accounts.User
alias Cforum.Caching
@doc """
Returns the list of scores.
## Examples
iex> list_scores()
... | 20.313869 | 118 | 0.604384 |
5a78422fb9399a72a360b2aab59b2659cab3ca3b | 3,947 | ex | Elixir | lib/basic_web/controllers/sphere/sphere_controller.ex | ysaito8015/communitex | d469447a62029d59883d95df4df3c9b09e0022e2 | [
"Apache-2.0"
] | 7 | 2021-07-14T15:45:55.000Z | 2022-01-25T11:13:01.000Z | lib/basic_web/controllers/sphere/sphere_controller.ex | ysaito8015/communitex | d469447a62029d59883d95df4df3c9b09e0022e2 | [
"Apache-2.0"
] | 10 | 2021-08-09T15:54:05.000Z | 2022-02-17T04:18:38.000Z | lib/basic_web/controllers/sphere/sphere_controller.ex | ysaito8015/communitex | d469447a62029d59883d95df4df3c9b09e0022e2 | [
"Apache-2.0"
] | 5 | 2021-07-23T05:54:35.000Z | 2022-01-28T04:14:51.000Z | defmodule BasicWeb.SphereController do #TODO: 本来のコントローラ副作用部分と分離
use BasicWeb, :controller
require IEx
#TODO: cwdを使っている場所を:local_rootに変更
def index( conn, %{ "path_" => path_ } = params ) do
#IEx.pry
content_path = if path_ == [], do: "index.html", else: Path.join( path_ )
folder = Application.fetch_env!... | 41.989362 | 152 | 0.593109 |
5a784656e4d16dd6c96e41afe4bf1104e6bef06c | 2,651 | ex | Elixir | lib/docusign/model/note.ex | gaslight/docusign_elixir | d9d88d53dd85d32a39d537bade9db28d779414e6 | [
"MIT"
] | 4 | 2020-12-21T12:50:13.000Z | 2022-01-12T16:50:43.000Z | lib/docusign/model/note.ex | gaslight/docusign_elixir | d9d88d53dd85d32a39d537bade9db28d779414e6 | [
"MIT"
] | 12 | 2018-09-18T15:26:34.000Z | 2019-09-28T15:29:39.000Z | lib/docusign/model/note.ex | gaslight/docusign_elixir | d9d88d53dd85d32a39d537bade9db28d779414e6 | [
"MIT"
] | 15 | 2020-04-29T21:50:16.000Z | 2022-02-11T18:01:51.000Z | # NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
defmodule DocuSign.Model.Note do
@moduledoc """
A tab that displays additional information, in the form of a note, for the recipient.
"""
@derive ... | 27.329897 | 88 | 0.574123 |
5a78822a482947a22c185103f0b3cb87de970cac | 98 | ex | Elixir | lib/exp/repo.ex | karloescota/exp | 77267b80febf6d738b3ac6b6203795feef01e666 | [
"MIT"
] | null | null | null | lib/exp/repo.ex | karloescota/exp | 77267b80febf6d738b3ac6b6203795feef01e666 | [
"MIT"
] | null | null | null | lib/exp/repo.ex | karloescota/exp | 77267b80febf6d738b3ac6b6203795feef01e666 | [
"MIT"
] | null | null | null | defmodule Exp.Repo do
use Ecto.Repo,
otp_app: :exp,
adapter: Ecto.Adapters.Postgres
end
| 16.333333 | 35 | 0.704082 |
5a7896a74af33b7056036066bf0327806ebd3472 | 8,367 | ex | Elixir | lib/absinthe/phase/schema.ex | TheRealReal/absinthe | 6eae5bc36283e58f42d032b8afd90de3ad64f97b | [
"MIT"
] | 1 | 2019-10-10T02:57:52.000Z | 2019-10-10T02:57:52.000Z | lib/absinthe/phase/schema.ex | TheRealReal/absinthe | 6eae5bc36283e58f42d032b8afd90de3ad64f97b | [
"MIT"
] | 1 | 2019-09-23T21:26:01.000Z | 2019-09-23T21:26:01.000Z | lib/absinthe/phase/schema.ex | TheRealReal/absinthe | 6eae5bc36283e58f42d032b8afd90de3ad64f97b | [
"MIT"
] | null | null | null | defmodule Absinthe.Phase.Schema do
@moduledoc false
# Populate all schema nodes and the adapter for the blueprint tree. If the
# blueprint tree is a _schema_ tree, this schema is the meta schema (source of
# SDL directives, etc).
#
# Note that no validation occurs in this phase.
use Absinthe.Phase
al... | 30.648352 | 100 | 0.667742 |
5a789783a23d3a27b1af4bbe98920e796170e905 | 957 | ex | Elixir | debian/postinst.ex | volcengine/vkectl | 454a322310a20345224c74165c75b78dbb45833c | [
"Apache-2.0"
] | 32 | 2021-12-28T02:41:22.000Z | 2022-02-25T07:21:25.000Z | debian/postinst.ex | volcengine/vkectl | 454a322310a20345224c74165c75b78dbb45833c | [
"Apache-2.0"
] | null | null | null | debian/postinst.ex | volcengine/vkectl | 454a322310a20345224c74165c75b78dbb45833c | [
"Apache-2.0"
] | 41 | 2021-12-28T02:27:19.000Z | 2022-01-22T17:30:07.000Z | #!/bin/sh
# postinst script for vkectl
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# ... | 23.925 | 71 | 0.639498 |
5a78b25fa564d859a046431b8e73eb7f5dc32686 | 3,087 | ex | Elixir | lib/dictator/policies/belongs_to.ex | pedromlcosta/dictator | 1b81c6a7c340b0c8338fd69c8123827a97d0ce06 | [
"0BSD"
] | 78 | 2020-02-21T14:35:54.000Z | 2021-11-08T23:03:47.000Z | lib/dictator/policies/belongs_to.ex | pedromlcosta/dictator | 1b81c6a7c340b0c8338fd69c8123827a97d0ce06 | [
"0BSD"
] | 11 | 2020-04-23T07:17:00.000Z | 2020-12-17T14:46:56.000Z | lib/dictator/policies/belongs_to.ex | pedromlcosta/dictator | 1b81c6a7c340b0c8338fd69c8123827a97d0ce06 | [
"0BSD"
] | 4 | 2020-09-16T15:08:53.000Z | 2021-10-14T01:52:06.000Z | if Code.ensure_loaded?(Ecto) do
defmodule Dictator.Policies.BelongsTo do
@moduledoc """
Policy definition commonly used in typical `belongs_to` associations.
This policy assumes the users can read (`:show`, `:index`, `:new`,
`:create`) any information but only write (`:edit`, `:update`, `:delete`)
... | 31.181818 | 86 | 0.640752 |
5a78c55e435a92e60367f7a80ade601152ad49ac | 1,036 | exs | Elixir | rel/runtime.exs | UrbanOS-Examples/egon | f424af2dd2c504941b4829e820e438a5ad771161 | [
"Apache-2.0"
] | null | null | null | rel/runtime.exs | UrbanOS-Examples/egon | f424af2dd2c504941b4829e820e438a5ad771161 | [
"Apache-2.0"
] | null | null | null | rel/runtime.exs | UrbanOS-Examples/egon | f424af2dd2c504941b4829e820e438a5ad771161 | [
"Apache-2.0"
] | null | null | null | use Mix.Config
required_envars = ["REDIS_HOST", "KAFKA_BROKERS", "PRESTO_URL"]
Enum.each(required_envars, fn var ->
if is_nil(System.get_env(var)) do
raise ArgumentError, message: "Required environment variable #{var} is undefined"
end
end)
kafka_brokers = System.get_env("KAFKA_BROKERS")
redis_host = System.... | 22.521739 | 85 | 0.710425 |
5a78c9af32a56bf29bdcd56cb218a8aa78716502 | 1,642 | ex | Elixir | lib/entrance_web.ex | exchange-prototype/Entrance | 3edea9ffa2675c0580c7df43002b9e6cc275d60d | [
"Apache-2.0"
] | null | null | null | lib/entrance_web.ex | exchange-prototype/Entrance | 3edea9ffa2675c0580c7df43002b9e6cc275d60d | [
"Apache-2.0"
] | null | null | null | lib/entrance_web.ex | exchange-prototype/Entrance | 3edea9ffa2675c0580c7df43002b9e6cc275d60d | [
"Apache-2.0"
] | null | null | null | defmodule EntranceWeb 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 EntranceWeb, :controller
use EntranceWeb, :view
The definitions below will be executed for every view,
controlle... | 23.457143 | 83 | 0.69123 |
5a78db99faa7c2bf5dcfa2592c884d4053f19eff | 910 | ex | Elixir | lib/tesla/middleware/path_params.ex | mmcc/tesla | 75384470030fb9b44df0e8930371ae8ed081d388 | [
"MIT"
] | null | null | null | lib/tesla/middleware/path_params.ex | mmcc/tesla | 75384470030fb9b44df0e8930371ae8ed081d388 | [
"MIT"
] | 1 | 2019-10-25T19:27:33.000Z | 2019-10-25T19:27:33.000Z | lib/tesla/middleware/path_params.ex | mmcc/tesla | 75384470030fb9b44df0e8930371ae8ed081d388 | [
"MIT"
] | 1 | 2020-04-04T03:19:50.000Z | 2020-04-04T03:19:50.000Z | defmodule Tesla.Middleware.PathParams do
@behaviour Tesla.Middleware
@moduledoc """
Use templated URLs with separate params.
Useful when logging or reporting metric per URL.
### Example usage
```
defmodule MyClient do
use Tesla
plug Tesla.Middleware.BaseURl, "https://api.example.com"
plug... | 20.681818 | 64 | 0.649451 |
5a78e270803630253d08ae2b2de6d0fcffee6bf2 | 1,564 | exs | Elixir | lib/mix/test/mix/scm/git_test.exs | diogovk/elixir | 7b8213affaad38b50afaa3dfc3a43717f35ba4e7 | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/scm/git_test.exs | diogovk/elixir | 7b8213affaad38b50afaa3dfc3a43717f35ba4e7 | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/scm/git_test.exs | diogovk/elixir | 7b8213affaad38b50afaa3dfc3a43717f35ba4e7 | [
"Apache-2.0"
] | null | null | null | Code.require_file "../../test_helper.exs", __DIR__
defmodule Mix.SCM.GitTest do
use MixTest.Case, async: true
test "formats the lock" do
assert Mix.SCM.Git.format_lock(lock()) == "abcdef0"
assert Mix.SCM.Git.format_lock(lock(branch: "master")) == "abcdef0 (branch: master)"
assert Mix.SCM.Git.format_lo... | 40.102564 | 99 | 0.64578 |
5a790306fca12c3cc75bc69f9e179239d733e2c9 | 1,129 | exs | Elixir | config/config.exs | keichan34/exfile-ets | f46f081c40762752eedcaf414195461f0a26642c | [
"MIT"
] | 2 | 2015-12-25T18:17:24.000Z | 2016-01-08T09:17:48.000Z | config/config.exs | keichan34/exfile-memory | f46f081c40762752eedcaf414195461f0a26642c | [
"MIT"
] | null | null | null | config/config.exs | keichan34/exfile-memory | f46f081c40762752eedcaf414195461f0a26642c | [
"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... | 36.419355 | 73 | 0.753764 |
5a790fd8ce6351dac0e71a4aba4f85f14e9f1e10 | 720 | ex | Elixir | solutions/problem_2/solution.ex | AlbusDracoSam/project_euler | f703e788baba3a1b5d3316ef4e53a589eae14543 | [
"MIT"
] | 8 | 2015-10-24T02:46:03.000Z | 2015-12-23T02:05:37.000Z | solutions/problem_2/solution.ex | AlbusDracoSam/project_euler | f703e788baba3a1b5d3316ef4e53a589eae14543 | [
"MIT"
] | 42 | 2015-10-23T16:36:22.000Z | 2016-03-22T20:04:35.000Z | solutions/problem_2/solution.ex | AlbusDracoSam/project_euler | f703e788baba3a1b5d3316ef4e53a589eae14543 | [
"MIT"
] | 7 | 2015-10-23T16:33:59.000Z | 2021-10-07T06:26:57.000Z | defmodule Benchmark do
def measure(function) do
function
|> :timer.tc
|> elem(0)
|> Kernel./(1_000_000)
|> Float.to_string([decimals: 10, compact: true])
end
end
defmodule ProblemTwo do
def sum_fibonacci(_, second, third, sum) when third < 4000000 do
new_first = second + third
new_se... | 24.827586 | 80 | 0.676389 |
5a793c9f18cdf79b484353e2cf93468235ed373c | 5,563 | exs | Elixir | test/grpc/integration/service_test.exs | 2ne1ugly/grpc | 54e317dbe64affc437b0477c1fedca216905b8c4 | [
"Apache-2.0"
] | null | null | null | test/grpc/integration/service_test.exs | 2ne1ugly/grpc | 54e317dbe64affc437b0477c1fedca216905b8c4 | [
"Apache-2.0"
] | null | null | null | test/grpc/integration/service_test.exs | 2ne1ugly/grpc | 54e317dbe64affc437b0477c1fedca216905b8c4 | [
"Apache-2.0"
] | null | null | null | defmodule GRPC.Integration.ServiceTest do
use GRPC.Integration.TestCase
defmodule FeatureServer do
use GRPC.Server, service: Routeguide.RouteGuide.Service
alias GRPC.Server
def get_feature(point, _stream) do
simple_feature(point)
end
def list_features(rectangle, stream) do
Enum.ea... | 34.552795 | 93 | 0.613698 |
5a793dd775b4b9fc8f947ed609fb0bebe0f372e4 | 142 | ex | Elixir | api_sample/web/controllers/page_controller.ex | saiidalhalawi/phoenix-ansible | d03843256c20b74fd69bb48f058825785dd7fea2 | [
"Apache-2.0"
] | null | null | null | api_sample/web/controllers/page_controller.ex | saiidalhalawi/phoenix-ansible | d03843256c20b74fd69bb48f058825785dd7fea2 | [
"Apache-2.0"
] | null | null | null | api_sample/web/controllers/page_controller.ex | saiidalhalawi/phoenix-ansible | d03843256c20b74fd69bb48f058825785dd7fea2 | [
"Apache-2.0"
] | null | null | null | defmodule ApiSample.PageController do
use ApiSample.Web, :controller
def index(conn, _params) do
render conn, "index.html"
end
end
| 17.75 | 37 | 0.739437 |
5a795c94f5acb80f859022914903db206bd2436d | 589 | ex | Elixir | lib/railway_ui/application.ex | learn-co/railway-ui | 0d567db4ab1ea53dbdf66dcaff8411003e72a0cf | [
"MIT"
] | 2 | 2019-11-12T21:04:11.000Z | 2020-02-09T18:07:27.000Z | lib/railway_ui/application.ex | learn-co/railway-ui | 0d567db4ab1ea53dbdf66dcaff8411003e72a0cf | [
"MIT"
] | 4 | 2019-12-02T17:31:57.000Z | 2021-03-09T22:59:48.000Z | lib/railway_ui/application.ex | learn-co/railway-ui | 0d567db4ab1ea53dbdf66dcaff8411003e72a0cf | [
"MIT"
] | 2 | 2020-02-05T18:23:26.000Z | 2020-04-26T13:50:10.000Z | defmodule RailwayUi.Application do
use Application
@dev_repo Application.get_env(:railway_ui, :dev_repo)
def start(_type, _args) do
opts = [strategy: :one_for_one, name: RailwayUi.Supervisor]
Supervisor.start_link(children(@dev_repo), opts)
end
def children(true),
do: [RailwayUi.Repo, RailwayUiW... | 29.45 | 89 | 0.741935 |
5a7963b68b95dc18229299a0dfcff6e23e0fd696 | 811 | ex | Elixir | example/web/router.ex | smeevil/phoenix-jsroutes | b5351527302acff6258acd321a4f055e6fc71371 | [
"MIT"
] | null | null | null | example/web/router.ex | smeevil/phoenix-jsroutes | b5351527302acff6258acd321a4f055e6fc71371 | [
"MIT"
] | null | null | null | example/web/router.ex | smeevil/phoenix-jsroutes | b5351527302acff6258acd321a4f055e6fc71371 | [
"MIT"
] | null | null | null | defmodule JsRoutesExample.Router do
use JsRoutesExample.Web, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
end
pipeline :api do
plug :accepts, ["json"]
end
scope "/", JsRoutesE... | 21.342105 | 57 | 0.685573 |
5a796f5a90eda51d7417b6f9fae6c6b3942a1122 | 4,778 | exs | Elixir | test/hinata_test.exs | tteerawat/hinata | 27b6de413877c34d94c66ef57bf780d4c8c36ff6 | [
"Apache-2.0"
] | null | null | null | test/hinata_test.exs | tteerawat/hinata | 27b6de413877c34d94c66ef57bf780d4c8c36ff6 | [
"Apache-2.0"
] | null | null | null | test/hinata_test.exs | tteerawat/hinata | 27b6de413877c34d94c66ef57bf780d4c8c36ff6 | [
"Apache-2.0"
] | null | null | null | defmodule HinataTest do
use ExUnit.Case, async: true
import ExUnit.CaptureLog
alias Hinata.Schema
defmodule Bear do
@behaviour Schema
defstruct [:name, :color]
@impl true
def from_response_body!(%{"object" => "bear", "name" => name, "color" => color}) do
%__MODULE__{name: name, color:... | 31.228758 | 122 | 0.608414 |
5a7982587fcb84af0887569b7e9d938f2d7deb5e | 820 | ex | Elixir | lib/rocketpay_web/views/accounts_view.ex | buzs/rocketpay | 8af4de660aac1db4a074fd15b0f41b3790497757 | [
"MIT"
] | null | null | null | lib/rocketpay_web/views/accounts_view.ex | buzs/rocketpay | 8af4de660aac1db4a074fd15b0f41b3790497757 | [
"MIT"
] | null | null | null | lib/rocketpay_web/views/accounts_view.ex | buzs/rocketpay | 8af4de660aac1db4a074fd15b0f41b3790497757 | [
"MIT"
] | null | null | null | defmodule RocketpayWeb.AccountsView do
alias Rocketpay.Account
alias Rocketpay.Account.Transaction.Response, as: TransactionResponse
def render("update.json", %{
account: %Account{
id: account_id,
balance: balance
}
}) do
%{
message: "Ballance changed successfu... | 20 | 71 | 0.610976 |
5a79e1899b286a3e5520bf3089ecd9f8deb387ac | 1,346 | ex | Elixir | lib/ex_doc/markdown/earmark.ex | MattLangley/ex_doc | 971b6b6023af0b5229a9cdd705877fda5491430e | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | lib/ex_doc/markdown/earmark.ex | MattLangley/ex_doc | 971b6b6023af0b5229a9cdd705877fda5491430e | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | lib/ex_doc/markdown/earmark.ex | MattLangley/ex_doc | 971b6b6023af0b5229a9cdd705877fda5491430e | [
"Apache-2.0",
"CC-BY-4.0"
] | 1 | 2020-05-11T16:54:10.000Z | 2020-05-11T16:54:10.000Z | defmodule ExDoc.Markdown.Earmark do
@moduledoc """
ExDoc extension for the Earmark MarkDown parser.
"""
@behaviour ExDoc.Markdown
@doc """
Check if the Earmark Markdown parser module is available.
"""
def available? do
match?({:ok, _}, Application.ensure_all_started(:earmark)) and Code.ensure_loade... | 29.26087 | 95 | 0.665676 |
5a79fd0c681dffccf8a79cd7dd415d04769e1f59 | 3,609 | exs | Elixir | lib/mix/test/mix/local/installer_test.exs | DmitryKakurin/elixir | a5df6a5a830d4cff8b7c8da54342b66cab999e0f | [
"Apache-2.0"
] | 2 | 2018-11-15T06:38:14.000Z | 2018-11-17T18:03:14.000Z | lib/mix/test/mix/local/installer_test.exs | DmitryKakurin/elixir | a5df6a5a830d4cff8b7c8da54342b66cab999e0f | [
"Apache-2.0"
] | 1 | 2015-06-09T15:52:43.000Z | 2015-06-09T15:52:43.000Z | lib/mix/test/mix/local/installer_test.exs | DmitryKakurin/elixir | a5df6a5a830d4cff8b7c8da54342b66cab999e0f | [
"Apache-2.0"
] | 1 | 2018-01-09T20:10:59.000Z | 2018-01-09T20:10:59.000Z | Code.require_file("../../test_helper.exs", __DIR__)
defmodule Mix.Local.InstallerTest do
use MixTest.Case
test "fetch" do
dep_spec = {:git_repo, git: fixture_path("git_repo")}
fetcher = fn mix_exs ->
send(self(), mix_exs)
Mix.Task.run("deps.get", [])
end
config =
Mix.Local.Inst... | 35.732673 | 93 | 0.629537 |
5a7a52084c31085640cbc8f2ce701903121696b7 | 1,917 | ex | Elixir | clients/cloud_identity/lib/google_api/cloud_identity/v1/model/google_apps_cloudidentity_devices_v1_cancel_wipe_device_user_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/cloud_identity/lib/google_api/cloud_identity/v1/model/google_apps_cloudidentity_devices_v1_cancel_wipe_device_user_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/cloud_identity/lib/google_api/cloud_identity/v1/model/google_apps_cloudidentity_devices_v1_cancel_wipe_device_user_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... | 33.631579 | 172 | 0.769431 |
5a7a6a165740fc1613c414287e81b05f36621af1 | 618 | ex | Elixir | lib/phoenix/plug_error.ex | yithanglee/damien_phoenix | c21fa17afc9f550c337b255ac88890630d4bbb75 | [
"MIT"
] | null | null | null | lib/phoenix/plug_error.ex | yithanglee/damien_phoenix | c21fa17afc9f550c337b255ac88890630d4bbb75 | [
"MIT"
] | null | null | null | lib/phoenix/plug_error.ex | yithanglee/damien_phoenix | c21fa17afc9f550c337b255ac88890630d4bbb75 | [
"MIT"
] | null | null | null | defmodule Phoenix.PlugError do
@moduledoc false
Code.ensure_loaded?(Plug.Conn.WrapperError)
if function_exported?(Plug.Conn.WrapperError, :reraise, 4) do
def reraise(_conn, _type, exception) do
Plug.Conn.WrapperError.reraise(exception)
end
def reraise(conn, type, reason, stack) do
Plug.Co... | 29.428571 | 63 | 0.710356 |
5a7a7b4812369d6be383097d5f0cf716815a4402 | 2,802 | ex | Elixir | test/support/comments_api_helper.ex | santiment/sanbase2 | 9ef6e2dd1e377744a6d2bba570ea6bd477a1db31 | [
"MIT"
] | 81 | 2017-11-20T01:20:22.000Z | 2022-03-05T12:04:25.000Z | test/support/comments_api_helper.ex | rmoorman/sanbase2 | 226784ab43a24219e7332c49156b198d09a6dd85 | [
"MIT"
] | 359 | 2017-10-15T14:40:53.000Z | 2022-01-25T13:34:20.000Z | test/support/comments_api_helper.ex | rmoorman/sanbase2 | 226784ab43a24219e7332c49156b198d09a6dd85 | [
"MIT"
] | 16 | 2017-11-19T13:57:40.000Z | 2022-02-07T08:13:02.000Z | defmodule Sanbase.CommentsApiHelper do
import SanbaseWeb.Graphql.TestHelpers
def create_comment(conn, entity_id, content, opts \\ []) do
mutation = create_comment_mutation(entity_id, content, opts)
execute_mutation(conn, mutation, "createComment")
end
def create_comment_with_error(conn, entity_id, con... | 24.155172 | 72 | 0.583512 |
5a7a802303010b714fab39e54f22bdf5f4bfffc9 | 711 | ex | Elixir | services/fc_identity/lib/fc_identity/process_managers/default_app_setup.ex | fleadope/freshcom | 8d5944befaa6eea8d31e5f5995939be2a1a44262 | [
"BSD-3-Clause"
] | 46 | 2018-10-13T23:18:13.000Z | 2021-08-07T07:46:51.000Z | services/fc_identity/lib/fc_identity/process_managers/default_app_setup.ex | fleadope/freshcom | 8d5944befaa6eea8d31e5f5995939be2a1a44262 | [
"BSD-3-Clause"
] | 25 | 2018-10-14T00:56:07.000Z | 2019-12-23T19:41:02.000Z | services/fc_identity/lib/fc_identity/process_managers/default_app_setup.ex | fleadope/freshcom | 8d5944befaa6eea8d31e5f5995939be2a1a44262 | [
"BSD-3-Clause"
] | 5 | 2018-12-16T04:39:51.000Z | 2020-10-01T12:17:03.000Z | defmodule FCIdentity.DefaultAppSetup do
@moduledoc false
use Commanded.ProcessManagers.ProcessManager,
name: "process-manager:2701fc26-46e3-4017-b8ce-9fd04c138de8",
router: FCIdentity.Router
alias FCIdentity.{AccountCreated, AppAdded}
alias FCIdentity.AddApp
@derive Jason.Encoder
defstruct []
... | 26.333333 | 84 | 0.718706 |
5a7a956e0b3d1671b75f469c568dc32df855dd24 | 786 | ex | Elixir | lib/medusa/medusa.ex | kurenn/medusa_server | 5f3724e349a340ff8b55d57a6f0302cd945bca8f | [
"MIT"
] | 5 | 2019-07-07T00:03:42.000Z | 2022-03-07T08:44:50.000Z | lib/medusa/medusa.ex | kurenn/medusa_server | 5f3724e349a340ff8b55d57a6f0302cd945bca8f | [
"MIT"
] | 1 | 2017-03-16T21:19:19.000Z | 2017-03-16T21:19:19.000Z | lib/medusa/medusa.ex | IcaliaLabs/medusa_server | 5f3724e349a340ff8b55d57a6f0302cd945bca8f | [
"MIT"
] | 1 | 2018-06-22T02:28:50.000Z | 2018-06-22T02:28:50.000Z | defmodule Medusa do
import ImageBase64Handler
require Logger
def merge_images(urls) do
file_name = UUID.uuid4(:hex)
convert(urls, file_name)
File.read!("/tmp/#{file_name}")
end
defp transform_to_base64(file_name) do
imagetobase64("/tmp/#{file_name}.png", "/tmp/#{file_name}")
end
defp c... | 23.818182 | 118 | 0.706107 |
5a7ab3d092fc7b230c73c8adf1fc62fb14b57ba2 | 491 | ex | Elixir | lib/blog_phx_web/views/error_view.ex | the-harry/blog_phx | db7604259f2a1cd32b0243bb1039694ef986b3aa | [
"MIT"
] | 2 | 2021-09-28T13:06:31.000Z | 2021-10-03T14:41:14.000Z | lib/blog_phx_web/views/error_view.ex | the-harry/blog_phx | db7604259f2a1cd32b0243bb1039694ef986b3aa | [
"MIT"
] | 8 | 2021-09-05T00:40:16.000Z | 2021-12-04T22:41:00.000Z | lib/blog_phx_web/views/error_view.ex | the-harry/blog_phx | db7604259f2a1cd32b0243bb1039694ef986b3aa | [
"MIT"
] | null | null | null | defmodule BlogPhxWeb.ErrorView do
use BlogPhxWeb, :view
# If you want to customize a particular status code
# for a certain format, you may uncomment below.
# def render("500.html", _assigns) do
# "Internal Server Error"
# end
# By default, Phoenix returns the status message from
# the template name... | 28.882353 | 61 | 0.735234 |
5a7abc0a6fdb492484fdd3270c7478d1693c85a5 | 2,685 | ex | Elixir | packages/engine_umbrella/apps/message_generator/lib/adapters/rabbitMQ.ex | PredictiveMovement/predictivemovement | f5e62d4aed4d2068026aecf3f7f8b6749a0b0563 | [
"MIT"
] | 2 | 2021-12-09T16:06:51.000Z | 2021-12-09T16:06:55.000Z | packages/engine_umbrella/apps/message_generator/lib/adapters/rabbitMQ.ex | PredictiveMovement/predictivemovement | f5e62d4aed4d2068026aecf3f7f8b6749a0b0563 | [
"MIT"
] | 18 | 2021-09-20T08:04:41.000Z | 2021-11-08T14:58:47.000Z | packages/engine_umbrella/apps/message_generator/lib/adapters/rabbitMQ.ex | PredictiveMovement/predictivemovement | f5e62d4aed4d2068026aecf3f7f8b6749a0b0563 | [
"MIT"
] | null | null | null | defmodule MessageGenerator.Adapters.RMQ do
use GenServer
require Logger
alias AMQP.{Exchange, Queue, Channel, Basic, Connection}
defp amqp_url, do: "amqp://" <> Application.fetch_env!(:engine, :amqp_host)
@outgoing_vehicle_exchange Application.compile_env!(:engine, :outgoing_vehicle_exchange)
@outgoing_bo... | 31.588235 | 98 | 0.694227 |
5a7aeb001542d5ad2dfca73d2809242086091e8c | 62 | ex | Elixir | apps/language_server/test/fixtures/umbrella/apps/app1/lib/app1.ex | ihabunek/elixir-ls | a8bdf9304f04254160c9fc982ad314a50085c51a | [
"Apache-2.0"
] | 912 | 2017-06-08T03:58:03.000Z | 2021-09-06T03:42:07.000Z | apps/language_server/test/fixtures/umbrella/apps/app1/lib/app1.ex | ihabunek/elixir-ls | a8bdf9304f04254160c9fc982ad314a50085c51a | [
"Apache-2.0"
] | 441 | 2019-01-05T02:33:52.000Z | 2022-03-30T20:56:50.000Z | apps/language_server/test/fixtures/umbrella/apps/app1/lib/app1.ex | ihabunek/elixir-ls | a8bdf9304f04254160c9fc982ad314a50085c51a | [
"Apache-2.0"
] | 126 | 2018-11-12T19:16:53.000Z | 2022-03-26T13:27:50.000Z | defmodule App1 do
def hello() do
App2.hello()
end
end
| 10.333333 | 17 | 0.645161 |
5a7b0ee4adc49352294ac70128f781906b58fad6 | 898 | exs | Elixir | mix.exs | ignaci0/Treex | b4be1bb382d69771ced06b8060ae0966232b292b | [
"MIT"
] | null | null | null | mix.exs | ignaci0/Treex | b4be1bb382d69771ced06b8060ae0966232b292b | [
"MIT"
] | null | null | null | mix.exs | ignaci0/Treex | b4be1bb382d69771ced06b8060ae0966232b292b | [
"MIT"
] | null | null | null | defmodule Treex.MixProject do
use Mix.Project
def project do
[
app: :treex,
version: "0.1.1",
elixir: "~> 1.7",
start_permanent: Mix.env() == :prod,
deps: deps(),
description: description(),
package: package(),
name: "Treex",
source_url: "https://github.com... | 19.106383 | 62 | 0.572383 |
5a7b10af5c1481b237085ffcedbcf087825a56a5 | 255 | ex | Elixir | lib/credo/execution/task/require_requires.ex | jlgeering/credo | b952190ed758c262aa0d9bbee01227f9b1f0c63b | [
"MIT"
] | null | null | null | lib/credo/execution/task/require_requires.ex | jlgeering/credo | b952190ed758c262aa0d9bbee01227f9b1f0c63b | [
"MIT"
] | null | null | null | lib/credo/execution/task/require_requires.ex | jlgeering/credo | b952190ed758c262aa0d9bbee01227f9b1f0c63b | [
"MIT"
] | null | null | null | defmodule Credo.Execution.Task.RequireRequires do
use Credo.Execution.Task
alias Credo.Sources
def call(%Execution{requires: requires} = exec, _opts) do
requires
|> Sources.find()
|> Enum.each(&Code.require_file/1)
exec
end
end
| 18.214286 | 59 | 0.701961 |
5a7b2760b7f0547b65ddf84871ed7ef514fe269d | 694 | exs | Elixir | apps/aecore/test/aecore_hashcash_test.exs | wuminzhe/elixir-node | eb87b47339a8349bac767dd4cf597dfaf0ed75c6 | [
"ISC"
] | null | null | null | apps/aecore/test/aecore_hashcash_test.exs | wuminzhe/elixir-node | eb87b47339a8349bac767dd4cf597dfaf0ed75c6 | [
"ISC"
] | null | null | null | apps/aecore/test/aecore_hashcash_test.exs | wuminzhe/elixir-node | eb87b47339a8349bac767dd4cf597dfaf0ed75c6 | [
"ISC"
] | null | null | null | defmodule HashcashTest do
use ExUnit.Case
doctest Aecore.Pow.Hashcash
# alias Aecore.Pow.Hashcash
# alias Aecore.Structures.Header
# alias Aecore.Structures.Block
#@tag timeout: 10000000
#test "successfull test" do
# header =
# %Header{
# height: 0,
# prev_hash: <<0::256>>,
# ... | 25.703704 | 72 | 0.62536 |
5a7b2ee6f6a99af9ed5b525c79b7192ea5eb4119 | 642 | exs | Elixir | test/level/users_test.exs | davecremins/level | cc06b86d32e9bef954a199dc4a2b47561815fd4b | [
"Apache-2.0"
] | null | null | null | test/level/users_test.exs | davecremins/level | cc06b86d32e9bef954a199dc4a2b47561815fd4b | [
"Apache-2.0"
] | null | null | null | test/level/users_test.exs | davecremins/level | cc06b86d32e9bef954a199dc4a2b47561815fd4b | [
"Apache-2.0"
] | null | null | null | defmodule Level.UsersTest do
use Level.DataCase, async: true
alias Level.Users
describe "create_user/1" do
test "creates a new user given valid params" do
params =
valid_user_params()
|> Map.put(:first_name, "Derrick")
{:ok, user} = Users.create_user(params)
assert user.fi... | 24.692308 | 75 | 0.629283 |
5a7b2faf985cee3fc24e96afe7cf81a21c32d4a7 | 197 | ex | Elixir | lib/acrobot.ex | dc0d/acrobot | a144807429e4212b2736e86346a9c00a4ae77916 | [
"MIT"
] | null | null | null | lib/acrobot.ex | dc0d/acrobot | a144807429e4212b2736e86346a9c00a4ae77916 | [
"MIT"
] | null | null | null | lib/acrobot.ex | dc0d/acrobot | a144807429e4212b2736e86346a9c00a4ae77916 | [
"MIT"
] | null | null | null | defmodule Acrobot do
@moduledoc """
Documentation for Acrobot.
"""
@doc """
Hello world.
## Examples
iex> Acrobot.hello
:world
"""
def hello do
:world
end
end
| 10.368421 | 28 | 0.568528 |
5a7bc02da63a91c4622fb79ba8cd168f43103bac | 662 | ex | Elixir | lib/phx_todo_app_web/live/modal_component.ex | showwin/phx_todo_app | 3608f120cb149019219add4ca63e711698a56aab | [
"MIT"
] | null | null | null | lib/phx_todo_app_web/live/modal_component.ex | showwin/phx_todo_app | 3608f120cb149019219add4ca63e711698a56aab | [
"MIT"
] | null | null | null | lib/phx_todo_app_web/live/modal_component.ex | showwin/phx_todo_app | 3608f120cb149019219add4ca63e711698a56aab | [
"MIT"
] | null | null | null | defmodule PhxTodoAppWeb.ModalComponent do
use PhxTodoAppWeb, :live_component
@impl true
def render(assigns) do
~L"""
<div id="<%= @id %>" class="phx-modal"
phx-capture-click="close"
phx-window-keydown="close"
phx-key="escape"
phx-target="#<%= @id %>"
phx-page-loading>
... | 24.518519 | 82 | 0.596677 |
5a7bc8440f028b861a6b144a89836d6522f2b306 | 71 | ex | Elixir | web/views/layout_view.ex | jchartsell/caesar_cipher | bc23b2d8f55a6e25ecefe6539af7e476f69410fb | [
"MIT"
] | null | null | null | web/views/layout_view.ex | jchartsell/caesar_cipher | bc23b2d8f55a6e25ecefe6539af7e476f69410fb | [
"MIT"
] | null | null | null | web/views/layout_view.ex | jchartsell/caesar_cipher | bc23b2d8f55a6e25ecefe6539af7e476f69410fb | [
"MIT"
] | null | null | null | defmodule CaesarCipher.LayoutView do
use CaesarCipher.Web, :view
end
| 17.75 | 36 | 0.816901 |
5a7bccf2b800bb6cb4b2cd7cdd834b555f6d2cf9 | 865 | exs | Elixir | mix.exs | dc0d/acrobot | a144807429e4212b2736e86346a9c00a4ae77916 | [
"MIT"
] | null | null | null | mix.exs | dc0d/acrobot | a144807429e4212b2736e86346a9c00a4ae77916 | [
"MIT"
] | null | null | null | mix.exs | dc0d/acrobot | a144807429e4212b2736e86346a9c00a4ae77916 | [
"MIT"
] | null | null | null | defmodule Acrobot.Mixfile do
use Mix.Project
def project do
[app: :acrobot,
version: "0.1.0",
elixir: "~> 1.4",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps()]
end
# Configuration for the OTP application
#
# Type "mix help compile.app" for mo... | 22.763158 | 79 | 0.595376 |
5a7be22bf26094afc06cf3d815dbe38c6321168a | 575 | ex | Elixir | Elixir/Basics/training.ex | DineshDC/Code | 2a618e1a786388e989f1a9bdbda97c724dd7cb45 | [
"MIT"
] | null | null | null | Elixir/Basics/training.ex | DineshDC/Code | 2a618e1a786388e989f1a9bdbda97c724dd7cb45 | [
"MIT"
] | null | null | null | Elixir/Basics/training.ex | DineshDC/Code | 2a618e1a786388e989f1a9bdbda97c724dd7cb45 | [
"MIT"
] | null | null | null | defmodule Greeting do
def name(%{name: per_name} = person) do
IO.puts("Hello " <> per_name)
IO.inspect(person)
end
end
defmodule Greeting2 do
def names(names) when is_list(names) do
names
|> Enum.join(", ")
|> hello
end
def hello(name) when is_binary(name) do
"hello " <> name
end
e... | 17.424242 | 46 | 0.626087 |
5a7c12802a971b660f379ea2c0efac069b23919c | 691 | exs | Elixir | chapter-11/strings-and-binaries-5.exs | carlos4ndre/elixir-exercises | 3673cf69d08a6c7de53224f8956f0db21e7c5dad | [
"MIT"
] | 55 | 2015-12-09T09:23:50.000Z | 2022-01-31T21:14:59.000Z | chapter-11/strings-and-binaries-5.exs | carlos4ndre/elixir-exercises | 3673cf69d08a6c7de53224f8956f0db21e7c5dad | [
"MIT"
] | 3 | 2016-06-15T12:53:39.000Z | 2017-08-21T18:20:42.000Z | chapter-11/strings-and-binaries-5.exs | carlos4ndre/elixir-exercises | 3673cf69d08a6c7de53224f8956f0db21e7c5dad | [
"MIT"
] | 18 | 2016-01-01T18:18:23.000Z | 2021-05-24T02:22:42.000Z | defmodule MyWordUtils do
defp get_max_width(list), do: Enum.max(Enum.map(list, &(String.length(&1))))
def center(list), do: _center(list, get_max_width(list), [])
defp _center([word | tail], max_width, result) do
_center(
tail,
max_width,
result ++ [String.rjust(
word,
... | 34.55 | 82 | 0.60492 |
5a7c13a02677b0a0892b70b89f2d2257bba34cba | 209 | exs | Elixir | priv/repo/migrations/20210103202613_add_card_refil_max_to_fundraisers.exs | jfcloutier/freegiving | 2ab3821595996fc295c5b55515d6f60cbce05181 | [
"Unlicense"
] | null | null | null | priv/repo/migrations/20210103202613_add_card_refil_max_to_fundraisers.exs | jfcloutier/freegiving | 2ab3821595996fc295c5b55515d6f60cbce05181 | [
"Unlicense"
] | null | null | null | priv/repo/migrations/20210103202613_add_card_refil_max_to_fundraisers.exs | jfcloutier/freegiving | 2ab3821595996fc295c5b55515d6f60cbce05181 | [
"Unlicense"
] | null | null | null | defmodule Freegiving.Repo.Migrations.AddCardRefilMaxToFundraisers do
use Ecto.Migration
def change do
alter table("fundraisers") do
add :card_refill_max, :integer, null: false
end
end
end
| 20.9 | 68 | 0.746411 |
5a7c3b71e33a8fb562b8bc0ca25d663520c3cdf9 | 1,402 | exs | Elixir | priv/repo/seeds.exs | rushsteve1/RateTheDub | 89a8ad8ab42d2a55f1c522ba78dc4ac3a7f84081 | [
"Apache-2.0"
] | 4 | 2021-04-26T21:50:45.000Z | 2021-04-27T18:37:51.000Z | priv/repo/seeds.exs | rushsteve1/RateTheDub | 89a8ad8ab42d2a55f1c522ba78dc4ac3a7f84081 | [
"Apache-2.0"
] | 25 | 2021-04-26T21:39:21.000Z | 2021-09-07T13:59:14.000Z | priv/repo/seeds.exs | rushsteve1/RateTheDub | 89a8ad8ab42d2a55f1c522ba78dc4ac3a7f84081 | [
"Apache-2.0"
] | null | null | null | # Script for populating the database. You can run it as:
#
# mix run priv/repo/seeds.exs
#
# Inside the script, you can read and write to any of your
# repositories directly:
#
# RateTheDub.Repo.insert!(%RateTheDub.SomeSchema{})
#
# We recommend using the bang functions (`insert!`, `update!`
# and so on) as the... | 31.863636 | 71 | 0.71826 |
5a7c7b9264d7cc16e2981a41a3ad362f89a3f024 | 129 | exs | Elixir | priv/fixture/apps/example_complex_app/apps/app2/test/app2_test.exs | taverngoal/ex_loader | 3f31c86d5d8a93aac99da0792e768e9594ccf4dc | [
"MIT"
] | 14 | 2018-02-04T08:04:40.000Z | 2021-07-27T07:07:47.000Z | learning/adopting_elixir/chapter_4/my_umbrella/apps/app_2/test/app_2_test.exs | Mdlkxzmcp/various_elixir | c87527b7118a0c74a042073c04d2228025888ddf | [
"MIT"
] | 2 | 2019-01-04T09:37:34.000Z | 2019-05-20T10:45:15.000Z | learning/adopting_elixir/chapter_4/my_umbrella/apps/app_2/test/app_2_test.exs | Mdlkxzmcp/various_elixir | c87527b7118a0c74a042073c04d2228025888ddf | [
"MIT"
] | 4 | 2019-01-04T14:21:50.000Z | 2020-12-19T05:05:22.000Z | defmodule App2Test do
use ExUnit.Case
doctest App2
test "greets the world" do
assert App2.hello() == :world
end
end
| 14.333333 | 33 | 0.689922 |
5a7c89293361792782c9cbcdbe3d240cea8af76b | 4,058 | ex | Elixir | lib/type_check/internals/to_typespec.ex | 0urobor0s/elixir-type_check | 6bac178f4a55798034b12c1dcfb219eabcfb35c0 | [
"MIT"
] | null | null | null | lib/type_check/internals/to_typespec.ex | 0urobor0s/elixir-type_check | 6bac178f4a55798034b12c1dcfb219eabcfb35c0 | [
"MIT"
] | null | null | null | lib/type_check/internals/to_typespec.ex | 0urobor0s/elixir-type_check | 6bac178f4a55798034b12c1dcfb219eabcfb35c0 | [
"MIT"
] | null | null | null | defmodule TypeCheck.Internals.ToTypespec do
@moduledoc false
def full_rewrite(ast, env) do
Macro.postwalk(ast, &rewrite(&1, env))
end
def rewrite(ast, env) do
builtin_imports = env.functions[TypeCheck.Builtin] || []
case Macro.expand(ast, env) do
ast = {:lazy_explicit, _, [module, name, argum... | 26.522876 | 83 | 0.521193 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.