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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
acc92bb6ccb8610f77d0bd5f61a35a9b528515f3 | 2,071 | exs | Elixir | test/header_extractor_test.exs | dbuos/tellurium | 20de4468130f99f5a9003231e2c4752c227c9302 | [
"Apache-2.0"
] | 4 | 2021-06-01T20:39:34.000Z | 2021-08-06T14:51:57.000Z | test/header_extractor_test.exs | dbuos/tellurium | 20de4468130f99f5a9003231e2c4752c227c9302 | [
"Apache-2.0"
] | 5 | 2022-03-04T19:15:47.000Z | 2022-03-04T21:57:23.000Z | test/header_extractor_test.exs | bancolombia/reactive-commons-elixir | eaf740d596cadbe44a6914de1783fe9aba2001b9 | [
"Apache-2.0"
] | null | null | null | defmodule HeaderExtractorTest do
use ExUnit.Case
doctest HeaderExtractor
test "should extract x_deaths count" do
headers = [
{"sourceApplication", :longstr, "message-extractor"},
{"x-death", :array,
[
table: [
{"count", :long, 6},
{"exchange", :longstr, "... | 30.014493 | 97 | 0.59633 |
acc9303817c040eb82247e4a7443a4cf06d3342e | 1,125 | exs | Elixir | config/config.exs | rhumbertgz/elixir_qlib | dcebca8dac8a2070ba098b209b6754daf1f49235 | [
"Apache-2.0"
] | 3 | 2016-10-05T21:34:47.000Z | 2021-04-21T15:02:47.000Z | config/config.exs | rhumbertgz/elixir_qlib | dcebca8dac8a2070ba098b209b6754daf1f49235 | [
"Apache-2.0"
] | null | null | null | config/config.exs | rhumbertgz/elixir_qlib | dcebca8dac8a2070ba098b209b6754daf1f49235 | [
"Apache-2.0"
] | 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.290323 | 73 | 0.752889 |
acc937b555885a57a3584fd8d79b846019e28f1e | 1,274 | ex | Elixir | lib/sibt_web/endpoint.ex | amacgregor/sibt | 9819a9de4735612ee59de00f71ca1a6dfa275860 | [
"MIT"
] | null | null | null | lib/sibt_web/endpoint.ex | amacgregor/sibt | 9819a9de4735612ee59de00f71ca1a6dfa275860 | [
"MIT"
] | 2 | 2020-07-18T02:22:22.000Z | 2021-03-09T15:46:44.000Z | lib/sibt_web/endpoint.ex | amacgregor/shouldibuildthat | 572b0ba95f93f6ea0dc7b250baaa1bc90efd521b | [
"MIT"
] | null | null | null | defmodule SibtWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :sibt
use Sentry.Phoenix.Endpoint
socket "/socket", SibtWeb.UserSocket,
websocket: true,
longpoll: false
# Serve at "/" the static files from "priv/static" directory.
#
# You should set gzip to true if you are running phx.digest
# when... | 26.541667 | 69 | 0.707221 |
acc93c48327d0bbf55c797974bce3dd934861add | 8,203 | exs | Elixir | test/hexpm/web/controllers/api/user_controller_test.exs | lau/hexpm | beee80f5358a356530debfea35ee65c3a0aa9b25 | [
"Apache-2.0"
] | null | null | null | test/hexpm/web/controllers/api/user_controller_test.exs | lau/hexpm | beee80f5358a356530debfea35ee65c3a0aa9b25 | [
"Apache-2.0"
] | null | null | null | test/hexpm/web/controllers/api/user_controller_test.exs | lau/hexpm | beee80f5358a356530debfea35ee65c3a0aa9b25 | [
"Apache-2.0"
] | null | null | null | defmodule Hexpm.Web.API.UserControllerTest do
use Hexpm.ConnCase, async: true
use Bamboo.Test
alias Hexpm.Accounts.User
defp publish_package(user) do
meta = %{name: "ecto", version: "1.0.0", description: "Domain-specific language."}
body = create_tar(meta, [])
build_conn()
|> put_req_header("... | 31.30916 | 105 | 0.625259 |
acc9415f1e043c72b401ab89ffec0857a5b68d95 | 6,068 | exs | Elixir | .credo.exs | umbrellium/niesso | e44cd961c248489ab2a10179243c8ceb0a608087 | [
"Apache-2.0"
] | null | null | null | .credo.exs | umbrellium/niesso | e44cd961c248489ab2a10179243c8ceb0a608087 | [
"Apache-2.0"
] | null | null | null | .credo.exs | umbrellium/niesso | e44cd961c248489ab2a10179243c8ceb0a608087 | [
"Apache-2.0"
] | 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 ... | 37.45679 | 91 | 0.634641 |
acc99b81bdc22ca52e0503f5fc7942ca9f08bda8 | 14,035 | exs | Elixir | apps/ewallet/test/ewallet/fetchers/transaction_source_fetcher_test.exs | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 322 | 2018-02-28T07:38:44.000Z | 2020-05-27T23:09:55.000Z | apps/ewallet/test/ewallet/fetchers/transaction_source_fetcher_test.exs | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 643 | 2018-02-28T12:05:20.000Z | 2020-05-22T08:34:38.000Z | apps/ewallet/test/ewallet/fetchers/transaction_source_fetcher_test.exs | AndonMitev/EWallet | 898cde38933d6f134734528b3e594eedf5fa50f3 | [
"Apache-2.0"
] | 63 | 2018-02-28T10:57:06.000Z | 2020-05-27T23:10:38.000Z | # Copyright 2018-2019 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 ... | 28.938144 | 96 | 0.594514 |
acc9b097ea50cd18b1a2126eeb4d3ed70cc9d69f | 1,575 | ex | Elixir | lib/jerboa/format/body/attribute/lifetime.ex | ACollectionOfAtoms/jerboa | 16000d450bb60b544b5c91f0fd7540a31b6c90b8 | [
"Apache-2.0"
] | 14 | 2016-12-22T10:38:34.000Z | 2021-03-11T23:20:26.000Z | lib/jerboa/format/body/attribute/lifetime.ex | ACollectionOfAtoms/jerboa | 16000d450bb60b544b5c91f0fd7540a31b6c90b8 | [
"Apache-2.0"
] | 94 | 2016-12-22T13:13:29.000Z | 2021-02-10T14:22:32.000Z | lib/jerboa/format/body/attribute/lifetime.ex | ACollectionOfAtoms/jerboa | 16000d450bb60b544b5c91f0fd7540a31b6c90b8 | [
"Apache-2.0"
] | 6 | 2017-04-03T20:23:00.000Z | 2022-03-06T10:14:30.000Z | defmodule Jerboa.Format.Body.Attribute.Lifetime do
@moduledoc """
LIFETIME attribute as defined in [TURN RFC](https://trac.tools.ietf.org/html/rfc5766#section-14.2)
"""
alias Jerboa.Format.Body.Attribute.{Decoder,Encoder}
alias Jerboa.Format.Lifetime.LengthError
alias Jerboa.Format.Meta
defstruct durati... | 26.25 | 100 | 0.68 |
acc9baaf5c3f625cff89850431258f8082a96d59 | 1,809 | ex | Elixir | clients/dialogflow/lib/google_api/dialogflow/v3/model/google_cloud_dialogflow_cx_v3_export_flow_response.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/dialogflow/lib/google_api/dialogflow/v3/model/google_cloud_dialogflow_cx_v3_export_flow_response.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/dialogflow/lib/google_api/dialogflow/v3/model/google_cloud_dialogflow_cx_v3_export_flow_response.ex | dazuma/elixir-google-api | 6a9897168008efe07a6081d2326735fe332e522c | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 32.890909 | 182 | 0.735766 |
acc9c0d032976abc5f540942af5cc1ee131037f1 | 993 | ex | Elixir | web/controllers/chart_controller.ex | davidgrupp/Option-Calc | 0b0e4607d827412e207d5fc5102aee001e93a821 | [
"Apache-2.0"
] | null | null | null | web/controllers/chart_controller.ex | davidgrupp/Option-Calc | 0b0e4607d827412e207d5fc5102aee001e93a821 | [
"Apache-2.0"
] | null | null | null | web/controllers/chart_controller.ex | davidgrupp/Option-Calc | 0b0e4607d827412e207d5fc5102aee001e93a821 | [
"Apache-2.0"
] | null | null | null | defmodule OptionCalc.ChartController do
use OptionCalc.Web, :controller
def index(conn, _params) do
render conn, "index.html"
end
def points(conn, %{ "settings" => settings, "positions" => positions }) when is_list(positions) do
#IO.inspect(positionss)
startPoint = settings["startPoint"]
endPo... | 45.136364 | 142 | 0.664653 |
acc9d86866c297d2075ce36a9dbe42376890c288 | 6,215 | ex | Elixir | apps/nerves_hub_www/lib/nerves_hub_www_web/controllers/deployment_controller.ex | Gazler/nerves_hub_web | 9a636a17310382819eaa6cee590e053cb47f0dcc | [
"Apache-2.0"
] | 1 | 2019-10-13T10:56:28.000Z | 2019-10-13T10:56:28.000Z | apps/nerves_hub_www/lib/nerves_hub_www_web/controllers/deployment_controller.ex | Eaftos/nerves_hub_web | ac03bd044b97265bf3ba3edd8da249d300fa3668 | [
"Apache-2.0"
] | null | null | null | apps/nerves_hub_www/lib/nerves_hub_www_web/controllers/deployment_controller.ex | Eaftos/nerves_hub_web | ac03bd044b97265bf3ba3edd8da249d300fa3668 | [
"Apache-2.0"
] | null | null | null | defmodule NervesHubWWWWeb.DeploymentController do
use NervesHubWWWWeb, :controller
alias NervesHubWebCore.Firmwares
alias NervesHubWebCore.Deployments
alias NervesHubWebCore.Deployments.Deployment
alias Ecto.Changeset
plug(:validate_role, [product: :delete] when action in [:delete])
plug(:validate_role,... | 26.559829 | 98 | 0.587932 |
acc9daddacf3e10608228927896c9120b0c4e195 | 694 | ex | Elixir | lib/fast_global/schema/database.ex | noizu-labs/KitchenSinkAdvanced | 6d91b5dd4f59cd9838f87a64605a0ef87f4301c8 | [
"MIT"
] | null | null | null | lib/fast_global/schema/database.ex | noizu-labs/KitchenSinkAdvanced | 6d91b5dd4f59cd9838f87a64605a0ef87f4301c8 | [
"MIT"
] | null | null | null | lib/fast_global/schema/database.ex | noizu-labs/KitchenSinkAdvanced | 6d91b5dd4f59cd9838f87a64605a0ef87f4301c8 | [
"MIT"
] | null | null | null | #-------------------------------------------------------------------------------
# Author: Keith Brings
# Copyright (C) 2018 Noizu Labs, Inc. All rights reserved.
#-------------------------------------------------------------------------------
use Amnesia
defdatabase Noizu.FastGlobal.V3.Database do
#---------------... | 34.7 | 80 | 0.325648 |
acc9f212ee0c299288be9dc3cb36b5b4b134d909 | 2,304 | exs | Elixir | test/relay/resources/lds_test.exs | aclemmensen/relay | 4bce71ed7d8bd4936f96d62ed08d007729c4253d | [
"BSD-3-Clause"
] | 5 | 2018-10-12T13:13:19.000Z | 2020-10-03T17:51:37.000Z | test/relay/resources/lds_test.exs | aclemmensen/relay | 4bce71ed7d8bd4936f96d62ed08d007729c4253d | [
"BSD-3-Clause"
] | 207 | 2018-02-09T14:24:14.000Z | 2020-07-25T11:09:19.000Z | test/relay/resources/lds_test.exs | aclemmensen/relay | 4bce71ed7d8bd4936f96d62ed08d007729c4253d | [
"BSD-3-Clause"
] | 1 | 2019-08-08T11:30:59.000Z | 2019-08-08T11:30:59.000Z | defmodule Relay.Resources.LDSTest do
use ExUnit.Case, async: true
alias Relay.Resources.{CertInfo, LDS}
alias Envoy.Api.V2.Core.{Address, DataSource, SocketAddress}
def listener_info(listener) do
%Address{address: {:socket_address, socket_address}} = listener.address
%SocketAddress{port_specifier: {:... | 33.882353 | 92 | 0.674913 |
acca012cf8980a9afb5db49e930d4542bf1e780a | 1,865 | exs | Elixir | clients/domains_rdap/mix.exs | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/domains_rdap/mix.exs | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"Apache-2.0"
] | null | null | null | clients/domains_rdap/mix.exs | kolorahl/elixir-google-api | 46bec1e092eb84c6a79d06c72016cb1a13777fa6 | [
"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.835821 | 116 | 0.658445 |
acca0f87495aaeceb7ecf71e19c63d6201c66acd | 669 | exs | Elixir | apps/day05/test/day05_test.exs | jochumb/aoc2017 | 813851fcab9270adea1bc532335f2228f5c015be | [
"MIT"
] | null | null | null | apps/day05/test/day05_test.exs | jochumb/aoc2017 | 813851fcab9270adea1bc532335f2228f5c015be | [
"MIT"
] | null | null | null | apps/day05/test/day05_test.exs | jochumb/aoc2017 | 813851fcab9270adea1bc532335f2228f5c015be | [
"MIT"
] | null | null | null | defmodule Day05Test do
use ExUnit.Case
@moduledoc "Input for day 5"
test "Test input part 1" do
assert Day05.part1(["0", "3", "0", "1", "-3"]) == 5
end
test "Solution for part 1" do
input_str = Utils.File.read_lines_from_file("./input")
result = Day05.part1(input_str)
IO.puts "Day 5 part 1: ... | 23.892857 | 58 | 0.623318 |
acca149707e0724aad7b7a0454ce989b1f6071ca | 24,761 | ex | Elixir | lib/mnemonex/config.ex | mwmiller/mnemonex | 7438c2453ef32ac20dd37ecf572233d4cdb9d7b3 | [
"MIT"
] | 1 | 2016-04-08T19:59:25.000Z | 2016-04-08T19:59:25.000Z | lib/mnemonex/config.ex | mwmiller/mnemonex | 7438c2453ef32ac20dd37ecf572233d4cdb9d7b3 | [
"MIT"
] | 1 | 2018-07-26T01:53:07.000Z | 2018-07-26T08:14:27.000Z | lib/mnemonex/config.ex | mwmiller/mnemonex | 7438c2453ef32ac20dd37ecf572233d4cdb9d7b3 | [
"MIT"
] | null | null | null | defmodule Mnemonex.Config do
alias TheFuzz.Phonetic.MetaphoneAlgorithm, as: MPA
@moduledoc """
word list configuration state
"""
defstruct words: {},
word_indices: %{},
words_version: nil,
metaphone_map: %{},
as_list: false,
total_words: nil,
... | 14.37921 | 65 | 0.435241 |
acca519ca7462dd49fea231dca8f7ff75864508a | 769 | ex | Elixir | todo/lib/todo/cache.ex | TheEndIsNear/ElixirInAction | 9b18ebd4845723935e03ec2a0c3cf869aa955541 | [
"MIT"
] | null | null | null | todo/lib/todo/cache.ex | TheEndIsNear/ElixirInAction | 9b18ebd4845723935e03ec2a0c3cf869aa955541 | [
"MIT"
] | null | null | null | todo/lib/todo/cache.ex | TheEndIsNear/ElixirInAction | 9b18ebd4845723935e03ec2a0c3cf869aa955541 | [
"MIT"
] | null | null | null | defmodule Todo.Cache do
def start_link do
IO.puts("Starting to-do cache.")
DynamicSupervisor.start_link(
name: __MODULE__,
strategy: :one_for_one
)
end
def server_process(todo_list_name) do
existing_process(todo_list_name) || new_process(todo_list_name)
end
def child_spec(_args)... | 20.783784 | 67 | 0.647594 |
acca737f90dcc8ce32992d1d77d21ea1a476fd64 | 1,241 | ex | Elixir | elixir-koans/lib/koans/20_comprehensions.ex | Cate-Lukner/cate-lukner-internship | 43e8b467287ea3a7955e23f18180cb4f849e6620 | [
"MIT"
] | null | null | null | elixir-koans/lib/koans/20_comprehensions.ex | Cate-Lukner/cate-lukner-internship | 43e8b467287ea3a7955e23f18180cb4f849e6620 | [
"MIT"
] | 8 | 2020-05-18T14:43:21.000Z | 2020-06-03T16:07:37.000Z | elixir-koans/lib/koans/20_comprehensions.ex | lowlandresearch/cate-lukner-internship | 71fff3bcd2d44905357c99dbff1b1f572f5bcc6f | [
"MIT"
] | 1 | 2020-05-18T14:44:13.000Z | 2020-05-18T14:44:13.000Z | defmodule Comprehensions do
use Koans
@intro "A comprehension is made of three parts: generators, filters, and collectibles. We will look at how these interact with eachother"
koan "The generator, `n <- [1, 2, 3, 4]`, is providing the values for our comprehension" do
assert (for n <- [1, 2, 3, 4], do: n * n... | 37.606061 | 139 | 0.590653 |
accaad2cbf2232cc52820c5793ac958a4047a853 | 399 | ex | Elixir | tooling/buggy/lib/buggy.ex | sfat/programming-elixir-exercises | 19e62e3f3344ec044e1eb1b39b195f4dad3dff1c | [
"Apache-2.0"
] | 1 | 2019-02-17T11:54:17.000Z | 2019-02-17T11:54:17.000Z | tooling/buggy/lib/buggy.ex | sfat/programming-elixir-exercises | 19e62e3f3344ec044e1eb1b39b195f4dad3dff1c | [
"Apache-2.0"
] | null | null | null | tooling/buggy/lib/buggy.ex | sfat/programming-elixir-exercises | 19e62e3f3344ec044e1eb1b39b195f4dad3dff1c | [
"Apache-2.0"
] | null | null | null | defmodule Buggy do
def parse_header(
<<
format::integer-16,
tracks::integer-16,
division::bits-16
>>
) do
IO.puts "format: #{format}"
IO.puts "tracks: #{tracks}"
IO.puts "division: #{decode(division)}"
end
def decode(<< 0::1, beats::15 >>) do
"♩ = #{beats}"
end
def deco... | 18.136364 | 44 | 0.54386 |
accab4547376434fb9c198d40677535a3af31ebf | 66 | ex | Elixir | lib/elm_base/repo.ex | chasm/elm_base | 1366d68ec827de3893fc61d9a5f268ee619b9d9a | [
"MIT"
] | 4 | 2016-07-19T18:11:07.000Z | 2016-08-02T00:36:39.000Z | lib/elm_base/repo.ex | chasm/elm_base | 1366d68ec827de3893fc61d9a5f268ee619b9d9a | [
"MIT"
] | 1 | 2018-12-26T09:06:41.000Z | 2018-12-26T09:06:41.000Z | lib/elm_base/repo.ex | chasm/elm_base | 1366d68ec827de3893fc61d9a5f268ee619b9d9a | [
"MIT"
] | null | null | null | defmodule ElmBase.Repo do
use Ecto.Repo, otp_app: :elm_base
end
| 16.5 | 35 | 0.772727 |
accaf7bb5659291cdd695244b4abb7c0f858135f | 1,622 | exs | Elixir | integration_test/mysql/upsert_all_test.exs | arcz/ecto_sql | 22ecbe3782af32f50c36387c861db77041247de8 | [
"Apache-2.0"
] | null | null | null | integration_test/mysql/upsert_all_test.exs | arcz/ecto_sql | 22ecbe3782af32f50c36387c861db77041247de8 | [
"Apache-2.0"
] | null | null | null | integration_test/mysql/upsert_all_test.exs | arcz/ecto_sql | 22ecbe3782af32f50c36387c861db77041247de8 | [
"Apache-2.0"
] | 1 | 2018-09-21T16:05:29.000Z | 2018-09-21T16:05:29.000Z | Code.require_file "../support/types.exs", __DIR__
defmodule Ecto.Integration.UpsertAllTest do
use Ecto.Integration.Case
alias Ecto.Integration.TestRepo
import Ecto.Query
alias Ecto.Integration.Post
test "on conflict raise" do
post = [title: "first", uuid: "6fa459ea-ee8a-3ca4-894e-db77e160355e"]
{1... | 35.26087 | 78 | 0.668311 |
accb08062f817cf07647f3bf80a17ccef92febd9 | 1,340 | exs | Elixir | benchmarks/queue.exs | v-kat/hood_melville | b10d9830eba4fb3698be1ecdab1b93aa8d3a4884 | [
"MIT"
] | null | null | null | benchmarks/queue.exs | v-kat/hood_melville | b10d9830eba4fb3698be1ecdab1b93aa8d3a4884 | [
"MIT"
] | null | null | null | benchmarks/queue.exs | v-kat/hood_melville | b10d9830eba4fb3698be1ecdab1b93aa8d3a4884 | [
"MIT"
] | null | null | null | list = Enum.to_list(1..10_000)
hm = HoodMelville.from_list(list)
queue = :queue.from_list(list)
Benchee.run(%{
"to_list" => fn -> HoodMelville.to_list(hm) end,
"to_list_naive" => fn -> HoodMelville.to_list_naive(hm) end,
"to_list_queue" => fn -> :queue.to_list(queue) end
},
formatters: [
Benchee.Formatters... | 20.9375 | 66 | 0.640299 |
accb090ca25d240f6538628eb45f9b406425cabd | 2,951 | exs | Elixir | farmbot_ext/test/farmbot_ext/mqtt/rpc_handler_test.exs | adamswsk/farmbot_os | d177d3b74888c1e7bcbf8f8595818708ee97f73b | [
"MIT"
] | null | null | null | farmbot_ext/test/farmbot_ext/mqtt/rpc_handler_test.exs | adamswsk/farmbot_os | d177d3b74888c1e7bcbf8f8595818708ee97f73b | [
"MIT"
] | null | null | null | farmbot_ext/test/farmbot_ext/mqtt/rpc_handler_test.exs | adamswsk/farmbot_os | d177d3b74888c1e7bcbf8f8595818708ee97f73b | [
"MIT"
] | null | null | null | defmodule FarmbotExt.RPCHandlerTest do
use ExUnit.Case
use Mimic
alias FarmbotCore.JSON
alias FarmbotExt.MQTT
alias FarmbotExt.MQTT.RPCHandler, as: RPC
import ExUnit.CaptureLog
@payload %{
kind: "rpc_request",
args: %{
label: "a2c67bf6-d8df-4213-89c3-8508bb5363e9",
priority: 600
... | 26.348214 | 97 | 0.587597 |
accb21ef2bf4f3566b7ccb6738fa9e28d08b63bc | 1,060 | exs | Elixir | test/tiny_earl/server_test.exs | rossta/tiny-earl | 60dca22617c38c75da384c432da6c6ae9a95df94 | [
"MIT"
] | null | null | null | test/tiny_earl/server_test.exs | rossta/tiny-earl | 60dca22617c38c75da384c432da6c6ae9a95df94 | [
"MIT"
] | null | null | null | test/tiny_earl/server_test.exs | rossta/tiny-earl | 60dca22617c38c75da384c432da6c6ae9a95df94 | [
"MIT"
] | null | null | null | defmodule TinyEarl.ServerTest do
use ExUnit.Case, async: true
import Mock
alias TinyEarl.{Server, LinkDomain}
test ".add_url adds a shortened link to link domain" do
with_mock TinyEarl.Database, [
store: fn _, _ -> nil end,
get: fn _ -> nil end] do
assert {:ok, pid} = Server.start_link("h... | 33.125 | 90 | 0.611321 |
accb23a5863268617e7d10253be9bb43c170e429 | 1,856 | ex | Elixir | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1__label_frame.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1__label_frame.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_cloud_videointelligence_v1__label_frame.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 ... | 33.142857 | 133 | 0.737069 |
accb9483848623d627444ee046648dfeaff93b38 | 99 | exs | Elixir | test/exdisque_test.exs | mosic/exdisque | e0d940cc03ea2ca5a1aa58c67e0d92fcdbe0bf87 | [
"MIT"
] | 18 | 2015-05-14T20:42:26.000Z | 2017-11-13T18:25:52.000Z | test/exdisque_test.exs | mosic/exdisque | e0d940cc03ea2ca5a1aa58c67e0d92fcdbe0bf87 | [
"MIT"
] | null | null | null | test/exdisque_test.exs | mosic/exdisque | e0d940cc03ea2ca5a1aa58c67e0d92fcdbe0bf87 | [
"MIT"
] | 1 | 2018-11-18T08:51:24.000Z | 2018-11-18T08:51:24.000Z | defmodule ExDisqueTest do
use ExUnit.Case
test "the truth" do
assert 1 + 1 == 2
end
end
| 12.375 | 25 | 0.656566 |
accb9f995621fa44e339d315f26ac5f559f57b5e | 1,394 | exs | Elixir | test/plowman/git_cmds_test.exs | azukiapp/plowman | 38bbab040eb691f8402e3073329bb19a1f0b7b9a | [
"MIT"
] | 11 | 2015-06-04T20:03:48.000Z | 2019-12-09T13:19:09.000Z | test/plowman/git_cmds_test.exs | azukiapp/plowman | 38bbab040eb691f8402e3073329bb19a1f0b7b9a | [
"MIT"
] | null | null | null | test/plowman/git_cmds_test.exs | azukiapp/plowman | 38bbab040eb691f8402e3073329bb19a1f0b7b9a | [
"MIT"
] | 1 | 2021-03-24T19:29:18.000Z | 2021-03-24T19:29:18.000Z | Code.require_file "../../test_helper.exs", __FILE__
defmodule PlowmanGitCmdsTest do
use Plowman.Test, async: false
@t Plowman.GitCmds
@msg_rg %r/^ ! Invalid path.*?\n.*name\.$/m
test "return :invalid_cmd for invalid commands" do
Enum.each ['', 'other-command'], fn(cmd) ->
case @t.run(cmd) do
... | 29.041667 | 83 | 0.591822 |
accba143e72cc9445e7c96bac9df65128bdb5205 | 1,857 | exs | Elixir | bench/stream_process_bench.exs | kianmeng/extwitter | aa1761f3dc618603a2ffe114589313cd8f306582 | [
"MIT"
] | 395 | 2015-01-12T16:33:42.000Z | 2022-03-13T08:37:08.000Z | bench/stream_process_bench.exs | kianmeng/extwitter | aa1761f3dc618603a2ffe114589313cd8f306582 | [
"MIT"
] | 133 | 2015-01-25T00:08:36.000Z | 2022-03-07T04:50:41.000Z | bench/stream_process_bench.exs | kianmeng/extwitter | aa1761f3dc618603a2ffe114589313cd8f306582 | [
"MIT"
] | 134 | 2015-01-14T16:44:13.000Z | 2022-02-02T22:11:36.000Z | defmodule ExTwitter.API.Streaming.Process.Bench do
use Benchfella
import ExTwitter.API.Streaming
@mock_tweet_json File.read!("fixture/mocks/tweet.json")
setup_all do
:meck.new(ExTwitter.API.Streaming, [:passthrough, :no_history])
{:ok, nil}
end
before_each_bench _ do
:meck.expect(
ExTwi... | 27.716418 | 84 | 0.682283 |
accbe7b0d26fd210d779134da749ef947f4380a9 | 99 | exs | Elixir | test/api_classes/user_api_test.exs | InfiniteSoul/proxer_ex | df60ca5d4b9222d77ff685b7c1897781a738abc1 | [
"MIT"
] | null | null | null | test/api_classes/user_api_test.exs | InfiniteSoul/proxer_ex | df60ca5d4b9222d77ff685b7c1897781a738abc1 | [
"MIT"
] | null | null | null | test/api_classes/user_api_test.exs | InfiniteSoul/proxer_ex | df60ca5d4b9222d77ff685b7c1897781a738abc1 | [
"MIT"
] | null | null | null | defmodule ProxerEx.Test.Api.User do
use ExUnit.Case, async: true
doctest ProxerEx.Api.User
end
| 19.8 | 35 | 0.777778 |
accbef08ca9a4465c8f9638c68ab9748dd87961e | 589 | exs | Elixir | test/nebulex_redis_adapter/standalone_test.exs | manusajith/nebulex_redis_adapter | 0a29e6eaa5563ec2237e38ad9b88a476aaa8a26b | [
"MIT"
] | null | null | null | test/nebulex_redis_adapter/standalone_test.exs | manusajith/nebulex_redis_adapter | 0a29e6eaa5563ec2237e38ad9b88a476aaa8a26b | [
"MIT"
] | null | null | null | test/nebulex_redis_adapter/standalone_test.exs | manusajith/nebulex_redis_adapter | 0a29e6eaa5563ec2237e38ad9b88a476aaa8a26b | [
"MIT"
] | null | null | null | defmodule NebulexRedisAdapter.StandaloneTest do
use ExUnit.Case, async: true
use NebulexRedisAdapter.CacheTest, cache: NebulexRedisAdapter.TestCache.Standalone
alias NebulexRedisAdapter.Command
alias NebulexRedisAdapter.TestCache.Standalone, as: Cache
setup do
{:ok, pid} = Cache.start_link()
Cache.f... | 23.56 | 84 | 0.691002 |
accbfc71ccd6a5999d8b66e95e39f20fbae4cad0 | 2,910 | exs | Elixir | spec/kerbal_maps/parsers/coordinate_parser_spec.exs | CraigCottingham/ksp-maps | ffd81c5e667cf6ca7770e717c736e51489c0c3d3 | [
"Apache-2.0"
] | 6 | 2019-01-25T12:07:43.000Z | 2021-09-09T20:31:39.000Z | spec/kerbal_maps/parsers/coordinate_parser_spec.exs | CraigCottingham/ksp-maps | ffd81c5e667cf6ca7770e717c736e51489c0c3d3 | [
"Apache-2.0"
] | 144 | 2019-01-26T02:20:07.000Z | 2021-07-21T06:28:23.000Z | spec/kerbal_maps/parsers/coordinate_parser_spec.exs | CraigCottingham/ksp-maps | ffd81c5e667cf6ca7770e717c736e51489c0c3d3 | [
"Apache-2.0"
] | 2 | 2019-07-31T21:11:00.000Z | 2020-04-15T19:51:14.000Z | defmodule KerbalMaps.CoordinateParser.Spec do
@moduledoc false
use ESpec
doctest KerbalMaps.CoordinateParser
example_group "parsing a coordinate pair" do
let :parsed, do: input() |> KerbalMaps.CoordinateParser.parse_coordinate
# e.g. 20.6709, -146.4968
describe "given a bare decimal pair" do
... | 31.978022 | 99 | 0.616495 |
accc066be5a4a6634b7121dbfc298eb70afb54d5 | 173 | exs | Elixir | test/mipha/stars/star_test.exs | ZPVIP/mipha | a7df054f72eec7de88b60d94c501488375bdff6a | [
"MIT"
] | 156 | 2018-06-01T19:52:32.000Z | 2022-02-03T10:58:10.000Z | test/mipha/stars/star_test.exs | ZPVIP/mipha | a7df054f72eec7de88b60d94c501488375bdff6a | [
"MIT"
] | 139 | 2018-07-10T01:57:23.000Z | 2021-08-02T21:29:24.000Z | test/mipha/stars/star_test.exs | ZPVIP/mipha | a7df054f72eec7de88b60d94c501488375bdff6a | [
"MIT"
] | 29 | 2018-07-17T08:43:45.000Z | 2021-12-14T13:45:30.000Z | defmodule Mipha.Stars.StarTest do
use Mipha.DataCase
describe "changeset" do
test "with valid attrs" do
end
test "with invalid attrs" do
end
end
end
| 14.416667 | 33 | 0.682081 |
accc287478a14e2164b048f163f8fac3e7d6dc23 | 4,304 | ex | Elixir | lib/aws/generated/auto_scaling_plans.ex | smanolloff/aws-elixir | c7cb6577802f5010be7e7b6ccb2c0f3c8c73ea84 | [
"Apache-2.0"
] | null | null | null | lib/aws/generated/auto_scaling_plans.ex | smanolloff/aws-elixir | c7cb6577802f5010be7e7b6ccb2c0f3c8c73ea84 | [
"Apache-2.0"
] | null | null | null | lib/aws/generated/auto_scaling_plans.ex | smanolloff/aws-elixir | c7cb6577802f5010be7e7b6ccb2c0f3c8c73ea84 | [
"Apache-2.0"
] | null | null | null | # WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
# See https://github.com/aws-beam/aws-codegen for more details.
defmodule AWS.AutoScalingPlans do
@moduledoc """
AWS Auto Scaling
Use AWS Auto Scaling to quickly discover all the scalable AWS resources for your
application and configure dynamic scaling and predicti... | 32.606061 | 119 | 0.697258 |
accc41633b8a5e707a66c472a860597e48601e66 | 826 | exs | Elixir | test/buffer_test.exs | macoene/observables | 6e43ab9b7ea2afa60160a13ef5c37eb20dc597b7 | [
"MIT"
] | 4 | 2018-04-16T20:43:37.000Z | 2019-07-18T21:50:49.000Z | test/buffer_test.exs | macoene/observables | 6e43ab9b7ea2afa60160a13ef5c37eb20dc597b7 | [
"MIT"
] | null | null | null | test/buffer_test.exs | macoene/observables | 6e43ab9b7ea2afa60160a13ef5c37eb20dc597b7 | [
"MIT"
] | 1 | 2021-03-18T18:37:11.000Z | 2021-03-18T18:37:11.000Z | defmodule BufferTest do
use ExUnit.Case
alias Observables.{Obs}
require Logger
@tag :buffer
test "buffer" do
testproc = self()
start = 1
tend = 100
size = 3
# Create a range.
Obs.range(start, tend, 100)
|> Obs.buffer(size)
|> Obs.each(fn v ->
Logger.debug("Sending #{in... | 19.209302 | 60 | 0.565375 |
accc42dd75a5d226c2a6278dec40ccce450460fa | 1,765 | ex | Elixir | harbor/test/_support/room.ex | miapolis/port7 | 7df1223f83d055eeb6ce8f61f4af8b4f2cf33e74 | [
"MIT"
] | null | null | null | harbor/test/_support/room.ex | miapolis/port7 | 7df1223f83d055eeb6ce8f61f4af8b4f2cf33e74 | [
"MIT"
] | null | null | null | harbor/test/_support/room.ex | miapolis/port7 | 7df1223f83d055eeb6ce8f61f4af8b4f2cf33e74 | [
"MIT"
] | null | null | null | defmodule PierTest.Helpers.Room do
alias PierTest.WsClient
alias Anchorage.RoomSession
alias PierTest.WsClientFactory
require WsClient
@spec create_and_join(any(), atom()) :: {String.t(), integer()}
def create_and_join(ws, game) do
%{"id" => room_id} =
WsClient.do_call(ws, "room:create", %{
... | 30.431034 | 97 | 0.623796 |
accc6ddf1a363abf366a60e4cd78a0ceffb7c5a3 | 482 | ex | Elixir | lib/remote_retro_web/channels/presence.ex | birkand/remote_retro | f7fef13aa8779cd4a8a9fd73d2fbbd5ae537634c | [
"MIT"
] | null | null | null | lib/remote_retro_web/channels/presence.ex | birkand/remote_retro | f7fef13aa8779cd4a8a9fd73d2fbbd5ae537634c | [
"MIT"
] | null | null | null | lib/remote_retro_web/channels/presence.ex | birkand/remote_retro | f7fef13aa8779cd4a8a9fd73d2fbbd5ae537634c | [
"MIT"
] | null | null | null | defmodule RemoteRetroWeb.Presence do
@moduledoc """
Handle users joining and leaving retros.
"""
use Phoenix.Presence, otp_app: :remote_retro,
pubsub_server: RemoteRetro.PubSub
def fetch(_topic, entries) do
Enum.into entries, %{}, fn({user_token, presence}) ->
user_metadata ... | 30.125 | 85 | 0.670124 |
accc707e29c7eaf58c62ed71ab24806ff988b5fa | 472 | exs | Elixir | web/test_helper.exs | conorfoley/dota_hero_combos | d75a3f0673fc1f1d0845c9d5c692c0605d3b445d | [
"MIT"
] | null | null | null | web/test_helper.exs | conorfoley/dota_hero_combos | d75a3f0673fc1f1d0845c9d5c692c0605d3b445d | [
"MIT"
] | null | null | null | web/test_helper.exs | conorfoley/dota_hero_combos | d75a3f0673fc1f1d0845c9d5c692c0605d3b445d | [
"MIT"
] | null | null | null | defmodule Test.DotaHeroCombos.Resource do
defmacro __using__(_) do
resource = __CALLER__.module |> Module.split() |> tl() |> Module.concat()
quote do
use Mazurka.Plug.Test, router: DotaHeroCombos.Router,
resource: unquote(resource)
import unquote(__MODULE__)
end
... | 24.842105 | 77 | 0.641949 |
accca481cb2f177275fc7a80875e84cea560a670 | 8,894 | exs | Elixir | test/acceptance/ast/html/block_test.exs | sionide21/earmark | 72e086fa3bca781a4ba32da579c696bf75728b91 | [
"Apache-1.1"
] | null | null | null | test/acceptance/ast/html/block_test.exs | sionide21/earmark | 72e086fa3bca781a4ba32da579c696bf75728b91 | [
"Apache-1.1"
] | null | null | null | test/acceptance/ast/html/block_test.exs | sionide21/earmark | 72e086fa3bca781a4ba32da579c696bf75728b91 | [
"Apache-1.1"
] | null | null | null | defmodule Acceptance.Ast.Html.BlockTest do
use ExUnit.Case, async: true
import Support.Helpers, only: [as_ast: 1, parse_html: 1]
import Support.AstHelpers, only: [p: 1, void_tag: 1]
@verbatim %{meta: %{verbatim: true}}
describe "HTML blocks" do
test "tables are just tables again (or was that mountains... | 33.946565 | 125 | 0.542613 |
accca522cad211d8cc350029b838d965be40bdac | 353 | ex | Elixir | lib/supabase_surface/components/icons/icon_align_justify.ex | treebee/supabase-surface | 5a184ca92323c085dd81e2fc8aa8c10367f2382e | [
"Apache-2.0"
] | 5 | 2021-06-08T08:02:43.000Z | 2022-02-09T23:13:46.000Z | lib/supabase_surface/components/icons/icon_align_justify.ex | treebee/supabase-surface | 5a184ca92323c085dd81e2fc8aa8c10367f2382e | [
"Apache-2.0"
] | null | null | null | lib/supabase_surface/components/icons/icon_align_justify.ex | treebee/supabase-surface | 5a184ca92323c085dd81e2fc8aa8c10367f2382e | [
"Apache-2.0"
] | 1 | 2021-07-14T05:20:31.000Z | 2021-07-14T05:20:31.000Z | defmodule SupabaseSurface.Components.Icons.IconAlignJustify do
use SupabaseSurface.Components.Icon
@impl true
def render(assigns) do
icon_size = IconContainer.get_size(assigns.size)
~F"""
<IconContainer assigns={assigns}>
{Feathericons.align_justify(width: icon_size, height: icon_size)}
</... | 23.533333 | 71 | 0.728045 |
accce725b9d570383d418edecf12e241651aee74 | 111 | ex | Elixir | lib/time_tracking/billable_calculator.ex | leifg/time_tracking | 115c53482398f5aa6a2dbb246bee14c9f075b767 | [
"MIT"
] | 6 | 2018-01-09T08:57:20.000Z | 2018-06-20T08:59:42.000Z | lib/time_tracking/billable_calculator.ex | leifg/time_tracking | 115c53482398f5aa6a2dbb246bee14c9f075b767 | [
"MIT"
] | 80 | 2016-05-04T20:31:37.000Z | 2021-07-12T05:12:29.000Z | lib/time_tracking/billable_calculator.ex | leifg/time_tracking | 115c53482398f5aa6a2dbb246bee14c9f075b767 | [
"MIT"
] | null | null | null | defmodule BillableCalculator do
def calculate(time, true), do: time
def calculate(_time, false), do: 0
end
| 22.2 | 37 | 0.747748 |
accced6b9e97237178064194f48497014b5403e1 | 134 | ex | Elixir | pipingValue.ex | ayarhlaine/hello-elixir | 57b19cd8bf0bd7bd8217b71a482c0da53ce8ae85 | [
"MIT"
] | null | null | null | pipingValue.ex | ayarhlaine/hello-elixir | 57b19cd8bf0bd7bd8217b71a482c0da53ce8ae85 | [
"MIT"
] | null | null | null | pipingValue.ex | ayarhlaine/hello-elixir | 57b19cd8bf0bd7bd8217b71a482c0da53ce8ae85 | [
"MIT"
] | null | null | null | # This module contain piping value and output on screen.
defmodule Piping do
def main do
1 + 2 + 3 + 4 + 5 |> IO.puts
end
end
| 19.142857 | 56 | 0.656716 |
accd142b9185a7b85db9f0488bb1ae61bf3ea4f5 | 1,089 | ex | Elixir | test/support/channel_case.ex | karolsluszniak/clustered_queue_and_pool-phoenix1.6 | cbf8f51a3c72cb7a5bde31839c1de056775af4f3 | [
"MIT"
] | null | null | null | test/support/channel_case.ex | karolsluszniak/clustered_queue_and_pool-phoenix1.6 | cbf8f51a3c72cb7a5bde31839c1de056775af4f3 | [
"MIT"
] | null | null | null | test/support/channel_case.ex | karolsluszniak/clustered_queue_and_pool-phoenix1.6 | cbf8f51a3c72cb7a5bde31839c1de056775af4f3 | [
"MIT"
] | null | null | null | defmodule OuterWeb.ChannelCase do
@moduledoc """
This module defines the test case to be used by
channel tests.
Such tests rely on `Phoenix.ChannelTest` and also
import other functionality to make it easier
to build common data structures and query the data layer.
Finally, if the test case interacts wit... | 29.432432 | 86 | 0.734619 |
accd64e135ffe452caa07a6b9ab4e47f6f38f00a | 1,442 | ex | Elixir | lib/livebook_web/live/session_live/cell_editor_component.ex | apoorv-2204/elixir_learn_work_notebook_setup | 7ea75c1b53e0e9ce7ae89d386cc16b7277a1d86e | [
"Apache-2.0"
] | null | null | null | lib/livebook_web/live/session_live/cell_editor_component.ex | apoorv-2204/elixir_learn_work_notebook_setup | 7ea75c1b53e0e9ce7ae89d386cc16b7277a1d86e | [
"Apache-2.0"
] | null | null | null | lib/livebook_web/live/session_live/cell_editor_component.ex | apoorv-2204/elixir_learn_work_notebook_setup | 7ea75c1b53e0e9ce7ae89d386cc16b7277a1d86e | [
"Apache-2.0"
] | null | null | null | defmodule LivebookWeb.SessionLive.CellEditorComponent do
use LivebookWeb, :live_component
@impl true
def mount(socket) do
{:ok, assign(socket, initialized: false)}
end
@impl true
def update(assigns, socket) do
socket =
socket
|> assign(assigns)
|> assign_new(:intellisense, fn -> ... | 25.298246 | 83 | 0.590846 |
accd7665fdbabafe22a3a4be16209461df0c0241 | 2,017 | exs | Elixir | learning/cart/test/cart_test.exs | Mdlkxzmcp/various_elixir | c87527b7118a0c74a042073c04d2228025888ddf | [
"MIT"
] | 2 | 2020-01-20T20:15:20.000Z | 2020-02-27T11:08:42.000Z | learning/cart/test/cart_test.exs | Mdlkxzmcp/various_elixir | c87527b7118a0c74a042073c04d2228025888ddf | [
"MIT"
] | null | null | null | learning/cart/test/cart_test.exs | Mdlkxzmcp/various_elixir | c87527b7118a0c74a042073c04d2228025888ddf | [
"MIT"
] | null | null | null | defmodule CartTest do
use ExUnit.Case
doctest Cart
test "Create new cart returns an empty cart" do
my_cart = Cart.create()
assert Cart.empty?(my_cart)
end
test "An empty cart doesn't contain any products" do
product = "dog food"
cart = Cart.create()
refute Cart.contains?(cart, product)
... | 31.030769 | 120 | 0.641547 |
accd7900068bf92d8e732ea6fa42a86ea63a89e5 | 1,593 | ex | Elixir | lib/strava/util.ex | jsparling/strava | a3511520428dffd7ef9230a81f9a31533e3a052e | [
"MIT"
] | null | null | null | lib/strava/util.ex | jsparling/strava | a3511520428dffd7ef9230a81f9a31533e3a052e | [
"MIT"
] | null | null | null | lib/strava/util.ex | jsparling/strava | a3511520428dffd7ef9230a81f9a31533e3a052e | [
"MIT"
] | null | null | null | defmodule Strava.Util do
@moduledoc """
Generic utility functions
"""
@doc """
Parses a `String` date into `NaiveDateTime` struct.
## Examples
iex> Strava.Util.parse_date("2012-05-16T21:37:06Z")
~N[2012-05-16 21:37:06]
"""
@spec parse_date(String.t) :: NaiveDateTime.t | String.t
def par... | 23.426471 | 58 | 0.647834 |
accdf1b963fd76fb3b75116cc875297bd962ae50 | 96 | exs | Elixir | elixir/codes-from-books/little-elixir/cap7/pooly/version-4/test/pooly_test.exs | trxeste/wrk | 3e05e50ff621866f0361cc8494ce8f6bb4d97fae | [
"BSD-3-Clause"
] | 1 | 2017-10-16T03:00:50.000Z | 2017-10-16T03:00:50.000Z | elixir/codes-from-books/little-elixir/cap7/pooly/version-4/test/pooly_test.exs | trxeste/wrk | 3e05e50ff621866f0361cc8494ce8f6bb4d97fae | [
"BSD-3-Clause"
] | null | null | null | elixir/codes-from-books/little-elixir/cap7/pooly/version-4/test/pooly_test.exs | trxeste/wrk | 3e05e50ff621866f0361cc8494ce8f6bb4d97fae | [
"BSD-3-Clause"
] | null | null | null | defmodule PoolyTest do
use ExUnit.Case
test "the truth" do
assert 1 + 1 == 2
end
end
| 12 | 22 | 0.645833 |
acce3b4a32eb0ebde3b3052b1937a6a38623fa02 | 2,544 | ex | Elixir | lib/sanbase/alerts/trigger/settings/metric/daily_metric_trigger_settings.ex | santiment/sanbase2 | 9ef6e2dd1e377744a6d2bba570ea6bd477a1db31 | [
"MIT"
] | 81 | 2017-11-20T01:20:22.000Z | 2022-03-05T12:04:25.000Z | lib/sanbase/alerts/trigger/settings/metric/daily_metric_trigger_settings.ex | rmoorman/sanbase2 | 226784ab43a24219e7332c49156b198d09a6dd85 | [
"MIT"
] | 359 | 2017-10-15T14:40:53.000Z | 2022-01-25T13:34:20.000Z | lib/sanbase/alerts/trigger/settings/metric/daily_metric_trigger_settings.ex | rmoorman/sanbase2 | 226784ab43a24219e7332c49156b198d09a6dd85 | [
"MIT"
] | 16 | 2017-11-19T13:57:40.000Z | 2022-02-07T08:13:02.000Z | defmodule Sanbase.Alert.Trigger.DailyMetricTriggerSettings do
@moduledoc ~s"""
An alert based on the V2 ClickHouse metrics.
The metric we're following is configured via the 'metric' parameter
"""
@behaviour Sanbase.Alert.Trigger.Settings.Behaviour
use Vex.Struct
import Sanbase.{Validation, Alert.Valida... | 33.038961 | 90 | 0.668632 |
acce8b8c01f7a9bd9b7e5b371df9d7ee3795e27e | 674 | ex | Elixir | web/workflows/move_back_to_address_state.ex | harry-gao/ex-cart | 573e7f977bb3b710d11618dd215d4ddd8f819fb3 | [
"Apache-2.0"
] | 356 | 2016-03-16T12:37:28.000Z | 2021-12-18T03:22:39.000Z | web/workflows/move_back_to_address_state.ex | harry-gao/ex-cart | 573e7f977bb3b710d11618dd215d4ddd8f819fb3 | [
"Apache-2.0"
] | 30 | 2016-03-16T09:19:10.000Z | 2021-01-12T08:10:52.000Z | web/workflows/move_back_to_address_state.ex | harry-gao/ex-cart | 573e7f977bb3b710d11618dd215d4ddd8f819fb3 | [
"Apache-2.0"
] | 72 | 2016-03-16T13:32:14.000Z | 2021-03-23T11:27:43.000Z | defmodule Nectar.Workflow.MoveBackToAddressState do
alias Ecto.Multi
def run(repo, order),
do: repo.transaction(steps(order))
def steps(order) do
Multi.new()
|> Multi.delete_all(:delete_payment, Nectar.Query.Payment.for_order(order))
|> Multi.delete_all(:delete_tax_adjustments, Nectar.Query.Adju... | 39.647059 | 116 | 0.768546 |
acce8c493d29e85a13886ed2b6cf532b94e1a1cf | 275 | ex | Elixir | lib/f1_calendar_bot/supervisor.ex | evbogdanov/f1_calendar_bot | cc9fb51cea19062dde1cb1b1194406de4ff19938 | [
"BSD-3-Clause"
] | null | null | null | lib/f1_calendar_bot/supervisor.ex | evbogdanov/f1_calendar_bot | cc9fb51cea19062dde1cb1b1194406de4ff19938 | [
"BSD-3-Clause"
] | null | null | null | lib/f1_calendar_bot/supervisor.ex | evbogdanov/f1_calendar_bot | cc9fb51cea19062dde1cb1b1194406de4ff19938 | [
"BSD-3-Clause"
] | null | null | null | defmodule F1CalendarBot.Supervisor do
use Supervisor
def start_link do
Supervisor.start_link(__MODULE__, :ok)
end
def init(:ok) do
children = [
worker(F1CalendarBot.Telegram.Server, []),
]
supervise(children, strategy: :one_for_one)
end
end
| 18.333333 | 48 | 0.694545 |
accec45001c2bf7e2a94d75989a86fe01dea6bdb | 1,111 | exs | Elixir | config/dev.exs | deerob4/words-with-enemies | f9de13d599bdecc71007db57d3c21651b9be7463 | [
"MIT"
] | 1 | 2015-02-15T23:50:29.000Z | 2015-02-15T23:50:29.000Z | config/dev.exs | deerob4/words-with-enemies | f9de13d599bdecc71007db57d3c21651b9be7463 | [
"MIT"
] | null | null | null | config/dev.exs | deerob4/words-with-enemies | f9de13d599bdecc71007db57d3c21651b9be7463 | [
"MIT"
] | null | null | null | use Mix.Config
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with brunch.io to recompile .js and .css sources.
config :words_with_enemies, WordsWithEnemies.Endpoint,
... | 30.027027 | 60 | 0.70387 |
accf149b67f3382ac2936df9e84678682d11b8c5 | 2,133 | ex | Elixir | lib/ecto/associations.ex | yrashk/ecto | 1462d5ad4cbb7bf74c292ec405852bc196808daf | [
"Apache-2.0"
] | 1 | 2016-08-15T21:23:28.000Z | 2016-08-15T21:23:28.000Z | lib/ecto/associations.ex | yrashk/ecto | 1462d5ad4cbb7bf74c292ec405852bc196808daf | [
"Apache-2.0"
] | null | null | null | lib/ecto/associations.ex | yrashk/ecto | 1462d5ad4cbb7bf74c292ec405852bc196808daf | [
"Apache-2.0"
] | null | null | null | defmodule Ecto.Associations do
@moduledoc false
alias Ecto.Reflections.HasOne
alias Ecto.Reflections.HasMany
alias Ecto.Reflections.BelongsTo
def create_reflection(type, name, module, pk, assoc, fk)
when type in [:has_many, :has_one] do
model_name = module |> Module.split |> List.last |> Ecto.Util... | 25.392857 | 77 | 0.604313 |
accf20f6e2b93498f909a34de69de668d767511a | 1,149 | ex | Elixir | lib/logi/builtin/layout/default.ex | sile/logi_ex | 6af6a28cd73faa02e12059645405d85597d4d6a7 | [
"MIT"
] | 1 | 2016-11-29T08:43:21.000Z | 2016-11-29T08:43:21.000Z | lib/logi/builtin/layout/default.ex | sile/logi_ex | 6af6a28cd73faa02e12059645405d85597d4d6a7 | [
"MIT"
] | null | null | null | lib/logi/builtin/layout/default.ex | sile/logi_ex | 6af6a28cd73faa02e12059645405d85597d4d6a7 | [
"MIT"
] | null | null | null | defmodule Logi.BuiltIn.Layout.Default do
@moduledoc """
A default layout for built-in sinks.
Behaviours: `Logi.Layout`.
This module layouts a log message by the following format:
```
{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}.{SSS} [{SEVERITY}] {NODE} {PID} {MODULE}:{FUNCTION}:{LINE} [{HEADER(KEY=VALUE)}*] {MESSAGE... | 28.02439 | 128 | 0.684073 |
accf2b203457e553a329cb1a54bc347ae815d576 | 10,378 | ex | Elixir | lib/oli/automation_setup.ex | jrissler/oli-torus | 747f9e4360163d76a6ca5daee3aab1feab0c99b1 | [
"MIT"
] | 1 | 2022-03-17T20:35:47.000Z | 2022-03-17T20:35:47.000Z | lib/oli/automation_setup.ex | jrissler/oli-torus | 747f9e4360163d76a6ca5daee3aab1feab0c99b1 | [
"MIT"
] | 9 | 2021-11-02T16:52:09.000Z | 2022-03-25T15:14:01.000Z | lib/oli/automation_setup.ex | marc-hughes/oli-torus-1 | aa3c9bb2d91b678a365be839761eaf86c60ee35c | [
"MIT"
] | null | null | null | defmodule Oli.AutomationSetup do
@moduledoc """
Sets up data in a torus instance that is meant be used with automated e2e tests to
enable testing of content in remote torus instances.
"""
alias Lti_1p3.Tool.ContextRoles
alias Oli.Repo
alias Oli.Authoring.Course.Project
alias Oli.Authoring.Course.Projec... | 27.455026 | 100 | 0.604644 |
accf3d6846917c6a3ee3089fb268ba352d3d5028 | 4,511 | ex | Elixir | lib/earmark/context.ex | ZeLarpMaster/earmark | 35c9661d6647059e507c0278347e21d92351c417 | [
"Apache-1.1"
] | null | null | null | lib/earmark/context.ex | ZeLarpMaster/earmark | 35c9661d6647059e507c0278347e21d92351c417 | [
"Apache-1.1"
] | null | null | null | lib/earmark/context.ex | ZeLarpMaster/earmark | 35c9661d6647059e507c0278347e21d92351c417 | [
"Apache-1.1"
] | 1 | 2020-03-31T19:53:15.000Z | 2020-03-31T19:53:15.000Z | defmodule Earmark.Context do
@moduledoc false
use Earmark.Types
import Earmark.Helpers
@type t :: %__MODULE__{
options: Earmark.Options.t(),
links: map(),
rules: Keyword.t() | nil,
footnotes: map(),
value: String.t() | [String.t()]
}
defstruct optio... | 28.916667 | 87 | 0.441809 |
accf507830b95a8c6378c12c65405ce834eb0bdc | 1,867 | exs | Elixir | clients/testing/mix.exs | jamesvl/elixir-google-api | 6c87fb31d996f08fb42ce6066317e9d652a87acc | [
"Apache-2.0"
] | null | null | null | clients/testing/mix.exs | jamesvl/elixir-google-api | 6c87fb31d996f08fb42ce6066317e9d652a87acc | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/testing/mix.exs | myskoach/elixir-google-api | 4f8cbc2fc38f70ffc120fd7ec48e27e46807b563 | [
"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.865672 | 134 | 0.658275 |
accf56da26b2bb04663cc5fe535574530f3b2509 | 2,395 | ex | Elixir | lib/geometry/wkb.ex | hrzndhrn/geometry | bffdac0a9554f7f5fd05caceee0fa8f3c96d1c60 | [
"MIT"
] | null | null | null | lib/geometry/wkb.ex | hrzndhrn/geometry | bffdac0a9554f7f5fd05caceee0fa8f3c96d1c60 | [
"MIT"
] | 2 | 2020-10-25T10:06:07.000Z | 2020-10-26T18:15:20.000Z | lib/geometry/wkb.ex | hrzndhrn/geometry | bffdac0a9554f7f5fd05caceee0fa8f3c96d1c60 | [
"MIT"
] | null | null | null | defmodule Geometry.WKB do
@moduledoc false
alias Geometry.Hex
alias Geometry.WKB.Parser
@compile {:inline, byte_order: 2}
@spec byte_order(Geometry.endian(), Geometry.mode()) :: <<_::8>>
def byte_order(:xdr, :hex), do: "00"
def byte_order(:ndr, :hex), do: "01"
def byte_order(:xdr, :binary), do: <<0::... | 30.316456 | 85 | 0.606681 |
accf74cbe46e29f71b10ead8f8a59891f295b327 | 1,425 | ex | Elixir | lib/mix/module_generate.ex | akdilsiz/commodity-cloud | 08c366c9fc95fbb3565131672db4cc52f8b870c9 | [
"Apache-2.0"
] | 7 | 2019-04-11T21:12:49.000Z | 2021-04-14T12:56:42.000Z | lib/mix/module_generate.ex | akdilsiz/commodity-cloud | 08c366c9fc95fbb3565131672db4cc52f8b870c9 | [
"Apache-2.0"
] | null | null | null | lib/mix/module_generate.ex | akdilsiz/commodity-cloud | 08c366c9fc95fbb3565131672db4cc52f8b870c9 | [
"Apache-2.0"
] | 2 | 2019-06-06T18:05:33.000Z | 2019-07-16T08:49:45.000Z | ##
# Copyright 2018 Abdulkadir DILSIZ
#
# 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... | 27.403846 | 77 | 0.734035 |
accf74ef80da4f21c36a1722dedc1e67dff1b09c | 8,223 | ex | Elixir | clients/plus/lib/google_api/plus/v1/model/person.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/plus/lib/google_api/plus/v1/model/person.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/plus/lib/google_api/plus/v1/model/person.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... | 55.560811 | 413 | 0.658397 |
accf81c595a5f87daa85fd4234ce01817ca285d3 | 607 | ex | Elixir | apps/proxy/lib/proxy/node_manager.ex | vapordao/staxx | 5110167573e67a91c0865c3265896642ebe4012e | [
"Apache-2.0"
] | null | null | null | apps/proxy/lib/proxy/node_manager.ex | vapordao/staxx | 5110167573e67a91c0865c3265896642ebe4012e | [
"Apache-2.0"
] | null | null | null | apps/proxy/lib/proxy/node_manager.ex | vapordao/staxx | 5110167573e67a91c0865c3265896642ebe4012e | [
"Apache-2.0"
] | null | null | null | defmodule Staxx.Proxy.NodeManager do
@moduledoc """
Node manager behaviour
"""
@doc """
Child spec for node manager
"""
@callback child_spec() :: Supervisor.child_spec()
@doc """
Get chain node address
"""
@callback node() :: node()
@doc """
Get child specs from adapter
"""
@spec child_... | 18.393939 | 58 | 0.62603 |
accf955caf7635d61f87d4aaf3adde971690c43a | 1,921 | ex | Elixir | lib/elixir_ale/gpio.ex | CultivateHQ/dummy_nerves | 5fe11886ee21154b481dcd1326836249abb339f5 | [
"MIT"
] | 1 | 2017-05-18T20:03:51.000Z | 2017-05-18T20:03:51.000Z | lib/elixir_ale/gpio.ex | CultivateHQ/dummy_nerves | 5fe11886ee21154b481dcd1326836249abb339f5 | [
"MIT"
] | null | null | null | lib/elixir_ale/gpio.ex | CultivateHQ/dummy_nerves | 5fe11886ee21154b481dcd1326836249abb339f5 | [
"MIT"
] | null | null | null | defmodule ElixirALE.GPIO do
use GenServer
@moduledoc """
Stand in for Elixir Ale's Gpio in development and test mode
"""
defstruct pin: 0, direction: nil, pin_states: []
def start_link(pin, direction, supplied_opts \\ nil) do
opts = supplied_opts || [name: :"gpio_#{pin}"]
case Process.whereis(opt... | 25.276316 | 74 | 0.647579 |
accfd8fdc2abf7e5abdc00be45ecb87f314caa09 | 9,929 | ex | Elixir | lib/mitbits/Node.ex | siddhantmittal7/Mitbits_Cryptocurrency | b02060b1fa6ccc14730433bc4b078b8e5c752a8a | [
"MIT"
] | 2 | 2018-12-10T21:20:04.000Z | 2020-07-07T07:28:14.000Z | lib/mitbits/Node.ex | prafful13/Mitbits_Cryptocurrency | b02060b1fa6ccc14730433bc4b078b8e5c752a8a | [
"MIT"
] | null | null | null | lib/mitbits/Node.ex | prafful13/Mitbits_Cryptocurrency | b02060b1fa6ccc14730433bc4b078b8e5c752a8a | [
"MIT"
] | 1 | 2018-12-16T03:36:18.000Z | 2018-12-16T03:36:18.000Z | defmodule Mitbits.Node do
use GenServer, restart: :transient
# API
def start_link({pk, sk, genesis_block, hash_name}) do
GenServer.start_link(__MODULE__, {pk, sk, genesis_block},
name: Mitbits.Utility.string_to_atom("node_" <> hash_name)
)
end
def get_balance(hash) do
GenServer.call(Mitbit... | 30.087879 | 99 | 0.559472 |
accff35f38d4503e84d820e41e6b02547d40a072 | 1,216 | ex | Elixir | server/lib/fakers_api_web/views/error_helpers.ex | bart-kosmala/fakers | aff49689c2507a5f8e6e81441bd922ec8887bbc9 | [
"MIT"
] | 5 | 2020-11-15T17:46:40.000Z | 2021-06-15T16:10:57.000Z | server/lib/fakers_api_web/views/error_helpers.ex | bart-kosmala/fakers | aff49689c2507a5f8e6e81441bd922ec8887bbc9 | [
"MIT"
] | 5 | 2020-12-04T13:38:10.000Z | 2020-12-18T11:15:50.000Z | server/lib/fakers_api_web/views/error_helpers.ex | bart-kosmala/fakers | aff49689c2507a5f8e6e81441bd922ec8887bbc9 | [
"MIT"
] | 2 | 2020-12-18T11:16:18.000Z | 2021-01-19T22:03:35.000Z | defmodule FakersApiWeb.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 ar... | 35.764706 | 78 | 0.672697 |
accffaf36f9c084122cf5855e84c571aca125a8d | 701 | exs | Elixir | mix.exs | keshihoriuchi/paraiso | c640f0019463e8e957a36504e48ac2a6da6ea332 | [
"MIT"
] | 1 | 2020-08-12T08:18:21.000Z | 2020-08-12T08:18:21.000Z | mix.exs | keshihoriuchi/paraiso | c640f0019463e8e957a36504e48ac2a6da6ea332 | [
"MIT"
] | null | null | null | mix.exs | keshihoriuchi/paraiso | c640f0019463e8e957a36504e48ac2a6da6ea332 | [
"MIT"
] | 1 | 2020-09-04T07:48:38.000Z | 2020-09-04T07:48:38.000Z | defmodule Paraiso.MixProject do
use Mix.Project
def project do
[
app: :paraiso,
version: "0.0.8",
elixir: "~> 1.10",
deps: deps(),
package: package(),
docs: [main: "readme", extras: ["README.md"]]
]
end
def application do
[
extra_applications: [
# ... | 19.472222 | 87 | 0.563481 |
acd007523878ab56f0110ee14564a7eae8eb0f37 | 1,855 | ex | Elixir | lib/breadcrumbs/clients/jira.ex | azohra/breadcrumbs | 6466e66d5a2a8fb103db5d1d8ddf43b92d1e13a0 | [
"MIT"
] | 3 | 2018-11-09T18:18:40.000Z | 2018-12-10T21:10:21.000Z | lib/breadcrumbs/clients/jira.ex | azohra/Breadcrumbs | 6466e66d5a2a8fb103db5d1d8ddf43b92d1e13a0 | [
"MIT"
] | null | null | null | lib/breadcrumbs/clients/jira.ex | azohra/Breadcrumbs | 6466e66d5a2a8fb103db5d1d8ddf43b92d1e13a0 | [
"MIT"
] | null | null | null | defmodule Breadcrumbs.Clients.Jira do
@moduledoc false
use Tesla
use Task, restart: :transient
import Breadcrumbs.Pool, only: [distribute_request: 1]
plug(Tesla.Middleware.BaseUrl, Application.get_env(:breadcrumbs, :jira_api_url))
plug(Tesla.Middleware.Headers, [
{"content-type", "application/json"... | 24.090909 | 95 | 0.605391 |
acd01c4654dc08b34c2e28f9975a55f8f77e4614 | 72 | exs | Elixir | test/ita_web/views/page_view_test.exs | oleksandr-dyachenko/ita | e7287bb79c19b4f7e5decc4cbd5291c70ad53b8f | [
"MIT"
] | null | null | null | test/ita_web/views/page_view_test.exs | oleksandr-dyachenko/ita | e7287bb79c19b4f7e5decc4cbd5291c70ad53b8f | [
"MIT"
] | null | null | null | test/ita_web/views/page_view_test.exs | oleksandr-dyachenko/ita | e7287bb79c19b4f7e5decc4cbd5291c70ad53b8f | [
"MIT"
] | null | null | null | defmodule ItaWeb.PageViewTest do
use ItaWeb.ConnCase, async: true
end
| 18 | 34 | 0.805556 |
acd02264ef70f192a4ffca22e70b51418f8cea6d | 301 | ex | Elixir | lib/hl7/2.1/segments/nk1.ex | calvinb/elixir-hl7 | 5e953fa11f9184857c0ec4dda8662889f35a6bec | [
"Apache-2.0"
] | null | null | null | lib/hl7/2.1/segments/nk1.ex | calvinb/elixir-hl7 | 5e953fa11f9184857c0ec4dda8662889f35a6bec | [
"Apache-2.0"
] | null | null | null | lib/hl7/2.1/segments/nk1.ex | calvinb/elixir-hl7 | 5e953fa11f9184857c0ec4dda8662889f35a6bec | [
"Apache-2.0"
] | null | null | null | defmodule HL7.V2_1.Segments.NK1 do
@moduledoc false
require Logger
use HL7.Segment,
fields: [
segment: nil,
set_id_next_of_kin: nil,
next_of_kin_name: nil,
next_of_kin_relationship: nil,
next_of_kin_address: nil,
next_of_kin_phone_number: nil
]
end
| 18.8125 | 36 | 0.677741 |
acd022e831ad545dca62175b7ec8fc24b23d7530 | 3,076 | ex | Elixir | lib/database/mysql.ex | MyNameIsURL/Plsm | 9d9bd2ccd0339f42a851422eb17584d660b1361f | [
"MIT"
] | null | null | null | lib/database/mysql.ex | MyNameIsURL/Plsm | 9d9bd2ccd0339f42a851422eb17584d660b1361f | [
"MIT"
] | null | null | null | lib/database/mysql.ex | MyNameIsURL/Plsm | 9d9bd2ccd0339f42a851422eb17584d660b1361f | [
"MIT"
] | null | null | null | defmodule Plsm.Database.MySql do
defstruct server: "localhost",
port: "3306",
username: "username",
password: "password",
database_name: "db",
connection: nil
end
defimpl Plsm.Database, for: Plsm.Database.MySql do
@doc """
Create a MySql database stru... | 32.378947 | 115 | 0.637516 |
acd0590ceba88e4f4963398a3ab20b04376f674f | 13,407 | ex | Elixir | clients/drive/lib/google_api/drive/v3/api/comments.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/drive/lib/google_api/drive/v3/api/comments.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/drive/lib/google_api/drive/v3/api/comments.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.541528 | 191 | 0.62624 |
acd07a26ed4be4a0733d8e6b2cce47f42d5caca7 | 874 | ex | Elixir | b2/lib/b2_web/live/game/word_so_far.ex | jeryldev/hangman | 0beb6321ba16fe19711cdce60b9c2e486acb7e79 | [
"MIT"
] | 1 | 2022-02-22T04:56:25.000Z | 2022-02-22T04:56:25.000Z | b2/lib/b2_web/live/game/word_so_far.ex | jeryldev/hangman | 0beb6321ba16fe19711cdce60b9c2e486acb7e79 | [
"MIT"
] | null | null | null | b2/lib/b2_web/live/game/word_so_far.ex | jeryldev/hangman | 0beb6321ba16fe19711cdce60b9c2e486acb7e79 | [
"MIT"
] | null | null | null | defmodule B2Web.Live.Game.WordSoFar do
use B2Web, :live_component
@states %{
already_used: "You alrerady picked that letter",
bad_guess: "That's not in the word",
good_guess: "Good guess!",
initializing: "Type or click on your first guess",
lost: "Sorry, you lost ...",
won: "you won!"
}
... | 22.410256 | 80 | 0.535469 |
acd09e5473e5e1bd5f664f2679820ce6b7a8271c | 127 | exs | Elixir | test/test_helper.exs | vigetlabs/colonel_kurtz_ex | ed18e447657191090c9164580948bc8288c49cc7 | [
"MIT"
] | 1 | 2020-05-20T18:31:40.000Z | 2020-05-20T18:31:40.000Z | test/test_helper.exs | vigetlabs/colonel_kurtz_ex | ed18e447657191090c9164580948bc8288c49cc7 | [
"MIT"
] | 11 | 2020-05-06T13:32:43.000Z | 2020-05-15T19:18:39.000Z | test/test_helper.exs | vigetlabs/colonel_kurtz_ex | ed18e447657191090c9164580948bc8288c49cc7 | [
"MIT"
] | null | null | null | Code.require_file("support/test_config.exs", __DIR__)
Code.require_file("support/block_builders.exs", __DIR__)
ExUnit.start()
| 25.4 | 56 | 0.80315 |
acd09e731167b42fe8f7401b459d13626179c316 | 2,460 | exs | Elixir | test/map_test.exs | kianmeng/cldr_utils | e8353e473709c74fe3362a987cd615a4cd30f55c | [
"Apache-2.0"
] | null | null | null | test/map_test.exs | kianmeng/cldr_utils | e8353e473709c74fe3362a987cd615a4cd30f55c | [
"Apache-2.0"
] | null | null | null | test/map_test.exs | kianmeng/cldr_utils | e8353e473709c74fe3362a987cd615a4cd30f55c | [
"Apache-2.0"
] | null | null | null | defmodule Support.Map.Test do
use ExUnit.Case, async: true
test "that map keys are underscored" do
assert Cldr.Map.underscore_keys(%{"thisKey" => "value"}) == %{"this_key" => "value"}
end
test "that map keys are atomised" do
assert Cldr.Map.atomize_keys(%{"thisKey" => "value"}) == %{thisKey: "value"}
... | 21.964286 | 91 | 0.541463 |
acd0c9689be8a17767373b356ff498e25c6ca0bb | 2,489 | ex | Elixir | web/controllers/episode_controller.ex | kentcdodds/changelog.com | e1c0d7ee5d47dc83dd443d623adb0f07e4acb28d | [
"MIT"
] | null | null | null | web/controllers/episode_controller.ex | kentcdodds/changelog.com | e1c0d7ee5d47dc83dd443d623adb0f07e4acb28d | [
"MIT"
] | null | null | null | web/controllers/episode_controller.ex | kentcdodds/changelog.com | e1c0d7ee5d47dc83dd443d623adb0f07e4acb28d | [
"MIT"
] | null | null | null | defmodule Changelog.EpisodeController do
use Changelog.Web, :controller
alias Changelog.{Podcast, Episode}
plug RequireAdmin, "before preview" when action in [:preview]
def show(conn, %{"podcast" => podcast, "slug" => slug}) do
podcast = Repo.get_by!(Podcast, slug: podcast)
episode =
assoc(pod... | 27.351648 | 111 | 0.632382 |
acd0d35cc7ddd6db1965edcbd2ddb42aba0e144e | 370 | exs | Elixir | demo/fibonacci.exs | ceedee666/sitnl_2015 | c40d5656735284cd9a1714ed6f4a1744678244b7 | [
"MIT"
] | null | null | null | demo/fibonacci.exs | ceedee666/sitnl_2015 | c40d5656735284cd9a1714ed6f4a1744678244b7 | [
"MIT"
] | null | null | null | demo/fibonacci.exs | ceedee666/sitnl_2015 | c40d5656735284cd9a1714ed6f4a1744678244b7 | [
"MIT"
] | null | null | null | defmodule NaiveFib do
def fib(0) do 0 end
def fib(1) do 1 end
def fib(n) do
fib(n-1) + fib(n-2)
end
end
defmodule Fib do
def fib(n) when is_integer(n) and n >= 0 do
fibn(n, 1, 0)
end
defp fibn(0, _, result) do
result
end
defp fibn(n, next, result) do
fibn(n-1, next + result, ... | 14.230769 | 45 | 0.578378 |
acd0e11fbe67581b861222dc3840548809e61fa2 | 10,487 | exs | Elixir | deps/ecto/integration_test/cases/type.exs | JoakimEskils/elixir-absinthe | d81e24ec7c7b1164e6d152101dd50422f192d7e9 | [
"MIT"
] | 1 | 2017-11-27T06:00:32.000Z | 2017-11-27T06:00:32.000Z | deps/ecto/integration_test/cases/type.exs | JoakimEskils/elixir-absinthe | d81e24ec7c7b1164e6d152101dd50422f192d7e9 | [
"MIT"
] | null | null | null | deps/ecto/integration_test/cases/type.exs | JoakimEskils/elixir-absinthe | d81e24ec7c7b1164e6d152101dd50422f192d7e9 | [
"MIT"
] | null | null | null | Code.require_file "../support/types.exs", __DIR__
defmodule Ecto.Integration.TypeTest do
use Ecto.Integration.Case, async: Application.get_env(:ecto, :async_integration_tests, true)
alias Ecto.Integration.{Custom, Item, Order, Post, User, Tag}
alias Ecto.Integration.TestRepo
import Ecto.Query
test "primiti... | 39.573585 | 111 | 0.620673 |
acd10b56a66907afb1f7afc24ac582dab01434f2 | 76 | exs | Elixir | test/fatex_web/views/page_view_test.exs | vinicius-molina/FaTex | bbc05acef7a9697efe9ec0fe64511bce9f26a9b3 | [
"Apache-2.0"
] | 3 | 2019-12-08T19:42:39.000Z | 2020-03-17T13:02:56.000Z | test/fatex_web/views/page_view_test.exs | vinicius-molina/FaTex | bbc05acef7a9697efe9ec0fe64511bce9f26a9b3 | [
"Apache-2.0"
] | 1 | 2021-03-09T19:49:41.000Z | 2021-03-09T19:49:41.000Z | test/fatex_web/views/page_view_test.exs | vinicius-molina/FaTex | bbc05acef7a9697efe9ec0fe64511bce9f26a9b3 | [
"Apache-2.0"
] | 1 | 2019-12-08T19:42:42.000Z | 2019-12-08T19:42:42.000Z | defmodule FatexWeb.PageViewTest do
use FatexWeb.ConnCase, async: true
end
| 19 | 36 | 0.815789 |
acd10eaaf24497d1e5d4fe166433dd512b9b2dcb | 238 | ex | Elixir | lib/phone/br/al.ex | net/phone | 18e1356d2f8d32fe3f95638c3c44bceab0164fb2 | [
"Apache-2.0"
] | null | null | null | lib/phone/br/al.ex | net/phone | 18e1356d2f8d32fe3f95638c3c44bceab0164fb2 | [
"Apache-2.0"
] | null | null | null | lib/phone/br/al.ex | net/phone | 18e1356d2f8d32fe3f95638c3c44bceab0164fb2 | [
"Apache-2.0"
] | null | null | null | defmodule Phone.BR.AL do
@moduledoc false
use Helper.Area
def regex, do: ~r/^(55)(82)([2-5|89].{7}|9[89].{7})$/
def area_name, do: "Alagoas"
def area_type, do: "state"
def area_abbreviation, do: "AL"
matcher ["5582"]
end
| 18.307692 | 55 | 0.62605 |
acd131c3db8e775f185dc3bba983cab37a2d6384 | 2,193 | ex | Elixir | lib/otp_demo_web.ex | moroz/phoenix-totp-demo | b07b1925a1116ecbade15cb37764e4aebf442b5b | [
"MIT"
] | null | null | null | lib/otp_demo_web.ex | moroz/phoenix-totp-demo | b07b1925a1116ecbade15cb37764e4aebf442b5b | [
"MIT"
] | null | null | null | lib/otp_demo_web.ex | moroz/phoenix-totp-demo | b07b1925a1116ecbade15cb37764e4aebf442b5b | [
"MIT"
] | null | null | null | defmodule OtpDemoWeb do
@moduledoc """
The entrypoint for defining your web interface, such
as controllers, views, channels and so on.
This can be used in your application as:
use OtpDemoWeb, :controller
use OtpDemoWeb, :view
The definitions below will be executed for every view,
controller, ... | 23.084211 | 81 | 0.684451 |
acd135a34d14fed8c6c0e56a072738f7ee267387 | 1,751 | ex | Elixir | clients/test_client/lib/google_api/test_client/v2/model/date_container.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/test_client/lib/google_api/test_client/v2/model/date_container.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/test_client/lib/google_api/test_client/v2/model/date_container.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 ... | 33.037736 | 88 | 0.712164 |
acd141459cf809c671aa5d639d69898c913b54db | 956 | ex | Elixir | lib/wax_api_rest/types/error.ex | tanguilp/wax_api_rest | c5580775afe2bad91e49083a80629da043258dd5 | [
"Apache-2.0"
] | null | null | null | lib/wax_api_rest/types/error.ex | tanguilp/wax_api_rest | c5580775afe2bad91e49083a80629da043258dd5 | [
"Apache-2.0"
] | null | null | null | lib/wax_api_rest/types/error.ex | tanguilp/wax_api_rest | c5580775afe2bad91e49083a80629da043258dd5 | [
"Apache-2.0"
] | null | null | null | defmodule WaxAPIREST.Types.Error do
defmodule MissingField do
@enforce_keys [:field]
defexception [:field]
@type t :: %__MODULE__{
field: String.t()
}
@impl true
def message(%{field: field}) do
"missing mandatory field `#{field}`"
end
end
defmodule InvalidField do
@e... | 25.157895 | 91 | 0.603556 |
acd154f6db165b2e9e2a0de4ffbcc31a649e23cc | 5,265 | ex | Elixir | clients/health_care/lib/google_api/health_care/v1/model/hl7_v2_notification_config.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/health_care/lib/google_api/health_care/v1/model/hl7_v2_notification_config.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/health_care/lib/google_api/health_care/v1/model/hl7_v2_notification_config.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 105.3 | 2,720 | 0.750427 |
acd161834bf54aa7b5ccb6528eb1138f55c11734 | 1,570 | exs | Elixir | snippets/test.exs | sgeos/simplex_noise | b2fe2da0436d8e824bb398c39170c7ca44d9b215 | [
"CC0-1.0"
] | 7 | 2016-09-06T23:15:19.000Z | 2020-11-12T13:59:00.000Z | snippets/test.exs | sgeos/simplex_noise | b2fe2da0436d8e824bb398c39170c7ca44d9b215 | [
"CC0-1.0"
] | null | null | null | snippets/test.exs | sgeos/simplex_noise | b2fe2da0436d8e824bb398c39170c7ca44d9b215 | [
"CC0-1.0"
] | 1 | 2019-10-28T18:53:34.000Z | 2019-10-28T18:53:34.000Z |
[0, 0, 1, 0, 2, 0, 1, 0] = 0..7
|> Enum.map(&({&1 &&& 1, (&1 &&& 2) >>> 1, (&1 &&& 4) >>> 2}))
|> Enum.map(&SimplexNoiseReference.hi/1)
[0, 0, 1, 0, 2, 0, 1, 0] = 0..7
|> Enum.map(&([&1 &&& 1, (&1 &&& 2) >>> 1, (&1 &&& 4) >>> 2]))
|> Enum.map(&SimplexNoiseReference2.hi/1)
[2, 2, 2, 2, 1, 1, 0, 2] = 0..7
|>... | 35.681818 | 66 | 0.407006 |
acd1758555dc42c0261da9dcb307b91cb1e7680c | 532 | ex | Elixir | lib/10_parse/hooks.ex | marick/ecto_test_dsl | 6d460af093367098b7c78db709753deb45904d77 | [
"Unlicense"
] | 4 | 2021-02-09T17:26:34.000Z | 2021-08-08T01:42:52.000Z | lib/10_parse/hooks.ex | marick/transformer_test_support | 6d460af093367098b7c78db709753deb45904d77 | [
"Unlicense"
] | null | null | null | lib/10_parse/hooks.ex | marick/transformer_test_support | 6d460af093367098b7c78db709753deb45904d77 | [
"Unlicense"
] | null | null | null | defmodule EctoTestDSL.Parse.Hooks do
use EctoTestDSL.Drink.Me
# ----------------------------------------------------------------------------
def run_hook(%{variant: variant} = test_data, hook_name, rest_args) do
apply variant, :hook, [hook_name, test_data, rest_args]
end
# This allows tests not to cre... | 26.6 | 80 | 0.612782 |
acd179f58658336956eaf5dbc083b253df77e304 | 327 | exs | Elixir | test/test_helper.exs | mnishiguchi/sht4x | 4533e4e8dc8b75d13a0a74eb6bd1ee73d436a5c7 | [
"MIT"
] | 2 | 2021-08-23T15:21:55.000Z | 2021-12-02T16:12:34.000Z | test/test_helper.exs | mnishiguchi/sht4x | 4533e4e8dc8b75d13a0a74eb6bd1ee73d436a5c7 | [
"MIT"
] | null | null | null | test/test_helper.exs | mnishiguchi/sht4x | 4533e4e8dc8b75d13a0a74eb6bd1ee73d436a5c7 | [
"MIT"
] | null | null | null | # Always warning as errors
if Version.match?(System.version(), "~> 1.10") do
Code.put_compiler_option(:warnings_as_errors, true)
end
# Define dynamic mocks
Mox.defmock(SHT4X.MockTransport, for: SHT4X.Transport)
# Override the config settings
Application.put_env(:sht4x, :transport_mod, SHT4X.MockTransport)
ExUnit.s... | 25.153846 | 64 | 0.776758 |
acd1b14661dc2640cb781aa9b3e8f574ba811dd4 | 2,250 | exs | Elixir | test/algorithms/levenshtein_test.exs | vanessaklee/akin | fc97befb871536b6c7ef0b35740fe6efc032c566 | [
"Apache-2.0"
] | 8 | 2021-10-31T21:24:37.000Z | 2022-02-27T05:30:24.000Z | test/algorithms/levenshtein_test.exs | vanessaklee/akin | fc97befb871536b6c7ef0b35740fe6efc032c566 | [
"Apache-2.0"
] | 1 | 2021-10-31T17:57:41.000Z | 2021-11-09T22:54:50.000Z | test/algorithms/levenshtein_test.exs | vanessaklee/akin | fc97befb871536b6c7ef0b35740fe6efc032c566 | [
"Apache-2.0"
] | null | null | null | defmodule LevenshteinTest do
use ExUnit.Case
import Akin.Levenshtein, only: [compare: 3]
alias Akin.Corpus
test "returns nil with empty arguments" do
assert compare(%Corpus{string: ""}, %Corpus{string: ""}, []) == 1
assert compare(%Corpus{string: "abc"}, %Corpus{string: ""}, []) == 0.0
assert compa... | 44.117647 | 99 | 0.596444 |
acd1b41024e74720be8eb91ae2248b1a734291b9 | 7,008 | ex | Elixir | app_builder/lib/app_builder/macos.ex | admariner/livebook | 4ba81cc1149493afed4b7ca5bd26c2c314a683f8 | [
"Apache-2.0"
] | 657 | 2021-07-15T07:38:37.000Z | 2022-03-31T16:47:48.000Z | app_builder/lib/app_builder/macos.ex | livebook-dev/livebook | 4ba81cc1149493afed4b7ca5bd26c2c314a683f8 | [
"Apache-2.0"
] | 411 | 2021-07-15T07:41:54.000Z | 2022-03-31T21:34:22.000Z | app_builder/lib/app_builder/macos.ex | admariner/livebook | 4ba81cc1149493afed4b7ca5bd26c2c314a683f8 | [
"Apache-2.0"
] | 112 | 2021-07-16T02:13:21.000Z | 2022-03-30T01:25:08.000Z | defmodule AppBuilder.MacOS do
@moduledoc false
import AppBuilder.Utils
def build_mac_app_dmg(release, options) do
{codesign, options} = Keyword.pop(options, :codesign)
{notarize, options} = Keyword.pop(options, :notarize)
release = build_mac_app(release, options)
app_name = Keyword.fetch!(opti... | 28.839506 | 108 | 0.587471 |
acd1b760ea1ffe3e5ec39018c42bd91e462bc009 | 359 | ex | Elixir | lib/octopus_web/views/user_view.ex | ubudget/octopus | 84087fbb6bfd5e7611583d7c1098e18d4239f036 | [
"MIT"
] | null | null | null | lib/octopus_web/views/user_view.ex | ubudget/octopus | 84087fbb6bfd5e7611583d7c1098e18d4239f036 | [
"MIT"
] | null | null | null | lib/octopus_web/views/user_view.ex | ubudget/octopus | 84087fbb6bfd5e7611583d7c1098e18d4239f036 | [
"MIT"
] | null | null | null | defmodule OctopusWeb.UserView do
use OctopusWeb, :view
alias OctopusWeb.UserView
def render("show.json", %{user: user}) do
%{data: render_one(user, UserView, "user.json")}
end
def render("user.json", %{user: user}) do
%{id: user.id, name: user.name, email: user.email}
end
def render("ok.json", ... | 21.117647 | 54 | 0.651811 |
acd1bcd66d67127c3a169d9f663bd4e2630c7c1c | 1,468 | ex | Elixir | lib/thumbox.ex | webdeb/thumbox | 9cb6e768ddc1862c67cea201e7f9816a9145e77b | [
"MIT"
] | 1 | 2018-05-02T07:40:28.000Z | 2018-05-02T07:40:28.000Z | lib/thumbox.ex | webdeb/thumbox | 9cb6e768ddc1862c67cea201e7f9816a9145e77b | [
"MIT"
] | 1 | 2022-01-29T08:41:15.000Z | 2022-01-29T08:41:15.000Z | lib/thumbox.ex | webdeb/thumbox | 9cb6e768ddc1862c67cea201e7f9816a9145e77b | [
"MIT"
] | null | null | null | defmodule Thumbox do
@moduledoc """
Documentation for Thumbox.
## Config
```
config :thumbox,
server: "https://thumbor.example.com",
# or just 'app' if thumbor can access it in the network
origin: "my-app.com:4000",
secret: "secret",
types: %{
big: "300x300/smart",
... | 26.214286 | 151 | 0.613079 |
acd1d480106432fc8ac3381e8551b09e01b4e4c6 | 614 | ex | Elixir | lib/code_corps/model/project_skill.ex | fikape/code-corps-api | c21674b0b2a19fa26945c94268db8894420ca181 | [
"MIT"
] | 275 | 2015-06-23T00:20:51.000Z | 2021-08-19T16:17:37.000Z | lib/code_corps/model/project_skill.ex | fikape/code-corps-api | c21674b0b2a19fa26945c94268db8894420ca181 | [
"MIT"
] | 1,304 | 2015-06-26T02:11:54.000Z | 2019-12-12T21:08:00.000Z | lib/code_corps/model/project_skill.ex | fikape/code-corps-api | c21674b0b2a19fa26945c94268db8894420ca181 | [
"MIT"
] | 140 | 2016-01-01T18:19:47.000Z | 2020-11-22T06:24:47.000Z | defmodule CodeCorps.ProjectSkill do
use CodeCorps.Model
@type t :: %__MODULE__{}
schema "project_skills" do
belongs_to :project, CodeCorps.Project
belongs_to :skill, CodeCorps.Skill
timestamps()
end
@doc """
Builds a changeset based on the `struct` and `params`.
"""
def create_changeset(... | 24.56 | 83 | 0.692182 |
acd1d6ab85a60d0116ef4b2ab7b810d639bbec13 | 896 | ex | Elixir | clients/network_security/lib/google_api/network_security/v1/metadata.ex | mopp/elixir-google-api | d496227d17600bccbdf8f6be9ad1b7e7219d7ec6 | [
"Apache-2.0"
] | null | null | null | clients/network_security/lib/google_api/network_security/v1/metadata.ex | mopp/elixir-google-api | d496227d17600bccbdf8f6be9ad1b7e7219d7ec6 | [
"Apache-2.0"
] | null | null | null | clients/network_security/lib/google_api/network_security/v1/metadata.ex | mopp/elixir-google-api | d496227d17600bccbdf8f6be9ad1b7e7219d7ec6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 33.185185 | 74 | 0.762277 |
acd1e382963729ec8449f7e75ee3195057713e30 | 1,915 | ex | Elixir | lib/html_parser/transform/tag_open.ex | camshaft/ex_htmlparser | d2155a0cf838915e439335416dc6f2b998aeb51d | [
"MIT"
] | null | null | null | lib/html_parser/transform/tag_open.ex | camshaft/ex_htmlparser | d2155a0cf838915e439335416dc6f2b998aeb51d | [
"MIT"
] | null | null | null | lib/html_parser/transform/tag_open.ex | camshaft/ex_htmlparser | d2155a0cf838915e439335416dc6f2b998aeb51d | [
"MIT"
] | null | null | null | defmodule HTMLParser.Transform.TagOpen do
use HTMLParser.Transform
defmodule MapFirst do
defstruct []
defimpl Collectable do
def into(_) do
{%{}, fn
map, {:cont, {k, v}} -> Map.put_new(map, k, v)
map, :done -> map
_, :halt -> :ok
end}
end
end
... | 27.753623 | 107 | 0.622454 |
acd20963e2d78793321344098955bbfb6ddae8d5 | 2,000 | ex | Elixir | clients/data_labeling/lib/google_api/data_labeling/v1beta1/model/google_cloud_datalabeling_v1p2alpha1_label_video_event_operation_metadata.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/data_labeling/lib/google_api/data_labeling/v1beta1/model/google_cloud_datalabeling_v1p2alpha1_label_video_event_operation_metadata.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/data_labeling/lib/google_api/data_labeling/v1beta1/model/google_cloud_datalabeling_v1p2alpha1_label_video_event_operation_metadata.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 34.482759 | 201 | 0.778 |
acd20ae866776d6d59ee524f1e09d252a7c987a1 | 3,630 | exs | Elixir | deps/db_connection/integration_test/cases/backoff_test.exs | scouten/crash_esqlite_case | 986f0b0721399c7ed520f6b9df133980906e3f51 | [
"MIT"
] | null | null | null | deps/db_connection/integration_test/cases/backoff_test.exs | scouten/crash_esqlite_case | 986f0b0721399c7ed520f6b9df133980906e3f51 | [
"MIT"
] | null | null | null | deps/db_connection/integration_test/cases/backoff_test.exs | scouten/crash_esqlite_case | 986f0b0721399c7ed520f6b9df133980906e3f51 | [
"MIT"
] | null | null | null | defmodule BackoffTest do
use ExUnit.Case, async: true
alias TestPool, as: P
alias TestAgent, as: A
test "backoff after failed initial connection attempt" do
err = RuntimeError.exception("oops")
stack = [
fn(opts) ->
send(opts[:parent], {:error, self()})
{:error, err}
end,
... | 27.089552 | 78 | 0.555923 |
acd22bc230fb398c8edb120fa9fb60f1e8f35362 | 456 | exs | Elixir | test/pummpcomm/history/change_other_device_id_test.exs | infinity-aps/pummpcomm | 7380585ecd110ab1c19d2aea3880e51e3f433050 | [
"MIT"
] | 15 | 2017-08-31T00:58:47.000Z | 2020-01-12T03:53:13.000Z | test/pummpcomm/history/change_other_device_id_test.exs | vladhj38/pummpcomm | 7380585ecd110ab1c19d2aea3880e51e3f433050 | [
"MIT"
] | 1 | 2017-09-15T02:09:31.000Z | 2017-09-15T02:09:31.000Z | test/pummpcomm/history/change_other_device_id_test.exs | vladhj38/pummpcomm | 7380585ecd110ab1c19d2aea3880e51e3f433050 | [
"MIT"
] | 3 | 2017-09-10T17:24:59.000Z | 2019-09-10T19:41:49.000Z | defmodule Pummpcomm.History.ChangeOtherDeviceIDTest do
use ExUnit.Case
test "Change Other Device ID" do
{:ok, history_page} =
Base.decode16("7D000040008108000000000000000000000000000000000000000000000000000000000000")
decoded_events = Pummpcomm.History.decode_records(history_page, %{})
assert {... | 32.571429 | 97 | 0.741228 |
acd2327538a7e0abe45a25064168982b8fcee23e | 10,058 | ex | Elixir | lib/ex_unit/lib/ex_unit/runner.ex | pap/elixir | c803afe90c766663823c74397fb23ed40ec52c5b | [
"Apache-2.0"
] | null | null | null | lib/ex_unit/lib/ex_unit/runner.ex | pap/elixir | c803afe90c766663823c74397fb23ed40ec52c5b | [
"Apache-2.0"
] | null | null | null | lib/ex_unit/lib/ex_unit/runner.ex | pap/elixir | c803afe90c766663823c74397fb23ed40ec52c5b | [
"Apache-2.0"
] | null | null | null | defmodule ExUnit.Runner do
@moduledoc false
alias ExUnit.EventManager, as: EM
def run(async, sync, opts, load_us) do
{opts, config} = configure(opts)
:erlang.system_flag(:backtrace_depth,
Keyword.fetch!(opts, :stacktrace_depth))
{run_us, _} =
:timer.tc fn ->
E... | 28.016713 | 98 | 0.601511 |
acd2749cb3b6bc06b5017a9f5ee1ce2516a4d49e | 89 | ex | Elixir | apps/forklift/lib/forklift.ex | PillarTechnology/smartcitiesdata | 9420a26820e38267513cd1bfa82c7f5583222bb1 | [
"Apache-2.0"
] | 1 | 2021-04-05T19:17:18.000Z | 2021-04-05T19:17:18.000Z | apps/forklift/lib/forklift.ex | AWHServiceAccount/smartcitiesdata | 6957afac12809288640b6ba6b576c3016e6033d7 | [
"Apache-2.0"
] | 11 | 2020-01-07T15:43:42.000Z | 2020-12-22T15:23:25.000Z | apps/forklift/lib/forklift.ex | jakeprem/smartcitiesdata | da309ac0d2261527278951cbae88604455207589 | [
"Apache-2.0"
] | null | null | null | defmodule Forklift do
@moduledoc false
def instance_name do
:forklift
end
end
| 11.125 | 22 | 0.730337 |
acd297e1a8f492560ebb4d3928db03be52d90a05 | 822 | exs | Elixir | test/json_schema_test_suite/draft7/optional/format/uri_template_test.exs | hrzndhrn/json_xema | 955eab7b0919d144b38364164d90275201c89474 | [
"MIT"
] | 54 | 2019-03-10T19:51:07.000Z | 2021-12-23T07:31:09.000Z | test/json_schema_test_suite/draft7/optional/format/uri_template_test.exs | hrzndhrn/json_xema | 955eab7b0919d144b38364164d90275201c89474 | [
"MIT"
] | 36 | 2018-05-20T09:13:20.000Z | 2021-03-14T15:22:03.000Z | test/json_schema_test_suite/draft7/optional/format/uri_template_test.exs | hrzndhrn/json_xema | 955eab7b0919d144b38364164d90275201c89474 | [
"MIT"
] | 3 | 2019-04-12T09:08:51.000Z | 2019-12-04T01:23:56.000Z | defmodule JsonSchemaTestSuite.Draft7.Optional.Format.UriTemplateTest do
use ExUnit.Case
import JsonXema, only: [valid?: 2]
describe ~s|format: uri-template| do
setup do
%{schema: JsonXema.new(%{"format" => "uri-template"})}
end
test ~s|a valid uri-template|, %{schema: schema} do
assert ... | 29.357143 | 76 | 0.656934 |
acd29a57fa82439e6e29e15cb912d032da0bee31 | 534 | ex | Elixir | lib/surgex/surgeries/photo.ex | fiqus/surgex | af3ec37459abd3f17c7e9a826ca1abef1dd5fb44 | [
"MIT"
] | 8 | 2019-05-11T19:41:06.000Z | 2020-01-20T07:01:53.000Z | lib/surgex/surgeries/photo.ex | fiqus/surgex | af3ec37459abd3f17c7e9a826ca1abef1dd5fb44 | [
"MIT"
] | 12 | 2019-05-10T22:00:40.000Z | 2019-07-05T19:20:56.000Z | lib/surgex/surgeries/photo.ex | fiqus/surgex | af3ec37459abd3f17c7e9a826ca1abef1dd5fb44 | [
"MIT"
] | 1 | 2019-07-18T15:58:41.000Z | 2019-07-18T15:58:41.000Z | defmodule Surgex.Surgeries.Photo do
use Ecto.Schema
import Ecto.Changeset
alias Surgex.Surgeries.Surgery
@primary_key {:id, :binary_id, autogenerate: true}
@foreign_key_type :binary_id
schema "photos" do
field :filename, :string
field :md5, :string
belongs_to(:surgery, Surgery)
timestamps(... | 22.25 | 56 | 0.689139 |
acd29c1f74b1d4e667df5e9dbc49a7298c2fb9e9 | 1,017 | ex | Elixir | lib/etl/type/map.ex | bbalser/etl | 24791047ca0ce8066ec73c4196e54e954b1a1471 | [
"Apache-2.0"
] | 1 | 2020-06-15T22:41:37.000Z | 2020-06-15T22:41:37.000Z | lib/etl/type/map.ex | inhindsight/etl | 24791047ca0ce8066ec73c4196e54e954b1a1471 | [
"Apache-2.0"
] | 1 | 2020-09-11T12:24:12.000Z | 2020-09-12T11:14:27.000Z | lib/etl/type/map.ex | bbalser/etl | 24791047ca0ce8066ec73c4196e54e954b1a1471 | [
"Apache-2.0"
] | null | null | null | defmodule Etl.Type.Map do
@type t :: %__MODULE__{
name: String.t(),
description: String.t(),
dictionary: Etl.Dictionary.t(),
nils: boolean()
}
defstruct name: nil, description: nil, dictionary: nil, nils: true
defimpl Etl.Type do
import Brex.Result.Base, only:... | 25.425 | 68 | 0.582104 |
acd2b3ac76ec406a4f44016b5fc59083a7abc80c | 1,070 | ex | Elixir | lib/glimesh/jobs/stream_pruner_cron.ex | Megami-Studios/glimesh.tv | 57dde3a328fabdcc3305be48ae1b82df27b83c9b | [
"MIT"
] | 328 | 2020-07-23T22:13:49.000Z | 2022-03-31T21:22:28.000Z | lib/glimesh/jobs/stream_pruner_cron.ex | Megami-Studios/glimesh.tv | 57dde3a328fabdcc3305be48ae1b82df27b83c9b | [
"MIT"
] | 362 | 2020-07-23T22:38:38.000Z | 2022-03-24T02:11:16.000Z | lib/glimesh/jobs/stream_pruner_cron.ex | Megami-Studios/glimesh.tv | 57dde3a328fabdcc3305be48ae1b82df27b83c9b | [
"MIT"
] | 72 | 2020-07-23T22:50:46.000Z | 2022-02-02T11:59:32.000Z | defmodule Glimesh.Jobs.StreamPrunerCron do
@moduledoc false
@behaviour Rihanna.Job
require Logger
alias Glimesh.ChannelLookups
alias Glimesh.Streams
# 5 Minutes in milliseconds
@interval 300_000
# 5 Minutes in seconds
@prune_diff 300
def perform(_) do
channels = ChannelLookups.list_live_chan... | 24.883721 | 78 | 0.680374 |
acd2e6f480476327ea22c37cd5cf495847e633ea | 786 | ex | Elixir | lib/live_beats/songs_cleaner.ex | dsdshcym/live_beats | 554c97fde490b75cf1868e152a73f4066d8470b6 | [
"MIT"
] | 547 | 2022-02-02T14:11:31.000Z | 2022-03-31T12:34:03.000Z | lib/live_beats/songs_cleaner.ex | dsdshcym/live_beats | 554c97fde490b75cf1868e152a73f4066d8470b6 | [
"MIT"
] | 24 | 2022-02-02T14:11:36.000Z | 2022-02-23T20:14:43.000Z | lib/live_beats/songs_cleaner.ex | dsdshcym/live_beats | 554c97fde490b75cf1868e152a73f4066d8470b6 | [
"MIT"
] | 63 | 2022-02-02T15:59:36.000Z | 2022-03-23T05:30:43.000Z | defmodule LiveBeats.SongsCleaner do
@moduledoc """
Expire user songs using a polling interval.
"""
use GenServer
alias LiveBeats.MediaLibrary
@poll_interval :timer.minutes(30)
def start_link(opts) do
GenServer.start_link(__MODULE__, opts, name: __MODULE__)
end
@impl true
def init(opts) do
... | 24.5625 | 80 | 0.716285 |
acd309bd668f60c691f648139afc705e35fc9a61 | 202 | ex | Elixir | backend/lib/caffe/menu/models/image.ex | eeng/caffe | d85d0dd56a8204c715052ddaf3d990e47c5df0e9 | [
"MIT"
] | 7 | 2020-03-27T08:26:52.000Z | 2021-08-29T09:50:31.000Z | backend/lib/caffe/menu/models/image.ex | eeng/caffe | d85d0dd56a8204c715052ddaf3d990e47c5df0e9 | [
"MIT"
] | null | null | null | backend/lib/caffe/menu/models/image.ex | eeng/caffe | d85d0dd56a8204c715052ddaf3d990e47c5df0e9 | [
"MIT"
] | null | null | null | defmodule Caffe.Menu.Image do
use Arc.Definition
use Arc.Ecto.Definition
@versions [:original]
def storage_dir(_version, {_file, scope}) do
"priv/uploads/menu/items/#{scope.id}"
end
end
| 18.363636 | 46 | 0.712871 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.