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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
79dadc482e9a7ec6097af0304d646f4986924e44 | 788 | ex | Elixir | apps/app1/test/support/conn_case.ex | jschoch/umb | 98e4ca8b883777c775d2b1115ae5116cc32570fe | [
"MIT"
] | null | null | null | apps/app1/test/support/conn_case.ex | jschoch/umb | 98e4ca8b883777c775d2b1115ae5116cc32570fe | [
"MIT"
] | null | null | null | apps/app1/test/support/conn_case.ex | jschoch/umb | 98e4ca8b883777c775d2b1115ae5116cc32570fe | [
"MIT"
] | null | null | null | defmodule App1.ConnCase do
@moduledoc """
This module defines the test case to be used by
tests that require setting up a connection.
Such tests rely on `Phoenix.ConnTest` and also
imports other functionality to make it easier
to build and query models.
Finally, if the test case interacts with the datab... | 22.514286 | 56 | 0.717005 |
79dae45bfed8e5d9074f91c1bb702118d151a219 | 1,496 | ex | Elixir | clients/big_query/lib/google_api/big_query/v2/model/table_list_view.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/big_query/lib/google_api/big_query/v2/model/table_list_view.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/big_query/lib/google_api/big_query/v2/model/table_list_view.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... | 31.166667 | 123 | 0.743316 |
79daffd1da43bee4ce10c5068d7717db1786ffeb | 1,125 | exs | Elixir | config/config.exs | siddhantmittal7/Mitbits_Cryptocurrency | b02060b1fa6ccc14730433bc4b078b8e5c752a8a | [
"MIT"
] | 2 | 2018-12-10T21:20:04.000Z | 2020-07-07T07:28:14.000Z | config/config.exs | prafful13/Mitbits_Cryptocurrency | b02060b1fa6ccc14730433bc4b078b8e5c752a8a | [
"MIT"
] | null | null | null | config/config.exs | prafful13/Mitbits_Cryptocurrency | b02060b1fa6ccc14730433bc4b078b8e5c752a8a | [
"MIT"
] | 1 | 2018-12-16T03:36:18.000Z | 2018-12-16T03:36:18.000Z | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the paren... | 36.290323 | 73 | 0.750222 |
79db1c0d5353000ed87b6098c018cd6dbf6da2ee | 554 | exs | Elixir | tests/elixir/ifsc_acceptance_test.exs | gyanesh-m/ifsc | 7e07f3ea07cc819e90f4e908b68cc94b24a2c440 | [
"MIT"
] | null | null | null | tests/elixir/ifsc_acceptance_test.exs | gyanesh-m/ifsc | 7e07f3ea07cc819e90f4e908b68cc94b24a2c440 | [
"MIT"
] | 4 | 2020-12-31T09:10:55.000Z | 2022-02-26T10:09:48.000Z | tests/elixir/ifsc_acceptance_test.exs | gyanesh-m/ifsc | 7e07f3ea07cc819e90f4e908b68cc94b24a2c440 | [
"MIT"
] | null | null | null | defmodule IFSCAcceptanceTest do
use ExUnit.Case
alias Razorpay.IFSC
describe "acceptance" do
tests = Poison.decode!(File.read!("tests/validator_asserts.json"))
Enum.map(tests, fn({name, cases}) ->
cases = Macro.escape(cases)
test name do
Enum.map(unquote(Macro.expand(cases, __MODULE_... | 25.181818 | 79 | 0.592058 |
79db1c56db51463112c938d13704a8498ded5064 | 30 | ex | Elixir | testData/org/elixir_lang/parser_definition/interpolated_words_heredoc_parsing_test_case/WhitespaceEndPrefix.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 1,668 | 2015-01-03T05:54:27.000Z | 2022-03-25T08:01:20.000Z | testData/org/elixir_lang/parser_definition/interpolated_words_heredoc_parsing_test_case/WhitespaceEndPrefix.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 2,018 | 2015-01-01T22:43:39.000Z | 2022-03-31T20:13:08.000Z | testData/org/elixir_lang/parser_definition/interpolated_words_heredoc_parsing_test_case/WhitespaceEndPrefix.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 145 | 2015-01-15T11:37:16.000Z | 2021-12-22T05:51:02.000Z | ~w"""
one
two"""
""" | 7.5 | 9 | 0.233333 |
79db56483d112418cc31d2ce7613655c13857faf | 2,333 | ex | Elixir | lib/2020/day7.ex | hallski/adventofcode | 03efb385688e8072b0b44d35012297833498f799 | [
"MIT"
] | null | null | null | lib/2020/day7.ex | hallski/adventofcode | 03efb385688e8072b0b44d35012297833498f799 | [
"MIT"
] | null | null | null | lib/2020/day7.ex | hallski/adventofcode | 03efb385688e8072b0b44d35012297833498f799 | [
"MIT"
] | null | null | null | defmodule AdventOfCode.Y2020.Day7 do
defstruct type: "", children: []
alias AdventOfCode.Y2020.Day7
alias AdventOfCode.Helpers.Data
def run() do
IO.puts("Part1: #{run1()}")
IO.puts("Part2: #{run2()}")
end
def run1() do
process_input()
|> get_valid("shiny gold")
|> Enum.count()
end
... | 26.816092 | 87 | 0.624946 |
79db5fbcd13a4bffbb2ff519eb1ca6691daf607b | 311 | exs | Elixir | apps/train_loc/lib/mix/tasks/infer_blocks.exs | paulswartz/commuter_rail_boarding | 6be34c192d6a1ee980307d9f3d027bf4cdafa53f | [
"MIT"
] | 1 | 2022-01-30T20:53:07.000Z | 2022-01-30T20:53:07.000Z | apps/train_loc/lib/mix/tasks/infer_blocks.exs | paulswartz/commuter_rail_boarding | 6be34c192d6a1ee980307d9f3d027bf4cdafa53f | [
"MIT"
] | 47 | 2021-05-05T10:31:05.000Z | 2022-03-30T22:18:14.000Z | apps/train_loc/lib/mix/tasks/infer_blocks.exs | paulswartz/commuter_rail_boarding | 6be34c192d6a1ee980307d9f3d027bf4cdafa53f | [
"MIT"
] | 1 | 2021-05-14T00:35:08.000Z | 2021-05-14T00:35:08.000Z | defmodule Mix.Tasks.InferBlocks do
use Mix.Task
alias TrainLoc.LogAnalyzer.BlockInferrer
@shortdoc "Infers blocks from vehicle assignment logs"
def run(logs_file_path) do
blocks =
logs_file_path
|> File.read!()
|> BlockInferrer.run()
IO.puts(Jason.encode!(blocks))
end
end
| 20.733333 | 56 | 0.697749 |
79db7d53b24c6a0beed7f6432b67f83d02e067f2 | 74 | ex | Elixir | testData/org/elixir_lang/parser_definition/matched_two_operation_parsing_test_case/DecimalFloat.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 1,668 | 2015-01-03T05:54:27.000Z | 2022-03-25T08:01:20.000Z | testData/org/elixir_lang/parser_definition/matched_two_operation_parsing_test_case/DecimalFloat.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 2,018 | 2015-01-01T22:43:39.000Z | 2022-03-31T20:13:08.000Z | testData/org/elixir_lang/parser_definition/matched_two_operation_parsing_test_case/DecimalFloat.ex | keyno63/intellij-elixir | 4033e319992c53ddd42a683ee7123a97b5e34f02 | [
"Apache-2.0"
] | 145 | 2015-01-15T11:37:16.000Z | 2021-12-22T05:51:02.000Z | 1.2e3 ++ 4.5+6
7.8e9 -- 10.11e-12
13.14e15..16.17e18
19.20e21 <> 22.23e24
| 14.8 | 20 | 0.621622 |
79db8d69dc6ee372fef3e22025a9f95a37b935b7 | 705 | exs | Elixir | priv/repo/migrations/20210312220005_create_activity_registrations_projects.exs | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | 45 | 2020-04-17T15:40:27.000Z | 2022-03-25T00:13:30.000Z | priv/repo/migrations/20210312220005_create_activity_registrations_projects.exs | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | 944 | 2020-02-13T02:37:01.000Z | 2022-03-31T17:50:07.000Z | priv/repo/migrations/20210312220005_create_activity_registrations_projects.exs | malav2110/oli-torus | 8af64e762a7c8a2058bd27a7ab8e96539ffc055f | [
"MIT"
] | 23 | 2020-07-28T03:36:13.000Z | 2022-03-17T14:29:02.000Z | defmodule Oli.Repo.Migrations.CreateActivityRegistrationsProjects do
use Ecto.Migration
def change do
create table(:activity_registration_projects, primary_key: false) do
timestamps(type: :timestamptz)
add :activity_registration_id, references(:activity_registrations), primary_key: true
add :... | 37.105263 | 98 | 0.765957 |
79dbe608fedf0b8c95b0f9dc11faba6f80f411a0 | 5,314 | exs | Elixir | test/ecto/model/callbacks_test.exs | aforward/ecto | 74bf4528abf198b25ff261d127fe7cf54a1ff044 | [
"Apache-2.0"
] | null | null | null | test/ecto/model/callbacks_test.exs | aforward/ecto | 74bf4528abf198b25ff261d127fe7cf54a1ff044 | [
"Apache-2.0"
] | null | null | null | test/ecto/model/callbacks_test.exs | aforward/ecto | 74bf4528abf198b25ff261d127fe7cf54a1ff044 | [
"Apache-2.0"
] | null | null | null | Code.require_file "../../support/mock_repo.exs", __DIR__
alias Ecto.MockRepo
defmodule Ecto.Model.CallbacksTest do
use ExUnit.Case, async: true
defmodule SomeCallback do
use Ecto.Model
schema "some_callback" do
field :x, :string, default: ""
end
before_delete __MODULE__, :add_to_x
befo... | 31.443787 | 88 | 0.615544 |
79dc03e24212ebac9c39c21915d5ccc909774122 | 19,961 | ex | Elixir | lib/nebulex_redis_adapter.ex | lucas-cegatti/nebulex_redis_adapter | 6d21323a00248f0a9dfa831b5110b1ee591ef39c | [
"MIT"
] | null | null | null | lib/nebulex_redis_adapter.ex | lucas-cegatti/nebulex_redis_adapter | 6d21323a00248f0a9dfa831b5110b1ee591ef39c | [
"MIT"
] | null | null | null | lib/nebulex_redis_adapter.ex | lucas-cegatti/nebulex_redis_adapter | 6d21323a00248f0a9dfa831b5110b1ee591ef39c | [
"MIT"
] | null | null | null | defmodule NebulexRedisAdapter do
@moduledoc ~S"""
Nebulex adapter for Redis. This adapter is implemented using `Redix`,
a Redis driver for Elixir.
**NebulexRedisAdapter** provides three setup alternatives:
* **Standalone** - The adapter establishes a pool of connections
with a single Redis node. The... | 30.474809 | 102 | 0.637543 |
79dc0765ef5586ac7d61c1df1ae73539db1fa925 | 2,115 | exs | Elixir | test/glimesh_web/live/user_live_components/subscribe_button_test.exs | Darkhax-Forked/glimesh.tv | 9566f0ec6909ecc5151f0e092f3e08b63d911fa8 | [
"MIT"
] | 1 | 2020-08-02T00:12:28.000Z | 2020-08-02T00:12:28.000Z | test/glimesh_web/live/user_live_components/subscribe_button_test.exs | Darkhax-Forked/glimesh.tv | 9566f0ec6909ecc5151f0e092f3e08b63d911fa8 | [
"MIT"
] | null | null | null | test/glimesh_web/live/user_live_components/subscribe_button_test.exs | Darkhax-Forked/glimesh.tv | 9566f0ec6909ecc5151f0e092f3e08b63d911fa8 | [
"MIT"
] | null | null | null | defmodule GlimeshWeb.UserLive.Components.SubscribeButtonTest do
use GlimeshWeb.ConnCase
import Phoenix.LiveViewTest
import Glimesh.AccountsFixtures
@component GlimeshWeb.UserLive.Components.SubscribeButton
defp create_streamer(_) do
%{streamer: streamer_fixture(%{can_payments: true})}
end
describe... | 29.375 | 99 | 0.638771 |
79dc5b458bcb85e04b0fffe2d71efd84516deaff | 7,202 | exs | Elixir | test/towwwer/websites/websites_test.exs | juhalehtonen/towwwer | 552fe57e93adc9c521a4c6a8ef550b84efec32ca | [
"MIT"
] | 1 | 2019-05-03T13:39:40.000Z | 2019-05-03T13:39:40.000Z | test/towwwer/websites/websites_test.exs | juhalehtonen/towwwer | 552fe57e93adc9c521a4c6a8ef550b84efec32ca | [
"MIT"
] | 13 | 2019-03-27T05:40:41.000Z | 2019-05-24T10:43:31.000Z | test/towwwer/websites/websites_test.exs | juhalehtonen/towwwer | 552fe57e93adc9c521a4c6a8ef550b84efec32ca | [
"MIT"
] | null | null | null | defmodule Towwwer.WebsitesTest do
use Towwwer.DataCase
alias Towwwer.Websites
def unload_relations(obj, to_remove \\ nil) do
assocs =
if to_remove == nil,
do: obj.__struct__.__schema__(:associations),
else: Enum.filter(obj.__struct__.__schema__(:associations), &(&1 in to_remove))
... | 31.449782 | 93 | 0.650514 |
79dc77e66160d1d76eb30d2e78cdf480cd7e4d18 | 10,155 | exs | Elixir | priv/repo/seeds.exs | OpenFermentor/Local-Monitor | 4b356e8ac3f154ec72bdd23b3a501d5f1645241c | [
"MIT"
] | null | null | null | priv/repo/seeds.exs | OpenFermentor/Local-Monitor | 4b356e8ac3f154ec72bdd23b3a501d5f1645241c | [
"MIT"
] | null | null | null | priv/repo/seeds.exs | OpenFermentor/Local-Monitor | 4b356e8ac3f154ec72bdd23b3a501d5f1645241c | [
"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:
#
# BioMonitor.Repo.insert!(%BioMonitor.SomeModel{})
#
# We recommend using the bang functions (`insert!`, `update!`
# and so on) as they... | 25.261194 | 138 | 0.670704 |
79dc85a0fb41a17ab1f2e28e195b196c4782f352 | 1,298 | ex | Elixir | lib/rak/module/instance.ex | rak/rak | cdfcd7227b38d9c6cac10bd778b03361b28f67df | [
"MIT"
] | 2 | 2018-09-30T02:59:33.000Z | 2018-10-08T19:55:38.000Z | lib/rak/module/instance.ex | rak/rak | cdfcd7227b38d9c6cac10bd778b03361b28f67df | [
"MIT"
] | null | null | null | lib/rak/module/instance.ex | rak/rak | cdfcd7227b38d9c6cac10bd778b03361b28f67df | [
"MIT"
] | null | null | null | defmodule Rak.Module.Instance do
@moduledoc """
Defines the behavior expected from Rak module instances.
Module instances can represent one of the following:
1. A *sharding unit*, which takes care offloading
asynchronous operations;
2. An *isolation unit*, responsible of preserving a certain
... | 28.217391 | 64 | 0.691063 |
79dcd1de9e3a75cf59fd352af2188b76171d0e3a | 2,787 | ex | Elixir | deps/credo/lib/credo/check/warning/lazy_logging.ex | BandanaPandey/nary_tree | fb1eeb69e38e43c9f9ffb54297cef52dff5c928d | [
"MIT"
] | 13 | 2018-09-19T21:03:29.000Z | 2022-01-27T04:06:32.000Z | deps/credo/lib/credo/check/warning/lazy_logging.ex | BandanaPandey/nary_tree | fb1eeb69e38e43c9f9ffb54297cef52dff5c928d | [
"MIT"
] | 1 | 2020-05-26T04:16:57.000Z | 2020-05-26T04:16:57.000Z | deps/credo/lib/credo/check/warning/lazy_logging.ex | BandanaPandey/nary_tree | fb1eeb69e38e43c9f9ffb54297cef52dff5c928d | [
"MIT"
] | 3 | 2020-05-21T04:32:08.000Z | 2021-07-28T05:14:01.000Z | defmodule Credo.Check.Warning.LazyLogging do
@moduledoc """
Ensures laziness of Logger calls.
You will want to wrap expensive logger calls into a zero argument
function (`fn -> "string that gets logged" end`).
Example:
# preferred
Logger.debug fn ->
"This happened: \#{expensive_calcula... | 28.731959 | 148 | 0.673843 |
79dcdc120ba8d30bc0d470ab96d37409e79ed514 | 2,433 | ex | Elixir | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_transformation_error_handling.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_transformation_error_handling.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_transformation_error_handling.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 47.705882 | 487 | 0.774353 |
79dce400cd84ee893fa665dd8327401daaedec3a | 739 | ex | Elixir | lib/error_messages.ex | steven-solomon/exdoubles | 9650dcf75775de492141648fcee39c3317f722ae | [
"Apache-2.0"
] | 1 | 2019-11-08T21:02:59.000Z | 2019-11-08T21:02:59.000Z | lib/error_messages.ex | steven-solomon/elephant | 9650dcf75775de492141648fcee39c3317f722ae | [
"Apache-2.0"
] | 5 | 2019-11-08T21:05:31.000Z | 2019-12-07T03:41:42.000Z | lib/error_messages.ex | steven-solomon/exdoubles | 9650dcf75775de492141648fcee39c3317f722ae | [
"Apache-2.0"
] | 1 | 2019-10-23T18:13:06.000Z | 2019-10-23T18:13:06.000Z | defmodule ExDoubles.ErrorMessages do
def not_called_error(name, args, []) do
"#{inspect name} was never called with #{inspect args}"
end
def not_called_error(name, args, calls) do
"""
#{inspect name} was never called with #{inspect args}
but was called with:
#{format_calls(calls)}
"""
en... | 23.83871 | 70 | 0.67253 |
79dd0d39cb892b1f7fd63bed81cbef5cb9a8da38 | 1,239 | exs | Elixir | 2020/liveview/dazzle/config/prod.secret.exs | herminiotorres/programmer_passport | d1786518a3a5f82471457e0ace41c4c33343739a | [
"MIT"
] | null | null | null | 2020/liveview/dazzle/config/prod.secret.exs | herminiotorres/programmer_passport | d1786518a3a5f82471457e0ace41c4c33343739a | [
"MIT"
] | null | null | null | 2020/liveview/dazzle/config/prod.secret.exs | herminiotorres/programmer_passport | d1786518a3a5f82471457e0ace41c4c33343739a | [
"MIT"
] | null | null | null | # In this file, we load production configuration and secrets
# from environment variables. You can also hardcode secrets,
# although such is generally not recommended and you have to
# remember to add this file to your .gitignore.
use Mix.Config
database_url =
System.get_env("DATABASE_URL") ||
raise """
envi... | 29.5 | 67 | 0.717514 |
79dd564db96e3a227977634d971f1cfacefe7f7a | 1,544 | ex | Elixir | 2020/liveview/dazzle/lib/dazzle_web/views/error_helpers.ex | herminiotorres/programmer_passport | d1786518a3a5f82471457e0ace41c4c33343739a | [
"MIT"
] | null | null | null | 2020/liveview/dazzle/lib/dazzle_web/views/error_helpers.ex | herminiotorres/programmer_passport | d1786518a3a5f82471457e0ace41c4c33343739a | [
"MIT"
] | null | null | null | 2020/liveview/dazzle/lib/dazzle_web/views/error_helpers.ex | herminiotorres/programmer_passport | d1786518a3a5f82471457e0ace41c4c33343739a | [
"MIT"
] | null | null | null | defmodule DazzleWeb.ErrorHelpers do
@moduledoc """
Conveniences for translating and building error messages.
"""
use Phoenix.HTML
@doc """
Generates tag for inlined form input errors.
"""
def error_tag(form, field) do
Enum.map(Keyword.get_values(form.errors, field), fn error ->
content_tag(:... | 32.166667 | 75 | 0.664508 |
79dd93154ecfe2198be23c46b24ef4a2f6747e29 | 65 | ex | Elixir | apps/grenadier/lib/grenadier_web/views/page_view.ex | allen-garvey/phoenix-umbrella | 1d444bbd62a5e7b5f51d317ce2be71ee994125d5 | [
"MIT"
] | 4 | 2019-10-04T16:11:15.000Z | 2021-08-18T21:00:13.000Z | apps/grenadier/lib/grenadier_web/views/page_view.ex | allen-garvey/phoenix-umbrella | 1d444bbd62a5e7b5f51d317ce2be71ee994125d5 | [
"MIT"
] | 5 | 2020-03-16T23:52:25.000Z | 2021-09-03T16:52:17.000Z | apps/grenadier/lib/grenadier_web/views/page_view.ex | allen-garvey/phoenix-umbrella | 1d444bbd62a5e7b5f51d317ce2be71ee994125d5 | [
"MIT"
] | null | null | null | defmodule GrenadierWeb.PageView do
use GrenadierWeb, :view
end
| 16.25 | 34 | 0.815385 |
79dd9f5fc42fd1d09cabfa066f43e59a40b8ec3e | 1,351 | ex | Elixir | apps/admin_api/lib/admin_api/v1/plugs/admin_api_auth_plug.ex | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | 1 | 2018-12-07T06:21:21.000Z | 2018-12-07T06:21:21.000Z | apps/admin_api/lib/admin_api/v1/plugs/admin_api_auth_plug.ex | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | null | null | null | apps/admin_api/lib/admin_api/v1/plugs/admin_api_auth_plug.ex | vanmil/ewallet | 6c1aca95a83e0a9d93007670a40d8c45764a8122 | [
"Apache-2.0"
] | null | null | null | defmodule AdminAPI.V1.AdminAPIAuthPlug do
@moduledoc """
This module is responsible for dispatching the authentication of the given
request to the appropriate authentication plug based on the provided scheme.
"""
import Plug.Conn
import AdminAPI.V1.ErrorHandler
alias AdminAPI.V1.AdminAPIAuth
def init(o... | 30.022222 | 99 | 0.694301 |
79ddb11b7b7aec22801416b7f7fc76e6040aeb5d | 4,875 | ex | Elixir | lib/protobuf/wire.ex | wojtekmach/protobuf | 3b251d286dc94745fc6a92fcbf9be03f44bb9b46 | [
"MIT"
] | null | null | null | lib/protobuf/wire.ex | wojtekmach/protobuf | 3b251d286dc94745fc6a92fcbf9be03f44bb9b46 | [
"MIT"
] | null | null | null | lib/protobuf/wire.ex | wojtekmach/protobuf | 3b251d286dc94745fc6a92fcbf9be03f44bb9b46 | [
"MIT"
] | null | null | null | defmodule Protobuf.Wire do
@moduledoc """
Utilities to convert data from wire format to protobuf and back.
"""
alias Protobuf.Wire.{Varint, Zigzag}
require Logger
@type proto_type ::
:int32
| :int64
| :fixed32
| :fixed64
| :uint32
| :uint64
... | 35.583942 | 94 | 0.636718 |
79dddee16bbbe240da75b16529f02029a4a46b05 | 1,254 | ex | Elixir | clients/dns/lib/google_api/dns/v1/model/resource_record_sets_delete_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/dns/lib/google_api/dns/v1/model/resource_record_sets_delete_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/dns/lib/google_api/dns/v1/model/resource_record_sets_delete_response.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 29.857143 | 87 | 0.767145 |
79de14081ee89e295807a19eb1b19e052fd5e8e6 | 91 | ex | Elixir | lib/bitcoin_simulator_web/views/blockchain_viewer_view.ex | hojason117/BitcoinSimulator | f85e623eec1923a2c0d418388f440cc06b6a5283 | [
"MIT"
] | 1 | 2021-12-16T08:31:24.000Z | 2021-12-16T08:31:24.000Z | lib/bitcoin_simulator_web/views/blockchain_viewer_view.ex | hojason117/BitcoinSimulator | f85e623eec1923a2c0d418388f440cc06b6a5283 | [
"MIT"
] | null | null | null | lib/bitcoin_simulator_web/views/blockchain_viewer_view.ex | hojason117/BitcoinSimulator | f85e623eec1923a2c0d418388f440cc06b6a5283 | [
"MIT"
] | null | null | null | defmodule BitcoinSimulatorWeb.BlockchainViewerView do
use BitcoinSimulatorWeb, :view
end
| 22.75 | 53 | 0.868132 |
79de3d52a47cc743efb479cf07e010a6885d858b | 1,995 | ex | Elixir | lib/trot/auth_check.ex | Tony1928/trot | 0b4a0faff6fc6eca1cc14e35bcdef45127a7cbb5 | [
"Apache-2.0"
] | 442 | 2015-05-20T14:41:34.000Z | 2022-02-26T05:41:02.000Z | lib/trot/auth_check.ex | Tony1928/trot | 0b4a0faff6fc6eca1cc14e35bcdef45127a7cbb5 | [
"Apache-2.0"
] | 35 | 2015-05-20T09:45:23.000Z | 2019-10-08T06:13:14.000Z | lib/trot/auth_check.ex | Tony1928/trot | 0b4a0faff6fc6eca1cc14e35bcdef45127a7cbb5 | [
"Apache-2.0"
] | 32 | 2015-05-26T20:24:48.000Z | 2022-02-25T13:31:36.000Z | defmodule Trot.AuthCheck do
@moduledoc """
Checks that a user has an authorized session before allowing them to access certain routes.
By default, all routes are allowed.
## Options
`routes`: List of URLs to check authorization on. Defaults to `[]`.
`match_fun`: Function to run when a request matches the r... | 30.692308 | 131 | 0.671679 |
79de3f1b19b36a650f81f32bca3c00fea4335e8f | 4,026 | ex | Elixir | lib/explorer/backend/series.ex | srowley/explorer | f17dd01d0b60f7d00718c94a8b0779befb1c8e82 | [
"MIT"
] | null | null | null | lib/explorer/backend/series.ex | srowley/explorer | f17dd01d0b60f7d00718c94a8b0779befb1c8e82 | [
"MIT"
] | null | null | null | lib/explorer/backend/series.ex | srowley/explorer | f17dd01d0b60f7d00718c94a8b0779befb1c8e82 | [
"MIT"
] | null | null | null | defmodule Explorer.Backend.Series do
@moduledoc """
The behaviour for series backends.
"""
@type t :: struct()
@type s :: Explorer.Series.t()
@type df :: Explorer.DataFrame.t()
@type dtype :: :integer | :float | :boolean | :string | :date | :datetime
# Conversion
@callback from_list(list(), dtype(... | 27.958333 | 93 | 0.60159 |
79de4dea9b0b8b1925c5fd86bffe2b6fe1ff7b13 | 1,007 | ex | Elixir | lib/nostrum/struct/embed/thumbnail.ex | defnorep/nostrum | daf869afc0f98fd132460296a2c999fea033fd63 | [
"MIT"
] | null | null | null | lib/nostrum/struct/embed/thumbnail.ex | defnorep/nostrum | daf869afc0f98fd132460296a2c999fea033fd63 | [
"MIT"
] | null | null | null | lib/nostrum/struct/embed/thumbnail.ex | defnorep/nostrum | daf869afc0f98fd132460296a2c999fea033fd63 | [
"MIT"
] | null | null | null | defmodule Nostrum.Struct.Embed.Thumbnail do
@moduledoc """
Struct representing a Discord embed thumbnail.
"""
alias Nostrum.Util
defstruct [
:url,
:proxy_url,
:height,
:width
]
defimpl Poison.Encoder do
def encode(thumbnail, options) do
thumbnail
|> Map.from_struct()
... | 19.745098 | 67 | 0.597815 |
79de601182e2b4f72f3d39f891667449aa24b3a5 | 5,396 | ex | Elixir | lib/versioned/helpers.ex | rossvz/versioned | 22fd40ce7833d0ede80ac9c3dd2e2b8482b50322 | [
"MIT"
] | null | null | null | lib/versioned/helpers.ex | rossvz/versioned | 22fd40ce7833d0ede80ac9c3dd2e2b8482b50322 | [
"MIT"
] | null | null | null | lib/versioned/helpers.ex | rossvz/versioned | 22fd40ce7833d0ede80ac9c3dd2e2b8482b50322 | [
"MIT"
] | null | null | null | defmodule Versioned.Helpers do
@moduledoc "Tools shared between modules. (For internal use.)"
alias Ecto.{Changeset, Schema}
@doc "Wrap a line of AST in a block if it isn't already wrapped."
@spec normalize_block(Macro.t()) :: Macro.t()
def normalize_block({x, m, _} = line) when x != :__block__,
do: {:__... | 34.151899 | 98 | 0.630838 |
79de65c09b904faeb226996205e9a06d2e618cb4 | 1,556 | exs | Elixir | test/resource/actions/read_test.exs | regularfellow/ash | 179495fecb141e0eb8eaf35bbb4d04000eab694b | [
"MIT"
] | null | null | null | test/resource/actions/read_test.exs | regularfellow/ash | 179495fecb141e0eb8eaf35bbb4d04000eab694b | [
"MIT"
] | null | null | null | test/resource/actions/read_test.exs | regularfellow/ash | 179495fecb141e0eb8eaf35bbb4d04000eab694b | [
"MIT"
] | null | null | null | defmodule Ash.Test.Dsl.Resource.Actions.ReadTest do
@moduledoc false
use ExUnit.Case, async: true
defmacrop defposts(do: body) do
quote do
defmodule Post do
@moduledoc false
use Ash.Resource,
data_layer: Ash.DataLayer.Ets
attributes do
uuid_primary_key :id
... | 22.228571 | 114 | 0.514139 |
79de675be4ea7d80516e18b6ca38c8cea593a6c6 | 731 | ex | Elixir | lib/commanded/shredder/public_api/impl.ex | KazW/commanded-shredder-middleware | ab4494db84983acfe7cd2d47a9b81dbec7c36a9d | [
"MIT"
] | 1 | 2020-07-30T18:40:11.000Z | 2020-07-30T18:40:11.000Z | lib/commanded/shredder/public_api/impl.ex | KazW/commanded-shredder-middleware | ab4494db84983acfe7cd2d47a9b81dbec7c36a9d | [
"MIT"
] | null | null | null | lib/commanded/shredder/public_api/impl.ex | KazW/commanded-shredder-middleware | ab4494db84983acfe7cd2d47a9b81dbec7c36a9d | [
"MIT"
] | null | null | null | defmodule Commanded.Shredder.Impl do
@type expiry :: NaiveDateTime.t() | nil
@type error :: {:error, String.t()}
@type key_return :: :ok | error
@type crypto_return :: struct | error
@callback create_encryption_key(
encryption_key_uuid :: String.t(),
expiry :: expiry
)... | 27.074074 | 48 | 0.547196 |
79de6b322521510ae0c560357d835118bc967971 | 451 | exs | Elixir | test/models/column_test.exs | sahilpaudel/AfterGlow | 0859ec14b47c8c5704cc8e5cba86d39aa258fff5 | [
"MIT"
] | null | null | null | test/models/column_test.exs | sahilpaudel/AfterGlow | 0859ec14b47c8c5704cc8e5cba86d39aa258fff5 | [
"MIT"
] | null | null | null | test/models/column_test.exs | sahilpaudel/AfterGlow | 0859ec14b47c8c5704cc8e5cba86d39aa258fff5 | [
"MIT"
] | null | null | null | defmodule AfterGlow.ColumnTest do
use AfterGlow.ModelCase
alias AfterGlow.Column
@valid_attrs %{name: "some content", type: "some content"}
@invalid_attrs %{}
test "changeset with valid attributes" do
changeset = Column.changeset(%Column{}, @valid_attrs)
assert changeset.valid?
end
test "chang... | 23.736842 | 60 | 0.727273 |
79de91e81d01f853f5ea482290ba9b3ef49ddfde | 1,491 | ex | Elixir | examples/basic_phoenix_ecto/lib/demo_web/live/user_live/form_component.ex | RudolfMan/opentelemetry-erlang-contrib | 44fd2a6871742380dd6adc112f9776cda501ff1f | [
"Apache-2.0"
] | null | null | null | examples/basic_phoenix_ecto/lib/demo_web/live/user_live/form_component.ex | RudolfMan/opentelemetry-erlang-contrib | 44fd2a6871742380dd6adc112f9776cda501ff1f | [
"Apache-2.0"
] | null | null | null | examples/basic_phoenix_ecto/lib/demo_web/live/user_live/form_component.ex | RudolfMan/opentelemetry-erlang-contrib | 44fd2a6871742380dd6adc112f9776cda501ff1f | [
"Apache-2.0"
] | 1 | 2022-02-07T20:48:50.000Z | 2022-02-07T20:48:50.000Z | defmodule DemoWeb.UserLive.FormComponent do
use DemoWeb, :live_component
alias Demo.Accounts
@impl true
def update(%{user: user} = assigns, socket) do
changeset = Accounts.change_user(user)
{:ok,
socket
|> assign(assigns)
|> assign(:changeset, changeset)}
end
@impl true
def hand... | 26.625 | 67 | 0.636486 |
79dea5bc95a71295626eefcf705ade1d1e01f23d | 1,741 | ex | Elixir | lib/kube/worker.ex | satom99/kube | c71c11b50ef582f4e345f6668eef86b9ba156070 | [
"Apache-2.0"
] | null | null | null | lib/kube/worker.ex | satom99/kube | c71c11b50ef582f4e345f6668eef86b9ba156070 | [
"Apache-2.0"
] | 1 | 2019-10-16T09:20:44.000Z | 2019-10-16T09:20:44.000Z | lib/kube/worker.ex | satom99/kube | c71c11b50ef582f4e345f6668eef86b9ba156070 | [
"Apache-2.0"
] | null | null | null | defmodule Kube.Worker do
use GenServer
alias Kube.Config
def start_link(state) do
GenServer.start_link(__MODULE__, state)
end
def init(state) do
handle_info(:timeout, state)
send(self(), :timeout)
{:ok, state}
end
def handle_info(:timeout, state) do
base = Config.master()
token... | 25.985075 | 93 | 0.626651 |
79deb8e254f63f8dff8b0b12078dbe74ecfd9e13 | 2,277 | exs | Elixir | benchmark/queries.exs | amclain/jylis_ex | cff66a5881ebc1f76403e2b8a60fba25f5b73bec | [
"MIT"
] | 3 | 2018-08-09T12:02:29.000Z | 2019-12-08T21:10:17.000Z | benchmark/queries.exs | amclain/jylis_ex | cff66a5881ebc1f76403e2b8a60fba25f5b73bec | [
"MIT"
] | 1 | 2018-08-06T17:10:13.000Z | 2018-08-08T19:16:47.000Z | benchmark/queries.exs | amclain/jylis_ex | cff66a5881ebc1f76403e2b8a60fba25f5b73bec | [
"MIT"
] | null | null | null | defmodule Benchmark.Queries do
def before_scenario(_) do
{:ok, connection} = Jylis.start_link("jylis://localhost")
connection
end
def after_scenario(connection) do
connection |> Jylis.stop
end
def treg_set_get(connection) do
{:ok, _} = connection |> Jylis.TREG.set("temperature", 68, 10)
... | 29.960526 | 80 | 0.645147 |
79debbe6d84844f0d610f3491419768afd41e9d2 | 3,380 | ex | Elixir | lib/client/detecting.ex | jmerriweather/pn532 | ec072d9270deec19b9acbe15d45b28222a651189 | [
"MIT"
] | null | null | null | lib/client/detecting.ex | jmerriweather/pn532 | ec072d9270deec19b9acbe15d45b28222a651189 | [
"MIT"
] | null | null | null | lib/client/detecting.ex | jmerriweather/pn532 | ec072d9270deec19b9acbe15d45b28222a651189 | [
"MIT"
] | null | null | null | defmodule PN532.Client.Detecting do
@moduledoc """
Functions for when we are in the connected state
"""
require Logger
require PN532.Connection.Frames
import PN532.Connection.Frames
def detecting(:cast, :stop_target_detection, data) do
{:next_state, :connected, data}
end
def detecting(:internal... | 46.30137 | 212 | 0.702663 |
79ded0874b38b21cfab83aebfdacb1eef8c8a806 | 337 | exs | Elixir | priv/repo/migrations/20190819140756_add_social_volume_query_table.exs | sitedata/sanbase2 | 8da5e44a343288fbc41b68668c6c80ae8547d557 | [
"MIT"
] | 81 | 2017-11-20T01:20:22.000Z | 2022-03-05T12:04:25.000Z | priv/repo/migrations/20190819140756_add_social_volume_query_table.exs | rmoorman/sanbase2 | 226784ab43a24219e7332c49156b198d09a6dd85 | [
"MIT"
] | 359 | 2017-10-15T14:40:53.000Z | 2022-01-25T13:34:20.000Z | priv/repo/migrations/20190819140756_add_social_volume_query_table.exs | sitedata/sanbase2 | 8da5e44a343288fbc41b68668c6c80ae8547d557 | [
"MIT"
] | 16 | 2017-11-19T13:57:40.000Z | 2022-02-07T08:13:02.000Z | defmodule Sanbase.Repo.Migrations.AddSocialVolumeQueryTable do
use Ecto.Migration
@table "project_social_volume_query"
def change do
create table(@table) do
add(:project_id, references(:project, on_delete: :nothing), null: false)
add(:query, :text)
end
create(unique_index(@table, :projec... | 24.071429 | 78 | 0.721068 |
79dedddfccedcc2bbb64d93edcc184f9e6fe6e2a | 1,567 | exs | Elixir | mix.exs | namredip/facebook.ex | a50ed04ba52e8c4d2322336928bd0183d7b93bcd | [
"MIT"
] | null | null | null | mix.exs | namredip/facebook.ex | a50ed04ba52e8c4d2322336928bd0183d7b93bcd | [
"MIT"
] | null | null | null | mix.exs | namredip/facebook.ex | a50ed04ba52e8c4d2322336928bd0183d7b93bcd | [
"MIT"
] | 1 | 2018-09-10T15:35:53.000Z | 2018-09-10T15:35:53.000Z | Code.ensure_loaded?(Hex) and Hex.start
defmodule Facebook.Mixfile do
use Mix.Project
def project do
[
app: :facebook,
version: "0.21.0",
elixir: "~> 1.0",
description: description(),
package: package(),
aliases: aliases(),
deps: deps(),
source_url: "https://gith... | 20.350649 | 99 | 0.529675 |
79dee2b30748fa3eb82479151e916f2aa75b8f23 | 8,719 | ex | Elixir | lib/footprint.ex | zven21/footprint | ebbc4ba6c7b95cdfab28ea406146f2de90e58211 | [
"MIT"
] | 2 | 2018-08-23T08:30:01.000Z | 2019-06-17T08:09:19.000Z | lib/footprint.ex | zven21/footprint | ebbc4ba6c7b95cdfab28ea406146f2de90e58211 | [
"MIT"
] | 3 | 2020-07-17T07:15:56.000Z | 2021-05-09T04:18:19.000Z | lib/footprint.ex | zven21/footprint | ebbc4ba6c7b95cdfab28ea406146f2de90e58211 | [
"MIT"
] | null | null | null | defmodule Footprint do
@moduledoc """
## TODO
- [x] insert! and insert func.
- [x] update! and update func.
- [x] delete! and delete func.
- [ ] insert_or_update! and insert_or_update func.
- [x] get_version and get_versions func.
- [ ] version diff and apply func.
- [x] footprint.insp... | 27.945513 | 96 | 0.614864 |
79defe323b3db2d9b299073d568770cc363bfb22 | 1,440 | exs | Elixir | mix.exs | brauliobz/excoveralls | 8108405bda1c6ef27253edc294415f02d78760f4 | [
"MIT"
] | null | null | null | mix.exs | brauliobz/excoveralls | 8108405bda1c6ef27253edc294415f02d78760f4 | [
"MIT"
] | null | null | null | mix.exs | brauliobz/excoveralls | 8108405bda1c6ef27253edc294415f02d78760f4 | [
"MIT"
] | null | null | null | defmodule ExCoveralls.Mixfile do
use Mix.Project
def project do
[ app: :excoveralls,
version: "0.11.2",
elixir: "~> 1.3",
elixirc_paths: elixirc_paths(Mix.env()),
deps: deps(),
description: description(),
package: package(),
test_coverage: [tool: ExCoveralls],
pr... | 25.714286 | 94 | 0.590972 |
79df02242c403ca426f64167fa1cd2449d33614d | 191 | exs | Elixir | lib/mix/test/fixtures/umbrella_dep/mix.exs | guilleiguaran/elixir | 952052869ff7af0e293d2a7160b1aebc68fc46be | [
"Apache-2.0"
] | 4 | 2016-04-05T05:51:36.000Z | 2019-10-31T06:46:35.000Z | lib/mix/test/fixtures/umbrella_dep/mix.exs | guilleiguaran/elixir | 952052869ff7af0e293d2a7160b1aebc68fc46be | [
"Apache-2.0"
] | null | null | null | lib/mix/test/fixtures/umbrella_dep/mix.exs | guilleiguaran/elixir | 952052869ff7af0e293d2a7160b1aebc68fc46be | [
"Apache-2.0"
] | 5 | 2015-02-01T06:01:19.000Z | 2019-08-29T09:02:35.000Z | defmodule UmbrellaDep.Mixfile do
use Mix.Project
def project do
[ app: :umbrella_dep,
deps: deps ]
end
defp deps do
[ { :umbrella, path: "deps/umbrella" } ]
end
end
| 14.692308 | 44 | 0.628272 |
79df204b028e747c0bf5ccd95c8cc121b0be70cd | 560 | ex | Elixir | elixir/langxpay/lib/langxpay/account.ex | ednailson/languages-experiments | 309a0360c6c26a3c95f3c8e25fe37bc7a5cbb8d4 | [
"MIT"
] | null | null | null | elixir/langxpay/lib/langxpay/account.ex | ednailson/languages-experiments | 309a0360c6c26a3c95f3c8e25fe37bc7a5cbb8d4 | [
"MIT"
] | null | null | null | elixir/langxpay/lib/langxpay/account.ex | ednailson/languages-experiments | 309a0360c6c26a3c95f3c8e25fe37bc7a5cbb8d4 | [
"MIT"
] | null | null | null | defmodule Langxpay.Account do
use Ecto.Schema
import Ecto.Changeset
alias Ecto.Changeset
alias Langxpay.User
@primary_key {:id, :binary_id, autogenerate: true}
@foreign_key_type :binary_id
@required_params [:balance, :user_id]
schema "accounts" do
field :balance, :decimal
belongs_to :user, U... | 20.740741 | 74 | 0.719643 |
79df3a6c7761c7538fa8796047c40dab7b3baf38 | 111 | ex | Elixir | test/support/repo.ex | jnylen/geo_postgis | ac21d16c64233abef8ebb19d096f6d196d67381e | [
"MIT"
] | 220 | 2017-07-15T22:20:31.000Z | 2022-03-30T22:22:57.000Z | test/support/repo.ex | jnylen/geo_postgis | ac21d16c64233abef8ebb19d096f6d196d67381e | [
"MIT"
] | 100 | 2017-09-09T19:40:47.000Z | 2022-03-23T12:26:56.000Z | test/support/repo.ex | jnylen/geo_postgis | ac21d16c64233abef8ebb19d096f6d196d67381e | [
"MIT"
] | 60 | 2017-08-10T10:05:39.000Z | 2022-01-25T21:53:25.000Z | defmodule Geo.PostGIS.Test.Repo do
use Ecto.Repo, otp_app: :geo_postgis, adapter: Ecto.Adapters.Postgres
end
| 27.75 | 71 | 0.792793 |
79df462aa7c60c316afaf28d8558bd571e5dfc8f | 2,084 | ex | Elixir | lib/advent_of_code/day_2_b.ex | rob-brown/AdventOfCode2017 | cb8a56fba4b1999820b3aec4c4f03d7094836484 | [
"MIT"
] | 3 | 2017-12-26T20:51:47.000Z | 2019-05-14T04:59:38.000Z | lib/advent_of_code/day_2_b.ex | rob-brown/AdventOfCode2017 | cb8a56fba4b1999820b3aec4c4f03d7094836484 | [
"MIT"
] | null | null | null | lib/advent_of_code/day_2_b.ex | rob-brown/AdventOfCode2017 | cb8a56fba4b1999820b3aec4c4f03d7094836484 | [
"MIT"
] | null | null | null | defmodule AdventOfCode.Day2B do
def checksum(input) do
input
|> String.split("\n")
|> Stream.drop(-1)
|> Stream.map(&process_line/1)
|> Enum.sum
end
def test do
9 = checksum("""
5 9 2 8
9 4 7 3
3 8 6 5
""")
IO.puts "Test Passed"
end
def solve do
checksum """
... | 33.612903 | 90 | 0.612284 |
79df5f4603dbdf85a1393304d0d1e97b0e3ec39d | 4,724 | ex | Elixir | lib/minuet/format/json.ex | exstruct/minuet | 2ca8f6da3000bfdf00f271eb695cb468b50b71bb | [
"MIT"
] | null | null | null | lib/minuet/format/json.ex | exstruct/minuet | 2ca8f6da3000bfdf00f271eb695cb468b50b71bb | [
"MIT"
] | null | null | null | lib/minuet/format/json.ex | exstruct/minuet | 2ca8f6da3000bfdf00f271eb695cb468b50b71bb | [
"MIT"
] | null | null | null | if Code.ensure_compiled?(Poison) do
defprotocol Minuet.Format.JSON do
def enter(type, vars)
def exit(type, vars)
end
defimpl Minuet.Format.JSON, for: Minuet.Type.Root do
def enter(%{line: line}, vars) do
buffer = Macro.var(:buffer, __MODULE__)
vars = Map.put(vars, :buffer, [buffer])
... | 26.994286 | 85 | 0.565199 |
79df77ad4b3cd3189b22a497af057f0a74f008f5 | 100 | exs | Elixir | test/snek/board/point_test.exs | xtagon/snek | f659c66b586dcbec811c26e0a1f9a552b9878752 | [
"MIT"
] | 1 | 2020-09-06T18:56:49.000Z | 2020-09-06T18:56:49.000Z | test/snek/board/point_test.exs | xtagon/snek | f659c66b586dcbec811c26e0a1f9a552b9878752 | [
"MIT"
] | null | null | null | test/snek/board/point_test.exs | xtagon/snek | f659c66b586dcbec811c26e0a1f9a552b9878752 | [
"MIT"
] | null | null | null | defmodule PointTest do
use ExUnit.Case
alias Snek.Board.Point
doctest Point, import: true
end
| 16.666667 | 29 | 0.77 |
79dfb16cf2d90686b1551ee6dcef8b8085b19b08 | 332 | exs | Elixir | alvarocasadoc/day1/day1_demo.exs | jodoldar/AdventofCode18 | c3872a64d767d8f0dab853f8dc4bb928fb90ee22 | [
"MIT"
] | null | null | null | alvarocasadoc/day1/day1_demo.exs | jodoldar/AdventofCode18 | c3872a64d767d8f0dab853f8dc4bb928fb90ee22 | [
"MIT"
] | 1 | 2018-12-04T17:59:39.000Z | 2018-12-04T17:59:39.000Z | alvarocasadoc/day1/day1_demo.exs | jodoldar/AdventofCode18 | c3872a64d767d8f0dab853f8dc4bb928fb90ee22 | [
"MIT"
] | 3 | 2018-12-02T10:04:51.000Z | 2018-12-05T19:15:31.000Z | # AdventOfCode2018
# @alvarocasadoc
# Day 1
Code.require_file("day1.exs")
## Test execution
{:ok, file} = File.open("input1.txt", [:read, :write])
input = IO.read(file, :all)
input = String.split(input, "\n", trim: true)
# Exec part 1
IO.inspect Day1.sum_frequencies(input)
# Exec part 2
IO.inspect Day1.find_first_... | 19.529412 | 54 | 0.704819 |
79dfc3ac7692657236a8252167594bacfb217c35 | 963 | ex | Elixir | lib/tackle/exchange.ex | arfl/ex-tackle | b1ed825af900d983f2f945c4b16e7019d1c184e3 | [
"MIT"
] | null | null | null | lib/tackle/exchange.ex | arfl/ex-tackle | b1ed825af900d983f2f945c4b16e7019d1c184e3 | [
"MIT"
] | 15 | 2019-08-12T14:21:51.000Z | 2021-12-31T02:12:04.000Z | lib/tackle/exchange.ex | arfl/ex-tackle | b1ed825af900d983f2f945c4b16e7019d1c184e3 | [
"MIT"
] | 2 | 2021-06-28T06:48:10.000Z | 2021-07-05T09:26:50.000Z | defmodule Tackle.Exchange do
require Logger
# FIXME: let the user configure this in every situation: consumer, publisher and so on.
# Do not save the configuration in a module variable. Each change would then require to
# recompile the deps
@default_exchange_type Application.get_env(:tackle, :exchange_type, ... | 41.869565 | 93 | 0.735202 |
79dfd7c7447895caaf9a5a199ec2e2ba6e929782 | 902 | exs | Elixir | config/prod.secret.exs | bokner/solverlview | 52a527bc653619fd35977d951b36207ba0ebd9cc | [
"MIT"
] | 10 | 2020-09-18T19:26:51.000Z | 2021-07-08T19:26:00.000Z | config/prod.secret.exs | bokner/solverview | 52a527bc653619fd35977d951b36207ba0ebd9cc | [
"MIT"
] | null | null | null | config/prod.secret.exs | bokner/solverview | 52a527bc653619fd35977d951b36207ba0ebd9cc | [
"MIT"
] | null | null | null | # In this file, we load production configuration and secrets
# from environment variables. You can also hardcode secrets,
# although such is generally not recommended and you have to
# remember to add this file to your .gitignore.
use Mix.Config
secret_key_length = 64
secret_key_base =
:crypto.strong_rand_bytes(secre... | 33.407407 | 99 | 0.752772 |
79dff06487eb2dbc0f458ca5b3de5cbe85375f48 | 1,732 | exs | Elixir | mix.exs | ckreiling/stargate | 76f7d8a95314a842ac9340739fbd1f1f142ab383 | [
"Apache-2.0"
] | null | null | null | mix.exs | ckreiling/stargate | 76f7d8a95314a842ac9340739fbd1f1f142ab383 | [
"Apache-2.0"
] | null | null | null | mix.exs | ckreiling/stargate | 76f7d8a95314a842ac9340739fbd1f1f142ab383 | [
"Apache-2.0"
] | null | null | null | defmodule Stargate.MixProject do
use Mix.Project
@github "https://github.com/jeffgrunewald/stargate"
def project() do
[
app: :stargate,
version: "0.1.0",
elixir: "~> 1.9",
start_permanent: Mix.env() == :prod,
deps: deps(),
docs: docs(),
package: package(),
des... | 25.101449 | 88 | 0.557737 |
79dffebc2704ca4c74c126919d14558b3d51b596 | 749 | exs | Elixir | test/plugs/current_user_test.exs | jespr/noegle | e14953085d38384c80993dd750aa85202db11418 | [
"MIT"
] | null | null | null | test/plugs/current_user_test.exs | jespr/noegle | e14953085d38384c80993dd750aa85202db11418 | [
"MIT"
] | 1 | 2017-05-08T15:09:09.000Z | 2017-05-10T06:05:24.000Z | test/plugs/current_user_test.exs | jespr/noegle | e14953085d38384c80993dd750aa85202db11418 | [
"MIT"
] | null | null | null | defmodule Noegle.CurrentUserTest do
use Noegle.ConnCase
defmodule MockRepo do
def get(MockUser, id) do
if id == 42 do
%{}
else
nil
end
end
end
test "current_user exists in conn.assigns if session contains user_id" do
Mix.Config.persist([noegle: %{repo: MockRepo, u... | 25.827586 | 83 | 0.667557 |
79e00bc57073c8ec9129eb76f743f8b60246a591 | 9,941 | ex | Elixir | lib/hexpm/accounts/audit_log.ex | optikfluffel/hexpm | 3b6c5f314ef5706d5d3c99830f39acba34867049 | [
"Apache-2.0"
] | null | null | null | lib/hexpm/accounts/audit_log.ex | optikfluffel/hexpm | 3b6c5f314ef5706d5d3c99830f39acba34867049 | [
"Apache-2.0"
] | null | null | null | lib/hexpm/accounts/audit_log.ex | optikfluffel/hexpm | 3b6c5f314ef5706d5d3c99830f39acba34867049 | [
"Apache-2.0"
] | null | null | null | defmodule Hexpm.Accounts.AuditLog do
use Hexpm.Schema
schema "audit_logs" do
field :user_agent, :string
field :action, :string
field :params, :map
belongs_to :user, User
belongs_to :organization, Organization
timestamps(updated_at: false)
end
def build(nil, user_agent, action, params... | 32.171521 | 94 | 0.67619 |
79e015475dd7caa1e6db61ad0001b0784bda74e0 | 30,603 | exs | Elixir | test/mac/hmac_test.exs | impl/ex_crypto | 587aa8a63bd1768a361da207339b4a8d68560c22 | [
"Apache-2.0"
] | 2 | 2016-05-02T18:19:13.000Z | 2016-05-03T16:11:58.000Z | test/mac/hmac_test.exs | impl/ex_crypto | 587aa8a63bd1768a361da207339b4a8d68560c22 | [
"Apache-2.0"
] | null | null | null | test/mac/hmac_test.exs | impl/ex_crypto | 587aa8a63bd1768a361da207339b4a8d68560c22 | [
"Apache-2.0"
] | null | null | null | defmodule Cryptex.Mac.HmacTest do
use ExUnit.Case
alias Cryptex.Hasher
alias Cryptex.Mac.Hmac
@golden_nist_test_vectors [
{:sha256, "0BB4127D89D9073EA425C303ADC3F9DB39E40ADAC23EA61FBA8B6E251D79390F", "C18BC28D496BEEDB25CA42D1B217BC81891D4C2BBB35380E5BB9BF7E3DBBFD37FEF70EF14407763447D6C06E915766430277F1241... | 306.03 | 694 | 0.948502 |
79e01cdb48044534a2a6fa85daba25a960dac5e4 | 1,748 | ex | Elixir | lib/owl/system.ex | kianmeng/owl | 55c0f31438866d79526d1feab44e23728ad88dd6 | [
"Apache-2.0"
] | null | null | null | lib/owl/system.ex | kianmeng/owl | 55c0f31438866d79526d1feab44e23728ad88dd6 | [
"Apache-2.0"
] | null | null | null | lib/owl/system.ex | kianmeng/owl | 55c0f31438866d79526d1feab44e23728ad88dd6 | [
"Apache-2.0"
] | null | null | null | defmodule Owl.System do
@moduledoc """
An alternative to some `System` functions.
"""
require Logger
@doc """
A wrapper around `System.cmd/3` which additionally logs executed `command` and `args`.
If URL is found in logged message, then password in it is masked with asterisks.
## Examples
> Ow... | 25.333333 | 102 | 0.53032 |
79e051d1bb2a5852ee80a5a59100f692567e802a | 59 | ex | Elixir | nomads/src/lib/nomads_web/views/page_view.ex | HarpBytes/nomads | 10c79953e19262d9d095a190eecb09a5e57e6bf2 | [
"MIT"
] | null | null | null | nomads/src/lib/nomads_web/views/page_view.ex | HarpBytes/nomads | 10c79953e19262d9d095a190eecb09a5e57e6bf2 | [
"MIT"
] | null | null | null | nomads/src/lib/nomads_web/views/page_view.ex | HarpBytes/nomads | 10c79953e19262d9d095a190eecb09a5e57e6bf2 | [
"MIT"
] | null | null | null | defmodule NomadsWeb.PageView do
use NomadsWeb, :view
end
| 14.75 | 31 | 0.79661 |
79e05c6180125755788009a7a9b57a1eb82f1545 | 1,223 | ex | Elixir | src/dguweb/web/views/error_helpers.ex | datagovuk/dgu2 | 3e24bdf27b30c22791efc19029ead05488c8f571 | [
"MIT"
] | 2 | 2016-08-09T16:46:52.000Z | 2016-08-09T16:46:59.000Z | src/dguweb/web/views/error_helpers.ex | datagovuk/dgu2 | 3e24bdf27b30c22791efc19029ead05488c8f571 | [
"MIT"
] | 48 | 2016-07-14T15:12:41.000Z | 2016-09-27T16:19:54.000Z | src/dguweb/web/views/error_helpers.ex | datagovuk/dgu2 | 3e24bdf27b30c22791efc19029ead05488c8f571 | [
"MIT"
] | 1 | 2021-04-10T21:23:44.000Z | 2021-04-10T21:23:44.000Z | defmodule DGUWeb.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
if error = form.errors[field] do
content_tag :span, translate_error(error), c... | 29.829268 | 72 | 0.666394 |
79e05c9c010ec2b7dba63eba5a5b9bb3e7b546eb | 2,130 | ex | Elixir | lib/cforum_web/controllers/admin/event_controller.ex | campingrider/cforum_ex | cf27684c47d6dc26c9c37a946f1c729a79d27c70 | [
"MIT"
] | null | null | null | lib/cforum_web/controllers/admin/event_controller.ex | campingrider/cforum_ex | cf27684c47d6dc26c9c37a946f1c729a79d27c70 | [
"MIT"
] | null | null | null | lib/cforum_web/controllers/admin/event_controller.ex | campingrider/cforum_ex | cf27684c47d6dc26c9c37a946f1c729a79d27c70 | [
"MIT"
] | null | null | null | defmodule CforumWeb.Admin.EventController do
use CforumWeb, :controller
alias Cforum.Events
alias Cforum.Events.Event
alias CforumWeb.Sortable
alias CforumWeb.Paginator
def index(conn, params) do
{sort_params, conn} =
Sortable.sort_collection(conn, [:name, :location, :start_date, :end_date, :vi... | 30.869565 | 102 | 0.658685 |
79e07df4fc4611807a651b736c48c9c26bf03f5f | 356 | exs | Elixir | priv/repo/seeds.exs | bhelx/AndroidTracker | f628701e5680874cf67e2d4cf8ed0ad1599b3308 | [
"MIT"
] | 4 | 2016-05-02T11:40:19.000Z | 2019-02-26T20:31:18.000Z | priv/repo/seeds.exs | bhelx/AndroidTracker | f628701e5680874cf67e2d4cf8ed0ad1599b3308 | [
"MIT"
] | null | null | null | priv/repo/seeds.exs | bhelx/AndroidTracker | f628701e5680874cf67e2d4cf8ed0ad1599b3308 | [
"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:
#
# BhelxTrack.Repo.insert!(%BhelxTrack.SomeModel{})
#
# We recommend using the bang functions (`insert!`, `update!`
# and so on) as they... | 29.666667 | 61 | 0.710674 |
79e08cc10a8966f3335f2b21eb3edf61592042b6 | 5,218 | ex | Elixir | lib/sanbase/kafka/kafka_exporter.ex | sitedata/sanbase2 | 8da5e44a343288fbc41b68668c6c80ae8547d557 | [
"MIT"
] | null | null | null | lib/sanbase/kafka/kafka_exporter.ex | sitedata/sanbase2 | 8da5e44a343288fbc41b68668c6c80ae8547d557 | [
"MIT"
] | 1 | 2021-07-24T16:26:03.000Z | 2021-07-24T16:26:03.000Z | lib/sanbase/kafka/kafka_exporter.ex | sitedata/sanbase2 | 8da5e44a343288fbc41b68668c6c80ae8547d557 | [
"MIT"
] | null | null | null | defmodule Sanbase.KafkaExporter do
@moduledoc ~s"""
Module for persisting any data to Kafka.
The module exposes one function that should be used - `persist/1`.
This functions adds the data to an internal buffer that is flushed
every `kafka_flush_timeout` seconds or when the buffer is big enough.
The expor... | 31.817073 | 96 | 0.662898 |
79e0cb7ba6f4991ab14f1dfc9b97f3af82197b4f | 826 | exs | Elixir | test/kira/runtime/apply_test.exs | AKST/kira | bef6d8a6004c01b572d624f734e769ab0a5047df | [
"MIT"
] | null | null | null | test/kira/runtime/apply_test.exs | AKST/kira | bef6d8a6004c01b572d624f734e769ab0a5047df | [
"MIT"
] | 5 | 2018-11-17T06:13:30.000Z | 2018-11-17T06:18:23.000Z | test/kira/runtime/apply_test.exs | AKST/kira | bef6d8a6004c01b572d624f734e769ab0a5047df | [
"MIT"
] | null | null | null | defmodule Kira.Runtime.ApplyTest do
use ExUnit.Case
alias Kira, as: T
alias Kira.Util.Testing, as: Util
describe "start" do
test "it works" do
a = %T.Branch{name: :a, apply: fn _, _ -> {:ok, 12} end}
{:ok, state} = T.RuntimeState.create(:undefined, [a], :infinity)
assert state.branch_sta... | 30.592593 | 70 | 0.633172 |
79e0d46b1192193dd48a42ea5db58353f769d133 | 3,047 | ex | Elixir | lib/ex_slp/tool.ex | 4pcbr/ex_slp_tk | 91a9f435cdc62224219409b9560a031d5ff4bb39 | [
"MIT"
] | 2 | 2016-03-01T22:16:18.000Z | 2016-04-14T23:10:01.000Z | lib/ex_slp/tool.ex | 4pcbr/ex_slp_tk | 91a9f435cdc62224219409b9560a031d5ff4bb39 | [
"MIT"
] | null | null | null | lib/ex_slp/tool.ex | 4pcbr/ex_slp_tk | 91a9f435cdc62224219409b9560a031d5ff4bb39 | [
"MIT"
] | null | null | null | defmodule ExSlp.Tool do
@default_slptool "slptool"
@doc """
Returns a string that is used for invoking the slptool.
By default this is simply "slptool" per the standard debian package name, but config.exs may override the value
"""
def slptool do
Application.get_env(
:ex_slp, :slptool, @default_... | 32.414894 | 113 | 0.545126 |
79e0d8b34a572152625fc1dc4642c2ecf7d396cc | 938 | exs | Elixir | test/slax_web/controllers/slax_controller_test.exs | HoffsMH/slax | b91ee30b9fd71a4cb7826f50b605ce580b7c1651 | [
"MIT"
] | 11 | 2016-07-05T18:56:21.000Z | 2021-09-15T22:23:54.000Z | test/slax_web/controllers/slax_controller_test.exs | HoffsMH/slax | b91ee30b9fd71a4cb7826f50b605ce580b7c1651 | [
"MIT"
] | 181 | 2016-06-23T00:47:13.000Z | 2022-03-10T11:23:44.000Z | test/slax_web/controllers/slax_controller_test.exs | HoffsMH/slax | b91ee30b9fd71a4cb7826f50b605ce580b7c1651 | [
"MIT"
] | 7 | 2019-01-30T21:38:28.000Z | 2022-03-01T07:13:39.000Z | defmodule SlaxWeb.SlaxController.Test do
use SlaxWeb.ConnCase, async: true
setup %{conn: conn} do
user = insert(:user)
conn = assign(conn, :user_id, user.id)
[conn: conn, user: user]
end
test "responds to ping", %{conn: conn, user: user} do
params = %{
token: "token",
text: "ping... | 20.391304 | 63 | 0.570362 |
79e0ef582173602f9dcf2c70229c0ff27962083f | 1,756 | ex | Elixir | lib/grpc/transport/utils.ex | braverhealth/grpc | eff8a8828d27ddd7f63a3c1dd5aae86246df215e | [
"Apache-2.0"
] | 561 | 2019-03-18T09:10:57.000Z | 2022-03-27T17:34:59.000Z | lib/grpc/transport/utils.ex | braverhealth/grpc | eff8a8828d27ddd7f63a3c1dd5aae86246df215e | [
"Apache-2.0"
] | 94 | 2019-03-20T09:34:38.000Z | 2022-02-27T20:44:04.000Z | lib/grpc/transport/utils.ex | braverhealth/grpc | eff8a8828d27ddd7f63a3c1dd5aae86246df215e | [
"Apache-2.0"
] | 112 | 2019-03-25T03:27:26.000Z | 2022-03-21T12:43:59.000Z | defmodule GRPC.Transport.Utils do
@moduledoc false
# unit: ns
@ns_ceiling 1000
@us_ceiling 1000_000
# @ms_ceiling @us_ceiling * 1000
# unit: ms
@ms_ceiling 1000
@second_ceiling @ms_ceiling * 60
@minute_ceiling @second_ceiling * 60
@doc """
Encode timeout(nanoseconds) by gRPC protocol
"""
de... | 22.512821 | 83 | 0.68508 |
79e10097a47c495c8b02ac71ac303306d7a88b58 | 1,778 | ex | Elixir | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v2beta1/model/remove_deal_association_request.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v2beta1/model/remove_deal_association_request.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v2beta1/model/remove_deal_association_request.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 37.041667 | 187 | 0.767154 |
79e14fd05ac1e70c801858a07637bd34aefc99ce | 1,558 | ex | Elixir | lib/comparator_web/views/error_helpers.ex | jellybob/comparator | e9528341366641baa7fa49690fdd6ffa3e2159a0 | [
"MIT"
] | null | null | null | lib/comparator_web/views/error_helpers.ex | jellybob/comparator | e9528341366641baa7fa49690fdd6ffa3e2159a0 | [
"MIT"
] | null | null | null | lib/comparator_web/views/error_helpers.ex | jellybob/comparator | e9528341366641baa7fa49690fdd6ffa3e2159a0 | [
"MIT"
] | null | null | null | defmodule ComparatorWeb.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_t... | 32.458333 | 79 | 0.667522 |
79e15c75bb24d8c28de1a9f9224af5e90d3d0eb5 | 1,835 | ex | Elixir | clients/datastore/lib/google_api/datastore/v1/model/google_datastore_admin_v1_export_entities_response.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/datastore/lib/google_api/datastore/v1/model/google_datastore_admin_v1_export_entities_response.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/datastore/lib/google_api/datastore/v1/model/google_datastore_admin_v1_export_entities_response.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 32.767857 | 132 | 0.752044 |
79e1626402834a983d9bf26bdc7ce9e9637c779e | 2,160 | ex | Elixir | lib/app.ex | xio/emqx | e213feb1c8fe95ae2c10ff87d2cecef3a66b5279 | [
"Apache-2.0"
] | null | null | null | lib/app.ex | xio/emqx | e213feb1c8fe95ae2c10ff87d2cecef3a66b5279 | [
"Apache-2.0"
] | null | null | null | lib/app.ex | xio/emqx | e213feb1c8fe95ae2c10ff87d2cecef3a66b5279 | [
"Apache-2.0"
] | null | null | null | defmodule Emqx.App do
use Application
use Supervisor
require Logger
def print_banner(), do: :io.format("Starting ~s on node ~s~n", [:emqx, node()])
def print_vsn() do
{:ok, descr} = :application.get_key(:description)
{:ok, vsn} = :application.get_key(:vsn)
:io.format("~s ~s... | 30 | 85 | 0.548611 |
79e1a9f9ba534763f5dbacce5feeb1715f9785f1 | 16,434 | ex | Elixir | lib/elixir/lib/process.ex | diogovk/elixir | 7b8213affaad38b50afaa3dfc3a43717f35ba4e7 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/process.ex | diogovk/elixir | 7b8213affaad38b50afaa3dfc3a43717f35ba4e7 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/process.ex | diogovk/elixir | 7b8213affaad38b50afaa3dfc3a43717f35ba4e7 | [
"Apache-2.0"
] | null | null | null | defmodule Process do
@moduledoc """
Conveniences for working with processes and the process dictionary.
Besides the functions available in this module, the `Kernel` module
exposes and auto-imports some basic functionality related to processes
available through the functions:
* `Kernel.spawn/1` and `Kern... | 30.265193 | 118 | 0.672021 |
79e1cb1630e64bc51eabe3117d3edd81d5299ca6 | 1,905 | exs | Elixir | clients/digital_asset_links/mix.exs | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/digital_asset_links/mix.exs | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/digital_asset_links/mix.exs | 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... | 28.432836 | 122 | 0.665617 |
79e1d900c43cc97080e846dfdbf34cebdc380479 | 5,103 | exs | Elixir | apps/potterhat_node/test/node/active_nodes_test.exs | omisego/potterhat | 47635e5d061c76900bd0e42a19e5dfc2ae8c0253 | [
"Apache-2.0"
] | 6 | 2019-03-28T14:47:41.000Z | 2019-06-25T02:38:06.000Z | apps/potterhat_node/test/node/active_nodes_test.exs | omisego/potterhat | 47635e5d061c76900bd0e42a19e5dfc2ae8c0253 | [
"Apache-2.0"
] | 30 | 2019-05-22T10:08:09.000Z | 2019-08-02T06:37:56.000Z | apps/potterhat_node/test/node/active_nodes_test.exs | omisego/potterhat | 47635e5d061c76900bd0e42a19e5dfc2ae8c0253 | [
"Apache-2.0"
] | null | null | null | # Copyright 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 writi... | 38.368421 | 95 | 0.66941 |
79e221dfaf18894064de8b8b3053cbc8150068f4 | 932 | exs | Elixir | year_2021/test/day_16_test.exs | bschmeck/advent_of_code | cbec98019c6c00444e0f4c7e15e01b1ed9ae6145 | [
"MIT"
] | null | null | null | year_2021/test/day_16_test.exs | bschmeck/advent_of_code | cbec98019c6c00444e0f4c7e15e01b1ed9ae6145 | [
"MIT"
] | null | null | null | year_2021/test/day_16_test.exs | bschmeck/advent_of_code | cbec98019c6c00444e0f4c7e15e01b1ed9ae6145 | [
"MIT"
] | null | null | null | defmodule Day16Test do
use ExUnit.Case, async: true
test "it can parse a literal value" do
assert %{version: 6, type_id: 4, value: func} = Day16.parse("D2FE28")
assert func.() == 2021
end
test "it can sum versions of packets" do
assert Day16.version_sum("8A004A801A8002F478") == 16
assert Day16... | 34.518519 | 73 | 0.701717 |
79e2318b5502292af5356d3aa6197740ab3b72d9 | 226 | ex | Elixir | lib/post_utils.ex | crertel/bloglixir | 6c8ee7775ee1f76f8bb9c9f8a9db74e6cf5eecc6 | [
"MIT"
] | null | null | null | lib/post_utils.ex | crertel/bloglixir | 6c8ee7775ee1f76f8bb9c9f8a9db74e6cf5eecc6 | [
"MIT"
] | null | null | null | lib/post_utils.ex | crertel/bloglixir | 6c8ee7775ee1f76f8bb9c9f8a9db74e6cf5eecc6 | [
"MIT"
] | null | null | null | defmodule Bloglixir.PostUtils do
def get_metadata_blob_from_post_string( post ) do
[[ _, metadata, post_body]] = Regex.scan( ~r/\A\s*---(.*?)---(.*)\z/s, post)
{:ok, [ metadata, post_body] }
end
end
| 25.111111 | 85 | 0.588496 |
79e238e995f5ec02c44498c3187efd47e14b913e | 28,132 | exs | Elixir | test/x509/test/server_test.exs | fhunleth/x509 | 24c5fcc42207cc74e1e00a322f4809caf058eb6b | [
"BSD-3-Clause"
] | null | null | null | test/x509/test/server_test.exs | fhunleth/x509 | 24c5fcc42207cc74e1e00a322f4809caf058eb6b | [
"BSD-3-Clause"
] | null | null | null | test/x509/test/server_test.exs | fhunleth/x509 | 24c5fcc42207cc74e1e00a322f4809caf058eb6b | [
"BSD-3-Clause"
] | null | null | null | defmodule X509.Test.ServerTest do
# This test module serves two purposes:
#
# * To perform sanity tests on the `X509.Test.Suite` and
# `X509.Test.Server` modules
# * To serve as an example for using those modules to test a TLS client
#
# The client being tested by this module is Erlang/OTP's built... | 38.222826 | 98 | 0.594661 |
79e250727dd7a18a9b2c42d17c2b71a86aee0311 | 607 | exs | Elixir | apps/tai/test/tai/events/sub_free_asset_balance_test.exs | ihorkatkov/tai | 09f9f15d2c385efe762ae138a8570f1e3fd41f26 | [
"MIT"
] | 1 | 2019-12-19T05:16:26.000Z | 2019-12-19T05:16:26.000Z | apps/tai/test/tai/events/sub_free_asset_balance_test.exs | ihorkatkov/tai | 09f9f15d2c385efe762ae138a8570f1e3fd41f26 | [
"MIT"
] | null | null | null | apps/tai/test/tai/events/sub_free_asset_balance_test.exs | ihorkatkov/tai | 09f9f15d2c385efe762ae138a8570f1e3fd41f26 | [
"MIT"
] | null | null | null | defmodule Tai.Events.SubFreeAssetBalanceTest do
use ExUnit.Case, async: true
test ".to_data/1 transforms decimal data to strings" do
event = %Tai.Events.SubFreeAssetBalance{
venue_id: :my_venue,
account_id: :my_account,
asset: :btc,
val: Decimal.new("0.1"),
free: Decimal.new("0.2"... | 25.291667 | 57 | 0.5486 |
79e251fd281b12cdb0599b4edd61a8aa5187a31e | 8,342 | exs | Elixir | test/capture_test.exs | bitcrowd/carbonite | 663af92caa2afa8838cb43800da8e320f323276a | [
"Apache-2.0"
] | 26 | 2021-10-30T06:32:20.000Z | 2022-03-28T14:34:24.000Z | test/capture_test.exs | bitcrowd/carbonite | 663af92caa2afa8838cb43800da8e320f323276a | [
"Apache-2.0"
] | 8 | 2021-10-20T08:03:34.000Z | 2022-02-25T08:48:14.000Z | test/capture_test.exs | bitcrowd/carbonite | 663af92caa2afa8838cb43800da8e320f323276a | [
"Apache-2.0"
] | null | null | null | # SPDX-License-Identifier: Apache-2.0
defmodule CaptureTest do
use ExUnit.Case, async: true
import Ecto.Adapters.SQL, only: [query!: 2]
alias Carbonite.TestRepo
alias Ecto.Adapters.SQL.Sandbox
setup do
:ok = Sandbox.checkout(TestRepo)
end
defp query!(statement), do: query!(TestRepo, statement)
d... | 27.084416 | 97 | 0.541956 |
79e25dceb5065b82520af05381e7a06cd14c1f4e | 153 | exs | Elixir | lab-one-introduction-to-elixir/ex3-n-clients-single-server/test/clientserver_test.exs | HilliamT/distributed-algorithms | 788e8e0b9a6c60570ecf8336f2239fb1d1945b1c | [
"MIT"
] | null | null | null | lab-one-introduction-to-elixir/ex3-n-clients-single-server/test/clientserver_test.exs | HilliamT/distributed-algorithms | 788e8e0b9a6c60570ecf8336f2239fb1d1945b1c | [
"MIT"
] | null | null | null | lab-one-introduction-to-elixir/ex3-n-clients-single-server/test/clientserver_test.exs | HilliamT/distributed-algorithms | 788e8e0b9a6c60570ecf8336f2239fb1d1945b1c | [
"MIT"
] | null | null | null | defmodule ClentServerrTest do
use ExUnit.Case
doctest ClientServer
test "greets the world" do
assert ClientServer.hello() == :world
end
end
| 17 | 41 | 0.738562 |
79e26f77101d9f3f32a45d5771a69fce5f6d42a3 | 319 | ex | Elixir | lib/livebooks/application.ex | christhekeele/livebooks | b7e272b53679cfd573221bffe1e4721703fe35c4 | [
"MIT"
] | null | null | null | lib/livebooks/application.ex | christhekeele/livebooks | b7e272b53679cfd573221bffe1e4721703fe35c4 | [
"MIT"
] | null | null | null | lib/livebooks/application.ex | christhekeele/livebooks | b7e272b53679cfd573221bffe1e4721703fe35c4 | [
"MIT"
] | null | null | null | defmodule Livebooks.Application do
@moduledoc false
use Application
@impl true
def start(_type, _args) do
[
{Plug.Cowboy, scheme: :http, plug: Livebooks.Router, options: [port: 4001]}
]
|> Supervisor.start_link(
strategy: :one_for_one,
name: Livebooks.Supervisor
)
end
end
| 18.764706 | 81 | 0.655172 |
79e2b344ca3c0214974669b193e116c0d95593a9 | 4,466 | ex | Elixir | lib/pbcs/aes_cbc_hmac_sha2.ex | hexpm/pbcs | 5446d4602f4638046f2dcafd7ae0359866e0da42 | [
"Apache-2.0"
] | 16 | 2018-09-03T21:59:29.000Z | 2021-11-27T08:15:17.000Z | lib/pbcs/aes_cbc_hmac_sha2.ex | hexpm/pbcs | 5446d4602f4638046f2dcafd7ae0359866e0da42 | [
"Apache-2.0"
] | 8 | 2018-08-28T17:46:23.000Z | 2021-06-02T00:19:43.000Z | lib/pbcs/aes_cbc_hmac_sha2.ex | hexpm/hex_crypto | 5446d4602f4638046f2dcafd7ae0359866e0da42 | [
"Apache-2.0"
] | 3 | 2018-09-12T12:32:16.000Z | 2021-05-10T13:39:08.000Z | defmodule PBCS.AES_CBC_HMAC_SHA2 do
alias PBCS.ContentEncryptor
alias PBCS.CryptoWrapper
@behaviour ContentEncryptor
@moduledoc ~S"""
Content Encryption with AES_CBC_HMAC_SHA2.
See: https://tools.ietf.org/html/rfc7518#section-5.2.6
"""
@spec content_encrypt({binary, PBCS.plain_text()}, binary(), bina... | 31.673759 | 100 | 0.674877 |
79e2bc81657f36644f58598ed87a3f5ad14eb099 | 6,992 | ex | Elixir | lib/ring_logger/client.ex | mattludwigs/ring_logger | 7392f9ff998079765b9ba1716825a3f6b2cfacac | [
"Apache-2.0"
] | null | null | null | lib/ring_logger/client.ex | mattludwigs/ring_logger | 7392f9ff998079765b9ba1716825a3f6b2cfacac | [
"Apache-2.0"
] | null | null | null | lib/ring_logger/client.ex | mattludwigs/ring_logger | 7392f9ff998079765b9ba1716825a3f6b2cfacac | [
"Apache-2.0"
] | null | null | null | defmodule RingLogger.Client do
use GenServer
@moduledoc """
Interact with the RingLogger
"""
alias RingLogger.Server
defmodule State do
@moduledoc false
defstruct io: nil,
colors: nil,
metadata: nil,
format: nil,
level: nil,
in... | 26.187266 | 94 | 0.640303 |
79e2f44f408d2ba9b5690ed44e0ba58999b698e8 | 641 | exs | Elixir | config/releases.exs | daddyfatstacksBIG/ex_testchain | 06a870668b70c75009880ef574eb4bbee1cf47e4 | [
"Apache-2.0"
] | 5 | 2018-11-22T18:54:08.000Z | 2021-05-07T18:47:20.000Z | config/releases.exs | daddyfatstacksBIG/ex_testchain | 06a870668b70c75009880ef574eb4bbee1cf47e4 | [
"Apache-2.0"
] | 29 | 2018-12-04T16:55:01.000Z | 2019-01-29T14:33:26.000Z | config/releases.exs | daddyfatstacksBIG/ex_testchain | 06a870668b70c75009880ef574eb4bbee1cf47e4 | [
"Apache-2.0"
] | 3 | 2019-01-11T04:40:19.000Z | 2022-03-23T17:31:37.000Z | import Config
config :chain, base_path: "/opt/chains"
config :chain, snapshot_base_path: "/opt/snapshots"
config :chain, geth_executable: "geth"
config :chain, geth_password_file: "/opt/built/priv/presets/geth/account_password"
config :chain, ganache_executable: "ganache-cli"
config :chain, ganache_wrapper_file: "/opt... | 37.705882 | 93 | 0.792512 |
79e30e1094dc255d1d427262a3f1cba76801c57f | 618 | exs | Elixir | apps/core/priv/repo/migrations/20210515021126_soft_recipe_dependency_fk.exs | michaeljguarino/forge | 50ee583ecb4aad5dee4ef08fce29a8eaed1a0824 | [
"Apache-2.0"
] | 59 | 2021-09-16T19:29:39.000Z | 2022-03-31T20:44:24.000Z | apps/core/priv/repo/migrations/20210515021126_soft_recipe_dependency_fk.exs | svilenkov/plural | ac6c6cc15ac4b66a3b5e32ed4a7bee4d46d1f026 | [
"Apache-2.0"
] | 111 | 2021-08-15T09:56:37.000Z | 2022-03-31T23:59:32.000Z | apps/core/priv/repo/migrations/20210515021126_soft_recipe_dependency_fk.exs | svilenkov/plural | ac6c6cc15ac4b66a3b5e32ed4a7bee4d46d1f026 | [
"Apache-2.0"
] | 4 | 2021-12-13T09:43:01.000Z | 2022-03-29T18:08:44.000Z | defmodule Core.Repo.Migrations.SoftRecipeDependencyFk do
use Ecto.Migration
def up do
execute "ALTER TABLE recipe_dependencies DROP CONSTRAINT recipe_dependencies_dependent_recipe_id_fkey"
alter table(:recipe_dependencies) do
modify :dependent_recipe_id, references(:recipes, type: :uuid, on_delete: :... | 32.526316 | 106 | 0.781553 |
79e3101204938d0dcf2e2bd16985fb955c093ac7 | 2,208 | ex | Elixir | lib/bluetooth/hci/command.ex | sadesyllas/nerves_bluetooth | d316dbc192be8beec8b76dd245225117bc7d925f | [
"Apache-2.0"
] | 14 | 2018-01-29T23:34:50.000Z | 2021-07-15T04:29:36.000Z | lib/bluetooth/hci/command.ex | sadesyllas/nerves_bluetooth | d316dbc192be8beec8b76dd245225117bc7d925f | [
"Apache-2.0"
] | 2 | 2017-05-24T18:16:42.000Z | 2018-11-06T19:29:09.000Z | lib/bluetooth/hci/command.ex | sadesyllas/nerves_bluetooth | d316dbc192be8beec8b76dd245225117bc7d925f | [
"Apache-2.0"
] | 3 | 2018-06-01T07:10:19.000Z | 2019-01-06T22:32:56.000Z | defmodule Bluetooth.HCI.Commands do
@moduledoc """
This module holds conversion functions for HCI commands and their results
from and to a logical format and the binary representation.
This module does not to attempt to be complete but grows by need.
"""
alias Bluetooth.HCI
alias Bluetooth.AssignedNumber... | 31.098592 | 97 | 0.668478 |
79e34012d17b65887ede70ab0319d3727e3e7f5e | 2,203 | ex | Elixir | lib/ex_clubhouse/model/epic_slim.ex | pootsbook/exclubhouse | 3b93cded0124e4e5df489db4f9262a560595bb8e | [
"MIT"
] | 4 | 2020-03-17T00:42:10.000Z | 2021-04-11T16:39:52.000Z | lib/ex_clubhouse/model/epic_slim.ex | pootsbook/exclubhouse | 3b93cded0124e4e5df489db4f9262a560595bb8e | [
"MIT"
] | 7 | 2020-03-21T20:22:13.000Z | 2021-12-30T16:32:07.000Z | lib/ex_clubhouse/model/epic_slim.ex | pootsbook/exclubhouse | 3b93cded0124e4e5df489db4f9262a560595bb8e | [
"MIT"
] | 4 | 2020-03-25T18:34:49.000Z | 2021-09-13T16:44:00.000Z | defmodule ExClubhouse.Model.EpicSlim do
@moduledoc """
Definition of EpicSlim
Ref: https://clubhouse.io/api/rest/v3/#EpicSlim
"""
alias ExClubhouse.Model
@type t :: %__MODULE__{
app_url: binary(),
archived: boolean(),
completed: boolean(),
completed_at: binary() | n... | 30.178082 | 49 | 0.509305 |
79e341207312e71190c71db3a6c86be2c162fc23 | 9,913 | ex | Elixir | lib/mix/tasks/phx.gen.live.slime.ex | AnomalousBit/phoenix_slime | da0630066c37cc471185cfe227244d0760a54fa3 | [
"MIT"
] | null | null | null | lib/mix/tasks/phx.gen.live.slime.ex | AnomalousBit/phoenix_slime | da0630066c37cc471185cfe227244d0760a54fa3 | [
"MIT"
] | null | null | null | lib/mix/tasks/phx.gen.live.slime.ex | AnomalousBit/phoenix_slime | da0630066c37cc471185cfe227244d0760a54fa3 | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.Phx.Gen.Live.Slime do
@shortdoc "Generates LiveView, templates, and context for a resource"
@moduledoc """
Generates LiveView, templates, and context for a resource.
mix phx.gen.live Accounts User users name:string age:integer
The first argument is the context module followed by the... | 39.652 | 130 | 0.67699 |
79e346c5799d46b034f79157809159a477f9b65d | 911 | ex | Elixir | plugins/ucc_chat/lib/ucc_chat/services/attachment_service.ex | josephkabraham/ucx_ucc | 0dbd9e3eb5940336b4870cff033482ceba5f6ee7 | [
"MIT"
] | null | null | null | plugins/ucc_chat/lib/ucc_chat/services/attachment_service.ex | josephkabraham/ucx_ucc | 0dbd9e3eb5940336b4870cff033482ceba5f6ee7 | [
"MIT"
] | null | null | null | plugins/ucc_chat/lib/ucc_chat/services/attachment_service.ex | josephkabraham/ucx_ucc | 0dbd9e3eb5940336b4870cff033482ceba5f6ee7 | [
"MIT"
] | null | null | null | defmodule UccChat.AttachmentService do
use UccChat.Shared, :service
alias UccChat.{Attachment}
require Logger
def delete_attachment(%UccChat.Schema.Attachment{} = attachment) do
Logger.warn "deprecated"
case Attachment.delete attachment do
{:ok, _} = res ->
path = UccChat.File.storage_d... | 25.305556 | 96 | 0.684962 |
79e36d8abb1c7e81dc2af63795db7b614ec285fe | 85 | exs | Elixir | .formatter.exs | davorbadrov/memoize | dd34c313de805e57da18c4e6142247cc8eb1ba6a | [
"MIT"
] | null | null | null | .formatter.exs | davorbadrov/memoize | dd34c313de805e57da18c4e6142247cc8eb1ba6a | [
"MIT"
] | null | null | null | .formatter.exs | davorbadrov/memoize | dd34c313de805e57da18c4e6142247cc8eb1ba6a | [
"MIT"
] | null | null | null | [
inputs: [".formatter.exs", "mix.exs", "{bench,config,lib,test}/**/*.{ex,exs}"]
]
| 21.25 | 80 | 0.552941 |
79e391468b7e20ba4c11a7fb3258c46155680a64 | 2,512 | ex | Elixir | apps/badger_data/lib/badger_data/api/user.ex | andyl/logstore | 763580ce6f75b2735adfc919b80c37ed5064a04e | [
"MIT"
] | null | null | null | apps/badger_data/lib/badger_data/api/user.ex | andyl/logstore | 763580ce6f75b2735adfc919b80c37ed5064a04e | [
"MIT"
] | 9 | 2021-03-09T20:25:18.000Z | 2021-05-27T12:58:03.000Z | apps/badger_data/lib/badger_data/api/user.ex | andyl/badger | 763580ce6f75b2735adfc919b80c37ed5064a04e | [
"MIT"
] | null | null | null | defmodule BadgerData.Api.User do
alias BadgerData.Schema.{User, Site, Token, View, Downstream}
alias BadgerData.Repo
import Ecto.Query
# ----- user_one -----
def user_one do
Repo.get_by(User, id: 1) ||
User.changeset(%User{}, %{name: "aaa", email: "aaa", pwd_hash: User.pwd_hash("aaa"), id: 1}) |>... | 19.936508 | 116 | 0.574045 |
79e3946bcd3e623204370d9412f9dde856420d27 | 1,903 | ex | Elixir | clients/machine_learning/lib/google_api/machine_learning/v1/model/google_cloud_ml_v1__list_models_response.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/machine_learning/lib/google_api/machine_learning/v1/model/google_cloud_ml_v1__list_models_response.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/machine_learning/lib/google_api/machine_learning/v1/model/google_cloud_ml_v1__list_models_response.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... | 37.313725 | 150 | 0.758802 |
79e39e23ae94561e2ac334eb6773028aac956779 | 512 | exs | Elixir | priv/repo/migrations/20211006201122_create_memberships.exs | patrotom/adaptable-costs-evaluator | c97e65af1e021d7c6acf6564f4671c60321346e3 | [
"MIT"
] | null | null | null | priv/repo/migrations/20211006201122_create_memberships.exs | patrotom/adaptable-costs-evaluator | c97e65af1e021d7c6acf6564f4671c60321346e3 | [
"MIT"
] | 4 | 2021-12-07T12:26:50.000Z | 2021-12-30T14:17:25.000Z | priv/repo/migrations/20211006201122_create_memberships.exs | patrotom/adaptable-costs-evaluator | c97e65af1e021d7c6acf6564f4671c60321346e3 | [
"MIT"
] | null | null | null | defmodule AdaptableCostsEvaluator.Repo.Migrations.CreateMemberships do
use Ecto.Migration
def change do
create table(:memberships) do
add :user_id, references(:users, on_delete: :delete_all), null: false
add :organization_id, references(:organizations, on_delete: :delete_all), null: false
ti... | 30.117647 | 91 | 0.730469 |
79e39f264cf64ceb5ef3648134925ba251d5408d | 171,303 | ex | Elixir | lib/elixir/lib/kernel.ex | sthagen/elixir-lang-elixir | bab0c7e7738eb7957254bbede93a741e2a61d4ce | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/kernel.ex | sthagen/elixir-lang-elixir | bab0c7e7738eb7957254bbede93a741e2a61d4ce | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/kernel.ex | sthagen/elixir-lang-elixir | bab0c7e7738eb7957254bbede93a741e2a61d4ce | [
"Apache-2.0"
] | null | null | null | # Use elixir_bootstrap module to be able to bootstrap Kernel.
# The bootstrap module provides simpler implementations of the
# functions removed, simple enough to bootstrap.
import Kernel,
except: [@: 1, defmodule: 2, def: 1, def: 2, defp: 2, defmacro: 1, defmacro: 2, defmacrop: 2]
import :elixir_bootstrap
defmodul... | 27.053538 | 116 | 0.634782 |
79e39f9e45d6a5ab44a0313d4ebac21a24b86f64 | 16,306 | ex | Elixir | lib/guardian/permissions/bitwise.ex | jsangilve/guardian | 5d13afc9792396c955a83a35596b54eceab26e78 | [
"MIT"
] | null | null | null | lib/guardian/permissions/bitwise.ex | jsangilve/guardian | 5d13afc9792396c955a83a35596b54eceab26e78 | [
"MIT"
] | null | null | null | lib/guardian/permissions/bitwise.ex | jsangilve/guardian | 5d13afc9792396c955a83a35596b54eceab26e78 | [
"MIT"
] | null | null | null | defmodule Guardian.Permissions.Bitwise do
@moduledoc """
An optional plugin to Guardian to provide permissions for your tokens
These can be used for any token types since they only work on the `claims`.
Permissions are set on a per implementation module basis.
Each implementation module can have their own s... | 34.041754 | 107 | 0.629523 |
79e3f3591c7b7e4635282dcb90904f43d3482d01 | 12,233 | ex | Elixir | lib/phoenix_live_view/static.ex | HoJSim/phoenix_live_view | 8cb3b4c872e6e0a0fb4209cb651aab84309ea6c8 | [
"MIT"
] | 1 | 2020-09-15T22:13:16.000Z | 2020-09-15T22:13:16.000Z | lib/phoenix_live_view/static.ex | HoJSim/phoenix_live_view | 8cb3b4c872e6e0a0fb4209cb651aab84309ea6c8 | [
"MIT"
] | null | null | null | lib/phoenix_live_view/static.ex | HoJSim/phoenix_live_view | 8cb3b4c872e6e0a0fb4209cb651aab84309ea6c8 | [
"MIT"
] | null | null | null | defmodule Phoenix.LiveView.Static do
# Holds the logic for static rendering.
@moduledoc false
alias Phoenix.LiveView.{Socket, Utils, Diff}
# Token version. Should be changed whenever new data is stored.
@token_vsn 4
def token_vsn, do: @token_vsn
# Max session age in seconds. Equivalent to 2 weeks.
@... | 30.813602 | 99 | 0.647347 |
79e3febbd15bd4e0453149af1f48926758396f18 | 2,588 | ex | Elixir | cp/lib/cpsim/cp/actions/calls/stop_transaction.ex | azhi/cpsim | a10a3e068a8a319e66cc9cf8a6c9c97457d9bf8b | [
"MIT"
] | null | null | null | cp/lib/cpsim/cp/actions/calls/stop_transaction.ex | azhi/cpsim | a10a3e068a8a319e66cc9cf8a6c9c97457d9bf8b | [
"MIT"
] | null | null | null | cp/lib/cpsim/cp/actions/calls/stop_transaction.ex | azhi/cpsim | a10a3e068a8a319e66cc9cf8a6c9c97457d9bf8b | [
"MIT"
] | null | null | null | defmodule CPSIM.CP.Actions.Calls.StopTransaction do
require Logger
alias CPSIM.CP.Connection.Messages.{Call, CallResult, CallError}
# TODO: properly handle stop transactions without id_tag
def send(state, id_tag \\ nil, action_callback \\ nil) do
connector_id = get_in(state, [:modules, CPSIM.CP.Actions, :... | 36.450704 | 118 | 0.674266 |
79e409fb4c145ae80d44890fb18e11fe23b1670d | 899 | ex | Elixir | lib/appsignal/monitor.ex | oliver-kriska/appsignal-elixir | 2de2759a67257c5325434f190084f53c4ab5f913 | [
"MIT"
] | null | null | null | lib/appsignal/monitor.ex | oliver-kriska/appsignal-elixir | 2de2759a67257c5325434f190084f53c4ab5f913 | [
"MIT"
] | null | null | null | lib/appsignal/monitor.ex | oliver-kriska/appsignal-elixir | 2de2759a67257c5325434f190084f53c4ab5f913 | [
"MIT"
] | null | null | null | defmodule Appsignal.Monitor do
@moduledoc false
@deletion_delay Application.get_env(:appsignal, :deletion_delay, 5_000)
use GenServer
alias Appsignal.Tracer
def start_link do
GenServer.start_link(__MODULE__, [], name: __MODULE__)
end
def init(state) do
{:ok, state}
end
def add do
GenSe... | 22.475 | 73 | 0.674082 |
79e418b4f653762b6ba028d5eacdcd121a77bcca | 2,316 | ex | Elixir | lib/blaine/persistance/repository/dets.ex | eeng/blaine | d91d94034925d64632789925ef90a198c0a1d8ea | [
"MIT"
] | null | null | null | lib/blaine/persistance/repository/dets.ex | eeng/blaine | d91d94034925d64632789925ef90a198c0a1d8ea | [
"MIT"
] | null | null | null | lib/blaine/persistance/repository/dets.ex | eeng/blaine | d91d94034925d64632789925ef90a198c0a1d8ea | [
"MIT"
] | null | null | null | defmodule Blaine.Persistence.Repository.Dets do
@moduledoc """
This GenServer handles the system persistance in a DETS table.
"""
use Blaine.Persistance.Repository
use GenServer
@me __MODULE__
def start_link(opts) do
table = Keyword.get(opts, :table, :blaine)
GenServer.start_link(@me, table, na... | 22.930693 | 70 | 0.66753 |
79e43749a3b57e7a94ecd218822121d707067ea0 | 7,519 | ex | Elixir | clients/android_enterprise/lib/google_api/android_enterprise/v1/model/product.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | 1 | 2018-12-03T23:43:10.000Z | 2018-12-03T23:43:10.000Z | clients/android_enterprise/lib/google_api/android_enterprise/v1/model/product.ex | matehat/elixir-google-api | c1b2523c2c4cdc9e6ca4653ac078c94796b393c3 | [
"Apache-2.0"
] | null | null | null | clients/android_enterprise/lib/google_api/android_enterprise/v1/model/product.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 ... | 63.184874 | 493 | 0.700758 |
79e44cc14f9264b035a5aba1670bd6f22b2799ca | 8,780 | ex | Elixir | lib/elasticsearch/indexing/index.ex | Eein/elasticsearch-elixir | 2f8a63069d6ba64ff9d572c66c10449a287837b8 | [
"MIT"
] | null | null | null | lib/elasticsearch/indexing/index.ex | Eein/elasticsearch-elixir | 2f8a63069d6ba64ff9d572c66c10449a287837b8 | [
"MIT"
] | null | null | null | lib/elasticsearch/indexing/index.ex | Eein/elasticsearch-elixir | 2f8a63069d6ba64ff9d572c66c10449a287837b8 | [
"MIT"
] | null | null | null | defmodule Elasticsearch.Index do
@moduledoc """
Functions for manipulating Elasticsearch indexes.
"""
alias Elasticsearch.{
Cluster.Config,
Index.Bulk
}
@doc """
Creates an index using a zero-downtime hot-swap technique.
1. Build an index for the given `alias`, with a timestamp: `alias-123231... | 29.863946 | 127 | 0.602733 |
79e454d3800f1d5a3e2ef97a68abaa409ed781b2 | 1,988 | exs | Elixir | apps/service_aggregate/test/aggregate/reducer/bounding_box_test.exs | jdenen/hindsight | ef69b4c1a74c94729dd838a9a0849a48c9b6e04c | [
"Apache-2.0"
] | 12 | 2020-01-27T19:43:02.000Z | 2021-07-28T19:46:29.000Z | apps/service_aggregate/test/aggregate/reducer/bounding_box_test.exs | jdenen/hindsight | ef69b4c1a74c94729dd838a9a0849a48c9b6e04c | [
"Apache-2.0"
] | 81 | 2020-01-28T18:07:23.000Z | 2021-11-22T02:12:13.000Z | apps/service_aggregate/test/aggregate/reducer/bounding_box_test.exs | jdenen/hindsight | ef69b4c1a74c94729dd838a9a0849a48c9b6e04c | [
"Apache-2.0"
] | 10 | 2020-02-13T21:24:09.000Z | 2020-05-21T18:39:35.000Z | defmodule Aggregate.Reducer.BoundingBoxTest do
use ExUnit.Case
import Checkov
setup do
reducer =
Aggregate.Reducer.BoundingBox.new(
latitude_path: ["lat"],
longitude_path: ["long"]
)
[reducer: reducer]
end
describe "init/2" do
test "will read from stats", %{reducer: ... | 24.243902 | 88 | 0.554829 |
79e46fa536a4ab12d6801a13bc47428d15b42789 | 1,996 | ex | Elixir | clients/document_ai/lib/google_api/document_ai/v1beta2/model/google_cloud_documentai_uiv1beta3_update_human_review_config_metadata.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | null | null | null | clients/document_ai/lib/google_api/document_ai/v1beta2/model/google_cloud_documentai_uiv1beta3_update_human_review_config_metadata.ex | mcrumm/elixir-google-api | 544f22797cec52b3a23dfb6e39117f0018448610 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/document_ai/lib/google_api/document_ai/v1beta2/model/google_cloud_documentai_uiv1beta3_update_human_review_config_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... | 35.017544 | 195 | 0.778056 |
79e48e24ad9ad8b1aae866347fccf68c36d98e02 | 2,364 | ex | Elixir | clients/health_care/lib/google_api/health_care/v1beta1/model/parser_config.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/health_care/lib/google_api/health_care/v1beta1/model/parser_config.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/health_care/lib/google_api/health_care/v1beta1/model/parser_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... | 42.214286 | 205 | 0.730118 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.