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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
93c708e1b6da8b079923f42f0c57cf658cc9c79d | 1,395 | ex | Elixir | lib/teiserver/account/reports/time_spent_report.ex | adelq/teiserver | 77140896df6b4e1ec9e680d64c31ffb528158d14 | [
"MIT"
] | null | null | null | lib/teiserver/account/reports/time_spent_report.ex | adelq/teiserver | 77140896df6b4e1ec9e680d64c31ffb528158d14 | [
"MIT"
] | null | null | null | lib/teiserver/account/reports/time_spent_report.ex | adelq/teiserver | 77140896df6b4e1ec9e680d64c31ffb528158d14 | [
"MIT"
] | null | null | null | defmodule Teiserver.Account.TimeSpentReport do
alias Central.Helpers.DatePresets
alias Teiserver.Account
@spec icon() :: String.t()
def icon(), do: "far fa-satellite-dish"
@spec run(Plug.Conn.t(), map()) :: {list(), map()}
def run(_conn, params) do
params = apply_defaults(params)
# Date range
... | 24.910714 | 67 | 0.582796 |
93c7112a6f5615e94b902255b646c6b23a91bf3a | 1,228 | exs | Elixir | config/dev.exs | avinoth/spaces | 00bec5adf4568fef73b49e57808033295a837931 | [
"MIT"
] | 1 | 2016-09-13T10:40:53.000Z | 2016-09-13T10:40:53.000Z | config/dev.exs | avinoth/spaces | 00bec5adf4568fef73b49e57808033295a837931 | [
"MIT"
] | null | null | null | config/dev.exs | avinoth/spaces | 00bec5adf4568fef73b49e57808033295a837931 | [
"MIT"
] | null | null | null | use Mix.Config
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with brunch.io to recompile .js and .css sources.
config :spaces, Spaces.Endpoint,
http: [port: 4000],
... | 29.238095 | 74 | 0.707655 |
93c71aa83b4c8c38aea25b27bd177b356e9852eb | 2,285 | ex | Elixir | clients/content/lib/google_api/content/v2/model/orders_return_line_item_request.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/orders_return_line_item_request.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/orders_return_line_item_request.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | 1 | 2020-11-10T16:58:27.000Z | 2020-11-10T16:58:27.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 36.269841 | 173 | 0.717724 |
93c73282bcc15ff3401b50f5926b736f5d2e8fcf | 3,528 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/autoscaling_policy_scaling_schedule.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/autoscaling_policy_scaling_schedule.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/autoscaling_policy_scaling_schedule.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 56.903226 | 566 | 0.736678 |
93c733aa27541d3a498aa0921d6537afbd41a2fd | 467 | exs | Elixir | priv/repo/migrations/20151007071706_create_rss_feed.exs | yasuhiro-okada-aktsk/sample_elixir_ecto_select | 6a927e5d7f591b247920934216f226ccb0c53e6e | [
"MIT"
] | null | null | null | priv/repo/migrations/20151007071706_create_rss_feed.exs | yasuhiro-okada-aktsk/sample_elixir_ecto_select | 6a927e5d7f591b247920934216f226ccb0c53e6e | [
"MIT"
] | null | null | null | priv/repo/migrations/20151007071706_create_rss_feed.exs | yasuhiro-okada-aktsk/sample_elixir_ecto_select | 6a927e5d7f591b247920934216f226ccb0c53e6e | [
"MIT"
] | null | null | null | defmodule SampleElixirEctoSelect.Repo.Migrations.CreateRssFeed do
use Ecto.Migration
def change do
create table(:rss_feeds) do
add :feed_url, :string
add :feed_id, :string
add :title, :string
add :subtitle, :string
add :summary, :text
add :link, :string
add :author, :s... | 21.227273 | 65 | 0.64454 |
93c742f21750152d4433c8fe22042f5eff996b25 | 3,302 | ex | Elixir | lib/glimesh/api/resolvers/account_resolver.ex | coredreamstudios/glimesh.tv | 736f4f03aa51a7fbcaaf276ffee2af470afc2fa7 | [
"MIT"
] | null | null | null | lib/glimesh/api/resolvers/account_resolver.ex | coredreamstudios/glimesh.tv | 736f4f03aa51a7fbcaaf276ffee2af470afc2fa7 | [
"MIT"
] | null | null | null | lib/glimesh/api/resolvers/account_resolver.ex | coredreamstudios/glimesh.tv | 736f4f03aa51a7fbcaaf276ffee2af470afc2fa7 | [
"MIT"
] | null | null | null | defmodule Glimesh.Api.AccountResolver do
@moduledoc false
import Ecto.Query
alias Absinthe.Relay.Connection
alias Glimesh.AccountFollows
alias Glimesh.Accounts
alias Glimesh.Api
@error_not_found "Could not find resource"
# Query Field Resolvers
def resolve_email(user, _, %{context: %{access: access... | 25.015152 | 86 | 0.661114 |
93c758785d1485f403542799d19e325f6e9289e1 | 297 | ex | Elixir | lib/ketbin/utils/syntax.ex | ATechnoHazard/katbin | 20a0b45954cf7819cd9d51c401db06be0f47666b | [
"MIT"
] | 4 | 2020-08-05T20:05:34.000Z | 2020-10-01T10:01:56.000Z | lib/ketbin/utils/syntax.ex | ATechnoHazard/katbin | 20a0b45954cf7819cd9d51c401db06be0f47666b | [
"MIT"
] | 1 | 2020-07-08T05:02:12.000Z | 2020-09-25T10:05:11.000Z | lib/ketbin/utils/syntax.ex | ATechnoHazard/katbin | 20a0b45954cf7819cd9d51c401db06be0f47666b | [
"MIT"
] | 1 | 2020-08-30T12:59:49.000Z | 2020-08-30T12:59:49.000Z | defmodule Ketbin.Utils.Syntax do
use Rustler, otp_app: :ketbin, crate: "ketbin_utils_syntax"
# When your NIF is loaded, it will override this function.
def add(_a, _b), do: error()
def highlight_text(_text, _lang), do: error()
defp error(), do: :erlang.nif_error(:nif_not_loaded)
end
| 27 | 61 | 0.720539 |
93c76edcce1245612c25e4e94fc5de507caab4d0 | 2,421 | ex | Elixir | web/controllers/post_controller.ex | dkarter/exblog | 3bc2c52dc6b8263506d5fc5e842436f64414d9c7 | [
"MIT"
] | null | null | null | web/controllers/post_controller.ex | dkarter/exblog | 3bc2c52dc6b8263506d5fc5e842436f64414d9c7 | [
"MIT"
] | null | null | null | web/controllers/post_controller.ex | dkarter/exblog | 3bc2c52dc6b8263506d5fc5e842436f64414d9c7 | [
"MIT"
] | null | null | null | defmodule Exblog.PostController do
use Exblog.Web, :controller
alias Exblog.Post
alias Exblog.Comment
plug :scrub_params, "post" when action in [:create, :update]
plug :scrub_params, "comment" when action in [:add_comment]
def index(conn, _params) do
posts = Repo.all(Post)
render(conn, "index.htm... | 27.511364 | 90 | 0.615035 |
93c7848633ef658d0cc79b6acd4d94cf6f2bb930 | 1,605 | ex | Elixir | test/support/model_case.ex | JKGisMe/square_square_backend | 1b5237fff2c9dab0e03082ecf5a5a28a1133935b | [
"MIT"
] | null | null | null | test/support/model_case.ex | JKGisMe/square_square_backend | 1b5237fff2c9dab0e03082ecf5a5a28a1133935b | [
"MIT"
] | null | null | null | test/support/model_case.ex | JKGisMe/square_square_backend | 1b5237fff2c9dab0e03082ecf5a5a28a1133935b | [
"MIT"
] | null | null | null | defmodule SquareSquareBackend.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... | 26.75 | 81 | 0.698442 |
93c7c1228aafb3e0f08ab303ec5a162c461d6c01 | 1,188 | ex | Elixir | lib/excommerce/shipments/shipment.ex | roger120981/planet | a662006551d11427c08cf6cdbacd37d377bcd9c5 | [
"MIT"
] | 1 | 2019-04-01T19:14:16.000Z | 2019-04-01T19:14:16.000Z | lib/excommerce/shipments/shipment.ex | roger120981/planet | a662006551d11427c08cf6cdbacd37d377bcd9c5 | [
"MIT"
] | null | null | null | lib/excommerce/shipments/shipment.ex | roger120981/planet | a662006551d11427c08cf6cdbacd37d377bcd9c5 | [
"MIT"
] | 1 | 2019-03-24T01:50:48.000Z | 2019-03-24T01:50:48.000Z | defmodule Excommerce.Shipments.Shipment do
use Ecto.Schema
import Ecto.Changeset
alias Excommerce.Shipments.{Shipment, ShippingMethod, ShipmentUnit}
alias Excommerce.Adjustments.Adjustment
schema "shipments" do
belongs_to :shipping_method, ShippingMethod
belongs_to :shipment_unit, ShipmentUnit
... | 27.627907 | 108 | 0.722222 |
93c7cf0f2ee17ba852c4abbb73c708c52c44fbab | 14,620 | ex | Elixir | lib/glimesh/graphql/schema/channel_types.ex | chriscuris/glimesh.tv | e1a78aa763ea5599d045fdfa65237b94fbb28a23 | [
"MIT"
] | null | null | null | lib/glimesh/graphql/schema/channel_types.ex | chriscuris/glimesh.tv | e1a78aa763ea5599d045fdfa65237b94fbb28a23 | [
"MIT"
] | null | null | null | lib/glimesh/graphql/schema/channel_types.ex | chriscuris/glimesh.tv | e1a78aa763ea5599d045fdfa65237b94fbb28a23 | [
"MIT"
] | null | null | null | defmodule Glimesh.Schema.ChannelTypes do
@moduledoc false
use Absinthe.Schema.Notation
import Absinthe.Resolution.Helpers
import_types(Absinthe.Plug.Types)
alias Glimesh.Repo
alias Glimesh.Resolvers.ChannelResolver
alias Glimesh.Streams
input_object :stream_metadata_input do
field :ingest_server,... | 36.826196 | 97 | 0.702531 |
93c7d306bb82d8dde93280098c0a7079bb8ed478 | 1,188 | ex | Elixir | test/support/conn_case.ex | Tass-Jomo/Art-for-deriq | df88debc0accab36976516a2c1cc49a98cd1dca4 | [
"MIT"
] | null | null | null | test/support/conn_case.ex | Tass-Jomo/Art-for-deriq | df88debc0accab36976516a2c1cc49a98cd1dca4 | [
"MIT"
] | 1 | 2021-03-10T16:24:36.000Z | 2021-03-10T16:24:36.000Z | test/support/conn_case.ex | Tass-Jomo/deriq_art | 2cd1c5f0de3c11f465e4cb29c2f146836f63ea36 | [
"MIT"
] | null | null | null | defmodule DeriqArtWeb.ConnCase do
@moduledoc """
This module defines the test case to be used by
tests that require setting up a connection.
Such tests rely on `Phoenix.ConnTest` and also
import other functionality to make it easier
to build common data structures and query the data layer.
Finally, if t... | 28.97561 | 70 | 0.728114 |
93c7e775570a3984e00a0df1bafdc4e115c4b969 | 58 | exs | Elixir | others/elixir/command_line_args.exs | mkanenobu/trashbox | c691dbf9a07991fd42304020c8aac58e1e4b9644 | [
"WTFPL"
] | 2 | 2020-05-11T13:43:27.000Z | 2020-07-31T11:57:19.000Z | others/elixir/command_line_args.exs | mkanenobu/trashbox | c691dbf9a07991fd42304020c8aac58e1e4b9644 | [
"WTFPL"
] | 2 | 2020-09-27T02:35:38.000Z | 2021-03-08T08:33:02.000Z | others/elixir/command_line_args.exs | mkanenobu/trashbox | c691dbf9a07991fd42304020c8aac58e1e4b9644 | [
"WTFPL"
] | 1 | 2020-05-11T13:44:04.000Z | 2020-05-11T13:44:04.000Z | IO.puts 'Arguments:'
Enum.map(System.argv(), &IO.puts(&1)) | 29 | 37 | 0.672414 |
93c83be96406de3a0e2f7dd69a9d58d4fc643f89 | 3,017 | ex | Elixir | lib/refreshable_agent.ex | statmuse/ex_microsoftbot | 07196c75dc919a509d73fc15b1030481402bbd98 | [
"MIT"
] | null | null | null | lib/refreshable_agent.ex | statmuse/ex_microsoftbot | 07196c75dc919a509d73fc15b1030481402bbd98 | [
"MIT"
] | null | null | null | lib/refreshable_agent.ex | statmuse/ex_microsoftbot | 07196c75dc919a509d73fc15b1030481402bbd98 | [
"MIT"
] | null | null | null | defmodule ExMicrosoftBot.RefreshableAgent do
@callback get_refreshed_state(any, any) :: any
@callback time_to_refresh_after_in_seconds(any) :: integer
@doc false
defmacro __using__(_) do
quote location: :keep do
require Logger
@behaviour ExMicrosoftBot.RefreshableAgent
use GenServer
... | 29.009615 | 96 | 0.631422 |
93c84ef2f62c8aeb93848c651791ef7a773ea5e3 | 2,836 | ex | Elixir | clients/android_management/lib/google_api/android_management/v1/model/status_reporting_settings.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | null | null | null | clients/android_management/lib/google_api/android_management/v1/model/status_reporting_settings.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | null | null | null | clients/android_management/lib/google_api/android_management/v1/model/status_reporting_settings.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | 1 | 2020-11-10T16:58:27.000Z | 2020-11-10T16:58:27.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 41.101449 | 119 | 0.744006 |
93c86255a1b119042ead5a3dd10c6dd20d910fdf | 1,541 | ex | Elixir | lib/accent/scopes/translations_count.ex | isshindev/accent | ae4c13139b0a0dfd64ff536b94c940a4e2862150 | [
"BSD-3-Clause"
] | 806 | 2018-04-07T20:40:33.000Z | 2022-03-30T01:39:57.000Z | lib/accent/scopes/translations_count.ex | isshindev/accent | ae4c13139b0a0dfd64ff536b94c940a4e2862150 | [
"BSD-3-Clause"
] | 194 | 2018-04-07T13:49:37.000Z | 2022-03-30T19:58:45.000Z | lib/accent/scopes/translations_count.ex | doc-ai/accent | e337e16f3658cc0728364f952c0d9c13710ebb06 | [
"BSD-3-Clause"
] | 89 | 2018-04-09T13:55:49.000Z | 2022-03-24T07:09:31.000Z | defmodule Accent.Scopes.TranslationsCount do
import Ecto.Query
def with_stats(query, column, options \\ []) do
exclude_empty_translations = Keyword.get(options, :exclude_empty_translations, false)
translations =
from(
t in Accent.Translation,
select: %{field_id: field(t, ^column), co... | 35.022727 | 126 | 0.69111 |
93c86a76148f2a17143db51729a5b954ab166695 | 282 | exs | Elixir | wasmcloud_host/test/wasmcloud_host_web/views/layout_view_test.exs | janitha09/wasmcloud-otp | 858d7cbba00233eabf91d96cbcb0d6db80202444 | [
"Apache-2.0"
] | 84 | 2021-06-09T16:30:27.000Z | 2022-03-27T23:41:25.000Z | wasmcloud_host/test/wasmcloud_host_web/views/layout_view_test.exs | janitha09/wasmcloud-otp | 858d7cbba00233eabf91d96cbcb0d6db80202444 | [
"Apache-2.0"
] | 239 | 2021-06-07T14:00:09.000Z | 2022-03-30T17:06:05.000Z | wasmcloud_host/test/wasmcloud_host_web/views/layout_view_test.exs | janitha09/wasmcloud-otp | 858d7cbba00233eabf91d96cbcb0d6db80202444 | [
"Apache-2.0"
] | 20 | 2021-06-10T01:10:35.000Z | 2022-03-17T15:59:57.000Z | defmodule WasmcloudHostWeb.LayoutViewTest do
use WasmcloudHostWeb.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
| 31.333333 | 65 | 0.776596 |
93c87579253855c5428900d670597b6385dcecd4 | 252 | ex | Elixir | testData/org/elixir_lang/parser_definition/issue_1316/List.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 1,668 | 2015-01-03T05:54:27.000Z | 2022-03-25T08:01:20.000Z | testData/org/elixir_lang/parser_definition/issue_1316/List.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 2,018 | 2015-01-01T22:43:39.000Z | 2022-03-31T20:13:08.000Z | testData/org/elixir_lang/parser_definition/issue_1316/List.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 145 | 2015-01-15T11:37:16.000Z | 2021-12-22T05:51:02.000Z | case index do
-1 ->
list ++ [value]
_ when index < 0 ->
case length(list) + index + 1 do
index when index < 0 -> [value | list]
index -> do_insert_at(list, index, value)
end
_ ->
do_insert_at(list, index, value)
end
| 18 | 47 | 0.563492 |
93c8b3de4f2584cb43ea4bab9447f89892f3ee2a | 894 | exs | Elixir | mix.exs | mwmiller/chacha20_ex | 187b489ffc8bb6002dba58f674c135ad51cceb07 | [
"MIT"
] | 4 | 2016-02-26T16:32:41.000Z | 2020-10-08T02:36:05.000Z | mix.exs | mwmiller/chacha20_ex | 187b489ffc8bb6002dba58f674c135ad51cceb07 | [
"MIT"
] | null | null | null | mix.exs | mwmiller/chacha20_ex | 187b489ffc8bb6002dba58f674c135ad51cceb07 | [
"MIT"
] | 2 | 2017-11-05T11:25:36.000Z | 2018-01-03T22:41:16.000Z | defmodule Chacha20.Mixfile do
use Mix.Project
def project do
[
app: :chacha20,
version: "1.0.2",
elixir: "~> 1.7",
name: "Chacha20",
source_url: "https://github.com/mwmiller/chacha20_ex",
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
de... | 19.021277 | 62 | 0.538031 |
93c8e6101a04856ffce363951b75686b0a10aebc | 11,183 | ex | Elixir | clients/docs/lib/google_api/docs/v1/model/request.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/docs/lib/google_api/docs/v1/model/request.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/docs/lib/google_api/docs/v1/model/request.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... | 76.59589 | 174 | 0.745954 |
93c8f4d16f53601723654f9e75123b1d6cf968c8 | 65 | ex | Elixir | apps/console/lib/console/web/views/layout_view.ex | feb29/poly | e64e7a50d1683e1c29acf3d1b6973a3098f5850a | [
"MIT",
"Unlicense"
] | null | null | null | apps/console/lib/console/web/views/layout_view.ex | feb29/poly | e64e7a50d1683e1c29acf3d1b6973a3098f5850a | [
"MIT",
"Unlicense"
] | null | null | null | apps/console/lib/console/web/views/layout_view.ex | feb29/poly | e64e7a50d1683e1c29acf3d1b6973a3098f5850a | [
"MIT",
"Unlicense"
] | null | null | null | defmodule Console.Web.LayoutView do
use Console.Web, :view
end
| 16.25 | 35 | 0.784615 |
93c914ccc258a972199a200cccb4f6cd84ece1dc | 21,819 | ex | Elixir | lib/elixir/lib/protocol.ex | davidsulc/elixir | dd4fd6ab742acd75862e34e26dbdb86e0cf6453f | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/protocol.ex | davidsulc/elixir | dd4fd6ab742acd75862e34e26dbdb86e0cf6453f | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/protocol.ex | davidsulc/elixir | dd4fd6ab742acd75862e34e26dbdb86e0cf6453f | [
"Apache-2.0"
] | null | null | null | defmodule Protocol do
@moduledoc """
Functions for working with protocols.
"""
@doc """
Defines a new protocol function.
Protocols do not allow functions to be defined directly, instead, the
regular `Kernel.def/*` macros are replaced by this macro which
defines the protocol functions with the appropri... | 31.667634 | 135 | 0.622897 |
93c9503a1606ee968670d42654321bfa93953f09 | 1,856 | exs | Elixir | test/app/punches_test.exs | mzgajner/smena | 6c0243ae1e8d1cef6e8a8e240f0f6b703ea638c9 | [
"Unlicense"
] | null | null | null | test/app/punches_test.exs | mzgajner/smena | 6c0243ae1e8d1cef6e8a8e240f0f6b703ea638c9 | [
"Unlicense"
] | null | null | null | test/app/punches_test.exs | mzgajner/smena | 6c0243ae1e8d1cef6e8a8e240f0f6b703ea638c9 | [
"Unlicense"
] | null | null | null | defmodule Smena.PunchesTest do
use Smena.DataCase
alias Smena.Punches
describe "punches" do
alias Smena.Punches.Punch
@valid_attrs %{in: true}
@update_attrs %{in: false}
@invalid_attrs %{in: nil}
def punch_fixture(attrs \\ %{}) do
{:ok, punch} =
attrs
|> Enum.into(@va... | 28.553846 | 86 | 0.655711 |
93c953680c186e1cc9a92958d2d3b485ab8ec89e | 1,804 | exs | Elixir | test/integration/strategies/threaded_nif_test.exs | wojtekmach/zigler | b2102744bff212351abfeb4f6d87e57dd1ab232c | [
"MIT"
] | null | null | null | test/integration/strategies/threaded_nif_test.exs | wojtekmach/zigler | b2102744bff212351abfeb4f6d87e57dd1ab232c | [
"MIT"
] | null | null | null | test/integration/strategies/threaded_nif_test.exs | wojtekmach/zigler | b2102744bff212351abfeb4f6d87e57dd1ab232c | [
"MIT"
] | null | null | null | defmodule ZiglerTest.Integration.Strategies.ThreadedNifTest do
use ExUnit.Case, async: true
use Zig
@moduletag :threaded
~Z"""
/// nif: threaded_forty_seven/0 threaded
fn threaded_forty_seven() i32 {
// sleep for 2 seconds
std.time.sleep(2000000000);
return 47;
}
"""
test "threaded nifs... | 21.73494 | 64 | 0.656319 |
93c956ba2a11209a3e0b172cf3c475bcaf52dbaf | 1,260 | ex | Elixir | lib/absinthe/language/fragment.ex | maartenvanvliet/absinthe | ebe820717200f53756e225b3dffbfefe924a94d3 | [
"MIT"
] | null | null | null | lib/absinthe/language/fragment.ex | maartenvanvliet/absinthe | ebe820717200f53756e225b3dffbfefe924a94d3 | [
"MIT"
] | 2 | 2018-08-02T13:35:38.000Z | 2018-08-02T13:36:42.000Z | lib/absinthe/language/fragment.ex | jlgeering/absinthe | a3dbc29640d613928398626ad75a8f03203a1720 | [
"MIT"
] | null | null | null | defmodule Absinthe.Language.Fragment do
@moduledoc false
alias Absinthe.{Blueprint, Language}
defstruct name: nil,
type_condition: nil,
directives: [],
selection_set: nil,
loc: %{start_line: nil}
@type t :: %__MODULE__{
name: String.t(),
typ... | 26.808511 | 80 | 0.639683 |
93c96a1857f964f9f78044d8ec25d214f8b66cf0 | 6,577 | ex | Elixir | lib/zig/command.ex | skunkwerks/zigler | 9acd7b97dddecc87de7754e23e6f08d855b2c855 | [
"MIT"
] | 1 | 2021-02-26T00:00:34.000Z | 2021-02-26T00:00:34.000Z | lib/zig/command.ex | fhunleth/zigler | 037ff05087563d3255f58fb0abbaedeb12b97211 | [
"MIT"
] | null | null | null | lib/zig/command.ex | fhunleth/zigler | 037ff05087563d3255f58fb0abbaedeb12b97211 | [
"MIT"
] | null | null | null | defmodule Zig.Command do
@moduledoc """
contains all parts of the Zig library involved in calling the
zig compiler toolchain, especially with regards to the `zig` command, except
for assembling the build.zig file, which is performed by the
`Zig.Builder` module.
"""
alias Zig.{Builder, Patches}
requir... | 31.319048 | 116 | 0.646191 |
93c97f1ad15206bd88be78221047b8f45d67ec89 | 178 | ex | Elixir | lib/xqlite/driver.ex | OvermindDL1/xqlite | 987f11e4ba9134239d1fe1a2cfc55f49090a72be | [
"MIT"
] | null | null | null | lib/xqlite/driver.ex | OvermindDL1/xqlite | 987f11e4ba9134239d1fe1a2cfc55f49090a72be | [
"MIT"
] | null | null | null | lib/xqlite/driver.ex | OvermindDL1/xqlite | 987f11e4ba9134239d1fe1a2cfc55f49090a72be | [
"MIT"
] | null | null | null | defmodule Xqlite.Driver do
@callback open(Xqlite.db_name(), Xqlite.opts()) :: Xqlite.open_result()
@callback close(Xqlite.conn(), Xqlite.opts()) :: Xqlite.close_result()
end
| 35.6 | 73 | 0.724719 |
93c9af13b70bd9d07842fac642c49274f4b1caa2 | 110 | ex | Elixir | lib/rdf/guards.ex | pukkamustard/rdf-ex | c459d8e7fa548fdfad82643338b68decf380a296 | [
"MIT"
] | 19 | 2020-06-05T16:55:54.000Z | 2022-03-22T10:30:11.000Z | lib/rdf/guards.ex | pukkamustard/rdf-ex | c459d8e7fa548fdfad82643338b68decf380a296 | [
"MIT"
] | 4 | 2020-07-03T21:02:55.000Z | 2021-11-18T07:22:06.000Z | lib/rdf/guards.ex | pukkamustard/rdf-ex | c459d8e7fa548fdfad82643338b68decf380a296 | [
"MIT"
] | 3 | 2020-07-03T13:25:36.000Z | 2021-04-04T12:33:51.000Z | defmodule RDF.Guards do
import RDF.Utils.Guards
defguard maybe_ns_term(term) when maybe_module(term)
end
| 18.333333 | 54 | 0.8 |
93c9dd4e4cf1e8e45d13a6f1ef581a9f2b60f477 | 35,571 | ex | Elixir | clients/file/lib/google_api/file/v1/api/projects.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/file/lib/google_api/file/v1/api/projects.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/file/lib/google_api/file/v1/api/projects.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... | 47.051587 | 607 | 0.617722 |
93c9eb99d6b470990eca9f6109b5ce6d235343b3 | 1,790 | exs | Elixir | test/concentrate/stop_time_update_test.exs | mbta/concentrate | bae6e05713ed079b7da53867a01dd007861fb656 | [
"MIT"
] | 19 | 2018-01-22T18:39:20.000Z | 2022-02-22T16:15:30.000Z | test/concentrate/stop_time_update_test.exs | mbta/concentrate | bae6e05713ed079b7da53867a01dd007861fb656 | [
"MIT"
] | 216 | 2018-01-22T14:22:39.000Z | 2022-03-31T10:30:31.000Z | test/concentrate/stop_time_update_test.exs | mbta/concentrate | bae6e05713ed079b7da53867a01dd007861fb656 | [
"MIT"
] | 5 | 2018-01-22T14:18:15.000Z | 2021-04-26T18:34:19.000Z | defmodule Concentrate.StopTimeUpdateTest do
@moduledoc false
use ExUnit.Case
import Concentrate.StopTimeUpdate
alias Concentrate.Mergeable
@stu new(
trip_id: "trip",
stop_sequence: 1,
arrival_time: 2,
departure_time: 3,
status: "status",
platform_id: "pla... | 24.861111 | 70 | 0.578212 |
93ca3a51f3085f31b6e135610cf0d67159ec96a5 | 6,433 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/network_endpoint_group.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/network_endpoint_group.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/network_endpoint_group.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... | 64.979798 | 490 | 0.706047 |
93ca454c02cf39e70e692e75bfc37ec83f2275e7 | 497 | ex | Elixir | apps/tai/lib/tai/events/venue_boot_error.ex | chrism2671/tai-1 | 847827bd23908adfad4a82c83d5295bdbc022796 | [
"MIT"
] | null | null | null | apps/tai/lib/tai/events/venue_boot_error.ex | chrism2671/tai-1 | 847827bd23908adfad4a82c83d5295bdbc022796 | [
"MIT"
] | null | null | null | apps/tai/lib/tai/events/venue_boot_error.ex | chrism2671/tai-1 | 847827bd23908adfad4a82c83d5295bdbc022796 | [
"MIT"
] | 1 | 2020-05-03T23:32:11.000Z | 2020-05-03T23:32:11.000Z | defmodule Tai.Events.VenueBootError do
alias Tai.Events.VenueBootError
@type venue_id :: Tai.Venue.id()
@type t :: %VenueBootError{venue: venue_id, reason: term}
@enforce_keys ~w(venue reason)a
defstruct ~w(venue reason)a
end
defimpl Tai.LogEvent, for: Tai.Events.VenueBootError do
def to_data(event) do
... | 21.608696 | 59 | 0.65996 |
93ca622cf5018821888da0710946fac672ef81a4 | 84 | exs | Elixir | gcd.exs | lebm/MyElixirTests | 4221012296c913179cdda278290263bfc1141454 | [
"Apache-2.0"
] | null | null | null | gcd.exs | lebm/MyElixirTests | 4221012296c913179cdda278290263bfc1141454 | [
"Apache-2.0"
] | null | null | null | gcd.exs | lebm/MyElixirTests | 4221012296c913179cdda278290263bfc1141454 | [
"Apache-2.0"
] | null | null | null | defmodule Gcd do
def of(x, 0), do: x
def of(x, y), do: of(y, rem(x, y))
end
| 16.8 | 38 | 0.52381 |
93ca686a24152158f39fcec7df91a6a32ec648dc | 556 | ex | Elixir | lib/hl7/2.2/segments/om3.ex | calvinb/elixir-hl7 | 5e953fa11f9184857c0ec4dda8662889f35a6bec | [
"Apache-2.0"
] | null | null | null | lib/hl7/2.2/segments/om3.ex | calvinb/elixir-hl7 | 5e953fa11f9184857c0ec4dda8662889f35a6bec | [
"Apache-2.0"
] | null | null | null | lib/hl7/2.2/segments/om3.ex | calvinb/elixir-hl7 | 5e953fa11f9184857c0ec4dda8662889f35a6bec | [
"Apache-2.0"
] | null | null | null | defmodule HL7.V2_2.Segments.OM3 do
@moduledoc false
require Logger
alias HL7.V2_2.{DataTypes}
use HL7.Segment,
fields: [
segment: nil,
segment_type_id: nil,
sequence_number_test_observation_master_file: nil,
preferred_coding_system: nil,
valid_coded_answers: DataTypes.Ce,
... | 27.8 | 69 | 0.75 |
93ca8d92b96bd0cdb67e94c900c845919fe8127d | 141 | exs | Elixir | apps/services/test/services_test.exs | bitwalker/aws-dist-test | 94d87e82b617da02d541f7b2744d20747d8ef21f | [
"Apache-2.0"
] | 4 | 2019-03-13T16:38:32.000Z | 2020-01-11T20:05:25.000Z | apps/services/test/services_test.exs | bitwalker/aws-dist-test | 94d87e82b617da02d541f7b2744d20747d8ef21f | [
"Apache-2.0"
] | 1 | 2019-03-14T17:41:55.000Z | 2019-03-14T17:41:55.000Z | apps/services/test/services_test.exs | bitwalker/aws-dist-test | 94d87e82b617da02d541f7b2744d20747d8ef21f | [
"Apache-2.0"
] | 1 | 2019-03-14T14:53:29.000Z | 2019-03-14T14:53:29.000Z | defmodule ServicesTest do
use ExUnit.Case
doctest Services
test "greets the world" do
assert Services.hello() == :world
end
end
| 15.666667 | 37 | 0.716312 |
93ca9a87b585f9fc157527c2dd918e641e27c254 | 1,622 | exs | Elixir | game_of_life/test/game_of_life_test.exs | ancaciascaiu/Elixir | 1867ee6dd5dda7c57e31ea04f61ef94294b21f8b | [
"MIT"
] | null | null | null | game_of_life/test/game_of_life_test.exs | ancaciascaiu/Elixir | 1867ee6dd5dda7c57e31ea04f61ef94294b21f8b | [
"MIT"
] | null | null | null | game_of_life/test/game_of_life_test.exs | ancaciascaiu/Elixir | 1867ee6dd5dda7c57e31ea04f61ef94294b21f8b | [
"MIT"
] | null | null | null | defmodule GameOfLifeTest do
use ExUnit.Case
doctest GameOfLife
describe "any live cell" do
test "with fewer that 2 live neighbors, it dies" do
cell = %LiveCell{position: :upside_down}
neighbors = [%LiveCell{}]
assert %DeadCell{position: :upside_down} = GameOfLife.decide(cell, neighbors)
... | 31.803922 | 83 | 0.636252 |
93caaaab7e380ddca85da2cc57d0a7f6a11ec93f | 1,106 | ex | Elixir | lib/trifolium/endpoints/divisions.ex | daskycodes/trifolium | 322f01f89948c51d974e64b049ca2ce2d0f8b45f | [
"MIT"
] | 1 | 2021-04-19T15:09:35.000Z | 2021-04-19T15:09:35.000Z | lib/trifolium/endpoints/divisions.ex | daskycodes/trifolium | 322f01f89948c51d974e64b049ca2ce2d0f8b45f | [
"MIT"
] | 1 | 2021-04-19T18:08:05.000Z | 2021-04-19T18:08:05.000Z | lib/trifolium/endpoints/divisions.ex | daskycodes/trifolium | 322f01f89948c51d974e64b049ca2ce2d0f8b45f | [
"MIT"
] | 2 | 2021-04-19T15:09:39.000Z | 2021-04-28T14:05:21.000Z | defmodule Trifolium.Divisions do
@moduledoc """
Module to be used to interact with Trefle [Divisions](https://docs.trefle.io/reference/#tag/Divisions) related endpoints.
"""
alias Trifolium.Config
alias Trifolium.API
@endpoint_path "api/v1/divisions/"
@http_client Config.http_client()
@doc """
... | 25.136364 | 125 | 0.638336 |
93cadc89657f7bda81300b991af8b8d72fcce699 | 2,446 | exs | Elixir | config/prod.exs | lucasmelin/Chatter | 023595dab54bc86d94062a61628c344fa5d7f56d | [
"MIT"
] | null | null | null | config/prod.exs | lucasmelin/Chatter | 023595dab54bc86d94062a61628c344fa5d7f56d | [
"MIT"
] | 1 | 2020-07-16T23:18:36.000Z | 2020-07-16T23:18:36.000Z | config/prod.exs | lucasmelin/Chatter | 023595dab54bc86d94062a61628c344fa5d7f56d | [
"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,
# ... | 33.972222 | 69 | 0.713001 |
93caedeedd6f305c4f683edc7d48373ee37c475c | 995 | exs | Elixir | mix.exs | rossjones/nifty | bb2d863a377266f96598f164e35a38628eedb42f | [
"MIT"
] | 33 | 2015-06-11T23:54:21.000Z | 2020-06-22T16:35:43.000Z | mix.exs | rossjones/nifty | bb2d863a377266f96598f164e35a38628eedb42f | [
"MIT"
] | 7 | 2015-08-04T20:29:54.000Z | 2021-11-12T19:26:25.000Z | mix.exs | rossjones/nifty | bb2d863a377266f96598f164e35a38628eedb42f | [
"MIT"
] | 4 | 2015-08-04T20:18:55.000Z | 2019-12-09T10:57:52.000Z | defmodule Nifty.Mixfile do
use Mix.Project
def project do
[app: :nifty,
version: "0.0.3",
description: description,
elixir: "~> 1.0",
name: "Nifty",
source_url: "https://github.com/rossjones/nifty",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
pac... | 22.111111 | 67 | 0.609045 |
93cafaff19c985541b34813df13ded9691b5bfe2 | 1,885 | ex | Elixir | lib/pow/config.ex | matthewford/pow | 82c3359ec757a139fe38f4a745c3da176425f901 | [
"MIT"
] | null | null | null | lib/pow/config.ex | matthewford/pow | 82c3359ec757a139fe38f4a745c3da176425f901 | [
"MIT"
] | null | null | null | lib/pow/config.ex | matthewford/pow | 82c3359ec757a139fe38f4a745c3da176425f901 | [
"MIT"
] | 1 | 2020-07-13T01:11:17.000Z | 2020-07-13T01:11:17.000Z | defmodule Pow.Config do
@moduledoc """
Methods to parse and modify configurations.
"""
@type t :: Keyword.t()
defmodule ConfigError do
@moduledoc false
defexception [:message]
end
@doc """
Gets the key value from the configuration.
If not found, it'll fall back to environment config, and las... | 24.802632 | 79 | 0.633952 |
93cb1af4cd0d9ed53135f10d9081f115bc245c3a | 1,051 | ex | Elixir | elixir/lib/elixer/application.ex | VitorFirmino/NLW-7 | 16d3319c6bcf2308ef6ea5fdf8257be78887a190 | [
"MIT"
] | null | null | null | elixir/lib/elixer/application.ex | VitorFirmino/NLW-7 | 16d3319c6bcf2308ef6ea5fdf8257be78887a190 | [
"MIT"
] | null | null | null | elixir/lib/elixer/application.ex | VitorFirmino/NLW-7 | 16d3319c6bcf2308ef6ea5fdf8257be78887a190 | [
"MIT"
] | null | null | null | defmodule Elixer.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
@impl true
def start(_type, _args) do
children = [
# Start the Ecto repository
Elixer.Repo,
# Start the Telemetry supervisor
... | 27.657895 | 64 | 0.695528 |
93cb1e2f763dbd9bb4cd4bb7640ed91952c52a77 | 415 | ex | Elixir | lib/new_relic/distributed_trace/context.ex | tpitale/elixir_agent | f356b588fe9d7cc3b9db00d9a251e009a20b3e0e | [
"Apache-2.0"
] | 227 | 2018-09-05T15:33:23.000Z | 2022-02-25T18:12:06.000Z | lib/new_relic/distributed_trace/context.ex | tpitale/elixir_agent | f356b588fe9d7cc3b9db00d9a251e009a20b3e0e | [
"Apache-2.0"
] | 211 | 2018-09-05T21:42:41.000Z | 2022-03-25T17:51:56.000Z | lib/new_relic/distributed_trace/context.ex | tpitale/elixir_agent | f356b588fe9d7cc3b9db00d9a251e009a20b3e0e | [
"Apache-2.0"
] | 84 | 2018-09-05T04:26:26.000Z | 2022-03-09T14:28:14.000Z | defmodule NewRelic.DistributedTrace.Context do
@moduledoc false
defstruct type: "App",
source: nil,
version: nil,
account_id: nil,
app_id: nil,
parent_id: nil,
guid: nil,
span_guid: nil,
trace_id: nil,
trust... | 23.055556 | 46 | 0.489157 |
93cb354c4c5c7dd9984784bb4dd58f5a2b40a133 | 3,831 | ex | Elixir | lib/bot/handler.ex | ygunayer/potcu | d7b82ad9227161c93aedec03c4a1902c1d43780b | [
"MIT"
] | 1 | 2020-05-14T18:52:05.000Z | 2020-05-14T18:52:05.000Z | lib/bot/handler.ex | ygunayer/potcu | d7b82ad9227161c93aedec03c4a1902c1d43780b | [
"MIT"
] | null | null | null | lib/bot/handler.ex | ygunayer/potcu | d7b82ad9227161c93aedec03c4a1902c1d43780b | [
"MIT"
] | null | null | null | defmodule Potcu.Bot.Handler do
use GenServer
require Logger
alias Nostrum.Api
alias Nostrum.Cache
alias Potcu.Bot.Registry
alias Potcu.Bot.Structs.{StateData, BombStatus, VoiceStatus}
alias Potcu.Bot.Voice.Structs.SessionInfo
@help_text "potcu help text"
##################
## Initialization
###... | 27.364286 | 190 | 0.654398 |
93cb3edfa6fb06c4d82637cabbc75a571f56d5c3 | 3,850 | ex | Elixir | clients/cloud_private_catalog_producer/lib/google_api/cloud_private_catalog_producer/v1beta1/model/google_cloud_privatecatalogproducer_v1beta1_version.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/cloud_private_catalog_producer/lib/google_api/cloud_private_catalog_producer/v1beta1/model/google_cloud_privatecatalogproducer_v1beta1_version.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/cloud_private_catalog_producer/lib/google_api/cloud_private_catalog_producer/v1beta1/model/google_cloud_privatecatalogproducer_v1beta1_version.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... | 38.5 | 133 | 0.679221 |
93cb5d54d329fc9df2166506f91332432ffcc1f0 | 2,233 | exs | Elixir | test/galapagos_nao/selection_test.exs | jeffreyksmithjr/galapgos_nao | 6123d770b4019c8225d64b9a4a584b4ee0019063 | [
"MIT"
] | 21 | 2018-03-19T02:52:38.000Z | 2020-07-21T06:18:54.000Z | test/galapagos_nao/selection_test.exs | jeffreyksmithjr/galapgos_nao | 6123d770b4019c8225d64b9a4a584b4ee0019063 | [
"MIT"
] | 23 | 2018-02-21T23:34:41.000Z | 2018-04-07T15:13:56.000Z | test/galapagos_nao/selection_test.exs | jeffreyksmithjr/galapgos_nao | 6123d770b4019c8225d64b9a4a584b4ee0019063 | [
"MIT"
] | 1 | 2020-04-28T16:38:03.000Z | 2020-04-28T16:38:03.000Z | defmodule GN.SelectionTest do
use ExUnit.Case
alias GN.Selection, as: Selection
alias GN.Network, as: Network
@test_agent_name :testable_selection
setup do
{:ok, agent} = Selection.start_link(name: @test_agent_name)
{:ok, agent: agent}
end
test "sets cutoffs" do
nets = [
%Network{
... | 25.666667 | 89 | 0.576355 |
93cb5f815cce63ebb94907b5e4b38f3ed20be136 | 291 | exs | Elixir | config/test.exs | data-twister/blog-phoenix-live-view-google-maps | 13c7186219f9920962df161a093adf77f5ded69d | [
"MIT"
] | 4 | 2020-07-31T13:48:23.000Z | 2020-12-21T16:35:36.000Z | config/test.exs | data-twister/blog-phoenix-live-view-google-maps | 13c7186219f9920962df161a093adf77f5ded69d | [
"MIT"
] | 1 | 2020-08-14T15:29:28.000Z | 2021-06-10T17:40:19.000Z | config/test.exs | data-twister/blog-phoenix-live-view-google-maps | 13c7186219f9920962df161a093adf77f5ded69d | [
"MIT"
] | 2 | 2020-08-13T19:11:53.000Z | 2021-05-27T01:56:02.000Z | use Mix.Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :live_view_google_maps, LiveViewGoogleMapsWeb.Endpoint,
http: [port: 4002],
server: false
# Print only warnings and errors during test
config :logger, level: :warn
| 26.454545 | 62 | 0.75945 |
93cb64cef9c5c6ed4910d6455c72beaea4ebb9b7 | 887 | ex | Elixir | elixir/lib/homework_web/schema.ex | TreywRoberts/web-homework | d19b17dd384341d9e6e7e3174372673584289b83 | [
"MIT"
] | null | null | null | elixir/lib/homework_web/schema.ex | TreywRoberts/web-homework | d19b17dd384341d9e6e7e3174372673584289b83 | [
"MIT"
] | null | null | null | elixir/lib/homework_web/schema.ex | TreywRoberts/web-homework | d19b17dd384341d9e6e7e3174372673584289b83 | [
"MIT"
] | null | null | null | defmodule HomeworkWeb.Schema do
@moduledoc """
Defines the graphql schema for this project.
"""
use Absinthe.Schema
alias HomeworkWeb.Resolvers.MerchantsResolver
alias HomeworkWeb.Resolvers.TransactionsResolver
alias HomeworkWeb.Resolvers.UsersResolver
import_types(HomeworkWeb.Schemas.Types)
... | 25.342857 | 52 | 0.704622 |
93cb680a849bcada973a5a81633d32ae368cffbb | 66 | ex | Elixir | LPS/e3.ex | palexand/interpreters | c5ff4e644fce1e97f1823321710dd082aa79aa72 | [
"BSD-3-Clause"
] | 10 | 2015-02-05T13:24:43.000Z | 2021-12-18T18:39:05.000Z | LPS/e3.ex | palexand/interpreters | c5ff4e644fce1e97f1823321710dd082aa79aa72 | [
"BSD-3-Clause"
] | null | null | null | LPS/e3.ex | palexand/interpreters | c5ff4e644fce1e97f1823321710dd082aa79aa72 | [
"BSD-3-Clause"
] | 1 | 2020-12-09T10:16:44.000Z | 2020-12-09T10:16:44.000Z | letL
fac = \L x -> if x==0 then 1 else x * fac (x - 1)
in fac 5 | 22 | 51 | 0.515152 |
93cb93afac925ca98fc4e594f3d0f6d9006074a6 | 999 | ex | Elixir | lib/timestamp_web/live/page_live.ex | ugiete/Timestamp-Converter | 04e0eca0918f7c87047bb0cb7849cf853d747f37 | [
"MIT"
] | null | null | null | lib/timestamp_web/live/page_live.ex | ugiete/Timestamp-Converter | 04e0eca0918f7c87047bb0cb7849cf853d747f37 | [
"MIT"
] | null | null | null | lib/timestamp_web/live/page_live.ex | ugiete/Timestamp-Converter | 04e0eca0918f7c87047bb0cb7849cf853d747f37 | [
"MIT"
] | null | null | null | defmodule TimestampWeb.PageLive do
@moduledoc false
use TimestampWeb, :live_view
alias Timestamp.Converter
@impl true
def mount(_params, _session, socket) do
{:ok, assign(socket, timestamp: "", datetime: "")}
end
@impl true
def handle_event("clear", _params, socket) do
{:noreply, assign(socket... | 29.382353 | 86 | 0.667668 |
93cb9b0a16afa3c34dbf88988f3a358c2d048718 | 2,320 | ex | Elixir | clients/vault/lib/google_api/vault/v1/model/status.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/vault/lib/google_api/vault/v1/model/status.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/vault/lib/google_api/vault/v1/model/status.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.419355 | 134 | 0.709483 |
93cbc5f6f6ace5673fb01f6c279ac47c1cefdfd9 | 1,058 | ex | Elixir | lib/watcher.ex | camisetags/elixir-koans | 7bb1655d0f290c0834276091efa5a28b416dd91a | [
"MIT"
] | 1 | 2019-03-09T19:33:53.000Z | 2019-03-09T19:33:53.000Z | lib/watcher.ex | camisetags/elixir-koans | 7bb1655d0f290c0834276091efa5a28b416dd91a | [
"MIT"
] | null | null | null | lib/watcher.ex | camisetags/elixir-koans | 7bb1655d0f290c0834276091efa5a28b416dd91a | [
"MIT"
] | null | null | null | defmodule Watcher do
use GenServer
def start_link() do
GenServer.start_link(__MODULE__, dirs: ["lib/koans"])
end
def init(args) do
{:ok, watcher_pid} = FileSystem.start_link(args)
FileSystem.subscribe(watcher_pid)
{:ok, %{watcher_pid: watcher_pid}}
end
def handle_info({:file_event, watche... | 25.190476 | 110 | 0.628544 |
93cbc7da39d6e60054021c36f568182cb0069a3c | 4,959 | ex | Elixir | lib/ex_pix.ex | LeoLeiteSC/ex_pix | 85fbed588a6ab0563e038a23f11194a027ec1b9f | [
"MIT"
] | 7 | 2021-04-18T14:54:41.000Z | 2022-01-21T23:10:47.000Z | lib/ex_pix.ex | Astrocoders/ex_pix | ccf5012dfc2809f2be2c1223ab836c7a4e2fd90d | [
"MIT"
] | null | null | null | lib/ex_pix.ex | Astrocoders/ex_pix | ccf5012dfc2809f2be2c1223ab836c7a4e2fd90d | [
"MIT"
] | 1 | 2021-09-13T18:07:19.000Z | 2021-09-13T18:07:19.000Z | defmodule ExPIX do
@moduledoc """
Module with basic operations.
All functions in this library use the parameters in the `config.exs` file. By default, the configuration for building static QR-Codes is:
```elixir
config :ex_pix, :static_code,
payload_indicator: "01",
start_method: "11",
gui: "br.... | 49.59 | 259 | 0.71224 |
93cc2cf270712da7d7d180e22bb124e8e57bf0ab | 115 | ex | Elixir | lib/remote_retro/repo.ex | octosteve/remote_retro | 3385b0db3c2daab934ce12a2f7642a5f10ac5147 | [
"MIT"
] | 523 | 2017-03-15T15:21:11.000Z | 2022-03-14T03:04:18.000Z | lib/remote_retro/repo.ex | octosteve/remote_retro | 3385b0db3c2daab934ce12a2f7642a5f10ac5147 | [
"MIT"
] | 524 | 2017-03-16T18:31:09.000Z | 2022-02-26T10:02:06.000Z | lib/remote_retro/repo.ex | octosteve/remote_retro | 3385b0db3c2daab934ce12a2f7642a5f10ac5147 | [
"MIT"
] | 60 | 2017-05-01T18:02:28.000Z | 2022-03-04T21:04:56.000Z | defmodule RemoteRetro.Repo do
use Ecto.Repo,
otp_app: :remote_retro,
adapter: Ecto.Adapters.Postgres
end
| 19.166667 | 35 | 0.747826 |
93cc6da4ad94f56cce172680e6bc27c6f7665920 | 78 | exs | Elixir | test/amrita_web/views/page_view_test.exs | u3paka/Amrita | de2c566d856fd75925a4dfec58c28c2484c29d5d | [
"Apache-2.0"
] | null | null | null | test/amrita_web/views/page_view_test.exs | u3paka/Amrita | de2c566d856fd75925a4dfec58c28c2484c29d5d | [
"Apache-2.0"
] | 2 | 2020-07-17T08:34:44.000Z | 2021-03-09T08:33:47.000Z | test/amrita_web/views/page_view_test.exs | u3paka/amrita | de2c566d856fd75925a4dfec58c28c2484c29d5d | [
"Apache-2.0"
] | null | null | null | defmodule AmritaWeb.PageViewTest do
use AmritaWeb.ConnCase, async: true
end
| 19.5 | 37 | 0.820513 |
93cca55cbf518cbc11907cb2aa6da5264f5cbb53 | 3,021 | ex | Elixir | clients/analytics_data/lib/google_api/analytics_data/v1beta/model/minute_range.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/analytics_data/lib/google_api/analytics_data/v1beta/model/minute_range.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/analytics_data/lib/google_api/analytics_data/v1beta/model/minute_range.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... | 57 | 565 | 0.740814 |
93ccb3b96c2b8c749dddb1fe000a4d99a21cabf4 | 7,587 | ex | Elixir | lib/ex_json_schema/validator.ex | appcues/ex_json_schema | 3d4abf8a17bb803ab9ec2840c89f1f2bfda16d26 | [
"MIT"
] | null | null | null | lib/ex_json_schema/validator.ex | appcues/ex_json_schema | 3d4abf8a17bb803ab9ec2840c89f1f2bfda16d26 | [
"MIT"
] | null | null | null | lib/ex_json_schema/validator.ex | appcues/ex_json_schema | 3d4abf8a17bb803ab9ec2840c89f1f2bfda16d26 | [
"MIT"
] | null | null | null | defmodule ExJsonSchema.Validator do
alias ExJsonSchema.Validator.Dependencies
alias ExJsonSchema.Validator.Format
alias ExJsonSchema.Validator.Items
alias ExJsonSchema.Validator.Properties
alias ExJsonSchema.Validator.Type
alias ExJsonSchema.Schema
alias ExJsonSchema.Schema.Root
@type errors :: [{Strin... | 34.486364 | 108 | 0.625016 |
93ccc2069607ba811a76fef2d811bc392bf622a4 | 1,979 | exs | Elixir | mix.exs | stefkohub/darknet_to_onnx | 1d378a4dd33452e7eba7a6174e4a13a210fa8cb6 | [
"MIT"
] | 1 | 2021-12-05T10:52:26.000Z | 2021-12-05T10:52:26.000Z | mix.exs | stefkohub/darknet_to_onnx | 1d378a4dd33452e7eba7a6174e4a13a210fa8cb6 | [
"MIT"
] | 3 | 2021-12-17T10:12:22.000Z | 2022-02-28T12:17:21.000Z | mix.exs | stefkohub/darknet_to_onnx | 1d378a4dd33452e7eba7a6174e4a13a210fa8cb6 | [
"MIT"
] | null | null | null | defmodule DarknetToOnnx.MixProject do
use Mix.Project
def project do
[
app: :darknet_to_onnx,
version: "0.1.0",
elixir: "~> 1.12",
start_permanent: Mix.env() == :prod,
build_embedded: Mix.env() == :prod,
escript: [main_module: DarknetToOnnx.CLI],
deps: deps(),
####### ... | 31.919355 | 93 | 0.560889 |
93cce167068b21bf3447df83925cf21781e5b89e | 2,135 | ex | Elixir | clients/people/lib/google_api/people/v1/model/relationship_interest.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/people/lib/google_api/people/v1/model/relationship_interest.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/people/lib/google_api/people/v1/model/relationship_interest.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 35 | 140 | 0.714286 |
93cd5067253fdec786a342fbdc5efcef283136a6 | 4,239 | ex | Elixir | lib/tirexs/resources.ex | williamtran29/tirex_aws | 8affc13d32978db47e083bec7ae11c5546f89395 | [
"Apache-2.0"
] | null | null | null | lib/tirexs/resources.ex | williamtran29/tirex_aws | 8affc13d32978db47e083bec7ae11c5546f89395 | [
"Apache-2.0"
] | null | null | null | lib/tirexs/resources.ex | williamtran29/tirex_aws | 8affc13d32978db47e083bec7ae11c5546f89395 | [
"Apache-2.0"
] | null | null | null | defmodule Tirexs.Resources do
@moduledoc """
The intend is to provide an abstraction for dealing with ES resources.
The interface of this module is aware about elasticsearch REST APIs conventions.
Meanwhile, a `Tirexs.HTTP` provides just a general interface.
"""
import Tirexs.HTTP
@doc "the same as `... | 33.377953 | 128 | 0.623496 |
93cd5fcc949a433ab202f2b22a29ce6b3380359b | 2,224 | ex | Elixir | lib/payments/orders.ex | DiscoveryMap/PayPal | 2884bc0dde07a007d85467e4c7766f2ab4f79360 | [
"MIT"
] | null | null | null | lib/payments/orders.ex | DiscoveryMap/PayPal | 2884bc0dde07a007d85467e4c7766f2ab4f79360 | [
"MIT"
] | null | null | null | lib/payments/orders.ex | DiscoveryMap/PayPal | 2884bc0dde07a007d85467e4c7766f2ab4f79360 | [
"MIT"
] | 2 | 2020-11-03T07:06:19.000Z | 2021-04-01T07:16:57.000Z | defmodule PayPal.Payments.Orders do
@moduledoc """
Documentation for PayPal.Payments.Orders
https://developer.paypal.com/docs/api/payments/#order
"""
@doc """
Show an order
[docs](https://developer.paypal.com/docs/api/payments/#order_get)
Possible returns:
- {:ok, order}
- {:error, reason}
#... | 22.464646 | 126 | 0.625 |
93cda5f80f036a29028280fa02c296c2ddc0b527 | 1,183 | ex | Elixir | lib/mongo/event_handler.ex | aenglisc/elixir-mongodb-driver | a8a72fbb8690f44ac349e0449616ac2cfbf50640 | [
"Apache-2.0"
] | 140 | 2019-04-10T09:23:53.000Z | 2022-03-27T12:37:02.000Z | lib/mongo/event_handler.ex | aenglisc/elixir-mongodb-driver | a8a72fbb8690f44ac349e0449616ac2cfbf50640 | [
"Apache-2.0"
] | 99 | 2019-04-11T07:46:45.000Z | 2022-03-31T07:23:28.000Z | lib/mongo/event_handler.ex | aenglisc/elixir-mongodb-driver | a8a72fbb8690f44ac349e0449616ac2cfbf50640 | [
"Apache-2.0"
] | 45 | 2019-07-15T07:06:21.000Z | 2021-11-24T09:23:21.000Z | defmodule Mongo.EventHandler do
@moduledoc false
require Logger
@all [:commands, :topology]
def start(opts \\ [topics: [:commands]]) do
spawn(__MODULE__, :register, [opts])
end
def register(opts) do
with true <- (opts[:topics] || @all)
|> Enum.map(fn topic -> Registry.register(:e... | 25.170213 | 91 | 0.550296 |
93cdc0953022194a25e8dd9e5f7e44d8c9b61c1d | 666 | ex | Elixir | lib/web/controllers/skill_controller.ex | NatTuck/ex_venture | 7a74d33025a580f1e3e93d3755f22258eb3e9127 | [
"MIT"
] | null | null | null | lib/web/controllers/skill_controller.ex | NatTuck/ex_venture | 7a74d33025a580f1e3e93d3755f22258eb3e9127 | [
"MIT"
] | null | null | null | lib/web/controllers/skill_controller.ex | NatTuck/ex_venture | 7a74d33025a580f1e3e93d3755f22258eb3e9127 | [
"MIT"
] | null | null | null | defmodule Web.SkillController do
use Web, :controller
alias Web.Skill
plug(Web.Plug.FetchPage, [per: 10] when action in [:index])
def index(conn, _params) do
%{page: page, per: per} = conn.assigns
%{page: skills, pagination: pagination} = Skill.all(page: page, per: per, filter: %{enabled: true})
... | 21.483871 | 103 | 0.594595 |
93cdebb7f6087ed5f930596870a341b3feff19e1 | 4,393 | exs | Elixir | test/comeonin_test.exs | echenim/comeonin | 1ff00b118dda3094ec2181c1d4c7bd5eabc9360d | [
"BSD-3-Clause"
] | 2 | 2019-02-10T01:22:22.000Z | 2019-02-11T20:47:28.000Z | test/comeonin_test.exs | echenim/comeonin | 1ff00b118dda3094ec2181c1d4c7bd5eabc9360d | [
"BSD-3-Clause"
] | null | null | null | test/comeonin_test.exs | echenim/comeonin | 1ff00b118dda3094ec2181c1d4c7bd5eabc9360d | [
"BSD-3-Clause"
] | null | null | null | defmodule ComeoninTest do
use ExUnit.Case
import ExUnit.CaptureIO
import ComeoninTestHelper
@algs [Comeonin.Argon2, Comeonin.Bcrypt, Comeonin.Pbkdf2]
test "hashing and checking passwords" do
wrong_list = ["aged2h$ru", "2dau$ehgr", "rg$deh2au", "2edrah$gu", "$agedhur2", ""]
hash_check("hard2guess", ... | 33.030075 | 91 | 0.64967 |
93cdfdcc334755ce32ba8e3539184558510c50c0 | 2,694 | exs | Elixir | exercises/simple-cipher/example.exs | darktef/elixir-exercism | bcaae351486b1405f0a01cd33b4d39555546298e | [
"MIT"
] | null | null | null | exercises/simple-cipher/example.exs | darktef/elixir-exercism | bcaae351486b1405f0a01cd33b4d39555546298e | [
"MIT"
] | null | null | null | exercises/simple-cipher/example.exs | darktef/elixir-exercism | bcaae351486b1405f0a01cd33b4d39555546298e | [
"MIT"
] | null | null | null | defmodule SimpleCipher do
@alphabet "abcdefghijklmnopqrstuvwxyz" |> String.graphemes
@alphabet_size @alphabet |> length
for key_char <- @alphabet do
shifted_alphabet = Stream.cycle(@alphabet)
|> Stream.drop_while(&(&1 != key_char))
|> Enum.take(@alphabet_size)
... | 33.259259 | 79 | 0.702673 |
93ce06943b4d2afb130908bdf0191272a914e342 | 12,696 | ex | Elixir | lib/ueberauth/strategy.ex | fastindian84/ueberauth | 09f402672e4564930be5f5f4d746df9b1fa47bfe | [
"MIT"
] | null | null | null | lib/ueberauth/strategy.ex | fastindian84/ueberauth | 09f402672e4564930be5f5f4d746df9b1fa47bfe | [
"MIT"
] | null | null | null | lib/ueberauth/strategy.ex | fastindian84/ueberauth | 09f402672e4564930be5f5f4d746df9b1fa47bfe | [
"MIT"
] | null | null | null | defmodule Ueberauth.Strategy do
@moduledoc """
The Strategy is the work-horse of the system.
Strategies are implemented outside this library to meet your needs, the
strategy provides a consistent API and behaviour.
Each strategy operates through two phases.
1. `request phase`
2. `callback phase`
The... | 30.965854 | 88 | 0.695888 |
93ce08509ac47dbae994b48637f415c1c8596e86 | 406 | ex | Elixir | web/views/division_view.ex | rob05c/tox | f54847ca058ad24b909341ad65d595a4069d2471 | [
"Apache-2.0"
] | 2 | 2016-11-16T17:24:21.000Z | 2019-02-15T05:38:27.000Z | web/views/division_view.ex | rob05c/tox | f54847ca058ad24b909341ad65d595a4069d2471 | [
"Apache-2.0"
] | null | null | null | web/views/division_view.ex | rob05c/tox | f54847ca058ad24b909341ad65d595a4069d2471 | [
"Apache-2.0"
] | null | null | null | defmodule Tox.DivisionView do
use Tox.Web, :view
def render("index.json", %{divisions: divisions}) do
%{data: render_many(divisions, Tox.DivisionView, "division.json")}
end
def render("show.json", %{division: division}) do
%{data: render_one(division, Tox.DivisionView, "division.json")}
end
def r... | 25.375 | 70 | 0.687192 |
93ce3a25c5e30fbe5aa60fc7a0378b264fb326e4 | 1,451 | ex | Elixir | lib/malan/accounts/ethnicity_enum.ex | FreedomBen/malan | ec8cd6ed3694e33371f065f018b1169956f2accf | [
"MIT"
] | 3 | 2021-04-24T17:54:55.000Z | 2021-09-10T15:40:19.000Z | lib/malan/accounts/ethnicity_enum.ex | FreedomBen/malan | ec8cd6ed3694e33371f065f018b1169956f2accf | [
"MIT"
] | 57 | 2021-04-24T03:17:16.000Z | 2022-03-27T04:50:22.000Z | lib/malan/accounts/ethnicity_enum.ex | FreedomBen/malan | ec8cd6ed3694e33371f065f018b1169956f2accf | [
"MIT"
] | null | null | null | defmodule Malan.Accounts.User.Ethnicity do
def get(i) when is_integer(i), do: all_by_value()[i]
def get(i) when is_binary(i), do: all_by_keyword_normalized()[normalize(i)]
def to_s(nil), do: nil
def to_s(i) when is_integer(i), do: get(i)
def to_s(s) when is_binary(s), do: get(s)
def to_i(nil), do: nil
de... | 26.87037 | 77 | 0.636802 |
93ce989330b3b787704da2522404e21569d464d8 | 613 | exs | Elixir | test/crypto_monitor_web/views/error_view_test.exs | obahareth/crypto-monitor | bd9e9f1e9627fad582329afe2c66e2de4c95768b | [
"MIT"
] | null | null | null | test/crypto_monitor_web/views/error_view_test.exs | obahareth/crypto-monitor | bd9e9f1e9627fad582329afe2c66e2de4c95768b | [
"MIT"
] | null | null | null | test/crypto_monitor_web/views/error_view_test.exs | obahareth/crypto-monitor | bd9e9f1e9627fad582329afe2c66e2de4c95768b | [
"MIT"
] | null | null | null | defmodule CryptoMonitorWeb.ErrorViewTest do
use CryptoMonitorWeb.ConnCase, async: true
# Bring render/3 and render_to_string/3 for testing custom views
import Phoenix.View
test "renders 404.html" do
assert render_to_string(CryptoMonitorWeb.ErrorView, "404.html", []) ==
"Page not found"
end
... | 27.863636 | 74 | 0.699837 |
93cea555b678ab35bb77cefd66b7dcac3d9ad6d3 | 176 | ex | Elixir | lib/shiftplaner_web_web/controllers/admin_controller.ex | pfitz/shiftplaner_web | ca961b4916e76bb2c87c83c28d8f286dfaa2f2fe | [
"MIT"
] | null | null | null | lib/shiftplaner_web_web/controllers/admin_controller.ex | pfitz/shiftplaner_web | ca961b4916e76bb2c87c83c28d8f286dfaa2f2fe | [
"MIT"
] | null | null | null | lib/shiftplaner_web_web/controllers/admin_controller.ex | pfitz/shiftplaner_web | ca961b4916e76bb2c87c83c28d8f286dfaa2f2fe | [
"MIT"
] | null | null | null | defmodule ShiftplanerWebWeb.AdminController do
@moduledoc false
use ShiftplanerWebWeb, :controller
def index(conn, _params) do
render conn, "index.html"
end
end
| 16 | 46 | 0.755682 |
93ceafa528a2e1f433955169f23f01e6c67f670a | 2,400 | exs | Elixir | test/authable/config_test.exs | liberumed/authable | 6db9951aa07000b358f16ffe413a13aa9aa89192 | [
"Unlicense"
] | null | null | null | test/authable/config_test.exs | liberumed/authable | 6db9951aa07000b358f16ffe413a13aa9aa89192 | [
"Unlicense"
] | null | null | null | test/authable/config_test.exs | liberumed/authable | 6db9951aa07000b358f16ffe413a13aa9aa89192 | [
"Unlicense"
] | 1 | 2021-01-12T00:55:56.000Z | 2021-01-12T00:55:56.000Z | defmodule Authable.ConfigTest do
use ExUnit.Case
alias Authable.Config
test ".repo" do
assert Authable.Repo == Config.repo()
end
test ".scopes" do
assert ~w(read write session) == Config.scopes()
end
test ".app_scopes" do
assert "read,write,session" == Config.app_scopes()
end
test ".gr... | 24.242424 | 72 | 0.6175 |
93cebf07bcd93cf71c488a1791d659569a0e87e2 | 2,290 | ex | Elixir | lib/quark/fixed_point.ex | toraritte/quark | acf18de05a86ba4740fdffdbb93918ce4ebfeb5f | [
"MIT"
] | null | null | null | lib/quark/fixed_point.ex | toraritte/quark | acf18de05a86ba4740fdffdbb93918ce4ebfeb5f | [
"MIT"
] | null | null | null | lib/quark/fixed_point.ex | toraritte/quark | acf18de05a86ba4740fdffdbb93918ce4ebfeb5f | [
"MIT"
] | null | null | null | defmodule Quark.FixedPoint do
@moduledoc ~S"""
Fixed point combinators generalize the idea of a recursive function. This can
be used to great effect, simplifying many definitions.
For example, here is the factorial function written in terms of `y/1`:
iex> fac = fn fac ->
...> fn
...> 0... | 21.603774 | 79 | 0.480349 |
93ced94de08e63e4b97aebc402222d903c0d8338 | 2,108 | ex | Elixir | clients/identity_toolkit/lib/google_api/identity_toolkit/v3/model/set_account_info_response_provider_user_info.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | null | null | null | clients/identity_toolkit/lib/google_api/identity_toolkit/v3/model/set_account_info_response_provider_user_info.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | null | null | null | clients/identity_toolkit/lib/google_api/identity_toolkit/v3/model/set_account_info_response_provider_user_info.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | 1 | 2020-11-10T16:58:27.000Z | 2020-11-10T16:58:27.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 34 | 211 | 0.723909 |
93cf1b67ae4f797ccf1ab406a1f20afd10d99274 | 6,016 | exs | Elixir | test/credo/code/strings_test.exs | rubysolo/credo | 0aecde3001af7cf804253df923019aaaf08522d5 | [
"MIT"
] | null | null | null | test/credo/code/strings_test.exs | rubysolo/credo | 0aecde3001af7cf804253df923019aaaf08522d5 | [
"MIT"
] | null | null | null | test/credo/code/strings_test.exs | rubysolo/credo | 0aecde3001af7cf804253df923019aaaf08522d5 | [
"MIT"
] | null | null | null | defmodule Credo.Code.StringsTest do
use Credo.Test.Case
alias Credo.Code.Strings
test "it should return the source without string literals 2" do
source = """
@moduledoc \"\"\"
this is an example # TODO: and this is no actual comment
\"\"\"
x = ~s{also: # TODO: no comment here}
?" # TODO... | 24.655738 | 86 | 0.527593 |
93cf532ecabc86e60e182c7c91e050fedeef719c | 1,763 | exs | Elixir | clients/logging/mix.exs | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/logging/mix.exs | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/logging/mix.exs | 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... | 26.313433 | 98 | 0.646625 |
93cf93a30f55739531156fb4269e92fd3b752947 | 306 | ex | Elixir | lib/elixir_state_machines.ex | phasebash/elixir-finite-state-machines | ea920a6cdc320a32c9a4415ac34c062eb726f97a | [
"MIT"
] | null | null | null | lib/elixir_state_machines.ex | phasebash/elixir-finite-state-machines | ea920a6cdc320a32c9a4415ac34c062eb726f97a | [
"MIT"
] | null | null | null | lib/elixir_state_machines.ex | phasebash/elixir-finite-state-machines | ea920a6cdc320a32c9a4415ac34c062eb726f97a | [
"MIT"
] | null | null | null | defmodule ElixirStateMachines do
@moduledoc """
Documentation for `ElixirStateMachines`.
"""
@doc """
This will at some point be interesting.
## Examples
iex> ElixirStateMachines.demo()
{:ok, "nothing to see here"}
"""
def demo do
{:ok, "nothing to see here"}
end
end
| 16.105263 | 42 | 0.633987 |
93cfa81e2ce34cda2c9f3a1c48ea60532579128e | 193 | ex | Elixir | lib/doc_gen_web/controllers/about_controller.ex | the-mikedavis/doc_gen | efcc884ea65bba5748f41c5601abd00db2777ec4 | [
"BSD-3-Clause"
] | null | null | null | lib/doc_gen_web/controllers/about_controller.ex | the-mikedavis/doc_gen | efcc884ea65bba5748f41c5601abd00db2777ec4 | [
"BSD-3-Clause"
] | 27 | 2018-10-29T18:34:44.000Z | 2019-03-11T18:43:12.000Z | lib/doc_gen_web/controllers/about_controller.ex | the-mikedavis/doc_gen | efcc884ea65bba5748f41c5601abd00db2777ec4 | [
"BSD-3-Clause"
] | null | null | null | defmodule DocGenWeb.AboutController do
use DocGenWeb, :controller
alias DocGen.Content.Copy
def index(conn, _params) do
render(conn, "index.html", copy: Copy.get(:about))
end
end
| 19.3 | 54 | 0.73057 |
93cfe52ebacf6f34ba5c4951a09fea7078647359 | 1,927 | ex | Elixir | clients/you_tube_reporting/lib/google_api/you_tube_reporting/v1/model/gdata_content_type_info.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/you_tube_reporting/lib/google_api/you_tube_reporting/v1/model/gdata_content_type_info.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/you_tube_reporting/lib/google_api/you_tube_reporting/v1/model/gdata_content_type_info.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... | 32.661017 | 88 | 0.689673 |
93cfeeda3c2192267feae4e120cd7337490d4b4a | 847 | exs | Elixir | samples/one_fast_fun.exs | JamesGood626/benchee | de9e99462f6e5ad03001460391a8bd82dbbba773 | [
"MIT"
] | null | null | null | samples/one_fast_fun.exs | JamesGood626/benchee | de9e99462f6e5ad03001460391a8bd82dbbba773 | [
"MIT"
] | null | null | null | samples/one_fast_fun.exs | JamesGood626/benchee | de9e99462f6e5ad03001460391a8bd82dbbba773 | [
"MIT"
] | null | null | null | # Also way too fast and therefore not super feasible, more a test if
# if benchmarking super fast functions has gotten any better.
Benchee.run(%{"fast" => fn -> 1 + 1 end}, time: 1)
# tobi@happy ~/github/benchee $ mix run samples/one_fast_fun.exs
# Erlang/OTP 19 [erts-8.1] [source-4cc2ce3] [64-bit] [smp:8:8] [async-th... | 42.35 | 184 | 0.689492 |
93cff1efbd71b754d1570d44c478f002b8160913 | 9,481 | exs | Elixir | lib/ex_unit/test/ex_unit/capture_io_test.exs | matiasgarciaisaia/elixir | d0a3fdbfd774e0a6972513dcb82c2683400e67a0 | [
"Apache-2.0"
] | 1 | 2015-11-24T23:39:25.000Z | 2015-11-24T23:39:25.000Z | lib/ex_unit/test/ex_unit/capture_io_test.exs | lau/elixir | 6cfe09c50b5f612e473725623d901080077ad6a6 | [
"Apache-2.0"
] | null | null | null | lib/ex_unit/test/ex_unit/capture_io_test.exs | lau/elixir | 6cfe09c50b5f612e473725623d901080077ad6a6 | [
"Apache-2.0"
] | null | null | null | Code.require_file("../test_helper.exs", __DIR__)
defmodule ExUnit.CaptureIOTest do
use ExUnit.Case
defmodule GetUntil do
def until_new_line(_, :eof, _) do
{:done, :eof, []}
end
def until_new_line(this_far, chars, stop_char) do
case Enum.split_while(chars, fn c -> c != stop_char end) do
... | 24.690104 | 91 | 0.525577 |
93d00bed2dda079c7c638cb7a047dbe9aad83eb5 | 922 | ex | Elixir | lib/mpdecimal.ex | SpiffInc/mpdecimal | c2e8382848c13642db7bbdf353a6f9acf959d57c | [
"MIT"
] | 1 | 2021-04-19T13:14:02.000Z | 2021-04-19T13:14:02.000Z | lib/mpdecimal.ex | SpiffInc/mpdecimal | c2e8382848c13642db7bbdf353a6f9acf959d57c | [
"MIT"
] | 2 | 2021-05-15T16:50:09.000Z | 2021-06-03T15:19:47.000Z | lib/mpdecimal.ex | SpiffInc/mpdecimal | c2e8382848c13642db7bbdf353a6f9acf959d57c | [
"MIT"
] | null | null | null | defmodule MPDecimal do
alias MPDecimal.Nif
@doc """
raise a decimal to a power
This function performs exponentiation with fixed-decimal precision.
## Examples
iex> two = Decimal.new("2.0")
#Decimal<2.0>
iex> four = MPDecimal.power(two, two)
#Decimal<4.00>
iex> MPDecimal.power... | 27.117647 | 75 | 0.658351 |
93d0282e30bd0d63a9e5e741993a8137e9d70ec1 | 65 | ex | Elixir | lib/bitstring_web/views/page_view.ex | the-hills/www.bitstring.xyz | fde44f0812634614bf166ef20505bdaa15a2feb4 | [
"MIT"
] | 1 | 2017-09-22T14:53:03.000Z | 2017-09-22T14:53:03.000Z | lib/bitstring_web/views/page_view.ex | the-hills/www.bitstring.xyz | fde44f0812634614bf166ef20505bdaa15a2feb4 | [
"MIT"
] | null | null | null | lib/bitstring_web/views/page_view.ex | the-hills/www.bitstring.xyz | fde44f0812634614bf166ef20505bdaa15a2feb4 | [
"MIT"
] | null | null | null | defmodule BitstringWeb.PageView do
use BitstringWeb, :view
end
| 16.25 | 34 | 0.815385 |
93d0acf32566830af0b38a0bd1725d5d36e53056 | 3,589 | ex | Elixir | lib/harald/hci/le_controller.ex | mattludwigs/harald | 82e67a71d9940d8572fd217eaf29575e81533151 | [
"MIT"
] | 3 | 2020-08-07T02:09:09.000Z | 2020-08-28T12:25:48.000Z | lib/harald/hci/le_controller.ex | mattludwigs/harald | 82e67a71d9940d8572fd217eaf29575e81533151 | [
"MIT"
] | null | null | null | lib/harald/hci/le_controller.ex | mattludwigs/harald | 82e67a71d9940d8572fd217eaf29575e81533151 | [
"MIT"
] | null | null | null | defmodule Harald.HCI.LEController do
@moduledoc """
> The LE Controller Commands provide access and control to various capabilities of the Bluetooth
> hardware, as well as methods for the Host to affect how the Link Layer manages the piconet,
> and controls connections.
Reference: Version 5.0, Vol 2, Part E,... | 36.622449 | 98 | 0.696294 |
93d0b3bb8840be65bee0bac3043b2ef102d89f3a | 1,545 | ex | Elixir | apps/artemis/lib/artemis/drivers/ibm_cloud_iam/access_token/get_access_token.ex | artemis-platform/artemis_dashboard | 5ab3f5ac4c5255478bbebf76f0e43b44992e3cab | [
"MIT"
] | 9 | 2019-08-19T19:56:34.000Z | 2022-03-22T17:56:38.000Z | apps/artemis/lib/artemis/drivers/ibm_cloud_iam/access_token/get_access_token.ex | chrislaskey/artemis_teams | 9930c3d9528e37b76f0525390e32b66eed7eadde | [
"MIT"
] | 7 | 2019-07-12T21:41:01.000Z | 2020-08-17T21:29:22.000Z | apps/artemis/lib/artemis/drivers/ibm_cloud_iam/access_token/get_access_token.ex | chrislaskey/artemis_teams | 9930c3d9528e37b76f0525390e32b66eed7eadde | [
"MIT"
] | 2 | 2019-07-05T22:51:47.000Z | 2019-08-19T19:56:37.000Z | defmodule Artemis.Drivers.IBMCloudIAM.GetAccessToken do
alias Artemis.Drivers.IBMCloudIAM
require Logger
def call(api_key) do
with {:ok, response} <- request_access_token(api_key),
{:ok, data} <- process_response(response) do
{:ok, data}
else
{:error, error} -> {:error, error}
... | 26.186441 | 97 | 0.628479 |
93d0bf39581c0aa3c66dee005845ea37a93ecfef | 1,107 | ex | Elixir | lib/national_voter_file.ex | nihonjinrxs/national-voter-file-api | 690c40bd46e196cebb6325341f1197a862c38632 | [
"MIT"
] | 12 | 2017-03-24T02:58:38.000Z | 2020-11-18T15:29:33.000Z | lib/national_voter_file.ex | nihonjinrxs/national-voter-file-api | 690c40bd46e196cebb6325341f1197a862c38632 | [
"MIT"
] | 22 | 2016-12-31T17:14:33.000Z | 2021-06-09T17:02:59.000Z | lib/national_voter_file.ex | nihonjinrxs/national-voter-file-api | 690c40bd46e196cebb6325341f1197a862c38632 | [
"MIT"
] | 7 | 2017-02-27T15:42:55.000Z | 2017-10-13T15:26:02.000Z | defmodule NationalVoterFile do
use Application
# See http://elixir-lang.org/docs/stable/elixir/Application.html
# for more information on OTP Applications
def start(_type, _args) do
import Supervisor.Spec
# Define workers and child supervisors to be supervised
children = [
# Start the Ecto r... | 34.59375 | 95 | 0.730804 |
93d0d0764843f5cc8642abf674d65188104f1641 | 1,117 | exs | Elixir | config/config.exs | icehaunter/pipe_to | 52f7c90368edf691cba07031e256fc50d4e1875b | [
"Apache-2.0"
] | 86 | 2016-09-09T19:05:25.000Z | 2021-09-25T05:28:43.000Z | config/config.exs | icehaunter/pipe_to | 52f7c90368edf691cba07031e256fc50d4e1875b | [
"Apache-2.0"
] | 5 | 2016-09-19T13:44:08.000Z | 2020-07-01T10:57:53.000Z | config/config.exs | icehaunter/pipe_to | 52f7c90368edf691cba07031e256fc50d4e1875b | [
"Apache-2.0"
] | 2 | 2019-09-03T13:46:47.000Z | 2020-03-13T11:56:56.000Z | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the paren... | 36.032258 | 73 | 0.751119 |
93d0f26de41a2454933fac103f477b942eb00baf | 2,696 | ex | Elixir | lib/espec/extension/datetime_extension.ex | MeneDev/espec | ec4b3d579c5192999e930224a8a2650bb1fdf0bc | [
"Apache-2.0"
] | 807 | 2015-03-25T14:00:19.000Z | 2022-03-24T08:08:15.000Z | lib/espec/extension/datetime_extension.ex | MeneDev/espec | ec4b3d579c5192999e930224a8a2650bb1fdf0bc | [
"Apache-2.0"
] | 254 | 2015-03-27T10:12:25.000Z | 2021-07-12T01:40:15.000Z | lib/espec/extension/datetime_extension.ex | MeneDev/espec | ec4b3d579c5192999e930224a8a2650bb1fdf0bc | [
"Apache-2.0"
] | 85 | 2015-04-02T10:25:19.000Z | 2021-01-30T21:30:43.000Z | defmodule DateTime.Extension do
@moduledoc """
A module to extend the calendar implementation that follows to ISO8601 with methods found in
Elixir 1.5.1. This is to allow ESpec to support Elixir >= 1.3.4 more easily.
"""
defstruct [
:year,
:month,
:day,
:hour,
:minute,
:second,
:t... | 25.196262 | 95 | 0.589392 |
93d0f69643ef66769db8ad4a03007dccd40b1f07 | 2,006 | ex | Elixir | clients/cloud_search/lib/google_api/cloud_search/v1/model/query_interpretation.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/cloud_search/lib/google_api/cloud_search/v1/model/query_interpretation.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/cloud_search/lib/google_api/cloud_search/v1/model/query_interpretation.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... | 37.849057 | 324 | 0.7333 |
93d119b6da16b9f96e25dfc20435c4616707ad0e | 9,770 | ex | Elixir | clients/reseller/lib/google_api/reseller/v1/api/customers.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/reseller/lib/google_api/reseller/v1/api/customers.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/reseller/lib/google_api/reseller/v1/api/customers.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 44.409091 | 399 | 0.690993 |
93d146c17be408bc700ef122c8a3c6c168fd740d | 1,168 | ex | Elixir | discuss/web/channels/comments_channel.ex | darth-dodo/discuss-it | dbed7d3c844ba155b7dd3a763a83b41a54d01048 | [
"MIT"
] | 1 | 2020-07-16T11:28:44.000Z | 2020-07-16T11:28:44.000Z | discuss/web/channels/comments_channel.ex | darth-dodo/discuss-it | dbed7d3c844ba155b7dd3a763a83b41a54d01048 | [
"MIT"
] | 1 | 2021-05-09T03:13:17.000Z | 2021-05-09T03:13:17.000Z | discuss/web/channels/comments_channel.ex | darth-dodo/discuss-it | dbed7d3c844ba155b7dd3a763a83b41a54d01048 | [
"MIT"
] | null | null | null | defmodule Discuss.CommentsChannel do
use Discuss.Web, :channel
alias Discuss.Topic
alias Discuss.Comment
# pattern matching to join the strings in elixir
def join("comments:" <> topic_id, _params, socket) do
topic_id = String.to_integer(topic_id)
topic = Topic
|> Repo.get(topic_id)
|> Rep... | 27.162791 | 128 | 0.642123 |
93d15be29bff091936ac3662073d415ebf7b1d1e | 299 | ex | Elixir | {{cookiecutter.project_underscored}}/lib/{{cookiecutter.project_underscored}}.ex | ijcd/cookiecutter-screaming-phoenix | f34ca6704f8f8b0581e91b4f6e3e75239fb79cb1 | [
"Apache-2.0"
] | null | null | null | {{cookiecutter.project_underscored}}/lib/{{cookiecutter.project_underscored}}.ex | ijcd/cookiecutter-screaming-phoenix | f34ca6704f8f8b0581e91b4f6e3e75239fb79cb1 | [
"Apache-2.0"
] | null | null | null | {{cookiecutter.project_underscored}}/lib/{{cookiecutter.project_underscored}}.ex | ijcd/cookiecutter-screaming-phoenix | f34ca6704f8f8b0581e91b4f6e3e75239fb79cb1 | [
"Apache-2.0"
] | null | null | null | defmodule {{cookiecutter.project_module}} do
@moduledoc """
{{cookiecutter.project_module}} keeps the contexts that define your domain
and business logic.
Contexts are also responsible for managing your data, regardless
if it comes from the database, an external API or others.
"""
end
| 29.9 | 76 | 0.759197 |
93d1695dab5e291a94da70b98aeabafd3156aa77 | 578 | ex | Elixir | lib/shell/shell.ex | sohjiro/ex_ebook | 4d5d72fbb880a7b25b1c5e217d0a9b679d0496ac | [
"MIT"
] | null | null | null | lib/shell/shell.ex | sohjiro/ex_ebook | 4d5d72fbb880a7b25b1c5e217d0a9b679d0496ac | [
"MIT"
] | null | null | null | lib/shell/shell.ex | sohjiro/ex_ebook | 4d5d72fbb880a7b25b1c5e217d0a9b679d0496ac | [
"MIT"
] | null | null | null | defmodule ExEbook.Shell do
@moduledoc """
Module for interacting with the shell
"""
@type cmd :: String.t()
@type path :: String.t()
@type params :: [String.t()]
require Logger
@spec execute(cmd, params) :: {:ok, String.t()}
def execute(cmd, params \\ []) do
case System.cmd(cmd, params) do
... | 20.642857 | 70 | 0.593426 |
93d17162dff08b73b1f8af447b06e6a85266251c | 838 | ex | Elixir | test/support/yarn_case.ex | StabbyMcDuck/elixir_ravelry | c503fc019842bb82ad58673a1b6867e3214fc7e1 | [
"Apache-2.0"
] | 21 | 2017-08-27T13:59:18.000Z | 2020-10-07T03:35:22.000Z | test/support/yarn_case.ex | StabbyMcDuck/elixir_ravelry | c503fc019842bb82ad58673a1b6867e3214fc7e1 | [
"Apache-2.0"
] | 2 | 2017-09-02T15:49:47.000Z | 2017-09-02T17:43:29.000Z | test/support/yarn_case.ex | StabbyMcDuck/elixir_ravelry | c503fc019842bb82ad58673a1b6867e3214fc7e1 | [
"Apache-2.0"
] | 7 | 2017-09-02T15:11:49.000Z | 2019-08-20T19:00:48.000Z | defmodule ElixirRavelry.YarnCase do
import ElixirRavelry.{RovingCase, MaterialForCase, WoolCase}
alias ElixirRavelry.Repo
alias ElixirRavelryWeb.Yarn
def create_yarn(bolt_sips_conn) do
Repo.Yarn.create(bolt_sips_conn, %Yarn{name: Faker.Name.name()})
end
def create_connected_yarn(bolt_sips_conn) do
... | 36.434783 | 149 | 0.792363 |
93d1ac27d7ca17167fa73baa4984076bfa788425 | 1,893 | ex | Elixir | clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_cx_v3beta1_response_message_text.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_cx_v3beta1_response_message_text.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_cx_v3beta1_response_message_text.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2021-03-04T13:43:47.000Z | 2021-03-04T13:43:47.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... | 34.418182 | 229 | 0.743793 |
93d1c3ccf02e37be3ee0768d7b97ae916faa5092 | 1,199 | exs | Elixir | scripts/n_queens.exs | rob-brown/genetic | 48996c04c8ff504f37013ba0df0ef5cee2986ea9 | [
"MIT"
] | null | null | null | scripts/n_queens.exs | rob-brown/genetic | 48996c04c8ff504f37013ba0df0ef5cee2986ea9 | [
"MIT"
] | null | null | null | scripts/n_queens.exs | rob-brown/genetic | 48996c04c8ff504f37013ba0df0ef5cee2986ea9 | [
"MIT"
] | null | null | null | #! /usr/bin/env elixir
Mix.install([
{:genetic, path: Path.join(__DIR__, "..")}
])
defmodule NQueens do
alias Genetic.{Problem, Chromosome, BasicChromosome}
@behaviour Problem
@impl Problem
def genotype() do
genes = Enum.shuffle(0..7)
BasicChromosome.new(genes)
end
@impl Problem
def fitness_... | 19.655738 | 84 | 0.566305 |
93d1c3d4b3d02ccb82213b4e3af805fda8f9e532 | 1,984 | ex | Elixir | web/controllers/html_parameter_controller.ex | rob05c/tox | f54847ca058ad24b909341ad65d595a4069d2471 | [
"Apache-2.0"
] | 2 | 2016-11-16T17:24:21.000Z | 2019-02-15T05:38:27.000Z | web/controllers/html_parameter_controller.ex | rob05c/tox | f54847ca058ad24b909341ad65d595a4069d2471 | [
"Apache-2.0"
] | null | null | null | web/controllers/html_parameter_controller.ex | rob05c/tox | f54847ca058ad24b909341ad65d595a4069d2471 | [
"Apache-2.0"
] | null | null | null | defmodule Tox.HtmlParameterController do
use Tox.Web, :controller
alias Tox.Parameter
def index(conn, _params) do
parameters = Repo.all(Parameter)
render(conn, "index.html", parameters: parameters)
end
def new(conn, _params) do
changeset = Parameter.changeset(%Parameter{})
render(conn, "new... | 30.060606 | 77 | 0.654234 |
93d1d1354cc2d3b9e37ad2cc77738d8d53b9a18d | 4,380 | ex | Elixir | lib/new_relic/transaction/reporter.ex | binaryseed/elixir_agent | 25f1242c10516618d9ea3a9b18712e5bc41efad6 | [
"Apache-2.0"
] | null | null | null | lib/new_relic/transaction/reporter.ex | binaryseed/elixir_agent | 25f1242c10516618d9ea3a9b18712e5bc41efad6 | [
"Apache-2.0"
] | null | null | null | lib/new_relic/transaction/reporter.ex | binaryseed/elixir_agent | 25f1242c10516618d9ea3a9b18712e5bc41efad6 | [
"Apache-2.0"
] | null | null | null | defmodule NewRelic.Transaction.Reporter do
use GenServer
alias NewRelic.Util.AttrStore
alias NewRelic.Transaction
# This GenServer collects and reports Transaction related data
# - Transaction Events
# - Transaction Metrics
# - Span Events
# - Transaction Errors
# - Transaction Traces
# - Cu... | 24.065934 | 86 | 0.654566 |
93d1d9246a2690406d79ec7a75fa32f1884af8ee | 266 | ex | Elixir | lib/mao_web/resolvers/replies.ex | levijcl/mao | aae70589605ada84ca571a51f5ee4377091e0eb3 | [
"MIT"
] | null | null | null | lib/mao_web/resolvers/replies.ex | levijcl/mao | aae70589605ada84ca571a51f5ee4377091e0eb3 | [
"MIT"
] | null | null | null | lib/mao_web/resolvers/replies.ex | levijcl/mao | aae70589605ada84ca571a51f5ee4377091e0eb3 | [
"MIT"
] | null | null | null | defmodule MAOWeb.Resolvers.Replies do
@moduledoc false
alias MAO.{Replies, Wall}
def comments(%Wall.Post{} = post, _, _) do
{:ok, Replies.list_comments(post)}
end
def create_comment(%{input: input}, _) do
Replies.create_comment(input)
end
end
| 19 | 44 | 0.691729 |
93d1e96315fd31dfa7757fe5559a6767744ee959 | 3,065 | ex | Elixir | lib/changelog/factory.ex | kentcdodds/changelog.com | e1c0d7ee5d47dc83dd443d623adb0f07e4acb28d | [
"MIT"
] | null | null | null | lib/changelog/factory.ex | kentcdodds/changelog.com | e1c0d7ee5d47dc83dd443d623adb0f07e4acb28d | [
"MIT"
] | null | null | null | lib/changelog/factory.ex | kentcdodds/changelog.com | e1c0d7ee5d47dc83dd443d623adb0f07e4acb28d | [
"MIT"
] | null | null | null | defmodule Changelog.Factory do
use ExMachina.Ecto, repo: Changelog.Repo
import Changelog.TimeView, only: [hours_from_now: 1, hours_ago: 1]
def channel_factory do
%Changelog.Channel{
name: sequence(:name, &"Channel #{&1}"),
slug: sequence(:slug, &"channel-#{&1}")
}
end
def episode_factory... | 24.325397 | 121 | 0.63752 |
93d1f24d683578b79c177a450298e90a6649bda2 | 1,427 | ex | Elixir | apps/nerves_hub_device/test/support/data_case.ex | Gazler/nerves_hub_web | 9a636a17310382819eaa6cee590e053cb47f0dcc | [
"Apache-2.0"
] | 1 | 2019-10-13T10:56:28.000Z | 2019-10-13T10:56:28.000Z | apps/nerves_hub_device/test/support/data_case.ex | Eaftos/nerves_hub_web | ac03bd044b97265bf3ba3edd8da249d300fa3668 | [
"Apache-2.0"
] | null | null | null | apps/nerves_hub_device/test/support/data_case.ex | Eaftos/nerves_hub_web | ac03bd044b97265bf3ba3edd8da249d300fa3668 | [
"Apache-2.0"
] | null | null | null | defmodule NervesHubDevice.DataCase do
@moduledoc """
This module defines the setup for tests requiring
access to the application's data layer.
You may define functions here to be used as helpers in
your tests.
Finally, if the test case interacts with the database,
it cannot be async. For this reason, ev... | 26.425926 | 78 | 0.689559 |
93d225180bda206ffe52f69311ab7785268b1946 | 1,274 | ex | Elixir | lib/samly_howto_web/views/error_helpers.ex | chespinoza/samly_howto | 511102eecfdfd516c14abd5d0280af19f5ab19a3 | [
"MIT"
] | null | null | null | lib/samly_howto_web/views/error_helpers.ex | chespinoza/samly_howto | 511102eecfdfd516c14abd5d0280af19f5ab19a3 | [
"MIT"
] | null | null | null | lib/samly_howto_web/views/error_helpers.ex | chespinoza/samly_howto | 511102eecfdfd516c14abd5d0280af19f5ab19a3 | [
"MIT"
] | null | null | null | defmodule SamlyHowtoWeb.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_t... | 31.073171 | 79 | 0.673469 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.