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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e936a9d495a0456b3fbdec2393f70861ad36ee5f | 650 | ex | Elixir | lib/zaryn_web/controllers/api/types/public_key.ex | ambareesha7/node-zaryn | 136e542801bf9b6fa4a015d3464609fdf3dacee8 | [
"Apache-2.0"
] | 1 | 2021-07-06T19:47:14.000Z | 2021-07-06T19:47:14.000Z | lib/zaryn_web/controllers/api/types/public_key.ex | ambareesha7/node-zaryn | 136e542801bf9b6fa4a015d3464609fdf3dacee8 | [
"Apache-2.0"
] | null | null | null | lib/zaryn_web/controllers/api/types/public_key.ex | ambareesha7/node-zaryn | 136e542801bf9b6fa4a015d3464609fdf3dacee8 | [
"Apache-2.0"
] | null | null | null | defmodule ZarynWeb.API.Types.PublicKey do
@moduledoc false
use Ecto.Type
alias Zaryn.Crypto
def type, do: :binary
def cast(public_key) when is_binary(public_key) do
with {:ok, binary} <- Base.decode16(public_key, case: :mixed),
true <- Crypto.valid_public_key?(binary) do
{:ok, binary}
... | 21.666667 | 66 | 0.623077 |
e936acb3cd08a6c9cb006192e213e977fa00c2b8 | 494 | exs | Elixir | elixir/flatten-array/flatten_array.exs | macborowy/exercism | c5d45e074e81b946a82a340b2730e0d2732b7e0a | [
"MIT"
] | null | null | null | elixir/flatten-array/flatten_array.exs | macborowy/exercism | c5d45e074e81b946a82a340b2730e0d2732b7e0a | [
"MIT"
] | null | null | null | elixir/flatten-array/flatten_array.exs | macborowy/exercism | c5d45e074e81b946a82a340b2730e0d2732b7e0a | [
"MIT"
] | null | null | null | defmodule Flattener do
@doc """
Accept a list and return the list flattened without nil values.
## Examples
iex> Flattener.flatten([1, [2], 3, nil])
[1,2,3]
iex> Flattener.flatten([nil, nil])
[]
"""
@spec flatten(list) :: list
def flatten([]), do: []
def flatten([[] | t]), ... | 23.52381 | 68 | 0.566802 |
e936b0bfb9d49bf8a1905f31011fb51bc7a10d59 | 3,200 | exs | Elixir | config/prod.exs | ramortegui/stabby-flies | f1d0bd61a2b9f3aed33231bbdcec19b011534536 | [
"MIT"
] | null | null | null | config/prod.exs | ramortegui/stabby-flies | f1d0bd61a2b9f3aed33231bbdcec19b011534536 | [
"MIT"
] | null | null | null | config/prod.exs | ramortegui/stabby-flies | f1d0bd61a2b9f3aed33231bbdcec19b011534536 | [
"MIT"
] | null | null | null | use Mix.Config
# For production, don't forget to configure the url host
# to something meaningful, Phoenix uses this information
# when generating URLs.
#
# Note we also include the path to a cache manifest
# containing the digested version of static files. This
# manifest is generated by the `mix phx.digest` task,
# ... | 34.782609 | 93 | 0.714063 |
e93758dad07a9090c826ab416fd736f4bb6e662f | 867 | ex | Elixir | lib/excommerce_web/controllers/product_controller.ex | roger120981/planet | a662006551d11427c08cf6cdbacd37d377bcd9c5 | [
"MIT"
] | 1 | 2019-04-01T19:14:16.000Z | 2019-04-01T19:14:16.000Z | lib/excommerce_web/controllers/product_controller.ex | roger120981/planet | a662006551d11427c08cf6cdbacd37d377bcd9c5 | [
"MIT"
] | null | null | null | lib/excommerce_web/controllers/product_controller.ex | roger120981/planet | a662006551d11427c08cf6cdbacd37d377bcd9c5 | [
"MIT"
] | 1 | 2019-03-24T01:50:48.000Z | 2019-03-24T01:50:48.000Z | defmodule ExcommerceWeb.ProductController do
use ExcommerceWeb, :controller
alias Excommerce.Query
#alias Excommerce.SearchProduct
alias Excommerce.Repo
plug :get_root_categories
def index(conn, _params) do
categories = Query.Category.with_associated_products(Repo)
products = Query.Product.prod... | 25.5 | 76 | 0.731257 |
e9376ee979c7e0727fc73a18cfbaa6863733833e | 895 | ex | Elixir | apps/auth_engine/lib/api/auth_check.ex | dottogame/overdot | 95aee9621e7036ab4857f49c6a745aaca4d645c5 | [
"MIT"
] | null | null | null | apps/auth_engine/lib/api/auth_check.ex | dottogame/overdot | 95aee9621e7036ab4857f49c6a745aaca4d645c5 | [
"MIT"
] | null | null | null | apps/auth_engine/lib/api/auth_check.ex | dottogame/overdot | 95aee9621e7036ab4857f49c6a745aaca4d645c5 | [
"MIT"
] | null | null | null | defmodule Api.AuthCheck do
use Raxx.Server
@impl Raxx.Server
def handle_request(req, state) do
[_, user_id, access_token] = req.path
# lookup user
{status, user_lookup} =
state.db
|> Couchdb.Connector.Reader.get(user_id)
if status == :ok do
# if the user was found, verify auth... | 25.571429 | 61 | 0.572067 |
e9379b87f9b0e61aa704fcd8580ad176a5d31741 | 616 | exs | Elixir | server/test/features/create_message_test.exs | rafbgarcia/conn | e23e09a8be900bc72c083780693d0fe5bd7cbd99 | [
"MIT"
] | null | null | null | server/test/features/create_message_test.exs | rafbgarcia/conn | e23e09a8be900bc72c083780693d0fe5bd7cbd99 | [
"MIT"
] | 3 | 2021-04-27T14:11:46.000Z | 2021-04-27T16:00:42.000Z | server/test/features/create_message_test.exs | rafbgarcia/conn | e23e09a8be900bc72c083780693d0fe5bd7cbd99 | [
"MIT"
] | null | null | null | defmodule Connect.Features.MessageThreads do
use ConnectWeb.ConnCase
test "Creates a message for the current user in a given channel" do
query = """
mutation {
message: createMessage(channelId: "#{UUID.uuid1()}", content: "Hello world") {
id
channelId
authorId
content
... | 24.64 | 84 | 0.625 |
e937ac4d4151cb524b3027697dbf513fb885c5ca | 510 | exs | Elixir | learning/programming_elixir/eval/apps/evaluator/mix.exs | Mdlkxzmcp/various_elixir | c87527b7118a0c74a042073c04d2228025888ddf | [
"MIT"
] | 2 | 2020-01-20T20:15:20.000Z | 2020-02-27T11:08:42.000Z | learning/programming_elixir/eval/apps/evaluator/mix.exs | Mdlkxzmcp/various_elixir | c87527b7118a0c74a042073c04d2228025888ddf | [
"MIT"
] | null | null | null | learning/programming_elixir/eval/apps/evaluator/mix.exs | Mdlkxzmcp/various_elixir | c87527b7118a0c74a042073c04d2228025888ddf | [
"MIT"
] | null | null | null | defmodule Evaluator.Mixfile do
use Mix.Project
def project do
[
app: :evaluator,
version: "0.1.0",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixir: "~> 1.5",
build_embedded: Mix.env =... | 17.586207 | 45 | 0.531373 |
e937d407fccaa5ef3cf125b0bcaf550cbf51a83b | 1,393 | ex | Elixir | community/betterdev/test/support/data_case.ex | earthrid/betterdev.link | b8efe279e82810075ba36673483f7f4d6862bc19 | [
"MIT"
] | 79 | 2017-07-03T13:04:08.000Z | 2022-02-11T13:59:37.000Z | community/betterdev/test/support/data_case.ex | earthrid/betterdev.link | b8efe279e82810075ba36673483f7f4d6862bc19 | [
"MIT"
] | 16 | 2017-07-09T03:16:27.000Z | 2022-01-14T14:29:57.000Z | community/betterdev/test/support/data_case.ex | earthrid/betterdev.link | b8efe279e82810075ba36673483f7f4d6862bc19 | [
"MIT"
] | 10 | 2017-07-09T02:58:59.000Z | 2021-09-14T08:01:02.000Z | defmodule Betterdev.DataCase do
@moduledoc """
This module defines the setup for tests requiring
access to the application's data layer.
You may define functions here to be used as helpers in
your tests.
Finally, if the test case interacts with the database,
it cannot be async. For this reason, every te... | 25.796296 | 77 | 0.681981 |
e938057490d74f9e7bc1734360a71f5d3d976baf | 1,873 | ex | Elixir | lib/ledemo_web.ex | andyl/live_editable_demo | 645d628d8717d706da207db9fe9f6f71ecfce303 | [
"MIT"
] | null | null | null | lib/ledemo_web.ex | andyl/live_editable_demo | 645d628d8717d706da207db9fe9f6f71ecfce303 | [
"MIT"
] | 7 | 2021-05-10T15:57:48.000Z | 2021-05-27T13:05:14.000Z | lib/ledemo_web.ex | andyl/live_editable_demo | 645d628d8717d706da207db9fe9f6f71ecfce303 | [
"MIT"
] | null | null | null | defmodule LedemoWeb do
@moduledoc """
The entrypoint for defining your web interface, such
as controllers, views, channels and so on.
This can be used in your application as:
use LedemoWeb, :controller
use LedemoWeb, :view
The definitions below will be executed for every view,
controller, etc... | 24.644737 | 83 | 0.682862 |
e938082f2571a1f2c2744a454c17c3b19574a6d0 | 645 | ex | Elixir | web/models/user.ex | fernandedios/elixir-phoenix-discuss | ca64154dd44c9d8ca251c3d3a75f4e0152bb5d1f | [
"MIT"
] | null | null | null | web/models/user.ex | fernandedios/elixir-phoenix-discuss | ca64154dd44c9d8ca251c3d3a75f4e0152bb5d1f | [
"MIT"
] | null | null | null | web/models/user.ex | fernandedios/elixir-phoenix-discuss | ca64154dd44c9d8ca251c3d3a75f4e0152bb5d1f | [
"MIT"
] | null | null | null | defmodule Discuss.User do
use Discuss.Web, :model
# instruct Poison Encoder to only convert email
# Poison.Encoder converts model to json for socket communication
@derive {Poison.Encoder, only: [:email]}
schema "users" do
field :email, :string
field :provider, :string
field :token, :string
h... | 26.875 | 72 | 0.688372 |
e9382142b5f4c62dbb773babb12f7df37cba0669 | 320 | exs | Elixir | priv/repo/migrations/20181129180200_create_physical_boxes_relationships.exs | mlgx/boxes | f6c8b786bd7188ad57c1e071722e8196d594a034 | [
"Unlicense"
] | null | null | null | priv/repo/migrations/20181129180200_create_physical_boxes_relationships.exs | mlgx/boxes | f6c8b786bd7188ad57c1e071722e8196d594a034 | [
"Unlicense"
] | 2 | 2021-03-08T23:24:09.000Z | 2021-05-07T22:42:15.000Z | priv/repo/migrations/20181129180200_create_physical_boxes_relationships.exs | mlgx/boxes | f6c8b786bd7188ad57c1e071722e8196d594a034 | [
"Unlicense"
] | null | null | null | defmodule Boxes.Repo.Migrations.CreatePhysicalBoxesRelationships do
use Ecto.Migration
def change do
create table(:physical_boxes_relationships) do
add(:box_id, references(:physical_boxes), null: false)
add(:parent_id, references(:physical_boxes), null: false)
timestamps()
end
end
end
| 24.615385 | 67 | 0.7375 |
e9382f71b15f4524ab6203f63c1c7e60b90954ec | 232 | exs | Elixir | priv/repo/migrations/20200426070819_create_bookings.exs | mattiaslundberg/booking | 469d1469f306b2ab62ce1ee971a825101af6fc7e | [
"MIT"
] | null | null | null | priv/repo/migrations/20200426070819_create_bookings.exs | mattiaslundberg/booking | 469d1469f306b2ab62ce1ee971a825101af6fc7e | [
"MIT"
] | 2 | 2021-03-10T16:49:07.000Z | 2021-05-11T12:50:22.000Z | priv/repo/migrations/20200426070819_create_bookings.exs | mattiaslundberg/booking | 469d1469f306b2ab62ce1ee971a825101af6fc7e | [
"MIT"
] | null | null | null | defmodule Booking.Repo.Migrations.CreateBookings do
use Ecto.Migration
def change do
create table(:bookings) do
add :label, :string
add :bookable_id, references(:bookables)
timestamps()
end
end
end
| 17.846154 | 51 | 0.689655 |
e93837e148342303c2d3508e49f1fa5ac0c0d122 | 2,241 | ex | Elixir | web/router.ex | erikmueller/ex_admin | af8f3e23a03148d8365cc3b71286f855fb919f8c | [
"MIT"
] | null | null | null | web/router.ex | erikmueller/ex_admin | af8f3e23a03148d8365cc3b71286f855fb919f8c | [
"MIT"
] | null | null | null | web/router.ex | erikmueller/ex_admin | af8f3e23a03148d8365cc3b71286f855fb919f8c | [
"MIT"
] | null | null | null | defmodule ExAdmin.Router do
@moduledoc """
Router macro for ExAdmin sites.
Provides a helper macro for adding up ExAdmin routes to your application.
## Examples:
defmodule MyProject.Router do
use MyProject.Web, :router
use ExAdmin.Router
...
scope "/", MyProject do
... | 35.571429 | 133 | 0.678269 |
e93848b2278e8f608f848ee44d7780c3e79710a8 | 1,880 | ex | Elixir | lib/absinthe/subscription/pipeline_serializer.ex | arturs678/absinthe | 0d842c46e5d21399d66919cdaadfa8927fbca74d | [
"MIT"
] | 4,101 | 2016-03-02T03:49:20.000Z | 2022-03-31T05:46:01.000Z | lib/absinthe/subscription/pipeline_serializer.ex | arturs678/absinthe | 0d842c46e5d21399d66919cdaadfa8927fbca74d | [
"MIT"
] | 889 | 2016-03-02T16:06:59.000Z | 2022-03-31T20:24:12.000Z | lib/absinthe/subscription/pipeline_serializer.ex | arturs678/absinthe | 0d842c46e5d21399d66919cdaadfa8927fbca74d | [
"MIT"
] | 564 | 2016-03-02T07:49:59.000Z | 2022-03-06T14:40:59.000Z | defmodule Absinthe.Subscription.PipelineSerializer do
@moduledoc """
Serializer responsible for packing and unpacking pipeline stored in the Elixir registry.
The purpose of this logic is saving memory by deduplicating repeating options - (ETS
backed registry stores them flat in the memory).
"""
alias Absi... | 29.375 | 91 | 0.695745 |
e9385678d87aff55b4b596b092bea41ee2df38a4 | 121 | exs | Elixir | test/begin_test.exs | chgeuer/mike-works-elixir-fundamentals | 579aec8491a8c30517f8ddbbc4b745936e0e552d | [
"BSD-3-Clause"
] | null | null | null | test/begin_test.exs | chgeuer/mike-works-elixir-fundamentals | 579aec8491a8c30517f8ddbbc4b745936e0e552d | [
"BSD-3-Clause"
] | null | null | null | test/begin_test.exs | chgeuer/mike-works-elixir-fundamentals | 579aec8491a8c30517f8ddbbc4b745936e0e552d | [
"BSD-3-Clause"
] | null | null | null | defmodule BeginTest do
use ExUnit.Case
@moduletag :begin
test "true = true" do
assert true === true
end
end
| 13.444444 | 24 | 0.669421 |
e93857e909a05380923986e1c3439bb5ad610996 | 1,259 | exs | Elixir | mix.exs | razagill/speakers | 4ec19b17ed82695cee22098ec6916bd3d25c7836 | [
"MIT"
] | 3 | 2019-10-19T13:13:48.000Z | 2020-04-06T08:34:48.000Z | mix.exs | razagill/speakers | 4ec19b17ed82695cee22098ec6916bd3d25c7836 | [
"MIT"
] | 1 | 2019-10-19T18:27:40.000Z | 2019-10-21T11:37:07.000Z | mix.exs | razagill/speakers | 4ec19b17ed82695cee22098ec6916bd3d25c7836 | [
"MIT"
] | 1 | 2019-10-19T17:44:17.000Z | 2019-10-19T17:44:17.000Z | defmodule Speakers.MixProject do
use Mix.Project
def project do
[
app: :speakers,
version: "0.1.0",
elixir: "~> 1.9",
start_permanent: Mix.env() == :prod,
compilers: [:rustler] ++ Mix.compilers(),
description: description(),
package: package(),
rustler_crates: [
... | 22.890909 | 87 | 0.551231 |
e9386baabff54e0b15df1d2493b359e296edac97 | 10 | ex | Elixir | testData/org/elixir_lang/parser_definition/sigil_dot_operation_parsing_test_case/CharListLine.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/parser_definition/sigil_dot_operation_parsing_test_case/CharListLine.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/parser_definition/sigil_dot_operation_parsing_test_case/CharListLine.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 145 | 2015-01-15T11:37:16.000Z | 2021-12-22T05:51:02.000Z | ~x{}.'Two' | 10 | 10 | 0.4 |
e93875ee0eb6716f11c0633f28a7a1a0cb37e7bd | 90 | exs | Elixir | test/views/page_view_test.exs | borodark/weather_phoenix1 | 0de7070c54a943935e0eb89f621ff6dfc3d5d78c | [
"MIT"
] | 2 | 2015-11-09T18:16:58.000Z | 2017-03-01T14:11:07.000Z | test/views/page_view_test.exs | borodark/weather_phoenix1 | 0de7070c54a943935e0eb89f621ff6dfc3d5d78c | [
"MIT"
] | null | null | null | test/views/page_view_test.exs | borodark/weather_phoenix1 | 0de7070c54a943935e0eb89f621ff6dfc3d5d78c | [
"MIT"
] | null | null | null | defmodule WeatherPhoenix1.PageViewTest do
use WeatherPhoenix1.ConnCase, async: true
end
| 22.5 | 43 | 0.844444 |
e938be64c10e0390e2a6230ff667fe8cbf59082c | 1,305 | ex | Elixir | lib/ex_stone_openbank/page.ex | polvalente/ex-stone-openbank | f60720abbf755ebf7824fe0de435e47e8cc5c3f5 | [
"Apache-2.0"
] | null | null | null | lib/ex_stone_openbank/page.ex | polvalente/ex-stone-openbank | f60720abbf755ebf7824fe0de435e47e8cc5c3f5 | [
"Apache-2.0"
] | null | null | null | lib/ex_stone_openbank/page.ex | polvalente/ex-stone-openbank | f60720abbf755ebf7824fe0de435e47e8cc5c3f5 | [
"Apache-2.0"
] | null | null | null | defmodule ExStoneOpenbank.Page do
@moduledoc """
A page on any cursor based paginated API.
"""
use ExStoneOpenbank.Model
alias ExStoneOpenbank.Cursor
embedded_schema do
embeds_one :cursor, Cursor
field :data, {:array, :map}
field :function, :any, virtual: true
end
@doc false
def changese... | 23.303571 | 78 | 0.658238 |
e938cc5ccde9f7ffe689f55c7e333acb319bc2f4 | 848 | ex | Elixir | lib/slack/star.ex | cjbottaro/slack_ex | 866c3bb4df324094f97cbeed9201c8e83d6904db | [
"MIT"
] | null | null | null | lib/slack/star.ex | cjbottaro/slack_ex | 866c3bb4df324094f97cbeed9201c8e83d6904db | [
"MIT"
] | null | null | null | lib/slack/star.ex | cjbottaro/slack_ex | 866c3bb4df324094f97cbeed9201c8e83d6904db | [
"MIT"
] | null | null | null | defmodule Slack.Star do
@moduledoc """
Functions for working with starred items
"""
@base "stars"
use Slack.Request
@doc """
Add a star to an item.
https://api.slack.com/methods/stars.add
## Examples
Slack.Star.add(client, channel: "C1234567890")
"""
@spec add(Slack.Client.t, Keyword... | 18.042553 | 59 | 0.654481 |
e938ef3f07d0273fa3b5dde5bb06a84a8033af4e | 3,568 | ex | Elixir | lib/oban/plugins/gossip.ex | stefanchrobot/oban | 961015b92b9cae442d2834ad220a85ccdcc9da2d | [
"Apache-2.0"
] | null | null | null | lib/oban/plugins/gossip.ex | stefanchrobot/oban | 961015b92b9cae442d2834ad220a85ccdcc9da2d | [
"Apache-2.0"
] | null | null | null | lib/oban/plugins/gossip.ex | stefanchrobot/oban | 961015b92b9cae442d2834ad220a85ccdcc9da2d | [
"Apache-2.0"
] | null | null | null | defmodule Oban.Plugins.Gossip do
@moduledoc """
The Gossip plugin uses PubSub to periodically exchange queue state information between all
interested nodes. This allows Oban instances to broadcast state information regardless of which
engine they are using, and without storing anything in the database.
Gossi... | 26.626866 | 102 | 0.663677 |
e938ff1f8a699abbe629e164f6a6390bf4855b34 | 7,818 | exs | Elixir | test/xandra/frame_test.exs | lexmag/xandra | eadd1be7fa36a0973c2b7fe525fe5aaba2ce264d | [
"0BSD"
] | null | null | null | test/xandra/frame_test.exs | lexmag/xandra | eadd1be7fa36a0973c2b7fe525fe5aaba2ce264d | [
"0BSD"
] | null | null | null | test/xandra/frame_test.exs | lexmag/xandra | eadd1be7fa36a0973c2b7fe525fe5aaba2ce264d | [
"0BSD"
] | null | null | null | defmodule Xandra.FrameTest do
use ExUnit.Case, async: true
use ExUnitProperties
alias Xandra.Frame
alias Xandra.TestHelper.LZ4Compressor
@max_v5_payload_size_in_bytes 128 * 1024 - 1
describe "max_supported_protocol/0" do
test "returns a protocol version" do
assert Frame.max_supported_protocol()... | 31.524194 | 111 | 0.621514 |
e939076d841e45be1289cff7d0519f4c0331e96f | 1,858 | ex | Elixir | lib/ex_chip8/stack.ex | lauriannala/ex_chip8 | 7be70811bb84b7f3b72b0c8bede4adfcbb43fdf7 | [
"MIT"
] | 1 | 2021-12-05T11:24:19.000Z | 2021-12-05T11:24:19.000Z | lib/ex_chip8/stack.ex | lauriannala/ex_chip8 | 7be70811bb84b7f3b72b0c8bede4adfcbb43fdf7 | [
"MIT"
] | null | null | null | lib/ex_chip8/stack.ex | lauriannala/ex_chip8 | 7be70811bb84b7f3b72b0c8bede4adfcbb43fdf7 | [
"MIT"
] | null | null | null | defmodule ExChip8.Stack do
alias ExChip8.Registers
alias ExChip8.StateServer
@moduledoc """
Implements methods for retrieving and manipulating stack data from StateServer.
"""
@doc """
Initialize stack with specified size.
"""
@spec init(size :: integer) :: :ok
def init(size) do
0..(size - 1)
... | 24.447368 | 90 | 0.672228 |
e9391357c64f1398451d3a601aefdac81d1e2fa2 | 5,042 | ex | Elixir | clients/display_video/lib/google_api/display_video/v1/model/advertiser.ex | jechol/elixir-google-api | 0290b683dfc6491ca2ef755a80bc329378738d03 | [
"Apache-2.0"
] | null | null | null | clients/display_video/lib/google_api/display_video/v1/model/advertiser.ex | jechol/elixir-google-api | 0290b683dfc6491ca2ef755a80bc329378738d03 | [
"Apache-2.0"
] | null | null | null | clients/display_video/lib/google_api/display_video/v1/model/advertiser.ex | jechol/elixir-google-api | 0290b683dfc6491ca2ef755a80bc329378738d03 | [
"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... | 62.246914 | 418 | 0.734034 |
e93956feca07b47e24a0597c81a9e2e653920071 | 1,194 | ex | Elixir | implementations/elixir/ockam/ockam_hub/lib/hub/telemetry_forwarder.ex | malvfr/ockam | 37241752d1fa82335c28adf1058a8a02b6e435bb | [
"Apache-2.0"
] | null | null | null | implementations/elixir/ockam/ockam_hub/lib/hub/telemetry_forwarder.ex | malvfr/ockam | 37241752d1fa82335c28adf1058a8a02b6e435bb | [
"Apache-2.0"
] | null | null | null | implementations/elixir/ockam/ockam_hub/lib/hub/telemetry_forwarder.ex | malvfr/ockam | 37241752d1fa82335c28adf1058a8a02b6e435bb | [
"Apache-2.0"
] | null | null | null | defmodule Ockam.Hub.TelemetryForwarder do
@moduledoc false
@spec forward(any, [atom, ...], any, any) :: :ok | {:error, :already_exists}
def forward(handler_name, event_name, node_name, process_name) do
handler = fn ev, mes, met, opt ->
send({process_name, node_name}, {:telemetry, {ev, mes, met, opt}})
... | 34.114286 | 113 | 0.634003 |
e93959e02171c6c5f64166547d6fdbd36111d2f8 | 420 | exs | Elixir | test/action_for_children/web/views/callback_view_test.exs | cast-fuse/action-for-children | 3cded6e04abdaf13d4d1033bf1daa783bc0e5ef2 | [
"BSD-3-Clause"
] | null | null | null | test/action_for_children/web/views/callback_view_test.exs | cast-fuse/action-for-children | 3cded6e04abdaf13d4d1033bf1daa783bc0e5ef2 | [
"BSD-3-Clause"
] | 57 | 2017-05-25T10:32:59.000Z | 2021-05-06T21:03:39.000Z | test/action_for_children/web/views/callback_view_test.exs | cast-fuse/action-for-children | 3cded6e04abdaf13d4d1033bf1daa783bc0e5ef2 | [
"BSD-3-Clause"
] | null | null | null | defmodule ActionForChildrenWeb.CallbackViewTest do
use ActionForChildrenWeb.ConnCase
alias ActionForChildrenWeb.CallbackView
test "abbreviates days correctly" do
assert CallbackView.abbreviate_day("monday") == "mon"
assert CallbackView.abbreviate_day("tuesday") == "tues"
assert CallbackView.abbreviat... | 35 | 61 | 0.771429 |
e9396467096962f8cb9e9cf7fc68705c693854d6 | 29,331 | ex | Elixir | lib/phoenix/router.ex | neuroradiology/phoenix | bd0733f2441e3d9ad6f67a11e8903eb409b6675e | [
"MIT"
] | null | null | null | lib/phoenix/router.ex | neuroradiology/phoenix | bd0733f2441e3d9ad6f67a11e8903eb409b6675e | [
"MIT"
] | null | null | null | lib/phoenix/router.ex | neuroradiology/phoenix | bd0733f2441e3d9ad6f67a11e8903eb409b6675e | [
"MIT"
] | null | null | null | defmodule Phoenix.Router do
defmodule NoRouteError do
@moduledoc """
Exception raised when no route is found.
"""
defexception plug_status: 404, message: "no route found", conn: nil, router: nil
def exception(opts) do
conn = Keyword.fetch!(opts, :conn)
router = Keyword.fetch!(opts, ... | 30.426349 | 100 | 0.631755 |
e9399385ee4beae4bc538992baad76686a2b0d81 | 2,144 | exs | Elixir | config/dev.exs | cciuenf/lovelaceccuenf_bot | 22a9d4e25d59cf3e5f1de4c4de8e257a6b44fba9 | [
"MIT"
] | null | null | null | config/dev.exs | cciuenf/lovelaceccuenf_bot | 22a9d4e25d59cf3e5f1de4c4de8e257a6b44fba9 | [
"MIT"
] | null | null | null | config/dev.exs | cciuenf/lovelaceccuenf_bot | 22a9d4e25d59cf3e5f1de4c4de8e257a6b44fba9 | [
"MIT"
] | null | null | null | import Config
# Configure your database
config :lovelace, Lovelace.Repo,
username: "postgres",
password: "postgres",
database: "lovelace_dev",
hostname: "localhost",
show_sensitive_data_on_connection_error: true,
pool_size: 10
# For development, we disable any cache and enable
# debugging and code reloadi... | 27.844156 | 68 | 0.692164 |
e939ad5acefe1867bc5e9d3f1700d4dde887131b | 4,483 | ex | Elixir | lib/tensorflow/stream_executor/dnn.pb.ex | pylon/extensor | 57eba1660952d94416152531e159abd6b1faaee9 | [
"Apache-2.0"
] | 58 | 2018-06-12T00:01:51.000Z | 2022-01-30T17:29:42.000Z | lib/tensorflow/stream_executor/dnn.pb.ex | pylon/extensor | 57eba1660952d94416152531e159abd6b1faaee9 | [
"Apache-2.0"
] | 9 | 2018-06-13T19:33:39.000Z | 2020-02-17T17:24:15.000Z | lib/tensorflow/stream_executor/dnn.pb.ex | pylon/extensor | 57eba1660952d94416152531e159abd6b1faaee9 | [
"Apache-2.0"
] | 3 | 2018-06-13T19:45:36.000Z | 2021-05-16T17:40:08.000Z | defmodule StreamExecutor.Dnn.DataType do
@moduledoc false
use Protobuf, enum: true, syntax: :proto3
@type t :: integer | :kFloat | :kDouble | :kHalf | :kInt8 | :kInt32
field(:kFloat, 0)
field(:kDouble, 1)
field(:kHalf, 2)
field(:kInt8, 3)
field(:kInt32, 4)
end
defmodule StreamExecutor.Dnn.DataLayout ... | 22.872449 | 72 | 0.646219 |
e939b4eb3e346e9417ee35ad77bc3c94b053161e | 1,432 | ex | Elixir | app/lib/noodl/events/proposal.ex | nathanjohnson320/noodl | 2e449aab15b54fc5a1dc45ebf4b79e7b64b7c967 | [
"MIT"
] | 1 | 2021-01-20T20:00:50.000Z | 2021-01-20T20:00:50.000Z | app/lib/noodl/events/proposal.ex | nathanjohnson320/noodl | 2e449aab15b54fc5a1dc45ebf4b79e7b64b7c967 | [
"MIT"
] | null | null | null | app/lib/noodl/events/proposal.ex | nathanjohnson320/noodl | 2e449aab15b54fc5a1dc45ebf4b79e7b64b7c967 | [
"MIT"
] | null | null | null | defmodule Noodl.Events.Proposal do
use Ecto.Schema
import Ecto.Changeset
alias Noodl.Events.Session
alias Noodl.Events.Event
alias Noodl.Accounts.User
@primary_key {:id, :binary_id, autogenerate: true}
@foreign_key_type :binary_id
schema "proposals" do
field :audience, :string
field :descripti... | 23.866667 | 96 | 0.64595 |
e939da72d45afdda2a456a3db516b1a96504aeca | 571 | exs | Elixir | priv/repo/migrations/0120_create_shopping_list_note.exs | blacksph3re/alastair2 | 51fcd8fe666ae768dd8371b2c7835dd294eeddaf | [
"Apache-2.0"
] | null | null | null | priv/repo/migrations/0120_create_shopping_list_note.exs | blacksph3re/alastair2 | 51fcd8fe666ae768dd8371b2c7835dd294eeddaf | [
"Apache-2.0"
] | null | null | null | priv/repo/migrations/0120_create_shopping_list_note.exs | blacksph3re/alastair2 | 51fcd8fe666ae768dd8371b2c7835dd294eeddaf | [
"Apache-2.0"
] | 1 | 2017-12-15T15:49:16.000Z | 2017-12-15T15:49:16.000Z | defmodule Alastair.Repo.Migrations.CreateShoppingListNote do
use Ecto.Migration
def change do
create table(:shopping_list_notes) do
add :event_id, references(:events, on_delete: :delete_all)
add :ingredient_id, references(:ingredients, on_delete: :delete_all)
add :ticked, :boolean
add :... | 31.722222 | 80 | 0.728546 |
e93a1f11d874510cb4f9cf74cb40f91ec7de656a | 6,298 | ex | Elixir | lib/expo/mo.ex | jshmrtn/expo | 98459ed26833c1b05348bb80a66e78fc6d2e488d | [
"Apache-2.0"
] | 2 | 2022-03-31T21:12:35.000Z | 2022-03-31T21:44:59.000Z | lib/expo/mo.ex | jshmrtn/expo | 98459ed26833c1b05348bb80a66e78fc6d2e488d | [
"Apache-2.0"
] | 13 | 2022-03-30T17:41:25.000Z | 2022-03-31T23:35:49.000Z | lib/expo/mo.ex | jshmrtn/expo | 98459ed26833c1b05348bb80a66e78fc6d2e488d | [
"Apache-2.0"
] | null | null | null | defmodule Expo.Mo do
@moduledoc """
`.mo` file handler
"""
alias Expo.Mo.InvalidFileError
alias Expo.Mo.Parser
alias Expo.Mo.UnsupportedVersionError
alias Expo.Translations
@type compose_options :: [
{:endianness, :little | :big},
{:use_fuzzy, boolean()},
{:statistics, bo... | 32.632124 | 98 | 0.5859 |
e93a5231f18dff8ca12fe0811874e20c8115c8c0 | 9,982 | exs | Elixir | test/loop_test.exs | t-rutten/axon | 1ab69552e194bdaa4e5bc85ca116966be872f072 | [
"Apache-2.0"
] | 2 | 2021-04-19T19:38:36.000Z | 2021-04-19T19:38:42.000Z | test/loop_test.exs | t-rutten/axon | 1ab69552e194bdaa4e5bc85ca116966be872f072 | [
"Apache-2.0"
] | null | null | null | test/loop_test.exs | t-rutten/axon | 1ab69552e194bdaa4e5bc85ca116966be872f072 | [
"Apache-2.0"
] | null | null | null | defmodule Axon.LoopTest do
use ExUnit.Case, async: true
import ExUnit.CaptureLog
alias Axon.Loop
alias Axon.Loop.State
describe "factories" do
test "loop/3 creates a basic loop with defaults" do
step_fn = fn _, _ -> 1 end
assert %Loop{init: init_fn, step: update_fn, output_transform: transf... | 29.708333 | 101 | 0.545282 |
e93a76bd08cf6a79be3649a22dc8340d331d2ba0 | 3,510 | ex | Elixir | lib/heartcheck/environment.ex | thiamsantos/heartcheck-elixir | bb8b003c3c0a79332837c34fc1287f493832108c | [
"MIT"
] | null | null | null | lib/heartcheck/environment.ex | thiamsantos/heartcheck-elixir | bb8b003c3c0a79332837c34fc1287f493832108c | [
"MIT"
] | null | null | null | lib/heartcheck/environment.ex | thiamsantos/heartcheck-elixir | bb8b003c3c0a79332837c34fc1287f493832108c | [
"MIT"
] | null | null | null | defmodule HeartCheck.Environment do
@moduledoc """
Provides important information about the application's environment, including:
System info from "uname" Linux command (kernel-name, nodename, kernel-release,
kernel-version and machine)
Elixir version
Phoenix (if available) version
Fully compatible wi... | 23.4 | 83 | 0.64188 |
e93a8736bb0e082a400898041d148a16b4a8dd3c | 988 | exs | Elixir | config/test.exs | twigbit/webbkoll | 9faac7d0b4101f3801e78ed156665c8132197116 | [
"MIT"
] | 268 | 2016-07-08T17:14:58.000Z | 2022-02-15T19:41:24.000Z | config/test.exs | twigbit/webbkoll | 9faac7d0b4101f3801e78ed156665c8132197116 | [
"MIT"
] | 29 | 2016-08-23T19:19:01.000Z | 2022-02-01T16:28:23.000Z | config/test.exs | twigbit/webbkoll | 9faac7d0b4101f3801e78ed156665c8132197116 | [
"MIT"
] | 37 | 2016-08-24T21:52:45.000Z | 2021-09-08T11:27:15.000Z | use Mix.Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :webbkoll, WebbkollWeb.Endpoint,
http: [port: 4001],
server: false,
debug_errors: false
# Print only warnings and errors during test
config :logger, level: :warn
config :webbkoll,
backends... | 34.068966 | 74 | 0.702429 |
e93a8a9fa8d1cd1760e866cad5203f4c779fdec9 | 204 | exs | Elixir | test/controllers/page_controller_test.exs | praveenperera/phoenix-dokku-example | fc4bfe98e016dfe6eb1f74449b3a8d292dbce137 | [
"MIT"
] | 1 | 2015-10-05T20:58:46.000Z | 2015-10-05T20:58:46.000Z | test/controllers/page_controller_test.exs | praveenperera/phoenix-dokku-example | fc4bfe98e016dfe6eb1f74449b3a8d292dbce137 | [
"MIT"
] | null | null | null | test/controllers/page_controller_test.exs | praveenperera/phoenix-dokku-example | fc4bfe98e016dfe6eb1f74449b3a8d292dbce137 | [
"MIT"
] | null | null | null | defmodule PhoenixDokkuExample.PageControllerTest do
use PhoenixDokkuExample.ConnCase
test "GET /" do
conn = get conn(), "/"
assert html_response(conn, 200) =~ "Welcome to Phoenix!"
end
end
| 22.666667 | 60 | 0.715686 |
e93aaa1b15e4a9fe9f02f4a864d914eb76f558f4 | 591 | ex | Elixir | lib/cloud_pubsub_samples/model/error_response.ex | mcrumm/cloud_pubsub_samples | ea89c3bf3a6174e4ff140a501150b16f9b013027 | [
"Apache-2.0"
] | 1 | 2020-05-28T19:24:56.000Z | 2020-05-28T19:24:56.000Z | lib/cloud_pubsub_samples/model/error_response.ex | mcrumm/cloud_pubsub_samples | ea89c3bf3a6174e4ff140a501150b16f9b013027 | [
"Apache-2.0"
] | null | null | null | lib/cloud_pubsub_samples/model/error_response.ex | mcrumm/cloud_pubsub_samples | ea89c3bf3a6174e4ff140a501150b16f9b013027 | [
"Apache-2.0"
] | null | null | null | defmodule CloudPubsubSamples.Model.ErrorResponse do
@moduledoc false
use GoogleApi.Gax.ModelBase
@type t :: %__MODULE__{
:error => CloudPubsubSamples.Model.Error
}
field(:error, as: CloudPubsubSamples.Model.Error)
end
defimpl Poison.Decoder, for: CloudPubsubSamples.Model.ErrorResponse do
... | 25.695652 | 70 | 0.759729 |
e93ab319fb85871a88bd0e38a2bb72f6fa31842c | 2,114 | ex | Elixir | clients/dfa_reporting/lib/google_api/dfa_reporting/v35/model/language.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/model/language.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/model/language.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... | 37.75 | 256 | 0.704352 |
e93ac27c5dd266143e3000e14f8d99a4bc65e800 | 2,881 | ex | Elixir | lib/smoke/server.ex | Baradoy/smoke | 1e12bd76d2af6ca67db9d330625c6f3652778dee | [
"Apache-2.0"
] | 1 | 2019-10-03T16:54:48.000Z | 2019-10-03T16:54:48.000Z | lib/smoke/server.ex | Baradoy/smoke | 1e12bd76d2af6ca67db9d330625c6f3652778dee | [
"Apache-2.0"
] | 3 | 2019-09-26T22:55:13.000Z | 2021-05-10T02:17:12.000Z | lib/smoke/server.ex | Baradoy/smoke | 1e12bd76d2af6ca67db9d330625c6f3652778dee | [
"Apache-2.0"
] | 1 | 2019-07-22T16:40:01.000Z | 2019-07-22T16:40:01.000Z | defmodule Smoke.Server do
@moduledoc """
Handles storage of events.
Enforces the cap on the number of events of a particular type.
"""
use GenServer
require Logger
alias Smoke.Instrumenter
alias Smoke.EventAgent
defmodule Config do
@moduledoc """
Configuration for maximum number of events ... | 24.836207 | 114 | 0.657064 |
e93ac5415d05ef91dda8ddbc099ee6accb083a01 | 2,505 | exs | Elixir | lib/iex/test/iex/options_test.exs | QuinnWilton/elixir | e42e3e55ca1561fe56b58d6f51c7b0faae6a7a1e | [
"Apache-2.0"
] | null | null | null | lib/iex/test/iex/options_test.exs | QuinnWilton/elixir | e42e3e55ca1561fe56b58d6f51c7b0faae6a7a1e | [
"Apache-2.0"
] | null | null | null | lib/iex/test/iex/options_test.exs | QuinnWilton/elixir | e42e3e55ca1561fe56b58d6f51c7b0faae6a7a1e | [
"Apache-2.0"
] | null | null | null | Code.require_file "../test_helper.exs", __DIR__
defmodule IEx.OptionsTest do
use IEx.Case
@doc """
Hello, I have %{red}ANSI%{reset} escapes.
"""
def ansi_escapes, do: :ok
unless match?({:win32,_}, :os.type) do
test "color" do
opts = [colors: [enabled: true, eval_result: "red"]]
assert cap... | 37.954545 | 118 | 0.598004 |
e93acb4dceab68ee6656a559da9347d2ae6e920c | 332 | ex | Elixir | lib/perspective/core/user/users.ex | backmath/perspective | a0a577d0ffb06805b64e4dcb171a093e051884b0 | [
"MIT"
] | 2 | 2020-04-24T19:43:06.000Z | 2020-04-24T19:52:27.000Z | lib/perspective/core/user/users.ex | backmath/perspective | a0a577d0ffb06805b64e4dcb171a093e051884b0 | [
"MIT"
] | null | null | null | lib/perspective/core/user/users.ex | backmath/perspective | a0a577d0ffb06805b64e4dcb171a093e051884b0 | [
"MIT"
] | null | null | null | defmodule Perspective.Core.Users do
use Perspective.Index
index_key(%{data: %{user_id: user_id}}) do
user_id
end
initial_value do
%Perspective.Core.User{}
end
index(%Perspective.Core.UserAdded{data: data}, user) do
user
|> Map.put(:id, data.user_id)
|> Map.put(:username, data.username... | 18.444444 | 57 | 0.674699 |
e93af93d60747a80cb1e090b52f6324732f43e18 | 648 | exs | Elixir | hello-world/hello_world.exs | Pompeu/exercism | 29afcee4fbf48f5e7d91359bea871585438c8245 | [
"MIT"
] | null | null | null | hello-world/hello_world.exs | Pompeu/exercism | 29afcee4fbf48f5e7d91359bea871585438c8245 | [
"MIT"
] | null | null | null | hello-world/hello_world.exs | Pompeu/exercism | 29afcee4fbf48f5e7d91359bea871585438c8245 | [
"MIT"
] | null | null | null | defmodule HelloWorld do
@moduledoc """
Elixir counts the number of arguments as part of the function name.
For instance;
def hello() do
end
would be a completely different function from
def hello(name) do
end
Can you find a way to make all the tests pass with just one
function?
... | 20.25 | 71 | 0.652778 |
e93b4727e5735a9b5c077485c25e61a0a6c4232f | 365 | exs | Elixir | test/models/user_test.exs | m4ta1l/bors-ng | a4d04fd740e24d03833cd46a76f0f9e5be96f818 | [
"Apache-2.0"
] | 1,223 | 2017-01-11T19:25:08.000Z | 2022-03-21T12:31:28.000Z | test/models/user_test.exs | seanpm2001/bors-ng | 2482df1c2f4680b33534620571f04075b6b4390a | [
"Apache-2.0"
] | 1,428 | 2017-01-09T16:36:18.000Z | 2022-03-28T14:19:40.000Z | test/models/user_test.exs | seanpm2001/bors-ng | 2482df1c2f4680b33534620571f04075b6b4390a | [
"Apache-2.0"
] | 184 | 2017-01-10T18:08:06.000Z | 2022-03-14T18:53:24.000Z | defmodule BorsNG.Database.UserTest do
use BorsNG.Database.ModelCase
alias BorsNG.Database.User
setup do
user =
Repo.insert!(%User{
user_xref: 1,
login: "fooBAR"
})
{:ok, user: user}
end
test "case insensitive search", %{user: u} do
user = Repo.get_by(User, login: "f... | 17.380952 | 47 | 0.610959 |
e93b49864661c82babbbc3a07fc042d979dc0c16 | 1,567 | ex | Elixir | clients/data_fusion/lib/google_api/data_fusion/v1beta1/model/test_iam_permissions_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/data_fusion/lib/google_api/data_fusion/v1beta1/model/test_iam_permissions_response.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/data_fusion/lib/google_api/data_fusion/v1beta1/model/test_iam_permissions_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... | 32.645833 | 134 | 0.749202 |
e93b5165968bac4682c03189aa30bd4ef3836e8d | 1,896 | ex | Elixir | clients/service_management/lib/google_api/service_management/v1/model/config_source.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/service_management/lib/google_api/service_management/v1/model/config_source.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/service_management/lib/google_api/service_management/v1/model/config_source.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.92 | 202 | 0.758966 |
e93b6388f1bb890262adc6812f881362747cdef9 | 1,751 | ex | Elixir | clients/big_query_connection/lib/google_api/big_query_connection/v1beta1/model/test_iam_permissions_request.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/big_query_connection/lib/google_api/big_query_connection/v1beta1/model/test_iam_permissions_request.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/big_query_connection/lib/google_api/big_query_connection/v1beta1/model/test_iam_permissions_request.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... | 35.02 | 135 | 0.74586 |
e93b7ec87b0a368b1fca55e78d3101ca08a82ba5 | 4,531 | ex | Elixir | lib/kiq/config.ex | locaweb/kiq | fa561b9a1a2361e99b4af5eafc4d3c7ece576ea9 | [
"MIT"
] | 59 | 2018-07-13T23:17:00.000Z | 2021-12-21T07:03:03.000Z | lib/kiq/config.ex | locaweb/kiq | fa561b9a1a2361e99b4af5eafc4d3c7ece576ea9 | [
"MIT"
] | 5 | 2019-08-05T13:14:42.000Z | 2022-03-09T12:38:46.000Z | lib/kiq/config.ex | locaweb/kiq | fa561b9a1a2361e99b4af5eafc4d3c7ece576ea9 | [
"MIT"
] | 6 | 2018-09-24T13:16:21.000Z | 2021-05-03T08:26:52.000Z | defmodule Kiq.Config do
@moduledoc false
import Kiq.Identity, only: [identity: 0]
alias Kiq.{Client, Periodic, Pool, Reporter, Senator}
alias Kiq.Reporter.{Instrumenter, Logger, Retryer, Stats, Unlocker}
@type name :: GenServer.server()
@type queue_name :: atom() | binary()
@type queue_size :: pos_inte... | 31.908451 | 97 | 0.630545 |
e93b7fa6f78e6224ef7e1c47fba43a6d6922a5d6 | 241 | ex | Elixir | lib/erlef_web/controllers/events_controller.ex | HarryET/website | 8b3e7b2bcc46339afd6bbc4ef190bdd5b2eb0b9f | [
"Apache-2.0"
] | 71 | 2019-07-02T18:06:15.000Z | 2022-03-09T15:30:08.000Z | lib/erlef_web/controllers/events_controller.ex | HarryET/website | 8b3e7b2bcc46339afd6bbc4ef190bdd5b2eb0b9f | [
"Apache-2.0"
] | 157 | 2019-07-02T01:21:16.000Z | 2022-03-30T16:08:12.000Z | lib/erlef_web/controllers/events_controller.ex | HarryET/website | 8b3e7b2bcc46339afd6bbc4ef190bdd5b2eb0b9f | [
"Apache-2.0"
] | 45 | 2019-07-04T05:51:11.000Z | 2022-02-27T11:56:02.000Z | defmodule ErlefWeb.EventController do
use ErlefWeb, :controller
alias Erlef.Community
action_fallback ErlefWeb.FallbackController
def index(conn, _params) do
render(conn, :index, events: Community.approved_events())
end
end
| 20.083333 | 61 | 0.775934 |
e93baa4d9f4e6d2f0c40e69b35050f77f7e1c3fa | 858 | exs | Elixir | apps/robby_web/test/controllers/profile_controller_test.exs | jeffweiss/openrobby | 9fed2024e6ce87a6fe27ef3af85558f3116aca2a | [
"Apache-2.0"
] | null | null | null | apps/robby_web/test/controllers/profile_controller_test.exs | jeffweiss/openrobby | 9fed2024e6ce87a6fe27ef3af85558f3116aca2a | [
"Apache-2.0"
] | null | null | null | apps/robby_web/test/controllers/profile_controller_test.exs | jeffweiss/openrobby | 9fed2024e6ce87a6fe27ef3af85558f3116aca2a | [
"Apache-2.0"
] | null | null | null | defmodule RobbyWeb.ProfileControllerTest do
use RobbyWeb.ConnCase
alias RobbyWeb.User
setup do
{:ok, conn: build_conn()}
end
test "should not render profile page if not logged in", %{conn: conn} do
conn = get conn, profile_path(conn, :show, 1)
assert html_response(conn, 302) =~ "redirected"
... | 29.586207 | 117 | 0.644522 |
e93baca10988105c79d7c2e1a9d51358789b47cd | 148 | exs | Elixir | test/test_helper.exs | ulissesalmeida/ikki | a6f3104acea76a0eac917e98f2c8df910c668fdc | [
"MIT"
] | 15 | 2015-09-01T03:38:30.000Z | 2019-01-29T16:16:12.000Z | test/test_helper.exs | ulissesalmeida/ikki | a6f3104acea76a0eac917e98f2c8df910c668fdc | [
"MIT"
] | null | null | null | test/test_helper.exs | ulissesalmeida/ikki | a6f3104acea76a0eac917e98f2c8df910c668fdc | [
"MIT"
] | 3 | 2015-09-18T18:42:29.000Z | 2018-09-25T21:45:30.000Z | ExUnit.start
Mix.Task.run "ecto.create", ["--quiet"]
Mix.Task.run "ecto.migrate", ["--quiet"]
Ecto.Adapters.SQL.begin_test_transaction(Ikki.Repo)
| 21.142857 | 51 | 0.722973 |
e93bb43313620b367aad257a9781235b548bc606 | 950 | exs | Elixir | test/aht20_test.exs | mnishiguchi/aht20 | 2150e1ceb0413b10230e1c6c3680625c58d3a2e9 | [
"MIT"
] | 1 | 2021-11-24T15:08:58.000Z | 2021-11-24T15:08:58.000Z | test/aht20_test.exs | mnishiguchi/aht20 | 2150e1ceb0413b10230e1c6c3680625c58d3a2e9 | [
"MIT"
] | 2 | 2021-05-19T00:56:42.000Z | 2021-05-19T17:11:43.000Z | test/aht20_test.exs | mnishiguchi/aht20 | 2150e1ceb0413b10230e1c6c3680625c58d3a2e9 | [
"MIT"
] | null | null | null | defmodule AHT20Test do
use ExUnit.Case
# https://hexdocs.pm/mox/Mox.html
import Mox
# Any process can consume mocks and stubs defined in your tests.
setup :set_mox_from_context
# Make sure mocks are verified when the test exits
setup :verify_on_exit!
setup do
Mox.stub_with(AHT20.MockTransport, A... | 23.75 | 66 | 0.643158 |
e93bbf65c31178a11426c8f9911457eeadc2ed08 | 1,732 | ex | Elixir | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/sql_server_database_details.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-10-01T09:20:41.000Z | 2021-10-01T09:20:41.000Z | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/sql_server_database_details.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/sql_server_database_details.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... | 34.64 | 143 | 0.739607 |
e93bcb90300bc64342d7ae83ac6ed263b886c77a | 1,956 | ex | Elixir | lib/phoenix_pubsub_kafka/producer/server.ex | ohr486/phoenix_pubsub_kafka | 24c90d2a85541540c290f4865880569dc4e535df | [
"MIT"
] | 1 | 2020-01-13T20:47:47.000Z | 2020-01-13T20:47:47.000Z | lib/phoenix_pubsub_kafka/producer/server.ex | ohr486/phoenix_pubsub_kafka | 24c90d2a85541540c290f4865880569dc4e535df | [
"MIT"
] | null | null | null | lib/phoenix_pubsub_kafka/producer/server.ex | ohr486/phoenix_pubsub_kafka | 24c90d2a85541540c290f4865880569dc4e535df | [
"MIT"
] | 1 | 2018-07-17T05:09:52.000Z | 2018-07-17T05:09:52.000Z | defmodule Phoenix.PubSub.Kafka.Producer.Server do
@moduledoc nil
use GenServer
alias Phoenix.PubSub.Kafka.{Config, Klogger, Topic}
def start_link(name, opts) do
Klogger.debug("Producer.Server.start_link(#{inspect name}, #{inspect opts})")
GenServer.start_link(__MODULE__, [name, opts], name: name)
en... | 38.352941 | 171 | 0.652352 |
e93bd78fb20e0e746799a52bb2166f979b724ce4 | 6,503 | exs | Elixir | test/redex/command/set_test.exs | esmaeilpour/redex | c2c6e29e3dec0df265fdcd9f24cd2471c8615ee7 | [
"Apache-2.0"
] | 173 | 2019-03-15T15:05:11.000Z | 2022-01-10T08:21:48.000Z | test/redex/command/set_test.exs | esmaeilpour/redex | c2c6e29e3dec0df265fdcd9f24cd2471c8615ee7 | [
"Apache-2.0"
] | null | null | null | test/redex/command/set_test.exs | esmaeilpour/redex | c2c6e29e3dec0df265fdcd9f24cd2471c8615ee7 | [
"Apache-2.0"
] | 9 | 2019-07-28T01:20:43.000Z | 2021-08-18T03:41:44.000Z | defmodule Redex.Command.SetTest do
use ExUnit.Case, async: true
use ExUnitProperties
import Mox
import Redex.DataGenerators
import Redex.Command.SET
setup :verify_on_exit!
property "SET a key" do
check all state <- state(),
nodes <- nodes(state),
record = {:redex, {_, ke... | 32.193069 | 88 | 0.565124 |
e93be6f405c6976c4e0b37016750f61297eb2186 | 1,094 | exs | Elixir | mix.exs | BrainBuzzer/ueberauth_wakatime | 7c5824d14f39f677fda951bc074ec084235e7484 | [
"MIT"
] | null | null | null | mix.exs | BrainBuzzer/ueberauth_wakatime | 7c5824d14f39f677fda951bc074ec084235e7484 | [
"MIT"
] | null | null | null | mix.exs | BrainBuzzer/ueberauth_wakatime | 7c5824d14f39f677fda951bc074ec084235e7484 | [
"MIT"
] | null | null | null | defmodule UeberauthWakatime.Mixfile do
use Mix.Project
@version "0.1.0"
@url "https://github.com/BrainBuzzer/ueberauth_wakatime"
def project do
[
app: :ueberauth_wakatime,
version: @version,
elixir: "~> 1.3",
name: "Ueberauth Wakatime",
build_embedded: Mix.env() == :prod,
... | 20.259259 | 58 | 0.559415 |
e93bffb1c8279e8d05b94b9b33ef7cbaba0c0e4c | 67 | exs | Elixir | api/test/views/layout_view_test.exs | acoustep/ember-phoenix-slug-example | 871e667e8cf84605f3bb1b4d2bb5a7dca914a614 | [
"MIT"
] | 1 | 2016-05-08T07:52:50.000Z | 2016-05-08T07:52:50.000Z | api/test/views/layout_view_test.exs | acoustep/ember-phoenix-slug-example | 871e667e8cf84605f3bb1b4d2bb5a7dca914a614 | [
"MIT"
] | null | null | null | api/test/views/layout_view_test.exs | acoustep/ember-phoenix-slug-example | 871e667e8cf84605f3bb1b4d2bb5a7dca914a614 | [
"MIT"
] | null | null | null | defmodule Api.LayoutViewTest do
use Api.ConnCase, async: true
end | 22.333333 | 31 | 0.80597 |
e93c1d3846c5ce351a3a14b2323fb2a486991bc3 | 1,696 | exs | Elixir | mix.exs | fhunleth/tfl_interp | ee1e208bff21b318ab21870d22f53d1ccdebce3a | [
"Apache-2.0"
] | null | null | null | mix.exs | fhunleth/tfl_interp | ee1e208bff21b318ab21870d22f53d1ccdebce3a | [
"Apache-2.0"
] | null | null | null | mix.exs | fhunleth/tfl_interp | ee1e208bff21b318ab21870d22f53d1ccdebce3a | [
"Apache-2.0"
] | null | null | null | defmodule TflInterp.MixProject do
use Mix.Project
def project do
[
app: :tfl_interp,
version: "0.1.4",
elixir: "~> 1.11",
start_permanent: Mix.env() == :prod,
compilers: [:cmake] ++ Mix.compilers(),
description: description(),
package: package(),
deps: deps(),
... | 22.918919 | 91 | 0.572524 |
e93c2cc2237366673b9d4704c7762453f9520da3 | 2,067 | ex | Elixir | lib/heron/source/xml.ex | avoceteditors/heron | 7526f28a95d27531e9614808ddf60418c7deed70 | [
"BSD-3-Clause"
] | null | null | null | lib/heron/source/xml.ex | avoceteditors/heron | 7526f28a95d27531e9614808ddf60418c7deed70 | [
"BSD-3-Clause"
] | null | null | null | lib/heron/source/xml.ex | avoceteditors/heron | 7526f28a95d27531e9614808ddf60418c7deed70 | [
"BSD-3-Clause"
] | null | null | null | defmodule Heron.Source.XML do
require Logger
require Record
defstruct path: "", stat: nil, ext: "", data: []
Record.defrecord :xmlElement, Record.extract(:xmlElement, from_lib: "xmerl/include/xmerl.hrl")
Record.defrecord :xmlText, Record.extract(:xmlText, from_lib: "xmerl/include/xmerl.hrl")
Record.defrec... | 27.932432 | 191 | 0.624577 |
e93c580197f7a5e975381e7ca35fbaed82f76143 | 3,005 | ex | Elixir | lib/web/help_topic.ex | stevegrossi/ex_venture | e02d5a63fdb882d92cfb4af3e15f7b48ad7054aa | [
"MIT"
] | null | null | null | lib/web/help_topic.ex | stevegrossi/ex_venture | e02d5a63fdb882d92cfb4af3e15f7b48ad7054aa | [
"MIT"
] | null | null | null | lib/web/help_topic.ex | stevegrossi/ex_venture | e02d5a63fdb882d92cfb4af3e15f7b48ad7054aa | [
"MIT"
] | null | null | null | defmodule Web.HelpTopic do
@moduledoc """
Bounded context for the Phoenix app talking to the data layer
"""
import Ecto.Query
import Web.KeywordsHelper
alias Data.HelpTopic
alias Data.Repo
alias Game.Command
alias Game.Help.Agent, as: HelpAgent
alias Web.Pagination
@doc """
Get all help_topic... | 21.464286 | 97 | 0.593344 |
e93c9184e4811f013d3befe9967502b075dd04d7 | 1,871 | ex | Elixir | lib/credo/check/warning/operation_on_same_values.ex | sevenseacat/credo | 48837401040d9c2340b5fb9c7d786d31f89f6426 | [
"MIT"
] | 1 | 2020-01-31T10:23:37.000Z | 2020-01-31T10:23:37.000Z | lib/credo/check/warning/operation_on_same_values.ex | sevenseacat/credo | 48837401040d9c2340b5fb9c7d786d31f89f6426 | [
"MIT"
] | null | null | null | lib/credo/check/warning/operation_on_same_values.ex | sevenseacat/credo | 48837401040d9c2340b5fb9c7d786d31f89f6426 | [
"MIT"
] | null | null | null | defmodule Credo.Check.Warning.OperationOnSameValues do
@moduledoc """
Operations on the same values always yield the same result and therefore make
little sense in production code.
Examples:
x == x # always returns true
x <= x # always returns true
x >= x # always returns true
x != ... | 28.348485 | 79 | 0.629075 |
e93cb0c81e68346c44cea3797bdcf75bf3c7aafb | 356 | exs | Elixir | starter_templates/redis/elixir/mix.exs | raphi011/codecrafters-io-languages | 1ccae413931f6c7c7b102a543ea4ff87bda05468 | [
"MIT"
] | 8 | 2020-12-07T09:54:55.000Z | 2022-03-21T01:27:53.000Z | starter_templates/redis/elixir/mix.exs | raphi011/codecrafters-io-languages | 1ccae413931f6c7c7b102a543ea4ff87bda05468 | [
"MIT"
] | 31 | 2020-05-03T05:44:09.000Z | 2022-02-10T23:14:32.000Z | starter_templates/redis/elixir/mix.exs | raphi011/codecrafters-io-languages | 1ccae413931f6c7c7b102a543ea4ff87bda05468 | [
"MIT"
] | 14 | 2020-05-03T01:03:49.000Z | 2021-12-23T14:52:08.000Z | defmodule App.MixProject do
# NOTE: You do not need to change anything in this file.
use Mix.Project
def project do
[
app: :redis,
version: "1.0.0",
elixir: "~> 1.10",
start_permanent: Mix.env() == :prod
]
end
def application do
[
extra_applications: [:logger],
... | 16.952381 | 58 | 0.564607 |
e93ccc27d1d3bc4e2b2af9a2be04a67fe4528614 | 2,010 | exs | Elixir | config/prod.exs | rafaellcustodio/blog | c4aa5e4c59391d548e827e5df095f59ef37a8df1 | [
"MIT"
] | null | null | null | config/prod.exs | rafaellcustodio/blog | c4aa5e4c59391d548e827e5df095f59ef37a8df1 | [
"MIT"
] | null | null | null | config/prod.exs | rafaellcustodio/blog | c4aa5e4c59391d548e827e5df095f59ef37a8df1 | [
"MIT"
] | null | null | null | use Mix.Config
#import Config
# For production, don't forget to configure the url host
# to something meaningful, Phoenix uses this information
# when generating URLs.
#
# Note we also include the path to a cache manifest
# containing the digested version of static files. This
# manifest is generated by the `mix phx.d... | 35.263158 | 66 | 0.712438 |
e93d0274886fcf89fab24802cfb2f33b8d400f57 | 1,597 | ex | Elixir | lib/rest/bangify.ex | jbosse/crux_rest | d99fff0d39efc4574504084b62fb57ef27d748bc | [
"MIT"
] | 6 | 2018-05-22T07:13:48.000Z | 2021-05-04T14:10:11.000Z | lib/rest/bangify.ex | jbosse/crux_rest | d99fff0d39efc4574504084b62fb57ef27d748bc | [
"MIT"
] | 1 | 2021-05-05T17:02:36.000Z | 2021-05-05T21:10:54.000Z | lib/rest/bangify.ex | jbosse/crux_rest | d99fff0d39efc4574504084b62fb57ef27d748bc | [
"MIT"
] | 1 | 2021-05-04T14:10:14.000Z | 2021-05-04T14:10:14.000Z | defmodule Crux.Rest.Bangify do
@moduledoc false
@moduledoc since: "0.3.0"
@doc """
Accepts a block of AST and appends ! to all callback names and its return types.
Discards all annotations that are not @doc and @callback.
"""
@doc since: "0.3.0"
defmacro bangify(do: {:__block__, [], block}) do
bang... | 25.758065 | 85 | 0.64809 |
e93d118867cf7cbc39f478a189e234ad4fedfaf8 | 15,958 | ex | Elixir | lib/mix/tasks/veil/add.ex | optikfluffel/veil | 9c22a0370e9ea9fa6f1c7f04666d91109a7dff97 | [
"MIT"
] | 164 | 2018-02-10T21:33:40.000Z | 2022-03-15T06:10:50.000Z | lib/mix/tasks/veil/add.ex | optikfluffel/veil | 9c22a0370e9ea9fa6f1c7f04666d91109a7dff97 | [
"MIT"
] | 21 | 2018-02-15T02:31:40.000Z | 2021-04-04T07:16:43.000Z | lib/mix/tasks/veil/add.ex | optikfluffel/veil | 9c22a0370e9ea9fa6f1c7f04666d91109a7dff97 | [
"MIT"
] | 14 | 2018-03-24T11:15:07.000Z | 2020-06-28T12:33:38.000Z | defmodule Mix.Tasks.Veil.Add do
use Mix.Task
require IEx
@shortdoc "Add simple passwordless authentication using Veil to your Phoenix app"
@moduledoc """
Veil - simple passwordless authentication for your Phoenix apps.
This installer will do the following:
* Append the :veil configuration to your `conf... | 29.716946 | 105 | 0.602018 |
e93d128759b6aaeb502bb2b23116d4a357024090 | 545 | ex | Elixir | lib/elixir/test/elixir/fixtures/dialyzer/remote_call.ex | doughsay/elixir | 7356a47047d0b54517bd6886603f09b1121dde2b | [
"Apache-2.0"
] | 19,291 | 2015-01-01T02:42:49.000Z | 2022-03-31T21:01:40.000Z | lib/elixir/test/elixir/fixtures/dialyzer/remote_call.ex | doughsay/elixir | 7356a47047d0b54517bd6886603f09b1121dde2b | [
"Apache-2.0"
] | 8,082 | 2015-01-01T04:16:23.000Z | 2022-03-31T22:08:02.000Z | lib/elixir/test/elixir/fixtures/dialyzer/remote_call.ex | doughsay/elixir | 7356a47047d0b54517bd6886603f09b1121dde2b | [
"Apache-2.0"
] | 3,472 | 2015-01-03T04:11:56.000Z | 2022-03-29T02:07:30.000Z | defmodule Dialyzer.RemoteCall do
_ = Application.load(:dialyzer)
case Application.spec(:dialyzer, :vsn) do
~c(2.) ++ _ ->
@dialyzer {:no_fail_call, [map_var: 0]}
three when three < ~c(3.0.2) ->
# regression introduced in 3.0 for map warnings fixed in 3.0.2
@dialyzer {:no_match, [map_var:... | 18.166667 | 68 | 0.592661 |
e93d3e7e8197c8d55ec1fa9262eb510a2f7acb72 | 67 | exs | Elixir | episode10/crypto/config/test.exs | paulfioravanti/learn_elixir | 8424b1a7a89cb9fd1dacb85bcca487601958b8fa | [
"MIT"
] | null | null | null | episode10/crypto/config/test.exs | paulfioravanti/learn_elixir | 8424b1a7a89cb9fd1dacb85bcca487601958b8fa | [
"MIT"
] | null | null | null | episode10/crypto/config/test.exs | paulfioravanti/learn_elixir | 8424b1a7a89cb9fd1dacb85bcca487601958b8fa | [
"MIT"
] | null | null | null | use Mix.Config
config :crypto, Crypto.Encryptor, prefix: "Test: "
| 16.75 | 50 | 0.731343 |
e93d606605a22388d1801f0d8d68697d6948eb02 | 350 | ex | Elixir | lib/inmana/restaurant/create.ex | fontebasso/rocketseat-nlw5-elixir-inmana | 1f3730231b96aef9781a7a78ad7101222a31aa7a | [
"MIT"
] | null | null | null | lib/inmana/restaurant/create.ex | fontebasso/rocketseat-nlw5-elixir-inmana | 1f3730231b96aef9781a7a78ad7101222a31aa7a | [
"MIT"
] | null | null | null | lib/inmana/restaurant/create.ex | fontebasso/rocketseat-nlw5-elixir-inmana | 1f3730231b96aef9781a7a78ad7101222a31aa7a | [
"MIT"
] | null | null | null | defmodule Inmana.Restaurant.Create do
alias Inmana.{Repo, Restaurant}
def call(params) do
params
|> Restaurant.changeset()
|> Repo.insert()
|> handle_insert()
end
defp handle_insert({:ok, %Restaurant{}} = result), do: result
defp handle_insert({:error, result}), do: {:error, %{result: resul... | 23.333333 | 93 | 0.668571 |
e93d779ae52345fb04bb527db7ad876828a22fbc | 213 | exs | Elixir | priv/repo/migrations/20210325112213_add_participation_to_geo_data.exs | gildesmarais/website-1 | 7a19bd98d06a064e52fa279e226002e9c3b986f0 | [
"MIT"
] | 13 | 2021-03-06T12:16:34.000Z | 2022-03-31T09:46:35.000Z | priv/repo/migrations/20210325112213_add_participation_to_geo_data.exs | gildesmarais/website-1 | 7a19bd98d06a064e52fa279e226002e9c3b986f0 | [
"MIT"
] | 148 | 2021-03-05T12:44:55.000Z | 2022-03-11T12:09:06.000Z | priv/repo/migrations/20210325112213_add_participation_to_geo_data.exs | gildesmarais/website-1 | 7a19bd98d06a064e52fa279e226002e9c3b986f0 | [
"MIT"
] | 2 | 2021-06-02T14:31:21.000Z | 2022-02-14T08:36:51.000Z | defmodule Hierbautberlin.Repo.Migrations.AddParticipationToGeoData do
use Ecto.Migration
def change do
alter table(:geo_items) do
add :participation_open, :boolean, default: false
end
end
end
| 21.3 | 69 | 0.755869 |
e93da2045c84c4c93527b55a77f5da86a93adcc4 | 585 | ex | Elixir | lib/webapp/distributions/distribution.ex | runhyve/webapp | 434b074f98c1ebac657b56062c1c1a54e683dea1 | [
"BSD-2-Clause"
] | 12 | 2019-07-02T14:30:06.000Z | 2022-03-12T08:22:18.000Z | lib/webapp/distributions/distribution.ex | runhyve/webapp | 434b074f98c1ebac657b56062c1c1a54e683dea1 | [
"BSD-2-Clause"
] | 9 | 2020-03-16T20:10:50.000Z | 2021-06-17T17:45:44.000Z | lib/webapp/distributions/distribution.ex | runhyve/webapp | 434b074f98c1ebac657b56062c1c1a54e683dea1 | [
"BSD-2-Clause"
] | null | null | null | defmodule Webapp.Distributions.Distribution do
use Ecto.Schema
import Ecto.Changeset
schema "distributions" do
field(:image, :string)
field(:loader, :string)
field(:name, :string)
field(:version, :string)
field(:archived_at, :utc_datetime, default: nil)
has_many(:machines, Webapp.Machine... | 24.375 | 68 | 0.688889 |
e93daab1d4a2bd431276b909c5e6b349d674fa33 | 4,114 | ex | Elixir | clients/machine_learning/lib/google_api/machine_learning/v1/model/google_cloud_ml_v1__hyperparameter_output.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/machine_learning/lib/google_api/machine_learning/v1/model/google_cloud_ml_v1__hyperparameter_output.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/machine_learning/lib/google_api/machine_learning/v1/model/google_cloud_ml_v1__hyperparameter_output.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... | 45.208791 | 277 | 0.729217 |
e93daeb754bc8e3325bf8ff3b12d824ccc18d067 | 1,262 | ex | Elixir | lib/tablex_web/views/error_helpers.ex | groksrc/tablex | ff23bd9df9ad98f4670fa2ef523c27e532158ab5 | [
"MIT"
] | null | null | null | lib/tablex_web/views/error_helpers.ex | groksrc/tablex | ff23bd9df9ad98f4670fa2ef523c27e532158ab5 | [
"MIT"
] | null | null | null | lib/tablex_web/views/error_helpers.ex | groksrc/tablex | ff23bd9df9ad98f4670fa2ef523c27e532158ab5 | [
"MIT"
] | null | null | null | defmodule TablexWeb.ErrorHelpers do
@moduledoc """
Conveniences for translating and building error messages.
"""
use Phoenix.HTML
@doc """
Generates tag for inlined form input errors.
"""
def error_tag(form, field) do
Enum.map(Keyword.get_values(form.errors, field), fn error ->
content_tag(:... | 30.780488 | 75 | 0.670365 |
e93dc40c8fa9e154c4915d2b4bf4e04397c50db1 | 1,062 | exs | Elixir | test/json_encoder_test.exs | britto/proper_case | 1a4bb4a6a125592583d67a8cca77b845ea5a4be2 | [
"MIT"
] | 1 | 2020-09-16T15:38:06.000Z | 2020-09-16T15:38:06.000Z | test/json_encoder_test.exs | vitorleal/proper_case | 07a7cf75a29be60d61501418836e468dca35bb8c | [
"MIT"
] | null | null | null | test/json_encoder_test.exs | vitorleal/proper_case | 07a7cf75a29be60d61501418836e468dca35bb8c | [
"MIT"
] | null | null | null | defmodule ProperCase.JSONEncoderTest do
use ExUnit.Case, async: true
defmodule TestEncoder do
use ProperCase.JSONEncoder, transform: fn(data) -> %{transformed: data} end
end
test "transforms before encoding" do
data = %{
user: %{
first_name: "Han",
last_name: "Solo",
alli... | 26.55 | 79 | 0.536723 |
e93dc577cdf2a70b19ce3d463e5a4e29b8be3046 | 451 | exs | Elixir | test/hexpm_web/controllers/feeds_controller_test.exs | Benjamin-Philip/hexpm | 6f38244f81bbabd234c660f46ea973849ba77a7f | [
"Apache-2.0"
] | 691 | 2017-03-08T09:15:45.000Z | 2022-03-23T22:04:47.000Z | test/hexpm_web/controllers/feeds_controller_test.exs | Benjamin-Philip/hexpm | 6f38244f81bbabd234c660f46ea973849ba77a7f | [
"Apache-2.0"
] | 491 | 2017-03-07T12:58:42.000Z | 2022-03-29T23:32:54.000Z | test/hexpm_web/controllers/feeds_controller_test.exs | Benjamin-Philip/hexpm | 6f38244f81bbabd234c660f46ea973849ba77a7f | [
"Apache-2.0"
] | 200 | 2017-03-12T23:03:39.000Z | 2022-03-05T17:55:52.000Z | defmodule HexpmWeb.FeedsControllerTest do
use HexpmWeb.ConnCase, async: true
test "GET /feeds/blog.xml" do
conn = get(build_conn(), "/feeds/blog.xml")
assert conn.status == 200
assert get_resp_header(conn, "content-type") == ["application/rss+xml; charset=utf-8"]
assert String.starts_with?(conn.re... | 34.692308 | 92 | 0.698448 |
e93dd8e30c7e05a1d987d14e6d74bc54bec8d1c7 | 691 | exs | Elixir | priv/repo/migrations/20210408215224_create_history_funding_rate_history_chunks.exs | nolantait/prop | d68d87d623b1d5352ba1b0f1d44e17bd7a119a3e | [
"MIT"
] | 22 | 2021-06-29T09:25:52.000Z | 2022-03-16T09:17:24.000Z | priv/repo/migrations/20210408215224_create_history_funding_rate_history_chunks.exs | nolantait/prop | d68d87d623b1d5352ba1b0f1d44e17bd7a119a3e | [
"MIT"
] | 54 | 2021-06-28T19:54:17.000Z | 2022-03-27T06:49:30.000Z | priv/repo/migrations/20210408215224_create_history_funding_rate_history_chunks.exs | nolantait/prop | d68d87d623b1d5352ba1b0f1d44e17bd7a119a3e | [
"MIT"
] | 2 | 2022-01-08T10:16:30.000Z | 2022-02-20T09:45:50.000Z | defmodule Prop.Repo.Migrations.CreateHistoryFundingRateHistoryChunks do
use Ecto.Migration
def up do
create table(:funding_rate_history_chunks) do
add(:venue, :string, null: false)
add(:product, :string, null: false)
add(:start_at, :utc_datetime, null: false)
add(:end_at, :utc_datetime,... | 27.64 | 97 | 0.694645 |
e93dfbe540caf8721080ed086fbe68dc4427869b | 1,159 | ex | Elixir | lib/day6.ex | andfoy/adventofcode2020 | 6bc57676f33d76592d30b730bfd2f372a29280de | [
"MIT"
] | null | null | null | lib/day6.ex | andfoy/adventofcode2020 | 6bc57676f33d76592d30b730bfd2f372a29280de | [
"MIT"
] | null | null | null | lib/day6.ex | andfoy/adventofcode2020 | 6bc57676f33d76592d30b730bfd2f372a29280de | [
"MIT"
] | null | null | null | defmodule AdventOfCode.Day6 do
@spec day6 :: {[{MapSet.t(), MapSet.t()}], {integer, integer}}
def day6() do
"day6_input"
|> AdventOfCode.read_file()
|> Enum.chunk_while([], &AdventOfCode.chunk_by_empty/2, &AdventOfCode.chunk_after/1)
|> Enum.map_reduce({0, 0}, fn group, {num_union, num_intersection}... | 35.121212 | 97 | 0.580673 |
e93e0dce459cf5a4c4e09fc275a3c57a4f9bd9c6 | 1,230 | exs | Elixir | test/echo_test.exs | areski/echo-server-elixir | b17768ed9de256aad3b2bfe97cc89a17c4ab8490 | [
"MIT"
] | 2 | 2017-03-12T11:55:52.000Z | 2017-03-12T23:25:14.000Z | test/echo_test.exs | areski/echo-server-elixir | b17768ed9de256aad3b2bfe97cc89a17c4ab8490 | [
"MIT"
] | null | null | null | test/echo_test.exs | areski/echo-server-elixir | b17768ed9de256aad3b2bfe97cc89a17c4ab8490 | [
"MIT"
] | null | null | null | defmodule EchoTest do
use ExUnit.Case
doctest Echo
# test "the truth" do
# assert 1 + 1 == 2
# end
setup do
{:ok, socket} = :gen_tcp.connect('localhost', 12321, [:binary, packet: :line, active: false])
{:ok, [socket: socket]}
end
test "hearing an Echo", %{socket: socket} do
:ok = :gen_t... | 27.333333 | 97 | 0.589431 |
e93e2c647075a23d85ca0ac730f23c7ebb644fd3 | 1,386 | ex | Elixir | lib/wechat/storage/file.ex | hsieh/wechat | 6a49033d3a35a80358481778a0609f214c340a0c | [
"Apache-2.0"
] | null | null | null | lib/wechat/storage/file.ex | hsieh/wechat | 6a49033d3a35a80358481778a0609f214c340a0c | [
"Apache-2.0"
] | null | null | null | lib/wechat/storage/file.ex | hsieh/wechat | 6a49033d3a35a80358481778a0609f214c340a0c | [
"Apache-2.0"
] | null | null | null | defmodule WeChat.Storage.File do
@moduledoc """
文件存储器(default)
将 `token` 数据存储在 `wechat/priv/wechat_app_tokens.json` 文件下
"""
alias WeChat.Storage.Adapter
@behaviour WeChat.Storage.Adapter
@app :wechat
@store_file "wechat_app_tokens.json"
@impl true
@spec store(Adapter.store_id(), Adapter.store_key... | 26.653846 | 86 | 0.608947 |
e93e37bf0e1453643cead58c5e8f99278fc2d302 | 1,494 | ex | Elixir | lib/nested_string.ex | alabama/code-wars-solutions | 507e8333b0dd5a9409aeeb4ef6986b534cc3ca53 | [
"MIT"
] | null | null | null | lib/nested_string.ex | alabama/code-wars-solutions | 507e8333b0dd5a9409aeeb4ef6986b534cc3ca53 | [
"MIT"
] | 2 | 2021-03-09T21:34:13.000Z | 2021-05-10T18:15:27.000Z | lib/nested_string.ex | alabama/code-wars-solutions | 507e8333b0dd5a9409aeeb4ef6986b534cc3ca53 | [
"MIT"
] | null | null | null | defmodule NestedString do
@moduledoc false
@allowed_codepoints ["(", ")", "{", "}", "[", "]"]
def is_properly_nested(string) when not is_binary(string), do: false
def is_properly_nested(string) when rem(byte_size(string), 2) !== 0, do: false
def is_properly_nested(string) when byte_size(string) <= 0, do: true... | 39.315789 | 167 | 0.606426 |
e93e6688be28f0b7bd6b0a761bd73b8e540d4db2 | 660 | exs | Elixir | config/prod.exs | erickueen/burox | ca750675d2b654cf7804f6a403780db950a1c42e | [
"MIT"
] | 14 | 2018-03-21T18:03:14.000Z | 2022-01-23T05:21:57.000Z | config/prod.exs | erickueen/burox | ca750675d2b654cf7804f6a403780db950a1c42e | [
"MIT"
] | 11 | 2018-03-06T21:35:17.000Z | 2019-03-28T21:38:34.000Z | config/prod.exs | erickueen/burox | ca750675d2b654cf7804f6a403780db950a1c42e | [
"MIT"
] | 10 | 2018-02-26T19:41:08.000Z | 2020-03-19T18:58:41.000Z | use Mix.Config
config :logger, level: :warn
config :burox,
buro_url: [{:system, "BURO_URL"}, :instance_role],
buro_user: [{:system, "BURO_USER"}, :instance_role],
buro_password: [{:system, "BURO_PASSWORD"}, :instance_role],
buro_user_special: [{:system, "BURO_USER_SPECIAL"}, :instance_role],
buro_password_s... | 44 | 84 | 0.745455 |
e93eb51ba3d763b3d228862e17ec53fff0b4030d | 894 | ex | Elixir | clients/cloud_run/lib/google_api/cloud_run/v1alpha1/metadata.ex | jamesvl/elixir-google-api | 6c87fb31d996f08fb42ce6066317e9d652a87acc | [
"Apache-2.0"
] | null | null | null | clients/cloud_run/lib/google_api/cloud_run/v1alpha1/metadata.ex | jamesvl/elixir-google-api | 6c87fb31d996f08fb42ce6066317e9d652a87acc | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/cloud_run/lib/google_api/cloud_run/v1alpha1/metadata.ex | myskoach/elixir-google-api | 4f8cbc2fc38f70ffc120fd7ec48e27e46807b563 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 33.111111 | 74 | 0.761745 |
e93ebb90572caea4583b6c18def6434108b59ce4 | 2,187 | ex | Elixir | clients/you_tube/lib/google_api/you_tube/v3/model/channel_section_list_response.ex | nuxlli/elixir-google-api | ecb8679ac7282b7dd314c3e20c250710ec6a7870 | [
"Apache-2.0"
] | null | null | null | clients/you_tube/lib/google_api/you_tube/v3/model/channel_section_list_response.ex | nuxlli/elixir-google-api | ecb8679ac7282b7dd314c3e20c250710ec6a7870 | [
"Apache-2.0"
] | null | null | null | clients/you_tube/lib/google_api/you_tube/v3/model/channel_section_list_response.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... | 36.45 | 157 | 0.724737 |
e93edc9ac9709ccd1bb264910d3be47864893493 | 4,121 | ex | Elixir | lib/confispex.ex | ypavlovmail/confispex | efb6b33f5f2416e3b8b2871258d883de6ba6d2c2 | [
"Apache-2.0"
] | null | null | null | lib/confispex.ex | ypavlovmail/confispex | efb6b33f5f2416e3b8b2871258d883de6ba6d2c2 | [
"Apache-2.0"
] | null | null | null | lib/confispex.ex | ypavlovmail/confispex | efb6b33f5f2416e3b8b2871258d883de6ba6d2c2 | [
"Apache-2.0"
] | null | null | null | defmodule Confispex do
@moduledoc """
A tool which allows to define specs for runtime configuration, cast values according to specified types and inspect them.
"""
@type store :: map()
@type context :: %{atom() => atom()}
@doc """
Initialize or reinitialize a state in server
## Example
Confispe... | 30.753731 | 123 | 0.642805 |
e93ee5f0f1c6130cce500d06490dbf55ade3067f | 607 | exs | Elixir | 02/day2-part2.exs | andyhansen/advent-of-code-2017 | 8c06a10a119120ec61df964fc59d28c3f93bd72f | [
"MIT"
] | null | null | null | 02/day2-part2.exs | andyhansen/advent-of-code-2017 | 8c06a10a119120ec61df964fc59d28c3f93bd72f | [
"MIT"
] | null | null | null | 02/day2-part2.exs | andyhansen/advent-of-code-2017 | 8c06a10a119120ec61df964fc59d28c3f93bd72f | [
"MIT"
] | null | null | null | # defmodule CaptchaSolver do
# def get_value(file, accumulator) do
# end
# def get_value(file, accumulator) do
# accumulator
# end
# end
defmodule LineMagic do
def subtract_max_from_min(line) do
Enum.max(line) - Enum.min(line)
end
def find_matching_and_divide(line) do
end
end
fi... | 20.931034 | 74 | 0.645799 |
e93ef00c8130336a60b338dd6f147fc9b8af11a2 | 1,511 | ex | Elixir | lib/mix/lib/mix/tasks/deps.clean.ex | guilleiguaran/elixir | 952052869ff7af0e293d2a7160b1aebc68fc46be | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/tasks/deps.clean.ex | guilleiguaran/elixir | 952052869ff7af0e293d2a7160b1aebc68fc46be | [
"Apache-2.0"
] | null | null | null | lib/mix/lib/mix/tasks/deps.clean.ex | guilleiguaran/elixir | 952052869ff7af0e293d2a7160b1aebc68fc46be | [
"Apache-2.0"
] | null | null | null | defmodule Mix.Tasks.Deps.Clean do
use Mix.Task
@shortdoc "Remove the given dependencies' files"
@moduledoc """
Remove the given dependencies' files.
Since this is a destructive action, cleaning of all dependencies
can only happen by passing the `--all` command line option.
Clean does not unlock the de... | 27.981481 | 93 | 0.608868 |
e93f10c706cb350cc55d1fb871b3035f2ad09222 | 2,861 | ex | Elixir | lib/furlex/parser.ex | chrisalmeida/furlex | 28a2f1eb68e829b98ad805a5113a2a942213c778 | [
"Apache-2.0"
] | 1 | 2019-01-23T13:39:18.000Z | 2019-01-23T13:39:18.000Z | lib/furlex/parser.ex | alexcastano/furlex | c8e4e474aa2494285fdc19b133d3ad1ea348add9 | [
"Apache-2.0"
] | null | null | null | lib/furlex/parser.ex | alexcastano/furlex | c8e4e474aa2494285fdc19b133d3ad1ea348add9 | [
"Apache-2.0"
] | 1 | 2019-01-11T09:52:03.000Z | 2019-01-11T09:52:03.000Z | defmodule Furlex.Parser do
@doc """
Parses the given HTML, returning a map structure of structured
data keys mapping to their respective values, or an error.
"""
@callback parse(html :: String.t) :: {:ok, Map.t} | {:error, Atom.t}
@doc """
Extracts the given tags from the given raw html according to
t... | 26.009091 | 93 | 0.573576 |
e93f1de32422a608ce56e0f435a79285d2b81c56 | 7,179 | ex | Elixir | deps/phoenix_html/lib/phoenix_html/tag.ex | hallebadkapp/rumbl-ms | ae2ef9975658115f8c4d5c49c28d8bde00a74b83 | [
"MIT"
] | null | null | null | deps/phoenix_html/lib/phoenix_html/tag.ex | hallebadkapp/rumbl-ms | ae2ef9975658115f8c4d5c49c28d8bde00a74b83 | [
"MIT"
] | null | null | null | deps/phoenix_html/lib/phoenix_html/tag.ex | hallebadkapp/rumbl-ms | ae2ef9975658115f8c4d5c49c28d8bde00a74b83 | [
"MIT"
] | null | null | null | defmodule Phoenix.HTML.Tag do
@moduledoc ~S"""
Helpers related to producing HTML tags within templates.
"""
import Phoenix.HTML
import Plug.CSRFProtection, only: [get_csrf_token: 0]
@tag_prefixes [:aria, :data]
@doc ~S"""
Creates an HTML tag with the given name and options.
iex> tag(:br)
... | 30.811159 | 97 | 0.615545 |
e93f6b039d5bf83f6a5dcd786d79bdbfd60f3ff1 | 12,982 | exs | Elixir | apps/core/test/services/users_test.exs | pluralsh/plural | d33d08dee6348126334810e044b3699ef3f74819 | [
"Apache-2.0"
] | 59 | 2021-09-16T19:29:39.000Z | 2022-03-31T20:44:24.000Z | apps/core/test/services/users_test.exs | svilenkov/plural | ac6c6cc15ac4b66a3b5e32ed4a7bee4d46d1f026 | [
"Apache-2.0"
] | 111 | 2021-08-15T09:56:37.000Z | 2022-03-31T23:59:32.000Z | apps/core/test/services/users_test.exs | svilenkov/plural | ac6c6cc15ac4b66a3b5e32ed4a7bee4d46d1f026 | [
"Apache-2.0"
] | 4 | 2021-12-13T09:43:01.000Z | 2022-03-29T18:08:44.000Z | defmodule Core.Services.UsersTest do
use Core.SchemaCase, async: true
use Mimic
alias Core.Services.Users
alias Core.PubSub
describe "#create_user" do
test "Users can be created" do
{:ok, user} = Users.create_user(%{
name: "some user",
password: "superstrongpassword",
email:... | 28.657837 | 101 | 0.63357 |
e93f7d4c8314bdb28df6177749401fabd205b6ae | 345 | ex | Elixir | exercises/practice/all-your-base/lib/all_your_base.ex | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 343 | 2017-06-22T16:28:28.000Z | 2022-03-25T21:33:32.000Z | exercises/practice/all-your-base/lib/all_your_base.ex | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 583 | 2017-06-19T10:48:40.000Z | 2022-03-28T21:43:12.000Z | exercises/practice/all-your-base/lib/all_your_base.ex | devtayls/elixir | 67824de8209ff1b6ed2f736deedfb5bd815130ca | [
"MIT"
] | 228 | 2017-07-05T07:09:32.000Z | 2022-03-27T08:59:08.000Z | defmodule AllYourBase do
@doc """
Given a number in input base, represented as a sequence of digits, converts it to output base,
or returns an error tuple if either of the bases are less than 2
"""
@spec convert(list, integer, integer) :: {:ok, list} | {:error, String.t()}
def convert(digits, input_base, o... | 31.363636 | 96 | 0.704348 |
e93f8ae2b200d17ee0111b739bb8d0dc4cc3eef0 | 5,580 | exs | Elixir | test/groupher_server/cms/article_tags/job_tag_test.exs | coderplanets/coderplanets_server | 3663e56340d6d050e974c91f7e499d8424fc25e9 | [
"Apache-2.0"
] | 240 | 2018-11-06T09:36:54.000Z | 2022-02-20T07:12:36.000Z | test/groupher_server/cms/article_tags/job_tag_test.exs | coderplanets/coderplanets_server | 3663e56340d6d050e974c91f7e499d8424fc25e9 | [
"Apache-2.0"
] | 363 | 2018-07-11T03:38:14.000Z | 2021-12-14T01:42:40.000Z | test/groupher_server/cms/article_tags/job_tag_test.exs | mydearxym/mastani_server | f24034a4a5449200165cf4a547964a0961793eab | [
"Apache-2.0"
] | 22 | 2019-01-27T11:47:56.000Z | 2021-02-28T13:17:52.000Z | defmodule GroupherServer.Test.CMS.ArticleTag.JobTag do
use GroupherServer.TestTools
alias GroupherServer.CMS
alias CMS.Model.{Community, ArticleTag, Job}
alias Helper.{ORM}
setup do
{:ok, user} = db_insert(:user)
{:ok, job} = db_insert(:job)
{:ok, community} = db_insert(:community)
article_t... | 41.333333 | 94 | 0.688889 |
e93f8e4a7f51cbf0e6266fde87fc0293279b3e4e | 3,292 | ex | Elixir | lib/liquex/parser/tag/control_flow.ex | univers-agency/liquex | 1a12e56be21da064d092b76fa3cce9bcb192103c | [
"MIT"
] | null | null | null | lib/liquex/parser/tag/control_flow.ex | univers-agency/liquex | 1a12e56be21da064d092b76fa3cce9bcb192103c | [
"MIT"
] | null | null | null | lib/liquex/parser/tag/control_flow.ex | univers-agency/liquex | 1a12e56be21da064d092b76fa3cce9bcb192103c | [
"MIT"
] | null | null | null | defmodule Liquex.Parser.Tag.ControlFlow do
@moduledoc false
import NimbleParsec
alias Liquex.Parser.Literal
alias Liquex.Parser.Tag
@spec boolean_expression(NimbleParsec.t()) :: NimbleParsec.t()
def boolean_expression(combinator \\ empty()) do
operator =
choice([
string("=="),
s... | 26.126984 | 75 | 0.606318 |
e93feedaf749470df76623247ce6d9a17adcd21e | 1,115 | exs | Elixir | apps/events/config/config.exs | twDuke/myopic | 74b2322eb638fc3a21d0d7f5578bf16f142a711b | [
"MIT"
] | 62 | 2019-01-17T12:34:39.000Z | 2022-03-20T21:49:47.000Z | apps/events/config/config.exs | twDuke/myopic | 74b2322eb638fc3a21d0d7f5578bf16f142a711b | [
"MIT"
] | 375 | 2019-02-13T15:30:50.000Z | 2022-03-30T18:50:41.000Z | apps/events/config/config.exs | twDuke/myopic | 74b2322eb638fc3a21d0d7f5578bf16f142a711b | [
"MIT"
] | 14 | 2019-01-16T19:35:57.000Z | 2022-02-26T18:55:54.000Z | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the paren... | 35.967742 | 73 | 0.750673 |
e93ff8439e6192305582bc9d8a9480c73a56b85c | 3,715 | ex | Elixir | lib/cforum/groups.ex | jrieger/cforum_ex | 61f6ce84708cb55bd0feedf69853dae64146a7a0 | [
"MIT"
] | null | null | null | lib/cforum/groups.ex | jrieger/cforum_ex | 61f6ce84708cb55bd0feedf69853dae64146a7a0 | [
"MIT"
] | null | null | null | lib/cforum/groups.ex | jrieger/cforum_ex | 61f6ce84708cb55bd0feedf69853dae64146a7a0 | [
"MIT"
] | null | null | null | defmodule Cforum.Groups do
@moduledoc """
The Accounts context.
"""
import Ecto.Query, warn: false
alias Cforum.Repo
alias Cforum.Groups.Group
alias Cforum.System
alias Cforum.Caching
def discard_group_cache({:ok, group}) do
Caching.del(:cforum, "groups")
{:ok, group}
end
def discard_g... | 22.379518 | 116 | 0.618304 |
e93ffcdd92f2f716b77328ff0272b29fc6fe56b4 | 1,005 | ex | Elixir | lib/ex_messenger/middleware/json/auth.ex | vheathen/ex_messenger | 03ec264dabc23d14c3d4e84888c7ab839c94959f | [
"MIT"
] | null | null | null | lib/ex_messenger/middleware/json/auth.ex | vheathen/ex_messenger | 03ec264dabc23d14c3d4e84888c7ab839c94959f | [
"MIT"
] | null | null | null | lib/ex_messenger/middleware/json/auth.ex | vheathen/ex_messenger | 03ec264dabc23d14c3d4e84888c7ab839c94959f | [
"MIT"
] | null | null | null | defmodule ExMessenger.Middleware.Json.Auth do
@moduledoc false
@behaviour Tesla.Middleware
alias ExMessenger.Config
def call(env, next, opts) do
opts = opts || []
env
|> proceed(opts)
|> Tesla.run(next)
end
def proceed(env, opts) do
env
|> Map.update!(:body, &add(&1, opts))
... | 20.510204 | 65 | 0.559204 |
e94038ad11f0c32c18bdec706c24cfdf15dc6056 | 639 | ex | Elixir | example/lib/phoenix_datatables_example_web/controllers/fallback_controller.ex | JohnKacz/phoenix_datatables | 747b184972614d87aeb0cd644593951703d718db | [
"MIT"
] | 12 | 2017-10-20T21:08:33.000Z | 2021-11-08T13:04:43.000Z | example/lib/phoenix_datatables_example_web/controllers/fallback_controller.ex | JohnKacz/phoenix_datatables | 747b184972614d87aeb0cd644593951703d718db | [
"MIT"
] | 8 | 2017-11-07T19:53:02.000Z | 2021-01-18T22:15:35.000Z | example/lib/phoenix_datatables_example_web/controllers/fallback_controller.ex | JohnKacz/phoenix_datatables | 747b184972614d87aeb0cd644593951703d718db | [
"MIT"
] | 7 | 2018-07-03T08:18:17.000Z | 2020-05-28T03:06:02.000Z | defmodule PhoenixDatatablesExampleWeb.FallbackController do
@moduledoc """
Translates controller action results into valid `Plug.Conn` responses.
See `Phoenix.Controller.action_fallback/1` for more details.
"""
use PhoenixDatatablesExampleWeb, :controller
def call(conn, {:error, %Ecto.Changeset{} = change... | 30.428571 | 92 | 0.733959 |
e9403907ce1f134021d5925d46866ddf52c54a3f | 4,441 | exs | Elixir | test/tangent_test.exs | geometerio/tangent | c3e7b64f6ec88c2938176b1e4aba856a2eefa706 | [
"MIT"
] | null | null | null | test/tangent_test.exs | geometerio/tangent | c3e7b64f6ec88c2938176b1e4aba856a2eefa706 | [
"MIT"
] | null | null | null | test/tangent_test.exs | geometerio/tangent | c3e7b64f6ec88c2938176b1e4aba856a2eefa706 | [
"MIT"
] | null | null | null | defmodule TangentTest do
use ExUnit.Case, async: true
use Tangent.Test
alias Test.Support.Helpers
alias Test.Support.TestAgent
require Test.Support.Helpers
doctest Tangent
ExUnit.Case.register_attribute(__MODULE__, :initial)
setup context do
initial = context.registered.initial || 0
agent_n... | 29.805369 | 107 | 0.654807 |
e9404d1c4943f8afe677b2bed1675c95ab8c7d87 | 2,729 | exs | Elixir | mix.exs | ARKultur/naboo | ab26c2e82cdc485e23d428fbb1d4798f1fb1388b | [
"MIT"
] | 16 | 2021-12-14T12:25:59.000Z | 2021-12-16T21:56:27.000Z | mix.exs | ARKultur/naboo | ab26c2e82cdc485e23d428fbb1d4798f1fb1388b | [
"MIT"
] | 19 | 2021-12-06T08:35:30.000Z | 2022-03-23T18:20:46.000Z | mix.exs | ARKultur/naboo | ab26c2e82cdc485e23d428fbb1d4798f1fb1388b | [
"MIT"
] | null | null | null | defmodule Naboo.Mixfile do
use Mix.Project
def project do
[
app: :naboo,
version: "0.2.0",
elixir: "~> 1.13",
erlang: "~> 24.1",
elixirc_paths: elixirc_paths(Mix.env()),
test_paths: ["test"],
test_pattern: "**/*_tests.exs",
test_coverage: [tool: ExCoveralls],
... | 26.240385 | 121 | 0.509711 |
e9405d295b8e801d29fd71db37ed47b095614431 | 72 | exs | Elixir | test/test_helper.exs | ustrajunior/lv_template | 633c85d8c5810a130bbf24077845dda49e82ca3f | [
"MIT"
] | null | null | null | test/test_helper.exs | ustrajunior/lv_template | 633c85d8c5810a130bbf24077845dda49e82ca3f | [
"MIT"
] | null | null | null | test/test_helper.exs | ustrajunior/lv_template | 633c85d8c5810a130bbf24077845dda49e82ca3f | [
"MIT"
] | null | null | null | ExUnit.start()
Ecto.Adapters.SQL.Sandbox.mode(LvTemplate.Repo, :manual)
| 24 | 56 | 0.791667 |
e94074cbb34ca7824f36a387700723593b74145e | 862 | exs | Elixir | farmbot_core/test/farmbot_celery_script/compiler_groups_test.exs | gdwb/farmbot_os | 0ef2697c580c9fbf37a22daa063a64addfcb778d | [
"MIT"
] | 1 | 2021-08-23T13:36:14.000Z | 2021-08-23T13:36:14.000Z | farmbot_core/test/farmbot_celery_script/compiler_groups_test.exs | gdwb/farmbot_os | 0ef2697c580c9fbf37a22daa063a64addfcb778d | [
"MIT"
] | null | null | null | farmbot_core/test/farmbot_celery_script/compiler_groups_test.exs | gdwb/farmbot_os | 0ef2697c580c9fbf37a22daa063a64addfcb778d | [
"MIT"
] | null | null | null | defmodule FarmbotCeleryScript.CompilerGroupsTest do
use ExUnit.Case
use Mimic
alias FarmbotCeleryScript.Compiler.{Utils, Scope}
setup :verify_on_exit!
test "add_init_logs" do
scope =
Scope.new()
|> Scope.set("__GROUP__", %{current_index: 4, size: 8})
[header, footer] =
Utils.add_... | 22.102564 | 77 | 0.603248 |
e940829018b39a795cf021435a65b9ebbf59b8e7 | 1,405 | exs | Elixir | mix.exs | chess4ever/credo | cbff1ce364638875f0ac63778585a2989a998327 | [
"MIT"
] | null | null | null | mix.exs | chess4ever/credo | cbff1ce364638875f0ac63778585a2989a998327 | [
"MIT"
] | null | null | null | mix.exs | chess4ever/credo | cbff1ce364638875f0ac63778585a2989a998327 | [
"MIT"
] | null | null | null | defmodule Credo.Mixfile do
use Mix.Project
def project do
[
app: :credo,
version: "1.3.0-rc3",
elixir: ">= 1.5.0",
escript: [main_module: Credo.CLI],
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
deps: deps(),
test_coverage: [tool: Cove... | 25.089286 | 96 | 0.533808 |
e940d186f078d8d0085bb3e428e4f24fb353025b | 80,986 | ex | Elixir | lib/elixir/lib/string.ex | samgaw/elixir | 92e8263102d95281a5aa7850b747636805f13fc9 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/string.ex | samgaw/elixir | 92e8263102d95281a5aa7850b747636805f13fc9 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/string.ex | samgaw/elixir | 92e8263102d95281a5aa7850b747636805f13fc9 | [
"Apache-2.0"
] | null | null | null | import Kernel, except: [length: 1]
defmodule String do
@moduledoc ~S"""
Strings in Elixir are UTF-8 encoded binaries.
Strings in Elixir are a sequence of Unicode characters,
typically written between double quoted strings, such
as `"hello"` and `"héllò"`.
In case a string must have a double-quote in itse... | 29.194665 | 102 | 0.64826 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.