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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3fa29fcbf6db4a7a64e1b82e7607c986453d875d | 1,108 | ex | Elixir | src/lib/planning_poker_web/live/page_live.ex | datajohnny/phoenix_docker_sample | 1dfea4ebff1ba2c4c59e5d01cbe1e8d31086152f | [
"MIT"
] | null | null | null | src/lib/planning_poker_web/live/page_live.ex | datajohnny/phoenix_docker_sample | 1dfea4ebff1ba2c4c59e5d01cbe1e8d31086152f | [
"MIT"
] | null | null | null | src/lib/planning_poker_web/live/page_live.ex | datajohnny/phoenix_docker_sample | 1dfea4ebff1ba2c4c59e5d01cbe1e8d31086152f | [
"MIT"
] | null | null | null | defmodule PlanningPokerWeb.PageLive do
use PlanningPokerWeb, :live_view
@impl true
def mount(_params, _session, socket) do
{:ok, assign(socket, query: "", results: %{})}
end
@impl true
def handle_event("suggest", %{"q" => query}, socket) do
{:noreply, assign(socket, results: search(query), query: ... | 27.7 | 84 | 0.608303 |
3fa2b62644bb68bbde8efad5d963a3cd2a3905e8 | 1,790 | ex | Elixir | clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/customer_unclaim_device_request.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/customer_unclaim_device_request.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/customer_unclaim_device_request.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.423077 | 205 | 0.764804 |
3fa2bd9c3c7e36f3f27b449fd53b84734e8bb317 | 767 | ex | Elixir | lang/elixir/learning-fp-with-elixir/exercises/lib/chapter3/third.ex | Tyyagoo/studies | f8fcc3a539cfb6d04a149174c88bf2208e220b96 | [
"Unlicense"
] | null | null | null | lang/elixir/learning-fp-with-elixir/exercises/lib/chapter3/third.ex | Tyyagoo/studies | f8fcc3a539cfb6d04a149174c88bf2208e220b96 | [
"Unlicense"
] | null | null | null | lang/elixir/learning-fp-with-elixir/exercises/lib/chapter3/third.ex | Tyyagoo/studies | f8fcc3a539cfb6d04a149174c88bf2208e220b96 | [
"Unlicense"
] | null | null | null | defmodule Exercises.Chapter3.Third do
@moduledoc """
Create a function that calculates income tax following these rules: a salary
equal or below $2,000 pays no tax; below or equal to $3,000 pays 5%; below
or equal to $6,000 pays 10%; everything higher than $6,000 pays 15%.
"""
@doc """
Calculate taxes fr... | 23.242424 | 78 | 0.619296 |
3fa2ca4cb3f845eff40e0eeca10df416ce793937 | 2,971 | ex | Elixir | lib/zstream.ex | hazy/zstream | a96e37693a8763167ff2ecee6edb7e8c5df3b7b6 | [
"MIT"
] | 30 | 2019-08-19T17:03:58.000Z | 2021-11-04T05:48:40.000Z | lib/zstream.ex | hazy/zstream | a96e37693a8763167ff2ecee6edb7e8c5df3b7b6 | [
"MIT"
] | 6 | 2019-03-28T15:18:43.000Z | 2021-04-13T15:09:55.000Z | lib/zstream.ex | hazy/zstream | a96e37693a8763167ff2ecee6edb7e8c5df3b7b6 | [
"MIT"
] | 11 | 2018-12-27T20:55:51.000Z | 2022-01-31T21:43:23.000Z | defmodule Zstream do
@moduledoc """
Module for reading and writing ZIP file stream.
"""
defmodule Entry do
@type t :: %__MODULE__{
name: String.t(),
compressed_size: integer(),
mtime: NaiveDateTime.t(),
size: integer(),
extras: list()
}
... | 32.293478 | 147 | 0.663413 |
3fa3099d1a6d0d7f8949170efbfd6b577c188d0c | 302 | exs | Elixir | config/test.exs | joaomdmoura/keeper | 3541dc4dcf06afa176bcd5827408accdd3d05f9d | [
"Apache-2.0"
] | 29 | 2016-11-06T05:43:17.000Z | 2020-01-05T00:35:57.000Z | config/test.exs | joaomdmoura/escort | 3541dc4dcf06afa176bcd5827408accdd3d05f9d | [
"Apache-2.0"
] | 9 | 2016-11-28T05:54:56.000Z | 2018-06-01T13:36:51.000Z | config/test.exs | joaomdmoura/escort | 3541dc4dcf06afa176bcd5827408accdd3d05f9d | [
"Apache-2.0"
] | 4 | 2016-11-28T20:31:02.000Z | 2019-07-12T20:26:57.000Z | use Mix.Config
# Disable colors during tests.
config :logger, :console, colors: [enabled: false]
# Use higher stacktrace depth.
config :phoenix, :stacktrace_depth, 20
# Make comeonin faster by reducing its encryption power
config :comeonin, :bcrypt_log_rounds, 4
config :comeonin, :pbkdf2_rounds, 1
| 25.166667 | 55 | 0.774834 |
3fa30f97dd0838b2d0a95c4b9b5c4e18a4b944aa | 825 | exs | Elixir | test/support/test_config.exs | vigetlabs/colonel_kurtz_ex | ed18e447657191090c9164580948bc8288c49cc7 | [
"MIT"
] | 1 | 2020-05-20T18:31:40.000Z | 2020-05-20T18:31:40.000Z | test/support/test_config.exs | vigetlabs/colonel_kurtz_ex | ed18e447657191090c9164580948bc8288c49cc7 | [
"MIT"
] | 11 | 2020-05-06T13:32:43.000Z | 2020-05-15T19:18:39.000Z | test/support/test_config.exs | vigetlabs/colonel_kurtz_ex | ed18e447657191090c9164580948bc8288c49cc7 | [
"MIT"
] | null | null | null | defmodule ColonelKurtzTest.TestConfig do
@config Application.get_env(:colonel_kurtz_ex, ColonelKurtz)
@moduledoc false
defmacro __using__(_opts) do
quote do
import ColonelKurtzTest.TestConfig, only: :functions
setup do
set_config(unquote(@config))
on_exit(fn -> set_config(unquote... | 22.916667 | 64 | 0.713939 |
3fa31b912b04b7c4f25dfc88e22824ac7a7daf31 | 354 | ex | Elixir | apps/banking_api/lib/banking_api/schema.ex | ckoliveira/banking_api | 3a4077a97e2cfcb2475bafd582a836bd03f6c6cc | [
"Apache-2.0"
] | null | null | null | apps/banking_api/lib/banking_api/schema.ex | ckoliveira/banking_api | 3a4077a97e2cfcb2475bafd582a836bd03f6c6cc | [
"Apache-2.0"
] | null | null | null | apps/banking_api/lib/banking_api/schema.ex | ckoliveira/banking_api | 3a4077a97e2cfcb2475bafd582a836bd03f6c6cc | [
"Apache-2.0"
] | null | null | null | defmodule BankingApi.Schema do
@moduledoc """
Module to help the creation and maniputation of schemas.
"""
defmacro __using__(_opts) do
quote do
use Ecto.Schema
import Ecto.Changeset
@type t() :: %__MODULE__{}
@primary_key {:id, :binary_id, autogenerate: true}
@foreign_key_... | 18.631579 | 58 | 0.658192 |
3fa3213829ef0f2afbbf6f258064adde3c82428b | 1,110 | ex | Elixir | lib/guilda_web/views/view_helpers.ex | clcmo/GuildaEx | 0e30fb8d9b7dfd54c35ae237329791003d6a46bf | [
"MIT"
] | 10 | 2020-09-05T20:25:05.000Z | 2022-01-28T14:02:36.000Z | lib/guilda_web/views/view_helpers.ex | clcmo/GuildaEx | 0e30fb8d9b7dfd54c35ae237329791003d6a46bf | [
"MIT"
] | 11 | 2020-09-07T01:09:55.000Z | 2022-02-06T00:58:48.000Z | lib/guilda_web/views/view_helpers.ex | clcmo/GuildaEx | 0e30fb8d9b7dfd54c35ae237329791003d6a46bf | [
"MIT"
] | 3 | 2020-10-03T01:53:08.000Z | 2022-01-28T14:03:09.000Z | defmodule GuildaWeb.ViewHelpers do
@moduledoc """
View Helpers used across the app.
"""
@spec format_date(Timex.Types.valid_datetime()) :: String.t() | no_return()
def format_date(date) do
Timex.format!(date, "{0D}/{0M}/{YYYY}")
end
@doc """
Format the given number of seconds in hh:mm:ss.
"""
... | 28.461538 | 93 | 0.635135 |
3fa32a3a8528154fb32439161e3c5924dc7a5a84 | 1,638 | ex | Elixir | lib/chatsnek/move_safety.ex | xtagon/chatsnek | a2bc762da02467631d17ddc8b47217f4a49b740b | [
"MIT"
] | 3 | 2020-12-13T15:24:40.000Z | 2021-09-22T17:45:40.000Z | lib/chatsnek/move_safety.ex | xtagon/chatsnek | a2bc762da02467631d17ddc8b47217f4a49b740b | [
"MIT"
] | 8 | 2020-12-14T01:25:44.000Z | 2021-10-03T16:12:23.000Z | lib/chatsnek/move_safety.ex | xtagon/chatsnek | a2bc762da02467631d17ddc8b47217f4a49b740b | [
"MIT"
] | null | null | null | defmodule ChatSnek.MoveSafety do
@moves ["up", "down", "left", "right"]
def decide_safe_move(candidate_move, fallback_move, move_request) do
safe_moves = safe_moves(move_request)
no_moves_are_safe = Enum.empty?(safe_moves)
if no_moves_are_safe do
candidate_move || fallback_move
else
ca... | 26 | 96 | 0.578144 |
3fa38d4885e0745e833e199aaf5dc1746d0203d4 | 275 | exs | Elixir | apps/core/priv/prm_repo/migrations/20180219114908_add_party_info_fields.exs | ehealth-ua/ehealth.api | 4ffe26a464fe40c95fb841a4aa2e147068f65ca2 | [
"Apache-2.0"
] | 8 | 2019-06-14T11:34:49.000Z | 2021-08-05T19:14:24.000Z | apps/core/priv/prm_repo/migrations/20180219114908_add_party_info_fields.exs | edenlabllc/ehealth.api.public | 4ffe26a464fe40c95fb841a4aa2e147068f65ca2 | [
"Apache-2.0"
] | 1 | 2019-07-08T15:20:22.000Z | 2019-07-08T15:20:22.000Z | apps/core/priv/prm_repo/migrations/20180219114908_add_party_info_fields.exs | ehealth-ua/ehealth.api | 4ffe26a464fe40c95fb841a4aa2e147068f65ca2 | [
"Apache-2.0"
] | 6 | 2018-05-11T13:59:32.000Z | 2022-01-19T20:15:22.000Z | defmodule Core.PRMRepo.Migrations.AddPartyInfoFields do
use Ecto.Migration
def change do
alter table(:parties) do
add(:educations, :jsonb)
add(:qualifications, :jsonb)
add(:specialities, :jsonb)
add(:science_degree, :jsonb)
end
end
end
| 21.153846 | 55 | 0.68 |
3fa3b94d5cc0895029ca69a571e0d07261a6023a | 3,713 | ex | Elixir | lib/glimesh/graphql/resolvers/channel_resolver.ex | DeeRock94/glimesh.tv | e4517e4e3b03f98a3cab2d16b82f365e3b23fd9d | [
"MIT"
] | null | null | null | lib/glimesh/graphql/resolvers/channel_resolver.ex | DeeRock94/glimesh.tv | e4517e4e3b03f98a3cab2d16b82f365e3b23fd9d | [
"MIT"
] | null | null | null | lib/glimesh/graphql/resolvers/channel_resolver.ex | DeeRock94/glimesh.tv | e4517e4e3b03f98a3cab2d16b82f365e3b23fd9d | [
"MIT"
] | null | null | null | defmodule Glimesh.Resolvers.ChannelResolver do
@moduledoc false
alias Glimesh.Accounts
alias Glimesh.ChannelCategories
alias Glimesh.ChannelLookups
alias Glimesh.Payments
alias Glimesh.Streams
# Channels
def all_channels(%{status: status, category_slug: category_slug}, _) do
case ChannelCategories... | 26.905797 | 100 | 0.70132 |
3fa3ce80d8496b8d490a8a46a916d4abc2958c04 | 345 | exs | Elixir | mix.exs | jhonndabi/banking-api-challenge | 1e13c675b02c8e62a76e82b0a0dd6a44306a211e | [
"Apache-2.0"
] | null | null | null | mix.exs | jhonndabi/banking-api-challenge | 1e13c675b02c8e62a76e82b0a0dd6a44306a211e | [
"Apache-2.0"
] | null | null | null | mix.exs | jhonndabi/banking-api-challenge | 1e13c675b02c8e62a76e82b0a0dd6a44306a211e | [
"Apache-2.0"
] | 1 | 2021-04-20T19:05:48.000Z | 2021-04-20T19:05:48.000Z | defmodule BankingApiChallenge.Umbrella.MixProject do
use Mix.Project
def project do
[
apps_path: "apps",
version: "0.1.0",
start_permanent: Mix.env() == :prod,
deps: deps(),
aliases: aliases()
]
end
defp deps do
[]
end
defp aliases do
[
setup: ["cmd mix... | 14.375 | 52 | 0.562319 |
3fa42083c75efff10944786c6c68aac68002c860 | 4,455 | ex | Elixir | lib/oli_web/live/products/products_view.ex | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | null | null | null | lib/oli_web/live/products/products_view.ex | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | 9 | 2021-11-02T16:52:09.000Z | 2022-03-25T15:14:01.000Z | lib/oli_web/live/products/products_view.ex | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | null | null | null | defmodule OliWeb.Products.ProductsView do
use Surface.LiveView, layout: {OliWeb.LayoutView, "live.html"}
alias Oli.Repo
alias OliWeb.Products.Create
alias OliWeb.Common.Filter
alias OliWeb.Common.Listing
alias OliWeb.Common.Breadcrumb
alias Oli.Authoring.Course
alias Oli.Accounts.Author
alias Oli.Deli... | 28.196203 | 98 | 0.654321 |
3fa4218a44ac112cc913087b3e95d212599fde29 | 1,986 | ex | Elixir | lib/drunkard_web/controllers/ingredient_controller.ex | shaddysignal/drunkard | 8365c75cd98414dfe38481956e90dda26a177bdd | [
"Unlicense"
] | 2 | 2020-07-05T21:27:33.000Z | 2021-12-12T22:56:00.000Z | lib/drunkard_web/controllers/ingredient_controller.ex | shaddysignal/drunkard | 8365c75cd98414dfe38481956e90dda26a177bdd | [
"Unlicense"
] | 1 | 2021-05-11T08:14:48.000Z | 2021-05-11T08:14:48.000Z | lib/drunkard_web/controllers/ingredient_controller.ex | shaddysignal/drunkard | 8365c75cd98414dfe38481956e90dda26a177bdd | [
"Unlicense"
] | 1 | 2020-07-05T21:27:46.000Z | 2020-07-05T21:27:46.000Z | defmodule DrunkardWeb.IngredientController do
use DrunkardWeb, :controller
alias Drunkard.Recipes
alias Drunkard.Recipes.Ingredient
def index(conn, _params) do
ingredients = Recipes.list_ingredients()
render(conn, "index.html", ingredients: ingredients)
end
def new(conn, _params) do
changeset... | 31.52381 | 79 | 0.677241 |
3fa44af0fef65f6ee9948ef3d4cd2f0ef29606b7 | 1,121 | ex | Elixir | apps/customer/lib/customer/multi.ex | JaiMali/job_search-1 | 5fe1afcd80aa5d55b92befed2780cd6721837c88 | [
"MIT"
] | 102 | 2017-05-21T18:24:04.000Z | 2022-03-10T12:53:20.000Z | apps/customer/lib/customer/multi.ex | JaiMali/job_search-1 | 5fe1afcd80aa5d55b92befed2780cd6721837c88 | [
"MIT"
] | 2 | 2017-05-21T01:53:30.000Z | 2017-12-01T00:27:06.000Z | apps/customer/lib/customer/multi.ex | JaiMali/job_search-1 | 5fe1afcd80aa5d55b92befed2780cd6721837c88 | [
"MIT"
] | 18 | 2017-05-22T09:51:36.000Z | 2021-09-24T00:57:01.000Z | defmodule Customer.Multi do
defmacro __using__([model: model]) do
model = Macro.expand(model, __ENV__)
quote location: :keep do
alias Ecto.Multi
def insert!(repo, params) do
unquote(model).changeset(struct(unquote(model)), params)
|> repo.insert!
end
def insert(rep... | 24.911111 | 96 | 0.594112 |
3fa485be3cf5f9c3625b672f11aef8740381cb65 | 15,435 | ex | Elixir | lib/ash_json_api/serializer.ex | zimt28/ash_json_api | b26500b7d80dda5c65c9fd1e8abdcd2840d408bf | [
"MIT"
] | null | null | null | lib/ash_json_api/serializer.ex | zimt28/ash_json_api | b26500b7d80dda5c65c9fd1e8abdcd2840d408bf | [
"MIT"
] | null | null | null | lib/ash_json_api/serializer.ex | zimt28/ash_json_api | b26500b7d80dda5c65c9fd1e8abdcd2840d408bf | [
"MIT"
] | null | null | null | defmodule AshJsonApi.Serializer do
@moduledoc false
alias Plug.Conn
def serialize_to_many_relationship(request, source_record, relationship, records) do
links =
%{self: at_host(request, request.url)}
|> add_related_link(request, source_record, relationship)
%{
links: links,
data... | 25.941176 | 98 | 0.62151 |
3fa498622836bc265c2db4834112dc8b8314663e | 403 | ex | Elixir | lib/ex_vmstats/backends/ex_statsd.ex | tongdao/ex_vmstats | bda37f23f8cb8dc9794a1cbbd44f9b9e1c65eba6 | [
"Apache-2.0"
] | 16 | 2015-11-11T16:24:59.000Z | 2021-06-07T06:50:35.000Z | lib/ex_vmstats/backends/ex_statsd.ex | tongdao/ex_vmstats | bda37f23f8cb8dc9794a1cbbd44f9b9e1c65eba6 | [
"Apache-2.0"
] | 7 | 2015-11-22T22:32:29.000Z | 2022-01-29T08:52:13.000Z | lib/ex_vmstats/backends/ex_statsd.ex | tongdao/ex_vmstats | bda37f23f8cb8dc9794a1cbbd44f9b9e1c65eba6 | [
"Apache-2.0"
] | 11 | 2015-11-11T09:19:13.000Z | 2021-11-15T03:11:17.000Z | defmodule ExVmstats.Backends.ExStatsD do
def counter(value, metric) do
ExStatsD.counter(value, metric, sample_size: 1)
end
def gauge(value, metric) do
ExStatsD.gauge(value, metric, sample_size: 1)
end
def histogram(value, metric) do
ExStatsD.histogram(value, metric, sample_size: 1)
end
def ... | 23.705882 | 53 | 0.722084 |
3fa4aafc4acc824977d4448e2772a7cb02a99a21 | 189 | ex | Elixir | apps/worker_manager/lib/worker_manager/queue.ex | TheAustinSeven/Dredd | 2a5429bb3212c97689181017cdd0d3283dbddafd | [
"BSD-3-Clause"
] | null | null | null | apps/worker_manager/lib/worker_manager/queue.ex | TheAustinSeven/Dredd | 2a5429bb3212c97689181017cdd0d3283dbddafd | [
"BSD-3-Clause"
] | null | null | null | apps/worker_manager/lib/worker_manager/queue.ex | TheAustinSeven/Dredd | 2a5429bb3212c97689181017cdd0d3283dbddafd | [
"BSD-3-Clause"
] | null | null | null | defmodule WorkerManager.Queue do
use GenServer
def start_link(name) do
GenServer.start_link(__MODULE__, nil, name: name)
end
def init(_) do
{:ok, :queue.new()}
end
end
| 14.538462 | 53 | 0.68254 |
3fa4b28c7ab5d3ad43b546ad7b181ec6b60a7cd1 | 23,017 | ex | Elixir | lib/elixir/lib/kernel/typespec.ex | wstrinz/elixir | 1048b34d6c816f8e5dbd4fdbaaf9baa41b4f0d95 | [
"Apache-2.0"
] | 1 | 2021-04-28T21:35:01.000Z | 2021-04-28T21:35:01.000Z | lib/elixir/lib/kernel/typespec.ex | wstrinz/elixir | 1048b34d6c816f8e5dbd4fdbaaf9baa41b4f0d95 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/kernel/typespec.ex | wstrinz/elixir | 1048b34d6c816f8e5dbd4fdbaaf9baa41b4f0d95 | [
"Apache-2.0"
] | 1 | 2018-04-18T11:25:33.000Z | 2018-04-18T11:25:33.000Z | defmodule Kernel.Typespec do
# TODO: Remove deprecated code on 2.0 and move this module to Module.Typespec.
@moduledoc false
## Deprecated API moved to Code.Typespec
@doc false
def spec_to_ast(name, spec) do
IO.warn(
"Kernel.Typespec.spec_to_ast/2 is deprecated, please use Code.Typespec.spec_to_qu... | 31.020216 | 106 | 0.62406 |
3fa4b9ea6c2e6d8d4fa18f5179e931385de8603d | 187 | ex | Elixir | examples/foo_umbrella/apps/foo/lib/foo.ex | katafrakt/modular | d8bd94b91e20a51b13b28b71d1602e3877518688 | [
"MIT"
] | 7 | 2019-11-21T19:51:50.000Z | 2021-12-23T02:42:14.000Z | examples/foo_umbrella/apps/foo/lib/foo.ex | katafrakt/modular | d8bd94b91e20a51b13b28b71d1602e3877518688 | [
"MIT"
] | 1 | 2021-03-08T00:39:55.000Z | 2021-03-08T00:39:55.000Z | examples/foo_umbrella/apps/foo/lib/foo.ex | katafrakt/modular | d8bd94b91e20a51b13b28b71d1602e3877518688 | [
"MIT"
] | 2 | 2020-09-17T17:46:26.000Z | 2021-03-05T12:28:47.000Z | defmodule Foo do
@moduledoc """
Documentation for Foo.
"""
@doc """
Hello world.
## Examples
iex> Foo.hello()
:world
"""
def hello do
:world
end
end
| 9.842105 | 24 | 0.534759 |
3fa4c2d5c31cf8e8415097dc3d9918291e9b3361 | 1,928 | ex | Elixir | clients/you_tube/lib/google_api/you_tube/v3/model/super_sticker_metadata.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/you_tube/lib/google_api/you_tube/v3/model/super_sticker_metadata.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/you_tube/lib/google_api/you_tube/v3/model/super_sticker_metadata.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 34.428571 | 135 | 0.720954 |
3fa4da121743e312b88768deb0bc949f747d0050 | 1,674 | ex | Elixir | lib/koans/10_structs.ex | krlsdu/elixir_learning | 05e2be664044689f8b4dfb2081a78009294810ec | [
"MIT"
] | null | null | null | lib/koans/10_structs.ex | krlsdu/elixir_learning | 05e2be664044689f8b4dfb2081a78009294810ec | [
"MIT"
] | null | null | null | lib/koans/10_structs.ex | krlsdu/elixir_learning | 05e2be664044689f8b4dfb2081a78009294810ec | [
"MIT"
] | null | null | null | defmodule Structs do
use Koans
@intro "Structs"
defmodule Person do
defstruct [:name, :age]
end
koan "Structs are defined and named after a module" do
person = %Person{}
assert person == %Structs.Person{name: nil,age: nil}
end
koan "Unless previously defined, fields begin as nil" do
no... | 27.9 | 102 | 0.654719 |
3fa4f3576142ff953c81f0b4e69bac4463d36c75 | 1,051 | ex | Elixir | apps/seeker/test/support/conn_case.ex | sarat1669/seeker | 743c6ad5a69a6e62c95cfd988b0e2f32129ab2aa | [
"Apache-2.0"
] | 1 | 2019-07-10T10:00:56.000Z | 2019-07-10T10:00:56.000Z | apps/seeker/test/support/conn_case.ex | spawnfest/factor18 | 743c6ad5a69a6e62c95cfd988b0e2f32129ab2aa | [
"Apache-2.0"
] | null | null | null | apps/seeker/test/support/conn_case.ex | spawnfest/factor18 | 743c6ad5a69a6e62c95cfd988b0e2f32129ab2aa | [
"Apache-2.0"
] | null | null | null | defmodule SeekerWeb.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 datastructures and query the data layer.
Finally, if the ... | 26.948718 | 68 | 0.719315 |
3fa4fa06679b4e8dd5423f841d6e3634e516c582 | 757 | exs | Elixir | implements/nth-prime/example.exs | MickeyOoh/Exercises | 3b34e7fdab4a09e0269d20c68531b4fb75bb7f16 | [
"MIT"
] | null | null | null | implements/nth-prime/example.exs | MickeyOoh/Exercises | 3b34e7fdab4a09e0269d20c68531b4fb75bb7f16 | [
"MIT"
] | 1 | 2018-06-19T18:59:41.000Z | 2018-06-19T18:59:41.000Z | implements/nth-prime/example.exs | MickeyOoh/Exercises | 3b34e7fdab4a09e0269d20c68531b4fb75bb7f16 | [
"MIT"
] | null | null | null | defmodule Prime do
@doc """
Generates the nth prime.
"""
@spec nth(non_neg_integer) :: non_neg_integer
def nth(count) do
if count < 1, do: raise(ArgumentError)
nth(count, 1000)
end
defp nth(count, max) do
primes = primes_to(max)
cond do
Enum.count(primes) < count ->
nth... | 18.925 | 47 | 0.546896 |
3fa50b8a85674c0ada3911346d1106becb86b684 | 72 | ex | Elixir | lib/satellite_web/views/api/request_view.ex | joshnuss/satellite-prototype | 9cf813d8b75efab9a8118f9fecb9ac6f70bd841a | [
"MIT"
] | null | null | null | lib/satellite_web/views/api/request_view.ex | joshnuss/satellite-prototype | 9cf813d8b75efab9a8118f9fecb9ac6f70bd841a | [
"MIT"
] | null | null | null | lib/satellite_web/views/api/request_view.ex | joshnuss/satellite-prototype | 9cf813d8b75efab9a8118f9fecb9ac6f70bd841a | [
"MIT"
] | null | null | null | defmodule SatelliteWeb.API.RequestView do
use SatelliteWeb, :view
end
| 18 | 41 | 0.819444 |
3fa51d5878455fc8b09b1e45b88cd8567c715feb | 1,145 | exs | Elixir | elixir/codes-from-books/little-elixir/cap11/concuerror_playground/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/cap11/concuerror_playground/config/config.exs | trxeste/wrk | 3e05e50ff621866f0361cc8494ce8f6bb4d97fae | [
"BSD-3-Clause"
] | null | null | null | elixir/codes-from-books/little-elixir/cap11/concuerror_playground/config/config.exs | trxeste/wrk | 3e05e50ff621866f0361cc8494ce8f6bb4d97fae | [
"BSD-3-Clause"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the paren... | 36.935484 | 73 | 0.757205 |
3fa5279492b03e1997b64239c1672aff6f7d6f05 | 1,199 | exs | Elixir | mix.exs | sergeypopol/apisex_auth_bearer | c32f6cb4534a4995bbb221f6d029f8de8f156623 | [
"Apache-2.0"
] | 2 | 2019-05-16T16:29:20.000Z | 2021-04-17T04:16:18.000Z | mix.exs | sergeypopol/apisex_auth_bearer | c32f6cb4534a4995bbb221f6d029f8de8f156623 | [
"Apache-2.0"
] | 1 | 2018-10-31T18:37:31.000Z | 2018-10-31T18:38:44.000Z | mix.exs | tanguilp/apisex_auth_bearer | c32f6cb4534a4995bbb221f6d029f8de8f156623 | [
"Apache-2.0"
] | null | null | null | defmodule APIacAuthBearer.Mixfile do
use Mix.Project
def project do
[
app: :apiac_auth_bearer,
description: "An APIac authenticator plug for API authentication using the HTTP Bearer scheme",
version: "2.0.0",
elixir: "~> 1.10",
start_permanent: Mix.env() == :prod,
deps: deps... | 23.98 | 101 | 0.533778 |
3fa5288be01e1912071e1a0aa0a8c8479a7d0a37 | 77 | exs | Elixir | test/views/layout_view_test.exs | noobiehacker/phoenixFilter | 42d913cc0b76b58ccbddf0a37b8f21dc6c639a3d | [
"Apache-2.0"
] | null | null | null | test/views/layout_view_test.exs | noobiehacker/phoenixFilter | 42d913cc0b76b58ccbddf0a37b8f21dc6c639a3d | [
"Apache-2.0"
] | null | null | null | test/views/layout_view_test.exs | noobiehacker/phoenixFilter | 42d913cc0b76b58ccbddf0a37b8f21dc6c639a3d | [
"Apache-2.0"
] | null | null | null | defmodule BluntApi.LayoutViewTest do
use BluntApi.ConnCase, async: true
end | 25.666667 | 36 | 0.831169 |
3fa5320a3da00571b01147bc2eb3f5dc2ec5239a | 2,093 | ex | Elixir | lib/chat_api/customers/customer.ex | rlanga/papercups | 358ca46c344908585cd0214a0de96e5676120c68 | [
"MIT"
] | 1 | 2020-08-13T15:11:12.000Z | 2020-08-13T15:11:12.000Z | lib/chat_api/customers/customer.ex | rlanga/papercups | 358ca46c344908585cd0214a0de96e5676120c68 | [
"MIT"
] | null | null | null | lib/chat_api/customers/customer.ex | rlanga/papercups | 358ca46c344908585cd0214a0de96e5676120c68 | [
"MIT"
] | null | null | null | defmodule ChatApi.Customers.Customer do
use Ecto.Schema
import Ecto.Changeset
alias ChatApi.Conversations.Conversation
alias ChatApi.Messages.Message
alias ChatApi.Accounts.Account
@primary_key {:id, :binary_id, autogenerate: true}
@foreign_key_type :binary_id
schema "customers" do
field(:first_se... | 22.505376 | 93 | 0.605351 |
3fa54432499fba0e8717a7f8d8b5f4dce6cd774d | 1,544 | ex | Elixir | clients/content/lib/google_api/content/v2/model/liasettings_request_gmb_access_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/liasettings_request_gmb_access_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/liasettings_request_gmb_access_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... | 32.851064 | 206 | 0.757124 |
3fa55f5727592d2c0e857db989d4ca7b98ceecea | 867 | ex | Elixir | test/support/factory.ex | vbrazo/blog_api | 8a3e15c666beef8f33b6d323627f92379267ecd9 | [
"MIT"
] | null | null | null | test/support/factory.ex | vbrazo/blog_api | 8a3e15c666beef8f33b6d323627f92379267ecd9 | [
"MIT"
] | null | null | null | test/support/factory.ex | vbrazo/blog_api | 8a3e15c666beef8f33b6d323627f92379267ecd9 | [
"MIT"
] | null | null | null | defmodule BlogApi.Factory do
use ExMachina.Ecto, repo: BlogApi.Repo
def user_factory do
%BlogApi.Accounts.User{
email: Faker.Internet.email(),
username: Faker.Internet.user_name(),
password: "some password",
bio: Faker.Lorem.sentence(),
image: Faker.Avatar.image_url()
}
end
... | 22.230769 | 48 | 0.623991 |
3fa56a98fef9a2632ff81a251e99a58eb76e084e | 1,232 | ex | Elixir | test/support/test_helpers.ex | montebrown/timber-elixir | 1e177cc426422be3617479143038f5882037752f | [
"0BSD"
] | null | null | null | test/support/test_helpers.ex | montebrown/timber-elixir | 1e177cc426422be3617479143038f5882037752f | [
"0BSD"
] | null | null | null | test/support/test_helpers.ex | montebrown/timber-elixir | 1e177cc426422be3617479143038f5882037752f | [
"0BSD"
] | null | null | null | defmodule Timber.TestHelpers do
def parse_log_line(line) do
IO.puts("Splitting #{line}")
split_string = String.split(line, "@metadata")
[message, metadata] = split_string
metadata_map = Poison.decode!(metadata)
{message, metadata_map}
end
def add_test_logger_backend(pid) when is_pid(pid) do
... | 28 | 78 | 0.690747 |
3fa56f33ee739a056548a646720938e12503df2f | 141 | exs | Elixir | orders-api/test/order_api_test.exs | mdamaceno/my-elixir-playground | 62cd90d352c2d0f3ca9253affbeac75d74390313 | [
"MIT"
] | null | null | null | orders-api/test/order_api_test.exs | mdamaceno/my-elixir-playground | 62cd90d352c2d0f3ca9253affbeac75d74390313 | [
"MIT"
] | null | null | null | orders-api/test/order_api_test.exs | mdamaceno/my-elixir-playground | 62cd90d352c2d0f3ca9253affbeac75d74390313 | [
"MIT"
] | null | null | null | defmodule OrderApiTest do
use ExUnit.Case
doctest OrderApi
test "greets the world" do
assert OrderApi.hello() == :world
end
end
| 15.666667 | 37 | 0.716312 |
3fa584c756fbec30abfbd002166f484501a38136 | 117 | ex | Elixir | lib/client/photo/photo_request.ex | factor18/pexels | c6655f7dd0e58a9a06b6b7a02e74b3f009cd7b01 | [
"MIT"
] | 5 | 2021-05-10T12:10:02.000Z | 2021-05-24T08:15:42.000Z | lib/client/photo/photo_request.ex | factor18/pexels | c6655f7dd0e58a9a06b6b7a02e74b3f009cd7b01 | [
"MIT"
] | null | null | null | lib/client/photo/photo_request.ex | factor18/pexels | c6655f7dd0e58a9a06b6b7a02e74b3f009cd7b01 | [
"MIT"
] | 1 | 2021-05-13T16:49:17.000Z | 2021-05-13T16:49:17.000Z | defmodule Pexels.Client.Photo.PhotoRequest do
use Accessible
use Construct do
field :id, :integer
end
end
| 14.625 | 45 | 0.74359 |
3fa5a279c984f13912bf6bcb2713c0edafd74a34 | 3,095 | exs | Elixir | scenic_dev_ctrl/config/config.exs | NervesJP/eefest19demo | 3b174072fa9c68671d5307959351ae41dc4e258d | [
"Apache-2.0"
] | 2 | 2020-05-06T08:57:19.000Z | 2020-06-26T10:33:46.000Z | scenic_dev_ctrl/config/config.exs | NervesJP/eefest19demo | 3b174072fa9c68671d5307959351ae41dc4e258d | [
"Apache-2.0"
] | null | null | null | scenic_dev_ctrl/config/config.exs | NervesJP/eefest19demo | 3b174072fa9c68671d5307959351ae41dc4e258d | [
"Apache-2.0"
] | 1 | 2019-06-01T02:34:41.000Z | 2019-06-01T02:34:41.000Z | # 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.
use Mix.Config
# Customize non-Elixir parts of the firmware. See
# https://hexdocs.pm/nerves/advance... | 32.578947 | 395 | 0.749273 |
3fa5cabfd41aa31519f71f124151a59fedd01064 | 165 | exs | Elixir | config/dev.exs | dullandwitless/elixir-ex_jira | d9a2f45fe47c70e1b5f1e1dd2ba2c3e5175c4bc2 | [
"MIT"
] | 2 | 2019-09-18T00:43:54.000Z | 2019-10-24T21:35:02.000Z | config/dev.exs | dullandwitless/elixir-ex_jira | d9a2f45fe47c70e1b5f1e1dd2ba2c3e5175c4bc2 | [
"MIT"
] | 5 | 2018-05-21T15:47:45.000Z | 2022-02-11T16:21:00.000Z | config/dev.exs | dullandwitless/elixir-ex_jira | d9a2f45fe47c70e1b5f1e1dd2ba2c3e5175c4bc2 | [
"MIT"
] | 6 | 2018-01-04T01:40:04.000Z | 2022-02-11T16:02:27.000Z | use Mix.Config
config :ex_jira,
account: System.get_env("JIRA_ACCOUNT"),
username: System.get_env("JIRA_USERNAME"),
password: System.get_env("JIRA_PASSWORD")
| 23.571429 | 44 | 0.757576 |
3fa5db85b56b38b5f0d17a24f89b4cc6a07ecf19 | 1,238 | exs | Elixir | apps/ldap_search/mix.exs | jeffweiss/openrobby | 9fed2024e6ce87a6fe27ef3af85558f3116aca2a | [
"Apache-2.0"
] | null | null | null | apps/ldap_search/mix.exs | jeffweiss/openrobby | 9fed2024e6ce87a6fe27ef3af85558f3116aca2a | [
"Apache-2.0"
] | null | null | null | apps/ldap_search/mix.exs | jeffweiss/openrobby | 9fed2024e6ce87a6fe27ef3af85558f3116aca2a | [
"Apache-2.0"
] | null | null | null | defmodule LdapSearch.Mixfile do
use Mix.Project
def project do
[app: :ldap_search,
version: get_version(),
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixir: "~> 1.1",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps()]
end
# Conf... | 24.27451 | 78 | 0.582391 |
3fa5f8edc84e93c2335fa79b3619b08cc39b48bf | 972 | exs | Elixir | mix.exs | devstopfix/meerkat-gateway | fcf13607026879847406bf78a4d2d4bbbc73298e | [
"MIT"
] | 1 | 2021-02-06T15:06:41.000Z | 2021-02-06T15:06:41.000Z | mix.exs | devstopfix/plug-ratelim | fcf13607026879847406bf78a4d2d4bbbc73298e | [
"MIT"
] | 2 | 2017-02-01T19:21:05.000Z | 2017-02-01T19:21:34.000Z | mix.exs | devstopfix/plug-ratelimit | fcf13607026879847406bf78a4d2d4bbbc73298e | [
"MIT"
] | null | null | null | defmodule PlugRateLimit.Mixfile do
use Mix.Project
def project do
[
app: :plug_ratelimit,
version: "0.21.39",
description: "Plug with request/second rate limiting",
elixir: "~> 1.10",
deps: deps(),
package: package(),
build_embedded: Mix.env() == :prod,
start_per... | 23.142857 | 66 | 0.531893 |
3fa654de887d22079ba81b80f164a02806e7d4bf | 535 | ex | Elixir | lib/forage/codec/exceptions/invalid_field_error.ex | tmbb/forage | dcda0403e13faeadc83b64961e4073bede25bc00 | [
"MIT"
] | 14 | 2018-11-28T11:33:47.000Z | 2021-09-12T08:30:40.000Z | lib/forage/codec/exceptions/invalid_field_error.ex | tmbb/forage | dcda0403e13faeadc83b64961e4073bede25bc00 | [
"MIT"
] | 1 | 2019-07-01T22:57:18.000Z | 2019-07-01T22:57:18.000Z | lib/forage/codec/exceptions/invalid_field_error.ex | tmbb/forage | dcda0403e13faeadc83b64961e4073bede25bc00 | [
"MIT"
] | 3 | 2019-08-07T06:41:34.000Z | 2022-03-22T16:02:06.000Z | defmodule Forage.Codec.Exceptions.InvalidFieldError do
@moduledoc """
The given field is invalid for the given schema.
"""
defexception [:message]
@impl true
def exception({schema, field_name}) do
field_atoms = schema.__schema__(:fields)
valid_field_names = Enum.map(field_atoms, &Atom.to_s... | 26.75 | 73 | 0.665421 |
3fa662f349a08f58109288e5a77852afb4655d6a | 3,469 | ex | Elixir | clients/proximity_beacon/lib/google_api/proximity_beacon/v1beta1/model/lat_lng.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/proximity_beacon/lib/google_api/proximity_beacon/v1beta1/model/lat_lng.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/proximity_beacon/lib/google_api/proximity_beacon/v1beta1/model/lat_lng.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... | 72.270833 | 1,988 | 0.682329 |
3fa6a164e167a9f6847f87b52a8e7b5a3816eac9 | 322 | ex | Elixir | lib/myxql/error.ex | chulkilee/myxql | dc6ad092ff8dc6849ee7e2546083df33dfd07758 | [
"Apache-2.0"
] | null | null | null | lib/myxql/error.ex | chulkilee/myxql | dc6ad092ff8dc6849ee7e2546083df33dfd07758 | [
"Apache-2.0"
] | 2 | 2019-11-13T08:41:01.000Z | 2019-11-19T20:50:18.000Z | lib/myxql/error.ex | jackjoe/myxql | 4e7f7dc01c51153b19b1aee4247fa1d57660959d | [
"Apache-2.0"
] | 1 | 2022-02-01T15:13:09.000Z | 2022-02-01T15:13:09.000Z | defmodule MyXQL.Error do
defexception [
:connection_id,
:message,
:mysql,
:statement
]
@type t :: %__MODULE__{
connection_id: non_neg_integer() | nil,
message: String.t(),
mysql: %{code: integer(), name: atom()} | nil,
statement: iodata() | nil
}
en... | 20.125 | 56 | 0.543478 |
3fa6e3faa55402257bf8d679a30c56bc2318247b | 1,679 | ex | Elixir | clients/container_analysis/lib/google_api/container_analysis/v1/model/project_repo_id.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/project_repo_id.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/project_repo_id.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... | 33.58 | 118 | 0.723645 |
3fa6f70abda9c0d1e89c50eebe9b95c93d2e526d | 2,390 | ex | Elixir | lib/trademark_free_strategic_land_warfare/player.ex | WizardOfOgz/trademark_free_strategic_land_warfare | a14287eab1f60c13d43f70ac2309391c291a6704 | [
"MIT"
] | 1 | 2020-06-30T16:37:50.000Z | 2020-06-30T16:37:50.000Z | lib/trademark_free_strategic_land_warfare/player.ex | WizardOfOgz/trademark_free_strategic_land_warfare | a14287eab1f60c13d43f70ac2309391c291a6704 | [
"MIT"
] | null | null | null | lib/trademark_free_strategic_land_warfare/player.ex | WizardOfOgz/trademark_free_strategic_land_warfare | a14287eab1f60c13d43f70ac2309391c291a6704 | [
"MIT"
] | 13 | 2020-06-04T23:10:19.000Z | 2020-06-05T01:25:26.000Z | defmodule TrademarkFreeStrategicLandWarfare.Player do
@derive Jason.Encoder
@enforce_keys [:name, :number, :module]
defstruct name: nil, number: nil, module: nil
@type t() :: %__MODULE__{
name: binary(),
number: Integer.t(),
module: Atom.t()
}
@type state() :: any()
@... | 34.637681 | 83 | 0.631799 |
3fa72b0af3bb8cd09d6f353480c70fcdcb21b260 | 1,419 | exs | Elixir | test/changelog/policies/admin/podcast_test.exs | gustavoarmoa/changelog.com | e898a9979a237ae66962714821ed8633a4966f37 | [
"MIT"
] | 2,599 | 2016-10-25T15:02:53.000Z | 2022-03-26T02:34:42.000Z | test/changelog/policies/admin/podcast_test.exs | sdrees/changelog.com | 955cdcf93d74991062f19a03e34c9f083ade1705 | [
"MIT"
] | 253 | 2016-10-25T20:29:24.000Z | 2022-03-29T21:52:36.000Z | test/changelog/policies/admin/podcast_test.exs | sdrees/changelog.com | 955cdcf93d74991062f19a03e34c9f083ade1705 | [
"MIT"
] | 298 | 2016-10-25T15:18:31.000Z | 2022-01-18T21:25:52.000Z | defmodule Changelog.Policies.Admin.PodcastTest do
use Changelog.PolicyCase
alias Changelog.Policies.Admin.Podcast
test "only admins can new/create" do
for policy <- [:new, :create] do
refute apply(Podcast, policy, [@guest])
refute apply(Podcast, policy, [@user])
refute apply(Podcast, polic... | 32.25 | 70 | 0.645525 |
3fa73eb5603601ca6f5891ac9033534797367adc | 994 | ex | Elixir | lib/ex_aliyun/mns/xml.ex | xinz/ex_aliyun_mns | 4def1bcb998bc22dd8506639e5f105c6aab0f5a3 | [
"MIT"
] | 3 | 2020-02-25T03:45:46.000Z | 2020-11-19T01:27:38.000Z | lib/ex_aliyun/mns/xml.ex | xinz/ex_aliyun_mns | 4def1bcb998bc22dd8506639e5f105c6aab0f5a3 | [
"MIT"
] | 1 | 2021-04-23T00:04:32.000Z | 2021-04-23T00:14:43.000Z | lib/ex_aliyun/mns/xml.ex | xinz/ex_aliyun_mns | 4def1bcb998bc22dd8506639e5f105c6aab0f5a3 | [
"MIT"
] | 3 | 2020-02-25T03:47:45.000Z | 2021-06-04T02:33:39.000Z | defmodule ExAliyun.MNS.Xml do
@moduledoc false
require EEx
EEx.function_from_file(:def, :generate_queue, "lib/ex_aliyun/mns/xml/queue.eex", [:queue],
trim: true
)
EEx.function_from_file(:def, :generate_topic, "lib/ex_aliyun/mns/xml/topic.eex", [:topic],
trim: true
)
EEx.function_from_file(:def... | 21.608696 | 101 | 0.679074 |
3fa73f468e9bc9934870805dfc3d15314a075684 | 1,047 | ex | Elixir | lib/multipass_ex/exceptions.ex | activeprospect/ex_multipass | e23d2a5d12db615bff074eded20de441a7b524c9 | [
"MIT"
] | null | null | null | lib/multipass_ex/exceptions.ex | activeprospect/ex_multipass | e23d2a5d12db615bff074eded20de441a7b524c9 | [
"MIT"
] | 3 | 2019-09-10T14:23:03.000Z | 2021-09-23T17:05:29.000Z | lib/multipass_ex/exceptions.ex | activeprospect/ex_multipass | e23d2a5d12db615bff074eded20de441a7b524c9 | [
"MIT"
] | null | null | null | defmodule ExMultipass.DecodingError do
@moduledoc """
Error handler for base64 decoding errors.
"""
defexception [:message, :reason, :data]
@type t :: %__MODULE__{
message: String.t(),
reason: atom(),
data: String.t()
}
end
defmodule ExMultipass.EncodingError do
@modu... | 20.94 | 57 | 0.604585 |
3fa76d0d63cf2918bf32c09929ce1cbd31ec535a | 27,734 | exs | Elixir | test/floki/html/generated/tokenizer/test3_part10_test.exs | nathanl/floki | 042b3f60f4d9a6218ec85d558d13cc6dac30c587 | [
"MIT"
] | 1,778 | 2015-01-07T14:12:31.000Z | 2022-03-29T22:42:48.000Z | test/floki/html/generated/tokenizer/test3_part10_test.exs | nathanl/floki | 042b3f60f4d9a6218ec85d558d13cc6dac30c587 | [
"MIT"
] | 279 | 2015-01-01T15:54:50.000Z | 2022-03-28T18:06:03.000Z | test/floki/html/generated/tokenizer/test3_part10_test.exs | nathanl/floki | 042b3f60f4d9a6218ec85d558d13cc6dac30c587 | [
"MIT"
] | 166 | 2015-04-24T20:48:02.000Z | 2022-03-28T17:29:05.000Z | defmodule Floki.HTML.Generated.Tokenizer.Test3Part10Test do
use ExUnit.Case, async: true
# NOTE: This file was generated by "mix generate_tokenizer_tests test3.test".
# html5lib-tests rev: e52ff68cc7113a6ef3687747fa82691079bf9cc5
alias Floki.HTML.Tokenizer
test "tokenize/1 <!DOCTYPEa SYSTEM'0" do
input... | 22.93962 | 89 | 0.600382 |
3fa7895ceaeccca5dc8b7f5bbfbbc99bf8613dc4 | 54,194 | exs | Elixir | test/time_zone_info/time_zone_database_test.exs | hrzndhrn/time_zone_info | 18fa4e7aefd68d256202de8e0f96b69b8a9dc618 | [
"MIT"
] | 5 | 2020-04-05T16:03:03.000Z | 2022-02-07T22:11:04.000Z | test/time_zone_info/time_zone_database_test.exs | hrzndhrn/time_zone_info | 18fa4e7aefd68d256202de8e0f96b69b8a9dc618 | [
"MIT"
] | 16 | 2020-03-28T17:46:13.000Z | 2021-08-25T08:35:48.000Z | test/time_zone_info/time_zone_database_test.exs | hrzndhrn/time_zone_info | 18fa4e7aefd68d256202de8e0f96b69b8a9dc618 | [
"MIT"
] | null | null | null | defmodule TimeZoneInfo.TimeZoneDatabaseTest do
use TimeZoneInfo.TimeZoneDatabaseCase
alias TimeZoneInfo.TimeZoneDatabase
describe "time_zone_period_from_utc_iso_days/2" do
prove "returns an error tuple for",
time_zone_period_from_utc_iso_days(
~N[2012-03-25 01:59:59],
"Utop... | 30.141268 | 92 | 0.4442 |
3fa789b1d51a45d20b40866e7702349770a97356 | 213 | exs | Elixir | config/test.exs | EskiMag/phoenix_pubsub | 3f324a54848a37d4dae98954a4c70713c8df1d48 | [
"MIT"
] | 3 | 2020-06-08T03:47:03.000Z | 2021-09-17T21:48:37.000Z | config/test.exs | EskiMag/phoenix_pubsub | 3f324a54848a37d4dae98954a4c70713c8df1d48 | [
"MIT"
] | null | null | null | config/test.exs | EskiMag/phoenix_pubsub | 3f324a54848a37d4dae98954a4c70713c8df1d48 | [
"MIT"
] | null | null | null | use Mix.Config
config :phoenix_pubsub,
pubsub: [Phoenix.PubSub.Test.PubSub, [pool_size: 1]],
nodes: [:"node1@127.0.0.1", :"node2@127.0.0.1"]
config :logger,
level: :info,
compile_time_purge_level: :info
| 21.3 | 55 | 0.690141 |
3fa7b560f2fca521f779fca80b79c5431f1a6d41 | 18,810 | ex | Elixir | lib/plausible/stats/stats.ex | lizlam/plausible | 886ba62cd814e5ca2d05c51a375bccc753c7c6ff | [
"MIT"
] | null | null | null | lib/plausible/stats/stats.ex | lizlam/plausible | 886ba62cd814e5ca2d05c51a375bccc753c7c6ff | [
"MIT"
] | null | null | null | lib/plausible/stats/stats.ex | lizlam/plausible | 886ba62cd814e5ca2d05c51a375bccc753c7c6ff | [
"MIT"
] | null | null | null | defmodule Plausible.Stats do
use Plausible.Repo
alias Plausible.Stats.Query
def compare_pageviews_and_visitors(site, query, {pageviews, visitors}) do
query = Query.shift_back(query)
{old_pageviews, old_visitors} = pageviews_and_visitors(site, query)
cond do
old_pageviews == 0 and pageviews > 0... | 33.830935 | 148 | 0.640617 |
3fa7bec2f4013124a65e666205d8ff35409aa003 | 39 | exs | Elixir | test/test_helper.exs | redvers/pastenix | 53f10765769b6695cf2a73cd007869d18dd183b4 | [
"MIT"
] | 6 | 2015-02-25T06:13:45.000Z | 2016-04-11T13:06:13.000Z | test/test_helper.exs | redvers/pastenix | 53f10765769b6695cf2a73cd007869d18dd183b4 | [
"MIT"
] | null | null | null | test/test_helper.exs | redvers/pastenix | 53f10765769b6695cf2a73cd007869d18dd183b4 | [
"MIT"
] | null | null | null | Pastenix.Endpoint.start
ExUnit.start()
| 13 | 23 | 0.820513 |
3fa7c050a24f0ea1fd50870f22c5f587a35e451b | 801 | ex | Elixir | apps/bookmarker/lib/admin/admin.ex | allen-garvey/phoenix-umbrella | 1d444bbd62a5e7b5f51d317ce2be71ee994125d5 | [
"MIT"
] | 4 | 2019-10-04T16:11:15.000Z | 2021-08-18T21:00:13.000Z | apps/bookmarker/lib/admin/admin.ex | allen-garvey/phoenix-umbrella | 1d444bbd62a5e7b5f51d317ce2be71ee994125d5 | [
"MIT"
] | 5 | 2020-03-16T23:52:25.000Z | 2021-09-03T16:52:17.000Z | apps/bookmarker/lib/admin/admin.ex | allen-garvey/phoenix-umbrella | 1d444bbd62a5e7b5f51d317ce2be71ee994125d5 | [
"MIT"
] | null | null | null | defmodule Bookmarker.Admin do
import Ecto.Query, warn: false
alias Bookmarker.Repo
alias Bookmarker.Folder
alias Bookmarker.Bookmark
@doc """
Returns list of folders with name and id
ordered in default order suitable for select fields
for forms
"""
def folder_form_list do
from(Folder, order_by:... | 22.885714 | 81 | 0.672909 |
3fa7c8aaa2f9f39115043c4d44194bad476f6201 | 5,758 | exs | Elixir | test/config_test.exs | buob/exq | 921fe26c7f3db7d77ff67e3a03ea9b83612f5598 | [
"Apache-2.0"
] | null | null | null | test/config_test.exs | buob/exq | 921fe26c7f3db7d77ff67e3a03ea9b83612f5598 | [
"Apache-2.0"
] | null | null | null | test/config_test.exs | buob/exq | 921fe26c7f3db7d77ff67e3a03ea9b83612f5598 | [
"Apache-2.0"
] | 3 | 2021-04-07T14:50:17.000Z | 2021-04-07T14:50:30.000Z | defmodule Exq.ConfigTest do
use ExUnit.Case
require Mix.Config
import ExqTestUtil
setup_all do
ExqTestUtil.reset_config
:ok
end
setup do
env = System.get_env
on_exit fn ->
ExqTestUtil.reset_env(env)
ExqTestUtil.reset_config
end
end
test "Mix.Config should change the h... | 33.476744 | 122 | 0.668114 |
3fa7d14038043471c0351cff051d223b33f5c8c7 | 490 | exs | Elixir | priv/repo/migrations/20171225141624_add_cascade_delete_to_favorites.exs | vbrazo/blog_api | 8a3e15c666beef8f33b6d323627f92379267ecd9 | [
"MIT"
] | null | null | null | priv/repo/migrations/20171225141624_add_cascade_delete_to_favorites.exs | vbrazo/blog_api | 8a3e15c666beef8f33b6d323627f92379267ecd9 | [
"MIT"
] | null | null | null | priv/repo/migrations/20171225141624_add_cascade_delete_to_favorites.exs | vbrazo/blog_api | 8a3e15c666beef8f33b6d323627f92379267ecd9 | [
"MIT"
] | null | null | null | defmodule BlogApi.Repo.Migrations.AddCascadeDeleteToFavorites do
use Ecto.Migration
def up do
execute("ALTER TABLE favorites DROP CONSTRAINT favorites_article_id_fkey")
alter table(:favorites) do
modify(:article_id, references(:articles, on_delete: :delete_all))
end
end
def down do
exec... | 24.5 | 78 | 0.744898 |
3fa7d335bab019efa1c7df249e4ad79977914419 | 272 | exs | Elixir | test/lovelace_web/views/layout_view_test.exs | cciuenf/lovelaceccuenf_bot | 22a9d4e25d59cf3e5f1de4c4de8e257a6b44fba9 | [
"MIT"
] | null | null | null | test/lovelace_web/views/layout_view_test.exs | cciuenf/lovelaceccuenf_bot | 22a9d4e25d59cf3e5f1de4c4de8e257a6b44fba9 | [
"MIT"
] | null | null | null | test/lovelace_web/views/layout_view_test.exs | cciuenf/lovelaceccuenf_bot | 22a9d4e25d59cf3e5f1de4c4de8e257a6b44fba9 | [
"MIT"
] | null | null | null | defmodule LovelaceWeb.LayoutViewTest do
use LovelaceWeb.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
| 30.222222 | 65 | 0.768382 |
3fa7f9f99b53afe98bf28eca452c50e4332f14ba | 1,604 | exs | Elixir | scripts/kenza.exs | eXascaleInfolab/TInfES | cb72cb4565620c5695b630a670db68e01e8a1b02 | [
"Apache-2.0"
] | 2 | 2017-09-06T02:05:11.000Z | 2018-09-21T21:29:29.000Z | scripts/kenza.exs | eXascaleInfolab/TInfES | cb72cb4565620c5695b630a670db68e01e8a1b02 | [
"Apache-2.0"
] | null | null | null | scripts/kenza.exs | eXascaleInfolab/TInfES | cb72cb4565620c5695b630a670db68e01e8a1b02 | [
"Apache-2.0"
] | 2 | 2017-09-06T02:05:38.000Z | 2019-12-07T01:21:09.000Z | # Task name Execution command
# Kenza-based datasets ---------------------------------------------------------
# Statistics:
#340K ../input/kenzabased/museum.rdf
#464K ../input/kenzabased/soccerplayer.rdf
#508K ../input/kenzabased/country.rdf
#828K ../input/kenzabased/politician.rdf
#1.2M ../input/kenzabased/film.rd... | 44.555556 | 86 | 0.705112 |
3fa7fe9d4b18cdbce7c2d5ff2db588da6e30ae0d | 2,795 | ex | Elixir | lib/ex_pesa/Mpesa/account_balance.ex | MidigoF/ex_pesa | d2a62e72c67084385609c895e52a6ac52e8a9a8a | [
"AML",
"MIT"
] | 20 | 2020-08-07T18:45:03.000Z | 2021-12-02T12:47:07.000Z | lib/ex_pesa/Mpesa/account_balance.ex | MidigoF/ex_pesa | d2a62e72c67084385609c895e52a6ac52e8a9a8a | [
"AML",
"MIT"
] | 65 | 2020-08-17T05:52:33.000Z | 2021-05-20T16:06:34.000Z | lib/ex_pesa/Mpesa/account_balance.ex | MidigoF/ex_pesa | d2a62e72c67084385609c895e52a6ac52e8a9a8a | [
"AML",
"MIT"
] | 11 | 2020-08-17T07:53:02.000Z | 2021-04-02T20:57:16.000Z | defmodule ExPesa.Mpesa.AccountBalance do
@moduledoc """
The Account Balance API requests for the account balance of a shortcode.
"""
import ExPesa.Mpesa.MpesaBase
import ExPesa.Util
@doc """
Initiates account balnce request
## Configuration
Add below config to dev.exs / prod.exs files
This asum... | 36.776316 | 154 | 0.660107 |
3fa8062461d683321439509c7f479ae57cf71fee | 3,063 | ex | Elixir | lib/resourceful/collection/ecto/filters.ex | binarypaladin/resourceful | a1eedad7c94d5fdc57c6ffc8ae6d010b6b09f610 | [
"MIT"
] | null | null | null | lib/resourceful/collection/ecto/filters.ex | binarypaladin/resourceful | a1eedad7c94d5fdc57c6ffc8ae6d010b6b09f610 | [
"MIT"
] | 2 | 2021-03-11T21:23:54.000Z | 2021-03-12T23:34:21.000Z | lib/resourceful/collection/ecto/filters.ex | binarypaladin/resourceful | a1eedad7c94d5fdc57c6ffc8ae6d010b6b09f610 | [
"MIT"
] | null | null | null | defmodule Resourceful.Collection.Ecto.Filters do
@moduledoc """
Functions for converting Resourceful-style filters into Ecto-style SQL
filters.
See `Resourceful.Collection.Filter` for more details on filters.
There's a lot of duplication here that can, hopefully, be resolved with a
better understanding of... | 32.585106 | 91 | 0.645772 |
3fa83591ca81570dd728d1b9f1cf98012594638f | 88 | exs | Elixir | test/cast/caster_test.exs | jeanparpaillon/ex_cast | fd67d0dcf9ac3794c5fbf1070a7be33925361c2b | [
"Apache-2.0"
] | null | null | null | test/cast/caster_test.exs | jeanparpaillon/ex_cast | fd67d0dcf9ac3794c5fbf1070a7be33925361c2b | [
"Apache-2.0"
] | null | null | null | test/cast/caster_test.exs | jeanparpaillon/ex_cast | fd67d0dcf9ac3794c5fbf1070a7be33925361c2b | [
"Apache-2.0"
] | null | null | null | defmodule Cast.CasterTest do
use ExUnit.Case
doctest Cast.Caster, import: true
end
| 14.666667 | 35 | 0.772727 |
3fa83b1fb02581147b91f0132d566db833b8630d | 397 | ex | Elixir | lib/testing/test_runner.ex | zblanco/dagger | cd6aaf399cf6976199146d11d20826a3062453fc | [
"MIT"
] | 11 | 2020-07-10T17:14:37.000Z | 2022-01-24T05:34:29.000Z | lib/testing/test_runner.ex | zblanco/dagger | cd6aaf399cf6976199146d11d20826a3062453fc | [
"MIT"
] | null | null | null | lib/testing/test_runner.ex | zblanco/dagger | cd6aaf399cf6976199146d11d20826a3062453fc | [
"MIT"
] | 1 | 2020-07-11T15:16:15.000Z | 2020-07-11T15:16:15.000Z | defmodule Dagger.TestRunner do
@moduledoc """
A simple job runner implementation for test contexts.
"""
@behaviour Dagger.Runner
alias Dagger.Step
def squareaplier(num), do: {:ok, num * num}
@impl true
def run(%Step{} = step) do
Step.run(step)
end
@impl true
def ack(%Step{} = _step) do
... | 15.88 | 55 | 0.647355 |
3fa86633ca9256bd4dd9e2ebd327307805814e0e | 357 | exs | Elixir | apps/gitgud/priv/db/migrations/20171009222935_add_repositories_table.exs | joshnuss/gitgud | ea32d9d254cfd10a09c988763e03589c401d9875 | [
"MIT"
] | null | null | null | apps/gitgud/priv/db/migrations/20171009222935_add_repositories_table.exs | joshnuss/gitgud | ea32d9d254cfd10a09c988763e03589c401d9875 | [
"MIT"
] | null | null | null | apps/gitgud/priv/db/migrations/20171009222935_add_repositories_table.exs | joshnuss/gitgud | ea32d9d254cfd10a09c988763e03589c401d9875 | [
"MIT"
] | null | null | null | defmodule GitGud.DB.Migrations.AddRepositoriesTable do
use Ecto.Migration
def change do
create table("repositories") do
add :owner_id, references("users")
add :name, :string, null: false, size: 80
add :description, :string
timestamps()
end
create unique_index("reposito... | 25.5 | 59 | 0.661064 |
3fa869630773a4a1d3fac316ed158f6aa22b5516 | 1,079 | ex | Elixir | test/support/conn_case.ex | Andorbal/phoenix_react | 0291d612ca710f80bd5ec87f052649f32c9e5847 | [
"MIT"
] | null | null | null | test/support/conn_case.ex | Andorbal/phoenix_react | 0291d612ca710f80bd5ec87f052649f32c9e5847 | [
"MIT"
] | null | null | null | test/support/conn_case.ex | Andorbal/phoenix_react | 0291d612ca710f80bd5ec87f052649f32c9e5847 | [
"MIT"
] | null | null | null | defmodule PhoenixReact.ConnCase do
@moduledoc """
This module defines the test case to be used by
tests that require setting up a connection.
Such tests rely on `Phoenix.ConnTest` and also
imports other functionality to make it easier
to build and query models.
Finally, if the test case interacts with t... | 25.093023 | 71 | 0.709917 |
3fa87477a84e7a15c98994b1cc06eafc74e0e111 | 3,480 | ex | Elixir | lib/course_planner/classes/class.ex | digitalnatives/course_planner | 27b1c8067edc262685e9c4dcbfcf82633bc8b8dc | [
"MIT"
] | 38 | 2017-04-11T13:37:38.000Z | 2021-05-22T19:35:36.000Z | lib/course_planner/classes/class.ex | digitalnatives/course_planner | 27b1c8067edc262685e9c4dcbfcf82633bc8b8dc | [
"MIT"
] | 226 | 2017-04-07T13:14:14.000Z | 2018-03-08T16:50:11.000Z | lib/course_planner/classes/class.ex | digitalnatives/course_planner | 27b1c8067edc262685e9c4dcbfcf82633bc8b8dc | [
"MIT"
] | 7 | 2017-08-30T23:58:13.000Z | 2021-03-28T11:50:45.000Z | defmodule CoursePlanner.Classes.Class do
@moduledoc """
This module holds the model for the class table
"""
use Ecto.Schema
import Ecto.Changeset
import Ecto.Query
alias CoursePlanner.{Repo, Courses.OfferedCourse, Attendances.Attendance, Classes}
alias Ecto.{Time, Date, Changeset}
schema "classes" d... | 30.26087 | 89 | 0.657471 |
3fa87843a3ea2250232cb5c6fe74c03f10e709cb | 261 | exs | Elixir | bench/benchfella/bin_bench.exs | joekain/benchfella | 0fd092f2b20bd1b80fda95eb347ae37919f66ec2 | [
"MIT"
] | null | null | null | bench/benchfella/bin_bench.exs | joekain/benchfella | 0fd092f2b20bd1b80fda95eb347ae37919f66ec2 | [
"MIT"
] | null | null | null | bench/benchfella/bin_bench.exs | joekain/benchfella | 0fd092f2b20bd1b80fda95eb347ae37919f66ec2 | [
"MIT"
] | null | null | null | defmodule BinBench do
use Benchfella
@str String.duplicate("hello world", 1000)
bench "binary_part" do
binary_part(@str, 113, 600)
end
bench "matching" do
<<_::binary-size(113), core::binary-size(600), _::binary>> = @str
core
end
end
| 17.4 | 69 | 0.655172 |
3fa87eeefdbe40c2bac85ea820ff85bdad19deda | 1,953 | ex | Elixir | clients/you_tube_reporting/lib/google_api/you_tube_reporting/v1/model/list_reports_response.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_reporting/lib/google_api/you_tube_reporting/v1/model/list_reports_response.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/you_tube_reporting/lib/google_api/you_tube_reporting/v1/model/list_reports_response.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 36.166667 | 124 | 0.738351 |
3fa8a1daacf633f5530fbd3cf8554a402373733e | 490 | exs | Elixir | bench/include/elixir/mix.exs | turururu/Programming-Language-Benchmarks | de58f0ec355cad32fc64c1df5c7125fc584bf3c4 | [
"MIT"
] | 92 | 2021-04-21T17:53:00.000Z | 2022-03-26T06:47:25.000Z | bench/include/elixir/mix.exs | turururu/Programming-Language-Benchmarks | de58f0ec355cad32fc64c1df5c7125fc584bf3c4 | [
"MIT"
] | 49 | 2021-04-04T00:02:29.000Z | 2022-02-27T00:24:39.000Z | bench/include/elixir/mix.exs | turururu/Programming-Language-Benchmarks | de58f0ec355cad32fc64c1df5c7125fc584bf3c4 | [
"MIT"
] | 47 | 2021-05-19T05:28:33.000Z | 2022-02-21T11:53:48.000Z | defmodule App.MixProject do
use Mix.Project
def project do
[
app: :app,
version: "0.1.0",
elixir: "~> 1.11",
start_permanent: Mix.env() == :prod,
deps: deps(),
escript: [main_module: App],
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[... | 20.416667 | 87 | 0.536735 |
3fa8b55e7b0dc12c5faefa519a73cd5b2c96dd30 | 147 | ex | Elixir | lib/marvin/cli.ex | cardinalblue/marvin | 7d7f553715e031b8f83e5ff61ca8ec85b5587742 | [
"MIT"
] | 3 | 2020-12-31T08:04:47.000Z | 2021-01-05T04:05:26.000Z | lib/marvin/cli.ex | cardinalblue/marvin | 7d7f553715e031b8f83e5ff61ca8ec85b5587742 | [
"MIT"
] | null | null | null | lib/marvin/cli.ex | cardinalblue/marvin | 7d7f553715e031b8f83e5ff61ca8ec85b5587742 | [
"MIT"
] | null | null | null | defmodule Marvin.CLI do
def main(file_path \\ []) do
file_path
|> File.read!()
|> Marvin.Config.load()
|> Marvin.run()
end
end
| 16.333333 | 30 | 0.585034 |
3fa8c9a122bc509473174c382938213d18435fee | 3,675 | ex | Elixir | apps/lexibomb_server/lib/lexibomb_server/rack.ex | elasticdog/lexibomb-elixir | e69ebf571b7021af8b03d00e1099b07b3d6b2a42 | [
"0BSD"
] | 2 | 2016-03-10T23:41:02.000Z | 2021-01-20T04:40:39.000Z | apps/lexibomb_server/lib/lexibomb_server/rack.ex | elasticdog/lexibomb-elixir | e69ebf571b7021af8b03d00e1099b07b3d6b2a42 | [
"0BSD"
] | 1 | 2015-07-19T06:27:44.000Z | 2015-07-19T06:27:44.000Z | apps/lexibomb_server/lib/lexibomb_server/rack.ex | elasticdog/lexibomb-elixir | e69ebf571b7021af8b03d00e1099b07b3d6b2a42 | [
"0BSD"
] | 1 | 2016-09-28T18:09:56.000Z | 2016-09-28T18:09:56.000Z | defmodule LexibombServer.Rack do
@moduledoc """
Provides functions related to dealing with a rack of tiles.
A rack is a list of (usually 7) tiles, like `["E", "E", "L", "R", "T", "T", "S"]`.
"""
defstruct tiles: []
alias LexibombServer.WordList
@type t :: %{tiles: [String.t]}
@blank "_"
@alpha ~w... | 26.630435 | 90 | 0.595374 |
3fa91b33a2a75bf757a36774715419ca3a88ad86 | 9,423 | ex | Elixir | poker_equity_evaluator/lib/hand.ex | alanvoss/poker-equity-evaluator | a9d0902fe4be7a31d7e279216e781211ff3572e4 | [
"MIT"
] | 1 | 2017-11-01T22:47:45.000Z | 2017-11-01T22:47:45.000Z | poker_equity_evaluator/lib/hand.ex | alanvoss/poker-equity-evaluator | a9d0902fe4be7a31d7e279216e781211ff3572e4 | [
"MIT"
] | null | null | null | poker_equity_evaluator/lib/hand.ex | alanvoss/poker-equity-evaluator | a9d0902fe4be7a31d7e279216e781211ff3572e4 | [
"MIT"
] | null | null | null | defmodule Hand do
@hands %{
high_card: 1,
pair: 2,
two_pair: 3,
three_of_a_kind: 4,
straight: 5,
flush: 6,
full_house: 7,
four_of_a_kind: 8,
straight_flush: 9,
royal_flush: 10
}
def high(hand) do
hand = Enum.sort_by(h... | 30.996711 | 112 | 0.664969 |
3fa91d3d10dd989a570df5a67288c672d7e40986 | 1,636 | ex | Elixir | lib/still/compiler/compile.ex | tomasz-tomczyk/still | 3f2fdb64c72244b789e14b31d514199f8adeb796 | [
"ISC"
] | null | null | null | lib/still/compiler/compile.ex | tomasz-tomczyk/still | 3f2fdb64c72244b789e14b31d514199f8adeb796 | [
"ISC"
] | null | null | null | lib/still/compiler/compile.ex | tomasz-tomczyk/still | 3f2fdb64c72244b789e14b31d514199f8adeb796 | [
"ISC"
] | null | null | null | defmodule Still.Compiler.Compile do
@moduledoc """
Compiles the site.
"""
require Logger
alias Still.Compiler.Traverse
alias Still.Data
import Still.Utils
use GenServer
def start_link(_) do
GenServer.start_link(__MODULE__, [], name: __MODULE__)
end
@doc """
Compiles the site.
"""
d... | 20.974359 | 82 | 0.634474 |
3fa9503ac67e3b480a4e7550a7db2328657669c9 | 3,466 | ex | Elixir | lib/changelog/schema/subscription.ex | matryer/changelog.com | 62680eeeb53b42c6e9aa6d77df8b035d25bb8037 | [
"MIT"
] | 1 | 2021-03-14T21:12:49.000Z | 2021-03-14T21:12:49.000Z | lib/changelog/schema/subscription.ex | matryer/changelog.com | 62680eeeb53b42c6e9aa6d77df8b035d25bb8037 | [
"MIT"
] | null | null | null | lib/changelog/schema/subscription.ex | matryer/changelog.com | 62680eeeb53b42c6e9aa6d77df8b035d25bb8037 | [
"MIT"
] | 1 | 2018-10-03T20:55:52.000Z | 2018-10-03T20:55:52.000Z | defmodule Changelog.Subscription do
use Changelog.Schema
alias Changelog.{NewsItem, Person, Podcast}
schema "subscriptions" do
field :unsubscribed_at, :utc_datetime
field :context, :string
belongs_to :person, Person
belongs_to :podcast, Podcast
belongs_to :item, NewsItem
timestamps()
... | 29.623932 | 109 | 0.662724 |
3fa956c4e69990f3ca3ef7a022b347859ef8b2f6 | 257 | ex | Elixir | Books/Programming_Elixir-Dave_Thomas/ch_14/spawn/spawn1.ex | cjschneider2/book_example_problems | 18192a6d3ddb4371b79f88e4ab3444d25f2e1ce0 | [
"Unlicense"
] | null | null | null | Books/Programming_Elixir-Dave_Thomas/ch_14/spawn/spawn1.ex | cjschneider2/book_example_problems | 18192a6d3ddb4371b79f88e4ab3444d25f2e1ce0 | [
"Unlicense"
] | null | null | null | Books/Programming_Elixir-Dave_Thomas/ch_14/spawn/spawn1.ex | cjschneider2/book_example_problems | 18192a6d3ddb4371b79f88e4ab3444d25f2e1ce0 | [
"Unlicense"
] | null | null | null | defmodule Spawn1 do
def greet do
receive do
{sender, msg} -> send sender, {:ok, "Hello, #{msg}"}
end
end
end
# here's a client
pid = spawn(Spawn1, :greet, [])
send pid, {self, "World!"}
receive do
{:ok, message} -> IO.puts(message)
end
| 17.133333 | 58 | 0.603113 |
3fa975bbe8bcf9122bf450a81c4539911db3d18f | 2,058 | ex | Elixir | apps/forklift/lib/forklift/data_writer/compaction.ex | msomji/smartcitiesdata | fc96abc1ef1306f7af6bd42bbcb4ed041a6d922c | [
"Apache-2.0"
] | null | null | null | apps/forklift/lib/forklift/data_writer/compaction.ex | msomji/smartcitiesdata | fc96abc1ef1306f7af6bd42bbcb4ed041a6d922c | [
"Apache-2.0"
] | null | null | null | apps/forklift/lib/forklift/data_writer/compaction.ex | msomji/smartcitiesdata | fc96abc1ef1306f7af6bd42bbcb4ed041a6d922c | [
"Apache-2.0"
] | null | null | null | defmodule Forklift.DataWriter.Compaction do
@moduledoc false
require Logger
alias SmartCity.Dataset
@behaviour Pipeline.Writer
@writer Application.get_env(:forklift, :table_writer)
@impl Pipeline.Writer
@spec init(dataset: Dataset.t()) :: :ok | {:error, term()}
def init(args) do
config = parse_ar... | 26.727273 | 107 | 0.650632 |
3fa98005a4106524c3c7d912afeba15c5d840fd5 | 1,378 | ex | Elixir | clients/cloud_resource_manager/lib/google_api/cloud_resource_manager/v1/model/delete_project_metadata.ex | jamesvl/elixir-google-api | 6c87fb31d996f08fb42ce6066317e9d652a87acc | [
"Apache-2.0"
] | null | null | null | clients/cloud_resource_manager/lib/google_api/cloud_resource_manager/v1/model/delete_project_metadata.ex | jamesvl/elixir-google-api | 6c87fb31d996f08fb42ce6066317e9d652a87acc | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/cloud_resource_manager/lib/google_api/cloud_resource_manager/v1/model/delete_project_metadata.ex | myskoach/elixir-google-api | 4f8cbc2fc38f70ffc120fd7ec48e27e46807b563 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 32.809524 | 100 | 0.773585 |
3fa9890f2df8a42a27c46c17e406d2a20d1568e9 | 13,007 | ex | Elixir | clients/you_tube/lib/google_api/you_tube/v3/api/subscriptions.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/you_tube/lib/google_api/you_tube/v3/api/subscriptions.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/lib/google_api/you_tube/v3/api/subscriptions.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... | 58.066964 | 1,139 | 0.665872 |
3fa990f42e30f75f731861d78dd6b25ab2f17c2e | 100 | ex | Elixir | lib/cep/address.ex | douglascamata/cep | 042aa6d2bcb64b459ac6ac281add2f2f753a6877 | [
"MIT"
] | 11 | 2016-03-23T20:34:19.000Z | 2019-07-16T13:21:48.000Z | lib/cep/address.ex | douglascamata/cep | 042aa6d2bcb64b459ac6ac281add2f2f753a6877 | [
"MIT"
] | 5 | 2016-03-22T05:35:46.000Z | 2019-04-02T16:44:00.000Z | lib/cep/address.ex | douglascamata/cep | 042aa6d2bcb64b459ac6ac281add2f2f753a6877 | [
"MIT"
] | 3 | 2019-03-26T18:54:59.000Z | 2020-07-06T22:41:51.000Z | defmodule Cep.Address do
defstruct [:street, :neighborhood, :city, :state, :complement, :cep]
end
| 25 | 70 | 0.73 |
3fa99fa8fa134fc2404f98199eb37ef1b8ce7fd1 | 1,552 | ex | Elixir | lib/gscraper_web/views/error_helpers.ex | longnd/elixir-gscraper | 894570afd89e54b80ca591a56a182da55ac6ee61 | [
"MIT"
] | null | null | null | lib/gscraper_web/views/error_helpers.ex | longnd/elixir-gscraper | 894570afd89e54b80ca591a56a182da55ac6ee61 | [
"MIT"
] | 25 | 2021-03-23T07:27:21.000Z | 2021-10-31T15:09:52.000Z | lib/gscraper_web/views/error_helpers.ex | longnd/elixir-gscraper | 894570afd89e54b80ca591a56a182da55ac6ee61 | [
"MIT"
] | null | null | null | defmodule GscraperWeb.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... | 32.333333 | 77 | 0.666237 |
3fa9ed29679eae5fd670e49727122c8be57f9eb0 | 536 | exs | Elixir | apps/aehttpserver/config/config.exs | aeternity/epoch-elixir | d35613f5541a9bbebe61f90b8503a9b3416fe8b4 | [
"0BSD"
] | 131 | 2018-03-10T01:35:56.000Z | 2021-12-27T13:44:41.000Z | apps/aehttpserver/config/config.exs | aeternity/elixir-node | d35613f5541a9bbebe61f90b8503a9b3416fe8b4 | [
"0BSD"
] | 445 | 2018-03-12T09:46:17.000Z | 2018-12-12T09:52:07.000Z | apps/aehttpserver/config/config.exs | aeternity/epoch-elixir | d35613f5541a9bbebe61f90b8503a9b3416fe8b4 | [
"0BSD"
] | 23 | 2018-03-12T12:01:28.000Z | 2022-03-06T09:22:17.000Z | use Mix.Config
config :aehttpserver, namespace: Aehttpserver
config :aehttpserver, Aehttpserver.Web.Endpoint,
url: [host: "localhost"],
secret_key_base: "iC7edxvq+oLqfi0E3jpHq9hq0PLu+n0xeJkjxRwPO+klI8fR8s/5n+Y30asPxlYo",
render_errors: [view: Aehttpserver.Web.ErrorView, accepts: ~w(html json)],
pubsub: [name:... | 31.529412 | 86 | 0.753731 |
3fa9ee6ad7b804b76592eeb96de26b845bb29099 | 929 | ex | Elixir | lib/auth0_ex/management/email_provider.ex | warmwaffles/auth0_ex | d0d7ad895c4db79d366c9c55e289a944c891936c | [
"Apache-2.0"
] | 38 | 2016-08-31T12:44:19.000Z | 2021-06-17T18:23:21.000Z | lib/auth0_ex/management/email_provider.ex | warmwaffles/auth0_ex | d0d7ad895c4db79d366c9c55e289a944c891936c | [
"Apache-2.0"
] | 24 | 2017-01-12T17:53:10.000Z | 2022-03-14T13:43:12.000Z | lib/auth0_ex/management/email_provider.ex | warmwaffles/auth0_ex | d0d7ad895c4db79d366c9c55e289a944c891936c | [
"Apache-2.0"
] | 24 | 2017-01-27T20:51:57.000Z | 2022-03-11T19:58:40.000Z | defmodule Auth0Ex.Management.EmailProvider do
@moduledoc """
A module representing emails resource on Auth0
"""
use Auth0Ex.Api, for: :mgmt
@path "emails/provider"
@doc """
Gets the email provider
iex> Auth0Ex.Management.EmailProvider.get()
iex> Auth0Ex.Management.EmailProvider.get(fields: "... | 23.820513 | 86 | 0.679225 |
3fa9fd698f3b149cf7869c2d69e3485625f8d92e | 4,023 | ex | Elixir | lib/listener.ex | svrdlans/rabbit | d32ac29793ec8bd7eede080fb482ec96a62934e4 | [
"MIT"
] | 1 | 2020-08-02T19:35:54.000Z | 2020-08-02T19:35:54.000Z | lib/listener.ex | svrdlans/rabbit | d32ac29793ec8bd7eede080fb482ec96a62934e4 | [
"MIT"
] | null | null | null | lib/listener.ex | svrdlans/rabbit | d32ac29793ec8bd7eede080fb482ec96a62934e4 | [
"MIT"
] | 1 | 2019-12-04T13:08:41.000Z | 2019-12-04T13:08:41.000Z | defmodule X3m.Rabbit.Listener do
alias X3m.Rabbit
use GenServer
use AMQP
require Logger
### Client API
def start_link([channel_manager, listener_name, definition, opts]) when is_map(definition),
do: GenServer.start_link(__MODULE__, {channel_manager, listener_name, definition}, opts)
### Server Call... | 30.477273 | 99 | 0.637584 |
3faa078fe809a10e4e744fa0e9a71d7a47b41a3f | 2,019 | ex | Elixir | apps/ewallet/lib/ewallet/web/config.ex | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 322 | 2018-02-28T07:38:44.000Z | 2020-05-27T23:09:55.000Z | apps/ewallet/lib/ewallet/web/config.ex | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 643 | 2018-02-28T12:05:20.000Z | 2020-05-22T08:34:38.000Z | apps/ewallet/lib/ewallet/web/config.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 ... | 26.220779 | 93 | 0.68103 |
3faa19ec2e4108288d28af28d8ea0a89af447422 | 2,237 | ex | Elixir | lib/code_corps/github/sync/github_issue/github_issue.ex | fikape/code-corps-api | c21674b0b2a19fa26945c94268db8894420ca181 | [
"MIT"
] | 275 | 2015-06-23T00:20:51.000Z | 2021-08-19T16:17:37.000Z | lib/code_corps/github/sync/github_issue/github_issue.ex | fikape/code-corps-api | c21674b0b2a19fa26945c94268db8894420ca181 | [
"MIT"
] | 1,304 | 2015-06-26T02:11:54.000Z | 2019-12-12T21:08:00.000Z | lib/code_corps/github/sync/github_issue/github_issue.ex | fikape/code-corps-api | c21674b0b2a19fa26945c94268db8894420ca181 | [
"MIT"
] | 140 | 2016-01-01T18:19:47.000Z | 2020-11-22T06:24:47.000Z | defmodule CodeCorps.GitHub.Sync.GithubIssue do
@moduledoc ~S"""
In charge of finding or creating a `CodeCorps.GithubIssue` to link with a
`CodeCorps.Task` when processing a GitHub Issue payload.
The only entry point is `create_or_update_issue/2`.
"""
alias CodeCorps.{
GitHub.Adapters,
GitHub.Sync,... | 35.507937 | 128 | 0.71882 |
3faa229cbdf6339625e0218836ce17ee157c9307 | 1,080 | exs | Elixir | web/config/config.exs | simmsb/infolab-lights | 1cd685029c50cde0de84176efd65fb0cabc6c820 | [
"MIT"
] | null | null | null | web/config/config.exs | simmsb/infolab-lights | 1cd685029c50cde0de84176efd65fb0cabc6c820 | [
"MIT"
] | 47 | 2020-08-03T09:30:46.000Z | 2021-03-01T08:18:51.000Z | web/config/config.exs | nitros12/something-secret | 1cd685029c50cde0de84176efd65fb0cabc6c820 | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
# General application configuration
import Config
# Configures the endpoint
config :infolab_light_games... | 34.83871 | 95 | 0.77963 |
3faa56ac9b4ed876cc62cb361dce1ea3b34a7506 | 162 | ex | Elixir | lib/conduit/accounts/events/user_registered.ex | ray-sh/cov_detect | b4e74b13850eff4a7c646a64fc7c28fbe700ad2e | [
"MIT"
] | 298 | 2017-06-05T14:28:23.000Z | 2022-03-30T16:53:44.000Z | lib/conduit/accounts/events/user_registered.ex | ray-sh/cov_detect | b4e74b13850eff4a7c646a64fc7c28fbe700ad2e | [
"MIT"
] | 28 | 2017-07-21T01:06:47.000Z | 2021-03-07T12:32:56.000Z | lib/conduit/accounts/events/user_registered.ex | ray-sh/cov_detect | b4e74b13850eff4a7c646a64fc7c28fbe700ad2e | [
"MIT"
] | 77 | 2017-08-14T20:12:03.000Z | 2021-12-08T22:24:59.000Z | defmodule Conduit.Accounts.Events.UserRegistered do
@derive Jason.Encoder
defstruct [
:user_uuid,
:username,
:email,
:hashed_password
]
end
| 16.2 | 51 | 0.697531 |
3faa6835d4c6f18132ca7dba4894b379cb3a84ac | 72 | exs | Elixir | test/views/page_view_test.exs | evadne/supervised-scaler | 30fa3275a3f9c16c79457ec2205e7bc129658713 | [
"MIT"
] | 44 | 2016-09-22T21:37:48.000Z | 2021-10-09T03:43:32.000Z | test/views/page_view_test.exs | evadne/supervised-scaler | 30fa3275a3f9c16c79457ec2205e7bc129658713 | [
"MIT"
] | 3 | 2016-09-23T08:41:22.000Z | 2017-05-24T10:58:54.000Z | test/views/page_view_test.exs | evadne/supervised-scaler | 30fa3275a3f9c16c79457ec2205e7bc129658713 | [
"MIT"
] | 5 | 2016-09-25T18:52:00.000Z | 2021-07-28T21:12:33.000Z | defmodule Scaler.PageViewTest do
use Scaler.ConnCase, async: true
end
| 18 | 34 | 0.805556 |
3faa6bad489f4564e74a74f605e34a5b369b3b1e | 1,864 | exs | Elixir | clients/dialogflow/mix.exs | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"Apache-2.0"
] | null | null | null | clients/dialogflow/mix.exs | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"Apache-2.0"
] | null | null | null | clients/dialogflow/mix.exs | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"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... | 27.820896 | 128 | 0.657725 |
3faa86895dcf0d3a9215444a954a6ae39006d9cc | 17,278 | ex | Elixir | clients/games/lib/google_api/games/v1/api/achievements.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/games/lib/google_api/games/v1/api/achievements.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/games/lib/google_api/games/v1/api/achievements.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... | 45.349081 | 248 | 0.642667 |
3faa9189c0a9b70bd9b0fa0a37be21545aa66831 | 281 | ex | Elixir | lib/fatex_web/plug/generate_csrf.ex | vinicius-molina/FaTex | bbc05acef7a9697efe9ec0fe64511bce9f26a9b3 | [
"Apache-2.0"
] | 3 | 2019-12-08T19:42:39.000Z | 2020-03-17T13:02:56.000Z | lib/fatex_web/plug/generate_csrf.ex | vinicius-molina/FaTex | bbc05acef7a9697efe9ec0fe64511bce9f26a9b3 | [
"Apache-2.0"
] | 1 | 2021-03-09T19:49:41.000Z | 2021-03-09T19:49:41.000Z | lib/fatex_web/plug/generate_csrf.ex | vinicius-molina/FaTex | bbc05acef7a9697efe9ec0fe64511bce9f26a9b3 | [
"Apache-2.0"
] | 1 | 2019-12-08T19:42:42.000Z | 2019-12-08T19:42:42.000Z | defmodule FatexWeb.Plug.GenerateCSRF do
@moduledoc """
Used to handle the csrf token on image upload on live_view
"""
import Plug.Conn
def init(_opts), do: nil
def call(conn, _opts) do
put_session(conn, :csrf_token, Phoenix.Controller.get_csrf_token())
end
end
| 23.416667 | 71 | 0.72242 |
3faa9b58df296216470068bf1563f4f21d37343d | 1,187 | exs | Elixir | config/target.exs | mtrudel/desk_clock | 9e6ea5ea58bbab12a7188b3c00237f2a8bf066a6 | [
"MIT"
] | 7 | 2020-07-30T23:58:52.000Z | 2022-01-24T19:10:11.000Z | config/target.exs | mtrudel/desk_clock | 9e6ea5ea58bbab12a7188b3c00237f2a8bf066a6 | [
"MIT"
] | null | null | null | config/target.exs | mtrudel/desk_clock | 9e6ea5ea58bbab12a7188b3c00237f2a8bf066a6 | [
"MIT"
] | 1 | 2020-12-22T15:28:16.000Z | 2020-12-22T15:28:16.000Z | import Config
config :shoehorn,
init: [:nerves_runtime, :nerves_pack],
app: Mix.Project.config()[:app]
config :nerves_runtime, :kernel, use_system_registry: false
config :nerves, erlinit: [hostname_pattern: "nerves-%s"]
keys =
[
Path.join([System.user_home!(), ".ssh", "id_rsa.pub"]),
Path.join([System... | 24.22449 | 75 | 0.639427 |
3faa9d61704822c1c6b2aa764b558fa9d8885ed3 | 1,054 | ex | Elixir | lib/blockquote_web/views/category_view.ex | allen-garvey/block-quote-phoenix | 5c0f5d16daf6bb515a8f1846c3e4311b368a7bdb | [
"MIT"
] | 4 | 2019-10-04T16:11:15.000Z | 2021-08-18T21:00:13.000Z | apps/blockquote/lib/blockquote_web/views/category_view.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/views/category_view.ex | allen-garvey/phoenix-umbrella | 1d444bbd62a5e7b5f51d317ce2be71ee994125d5 | [
"MIT"
] | null | null | null | defmodule BlockquoteWeb.CategoryView do
use BlockquoteWeb, :view
def render("new.html", assigns) do
assigns = Map.merge(assigns, shared_form_assigns())
render BlockquoteWeb.SharedView, "new.html", assigns
end
def render("edit.html", assigns) do
assigns = Map.merge(assigns,
%{
item... | 20.666667 | 70 | 0.629981 |
3faaa6ecc8e7f455ef69a3ae1599880be3fa511a | 2,631 | exs | Elixir | mix.exs | lawik/nerves_system_rpi4_k3s | 6614188ef65f5346e9b9b8f61d75fb08e7e1e000 | [
"Apache-2.0"
] | 1 | 2021-11-30T20:37:55.000Z | 2021-11-30T20:37:55.000Z | mix.exs | lawik/nerves_system_rpi4_k3s | 6614188ef65f5346e9b9b8f61d75fb08e7e1e000 | [
"Apache-2.0"
] | null | null | null | mix.exs | lawik/nerves_system_rpi4_k3s | 6614188ef65f5346e9b9b8f61d75fb08e7e1e000 | [
"Apache-2.0"
] | null | null | null | defmodule NervesSystemRpi4.MixProject do
use Mix.Project
@github_organization "lawik"
@app :nerves_system_rpi4_k3s
@version Path.join(__DIR__, "VERSION")
|> File.read!()
|> String.trim()
def project do
[
app: @app,
version: @version,
elixir: "~> 1.6",
compil... | 22.681034 | 82 | 0.582668 |
3faabdcc850dd0c49810dc0670f0707858b45450 | 5,583 | ex | Elixir | lib/pigeon/fcm.ex | stefanzvkvc/pigeon | 3de4179db924e0f003edb0a480a60e616699739e | [
"MIT"
] | 1 | 2021-09-05T13:34:21.000Z | 2021-09-05T13:34:21.000Z | lib/pigeon/fcm.ex | stefanzvkvc/pigeon | 3de4179db924e0f003edb0a480a60e616699739e | [
"MIT"
] | null | null | null | lib/pigeon/fcm.ex | stefanzvkvc/pigeon | 3de4179db924e0f003edb0a480a60e616699739e | [
"MIT"
] | null | null | null | defmodule Pigeon.FCM do
@moduledoc """
Firebase Cloud Messaging (FCM)
"""
alias Pigeon.FCM.{Config, Notification}
alias Pigeon.Worker
require Logger
@typedoc ~S"""
Can be either a single notification or a list.
"""
@type notification :: Notification.t() | [Notification.t(), ...]
@typedoc ~S"""
... | 28.630769 | 82 | 0.6235 |
3fab19ea4cc57d41431eb9a7ed1e8c1538afb59d | 1,915 | ex | Elixir | clients/apigee/lib/google_api/apigee/v1/model/google_cloud_apigee_v1_alias.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/apigee/lib/google_api/apigee/v1/model/google_cloud_apigee_v1_alias.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/apigee/lib/google_api/apigee/v1/model/google_cloud_apigee_v1_alias.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 36.132075 | 148 | 0.725326 |
3fab5fdeb30e702bfe9f66c2b0f6c3722a6265d0 | 898 | ex | Elixir | lib/screens/config/gl.ex | mbta/screens | 4b586970f8844b19543bb2ffd4b032a89f6fa40a | [
"MIT"
] | 3 | 2021-07-27T14:11:00.000Z | 2022-01-03T14:16:43.000Z | lib/screens/config/gl.ex | mbta/screens | 4b586970f8844b19543bb2ffd4b032a89f6fa40a | [
"MIT"
] | 444 | 2021-03-10T20:57:17.000Z | 2022-03-31T16:00:35.000Z | lib/screens/config/gl.ex | mbta/screens | 4b586970f8844b19543bb2ffd4b032a89f6fa40a | [
"MIT"
] | null | null | null | defmodule Screens.Config.Gl do
@moduledoc false
alias Screens.Config.PsaConfig
@type t :: %__MODULE__{
stop_id: String.t(),
platform_id: String.t(),
route_id: String.t(),
direction_id: 0 | 1,
headway_mode: boolean(),
service_level: pos_integer(),
... | 27.212121 | 66 | 0.601336 |
3fab602116b0d3770d1ef1c9bb33590eefee34ce | 840 | ex | Elixir | apps/asf_bo_web/lib/asf_bo_web/controllers/user_registration_controller.ex | LazarRistic/asf | 2c557f06839a129b35174142c91f60696be2fa89 | [
"MIT"
] | null | null | null | apps/asf_bo_web/lib/asf_bo_web/controllers/user_registration_controller.ex | LazarRistic/asf | 2c557f06839a129b35174142c91f60696be2fa89 | [
"MIT"
] | null | null | null | apps/asf_bo_web/lib/asf_bo_web/controllers/user_registration_controller.ex | LazarRistic/asf | 2c557f06839a129b35174142c91f60696be2fa89 | [
"MIT"
] | null | null | null | defmodule AsfBOWeb.UserRegistrationController do
use AsfBOWeb, :controller
alias Asf.Accounts
alias Asf.Accounts.User
alias AsfBOWeb.UserAuth
def new(conn, _params) do
changeset = Accounts.change_user_registration(%User{})
render(conn, "new.html", changeset: changeset, page_title: "Sign up")
end
... | 27.096774 | 73 | 0.644048 |
3fab61c43d75b042c31a2a84829ac31a20648ae5 | 493 | exs | Elixir | apps/train_loc/test/train_loc/vehicles/state_test.exs | paulswartz/commuter_rail_boarding | 6be34c192d6a1ee980307d9f3d027bf4cdafa53f | [
"MIT"
] | 1 | 2022-01-30T20:53:07.000Z | 2022-01-30T20:53:07.000Z | apps/train_loc/test/train_loc/vehicles/state_test.exs | paulswartz/commuter_rail_boarding | 6be34c192d6a1ee980307d9f3d027bf4cdafa53f | [
"MIT"
] | 47 | 2021-05-05T10:31:05.000Z | 2022-03-30T22:18:14.000Z | apps/train_loc/test/train_loc/vehicles/state_test.exs | paulswartz/commuter_rail_boarding | 6be34c192d6a1ee980307d9f3d027bf4cdafa53f | [
"MIT"
] | 1 | 2021-05-14T00:35:08.000Z | 2021-05-14T00:35:08.000Z | defmodule TrainLoc.Vehicles.StateTest do
use ExUnit.Case, async: true
setup do
Application.ensure_all_started(:train_loc)
end
test "handles undefined call" do
assert GenServer.call(TrainLoc.Vehicles.State, :unknown_call) ==
{:error, "Unknown callback."}
end
test "handles undefined ca... | 23.47619 | 68 | 0.724138 |
3fab77cbcdabedd6cb3500777b0e038390e39efd | 595 | exs | Elixir | 08_maps/book_room.exs | gshaw/elixir | 8d2ff9b883242696008b35a715b2f13a8291772d | [
"MIT"
] | 1 | 2016-10-19T20:44:37.000Z | 2016-10-19T20:44:37.000Z | 08_maps/book_room.exs | gshaw/elixir | 8d2ff9b883242696008b35a715b2f13a8291772d | [
"MIT"
] | null | null | null | 08_maps/book_room.exs | gshaw/elixir | 8d2ff9b883242696008b35a715b2f13a8291772d | [
"MIT"
] | null | null | null | defmodule HotelRoom do
def book(%{name: name, height: height})
when height > 1.9 do
IO.puts "Need long bed for #{name}"
end
def book(%{name: name, height: height})
when height < 1.3 do
IO.puts "Need low shower controls for #{name}"
end
def book(person) do
IO.puts "Any room works for #{person... | 22.884615 | 50 | 0.583193 |
3fab8046e50275910486954704af5bc358db4a2b | 115 | exs | Elixir | config/config.exs | mcrumm/mystex_pizza_on_broadway | 14d79c97086e55bf97464a41fef02e9e8e9d771f | [
"Apache-2.0"
] | 18 | 2019-10-16T23:08:37.000Z | 2021-11-17T10:46:20.000Z | config/config.exs | okariFrankline/pizza_broadway | 8d95f25c890e8f64aa97107c96e568304caf78df | [
"Apache-2.0"
] | null | null | null | config/config.exs | okariFrankline/pizza_broadway | 8d95f25c890e8f64aa97107c96e568304caf78df | [
"Apache-2.0"
] | 4 | 2019-10-16T23:07:16.000Z | 2022-01-19T18:01:19.000Z | use Mix.Config
config :mystex_pizza_on_broadway, ecto_repos: [MystexPizza.Repo]
import_config "#{Mix.env()}.exs"
| 19.166667 | 64 | 0.773913 |
3fab92c1cdf96cdba8dd06d88cf6e95bf6875b09 | 3,901 | ex | Elixir | clients/you_tube/lib/google_api/you_tube/v3/model/super_chat_event_snippet.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/you_tube/lib/google_api/you_tube/v3/model/super_chat_event_snippet.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/you_tube/lib/google_api/you_tube/v3/model/super_chat_event_snippet.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"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... | 48.160494 | 191 | 0.725711 |
3fabcefc32d3dca0f307e0b4edad2879c7802db9 | 346 | exs | Elixir | test/instagram_clone_web/live/page_live_test.exs | elixirprogrammer/InstagramClonePETAL | 5710f89de32a95b0416a960a46d081e7ad4833ab | [
"MIT"
] | 69 | 2021-04-11T21:57:26.000Z | 2022-03-30T01:09:40.000Z | test/instagram_clone_web/live/page_live_test.exs | hminy572/InstagramClonePETAL | 577cdad0e17399e47ef9d3f8e789bd07e33012b9 | [
"MIT"
] | 1 | 2021-04-16T17:38:11.000Z | 2021-04-16T17:38:11.000Z | test/instagram_clone_web/live/page_live_test.exs | hminy572/InstagramClonePETAL | 577cdad0e17399e47ef9d3f8e789bd07e33012b9 | [
"MIT"
] | 4 | 2021-04-16T10:45:18.000Z | 2021-07-23T15:08:08.000Z | defmodule InstagramCloneWeb.PageLiveTest do
use InstagramCloneWeb.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) =~ "Welco... | 28.833333 | 60 | 0.736994 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.