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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
93151c706b9b7c9919add7dffee564c7ddd965b9 | 2,117 | exs | Elixir | test/fcm/result_parser_test.exs | Frameio/pigeon | 7de765179f74dbf13fbcc9cbe9ae1de59fe953e2 | [
"MIT"
] | 1 | 2021-09-05T13:34:21.000Z | 2021-09-05T13:34:21.000Z | test/fcm/result_parser_test.exs | Frameio/pigeon | 7de765179f74dbf13fbcc9cbe9ae1de59fe953e2 | [
"MIT"
] | null | null | null | test/fcm/result_parser_test.exs | Frameio/pigeon | 7de765179f74dbf13fbcc9cbe9ae1de59fe953e2 | [
"MIT"
] | null | null | null | defmodule Pigeon.FCM.ResultParserTest do
use ExUnit.Case
alias Pigeon.FCM.{Notification, ResultParser}
def assert_response(notif, expected) do
assert notif.response == expected
end
test "parse_result with success" do
expected = [success: "regid"]
ResultParser.parse(
["regid"],
[%{"... | 22.052083 | 63 | 0.595654 |
931529cbf266cfabbf8c345f598a9b4e3cba6936 | 770 | ex | Elixir | lib/brando/cache.ex | brandocms/brando | 4198e0c0920031bd909969055064e4e2b7230d21 | [
"MIT"
] | 4 | 2020-10-30T08:40:38.000Z | 2022-01-07T22:21:37.000Z | lib/brando/cache.ex | brandocms/brando | 4198e0c0920031bd909969055064e4e2b7230d21 | [
"MIT"
] | 1,162 | 2020-07-05T11:20:15.000Z | 2022-03-31T06:01:49.000Z | lib/brando/cache.ex | brandocms/brando | 4198e0c0920031bd909969055064e4e2b7230d21 | [
"MIT"
] | null | null | null | defmodule Brando.Cache do
@moduledoc """
Interface for the main cache module
"""
@cache_module Application.get_env(:brando, :cache_module, Cachex)
@spec get(atom | binary) :: any
def get(key) do
case get_from_cache(key) do
{:ok, val} -> val
{:error, _} -> nil
end
end
@spec get(atom... | 20.810811 | 67 | 0.615584 |
9315313726d30052e8d48d0608115c9295959517 | 3,016 | ex | Elixir | clients/analytics_admin/lib/google_api/analytics_admin/v1alpha/model/google_analytics_admin_v1alpha_custom_metric.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | clients/analytics_admin/lib/google_api/analytics_admin/v1alpha/model/google_analytics_admin_v1alpha_custom_metric.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | clients/analytics_admin/lib/google_api/analytics_admin/v1alpha/model/google_analytics_admin_v1alpha_custom_metric.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... | 45.014925 | 356 | 0.72248 |
93153de0530811795c7c860a1e0f5148ab10d230 | 2,404 | exs | Elixir | test/hierbautberlin/notify_subscriptions_test.exs | HierBautBerlin/website | 91410e7c61c1efad438fe84bf550f87b0056c440 | [
"MIT"
] | 13 | 2021-03-06T12:16:34.000Z | 2022-03-31T09:46:35.000Z | test/hierbautberlin/notify_subscriptions_test.exs | HierBautBerlin/website | 91410e7c61c1efad438fe84bf550f87b0056c440 | [
"MIT"
] | 148 | 2021-03-05T12:44:55.000Z | 2022-03-11T12:09:06.000Z | test/hierbautberlin/notify_subscriptions_test.exs | HierBautBerlin/website | 91410e7c61c1efad438fe84bf550f87b0056c440 | [
"MIT"
] | 2 | 2021-06-02T14:31:21.000Z | 2022-02-14T08:36:51.000Z | defmodule Hierbautberlin.NotifySubscriptionTest do
use Hierbautberlin.DataCase, async: false
use Bamboo.Test
import Hierbautberlin.AccountsFixtures
alias Ecto.Adapters.SQL
alias Hierbautberlin.Accounts
alias Hierbautberlin.NotifySubscription
describe "notify_changes_since/1" do
setup do
user_f... | 25.849462 | 93 | 0.551165 |
931563cb71d3f7cdd0e6c51f944765107b9d9682 | 1,761 | ex | Elixir | clients/double_click_search/lib/google_api/double_click_search/v2/model/saved_column.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/double_click_search/lib/google_api/double_click_search/v2/model/saved_column.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/double_click_search/lib/google_api/double_click_search/v2/model/saved_column.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... | 33.226415 | 151 | 0.714935 |
9315643410a875e4a07b1eb3bfe84443e799e438 | 755 | exs | Elixir | code/spawn/link2.exs | alvarocamillont/introdu-o_elixir | 1d72d4f4b01d9312c4b066ce3c0fe8d9bfaaade1 | [
"MIT"
] | null | null | null | code/spawn/link2.exs | alvarocamillont/introdu-o_elixir | 1d72d4f4b01d9312c4b066ce3c0fe8d9bfaaade1 | [
"MIT"
] | 1 | 2021-03-09T16:27:25.000Z | 2021-03-09T16:27:25.000Z | programming-elixir-book/code/spawn/link2.exs | jordanhubbard/elixir-projects | dee341d672e83a45a17a4a85abd54a480f95c506 | [
"BSD-2-Clause"
] | null | null | null | #---
# Excerpted from "Programming Elixir ≥ 1.6",
# published by The Pragmatic Bookshelf.
# Copyrights apply to this code. It may not be used to create training material,
# courses, books, articles, and the like. Contact us if you are in doubt.
# We make no guarantees that this code is fit for any purpose.
# Visit http... | 26.034483 | 85 | 0.683444 |
9315789e54a9a2b4cd67dd071f94f5029d96369d | 896 | ex | Elixir | clients/groups_migration/lib/google_api/groups_migration/v1/metadata.ex | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"Apache-2.0"
] | null | null | null | clients/groups_migration/lib/google_api/groups_migration/v1/metadata.ex | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"Apache-2.0"
] | null | null | null | clients/groups_migration/lib/google_api/groups_migration/v1/metadata.ex | ukrbublik/elixir-google-api | 364cec36bc76f60bec94cbcad34844367a29d174 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 33.185185 | 74 | 0.762277 |
93157c05e3a1f5943e690e6dc515a20edf6069bc | 4,320 | ex | Elixir | lib/type_check/type.ex | 0urobor0s/elixir-type_check | 6bac178f4a55798034b12c1dcfb219eabcfb35c0 | [
"MIT"
] | null | null | null | lib/type_check/type.ex | 0urobor0s/elixir-type_check | 6bac178f4a55798034b12c1dcfb219eabcfb35c0 | [
"MIT"
] | null | null | null | lib/type_check/type.ex | 0urobor0s/elixir-type_check | 6bac178f4a55798034b12c1dcfb219eabcfb35c0 | [
"MIT"
] | null | null | null | defmodule TypeCheck.Type do
@moduledoc """
TODO
"""
import TypeCheck.Internals.Bootstrap.Macros
if_recompiling? do
use TypeCheck
end
@typedoc """
Something is a TypeCheck.Type if it implements the TypeCheck.Protocols.ToCheck protocol.
It is also expected to implement the TypeCheck.Protocols.Insp... | 33.75 | 127 | 0.670602 |
93157c18cb19ef6d9e3656e683677789baae1fa1 | 2,195 | ex | Elixir | lib/umbra/extension/name_setter.ex | scorsi/Umbra | 16036742db98e39fdc5bf50bc63f6db7cb0e7e92 | [
"MIT"
] | null | null | null | lib/umbra/extension/name_setter.ex | scorsi/Umbra | 16036742db98e39fdc5bf50bc63f6db7cb0e7e92 | [
"MIT"
] | 7 | 2020-06-07T08:26:09.000Z | 2020-06-07T08:38:36.000Z | lib/umbra/extension/name_setter.ex | scorsi/Umbra | 16036742db98e39fdc5bf50bc63f6db7cb0e7e92 | [
"MIT"
] | null | null | null | defmodule Umbra.Extension.NameSetter do
@moduledoc """
The extension `Umbra.Extension.NameSetter` is used to manage the
[GenServer name option](https://hexdocs.pm/elixir/GenServer.html#module-name-registration).
It overrides the `c:Umbra.GenServer.__start__/3` callback to set the process name (only if missing ... | 27.098765 | 114 | 0.641002 |
931585ea5fa1474e78f5af714457723b1aeb81e1 | 245 | exs | Elixir | priv/repo/migrations/20191101000259_connect_transaction_to_category_and_user.exs | corka149/jarvis | 66ddb3d919323aaf39be15e937c28cc8cc805e40 | [
"MIT"
] | null | null | null | priv/repo/migrations/20191101000259_connect_transaction_to_category_and_user.exs | corka149/jarvis | 66ddb3d919323aaf39be15e937c28cc8cc805e40 | [
"MIT"
] | 7 | 2019-05-25T06:39:46.000Z | 2021-02-13T11:24:50.000Z | priv/repo/migrations/20191101000259_connect_transaction_to_category_and_user.exs | corka149/jarvis | 66ddb3d919323aaf39be15e937c28cc8cc805e40 | [
"MIT"
] | null | null | null | defmodule Jarvis.Repo.Migrations.ConnectTransactionToCategory do
use Ecto.Migration
def change do
alter table(:transactions) do
add :category_id, references(:categories)
add :created_by, references(:users)
end
end
end
| 22.272727 | 64 | 0.738776 |
93159080a3d86f6077b029d2cfe789b16a958f9f | 2,552 | ex | Elixir | lib/edgedb/borrower.ex | f0lio/edgedb-elixir | b285bd8037b0b951aabfa1d1733889880f8bfd66 | [
"MIT"
] | null | null | null | lib/edgedb/borrower.ex | f0lio/edgedb-elixir | b285bd8037b0b951aabfa1d1733889880f8bfd66 | [
"MIT"
] | null | null | null | lib/edgedb/borrower.ex | f0lio/edgedb-elixir | b285bd8037b0b951aabfa1d1733889880f8bfd66 | [
"MIT"
] | null | null | null | defmodule EdgeDB.Borrower do
@moduledoc false
use GenServer
@reasons_to_borrow ~w(
transaction
subtransaction
)a
defmodule State do
@moduledoc false
defstruct borrowed: %{}
@type t() :: %__MODULE__{
borrowed: %{DBConnection.conn() => :transaction | :subtransaction}
... | 23.62963 | 88 | 0.643417 |
9315d69044e2294c469226dc3dea842ea7ca82bf | 83 | ex | Elixir | web/views/page_view.ex | brandnewio/brandnew-mail-tracker | 0f991c82bd95be6a8efaee949b459b77a1e7245d | [
"MIT"
] | null | null | null | web/views/page_view.ex | brandnewio/brandnew-mail-tracker | 0f991c82bd95be6a8efaee949b459b77a1e7245d | [
"MIT"
] | null | null | null | web/views/page_view.ex | brandnewio/brandnew-mail-tracker | 0f991c82bd95be6a8efaee949b459b77a1e7245d | [
"MIT"
] | null | null | null | defmodule BrandnewMailTracker.PageView do
use BrandnewMailTracker.Web, :view
end
| 20.75 | 41 | 0.843373 |
9315dd55fe5bebf4dec49e14006863ea82a24a68 | 354 | exs | Elixir | adv_2020/test/day_11_test.exs | SamuelSarle/advent | 31025f7b081826cb51b37a2d8b8d263413b71086 | [
"Unlicense"
] | null | null | null | adv_2020/test/day_11_test.exs | SamuelSarle/advent | 31025f7b081826cb51b37a2d8b8d263413b71086 | [
"Unlicense"
] | null | null | null | adv_2020/test/day_11_test.exs | SamuelSarle/advent | 31025f7b081826cb51b37a2d8b8d263413b71086 | [
"Unlicense"
] | null | null | null | defmodule DayElevenTest do
use ExUnit.Case
test "returns correct answer" do
input = """
L.LL.LL.LL
LLLLLLL.LL
L.L.L..L..
LLLL.LL.LL
L.LL.LL.LL
L.LLLLL.LL
..L.L.....
LLLLLLLLLL
L.LLLLLL.L
L.LLLLL.LL
"""
assert DayEleven.solve(input) == 37
assert DayEleven.Par... | 16.090909 | 47 | 0.581921 |
931619869435306033a356785f5b1cd08c150f32 | 2,098 | ex | Elixir | clients/tool_results/lib/google_api/tool_results/v1beta3/model/list_histories_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/tool_results/lib/google_api/tool_results/v1beta3/model/list_histories_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/tool_results/lib/google_api/tool_results/v1beta3/model/list_histories_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... | 38.851852 | 261 | 0.744519 |
93165f6e8cb16a948f11855e53d3f89e76f1d195 | 49,798 | ex | Elixir | lib/elixir/lib/exception.ex | fmterrorf/elixir | eafb7b87756179adac5dc2bc11edcb04c1f187cc | [
"Apache-2.0"
] | 1 | 2022-03-28T12:04:08.000Z | 2022-03-28T12:04:08.000Z | lib/elixir/lib/exception.ex | fmterrorf/elixir | eafb7b87756179adac5dc2bc11edcb04c1f187cc | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/exception.ex | fmterrorf/elixir | eafb7b87756179adac5dc2bc11edcb04c1f187cc | [
"Apache-2.0"
] | null | null | null | defmodule Exception do
@moduledoc """
Functions to format throw/catch/exit and exceptions.
Note that stacktraces in Elixir are only available inside
catch and rescue by using the `__STACKTRACE__/0` variable.
Do not rely on the particular format returned by the `format*`
functions in this module. They may ... | 29.53618 | 153 | 0.648098 |
93166689672f425606f3a2f823fe154f9225531f | 3,347 | exs | Elixir | test/ex_json_schema/schema_test.exs | appcues/ex_json_schema | 3d4abf8a17bb803ab9ec2840c89f1f2bfda16d26 | [
"MIT"
] | null | null | null | test/ex_json_schema/schema_test.exs | appcues/ex_json_schema | 3d4abf8a17bb803ab9ec2840c89f1f2bfda16d26 | [
"MIT"
] | null | null | null | test/ex_json_schema/schema_test.exs | appcues/ex_json_schema | 3d4abf8a17bb803ab9ec2840c89f1f2bfda16d26 | [
"MIT"
] | null | null | null | defmodule ExJsonSchema.SchemaTest do
use ExUnit.Case, async: true
import ExJsonSchema.Schema, only: [resolve: 1]
test "fails when trying to resolve something that is not a schema" do
assert_raise FunctionClauseError, fn -> resolve("foo") end
end
test "only resolves draft 4 schemata" do
versionless_... | 40.817073 | 135 | 0.647445 |
9316787c24a71a017d363161a9b0ed087e1b52a7 | 1,360 | ex | Elixir | lib/wi2_demonstration.ex | xeejp/xee_wi2_demonstration | 969bd401ea765066078d50ccca67c897468cc136 | [
"MIT"
] | null | null | null | lib/wi2_demonstration.ex | xeejp/xee_wi2_demonstration | 969bd401ea765066078d50ccca67c897468cc136 | [
"MIT"
] | null | null | null | lib/wi2_demonstration.ex | xeejp/xee_wi2_demonstration | 969bd401ea765066078d50ccca67c897468cc136 | [
"MIT"
] | null | null | null | defmodule Wi2Demonstration do
use XeeThemeScript
require Logger
alias Wi2Demonstration.Main
alias Wi2Demonstration.Host
alias Wi2Demonstration.Participant
# Callbacks
def script_type do
:message
end
def install, do: nil
def init do
{:ok, %{"data" => Main.init()}}
end
def wrap_result... | 27.2 | 85 | 0.643382 |
93167cfc47877c0631894da94c96f9a677a3cda2 | 241 | exs | Elixir | priv/repo/migrations/20200129022610_rename-group-name-to-group-label.exs | octosteve/remote_retro | 3385b0db3c2daab934ce12a2f7642a5f10ac5147 | [
"MIT"
] | 523 | 2017-03-15T15:21:11.000Z | 2022-03-14T03:04:18.000Z | priv/repo/migrations/20200129022610_rename-group-name-to-group-label.exs | octosteve/remote_retro | 3385b0db3c2daab934ce12a2f7642a5f10ac5147 | [
"MIT"
] | 524 | 2017-03-16T18:31:09.000Z | 2022-02-26T10:02:06.000Z | priv/repo/migrations/20200129022610_rename-group-name-to-group-label.exs | octosteve/remote_retro | 3385b0db3c2daab934ce12a2f7642a5f10ac5147 | [
"MIT"
] | 60 | 2017-05-01T18:02:28.000Z | 2022-03-04T21:04:56.000Z | defmodule :"Elixir.RemoteRetro.Repo.Migrations.Rename-group-name-to-group-label" do
use Ecto.Migration
def up do
rename table("groups"), :name, to: :label
end
def down do
rename table("groups"), :label, to: :name
end
end
| 20.083333 | 83 | 0.688797 |
93167d447e2100c7afd345273ae8308fd4220a11 | 2,092 | ex | Elixir | clients/sheets/lib/google_api/sheets/v4/model/source_and_destination.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/sheets/lib/google_api/sheets/v4/model/source_and_destination.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/sheets/lib/google_api/sheets/v4/model/source_and_destination.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 ... | 37.357143 | 147 | 0.721319 |
93168d35a020c83996512d61e49bedb14ecdc535 | 11,932 | ex | Elixir | clients/cloud_trace/lib/google_api/cloud_trace/v1/api/projects.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | null | null | null | clients/cloud_trace/lib/google_api/cloud_trace/v1/api/projects.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"Apache-2.0"
] | null | null | null | clients/cloud_trace/lib/google_api/cloud_trace/v1/api/projects.ex | hauptbenutzer/elixir-google-api | 7b9e3a114a49cfc774a7afd03e299a0d43e4e6b2 | [
"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... | 56.819048 | 1,827 | 0.681529 |
93169dafcd2fcb0b25d8aec3a70f40f4e892ccc1 | 1,715 | ex | Elixir | clients/container/lib/google_api/container/v1/model/set_locations_request.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/container/lib/google_api/container/v1/model/set_locations_request.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/container/lib/google_api/container/v1/model/set_locations_request.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... | 37.282609 | 419 | 0.766764 |
9316b472e0b7b0de83d3daa5205a0a4622c42bbe | 1,588 | ex | Elixir | lib/phoenix_api_project_web/endpoint.ex | faridghafoori/phoenix-api-project | 4593f514150d7b61623f00be6f637f4eec378ffe | [
"MIT"
] | null | null | null | lib/phoenix_api_project_web/endpoint.ex | faridghafoori/phoenix-api-project | 4593f514150d7b61623f00be6f637f4eec378ffe | [
"MIT"
] | null | null | null | lib/phoenix_api_project_web/endpoint.ex | faridghafoori/phoenix-api-project | 4593f514150d7b61623f00be6f637f4eec378ffe | [
"MIT"
] | null | null | null | defmodule PhoenixApiProjectWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :phoenix_api_project
# 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... | 29.962264 | 97 | 0.728589 |
9316d528801aa717de5367ef21d4acdc1c624286 | 5,430 | ex | Elixir | apps/fz_http/lib/fz_http/users.ex | CloudFire-LLC/cloudfire-ce | 416ea0d9c9528790fdf70c432aa4eb507d7b2074 | [
"Apache-2.0"
] | null | null | null | apps/fz_http/lib/fz_http/users.ex | CloudFire-LLC/cloudfire-ce | 416ea0d9c9528790fdf70c432aa4eb507d7b2074 | [
"Apache-2.0"
] | 1 | 2020-04-24T01:53:41.000Z | 2020-04-24T01:53:41.000Z | apps/fz_http/lib/fz_http/users.ex | CloudFire-LLC/cloudfire-ce | 416ea0d9c9528790fdf70c432aa4eb507d7b2074 | [
"Apache-2.0"
] | null | null | null | defmodule FzHttp.Users do
@moduledoc """
The Users context.
"""
import Ecto.Changeset
import Ecto.Query, warn: false
alias FzHttp.{Devices.Device, Mailer, Repo, Sites.Site, Telemetry, Users.User}
require Logger
# one hour
@sign_in_token_validity_secs 3600
def count do
Repo.one(from u in Use... | 23.71179 | 94 | 0.640516 |
9316dbadc99b9a5e03b198e96e2dea19aba437eb | 553 | ex | Elixir | web/router.ex | bradurani/dangerouscrossing | 3ab5c25e9ca2230704d56068400cc499632772bb | [
"BSD-3-Clause"
] | null | null | null | web/router.ex | bradurani/dangerouscrossing | 3ab5c25e9ca2230704d56068400cc499632772bb | [
"BSD-3-Clause"
] | null | null | null | web/router.ex | bradurani/dangerouscrossing | 3ab5c25e9ca2230704d56068400cc499632772bb | [
"BSD-3-Clause"
] | null | null | null | defmodule Dangerouscrossing.Router do
use Dangerouscrossing.Web, :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 "/", Dange... | 20.481481 | 57 | 0.696203 |
9316ea24f014978ead9f9b07968c1d020b146515 | 10,902 | ex | Elixir | lib/game/quest.ex | deep-spaced/ex_venture | 45848abe509620d6d2643b2a780dab01c1ac523b | [
"MIT"
] | null | null | null | lib/game/quest.ex | deep-spaced/ex_venture | 45848abe509620d6d2643b2a780dab01c1ac523b | [
"MIT"
] | null | null | null | lib/game/quest.ex | deep-spaced/ex_venture | 45848abe509620d6d2643b2a780dab01c1ac523b | [
"MIT"
] | null | null | null | defmodule Game.Quest do
@moduledoc """
Quest context
"""
import Ecto.Query
alias Data.Quest
alias Data.QuestProgress
alias Data.QuestStep
alias Data.Repo
alias Data.User
alias Game.Item
alias Game.Session
@doc """
Check if a quest is complete
"""
def complete?(quest_progress) do
que... | 25.895487 | 117 | 0.603009 |
9316fcf533bddce21004decf309dbb5aef20785a | 75 | ex | Elixir | web/views/layout_view.ex | w0rd-driven/scratch_phoenix | 465e01af6e7d649bfb308edf91247e9d6c6a5876 | [
"MIT"
] | null | null | null | web/views/layout_view.ex | w0rd-driven/scratch_phoenix | 465e01af6e7d649bfb308edf91247e9d6c6a5876 | [
"MIT"
] | null | null | null | web/views/layout_view.ex | w0rd-driven/scratch_phoenix | 465e01af6e7d649bfb308edf91247e9d6c6a5876 | [
"MIT"
] | null | null | null | defmodule ScratchPhoenix.LayoutView do
use ScratchPhoenix.Web, :view
end
| 18.75 | 38 | 0.826667 |
9316fd6228d3655651f2ecbb36a3d76619b3cecd | 1,424 | ex | Elixir | lib/thrift/parser/conversions.ex | rchallapalli/elixir-thrift | 729e3f616947a6c75762252bb2726221eea2e31b | [
"Apache-2.0"
] | null | null | null | lib/thrift/parser/conversions.ex | rchallapalli/elixir-thrift | 729e3f616947a6c75762252bb2726221eea2e31b | [
"Apache-2.0"
] | null | null | null | lib/thrift/parser/conversions.ex | rchallapalli/elixir-thrift | 729e3f616947a6c75762252bb2726221eea2e31b | [
"Apache-2.0"
] | null | null | null | defmodule Thrift.Parser.Conversions do
@moduledoc false
@spec atomify(charlist | nil) :: atom
def atomify(nil), do: nil
def atomify(l) when is_list(l) do
List.to_atom(l)
end
# convert a charlist to a snake_case atom
# e.g., 'FooBar', 'foo_bar', 'fooBar', and 'FOO_BAR'
# should all produce :foo... | 20.637681 | 75 | 0.613062 |
9316ffd37eba7cdc55e4d7910d13254f240e1312 | 4,837 | exs | Elixir | apps/rig_cloud_events/test/cloud_events_parser_test.exs | arana3/reactive-interaction-gateway | 793648bcc5b8b05fc53df1f5f97818fb40ca84be | [
"Apache-2.0"
] | 518 | 2017-11-09T13:10:49.000Z | 2022-03-28T14:29:50.000Z | apps/rig_cloud_events/test/cloud_events_parser_test.exs | arana3/reactive-interaction-gateway | 793648bcc5b8b05fc53df1f5f97818fb40ca84be | [
"Apache-2.0"
] | 270 | 2017-11-10T00:11:34.000Z | 2022-02-27T13:08:16.000Z | apps/rig_cloud_events/test/cloud_events_parser_test.exs | arana3/reactive-interaction-gateway | 793648bcc5b8b05fc53df1f5f97818fb40ca84be | [
"Apache-2.0"
] | 67 | 2017-12-19T20:16:37.000Z | 2022-03-31T10:43:04.000Z | defmodule CloudEventsParserTest do
# credo:disable-for-previous-line Credo.Check.Readability.ModuleNames
@moduledoc false
use ExUnit.Case
alias Jason
alias Jaxon
@parsers [
RigCloudEvents.Parser.PartialParser,
RigCloudEvents.Parser.FullParser
]
test "A string context attribute is found." do
... | 30.421384 | 90 | 0.504238 |
93171df79159dd22a70abdc0e24bd93b7023de2c | 6,840 | ex | Elixir | lib/dicon/secure_shell.ex | ybod/dicon | 9c83a6ed7562af4582eb55fc0f813f10fe5f3feb | [
"ISC"
] | null | null | null | lib/dicon/secure_shell.ex | ybod/dicon | 9c83a6ed7562af4582eb55fc0f813f10fe5f3feb | [
"ISC"
] | null | null | null | lib/dicon/secure_shell.ex | ybod/dicon | 9c83a6ed7562af4582eb55fc0f813f10fe5f3feb | [
"ISC"
] | null | null | null | defmodule Dicon.SecureShell do
@moduledoc """
A `Dicon.Executor` based on SSH.
## Configuration
The configuration for this executor must be specified under the configuration
for the `:dicon` application:
config :dicon, Dicon.SecureShell,
dir: "..."
The available configuration options for t... | 33.043478 | 93 | 0.639327 |
9317474db8beda2e42d1f30aa853980cabdb0a39 | 1,130 | ex | Elixir | lib/roger/gproc.ex | bettyblocks/roger | 7bd55ff9ce67e01f90a97b1131fecf3a326767d1 | [
"MIT"
] | 17 | 2017-01-24T19:00:53.000Z | 2021-08-23T15:14:42.000Z | lib/roger/gproc.ex | bettyblocks/roger | 7bd55ff9ce67e01f90a97b1131fecf3a326767d1 | [
"MIT"
] | 8 | 2017-04-25T13:22:48.000Z | 2021-03-18T11:58:15.000Z | lib/roger/gproc.ex | bettyblocks/roger | 7bd55ff9ce67e01f90a97b1131fecf3a326767d1 | [
"MIT"
] | 3 | 2018-01-23T21:51:47.000Z | 2019-09-11T07:23:57.000Z | defmodule Roger.GProc do
@moduledoc false
@scope :l
def name(proc), do: {:n, @scope, proc}
def reg(proc), do: :gproc.reg(name(proc))
def unreg(proc), do: :gproc.unreg(name(proc))
def regp(proc), do: :gproc.reg(prop(proc))
def regp(proc, value), do: :gproc.reg(prop(proc), value)
def unregp(proc), ... | 25.111111 | 114 | 0.60885 |
9317503e451906ddf8869faaf62828a9744a4a37 | 855 | exs | Elixir | test/pipe_converter/cli_test.exs | marocchino/pipe_converter | a847df3a59ae8e396c862af32b844ecdb56e4e70 | [
"MIT"
] | 6 | 2016-11-08T08:33:56.000Z | 2021-02-02T05:44:36.000Z | test/pipe_converter/cli_test.exs | marocchino/pipe_converter | a847df3a59ae8e396c862af32b844ecdb56e4e70 | [
"MIT"
] | null | null | null | test/pipe_converter/cli_test.exs | marocchino/pipe_converter | a847df3a59ae8e396c862af32b844ecdb56e4e70 | [
"MIT"
] | 1 | 2021-02-02T05:44:44.000Z | 2021-02-02T05:44:44.000Z | defmodule PipeConverter.CLITest do
use ExUnit.Case
import PipeConverter.CLI
import ExUnit.CaptureIO
doctest PipeConverter.CLI
test "main/1" do
assert capture_io(fn -> main(["--revert", "name = inner |> outer()"]) end) ==
"name = outer(inner)\n"
assert capture_io(fn -> main(["name = oute... | 31.666667 | 82 | 0.548538 |
93177189e6bdac8250606cc3d7ab241b0e3f011a | 1,396 | ex | Elixir | lib/paires_web/telemetry.ex | fcapovilla/paires | 72a9453d02d7afee11f9457cf342215d075b0c97 | [
"BSD-3-Clause"
] | null | null | null | lib/paires_web/telemetry.ex | fcapovilla/paires | 72a9453d02d7afee11f9457cf342215d075b0c97 | [
"BSD-3-Clause"
] | null | null | null | lib/paires_web/telemetry.ex | fcapovilla/paires | 72a9453d02d7afee11f9457cf342215d075b0c97 | [
"BSD-3-Clause"
] | null | null | null | defmodule PairesWeb.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 m... | 28.489796 | 86 | 0.669771 |
931773d3dfd94a529cf2636e134e4a0c12f4109f | 1,279 | ex | Elixir | lib/astarte_data_updater_plant/data_updater/state.ex | rbino/astarte_data_updater_plant | b1769207636fad9f91fdcad4ed768757af09683f | [
"Apache-2.0"
] | 5 | 2018-01-30T15:08:23.000Z | 2019-12-20T15:06:56.000Z | lib/astarte_data_updater_plant/data_updater/state.ex | rbino/astarte_data_updater_plant | b1769207636fad9f91fdcad4ed768757af09683f | [
"Apache-2.0"
] | 17 | 2018-01-31T15:50:22.000Z | 2019-12-05T17:26:06.000Z | lib/astarte_data_updater_plant/data_updater/state.ex | rbino/astarte_data_updater_plant | b1769207636fad9f91fdcad4ed768757af09683f | [
"Apache-2.0"
] | 2 | 2018-01-31T15:43:04.000Z | 2019-11-15T12:00:05.000Z | #
# This file is part of Astarte.
#
# Copyright 2017-2018 Ispirata Srl
#
# 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... | 27.804348 | 74 | 0.74355 |
9317b05c3d783c0c71c822a049d45d1be6827c5d | 936 | ex | Elixir | lib/hl7/2.4/segments/pd1.ex | calvinb/elixir-hl7 | 5e953fa11f9184857c0ec4dda8662889f35a6bec | [
"Apache-2.0"
] | null | null | null | lib/hl7/2.4/segments/pd1.ex | calvinb/elixir-hl7 | 5e953fa11f9184857c0ec4dda8662889f35a6bec | [
"Apache-2.0"
] | null | null | null | lib/hl7/2.4/segments/pd1.ex | calvinb/elixir-hl7 | 5e953fa11f9184857c0ec4dda8662889f35a6bec | [
"Apache-2.0"
] | null | null | null | defmodule HL7.V2_4.Segments.PD1 do
@moduledoc false
require Logger
alias HL7.V2_4.{DataTypes}
use HL7.Segment,
fields: [
segment: nil,
living_dependency: nil,
living_arrangement: nil,
patient_primary_facility: DataTypes.Xon,
patient_primary_care_provider_name_id_no: DataTypes... | 28.363636 | 62 | 0.71047 |
9317d28e1d7adb3c602f74ad0c17d11d6ac6f5e9 | 1,278 | exs | Elixir | config/config.exs | TheAlexPorter/pennystock-api | e42d8a8d25a31f1723c5f28a344a4ee7ff7e30e9 | [
"MIT"
] | null | null | null | config/config.exs | TheAlexPorter/pennystock-api | e42d8a8d25a31f1723c5f28a344a4ee7ff7e30e9 | [
"MIT"
] | null | null | null | config/config.exs | TheAlexPorter/pennystock-api | e42d8a8d25a31f1723c5f28a344a4ee7ff7e30e9 | [
"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
config :pennystock_api,
ecto_repos: [Pennystoc... | 31.170732 | 86 | 0.750391 |
9317da04b1f9e252d72dcb63ff02f799d6092546 | 14,211 | ex | Elixir | lib/phoenix/endpoint.ex | scrogson/phoenix | e5745b9360fa1163246eb507490f1ce760cc0219 | [
"MIT"
] | null | null | null | lib/phoenix/endpoint.ex | scrogson/phoenix | e5745b9360fa1163246eb507490f1ce760cc0219 | [
"MIT"
] | null | null | null | lib/phoenix/endpoint.ex | scrogson/phoenix | e5745b9360fa1163246eb507490f1ce760cc0219 | [
"MIT"
] | null | null | null | defmodule Phoenix.Endpoint do
@moduledoc """
Defines a Phoenix endpoint.
The endpoint is the boundary where all requests to your
web application start. It is also the interface your
application provides to the underlying web servers.
Overall, an endpoint has three responsibilities:
* to provide a wra... | 33.997608 | 94 | 0.664274 |
9317dda364aa793f4ba35513d9f3c689105780ec | 1,706 | ex | Elixir | lib/pos/salon.ex | ancarvalho/backend-elixir | e42c22ae0881d80336a60dc6c87d4786db97c7a8 | [
"MIT"
] | null | null | null | lib/pos/salon.ex | ancarvalho/backend-elixir | e42c22ae0881d80336a60dc6c87d4786db97c7a8 | [
"MIT"
] | null | null | null | lib/pos/salon.ex | ancarvalho/backend-elixir | e42c22ae0881d80336a60dc6c87d4786db97c7a8 | [
"MIT"
] | null | null | null | defmodule Pos.Salon do
@moduledoc """
The Salon context.
"""
import Ecto.Query, warn: false
alias Pos.Repo
alias Pos.Salon.Table
@doc """
Returns the list of tables.
## Examples
iex> list_tables()
[%Table{}, ...]
"""
def list_tables do
Repo.all(Table)
end
@doc """
Gets... | 16.247619 | 60 | 0.573271 |
9318044b41571a9ad9de9b579c2f1158db69bf5f | 15,629 | ex | Elixir | lib/geometry/multi_line_string_m.ex | hrzndhrn/geometry | bffdac0a9554f7f5fd05caceee0fa8f3c96d1c60 | [
"MIT"
] | null | null | null | lib/geometry/multi_line_string_m.ex | hrzndhrn/geometry | bffdac0a9554f7f5fd05caceee0fa8f3c96d1c60 | [
"MIT"
] | 2 | 2020-10-25T10:06:07.000Z | 2020-10-26T18:15:20.000Z | lib/geometry/multi_line_string_m.ex | hrzndhrn/geometry | bffdac0a9554f7f5fd05caceee0fa8f3c96d1c60 | [
"MIT"
] | null | null | null | defmodule Geometry.MultiLineStringM do
@moduledoc """
A set of line-strings from type `Geometry.LineStringM`
`MultiLineStringMZ` implements the protocols `Enumerable` and `Collectable`.
## Examples
iex> Enum.map(
...> MultiLineStringM.new([
...> LineStringM.new([
...> Poin... | 28.677064 | 94 | 0.558833 |
93182f9a2420f6a42e5d2cf80fd20076720137ea | 669 | exs | Elixir | episode15/speaker/mix.exs | paulfioravanti/learn_elixir | 8424b1a7a89cb9fd1dacb85bcca487601958b8fa | [
"MIT"
] | null | null | null | episode15/speaker/mix.exs | paulfioravanti/learn_elixir | 8424b1a7a89cb9fd1dacb85bcca487601958b8fa | [
"MIT"
] | null | null | null | episode15/speaker/mix.exs | paulfioravanti/learn_elixir | 8424b1a7a89cb9fd1dacb85bcca487601958b8fa | [
"MIT"
] | null | null | null | defmodule Speaker.Mixfile do
use Mix.Project
def project do
[app: :speaker,
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 mo... | 20.272727 | 77 | 0.606876 |
9318705451c2324f7f2658c53d0e4d7c73301b10 | 5,983 | exs | Elixir | test/cocktail/daily_test.exs | gadabout/cocktail | 3dd3b6ee60d6f99b640f092c974d067338dd589b | [
"MIT"
] | 117 | 2017-09-09T00:02:32.000Z | 2022-02-10T15:36:28.000Z | test/cocktail/daily_test.exs | gadabout/cocktail | 3dd3b6ee60d6f99b640f092c974d067338dd589b | [
"MIT"
] | 193 | 2017-09-09T22:49:18.000Z | 2022-03-30T13:05:25.000Z | test/cocktail/daily_test.exs | gadabout/cocktail | 3dd3b6ee60d6f99b640f092c974d067338dd589b | [
"MIT"
] | 20 | 2018-01-04T14:58:42.000Z | 2021-11-25T13:59:10.000Z | defmodule Cocktail.DailyTest do
use ExUnit.Case
alias Cocktail.Schedule
import Cocktail.TestSupport.DateTimeSigil
test "Daily" do
times =
~Y[2017-01-01 06:00:00 America/Los_Angeles]
|> Cocktail.schedule()
|> Schedule.add_recurrence_rule(:daily)
|> Cocktail.Schedule.occurrences()
... | 35.826347 | 161 | 0.585994 |
931874578706dab4603bc16e3056d50e71707b1f | 7,843 | exs | Elixir | test/lib/rds_test.exs | fmcgeough/ex_aws_rds | 783eb582c3211bf5d91269d9cc85823932e34435 | [
"Unlicense",
"MIT"
] | 2 | 2019-08-05T17:46:03.000Z | 2022-01-21T19:47:34.000Z | test/lib/rds_test.exs | fmcgeough/ex_aws_rds | 783eb582c3211bf5d91269d9cc85823932e34435 | [
"Unlicense",
"MIT"
] | 9 | 2017-10-19T01:21:00.000Z | 2021-10-05T20:45:05.000Z | test/lib/rds_test.exs | fmcgeough/ex_aws_rds | 783eb582c3211bf5d91269d9cc85823932e34435 | [
"Unlicense",
"MIT"
] | 6 | 2017-12-05T19:22:56.000Z | 2021-10-09T17:39:04.000Z | # defmodule Test.Dummy.RDS do
# use ExAws.RDS.Client
#
# def config_root, do: Application.get_all_env(:ex_aws)
#
# def request(_client, http_method, path, data) do
# data
# |> Enum.into(%{})
# |> Map.put(:path, path)
# |> Map.put(:http_method, http_method)
# end
# end
defmodule ExAws.RDSTest do... | 26.767918 | 96 | 0.605636 |
931897ceff8da13c2552d419e40936c09aaa5f78 | 234 | ex | Elixir | lib/binance/symbol_price.ex | imerkle/binance.ex | 01a842be8c9fefcb0d508d84edb3f1d42c3438c4 | [
"MIT"
] | null | null | null | lib/binance/symbol_price.ex | imerkle/binance.ex | 01a842be8c9fefcb0d508d84edb3f1d42c3438c4 | [
"MIT"
] | null | null | null | lib/binance/symbol_price.ex | imerkle/binance.ex | 01a842be8c9fefcb0d508d84edb3f1d42c3438c4 | [
"MIT"
] | null | null | null | defmodule Binance.SymbolPrice do
@moduledoc """
Struct for representing a result row as returned by /fapi/v1/ticker/allPrices
```
defstruct [:symbol, :price]
```
"""
defstruct [:symbol, :price]
use ExConstructor
end
| 18 | 79 | 0.688034 |
93189ee3dc2874b00837d4bdb730aa98cd307807 | 2,050 | ex | Elixir | web/controllers/column_values_controller.ex | sahilpaudel/AfterGlow | 0859ec14b47c8c5704cc8e5cba86d39aa258fff5 | [
"MIT"
] | null | null | null | web/controllers/column_values_controller.ex | sahilpaudel/AfterGlow | 0859ec14b47c8c5704cc8e5cba86d39aa258fff5 | [
"MIT"
] | null | null | null | web/controllers/column_values_controller.ex | sahilpaudel/AfterGlow | 0859ec14b47c8c5704cc8e5cba86d39aa258fff5 | [
"MIT"
] | null | null | null | defmodule AfterGlow.ColumnValueController do
use AfterGlow.Web, :controller
alias AfterGlow.ColumnValue
alias JaSerializer.Params
alias AfterGlow.Plugs.Authorization
plug Authorization
plug :authorize!, ColumnValue
plug :scrub_params, "data" when action in [:create, :update]
plug :verify_authorized
... | 31.538462 | 120 | 0.64878 |
9318e956f59e842db0458a12222f7b4af06ff3bb | 2,611 | ex | Elixir | lib/evaluation/graph/graph_creation.ex | DriesDeBackker/quarp-reactivity | 88e297818df4c9fd85af0c14dabe5edc4788ffd4 | [
"MIT"
] | 3 | 2019-07-18T12:43:25.000Z | 2020-11-26T00:28:26.000Z | lib/evaluation/graph/graph_creation.ex | DriesDeBackker/quarp-reactivity | 88e297818df4c9fd85af0c14dabe5edc4788ffd4 | [
"MIT"
] | null | null | null | lib/evaluation/graph/graph_creation.ex | DriesDeBackker/quarp-reactivity | 88e297818df4c9fd85af0c14dabe5edc4788ffd4 | [
"MIT"
] | null | null | null | defmodule Evaluation.Graph.GraphCreation do
@moduledoc false
alias Evaluation.Graph
def generateGraph(params) do
Graph.new(Keyword.get(params, :hosts))
|> generateVars(Keyword.get(params, :nb_of_vars))
|> generateSignalLevels(params)
end
defp generateVars(g, 0), do: g
defp generateVars(g, n) when is_inte... | 30.717647 | 94 | 0.675603 |
9318f1f850d8f59610bed67b67d9c4e04ddc4d10 | 159 | ex | Elixir | test/support/web/views/live_view.ex | bdfinlayson/drab | ce11a643ec8fe7e7f622489af5792ef12e69a8c7 | [
"MIT"
] | null | null | null | test/support/web/views/live_view.ex | bdfinlayson/drab | ce11a643ec8fe7e7f622489af5792ef12e69a8c7 | [
"MIT"
] | null | null | null | test/support/web/views/live_view.ex | bdfinlayson/drab | ce11a643ec8fe7e7f622489af5792ef12e69a8c7 | [
"MIT"
] | null | null | null | defmodule DrabTestApp.LiveView do
@moduledoc false
use DrabTestApp.Web, :view
@doc false
# for testing purposes only
def nodrab(term), do: term
end
| 17.666667 | 33 | 0.735849 |
9318fd61e40764d65613b73cf9e1b7aa5b404f96 | 1,561 | ex | Elixir | farmbot_core/lib/farmbot_core/bot_state_ng/location_data.ex | SeppPenner/farmbot_os | 39ba5c5880f8aef71792e2c009514bed1177089c | [
"MIT"
] | 1 | 2019-08-06T11:51:48.000Z | 2019-08-06T11:51:48.000Z | farmbot_core/lib/farmbot_core/bot_state_ng/location_data.ex | SeppPenner/farmbot_os | 39ba5c5880f8aef71792e2c009514bed1177089c | [
"MIT"
] | null | null | null | farmbot_core/lib/farmbot_core/bot_state_ng/location_data.ex | SeppPenner/farmbot_os | 39ba5c5880f8aef71792e2c009514bed1177089c | [
"MIT"
] | null | null | null | defmodule FarmbotCore.BotStateNG.LocationData do
@moduledoc false
alias FarmbotCore.BotStateNG.LocationData
use Ecto.Schema
import Ecto.Changeset
@primary_key false
defmodule Vec3 do
@moduledoc false
use Ecto.Schema
import Ecto.Changeset
@primary_key false
embedded_schema do
fi... | 21.383562 | 64 | 0.616272 |
93191266f059326861782831a7e2b1b1c301ad5b | 2,721 | ex | Elixir | day03/lib/day03.ex | bfollek/advent2018ex | d186976be414b8091677f2b9d9cab1adbf6eafe7 | [
"MIT"
] | null | null | null | day03/lib/day03.ex | bfollek/advent2018ex | d186976be414b8091677f2b9d9cab1adbf6eafe7 | [
"MIT"
] | null | null | null | day03/lib/day03.ex | bfollek/advent2018ex | d186976be414b8091677f2b9d9cab1adbf6eafe7 | [
"MIT"
] | null | null | null | defmodule Day03 do
@moduledoc """
Advent of Code 2018, day 3.
"""
use Private
defmodule Claim do
defstruct id: nil, left: nil, top: nil, width: nil, height: nil
end
@doc """
How many square inches of fabric are within two or more claims?
## Examples
iex> Day03.part1("data/day03.txt")
... | 28.642105 | 77 | 0.585814 |
9319441d0334a3051a9e5ef69f955718b4ffaa12 | 2,725 | exs | Elixir | playground_application/config/dev.exs | ajsharma/phoenix_playground | 695f6fbd8d309615e389a76f0bd8ad22eab58304 | [
"MIT"
] | null | null | null | playground_application/config/dev.exs | ajsharma/phoenix_playground | 695f6fbd8d309615e389a76f0bd8ad22eab58304 | [
"MIT"
] | null | null | null | playground_application/config/dev.exs | ajsharma/phoenix_playground | 695f6fbd8d309615e389a76f0bd8ad22eab58304 | [
"MIT"
] | null | null | null | import Config
# Configure your database
config :playground_application, PlaygroundApplication.Repo,
# username: "postgres",
# password: "postgres",
# database: "playground_application_dev",
# hostname: "localhost",
username: "postgres",
password: "postgres",
database: "playground_application_dev",
host... | 32.831325 | 86 | 0.727339 |
93194e5407a1fdd6b189f37ba1fbbf3925f046b9 | 316 | ex | Elixir | lib/maybe.ex | jesseshieh/towel | 4778ffb566f28ae077c073c9e0b78c06251406ab | [
"MIT"
] | 85 | 2015-07-27T16:59:41.000Z | 2021-12-22T08:20:23.000Z | lib/maybe.ex | jesseshieh/towel | 4778ffb566f28ae077c073c9e0b78c06251406ab | [
"MIT"
] | 3 | 2018-05-11T20:49:22.000Z | 2020-11-02T20:46:33.000Z | lib/maybe.ex | jesseshieh/towel | 4778ffb566f28ae077c073c9e0b78c06251406ab | [
"MIT"
] | 9 | 2015-08-20T19:30:34.000Z | 2021-11-07T13:44:56.000Z | defmodule Maybe do
def wrap(m = {:just, _}), do: m
def wrap(m = :nothing), do: m
def wrap(nil), do: nothing()
def wrap(v), do: just(v)
def unwrap({:just, v}), do: unwrap(v)
def unwrap(:nothing), do: nothing()
def unwrap(v), do: v
def just(v), do: {:just, unwrap(v)}
def nothing, do: :nothing
end | 22.571429 | 39 | 0.594937 |
9319562c1ba8a02ffae95c2dc28350aa24c8537e | 1,544 | exs | Elixir | mix.exs | ramondelemos/ecto_job | 781c6b43cfbfde866b0aa3f7370000910f684fe2 | [
"MIT"
] | null | null | null | mix.exs | ramondelemos/ecto_job | 781c6b43cfbfde866b0aa3f7370000910f684fe2 | [
"MIT"
] | null | null | null | mix.exs | ramondelemos/ecto_job | 781c6b43cfbfde866b0aa3f7370000910f684fe2 | [
"MIT"
] | null | null | null | defmodule EctoJob.Mixfile do
use Mix.Project
@version "4.0.0"
@url "https://github.com/mbuhot/ecto_job"
def project do
[
app: :ecto_job,
description: "A transactional job queue built with Ecto, PostgreSQL and GenStage.",
version: @version,
elixir: "~> 1.7",
elixirc_paths: eli... | 22.376812 | 89 | 0.545337 |
93195d722dfe3d546d83a4ffe643cc0092998633 | 2,605 | exs | Elixir | config/dev.exs | ethervoid/postoffice | 5cb275ed5e18ec8ff91523013c3b4215fe41a53f | [
"Apache-2.0"
] | null | null | null | config/dev.exs | ethervoid/postoffice | 5cb275ed5e18ec8ff91523013c3b4215fe41a53f | [
"Apache-2.0"
] | null | null | null | config/dev.exs | ethervoid/postoffice | 5cb275ed5e18ec8ff91523013c3b4215fe41a53f | [
"Apache-2.0"
] | null | null | null | use Mix.Config
# Configure your database
config :postoffice, Postoffice.Repo,
username: System.get_env("DB_USERNAME", "postgres"),
password: System.get_env("DB_PASSWORD", "postgres"),
database: System.get_env("DB_NAME", "postoffice_dev"),
hostname: System.get_env("DB_HOST", "localhost"),
port: System.get_env... | 29.269663 | 97 | 0.694818 |
93196ffc6dcec4e64b4dd6915fd95c81e098988c | 71 | ex | Elixir | testData/org/elixir_lang/refactoring/variable/rename/variable_used_declaration.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 1,668 | 2015-01-03T05:54:27.000Z | 2022-03-25T08:01:20.000Z | testData/org/elixir_lang/refactoring/variable/rename/variable_used_declaration.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 2,018 | 2015-01-01T22:43:39.000Z | 2022-03-31T20:13:08.000Z | testData/org/elixir_lang/refactoring/variable/rename/variable_used_declaration.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 145 | 2015-01-15T11:37:16.000Z | 2021-12-22T05:51:02.000Z | defmodule Used do
def Used do
us<caret>ed = 1
used
end
end
| 10.142857 | 19 | 0.619718 |
9319872ac0e013ba294fa9ffc0763fbb46f9c76a | 6,947 | ex | Elixir | clients/dfa_reporting/lib/google_api/dfa_reporting/v35/api/postal_codes.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/dfa_reporting/lib/google_api/dfa_reporting/v35/api/postal_codes.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/dfa_reporting/lib/google_api/dfa_reporting/v35/api/postal_codes.ex | dazuma/elixir-google-api | 6a9897168008efe07a6081d2326735fe332e522c | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 42.359756 | 196 | 0.625162 |
9319b9bd6f15bd1df8a0eecf6ebbb1345c955b84 | 3,493 | ex | Elixir | lib/gear_application/gear_application.ex | ikeyasu/antikythera | 544fdd22e46b1f34177053d87d9e2a9708c74113 | [
"Apache-2.0"
] | null | null | null | lib/gear_application/gear_application.ex | ikeyasu/antikythera | 544fdd22e46b1f34177053d87d9e2a9708c74113 | [
"Apache-2.0"
] | null | null | null | lib/gear_application/gear_application.ex | ikeyasu/antikythera | 544fdd22e46b1f34177053d87d9e2a9708c74113 | [
"Apache-2.0"
] | null | null | null | # Copyright(c) 2015-2018 ACCESS CO., LTD. All rights reserved.
use Croma
defmodule Antikythera.GearApplication do
@moduledoc """
Template for gear application module.
Invoking `use Antikythera.GearApplication` generates bunch of code, including (but not limited to)
- `Application` callbacks
- `Logger` mod... | 37.159574 | 128 | 0.724592 |
9319cee1385c447b71bedc12fc4edb8c3d8b626e | 4,069 | exs | Elixir | test/sanbase/social_data/social_volume_test.exs | sitedata/sanbase2 | 8da5e44a343288fbc41b68668c6c80ae8547d557 | [
"MIT"
] | 81 | 2017-11-20T01:20:22.000Z | 2022-03-05T12:04:25.000Z | test/sanbase/social_data/social_volume_test.exs | rmoorman/sanbase2 | 226784ab43a24219e7332c49156b198d09a6dd85 | [
"MIT"
] | 359 | 2017-10-15T14:40:53.000Z | 2022-01-25T13:34:20.000Z | test/sanbase/social_data/social_volume_test.exs | sitedata/sanbase2 | 8da5e44a343288fbc41b68668c6c80ae8547d557 | [
"MIT"
] | 16 | 2017-11-19T13:57:40.000Z | 2022-02-07T08:13:02.000Z | defmodule Sanbase.SocialVolumeTest do
use SanbaseWeb.ConnCase, async: false
import Mockery
import ExUnit.CaptureLog
alias Sanbase.SocialData.SocialVolume
alias Sanbase.SocialData.SocialHelper
alias Sanbase.SocialData.MetricAdapter
import Sanbase.Factory
setup do
project =
insert(:project, %{... | 28.858156 | 95 | 0.544606 |
9319fbe32c7592fade27e06dc5b09e8b927c98ad | 516 | ex | Elixir | lib/p2p.ex | beltranaceves/Elixir--P2P-Network | a4f4d14baa8cad994b26d3c8424752a36604e279 | [
"MIT"
] | null | null | null | lib/p2p.ex | beltranaceves/Elixir--P2P-Network | a4f4d14baa8cad994b26d3c8424752a36604e279 | [
"MIT"
] | null | null | null | lib/p2p.ex | beltranaceves/Elixir--P2P-Network | a4f4d14baa8cad994b26d3c8424752a36604e279 | [
"MIT"
] | null | null | null | defmodule P2P.Node do
@moduledoc """
Documentation for `P2P`.
"""
def start() do
pid = spawn(P2P, :controller, [%{}])
:discovery_server |> GenServer.call({:register_me, pid})
end
def send_to_player(player, flag, content) do
send(player, {flag, content})
end
@doc false
def controller(stat... | 19.111111 | 69 | 0.602713 |
931a668602030c6b6176c80c9aa654b8e68181db | 847 | exs | Elixir | deps/phoenix/priv/templates/phx.gen.channel/channel_test.exs | rpillar/Top5_Elixir | 9c450d2e9b291108ff1465dc066dfe442dbca822 | [
"MIT"
] | null | null | null | deps/phoenix/priv/templates/phx.gen.channel/channel_test.exs | rpillar/Top5_Elixir | 9c450d2e9b291108ff1465dc066dfe442dbca822 | [
"MIT"
] | null | null | null | deps/phoenix/priv/templates/phx.gen.channel/channel_test.exs | rpillar/Top5_Elixir | 9c450d2e9b291108ff1465dc066dfe442dbca822 | [
"MIT"
] | null | null | null | defmodule <%= module %>ChannelTest do
use <%= web_module %>.ChannelCase
setup do
{:ok, _, socket} =
socket(<%= web_module %>.UserSocket, "user_id", %{some: :assign})
|> subscribe_and_join(<%= module %>Channel, "<%= singular %>:lobby")
{:ok, socket: socket}
end
test "ping replie... | 31.37037 | 75 | 0.580874 |
931a79ee0093d4ce89bc24441d72359a7e58ed7b | 291 | exs | Elixir | config/runtime.exs | twajjo/runtime_config | 9777709caae436bc395b8ec7f37e99943ac7553a | [
"MIT"
] | null | null | null | config/runtime.exs | twajjo/runtime_config | 9777709caae436bc395b8ec7f37e99943ac7553a | [
"MIT"
] | null | null | null | config/runtime.exs | twajjo/runtime_config | 9777709caae436bc395b8ec7f37e99943ac7553a | [
"MIT"
] | null | null | null | use ExternalConfig
alias Runtime.Config.Helper
# include aliases to custom types or structs here...
config :runtime_config,
logging_level:
Helper.get_env(
"LOGGING_LEVEL",
type: :atom,
default: :info,
in_set: [:debug, :info, :warn, :error]
)
| 20.785714 | 53 | 0.628866 |
931a8fa8d7a3ee98115b48e23038e4339b53699e | 1,261 | ex | Elixir | ChatServer/web/channels/room_channel.ex | skellock/phoenix-react-native-mashup | 3c22b7ae060c0c2a5b18f459d6a65b7c6defbbe9 | [
"MIT"
] | 212 | 2016-02-13T16:29:29.000Z | 2021-11-14T18:32:43.000Z | ChatServer/web/channels/room_channel.ex | skellock/phoenix-react-native-mashup | 3c22b7ae060c0c2a5b18f459d6a65b7c6defbbe9 | [
"MIT"
] | 1 | 2016-10-19T20:56:27.000Z | 2016-12-07T01:47:10.000Z | ChatServer/web/channels/room_channel.ex | skellock/phoenix-react-native-mashup | 3c22b7ae060c0c2a5b18f459d6a65b7c6defbbe9 | [
"MIT"
] | 46 | 2016-02-15T21:57:12.000Z | 2021-07-06T21:53:37.000Z | defmodule Chat.RoomChannel do
use Phoenix.Channel
require Logger
@doc """
Authorize socket to subscribe and broadcast events on this channel & topic
Possible Return Values
`{:ok, socket}` to authorize subscription for channel for requested topic
`:ignore` to deny subscription/broadcast on this channel... | 26.829787 | 76 | 0.655829 |
931a91a9b93d9df33a62857d2a1e722a36d9a838 | 1,402 | ex | Elixir | templates/service.eex.ex | wrren/baiji_generator.ex | 7c36c0089d6b88576fa6e064e86c342f03729003 | [
"MIT"
] | null | null | null | templates/service.eex.ex | wrren/baiji_generator.ex | 7c36c0089d6b88576fa6e064e86c342f03729003 | [
"MIT"
] | null | null | null | templates/service.eex.ex | wrren/baiji_generator.ex | 7c36c0089d6b88576fa6e064e86c342f03729003 | [
"MIT"
] | null | null | null | defmodule Baiji.<%= module %> do
@moduledoc """
<%= spec.docs %>
"""
<%= for action <- spec.actions do %>
@doc """
<%= action.docs %>
"""
def <%= action.function_name %>(input \\ %{}, options \\ []) do
%Baiji.Operation{
path: "<%= action.uri %>",
input: ... | 26.45283 | 69 | 0.477175 |
931a975a892921fc99b5bdd0c99308c61bb6a790 | 2,486 | ex | Elixir | lib/html_sanitize_ex/scrubber/markdown_html.ex | MikeAndrianov/html_sanitize_ex | 91ca3dd14c5ce5d6eb41fca47afea4a47ddce1c7 | [
"MIT"
] | null | null | null | lib/html_sanitize_ex/scrubber/markdown_html.ex | MikeAndrianov/html_sanitize_ex | 91ca3dd14c5ce5d6eb41fca47afea4a47ddce1c7 | [
"MIT"
] | null | null | null | lib/html_sanitize_ex/scrubber/markdown_html.ex | MikeAndrianov/html_sanitize_ex | 91ca3dd14c5ce5d6eb41fca47afea4a47ddce1c7 | [
"MIT"
] | null | null | null | defmodule HtmlSanitizeEx.Scrubber.MarkdownHTML do
@moduledoc """
Allows basic HTML tags to support user input for writing relatively
plain text with Markdown (GitHub flavoured Markdown supported).
Technically this is a more relaxed version of the BasicHTML scrubber.
Does not allow any mailto-links, styling,... | 35.014085 | 73 | 0.746983 |
931a97c3b66f42ac4efb5a83b708cb15ef5e8858 | 2,119 | ex | Elixir | clients/tool_results/lib/google_api/tool_results/v1beta3/model/list_histories_response.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/tool_results/lib/google_api/tool_results/v1beta3/model/list_histories_response.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/tool_results/lib/google_api/tool_results/v1beta3/model/list_histories_response.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 ... | 39.240741 | 261 | 0.745163 |
931ab9ceb42037d351b63b293b28ab28ceedb245 | 2,431 | exs | Elixir | test/controllers/talk_controller_test.exs | pbrudnick/pyconar-talks | f0b2fdff9cae7bd7558cb4fdc5e0048403bbde7e | [
"MIT"
] | null | null | null | test/controllers/talk_controller_test.exs | pbrudnick/pyconar-talks | f0b2fdff9cae7bd7558cb4fdc5e0048403bbde7e | [
"MIT"
] | null | null | null | test/controllers/talk_controller_test.exs | pbrudnick/pyconar-talks | f0b2fdff9cae7bd7558cb4fdc5e0048403bbde7e | [
"MIT"
] | null | null | null | defmodule PyconarTalks.TalkControllerTest do
use PyconarTalks.ConnCase
alias PyconarTalks.Talk
@valid_attrs %{description: "some content", tags: "elixir", conf_key: 23, room: "Main", author: "Lambir", start: "11:00AM", disabled: true, name: "some content"}
@invalid_attrs %{}
setup %{conn: conn} do
{:ok,... | 34.239437 | 163 | 0.65035 |
931ac54bf54b2b1f0dc695ab4646d10b73ca2fca | 4,454 | ex | Elixir | lib/augur/transmission.ex | elarkham/animu | 0f0c7b0b34168e69255943bdede60e03df057a44 | [
"MIT"
] | 1 | 2018-01-02T06:59:08.000Z | 2018-01-02T06:59:08.000Z | lib/augur/transmission.ex | elarkham/Animu | 0f0c7b0b34168e69255943bdede60e03df057a44 | [
"MIT"
] | null | null | null | lib/augur/transmission.ex | elarkham/Animu | 0f0c7b0b34168e69255943bdede60e03df057a44 | [
"MIT"
] | null | null | null | defmodule Augur.Transmission do
@moduledoc """
Interface for Tranmission's JSON RPC API
"""
use GenServer
require Logger
alias HTTPoison.Response
alias Augur.Transmission.{
Torrent,
Cache,
}
##############
# Config #
##############
def config do
:animu
|> Application.get_... | 23.818182 | 81 | 0.566457 |
931b0709eead9b0f7a18fd307100fa922d7cfcef | 3,449 | ex | Elixir | lib/siwapp_web/live/recurring_invoices_live/index.ex | peillis/siwapp | f8c11ad2660574395d636674aa449c959f0f87f1 | [
"MIT"
] | 4 | 2015-02-12T09:23:47.000Z | 2022-03-09T18:11:06.000Z | lib/siwapp_web/live/recurring_invoices_live/index.ex | peillis/siwapp | f8c11ad2660574395d636674aa449c959f0f87f1 | [
"MIT"
] | 254 | 2021-12-09T14:40:41.000Z | 2022-03-31T08:09:37.000Z | lib/siwapp_web/live/recurring_invoices_live/index.ex | peillis/siwapp | f8c11ad2660574395d636674aa449c959f0f87f1 | [
"MIT"
] | 1 | 2022-03-07T10:25:49.000Z | 2022-03-07T10:25:49.000Z | defmodule SiwappWeb.RecurringInvoicesLive.Index do
@moduledoc false
use SiwappWeb, :live_view
import SiwappWeb.PageView, only: [money_format: 2]
alias Siwapp.Invoices.Statistics
alias Siwapp.RecurringInvoices
alias Siwapp.RecurringInvoices.RecurringInvoice
alias Siwapp.Searches
@recurring_invoices_li... | 26.945313 | 98 | 0.659611 |
931b558f90eb29367bb94a8d6a0710d22bc64eb3 | 3,115 | exs | Elixir | kousa/test/broth/user/get_relationship_test.exs | LeonardSSH/dogehouse | 584055ad407bc37fa35cdf36ebb271622e29d436 | [
"MIT"
] | 9 | 2021-03-17T03:56:18.000Z | 2021-09-24T22:45:14.000Z | kousa/test/broth/user/get_relationship_test.exs | ActuallyTomas/dogehouse | 8c3d2cd1d7e99e173f0658759467a391c4a90c4e | [
"MIT"
] | 12 | 2021-07-06T12:51:13.000Z | 2022-03-16T12:38:18.000Z | kousa/test/broth/user/get_relationship_test.exs | ActuallyTomas/dogehouse | 8c3d2cd1d7e99e173f0658759467a391c4a90c4e | [
"MIT"
] | 4 | 2021-07-15T20:33:50.000Z | 2022-03-27T12:46:47.000Z | defmodule BrothTest.User.GetRelationshipTest do
use ExUnit.Case, async: true
use KousaTest.Support.EctoSandbox
alias Beef.Schemas.User
alias BrothTest.WsClient
alias BrothTest.WsClientFactory
alias KousaTest.Support.Factory
require WsClient
setup do
user = Factory.create(User)
client_ws = WsC... | 22.572464 | 63 | 0.566292 |
931b6acb281723ea75cb4f267ec332d75c1b2224 | 807 | ex | Elixir | apps/evm/lib/evm/operation/sha3.ex | wolflee/mana | db66dac85addfaad98d40da5bd4082b3a0198bb1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 152 | 2018-10-27T04:52:03.000Z | 2022-03-26T10:34:00.000Z | apps/evm/lib/evm/operation/sha3.ex | wolflee/mana | db66dac85addfaad98d40da5bd4082b3a0198bb1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 270 | 2018-04-14T07:34:57.000Z | 2018-10-25T18:10:45.000Z | apps/evm/lib/evm/operation/sha3.ex | wolflee/mana | db66dac85addfaad98d40da5bd4082b3a0198bb1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 25 | 2018-10-27T12:15:13.000Z | 2022-01-25T20:31:14.000Z | defmodule EVM.Operation.Sha3 do
alias EVM.{Helpers, Operation, Stack}
alias ExthCrypto.Hash.Keccak
@doc """
Compute Keccak-256 hash.
## Examples
iex> EVM.Operation.Sha3.sha3([1, 0], %{machine_state: %EVM.MachineState{}})
%EVM.MachineState{active_words: 0, gas: nil, memory: "", program_counter: ... | 32.28 | 198 | 0.698885 |
931bbc88f35307cb2c6895f47067e41c25b4c85c | 169 | ex | Elixir | lib/pardall_web/views/content_helpers.ex | alfredbaudisch/pardall-markdown-phoenix-demo | 701fa5b312f00d4076b471d9f880ea56bb3c4119 | [
"Apache-2.0"
] | null | null | null | lib/pardall_web/views/content_helpers.ex | alfredbaudisch/pardall-markdown-phoenix-demo | 701fa5b312f00d4076b471d9f880ea56bb3c4119 | [
"Apache-2.0"
] | null | null | null | lib/pardall_web/views/content_helpers.ex | alfredbaudisch/pardall-markdown-phoenix-demo | 701fa5b312f00d4076b471d9f880ea56bb3c4119 | [
"Apache-2.0"
] | null | null | null | defmodule PardallWeb.ContentHelpers do
use Phoenix.HTML
use Phoenix.Component
def format_date(%DateTime{} = date), do: date |> Calendar.strftime("%B %d, %Y")
end
| 24.142857 | 81 | 0.721893 |
931bf4f1a3b938986cee2f60155826c53f91ac6d | 4,136 | ex | Elixir | lib/vekil/codi/proxy/generic.ex | ianrumford/plymio_vekil | 070ab783dc8f7747002df61704285947eea583a2 | [
"MIT"
] | null | null | null | lib/vekil/codi/proxy/generic.ex | ianrumford/plymio_vekil | 070ab783dc8f7747002df61704285947eea583a2 | [
"MIT"
] | null | null | null | lib/vekil/codi/proxy/generic.ex | ianrumford/plymio_vekil | 070ab783dc8f7747002df61704285947eea583a2 | [
"MIT"
] | null | null | null | defmodule Plymio.Vekil.Codi.Vekil.Proxy.Generic do
@moduledoc false
use Plymio.Vekil.Attribute
@vekil_state %{
state_vekil_proxy_defp_update_field_proxy_passthru:
quote do
defp update_field(%__MODULE__{} = state, {@plymio_vekil_field_proxy = k, v}) do
{:ok, state |> struct!([{k, v}])... | 31.815385 | 89 | 0.632253 |
931bf8b210c46676c113dcdb07a3de0124451e65 | 423 | ex | Elixir | lib/media_server_web/helpers.ex | midarrlabs/midarr-server | f12c6347e41a96517bbb5ed1ad12b65d10b8d30a | [
"MIT"
] | 538 | 2022-02-02T21:46:52.000Z | 2022-03-29T20:50:34.000Z | lib/media_server_web/helpers.ex | midarrlabs/midarr-server | f12c6347e41a96517bbb5ed1ad12b65d10b8d30a | [
"MIT"
] | 48 | 2022-02-03T11:46:09.000Z | 2022-03-31T04:44:53.000Z | lib/media_server_web/helpers.ex | midarrlabs/midarr-server | f12c6347e41a96517bbb5ed1ad12b65d10b8d30a | [
"MIT"
] | 15 | 2022-02-03T05:55:14.000Z | 2022-02-28T11:09:03.000Z | defmodule MediaServerWeb.Helpers do
def minutes_remaining_from_seconds(duration, current_time) do
ceil((duration - current_time) / 60)
end
def percentage_complete_from_seconds(current_time, duration) do
current_time / duration * 100
end
def get_pagination_previous_link(page_number) do
page_numbe... | 23.5 | 65 | 0.77305 |
931c1c2474cd0a909cd8d5b46af0e6b74034d923 | 10,071 | exs | Elixir | test/solverl_test.exs | bglusman/solverl | e12bf6ac3d58e885f7e212881991cbd669c6fe09 | [
"MIT"
] | null | null | null | test/solverl_test.exs | bglusman/solverl | e12bf6ac3d58e885f7e212881991cbd669c6fe09 | [
"MIT"
] | null | null | null | test/solverl_test.exs | bglusman/solverl | e12bf6ac3d58e885f7e212881991cbd669c6fe09 | [
"MIT"
] | null | null | null | defmodule SolverlTest do
use ExUnit.Case
doctest Solverl
import MinizincUtils
@nqueens_model resource_file("mzn/nqueens.mzn")
@sudoku_model resource_file("mzn/sudoku.mzn")
@aust_model resource_file("mzn/aust.mzn")
@test1_model resource_file("mzn/test1.mzn")
@test_data2 resource_file("mzn/test_data2.d... | 31.570533 | 111 | 0.61543 |
931c2464b70aa7a528f8c361057dda4e992f5ffd | 1,155 | exs | Elixir | exercises/02-higher-order-functions/total-cost/tests.exs | DennisWinnepenninckx/distributed-applications | 06743e4e2a09dc52ff52be831e486bb073916173 | [
"BSD-3-Clause"
] | 1 | 2021-09-22T09:52:11.000Z | 2021-09-22T09:52:11.000Z | exercises/02-higher-order-functions/total-cost/tests.exs | DennisWinnepenninckx/distributed-applications | 06743e4e2a09dc52ff52be831e486bb073916173 | [
"BSD-3-Clause"
] | 22 | 2019-06-19T18:58:13.000Z | 2020-03-16T14:43:06.000Z | exercises/02-higher-order-functions/total-cost/tests.exs | DennisWinnepenninckx/distributed-applications | 06743e4e2a09dc52ff52be831e486bb073916173 | [
"BSD-3-Clause"
] | 32 | 2019-09-19T03:25:11.000Z | 2020-10-06T15:01:47.000Z | defmodule Setup do
@script "shared.exs"
def setup(directory \\ ".") do
path = Path.join(directory, @script)
if File.exists?(path) do
Code.require_file(path)
Shared.setup(__DIR__)
else
setup(Path.join(directory, ".."))
end
end
end
Setup.setup
defmodule Tests do
use ExUnit.C... | 33.970588 | 97 | 0.57316 |
931c557fd0d3cb0aa9fc805be777d97cd56f7751 | 2,325 | ex | Elixir | lib/core/sum.ex | jamcito/telemetry_metrics_prometheus_core | 8892adde76bf424573baee5ef5873910f4765aaa | [
"Apache-2.0"
] | 29 | 2019-09-20T05:33:26.000Z | 2021-11-12T12:09:12.000Z | lib/core/sum.ex | jamcito/telemetry_metrics_prometheus_core | 8892adde76bf424573baee5ef5873910f4765aaa | [
"Apache-2.0"
] | 33 | 2019-09-15T04:27:04.000Z | 2022-01-30T15:58:59.000Z | lib/core/sum.ex | jamcito/telemetry_metrics_prometheus_core | 8892adde76bf424573baee5ef5873910f4765aaa | [
"Apache-2.0"
] | 16 | 2019-10-22T12:53:10.000Z | 2022-02-24T11:31:24.000Z | defmodule TelemetryMetricsPrometheus.Core.Sum do
@moduledoc false
alias Telemetry.Metrics
alias TelemetryMetricsPrometheus.Core.EventHandler
@type config :: %{
keep: Metrics.keep(),
measurement: atom(),
metric_name: String.t(),
name: Metrics.normalized_metric_name(),
... | 31.849315 | 92 | 0.596129 |
931c5908528908ee0f62a9c22041b2f5039d8933 | 642 | ex | Elixir | lib/jerboa/client/protocol/data.ex | ACollectionOfAtoms/jerboa | 16000d450bb60b544b5c91f0fd7540a31b6c90b8 | [
"Apache-2.0"
] | 14 | 2016-12-22T10:38:34.000Z | 2021-03-11T23:20:26.000Z | lib/jerboa/client/protocol/data.ex | ACollectionOfAtoms/jerboa | 16000d450bb60b544b5c91f0fd7540a31b6c90b8 | [
"Apache-2.0"
] | 94 | 2016-12-22T13:13:29.000Z | 2021-02-10T14:22:32.000Z | lib/jerboa/client/protocol/data.ex | ACollectionOfAtoms/jerboa | 16000d450bb60b544b5c91f0fd7540a31b6c90b8 | [
"Apache-2.0"
] | 6 | 2017-04-03T20:23:00.000Z | 2022-03-06T10:14:30.000Z | defmodule Jerboa.Client.Protocol.Data do
@moduledoc false
alias Jerboa.Params
alias Jerboa.Format.Body.Attribute.XORPeerAddress, as: XPA
alias Jerboa.Format.Body.Attribute.Data
alias Jerboa.Client
@spec eval_indication(Params.t)
:: {:ok, peer :: Client.address, binary} | :error
def eval_indication(p... | 29.181818 | 75 | 0.666667 |
931ccfd69392945efb0a0c67822999c033ac9a04 | 131 | ex | Elixir | lib/course_planner_web/views/user_view.ex | digitalnatives/course_planner | 27b1c8067edc262685e9c4dcbfcf82633bc8b8dc | [
"MIT"
] | 38 | 2017-04-11T13:37:38.000Z | 2021-05-22T19:35:36.000Z | lib/course_planner_web/views/user_view.ex | digitalnatives/course_planner | 27b1c8067edc262685e9c4dcbfcf82633bc8b8dc | [
"MIT"
] | 226 | 2017-04-07T13:14:14.000Z | 2018-03-08T16:50:11.000Z | lib/course_planner_web/views/user_view.ex | digitalnatives/course_planner | 27b1c8067edc262685e9c4dcbfcf82633bc8b8dc | [
"MIT"
] | 7 | 2017-08-30T23:58:13.000Z | 2021-03-28T11:50:45.000Z | defmodule CoursePlannerWeb.UserView do
@moduledoc false
use CoursePlannerWeb, :view
def page_title do
"Users"
end
end
| 14.555556 | 38 | 0.748092 |
931cdd0a154719a4ccd90b9828239db35ea309b6 | 833 | ex | Elixir | lib/show_me_the_code/room/watcher.ex | youzan/show-me-the-code | ec530ab87aecda213beb3f4fff3aa85b2df58802 | [
"MIT"
] | 161 | 2018-07-11T09:49:17.000Z | 2021-11-16T12:43:36.000Z | lib/show_me_the_code/room/watcher.ex | youzan/show-me-the-code | ec530ab87aecda213beb3f4fff3aa85b2df58802 | [
"MIT"
] | 8 | 2018-08-16T06:46:58.000Z | 2021-08-25T03:37:42.000Z | lib/show_me_the_code/room/watcher.ex | youzan/show-me-the-code | ec530ab87aecda213beb3f4fff3aa85b2df58802 | [
"MIT"
] | 18 | 2018-10-16T10:42:14.000Z | 2022-03-11T10:49:24.000Z | defmodule ShowMeTheCode.Room.Watcher do
use GenServer
alias ShowMeTheCode.Room.Bucket
def start_link(_) do
GenServer.start_link(__MODULE__, :ok, name: __MODULE__)
end
@impl true
def init(:ok) do
{:ok, %{}}
end
@impl true
def handle_cast({:monitor, socket}, state) do
ref = Process.monit... | 21.921053 | 94 | 0.671068 |
931cf71388e3e3ca4de95bcd177632c7e4394dd1 | 788 | ex | Elixir | web/router.ex | dogIDs/sponsor-dot-dog | 07b7fe90ee12157c144d0d164ca8035e509e59bb | [
"MIT"
] | null | null | null | web/router.ex | dogIDs/sponsor-dot-dog | 07b7fe90ee12157c144d0d164ca8035e509e59bb | [
"MIT"
] | 1 | 2016-03-28T03:13:34.000Z | 2020-08-11T22:26:12.000Z | web/router.ex | dogIDs/sponsor-dot-dog | 07b7fe90ee12157c144d0d164ca8035e509e59bb | [
"MIT"
] | null | null | null | defmodule SponsorDotDog.Router do
use SponsorDotDog.Web, :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 "/", SponsorDotDog... | 26.266667 | 102 | 0.689086 |
931cfbe46c7dd616b7dfd63c66d6ab818bacee6d | 4,929 | ex | Elixir | lib/rig_inbound_gateway/api_proxy/api.ex | steveoliver/reactive-interaction-gateway | 59b6dc994fd0f098bed19b7bf1e699513ac87167 | [
"Apache-2.0"
] | 518 | 2017-11-09T13:10:49.000Z | 2022-03-28T14:29:50.000Z | lib/rig_inbound_gateway/api_proxy/api.ex | steveoliver/reactive-interaction-gateway | 59b6dc994fd0f098bed19b7bf1e699513ac87167 | [
"Apache-2.0"
] | 270 | 2017-11-10T00:11:34.000Z | 2022-02-27T13:08:16.000Z | lib/rig_inbound_gateway/api_proxy/api.ex | steveoliver/reactive-interaction-gateway | 59b6dc994fd0f098bed19b7bf1e699513ac87167 | [
"Apache-2.0"
] | 67 | 2017-12-19T20:16:37.000Z | 2022-03-31T10:43:04.000Z | defmodule RigInboundGateway.ApiProxy.Api do
@moduledoc """
Service definitions for the proxy.
"""
@type endpoint :: %{
optional(:secured) => boolean,
optional(:transform_request_headers) => boolean,
optional(:target) => String.t(),
optional(:topic) => String.t(),
... | 31.394904 | 98 | 0.586529 |
931d1760fe08d645e4479bfb28fcf8f6250d8a8b | 696 | ex | Elixir | lib/graphql/types/viewer.ex | samuelnygaard/accent | db753badab1d885397b48a42ac3fb43024345467 | [
"BSD-3-Clause"
] | null | null | null | lib/graphql/types/viewer.ex | samuelnygaard/accent | db753badab1d885397b48a42ac3fb43024345467 | [
"BSD-3-Clause"
] | 2 | 2021-09-28T05:37:00.000Z | 2022-02-26T10:10:15.000Z | lib/graphql/types/viewer.ex | samuelnygaard/accent | db753badab1d885397b48a42ac3fb43024345467 | [
"BSD-3-Clause"
] | null | null | null | defmodule Accent.GraphQL.Types.Viewer do
use Absinthe.Schema.Notation
import Accent.GraphQL.Helpers.Authorization
object :viewer do
field(:user, :user)
field :permissions, list_of(:string) do
resolve(viewer_authorize(:index_permissions, &Accent.GraphQL.Resolvers.Permission.list_viewer/3))
end... | 25.777778 | 103 | 0.715517 |
931d31a0a6b457d66c623439068ec82191e3bef8 | 1,609 | ex | Elixir | server/lib/freedom_account/release.ex | randycoulman/freedomAccount | c1c51a765052aa318ad3a504a396e8d07a770195 | [
"MIT"
] | 6 | 2019-04-03T19:16:01.000Z | 2020-08-10T09:38:24.000Z | server/lib/freedom_account/release.ex | randycoulman/freedomAccount | c1c51a765052aa318ad3a504a396e8d07a770195 | [
"MIT"
] | 32 | 2019-03-19T02:45:45.000Z | 2021-12-05T06:58:07.000Z | server/lib/freedom_account/release.ex | randycoulman/freedomAccount | c1c51a765052aa318ad3a504a396e8d07a770195 | [
"MIT"
] | null | null | null | defmodule FreedomAccount.Release do
@moduledoc """
Tasks to run in a released application.
These tasks allow us to run database migrations and seeding for the released
application. They are used by custom distillery commands (see
`server/rel/commands`).
Adapted from https://hexdocs.pm/ecto_sql/Ecto.Migra... | 22.041096 | 91 | 0.63642 |
931d322844dc368aca89c02a265014f4a9ff8c54 | 2,653 | ex | Elixir | clients/dialogflow/lib/google_api/dialogflow/v3/model/google_cloud_dialogflow_cx_v3_export_test_cases_request.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/dialogflow/lib/google_api/dialogflow/v3/model/google_cloud_dialogflow_cx_v3_export_test_cases_request.ex | MMore/elixir-google-api | 0574ec1439d9bbfe22d63965be1681b0f45a94c9 | [
"Apache-2.0"
] | null | null | null | clients/dialogflow/lib/google_api/dialogflow/v3/model/google_cloud_dialogflow_cx_v3_export_test_cases_request.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... | 45.741379 | 555 | 0.733132 |
931d53b20bb1678cec15ffaf53d2459265c56a46 | 68 | exs | Elixir | test/zxcvbn/data/adjacency_graphs_test.exs | ayonix/zxcvbn-ex | ce5f1a9f5ca3b7b17c895fc237e12cdede85da38 | [
"MIT"
] | 2 | 2018-10-09T20:17:08.000Z | 2018-10-18T23:30:49.000Z | test/zxcvbn/data/adjacency_graphs_test.exs | ayonix/zxcvbn-ex | ce5f1a9f5ca3b7b17c895fc237e12cdede85da38 | [
"MIT"
] | 13 | 2018-10-06T08:03:23.000Z | 2019-10-02T18:50:43.000Z | test/zxcvbn/data/adjacency_graphs_test.exs | ayonix/zxcvbn-ex | ce5f1a9f5ca3b7b17c895fc237e12cdede85da38 | [
"MIT"
] | 7 | 2018-10-06T10:14:41.000Z | 2019-10-01T09:29:44.000Z | defmodule Zxcvbn.Data.AdjcacencyGraphsTest do
use ExUnit.Case
end
| 17 | 45 | 0.838235 |
931d674b96129b13b3244721cb95f8ef17d2903b | 5,720 | ex | Elixir | lib/floki/finder.ex | nathanl/floki | 042b3f60f4d9a6218ec85d558d13cc6dac30c587 | [
"MIT"
] | 1,778 | 2015-01-07T14:12:31.000Z | 2022-03-29T22:42:48.000Z | lib/floki/finder.ex | nathanl/floki | 042b3f60f4d9a6218ec85d558d13cc6dac30c587 | [
"MIT"
] | 279 | 2015-01-01T15:54:50.000Z | 2022-03-28T18:06:03.000Z | deps/floki/lib/floki/finder.ex | adrianomota/blog | ef3b2d2ed54f038368ead8234d76c18983caa75b | [
"MIT"
] | 166 | 2015-04-24T20:48:02.000Z | 2022-03-28T17:29:05.000Z | defmodule Floki.Finder do
require Logger
@moduledoc false
# The finder engine traverse the HTML tree searching for nodes matching
# selectors.
alias Floki.{HTMLTree, Selector}
alias HTMLTree.HTMLNode
# Find elements inside a HTML tree.
# Second argument can be either a selector string, a selector st... | 29.035533 | 101 | 0.673776 |
931d6d1a54bd49ca88b3b37e3a6dde6f6f26cb88 | 2,413 | ex | Elixir | DL-TBRG/DL-TBRG (resolution=0.1).ex | johannesE/decentlab-decoders | c290ea1218de2c82d665fdc9f71f16682e12d917 | [
"MIT"
] | 1 | 2021-06-25T10:36:07.000Z | 2021-06-25T10:36:07.000Z | DL-TBRG/DL-TBRG (resolution=0.1).ex | johannesE/decentlab-decoders | c290ea1218de2c82d665fdc9f71f16682e12d917 | [
"MIT"
] | null | null | null | DL-TBRG/DL-TBRG (resolution=0.1).ex | johannesE/decentlab-decoders | c290ea1218de2c82d665fdc9f71f16682e12d917 | [
"MIT"
] | null | null | null |
# https://www.decentlab.com/support
defmodule DecentlabDecoder do
@protocol_version 2
# device-specific parameters
@resolution 0.1
defp sensor_defs do
[
%{
length: 4,
values: [
%{
:name => "Precipitation in interval",
:convert => fn x -> Enum.at(x,... | 25.4 | 105 | 0.535847 |
931d80ac8db54693ef487ed32f03b5c5c07cdcbf | 1,817 | ex | Elixir | lib/poxa/registry.ex | robktek/poxa | 1c330789735f9bc1e91c3dfa7a10edb3aff50aab | [
"MIT"
] | null | null | null | lib/poxa/registry.ex | robktek/poxa | 1c330789735f9bc1e91c3dfa7a10edb3aff50aab | [
"MIT"
] | null | null | null | lib/poxa/registry.ex | robktek/poxa | 1c330789735f9bc1e91c3dfa7a10edb3aff50aab | [
"MIT"
] | null | null | null | defmodule Poxa.Registry do
alias Poxa.PresenceSubscription
@doc """
Registers a property for the current process.
"""
@callback register!(binary) :: any
@doc """
Registers a property for the current process with a given value.
"""
@callback register!(binary, any) :: any
@doc """
Unregisters a p... | 26.333333 | 98 | 0.681893 |
931db28a3f9c6a9c5ec99c64de5e9ede61477dd4 | 2,177 | ex | Elixir | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/video_format.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/video_format.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/dfa_reporting/lib/google_api/dfa_reporting/v33/model/video_format.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.898305 | 168 | 0.702343 |
931db968faae479aff263290da2ca56b67748aba | 3,187 | ex | Elixir | apps/omg_watcher/lib/omg_watcher/exit_processor/double_spend.ex | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | null | null | null | apps/omg_watcher/lib/omg_watcher/exit_processor/double_spend.ex | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | null | null | null | apps/omg_watcher/lib/omg_watcher/exit_processor/double_spend.ex | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019-2020 OmiseGO Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 38.39759 | 118 | 0.720113 |
931dbf36babf8414315631351077cd60ad90107b | 520 | ex | Elixir | 5-BinaryBoarding/lib/binary_boarding.ex | dvrensk/advent-of-code-2020 | 237e80da9958f37e51c0ac84da74bec5fec1f185 | [
"Unlicense"
] | 1 | 2020-12-02T01:34:06.000Z | 2020-12-02T01:34:06.000Z | 5-BinaryBoarding/lib/binary_boarding.ex | dvrensk/advent-of-code-2020 | 237e80da9958f37e51c0ac84da74bec5fec1f185 | [
"Unlicense"
] | null | null | null | 5-BinaryBoarding/lib/binary_boarding.ex | dvrensk/advent-of-code-2020 | 237e80da9958f37e51c0ac84da74bec5fec1f185 | [
"Unlicense"
] | null | null | null | defmodule BinaryBoarding do
@doc """
## Examples
iex> BinaryBoarding.seat_id("BFFFBBFRRR")
567
iex> BinaryBoarding.seat_id("FFFBBBFRRR")
119
iex> BinaryBoarding.seat_id("BBFFBBFRLL")
820
"""
def seat_id(str) do
str
|> String.replace(~w[B R], "1")
|> String.replace(~w[F L], "0")
|> St... | 20.8 | 54 | 0.605769 |
931ddfa548c5b686b9bd18a319c63c256b1099c9 | 851 | exs | Elixir | test/scenic/primitive/style/scissor_test.exs | tiger808/scenic | 77abc6d891b7a1a9262cdc47d7c5fac3c8609d1f | [
"Apache-2.0"
] | 1,716 | 2018-09-07T21:55:43.000Z | 2022-03-31T16:16:30.000Z | test/scenic/primitive/style/scissor_test.exs | tiger808/scenic | 77abc6d891b7a1a9262cdc47d7c5fac3c8609d1f | [
"Apache-2.0"
] | 220 | 2018-09-08T01:28:00.000Z | 2022-03-22T03:55:17.000Z | test/scenic/primitive/style/scissor_test.exs | tiger808/scenic | 77abc6d891b7a1a9262cdc47d7c5fac3c8609d1f | [
"Apache-2.0"
] | 137 | 2018-09-07T21:55:56.000Z | 2022-03-26T04:07:27.000Z | #
# Created by Boyd Multerer on 2018-06-18.
# Copyright © 2018 Kry10 Industries. All rights reserved.
#
defmodule Scenic.Primitive.Style.ScissorTest do
use ExUnit.Case, async: true
doctest Scenic
alias Scenic.Primitive.Style
alias Scenic.Primitive.Style.Scissor
test "info works" do
assert Scissor.inf... | 21.820513 | 80 | 0.626322 |
931e110aa6c39defbd45ab1aafd02896e4e758b7 | 1,133 | ex | Elixir | test/support/channel_case.ex | brandocms/brando | 4198e0c0920031bd909969055064e4e2b7230d21 | [
"MIT"
] | 4 | 2020-10-30T08:40:38.000Z | 2022-01-07T22:21:37.000Z | test/support/channel_case.ex | brandocms/brando | 4198e0c0920031bd909969055064e4e2b7230d21 | [
"MIT"
] | 1,162 | 2020-07-05T11:20:15.000Z | 2022-03-31T06:01:49.000Z | test/support/channel_case.ex | brandocms/brando | 4198e0c0920031bd909969055064e4e2b7230d21 | [
"MIT"
] | null | null | null | defmodule Brando.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 with ... | 27.634146 | 79 | 0.732568 |
931e5cf02339edb01227a1167d9828726ad2725e | 385 | ex | Elixir | priv/catalogue/hergetto_web/navbar/playground.ex | dusthijsvdh/hergetto | 87598d8023a68fdb23b0eeb7659f5c61113997c9 | [
"MIT"
] | 8 | 2021-03-07T16:24:05.000Z | 2022-02-28T02:36:35.000Z | priv/catalogue/hergetto_web/navbar/playground.ex | dusthijsvdh/hergetto | 87598d8023a68fdb23b0eeb7659f5c61113997c9 | [
"MIT"
] | 126 | 2021-02-15T10:51:07.000Z | 2022-03-28T02:25:01.000Z | priv/catalogue/hergetto_web/navbar/playground.ex | dusthijsvdh/hergetto | 87598d8023a68fdb23b0eeb7659f5c61113997c9 | [
"MIT"
] | null | null | null | defmodule HergettoWeb.Components.Navbar.Playground do
use Surface.Catalogue.Playground,
subject: HergettoWeb.Components.Navbar,
height: "300px",
body: [style: "padding: 1.5rem;"]
data props, :map, default: %{
room: %{
name: "The Cool Kid Room",
private?: true
},
}
def render(as... | 19.25 | 53 | 0.6 |
931e737838f79718c721d40aff70a893410da1a5 | 2,610 | ex | Elixir | clients/big_query/lib/google_api/big_query/v2/model/view_definition.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/big_query/lib/google_api/big_query/v2/model/view_definition.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/big_query/lib/google_api/big_query/v2/model/view_definition.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 42.786885 | 333 | 0.727203 |
931e80fd86ae1a15880bfb7617755fd0544845c0 | 72 | ex | Elixir | apps/core/lib/core/pubsub/broadcaster.ex | michaeljguarino/forge | 50ee583ecb4aad5dee4ef08fce29a8eaed1a0824 | [
"Apache-2.0"
] | 59 | 2021-09-16T19:29:39.000Z | 2022-03-31T20:44:24.000Z | apps/core/lib/core/pubsub/broadcaster.ex | svilenkov/plural | ac6c6cc15ac4b66a3b5e32ed4a7bee4d46d1f026 | [
"Apache-2.0"
] | 111 | 2021-08-15T09:56:37.000Z | 2022-03-31T23:59:32.000Z | apps/core/lib/core/pubsub/broadcaster.ex | svilenkov/plural | ac6c6cc15ac4b66a3b5e32ed4a7bee4d46d1f026 | [
"Apache-2.0"
] | 4 | 2021-12-13T09:43:01.000Z | 2022-03-29T18:08:44.000Z | defmodule Core.PubSub.Broadcaster do
use Piazza.PubSub.Broadcaster
end | 24 | 36 | 0.847222 |
931e816ed4dc838392561a88386c9a51166935d8 | 1,642 | ex | Elixir | lib/gen/room.ex | MathyouMB/scored | 403b109975c6819d21961e13a38d1d73aa3ee25d | [
"MIT"
] | 4 | 2021-03-29T10:36:12.000Z | 2021-04-23T19:41:09.000Z | lib/gen/room.ex | MathyouMB/scored | 403b109975c6819d21961e13a38d1d73aa3ee25d | [
"MIT"
] | 3 | 2021-04-22T04:32:22.000Z | 2021-04-24T00:26:19.000Z | lib/gen/room.ex | MathyouMB/scored | 403b109975c6819d21961e13a38d1d73aa3ee25d | [
"MIT"
] | null | null | null | defmodule Scored.Gen.Room do
use GenServer
def start_link(uuid) do
{:ok, pid} = GenServer.start_link(__MODULE__, :ok)
Registry.Rooms
|> Registry.register(uuid, pid)
{:ok, pid}
end
def init(:ok) do
{:ok,
%{
votes: [],
hidden: true,
member_count: 0
}}
end
... | 20.78481 | 64 | 0.648599 |
931ea5da1651a896cfb8064cc556ac48993cee30 | 6,369 | ex | Elixir | lib/task_bunny/job.ex | salemove/task_bunny | f1a69291b47f59cab1c010d48fda7551132ae51c | [
"MIT"
] | null | null | null | lib/task_bunny/job.ex | salemove/task_bunny | f1a69291b47f59cab1c010d48fda7551132ae51c | [
"MIT"
] | 3 | 2019-08-13T13:05:26.000Z | 2021-11-10T08:12:51.000Z | lib/task_bunny/job.ex | salemove/task_bunny | f1a69291b47f59cab1c010d48fda7551132ae51c | [
"MIT"
] | null | null | null | defmodule TaskBunny.Job do
@moduledoc """
Behaviour module for implementing a TaskBunny job.
TaskBunny job is an asynchronous background job whose execution request is
enqueued to RabbitMQ and performed in a worker process.
defmodule HelloJob do
use TaskBunny.Job
def perform(%{"name" =>... | 27.934211 | 116 | 0.6607 |
931eff031e2eb3676b22433b3d5381eb80e2a14b | 677 | ex | Elixir | lib/accent/case/snake.ex | neVERberleRfellerER/accent | b6725d547f877e5173509e806bb4330e09f7542e | [
"MIT"
] | 15 | 2017-04-13T05:09:16.000Z | 2019-04-12T16:43:40.000Z | lib/accent/case/snake.ex | neVERberleRfellerER/accent | b6725d547f877e5173509e806bb4330e09f7542e | [
"MIT"
] | 15 | 2019-12-24T03:55:30.000Z | 2021-07-23T14:04:45.000Z | lib/accent/case/snake.ex | neVERberleRfellerER/accent | b6725d547f877e5173509e806bb4330e09f7542e | [
"MIT"
] | 11 | 2017-09-01T14:08:10.000Z | 2019-12-22T03:22:56.000Z | defmodule Accent.Case.Snake do
@moduledoc """
Converts the given binary or atom to `snake_case`.
"""
@behaviour Accent.Case
def call(atom) when is_atom(atom) do
String.to_atom(call(to_string(atom)))
end
def call(""), do: ""
def call(<<h::utf8, t::binary>>) do
String.downcase(<<h>>) <> do_tra... | 19.911765 | 54 | 0.592319 |
931f0ab1d121ae0402ef84cf06229b6e4102e33c | 121 | ex | Elixir | examples/elixir-phoenix/lib/railway_phoenix/repo.ex | manumayank/starters | 194ea6d35457c55d0fcd571894b089419f876a4d | [
"MIT"
] | 23 | 2020-07-10T22:33:13.000Z | 2021-01-12T04:19:54.000Z | examples/elixir-phoenix/lib/railway_phoenix/repo.ex | manumayank/starters | 194ea6d35457c55d0fcd571894b089419f876a4d | [
"MIT"
] | 7 | 2021-10-05T01:50:40.000Z | 2021-12-14T06:35:22.000Z | examples/elixir-phoenix/lib/railway_phoenix/repo.ex | manumayank/starters | 194ea6d35457c55d0fcd571894b089419f876a4d | [
"MIT"
] | 3 | 2020-08-27T01:33:25.000Z | 2020-12-15T18:19:43.000Z | defmodule RailwayPhoenix.Repo do
use Ecto.Repo,
otp_app: :railway_phoenix,
adapter: Ecto.Adapters.Postgres
end
| 20.166667 | 35 | 0.760331 |
931f287c29fab28b5943d47c80ab94416f0dd531 | 491 | ex | Elixir | lib/sbom_poc_web/views/error_view.ex | TraceyOnim/SbomPoc-sFractal | bac895a7eda61c47c00b8bbe682a6fda4dd7255c | [
"MIT"
] | 2 | 2020-10-04T12:41:58.000Z | 2021-03-11T20:51:26.000Z | lib/sbom_poc_web/views/error_view.ex | TraceyOnim/SbomPoc-sFractal | bac895a7eda61c47c00b8bbe682a6fda4dd7255c | [
"MIT"
] | 113 | 2020-07-25T02:29:33.000Z | 2022-03-01T01:07:23.000Z | lib/sbom_poc_web/views/error_view.ex | TraceyOnim/SbomPoc-sFractal | bac895a7eda61c47c00b8bbe682a6fda4dd7255c | [
"MIT"
] | 5 | 2020-07-10T09:57:58.000Z | 2021-03-11T20:51:29.000Z | defmodule SbomPocWeb.ErrorView do
use SbomPocWeb, :view
# If you want to customize a particular status code
# for a certain format, you may uncomment below.
# def render("500.html", _assigns) do
# "Internal Server Error"
# end
# By default, Phoenix returns the status message from
# the template name... | 28.882353 | 61 | 0.735234 |
931f3e4e56d92da18c3d82b1e3d33051d116c3b0 | 208 | exs | Elixir | backend/priv/repo/migrations/20181025172733_add_images_to_items.exs | ericgroom/gatorgoods | c78af60f463c6c8c6762101a2d8e7102d43bd804 | [
"MIT"
] | null | null | null | backend/priv/repo/migrations/20181025172733_add_images_to_items.exs | ericgroom/gatorgoods | c78af60f463c6c8c6762101a2d8e7102d43bd804 | [
"MIT"
] | 9 | 2020-02-12T00:40:03.000Z | 2021-12-09T01:11:33.000Z | backend/priv/repo/migrations/20181025172733_add_images_to_items.exs | ericgroom/gatorgoods | c78af60f463c6c8c6762101a2d8e7102d43bd804 | [
"MIT"
] | null | null | null | defmodule Backend.Repo.Migrations.AddImagesToItems do
use Ecto.Migration
def change do
alter table(:items) do
add :image_binary, :binary
add :image_binary_type, :string
end
end
end
| 18.909091 | 53 | 0.711538 |
931f3f4a73bc066b30b92f27abcafec3cef2c447 | 554 | exs | Elixir | elixir/mix.exs | kintoproj/kinto-examples | 8903127efab78424da936ff1516d3872dd997aaa | [
"Apache-2.0"
] | null | null | null | elixir/mix.exs | kintoproj/kinto-examples | 8903127efab78424da936ff1516d3872dd997aaa | [
"Apache-2.0"
] | null | null | null | elixir/mix.exs | kintoproj/kinto-examples | 8903127efab78424da936ff1516d3872dd997aaa | [
"Apache-2.0"
] | 1 | 2021-08-02T17:57:11.000Z | 2021-08-02T17:57:11.000Z | defmodule ElixirExample.MixProject do
use Mix.Project
def project do
[
app: :elixir_example,
version: "0.1.0",
elixir: "~> 1.10",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
... | 19.103448 | 59 | 0.583032 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.