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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c832f3a35676e8d652ede00efa90cff97b6314ef | 179 | exs | Elixir | test/commanded_messaging_test.exs | revati/commanded_messaging | 2d14f961fec0209953c13c25b8af9d228a62ab2c | [
"MIT"
] | null | null | null | test/commanded_messaging_test.exs | revati/commanded_messaging | 2d14f961fec0209953c13c25b8af9d228a62ab2c | [
"MIT"
] | null | null | null | test/commanded_messaging_test.exs | revati/commanded_messaging | 2d14f961fec0209953c13c25b8af9d228a62ab2c | [
"MIT"
] | null | null | null | defmodule CommandTest do
use ExUnit.Case
doctest Commanded.Event
doctest Commanded.Command
doctest CommandedMessaging
doctest Commanded.Middleware.CommandValidation
end
| 22.375 | 48 | 0.837989 |
c83309304d7d5e197eecabecce8ca675de13b79a | 1,154 | exs | Elixir | apps/state/bench/schedule_bench.exs | fjlanasa/api | c39bc393aea572bfb81754b2ea1adf9dda9ce24a | [
"MIT"
] | 62 | 2019-01-17T12:34:39.000Z | 2022-03-20T21:49:47.000Z | apps/state/bench/schedule_bench.exs | fjlanasa/api | c39bc393aea572bfb81754b2ea1adf9dda9ce24a | [
"MIT"
] | 375 | 2019-02-13T15:30:50.000Z | 2022-03-30T18:50:41.000Z | apps/state/bench/schedule_bench.exs | fjlanasa/api | c39bc393aea572bfb81754b2ea1adf9dda9ce24a | [
"MIT"
] | 14 | 2019-01-16T19:35:57.000Z | 2022-02-26T18:55:54.000Z | defmodule State.ScheduleBench do
use Benchfella
@schedule %Model.Schedule{
trip_id: "trip",
stop_id: "stop",
position: :first}
def setup_all do
Application.ensure_all_started(:events)
State.Schedule.start_link
@schedule
|> expand_schedule(30_000)
|> State.Schedule.new_state
... | 24.553191 | 72 | 0.616984 |
c8330a5bd700d93bfaf5cf090ef07a1a4557b010 | 1,496 | ex | Elixir | lib/kantele/character/views/say_view.ex | christhekeele/ex_venture | 4f4b329f50a133e219969f9823144a4cb9bf738d | [
"MIT"
] | 610 | 2017-08-09T15:20:25.000Z | 2022-03-27T15:49:07.000Z | lib/kantele/character/views/say_view.ex | christhekeele/ex_venture | 4f4b329f50a133e219969f9823144a4cb9bf738d | [
"MIT"
] | 69 | 2017-09-23T04:02:30.000Z | 2022-03-19T21:08:21.000Z | lib/kantele/character/views/say_view.ex | christhekeele/ex_venture | 4f4b329f50a133e219969f9823144a4cb9bf738d | [
"MIT"
] | 85 | 2017-09-23T04:07:11.000Z | 2021-11-20T06:44:56.000Z | defmodule Kantele.Character.SayView do
use Kalevala.Character.View
alias Kalevala.Character.Conn.EventText
alias Kantele.Character.CharacterView
def render("text", %{text: text}) do
~i("{text}#{text}{/text}")
end
def render("echo", %{text: text, meta: meta}) do
%EventText{
topic: "Room.Say"... | 24.129032 | 82 | 0.546791 |
c8333bfc57a8b62fe5bab3ca4d8dd1d0745abc0b | 4,968 | ex | Elixir | lib/handler.ex | software-mansion-labs/elixir-janus | c8b13fd82b3b6c1c842b2f5f17d6bf11f2cb11ea | [
"Apache-2.0"
] | 8 | 2020-10-06T01:01:19.000Z | 2022-01-22T06:06:51.000Z | lib/handler.ex | software-mansion-labs/elixir-janus | c8b13fd82b3b6c1c842b2f5f17d6bf11f2cb11ea | [
"Apache-2.0"
] | 12 | 2020-08-24T14:47:34.000Z | 2020-10-05T08:03:56.000Z | lib/handler.ex | software-mansion-labs/elixir-janus | c8b13fd82b3b6c1c842b2f5f17d6bf11f2cb11ea | [
"Apache-2.0"
] | 3 | 2020-11-06T18:44:16.000Z | 2022-03-17T08:14:59.000Z | defmodule Janus.Handler do
alias Janus.Session
@type opaque_id :: String.t()
@type emitter :: String.t()
@type transport :: map
@type event_meta :: %{
optional(:emitter) => emitter(),
optional(:timestamp) => DateTime.t(),
optional(:opaque_id) => opaque_id()
}
@type s... | 27.6 | 89 | 0.5 |
c83345b6f2b46019dff38e1d62c25f29a6f3a308 | 185 | ex | Elixir | testData/org/elixir_lang/parser_definition/numeric_dot_operation_parsing_test_case/MatchedCallOperation.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/numeric_dot_operation_parsing_test_case/MatchedCallOperation.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/numeric_dot_operation_parsing_test_case/MatchedCallOperation.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 145 | 2015-01-15T11:37:16.000Z | 2021-12-22T05:51:02.000Z | ?c.two positional, key: value
0b0.two positional, key: value
1.2e-3.two positional, key: value
1.two positional, key: value
0x0.two positional, key: value
0o0.two positional, key: value | 30.833333 | 33 | 0.762162 |
c8334b8d88c78c52198f85e4c57b7c35e1dd657f | 1,734 | ex | Elixir | clients/datastream/lib/google_api/datastream/v1/model/oracle_table.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/datastream/lib/google_api/datastream/v1/model/oracle_table.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/datastream/lib/google_api/datastream/v1/model/oracle_table.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 34.68 | 217 | 0.730104 |
c833778cdc31795b1a8d8069bd1e3fbc429c80ce | 556 | ex | Elixir | lib/middleware/auth.ex | bot-ex/botex-telegram | 7b41080b3fcb1736274b83fbf7237a884dd27f38 | [
"MIT"
] | 1 | 2021-11-08T08:03:41.000Z | 2021-11-08T08:03:41.000Z | lib/middleware/auth.ex | bot-ex/botex-telegram | 7b41080b3fcb1736274b83fbf7237a884dd27f38 | [
"MIT"
] | null | null | null | lib/middleware/auth.ex | bot-ex/botex-telegram | 7b41080b3fcb1736274b83fbf7237a884dd27f38 | [
"MIT"
] | 3 | 2020-04-11T10:32:52.000Z | 2020-08-25T14:49:36.000Z | defmodule BotexTelegram.Middleware.Auth do
@moduledoc """
Middleware module that get user from telegram message and set it to `BotEx.Models.Message`
"""
@behaviour BotEx.Behaviours.Middleware
alias BotexTelegram.Services.Telegram.Api, as: TelegramApi
alias BotEx.Models.Message
@spec transform(Message.t(... | 32.705882 | 92 | 0.73741 |
c8337e63319a33df8067ec67d681bd8f3635d830 | 223 | ex | Elixir | lib/pushest/data/options.ex | bigardone/pushest | 3b2712a816f4bab940bd0f5db53b950a04e21401 | [
"MIT"
] | 31 | 2018-03-29T10:14:28.000Z | 2021-01-24T16:02:05.000Z | lib/pushest/data/options.ex | bigardone/pushest | 3b2712a816f4bab940bd0f5db53b950a04e21401 | [
"MIT"
] | 4 | 2018-03-28T21:28:41.000Z | 2020-11-09T15:40:55.000Z | lib/pushest/data/options.ex | bigardone/pushest | 3b2712a816f4bab940bd0f5db53b950a04e21401 | [
"MIT"
] | 6 | 2018-04-16T07:37:46.000Z | 2022-03-10T22:11:39.000Z | defmodule Pushest.Data.Options do
@moduledoc ~S"""
Structure representing main Pusher options which are passed via Pushest
initializating methods.
"""
defstruct [:app_id, :key, :cluster, :encrypted, :secret]
end
| 24.777778 | 73 | 0.73991 |
c8339763c84d3eee14ad0bddfe19e8ad9cbb0e63 | 1,139 | exs | Elixir | backend/test/caffe/ordering/use_cases/get_activity_feed_test.exs | eeng/caffe | d85d0dd56a8204c715052ddaf3d990e47c5df0e9 | [
"MIT"
] | 7 | 2020-03-27T08:26:52.000Z | 2021-08-29T09:50:31.000Z | backend/test/caffe/ordering/use_cases/get_activity_feed_test.exs | eeng/caffe | d85d0dd56a8204c715052ddaf3d990e47c5df0e9 | [
"MIT"
] | null | null | null | backend/test/caffe/ordering/use_cases/get_activity_feed_test.exs | eeng/caffe | d85d0dd56a8204c715052ddaf3d990e47c5df0e9 | [
"MIT"
] | null | null | null | defmodule Caffe.Ordering.UseCases.GetActivityFeedTest do
use Caffe.UseCaseCase
alias Caffe.Ordering.UseCases.GetActivityFeed
alias Caffe.Accounts.User
describe "execute" do
test "returns the activities sorted by published desc" do
a3 = insert!(:activity, published: ~U[2016-05-24 13:26:08Z])
a1... | 32.542857 | 83 | 0.691835 |
c8340164974267f2dad8d84783101654f0d8cf4b | 7,056 | ex | Elixir | lib/codi/stage/normalise.ex | ianrumford/plymio_codi | 1163b139df0ed344e63597e563637c091ffe1f5e | [
"MIT"
] | null | null | null | lib/codi/stage/normalise.ex | ianrumford/plymio_codi | 1163b139df0ed344e63597e563637c091ffe1f5e | [
"MIT"
] | null | null | null | lib/codi/stage/normalise.ex | ianrumford/plymio_codi | 1163b139df0ed344e63597e563637c091ffe1f5e | [
"MIT"
] | null | null | null | defmodule Plymio.Codi.Stage.Normalise do
@moduledoc false
require Plymio.Vekil.Utility, as: VEKILUTIL
alias Plymio.Codi, as: CODI
use Plymio.Fontais.Attribute
use Plymio.Vekil.Attribute
use Plymio.Codi.Attribute
@codi_opts [
{@plymio_vekil_key_vekil, Plymio.Vekil.Codi.__vekil__()}
]
@type t ::... | 24.84507 | 97 | 0.573696 |
c834210666a7d128f62ab81b04de13ef9c11b725 | 397 | exs | Elixir | priv/repo/migrations/20150725142605_create_comment.exs | randomlabs/news | 6aa200858bac69613af1de91420c6425f4517853 | [
"MIT"
] | 3 | 2015-08-12T20:45:57.000Z | 2015-10-26T09:20:10.000Z | priv/repo/migrations/20150725142605_create_comment.exs | randomlabs/news | 6aa200858bac69613af1de91420c6425f4517853 | [
"MIT"
] | 15 | 2015-08-12T16:20:42.000Z | 2015-10-12T16:12:15.000Z | priv/repo/migrations/20150725142605_create_comment.exs | randomlabs/news | 6aa200858bac69613af1de91420c6425f4517853 | [
"MIT"
] | 1 | 2015-08-20T17:43:10.000Z | 2015-08-20T17:43:10.000Z | defmodule News.Repo.Migrations.CreateComment do
use Ecto.Migration
def change do
create table(:comments) do
add :content, :string
add :comment_id, :integer
add :user_id, :integer
add :story_id, :integer
timestamps
end
create index(:comments, [:comment_id])
create inde... | 20.894737 | 47 | 0.65995 |
c83434910a0da7f7daa858be711b0bc0677bdd42 | 192 | ex | Elixir | lib/demo.ex | c4710n/benmark-elixir | 5978494ad88465757766d524a74d4803e1f62e4c | [
"WTFPL"
] | null | null | null | lib/demo.ex | c4710n/benmark-elixir | 5978494ad88465757766d524a74d4803e1f62e4c | [
"WTFPL"
] | null | null | null | lib/demo.ex | c4710n/benmark-elixir | 5978494ad88465757766d524a74d4803e1f62e4c | [
"WTFPL"
] | null | null | null | defmodule Demo do
@moduledoc """
Documentation for `Demo`.
"""
@doc """
Hello world.
## Examples
iex> Demo.hello()
:world
"""
def hello do
:world
end
end
| 10.105263 | 27 | 0.536458 |
c83450f03f734faa5a365b3fa077a84770800b4a | 359 | exs | Elixir | priv/repo/seeds.exs | hassanshaikley/ascii-quest | 8b3b3af3b9c6c59b8155fe2e6cb2a794033c29f1 | [
"MIT"
] | 8 | 2019-01-15T09:31:05.000Z | 2020-04-20T13:59:01.000Z | priv/repo/seeds.exs | hassanshaikley/ascii-quest | 8b3b3af3b9c6c59b8155fe2e6cb2a794033c29f1 | [
"MIT"
] | 2 | 2019-01-06T02:53:44.000Z | 2019-05-30T20:30:20.000Z | priv/repo/seeds.exs | hassanshaikley/ascii-quest | 8b3b3af3b9c6c59b8155fe2e6cb2a794033c29f1 | [
"MIT"
] | 1 | 2019-01-04T04:37:21.000Z | 2019-01-04T04:37:21.000Z | # 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:
#
# StabbyFlies.Repo.insert!(%StabbyFlies.SomeSchema{})
#
# We recommend using the bang functions (`insert!`, `update!`
# and so on) as t... | 29.916667 | 61 | 0.713092 |
c8345690e21f3b498ae0a2fe31750e9d16275f30 | 2,674 | ex | Elixir | clients/storage_transfer/lib/google_api/storage_transfer/v1/model/update_transfer_job_request.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/storage_transfer/lib/google_api/storage_transfer/v1/model/update_transfer_job_request.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/storage_transfer/lib/google_api/storage_transfer/v1/model/update_transfer_job_request.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 50.45283 | 466 | 0.760658 |
c834b3609d4dced38c8dd477ed3fffd44c5cd222 | 2,850 | ex | Elixir | lib/cog/commands/permission/grant.ex | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 1,003 | 2016-02-23T17:21:12.000Z | 2022-02-20T14:39:35.000Z | lib/cog/commands/permission/grant.ex | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 906 | 2016-02-22T22:54:19.000Z | 2022-03-11T15:19:43.000Z | lib/cog/commands/permission/grant.ex | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 95 | 2016-02-23T13:42:31.000Z | 2021-11-30T14:39:55.000Z | defmodule Cog.Commands.Permission.Grant do
use Cog.Command.GenCommand.Base,
bundle: Cog.Util.Misc.embedded_bundle,
name: "permission-grant"
alias Cog.Commands
alias Cog.Models.{Permission, Role}
alias Cog.Repository.{Permissions, Roles}
@description "Grant a permission to a role"
@long_descriptio... | 32.386364 | 136 | 0.628421 |
c834ba54c3b9387ea5249f2b06afb0099271c84e | 512 | exs | Elixir | config/test.exs | robinsonj/ptdb | a804b3eabd1026342089be6ed951642ee0a74dcb | [
"MIT"
] | null | null | null | config/test.exs | robinsonj/ptdb | a804b3eabd1026342089be6ed951642ee0a74dcb | [
"MIT"
] | null | null | null | config/test.exs | robinsonj/ptdb | a804b3eabd1026342089be6ed951642ee0a74dcb | [
"MIT"
] | null | null | null | use Mix.Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :poke_team_db, PokeTeamDb.Endpoint,
http: [port: 4001],
server: false
# Print only warnings and errors during test
config :logger, level: :warn
# Configure your database
config :poke_team_db, ... | 25.6 | 56 | 0.744141 |
c834c15fc59b30b196c778baccf0081040cdf821 | 4,630 | ex | Elixir | lib/raxx/stack.ex | varnerac/raxx | 0ca9b87cb2b10ca8b0eecaa86f10a9628da8fd93 | [
"Apache-2.0"
] | 401 | 2016-06-13T13:40:53.000Z | 2022-03-29T17:18:50.000Z | lib/raxx/stack.ex | varnerac/raxx | 0ca9b87cb2b10ca8b0eecaa86f10a9628da8fd93 | [
"Apache-2.0"
] | 148 | 2016-06-11T09:59:43.000Z | 2021-03-20T11:28:19.000Z | lib/raxx/stack.ex | varnerac/raxx | 0ca9b87cb2b10ca8b0eecaa86f10a9628da8fd93 | [
"Apache-2.0"
] | 31 | 2017-02-23T14:06:29.000Z | 2021-03-22T06:06:53.000Z | defmodule Raxx.Stack do
alias Raxx.Server
alias Raxx.Middleware
@behaviour Server
@moduledoc """
A `Raxx.Stack` is a list of `Raxx.Middleware`s attached to a `Raxx.Server`.
It implements the `Raxx.Server` interface itself so it can be used anywhere
"normal" server can be.
"""
defmodule State do
... | 27.235294 | 96 | 0.656156 |
c83514c58bc009e4ac5ba170c431522f62bf626f | 514 | exs | Elixir | samples/simple/mix.exs | kianmeng/elixir-sdk | 89fb73f6249f82ac8415246519c17ad4ade54760 | [
"MIT"
] | 14 | 2020-10-15T09:15:12.000Z | 2022-03-18T19:42:28.000Z | samples/simple/mix.exs | kianmeng/elixir-sdk | 89fb73f6249f82ac8415246519c17ad4ade54760 | [
"MIT"
] | 54 | 2020-10-14T05:08:21.000Z | 2021-05-28T13:00:22.000Z | samples/simple/mix.exs | kianmeng/elixir-sdk | 89fb73f6249f82ac8415246519c17ad4ade54760 | [
"MIT"
] | 5 | 2020-10-13T10:24:17.000Z | 2021-11-30T17:47:11.000Z | defmodule Simple.MixProject do
use Mix.Project
def project do
[
app: :simple,
version: "0.1.0",
elixir: "~> 1.10",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_appl... | 17.724138 | 59 | 0.564202 |
c8356e3f3fcfdfac777009c1adfdc555efb095f1 | 97 | exs | Elixir | exercises/02-higher-order-functions/02-goodbye-loops/08-reduce-usage-3/solution.exs | DennisWinnepenninckx/distributed-applications | 06743e4e2a09dc52ff52be831e486bb073916173 | [
"BSD-3-Clause"
] | 1 | 2021-09-22T09:52:11.000Z | 2021-09-22T09:52:11.000Z | exercises/02-higher-order-functions/02-goodbye-loops/08-reduce-usage-3/solution.exs | DennisWinnepenninckx/distributed-applications | 06743e4e2a09dc52ff52be831e486bb073916173 | [
"BSD-3-Clause"
] | 22 | 2019-06-19T18:58:13.000Z | 2020-03-16T14:43:06.000Z | exercises/02-higher-order-functions/02-goodbye-loops/08-reduce-usage-3/solution.exs | DennisWinnepenninckx/distributed-applications | 06743e4e2a09dc52ff52be831e486bb073916173 | [
"BSD-3-Clause"
] | 32 | 2019-09-19T03:25:11.000Z | 2020-10-06T15:01:47.000Z | defmodule Math do
def factorial(n) do
Enum.reduce(1..n, 1, fn x, y -> x * y end)
end
end
| 16.166667 | 46 | 0.597938 |
c83577719cf70dd3da84d9482f7a1b5c6fb46dd3 | 201 | ex | Elixir | examples/invoicing_app/lib/invoicing_app/inventory/create_product_service.ex | surgeventures/sea-elixir | a2f1b63c2c829713594997c08dc5bc5892edbf62 | [
"MIT"
] | 8 | 2018-11-27T09:59:27.000Z | 2021-06-03T17:51:53.000Z | examples/invoicing_app/lib/invoicing_app/inventory/create_product_service.ex | surgeventures/sea-elixir | a2f1b63c2c829713594997c08dc5bc5892edbf62 | [
"MIT"
] | 2 | 2019-03-19T13:38:10.000Z | 2019-03-20T12:28:39.000Z | examples/invoicing_app/lib/invoicing_app/inventory/create_product_service.ex | surgeventures/sea-elixir | a2f1b63c2c829713594997c08dc5bc5892edbf62 | [
"MIT"
] | 1 | 2021-10-07T12:49:57.000Z | 2021-10-07T12:49:57.000Z | defmodule InvoicingApp.Inventory.CreateProductService do
alias InvoicingApp.Repo
alias InvoicingApp.Inventory.Product
def call do
product = Repo.insert!(%Product{})
product.id
end
end
| 20.1 | 56 | 0.766169 |
c8358e61d669627fe0b0c6a0c4c3f4ef95095280 | 295 | ex | Elixir | apps/dockup_ui/lib/dockup_ui/slack_webhook.ex | rudydydy/dockup | 0d05d1ef65cc5523800bd852178361521cd3e7d8 | [
"MIT"
] | 1 | 2019-08-20T07:45:10.000Z | 2019-08-20T07:45:10.000Z | apps/dockup_ui/lib/dockup_ui/slack_webhook.ex | rudydydy/dockup | 0d05d1ef65cc5523800bd852178361521cd3e7d8 | [
"MIT"
] | null | null | null | apps/dockup_ui/lib/dockup_ui/slack_webhook.ex | rudydydy/dockup | 0d05d1ef65cc5523800bd852178361521cd3e7d8 | [
"MIT"
] | 2 | 2019-03-08T10:51:34.000Z | 2019-08-20T07:45:13.000Z | defmodule DockupUi.SlackWebhook do
def send_message(webhook_url, message) do
body = Poison.encode!(%{text: message, username: "Dockup"})
spawn fn ->
HTTPotion.post webhook_url, [
body: body,
headers: ["Content-Type": "application/json"]
]
end
end
end
| 24.583333 | 63 | 0.637288 |
c835ad03b23e7dc2277ac096ed8a98a6a38a7987 | 1,307 | ex | Elixir | lib/algoliax/client.ex | klacointe/algoliax | 6228d334e52a464162581b4887724a2f1cc357b5 | [
"BSD-2-Clause"
] | null | null | null | lib/algoliax/client.ex | klacointe/algoliax | 6228d334e52a464162581b4887724a2f1cc357b5 | [
"BSD-2-Clause"
] | null | null | null | lib/algoliax/client.ex | klacointe/algoliax | 6228d334e52a464162581b4887724a2f1cc357b5 | [
"BSD-2-Clause"
] | null | null | null | defmodule Algoliax.Client do
@moduledoc false
require Logger
alias Algoliax.{Config, Routes}
def request(request, retry \\ 0)
def request(_request, 4) do
{:error, "Failed after 3 attempts"}
end
def request(%{action: action, url_params: url_params} = request, retry) do
body = Map.get(request, ... | 22.929825 | 82 | 0.599082 |
c835dd19bf849d13187113863b18e8e3af8a0ab6 | 295 | ex | Elixir | lib/mole_web/plugs/admin.ex | the-mikedavis/mole | 73d884b5dca4e5371b1b399d7e65c0f4a0229851 | [
"BSD-3-Clause"
] | 1 | 2020-07-15T14:39:10.000Z | 2020-07-15T14:39:10.000Z | lib/mole_web/plugs/admin.ex | the-mikedavis/mole | 73d884b5dca4e5371b1b399d7e65c0f4a0229851 | [
"BSD-3-Clause"
] | 59 | 2018-11-05T23:09:10.000Z | 2020-07-11T20:44:14.000Z | lib/mole_web/plugs/admin.ex | the-mikedavis/mole | 73d884b5dca4e5371b1b399d7e65c0f4a0229851 | [
"BSD-3-Clause"
] | null | null | null | defmodule MoleWeb.Plugs.Admin do
@moduledoc false
import Plug.Conn
alias Mole.Accounts
def init(opts), do: opts
def call(conn, _opts) do
assign(
conn,
:admin?,
not is_nil(conn.assigns[:admin_id]) and Accounts.is_admin?(conn.assigns[:admin_id])
)
end
end
| 17.352941 | 89 | 0.661017 |
c835edaa0f027fdcdd99cf1de28396db5247c4cf | 405 | exs | Elixir | test/ager_web/views/error_view_test.exs | lulabad/ager | aec17e74819367e634746c8e22fc3584d78286d8 | [
"MIT"
] | 1 | 2021-04-04T07:15:07.000Z | 2021-04-04T07:15:07.000Z | test/ager_web/views/error_view_test.exs | lulabad/ager | aec17e74819367e634746c8e22fc3584d78286d8 | [
"MIT"
] | null | null | null | test/ager_web/views/error_view_test.exs | lulabad/ager | aec17e74819367e634746c8e22fc3584d78286d8 | [
"MIT"
] | null | null | null | defmodule AgerWeb.ErrorViewTest do
use AgerWeb.ConnCase, async: true
# Bring render/3 and render_to_string/3 for testing custom views
import Phoenix.View
test "renders 404.html" do
assert render_to_string(AgerWeb.ErrorView, "404.html", []) == "Not Found"
end
test "renders 500.html" do
assert rend... | 27 | 89 | 0.725926 |
c836011972ad4ebe68f65a2d5fcc18f0e425d7bb | 2,290 | ex | Elixir | clients/retail/lib/google_api/retail/v2/model/google_cloud_retail_v2alpha_export_products_response.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/retail/lib/google_api/retail/v2/model/google_cloud_retail_v2alpha_export_products_response.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/retail/lib/google_api/retail/v2/model/google_cloud_retail_v2alpha_export_products_response.ex | dazuma/elixir-google-api | 6a9897168008efe07a6081d2326735fe332e522c | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 40.892857 | 194 | 0.761135 |
c83606e31878f211b3ab701658ba820482ccb672 | 142 | ex | Elixir | test/support/mysql_repo.ex | luisguilhermemsalmeida/ecto_raw_sql_helpers | 210466634e07fe166cf6b941108c1e8b67939d44 | [
"MIT"
] | 1 | 2021-11-25T21:03:28.000Z | 2021-11-25T21:03:28.000Z | test/support/mysql_repo.ex | luisguilhermemsalmeida/ecto_raw_sql_helpers | 210466634e07fe166cf6b941108c1e8b67939d44 | [
"MIT"
] | null | null | null | test/support/mysql_repo.ex | luisguilhermemsalmeida/ecto_raw_sql_helpers | 210466634e07fe166cf6b941108c1e8b67939d44 | [
"MIT"
] | null | null | null | defmodule EctoRawSQLHelpers.MySQLRepoForTest do
use Ecto.Repo,
otp_app: :ecto_raw_sql_helpers,
adapter: Ecto.Adapters.MyXQL
end
| 23.666667 | 47 | 0.767606 |
c8360e959a9a5aa5ca10278177a2d5443d815a8c | 33,278 | ex | Elixir | deps/plug/lib/plug/conn.ex | dmitrinesterenko/sample_phoenix_ecs | d6b94f35680163302e372cf30c70d3e409b0c9b1 | [
"MIT"
] | null | null | null | deps/plug/lib/plug/conn.ex | dmitrinesterenko/sample_phoenix_ecs | d6b94f35680163302e372cf30c70d3e409b0c9b1 | [
"MIT"
] | null | null | null | deps/plug/lib/plug/conn.ex | dmitrinesterenko/sample_phoenix_ecs | d6b94f35680163302e372cf30c70d3e409b0c9b1 | [
"MIT"
] | null | null | null | alias Plug.Conn.Unfetched
defmodule Plug.Conn do
@moduledoc """
The Plug connection.
This module defines a `Plug.Conn` struct and the main functions
for working with Plug connections.
Note request headers are normalized to lowercase and response
headers are expected to have lower-case keys.
## Request... | 34.307216 | 110 | 0.649949 |
c836637b494097a1cb4c940868758c5a2306f517 | 1,599 | ex | Elixir | test/support/model_case.ex | AgtLucas/jean-grey | 2aa3de025de67124c0d2bc6621f7795b547011e5 | [
"MIT"
] | null | null | null | test/support/model_case.ex | AgtLucas/jean-grey | 2aa3de025de67124c0d2bc6621f7795b547011e5 | [
"MIT"
] | null | null | null | test/support/model_case.ex | AgtLucas/jean-grey | 2aa3de025de67124c0d2bc6621f7795b547011e5 | [
"MIT"
] | null | null | null | defmodule JeanGrey.ModelCase do
@moduledoc """
This module defines the test case to be used by
model tests.
You may define functions here to be used as helpers in
your model tests. See `errors_on/2`'s definition as reference.
Finally, if the test case interacts with the database,
it cannot be async. For... | 25.790323 | 84 | 0.685428 |
c8366ff1bf9b23d4cd916fe0ed9f1e61b2a055e2 | 1,318 | ex | Elixir | lib/grizzly/zwave/commands/failed_node_list_report.ex | smartrent/grizzly | 65a397ea7bfedb5518fe63a3f058a0b6af473e39 | [
"Apache-2.0"
] | 76 | 2019-09-04T16:56:58.000Z | 2022-03-29T06:54:36.000Z | lib/grizzly/zwave/commands/failed_node_list_report.ex | smartrent/grizzly | 65a397ea7bfedb5518fe63a3f058a0b6af473e39 | [
"Apache-2.0"
] | 124 | 2019-09-05T14:01:24.000Z | 2022-02-28T22:58:14.000Z | lib/grizzly/zwave/commands/failed_node_list_report.ex | smartrent/grizzly | 65a397ea7bfedb5518fe63a3f058a0b6af473e39 | [
"Apache-2.0"
] | 10 | 2019-10-23T19:25:45.000Z | 2021-11-17T13:21:20.000Z | defmodule Grizzly.ZWave.Commands.FailedNodeListReport do
@moduledoc """
This command is used to advertise the current list of failing nodes in the network.
Params:
* `:seq_number` - Sequence number
* `:node_ids` - The ids of all nodes in the network found to be unresponsive
"""
@behaviour Grizzly.... | 27.458333 | 85 | 0.697269 |
c836915ac9c26272cb2bd6735b6ed4db2a697e99 | 1,887 | ex | Elixir | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1__video_segment.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1__video_segment.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1__video_segment.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... | 34.309091 | 172 | 0.741918 |
c836c097d4595817bc5e71e54a4e543a09f03f08 | 3,346 | exs | Elixir | test/changelog_web/controllers/admin/benefit_controller_test.exs | type1fool/changelog.com | fbec3528cc3f5adfdc75b008bb92b17efc4f248f | [
"MIT"
] | 1 | 2020-05-20T16:58:17.000Z | 2020-05-20T16:58:17.000Z | test/changelog_web/controllers/admin/benefit_controller_test.exs | type1fool/changelog.com | fbec3528cc3f5adfdc75b008bb92b17efc4f248f | [
"MIT"
] | null | null | null | test/changelog_web/controllers/admin/benefit_controller_test.exs | type1fool/changelog.com | fbec3528cc3f5adfdc75b008bb92b17efc4f248f | [
"MIT"
] | null | null | null | defmodule ChangelogWeb.Admin.BenefitControllerTest do
use ChangelogWeb.ConnCase
alias Changelog.Benefit
@valid_attrs %{offer: "Free stuff!", sponsor_id: 1}
@invalid_attrs %{offer: ""}
@tag :as_admin
test "lists all benefits on index", %{conn: conn} do
b1 = insert(:benefit)
b2 = insert(:benefit)
... | 32.803922 | 161 | 0.690377 |
c836cb58dfa8bdf480fe764545726da67986df65 | 871 | ex | Elixir | lib/membrane/core/message.ex | treble37/membrane-core | 3f7c7200a80eef370092ef252b5f75dc9eb16cbd | [
"Apache-2.0"
] | null | null | null | lib/membrane/core/message.ex | treble37/membrane-core | 3f7c7200a80eef370092ef252b5f75dc9eb16cbd | [
"Apache-2.0"
] | null | null | null | lib/membrane/core/message.ex | treble37/membrane-core | 3f7c7200a80eef370092ef252b5f75dc9eb16cbd | [
"Apache-2.0"
] | null | null | null | defmodule Membrane.Core.Message do
@moduledoc false
# Record representing membrane internal message
require Record
Record.defrecord(:message, __MODULE__, type: nil, args: [])
@type t :: {__MODULE__, type_t, args_t}
@type type_t :: atom
@type args_t :: list | any
defmacro new(type, args \\ []) do
... | 25.617647 | 75 | 0.649828 |
c836f25b7c20a95366a15bf72f0f8c82c59b2451 | 1,104 | exs | Elixir | config/releases.exs | mrkurt/globe-request-mapper | 1270c7f69a0c1403b026508385fab54d2eaa685e | [
"Apache-2.0"
] | 1 | 2022-02-24T04:00:56.000Z | 2022-02-24T04:00:56.000Z | config/releases.exs | mrkurt/globe-request-mapper | 1270c7f69a0c1403b026508385fab54d2eaa685e | [
"Apache-2.0"
] | null | null | null | config/releases.exs | mrkurt/globe-request-mapper | 1270c7f69a0c1403b026508385fab54d2eaa685e | [
"Apache-2.0"
] | 4 | 2021-04-05T22:39:42.000Z | 2021-04-05T23:16:50.000Z | import Config
secret_key_base =
System.get_env("SECRET_KEY_BASE") ||
raise """
environment variable SECRET_KEY_BASE is missing.
You can generate one by calling: mix phx.gen.secret
"""
fly_api_key =
System.get_env("FLY_API_KEY") ||
raise """
environment variable FLY_API_KEY is missing.
... | 26.926829 | 67 | 0.64221 |
c836f534ced8b23abfe5d9f15da6c6e1475434b2 | 261 | ex | Elixir | lib/exbrainz/recording.ex | ozgunatacan/exbrainz | 1ed6759d876cc1848079a4d3ff1268dfbc1ca71d | [
"MIT"
] | 1 | 2021-12-30T20:02:30.000Z | 2021-12-30T20:02:30.000Z | lib/exbrainz/recording.ex | ozgunatacan/exbrainz | 1ed6759d876cc1848079a4d3ff1268dfbc1ca71d | [
"MIT"
] | null | null | null | lib/exbrainz/recording.ex | ozgunatacan/exbrainz | 1ed6759d876cc1848079a4d3ff1268dfbc1ca71d | [
"MIT"
] | null | null | null | defmodule Exbrainz.Recording do
defstruct id: nil, title: nil, length: 0, relations: []
use ExConstructor
alias Exbrainz.{Recording, Relations}
def get_vocals(%Recording{relations: relations}) do
Relations.get_by_type(relations, "vocal")
end
end
| 26.1 | 57 | 0.747126 |
c837084da7cc5a46ebaa00c17599ad770aea4ea3 | 2,821 | ex | Elixir | lib/google_api/pub_sub/v1/model/pubsub_message.ex | balena/elixir-google-api-pubsub | 40a089e324effd7e17dac21279e4dd1bd3f8fe19 | [
"Apache-2.0"
] | null | null | null | lib/google_api/pub_sub/v1/model/pubsub_message.ex | balena/elixir-google-api-pubsub | 40a089e324effd7e17dac21279e4dd1bd3f8fe19 | [
"Apache-2.0"
] | null | null | null | lib/google_api/pub_sub/v1/model/pubsub_message.ex | balena/elixir-google-api-pubsub | 40a089e324effd7e17dac21279e4dd1bd3f8fe19 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 40.884058 | 136 | 0.715349 |
c83709db0d2588484c603e7369f2eada214d1835 | 4,840 | ex | Elixir | lib/elixpath/parser/grammar.ex | mtannaan/elixpath | 6dddbff719ba48734d434bfd436c1612550cc069 | [
"MIT"
] | 7 | 2019-06-06T18:50:23.000Z | 2019-12-30T20:16:36.000Z | lib/elixpath/parser/grammar.ex | mtannaan/elixpath | 6dddbff719ba48734d434bfd436c1612550cc069 | [
"MIT"
] | 7 | 2019-05-24T11:41:34.000Z | 2022-03-29T14:36:20.000Z | lib/elixpath/parser/grammar.ex | mtannaan/elixpath | 6dddbff719ba48734d434bfd436c1612550cc069 | [
"MIT"
] | null | null | null | defmodule Elixpath.Parser.Grammar do
@moduledoc false
import NimbleParsec
require Elixpath.Tag, as: Tag
alias Elixpath.Parser.Helper
# suppress seemingly false-positive warnings
# maybe related to https://github.com/plataformatec/nimble_parsec/issues/53
@dialyzer [:no_return, :no_opaque]
# ----- lex ... | 24.948454 | 80 | 0.579339 |
c837495ea0e316b8e4d2e02bcae25bb9f24f5d20 | 3,221 | ex | Elixir | lib/lum_patterns/map_creator.ex | jwarwick/lum_patterns_web | 66ecaa56d1311a21ed9d55c92267e4834be33882 | [
"MIT"
] | null | null | null | lib/lum_patterns/map_creator.ex | jwarwick/lum_patterns_web | 66ecaa56d1311a21ed9d55c92267e4834be33882 | [
"MIT"
] | null | null | null | lib/lum_patterns/map_creator.ex | jwarwick/lum_patterns_web | 66ecaa56d1311a21ed9d55c92267e4834be33882 | [
"MIT"
] | null | null | null | defmodule LumPatterns.MapCreator do
@moduledoc """
Functions to generate the xml for an LSE map
"""
import XmlBuilder
def create(controller_map) do
map(controller_map) |> XmlBuilder.generate
end
defp map(controller_map) do
element(:map, map_elements(controller_map))
end
defp map_elements(co... | 25.975806 | 92 | 0.59081 |
c8375aa100c65363e34eb07a25a8cfeec2e0acdc | 745 | exs | Elixir | 6453_05_02_Code/async_task/test/async_task_test.exs | PacktPublishing/Advanced-Elixir-and-OTP | 952fe654f1f91ec186a41d5ff4f09672ef5e7221 | [
"MIT"
] | 1 | 2021-10-01T22:06:12.000Z | 2021-10-01T22:06:12.000Z | 6453_05_02_Code/async_task/test/async_task_test.exs | PacktPublishing/Advanced-Elixir-and-OTP | 952fe654f1f91ec186a41d5ff4f09672ef5e7221 | [
"MIT"
] | null | null | null | 6453_05_02_Code/async_task/test/async_task_test.exs | PacktPublishing/Advanced-Elixir-and-OTP | 952fe654f1f91ec186a41d5ff4f09672ef5e7221 | [
"MIT"
] | 1 | 2020-06-10T10:40:37.000Z | 2020-06-10T10:40:37.000Z | defmodule TaskTest do
use AsyncTask
@async false
task do_sync() do
:hello
end
@async true
task do_async(caller) do
send(caller, :hello)
end
@async false
@timeout 1_000
@timeout_response :late_to_the_party
task do_sync_timely(waiting_time) do
:timer.sleep(waiting_time)
:hello
e... | 17.738095 | 63 | 0.704698 |
c8377f83b357dea0bc7e691b1bbf0931abfe9c5d | 753 | ex | Elixir | elixir/samples/kv_umbrella/apps/kv/lib/kv/supervisor.ex | afronski/playground-erlang | 6ac4b58b2fd717260c22a33284547d44a9b5038e | [
"MIT"
] | 2 | 2015-12-09T02:16:51.000Z | 2021-07-26T22:53:43.000Z | elixir/samples/kv_umbrella/apps/kv/lib/kv/supervisor.ex | afronski/playground-erlang | 6ac4b58b2fd717260c22a33284547d44a9b5038e | [
"MIT"
] | null | null | null | elixir/samples/kv_umbrella/apps/kv/lib/kv/supervisor.ex | afronski/playground-erlang | 6ac4b58b2fd717260c22a33284547d44a9b5038e | [
"MIT"
] | 1 | 2016-05-08T18:40:31.000Z | 2016-05-08T18:40:31.000Z | defmodule KV.Supervisor do
use Supervisor
def start_link do
Supervisor.start_link(__MODULE__, :ok)
end
@manager_name KV.EventManager
@registry_name KV.Registry
@ets_registry_name KV.Registry
@bucket_sup_name KV.Bucket.Supervisor
def init(:ok) do
ets = :ets.new(@ets_registry_name, [
:set... | 25.965517 | 70 | 0.667995 |
c8379d2c0fbf4bc24a2454db51e674e619226129 | 1,253 | ex | Elixir | test/support/conn_case.ex | franknfjr/dashboard | 68ff963d4cd51b1b3d92373e84b606fccedb7d89 | [
"MIT"
] | 1 | 2021-01-27T17:44:38.000Z | 2021-01-27T17:44:38.000Z | test/support/conn_case.ex | franknfjr/dashboard | 68ff963d4cd51b1b3d92373e84b606fccedb7d89 | [
"MIT"
] | null | null | null | test/support/conn_case.ex | franknfjr/dashboard | 68ff963d4cd51b1b3d92373e84b606fccedb7d89 | [
"MIT"
] | null | null | null | defmodule DashboardWeb.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 ... | 27.844444 | 63 | 0.726257 |
c837a5f0d7cd533edbfefaba0d5c1b4f8b93a837 | 2,174 | ex | Elixir | apps/omg_watcher/lib/omg_watcher/http_rpc/adapter.ex | PinkDiamond1/elixir-omg | 70dfd24a0a1ddf5d1d9d71aab61ea25300f889f7 | [
"Apache-2.0"
] | null | null | null | apps/omg_watcher/lib/omg_watcher/http_rpc/adapter.ex | PinkDiamond1/elixir-omg | 70dfd24a0a1ddf5d1d9d71aab61ea25300f889f7 | [
"Apache-2.0"
] | null | null | null | apps/omg_watcher/lib/omg_watcher/http_rpc/adapter.ex | PinkDiamond1/elixir-omg | 70dfd24a0a1ddf5d1d9d71aab61ea25300f889f7 | [
"Apache-2.0"
] | 1 | 2021-12-04T00:37:46.000Z | 2021-12-04T00:37:46.000Z | # Copyright 2019 OmiseGO Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 31.970588 | 92 | 0.662374 |
c837a79fe4b9e79d90d1f20ada0349302be34de8 | 351 | exs | Elixir | day03/el_a.exs | mason-bially/aoc-2021 | 866ffc7e85f690c2ad9195da2304bfb515819023 | [
"MIT"
] | null | null | null | day03/el_a.exs | mason-bially/aoc-2021 | 866ffc7e85f690c2ad9195da2304bfb515819023 | [
"MIT"
] | null | null | null | day03/el_a.exs | mason-bially/aoc-2021 | 866ffc7e85f690c2ad9195da2304bfb515819023 | [
"MIT"
] | null | null | null | Code.require_file("el.ex", __DIR__)
File.stream!("day03/input", [encoding: :utf8], :line)
|> Stream.map(&String.trim/1)
|> Stream.filter(fn l -> l != "" end)
|> Enum.map(&String.to_charlist/1)
|> Day03.transpose
|> Enum.map(fn s -> Enum.reduce(s, {0, 0}, &Day03.counts/2) end)
|> Day03.to_numbers
|> Kernel.then(fn {g, ... | 29.25 | 64 | 0.632479 |
c837cb9681793cdc77e7b31f8eb21a2322501125 | 1,074 | ex | Elixir | lib/makeup_live_web/channels/user_socket.ex | axelson/makeup_live_format | 122cd01b6b8c89099ede56a8cadea43523d62c51 | [
"MIT"
] | 6 | 2020-01-18T15:57:42.000Z | 2020-07-05T08:28:56.000Z | lib/makeup_live_web/channels/user_socket.ex | axelson/makeup_live_format | 122cd01b6b8c89099ede56a8cadea43523d62c51 | [
"MIT"
] | 2 | 2020-01-17T18:26:24.000Z | 2020-02-04T01:34:48.000Z | lib/makeup_live_web/channels/user_socket.ex | axelson/makeup_live_format | 122cd01b6b8c89099ede56a8cadea43523d62c51 | [
"MIT"
] | 1 | 2020-01-13T17:56:00.000Z | 2020-01-13T17:56:00.000Z | defmodule MakeupLiveWeb.UserSocket do
use Phoenix.Socket
## Channels
# channel "room:*", MakeupLiveWeb.RoomChannel
# Socket params are passed from the client and can
# be used to verify and authenticate a user. After
# verification, you can put default assigns into
# the socket that will be set for all ... | 31.588235 | 85 | 0.699255 |
c83800220746c09afd377be9475bf0d68184d3fe | 176 | exs | Elixir | priv/repo/migrations/20190107055357_add_floor_to_mentions.exs | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | 1 | 2019-05-07T15:03:54.000Z | 2019-05-07T15:03:54.000Z | priv/repo/migrations/20190107055357_add_floor_to_mentions.exs | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | null | null | null | priv/repo/migrations/20190107055357_add_floor_to_mentions.exs | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | null | null | null | defmodule MastaniServer.Repo.Migrations.AddFloorToMentions do
use Ecto.Migration
def change do
alter table(:mentions) do
add(:floor, :integer)
end
end
end
| 17.6 | 61 | 0.721591 |
c8384535bbcd780d12df5524305e54c89a3e0a1c | 555 | exs | Elixir | mix.exs | MrL1605/lambdinha-bot | cf5b399f7fdc5fdaff3485c4917d2c5042d74793 | [
"MIT"
] | null | null | null | mix.exs | MrL1605/lambdinha-bot | cf5b399f7fdc5fdaff3485c4917d2c5042d74793 | [
"MIT"
] | null | null | null | mix.exs | MrL1605/lambdinha-bot | cf5b399f7fdc5fdaff3485c4917d2c5042d74793 | [
"MIT"
] | null | null | null | defmodule App.Mixfile do
use Mix.Project
def project do
[app: :app,
version: "0.1.0",
elixir: "~> 1.3",
default_task: "server",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps(),
aliases: aliases()]
end
def application do
[applications... | 17.34375 | 49 | 0.52973 |
c83845470a9895e0ae54dd3ff954ceba637b45f6 | 1,813 | ex | Elixir | lib/ja_serializer/builder/relationship.ex | gamesrol/ja_serializer | c48d8fb0fb742bd96c30acd40e24f7395f25af2c | [
"Apache-2.0"
] | null | null | null | lib/ja_serializer/builder/relationship.ex | gamesrol/ja_serializer | c48d8fb0fb742bd96c30acd40e24f7395f25af2c | [
"Apache-2.0"
] | null | null | null | lib/ja_serializer/builder/relationship.ex | gamesrol/ja_serializer | c48d8fb0fb742bd96c30acd40e24f7395f25af2c | [
"Apache-2.0"
] | null | null | null | defmodule JaSerializer.Builder.Relationship do
@moduledoc false
alias JaSerializer.Builder.Link
alias JaSerializer.Builder.ResourceIdentifier
defstruct [:name, :links, :data, :meta]
def build(%{serializer: serializer, data: data, conn: conn, opts: opts} = context) do
case opts[:relationships] do
... | 30.728814 | 118 | 0.671815 |
c83854734c73bed4444bb6b7ca8042699e3b1d7e | 341 | ex | Elixir | lib/elair.ex | mattmatters/elair | 9b1310cbc3a515067bbfde12eafbe8ee51b62063 | [
"MIT"
] | null | null | null | lib/elair.ex | mattmatters/elair | 9b1310cbc3a515067bbfde12eafbe8ee51b62063 | [
"MIT"
] | null | null | null | lib/elair.ex | mattmatters/elair | 9b1310cbc3a515067bbfde12eafbe8ee51b62063 | [
"MIT"
] | null | null | null | defmodule Elair do
@moduledoc """
Elair is a small cli program for getting and displaying weather information
for airports.
"""
@doc """
Main function
## Examples
iex> Elair.run "KDTO"
"""
def run(location) do
location
|> Elair.Weather.fetch()
|> Elair.Formatter.format()
Syst... | 15.5 | 77 | 0.633431 |
c8385a5bfa4726289ac39e7c5ffb7eea9fb1f7b3 | 44,289 | ex | Elixir | lib/ecto/repo.ex | toraritte/ecto | 34c8b5667f4a3cef4d50391dbdb17d5094ccd910 | [
"Apache-2.0"
] | null | null | null | lib/ecto/repo.ex | toraritte/ecto | 34c8b5667f4a3cef4d50391dbdb17d5094ccd910 | [
"Apache-2.0"
] | null | null | null | lib/ecto/repo.ex | toraritte/ecto | 34c8b5667f4a3cef4d50391dbdb17d5094ccd910 | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.Repo do
@moduledoc """
Defines a repository.
A repository maps to an underlying data store, controlled by the
adapter. For example, Ecto ships with a Postgres adapter that
stores data into a PostgreSQL database.
When used, the repository expects the `:otp_app` as option.
The `:otp_app` sh... | 35.803557 | 105 | 0.667389 |
c8386aad2882e9a2e3a1cb6eb3fc4aab220dca42 | 2,053 | exs | Elixir | apps/ello_auth/test/ello_auth/public_token_test.exs | ello/apex | 4acb096b3ce172ff4ef9a51e5d068d533007b920 | [
"MIT"
] | 16 | 2017-06-21T21:31:20.000Z | 2021-05-09T03:23:26.000Z | apps/ello_auth/test/ello_auth/public_token_test.exs | ello/apex | 4acb096b3ce172ff4ef9a51e5d068d533007b920 | [
"MIT"
] | 25 | 2017-06-07T12:18:28.000Z | 2018-06-08T13:27:43.000Z | apps/ello_auth/test/ello_auth/public_token_test.exs | ello/apex | 4acb096b3ce172ff4ef9a51e5d068d533007b920 | [
"MIT"
] | 3 | 2018-06-14T15:34:07.000Z | 2022-02-28T21:06:13.000Z | defmodule Ello.Auth.PublicTokenTest do
use ExUnit.Case, async: false
alias Ello.Auth.PublicToken
test "getting a token" do
Application.put_env(:ello_auth, :http_client, __MODULE__.ClientMock)
token = PublicToken.fetch("unexpired", "secret")
Application.delete_env(:ello_auth, :http_client)
assert... | 31.106061 | 72 | 0.649294 |
c8387888bc04a06c64587c6f16e12deafeb0a4d9 | 2,330 | ex | Elixir | lib/credit_note/transfer.ex | starkinfra/sdk-elixir | d434de336ad7d2331b860519f04e9d107bb9c9cd | [
"MIT"
] | 1 | 2022-03-15T18:58:21.000Z | 2022-03-15T18:58:21.000Z | lib/credit_note/transfer.ex | starkinfra/sdk-elixir | d434de336ad7d2331b860519f04e9d107bb9c9cd | [
"MIT"
] | null | null | null | lib/credit_note/transfer.ex | starkinfra/sdk-elixir | d434de336ad7d2331b860519f04e9d107bb9c9cd | [
"MIT"
] | null | null | null | defmodule StarkInfra.CreditNote.Transfer do
alias __MODULE__, as: Transfer
alias StarkInfra.Utils.Check
@moduledoc """
Groups Transfer related functions
"""
@doc """
CreditNote signer's information.
## Parameters (required):
- `:name` [string]: receiver full name. ex: "Anthony Edward Stark"
-... | 33.768116 | 198 | 0.654077 |
c83899704e10e1e0bd2085c2525ef8cee1cf73b2 | 1,548 | ex | Elixir | test/support/data_case.ex | himrock922/we_reports | 04cffcd0e56f441e5087b65cf80a31602afae419 | [
"MIT"
] | null | null | null | test/support/data_case.ex | himrock922/we_reports | 04cffcd0e56f441e5087b65cf80a31602afae419 | [
"MIT"
] | 5 | 2020-09-09T01:41:39.000Z | 2021-05-11T00:18:38.000Z | test/support/data_case.ex | himrock922/we_reports | 04cffcd0e56f441e5087b65cf80a31602afae419 | [
"MIT"
] | null | null | null | defmodule WeReports.DataCase do
@moduledoc """
This module defines the setup for tests requiring
access to the application's data layer.
You may define functions here to be used as helpers in
your tests.
Finally, if the test case interacts with the database,
we enable the SQL sandbox, so changes done to... | 27.642857 | 77 | 0.69186 |
c838b8c1f75f2944302a1392668a63b73450148d | 1,127 | exs | Elixir | config/config.exs | arjan/cookie_store | 304bbf7a0a5a67efc14510acc6d08339995040ef | [
"MIT"
] | 7 | 2016-10-14T15:20:31.000Z | 2020-02-04T18:16:59.000Z | config/config.exs | arjan/cookie_store | 304bbf7a0a5a67efc14510acc6d08339995040ef | [
"MIT"
] | null | null | null | config/config.exs | arjan/cookie_store | 304bbf7a0a5a67efc14510acc6d08339995040ef | [
"MIT"
] | 1 | 2021-02-22T18:49:47.000Z | 2021-02-22T18:49:47.000Z | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the paren... | 36.354839 | 73 | 0.753327 |
c838ec51a524f14e1f98b99bd495b63465740156 | 939 | ex | Elixir | daniel/prog_elix/ch19/duper/lib/duper/results.ex | jdashton/glowing-succotash | 44580c2d4cb300e33156d42e358e8a055948a079 | [
"MIT"
] | null | null | null | daniel/prog_elix/ch19/duper/lib/duper/results.ex | jdashton/glowing-succotash | 44580c2d4cb300e33156d42e358e8a055948a079 | [
"MIT"
] | 1 | 2020-02-26T14:55:23.000Z | 2020-02-26T14:55:23.000Z | daniel/prog_elix/ch19/duper/lib/duper/results.ex | jdashton/glowing-succotash | 44580c2d4cb300e33156d42e358e8a055948a079 | [
"MIT"
] | null | null | null | defmodule Duper.Results do
use GenServer
@me __MODULE__
# API
def start_link(_) do
GenServer.start_link(__MODULE__, :no_args, name: @me)
end
def add_hash_for(path, hash) do
GenServer.cast(@me, { :add, path, hash })
end
def find_duplicates() do
GenServer.call(@me, :find_duplicates)
end... | 17.072727 | 64 | 0.588924 |
c8390475ffbfc2513b35c535b61fd0d0922a8f0a | 1,634 | ex | Elixir | lib/ex_jagaimo_blog_web/router.ex | JasonTrue/ex_jagaimo_blog | e90e2dfe67971e009f3fafb9b4a06dd3bc92ffb9 | [
"MIT"
] | 1 | 2021-06-19T04:19:06.000Z | 2021-06-19T04:19:06.000Z | lib/ex_jagaimo_blog_web/router.ex | JasonTrue/ex_jagaimo_blog | e90e2dfe67971e009f3fafb9b4a06dd3bc92ffb9 | [
"MIT"
] | 1 | 2021-06-19T04:21:52.000Z | 2021-06-19T04:21:52.000Z | lib/ex_jagaimo_blog_web/router.ex | JasonTrue/ex_jagaimo_blog | e90e2dfe67971e009f3fafb9b4a06dd3bc92ffb9 | [
"MIT"
] | null | null | null | defmodule ExJagaimoBlogWeb.Router do
use ExJagaimoBlogWeb, :router
pipeline :browser do
plug :accepts, ["html"]
plug :put_root_layout, {ExJagaimoBlogWeb.LayoutView, :root}
plug :fetch_session
plug :fetch_live_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
end
pipelin... | 29.709091 | 78 | 0.69033 |
c83909746aeb444b8798b720ff4cbd1b362f9d68 | 6,905 | ex | Elixir | lib/mix/tasks/examples.ex | kianmeng/ggity | 75f0097464eae4086f8c70e4bea995d60571eba9 | [
"MIT"
] | 47 | 2020-06-21T15:23:54.000Z | 2022-03-13T01:24:19.000Z | lib/mix/tasks/examples.ex | kianmeng/ggity | 75f0097464eae4086f8c70e4bea995d60571eba9 | [
"MIT"
] | 3 | 2020-11-28T11:00:59.000Z | 2020-11-30T18:20:37.000Z | lib/mix/tasks/examples.ex | kianmeng/ggity | 75f0097464eae4086f8c70e4bea995d60571eba9 | [
"MIT"
] | 2 | 2020-11-28T10:40:10.000Z | 2021-05-28T06:44:47.000Z | # credo:disable-for-this-file Credo.Check.Readability.Specs
defmodule GGity.Examples do
@moduledoc false
def diamonds do
file_name = Path.join([:code.priv_dir(:ggity), "diamonds.csv"])
headers =
File.stream!(file_name)
|> NimbleCSV.RFC4180.parse_stream(skip_headers: false)
|> Enum.take(1... | 34.873737 | 96 | 0.536133 |
c8390af9669bcb4082b2ec1ab5882e44d08fa6e5 | 288 | exs | Elixir | islands_interface/test/islands_interface_web/views/layout_view_test.exs | moritzploss/islands | ae804c4a443469a49a5d54c69d86951e76050205 | [
"MIT"
] | 3 | 2020-04-14T20:21:33.000Z | 2021-03-18T16:47:04.000Z | islands_interface/test/islands_interface_web/views/layout_view_test.exs | moritzploss/islands | ae804c4a443469a49a5d54c69d86951e76050205 | [
"MIT"
] | null | null | null | islands_interface/test/islands_interface_web/views/layout_view_test.exs | moritzploss/islands | ae804c4a443469a49a5d54c69d86951e76050205 | [
"MIT"
] | null | null | null | defmodule IslandsInterfaceWeb.LayoutViewTest do
use IslandsInterfaceWeb.ConnCase, async: true
# When testing helpers, you may want to import Phoenix.HTML and
# use functions such as safe_to_string() to convert the helper
# result into an HTML string.
# import Phoenix.HTML
end
| 32 | 65 | 0.78125 |
c8390f8c5bc5a9e9c5cee20cbb9264b7f21f2420 | 2,147 | ex | Elixir | clients/service_management/lib/google_api/service_management/v1/model/option.ex | nuxlli/elixir-google-api | ecb8679ac7282b7dd314c3e20c250710ec6a7870 | [
"Apache-2.0"
] | null | null | null | clients/service_management/lib/google_api/service_management/v1/model/option.ex | nuxlli/elixir-google-api | ecb8679ac7282b7dd314c3e20c250710ec6a7870 | [
"Apache-2.0"
] | null | null | null | clients/service_management/lib/google_api/service_management/v1/model/option.ex | nuxlli/elixir-google-api | ecb8679ac7282b7dd314c3e20c250710ec6a7870 | [
"Apache-2.0"
] | 1 | 2020-11-10T16:58:27.000Z | 2020-11-10T16:58:27.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 42.098039 | 348 | 0.734979 |
c8391daa3f03fab3e89f080fc7939158c2345698 | 4,450 | ex | Elixir | clients/you_tube/lib/google_api/you_tube/v3/model/video_processing_details.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/you_tube/lib/google_api/you_tube/v3/model/video_processing_details.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/you_tube/lib/google_api/you_tube/v3/model/video_processing_details.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 ... | 60.135135 | 421 | 0.756404 |
c83945f9d2aa1396147ee22f3fbd73dcda2ae90a | 157 | exs | Elixir | .formatter.exs | whitepaperclip/stripe_mock | a8ba9101a04216f26d0650eb38448173d8e090a1 | [
"MIT"
] | 4 | 2019-06-04T20:35:21.000Z | 2021-09-02T04:04:21.000Z | .formatter.exs | whitepaperclip/stripe_mock | a8ba9101a04216f26d0650eb38448173d8e090a1 | [
"MIT"
] | 2 | 2020-02-04T17:38:12.000Z | 2021-04-29T06:59:06.000Z | .formatter.exs | whitepaperclip/stripe_mock | a8ba9101a04216f26d0650eb38448173d8e090a1 | [
"MIT"
] | null | null | null | [
import_deps: [:phoenix],
inputs: ["*.{ex,exs}", "{config,lib,test}/**/*.{ex,exs}"],
locals_without_parens: [
field: :*,
belongs_to: :*
]
]
| 17.444444 | 60 | 0.528662 |
c839716363eb01436ef3c9029a70d9b2bbb923c2 | 302 | exs | Elixir | test/dovetail_test.exs | thusfresh/dovetail | f4a498f0db572484b6fe70a3885ce4a89e3a3492 | [
"BSD-3-Clause"
] | 2 | 2016-02-07T22:36:34.000Z | 2016-02-09T13:33:01.000Z | test/dovetail_test.exs | thusfresh/dovetail | f4a498f0db572484b6fe70a3885ce4a89e3a3492 | [
"BSD-3-Clause"
] | 1 | 2015-08-10T10:00:18.000Z | 2015-08-10T15:44:21.000Z | test/dovetail_test.exs | thusfresh/dovetail | f4a498f0db572484b6fe70a3885ce4a89e3a3492 | [
"BSD-3-Clause"
] | null | null | null | defmodule DovetailTest do
use ExUnit.Case
# doctest Dovetail
test "up?/0" do
assert Dovetail.up?
end
test "Dovetail.start/0 already started" do
assert {:error, :already_started} == Dovetail.start()
end
test "Dovetail.ensure/0" do
assert :ok == Dovetail.ensure()
end
end
| 16.777778 | 57 | 0.675497 |
c839759aec9c43bcf475291950def50b7798247f | 33,082 | ex | Elixir | lib/migration_generator/migration_generator.ex | kingshalaby1/ash_postgres | 4aa76a522b85138860c7ec1f2e1a3d8b8fc833a3 | [
"MIT"
] | null | null | null | lib/migration_generator/migration_generator.ex | kingshalaby1/ash_postgres | 4aa76a522b85138860c7ec1f2e1a3d8b8fc833a3 | [
"MIT"
] | null | null | null | lib/migration_generator/migration_generator.ex | kingshalaby1/ash_postgres | 4aa76a522b85138860c7ec1f2e1a3d8b8fc833a3 | [
"MIT"
] | null | null | null | defmodule AshPostgres.MigrationGenerator do
@moduledoc """
Generates migrations based on resource snapshots
See `Mix.Tasks.AshPostgres.GenerateMigrations` for more information.
"""
@default_snapshot_path "priv/resource_snapshots"
import Mix.Generator
alias AshPostgres.MigrationGenerator.{Operation, Pha... | 27.138638 | 199 | 0.589142 |
c8397d37f17bc0bb6d95502ca3c9b30bea1038ae | 746 | exs | Elixir | test/river/frame/go_away_test.exs | peburrows/river | e8968535d02a86e70a7942a690c8e461fed55913 | [
"MIT"
] | 86 | 2016-08-19T21:59:28.000Z | 2022-01-31T20:14:18.000Z | test/river/frame/go_away_test.exs | peburrows/river | e8968535d02a86e70a7942a690c8e461fed55913 | [
"MIT"
] | 7 | 2016-09-27T14:44:16.000Z | 2017-08-08T14:57:45.000Z | test/river/frame/go_away_test.exs | peburrows/river | e8968535d02a86e70a7942a690c8e461fed55913 | [
"MIT"
] | 4 | 2016-09-26T10:57:24.000Z | 2018-04-03T14:30:19.000Z | defmodule River.Frame.GoAwayTest do
use ExUnit.Case, async: true
alias River.{Frame, Frame.GoAway}
test "we can decode a go away payload" do
assert %Frame{
payload: %GoAway{
last_stream_id: 15,
error: :PROTOCOL_ERROR
}
} = GoAway.decode(%Fram... | 29.84 | 92 | 0.533512 |
c8398a8b142dbabdc1aeae787221805215f2447a | 1,446 | ex | Elixir | clients/blogger/lib/google_api/blogger/v3/model/comment_post.ex | nuxlli/elixir-google-api | ecb8679ac7282b7dd314c3e20c250710ec6a7870 | [
"Apache-2.0"
] | null | null | null | clients/blogger/lib/google_api/blogger/v3/model/comment_post.ex | nuxlli/elixir-google-api | ecb8679ac7282b7dd314c3e20c250710ec6a7870 | [
"Apache-2.0"
] | null | null | null | clients/blogger/lib/google_api/blogger/v3/model/comment_post.ex | nuxlli/elixir-google-api | ecb8679ac7282b7dd314c3e20c250710ec6a7870 | [
"Apache-2.0"
] | 1 | 2020-11-10T16:58:27.000Z | 2020-11-10T16:58:27.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 30.125 | 91 | 0.738589 |
c8398b69f48941c80d11b47a6c6666ab45ca5c0b | 1,995 | ex | Elixir | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/acl_entry.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/acl_entry.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/acl_entry.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... | 35.625 | 214 | 0.693734 |
c83991a2320b904b0b15d6048676d3ebe29bc1aa | 257 | ex | Elixir | lib/webapp/types/user_role.ex | runhyve/webapp | 434b074f98c1ebac657b56062c1c1a54e683dea1 | [
"BSD-2-Clause"
] | 12 | 2019-07-02T14:30:06.000Z | 2022-03-12T08:22:18.000Z | lib/webapp/types/user_role.ex | runhyve/webapp | 434b074f98c1ebac657b56062c1c1a54e683dea1 | [
"BSD-2-Clause"
] | 9 | 2020-03-16T20:10:50.000Z | 2021-06-17T17:45:44.000Z | lib/webapp/types/user_role.ex | runhyve/webapp | 434b074f98c1ebac657b56062c1c1a54e683dea1 | [
"BSD-2-Clause"
] | null | null | null | defmodule Webapp.Types.UserRole do
@moduledoc """
This module introduces a custom type for Etco for checking user role in the user model
"""
use Webapp.Types.EnumTypes
def type, do: :user_role
def valid_types, do: ["Administrator", "User"]
end
| 25.7 | 88 | 0.727626 |
c83992fc12ea05fdffd269c2ed0ca8738b44db7f | 439 | exs | Elixir | hls/config/test.exs | Papillon6814/hls_example | f113ecaadabe013a4a5b3a3166d16befb07123c5 | [
"MIT"
] | null | null | null | hls/config/test.exs | Papillon6814/hls_example | f113ecaadabe013a4a5b3a3166d16befb07123c5 | [
"MIT"
] | null | null | null | hls/config/test.exs | Papillon6814/hls_example | f113ecaadabe013a4a5b3a3166d16befb07123c5 | [
"MIT"
] | null | null | null | use Mix.Config
# Configure your database
config :hls, Hls.Repo,
username: "postgres",
password: "postgres",
database: "hls_test",
hostname: "localhost",
pool: Ecto.Adapters.SQL.Sandbox
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :hls, HlsWeb.Endp... | 23.105263 | 56 | 0.719818 |
c839b4bdef34bc5bfb6b2583265595d4459d3229 | 2,163 | exs | Elixir | config/dev.exs | mvanlamz/nflrushing | 7b796fe7633e54795dc3a60193cdb66c578988c7 | [
"MIT"
] | null | null | null | config/dev.exs | mvanlamz/nflrushing | 7b796fe7633e54795dc3a60193cdb66c578988c7 | [
"MIT"
] | null | null | null | config/dev.exs | mvanlamz/nflrushing | 7b796fe7633e54795dc3a60193cdb66c578988c7 | [
"MIT"
] | null | null | null | use Mix.Config
# Configure your database
config :nflrushing, Nflrushing.Repo,
username: "postgres",
password: "postgres",
database: "nflrushing_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 |
c839c9ec3c5da4a2f8c22329145465cd92164fae | 1,357 | ex | Elixir | lib/harald/host/att/error_rsp.ex | RicardoTrindade/harald | 3f56003265c29af0780730eb538183b50e55df2f | [
"MIT"
] | 59 | 2019-02-16T00:09:58.000Z | 2020-03-29T23:37:36.000Z | lib/harald/host/att/error_rsp.ex | RicardoTrindade/harald | 3f56003265c29af0780730eb538183b50e55df2f | [
"MIT"
] | 19 | 2019-02-15T22:41:43.000Z | 2020-02-15T19:20:57.000Z | lib/harald/host/att/error_rsp.ex | RicardoTrindade/harald | 3f56003265c29af0780730eb538183b50e55df2f | [
"MIT"
] | 9 | 2020-05-07T00:02:36.000Z | 2021-09-17T18:17:46.000Z | defmodule Harald.Host.ATT.ErrorRsp do
alias Harald.Host.ATT
alias Harald.Host.ATT.ErrorCodes
@moduledoc """
Reference: version 5.2, Vol 3, Part F, 3.4.1.1
"""
def encode(%{
request_module_in_error: request_module_in_error,
attribute_handle_in_error: attribute_handle_in_error,
error... | 28.270833 | 94 | 0.703758 |
c83a18308321999b5a24822618593880c1834e49 | 267 | ex | Elixir | test/support/mocks/stubs/file.ex | f0lio/edgedb-elixir | b285bd8037b0b951aabfa1d1733889880f8bfd66 | [
"MIT"
] | 30 | 2021-05-19T08:54:44.000Z | 2022-03-11T22:52:25.000Z | test/support/mocks/stubs/file.ex | f0lio/edgedb-elixir | b285bd8037b0b951aabfa1d1733889880f8bfd66 | [
"MIT"
] | 3 | 2021-11-17T21:26:01.000Z | 2022-03-12T09:49:25.000Z | test/support/mocks/stubs/file.ex | f0lio/edgedb-elixir | b285bd8037b0b951aabfa1d1733889880f8bfd66 | [
"MIT"
] | 3 | 2021-08-29T14:55:41.000Z | 2022-03-12T01:30:35.000Z | defmodule Tests.Support.Mocks.Stubs.FileStub do
@behaviour Tests.Support.Mocks.Behaviours.File
defdelegate cwd!(), to: File
defdelegate read!(path), to: File
defdelegate exists?(path, opts \\ []), to: File
defdelegate stat!(path, opts \\ []), to: File
end
| 29.666667 | 49 | 0.707865 |
c83a18b9bb61cef1d57a17f90da67826677ac93e | 112 | ex | Elixir | lib/littlechat/repo.ex | BenBera/littleChatWebrtc | 91850323d0e60c4049a84ff8985b09856b356016 | [
"MIT"
] | 166 | 2020-07-15T14:47:19.000Z | 2022-03-25T03:57:35.000Z | lib/littlechat/repo.ex | BenBera/littleChatWebrtc | 91850323d0e60c4049a84ff8985b09856b356016 | [
"MIT"
] | 12 | 2020-07-01T23:32:47.000Z | 2021-03-18T21:21:28.000Z | lib/littlechat/repo.ex | BenBera/littleChatWebrtc | 91850323d0e60c4049a84ff8985b09856b356016 | [
"MIT"
] | 21 | 2020-07-15T14:59:39.000Z | 2022-03-20T21:05:16.000Z | defmodule Littlechat.Repo do
use Ecto.Repo,
otp_app: :littlechat,
adapter: Ecto.Adapters.Postgres
end
| 18.666667 | 35 | 0.741071 |
c83a204804a456005877b1c51d496536b6b32dd6 | 2,014 | ex | Elixir | clients/retail/lib/google_api/retail/v2/model/google_cloud_retail_v2_set_default_branch_request.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/retail/lib/google_api/retail/v2/model/google_cloud_retail_v2_set_default_branch_request.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/retail/lib/google_api/retail/v2/model/google_cloud_retail_v2_set_default_branch_request.ex | dazuma/elixir-google-api | 6a9897168008efe07a6081d2326735fe332e522c | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 40.28 | 315 | 0.745283 |
c83a5bed29b90929389c7add027ce17b41d78c19 | 1,151 | ex | Elixir | lib/advanced_pool/pool/service_worker_domain_object/service_worker.ex | noizu-labs/SimplePoolAdvanced | 9555071e42917d280c7ce4846c19ef208c77f14e | [
"MIT"
] | null | null | null | lib/advanced_pool/pool/service_worker_domain_object/service_worker.ex | noizu-labs/SimplePoolAdvanced | 9555071e42917d280c7ce4846c19ef208c77f14e | [
"MIT"
] | null | null | null | lib/advanced_pool/pool/service_worker_domain_object/service_worker.ex | noizu-labs/SimplePoolAdvanced | 9555071e42917d280c7ce4846c19ef208c77f14e | [
"MIT"
] | null | null | null | defmodule Noizu.AdvancedPool.ServiceWorker do
defmacro __using__(options \\ nil) do
options = Macro.expand(options, __ENV__)
quote do
use Noizu.DomainObject, unquote(options)
end
end
#--------------------------------------------
# service_worker_entity
#------------------------------------... | 35.96875 | 148 | 0.606429 |
c83a69c2d52388418e0f80efe1e1e6530342a3a7 | 32,114 | ex | Elixir | lib/mix/lib/releases/assembler.ex | dgmcguire/distillery | 137c9b1920ab1d03080d0cfb0fb4835c8a763fbb | [
"MIT"
] | null | null | null | lib/mix/lib/releases/assembler.ex | dgmcguire/distillery | 137c9b1920ab1d03080d0cfb0fb4835c8a763fbb | [
"MIT"
] | null | null | null | lib/mix/lib/releases/assembler.ex | dgmcguire/distillery | 137c9b1920ab1d03080d0cfb0fb4835c8a763fbb | [
"MIT"
] | null | null | null | defmodule Mix.Releases.Assembler do
@moduledoc """
This module is responsible for assembling a release based on a `Mix.Releases.Config`
struct. It creates the release directory, copies applications, and generates release-specific
files required by `:systools` and `:release_handler`.
"""
alias Mix.Releases.C... | 33.875527 | 98 | 0.608956 |
c83a7660b37f6aacb85dae7c2ba9b35f238d3dd4 | 20,606 | exs | Elixir | test/epicenter/auditing_repo_test.exs | geometricservices/epi-viewpoin | ecb5316ea0f3f7299d5ff63e2de588539005ac1c | [
"Apache-2.0"
] | 5 | 2021-02-25T18:43:09.000Z | 2021-02-27T06:00:35.000Z | test/epicenter/auditing_repo_test.exs | geometricservices/epi-viewpoint | ecb5316ea0f3f7299d5ff63e2de588539005ac1c | [
"Apache-2.0"
] | 3 | 2021-12-13T17:52:47.000Z | 2021-12-17T01:35:31.000Z | test/epicenter/auditing_repo_test.exs | geometricservices/epi-viewpoint | ecb5316ea0f3f7299d5ff63e2de588539005ac1c | [
"Apache-2.0"
] | 1 | 2022-01-27T23:26:38.000Z | 2022-01-27T23:26:38.000Z | defmodule Epicenter.AuditingRepoTest do
use Epicenter.DataCase, async: true
import Euclid.Extra.Enum, only: [tids: 1]
alias Epicenter.Accounts
alias Epicenter.AuditingRepo
alias Epicenter.AuditLog
alias Epicenter.AuditLog.Revision
alias Epicenter.Cases
alias Epicenter.Cases.Person
alias Epicenter.Co... | 36.862254 | 148 | 0.643939 |
c83a80e677989d21e9b3b3bd520996281fd470b0 | 772 | ex | Elixir | lib/rrpproxy/client.ex | fbettag/rrpproxy.ex | 37149fe32d8090bc1291e8a51d1200ffaf75c588 | [
"MIT"
] | null | null | null | lib/rrpproxy/client.ex | fbettag/rrpproxy.ex | 37149fe32d8090bc1291e8a51d1200ffaf75c588 | [
"MIT"
] | null | null | null | lib/rrpproxy/client.ex | fbettag/rrpproxy.ex | 37149fe32d8090bc1291e8a51d1200ffaf75c588 | [
"MIT"
] | null | null | null | defmodule RRPproxy.Client do
@moduledoc """
Documentation for `RRPproxy.Client` which holds API credentials.
**It is used for low-level communication and should not be used directly by users of this library.**
"""
@type t() :: %__MODULE__{username: String.t(), password: String.t(), ote: boolean()}
defstruc... | 35.090909 | 102 | 0.656736 |
c83ad3d8a180e7d2a09e0a973f1f5657b0b44f4d | 3,419 | exs | Elixir | test/river/stream_test.exs | peburrows/river | e8968535d02a86e70a7942a690c8e461fed55913 | [
"MIT"
] | 86 | 2016-08-19T21:59:28.000Z | 2022-01-31T20:14:18.000Z | test/river/stream_test.exs | peburrows/river | e8968535d02a86e70a7942a690c8e461fed55913 | [
"MIT"
] | 7 | 2016-09-27T14:44:16.000Z | 2017-08-08T14:57:45.000Z | test/river/stream_test.exs | peburrows/river | e8968535d02a86e70a7942a690c8e461fed55913 | [
"MIT"
] | 4 | 2016-09-26T10:57:24.000Z | 2018-04-03T14:30:19.000Z | defmodule River.StreamTest do
use ExUnit.Case, async: true
require River.FrameTypes
alias River.{Stream, Frame, FrameTypes}
# not sure exactly what we ought to test here...
test "a stream's initial state is :idle" do
assert :idle == %Stream{}.state
end
describe "stream transitions" do
test "from... | 30.256637 | 126 | 0.604563 |
c83adb4834dba37ed92897ebb76612859fe9fa43 | 2,402 | ex | Elixir | lib/serial/uart_handler.ex | FarmBot-Labs/laughing-octo-telegram | 9d3d161362b17da82378c51a815f4c46e0a7a09d | [
"MIT"
] | 2 | 2016-09-18T03:06:37.000Z | 2016-12-26T23:55:40.000Z | lib/serial/uart_handler.ex | FarmBot-Labs/laughing-octo-telegram | 9d3d161362b17da82378c51a815f4c46e0a7a09d | [
"MIT"
] | 3 | 2016-09-30T08:38:15.000Z | 2016-10-01T19:26:10.000Z | lib/serial/uart_handler.ex | FarmBot-Labs/laughing-octo-telegram | 9d3d161362b17da82378c51a815f4c46e0a7a09d | [
"MIT"
] | 5 | 2016-09-30T17:13:42.000Z | 2021-01-06T17:58:15.000Z | defmodule UartHandler do
require Logger
@tty Application.get_env(:uart, :tty)
@baud Application.get_env(:uart, :baud)
defp open_serial(_pid, [], tries) do
Logger.debug("Could not auto detect serial port.")
Logger.debug("I tried: #{inspect tries}")
Process.exit(self(), :kill)
end
defp open_seri... | 27.930233 | 113 | 0.647794 |
c83b07e5b1567af547f6b1eb60878f79d242c33e | 1,944 | ex | Elixir | apps/admin_api/lib/admin_api/v1/controllers/invite_controller.ex | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 322 | 2018-02-28T07:38:44.000Z | 2020-05-27T23:09:55.000Z | apps/admin_api/lib/admin_api/v1/controllers/invite_controller.ex | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 643 | 2018-02-28T12:05:20.000Z | 2020-05-22T08:34:38.000Z | apps/admin_api/lib/admin_api/v1/controllers/invite_controller.ex | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 63 | 2018-02-28T10:57:06.000Z | 2020-05-27T23:10:38.000Z | # Copyright 2018-2019 OmiseGO Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 35.345455 | 103 | 0.680041 |
c83b0e8867f6c213fa98f149d46753a8c6d252f3 | 2,238 | exs | Elixir | mix.exs | MikaAK/request_cache_plug | de5c413b686e4dc71cf2bb7c8784353a404acf32 | [
"MIT"
] | 3 | 2022-03-27T22:42:09.000Z | 2022-03-28T17:50:37.000Z | mix.exs | MikaAK/request_cache_plug | de5c413b686e4dc71cf2bb7c8784353a404acf32 | [
"MIT"
] | null | null | null | mix.exs | MikaAK/request_cache_plug | de5c413b686e4dc71cf2bb7c8784353a404acf32 | [
"MIT"
] | 1 | 2022-03-28T17:48:58.000Z | 2022-03-28T17:48:58.000Z | defmodule RequestCache.MixProject do
use Mix.Project
def project do
[
app: :request_cache_plug,
version: "0.2.0",
elixir: "~> 1.12",
description: "Plug to cache requests declaratively for either GraphQL or Phoenix, this plug is intended to short circuit all json/decoding or parsing a se... | 27.975 | 184 | 0.574173 |
c83b11d3850609247d8c0553d9834c2490e03f83 | 2,261 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/security_policies_aggregated_list_warning.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/security_policies_aggregated_list_warning.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/security_policies_aggregated_list_warning.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 38.322034 | 257 | 0.725785 |
c83b3549236bf368136367721276ef8bbd4f7f4e | 470 | exs | Elixir | test/inspect_test.exs | Cantido/int_set | 9418200e5c15326bee04e4a272a0ff0b5caca9b5 | [
"MIT"
] | 5 | 2019-11-11T17:43:40.000Z | 2021-10-20T05:59:31.000Z | test/inspect_test.exs | Cantido/int_set | 9418200e5c15326bee04e4a272a0ff0b5caca9b5 | [
"MIT"
] | 6 | 2020-11-07T22:55:39.000Z | 2022-02-28T11:05:39.000Z | test/inspect_test.exs | Cantido/int_set | 9418200e5c15326bee04e4a272a0ff0b5caca9b5 | [
"MIT"
] | null | null | null | # SPDX-FileCopyrightText: 2021 Rosa Richter
#
# SPDX-License-Identifier: MIT
defmodule IntSetInspectTest do
use ExUnit.Case, async: true
use ExUnitProperties
describe "Inspect" do
test "inspectable" do
set = IntSet.new([1, 2, 3])
assert inspect(set) == "#IntSet<[1, 2, 3]>"
end
test "in... | 20.434783 | 72 | 0.653191 |
c83b67f3e6adeb4ec754a51e64837a7ed77b3755 | 270 | ex | Elixir | lib/hightopics/repo.ex | a-sac/HighTopics | e99b2cc517d5b552bc7f44aae9774357c8bb427b | [
"MIT"
] | null | null | null | lib/hightopics/repo.ex | a-sac/HighTopics | e99b2cc517d5b552bc7f44aae9774357c8bb427b | [
"MIT"
] | null | null | null | lib/hightopics/repo.ex | a-sac/HighTopics | e99b2cc517d5b552bc7f44aae9774357c8bb427b | [
"MIT"
] | null | null | null | defmodule Hightopics.Repo do
use Ecto.Repo, otp_app: :hightopics
@doc """
Dynamically loads the repository url from the
DATABASE_URL environment variable.
"""
def init(_, opts) do
{:ok, Keyword.put(opts, :url, System.get_env("DATABASE_URL"))}
end
end
| 22.5 | 66 | 0.703704 |
c83bda5bd4de5e82948d7b57ec1c01f4bf1d65dd | 1,030 | ex | Elixir | lib/hexpm/web/views/api/user_view.ex | findmypast/hexfmp | 38a50f5e1057833fd98748faac230bf4b9cc26a3 | [
"Apache-2.0"
] | null | null | null | lib/hexpm/web/views/api/user_view.ex | findmypast/hexfmp | 38a50f5e1057833fd98748faac230bf4b9cc26a3 | [
"Apache-2.0"
] | null | null | null | lib/hexpm/web/views/api/user_view.ex | findmypast/hexfmp | 38a50f5e1057833fd98748faac230bf4b9cc26a3 | [
"Apache-2.0"
] | null | null | null | defmodule Hexpm.Web.API.UserView do
use Hexpm.Web, :view
import Ecto
def render("index." <> _, %{users: users}),
do: render_many(users, __MODULE__, "user")
def render("show." <> _, %{user: user}),
do: render_one(user, __MODULE__, "user")
def render("user", %{user: user}) do
user
|> Map.take(... | 30.294118 | 89 | 0.647573 |
c83c0c2c9f8a64af06eac65ee06a5a6ffaad43dd | 1,130 | exs | Elixir | test/queries/is_selected_test.exs | samueljseay/hound_page_object | 5e21ae6a8ac04d8c3869b82c628e1ae00d5000c8 | [
"MIT"
] | 20 | 2016-07-02T10:10:43.000Z | 2021-01-07T19:03:56.000Z | test/queries/is_selected_test.exs | samueljseay/hound_page_object | 5e21ae6a8ac04d8c3869b82c628e1ae00d5000c8 | [
"MIT"
] | 6 | 2016-12-31T22:31:22.000Z | 2018-06-12T01:00:07.000Z | test/queries/is_selected_test.exs | samueljseay/hound_page_object | 5e21ae6a8ac04d8c3869b82c628e1ae00d5000c8 | [
"MIT"
] | 7 | 2016-09-02T15:07:20.000Z | 2021-09-13T17:09:49.000Z | defmodule IsSelectedPage do
use PageObject
visitable :visit, "http://localhost:4000/index.html"
is_selected? :radio_1_selected?, "#radio-attribute-1"
is_selected? :radio_2_selected?, "#radio-attribute-2"
is_selected? :checkbox_1_selected?, "#checkbox-1"
is_selected? :checkbox_2_selected?, "#checkbox-2"
... | 25.681818 | 68 | 0.765487 |
c83c144297811f5727eb08990a9d855f9ed323d4 | 620 | ex | Elixir | recallr/lib/recallr_web/live/count_live.ex | myfoundea/liveview_march_2021 | 8aef6225271bbc8e9985746505d74dc850f295fb | [
"MIT"
] | null | null | null | recallr/lib/recallr_web/live/count_live.ex | myfoundea/liveview_march_2021 | 8aef6225271bbc8e9985746505d74dc850f295fb | [
"MIT"
] | null | null | null | recallr/lib/recallr_web/live/count_live.ex | myfoundea/liveview_march_2021 | 8aef6225271bbc8e9985746505d74dc850f295fb | [
"MIT"
] | null | null | null | defmodule RecallrWeb.CountLive do
use RecallrWeb, :live_view
alias Recallr.Counter
def mount(_params, _session, socket) do
{:ok, assign(socket, things: "mushrooms fans", count: 42)}
end
def render(assigns) do
~L"""
<%= live_component(@socket, RecallrWeb.HeaderComponent, things: @things) %>
... | 22.962963 | 79 | 0.633871 |
c83c205f139d514e2c2a6b9f7d296a9a6af44e31 | 2,853 | ex | Elixir | lib/sanbase/model/project/list/selector/transform.ex | santiment/sanbase2 | 9ef6e2dd1e377744a6d2bba570ea6bd477a1db31 | [
"MIT"
] | 81 | 2017-11-20T01:20:22.000Z | 2022-03-05T12:04:25.000Z | lib/sanbase/model/project/list/selector/project_list_selector_transform.ex | rmoorman/sanbase2 | 226784ab43a24219e7332c49156b198d09a6dd85 | [
"MIT"
] | 359 | 2017-10-15T14:40:53.000Z | 2022-01-25T13:34:20.000Z | lib/sanbase/model/project/list/selector/project_list_selector_transform.ex | rmoorman/sanbase2 | 226784ab43a24219e7332c49156b198d09a6dd85 | [
"MIT"
] | 16 | 2017-11-19T13:57:40.000Z | 2022-02-07T08:13:02.000Z | defmodule Sanbase.Model.Project.ListSelector.Transform do
import Sanbase.DateTimeUtils
def args_to_filters_combinator(args) do
(get_in(args, [:selector, :filters_combinator]) || "and")
|> to_string()
|> String.downcase()
end
def args_to_base_projects(args) do
case get_in(args, [:selector, :bas... | 25.936364 | 100 | 0.622503 |
c83c248b7cfea4917e4a6ae6bde0aabdc5e610d1 | 3,678 | exs | Elixir | test/ecto/query/builder/order_by_test.exs | marpo60/ecto | 2c2e1b467ec5de87ee41508070f6670288cd2a32 | [
"Apache-2.0"
] | 1 | 2019-05-03T08:51:16.000Z | 2019-05-03T08:51:16.000Z | test/ecto/query/builder/order_by_test.exs | marpo60/ecto | 2c2e1b467ec5de87ee41508070f6670288cd2a32 | [
"Apache-2.0"
] | null | null | null | test/ecto/query/builder/order_by_test.exs | marpo60/ecto | 2c2e1b467ec5de87ee41508070f6670288cd2a32 | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.Query.Builder.OrderByTest do
use ExUnit.Case, async: true
import Ecto.Query.Builder.OrderBy
doctest Ecto.Query.Builder.OrderBy
import Ecto.Query
describe "escape" do
test "handles expressions and params" do
assert {Macro.escape(quote do [asc: &0.y] end), {[], :acc}} ==
... | 41.795455 | 117 | 0.568244 |
c83c5473f86f189fb486ccf27d4a3b4ab2331968 | 744 | ex | Elixir | lib/sentinel/mailer/invite.ex | suranyami/sentinel | aeb421e2e61a4bc14abe89b4a92cb1943a5965fb | [
"MIT"
] | null | null | null | lib/sentinel/mailer/invite.ex | suranyami/sentinel | aeb421e2e61a4bc14abe89b4a92cb1943a5965fb | [
"MIT"
] | null | null | null | lib/sentinel/mailer/invite.ex | suranyami/sentinel | aeb421e2e61a4bc14abe89b4a92cb1943a5965fb | [
"MIT"
] | null | null | null | defmodule Sentinel.Mailer.Invite do
@moduledoc """
Responsible for the creation (and easy override) of the default invitation
email
"""
import Bamboo.Email
import Bamboo.Phoenix
import Sentinel.Mailer
@doc """
Takes a user, and a map containing a confirmation token & password reset
token and retur... | 29.76 | 107 | 0.716398 |
c83c6e2306f6c65bd4ee59dd0fe1e3555551dda1 | 1,755 | ex | Elixir | clients/content/lib/google_api/content/v2/model/pos_store.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/content/lib/google_api/content/v2/model/pos_store.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/content/lib/google_api/content/v2/model/pos_store.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.113208 | 140 | 0.703704 |
c83c77238a9e1e81460f46c5dc7e31a2eebac134 | 126 | exs | Elixir | exercises/02-higher-order-functions/02-goodbye-loops/05-reduce-definition/student.exs | engelenv/distributed-applications | e78693a4ffa22b653e2e840427bcc1704040af4e | [
"BSD-3-Clause"
] | null | null | null | exercises/02-higher-order-functions/02-goodbye-loops/05-reduce-definition/student.exs | engelenv/distributed-applications | e78693a4ffa22b653e2e840427bcc1704040af4e | [
"BSD-3-Clause"
] | null | null | null | exercises/02-higher-order-functions/02-goodbye-loops/05-reduce-definition/student.exs | engelenv/distributed-applications | e78693a4ffa22b653e2e840427bcc1704040af4e | [
"BSD-3-Clause"
] | null | null | null | defmodule Util do
def reduce([], init, f), do: init
def reduce([h|t], init, f) do
reduce(t, f.(h, init), f)
end
end
| 18 | 35 | 0.579365 |
c83c885893c0f08ba5a1c1eccc0cbc283d7cebb5 | 1,483 | ex | Elixir | lib/online_editor/document.ex | zzats/online-editor | 2532315b40c974fe766e960e0b0933773907906d | [
"MIT"
] | null | null | null | lib/online_editor/document.ex | zzats/online-editor | 2532315b40c974fe766e960e0b0933773907906d | [
"MIT"
] | null | null | null | lib/online_editor/document.ex | zzats/online-editor | 2532315b40c974fe766e960e0b0933773907906d | [
"MIT"
] | null | null | null | defmodule OnlineEditor.Document do
@moduledoc """
The text editor document schema. Used for everything in the frontend
"""
use OnlineEditor.Schema
import Ecto.Changeset
alias OnlineEditor.Document
alias OnlineEditor.Folder
alias OnlineEditor.User
schema "documents" do
field(:content, :string, def... | 25.135593 | 70 | 0.661497 |
c83c89e14da3e727f70fb1bc94c36a13a578a6f7 | 59,074 | ex | Elixir | lib/elixir/lib/macro.ex | LaudateCorpus1/elixir | b131f874640775fdf08707d5b2fbbc1e91722cd0 | [
"Apache-2.0"
] | 1 | 2021-11-25T01:48:47.000Z | 2021-11-25T01:48:47.000Z | lib/elixir/lib/macro.ex | LaudateCorpus1/elixir | b131f874640775fdf08707d5b2fbbc1e91722cd0 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/macro.ex | LaudateCorpus1/elixir | b131f874640775fdf08707d5b2fbbc1e91722cd0 | [
"Apache-2.0"
] | 1 | 2021-11-08T10:21:27.000Z | 2021-11-08T10:21:27.000Z | import Kernel, except: [to_string: 1]
defmodule Macro do
@moduledoc ~S"""
Macros are compile-time constructs that are invoked with Elixir's AST
as input and a superset of Elixir's AST as output.
Let's see a simple example that shows the difference between functions and macros:
defmodule Example do
... | 30.751692 | 103 | 0.616346 |
c83c96f58253b85ee3d27034c290fe1373f85a7b | 204 | ex | Elixir | lib/battle_city/tank/level4.ex | clszzyh/battle_city_core | 7a3aca9000b186382f1faf526ebce837a76ef86e | [
"MIT"
] | null | null | null | lib/battle_city/tank/level4.ex | clszzyh/battle_city_core | 7a3aca9000b186382f1faf526ebce837a76ef86e | [
"MIT"
] | 38 | 2020-12-17T12:40:44.000Z | 2022-03-31T02:05:59.000Z | lib/battle_city/tank/level4.ex | clszzyh/battle_city | 7a3aca9000b186382f1faf526ebce837a76ef86e | [
"MIT"
] | null | null | null | defmodule BattleCity.Tank.Level4 do
@moduledoc false
use BattleCity.Tank.Base,
points: 4000,
health: 1,
move_speed: 2,
bullet_speed: 2,
level: 4,
bullet_reinforced?: true
end
| 17 | 35 | 0.671569 |
c83c9bec0623ba7e258f4b0be3ce75de9f402a08 | 1,326 | ex | Elixir | server/lib/server/router.ex | shipperizer/potential-lamp | f280f07f9ab988652fde9ba1defd0f6e15ad7283 | [
"MIT"
] | null | null | null | server/lib/server/router.ex | shipperizer/potential-lamp | f280f07f9ab988652fde9ba1defd0f6e15ad7283 | [
"MIT"
] | null | null | null | server/lib/server/router.ex | shipperizer/potential-lamp | f280f07f9ab988652fde9ba1defd0f6e15ad7283 | [
"MIT"
] | null | null | null | defmodule Server.Router do
@moduledoc """
Documentation for Server.
"""
use Plug.Router
plug Plug.Logger
plug :match
plug :dispatch
get "/api/v1/login" do
conn
|> send_resp(200, "Nothing here")
|> halt
end
post "/api/v1/login" do
{:ok, json, conn} = conn |> Plug.Conn.read_body
... | 25.5 | 97 | 0.565611 |
c83cb5dfc9af6b8153c57de629c58cbfa8bc1d88 | 542 | ex | Elixir | lib/mix/tasks/plextube.server.ex | wisq/plextube | 96984d6e6a114709e563c1dcb7a557fd14d46ef6 | [
"Apache-2.0"
] | 15 | 2017-09-18T12:02:12.000Z | 2022-02-15T00:35:00.000Z | lib/mix/tasks/plextube.server.ex | wisq/plextube | 96984d6e6a114709e563c1dcb7a557fd14d46ef6 | [
"Apache-2.0"
] | null | null | null | lib/mix/tasks/plextube.server.ex | wisq/plextube | 96984d6e6a114709e563c1dcb7a557fd14d46ef6 | [
"Apache-2.0"
] | 2 | 2017-09-21T20:17:49.000Z | 2020-04-12T12:21:42.000Z | defmodule Mix.Tasks.Plextube.Server do
use Mix.Task
@shortdoc "Launch the PlexTube server"
def run([ip, port]) do
Application.put_env(:plextube, :bind_to_ip, ip)
run([port])
end
def run([port]) do
Application.put_env(:plextube, :bind_to_port, port |> String.to_integer)
run([])
end
def ru... | 19.357143 | 76 | 0.623616 |
c83d091a6cce4c29bad3733c9b0d42b955120d94 | 1,311 | exs | Elixir | test/bufu/resource_test.exs | paulfri/bufu | 735e80c188408deec146344a90ed7830416d1fbe | [
"MIT"
] | null | null | null | test/bufu/resource_test.exs | paulfri/bufu | 735e80c188408deec146344a90ed7830416d1fbe | [
"MIT"
] | null | null | null | test/bufu/resource_test.exs | paulfri/bufu | 735e80c188408deec146344a90ed7830416d1fbe | [
"MIT"
] | null | null | null | defmodule BufuTest.Resource do
use ExUnit.Case
use ExVCR.Mock
import TestHelpers.ResourceHelper
test_resource Bufu.Accessory, id: 1, name: "DualShock Controller"
test_resource Bufu.Character, id: 6115, name: "Chie Satonaka"
test_resource Bufu.Company, id: 442, name: "Atlus Co., Ltd."
test_resource Bufu.C... | 48.555556 | 81 | 0.735317 |
c83d576c608e4194d5ec13e5dc2b823c1236744b | 222 | exs | Elixir | priv/repo/migrations/20180322165819_drop_auth_application.exs | leonardocouy/accent | 29fb324395ff998cc5cdc6947c60070ffabe647c | [
"BSD-3-Clause"
] | null | null | null | priv/repo/migrations/20180322165819_drop_auth_application.exs | leonardocouy/accent | 29fb324395ff998cc5cdc6947c60070ffabe647c | [
"BSD-3-Clause"
] | null | null | null | priv/repo/migrations/20180322165819_drop_auth_application.exs | leonardocouy/accent | 29fb324395ff998cc5cdc6947c60070ffabe647c | [
"BSD-3-Clause"
] | null | null | null | defmodule Accent.Repo.Migrations.DropAuthApplication do
use Ecto.Migration
def change do
alter table(:auth_access_tokens) do
remove :auth_application_id
end
drop table(:auth_applications)
end
end
| 18.5 | 55 | 0.752252 |
c83dd92d101770292d519e3f207606cb594b0032 | 1,205 | ex | Elixir | lib/level/users/reservation.ex | pradyumna2905/level | 186878a128521074923edd7171eda2f1b181b4f4 | [
"Apache-2.0"
] | null | null | null | lib/level/users/reservation.ex | pradyumna2905/level | 186878a128521074923edd7171eda2f1b181b4f4 | [
"Apache-2.0"
] | null | null | null | lib/level/users/reservation.ex | pradyumna2905/level | 186878a128521074923edd7171eda2f1b181b4f4 | [
"Apache-2.0"
] | null | null | null | defmodule Level.Users.Reservation do
@moduledoc """
The Reservation schema.
"""
use Ecto.Schema
import Ecto.Changeset
import Level.Gettext
alias Level.Users
alias Level.Users.User
@type t :: %__MODULE__{}
@primary_key {:id, :binary_id, autogenerate: true}
@foreign_key_type :binary_id
schema ... | 23.173077 | 83 | 0.641494 |
c83ddeb8c5c4476ecf99a3086bd7d61984364817 | 7,485 | ex | Elixir | lib/zones/zone.ex | pringlized/Elber | 81394ad29b7a67ac9b8d3e249cde252ec5c44697 | [
"MIT"
] | 1 | 2019-06-20T07:06:16.000Z | 2019-06-20T07:06:16.000Z | lib/zones/zone.ex | pringlized/Elber | 81394ad29b7a67ac9b8d3e249cde252ec5c44697 | [
"MIT"
] | null | null | null | lib/zones/zone.ex | pringlized/Elber | 81394ad29b7a67ac9b8d3e249cde252ec5c44697 | [
"MIT"
] | null | null | null | defmodule Elber.Zones.Zone do
@moduledoc """
Zone Dispatch
"""
use GenServer
require Logger
alias Elber.Zones.Utils
def start_link(name, zone_struct) do
zone_name = via_tuple(name)
GenServer.start_link(__MODULE__, [zone_struct, name], name: zone_name)
end
def stop(z... | 30.55102 | 94 | 0.592385 |
c83e35207a826c3e0b23a7f3002ff9a32da0faa9 | 317 | exs | Elixir | priv/repo/migrations/20210607005318_create_columns.exs | devandcoffee/movekr-be | bff1690e22daec9a545ca7b69495cb928d68c0a5 | [
"MIT"
] | null | null | null | priv/repo/migrations/20210607005318_create_columns.exs | devandcoffee/movekr-be | bff1690e22daec9a545ca7b69495cb928d68c0a5 | [
"MIT"
] | null | null | null | priv/repo/migrations/20210607005318_create_columns.exs | devandcoffee/movekr-be | bff1690e22daec9a545ca7b69495cb928d68c0a5 | [
"MIT"
] | null | null | null | defmodule Movekr.Repo.Migrations.CreateColumns do
use Ecto.Migration
def change do
create table(:columns) do
add :name, :string
add :order, :integer
add :project_id, references(:projects, on_delete: :nothing)
timestamps()
end
create index(:columns, [:project_id])
end
end
| 19.8125 | 65 | 0.671924 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.