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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
384b7f418f3ae40f96bf3c6718fd4bc01e4fa005 | 357 | exs | Elixir | priv/repo/seeds.exs | cscairns/agile_pulse | 01675fc60c5ebc88e6e6c3304f2a5aa683528f7c | [
"CC0-1.0"
] | null | null | null | priv/repo/seeds.exs | cscairns/agile_pulse | 01675fc60c5ebc88e6e6c3304f2a5aa683528f7c | [
"CC0-1.0"
] | null | null | null | priv/repo/seeds.exs | cscairns/agile_pulse | 01675fc60c5ebc88e6e6c3304f2a5aa683528f7c | [
"CC0-1.0"
] | 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:
#
# AgilePulse.Repo.insert!(%AgilePulse.SomeSchema{})
#
# We recommend using the bang functions (`insert!`, `update!`
# and so on) as the... | 29.75 | 61 | 0.711485 |
384b98e8c11c183f929683df56f8b0199a295b88 | 433 | ex | Elixir | lib/ark_client/api/one/signature.ex | supaiku0/elixir-client | 2d5549ce3a876a18750a36a14ff769427688c5bb | [
"MIT"
] | null | null | null | lib/ark_client/api/one/signature.ex | supaiku0/elixir-client | 2d5549ce3a876a18750a36a14ff769427688c5bb | [
"MIT"
] | null | null | null | lib/ark_client/api/one/signature.ex | supaiku0/elixir-client | 2d5549ce3a876a18750a36a14ff769427688c5bb | [
"MIT"
] | null | null | null | defmodule ArkEcosystem.Client.API.One.Signature do
@moduledoc """
Documentation for ArkEcosystem.Client.API.One.Signature.
"""
import ArkClient
@doc """
Get the fee for a signature.
## Examples
iex> ArkEcosystem.Client.API.One.Signature.fee(client)
{:ok, 500000000}
"""
@spec fee(Tesla.... | 20.619048 | 63 | 0.676674 |
384bbf3d3359e95e0f7f3d6c6402a39cc0c04643 | 371 | exs | Elixir | apps/snapshot_registry/priv/repo/migrations/20200323125005_create_snapshots.exs | makerdao/qa_backend_gateway | 38e9a3f3f4b66212f1ee9d38b3b698a2a1f9a809 | [
"Apache-2.0"
] | 1 | 2020-10-23T19:25:27.000Z | 2020-10-23T19:25:27.000Z | apps/snapshot_registry/priv/repo/migrations/20200323125005_create_snapshots.exs | makerdao/qa_backend_gateway | 38e9a3f3f4b66212f1ee9d38b3b698a2a1f9a809 | [
"Apache-2.0"
] | 5 | 2019-01-11T11:48:08.000Z | 2019-01-16T17:29:23.000Z | apps/snapshot_registry/priv/repo/migrations/20200323125005_create_snapshots.exs | makerdao/qa_backend_gateway | 38e9a3f3f4b66212f1ee9d38b3b698a2a1f9a809 | [
"Apache-2.0"
] | 7 | 2019-10-09T05:49:52.000Z | 2022-03-23T16:48:45.000Z | defmodule Staxx.SnapshotRegistry.Repo.Migrations.CreateSnapshots do
use Ecto.Migration
def change do
create table("snapshots", primary_key: false) do
add(:id, :string, primary_key: true, autogenerate: false)
add(:description, :string)
add(:chain_type, :string)
timestamps()
end
... | 23.1875 | 67 | 0.690027 |
384bd2b406b1b4cbde73987e0688159be93d99d9 | 1,082 | ex | Elixir | lib/taut_web/channels/user_socket.ex | shimmerlabs/taut | 1f38f5ccfc39b94aa392105af6dfbf3a44a9cc19 | [
"MIT"
] | null | null | null | lib/taut_web/channels/user_socket.ex | shimmerlabs/taut | 1f38f5ccfc39b94aa392105af6dfbf3a44a9cc19 | [
"MIT"
] | null | null | null | lib/taut_web/channels/user_socket.ex | shimmerlabs/taut | 1f38f5ccfc39b94aa392105af6dfbf3a44a9cc19 | [
"MIT"
] | null | null | null | defmodule TautWeb.UserSocket do
use Phoenix.Socket
## Channels
# channel "room:*", TautWeb.RoomChannel
# Socket params are passed from the client and can
# be used to verify and authenticate a user. After
# verification, you can put default assigns into
# the socket that will be set for all channels, ie... | 30.055556 | 83 | 0.692237 |
384bdc87896e9a1f2fed6d0f351f5369830984b7 | 186 | ex | Elixir | lib/battle_box_web/views/docs_view.ex | GrantJamesPowell/battle_box | 301091955b68cd4672f6513d645eca4e3c4e17d0 | [
"Apache-2.0"
] | 2 | 2020-10-17T05:48:49.000Z | 2020-11-11T02:34:15.000Z | lib/battle_box_web/views/docs_view.ex | FlyingDutchmanGames/battle_box | 301091955b68cd4672f6513d645eca4e3c4e17d0 | [
"Apache-2.0"
] | 3 | 2020-05-18T05:52:21.000Z | 2020-06-09T07:24:14.000Z | lib/battle_box_web/views/docs_view.ex | FlyingDutchmanGames/battle_box | 301091955b68cd4672f6513d645eca4e3c4e17d0 | [
"Apache-2.0"
] | null | null | null | defmodule BattleBoxWeb.DocsView do
use BattleBoxWeb, :view
import BattleBox.InstalledGames, only: [installed_games: 0]
import BattleBox.Utilities.Humanize, only: [kebabify: 1]
end
| 31 | 61 | 0.790323 |
384be5e3d0cea126d38a02de76505021f646288f | 8,424 | exs | Elixir | test/groupher_server/cms/hooks/cite_meetup_test.exs | coderplanets/coderplanets_server | 3663e56340d6d050e974c91f7e499d8424fc25e9 | [
"Apache-2.0"
] | 240 | 2018-11-06T09:36:54.000Z | 2022-02-20T07:12:36.000Z | test/groupher_server/cms/hooks/cite_meetup_test.exs | coderplanets/coderplanets_server | 3663e56340d6d050e974c91f7e499d8424fc25e9 | [
"Apache-2.0"
] | 363 | 2018-07-11T03:38:14.000Z | 2021-12-14T01:42:40.000Z | test/groupher_server/cms/hooks/cite_meetup_test.exs | mydearxym/mastani_server | f24034a4a5449200165cf4a547964a0961793eab | [
"Apache-2.0"
] | 22 | 2019-01-27T11:47:56.000Z | 2021-02-28T13:17:52.000Z | defmodule GroupherServer.Test.CMS.Hooks.CiteMeetup do
use GroupherServer.TestTools
import Helper.Utils, only: [get_config: 2]
alias Helper.ORM
alias GroupherServer.CMS
alias CMS.Model.{Meetup, Comment, CitedArtiment}
alias CMS.Delegate.Hooks
@site_host get_config(:general, :site_host)
setup do
... | 36.467532 | 133 | 0.632479 |
384be8c804e56ab121ca0e928e437338bdf0f8cf | 5,951 | exs | Elixir | apps/ewallet_db/test/ewallet_db/token_test.exs | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | apps/ewallet_db/test/ewallet_db/token_test.exs | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | apps/ewallet_db/test/ewallet_db/token_test.exs | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 OmiseGO Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 32.519126 | 96 | 0.613006 |
384bf46279a570f444e019b27c5b9a5277e9e100 | 63 | ex | Elixir | web/views/layout_view.ex | noobiehacker/phoenixFilter | 42d913cc0b76b58ccbddf0a37b8f21dc6c639a3d | [
"Apache-2.0"
] | null | null | null | web/views/layout_view.ex | noobiehacker/phoenixFilter | 42d913cc0b76b58ccbddf0a37b8f21dc6c639a3d | [
"Apache-2.0"
] | null | null | null | web/views/layout_view.ex | noobiehacker/phoenixFilter | 42d913cc0b76b58ccbddf0a37b8f21dc6c639a3d | [
"Apache-2.0"
] | null | null | null | defmodule BluntApi.LayoutView do
use BluntApi.Web, :view
end
| 15.75 | 32 | 0.793651 |
384c1987a0e80dbda29d610e1b48f9d0693eeb78 | 676 | ex | Elixir | lib/expletive/agent.ex | rsolovjov/expletive | 75bbd20cc701b1dc743b8e294b9fc0ee6ca3e27c | [
"Apache-2.0"
] | null | null | null | lib/expletive/agent.ex | rsolovjov/expletive | 75bbd20cc701b1dc743b8e294b9fc0ee6ca3e27c | [
"Apache-2.0"
] | null | null | null | lib/expletive/agent.ex | rsolovjov/expletive | 75bbd20cc701b1dc743b8e294b9fc0ee6ca3e27c | [
"Apache-2.0"
] | null | null | null | defmodule Expletive.Agent do
@moduledoc false
#
# This is work in progress and not yet part of the public API
# Use at your own risk
#
def start_link(options) do
Agent.start_link(fn -> Expletive.configure(options) end)
end
@doc ""
def configure(agent, options) do
Agent.update(agent, &Exple... | 20.484848 | 63 | 0.671598 |
384c35b895227edcc1f44e0bae103f3bf8543e0c | 2,235 | ex | Elixir | bidding_poc/lib/bidding_poc/application.ex | KeenMate/phoenix-websocket-auction | 412148ad5621b511c0690b9395f4b6c9ce3a3352 | [
"MIT"
] | null | null | null | bidding_poc/lib/bidding_poc/application.ex | KeenMate/phoenix-websocket-auction | 412148ad5621b511c0690b9395f4b6c9ce3a3352 | [
"MIT"
] | null | null | null | bidding_poc/lib/bidding_poc/application.ex | KeenMate/phoenix-websocket-auction | 412148ad5621b511c0690b9395f4b6c9ce3a3352 | [
"MIT"
] | null | null | null | defmodule BiddingPoc.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
children = [
# Start the Telemetry supervisor
BiddingPocWeb.Telemetry,
Supervisor.child_spec({Regi... | 31.478873 | 92 | 0.708277 |
384c360e5ab1c5edf7a47bb9379c2c30b6e0f75f | 17,726 | ex | Elixir | lib/elixir/lib/code.ex | liveforeverx/elixir | cf3cf0bd5443b59206e5733602244bc3543f0a53 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/code.ex | liveforeverx/elixir | cf3cf0bd5443b59206e5733602244bc3543f0a53 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/code.ex | liveforeverx/elixir | cf3cf0bd5443b59206e5733602244bc3543f0a53 | [
"Apache-2.0"
] | null | null | null | defmodule Code do
@moduledoc """
Utilities for managing code compilation, code evaluation and code loading.
This module complements [Erlang's code module](http://www.erlang.org/doc/man/code.html)
to add behaviour which is specific to Elixir.
"""
@doc """
Lists all loaded files.
"""
def loaded_files ... | 31.484902 | 110 | 0.684926 |
384c43404709c2dcfc238c17d15c251f6bf6535c | 1,460 | exs | Elixir | deps/sqlitex/mix.exs | scouten/crash_esqlite_case | 986f0b0721399c7ed520f6b9df133980906e3f51 | [
"MIT"
] | null | null | null | deps/sqlitex/mix.exs | scouten/crash_esqlite_case | 986f0b0721399c7ed520f6b9df133980906e3f51 | [
"MIT"
] | null | null | null | deps/sqlitex/mix.exs | scouten/crash_esqlite_case | 986f0b0721399c7ed520f6b9df133980906e3f51 | [
"MIT"
] | null | null | null | defmodule Sqlitex.Mixfile do
use Mix.Project
def project do
[app: :sqlitex,
version: "1.1.1",
elixir: "~> 1.2",
deps: deps(),
package: package(),
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
"coveralls": :test,
"coveralls.detail": :test,
"covera... | 27.037037 | 85 | 0.558219 |
384ca10130f4e97d2ec12a88c65d723cff109ef5 | 1,300 | ex | Elixir | clients/books/lib/google_api/books/v1/model/geolayerdata_geo.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/books/lib/google_api/books/v1/model/geolayerdata_geo.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/books/lib/google_api/books/v1/model/geolayerdata_geo.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... | 28.26087 | 101 | 0.724615 |
384cca2f4af700fddf573d79cb220e87dbd2e802 | 552 | ex | Elixir | out/manticoresearch-elixir/lib/manticoresearch/model/bulk_response.ex | mihaj/openapi | 29e878b0be1218a897c4c86bf9d8d51f4d1a3e57 | [
"MIT"
] | null | null | null | out/manticoresearch-elixir/lib/manticoresearch/model/bulk_response.ex | mihaj/openapi | 29e878b0be1218a897c4c86bf9d8d51f4d1a3e57 | [
"MIT"
] | 3 | 2021-12-21T08:18:48.000Z | 2022-03-24T10:50:37.000Z | out/manticoresearch-elixir/lib/manticoresearch/model/bulk_response.ex | mihaj/openapi | 29e878b0be1218a897c4c86bf9d8d51f4d1a3e57 | [
"MIT"
] | 5 | 2021-12-11T06:10:14.000Z | 2022-03-18T11:05:24.000Z | # Manticore Search Client
# Copyright (c) 2020-2021, Manticore Software LTD (https://manticoresearch.com)
#
# All rights reserved
# Do not edit the class manually.
defmodule Manticoresearch.Model.BulkResponse do
@moduledoc """
Success bulk response
"""
@derive [Poison.Encoder]
defstruct [
:"items",
... | 17.806452 | 79 | 0.668478 |
384cf6ac78c6215a5184b1a29c93b9d0590ec1ec | 225 | exs | Elixir | config/defaults.exs | medek/elixir_complete | d946069005bdf3a00fe035520fa47058a7d6c9b1 | [
"0BSD"
] | null | null | null | config/defaults.exs | medek/elixir_complete | d946069005bdf3a00fe035520fa47058a7d6c9b1 | [
"0BSD"
] | null | null | null | config/defaults.exs | medek/elixir_complete | d946069005bdf3a00fe035520fa47058a7d6c9b1 | [
"0BSD"
] | null | null | null | use Mix.Config
config ElixirComplete, :port, 63500
config ElixirComplete, :root, System.cwd()
config ElixirComplete, :cache, false
config ElixirComplete, :mixfile, "mix.exs"
config ElixirComplete, :suicide_seconds, 1000
| 18.75 | 45 | 0.782222 |
384d3e029eef8c267f606fc6a8889ea68fcdfb51 | 26,967 | ex | Elixir | lib/mix/lib/mix/tasks/test.ex | nashby/elixir | 4384cbb8ef5946977a363300d1f02a6202ddaf4b | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/tasks/test.ex | nashby/elixir | 4384cbb8ef5946977a363300d1f02a6202ddaf4b | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/tasks/test.ex | nashby/elixir | 4384cbb8ef5946977a363300d1f02a6202ddaf4b | [
"Apache-2.0"
] | null | null | null | defmodule Mix.Tasks.Test do
use Mix.Task
alias Mix.Compilers.Test, as: CT
@compile {:no_warn_undefined, [ExUnit, ExUnit.Filters]}
@shortdoc "Runs a project's tests"
@recursive true
@preferred_cli_env :test
@moduledoc ~S"""
Runs the tests for a project.
This task starts the current application, loa... | 33.416357 | 113 | 0.678422 |
384d4d487c3aae594b2771cbd367d69a4a33d49f | 2,038 | exs | Elixir | test/philopets/files/images_test.exs | audacioustux/philopets | 9380416937d635d4b1f5e13fa6f8b52ee603addf | [
"blessing"
] | null | null | null | test/philopets/files/images_test.exs | audacioustux/philopets | 9380416937d635d4b1f5e13fa6f8b52ee603addf | [
"blessing"
] | null | null | null | test/philopets/files/images_test.exs | audacioustux/philopets | 9380416937d635d4b1f5e13fa6f8b52ee603addf | [
"blessing"
] | null | null | null | defmodule Philopets.Files.ImagesTest do
use Philopets.DataCase
alias Philopets.Files.Images
describe "images" do
alias Philopets.Files.Images.Image
alias Philopets.Accounts.ProfilesFixtures
import Philopets.Files.ImagesFixtures
@invalid_attrs %{name: nil, size: nil, profile_id: nil}
test ... | 31.84375 | 85 | 0.678606 |
384d586febb2a5dbc5c729b2dffaf8a9938fd47e | 2,566 | ex | Elixir | lib/cloak_ecto/migrator/cursor_stream.ex | nickdichev/cloak_ecto | 4e7c49dc3eaf623162aa5d55e91b83c49f3b2854 | [
"MIT"
] | 139 | 2018-12-17T13:52:42.000Z | 2022-03-27T02:58:55.000Z | lib/cloak_ecto/migrator/cursor_stream.ex | nickdichev/cloak_ecto | 4e7c49dc3eaf623162aa5d55e91b83c49f3b2854 | [
"MIT"
] | 25 | 2019-08-07T16:49:03.000Z | 2022-03-14T18:17:54.000Z | lib/cloak_ecto/migrator/cursor_stream.ex | nickdichev/cloak_ecto | 4e7c49dc3eaf623162aa5d55e91b83c49f3b2854 | [
"MIT"
] | 30 | 2019-01-09T12:36:16.000Z | 2022-03-14T18:03:28.000Z | defmodule Cloak.Ecto.Migrator.CursorStream do
@moduledoc false
# Returns a stream of primary key values from a database table associated
# with an Ecto.Schema.
#
# By default, uses the primary key as the cursor. Users can specify a
# custom list of cursor fields using the Cloak.CustomCursor behaviour.
im... | 25.405941 | 95 | 0.596648 |
384d651652f6200b1921e5be6ef1d3572682a70c | 978 | exs | Elixir | mix.exs | webstronauts/ex_verify_origin | 53f981652b88d42a6a64c3ad74563ccafdd53f56 | [
"MIT"
] | 1 | 2020-03-06T20:05:18.000Z | 2020-03-06T20:05:18.000Z | mix.exs | webstronauts/ex_verify_origin | 53f981652b88d42a6a64c3ad74563ccafdd53f56 | [
"MIT"
] | null | null | null | mix.exs | webstronauts/ex_verify_origin | 53f981652b88d42a6a64c3ad74563ccafdd53f56 | [
"MIT"
] | null | null | null | defmodule VerifyOrigin.MixProject do
use Mix.Project
@version "2.0.0"
@description "Plug adapter to protect from CSRF attacks by verifying the `Origin` header."
def project do
[
app: :ex_verify_origin,
version: @version,
elixir: "~> 1.9",
deps: deps(),
# Hex
package: p... | 19.56 | 92 | 0.556237 |
384d6aa0f8e3fceb0f7fa807e5cba950048e163f | 5,429 | ex | Elixir | apps/model/lib/model/vehicle.ex | fjlanasa/api | c39bc393aea572bfb81754b2ea1adf9dda9ce24a | [
"MIT"
] | 62 | 2019-01-17T12:34:39.000Z | 2022-03-20T21:49:47.000Z | apps/model/lib/model/vehicle.ex | fjlanasa/api | c39bc393aea572bfb81754b2ea1adf9dda9ce24a | [
"MIT"
] | 375 | 2019-02-13T15:30:50.000Z | 2022-03-30T18:50:41.000Z | apps/model/lib/model/vehicle.ex | fjlanasa/api | c39bc393aea572bfb81754b2ea1adf9dda9ce24a | [
"MIT"
] | 14 | 2019-01-16T19:35:57.000Z | 2022-02-26T18:55:54.000Z | defmodule Model.Vehicle do
@moduledoc """
Vehicle represents the current status of a vehicle.
"""
use Recordable, [
:id,
:trip_id,
:stop_id,
:route_id,
:direction_id,
:label,
:latitude,
:longitude,
:bearing,
:speed,
:current_status,
:current_stop_sequence,
:u... | 48.90991 | 185 | 0.639344 |
384d8f2434f8d934ee4f6342553980ce5d23478a | 2,821 | exs | Elixir | test/sbom_test.exs | TraceyOnim/sbom | 55ee8867d4c7f53b6e282a8aad584435c82d5379 | [
"BSD-3-Clause"
] | 21 | 2019-10-24T16:19:21.000Z | 2021-07-21T07:40:53.000Z | test/sbom_test.exs | TraceyOnim/sbom | 55ee8867d4c7f53b6e282a8aad584435c82d5379 | [
"BSD-3-Clause"
] | 5 | 2020-05-31T05:30:51.000Z | 2022-03-21T14:31:18.000Z | test/sbom_test.exs | TraceyOnim/sbom | 55ee8867d4c7f53b6e282a8aad584435c82d5379 | [
"BSD-3-Clause"
] | 8 | 2019-11-02T08:08:57.000Z | 2022-03-02T07:19:24.000Z | defmodule SBoMTest do
use ExUnit.Case
doctest SBoM
setup_all do
Mix.shell(Mix.Shell.Process)
:ok
end
setup do
Mix.Shell.Process.flush()
:ok
end
describe "components_for_project" do
test "basic project" do
Mix.Project.in_project(:sample1, "test/fixtures/sample1", fn _mod ->
... | 38.643836 | 86 | 0.571074 |
384d985f6790257e3f0cf00b2bbee2be4f890b6b | 1,325 | exs | Elixir | test/protobuf/validator_test.exs | qinix/protobuf-elixir | 60e0e3981aeac897cddb5fde707d30fea7f72067 | [
"MIT"
] | null | null | null | test/protobuf/validator_test.exs | qinix/protobuf-elixir | 60e0e3981aeac897cddb5fde707d30fea7f72067 | [
"MIT"
] | null | null | null | test/protobuf/validator_test.exs | qinix/protobuf-elixir | 60e0e3981aeac897cddb5fde707d30fea7f72067 | [
"MIT"
] | null | null | null | Code.require_file("../support/test_msg.ex", __DIR__)
defmodule Protobuf.ValidatorTest do
use ExUnit.Case, async: true
test "oneof valid for valid tuple and nil" do
msg = TestMsg.Oneof.new(first: {:a, 42})
assert true = Protobuf.Validator.valid?(msg)
end
test "oneof valid for valid tuple and nil when ... | 30.113636 | 68 | 0.671698 |
384d9a7bca8aadafa013d02c2e377f2399dcc3e6 | 1,527 | exs | Elixir | chapter-10/list-and-recursion-8.exs | carlos4ndre/elixir-exercises | 3673cf69d08a6c7de53224f8956f0db21e7c5dad | [
"MIT"
] | 55 | 2015-12-09T09:23:50.000Z | 2022-01-31T21:14:59.000Z | chapter-10/list-and-recursion-8.exs | carlos4ndre/elixir-exercises | 3673cf69d08a6c7de53224f8956f0db21e7c5dad | [
"MIT"
] | 3 | 2016-06-15T12:53:39.000Z | 2017-08-21T18:20:42.000Z | chapter-10/list-and-recursion-8.exs | carlos4ndre/elixir-exercises | 3673cf69d08a6c7de53224f8956f0db21e7c5dad | [
"MIT"
] | 18 | 2016-01-01T18:18:23.000Z | 2021-05-24T02:22:42.000Z | tax_rates = [NC: 0.075, TX: 0.08]
orders = [
[id: 123, ship_to: :NC, net_amount: 100.00],
[id: 124, ship_to: :OK, net_amount: 35.50],
[id: 125, ship_to: :TX, net_amount: 24.00],
[id: 126, ship_to: :TX, net_amount: 44.80],
[id: 127, ship_to: :NC, net_amount: 25.00],
[id: 128, ship_to: :MA, net_amount: 1... | 36.357143 | 91 | 0.664047 |
384dbada6a44cc0ad0416c5f70e18b7c5ccff15b | 746 | exs | Elixir | mix.exs | behe/redis-ex | 191487c36f0f0928ef461a3bbe5330556e55e5cb | [
"MIT"
] | null | null | null | mix.exs | behe/redis-ex | 191487c36f0f0928ef461a3bbe5330556e55e5cb | [
"MIT"
] | null | null | null | mix.exs | behe/redis-ex | 191487c36f0f0928ef461a3bbe5330556e55e5cb | [
"MIT"
] | null | null | null | defmodule Redis.Mixfile do
use Mix.Project
def project do
[app: :redis,
version: "0.0.1",
elixir: "~> 1.0",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps]
end
# Configuration for the OTP application
#
# Type `mix help compile.app` for more inf... | 20.722222 | 77 | 0.58311 |
384dcadf24e6c9b1836a20041137f2003b045180 | 15,170 | ex | Elixir | lib/expline/spline.ex | am-kantox/expline | e065a9435366d1b0b68af414617d4e0fbc72a0b5 | [
"MIT"
] | null | null | null | lib/expline/spline.ex | am-kantox/expline | e065a9435366d1b0b68af414617d4e0fbc72a0b5 | [
"MIT"
] | null | null | null | lib/expline/spline.ex | am-kantox/expline | e065a9435366d1b0b68af414617d4e0fbc72a0b5 | [
"MIT"
] | null | null | null | defmodule Expline.Spline do
alias Expline.Matrix
alias Expline.Vector
@closeness_threshold 1.0e-15
@moduledoc """
`Expline.Spline` is the module defining the struct and functions for
constructing cubic splines and interpolating values along them. It is the core
module and data structure for the library.... | 36.291866 | 155 | 0.632498 |
384e0cf478dd4b501a834100137fdb5e484ee20d | 1,003 | ex | Elixir | exercises/concept/file-sniffer/.meta/exemplar.ex | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 343 | 2017-06-22T16:28:28.000Z | 2022-03-25T21:33:32.000Z | exercises/concept/file-sniffer/.meta/exemplar.ex | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 583 | 2017-06-19T10:48:40.000Z | 2022-03-28T21:43:12.000Z | exercises/concept/file-sniffer/.meta/exemplar.ex | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 228 | 2017-07-05T07:09:32.000Z | 2022-03-27T08:59:08.000Z | defmodule FileSniffer do
def type_from_extension("bmp"), do: "image/bmp"
def type_from_extension("png"), do: "image/png"
def type_from_extension("jpg"), do: "image/jpg"
def type_from_extension("gif"), do: "image/gif"
def type_from_extension("exe"), do: "application/octet-stream"
def type_from_binary(<<0x42... | 35.821429 | 93 | 0.686939 |
384e13af1b3587e434a195bb6a60f0921bebc326 | 1,043 | ex | Elixir | lib/ua_inspector.ex | elixir-twister/ua_inspector | 70642c66c9562d6879fd462e2f9993edb8ab4ce1 | [
"Apache-2.0"
] | null | null | null | lib/ua_inspector.ex | elixir-twister/ua_inspector | 70642c66c9562d6879fd462e2f9993edb8ab4ce1 | [
"Apache-2.0"
] | null | null | null | lib/ua_inspector.ex | elixir-twister/ua_inspector | 70642c66c9562d6879fd462e2f9993edb8ab4ce1 | [
"Apache-2.0"
] | 1 | 2020-01-30T18:55:12.000Z | 2020-01-30T18:55:12.000Z | defmodule UAInspector do
@moduledoc """
UAInspector Application
"""
use Application
def start(_type, _args) do
import Supervisor.Spec
options = [ strategy: :one_for_one, name: UAInspector.Supervisor ]
children = [
UAInspector.Pool.child_spec,
supervisor(UAInspector.Database.Superv... | 22.191489 | 71 | 0.669223 |
384e344e4416c45f564403efef50f1c8cd96f25c | 565 | ex | Elixir | test/support/datadog_test_api_server.ex | jaydeesimon/spandex_datadog | 466760b132cecc2011a28902f1b148fa125dafba | [
"MIT"
] | 43 | 2018-10-01T16:29:52.000Z | 2022-03-14T05:25:26.000Z | test/support/datadog_test_api_server.ex | jaydeesimon/spandex_datadog | 466760b132cecc2011a28902f1b148fa125dafba | [
"MIT"
] | 42 | 2018-08-23T05:25:23.000Z | 2022-01-31T19:54:34.000Z | test/support/datadog_test_api_server.ex | jaydeesimon/spandex_datadog | 466760b132cecc2011a28902f1b148fa125dafba | [
"MIT"
] | 31 | 2018-08-29T17:17:04.000Z | 2022-03-02T21:07:09.000Z | defmodule SpandexDatadog.Test.Support.TestApiServer do
@moduledoc """
Simply sends the data that would have been sent to datadog to self() as a message
so that the test can assert on payloads that would have been sent to datadog
"""
alias Spandex.Trace
alias SpandexDatadog.ApiServer
def send_trace(trace... | 31.388889 | 83 | 0.729204 |
384e36a91402738e91ff59b8d786dbde1ed729af | 352 | exs | Elixir | priv/repo/seeds.exs | noobiehacker/phoenixFilter | 42d913cc0b76b58ccbddf0a37b8f21dc6c639a3d | [
"Apache-2.0"
] | null | null | null | priv/repo/seeds.exs | noobiehacker/phoenixFilter | 42d913cc0b76b58ccbddf0a37b8f21dc6c639a3d | [
"Apache-2.0"
] | null | null | null | priv/repo/seeds.exs | noobiehacker/phoenixFilter | 42d913cc0b76b58ccbddf0a37b8f21dc6c639a3d | [
"Apache-2.0"
] | 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:
#
# BluntApi.Repo.insert!(%BluntApi.SomeModel{})
#
# We recommend using the bang functions (`insert!`, `update!`
# and so on) as they wil... | 29.333333 | 61 | 0.707386 |
384e487b4d1d6e775edd0faa45ffc8a4de233c0e | 1,434 | ex | Elixir | clients/secret_manager/lib/google_api/secret_manager/v1/model/replica.ex | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"Apache-2.0"
] | null | null | null | clients/secret_manager/lib/google_api/secret_manager/v1/model/replica.ex | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"Apache-2.0"
] | null | null | null | clients/secret_manager/lib/google_api/secret_manager/v1/model/replica.ex | 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... | 30.510638 | 137 | 0.732218 |
384e66904d93af032218f29041c7ab75bae6c6b4 | 2,989 | ex | Elixir | clients/docs/lib/google_api/docs/v1/model/image_properties.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/docs/lib/google_api/docs/v1/model/image_properties.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/docs/lib/google_api/docs/v1/model/image_properties.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.513889 | 135 | 0.688525 |
384e7fcc9c2ae9f46284de8323e768466966ee41 | 466 | exs | Elixir | config/config.exs | wuminzhe/elixir-node | eb87b47339a8349bac767dd4cf597dfaf0ed75c6 | [
"ISC"
] | 131 | 2018-03-10T01:35:56.000Z | 2021-12-27T13:44:41.000Z | config/config.exs | wuminzhe/elixir-node | eb87b47339a8349bac767dd4cf597dfaf0ed75c6 | [
"ISC"
] | 445 | 2018-03-12T09:46:17.000Z | 2018-12-12T09:52:07.000Z | config/config.exs | friendshipismagic/Hekateros | 0d340b6818583e2e65b0395227c9bb91796e5f89 | [
"MIT"
] | 23 | 2018-03-12T12:01:28.000Z | 2022-03-06T09:22:17.000Z | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
# By default, the umbrella project as well as each child
# application will require this configuration file, ensuring
# they all use the same configuration. While one could
# configu... | 42.363636 | 61 | 0.793991 |
384ea41cd05b144fc2c4f9cb86a837dfb578664f | 657 | ex | Elixir | web/views/error_view.ex | codebender/5280elixir | f7dee84b785b70f61b44f4dccacfe0311ad39617 | [
"MIT"
] | null | null | null | web/views/error_view.ex | codebender/5280elixir | f7dee84b785b70f61b44f4dccacfe0311ad39617 | [
"MIT"
] | null | null | null | web/views/error_view.ex | codebender/5280elixir | f7dee84b785b70f61b44f4dccacfe0311ad39617 | [
"MIT"
] | null | null | null | defmodule Elixir5280.ErrorView do
use Elixir5280.Web, :view
def render("404.html", _assigns) do
"Page not found"
end
def render("500.html", _assigns) do
"Server internal error"
end
def render("404.json", _assigns) do
%{errors: %{message: "Not Found"}}
end
def render("500.json", _assigns)... | 21.9 | 62 | 0.694064 |
384ebf3ccbd417ca36dbb095ed3785b0436f7fc3 | 5,447 | ex | Elixir | apps/mishka_html/lib/mishka_html_web/live/components/admin/comment/search_component.ex | mishka-group/mishka-cms | 4e34ed646f807687f4ae809e862acb6f2c5aacef | [
"Apache-2.0"
] | 35 | 2021-06-26T09:05:50.000Z | 2022-03-30T15:41:22.000Z | apps/mishka_html/lib/mishka_html_web/live/components/admin/comment/search_component.ex | mishka-group/mishka-cms | 4e34ed646f807687f4ae809e862acb6f2c5aacef | [
"Apache-2.0"
] | 101 | 2021-01-01T09:54:07.000Z | 2022-03-28T10:02:24.000Z | apps/mishka_html/lib/mishka_html_web/live/components/admin/comment/search_component.ex | mishka-group/mishka-cms | 4e34ed646f807687f4ae809e862acb6f2c5aacef | [
"Apache-2.0"
] | 8 | 2021-01-17T17:08:07.000Z | 2022-03-11T16:12:06.000Z | defmodule MishkaHtmlWeb.Admin.Comment.SearchComponent do
use MishkaHtmlWeb, :live_component
def render(assigns) do
~L"""
<div class="clearfix"></div>
<div class="col space30"> </div>
<hr>
<div class="clearfix"></div>
<div class="col space30"> </div>
<h2 class="vazir">
... | 58.569892 | 200 | 0.578667 |
384ec0bf59ccb13f6c8462f7df1a89555db1f905 | 758 | ex | Elixir | lib/mix/khafra.sphinx.download.ex | praxis-of-nines/khemia-search | 554df16836b8d98e993d72a2a2b17894f1e25454 | [
"MIT"
] | 7 | 2019-02-05T20:58:56.000Z | 2020-05-29T13:34:32.000Z | lib/mix/khafra.sphinx.download.ex | praxis-of-nines/khafra-search | 554df16836b8d98e993d72a2a2b17894f1e25454 | [
"MIT"
] | null | null | null | lib/mix/khafra.sphinx.download.ex | praxis-of-nines/khafra-search | 554df16836b8d98e993d72a2a2b17894f1e25454 | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.Khafra.Sphinx.Download do
use Mix.Task
alias Khafra.Init.Tasks
@shortdoc "Download Sphinx source with binaries for given system"
@moduledoc """
Mix shortcut to downloading Sphinx for your system. Pass the desired system using options shown
below.
Options:
The system you wish to... | 24.451613 | 101 | 0.725594 |
384ecf51981347a3ea8af4aa763f5d1969fe8052 | 919 | exs | Elixir | mix.exs | ukazap/ecto-ulid | 77452235958fb51b00570f555558582cac02b8cb | [
"MIT"
] | 83 | 2018-06-07T10:11:35.000Z | 2022-03-25T02:31:51.000Z | mix.exs | ukazap/ecto-ulid | 77452235958fb51b00570f555558582cac02b8cb | [
"MIT"
] | 11 | 2018-11-18T13:44:13.000Z | 2022-03-19T06:29:12.000Z | mix.exs | ukazap/ecto-ulid | 77452235958fb51b00570f555558582cac02b8cb | [
"MIT"
] | 24 | 2018-11-18T13:33:01.000Z | 2021-12-08T14:09:04.000Z | defmodule Ecto.ULID.Mixfile do
use Mix.Project
def project do
[
app: :ecto_ulid,
version: "0.3.0",
elixir: "~> 1.4",
start_permanent: Mix.env == :prod,
deps: deps(),
name: "Ecto.ULID",
description: "An Ecto.Type implementation of ULID.",
package: package(),
... | 21.880952 | 71 | 0.54951 |
384ee41ab78e2bae13962210f8c6dab7508a8697 | 2,481 | ex | Elixir | lib/oli/activities/parse_utils.ex | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | 1 | 2022-03-17T20:35:47.000Z | 2022-03-17T20:35:47.000Z | lib/oli/activities/parse_utils.ex | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | 9 | 2021-11-02T16:52:09.000Z | 2022-03-25T15:14:01.000Z | lib/oli/activities/parse_utils.ex | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | null | null | null | defmodule Oli.Activities.ParseUtils do
import Oli.Utils
@doc """
Takes a list of items that are either of the
form {:ok, struct} or {:error, string} and if any
errors are present it returns {:error, [string]}.
If all entries are {:ok, struct} then this
returns {:ok, [struct]}
"""
def items_or_errors(... | 25.57732 | 85 | 0.516727 |
384ee9c732900d9f41eecb0884b89e795b024f4e | 203 | ex | Elixir | lib/windtrap/varint.ex | gballet/windtrap | 6661c7929adac28dda361d73cf7a01e652070c19 | [
"MIT"
] | 15 | 2019-02-01T19:08:48.000Z | 2021-11-04T01:34:48.000Z | lib/windtrap/varint.ex | gballet/windtrap | 6661c7929adac28dda361d73cf7a01e652070c19 | [
"MIT"
] | 4 | 2018-12-16T09:11:30.000Z | 2018-12-16T09:15:29.000Z | lib/windtrap/varint.ex | gballet/windtrap | 6661c7929adac28dda361d73cf7a01e652070c19 | [
"MIT"
] | 1 | 2020-09-09T21:29:37.000Z | 2020-09-09T21:29:37.000Z | defmodule Windtrap.Varint do
def varint(<<x, rest :: binary>>) when x < 128 do
{x, rest}
end
def varint(<<x, rest :: binary>>) when x >= 128 do
{z, r} = varint(rest)
{x-128 + 128*z, r}
end
end
| 20.3 | 51 | 0.591133 |
384f0b14c1902bf2fe7d11406d2cc3ef00bc2afe | 2,412 | ex | Elixir | lib/mix/tasks/licenses.ex | Cantido/hex_licenses | 4bb9c1135321fd133c3548eaddefccd2753195c7 | [
"MIT"
] | 4 | 2021-09-14T10:33:57.000Z | 2022-03-03T01:02:02.000Z | lib/mix/tasks/licenses.ex | Cantido/hex_licenses | 4bb9c1135321fd133c3548eaddefccd2753195c7 | [
"MIT"
] | 3 | 2021-09-19T08:06:19.000Z | 2021-09-22T17:28:13.000Z | lib/mix/tasks/licenses.ex | Cantido/hex_licenses | 4bb9c1135321fd133c3548eaddefccd2753195c7 | [
"MIT"
] | null | null | null | # SPDX-FileCopyrightText: 2021 Rosa Richter
#
# SPDX-License-Identifier: MIT
defmodule Mix.Tasks.Licenses do
@moduledoc """
Lists all dependencies along with a summary of their licenses.
This task checks each entry in dependency package's `:licenses` list against the SPDX License List.
To see details about l... | 26.8 | 128 | 0.639718 |
384f1424449671380526cb739bc54cde1034dc93 | 9,779 | exs | Elixir | test/hex/resolver_test.exs | sudix/hex | f739a57d8829ea0b0f7759c164dc9149c3340e49 | [
"Apache-2.0"
] | null | null | null | test/hex/resolver_test.exs | sudix/hex | f739a57d8829ea0b0f7759c164dc9149c3340e49 | [
"Apache-2.0"
] | 1 | 2021-06-25T15:19:59.000Z | 2021-06-25T15:19:59.000Z | test/hex/resolver_test.exs | sudix/hex | f739a57d8829ea0b0f7759c164dc9149c3340e49 | [
"Apache-2.0"
] | null | null | null | defmodule Hex.ResolverTest do
use HexTest.Case
alias Hex.Registry.Server, as: Registry
defp resolve(reqs, locked \\ [], repos \\ %{}) do
reqs = Enum.reverse(reqs)
deps = deps(reqs)
top_level = Enum.map(deps, &elem(&1, 1))
reqs = reqs(reqs)
locked = locked(locked)
[reqs, locked]
|> En... | 30.464174 | 150 | 0.528377 |
384f19764154247de643fc9ceb9f61c211ff22f3 | 3,010 | ex | Elixir | apps/ewallet/lib/ewallet/web/v1/serializers/transaction_request_serializer.ex | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | null | null | null | apps/ewallet/lib/ewallet/web/v1/serializers/transaction_request_serializer.ex | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | null | null | null | apps/ewallet/lib/ewallet/web/v1/serializers/transaction_request_serializer.ex | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | null | null | null | defmodule EWallet.Web.V1.TransactionRequestSerializer do
@moduledoc """
Serializes transaction request data into V1 JSON response format.
"""
alias Ecto.Association.NotLoaded
alias EWallet.Web.V1.{
AccountSerializer,
TokenSerializer,
UserSerializer,
WalletSerializer,
PaginatorSerializer
... | 40.675676 | 92 | 0.753156 |
384f20a2a0551fbb22f41fd7639bb0c69a5af3be | 709 | ex | Elixir | lib/dialyxir/warnings/opaque_type_test.ex | staring-frog/dialyxir | b78735f75b325238b7db20d9eed22f018cca5f26 | [
"Apache-2.0"
] | 1,455 | 2015-01-03T02:53:19.000Z | 2022-03-12T00:31:25.000Z | lib/dialyxir/warnings/opaque_type_test.ex | staring-frog/dialyxir | b78735f75b325238b7db20d9eed22f018cca5f26 | [
"Apache-2.0"
] | 330 | 2015-05-14T13:53:13.000Z | 2022-03-29T17:12:23.000Z | lib/dialyxir/warnings/opaque_type_test.ex | staring-frog/dialyxir | b78735f75b325238b7db20d9eed22f018cca5f26 | [
"Apache-2.0"
] | 146 | 2015-02-03T18:19:43.000Z | 2022-03-07T10:05:20.000Z | defmodule Dialyxir.Warnings.OpaqueTypeTest do
@behaviour Dialyxir.Warning
@impl Dialyxir.Warning
@spec warning() :: :opaque_type_test
def warning(), do: :opaque_type_test
@impl Dialyxir.Warning
@spec format_short([String.t()]) :: String.t()
def format_short([function, _opaque]) do
"The type test in ... | 27.269231 | 87 | 0.700987 |
384f3bdcff5c7ef5d63ae6ba680c8272ef7b9c3c | 1,488 | exs | Elixir | test/cog/group_test.exs | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 1,003 | 2016-02-23T17:21:12.000Z | 2022-02-20T14:39:35.000Z | test/cog/group_test.exs | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 906 | 2016-02-22T22:54:19.000Z | 2022-03-11T15:19:43.000Z | test/cog/group_test.exs | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 95 | 2016-02-23T13:42:31.000Z | 2021-11-30T14:39:55.000Z | defmodule GroupTest do
use Cog.ModelCase
alias Cog.Repository.Groups
setup do
{:ok, [user: user("cog"),
role: role("create"),
group: group("test_group"),
permission: permission("test:creation")]}
end
test "users can be added as members of a group", %{user: user, group: g... | 33.818182 | 91 | 0.669355 |
384f3e2df85ef47c4a2a15a69fbed97617d57e28 | 6,479 | exs | Elixir | apps/andi/test/unit/andi_web/live/ingestion_live_view/select_dataset_modal_test.exs | UrbanOS-Public/smartcitiesdata | c4f4d83fcd1bbae5f4d3f47a9b218f3d991a51cd | [
"Apache-2.0"
] | 8 | 2021-10-31T18:45:02.000Z | 2022-03-05T18:33:08.000Z | apps/andi/test/unit/andi_web/live/ingestion_live_view/select_dataset_modal_test.exs | UrbanOS-Public/smartcitiesdata | c4f4d83fcd1bbae5f4d3f47a9b218f3d991a51cd | [
"Apache-2.0"
] | 7 | 2022-01-14T21:21:23.000Z | 2022-03-16T17:23:10.000Z | apps/andi/test/unit/andi_web/live/ingestion_live_view/select_dataset_modal_test.exs | UrbanOS-Public/smartcitiesdata | c4f4d83fcd1bbae5f4d3f47a9b218f3d991a51cd | [
"Apache-2.0"
] | 1 | 2022-03-08T23:45:02.000Z | 2022-03-08T23:45:02.000Z | defmodule AndiWeb.IngestionLiveView.SelectDatasetModalTest do
use AndiWeb.Test.AuthConnCase.UnitCase
use Placebo
import Phoenix.ConnTest
alias Andi.Schemas.User
import Phoenix.LiveViewTest
import FlokiHelpers, only: [get_text: 2]
alias SmartCity.TestDataGenerator, as: TDG
alias Andi.InputSchemas.Inges... | 35.598901 | 127 | 0.646705 |
384f875837088ec867535275a6368a3a541ef15a | 2,764 | ex | Elixir | lib/validators/luhn.ex | acolin/ecto_commons | 5a1c65d07f802ec7d43ec111e3f2d83ee93b585e | [
"MIT"
] | 30 | 2020-09-08T03:52:19.000Z | 2022-03-24T09:55:14.000Z | lib/validators/luhn.ex | acolin/ecto_commons | 5a1c65d07f802ec7d43ec111e3f2d83ee93b585e | [
"MIT"
] | 32 | 2020-10-15T08:56:50.000Z | 2022-03-25T09:09:13.000Z | lib/validators/luhn.ex | acolin/ecto_commons | 5a1c65d07f802ec7d43ec111e3f2d83ee93b585e | [
"MIT"
] | 6 | 2020-10-14T19:49:07.000Z | 2022-01-19T09:37:22.000Z | defmodule EctoCommons.LuhnValidator do
@moduledoc """
This ecto validator checks the provided value is valid
using the Luhn algorithm. This is useful for credit cards and other
common administrative values.
The validator accepts an optional `:transformer` function
that can modify the value before applying ... | 40.057971 | 178 | 0.63097 |
384fabd6b5d6c91e2f0753da943f76b90f4d67b2 | 179 | exs | Elixir | apps/data/priv/repo/migrations/20170826024456_add_unique_constraint_to_projects.exs | elixirschool/extracurricular | eb8b725fa49ca91b1c6b7e610a8522bc81a80de1 | [
"MIT"
] | 48 | 2017-08-21T02:08:16.000Z | 2022-01-05T14:02:56.000Z | apps/data/priv/repo/migrations/20170826024456_add_unique_constraint_to_projects.exs | elixirschool/extracurricular | eb8b725fa49ca91b1c6b7e610a8522bc81a80de1 | [
"MIT"
] | 68 | 2017-08-21T02:17:32.000Z | 2017-11-09T15:56:27.000Z | apps/data/priv/repo/migrations/20170826024456_add_unique_constraint_to_projects.exs | elixirschool/extracurricular | eb8b725fa49ca91b1c6b7e610a8522bc81a80de1 | [
"MIT"
] | 26 | 2017-08-21T04:28:22.000Z | 2018-12-09T14:20:29.000Z | defmodule Data.Repo.Migrations.AddUniqueConstraintToProjects do
use Ecto.Migration
def change do
create unique_index(:projects, :url, name: :project_url_index)
end
end
| 22.375 | 66 | 0.787709 |
384fb881bdcab757f0a84cb2efa7336e33fe7396 | 4,147 | exs | Elixir | apps/ewallet_api/test/ewallet_api/v1/plugs/client_auth_plug_test.exs | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 322 | 2018-02-28T07:38:44.000Z | 2020-05-27T23:09:55.000Z | apps/ewallet_api/test/ewallet_api/v1/plugs/client_auth_plug_test.exs | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 643 | 2018-02-28T12:05:20.000Z | 2020-05-22T08:34:38.000Z | apps/ewallet_api/test/ewallet_api/v1/plugs/client_auth_plug_test.exs | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 63 | 2018-02-28T10:57:06.000Z | 2020-05-27T23:10:38.000Z | # Copyright 2018-2019 OmiseGO Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 35.144068 | 90 | 0.71401 |
384fbb1847516a10ecc137f756df7b596c3e0e0d | 494 | ex | Elixir | test/fixtures/tasks/install.ex | noizu/mnesia_versioning | 876860c51eeec464cd65cca265e50ff0fe2326db | [
"MIT"
] | 1 | 2020-12-22T22:51:38.000Z | 2020-12-22T22:51:38.000Z | test/fixtures/tasks/install.ex | noizu/mnesia_versioning | 876860c51eeec464cd65cca265e50ff0fe2326db | [
"MIT"
] | null | null | null | test/fixtures/tasks/install.ex | noizu/mnesia_versioning | 876860c51eeec464cd65cca265e50ff0fe2326db | [
"MIT"
] | 1 | 2018-03-05T12:02:05.000Z | 2018-03-05T12:02:05.000Z | #-------------------------------------------------------------------------------
# Author: Keith Brings
# Copyright (C) 2018 Noizu Labs, Inc. All rights reserved.
#-------------------------------------------------------------------------------
defmodule Noizu.MnesiaVersioning.Test.Install do
use Noizu.MnesiaVersioni... | 38 | 80 | 0.534413 |
384fd558a10b4a4f46226131722a74faa6dd2a85 | 1,099 | ex | Elixir | Microsoft.Azure.Management.Compute/lib/microsoft/azure/management/compute/model/virtual_machine_image_properties.ex | chgeuer/ex_microsoft_azure_management | 99cd9f7f2ff1fdbe69ca5bac55b6e2af91ba3603 | [
"Apache-2.0"
] | 4 | 2018-09-29T03:43:15.000Z | 2021-04-01T18:30:46.000Z | Microsoft.Azure.Management.Compute/lib/microsoft/azure/management/compute/model/virtual_machine_image_properties.ex | chgeuer/ex_microsoft_azure_management | 99cd9f7f2ff1fdbe69ca5bac55b6e2af91ba3603 | [
"Apache-2.0"
] | null | null | null | Microsoft.Azure.Management.Compute/lib/microsoft/azure/management/compute/model/virtual_machine_image_properties.ex | chgeuer/ex_microsoft_azure_management | 99cd9f7f2ff1fdbe69ca5bac55b6e2af91ba3603 | [
"Apache-2.0"
] | null | null | null | # 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 Microsoft.Azure.Management.Compute.Model.VirtualMachineImageProperties do
@moduledoc """
Describes the properties of a Virtual Machine Image.
... | 32.323529 | 109 | 0.737944 |
384fdeeb26c5078ca46897ef9f2c3ae16fd70dc2 | 294 | ex | Elixir | ch02/reports_generator/lib/parser.ex | arilsonsouza/rocketseat-ignite-elixir | 93e32d52d589336dfd2d81e755d6dd7f05ee40b8 | [
"MIT"
] | null | null | null | ch02/reports_generator/lib/parser.ex | arilsonsouza/rocketseat-ignite-elixir | 93e32d52d589336dfd2d81e755d6dd7f05ee40b8 | [
"MIT"
] | null | null | null | ch02/reports_generator/lib/parser.ex | arilsonsouza/rocketseat-ignite-elixir | 93e32d52d589336dfd2d81e755d6dd7f05ee40b8 | [
"MIT"
] | null | null | null | defmodule ReportsGenerator.Parser do
def parse_file(filename) do
"reports/#{filename}"
|> File.stream!()
|> Stream.map(&parse_line/1)
end
defp parse_line(line) do
line
|> String.trim()
|> String.split(",")
|> List.update_at(2, &String.to_integer/1)
end
end
| 19.6 | 46 | 0.632653 |
384fdfcdf19121026095bc6aa860a13ac46f4673 | 945 | ex | Elixir | test/support/channel_case.ex | StBarCo/pbbuilder | 9d6eb47d6137a6a16cd746a0c1418493f94043d5 | [
"MIT"
] | null | null | null | test/support/channel_case.ex | StBarCo/pbbuilder | 9d6eb47d6137a6a16cd746a0c1418493f94043d5 | [
"MIT"
] | null | null | null | test/support/channel_case.ex | StBarCo/pbbuilder | 9d6eb47d6137a6a16cd746a0c1418493f94043d5 | [
"MIT"
] | null | null | null | defmodule PbbuilderWeb.ChannelCase do
@moduledoc """
This module defines the test case to be used by
channel tests.
Such tests rely on `Phoenix.ChannelTest` and also
import other functionality to make it easier
to build common datastructures and query the data layer.
Finally, if the test case interacts ... | 24.868421 | 71 | 0.718519 |
384fe2e551baaa8f28ea9b0035ef2f00681bfc4c | 6,628 | ex | Elixir | lib/exrm/appups.ex | smpallen99/exrm | 2e67d3b3bc1fcb0a7ec9a223da247a6ce9d607ad | [
"MIT"
] | null | null | null | lib/exrm/appups.ex | smpallen99/exrm | 2e67d3b3bc1fcb0a7ec9a223da247a6ce9d607ad | [
"MIT"
] | null | null | null | lib/exrm/appups.ex | smpallen99/exrm | 2e67d3b3bc1fcb0a7ec9a223da247a6ce9d607ad | [
"MIT"
] | null | null | null | defmodule ReleaseManager.Appups do
@moduledoc """
Module for auto-generating appups between releases.
"""
import ReleaseManager.Utils, only: [write_term: 2]
@doc """
Generate a .appup for the given application, start version, and upgrade version.
## Parameter information
application: the appli... | 29.855856 | 101 | 0.548129 |
384fe90a62b125b0da49acaf55fc8858667bb6b5 | 1,887 | ex | Elixir | lib/track_user_agents_web/router.ex | SparkPost/elixir-webhook-sample | 22d367b63f4995eb0ddb4b0aaf484790987b8491 | [
"Apache-2.0"
] | 1 | 2021-12-08T18:15:33.000Z | 2021-12-08T18:15:33.000Z | lib/track_user_agents_web/router.ex | SparkPost/elixir-webhook-sample | 22d367b63f4995eb0ddb4b0aaf484790987b8491 | [
"Apache-2.0"
] | null | null | null | lib/track_user_agents_web/router.ex | SparkPost/elixir-webhook-sample | 22d367b63f4995eb0ddb4b0aaf484790987b8491 | [
"Apache-2.0"
] | null | null | null | defmodule TrackUserAgentsWeb.Router do
use TrackUserAgentsWeb, :router
def unpack_events(conn, _) do
first_key_fn = &hd(Map.keys(&1))
cleanevents = conn.params["_json"] |>
Enum.map(fn evt -> evt["msys"] end) |>
Enum.map(fn evt -> evt[first_key_fn.(evt)] end)
assign(conn, :events, cl... | 24.828947 | 74 | 0.642819 |
384fea353c4f820197ad079d280fc3983c2037b5 | 4,716 | ex | Elixir | lib/strategy/rancher.ex | documoto/libcluster | 0ef8c171d3490bcf187beb85254c69ca4bd97f37 | [
"MIT"
] | null | null | null | lib/strategy/rancher.ex | documoto/libcluster | 0ef8c171d3490bcf187beb85254c69ca4bd97f37 | [
"MIT"
] | null | null | null | lib/strategy/rancher.ex | documoto/libcluster | 0ef8c171d3490bcf187beb85254c69ca4bd97f37 | [
"MIT"
] | null | null | null | defmodule Cluster.Strategy.Rancher do
@moduledoc """
This clustering strategy is specific to the Rancher container platform.
It works by querying the platform's metadata API for containers belonging to
the same service as the node and attempts to connect them.
(see: http://rancher.com/docs/rancher/latest/en/r... | 27.103448 | 100 | 0.59542 |
384ffd02a9ad130762ccae305bf6f26a82b32b3e | 1,450 | ex | Elixir | lib/erlef_web/controllers/page_controller.ex | starbelly/website | 385c30eabbb2c4f1026147342a0d69fdadd20f4c | [
"Apache-2.0"
] | null | null | null | lib/erlef_web/controllers/page_controller.ex | starbelly/website | 385c30eabbb2c4f1026147342a0d69fdadd20f4c | [
"Apache-2.0"
] | null | null | null | lib/erlef_web/controllers/page_controller.ex | starbelly/website | 385c30eabbb2c4f1026147342a0d69fdadd20f4c | [
"Apache-2.0"
] | null | null | null | defmodule ErlefWeb.PageController do
use ErlefWeb, :controller
alias Erlef.{
Blog,
Posts,
WorkingGroup,
Twitter,
Data.Query.Event
}
action_fallback ErlefWeb.FallbackController
def index(conn, _params) do
latest_news =
Blog
|> Posts.all()
|> Posts.sort_by_datetime()... | 24.576271 | 98 | 0.683448 |
38500022066c2b522f728c2b35e2261ee32ec9bb | 1,165 | ex | Elixir | apps/alerts/lib/repo.ex | noisecapella/dotcom | d5ef869412102d2230fac3dcc216f01a29726227 | [
"MIT"
] | 42 | 2019-05-29T16:05:30.000Z | 2021-08-09T16:03:37.000Z | apps/alerts/lib/repo.ex | noisecapella/dotcom | d5ef869412102d2230fac3dcc216f01a29726227 | [
"MIT"
] | 872 | 2019-05-29T17:55:50.000Z | 2022-03-30T09:28:43.000Z | apps/alerts/lib/repo.ex | noisecapella/dotcom | d5ef869412102d2230fac3dcc216f01a29726227 | [
"MIT"
] | 12 | 2019-07-01T18:33:21.000Z | 2022-03-10T02:13:57.000Z | defmodule Alerts.Repo do
alias Alerts.{Alert, Banner, Priority}
alias Alerts.Cache.Store
@spec all(DateTime.t()) :: [Alert.t()]
def all(now) do
Store.all_alerts(now)
end
@spec banner() :: Banner.t() | nil
def banner do
Store.banner()
end
@spec by_id(String.t()) :: Alert.t() | nil
def by_i... | 24.270833 | 75 | 0.651502 |
38502058d5c0a6a0a82de77811d19a23b71a7f64 | 73,178 | exs | Elixir | test/teslamate/log/log_charging_test.exs | markusdd/teslamate | baada9c5455da2d3c400bf916ab29834772f6a88 | [
"MIT"
] | null | null | null | test/teslamate/log/log_charging_test.exs | markusdd/teslamate | baada9c5455da2d3c400bf916ab29834772f6a88 | [
"MIT"
] | null | null | null | test/teslamate/log/log_charging_test.exs | markusdd/teslamate | baada9c5455da2d3c400bf916ab29834772f6a88 | [
"MIT"
] | null | null | null | defmodule TeslaMate.LogChargingTest do
use TeslaMate.DataCase, async: true
alias TeslaMate.Log.{Car, ChargingProcess, Charge, Position}
alias TeslaMate.{Log, Repo, Locations}
@valid_attrs %{
date: DateTime.utc_now(),
charger_power: 50,
charger_phases: 3,
charge_energy_added: 0.160,
ideal_b... | 49.679566 | 93 | 0.50015 |
3850446a26df5b8900b2443c9d3453e4a3c66291 | 540 | ex | Elixir | lib/exjson/parser.ex | amco/exjson | 9d428acfa2b55d070576e71cef55e2e0bad8c5ab | [
"Apache-2.0"
] | null | null | null | lib/exjson/parser.ex | amco/exjson | 9d428acfa2b55d070576e71cef55e2e0bad8c5ab | [
"Apache-2.0"
] | null | null | null | lib/exjson/parser.ex | amco/exjson | 9d428acfa2b55d070576e71cef55e2e0bad8c5ab | [
"Apache-2.0"
] | null | null | null | defmodule ExJSON.Parser do
def parse(thing, return_type) when is_binary(thing) do
parse(List.from_char_data!(thing), return_type)
end
def parse(thing, return_type) when is_list(thing) do
tokens = ExJSON.Scanner.scan(thing)
parse(tokens, return_type)
end
def parse({:ok, list, _}, return_type) do... | 25.714286 | 65 | 0.731481 |
38506eaf7e758552fdae50870cfd78349d465246 | 1,240 | ex | Elixir | lib/client_token.ex | goravbhootra/braintree-elixir | 53c10216125c13c05a19edf1dc1c98a818c46e09 | [
"MIT"
] | null | null | null | lib/client_token.ex | goravbhootra/braintree-elixir | 53c10216125c13c05a19edf1dc1c98a818c46e09 | [
"MIT"
] | null | null | null | lib/client_token.ex | goravbhootra/braintree-elixir | 53c10216125c13c05a19edf1dc1c98a818c46e09 | [
"MIT"
] | null | null | null | defmodule Braintree.ClientToken do
@moduledoc """
Generate a token required by the client SDK to communicate with Braintree.
For additional reference see:
https://developers.braintreepayments.com/reference/request/client-token/generate/ruby
"""
alias Braintree.HTTP
alias Braintree.ErrorResponse, as: Err... | 27.555556 | 87 | 0.674194 |
3850729ecd5451fe05d078658ea0ecd8a24a7575 | 1,611 | exs | Elixir | mix.exs | szlend/meeseeks_html5ever | 711ce0c49996b49fb18bc77ee5ffabe7feac5802 | [
"Apache-2.0",
"MIT"
] | null | null | null | mix.exs | szlend/meeseeks_html5ever | 711ce0c49996b49fb18bc77ee5ffabe7feac5802 | [
"Apache-2.0",
"MIT"
] | null | null | null | mix.exs | szlend/meeseeks_html5ever | 711ce0c49996b49fb18bc77ee5ffabe7feac5802 | [
"Apache-2.0",
"MIT"
] | 1 | 2020-03-23T13:54:10.000Z | 2020-03-23T13:54:10.000Z | defmodule MeeseeksHtml5ever.Mixfile do
use Mix.Project
@version "0.11.0"
def project do
[
app: :meeseeks_html5ever,
name: "MeeseeksHtml5ever",
version: @version,
description: description(),
elixir: "~> 1.4",
deps: deps(),
package: package(),
source_url: "https... | 22.068493 | 88 | 0.577281 |
38507994a17fee8760ed6cbf0685cc25d9a23d9e | 891 | exs | Elixir | mix.exs | TeachersPayTeachers/publicist | 5034310627cdbf4aa0b94fe29e1497a772cad4f9 | [
"MIT"
] | 16 | 2018-01-07T19:14:03.000Z | 2020-12-03T04:47:13.000Z | mix.exs | TeachersPayTeachers/publicist | 5034310627cdbf4aa0b94fe29e1497a772cad4f9 | [
"MIT"
] | 2 | 2018-01-24T19:25:33.000Z | 2018-01-26T20:29:23.000Z | mix.exs | TeachersPayTeachers/publicist | 5034310627cdbf4aa0b94fe29e1497a772cad4f9 | [
"MIT"
] | 2 | 2018-01-20T13:57:58.000Z | 2018-02-16T14:22:34.000Z | defmodule Publicist.Mixfile do
use Mix.Project
def project() do
[
app: :publicist,
version: "1.1.0",
elixir: "~> 1.0",
name: "Publicist",
description:
"Publicist allows developers to test private (defp) functions",
package: package(),
source_url: "https://githu... | 21.214286 | 71 | 0.56229 |
385098488c23433d3fa2981193c5ceefa0169adb | 365 | exs | Elixir | priv/repo/migrations/201705071730_create_processor.exs | sumanbh/phoenix-angular | 0954ce60edc95832f6bf62e54e54977c770d33c3 | [
"MIT"
] | 5 | 2017-07-01T16:08:27.000Z | 2021-04-14T12:50:31.000Z | priv/repo/migrations/201705071730_create_processor.exs | sumanbh/phoenix-angular | 0954ce60edc95832f6bf62e54e54977c770d33c3 | [
"MIT"
] | null | null | null | priv/repo/migrations/201705071730_create_processor.exs | sumanbh/phoenix-angular | 0954ce60edc95832f6bf62e54e54977c770d33c3 | [
"MIT"
] | 4 | 2017-05-08T00:57:52.000Z | 2019-05-26T23:29:38.000Z | defmodule Amazon.Repo.Migrations.CreateProcessor do
use Ecto.Migration
def up do
execute """
CREATE TABLE processor
(
id SERIAL PRIMARY KEY,
name VARCHAR(40)
);
"""
end
def down do
... | 20.277778 | 51 | 0.465753 |
3850a54ea5f92bec4552e07064fe634051c9a80a | 1,742 | exs | Elixir | test/throttlex_test.exs | bit4coinBV/throttlex | 84b72d466e512a8e82c9f44fdb2be8dae56f0fe3 | [
"MIT"
] | null | null | null | test/throttlex_test.exs | bit4coinBV/throttlex | 84b72d466e512a8e82c9f44fdb2be8dae56f0fe3 | [
"MIT"
] | null | null | null | test/throttlex_test.exs | bit4coinBV/throttlex | 84b72d466e512a8e82c9f44fdb2be8dae56f0fe3 | [
"MIT"
] | null | null | null | defmodule ThrottlexTest do
use ExUnit.Case, async: true
@bucket bucket_name: :bucket_name, max_accumulated: 4, rate_per_second: 10
@id :id
@cost 1
setup do
start_supervised!({Throttlex, @bucket})
:ok
end
describe "check_rate/3" do
test "check rate" do
assert {:allow, 3} == Throttlex.... | 30.561404 | 78 | 0.675086 |
3850ad18b7481c8d87f3d979650f7d9d9d794fa1 | 2,749 | ex | Elixir | lib/elsol/query.ex | findmypast/esolr | e82cad3bacd6982a9acf8a43ccb925a8eb07f875 | [
"Apache-2.0"
] | 9 | 2016-06-30T16:49:49.000Z | 2021-04-06T12:12:36.000Z | lib/elsol/query.ex | findmypast/esolr | e82cad3bacd6982a9acf8a43ccb925a8eb07f875 | [
"Apache-2.0"
] | 11 | 2016-10-11T04:07:01.000Z | 2017-05-10T23:38:17.000Z | lib/elsol/query.ex | findmypast/elsol | e82cad3bacd6982a9acf8a43ccb925a8eb07f875 | [
"Apache-2.0"
] | 4 | 2016-04-16T02:20:12.000Z | 2020-05-09T04:43:10.000Z | defmodule Elsol.Query do
@moduledoc """
Example of a simple and extensible Elixir module for building Solr query string
according to existing syntax, using a single `build` function type with
pattern-matching and recursion.
For sub-parameters (dotted) such as `facet.count`, `facet.range.gap`, substit... | 33.52439 | 129 | 0.591852 |
3850e5dd66a96a14e5d556ffe0fcd88dca7c5609 | 500 | ex | Elixir | learn/OTPAndPhoenix/islands_engine/lib/guesses.ex | idfumg/ElixirSynopsis | 74c668d84300812dd41eb18772aecfb89bc7628b | [
"MIT"
] | null | null | null | learn/OTPAndPhoenix/islands_engine/lib/guesses.ex | idfumg/ElixirSynopsis | 74c668d84300812dd41eb18772aecfb89bc7628b | [
"MIT"
] | null | null | null | learn/OTPAndPhoenix/islands_engine/lib/guesses.ex | idfumg/ElixirSynopsis | 74c668d84300812dd41eb18772aecfb89bc7628b | [
"MIT"
] | null | null | null | defmodule IslandsEngine.Guesses do
alias __MODULE__
alias IslandsEngine.Coordinate
@enforce_keys [:hits, :misses]
defstruct [:hits, :misses]
def new() do
%Guesses{hits: MapSet.new(), misses: MapSet.new()}
end
def add(%Guesses{} = guesses, :hit, %Coordinate{} = coordinate) do
update_in(guesses.h... | 25 | 69 | 0.686 |
3850ed424eb2e48c7e8007df616d2d87174cf988 | 2,646 | exs | Elixir | config/config.exs | doyobi/livebook | 136d5039c42b406dd0b31aea188deb4fce3b1328 | [
"Apache-2.0"
] | 1 | 2022-02-16T09:13:27.000Z | 2022-02-16T09:13:27.000Z | config/config.exs | doyobi/livebook | 136d5039c42b406dd0b31aea188deb4fce3b1328 | [
"Apache-2.0"
] | null | null | null | config/config.exs | doyobi/livebook | 136d5039c42b406dd0b31aea188deb4fce3b1328 | [
"Apache-2.0"
] | null | null | null | import Config
# Configures the endpoint
config :livebook, LivebookWeb.Endpoint,
url: [host: "localhost"],
pubsub_server: Livebook.PubSub,
live_view: [signing_salt: "livebook"]
# Configures Elixir's Logger
config :logger, :console,
format: "$time $metadata[$level] $message\n",
metadata: [:request_id]
# Use ... | 33.075 | 89 | 0.68254 |
3850f9f2951de0caa7f9c929fb765a7554b4d6ec | 992 | exs | Elixir | test/controllers/blog_post_controller_test.exs | codebender/5280elixir | f7dee84b785b70f61b44f4dccacfe0311ad39617 | [
"MIT"
] | null | null | null | test/controllers/blog_post_controller_test.exs | codebender/5280elixir | f7dee84b785b70f61b44f4dccacfe0311ad39617 | [
"MIT"
] | null | null | null | test/controllers/blog_post_controller_test.exs | codebender/5280elixir | f7dee84b785b70f61b44f4dccacfe0311ad39617 | [
"MIT"
] | null | null | null | defmodule Elixir5280.BlogPostControllerTest do
use Elixir5280.ConnCase
setup do
conn = conn() |> put_req_header("accept", "application/json")
{:ok, conn: conn}
end
test "lists all entries on index", %{conn: conn} do
conn = get conn, blog_post_path(conn, :index)
assert length(json_response(conn... | 34.206897 | 96 | 0.657258 |
3851115fe0488f8a1c0cb484265002f499d74355 | 843 | ex | Elixir | test/support/channel_case.ex | mgwidmann/slack_coder | 3ff4375777c1bdbc94ba1491fdf4e1c0fa465edf | [
"MIT"
] | 15 | 2015-09-23T16:03:28.000Z | 2018-12-04T21:48:04.000Z | test/support/channel_case.ex | mgwidmann/slack_coder | 3ff4375777c1bdbc94ba1491fdf4e1c0fa465edf | [
"MIT"
] | 27 | 2016-01-12T16:44:31.000Z | 2017-10-13T16:09:36.000Z | test/support/channel_case.ex | mgwidmann/slack_coder | 3ff4375777c1bdbc94ba1491fdf4e1c0fa465edf | [
"MIT"
] | 4 | 2016-09-01T12:08:24.000Z | 2017-09-21T15:07:57.000Z | defmodule SlackCoder.ChannelCase do
@moduledoc """
This module defines the test case to be used by
channel tests.
Such tests rely on `Phoenix.ChannelTest` and also
imports other functionality to make it easier
to build and query models.
Finally, if the test case interacts with the database,
it cannot ... | 24.085714 | 56 | 0.71293 |
38512a9ef9d7c6d2c070b6acd6456cf091630e21 | 5,997 | exs | Elixir | .credo.exs | mazz/beepbop | 9d5930a870904fd84c317d3c2865d6b1c9a1080c | [
"MIT"
] | 3 | 2018-03-26T14:04:26.000Z | 2018-12-09T11:53:18.000Z | .credo.exs | mazz/beepbop | 9d5930a870904fd84c317d3c2865d6b1c9a1080c | [
"MIT"
] | 6 | 2018-04-16T13:07:18.000Z | 2018-06-25T09:54:47.000Z | .credo.exs | mazz/beepbop | 9d5930a870904fd84c317d3c2865d6b1c9a1080c | [
"MIT"
] | 6 | 2019-04-01T07:58:56.000Z | 2022-03-13T16:08:05.000Z | # This file contains the configuration for Credo and you are probably reading
# this after creating it with `mix credo.gen.config`.
#
# If you find anything wrong or unclear in this file, please report an
# issue on GitHub: https://github.com/rrrene/credo/issues
#
%{
#
# You can have as many configs as you like in ... | 39.453947 | 80 | 0.651492 |
385136b684b43640b321393ca97e2b259cf86b3f | 525 | ex | Elixir | kousa/lib/broth/message/push.ex | asgarovf/dogehouse | 12b81d2008562373591fb55ab8179a3fa8a5db18 | [
"MIT"
] | 2 | 2021-05-01T16:57:50.000Z | 2021-07-07T22:01:14.000Z | kousa/lib/broth/message/push.ex | asgarovf/dogehouse | 12b81d2008562373591fb55ab8179a3fa8a5db18 | [
"MIT"
] | null | null | null | kousa/lib/broth/message/push.ex | asgarovf/dogehouse | 12b81d2008562373591fb55ab8179a3fa8a5db18 | [
"MIT"
] | null | null | null | defmodule Broth.Message.Push do
@moduledoc """
API contract statement for push message modules
"""
defmacro __using__(_opts) do
quote do
use Ecto.Schema
import Ecto.Changeset
@behaviour Broth.Message.Push
Module.register_attribute(__MODULE__, :directions, accumulate: true, persist... | 22.826087 | 89 | 0.691429 |
385161d0dd66c7a795007da71a5764f33f5f5f9f | 225 | ex | Elixir | lib/skeleton/permission/test.ex | skeleton-elixir/skeleton_permission | 9d86d338cfcd5b0b9925cde139d03c225dc9e4ee | [
"MIT"
] | null | null | null | lib/skeleton/permission/test.ex | skeleton-elixir/skeleton_permission | 9d86d338cfcd5b0b9925cde139d03c225dc9e4ee | [
"MIT"
] | 1 | 2020-07-02T13:17:17.000Z | 2020-07-02T13:17:17.000Z | lib/skeleton/permission/test.ex | skeleton-elixir/skeleton_permission | 9d86d338cfcd5b0b9925cde139d03c225dc9e4ee | [
"MIT"
] | null | null | null | defmodule Skeleton.Permission.Test do
def check_permission(context, permission, permission_name) do
context = permission.preload_data(context, [permission_name])
permission.check(permission_name, context)
end
end
| 32.142857 | 65 | 0.8 |
3851a41405e0aef68f7b3474c17457113052f29f | 14,206 | ex | Elixir | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v14/api/proposals.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v14/api/proposals.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v14/api/proposals.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... | 40.357955 | 271 | 0.676967 |
3851f10dc232f60dcf725996ea3c5c58729b1cb2 | 69 | exs | Elixir | webapp/test/test_helper.exs | zmaril/penmark | 992f570da3bdf819f912505ba9b6531db9dcb80b | [
"FSFAP"
] | null | null | null | webapp/test/test_helper.exs | zmaril/penmark | 992f570da3bdf819f912505ba9b6531db9dcb80b | [
"FSFAP"
] | null | null | null | webapp/test/test_helper.exs | zmaril/penmark | 992f570da3bdf819f912505ba9b6531db9dcb80b | [
"FSFAP"
] | null | null | null | ExUnit.start()
Ecto.Adapters.SQL.Sandbox.mode(Penmark.Repo, :manual)
| 23 | 53 | 0.782609 |
38520018a2f8633cee378d3811e8f6d2f90c57a6 | 622 | ex | Elixir | clients/oathkeeper/elixir/lib/oathkeeper/model/upstream.ex | ory/sdk-generator | 958314d130922ad6f20f439b5230141a832231a5 | [
"Apache-2.0"
] | null | null | null | clients/oathkeeper/elixir/lib/oathkeeper/model/upstream.ex | ory/sdk-generator | 958314d130922ad6f20f439b5230141a832231a5 | [
"Apache-2.0"
] | null | null | null | clients/oathkeeper/elixir/lib/oathkeeper/model/upstream.ex | ory/sdk-generator | 958314d130922ad6f20f439b5230141a832231a5 | [
"Apache-2.0"
] | 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 Oathkeeper.Model.Upstream do
@moduledoc """
Upstream Upstream Upstream Upstream upstream
"""
@derive [Poison.Encoder]
defstruct [
:"pre... | 20.733333 | 91 | 0.667203 |
38520c3517c2047f4a5126a8d6670b5ca6ce6d60 | 79 | exs | Elixir | test/test_helper.exs | fskinner/cheerland-reservas | 48a782d7e49736a89b4fd2136c98906269b6351e | [
"MIT"
] | 2 | 2019-03-14T20:03:44.000Z | 2019-08-30T13:30:42.000Z | test/test_helper.exs | fskinner/cheerland-reservas | 48a782d7e49736a89b4fd2136c98906269b6351e | [
"MIT"
] | 1 | 2021-05-08T08:23:18.000Z | 2021-05-08T08:23:18.000Z | test/test_helper.exs | fskinner/cheerland-reservas | 48a782d7e49736a89b4fd2136c98906269b6351e | [
"MIT"
] | null | null | null | ExUnit.start()
Ecto.Adapters.SQL.Sandbox.mode(CheerlandReservas.Repo, :manual)
| 26.333333 | 63 | 0.810127 |
385263f11e3dbe751100d25d4010a80e1f6aa1f8 | 3,506 | ex | Elixir | lib/iex/lib/iex/history.ex | xtian/elixir | c680eb1a3992309c272e8f808e15990ea5318d6e | [
"Apache-2.0"
] | 4 | 2015-12-22T02:46:39.000Z | 2016-04-26T06:11:09.000Z | lib/iex/lib/iex/history.ex | xtian/elixir | c680eb1a3992309c272e8f808e15990ea5318d6e | [
"Apache-2.0"
] | null | null | null | lib/iex/lib/iex/history.ex | xtian/elixir | c680eb1a3992309c272e8f808e15990ea5318d6e | [
"Apache-2.0"
] | 1 | 2017-07-25T21:46:48.000Z | 2017-07-25T21:46:48.000Z | defmodule IEx.History.State do
@moduledoc false
defstruct queue: :queue.new, size: 0, start: 1
def append(%{queue: q, size: size} = state, item) do
%{state | queue: :queue.in(item, q), size: size + 1}
end
def to_list(%{queue: q}),
do: :queue.to_list(q)
# Traverses the queue front-to-back if the ... | 25.223022 | 119 | 0.634341 |
38526b99887f35bac5f40ba058f0703c7bc6dca4 | 894 | ex | Elixir | clients/security_center/lib/google_api/security_center/v1/metadata.ex | jechol/elixir-google-api | 0290b683dfc6491ca2ef755a80bc329378738d03 | [
"Apache-2.0"
] | null | null | null | clients/security_center/lib/google_api/security_center/v1/metadata.ex | jechol/elixir-google-api | 0290b683dfc6491ca2ef755a80bc329378738d03 | [
"Apache-2.0"
] | null | null | null | clients/security_center/lib/google_api/security_center/v1/metadata.ex | jechol/elixir-google-api | 0290b683dfc6491ca2ef755a80bc329378738d03 | [
"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.111111 | 74 | 0.761745 |
38526d89a243c9a6bc16f0330580b08b041f6cf3 | 13,746 | ex | Elixir | lib/codi/pattern/bang/bang.ex | ianrumford/plymio_codi | 1163b139df0ed344e63597e563637c091ffe1f5e | [
"MIT"
] | null | null | null | lib/codi/pattern/bang/bang.ex | ianrumford/plymio_codi | 1163b139df0ed344e63597e563637c091ffe1f5e | [
"MIT"
] | null | null | null | lib/codi/pattern/bang/bang.ex | ianrumford/plymio_codi | 1163b139df0ed344e63597e563637c091ffe1f5e | [
"MIT"
] | null | null | null | defmodule Plymio.Codi.Pattern.Bang do
@moduledoc ~S"""
The *bang* patterns builds bang functions
(e.g. `myfun!(arg)`) using existing base functions (e.g. `myfun(arg)`).
When the base function returns `{:ok, value}`, the bang
function returns `value`.
If the base function returns `{:error, error}`, the `er... | 33.445255 | 99 | 0.571075 |
38528d01d7c9dde2d5599d20148f5f940b6ef764 | 3,013 | ex | Elixir | clients/security_center/lib/google_api/security_center/v1/model/resource.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/security_center/lib/google_api/security_center/v1/model/resource.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/security_center/lib/google_api/security_center/v1/model/resource.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 44.308824 | 276 | 0.69698 |
3852963c102be6b046594105b5ce074918afd8af | 2,424 | ex | Elixir | lib/ynab/parse_response.ex | teedang19/ynab-elixir | 727ac40e722e12b66a612afe5fc0c4667d4d5d69 | [
"MIT"
] | null | null | null | lib/ynab/parse_response.ex | teedang19/ynab-elixir | 727ac40e722e12b66a612afe5fc0c4667d4d5d69 | [
"MIT"
] | null | null | null | lib/ynab/parse_response.ex | teedang19/ynab-elixir | 727ac40e722e12b66a612afe5fc0c4667d4d5d69 | [
"MIT"
] | null | null | null | defmodule YNAB.ParseResponse do
alias YNAB.ParseData
def parse(raw_response = %HTTPoison.Response{body: %{data: data}}) do
case data do
%{accounts: account_maps} ->
format_response(raw_response, ParseData.parse_accounts(account_maps))
%{account: account_map} ->
format_response(raw_... | 35.130435 | 91 | 0.721535 |
3852b63c9daeb9064a9e9f342344882cbc297f06 | 4,398 | exs | Elixir | test/function_decorator_test.exs | kianmeng/decorator | fc758136ca50a9da790a7c610d4d40ec7c0bd1f5 | [
"MIT"
] | 321 | 2016-10-20T18:43:43.000Z | 2022-01-08T21:39:56.000Z | test/function_decorator_test.exs | kianmeng/decorator | fc758136ca50a9da790a7c610d4d40ec7c0bd1f5 | [
"MIT"
] | 43 | 2016-10-20T22:01:51.000Z | 2021-09-04T19:39:20.000Z | test/function_decorator_test.exs | kianmeng/decorator | fc758136ca50a9da790a7c610d4d40ec7c0bd1f5 | [
"MIT"
] | 25 | 2016-10-20T21:52:48.000Z | 2022-03-30T11:28:31.000Z | # Example decorator which modifies the return value of the function
# by wrapping it in a tuple.
defmodule DecoratorTest.Fixture.FunctionResultDecorator do
use Decorator.Define, function_result: 1
def function_result(add, body, _context) do
quote do
{unquote(add), unquote(body)}
end
end
end
defmod... | 24.164835 | 92 | 0.709413 |
3852bbc5693297f841217eca639da2923208c544 | 1,296 | exs | Elixir | mix.exs | fredwu/simple_bayes | 806d7e62ab90bdbd8d905faa9536425466f203e2 | [
"MIT"
] | 412 | 2016-07-14T15:34:26.000Z | 2022-03-26T10:34:39.000Z | mix.exs | fredwu/simple_bayes | 806d7e62ab90bdbd8d905faa9536425466f203e2 | [
"MIT"
] | 7 | 2016-07-20T08:40:07.000Z | 2018-06-11T12:44:19.000Z | mix.exs | fredwu/simple_bayes | 806d7e62ab90bdbd8d905faa9536425466f203e2 | [
"MIT"
] | 27 | 2016-07-17T13:05:19.000Z | 2021-04-08T21:46:16.000Z | defmodule SimpleBayes.Mixfile do
use Mix.Project
def project do
[
app: :simple_bayes,
version: "1.0.0",
elixir: "~> 1.5",
name: "Simple Bayes",
package: package(),
description: "A Simple Bayes (a.k.a. Naive Baye... | 26.44898 | 89 | 0.48534 |
3852ea00c58438e2e2c7e636d94c9a8a46407fc6 | 415 | ex | Elixir | lib/config.ex | facto/tgdb | 35f1fa4e9c78c7bb8d3138314bfd0dd07e49b16d | [
"MIT"
] | null | null | null | lib/config.ex | facto/tgdb | 35f1fa4e9c78c7bb8d3138314bfd0dd07e49b16d | [
"MIT"
] | null | null | null | lib/config.ex | facto/tgdb | 35f1fa4e9c78c7bb8d3138314bfd0dd07e49b16d | [
"MIT"
] | null | null | null | defmodule Tgdb.Config do
@otp_app :tgdb
def api_key, do: from_env(:api_key)
def api_root, do: from_env(:api_root)
def from_env(key, default \\ nil) do
@otp_app
|> Application.get_env(key, default)
|> maybe_read_from_system(default)
end
defp maybe_read_from_system({:system, env}, default), do... | 24.411765 | 90 | 0.715663 |
385308d54fe2dd7b8c94f39c909bd68fca36c783 | 2,832 | exs | Elixir | RAEM/raem/test/raem_web/controllers/setting_controller_test.exs | pedromcorreia/Rumo-ao-ensino-superior | be0b9bf417604bdf8a349fde8a8a1c0aaf4c4cdb | [
"MIT"
] | null | null | null | RAEM/raem/test/raem_web/controllers/setting_controller_test.exs | pedromcorreia/Rumo-ao-ensino-superior | be0b9bf417604bdf8a349fde8a8a1c0aaf4c4cdb | [
"MIT"
] | null | null | null | RAEM/raem/test/raem_web/controllers/setting_controller_test.exs | pedromcorreia/Rumo-ao-ensino-superior | be0b9bf417604bdf8a349fde8a8a1c0aaf4c4cdb | [
"MIT"
] | 2 | 2018-02-24T19:56:21.000Z | 2018-02-26T00:16:41.000Z | defmodule RaemWeb.SettingControllerTest do
use RaemWeb.ConnCase
alias Raem.FieldMappings
@create_attrs %{field: "some field", from: "some from", to: "some to"}
@update_attrs %{field: "some updated field", from: "some updated from", to: "some updated to"}
@invalid_attrs %{field: nil, from: nil, to: nil}
d... | 31.820225 | 96 | 0.666667 |
3853110fa454776cf8031469f9cdd127d0dd14a8 | 1,542 | ex | Elixir | clients/content/lib/google_api/content/v2/model/lia_about_page_settings.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/content/lib/google_api/content/v2/model/lia_about_page_settings.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/lia_about_page_settings.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 ... | 30.84 | 114 | 0.719196 |
38533343297e2774d0ef5ec5aa6bb87ab1d1e3ad | 1,481 | ex | Elixir | lib/gossip/accounts.ex | SwiftAusterity/gossip | d79c53acd02fcb9905acb9730e59065efdd5a589 | [
"MIT"
] | null | null | null | lib/gossip/accounts.ex | SwiftAusterity/gossip | d79c53acd02fcb9905acb9730e59065efdd5a589 | [
"MIT"
] | null | null | null | lib/gossip/accounts.ex | SwiftAusterity/gossip | d79c53acd02fcb9905acb9730e59065efdd5a589 | [
"MIT"
] | null | null | null | defmodule Gossip.Accounts do
@moduledoc """
Context for accounts
"""
import Ecto.Query
alias Gossip.Accounts.User
alias Gossip.Games.Game
alias Gossip.Repo
@type user_params :: map()
@type token :: String.t()
@doc """
Start a new user
"""
@spec new() :: Ecto.Changeset.t()
def new(), do: ... | 20.013514 | 86 | 0.585415 |
3853437981cb39f3ef41a6310123568718501a6a | 15,641 | exs | Elixir | test/phoenix/integration/long_poll_channels_test.exs | jesseshieh/phoenix | 1776e9df0a71de67374ed488b3f00ccb434045b3 | [
"MIT"
] | 1 | 2020-04-14T09:49:46.000Z | 2020-04-14T09:49:46.000Z | test/phoenix/integration/long_poll_channels_test.exs | jesseshieh/phoenix | 1776e9df0a71de67374ed488b3f00ccb434045b3 | [
"MIT"
] | 1 | 2020-05-26T19:38:18.000Z | 2020-05-26T19:38:18.000Z | test/phoenix/integration/long_poll_channels_test.exs | jesseshieh/phoenix | 1776e9df0a71de67374ed488b3f00ccb434045b3 | [
"MIT"
] | null | null | null | Code.require_file "../../support/http_client.exs", __DIR__
defmodule Phoenix.Integration.LongPollChannelsTest do
use ExUnit.Case
import ExUnit.CaptureLog
alias Phoenix.Integration.HTTPClient
alias Phoenix.Socket.{Broadcast, Message, V1, V2}
alias __MODULE__.Endpoint
@moduletag :capture_log
@port 5808
... | 30.850099 | 126 | 0.566076 |
3853621e77a43fbe7caccda5c616f67584d0bfa3 | 4,472 | ex | Elixir | lib/elixir_google_spreadsheets/client/limiter.ex | nested-tech/elixir_google_spreadsheets | 45895fe6ac5bc9f256bc2e271be1a3324ce8aded | [
"MIT"
] | null | null | null | lib/elixir_google_spreadsheets/client/limiter.ex | nested-tech/elixir_google_spreadsheets | 45895fe6ac5bc9f256bc2e271be1a3324ce8aded | [
"MIT"
] | 1 | 2018-04-26T07:59:26.000Z | 2018-04-26T08:40:34.000Z | lib/elixir_google_spreadsheets/client/limiter.ex | nested-tech/elixir_google_spreadsheets | 45895fe6ac5bc9f256bc2e271be1a3324ce8aded | [
"MIT"
] | null | null | null | defmodule GSS.Client.Limiter do
@moduledoc """
Model of Limiter request subscribed to Client with partition :write or :read
This process is a ProducerConsumer for this GenStage pipeline.
"""
use GenStage
require Logger
@type state :: %__MODULE__{
max_demand: pos_integer(),
max_inter... | 29.421053 | 105 | 0.665921 |
385382152f3d97f026f3e8c3c75b2c607928bc8b | 1,223 | exs | Elixir | mix.exs | fastindian84/exvcr | b9e38de8379627b344cbc2d57bd1eab6d5c1b08a | [
"MIT"
] | null | null | null | mix.exs | fastindian84/exvcr | b9e38de8379627b344cbc2d57bd1eab6d5c1b08a | [
"MIT"
] | null | null | null | mix.exs | fastindian84/exvcr | b9e38de8379627b344cbc2d57bd1eab6d5c1b08a | [
"MIT"
] | null | null | null | defmodule ExVCR.Mixfile do
use Mix.Project
def project do
[ app: :exvcr,
version: "0.10.3",
elixir: "~> 1.3",
deps: deps(),
description: description(),
package: package(),
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [coveralls: :test]
]
end
# Config... | 24.959184 | 75 | 0.560098 |
385397ca13e4e1a7c7cec9b04d6886ee66ff73b8 | 250 | ex | Elixir | lib/validation/rules/mac_address.ex | adolfont/validation | 6288f5a5745f645c90b6f6241e14f0088c218f5b | [
"MIT"
] | null | null | null | lib/validation/rules/mac_address.ex | adolfont/validation | 6288f5a5745f645c90b6f6241e14f0088c218f5b | [
"MIT"
] | null | null | null | lib/validation/rules/mac_address.ex | adolfont/validation | 6288f5a5745f645c90b6f6241e14f0088c218f5b | [
"MIT"
] | null | null | null | defmodule Validation.Rules.MacAddress do
@moduledoc false
@spec validate?(String.t()) :: boolean
def validate?(input) when is_binary(input) do
String.match?(input, ~r/^(([0-9a-fA-F]{2}-){5}|([0-9a-fA-F]{2}:){5})[0-9a-fA-F]{2}$/)
end
end
| 27.777778 | 89 | 0.632 |
38539b9f402a4485e1e72fb85e204664f5941b4b | 1,818 | ex | Elixir | clients/firestore/lib/google_api/firestore/v1beta1/model/composite_filter.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/firestore/lib/google_api/firestore/v1beta1/model/composite_filter.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/firestore/lib/google_api/firestore/v1beta1/model/composite_filter.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... | 34.961538 | 110 | 0.739824 |
3853b887a3345d2120f3772e95f534b6c3fccea1 | 7,335 | ex | Elixir | lib/goth/config.ex | DealPad/goth | 7eb2068331a98036d7779b524895e8f9495d73a7 | [
"MIT"
] | null | null | null | lib/goth/config.ex | DealPad/goth | 7eb2068331a98036d7779b524895e8f9495d73a7 | [
"MIT"
] | null | null | null | lib/goth/config.ex | DealPad/goth | 7eb2068331a98036d7779b524895e8f9495d73a7 | [
"MIT"
] | 1 | 2021-02-15T17:50:31.000Z | 2021-02-15T17:50:31.000Z | defmodule Goth.Config do
@moduledoc """
`Goth.Config` is a `GenServer` that holds the current configuration.
This configuration is loaded from one of four places:
1. a JSON string passed in via your application's config
2. a ENV variable passed in via your application's config
3. The Application Default Cr... | 28.211538 | 106 | 0.634765 |
3853c2cf63b59893d8f9ce137bf6b28fb028d471 | 1,860 | exs | Elixir | mix.exs | linjunpop/app_store | 7fab554f580e99772d2ce611fa12940e6e50c48e | [
"MIT"
] | 5 | 2021-08-19T16:12:40.000Z | 2022-02-22T04:17:33.000Z | mix.exs | linjunpop/app_store | 7fab554f580e99772d2ce611fa12940e6e50c48e | [
"MIT"
] | 2 | 2021-08-19T13:40:57.000Z | 2021-08-19T13:41:31.000Z | mix.exs | linjunpop/app_store | 7fab554f580e99772d2ce611fa12940e6e50c48e | [
"MIT"
] | null | null | null | defmodule AppStore.MixProject do
use Mix.Project
@version "0.1.0"
@url "https://github.com/linjunpop/app_store"
def project do
[
app: :app_store,
version: @version,
elixir: "~> 1.12",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
deps: de... | 20.217391 | 87 | 0.500538 |
3853ce22e619e882033430f48b7a56d6461eb507 | 882 | ex | Elixir | clients/content/lib/google_api/content/v21/metadata.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v21/metadata.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v21/metadata.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"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... | 32.666667 | 74 | 0.758503 |
3853d65b95853666d3b923baf660423869a5fd6e | 678 | ex | Elixir | lib/crypto_exchanges/adapters/gdax_adapter.ex | sbrink/crypto_exchanges_elixir | 0d500f9129e27b3ab24b59118b88c4d1cbdbec11 | [
"MIT"
] | 12 | 2017-10-01T10:37:11.000Z | 2019-08-09T07:02:02.000Z | lib/crypto_exchanges/adapters/gdax_adapter.ex | sbrink/crypto_exchanges_elixir | 0d500f9129e27b3ab24b59118b88c4d1cbdbec11 | [
"MIT"
] | 1 | 2017-10-02T21:43:40.000Z | 2017-10-08T18:37:19.000Z | lib/crypto_exchanges/adapters/gdax_adapter.ex | sbrink/crypto_exchanges_elixir | 0d500f9129e27b3ab24b59118b88c4d1cbdbec11 | [
"MIT"
] | null | null | null | defmodule CryptoExchanges.GdaxAdapter do
@moduledoc """
An Adapter for Gdax
"""
use CryptoExchanges.Adapter
def get_info, do: %CryptoExchange{
name: "Gdax",
homepage_url: "https://www.gdax.com/",
api_docs_url: "https://docs.gdax.com/",
country: "Unknown",
intervals: []
}
def get_curr... | 19.941176 | 43 | 0.656342 |
3853e8c3e16a0c3744bf11a11ae99ea53d47dd40 | 575 | exs | Elixir | exercises/word-count/example.exs | darktef/elixir-exercism | bcaae351486b1405f0a01cd33b4d39555546298e | [
"MIT"
] | 1 | 2021-08-16T20:24:14.000Z | 2021-08-16T20:24:14.000Z | exercises/word-count/example.exs | Triangle-Elixir/xelixir | 08d23bf47f57799f286567cb26f635291de2fde5 | [
"MIT"
] | null | null | null | exercises/word-count/example.exs | Triangle-Elixir/xelixir | 08d23bf47f57799f286567cb26f635291de2fde5 | [
"MIT"
] | null | null | null | defmodule Words do
@ascii_punctuation ~r/!|"|\#|\$|%|&|'|\(|\)|\*|\+|,|\.|\/|:|;|<|=|>|\?|@|\[|\\|]|\^|_|`|\{|\||}|~/
def count(sentence) do
sentence
|> String.downcase
|> remove_punctuation
|> to_words
|> summarize
end
defp remove_punctuation(string), do: String.replace(string, @a... | 23.958333 | 100 | 0.577391 |
3853fa02b9af8b2b2b4929edb5ceb4d49e089b7a | 377 | exs | Elixir | test/lotus/dotnav_test.exs | code-shoily/lotus | d14958956103f2376d51974f40bcc7d7c59c2ad9 | [
"MIT"
] | 3 | 2021-09-20T10:34:15.000Z | 2021-09-20T16:23:07.000Z | test/lotus/dotnav_test.exs | code-shoily/lotus | d14958956103f2376d51974f40bcc7d7c59c2ad9 | [
"MIT"
] | null | null | null | test/lotus/dotnav_test.exs | code-shoily/lotus | d14958956103f2376d51974f40bcc7d7c59c2ad9 | [
"MIT"
] | 1 | 2021-11-23T13:10:27.000Z | 2021-11-23T13:10:27.000Z | defmodule Lotus.DotnavTest do
use Lotus.Support.ConnCase, async: true
@moduletag :component_dotnav
alias Lotus.Dotnav
test "Creates a Dotnav" do
html =
render_surface do
~F"""
<Dotnav>Hello</Dotnav>
"""
end
assert html =~ """
<ul class="uk-dotnav">
... | 16.391304 | 41 | 0.525199 |
38541a8170b83189d372f79605309e8e465e118e | 7,175 | ex | Elixir | core/sup_tree_core/executor_pool/async_job_broker.ex | wses-yoshida/antikythera | e108e59d2339edd0b0fad31ad4f41f56df45be55 | [
"Apache-2.0"
] | null | null | null | core/sup_tree_core/executor_pool/async_job_broker.ex | wses-yoshida/antikythera | e108e59d2339edd0b0fad31ad4f41f56df45be55 | [
"Apache-2.0"
] | null | null | null | core/sup_tree_core/executor_pool/async_job_broker.ex | wses-yoshida/antikythera | e108e59d2339edd0b0fad31ad4f41f56df45be55 | [
"Apache-2.0"
] | null | null | null | # Copyright(c) 2015-2019 ACCESS CO., LTD. All rights reserved.
use Croma
defmodule AntikytheraCore.ExecutorPool.AsyncJobBroker do
@moduledoc """
A broker that finds a pair of "a runnable job in job queue" and "an available `AsyncJobRunner` process in worker pool".
This `GenServer` becomes `:active` when both a... | 35 | 121 | 0.707317 |
3854276e20bc6b23b95662fe8e4a61077ed3ba4e | 1,030 | ex | Elixir | raspberry_phoenix/lib/raspberry_phoenix.ex | raymondboswel/raspberry_phoenix | ec0594c765db4405f2ec1f876ef9f76e685fcea4 | [
"Apache-2.0"
] | null | null | null | raspberry_phoenix/lib/raspberry_phoenix.ex | raymondboswel/raspberry_phoenix | ec0594c765db4405f2ec1f876ef9f76e685fcea4 | [
"Apache-2.0"
] | null | null | null | raspberry_phoenix/lib/raspberry_phoenix.ex | raymondboswel/raspberry_phoenix | ec0594c765db4405f2ec1f876ef9f76e685fcea4 | [
"Apache-2.0"
] | null | null | null | defmodule RaspberryPhoenix do
use Application
# See http://elixir-lang.org/docs/stable/elixir/Application.html
# for more information on OTP Applications
def start(_type, _args) do
import Supervisor.Spec, warn: false
children = [
# Start the endpoint when the application starts
supervisor(... | 33.225806 | 71 | 0.726214 |
3854297347dfc165688b46003a40658594a02892 | 1,503 | exs | Elixir | installer/test/phx_new_web_test.exs | raspo/phoenix | 438b74255e7a4d68b4eaf1a295d0fcd201c71421 | [
"MIT"
] | null | null | null | installer/test/phx_new_web_test.exs | raspo/phoenix | 438b74255e7a4d68b4eaf1a295d0fcd201c71421 | [
"MIT"
] | null | null | null | installer/test/phx_new_web_test.exs | raspo/phoenix | 438b74255e7a4d68b4eaf1a295d0fcd201c71421 | [
"MIT"
] | null | null | null | Code.require_file "mix_helper.exs", __DIR__
defmodule Mix.Tasks.Phx.New.WebTest do
use ExUnit.Case
import MixHelper
import ExUnit.CaptureIO
@app_name "phx_web"
setup do
# The shell asks to install deps.
# We will politely say not.
send self(), {:mix_shell_input, :yes?, false}
:ok
end
t... | 28.358491 | 105 | 0.641384 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.