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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b2f13420204e10c85332728d891560f15d2718d6 | 386 | exs | Elixir | distributor/config/test.exs | fknop/distributor | 1b1a4910ec0887b8c10c636e55f15921d67bfa86 | [
"MIT"
] | 1 | 2019-12-27T10:21:13.000Z | 2019-12-27T10:21:13.000Z | distributor/config/test.exs | fknop/distributor | 1b1a4910ec0887b8c10c636e55f15921d67bfa86 | [
"MIT"
] | 209 | 2019-12-25T17:16:14.000Z | 2022-03-25T23:13:05.000Z | distributor/config/test.exs | fknop/distributor | 1b1a4910ec0887b8c10c636e55f15921d67bfa86 | [
"MIT"
] | null | null | null | import Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :distributor, DistributorWeb.Endpoint,
http: [port: 4002],
server: false
# Print only warnings and errors during test
config :logger, level: :warn
config :libcluster,
topologies: [
distri... | 21.444444 | 56 | 0.715026 |
b2f15835b594228ec6e4aca49ecff31381dcec60 | 1,582 | ex | Elixir | lib/okr_app_web.ex | sb8244/okr_app_pub | 933872107bd13390a0a5ea119d7997d4cb5ea7db | [
"MIT"
] | 12 | 2019-05-10T21:48:06.000Z | 2021-11-07T14:04:30.000Z | lib/okr_app_web.ex | sb8244/okr_app_pub | 933872107bd13390a0a5ea119d7997d4cb5ea7db | [
"MIT"
] | 2 | 2019-05-14T19:07:10.000Z | 2019-05-20T21:06:27.000Z | lib/okr_app_web.ex | sb8244/okr_app_pub | 933872107bd13390a0a5ea119d7997d4cb5ea7db | [
"MIT"
] | 3 | 2019-05-19T18:24:20.000Z | 2019-10-31T20:29:12.000Z | defmodule OkrAppWeb do
@moduledoc """
The entrypoint for defining your web interface, such
as controllers, views, channels and so on.
This can be used in your application as:
use OkrAppWeb, :controller
use OkrAppWeb, :view
The definitions below will be executed for every view,
controller, etc... | 22.927536 | 69 | 0.687737 |
b2f19bde1d01532dec61acebd522ab249e45f171 | 1,262 | ex | Elixir | lib/nautilus/core/admin/commands/cmd_get_client_list.ex | CarloHFR/NautilusGateway | 26211948c5f9127e6662a90e41df5b43b2408372 | [
"MIT"
] | null | null | null | lib/nautilus/core/admin/commands/cmd_get_client_list.ex | CarloHFR/NautilusGateway | 26211948c5f9127e6662a90e41df5b43b2408372 | [
"MIT"
] | null | null | null | lib/nautilus/core/admin/commands/cmd_get_client_list.ex | CarloHFR/NautilusGateway | 26211948c5f9127e6662a90e41df5b43b2408372 | [
"MIT"
] | null | null | null | defmodule Nautilus.Core.Admin.Commands.CMDGetClientList do
@moduledoc """
This module is responsible for process get client list command
"""
@behaviour Application.get_env(:nautilus, :CMDPort)
@get_hostname Application.get_env(:nautilus, :GetHostname)
@cluster_credentials Application.get_env(:... | 45.071429 | 193 | 0.709984 |
b2f1baa25d4493f8c9a127281c9b6f626efa86cf | 5,156 | exs | Elixir | test/glimesh_web/controllers/channel_moderator_controller_test.exs | itsUnsmart/glimesh.tv | 22c532184bb5046f6c6d8232e8bd66ba534c01c1 | [
"MIT"
] | null | null | null | test/glimesh_web/controllers/channel_moderator_controller_test.exs | itsUnsmart/glimesh.tv | 22c532184bb5046f6c6d8232e8bd66ba534c01c1 | [
"MIT"
] | null | null | null | test/glimesh_web/controllers/channel_moderator_controller_test.exs | itsUnsmart/glimesh.tv | 22c532184bb5046f6c6d8232e8bd66ba534c01c1 | [
"MIT"
] | null | null | null | defmodule GlimeshWeb.ChannelModeratorControllerTest do
use GlimeshWeb.ConnCase
import Glimesh.AccountsFixtures
alias Glimesh.StreamModeration
@create_attrs %{
can_ban: true,
can_long_timeout: true,
can_short_timeout: true,
can_un_timeout: true,
can_unban: true
}
@update_attrs %{
ca... | 29.129944 | 99 | 0.670481 |
b2f1c0322a560eb35202a3ddb7d0dd4a8d6579b4 | 387 | exs | Elixir | mix.exs | electricshaman/mesquitte | a144b59f25823bef033b71d065b1abcbf770ce78 | [
"MIT"
] | null | null | null | mix.exs | electricshaman/mesquitte | a144b59f25823bef033b71d065b1abcbf770ce78 | [
"MIT"
] | null | null | null | mix.exs | electricshaman/mesquitte | a144b59f25823bef033b71d065b1abcbf770ce78 | [
"MIT"
] | null | null | null | defmodule Mesquitte.Mixfile do
use Mix.Project
def project do
[app: :mesquitte,
version: "0.1.0",
elixir: "~> 1.3",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps()]
end
def application do
[applications: [:logger],
mod: {Mesquitte, []}]
... | 16.125 | 39 | 0.552972 |
b2f1d10d2b6efaa80ee9b36e5b74022d549375e2 | 2,571 | ex | Elixir | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/ip_configuration.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/ip_configuration.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/ip_configuration.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... | 40.809524 | 182 | 0.717231 |
b2f1d3f8f21421058f0072fae1f5a80b853658a2 | 990 | ex | Elixir | apps/mishka_html/lib/mishka_html_web/live/components/admin/dashboard/admin_last_blog_posts_component.ex | mishka-group/mishka-cms | 4e34ed646f807687f4ae809e862acb6f2c5aacef | [
"Apache-2.0"
] | 35 | 2021-06-26T09:05:50.000Z | 2022-03-30T15:41:22.000Z | apps/mishka_html/lib/mishka_html_web/live/components/admin/dashboard/admin_last_blog_posts_component.ex | mishka-group/mishka-cms | 4e34ed646f807687f4ae809e862acb6f2c5aacef | [
"Apache-2.0"
] | 101 | 2021-01-01T09:54:07.000Z | 2022-03-28T10:02:24.000Z | apps/mishka_html/lib/mishka_html_web/live/components/admin/dashboard/admin_last_blog_posts_component.ex | mishka-group/mishka-cms | 4e34ed646f807687f4ae809e862acb6f2c5aacef | [
"Apache-2.0"
] | 8 | 2021-01-17T17:08:07.000Z | 2022-03-11T16:12:06.000Z | defmodule MishkaHtmlWeb.Admin.Dashboard.LastBlogPostsComponent do
use MishkaHtmlWeb, :live_component
def render(assigns) do
~L"""
<div class="container rtl">
<div class="clearfix"></div>
<h3 class="admin-home-calendar-h3-title-last-post"><%= MishkaTranslator.Gettext.dgettext("html_live_c... | 33 | 153 | 0.588889 |
b2f1d43b85c38bad7d46aa8c4879528bb7e23b3c | 1,018 | ex | Elixir | test/support/channel_case.ex | wsmoak/my_app_726605 | 9f1808a0fa44ff28f95ad714ecb22a21650d093f | [
"MIT"
] | null | null | null | test/support/channel_case.ex | wsmoak/my_app_726605 | 9f1808a0fa44ff28f95ad714ecb22a21650d093f | [
"MIT"
] | null | null | null | test/support/channel_case.ex | wsmoak/my_app_726605 | 9f1808a0fa44ff28f95ad714ecb22a21650d093f | [
"MIT"
] | null | null | null | defmodule MyApp_726605.ChannelCase do
@moduledoc """
This module defines the test case to be used by
channel tests.
Such tests rely on `Phoenix.ChannelTest` and also
imports other functionality to make it easier
to build and query models.
Finally, if the test case interacts with the database,
it canno... | 24.238095 | 71 | 0.712181 |
b2f1d846c1df9c7adc88ef973de80fc09eb6c64f | 461 | ex | Elixir | apps/andi/lib/andi/schemas/dataset_access_group.ex | smartcitiesdata/smartcitiesdata | c926c25003a8ee2d09b933c521c49f674841c0b6 | [
"Apache-2.0"
] | 26 | 2019-09-20T23:54:45.000Z | 2020-08-20T14:23:32.000Z | apps/andi/lib/andi/schemas/dataset_access_group.ex | smartcitiesdata/smartcitiesdata | c926c25003a8ee2d09b933c521c49f674841c0b6 | [
"Apache-2.0"
] | 757 | 2019-08-15T18:15:07.000Z | 2020-09-18T20:55:31.000Z | apps/andi/lib/andi/schemas/dataset_access_group.ex | smartcitiesdata/smartcitiesdata | c926c25003a8ee2d09b933c521c49f674841c0b6 | [
"Apache-2.0"
] | 9 | 2019-11-12T16:43:46.000Z | 2020-03-25T16:23:16.000Z | defmodule Andi.Schemas.DatasetAccessGroup do
@moduledoc """
Ecto schema respresentation of the Dataset-Access Group association.
"""
use Ecto.Schema
alias Andi.Schemas.User
alias Andi.InputSchemas.Datasets.Dataset
@primary_key false
schema "dataset_access_groups" do
belongs_to(:access_group, Acce... | 24.263158 | 78 | 0.752711 |
b2f1f0f64a4990ff929a80a9fa44496e8b93caa8 | 575 | ex | Elixir | rockelivery/lib/rockelivery/orders/report_runner.ex | arilsonsouza/rocketseat-ignite-elixir | 93e32d52d589336dfd2d81e755d6dd7f05ee40b8 | [
"MIT"
] | null | null | null | rockelivery/lib/rockelivery/orders/report_runner.ex | arilsonsouza/rocketseat-ignite-elixir | 93e32d52d589336dfd2d81e755d6dd7f05ee40b8 | [
"MIT"
] | null | null | null | rockelivery/lib/rockelivery/orders/report_runner.ex | arilsonsouza/rocketseat-ignite-elixir | 93e32d52d589336dfd2d81e755d6dd7f05ee40b8 | [
"MIT"
] | null | null | null | defmodule Rockelivery.Orders.ReportRunner do
use GenServer
require Logger
alias Rockelivery.Orders.Report
def start_link(_) do
GenServer.start_link(__MODULE__, %{})
end
@impl true
def init(state) do
schedule_report_generation()
{:ok, state}
end
@impl true
def handle_info(:generate_r... | 19.166667 | 66 | 0.709565 |
b2f244a00adea29d3586f43fe3e04df6394ca3cb | 2,114 | exs | Elixir | config/prod.exs | jordyvanvorselen/leaderboards | 0087c756a157f0e9ccbee3ec02a21d0c813e40a9 | [
"MIT"
] | null | null | null | config/prod.exs | jordyvanvorselen/leaderboards | 0087c756a157f0e9ccbee3ec02a21d0c813e40a9 | [
"MIT"
] | null | null | null | config/prod.exs | jordyvanvorselen/leaderboards | 0087c756a157f0e9ccbee3ec02a21d0c813e40a9 | [
"MIT"
] | null | null | null | use Mix.Config
# For production, don't forget to configure the url host
# to something meaningful, Phoenix uses this information
# when generating URLs.
#
# Note we also include the path to a cache manifest
# containing the digested version of static files. This
# manifest is generated by the `mix phx.digest` task,
# ... | 36.448276 | 66 | 0.719489 |
b2f25192231d122c5d1e1b62174b6536341ed92e | 1,317 | ex | Elixir | lib/filtrex/validators/date.ex | NeoArcanjo/filtrex | 771045995d50704f3237cce6e060ab4507aa4629 | [
"MIT"
] | 181 | 2016-01-08T02:58:37.000Z | 2022-01-20T07:32:07.000Z | lib/filtrex/validators/date.ex | NeoArcanjo/filtrex | 771045995d50704f3237cce6e060ab4507aa4629 | [
"MIT"
] | 53 | 2016-02-05T13:56:09.000Z | 2020-12-09T00:18:55.000Z | lib/filtrex/validators/date.ex | NeoArcanjo/filtrex | 771045995d50704f3237cce6e060ab4507aa4629 | [
"MIT"
] | 27 | 2016-05-19T12:54:09.000Z | 2021-10-19T08:27:48.000Z | defmodule Filtrex.Validator.Date do
@format "{YYYY}-{0M}-{0D}"
@moduledoc false
alias Timex.Parse.DateTime.Parser, as: TimexParser
import Filtrex.Condition, only: [parse_value_type_error: 2]
def format, do: @format
def parse_string_date(config, value) when is_binary(value) do
parse_format(config, val... | 30.627907 | 98 | 0.646925 |
b2f25430fae29d9189fc3ebb011c2f6fbc27a937 | 2,756 | exs | Elixir | test/adoptoposs_web/live/landing_page_live_test.exs | paulgoetze/adoptoposs | 1a143917ac5a192f12054fff4410a1ee18935353 | [
"MIT"
] | 120 | 2020-03-30T13:58:40.000Z | 2022-03-30T10:17:50.000Z | test/adoptoposs_web/live/landing_page_live_test.exs | paulgoetze/adoptoposs | 1a143917ac5a192f12054fff4410a1ee18935353 | [
"MIT"
] | 34 | 2020-04-01T23:11:59.000Z | 2022-03-13T08:14:37.000Z | test/adoptoposs_web/live/landing_page_live_test.exs | paulgoetze/adoptoposs | 1a143917ac5a192f12054fff4410a1ee18935353 | [
"MIT"
] | 16 | 2020-04-24T17:14:23.000Z | 2022-03-27T22:32:48.000Z | defmodule AdoptopossWeb.LandingPageLiveTest do
use AdoptopossWeb.LiveCase
alias AdoptopossWeb.LandingPageLive
alias Adoptoposs.{Tags, Network}
alias Adoptoposs.Tags.Tag
test "disconnected mount when logged out", %{conn: conn} do
conn = get(conn, Routes.live_path(conn, LandingPageLive))
html = html_... | 34.024691 | 86 | 0.688679 |
b2f26f4b682ca7ae073f702ea180b1f4219aac75 | 3,227 | exs | Elixir | test/support/simple_models.exs | rschef/paper_trail | 6ab8b29ee97b46222cc48d376daea70fc5cb8105 | [
"MIT"
] | 1 | 2021-03-17T14:22:49.000Z | 2021-03-17T14:22:49.000Z | test/support/simple_models.exs | rschef/paper_trail | 6ab8b29ee97b46222cc48d376daea70fc5cb8105 | [
"MIT"
] | null | null | null | test/support/simple_models.exs | rschef/paper_trail | 6ab8b29ee97b46222cc48d376daea70fc5cb8105 | [
"MIT"
] | 2 | 2021-06-08T11:47:03.000Z | 2021-10-18T21:44:08.000Z | defmodule LocationType do
use Ecto.Type
defstruct [:country]
@impl true
def type, do: :map
@impl true
def cast(%__MODULE__{} = location), do: {:ok, location}
def cast(%{} = data), do: {:ok, struct!(__MODULE__, data)}
def cast(_), do: :error
@impl true
def load(data) when is_map(data) do
data... | 22.10274 | 92 | 0.683917 |
b2f28e3cbed29e43dea9c2ffc292ca3fe153d39f | 2,533 | exs | Elixir | lib/mix/test/mix/tasks/compile.xref_test.exs | RyanBard/elixir | 3e0f3b47cf26aa121470141b9a1aa55a366c066e | [
"Apache-2.0"
] | 2 | 2018-11-15T06:38:14.000Z | 2018-11-17T18:03:14.000Z | lib/mix/test/mix/tasks/compile.xref_test.exs | RyanBard/elixir | 3e0f3b47cf26aa121470141b9a1aa55a366c066e | [
"Apache-2.0"
] | 1 | 2018-09-10T23:36:45.000Z | 2018-09-10T23:36:45.000Z | lib/mix/test/mix/tasks/compile.xref_test.exs | RyanBard/elixir | 3e0f3b47cf26aa121470141b9a1aa55a366c066e | [
"Apache-2.0"
] | 1 | 2018-09-10T23:32:56.000Z | 2018-09-10T23:32:56.000Z | Code.require_file("../../test_helper.exs", __DIR__)
defmodule Mix.Tasks.Compile.XrefTest do
use MixTest.Case
import ExUnit.CaptureIO
setup do
Mix.Project.push(MixTest.Case.Sample)
:ok
end
test "doesn't xref if not stale, unless forced" do
in_fixture("no_mixfile", fn ->
write_no_func()
... | 27.236559 | 98 | 0.589025 |
b2f2978be15e54872e123b316e9c91613f6ab3f8 | 2,038 | exs | Elixir | examples/echo_phoenix/config/prod.exs | wingyplus/line_ex | 73ae52c5c07998dac55f5f11aa9ce79d751b67d6 | [
"MIT"
] | 3 | 2021-07-27T21:29:43.000Z | 2021-08-06T11:52:24.000Z | examples/echo_phoenix/config/prod.exs | wingyplus/line_ex | 73ae52c5c07998dac55f5f11aa9ce79d751b67d6 | [
"MIT"
] | 7 | 2021-07-26T03:18:39.000Z | 2021-10-11T11:16:49.000Z | examples/echo_phoenix/config/prod.exs | wingyplus/line_ex | 73ae52c5c07998dac55f5f11aa9ce79d751b67d6 | [
"MIT"
] | 1 | 2021-07-29T16:13:47.000Z | 2021-07-29T16:13:47.000Z | import Config
# For production, don't forget to configure the url host
# to something meaningful, Phoenix uses this information
# when generating URLs.
#
# Note we also include the path to a cache manifest
# containing the digested version of static files. This
# manifest is generated by the `mix phx.digest` task,
# w... | 36.392857 | 66 | 0.718842 |
b2f2b0a6793797e73a8c432ef8f64683946ad340 | 1,172 | exs | Elixir | clients/double_click_bid_manager/mix.exs | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/double_click_bid_manager/mix.exs | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/double_click_bid_manager/mix.exs | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | defmodule GoogleApi.DoubleClickBidManager.V1.Mixfile do
use Mix.Project
@version "0.5.0"
def project do
[app: :google_api_double_click_bid_manager,
version: @version,
elixir: "~> 1.4",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
description: description(),
... | 24.416667 | 124 | 0.620307 |
b2f2c3cf7d6439847b3f877f808283d80cf2ec0e | 1,518 | ex | Elixir | lib/2020/day10.ex | hallski/adventofcode | 03efb385688e8072b0b44d35012297833498f799 | [
"MIT"
] | null | null | null | lib/2020/day10.ex | hallski/adventofcode | 03efb385688e8072b0b44d35012297833498f799 | [
"MIT"
] | null | null | null | lib/2020/day10.ex | hallski/adventofcode | 03efb385688e8072b0b44d35012297833498f799 | [
"MIT"
] | null | null | null | defmodule AdventOfCode.Y2020.Day10 do
@data_dir Path.expand("../../data", __DIR__)
def run() do
@data_dir
|> Path.join("2020/day10.txt")
|> File.read!()
|> String.split("\n", trim: true)
|> Enum.map(&String.to_integer/1)
|> add_socket_and_device()
end
def add_socket_and_device(input), ... | 24.483871 | 90 | 0.571805 |
b2f2c7332b399a29c79d048537921fe402cf5bd7 | 288 | ex | Elixir | lib/til_web/controllers/search_controller.ex | kw7oe/til | 5ecaa3d199c06d535d1bbbfa05e2dc88e86ad815 | [
"MIT"
] | null | null | null | lib/til_web/controllers/search_controller.ex | kw7oe/til | 5ecaa3d199c06d535d1bbbfa05e2dc88e86ad815 | [
"MIT"
] | 2 | 2020-04-26T14:03:27.000Z | 2020-12-12T17:14:02.000Z | lib/til_web/controllers/search_controller.ex | kw7oe/til | 5ecaa3d199c06d535d1bbbfa05e2dc88e86ad815 | [
"MIT"
] | null | null | null | defmodule TilWeb.SearchController do
use TilWeb, :controller
alias Til.Posts.PostSearch
alias Til.Repo
def create(conn, %{"query" => query}) do
posts =
query
|> PostSearch.run()
|> Repo.preload(:user)
render(conn, "show.html", posts: posts)
end
end
| 18 | 43 | 0.638889 |
b2f2cba9b1606f3220d2ab40b32d2e0a597d770f | 597 | ex | Elixir | binary_data_over_phoenix_sockets/web/router.ex | StoiximanServices/blog | b164ae5e8fb4701ee40925aca9aef2297b80be95 | [
"MIT"
] | 10 | 2016-11-28T03:38:36.000Z | 2021-08-24T10:38:38.000Z | binary_data_over_phoenix_sockets/web/router.ex | StoiximanServices/blog | b164ae5e8fb4701ee40925aca9aef2297b80be95 | [
"MIT"
] | null | null | null | binary_data_over_phoenix_sockets/web/router.ex | StoiximanServices/blog | b164ae5e8fb4701ee40925aca9aef2297b80be95 | [
"MIT"
] | 3 | 2018-07-11T08:31:41.000Z | 2019-01-24T18:16:44.000Z | defmodule BinaryDataOverPhoenixSockets.Router do
use BinaryDataOverPhoenixSockets.Web, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
end
pipeline :api do
plug :accepts, ["json"]
e... | 22.111111 | 57 | 0.718593 |
b2f2d739a1c30046bd8fc982d1984f47c19d37f8 | 1,653 | ex | Elixir | lib/oli_web/live/sections/invite/invitation.ex | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | 1 | 2022-03-17T20:35:47.000Z | 2022-03-17T20:35:47.000Z | lib/oli_web/live/sections/invite/invitation.ex | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | 9 | 2021-11-02T16:52:09.000Z | 2022-03-25T15:14:01.000Z | lib/oli_web/live/sections/invite/invitation.ex | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | null | null | null | defmodule OliWeb.Sections.Invites.Invitation do
use OliWeb, :surface_component
alias OliWeb.Router.Helpers, as: Routes
prop invitation, :struct, required: true
prop delete, :event, required: true
def render(assigns) do
assigns
|> do_render(Timex.diff(assigns.invitation.date_expires, DateTime.utc_now... | 42.384615 | 247 | 0.639443 |
b2f2f9efc31899d1d64cfab1cb2c6af70536e063 | 614 | ex | Elixir | lib/gremlex/request.ex | chaehb/gremlex | 5b5c9306d2f7c9f3d6dd79b395cd8ffcdc2b561a | [
"MIT"
] | null | null | null | lib/gremlex/request.ex | chaehb/gremlex | 5b5c9306d2f7c9f3d6dd79b395cd8ffcdc2b561a | [
"MIT"
] | null | null | null | lib/gremlex/request.ex | chaehb/gremlex | 5b5c9306d2f7c9f3d6dd79b395cd8ffcdc2b561a | [
"MIT"
] | null | null | null | defmodule Gremlex.Request do
alias Gremlex.Graph
@derive [Jason.Encoder]
@op "eval"
@processor ""
@enforce_keys [:op, :processor, :requestId, :args]
defstruct [:op, :processor, :requestId, :args]
@doc """
Accepts plain query or a graph and returns a Request.
"""
@spec new(String.t()) :: Request
d... | 26.695652 | 89 | 0.666124 |
b2f3096f78286ad4be9e7386c654c65dfad04fad | 955 | exs | Elixir | mix.exs | maxiwoj/AddressBook | 0d2b7171aa533f1afca6cb7347a6775c523c0489 | [
"Apache-2.0"
] | null | null | null | mix.exs | maxiwoj/AddressBook | 0d2b7171aa533f1afca6cb7347a6775c523c0489 | [
"Apache-2.0"
] | null | null | null | mix.exs | maxiwoj/AddressBook | 0d2b7171aa533f1afca6cb7347a6775c523c0489 | [
"Apache-2.0"
] | null | null | null | defmodule AddressBook.Mixfile do
use Mix.Project
def project do
[app: :address_book,
version: "0.1.1",
elixir: "~> 1.4",
description: description(),
package: package(),
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps()]
end
# Configuration... | 22.209302 | 68 | 0.606283 |
b2f30e23345bb78665043d34629e0b750a34349a | 692 | ex | Elixir | apps/problem_group/lib/problem_group/node_list.ex | piasekhgw/distributed_mkp | 0cd2d4a3b007d9fdd7544da34c2785ab6f48ae7e | [
"MIT"
] | 9 | 2017-09-27T21:25:34.000Z | 2020-10-07T16:14:26.000Z | apps/problem_group/lib/problem_group/node_list.ex | piasekhgw/distributed_mkp | 0cd2d4a3b007d9fdd7544da34c2785ab6f48ae7e | [
"MIT"
] | 1 | 2017-09-27T21:26:00.000Z | 2017-10-01T11:49:11.000Z | apps/problem_group/lib/problem_group/node_list.ex | piasekhgw/distributed_mkp | 0cd2d4a3b007d9fdd7544da34c2785ab6f48ae7e | [
"MIT"
] | null | null | null | defmodule ProblemGroup.NodeList do
@type t :: [node]
@problem_supervisor_name Application.get_env(:problem, :supervisor_name)
@spec dispatch_problems(t, [Problem.t], ProblemGroup.problem_position) :: :ok
def dispatch_problems(nodes, problems, parent_position) do
problems
|> Enum.with_index()
|> En... | 36.421053 | 112 | 0.705202 |
b2f31966a7f057fffd9dddc8cf649ad6800c005b | 269 | ex | Elixir | lib/mix/tasks/serial_ports.ex | msm/exbee | b99b7996c5da9092472371b8bc0bd5e7c2daa3f6 | [
"Apache-2.0"
] | 6 | 2017-06-18T14:29:59.000Z | 2019-07-28T15:47:02.000Z | lib/mix/tasks/serial_ports.ex | msm/exbee | b99b7996c5da9092472371b8bc0bd5e7c2daa3f6 | [
"Apache-2.0"
] | 3 | 2018-01-28T22:00:06.000Z | 2019-10-14T11:14:47.000Z | lib/mix/tasks/serial_ports.ex | msm/exbee | b99b7996c5da9092472371b8bc0bd5e7c2daa3f6 | [
"Apache-2.0"
] | 4 | 2016-09-22T02:50:34.000Z | 2019-10-14T07:43:38.000Z | defmodule Mix.Tasks.Exbee.SerialPorts do
@shortdoc "List available serial ports"
@moduledoc """
#{@shortdoc}
"""
use Mix.Task
def run(_) do
for {name, config} <- Exbee.serial_ports() do
IO.puts("#{name} => #{inspect(config)}")
end
end
end
| 17.933333 | 49 | 0.620818 |
b2f31b33ade058a66b0eb10c34c03176cac007d0 | 193 | ex | Elixir | test/support/repo.ex | taelor/phoenix_pagination | e1c6a3500c5c58f3583a15b0ff942e45f0a1538d | [
"MIT"
] | 21 | 2017-10-13T18:35:32.000Z | 2021-11-08T13:04:43.000Z | test/support/repo.ex | taelor/phoenix_pagination | e1c6a3500c5c58f3583a15b0ff942e45f0a1538d | [
"MIT"
] | 3 | 2017-10-29T12:02:06.000Z | 2022-01-25T00:05:10.000Z | test/support/repo.ex | taelor/phoenix_pagination | e1c6a3500c5c58f3583a15b0ff942e45f0a1538d | [
"MIT"
] | 4 | 2017-10-19T14:44:28.000Z | 2021-12-14T20:48:16.000Z | defmodule Phoenix.Pagination.Repo do
use Ecto.Repo, otp_app: :phoenix_pagination, adapter: Ecto.Adapters.Postgres
use Phoenix.Pagination, otp_app: :phoenix_pagination, per_page: 10
end
| 38.6 | 79 | 0.792746 |
b2f33ed367392c8de3e4e6a6b0c562574732a96c | 247 | ex | Elixir | lib/hl7/2.3.1/datatypes/eld.ex | calvinb/elixir-hl7 | 5e953fa11f9184857c0ec4dda8662889f35a6bec | [
"Apache-2.0"
] | null | null | null | lib/hl7/2.3.1/datatypes/eld.ex | calvinb/elixir-hl7 | 5e953fa11f9184857c0ec4dda8662889f35a6bec | [
"Apache-2.0"
] | null | null | null | lib/hl7/2.3.1/datatypes/eld.ex | calvinb/elixir-hl7 | 5e953fa11f9184857c0ec4dda8662889f35a6bec | [
"Apache-2.0"
] | null | null | null | defmodule HL7.V2_3_1.DataTypes.Eld do
@moduledoc false
alias HL7.V2_3_1.{DataTypes}
use HL7.DataType,
fields: [
segment_id: nil,
sequence: nil,
field_position: nil,
code_identifying_error: DataTypes.Ce
]
end
| 19 | 42 | 0.672065 |
b2f349c939a99ca150a7e94632f9e0d2e2f8b6c6 | 1,697 | ex | Elixir | lib/banned_book_report_web/controllers/user_confirmation_controller.ex | LannyBose/banned-book-report | 38de7d6399609c104f4821dc06672e8f583ecaed | [
"MIT"
] | null | null | null | lib/banned_book_report_web/controllers/user_confirmation_controller.ex | LannyBose/banned-book-report | 38de7d6399609c104f4821dc06672e8f583ecaed | [
"MIT"
] | null | null | null | lib/banned_book_report_web/controllers/user_confirmation_controller.ex | LannyBose/banned-book-report | 38de7d6399609c104f4821dc06672e8f583ecaed | [
"MIT"
] | null | null | null | defmodule BannedBookReportWeb.UserConfirmationController do
use BannedBookReportWeb, :controller
alias BannedBookReport.Accounts
def new(conn, _params) do
render(conn, "new.html")
end
def create(conn, %{"user" => %{"email" => email}}) do
if user = Accounts.get_user_by_email(email) do
Accounts... | 29.77193 | 89 | 0.616971 |
b2f360fcfb51e761e5a2dc5d4527debfd06adbdb | 1,627 | exs | Elixir | test/password_reset_test.exs | kiopro/bouncer | ad25d00c84174d97fa71e814ffe2eac8700ccebe | [
"MIT"
] | null | null | null | test/password_reset_test.exs | kiopro/bouncer | ad25d00c84174d97fa71e814ffe2eac8700ccebe | [
"MIT"
] | null | null | null | test/password_reset_test.exs | kiopro/bouncer | ad25d00c84174d97fa71e814ffe2eac8700ccebe | [
"MIT"
] | null | null | null | defmodule PasswordResetTest do
use ExUnit.Case
alias Plug.Conn
alias Bouncer.RedixPool
alias Bouncer.Adapters.Redis
alias Bouncer.MockEndpoint
alias Bouncer.PasswordReset
alias Bouncer.Token
doctest Bouncer.Session
setup do
RedixPool.command ~w(FLUSHALL)
{:ok, conn: %Conn{} |> Conn.put_priv... | 30.698113 | 77 | 0.660725 |
b2f3740153ec76620d5f0ff7f2ac795ce494ca3c | 1,581 | exs | Elixir | mix.exs | salemove/ex_freddy | 78e255121bc722fe3266ceaf04884aadf2f8e2db | [
"MIT"
] | 10 | 2017-06-28T11:39:39.000Z | 2021-11-19T23:23:16.000Z | mix.exs | salemove/ex_freddy | 78e255121bc722fe3266ceaf04884aadf2f8e2db | [
"MIT"
] | 16 | 2017-01-07T15:34:36.000Z | 2021-05-05T11:07:31.000Z | mix.exs | salemove/ex_freddy | 78e255121bc722fe3266ceaf04884aadf2f8e2db | [
"MIT"
] | 4 | 2018-10-08T19:54:46.000Z | 2021-05-05T10:49:10.000Z | defmodule Freddy.Mixfile do
use Mix.Project
def project do
[
app: :freddy,
version: "0.17.0-rc.5",
elixir: "~> 1.6",
elixirc_paths: elixirc_paths(Mix.env()),
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
aliases: [
lint: ["compile", "... | 26.35 | 81 | 0.552182 |
b2f37730df153bdbefd803200e2d28a4edf0b15b | 10,012 | exs | Elixir | test/definject/inject_test.exs | chain-partners/definject | 3756551e5e80e07405bb45eacdd51b1482e11ca3 | [
"MIT"
] | 19 | 2020-03-03T14:53:48.000Z | 2020-04-01T16:18:34.000Z | test/definject/inject_test.exs | chain-partners/definject | 3756551e5e80e07405bb45eacdd51b1482e11ca3 | [
"MIT"
] | 1 | 2020-10-19T11:22:15.000Z | 2020-10-20T05:14:17.000Z | test/definject/inject_test.exs | trevorite/definject | 3756551e5e80e07405bb45eacdd51b1482e11ca3 | [
"MIT"
] | 2 | 2020-11-19T17:34:19.000Z | 2021-05-16T05:46:22.000Z | defmodule Definject.InjectTest do
use ExUnit.Case, async: true
require Definject.Inject
alias Definject.Inject
alias Definject.AST
describe "call_for_head" do
test "with parenthesis" do
head =
quote do
add(a, b)
end
exp_head =
quote do
add(a, b, de... | 24.067308 | 98 | 0.505693 |
b2f390929ed30512f91a0233403a05cc4f998da3 | 658 | ex | Elixir | apps/bank/lib/bank/customer.ex | gusaiani/acme-bank-clone | 4ebd638c56a3f5360bccff68aa6d321bb25bf2cd | [
"MIT"
] | 776 | 2016-07-16T14:24:37.000Z | 2022-03-07T17:05:11.000Z | apps/bank/lib/bank/customer.ex | fercho1224/devops | 81a352d857e190963d9f045d73c91f3c36a12064 | [
"MIT"
] | 19 | 2016-09-03T15:06:57.000Z | 2021-12-10T10:04:05.000Z | apps/bank/lib/bank/customer.ex | fercho1224/devops | 81a352d857e190963d9f045d73c91f3c36a12064 | [
"MIT"
] | 130 | 2016-09-03T19:44:27.000Z | 2022-01-16T12:27:54.000Z | defmodule Bank.Customer do
use Bank.Model
schema "bank_customers" do
field :username, :string
field :email, :string
field :auth_account_id, :integer
belongs_to :wallet, Ledger.Account
timestamps()
end
@doc """
Builds a changeset based on the `struct` and `params`.
"""
def changeset... | 22.689655 | 77 | 0.664134 |
b2f3a85170112b0913dd691135036f87467cb8a9 | 142 | ex | Elixir | lib/mix/tasks/build/adjacency_graphs.ex | teerawat1992/zxcvbn-ex | 8d8c7d8e723ffe8f9ca52a3b79d344105af9beb1 | [
"MIT"
] | null | null | null | lib/mix/tasks/build/adjacency_graphs.ex | teerawat1992/zxcvbn-ex | 8d8c7d8e723ffe8f9ca52a3b79d344105af9beb1 | [
"MIT"
] | null | null | null | lib/mix/tasks/build/adjacency_graphs.ex | teerawat1992/zxcvbn-ex | 8d8c7d8e723ffe8f9ca52a3b79d344105af9beb1 | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.Build.AdjacencyGraphs do
use Mix.Task
@shortdoc "Build adjacensy graphs"
def run(_) do
IO.puts "TODO"
end
end | 17.75 | 44 | 0.71831 |
b2f3ca8e9b34b6ac0a26152ba5479c1188b34303 | 9,121 | ex | Elixir | test/support/command_case.ex | vheathen/club.wallprint.pro | d58d2409d8879d23ed4d60fe3b9c2e1bd82e924d | [
"MIT"
] | null | null | null | test/support/command_case.ex | vheathen/club.wallprint.pro | d58d2409d8879d23ed4d60fe3b9c2e1bd82e924d | [
"MIT"
] | 34 | 2019-11-10T11:31:37.000Z | 2019-11-27T21:26:48.000Z | test/support/command_case.ex | vheathen/club.wallprint.pro | d58d2409d8879d23ed4d60fe3b9c2e1bd82e924d | [
"MIT"
] | null | null | null | defmodule Club.CommandCase do
@moduledoc """
This module defines the setup for a domain commands test.
"""
use ExUnit.CaseTemplate
import Club.Factory
import Club.Fixture
@field_types [
:string,
:integer,
# :float,
Ecto.UUID
# :url
]
using(opts) do
command =
Keyword.g... | 27.978528 | 108 | 0.595549 |
b2f3cfc4ffc430a264cece0ca222e7fd1e72d6ab | 1,683 | exs | Elixir | test/scenic/primitive/circle_test.exs | mikeover/scenic | 4b61c4996ed2d06b8cdf94f88c8a0522160e10b5 | [
"Apache-2.0"
] | null | null | null | test/scenic/primitive/circle_test.exs | mikeover/scenic | 4b61c4996ed2d06b8cdf94f88c8a0522160e10b5 | [
"Apache-2.0"
] | null | null | null | test/scenic/primitive/circle_test.exs | mikeover/scenic | 4b61c4996ed2d06b8cdf94f88c8a0522160e10b5 | [
"Apache-2.0"
] | null | null | null | #
# Created by Boyd Multerer on June 29, 2018
# Copyright © 2018 Kry10 Industries. All rights reserved.
#
defmodule Scenic.Primitive.CircleTest do
use ExUnit.Case, async: true
doctest Scenic
alias Scenic.Primitive
alias Scenic.Primitive.Circle
@data 100
# ==============================================... | 28.05 | 80 | 0.507427 |
b2f3f6d207b4bb8a85d762394335767754704859 | 1,876 | ex | Elixir | test/support/types.ex | elbow-jason/zigler | 3de4d6fe4def265b689bd21d3e0abad551bd2d50 | [
"MIT"
] | null | null | null | test/support/types.ex | elbow-jason/zigler | 3de4d6fe4def265b689bd21d3e0abad551bd2d50 | [
"MIT"
] | null | null | null | test/support/types.ex | elbow-jason/zigler | 3de4d6fe4def265b689bd21d3e0abad551bd2d50 | [
"MIT"
] | null | null | null | defmodule ZiglerTest.Types do
@moduledoc false
use Zigler, dry_run: true
@spec dummy_integer(integer) :: integer
def dummy_integer(a), do: a
~Z"""
/// nif: void_out/0
fn void_out() void {}
/////////////////////////////////////////////////////////////////////////////
// SCALARS
/// nif: u32_in_... | 24.051282 | 79 | 0.507463 |
b2f3fa5c5a200eaca1d072164386004a723e37b3 | 908 | ex | Elixir | clients/smart_device_management/lib/google_api/smart_device_management/v1/metadata.ex | MShaffar19/elixir-google-api | aac92cd85f423e6d08c9571ee97cf21545df163f | [
"Apache-2.0"
] | null | null | null | clients/smart_device_management/lib/google_api/smart_device_management/v1/metadata.ex | MShaffar19/elixir-google-api | aac92cd85f423e6d08c9571ee97cf21545df163f | [
"Apache-2.0"
] | null | null | null | clients/smart_device_management/lib/google_api/smart_device_management/v1/metadata.ex | MShaffar19/elixir-google-api | aac92cd85f423e6d08c9571ee97cf21545df163f | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 33.62963 | 74 | 0.765419 |
b2f409558da1f4951443a296f554f2670488f107 | 1,625 | ex | Elixir | web/controllers/person_controller.ex | GoberInfinity/ExamplePhoenix | 4f2e016000a55dd4dbc28409dd214f0923e38e32 | [
"MIT"
] | null | null | null | web/controllers/person_controller.ex | GoberInfinity/ExamplePhoenix | 4f2e016000a55dd4dbc28409dd214f0923e38e32 | [
"MIT"
] | null | null | null | web/controllers/person_controller.ex | GoberInfinity/ExamplePhoenix | 4f2e016000a55dd4dbc28409dd214f0923e38e32 | [
"MIT"
] | null | null | null | defmodule Otherpool.PersonController do
use Otherpool.Web, :controller
alias Otherpool.Person
def index(conn, _params) do
persons = Repo.all(Person)
render(conn, "index.json", persons: persons)
end
def create(conn, %{"person" => person_params}) do
changeset = Person.changeset(%Person{}, person_... | 28.508772 | 78 | 0.630154 |
b2f41c53ab83c4708a14695a3bb01f8d086d2ef8 | 1,003 | exs | Elixir | mix.exs | frathon/fex | 37970df2afd55463960cf5aea6629e9c5fd06750 | [
"MIT"
] | 2 | 2021-09-14T19:31:43.000Z | 2021-09-20T10:46:33.000Z | mix.exs | frathon/fex | 37970df2afd55463960cf5aea6629e9c5fd06750 | [
"MIT"
] | null | null | null | mix.exs | frathon/fex | 37970df2afd55463960cf5aea6629e9c5fd06750 | [
"MIT"
] | null | null | null | defmodule Fex.MixProject do
use Mix.Project
def project do
[
app: :fex,
version: "0.2.0",
elixir: "~> 1.12",
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
description: description(),
package: package(),
deps: deps(),
name: "fEx",
... | 21.804348 | 65 | 0.57328 |
b2f44695be537baf885e8654be107b56c33e7440 | 850 | ex | Elixir | questions/date/00080000-endtimes.ex | morenoh149/pgexercises | ae5b46d84d5e4cdb6af49047960d7abd76e80f30 | [
"BSD-2-Clause"
] | null | null | null | questions/date/00080000-endtimes.ex | morenoh149/pgexercises | ae5b46d84d5e4cdb6af49047960d7abd76e80f30 | [
"BSD-2-Clause"
] | null | null | null | questions/date/00080000-endtimes.ex | morenoh149/pgexercises | ae5b46d84d5e4cdb6af49047960d7abd76e80f30 | [
"BSD-2-Clause"
] | 1 | 2019-10-08T04:46:40.000Z | 2019-10-08T04:46:40.000Z | |QUESTIONNAME|
Work out the end time of bookings
|QUESTION|
Return a list of the start and end time of the last 10 bookings (by the time at which they end) in the system.
|QUERY|
select starttime, starttime + slots*(interval '30 minutes') endtime
from cd.bookings
order by endtime desc
limit 10
|ANSWER|
<p>This quest... | 44.736842 | 206 | 0.756471 |
b2f4744323b3afe4606d9218875d679bf5ae695c | 9,183 | ex | Elixir | lib/expug/tokenizer_tools.ex | rstacruz/expug | 683eb34abd9465f42d42cbe359fa9ae848f9ec3d | [
"MIT"
] | 89 | 2016-06-27T07:06:23.000Z | 2022-03-15T18:21:50.000Z | lib/expug/tokenizer_tools.ex | rstacruz/exslim | 683eb34abd9465f42d42cbe359fa9ae848f9ec3d | [
"MIT"
] | 11 | 2016-07-28T17:12:39.000Z | 2021-01-22T02:54:58.000Z | lib/expug/tokenizer_tools.ex | rstacruz/exslim | 683eb34abd9465f42d42cbe359fa9ae848f9ec3d | [
"MIT"
] | 4 | 2016-07-26T15:50:35.000Z | 2019-09-16T22:49:21.000Z | defmodule Expug.TokenizerTools do
@moduledoc """
Builds tokenizers.
defmodule MyTokenizer do
import Expug.TokenizerTools
def tokenizer(source)
run(source, [], &document/1)
end
def document(state)
state
|> discard(%r/^doctype /, :doctype_prelude)... | 25.867606 | 90 | 0.580965 |
b2f479ce5cf6b97e9f7ce0d95b03bfe35036c2b4 | 617 | ex | Elixir | lib/chat_api_web/views/message_view.ex | ezhao/papercups | c65333e479b4959c4c59bb7b66ab8cc2c5a8e268 | [
"MIT"
] | null | null | null | lib/chat_api_web/views/message_view.ex | ezhao/papercups | c65333e479b4959c4c59bb7b66ab8cc2c5a8e268 | [
"MIT"
] | null | null | null | lib/chat_api_web/views/message_view.ex | ezhao/papercups | c65333e479b4959c4c59bb7b66ab8cc2c5a8e268 | [
"MIT"
] | null | null | null | defmodule ChatApiWeb.MessageView do
use ChatApiWeb, :view
alias ChatApiWeb.MessageView
def render("index.json", %{messages: messages}) do
%{data: render_many(messages, MessageView, "message.json")}
end
def render("show.json", %{message: message}) do
%{data: render_one(message, MessageView, "message.... | 25.708333 | 63 | 0.682334 |
b2f49a95eedf11873ddef55e5230a6b1270e7e43 | 892 | exs | Elixir | test/black_magic21/deck_test.exs | Kernael/Blackmagic21 | 011d0d51bbc5baf6fb7a9bdba0b7a55215e7a9fd | [
"MIT"
] | null | null | null | test/black_magic21/deck_test.exs | Kernael/Blackmagic21 | 011d0d51bbc5baf6fb7a9bdba0b7a55215e7a9fd | [
"MIT"
] | null | null | null | test/black_magic21/deck_test.exs | Kernael/Blackmagic21 | 011d0d51bbc5baf6fb7a9bdba0b7a55215e7a9fd | [
"MIT"
] | null | null | null | defmodule BlackMagic21.DeckTest do
use ExUnit.Case, async: true
alias BlackMagic21.Deck
alias BlackMagic21.Deck.Card
test "new deck contains 52 cards" do
assert Deck.new() |> length() == 52
end
test "deck contains 13 cards of each suit" do
assert Deck.new()
|> Enum.group_by(&(&1.suit))
|>... | 24.108108 | 91 | 0.630045 |
b2f4b6c6a2b0430f086890bb3344477ef71fa58c | 346 | ex | Elixir | lib/application.ex | pfitz/shiftplaner | 6c53314a24a974e2beba831d729b0c27e20f9463 | [
"MIT"
] | null | null | null | lib/application.ex | pfitz/shiftplaner | 6c53314a24a974e2beba831d729b0c27e20f9463 | [
"MIT"
] | null | null | null | lib/application.ex | pfitz/shiftplaner | 6c53314a24a974e2beba831d729b0c27e20f9463 | [
"MIT"
] | null | null | null | defmodule Shiftplaner.Application do
@moduledoc false
use Application
def start(_type, _args) do
import Supervisor.Spec, warn: false
children = [
supervisor(Shiftplaner.Repo, [])
]
opts = [
strategy: :one_for_one,
name: Shiftplaner.Supervisor
]
Supervisor.start_link(... | 16.47619 | 41 | 0.66185 |
b2f4b84273627305cf89d6477ab1480a90441653 | 1,567 | ex | Elixir | test/support/model_case.ex | Frylock13/PhoenixChat | 05f9a14df49a981ce1c9ebf41740577ccb2aae81 | [
"MIT"
] | 1 | 2016-02-24T01:45:57.000Z | 2016-02-24T01:45:57.000Z | test/support/model_case.ex | Frylock13/PhoenixChat | 05f9a14df49a981ce1c9ebf41740577ccb2aae81 | [
"MIT"
] | null | null | null | test/support/model_case.ex | Frylock13/PhoenixChat | 05f9a14df49a981ce1c9ebf41740577ccb2aae81 | [
"MIT"
] | 1 | 2016-02-24T01:47:02.000Z | 2016-02-24T01:47:02.000Z | defmodule ChatDemo.ModelCase do
@moduledoc """
This module defines the test case to be used by
model tests.
You may define functions here to be used as helpers in
your model tests. See `errors_on/2`'s definition as reference.
Finally, if the test case interacts with the database,
it cannot be async. For... | 26.116667 | 84 | 0.687301 |
b2f4d3387455711edc9207f45e7ae3225d7971bf | 2,514 | ex | Elixir | clients/sheets/lib/google_api/sheets/v4/model/update_dimension_properties_request.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/sheets/lib/google_api/sheets/v4/model/update_dimension_properties_request.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/sheets/lib/google_api/sheets/v4/model/update_dimension_properties_request.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... | 44.892857 | 256 | 0.742641 |
b2f4d4d5b5ec5da39c86a931ef8511fe52c184fb | 968 | exs | Elixir | apps/odo/test/unit/odo/init_test.exs | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | 18 | 2020-11-13T15:38:24.000Z | 2021-05-26T00:40:08.000Z | apps/odo/test/unit/odo/init_test.exs | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | 365 | 2020-09-21T12:31:40.000Z | 2021-09-25T14:54:21.000Z | apps/odo/test/unit/odo/init_test.exs | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | 3 | 2020-10-06T16:17:49.000Z | 2021-09-03T17:11:41.000Z | defmodule Odo.InitTest do
import SmartCity.TestHelper
use ExUnit.Case
use Placebo
alias Odo.FileProcessor
alias SmartCity.HostedFile
@instance_name Odo.instance_name()
test "loads all queued files and passes them for conversion" do
file_1 = %HostedFile{
bucket: "bucket1",
key: "key1.shap... | 24.2 | 77 | 0.661157 |
b2f4d88042c122144d4bf283df6dde94c6754ad9 | 4,923 | ex | Elixir | lib/ecto/exceptions.ex | photomattmills/ecto | ad3a455aa3d5e4f932a5bb8ae1590b21d95cce54 | [
"Apache-2.0"
] | null | null | null | lib/ecto/exceptions.ex | photomattmills/ecto | ad3a455aa3d5e4f932a5bb8ae1590b21d95cce54 | [
"Apache-2.0"
] | null | null | null | lib/ecto/exceptions.ex | photomattmills/ecto | ad3a455aa3d5e4f932a5bb8ae1590b21d95cce54 | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.Query.CompileError do
@moduledoc """
Raised at compilation time when the query cannot be compiled.
"""
defexception [:message]
end
defmodule Ecto.QueryError do
@moduledoc """
Raised at runtime when the query is invalid.
"""
defexception [:message]
def exception(opts) do
message = ... | 24.251232 | 83 | 0.67012 |
b2f51f5179fc097f7f21e9d65bbd4b16adf77237 | 679 | exs | Elixir | test/apps/sharding/config/config.exs | fossabot/yacto | 07ed65ebe2ab030dcc0abe468600d6b06e8696e9 | [
"Apache-2.0"
] | null | null | null | test/apps/sharding/config/config.exs | fossabot/yacto | 07ed65ebe2ab030dcc0abe468600d6b06e8696e9 | [
"Apache-2.0"
] | 1 | 2019-03-06T20:05:53.000Z | 2019-03-06T20:05:54.000Z | test/apps/sharding/config/config.exs | fossabot/yacto | 07ed65ebe2ab030dcc0abe468600d6b06e8696e9 | [
"Apache-2.0"
] | 1 | 2019-03-06T20:03:49.000Z | 2019-03-06T20:03:49.000Z | use Mix.Config
config :sharding, Sharding.Repo.Default,
database: "sharding_default",
username: "root",
password: "",
hostname: "localhost",
port: "3306"
mods =
for n <- 0..1 do
mod = Module.concat(Sharding.Repo, "Player#{n}")
config :sharding, mod,
database: "sharding_repo_player#{n}",
... | 22.633333 | 90 | 0.648012 |
b2f54ad7e42700b7c7e3b74c971d0d2c5cdb0481 | 626 | exs | Elixir | mix.exs | RubenMere/Identicon | 28f33deea4dff0bec845f46d2f7ffcbfd93ad404 | [
"Unlicense"
] | null | null | null | mix.exs | RubenMere/Identicon | 28f33deea4dff0bec845f46d2f7ffcbfd93ad404 | [
"Unlicense"
] | null | null | null | mix.exs | RubenMere/Identicon | 28f33deea4dff0bec845f46d2f7ffcbfd93ad404 | [
"Unlicense"
] | null | null | null | defmodule Identicon.MixProject do
use Mix.Project
def project do
[
app: :identicon,
version: "0.1.0",
elixir: "~> 1.11",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extr... | 20.866667 | 87 | 0.576677 |
b2f54dafc7533a90c42f4d1ef7659fe38c483af5 | 1,890 | ex | Elixir | lib/policr_mini_bot/plugs/handle_user_joined_group_plug.ex | WOCyo/policr-mini | 23e5e9f927d083cba5993f39e9f122e3a0ad1be2 | [
"MIT"
] | 487 | 2020-06-08T03:04:21.000Z | 2022-03-31T14:51:36.000Z | lib/policr_mini_bot/plugs/handle_user_joined_group_plug.ex | WOCyo/policr-mini | 23e5e9f927d083cba5993f39e9f122e3a0ad1be2 | [
"MIT"
] | 141 | 2020-06-11T01:03:29.000Z | 2022-03-30T20:23:32.000Z | lib/policr_mini_bot/plugs/handle_user_joined_group_plug.ex | WOCyo/policr-mini | 23e5e9f927d083cba5993f39e9f122e3a0ad1be2 | [
"MIT"
] | 61 | 2020-06-10T05:25:03.000Z | 2022-03-23T15:54:26.000Z | defmodule PolicrMiniBot.HandleUserJoinedGroupPlug do
@moduledoc """
用户加入群组的处理器。
"""
# TODO: 弃用此模块。由于 TG 上游的变动,加群已放弃对 `message` 的处理。因此 `telegex_plug` 库的预制的抽象模块已无法适应此需求,需改进库设计。
# !注意! 此模块功能依赖对 `chat_member` 更新的接收。
use PolicrMiniBot, plug: :preheater
alias PolicrMiniBot.HandleUserJoinedCleanupPlug
alia... | 24.545455 | 92 | 0.666138 |
b2f550fc0ccc3933c29ed1bea9aa5417d6c0de4f | 1,700 | ex | Elixir | clients/cloud_search/lib/google_api/cloud_search/v1/model/list_item_names_for_unmapped_identity_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/cloud_search/lib/google_api/cloud_search/v1/model/list_item_names_for_unmapped_identity_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/cloud_search/lib/google_api/cloud_search/v1/model/list_item_names_for_unmapped_identity_response.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... | 32.075472 | 131 | 0.734118 |
b2f55681d59f2453cd67d1ce6978b2788a359459 | 13,017 | exs | Elixir | test/phoenix_live_view/integrations/flash_test.exs | ucwaldo/phoenix_live_view | aa192420dc3b3b4158bbc7582ce39cb149221170 | [
"MIT"
] | 2 | 2021-05-15T05:20:19.000Z | 2021-05-20T17:55:04.000Z | test/phoenix_live_view/integrations/flash_test.exs | ucwaldo/phoenix_live_view | aa192420dc3b3b4158bbc7582ce39cb149221170 | [
"MIT"
] | 1 | 2021-05-12T12:14:27.000Z | 2021-05-12T12:14:27.000Z | test/phoenix_live_view/integrations/flash_test.exs | ucwaldo/phoenix_live_view | aa192420dc3b3b4158bbc7582ce39cb149221170 | [
"MIT"
] | 1 | 2021-01-14T12:58:22.000Z | 2021-01-14T12:58:22.000Z | defmodule Phoenix.LiveView.FlashIntegrationTest do
use ExUnit.Case, async: true
import Phoenix.ConnTest
import Phoenix.LiveViewTest
alias Phoenix.LiveView
alias Phoenix.LiveViewTest.{Endpoint, Router}
@endpoint Endpoint
setup do
conn =
Phoenix.ConnTest.build_conn(:get, "http://www.example.com... | 34.436508 | 131 | 0.579396 |
b2f58ca1eb406de6149f4014776831c6e2437c67 | 4,206 | ex | Elixir | lib/esi/api/dogma.ex | johnschultz/esi | 6bc69c39e21baa8655523e71755a65516b68e60c | [
"MIT"
] | null | null | null | lib/esi/api/dogma.ex | johnschultz/esi | 6bc69c39e21baa8655523e71755a65516b68e60c | [
"MIT"
] | null | null | null | lib/esi/api/dogma.ex | johnschultz/esi | 6bc69c39e21baa8655523e71755a65516b68e60c | [
"MIT"
] | null | null | null | defmodule ESI.API.Dogma do
@doc """
Get information on a dogma attribute.
## Response Example
Information about a dogma attribute:
%{
"attribute_id" => 20,
"default_value" => 1,
"description" => "Factor by which topspeed increases.",
"display_name" => "Maximum Velocity B... | 24.887574 | 101 | 0.62292 |
b2f590f843b41c3c8d029168554f74c9527bc6de | 27,365 | ex | Elixir | lib/cms/v3/meta/article_type/entity.ex | noizu-labs/KitchenSinkAdvanced | 6d91b5dd4f59cd9838f87a64605a0ef87f4301c8 | [
"MIT"
] | null | null | null | lib/cms/v3/meta/article_type/entity.ex | noizu-labs/KitchenSinkAdvanced | 6d91b5dd4f59cd9838f87a64605a0ef87f4301c8 | [
"MIT"
] | null | null | null | lib/cms/v3/meta/article_type/entity.ex | noizu-labs/KitchenSinkAdvanced | 6d91b5dd4f59cd9838f87a64605a0ef87f4301c8 | [
"MIT"
] | null | null | null | defmodule Noizu.V3.CMS.Meta.ArticleType.Entity do
defmodule Default do
@revision_format ~r/^(.*)-(.*)@([0-9a-zA-Z][0-9a-zA-Z\.]*)-([0-9a-zA-Z]+)$/
@version_format ~r/^(.*)-(.*)@([0-9a-zA-Z][0-9a-zA-Z\.]*)$/
@article_format ~r/^(.*)-(.*)$/
def __cms_info__(_m, _ref, _context, _options), do: []
de... | 44.137097 | 163 | 0.590828 |
b2f598c175138621b903133b1be35622575d3fdb | 482 | exs | Elixir | spec/spec_helper.exs | MeneDev/espec | ec4b3d579c5192999e930224a8a2650bb1fdf0bc | [
"Apache-2.0"
] | null | null | null | spec/spec_helper.exs | MeneDev/espec | ec4b3d579c5192999e930224a8a2650bb1fdf0bc | [
"Apache-2.0"
] | null | null | null | spec/spec_helper.exs | MeneDev/espec | ec4b3d579c5192999e930224a8a2650bb1fdf0bc | [
"Apache-2.0"
] | null | null | null | ESpec.configure(fn config ->
config.before(fn _tags ->
{:ok, %{answer: 42, order_spec_answer: 42}}
end)
config.finally(fn shared -> shared.answer end)
end)
path = Path.expand("../tmp/beams", __DIR__)
File.rm_rf!(path)
File.mkdir_p!(path)
Code.prepend_path(path)
defmodule ESpec.TestHelpers do
def write_b... | 21.909091 | 73 | 0.678423 |
b2f5b01ff0b3c5371567689dd95639a0e8aa0779 | 1,803 | ex | Elixir | data/web/web/web.ex | lydiadwyer/trains_elixir | 16da18d4582307f4967b6cce7320e9aa08a849c3 | [
"Apache-2.0"
] | null | null | null | data/web/web/web.ex | lydiadwyer/trains_elixir | 16da18d4582307f4967b6cce7320e9aa08a849c3 | [
"Apache-2.0"
] | null | null | null | data/web/web/web.ex | lydiadwyer/trains_elixir | 16da18d4582307f4967b6cce7320e9aa08a849c3 | [
"Apache-2.0"
] | null | null | null | defmodule TrainsElixir.Web do
@moduledoc """
A module that keeps using definitions for controllers,
views and so on.
This can be used in your application as:
use TrainsElixir.Web, :controller
use TrainsElixir.Web, :view
The definitions below will be executed for every view,
controller, etc, s... | 20.258427 | 88 | 0.658902 |
b2f5c9384681c7869ffab55e014cf1409e921857 | 71 | ex | Elixir | lib/daily_mnmlist_web/views/_page_view.ex | groma84/daily-mnmlist-elixir | 81e7184c42c34025b50cf074f29b162c39b19673 | [
"Unlicense"
] | null | null | null | lib/daily_mnmlist_web/views/_page_view.ex | groma84/daily-mnmlist-elixir | 81e7184c42c34025b50cf074f29b162c39b19673 | [
"Unlicense"
] | null | null | null | lib/daily_mnmlist_web/views/_page_view.ex | groma84/daily-mnmlist-elixir | 81e7184c42c34025b50cf074f29b162c39b19673 | [
"Unlicense"
] | null | null | null | defmodule DailyMnmlistWeb.PageView do
use DailyMnmlistWeb, :view
end
| 17.75 | 37 | 0.830986 |
b2f5eda231b9ae54e8133f3c8430427317b1dbf2 | 645 | exs | Elixir | test/test_helper.exs | milangupta1/ueberauth_auth0 | fdea45af71232b8fa975ba3344fc4eb0a024a297 | [
"MIT"
] | 46 | 2016-06-30T11:21:45.000Z | 2020-07-22T03:25:43.000Z | test/test_helper.exs | milangupta1/ueberauth_auth0 | fdea45af71232b8fa975ba3344fc4eb0a024a297 | [
"MIT"
] | 113 | 2016-08-21T22:09:10.000Z | 2020-07-23T20:41:43.000Z | test/test_helper.exs | milangupta1/ueberauth_auth0 | fdea45af71232b8fa975ba3344fc4eb0a024a297 | [
"MIT"
] | 39 | 2016-08-22T20:41:57.000Z | 2020-07-22T06:02:25.000Z | defmodule SpecRouter do
# Credit goes to:
# https://github.com/he9qi/ueberauth_weibo/blob/master/test/test_helper.exs
# and
# https://github.com/ueberauth/ueberauth_vk/blob/master/test/test_helper.exs
require Ueberauth
use Plug.Router
@session_options [
store: :cookie,
key: "_my_key",
signin... | 20.806452 | 78 | 0.700775 |
b2f6326a2ae23691c8086e7749f9ed1d08f74063 | 1,686 | ex | Elixir | lib/mix/tasks/phx.routes.ex | raspo/phoenix | 438b74255e7a4d68b4eaf1a295d0fcd201c71421 | [
"MIT"
] | null | null | null | lib/mix/tasks/phx.routes.ex | raspo/phoenix | 438b74255e7a4d68b4eaf1a295d0fcd201c71421 | [
"MIT"
] | null | null | null | lib/mix/tasks/phx.routes.ex | raspo/phoenix | 438b74255e7a4d68b4eaf1a295d0fcd201c71421 | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.Phx.Routes do
use Mix.Task
alias Phoenix.Router.ConsoleFormatter
@shortdoc "Prints all routes"
@moduledoc """
Prints all routes for the default or a given router.
$ mix phx.routes
$ mix phx.routes MyApp.AnotherRouter
The default router is inflected from the application
... | 28.1 | 96 | 0.693357 |
b2f641b05590ee39c06acb4676f1e4cd9eeb904d | 1,057 | ex | Elixir | test/support/test_http_client.ex | kennyballou/ex_prometheus_io | da2a3bf02ee083ba1caef3673ebef0e708b9b9ee | [
"Apache-2.0"
] | 2 | 2016-03-16T12:47:48.000Z | 2016-03-16T19:16:04.000Z | test/support/test_http_client.ex | kennyballou/ex_prometheus_io | da2a3bf02ee083ba1caef3673ebef0e708b9b9ee | [
"Apache-2.0"
] | null | null | null | test/support/test_http_client.ex | kennyballou/ex_prometheus_io | da2a3bf02ee083ba1caef3673ebef0e708b9b9ee | [
"Apache-2.0"
] | null | null | null | defmodule ExPrometheusIo.Test.HTTPClient do
@query_fixture File.read!("test/fixtures/prometheus_query.json")
@range_fixture File.read!("test/fixtures/prometheus_range.json")
@series_fixture File.read!("test/fixtures/prometheus_series.json")
@empty_response """
{"status": "error", "errorType": "bad_data", "er... | 34.096774 | 68 | 0.597919 |
b2f6546929d1688431ae29ad3071162e1cbac7d8 | 844 | ex | Elixir | lib/serum/build/file_loader/pages.ex | nallwhy/Serum | ed9f51a83e328789ccfca18d2a0397b45ac4be0f | [
"MIT"
] | null | null | null | lib/serum/build/file_loader/pages.ex | nallwhy/Serum | ed9f51a83e328789ccfca18d2a0397b45ac4be0f | [
"MIT"
] | null | null | null | lib/serum/build/file_loader/pages.ex | nallwhy/Serum | ed9f51a83e328789ccfca18d2a0397b45ac4be0f | [
"MIT"
] | null | null | null | defmodule Serum.Build.FileLoader.Pages do
@moduledoc false
_moduledocp = "A module for loading pages from a project."
require Serum.Result, as: Result
import Serum.Build.FileLoader.Common
import Serum.IOProxy, only: [put_msg: 2]
alias Serum.Plugin.Client, as: PluginClient
@doc false
@spec load(binary... | 26.375 | 70 | 0.632701 |
b2f693725ccffeb0072c1da8dfeceaa6289f8d51 | 359 | exs | Elixir | test/hexpm/web/controllers/test_controller_test.exs | findmypast/hexfmp | 38a50f5e1057833fd98748faac230bf4b9cc26a3 | [
"Apache-2.0"
] | null | null | null | test/hexpm/web/controllers/test_controller_test.exs | findmypast/hexfmp | 38a50f5e1057833fd98748faac230bf4b9cc26a3 | [
"Apache-2.0"
] | null | null | null | test/hexpm/web/controllers/test_controller_test.exs | findmypast/hexfmp | 38a50f5e1057833fd98748faac230bf4b9cc26a3 | [
"Apache-2.0"
] | null | null | null | defmodule Hexpm.Web.TestControllerTest do
use Hexpm.ConnCase, async: true
alias Hexpm.Repository.RegistryBuilder
setup do
insert(:package, releases: [build(:release)])
:ok
end
test "fetch registry" do
RegistryBuilder.partial_build(:v1)
conn = get(build_conn(), "repo/registry.ets.gz")
as... | 21.117647 | 52 | 0.710306 |
b2f6d1894d0792c85d9df21568cdf1f8ad863619 | 78 | ex | Elixir | lib/my_app_7191136/repo.ex | wsmoak/my_app_7191136 | f8812eec5214c77dee07a1ea78b07cf3ad9e80bd | [
"MIT"
] | 2 | 2015-08-04T02:04:56.000Z | 2016-06-18T00:43:10.000Z | lib/my_app_7191136/repo.ex | wsmoak/my_app_7191136 | f8812eec5214c77dee07a1ea78b07cf3ad9e80bd | [
"MIT"
] | null | null | null | lib/my_app_7191136/repo.ex | wsmoak/my_app_7191136 | f8812eec5214c77dee07a1ea78b07cf3ad9e80bd | [
"MIT"
] | null | null | null | defmodule MyApp_7191136.Repo do
use Ecto.Repo, otp_app: :my_app_7191136
end
| 19.5 | 41 | 0.807692 |
b2f6e488970b3c330e0a81b496516cbe6f58f78c | 63 | ex | Elixir | projects/standup/lib/standup_web/views/author_view.ex | erik/sketches | 0a454ada58dee6db576e93cb2216dd750290329e | [
"MIT"
] | 1 | 2020-02-11T06:00:11.000Z | 2020-02-11T06:00:11.000Z | projects/standup/lib/standup_web/views/author_view.ex | erik/sketches | 0a454ada58dee6db576e93cb2216dd750290329e | [
"MIT"
] | 1 | 2017-09-23T19:41:29.000Z | 2017-09-25T05:12:38.000Z | projects/standup/lib/standup_web/views/author_view.ex | erik/sketches | 0a454ada58dee6db576e93cb2216dd750290329e | [
"MIT"
] | null | null | null | defmodule StandupWeb.AuthorView do
use StandupWeb, :view
end
| 15.75 | 34 | 0.809524 |
b2f727fffd6e217443a6912dfefb1967c7d1397d | 1,302 | ex | Elixir | lib/datasets/datasets.ex | amplifiedai/ex_polars | cfc59c575a60257726be4fc25baa9019ec3eb4b2 | [
"MIT"
] | 9 | 2021-01-13T15:19:13.000Z | 2021-12-11T14:37:31.000Z | lib/datasets/datasets.ex | amplifiedai/ex_polars | cfc59c575a60257726be4fc25baa9019ec3eb4b2 | [
"MIT"
] | null | null | null | lib/datasets/datasets.ex | amplifiedai/ex_polars | cfc59c575a60257726be4fc25baa9019ec3eb4b2 | [
"MIT"
] | 1 | 2021-05-26T00:40:46.000Z | 2021-05-26T00:40:46.000Z | defmodule ExPolars.Datasets do
@moduledoc """
Vega datasets, copied from altair: https://github.com/altair-viz/vega_datasets
"""
alias ExPolars.DataFrame, as: DF
path = Application.app_dir(:ex_polars, ["priv"])
datasets =
path
|> Path.join("local_datasets.json")
|> File.read!()
|> Jason.d... | 23.672727 | 80 | 0.530722 |
b2f734180c789e381c5172057b95683a90d513c7 | 2,083 | ex | Elixir | web/controllers/auth_controller.ex | lyncms/lyn | ef825e7ff8df049a41f9a10685324079ebe116f9 | [
"MIT"
] | 96 | 2016-02-26T20:20:33.000Z | 2020-10-02T16:21:00.000Z | web/controllers/auth_controller.ex | lyncms/lyn | ef825e7ff8df049a41f9a10685324079ebe116f9 | [
"MIT"
] | 12 | 2016-02-27T16:23:55.000Z | 2017-07-04T13:46:00.000Z | web/controllers/auth_controller.ex | lyncms/lyn | ef825e7ff8df049a41f9a10685324079ebe116f9 | [
"MIT"
] | 24 | 2016-03-10T23:55:33.000Z | 2019-06-07T18:32:34.000Z | defmodule Lyn.AuthController do
@moduledoc """
Handles the Überauth integration.
This controller implements the request and callback phases for all providers.
The actual creation and lookup of users/authorizations is handled by UserFromAuth
"""
use Lyn.Web, :controller
alias Lyn.UserFromAuth
plug Uebe... | 34.147541 | 106 | 0.664426 |
b2f743c711c4623dd0087767ef46bdf216629f26 | 878 | ex | Elixir | lib/honeydew/sources/ecto/state.ex | facto/honeydew | d73e75d4a73ba5363cc84416a673233c156c812d | [
"MIT"
] | null | null | null | lib/honeydew/sources/ecto/state.ex | facto/honeydew | d73e75d4a73ba5363cc84416a673233c156c812d | [
"MIT"
] | null | null | null | lib/honeydew/sources/ecto/state.ex | facto/honeydew | d73e75d4a73ba5363cc84416a673233c156c812d | [
"MIT"
] | null | null | null | defmodule Honeydew.EctoSource.State do
@moduledoc false
defstruct [
:schema,
:repo,
:sql,
:table,
:key_field,
:lock_field,
:private_field,
:task_fn,
:queue,
:stale_timeout,
:reset_stale_interval,
:run_if
]
@type stale_timeout :: pos_integer
@type t :: %__MODU... | 25.823529 | 61 | 0.464692 |
b2f759c6fc4850d5abf7a05a6763a4ca8cf07f10 | 42,678 | ex | Elixir | lib/elixir/lib/gen_server.ex | schabou/elixir | 7634f3f4c9380bdadd0e74eb76e9f7ae8cf27a1d | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/gen_server.ex | schabou/elixir | 7634f3f4c9380bdadd0e74eb76e9f7ae8cf27a1d | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/gen_server.ex | schabou/elixir | 7634f3f4c9380bdadd0e74eb76e9f7ae8cf27a1d | [
"Apache-2.0"
] | null | null | null | defmodule GenServer do
@moduledoc """
A behaviour module for implementing the server of a client-server relation.
A GenServer is a process like any other Elixir process and it can be used
to keep state, execute code asynchronously and so on. The advantage of using
a generic server process (GenServer) impleme... | 36.633476 | 129 | 0.664488 |
b2f768190acbd07999fcbac96cf02f651b84e1a8 | 1,595 | ex | Elixir | lib/ble_live_sample_web/endpoint.ex | khamada611/ble_live_sample | 058fa90048e5ef474f9185d370e7e3202e649041 | [
"Apache-2.0"
] | 4 | 2019-04-06T15:36:48.000Z | 2019-10-20T05:55:10.000Z | lib/ble_live_sample_web/endpoint.ex | khamada611/ble_live_sample | 058fa90048e5ef474f9185d370e7e3202e649041 | [
"Apache-2.0"
] | null | null | null | lib/ble_live_sample_web/endpoint.ex | khamada611/ble_live_sample | 058fa90048e5ef474f9185d370e7e3202e649041 | [
"Apache-2.0"
] | 1 | 2021-05-04T10:59:57.000Z | 2021-05-04T10:59:57.000Z | defmodule BleLiveSampleWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :ble_live_sample
# The session will be stored in the cookie and signed,
# this means its contents can be read but not tampered with.
# Set :encryption_salt if you would also like to encrypt it.
@session_options [
store: :cookie,
ke... | 29.537037 | 97 | 0.724138 |
b2f7b95e161478e53cebda9f02be5410ed8d5cd8 | 2,247 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/target_instances_scoped_list_warning.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/target_instances_scoped_list_warning.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/target_instances_scoped_list_warning.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 ... | 41.611111 | 194 | 0.732532 |
b2f807dea34a4652f98c9ef0c72c3b51f17da4f2 | 5,807 | exs | Elixir | lib/iex/test/iex/ansi_docs_test.exs | MSch/elixir | fc42dc9bb76ec1fdcfcbdbfb11fea6a845a62fca | [
"Apache-2.0"
] | null | null | null | lib/iex/test/iex/ansi_docs_test.exs | MSch/elixir | fc42dc9bb76ec1fdcfcbdbfb11fea6a845a62fca | [
"Apache-2.0"
] | null | null | null | lib/iex/test/iex/ansi_docs_test.exs | MSch/elixir | fc42dc9bb76ec1fdcfcbdbfb11fea6a845a62fca | [
"Apache-2.0"
] | null | null | null | Code.require_file "../test_helper.exs", __DIR__
defmodule IEx.AnsiDocsTest do
use IEx.Case
@colors [ enabled: true,
doc_code: "cyan,bright",
doc_inline_code: "cyan",
doc_bold: "bright",
doc_underline: "underline",
doc_headings: "yellow,bright",
... | 29.328283 | 89 | 0.619253 |
b2f8083eef0ddc377cc69e6873cf2bdd94c998ef | 793 | exs | Elixir | config/ci.exs | coderplanets/coderplanets_server | 3663e56340d6d050e974c91f7e499d8424fc25e9 | [
"Apache-2.0"
] | 240 | 2018-11-06T09:36:54.000Z | 2022-02-20T07:12:36.000Z | config/ci.exs | coderplanets/coderplanets_server | 3663e56340d6d050e974c91f7e499d8424fc25e9 | [
"Apache-2.0"
] | 363 | 2018-07-11T03:38:14.000Z | 2021-12-14T01:42:40.000Z | config/ci.exs | mydearxym/mastani_server | f24034a4a5449200165cf4a547964a0961793eab | [
"Apache-2.0"
] | 22 | 2019-01-27T11:47:56.000Z | 2021-02-28T13:17:52.000Z | use Mix.Config
config :groupher_server, GroupherServerWeb.Endpoint,
http: [port: 4001],
debug_errors: true,
code_reloader: true,
check_origin: false,
watchers: []
config :logger, :console, format: "[$level] $message\n"
config :groupher_server, Helper.Guardian,
issuer: "groupher_server",
secret_key: "kS... | 26.433333 | 80 | 0.773014 |
b2f811edb647e19944613324547ca6c0fd7de2bd | 37 | ex | Elixir | debian/debuild-command.ex | debiancn/bicyclerepair | dd054e802d6d8ad80baeccee0396da68144f2a26 | [
"ICU"
] | 2 | 2020-05-29T06:31:53.000Z | 2020-12-19T21:49:25.000Z | debian/debuild-command.ex | debiancn/bicyclerepair | dd054e802d6d8ad80baeccee0396da68144f2a26 | [
"ICU"
] | null | null | null | debian/debuild-command.ex | debiancn/bicyclerepair | dd054e802d6d8ad80baeccee0396da68144f2a26 | [
"ICU"
] | null | null | null | debuild -i"\{arch\}|.arch-ids|,,.*"
| 18.5 | 36 | 0.513514 |
b2f8ba18d1b033c1bdbda2b49b5cc38f915d00e2 | 1,848 | ex | Elixir | lib/mastani_server_web/context.ex | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | 1 | 2019-05-07T15:03:54.000Z | 2019-05-07T15:03:54.000Z | lib/mastani_server_web/context.ex | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | null | null | null | lib/mastani_server_web/context.ex | DavidAlphaFox/coderplanets_server | 3fd47bf3bba6cc04c9a34698201a60ad2f3e8254 | [
"Apache-2.0"
] | null | null | null | # a plug for router ...
defmodule MastaniServerWeb.Context do
@behaviour Plug
import Plug.Conn
# import Ecto.Query, only: [first: 1]
alias MastaniServer.{Accounts, CMS}
alias Helper.{Guardian, ORM, RemoteIP}
def init(opts), do: opts
def call(conn, _) do
context = build_context(conn)
# put_pri... | 28.430769 | 92 | 0.63474 |
b2f8e25d8d954370147b9a9bda0aca0dec735f08 | 1,083 | ex | Elixir | lib/space_mongers/models/model.ex | ericgroom/space_mongers | e9f979318dca2e8ee4f685014bae585db15cd117 | [
"MIT"
] | 2 | 2021-03-18T02:00:29.000Z | 2021-04-18T06:11:07.000Z | lib/space_mongers/models/model.ex | ericgroom/space_mongers | e9f979318dca2e8ee4f685014bae585db15cd117 | [
"MIT"
] | null | null | null | lib/space_mongers/models/model.ex | ericgroom/space_mongers | e9f979318dca2e8ee4f685014bae585db15cd117 | [
"MIT"
] | null | null | null | defmodule SpaceMongers.Model do
@moduledoc false
@callback camelcase_keys() :: [String.t()]
@callback ignore_keys() :: [String.t()]
@optional_callbacks ignore_keys: 0
defmacro __using__([{_, _} | _] = fieldspecs) do
fields = Keyword.keys(fieldspecs)
quote do
alias SpaceMongers.Models
de... | 24.613636 | 81 | 0.645429 |
b2f8f80d3a8d1b2925ad20f883495946a8deb036 | 820 | ex | Elixir | lib/event_bus_handler/bootstrap.ex | Elonsoft/event_bus_handler | e78dd876ed899c3c4ea0d8ef414f2b4c78dfb27e | [
"MIT"
] | 1 | 2020-07-27T15:50:52.000Z | 2020-07-27T15:50:52.000Z | lib/event_bus_handler/bootstrap.ex | Elonsoft/event_bus_handler | e78dd876ed899c3c4ea0d8ef414f2b4c78dfb27e | [
"MIT"
] | null | null | null | lib/event_bus_handler/bootstrap.ex | Elonsoft/event_bus_handler | e78dd876ed899c3c4ea0d8ef414f2b4c78dfb27e | [
"MIT"
] | null | null | null | defmodule EventBusHandler.Bootstrap do
# Manages subscriber bootstraping.
@moduledoc false
def start_link(module) when is_atom(module) do
Supervisor.start_link(module, nil, name: module)
end
def init(module) when is_atom(module) do
children = Enum.flat_map(module.handlers(), &module_to_child_specs/1... | 27.333333 | 73 | 0.714634 |
b2f9158a4961f8f8673032950f95d37acbc58d5b | 16 | exs | Elixir | test/test_helper.exs | postmates/ex-stats-tracker | a0b9c07106928894339a6767dd3161749a1d7291 | [
"BSD-3-Clause"
] | null | null | null | test/test_helper.exs | postmates/ex-stats-tracker | a0b9c07106928894339a6767dd3161749a1d7291 | [
"BSD-3-Clause"
] | 1 | 2019-03-06T01:13:07.000Z | 2019-03-06T01:13:07.000Z | test/test_helper.exs | postmates/ex-stats-tracker | a0b9c07106928894339a6767dd3161749a1d7291 | [
"BSD-3-Clause"
] | 3 | 2017-07-22T02:42:19.000Z | 2022-02-23T22:15:35.000Z | ExUnit.start()
| 8 | 15 | 0.6875 |
b2f92e520396efefc5ab642e1947787887c43851 | 6,795 | ex | Elixir | clients/content/lib/google_api/content/v21/model/segments.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/v21/model/segments.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/v21/model/segments.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... | 61.772727 | 396 | 0.691979 |
b2f934bac0ca3a067ea917c381556e52f4626250 | 86 | exs | Elixir | test/exgen/command/new_test.exs | chulkilee/exgen | 66c20a1cd52079affab95ac621179f995073ab7a | [
"MIT"
] | 36 | 2016-09-21T17:56:02.000Z | 2021-07-16T21:49:36.000Z | test/exgen/command/new_test.exs | chulkilee/exgen | 66c20a1cd52079affab95ac621179f995073ab7a | [
"MIT"
] | 4 | 2017-03-06T17:59:20.000Z | 2020-01-21T06:41:53.000Z | test/exgen/command/new_test.exs | chulkilee/exgen | 66c20a1cd52079affab95ac621179f995073ab7a | [
"MIT"
] | 6 | 2017-03-06T14:59:08.000Z | 2021-09-30T15:02:17.000Z | defmodule Exgen.Command.NewTest do
# TODO: Pull out non-mix specific tests here
end
| 21.5 | 46 | 0.77907 |
b2f943af1353e58878cb9e8fb09c0aea31d9cceb | 559 | ex | Elixir | farmbot_os/lib/farmbot_os/init/supervisor.ex | SeppPenner/farmbot_os | 39ba5c5880f8aef71792e2c009514bed1177089c | [
"MIT"
] | 1 | 2019-08-06T11:51:48.000Z | 2019-08-06T11:51:48.000Z | farmbot_os/lib/farmbot_os/init/supervisor.ex | SeppPenner/farmbot_os | 39ba5c5880f8aef71792e2c009514bed1177089c | [
"MIT"
] | null | null | null | farmbot_os/lib/farmbot_os/init/supervisor.ex | SeppPenner/farmbot_os | 39ba5c5880f8aef71792e2c009514bed1177089c | [
"MIT"
] | null | null | null | defmodule FarmbotOS.Init.Supervisor do
@moduledoc """
All the stuff that needs to start before
FarmBotOS gets supervised by this one.
Handles boot logic for FBOS (on host vs. RPi).
"""
use Supervisor
def start_link(args) do
Supervisor.start_link(__MODULE__, args, name: __MODULE__)
end
def init... | 20.703704 | 61 | 0.663685 |
b2f9a9817e2cd7a84304a7739c179422c82c524b | 585 | ex | Elixir | apps/buzzcms/lib/buzzcms/schema/entry_decimal_value.ex | buzzcms/buzzcms | 8ca8e6dea381350f94cc4a666448b5dba6676520 | [
"Apache-2.0"
] | null | null | null | apps/buzzcms/lib/buzzcms/schema/entry_decimal_value.ex | buzzcms/buzzcms | 8ca8e6dea381350f94cc4a666448b5dba6676520 | [
"Apache-2.0"
] | 41 | 2020-02-12T07:53:14.000Z | 2020-03-30T02:18:14.000Z | apps/buzzcms/lib/buzzcms/schema/entry_decimal_value.ex | buzzcms/buzzcms | 8ca8e6dea381350f94cc4a666448b5dba6676520 | [
"Apache-2.0"
] | null | null | null | defmodule Buzzcms.Schema.EntryDecimalValue do
use Ecto.Schema
import Ecto.Changeset
@required_fields [:entry_id, :field_id, :value]
@optional_fields []
@primary_key false
schema "entry_decimal_value" do
belongs_to :entry, Buzzcms.Schema.Entry
belongs_to :field, Buzzcms.Schema.Field
field :valu... | 25.434783 | 57 | 0.723077 |
b2f9a98740a19f03b36d26a6f22feebc98b98140 | 4,295 | ex | Elixir | lib/tea_vent/example.ex | Qqwy/elixir-tea_vent | a257a78be310260630d9639d1209a35639f901a9 | [
"MIT"
] | 16 | 2018-12-17T13:16:43.000Z | 2020-05-08T02:18:59.000Z | lib/tea_vent/example.ex | Qqwy/elixir-tea_vent | a257a78be310260630d9639d1209a35639f901a9 | [
"MIT"
] | 53 | 2019-04-16T06:53:44.000Z | 2022-03-23T20:04:26.000Z | lib/tea_vent/example.ex | Qqwy/elixir-tea_vent | a257a78be310260630d9639d1209a35639f901a9 | [
"MIT"
] | null | null | null | defmodule TeaVent.Example do
@moduledoc """
An example of how to use TeaVent:
iex> state = %{users: %{1 => User.new("Jose")}, events: []}
iex> state = TeaVent.Example.dispatch([:users], :create, %{name: "Michal"}, state)
iex> state = TeaVent.Example.dispatch([:users], :create, %{name: "W-M"}, st... | 27.183544 | 100 | 0.492899 |
b2f9a9935a711332cbb26dc37a72fec273e6f7b3 | 2,628 | ex | Elixir | clients/gke_hub/lib/google_api/gke_hub/v1/model/config_management_membership_spec.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/gke_hub/lib/google_api/gke_hub/v1/model/config_management_membership_spec.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/gke_hub/lib/google_api/gke_hub/v1/model/config_management_membership_spec.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... | 42.387097 | 181 | 0.748097 |
b2f9ec79e44d24e6afd7d2389ac41dad13583a6c | 2,244 | ex | Elixir | lib/changelog_web/endpoint.ex | d-m-u/changelog.com | bb0d6ac6d29a3d64dbeb44892f9a8a1ff3ba6325 | [
"MIT"
] | null | null | null | lib/changelog_web/endpoint.ex | d-m-u/changelog.com | bb0d6ac6d29a3d64dbeb44892f9a8a1ff3ba6325 | [
"MIT"
] | null | null | null | lib/changelog_web/endpoint.ex | d-m-u/changelog.com | bb0d6ac6d29a3d64dbeb44892f9a8a1ff3ba6325 | [
"MIT"
] | null | null | null | defmodule ChangelogWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :changelog
socket "/socket", ChangelogWeb.UserSocket,
# or list of options
websocket: true
plug(ChangelogWeb.Plug.HealthCheck)
plug Plug.Static,
at: "/uploads",
from: {:changelog, "priv/uploads"},
gzip: false,
headers: ... | 27.703704 | 83 | 0.683601 |
b2f9ef009c89ea1ddfa4e2cb28302c6684bb8255 | 398 | exs | Elixir | test/pummpcomm/history/change_alarm_clock_enable_test.exs | infinity-aps/pummpcomm | 7380585ecd110ab1c19d2aea3880e51e3f433050 | [
"MIT"
] | 15 | 2017-08-31T00:58:47.000Z | 2020-01-12T03:53:13.000Z | test/pummpcomm/history/change_alarm_clock_enable_test.exs | vladhj38/pummpcomm | 7380585ecd110ab1c19d2aea3880e51e3f433050 | [
"MIT"
] | 1 | 2017-09-15T02:09:31.000Z | 2017-09-15T02:09:31.000Z | test/pummpcomm/history/change_alarm_clock_enable_test.exs | vladhj38/pummpcomm | 7380585ecd110ab1c19d2aea3880e51e3f433050 | [
"MIT"
] | 3 | 2017-09-10T17:24:59.000Z | 2019-09-10T19:41:49.000Z | defmodule Pummpcomm.History.ChangeAlarmClockEnableTest do
use ExUnit.Case
test "Change Alarm Clock Enable" do
{:ok, history_page} = Base.decode16("61000040008108")
decoded_events = Pummpcomm.History.decode_records(history_page, %{})
assert {:change_alarm_clock_enable, %{timestamp: ~N[2008-01-01 00:00:... | 33.166667 | 100 | 0.721106 |
b2f9f919db8e527befaddd33e44fb3b7b9821605 | 1,029 | exs | Elixir | bench/decode.exs | suexcxine/jaxon | fb638f76945236822e8e015ee4b4d79b8255b71e | [
"Apache-2.0"
] | null | null | null | bench/decode.exs | suexcxine/jaxon | fb638f76945236822e8e015ee4b4d79b8255b71e | [
"Apache-2.0"
] | null | null | null | bench/decode.exs | suexcxine/jaxon | fb638f76945236822e8e015ee4b4d79b8255b71e | [
"Apache-2.0"
] | 1 | 2020-01-29T01:50:12.000Z | 2020-01-29T01:50:12.000Z | decode_jobs = %{
"Jaxon" => fn json -> Jaxon.decode!(json) end,
"jiffy" => fn json -> :jiffy.decode(json, [:return_maps, :use_nil]) end,
"Jason" => fn json -> Jason.decode!(json) end,
"Poison" => fn json -> Poison.decode!(json) end
}
decode_inputs = [
"GitHub",
"Giphy",
"GovTrack",
"Blockchain",
"Pok... | 20.58 | 75 | 0.595724 |
b2fa0718630116ab93494d13735968c68ddd818f | 2,373 | ex | Elixir | clients/admin/lib/google_api/admin/datatransfer_v1/model/application.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/admin/lib/google_api/admin/datatransfer_v1/model/application.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/admin/lib/google_api/admin/datatransfer_v1/model/application.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 37.078125 | 291 | 0.709229 |
b2fa1193be9644b3c1706ef46b8dfb4c43201877 | 2,610 | ex | Elixir | elx_otp/lib/crawler.ex | bhatti/concurency-katas | e235a71d042cf1093544cc7b878a68f27e653747 | [
"MIT"
] | null | null | null | elx_otp/lib/crawler.ex | bhatti/concurency-katas | e235a71d042cf1093544cc7b878a68f27e653747 | [
"MIT"
] | null | null | null | elx_otp/lib/crawler.ex | bhatti/concurency-katas | e235a71d042cf1093544cc7b878a68f27e653747 | [
"MIT"
] | null | null | null | ##--------------------------------------------------------------------------
# fake web crawler using thread pool
##--------------------------------------------------------------------------
defmodule Crawler do
@max_depth 4
@moduledoc """
Documentation for Crawler.
"""
## Client API
# {:ok, pid} = Crawl... | 29 | 91 | 0.631418 |
b2fa233ae88c69c6b41d830a7cc2e6910f4bf9ef | 3,795 | ex | Elixir | clients/health_care/lib/google_api/health_care/v1/model/hl7_v2_store.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/health_care/lib/google_api/health_care/v1/model/hl7_v2_store.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/health_care/lib/google_api/health_care/v1/model/hl7_v2_store.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 58.384615 | 682 | 0.741502 |
b2fa390d7fbb2b35a51ff61baf916744f7ba571f | 2,594 | exs | Elixir | test/integration/draining_test.exs | polvalente/oban | 7267f8f37f8257b735d498d81cc1e43147cefc49 | [
"Apache-2.0"
] | null | null | null | test/integration/draining_test.exs | polvalente/oban | 7267f8f37f8257b735d498d81cc1e43147cefc49 | [
"Apache-2.0"
] | null | null | null | test/integration/draining_test.exs | polvalente/oban | 7267f8f37f8257b735d498d81cc1e43147cefc49 | [
"Apache-2.0"
] | null | null | null | defmodule Oban.Integration.DrainingTest do
use Oban.Case
@moduletag :integration
test "all jobs in a queue can be drained and executed synchronously" do
name = start_supervised_oban!(queues: false)
insert!(ref: 1, action: "OK")
insert!(ref: 2, action: "FAIL")
insert!(ref: 3, action: "OK")
i... | 28.505495 | 88 | 0.643408 |
b2fa6ea72fe7ea654ef8e3535e270c1b2d8b67b0 | 731 | exs | Elixir | test/lib/couch_normalizer/scenario_test.exs | Zatvobor/couch_normalizer | 1bbde7b7235220c7e2aed9924e3781f423175afd | [
"Apache-2.0"
] | 1 | 2015-02-23T14:25:10.000Z | 2015-02-23T14:25:10.000Z | test/lib/couch_normalizer/scenario_test.exs | Zatvobor/couch_normalizer | 1bbde7b7235220c7e2aed9924e3781f423175afd | [
"Apache-2.0"
] | 2 | 2015-03-05T17:02:38.000Z | 2015-03-30T10:33:29.000Z | test/lib/couch_normalizer/scenario_test.exs | Zatvobor/couch_normalizer | 1bbde7b7235220c7e2aed9924e3781f423175afd | [
"Apache-2.0"
] | null | null | null | Code.require_file "../../../test_helper.exs", __FILE__
defmodule CouchNormalizer.ScenarioTest do
use ExUnit.Case, async: true
test "calls scenario functions which return nil" do
scenario_fun = fn(_db_name, _id, _rev, _body) -> nil end
what_we_should_do = CouchNormalizer.Scenario.call(scenario_fun, {"db",... | 36.55 | 109 | 0.679891 |
b2fa7f5465a2d53ab8112602e940799ad8060144 | 469 | ex | Elixir | lib/ggity/element.ex | srowley/ggity | e49f40141ea7b56e07cf9e00a20c04ed4d42df2f | [
"MIT"
] | 47 | 2020-06-21T15:23:54.000Z | 2022-03-13T01:24:19.000Z | lib/ggity/element.ex | srowley/ggity | e49f40141ea7b56e07cf9e00a20c04ed4d42df2f | [
"MIT"
] | 3 | 2020-11-28T11:00:59.000Z | 2020-11-30T18:20:37.000Z | lib/ggity/element.ex | srowley/ggity | e49f40141ea7b56e07cf9e00a20c04ed4d42df2f | [
"MIT"
] | 2 | 2020-11-28T10:40:10.000Z | 2021-05-28T06:44:47.000Z | defprotocol GGity.Element do
@moduledoc false
@spec to_css(GGity.Element.t(), binary()) :: iolist()
def to_css(element, class)
end
defimpl GGity.Element, for: Atom do
def to_css(nil, _class), do: []
end
defimpl GGity.Element, for: Integer do
def to_css(_element, _class), do: []
end
defimpl GGity.Element, ... | 22.333333 | 76 | 0.680171 |
b2fa93c817a35ea548ef69fe800cec077108a771 | 1,657 | exs | Elixir | test/bitcoin_address/elixir_test.exs | paulfioravanti/bitcoin_address | ee6581fa122c203eca9889cd1ed1b85292feb114 | [
"MIT"
] | 1 | 2021-05-16T23:22:50.000Z | 2021-05-16T23:22:50.000Z | test/bitcoin_address/elixir_test.exs | paulfioravanti/bitcoin_address | ee6581fa122c203eca9889cd1ed1b85292feb114 | [
"MIT"
] | null | null | null | test/bitcoin_address/elixir_test.exs | paulfioravanti/bitcoin_address | ee6581fa122c203eca9889cd1ed1b85292feb114 | [
"MIT"
] | 2 | 2019-02-10T14:52:21.000Z | 2021-05-16T23:23:55.000Z | defmodule BitcoinAddressElixirTest do
use ExUnit.Case, async: true
import ExUnit.CaptureIO
alias BitcoinAddress.Secp256k1
doctest BitcoinAddress.Elixir
@output_format ~r"""
\A\
Private key:\s"[0-9a-z]{64}"
Public key:\s"[0-9a-z]{66}"
Bitcoin address:\s"[1-9A-HJ-NP-Za-km-z]{26,35}"
\z\
"""
# htt... | 31.264151 | 70 | 0.687387 |
b2fa9eb7b4898eac79644251fec920b264f8c973 | 2,646 | ex | Elixir | lib/access.ex | facundokantox/vela | 5c7163af4188611ffa4703a3d6346156a914e438 | [
"MIT"
] | 9 | 2020-05-16T07:29:28.000Z | 2021-02-14T23:12:31.000Z | lib/access.ex | facundokantox/vela | 5c7163af4188611ffa4703a3d6346156a914e438 | [
"MIT"
] | 2 | 2020-07-12T09:40:04.000Z | 2021-01-29T06:28:33.000Z | lib/access.ex | facundokantox/vela | 5c7163af4188611ffa4703a3d6346156a914e438 | [
"MIT"
] | 1 | 2020-11-27T09:21:45.000Z | 2020-11-27T09:21:45.000Z | defmodule Vela.Access do
@moduledoc false
defmacro __using__(opts) do
quote bind_quoted: [opts: opts] do
@history_limit Application.get_env(:vela, :history_limit, 5)
@error_limit Application.get_env(:vela, :error_limit, 5)
@behaviour Elixir.Access
Enum.each(Keyword.keys(opts), fn key ... | 32.268293 | 98 | 0.507559 |
b2fab3d8e4f2417371fcb3995461e8e06332dd04 | 1,549 | ex | Elixir | webapp/lib/penmark_web/views/error_helpers.ex | zmaril/penmark | 992f570da3bdf819f912505ba9b6531db9dcb80b | [
"FSFAP"
] | null | null | null | webapp/lib/penmark_web/views/error_helpers.ex | zmaril/penmark | 992f570da3bdf819f912505ba9b6531db9dcb80b | [
"FSFAP"
] | null | null | null | webapp/lib/penmark_web/views/error_helpers.ex | zmaril/penmark | 992f570da3bdf819f912505ba9b6531db9dcb80b | [
"FSFAP"
] | null | null | null | defmodule PenmarkWeb.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.270833 | 76 | 0.665591 |
b2fac22bd4587983c2202264abb6c7c4c46b3d13 | 607 | exs | Elixir | rel/config.exs | smaximov/branch_cutter | eb750db1fcc9715ab7bbecadd2ccd3368b41dc81 | [
"MIT"
] | null | null | null | rel/config.exs | smaximov/branch_cutter | eb750db1fcc9715ab7bbecadd2ccd3368b41dc81 | [
"MIT"
] | null | null | null | rel/config.exs | smaximov/branch_cutter | eb750db1fcc9715ab7bbecadd2ccd3368b41dc81 | [
"MIT"
] | null | null | null | Path.join(["rel", "plugins", "*.exs"])
|> Path.wildcard()
|> Enum.map(&Code.eval_file(&1))
use Mix.Releases.Config,
default_release: :default,
default_environment: Mix.env()
environment :dev do
set dev_mode: true
set include_erts: false
set cookie: :"<BI$p:d2K<ugC1zdK2=EW@h!bxdopnv31~*qZfL@ENFZZIYgE!]q]UzMO... | 23.346154 | 81 | 0.719934 |
b2facc327fd1adc7b301ff983e32e09a7c43aa8f | 135 | exs | Elixir | skippy/fw/test/skippy_test.exs | mashbytes/baby_zoo | 4554890242a2493d17d9b1c1f4cc90d7ad1e637e | [
"MIT"
] | null | null | null | skippy/fw/test/skippy_test.exs | mashbytes/baby_zoo | 4554890242a2493d17d9b1c1f4cc90d7ad1e637e | [
"MIT"
] | 5 | 2020-07-17T23:35:42.000Z | 2021-05-10T07:00:10.000Z | skippy/fw/test/skippy_test.exs | mashbytes/baby_zoo | 4554890242a2493d17d9b1c1f4cc90d7ad1e637e | [
"MIT"
] | null | null | null | defmodule SkippyTest do
use ExUnit.Case
doctest Skippy
test "greets the world" do
assert Skippy.hello() == :world
end
end
| 15 | 35 | 0.703704 |
b2fad7050881e99c19585a6bc91e68212ad65144 | 200 | ex | Elixir | lib/boids.ex | aishraj/boids | 1e58b356be78e58f67c4deb6a2092a0442fe8512 | [
"MIT"
] | null | null | null | lib/boids.ex | aishraj/boids | 1e58b356be78e58f67c4deb6a2092a0442fe8512 | [
"MIT"
] | null | null | null | lib/boids.ex | aishraj/boids | 1e58b356be78e58f67c4deb6a2092a0442fe8512 | [
"MIT"
] | null | null | null | defmodule Boids do
use Application
def start(_type, _args) do
children = [Boids.SimpleSupervisor, Boids.BoidsSupervisor]
Supervisor.start_link(children, strategy: :one_for_one)
end
end
| 22.222222 | 62 | 0.76 |
b2fae40c08f1c6cb7f9285fe133d0a50ba6ce1a8 | 356 | exs | Elixir | elixir/121.exs | merxer/kata | 5dbbca8b4173029f9311398148de9437a329cf9a | [
"MIT"
] | null | null | null | elixir/121.exs | merxer/kata | 5dbbca8b4173029f9311398148de9437a329cf9a | [
"MIT"
] | null | null | null | elixir/121.exs | merxer/kata | 5dbbca8b4173029f9311398148de9437a329cf9a | [
"MIT"
] | null | null | null | authors = [
%{name: "Jose", language: "Elixir"},
%{name: "Matz", language: "Ruby"},
%{name: "Larry", language: "Perl"},
]
languages_with_an_r = fn(:get, collection, next_fn)->
for row <- collection do
if String.contains?(row.language, "r") do
next_fn.(row)
end
end
end
IO.inspect get_in(aut... | 20.941176 | 56 | 0.626404 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.