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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
911010c9ad87a0822c1661ee5e19d9c00f813cfa | 286 | ex | Elixir | apps/summoner_backend/lib/summoner_backend.ex | making3/summoner_alerts | fda7a43cab0e2022a90e8fe3d766f95628d9ac00 | [
"MIT"
] | null | null | null | apps/summoner_backend/lib/summoner_backend.ex | making3/summoner_alerts | fda7a43cab0e2022a90e8fe3d766f95628d9ac00 | [
"MIT"
] | null | null | null | apps/summoner_backend/lib/summoner_backend.ex | making3/summoner_alerts | fda7a43cab0e2022a90e8fe3d766f95628d9ac00 | [
"MIT"
] | null | null | null | require Poison
require ExReddit
require ExRedditTagger
defmodule SummonerBackend do
use Application
@moduledoc """
Documentation for SummonerBackend.
"""
def start(_, _) do
IO.puts "starting"
SummonerBackend.Supervisor.start_link(name: ServiceSupervisor)
end
end
| 16.823529 | 66 | 0.758741 |
911014448511d51005397dbaae359514a4fa82f2 | 3,088 | ex | Elixir | lib/match_engine/query.ex | 4bakker/match_engine | e8f0fce456b43508382e4044ddadf57b020d2156 | [
"MIT"
] | 4 | 2019-10-08T10:01:51.000Z | 2020-11-13T09:12:20.000Z | lib/match_engine/query.ex | 4bakker/match_engine | e8f0fce456b43508382e4044ddadf57b020d2156 | [
"MIT"
] | null | null | null | lib/match_engine/query.ex | 4bakker/match_engine | e8f0fce456b43508382e4044ddadf57b020d2156 | [
"MIT"
] | 1 | 2021-08-03T12:59:34.000Z | 2021-08-03T12:59:34.000Z | defmodule MatchEngine.Query do
@moduledoc false
@leaf_operators ~w(_eq _regex _sim _in _ne _nin _geo _time _lt _lte _gt _gte)a
@logic_operators ~w(_and _or _not)a
def leaf_operators do
@leaf_operators
end
def preprocess(q) when is_map(q) do
q |> query_map_to_list() |> preprocess()
end
def pr... | 25.520661 | 98 | 0.632124 |
911020254539a25262dd690e3e68865d3313ceac | 930 | exs | Elixir | test/mock_lock_test.exs | edwardzhou/exvcr | 0d1e0ab702c9caca74bcbbe4dd7f4894cb8816cd | [
"MIT"
] | 608 | 2015-01-05T18:44:49.000Z | 2022-03-21T19:54:01.000Z | test/mock_lock_test.exs | edwardzhou/exvcr | 0d1e0ab702c9caca74bcbbe4dd7f4894cb8816cd | [
"MIT"
] | 165 | 2015-01-04T13:01:01.000Z | 2022-03-16T08:31:48.000Z | test/mock_lock_test.exs | edwardzhou/exvcr | 0d1e0ab702c9caca74bcbbe4dd7f4894cb8816cd | [
"MIT"
] | 130 | 2015-01-28T19:33:21.000Z | 2022-02-08T22:21:43.000Z | defmodule ExVCR.MockLockTest do
use ExUnit.Case, async: true
test ":do_request_lock polls until lock is released" do
caller_pid = self()
test_pid = self()
other_caller_pid = "fake_pid"
state = %{lock_holder: other_caller_pid}
{:noreply, _new_state, _timeout} =
ExVCR.MockLock.handle_info(... | 31 | 82 | 0.691398 |
91103a8942e853a7131d58a5d3381361129130b4 | 1,023 | exs | Elixir | config/config.exs | appcues/ex_json_schema | 3d4abf8a17bb803ab9ec2840c89f1f2bfda16d26 | [
"MIT"
] | null | null | null | config/config.exs | appcues/ex_json_schema | 3d4abf8a17bb803ab9ec2840c89f1f2bfda16d26 | [
"MIT"
] | 1 | 2019-09-24T17:50:02.000Z | 2019-09-24T23:05:46.000Z | config/config.exs | appcues/ex_json_schema | 3d4abf8a17bb803ab9ec2840c89f1f2bfda16d26 | [
"MIT"
] | 1 | 2019-07-16T19:13:21.000Z | 2019-07-16T19:13:21.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... | 40.92 | 73 | 0.747801 |
911046a04b563d1ced117eac871988768894e5a0 | 2,067 | ex | Elixir | clients/firebase/lib/google_api/firebase/v1beta1/model/analytics_property.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/firebase/lib/google_api/firebase/v1beta1/model/analytics_property.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/firebase/lib/google_api/firebase/v1beta1/model/analytics_property.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.637931 | 130 | 0.726173 |
9110afa84b19b91148328ede255d5c5ddea8ad92 | 1,263 | ex | Elixir | lib/portal_web/views/error_helpers.ex | auth0-samples/auth0-elixir-single-page-app | 05c344e828ecf5ac716c5537b0e5760571f0574f | [
"MIT"
] | 6 | 2018-07-12T20:50:21.000Z | 2021-04-10T19:53:10.000Z | lib/portal_web/views/error_helpers.ex | auth0-samples/auth0-elixir-single-page-app | 05c344e828ecf5ac716c5537b0e5760571f0574f | [
"MIT"
] | null | null | null | lib/portal_web/views/error_helpers.ex | auth0-samples/auth0-elixir-single-page-app | 05c344e828ecf5ac716c5537b0e5760571f0574f | [
"MIT"
] | 2 | 2018-01-30T22:52:01.000Z | 2018-02-05T12:55:28.000Z | defmodule PortalWeb.ErrorHelpers do
@moduledoc """
Conveniences for translating and building error messages.
"""
use Phoenix.HTML
@doc """
Generates tag for inlined form input errors.
"""
def error_tag(form, field) do
Enum.map(Keyword.get_values(form.errors, field), fn (error) ->
content_tag... | 30.804878 | 75 | 0.669834 |
9110b8472b8639793ded1e89e922b62aafe51e24 | 9,785 | ex | Elixir | lib/surface.ex | yusufyildirim/surface | 1cacafa275ec7fefa862af7fd86794a400652e9d | [
"MIT"
] | null | null | null | lib/surface.ex | yusufyildirim/surface | 1cacafa275ec7fefa862af7fd86794a400652e9d | [
"MIT"
] | null | null | null | lib/surface.ex | yusufyildirim/surface | 1cacafa275ec7fefa862af7fd86794a400652e9d | [
"MIT"
] | null | null | null | defmodule Surface do
@moduledoc """
Surface is component based library for **Phoenix LiveView**.
Built on top of the new `Phoenix.LiveComponent` API, Surface provides
a more declarative way to express and use components in Phoenix.
Full documentation and live examples can be found at [surface-ui.org](https:... | 26.374663 | 124 | 0.620644 |
9110ef6d09e1b08b6876b96dc3b2ce5511fa9b37 | 51,021 | ex | Elixir | lib/ash/actions/managed_relationships.ex | michaelst/ash | 650b256b2a4396cf068ca31d5364e43fa3c10032 | [
"MIT"
] | null | null | null | lib/ash/actions/managed_relationships.ex | michaelst/ash | 650b256b2a4396cf068ca31d5364e43fa3c10032 | [
"MIT"
] | null | null | null | lib/ash/actions/managed_relationships.ex | michaelst/ash | 650b256b2a4396cf068ca31d5364e43fa3c10032 | [
"MIT"
] | null | null | null | defmodule Ash.Actions.ManagedRelationships do
@moduledoc false
alias Ash.Error.Changes.InvalidRelationship
alias Ash.Error.Query.NotFound
require Ash.Query
def load(_api, created, %{relationships: rels}, _) when rels == %{},
do: {:ok, created}
def load(_api, created, %{relationships: nil}, _), do: {... | 31.110366 | 102 | 0.499618 |
911114d9b4fd0c64fc9eeeca4671255ada66a712 | 1,519 | ex | Elixir | clients/firebase_ml/lib/google_api/firebase_ml/v1/model/empty.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/firebase_ml/lib/google_api/firebase_ml/v1/model/empty.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/firebase_ml/lib/google_api/firebase_ml/v1/model/empty.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 36.166667 | 345 | 0.756419 |
91111a5f664d2798f2e6848f30ee86422564e7e3 | 23,484 | ex | Elixir | clients/content/lib/google_api/content/v2/api/shippingsettings.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/api/shippingsettings.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/api/shippingsettings.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... | 44.646388 | 236 | 0.619741 |
91114e35db4a18e5e3947fe2aca6b9053d454d38 | 279 | exs | Elixir | socket_gallows/config/test.exs | jeethridge/elixir-hangman | ff1202fd1f54cad887180c900670306a20fe4339 | [
"Unlicense"
] | null | null | null | socket_gallows/config/test.exs | jeethridge/elixir-hangman | ff1202fd1f54cad887180c900670306a20fe4339 | [
"Unlicense"
] | null | null | null | socket_gallows/config/test.exs | jeethridge/elixir-hangman | ff1202fd1f54cad887180c900670306a20fe4339 | [
"Unlicense"
] | 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 :socket_gallows, SocketGallowsWeb.Endpoint,
http: [port: 4002],
server: false
# Print only warnings and errors during test
config :logger, level: :warn
| 25.363636 | 56 | 0.749104 |
91117b333db90f583781f565e5143718411d444e | 405 | ex | Elixir | lib/resolve.ex | abetkin/paths_and_deps | 30171d15d38a9c6cac7c97ff6bcdb8d9e969b35b | [
"MIT"
] | null | null | null | lib/resolve.ex | abetkin/paths_and_deps | 30171d15d38a9c6cac7c97ff6bcdb8d9e969b35b | [
"MIT"
] | null | null | null | lib/resolve.ex | abetkin/paths_and_deps | 30171d15d38a9c6cac7c97ff6bcdb8d9e969b35b | [
"MIT"
] | null | null | null |
defmodule Resolve do
# defstruct [:mod, :get_deps]
def get_layers(modules, records, get_deps) do
{leaves, branches} = Enum.split_with(modules, fn m ->
List.size(get_deps.(m)) == 0
end)
new_modules = for b <- branches, do:
get_deps.(b)
|> List.flatten
{num, _} = List.last(records... | 23.823529 | 68 | 0.617284 |
9111a3883418723b4b1d0fe16b3034c91aa7ab3e | 8,748 | exs | Elixir | src/server/test/game/action/token_test.exs | pedromykul/csb-wonhu1 | 5fe81fbc99d2b9859fbdb3c87c23e788264c0b9c | [
"MIT"
] | null | null | null | src/server/test/game/action/token_test.exs | pedromykul/csb-wonhu1 | 5fe81fbc99d2b9859fbdb3c87c23e788264c0b9c | [
"MIT"
] | null | null | null | src/server/test/game/action/token_test.exs | pedromykul/csb-wonhu1 | 5fe81fbc99d2b9859fbdb3c87c23e788264c0b9c | [
"MIT"
] | null | null | null | defmodule Game.Action.TokenTest do
use ExUnit.Case
alias Game.{
Player,
Action,
Dice,
Dice.Face
}
describe "steal_tokens/1" do
test "when opponent has sufficient tokens to steal" do
game = %Game{
players: %{
1 => %Player{
tokens: 0,
dices: %{... | 29.856655 | 91 | 0.461477 |
9111b06cc5fc1540f311e6b208c6de5e35446230 | 4,499 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/policy.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/compute/lib/google_api/compute/v1/model/policy.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/policy.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 ... | 56.2375 | 554 | 0.720605 |
9111c35215adabb88edbbba910fc74187e7f232c | 590 | exs | Elixir | bench/mix.exs | davorbadrov/memoize | dd34c313de805e57da18c4e6142247cc8eb1ba6a | [
"MIT"
] | null | null | null | bench/mix.exs | davorbadrov/memoize | dd34c313de805e57da18c4e6142247cc8eb1ba6a | [
"MIT"
] | null | null | null | bench/mix.exs | davorbadrov/memoize | dd34c313de805e57da18c4e6142247cc8eb1ba6a | [
"MIT"
] | null | null | null | defmodule Bench.Mixfile do
use Mix.Project
def project do
[
app: :bench,
version: "0.1.0",
elixir: "~> 1.5",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applicatio... | 18.4375 | 59 | 0.525424 |
9111cc169f14a74d668787dd5855bc47dba3755d | 5,854 | ex | Elixir | clients/my_business_lodging/lib/google_api/my_business_lodging/v1/model/living_area_accessibility.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/my_business_lodging/lib/google_api/my_business_lodging/v1/model/living_area_accessibility.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/my_business_lodging/lib/google_api/my_business_lodging/v1/model/living_area_accessibility.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... | 63.630435 | 396 | 0.739324 |
911205df2b961018ae0798bac4715a5169fc96d6 | 1,365 | ex | Elixir | lib/searchex/config/fetch.ex | andyl/searchex | aae186cddd14f0415b116fca198b8cc95eb2c379 | [
"MIT"
] | 91 | 2016-11-22T23:52:01.000Z | 2022-02-12T13:06:24.000Z | lib/searchex/config/fetch.ex | andyl/searchex | aae186cddd14f0415b116fca198b8cc95eb2c379 | [
"MIT"
] | 11 | 2016-11-23T17:37:57.000Z | 2018-03-07T13:40:48.000Z | lib/searchex/config/fetch.ex | andyl/searchex | aae186cddd14f0415b116fca198b8cc95eb2c379 | [
"MIT"
] | 9 | 2016-11-24T01:44:40.000Z | 2020-05-15T04:16:19.000Z | defmodule Searchex.Config.Fetch do
@moduledoc false
import Searchex.Config.CfgValidations
def exec(repo) do
case check_validations(validation_list(repo)) do
{:error, msgs} -> {:error, msgs}
{:ok} -> clone(repo)
end
end
# -----
defp validation_list(repo) do
[
missi... | 23.947368 | 100 | 0.5663 |
911245fc94f5416d3a31a509e8355b4e1d6aebfc | 8,266 | ex | Elixir | lib/aws/generated/ebs.ex | salemove/aws-elixir | debdf6482158a71a57636ac664c911e682093395 | [
"Apache-2.0"
] | null | null | null | lib/aws/generated/ebs.ex | salemove/aws-elixir | debdf6482158a71a57636ac664c911e682093395 | [
"Apache-2.0"
] | null | null | null | lib/aws/generated/ebs.ex | salemove/aws-elixir | debdf6482158a71a57636ac664c911e682093395 | [
"Apache-2.0"
] | null | null | null | # WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
# See https://github.com/aws-beam/aws-codegen for more details.
defmodule AWS.EBS do
@moduledoc """
You can use the Amazon Elastic Block Store (Amazon EBS) direct APIs to create
EBS snapshots, write data directly to your snapshots, read data on your
snapshots, and i... | 27.190789 | 143 | 0.639124 |
911247baf7f20068d60a34d2373c4c63ce496ec1 | 373 | exs | Elixir | priv/repo/migrations/20201222221553_create_uploader_ids.exs | V-Sekai/uro | 0b23da65d5c7e459efcd6b2c3d9bdf91c533b737 | [
"MIT"
] | 1 | 2022-01-11T04:05:39.000Z | 2022-01-11T04:05:39.000Z | priv/repo/migrations/20201222221553_create_uploader_ids.exs | V-Sekai/uro | 0b23da65d5c7e459efcd6b2c3d9bdf91c533b737 | [
"MIT"
] | 35 | 2021-02-10T08:18:57.000Z | 2021-05-06T17:19:50.000Z | priv/repo/migrations/20201222221553_create_uploader_ids.exs | V-Sekai/uro | 0b23da65d5c7e459efcd6b2c3d9bdf91c533b737 | [
"MIT"
] | null | null | null | defmodule Uro.Repo.Migrations.CreateUploaderIds do
use Ecto.Migration
def change do
alter table(:avatars) do
add :uploader_id, references(:users, type: :uuid)
end
alter table(:maps) do
add :uploader_id, references(:users, type: :uuid)
end
alter table(:props) do
add :uploader_i... | 23.3125 | 55 | 0.670241 |
911265fb707438f088c377552ee78429a4f67650 | 666 | ex | Elixir | distributed_experiments/remote_tasks/apps/frontend/lib/frontend/application.ex | toff63/elixir-sandbox | ac63f839b97ccb7a11e07fb1e505b7cd24e19cb3 | [
"Apache-2.0"
] | null | null | null | distributed_experiments/remote_tasks/apps/frontend/lib/frontend/application.ex | toff63/elixir-sandbox | ac63f839b97ccb7a11e07fb1e505b7cd24e19cb3 | [
"Apache-2.0"
] | null | null | null | distributed_experiments/remote_tasks/apps/frontend/lib/frontend/application.ex | toff63/elixir-sandbox | ac63f839b97ccb7a11e07fb1e505b7cd24e19cb3 | [
"Apache-2.0"
] | null | null | null | defmodule Frontend.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
children = children(node())
# See https://hexdocs.pm/elixir/Supervisor.html
# for other strategies and suppor... | 22.965517 | 62 | 0.666667 |
9112dafd2b5c0233b0f3ecd2b48cbe93198b2de0 | 1,226 | exs | Elixir | config/config.exs | W1ntersnow/kv_storage | 85829cd8ba62967cab7a4b8e1dfa889757bbee68 | [
"MIT"
] | null | null | null | config/config.exs | W1ntersnow/kv_storage | 85829cd8ba62967cab7a4b8e1dfa889757bbee68 | [
"MIT"
] | null | null | null | config/config.exs | W1ntersnow/kv_storage | 85829cd8ba62967cab7a4b8e1dfa889757bbee68 | [
"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... | 32.263158 | 73 | 0.744698 |
91132e4f04cb6148227955ae3c79e98436fe9d0f | 2,136 | ex | Elixir | vivaldi/lib/peer/connections.ex | pixyj/vivaldi | 771f8d84eae9ad285b3b4f92de832b9a165d17fa | [
"MIT"
] | 13 | 2017-02-06T11:37:22.000Z | 2022-01-31T20:09:27.000Z | vivaldi/lib/peer/connections.ex | pixyj/vivaldi | 771f8d84eae9ad285b3b4f92de832b9a165d17fa | [
"MIT"
] | null | null | null | vivaldi/lib/peer/connections.ex | pixyj/vivaldi | 771f8d84eae9ad285b3b4f92de832b9a165d17fa | [
"MIT"
] | 1 | 2020-02-26T13:44:12.000Z | 2020-02-26T13:44:12.000Z | defmodule Vivaldi.Peer.Connections do
@moduledoc """
* Establishes connection with peers before pinging.
"""
use GenServer
require Logger
alias Vivaldi.Peer.PingServer
@connection_setup_timeout 30_000
# API
def start_link(config) do
node_id = config[:node_id]
GenServer.start_link(__MOD... | 27.384615 | 98 | 0.664794 |
911379b8e26d2d57315e3104bd875c70166ee05c | 20,664 | ex | Elixir | clients/you_tube_reporting/lib/google_api/you_tube_reporting/v1/api/jobs.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/you_tube_reporting/lib/google_api/you_tube_reporting/v1/api/jobs.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/you_tube_reporting/lib/google_api/you_tube_reporting/v1/api/jobs.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 48.966825 | 249 | 0.627565 |
91137d7825dd80ca3991e1ad05798b945e06dfcc | 6,822 | ex | Elixir | lib/cforum/notifications.ex | multitain/cforum_ex | 95634a547893f5392345b173f3c264b149e2b124 | [
"MIT"
] | 16 | 2019-04-04T06:33:33.000Z | 2021-08-16T19:34:31.000Z | lib/cforum/notifications.ex | multitain/cforum_ex | 95634a547893f5392345b173f3c264b149e2b124 | [
"MIT"
] | 294 | 2019-02-10T11:10:27.000Z | 2022-03-30T04:52:53.000Z | lib/cforum/notifications.ex | multitain/cforum_ex | 95634a547893f5392345b173f3c264b149e2b124 | [
"MIT"
] | 10 | 2019-02-10T10:39:24.000Z | 2021-07-06T11:46:05.000Z | defmodule Cforum.Notifications do
@moduledoc """
The boundary for the Accounts system.
"""
import Ecto.Query, warn: false
alias Cforum.Repo
alias Cforum.Notifications.Notification
alias Cforum.Caching
alias Cforum.Users.User
def discard_unread_cache({:ok, notification}) do
Caching.del(:cforum, ... | 26.544747 | 118 | 0.682058 |
9113a63cb8a8e360727fda563cc0b06b60496b06 | 354 | exs | Elixir | installer/templates/phx_test/live/page_live_test.exs | nickurban/phoenix | 116a0d4660248a09886e80da5e36dc6e395723d5 | [
"MIT"
] | 7 | 2021-01-31T04:51:08.000Z | 2022-01-09T06:59:28.000Z | installer/templates/phx_test/live/page_live_test.exs | nickurban/phoenix | 116a0d4660248a09886e80da5e36dc6e395723d5 | [
"MIT"
] | 2 | 2022-02-19T07:30:25.000Z | 2022-02-27T14:12:26.000Z | installer/templates/phx_test/live/page_live_test.exs | nickurban/phoenix | 116a0d4660248a09886e80da5e36dc6e395723d5 | [
"MIT"
] | 2 | 2021-02-06T08:40:23.000Z | 2021-03-20T16:35:47.000Z | defmodule <%= @web_namespace %>.PageLiveTest do
use <%= @web_namespace %>.ConnCase
import Phoenix.LiveViewTest
test "disconnected and connected render", %{conn: conn} do
{:ok, page_live, disconnected_html} = live(conn, "/")
assert disconnected_html =~ "Welcome to Phoenix!"
assert render(page_live) =... | 29.5 | 60 | 0.69774 |
9113abd5b0a79e9d322b744a2d921eccb3e17146 | 251 | ex | Elixir | apps/service_acquire/lib/acquire.ex | kennyatpillar/hindsight | e90e2150a14218e5d6fdf5874f57eb055fd2dd07 | [
"Apache-2.0"
] | null | null | null | apps/service_acquire/lib/acquire.ex | kennyatpillar/hindsight | e90e2150a14218e5d6fdf5874f57eb055fd2dd07 | [
"Apache-2.0"
] | null | null | null | apps/service_acquire/lib/acquire.ex | kennyatpillar/hindsight | e90e2150a14218e5d6fdf5874f57eb055fd2dd07 | [
"Apache-2.0"
] | null | null | null | defmodule Acquire do
@moduledoc """
Acquire keeps the contexts that define your domain
and business logic.
Contexts are also responsible for managing your data, regardless
if it comes from the database, an external API or others.
"""
end
| 25.1 | 66 | 0.752988 |
9113dcbf14e41cdf8f8221b2d686f94dbf936c51 | 900 | ex | Elixir | lib/mastani_server/cms/video_comment_dislike.ex | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | 1 | 2019-05-07T15:03:54.000Z | 2019-05-07T15:03:54.000Z | lib/mastani_server/cms/video_comment_dislike.ex | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | null | null | null | lib/mastani_server/cms/video_comment_dislike.ex | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | null | null | null | defmodule MastaniServer.CMS.VideoCommentDislike do
@moduledoc false
alias __MODULE__
use Ecto.Schema
import Ecto.Changeset
alias MastaniServer.Accounts
alias MastaniServer.CMS.VideoComment
@required_fields ~w(video_comment_id user_id)a
@type t :: %VideoCommentDislike{}
schema "videos_comments_disli... | 30 | 98 | 0.774444 |
9113ddc55681d42587f564a84bc73fe11c712c17 | 2,645 | exs | Elixir | test/controllers/user_controller_test.exs | chrisfishwood/shopping_list | 4ac312ac3e70e901ae8ff09814c5cc1763132a80 | [
"MIT"
] | null | null | null | test/controllers/user_controller_test.exs | chrisfishwood/shopping_list | 4ac312ac3e70e901ae8ff09814c5cc1763132a80 | [
"MIT"
] | null | null | null | test/controllers/user_controller_test.exs | chrisfishwood/shopping_list | 4ac312ac3e70e901ae8ff09814c5cc1763132a80 | [
"MIT"
] | null | null | null | defmodule ShoppingList.UserControllerTest do
use ShoppingList.ConnCase
alias ShoppingList.User
@valid_attrs %{email: "chrisfishwood@gmail.com", password: "somepassword"}
@invalid_attrs %{email: nil}
setup do
changeset = User.changeset(%User{}, @valid_attrs)
{:ok, user} = Repo.insert(changeset)
c... | 36.232877 | 110 | 0.681664 |
911423a292f9436e609a05316a59312c84261187 | 395 | ex | Elixir | lib/distancia/hamming.ex | walerian777/distanco | e73e9d4f4d9a8821ac5028537a4d7237ed587cad | [
"MIT"
] | 2 | 2017-12-09T15:10:40.000Z | 2017-12-09T15:40:44.000Z | lib/distancia/hamming.ex | walerian777/distancia | e73e9d4f4d9a8821ac5028537a4d7237ed587cad | [
"MIT"
] | null | null | null | lib/distancia/hamming.ex | walerian777/distancia | e73e9d4f4d9a8821ac5028537a4d7237ed587cad | [
"MIT"
] | null | null | null | defmodule Distancia.Hamming do
@moduledoc false
@behaviour Distancia.Metric
alias Distancia.Utils.Parser
alias Distancia.Utils.Validator
def calculate(p, q) do
[p, q]
|> Validator.validate!()
|> Parser.map_to_lists()
|> Enum.zip()
|> Enum.reduce(0, fn {a, b}, acc ->
case a === b do... | 18.809524 | 39 | 0.587342 |
911458f54e3842123c1492fbc32e9f7510affa91 | 63 | ex | Elixir | apps/website/lib/website_web/views/layout_view.ex | gregredhead/belethor | 255925396b18ba4a6950f386abf8a9e17a7e5e7c | [
"Apache-2.0"
] | 3 | 2018-07-20T22:14:36.000Z | 2018-12-21T19:54:48.000Z | apps/website/lib/website_web/views/layout_view.ex | gregredhead/belethor | 255925396b18ba4a6950f386abf8a9e17a7e5e7c | [
"Apache-2.0"
] | 36 | 2018-09-15T21:46:54.000Z | 2020-03-28T16:10:18.000Z | apps/website/lib/website_web/views/layout_view.ex | gregredhead/belethor | 255925396b18ba4a6950f386abf8a9e17a7e5e7c | [
"Apache-2.0"
] | 2 | 2018-07-22T08:47:07.000Z | 2021-12-11T01:39:19.000Z | defmodule WebsiteWeb.LayoutView do
use WebsiteWeb, :view
end
| 15.75 | 34 | 0.809524 |
911463e4360fad0a7683e192c34da4a2d2e28a0f | 497 | ex | Elixir | ros/ros_ui_runner/lib/ros_ui_runner_web/views/error_view.ex | kujua/elixir-handbook | 4185ad8da7f652fdb59c799dc58bcb33fda10475 | [
"Apache-2.0"
] | 1 | 2019-07-01T18:47:28.000Z | 2019-07-01T18:47:28.000Z | ros/ros_ui_runner/lib/ros_ui_runner_web/views/error_view.ex | kujua/elixir-handbook | 4185ad8da7f652fdb59c799dc58bcb33fda10475 | [
"Apache-2.0"
] | 4 | 2020-07-17T16:57:18.000Z | 2021-05-09T23:50:52.000Z | ros/ros_ui_runner/lib/ros_ui_runner_web/views/error_view.ex | kujua/elixir-handbook | 4185ad8da7f652fdb59c799dc58bcb33fda10475 | [
"Apache-2.0"
] | null | null | null | defmodule Ros.RunnerWeb.ErrorView do
use Ros.RunnerWeb, :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 templat... | 29.235294 | 61 | 0.734406 |
9114a62d1376e526f9707807abbcccced5cd3e14 | 1,738 | ex | Elixir | clients/android_enterprise/lib/google_api/android_enterprise/v1/model/entitlements_list_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/android_enterprise/lib/google_api/android_enterprise/v1/model/entitlements_list_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/android_enterprise/lib/google_api/android_enterprise/v1/model/entitlements_list_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... | 36.978723 | 269 | 0.756041 |
9114ba6c9730c24111f95ef1ca41af32d2cba155 | 573 | exs | Elixir | Elixir/fizzbuzz.exs | capturemathan/Fizz-Buzz | 9d965ccb70b62ec930cd7f07a2fd8fb637ac8b2f | [
"MIT"
] | 10 | 2020-10-02T14:58:12.000Z | 2020-10-10T16:29:08.000Z | Elixir/fizzbuzz.exs | capturemathan/Fizz-Buzz | 9d965ccb70b62ec930cd7f07a2fd8fb637ac8b2f | [
"MIT"
] | 45 | 2020-10-02T12:13:37.000Z | 2020-12-23T14:27:15.000Z | Elixir/fizzbuzz.exs | capturemathan/Fizz-Buzz | 9d965ccb70b62ec930cd7f07a2fd8fb637ac8b2f | [
"MIT"
] | 105 | 2020-10-02T12:20:20.000Z | 2020-10-17T15:46:14.000Z | defmodule FizzBuzz do
def count_to(number) when is_integer(number) do
Enum.each(1..number, &fizz_buzz/1)
end
defp fizz_buzz(number) when rem(number, 15) == 0, do: IO.puts("FizzBuzz")
defp fizz_buzz(number) when rem(number, 5) == 0, do: IO.puts("Buzz")
defp fizz_buzz(number) when rem(number,... | 35.8125 | 79 | 0.696335 |
9114bcf7acf9839bcca9fe335780502731f861ae | 8,088 | ex | Elixir | lib/my_sensors/context.ex | ConnorRigby/my_sensors | 25296a7e5629b58462576f7c8042bb15c1a0f7e7 | [
"MIT"
] | 6 | 2018-02-21T21:13:24.000Z | 2020-07-06T12:18:24.000Z | lib/my_sensors/context.ex | ConnorRigby/my_sensors | 25296a7e5629b58462576f7c8042bb15c1a0f7e7 | [
"MIT"
] | 2 | 2018-02-09T22:04:46.000Z | 2018-10-09T16:34:00.000Z | lib/my_sensors/context.ex | ConnorRigby/my_sensors | 25296a7e5629b58462576f7c8042bb15c1a0f7e7 | [
"MIT"
] | 1 | 2018-02-09T20:29:09.000Z | 2018-02-09T20:29:09.000Z | defmodule MySensors.Context do
@moduledoc "Repo Context for MySensors"
alias MySensors.{Context, Repo, Packet, Node, Sensor, SensorValue}
use Packet.Constants
require Logger
import Ecto.Query, warn: false
@doc "Get a node by id."
@spec get_node(integer) :: Node.t() | nil
def get_node(id) do
Repo.g... | 26.781457 | 95 | 0.59545 |
9114bed2cd0d0c3a17c3b834e76b444f795950aa | 1,857 | ex | Elixir | clients/sheets/lib/google_api/sheets/v4/model/batch_clear_values_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/sheets/lib/google_api/sheets/v4/model/batch_clear_values_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/sheets/lib/google_api/sheets/v4/model/batch_clear_values_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... | 37.14 | 282 | 0.735057 |
9114e298466ffd3fe8826f47d5faa97ef376ad30 | 2,059 | ex | Elixir | lib/nostrum/struct/guild/audit_log_entry.ex | kosmigramma/nostrum | bb3e85875dc0f3f05996abffca024988c032bd3d | [
"MIT"
] | null | null | null | lib/nostrum/struct/guild/audit_log_entry.ex | kosmigramma/nostrum | bb3e85875dc0f3f05996abffca024988c032bd3d | [
"MIT"
] | null | null | null | lib/nostrum/struct/guild/audit_log_entry.ex | kosmigramma/nostrum | bb3e85875dc0f3f05996abffca024988c032bd3d | [
"MIT"
] | null | null | null | defmodule Nostrum.Struct.Guild.AuditLogEntry do
@moduledoc """
Represents a single entry in the guild's audit log.
"""
alias Nostrum.Snowflake
alias Nostrum.Struct.User
alias Nostrum.Util
defstruct [
:action_type,
:changes,
:id,
:options,
:reason,
:target_id,
:user_id
]
... | 26.063291 | 152 | 0.610005 |
9114e577e368cd65cb85bc92b38c43b9ae84414f | 12,253 | ex | Elixir | lib/brando/datasource.ex | univers-agency/brando | 69c3c52498a3f64518da3522cd9f27294a52cc68 | [
"Apache-2.0"
] | 1 | 2020-04-26T09:53:02.000Z | 2020-04-26T09:53:02.000Z | lib/brando/datasource.ex | univers-agency/brando | 69c3c52498a3f64518da3522cd9f27294a52cc68 | [
"Apache-2.0"
] | 198 | 2019-08-20T16:16:07.000Z | 2020-07-03T15:42:07.000Z | lib/brando/datasource.ex | univers-agency/brando | 69c3c52498a3f64518da3522cd9f27294a52cc68 | [
"Apache-2.0"
] | null | null | null | defmodule Brando.Datasource do
@moduledoc """
Helpers to register datasources for interfacing with the block editor
### List
A set of entries is returned automatically
#### Example
list :all_posts_from_year, fn module, arg ->
{:ok, Repo.all(from t in module, where: t.year == ^arg)}
... | 25.850211 | 105 | 0.633069 |
9114f3f1fca26c232b38fc4aff46212be51f32b2 | 28 | ex | Elixir | apps/blockchain/lib/blockchain.ex | sandhose/elixir-blockchain | 4b5c91816ca0710524c352b57fcf2bb37c64c728 | [
"MIT"
] | null | null | null | apps/blockchain/lib/blockchain.ex | sandhose/elixir-blockchain | 4b5c91816ca0710524c352b57fcf2bb37c64c728 | [
"MIT"
] | null | null | null | apps/blockchain/lib/blockchain.ex | sandhose/elixir-blockchain | 4b5c91816ca0710524c352b57fcf2bb37c64c728 | [
"MIT"
] | null | null | null | defmodule Blockchain do
end
| 9.333333 | 23 | 0.857143 |
91154b5de96cf1a1a7825cfbd1cbd5ab62969822 | 1,593 | exs | Elixir | test/brazilian_utils/cpf_test.exs | alephao/brazilian-utils-elixir | 37574b9a8fa6f9601e3fbfe4411ef5954a96806c | [
"MIT"
] | 1 | 2021-04-27T19:16:06.000Z | 2021-04-27T19:16:06.000Z | test/brazilian_utils/cpf_test.exs | alephao/brazilian-utils-elixir | 37574b9a8fa6f9601e3fbfe4411ef5954a96806c | [
"MIT"
] | null | null | null | test/brazilian_utils/cpf_test.exs | alephao/brazilian-utils-elixir | 37574b9a8fa6f9601e3fbfe4411ef5954a96806c | [
"MIT"
] | null | null | null | defmodule BrazilianUtils.CpfTests do
use ExUnit.Case, async: true
alias BrazilianUtils.Cpf
test "is_valid? on valid cpfs" do
assert Cpf.is_valid?("681.251.820-47") == true
assert Cpf.is_valid?("617.821.803-62") == true
assert Cpf.is_valid?("205.448.357-51") == true
assert Cpf.is_valid?("70426130... | 34.630435 | 67 | 0.635907 |
9115526378de157c8cd21cccb8aa22679abc525d | 1,603 | ex | Elixir | lib/circle_ci/project/build.ex | mobileoverlord/circleci | 83e6c4514031504a7528698cb50bc25e19cf81fa | [
"Apache-2.0"
] | 1 | 2017-09-01T22:44:46.000Z | 2017-09-01T22:44:46.000Z | lib/circle_ci/project/build.ex | mobileoverlord/circleci | 83e6c4514031504a7528698cb50bc25e19cf81fa | [
"Apache-2.0"
] | null | null | null | lib/circle_ci/project/build.ex | mobileoverlord/circleci | 83e6c4514031504a7528698cb50bc25e19cf81fa | [
"Apache-2.0"
] | null | null | null | defmodule CircleCI.Project.Build do
alias CircleCI.Project
@doc """
Full details for a single build. The response includes all of the fields from
the build summary.
https://circleci.com/docs/api/v1-reference/#build
"""
def get(%Project{} = project, build_num) do
project
|> basepath(build_num)
... | 22.577465 | 79 | 0.651903 |
9115633ec80119998d6628e9731685f9142b90c0 | 148 | ex | Elixir | elixir-phoenix/lib/helloworld_web/controllers/hello_controller.ex | saurav1991/interview-boilerplates | 9e0abf64d9cc0a97df0e3be9483108b3920679e1 | [
"MIT"
] | null | null | null | elixir-phoenix/lib/helloworld_web/controllers/hello_controller.ex | saurav1991/interview-boilerplates | 9e0abf64d9cc0a97df0e3be9483108b3920679e1 | [
"MIT"
] | null | null | null | elixir-phoenix/lib/helloworld_web/controllers/hello_controller.ex | saurav1991/interview-boilerplates | 9e0abf64d9cc0a97df0e3be9483108b3920679e1 | [
"MIT"
] | null | null | null | defmodule HelloworldWeb.HelloController do
use HelloworldWeb, :controller
def index(conn, _params) do
render(conn, "index.json")
end
end
| 18.5 | 42 | 0.75 |
911565a674415cdf99ae8a19c249fda0887e320c | 477 | ex | Elixir | lib/web/plugs/verify_user.ex | sb8244/grapevine | effaaa01294d30114090c20f9cc40b8665d834f2 | [
"MIT"
] | 107 | 2018-10-05T18:20:32.000Z | 2022-02-28T04:02:50.000Z | lib/web/plugs/verify_user.ex | sb8244/grapevine | effaaa01294d30114090c20f9cc40b8665d834f2 | [
"MIT"
] | 33 | 2018-10-05T14:11:18.000Z | 2022-02-10T22:19:18.000Z | lib/web/plugs/verify_user.ex | sb8244/grapevine | effaaa01294d30114090c20f9cc40b8665d834f2 | [
"MIT"
] | 18 | 2019-02-03T03:08:20.000Z | 2021-12-28T04:29:36.000Z | defmodule Web.Plugs.VerifyUser do
@moduledoc """
Verify a user is in the session
"""
import Phoenix.Controller
alias Web.Router.Helpers, as: Routes
def init(default), do: default
def call(conn, _opts) do
case conn.assigns do
%{current_user: current_user} when current_user != nil ->
c... | 19.875 | 63 | 0.626834 |
91156a4fa113889088c8b6baec6524956b4a550a | 794 | ex | Elixir | lib/embed_chat_web/controllers/address_controller.ex | guofei/embedchat | 6562108acd1d488dde457f28cf01d82b4c5a9bf8 | [
"MIT"
] | 27 | 2016-10-15T12:13:22.000Z | 2021-02-07T20:31:41.000Z | lib/embed_chat_web/controllers/address_controller.ex | guofei/embedchat | 6562108acd1d488dde457f28cf01d82b4c5a9bf8 | [
"MIT"
] | null | null | null | lib/embed_chat_web/controllers/address_controller.ex | guofei/embedchat | 6562108acd1d488dde457f28cf01d82b4c5a9bf8 | [
"MIT"
] | 4 | 2016-08-21T15:03:29.000Z | 2019-11-22T13:15:29.000Z | defmodule EmbedChatWeb.AddressController do
use EmbedChatWeb, :controller
alias EmbedChat.Address
plug Guardian.Plug.EnsureAuthenticated, [handler: EmbedChatWeb.AuthErrorHandler]
def index(conn, params) do
user = Guardian.Plug.current_resource(conn)
# TODO user user current project
room =
u... | 24.8125 | 82 | 0.65869 |
91156e63cc4a33de76517318ab3a48548862cabc | 503 | exs | Elixir | config/config.exs | highmobility/bluex | 2ad4b713445734a235fd997fce0f8f4c934179fc | [
"MIT"
] | 18 | 2016-09-28T20:23:41.000Z | 2021-03-17T03:36:27.000Z | config/config.exs | highmobility/bluex | 2ad4b713445734a235fd997fce0f8f4c934179fc | [
"MIT"
] | 1 | 2016-10-27T08:40:10.000Z | 2016-10-27T08:40:10.000Z | config/config.exs | highmobility/bluex | 2ad4b713445734a235fd997fce0f8f4c934179fc | [
"MIT"
] | 6 | 2017-09-02T08:03:56.000Z | 2020-07-07T19:03:40.000Z | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
config :bluex,
bus_type: :system,
dbus_name: "org.bluez",
iface_dbus_name: "org.bluez.Adapter1",
device_dbus_name: "org.bluez.Device1",
gatt_dbus_name: "org.bluez.GattServ... | 31.4375 | 76 | 0.751491 |
9115711425789ec9a5bd24cdbdca4c09b20cea1e | 201 | exs | Elixir | elixir/codes-from-books/little-elixir/cap8/blitzy/config/config.exs | trxeste/wrk | 3e05e50ff621866f0361cc8494ce8f6bb4d97fae | [
"BSD-3-Clause"
] | 1 | 2017-10-16T03:00:50.000Z | 2017-10-16T03:00:50.000Z | elixir/codes-from-books/little-elixir/cap8/blitzy/config/config.exs | trxeste/wrk | 3e05e50ff621866f0361cc8494ce8f6bb4d97fae | [
"BSD-3-Clause"
] | null | null | null | elixir/codes-from-books/little-elixir/cap8/blitzy/config/config.exs | trxeste/wrk | 3e05e50ff621866f0361cc8494ce8f6bb4d97fae | [
"BSD-3-Clause"
] | null | null | null | use Mix.Config
config :blitzy, master_node: :"a@127.0.0.1"
config :blitzy, slave_nodes: [:"b@127.0.0.1",
:"c@127.0.0.1",
:"d@127.0.0.1"]
| 20.1 | 45 | 0.427861 |
91159b6a31a14dfc29ac5695edb1e706ace68ce1 | 544 | exs | Elixir | api/priv/repo/migrations/20170404223242_create_rooms_members.exs | ukita/grook | add716bf92fcde35b941ea8067933c28c192e01e | [
"MIT"
] | 3 | 2017-05-22T13:28:13.000Z | 2018-06-29T16:39:19.000Z | api/priv/repo/migrations/20170404223242_create_rooms_members.exs | ukita/grook | add716bf92fcde35b941ea8067933c28c192e01e | [
"MIT"
] | null | null | null | api/priv/repo/migrations/20170404223242_create_rooms_members.exs | ukita/grook | add716bf92fcde35b941ea8067933c28c192e01e | [
"MIT"
] | null | null | null | defmodule Grook.Repo.Migrations.CreateRoomsMembers do
use Ecto.Migration
def change do
create table(:rooms_members, primary_key: false) do
add :id, :binary_id, primary_key: true
add :admin, :boolean, null: false, default: false
add :user_id, references(:users, type: :binary_id, on_delete: :de... | 32 | 93 | 0.711397 |
9115dee00811b9a4357dc4f6d42c180ad14d7bd3 | 114 | exs | Elixir | test/phoenix_component_folders_web/views/layout_view_test.exs | kimlindholm/phoenix_component_folders | 2d07f4966fe473063183e97009955b82a93b181f | [
"MIT"
] | 30 | 2017-05-05T09:30:06.000Z | 2021-03-29T15:08:02.000Z | test/phoenix_component_folders_web/views/layout_view_test.exs | kimlindholm/phoenix_component_folders | 2d07f4966fe473063183e97009955b82a93b181f | [
"MIT"
] | 4 | 2017-05-01T18:53:57.000Z | 2020-11-22T06:46:55.000Z | test/phoenix_component_folders_web/views/layout_view_test.exs | kimlindholm/phoenix_component_folders | 2d07f4966fe473063183e97009955b82a93b181f | [
"MIT"
] | 7 | 2017-11-09T06:34:07.000Z | 2021-03-01T20:14:18.000Z | defmodule PhoenixComponentFoldersWeb.LayoutViewTest do
use PhoenixComponentFoldersWeb.ConnCase, async: true
end
| 28.5 | 54 | 0.877193 |
9115e9b003c7feb0cd758a73b90c18baabd9b709 | 76 | exs | Elixir | test/erlef_web/views/page_view_test.exs | ferd/website | 400409d05ba91ff2a84179ed9a769196aee8f564 | [
"Apache-2.0"
] | null | null | null | test/erlef_web/views/page_view_test.exs | ferd/website | 400409d05ba91ff2a84179ed9a769196aee8f564 | [
"Apache-2.0"
] | null | null | null | test/erlef_web/views/page_view_test.exs | ferd/website | 400409d05ba91ff2a84179ed9a769196aee8f564 | [
"Apache-2.0"
] | null | null | null | defmodule ErlefWeb.PageViewTest do
use ErlefWeb.ConnCase, async: true
end
| 19 | 36 | 0.815789 |
9115f6a9a4f4e0785c2613633b7e4e8833211f41 | 2,027 | ex | Elixir | clients/content/lib/google_api/content/v2/model/shipment_invoice.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/shipment_invoice.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/shipment_invoice.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 33.229508 | 119 | 0.738037 |
91160c405b35d96156378ee033c5076f64827945 | 2,929 | exs | Elixir | test/packet/decode_test.exs | ityonemo/erps | f3cd859313941b9838c91a32e9c32e84194b0bb5 | [
"BSD-3-Clause"
] | 4 | 2020-03-06T19:04:35.000Z | 2021-01-01T21:23:03.000Z | test/packet/decode_test.exs | ityonemo/erps | f3cd859313941b9838c91a32e9c32e84194b0bb5 | [
"BSD-3-Clause"
] | 27 | 2020-02-25T01:45:00.000Z | 2020-07-02T18:39:22.000Z | test/packet/decode_test.exs | ityonemo/erps | f3cd859313941b9838c91a32e9c32e84194b0bb5 | [
"BSD-3-Clause"
] | null | null | null | defmodule ErpsTest.Packet.DecodeTest do
use ExUnit.Case, async: true
alias Erps.Packet
@moduletag [packet: true, decode: true]
@simplest_term []
@simplest_payload :erlang.term_to_binary(@simplest_term)
@empty_identifier <<0 :: 36 * 8>>
@empty_signature <<0 :: 48 * 8>>
# packet decoding occurs after ... | 35.289157 | 115 | 0.616251 |
9116344cad61ada7fac4eaed9850144d24af6cc0 | 4,363 | exs | Elixir | test/ex_doc/formatter/epub/templates_test.exs | Dalgona/ex_doc | 814627067175bfe894461cc3f235ee1d9b71b487 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | test/ex_doc/formatter/epub/templates_test.exs | Dalgona/ex_doc | 814627067175bfe894461cc3f235ee1d9b71b487 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | test/ex_doc/formatter/epub/templates_test.exs | Dalgona/ex_doc | 814627067175bfe894461cc3f235ee1d9b71b487 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | defmodule ExDoc.Formatter.EPUB.TemplatesTest do
use ExUnit.Case, async: true
alias ExDoc.Formatter.HTML
alias ExDoc.Formatter.EPUB.Templates
defp source_url do
"https://github.com/elixir-lang/elixir"
end
defp homepage_url do
"http://elixir-lang.org"
end
defp doc_config(config \\ []) do
d... | 32.080882 | 138 | 0.635113 |
911634ce68be4eadae34e5d977edc08338729904 | 290 | ex | Elixir | lib/swoosh.ex | nathf/swoosh | 9507d32e3c14f52ef37e10996f161898c0c11250 | [
"MIT"
] | null | null | null | lib/swoosh.ex | nathf/swoosh | 9507d32e3c14f52ef37e10996f161898c0c11250 | [
"MIT"
] | null | null | null | lib/swoosh.ex | nathf/swoosh | 9507d32e3c14f52ef37e10996f161898c0c11250 | [
"MIT"
] | null | null | null | defmodule Swoosh do
@moduledoc File.read!("README.md") |> String.replace("# Swoosh\n\n", "", global: false)
@version "0.13.0"
@doc false
def version, do: @version
@json_library Application.get_env(:swoosh, :json_library)
@doc false
def json_library, do: @json_library
end
| 20.714286 | 89 | 0.689655 |
91165c06fd2c59cdcde9e1ce8ed5b8ae23c01435 | 629 | exs | Elixir | mix.exs | vanessaklee/AkinML | e3cc49f24fd1e0bd3358589f64a11cc1ec31b03f | [
"Apache-2.0"
] | 1 | 2021-11-03T22:38:12.000Z | 2021-11-03T22:38:12.000Z | mix.exs | vanessaklee/AkinML | e3cc49f24fd1e0bd3358589f64a11cc1ec31b03f | [
"Apache-2.0"
] | null | null | null | mix.exs | vanessaklee/AkinML | e3cc49f24fd1e0bd3358589f64a11cc1ec31b03f | [
"Apache-2.0"
] | null | null | null | defmodule AkinML.MixProject do
use Mix.Project
def project do
[
app: :akin_ml,
version: "0.1.0",
elixir: "~> 1.12",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_app... | 20.966667 | 82 | 0.556439 |
91166a47fd95b0bb2a1718c3440b791694b9d3ed | 2,667 | exs | Elixir | test/stake_pool_test.exs | ricn/cardanoex | 871d14d3b59116c8f869364b2506cd6d230fff29 | [
"MIT"
] | 12 | 2021-05-04T15:07:34.000Z | 2022-02-10T20:40:22.000Z | test/stake_pool_test.exs | ricn/cardano | 871d14d3b59116c8f869364b2506cd6d230fff29 | [
"MIT"
] | null | null | null | test/stake_pool_test.exs | ricn/cardano | 871d14d3b59116c8f869364b2506cd6d230fff29 | [
"MIT"
] | 2 | 2021-05-22T06:47:31.000Z | 2021-10-06T13:27:30.000Z | defmodule Cardanoex.StakePoolTest do
use ExUnit.Case
doctest Cardanoex.StakePool
alias Cardanoex.StakePool
use ExVCR.Mock, adapter: ExVCR.Adapter.Hackney
setup_all do
[wallet: TestHelpers.setup_wallet_with_funds()]
end
describe "list stake pools" do
test "list stake pools successfully" do
... | 31.75 | 131 | 0.691414 |
91167588a4f6d7649571433ac005e509073dc5aa | 467 | exs | Elixir | test/mode_test.exs | buob/exq | 921fe26c7f3db7d77ff67e3a03ea9b83612f5598 | [
"Apache-2.0"
] | null | null | null | test/mode_test.exs | buob/exq | 921fe26c7f3db7d77ff67e3a03ea9b83612f5598 | [
"Apache-2.0"
] | null | null | null | test/mode_test.exs | buob/exq | 921fe26c7f3db7d77ff67e3a03ea9b83612f5598 | [
"Apache-2.0"
] | 3 | 2021-04-07T14:50:17.000Z | 2021-04-07T14:50:30.000Z | defmodule ModeTest do
use ExUnit.Case
test "supervisor waits for worker drainer to terminate" do
children = Exq.Support.Mode.children([shutdown_timeout: 10_000])
worker_drainer_child_spec = find_child(children, Exq.WorkerDrainer.Server)
assert {_id, _start, _restart, 10_000, _type, _module} = worker_d... | 31.133333 | 86 | 0.732334 |
91168f505b4a11e407cfe8c14bfd746c6e6c846e | 4,522 | exs | Elixir | test/lib/kitten_blue/jwk/google_test.exs | ritou/elixir-kitten-blue | e6ac29b17d4e4b78d562bf230209ac5faa57f454 | [
"MIT"
] | null | null | null | test/lib/kitten_blue/jwk/google_test.exs | ritou/elixir-kitten-blue | e6ac29b17d4e4b78d562bf230209ac5faa57f454 | [
"MIT"
] | 10 | 2018-04-07T02:53:59.000Z | 2020-10-19T14:34:51.000Z | test/lib/kitten_blue/jwk/google_test.exs | ritou/elixir-kitten-blue | e6ac29b17d4e4b78d562bf230209ac5faa57f454 | [
"MIT"
] | null | null | null | defmodule KittenBlue.JWK.GoogleTest do
use ExUnit.Case
import Mox
setup :verify_on_exit!
@google_jwks_body """
{
\"keys\": [
{
\"kty\": \"RSA\",
\"alg\": \"RS256\",
\"use\": \"sig\",
\"kid\": \"4ef5118b0800bd60a4194186dcb538fc66e5eb34\",
\"n\": \"4ZSPB8TO7y3xZF_GxB_JSx_yBEtNs... | 57.974359 | 846 | 0.682663 |
9116e588d1814ea60cd6676bd53b69019271490a | 4,783 | ex | Elixir | lib/phoenix/endpoint/cowboy2_handler.ex | coderberry/phoenix | 9abaa84ea675d3db97cfba77745e76300acb6fd2 | [
"MIT"
] | null | null | null | lib/phoenix/endpoint/cowboy2_handler.ex | coderberry/phoenix | 9abaa84ea675d3db97cfba77745e76300acb6fd2 | [
"MIT"
] | null | null | null | lib/phoenix/endpoint/cowboy2_handler.ex | coderberry/phoenix | 9abaa84ea675d3db97cfba77745e76300acb6fd2 | [
"MIT"
] | null | null | null | defmodule Phoenix.Endpoint.Cowboy2Handler do
@moduledoc """
The Cowboy2 adapter for Phoenix.
It implements the required `child_spec/3` function as well
as the handler for the WebSocket transport.
## Custom dispatch options
You can provide custom dispatch options in order to use Phoenix's
builtin Cowboy... | 32.760274 | 103 | 0.641857 |
9116fdef330daed1e8b1e692ab591b0f36a640d9 | 311 | exs | Elixir | test/asset/regimen_item_test.exs | bahanni/custom_rpi4 | ddefa85d30bacaae40151a63a9a0ebbf4ad30ed5 | [
"MIT"
] | null | null | null | test/asset/regimen_item_test.exs | bahanni/custom_rpi4 | ddefa85d30bacaae40151a63a9a0ebbf4ad30ed5 | [
"MIT"
] | null | null | null | test/asset/regimen_item_test.exs | bahanni/custom_rpi4 | ddefa85d30bacaae40151a63a9a0ebbf4ad30ed5 | [
"MIT"
] | null | null | null | defmodule FarmbotOS.Asset.Regimen.ItemTest do
use ExUnit.Case
alias FarmbotOS.Asset.Regimen.Item
@expected_keys [:time_offset, :sequence_id]
test "render/1" do
result = Item.render(%Item{})
mapper = fn key -> assert Map.has_key?(result, key) end
Enum.map(@expected_keys, mapper)
end
end
| 23.923077 | 59 | 0.713826 |
911705bbe00c360d616e1c2ac696e183883ce9c6 | 556 | ex | Elixir | lib/remedy/schema/embed_video.ex | bdanklin/nostrum | 554ebd6cff1d0f68c874aa92f475dabf1aed5512 | [
"MIT"
] | 3 | 2021-09-05T09:44:02.000Z | 2022-01-26T15:31:50.000Z | lib/remedy/schema/embed_video.ex | bdanklin/remedy | 554ebd6cff1d0f68c874aa92f475dabf1aed5512 | [
"MIT"
] | null | null | null | lib/remedy/schema/embed_video.ex | bdanklin/remedy | 554ebd6cff1d0f68c874aa92f475dabf1aed5512 | [
"MIT"
] | null | null | null | defmodule Remedy.Schema.EmbedVideo do
@moduledoc """
Embed Video Object.
"""
use Remedy.Schema
@type t :: %__MODULE__{
url: String.t(),
proxy_url: String.t(),
height: integer(),
width: integer()
}
@primary_key false
embedded_schema do
field :url, :stri... | 19.857143 | 56 | 0.595324 |
91170922889640e0ef08e627ea37b889cacbb0e4 | 6,140 | exs | Elixir | test/eden/parser_test.exs | kianmeng/Eden | 8334b51369f6e8cc196ca9ebf7358054a865254f | [
"Apache-2.0"
] | 33 | 2015-06-27T07:06:23.000Z | 2022-02-13T10:48:28.000Z | test/eden/parser_test.exs | kianmeng/Eden | 8334b51369f6e8cc196ca9ebf7358054a865254f | [
"Apache-2.0"
] | 13 | 2015-06-06T17:18:11.000Z | 2015-06-13T17:48:26.000Z | test/eden/parser_test.exs | jfacorro/ExEdn | 317194d42c252450852fac3d6b97d23b1dc4949c | [
"Apache-2.0"
] | 13 | 2015-12-17T11:17:23.000Z | 2020-11-01T11:39:49.000Z | defmodule Eden.ParserTest do
use ExUnit.Case
import Eden.Parser
alias Eden.Parser
alias Eden.Exception, as: Ex
test "Whitespace" do
assert parse(",,, ") == node(:root, nil, [])
assert parse(" \n \t, \r") == node(:root, nil, [])
end
test "Literals" do
root = node(:root, nil, [node(:nil, "nil... | 29.519231 | 67 | 0.457003 |
91171daa4f95ddecd478f86336e05903bde91a87 | 2,298 | ex | Elixir | apps/blockquote/lib/blockquote_web/controllers/category_controller.ex | allen-garvey/phoenix-umbrella | 1d444bbd62a5e7b5f51d317ce2be71ee994125d5 | [
"MIT"
] | 4 | 2019-10-04T16:11:15.000Z | 2021-08-18T21:00:13.000Z | apps/blockquote/lib/blockquote_web/controllers/category_controller.ex | allen-garvey/phoenix-umbrella | 1d444bbd62a5e7b5f51d317ce2be71ee994125d5 | [
"MIT"
] | 5 | 2020-03-16T23:52:25.000Z | 2021-09-03T16:52:17.000Z | apps/blockquote/lib/blockquote_web/controllers/category_controller.ex | allen-garvey/phoenix-umbrella | 1d444bbd62a5e7b5f51d317ce2be71ee994125d5 | [
"MIT"
] | null | null | null | defmodule BlockquoteWeb.CategoryController do
use BlockquoteWeb, :controller
alias Blockquote.Admin
alias Blockquote.Admin.Category
def custom_render(conn, template, assigns) do
custom_render(conn, view_module(conn), template, assigns)
end
def custom_render(conn, view_module, template, assigns) do
... | 32.366197 | 138 | 0.678416 |
91175b49d353e2c4d6ed32908efc4edb3971125f | 4,413 | ex | Elixir | clients/tool_results/lib/google_api/tool_results/v1beta3/model/status.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/tool_results/lib/google_api/tool_results/v1beta3/model/status.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/tool_results/lib/google_api/tool_results/v1beta3/model/status.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... | 84.865385 | 2,520 | 0.768412 |
911783760b4f82245e9609db02c1c1fcd8ed15da | 72 | exs | Elixir | test/ppg_web/views/page_view_test.exs | ohyecloudy/phoenix-prometheus-grafana | e956f27a34c794e85d1e89fc61af79be18a0ce35 | [
"MIT"
] | 1 | 2020-04-23T08:18:08.000Z | 2020-04-23T08:18:08.000Z | test/ppg_web/views/page_view_test.exs | ohyecloudy/phoenix_prometheus_grafana | e956f27a34c794e85d1e89fc61af79be18a0ce35 | [
"MIT"
] | null | null | null | test/ppg_web/views/page_view_test.exs | ohyecloudy/phoenix_prometheus_grafana | e956f27a34c794e85d1e89fc61af79be18a0ce35 | [
"MIT"
] | null | null | null | defmodule PpgWeb.PageViewTest do
use PpgWeb.ConnCase, async: true
end
| 18 | 34 | 0.805556 |
91178a8d2b5d2fcea0f69ef1cdb51d8860c3deb9 | 624 | ex | Elixir | episode25/todo/lib/todo/server.ex | paulfioravanti/learn_elixir | 8424b1a7a89cb9fd1dacb85bcca487601958b8fa | [
"MIT"
] | null | null | null | episode25/todo/lib/todo/server.ex | paulfioravanti/learn_elixir | 8424b1a7a89cb9fd1dacb85bcca487601958b8fa | [
"MIT"
] | null | null | null | episode25/todo/lib/todo/server.ex | paulfioravanti/learn_elixir | 8424b1a7a89cb9fd1dacb85bcca487601958b8fa | [
"MIT"
] | null | null | null | defmodule Todo.Server do
use Supervisor
###
# Supervisor API
##
def start_link do
Supervisor.start_link(__MODULE__, [], name: __MODULE__)
end
def init(_) do
children = [
# `restart: :transient` only restarts due to an error,
# not if they are shutdown manually.
# This worker u... | 24 | 64 | 0.674679 |
91178f4cb42be65cc84c0ed15c3608979b0fde42 | 963 | exs | Elixir | test/cloak_ecto/types/map_test.exs | nickdichev/cloak_ecto | 4e7c49dc3eaf623162aa5d55e91b83c49f3b2854 | [
"MIT"
] | 139 | 2018-12-17T13:52:42.000Z | 2022-03-27T02:58:55.000Z | test/cloak_ecto/types/map_test.exs | nickdichev/cloak_ecto | 4e7c49dc3eaf623162aa5d55e91b83c49f3b2854 | [
"MIT"
] | 25 | 2019-08-07T16:49:03.000Z | 2022-03-14T18:17:54.000Z | test/cloak_ecto/types/map_test.exs | nickdichev/cloak_ecto | 4e7c49dc3eaf623162aa5d55e91b83c49f3b2854 | [
"MIT"
] | 30 | 2019-01-09T12:36:16.000Z | 2022-03-14T18:03:28.000Z | defmodule Cloak.Ecto.MapTest do
use ExUnit.Case
defmodule Field do
use Cloak.Ecto.Map, vault: Cloak.Ecto.TestVault
end
@map %{"key" => "value"}
test ".type is :binary" do
assert Field.type() == :binary
end
test ".cast rejects invalid types" do
assert :error = Field.cast("binary")
asser... | 24.075 | 75 | 0.634476 |
911795fd8d39135ac3b063a4e6a0986e6ffb9421 | 698 | exs | Elixir | config/test.exs | scudelletti/eventstore | 9f795d45f1a8ca4c72d0614df24586dcb2ecfa12 | [
"MIT"
] | null | null | null | config/test.exs | scudelletti/eventstore | 9f795d45f1a8ca4c72d0614df24586dcb2ecfa12 | [
"MIT"
] | null | null | null | config/test.exs | scudelletti/eventstore | 9f795d45f1a8ca4c72d0614df24586dcb2ecfa12 | [
"MIT"
] | null | null | null | use Mix.Config
config :logger, backends: []
config :ex_unit,
capture_log: true,
assert_receive_timeout: 2_000,
refute_receive_timeout: 100
default_config = [
username: "postgres",
password: "postgres",
database: "eventstore_test",
hostname: "localhost",
pool_size: 1,
pool_overflow: 0,
registry: :... | 25.851852 | 97 | 0.782235 |
9117a4b65968b6a68e4adeb349c12e9b624eaf1f | 219 | exs | Elixir | app/priv/repo/migrations/20200419131023_add_event_search_indexes.exs | nathanjohnson320/noodl | 2e449aab15b54fc5a1dc45ebf4b79e7b64b7c967 | [
"MIT"
] | 1 | 2021-01-20T20:00:50.000Z | 2021-01-20T20:00:50.000Z | app/priv/repo/migrations/20200419131023_add_event_search_indexes.exs | nathanjohnson320/noodl | 2e449aab15b54fc5a1dc45ebf4b79e7b64b7c967 | [
"MIT"
] | null | null | null | app/priv/repo/migrations/20200419131023_add_event_search_indexes.exs | nathanjohnson320/noodl | 2e449aab15b54fc5a1dc45ebf4b79e7b64b7c967 | [
"MIT"
] | null | null | null | defmodule Noodl.Repo.Migrations.AddEventSearchIndexes do
use Ecto.Migration
def change do
create index(:events, [:topic])
create index(:events, [:language])
create index(:events, [:timezone])
end
end
| 21.9 | 56 | 0.712329 |
9117e53c1eb01d6221423a17f656b5d437e7e8ae | 2,334 | ex | Elixir | apps/demon_spirit_web/lib/demon_spirit_game_ui/game_timer.ex | mreishus/demon_spirit_umbrella | 1ab9161427361ac7d35132fce2aed36923896a4b | [
"MIT"
] | 12 | 2019-09-17T13:47:57.000Z | 2021-12-11T17:11:11.000Z | apps/demon_spirit_web/lib/demon_spirit_game_ui/game_timer.ex | mreishus/demon_spirit_umbrella | 1ab9161427361ac7d35132fce2aed36923896a4b | [
"MIT"
] | 181 | 2019-10-15T01:21:44.000Z | 2021-08-31T19:26:54.000Z | apps/demon_spirit_web/lib/demon_spirit_game_ui/game_timer.ex | mreishus/demon_spirit_umbrella | 1ab9161427361ac7d35132fce2aed36923896a4b | [
"MIT"
] | 2 | 2020-07-11T02:18:46.000Z | 2021-05-31T10:46:39.000Z | defmodule DemonSpiritWeb.GameTimer do
@moduledoc """
GameTimer: Represents a chess timer containing a "time left" for both
white and black players.
"""
alias DemonSpiritGame.{Game}
alias DemonSpiritWeb.GameTimer
require Logger
defstruct white_time: 0,
white_time_current: 0,
blac... | 25.933333 | 86 | 0.62982 |
9118022cbc38dc59352680358891111723ddf4d3 | 331 | exs | Elixir | apps/tai/test/tai/venue_adapters/binance/products_test.exs | ihorkatkov/tai | 09f9f15d2c385efe762ae138a8570f1e3fd41f26 | [
"MIT"
] | 1 | 2019-12-19T05:16:26.000Z | 2019-12-19T05:16:26.000Z | apps/tai/test/tai/venue_adapters/binance/products_test.exs | ihorkatkov/tai | 09f9f15d2c385efe762ae138a8570f1e3fd41f26 | [
"MIT"
] | null | null | null | apps/tai/test/tai/venue_adapters/binance/products_test.exs | ihorkatkov/tai | 09f9f15d2c385efe762ae138a8570f1e3fd41f26 | [
"MIT"
] | 1 | 2020-05-03T23:32:11.000Z | 2020-05-03T23:32:11.000Z | defmodule Tai.VenueAdapters.Binance.ProductsTest do
use ExUnit.Case, async: false
alias Tai.VenueAdapters.Binance.Products
describe ".to_symbol" do
test "upcases and stripts underscores" do
assert Products.to_symbol(:btc_usdt) == "BTCUSDT"
assert Products.to_symbol(:BTC_USDT) == "BTCUSDT"
end... | 27.583333 | 55 | 0.734139 |
911809966479f4b701365982c024c56ce421033f | 752 | exs | Elixir | apps/fz_common/test/fz_map_test.exs | kaku-io/firezone | 685da0064727df27e444fe4da2be20efe96af9cd | [
"Apache-2.0"
] | 1,429 | 2021-07-31T21:25:46.000Z | 2022-03-31T16:31:33.000Z | apps/fz_common/test/fz_map_test.exs | kaku-io/firezone | 685da0064727df27e444fe4da2be20efe96af9cd | [
"Apache-2.0"
] | 132 | 2021-07-10T14:23:36.000Z | 2022-03-29T18:36:37.000Z | apps/fz_common/test/fz_map_test.exs | CloudFire-LLC/cloudfire | 24ea29bda8a8845a0a9c3b0482cc67e314611245 | [
"Apache-2.0"
] | 48 | 2021-09-14T02:48:38.000Z | 2022-03-24T18:18:50.000Z | defmodule FzCommon.FzMapTest do
use ExUnit.Case, async: true
alias FzCommon.FzMap
describe "compact/1" do
@data %{foo: nil, bar: "hello"}
test "removes nil values" do
assert FzMap.compact(@data) == %{bar: "hello"}
end
end
describe "compact/2" do
@data %{foo: "bar", bar: ""}
test... | 20.888889 | 54 | 0.505319 |
91180a2511d7614a57158c5b2c0eff3f276d499b | 49,383 | ex | Elixir | lib/elixir/lib/kernel/special_forms.ex | bellthoven/elixir | 14610cb09b8d093d9513f97b7f4da82bdcbdd46d | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/kernel/special_forms.ex | bellthoven/elixir | 14610cb09b8d093d9513f97b7f4da82bdcbdd46d | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/kernel/special_forms.ex | bellthoven/elixir | 14610cb09b8d093d9513f97b7f4da82bdcbdd46d | [
"Apache-2.0"
] | null | null | null | defmodule Kernel.SpecialForms do
@moduledoc """
Special forms are the basic building blocks of Elixir, and therefore
they cannot be overridden by the developer.
We define them in this module. Some of these forms are lexical (like
`alias`, `case`, etc). The macros `{}` and `<<>>` are also special
forms used... | 27.480801 | 115 | 0.638418 |
911883e87d57a15ad236a674cd56baa6df8ab6b5 | 197 | ex | Elixir | web/controllers/broadcast3_controller.ex | jschoch/unpolydrab | 419fa9ac2e23edcc347dc96102caffaedc0beb36 | [
"MIT"
] | null | null | null | web/controllers/broadcast3_controller.ex | jschoch/unpolydrab | 419fa9ac2e23edcc347dc96102caffaedc0beb36 | [
"MIT"
] | null | null | null | web/controllers/broadcast3_controller.ex | jschoch/unpolydrab | 419fa9ac2e23edcc347dc96102caffaedc0beb36 | [
"MIT"
] | null | null | null | defmodule DrabTestApp.Broadcast3Controller 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 |
9118d448d9c06d143e32477ecdfe7987a276469e | 1,939 | exs | Elixir | clients/bare_metal_solution/mix.exs | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/bare_metal_solution/mix.exs | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/bare_metal_solution/mix.exs | 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... | 28.940299 | 171 | 0.66787 |
9118fe8400a0c8e67084cbb7aecf569326c3261a | 3,751 | ex | Elixir | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_inspect_config.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | null | null | null | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_inspect_config.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | null | null | null | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_inspect_config.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"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... | 50.689189 | 455 | 0.752333 |
9119029d99330ff25f36c1c488474b73a3814deb | 1,268 | exs | Elixir | test/auto_api/capabilities/mobile_capability_test.exs | nonninz/auto-api-elixir | 53e11542043285e94bbb5a0a3b8ffff0b1b47167 | [
"MIT"
] | 4 | 2018-01-19T16:11:10.000Z | 2019-12-13T16:35:10.000Z | test/auto_api/capabilities/mobile_capability_test.exs | nonninz/auto-api-elixir | 53e11542043285e94bbb5a0a3b8ffff0b1b47167 | [
"MIT"
] | 5 | 2018-11-29T09:48:29.000Z | 2019-11-06T12:11:35.000Z | test/auto_api/capabilities/mobile_capability_test.exs | nonninz/auto-api-elixir | 53e11542043285e94bbb5a0a3b8ffff0b1b47167 | [
"MIT"
] | 1 | 2021-02-17T18:36:13.000Z | 2021-02-17T18:36:13.000Z | # AutoAPI
# The MIT License
#
# Copyright (c) 2018- High-Mobility GmbH (https://high-mobility.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without lim... | 46.962963 | 79 | 0.779968 |
911907594f212f13f764f27ee06c7c658d5f49e0 | 475 | exs | Elixir | elixir_phx_standard/service/test/phx_service_web/views/error_view_test.exs | estroz/docker-slim-examples | e8448bbe27e848b340d0c80557eb606e0bc69c18 | [
"Apache-2.0"
] | 77 | 2019-03-16T15:55:51.000Z | 2022-03-18T04:48:44.000Z | elixir_phx_standard/service/test/phx_service_web/views/error_view_test.exs | estroz/docker-slim-examples | e8448bbe27e848b340d0c80557eb606e0bc69c18 | [
"Apache-2.0"
] | 17 | 2019-11-28T17:43:54.000Z | 2022-01-06T21:32:57.000Z | elixir_phx_standard/service/test/phx_service_web/views/error_view_test.exs | estroz/docker-slim-examples | e8448bbe27e848b340d0c80557eb606e0bc69c18 | [
"Apache-2.0"
] | 17 | 2019-11-04T16:16:45.000Z | 2022-03-16T07:57:26.000Z | defmodule PhxServiceWeb.ErrorViewTest do
use PhxServiceWeb.ConnCase, async: true
# Bring render/3 and render_to_string/3 for testing custom views
import Phoenix.View
test "renders 404.json" do
assert render(PhxServiceWeb.ErrorView, "404.json", []) ==
%{errors: %{detail: "Not Found"}}
end
t... | 27.941176 | 66 | 0.677895 |
9119127a84c56bb553e63e52c5d5be357624f277 | 1,697 | exs | Elixir | config/dev.exs | ScapeGuru/osrs_api_proxy | 7d4cace8e5185ec60a324de274df225a58049b7a | [
"Apache-2.0"
] | null | null | null | config/dev.exs | ScapeGuru/osrs_api_proxy | 7d4cace8e5185ec60a324de274df225a58049b7a | [
"Apache-2.0"
] | 37 | 2021-04-19T23:56:46.000Z | 2022-02-28T15:14:04.000Z | config/dev.exs | ScapeGuru/osrs_api_proxy | 7d4cace8e5185ec60a324de274df225a58049b7a | [
"Apache-2.0"
] | null | null | null | use Mix.Config
# Configure your database
config :osrs_api_proxy, OsrsApiProxy.Repo,
username: "postgres",
password: "password",
database: "osrs_api_proxy_dev",
hostname: "localhost",
port: 25432,
show_sensitive_data_on_connection_error: true,
pool_size: 10
# For development, we disable any cache and ena... | 28.762712 | 68 | 0.730112 |
91193c3e1f7cae12fa5113c7a2e8a441c0cd69de | 1,714 | ex | Elixir | lib/loader.ex | sztosz/countries | 26ee87b4b532410f0ecedbef47447640d3bf7e5d | [
"MIT"
] | null | null | null | lib/loader.ex | sztosz/countries | 26ee87b4b532410f0ecedbef47447640d3bf7e5d | [
"MIT"
] | null | null | null | lib/loader.ex | sztosz/countries | 26ee87b4b532410f0ecedbef47447640d3bf7e5d | [
"MIT"
] | null | null | null | defmodule Countries.Loader do
@moduledoc false
import Countries.Utils, only: [to_map: 1]
alias Countries.Country
@data_path Path.expand("data", __DIR__)
# loads all country data from our yaml files
# :yamerl returns a really terrible data structure
# [[{'name', 'Germany'}, {'code', 'DE'}], [{'nam:e'... | 28.098361 | 86 | 0.654609 |
9119d6f791fa549f74aae7fb4b4a8fe24f65bec7 | 146 | ex | Elixir | lib/ninescraft_web/controllers/page_controller.ex | drobertduke/ninescraft | 00a08e4f3433b1ffd8f0a8dc77927d043b4e3ce8 | [
"Apache-2.0"
] | null | null | null | lib/ninescraft_web/controllers/page_controller.ex | drobertduke/ninescraft | 00a08e4f3433b1ffd8f0a8dc77927d043b4e3ce8 | [
"Apache-2.0"
] | null | null | null | lib/ninescraft_web/controllers/page_controller.ex | drobertduke/ninescraft | 00a08e4f3433b1ffd8f0a8dc77927d043b4e3ce8 | [
"Apache-2.0"
] | null | null | null | defmodule NinescraftWeb.PageController do
use NinescraftWeb, :controller
def index(conn, _params) do
render conn, "index.html"
end
end
| 18.25 | 41 | 0.753425 |
9119fed3161ff4a7eef5dcc72a129102546b9ac2 | 1,101 | exs | Elixir | config/config.exs | MThomassen/graphql-server-benchmark-absinthe- | b2e0bdeeb135ffc2d83d67fe4aea19025dc9a6e6 | [
"Apache-2.0"
] | null | null | null | config/config.exs | MThomassen/graphql-server-benchmark-absinthe- | b2e0bdeeb135ffc2d83d67fe4aea19025dc9a6e6 | [
"Apache-2.0"
] | null | null | null | config/config.exs | MThomassen/graphql-server-benchmark-absinthe- | b2e0bdeeb135ffc2d83d67fe4aea19025dc9a6e6 | [
"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 :graphql_server,
ecto_repos: [GraphqlSe... | 33.363636 | 88 | 0.783833 |
911a4be8bfc04d4f9304fff3e3c0226dc9368a75 | 3,693 | ex | Elixir | lib/ouidata/ets_holder.ex | shamanime/ouidata | 4acba55f56195c6f939b4eefd68472480548e7fe | [
"MIT"
] | null | null | null | lib/ouidata/ets_holder.ex | shamanime/ouidata | 4acba55f56195c6f939b4eefd68472480548e7fe | [
"MIT"
] | null | null | null | lib/ouidata/ets_holder.ex | shamanime/ouidata | 4acba55f56195c6f939b4eefd68472480548e7fe | [
"MIT"
] | null | null | null | defmodule Ouidata.EtsHolder do
@moduledoc false
require Logger
use GenServer
alias Ouidata.DataBuilder
alias Ouidata.Util
@file_version 1
def start_link() do
GenServer.start_link(__MODULE__, [], name: __MODULE__)
end
def init([]) do
make_sure_a_release_is_on_file()
create_current_relea... | 26.378571 | 106 | 0.703493 |
911a5d76ab617e4dbd87a72d29e504992af4bb50 | 33,669 | exs | Elixir | test/surface/integrations/slot_test.exs | kianmeng/surface | 9fe00d3d1c5411f9763f0add96dc84cb8375e54c | [
"MIT"
] | 468 | 2021-03-11T23:10:41.000Z | 2022-03-30T20:12:06.000Z | test/surface/integrations/slot_test.exs | kianmeng/surface | 9fe00d3d1c5411f9763f0add96dc84cb8375e54c | [
"MIT"
] | 248 | 2021-03-12T07:39:37.000Z | 2022-03-31T13:36:44.000Z | test/surface/integrations/slot_test.exs | kianmeng/surface | 9fe00d3d1c5411f9763f0add96dc84cb8375e54c | [
"MIT"
] | 46 | 2021-03-22T09:28:58.000Z | 2022-03-23T21:32:20.000Z | defmodule Surface.SlotTest do
use Surface.ConnCase, async: true
defmodule StatefulComponent do
use Surface.LiveComponent
def render(assigns) do
~F"""
<div>Stateful</div>
"""
end
def handle_event(_, _, socket) do
{:noreply, socket}
end
end
defmodule InnerData do
... | 22.596644 | 170 | 0.490837 |
911a6316a056b1014480745bc68be29e7337d3ef | 1,352 | exs | Elixir | test/module_config_test.exs | hippware/module_config | 9110da77c3a4a5388b3d92e0e7fbbce03e786d01 | [
"MIT"
] | null | null | null | test/module_config_test.exs | hippware/module_config | 9110da77c3a4a5388b3d92e0e7fbbce03e786d01 | [
"MIT"
] | null | null | null | test/module_config_test.exs | hippware/module_config | 9110da77c3a4a5388b3d92e0e7fbbce03e786d01 | [
"MIT"
] | null | null | null | defmodule ModuleConfigTest do
use ExUnit.Case, async: false
use ModuleConfig, otp_app: :module_config
describe "config/1" do
test "retrieves the entire config" do
assert config() == %{value_1: :a, value_2: :b}
end
test "overrides a single value" do
assert config(value_1: :c) == %{value_... | 22.533333 | 76 | 0.623521 |
911a67dba36b87dd10859eece5d39d249155cf17 | 205 | exs | Elixir | priv/repo/migrations/20220203022531_posts.exs | wagncarv/blog_new | bcfde533df5109cfa68b33362db56ef728090b02 | [
"MIT"
] | null | null | null | priv/repo/migrations/20220203022531_posts.exs | wagncarv/blog_new | bcfde533df5109cfa68b33362db56ef728090b02 | [
"MIT"
] | null | null | null | priv/repo/migrations/20220203022531_posts.exs | wagncarv/blog_new | bcfde533df5109cfa68b33362db56ef728090b02 | [
"MIT"
] | null | null | null | defmodule BlogNew.Repo.Migrations.Posts do
use Ecto.Migration
def change do
create table(:posts) do
add :title, :string
add :description, :string
timestamps()
end
end
end
| 15.769231 | 42 | 0.658537 |
911a6ab015d786f3705e014d9939207735c7984b | 1,543 | ex | Elixir | lib/ash/query/operator/is_nil.ex | WolfDan/ash | 7cc60f41a003e2d06b5e19107e22424efafed1be | [
"MIT"
] | null | null | null | lib/ash/query/operator/is_nil.ex | WolfDan/ash | 7cc60f41a003e2d06b5e19107e22424efafed1be | [
"MIT"
] | null | null | null | lib/ash/query/operator/is_nil.ex | WolfDan/ash | 7cc60f41a003e2d06b5e19107e22424efafed1be | [
"MIT"
] | null | null | null | defmodule Ash.Query.Operator.IsNil do
@moduledoc """
left is_nil true/false
This predicate matches if the left is nil when the right is `true` or if the
left is not nil when the right is `false`
"""
use Ash.Query.Operator, operator: :is_nil, predicate?: true
def new(%Ref{} = left, right) when is_boolean... | 23.378788 | 92 | 0.609203 |
911a8a93518627cd3236db02a6a79635eee80d77 | 3,725 | ex | Elixir | lib/mix/phoenix.ex | scrogson/phoenix | e5745b9360fa1163246eb507490f1ce760cc0219 | [
"MIT"
] | null | null | null | lib/mix/phoenix.ex | scrogson/phoenix | e5745b9360fa1163246eb507490f1ce760cc0219 | [
"MIT"
] | null | null | null | lib/mix/phoenix.ex | scrogson/phoenix | e5745b9360fa1163246eb507490f1ce760cc0219 | [
"MIT"
] | null | null | null | defmodule Mix.Phoenix do
# Conveniences for Phoenix tasks.
@moduledoc false
@doc """
Copies files from source dir to target dir
according to the given map.
Files are evaluated against EEx according to
the given binding.
"""
def copy_from(source_dir, target_dir, binding, mapping) when is_list(mapping... | 27.592593 | 98 | 0.581477 |
911a8b381e62d1123404e872c03e735c5ae218c6 | 364 | ex | Elixir | lib/central/admin/tasks/cleanup_task.ex | badosu/teiserver | 19b623aeb7c2ab28756405f7486e92b714777c54 | [
"MIT"
] | 4 | 2021-07-29T16:23:20.000Z | 2022-02-23T05:34:36.000Z | lib/central/admin/tasks/cleanup_task.ex | badosu/teiserver | 19b623aeb7c2ab28756405f7486e92b714777c54 | [
"MIT"
] | 14 | 2021-08-01T02:36:14.000Z | 2022-01-30T21:15:03.000Z | lib/central/admin/tasks/cleanup_task.ex | badosu/teiserver | 19b623aeb7c2ab28756405f7486e92b714777c54 | [
"MIT"
] | 7 | 2021-05-13T12:55:28.000Z | 2022-01-14T06:39:06.000Z | defmodule Central.Admin.CleanupTask do
@moduledoc false
use Oban.Worker, queue: :cleanup
alias Central.Account
@impl Oban.Worker
@spec perform(any) :: :ok
def perform(_) do
# First, find and remove all expired codes
Account.list_codes(search: [expired: true])
|> Enum.each(fn c ->
Account... | 19.157895 | 47 | 0.667582 |
911ab3bb5cb4d8feeeb102c977cb80a8e9bef6e2 | 588 | exs | Elixir | priv/repo/migrations/20210715004105_create_teams.exs | adrianomota/team-budget | b105f47f602a0f7a2c184404235b8d004268c346 | [
"MIT"
] | null | null | null | priv/repo/migrations/20210715004105_create_teams.exs | adrianomota/team-budget | b105f47f602a0f7a2c184404235b8d004268c346 | [
"MIT"
] | null | null | null | priv/repo/migrations/20210715004105_create_teams.exs | adrianomota/team-budget | b105f47f602a0f7a2c184404235b8d004268c346 | [
"MIT"
] | null | null | null | defmodule TeamBudget.Repo.Migrations.CreateTeams do
use Ecto.Migration
def change do
create table(:teams, primary_key: false) do
add :id, :binary_id, primary_key: true
add :name, :string, null: false
add :slug, :string, null: false
add :description, :string
add :user_id,
... | 25.565217 | 95 | 0.647959 |
911aba43706f82e51d928b9665e8ef72759ed685 | 2,266 | exs | Elixir | installer/templates/phx_single/config/dev.exs | faheempatel/phoenix | a83318f2a2284b7ab29b0b86cdd9d2e1f4d0a7c9 | [
"MIT"
] | 18,092 | 2015-01-01T01:51:04.000Z | 2022-03-31T19:37:14.000Z | installer/templates/phx_single/config/dev.exs | faheempatel/phoenix | a83318f2a2284b7ab29b0b86cdd9d2e1f4d0a7c9 | [
"MIT"
] | 3,905 | 2015-01-01T00:22:47.000Z | 2022-03-31T17:06:21.000Z | installer/templates/phx_single/config/dev.exs | faheempatel/phoenix | a83318f2a2284b7ab29b0b86cdd9d2e1f4d0a7c9 | [
"MIT"
] | 3,205 | 2015-01-03T10:58:22.000Z | 2022-03-30T14:55:57.000Z | import Config
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with esbuild to bundle .js and .css sources.
config :<%= @app_name %>, <%= @endpoint_module %>,
# Bindin... | 34.333333 | 84 | 0.673433 |
911ad147f0a9234b8b77004e8def8c35701b805c | 1,803 | ex | Elixir | clients/app_engine/lib/google_api/app_engine/v1/model/list_ingress_rules_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/app_engine/lib/google_api/app_engine/v1/model/list_ingress_rules_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/app_engine/lib/google_api/app_engine/v1/model/list_ingress_rules_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 36.06 | 150 | 0.74487 |
911b18b26ccea2e57fe5d8664c80ae1ecae7d1f3 | 197 | exs | Elixir | elixirv1.3/9.exs | merxer/kata | 5dbbca8b4173029f9311398148de9437a329cf9a | [
"MIT"
] | null | null | null | elixirv1.3/9.exs | merxer/kata | 5dbbca8b4173029f9311398148de9437a329cf9a | [
"MIT"
] | null | null | null | elixirv1.3/9.exs | merxer/kata | 5dbbca8b4173029f9311398148de9437a329cf9a | [
"MIT"
] | null | null | null | case {1, 2, 3} do
{4, 5, 6} -> IO.puts "This clause won't match"
{1, x, 3} when x > 0 -> IO.puts "This clause will match and bind x to 2"
_ -> IO.puts "This clause would match any value"
end
| 32.833333 | 74 | 0.609137 |
911b1aabb09fce52448d63b740719454122b4ab4 | 206 | ex | Elixir | test/fixtures/bootstraps/lib/bootstraps.ex | jayjun/bootleg | 2283ad22810178625c45eb2661624fac914befdd | [
"MIT"
] | 423 | 2017-07-19T18:40:45.000Z | 2021-12-03T08:26:15.000Z | test/fixtures/bootstraps/lib/bootstraps.ex | jayjun/bootleg | 2283ad22810178625c45eb2661624fac914befdd | [
"MIT"
] | 115 | 2017-07-19T18:30:14.000Z | 2020-10-27T20:53:32.000Z | test/fixtures/bootstraps/lib/bootstraps.ex | jayjun/bootleg | 2283ad22810178625c45eb2661624fac914befdd | [
"MIT"
] | 39 | 2017-07-20T03:14:18.000Z | 2020-11-18T13:39:52.000Z | defmodule Bootstraps do
@moduledoc """
Documentation for Bootstraps.
"""
@doc """
Hello world.
## Examples
iex> Bootstraps.hello
:world
"""
def hello do
:world
end
end
| 10.842105 | 31 | 0.587379 |
911b3297c6a244715054db5010c885e963585aa3 | 912 | exs | Elixir | src/145/problem145.exs | fredericojordan/project-euler | 75c3f519d5a6ad610362b6904f8fa4d1cde05448 | [
"MIT"
] | 9 | 2018-05-06T04:43:08.000Z | 2020-12-01T20:51:34.000Z | src/145/problem145.exs | fredericojordan/project-euler | 75c3f519d5a6ad610362b6904f8fa4d1cde05448 | [
"MIT"
] | null | null | null | src/145/problem145.exs | fredericojordan/project-euler | 75c3f519d5a6ad610362b6904f8fa4d1cde05448 | [
"MIT"
] | null | null | null | #!/usr/bin/env elixir
defmodule Problem145 do
@moduledoc """
Some positive integers n have the property that the sum `[ n + reverse(n) ]` consists entirely of odd (decimal) digits. For instance, `36 + 63 = 99` and `409 + 904 = 1313`. We will call such numbers reversible; so 36, 63, 409, and 904 are reversible. Lead... | 30.4 | 314 | 0.642544 |
911b582d034b68415ccf29dead92a9db9a505a06 | 635 | ex | Elixir | apps/dockup/lib/dockup/backends/compose/htpasswd.ex | rudydydy/dockup | 0d05d1ef65cc5523800bd852178361521cd3e7d8 | [
"MIT"
] | 1 | 2019-08-20T07:45:10.000Z | 2019-08-20T07:45:10.000Z | apps/dockup/lib/dockup/backends/compose/htpasswd.ex | rudydydy/dockup | 0d05d1ef65cc5523800bd852178361521cd3e7d8 | [
"MIT"
] | null | null | null | apps/dockup/lib/dockup/backends/compose/htpasswd.ex | rudydydy/dockup | 0d05d1ef65cc5523800bd852178361521cd3e7d8 | [
"MIT"
] | 2 | 2019-03-08T10:51:34.000Z | 2019-08-20T07:45:13.000Z | defmodule Dockup.Backends.Compose.Htpasswd do
require Logger
def write do
case Application.fetch_env(:dockup, :htpasswd) do
{:ok, htpasswd} ->
base_domain = Application.fetch_env!(:dockup, :base_domain)
logio_domain = "logio." <> base_domain
htpasswd_dir = Application.fetch_env!(:... | 31.75 | 99 | 0.651969 |
911b631738e8366510c290dd621b8338d45ae566 | 5,712 | ex | Elixir | test/support/fixtures/directive.ex | arturs678/absinthe | 0d842c46e5d21399d66919cdaadfa8927fbca74d | [
"MIT"
] | 4,101 | 2016-03-02T03:49:20.000Z | 2022-03-31T05:46:01.000Z | test/support/fixtures/directive.ex | arturs678/absinthe | 0d842c46e5d21399d66919cdaadfa8927fbca74d | [
"MIT"
] | 889 | 2016-03-02T16:06:59.000Z | 2022-03-31T20:24:12.000Z | test/support/fixtures/directive.ex | arturs678/absinthe | 0d842c46e5d21399d66919cdaadfa8927fbca74d | [
"MIT"
] | 564 | 2016-03-02T07:49:59.000Z | 2022-03-06T14:40:59.000Z | defmodule Absinthe.Fixtures.Directive do
defmodule TestSchemaDescriptionKeyword do
use Absinthe.Schema
@module_attribute "goodbye"
defmodule NestedModule do
def nested_function(arg1) do
arg1
end
end
query do
end
directive :normal_string, description: "string" do
... | 24.20339 | 99 | 0.685049 |
911b72f2672692fadb63f9de3157a44fda4c5aa6 | 2,826 | exs | Elixir | learning/metaprogramming_elixir/chapter_2.exs | Mdlkxzmcp/various_elixir | c87527b7118a0c74a042073c04d2228025888ddf | [
"MIT"
] | 2 | 2020-01-20T20:15:20.000Z | 2020-02-27T11:08:42.000Z | learning/metaprogramming_elixir/chapter_2.exs | Mdlkxzmcp/various_elixir | c87527b7118a0c74a042073c04d2228025888ddf | [
"MIT"
] | null | null | null | learning/metaprogramming_elixir/chapter_2.exs | Mdlkxzmcp/various_elixir | c87527b7118a0c74a042073c04d2228025888ddf | [
"MIT"
] | null | null | null | # Extending Elixir with Metaprogramming
## Custom Language Constructs
### Re-Creating the if Macro
defmodule ControlFlow do
defmacro my_if(expr, do: if_block), do: if(expr, do: if_block, else: nil)
defmacro my_if(expr, do: if_block, else: else_block) do
quote do
case unquote(expr) do
result wh... | 20.933333 | 75 | 0.567587 |
911b8c75d062e7e5839f11a371cf33cbe3c28b6f | 15,799 | ex | Elixir | lib/nectar/worker.ex | kcelixir/apis | 4c74d2e7e198db00d46dde721db80de28940ff63 | [
"Apache-2.0"
] | 1 | 2018-02-15T18:21:04.000Z | 2018-02-15T18:21:04.000Z | lib/nectar/worker.ex | kcelixir/apis | 4c74d2e7e198db00d46dde721db80de28940ff63 | [
"Apache-2.0"
] | 5 | 2018-02-15T18:36:08.000Z | 2018-02-18T03:33:14.000Z | lib/nectar/worker.ex | kcelixir/apis | 4c74d2e7e198db00d46dde721db80de28940ff63 | [
"Apache-2.0"
] | 4 | 2018-02-14T18:41:28.000Z | 2018-03-14T15:15:07.000Z | defmodule Nectar.Worker do
@moduledoc """
Documentation for Nectar.Worker.
"""
use GenServer
require Logger
alias Nectar.Request
alias Nectar.Response
def init(args) do
{:ok, args}
end
def start_link(socket) do
Task.start_link(fn ->
{:ok, client} = :gen_tcp.accept(socket)
Lo... | 37.261792 | 95 | 0.679853 |
911b957c1924c928b9322d7f1e6b630be3dc7b80 | 830 | exs | Elixir | integration_test/support/zk_helper.exs | MishaConway/cafex | 32965b7e099bc45de24c229cc76f7b83b35ff7b4 | [
"Apache-2.0"
] | null | null | null | integration_test/support/zk_helper.exs | MishaConway/cafex | 32965b7e099bc45de24c229cc76f7b83b35ff7b4 | [
"Apache-2.0"
] | null | null | null | integration_test/support/zk_helper.exs | MishaConway/cafex | 32965b7e099bc45de24c229cc76f7b83b35ff7b4 | [
"Apache-2.0"
] | null | null | null | defmodule ZKHelper do
def connect(zk_cfg) do
zk_servers = Keyword.get(zk_cfg, :servers)
|> Enum.map(fn {h, p} -> {:erlang.bitstring_to_list(h), p} end)
zk_timeout = Keyword.get(zk_cfg, :timeout)
:erlzk.connect(zk_servers, zk_timeout)
end
def close(pid) do
:erlzk.close(pid)
end
... | 25.151515 | 78 | 0.527711 |
911bb6e064338450d6c003dd51f7557257018557 | 1,053 | ex | Elixir | test/support/channel_case.ex | gabriel-letarte/functional-todo-list | 06d292a66219c7a0114059be8b268d4fec4de95f | [
"MIT"
] | null | null | null | test/support/channel_case.ex | gabriel-letarte/functional-todo-list | 06d292a66219c7a0114059be8b268d4fec4de95f | [
"MIT"
] | null | null | null | test/support/channel_case.ex | gabriel-letarte/functional-todo-list | 06d292a66219c7a0114059be8b268d4fec4de95f | [
"MIT"
] | null | null | null | defmodule FunctionalTodoList.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 ... | 23.931818 | 80 | 0.716049 |
911bca27e0838bfc42e6b4da1b864c2a25e67214 | 2,935 | ex | Elixir | clients/container_analysis/lib/google_api/container_analysis/v1/model/upgrade_occurrence.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/container_analysis/lib/google_api/container_analysis/v1/model/upgrade_occurrence.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/container_analysis/lib/google_api/container_analysis/v1/model/upgrade_occurrence.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... | 52.410714 | 323 | 0.756729 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.