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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3380235115cc2c0c69efa4214679db3d8818bbcf | 1,519 | ex | Elixir | Next_Level_Week_4/rocketpay/lib/rocketpay/accounts/operration.ex | amaziero/next-level-weeek-1 | 2269252f6a7294a82a28aade4404770fb3c438e8 | [
"MIT"
] | null | null | null | Next_Level_Week_4/rocketpay/lib/rocketpay/accounts/operration.ex | amaziero/next-level-weeek-1 | 2269252f6a7294a82a28aade4404770fb3c438e8 | [
"MIT"
] | 2 | 2020-07-19T20:12:50.000Z | 2021-02-23T00:47:46.000Z | Next_Level_Week_4/rocketpay/lib/rocketpay/accounts/operration.ex | amaziero/next-level-weeek-1 | 2269252f6a7294a82a28aade4404770fb3c438e8 | [
"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)
|> ... | 29.211538 | 88 | 0.651745 |
33802f4c7530c643ed2af44b04f8d988e95f1554 | 1,980 | ex | Elixir | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_reidentify_content_response.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_reidentify_content_response.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_reidentify_content_response.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... | 38.823529 | 144 | 0.769192 |
3380336c806d9112d7f876411943c6e77cac3c78 | 517 | ex | Elixir | lib/adyen_checkout_ex/model/mol_pay_details.ex | rsystem-se/adyen_checkout_ex | 4210f1c7150152e81f350dc6ca55aeb19665b85b | [
"MIT"
] | 1 | 2021-05-30T20:45:10.000Z | 2021-05-30T20:45:10.000Z | lib/adyen_checkout_ex/model/mol_pay_details.ex | rsystem-se/adyen_checkout_ex | 4210f1c7150152e81f350dc6ca55aeb19665b85b | [
"MIT"
] | null | null | null | lib/adyen_checkout_ex/model/mol_pay_details.ex | rsystem-se/adyen_checkout_ex | 4210f1c7150152e81f350dc6ca55aeb19665b85b | [
"MIT"
] | null | null | null | # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://openapi-generator.tech
# Do not edit the class manually.
defmodule AdyenCheckoutEx.Model.MolPayDetails do
@moduledoc """
"""
@derive [Poison.Encoder]
defstruct [
:"issuer",
:"type"
]
@type t :... | 18.464286 | 91 | 0.67118 |
3380385fc4d7e3c28df5ac3e314a38ecb54900e5 | 18,651 | ex | Elixir | clients/dfa_reporting/lib/google_api/dfa_reporting/v34/model/creative_asset.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/dfa_reporting/lib/google_api/dfa_reporting/v34/model/creative_asset.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/dfa_reporting/lib/google_api/dfa_reporting/v34/model/creative_asset.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... | 96.139175 | 1,803 | 0.734277 |
33804ebc337e6cf1d0e7c2dcd64fdc25bee9273a | 21,987 | exs | Elixir | test/lib/ex_aws/sqs/parser_test.exs | Frameio/ex_aws | 3b335b6ed7932b5cf991323d26cf5497e1e6c122 | [
"Unlicense",
"MIT"
] | null | null | null | test/lib/ex_aws/sqs/parser_test.exs | Frameio/ex_aws | 3b335b6ed7932b5cf991323d26cf5497e1e6c122 | [
"Unlicense",
"MIT"
] | null | null | null | test/lib/ex_aws/sqs/parser_test.exs | Frameio/ex_aws | 3b335b6ed7932b5cf991323d26cf5497e1e6c122 | [
"Unlicense",
"MIT"
] | null | null | null | defmodule ExAws.SQS.ParserTest do
use ExUnit.Case, async: true
import Support.ParserHelpers
alias ExAws.SQS.Parsers
test "#parsing a list queue response" do
rsp = """
<ListQueuesResponse>
<ListQueuesResult>
<QueueUrl>http://sqs.us-east-1.amazonaws.com/123456789012/testQueue</QueueUrl>
... | 39.2625 | 475 | 0.667531 |
3380593e22603de91497bc0a8d7aea2003f8ce86 | 7,711 | ex | Elixir | lib/xqlite/pragma.ex | OvermindDL1/xqlite | 987f11e4ba9134239d1fe1a2cfc55f49090a72be | [
"MIT"
] | null | null | null | lib/xqlite/pragma.ex | OvermindDL1/xqlite | 987f11e4ba9134239d1fe1a2cfc55f49090a72be | [
"MIT"
] | null | null | null | lib/xqlite/pragma.ex | OvermindDL1/xqlite | 987f11e4ba9134239d1fe1a2cfc55f49090a72be | [
"MIT"
] | null | null | null | defmodule Xqlite.Pragma do
@moduledoc ~S"""
Deals with [Sqlite pragmas](https://www.sqlite.org/pragma.html).
"""
import Xqlite, only: [int2bool: 1, is_conn: 1]
@doc """
Given the contents of the `https://www.sqlite.org/pragma.html` URL passed to this
function, retrieve a list of supported sqlite3 pragma... | 29.319392 | 95 | 0.65426 |
3380625078dd44b0e416f8dc6f71d51825d04c1b | 2,528 | exs | Elixir | mix.exs | WeLightProject/WeLight-Portal | 6e701469423e3a62affdc415c4e8c186d603d324 | [
"MIT"
] | 2 | 2021-02-12T09:21:56.000Z | 2021-02-22T08:52:20.000Z | mix.exs | WeLightProject/WeLight-Portal | 6e701469423e3a62affdc415c4e8c186d603d324 | [
"MIT"
] | 4 | 2021-02-22T08:53:43.000Z | 2021-06-09T09:24:46.000Z | mix.exs | WeLightProject/WeLight-Portal | 6e701469423e3a62affdc415c4e8c186d603d324 | [
"MIT"
] | null | null | null | defmodule SuperIssuer.MixProject do
use Mix.Project
def project do
[
app: :super_issuer,
version: "0.1.0",
elixir: "~> 1.7",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
start_permanent: Mix.env() == :prod,
aliases: alias... | 28.404494 | 92 | 0.545886 |
338074cdb185abcb6bf83f4a2bed3637f2a91af7 | 2,268 | ex | Elixir | lib/websocket/websocket_handler.ex | sivsushruth/consolex | 297c2c86d95f6701f7150a19c427b620010099df | [
"MIT"
] | 128 | 2016-04-18T04:09:13.000Z | 2022-02-01T06:28:30.000Z | lib/websocket/websocket_handler.ex | sivsushruth/consolex | 297c2c86d95f6701f7150a19c427b620010099df | [
"MIT"
] | 7 | 2016-04-26T15:49:48.000Z | 2017-04-16T13:14:53.000Z | lib/websocket/websocket_handler.ex | sivsushruth/consolex | 297c2c86d95f6701f7150a19c427b620010099df | [
"MIT"
] | 10 | 2016-04-19T21:27:47.000Z | 2020-02-27T01:00:44.000Z | defmodule Consolex.WebSocketHandler do
@behaviour :cowboy_websocket_handler
def init({_tcp, _http}, _req, _opts) do
{:upgrade, :protocol, :cowboy_websocket}
end
def reply(server, msg) do
send(server, {:reply, msg})
end
def websocket_init(_TransportName, req, _opts) do
{:ok, req, {:pid, self()... | 28.35 | 91 | 0.588183 |
33807ae9c54c5668f44043bdc9cef151c1f9fb18 | 1,342 | exs | Elixir | test/membrane/integration/sync_test/ticking_pace.exs | vKxni/membrane_core | d14a67304b63706d6df520fa306dd2fda147c07c | [
"Apache-2.0"
] | null | null | null | test/membrane/integration/sync_test/ticking_pace.exs | vKxni/membrane_core | d14a67304b63706d6df520fa306dd2fda147c07c | [
"Apache-2.0"
] | null | null | null | test/membrane/integration/sync_test/ticking_pace.exs | vKxni/membrane_core | d14a67304b63706d6df520fa306dd2fda147c07c | [
"Apache-2.0"
] | null | null | null | defmodule Membrane.Integration.SyncTest.TickingPace do
use ExUnit.Case, async: false
alias Membrane.{Testing, Time}
alias Membrane.Support.Sync
@tag :long_running
test "Ratio modifies ticking pace correctly" do
tick_interval = 100
tries = 300
ratio_error = 0.1
actual_report_interval = 100
... | 27.958333 | 86 | 0.654993 |
3380809d16d09da1d74c217c8a7fcc4efc2d105f | 892 | ex | Elixir | clients/cloud_identity/lib/google_api/cloud_identity/v1/metadata.ex | corp-momenti/elixir-google-api | fe1580e305789ab2ca0741791b8ffe924bd3240c | [
"Apache-2.0"
] | null | null | null | clients/cloud_identity/lib/google_api/cloud_identity/v1/metadata.ex | corp-momenti/elixir-google-api | fe1580e305789ab2ca0741791b8ffe924bd3240c | [
"Apache-2.0"
] | null | null | null | clients/cloud_identity/lib/google_api/cloud_identity/v1/metadata.ex | corp-momenti/elixir-google-api | fe1580e305789ab2ca0741791b8ffe924bd3240c | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 33.037037 | 74 | 0.761211 |
3380c972110171b888faea2d7e470bed140b401b | 1,781 | exs | Elixir | test/phoenix_client_ssl/plug/common_name_whitelist_test.exs | Prato/phoenix-client-ssl | 510c2381e6d95c9baa6de9985d86d0a5dfe27b29 | [
"MIT"
] | 17 | 2017-12-01T09:12:41.000Z | 2021-04-16T07:53:37.000Z | test/phoenix_client_ssl/plug/common_name_whitelist_test.exs | Prato/phoenix-client-ssl | 510c2381e6d95c9baa6de9985d86d0a5dfe27b29 | [
"MIT"
] | 2 | 2018-01-29T13:04:26.000Z | 2018-05-24T11:03:55.000Z | test/phoenix_client_ssl/plug/common_name_whitelist_test.exs | Prato/phoenix-client-ssl | 510c2381e6d95c9baa6de9985d86d0a5dfe27b29 | [
"MIT"
] | 6 | 2018-05-24T07:42:22.000Z | 2020-11-14T17:41:35.000Z | defmodule PhoenixClientSsl.Plug.CommonNameWhitelistTest do
@moduledoc false
use ExUnit.Case
alias PhoenixClientSsl.Plug.CommonNameWhitelist
alias Plug.Conn
doctest CommonNameWhitelist
defp send_and_return(conn, reason) do
send(self(), reason)
conn
end
describe "init/1" do
test "config w... | 27.828125 | 77 | 0.686131 |
3380ed82a64758c08aa1c6c25abbc23be0e0f562 | 970 | ex | Elixir | lib/text_based_fps/cli/utils.ex | guisehn/elixir-text-based-fps | 59a815da337309297f8b42ef3481277dd4d9b371 | [
"MIT"
] | 1 | 2022-03-02T12:18:07.000Z | 2022-03-02T12:18:07.000Z | lib/text_based_fps/cli/utils.ex | guisehn/elixir-text-based-fps | 59a815da337309297f8b42ef3481277dd4d9b371 | [
"MIT"
] | 12 | 2021-05-31T21:41:09.000Z | 2021-07-30T03:18:09.000Z | lib/text_based_fps/cli/utils.ex | guisehn/elixir-text-based-fps | 59a815da337309297f8b42ef3481277dd4d9b371 | [
"MIT"
] | null | null | null | defmodule TextBasedFPS.CLI.Utils do
def set_cookie(%{cookie: cookie}) do
Node.set_cookie(Node.self(), String.to_atom(cookie))
end
def set_cookie(_), do: nil
def get_hostname(%{local_network: true}), do: get_private_ipaddr()
@doc """
Returns private IP address (e.g. 192.168.0.41)
"""
@spec get_pri... | 24.871795 | 68 | 0.630928 |
3380fe843f89574bb924b39fbe900f635a07b844 | 596 | ex | Elixir | apps/rtmp/lib/rtmp/protocol/messages/acknowledgement.ex | tiensonqin/elixir-media-libs | 87f17e2b23bf8380e785423652910bfa7d3bb47c | [
"MIT"
] | null | null | null | apps/rtmp/lib/rtmp/protocol/messages/acknowledgement.ex | tiensonqin/elixir-media-libs | 87f17e2b23bf8380e785423652910bfa7d3bb47c | [
"MIT"
] | null | null | null | apps/rtmp/lib/rtmp/protocol/messages/acknowledgement.ex | tiensonqin/elixir-media-libs | 87f17e2b23bf8380e785423652910bfa7d3bb47c | [
"MIT"
] | null | null | null | defmodule Rtmp.Protocol.Messages.Acknowledgement do
@moduledoc """
Sent when the client or the server receives bytes equal to the window
size.
Contains the number of bytes received so far (sequence number)
"""
@behaviour Rtmp.Protocol.RawMessage
@type t :: %__MODULE__{}
defstruct sequence_number: 0... | 21.285714 | 71 | 0.718121 |
33810b0665c7b060093e021cad3b6f370cb93806 | 1,357 | ex | Elixir | lib/bolt/consumer/user_update.ex | CyberFlameGO/bolt | 225e6276983bec646e7f13519df066e8e1e770ed | [
"ISC"
] | 31 | 2018-12-06T23:12:33.000Z | 2022-03-29T18:34:25.000Z | lib/bolt/consumer/user_update.ex | CyberFlameGO/bolt | 225e6276983bec646e7f13519df066e8e1e770ed | [
"ISC"
] | 18 | 2021-06-14T19:03:26.000Z | 2022-03-15T17:46:22.000Z | lib/bolt/consumer/user_update.ex | CyberFlameGO/bolt | 225e6276983bec646e7f13519df066e8e1e770ed | [
"ISC"
] | 4 | 2018-11-07T18:52:28.000Z | 2022-03-16T00:14:38.000Z | defmodule Bolt.Consumer.UserUpdate do
@moduledoc "Handles the `USER_UPDATE` event."
alias Bolt.{Helpers, Humanizer, ModLog}
alias Nostrum.Cache.GuildCache
alias Nostrum.Struct.User
@spec handle(User.t(), User.t()) :: ModLog.on_emit()
def handle(old_user, new_user) do
difference_list = [
describe... | 29.5 | 98 | 0.632277 |
338114e23fa20f81c3f150fa42b96562eeee90f6 | 2,162 | exs | Elixir | test/xdr/ledger/signer_test.exs | kommitters/stellar_base | cf36723d5add4fead1029526230299def68048fe | [
"MIT"
] | 3 | 2021-08-17T20:32:45.000Z | 2022-03-13T20:26:02.000Z | test/xdr/ledger/signer_test.exs | kommitters/stellar_base | cf36723d5add4fead1029526230299def68048fe | [
"MIT"
] | 45 | 2021-08-12T20:19:41.000Z | 2022-03-27T21:00:10.000Z | test/xdr/ledger/signer_test.exs | kommitters/stellar_base | cf36723d5add4fead1029526230299def68048fe | [
"MIT"
] | 2 | 2021-09-22T23:11:13.000Z | 2022-01-23T03:19:11.000Z | defmodule StellarBase.XDR.Ledger.SignerTest do
use ExUnit.Case
alias StellarBase.XDR.{AccountID, PublicKey, PublicKeyType, SignerKey, SignerKeyType, UInt256}
alias StellarBase.XDR.Ledger.Signer
alias StellarBase.StrKey
describe "Ledger Signer" do
setup do
pk_type = PublicKeyType.new(:PUBLIC_KEY_TY... | 33.78125 | 98 | 0.629972 |
3381513a65df3fd558b62efd818ad6ae61216700 | 2,978 | ex | Elixir | lib/battle_box/user.ex | GrantJamesPowell/battle_box | 301091955b68cd4672f6513d645eca4e3c4e17d0 | [
"Apache-2.0"
] | 2 | 2020-10-17T05:48:49.000Z | 2020-11-11T02:34:15.000Z | lib/battle_box/user.ex | FlyingDutchmanGames/battle_box | 301091955b68cd4672f6513d645eca4e3c4e17d0 | [
"Apache-2.0"
] | 3 | 2020-05-18T05:52:21.000Z | 2020-06-09T07:24:14.000Z | lib/battle_box/user.ex | FlyingDutchmanGames/battle_box | 301091955b68cd4672f6513d645eca4e3c4e17d0 | [
"Apache-2.0"
] | null | null | null | defmodule BattleBox.User do
use Ecto.Schema
alias BattleBox.{Repo, Bot, Arena, ApiKey}
alias BattleBoxWeb.Router.Helpers, as: Routes
alias BattleBoxWeb.Endpoint
import Ecto.Changeset
import BattleBox.Utilities.UserIdentifierValidation, only: [validate_user_identifer: 2]
@system_username "Botskrieg"
@an... | 34.229885 | 97 | 0.692411 |
33815d76afbf407e5ab47a8ce57a47e658facae6 | 662 | exs | Elixir | solutions/elixir/pe_001_02.exs | hakutsuru/euler_001 | e352801ffdc4e28255c3168d392f0acf5e989bfb | [
"MIT"
] | null | null | null | solutions/elixir/pe_001_02.exs | hakutsuru/euler_001 | e352801ffdc4e28255c3168d392f0acf5e989bfb | [
"MIT"
] | null | null | null | solutions/elixir/pe_001_02.exs | hakutsuru/euler_001 | e352801ffdc4e28255c3168d392f0acf5e989bfb | [
"MIT"
] | null | null | null | # Project Euler <https://projecteuler.net>
# Problem: 1
# Solution: 2
# Author: Sean Broderick <hakutsuru@mac.com>
# Date: 2015-09-25
# this is cheap, but... gonna use erlang
{threshold, _} = Integer.parse(List.first(System.argv))
sum3 = Enum.sum :lists.seq(3,threshold,3)
already_included? = fn(n) -> (rem(n, 3) ==... | 22.827586 | 82 | 0.697885 |
3381637ad19e64728d6c7ed0256f807d2a9f1074 | 1,840 | ex | Elixir | clients/dlp/lib/google_api/dlp/v2beta1/model/google_privacy_dlp_v2beta1_list_inspect_findings_response.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/dlp/lib/google_api/dlp/v2beta1/model/google_privacy_dlp_v2beta1_list_inspect_findings_response.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/dlp/lib/google_api/dlp/v2beta1/model/google_privacy_dlp_v2beta1_list_inspect_findings_response.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | 1 | 2018-07-28T20:50:50.000Z | 2018-07-28T20:50:50.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 36.8 | 204 | 0.774457 |
338168badd387ab379aadc611c28f31aaca7ed97 | 445 | exs | Elixir | ros/ros_service_api/test/ros_service_api_web/views/error_view_test.exs | kujua/elixir-handbook | 4185ad8da7f652fdb59c799dc58bcb33fda10475 | [
"Apache-2.0"
] | 1 | 2019-07-01T18:47:28.000Z | 2019-07-01T18:47:28.000Z | ros/ros_service_api/test/ros_service_api_web/views/error_view_test.exs | kujua/elixir-handbook | 4185ad8da7f652fdb59c799dc58bcb33fda10475 | [
"Apache-2.0"
] | 4 | 2020-07-17T16:57:18.000Z | 2021-05-09T23:50:52.000Z | ros/ros_service_api/test/ros_service_api_web/views/error_view_test.exs | kujua/elixir-handbook | 4185ad8da7f652fdb59c799dc58bcb33fda10475 | [
"Apache-2.0"
] | null | null | null | defmodule Ros.ServiceApiWeb.ErrorViewTest do
use Ros.ServiceApiWeb.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(Ros.ServiceApiWeb.ErrorView, "404.html", []) == "Not Found"
end
test "render... | 29.666667 | 99 | 0.741573 |
338185fff096f8e78df3e32ed004461762d5d7d7 | 5,660 | ex | Elixir | lib/pelemay_fp/merger.ex | zeam-vm/pelemay_fp | 6a9d0b5da154b6733ba08a99faffa4e7ca69ebd7 | [
"Apache-2.0"
] | 26 | 2020-12-27T10:11:10.000Z | 2021-11-01T18:19:04.000Z | lib/pelemay_fp/merger.ex | zeam-vm/pelemay_fp | 6a9d0b5da154b6733ba08a99faffa4e7ca69ebd7 | [
"Apache-2.0"
] | 3 | 2020-12-27T10:10:47.000Z | 2021-03-17T20:52:54.000Z | lib/pelemay_fp/merger.ex | zeam-vm/pelemay_fp | 6a9d0b5da154b6733ba08a99faffa4e7ca69ebd7 | [
"Apache-2.0"
] | null | null | null | defmodule PelemayFp.Merger do
@moduledoc """
Merges two consecutive list of tuples of a `Range`, count and a list.
"""
@type t :: list({Range.t(), non_neg_integer, list})
@doc """
Merges two consecutive list of tuples of a `Range`, count and a list.
## Examples
iex> PelemayFp.Merger.merge([{1..2... | 32.716763 | 91 | 0.473322 |
33819b26e82785c469d0b254415f327b59cb957d | 2,461 | ex | Elixir | clients/dataproc/lib/google_api/dataproc/v1/model/lifecycle_config.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/dataproc/lib/google_api/dataproc/v1/model/lifecycle_config.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/dataproc/lib/google_api/dataproc/v1/model/lifecycle_config.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 43.946429 | 313 | 0.725721 |
3381a0fa05ae54c99554f9944398a792aef322eb | 4,428 | ex | Elixir | lib/commanded/registration/swarm_registry/monitor.ex | ThisisGurwinder/commanded-swarm-registry | d43d89134d35eeb1636b7a2d5e7094fa34ebcbc4 | [
"MIT"
] | null | null | null | lib/commanded/registration/swarm_registry/monitor.ex | ThisisGurwinder/commanded-swarm-registry | d43d89134d35eeb1636b7a2d5e7094fa34ebcbc4 | [
"MIT"
] | null | null | null | lib/commanded/registration/swarm_registry/monitor.ex | ThisisGurwinder/commanded-swarm-registry | d43d89134d35eeb1636b7a2d5e7094fa34ebcbc4 | [
"MIT"
] | null | null | null | defmodule Commanded.Registration.SwarmRegistry.Monitor do
@moduledoc """
A `GenServer` process that starts and monitors another process that is
distributed using Swarm.
This is used to ensure the process can be supervised by a `Supervisor`.
"""
use GenServer
require Logger
alias Commanded.Registrati... | 30.537931 | 159 | 0.661698 |
3381a6acfa97d69216a2ec61c568976d2089b1a9 | 813 | ex | Elixir | web/channels/uppy_channel.ex | taorg/rumbl | 7b212283f8dc2da56eddcba4281a6fff2cf4f378 | [
"Apache-2.0"
] | null | null | null | web/channels/uppy_channel.ex | taorg/rumbl | 7b212283f8dc2da56eddcba4281a6fff2cf4f378 | [
"Apache-2.0"
] | null | null | null | web/channels/uppy_channel.ex | taorg/rumbl | 7b212283f8dc2da56eddcba4281a6fff2cf4f378 | [
"Apache-2.0"
] | null | null | null | defmodule Rumbl.UppyChannel do
use Phoenix.Channel
def handle_info :after_join, socket do
IO.inspect "-----------CHANNEL HANDLE_INFO----------------"
{:noreply, socket}
end
def join(_, _message, socket) do
IO.inspect "-----------CHANNEL JOIN----------------"
{:ok, socket}
end
def join(_w... | 30.111111 | 63 | 0.558426 |
3381b0396937b487000e3fa76a8a6dc78b0d1cf1 | 2,525 | ex | Elixir | clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_v2beta1_intent_message_list_select_item.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_v2beta1_intent_message_list_select_item.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"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_v2beta1_intent_message_list_select_item.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"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... | 37.686567 | 184 | 0.743366 |
3381de57998201473bae4f1c1b679d0d0db75ad4 | 2,416 | ex | Elixir | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v14/model/budget.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v14/model/budget.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v14/model/budget.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... | 38.349206 | 187 | 0.716887 |
3381e0202da90b6cd7562cd535a6dcbf6013a145 | 204 | exs | Elixir | writer_monad_from_first_principle/test/writer_monad_from_first_principle_test.exs | Shakadak/elixir_playground | 3a9c0319d5c8a0e296e19d9ae98fea01f8266f44 | [
"MIT"
] | null | null | null | writer_monad_from_first_principle/test/writer_monad_from_first_principle_test.exs | Shakadak/elixir_playground | 3a9c0319d5c8a0e296e19d9ae98fea01f8266f44 | [
"MIT"
] | null | null | null | writer_monad_from_first_principle/test/writer_monad_from_first_principle_test.exs | Shakadak/elixir_playground | 3a9c0319d5c8a0e296e19d9ae98fea01f8266f44 | [
"MIT"
] | null | null | null | defmodule WriterMonadFromFirstPrincipleTest do
use ExUnit.Case
doctest WriterMonadFromFirstPrinciple
test "greets the world" do
assert WriterMonadFromFirstPrinciple.hello() == :world
end
end
| 22.666667 | 58 | 0.803922 |
3381f7b58058681573313bef329cb4c54118271c | 133 | exs | Elixir | config/test.exs | kianmeng/cldr_locale_display | 702855b15bffbf18754843c91ec3d2b247109885 | [
"Apache-2.0"
] | null | null | null | config/test.exs | kianmeng/cldr_locale_display | 702855b15bffbf18754843c91ec3d2b247109885 | [
"Apache-2.0"
] | 1 | 2018-11-07T20:32:42.000Z | 2018-11-07T21:55:42.000Z | config/test.exs | kianmeng/cldr_locale_display | 702855b15bffbf18754843c91ec3d2b247109885 | [
"Apache-2.0"
] | null | null | null | # In test mode we compile and test all locales
import Config
config :ex_cldr,
default_locale: "en",
default_backend: MyApp.Cldr
| 19 | 46 | 0.759398 |
33820f2aeda799efa579e73a6bd0d0a2c931326a | 255 | ex | Elixir | lib/model/future_valuta_balance.ex | fbettag/mt940 | c98a0d2b9592ad083478336a1368512b7ed2210a | [
"MIT"
] | 8 | 2015-05-17T20:19:30.000Z | 2021-04-07T09:48:10.000Z | lib/model/future_valuta_balance.ex | fbettag/mt940 | c98a0d2b9592ad083478336a1368512b7ed2210a | [
"MIT"
] | 3 | 2015-05-04T07:44:42.000Z | 2016-10-14T22:59:42.000Z | lib/model/future_valuta_balance.ex | fbettag/mt940 | c98a0d2b9592ad083478336a1368512b7ed2210a | [
"MIT"
] | 6 | 2015-05-04T01:35:24.000Z | 2020-08-29T06:28:32.000Z | defmodule MT940.FutureValutaBalance do
@moduledoc ~S"""
## Forward Available Balance
Indicates the funds which are available to the account owner (if a credit or
debit balance) for the specified forward value date.
"""
use MT940.Balance
end
| 23.181818 | 78 | 0.74902 |
338231299ec4a97eebb9dc9b88c0fbb1bd129d67 | 215 | ex | Elixir | apps/app/lib/app_web/live/example_live.ex | IrinaS-D/tailwind-beginner-site | 999b16fd89b20b6af4e33bb51acca670ccda6216 | [
"MIT"
] | null | null | null | apps/app/lib/app_web/live/example_live.ex | IrinaS-D/tailwind-beginner-site | 999b16fd89b20b6af4e33bb51acca670ccda6216 | [
"MIT"
] | null | null | null | apps/app/lib/app_web/live/example_live.ex | IrinaS-D/tailwind-beginner-site | 999b16fd89b20b6af4e33bb51acca670ccda6216 | [
"MIT"
] | null | null | null | defmodule AppWeb.ExampleLive do
use Surface.LiveView
alias AppWeb.Components.ExampleComponent
def render(assigns) do
~F"""
<ExampleComponent>
Hi there!
</ExampleComponent>
"""
end
end | 16.538462 | 42 | 0.683721 |
33823fa4d09b77e1360d2ae6ca36fc646373f39a | 3,612 | exs | Elixir | test/themes/theme_test.exs | ntsai/xadmin | 82d8be63e69483ff66472481e66f9870face355b | [
"MIT"
] | 5 | 2016-08-30T01:23:50.000Z | 2021-09-22T14:39:00.000Z | test/themes/theme_test.exs | ntsai/xadmin | 82d8be63e69483ff66472481e66f9870face355b | [
"MIT"
] | null | null | null | test/themes/theme_test.exs | ntsai/xadmin | 82d8be63e69483ff66472481e66f9870face355b | [
"MIT"
] | 1 | 2021-12-10T11:10:55.000Z | 2021-12-10T11:10:55.000Z | defmodule XAdmin.ThemeTest do
use ExUnit.Case
alias XAdmin.Theme.{ActiveAdmin, AdminLte2}
###############
# AdminLte2 Theme
test "AdminLte2 wrap_item_type boolean not required no error" do
contents = fn(_) -> "" end
res = AdminLte2.wrap_item_type(:boolean, :name, "simple_name", contents, "", false)
... | 30.871795 | 90 | 0.656423 |
3382649a02ecfca99b92309bd56d730f1cdb9be3 | 1,737 | ex | Elixir | lib/nerves_hub/socket.ex | aadavids/nerves_hub | 504f143381b2cc7c7e76a049febbb590ad5752f1 | [
"Apache-2.0"
] | null | null | null | lib/nerves_hub/socket.ex | aadavids/nerves_hub | 504f143381b2cc7c7e76a049febbb590ad5752f1 | [
"Apache-2.0"
] | null | null | null | lib/nerves_hub/socket.ex | aadavids/nerves_hub | 504f143381b2cc7c7e76a049febbb590ad5752f1 | [
"Apache-2.0"
] | null | null | null | defmodule NervesHub.Socket do
alias NervesHub.Certificate
@cert "nerves_hub_cert"
@key "nerves_hub_key"
def opts(nil), do: opts([])
def opts(user_config) when is_list(user_config) do
ca_certs = user_config[:cacerts] || Certificate.ca_certs()
{cert_key, cert_value} = cert(user_config)
{key_key,... | 25.173913 | 80 | 0.631549 |
338266a6f2c560588a740329e9e29bf2a8684bf1 | 377 | ex | Elixir | lib/rules/bank_accounts/banco_do_brasil.ex | polvalente/ChexDigits | e7a3a76a1dff314b1680ee6abcbcb56fc9296fb4 | [
"Apache-2.0"
] | null | null | null | lib/rules/bank_accounts/banco_do_brasil.ex | polvalente/ChexDigits | e7a3a76a1dff314b1680ee6abcbcb56fc9296fb4 | [
"Apache-2.0"
] | null | null | null | lib/rules/bank_accounts/banco_do_brasil.ex | polvalente/ChexDigits | e7a3a76a1dff314b1680ee6abcbcb56fc9296fb4 | [
"Apache-2.0"
] | null | null | null | defmodule ChexDigits.Rules.BankAccounts.BancoDoBrasil do
@moduledoc false
alias ChexDigits.Rule
alias ChexDigits.Helper, as: H
import Enum, only: [to_list: 1]
def rule(account, _agency) do
Rule.new(
account,
%{},
%{10 => X, 11 => 0},
11,
:module_minus,
to_list(9..2)
... | 18.85 | 56 | 0.612732 |
3382afbe87082d1a1d4c66803307234275a01b76 | 1,016 | ex | Elixir | lib/learn/v18.ex | DitoHI/basic_elixir | af21384e99df0f7289ca1908c3e21bce8aef475c | [
"MIT"
] | null | null | null | lib/learn/v18.ex | DitoHI/basic_elixir | af21384e99df0f7289ca1908c3e21bce8aef475c | [
"MIT"
] | null | null | null | lib/learn/v18.ex | DitoHI/basic_elixir | af21384e99df0f7289ca1908c3e21bce8aef475c | [
"MIT"
] | null | null | null | defmodule V18 do
@moduledoc false
# Enum
list = [1,2,3,4,5,6,7,8,9,10]
IO.inspect Enum.count(list)
map = %{"a" => "a", "b" => "b"}
IO.inspect Enum.count(map)
IO.inspect Enum.count(list, fn (x) -> div(x, 2) == 1 end)
IO.inspect Enum.count(list, fn (x) -> x == 1 end)
list2 = []
IO.inspect(Enum.emp... | 29.882353 | 62 | 0.61122 |
3382f2e9c49fefa11d350bbfa9968a3f26b10757 | 1,130 | exs | Elixir | mix.exs | pdericson/riemann-dashboard | 48a9fc41bfebe9139bda10ec246214337e2dd0a0 | [
"MIT"
] | 2 | 2017-12-04T10:01:06.000Z | 2017-12-06T16:35:19.000Z | mix.exs | pdericson/riemann-dashboard | 48a9fc41bfebe9139bda10ec246214337e2dd0a0 | [
"MIT"
] | null | null | null | mix.exs | pdericson/riemann-dashboard | 48a9fc41bfebe9139bda10ec246214337e2dd0a0 | [
"MIT"
] | null | null | null | defmodule Dashboard.Mixfile do
use Mix.Project
def project do
[
app: :dashboard,
version: "0.0.1",
elixir: "~> 1.4",
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix, :gettext] ++ Mix.compilers,
start_permanent: Mix.env == :prod,
deps: deps()
]
end
... | 24.565217 | 61 | 0.575221 |
338318d5a91766dcab8fa679dcb2c21f43d78794 | 3,618 | ex | Elixir | lib/grpc/transport/http2.ex | scohen/grpc-elixir | c0eaa61d789f5c5b9e3c2f4c213944bebaf2c72c | [
"Apache-2.0"
] | null | null | null | lib/grpc/transport/http2.ex | scohen/grpc-elixir | c0eaa61d789f5c5b9e3c2f4c213944bebaf2c72c | [
"Apache-2.0"
] | null | null | null | lib/grpc/transport/http2.ex | scohen/grpc-elixir | c0eaa61d789f5c5b9e3c2f4c213944bebaf2c72c | [
"Apache-2.0"
] | null | null | null | defmodule GRPC.Transport.HTTP2 do
@moduledoc false
# A module providing functions for sending HTTP/2 requests.
alias GRPC.Transport.Utils
alias GRPC.Status
def server_headers() do
%{":status" => 200, "content-type" => "application/grpc+proto"}
end
@spec server_trailers(integer, String.t()) :: map
... | 29.414634 | 98 | 0.653676 |
338319af83d5c59602c64697aa33d66f2ea48297 | 359 | ex | Elixir | apps/google_maps/lib/google_maps/map_data/layers.ex | noisecapella/dotcom | d5ef869412102d2230fac3dcc216f01a29726227 | [
"MIT"
] | 42 | 2019-05-29T16:05:30.000Z | 2021-08-09T16:03:37.000Z | apps/google_maps/lib/google_maps/map_data/layers.ex | noisecapella/dotcom | d5ef869412102d2230fac3dcc216f01a29726227 | [
"MIT"
] | 872 | 2019-05-29T17:55:50.000Z | 2022-03-30T09:28:43.000Z | apps/google_maps/lib/google_maps/map_data/layers.ex | noisecapella/dotcom | d5ef869412102d2230fac3dcc216f01a29726227 | [
"MIT"
] | 12 | 2019-07-01T18:33:21.000Z | 2022-03-10T02:13:57.000Z | defmodule GoogleMaps.MapData.Layers do
@moduledoc """
Used to enable or disable different layers on a map. Currently only supports TransitLayer.
See https://developers.google.com/maps/documentation/javascript/examples/layer-transit for
more details.
"""
defstruct transit: false
@type t :: %__MODULE__{
... | 27.615385 | 92 | 0.721448 |
338325e73ef81f7c07916d4a11e5d922acfef647 | 502 | ex | Elixir | samples/client/petstore/elixir/lib/swagger_petstore/model/return.ex | derBiggi/swagger-codegen | 99dad052ec506796f3ed13b19364cf827ff0f256 | [
"Apache-2.0"
] | 14,570 | 2015-01-01T21:46:46.000Z | 2022-03-31T22:28:15.000Z | samples/client/petstore/elixir/lib/swagger_petstore/model/return.ex | derBiggi/swagger-codegen | 99dad052ec506796f3ed13b19364cf827ff0f256 | [
"Apache-2.0"
] | 9,058 | 2015-01-08T15:49:17.000Z | 2022-03-31T13:10:01.000Z | samples/client/petstore/elixir/lib/swagger_petstore/model/return.ex | LaudateCorpus1/swagger-codegen | e4f322ce197f1d6a0643de80f9a20bb521480426 | [
"Apache-2.0"
] | 6,907 | 2015-01-02T05:29:47.000Z | 2022-03-31T00:55:45.000Z | # NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
defmodule SwaggerPetstore.Model.Return do
@moduledoc """
Model for testing reserved words
"""
@derive [Poison.Encoder]
defstruct [
:"return"
... | 19.307692 | 75 | 0.699203 |
33832e3edf7f4401c2d0f85ab733a9a51b578e40 | 15,562 | exs | Elixir | test/taglet/tag_as_test.exs | GoCorus/taglet | eddc781f1ddff16e43ddbc97d94fe8976a135923 | [
"Apache-2.0"
] | null | null | null | test/taglet/tag_as_test.exs | GoCorus/taglet | eddc781f1ddff16e43ddbc97d94fe8976a135923 | [
"Apache-2.0"
] | null | null | null | test/taglet/tag_as_test.exs | GoCorus/taglet | eddc781f1ddff16e43ddbc97d94fe8976a135923 | [
"Apache-2.0"
] | null | null | null | defmodule Taglet.TagAsTest do
alias Ecto.Adapters.SQL
alias TagletPost, as: Post
alias Taglet.{Tagging, Tag}
import Ecto.Query
import Mix.Ecto, only: [build_repo_priv: 1]
use ExUnit.Case
@repo Taglet.RepoClient.repo()
@tenant_id "example_tenant"
doctest Taglet
setup do
# Regular test
@r... | 38.235872 | 111 | 0.674078 |
3383d2b33f1e61314d87415fbe31d11076c0d492 | 6,808 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/http_route_action.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/http_route_action.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/http_route_action.ex | yoshi-code-bot/elixir-google-api | cdb6032f01fac5ab704803113c39f2207e9e019d | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 93.260274 | 945 | 0.771592 |
3383d89fa4bf84ccc8809536a86c968235c1bd0b | 344 | exs | Elixir | test/event_store/snapshot_test.exs | zblanco/commanded-eventstore-adapter | 8a3178230a43fb6c5522cd3387eda951be819520 | [
"MIT"
] | null | null | null | test/event_store/snapshot_test.exs | zblanco/commanded-eventstore-adapter | 8a3178230a43fb6c5522cd3387eda951be819520 | [
"MIT"
] | null | null | null | test/event_store/snapshot_test.exs | zblanco/commanded-eventstore-adapter | 8a3178230a43fb6c5522cd3387eda951be819520 | [
"MIT"
] | null | null | null | defmodule Commanded.EventStore.Adapters.EventStore.SnapshotTest do
use Commanded.EventStore.SnapshotTestCase
alias Commanded.EventStore.Adapters.EventStore.Storage
setup_all do
{:ok, conn} = Storage.connect()
[conn: conn]
end
setup %{conn: conn} do
on_exit(fn ->
Storage.reset!(conn)
... | 17.2 | 66 | 0.697674 |
338440e53db0a38641af4bf8ce06412c3d10698f | 418 | ex | Elixir | echo/lib/echo_web/live/eraser_live.ex | mrjbj/liveview_sept_2021 | 1722a9527acef2b4584810976fecc507cc3eda8b | [
"MIT"
] | 1 | 2021-09-14T01:52:42.000Z | 2021-09-14T01:52:42.000Z | echo/lib/echo_web/live/eraser_live.ex | mrjbj/liveview_sept_2021 | 1722a9527acef2b4584810976fecc507cc3eda8b | [
"MIT"
] | 1 | 2021-09-17T11:30:04.000Z | 2021-09-17T11:30:04.000Z | echo/lib/echo_web/live/eraser_live.ex | mrjbj/liveview_sept_2021 | 1722a9527acef2b4584810976fecc507cc3eda8b | [
"MIT"
] | 4 | 2021-09-14T00:04:39.000Z | 2021-09-15T15:14:52.000Z | defmodule EchoWeb.EraserLive do
use EchoWeb, :live_view
alias Echo.Game.Eraser
alias Echo.Game
def mount(%{"slug" => slug}, _session, socket) do
socket = assign(socket, game: Game.new(slug))
{:ok, socket}
end
def handle_event("step", _, socket) do
{:noreply, do_step(socket)}
end
defp do_s... | 22 | 53 | 0.662679 |
338443f7bbdbb2ee24c71515cd99e8e6f7b1f805 | 711 | ex | Elixir | server/lib/project_web/gettext.ex | lemartin19/cs4550-project | bd7baf279021543db33fe52beb3e0d5413dbe405 | [
"Xnet",
"X11"
] | null | null | null | server/lib/project_web/gettext.ex | lemartin19/cs4550-project | bd7baf279021543db33fe52beb3e0d5413dbe405 | [
"Xnet",
"X11"
] | null | null | null | server/lib/project_web/gettext.ex | lemartin19/cs4550-project | bd7baf279021543db33fe52beb3e0d5413dbe405 | [
"Xnet",
"X11"
] | null | null | null | defmodule ProjectWeb.Gettext do
@moduledoc """
A module providing Internationalization with a gettext-based API.
By using [Gettext](https://hexdocs.pm/gettext),
your module gains a set of macros for translations, for example:
import ProjectWeb.Gettext
# Simple translation
gettext("Here is t... | 28.44 | 72 | 0.677918 |
3384444e2553f4828a949ba4911aeaad4d35846d | 226 | ex | Elixir | lib/soccer_table/standings/standing.ex | thomasbrus/phoenix-live-view-soccer-table | 60bff384a71fb9c08eb22600409e71fe25e54712 | [
"MIT"
] | 1 | 2020-05-09T02:09:21.000Z | 2020-05-09T02:09:21.000Z | lib/soccer_table/standings/standing.ex | thomasbrus/phoenix-live-view-soccer-table | 60bff384a71fb9c08eb22600409e71fe25e54712 | [
"MIT"
] | null | null | null | lib/soccer_table/standings/standing.ex | thomasbrus/phoenix-live-view-soccer-table | 60bff384a71fb9c08eb22600409e71fe25e54712 | [
"MIT"
] | 1 | 2020-07-07T21:38:33.000Z | 2020-07-07T21:38:33.000Z | defmodule SoccerTable.Standings.Standing do
defstruct [
:rank,
:team_id,
:team_name,
:matches,
:matches_won,
:matches_drawn,
:matches_lost,
:points,
:goals_for,
:goals_against
]
end
| 15.066667 | 43 | 0.628319 |
3384559857a86645271aa4aa0366a5e2fa73aafc | 8,899 | ex | Elixir | lib/amqp/selective_consumer.ex | benonymus/amqp | 4db0ef07441e56ca50e0e13fd8612b526ad9e06d | [
"MIT"
] | null | null | null | lib/amqp/selective_consumer.ex | benonymus/amqp | 4db0ef07441e56ca50e0e13fd8612b526ad9e06d | [
"MIT"
] | null | null | null | lib/amqp/selective_consumer.ex | benonymus/amqp | 4db0ef07441e56ca50e0e13fd8612b526ad9e06d | [
"MIT"
] | null | null | null | defmodule AMQP.SelectiveConsumer do
@moduledoc """
This is an Elixir reimplementation of `:amqp_selective_consumer` - [source](https://github.com/rabbitmq/rabbitmq-server/blob/master/deps/amqp_client/src/amqp_selective_consumer.erl)
The module is used by default when you open a channel via `AMQP.Channel.open/2` ... | 29.177049 | 183 | 0.656366 |
3384a56d09ea708a697dbf63db2cb5e6a29d8cee | 516 | exs | Elixir | test/unit/serialization/reader_test.exs | marcelotto/rdf-ex | 12adce69eb2dbff027cbc83aaaf912067aea1b02 | [
"MIT"
] | 53 | 2017-06-25T22:20:44.000Z | 2020-04-27T17:27:51.000Z | test/unit/serialization/reader_test.exs | marcelotto/rdf-ex | 12adce69eb2dbff027cbc83aaaf912067aea1b02 | [
"MIT"
] | 7 | 2017-06-25T00:29:11.000Z | 2020-03-11T00:23:47.000Z | test/unit/serialization/reader_test.exs | rdf-elixir/rdf-ex | 7d4280ec9a912ef6ee9fc96ecdfdf26647016d6a | [
"MIT"
] | 3 | 2020-07-03T13:25:36.000Z | 2021-04-04T12:33:51.000Z | defmodule RDF.Serialization.ReaderTest do
use RDF.Test.Case
doctest RDF.Serialization.Reader
alias RDF.Serialization.Reader
alias RDF.Turtle
describe "file_mode/2" do
test ":gzip without other :file_mode opts" do
assert Reader.file_mode(Turtle.Decoder, gzip: true) == ~w[compressed read utf8]a
... | 25.8 | 86 | 0.699612 |
3384f5ec5c51709b5699021a0c6ac98dd668e4e5 | 716 | exs | Elixir | test/unit/minute_test.exs | tommy351/toki | 099591c6ab5dcbad91c4c45ff87ab7e6d05959bc | [
"MIT"
] | 3 | 2016-07-19T03:23:33.000Z | 2016-09-15T11:57:37.000Z | test/unit/minute_test.exs | tommy351/toki | 099591c6ab5dcbad91c4c45ff87ab7e6d05959bc | [
"MIT"
] | null | null | null | test/unit/minute_test.exs | tommy351/toki | 099591c6ab5dcbad91c4c45ff87ab7e6d05959bc | [
"MIT"
] | null | null | null | defmodule Toki.Unit.MinuteTest do
use ExUnit.Case
test "get" do
assert Toki.Unit.Minute.get(%Toki.DateTime{minute: 23}) == 23
end
test "set" do
date = Toki.Unit.Minute.set(%Toki.DateTime{minute: 23}, 52)
assert date == %Toki.DateTime{minute: 52}
end
test "add" do
date = Toki.Unit.Minute.a... | 26.518519 | 94 | 0.659218 |
33853220221a3faf95b623fd6eb7309bc3d67cd8 | 979 | ex | Elixir | test/support/layout_view.ex | lnr0626/phoenix_live_view | dde3019f3341dca1f3fb587c2087f2778da702c3 | [
"MIT"
] | null | null | null | test/support/layout_view.ex | lnr0626/phoenix_live_view | dde3019f3341dca1f3fb587c2087f2778da702c3 | [
"MIT"
] | null | null | null | test/support/layout_view.ex | lnr0626/phoenix_live_view | dde3019f3341dca1f3fb587c2087f2778da702c3 | [
"MIT"
] | null | null | null | defmodule Phoenix.LiveViewTest.LayoutView do
use Phoenix.View, root: ""
import Phoenix.LiveView.Helpers
def render("app.html", assigns) do
# Assert those assigns are always available
_ = assigns.live_view_module
_ = assigns.live_view_action
["LAYOUT", render(assigns.view_module, assigns.view_tem... | 25.102564 | 92 | 0.677222 |
3385327a25ab7beff5ddc1694b0b3e3e94e7902c | 1,593 | ex | Elixir | lib/faker/fruit/pt_br.ex | kurt-friedrich/faker | a23a82ff69f3dd895ae6487d6f9aa1f35278efdb | [
"MIT"
] | 540 | 2015-01-05T16:31:49.000Z | 2019-09-25T00:40:27.000Z | lib/faker/fruit/pt_br.ex | kurt-friedrich/faker | a23a82ff69f3dd895ae6487d6f9aa1f35278efdb | [
"MIT"
] | 172 | 2015-01-06T03:55:17.000Z | 2019-10-03T12:58:02.000Z | lib/faker/fruit/pt_br.ex | kurt-friedrich/faker | a23a82ff69f3dd895ae6487d6f9aa1f35278efdb | [
"MIT"
] | 163 | 2015-01-05T21:24:54.000Z | 2019-10-03T07:59:42.000Z | defmodule Faker.Fruit.PtBr do
import Faker, only: [sampler: 2]
@moduledoc """
Functions for fruit data in Brazilian Portuguese.
"""
@doc """
Returns a fruit.
## Examples
iex> Faker.Fruit.PtBr.fruit
"Fruta-do-conde"
iex> Faker.Fruit.PtBr.fruit
"Bergamota"
iex> Faker.Fruit.... | 15.317308 | 51 | 0.49027 |
33854322de0f4faedd46c18a2e750d6a741ead2e | 2,017 | ex | Elixir | lib/libpe/machine_type.ex | elixir-desktop/libpe | c7e84e7d35b5ab7661691a2282b44ca2268eec39 | [
"MIT"
] | null | null | null | lib/libpe/machine_type.ex | elixir-desktop/libpe | c7e84e7d35b5ab7661691a2282b44ca2268eec39 | [
"MIT"
] | 1 | 2022-03-02T14:35:50.000Z | 2022-03-02T14:35:50.000Z | lib/libpe/machine_type.ex | elixir-desktop/libpe | c7e84e7d35b5ab7661691a2282b44ca2268eec39 | [
"MIT"
] | null | null | null | defmodule LibPE.MachineType do
use LibPE.Flags
def flags() do
[
{"IMAGE_FILE_MACHINE_UNKNOWN", 0x0,
"The content of this field is assumed to be applicable to any machine type"},
{"IMAGE_FILE_MACHINE_AM33", 0x1D3, "Matsushita AM33"},
{"IMAGE_FILE_MACHINE_AMD64", 0x8664, "x64"},
{"... | 53.078947 | 86 | 0.695092 |
33854d346f838c579c6a1b5658fa78d7598a2dce | 1,151 | ex | Elixir | lib/ex_saferpay/response/address.ex | jshmrtn/ex-saferpay | 263fc6dacf5b2741eb3fff33cf8ed405637d170a | [
"MIT"
] | 1 | 2017-12-12T17:09:02.000Z | 2017-12-12T17:09:02.000Z | lib/ex_saferpay/response/address.ex | jshmrtn/ex-saferpay | 263fc6dacf5b2741eb3fff33cf8ed405637d170a | [
"MIT"
] | 4 | 2017-12-12T17:08:28.000Z | 2018-03-01T08:04:56.000Z | lib/ex_saferpay/response/address.ex | jshmrtn/ex-saferpay | 263fc6dacf5b2741eb3fff33cf8ed405637d170a | [
"MIT"
] | null | null | null | defmodule ExSaferpay.Response.Address do
@moduledoc """
See `Address` http://saferpay.github.io/jsonapi/1.2/
"""
@type gender ::
:male
| :female
| :company
@type legal_form ::
:ag
| :gmbh
| :misc
@type t :: %__MODULE__{
first_name: nil... | 20.553571 | 54 | 0.507385 |
33855af81277f79e8b04e9d092f75cbef3a3cb69 | 2,273 | ex | Elixir | clients/data_catalog/lib/google_api/data_catalog/v1/model/google_cloud_datacatalog_v1_big_query_connection_spec.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/data_catalog/lib/google_api/data_catalog/v1/model/google_cloud_datacatalog_v1_big_query_connection_spec.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/data_catalog/lib/google_api/data_catalog/v1/model/google_cloud_datacatalog_v1_big_query_connection_spec.ex | dazuma/elixir-google-api | 6a9897168008efe07a6081d2326735fe332e522c | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 36.079365 | 203 | 0.743071 |
33856ae771758127bc09fe98048ea929afc50da3 | 351 | exs | Elixir | bench/currency_for_code.exs | petrus-jvrensburg/cldr_locale_display | 511f7bf23df96d67bda36a6c9b9bc3425c9cb1b1 | [
"Apache-2.0"
] | 2 | 2020-11-06T21:10:31.000Z | 2021-06-16T20:19:28.000Z | bench/currency_for_code.exs | petrus-jvrensburg/cldr_locale_display | 511f7bf23df96d67bda36a6c9b9bc3425c9cb1b1 | [
"Apache-2.0"
] | 5 | 2020-09-24T22:14:44.000Z | 2022-03-20T14:34:16.000Z | bench/currency_for_code.exs | petrus-jvrensburg/cldr_locale_display | 511f7bf23df96d67bda36a6c9b9bc3425c9cb1b1 | [
"Apache-2.0"
] | 2 | 2021-09-08T10:48:14.000Z | 2022-03-05T15:17:21.000Z | {:ok, currency} = Cldr.Currency.currency_for_code(:AUD, MyApp.Cldr)
Benchee.run(
%{
"with precompiled currency" => fn ->
Cldr.Currency.currency_for_code(currency, MyApp.Cldr)
end,
"without precompiled currency" => fn ->
Cldr.Currency.currency_for_code(:AUD, MyApp.Cldr)
end,
},... | 21.9375 | 67 | 0.641026 |
33859810a388d5e13c0f4ec83ccb4d2e48093eb1 | 241 | ex | Elixir | lib/onsor_web/schema/account_types.ex | ashkan18/onsor | 73b75b24f638f1a425de8ebf4454df971040e9f2 | [
"MIT"
] | null | null | null | lib/onsor_web/schema/account_types.ex | ashkan18/onsor | 73b75b24f638f1a425de8ebf4454df971040e9f2 | [
"MIT"
] | 4 | 2021-03-09T00:47:04.000Z | 2022-02-10T15:15:28.000Z | lib/onsor_web/schema/account_types.ex | ashkan18/onsor | 73b75b24f638f1a425de8ebf4454df971040e9f2 | [
"MIT"
] | null | null | null | defmodule OnsorWeb.Schema.AccountTypes do
use Absinthe.Schema.Notation
@desc "A User"
object :user do
field :id, :string
field :name, :string
end
@desc "A Session"
object :session do
field :token, :string
end
end
| 16.066667 | 41 | 0.676349 |
3385b02c00aff60a4df69be6375fa71ff2ab8fa7 | 3,769 | ex | Elixir | lib/thin_notion_api/blocks.ex | CodingZeal/thin_notion_api | e1f4081348300ab6c48adae8ebb4b2995cde59d1 | [
"MIT"
] | 1 | 2022-01-15T00:50:09.000Z | 2022-01-15T00:50:09.000Z | lib/thin_notion_api/blocks.ex | CodingZeal/thin_notion_api | e1f4081348300ab6c48adae8ebb4b2995cde59d1 | [
"MIT"
] | null | null | null | lib/thin_notion_api/blocks.ex | CodingZeal/thin_notion_api | e1f4081348300ab6c48adae8ebb4b2995cde59d1 | [
"MIT"
] | null | null | null | defmodule ThinNotionApi.Blocks do
@moduledoc """
This module contains functions to interact and modify Notion blocks.
A block object represents content within Notion. Blocks can be text, lists, media, and more.
"""
import ThinNotionApi.Base
alias ThinNotionApi.Types
@spec retrieve_block(String.t()) :: ... | 33.353982 | 228 | 0.648713 |
3385cf010bf92cf223dd3b4c1f77eaaf216f3e6d | 61 | ex | Elixir | web/views/page_view.ex | ashkan18/mestatus | c0d1cf156729fc2f7a8c822f1757efd663515ba5 | [
"MIT"
] | null | null | null | web/views/page_view.ex | ashkan18/mestatus | c0d1cf156729fc2f7a8c822f1757efd663515ba5 | [
"MIT"
] | null | null | null | web/views/page_view.ex | ashkan18/mestatus | c0d1cf156729fc2f7a8c822f1757efd663515ba5 | [
"MIT"
] | null | null | null | defmodule Mestatus.PageView do
use Mestatus.Web, :view
end
| 15.25 | 30 | 0.786885 |
3385d1bb08e3161b958aaa3077e87d158697b7df | 880 | ex | Elixir | lib/membrane_caps_mp4/payload.ex | membraneframework/membrane-caps-mp4 | 5164b0407a9c47e3776f3acf08fe35121e01a5f5 | [
"Apache-2.0"
] | null | null | null | lib/membrane_caps_mp4/payload.ex | membraneframework/membrane-caps-mp4 | 5164b0407a9c47e3776f3acf08fe35121e01a5f5 | [
"Apache-2.0"
] | null | null | null | lib/membrane_caps_mp4/payload.ex | membraneframework/membrane-caps-mp4 | 5164b0407a9c47e3776f3acf08fe35121e01a5f5 | [
"Apache-2.0"
] | null | null | null | defmodule Membrane.MP4.Payload do
@moduledoc """
MP4 payload description.
Only a payloaded stream can be muxed into MP4 container.
"""
@typedoc """
MP4 payload description.
Contains the following fields:
- content - a struct with content-specific information
- timescale - used to express sample dur... | 32.592593 | 98 | 0.695455 |
3385d1cea622ce8d463f0d3c79119b8b8ca8a7b3 | 941 | ex | Elixir | lib/db/leveldb.ex | DigixGlobal/merkle_patricia_tree | 76e6b1bca9f7d96592350132bab37fdffcbec09b | [
"MIT"
] | 22 | 2017-06-22T02:50:34.000Z | 2022-01-26T20:43:21.000Z | lib/db/leveldb.ex | DigixGlobal/merkle_patricia_tree | 76e6b1bca9f7d96592350132bab37fdffcbec09b | [
"MIT"
] | 9 | 2018-06-19T09:42:46.000Z | 2018-12-12T00:13:58.000Z | lib/db/leveldb.ex | DigixGlobal/merkle_patricia_tree | 76e6b1bca9f7d96592350132bab37fdffcbec09b | [
"MIT"
] | 13 | 2017-08-21T13:03:14.000Z | 2021-05-25T17:51:20.000Z | defmodule MerklePatriciaTree.DB.LevelDB do
@moduledoc """
Implementation of MerklePatriciaTree.DB which
is backed by leveldb.
"""
alias MerklePatriciaTree.Trie
alias MerklePatriciaTree.DB
@behaviour MerklePatriciaTree.DB
@doc """
Performs initialization for this db.
"""
@spec init(DB.db_name())... | 21.883721 | 70 | 0.631243 |
3385d744a401886ccd9cd6834c32b19b50763def | 1,557 | ex | Elixir | clients/plus_domains/lib/google_api/plus_domains/v1/model/comment_actor_image.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/plus_domains/lib/google_api/plus_domains/v1/model/comment_actor_image.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/plus_domains/lib/google_api/plus_domains/v1/model/comment_actor_image.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 33.12766 | 215 | 0.7386 |
3385da1353f47b576bbed14a3219a89003645522 | 395 | exs | Elixir | priv/repo/migrations/20220602221751_remove_schemes_verification_occasion.exs | skyplaying/policr-mini | ac265daa251fd76b770d0ce08c67075a6a57f796 | [
"MIT"
] | null | null | null | priv/repo/migrations/20220602221751_remove_schemes_verification_occasion.exs | skyplaying/policr-mini | ac265daa251fd76b770d0ce08c67075a6a57f796 | [
"MIT"
] | 2 | 2022-02-25T06:15:30.000Z | 2022-02-25T06:15:33.000Z | priv/repo/migrations/20220602221751_remove_schemes_verification_occasion.exs | skyplaying/policr-mini | ac265daa251fd76b770d0ce08c67075a6a57f796 | [
"MIT"
] | null | null | null | defmodule PolicrMini.Repo.Migrations.DeleteSchemesVerificationOccasion do
use PolicrMini.Migration
alias PolicrMini.EctoEnums.VerificationOccasionEnum
def up do
alter table("schemes") do
remove :verification_occasion
end
end
def down do
alter table("schemes") do
add :verification_oc... | 21.944444 | 82 | 0.751899 |
3385dd6115736ae8b423862ac56aae48e109d405 | 49,690 | ex | Elixir | lib/elixir/lib/stream.ex | prodis/elixir | 5ea99c5cd40130a25d7dcf9aa92b321e42b30df1 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/stream.ex | prodis/elixir | 5ea99c5cd40130a25d7dcf9aa92b321e42b30df1 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/stream.ex | prodis/elixir | 5ea99c5cd40130a25d7dcf9aa92b321e42b30df1 | [
"Apache-2.0"
] | null | null | null | defmodule Stream do
@moduledoc """
Functions for creating and composing streams.
Streams are composable, lazy enumerables (for an introduction on
enumerables, see the `Enum` module). Any enumerable that generates
elements one by one during enumeration is called a stream. For example,
Elixir's `Range` is a ... | 30.261876 | 110 | 0.615838 |
3385e8b1663be906a1ca53e46fbf06607508c752 | 1,436 | exs | Elixir | test/relate_test.exs | edw/elixir-query | 6b622895d2f8c97fb1f5643ad44e8e0504d653c9 | [
"Apache-2.0"
] | null | null | null | test/relate_test.exs | edw/elixir-query | 6b622895d2f8c97fb1f5643ad44e8e0504d653c9 | [
"Apache-2.0"
] | 1 | 2019-04-12T22:05:58.000Z | 2019-04-13T03:52:25.000Z | test/relate_test.exs | edw/elixir-query | 6b622895d2f8c97fb1f5643ad44e8e0504d653c9 | [
"Apache-2.0"
] | null | null | null | defmodule RelateTest do
use ExUnit.Case
doctest Relate
setup do
{
:ok,
english: [
{1, "one"},
{0, "zero"},
{2, "two"},
{3, "three"},
{4, "four"},
{5, "five"},
{6, "six"},
{7, "seven"}
],
roman: [
%{n: 1, str: "i"}... | 26.592593 | 71 | 0.327298 |
3385ec57dc1b39693fc7f99e6b1450fafad232c3 | 483 | ex | Elixir | lib/crit/sql/route_to_repo.ex | brownt23/crit19 | c45c7b3ae580c193168d83144da0eeb9bc91c8a9 | [
"MIT"
] | 6 | 2019-07-16T19:31:23.000Z | 2021-06-05T19:01:05.000Z | lib/crit/sql/route_to_repo.ex | brownt23/crit19 | c45c7b3ae580c193168d83144da0eeb9bc91c8a9 | [
"MIT"
] | null | null | null | lib/crit/sql/route_to_repo.ex | brownt23/crit19 | c45c7b3ae580c193168d83144da0eeb9bc91c8a9 | [
"MIT"
] | 3 | 2020-02-24T23:38:27.000Z | 2020-08-01T23:50:17.000Z | defmodule Crit.Sql.RouteToRepo do
# alias Crit.Repo
@behaviour Crit.Sql.Router
@moduledoc """
Route to a particular Postgres schema by attaching an Ecto prefix.
"""
@impl true
def adjust(_all_but_last_arg, _given_opts, _institution) do
:unimplemented
end
@impl true
def forward(_sql_command, _... | 20.125 | 76 | 0.73706 |
3385fdaf8220bf521e8a659866c23ca0ae99bd94 | 57 | ex | Elixir | lib/my_app_web/views/page_view.ex | bigbassroller/ueberauth_example | 5e889abaf060b6a37add2eb8a3cf1938f394c4af | [
"MIT"
] | 31 | 2019-10-29T11:08:32.000Z | 2020-01-28T16:16:04.000Z | lib/my_app_web/views/page_view.ex | bigbassroller/ueberauth_example | 5e889abaf060b6a37add2eb8a3cf1938f394c4af | [
"MIT"
] | 2 | 2021-03-09T12:10:09.000Z | 2021-05-10T01:25:36.000Z | lib/my_app_web/views/page_view.ex | brandedux/phoenix_api | 3613d3d2a232a0d39cd125bd09cceee876fbf475 | [
"MIT"
] | 1 | 2019-10-29T14:38:44.000Z | 2019-10-29T14:38:44.000Z | defmodule MyAppWeb.PageView do
use MyAppWeb, :view
end
| 14.25 | 30 | 0.789474 |
338609014c6eaf37233b6b98aa44e6556954f9fc | 949 | exs | Elixir | bowman/test/star_polygons/plan_test.exs | mudphone/bowman | e916d0921f259f2c9dcba9313a64402b0bc43f9e | [
"MIT"
] | null | null | null | bowman/test/star_polygons/plan_test.exs | mudphone/bowman | e916d0921f259f2c9dcba9313a64402b0bc43f9e | [
"MIT"
] | 3 | 2020-07-17T01:30:50.000Z | 2021-05-08T20:23:35.000Z | bowman/test/star_polygons/plan_test.exs | mudphone/bowman | e916d0921f259f2c9dcba9313a64402b0bc43f9e | [
"MIT"
] | null | null | null | defmodule StarPolygons.PlanTest do
use ExUnit.Case
use PropCheck
doctest StarPolygons.Plan
alias StarPolygons.Plan
property "calculate thetas for points" do
forall n <- three_or_more() do
thetas = Plan.get_thetas(n)
length(thetas) == n and
List.first(thetas) != 0 and
check_sp... | 22.069767 | 49 | 0.645943 |
33860c1326ce983ec09b750fe092899d02ac7a4c | 620 | ex | Elixir | lib/noted/env.ex | lawik/noted | a51b5d79cf44abfc2463560f83f1a8d65e6af85e | [
"BSD-3-Clause"
] | 28 | 2021-02-20T22:22:49.000Z | 2022-03-24T21:07:39.000Z | lib/noted/env.ex | gerhard/noted | c83bfd2e8e2950187268a2e3ba0904ae8a9773e5 | [
"BSD-3-Clause"
] | 5 | 2021-05-06T11:37:11.000Z | 2021-08-31T11:38:14.000Z | lib/noted/env.ex | gerhard/noted | c83bfd2e8e2950187268a2e3ba0904ae8a9773e5 | [
"BSD-3-Clause"
] | 7 | 2021-02-24T19:18:28.000Z | 2021-09-13T16:07:08.000Z | defmodule Noted.Env do
require Logger
def require(environment_variable) do
case System.get_env(environment_variable) do
nil ->
Logger.error("Missing required environment variable: #{environment_variable}")
raise "Missing required environment variable: #{environment_variable}"
valu... | 22.962963 | 86 | 0.674194 |
3386140c712231556ff05149d5fa5e775bcd7b8c | 69 | exs | Elixir | apps/routes/config/test.exs | noisecapella/dotcom | d5ef869412102d2230fac3dcc216f01a29726227 | [
"MIT"
] | 42 | 2019-05-29T16:05:30.000Z | 2021-08-09T16:03:37.000Z | apps/routes/config/test.exs | noisecapella/dotcom | d5ef869412102d2230fac3dcc216f01a29726227 | [
"MIT"
] | 872 | 2019-05-29T17:55:50.000Z | 2022-03-30T09:28:43.000Z | apps/routes/config/test.exs | noisecapella/dotcom | d5ef869412102d2230fac3dcc216f01a29726227 | [
"MIT"
] | 12 | 2019-07-01T18:33:21.000Z | 2022-03-10T02:13:57.000Z | use Mix.Config
config :routes, :routes_repo_api, Routes.MockRepoApi
| 17.25 | 52 | 0.811594 |
338657318c1157886aa581202f8dbe472ec2dfdf | 617 | ex | Elixir | test/support/inet_storage.ex | bytecrow/slowpoke_waffle | efbcb84b11a9ac75a6bb90f2261cae0aa650bcc0 | [
"MIT"
] | 1 | 2021-01-21T09:41:23.000Z | 2021-01-21T09:41:23.000Z | test/support/inet_storage.ex | bytecrow/slowpoke_waffle | efbcb84b11a9ac75a6bb90f2261cae0aa650bcc0 | [
"MIT"
] | null | null | null | test/support/inet_storage.ex | bytecrow/slowpoke_waffle | efbcb84b11a9ac75a6bb90f2261cae0aa650bcc0 | [
"MIT"
] | 1 | 2020-12-27T00:56:59.000Z | 2020-12-27T00:56:59.000Z | defmodule SlowpokeWaffleTest.InetStorage do
@moduledoc false
alias SlowpokeWaffleTest.Mediator
def put(definition, version, {file, _} = file_and_scope) do
Mediator.cast({:put_inet, {definition, version, file_and_scope}})
{:ok, file.file_name}
end
def url(definition, version, {file, _} = file_and_sc... | 29.380952 | 78 | 0.714749 |
33866d4ed17be91905fe67dd9ef9dfda58e926e1 | 349 | exs | Elixir | example/mix.exs | satom99/coxir | 75bce94dcbe5dfa49e920d2f4ce0de224c315ce4 | [
"Apache-2.0"
] | 178 | 2018-04-08T17:11:56.000Z | 2022-03-25T15:36:41.000Z | example/mix.exs | satom99/coxir | 75bce94dcbe5dfa49e920d2f4ce0de224c315ce4 | [
"Apache-2.0"
] | 21 | 2018-04-30T21:33:59.000Z | 2019-09-03T17:25:26.000Z | example/mix.exs | satom99/coxir | 75bce94dcbe5dfa49e920d2f4ce0de224c315ce4 | [
"Apache-2.0"
] | 25 | 2018-04-21T19:41:03.000Z | 2021-07-24T22:40:40.000Z | defmodule Example.MixProject do
use Mix.Project
def project do
[
app: :example,
version: "0.1.0",
elixir: "~> 1.11",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
def application do
[
mod: {Example, []}
]
end
defp deps do
[
{:coxir, ... | 13.423077 | 42 | 0.492837 |
3386ac3944febe2b64294db89e7aeb33bcc301f2 | 18,663 | ex | Elixir | lib/phoenix_live_view/view.ex | szTheory/phoenix_live_view | b476ee8bd0da5fc80974ee0fbbb1509bc7159bf9 | [
"MIT"
] | 1 | 2021-03-24T15:13:06.000Z | 2021-03-24T15:13:06.000Z | lib/phoenix_live_view/view.ex | szTheory/phoenix_live_view | b476ee8bd0da5fc80974ee0fbbb1509bc7159bf9 | [
"MIT"
] | null | null | null | lib/phoenix_live_view/view.ex | szTheory/phoenix_live_view | b476ee8bd0da5fc80974ee0fbbb1509bc7159bf9 | [
"MIT"
] | null | null | null | defmodule Phoenix.LiveView.View do
@moduledoc false
alias Phoenix.LiveView
alias Phoenix.LiveView.Socket
# Token version. Should be changed whenever new data is stored.
@token_vsn 2
# Max session age in seconds. Equivalent to 2 weeks.
@max_session_age 1_209_600
# Total length of 8 bytes when 64 enco... | 28.536697 | 99 | 0.635911 |
3386af9dff5344a37575efe86baabc060340710c | 73 | ex | Elixir | playground/elixir-live-doom-fire/lib/live_doom_fire_web/views/layout_view.ex | allmonty/doom-fire-algorithm | dac483b85973020c5f86962d3d9344018711043b | [
"MIT"
] | 12 | 2019-03-26T18:34:01.000Z | 2021-04-23T05:17:39.000Z | playground/elixir-live-doom-fire/lib/live_doom_fire_web/views/layout_view.ex | allmonty/doom-fire-algorithm | dac483b85973020c5f86962d3d9344018711043b | [
"MIT"
] | 5 | 2020-07-16T21:02:50.000Z | 2020-09-19T19:40:24.000Z | playground/elixir-live-doom-fire/lib/live_doom_fire_web/views/layout_view.ex | allmonty/doom-fire-algorithm | dac483b85973020c5f86962d3d9344018711043b | [
"MIT"
] | 1 | 2019-07-23T12:59:02.000Z | 2019-07-23T12:59:02.000Z | defmodule LiveDoomFireWeb.LayoutView do
use LiveDoomFireWeb, :view
end
| 18.25 | 39 | 0.835616 |
3386d9198e08da731f940b4227a0c1fde7d34a19 | 1,787 | ex | Elixir | lib/ash/resource/relationships/has_one.ex | MrFlorius/ash | 247abbb8333d252da5440a58ddf4f1b7f184342f | [
"MIT"
] | null | null | null | lib/ash/resource/relationships/has_one.ex | MrFlorius/ash | 247abbb8333d252da5440a58ddf4f1b7f184342f | [
"MIT"
] | null | null | null | lib/ash/resource/relationships/has_one.ex | MrFlorius/ash | 247abbb8333d252da5440a58ddf4f1b7f184342f | [
"MIT"
] | null | null | null | defmodule Ash.Resource.Relationships.HasOne do
@moduledoc "Represents a has_one relationship on a resource"
defstruct [
:name,
:source,
:destination,
:destination_field,
:private?,
:source_field,
:allow_orphans?,
:writable?,
:context,
:description,
:filter,
:sort,
... | 26.671642 | 109 | 0.554561 |
338713141f3d040611ec3449a9a333a18e807b95 | 2,258 | ex | Elixir | clients/docs/lib/google_api/docs/v1/model/table_range.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/docs/lib/google_api/docs/v1/model/table_range.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/docs/lib/google_api/docs/v1/model/table_range.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... | 42.603774 | 461 | 0.719663 |
33873efc5cf05c8e0c9db3eae5dec4e8484baa98 | 3,443 | exs | Elixir | test/central/helpers/schema_helper_test.exs | icexuick/teiserver | 22f2e255e7e21f977e6b262acf439803626a506c | [
"MIT"
] | 6 | 2021-02-08T10:42:53.000Z | 2021-04-25T12:12:03.000Z | test/central/helpers/schema_helper_test.exs | icexuick/teiserver | 22f2e255e7e21f977e6b262acf439803626a506c | [
"MIT"
] | null | null | null | test/central/helpers/schema_helper_test.exs | icexuick/teiserver | 22f2e255e7e21f977e6b262acf439803626a506c | [
"MIT"
] | 2 | 2021-02-23T22:34:00.000Z | 2021-04-08T13:31:36.000Z | defmodule Central.Helpers.SchemaHelperTest do
use Central.DataCase, async: true
alias Central.Helpers.SchemaHelper
# test "test currency" do
# params = %{"a" => "132.34"}
# names = [:a]
# result = SchemaHelper.parse_currency(params, names)
# assert result == %{"a" => Decimal.new("132.34")}
# ... | 25.887218 | 98 | 0.446123 |
33875d22231380d9917746e12b38dcbfc66d351c | 207 | exs | Elixir | apps/demo_web/test/demo_web_web/controllers/page_controller_test.exs | kimlindholm/gigalixir_umbrella_demo | 369cd029687bb05273d881082afe72e9ac3bc0c1 | [
"MIT"
] | 2 | 2019-05-26T12:57:38.000Z | 2020-01-22T20:28:32.000Z | apps/demo_web/test/demo_web_web/controllers/page_controller_test.exs | kimlindholm/gigalixir_umbrella_demo | 369cd029687bb05273d881082afe72e9ac3bc0c1 | [
"MIT"
] | null | null | null | apps/demo_web/test/demo_web_web/controllers/page_controller_test.exs | kimlindholm/gigalixir_umbrella_demo | 369cd029687bb05273d881082afe72e9ac3bc0c1 | [
"MIT"
] | null | null | null | defmodule DemoWebWeb.PageControllerTest do
use DemoWebWeb.ConnCase
test "GET /", %{conn: conn} do
conn = get(conn, "/")
assert html_response(conn, 200) =~ "Hello from Elixir umbrella"
end
end
| 23 | 67 | 0.690821 |
338768daf985da393853b8f608fa2b10f5076643 | 1,797 | exs | Elixir | config/config.exs | realyarilabs/exchange_api | c7dd9af9356277a022b164675cc1622359af8a76 | [
"Apache-2.0"
] | 3 | 2020-08-10T10:09:26.000Z | 2020-08-28T08:41:36.000Z | config/config.exs | realyarilabs/exchange_api | c7dd9af9356277a022b164675cc1622359af8a76 | [
"Apache-2.0"
] | 30 | 2020-08-17T10:38:24.000Z | 2022-02-28T07:06:42.000Z | config/config.exs | realyarilabs/exchange_api | c7dd9af9356277a022b164675cc1622359af8a76 | [
"Apache-2.0"
] | 1 | 2020-09-17T13:08:47.000Z | 2020-09-17T13:08:47.000Z | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
# General application configuration
use Mix.Config
config :exchange_api,
ecto_repos: [ExchangeApi... | 37.4375 | 89 | 0.761825 |
33877428ffc5f57dcdaf075b6a1e0aabe15b33dd | 206 | ex | Elixir | lib/docdog_web/views/layout_view.ex | sobolevn/docdog-engine | 5f7ad60465063fac3d56574f2bf27a4a52d0a91e | [
"MIT"
] | 40 | 2017-04-19T15:35:42.000Z | 2020-02-14T11:07:44.000Z | lib/docdog_web/views/layout_view.ex | sobolevn/docdog-engine | 5f7ad60465063fac3d56574f2bf27a4a52d0a91e | [
"MIT"
] | 43 | 2017-01-17T23:03:47.000Z | 2018-08-16T01:25:24.000Z | lib/docdog_web/views/layout_view.ex | sobolevn/docdog-engine | 5f7ad60465063fac3d56574f2bf27a4a52d0a91e | [
"MIT"
] | 6 | 2018-02-15T09:43:15.000Z | 2018-04-10T21:08:36.000Z | defmodule DocdogWeb.LayoutView do
use DocdogWeb, :view
def base_layout(conn, opts \\ [], do: contents) when is_list(opts) do
render("base.html", [conn: conn, contents: contents] ++ opts)
end
end
| 25.75 | 71 | 0.694175 |
33877f9e89c4e08f69acebc994479b9efd44eb1e | 270 | exs | Elixir | priv/repo/migrations/20200801214131_pow_create_users.exs | ryoung786/jeopardy | 5558fc49013c5a22e556a0040cbc116aa8f63912 | [
"MIT"
] | null | null | null | priv/repo/migrations/20200801214131_pow_create_users.exs | ryoung786/jeopardy | 5558fc49013c5a22e556a0040cbc116aa8f63912 | [
"MIT"
] | 32 | 2020-06-08T14:50:46.000Z | 2021-01-01T05:40:44.000Z | priv/repo/migrations/20200801214131_pow_create_users.exs | ryoung786/jeopardy | 5558fc49013c5a22e556a0040cbc116aa8f63912 | [
"MIT"
] | null | null | null | defmodule Jeopardy.Repo.Migrations.CreateUsers do
use Ecto.Migration
def change do
create table(:users) do
add :email, :string, null: false
add :password_hash, :string
timestamps()
end
create unique_index(:users, [:email])
end
end
| 18 | 49 | 0.67037 |
338785b6279fb31672902ff80c4c135c8f6d5389 | 1,810 | ex | Elixir | clients/analytics/lib/google_api/analytics/v3/model/ga_data_column_headers.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/analytics/lib/google_api/analytics/v3/model/ga_data_column_headers.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/analytics/lib/google_api/analytics/v3/model/ga_data_column_headers.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 33.518519 | 211 | 0.730939 |
33878d51357b940b98250c1d8b87b15ee771139b | 7,709 | ex | Elixir | lib/game/map.ex | jgsmith/ex_venture | 546adaa8fe80d45a72fde6de8d8d6906902c12d4 | [
"MIT"
] | 2 | 2019-05-14T11:36:44.000Z | 2020-07-01T08:54:04.000Z | lib/game/map.ex | nickwalton/ex_venture | d8ff1b0181db03f9ddcb7610ae7ab533feecbfbb | [
"MIT"
] | null | null | null | lib/game/map.ex | nickwalton/ex_venture | d8ff1b0181db03f9ddcb7610ae7ab533feecbfbb | [
"MIT"
] | 1 | 2021-01-29T14:12:40.000Z | 2021-01-29T14:12:40.000Z | defmodule Game.Map do
@moduledoc """
Map out a zone
"""
alias Data.Exit
@doc """
Find the coordinates for each room in a zone and the size of the zone
1,1 is top left
"""
@spec size_of_map(Zone.t(), integer) ::
{{integer, integer}, {integer, integer}, [{{integer, integer}, Room.t()}]}
d... | 25.52649 | 88 | 0.536645 |
3387a8c5a773f537f651847206ea36985b4e6b51 | 3,704 | exs | Elixir | test/mongo_ecto/migrations_test.exs | nisitjirauwat/mongodb_ecto | b89753774bd3e52e216c8175e2a1a5f5ebe817dc | [
"Apache-2.0"
] | 12 | 2020-06-21T15:34:44.000Z | 2021-07-28T12:32:02.000Z | test/mongo_ecto/migrations_test.exs | nisitjirauwat/mongodb_ecto | b89753774bd3e52e216c8175e2a1a5f5ebe817dc | [
"Apache-2.0"
] | 3 | 2021-05-09T02:42:00.000Z | 2021-08-06T15:49:44.000Z | test/mongo_ecto/migrations_test.exs | nisitjirauwat/mongodb_ecto | b89753774bd3e52e216c8175e2a1a5f5ebe817dc | [
"Apache-2.0"
] | 11 | 2020-06-24T13:46:43.000Z | 2021-04-28T21:05:58.000Z | defmodule Mongo.Ecto.MigrationsTest do
use ExUnit.Case
alias Ecto.Integration.TestRepo
import Ecto.Query, only: [from: 2]
defmodule CreateMigration do
use Ecto.Migration
@table table(:create_table_migration, options: [autoIndexId: false])
@index index(:create_table_migration, [:value], unique: tr... | 24.85906 | 91 | 0.679266 |
3387c9f6cce7a1489462a005e6a6dec2eaf7296c | 74 | exs | Elixir | test/views/layout_view_test.exs | ktornwall/wooper | 95b55d95853cf9c20f0dfaa7b6c5285956c02693 | [
"MIT"
] | 1 | 2017-05-11T08:06:52.000Z | 2017-05-11T08:06:52.000Z | test/views/layout_view_test.exs | ktornwall/wooper | 95b55d95853cf9c20f0dfaa7b6c5285956c02693 | [
"MIT"
] | null | null | null | test/views/layout_view_test.exs | ktornwall/wooper | 95b55d95853cf9c20f0dfaa7b6c5285956c02693 | [
"MIT"
] | null | null | null | defmodule Wooper.LayoutViewTest do
use Wooper.ConnCase, async: true
end
| 18.5 | 34 | 0.810811 |
3387e5155801336fce19e102dd2621646a53fdc4 | 5,209 | ex | Elixir | lib/absinthe/subscription.ex | TheRealReal/absinthe | 6eae5bc36283e58f42d032b8afd90de3ad64f97b | [
"MIT"
] | 1 | 2019-10-10T02:57:52.000Z | 2019-10-10T02:57:52.000Z | lib/absinthe/subscription.ex | TheRealReal/absinthe | 6eae5bc36283e58f42d032b8afd90de3ad64f97b | [
"MIT"
] | 1 | 2019-09-23T21:26:01.000Z | 2019-09-23T21:26:01.000Z | lib/absinthe/subscription.ex | TheRealReal/absinthe | 6eae5bc36283e58f42d032b8afd90de3ad64f97b | [
"MIT"
] | null | null | null | defmodule Absinthe.Subscription do
@moduledoc """
Real time updates via GraphQL
For a how to guide on getting started with Absinthe.Subscriptions in your phoenix
project see the Absinthe.Phoenix package.
Define in your schema via `Absinthe.Schema.subscription/2`
## Basic Usage
## Performance Character... | 27.130208 | 87 | 0.694183 |
338817453f757e9c9fb93dca1276d07f8eb9033c | 3,828 | ex | Elixir | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1__object_tracking_annotation.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1__object_tracking_annotation.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1__object_tracking_annotation.ex | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 42.065934 | 215 | 0.736416 |
33882342bf54899b3ba104a93c08a49866be3b8d | 653 | exs | Elixir | apps/examples/mix.exs | CalebOts/tai | 1603bfefa390eac89085ba18fd259b2e9fcac6c0 | [
"MIT"
] | 1 | 2019-12-19T05:16:26.000Z | 2019-12-19T05:16:26.000Z | apps/examples/mix.exs | CalebOts/tai | 1603bfefa390eac89085ba18fd259b2e9fcac6c0 | [
"MIT"
] | null | null | null | apps/examples/mix.exs | CalebOts/tai | 1603bfefa390eac89085ba18fd259b2e9fcac6c0 | [
"MIT"
] | null | null | null | defmodule Examples.MixProject do
use Mix.Project
def project do
[
app: :examples,
version: "0.0.44",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixir: "~> 1.8",
start_permanent: Mix.en... | 19.205882 | 56 | 0.54977 |
33882e3fdbd31e0c5986161cc6d3fc858cd18cfb | 2,504 | exs | Elixir | test/unit/blank_node/generator_test.exs | marcelotto/rdf-ex | 12adce69eb2dbff027cbc83aaaf912067aea1b02 | [
"MIT"
] | 53 | 2017-06-25T22:20:44.000Z | 2020-04-27T17:27:51.000Z | test/unit/blank_node/generator_test.exs | marcelotto/rdf-ex | 12adce69eb2dbff027cbc83aaaf912067aea1b02 | [
"MIT"
] | 7 | 2017-06-25T00:29:11.000Z | 2020-03-11T00:23:47.000Z | test/unit/blank_node/generator_test.exs | marcelotto/rdf-ex | 12adce69eb2dbff027cbc83aaaf912067aea1b02 | [
"MIT"
] | 2 | 2018-01-19T15:48:27.000Z | 2020-03-01T00:29:35.000Z | defmodule RDF.BlankNode.GeneratorTest do
use RDF.Test.Case
import RDF, only: [bnode: 1]
alias RDF.BlankNode.{Generator, Increment}
describe "Increment generator" do
test "generator without prefix" do
{:ok, generator} = start_supervised({Generator, Increment})
assert Generator.generate(genera... | 40.387097 | 98 | 0.662939 |
3388341715c1a8e899b06fc4d7ee23b86938863e | 183 | exs | Elixir | test/test_helper.exs | tuvistavie/projare | e776b2d326fed97e0dbf62530674fe688ff73ab8 | [
"MIT"
] | 3 | 2016-03-06T12:23:01.000Z | 2017-03-21T18:22:07.000Z | test/test_helper.exs | tuvistavie/projare | e776b2d326fed97e0dbf62530674fe688ff73ab8 | [
"MIT"
] | null | null | null | test/test_helper.exs | tuvistavie/projare | e776b2d326fed97e0dbf62530674fe688ff73ab8 | [
"MIT"
] | null | null | null | ExUnit.start
Mix.Task.run "ecto.create", ~w(-r Projare.Repo --quiet)
Mix.Task.run "ecto.migrate", ~w(-r Projare.Repo --quiet)
Ecto.Adapters.SQL.begin_test_transaction(Projare.Repo)
| 26.142857 | 56 | 0.743169 |
33885edf17887137bd7b929ac757f86b238fe7d9 | 1,525 | ex | Elixir | lib/rir/ctx.ex | hertogp/rircheck | ea7cb4c8e3867995d50eedc482e53bcf11cee958 | [
"MIT"
] | null | null | null | lib/rir/ctx.ex | hertogp/rircheck | ea7cb4c8e3867995d50eedc482e53bcf11cee958 | [
"MIT"
] | null | null | null | lib/rir/ctx.ex | hertogp/rircheck | ea7cb4c8e3867995d50eedc482e53bcf11cee958 | [
"MIT"
] | null | null | null | defmodule Rir.Ctx do
@moduledoc """
Functions to create, read, update a context
"""
alias Rir.Api
# Helpers
@spec to_asn(term) :: binary | RuntimeError
defp to_asn(arg) do
num = String.replace(arg, ~r/^AS/i, "")
{_, ""} = Integer.parse(num)
num
rescue
_ -> pfx2asn(arg)
end
defp ... | 19.0625 | 71 | 0.552787 |
338869643fb839cb102758dfcfd53a59205db20d | 760 | ex | Elixir | tests/server/lib/server_web/controllers/fallback_controller.ex | Webtrekk/Webtrekk-Smart-Pixel | 8ac5e5132d600ccd486573f88be84908b614530b | [
"MIT"
] | 6 | 2019-05-10T00:01:17.000Z | 2022-03-03T12:52:51.000Z | tests/server/lib/server_web/controllers/fallback_controller.ex | Webtrekk/Webtrekk-Smart-Pixel | 8ac5e5132d600ccd486573f88be84908b614530b | [
"MIT"
] | 4 | 2020-01-20T13:19:30.000Z | 2021-10-15T07:46:59.000Z | tests/server/lib/server_web/controllers/fallback_controller.ex | Webtrekk/Webtrekk-Smart-Pixel | 8ac5e5132d600ccd486573f88be84908b614530b | [
"MIT"
] | 2 | 2020-05-02T15:59:43.000Z | 2020-10-21T09:00:38.000Z | defmodule ServerWeb.FallbackController do
@moduledoc """
Translates controller action results into valid `Plug.Conn` responses.
See `Phoenix.Controller.action_fallback/1` for more details.
"""
use ServerWeb, :controller
# This clause handles errors returned by Ecto's insert/update/delete.
# def call(co... | 30.4 | 78 | 0.690789 |
3388a60ff8affcbd3834536211358455849fe1cb | 178 | exs | Elixir | src/dguweb/priv/repo/migrations/20160805143928_fix publisher description field.exs | datagovuk/dgu2 | 3e24bdf27b30c22791efc19029ead05488c8f571 | [
"MIT"
] | 2 | 2016-08-09T16:46:52.000Z | 2016-08-09T16:46:59.000Z | src/dguweb/priv/repo/migrations/20160805143928_fix publisher description field.exs | datagovuk/dgu2 | 3e24bdf27b30c22791efc19029ead05488c8f571 | [
"MIT"
] | 48 | 2016-07-14T15:12:41.000Z | 2016-09-27T16:19:54.000Z | src/dguweb/priv/repo/migrations/20160805143928_fix publisher description field.exs | datagovuk/dgu2 | 3e24bdf27b30c22791efc19029ead05488c8f571 | [
"MIT"
] | 1 | 2021-04-10T21:23:44.000Z | 2021-04-10T21:23:44.000Z | defmodule DGUWeb.Repo.Migrations.UpdatePublisherModel do
use Ecto.Migration
def change do
alter table(:publishers) do
modify :description, :text
end
end
end
| 17.8 | 56 | 0.730337 |
3388b4307e66d449436cdd8a357b96715ffcb02e | 1,046 | ex | Elixir | elixir/scrap_preview/lib/scrap/storage.ex | marcinbiegun/exercises | 36ad942e8d40d6471136326a3f6d09285bbd90aa | [
"MIT"
] | 1 | 2018-12-11T14:09:14.000Z | 2018-12-11T14:09:14.000Z | elixir/scrap_preview/lib/scrap/storage.ex | marcinbiegun/exercises | 36ad942e8d40d6471136326a3f6d09285bbd90aa | [
"MIT"
] | null | null | null | elixir/scrap_preview/lib/scrap/storage.ex | marcinbiegun/exercises | 36ad942e8d40d6471136326a3f6d09285bbd90aa | [
"MIT"
] | null | null | null | defmodule Scrap.Storage do
@moduledoc """
The Storage context.
"""
import Ecto.Query, warn: false
alias Scrap.Repo
alias Scrap.Storage.OfferPoint
@doc """
Returns the list of offer points.
## Examples
iex> list_offer_points()
[%OfferPoint{}, ...]
"""
def list_offer_p... | 17.728814 | 65 | 0.594646 |
3388ba2155786e6b35e27023166ab33f4077504a | 1,906 | ex | Elixir | clients/my_business_lodging/lib/google_api/my_business_lodging/v1/model/language_spoken.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/my_business_lodging/lib/google_api/my_business_lodging/v1/model/language_spoken.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/my_business_lodging/lib/google_api/my_business_lodging/v1/model/language_spoken.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... | 35.962264 | 217 | 0.711438 |
3388cc1f081091642223b8631bf8a12da48385ef | 1,166 | ex | Elixir | lib/jump_web/channels/user_socket.ex | SXKDZ/MultiJump | 97db71c3b207d8113987757a30f2f318c4a2fb58 | [
"MIT"
] | null | null | null | lib/jump_web/channels/user_socket.ex | SXKDZ/MultiJump | 97db71c3b207d8113987757a30f2f318c4a2fb58 | [
"MIT"
] | null | null | null | lib/jump_web/channels/user_socket.ex | SXKDZ/MultiJump | 97db71c3b207d8113987757a30f2f318c4a2fb58 | [
"MIT"
] | null | null | null | defmodule JumpWeb.UserSocket do
use Phoenix.Socket
## Channels
channel "room:lobby", JumpWeb.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.684211 | 83 | 0.704117 |
3388d384afd24a54024ec3e679977a2b68b37eed | 708 | ex | Elixir | src/mailer/lib/mailer_web/gettext.ex | alexjoybc/elixir-kafka-phoenix | c3d20415f980455081102f3bd4287647bf2292ba | [
"Apache-2.0"
] | null | null | null | src/mailer/lib/mailer_web/gettext.ex | alexjoybc/elixir-kafka-phoenix | c3d20415f980455081102f3bd4287647bf2292ba | [
"Apache-2.0"
] | null | null | null | src/mailer/lib/mailer_web/gettext.ex | alexjoybc/elixir-kafka-phoenix | c3d20415f980455081102f3bd4287647bf2292ba | [
"Apache-2.0"
] | null | null | null | defmodule MailerWeb.Gettext do
@moduledoc """
A module providing Internationalization with a gettext-based API.
By using [Gettext](https://hexdocs.pm/gettext),
your module gains a set of macros for translations, for example:
import MailerWeb.Gettext
# Simple translation
gettext("Here is the... | 28.32 | 72 | 0.676554 |
3388dcfc77485f603fbf4f72cedeefb84288731e | 392 | ex | Elixir | apps/content/lib/content/commentmeta.ex | votiakov/petal | ec03551da6dadc0c3482b25a5f5dcd400c36db43 | [
"MIT"
] | null | null | null | apps/content/lib/content/commentmeta.ex | votiakov/petal | ec03551da6dadc0c3482b25a5f5dcd400c36db43 | [
"MIT"
] | null | null | null | apps/content/lib/content/commentmeta.ex | votiakov/petal | ec03551da6dadc0c3482b25a5f5dcd400c36db43 | [
"MIT"
] | null | null | null | defmodule Legendary.Content.Commentmeta do
@moduledoc """
A piece of metadata about a comment on the site.
"""
use Ecto.Schema
import Ecto.Changeset
schema "commentmeta" do
field :comment_id, :integer
field :key, :string
field :value, :string
end
def changeset(struct, params \\ %{}) do
... | 20.631579 | 53 | 0.660714 |
33890511b52e2a7c8c6a6b300389dffba808629a | 7,486 | exs | Elixir | test/credo/check/refactor/pipe_chain_start_test.exs | jlgeering/credo | b952190ed758c262aa0d9bbee01227f9b1f0c63b | [
"MIT"
] | null | null | null | test/credo/check/refactor/pipe_chain_start_test.exs | jlgeering/credo | b952190ed758c262aa0d9bbee01227f9b1f0c63b | [
"MIT"
] | null | null | null | test/credo/check/refactor/pipe_chain_start_test.exs | jlgeering/credo | b952190ed758c262aa0d9bbee01227f9b1f0c63b | [
"MIT"
] | null | null | null | defmodule Credo.Check.Refactor.PipeChainStartTest do
use Credo.TestHelper
@described_check Credo.Check.Refactor.PipeChainStart
#
# cases NOT raising issues
#
test "it should NOT report expected code" do
~S"""
defmodule CredoSampleModule do
def some_function(parameter1, parameter2) do
... | 21.825073 | 114 | 0.541143 |
33891fc0821dcda31761d3b50d0a1c119a708755 | 2,180 | exs | Elixir | config/prod.exs | leolorenzoluis/poll | c1009e0796904414a94ef2e7509f7682d2910abf | [
"Apache-2.0"
] | 1 | 2016-08-05T23:37:29.000Z | 2016-08-05T23:37:29.000Z | config/prod.exs | leolorenzoluis/poll | c1009e0796904414a94ef2e7509f7682d2910abf | [
"Apache-2.0"
] | null | null | null | config/prod.exs | leolorenzoluis/poll | c1009e0796904414a94ef2e7509f7682d2910abf | [
"Apache-2.0"
] | null | null | null | use Mix.Config
# For production, we configure the host to read the PORT
# from the system environment. Therefore, you will need
# to set PORT=80 before running your server.
#
# You should also configure the url host to something
# meaningful, we use this information when generating URLs.
#
# Finally, we also include t... | 32.537313 | 67 | 0.710092 |
338922a3be149c6b4403a1809d0a38d6d4dbd2f3 | 2,463 | ex | Elixir | lib/sobelow/config/cswh.ex | mrsmkl/sobelow | b17b99617b91369acbd8db56b1341876fe3c8224 | [
"Apache-2.0"
] | null | null | null | lib/sobelow/config/cswh.ex | mrsmkl/sobelow | b17b99617b91369acbd8db56b1341876fe3c8224 | [
"Apache-2.0"
] | 3 | 2021-06-20T14:51:14.000Z | 2021-06-25T00:56:11.000Z | deps/sobelow/lib/sobelow/config/cswh.ex | carlosviana/blog | 1dcf58c3ca40bc3a7105d75de6f51954eb44bca8 | [
"MIT"
] | null | null | null | defmodule Sobelow.Config.CSWH do
@moduledoc """
# Cross-Site Websocket Hijacking
Websocket connections are not bound by the same-origin policy.
Connections that do not validate the origin may leak information
to an attacker.
More information can be found here: https://www.christian-schneider.net/CrossSite... | 25.391753 | 106 | 0.65002 |
33894a1a0a921ee41b91cb3a1163db9c30aec393 | 1,996 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/autoscaler_status_details.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/autoscaler_status_details.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/autoscaler_status_details.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... | 38.384615 | 453 | 0.772545 |
33898f0ff50e90e9dd1647414de492fa2e87f50e | 1,047 | ex | Elixir | lib/mastering_bitcoin/rpc_example.ex | paulfioravanti/mastering_bitcoin | 1cf2eb230d4c04cfca6829ea60c045fe4b0d1756 | [
"MIT"
] | 6 | 2018-01-15T06:54:18.000Z | 2018-07-12T17:50:29.000Z | lib/mastering_bitcoin/rpc_example.ex | paulfioravanti/mastering_bitcoin | 1cf2eb230d4c04cfca6829ea60c045fe4b0d1756 | [
"MIT"
] | null | null | null | lib/mastering_bitcoin/rpc_example.ex | paulfioravanti/mastering_bitcoin | 1cf2eb230d4c04cfca6829ea60c045fe4b0d1756 | [
"MIT"
] | null | null | null | defmodule MasteringBitcoin.RPCExample do
@moduledoc """
Example 3-3. Running getinfo via Bitcoin Core's JSON-RPC API.
Port over of `rpc_example.py` file.
"""
alias MasteringBitcoin.Client, as: RawProxy
@bitcoin_server_error """
Bitcoin server still warming up. \
run `brew services start bitcoin` for ... | 29.083333 | 74 | 0.642789 |
33898fd9fbebfeb129eff990abcc5a1ae1431e8c | 183 | ex | Elixir | lib/zaryn/p2p/message/invalid_transaction.ex | ambareesha7/node-zaryn | 136e542801bf9b6fa4a015d3464609fdf3dacee8 | [
"Apache-2.0"
] | 1 | 2021-07-06T19:47:14.000Z | 2021-07-06T19:47:14.000Z | lib/zaryn/p2p/message/invalid_transaction.ex | ambareesha7/node-zaryn | 136e542801bf9b6fa4a015d3464609fdf3dacee8 | [
"Apache-2.0"
] | null | null | null | lib/zaryn/p2p/message/invalid_transaction.ex | ambareesha7/node-zaryn | 136e542801bf9b6fa4a015d3464609fdf3dacee8 | [
"Apache-2.0"
] | null | null | null | defmodule Zaryn.P2P.Message.InvalidTransaction do
@moduledoc """
Represents a message to indicate the transaction is invalid
"""
defstruct []
@type t :: %__MODULE__{}
end
| 18.3 | 61 | 0.715847 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.