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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d5d6636c889f8c85f47ab2ce5deef28579d20233 | 2,819 | ex | Elixir | lib/spider_man/storage/csv.ex | feng19/spider_man | c806af766fb5094339c72c290dbedff5589a3434 | [
"Apache-2.0"
] | 5 | 2021-05-08T08:50:58.000Z | 2021-11-27T09:59:56.000Z | lib/spider_man/storage/csv.ex | feng19/spider_man | c806af766fb5094339c72c290dbedff5589a3434 | [
"Apache-2.0"
] | null | null | null | lib/spider_man/storage/csv.ex | feng19/spider_man | c806af766fb5094339c72c290dbedff5589a3434 | [
"Apache-2.0"
] | 1 | 2021-08-05T15:50:49.000Z | 2021-08-05T15:50:49.000Z | defmodule SpiderMan.Storage.CSV do
@moduledoc """
Save items to *.csv files by Storage
## Usage
settings = [
...
item_processor_options: [
storage: [{#{inspect(__MODULE__)}, [headers: headers, file: file_name]}]
]
]
If didn't set `:file` for this Storage, the def... | 27.637255 | 122 | 0.620433 |
d5d6965f454a80b5a1bcaf5d6cfa27b35e15577f | 430 | ex | Elixir | lib/sema/cms/author.ex | edwinthinks/semaphore-demo-elixir-phoenix | 16c60f1a37f204156a17628947a7dda552a76ee0 | [
"MIT"
] | 1 | 2020-03-19T13:26:01.000Z | 2020-03-19T13:26:01.000Z | lib/sema/cms/author.ex | edwinthinks/semaphore-demo-elixir-phoenix | 16c60f1a37f204156a17628947a7dda552a76ee0 | [
"MIT"
] | 6 | 2019-05-29T16:34:19.000Z | 2021-09-01T02:10:43.000Z | lib/sema/cms/author.ex | edwinthinks/semaphore-demo-elixir-phoenix | 16c60f1a37f204156a17628947a7dda552a76ee0 | [
"MIT"
] | 68 | 2019-05-16T15:40:51.000Z | 2022-03-20T06:30:53.000Z | defmodule Sema.CMS.Author do
@moduledoc false
use Ecto.Schema
import Ecto.Changeset
schema "authors" do
field :bio, :string
field :genre, :string
field :role, :string
field :user_id, :id
timestamps()
end
@doc false
def changeset(author, attrs) do
author
|> cast(attrs, [:bio,... | 18.695652 | 47 | 0.64186 |
d5d6bc0fed3e554812abe89b2406f09f35e67c10 | 1,059 | ex | Elixir | lib/gsmlg_web/channels/user_socket.ex | gsmlg/phoenix-template | bcaa68c21f4c9d28e359c933a03b5347028dcd73 | [
"MIT"
] | 1 | 2020-08-08T22:57:58.000Z | 2020-08-08T22:57:58.000Z | lib/gsmlg_web/channels/user_socket.ex | gsmlg/phoenix-template | bcaa68c21f4c9d28e359c933a03b5347028dcd73 | [
"MIT"
] | 4 | 2020-04-06T01:43:11.000Z | 2021-09-02T20:55:46.000Z | lib/gsmlg_web/channels/user_socket.ex | gsmlg/phoenix-template | bcaa68c21f4c9d28e359c933a03b5347028dcd73 | [
"MIT"
] | null | null | null | defmodule GsmlgWeb.UserSocket do
use Phoenix.Socket
## Channels
# channel "room:*", GsmlgWeb.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, ... | 31.147059 | 83 | 0.694995 |
d5d6bca01d3a364a8875b9eee4c8446b3785079c | 667 | ex | Elixir | lib/type/timestamp.ex | ikeyasu/antikythera | 544fdd22e46b1f34177053d87d9e2a9708c74113 | [
"Apache-2.0"
] | null | null | null | lib/type/timestamp.ex | ikeyasu/antikythera | 544fdd22e46b1f34177053d87d9e2a9708c74113 | [
"Apache-2.0"
] | null | null | null | lib/type/timestamp.ex | ikeyasu/antikythera | 544fdd22e46b1f34177053d87d9e2a9708c74113 | [
"Apache-2.0"
] | null | null | null | # Copyright(c) 2015-2018 ACCESS CO., LTD. All rights reserved.
use Croma
alias Croma.Result, as: R
alias Antikythera.Time
defmodule Antikythera.IsoTimestamp do
@moduledoc """
A strict subset of ISO8601 format of timestamp.
"""
@type t :: String.t
defun valid?(v :: term) :: boolean do
t when is_binary(... | 20.84375 | 64 | 0.622189 |
d5d6d0d68ced80e83aacfc8bfcfcac3380e35d7b | 121 | exs | Elixir | hangman/test/hangman_test.exs | johncoleman83/elixir-for-programmers | 062d0a761e59b30909377694151655c946f48bb4 | [
"MIT"
] | null | null | null | hangman/test/hangman_test.exs | johncoleman83/elixir-for-programmers | 062d0a761e59b30909377694151655c946f48bb4 | [
"MIT"
] | null | null | null | hangman/test/hangman_test.exs | johncoleman83/elixir-for-programmers | 062d0a761e59b30909377694151655c946f48bb4 | [
"MIT"
] | null | null | null | defmodule HangmanTest do
use ExUnit.Case
doctest Hangman
test "test the truth" do
assert 1 + 1 == 2
end
end
| 13.444444 | 26 | 0.677686 |
d5d6f03599c84dcf22517d36932cf307a2a2cc5f | 1,605 | ex | Elixir | clients/display_video/lib/google_api/display_video/v1/model/exchange_targeting_option_details.ex | EVLedger/elixir-google-api | 61edef19a5e2c7c63848f7030c6d8d651e4593d4 | [
"Apache-2.0"
] | null | null | null | clients/display_video/lib/google_api/display_video/v1/model/exchange_targeting_option_details.ex | EVLedger/elixir-google-api | 61edef19a5e2c7c63848f7030c6d8d651e4593d4 | [
"Apache-2.0"
] | null | null | null | clients/display_video/lib/google_api/display_video/v1/model/exchange_targeting_option_details.ex | EVLedger/elixir-google-api | 61edef19a5e2c7c63848f7030c6d8d651e4593d4 | [
"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... | 31.470588 | 94 | 0.753271 |
d5d6f5a6abebbed10501c9520401f819ffe9b3d9 | 1,470 | exs | Elixir | mix.exs | Raphexion/ex_rerun | 3707b5a8a417f4150839951d6455be5b130301d2 | [
"MIT"
] | null | null | null | mix.exs | Raphexion/ex_rerun | 3707b5a8a417f4150839951d6455be5b130301d2 | [
"MIT"
] | null | null | null | mix.exs | Raphexion/ex_rerun | 3707b5a8a417f4150839951d6455be5b130301d2 | [
"MIT"
] | null | null | null | defmodule ExRerun.MixProject do
use Mix.Project
@version "0.1.0"
@elixir_version "~> 1.7"
def project do
[
app: :ex_rerun,
version: @version,
elixir: @elixir_version,
aliases: aliases(),
description: description(),
deps: deps(),
dialyzer: dialyzer(),
docs: d... | 19.864865 | 72 | 0.557143 |
d5d703f8126d6e003408446c780bd7d8bc135aeb | 155 | exs | Elixir | Chapter07/apps/elixir_drip/priv/repo/migrations/20180320101722_unique_users_constraint.exs | sthagen/Mastering-Elixir | 1b52ee79afe6b2ae80767a5e55c2be51df3c4c1d | [
"MIT"
] | 28 | 2018-08-09T05:05:29.000Z | 2022-03-14T06:59:07.000Z | Chapter07/apps/elixir_drip/priv/repo/migrations/20180320101722_unique_users_constraint.exs | sthagen/Mastering-Elixir | 1b52ee79afe6b2ae80767a5e55c2be51df3c4c1d | [
"MIT"
] | 1 | 2019-02-11T09:11:33.000Z | 2019-05-06T06:40:19.000Z | Chapter07/apps/elixir_drip/priv/repo/migrations/20180320101722_unique_users_constraint.exs | sthagen/Mastering-Elixir | 1b52ee79afe6b2ae80767a5e55c2be51df3c4c1d | [
"MIT"
] | 8 | 2018-08-09T14:53:02.000Z | 2020-12-14T19:31:21.000Z | defmodule ElixirDrip.Repo.Migrations.UniqueUsersConstraint do
use Ecto.Migration
def change do
create unique_index(:users, [:username])
end
end
| 19.375 | 61 | 0.774194 |
d5d74761c0dc14cc75e64b01581323b858659647 | 4,316 | ex | Elixir | test/support/mocks/geocoder.ex | chuckcharlie/teslamate | f95fd9710c304f0a8ef3bba34dcbcb0831d73f48 | [
"MIT"
] | 1 | 2020-05-06T11:37:20.000Z | 2020-05-06T11:37:20.000Z | test/support/mocks/geocoder.ex | chuckcharlie/teslamate | f95fd9710c304f0a8ef3bba34dcbcb0831d73f48 | [
"MIT"
] | null | null | null | test/support/mocks/geocoder.ex | chuckcharlie/teslamate | f95fd9710c304f0a8ef3bba34dcbcb0831d73f48 | [
"MIT"
] | null | null | null | defmodule GeocoderMock do
alias TeslaMate.Locations.Address
def reverse_lookup(%Decimal{} = lat, %Decimal{} = lon, lang) do
reverse_lookup(Decimal.to_float(lat), Decimal.to_float(lon), lang)
end
def reverse_lookup(99.9, 99.9, _lang), do: {:error, :induced_error}
def reverse_lookup(lat, lng, _lang)
... | 29.162162 | 136 | 0.539157 |
d5d74c81b14da8a407438623430ecb594191e5a5 | 2,471 | ex | Elixir | lib/html/form.ex | daveli/polymorphic_embed | 8f6c8180a682f26aec98c6e9cbd84c20b6895be9 | [
"Apache-2.0"
] | null | null | null | lib/html/form.ex | daveli/polymorphic_embed | 8f6c8180a682f26aec98c6e9cbd84c20b6895be9 | [
"Apache-2.0"
] | null | null | null | lib/html/form.ex | daveli/polymorphic_embed | 8f6c8180a682f26aec98c6e9cbd84c20b6895be9 | [
"Apache-2.0"
] | null | null | null | if Code.ensure_loaded?(Phoenix.HTML) do
defmodule PolymorphicEmbed.HTML.Form do
import Phoenix.HTML, only: [html_escape: 1]
import Phoenix.HTML.Form, only: [hidden_inputs_for: 1]
def polymorphic_embed_inputs_for(form, field, type, fun)
when is_atom(field) or is_binary(field) do
forms = to_f... | 28.079545 | 82 | 0.599757 |
d5d75504743a4cbf2e4714ea9850c73ef913b3b0 | 732 | ex | Elixir | lib/bpmn/application.ex | Around25/hashiru-bpmn | 56271b700b71ecef409f932dbacb02392f403be9 | [
"Apache-2.0"
] | 13 | 2017-09-19T17:49:59.000Z | 2021-09-21T18:20:15.000Z | lib/bpmn/application.ex | Around25/hashiru-bpmn | 56271b700b71ecef409f932dbacb02392f403be9 | [
"Apache-2.0"
] | 7 | 2017-10-17T16:44:37.000Z | 2017-11-14T23:40:40.000Z | lib/bpmn/application.ex | Around25/hashiru-bpmn | 56271b700b71ecef409f932dbacb02392f403be9 | [
"Apache-2.0"
] | 3 | 2017-10-21T08:23:26.000Z | 2021-09-10T14:27:07.000Z | defmodule Bpmn.Application do
# See http://elixir-lang.org/docs/stable/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
import Supervisor.Spec, warn: false
# Define workers and child supervisors to be supervised
child... | 30.5 | 76 | 0.709016 |
d5d76c90b114928395a2cf4fa9bfdf23f5091c95 | 1,128 | exs | Elixir | mix.exs | lanodan/elixir-web-push-encryption | 05ac5f3166128701bccf3bde336216b6330c1679 | [
"MIT"
] | null | null | null | mix.exs | lanodan/elixir-web-push-encryption | 05ac5f3166128701bccf3bde336216b6330c1679 | [
"MIT"
] | 1 | 2021-08-11T11:56:43.000Z | 2021-08-11T12:02:38.000Z | mix.exs | lanodan/elixir-web-push-encryption | 05ac5f3166128701bccf3bde336216b6330c1679 | [
"MIT"
] | null | null | null | defmodule WebPushEncryption.Mixfile do
use Mix.Project
@version "0.3.0"
def project do
[
app: :web_push_encryption,
version: @version,
elixir: "~> 1.4",
description: "Web push encryption library",
source_url: "https://github.com/tuvistavie/elixir-web-push-encryption",
bui... | 24 | 79 | 0.548759 |
d5d7bd973ffef2d2378d898c3303fe2d794f25b8 | 2,625 | exs | Elixir | test/documents_design/accounts/accounts_test.exs | documents-org/documents.design-el | 6976254e175232afe5e913c29b04c13a86d2e9a2 | [
"MIT"
] | null | null | null | test/documents_design/accounts/accounts_test.exs | documents-org/documents.design-el | 6976254e175232afe5e913c29b04c13a86d2e9a2 | [
"MIT"
] | null | null | null | test/documents_design/accounts/accounts_test.exs | documents-org/documents.design-el | 6976254e175232afe5e913c29b04c13a86d2e9a2 | [
"MIT"
] | null | null | null | defmodule DocumentsDesign.AccountsTest do
use DocumentsDesign.DataCase
alias DocumentsDesign.Accounts
describe "users" do
alias DocumentsDesign.Accounts.User
@valid_attrs %{email: "some email", name: "some name", password: "some password", reset_date: "some reset_date", reset_token: "some reset_token"}... | 35.958904 | 190 | 0.672 |
d5d7cb41337c96e242b27b4bfc2db576ece1f249 | 3,862 | ex | Elixir | lib/rihanna/job_dispatcher.ex | antonioparisi/rihanna | 81aca463419111aa3e761dbbd5862ac986d3ec7a | [
"MIT"
] | null | null | null | lib/rihanna/job_dispatcher.ex | antonioparisi/rihanna | 81aca463419111aa3e761dbbd5862ac986d3ec7a | [
"MIT"
] | null | null | null | lib/rihanna/job_dispatcher.ex | antonioparisi/rihanna | 81aca463419111aa3e761dbbd5862ac986d3ec7a | [
"MIT"
] | 1 | 2019-10-10T23:24:10.000Z | 2019-10-10T23:24:10.000Z | defmodule Rihanna.JobDispatcher do
use GenServer
@task_supervisor Rihanna.TaskSupervisor
@startup_delay if Mix.env() == :test, do: 0, else: :timer.seconds(5)
@moduledoc false
def start_link(config, opts) do
db = Keyword.get(config, :db)
GenServer.start_link(__MODULE__, db, opts)
end
@doc fals... | 28.607407 | 138 | 0.644226 |
d5d7fe9cf92bfaed381281057bd8524f0e78e573 | 9,893 | exs | Elixir | test/integrate/claims_test.exs | integratedb/core | 0b4a7a38d014e5ae973a1fa807c137834dfdf9cb | [
"MIT"
] | 13 | 2021-01-28T14:45:43.000Z | 2021-11-04T21:54:19.000Z | test/integrate/claims_test.exs | integratedb/integrate | 0b4a7a38d014e5ae973a1fa807c137834dfdf9cb | [
"MIT"
] | null | null | null | test/integrate/claims_test.exs | integratedb/integrate | 0b4a7a38d014e5ae973a1fa807c137834dfdf9cb | [
"MIT"
] | null | null | null | defmodule Integrate.ClaimsTest do
use Integrate.DataCase
alias Integrate.Claims
describe "claims" do
setup [:create_user, :create_stakeholder, :create_spec]
alias Integrate.Claims.Claim
def claim_fixture(spec, attrs \\ %{}) do
{:ok, claim} = Claims.create_claim(spec, attrs)
claim
... | 32.650165 | 101 | 0.6916 |
d5d841c3ef044b28a58428a64906c74f7fdc4900 | 1,588 | ex | Elixir | lib/post_register/web/web.ex | myobie/post_register | 924a832d7fa1693d655c34b0295affa8b3275f26 | [
"MIT"
] | null | null | null | lib/post_register/web/web.ex | myobie/post_register | 924a832d7fa1693d655c34b0295affa8b3275f26 | [
"MIT"
] | null | null | null | lib/post_register/web/web.ex | myobie/post_register | 924a832d7fa1693d655c34b0295affa8b3275f26 | [
"MIT"
] | null | null | null | defmodule PostRegister.Web do
@moduledoc """
A module that keeps using definitions for controllers,
views and so on.
This can be used in your application as:
use PostRegister.Web, :controller
use PostRegister.Web, :view
The definitions below will be executed for every view,
controller, etc, s... | 23.701493 | 88 | 0.687028 |
d5d89984d89ef22bea733604f939489c97417fa7 | 1,930 | exs | Elixir | mix.exs | tsubery/phoenix_bakery | 4c9bc5b7a2f927d211575a9b572856b36a45078c | [
"MIT"
] | 12 | 2021-10-06T12:05:12.000Z | 2022-01-22T06:30:52.000Z | mix.exs | hauleth/phoenix_bakery | 7a749fb6dff711de9dd00ba307dc27967ae6f97b | [
"MIT"
] | null | null | null | mix.exs | hauleth/phoenix_bakery | 7a749fb6dff711de9dd00ba307dc27967ae6f97b | [
"MIT"
] | null | null | null | defmodule PhoenixBakery.MixProject do
use Mix.Project
@description File.read!("README.md")
|> String.split(~r/<!--\s*(start|end):PhoenixBakery\s*-->/, parts: 3)
|> Enum.at(1)
|> String.trim()
|> String.split(~r/\n/, parts: 2)
|> List.first(... | 22.44186 | 84 | 0.507254 |
d5d89bc927b3a852f943f64c1d4f9ac26d073d15 | 1,572 | ex | Elixir | server/lib/routes/api_router.ex | arturoeanton/elixir-dynamic-api | ad44f1b86a4ee18ce36156326fe2a1d52e7858bc | [
"Apache-2.0"
] | null | null | null | server/lib/routes/api_router.ex | arturoeanton/elixir-dynamic-api | ad44f1b86a4ee18ce36156326fe2a1d52e7858bc | [
"Apache-2.0"
] | null | null | null | server/lib/routes/api_router.ex | arturoeanton/elixir-dynamic-api | ad44f1b86a4ee18ce36156326fe2a1d52e7858bc | [
"Apache-2.0"
] | null | null | null | defmodule Routes.ApiRouter do
use Routes.Base
@database [%{"id" => 1, "title" => "Hello"}, %{"id" => 2, "title" => "world!"}]
get "/" do
send(conn, 200, @database)
end
post "/" do
send(conn, :ok, %{"id" => 3, "title" => "just been added"})
end
put "/:id" do
send(conn, :ok, %{"id" => id, "t... | 33.446809 | 139 | 0.602417 |
d5d8ec65bac206952cafd881c2605ece1e9240c3 | 867 | ex | Elixir | test/support/subscription_case.ex | Megami-Studios/glimesh.tv | 57dde3a328fabdcc3305be48ae1b82df27b83c9b | [
"MIT"
] | 1 | 2021-06-08T00:07:39.000Z | 2021-06-08T00:07:39.000Z | test/support/subscription_case.ex | Megami-Studios/glimesh.tv | 57dde3a328fabdcc3305be48ae1b82df27b83c9b | [
"MIT"
] | null | null | null | test/support/subscription_case.ex | Megami-Studios/glimesh.tv | 57dde3a328fabdcc3305be48ae1b82df27b83c9b | [
"MIT"
] | null | null | null | defmodule GlimeshWeb.SubscriptionCase do
use ExUnit.CaseTemplate
import Phoenix.ChannelTest, only: [connect: 2]
import Glimesh.AccountsFixtures
@endpoint GlimeshWeb.Endpoint
using do
quote do
# Import conveniences for testing with channels
use GlimeshWeb.ChannelCase
use Absinthe.Phoen... | 21.675 | 96 | 0.668973 |
d5d91dd3d4f6da895c0e901d01b889eccc20687e | 961 | exs | Elixir | test/unsong/scrape_test.exs | jpaddison3/hello_phoenix | c86e0f3591134488e7e48faef96ce89818a59e62 | [
"MIT"
] | null | null | null | test/unsong/scrape_test.exs | jpaddison3/hello_phoenix | c86e0f3591134488e7e48faef96ce89818a59e62 | [
"MIT"
] | null | null | null | test/unsong/scrape_test.exs | jpaddison3/hello_phoenix | c86e0f3591134488e7e48faef96ce89818a59e62 | [
"MIT"
] | null | null | null | defmodule ScrapeTest do
use ExUnit.Case
require EEx
@toc_example "test/resources/fake-unsong-toc.html.eex"
doctest UnsongScraper
setup do
bypass = Bypass.open
{:ok, bypass: bypass}
end
EEx.function_from_file :def, :get_toc, @toc_example, [:bypass_port]
test "scrape_toc good path", %{bypa... | 28.264706 | 91 | 0.656608 |
d5d942f2f15ab468233380eaf09446cde90b82f8 | 1,028 | ex | Elixir | lib/advent_of_code/input.ex | mugimaru73/adventofcode2018 | 24ff5b2b8327b17b3242d3167bf7cc691199da86 | [
"MIT"
] | 1 | 2018-12-03T11:24:19.000Z | 2018-12-03T11:24:19.000Z | lib/advent_of_code/input.ex | mugimaru73/adventofcode2018 | 24ff5b2b8327b17b3242d3167bf7cc691199da86 | [
"MIT"
] | null | null | null | lib/advent_of_code/input.ex | mugimaru73/adventofcode2018 | 24ff5b2b8327b17b3242d3167bf7cc691199da86 | [
"MIT"
] | null | null | null | defmodule AdventOfCode.Input do
@moduledoc """
AoC input reader.
"""
@stream_lines_for ["03", "04", "07", "10"]
@doc "Returns an input for given day."
@spec get(day :: String.t()) :: term
def get("17"), do: stream_file_lines!("17")
def get("16") do
{read_file!("16_1"), read_file!("16_2")}
end
... | 23.906977 | 94 | 0.617704 |
d5d9463d43cfb8aede230afdba1ad25a631a57e8 | 4,621 | exs | Elixir | lib/mix/test/mix/cli_test.exs | davidsulc/elixir | dd4fd6ab742acd75862e34e26dbdb86e0cf6453f | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/cli_test.exs | davidsulc/elixir | dd4fd6ab742acd75862e34e26dbdb86e0cf6453f | [
"Apache-2.0"
] | null | null | null | lib/mix/test/mix/cli_test.exs | davidsulc/elixir | dd4fd6ab742acd75862e34e26dbdb86e0cf6453f | [
"Apache-2.0"
] | null | null | null | Code.require_file "../test_helper.exs", __DIR__
defmodule Mix.CLITest do
use MixTest.Case
test "default task" do
in_fixture "no_mixfile", fn ->
File.write! "mix.exs", """
defmodule P do
use Mix.Project
def project, do: [app: :p, version: "0.1.0"]
end
"""
mix ~w[]
... | 27.182353 | 90 | 0.576715 |
d5d98755e3f429500be460e9614785dceda32d6e | 104 | ex | Elixir | lib/selfme/repo.ex | esemeniuc/selfme | f6f11eb32bab909c199d7a2090a8370470feaf27 | [
"MIT"
] | 1 | 2019-07-21T00:36:01.000Z | 2019-07-21T00:36:01.000Z | lib/selfme/repo.ex | esemeniuc/selfme | f6f11eb32bab909c199d7a2090a8370470feaf27 | [
"MIT"
] | 10 | 2019-08-01T03:50:13.000Z | 2022-02-26T15:50:07.000Z | lib/selfme/repo.ex | esemeniuc/selfme | f6f11eb32bab909c199d7a2090a8370470feaf27 | [
"MIT"
] | null | null | null | defmodule Selfme.Repo do
use Ecto.Repo,
otp_app: :selfme,
adapter: Ecto.Adapters.Postgres
end
| 17.333333 | 35 | 0.721154 |
d5d989196d78be0212644ac9fc5429b9387d69e4 | 840 | ex | Elixir | lib/autox/models/user.ex | autoxjs/autox-phoenix | 6446f4487e3af28955f6560973cff6add34be4d4 | [
"MIT"
] | null | null | null | lib/autox/models/user.ex | autoxjs/autox-phoenix | 6446f4487e3af28955f6560973cff6add34be4d4 | [
"MIT"
] | 20 | 2016-04-05T06:28:58.000Z | 2016-05-12T15:45:37.000Z | lib/autox/models/user.ex | foxnewsnetwork/autox | 66ea3f0f7ba8b3f9e910984a2ed3cdf0ef5ef29a | [
"MIT"
] | null | null | null | defmodule Autox.User do
import Ecto.Changeset
def encrypt_password(changeset) do
password_hash = changeset
|> get_field(:password)
|> Comeonin.Bcrypt.hashpwsalt
changeset
|> put_change(:password_hash, password_hash)
end
def setup_remember_token(changeset) do
{:changes, email} = changes... | 28.965517 | 66 | 0.663095 |
d5d98cc9ac5d567eaac2da0c41578a071ff1901f | 1,219 | ex | Elixir | lib/bitcoin/key/public.ex | anthdm/bitcoin-elixir | 5ca9f8bf4e9b2b38527670e80568a85e0aa612c0 | [
"Apache-2.0"
] | 81 | 2017-04-20T17:42:59.000Z | 2022-02-08T03:49:22.000Z | lib/bitcoin/key/public.ex | anthdm/bitcoin-elixir | 5ca9f8bf4e9b2b38527670e80568a85e0aa612c0 | [
"Apache-2.0"
] | 2 | 2017-09-07T13:58:57.000Z | 2018-01-13T10:38:07.000Z | lib/bitcoin/key/public.ex | anthdm/bitcoin-elixir | 5ca9f8bf4e9b2b38527670e80568a85e0aa612c0 | [
"Apache-2.0"
] | 22 | 2017-08-16T14:19:44.000Z | 2021-12-22T04:36:57.000Z | defmodule Bitcoin.Key.Public do
@moduledoc """
Public key operations.
"""
use Bitcoin.Common
alias Bitcoin.Crypto
alias Bitcoin.Base58Check
@type t :: binary
@doc """
Check if public key is in either compressed or uncompressed format.
Used for validation with the STRICTENC flag.
"""
@spec ... | 21.017241 | 107 | 0.629204 |
d5d990878ee8167cf38ba81eec0771f4b4ab37b6 | 1,604 | ex | Elixir | lib/policr_mini/businesses/custom_kit_bussiness.ex | WOCyo/policr-mini | 23e5e9f927d083cba5993f39e9f122e3a0ad1be2 | [
"MIT"
] | 487 | 2020-06-08T03:04:21.000Z | 2022-03-31T14:51:36.000Z | lib/policr_mini/businesses/custom_kit_bussiness.ex | WOCyo/policr-mini | 23e5e9f927d083cba5993f39e9f122e3a0ad1be2 | [
"MIT"
] | 141 | 2020-06-11T01:03:29.000Z | 2022-03-30T20:23:32.000Z | lib/policr_mini/businesses/custom_kit_bussiness.ex | WOCyo/policr-mini | 23e5e9f927d083cba5993f39e9f122e3a0ad1be2 | [
"MIT"
] | 61 | 2020-06-10T05:25:03.000Z | 2022-03-23T15:54:26.000Z | defmodule PolicrMini.CustomKitBusiness do
@moduledoc """
自定义验证套件的业务功能实现。
"""
use PolicrMini, business: PolicrMini.Schema.CustomKit
import Ecto.Query, only: [from: 2, dynamic: 2]
@type writed_result :: {:ok, CustomKit.t()} | {:error, Ecto.Changeset.t()}
@max_count 12
@spec create(map()) :: writed_re... | 28.642857 | 96 | 0.65399 |
d5d9af5c7c7d2cd0639fec2549a479dc068406d3 | 359 | exs | Elixir | priv/repo/migrations/20170629192530_create_admin_product.exs | gsarwate/shopix | 21d0e85294ee92cb7573d1b5a5746af6824b9355 | [
"MIT"
] | 196 | 2019-05-05T15:59:32.000Z | 2022-03-15T02:37:19.000Z | priv/repo/migrations/20170629192530_create_admin_product.exs | gsarwate/shopix | 21d0e85294ee92cb7573d1b5a5746af6824b9355 | [
"MIT"
] | 105 | 2019-05-04T19:04:40.000Z | 2021-07-28T11:21:45.000Z | priv/repo/migrations/20170629192530_create_admin_product.exs | gsarwate/shopix | 21d0e85294ee92cb7573d1b5a5746af6824b9355 | [
"MIT"
] | 26 | 2019-05-05T19:40:52.000Z | 2021-11-16T00:32:46.000Z | defmodule Shopix.Repo.Migrations.CreateShopix.Admin.Product do
use Ecto.Migration
def change do
create table(:products) do
add :sku, :string
add :price, :decimal, precision: 10, scale: 2
add :name_translations, :map
add :description_translations, :map
add :slug_translations, :map
... | 21.117647 | 62 | 0.674095 |
d5d9af84a6baf5d09effd95b9cad7ea1da9507d7 | 1,879 | ex | Elixir | pkgs/desktops/pantheon/nixpkgs_github_update/lib/nixpkgs_github_update/nix.ex | siddharthist/nixpkgs | 11019ea58fc502b96d99b741ddcf1c8cd6811630 | [
"MIT"
] | 2 | 2021-07-31T15:11:40.000Z | 2021-08-03T13:49:55.000Z | pkgs/desktops/pantheon/nixpkgs_github_update/lib/nixpkgs_github_update/nix.ex | siddharthist/nixpkgs | 11019ea58fc502b96d99b741ddcf1c8cd6811630 | [
"MIT"
] | 13 | 2021-05-20T23:50:10.000Z | 2022-03-30T22:23:29.000Z | pkgs/desktops/pantheon/nixpkgs_github_update/lib/nixpkgs_github_update/nix.ex | siddharthist/nixpkgs | 11019ea58fc502b96d99b741ddcf1c8cd6811630 | [
"MIT"
] | 3 | 2020-11-04T05:30:50.000Z | 2020-11-06T04:49:21.000Z | defmodule NixpkgsGitHubUpdate.Nix do
def executable do
nix = System.find_executable("nix")
if nix == nil do
raise RuntimeError, message: "missing executable for 'nix'"
end
nix
end
def eval!(attribute) do
System.cmd(
executable(),
[
"eval",
"--json",
... | 21.848837 | 90 | 0.584886 |
d5d9afd5b7db6ae55ecde033bbaa615f3140402c | 1,259 | ex | Elixir | clients/dataproc/lib/google_api/dataproc/v1/model/cancel_job_request.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/dataproc/lib/google_api/dataproc/v1/model/cancel_job_request.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/dataproc/lib/google_api/dataproc/v1/model/cancel_job_request.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 ... | 29.97619 | 77 | 0.758539 |
d5d9de1f82febf0769c3ff7ab246802d4bba831e | 1,688 | ex | Elixir | lib/receptar/accounts/user_notifier.ex | johannes-mueller/receptar | 6ab2cbf93c5da01409a9d8ed3d56a825e8350a1e | [
"Apache-2.0"
] | null | null | null | lib/receptar/accounts/user_notifier.ex | johannes-mueller/receptar | 6ab2cbf93c5da01409a9d8ed3d56a825e8350a1e | [
"Apache-2.0"
] | null | null | null | lib/receptar/accounts/user_notifier.ex | johannes-mueller/receptar | 6ab2cbf93c5da01409a9d8ed3d56a825e8350a1e | [
"Apache-2.0"
] | null | null | null | defmodule Receptar.Accounts.UserNotifier do
import Swoosh.Email
alias Receptar.Mailer
# Delivers the email using the application mailer.
defp deliver(recipient, subject, body) do
email =
new()
|> to(recipient)
|> from({"MyApp", "contact@example.com"})
|> subject(subject)
|> t... | 21.1 | 64 | 0.57109 |
d5da12aff3363a33045024bf9869078b5bf92168 | 2,765 | exs | Elixir | test/wordle/pretty_test.exs | pyzlnar/rem-bot | 100b71949026eb191c1ebf80d64270406f237958 | [
"MIT"
] | 4 | 2022-02-20T13:33:48.000Z | 2022-03-31T00:48:52.000Z | test/wordle/pretty_test.exs | pyzlnar/rem-bot | 100b71949026eb191c1ebf80d64270406f237958 | [
"MIT"
] | 1 | 2022-02-22T05:42:05.000Z | 2022-02-22T05:42:05.000Z | test/wordle/pretty_test.exs | pyzlnar/rem-bot | 100b71949026eb191c1ebf80d64270406f237958 | [
"MIT"
] | null | null | null | defmodule Wordle.PrettyTest do
use ExUnit.Case, async: true
alias Wordle.{Game, Pretty}
describe "board_with_info/1" do
test "returns a keyword list with all the necessary info to print the board" do
game = %Game{
attempts: ~W[tacos board],
evaluations: [
~W[absent presen... | 27.929293 | 83 | 0.603255 |
d5da72eed95644c757412944a1a1b5dd63c03140 | 259 | ex | Elixir | lib/macchinista.ex | themaxhero/Machinista | 2e0114dbbc69fc8187b3ed080de694ac4f558ae8 | [
"BSD-2-Clause"
] | 1 | 2019-12-16T10:22:07.000Z | 2019-12-16T10:22:07.000Z | lib/macchinista.ex | themaxhero/Machinista | 2e0114dbbc69fc8187b3ed080de694ac4f558ae8 | [
"BSD-2-Clause"
] | 2 | 2021-03-10T06:56:47.000Z | 2021-05-11T02:41:32.000Z | lib/macchinista.ex | themaxhero/Macchinista | 2e0114dbbc69fc8187b3ed080de694ac4f558ae8 | [
"BSD-2-Clause"
] | null | null | null | defmodule Macchinista do
@moduledoc """
Macchinista keeps the contexts that define your domain
and business logic.
Contexts are also responsible for managing your data, regardless
if it comes from the database, an external API or others.
"""
end
| 25.9 | 66 | 0.760618 |
d5da753d55abfbaa85f8246a0eef3fffb1c845f4 | 1,543 | exs | Elixir | test/test_server_test.exs | kianmeng/mailman | cf5b6da436fb0d3d1d816c804aa0dbab157a0150 | [
"MIT"
] | 154 | 2015-02-23T17:36:05.000Z | 2017-09-09T05:50:21.000Z | test/test_server_test.exs | kianmeng/mailman | cf5b6da436fb0d3d1d816c804aa0dbab157a0150 | [
"MIT"
] | 67 | 2015-03-04T04:01:22.000Z | 2017-09-14T04:23:04.000Z | test/test_server_test.exs | kianmeng/mailman | cf5b6da436fb0d3d1d816c804aa0dbab157a0150 | [
"MIT"
] | 62 | 2015-03-04T03:53:07.000Z | 2017-09-07T23:34:15.000Z | defmodule Mailman.TestServerTest do
use ExUnit.Case, async: false
alias Mailman.TestServer
setup do
on_exit fn ->
TestServer.set_global_mode! false
end
:ok
end
test "asynchronous calls to TestServer don't interfere with each other" do
tasks =
for i <- 1..10 do
Task.async... | 27.070175 | 89 | 0.631886 |
d5da9cd5e5c50f037cdacbfc370c818da2864940 | 234 | ex | Elixir | farmbot_core/lib/farmbot_core/json/jason_parser.ex | adamswsk/farmbot_os | d177d3b74888c1e7bcbf8f8595818708ee97f73b | [
"MIT"
] | 843 | 2016-10-05T23:46:05.000Z | 2022-03-14T04:31:55.000Z | farmbot_core/lib/farmbot_core/json/jason_parser.ex | adamswsk/farmbot_os | d177d3b74888c1e7bcbf8f8595818708ee97f73b | [
"MIT"
] | 455 | 2016-10-15T08:49:16.000Z | 2022-03-15T12:23:04.000Z | farmbot_core/lib/farmbot_core/json/jason_parser.ex | adamswsk/farmbot_os | d177d3b74888c1e7bcbf8f8595818708ee97f73b | [
"MIT"
] | 261 | 2016-10-10T04:37:06.000Z | 2022-03-13T21:07:38.000Z | defmodule FarmbotCore.JSON.JasonParser do
@moduledoc "Parser handler for Jason"
@behaviour FarmbotCore.JSON.Parser
def decode(data, opts), do: Jason.decode(data, opts)
def encode(data, opts), do: Jason.encode(data, opts)
end
| 29.25 | 54 | 0.752137 |
d5daac414ae27bb930bc19fa4f5a3ad90a2cde63 | 384 | exs | Elixir | priv/repo/migrations/20160218103935_create_missing_references.exs | harry-gao/ex-cart | 573e7f977bb3b710d11618dd215d4ddd8f819fb3 | [
"Apache-2.0"
] | 356 | 2016-03-16T12:37:28.000Z | 2021-12-18T03:22:39.000Z | priv/repo/migrations/20160218103935_create_missing_references.exs | harry-gao/ex-cart | 573e7f977bb3b710d11618dd215d4ddd8f819fb3 | [
"Apache-2.0"
] | 30 | 2016-03-16T09:19:10.000Z | 2021-01-12T08:10:52.000Z | priv/repo/migrations/20160218103935_create_missing_references.exs | harry-gao/ex-cart | 573e7f977bb3b710d11618dd215d4ddd8f819fb3 | [
"Apache-2.0"
] | 72 | 2016-03-16T13:32:14.000Z | 2021-03-23T11:27:43.000Z | defmodule Nectar.Repo.Migrations.CreateMissingReferences do
use Ecto.Migration
def change do
alter table(:shippings) do
add :shipping_method_id, references(:shipping_methods)
end
alter table(:adjustments) do
add :tax_id, references(:taxes)
end
alter table(:payments) do
add :pa... | 24 | 60 | 0.71875 |
d5dad422fd539e70d6d43f0fa67c3947eb360dcf | 1,853 | ex | Elixir | lib/chirper/blog.ex | ritavaz02/Produtos | b29ed74e428eb9391ccd12460d1dcb005d040400 | [
"MIT"
] | 2 | 2019-10-10T11:57:29.000Z | 2019-12-17T18:04:10.000Z | lib/chirper/blog.ex | ritavaz02/Produtos | b29ed74e428eb9391ccd12460d1dcb005d040400 | [
"MIT"
] | 86 | 2019-04-27T16:18:58.000Z | 2021-05-28T23:13:36.000Z | lib/chirper/blog.ex | ritavaz02/Produtos | b29ed74e428eb9391ccd12460d1dcb005d040400 | [
"MIT"
] | 1 | 2020-07-16T04:52:47.000Z | 2020-07-16T04:52:47.000Z | defmodule Chirper.Blog do
@moduledoc """
The Blog context.
"""
import Ecto.Query, warn: false
alias Chirper.Repo
alias Chirper.Blog.Post
alias Chirper.Accounts.User
@doc """
Returns the list of posts.
## Examples
iex> list_posts()
[%Post{}, ...]
"""
def list_posts do
Post
... | 15.974138 | 59 | 0.563411 |
d5dad9c0cf79405cca7d2ad2e3b8e0c701f4c54b | 429 | exs | Elixir | priv/repo/seeds.exs | taylonr/couchjitsu_track | 0a31c450ac734f9d8b69849cb766de0e99f178c4 | [
"MIT"
] | null | null | null | priv/repo/seeds.exs | taylonr/couchjitsu_track | 0a31c450ac734f9d8b69849cb766de0e99f178c4 | [
"MIT"
] | null | null | null | priv/repo/seeds.exs | taylonr/couchjitsu_track | 0a31c450ac734f9d8b69849cb766de0e99f178c4 | [
"MIT"
] | 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:
#
# CouchjitsuTrack.Repo.insert!(%CouchjitsuTrack.SomeModel{})
#
# We recommend using the bang functions (`insert!`, `update!`
# and so o... | 30.642857 | 64 | 0.724942 |
d5daf16aa4b7316ce51a1b53f51b0c3a3f3a91c9 | 18,918 | ex | Elixir | clients/cloud_debugger/lib/google_api/cloud_debugger/v2/api/debugger.ex | EVLedger/elixir-google-api | 61edef19a5e2c7c63848f7030c6d8d651e4593d4 | [
"Apache-2.0"
] | null | null | null | clients/cloud_debugger/lib/google_api/cloud_debugger/v2/api/debugger.ex | EVLedger/elixir-google-api | 61edef19a5e2c7c63848f7030c6d8d651e4593d4 | [
"Apache-2.0"
] | null | null | null | clients/cloud_debugger/lib/google_api/cloud_debugger/v2/api/debugger.ex | EVLedger/elixir-google-api | 61edef19a5e2c7c63848f7030c6d8d651e4593d4 | [
"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... | 45.366906 | 196 | 0.622053 |
d5daf26863b1f48a9510540915b992e72bd07cce | 1,488 | exs | Elixir | test/absinthe/execution/fragment_spread_test.exs | TheRealReal/absinthe | 6eae5bc36283e58f42d032b8afd90de3ad64f97b | [
"MIT"
] | 4,101 | 2016-03-02T03:49:20.000Z | 2022-03-31T05:46:01.000Z | test/absinthe/execution/fragment_spread_test.exs | TheRealReal/absinthe | 6eae5bc36283e58f42d032b8afd90de3ad64f97b | [
"MIT"
] | 889 | 2016-03-02T16:06:59.000Z | 2022-03-31T20:24:12.000Z | test/absinthe/execution/fragment_spread_test.exs | TheRealReal/absinthe | 6eae5bc36283e58f42d032b8afd90de3ad64f97b | [
"MIT"
] | 564 | 2016-03-02T07:49:59.000Z | 2022-03-06T14:40:59.000Z | defmodule Absinthe.Execution.FragmentSpreadTest do
use Absinthe.Case, async: true
@query """
query AbstractFragmentSpread {
firstSearchResult {
...F0
}
}
fragment F0 on SearchResult {
...F1
__typename
}
fragment F1 on Person {
age
}
"""
test "spreads fragments with abst... | 23.25 | 96 | 0.524866 |
d5db25f29e501a2dda5e8dff2472331aa4ed04dd | 783 | ex | Elixir | lib/lifx/poller/private.ex | axelson/lifx | 9ac02474d181001efc6bc08d7d39a6f6e3bb0d2a | [
"Apache-2.0"
] | null | null | null | lib/lifx/poller/private.ex | axelson/lifx | 9ac02474d181001efc6bc08d7d39a6f6e3bb0d2a | [
"Apache-2.0"
] | null | null | null | lib/lifx/poller/private.ex | axelson/lifx | 9ac02474d181001efc6bc08d7d39a6f6e3bb0d2a | [
"Apache-2.0"
] | null | null | null | defmodule Lifx.Poller.Private do
require Logger
alias Lifx.Device
@poll_state_time Application.get_env(:lifx, :poll_state_time)
def reschedule do
if @poll_state_time != :disable do
Process.send_after(self(), :poll_all, @poll_state_time)
end
end
def poll_device(%Device{} = device) do
Log... | 23.727273 | 81 | 0.64751 |
d5db2828ce410299571c0e65b6dba2b6ce29e83b | 2,270 | ex | Elixir | clients/alert_center/lib/google_api/alert_center/v1beta1/model/alert_feedback.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/alert_center/lib/google_api/alert_center/v1beta1/model/alert_feedback.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/alert_center/lib/google_api/alert_center/v1beta1/model/alert_feedback.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 36.612903 | 133 | 0.689427 |
d5db2ba3701ad9983f4f25b2714035cbb4b36a1c | 859 | ex | Elixir | lib/mix/tasks/eunit.ex | talentdeficit/mixunit | 0c9faf6b1b8343acbad6f5a2cf7017ee4677f28a | [
"MIT"
] | 1 | 2015-07-17T14:57:46.000Z | 2015-07-17T14:57:46.000Z | lib/mix/tasks/eunit.ex | talentdeficit/mixunit | 0c9faf6b1b8343acbad6f5a2cf7017ee4677f28a | [
"MIT"
] | null | null | null | lib/mix/tasks/eunit.ex | talentdeficit/mixunit | 0c9faf6b1b8343acbad6f5a2cf7017ee4677f28a | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.Eunit do
use Mix.Task
@shortdoc "Run a project's eunit tests"
@recursive true
def run(args) do
{opts, _, _} = OptionParser.parse(args,
strict: [verbose: :boolean],
aliases: [v: :verbose]
)
unless System.get_env("MIX_ENV") || Mix.env == :dev do
Mix.raise "mix ... | 26.030303 | 93 | 0.619325 |
d5db2c36d736ff3c0feaf5ccba162af11b3a71cd | 2,337 | ex | Elixir | clients/network_management/lib/google_api/network_management/v1beta1/model/location.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/network_management/lib/google_api/network_management/v1beta1/model/location.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/network_management/lib/google_api/network_management/v1beta1/model/location.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... | 39.610169 | 186 | 0.703038 |
d5db4504883d17fae58d4cab1c34ca7f79a44082 | 2,746 | ex | Elixir | clients/content/lib/google_api/content/v2/model/merchant_order_return_item.ex | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/merchant_order_return_item.ex | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/merchant_order_return_item.ex | kaaboaye/elixir-google-api | 1896784c4342151fd25becd089a5beb323eff567 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 44.290323 | 166 | 0.723598 |
d5db5463c67922325a26e555c0e152dbdab27ed0 | 1,125 | exs | Elixir | config/config.exs | polyfox/holidefs | 6a4862e022bf245955331d60929cd915ca82ae44 | [
"MIT"
] | 1 | 2019-07-28T17:23:55.000Z | 2019-07-28T17:23:55.000Z | config/config.exs | polyfox/holidefs | 6a4862e022bf245955331d60929cd915ca82ae44 | [
"MIT"
] | null | null | null | config/config.exs | polyfox/holidefs | 6a4862e022bf245955331d60929cd915ca82ae44 | [
"MIT"
] | 1 | 2019-07-28T17:23:57.000Z | 2019-07-28T17:23:57.000Z | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the paren... | 36.290323 | 73 | 0.752 |
d5db6dfa7765d11a406011868a193829ffd7713d | 1,805 | ex | Elixir | lib/grpow_web/telemetry.ex | Gitardo/grpow | 047a1a7faaa28006e59069d55dd783a048a287cf | [
"MIT"
] | null | null | null | lib/grpow_web/telemetry.ex | Gitardo/grpow | 047a1a7faaa28006e59069d55dd783a048a287cf | [
"MIT"
] | 2 | 2021-03-11T05:11:12.000Z | 2021-05-11T22:29:52.000Z | lib/grpow_web/telemetry.ex | g2t3s/grpow | 047a1a7faaa28006e59069d55dd783a048a287cf | [
"MIT"
] | null | null | null | defmodule GrpowWeb.Telemetry do
use Supervisor
import Telemetry.Metrics
def start_link(arg) do
Supervisor.start_link(__MODULE__, arg, name: __MODULE__)
end
@impl true
def init(_arg) do
children = [
# Telemetry poller will execute the given period measurements
# every 10_000ms. Learn mo... | 32.232143 | 86 | 0.669252 |
d5db92b7d95f64a1322ae168811da976f2a03292 | 579 | exs | Elixir | priv/repo/migrations/20150923132630_create_tee.exs | mfunaro/handiman-api | 66357caa55c2b1fb696471c04e602b5546879cf4 | [
"Unlicense",
"MIT"
] | null | null | null | priv/repo/migrations/20150923132630_create_tee.exs | mfunaro/handiman-api | 66357caa55c2b1fb696471c04e602b5546879cf4 | [
"Unlicense",
"MIT"
] | null | null | null | priv/repo/migrations/20150923132630_create_tee.exs | mfunaro/handiman-api | 66357caa55c2b1fb696471c04e602b5546879cf4 | [
"Unlicense",
"MIT"
] | null | null | null | defmodule HandimanApi.Repo.Migrations.CreateTee do
use Ecto.Migration
def change do
create table(:tees) do
add :name, :string
add :course_rating, :integer
add :slope_rating, :integer
add :front_nine_course_rating, :float
add :front_nine_slope_rating, :integer
add :back_nine_... | 25.173913 | 53 | 0.677029 |
d5db95ee36bf16e1ea8fedaabb75fea55d22a6b6 | 788 | ex | Elixir | lib/quantum/run_strategy.ex | fatboypunk/quantum-core | f264e1c5d6b0e13e60f0920ae09c287f342b9d7c | [
"Apache-2.0"
] | null | null | null | lib/quantum/run_strategy.ex | fatboypunk/quantum-core | f264e1c5d6b0e13e60f0920ae09c287f342b9d7c | [
"Apache-2.0"
] | null | null | null | lib/quantum/run_strategy.ex | fatboypunk/quantum-core | f264e1c5d6b0e13e60f0920ae09c287f342b9d7c | [
"Apache-2.0"
] | null | null | null | defmodule Quantum.RunStrategy do
@moduledoc """
Config Normalizer of a `Quantum.RunStrategy.NodeList`.
"""
@doc """
Normalize given config to a value that has `Quantum.RunStrategy.NodeList` implemented.
Raise / Do not Match on invalid config.
"""
@callback normalize_config!(any) :: any
defprotocol ... | 22.514286 | 93 | 0.612944 |
d5dbd1f7d269448ee953f9208e2ea93ee9688cbc | 8,007 | exs | Elixir | test/phoenix/integration/endpoint_test.exs | jesseshieh/phoenix | 1776e9df0a71de67374ed488b3f00ccb434045b3 | [
"MIT"
] | null | null | null | test/phoenix/integration/endpoint_test.exs | jesseshieh/phoenix | 1776e9df0a71de67374ed488b3f00ccb434045b3 | [
"MIT"
] | 1 | 2020-05-26T19:38:18.000Z | 2020-05-26T19:38:18.000Z | test/phoenix/integration/endpoint_test.exs | jesseshieh/phoenix | 1776e9df0a71de67374ed488b3f00ccb434045b3 | [
"MIT"
] | null | null | null | Code.require_file "../../support/http_client.exs", __DIR__
defmodule Phoenix.Integration.EndpointTest do
use ExUnit.Case
import ExUnit.CaptureLog
alias Phoenix.Integration.AdapterTest.ProdEndpoint
alias Phoenix.Integration.AdapterTest.DevEndpoint
alias Phoenix.Integration.AdapterTest.ProdInet6Endpoint
Ap... | 31.034884 | 105 | 0.585488 |
d5dc3e7b4d38743dba44ad4844ab76c59c1e458e | 5,646 | ex | Elixir | lib/symbolic_expression/parser.ex | emacstheviking/SymbolicExpression | c19c41007a8579c5f423ab1a6d9148a4209f1c60 | [
"MIT"
] | 8 | 2015-09-08T00:22:19.000Z | 2020-08-03T09:27:42.000Z | lib/symbolic_expression/parser.ex | emacstheviking/SymbolicExpression | c19c41007a8579c5f423ab1a6d9148a4209f1c60 | [
"MIT"
] | null | null | null | lib/symbolic_expression/parser.ex | emacstheviking/SymbolicExpression | c19c41007a8579c5f423ab1a6d9148a4209f1c60 | [
"MIT"
] | 3 | 2016-06-06T13:43:55.000Z | 2018-05-08T07:56:59.000Z | defmodule SymbolicExpression.Parser do
alias SymbolicExpression.Parser.State
require Logger
@whitespace [?\n, ?\s, ?\t]
@end_comment [?\n]
@string_terminals [?"]
@escaped_characters [?"]
@doc """
Parses an s-expression held in a string. Returns `{:ok, result}` on success,
`{:error, reason}` when the... | 31.366667 | 147 | 0.611761 |
d5dca3e810712e3ae94f419f73fe6c70eef5f9f7 | 1,015 | exs | Elixir | test/bittrex/subaccounts_test.exs | straw-hat-team/bittrex | 3b6d5c9559d473b685bec7e70d2cd58501805ded | [
"MIT"
] | 9 | 2017-11-17T21:07:50.000Z | 2018-01-19T09:53:03.000Z | test/bittrex/subaccounts_test.exs | straw-hat-team/bittrex | 3b6d5c9559d473b685bec7e70d2cd58501805ded | [
"MIT"
] | 27 | 2017-12-13T12:21:10.000Z | 2019-11-01T10:25:39.000Z | test/bittrex/subaccounts_test.exs | straw-hat-llc/elixir_bittrex | 3b6d5c9559d473b685bec7e70d2cd58501805ded | [
"MIT"
] | 5 | 2017-11-20T20:04:43.000Z | 2018-10-03T16:47:37.000Z | defmodule Bittrex.SubaccountsTest do
use Bittrex.TestSupport.CaseTemplate, async: true
alias Bittrex.{Subaccounts, Subaccount}
test "GET /subaccounts" do
subaccount_response = build_list(2, :subaccount_response)
subaccounts = Enum.map(subaccount_response, &Subaccount.new/1)
stub_request(%{body: Jaso... | 31.71875 | 75 | 0.744828 |
d5dcb36b1c5e661b521adaca083ebcb30b63e57a | 1,791 | ex | Elixir | lib/virgo/validate/contest_path_operation.ex | GinShio/AstraeaVirgo | 92804cbae01f67e21b8f421009fa37fddc9054e1 | [
"BSD-2-Clause"
] | null | null | null | lib/virgo/validate/contest_path_operation.ex | GinShio/AstraeaVirgo | 92804cbae01f67e21b8f421009fa37fddc9054e1 | [
"BSD-2-Clause"
] | null | null | null | lib/virgo/validate/contest_path_operation.ex | GinShio/AstraeaVirgo | 92804cbae01f67e21b8f421009fa37fddc9054e1 | [
"BSD-2-Clause"
] | null | null | null | defmodule AstraeaVirgo.Validate.ContestPathOperation do
use Exop.Operation
@moduledoc """
Validate the Path Variables of the Contest API
Authorization: Bearer Token (if permission is admin)
Request params: Path
| field | type | descript |
|------------|------|------------|
| contest_id ... | 31.421053 | 103 | 0.571748 |
d5dcdd0b8a6b03481424d6090aaf68cc47940a91 | 5,191 | ex | Elixir | lib/pow/phoenix/controllers/controller.ex | abartier/pow | 58a3d082da093e2dc7f07825a950ee133204813f | [
"Unlicense",
"MIT"
] | null | null | null | lib/pow/phoenix/controllers/controller.ex | abartier/pow | 58a3d082da093e2dc7f07825a950ee133204813f | [
"Unlicense",
"MIT"
] | null | null | null | lib/pow/phoenix/controllers/controller.ex | abartier/pow | 58a3d082da093e2dc7f07825a950ee133204813f | [
"Unlicense",
"MIT"
] | null | null | null | defmodule Pow.Phoenix.Controller do
@moduledoc """
Used with Pow Phoenix controllers to handle messages, routes and callbacks.
## Configuration options
* `:messages_backend` - See `Pow.Phoenix.Messages` for more.
* `:routes_backend` - See `Pow.Phoenix.Routes` for more.
* `:controller_callbacks` - ... | 30.356725 | 86 | 0.660952 |
d5dd3eb2b253200a91b789fc1069a54cf482ed71 | 32,930 | ex | Elixir | clients/cloud_scheduler/lib/google_api/cloud_scheduler/v1/api/projects.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/cloud_scheduler/lib/google_api/cloud_scheduler/v1/api/projects.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/cloud_scheduler/lib/google_api/cloud_scheduler/v1/api/projects.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 44.986339 | 786 | 0.613574 |
d5dd522e658b5c80619e1346cf0c3e4ba068d5fc | 146 | ex | Elixir | web/views/contact_view.ex | KazuCocoa/hello_phoenix | 9c64de70588558e4439d8620757e39deb2a01b4b | [
"MIT"
] | null | null | null | web/views/contact_view.ex | KazuCocoa/hello_phoenix | 9c64de70588558e4439d8620757e39deb2a01b4b | [
"MIT"
] | null | null | null | web/views/contact_view.ex | KazuCocoa/hello_phoenix | 9c64de70588558e4439d8620757e39deb2a01b4b | [
"MIT"
] | null | null | null | defmodule HelloPhoenix.ContactView do
use HelloPhoenix.Web, :view
def render("index.json", %{contacts: contacts}) do
contacts
end
end
| 18.25 | 52 | 0.726027 |
d5dd593d1a4490df6e9b775b00877fcbf5448221 | 876 | ex | Elixir | lib/toolbar_tests/tool_bar_window.ex | DwayneDibley/ElixirWxTests | 1446a92e6510f31eac2c4d85dfdcf81fdcfd73e4 | [
"Apache-2.0"
] | 3 | 2018-10-26T21:12:47.000Z | 2020-09-01T02:09:34.000Z | lib/toolbar_tests/tool_bar_window.ex | DwayneDibley/ElixirWxTests | 1446a92e6510f31eac2c4d85dfdcf81fdcfd73e4 | [
"Apache-2.0"
] | null | null | null | lib/toolbar_tests/tool_bar_window.ex | DwayneDibley/ElixirWxTests | 1446a92e6510f31eac2c4d85dfdcf81fdcfd73e4 | [
"Apache-2.0"
] | null | null | null | defmodule ToolBarWindow do
use WxDsl
import WxDefines
def createWindow(show) do
mainWindow name: :tool_bar_window, show: show do
frame id: :main_frame,
title: "Tool Bar Test",
size: {350, 250},
pos: {200, 250} do
toolBar(style: @wxTB_HORIZONTAL || @wxNO_BORDE... | 30.206897 | 68 | 0.591324 |
d5dd6da057c771c8a1358423f1a4c964fe4486c9 | 285 | ex | Elixir | programming/elixir-course/discuss/lib/discuss/discussions/topic.ex | filippo-fonseca/learning | 426c7e3a904e2dcd389f1c4ecd5b1484571f937d | [
"MIT"
] | 1 | 2021-09-24T22:47:33.000Z | 2021-09-24T22:47:33.000Z | programming/elixir-course/discuss/lib/discuss/discussions/topic.ex | filippo-fonseca/learning | 426c7e3a904e2dcd389f1c4ecd5b1484571f937d | [
"MIT"
] | null | null | null | programming/elixir-course/discuss/lib/discuss/discussions/topic.ex | filippo-fonseca/learning | 426c7e3a904e2dcd389f1c4ecd5b1484571f937d | [
"MIT"
] | 1 | 2020-08-28T22:52:08.000Z | 2020-08-28T22:52:08.000Z | defmodule Discuss.Discussions.Topic do
use Ecto.Schema
import Ecto.Changeset
schema "topics" do
field :title, :string
timestamps()
end
@doc false
def changeset(conn, params) do
topic
|> cast(attrs, [:title])
|> validate_required([:title])
end
end
| 15 | 38 | 0.659649 |
d5dd6da4428df2e0c1c3b30f8c8b1369d1a43ff9 | 5,648 | ex | Elixir | lib/slime/compiler.ex | thepeoplesbourgeois/slime | 55c4d738632ed6540a0a03e0a4022b02e398c2d9 | [
"MIT"
] | null | null | null | lib/slime/compiler.ex | thepeoplesbourgeois/slime | 55c4d738632ed6540a0a03e0a4022b02e398c2d9 | [
"MIT"
] | null | null | null | lib/slime/compiler.ex | thepeoplesbourgeois/slime | 55c4d738632ed6540a0a03e0a4022b02e398c2d9 | [
"MIT"
] | 2 | 2022-01-09T05:50:19.000Z | 2022-03-11T09:25:20.000Z | defmodule Slime.Compiler do
@moduledoc """
Compile a tree of parsed Slime into EEx.
"""
alias Slime.Doctype
alias Slime.Parser.Nodes.{DoctypeNode, EExNode, HEExNode, HTMLCommentNode, HTMLNode, InlineHTMLNode, VerbatimTextNode}
alias Slime.TemplateSyntaxError
@eex_delimiters {"#" <> "{", "}"}
@heex_d... | 30.695652 | 120 | 0.612429 |
d5dd76eb32be3a35ff337f393a22d1dae89384f1 | 31,297 | ex | Elixir | lib/livebook/session.ex | chamot1111/livebook | 4ff1ff0d5a3c664fdf53b71667b9b4660ce8d7f4 | [
"Apache-2.0"
] | null | null | null | lib/livebook/session.ex | chamot1111/livebook | 4ff1ff0d5a3c664fdf53b71667b9b4660ce8d7f4 | [
"Apache-2.0"
] | null | null | null | lib/livebook/session.ex | chamot1111/livebook | 4ff1ff0d5a3c664fdf53b71667b9b4660ce8d7f4 | [
"Apache-2.0"
] | null | null | null | defmodule Livebook.Session do
@moduledoc false
# Server corresponding to a single notebook session.
#
# The process keeps the current notebook state and serves
# as a source of truth that multiple clients talk to.
# Receives update requests from the clients and notifies
# them of any changes applied to t... | 30.593353 | 98 | 0.680289 |
d5dd79b29c300dd443cab42dc77dca7824d376fe | 501 | ex | Elixir | lib/maze_server_web/router.ex | thantez/maze_ai | 5d371beddf1626a45fd70d37a886f8d39ca80338 | [
"MIT"
] | null | null | null | lib/maze_server_web/router.ex | thantez/maze_ai | 5d371beddf1626a45fd70d37a886f8d39ca80338 | [
"MIT"
] | null | null | null | lib/maze_server_web/router.ex | thantez/maze_ai | 5d371beddf1626a45fd70d37a886f8d39ca80338 | [
"MIT"
] | null | null | null | defmodule MazeServerWeb.Router do
use MazeServerWeb, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
end
pipeline :api do
plug :accepts, ["json"]
end
scope "/", MazeServerWeb do
... | 18.555556 | 39 | 0.680639 |
d5dd7c2a97bfe750d119c9e4512fa702e0750d96 | 3,223 | ex | Elixir | lib/wobserver/util/application.ex | szlend/wobserver | 6c3ea1ef772ddb4a0b35956d155f33fc46f71a8c | [
"MIT"
] | 984 | 2017-02-06T17:13:48.000Z | 2022-03-18T22:46:55.000Z | lib/wobserver/util/application.ex | szlend/wobserver | 6c3ea1ef772ddb4a0b35956d155f33fc46f71a8c | [
"MIT"
] | 52 | 2017-02-13T16:12:10.000Z | 2021-04-08T22:31:28.000Z | lib/wobserver/util/application.ex | szlend/wobserver | 6c3ea1ef772ddb4a0b35956d155f33fc46f71a8c | [
"MIT"
] | 74 | 2017-02-13T15:23:49.000Z | 2021-07-30T07:43:27.000Z | defmodule Wobserver.Util.Application do
@moduledoc ~S"""
Application listing and process hierachy.
"""
alias Wobserver.Util.Process
import Wobserver.Util.Helper, only: [parallel_map: 2]
@doc ~S"""
Lists all running applications.
The application information is given as a tuple containing: `{name, des... | 22.858156 | 93 | 0.588272 |
d5dde5c82265f6fa5a14001da93fd506d9df0daf | 372 | exs | Elixir | priv/repo/migrations/20170317150740_create_accounts_application.exs | nathanfaucett/ex-auth_api | 3b8959b2693c652fe2e3089f03e728107ec6ba70 | [
"MIT"
] | null | null | null | priv/repo/migrations/20170317150740_create_accounts_application.exs | nathanfaucett/ex-auth_api | 3b8959b2693c652fe2e3089f03e728107ec6ba70 | [
"MIT"
] | null | null | null | priv/repo/migrations/20170317150740_create_accounts_application.exs | nathanfaucett/ex-auth_api | 3b8959b2693c652fe2e3089f03e728107ec6ba70 | [
"MIT"
] | null | null | null | defmodule AuthApi.Repo.Migrations.CreateAuthApi.Accounts.Application do
use Ecto.Migration
def change do
create table(:accounts_applications) do
add :name, :string
add :token, :string
add :owner_id, references(:accounts_users, on_delete: :nothing)
timestamps()
end
create index... | 23.25 | 71 | 0.706989 |
d5ddf6cea3c0fbdbff5ec2fcae6111ce349ad22e | 1,099 | ex | Elixir | clients/oathkeeper/elixir/lib/oathkeeper/model/json_web_key.ex | ory/sdk-generator | 958314d130922ad6f20f439b5230141a832231a5 | [
"Apache-2.0"
] | null | null | null | clients/oathkeeper/elixir/lib/oathkeeper/model/json_web_key.ex | ory/sdk-generator | 958314d130922ad6f20f439b5230141a832231a5 | [
"Apache-2.0"
] | null | null | null | clients/oathkeeper/elixir/lib/oathkeeper/model/json_web_key.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.JsonWebKey do
@moduledoc """
"""
@derive [Poison.Encoder]
defstruct [
:"alg",
:"crv",
:"d",
:"dp",
:"... | 18.948276 | 91 | 0.483167 |
d5de382468b85367f568170fa8a97a1f8877d726 | 5,828 | ex | Elixir | clients/service_management/lib/google_api/service_management/v1/model/quota_limit.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/service_management/lib/google_api/service_management/v1/model/quota_limit.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/service_management/lib/google_api/service_management/v1/model/quota_limit.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 ... | 45.889764 | 131 | 0.695779 |
d5de448bd002bec2bc1c208871d91e505cf48181 | 864 | exs | Elixir | mix.exs | DianaOlympos/EVE_Crest_fetcher | 26e98b31d4c80ae9c78b5b9398966da6f9c3abe2 | [
"MIT"
] | 1 | 2016-02-01T14:33:37.000Z | 2016-02-01T14:33:37.000Z | mix.exs | DianaOlympos/EVE_Crest_fetcher | 26e98b31d4c80ae9c78b5b9398966da6f9c3abe2 | [
"MIT"
] | null | null | null | mix.exs | DianaOlympos/EVE_Crest_fetcher | 26e98b31d4c80ae9c78b5b9398966da6f9c3abe2 | [
"MIT"
] | null | null | null | defmodule FetchCrestMarket.Mixfile do
use Mix.Project
def project do
[app: :fetch_crest_market,
version: "0.0.1",
elixir: "~> 1.1",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps]
end
# Configuration for the OTP application
#
# Type "mix help c... | 21.6 | 77 | 0.559028 |
d5de872bcaf25422b6f01726687432a7ba7bd132 | 714 | ex | Elixir | apps/photog/lib/photog/api/person.ex | allen-garvey/phoenix-umbrella | 1d444bbd62a5e7b5f51d317ce2be71ee994125d5 | [
"MIT"
] | 4 | 2019-10-04T16:11:15.000Z | 2021-08-18T21:00:13.000Z | apps/photog/lib/photog/api/person.ex | allen-garvey/phoenix-umbrella | 1d444bbd62a5e7b5f51d317ce2be71ee994125d5 | [
"MIT"
] | 5 | 2020-03-16T23:52:25.000Z | 2021-09-03T16:52:17.000Z | apps/photog/lib/photog/api/person.ex | allen-garvey/phoenix-umbrella | 1d444bbd62a5e7b5f51d317ce2be71ee994125d5 | [
"MIT"
] | null | null | null | defmodule Photog.Api.Person do
use Ecto.Schema
import Ecto.Changeset
schema "persons" do
field :apple_photos_id, :integer
field :name, :string
field :images_count, :integer, default: -1, virtual: true
timestamps()
belongs_to :cover_image, Photog.Api.Image
has_many :person_images, Photo... | 25.5 | 73 | 0.708683 |
d5deb8d4d711fa2a3f6af4defb024e16b20deeec | 1,427 | ex | Elixir | server/web/web.ex | CircleAcademy/circle-website | b519e1e7c1d90566b7dfdaeda20ddd71abf6c832 | [
"MIT"
] | null | null | null | server/web/web.ex | CircleAcademy/circle-website | b519e1e7c1d90566b7dfdaeda20ddd71abf6c832 | [
"MIT"
] | null | null | null | server/web/web.ex | CircleAcademy/circle-website | b519e1e7c1d90566b7dfdaeda20ddd71abf6c832 | [
"MIT"
] | null | null | null | defmodule Website.Web do
@moduledoc """
A module that keeps using definitions for controllers,
views and so on.
This can be used in your application as:
use Website.Web, :controller
use Website.Web, :view
The definitions below will be executed for every view,
controller, etc, so keep them sho... | 20.385714 | 88 | 0.676945 |
d5def8988f8ad7d28843dda4cd46c7442d0cfb1a | 158 | ex | Elixir | test/support/url_transform.ex | tlux/toml_config_provider | 2438db46c072bd5e9b661770443e188f7dd807cc | [
"MIT"
] | 3 | 2020-09-02T16:31:50.000Z | 2020-11-20T19:09:17.000Z | test/support/url_transform.ex | tlux/toml_config | 2438db46c072bd5e9b661770443e188f7dd807cc | [
"MIT"
] | null | null | null | test/support/url_transform.ex | tlux/toml_config | 2438db46c072bd5e9b661770443e188f7dd807cc | [
"MIT"
] | null | null | null | defmodule UrlTransform do
use Toml.Transform
def transform(:dsn, url) when is_binary(url) do
URI.parse(url)
end
def transform(_k, v), do: v
end
| 15.8 | 49 | 0.696203 |
d5defd941f54bd21d80616c2807cc10cf8f31d22 | 2,372 | ex | Elixir | test/support/live_views/components.ex | dbi1/phoenix_live_view | 1fff01e0234a75b369ac9085b3b4ec096ef0b52b | [
"MIT"
] | 1 | 2020-10-23T15:17:10.000Z | 2020-10-23T15:17:10.000Z | test/support/live_views/components.ex | alvises/phoenix_live_view | 37e32ffe9c59ca4e1176dfa878dbd8f41a002508 | [
"MIT"
] | null | null | null | test/support/live_views/components.ex | alvises/phoenix_live_view | 37e32ffe9c59ca4e1176dfa878dbd8f41a002508 | [
"MIT"
] | null | null | null | defmodule Phoenix.LiveViewTest.StatefulComponent do
use Phoenix.LiveComponent
def mount(socket) do
{:ok, assign(socket, name: "unknown", dup_name: nil)}
end
def update(assigns, socket) do
if from = assigns[:from] do
send(from, {:updated, assigns})
end
{:ok, assign(socket, assigns)}
en... | 26.954545 | 110 | 0.603288 |
d5df28fdddd6318e3994501cf4874e03dd09ce6f | 8,753 | ex | Elixir | lib/delta_crdt.ex | fmbraga/delta_crdt_ex | 3914be8096d2d39c2e67ddb3af28c0e3b7d0b1ff | [
"MIT"
] | 374 | 2018-05-15T11:37:36.000Z | 2022-01-26T19:44:52.000Z | lib/delta_crdt.ex | fmbraga/delta_crdt_ex | 3914be8096d2d39c2e67ddb3af28c0e3b7d0b1ff | [
"MIT"
] | 36 | 2018-05-25T18:33:09.000Z | 2021-09-30T08:33:44.000Z | lib/delta_crdt.ex | fmbraga/delta_crdt_ex | 3914be8096d2d39c2e67ddb3af28c0e3b7d0b1ff | [
"MIT"
] | 41 | 2018-05-16T14:41:19.000Z | 2022-03-02T18:10:14.000Z | defmodule DeltaCrdt do
@moduledoc """
Start and interact with the Delta CRDTs provided by this library.
A CRDT is a conflict-free replicated data-type. That is to say, it is a distributed data structure that automatically resolves conflicts in a way that is consistent across all replicas of the data. In other wo... | 40.711628 | 460 | 0.670627 |
d5df31af0e44de78d093944df91de9afaa1fdb0b | 3,322 | ex | Elixir | lib/ecto_job/config.ex | thedelchop/ecto_job | 0157d857e4436a35ebcc0a9f5cd4b28b33292f62 | [
"MIT"
] | null | null | null | lib/ecto_job/config.ex | thedelchop/ecto_job | 0157d857e4436a35ebcc0a9f5cd4b28b33292f62 | [
"MIT"
] | null | null | null | lib/ecto_job/config.ex | thedelchop/ecto_job | 0157d857e4436a35ebcc0a9f5cd4b28b33292f62 | [
"MIT"
] | 1 | 2019-11-22T18:22:54.000Z | 2019-11-22T18:22:54.000Z | defmodule EctoJob.Config do
@moduledoc """
EctoJob Configuration struct.
Configuration may be provided directly to your JobQueue supervisor:
supervisor(MyApp.JobQueue, [[repo: MyApp.Repo, max_demand: 100, log_level: :debug]])
Or if the configuration should be environment-specific, use Mix config:
... | 44.293333 | 316 | 0.689645 |
d5df48fb5db158a02164a2b05e457fad2ffe1785 | 5,977 | ex | Elixir | lib/mix/nerves/utils.ex | RickCarlino/nerves | 9b80531a4f84868e4811b81aaed84f7fdef8cddd | [
"Apache-2.0"
] | 1,944 | 2016-01-25T14:04:50.000Z | 2022-03-30T13:25:53.000Z | lib/mix/nerves/utils.ex | RickCarlino/nerves | 9b80531a4f84868e4811b81aaed84f7fdef8cddd | [
"Apache-2.0"
] | 397 | 2016-05-19T21:17:51.000Z | 2022-03-30T18:02:49.000Z | lib/mix/nerves/utils.ex | RickCarlino/nerves | 9b80531a4f84868e4811b81aaed84f7fdef8cddd | [
"Apache-2.0"
] | 191 | 2016-01-30T01:56:25.000Z | 2022-03-30T17:58:57.000Z | defmodule Mix.Nerves.Utils do
alias Nerves.Utils.WSL
def shell(cmd, args, opts \\ []) do
stream = opts[:stream] || IO.binstream(:standard_io, :line)
std_err = opts[:stderr_to_stdout] || true
env = Keyword.get(opts, :env, []) ++ [{"PATH", sanitize_path()}]
opts =
opts
|> Keyword.drop([:... | 27.8 | 130 | 0.592605 |
d5df4a5f7477e92f4c49fa6c1bbb63539d57a102 | 1,460 | ex | Elixir | lib/db.ex | tyrchen/merkle_patricia_tree | 5af83bb1555e4b3b5836e731c069924022c4bce7 | [
"MIT"
] | 1 | 2019-01-07T00:13:14.000Z | 2019-01-07T00:13:14.000Z | lib/db.ex | tyrchen/merkle_patricia_tree | 5af83bb1555e4b3b5836e731c069924022c4bce7 | [
"MIT"
] | null | null | null | lib/db.ex | tyrchen/merkle_patricia_tree | 5af83bb1555e4b3b5836e731c069924022c4bce7 | [
"MIT"
] | 1 | 2020-03-07T08:55:36.000Z | 2020-03-07T08:55:36.000Z | defmodule MerklePatriciaTree.DB do
@moduledoc """
Defines a general key-value storage to back and persist
out Merkle Patricia Trie. This is generally LevelDB in the
community, but for testing, we'll generally use `:ets`.
We define a callback that can be implemented by a number
of potential backends.
"""
... | 28.076923 | 83 | 0.65 |
d5df632f026acfb72a912dd5656b878f151dda77 | 481 | ex | Elixir | apps/sitemap/lib/sitemap/agent.ex | carlos4ndre/elixir-crawler | be85b94940ce7933e506cb7e39083a5847c63174 | [
"MIT"
] | null | null | null | apps/sitemap/lib/sitemap/agent.ex | carlos4ndre/elixir-crawler | be85b94940ce7933e506cb7e39083a5847c63174 | [
"MIT"
] | null | null | null | apps/sitemap/lib/sitemap/agent.ex | carlos4ndre/elixir-crawler | be85b94940ce7933e506cb7e39083a5847c63174 | [
"MIT"
] | null | null | null | defmodule SiteMap.Agent do
require Logger
@me :sitemap
def start_link do
Agent.start_link(fn -> %{} end, name: @me)
end
def has_url?(url) do
Agent.get(@me, fn sitemap ->
Map.has_key?(sitemap, url)
end)
end
def add_page(page) do
Agent.get_and_update(@me, fn sitemap ->
new_si... | 17.814815 | 52 | 0.62578 |
d5df8cd661b08323ac6a8bc9bf781c55218880b0 | 1,240 | ex | Elixir | lib/four_lucha/base_singular.ex | Thomas-Jean/four_lucha | 591627059c02edc3315b5cac2c35eacb821108ff | [
"Apache-2.0"
] | 1 | 2021-02-21T19:15:27.000Z | 2021-02-21T19:15:27.000Z | lib/four_lucha/base_singular.ex | Thomas-Jean/four_lucha | 591627059c02edc3315b5cac2c35eacb821108ff | [
"Apache-2.0"
] | null | null | null | lib/four_lucha/base_singular.ex | Thomas-Jean/four_lucha | 591627059c02edc3315b5cac2c35eacb821108ff | [
"Apache-2.0"
] | null | null | null | defmodule FourLucha.BaseSingular do
@moduledoc false
defmacro __using__(_opts) do
quote do
require FourLucha.Client
def get(id) when is_binary(id) or is_integer(id) do
case Cachex.get(:gb_cache, "#{@item}:#{id}") do
{:ok, nil} ->
case FourLucha.Client.get(build_resourc... | 25.833333 | 99 | 0.464516 |
d5df8d44d1270fb9d82c690fd9f591d63ad3dd3f | 93 | exs | Elixir | test/stemmer/step1c_test.exs | fredwu/stemmer | 750514636c399350e7ee7fbef5b731ea1cf0335c | [
"MIT"
] | 149 | 2016-07-18T14:21:16.000Z | 2022-02-24T01:23:17.000Z | test/stemmer/step1c_test.exs | fredwu/stemmer | 750514636c399350e7ee7fbef5b731ea1cf0335c | [
"MIT"
] | 1 | 2022-01-09T03:18:14.000Z | 2022-01-09T13:16:43.000Z | test/stemmer/step1c_test.exs | fredwu/stemmer | 750514636c399350e7ee7fbef5b731ea1cf0335c | [
"MIT"
] | 8 | 2016-07-19T09:23:31.000Z | 2022-01-08T14:29:33.000Z | defmodule Stemmer.Step1cTest do
use ExUnit.Case, async: true
doctest Stemmer.Step1c
end
| 15.5 | 31 | 0.784946 |
d5dfa9fda590955f641238a41b01d34a3fda9946 | 1,902 | ex | Elixir | lib/xdr/float.ex | kommitters/xdr | 41f8bcbb62c70a37a8ae7e861a473053f712fb67 | [
"MIT"
] | 7 | 2020-06-30T22:52:23.000Z | 2022-02-18T22:13:43.000Z | lib/xdr/float.ex | kommitters/xdr | 41f8bcbb62c70a37a8ae7e861a473053f712fb67 | [
"MIT"
] | 22 | 2020-05-22T15:24:52.000Z | 2021-09-01T16:56:53.000Z | lib/xdr/float.ex | kommitters/xdr | 41f8bcbb62c70a37a8ae7e861a473053f712fb67 | [
"MIT"
] | 1 | 2021-08-17T12:34:15.000Z | 2021-08-17T12:34:15.000Z | defmodule XDR.Float do
@moduledoc """
This module manages the `Floating-Point` type based on the RFC4506 XDR Standard.
"""
@behaviour XDR.Declaration
alias XDR.FloatError
defstruct [:float]
defguard valid_float?(value) when is_float(value) or is_integer(value)
@type float_number :: integer() | floa... | 25.702703 | 91 | 0.650368 |
d5dfc91246c74d3f4b8116658ed0d12b9e53a444 | 464 | ex | Elixir | lib/ref_web/live/message_live/show.ex | tk04/ref | 6547a58344141e09300284943264dfe02f1e84f3 | [
"MIT"
] | null | null | null | lib/ref_web/live/message_live/show.ex | tk04/ref | 6547a58344141e09300284943264dfe02f1e84f3 | [
"MIT"
] | null | null | null | lib/ref_web/live/message_live/show.ex | tk04/ref | 6547a58344141e09300284943264dfe02f1e84f3 | [
"MIT"
] | null | null | null | defmodule RefWeb.MessageLive.Show do
use RefWeb, :live_view
alias Ref.DM
@impl true
def mount(_params, _session, socket) do
{:ok, socket}
end
@impl true
def handle_params(%{"id" => id}, _, socket) do
{:noreply,
socket
|> assign(:page_title, page_title(socket.assigns.live_action))
... | 21.090909 | 67 | 0.659483 |
d5dfcedbe06da4f7787c96ac6e227614f48cf186 | 471 | ex | Elixir | scrapers/database.py.ex | openqua/openqua | 1e21cb7ef6ae7929e73b2ff2b9eacb42d2b53a92 | [
"BSD-3-Clause"
] | null | null | null | scrapers/database.py.ex | openqua/openqua | 1e21cb7ef6ae7929e73b2ff2b9eacb42d2b53a92 | [
"BSD-3-Clause"
] | 1 | 2017-09-18T11:43:48.000Z | 2017-09-18T11:43:48.000Z | scrapers/database.py.ex | openqua/openqua | 1e21cb7ef6ae7929e73b2ff2b9eacb42d2b53a92 | [
"BSD-3-Clause"
] | null | null | null |
import mysql.connector
class Database:
def __init__(self):
self.cnx = mysql.connector.connect(user='openqua',
password='xxxxxxxxxxxxxx',
host='127.0.0.1', database='openqua')
def insert(self, query, data):
cursor = s... | 22.428571 | 75 | 0.52017 |
d5dfd55e13989f59a7179567ffd958e06e0a8562 | 39,715 | ex | Elixir | clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/api/customers.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/api/customers.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/api/customers.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.324777 | 292 | 0.619111 |
d5e00ef667eb73652e707a8ee9ac881bbaf1fa86 | 120 | exs | Elixir | test/benchee/utility/file_creation_test.exs | gomoripeti/benchee | bd5185bcfdc8320c237959505e63a89d31e044a9 | [
"MIT"
] | 636 | 2016-06-06T07:58:36.000Z | 2019-03-19T15:27:37.000Z | test/benchee/utility/file_creation_test.exs | gomoripeti/benchee | bd5185bcfdc8320c237959505e63a89d31e044a9 | [
"MIT"
] | 198 | 2016-06-18T08:19:15.000Z | 2019-03-19T15:32:37.000Z | test/benchee/utility/file_creation_test.exs | gomoripeti/benchee | bd5185bcfdc8320c237959505e63a89d31e044a9 | [
"MIT"
] | 43 | 2016-06-08T08:04:30.000Z | 2019-02-13T17:10:24.000Z | defmodule Benchee.Utility.FileCreationTest do
use ExUnit.Case, async: true
doctest Benchee.Utility.FileCreation
end
| 24 | 45 | 0.825 |
d5e067f527a3d2dc3f0d1fa31b6945d5be9e004a | 875 | ex | Elixir | test/support/conn_case.ex | ngscheurich/pelican | 9431b2712f38b74c45262d73e55a70aa3d55a093 | [
"MIT"
] | null | null | null | test/support/conn_case.ex | ngscheurich/pelican | 9431b2712f38b74c45262d73e55a70aa3d55a093 | [
"MIT"
] | 2 | 2018-04-04T03:49:29.000Z | 2018-04-04T15:57:33.000Z | test/support/conn_case.ex | LouisianaGroups/pelican | 9431b2712f38b74c45262d73e55a70aa3d55a093 | [
"MIT"
] | 1 | 2018-04-04T03:53:08.000Z | 2018-04-04T03:53:08.000Z | defmodule PelicanWeb.ConnCase do
@moduledoc """
This module defines the test case to be used by
tests that require setting up a connection.
Such tests rely on `Phoenix.ConnTest` and also
import other functionality to make it easier
to build common datastructures and query the data layer.
Finally, if the... | 25 | 58 | 0.729143 |
d5e070ef8399cd1e300ba68e941402841af8c6f2 | 7,262 | exs | Elixir | test/index_test.exs | devonestes/ex_admin | e135ae7c28de78fc87baf519ff8a32da12e8bf66 | [
"MIT"
] | 1,347 | 2015-10-05T18:23:49.000Z | 2022-01-09T18:38:36.000Z | test/index_test.exs | fanduel/ex_admin | 05806a718859a0e155d3447c3ffde8a536fd676a | [
"MIT"
] | 402 | 2015-10-03T13:53:32.000Z | 2021-07-08T09:52:22.000Z | test/index_test.exs | fanduel/ex_admin | 05806a718859a0e155d3447c3ffde8a536fd676a | [
"MIT"
] | 333 | 2015-10-12T22:56:57.000Z | 2021-05-26T18:40:24.000Z | defmodule TestExAdmin.SimpleIndexTest do
use ExAdmin.Register
register_resource TestExAdmin.Simple do
index do
selectable_column()
column(:name)
column(:description)
column(:exists?)
actions([:show, :edit])
end
end
end
defmodule ExAdminTest.IndexTest do
use TestExAdmin.C... | 35.773399 | 98 | 0.635775 |
d5e087f482fc834cc5a5bc977e787d1081599ac3 | 2,071 | exs | Elixir | server/config/prod.exs | benmccann/realtime | b824fd80e769d56d34ffbaf5355705bc6f3a2aba | [
"Apache-2.0"
] | 7 | 2020-07-15T17:57:51.000Z | 2022-01-30T04:37:57.000Z | server/config/prod.exs | benmccann/realtime | b824fd80e769d56d34ffbaf5355705bc6f3a2aba | [
"Apache-2.0"
] | 3 | 2021-12-09T04:21:18.000Z | 2022-02-17T21:53:28.000Z | server/config/prod.exs | benmccann/realtime | b824fd80e769d56d34ffbaf5355705bc6f3a2aba | [
"Apache-2.0"
] | 2 | 2021-06-08T05:01:10.000Z | 2021-06-09T06:23:34.000Z | use Mix.Config
# For production, don't forget to configure the url host
# to something meaningful, Phoenix uses this information
# when generating URLs.
#
# Note we also include the path to a cache manifest
# containing the digested version of static files. This
# manifest is generated by the `mix phx.digest` task,
# ... | 35.706897 | 101 | 0.717528 |
d5e0914d90fa905ed847e0c1da01f0984b1c917f | 606 | exs | Elixir | test/live_sup/core/widgets/chuck_norries_joke_test/handler_test.exs | livesup-dev/livesup | eaf9ffc78d3043bd9e3408f0f4df26ed16eb8446 | [
"Apache-2.0",
"MIT"
] | null | null | null | test/live_sup/core/widgets/chuck_norries_joke_test/handler_test.exs | livesup-dev/livesup | eaf9ffc78d3043bd9e3408f0f4df26ed16eb8446 | [
"Apache-2.0",
"MIT"
] | 3 | 2022-02-23T15:51:48.000Z | 2022-03-14T22:52:43.000Z | test/live_sup/core/widgets/chuck_norries_joke_test/handler_test.exs | livesup-dev/livesup | eaf9ffc78d3043bd9e3408f0f4df26ed16eb8446 | [
"Apache-2.0",
"MIT"
] | null | null | null | defmodule LiveSup.Test.Core.Widgets.HandlerTest do
use LiveSup.DataCase, async: false
import Mock
alias LiveSup.Core.Widgets.ChuckNorrisJoke.Handler
alias LiveSup.Core.Datasources.ChuckNorrisApiDatasource
describe "Managing chuck jokes" do
@describetag :widget
@describetag :chuck_widget
@describ... | 24.24 | 57 | 0.70297 |
d5e09f0354e5aa275a5e0850a9e322cef2aa49fd | 1,847 | exs | Elixir | clients/books/mix.exs | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/books/mix.exs | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/books/mix.exs | 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... | 27.567164 | 104 | 0.654575 |
d5e0bca81f4c3498b7d49662956a686e0897924f | 1,101 | ex | Elixir | lib/serum/themes/guma/pagination.ex | mariomelo/serum-theme-guma | 2320a9d556734a8e5b39f54038aff7d7599c9607 | [
"MIT"
] | null | null | null | lib/serum/themes/guma/pagination.ex | mariomelo/serum-theme-guma | 2320a9d556734a8e5b39f54038aff7d7599c9607 | [
"MIT"
] | null | null | null | lib/serum/themes/guma/pagination.ex | mariomelo/serum-theme-guma | 2320a9d556734a8e5b39f54038aff7d7599c9607 | [
"MIT"
] | null | null | null | defmodule Serum.Themes.Guma.Pagination do
@moduledoc false
@spec page_link(binary(), integer()) :: binary()
def page_link(list_dir, page), do: Path.join(list_dir, "page-#{page}.html")
@spec get_page_nums(integer(), integer(), pos_integer()) :: {[integer()], [integer()]}
def get_page_nums(page, max_page, siz... | 35.516129 | 88 | 0.624886 |
d5e0c3ceb8f8ee5aa6689396e5bf0ef6886f5c9f | 417 | ex | Elixir | lib/prepend.ex | jorinvo/prepend | f0c855c779f8bcefb254fb8f12a4aa61764ff58d | [
"MIT"
] | 15 | 2018-04-05T17:52:27.000Z | 2020-11-13T15:11:35.000Z | lib/prepend.ex | jorinvo/prepend | f0c855c779f8bcefb254fb8f12a4aa61764ff58d | [
"MIT"
] | null | null | null | lib/prepend.ex | jorinvo/prepend | f0c855c779f8bcefb254fb8f12a4aa61764ff58d | [
"MIT"
] | null | null | null | defmodule Prepend do
@moduledoc false
@doc """
Prepend the given string to each line if a stream
and returns a stream of the resulting lines.
Example:
iex> ["one", "two"] |> Prepend.stream_lines("$ ") |> Enum.to_list
["$ one", "$ two"]
"""
@spec stream_lines(Enumerable.t(), String.t()) :: Enumerab... | 21.947368 | 67 | 0.635492 |
d5e0dd79fcf921299651cbcdac9b12db112bb319 | 2,702 | exs | Elixir | examples/new_relic_sandbox_umbrella/apps/new_relic_sandbox_web/test/new_relic_sandbox_web/controllers/user_controller_test.exs | surgeventures/new_relic_integration | 5417f15f7dd17022ee927e0cdd4fca32529ed278 | [
"MIT"
] | null | null | null | examples/new_relic_sandbox_umbrella/apps/new_relic_sandbox_web/test/new_relic_sandbox_web/controllers/user_controller_test.exs | surgeventures/new_relic_integration | 5417f15f7dd17022ee927e0cdd4fca32529ed278 | [
"MIT"
] | 2 | 2019-09-09T08:26:44.000Z | 2019-11-05T04:31:37.000Z | examples/new_relic_sandbox_umbrella/apps/new_relic_sandbox_web/test/new_relic_sandbox_web/controllers/user_controller_test.exs | surgeventures/new_relic_integration | 5417f15f7dd17022ee927e0cdd4fca32529ed278 | [
"MIT"
] | 1 | 2019-09-06T09:27:27.000Z | 2019-09-06T09:27:27.000Z | defmodule NewRelicSandboxWeb.UserControllerTest do
use NewRelicSandboxWeb.ConnCase
alias NewRelicSandbox.Accounts
@create_attrs %{age: 42, name: "some name"}
@update_attrs %{age: 43, name: "some updated name"}
@invalid_attrs %{age: nil, name: nil}
def fixture(:user) do
{:ok, user} = Accounts.create_u... | 30.359551 | 83 | 0.650999 |
d5e10759a46cb84f98515b66ed3f8b4450b78f3e | 214 | ex | Elixir | dungeon_crawl/lib/dungeon_crawl.ex | obsessedyouth/potions-and-stuff | 7e179187efead98e65c1ecf0aa7a3b810d36108c | [
"MIT"
] | null | null | null | dungeon_crawl/lib/dungeon_crawl.ex | obsessedyouth/potions-and-stuff | 7e179187efead98e65c1ecf0aa7a3b810d36108c | [
"MIT"
] | null | null | null | dungeon_crawl/lib/dungeon_crawl.ex | obsessedyouth/potions-and-stuff | 7e179187efead98e65c1ecf0aa7a3b810d36108c | [
"MIT"
] | null | null | null | defmodule DungeonCrawl do
@moduledoc """
Documentation for DungeonCrawl.
"""
@doc """
Hello world.
## Examples
iex> DungeonCrawl.hello()
:world
"""
def hello do
:world
end
end
| 11.263158 | 33 | 0.593458 |
d5e13a121a7bdca3d72215fcf508169c15e65854 | 566 | ex | Elixir | lib/btrz_ex_api_client/types.ex | Betterez/btrz-ex-api-client | 92e56fb8944de4cf4926aa0192525d33d77e87b4 | [
"MIT"
] | 2 | 2019-02-18T20:18:20.000Z | 2019-02-25T22:38:04.000Z | lib/btrz_ex_api_client/types.ex | Betterez/btrz-ex-api-client | 92e56fb8944de4cf4926aa0192525d33d77e87b4 | [
"MIT"
] | null | null | null | lib/btrz_ex_api_client/types.ex | Betterez/btrz-ex-api-client | 92e56fb8944de4cf4926aa0192525d33d77e87b4 | [
"MIT"
] | null | null | null | defmodule BtrzExApiClient.Types do
@moduledoc """
BtrzExApiClient types.
"""
@typedoc """
The default error tuple.
"""
@type error() :: {:error, reason :: term()}
@typedoc """
The allowed HTTP methods.
Methods are defined as atoms.
"""
@type methods() :: :delete | :get | :post | :put | :patch... | 21.769231 | 86 | 0.637809 |
d5e14e9266a52db2cae2e5567bec47294d24df15 | 546 | ex | Elixir | test/support/test_helper.ex | shagberg/teslamate | 1f139b29bd5c2c93b158bdef10c66f9f3556e95c | [
"MIT"
] | null | null | null | test/support/test_helper.ex | shagberg/teslamate | 1f139b29bd5c2c93b158bdef10c66f9f3556e95c | [
"MIT"
] | null | null | null | test/support/test_helper.ex | shagberg/teslamate | 1f139b29bd5c2c93b158bdef10c66f9f3556e95c | [
"MIT"
] | null | null | null | defmodule TestHelper do
def eventually(fun, opts \\ []) do
eventually(fun, Keyword.get(opts, :attempts, 10), Keyword.get(opts, :delay, 100))
end
defp eventually(fun, attempts, delay) do
fun.()
rescue
e in [ExUnit.AssertionError] ->
if attempts == 1, do: reraise(e, __STACKTRACE__)
Proces... | 24.818182 | 85 | 0.644689 |
d5e1567e3d3bade158d16a8a45ef43f64c816a88 | 3,416 | ex | Elixir | lib/jikan_ex/url.ex | seanbreckenridge/jikan_ex | 5ad8987129f213dc43c5250984c39664921eaeef | [
"MIT"
] | 6 | 2020-03-03T02:57:01.000Z | 2020-08-20T14:35:56.000Z | lib/jikan_ex/url.ex | seanbreckenridge/jikan_ex | 5ad8987129f213dc43c5250984c39664921eaeef | [
"MIT"
] | 3 | 2020-03-02T07:47:15.000Z | 2020-05-22T06:49:46.000Z | lib/jikan_ex/url.ex | seanbreckenridge/jikan_ex | 5ad8987129f213dc43c5250984c39664921eaeef | [
"MIT"
] | 1 | 2020-10-10T14:36:42.000Z | 2020-10-10T14:36:42.000Z | defmodule JikanEx.Url do
@moduledoc """
Interface to build Jikan URLs. These are then passed onto `JikanEx.Request.request/3`.
In here, generally, URLs shouldn't start with a slash, and should typically have a slash at the end. The final / is removed when adding query parameters or in `JikanEx.Request.request/3`... | 28 | 189 | 0.634368 |
d5e16a3d445ebc707fcc0d41ced7ff419ba3d13a | 99 | ex | Elixir | priv/repo/migrations/migration-sample.ex | cpjolicoeur/pivotal-swimlanes | ebe6b2b48516e6bd8dec557cda2b890f820974be | [
"CC0-1.0"
] | 6 | 2015-10-27T01:46:27.000Z | 2021-04-08T18:28:44.000Z | priv/repo/migrations/migration-sample.ex | cpjolicoeur/pivotal-swimlanes | ebe6b2b48516e6bd8dec557cda2b890f820974be | [
"CC0-1.0"
] | 66 | 2015-10-23T20:21:12.000Z | 2018-04-18T15:25:57.000Z | priv/repo/migrations/migration-sample.ex | cpjolicoeur/pivotal-swimlanes | ebe6b2b48516e6bd8dec557cda2b890f820974be | [
"CC0-1.0"
] | null | null | null | # add sample migration to push empty directory up to github
# necessary for running circle CI test
| 33 | 59 | 0.79798 |
d5e19d59226845953405b99d8816f9ad75f3d511 | 1,670 | ex | Elixir | clients/you_tube/lib/google_api/you_tube/v3/model/i18n_language_snippet.ex | nuxlli/elixir-google-api | ecb8679ac7282b7dd314c3e20c250710ec6a7870 | [
"Apache-2.0"
] | null | null | null | clients/you_tube/lib/google_api/you_tube/v3/model/i18n_language_snippet.ex | nuxlli/elixir-google-api | ecb8679ac7282b7dd314c3e20c250710ec6a7870 | [
"Apache-2.0"
] | null | null | null | clients/you_tube/lib/google_api/you_tube/v3/model/i18n_language_snippet.ex | nuxlli/elixir-google-api | ecb8679ac7282b7dd314c3e20c250710ec6a7870 | [
"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... | 32.745098 | 105 | 0.735329 |
d5e1a493a2b71fe7aacf5e6953b4e475790c8b9d | 1,968 | exs | Elixir | test/gen_amqp/client_test.exs | getong/gen_amqp | 5db3a4722a0f7cab55e2d739661026e9851f6e8d | [
"MIT"
] | 5 | 2017-02-15T21:12:49.000Z | 2020-01-20T20:52:06.000Z | test/gen_amqp/client_test.exs | getong/gen_amqp | 5db3a4722a0f7cab55e2d739661026e9851f6e8d | [
"MIT"
] | 2 | 2018-04-05T00:59:28.000Z | 2018-08-07T09:13:27.000Z | test/gen_amqp/client_test.exs | getong/gen_amqp | 5db3a4722a0f7cab55e2d739661026e9851f6e8d | [
"MIT"
] | 3 | 2018-05-08T22:51:30.000Z | 2020-02-25T16:20:53.000Z | defmodule GenAMQP.ClientTest do
use ExUnit.Case
alias GenAMQP.Client
@conn_name ConnHub
describe "server with handle" do
test "get a response" do
assert Client.call_with_conn(@conn_name, "", "server_handle_demo", "", max_time: 10_000) ==
"error"
end
end
describe "server with ... | 28.114286 | 97 | 0.588415 |
d5e1ad7f4d2d0ebbee4034e606b8971be6d26ad7 | 1,479 | exs | Elixir | test/authorize_test.exs | pareeohnos/rampart | 21afc1b6880d9f1ba11ece8872fd88de917e39e9 | [
"MIT"
] | 2 | 2017-05-03T15:02:01.000Z | 2017-05-04T01:18:53.000Z | test/authorize_test.exs | pareeohnos/rampart | 21afc1b6880d9f1ba11ece8872fd88de917e39e9 | [
"MIT"
] | null | null | null | test/authorize_test.exs | pareeohnos/rampart | 21afc1b6880d9f1ba11ece8872fd88de917e39e9 | [
"MIT"
] | null | null | null | defmodule AuthorizeTest do
use ExUnit.Case, async: true
use Plug.Test
alias Rampart.Authorize
test "raises an exception if no current user" do
opts = Authorize.init(resource: nil, action: nil)
conn = conn(:get, "/hello")
assert_raise Rampart.Exceptions.UserNotFound, fn ->
Authorize.call(con... | 27.90566 | 75 | 0.655849 |
d5e1b2bd2f342e4c5a05651ec338133c5b2ffbbb | 2,786 | ex | Elixir | lib/requestbox_web/controllers/request_controller.ex | kevinastone/phoenixbin | 8b7326b5de1fe9961c1a2d7971a3d4abe7178829 | [
"MIT"
] | 18 | 2015-11-18T09:52:34.000Z | 2021-04-27T19:38:08.000Z | lib/requestbox_web/controllers/request_controller.ex | kevinastone/phoenixbin | 8b7326b5de1fe9961c1a2d7971a3d4abe7178829 | [
"MIT"
] | 3 | 2017-01-11T18:55:39.000Z | 2021-06-15T05:46:34.000Z | lib/requestbox_web/controllers/request_controller.ex | kevinastone/phoenixbin | 8b7326b5de1fe9961c1a2d7971a3d4abe7178829 | [
"MIT"
] | 7 | 2016-08-17T10:24:20.000Z | 2020-07-10T13:00:36.000Z | defmodule RequestboxWeb.RequestController do
# use Requestbox.Web, :controller
use Plug.Builder
alias Requestbox.Repo
alias Requestbox.Request.Header
alias Requestbox.Session
plug(Requestbox.BearerToken)
plug(:load_session)
plug(:query_token)
plug(:check_token)
plug(:action)
defp load_session(c... | 24.017241 | 91 | 0.617373 |
d5e1d6d3868ef411cbfcaa0020783f4fb01a87a2 | 1,948 | ex | Elixir | clients/gmail/lib/google_api/gmail/v1/model/thread.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/gmail/lib/google_api/gmail/v1/model/thread.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/gmail/lib/google_api/gmail/v1/model/thread.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 ... | 34.785714 | 125 | 0.695072 |
d5e24508d5ff4ca500a4be35d443a16cbb483b4a | 4,578 | exs | Elixir | test/auth_test.exs | access-company/antikythera_aws | 77d20a08f7009e8d8f71b787c4ba6a162397ffb6 | [
"Apache-2.0"
] | 3 | 2018-04-26T07:49:40.000Z | 2018-04-28T00:31:41.000Z | test/auth_test.exs | access-company/antikythera_aws | 77d20a08f7009e8d8f71b787c4ba6a162397ffb6 | [
"Apache-2.0"
] | 7 | 2018-06-05T10:26:40.000Z | 2021-02-26T07:06:22.000Z | test/auth_test.exs | access-company/antikythera_aws | 77d20a08f7009e8d8f71b787c4ba6a162397ffb6 | [
"Apache-2.0"
] | null | null | null | # Copyright(c) 2015-2021 ACCESS CO., LTD. All rights reserved.
defmodule AntikytheraAws.Auth.InstanceProfileCredentialsTest do
use Croma.TestCase
alias Antikythera.{Time, Httpc}
alias Antikythera.Httpc.Response, as: Res
alias AntikytheraCore.Ets.SystemCache
alias AntikytheraAws.Auth.Credentials, as: Creds
... | 37.219512 | 95 | 0.678462 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.