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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
33b7a55eac9dbed77c8f5f93fd5a7ab38a8ca36d | 1,737 | ex | Elixir | clients/content/lib/google_api/content/v21/model/orders_update_merchant_order_id_response.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | 1 | 2021-10-01T09:20:41.000Z | 2021-10-01T09:20:41.000Z | clients/content/lib/google_api/content/v21/model/orders_update_merchant_order_id_response.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v21/model/orders_update_merchant_order_id_response.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"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.74 | 166 | 0.735176 |
33b7e9d54307f20cc25368f8374f63dce03314e5 | 6,566 | exs | Elixir | lib/elixir/test/elixir/gen_server_test.exs | BlakeWilliams/elixir | f77cc2657cf981fdf819915f1ee15e69c3cd91ad | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/gen_server_test.exs | BlakeWilliams/elixir | f77cc2657cf981fdf819915f1ee15e69c3cd91ad | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/gen_server_test.exs | BlakeWilliams/elixir | f77cc2657cf981fdf819915f1ee15e69c3cd91ad | [
"Apache-2.0"
] | null | null | null | Code.require_file("test_helper.exs", __DIR__)
defmodule GenServerTest do
use ExUnit.Case, async: true
defmodule Stack do
use GenServer
def handle_call(:pop, _from, [h | t]) do
{:reply, h, t}
end
def handle_call(:noreply, _from, h) do
{:noreply, h}
end
def handle_call(request... | 32.344828 | 96 | 0.613768 |
33b805939436cedc6aac932b51d85e28e3a02c46 | 610 | exs | Elixir | mix.exs | buys-fran/blog_linter_ex | bf0debb5b66b196d06b3c29e612ad416d720c971 | [
"MIT"
] | 2 | 2021-04-30T04:15:25.000Z | 2021-05-13T17:31:17.000Z | mix.exs | buys-fran/blog_linter_ex | bf0debb5b66b196d06b3c29e612ad416d720c971 | [
"MIT"
] | null | null | null | mix.exs | buys-fran/blog_linter_ex | bf0debb5b66b196d06b3c29e612ad416d720c971 | [
"MIT"
] | 2 | 2021-04-30T04:15:29.000Z | 2021-06-08T13:08:23.000Z | defmodule BlogLinter.MixProject do
use Mix.Project
def project do
[
app: :blog_linter,
version: "0.1.0",
elixir: "~> 1.11",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
e... | 20.333333 | 87 | 0.57377 |
33b810244e913d6215db5dddc5fc29bc61597734 | 381 | exs | Elixir | test/phoenix_starter_web/plugs/content_security_policy_test.exs | newaperio/phoenix_starter | 02f2f5550a94b940bb4e9c61042b032f54af8b72 | [
"MIT"
] | 3 | 2021-03-19T10:39:02.000Z | 2021-07-25T19:54:09.000Z | test/phoenix_starter_web/plugs/content_security_policy_test.exs | newaperio/phoenix_starter | 02f2f5550a94b940bb4e9c61042b032f54af8b72 | [
"MIT"
] | 204 | 2020-11-27T06:00:31.000Z | 2022-03-25T08:08:16.000Z | test/phoenix_starter_web/plugs/content_security_policy_test.exs | newaperio/phoenix_starter | 02f2f5550a94b940bb4e9c61042b032f54af8b72 | [
"MIT"
] | null | null | null | defmodule PhoenixStarterWeb.ContentSecurityPolicyTest do
use PhoenixStarterWeb.ConnCase
test "adds content-security-policy header" do
conn =
build_conn()
|> bypass_through(PhoenixStarterWeb.Router, [:browser])
|> get("/")
header = get_resp_header(conn, "content-security-policy")
ass... | 23.8125 | 61 | 0.706037 |
33b82bdf97ede11bb930607a6fd1a067baefb5de | 2,365 | exs | Elixir | test/xema/cast/integer_test.exs | depressed-pho/xema | 56de4a5d3b3f37827c70f6052f895c59feb0bb51 | [
"MIT"
] | null | null | null | test/xema/cast/integer_test.exs | depressed-pho/xema | 56de4a5d3b3f37827c70f6052f895c59feb0bb51 | [
"MIT"
] | null | null | null | test/xema/cast/integer_test.exs | depressed-pho/xema | 56de4a5d3b3f37827c70f6052f895c59feb0bb51 | [
"MIT"
] | null | null | null | defmodule Xema.Cast.IntegerTest do
use ExUnit.Case, async: true
alias Xema.{CastError, ValidationError}
import AssertBlame
import Xema, only: [cast: 2, cast!: 2, validate: 2]
@set [:foo, 1.0, [foo: 42], [42], %{}, {:tuple}]
describe "cast/2 with a minimal integer schema" do
setup do
%{
... | 25.430108 | 85 | 0.578013 |
33b83bd246f1d4aa9e81f3af450066199b950e6a | 463 | ex | Elixir | lib/militerm/components/timers.ex | jgsmith/militerm | c4252d0a93f5620b90750ac2b61baf282e9ef7eb | [
"Apache-2.0"
] | 6 | 2017-06-16T10:26:35.000Z | 2021-04-07T15:01:00.000Z | lib/militerm/components/timers.ex | jgsmith/militerm | c4252d0a93f5620b90750ac2b61baf282e9ef7eb | [
"Apache-2.0"
] | 2 | 2020-04-14T02:17:46.000Z | 2021-03-10T11:09:05.000Z | lib/militerm/components/timers.ex | jgsmith/militerm | c4252d0a93f5620b90750ac2b61baf282e9ef7eb | [
"Apache-2.0"
] | null | null | null | defmodule Militerm.Components.Timers do
use Militerm.ECS.EctoComponent,
default: %{epoch: nil, timers: []},
schema: Militerm.Data.Timers
@moduledoc """
The timers component manages timers that need to be active while an entity is active.
Loading and saving and other management is done through the enti... | 28.9375 | 91 | 0.738661 |
33b84d85d7309583d7546e9316330e148eafc254 | 74 | exs | Elixir | test/test_helper.exs | clszzyh/battle_city_ui | 1fe115f3eee3be226b669cda961632a6fd6675b9 | [
"MIT"
] | null | null | null | test/test_helper.exs | clszzyh/battle_city_ui | 1fe115f3eee3be226b669cda961632a6fd6675b9 | [
"MIT"
] | 115 | 2020-12-30T11:40:17.000Z | 2022-03-31T02:05:53.000Z | test/test_helper.exs | clszzyh/battle_city_ui | 1fe115f3eee3be226b669cda961632a6fd6675b9 | [
"MIT"
] | null | null | null | ExUnit.start()
Ecto.Adapters.SQL.Sandbox.mode(BattleCityUi.Repo, :manual)
| 24.666667 | 58 | 0.797297 |
33b861fc270292aa13a0760bfc89b4f50b193333 | 793 | ex | Elixir | test/support/models/book.ex | kianmeng/cldr_trans | da3f01eb16cd25e8936d30805bfff5e3ab589409 | [
"Apache-2.0"
] | 1 | 2022-03-10T06:54:28.000Z | 2022-03-10T06:54:28.000Z | test/support/models/book.ex | kianmeng/cldr_trans | da3f01eb16cd25e8936d30805bfff5e3ab589409 | [
"Apache-2.0"
] | 1 | 2022-03-14T01:10:20.000Z | 2022-03-20T14:35:05.000Z | test/support/models/book.ex | kianmeng/cldr_trans | da3f01eb16cd25e8936d30805bfff5e3ab589409 | [
"Apache-2.0"
] | 1 | 2022-03-13T15:38:40.000Z | 2022-03-13T15:38:40.000Z | defmodule Cldr.Trans.Book.Translations.Fields do
use Ecto.Schema
@primary_key false
embedded_schema do
field :title, :string
field :body, :string
end
end
defmodule Cldr.Trans.Book do
@moduledoc """
The same as Article, but declares a default locale and
used only for testing default locale and lo... | 24.030303 | 86 | 0.715006 |
33b886df2a72b1377115e6adf40fb958bd3860d7 | 873 | ex | Elixir | server/lib/realtime/metrics/prom_ex_plugins/realtime_plugin.ex | profencer/realtime | b3a20e8278276a98d47c2c938abe73cfd9e69a63 | [
"Apache-2.0"
] | 1 | 2020-06-03T10:49:40.000Z | 2020-06-03T10:49:40.000Z | server/lib/realtime/metrics/prom_ex_plugins/realtime_plugin.ex | profencer/realtime | b3a20e8278276a98d47c2c938abe73cfd9e69a63 | [
"Apache-2.0"
] | null | null | null | server/lib/realtime/metrics/prom_ex_plugins/realtime_plugin.ex | profencer/realtime | b3a20e8278276a98d47c2c938abe73cfd9e69a63 | [
"Apache-2.0"
] | null | null | null | defmodule Realtime.Metrics.PromEx.Plugins.Realtime do
use PromEx.Plugin
@event_prefix [:realtime, :prom_ex, :plugin, :socket]
@impl true
def event_metrics(_opts) do
Event.build(
:realtime_socket_event_metrics,
[
last_value(
[:realtime, :active, :websocket, :connection, :total... | 29.1 | 74 | 0.634593 |
33b891a0cc122ea0c1894b4d8fd2ba2f207a666d | 2,749 | ex | Elixir | apps/site/lib/site_web/views/teaser_view.ex | noisecapella/dotcom | d5ef869412102d2230fac3dcc216f01a29726227 | [
"MIT"
] | 42 | 2019-05-29T16:05:30.000Z | 2021-08-09T16:03:37.000Z | apps/site/lib/site_web/views/teaser_view.ex | noisecapella/dotcom | d5ef869412102d2230fac3dcc216f01a29726227 | [
"MIT"
] | 872 | 2019-05-29T17:55:50.000Z | 2022-03-30T09:28:43.000Z | apps/site/lib/site_web/views/teaser_view.ex | noisecapella/dotcom | d5ef869412102d2230fac3dcc216f01a29726227 | [
"MIT"
] | 12 | 2019-07-01T18:33:21.000Z | 2022-03-10T02:13:57.000Z | defmodule SiteWeb.CMS.TeaserView do
@moduledoc """
Handles display elements of teaser partials from the CMS.
"""
use SiteWeb, :view
import SiteWeb.CMSHelpers, only: [cms_route_to_class: 1, link_category: 1]
alias CMS.Partial.Teaser
@all_fields [:image, :title, :date, :topic, :location, :summary]
@ima... | 40.426471 | 91 | 0.711531 |
33b89880941bc457a49fb656c8f2ec474944f1ab | 643 | ex | Elixir | clients/elixir/generated/lib/cloud_manager_api/model/environment_logs__embedded.ex | shinesolutions/cloudmanager-api-clients | d73a25878f6cc57af954362ba8dccc90d54e6131 | [
"Apache-2.0"
] | 3 | 2020-06-23T05:31:52.000Z | 2020-11-26T05:34:57.000Z | clients/elixir/generated/lib/cloud_manager_api/model/environment_logs__embedded.ex | shinesolutions/cloudmanager-api-clients | d73a25878f6cc57af954362ba8dccc90d54e6131 | [
"Apache-2.0"
] | 2 | 2021-01-21T01:19:54.000Z | 2021-12-09T22:30:22.000Z | clients/elixir/generated/lib/cloud_manager_api/model/environment_logs__embedded.ex | shinesolutions/cloudmanager-api-clients | d73a25878f6cc57af954362ba8dccc90d54e6131 | [
"Apache-2.0"
] | 1 | 2020-11-18T11:48:13.000Z | 2020-11-18T11:48:13.000Z | # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://openapi-generator.tech
# Do not edit the class manually.
defmodule CloudManagerAPI.Model.EnvironmentLogsEmbedded do
@moduledoc """
"""
@derive [Poison.Encoder]
defstruct [
:"downloads"
]
@type t :... | 22.964286 | 91 | 0.723173 |
33b8b8c4cbaf2ec85074c38bcf49855d3f4eea88 | 8,032 | ex | Elixir | lib/helper/handle_social_request.ex | farhangj2020/mishka-auth | 33d461f248d5cdcc935c0d64a93faf95830fe500 | [
"MIT"
] | 8 | 2020-09-07T14:47:42.000Z | 2021-11-03T21:53:37.000Z | lib/helper/handle_social_request.ex | farhangj2020/mishka-auth | 33d461f248d5cdcc935c0d64a93faf95830fe500 | [
"MIT"
] | 1 | 2022-03-11T09:51:34.000Z | 2022-03-11T09:51:34.000Z | lib/helper/handle_social_request.ex | farhangj2020/mishka-auth | 33d461f248d5cdcc935c0d64a93faf95830fe500 | [
"MIT"
] | 3 | 2020-08-02T14:05:21.000Z | 2020-09-12T12:58:59.000Z | defmodule MishkaAuth.Client.Helper.HandleSocialRequest do
alias MishkaAuth.Client.{Users.ClientUserQuery, Identity.ClientIdentityQuery}
@temporary_table "temporary_user_data"
@ttl_time_of_temporary_social_data 18000 #5 hour
@auth_version 2
@type temporary_user_uniq_id() :: String.t()
@type token() :: Str... | 37.886792 | 159 | 0.687625 |
33b8ef2a94fabe5018849ecef152004ee0671259 | 1,928 | ex | Elixir | lib/nerves_time_zones.ex | jfcloutier/nerves_time_zones | 06b31f80f52d166176bb204a5beebc6308f5c155 | [
"Apache-2.0"
] | null | null | null | lib/nerves_time_zones.ex | jfcloutier/nerves_time_zones | 06b31f80f52d166176bb204a5beebc6308f5c155 | [
"Apache-2.0"
] | null | null | null | lib/nerves_time_zones.ex | jfcloutier/nerves_time_zones | 06b31f80f52d166176bb204a5beebc6308f5c155 | [
"Apache-2.0"
] | null | null | null | defmodule NervesTimeZones do
@moduledoc """
Local time support for Nerves devices
The `nerves_time_zones` application provides support for local time on Nerves
devices. It does this by bundling a time zone database that's compatible with
the `zoneinfo` library and providing logic to set the local time zone w... | 37.803922 | 79 | 0.733921 |
33b909296e1c9d446b0f0377e19b0585acc1098d | 2,733 | exs | Elixir | test/cldr_calendars_format_test.exs | kipcole9/cldr_calendars_format | 597866b77222a6988626d4b8305427f7ffa8d175 | [
"Apache-2.0"
] | null | null | null | test/cldr_calendars_format_test.exs | kipcole9/cldr_calendars_format | 597866b77222a6988626d4b8305427f7ffa8d175 | [
"Apache-2.0"
] | 2 | 2020-04-05T02:55:32.000Z | 2020-04-07T06:15:51.000Z | test/cldr_calendars_format_test.exs | kipcole9/cldr_calendars_format | 597866b77222a6988626d4b8305427f7ffa8d175 | [
"Apache-2.0"
] | 1 | 2020-04-06T04:15:22.000Z | 2020-04-06T04:15:22.000Z | defmodule Cldr.Calendar.Format.Test do
use ExUnit.Case
doctest Cldr.Calendar.Format
setup do
month =
Cldr.Calendar.Format.month(2019, 4,
formatter: Cldr.Calendar.Test.Formatter,
caption: "My Caption",
calendar: Cldr.Calendar.Gregorian,
private: "My private options"
... | 25.783019 | 97 | 0.556897 |
33b99f224e5d4be756a0401210773550630fcd0e | 1,670 | ex | Elixir | lib/adaptable_costs_evaluator_web/endpoint.ex | patrotom/adaptable-costs-evaluator | c97e65af1e021d7c6acf6564f4671c60321346e3 | [
"MIT"
] | null | null | null | lib/adaptable_costs_evaluator_web/endpoint.ex | patrotom/adaptable-costs-evaluator | c97e65af1e021d7c6acf6564f4671c60321346e3 | [
"MIT"
] | 4 | 2021-12-07T12:26:50.000Z | 2021-12-30T14:17:25.000Z | lib/adaptable_costs_evaluator_web/endpoint.ex | patrotom/adaptable-costs-evaluator | c97e65af1e021d7c6acf6564f4671c60321346e3 | [
"MIT"
] | null | null | null | defmodule AdaptableCostsEvaluatorWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :adaptable_costs_evaluator
# 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 [
st... | 31.509434 | 97 | 0.737725 |
33b9b03c1951b822e20f34a496032d63c0d01c1b | 9,166 | ex | Elixir | lib/vega_web/live/board_live.ex | Fudoshiki/vega | 0577024afc734933048645976705784512fbc1f4 | [
"MIT"
] | 4 | 2020-03-22T22:12:29.000Z | 2020-07-01T22:32:01.000Z | lib/vega_web/live/board_live.ex | Fudoshiki/vega | 0577024afc734933048645976705784512fbc1f4 | [
"MIT"
] | 3 | 2021-03-10T11:53:41.000Z | 2021-10-17T11:18:54.000Z | lib/vega_web/live/board_live.ex | Fudoshiki/vega | 0577024afc734933048645976705784512fbc1f4 | [
"MIT"
] | 3 | 2020-03-30T19:03:23.000Z | 2022-01-17T20:21:42.000Z | defmodule VegaWeb.BoardLive do
use VegaWeb, :live
import VegaWeb.Views.Helpers
alias Vega.Board
alias Vega.BoardList
alias Vega.Issue
def mount(params, session, socket) do
socket = session
|> set_locale()
|> fetch_user(socket)
|> assign_asserts("board")
pa... | 36.086614 | 147 | 0.65132 |
33b9b8d5bd50c6b33be6eb1d5b959a25c4458433 | 1,532 | ex | Elixir | lib/exshome/settings/schema.ex | exshome/exshome | ef6b7a89f11dcd2016856dd49517b74aeebb6513 | [
"MIT"
] | 2 | 2021-12-21T16:32:56.000Z | 2022-02-22T17:06:39.000Z | lib/exshome/settings/schema.ex | exshome/exshome | ef6b7a89f11dcd2016856dd49517b74aeebb6513 | [
"MIT"
] | null | null | null | lib/exshome/settings/schema.ex | exshome/exshome | ef6b7a89f11dcd2016856dd49517b74aeebb6513 | [
"MIT"
] | null | null | null | defmodule Exshome.Settings.Schema do
@moduledoc """
Schema for storing application settings.
"""
use Exshome.Schema
import Ecto.Query, warn: false
alias Exshome.Repo
@primary_key {:name, :string, []}
schema "service_settings" do
field(:data, :map)
field(:version, :integer)
timestamps()
... | 23.212121 | 89 | 0.563969 |
33b9c073a697021e3f50e06a15f92b84b6b363f2 | 2,047 | ex | Elixir | clients/cloud_build/lib/google_api/cloud_build/v1/model/storage_source_manifest.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/cloud_build/lib/google_api/cloud_build/v1/model/storage_source_manifest.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/cloud_build/lib/google_api/cloud_build/v1/model/storage_source_manifest.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"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.622642 | 214 | 0.726917 |
33b9e969144a2d1d55b71943d3e69cc68976e405 | 8,261 | ex | Elixir | lib/mix/tasks/ecto.dump.schema.ex | pmarreck/ecto_generator | 3bd1f0922d11428e0a209870b68a4863eb573029 | [
"MIT"
] | null | null | null | lib/mix/tasks/ecto.dump.schema.ex | pmarreck/ecto_generator | 3bd1f0922d11428e0a209870b68a4863eb573029 | [
"MIT"
] | null | null | null | lib/mix/tasks/ecto.dump.schema.ex | pmarreck/ecto_generator | 3bd1f0922d11428e0a209870b68a4863eb573029 | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.Ecto.Dump.Schema do
use Mix.Task
@shortdoc "Dump schemas/models from repos"
@recursive true
@moduledoc """
Dump models from repos
## Example:
mix ecto.dump.models
"""
@mysql "mysql"
@postgres "postgres"
@template ~s"""
defmodule <%= app <> "." <> module_name %> do
use... | 33.581301 | 421 | 0.613122 |
33ba03b97fb9d88aadff777f580b0323488af8c2 | 914 | ex | Elixir | lista_anotados/lib/lista_anotados_monitored.ex | bossiernesto/elixir_basics | 035e3c719b189c53a5ba7272fe106c6ad58da563 | [
"BSD-3-Clause"
] | null | null | null | lista_anotados/lib/lista_anotados_monitored.ex | bossiernesto/elixir_basics | 035e3c719b189c53a5ba7272fe106c6ad58da563 | [
"BSD-3-Clause"
] | 12 | 2017-01-24T20:40:26.000Z | 2017-01-25T02:19:42.000Z | lista_anotados/lib/lista_anotados_monitored.ex | bossiernesto/elixir_basics | 035e3c719b189c53a5ba7272fe106c6ad58da563 | [
"BSD-3-Clause"
] | 1 | 2018-12-30T15:59:45.000Z | 2018-12-30T15:59:45.000Z | defmodule ListaAnotados.Registry do
use GenServer
## Client API
@doc """
Starts the registry.
"""
def start_link do
GenServer.start_link(__MODULE__, :ok, [])
end
@doc """
Returns `{:ok, pid}` if the bucket exists, `:error` otherwise.
"""
def lookup(server, name) do
GenServer.call(server,... | 20.772727 | 68 | 0.634573 |
33ba50a4d002cf4b2e0f9ab7c3b3f2a1e871fd9f | 2,030 | ex | Elixir | farmbot_os/lib/farmbot_os/sys_calls/farmware.ex | adamswsk/farmbot_os | d177d3b74888c1e7bcbf8f8595818708ee97f73b | [
"MIT"
] | 1 | 2021-08-23T13:36:14.000Z | 2021-08-23T13:36:14.000Z | farmbot_os/lib/farmbot_os/sys_calls/farmware.ex | adamswsk/farmbot_os | d177d3b74888c1e7bcbf8f8595818708ee97f73b | [
"MIT"
] | null | null | null | farmbot_os/lib/farmbot_os/sys_calls/farmware.ex | adamswsk/farmbot_os | d177d3b74888c1e7bcbf8f8595818708ee97f73b | [
"MIT"
] | null | null | null | defmodule FarmbotOS.SysCalls.Farmware do
@moduledoc false
require FarmbotCore.Logger
alias FarmbotCore.{Asset, AssetSupervisor, FarmwareRuntime}
alias FarmbotExt.API.ImageUploader
@farmware_timeout 1_200_000
def update_farmware(farmware_name) do
with {:ok, installation} <- lookup_installation(farmware... | 28.591549 | 79 | 0.679803 |
33ba5692346d50d51f44dd9a4cb500818f442993 | 1,369 | ex | Elixir | lib/tirexs/search/warmer.ex | falood/tirexs | 9c63532cf2f50f77fb437f617d433741771d3619 | [
"Apache-2.0"
] | null | null | null | lib/tirexs/search/warmer.ex | falood/tirexs | 9c63532cf2f50f77fb437f617d433741771d3619 | [
"Apache-2.0"
] | null | null | null | lib/tirexs/search/warmer.ex | falood/tirexs | 9c63532cf2f50f77fb437f617d433741771d3619 | [
"Apache-2.0"
] | null | null | null | defmodule Tirexs.Search.Warmer do
@moduledoc false
use Tirexs.DSL.Logic
alias Tirexs.Query, as: Query
alias Tirexs.Query.Filter, as: Filter
alias Tirexs.Search.Facets, as: Facets
def transpose(block) do
case block do
{:filter, _, [params]} -> Filter._filter(params[:do])
{:query, ... | 29.76087 | 92 | 0.604091 |
33ba748e8e83ed03dc50e5af71c613cf0c67002a | 772 | ex | Elixir | lib/client/taxes_client.ex | littlelines/frex | e3d9005b782fa0c0aaff0c0368f154c45fb7a302 | [
"Apache-2.0"
] | 2 | 2017-02-10T16:46:21.000Z | 2020-05-04T11:50:50.000Z | lib/client/taxes_client.ex | littlelines/frex | e3d9005b782fa0c0aaff0c0368f154c45fb7a302 | [
"Apache-2.0"
] | null | null | null | lib/client/taxes_client.ex | littlelines/frex | e3d9005b782fa0c0aaff0c0368f154c45fb7a302 | [
"Apache-2.0"
] | 1 | 2019-11-27T15:43:55.000Z | 2019-11-27T15:43:55.000Z | defmodule Frex.Client.Taxes do
@moduledoc """
Client module for interacting with the Freshbooks taxes endpoint.
"""
use Frex.Endpoint, :client
@doc """
Sends a get request to the Freshbooks API taxes endpoint.
## Parameters
* `tax_id` (**required**) -- tax ID
"""
def get(credentials, tax_id) d... | 20.864865 | 69 | 0.634715 |
33baa694df3e3a415242e3c7fee1566948e1cda8 | 512 | ex | Elixir | lib/les/invoices/invoice_payment_log.ex | gpad/les | 2317b8055ab24aa857a6cda06f6e529c992c668c | [
"Apache-2.0"
] | 11 | 2018-04-06T14:02:15.000Z | 2020-12-09T10:44:03.000Z | lib/les/invoices/invoice_payment_log.ex | gpad/les | 2317b8055ab24aa857a6cda06f6e529c992c668c | [
"Apache-2.0"
] | 1 | 2018-11-18T02:35:23.000Z | 2018-11-18T02:35:23.000Z | lib/les/invoices/invoice_payment_log.ex | gpad/les | 2317b8055ab24aa857a6cda06f6e529c992c668c | [
"Apache-2.0"
] | null | null | null | defmodule Les.Invoices.InvoicePaymentLog do
use Ecto.Schema
import Ecto.Changeset
alias Les.Invoices.InvoicePaymentLog
schema "invoice_payment_log" do
field :result, :integer
field :result_message, :string
belongs_to :invoice, Les.Invoices.Invoice
timestamps()
end
@doc false
def change... | 23.272727 | 69 | 0.734375 |
33baabee67f0041e515a6d566caf1781fd54fe07 | 564 | exs | Elixir | elixir/app/mix.exs | dangvanthanh/1984 | 984e632c49d2d90784576cfd31aa77375846827d | [
"MIT"
] | null | null | null | elixir/app/mix.exs | dangvanthanh/1984 | 984e632c49d2d90784576cfd31aa77375846827d | [
"MIT"
] | null | null | null | elixir/app/mix.exs | dangvanthanh/1984 | 984e632c49d2d90784576cfd31aa77375846827d | [
"MIT"
] | null | null | null | defmodule App.MixProject do
use Mix.Project
def project do
[
app: :app,
version: "0.1.0",
elixir: "~> 1.12",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applicatio... | 19.448276 | 87 | 0.570922 |
33bac96c5ce93d7cdf153887f938a1760e48e72f | 544 | ex | Elixir | web/views/changeset_view.ex | slurmulon/hone | 9cc817fef06fbec564b18a11faa472ecf902aa62 | [
"MIT"
] | null | null | null | web/views/changeset_view.ex | slurmulon/hone | 9cc817fef06fbec564b18a11faa472ecf902aa62 | [
"MIT"
] | null | null | null | web/views/changeset_view.ex | slurmulon/hone | 9cc817fef06fbec564b18a11faa472ecf902aa62 | [
"MIT"
] | null | null | null | defmodule Hone.ChangesetView do
use Hone.Web, :view
@doc """
Traverses and translates changeset errors.
See `Ecto.Changeset.traverse_errors/2` and
`Hone.ErrorHelpers.translate_error/1` for more details.
"""
def translate_errors(changeset) do
Ecto.Changeset.traverse_errors(changeset, &translate_error... | 27.2 | 65 | 0.729779 |
33bad000b293122769764a13d863120e7ba8cc47 | 1,513 | ex | Elixir | clients/calendar/lib/google_api/calendar/v3/model/time_period.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/calendar/lib/google_api/calendar/v3/model/time_period.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/calendar/lib/google_api/calendar/v3/model/time_period.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 30.26 | 98 | 0.709848 |
33bae13c22b2aa7dfc46c8e432577d99b1a0cae5 | 6,010 | exs | Elixir | .credo.exs | ZombieHarvester/elixir-xlsx_parser | 4f75ff24ec1a5a1aa913682760a761bc21fa2240 | [
"Unlicense"
] | null | null | null | .credo.exs | ZombieHarvester/elixir-xlsx_parser | 4f75ff24ec1a5a1aa913682760a761bc21fa2240 | [
"Unlicense"
] | 48 | 2019-09-24T11:10:50.000Z | 2021-06-25T15:25:55.000Z | .credo.exs | ZombieHarvester/elixir-xlsx_parser | 4f75ff24ec1a5a1aa913682760a761bc21fa2240 | [
"Unlicense"
] | null | null | null | # This file contains the configuration for Credo and you are probably reading
# this after creating it with `mix credo.gen.config`.
#
# If you find anything wrong or unclear in this file, please report an
# issue on GitHub: https://github.com/rrrene/credo/issues
#
%{
#
# You can have as many configs as you like in ... | 39.539474 | 130 | 0.617138 |
33baee96db55095fab90b307c849940700c060d4 | 9,533 | ex | Elixir | lib/slax/github.ex | HoffsMH/slax | b91ee30b9fd71a4cb7826f50b605ce580b7c1651 | [
"MIT"
] | null | null | null | lib/slax/github.ex | HoffsMH/slax | b91ee30b9fd71a4cb7826f50b605ce580b7c1651 | [
"MIT"
] | null | null | null | lib/slax/github.ex | HoffsMH/slax | b91ee30b9fd71a4cb7826f50b605ce580b7c1651 | [
"MIT"
] | null | null | null | defmodule Slax.Github do
@moduledoc """
Functions for working with the Github API
"""
alias Slax.Http
alias Slax.Http.Error
defp config() do
Application.get_env(:slax, __MODULE__)
end
defp api_url() do
config()[:api_url]
end
defp oauth_url() do
config()[:oauth_url]
end
@timeout_... | 21.184444 | 103 | 0.541802 |
33bb35fc222f9050d2e001939b4fd2b3488ac4f6 | 1,747 | exs | Elixir | test/event/event_handler_name_test.exs | Cantido/commanded | e8058c4381e16547e6960eaf9f38619c6a43b18f | [
"MIT"
] | 1,220 | 2017-10-31T10:56:40.000Z | 2022-03-31T17:40:19.000Z | test/event/event_handler_name_test.exs | Cantido/commanded | e8058c4381e16547e6960eaf9f38619c6a43b18f | [
"MIT"
] | 294 | 2017-11-03T10:33:41.000Z | 2022-03-24T08:36:42.000Z | test/event/event_handler_name_test.exs | Cantido/commanded | e8058c4381e16547e6960eaf9f38619c6a43b18f | [
"MIT"
] | 208 | 2017-11-03T10:56:47.000Z | 2022-03-14T05:49:38.000Z | defmodule Commanded.Event.EventHandlerNameTest do
use ExUnit.Case
describe "event handler name" do
test "should parse string" do
assert Commanded.Event.Handler.parse_name("foo") == "foo"
end
test "should parse atom to string" do
assert Commanded.Event.Handler.parse_name(:foo) == ":foo"
... | 28.177419 | 90 | 0.722954 |
33bba20902ec711cf8943b69ed16689f87db8488 | 2,351 | exs | Elixir | apps/web/test/web/controllers/github_webhook_controller_test.exs | elixirschool/extracurricular | eb8b725fa49ca91b1c6b7e610a8522bc81a80de1 | [
"MIT"
] | 48 | 2017-08-21T02:08:16.000Z | 2022-01-05T14:02:56.000Z | apps/web/test/web/controllers/github_webhook_controller_test.exs | elixirschool/extracurricular | eb8b725fa49ca91b1c6b7e610a8522bc81a80de1 | [
"MIT"
] | 68 | 2017-08-21T02:17:32.000Z | 2017-11-09T15:56:27.000Z | apps/web/test/web/controllers/github_webhook_controller_test.exs | elixirschool/extracurricular | eb8b725fa49ca91b1c6b7e610a8522bc81a80de1 | [
"MIT"
] | 26 | 2017-08-21T04:28:22.000Z | 2018-12-09T14:20:29.000Z | defmodule Web.GitHubWebhookControllerTest do
use Web.ConnCase
alias Data.{Opportunities, Projects}
defp webhook_body_for_project(project) do
%{
"action": "opened",
"issue": %{
"html_url": "https://github.com/repos/elixirschool/extracurricular/issues/2",
"title": "This is a test",... | 24.237113 | 124 | 0.570396 |
33bba5750c8efb8a1e4752f1f0edade4f8aebb0f | 1,037 | ex | Elixir | lib/exdgraph/query.ex | optikfluffel/exdgraph | 76303ba762fcab4ecf52f901c7ee8557665e87cf | [
"Apache-2.0"
] | null | null | null | lib/exdgraph/query.ex | optikfluffel/exdgraph | 76303ba762fcab4ecf52f901c7ee8557665e87cf | [
"Apache-2.0"
] | null | null | null | lib/exdgraph/query.ex | optikfluffel/exdgraph | 76303ba762fcab4ecf52f901c7ee8557665e87cf | [
"Apache-2.0"
] | null | null | null | defmodule ExDgraph.Query do
@moduledoc """
Provides the functions for the callbacks from the DBConnection behaviour.
"""
alias ExDgraph.{Exception, QueryStatement, Transform}
@doc false
def query(conn, statement) do
case query_commit(conn, statement) do
{:error, f} -> {:error, code: f.code, messa... | 23.568182 | 75 | 0.630665 |
33bbb1bfd1a4820617dc189ec9fcaf49764da208 | 1,485 | ex | Elixir | lib/spandex_phoenix/plug/add_context.ex | prosapient/spandex_phoenix | 487a635f3334e9aa0a4c86c7abc656ac00a6acc8 | [
"MIT"
] | 69 | 2018-09-14T18:17:50.000Z | 2022-01-11T01:20:55.000Z | lib/spandex_phoenix/plug/add_context.ex | prosapient/spandex_phoenix | 487a635f3334e9aa0a4c86c7abc656ac00a6acc8 | [
"MIT"
] | 49 | 2018-10-11T02:47:58.000Z | 2022-03-17T09:10:07.000Z | lib/spandex_phoenix/plug/add_context.ex | prosapient/spandex_phoenix | 487a635f3334e9aa0a4c86c7abc656ac00a6acc8 | [
"MIT"
] | 27 | 2018-09-19T14:14:06.000Z | 2022-03-07T21:16:33.000Z | defmodule SpandexPhoenix.Plug.AddContext do
@moduledoc false
@behaviour Plug
@init_opts Optimal.schema(
opts: [
customize_metadata: {:function, 1},
tracer: :atom
],
defaults: [
customize_metadata: &SpandexPhoenix.def... | 30.9375 | 79 | 0.565657 |
33bbc553e396940017e733136d3a36c413c15aa2 | 3,012 | ex | Elixir | lib/thesis/controller.ex | rogaz/thesis-phoenix | 8ad24cdc7e24bf312139a527db5a3bf07e05820f | [
"MIT"
] | 681 | 2016-06-21T20:49:21.000Z | 2022-02-19T04:08:38.000Z | lib/thesis/controller.ex | rogaz/thesis-phoenix | 8ad24cdc7e24bf312139a527db5a3bf07e05820f | [
"MIT"
] | 125 | 2016-06-21T21:14:49.000Z | 2020-12-12T20:15:48.000Z | lib/thesis/controller.ex | rogaz/thesis-phoenix | 8ad24cdc7e24bf312139a527db5a3bf07e05820f | [
"MIT"
] | 76 | 2016-09-06T03:40:55.000Z | 2022-01-20T21:29:22.000Z | defmodule Thesis.Controller do
@moduledoc """
Provides a plug that preloads any Thesis content for a page.
Typically, you'll add this to your `web/web.ex` file, under the `controller`
function:
def controller do
quote do
use Phoenix.Controller
use Thesis.Controller
#... | 28.685714 | 84 | 0.641102 |
33bbcbb62ed6823825a30ae841a97ad92847909f | 1,718 | ex | Elixir | 14-Bitmask/lib/bitmask_v2.ex | dvrensk/advent-of-code-2020 | 237e80da9958f37e51c0ac84da74bec5fec1f185 | [
"Unlicense"
] | 1 | 2020-12-02T01:34:06.000Z | 2020-12-02T01:34:06.000Z | 14-Bitmask/lib/bitmask_v2.ex | dvrensk/advent-of-code-2020 | 237e80da9958f37e51c0ac84da74bec5fec1f185 | [
"Unlicense"
] | null | null | null | 14-Bitmask/lib/bitmask_v2.ex | dvrensk/advent-of-code-2020 | 237e80da9958f37e51c0ac84da74bec5fec1f185 | [
"Unlicense"
] | null | null | null | defmodule BitmaskV2 do
import Bitwise
defstruct mem: %{}, mask: nil
@doc """
iex> BitmaskV2.run(BitmaskV2.sample)
%{16 => 1, 17 => 1, 18 => 1, 19 => 1, 24 => 1, 25 => 1, 26 => 1, 27 => 1, 58 => 100, 59 => 100}
"""
def run(str) do
str
|> String.split("\n", trim: true)
|> run(%__MODULE__{})
... | 23.861111 | 97 | 0.538417 |
33bbf090ae95b26b6f042179deb1e6bf9d7fee17 | 574 | ex | Elixir | web/models/invitation.ex | remigijusj/coherence | 36fe35b0bfe7ac63b44b4046f3ba62f2fe69603a | [
"MIT"
] | null | null | null | web/models/invitation.ex | remigijusj/coherence | 36fe35b0bfe7ac63b44b4046f3ba62f2fe69603a | [
"MIT"
] | null | null | null | web/models/invitation.ex | remigijusj/coherence | 36fe35b0bfe7ac63b44b4046f3ba62f2fe69603a | [
"MIT"
] | null | null | null | defmodule Coherence.Invitation do
use Coherence.Web, :model
schema "invitations" do
field :name, :string
field :email, :string
field :token, :string
timestamps
end
@doc """
Creates a changeset based on the `model` and `params`.
If no params are provided, an invalid changeset is returned
... | 22.076923 | 61 | 0.656794 |
33bbf77e849be8df3990dda90806b3ffa3814ec3 | 1,519 | exs | Elixir | apps/snitch_core/test/data/schema/zone/country_zone_member_test.exs | saurabharch/avia | 74a82a95cf8bfe8143d1fce8136a3bb7ffc9467c | [
"MIT"
] | 1 | 2018-12-01T18:13:55.000Z | 2018-12-01T18:13:55.000Z | apps/snitch_core/test/data/schema/zone/country_zone_member_test.exs | saurabharch/avia | 74a82a95cf8bfe8143d1fce8136a3bb7ffc9467c | [
"MIT"
] | null | null | null | apps/snitch_core/test/data/schema/zone/country_zone_member_test.exs | saurabharch/avia | 74a82a95cf8bfe8143d1fce8136a3bb7ffc9467c | [
"MIT"
] | null | null | null | defmodule Snitch.Data.Schema.CountryZoneMemberTest do
use ExUnit.Case, async: true
use Snitch.DataCase
import Snitch.Factory
alias Snitch.Data.Schema.CountryZoneMember
setup :countries
describe "CountryZoneMember records" do
test "refer only country type zones", %{countries: [country]} do
coun... | 31 | 89 | 0.667544 |
33bbf857f3379e936bb627636638a5c3147b4a81 | 406 | exs | Elixir | apps/omg_burner/config/test.exs | omisego/fee-burner | b1d23736f69769c2bd2bb2437de0c103fd6dba61 | [
"Apache-2.0"
] | 1 | 2018-10-09T13:49:02.000Z | 2018-10-09T13:49:02.000Z | apps/omg_burner/config/test.exs | omisego/fee-burner | b1d23736f69769c2bd2bb2437de0c103fd6dba61 | [
"Apache-2.0"
] | null | null | null | apps/omg_burner/config/test.exs | omisego/fee-burner | b1d23736f69769c2bd2bb2437de0c103fd6dba61 | [
"Apache-2.0"
] | 1 | 2018-07-16T14:15:09.000Z | 2018-07-16T14:15:09.000Z | use Mix.Config
config :omg_burner,
max_gas_price:
:math.pow(10, 10)
|> round,
# in gwei
refresh_period: 500,
# in milliseconds
casual_period: 2_000,
short_period: 2_000,
thresholds: %{
ETH => %{
address: "0x00",
decimals: 18,
coinmarketcap_id: 1027,
currency: USD,
... | 18.454545 | 48 | 0.593596 |
33bc3ad91e37bc95b926eafbce294b849237122e | 1,884 | ex | Elixir | clients/cloud_run/lib/google_api/cloud_run/v1alpha1/model/authorized_domain.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/cloud_run/lib/google_api/cloud_run/v1alpha1/model/authorized_domain.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/cloud_run/lib/google_api/cloud_run/v1alpha1/model/authorized_domain.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 36.941176 | 182 | 0.738854 |
33bc45db370a4c3bf2b607e64dacf691103c55b5 | 2,185 | exs | Elixir | test/changelog_web/controllers/search_controller_test.exs | type1fool/changelog.com | fbec3528cc3f5adfdc75b008bb92b17efc4f248f | [
"MIT"
] | 1 | 2020-05-20T16:58:17.000Z | 2020-05-20T16:58:17.000Z | test/changelog_web/controllers/search_controller_test.exs | type1fool/changelog.com | fbec3528cc3f5adfdc75b008bb92b17efc4f248f | [
"MIT"
] | null | null | null | test/changelog_web/controllers/search_controller_test.exs | type1fool/changelog.com | fbec3528cc3f5adfdc75b008bb92b17efc4f248f | [
"MIT"
] | null | null | null | defmodule ChangelogWeb.SearchControllerTest do
use ChangelogWeb.ConnCase
import Mock
def item_to_hit(item) do
%{"objectID" => Integer.to_string(item.id)}
end
describe "without query" do
test "getting the search" do
conn = get(build_conn(), Routes.search_path(build_conn(), :search))
ass... | 32.61194 | 89 | 0.616476 |
33bc8b23c4d44fe695fb72e50c82a336f30a309c | 3,715 | exs | Elixir | priv/clickhouse_repo/migrations/20211112130238_create_imported_tables.exs | plausible-insights/plausible | 88173342b9e969894879bfb2e8d203426f6a1b1c | [
"MIT"
] | 984 | 2019-09-02T11:36:41.000Z | 2020-06-08T06:25:48.000Z | priv/clickhouse_repo/migrations/20211112130238_create_imported_tables.exs | plausible-insights/plausible | 88173342b9e969894879bfb2e8d203426f6a1b1c | [
"MIT"
] | 24 | 2019-09-10T09:53:17.000Z | 2020-06-08T07:35:26.000Z | priv/clickhouse_repo/migrations/20211112130238_create_imported_tables.exs | plausible-insights/plausible | 88173342b9e969894879bfb2e8d203426f6a1b1c | [
"MIT"
] | 51 | 2019-09-03T10:48:10.000Z | 2020-06-07T00:23:34.000Z | defmodule Plausible.ClickhouseRepo.Migrations.CreateImportedVisitors do
use Ecto.Migration
def change do
create_if_not_exists table(:imported_visitors,
engine: "MergeTree() ORDER BY (site_id, date)"
) do
add(:site_id, :UInt64)
add(:date, :date)
... | 31.218487 | 96 | 0.547241 |
33bc92d186c915ab618fbc10d901cc3c57a6bab4 | 8,393 | exs | Elixir | test/zdb_test.exs | jschoch/zdb | 89b361e624a1c20f503dc237570ca0fd5ea1fd8c | [
"MIT"
] | 11 | 2015-01-04T12:47:21.000Z | 2016-06-27T13:16:46.000Z | test/zdb_test.exs | jschoch/zdb | 89b361e624a1c20f503dc237570ca0fd5ea1fd8c | [
"MIT"
] | 5 | 2015-04-12T11:57:44.000Z | 2016-01-21T21:01:24.000Z | test/zdb_test.exs | jschoch/zdb | 89b361e624a1c20f503dc237570ca0fd5ea1fd8c | [
"MIT"
] | null | null | null | defmodule ZdbTest do
defstruct foo: ""
use ExUnit.Case
setup do
IO.puts "SETUP start"
Zdb.delete_table("test_table",:no_raise)
Zdb.create("test_table")
#:timer.sleep(100)
IO.puts "SETUP stop"
:ok
end
test "env works" do
case Mix.env do
:test -> c = Zdb.print_config
as... | 36.333333 | 118 | 0.597045 |
33bcc4953a89c1cecbfd4441e65a8266f99068d2 | 3,607 | ex | Elixir | lib/nookal/connection.ex | theo-agilelab/nookal-api | d9d211b4c7ddfcd767c722872baf1c6274672226 | [
"MIT"
] | 1 | 2020-06-11T07:57:06.000Z | 2020-06-11T07:57:06.000Z | lib/nookal/connection.ex | theo-agilelab/nookal-api | d9d211b4c7ddfcd767c722872baf1c6274672226 | [
"MIT"
] | null | null | null | lib/nookal/connection.ex | theo-agilelab/nookal-api | d9d211b4c7ddfcd767c722872baf1c6274672226 | [
"MIT"
] | null | null | null | defmodule Nookal.Connection do
@moduledoc false
use Connection
require Logger
defstruct [:endpoint_uri, :conn, requests: %{}]
@timeout 30_000
def child_spec(endpoint_uri) do
%{
start: {__MODULE__, :start_link, [endpoint_uri]}
}
end
def start_link(endpoint_uri) do
Connection.start... | 26.718519 | 93 | 0.63349 |
33bcde6187910dbed3985478b07d087361de3168 | 2,612 | exs | Elixir | test/ada/source/last_fm/track_test.exs | cloud8421/ada | 384f5e5e85e95c4d5883298259e781cc0a54bd07 | [
"MIT"
] | 7 | 2019-05-11T12:14:48.000Z | 2021-04-02T18:42:51.000Z | test/ada/source/last_fm/track_test.exs | cloud8421/ada | 384f5e5e85e95c4d5883298259e781cc0a54bd07 | [
"MIT"
] | 3 | 2019-05-11T08:01:47.000Z | 2019-05-14T12:06:50.000Z | test/ada/source/last_fm/track_test.exs | cloud8421/ada | 384f5e5e85e95c4d5883298259e781cc0a54bd07 | [
"MIT"
] | 1 | 2021-01-06T14:57:32.000Z | 2021-01-06T14:57:32.000Z | defmodule Ada.Source.LastFm.TrackTest do
use ExUnit.Case, async: true
alias Ada.Source.LastFm.Track
describe "listening stats" do
setup [:load_tracks_fixture]
test "now_playing/1", %{tracks: tracks} do
assert {:now_playing, %Track{name: "Russia on Ice"}} = Track.now_playing(tracks)
end
t... | 40.184615 | 90 | 0.604135 |
33bd088ade412c55d9c94c5cf759bf95579d2f37 | 534 | exs | Elixir | repo/migrations/20191003164955_create_users.exs | e-fu/exzeitable | 195da90e7fbab867c4964acab717e1ccb68ab226 | [
"MIT"
] | 138 | 2019-10-04T19:55:35.000Z | 2022-03-31T10:24:32.000Z | repo/migrations/20191003164955_create_users.exs | e-fu/exzeitable | 195da90e7fbab867c4964acab717e1ccb68ab226 | [
"MIT"
] | 127 | 2019-10-03T21:51:27.000Z | 2022-03-31T02:57:00.000Z | repo/migrations/20191003164955_create_users.exs | e-fu/exzeitable | 195da90e7fbab867c4964acab717e1ccb68ab226 | [
"MIT"
] | 14 | 2019-10-04T19:55:41.000Z | 2022-03-27T04:47:30.000Z | defmodule Exzeitable.Repo.Migrations.CreateUsersAndPosts do
@moduledoc false
use Ecto.Migration
def up do
create table("users") do
add(:name, :string, size: 40)
add(:age, :integer)
timestamps()
end
create table("posts") do
add(:title, :string)
add(:content, :text)
... | 17.8 | 59 | 0.621723 |
33bd0ec601d6ebf71210a7dd37bc0a23d0d9b984 | 3,297 | exs | Elixir | test/basic_test.exs | primait/amqpx | 42286ab80acf5758471aefa549886badcfab11c0 | [
"MIT"
] | 7 | 2020-02-04T16:27:16.000Z | 2021-11-17T20:37:39.000Z | test/basic_test.exs | primait/amqpx | 42286ab80acf5758471aefa549886badcfab11c0 | [
"MIT"
] | 58 | 2019-05-21T12:25:13.000Z | 2022-02-04T12:55:40.000Z | test/basic_test.exs | primait/amqpx | 42286ab80acf5758471aefa549886badcfab11c0 | [
"MIT"
] | 2 | 2020-04-08T07:18:42.000Z | 2020-10-14T14:31:53.000Z | defmodule BasicTest do
use ExUnit.Case
alias Amqpx.{Basic, Connection, Channel, Queue}
setup do
{:ok, conn} = Connection.open(Application.fetch_env!(:amqpx, :amqp_connection))
{:ok, chan} = Channel.open(conn)
on_exit(fn ->
:ok = Connection.close(conn)
end)
{:ok, conn: conn, chan: cha... | 31.4 | 112 | 0.633303 |
33bd129edc55b03842b95002ed742672a7619a8c | 140 | ex | Elixir | lib/lifx.ex | axelson/lifx | 9ac02474d181001efc6bc08d7d39a6f6e3bb0d2a | [
"Apache-2.0"
] | null | null | null | lib/lifx.ex | axelson/lifx | 9ac02474d181001efc6bc08d7d39a6f6e3bb0d2a | [
"Apache-2.0"
] | null | null | null | lib/lifx.ex | axelson/lifx | 9ac02474d181001efc6bc08d7d39a6f6e3bb0d2a | [
"Apache-2.0"
] | null | null | null | defmodule Lifx do
use Application
require Logger
def start(_type, _args) do
{:ok, _pid} = Lifx.Supervisor.start_link()
end
end
| 15.555556 | 46 | 0.7 |
33bd2389262f66d71d4a541992399ce979ceea2b | 1,205 | exs | Elixir | config/config.exs | rak/rak | cdfcd7227b38d9c6cac10bd778b03361b28f67df | [
"MIT"
] | 2 | 2018-09-30T02:59:33.000Z | 2018-10-08T19:55:38.000Z | config/config.exs | rak/rak | cdfcd7227b38d9c6cac10bd778b03361b28f67df | [
"MIT"
] | null | null | null | config/config.exs | rak/rak | cdfcd7227b38d9c6cac10bd778b03361b28f67df | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the paren... | 34.428571 | 73 | 0.743568 |
33bd413e96870c4bfa62071a211f437b1a7c5db7 | 430 | ex | Elixir | lib/celery_script/commands/update_farmware.ex | KRISHITECH/farmbot_os | 4220baf8f3ef930ce3b861b178ca6a76e2fd7591 | [
"MIT"
] | null | null | null | lib/celery_script/commands/update_farmware.ex | KRISHITECH/farmbot_os | 4220baf8f3ef930ce3b861b178ca6a76e2fd7591 | [
"MIT"
] | null | null | null | lib/celery_script/commands/update_farmware.ex | KRISHITECH/farmbot_os | 4220baf8f3ef930ce3b861b178ca6a76e2fd7591 | [
"MIT"
] | null | null | null | defmodule Farmbot.CeleryScript.Command.UpdateFarmware do
@moduledoc """
Update Farmware
"""
# alias Farmbot.CeleryScript.Ast
alias Farmbot.CeleryScript.Command
require Logger
@behaviour Command
@doc ~s"""
Update a farmware
args: %{package: String.t},
body: []
"""
@spec run(%{pack... | 20.47619 | 56 | 0.653488 |
33bd475220ba9d1ef00608305330d153ab871f14 | 1,044 | exs | Elixir | rel/config.exs | jjcarstens/genie | b0b61ca5c6300508bd230a248da47aafa0278061 | [
"Apache-2.0"
] | null | null | null | rel/config.exs | jjcarstens/genie | b0b61ca5c6300508bd230a248da47aafa0278061 | [
"Apache-2.0"
] | null | null | null | rel/config.exs | jjcarstens/genie | b0b61ca5c6300508bd230a248da47aafa0278061 | [
"Apache-2.0"
] | null | null | null | use Mix.Releases.Config,
# This sets the default release built by `mix release`
default_release: :default,
# This sets the default environment used by `mix release`
default_environment: :dev
# For a full list of config options for both releases
# and environments, visit https://hexdocs.pm/distillery/config/dis... | 30.705882 | 78 | 0.760536 |
33bd51e310f00f4527abc7e3e21574381f2abcc1 | 2,757 | exs | Elixir | test/recaptcha/template_test.exs | kianmeng/recaptcha | 1db06077e87f199fe902a86bc34a5d4f79fd1a40 | [
"MIT"
] | 103 | 2016-09-26T15:36:58.000Z | 2022-02-09T18:49:17.000Z | test/recaptcha/template_test.exs | kianmeng/recaptcha | 1db06077e87f199fe902a86bc34a5d4f79fd1a40 | [
"MIT"
] | 65 | 2016-08-30T09:53:08.000Z | 2022-01-31T16:53:41.000Z | test/recaptcha/template_test.exs | kianmeng/recaptcha | 1db06077e87f199fe902a86bc34a5d4f79fd1a40 | [
"MIT"
] | 47 | 2016-10-06T22:50:53.000Z | 2022-02-24T21:57:01.000Z | defmodule RecaptchaTemplateTest do
use ExUnit.Case, async: true
test "supplying options to display/1 renders them in the g-recaptcha div" do
template_string =
Recaptcha.Template.display(
theme: "dark",
type: "audio",
tabindex: 1,
size: "compact",
callback: "enableB... | 36.276316 | 96 | 0.703663 |
33bd59d41709706c0e0ca68b31655e1508997670 | 62 | ex | Elixir | apps/xee/lib/xee_web/views/registration_view.ex | xeejp/xee | 669e5a8030948e6d37ee0d33d3b37b4abdc34001 | [
"MIT"
] | 11 | 2015-12-24T07:51:45.000Z | 2019-03-05T12:29:31.000Z | apps/xee/lib/xee_web/views/registration_view.ex | xeejp/xee | 669e5a8030948e6d37ee0d33d3b37b4abdc34001 | [
"MIT"
] | 62 | 2015-12-25T02:58:20.000Z | 2020-03-04T06:52:11.000Z | apps/xee/lib/xee_web/views/registration_view.ex | xeejp/xee | 669e5a8030948e6d37ee0d33d3b37b4abdc34001 | [
"MIT"
] | 1 | 2016-07-19T03:28:08.000Z | 2016-07-19T03:28:08.000Z | defmodule XeeWeb.RegistrationView do
use XeeWeb, :view
end
| 12.4 | 36 | 0.790323 |
33bd7a0c50d214ef2770d364a68221396eab6726 | 1,474 | ex | Elixir | exercises/practice/book-store/.meta/example.ex | kevPo/elixir | 340b67ea603f47f9324f738e494ac62f73b0b159 | [
"MIT"
] | null | null | null | exercises/practice/book-store/.meta/example.ex | kevPo/elixir | 340b67ea603f47f9324f738e494ac62f73b0b159 | [
"MIT"
] | 9 | 2021-09-12T15:19:06.000Z | 2022-03-30T22:24:24.000Z | exercises/practice/book-store/.meta/example.ex | kevPo/elixir | 340b67ea603f47f9324f738e494ac62f73b0b159 | [
"MIT"
] | null | null | null | defmodule BookStore do
@type book :: integer
@base_price 800
@discount %{
1 => @base_price,
2 => div(@base_price * 95, 100),
3 => div(@base_price * 90, 100),
4 => div(@base_price * 80, 100),
5 => div(@base_price * 75, 100)
}
@doc """
Calculate lowest price (in cents) for a shopping bas... | 27.811321 | 81 | 0.584803 |
33bd7fdd1a297c8fb76d8a1a166e55579798b6b8 | 679 | ex | Elixir | lib/xeroxero/core_api/models/allocations.ex | scottmessinger/elixero | 4e62c4d80d221639ba2347a563002511e8d4a6c6 | [
"MIT"
] | 1 | 2021-12-01T18:21:31.000Z | 2021-12-01T18:21:31.000Z | lib/xeroxero/core_api/models/allocations.ex | scottmessinger/elixero | 4e62c4d80d221639ba2347a563002511e8d4a6c6 | [
"MIT"
] | null | null | null | lib/xeroxero/core_api/models/allocations.ex | scottmessinger/elixero | 4e62c4d80d221639ba2347a563002511e8d4a6c6 | [
"MIT"
] | 1 | 2021-10-01T12:09:46.000Z | 2021-10-01T12:09:46.000Z | defmodule XeroXero.CoreApi.Models.Allocations do
use Ecto.Schema
import Ecto.Changeset
@derive {Jason.Encoder, except: [:__meta__, :id]}
schema "allocations" do
embeds_many :Allocations, XeroXero.CoreApi.Models.Allocations.Allocation
end
def from_map(data) do
%__MOD... | 25.148148 | 81 | 0.594993 |
33bdafa5dd91e39dd41a084b45cde3ec011d5d4d | 2,748 | exs | Elixir | lib/exercism/protein-translation/protein_translation_test.exs | sprql/experimentex | 6c8a37ea03b74c5bfece1b2bec21c163a2f2df2f | [
"MIT"
] | null | null | null | lib/exercism/protein-translation/protein_translation_test.exs | sprql/experimentex | 6c8a37ea03b74c5bfece1b2bec21c163a2f2df2f | [
"MIT"
] | null | null | null | lib/exercism/protein-translation/protein_translation_test.exs | sprql/experimentex | 6c8a37ea03b74c5bfece1b2bec21c163a2f2df2f | [
"MIT"
] | null | null | null | if !System.get_env("EXERCISM_TEST_EXAMPLES") do
Code.load_file("protein_translation.exs", __DIR__)
end
ExUnit.start
ExUnit.configure exclude: :pending, trace: true
defmodule ProteinTranslationTest do
use ExUnit.Case
# @tag :pending
test "AUG translates to methionine" do
assert ProteinTranslation.of_codon... | 31.227273 | 96 | 0.677584 |
33bdb5e55cf7387374802e05b2197ad0587c9425 | 6,482 | exs | Elixir | apps/ewallet/test/ewallet/web/v1/serializers/user_serializer_test.exs | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | apps/ewallet/test/ewallet/web/v1/serializers/user_serializer_test.exs | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | apps/ewallet/test/ewallet/web/v1/serializers/user_serializer_test.exs | jimpeebles/ewallet | ad4a9750ec8dc5adc4c0dfe6c22f0ef760825405 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 OmiseGO Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 30.866667 | 74 | 0.551219 |
33bdd6b234db00731696ab107d1a24f567cebdab | 2,589 | ex | Elixir | video-code/26-gen-server/servy/lib/servy/pledge_server.ex | anwarsky/elixir_sample2 | 613599113e15fcd400853fc0e560a39001435f6d | [
"Unlicense"
] | null | null | null | video-code/26-gen-server/servy/lib/servy/pledge_server.ex | anwarsky/elixir_sample2 | 613599113e15fcd400853fc0e560a39001435f6d | [
"Unlicense"
] | null | null | null | video-code/26-gen-server/servy/lib/servy/pledge_server.ex | anwarsky/elixir_sample2 | 613599113e15fcd400853fc0e560a39001435f6d | [
"Unlicense"
] | null | null | null | defmodule Servy.PledgeServer do
@name :pledge_server
use GenServer
defmodule State do
defstruct cache_size: 3, pledges: []
end
# Client Interface
def start do
IO.puts "Starting the pledge server..."
GenServer.start(__MODULE__, %State{}, name: @name)
end
def create_pledge(name, amount) ... | 23.324324 | 72 | 0.695249 |
33bde7e2f61e2b39196866d661c1a3c4afb9366f | 22,753 | ex | Elixir | lib/mix/tasks/phx.gen.auth.ex | mjftw/phoenix | 31c75ebe4437e7f7d172a70155f322b85aa4032c | [
"MIT"
] | null | null | null | lib/mix/tasks/phx.gen.auth.ex | mjftw/phoenix | 31c75ebe4437e7f7d172a70155f322b85aa4032c | [
"MIT"
] | null | null | null | lib/mix/tasks/phx.gen.auth.ex | mjftw/phoenix | 31c75ebe4437e7f7d172a70155f322b85aa4032c | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.Phx.Gen.Auth do
@shortdoc "Generates authentication logic for a resource"
@moduledoc """
Generates authentication logic for a resource.
mix phx.gen.auth Accounts User users
The first argument is the context module followed by the schema module
and its plural name (used as the sche... | 33.460294 | 159 | 0.678768 |
33bdf5b8377ab200696e123722d2e242ced09028 | 215 | exs | Elixir | priv/repo/migrations/20150721223716_create_user.exs | rockerBOO/rockerboo.net | 13716f3c0ac6bac370919c3d6f2394a9dbdd4b3b | [
"MIT"
] | null | null | null | priv/repo/migrations/20150721223716_create_user.exs | rockerBOO/rockerboo.net | 13716f3c0ac6bac370919c3d6f2394a9dbdd4b3b | [
"MIT"
] | null | null | null | priv/repo/migrations/20150721223716_create_user.exs | rockerBOO/rockerboo.net | 13716f3c0ac6bac370919c3d6f2394a9dbdd4b3b | [
"MIT"
] | null | null | null | defmodule Personal.Repo.Migrations.CreateUser do
use Ecto.Migration
def change do
create table(:users) do
add :email, :string
add :crypted_password, :string
timestamps
end
end
end
| 15.357143 | 48 | 0.67907 |
33be1fa3e2e3df93549d3664823adeb323dac08f | 3,577 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/region.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/region.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/region.ex | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"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.278481 | 163 | 0.671792 |
33be292bd3778bd648761f7e2fa8ab078c68c9f1 | 556 | ex | Elixir | lib/dialyxir/output.ex | groksrc/dialyxir | 2968bea2c22e67571bfa939422fc370ea5ce5b4c | [
"Apache-2.0"
] | null | null | null | lib/dialyxir/output.ex | groksrc/dialyxir | 2968bea2c22e67571bfa939422fc370ea5ce5b4c | [
"Apache-2.0"
] | null | null | null | lib/dialyxir/output.ex | groksrc/dialyxir | 2968bea2c22e67571bfa939422fc370ea5ce5b4c | [
"Apache-2.0"
] | null | null | null | defmodule Dialyxir.Output do
alias IO.ANSI
def color(text, color) when is_binary(text) do
if ANSI.enabled?() do
case color do
:red ->
ANSI.red() <> text <> ANSI.reset()
:yellow ->
ANSI.yellow() <> text <> ANSI.reset()
:green ->
ANSI.green() <> text ... | 18.533333 | 48 | 0.51259 |
33be3943940734d74c3d660ee601c3a2824d1e41 | 1,720 | ex | Elixir | clients/script/lib/google_api/script/v1/model/google_apps_script_type_execution_api_entry_point.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/script/lib/google_api/script/v1/model/google_apps_script_type_execution_api_entry_point.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/script/lib/google_api/script/v1/model/google_apps_script_type_execution_api_entry_point.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... | 35.833333 | 156 | 0.767442 |
33be4ad87b6d57bcc6e6a732add3636e360c8787 | 1,599 | ex | Elixir | test/support/model_case.ex | ashkan18/mestatus | c0d1cf156729fc2f7a8c822f1757efd663515ba5 | [
"MIT"
] | null | null | null | test/support/model_case.ex | ashkan18/mestatus | c0d1cf156729fc2f7a8c822f1757efd663515ba5 | [
"MIT"
] | null | null | null | test/support/model_case.ex | ashkan18/mestatus | c0d1cf156729fc2f7a8c822f1757efd663515ba5 | [
"MIT"
] | null | null | null | defmodule Mestatus.ModelCase do
@moduledoc """
This module defines the test case to be used by
model tests.
You may define functions here to be used as helpers in
your model tests. See `errors_on/2`'s definition as reference.
Finally, if the test case interacts with the database,
it cannot be async. For... | 25.790323 | 84 | 0.685428 |
33be82e0bcfdb586409340f239bfb8d4bddd5225 | 547 | ex | Elixir | apps/esperanto/lib/trybe/esperanto/code_utility.ex | betrybe/esperanto | 65e40c28914397ef77f5d2c4c29001330beba19f | [
"Apache-2.0"
] | 6 | 2021-07-19T20:00:22.000Z | 2021-11-03T03:27:40.000Z | apps/esperanto/lib/trybe/esperanto/code_utility.ex | betrybe/esperanto | 65e40c28914397ef77f5d2c4c29001330beba19f | [
"Apache-2.0"
] | null | null | null | apps/esperanto/lib/trybe/esperanto/code_utility.ex | betrybe/esperanto | 65e40c28914397ef77f5d2c4c29001330beba19f | [
"Apache-2.0"
] | null | null | null | defmodule Esperanto.CodeUtility do
@moduledoc """
Utilities functions to parse code
"""
alias Esperanto.Walker
def walk_until_not_back_slash(walker) do
if String.starts_with?(walker.rest, "`") do
walker
|> Walker.walk()
|> walk_until_not_back_slash()
else
walker
end
end... | 20.259259 | 51 | 0.608775 |
33bea82364381c0450da7c0ec84aca4a2b587d2d | 1,861 | ex | Elixir | lib/roiimPpaysafe_web/telemetry.ex | GhAc-2017/RoiimPpaysafe | 9bf5f899bce0ec5045c5eee0a358ffa2d3c29d81 | [
"MIT"
] | null | null | null | lib/roiimPpaysafe_web/telemetry.ex | GhAc-2017/RoiimPpaysafe | 9bf5f899bce0ec5045c5eee0a358ffa2d3c29d81 | [
"MIT"
] | null | null | null | lib/roiimPpaysafe_web/telemetry.ex | GhAc-2017/RoiimPpaysafe | 9bf5f899bce0ec5045c5eee0a358ffa2d3c29d81 | [
"MIT"
] | null | null | null | defmodule RoiimPpaysafeWeb.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. ... | 33.232143 | 86 | 0.679205 |
33beb1d8cba9be22999ebc07b6a18b5ff494abfd | 616 | ex | Elixir | lib/conduit_web/router.ex | ray-sh/cov_detect | b4e74b13850eff4a7c646a64fc7c28fbe700ad2e | [
"MIT"
] | null | null | null | lib/conduit_web/router.ex | ray-sh/cov_detect | b4e74b13850eff4a7c646a64fc7c28fbe700ad2e | [
"MIT"
] | null | null | null | lib/conduit_web/router.ex | ray-sh/cov_detect | b4e74b13850eff4a7c646a64fc7c28fbe700ad2e | [
"MIT"
] | null | null | null | defmodule ConduitWeb.Router do
use ConduitWeb, :router
alias ConduitWeb.Plugs
pipeline :api do
plug(:accepts, ["json"])
plug(Guardian.Plug.Pipeline,
error_handler: ConduitWeb.ErrorHandler,
module: Conduit.Auth.Guardian
)
plug(Guardian.Plug.VerifyHeader, realm: "Token")
plug(Gua... | 23.692308 | 55 | 0.688312 |
33bec26480dd664fbd1a790590932f12111ed92c | 46 | ex | Elixir | testData/org/elixir_lang/parser_definition/matched_and_operation_parsing_test_case/MatchedAdditionOperation.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/matched_and_operation_parsing_test_case/MatchedAdditionOperation.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/matched_and_operation_parsing_test_case/MatchedAdditionOperation.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 145 | 2015-01-15T11:37:16.000Z | 2021-12-22T05:51:02.000Z | 1 + 2 && 3 + 4
1 + 2 &&& 3 + 4
1 + 2 and 3 + 4 | 15.333333 | 15 | 0.326087 |
33bec4b3c0ee0c9ba21bd27f3f9afdbe5eadd128 | 6,878 | ex | Elixir | clients/content/lib/google_api/content/v2/api/inventory.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/api/inventory.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/api/inventory.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... | 44.374194 | 191 | 0.6467 |
33beca46f0e714cc19eeedd07487219f3cbd45f2 | 711 | ex | Elixir | lib/fuschia_web/gettext.ex | cciuenf/fuschia | cc21d38445a8236142191efd66a3e3997b25cf42 | [
"BSD-3-Clause"
] | 1 | 2022-02-21T18:25:14.000Z | 2022-02-21T18:25:14.000Z | lib/fuschia_web/gettext.ex | cciuenf/fuschia | cc21d38445a8236142191efd66a3e3997b25cf42 | [
"BSD-3-Clause"
] | 32 | 2021-07-27T20:48:30.000Z | 2022-03-26T10:35:43.000Z | lib/fuschia_web/gettext.ex | cciuenf/fuschia | cc21d38445a8236142191efd66a3e3997b25cf42 | [
"BSD-3-Clause"
] | null | null | null | defmodule FuschiaWeb.Gettext do
@moduledoc """
A module providing Internationalization with a gettext-based API.
By using [Gettext](https://hexdocs.pm/gettext),
your module gains a set of macros for translations, for example:
import FuschiaWeb.Gettext
# Simple translation
gettext("Here is t... | 28.44 | 72 | 0.677918 |
33bedfc8937f0425738e0d09d28ae1b0dc46cb70 | 572 | exs | Elixir | apps/ok/mix.exs | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | 26 | 2019-09-20T23:54:45.000Z | 2020-08-20T14:23:32.000Z | apps/ok/mix.exs | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | 757 | 2019-08-15T18:15:07.000Z | 2020-09-18T20:55:31.000Z | apps/ok/mix.exs | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | 9 | 2019-11-12T16:43:46.000Z | 2020-03-25T16:23:16.000Z | defmodule Ok.MixProject do
use Mix.Project
def project do
[
app: :ok,
version: "0.1.0",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixir: "~> 1.10",
start_permanent: Mix.env() == :prod... | 18.451613 | 64 | 0.496503 |
33befd5014d08a101ffba7abeb1f86c056189e94 | 501 | ex | Elixir | lib/rocketpay_web/views/users_view.ex | caiocichetti/nlw-04-rocketpay | b68c55841e6298757007136859d7b9a98702d127 | [
"MIT"
] | 80 | 2021-02-26T13:26:00.000Z | 2022-01-31T15:13:18.000Z | lib/rocketpay_web/views/users_view.ex | caiocichetti/nlw-04-rocketpay | b68c55841e6298757007136859d7b9a98702d127 | [
"MIT"
] | null | null | null | lib/rocketpay_web/views/users_view.ex | caiocichetti/nlw-04-rocketpay | b68c55841e6298757007136859d7b9a98702d127 | [
"MIT"
] | 42 | 2021-02-26T13:26:19.000Z | 2021-12-11T16:32:47.000Z | defmodule RocketpayWeb.UsersView do
alias Rocketpay.{Account, User}
def render("create.json", %{
user: %User{
account: %Account{id: account_id, balance: balance},
id: id,
name: name,
nickname: nickname
}
}) do
%{
message: "User created",
... | 19.269231 | 62 | 0.48503 |
33bf0ca1b13441736abdd84cc42dcc2abc47f83e | 7,232 | ex | Elixir | lib/workex.ex | sasa1977/workex | cb7adf893d0d19caf0530f9b4fec998d64cefd7d | [
"MIT"
] | 63 | 2015-02-21T13:55:39.000Z | 2021-09-03T17:23:39.000Z | lib/workex.ex | sasa1977/workex | cb7adf893d0d19caf0530f9b4fec998d64cefd7d | [
"MIT"
] | 1 | 2016-05-24T17:43:46.000Z | 2016-05-24T17:43:46.000Z | lib/workex.ex | sasa1977/workex | cb7adf893d0d19caf0530f9b4fec998d64cefd7d | [
"MIT"
] | 3 | 2015-04-10T03:42:09.000Z | 2016-10-17T18:16:19.000Z | defmodule Workex do
@moduledoc """
A behaviour which separates message receiving and aggregating from message processing.
Example:
defmodule Consumer do
use Workex
# Interface functions are invoked inside client processes
def start_link do
Workex.start_link(__MODULE... | 29.279352 | 119 | 0.670492 |
33bf11186bd6860753f3981b617d9f7e993ee3f4 | 1,207 | ex | Elixir | elixir/lib/elixer_web/views/error_helpers.ex | VitorFirmino/NLW-7 | 16d3319c6bcf2308ef6ea5fdf8257be78887a190 | [
"MIT"
] | null | null | null | elixir/lib/elixer_web/views/error_helpers.ex | VitorFirmino/NLW-7 | 16d3319c6bcf2308ef6ea5fdf8257be78887a190 | [
"MIT"
] | null | null | null | elixir/lib/elixer_web/views/error_helpers.ex | VitorFirmino/NLW-7 | 16d3319c6bcf2308ef6ea5fdf8257be78887a190 | [
"MIT"
] | null | null | null | defmodule ElixerWeb.ErrorHelpers do
@moduledoc """
Conveniences for translating and building error messages.
"""
@doc """
Translates an error message using gettext.
"""
def translate_error({msg, opts}) do
# When using gettext, we typically pass the strings we want
# to translate as a static argum... | 35.5 | 75 | 0.670257 |
33bf2dcc026821558d6e2a2e2f4db8a4bbc6bced | 9,557 | ex | Elixir | lib/elixir_keeb/usb/reporter.ex | amalbuquerque/elixir-keeb | 39b0cdc6efc82522c459d15e5f8277d26104ceda | [
"MIT"
] | 9 | 2020-07-07T15:57:55.000Z | 2021-08-12T04:59:44.000Z | lib/elixir_keeb/usb/reporter.ex | amalbuquerque/elixir-keeb | 39b0cdc6efc82522c459d15e5f8277d26104ceda | [
"MIT"
] | null | null | null | lib/elixir_keeb/usb/reporter.ex | amalbuquerque/elixir-keeb | 39b0cdc6efc82522c459d15e5f8277d26104ceda | [
"MIT"
] | 1 | 2021-07-16T13:49:00.000Z | 2021-07-16T13:49:00.000Z | defmodule ElixirKeeb.Usb.Reporter do
use GenServer
require Logger
alias ElixirKeeb.{Utils, LatencyTracker}
alias ElixirKeeb.Structs.{
KeycodeBehavior,
ReporterState,
KeyChange
}
@gadget Application.get_env(:elixir_keeb, :modules)[:gadget]
@report Application.get_env(:elixir_keeb, :modules)[:r... | 28.443452 | 138 | 0.648844 |
33bf34aa95dca65fc02996355a75849e783f717d | 11,096 | ex | Elixir | lib/ecto/query/builder/select.ex | Anber/ecto | 2b903c8c6acb924f87746fe4d40cb4b42a7f0491 | [
"Apache-2.0"
] | null | null | null | lib/ecto/query/builder/select.ex | Anber/ecto | 2b903c8c6acb924f87746fe4d40cb4b42a7f0491 | [
"Apache-2.0"
] | null | null | null | lib/ecto/query/builder/select.ex | Anber/ecto | 2b903c8c6acb924f87746fe4d40cb4b42a7f0491 | [
"Apache-2.0"
] | null | null | null | import Kernel, except: [apply: 2]
defmodule Ecto.Query.Builder.Select do
@moduledoc false
alias Ecto.Query.Builder
@doc """
Escapes a select.
It allows tuples, lists and variables at the top level. Inside the
tuples and lists query expressions are allowed.
## Examples
iex> escape({1, 2}, [], _... | 31.702857 | 116 | 0.596341 |
33bf5f9c74b8c3e0a2eff8d80a231ea491a317c3 | 2,382 | exs | Elixir | test/lib/ex_aws/dynamo_streams/integration_test.exs | Frameio/ex_aws | 3b335b6ed7932b5cf991323d26cf5497e1e6c122 | [
"Unlicense",
"MIT"
] | null | null | null | test/lib/ex_aws/dynamo_streams/integration_test.exs | Frameio/ex_aws | 3b335b6ed7932b5cf991323d26cf5497e1e6c122 | [
"Unlicense",
"MIT"
] | null | null | null | test/lib/ex_aws/dynamo_streams/integration_test.exs | Frameio/ex_aws | 3b335b6ed7932b5cf991323d26cf5497e1e6c122 | [
"Unlicense",
"MIT"
] | null | null | null | defmodule ExAws.DynamoStreamsIntegrationTest do
alias ExAws.{Dynamo, DynamoStreams}
use ExUnit.Case, async: true
require Logger
## These tests run against DynamoDb Local unless otherwise specified
#
# http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tools.DynamoDBLocal.html
# In this way t... | 39.7 | 143 | 0.68136 |
33bf7fcab58c34d356ed1bfece29e139dc9482a0 | 2,063 | ex | Elixir | clients/you_tube/lib/google_api/you_tube/v3/model/abuse_report.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/you_tube/lib/google_api/you_tube/v3/model/abuse_report.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/you_tube/lib/google_api/you_tube/v3/model/abuse_report.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... | 36.839286 | 105 | 0.707707 |
33bfaec2dcdca64abdebdd1c620aa8754b178337 | 2,044 | ex | Elixir | test/support/live_views/update.ex | smeade/phoenix_live_view | c981846c1e350bc689c28b4cbdaeffe1e30240b2 | [
"MIT"
] | 1 | 2019-12-07T19:28:57.000Z | 2019-12-07T19:28:57.000Z | test/support/live_views/update.ex | smeade/phoenix_live_view | c981846c1e350bc689c28b4cbdaeffe1e30240b2 | [
"MIT"
] | 1 | 2019-03-17T23:44:09.000Z | 2019-03-19T21:52:06.000Z | test/support/live_views/update.ex | smeade/phoenix_live_view | c981846c1e350bc689c28b4cbdaeffe1e30240b2 | [
"MIT"
] | null | null | null | defmodule Phoenix.LiveViewTest.TZLive do
use Phoenix.LiveView
def render(%{name: "NestedAppend"} = assigns) do
~L"""
time: <%= @time %> <%= @name %>
<div id="append-<%= @name %>" phx-update="append"><%= for item <- @items do %>
<div id="item-<%= item %>"><%= item %></div>
<% end %></div>
... | 28.788732 | 124 | 0.581213 |
33bfbe6eeae5b05292aa1acc037778789d73e2f8 | 3,097 | exs | Elixir | test/rondo/diff_test.exs | exstruct/rondo | 8ec1a8754d594086065020bc45a801620fdda79d | [
"MIT"
] | 1 | 2016-08-09T21:45:21.000Z | 2016-08-09T21:45:21.000Z | test/rondo/diff_test.exs | exstruct/rondo | 8ec1a8754d594086065020bc45a801620fdda79d | [
"MIT"
] | null | null | null | test/rondo/diff_test.exs | exstruct/rondo | 8ec1a8754d594086065020bc45a801620fdda79d | [
"MIT"
] | null | null | null | defmodule Test.Rondo.Diff do
use Test.Rondo.Case
import Rondo.Element
alias Rondo.Operation.{Copy,Replace,Remove}
context :simple do
defmodule Component do
use Rondo.Component
def render(%{children: children}) do
el("Foo", nil, children)
end
end
after
"remove" ->
... | 22.605839 | 101 | 0.485308 |
33bfe638ec3c22e7352cc5430f164dacbd618d01 | 3,353 | ex | Elixir | lib/credo/check/refactor/variable_rebinding.ex | rarguelloF/credo | 7251a7988e8b4c4281faa418228a5170af91145c | [
"MIT"
] | null | null | null | lib/credo/check/refactor/variable_rebinding.ex | rarguelloF/credo | 7251a7988e8b4c4281faa418228a5170af91145c | [
"MIT"
] | null | null | null | lib/credo/check/refactor/variable_rebinding.ex | rarguelloF/credo | 7251a7988e8b4c4281faa418228a5170af91145c | [
"MIT"
] | null | null | null | defmodule Credo.Check.Refactor.VariableRebinding do
@moduledoc false
@checkdoc """
You might want to refrain from rebinding variables.
Although technically fine, rebinding to the same name can lead to less
precise naming.
Consider this example:
def find_a_good_time do
time = MyApp.DateTime... | 22.965753 | 75 | 0.631673 |
33c0163c4e5a4daa56dc92bc1c088558a5fd6a8e | 3,061 | ex | Elixir | clients/firestore/lib/google_api/firestore/v1beta1/model/value.ex | CertifiedrLi/elixir-google-api | 4e0e261dd06ee7753c356cca413783f3facd5f03 | [
"Apache-2.0"
] | null | null | null | clients/firestore/lib/google_api/firestore/v1beta1/model/value.ex | CertifiedrLi/elixir-google-api | 4e0e261dd06ee7753c356cca413783f3facd5f03 | [
"Apache-2.0"
] | null | null | null | clients/firestore/lib/google_api/firestore/v1beta1/model/value.ex | CertifiedrLi/elixir-google-api | 4e0e261dd06ee7753c356cca413783f3facd5f03 | [
"Apache-2.0"
] | 1 | 2018-07-28T20:50:50.000Z | 2018-07-28T20:50:50.000Z | # Copyright 2018 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... | 43.728571 | 215 | 0.734727 |
33c01e6dab78896bf5fe3d7b3addd94dfe537816 | 2,482 | ex | Elixir | lib/events_tools/events/events.ex | Apps-Team/conferencetools | ce2e16a3e4a521dc4682e736a209e6dd380c050d | [
"Apache-2.0"
] | null | null | null | lib/events_tools/events/events.ex | Apps-Team/conferencetools | ce2e16a3e4a521dc4682e736a209e6dd380c050d | [
"Apache-2.0"
] | 6 | 2017-10-05T20:16:34.000Z | 2017-10-05T20:36:11.000Z | lib/events_tools/events/events.ex | apps-team/events-tools | ce2e16a3e4a521dc4682e736a209e6dd380c050d | [
"Apache-2.0"
] | null | null | null | defmodule EventsTools.Events do
@moduledoc """
The boundary for the Posts system.
"""
import Ecto.Query, warn: true
alias EventsTools.Repo
alias EventsTools.Helpers
alias EventsTools.Events.Event
@doc """
Returns the list of posts.
## Examples
iex> list_posts()
[%Post{}, ...]
"""
... | 18.80303 | 77 | 0.598711 |
33c048bc67c9febb61322f25e3e69f7523bf63ed | 717 | ex | Elixir | lib/sanbase_web/graphql/schema/types/promoter_types.ex | sitedata/sanbase2 | 8da5e44a343288fbc41b68668c6c80ae8547d557 | [
"MIT"
] | 81 | 2017-11-20T01:20:22.000Z | 2022-03-05T12:04:25.000Z | lib/sanbase_web/graphql/schema/types/promoter_types.ex | rmoorman/sanbase2 | 226784ab43a24219e7332c49156b198d09a6dd85 | [
"MIT"
] | 359 | 2017-10-15T14:40:53.000Z | 2022-01-25T13:34:20.000Z | lib/sanbase_web/graphql/schema/types/promoter_types.ex | sitedata/sanbase2 | 8da5e44a343288fbc41b68668c6c80ae8547d557 | [
"MIT"
] | 16 | 2017-11-19T13:57:40.000Z | 2022-02-07T08:13:02.000Z | defmodule SanbaseWeb.Graphql.Schema.PromoterTypes do
use Absinthe.Schema.Notation
object :promoter do
field(:email, :string)
field(:earnings_balance, :integer)
field(:current_balance, :integer)
field(:paid_balance, :integer)
field(:promotions, list_of(:promotion))
end
object :promotion do
... | 26.555556 | 52 | 0.704324 |
33c06a24bbf9f459c62169bf01017e1a200650fe | 6,542 | ex | Elixir | clients/memcache/lib/google_api/memcache/v1beta2/model/google_cloud_saasaccelerator_management_providers_v1_instance.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/memcache/lib/google_api/memcache/v1beta2/model/google_cloud_saasaccelerator_management_providers_v1_instance.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/memcache/lib/google_api/memcache/v1beta2/model/google_cloud_saasaccelerator_management_providers_v1_instance.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... | 47.405797 | 260 | 0.716142 |
33c0ab6e463cb56a26c2f51580847d4f4d8853af | 13,702 | ex | Elixir | lib/ecto/query/validator.ex | liveforeverx/ecto | 42a812b765762f62cc260a994897a95492ffae28 | [
"Apache-2.0"
] | null | null | null | lib/ecto/query/validator.ex | liveforeverx/ecto | 42a812b765762f62cc260a994897a95492ffae28 | [
"Apache-2.0"
] | null | null | null | lib/ecto/query/validator.ex | liveforeverx/ecto | 42a812b765762f62cc260a994897a95492ffae28 | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.Query.Validator do
@moduledoc false
# This module does validation on the query checking that it's in
# a correct format, raising if it's not.
# TODO: Check it raises on missing bindings
alias Ecto.Query
alias Ecto.Query.Util
alias Ecto.Query.QueryExpr
alias Ecto.Query.JoinExpr
alias ... | 30.86036 | 109 | 0.646986 |
33c0bec896f5233ce74c85086fc356ce59c28bb3 | 127 | ex | Elixir | lib/foundation_phoenix/repo.ex | PanyPy/foundation_phoenix | 571aaa0b274c1428b4cf8e370777ae82c9167eb2 | [
"MIT"
] | null | null | null | lib/foundation_phoenix/repo.ex | PanyPy/foundation_phoenix | 571aaa0b274c1428b4cf8e370777ae82c9167eb2 | [
"MIT"
] | 2 | 2021-03-10T11:28:36.000Z | 2021-05-11T07:00:39.000Z | lib/foundation_phoenix/repo.ex | PanyPy/foundation_phoenix | 571aaa0b274c1428b4cf8e370777ae82c9167eb2 | [
"MIT"
] | null | null | null | defmodule FoundationPhoenix.Repo do
use Ecto.Repo,
otp_app: :foundation_phoenix,
adapter: Ecto.Adapters.Postgres
end
| 21.166667 | 35 | 0.771654 |
33c0c1decc2d9f7bd3828ef1cf0949146ab6e7f2 | 5,234 | exs | Elixir | test/cadet_web/controllers/courses_controller_test.exs | source-academy/cadet | c447552453f78799755de73f66999e4c9d20383c | [
"Apache-2.0"
] | 27 | 2018-01-20T05:56:24.000Z | 2021-05-24T03:21:55.000Z | test/cadet_web/controllers/courses_controller_test.exs | source-academy/cadet | c447552453f78799755de73f66999e4c9d20383c | [
"Apache-2.0"
] | 731 | 2018-04-16T13:25:49.000Z | 2021-06-22T07:16:12.000Z | test/cadet_web/controllers/courses_controller_test.exs | source-academy/cadet | c447552453f78799755de73f66999e4c9d20383c | [
"Apache-2.0"
] | 43 | 2018-01-20T06:35:46.000Z | 2021-05-05T03:22:35.000Z | defmodule CadetWeb.CoursesControllerTest do
use CadetWeb.ConnCase
import Ecto.Query
alias Cadet.Repo
alias Cadet.Accounts.CourseRegistration
alias Cadet.Courses.Course
alias CadetWeb.CoursesController
test "swagger" do
CoursesController.swagger_definitions()
CoursesController.swagger_path_get_c... | 33.33758 | 94 | 0.599159 |
33c0c7d4fe453c5894eb75c59929a1e4c0aab03f | 535 | exs | Elixir | phoenixApp/test/phoenixApp/mycsv_test.exs | felipe-higino/learning-elixir-nlw4 | 5eb093bf205c3f5362189f6cc7cd0d3f0de7076d | [
"MIT"
] | null | null | null | phoenixApp/test/phoenixApp/mycsv_test.exs | felipe-higino/learning-elixir-nlw4 | 5eb093bf205c3f5362189f6cc7cd0d3f0de7076d | [
"MIT"
] | null | null | null | phoenixApp/test/phoenixApp/mycsv_test.exs | felipe-higino/learning-elixir-nlw4 | 5eb093bf205c3f5362189f6cc7cd0d3f0de7076d | [
"MIT"
] | null | null | null | defmodule PhoenixApp.MycsvTest do
use ExUnit.Case
alias PhoenixApp.Mycsv
describe "sum_from_csv/1" do
test "there is a csv file, returns the sum of values" do
response = Mycsv.sum_from_csv("mycsv")
expected_response = {:ok, %{result: 37}}
assert response == expected_response
end
t... | 24.318182 | 61 | 0.684112 |
33c0cf0fc8241c9ba952f1d534a2a9dff3693635 | 1,816 | ex | Elixir | lib/identicon.ex | isk030/Elixir-Indenticon | a059755daedef473e25b764ab06d99be1d0126dd | [
"CC0-1.0"
] | null | null | null | lib/identicon.ex | isk030/Elixir-Indenticon | a059755daedef473e25b764ab06d99be1d0126dd | [
"CC0-1.0"
] | null | null | null | lib/identicon.ex | isk030/Elixir-Indenticon | a059755daedef473e25b764ab06d99be1d0126dd | [
"CC0-1.0"
] | null | null | null | defmodule Identicon do
def main(input) do
input
|> hash_input
|> pick_color
|> build_grid
|> filter_odd_squares
|> build_pixel_map
|> draw_image
|> save_image(input)
end
def save_image(image, input) do
File.write("#{input}.png", image)
end
def draw_image(%Identicon.Image{... | 21.879518 | 73 | 0.598018 |
33c0d3c5330f01fad034cc64470d5ca505ba7a02 | 28,464 | ex | Elixir | lib/ash/resource/dsl.ex | MrFlorius/ash | 247abbb8333d252da5440a58ddf4f1b7f184342f | [
"MIT"
] | null | null | null | lib/ash/resource/dsl.ex | MrFlorius/ash | 247abbb8333d252da5440a58ddf4f1b7f184342f | [
"MIT"
] | null | null | null | lib/ash/resource/dsl.ex | MrFlorius/ash | 247abbb8333d252da5440a58ddf4f1b7f184342f | [
"MIT"
] | null | null | null | defmodule Ash.Resource.Dsl do
@attribute %Ash.Dsl.Entity{
name: :attribute,
describe: """
Declares an attribute on the resource
Type can be either a built in type (see `Ash.Type`) for more, or a module
implementing the `Ash.Type` behaviour.
*Strings are trimmed by default*. If you want to re... | 28.238095 | 127 | 0.626019 |
33c0d98166c89cafa613a363c8d308e8d92d83e6 | 463 | ex | Elixir | lib/protox/json_message_decoder.ex | moogle19/protox | b0efbce60efd7c38725b74575f7ff0074efd6c65 | [
"MIT"
] | 176 | 2017-02-01T13:09:25.000Z | 2022-03-18T02:36:17.000Z | lib/protox/json_message_decoder.ex | moogle19/protox | b0efbce60efd7c38725b74575f7ff0074efd6c65 | [
"MIT"
] | 94 | 2020-07-20T05:54:51.000Z | 2022-03-09T04:13:03.000Z | lib/protox/json_message_decoder.ex | moogle19/protox | b0efbce60efd7c38725b74575f7ff0074efd6c65 | [
"MIT"
] | 19 | 2017-02-13T09:17:14.000Z | 2022-02-22T09:29:18.000Z | defprotocol Protox.JsonMessageDecoder do
@moduledoc """
This protocol makes possible to override the JSON decoding of a specific message.
"""
@doc since: "1.6.0"
@fallback_to_any true
# @spec decode_message(atom(), struct()) :: struct()
def decode_message(initial_message, json)
end
defimpl Protox.JsonMe... | 27.235294 | 83 | 0.75378 |
33c0dd53616f8a28c6b429be522ea7cb8fe0b912 | 2,738 | exs | Elixir | test/cubdb/store/file_test.exs | fhunleth/cubdb | 0c606e3efe8110da90e52eb95f963a3cd51360ae | [
"Apache-2.0"
] | 318 | 2019-06-17T16:54:25.000Z | 2022-03-09T07:37:23.000Z | test/cubdb/store/file_test.exs | fhunleth/cubdb | 0c606e3efe8110da90e52eb95f963a3cd51360ae | [
"Apache-2.0"
] | 29 | 2019-07-03T13:46:28.000Z | 2022-02-15T10:44:58.000Z | test/cubdb/store/file_test.exs | fhunleth/cubdb | 0c606e3efe8110da90e52eb95f963a3cd51360ae | [
"Apache-2.0"
] | 18 | 2019-06-29T04:40:22.000Z | 2022-01-18T16:30:15.000Z | defmodule CubDB.Store.FileTest do
use ExUnit.Case, async: true
use CubDB.StoreExamples
setup do
{tmp_path, 0} = System.cmd("mktemp", [])
tmp_path = tmp_path |> String.trim()
{:ok, store} = CubDB.Store.File.create(tmp_path)
on_exit(fn ->
:file.delete(tmp_path |> String.to_charlist())
e... | 28.821053 | 95 | 0.661432 |
33c0eb8602df7073710d6fd80715fe2cc88ab165 | 2,134 | exs | Elixir | config/dev.exs | SkullDarth/upnid-challenge-twitter-api | 799f2bfa8864848423eeddc24d3a5993152eb464 | [
"MIT"
] | 2 | 2019-12-05T21:37:48.000Z | 2020-01-02T02:43:33.000Z | config/dev.exs | SkullDarth/upnid-challenge-twitter-api | 799f2bfa8864848423eeddc24d3a5993152eb464 | [
"MIT"
] | null | null | null | config/dev.exs | SkullDarth/upnid-challenge-twitter-api | 799f2bfa8864848423eeddc24d3a5993152eb464 | [
"MIT"
] | null | null | null | use Mix.Config
# Configure your database
config :twitter, Twitter.Repo,
username: "postgres",
password: "docker",
database: "twitter_dev",
hostname: "localhost",
show_sensitive_data_on_connection_error: true,
pool_size: 10
# For development, we disable any cache and enable
# debugging and code reloading.
... | 27.714286 | 68 | 0.690253 |
33c1328b2143c45df428e239404445de63a6f737 | 699 | ex | Elixir | lib/football_api_web/proto_controller.ex | afatsini/football_api | c17af14733fc7a649c38516045867c72ecab469f | [
"MIT"
] | null | null | null | lib/football_api_web/proto_controller.ex | afatsini/football_api | c17af14733fc7a649c38516045867c72ecab469f | [
"MIT"
] | null | null | null | lib/football_api_web/proto_controller.ex | afatsini/football_api | c17af14733fc7a649c38516045867c72ecab469f | [
"MIT"
] | null | null | null | defmodule FootballApiWeb.ProtoController do
@moduledoc false
import Plug.Conn
alias Plug.Conn
alias FootballApi.Protobuf.Error
@spec init(any) :: any
def init(default), do: default
@spec call(Conn.t(), any) :: Conn.t()
def call(conn, {:error, :bad_request}), do: do_error(conn, 400, "Bad Request")
d... | 27.96 | 80 | 0.679542 |
33c135d90c70b68ba27acd0be9cb1e99148c667c | 85 | ex | Elixir | auth/web/views/layout_view.ex | renovate-bot/elixir-samples | 91da795ecdfac83eb6fcac63bc532da98c69d520 | [
"Apache-2.0"
] | 274 | 2017-08-25T06:39:51.000Z | 2022-03-15T21:03:27.000Z | auth/web/views/layout_view.ex | renovate-bot/elixir-samples | 91da795ecdfac83eb6fcac63bc532da98c69d520 | [
"Apache-2.0"
] | 15 | 2017-10-03T17:05:48.000Z | 2021-11-23T00:33:23.000Z | auth/web/views/layout_view.ex | renovate-bot/elixir-samples | 91da795ecdfac83eb6fcac63bc532da98c69d520 | [
"Apache-2.0"
] | 42 | 2017-08-28T20:08:47.000Z | 2022-01-18T07:51:02.000Z | defmodule GoogleOAuth2Example.LayoutView do
use GoogleOAuth2Example.Web, :view
end
| 21.25 | 43 | 0.847059 |
33c1533ae492927c034395384202b1a7f115b0da | 215 | exs | Elixir | priv/repo/migrations/20201028161529_activity_tests.exs | TomGrozev/SAD-Badges | a94331433ea21a0d719216ac8473e706166d6004 | [
"MIT"
] | null | null | null | priv/repo/migrations/20201028161529_activity_tests.exs | TomGrozev/SAD-Badges | a94331433ea21a0d719216ac8473e706166d6004 | [
"MIT"
] | null | null | null | priv/repo/migrations/20201028161529_activity_tests.exs | TomGrozev/SAD-Badges | a94331433ea21a0d719216ac8473e706166d6004 | [
"MIT"
] | null | null | null | defmodule Badges.Repo.Migrations.ActivityTests do
use Ecto.Migration
def change do
alter table(:tests_completed) do
add :activity_id, references(:activities, on_delete: :nilify_all)
end
end
end
| 21.5 | 71 | 0.744186 |
33c1573b4a133ed5de4b805735d95ca376ffe073 | 1,851 | exs | Elixir | clients/os_login/mix.exs | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/os_login/mix.exs | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | clients/os_login/mix.exs | kyleVsteger/elixir-google-api | 3a0dd498af066a4361b5b0fd66ffc04a57539488 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 27.626866 | 114 | 0.653701 |
33c169ce27594615cf04ca32ff9f16b9064a5680 | 862 | ex | Elixir | wadm/lib/wadm/model/link_definition.ex | janitha09/wadm | b5c9a0f5290bfcdd0eefe0f0bf22583b61c66c0f | [
"Apache-2.0"
] | 2 | 2022-01-02T12:37:57.000Z | 2022-03-02T20:13:03.000Z | wadm/lib/wadm/model/link_definition.ex | janitha09/wadm | b5c9a0f5290bfcdd0eefe0f0bf22583b61c66c0f | [
"Apache-2.0"
] | 12 | 2021-11-28T19:22:20.000Z | 2022-01-25T18:41:48.000Z | wadm/lib/wadm/model/link_definition.ex | janitha09/wadm | b5c9a0f5290bfcdd0eefe0f0bf22583b61c66c0f | [
"Apache-2.0"
] | 1 | 2021-08-31T13:10:34.000Z | 2021-08-31T13:10:34.000Z | defmodule Wadm.Model.LinkDefinition do
alias __MODULE__
alias Wadm.Model.{AppSpec, CapabilityComponent}
@typedoc """
A type that represents a link definition specification, the details of which can be
determined by looking up the target as a component of type "capability"
"""
@type t :: %LinkDefiniti... | 28.733333 | 87 | 0.63109 |
33c16d5ad2107dbffb707b54bf255d3c9d5df038 | 2,113 | exs | Elixir | mix.exs | peek-travel/excal | d748836d46816b63d8e4a159b66fe9f411b52df4 | [
"MIT"
] | 19 | 2018-07-02T23:07:01.000Z | 2020-09-18T09:53:53.000Z | mix.exs | peek-travel/excal | d748836d46816b63d8e4a159b66fe9f411b52df4 | [
"MIT"
] | 93 | 2018-07-03T23:33:39.000Z | 2021-08-02T13:14:36.000Z | mix.exs | peek-travel/excal | d748836d46816b63d8e4a159b66fe9f411b52df4 | [
"MIT"
] | 3 | 2019-02-05T15:03:22.000Z | 2019-06-27T16:05:18.000Z | defmodule Excal.MixProject do
use Mix.Project
@version "0.3.2"
@source_url "https://github.com/peek-travel/excal"
def project do
[
app: :excal,
compilers: [:elixir_make] ++ Mix.compilers(),
version: @version,
elixir: "~> 1.8",
start_permanent: Mix.env() == :prod,
descri... | 23.741573 | 112 | 0.561287 |
33c16f1dfa29fb5aaefb3ac2d38e33208d6d5485 | 172 | exs | Elixir | 02/test/aoc2_test.exs | smt/adventofcode2018 | 4e584465775e4928cdae4d30af08c8827dae96cd | [
"MIT"
] | null | null | null | 02/test/aoc2_test.exs | smt/adventofcode2018 | 4e584465775e4928cdae4d30af08c8827dae96cd | [
"MIT"
] | null | null | null | 02/test/aoc2_test.exs | smt/adventofcode2018 | 4e584465775e4928cdae4d30af08c8827dae96cd | [
"MIT"
] | null | null | null | defmodule Aoc2Test do
use ExUnit.Case
doctest Aoc2
test "Calculate correct value from fixture data" do
assert Aoc2.main("test/aoc2_fixture.txt") == 12
end
end
| 19.111111 | 53 | 0.732558 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.