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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
089f14efaa9b318930330622a2e778ceb80fe41d | 1,155 | ex | Elixir | lib/tabs_doornwindow.ex | zolihorvath/element-parsers | dc9927db1c39b8f77e4c22f10dc38f29c6a41ab9 | [
"MIT"
] | null | null | null | lib/tabs_doornwindow.ex | zolihorvath/element-parsers | dc9927db1c39b8f77e4c22f10dc38f29c6a41ab9 | [
"MIT"
] | null | null | null | lib/tabs_doornwindow.ex | zolihorvath/element-parsers | dc9927db1c39b8f77e4c22f10dc38f29c6a41ab9 | [
"MIT"
] | null | null | null | defmodule Parser do
use Platform.Parsing.Behaviour
#ELEMENT IoT Parser for TrackNet Tabs object locator
# According to documentation provided by TrackNet
# Payload Description Version v1.3
def parse(<<status, battery, temp, time::little-16, count::little-24>>, _meta) do
<<rfu::7, state::1>> = <<status>>
... | 21.388889 | 83 | 0.531602 |
089f63b89018fbd932f3ec3ca68b82c5ed341ea8 | 1,397 | ex | Elixir | test/support/data_case.ex | necosta/raspberry-pi-x | 478f49de74b03d4a652c35ef185735ca0f2f6878 | [
"MIT"
] | null | null | null | test/support/data_case.ex | necosta/raspberry-pi-x | 478f49de74b03d4a652c35ef185735ca0f2f6878 | [
"MIT"
] | null | null | null | test/support/data_case.ex | necosta/raspberry-pi-x | 478f49de74b03d4a652c35ef185735ca0f2f6878 | [
"MIT"
] | null | null | null | defmodule RaspberryPi.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, every ... | 25.87037 | 77 | 0.682892 |
089f6de2423f7a307d99ab77caff1a9925453cbb | 1,055 | ex | Elixir | lib/codes/codes_l71.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_l71.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | lib/codes/codes_l71.ex | badubizzle/icd_code | 4c625733f92b7b1d616e272abc3009bb8b916c0c | [
"Apache-2.0"
] | null | null | null | defmodule IcdCode.ICDCode.Codes_L71 do
alias IcdCode.ICDCode
def _L710 do
%ICDCode{full_code: "L710",
category_code: "L71",
short_code: "0",
full_name: "Perioral dermatitis",
short_name: "Perioral dermatitis",
category_name: "Perioral dermatitis"
}
end... | 24.534884 | 47 | 0.566825 |
089f6eca68b43b07d76f30440ef6cb471c6c49d6 | 1,110 | exs | Elixir | config/config.exs | lucacorti/copper | 1781dbdaa9b8aeda2b646537b03e74213d4abe93 | [
"MIT"
] | null | null | null | config/config.exs | lucacorti/copper | 1781dbdaa9b8aeda2b646537b03e74213d4abe93 | [
"MIT"
] | 9 | 2019-08-20T07:04:10.000Z | 2022-01-17T08:29:46.000Z | config/config.exs | lucacorti/copper | 1781dbdaa9b8aeda2b646537b03e74213d4abe93 | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the paren... | 34.6875 | 73 | 0.754054 |
089f8bd8b84f527ab91cc6a0345a0f01fb83de3b | 2,237 | ex | Elixir | clients/android_publisher/lib/google_api/android_publisher/v3/model/voided_purchases_list_response.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/android_publisher/lib/google_api/android_publisher/v3/model/voided_purchases_list_response.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/android_publisher/lib/google_api/android_publisher/v3/model/voided_purchases_list_response.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... | 42.207547 | 154 | 0.757711 |
089f95d12ad42f2d40994cd2ea27cb636a7eb5fb | 173 | ex | Elixir | test/support/rabbit_mq/test_topic_publisher.ex | djeusette/railway_ipc | 30fb58726e43148fe72fbfe63fdf46161fc933cf | [
"MIT"
] | null | null | null | test/support/rabbit_mq/test_topic_publisher.ex | djeusette/railway_ipc | 30fb58726e43148fe72fbfe63fdf46161fc933cf | [
"MIT"
] | null | null | null | test/support/rabbit_mq/test_topic_publisher.ex | djeusette/railway_ipc | 30fb58726e43148fe72fbfe63fdf46161fc933cf | [
"MIT"
] | null | null | null | defmodule RailwayIpc.RabbitMQ.TestTopicPublisher do
@moduledoc false
use RailwayIpc.Publisher, broker: RailwayIpc.RabbitMQ.TestBroker, exchange: "railway_ipc.topic"
end
| 34.6 | 97 | 0.83237 |
089f993431d8ea6e8a8085cfda8a5ddd227b0470 | 4,224 | ex | Elixir | lib/oli/delivery/attempts/activity_lifecycle/persistence.ex | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | 1 | 2022-03-17T20:35:47.000Z | 2022-03-17T20:35:47.000Z | lib/oli/delivery/attempts/activity_lifecycle/persistence.ex | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | 9 | 2021-11-02T16:52:09.000Z | 2022-03-25T15:14:01.000Z | lib/oli/delivery/attempts/activity_lifecycle/persistence.ex | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | null | null | null | defmodule Oli.Delivery.Attempts.ActivityLifecycle.Persistence do
import Ecto.Query, warn: false
alias Oli.Repo
alias Oli.Delivery.Evaluation.Actions.{
FeedbackAction,
NavigationAction,
StateUpdateAction,
SubmissionAction
}
alias Oli.Delivery.Attempts.Core.PartAttempt
@moduledoc """
Rout... | 26.904459 | 101 | 0.590199 |
089fb2b42198f4e25357e8ace79145bf54c7130c | 351 | exs | Elixir | webapp/priv/repo/seeds.exs | zmaril/penmark | 992f570da3bdf819f912505ba9b6531db9dcb80b | [
"FSFAP"
] | null | null | null | webapp/priv/repo/seeds.exs | zmaril/penmark | 992f570da3bdf819f912505ba9b6531db9dcb80b | [
"FSFAP"
] | null | null | null | webapp/priv/repo/seeds.exs | zmaril/penmark | 992f570da3bdf819f912505ba9b6531db9dcb80b | [
"FSFAP"
] | null | null | null | # Script for populating the database. You can run it as:
#
# mix run priv/repo/seeds.exs
#
# Inside the script, you can read and write to any of your
# repositories directly:
#
# Penmark.Repo.insert!(%Penmark.SomeSchema{})
#
# We recommend using the bang functions (`insert!`, `update!`
# and so on) as they will... | 29.25 | 61 | 0.706553 |
089fba09fb432a6efe6f545eb4a665eac7443b44 | 1,001 | exs | Elixir | priv/repo/migrations/20210613092643_rename_participators.exs | coderplanets/coderplanets_server | 3663e56340d6d050e974c91f7e499d8424fc25e9 | [
"Apache-2.0"
] | 240 | 2018-11-06T09:36:54.000Z | 2022-02-20T07:12:36.000Z | priv/repo/migrations/20210613092643_rename_participators.exs | coderplanets/coderplanets_server | 3663e56340d6d050e974c91f7e499d8424fc25e9 | [
"Apache-2.0"
] | 363 | 2018-07-11T03:38:14.000Z | 2021-12-14T01:42:40.000Z | priv/repo/migrations/20210613092643_rename_participators.exs | mydearxym/mastani_server | f24034a4a5449200165cf4a547964a0961793eab | [
"Apache-2.0"
] | 22 | 2019-01-27T11:47:56.000Z | 2021-02-28T13:17:52.000Z | defmodule GroupherServer.Repo.Migrations.RenameParticipators do
use Ecto.Migration
def change do
rename(table(:cms_posts), :article_comments_participators, to: :article_comments_participants)
rename(table(:cms_posts), :article_comments_participators_count,
to: :article_comments_participants_count
... | 33.366667 | 98 | 0.784216 |
089fd14bb02eed73d242ed7bc1bf9a1808d7da1d | 2,104 | exs | Elixir | apps/ewallet/test/ewallet/fetchers/transaction_request_fetcher_test.exs | amadeobrands/ewallet | 505b7822721940a7b892a9b35c225e80cc8ac0b4 | [
"Apache-2.0"
] | 1 | 2018-12-07T06:21:21.000Z | 2018-12-07T06:21:21.000Z | apps/ewallet/test/ewallet/fetchers/transaction_request_fetcher_test.exs | amadeobrands/ewallet | 505b7822721940a7b892a9b35c225e80cc8ac0b4 | [
"Apache-2.0"
] | null | null | null | apps/ewallet/test/ewallet/fetchers/transaction_request_fetcher_test.exs | amadeobrands/ewallet | 505b7822721940a7b892a9b35c225e80cc8ac0b4 | [
"Apache-2.0"
] | null | null | null | defmodule EWallet.TransactionRequestFetcherTest do
use EWallet.LocalLedgerCase, async: true
alias EWallet.{TransactionRequestFetcher, TransactionRequestGate}
alias EWalletDB.{TransactionRequest, User}
setup do
{:ok, user} = :user |> params_for() |> User.insert()
{:ok, account} = :account |> params_for(... | 32.875 | 93 | 0.675856 |
08a018b958ada2cb099521bf20b959aec810f666 | 578 | ex | Elixir | lib/gossip/application.ex | bhaveshpoddar94/GossipProtocol | 91e4c8223edd7fa2c2c7b7c2641f1d7f50d85643 | [
"MIT"
] | null | null | null | lib/gossip/application.ex | bhaveshpoddar94/GossipProtocol | 91e4c8223edd7fa2c2c7b7c2641f1d7f50d85643 | [
"MIT"
] | null | null | null | lib/gossip/application.ex | bhaveshpoddar94/GossipProtocol | 91e4c8223edd7fa2c2c7b7c2641f1d7f50d85643 | [
"MIT"
] | null | null | null | defmodule Gossip.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
# List all child processes to be supervised
children = [
# Starts a worker by calling: Gossip.Worker.start_lin... | 27.52381 | 65 | 0.707612 |
08a075cc8bffc827172d8ee84087c7d1d6369f45 | 135 | exs | Elixir | test/dot_sql_test.exs | archan937/dot_sql | 5511c76a3b7b1d90f7d80acc52025bd533410160 | [
"Unlicense",
"MIT"
] | null | null | null | test/dot_sql_test.exs | archan937/dot_sql | 5511c76a3b7b1d90f7d80acc52025bd533410160 | [
"Unlicense",
"MIT"
] | null | null | null | test/dot_sql_test.exs | archan937/dot_sql | 5511c76a3b7b1d90f7d80acc52025bd533410160 | [
"Unlicense",
"MIT"
] | null | null | null | defmodule DotSqlTest do
use ExUnit.Case
doctest DotSql
test "greets the world" do
assert DotSql.hello() == :world
end
end
| 15 | 35 | 0.703704 |
08a076a32fdc5baa9e95acfee24ee4f6df95ba3a | 1,754 | ex | Elixir | lib/simple_graphql_client/subscription_server.ex | marisradu/simple_graphql_client | 4e52d7712cc4fe003df5a5431180f35d6c2f7860 | [
"MIT"
] | 15 | 2018-10-14T23:30:56.000Z | 2021-02-20T21:49:42.000Z | lib/simple_graphql_client/subscription_server.ex | marisradu/simple_graphql_client | 4e52d7712cc4fe003df5a5431180f35d6c2f7860 | [
"MIT"
] | 1 | 2019-04-29T06:29:30.000Z | 2019-08-05T20:26:52.000Z | lib/simple_graphql_client/subscription_server.ex | marisradu/simple_graphql_client | 4e52d7712cc4fe003df5a5431180f35d6c2f7860 | [
"MIT"
] | 4 | 2019-03-14T23:07:49.000Z | 2019-08-05T18:34:37.000Z | defmodule SimpleGraphqlClient.SubscriptionServer do
@moduledoc "
Genserver that handles all subscription related logic
"
use GenServer
require Logger
alias SimpleGraphqlClient.WebSocket
def start_link do
state = %{
socket: WebSocket,
subscriptions: %{}
}
GenServer.start_link(__... | 26.575758 | 96 | 0.702965 |
08a0887972489247dcaa8551a0c3f96358059089 | 1,592 | exs | Elixir | apps/raptor/mix.exs | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | null | null | null | apps/raptor/mix.exs | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | null | null | null | apps/raptor/mix.exs | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | null | null | null | defmodule Raptor.MixProject do
use Mix.Project
def project do
[
app: :raptor,
compilers: [:phoenix] ++ Mix.compilers(),
version: "0.1.0",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elix... | 26.533333 | 89 | 0.543342 |
08a08fba7cd1c422650a99dd443e0f5834126a6d | 7,683 | ex | Elixir | clients/cloud_search/lib/google_api/cloud_search/v1/model/property_definition.ex | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"Apache-2.0"
] | null | null | null | clients/cloud_search/lib/google_api/cloud_search/v1/model/property_definition.ex | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"Apache-2.0"
] | null | null | null | clients/cloud_search/lib/google_api/cloud_search/v1/model/property_definition.ex | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 60.023438 | 183 | 0.731745 |
08a0971fb518a2abe6ab7831183dad72ef01fa2e | 5,119 | ex | Elixir | lib/dark_ecto/projections/typescript.ex | dark-elixir/dark_ecto | 006a52e6d1a807e8f3c0f00a29780dc2967e57d9 | [
"Apache-2.0"
] | null | null | null | lib/dark_ecto/projections/typescript.ex | dark-elixir/dark_ecto | 006a52e6d1a807e8f3c0f00a29780dc2967e57d9 | [
"Apache-2.0"
] | null | null | null | lib/dark_ecto/projections/typescript.ex | dark-elixir/dark_ecto | 006a52e6d1a807e8f3c0f00a29780dc2967e57d9 | [
"Apache-2.0"
] | null | null | null | defmodule DarkEcto.Projections.Typescript do
@moduledoc """
Cast `Typescript` types
"""
alias DarkEcto.Projections.Shared
alias DarkEcto.Projections.Types
alias DarkEcto.Reflections.EctoSchemaFields
alias DarkEcto.Reflections.EctoSchemaReflection
alias DarkMatter.Inflections
@ecto_mapping Map.get(T... | 29.41954 | 109 | 0.646025 |
08a0ba8dbc2f6a1b9d5b731d6795443fd91b152f | 1,449 | ex | Elixir | lib/slax_web/controllers/sprint_controller.ex | HoffsMH/slax | b91ee30b9fd71a4cb7826f50b605ce580b7c1651 | [
"MIT"
] | 11 | 2016-07-05T18:56:21.000Z | 2021-09-15T22:23:54.000Z | lib/slax_web/controllers/sprint_controller.ex | HoffsMH/slax | b91ee30b9fd71a4cb7826f50b605ce580b7c1651 | [
"MIT"
] | 181 | 2016-06-23T00:47:13.000Z | 2022-03-10T11:23:44.000Z | lib/slax_web/controllers/sprint_controller.ex | HoffsMH/slax | b91ee30b9fd71a4cb7826f50b605ce580b7c1651 | [
"MIT"
] | 7 | 2019-01-30T21:38:28.000Z | 2022-03-01T07:13:39.000Z | defmodule SlaxWeb.SprintController do
use SlaxWeb, :controller
plug(Slax.Plugs.VerifySlackToken, token: :sprint)
plug(Slax.Plugs.VerifyUser)
alias Slax.{Projects, Sprints}
def start(conn, %{"channel_name" => channel_name, "text" => "commitment " <> issue_numbers}) do
case Regex.scan(~r/\d+/, issue_numb... | 27.339623 | 97 | 0.559696 |
08a0f849f57597ff4ad048ef21e14f2fb16d0fb0 | 65,520 | ex | Elixir | lib/elixir/lib/module.ex | cdfuller/elixir | 3bd3f88d57d7fff6cab7b171294b89fb08eedfe7 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/module.ex | cdfuller/elixir | 3bd3f88d57d7fff6cab7b171294b89fb08eedfe7 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/module.ex | cdfuller/elixir | 3bd3f88d57d7fff6cab7b171294b89fb08eedfe7 | [
"Apache-2.0"
] | null | null | null | defmodule Module do
@moduledoc ~S'''
Provides functions to deal with modules during compilation time.
It allows a developer to dynamically add, delete and register
attributes, attach documentation and so forth.
After a module is compiled, using many of the functions in
this module will raise errors, since... | 32.08619 | 113 | 0.662927 |
08a10692df9bb924aa54230d88dd76934d64f8d6 | 2,474 | ex | Elixir | lib/stenotype.ex | aeturnum/stenotype | 90e7b9be60ee748ab046f46005bd17b17f1d153a | [
"Apache-2.0"
] | null | null | null | lib/stenotype.ex | aeturnum/stenotype | 90e7b9be60ee748ab046f46005bd17b17f1d153a | [
"Apache-2.0"
] | null | null | null | lib/stenotype.ex | aeturnum/stenotype | 90e7b9be60ee748ab046f46005bd17b17f1d153a | [
"Apache-2.0"
] | null | null | null | defmodule Stenotype do
alias Stenotype.Location
require Logger
defmacro __using__(_) do
quote do
require Logger
import Stenotype,
only: [
info: 1,
debug: 1,
notice: 1,
warn: 1,
error: 1,
to_s: 1,
t: 1
]
en... | 23.561905 | 72 | 0.616815 |
08a1286c8cafeea2099bfe153ac7605133268b10 | 69,698 | exs | Elixir | integration_test/cases/repo.exs | samuelpordeus/ecto | c66ab5f89ef348c7f520f427001c33d95a78bd2e | [
"Apache-2.0"
] | null | null | null | integration_test/cases/repo.exs | samuelpordeus/ecto | c66ab5f89ef348c7f520f427001c33d95a78bd2e | [
"Apache-2.0"
] | null | null | null | integration_test/cases/repo.exs | samuelpordeus/ecto | c66ab5f89ef348c7f520f427001c33d95a78bd2e | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.Integration.RepoTest do
use Ecto.Integration.Case, async: Application.get_env(:ecto, :async_integration_tests, true)
alias Ecto.Integration.TestRepo
import Ecto.Query
alias Ecto.Integration.Post
alias Ecto.Integration.Order
alias Ecto.Integration.User
alias Ecto.Integration.Comment
alia... | 38.742635 | 152 | 0.632959 |
08a160c7581d20f1321f8eded1af3f173cf2ac0c | 2,808 | ex | Elixir | lib/talib/sma.ex | buurzx/talib | 9341dafd2dc0aa14c34b659b82375723ff5a37fc | [
"MIT"
] | null | null | null | lib/talib/sma.ex | buurzx/talib | 9341dafd2dc0aa14c34b659b82375723ff5a37fc | [
"MIT"
] | null | null | null | lib/talib/sma.ex | buurzx/talib | 9341dafd2dc0aa14c34b659b82375723ff5a37fc | [
"MIT"
] | 1 | 2021-04-29T22:14:28.000Z | 2021-04-29T22:14:28.000Z | defmodule Talib.SMA do
@moduledoc ~S"""
Defines a Simple Moving Average.
## History
Version: 1.0
Source: https://qkdb.wordpress.com/2013/04/22/simple-moving-average/
Audited by:
| Name | Title |
| :----------- | :---------------- |
| | |
"""
... | 24.417391 | 77 | 0.55057 |
08a1841be4018308556af6c8b32e03a3b6bf04a1 | 4,477 | ex | Elixir | lib/trans/gen_function_migration.ex | kipcole9/trans | 5dbca7bfcff5f0153b0d5f6f6acf0420e86b2292 | [
"Apache-2.0"
] | null | null | null | lib/trans/gen_function_migration.ex | kipcole9/trans | 5dbca7bfcff5f0153b0d5f6f6acf0420e86b2292 | [
"Apache-2.0"
] | null | null | null | lib/trans/gen_function_migration.ex | kipcole9/trans | 5dbca7bfcff5f0153b0d5f6f6acf0420e86b2292 | [
"Apache-2.0"
] | null | null | null | if Code.ensure_loaded?(Ecto.Adapters.SQL) do
defmodule Mix.Tasks.Trans.Gen.TranslateFunction do
use Mix.Task
import Mix.Generator
import Mix.Ecto, except: [migrations_path: 1]
import Macro, only: [camelize: 1, underscore: 1]
@shortdoc "Generates an Ecto migration to create the translate_field da... | 29.846667 | 151 | 0.563324 |
08a187eda02701e83a15235822e0b5b410fea288 | 912 | ex | Elixir | lib/yamlix/representation_graph.ex | azatychyn/yamlix | ead7c141e7ebe108f81e19b3f6d968b52066aef4 | [
"MIT"
] | null | null | null | lib/yamlix/representation_graph.ex | azatychyn/yamlix | ead7c141e7ebe108f81e19b3f6d968b52066aef4 | [
"MIT"
] | null | null | null | lib/yamlix/representation_graph.ex | azatychyn/yamlix | ead7c141e7ebe108f81e19b3f6d968b52066aef4 | [
"MIT"
] | 1 | 2022-02-10T11:02:29.000Z | 2022-02-10T11:02:29.000Z | defmodule RepresentationGraph do
defmodule Node do
defstruct value: "", tag: "", anchor: ""
def new(list) when is_list(list) do
new_list =
Enum.map(list, fn val ->
Node.new(val)
end)
%Node{value: new_list, tag: ""}
end
def new(map) when is_map(map) do
new... | 21.209302 | 70 | 0.552632 |
08a18a1a48945e134d6495c7f33d7671c2fd50da | 1,527 | ex | Elixir | lib/rocketpay/accounts/operation.ex | ledoctah/rocketpay | ab347ad2b4cc1c2a0fa6443be0c39fd64d658c61 | [
"MIT"
] | null | null | null | lib/rocketpay/accounts/operation.ex | ledoctah/rocketpay | ab347ad2b4cc1c2a0fa6443be0c39fd64d658c61 | [
"MIT"
] | null | null | null | lib/rocketpay/accounts/operation.ex | ledoctah/rocketpay | ab347ad2b4cc1c2a0fa6443be0c39fd64d658c61 | [
"MIT"
] | null | null | null | defmodule Rocketpay.Accounts.Operation do
alias Ecto.Multi
alias Rocketpay.{Account}
def call(%{"id" => id, "value" => value}, operation) do
operation_name = account_operation_name(operation)
Multi.new()
|> Multi.run(operation_name, fn repo, _changes -> get_account(repo, id) end)
|> Multi.run(op... | 28.277778 | 88 | 0.67649 |
08a18d68247b995c79db9e833ac7000b9128d2ac | 1,329 | ex | Elixir | lib/auto_api/commands/heart_rate_command.ex | nonninz/auto-api-elixir | 53e11542043285e94bbb5a0a3b8ffff0b1b47167 | [
"MIT"
] | null | null | null | lib/auto_api/commands/heart_rate_command.ex | nonninz/auto-api-elixir | 53e11542043285e94bbb5a0a3b8ffff0b1b47167 | [
"MIT"
] | null | null | null | lib/auto_api/commands/heart_rate_command.ex | nonninz/auto-api-elixir | 53e11542043285e94bbb5a0a3b8ffff0b1b47167 | [
"MIT"
] | null | null | null | # AutoAPI
# The MIT License
#
# Copyright (c) 2018- High-Mobility GmbH (https://high-mobility.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without lim... | 45.827586 | 85 | 0.773514 |
08a197e2f6d7c66a150812d402393d3f0019639c | 13,823 | ex | Elixir | lib/kaffy_web/controllers/resource_controller.ex | zenbaku/kaffy | b03ab90cb9620232ba55e9977ac153d02186032d | [
"MIT"
] | null | null | null | lib/kaffy_web/controllers/resource_controller.ex | zenbaku/kaffy | b03ab90cb9620232ba55e9977ac153d02186032d | [
"MIT"
] | null | null | null | lib/kaffy_web/controllers/resource_controller.ex | zenbaku/kaffy | b03ab90cb9620232ba55e9977ac153d02186032d | [
"MIT"
] | null | null | null | defmodule KaffyWeb.ResourceController do
@moduledoc false
use Phoenix.Controller, namespace: KaffyWeb
use Phoenix.HTML
alias Kaffy.Pagination
def index(
conn,
%{
"context" => context,
"resource" => resource,
"c" => _target_context,
"r" => _target_resou... | 34.64411 | 98 | 0.588223 |
08a1db9a7a56fa6732d5783716aa188f797b3753 | 621 | ex | Elixir | lib/tune/config.ex | pedromtavares/tune | b95bdb5038ccb8c7ae262ef5d0803e53565e192f | [
"MIT"
] | 206 | 2020-08-23T17:50:03.000Z | 2022-03-28T04:39:01.000Z | lib/tune/config.ex | pedromtavares/tune | b95bdb5038ccb8c7ae262ef5d0803e53565e192f | [
"MIT"
] | 112 | 2020-08-21T08:26:38.000Z | 2022-03-31T06:11:06.000Z | lib/tune/config.ex | pedromtavares/tune | b95bdb5038ccb8c7ae262ef5d0803e53565e192f | [
"MIT"
] | 15 | 2020-08-25T02:30:23.000Z | 2021-12-16T14:19:35.000Z | defmodule Tune.Config do
@moduledoc """
This module is responsible for all runtime config resolution.
"""
use Vapor.Planner
dotenv()
config :web,
env([
{:port, "PORT", map: &String.to_integer/1, required: false},
{:secret_key_base, "SECRET_KEY_BASE"},
{:session_e... | 24.84 | 71 | 0.603865 |
08a20c0936ca786ebb97b584b9cb74ef9e875cde | 1,520 | ex | Elixir | clients/big_query/lib/google_api/big_query/v2/model/table_field_schema_policy_tags.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/big_query/lib/google_api/big_query/v2/model/table_field_schema_policy_tags.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/big_query/lib/google_api/big_query/v2/model/table_field_schema_policy_tags.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 32.340426 | 193 | 0.740789 |
08a20e1f3fd6d25b0be26588ce5f5e563631f47f | 2,440 | ex | Elixir | lib/genie/storage_relay.ex | jjcarstens/genie | b0b61ca5c6300508bd230a248da47aafa0278061 | [
"Apache-2.0"
] | null | null | null | lib/genie/storage_relay.ex | jjcarstens/genie | b0b61ca5c6300508bd230a248da47aafa0278061 | [
"Apache-2.0"
] | null | null | null | lib/genie/storage_relay.ex | jjcarstens/genie | b0b61ca5c6300508bd230a248da47aafa0278061 | [
"Apache-2.0"
] | null | null | null | defmodule Genie.StorageRelay do
use GenServer
@high_values ["on", "locked", :on, :locked, 1]
@low_values ["off", "unlocked", :off, :unlocked, 0]
@valid_values @high_values ++ @low_values
defguard valid_value(val) when val in @valid_values
defstruct lock: nil, lights: nil, options: nil
def start_link(o... | 28.705882 | 77 | 0.683197 |
08a21086276e1191c9edf77db9f2ba58a29534c2 | 1,545 | ex | Elixir | lib/flowex/pipes/stage.ex | antonmi/flowex | 7597e2ae1bf53033679ba65e0be13a50ad6f1e5e | [
"Apache-2.0"
] | 422 | 2017-01-20T13:38:13.000Z | 2022-02-08T14:07:11.000Z | lib/flowex/pipes/stage.ex | antonmi/flowex | 7597e2ae1bf53033679ba65e0be13a50ad6f1e5e | [
"Apache-2.0"
] | 11 | 2017-01-26T15:40:36.000Z | 2020-07-02T21:02:18.000Z | lib/flowex/pipes/stage.ex | antonmi/flowex | 7597e2ae1bf53033679ba65e0be13a50ad6f1e5e | [
"Apache-2.0"
] | 20 | 2017-01-25T07:56:00.000Z | 2021-11-29T16:19:34.000Z | defmodule Flowex.Stage do
@moduledoc "Pipes function is called here"
use GenStage
def start_link(state, opts \\ []) do
GenStage.start_link(__MODULE__, state, opts)
end
def init(opts) do
subscribe_to_with_opts = Enum.map(opts.producer_names, &{&1, max_demand: 1})
{:producer_consumer, opts, subsc... | 29.150943 | 82 | 0.630421 |
08a250172cc42f7545cc38ea39345012c9e25c2f | 1,439 | exs | Elixir | test/incident/event_store/in_memory/event_test.exs | OleMchls/incident | 220e46598719fc50d10c96e5a848080172bf6f9b | [
"MIT"
] | null | null | null | test/incident/event_store/in_memory/event_test.exs | OleMchls/incident | 220e46598719fc50d10c96e5a848080172bf6f9b | [
"MIT"
] | null | null | null | test/incident/event_store/in_memory/event_test.exs | OleMchls/incident | 220e46598719fc50d10c96e5a848080172bf6f9b | [
"MIT"
] | null | null | null | defmodule Incident.EventStore.InMemory.EventTest do
use Incident.RepoCase, async: true
alias Ecto.UUID
alias Incident.EventStore.InMemory.Event
@valid_params %{
event_id: UUID.generate(),
aggregate_id: UUID.generate(),
event_type: "SomethingHappened",
version: 1,
event_date: DateTime.utc_n... | 32.704545 | 76 | 0.66991 |
08a254c787cb679a1f57085feeeaced498ab5f92 | 772 | ex | Elixir | lib/console_web/controllers/log_controller.ex | pluralsh/console | 38a446ce1bc2f7bc3e904fcacb102d3d57835ada | [
"Apache-2.0"
] | 6 | 2021-11-17T21:10:49.000Z | 2022-02-16T19:45:28.000Z | lib/console_web/controllers/log_controller.ex | pluralsh/console | 38a446ce1bc2f7bc3e904fcacb102d3d57835ada | [
"Apache-2.0"
] | 18 | 2021-11-25T04:31:06.000Z | 2022-03-27T04:54:00.000Z | lib/console_web/controllers/log_controller.ex | pluralsh/console | 38a446ce1bc2f7bc3e904fcacb102d3d57835ada | [
"Apache-2.0"
] | null | null | null | defmodule ConsoleWeb.LogController do
use ConsoleWeb, :controller
import Console.GraphQl.Resolvers.Observability, only: [ts: 1]
plug ConsoleWeb.Rbac, permission: :operate
def download(conn, %{"repo" => repo, "q" => q, "end" => e}) do
now = Timex.now()
start = Timex.shift(now, minutes: -String.to_int... | 29.692308 | 91 | 0.619171 |
08a294a05a0a3e71148bb2314284ccc2d67cdea2 | 11,029 | exs | Elixir | lib/mix/test/mix/tasks/deps.git_test.exs | gsphanikumar/elixir | 6ca225da4e016200a462888348ff1c3feb625b78 | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/tasks/deps.git_test.exs | gsphanikumar/elixir | 6ca225da4e016200a462888348ff1c3feb625b78 | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/tasks/deps.git_test.exs | gsphanikumar/elixir | 6ca225da4e016200a462888348ff1c3feb625b78 | [
"Apache-2.0"
] | null | null | null | Code.require_file "../../test_helper.exs", __DIR__
defmodule Mix.Tasks.DepsGitTest do
use MixTest.Case
defmodule DepsOnGitApp do
def project do
[ app: :deps_on_git_app,
version: "0.1.0",
deps: [
{:deps_on_git_repo, "0.2.0", git: fixture_path("deps_on_git_repo")}
] ]
... | 30.721448 | 138 | 0.631517 |
08a29ba9fd3cbfff702eb824a31b2568fb8af7ab | 2,810 | ex | Elixir | lib/phoenix/tracker/delta_generation.ex | dolfinus/phoenix_pubsub | 69333730a1fa771014821e279263dec049f33a4c | [
"MIT"
] | null | null | null | lib/phoenix/tracker/delta_generation.ex | dolfinus/phoenix_pubsub | 69333730a1fa771014821e279263dec049f33a4c | [
"MIT"
] | null | null | null | lib/phoenix/tracker/delta_generation.ex | dolfinus/phoenix_pubsub | 69333730a1fa771014821e279263dec049f33a4c | [
"MIT"
] | null | null | null | defmodule Phoenix.Tracker.DeltaGeneration do
@moduledoc false
require Logger
alias Phoenix.Tracker.{State, Clock, Replica}
@doc """
Extracts minimal delta from generations to satisfy remote clock.
Falls back to extracting entire crdt if unable to match delta.
"""
@spec extract(State.t(), [State.delta(... | 36.493506 | 100 | 0.666904 |
08a30597db36b35c4e8f5eca4f2bcf451b7ca389 | 1,842 | ex | Elixir | lib/graft/machine.ex | cdesch/graft | fff22759d48095ffd4693f92fda7a0026d15fdb5 | [
"MIT"
] | 7 | 2021-08-29T14:38:54.000Z | 2022-02-23T10:56:35.000Z | lib/graft/machine.ex | cdesch/graft | fff22759d48095ffd4693f92fda7a0026d15fdb5 | [
"MIT"
] | 1 | 2021-11-23T21:39:31.000Z | 2021-11-23T21:39:31.000Z | lib/graft/machine.ex | cdesch/graft | fff22759d48095ffd4693f92fda7a0026d15fdb5 | [
"MIT"
] | 1 | 2021-11-23T21:27:48.000Z | 2021-11-23T21:27:48.000Z | defmodule Graft.Machine do
@moduledoc """
A behaviour module for implementing a replicated machine for the raft consensus
algorithm. Look at the `Graft` module docs for examples on how to create such
machines.
"""
use GenServer
@typedoc """
The state/data of the replicated machine (similar to the 'sta... | 24.891892 | 86 | 0.676982 |
08a3317eae5f57829422a1256c1192fb8cccbd2f | 930 | ex | Elixir | web/controllers/api/profile_controller.ex | sumanbh/phoenix-angular | 0954ce60edc95832f6bf62e54e54977c770d33c3 | [
"MIT"
] | 5 | 2017-07-01T16:08:27.000Z | 2021-04-14T12:50:31.000Z | web/controllers/api/profile_controller.ex | sumanbh/phoenix-angular | 0954ce60edc95832f6bf62e54e54977c770d33c3 | [
"MIT"
] | null | null | null | web/controllers/api/profile_controller.ex | sumanbh/phoenix-angular | 0954ce60edc95832f6bf62e54e54977c770d33c3 | [
"MIT"
] | 4 | 2017-05-08T00:57:52.000Z | 2019-05-26T23:29:38.000Z | defmodule Amazon.ProfileController do
use Amazon.Web, :controller
plug Guardian.Plug.EnsureAuthenticated, handler: Amazon.LoginController
alias Amazon.{Profile, Postgres}
alias Guardian.{Plug}
def show(conn, _params) do
current_user = Plug.current_resource(conn)
user_id = current_u... | 31 | 148 | 0.619355 |
08a37ee0c635a6773adaf6b96a88d9ece39c95e2 | 1,821 | ex | Elixir | web/controller/error.ex | access-company/testgear | 6817b5a9f782fd501c5e8c74f12a33617bec4ba8 | [
"Apache-2.0"
] | 1 | 2018-04-26T08:40:13.000Z | 2018-04-26T08:40:13.000Z | web/controller/error.ex | access-company/testgear | 6817b5a9f782fd501c5e8c74f12a33617bec4ba8 | [
"Apache-2.0"
] | 14 | 2018-04-02T09:12:03.000Z | 2019-10-08T04:43:39.000Z | web/controller/error.ex | access-company/testgear | 6817b5a9f782fd501c5e8c74f12a33617bec4ba8 | [
"Apache-2.0"
] | 2 | 2018-04-26T05:50:06.000Z | 2021-09-01T18:48:43.000Z | # Copyright(c) 2015-2021 ACCESS CO., LTD. All rights reserved.
defmodule Testgear.Controller.Error do
use Antikythera.Controller
def action_exception(_conn) do
raise "error!"
end
def action_throw(_conn) do
throw "error!"
end
def action_exit(_conn) do
exit "error!"
end
def action_timeout... | 22.207317 | 103 | 0.646348 |
08a388fb1b2a1bf81bc905ff546b0bf86936a204 | 2,866 | ex | Elixir | lib/ibanity/client.ex | ibanity/ibanity-elixir | c2e1feedbfc2376678c9db78c6365a82a654b00b | [
"MIT"
] | 3 | 2018-11-17T18:12:15.000Z | 2020-12-09T06:26:59.000Z | lib/ibanity/client.ex | ibanity/ibanity-elixir | c2e1feedbfc2376678c9db78c6365a82a654b00b | [
"MIT"
] | 2 | 2018-12-12T14:14:56.000Z | 2019-07-01T14:13:57.000Z | lib/ibanity/client.ex | ibanity/ibanity-elixir | c2e1feedbfc2376678c9db78c6365a82a654b00b | [
"MIT"
] | null | null | null | defmodule Ibanity.Client do
@moduledoc false
use Retry
alias Ibanity.{Collection, Configuration, HttpRequest}
import Ibanity.JsonDeserializer
def execute(%Ibanity.Request{} = request, method, uri_path, type \\ nil) do
case HttpRequest.build(request, method, uri_path) do
{:ok, http_request} -> exec... | 28.376238 | 127 | 0.61305 |
08a3e628623e8ec3a7fa9a347bce4660758937fa | 396 | exs | Elixir | backend/apps/students_crm_v2/priv/repo/migrations/20171228051744_create_phone.exs | KyivKrishnaAcademy/students_crm_v2 | e0ad9b3c5e52dfef5ab8f9179f3c593f935786e6 | [
"MIT"
] | null | null | null | backend/apps/students_crm_v2/priv/repo/migrations/20171228051744_create_phone.exs | KyivKrishnaAcademy/students_crm_v2 | e0ad9b3c5e52dfef5ab8f9179f3c593f935786e6 | [
"MIT"
] | 50 | 2018-07-29T09:17:35.000Z | 2019-02-26T05:23:34.000Z | backend/apps/students_crm_v2/priv/repo/migrations/20171228051744_create_phone.exs | KyivKrishnaAcademy/students_crm_v2 | e0ad9b3c5e52dfef5ab8f9179f3c593f935786e6 | [
"MIT"
] | null | null | null | defmodule StudentsCrmV2.Repo.Migrations.CreatePhone do
use Ecto.Migration
def change do
create table(:phones) do
add(:phone, :string, null: false)
add(:telegram_uid, :string)
add(:user_id, references("users"), on_delete: :delete_all)
timestamps()
end
create(index(:phones, [:p... | 22 | 64 | 0.664141 |
08a3ef37a1fe136e080b1cb6066a236464aa2e34 | 196 | exs | Elixir | test/ellie_web/controllers/page_controller_test.exs | HenkPoley/ellie | 045212b56142341fc95b79659c3ca218b0d5d282 | [
"BSD-3-Clause"
] | 377 | 2018-04-05T03:36:00.000Z | 2022-03-30T19:12:44.000Z | test/ellie_web/controllers/page_controller_test.exs | HenkPoley/ellie | 045212b56142341fc95b79659c3ca218b0d5d282 | [
"BSD-3-Clause"
] | 91 | 2018-05-24T21:56:06.000Z | 2022-02-26T03:54:04.000Z | test/ellie_web/controllers/page_controller_test.exs | HenkPoley/ellie | 045212b56142341fc95b79659c3ca218b0d5d282 | [
"BSD-3-Clause"
] | 34 | 2018-05-29T03:54:35.000Z | 2022-01-13T07:12:46.000Z | defmodule EllieWeb.PageControllerTest do
use EllieWeb.ConnCase
test "GET /", %{conn: conn} do
conn = get(conn, "/")
assert html_response(conn, 200) =~ "Welcome to Phoenix!"
end
end
| 21.777778 | 60 | 0.673469 |
08a4051669253f8a23cddd7bcfc512615f25186d | 81 | ex | Elixir | base/fc_support/lib/fc_support.ex | fleadope/freshcom | 8d5944befaa6eea8d31e5f5995939be2a1a44262 | [
"BSD-3-Clause"
] | 46 | 2018-10-13T23:18:13.000Z | 2021-08-07T07:46:51.000Z | base/fc_support/lib/fc_support.ex | fleadope/freshcom | 8d5944befaa6eea8d31e5f5995939be2a1a44262 | [
"BSD-3-Clause"
] | 25 | 2018-10-14T00:56:07.000Z | 2019-12-23T19:41:02.000Z | base/fc_support/lib/fc_support.ex | fleadope/freshcom | 8d5944befaa6eea8d31e5f5995939be2a1a44262 | [
"BSD-3-Clause"
] | 5 | 2018-12-16T04:39:51.000Z | 2020-10-01T12:17:03.000Z | defmodule FCSupport do
@moduledoc """
Documentation for FCSupport.
"""
end
| 13.5 | 30 | 0.703704 |
08a4458526d50fa27c790a8b5b0f1cb2b084c3b7 | 495 | ex | Elixir | lib/console_web/views/label_view.ex | isabella232/console-2 | d4a4aca0e11c945c9698f46cb171d4645177038a | [
"Apache-2.0"
] | null | null | null | lib/console_web/views/label_view.ex | isabella232/console-2 | d4a4aca0e11c945c9698f46cb171d4645177038a | [
"Apache-2.0"
] | 1 | 2021-04-03T09:29:31.000Z | 2021-04-03T09:29:31.000Z | lib/console_web/views/label_view.ex | isabella232/console-2 | d4a4aca0e11c945c9698f46cb171d4645177038a | [
"Apache-2.0"
] | null | null | null | defmodule ConsoleWeb.LabelView do
use ConsoleWeb, :view
alias ConsoleWeb.LabelView
def render("show.json", %{label: label}) do
render_one(label, LabelView, "label.json")
end
def render("label.json", %{label: label}) do
%{
id: label.id,
name: label.name,
organization_id: label.organ... | 22.5 | 62 | 0.672727 |
08a457b7b0dc6562c57e230711e5d325fd680ee9 | 8,726 | ex | Elixir | lib/vantagex/cryptocurrencies.ex | sbacarob/vantagex | 3d07417d3496255d7b21682e9cf6561e1431d4f8 | [
"MIT"
] | 11 | 2019-03-31T00:20:57.000Z | 2021-12-19T18:18:29.000Z | lib/vantagex/cryptocurrencies.ex | sbacarob/vantagex | 3d07417d3496255d7b21682e9cf6561e1431d4f8 | [
"MIT"
] | 12 | 2019-02-13T11:56:28.000Z | 2020-10-28T04:35:01.000Z | lib/vantagex/cryptocurrencies.ex | sbacarob/vantagex | 3d07417d3496255d7b21682e9cf6561e1431d4f8 | [
"MIT"
] | 2 | 2019-05-22T05:46:02.000Z | 2020-04-10T19:08:46.000Z | defmodule Vantagex.Cryptocurrencies do
@moduledoc """
Contains functions related to the Cryptocurrencies functions from Alpha Vantage
"""
import Vantagex.Helper
alias Vantagex.Forex
@module_id "DIGITAL_CURRENCY"
@doc """
Uses Alpha Vantage's CURRENCY_EXCHANGE_RATE function.
Added here for simplici... | 37.450644 | 165 | 0.549163 |
08a4ae578fc7b339439bd24702f6f479341a1e10 | 20,894 | ex | Elixir | lib/scenic/cache.ex | ruan-brandao/scenic | cbd8bf50c4239bb5e4ae7971bbc9850ae1f9f2b7 | [
"Apache-2.0"
] | null | null | null | lib/scenic/cache.ex | ruan-brandao/scenic | cbd8bf50c4239bb5e4ae7971bbc9850ae1f9f2b7 | [
"Apache-2.0"
] | null | null | null | lib/scenic/cache.ex | ruan-brandao/scenic | cbd8bf50c4239bb5e4ae7971bbc9850ae1f9f2b7 | [
"Apache-2.0"
] | null | null | null | #
# Created by Boyd Multerer on 2017-11-12.
# Copyright © 2017 Kry10 Industries. All rights reserved.
#
defmodule Scenic.Cache do
@moduledoc """
In memory cache for larger assets.
Static assets such as fonts, images and more tend to be relatively large compared to
other data. These assets are often used acro... | 33.217806 | 100 | 0.625012 |
08a4afa54cad25a459f2dc8cc2d9b89f1b849954 | 925 | ex | Elixir | lib/safira_web/controllers/referral_controller.ex | cesium/safira | 10dd45357c20e8afc22563f114f49ccb74008114 | [
"MIT"
] | 40 | 2018-07-04T19:13:45.000Z | 2021-12-16T23:53:43.000Z | lib/safira_web/controllers/referral_controller.ex | cesium/safira | 10dd45357c20e8afc22563f114f49ccb74008114 | [
"MIT"
] | 94 | 2018-07-25T13:13:39.000Z | 2022-02-15T04:09:42.000Z | lib/safira_web/controllers/referral_controller.ex | cesium/safira | 10dd45357c20e8afc22563f114f49ccb74008114 | [
"MIT"
] | 5 | 2018-11-26T17:19:03.000Z | 2021-02-23T08:09:37.000Z | defmodule SafiraWeb.ReferralController do
use SafiraWeb, :controller
alias Safira.Accounts
alias Safira.Contest
alias Safira.Contest.Redeem
action_fallback SafiraWeb.FallbackController
plug Safira.Authorize, :attendee
def create(conn, %{"id" => id}) do
referral = Contest.get_referral!(id)
cas... | 26.428571 | 95 | 0.655135 |
08a4b82076da28b6985f4bc342e07db7cf2d3257 | 2,307 | ex | Elixir | clients/content/lib/google_api/content/v2/model/products_custom_batch_response_entry.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/products_custom_batch_response_entry.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/products_custom_batch_response_entry.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... | 41.196429 | 200 | 0.728652 |
08a4ba8070b4c84ea255dc62032cc12cf1b8e6d2 | 9,639 | ex | Elixir | issues/deps/earmark/lib/earmark/inline.ex | vronic/programming-elixir | 4465a81cc07b31a4c03bd277520e1127dda773b2 | [
"MIT"
] | null | null | null | issues/deps/earmark/lib/earmark/inline.ex | vronic/programming-elixir | 4465a81cc07b31a4c03bd277520e1127dda773b2 | [
"MIT"
] | null | null | null | issues/deps/earmark/lib/earmark/inline.ex | vronic/programming-elixir | 4465a81cc07b31a4c03bd277520e1127dda773b2 | [
"MIT"
] | null | null | null | defmodule Earmark.Inline do
@moduledoc """
Match and render inline sequences, passing each to the
renderer.
"""
import Earmark.Helpers
alias Earmark.Context
@doc false
def convert(src, context) when is_list(src) do
convert(Enum.join(src, "\n"), context)
end
def convert(src, context) do
... | 31.093548 | 97 | 0.521942 |
08a4de85bc0d5a40e65f1ff51f1c7d673d05c85d | 3,133 | ex | Elixir | lib/akd/generator/task.ex | corroded/akd | ed15b8929b6d110552a19522f8a17edf75452e87 | [
"MIT"
] | null | null | null | lib/akd/generator/task.ex | corroded/akd | ed15b8929b6d110552a19522f8a17edf75452e87 | [
"MIT"
] | null | null | null | lib/akd/generator/task.ex | corroded/akd | ed15b8929b6d110552a19522f8a17edf75452e87 | [
"MIT"
] | null | null | null | defmodule Akd.Generator.Task do
@moduledoc """
This module handles the generation of a custom task which use `Akd.Task`.
This can either directly be called, or called through a mix task,
`mix akd.gen.task`.
This class uses EEx and Mix.Generator to fetch file contents from an eex
template and populate the i... | 29.280374 | 79 | 0.687839 |
08a4fa22b758d93ac44ce5f1bab1dcf649bc57a2 | 277 | exs | Elixir | backend_initial/priv/repo/migrations/20200126093035_create_users.exs | bego-talks/e2e-workshop | 75a1d2a691814539ddb8adfe9012483efc53cfe4 | [
"MIT"
] | 7 | 2021-05-08T13:37:05.000Z | 2022-02-16T17:54:00.000Z | backend_initial/priv/repo/migrations/20200126093035_create_users.exs | bego-talks/e2e-workshop | 75a1d2a691814539ddb8adfe9012483efc53cfe4 | [
"MIT"
] | null | null | null | backend_initial/priv/repo/migrations/20200126093035_create_users.exs | bego-talks/e2e-workshop | 75a1d2a691814539ddb8adfe9012483efc53cfe4 | [
"MIT"
] | null | null | null | defmodule TodoList.Repo.Migrations.CreateUsers do
use Ecto.Migration
def change do
create table(:users) do
add(:name, :string, null: false)
add(:password, :string, null: false)
timestamps()
end
create(unique_index(:users, :name))
end
end
| 18.466667 | 49 | 0.66065 |
08a540a4e4625ab1273fad2942626e0193d38014 | 104 | ex | Elixir | lib/ecto_mnesia/record/context/query.ex | szTheory/ecto_mnesia | 9d1fd3b2845ac3c2c12c669d68198dff9e82a322 | [
"MIT"
] | 245 | 2016-10-22T14:43:36.000Z | 2022-02-28T03:46:27.000Z | lib/ecto_mnesia/record/context/query.ex | KushanChamindu/ecto_mnesia | bc0fb46d210eb1be63bcc8f0383212f0633b8c52 | [
"MIT"
] | 80 | 2016-10-22T16:09:19.000Z | 2021-03-03T10:45:01.000Z | lib/ecto_mnesia/record/context/query.ex | KushanChamindu/ecto_mnesia | bc0fb46d210eb1be63bcc8f0383212f0633b8c52 | [
"MIT"
] | 53 | 2016-12-03T14:23:05.000Z | 2021-07-01T01:55:22.000Z | defmodule EctoMnesia.Record.Context.Query do
@moduledoc false
defstruct select: [], sources: []
end
| 20.8 | 44 | 0.75 |
08a551a5731602c75d9a850a2ee7c9ed388458ae | 3,454 | exs | Elixir | lib/elixir/test/elixir/binary/inspect_test.exs | ekosz/elixir | 62e375bc711b4072e1b68de776e96cc31f571d45 | [
"Apache-2.0"
] | 1 | 2017-10-29T16:37:08.000Z | 2017-10-29T16:37:08.000Z | lib/elixir/test/elixir/binary/inspect_test.exs | ekosz/elixir | 62e375bc711b4072e1b68de776e96cc31f571d45 | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/binary/inspect_test.exs | ekosz/elixir | 62e375bc711b4072e1b68de776e96cc31f571d45 | [
"Apache-2.0"
] | null | null | null | Code.require_file "../../test_helper", __FILE__
defmodule Binary.Inspect.AtomTest do
use ExUnit.Case, async: true
test :basic do
assert inspect(:foo) == ":foo"
end
test :empty do
assert inspect(:"") == ":\"\""
end
test :true_false_nil do
assert inspect(false) == "false"
assert inspect(tr... | 20.43787 | 116 | 0.612334 |
08a5799cbb5d5bbfbb50b1b41669e5c932f32c0f | 1,793 | exs | Elixir | mix.exs | elixir-geolix/adapter_mmdb2_precompiled | a60417be0911a203f84de6b87987724e271d8fb7 | [
"Apache-2.0"
] | null | null | null | mix.exs | elixir-geolix/adapter_mmdb2_precompiled | a60417be0911a203f84de6b87987724e271d8fb7 | [
"Apache-2.0"
] | null | null | null | mix.exs | elixir-geolix/adapter_mmdb2_precompiled | a60417be0911a203f84de6b87987724e271d8fb7 | [
"Apache-2.0"
] | null | null | null | defmodule Geolix.Adapter.MMDB2Precompiled.MixProject do
use Mix.Project
@url_github "https://github.com/elixir-geolix/adapter_mmdb2_precompiled"
def project do
[
app: :geolix_adapter_mmdb2_precompiled,
name: "Geolix Adapter: MMDB2 Precompiled",
version: "0.1.0-dev",
elixir: "~> 1.7",... | 23.906667 | 76 | 0.556609 |
08a5940d6b273a6a7267bcc6d74f5a87259e6a34 | 1,131 | exs | Elixir | config/config.exs | timCF/category | 6426b4aa25997119a8ad2332529a430c4ae617f7 | [
"MIT"
] | 1 | 2019-08-20T20:10:33.000Z | 2019-08-20T20:10:33.000Z | config/config.exs | timCF/category | 6426b4aa25997119a8ad2332529a430c4ae617f7 | [
"MIT"
] | null | null | null | config/config.exs | timCF/category | 6426b4aa25997119a8ad2332529a430c4ae617f7 | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the paren... | 36.483871 | 73 | 0.751547 |
08a59800a241a39db33e7b405b75f443b15b468d | 2,646 | exs | Elixir | lib/logger/test/logger/translator_test.exs | patrickgombert/elixir | dc4b7c89ea30a9734d9f1cbf3bb1612fada498d4 | [
"Apache-2.0"
] | null | null | null | lib/logger/test/logger/translator_test.exs | patrickgombert/elixir | dc4b7c89ea30a9734d9f1cbf3bb1612fada498d4 | [
"Apache-2.0"
] | null | null | null | lib/logger/test/logger/translator_test.exs | patrickgombert/elixir | dc4b7c89ea30a9734d9f1cbf3bb1612fada498d4 | [
"Apache-2.0"
] | 1 | 2020-12-07T08:04:16.000Z | 2020-12-07T08:04:16.000Z | defmodule Logger.TranslatorTest do
use Logger.Case
defmodule MyGenServer do
use GenServer
def handle_call(:error, _, _) do
raise "oops"
end
end
defmodule MyGenEvent do
use GenEvent
def handle_call(:error, _) do
raise "oops"
end
end
test "translates GenServer crashes"... | 25.68932 | 101 | 0.625472 |
08a5b92d447ea8187fa4e87c141d7a3bfe73af86 | 73 | ex | Elixir | web/views/coherence/layout_view.ex | franknfjr/blog_lca | 0711ad6ba6ee878045905ec58a549527ffa5e0a4 | [
"MIT"
] | null | null | null | web/views/coherence/layout_view.ex | franknfjr/blog_lca | 0711ad6ba6ee878045905ec58a549527ffa5e0a4 | [
"MIT"
] | null | null | null | web/views/coherence/layout_view.ex | franknfjr/blog_lca | 0711ad6ba6ee878045905ec58a549527ffa5e0a4 | [
"MIT"
] | null | null | null | defmodule Coherence.LayoutView do
use Login.Coherence.Web, :view
end
| 12.166667 | 33 | 0.780822 |
08a5be294315107dc3f90dcf0ff944ab8b5e0e20 | 63 | ex | Elixir | lib/readtome_web/views/home_view.ex | zephraph/readtome | 64a5f773bdc3c19d9c5ac50a04aa14e446e36c55 | [
"MIT"
] | 1 | 2021-09-05T20:54:57.000Z | 2021-09-05T20:54:57.000Z | lib/readtome_web/views/home_view.ex | zephraph/readtome | 64a5f773bdc3c19d9c5ac50a04aa14e446e36c55 | [
"MIT"
] | 17 | 2019-07-06T17:31:56.000Z | 2021-06-22T15:31:06.000Z | lib/readtome_web/views/home_view.ex | zephraph/readtome | 64a5f773bdc3c19d9c5ac50a04aa14e446e36c55 | [
"MIT"
] | 1 | 2021-03-15T20:50:27.000Z | 2021-03-15T20:50:27.000Z | defmodule ReadtomeWeb.HomeView do
use ReadtomeWeb, :view
end
| 15.75 | 33 | 0.809524 |
08a5d411199ae31af4f62df9e7eee34fa3917fc7 | 1,488 | ex | Elixir | lib/app_web/endpoint.ex | mzgajner/smena | 6c0243ae1e8d1cef6e8a8e240f0f6b703ea638c9 | [
"Unlicense"
] | null | null | null | lib/app_web/endpoint.ex | mzgajner/smena | 6c0243ae1e8d1cef6e8a8e240f0f6b703ea638c9 | [
"Unlicense"
] | null | null | null | lib/app_web/endpoint.ex | mzgajner/smena | 6c0243ae1e8d1cef6e8a8e240f0f6b703ea638c9 | [
"Unlicense"
] | null | null | null | defmodule SmenaWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :app
# 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,
key: "_app_key",
s... | 28.075472 | 97 | 0.710349 |
08a5e55057e8861c2c20beefb26c7ce580154a7d | 1,167 | ex | Elixir | apps/calgy_api/lib/calgy_api/channels/user_socket.ex | calgy/calgy | 624790f1299271010f963359a7e94097277a9ee8 | [
"MIT"
] | 1 | 2017-09-18T08:54:46.000Z | 2017-09-18T08:54:46.000Z | apps/calgy_api/lib/calgy_api/channels/user_socket.ex | calgy/calgy | 624790f1299271010f963359a7e94097277a9ee8 | [
"MIT"
] | null | null | null | apps/calgy_api/lib/calgy_api/channels/user_socket.ex | calgy/calgy | 624790f1299271010f963359a7e94097277a9ee8 | [
"MIT"
] | null | null | null | defmodule CalgyApi.UserSocket do
use Phoenix.Socket
## Channels
# channel "room:*", CalgyApi.RoomChannel
## Transports
transport :websocket, Phoenix.Transports.WebSocket
# transport :longpoll, Phoenix.Transports.LongPoll
# Socket params are passed from the client and can
# be used to verify and authe... | 30.710526 | 83 | 0.701799 |
08a5e73899ecd22a476b4e0542ed16c9692fa342 | 497 | ex | Elixir | lib/absinthe/blueprint/input/float.ex | TheRealReal/absinthe | 6eae5bc36283e58f42d032b8afd90de3ad64f97b | [
"MIT"
] | 4,101 | 2016-03-02T03:49:20.000Z | 2022-03-31T05:46:01.000Z | lib/absinthe/blueprint/input/float.ex | TheRealReal/absinthe | 6eae5bc36283e58f42d032b8afd90de3ad64f97b | [
"MIT"
] | 889 | 2016-03-02T16:06:59.000Z | 2022-03-31T20:24:12.000Z | lib/absinthe/blueprint/input/float.ex | TheRealReal/absinthe | 6eae5bc36283e58f42d032b8afd90de3ad64f97b | [
"MIT"
] | 564 | 2016-03-02T07:49:59.000Z | 2022-03-06T14:40:59.000Z | defmodule Absinthe.Blueprint.Input.Float do
@moduledoc false
alias Absinthe.Blueprint
@enforce_keys [:value]
defstruct [
:value,
:source_location,
# Added by phases
flags: %{},
schema_node: nil,
errors: []
]
@type t :: %__MODULE__{
value: float,
flags: Blueprin... | 20.708333 | 56 | 0.599598 |
08a5f345e7a0f99cb0041ea9f0dbec1995ae39aa | 1,257 | ex | Elixir | lib/solid/tag/render.ex | christopherlai/solid | c7f0553f4ce3c12b68484baff42084bee1aa640b | [
"MIT"
] | 117 | 2016-09-04T03:56:08.000Z | 2022-03-28T18:51:56.000Z | lib/solid/tag/render.ex | christopherlai/solid | c7f0553f4ce3c12b68484baff42084bee1aa640b | [
"MIT"
] | 73 | 2017-03-21T09:22:45.000Z | 2022-03-01T20:48:22.000Z | lib/solid/tag/render.ex | christopherlai/solid | c7f0553f4ce3c12b68484baff42084bee1aa640b | [
"MIT"
] | 25 | 2017-04-02T02:23:01.000Z | 2022-02-27T20:42:13.000Z | defmodule Solid.Tag.Render do
import NimbleParsec
alias Solid.Parser.{BaseTag, Argument, Literal}
@behaviour Solid.Tag
@impl true
def spec(_parser) do
space = Literal.whitespace(min: 0)
ignore(BaseTag.opening_tag())
|> ignore(string("render"))
|> ignore(space)
|> tag(Argument.argument()... | 25.653061 | 83 | 0.645982 |
08a608687ab67b55629d27bcc180f27d5a8e3ec8 | 402 | ex | Elixir | apps/snitch_api/lib/snitch_api_web/controllers/product_option_value.ex | Acrecio/avia | 54d264fc179b5b5f17d174854bdca063e1d935e9 | [
"MIT"
] | 456 | 2018-09-20T02:40:59.000Z | 2022-03-07T08:53:48.000Z | apps/snitch_api/lib/snitch_api_web/controllers/product_option_value.ex | Acrecio/avia | 54d264fc179b5b5f17d174854bdca063e1d935e9 | [
"MIT"
] | 273 | 2018-09-19T06:43:43.000Z | 2021-08-07T12:58:26.000Z | apps/snitch_api/lib/snitch_api_web/controllers/product_option_value.ex | Acrecio/avia | 54d264fc179b5b5f17d174854bdca063e1d935e9 | [
"MIT"
] | 122 | 2018-09-26T16:32:46.000Z | 2022-03-13T11:44:19.000Z | defmodule SnitchApiWeb.ProductOptionValueController do
use SnitchApiWeb, :controller
alias Snitch.Data.Model.ProductOptionValue
def update(conn, %{"id" => id} = params) do
with option_value <- ProductOptionValue.get(id),
{:ok, option_value} <- ProductOptionValue.update(option_value, params) do
... | 30.923077 | 82 | 0.733831 |
08a60ec4725c255d73765a5647f5f851b48402b6 | 1,330 | exs | Elixir | test/mat44/mat44_apply_test.exs | crertel/graphmath | 798e51d21d509e397a86d9ca855ef18a92243583 | [
"Unlicense"
] | 70 | 2015-01-07T10:13:38.000Z | 2021-09-29T05:06:14.000Z | test/mat44/mat44_apply_test.exs | crertel/graphmath | 798e51d21d509e397a86d9ca855ef18a92243583 | [
"Unlicense"
] | 28 | 2015-01-22T22:38:24.000Z | 2021-06-24T06:15:38.000Z | test/mat44/mat44_apply_test.exs | crertel/graphmath | 798e51d21d509e397a86d9ca855ef18a92243583 | [
"Unlicense"
] | 17 | 2015-01-22T18:35:41.000Z | 2020-12-24T22:42:40.000Z | defmodule GraphmathTest.Mat44.ApplyMat44 do
use ExUnit.Case
@tag :mat44
@tag :apply
test "apply( 1:1:16, {11,13,17,19} ) returns { 16400, 40400, 64400, 88400} " do
assert {164, 404, 644, 884} ==
Graphmath.Mat44.apply(
{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16},
... | 30.227273 | 88 | 0.480451 |
08a622af57af76e5cf460d30399a77d20851f28f | 16,970 | ex | Elixir | lib/simple_pool/v1/worker_behaviour_default.ex | noizu/simple_pool | 59251a3391ff82152a31626072955b95f83c18ee | [
"MIT"
] | null | null | null | lib/simple_pool/v1/worker_behaviour_default.ex | noizu/simple_pool | 59251a3391ff82152a31626072955b95f83c18ee | [
"MIT"
] | null | null | null | lib/simple_pool/v1/worker_behaviour_default.ex | noizu/simple_pool | 59251a3391ff82152a31626072955b95f83c18ee | [
"MIT"
] | null | null | null | #-------------------------------------------------------------------------------
# Author: Keith Brings
# Copyright (C) 2018 Noizu Labs, Inc. All rights reserved.
#-------------------------------------------------------------------------------
defmodule Noizu.SimplePool.WorkerBehaviourDefault do
require Logger
@t... | 48.764368 | 206 | 0.655804 |
08a62929b5aedc553ef4ba5b37e525d8016abc5b | 441 | ex | Elixir | lib/minesweeper.ex | ppatrzyk/elixir-minesweeper | 19639019ffdef6d0dd040028783b10477ccb1f83 | [
"MIT"
] | null | null | null | lib/minesweeper.ex | ppatrzyk/elixir-minesweeper | 19639019ffdef6d0dd040028783b10477ccb1f83 | [
"MIT"
] | null | null | null | lib/minesweeper.ex | ppatrzyk/elixir-minesweeper | 19639019ffdef6d0dd040028783b10477ccb1f83 | [
"MIT"
] | null | null | null | defmodule Minesweeper do
@moduledoc """
Starter application using the Scenic framework.
"""
def start(_type, _args) do
# load the viewport configuration from config
main_viewport_config = Application.get_env(:minesweeper, :viewport)
# start the application with the viewport
children = [
... | 24.5 | 71 | 0.718821 |
08a64c86cf423c4d930d1588fcb2aa2b3a2f5151 | 106 | ex | Elixir | apps/auction/lib/auction/repo.ex | mammenj/elixir-auction | 94941bb820a221e3917014919d97571784ac9388 | [
"Apache-2.0"
] | 5 | 2021-11-17T04:37:39.000Z | 2022-01-02T06:43:23.000Z | apps/auction/lib/auction/repo.ex | mammenj/elixir-auction | 94941bb820a221e3917014919d97571784ac9388 | [
"Apache-2.0"
] | 3 | 2021-05-21T21:50:11.000Z | 2021-11-21T14:34:53.000Z | apps/auction/lib/auction/repo.ex | mammenj/elixir-auction | 94941bb820a221e3917014919d97571784ac9388 | [
"Apache-2.0"
] | 2 | 2021-11-16T14:14:05.000Z | 2021-12-31T02:01:06.000Z | defmodule Auction.Repo do
use Ecto.Repo,
otp_app: :auction,
adapter: Ecto.Adapters.Postgres
end
| 17.666667 | 35 | 0.726415 |
08a663d8009a94896fd48a8ac66af55143f2ea06 | 4,373 | ex | Elixir | clients/speech/lib/google_api/speech/v1/model/recognition_config.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/speech/lib/google_api/speech/v1/model/recognition_config.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/speech/lib/google_api/speech/v1/model/recognition_config.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"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... | 65.268657 | 515 | 0.735651 |
08a687b7470b7e8d6d4619ae842d1aa59d71a9ca | 3,464 | ex | Elixir | lib/stranger_web/live/home_live.ex | Arp-G/stranger | 1c7c804b0ab4dbee4c77f1c5adf0d9d5a09aaf41 | [
"MIT"
] | 11 | 2021-01-27T17:21:00.000Z | 2021-12-07T13:02:59.000Z | lib/stranger_web/live/home_live.ex | Arp-G/stranger | 1c7c804b0ab4dbee4c77f1c5adf0d9d5a09aaf41 | [
"MIT"
] | null | null | null | lib/stranger_web/live/home_live.ex | Arp-G/stranger | 1c7c804b0ab4dbee4c77f1c5adf0d9d5a09aaf41 | [
"MIT"
] | null | null | null | defmodule StrangerWeb.HomeLive do
use StrangerWeb, :live_view
use Phoenix.HTML
alias Stranger.{Accounts, Accounts.User}
@impl Phoenix.LiveView
def mount(_params, _session, socket) do
{:ok,
socket
|> assign(%{
changeset: User.registration_changeset(%{}),
section: 0
})
|> ... | 29.862069 | 92 | 0.582852 |
08a69d6acc40b518a0f8238881d94af060a8aa65 | 3,621 | ex | Elixir | lib/baiji/auth/instance_metadata.ex | wrren/baiji | d3d9e1cad875c6e1ddb47bf52511c3a07321764a | [
"MIT"
] | null | null | null | lib/baiji/auth/instance_metadata.ex | wrren/baiji | d3d9e1cad875c6e1ddb47bf52511c3a07321764a | [
"MIT"
] | null | null | null | lib/baiji/auth/instance_metadata.ex | wrren/baiji | d3d9e1cad875c6e1ddb47bf52511c3a07321764a | [
"MIT"
] | null | null | null | defmodule Baiji.Auth.InstanceMetadata do
@moduledoc """
Derives operation authentication parameters from the local instance'
metadata
"""
use Baiji.Auth
import Baiji.Core.Utilities
# EC2 metadata endpoint
@ec2_metadata_url "http://169.254.169.254/latest/meta-data/"
# ECS task role metadata ... | 33.841121 | 119 | 0.653134 |
08a6a96b704d7e3c82c9da3174b9e21e815bc3ec | 1,093 | exs | Elixir | test/rocketlivery/users/get_test.exs | cassiofariasmachado/rockelivery | 3d88d4d8af1cdc3f2988edc69162d848009babbd | [
"MIT"
] | 1 | 2021-09-27T06:15:08.000Z | 2021-09-27T06:15:08.000Z | test/rocketlivery/users/get_test.exs | cassiofariasmachado/rockelivery | 3d88d4d8af1cdc3f2988edc69162d848009babbd | [
"MIT"
] | null | null | null | test/rocketlivery/users/get_test.exs | cassiofariasmachado/rockelivery | 3d88d4d8af1cdc3f2988edc69162d848009babbd | [
"MIT"
] | 1 | 2021-12-21T12:47:59.000Z | 2021-12-21T12:47:59.000Z | defmodule Rockelivery.Users.GetTest do
use Rockelivery.DataCase, async: true
import Rockelivery.Factory
alias Rockelivery.{Error, User}
alias Rockelivery.Users.Get
describe "by_id/1" do
test "when user exists, returns the user" do
id = "7bd9a991-014b-47e5-a06c-8bd01bee9999"
insert(:user, i... | 22.770833 | 59 | 0.504117 |
08a6bcad4c05a6980f82c5f300790e611fae44c4 | 1,125 | exs | Elixir | config/config.exs | sineed/veritaserum | 40ce475baaf2f8f95a8e51007242f9e0d23caf22 | [
"Apache-2.0"
] | 81 | 2017-05-17T20:29:29.000Z | 2022-03-06T21:11:30.000Z | config/config.exs | chingan-tsc/veritaserum | 724d4c49e188f284c9acc90ea9743bfaac6a8b55 | [
"Apache-2.0"
] | 5 | 2017-09-14T13:05:05.000Z | 2022-01-05T11:40:57.000Z | config/config.exs | chingan-tsc/veritaserum | 724d4c49e188f284c9acc90ea9743bfaac6a8b55 | [
"Apache-2.0"
] | 9 | 2017-07-21T20:05:11.000Z | 2021-10-12T15:14:57.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.290323 | 73 | 0.752889 |
08a6e708aa07e5aa34cdfac163db7151b21e3277 | 2,843 | exs | Elixir | test/vault_config_provider_test.exs | kianmeng/vault_config_provider | 97c5ca07a695a7c6a01b1249505bea8fd961eef5 | [
"MIT"
] | null | null | null | test/vault_config_provider_test.exs | kianmeng/vault_config_provider | 97c5ca07a695a7c6a01b1249505bea8fd961eef5 | [
"MIT"
] | null | null | null | test/vault_config_provider_test.exs | kianmeng/vault_config_provider | 97c5ca07a695a7c6a01b1249505bea8fd961eef5 | [
"MIT"
] | null | null | null | defmodule VaultConfigProviderTest do
use ExUnit.Case
import Mock
setup_with_mocks([
{Vaultex.Client, [], [read: fn path, _method, _credentials -> {:ok, %{"key" => "ok"}} end]}
]) do
:ok
end
describe "resolve secrets" do
test "single string path" do
assert [{:app, [some_key: "ok"]} | _] ... | 31.588889 | 95 | 0.415406 |
08a7309812dae7c7cb231f562d9e1a53c53f828f | 1,260 | exs | Elixir | mix.exs | Frameio/flock | e1b003265b6463d8228bfaaf33c14d5c6c7962cb | [
"MIT"
] | 11 | 2018-08-16T23:16:25.000Z | 2022-02-23T18:08:16.000Z | mix.exs | Frameio/flock | e1b003265b6463d8228bfaaf33c14d5c6c7962cb | [
"MIT"
] | 7 | 2019-04-03T07:29:10.000Z | 2022-02-22T12:03:01.000Z | mix.exs | Frameio/flock | e1b003265b6463d8228bfaaf33c14d5c6c7962cb | [
"MIT"
] | 4 | 2019-10-26T10:20:58.000Z | 2022-02-22T18:18:36.000Z | defmodule Herd.MixProject do
use Mix.Project
@version "0.4.3"
def project do
[
app: :herd,
version: @version,
elixir: "~> 1.7",
start_permanent: Mix.env() == :prod,
elixirc_paths: elixirc_paths(Mix.env),
deps: deps(),
package: package(),
description: descripti... | 20 | 61 | 0.564286 |
08a7425e7b64667cfb47c2347f1a3367ee862e95 | 4,760 | ex | Elixir | lib/rdf/xsd/datatypes/double.ex | pukkamustard/rdf-ex | c459d8e7fa548fdfad82643338b68decf380a296 | [
"MIT"
] | null | null | null | lib/rdf/xsd/datatypes/double.ex | pukkamustard/rdf-ex | c459d8e7fa548fdfad82643338b68decf380a296 | [
"MIT"
] | null | null | null | lib/rdf/xsd/datatypes/double.ex | pukkamustard/rdf-ex | c459d8e7fa548fdfad82643338b68decf380a296 | [
"MIT"
] | null | null | null | defmodule RDF.XSD.Double do
@moduledoc """
`RDF.XSD.Datatype` for XSD doubles.
"""
@type special_values :: :positive_infinity | :negative_infinity | :nan
@type valid_value :: float | special_values
@special_values ~W[positive_infinity negative_infinity nan]a
use RDF.XSD.Datatype.Primitive,
name: "d... | 27.514451 | 106 | 0.666597 |
08a751952f960d150bbff8c1aaf56816b61e6a43 | 323 | ex | Elixir | lib/arkecosystem/crypto/configuration/configuration.ex | whitehat/elixir-crypto | 6347868ee15c7b79676df58bef54376a8dc6fd02 | [
"MIT"
] | null | null | null | lib/arkecosystem/crypto/configuration/configuration.ex | whitehat/elixir-crypto | 6347868ee15c7b79676df58bef54376a8dc6fd02 | [
"MIT"
] | null | null | null | lib/arkecosystem/crypto/configuration/configuration.ex | whitehat/elixir-crypto | 6347868ee15c7b79676df58bef54376a8dc6fd02 | [
"MIT"
] | null | null | null | defmodule ArkEcosystem.Crypto.Configuration.Configuration do
use KVX.Bucket
def get_value(key, bucket \\ :ark_config) do
bucket = new(bucket)
get(bucket, key)
end
def set_value(key, value, bucket \\ :ark_config) do
bucket = new(bucket)
set(bucket, key, value)
get_value(key, bucket)
end
e... | 21.533333 | 60 | 0.693498 |
08a761ca7aec68df460ca6b434d382c6f1578cc4 | 2,489 | exs | Elixir | test/pile/extras/changeset_x_test.exs | brownt23/crit19 | c45c7b3ae580c193168d83144da0eeb9bc91c8a9 | [
"MIT"
] | 6 | 2019-07-16T19:31:23.000Z | 2021-06-05T19:01:05.000Z | test/pile/extras/changeset_x_test.exs | brownt23/crit19 | c45c7b3ae580c193168d83144da0eeb9bc91c8a9 | [
"MIT"
] | null | null | null | test/pile/extras/changeset_x_test.exs | brownt23/crit19 | c45c7b3ae580c193168d83144da0eeb9bc91c8a9 | [
"MIT"
] | 3 | 2020-02-24T23:38:27.000Z | 2020-08-01T23:50:17.000Z | defmodule Ecto.ChangesetXTest do
use ExUnit.Case, async: true
use Ecto.Schema
import Ecto.Changeset
alias Ecto.ChangesetX
embedded_schema do
field :field, :integer
end
def data(value), do: %__MODULE__{field: value}
# -------------Fields and Changes -----------------------------------------------... | 26.2 | 84 | 0.58417 |
08a782510d2e68e3c959e9098efeda5cdece4f71 | 1,448 | ex | Elixir | lib/geolix/adapter/mmdb2/loader.ex | coladarci/geolix | 0a0508db410732fa8a24cbcd28e44f89b1b30afa | [
"Apache-2.0"
] | null | null | null | lib/geolix/adapter/mmdb2/loader.ex | coladarci/geolix | 0a0508db410732fa8a24cbcd28e44f89b1b30afa | [
"Apache-2.0"
] | null | null | null | lib/geolix/adapter/mmdb2/loader.ex | coladarci/geolix | 0a0508db410732fa8a24cbcd28e44f89b1b30afa | [
"Apache-2.0"
] | null | null | null | defmodule Geolix.Adapter.MMDB2.Loader do
@moduledoc """
Loader module to load an MMDB2 database into Geolix.
"""
alias Geolix.Adapter.MMDB2.Reader
alias Geolix.Adapter.MMDB2.Storage
@doc """
Implementation of `Geolix.Adapter.MMDB2.load_database/1`.
Requires the parameter `:source` as the location of ... | 27.846154 | 78 | 0.668508 |
08a789bb25a1dbc359058064f1452de5a9c3c662 | 5,070 | ex | Elixir | lib/thrift/generator/binary/framed/server.ex | jparise/elixir-thrift | 99ab3da4d7776de9b0df56d9947cc9b163b55450 | [
"Apache-2.0"
] | 209 | 2015-12-19T09:56:39.000Z | 2022-03-22T04:43:16.000Z | lib/thrift/generator/binary/framed/server.ex | pinterest/elixir-thrift | cd27337a958cf4db5818d4dcbcdc274019107591 | [
"Apache-2.0"
] | 312 | 2016-01-05T04:04:58.000Z | 2021-11-15T17:59:57.000Z | lib/thrift/generator/binary/framed/server.ex | jparise/elixir-thrift | 99ab3da4d7776de9b0df56d9947cc9b163b55450 | [
"Apache-2.0"
] | 40 | 2015-12-21T19:46:03.000Z | 2022-02-10T08:34:58.000Z | defmodule Thrift.Generator.Binary.Framed.Server do
@moduledoc false
alias Thrift.AST.Function
alias Thrift.Generator.{
Service,
Utils
}
alias Thrift.Parser.FileGroup
def generate(service_module, service, file_group) do
functions =
service.functions
|> Map.values()
|> Enum.ma... | 33.576159 | 97 | 0.677712 |
08a792803c14a62bdcbc9d730b8c809a7244e299 | 3,084 | ex | Elixir | lib/toolshed/nerves.ex | amclain/toolshed | 881fd4953ce477310812e172bfced7532a2656d8 | [
"Apache-2.0"
] | null | null | null | lib/toolshed/nerves.ex | amclain/toolshed | 881fd4953ce477310812e172bfced7532a2656d8 | [
"Apache-2.0"
] | null | null | null | lib/toolshed/nerves.ex | amclain/toolshed | 881fd4953ce477310812e172bfced7532a2656d8 | [
"Apache-2.0"
] | null | null | null | if Code.ensure_loaded?(Nerves.Runtime) do
defmodule Toolshed.Nerves do
@moduledoc """
Helpers that are useful on Nerves devices
Helpers include:
* `dmesg/0` - print kernel messages
* `fw_validate/0` - marks the current image as valid (check Nerves system if supported)
* `lsmod/0` ... | 31.151515 | 114 | 0.627108 |
08a7d6c66f834de1b0ec46e2cc7b5417b348dfa9 | 1,235 | exs | Elixir | config/config.exs | mattiaslundberg/home_display | ce571e37090398cfb15a508cf9758c174efa3d5e | [
"MIT"
] | null | null | null | config/config.exs | mattiaslundberg/home_display | ce571e37090398cfb15a508cf9758c174efa3d5e | [
"MIT"
] | null | null | null | config/config.exs | mattiaslundberg/home_display | ce571e37090398cfb15a508cf9758c174efa3d5e | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
import Config
# Enable the Nerves integration with Mix
Application.start(:nerves_bootstrap)
config ... | 30.875 | 94 | 0.766802 |
08a7dc56e43026a08cd3639eb2fe374a2a6d1e22 | 1,204 | ex | Elixir | lib/banking_graph/auth/account.ex | oryono/banking | 0a49ebae5ebf93a6db0c24476a1c86c60bb72733 | [
"MIT"
] | null | null | null | lib/banking_graph/auth/account.ex | oryono/banking | 0a49ebae5ebf93a6db0c24476a1c86c60bb72733 | [
"MIT"
] | null | null | null | lib/banking_graph/auth/account.ex | oryono/banking | 0a49ebae5ebf93a6db0c24476a1c86c60bb72733 | [
"MIT"
] | null | null | null | defmodule BankingGraph.Auth.Account do
use Ecto.Schema
import Ecto.Changeset
schema "auth_accounts" do
field :password_hash, :string
field :email, :string
field :username, :string
field :password, :string, virtual: true
belongs_to :customer, BankingGraph.Banking.Customer
belongs_to :tell... | 28 | 77 | 0.697674 |
08a7eb7c78a07b5ae8a0a6b1267063a03c864d98 | 3,249 | ex | Elixir | apps/service_gather/lib/gather/extraction.ex | jdenen/hindsight | ef69b4c1a74c94729dd838a9a0849a48c9b6e04c | [
"Apache-2.0"
] | 12 | 2020-01-27T19:43:02.000Z | 2021-07-28T19:46:29.000Z | apps/service_gather/lib/gather/extraction.ex | jdenen/hindsight | ef69b4c1a74c94729dd838a9a0849a48c9b6e04c | [
"Apache-2.0"
] | 81 | 2020-01-28T18:07:23.000Z | 2021-11-22T02:12:13.000Z | apps/service_gather/lib/gather/extraction.ex | jdenen/hindsight | ef69b4c1a74c94729dd838a9a0849a48c9b6e04c | [
"Apache-2.0"
] | 10 | 2020-02-13T21:24:09.000Z | 2020-05-21T18:39:35.000Z | defmodule Gather.Extraction do
@moduledoc """
Process to wrap and manage a dataset's extraction pipeline. This is operated
like a `Task`, in that it executes and shuts down.
"""
import Events
use GenServer, restart: :transient
require Logger
use Properties, otp_app: :service_gather
use Annotated.Retry... | 30.650943 | 98 | 0.68852 |
08a80a771de9cbb247604101b5f87f56c4d00566 | 580 | exs | Elixir | priv/repo/migrations/20190123224516_create_webhook.exs | wenusch/XRPL-Webhooks | 69bce5ea891d5024911f960f4faabe6af3b2bba0 | [
"MIT"
] | 9 | 2019-02-22T10:33:28.000Z | 2021-02-27T20:26:03.000Z | priv/repo/migrations/20190123224516_create_webhook.exs | wenusch/XRPL-Webhooks | 69bce5ea891d5024911f960f4faabe6af3b2bba0 | [
"MIT"
] | 11 | 2019-04-02T19:21:25.000Z | 2022-01-05T23:22:04.000Z | priv/repo/migrations/20190123224516_create_webhook.exs | wenusch/XRPL-Webhooks | 69bce5ea891d5024911f960f4faabe6af3b2bba0 | [
"MIT"
] | 6 | 2019-03-07T15:54:30.000Z | 2020-03-26T02:33:40.000Z | defmodule Espy.Repo.Migrations.CreateWebhook do
use Ecto.Migration
def change do
create_if_not_exists table(:webhooks) do
add :hook_id, :integer
add :url, :string
add :failed_count, :integer
add :deactivated, :boolean, default: false, null: false
add :deactivate_reason, :string
... | 27.619048 | 61 | 0.686207 |
08a83245aae53d215ffdb48a0e798ebc7d87886d | 984 | ex | Elixir | lib/lucidboard/application.ex | borodark/lucidboard | 487a9a54053977ea9704121d4a6a4343012d4421 | [
"MIT"
] | 86 | 2019-01-07T20:49:04.000Z | 2021-10-02T21:15:42.000Z | lib/lucidboard/application.ex | borodark/lucidboard | 487a9a54053977ea9704121d4a6a4343012d4421 | [
"MIT"
] | 26 | 2019-03-27T12:06:52.000Z | 2020-09-20T05:21:09.000Z | lib/lucidboard/application.ex | borodark/lucidboard | 487a9a54053977ea9704121d4a6a4343012d4421 | [
"MIT"
] | 19 | 2015-01-06T19:02:49.000Z | 2020-05-25T08:54:00.000Z | defmodule Lucidboard.Application do
@moduledoc false
use Application
alias Lucidboard.LiveBoard
alias LucidboardWeb.Endpoint
def start(_type, _args) do
import Supervisor.Spec
IO.puts(banner())
children = [
supervisor(Endpoint, []),
supervisor(Lucidboard.Repo, []),
LiveBoard.re... | 25.894737 | 64 | 0.551829 |
08a847f8510c609dff8cfcbcc1bdaa8b95638c9f | 1,420 | ex | Elixir | .clext/yq.ex | peterwwillis/clinst | 0fff3e125ca3dbb1bdba2d4dde96170c8b644a1f | [
"MIT"
] | null | null | null | .clext/yq.ex | peterwwillis/clinst | 0fff3e125ca3dbb1bdba2d4dde96170c8b644a1f | [
"MIT"
] | null | null | null | .clext/yq.ex | peterwwillis/clinst | 0fff3e125ca3dbb1bdba2d4dde96170c8b644a1f | [
"MIT"
] | null | null | null | #!/usr/bin/env sh
set -eu
[ "${DEBUG:-0}" = "1" ] && set -x
### Extension-specific variables
CLINST_E_NAME="${CLINST_E_NAME:-yq}"
CLINST_E_REV="0.2.0"
CLINST_E_BIN_NAME="${CLINST_E_BIN_NAME:-$CLINST_E_NAME}"
CLINST_E_DLFILE="${CLINST_E_DLFILE:-$CLINST_E_NAME}"
CLINST_E_INSTDIR="${CLINST_E_INSTDIR:-$(pwd)}"
CLINST_E_OS... | 45.806452 | 150 | 0.672535 |
08a848b5b6ff0150d917b114928db742b9d9b4c7 | 51 | ex | Elixir | web/views/race_view.ex | openrowing/raceman2 | eee2d51c50bddf63b9c5b9b351424d4c056fa27d | [
"Apache-2.0"
] | null | null | null | web/views/race_view.ex | openrowing/raceman2 | eee2d51c50bddf63b9c5b9b351424d4c056fa27d | [
"Apache-2.0"
] | null | null | null | web/views/race_view.ex | openrowing/raceman2 | eee2d51c50bddf63b9c5b9b351424d4c056fa27d | [
"Apache-2.0"
] | null | null | null | defmodule Web.RaceView do
use Web.Web, :view
end
| 12.75 | 25 | 0.745098 |
08a868ce2e9600330b5485edc0ed67080a9d1a60 | 2,274 | ex | Elixir | lib/sparql/extension_function/extension_function.ex | pukkamustard/sparql-ex | 4f8907ddbd15215c9b6c40edac19362c92e34d91 | [
"MIT"
] | null | null | null | lib/sparql/extension_function/extension_function.ex | pukkamustard/sparql-ex | 4f8907ddbd15215c9b6c40edac19362c92e34d91 | [
"MIT"
] | null | null | null | lib/sparql/extension_function/extension_function.ex | pukkamustard/sparql-ex | 4f8907ddbd15215c9b6c40edac19362c92e34d91 | [
"MIT"
] | null | null | null | defmodule SPARQL.ExtensionFunction do
@moduledoc """
A behaviour for SPARQL extension functions.
## Examples
An extension function can be defined like this:
defmodule ExampleFunction do
use SPARQL.ExtensionFunction, name: "http://example.com/function"
def call(distinct, arguments, data... | 29.921053 | 81 | 0.694811 |
08a8a0e6ec7163f23bce5fcdf22d22b02f817c47 | 9,747 | ex | Elixir | clients/analytics/lib/google_api/analytics/v3/model/experiment.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/analytics/lib/google_api/analytics/v3/model/experiment.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/analytics/lib/google_api/analytics/v3/model/experiment.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... | 74.40458 | 444 | 0.708936 |
08a8a6c8e44534c3d11ac7e3da7ee4f37255ec58 | 279 | ex | Elixir | lib/webchat_web/controllers/page_controller.ex | Bwuak/webchat | b6668be508481a1ff480303affaebdaf28604f41 | [
"MIT"
] | null | null | null | lib/webchat_web/controllers/page_controller.ex | Bwuak/webchat | b6668be508481a1ff480303affaebdaf28604f41 | [
"MIT"
] | 1 | 2020-08-04T19:50:09.000Z | 2020-08-04T19:50:09.000Z | lib/webchat_web/controllers/page_controller.ex | Bwuak/webchat | b6668be508481a1ff480303affaebdaf28604f41 | [
"MIT"
] | null | null | null | defmodule WebchatWeb.PageController do
use WebchatWeb, :controller
def index(conn, _params) do
case conn.assigns.current_user do
nil ->
render(conn, "index.html")
_connected_user ->
conn
|> redirect(to: "/chat")
end
end
end
| 17.4375 | 38 | 0.616487 |
08a8c27f8e021aa4e4d3a434c094e791ce69341c | 2,493 | ex | Elixir | lib/advent/y2020/d08.ex | ed-flanagan/advent-of-code-solutions-elixir | ca4b62f82088e7a120699fbba9809c04c76403a6 | [
"MIT"
] | null | null | null | lib/advent/y2020/d08.ex | ed-flanagan/advent-of-code-solutions-elixir | ca4b62f82088e7a120699fbba9809c04c76403a6 | [
"MIT"
] | null | null | null | lib/advent/y2020/d08.ex | ed-flanagan/advent-of-code-solutions-elixir | ca4b62f82088e7a120699fbba9809c04c76403a6 | [
"MIT"
] | null | null | null | defmodule Advent.Y2020.D08 do
@moduledoc """
https://adventofcode.com/2020/day/8
"""
@typep instruction :: {:nop | :acc | :jmp, integer()}
@typep line_no :: non_neg_integer()
@typep instructions :: %{line_no() => instruction()}
@doc """
What value is in the accumulator?
"""
@spec part_one(Enumerab... | 25.701031 | 86 | 0.578018 |
08a8f1fe1fabf10b3b573d7e5bc194134a474057 | 1,481 | exs | Elixir | config/config.exs | madnificent/mu-elixir-cache | c86717907b113d593966b3b2e1e86a8e530fe0bb | [
"MIT"
] | null | null | null | config/config.exs | madnificent/mu-elixir-cache | c86717907b113d593966b3b2e1e86a8e530fe0bb | [
"MIT"
] | null | null | null | config/config.exs | madnificent/mu-elixir-cache | c86717907b113d593966b3b2e1e86a8e530fe0bb | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
defmodule CH do
def system_boolean(name) do
case String.downcase(System.get_env(name) || "") do
"true" -> true
"yes" -> true
"1" -> true
"on" -> true
... | 31.510638 | 73 | 0.725861 |
08a93e0800f38293862a9caabeb47d877731df95 | 417 | exs | Elixir | test/mappers_web/views/error_view_test.exs | evandiewald/mappers | 7359cfb39a4d9d26c42f5917ee04a7e41d3291bc | [
"Apache-2.0"
] | 32 | 2021-04-22T01:55:31.000Z | 2022-02-25T13:17:21.000Z | test/mappers_web/views/error_view_test.exs | evandiewald/mappers | 7359cfb39a4d9d26c42f5917ee04a7e41d3291bc | [
"Apache-2.0"
] | 58 | 2021-06-04T18:42:59.000Z | 2022-03-31T07:17:01.000Z | test/mappers_web/views/error_view_test.exs | evandiewald/mappers | 7359cfb39a4d9d26c42f5917ee04a7e41d3291bc | [
"Apache-2.0"
] | 13 | 2021-04-10T06:09:15.000Z | 2022-03-23T13:07:37.000Z | defmodule MappersWeb.ErrorViewTest do
use MappersWeb.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(MappersWeb.ErrorView, "404.html", []) == "Not Found"
end
test "renders 500.html" do
as... | 27.8 | 92 | 0.733813 |
08a947d98529153e00bfd9c4ff99d408604ec644 | 5,630 | ex | Elixir | lib/plug_cache_control.ex | krasenyp/plug_cache_control | e179b96cc02df92ff53c891ec625b5b5e824448a | [
"Apache-2.0"
] | 6 | 2021-11-05T21:35:57.000Z | 2021-11-12T01:31:20.000Z | lib/plug_cache_control.ex | krasenyp/plug_cache_control | e179b96cc02df92ff53c891ec625b5b5e824448a | [
"Apache-2.0"
] | 4 | 2021-11-06T17:05:30.000Z | 2022-01-15T13:16:48.000Z | lib/plug_cache_control.ex | krasenyp/plug_cache_control | e179b96cc02df92ff53c891ec625b5b5e824448a | [
"Apache-2.0"
] | null | null | null | defmodule PlugCacheControl do
@moduledoc """
A plug + helpers for overwriting the default `cache-control` header. The plug
supports all the response header directives defined in [RFC7234, section
5.2.2](https://datatracker.ietf.org/doc/html/rfc7234#section-5.2.2).
## Header directives
The `PlugCacheContro... | 37.039474 | 93 | 0.712966 |
08a95226a9d9f81dee1bf2f0911b866a5756ba17 | 944 | exs | Elixir | apps/donut_web/config/config.exs | ZURASTA/donut | b0546c041601e619e76c10d1d2ce62fe5d1701a4 | [
"BSD-2-Clause"
] | null | null | null | apps/donut_web/config/config.exs | ZURASTA/donut | b0546c041601e619e76c10d1d2ce62fe5d1701a4 | [
"BSD-2-Clause"
] | null | null | null | apps/donut_web/config/config.exs | ZURASTA/donut | b0546c041601e619e76c10d1d2ce62fe5d1701a4 | [
"BSD-2-Clause"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
use Mix.Config
# General application configuration
config :donut_web,
namespace: Donut.Web
# Co... | 29.5 | 88 | 0.745763 |
08a96b8532cc92236b4507103c794c9860860b43 | 1,401 | exs | Elixir | test/layers/builder_queries/aggregate/aggregate_group_avg_test.exs | haskric/mongo_agile | 393e1e96f706e3580f6bac9ff7bcc081b0a2e4eb | [
"MIT"
] | 1 | 2020-12-30T18:30:32.000Z | 2020-12-30T18:30:32.000Z | test/layers/builder_queries/aggregate/aggregate_group_avg_test.exs | haskric/mongo_agile | 393e1e96f706e3580f6bac9ff7bcc081b0a2e4eb | [
"MIT"
] | null | null | null | test/layers/builder_queries/aggregate/aggregate_group_avg_test.exs | haskric/mongo_agile | 393e1e96f706e3580f6bac9ff7bcc081b0a2e4eb | [
"MIT"
] | null | null | null | defmodule MongoAgile.BuilderQueries.Aggregate.Groupavg.Test do
@moduledoc false
@doc """
I would like a style... similar this... (stage -> map)
aggregate "avg_views",
match: %{},
group: %{
"_id" => nil,
"avg_views" => %{
"$avg" => "$views"
}
}
But maybe it´s more flexib... | 19.458333 | 64 | 0.538901 |
08a981480253b58e113bef1cca533317e7e73fef | 1,830 | ex | Elixir | lib/flawless/error.ex | colinsmetz/flawless | 87fd76f88758f16b42813b1e0f0f0ee8163d9185 | [
"MIT"
] | null | null | null | lib/flawless/error.ex | colinsmetz/flawless | 87fd76f88758f16b42813b1e0f0f0ee8163d9185 | [
"MIT"
] | null | null | null | lib/flawless/error.ex | colinsmetz/flawless | 87fd76f88758f16b42813b1e0f0f0ee8163d9185 | [
"MIT"
] | null | null | null | defmodule Flawless.Error do
@moduledoc """
Provides the Error struct, and helpers for building and converting errors.
"""
defstruct context: [], message: ""
alias Flawless.Context
import Flawless.Utils.Interpolation, only: [sigil_t: 2]
@type t_message :: String.t() | {String.t() | list(), Keyword.t()} ... | 27.727273 | 87 | 0.636612 |
08a99926e8314ac79c2d40e088994212aa93fcd7 | 1,850 | exs | Elixir | clients/real_time_bidding/mix.exs | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"Apache-2.0"
] | null | null | null | clients/real_time_bidding/mix.exs | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"Apache-2.0"
] | null | null | null | clients/real_time_bidding/mix.exs | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 27.61194 | 108 | 0.660541 |
08a9e315a3d28db129f72a5c6d4eeb55c3d04e9d | 2,126 | exs | Elixir | mix.exs | MaxG88/teslamate | 1456fa86fc6030e4beea8cd4a8fee45c3d7d636f | [
"MIT"
] | null | null | null | mix.exs | MaxG88/teslamate | 1456fa86fc6030e4beea8cd4a8fee45c3d7d636f | [
"MIT"
] | null | null | null | mix.exs | MaxG88/teslamate | 1456fa86fc6030e4beea8cd4a8fee45c3d7d636f | [
"MIT"
] | null | null | null | defmodule TeslaMate.MixProject do
use Mix.Project
def project do
[
app: :teslamate,
version: "1.19.0-dev",
elixir: "~> 1.10",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
start_permanent: Mix.env() == :prod,
aliases: alia... | 25.011765 | 71 | 0.488711 |
08aa05acc81adcc71dbfaa612625523f33adf403 | 2,630 | ex | Elixir | tree/dfs_traversal.ex | codecakes/elixir_days | 66fab751eef5bceff1ddf895f77464f3a9284bdf | [
"MIT"
] | null | null | null | tree/dfs_traversal.ex | codecakes/elixir_days | 66fab751eef5bceff1ddf895f77464f3a9284bdf | [
"MIT"
] | null | null | null | tree/dfs_traversal.ex | codecakes/elixir_days | 66fab751eef5bceff1ddf895f77464f3a9284bdf | [
"MIT"
] | null | null | null | defmodule Tree do
defstruct [:left, :right, :root]
end
defmodule MatchNullTraverse do
require Tree
defmacro __using__(_) do
Enum.map ~w(preorder inorder postorder), fn func ->
quote do
def unquote(:"#{func}")(%Tree{root: nil}), do: []
def unquote(:"#{f... | 35.066667 | 139 | 0.470342 |
08aa0e81de338b3ba68e25ab069beceb23e770d8 | 811 | ex | Elixir | getting-started/lib/getting_started_elixir_web/views/book_view.ex | renovate-bot/elixir-samples | 91da795ecdfac83eb6fcac63bc532da98c69d520 | [
"Apache-2.0"
] | 274 | 2017-08-25T06:39:51.000Z | 2022-03-15T21:03:27.000Z | getting-started/lib/getting_started_elixir_web/views/book_view.ex | renovate-bot/elixir-samples | 91da795ecdfac83eb6fcac63bc532da98c69d520 | [
"Apache-2.0"
] | 15 | 2017-10-03T17:05:48.000Z | 2021-11-23T00:33:23.000Z | getting-started/lib/getting_started_elixir_web/views/book_view.ex | renovate-bot/elixir-samples | 91da795ecdfac83eb6fcac63bc532da98c69d520 | [
"Apache-2.0"
] | 42 | 2017-08-28T20:08:47.000Z | 2022-01-18T07:51:02.000Z | defmodule GettingStartedElixirWeb.BookView do
use GettingStartedElixirWeb, :view
def book_title(%{properties: %{"title" => %{value: title}}}), do: title
def book_title(%{title: title}), do: title
def book_title(_), do: "Unknown"
def book_published_date(%{properties: %{"published_date" => %{value: date}}}), ... | 40.55 | 97 | 0.704069 |
08aa3007d06940a251c45fe635bdc560ad9d16c4 | 591 | ex | Elixir | talks-articles/languages-n-runtimes/elixir/book--programming-elixir-ge-1.6/sequence17/lib/stack/server.ex | abhishekkr/tutorials_as_code | f355dc62a5025b710ac6d4a6ac2f9610265fad54 | [
"MIT"
] | 37 | 2015-02-01T23:16:39.000Z | 2021-12-22T16:50:48.000Z | talks-articles/languages-n-runtimes/elixir/book--programming-elixir-ge-1.6/sequence17/lib/stack/server.ex | abhishekkr/tutorials_as_code | f355dc62a5025b710ac6d4a6ac2f9610265fad54 | [
"MIT"
] | 1 | 2017-03-02T04:55:48.000Z | 2018-01-14T10:51:11.000Z | talks-articles/languages-n-runtimes/elixir/book--programming-elixir-ge-1.6/sequence17/lib/stack/server.ex | abhishekkr/tutorials_as_code | f355dc62a5025b710ac6d4a6ac2f9610265fad54 | [
"MIT"
] | 15 | 2015-03-02T08:09:01.000Z | 2021-06-10T03:25:41.000Z | defmodule Stack.Server do
use GenServer
alias Stack.Impl
#### GenServer implementation
def init(list), do: {:ok, list}
def handle_call(:pop, _from, list) do
{val, new_list} = Impl.pop(list)
{:reply, val, new_list}
end
def handle_cast({:push, elem}, list), do: {:noreply, Impl.push(elem, list)}
... | 24.625 | 77 | 0.646362 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.