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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1d9029f3f4fa47b50eaa2c2bd93d56eea9904112 | 508 | exs | Elixir | examples/swagger_demo/config/test.exs | Whatnot-Inc/bureaucrat | d0634c6017dc68f8a23078cbc8c181a4b2d3e6db | [
"Unlicense"
] | 326 | 2015-08-19T10:05:07.000Z | 2022-03-28T08:49:33.000Z | examples/swagger_demo/config/test.exs | Whatnot-Inc/bureaucrat | d0634c6017dc68f8a23078cbc8c181a4b2d3e6db | [
"Unlicense"
] | 64 | 2015-08-19T06:44:19.000Z | 2022-03-29T06:23:34.000Z | examples/swagger_demo/config/test.exs | Whatnot-Inc/bureaucrat | d0634c6017dc68f8a23078cbc8c181a4b2d3e6db | [
"Unlicense"
] | 66 | 2016-01-08T20:40:40.000Z | 2022-03-03T02:15: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 :swagger_demo, SwaggerDemo.Endpoint,
http: [port: 4001],
server: false
# Print only warnings and errors during test
config :logger, level: :warn
# Configure your database
config :swagger_demo,... | 25.4 | 56 | 0.742126 |
1d902eda013107b33eaf8ef243881375b05c06b1 | 462 | ex | Elixir | plug_gateway/lib/plug_gateway/backend_client.ex | raphaklaus/opentelemetry-examples | 099fc6cf52bdd337f359530e12007050aa835b35 | [
"Apache-2.0"
] | 4 | 2020-07-12T18:39:07.000Z | 2021-04-09T12:58:54.000Z | plug_gateway/lib/plug_gateway/backend_client.ex | raphaklaus/opentelemetry-examples | 099fc6cf52bdd337f359530e12007050aa835b35 | [
"Apache-2.0"
] | 8 | 2020-06-27T22:05:24.000Z | 2022-02-16T09:23:41.000Z | plug_gateway/lib/plug_gateway/backend_client.ex | raphaklaus/opentelemetry-examples | 099fc6cf52bdd337f359530e12007050aa835b35 | [
"Apache-2.0"
] | 5 | 2020-10-27T00:59:26.000Z | 2021-11-23T17:22:23.000Z | defmodule PlugGateway.BackendClient do
def get(url, opts \\ []) do
headers = [{"authorization", "Bearer #{token()}"}]
url
|> HTTPoison.get(headers)
|> case do
{:ok, %HTTPoison.Response{status_code: status_code, body: body}} -> {:ok, status_code, body}
{:error, reason} -> {:error, reason}... | 28.875 | 121 | 0.655844 |
1d905a1522425b9bfbe3a9b8697bac28037a809f | 754 | exs | Elixir | test/bench.exs | tinymesh/tm-proto-elixir | 54a796c89de697526e30e4c54975a4caa475cc30 | [
"BSD-2-Clause"
] | 2 | 2017-10-30T11:45:38.000Z | 2017-11-14T18:03:55.000Z | test/bench.exs | tinymesh/tm-proto-elixir | 54a796c89de697526e30e4c54975a4caa475cc30 | [
"BSD-2-Clause"
] | null | null | null | test/bench.exs | tinymesh/tm-proto-elixir | 54a796c89de697526e30e4c54975a4caa475cc30 | [
"BSD-2-Clause"
] | null | null | null | defmodule Runner do
import ExProf.Macro
def analyze(lines) do
profile do
Enum.reduce lines, 0, fn(msg, acc) ->
try do
{:ok, r} = Tinymesh.Proto.unserialize msg
catch
_, _ -> nil
end
acc + 1
end
end
end
end
dir = "test/conn_data"
lines = for... | 20.944444 | 76 | 0.590186 |
1d90e9c26059de1ea056ff275fcf0ccc3ef3195a | 752 | exs | Elixir | priv/repo/migrations/0500_add_users_table.exs | bhtabor/radiator | 39c137a18d36d6f418f9d1ffb7aa2c99011d66cf | [
"MIT"
] | 92 | 2019-01-03T11:46:23.000Z | 2022-02-19T21:28:44.000Z | priv/repo/migrations/0500_add_users_table.exs | bhtabor/radiator | 39c137a18d36d6f418f9d1ffb7aa2c99011d66cf | [
"MIT"
] | 350 | 2019-04-11T07:55:51.000Z | 2021-08-03T11:19:05.000Z | priv/repo/migrations/0500_add_users_table.exs | bhtabor/radiator | 39c137a18d36d6f418f9d1ffb7aa2c99011d66cf | [
"MIT"
] | 10 | 2019-04-18T12:47:27.000Z | 2022-01-25T20:49:15.000Z | defmodule Radiator.Repo.Migrations.AddUsersTable do
use Ecto.Migration
def change do
create table(:auth_users) do
add :name, :text
add :email, :text
add :password_hash, :binary
add :status, :string, null: false, size: 40
timestamps()
end
create index(:auth_users, ["(lowe... | 27.851852 | 89 | 0.643617 |
1d90f46cbd18392b4e1242ecd60a7aab5ac2cd49 | 419 | ex | Elixir | lib/router.ex | maxvw/comparemoji.com | a078b5854e8bedbc112fb2e5ddcf4c64ca4ad572 | [
"MIT"
] | 5 | 2020-07-12T18:09:15.000Z | 2021-12-23T19:51:22.000Z | lib/router.ex | maxvw/comparemoji.com | a078b5854e8bedbc112fb2e5ddcf4c64ca4ad572 | [
"MIT"
] | 1 | 2021-04-06T20:35:02.000Z | 2021-04-06T20:35:02.000Z | lib/router.ex | maxvw/comparemoji.com | a078b5854e8bedbc112fb2e5ddcf4c64ca4ad572 | [
"MIT"
] | null | null | null | defmodule Comparemoji.Router do
import Phoenix.LiveView.Router
use Phoenix.Router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_live_flash
plug :put_root_layout, {Comparemoji.LayoutView, :root}
plug :protect_from_forgery
plug :put_secure_browser_headers
en... | 22.052632 | 58 | 0.720764 |
1d912109a708b0dca6f94ef2762c6e4471b54df5 | 3,493 | ex | Elixir | lib/ref_inspector.ex | elixir-inspector/ref_inspector | f34485a8e32f0aaea2e3951fbb756eac14a9f8dd | [
"Apache-2.0"
] | 7 | 2018-12-22T14:41:26.000Z | 2020-05-04T08:16:11.000Z | lib/ref_inspector.ex | elixir-inspector/ref_inspector | f34485a8e32f0aaea2e3951fbb756eac14a9f8dd | [
"Apache-2.0"
] | 2 | 2019-11-25T09:41:27.000Z | 2020-05-06T17:30:45.000Z | lib/ref_inspector.ex | elixir-inspector/ref_inspector | f34485a8e32f0aaea2e3951fbb756eac14a9f8dd | [
"Apache-2.0"
] | null | null | null | defmodule RefInspector do
@moduledoc """
Referer parser library.
## Preparation
1. Verify your supervision setup according to `RefInspector.Supervisor`
2. Revise the default configuration values of `RefInspector.Config` and
adjust to your project/environment where necessary
3. Download a copy of the ... | 34.584158 | 83 | 0.704838 |
1d913e1d237ced460dc2af2a08864611891e87f6 | 2,927 | exs | Elixir | apps/omg_child_chain_rpc/test/omg_child_chain_rpc/web/controllers/transaction_test.exs | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | 1 | 2020-10-06T03:07:47.000Z | 2020-10-06T03:07:47.000Z | apps/omg_child_chain_rpc/test/omg_child_chain_rpc/web/controllers/transaction_test.exs | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | 9 | 2020-09-16T15:31:17.000Z | 2021-03-17T07:12:35.000Z | apps/omg_child_chain_rpc/test/omg_child_chain_rpc/web/controllers/transaction_test.exs | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | 1 | 2020-09-30T17:17:27.000Z | 2020-09-30T17:17:27.000Z | # Copyright 2019-2020 OmiseGO Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 29.565657 | 112 | 0.586949 |
1d9150e847fe4e54ab28f926826e4cfbb5327997 | 1,137 | exs | Elixir | mix.exs | brunobamaral/speedrun | b439e03a0a06c53c03824cb8a37fd55e4aef8e35 | [
"Apache-2.0"
] | null | null | null | mix.exs | brunobamaral/speedrun | b439e03a0a06c53c03824cb8a37fd55e4aef8e35 | [
"Apache-2.0"
] | null | null | null | mix.exs | brunobamaral/speedrun | b439e03a0a06c53c03824cb8a37fd55e4aef8e35 | [
"Apache-2.0"
] | null | null | null | defmodule Speedrun.Umbrella.MixProject do
use Mix.Project
def project do
[
apps_path: "apps",
version: "0.1.0",
start_permanent: Mix.env() == :prod,
deps: deps(),
aliases: aliases()
]
end
# Dependencies can be Hex packages:
#
# {:mydep, "~> 0.3.0"}
#
# Or git/pa... | 24.717391 | 84 | 0.64204 |
1d9171be4d9008fd329aedb180c8d4e8a6df3fe9 | 224 | ex | Elixir | programming_elixir_1.3_snippets/control/case1.ex | benjohns1/elixer-app | 6e866ec084c5e75442c0b70f66e35f61b5b74d34 | [
"MIT"
] | null | null | null | programming_elixir_1.3_snippets/control/case1.ex | benjohns1/elixer-app | 6e866ec084c5e75442c0b70f66e35f61b5b74d34 | [
"MIT"
] | null | null | null | programming_elixir_1.3_snippets/control/case1.ex | benjohns1/elixer-app | 6e866ec084c5e75442c0b70f66e35f61b5b74d34 | [
"MIT"
] | null | null | null | defmodule Users do
dave = %{name: "Dave", state: "TX", likes: "programming"}
case dave do
%{state: some_state} = person -> IO.puts "#{person.name} lives in #{some_state}"
_ -> IO.puts "No matches"
end
end | 32 | 85 | 0.611607 |
1d918333a3648c6babbce460c90170abe6017c3d | 86 | exs | Elixir | apps/tai/test/tai/venue_adapters/bitmex/account_test.exs | ccamateur/tai | 41c4b3e09dafc77987fa3f6b300c15461d981e16 | [
"MIT"
] | 276 | 2018-01-16T06:36:06.000Z | 2021-03-20T21:48:01.000Z | apps/tai/test/tai/venue_adapters/bitmex/account_test.exs | ccamateur/tai | 41c4b3e09dafc77987fa3f6b300c15461d981e16 | [
"MIT"
] | 78 | 2020-10-12T06:21:43.000Z | 2022-03-28T09:02:00.000Z | apps/tai/test/tai/venue_adapters/bitmex/account_test.exs | yurikoval/tai | 94254b45d22fa0307b01577ff7c629c7280c0295 | [
"MIT"
] | 43 | 2018-06-09T09:54:51.000Z | 2021-03-07T07:35:17.000Z | defmodule Tai.VenuesAdapters.Bitmex.AccountTest do
use ExUnit.Case, async: true
end
| 21.5 | 50 | 0.813953 |
1d91917898c627db2ce7cbb21cd9f0cc49212ccb | 235 | exs | Elixir | test/livebook/notebook/welcome_test.exs | brettcannon/livebook | d6c9ab1783efa083aea2ead81e078bb920d57ad6 | [
"Apache-2.0"
] | 1 | 2021-05-21T22:14:23.000Z | 2021-05-21T22:14:23.000Z | test/livebook/notebook/welcome_test.exs | brettcannon/livebook | d6c9ab1783efa083aea2ead81e078bb920d57ad6 | [
"Apache-2.0"
] | 1 | 2021-09-18T01:09:08.000Z | 2021-09-18T01:09:08.000Z | test/livebook/notebook/welcome_test.exs | brettcannon/livebook | d6c9ab1783efa083aea2ead81e078bb920d57ad6 | [
"Apache-2.0"
] | null | null | null | defmodule Livebook.Notebook.WelcomeTest do
use ExUnit.Case, async: true
alias Livebook.Notebook
alias Livebook.Notebook.Welcome
test "new/0 correctly builds a new notebook" do
assert %Notebook{} = Welcome.new()
end
end
| 21.363636 | 49 | 0.748936 |
1d91bd6ac9a7cc4e426c691f5227c0f8058d8790 | 567 | ex | Elixir | lib/altstatus_web/plugs/authorize_user.ex | AltCampus/altstatus_backend | 70bf7a9d337e570f54002c3a7df264e88372adfa | [
"MIT"
] | 1 | 2020-01-20T18:17:59.000Z | 2020-01-20T18:17:59.000Z | lib/altstatus_web/plugs/authorize_user.ex | AltCampus/altstatus_backend | 70bf7a9d337e570f54002c3a7df264e88372adfa | [
"MIT"
] | null | null | null | lib/altstatus_web/plugs/authorize_user.ex | AltCampus/altstatus_backend | 70bf7a9d337e570f54002c3a7df264e88372adfa | [
"MIT"
] | 2 | 2018-09-09T08:05:24.000Z | 2018-09-09T08:35:18.000Z | defmodule AltstatusWeb.Plugs.AuthorizeUser do
import Plug.Conn
import Phoenix.Controller
def init(_params) do
end
def call(conn, _params) do
IO.inspect conn
if Enum.any?(get_req_header(conn, "authorization")) do
[token | _] = get_req_header(conn, "authorization")
case Phoenix.Token.ve... | 22.68 | 60 | 0.592593 |
1d91d272559d80a88f19f7dca9acedfc06ed4cf6 | 1,326 | exs | Elixir | test/teiserver/protocols/tachyon/tachyon_news_test.exs | badosu/teiserver | 19b623aeb7c2ab28756405f7486e92b714777c54 | [
"MIT"
] | 4 | 2021-07-29T16:23:20.000Z | 2022-02-23T05:34:36.000Z | test/teiserver/protocols/tachyon/tachyon_news_test.exs | Jazcash/teiserver | fec14784901cb2965d8c1350fe84107c57451877 | [
"MIT"
] | 14 | 2021-08-01T02:36:14.000Z | 2022-01-30T21:15:03.000Z | test/teiserver/protocols/tachyon/tachyon_news_test.exs | Jazcash/teiserver | fec14784901cb2965d8c1350fe84107c57451877 | [
"MIT"
] | 7 | 2021-05-13T12:55:28.000Z | 2022-01-14T06:39:06.000Z | defmodule Teiserver.Protocols.TachyonNewsTest do
alias Central.CommunicationTestLib
alias Central.Helpers.GeneralTestLib
use Central.ServerCase
import Teiserver.TeiserverTestLib,
only: [tachyon_auth_setup: 0, _tachyon_send: 2, _tachyon_recv: 1]
setup do
%{socket: socket, user: user, pid: pid} = tach... | 34 | 83 | 0.679487 |
1d91efffc520378a8088d75078c5fbfeaf5d0976 | 1,056 | ex | Elixir | lib/abbr_web/channels/user_socket.ex | elvanja/abbr | b09954df2f68f71c03f308b01927f032bf692ac4 | [
"MIT"
] | 14 | 2020-03-25T22:10:42.000Z | 2021-02-04T01:31:40.000Z | lib/abbr_web/channels/user_socket.ex | elvanja/abbr | b09954df2f68f71c03f308b01927f032bf692ac4 | [
"MIT"
] | null | null | null | lib/abbr_web/channels/user_socket.ex | elvanja/abbr | b09954df2f68f71c03f308b01927f032bf692ac4 | [
"MIT"
] | null | null | null | defmodule AbbrWeb.UserSocket do
use Phoenix.Socket
## Channels
# channel "room:*", AbbrWeb.RoomChannel
# Socket params are passed from the client and can
# be used to verify and authenticate a user. After
# verification, you can put default assigns into
# the socket that will be set for all channels, ie... | 31.058824 | 83 | 0.694129 |
1d923e312f970a274dd942e8b25cce527e4cac0f | 2,910 | ex | Elixir | advent-of-code-2016/day_11/lib/algorithm/astar.ex | Tmw/advent-of-code-2016 | 575952c0b22e20a73f6f5f5beba0daf93612b29e | [
"MIT"
] | 1 | 2017-01-04T21:28:13.000Z | 2017-01-04T21:28:13.000Z | advent-of-code-2016/day_11/lib/algorithm/astar.ex | Tmw/advent-of-code-2016 | 575952c0b22e20a73f6f5f5beba0daf93612b29e | [
"MIT"
] | null | null | null | advent-of-code-2016/day_11/lib/algorithm/astar.ex | Tmw/advent-of-code-2016 | 575952c0b22e20a73f6f5f5beba0daf93612b29e | [
"MIT"
] | null | null | null | defmodule Day11.Algorithm.AStar do
@behaviour Day11.Algorithm
@type state_hash() :: String.t()
@type visited_map() :: %{
state_hash() => integer()
}
@impl true
def search(open, discovered \\ Map.new())
def search([], _visited), do: :end_not_found
def search([current | rest] = _open, d... | 36.375 | 81 | 0.701718 |
1d924dd2c024bf73a4fe3c6a4c1fc6a4186f3cc6 | 1,037 | exs | Elixir | daily_meals/test/daily_meals/meals/update_test.exs | joabehenrique/daily-meals | ea8919a45dc155046289c96854348bd7ed89c1fb | [
"MIT"
] | null | null | null | daily_meals/test/daily_meals/meals/update_test.exs | joabehenrique/daily-meals | ea8919a45dc155046289c96854348bd7ed89c1fb | [
"MIT"
] | null | null | null | daily_meals/test/daily_meals/meals/update_test.exs | joabehenrique/daily-meals | ea8919a45dc155046289c96854348bd7ed89c1fb | [
"MIT"
] | null | null | null | defmodule DailyMeals.Meals.UpdateTest do
use DailyMeals.DataCase
import DailyMeals.Factory
alias DailyMeals.{Meals, User}
describe "Update Meal" do
test "when a valid id is given, returns the meal" do
user_params = build(:users_params)
{:ok, %User{id: user_id}} = DailyMeals.create_user(user_... | 27.289474 | 97 | 0.587271 |
1d9285fd26d6d25601c682aab98188c4d7e2a867 | 411 | exs | Elixir | priv/repo/migrations/20191218145851_create_historical_scrape_price_progress_table.exs | sitedata/sanbase2 | 8da5e44a343288fbc41b68668c6c80ae8547d557 | [
"MIT"
] | 81 | 2017-11-20T01:20:22.000Z | 2022-03-05T12:04:25.000Z | priv/repo/migrations/20191218145851_create_historical_scrape_price_progress_table.exs | rmoorman/sanbase2 | 226784ab43a24219e7332c49156b198d09a6dd85 | [
"MIT"
] | 359 | 2017-10-15T14:40:53.000Z | 2022-01-25T13:34:20.000Z | priv/repo/migrations/20191218145851_create_historical_scrape_price_progress_table.exs | sitedata/sanbase2 | 8da5e44a343288fbc41b68668c6c80ae8547d557 | [
"MIT"
] | 16 | 2017-11-19T13:57:40.000Z | 2022-02-07T08:13:02.000Z | defmodule Sanbase.Repo.Migrations.CreateHistoricalScrapePriceProgressTable do
use Ecto.Migration
@table :price_scraping_progress
def change do
create table(@table) do
add(:identifier, :string, null: false)
add(:datetime, :naive_datetime, null: false)
add(:source, :string, null: false)
... | 24.176471 | 77 | 0.703163 |
1d92d9e95afc3fc0aeedb83acc8724148f82040b | 836 | ex | Elixir | apps/massa_proxy/lib/massa_proxy/cluster/global_supervisor.ex | marcellanz/massa | 97423e2e45b37d372bba51c76c1dd8433ac85b8c | [
"Apache-2.0"
] | null | null | null | apps/massa_proxy/lib/massa_proxy/cluster/global_supervisor.ex | marcellanz/massa | 97423e2e45b37d372bba51c76c1dd8433ac85b8c | [
"Apache-2.0"
] | 16 | 2021-11-01T08:19:03.000Z | 2022-03-30T08:17:43.000Z | apps/massa_proxy/lib/massa_proxy/cluster/global_supervisor.ex | marcellanz/massa | 97423e2e45b37d372bba51c76c1dd8433ac85b8c | [
"Apache-2.0"
] | null | null | null | defmodule MassaProxy.GlobalSupervisor do
@moduledoc false
use Horde.DynamicSupervisor
require Logger
def child_spec() do
%{
id: __MODULE__,
start: {__MODULE__, :start_link, [%{}]}
}
end
def start_link(_) do
Horde.DynamicSupervisor.start_link(
__MODULE__,
[
shutd... | 20.390244 | 96 | 0.607656 |
1d931ebcdf51582631dd7787bd208a713797d6bc | 4,062 | ex | Elixir | lib/redix_clustered/crc16.ex | PRX/redix-clustered | 46d5826fdcd877ba9794e083260b5bcc784b8a9e | [
"MIT"
] | null | null | null | lib/redix_clustered/crc16.ex | PRX/redix-clustered | 46d5826fdcd877ba9794e083260b5bcc784b8a9e | [
"MIT"
] | null | null | null | lib/redix_clustered/crc16.ex | PRX/redix-clustered | 46d5826fdcd877ba9794e083260b5bcc784b8a9e | [
"MIT"
] | null | null | null | # thanks to https://github.com/probably-not/redix-cluster/blob/master/lib/redix_cluster/hash.ex
defmodule RedixClustered.CRC16 do
use Bitwise
@crcdef <<0x00, 0x00, 0x10, 0x21, 0x20, 0x42, 0x30, 0x63, 0x40, 0x84, 0x50, 0xA5, 0x60, 0xC6,
0x70, 0xE7, 0x81, 0x08, 0x91, 0x29, 0xA1, 0x4A, 0xB1, 0x6B, 0xC1, 0... | 70.034483 | 95 | 0.589611 |
1d9320cdf0a50ccc5b310d24d983facfa1ab39d7 | 1,123 | exs | Elixir | config/config.exs | cpb8010/elixir-eip-test | 2c025eea8fd07c1114c7dd956fc475e25499dbdc | [
"BSD-3-Clause"
] | null | null | null | config/config.exs | cpb8010/elixir-eip-test | 2c025eea8fd07c1114c7dd956fc475e25499dbdc | [
"BSD-3-Clause"
] | null | null | null | config/config.exs | cpb8010/elixir-eip-test | 2c025eea8fd07c1114c7dd956fc475e25499dbdc | [
"BSD-3-Clause"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the paren... | 36.225806 | 73 | 0.752449 |
1d93afa964ac6bdb65be7a045abd490566a2c39f | 8,407 | exs | Elixir | integration_test/support/schemas.exs | fertapric/ecto | c7e144a2fd54d2ecc2df2f85e70cb6113116a2a4 | [
"Apache-2.0"
] | null | null | null | integration_test/support/schemas.exs | fertapric/ecto | c7e144a2fd54d2ecc2df2f85e70cb6113116a2a4 | [
"Apache-2.0"
] | null | null | null | integration_test/support/schemas.exs | fertapric/ecto | c7e144a2fd54d2ecc2df2f85e70cb6113116a2a4 | [
"Apache-2.0"
] | null | null | null | Code.require_file("types.exs", __DIR__)
defmodule Ecto.Integration.Schema do
defmacro __using__(_) do
quote do
use Ecto.Schema
type =
Application.get_env(:ecto, :primary_key_type) ||
raise ":primary_key_type not set in :ecto application"
@primary_key {:id, type, autogenerate... | 25.475758 | 125 | 0.711669 |
1d93cbd4406d5ba2b3061c84b41a6771ab75b443 | 1,646 | ex | Elixir | clients/vision/lib/google_api/vision/v1/model/google_cloud_vision_v1p4beta1_gcs_source.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/vision/lib/google_api/vision/v1/model/google_cloud_vision_v1p4beta1_gcs_source.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/vision/lib/google_api/vision/v1/model/google_cloud_vision_v1p4beta1_gcs_source.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... | 34.291667 | 173 | 0.757594 |
1d93eef2bebf65fd3aa65c6faa5b0bd665d614b8 | 1,391 | ex | Elixir | solutions/infinite-house-of-pancakes/elixir/approach5.ex | EdwinFajardoBarrera/google-code-jam | 3bc2979c726a3a40d1a82888439534ea429c2327 | [
"MIT"
] | 15 | 2015-02-27T01:34:41.000Z | 2022-02-03T23:16:47.000Z | solutions/infinite-house-of-pancakes/elixir/approach5.ex | EdwinFajardoBarrera/google-code-jam | 3bc2979c726a3a40d1a82888439534ea429c2327 | [
"MIT"
] | 35 | 2015-02-17T15:55:33.000Z | 2021-05-10T16:52:46.000Z | solutions/infinite-house-of-pancakes/elixir/approach5.ex | EdwinFajardoBarrera/google-code-jam | 3bc2979c726a3a40d1a82888439534ea429c2327 | [
"MIT"
] | 163 | 2015-02-10T19:19:51.000Z | 2021-10-19T04:20:15.000Z | defmodule M do
def main do
read("small-output.txt","B-small-practice.in")
read("large-output.txt","B-large-practice.in")
#algorithm("4 8 7 8 3")
end
def algorithm(pancakes) do
#pancakes = "4"
#get int array
arr = String.split(pancakes," ")
arr = Enum.map(arr, fn x -> elem(Integer.pa... | 21.075758 | 70 | 0.567937 |
1d93f4896c3ff45c7d0702cad4fe507d5e64dba1 | 204 | exs | Elixir | config/dev.exs | aditya7iyengar/bamboohr_api | e45a54e32cc6231b12de2bb42cd6569fcb7d4858 | [
"MIT"
] | null | null | null | config/dev.exs | aditya7iyengar/bamboohr_api | e45a54e32cc6231b12de2bb42cd6569fcb7d4858 | [
"MIT"
] | null | null | null | config/dev.exs | aditya7iyengar/bamboohr_api | e45a54e32cc6231b12de2bb42cd6569fcb7d4858 | [
"MIT"
] | null | null | null | use Mix.Config
config :bamboohr_api, BamboohrApi.Config,
subdomain: System.get_env("BAMBOO_SUBDOMAIN"),
api_key: System.get_env("BAMBOO_API_KEY"),
api_version: System.get_env("BAMBOO_API_VERSION")
| 29.142857 | 51 | 0.789216 |
1d9406c752315e9968464109c77872ed8864e9fa | 8,777 | ex | Elixir | lib/ethyl/ast_transforms.ex | NFIBrokerage/ethyl | 014dd11ad2c4a58feed51af005eea427a8ce0f7e | [
"MIT"
] | 1 | 2022-01-21T22:53:26.000Z | 2022-01-21T22:53:26.000Z | lib/ethyl/ast_transforms.ex | NFIBrokerage/ethyl | 014dd11ad2c4a58feed51af005eea427a8ce0f7e | [
"MIT"
] | 2 | 2021-09-24T19:52:21.000Z | 2021-09-27T21:46:45.000Z | lib/ethyl/ast_transforms.ex | NFIBrokerage/ethyl | 014dd11ad2c4a58feed51af005eea427a8ce0f7e | [
"MIT"
] | null | null | null | defmodule Ethyl.AstTransforms do
@moduledoc false
# functions that transform the AST
@special_form_macros Kernel.SpecialForms.__info__(:macros)
|> Enum.map(fn {func, _arity} -> func end)
|> Enum.uniq()
@operator_functions ~w[. / |>]a ++
(@sp... | 27.089506 | 83 | 0.633702 |
1d94136ca8cb265323a2231250f62b70a5cab993 | 75 | exs | Elixir | test/test_helper.exs | finderbar/telcofinder | 9995a14563218bb978bdde86eb8c19ab0dbbbf0c | [
"MIT"
] | null | null | null | test/test_helper.exs | finderbar/telcofinder | 9995a14563218bb978bdde86eb8c19ab0dbbbf0c | [
"MIT"
] | null | null | null | test/test_helper.exs | finderbar/telcofinder | 9995a14563218bb978bdde86eb8c19ab0dbbbf0c | [
"MIT"
] | null | null | null | ExUnit.start()
Ecto.Adapters.SQL.Sandbox.mode(Telcofinder.Repo, :manual)
| 15 | 57 | 0.773333 |
1d9432ef596871b0c276e6fee6996d1261e8f687 | 37,144 | exs | Elixir | apps/omg_watcher/test/omg_watcher/exit_processor/piggyback_test.exs | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | null | null | null | apps/omg_watcher/test/omg_watcher/exit_processor/piggyback_test.exs | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | null | null | null | apps/omg_watcher/test/omg_watcher/exit_processor/piggyback_test.exs | boolafish/elixir-omg | 46b568404972f6e4b4da3195d42d4fb622edb934 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019-2020 OmiseGO Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 42.841984 | 120 | 0.638407 |
1d9468ec5520f19be7399b06e261b7470c6acad3 | 714 | exs | Elixir | book/comprehension.exs | davidk01/elixir-playground | 35c36da32688efb80fc286f795d82a6a2e034e3f | [
"MIT"
] | null | null | null | book/comprehension.exs | davidk01/elixir-playground | 35c36da32688efb80fc286f795d82a6a2e034e3f | [
"MIT"
] | null | null | null | book/comprehension.exs | davidk01/elixir-playground | 35c36da32688efb80fc286f795d82a6a2e034e3f | [
"MIT"
] | null | null | null | tax_rates = [NC: 0.075, TX: 0.08]
orders = [[id: 123, ship_to: :NC, net_amount: 100.00], [id: 124, ship_to: :OK, net_amount: 35.50],
[id: 125, ship_to: :TX, net_amount: 24.00], [id: 126, ship_to: :TX, net_amount: 44.80],
[id: 127, ship_to: :NC, net_amount: 25.00], [id: 128, ship_to: :MA, net_amount: 10.00],
[id: ... | 42 | 98 | 0.647059 |
1d94991fdf8c962c88bc01bfbf1f6da123c15c08 | 1,054 | ex | Elixir | lib/neko_caffe_web/controllers/cat_controller.ex | kamiyuzu/neko_caffe | 84afd6559c89521ce95d27d65d2f0c3a88a92d11 | [
"MIT"
] | 2 | 2020-07-30T18:40:58.000Z | 2020-08-01T00:14:05.000Z | lib/neko_caffe_web/controllers/cat_controller.ex | kamiyuzu/neko_caffe | 84afd6559c89521ce95d27d65d2f0c3a88a92d11 | [
"MIT"
] | null | null | null | lib/neko_caffe_web/controllers/cat_controller.ex | kamiyuzu/neko_caffe | 84afd6559c89521ce95d27d65d2f0c3a88a92d11 | [
"MIT"
] | 1 | 2021-09-23T17:24:45.000Z | 2021-09-23T17:24:45.000Z | defmodule NekoCaffeWeb.CatController do
use NekoCaffeWeb, :controller
alias NekoCaffe.Pets
alias NekoCaffe.Pets.Cat
action_fallback NekoCaffeWeb.FallbackController
def index(conn, _params) do
cats = Pets.list_cats()
render(conn, "index.json", cats: cats)
end
def create(conn, %{"cat" => cat_par... | 23.954545 | 71 | 0.614801 |
1d94c2da601720faaa24151a78af1fc1776e6682 | 7,371 | exs | Elixir | .credo.exs | brianmay/robotica-elixir | 8656510e54b7e32a547e3a54bf946f0e327911c9 | [
"RSA-MD"
] | 1 | 2019-04-23T09:16:44.000Z | 2019-04-23T09:16:44.000Z | .credo.exs | brianmay/robotica-elixir | 8656510e54b7e32a547e3a54bf946f0e327911c9 | [
"RSA-MD"
] | 107 | 2019-05-26T08:03:26.000Z | 2022-02-03T19:13:56.000Z | .credo.exs | brianmay/robotica-elixir | 8656510e54b7e32a547e3a54bf946f0e327911c9 | [
"RSA-MD"
] | 1 | 2019-08-10T20:44:24.000Z | 2019-08-10T20:44:24.000Z | # 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 ... | 38.794737 | 97 | 0.614164 |
1d94c60d0071db1c7aced01a808bed5e1ce4f9cd | 1,243 | ex | Elixir | lib/code_corps/github/event/issues/changeset_builder.ex | superdev999/Phoenix-project | ab13ac9366cdd0aa9581da7faf993b11aaa5344c | [
"MIT"
] | null | null | null | lib/code_corps/github/event/issues/changeset_builder.ex | superdev999/Phoenix-project | ab13ac9366cdd0aa9581da7faf993b11aaa5344c | [
"MIT"
] | null | null | null | lib/code_corps/github/event/issues/changeset_builder.ex | superdev999/Phoenix-project | ab13ac9366cdd0aa9581da7faf993b11aaa5344c | [
"MIT"
] | null | null | null | defmodule CodeCorps.GitHub.Event.Issues.ChangesetBuilder do
@moduledoc ~S"""
In charge of building a `Changeset` to update a `Task` with, when handling an
Issues webhook.
"""
alias CodeCorps.{
GitHub.Event.Issues.StateMapper,
Services.MarkdownRendererService,
ProjectGithubRepo,
Task,
User... | 32.710526 | 85 | 0.711183 |
1d94c879a5263a271acd1b77ceb678eeb61913c1 | 1,045 | exs | Elixir | test/num_test.exs | NickNeck/prove | a3f48f8289f9a56dd57d22c58469227981c8ebb7 | [
"MIT"
] | null | null | null | test/num_test.exs | NickNeck/prove | a3f48f8289f9a56dd57d22c58469227981c8ebb7 | [
"MIT"
] | 2 | 2021-08-01T07:15:41.000Z | 2021-08-09T05:40:30.000Z | test/num_test.exs | hrzndhrn/prove | a3f48f8289f9a56dd57d22c58469227981c8ebb7 | [
"MIT"
] | null | null | null | defmodule NumTest do
use ExUnit.Case
import Prove
defmodule Num do
def check(0), do: :zero
def check(x) when is_integer(x) do
case rem(x, 2) do
0 -> :even
1 -> :odd
end
end
def check(_), do: :error
end
describe "check/1" do
prove Num.check(0) == :zero
... | 20.096154 | 52 | 0.548325 |
1d95453f3cda0418376459780afa8ca8c8b3e1f7 | 5,218 | ex | Elixir | lib/world.ex | Bajena/the-ray-tracer-challenge | 8b18405fbfadd247c888660adf0a542e4f2024cd | [
"MIT"
] | 3 | 2020-03-23T09:41:07.000Z | 2021-06-03T00:14:24.000Z | lib/world.ex | Bajena/the-ray-tracer-challenge | 8b18405fbfadd247c888660adf0a542e4f2024cd | [
"MIT"
] | 17 | 2020-03-14T11:54:59.000Z | 2020-06-21T20:01:29.000Z | lib/world.ex | Bajena/the-ray-tracer-challenge | 8b18405fbfadd247c888660adf0a542e4f2024cd | [
"MIT"
] | null | null | null | defmodule RayTracer.World do
@moduledoc """
This module defines world. World is a bag for elements like objects and light sources.
"""
alias RayTracer.Light
alias RayTracer.Sphere
alias RayTracer.Shape
alias RayTracer.Material
alias RayTracer.Transformations
alias RayTracer.RTuple
alias RayTracer.C... | 29.647727 | 123 | 0.667305 |
1d95640a6a03a15f2b0fea7a4ac0024ae3fdd03b | 1,033 | ex | Elixir | DeckOfCards-Elixir/lib/deck_of_cards/deck.ex | andrea-prearo/DeckOfCards | a163906a13da91e01ec9d986b97f533a3d0f889b | [
"MIT"
] | null | null | null | DeckOfCards-Elixir/lib/deck_of_cards/deck.ex | andrea-prearo/DeckOfCards | a163906a13da91e01ec9d986b97f533a3d0f889b | [
"MIT"
] | null | null | null | DeckOfCards-Elixir/lib/deck_of_cards/deck.ex | andrea-prearo/DeckOfCards | a163906a13da91e01ec9d986b97f533a3d0f889b | [
"MIT"
] | null | null | null | defmodule DeckOfCards.Deck do
alias DeckOfCards.Card
@type deck :: [Card]
defstruct [:remaining, :used]
def new do
remaining = for rank <- Card.ranks, suit <- Card.suits, do: %Card{suit: suit, rank: rank}
%{remaining: remaining, used: []}
end
def shuffle(%{remaining: remainin... | 27.918919 | 97 | 0.606002 |
1d959fb064ef603cde81a84755710c2ce4d5746f | 541 | ex | Elixir | test/support/factory.ex | 0nkery/paginator | a7369bc2ab47d46c0b9431fe1aa887a532f92c56 | [
"MIT"
] | 1 | 2021-09-17T14:58:46.000Z | 2021-09-17T14:58:46.000Z | test/support/factory.ex | 0nkery/paginator | a7369bc2ab47d46c0b9431fe1aa887a532f92c56 | [
"MIT"
] | null | null | null | test/support/factory.ex | 0nkery/paginator | a7369bc2ab47d46c0b9431fe1aa887a532f92c56 | [
"MIT"
] | 1 | 2019-04-02T09:21:57.000Z | 2019-04-02T09:21:57.000Z | defmodule Paginator.Factory do
use ExMachina.Ecto, repo: Paginator.Repo
alias Paginator.{Customer, Address, Payment}
def customer_factory do
%Customer{
name: "Bob",
active: true
}
end
def address_factory do
%Address{
city: "City name",
customer: build(:customer)
}
... | 18.033333 | 46 | 0.626617 |
1d95e83f630ac6bde7cb952dfb5e5395c30478e4 | 1,112 | exs | Elixir | mix.exs | thiamsantos/spr | c1db6c338543ecb9ec4d855d05a125a490c1606b | [
"Apache-2.0"
] | 15 | 2018-11-03T18:39:21.000Z | 2022-02-21T22:17:50.000Z | mix.exs | thiamsantos/spr | c1db6c338543ecb9ec4d855d05a125a490c1606b | [
"Apache-2.0"
] | 7 | 2018-10-21T16:36:58.000Z | 2018-10-25T00:56:05.000Z | mix.exs | thiamsantos/spr | c1db6c338543ecb9ec4d855d05a125a490c1606b | [
"Apache-2.0"
] | 3 | 2019-05-14T16:24:04.000Z | 2019-07-06T21:47:40.000Z | defmodule Srp.MixProject do
use Mix.Project
def project do
[
app: :srp,
version: "0.2.0",
elixir: "~> 1.6",
start_permanent: Mix.env() == :prod,
deps: deps(),
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [coveralls: :test, "coveralls.travis": :test, "coverall... | 22.24 | 96 | 0.553058 |
1d95ec9a88429231720da5d44ec17aab7ccf0820 | 1,320 | ex | Elixir | lib/bolt/cogs/action_group/delete.ex | CyberFlameGO/bolt | 225e6276983bec646e7f13519df066e8e1e770ed | [
"ISC"
] | null | null | null | lib/bolt/cogs/action_group/delete.ex | CyberFlameGO/bolt | 225e6276983bec646e7f13519df066e8e1e770ed | [
"ISC"
] | null | null | null | lib/bolt/cogs/action_group/delete.ex | CyberFlameGO/bolt | 225e6276983bec646e7f13519df066e8e1e770ed | [
"ISC"
] | null | null | null | defmodule Bolt.Cogs.ActionGroup.Delete do
@moduledoc false
@behaviour Nosedrum.Command
alias Bolt.Actions
alias Bolt.ErrorFormatters
alias Bolt.ModLog
alias Nosedrum.Predicates
alias Nostrum.Api
import Bolt.Humanizer, only: [human_user: 1]
@impl true
def usage, do: ["ag delete <name:str>"]
@im... | 24 | 84 | 0.656061 |
1d960fd9a012058519ee40aaa46313e6a99497a7 | 12,176 | ex | Elixir | lib/nostrum/struct/guild.ex | hopsor/nostrum | 954d697206791342ba627921a9aee27af072de60 | [
"MIT"
] | null | null | null | lib/nostrum/struct/guild.ex | hopsor/nostrum | 954d697206791342ba627921a9aee27af072de60 | [
"MIT"
] | null | null | null | lib/nostrum/struct/guild.ex | hopsor/nostrum | 954d697206791342ba627921a9aee27af072de60 | [
"MIT"
] | null | null | null | defmodule Nostrum.Struct.Guild do
# fields that are only sent on GUILD_CREATE
@guild_create_fields [
:joined_at,
:large,
:unavailable,
:member_count,
:voice_states,
:members,
:channels,
:guild_scheduled_events
]
@moduledoc """
Struct representing a Discord guild.
"""
alia... | 29.48184 | 95 | 0.63042 |
1d96107b6e3b01457662e84a68a5ca87903a19ce | 8,042 | ex | Elixir | clients/content/lib/google_api/content/v2/api/accountstatuses.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/api/accountstatuses.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/content/lib/google_api/content/v2/api/accountstatuses.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... | 42.550265 | 219 | 0.690002 |
1d9622f66777a4935a0337d28c5a94106673beb1 | 361 | ex | Elixir | test/support/expected_api_request.ex | koskoci/ticker-be | 95e6e7df1b8017d3180c17f881f7a1e36b728562 | [
"MIT"
] | null | null | null | test/support/expected_api_request.ex | koskoci/ticker-be | 95e6e7df1b8017d3180c17f881f7a1e36b728562 | [
"MIT"
] | null | null | null | test/support/expected_api_request.ex | koskoci/ticker-be | 95e6e7df1b8017d3180c17f881f7a1e36b728562 | [
"MIT"
] | null | null | null | defmodule TickerWeb.Support.ExpectedApiRequest do
def goog do
"""
https://api.worldtradingdata.com/api/v1/history?symbol=GOOG&sort=newest&api_token=TEST_KEY&date_from=2020-01-01\
"""
end
def logm do
"""
https://api.worldtradingdata.com/api/v1/history?symbol=LOGM&sort=newest&api_token=TEST_KEY... | 25.785714 | 116 | 0.714681 |
1d962ad79e0f6d3b4f672ac9a91987d1683426f9 | 345 | exs | Elixir | priv/repo/seeds.exs | juvet/otto | aee3b34029da0f8c232bc79e0febb5339fd3e22b | [
"MIT"
] | 1 | 2019-11-05T06:07:56.000Z | 2019-11-05T06:07:56.000Z | priv/repo/seeds.exs | juvet/otto | aee3b34029da0f8c232bc79e0febb5339fd3e22b | [
"MIT"
] | 2 | 2019-01-06T18:32:53.000Z | 2019-01-06T18:47:02.000Z | priv/repo/seeds.exs | juvet/otto | aee3b34029da0f8c232bc79e0febb5339fd3e22b | [
"MIT"
] | null | null | null | # Script for populating the database. You can run it as:
#
# mix run priv/repo/seeds.exs
#
# Inside the script, you can read and write to any of your
# repositories directly:
#
# Otto.Repo.insert!(%Otto.SomeSchema{})
#
# We recommend using the bang functions (`insert!`, `update!`
# and so on) as they will fail ... | 28.75 | 61 | 0.701449 |
1d965a7c9079035404a145b25f9b2b039969f69e | 3,541 | ex | Elixir | lib/chat_api/customers/customer.ex | ZmagoD/papercups | dff9a5822b809edc4fd8ecf198566f9b14ab613f | [
"MIT"
] | null | null | null | lib/chat_api/customers/customer.ex | ZmagoD/papercups | dff9a5822b809edc4fd8ecf198566f9b14ab613f | [
"MIT"
] | null | null | null | lib/chat_api/customers/customer.ex | ZmagoD/papercups | dff9a5822b809edc4fd8ecf198566f9b14ab613f | [
"MIT"
] | null | null | null | defmodule ChatApi.Customers.Customer do
use Ecto.Schema
import Ecto.Changeset
alias ChatApi.{
Accounts.Account,
Companies.Company,
Conversations.Conversation,
Issues.CustomerIssue,
Messages.Message,
Notes.Note,
Tags.CustomerTag
}
@type t :: %__MODULE__{
first_seen: any(... | 24.253425 | 67 | 0.576108 |
1d965b535e05670584c9636fbf2f658ce8900d80 | 863 | exs | Elixir | test/orders/order_test.exs | felipe-jm/ignite-elixir-exlivery | 107dd52088757cfdb4dbc940200ebded713ac710 | [
"MIT"
] | 1 | 2021-03-16T03:55:18.000Z | 2021-03-16T03:55:18.000Z | test/orders/order_test.exs | felipe-jm/ignite-elixir-exlivery | 107dd52088757cfdb4dbc940200ebded713ac710 | [
"MIT"
] | null | null | null | test/orders/order_test.exs | felipe-jm/ignite-elixir-exlivery | 107dd52088757cfdb4dbc940200ebded713ac710 | [
"MIT"
] | null | null | null | defmodule Exlivery.Orders.OrderTest do
use ExUnit.Case
alias Exlivery.Orders.Order
import Exlivery.Factory
describe "build/2" do
test "when all params are valid, returns an order" do
user = build(:user)
items = [
build(:item),
build(:item,
description: "Risoto com q... | 20.547619 | 67 | 0.606025 |
1d966592fe7d1edc5e59b12c046e09c94e0fb71e | 66 | exs | Elixir | test/test_helper.exs | aleDsz/bacen_sta | 372d05db8a1f2aa97bcec00b033481a9bc64f346 | [
"MIT"
] | 1 | 2021-11-28T21:52:29.000Z | 2021-11-28T21:52:29.000Z | test/test_helper.exs | aleDsz/bacen_sta | 372d05db8a1f2aa97bcec00b033481a9bc64f346 | [
"MIT"
] | 7 | 2021-11-18T00:39:23.000Z | 2022-03-24T08:25:46.000Z | test/test_helper.exs | aleDsz/bacen_sta | 372d05db8a1f2aa97bcec00b033481a9bc64f346 | [
"MIT"
] | null | null | null | {:ok, _} = Application.ensure_all_started(:timex)
ExUnit.start()
| 16.5 | 49 | 0.727273 |
1d96d534296c93e99d7385dc6efd96295d0dbc45 | 2,657 | exs | Elixir | mix.exs | media-io/ex_step_flow | 07b6fe98399836679728547319c55137a1b5c933 | [
"MIT"
] | 4 | 2019-12-07T05:18:26.000Z | 2020-11-06T23:28:43.000Z | mix.exs | media-io/ex_step_flow | 07b6fe98399836679728547319c55137a1b5c933 | [
"MIT"
] | 53 | 2020-01-06T11:23:09.000Z | 2021-06-25T15:30:07.000Z | mix.exs | media-io/ex_step_flow | 07b6fe98399836679728547319c55137a1b5c933 | [
"MIT"
] | 3 | 2020-01-30T15:37:40.000Z | 2020-10-27T14:10:02.000Z | defmodule StepFlow.MixProject do
use Mix.Project
@source_url "https://github.com/media-io/ex_step_flow"
def project do
[
app: :step_flow,
version: "0.2.12",
elixir: "~> 1.9",
start_permanent: Mix.env() == :prod,
deps: deps(),
test_coverage: [tool: ExCoveralls],
comp... | 22.905172 | 62 | 0.480617 |
1d96f38479543a7d73509e9b91f12d34f628da80 | 1,910 | ex | Elixir | test/support/test_data.ex | sealas/sealax | 3f11b7f649972a43f4812ea959bd2be2e0151baa | [
"MIT"
] | null | null | null | test/support/test_data.ex | sealas/sealax | 3f11b7f649972a43f4812ea959bd2be2e0151baa | [
"MIT"
] | 9 | 2021-08-19T01:09:55.000Z | 2022-03-08T01:18:45.000Z | test/support/test_data.ex | sealas/sealax | 3f11b7f649972a43f4812ea959bd2be2e0151baa | [
"MIT"
] | null | null | null | defmodule TestData do
alias Sealax.Repo
alias Sealax.Accounts.User
alias Sealax.Accounts.Account
alias Sealax.Accounts.Workspace
alias Sealax.Accounts.UserWorkspace
@default_account %{name: "Test Account", slug: "test_account"}
def default_account, do: @default_account
@default_user %{email: "defaul... | 32.931034 | 159 | 0.674346 |
1d97071d09258b2bd2775470286c6ba6c45c4882 | 71 | exs | Elixir | test/test_helper.exs | chenxsan/telegram-bot-for-twitter | 892107c7609123028ac2375342cd7b2329931635 | [
"MIT"
] | 14 | 2018-03-23T04:13:29.000Z | 2021-07-26T06:15:50.000Z | test/test_helper.exs | chenxsan/telegram-bot-for-twitter | 892107c7609123028ac2375342cd7b2329931635 | [
"MIT"
] | 2 | 2021-03-08T18:20:20.000Z | 2021-05-06T22:47:09.000Z | test/test_helper.exs | chenxsan/telegram-bot-for-twitter | 892107c7609123028ac2375342cd7b2329931635 | [
"MIT"
] | 3 | 2020-11-04T08:11:47.000Z | 2022-01-13T17:41:42.000Z | ExUnit.start()
Ecto.Adapters.SQL.Sandbox.mode(TweetBot.Repo, :manual)
| 17.75 | 54 | 0.774648 |
1d970c7b4f5668698a12e9a924aa7a93e459c738 | 285 | exs | Elixir | test/describe_adjustment_types_test.exs | jesseshieh/ex_aws_auto_scaling | 019be2f7f11e88c6301cc05b4be661ffe0fce208 | [
"MIT"
] | 1 | 2020-01-12T03:28:18.000Z | 2020-01-12T03:28:18.000Z | test/describe_adjustment_types_test.exs | jesseshieh/ex_aws_auto_scaling | 019be2f7f11e88c6301cc05b4be661ffe0fce208 | [
"MIT"
] | 1 | 2020-05-29T01:51:59.000Z | 2020-05-29T01:51:59.000Z | test/describe_adjustment_types_test.exs | jesseshieh/ex_aws_auto_scaling | 019be2f7f11e88c6301cc05b4be661ffe0fce208 | [
"MIT"
] | 2 | 2019-11-15T21:56:51.000Z | 2020-05-01T21:21:43.000Z | defmodule DescribeAdjustmentTypesTest do
use ExUnit.Case
test "simple describe" do
op = ExAws.AutoScaling.describe_adjustment_types()
assert op.params == %{
"Version" => "2011-01-01",
"Action" => "DescribeAdjustmentTypes"
}
end
end
| 21.923077 | 54 | 0.624561 |
1d97297684514f58d558ac40baa7b72c7e81de1b | 66,424 | ex | Elixir | clients/tool_results/lib/google_api/tool_results/v1beta3/api/projects.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/tool_results/lib/google_api/tool_results/v1beta3/api/projects.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/tool_results/lib/google_api/tool_results/v1beta3/api/projects.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... | 56.869863 | 1,350 | 0.704324 |
1d973615ce3fc5d9a3016ce5ea4f5ef5e1dd5f30 | 63 | ex | Elixir | lib/ex_user.ex | tumbudu/ExBanking | 4a0ff02100e43092f482855f763fdd0282f4a5b8 | [
"Apache-2.0"
] | null | null | null | lib/ex_user.ex | tumbudu/ExBanking | 4a0ff02100e43092f482855f763fdd0282f4a5b8 | [
"Apache-2.0"
] | null | null | null | lib/ex_user.ex | tumbudu/ExBanking | 4a0ff02100e43092f482855f763fdd0282f4a5b8 | [
"Apache-2.0"
] | null | null | null | defmodule ExUser do
defstruct name: nil, list_balance: []
end
| 15.75 | 38 | 0.761905 |
1d973a08ef55dc982f6857df1ee25d59a8a02a59 | 5,256 | exs | Elixir | apps/tai/test/tai/new_orders/create_test.exs | yurikoval/tai | 94254b45d22fa0307b01577ff7c629c7280c0295 | [
"MIT"
] | null | null | null | apps/tai/test/tai/new_orders/create_test.exs | yurikoval/tai | 94254b45d22fa0307b01577ff7c629c7280c0295 | [
"MIT"
] | 78 | 2020-10-12T06:21:43.000Z | 2022-03-28T09:02:00.000Z | apps/tai/test/tai/new_orders/create_test.exs | yurikoval/tai | 94254b45d22fa0307b01577ff7c629c7280c0295 | [
"MIT"
] | null | null | null | defmodule Tai.NewOrders.CreateTest do
use Tai.TestSupport.DataCase, async: false
alias Tai.NewOrders
@venue_order_id "df8e6bd0-a40a-42fb-8fea-b33ef4e34f14"
@venue :venue_a
@credential :main
@credentials Map.put(%{}, @credential, %{})
@submission_attrs %{
venue: @venue |> Atom.to_string(),
credent... | 29.694915 | 127 | 0.658105 |
1d97846d685653d9c8aae493ef79df40e6ff5972 | 8,390 | exs | Elixir | test/pow/store/credentials_cache_test.exs | iboard/pow | 744b29863e69e0cd42af20d44eea0b04cef89fcb | [
"MIT"
] | null | null | null | test/pow/store/credentials_cache_test.exs | iboard/pow | 744b29863e69e0cd42af20d44eea0b04cef89fcb | [
"MIT"
] | null | null | null | test/pow/store/credentials_cache_test.exs | iboard/pow | 744b29863e69e0cd42af20d44eea0b04cef89fcb | [
"MIT"
] | null | null | null | defmodule Pow.Store.CredentialsCacheTest do
use ExUnit.Case
doctest Pow.Store.CredentialsCache
alias Pow.Store.{Backend.EtsCache, CredentialsCache}
alias Pow.Test.Ecto.Users.{User, UsernameUser}
alias Pow.Test.EtsCacheMock
@config [backend: EtsCacheMock]
@backend_config [namespace: "credentials"]
set... | 37.963801 | 215 | 0.66615 |
1d979337c07afab9529f62dd3568e7bd099c0cd0 | 1,217 | exs | Elixir | config/config.exs | ScrimpyCat/ResxHTTP | 0b6b17bb8415176e4d74c617574af2e3c405b88e | [
"BSD-2-Clause"
] | null | null | null | config/config.exs | ScrimpyCat/ResxHTTP | 0b6b17bb8415176e4d74c617574af2e3c405b88e | [
"BSD-2-Clause"
] | null | null | null | config/config.exs | ScrimpyCat/ResxHTTP | 0b6b17bb8415176e4d74c617574af2e3c405b88e | [
"BSD-2-Clause"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the paren... | 34.771429 | 73 | 0.750205 |
1d97d3cfc4497c0874cc05145455b3cf0ced2b89 | 970 | exs | Elixir | test/crit_biz/view_models/reservation/calendar_entry_test.exs | brownt23/crit19 | c45c7b3ae580c193168d83144da0eeb9bc91c8a9 | [
"MIT"
] | 6 | 2019-07-16T19:31:23.000Z | 2021-06-05T19:01:05.000Z | test/crit_biz/view_models/reservation/calendar_entry_test.exs | brownt23/crit19 | c45c7b3ae580c193168d83144da0eeb9bc91c8a9 | [
"MIT"
] | null | null | null | test/crit_biz/view_models/reservation/calendar_entry_test.exs | brownt23/crit19 | c45c7b3ae580c193168d83144da0eeb9bc91c8a9 | [
"MIT"
] | 3 | 2020-02-24T23:38:27.000Z | 2020-08-01T23:50:17.000Z | defmodule CritBiz.ViewModels.Reservation.CalendarEntryTest do
use Crit.DataCase
alias CritBiz.ViewModels.Reservation.CalendarEntry
alias Crit.Reservations.ReservationApi
alias Crit.Exemplars.ReservationFocused
test "conversion" do
reservation = ReservationFocused.reserved!(@bovine_id,
["jeff", "bos... | 33.448276 | 61 | 0.635052 |
1d97e8812c9c8bd351132dbfebca923efdebaddf | 6,502 | ex | Elixir | lib/elixlsx/util.ex | leandrocp/elixlsx | df235284306d33becf4d6090b901c10422c237f0 | [
"MIT"
] | 215 | 2015-11-24T09:11:30.000Z | 2022-02-08T13:38:22.000Z | lib/elixlsx/util.ex | leandrocp/elixlsx | df235284306d33becf4d6090b901c10422c237f0 | [
"MIT"
] | 90 | 2016-06-06T13:00:06.000Z | 2022-03-30T21:09:50.000Z | lib/elixlsx/util.ex | leandrocp/elixlsx | df235284306d33becf4d6090b901c10422c237f0 | [
"MIT"
] | 92 | 2016-01-06T14:45:28.000Z | 2022-03-16T12:29:58.000Z | defmodule Elixlsx.Util do
alias Elixlsx.XML
@col_alphabet Enum.to_list(?A..?Z)
@doc ~S"""
Returns the column letter(s) associated with a column index.
Col idx starts at 1.
## Examples
iex> encode_col(1)
"A"
iex> encode_col(28)
"AB"
"""
@spec encode_col(non_neg_integer) :: S... | 24.911877 | 94 | 0.621347 |
1d97ed5b8ccb66f3cba4be6865c1bfc2e556b15f | 6,177 | ex | Elixir | lib/cassandrax/query.ex | kiik/cassandrax | b8e952a3064169bbdbbd421f52239649754f93bb | [
"MIT"
] | 19 | 2020-12-08T18:35:45.000Z | 2022-03-31T08:20:45.000Z | lib/cassandrax/query.ex | kiik/cassandrax | b8e952a3064169bbdbbd421f52239649754f93bb | [
"MIT"
] | 5 | 2020-12-03T16:22:44.000Z | 2022-01-22T21:02:10.000Z | lib/cassandrax/query.ex | kiik/cassandrax | b8e952a3064169bbdbbd421f52239649754f93bb | [
"MIT"
] | 2 | 2021-05-01T10:15:47.000Z | 2022-02-25T23:55:50.000Z | defmodule Cassandrax.Query do
@moduledoc """
Provides the query macros.
Queries are used to retrieve or manipulate data from a repository (see Cassandrax.Keyspace).
"""
alias Cassandrax.Query.Builder
@type t :: %__MODULE__{}
@limit_default 100
@per_partition_limit_default 100
defstruct schema:... | 32.340314 | 249 | 0.665533 |
1d97f1af47f7b2794fc8f51029e398639dcd18bd | 2,149 | ex | Elixir | lib/statistics/distributions/chisq.ex | alanvardy/elixir-statistics | 21a923bbf84a3e71a133868abe5d3610864b130e | [
"Apache-2.0"
] | 118 | 2015-03-31T18:57:57.000Z | 2022-02-25T18:14:06.000Z | lib/statistics/distributions/chisq.ex | alanvardy/elixir-statistics | 21a923bbf84a3e71a133868abe5d3610864b130e | [
"Apache-2.0"
] | 13 | 2015-08-10T14:28:27.000Z | 2021-11-23T06:44:40.000Z | lib/statistics/distributions/chisq.ex | alanvardy/elixir-statistics | 21a923bbf84a3e71a133868abe5d3610864b130e | [
"Apache-2.0"
] | 32 | 2015-06-01T01:50:20.000Z | 2021-11-19T16:00:44.000Z | defmodule Statistics.Distributions.Chisq do
alias Statistics.Math
alias Statistics.Math.Functions
@moduledoc """
Chi square distribution.
Takes a *degrees of freedom* parameter.
"""
@doc """
The probability density function
## Examples
iex> Statistics.Distributions.Chisq.pdf(1).(2)
0.... | 19.536364 | 88 | 0.618427 |
1d980d06fb035bcb229dd765adbaed253bb522d2 | 1,682 | ex | Elixir | lib/game_of_life/board_server.ex | xing/game_of_life | ee35f9c65fd3e70b69d3f2e9a88546ee66e803c8 | [
"MIT"
] | null | null | null | lib/game_of_life/board_server.ex | xing/game_of_life | ee35f9c65fd3e70b69d3f2e9a88546ee66e803c8 | [
"MIT"
] | null | null | null | lib/game_of_life/board_server.ex | xing/game_of_life | ee35f9c65fd3e70b69d3f2e9a88546ee66e803c8 | [
"MIT"
] | null | null | null | defmodule GameOfLife.BoardServer do
alias GameOfLife.Board, as: Board
alias GameOfLife.PatternLoader, as: PatternLoader
use GenServer
defstruct board: %Board{}
def start_link(origin, board_size, opts \\ []) do
density = Keyword.get(opts, :density, 50)
pattern = Keyword.get(opts, :pattern, :random)
... | 33.64 | 116 | 0.739001 |
1d981088e747168be3fd444c6978fc10dd2f2580 | 221 | exs | Elixir | config/dev.exs | JVZELLER/sistema-financeiro | 98ed39019219f5c0065912fe3be2f9e33e10cf41 | [
"MIT"
] | 2 | 2020-04-01T02:35:59.000Z | 2021-07-26T05:21:01.000Z | config/test.exs | JVZELLER/sistema-financeiro | 98ed39019219f5c0065912fe3be2f9e33e10cf41 | [
"MIT"
] | null | null | null | config/test.exs | JVZELLER/sistema-financeiro | 98ed39019219f5c0065912fe3be2f9e33e10cf41 | [
"MIT"
] | null | null | null | import Config
config :sistema_financeiro,
account_database: Repository.Account.InMemoryDatabase,
currency_database: Repository.Currency.InMemoryDatabase,
exchange_database: Repository.ExchangeRate.InMemoryDatabase
| 31.571429 | 61 | 0.864253 |
1d982cbd39c1e598dfe7a46089c4e2731afdb5f6 | 3,971 | ex | Elixir | lib/kino/frame.ex | cristineguadelupe/kino | 65348f632c5753d543cd16ff1357d06808b6a4a3 | [
"Apache-2.0"
] | null | null | null | lib/kino/frame.ex | cristineguadelupe/kino | 65348f632c5753d543cd16ff1357d06808b6a4a3 | [
"Apache-2.0"
] | null | null | null | lib/kino/frame.ex | cristineguadelupe/kino | 65348f632c5753d543cd16ff1357d06808b6a4a3 | [
"Apache-2.0"
] | null | null | null | defmodule Kino.Frame do
@moduledoc """
A placeholder for outputs.
A frame wraps outputs that can be dynamically updated at
any time.
Also see `Kino.animate/3` which offers a convenience on
top of this kino.
## Examples
frame = Kino.Frame.new() |> Kino.render()
for i <- 1..100 do
K... | 24.512346 | 92 | 0.641904 |
1d983b3d65abbe357aa52ba0370d6339fff07e21 | 2,942 | exs | Elixir | test/changelog_web/controllers/feed_controller_test.exs | theafricanengineer/changelog.com | 4954d0df516c0a325667ec6c1fbbf02d68c9b953 | [
"MIT"
] | null | null | null | test/changelog_web/controllers/feed_controller_test.exs | theafricanengineer/changelog.com | 4954d0df516c0a325667ec6c1fbbf02d68c9b953 | [
"MIT"
] | null | null | null | test/changelog_web/controllers/feed_controller_test.exs | theafricanengineer/changelog.com | 4954d0df516c0a325667ec6c1fbbf02d68c9b953 | [
"MIT"
] | null | null | null | defmodule ChangelogWeb.FeedControllerTest do
use ChangelogWeb.ConnCase
alias ChangelogWeb.NewsItemView
test "the sitemap", %{conn: conn} do
post = insert(:published_post)
podcast = insert(:podcast)
episode = insert(:published_episode)
topic = insert(:topic)
news_source = insert(:news_source)... | 29.42 | 67 | 0.671992 |
1d98464114793b642f941a4a15112410b6e7c89e | 610 | exs | Elixir | apps/graphql/test/test_helper.exs | michaeljguarino/forge | 50ee583ecb4aad5dee4ef08fce29a8eaed1a0824 | [
"Apache-2.0"
] | null | null | null | apps/graphql/test/test_helper.exs | michaeljguarino/forge | 50ee583ecb4aad5dee4ef08fce29a8eaed1a0824 | [
"Apache-2.0"
] | 2 | 2019-12-13T23:55:50.000Z | 2019-12-17T05:49:58.000Z | apps/graphql/test/test_helper.exs | michaeljguarino/chartmart | a34c949cc29d6a1ab91c04c5e4f797e6f0daabfc | [
"Apache-2.0"
] | null | null | null | Mimic.copy(Mojito)
Mimic.copy(HTTPoison)
Mimic.copy(Stripe.Connect.OAuth)
Mimic.copy(Stripe.Customer)
Mimic.copy(Stripe.Plan)
Mimic.copy(Stripe.Token)
Mimic.copy(Stripe.Subscription)
Mimic.copy(Stripe.SubscriptionItem)
Mimic.copy(Stripe.Invoice)
Mimic.copy(Stripe.Card)
Mimic.copy(Cloudflare.DnsRecord)
Mimic.copy(Core.S... | 26.521739 | 60 | 0.818033 |
1d98ad4f99ec0faddaaa2613afec2b8793456afd | 1,380 | ex | Elixir | lib/newway/schema/wallet.ex | rbkmoney/pathfinder | fdb3102f524b6f58cba579389047b425fdbd4c92 | [
"Apache-2.0"
] | null | null | null | lib/newway/schema/wallet.ex | rbkmoney/pathfinder | fdb3102f524b6f58cba579389047b425fdbd4c92 | [
"Apache-2.0"
] | null | null | null | lib/newway/schema/wallet.ex | rbkmoney/pathfinder | fdb3102f524b6f58cba579389047b425fdbd4c92 | [
"Apache-2.0"
] | 1 | 2021-12-07T09:25:32.000Z | 2021-12-07T09:25:32.000Z | defmodule NewWay.Schema.Wallet do
use Ecto.Schema
use NewWay.Schema, search_field: :wallet_id
@type t :: Ecto.Schema.t
@schema_prefix "nw"
schema "wallet" do
field(:event_created_at, :utc_datetime)
field(:event_occured_at, :utc_datetime)
field(:sequence_id, :integer)
field(:... | 28.75 | 66 | 0.63913 |
1d98bf9d6bf4abf9f080abd66e977da820b4418d | 1,588 | ex | Elixir | lib/essence.ex | nicbet/essence | f3371c33839d4db00020181c9ec980d449d2a00b | [
"MIT"
] | 68 | 2016-09-10T20:04:37.000Z | 2022-03-16T14:53:27.000Z | lib/essence.ex | nicbet/essence | f3371c33839d4db00020181c9ec980d449d2a00b | [
"MIT"
] | 1 | 2018-02-14T20:22:45.000Z | 2018-02-14T20:22:45.000Z | lib/essence.ex | nicbet/essence | f3371c33839d4db00020181c9ec980d449d2a00b | [
"MIT"
] | 8 | 2017-02-11T19:28:56.000Z | 2021-04-13T08:07:55.000Z | defmodule Essence do
@moduledoc """
Essence is a Natural Language Processing and Text Summarization
Library for Elixir.
"""
@doc """
The `read_file` method reads a plain-text file from a given `filename`
and returns a UTF-8 encoded bitstring representation of the text.
"""
def read_file(filename) do
... | 27.859649 | 75 | 0.710957 |
1d9968cee8eec715a1507274a6b038488fd237ce | 4,680 | ex | Elixir | clients/app_engine/lib/google_api/app_engine/v1/model/automatic_scaling.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/app_engine/lib/google_api/app_engine/v1/model/automatic_scaling.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/app_engine/lib/google_api/app_engine/v1/model/automatic_scaling.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"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... | 55.714286 | 257 | 0.755342 |
1d996960f90c6a58200dabf7a0d40541e063a13a | 1,418 | ex | Elixir | clients/container/lib/google_api/container/v1/model/dns_cache_config.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/container/lib/google_api/container/v1/model/dns_cache_config.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/container/lib/google_api/container/v1/model/dns_cache_config.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... | 30.170213 | 113 | 0.739069 |
1d996b997cf410c051de032378f13e3199f6a425 | 1,555 | ex | Elixir | app/lib/hobby_dapp_web/views/error_helpers.ex | irisTa56/hobby_dapp | 5738995f4f68202aeb50df7fd23fd5c6b84ee244 | [
"MIT"
] | null | null | null | app/lib/hobby_dapp_web/views/error_helpers.ex | irisTa56/hobby_dapp | 5738995f4f68202aeb50df7fd23fd5c6b84ee244 | [
"MIT"
] | null | null | null | app/lib/hobby_dapp_web/views/error_helpers.ex | irisTa56/hobby_dapp | 5738995f4f68202aeb50df7fd23fd5c6b84ee244 | [
"MIT"
] | null | null | null | defmodule HobbyDappWeb.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_ta... | 32.395833 | 78 | 0.666881 |
1d997e9883e94b757ac5bc35ea70a3e6cc5000d2 | 2,184 | ex | Elixir | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1beta2_text_annotation.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1beta2_text_annotation.ex | linjunpop/elixir-google-api | 444cb2b2fb02726894535461a474beddd8b86db4 | [
"Apache-2.0"
] | null | null | null | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1beta2_text_annotation.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... | 34.125 | 163 | 0.751374 |
1d998d61908af1cb9075f36b47345d443df04ead | 1,872 | ex | Elixir | lib/xtb_client/messages/tick_prices.ex | dsienkiewicz/xtb_client_ex | 550f1144eace28ce9bdb2fa3bcc27e891231487b | [
"MIT"
] | null | null | null | lib/xtb_client/messages/tick_prices.ex | dsienkiewicz/xtb_client_ex | 550f1144eace28ce9bdb2fa3bcc27e891231487b | [
"MIT"
] | null | null | null | lib/xtb_client/messages/tick_prices.ex | dsienkiewicz/xtb_client_ex | 550f1144eace28ce9bdb2fa3bcc27e891231487b | [
"MIT"
] | null | null | null | defmodule XtbClient.Messages.TickPrices do
defmodule Query do
@moduledoc """
Info about the query for tick prices.
## Parameters
- `level` price level (possible values of level field: -1 => all levels, 0 => base level bid and ask price for instrument, >0 => specified level),
- `symbols` array... | 24.631579 | 219 | 0.606303 |
1d99a393b0d2b0e75e895c72100c5893d51b63c5 | 969 | ex | Elixir | apps/tai/lib/tai/iex/commands/fees.ex | ccamateur/tai | 41c4b3e09dafc77987fa3f6b300c15461d981e16 | [
"MIT"
] | 276 | 2018-01-16T06:36:06.000Z | 2021-03-20T21:48:01.000Z | apps/tai/lib/tai/iex/commands/fees.ex | ccamateur/tai | 41c4b3e09dafc77987fa3f6b300c15461d981e16 | [
"MIT"
] | 78 | 2020-10-12T06:21:43.000Z | 2022-03-28T09:02:00.000Z | apps/tai/lib/tai/iex/commands/fees.ex | yurikoval/tai | 94254b45d22fa0307b01577ff7c629c7280c0295 | [
"MIT"
] | 43 | 2018-06-09T09:54:51.000Z | 2021-03-07T07:35:17.000Z | defmodule Tai.IEx.Commands.Fees do
@moduledoc """
Display the list of maker/taker fees for tradable products
"""
import Tai.IEx.Commands.Table, only: [render!: 2]
@header [
"Venue",
"Credential",
"Symbol",
"Maker",
"Taker"
]
@spec fees :: no_return
def fees do
Tai.Commander.fe... | 17.618182 | 60 | 0.569659 |
1d99da519a9f3187e1b94f02854b472b25752916 | 1,000 | ex | Elixir | lib/duckphoenix.ex | Dania02525/duckphoenix | a998d7987231b1488c5ee87a63358cb0981f9356 | [
"MIT"
] | 1 | 2018-02-09T13:29:32.000Z | 2018-02-09T13:29:32.000Z | lib/duckphoenix.ex | Dania02525/duckphoenix | a998d7987231b1488c5ee87a63358cb0981f9356 | [
"MIT"
] | null | null | null | lib/duckphoenix.ex | Dania02525/duckphoenix | a998d7987231b1488c5ee87a63358cb0981f9356 | [
"MIT"
] | null | null | null | defmodule Duckphoenix do
use Application
# See http://elixir-lang.org/docs/stable/elixir/Application.html
# for more information on OTP Applications
def start(_type, _args) do
import Supervisor.Spec, warn: false
children = [
# Start the endpoint when the application starts
supervisor(Duckp... | 32.258065 | 71 | 0.718 |
1d99dc5e4ce14c4a2a76b422223c05dacf0daad3 | 1,944 | ex | Elixir | clients/proximity_beacon/lib/google_api/proximity_beacon/v1beta1/model/advertised_id.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/proximity_beacon/lib/google_api/proximity_beacon/v1beta1/model/advertised_id.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/proximity_beacon/lib/google_api/proximity_beacon/v1beta1/model/advertised_id.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 34.714286 | 126 | 0.721708 |
1d99f19d04738c38a0a27fb576ac86652185cbdd | 6,492 | exs | Elixir | test/repo/autogenerate_test.exs | yorunoR/mongo_ecto | 70309dcf45690154a6979defed69a33d9f87fa3b | [
"MIT"
] | null | null | null | test/repo/autogenerate_test.exs | yorunoR/mongo_ecto | 70309dcf45690154a6979defed69a33d9f87fa3b | [
"MIT"
] | null | null | null | test/repo/autogenerate_test.exs | yorunoR/mongo_ecto | 70309dcf45690154a6979defed69a33d9f87fa3b | [
"MIT"
] | null | null | null | defmodule MongoEcto.Repo.AutogenerateTest do
require MongoEcto.Repo, as: TestRepo
use ExUnit.Case, async: true
defmodule Account do
use Ecto.Schema
use MongoEcto.Model, :model
@collection_name "accounts"
@primary_key {:id, :binary_id, autogenerate: true}
embedded_s... | 39.585366 | 96 | 0.651263 |
1d99f1f5e0799b6ae62a75e6c457aa99468978e9 | 19,774 | ex | Elixir | lib/logger/lib/logger/translator.ex | doughsay/elixir | 7356a47047d0b54517bd6886603f09b1121dde2b | [
"Apache-2.0"
] | 19,291 | 2015-01-01T02:42:49.000Z | 2022-03-31T21:01:40.000Z | lib/logger/lib/logger/translator.ex | doughsay/elixir | 7356a47047d0b54517bd6886603f09b1121dde2b | [
"Apache-2.0"
] | 8,082 | 2015-01-01T04:16:23.000Z | 2022-03-31T22:08:02.000Z | lib/logger/lib/logger/translator.ex | doughsay/elixir | 7356a47047d0b54517bd6886603f09b1121dde2b | [
"Apache-2.0"
] | 3,472 | 2015-01-03T04:11:56.000Z | 2022-03-29T02:07:30.000Z | defmodule Logger.Translator do
@moduledoc """
Default translation for Erlang log messages.
Logger allows developers to rewrite log messages provided by
OTP applications into a format more compatible with Elixir
log messages by providing a translator.
A translator is simply a tuple containing a module and ... | 31.893548 | 99 | 0.633812 |
1d9a1f52486fc088dda594a8551300339efa26b2 | 22,138 | exs | Elixir | lib/elixir/test/elixir/uri_test.exs | LaudateCorpus1/elixir | b131f874640775fdf08707d5b2fbbc1e91722cd0 | [
"Apache-2.0"
] | 2 | 2021-11-10T01:18:14.000Z | 2021-11-10T01:35:54.000Z | lib/elixir/test/elixir/uri_test.exs | LaudateCorpus1/elixir | b131f874640775fdf08707d5b2fbbc1e91722cd0 | [
"Apache-2.0"
] | null | null | null | lib/elixir/test/elixir/uri_test.exs | LaudateCorpus1/elixir | b131f874640775fdf08707d5b2fbbc1e91722cd0 | [
"Apache-2.0"
] | 1 | 2020-12-18T19:20:35.000Z | 2020-12-18T19:20:35.000Z | Code.require_file("test_helper.exs", __DIR__)
defmodule URITest do
use ExUnit.Case, async: true
doctest URI
test "encode/1,2" do
assert URI.encode("4_test.is-s~") == "4_test.is-s~"
assert URI.encode("\r\n&<%>\" ゆ", &URI.char_unreserved?/1) ==
"%0D%0A%26%3C%25%3E%22%20%E3%82%86"
end
t... | 33.24024 | 98 | 0.567847 |
1d9a2add3b6d8e1fd63ad47aaee6f74c9fd7fef6 | 85 | ex | Elixir | web/views/layout_view.ex | praveenperera/phoenix-dokku-example | fc4bfe98e016dfe6eb1f74449b3a8d292dbce137 | [
"MIT"
] | 1 | 2015-10-05T20:58:46.000Z | 2015-10-05T20:58:46.000Z | web/views/layout_view.ex | praveenperera/phoenix-dokku-example | fc4bfe98e016dfe6eb1f74449b3a8d292dbce137 | [
"MIT"
] | null | null | null | web/views/layout_view.ex | praveenperera/phoenix-dokku-example | fc4bfe98e016dfe6eb1f74449b3a8d292dbce137 | [
"MIT"
] | null | null | null | defmodule PhoenixDokkuExample.LayoutView do
use PhoenixDokkuExample.Web, :view
end
| 21.25 | 43 | 0.847059 |
1d9a4c8345d546d2fcc0bd06a888e9736a0d5e77 | 1,731 | ex | Elixir | lib/keep/router.ex | hpopp/keep | 376cc6e286d1b3b93eb6c22b33a993ea6b25af8c | [
"MIT"
] | 3 | 2020-08-05T13:26:30.000Z | 2021-05-26T14:24:36.000Z | lib/keep/router.ex | hpopp/keep | 376cc6e286d1b3b93eb6c22b33a993ea6b25af8c | [
"MIT"
] | null | null | null | lib/keep/router.ex | hpopp/keep | 376cc6e286d1b3b93eb6c22b33a993ea6b25af8c | [
"MIT"
] | null | null | null | defmodule Keep.Router do
use Plug.Router
alias Keep.Store
plug(Plug.RequestId)
plug(Plug.Logger)
plug(Plug.MethodOverride)
plug(Plug.Head)
plug(:match)
plug(:dispatch)
get "/healthz" do
send_resp(conn, 200, ~s({"status": "ok"}))
end
get "/data/:id" do
case Store.get(id) do
:err... | 20.855422 | 70 | 0.566724 |
1d9a57c78cb4a684737f6596ded1828ecefda6d8 | 666 | ex | Elixir | lib/cadet/courses/sourcecast_upload.ex | source-academy/cadet | c447552453f78799755de73f66999e4c9d20383c | [
"Apache-2.0"
] | 27 | 2018-01-20T05:56:24.000Z | 2021-05-24T03:21:55.000Z | lib/cadet/courses/sourcecast_upload.ex | source-academy/cadet | c447552453f78799755de73f66999e4c9d20383c | [
"Apache-2.0"
] | 731 | 2018-04-16T13:25:49.000Z | 2021-06-22T07:16:12.000Z | lib/cadet/courses/sourcecast_upload.ex | source-academy/cadet | c447552453f78799755de73f66999e4c9d20383c | [
"Apache-2.0"
] | 43 | 2018-01-20T06:35:46.000Z | 2021-05-05T03:22:35.000Z | defmodule Cadet.Courses.SourcecastUpload do
@moduledoc """
Represents an uploaded file for Sourcecast
"""
use Arc.Definition
use Arc.Ecto.Definition
@extension_whitelist ~w(.wav)
@versions [:original]
# coveralls-ignore-start
def bucket, do: :cadet |> Application.fetch_env!(:uploader) |> Keyword.get... | 23.785714 | 97 | 0.689189 |
1d9a5ecc3611df908402ba6cd504e52fc1672ffc | 633 | exs | Elixir | nth-prime/nth_prime_test.exs | nickpellant/xelixir | 6e27dc7083ef3e423a1615f5151910672e6397a8 | [
"MIT"
] | null | null | null | nth-prime/nth_prime_test.exs | nickpellant/xelixir | 6e27dc7083ef3e423a1615f5151910672e6397a8 | [
"MIT"
] | null | null | null | nth-prime/nth_prime_test.exs | nickpellant/xelixir | 6e27dc7083ef3e423a1615f5151910672e6397a8 | [
"MIT"
] | null | null | null | if System.get_env("EXERCISM_TEST_EXAMPLES") do
Code.load_file("example.exs")
else
Code.load_file("nth_prime.exs")
end
ExUnit.start
ExUnit.configure exclude: :pending, trace: true
defmodule NthPrimeTest do
use ExUnit.Case, async: true
# @tag :pending
test "first prime" do
assert Prime.nth(1) == 2
end
... | 16.657895 | 47 | 0.671406 |
1d9a663eb8767d8ddc560545c7f5c9758029c496 | 1,482 | exs | Elixir | bench/encode_integer.exs | xinz/crockford_base32 | 28e8e231a10db82ba8fd7cb3c93ccd87c739f331 | [
"MIT"
] | null | null | null | bench/encode_integer.exs | xinz/crockford_base32 | 28e8e231a10db82ba8fd7cb3c93ccd87c739f331 | [
"MIT"
] | null | null | null | bench/encode_integer.exs | xinz/crockford_base32 | 28e8e231a10db82ba8fd7cb3c93ccd87c739f331 | [
"MIT"
] | null | null | null | Benchee.run(
%{
"self encode small int" => fn -> CrockfordBase32.encode(1234) end,
"other encode small int" => fn -> Base32Crockford.encode(1234) end
},
print: [fast_warning: false]
)
Benchee.run(
%{
"self encode small int with checksum" => fn -> CrockfordBase32.encode(1234, checksum: true) end,
... | 34.465116 | 111 | 0.688259 |
1d9aaed6d765a303d0fc615a9aafe6fb027371c1 | 407 | ex | Elixir | lib/policr_mini/businesses/message_snapshot_message_business.ex | gchengyu/policr-mini | 5acd7d6609fcaea2dbd7276fa01ca334ef9f6e6a | [
"MIT"
] | null | null | null | lib/policr_mini/businesses/message_snapshot_message_business.ex | gchengyu/policr-mini | 5acd7d6609fcaea2dbd7276fa01ca334ef9f6e6a | [
"MIT"
] | null | null | null | lib/policr_mini/businesses/message_snapshot_message_business.ex | gchengyu/policr-mini | 5acd7d6609fcaea2dbd7276fa01ca334ef9f6e6a | [
"MIT"
] | null | null | null | defmodule PolicrMini.MessageSnapshotBusiness do
@moduledoc """
消息快照的业务功能实现。
"""
use PolicrMini, business: PolicrMini.Schemas.MessageSnapshot
def create(params) do
%MessageSnapshot{} |> MessageSnapshot.changeset(params) |> Repo.insert()
end
def update(%MessageSnapshot{} = message_snapshot, params) d... | 25.4375 | 76 | 0.742015 |
1d9ad72e64a286150dac7aaec086f6773bf4903a | 56 | ex | Elixir | web/views/tekst_view.ex | ench0/ex_elasr | a97e182d13bc5de56c370b687771a485e51fc6ea | [
"MIT"
] | null | null | null | web/views/tekst_view.ex | ench0/ex_elasr | a97e182d13bc5de56c370b687771a485e51fc6ea | [
"MIT"
] | null | null | null | web/views/tekst_view.ex | ench0/ex_elasr | a97e182d13bc5de56c370b687771a485e51fc6ea | [
"MIT"
] | null | null | null | defmodule Elasr.TekstView do
use Elasr.Web, :view
end
| 14 | 28 | 0.767857 |
1d9aebb0e9476c36c19484e8cafcb7d2e2bacbef | 1,559 | ex | Elixir | clients/tool_results/lib/google_api/tool_results/v1beta3/model/cpu_info.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/tool_results/lib/google_api/tool_results/v1beta3/model/cpu_info.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/tool_results/lib/google_api/tool_results/v1beta3/model/cpu_info.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | 1 | 2018-07-28T20:50:50.000Z | 2018-07-28T20:50:50.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 31.18 | 129 | 0.742784 |
1d9b07b29613afdc5873cbc6fa34ded0c95126e8 | 1,939 | ex | Elixir | lib/aws/generated/personalize_runtime.ex | qyon-brazil/aws-elixir | f7f21bebffc6776f95ffe9ef563cf368773438af | [
"Apache-2.0"
] | null | null | null | lib/aws/generated/personalize_runtime.ex | qyon-brazil/aws-elixir | f7f21bebffc6776f95ffe9ef563cf368773438af | [
"Apache-2.0"
] | null | null | null | lib/aws/generated/personalize_runtime.ex | qyon-brazil/aws-elixir | f7f21bebffc6776f95ffe9ef563cf368773438af | [
"Apache-2.0"
] | 1 | 2020-10-28T08:56:54.000Z | 2020-10-28T08:56:54.000Z | # WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
# See https://github.com/aws-beam/aws-codegen for more details.
defmodule AWS.PersonalizeRuntime do
alias AWS.Client
alias AWS.Request
def metadata do
%AWS.ServiceMetadata{
abbreviation: nil,
api_version: "2018-05-22",
content_type: "application... | 23.938272 | 81 | 0.650851 |
1d9b0b89d734a5e16fc9e08c90dcf9278b5e1715 | 14,922 | exs | Elixir | test/scenic/driver_test.exs | bruceme/scenic | bd8a1e63c122c44cc263e1fb5dfab2547ce8ef43 | [
"Apache-2.0"
] | null | null | null | test/scenic/driver_test.exs | bruceme/scenic | bd8a1e63c122c44cc263e1fb5dfab2547ce8ef43 | [
"Apache-2.0"
] | null | null | null | test/scenic/driver_test.exs | bruceme/scenic | bd8a1e63c122c44cc263e1fb5dfab2547ce8ef43 | [
"Apache-2.0"
] | null | null | null | #
# Created by Boyd Multerer 1/9/2021.
# Copyright 2021 Kry10 Limited
#
defmodule Scenic.DriverTest do
use ExUnit.Case, async: false
doctest Scenic.Driver
alias Scenic.Driver
alias Scenic.ViewPort
@codepoint_input_k {:codepoint, {"k", []}}
@codepoint_input_l {:codepoint, {"l", []}}
@cursor_pos_input ... | 30.640657 | 86 | 0.625787 |
1d9b2f640bf98ebb98cae3eb1ccf161b79e7da1e | 1,123 | ex | Elixir | lib/redex/command/rpop.ex | esmaeilpour/redex | c2c6e29e3dec0df265fdcd9f24cd2471c8615ee7 | [
"Apache-2.0"
] | 173 | 2019-03-15T15:05:11.000Z | 2022-01-10T08:21:48.000Z | lib/redex/command/rpop.ex | esmaeilpour/redex | c2c6e29e3dec0df265fdcd9f24cd2471c8615ee7 | [
"Apache-2.0"
] | null | null | null | lib/redex/command/rpop.ex | esmaeilpour/redex | c2c6e29e3dec0df265fdcd9f24cd2471c8615ee7 | [
"Apache-2.0"
] | 9 | 2019-07-28T01:20:43.000Z | 2021-08-18T03:41:44.000Z | defmodule Redex.Command.RPOP do
use Redex.Command
def exec([key], state = %State{quorum: quorum, db: db}) do
if readonly?(quorum) do
{:error, "READONLY You can't write against a read only replica."}
else
now = System.os_time(:millisecond)
{:atomic, result} =
Mnesia.sync_transacti... | 30.351351 | 91 | 0.535174 |
1d9b349543adfa21dde22a0f37392241a0a3b8fa | 396 | ex | Elixir | lib/imagineer/image/png/chunk/encoders/time.ex | ndemonner/imagineer | a6872296756cde19f8f575a7d1854d0fe7cbcb02 | [
"MIT"
] | 103 | 2015-01-28T19:09:42.000Z | 2018-10-22T15:05:46.000Z | lib/imagineer/image/png/chunk/encoders/time.ex | tyre/imagineer | a6872296756cde19f8f575a7d1854d0fe7cbcb02 | [
"MIT"
] | 12 | 2015-07-11T05:12:41.000Z | 2018-07-21T04:42:47.000Z | lib/imagineer/image/png/chunk/encoders/time.ex | ndemonner/imagineer | a6872296756cde19f8f575a7d1854d0fe7cbcb02 | [
"MIT"
] | 18 | 2015-06-16T15:48:34.000Z | 2018-06-22T02:34:40.000Z | defmodule Imagineer.Image.PNG.Chunk.Encoders.Time do
def encode(_image) do
current_time = DateTime.utc_now()
<<
current_time.year::integer-size(16),
current_time.month::integer-size(8),
current_time.day::integer-size(8),
current_time.hour::integer-size(8),
current_time.minute::i... | 26.4 | 52 | 0.676768 |
1d9b448b794403793fbde1719c8c345ad69ab832 | 1,339 | ex | Elixir | twitter/lib/twitter_web/channels/engine_channel.ex | SushmitDharurkar/Twitter-Clone | 1f0c6126d79877549fc312e263c69a6e44dc3254 | [
"MIT"
] | null | null | null | twitter/lib/twitter_web/channels/engine_channel.ex | SushmitDharurkar/Twitter-Clone | 1f0c6126d79877549fc312e263c69a6e44dc3254 | [
"MIT"
] | null | null | null | twitter/lib/twitter_web/channels/engine_channel.ex | SushmitDharurkar/Twitter-Clone | 1f0c6126d79877549fc312e263c69a6e44dc3254 | [
"MIT"
] | null | null | null | defmodule TwitterWeb.EngineChannel do
use TwitterWeb, :channel
alias TwitterWeb.Server
def join("engine", payload, socket) do
id = Map.get(payload, "id")
Server.add_user(id, "user"<> id, socket)
{:ok, socket}
end
def handle_in("add_follower", payload, socket) do
id = Map.get(payload, "id")
... | 28.489362 | 65 | 0.663181 |
1d9b4e92d7dc023092e47072bb62ed64c020c06c | 1,744 | ex | Elixir | clients/jobs/lib/google_api/jobs/v3/model/bucketized_count.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/jobs/lib/google_api/jobs/v3/model/bucketized_count.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/jobs/lib/google_api/jobs/v3/model/bucketized_count.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... | 34.196078 | 152 | 0.724771 |
1d9b6279b94afde56637485bbc3f9f66cf991c23 | 1,666 | ex | Elixir | lib/docknix_web/endpoint.ex | juhalehtonen/docknix | 562a26293d48b5dadccbd6340c4e2facc9f82633 | [
"MIT"
] | null | null | null | lib/docknix_web/endpoint.ex | juhalehtonen/docknix | 562a26293d48b5dadccbd6340c4e2facc9f82633 | [
"MIT"
] | null | null | null | lib/docknix_web/endpoint.ex | juhalehtonen/docknix | 562a26293d48b5dadccbd6340c4e2facc9f82633 | [
"MIT"
] | null | null | null | defmodule DocknixWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :docknix
socket "/socket", DocknixWeb.UserSocket
# Serve at "/" the static files from "priv/static" directory.
#
# You should set gzip to true if you are running phoenix.digest
# when deploying your static files in production.
plug Plug.Sta... | 28.724138 | 95 | 0.707683 |
1d9b79b49bd83f8f7c5bebb399095669af42fc91 | 496 | ex | Elixir | ch12/fizzbuzz.ex | rafanoronha/prog_elixir_1_6 | 5ae2137da4ffdb6de1c9b164812ed6e43c0922d3 | [
"MIT"
] | null | null | null | ch12/fizzbuzz.ex | rafanoronha/prog_elixir_1_6 | 5ae2137da4ffdb6de1c9b164812ed6e43c0922d3 | [
"MIT"
] | null | null | null | ch12/fizzbuzz.ex | rafanoronha/prog_elixir_1_6 | 5ae2137da4ffdb6de1c9b164812ed6e43c0922d3 | [
"MIT"
] | null | null | null | defmodule FizzBuzz do
def upto(n) when n > 0, do:
_upto(1, n, [])
def _upto(_current, 0, result), do:
Enum.reverse result
def _upto(current, left, result) do
next_answer =
cond do
rem(current, 3) == 0 and
rem(current, 5) == 0 ->
"FizzBuzz"
rem(current, 3) == 0... | 21.565217 | 52 | 0.504032 |
1d9b88c1145281cfeb859526958bce9f012d71be | 38,443 | ex | Elixir | clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/api/partners.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/api/partners.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"Apache-2.0"
] | null | null | null | clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/api/partners.ex | mocknen/elixir-google-api | dac4877b5da2694eca6a0b07b3bd0e179e5f3b70 | [
"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... | 41.695228 | 328 | 0.663476 |
1d9b9afd0b6f9ac102554da95e1a6c5fb04d988b | 2,690 | exs | Elixir | 14/part2.exs | seantanly/elixir-advent_of_code | 1e39ac46bc01f5c8cffd2d2f79f9af0b71767291 | [
"MIT"
] | 3 | 2016-01-18T01:14:45.000Z | 2017-05-11T09:14:49.000Z | 14/part2.exs | seantanly/elixir-advent_of_code | 1e39ac46bc01f5c8cffd2d2f79f9af0b71767291 | [
"MIT"
] | null | null | null | 14/part2.exs | seantanly/elixir-advent_of_code | 1e39ac46bc01f5c8cffd2d2f79f9af0b71767291 | [
"MIT"
] | null | null | null | defmodule Reindeer do
def parse_specs(inputs) do
inputs
|> String.split("\n", trim: true)
|> Enum.reduce([], fn input, specs_acc ->
[
_, deer, speed, move, rest
] = Regex.run(~r/(\w+) can fly (\d+) km\/s for (\d+) seconds, but then must rest for (\d+) seconds./, input)
[{deer, S... | 33.625 | 114 | 0.620074 |
1d9bb86fe74a3fe8d7f45018c92a6b003f2fe736 | 1,242 | ex | Elixir | lib/google_api/you_tube/v3/model/live_broadcast_statistics.ex | jesteracer/ytb | 67e3cab899e4f69e586383f7be2c3855c6beea49 | [
"Apache-2.0"
] | null | null | null | lib/google_api/you_tube/v3/model/live_broadcast_statistics.ex | jesteracer/ytb | 67e3cab899e4f69e586383f7be2c3855c6beea49 | [
"Apache-2.0"
] | null | null | null | lib/google_api/you_tube/v3/model/live_broadcast_statistics.ex | jesteracer/ytb | 67e3cab899e4f69e586383f7be2c3855c6beea49 | [
"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... | 32.684211 | 157 | 0.758454 |
1d9bc93384524d11195b0621bfb3e7425e23527e | 698 | ex | Elixir | programming/elixir/simple_pay/lib/simple_pay.ex | NomikOS/learning | 268f94605214f6861ef476ca7573e68c068ccbe5 | [
"Unlicense"
] | null | null | null | programming/elixir/simple_pay/lib/simple_pay.ex | NomikOS/learning | 268f94605214f6861ef476ca7573e68c068ccbe5 | [
"Unlicense"
] | null | null | null | programming/elixir/simple_pay/lib/simple_pay.ex | NomikOS/learning | 268f94605214f6861ef476ca7573e68c068ccbe5 | [
"Unlicense"
] | null | null | null | defmodule SimplePay do
use Application
@event_store SimplePay.EventStore
def start(_type, _args) do
import Supervisor.Spec
children = [
# Start the Ecto repository
supervisor(SimplePay.Repo, []),
# Start EventStore repo
worker(Extreme, [Application.get_env(:extreme, :event_store... | 24.928571 | 91 | 0.691977 |
1d9be06e7ea1ea932027f9eb0a9eaa7c51315180 | 538 | ex | Elixir | web/controllers/session_controller.ex | zhangsoledad/Doom | 37ddc696e7d71c742bfc90352d76e81f2c78f5b7 | [
"MIT"
] | 6 | 2016-03-17T08:45:34.000Z | 2016-10-10T01:20:37.000Z | web/controllers/session_controller.ex | zhangsoledad/doom | 37ddc696e7d71c742bfc90352d76e81f2c78f5b7 | [
"MIT"
] | null | null | null | web/controllers/session_controller.ex | zhangsoledad/doom | 37ddc696e7d71c742bfc90352d76e81f2c78f5b7 | [
"MIT"
] | 2 | 2016-04-01T06:28:56.000Z | 2016-04-28T09:35:07.000Z | defmodule Doom.SessionController do
use Doom.Web, :controller
import Doom.Authorize
alias Openmaize.Login.Name
plug :put_layout, false
plug :scrub_params, "user" when action in [:create]
plug Openmaize.Login, [unique_id: &Name.email_username/1] when action in [:create]
plug Openmaize.Logout when actio... | 20.692308 | 84 | 0.719331 |
1d9bf375bfccda28960a44813fb8d13bd59dd014 | 431 | exs | Elixir | test/http_test.exs | littlelines/frex | e3d9005b782fa0c0aaff0c0368f154c45fb7a302 | [
"Apache-2.0"
] | 2 | 2017-02-10T16:46:21.000Z | 2020-05-04T11:50:50.000Z | test/http_test.exs | littlelines/frex | e3d9005b782fa0c0aaff0c0368f154c45fb7a302 | [
"Apache-2.0"
] | null | null | null | test/http_test.exs | littlelines/frex | e3d9005b782fa0c0aaff0c0368f154c45fb7a302 | [
"Apache-2.0"
] | 1 | 2019-11-27T15:43:55.000Z | 2019-11-27T15:43:55.000Z | defmodule Frex.HTTPTest do
use ExUnit.Case, async: true
import Credentials
test "can't send a request without ALL oauth credentials" do
assert_raise ArgumentError, "Missing OAuth consumer credentials", fn ->
Application.put_env(:frex, :freshbooks_oauth_consumer_key, nil)
credentials |> Frex.Clie... | 28.733333 | 75 | 0.74942 |
1d9c0dd9b1ca466b91a79a5aa0d516e16f68f0b1 | 28 | ex | Elixir | lib/brando_blog.ex | twined/brando_blog | 0621e6e31d763d7ebec84771cf38809e08ef5b94 | [
"MIT"
] | 1 | 2020-01-13T23:45:05.000Z | 2020-01-13T23:45:05.000Z | lib/brando_blog.ex | twined/brando_blog | 0621e6e31d763d7ebec84771cf38809e08ef5b94 | [
"MIT"
] | null | null | null | lib/brando_blog.ex | twined/brando_blog | 0621e6e31d763d7ebec84771cf38809e08ef5b94 | [
"MIT"
] | null | null | null | defmodule BrandoBlog do
end
| 9.333333 | 23 | 0.857143 |
1d9c3ec1ad4e862c33cd63724cedbdcd246881a9 | 80 | exs | Elixir | test/phoenix_pubsub_kafka/producer/supervisor_test.exs | ohr486/phoenix_pubsub_kafka | 24c90d2a85541540c290f4865880569dc4e535df | [
"MIT"
] | 1 | 2020-01-13T20:47:47.000Z | 2020-01-13T20:47:47.000Z | test/phoenix_pubsub_kafka/producer/supervisor_test.exs | ohr486/phoenix_pubsub_kafka | 24c90d2a85541540c290f4865880569dc4e535df | [
"MIT"
] | null | null | null | test/phoenix_pubsub_kafka/producer/supervisor_test.exs | ohr486/phoenix_pubsub_kafka | 24c90d2a85541540c290f4865880569dc4e535df | [
"MIT"
] | 1 | 2018-07-17T05:09:52.000Z | 2018-07-17T05:09:52.000Z | defmodule Phoenix.PubSub.Kafka.Producer.SupervisorTest do
use ExUnit.Case
end
| 20 | 57 | 0.8375 |
1d9c6bee246fce699a873139c2127299cf95fae3 | 9,547 | exs | Elixir | apps/composer/test/dsl_test.exs | sarat1669/seeker | 743c6ad5a69a6e62c95cfd988b0e2f32129ab2aa | [
"Apache-2.0"
] | 1 | 2019-07-10T10:00:56.000Z | 2019-07-10T10:00:56.000Z | apps/composer/test/dsl_test.exs | spawnfest/factor18 | 743c6ad5a69a6e62c95cfd988b0e2f32129ab2aa | [
"Apache-2.0"
] | null | null | null | apps/composer/test/dsl_test.exs | spawnfest/factor18 | 743c6ad5a69a6e62c95cfd988b0e2f32129ab2aa | [
"Apache-2.0"
] | null | null | null | defmodule DSLTest do
use ExUnit.Case
alias Composer.DSL
doctest Composer.DSL
test "should parse null" do
assert DSL.do_convert(%{ "type" => "null" }) == nil
end
test "should parse atoms " do
assert DSL.do_convert(%{ "type" => "atom", "arguments" => [ "a" ] }) == :a
end
test "should parse stri... | 30.599359 | 100 | 0.380748 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.