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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e96f04955727ed7b756d59c233a170c194f96539 | 1,837 | ex | Elixir | elixir/lib/homework/companies.ex | ceejaay/web-homework | e5844609b62bdfa79a9b5b8f302c0d7ba81dc75d | [
"MIT"
] | null | null | null | elixir/lib/homework/companies.ex | ceejaay/web-homework | e5844609b62bdfa79a9b5b8f302c0d7ba81dc75d | [
"MIT"
] | null | null | null | elixir/lib/homework/companies.ex | ceejaay/web-homework | e5844609b62bdfa79a9b5b8f302c0d7ba81dc75d | [
"MIT"
] | null | null | null | defmodule Homework.Companies do
@moduledoc """
The Companies context.
"""
import Ecto.Query, warn: false
alias Homework.Repo
alias Homework.Companies.Company
@doc """
Returns the list of company.
## Examples
iex> list_company()
[%Company{}, ...]
"""
def list_company(_args) do
... | 17.495238 | 62 | 0.602613 |
e96f17d06c2bbb7abc22cbe8a674c43b568de4b6 | 665 | exs | Elixir | elixir/mix.exs | wadeanthony0100/euler | 8a9639523b2400560add80f73b44a342ad2a8272 | [
"MIT"
] | null | null | null | elixir/mix.exs | wadeanthony0100/euler | 8a9639523b2400560add80f73b44a342ad2a8272 | [
"MIT"
] | null | null | null | elixir/mix.exs | wadeanthony0100/euler | 8a9639523b2400560add80f73b44a342ad2a8272 | [
"MIT"
] | null | null | null | defmodule Euler.Mixfile do
use Mix.Project
def project do
[app: :euler,
version: "0.1.0",
elixir: "~> 1.3",
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 i... | 20.151515 | 77 | 0.604511 |
e96f359d1d8c0fc45708a64f168164c0279a4a88 | 2,121 | ex | Elixir | clients/vision/lib/google_api/vision/v1/model/google_cloud_vision_v1p1beta1_bounding_poly.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/vision/lib/google_api/vision/v1/model/google_cloud_vision_v1p1beta1_bounding_poly.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/vision/lib/google_api/vision/v1/model/google_cloud_vision_v1p1beta1_bounding_poly.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 38.563636 | 177 | 0.761433 |
e96f4d3457105c3632f1e06c831dbbd9c888bae3 | 585 | exs | Elixir | 2021/day07/test/day07_test.exs | faried/advent | 1d3817a3c305963ff22e844630bbafd3af242d3e | [
"MIT"
] | null | null | null | 2021/day07/test/day07_test.exs | faried/advent | 1d3817a3c305963ff22e844630bbafd3af242d3e | [
"MIT"
] | null | null | null | 2021/day07/test/day07_test.exs | faried/advent | 1d3817a3c305963ff22e844630bbafd3af242d3e | [
"MIT"
] | null | null | null | defmodule Day07Test do
use ExUnit.Case
doctest Day07
@test_input [16, 1, 2, 0, 4, 2, 7, 1, 2, 14]
test "part 1 sample" do
assert Day07.part1(@test_input) == 37
end
test "part 1" do
input = read_input()
assert Day07.part1(input) == 337_488
end
test "part 2 sample" do
assert Day07.part... | 18.28125 | 46 | 0.615385 |
e96f57d44566e350f72540ebd09fe542c7ab84c0 | 18,734 | exs | Elixir | test/outer/accounts_test.exs | karolsluszniak/clustered_queue_and_pool-phoenix1.6 | cbf8f51a3c72cb7a5bde31839c1de056775af4f3 | [
"MIT"
] | null | null | null | test/outer/accounts_test.exs | karolsluszniak/clustered_queue_and_pool-phoenix1.6 | cbf8f51a3c72cb7a5bde31839c1de056775af4f3 | [
"MIT"
] | null | null | null | test/outer/accounts_test.exs | karolsluszniak/clustered_queue_and_pool-phoenix1.6 | cbf8f51a3c72cb7a5bde31839c1de056775af4f3 | [
"MIT"
] | null | null | null | defmodule Outer.AccountsTest do
use Outer.DataCase
alias Outer.Accounts
import Outer.AccountsFixtures
alias Outer.Accounts.{User, UserToken}
describe "get_user_by_email/1" do
test "does not return the user if the email does not exist" do
refute Accounts.get_user_by_email("unknown@example.com")
... | 32.866667 | 97 | 0.653518 |
e96f69c6fe3dd3a7b27c66c3563b657dfe81cc4b | 1,803 | ex | Elixir | lib/vintage_net/os_event_dispatcher/udhcpc_handler.ex | axelson/vintage_net | 68866ff223fa40e7ad6fd4d9fb2f7960cf51b1ca | [
"Apache-2.0"
] | 85 | 2019-05-09T14:54:38.000Z | 2022-02-08T16:52:04.000Z | lib/vintage_net/os_event_dispatcher/udhcpc_handler.ex | axelson/vintage_net | 68866ff223fa40e7ad6fd4d9fb2f7960cf51b1ca | [
"Apache-2.0"
] | 132 | 2019-05-09T15:57:59.000Z | 2022-02-28T16:31:22.000Z | lib/vintage_net/os_event_dispatcher/udhcpc_handler.ex | axelson/vintage_net | 68866ff223fa40e7ad6fd4d9fb2f7960cf51b1ca | [
"Apache-2.0"
] | 14 | 2019-07-08T19:18:23.000Z | 2022-02-08T16:52:05.000Z | defmodule VintageNet.OSEventDispatcher.UdhcpcHandler do
@moduledoc """
A behaviour for handling notifications from udhcpc
## Example
```elixir
defmodule MyApp.UdhcpcHandler do
@behaviour VintageNet.OSEventDispatcher.UdhcpcHandler
@impl VintageNet.OSEventDispatcher.UdhcpcHandler
def deconfig(ifn... | 23.115385 | 72 | 0.621742 |
e96f7cfdbad0b57ae1ba5a16dd4e48589132774a | 302 | ex | Elixir | lib/tasks/install/migration_test_adapter.ex | joaomdmoura/keeper | 3541dc4dcf06afa176bcd5827408accdd3d05f9d | [
"Apache-2.0"
] | 29 | 2016-11-06T05:43:17.000Z | 2020-01-05T00:35:57.000Z | lib/tasks/install/migration_test_adapter.ex | joaomdmoura/escort | 3541dc4dcf06afa176bcd5827408accdd3d05f9d | [
"Apache-2.0"
] | 9 | 2016-11-28T05:54:56.000Z | 2018-06-01T13:36:51.000Z | lib/tasks/install/migration_test_adapter.ex | joaomdmoura/escort | 3541dc4dcf06afa176bcd5827408accdd3d05f9d | [
"Apache-2.0"
] | 4 | 2016-11-28T20:31:02.000Z | 2019-07-12T20:26:57.000Z | defmodule Mix.Tasks.Keeper.Install.MigrationTestAdapter do
use Mix.Task
@moduledoc false
@doc false
def run(_args) do
Mix.Phoenix.copy_from [".", :keeper],
"test/support/migrations", "", [],
[{:eex, "/fake_migration.exs", "test/support/migrations/000_create_users.exs"}]
end
end
| 25.166667 | 83 | 0.692053 |
e96f9c34809f5d6f81dbd01f49dd207479373d7a | 984 | exs | Elixir | apps/omg_conformance/mix.exs | omisego/elixir-omg | 2c68973d8f29033d137f63a6e060f12e2a7dcd59 | [
"Apache-2.0"
] | 177 | 2018-08-24T03:51:02.000Z | 2020-05-30T13:29:25.000Z | apps/omg_conformance/mix.exs | omisego/elixir-omg | 2c68973d8f29033d137f63a6e060f12e2a7dcd59 | [
"Apache-2.0"
] | 1,042 | 2018-08-25T00:52:39.000Z | 2020-06-01T05:15:17.000Z | apps/omg_conformance/mix.exs | omisego/elixir-omg | 2c68973d8f29033d137f63a6e060f12e2a7dcd59 | [
"Apache-2.0"
] | 47 | 2018-08-24T12:06:33.000Z | 2020-04-28T11:49:25.000Z | defmodule OMG.Conformance.MixProject do
use Mix.Project
def project() do
[
app: :omg_conformance,
version: version(),
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixir: "~> 1.8",
elixir... | 21.866667 | 56 | 0.546748 |
e96fac6fbe68e29b7452cc50d2c787043da7d879 | 2,208 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/reservations_scoped_list_warning.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/reservations_scoped_list_warning.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/compute/lib/google_api/compute/v1/model/reservations_scoped_list_warning.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... | 40.888889 | 194 | 0.72962 |
e96fbd8546f1fd2a6820b615934714e560c0e09a | 1,445 | exs | Elixir | mix.exs | INGCRENGIFO/ex_audit | a30918131fb6b23e7b09d1db38116cef66d91405 | [
"MIT"
] | null | null | null | mix.exs | INGCRENGIFO/ex_audit | a30918131fb6b23e7b09d1db38116cef66d91405 | [
"MIT"
] | null | null | null | mix.exs | INGCRENGIFO/ex_audit | a30918131fb6b23e7b09d1db38116cef66d91405 | [
"MIT"
] | null | null | null | defmodule ExAudit.Mixfile do
use Mix.Project
def project do
[
description: "Ecto auditing library that transparently tracks changes and can revert them",
app: :ex_audit,
version: "0.7.0",
elixir: "~> 1.6",
start_permanent: Mix.env() == :prod,
deps: deps(),
elixirc_path... | 24.083333 | 97 | 0.550865 |
e96fc5fc9d3ad8757ea8c12de98d08df6dfb8b34 | 1,147 | ex | Elixir | lib/day_01.ex | robindaumann/aoc-2020 | 63e2dd4cd3062b15fc5be3ec8b3fe75716701f7a | [
"MIT"
] | 1 | 2020-12-19T18:40:00.000Z | 2020-12-19T18:40:00.000Z | lib/day_01.ex | robindaumann/aoc-2020 | 63e2dd4cd3062b15fc5be3ec8b3fe75716701f7a | [
"MIT"
] | null | null | null | lib/day_01.ex | robindaumann/aoc-2020 | 63e2dd4cd3062b15fc5be3ec8b3fe75716701f7a | [
"MIT"
] | null | null | null | defmodule Day01 do
def part1(path) do
path
|> parse
|> findProduct(2020)
end
def part2(path) do
path
|> parse
|> findProductTriple(2020)
end
def parse(path) do
path
|> File.stream!()
|> Enum.map(&String.trim/1)
|> Enum.map(&String.to_integer/1)
|> Enum.sort()
en... | 15.930556 | 46 | 0.528335 |
e97008cd21c418080613ff48b03932dd19611723 | 474 | exs | Elixir | test/taut/user_test.exs | shimmerlabs/taut | 1f38f5ccfc39b94aa392105af6dfbf3a44a9cc19 | [
"MIT"
] | null | null | null | test/taut/user_test.exs | shimmerlabs/taut | 1f38f5ccfc39b94aa392105af6dfbf3a44a9cc19 | [
"MIT"
] | null | null | null | test/taut/user_test.exs | shimmerlabs/taut | 1f38f5ccfc39b94aa392105af6dfbf3a44a9cc19 | [
"MIT"
] | null | null | null | defmodule Taut.UserTest do
use Taut.DataCase
test "new_user/1" do
{:ok, user} = Taut.User.new_user(%{foreign_id: Ecto.UUID.generate(),
display_name: "Tester McTesterson"})
assert Taut.Repo.aggregate(Taut.Subscription, :count) == 1
assert Taut.Repo.aggregate(Taut.User, :cou... | 33.857143 | 78 | 0.651899 |
e9702446f0f805ef92674e96605c60fbee3d4a92 | 7,663 | ex | Elixir | exercises/practice/poker/.meta/example.ex | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 343 | 2017-06-22T16:28:28.000Z | 2022-03-25T21:33:32.000Z | exercises/practice/poker/.meta/example.ex | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 583 | 2017-06-19T10:48:40.000Z | 2022-03-28T21:43:12.000Z | exercises/practice/poker/.meta/example.ex | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 228 | 2017-07-05T07:09:32.000Z | 2022-03-27T08:59:08.000Z | defmodule Poker do
@doc """
Given a list of poker hands, return a list containing the highest scoring hand.
If two or more hands tie, return the list of tied hands in the order they were received.
The basic rules and hand rankings for Poker can be found at:
https://en.wikipedia.org/wiki/List_of_poker_hands... | 37.019324 | 110 | 0.633564 |
e9704b5ce21d54b3722006e6fd0792fb3eb3349d | 1,028 | ex | Elixir | lib/miles_to_go/application.ex | code-shoily/miles_to_go | cf5758d3113244326651320bd19c1887677bcf51 | [
"MIT"
] | 6 | 2020-12-18T08:36:32.000Z | 2021-06-13T03:02:16.000Z | lib/miles_to_go/application.ex | code-shoily/miles_to_go | cf5758d3113244326651320bd19c1887677bcf51 | [
"MIT"
] | null | null | null | lib/miles_to_go/application.ex | code-shoily/miles_to_go | cf5758d3113244326651320bd19c1887677bcf51 | [
"MIT"
] | null | null | null | defmodule MilesToGo.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 Ecto repository
MilesToGo.Repo,
# Start the Telemetry supervisor
Mil... | 29.371429 | 67 | 0.707198 |
e9708a8a1241764546acf69e1de509b13f84fd44 | 71 | ex | Elixir | lib/eliscore_chat_web/views/page_view.ex | CandN/eliscore-chat | a626077bf1c46b329c15f63db9a25521b43bd61b | [
"MIT"
] | null | null | null | lib/eliscore_chat_web/views/page_view.ex | CandN/eliscore-chat | a626077bf1c46b329c15f63db9a25521b43bd61b | [
"MIT"
] | null | null | null | lib/eliscore_chat_web/views/page_view.ex | CandN/eliscore-chat | a626077bf1c46b329c15f63db9a25521b43bd61b | [
"MIT"
] | null | null | null | defmodule EliscoreChatWeb.PageView do
use EliscoreChatWeb, :view
end
| 17.75 | 37 | 0.830986 |
e970fa1afa2ecc661a22f0cc6f9e956b52b31aeb | 2,279 | ex | Elixir | clients/firebase_dynamic_links/lib/google_api/firebase_dynamic_links/v1/model/create_managed_short_link_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-10-01T09:20:41.000Z | 2021-10-01T09:20:41.000Z | clients/firebase_dynamic_links/lib/google_api/firebase_dynamic_links/v1/model/create_managed_short_link_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/firebase_dynamic_links/lib/google_api/firebase_dynamic_links/v1/model/create_managed_short_link_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 41.436364 | 175 | 0.751207 |
e970fe9b0ca72ec1a76e55110efdb34ecfb23a5e | 1,389 | ex | Elixir | lib/excoveralls/drone.ex | brauliobz/excoveralls | 8108405bda1c6ef27253edc294415f02d78760f4 | [
"MIT"
] | 716 | 2015-01-04T20:41:01.000Z | 2022-03-29T08:44:09.000Z | lib/excoveralls/drone.ex | brauliobz/excoveralls | 8108405bda1c6ef27253edc294415f02d78760f4 | [
"MIT"
] | 255 | 2015-01-03T23:41:58.000Z | 2022-03-19T23:06:06.000Z | deps/excoveralls/lib/excoveralls/drone.ex | carlosviana/blog | 1dcf58c3ca40bc3a7105d75de6f51954eb44bca8 | [
"MIT"
] | 217 | 2015-03-31T20:17:58.000Z | 2022-02-20T23:46:41.000Z | defmodule ExCoveralls.Drone do
@moduledoc """
Handles drone-ci integration with coveralls.
"""
alias ExCoveralls.Poster
def execute(stats, options) do
json = generate_json(stats, Enum.into(options, %{}))
if options[:verbose] do
IO.puts json
end
Poster.execute(json)
end
def generate... | 20.731343 | 56 | 0.673146 |
e9712cbfe8ce8ace8ecc95aa74a6fb254aa2d3ed | 244 | exs | Elixir | backend/priv/repo/migrations/20190607041759_create_user_goals.exs | silver-panda/budgetr | d8cad5c1401677947444add24c8d41f2450c8cc3 | [
"MIT"
] | null | null | null | backend/priv/repo/migrations/20190607041759_create_user_goals.exs | silver-panda/budgetr | d8cad5c1401677947444add24c8d41f2450c8cc3 | [
"MIT"
] | null | null | null | backend/priv/repo/migrations/20190607041759_create_user_goals.exs | silver-panda/budgetr | d8cad5c1401677947444add24c8d41f2450c8cc3 | [
"MIT"
] | null | null | null | defmodule Backend.Repo.Migrations.CreateUserGoals do
use Ecto.Migration
def change do
create table(:user_goals) do
add :month, :integer
add :year, :integer
add :amount, :integer
timestamps()
end
end
end
| 16.266667 | 52 | 0.659836 |
e9712e937d672aa6c04152d0e6a3ad1ebb700dea | 1,882 | ex | Elixir | clients/cloud_billing/lib/google_api/cloud_billing/v1/model/list_skus_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/cloud_billing/lib/google_api/cloud_billing/v1/model/list_skus_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/cloud_billing/lib/google_api/cloud_billing/v1/model/list_skus_response.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... | 36.192308 | 135 | 0.72848 |
e9714a44065c7df63a9306e3ade29eabc4a76313 | 2,460 | ex | Elixir | lib/clickhousex/http_client.ex | hissssst/clickhousex | 76af47440408ca9280bcb7c07d0b33e249e1295d | [
"Apache-2.0"
] | null | null | null | lib/clickhousex/http_client.ex | hissssst/clickhousex | 76af47440408ca9280bcb7c07d0b33e249e1295d | [
"Apache-2.0"
] | null | null | null | lib/clickhousex/http_client.ex | hissssst/clickhousex | 76af47440408ca9280bcb7c07d0b33e249e1295d | [
"Apache-2.0"
] | null | null | null | defmodule Clickhousex.HTTPClient do
alias Clickhousex.Query
@moduledoc false
@req_headers [{"Content-Type", "text/plain"}]
def send(query, request, base_address, timeout, nil, _password, database) do
opts = [timeout: timeout, recv_timeout: timeout]
send_p(query, request, base_address, database, opts)
... | 27.333333 | 87 | 0.622764 |
e971769f50ca13d5ac11897264005077605fce4f | 14,381 | ex | Elixir | lib/erlex.ex | PragTob/erlex | 912bb971513ed4384055e5321dd53b952c8a4700 | [
"Apache-2.0"
] | null | null | null | lib/erlex.ex | PragTob/erlex | 912bb971513ed4384055e5321dd53b952c8a4700 | [
"Apache-2.0"
] | null | null | null | lib/erlex.ex | PragTob/erlex | 912bb971513ed4384055e5321dd53b952c8a4700 | [
"Apache-2.0"
] | null | null | null | defmodule Erlex do
@moduledoc """
Convert Erlang style structs and error messages to equivalent Elixir.
Lexes and parses the Erlang output, then runs through pretty
printer.
## Usage
Invoke `Erlex.pretty_print/1` wuth the input string.
```elixir
iex> str = ~S"('Elixir.Plug.Conn':t(),binary() | atom(... | 24.415959 | 199 | 0.561157 |
e971b03e553e2e61f9f93e65d8bc1484b4afbc84 | 681 | exs | Elixir | test/protobuf/json_test.exs | redink/protobuf | 9f3e443ba2f0e808aae8ae075ffb7abeeca75483 | [
"MIT"
] | 4 | 2021-01-16T02:21:44.000Z | 2022-03-04T18:42:18.000Z | test/protobuf/json_test.exs | redink/protobuf | 9f3e443ba2f0e808aae8ae075ffb7abeeca75483 | [
"MIT"
] | 5 | 2020-04-07T20:22:38.000Z | 2020-09-23T02:28:36.000Z | test/protobuf/json_test.exs | redink/protobuf | 9f3e443ba2f0e808aae8ae075ffb7abeeca75483 | [
"MIT"
] | 4 | 2020-07-22T23:38:34.000Z | 2021-03-26T18:52:54.000Z | defmodule Protobuf.JSONTest do
use ExUnit.Case, async: true
doctest Protobuf.JSON
alias TestMsg.Scalars
test "only encodes valid protobuf structs" do
assert_raise Protobuf.JSON.EncodeError, ~r/'proto2' syntax is unsupported/, fn ->
Protobuf.JSON.encode!(%TestMsg.Foo2{})
end
end
test "encodi... | 29.608696 | 85 | 0.685756 |
e971c9182d70828406bc6dfd4ec4cad19317a0ea | 2,146 | ex | Elixir | test/support/test_helpers.ex | josephkabraham/ucx_ucc | 0dbd9e3eb5940336b4870cff033482ceba5f6ee7 | [
"MIT"
] | null | null | null | test/support/test_helpers.ex | josephkabraham/ucx_ucc | 0dbd9e3eb5940336b4870cff033482ceba5f6ee7 | [
"MIT"
] | null | null | null | test/support/test_helpers.ex | josephkabraham/ucx_ucc | 0dbd9e3eb5940336b4870cff033482ceba5f6ee7 | [
"MIT"
] | null | null | null | defmodule UcxUcc.TestHelpers do
alias FakerElixir, as: Faker
alias UcxUcc.{Repo, Accounts}
alias Accounts.{User, Role, UserRole}
import Ecto.Query
def strip_ts(schema) do
struct schema, inserted_at: nil, updated_at: nil
end
def schema_eq(schema1, schema2) do
strip_ts(schema1) == strip_ts(schema2... | 24.11236 | 99 | 0.609972 |
e971decb2e72b3018488254a41085c0d968a7b88 | 1,552 | ex | Elixir | apps/mishka_html/lib/mishka_html_web/live/components/public/_time_converter_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/public/_time_converter_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/public/_time_converter_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.Public.TimeConverterComponent do
use MishkaHtmlWeb, :live_component
def render(assigns) do
~L"""
<span id="<%= @span_id %>">
<% time_need = jalali_create(@time) %>
<%= time_need.day_number %> <%= time_need.month_name %> <%= time_need.year_number %>
</span>
... | 25.032258 | 99 | 0.614046 |
e971df94346687073f75f5678a9d6a175b7b2241 | 941 | ex | Elixir | projects/api/test/support/channel_case.ex | strattadb/margaret | dde5d7b42f6d9b4d320069a0117136dae03b13b5 | [
"MIT"
] | 82 | 2017-11-06T01:00:55.000Z | 2020-12-09T10:35:29.000Z | projects/api/test/support/channel_case.ex | dbstratta/margaret | dde5d7b42f6d9b4d320069a0117136dae03b13b5 | [
"MIT"
] | 98 | 2017-11-06T22:57:32.000Z | 2020-07-03T04:46:39.000Z | projects/api/test/support/channel_case.ex | strattadb/margaret | dde5d7b42f6d9b4d320069a0117136dae03b13b5 | [
"MIT"
] | 10 | 2017-11-16T05:31:58.000Z | 2020-10-29T18:02:35.000Z | defmodule MargaretWeb.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 w... | 24.763158 | 70 | 0.717322 |
e97201eb132bd98330235eb308f1d093762ac044 | 1,370 | ex | Elixir | clients/storage/lib/google_api/storage/v1/model/bucket_versioning.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/storage/lib/google_api/storage/v1/model/bucket_versioning.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/storage/lib/google_api/storage/v1/model/bucket_versioning.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... | 31.136364 | 109 | 0.754015 |
e972299bf05c10320bda166b4ca35fdc1d08e761 | 130 | exs | Elixir | ControlFlow/12.3.exs | miguelcoba/ProgrammingElixir | c3aee9151ab2346fbd31a5411c473b1a4e626e36 | [
"MIT"
] | 2 | 2015-11-14T21:35:01.000Z | 2017-07-12T07:09:40.000Z | ControlFlow/12.3.exs | miguelcoba/ProgrammingElixir | c3aee9151ab2346fbd31a5411c473b1a4e626e36 | [
"MIT"
] | null | null | null | ControlFlow/12.3.exs | miguelcoba/ProgrammingElixir | c3aee9151ab2346fbd31a5411c473b1a4e626e36 | [
"MIT"
] | null | null | null | defmodule Ok do
def ok!(p) do
case p do
{:ok, data} -> data
{_, error} -> raise "Error occurred: #{error}"
end
end
end | 16.25 | 49 | 0.584615 |
e9722af0315288534c1939ec464a5002219dd518 | 74 | ex | Elixir | lib/honest_chat_web/views/user_session_view.ex | noozo/honest_chat | b3c45f72fd9c579404d05ce308eb13a0a2997760 | [
"Apache-2.0"
] | 3 | 2021-11-19T07:18:30.000Z | 2021-12-23T22:19:48.000Z | lib/honest_chat_web/views/user_session_view.ex | noozo/honest_chat | b3c45f72fd9c579404d05ce308eb13a0a2997760 | [
"Apache-2.0"
] | null | null | null | lib/honest_chat_web/views/user_session_view.ex | noozo/honest_chat | b3c45f72fd9c579404d05ce308eb13a0a2997760 | [
"Apache-2.0"
] | null | null | null | defmodule HonestChatWeb.UserSessionView do
use HonestChatWeb, :view
end
| 18.5 | 42 | 0.837838 |
e9723b54e0df175d0cb20f9ad457e21a6c3d1f6a | 638 | ex | Elixir | server/lib/melody_match_web/views/match_view.ex | brianjaustin/melody-match | 5200fd347f7ae636ec782398896c782d80c17f59 | [
"Apache-1.1"
] | null | null | null | server/lib/melody_match_web/views/match_view.ex | brianjaustin/melody-match | 5200fd347f7ae636ec782398896c782d80c17f59 | [
"Apache-1.1"
] | 4 | 2021-03-28T03:09:37.000Z | 2021-04-10T17:45:10.000Z | server/lib/melody_match_web/views/match_view.ex | brianjaustin/melody-match | 5200fd347f7ae636ec782398896c782d80c17f59 | [
"Apache-1.1"
] | null | null | null | defmodule MelodyMatchWeb.MatchView do
use MelodyMatchWeb, :view
alias MelodyMatchWeb.MatchView
alias MelodyMatch.Accounts
alias MelodyMatchWeb.UserView
def render("index.json", %{matches: matches}) do
%{data: render_many(matches, MatchView, "match.json")}
end
def render("show.json", %{match: m}) do
... | 27.73913 | 74 | 0.695925 |
e9725c052c98809ca748abe384785774cbf7f18b | 501 | ex | Elixir | lib/twivia_web/views/user_view.ex | liviaab/twivia | ce00db2ef8375ef5c6f1c1f996aa7c44fa994a8e | [
"MIT"
] | null | null | null | lib/twivia_web/views/user_view.ex | liviaab/twivia | ce00db2ef8375ef5c6f1c1f996aa7c44fa994a8e | [
"MIT"
] | null | null | null | lib/twivia_web/views/user_view.ex | liviaab/twivia | ce00db2ef8375ef5c6f1c1f996aa7c44fa994a8e | [
"MIT"
] | null | null | null | defmodule TwiviaWeb.UserView do
use TwiviaWeb, :view
alias TwiviaWeb.UserView
def render("index.json", %{users: users}) do
%{data: render_many(users, UserView, "user.json")}
end
def render("show.json", %{user: user}) do
%{data: render_one(user, UserView, "user.json")}
end
def render("user.json"... | 21.782609 | 54 | 0.630739 |
e9725d3f9a57ac7c64c1650dd4745bb745d5f464 | 1,105 | exs | Elixir | test/lib/openflow/ofp_port_mod_test.exs | shun159/tres | 1e3e7f78ba1aa4f184d4be70300e5f4703d50a2f | [
"Beerware"
] | 5 | 2019-05-25T02:25:13.000Z | 2020-10-06T17:00:03.000Z | test/lib/openflow/ofp_port_mod_test.exs | shun159/tres | 1e3e7f78ba1aa4f184d4be70300e5f4703d50a2f | [
"Beerware"
] | 5 | 2018-03-29T14:42:10.000Z | 2019-11-19T07:03:09.000Z | test/lib/openflow/ofp_port_mod_test.exs | shun159/tres | 1e3e7f78ba1aa4f184d4be70300e5f4703d50a2f | [
"Beerware"
] | 1 | 2019-03-30T20:48:27.000Z | 2019-03-30T20:48:27.000Z | defmodule OfpPortModTest do
use ExUnit.Case
doctest Openflow
describe "Openflow.read/1" do
test "with OFP_PORT_MOD packet(1)" do
binary = File.read!("test/packet_data/4-22-ofp_port_mod.packet")
{:ok, port_mod, ""} = Openflow.read(binary)
assert port_mod.version == 4
assert port_mod.x... | 31.571429 | 76 | 0.667873 |
e97268acd9e0e2a34459d707a0708f2550291f70 | 7,449 | ex | Elixir | lib/boundary/definition.ex | randycoulman/boundary | 2fdea46e702400c152670262d5ca1f31edbd4fa1 | [
"MIT"
] | null | null | null | lib/boundary/definition.ex | randycoulman/boundary | 2fdea46e702400c152670262d5ca1f31edbd4fa1 | [
"MIT"
] | null | null | null | lib/boundary/definition.ex | randycoulman/boundary | 2fdea46e702400c152670262d5ca1f31edbd4fa1 | [
"MIT"
] | null | null | null | # credo:disable-for-this-file Credo.Check.Readability.Specs
defmodule Boundary.Definition do
@moduledoc false
def generate(opts, env) do
opts =
opts
# This ensures that alias references (e.g. deps, exports) are treated by the compiler as runtime dependencies.
|> Macro.prewalk(fn term ->
... | 31.833333 | 119 | 0.621694 |
e972701be2497f1794e4442b9fbbe0689c50cb1e | 7,206 | ex | Elixir | lib/mix/tasks/package_ios_runtime.ex | NduatiK/runtimes | 87dc61f29522c0f0c88fa7962c6892af7693b978 | [
"MIT"
] | null | null | null | lib/mix/tasks/package_ios_runtime.ex | NduatiK/runtimes | 87dc61f29522c0f0c88fa7962c6892af7693b978 | [
"MIT"
] | null | null | null | lib/mix/tasks/package_ios_runtime.ex | NduatiK/runtimes | 87dc61f29522c0f0c88fa7962c6892af7693b978 | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.Package.Ios.Runtime do
alias Mix.Tasks.Package.Ios.Nif
use Mix.Task
require EEx
def architectures() do
# Not sure if we still need arm-32 at all https://blakespot.com/ios_device_specifications_grid.html
%{
"ios" => %{
arch: "armv7",
id: "ios",
sdk: "iph... | 30.025 | 103 | 0.585762 |
e9727f764348f5e0e3d53ac355a61f1f86ca094d | 1,526 | ex | Elixir | clients/fitness/lib/google_api/fitness/v1/model/aggregate_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-10-01T09:20:41.000Z | 2021-10-01T09:20:41.000Z | clients/fitness/lib/google_api/fitness/v1/model/aggregate_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/fitness/lib/google_api/fitness/v1/model/aggregate_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 32.468085 | 147 | 0.742464 |
e97284c1e19eac900dc4ef8b6985259b9c3c8af0 | 248 | ex | Elixir | lib/table_rex/column.ex | fhunleth/licensir | 3d61fe335dd232cd8af44ecd8dc412273ef7f37b | [
"MIT"
] | 187 | 2015-12-30T13:33:22.000Z | 2022-03-15T07:56:32.000Z | lib/table_rex/column.ex | fhunleth/licensir | 3d61fe335dd232cd8af44ecd8dc412273ef7f37b | [
"MIT"
] | 42 | 2015-12-18T17:23:30.000Z | 2022-02-03T14:47:43.000Z | lib/table_rex/column.ex | fhunleth/licensir | 3d61fe335dd232cd8af44ecd8dc412273ef7f37b | [
"MIT"
] | 23 | 2016-01-04T14:44:10.000Z | 2022-03-31T22:37:54.000Z | defmodule TableRex.Column do
@moduledoc """
Defines a struct that represents a column's metadata
The align field can be one of :left, :center or :right.
"""
defstruct align: :left, padding: 1, color: nil
@type t :: %__MODULE__{}
end
| 20.666667 | 57 | 0.685484 |
e972b0cec0f585290ed6e586afea3cbf4e775f9c | 612 | ex | Elixir | lib/http2_server.ex | nsarno/http2_server | 096a99611248c7b7c3373392e1e220ea7108df49 | [
"MIT"
] | 1 | 2016-08-17T19:01:55.000Z | 2016-08-17T19:01:55.000Z | lib/http2_server.ex | nsarno/http2_server | 096a99611248c7b7c3373392e1e220ea7108df49 | [
"MIT"
] | null | null | null | lib/http2_server.ex | nsarno/http2_server | 096a99611248c7b7c3373392e1e220ea7108df49 | [
"MIT"
] | null | null | null | defmodule Http2Server 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 = [
worker(Task.Supervisor, [[name: Http2Server.TaskSupervisor]]),
wo... | 30.6 | 68 | 0.715686 |
e972cff4846b325697e222585b335333aa4ea479 | 1,347 | ex | Elixir | web/uploaders/content_image.ex | harry-gao/ex-cart | 573e7f977bb3b710d11618dd215d4ddd8f819fb3 | [
"Apache-2.0"
] | null | null | null | web/uploaders/content_image.ex | harry-gao/ex-cart | 573e7f977bb3b710d11618dd215d4ddd8f819fb3 | [
"Apache-2.0"
] | null | null | null | web/uploaders/content_image.ex | harry-gao/ex-cart | 573e7f977bb3b710d11618dd215d4ddd8f819fb3 | [
"Apache-2.0"
] | null | null | null | defmodule Nectar.ContentImage do
use Arc.Definition
@versions [:original, :mobile]
def acl(:mobile, _), do: :public_read
def __storage, do: Arc.Storage.S3
# To add a thumbnail version:
# @versions [:original, :thumb]
# Whitelist file extensions:
def validate({file, _}) do
~w(.jpg .jpeg .gif .pn... | 26.411765 | 76 | 0.684484 |
e972d1af4e6229a740acf9ab897bcd12a59bd0c0 | 2,151 | exs | Elixir | mix.exs | gil-air-may/guardian_phoenix | 8002798620d25ee1b274cb611e29fb2091360eb6 | [
"MIT"
] | null | null | null | mix.exs | gil-air-may/guardian_phoenix | 8002798620d25ee1b274cb611e29fb2091360eb6 | [
"MIT"
] | null | null | null | mix.exs | gil-air-may/guardian_phoenix | 8002798620d25ee1b274cb611e29fb2091360eb6 | [
"MIT"
] | null | null | null | defmodule GuardianPhoenix.MixProject do
use Mix.Project
@name :guardian_phoenix
@version "2.0.0"
@elixir_version "~> 1.7"
@source_url "https://github.com/ueberauth/guardian_phoenix"
def project do
production? = Mix.env() == :prod
[
app: @name,
version: @version,
elixir: @elixir_... | 21.94898 | 64 | 0.529056 |
e9731efd0c446f9d1f4c124df2bb36902e70384f | 781 | ex | Elixir | lib/inmana/welcomer.ex | fontebasso/rocketseat-nlw5-elixir-inmana | 1f3730231b96aef9781a7a78ad7101222a31aa7a | [
"MIT"
] | null | null | null | lib/inmana/welcomer.ex | fontebasso/rocketseat-nlw5-elixir-inmana | 1f3730231b96aef9781a7a78ad7101222a31aa7a | [
"MIT"
] | null | null | null | lib/inmana/welcomer.ex | fontebasso/rocketseat-nlw5-elixir-inmana | 1f3730231b96aef9781a7a78ad7101222a31aa7a | [
"MIT"
] | null | null | null | defmodule Inmana.Welcomer do
# Receber um nome e uma idade do usuário
# Se o usuário chamar banana e tiver idade 42, ele recebe uma mensagem especial
# Se o usuário tiver 18 anos ou mais, ele recebe uma mensagem normal
# Se o usuário for menor de idade, retornamos um erro
# Temos que tratar o nome do usuário ... | 27.892857 | 91 | 0.65557 |
e9733534c5f46967766e75fc3b273b8b1834002a | 1,329 | ex | Elixir | lib/ecto/adapters/mnesia/connection.ex | bushman77/ecto3_mnesia | c0ba8af22e3b1c684e6fd3826206272f7c1df03b | [
"MIT"
] | 2 | 2021-02-26T21:56:29.000Z | 2021-08-25T04:35:55.000Z | lib/ecto/adapters/mnesia/connection.ex | bushman77/ecto3_mnesia | c0ba8af22e3b1c684e6fd3826206272f7c1df03b | [
"MIT"
] | null | null | null | lib/ecto/adapters/mnesia/connection.ex | bushman77/ecto3_mnesia | c0ba8af22e3b1c684e6fd3826206272f7c1df03b | [
"MIT"
] | 1 | 2021-11-11T07:47:27.000Z | 2021-11-11T07:47:27.000Z | defmodule Ecto.Adapters.Mnesia.Connection do
@moduledoc false
use GenServer
alias Ecto.Adapters.Mnesia
alias Ecto.Adapters.Mnesia.Connection
@id_seq_table_name :id_seq
def start_link(config) do
GenServer.start_link(Connection, [config], name: __MODULE__)
end
@impl GenServer
def init(config) do... | 21.786885 | 64 | 0.650865 |
e9737ad057179502555cdd9691e48c430993108a | 759 | exs | Elixir | test/harald/host/att/read_req_test.exs | RicardoTrindade/harald | 3f56003265c29af0780730eb538183b50e55df2f | [
"MIT"
] | 59 | 2019-02-16T00:09:58.000Z | 2020-03-29T23:37:36.000Z | test/harald/host/att/read_req_test.exs | RicardoTrindade/harald | 3f56003265c29af0780730eb538183b50e55df2f | [
"MIT"
] | 19 | 2019-02-15T22:41:43.000Z | 2020-02-15T19:20:57.000Z | test/harald/host/att/read_req_test.exs | RicardoTrindade/harald | 3f56003265c29af0780730eb538183b50e55df2f | [
"MIT"
] | 9 | 2020-05-07T00:02:36.000Z | 2021-09-17T18:17:46.000Z | defmodule Harald.Host.ATT.ReadReqTest do
use ExUnit.Case, async: true
alias Harald.Host.ATT.ReadReq
test "encode/1" do
attribute_handle = 185
parameters = %{attribute_handle: attribute_handle}
expected_bin = <<attribute_handle::little-size(16)>>
expected_size = byte_size(expected_bin)
assert... | 27.107143 | 63 | 0.714097 |
e9738201b0693b9281ac48453fb17d4e15b82e0b | 955 | exs | Elixir | test/sentix/bridge/command_test.exs | szTheory/sentix | 9932e5ecda1b2eb36cf9cff5f558871750bf0bd4 | [
"MIT"
] | 8 | 2017-06-28T12:48:40.000Z | 2021-04-09T03:54:15.000Z | test/sentix/bridge/command_test.exs | szTheory/sentix | 9932e5ecda1b2eb36cf9cff5f558871750bf0bd4 | [
"MIT"
] | 5 | 2016-10-04T00:34:40.000Z | 2016-12-21T21:41:34.000Z | test/sentix/bridge/command_test.exs | szTheory/sentix | 9932e5ecda1b2eb36cf9cff5f558871750bf0bd4 | [
"MIT"
] | 4 | 2017-07-07T02:24:44.000Z | 2021-03-15T11:16:17.000Z | defmodule Sentix.Bridge.CommandTest do
use ExUnit.Case
# This test verifies the ability to flatten provided arguments to a command
# by using a binary, options and target directories. The result should have
# the executable as first argument, options as middle arguments, and the last
# argument should be tar... | 29.84375 | 79 | 0.697382 |
e97384001392fbd228a1ba9370dbb9784dd6093e | 1,589 | ex | Elixir | lib/blog_web/endpoint.ex | etori-sangiacomo/blog | 6b7548d6dd5de4ba46803ae21f143644ef36ef41 | [
"MIT"
] | null | null | null | lib/blog_web/endpoint.ex | etori-sangiacomo/blog | 6b7548d6dd5de4ba46803ae21f143644ef36ef41 | [
"MIT"
] | null | null | null | lib/blog_web/endpoint.ex | etori-sangiacomo/blog | 6b7548d6dd5de4ba46803ae21f143644ef36ef41 | [
"MIT"
] | null | null | null | defmodule BlogWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :blog
# The session will be stored in the cookie and signed,
# this means its contents can be read but not tampered with.
# Set :encryption_salt if you would also like to encrypt it.
@session_options [
store: :cookie,
key: "_blog_key",
... | 28.890909 | 97 | 0.714915 |
e97384f633975da033e71f1ae387f02d8d744c25 | 789 | ex | Elixir | malmo_elixir/next_demo/led_control_panel/test/support/channel_case.ex | MathiasBeckius/ElixirNerves | 19a0a9b9cecae1e44a0259326a91be623acba1b0 | [
"MIT"
] | null | null | null | malmo_elixir/next_demo/led_control_panel/test/support/channel_case.ex | MathiasBeckius/ElixirNerves | 19a0a9b9cecae1e44a0259326a91be623acba1b0 | [
"MIT"
] | null | null | null | malmo_elixir/next_demo/led_control_panel/test/support/channel_case.ex | MathiasBeckius/ElixirNerves | 19a0a9b9cecae1e44a0259326a91be623acba1b0 | [
"MIT"
] | null | null | null | defmodule LedControlPanelWeb.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 data structures and query the data layer.
Finally, if the test case int... | 24.65625 | 59 | 0.732573 |
e97395ef85b2120fdaf66e9db818dec390469130 | 22,088 | ex | Elixir | lib/gremlex/graph.ex | coingaming/gremlex | 8e3c85c2917670faf14fd49794bda1a3205ce91a | [
"MIT"
] | null | null | null | lib/gremlex/graph.ex | coingaming/gremlex | 8e3c85c2917670faf14fd49794bda1a3205ce91a | [
"MIT"
] | null | null | null | lib/gremlex/graph.ex | coingaming/gremlex | 8e3c85c2917670faf14fd49794bda1a3205ce91a | [
"MIT"
] | 1 | 2020-04-26T23:18:08.000Z | 2020-04-26T23:18:08.000Z | defmodule Gremlex.Graph do
@moduledoc """
Functions for traversing and mutating the Graph.
Graph operations are stored in a queue which can be created with `g/0`.
Mosts functions return the queue so that they can be chained together
similar to how Gremlin queries work.
Example:
```
g.V(1).values("name... | 27.035496 | 96 | 0.626539 |
e973ba0553d1a98efcc61f21ea82611fc3ece537 | 80 | exs | Elixir | config/appsignal.exs | qhwa/bonfire | 4a368d6d5300539399dcaff167ac69e3165c2bff | [
"MIT"
] | 71 | 2020-03-09T02:09:30.000Z | 2022-03-09T06:10:23.000Z | config/appsignal.exs | qhwa/bonfire | 4a368d6d5300539399dcaff167ac69e3165c2bff | [
"MIT"
] | null | null | null | config/appsignal.exs | qhwa/bonfire | 4a368d6d5300539399dcaff167ac69e3165c2bff | [
"MIT"
] | 4 | 2020-04-03T02:28:05.000Z | 2021-11-24T20:07:25.000Z | use Mix.Config
config :appsignal, :config,
name: "bonfire",
env: Mix.env()
| 13.333333 | 27 | 0.6625 |
e973e5ed6beaecde7f0902b88d42709811549b37 | 1,490 | ex | Elixir | lib/flash/kv_store/s3.ex | sickill/flash | 8797cb00b70c94b6f3bdd51e9cb456483f1c5741 | [
"Apache-2.0"
] | 1 | 2021-09-08T16:56:39.000Z | 2021-09-08T16:56:39.000Z | lib/flash/kv_store/s3.ex | sickill/flash | 8797cb00b70c94b6f3bdd51e9cb456483f1c5741 | [
"Apache-2.0"
] | null | null | null | lib/flash/kv_store/s3.ex | sickill/flash | 8797cb00b70c94b6f3bdd51e9cb456483f1c5741 | [
"Apache-2.0"
] | null | null | null | defmodule Flash.KvStore.S3 do
@behaviour Flash.KvStore
alias ExAws.S3
@impl true
def child_spec, do: %{id: __MODULE__, start: {__MODULE__, :start_link, []}}
def start_link, do: :ignore
@impl true
def put(key, value, ttl) do
expires_at =
DateTime.utc_now()
|> DateTime.add(ttl, :second)
... | 20.135135 | 77 | 0.577852 |
e973e84fdbc5d7d3d567bcdc51577f8330fc7d42 | 1,111 | ex | Elixir | server/test/support/channel_case.ex | jeepers3327/prepply | 64b6be3b832fddf429faa31f5f7c1b93b842f821 | [
"MIT"
] | 2 | 2021-03-04T15:21:14.000Z | 2021-03-21T13:43:07.000Z | server/test/support/channel_case.ex | jeepers3327/prepply | 64b6be3b832fddf429faa31f5f7c1b93b842f821 | [
"MIT"
] | null | null | null | server/test/support/channel_case.ex | jeepers3327/prepply | 64b6be3b832fddf429faa31f5f7c1b93b842f821 | [
"MIT"
] | null | null | null | defmodule PrepplyWeb.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 data structures and query the data layer.
Finally, if the test case interacts w... | 27.097561 | 69 | 0.727273 |
e973f6e4899dd156ba496ec9cbba205ede8ce314 | 15,153 | ex | Elixir | lib/myxql/client.ex | greg-rychlewski/myxql | 13f23153474b26d3b3778b0212de3ecc03305049 | [
"Apache-2.0"
] | null | null | null | lib/myxql/client.ex | greg-rychlewski/myxql | 13f23153474b26d3b3778b0212de3ecc03305049 | [
"Apache-2.0"
] | null | null | null | lib/myxql/client.ex | greg-rychlewski/myxql | 13f23153474b26d3b3778b0212de3ecc03305049 | [
"Apache-2.0"
] | null | null | null | defmodule MyXQL.Client do
@moduledoc false
require Logger
import MyXQL.{Protocol, Protocol.Records, Protocol.Types}
alias MyXQL.Protocol.Auth
defstruct [:sock, :connection_id]
defmodule Config do
@moduledoc false
@default_timeout 15_000
defstruct [
:address,
:port,
:userna... | 28.644612 | 101 | 0.632746 |
e9745b6f51eb7c0ed91a9b563ade059aa76b5190 | 1,286 | exs | Elixir | test/tracker_test.exs | liveforeverx/swarm | b1e19f594fb648d99b2a739712546cf2ba038363 | [
"MIT"
] | null | null | null | test/tracker_test.exs | liveforeverx/swarm | b1e19f594fb648d99b2a739712546cf2ba038363 | [
"MIT"
] | null | null | null | test/tracker_test.exs | liveforeverx/swarm | b1e19f594fb648d99b2a739712546cf2ba038363 | [
"MIT"
] | null | null | null | defmodule Swarm.TrackerTests do
use ExUnit.Case, async: false
import Swarm.Entry
alias Swarm.IntervalTreeClock, as: Clock
@moduletag :capture_log
setup_all do
:rand.seed(:exs64)
Application.ensure_all_started(:swarm)
{:ok, _} = MyApp.WorkerSup.start_link()
:ok
end
test "handle_replica_... | 30.619048 | 113 | 0.660964 |
e9745f354736b82964fd010ae00b49cdce4b6535 | 39 | exs | Elixir | .dialyzer_ignore.exs | ericsullivan/adify | 25b842498ccfbf612e42d8b46530aad1ffb1af5a | [
"MIT"
] | 5 | 2019-07-14T22:24:32.000Z | 2020-11-25T20:36:11.000Z | .dialyzer_ignore.exs | ericsullivan/adify | 25b842498ccfbf612e42d8b46530aad1ffb1af5a | [
"MIT"
] | 43 | 2018-01-18T15:16:30.000Z | 2021-01-23T22:12:17.000Z | .dialyzer_ignore.exs | ericsullivan/adify | 25b842498ccfbf612e42d8b46530aad1ffb1af5a | [
"MIT"
] | 2 | 2019-05-28T17:50:27.000Z | 2020-03-23T21:00:02.000Z | # Files to be ignored by dialyzer
[
]
| 7.8 | 33 | 0.666667 |
e9746195e762a5135956debcd3c299e47e3cf39c | 1,827 | ex | Elixir | clients/accelerated_mobile_page_url/lib/google_api/accelerated_mobile_page_url/v1/model/amp_url.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/accelerated_mobile_page_url/lib/google_api/accelerated_mobile_page_url/v1/model/amp_url.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/accelerated_mobile_page_url/lib/google_api/accelerated_mobile_page_url/v1/model/amp_url.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... | 33.833333 | 132 | 0.713191 |
e9747e521b791b260136f7e3807d3eb75962a8fc | 986 | exs | Elixir | frameworks/phoenix_benchmark/config/config.exs | serv/framework-benchmarks | a2a15d112fb56eb7aaa676874853a26c55243817 | [
"MIT"
] | null | null | null | frameworks/phoenix_benchmark/config/config.exs | serv/framework-benchmarks | a2a15d112fb56eb7aaa676874853a26c55243817 | [
"MIT"
] | null | null | null | frameworks/phoenix_benchmark/config/config.exs | serv/framework-benchmarks | a2a15d112fb56eb7aaa676874853a26c55243817 | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
use Mix.Config
# General application configuration
config :phoenix_benchmark,
ecto_repos: [Phoenix... | 35.214286 | 86 | 0.773834 |
e974ba71bd9bc3cac82699d6819e707e51f3abd6 | 19,646 | ex | Elixir | lib/mix/lib/mix/compilers/elixir.ex | irisTa56/elixir | 0a953d75fb2cbdc6f3d33040aa60738d85512a1f | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/compilers/elixir.ex | irisTa56/elixir | 0a953d75fb2cbdc6f3d33040aa60738d85512a1f | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/compilers/elixir.ex | irisTa56/elixir | 0a953d75fb2cbdc6f3d33040aa60738d85512a1f | [
"Apache-2.0"
] | null | null | null | defmodule Mix.Compilers.Elixir do
@moduledoc false
@manifest_vsn 4
import Record
defrecord :module, [:module, :kind, :sources, :struct]
defrecord :source,
source: nil,
size: 0,
compile_references: [],
struct_references: [],
runtime_references: [],
external: [],
warnings: [],
... | 32.688852 | 106 | 0.652092 |
e974e41d148ce737faa4067a75393ec5d9aed0e2 | 247 | exs | Elixir | test/support/ecto/priv/migrations/4_add_access_refresh_token_to_user_identities.exs | mitcheaton1/pow_assent | f3e9e6cc7dd16a3f2d9add885bd160d227abb713 | [
"MIT"
] | 193 | 2019-10-30T00:58:21.000Z | 2022-03-09T20:26:37.000Z | test/support/ecto/priv/migrations/4_add_access_refresh_token_to_user_identities.exs | mitcheaton1/pow_assent | f3e9e6cc7dd16a3f2d9add885bd160d227abb713 | [
"MIT"
] | 82 | 2019-10-29T20:19:38.000Z | 2022-03-22T04:09:27.000Z | test/support/ecto/priv/migrations/4_add_access_refresh_token_to_user_identities.exs | mitcheaton1/pow_assent | f3e9e6cc7dd16a3f2d9add885bd160d227abb713 | [
"MIT"
] | 28 | 2019-10-31T12:38:10.000Z | 2021-11-01T18:05:23.000Z | defmodule PowAssent.Test.Ecto.Repo.Migrations.AddAccessRefreshTokenToUserIdentities do
use Ecto.Migration
def change do
alter table(:user_identities) do
add :access_token, :string
add :refresh_token, :string
end
end
end
| 22.454545 | 86 | 0.748988 |
e97501de03ad81b4ce5100c1dd98b2579f0a8d04 | 1,820 | ex | Elixir | clients/composer/lib/google_api/composer/v1beta1/model/list_operations_response.ex | nuxlli/elixir-google-api | ecb8679ac7282b7dd314c3e20c250710ec6a7870 | [
"Apache-2.0"
] | null | null | null | clients/composer/lib/google_api/composer/v1beta1/model/list_operations_response.ex | nuxlli/elixir-google-api | ecb8679ac7282b7dd314c3e20c250710ec6a7870 | [
"Apache-2.0"
] | null | null | null | clients/composer/lib/google_api/composer/v1beta1/model/list_operations_response.ex | nuxlli/elixir-google-api | ecb8679ac7282b7dd314c3e20c250710ec6a7870 | [
"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... | 35.686275 | 121 | 0.752198 |
e975064e13a5eaa559c7a5c038d998e1289a7292 | 5,609 | ex | Elixir | lib/pigeon/fcm.ex | c0deaddict/pigeon | 842c7632a0318a153b933e727c1ebc3c029ace5c | [
"MIT"
] | null | null | null | lib/pigeon/fcm.ex | c0deaddict/pigeon | 842c7632a0318a153b933e727c1ebc3c029ace5c | [
"MIT"
] | null | null | null | lib/pigeon/fcm.ex | c0deaddict/pigeon | 842c7632a0318a153b933e727c1ebc3c029ace5c | [
"MIT"
] | null | null | null | defmodule Pigeon.FCM do
@moduledoc """
Firebase Cloud Messaging (FCM)
"""
require Logger
import Supervisor.Spec
alias Pigeon.FCM.{Config, Notification}
alias Pigeon.Worker
@typedoc ~S"""
Can be either a single notification or a list.
"""
@type notification :: Notification.t() | [Notification.t(... | 28.472081 | 82 | 0.624175 |
e97512c38d9cc2ed6a18aba68fb844735805ca34 | 998 | exs | Elixir | app/config/config.exs | finalclass/ubg5 | 237c51f4a54668cc8164382a3895d9dcf07ae6e0 | [
"MIT"
] | null | null | null | app/config/config.exs | finalclass/ubg5 | 237c51f4a54668cc8164382a3895d9dcf07ae6e0 | [
"MIT"
] | 2 | 2021-03-09T13:44:12.000Z | 2021-05-10T05:02:52.000Z | app/config/config.exs | finalclass/ubg5 | 237c51f4a54668cc8164382a3895d9dcf07ae6e0 | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
# General application configuration
use Mix.Config
# Configures the endpoint
config :ubg5, Ubg5Web.... | 34.413793 | 86 | 0.768537 |
e97533b1c3a76db8b5fa9af8ee377bbb27e9353b | 561 | exs | Elixir | priv/repo/migrations/20210501143223_create_collect_folder.exs | coderplanets/coderplanets_server | 3663e56340d6d050e974c91f7e499d8424fc25e9 | [
"Apache-2.0"
] | 240 | 2018-11-06T09:36:54.000Z | 2022-02-20T07:12:36.000Z | priv/repo/migrations/20210501143223_create_collect_folder.exs | coderplanets/coderplanets_server | 3663e56340d6d050e974c91f7e499d8424fc25e9 | [
"Apache-2.0"
] | 363 | 2018-07-11T03:38:14.000Z | 2021-12-14T01:42:40.000Z | priv/repo/migrations/20210501143223_create_collect_folder.exs | mydearxym/mastani_server | f24034a4a5449200165cf4a547964a0961793eab | [
"Apache-2.0"
] | 22 | 2019-01-27T11:47:56.000Z | 2021-02-28T13:17:52.000Z | defmodule GroupherServer.Repo.Migrations.CreateCollectFolder do
use Ecto.Migration
def change do
create table(:collect_folders) do
add(:user_id, references(:users, on_delete: :delete_all, null: false))
add(:title, :string)
add(:desc, :string)
add(:total_count, :integer, default: 0)
... | 24.391304 | 76 | 0.661319 |
e97548517354fe7a1393e96b295119ea7a75578e | 2,146 | ex | Elixir | clients/dfa_reporting/lib/google_api/dfa_reporting/v34/model/placement_strategy.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/dfa_reporting/lib/google_api/dfa_reporting/v34/model/placement_strategy.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/dfa_reporting/lib/google_api/dfa_reporting/v34/model/placement_strategy.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... | 38.321429 | 212 | 0.714818 |
e9756f3aba2138243152f6d90dfdc7cb2d30158f | 1,446 | ex | Elixir | lib/game/session/help.ex | stevegrossi/ex_venture | e02d5a63fdb882d92cfb4af3e15f7b48ad7054aa | [
"MIT"
] | 2 | 2019-05-14T11:36:44.000Z | 2020-07-01T08:54:04.000Z | lib/game/session/help.ex | nickwalton/ex_venture | d8ff1b0181db03f9ddcb7610ae7ab533feecbfbb | [
"MIT"
] | null | null | null | lib/game/session/help.ex | nickwalton/ex_venture | d8ff1b0181db03f9ddcb7610ae7ab533feecbfbb | [
"MIT"
] | 1 | 2021-01-29T14:12:40.000Z | 2021-01-29T14:12:40.000Z | defmodule Game.Session.Help do
@moduledoc """
Help for sessions, primarily printing out help when idling
"""
alias Game.Hint
@idle_hint_seconds 15
@doc """
Called to init the state for idle hints
"""
def init_idle(time) do
%{last_hint: time}
end
@doc """
Maybe display a hint when a user ... | 23.704918 | 90 | 0.65491 |
e975772d76027ac6d95df681c3ef9ed434c8a9c4 | 14,744 | ex | Elixir | lib/plug/csrf_protection.ex | bruteforcecat/plug | 45165d978e59d18df8b8085e4e158997dcac19a3 | [
"Apache-2.0"
] | null | null | null | lib/plug/csrf_protection.ex | bruteforcecat/plug | 45165d978e59d18df8b8085e4e158997dcac19a3 | [
"Apache-2.0"
] | null | null | null | lib/plug/csrf_protection.ex | bruteforcecat/plug | 45165d978e59d18df8b8085e4e158997dcac19a3 | [
"Apache-2.0"
] | null | null | null | defmodule Plug.CSRFProtection do
@moduledoc """
Plug to protect from cross-site request forgery.
For this plug to work, it expects a session to have been
previously fetched. It will then compare the token stored
in the session with the one sent by the request to determine
the validity of the request. For a... | 33.132584 | 98 | 0.702794 |
e9757c4a095fd4637c23c9e139c63818e747580e | 320 | ex | Elixir | lib/origin_simulator/plug/response_counter.ex | bbc/origin_simulator | 0e06c04043fe84a3e02836581829d5dd11095433 | [
"MIT"
] | 11 | 2019-02-03T21:46:28.000Z | 2020-02-03T21:05:21.000Z | lib/origin_simulator/plug/response_counter.ex | bbc/origin_simulator | 0e06c04043fe84a3e02836581829d5dd11095433 | [
"MIT"
] | 10 | 2019-06-07T15:54:43.000Z | 2021-04-19T08:00:24.000Z | lib/origin_simulator/plug/response_counter.ex | bbc/origin_simulator | 0e06c04043fe84a3e02836581829d5dd11095433 | [
"MIT"
] | 5 | 2019-07-25T17:48:04.000Z | 2021-02-23T16:43:21.000Z | defmodule OriginSimulator.Plug.ResponseCounter do
@behaviour Plug
import Plug.Conn, only: [register_before_send: 2]
def init(opts), do: opts
def call(conn, _opts) do
register_before_send(conn, fn conn ->
OriginSimulator.Counter.increment(conn.request_path, conn.status)
conn
end)
end
end
| 22.857143 | 71 | 0.725 |
e9757eac57dd1a0df32a379ada9e56e2008e8faa | 960 | ex | Elixir | lib/oli/activities/transformers.ex | chrislawson/oli-torus | 94165b211ab74fac3e7c8a14110a394fa9a6f320 | [
"MIT"
] | 45 | 2020-04-17T15:40:27.000Z | 2022-03-25T00:13:30.000Z | lib/oli/activities/transformers.ex | chrislawson/oli-torus | 94165b211ab74fac3e7c8a14110a394fa9a6f320 | [
"MIT"
] | 944 | 2020-02-13T02:37:01.000Z | 2022-03-31T17:50:07.000Z | lib/oli/activities/transformers.ex | chrislawson/oli-torus | 94165b211ab74fac3e7c8a14110a394fa9a6f320 | [
"MIT"
] | 23 | 2020-07-28T03:36:13.000Z | 2022-03-17T14:29:02.000Z | defmodule Oli.Activities.Transformers do
alias Oli.Activities.Model
alias Oli.Activities.Model.Transformation
alias Oli.Activities.Transformers.Shuffle
@doc """
Transforms an unparsed activity model.
"""
@spec apply_transforms(map()) :: {:ok, map()} | {:error, any}
def apply_transforms(model) do
ca... | 29.090909 | 91 | 0.648958 |
e9758448ffd8f6d8798253535e034d2e68361b9d | 174 | exs | Elixir | priv/repo/migrations/20210607042800_missing_timestamp_to_blogs.exs | coderplanets/coderplanets_server | 3663e56340d6d050e974c91f7e499d8424fc25e9 | [
"Apache-2.0"
] | 240 | 2018-11-06T09:36:54.000Z | 2022-02-20T07:12:36.000Z | priv/repo/migrations/20210607042800_missing_timestamp_to_blogs.exs | coderplanets/coderplanets_server | 3663e56340d6d050e974c91f7e499d8424fc25e9 | [
"Apache-2.0"
] | 363 | 2018-07-11T03:38:14.000Z | 2021-12-14T01:42:40.000Z | priv/repo/migrations/20210607042800_missing_timestamp_to_blogs.exs | mydearxym/mastani_server | f24034a4a5449200165cf4a547964a0961793eab | [
"Apache-2.0"
] | 22 | 2019-01-27T11:47:56.000Z | 2021-02-28T13:17:52.000Z | defmodule GroupherServer.Repo.Migrations.MissingTimestampToBlogs do
use Ecto.Migration
def change do
alter table(:cms_blogs) do
timestamps()
end
end
end
| 17.4 | 67 | 0.741379 |
e9759eee6fcb7a7a7b84b8a974b12f19c5685694 | 2,326 | ex | Elixir | clients/content/lib/google_api/content/v2/model/product_status_data_quality_issue.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/model/product_status_data_quality_issue.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/content/lib/google_api/content/v2/model/product_status_data_quality_issue.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 32.760563 | 88 | 0.653912 |
e97607a4f98d4b344a2fa578f7dd009891d65cf2 | 3,749 | exs | Elixir | test/farmbot/system/updates/updates_test.exs | pdgonzalez872/farmbot_os | a444248f05ee8f4fe57f6a4865b942131960f76c | [
"MIT"
] | 2 | 2018-08-01T23:07:52.000Z | 2018-10-17T12:49:21.000Z | test/farmbot/system/updates/updates_test.exs | pdgonzalez872/farmbot_os | a444248f05ee8f4fe57f6a4865b942131960f76c | [
"MIT"
] | null | null | null | test/farmbot/system/updates/updates_test.exs | pdgonzalez872/farmbot_os | a444248f05ee8f4fe57f6a4865b942131960f76c | [
"MIT"
] | 1 | 2017-07-22T21:51:14.000Z | 2017-07-22T21:51:14.000Z | defmodule Farmbot.System.UpdatesTest do
use ExUnit.Case, async: false
alias Farmbot.System.Updates
alias Farmbot.System.Updates.{Release, CurrentStuff}
@old_version Farmbot.Project.version |> Version.parse! |> Map.update(:major, nil, &Kernel.-(&1, 1)) |> to_string()
@new_version Farmbot.Project.version |> Ver... | 34.394495 | 133 | 0.696986 |
e976298ad971eda044ed5db3c88d15370290f6a6 | 1,291 | ex | Elixir | lib/rocketseat_nlw_heat_impulse_elixir/application.ex | jobsonita/rocketseat_nlw_heat_impulse_elixir | 13b5dc0fe2137c1acbc42afee1d40c43e7f9883f | [
"MIT"
] | null | null | null | lib/rocketseat_nlw_heat_impulse_elixir/application.ex | jobsonita/rocketseat_nlw_heat_impulse_elixir | 13b5dc0fe2137c1acbc42afee1d40c43e7f9883f | [
"MIT"
] | null | null | null | lib/rocketseat_nlw_heat_impulse_elixir/application.ex | jobsonita/rocketseat_nlw_heat_impulse_elixir | 13b5dc0fe2137c1acbc42afee1d40c43e7f9883f | [
"MIT"
] | null | null | null | defmodule RocketseatNlwHeatImpulseElixir.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
@impl true
def start(_type, _args) do
children = [
# Start the Ecto repository
RocketseatNlwHeatImpulseElixir... | 33.973684 | 88 | 0.75213 |
e976748913e385a646aa86b7f44dcfcfaf1415b0 | 13,257 | exs | Elixir | test/http_date_test.exs | ScrimpyCat/HTTPDate | ec579103ea149dda9719b8c792c0eac5e70e9700 | [
"BSD-2-Clause"
] | null | null | null | test/http_date_test.exs | ScrimpyCat/HTTPDate | ec579103ea149dda9719b8c792c0eac5e70e9700 | [
"BSD-2-Clause"
] | 1 | 2021-08-28T10:21:14.000Z | 2021-08-28T10:21:14.000Z | test/http_date_test.exs | ScrimpyCat/HTTPDate | ec579103ea149dda9719b8c792c0eac5e70e9700 | [
"BSD-2-Clause"
] | null | null | null | defmodule HTTPDateTest do
use ExUnit.Case
doctest HTTPDate
describe "parsing" do
test "IMF-fixdate" do
assert { :ok, elem(DateTime.from_iso8601("2020-02-02 04:16:37Z"), 1) } == HTTPDate.parse("Sun, 02 Feb 2020 04:16:37 GMT")
assert { :error, { :imf_fixdate, :day } } == HTTPD... | 64.043478 | 168 | 0.535642 |
e976757a1c1b206ebec8fb59eeffe5cccbe752fc | 599 | ex | Elixir | apps/snitch_api/lib/snitch_api_web/controllers/promotion_controller.ex | Acrecio/avia | 54d264fc179b5b5f17d174854bdca063e1d935e9 | [
"MIT"
] | 456 | 2018-09-20T02:40:59.000Z | 2022-03-07T08:53:48.000Z | apps/snitch_api/lib/snitch_api_web/controllers/promotion_controller.ex | Acrecio/avia | 54d264fc179b5b5f17d174854bdca063e1d935e9 | [
"MIT"
] | 273 | 2018-09-19T06:43:43.000Z | 2021-08-07T12:58:26.000Z | apps/snitch_api/lib/snitch_api_web/controllers/promotion_controller.ex | Acrecio/avia | 54d264fc179b5b5f17d174854bdca063e1d935e9 | [
"MIT"
] | 122 | 2018-09-26T16:32:46.000Z | 2022-03-13T11:44:19.000Z | defmodule SnitchApiWeb.PromotionController do
use SnitchApiWeb, :controller
alias Snitch.Data.Model.Order
alias Snitch.Data.Schema.Order, as: OrderSchema
alias Snitch.Data.Model.Promotion
def apply(conn, %{"order_number" => order_number, "promo_code" => promo_code}) do
with {:ok, %OrderSchema{} = order}... | 33.277778 | 83 | 0.676127 |
e976761cb71f117f26601d9823a1c73be81eb6c3 | 4,392 | exs | Elixir | test/pow/ecto/schema_test.exs | patrickbiermann/pow | ebc2ac7d6e15961dac4be38091ff75dae0d26554 | [
"MIT"
] | 1 | 2021-05-27T21:33:29.000Z | 2021-05-27T21:33:29.000Z | test/pow/ecto/schema_test.exs | patrickbiermann/pow | ebc2ac7d6e15961dac4be38091ff75dae0d26554 | [
"MIT"
] | null | null | null | test/pow/ecto/schema_test.exs | patrickbiermann/pow | ebc2ac7d6e15961dac4be38091ff75dae0d26554 | [
"MIT"
] | null | null | null | defmodule Pow.Ecto.SchemaTest do
use ExUnit.Case
doctest Pow.Ecto.Schema
alias Pow.Test.Ecto.Users.{User, UsernameUser}
test "schema/2" do
user = %User{}
assert Map.has_key?(user, :email)
assert Map.has_key?(user, :current_password)
refute Map.has_key?(user, :username)
user = %UsernameUs... | 25.835294 | 105 | 0.646175 |
e9767a7dba7c8dcd4de3ba59b038fc8400d9f605 | 1,025 | ex | Elixir | lib/email_service/domain_objects/email/binding/substitution/legacy/effective.ex | noizu-labs/KitchenSinkAdvanced | 6d91b5dd4f59cd9838f87a64605a0ef87f4301c8 | [
"MIT"
] | null | null | null | lib/email_service/domain_objects/email/binding/substitution/legacy/effective.ex | noizu-labs/KitchenSinkAdvanced | 6d91b5dd4f59cd9838f87a64605a0ef87f4301c8 | [
"MIT"
] | null | null | null | lib/email_service/domain_objects/email/binding/substitution/legacy/effective.ex | noizu-labs/KitchenSinkAdvanced | 6d91b5dd4f59cd9838f87a64605a0ef87f4301c8 | [
"MIT"
] | null | null | null | #-------------------------------------------------------------------------------
# Author: Keith Brings
# Copyright (C) 2020 Noizu Labs, Inc. All rights reserved.
#-------------------------------------------------------------------------------
defmodule Noizu.EmailService.V3.Email.Binding.Substitution.Legacy.Effe... | 31.060606 | 81 | 0.474146 |
e976a1ffb5b58e56d9d2555c8474ab5cfa462aa8 | 992 | ex | Elixir | apps/engine/lib/engine/db/transaction_fee.ex | omgnetwork/omg-childchain-v2 | 31cc9cf9e42718fc3b9bd6668f24a627cac80b4f | [
"Apache-2.0"
] | 4 | 2020-11-30T17:38:57.000Z | 2021-01-23T21:29:41.000Z | apps/engine/lib/engine/db/transaction_fee.ex | omgnetwork/omg-childchain-v2 | 31cc9cf9e42718fc3b9bd6668f24a627cac80b4f | [
"Apache-2.0"
] | 24 | 2020-11-30T17:32:48.000Z | 2021-02-22T06:25:22.000Z | apps/engine/lib/engine/db/transaction_fee.ex | omgnetwork/omg-childchain-v2 | 31cc9cf9e42718fc3b9bd6668f24a627cac80b4f | [
"Apache-2.0"
] | null | null | null | defmodule Engine.DB.TransactionFee do
@moduledoc """
Represents fees collected for a transaction.
Fields:
transaction_id - foreign key to the transaction which created the fees
currency - currency of the fees
amount - amount paid
"""
use Ecto.Schema
import Ecto.Changeset
alias Engine.DB.Transac... | 21.106383 | 72 | 0.664315 |
e976b93c41893f0f801681418cf5b06bce5791e5 | 2,173 | exs | Elixir | test/support/apps/example/config/prod.exs | mitchellhenke/torch | 2d0ab68f4e2d7f3bc37fbf7edbd1298b29b36e71 | [
"MIT"
] | 528 | 2019-09-13T15:10:36.000Z | 2022-03-31T10:28:27.000Z | test/support/apps/example/config/prod.exs | mitchellhenke/torch | 2d0ab68f4e2d7f3bc37fbf7edbd1298b29b36e71 | [
"MIT"
] | 133 | 2019-09-13T17:46:59.000Z | 2022-03-01T13:37:10.000Z | test/support/apps/example/config/prod.exs | mitchellhenke/torch | 2d0ab68f4e2d7f3bc37fbf7edbd1298b29b36e71 | [
"MIT"
] | 38 | 2019-10-29T20:37:13.000Z | 2022-03-03T05:19:33.000Z | use Mix.Config
# For production, we often load configuration from external
# sources, such as your system environment. For this reason,
# you won't find the :http configuration below, but set inside
# ExampleWeb.Endpoint.init/2 when load_from_system_env is
# true. Any dynamic configuration should be done there.
#
# Do... | 33.430769 | 67 | 0.721583 |
e976fae0aa22e139da8b2e421c8a4e8f4c9f9be0 | 255 | ex | Elixir | lib/uboot_env/location.ex | ConnorRigby/fwup_uboot_env | 8ca09c53df624af9447eacc47c966e9ebc29261e | [
"Apache-2.0"
] | 3 | 2018-12-19T18:46:25.000Z | 2022-03-29T15:19:45.000Z | lib/uboot_env/location.ex | ConnorRigby/uboot_env | 8ca09c53df624af9447eacc47c966e9ebc29261e | [
"Apache-2.0"
] | 12 | 2019-01-29T14:14:28.000Z | 2022-02-09T10:29:09.000Z | lib/uboot_env/location.ex | ConnorRigby/uboot_env | 8ca09c53df624af9447eacc47c966e9ebc29261e | [
"Apache-2.0"
] | 2 | 2019-02-07T18:06:17.000Z | 2019-04-08T07:29:52.000Z | defmodule UBootEnv.Location do
@moduledoc """
Environment block location
"""
defstruct [:path, :offset, :size]
@type t() :: %__MODULE__{
path: Path.t(),
offset: non_neg_integer(),
size: pos_integer()
}
end
| 19.615385 | 36 | 0.572549 |
e9770e19ce241fd566aff7e355948a1510d29cb9 | 1,659 | ex | Elixir | apps/firestorm_web/lib/firestorm_web/web/controllers/auth_controller.ex | CircleCI-Public/firestorm | 9ca2c46a2b2377370347ad94d6003eeb77be38d6 | [
"MIT"
] | 10 | 2017-06-28T08:06:52.000Z | 2022-03-19T17:49:21.000Z | apps/firestorm_web/lib/firestorm_web/web/controllers/auth_controller.ex | CircleCI-Public/firestorm | 9ca2c46a2b2377370347ad94d6003eeb77be38d6 | [
"MIT"
] | null | null | null | apps/firestorm_web/lib/firestorm_web/web/controllers/auth_controller.ex | CircleCI-Public/firestorm | 9ca2c46a2b2377370347ad94d6003eeb77be38d6 | [
"MIT"
] | 2 | 2017-10-21T12:01:02.000Z | 2021-01-29T10:26:22.000Z | defmodule FirestormWeb.Web.AuthController do
use FirestormWeb.Web, :controller
plug Ueberauth
alias FirestormData.Commands.LoginOrRegisterFromGitHub
def delete(conn, _params) do
conn
|> put_flash(:info, "You have been logged out!")
|> configure_session(drop: true)
|> redirect(to: "/")
end
... | 31.301887 | 164 | 0.612417 |
e977236f6fc6fe181b980e43d38a452fae4ca1da | 930 | ex | Elixir | lib/commanded/event_store/adapters/in_memory/subscription.ex | edwardzhou/commanded | f104cbf5ff3a37a6e9b637bc07ccde1d79c0725d | [
"MIT"
] | 1,220 | 2017-10-31T10:56:40.000Z | 2022-03-31T17:40:19.000Z | lib/commanded/event_store/adapters/in_memory/subscription.ex | edwardzhou/commanded | f104cbf5ff3a37a6e9b637bc07ccde1d79c0725d | [
"MIT"
] | 294 | 2017-11-03T10:33:41.000Z | 2022-03-24T08:36:42.000Z | lib/commanded/event_store/adapters/in_memory/subscription.ex | edwardzhou/commanded | f104cbf5ff3a37a6e9b637bc07ccde1d79c0725d | [
"MIT"
] | 208 | 2017-11-03T10:56:47.000Z | 2022-03-14T05:49:38.000Z | defmodule Commanded.EventStore.Adapters.InMemory.Subscription do
@moduledoc false
use GenServer
alias Commanded.EventStore.Adapters.InMemory.Subscription
defstruct [:stream_uuid, :name, :subscriber, :ref, :start_from, last_seen: 0]
def start_link(%Subscription{} = state) do
GenServer.start_link(__MODU... | 23.846154 | 84 | 0.702151 |
e9774f51425bcbf6c21598fe59ee3f74f25f5e07 | 627 | exs | Elixir | mix.exs | storedash-project/auth0-plug | e8e0375421d01a6c76f3037d0c431a46d757bc0e | [
"MIT"
] | null | null | null | mix.exs | storedash-project/auth0-plug | e8e0375421d01a6c76f3037d0c431a46d757bc0e | [
"MIT"
] | 1 | 2022-01-13T13:07:03.000Z | 2022-01-13T13:07:03.000Z | mix.exs | storedash-project/auth0-plug | e8e0375421d01a6c76f3037d0c431a46d757bc0e | [
"MIT"
] | null | null | null | defmodule Auth0Plug.MixProject do
use Mix.Project
def project do
[
app: :auth0_plug,
version: "1.0.0",
elixir: "~> 1.12",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
ext... | 19.59375 | 61 | 0.5311 |
e9775683660f2b196c2f463372f4168c5e549fe9 | 1,098 | ex | Elixir | test/support/conn_case.ex | enlore/setback-jack | 7ee603eb991b80923258210e28f97ff1110ddeae | [
"MIT"
] | 14 | 2017-07-16T02:59:33.000Z | 2018-04-28T19:06:11.000Z | test/support/conn_case.ex | code-for-nashville/setback-615 | 7ee603eb991b80923258210e28f97ff1110ddeae | [
"MIT"
] | 47 | 2017-07-16T20:18:37.000Z | 2018-04-17T02:54:26.000Z | test/support/conn_case.ex | code-for-nashville/nashville-zone-lookup | 7ee603eb991b80923258210e28f97ff1110ddeae | [
"MIT"
] | 3 | 2018-05-01T23:52:30.000Z | 2018-08-14T09:50:31.000Z | defmodule NashvilleZoneLookupWeb.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.
Fin... | 28.153846 | 81 | 0.734973 |
e9777ce3def91910a37cdb64e9bd728b8b9ff99f | 921 | ex | Elixir | lib/phantomchain/crypto/transactions/serialisers/vote.ex | PhantomChain/elixir-crypto | d842920d91a9bcbe997736b487f4e74ba0bf2fe3 | [
"MIT"
] | null | null | null | lib/phantomchain/crypto/transactions/serialisers/vote.ex | PhantomChain/elixir-crypto | d842920d91a9bcbe997736b487f4e74ba0bf2fe3 | [
"MIT"
] | null | null | null | lib/phantomchain/crypto/transactions/serialisers/vote.ex | PhantomChain/elixir-crypto | d842920d91a9bcbe997736b487f4e74ba0bf2fe3 | [
"MIT"
] | null | null | null | defmodule PhantomChain.Crypto.Transactions.Serializers.Vote do
def serialize(bytes, transaction) do
votes = serialize_votes(transaction.asset.votes, [])
votecount = length(votes)
bytes <>
<<votecount::little-unsigned-integer-size(8)>> <>
(Enum.join(votes) |> Base.decode16!(case: :lower))
en... | 25.583333 | 74 | 0.625407 |
e977a40f7864e97eb9e73be015c51c330e0d513e | 4,294 | exs | Elixir | test/mint/web_socket_test.exs | NFIBrokerage/mint_web_socket | 8eac1b94c4163a03e6289498729a215ad27cddc8 | [
"Apache-2.0"
] | 23 | 2021-07-01T22:12:26.000Z | 2022-03-25T14:36:23.000Z | test/mint/web_socket_test.exs | NFIBrokerage/mint_web_socket | 8eac1b94c4163a03e6289498729a215ad27cddc8 | [
"Apache-2.0"
] | 11 | 2021-05-11T13:46:11.000Z | 2022-03-31T10:13:33.000Z | test/mint/web_socket_test.exs | NFIBrokerage/mint_web_socket | 8eac1b94c4163a03e6289498729a215ad27cddc8 | [
"Apache-2.0"
] | 2 | 2022-02-24T13:58:45.000Z | 2022-03-23T15:25:36.000Z | defmodule Mint.WebSocketTest do
use ExUnit.Case, async: true
describe "given an HTTP/1 connection to an echo server" do
setup do
host = System.get_env("ECHO_HOST") || "localhost"
{:ok, conn} = Mint.HTTP.connect(:http, host, 9000)
[conn: conn]
end
test "we can send and hello-world fr... | 38.684685 | 96 | 0.633675 |
e977b69680e0e0fe205e587f359c68ce94ad6497 | 1,248 | ex | Elixir | template/$PROJECT_NAME$/lib/$PROJECT_NAME$/web/channels/user_socket.ex | cas27/gen_template_phoenix_webpack | 53f92ea9f1eeca1874234b8bcd38f20f7aedbcbd | [
"MIT"
] | 3 | 2017-06-08T16:53:07.000Z | 2018-05-25T19:37:23.000Z | template/$PROJECT_NAME$/lib/$PROJECT_NAME$/web/channels/user_socket.ex | cas27/gen_template_phoenix_webpack | 53f92ea9f1eeca1874234b8bcd38f20f7aedbcbd | [
"MIT"
] | null | null | null | template/$PROJECT_NAME$/lib/$PROJECT_NAME$/web/channels/user_socket.ex | cas27/gen_template_phoenix_webpack | 53f92ea9f1eeca1874234b8bcd38f20f7aedbcbd | [
"MIT"
] | null | null | null | defmodule <%= @project_name_camel_case %>.Web.UserSocket do
use Phoenix.Socket
## Channels
# channel "room:*", <%= @project_name_camel_case %>.Web.RoomChannel
## Transports
transport :websocket, Phoenix.Transports.WebSocket
# transport :longpoll, Phoenix.Transports.LongPoll
# Socket params are passed f... | 32.842105 | 107 | 0.699519 |
e977d1c6f17a73b47c4861092ae05d7ba02ed297 | 2,836 | ex | Elixir | clients/slides/lib/google_api/slides/v1/model/update_table_column_properties_request.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/slides/lib/google_api/slides/v1/model/update_table_column_properties_request.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/slides/lib/google_api/slides/v1/model/update_table_column_properties_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 ... | 41.101449 | 150 | 0.722496 |
e977d918a420ef9b4877a6bf49dedd5cd039648b | 319 | ex | Elixir | lib/social/publishing/publish_message_request.ex | PaoloLaurenti/social-networking-kata | ade6139e2d41f1446e5fa23172395db56cfa4d33 | [
"MIT"
] | null | null | null | lib/social/publishing/publish_message_request.ex | PaoloLaurenti/social-networking-kata | ade6139e2d41f1446e5fa23172395db56cfa4d33 | [
"MIT"
] | null | null | null | lib/social/publishing/publish_message_request.ex | PaoloLaurenti/social-networking-kata | ade6139e2d41f1446e5fa23172395db56cfa4d33 | [
"MIT"
] | null | null | null | defmodule SocialNetworkingKata.Social.Publishing.PublishMessageRequest do
@moduledoc """
A struct representing the request to publish a message into an user timeline.
"""
use Domo
@typedoc "A publish message request"
typedstruct do
field :username, String.t()
field :message, String.t()
end
end
| 22.785714 | 79 | 0.736677 |
e977e5b5030203d6897fd1906b9d5fec546a14b4 | 976 | ex | Elixir | web/models/account.ex | lexa62/hb | c6b2169ad3e5af546da3f7ad0d499f5d5d29d044 | [
"MIT"
] | null | null | null | web/models/account.ex | lexa62/hb | c6b2169ad3e5af546da3f7ad0d499f5d5d29d044 | [
"MIT"
] | null | null | null | web/models/account.ex | lexa62/hb | c6b2169ad3e5af546da3f7ad0d499f5d5d29d044 | [
"MIT"
] | null | null | null | defmodule Hb.Account do
use Hb.Web, :model
alias Hb.{CurrencyBalance, Accounting, Transaction}
@derive {Poison.Encoder, only: [:id, :name, :is_default, :currency_balances]}
schema "accounts" do
field :name, :string
field :is_default, :boolean, default: false
has_many :currency_balances, Currency... | 28.705882 | 102 | 0.71209 |
e977f4ca87ac84a9ba4ef42caea1efa3db093109 | 2,077 | ex | Elixir | clients/document_ai/lib/google_api/document_ai/v1beta3/model/google_cloud_documentai_v1beta2_document_page_anchor.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/document_ai/lib/google_api/document_ai/v1beta3/model/google_cloud_documentai_v1beta2_document_page_anchor.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/document_ai/lib/google_api/document_ai/v1beta3/model/google_cloud_documentai_v1beta2_document_page_anchor.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 35.810345 | 195 | 0.761675 |
e978284f732d30a5a2393eb04511b6d939543b96 | 110 | exs | Elixir | test/test_helper.exs | tap349/ecto_cqs | fa7d89ffb6be8cac3be69db1e17f7ec9b75af759 | [
"MIT"
] | 3 | 2019-02-05T07:00:01.000Z | 2019-02-07T11:59:28.000Z | test/test_helper.exs | tap349/ecto_cqrs | fa7d89ffb6be8cac3be69db1e17f7ec9b75af759 | [
"MIT"
] | null | null | null | test/test_helper.exs | tap349/ecto_cqrs | fa7d89ffb6be8cac3be69db1e17f7ec9b75af759 | [
"MIT"
] | null | null | null | {:ok, _pid} = EctoCQS.Repo.start_link()
ExUnit.start()
Ecto.Adapters.SQL.Sandbox.mode(EctoCQS.Repo, :manual)
| 22 | 53 | 0.736364 |
e9784fa9def859d1d64ce36b349870f8a9432bd3 | 103 | ex | Elixir | web/views/admin/dashboard_view.ex | ramkrishna70/opencov | 7a3415f8eebb797ad1f7b6c832daa4f04d70af8d | [
"MIT"
] | 189 | 2018-09-25T09:02:41.000Z | 2022-03-09T13:52:06.000Z | web/views/admin/dashboard_view.ex | ramkrishna70/opencov | 7a3415f8eebb797ad1f7b6c832daa4f04d70af8d | [
"MIT"
] | 29 | 2018-09-26T05:51:18.000Z | 2021-11-05T08:55:03.000Z | web/views/admin/dashboard_view.ex | ramkrishna70/opencov | 7a3415f8eebb797ad1f7b6c832daa4f04d70af8d | [
"MIT"
] | 32 | 2018-10-21T12:28:11.000Z | 2022-03-28T02:20:19.000Z | defmodule Opencov.Admin.DashboardView do
use Opencov.Web, :view
alias Opencov.Helpers.Display
end
| 17.166667 | 40 | 0.796117 |
e97855dfc5fb7864bcaaa9719f5fc86d79b1ba2a | 1,143 | exs | Elixir | start_point/config/config.exs | cyber-dojo-start-points/elixir-exunit | ebc7a55024105e368b700aa212bfd668f6011665 | [
"BSD-2-Clause"
] | null | null | null | start_point/config/config.exs | cyber-dojo-start-points/elixir-exunit | ebc7a55024105e368b700aa212bfd668f6011665 | [
"BSD-2-Clause"
] | null | null | null | start_point/config/config.exs | cyber-dojo-start-points/elixir-exunit | ebc7a55024105e368b700aa212bfd668f6011665 | [
"BSD-2-Clause"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
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... | 36.870968 | 74 | 0.730534 |
e978579f7990d8c62b12c44dbdd19f7cd96aecc1 | 422 | ex | Elixir | lib/rocketpay/numbers.ex | henrique-tavares/rocketpay | 0c37071cd3e63dd51cae16d773522eb6a5de84d4 | [
"MIT"
] | null | null | null | lib/rocketpay/numbers.ex | henrique-tavares/rocketpay | 0c37071cd3e63dd51cae16d773522eb6a5de84d4 | [
"MIT"
] | null | null | null | lib/rocketpay/numbers.ex | henrique-tavares/rocketpay | 0c37071cd3e63dd51cae16d773522eb6a5de84d4 | [
"MIT"
] | null | null | null | defmodule Rocketpay.Numbers do
def sum_from_file(filename) do
"#{filename}.csv"
|> File.read()
|> handle_file()
end
defp handle_file({:ok, result}) do
result =
result
|> String.split(",")
|> Stream.map(fn num -> String.to_integer(num) end)
|> Enum.sum()
{:ok, %{result... | 21.1 | 79 | 0.590047 |
e9785af62f4227459112a7f890af3006da73027b | 65 | ex | Elixir | lib/crius_chat_web/views/page_view.ex | AmadorZcv/crius_chat | 2ed002414f207536a0d2ab6e53e7d99da9fa920d | [
"MIT"
] | null | null | null | lib/crius_chat_web/views/page_view.ex | AmadorZcv/crius_chat | 2ed002414f207536a0d2ab6e53e7d99da9fa920d | [
"MIT"
] | 3 | 2021-03-09T17:37:23.000Z | 2021-09-01T22:28:38.000Z | lib/crius_chat_web/views/page_view.ex | AmadorZcv/crius_chat | 2ed002414f207536a0d2ab6e53e7d99da9fa920d | [
"MIT"
] | null | null | null | defmodule CriusChatWeb.PageView do
use CriusChatWeb, :view
end
| 16.25 | 34 | 0.815385 |
e97876b04c2fc7a2c610680448edcee21b6caeef | 1,053 | ex | Elixir | elixir/lib/homework/application.ex | TreywRoberts/web-homework | d19b17dd384341d9e6e7e3174372673584289b83 | [
"MIT"
] | null | null | null | elixir/lib/homework/application.ex | TreywRoberts/web-homework | d19b17dd384341d9e6e7e3174372673584289b83 | [
"MIT"
] | null | null | null | elixir/lib/homework/application.ex | TreywRoberts/web-homework | d19b17dd384341d9e6e7e3174372673584289b83 | [
"MIT"
] | null | null | null | defmodule Homework.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 Ecto repository
Homework.Repo,
# Start the Telemetry supervisor
... | 30.085714 | 67 | 0.681861 |
e9787e4cf7556fbe837f30f43317c3ff82503c0a | 282 | ex | Elixir | web/controllers/topic_controller.ex | gcwokeup/discuss | a6401c933a756e1a8c4beb2ed993fcbdddfb4f65 | [
"MIT"
] | null | null | null | web/controllers/topic_controller.ex | gcwokeup/discuss | a6401c933a756e1a8c4beb2ed993fcbdddfb4f65 | [
"MIT"
] | null | null | null | web/controllers/topic_controller.ex | gcwokeup/discuss | a6401c933a756e1a8c4beb2ed993fcbdddfb4f65 | [
"MIT"
] | null | null | null | defmodule Discuss.TopicController do
use Discuss.Web, :controller
alias Discuss.Topic
def new(conn, params) do
changeset = Topic.changeset(%Topic{}, %{})
render conn, "new.html", changeset: changeset
end
def create(conn, params) do
IO.puts params
end
end | 18.8 | 49 | 0.695035 |
e9788c5e880e74ada5922a5f2a33cd48eb604e26 | 2,669 | exs | Elixir | apps/admin_api/test/admin_api/v1/controllers/user_controller_test.exs | turbo-play/ewallet | b7fee3eed62ac716f46246132c2ead1045f2e4f3 | [
"Apache-2.0"
] | 2 | 2019-07-13T05:49:03.000Z | 2021-08-19T23:58:23.000Z | apps/admin_api/test/admin_api/v1/controllers/user_controller_test.exs | turbo-play/ewallet | b7fee3eed62ac716f46246132c2ead1045f2e4f3 | [
"Apache-2.0"
] | null | null | null | apps/admin_api/test/admin_api/v1/controllers/user_controller_test.exs | turbo-play/ewallet | b7fee3eed62ac716f46246132c2ead1045f2e4f3 | [
"Apache-2.0"
] | 3 | 2018-05-08T17:15:42.000Z | 2021-11-10T04:08:33.000Z | defmodule AdminAPI.V1.UserControllerTest do
use AdminAPI.ConnCase, async: true
describe "/user.all" do
test "returns a list of users and pagination data" do
response = user_request("/user.all")
# Asserts return data
assert response["success"]
assert response["data"]["object"] == "list"... | 36.067568 | 99 | 0.631323 |
e978a4d32d9876c6d95ad3c15bda61835d08edce | 4,165 | ex | Elixir | lib/predicates.ex | TheRealReal/prismic-elixir | 0850b922be6d2f2d541add8426fe27f8ce5f63eb | [
"MIT"
] | 10 | 2018-01-12T18:52:53.000Z | 2022-02-17T06:00:21.000Z | lib/predicates.ex | TheRealReal/prismic-elixir | 0850b922be6d2f2d541add8426fe27f8ce5f63eb | [
"MIT"
] | 12 | 2018-02-14T23:08:08.000Z | 2021-11-22T15:55:41.000Z | lib/predicates.ex | TheRealReal/prismic-elixir | 0850b922be6d2f2d541add8426fe27f8ce5f63eb | [
"MIT"
] | 8 | 2018-05-08T14:02:21.000Z | 2021-12-15T08:19:55.000Z | defmodule Prismic.Predicate do
@moduledoc """
Predicates are for generating the queries supported by the prismic api.
They take the form of a list where the first element is the operator ( think from or where in sql).
The second element "fragment" points to a "key" that a prismic document may have, such as "doc... | 27.045455 | 166 | 0.684034 |
e978d6eb05c38004f139f076abda9179871ea47c | 1,278 | exs | Elixir | examples/invoicing_app/test/unit/invoicing_app/sales/create_invoice_service_test.exs | surgeventures/sea-elixir | a2f1b63c2c829713594997c08dc5bc5892edbf62 | [
"MIT"
] | 8 | 2018-11-27T09:59:27.000Z | 2021-06-03T17:51:53.000Z | examples/invoicing_app/test/unit/invoicing_app/sales/create_invoice_service_test.exs | surgeventures/sea-elixir | a2f1b63c2c829713594997c08dc5bc5892edbf62 | [
"MIT"
] | 2 | 2019-03-19T13:38:10.000Z | 2019-03-20T12:28:39.000Z | examples/invoicing_app/test/unit/invoicing_app/sales/create_invoice_service_test.exs | surgeventures/sea-elixir | a2f1b63c2c829713594997c08dc5bc5892edbf62 | [
"MIT"
] | 1 | 2021-10-07T12:49:57.000Z | 2021-10-07T12:49:57.000Z | defmodule InvoicingApp.Sales.CreateInvoiceServiceTest do
use InvoicingApp.DataCase, async: true
import InvoicingApp.Factories
import Mox
import Sea.SignalMocking
alias InvoicingApp.Sales
alias InvoicingApp.Sales.Invoice
test "call/2" do
# it's a unit test so we don't want signal to trigger side-effec... | 42.6 | 97 | 0.762911 |
e978f463d6b1280e922afe8bf8d2d37c46b08398 | 1,263 | ex | Elixir | Chapter11/vocial-demo-chapter-11/lib/vocial_web/channels/chat_channel.ex | PacktPublishing/Phoenix-Web-Development | a071392abe2a459be1896580446b006126c393bf | [
"MIT"
] | 10 | 2018-05-13T14:53:05.000Z | 2021-11-08T13:10:44.000Z | Chapter11/vocial-demo-chapter-11/lib/vocial_web/channels/chat_channel.ex | PacktPublishing/Phoenix-Web-Development | a071392abe2a459be1896580446b006126c393bf | [
"MIT"
] | null | null | null | Chapter11/vocial-demo-chapter-11/lib/vocial_web/channels/chat_channel.ex | PacktPublishing/Phoenix-Web-Development | a071392abe2a459be1896580446b006126c393bf | [
"MIT"
] | 2 | 2019-04-23T10:54:33.000Z | 2019-04-27T15:47:07.000Z | defmodule VocialWeb.ChatChannel do
use VocialWeb, :channel
alias Vocial.Votes
alias VocialWeb.Presence
require IEx
def join("chat:lobby", payload, socket) do
socket = assign(socket, :username, payload["username"])
send(self(), :after_join)
{:ok, socket}
end
def join("chat:" <> _poll_id, pa... | 30.071429 | 106 | 0.64133 |
e978fffd62dc2fb3441bfe833cc12ba058f594aa | 2,280 | ex | Elixir | examples/common.ex | wisq/space_ex | 56a87bdd67af093ad70e2843ff4cf963ddf7018c | [
"Apache-2.0"
] | 7 | 2018-01-30T14:09:13.000Z | 2021-01-22T22:38:32.000Z | examples/common.ex | wisq/space_ex | 56a87bdd67af093ad70e2843ff4cf963ddf7018c | [
"Apache-2.0"
] | null | null | null | examples/common.ex | wisq/space_ex | 56a87bdd67af093ad70e2843ff4cf963ddf7018c | [
"Apache-2.0"
] | 1 | 2018-01-30T14:09:17.000Z | 2018-01-30T14:09:17.000Z | defmodule Example do
defp parse_args(caller_env) do
{options, args, invalid} =
OptionParser.parse(System.argv(), strict: [host: :string, observer: :boolean])
unless invalid == [] do
IO.puts("")
Enum.each(invalid, fn {opt, _} ->
case opt do
"--host" -> "--host should be fo... | 24.782609 | 84 | 0.589035 |
e979346a921f0396f8fff88fed57e26a2622707a | 13,551 | ex | Elixir | lib/dht_server/worker.ex | kaiserd/MlDHT | 402b30179bfa24824dcaf8a284f241b8fce16410 | [
"MIT"
] | null | null | null | lib/dht_server/worker.ex | kaiserd/MlDHT | 402b30179bfa24824dcaf8a284f241b8fce16410 | [
"MIT"
] | null | null | null | lib/dht_server/worker.ex | kaiserd/MlDHT | 402b30179bfa24824dcaf8a284f241b8fce16410 | [
"MIT"
] | null | null | null | defmodule DHTServer.Worker do
@moduledoc false
use GenServer
require Logger
alias DHTServer.Utils, as: Utils
alias DHTServer.Storage, as: Storage
alias RoutingTable.Node, as: Node
alias RoutingTable.Search, as: Search
alias RoutingTable.Worker, as: RoutingTable
@name __MODULE__
@type i... | 31.295612 | 89 | 0.66032 |
e9794a5ddab9a55da05115bf31451dabf9071e90 | 2,187 | ex | Elixir | clients/classroom/lib/google_api/classroom/v1/model/guardian.ex | nuxlli/elixir-google-api | ecb8679ac7282b7dd314c3e20c250710ec6a7870 | [
"Apache-2.0"
] | null | null | null | clients/classroom/lib/google_api/classroom/v1/model/guardian.ex | nuxlli/elixir-google-api | ecb8679ac7282b7dd314c3e20c250710ec6a7870 | [
"Apache-2.0"
] | null | null | null | clients/classroom/lib/google_api/classroom/v1/model/guardian.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... | 38.368421 | 178 | 0.740741 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.